text: (function webpackUniversalModuleDefinition(root, factory) {
  	if(typeof exports === 'object' && typeof module === 'object')
  		module.exports = factory();
  	else if(typeof define === 'function' && define.amd)
  		define("@pascalcoin-sbx/walletkeys.dat", [], factory);
  	else if(typeof exports === 'object')
  		exports["@pascalcoin-sbx/walletkeys.dat"] = factory();
  	else
  		root["@pascalcoin-sbx/walletkeys.dat"] = factory();
  })(typeof self !== 'undefined' ? self : this, function() {
  return /******/ (function(modules) { // webpackBootstrap
  /******/ 	// The module cache
  /******/ 	var installedModules = {};
  /******/
  /******/ 	// The require function
  /******/ 	function __webpack_require__(moduleId) {
  /******/
  /******/ 		// Check if module is in cache
  /******/ 		if(installedModules[moduleId]) {
  /******/ 			return installedModules[moduleId].exports;
  /******/ 		}
  /******/ 		// Create a new module (and put it into the cache)
  /******/ 		var module = installedModules[moduleId] = {
  /******/ 			i: moduleId,
  /******/ 			l: false,
  /******/ 			exports: {}
  /******/ 		};
  /******/
  /******/ 		// Execute the module function
  /******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  /******/
  /******/ 		// Flag the module as loaded
  /******/ 		module.l = true;
  /******/
  /******/ 		// Return the exports of the module
  /******/ 		return module.exports;
  /******/ 	}
  /******/
  /******/
  /******/ 	// expose the modules object (__webpack_modules__)
  /******/ 	__webpack_require__.m = modules;
  /******/
  /******/ 	// expose the module cache
  /******/ 	__webpack_require__.c = installedModules;
  /******/
  /******/ 	// define getter function for harmony exports
  /******/ 	__webpack_require__.d = function(exports, name, getter) {
  /******/ 		if(!__webpack_require__.o(exports, name)) {
  /******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
  /******/ 		}
  /******/ 	};
  /******/
  /******/ 	// define __esModule on exports
  /******/ 	__webpack_require__.r = function(exports) {
  /******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  /******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  /******/ 		}
  /******/ 		Object.defineProperty(exports, '__esModule', { value: true });
  /******/ 	};
  /******/
  /******/ 	// create a fake namespace object
  /******/ 	// mode & 1: value is a module id, require it
  /******/ 	// mode & 2: merge all properties of value into the ns
  /******/ 	// mode & 4: return value when already ns object
  /******/ 	// mode & 8|1: behave like require
  /******/ 	__webpack_require__.t = function(value, mode) {
  /******/ 		if(mode & 1) value = __webpack_require__(value);
  /******/ 		if(mode & 8) return value;
  /******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  /******/ 		var ns = Object.create(null);
  /******/ 		__webpack_require__.r(ns);
  /******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  /******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  /******/ 		return ns;
  /******/ 	};
  /******/
  /******/ 	// getDefaultExport function for compatibility with non-harmony modules
  /******/ 	__webpack_require__.n = function(module) {
  /******/ 		var getter = module && module.__esModule ?
  /******/ 			function getDefault() { return module['default']; } :
  /******/ 			function getModuleExports() { return module; };
  /******/ 		__webpack_require__.d(getter, 'a', getter);
  /******/ 		return getter;
  /******/ 	};
  /******/
  /******/ 	// Object.prototype.hasOwnProperty.call
  /******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  /******/
  /******/ 	// __webpack_public_path__
  /******/ 	__webpack_require__.p = "";
  /******/
  /******/
  /******/ 	// Load entry module and return exports
  /******/ 	return __webpack_require__(__webpack_require__.s = 0);
  /******/ })
  /************************************************************************/
  /******/ ({
  
  /***/ "../../node_modules/base-x/index.js":
  /*!******************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/base-x/index.js ***!
    \******************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  // base-x encoding / decoding
  // Copyright (c) 2018 base-x contributors
  // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
  // Distributed under the MIT software license, see the accompanying
  // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
  
  const Buffer = __webpack_require__(/*! safe-buffer */ "../../node_modules/safe-buffer/index.js").Buffer
  
  module.exports = function base (ALPHABET) {
    if (ALPHABET.length >= 255) throw new TypeError('Alphabet too long')
  
    const BASE_MAP = new Uint8Array(256)
    BASE_MAP.fill(255)
  
    for (let i = 0; i < ALPHABET.length; i++) {
      const x = ALPHABET.charAt(i)
      const xc = x.charCodeAt(0)
  
      if (BASE_MAP[xc] !== 255) throw new TypeError(x + ' is ambiguous')
      BASE_MAP[xc] = i
    }
  
    const BASE = ALPHABET.length
    const LEADER = ALPHABET.charAt(0)
    const FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up
    const iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up
  
    function encode (source) {
      if (!Buffer.isBuffer(source)) throw new TypeError('Expected Buffer')
      if (source.length === 0) return ''
  
      // Skip & count leading zeroes.
      let zeroes = 0
      let length = 0
      let pbegin = 0
      const pend = source.length
  
      while (pbegin !== pend && source[pbegin] === 0) {
        pbegin++
        zeroes++
      }
  
      // Allocate enough space in big-endian base58 representation.
      const size = ((pend - pbegin) * iFACTOR + 1) >>> 0
      const b58 = new Uint8Array(size)
  
      // Process the bytes.
      while (pbegin !== pend) {
        let carry = source[pbegin]
  
        // Apply "b58 = b58 * 256 + ch".
        let i = 0
        for (let it = size - 1; (carry !== 0 || i < length) && (it !== -1); it--, i++) {
          carry += (256 * b58[it]) >>> 0
          b58[it] = (carry % BASE) >>> 0
          carry = (carry / BASE) >>> 0
        }
  
        if (carry !== 0) throw new Error('Non-zero carry')
        length = i
        pbegin++
      }
  
      // Skip leading zeroes in base58 result.
      let it = size - length
      while (it !== size && b58[it] === 0) {
        it++
      }
  
      // Translate the result into a string.
      let str = LEADER.repeat(zeroes)
      for (; it < size; ++it) str += ALPHABET.charAt(b58[it])
  
      return str
    }
  
    function decodeUnsafe (source) {
      if (typeof source !== 'string') throw new TypeError('Expected String')
      if (source.length === 0) return Buffer.alloc(0)
  
      let psz = 0
  
      // Skip leading spaces.
      if (source[psz] === ' ') return
  
      // Skip and count leading '1's.
      let zeroes = 0
      let length = 0
      while (source[psz] === LEADER) {
        zeroes++
        psz++
      }
  
      // Allocate enough space in big-endian base256 representation.
      const size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.
      const b256 = new Uint8Array(size)
  
      // Process the characters.
      while (source[psz]) {
        // Decode character
        let carry = BASE_MAP[source.charCodeAt(psz)]
  
        // Invalid character
        if (carry === 255) return
  
        let i = 0
        for (let it = size - 1; (carry !== 0 || i < length) && (it !== -1); it--, i++) {
          carry += (BASE * b256[it]) >>> 0
          b256[it] = (carry % 256) >>> 0
          carry = (carry / 256) >>> 0
        }
  
        if (carry !== 0) throw new Error('Non-zero carry')
        length = i
        psz++
      }
  
      // Skip trailing spaces.
      if (source[psz] === ' ') return
  
      // Skip leading zeroes in b256.
      let it = size - length
      while (it !== size && b256[it] === 0) {
        it++
      }
  
      const vch = Buffer.allocUnsafe(zeroes + (size - it))
      vch.fill(0x00, 0, zeroes)
  
      let j = zeroes
      while (it !== size) {
        vch[j++] = b256[it++]
      }
  
      return vch
    }
  
    function decode (string) {
      const buffer = decodeUnsafe(string)
      if (buffer) return buffer
  
      throw new Error('Non-base' + BASE + ' character')
    }
  
    return {
      encode: encode,
      decodeUnsafe: decodeUnsafe,
      decode: decode
    }
  }
  
  
  /***/ }),
  
  /***/ "../../node_modules/base64-js/index.js":
  /*!*********************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/base64-js/index.js ***!
    \*********************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (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
  
    for (var 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('')
  }
  
  
  /***/ }),
  
  /***/ "../../node_modules/bn.js/lib/bn.js":
  /*!******************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/bn.js/lib/bn.js ***!
    \******************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /* WEBPACK VAR INJECTION */(function(module) {(function (module, exports) {
    'use strict';
  
    // Utils
    function assert (val, msg) {
      if (!val) throw new Error(msg || 'Assertion failed');
    }
  
    // Could use `inherits` module, but don't want to move from single file
    // architecture yet.
    function inherits (ctor, superCtor) {
      ctor.super_ = superCtor;
      var TempCtor = function () {};
      TempCtor.prototype = superCtor.prototype;
      ctor.prototype = new TempCtor();
      ctor.prototype.constructor = ctor;
    }
  
    // BN
  
    function BN (number, base, endian) {
      if (BN.isBN(number)) {
        return number;
      }
  
      this.negative = 0;
      this.words = null;
      this.length = 0;
  
      // Reduction context
      this.red = null;
  
      if (number !== null) {
        if (base === 'le' || base === 'be') {
          endian = base;
          base = 10;
        }
  
        this._init(number || 0, base || 10, endian || 'be');
      }
    }
    if (typeof module === 'object') {
      module.exports = BN;
    } else {
      exports.BN = BN;
    }
  
    BN.BN = BN;
    BN.wordSize = 26;
  
    var Buffer;
    try {
      Buffer = __webpack_require__(/*! buffer */ 1).Buffer;
    } catch (e) {
    }
  
    BN.isBN = function isBN (num) {
      if (num instanceof BN) {
        return true;
      }
  
      return num !== null && typeof num === 'object' &&
        num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
    };
  
    BN.max = function max (left, right) {
      if (left.cmp(right) > 0) return left;
      return right;
    };
  
    BN.min = function min (left, right) {
      if (left.cmp(right) < 0) return left;
      return right;
    };
  
    BN.prototype._init = function init (number, base, endian) {
      if (typeof number === 'number') {
        return this._initNumber(number, base, endian);
      }
  
      if (typeof number === 'object') {
        return this._initArray(number, base, endian);
      }
  
      if (base === 'hex') {
        base = 16;
      }
      assert(base === (base | 0) && base >= 2 && base <= 36);
  
      number = number.toString().replace(/\s+/g, '');
      var start = 0;
      if (number[0] === '-') {
        start++;
      }
  
      if (base === 16) {
        this._parseHex(number, start);
      } else {
        this._parseBase(number, base, start);
      }
  
      if (number[0] === '-') {
        this.negative = 1;
      }
  
      this.strip();
  
      if (endian !== 'le') return;
  
      this._initArray(this.toArray(), base, endian);
    };
  
    BN.prototype._initNumber = function _initNumber (number, base, endian) {
      if (number < 0) {
        this.negative = 1;
        number = -number;
      }
      if (number < 0x4000000) {
        this.words = [ number & 0x3ffffff ];
        this.length = 1;
      } else if (number < 0x10000000000000) {
        this.words = [
          number & 0x3ffffff,
          (number / 0x4000000) & 0x3ffffff
        ];
        this.length = 2;
      } else {
        assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)
        this.words = [
          number & 0x3ffffff,
          (number / 0x4000000) & 0x3ffffff,
          1
        ];
        this.length = 3;
      }
  
      if (endian !== 'le') return;
  
      // Reverse the bytes
      this._initArray(this.toArray(), base, endian);
    };
  
    BN.prototype._initArray = function _initArray (number, base, endian) {
      // Perhaps a Uint8Array
      assert(typeof number.length === 'number');
      if (number.length <= 0) {
        this.words = [ 0 ];
        this.length = 1;
        return this;
      }
  
      this.length = Math.ceil(number.length / 3);
      this.words = new Array(this.length);
      for (var i = 0; i < this.length; i++) {
        this.words[i] = 0;
      }
  
      var j, w;
      var off = 0;
      if (endian === 'be') {
        for (i = number.length - 1, j = 0; i >= 0; i -= 3) {
          w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
          this.words[j] |= (w << off) & 0x3ffffff;
          this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
          off += 24;
          if (off >= 26) {
            off -= 26;
            j++;
          }
        }
      } else if (endian === 'le') {
        for (i = 0, j = 0; i < number.length; i += 3) {
          w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
          this.words[j] |= (w << off) & 0x3ffffff;
          this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
          off += 24;
          if (off >= 26) {
            off -= 26;
            j++;
          }
        }
      }
      return this.strip();
    };
  
    function parseHex (str, start, end) {
      var r = 0;
      var len = Math.min(str.length, end);
      for (var i = start; i < len; i++) {
        var c = str.charCodeAt(i) - 48;
  
        r <<= 4;
  
        // 'a' - 'f'
        if (c >= 49 && c <= 54) {
          r |= c - 49 + 0xa;
  
        // 'A' - 'F'
        } else if (c >= 17 && c <= 22) {
          r |= c - 17 + 0xa;
  
        // '0' - '9'
        } else {
          r |= c & 0xf;
        }
      }
      return r;
    }
  
    BN.prototype._parseHex = function _parseHex (number, start) {
      // Create possibly bigger array to ensure that it fits the number
      this.length = Math.ceil((number.length - start) / 6);
      this.words = new Array(this.length);
      for (var i = 0; i < this.length; i++) {
        this.words[i] = 0;
      }
  
      var j, w;
      // Scan 24-bit chunks and add them to the number
      var off = 0;
      for (i = number.length - 6, j = 0; i >= start; i -= 6) {
        w = parseHex(number, i, i + 6);
        this.words[j] |= (w << off) & 0x3ffffff;
        // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb
        this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
        off += 24;
        if (off >= 26) {
          off -= 26;
          j++;
        }
      }
      if (i + 6 !== start) {
        w = parseHex(number, start, i + 6);
        this.words[j] |= (w << off) & 0x3ffffff;
        this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
      }
      this.strip();
    };
  
    function parseBase (str, start, end, mul) {
      var r = 0;
      var len = Math.min(str.length, end);
      for (var i = start; i < len; i++) {
        var c = str.charCodeAt(i) - 48;
  
        r *= mul;
  
        // 'a'
        if (c >= 49) {
          r += c - 49 + 0xa;
  
        // 'A'
        } else if (c >= 17) {
          r += c - 17 + 0xa;
  
        // '0' - '9'
        } else {
          r += c;
        }
      }
      return r;
    }
  
    BN.prototype._parseBase = function _parseBase (number, base, start) {
      // Initialize as zero
      this.words = [ 0 ];
      this.length = 1;
  
      // Find length of limb in base
      for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {
        limbLen++;
      }
      limbLen--;
      limbPow = (limbPow / base) | 0;
  
      var total = number.length - start;
      var mod = total % limbLen;
      var end = Math.min(total, total - mod) + start;
  
      var word = 0;
      for (var i = start; i < end; i += limbLen) {
        word = parseBase(number, i, i + limbLen, base);
  
        this.imuln(limbPow);
        if (this.words[0] + word < 0x4000000) {
          this.words[0] += word;
        } else {
          this._iaddn(word);
        }
      }
  
      if (mod !== 0) {
        var pow = 1;
        word = parseBase(number, i, number.length, base);
  
        for (i = 0; i < mod; i++) {
          pow *= base;
        }
  
        this.imuln(pow);
        if (this.words[0] + word < 0x4000000) {
          this.words[0] += word;
        } else {
          this._iaddn(word);
        }
      }
    };
  
    BN.prototype.copy = function copy (dest) {
      dest.words = new Array(this.length);
      for (var i = 0; i < this.length; i++) {
        dest.words[i] = this.words[i];
      }
      dest.length = this.length;
      dest.negative = this.negative;
      dest.red = this.red;
    };
  
    BN.prototype.clone = function clone () {
      var r = new BN(null);
      this.copy(r);
      return r;
    };
  
    BN.prototype._expand = function _expand (size) {
      while (this.length < size) {
        this.words[this.length++] = 0;
      }
      return this;
    };
  
    // Remove leading `0` from `this`
    BN.prototype.strip = function strip () {
      while (this.length > 1 && this.words[this.length - 1] === 0) {
        this.length--;
      }
      return this._normSign();
    };
  
    BN.prototype._normSign = function _normSign () {
      // -0 = 0
      if (this.length === 1 && this.words[0] === 0) {
        this.negative = 0;
      }
      return this;
    };
  
    BN.prototype.inspect = function inspect () {
      return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';
    };
  
    /*
  
    var zeros = [];
    var groupSizes = [];
    var groupBases = [];
  
    var s = '';
    var i = -1;
    while (++i < BN.wordSize) {
      zeros[i] = s;
      s += '0';
    }
    groupSizes[0] = 0;
    groupSizes[1] = 0;
    groupBases[0] = 0;
    groupBases[1] = 0;
    var base = 2 - 1;
    while (++base < 36 + 1) {
      var groupSize = 0;
      var groupBase = 1;
      while (groupBase < (1 << BN.wordSize) / base) {
        groupBase *= base;
        groupSize += 1;
      }
      groupSizes[base] = groupSize;
      groupBases[base] = groupBase;
    }
  
    */
  
    var zeros = [
      '',
      '0',
      '00',
      '000',
      '0000',
      '00000',
      '000000',
      '0000000',
      '00000000',
      '000000000',
      '0000000000',
      '00000000000',
      '000000000000',
      '0000000000000',
      '00000000000000',
      '000000000000000',
      '0000000000000000',
      '00000000000000000',
      '000000000000000000',
      '0000000000000000000',
      '00000000000000000000',
      '000000000000000000000',
      '0000000000000000000000',
      '00000000000000000000000',
      '000000000000000000000000',
      '0000000000000000000000000'
    ];
  
    var groupSizes = [
      0, 0,
      25, 16, 12, 11, 10, 9, 8,
      8, 7, 7, 7, 7, 6, 6,
      6, 6, 6, 6, 6, 5, 5,
      5, 5, 5, 5, 5, 5, 5,
      5, 5, 5, 5, 5, 5, 5
    ];
  
    var groupBases = [
      0, 0,
      33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,
      43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,
      16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,
      6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
      24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176
    ];
  
    BN.prototype.toString = function toString (base, padding) {
      base = base || 10;
      padding = padding | 0 || 1;
  
      var out;
      if (base === 16 || base === 'hex') {
        out = '';
        var off = 0;
        var carry = 0;
        for (var i = 0; i < this.length; i++) {
          var w = this.words[i];
          var word = (((w << off) | carry) & 0xffffff).toString(16);
          carry = (w >>> (24 - off)) & 0xffffff;
          if (carry !== 0 || i !== this.length - 1) {
            out = zeros[6 - word.length] + word + out;
          } else {
            out = word + out;
          }
          off += 2;
          if (off >= 26) {
            off -= 26;
            i--;
          }
        }
        if (carry !== 0) {
          out = carry.toString(16) + out;
        }
        while (out.length % padding !== 0) {
          out = '0' + out;
        }
        if (this.negative !== 0) {
          out = '-' + out;
        }
        return out;
      }
  
      if (base === (base | 0) && base >= 2 && base <= 36) {
        // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));
        var groupSize = groupSizes[base];
        // var groupBase = Math.pow(base, groupSize);
        var groupBase = groupBases[base];
        out = '';
        var c = this.clone();
        c.negative = 0;
        while (!c.isZero()) {
          var r = c.modn(groupBase).toString(base);
          c = c.idivn(groupBase);
  
          if (!c.isZero()) {
            out = zeros[groupSize - r.length] + r + out;
          } else {
            out = r + out;
          }
        }
        if (this.isZero()) {
          out = '0' + out;
        }
        while (out.length % padding !== 0) {
          out = '0' + out;
        }
        if (this.negative !== 0) {
          out = '-' + out;
        }
        return out;
      }
  
      assert(false, 'Base should be between 2 and 36');
    };
  
    BN.prototype.toNumber = function toNumber () {
      var ret = this.words[0];
      if (this.length === 2) {
        ret += this.words[1] * 0x4000000;
      } else if (this.length === 3 && this.words[2] === 0x01) {
        // NOTE: at this stage it is known that the top bit is set
        ret += 0x10000000000000 + (this.words[1] * 0x4000000);
      } else if (this.length > 2) {
        assert(false, 'Number can only safely store up to 53 bits');
      }
      return (this.negative !== 0) ? -ret : ret;
    };
  
    BN.prototype.toJSON = function toJSON () {
      return this.toString(16);
    };
  
    BN.prototype.toBuffer = function toBuffer (endian, length) {
      assert(typeof Buffer !== 'undefined');
      return this.toArrayLike(Buffer, endian, length);
    };
  
    BN.prototype.toArray = function toArray (endian, length) {
      return this.toArrayLike(Array, endian, length);
    };
  
    BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {
      var byteLength = this.byteLength();
      var reqLength = length || Math.max(1, byteLength);
      assert(byteLength <= reqLength, 'byte array longer than desired length');
      assert(reqLength > 0, 'Requested array length <= 0');
  
      this.strip();
      var littleEndian = endian === 'le';
      var res = new ArrayType(reqLength);
  
      var b, i;
      var q = this.clone();
      if (!littleEndian) {
        // Assume big-endian
        for (i = 0; i < reqLength - byteLength; i++) {
          res[i] = 0;
        }
  
        for (i = 0; !q.isZero(); i++) {
          b = q.andln(0xff);
          q.iushrn(8);
  
          res[reqLength - i - 1] = b;
        }
      } else {
        for (i = 0; !q.isZero(); i++) {
          b = q.andln(0xff);
          q.iushrn(8);
  
          res[i] = b;
        }
  
        for (; i < reqLength; i++) {
          res[i] = 0;
        }
      }
  
      return res;
    };
  
    if (Math.clz32) {
      BN.prototype._countBits = function _countBits (w) {
        return 32 - Math.clz32(w);
      };
    } else {
      BN.prototype._countBits = function _countBits (w) {
        var t = w;
        var r = 0;
        if (t >= 0x1000) {
          r += 13;
          t >>>= 13;
        }
        if (t >= 0x40) {
          r += 7;
          t >>>= 7;
        }
        if (t >= 0x8) {
          r += 4;
          t >>>= 4;
        }
        if (t >= 0x02) {
          r += 2;
          t >>>= 2;
        }
        return r + t;
      };
    }
  
    BN.prototype._zeroBits = function _zeroBits (w) {
      // Short-cut
      if (w === 0) return 26;
  
      var t = w;
      var r = 0;
      if ((t & 0x1fff) === 0) {
        r += 13;
        t >>>= 13;
      }
      if ((t & 0x7f) === 0) {
        r += 7;
        t >>>= 7;
      }
      if ((t & 0xf) === 0) {
        r += 4;
        t >>>= 4;
      }
      if ((t & 0x3) === 0) {
        r += 2;
        t >>>= 2;
      }
      if ((t & 0x1) === 0) {
        r++;
      }
      return r;
    };
  
    // Return number of used bits in a BN
    BN.prototype.bitLength = function bitLength () {
      var w = this.words[this.length - 1];
      var hi = this._countBits(w);
      return (this.length - 1) * 26 + hi;
    };
  
    function toBitArray (num) {
      var w = new Array(num.bitLength());
  
      for (var bit = 0; bit < w.length; bit++) {
        var off = (bit / 26) | 0;
        var wbit = bit % 26;
  
        w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;
      }
  
      return w;
    }
  
    // Number of trailing zero bits
    BN.prototype.zeroBits = function zeroBits () {
      if (this.isZero()) return 0;
  
      var r = 0;
      for (var i = 0; i < this.length; i++) {
        var b = this._zeroBits(this.words[i]);
        r += b;
        if (b !== 26) break;
      }
      return r;
    };
  
    BN.prototype.byteLength = function byteLength () {
      return Math.ceil(this.bitLength() / 8);
    };
  
    BN.prototype.toTwos = function toTwos (width) {
      if (this.negative !== 0) {
        return this.abs().inotn(width).iaddn(1);
      }
      return this.clone();
    };
  
    BN.prototype.fromTwos = function fromTwos (width) {
      if (this.testn(width - 1)) {
        return this.notn(width).iaddn(1).ineg();
      }
      return this.clone();
    };
  
    BN.prototype.isNeg = function isNeg () {
      return this.negative !== 0;
    };
  
    // Return negative clone of `this`
    BN.prototype.neg = function neg () {
      return this.clone().ineg();
    };
  
    BN.prototype.ineg = function ineg () {
      if (!this.isZero()) {
        this.negative ^= 1;
      }
  
      return this;
    };
  
    // Or `num` with `this` in-place
    BN.prototype.iuor = function iuor (num) {
      while (this.length < num.length) {
        this.words[this.length++] = 0;
      }
  
      for (var i = 0; i < num.length; i++) {
        this.words[i] = this.words[i] | num.words[i];
      }
  
      return this.strip();
    };
  
    BN.prototype.ior = function ior (num) {
      assert((this.negative | num.negative) === 0);
      return this.iuor(num);
    };
  
    // Or `num` with `this`
    BN.prototype.or = function or (num) {
      if (this.length > num.length) return this.clone().ior(num);
      return num.clone().ior(this);
    };
  
    BN.prototype.uor = function uor (num) {
      if (this.length > num.length) return this.clone().iuor(num);
      return num.clone().iuor(this);
    };
  
    // And `num` with `this` in-place
    BN.prototype.iuand = function iuand (num) {
      // b = min-length(num, this)
      var b;
      if (this.length > num.length) {
        b = num;
      } else {
        b = this;
      }
  
      for (var i = 0; i < b.length; i++) {
        this.words[i] = this.words[i] & num.words[i];
      }
  
      this.length = b.length;
  
      return this.strip();
    };
  
    BN.prototype.iand = function iand (num) {
      assert((this.negative | num.negative) === 0);
      return this.iuand(num);
    };
  
    // And `num` with `this`
    BN.prototype.and = function and (num) {
      if (this.length > num.length) return this.clone().iand(num);
      return num.clone().iand(this);
    };
  
    BN.prototype.uand = function uand (num) {
      if (this.length > num.length) return this.clone().iuand(num);
      return num.clone().iuand(this);
    };
  
    // Xor `num` with `this` in-place
    BN.prototype.iuxor = function iuxor (num) {
      // a.length > b.length
      var a;
      var b;
      if (this.length > num.length) {
        a = this;
        b = num;
      } else {
        a = num;
        b = this;
      }
  
      for (var i = 0; i < b.length; i++) {
        this.words[i] = a.words[i] ^ b.words[i];
      }
  
      if (this !== a) {
        for (; i < a.length; i++) {
          this.words[i] = a.words[i];
        }
      }
  
      this.length = a.length;
  
      return this.strip();
    };
  
    BN.prototype.ixor = function ixor (num) {
      assert((this.negative | num.negative) === 0);
      return this.iuxor(num);
    };
  
    // Xor `num` with `this`
    BN.prototype.xor = function xor (num) {
      if (this.length > num.length) return this.clone().ixor(num);
      return num.clone().ixor(this);
    };
  
    BN.prototype.uxor = function uxor (num) {
      if (this.length > num.length) return this.clone().iuxor(num);
      return num.clone().iuxor(this);
    };
  
    // Not ``this`` with ``width`` bitwidth
    BN.prototype.inotn = function inotn (width) {
      assert(typeof width === 'number' && width >= 0);
  
      var bytesNeeded = Math.ceil(width / 26) | 0;
      var bitsLeft = width % 26;
  
      // Extend the buffer with leading zeroes
      this._expand(bytesNeeded);
  
      if (bitsLeft > 0) {
        bytesNeeded--;
      }
  
      // Handle complete words
      for (var i = 0; i < bytesNeeded; i++) {
        this.words[i] = ~this.words[i] & 0x3ffffff;
      }
  
      // Handle the residue
      if (bitsLeft > 0) {
        this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));
      }
  
      // And remove leading zeroes
      return this.strip();
    };
  
    BN.prototype.notn = function notn (width) {
      return this.clone().inotn(width);
    };
  
    // Set `bit` of `this`
    BN.prototype.setn = function setn (bit, val) {
      assert(typeof bit === 'number' && bit >= 0);
  
      var off = (bit / 26) | 0;
      var wbit = bit % 26;
  
      this._expand(off + 1);
  
      if (val) {
        this.words[off] = this.words[off] | (1 << wbit);
      } else {
        this.words[off] = this.words[off] & ~(1 << wbit);
      }
  
      return this.strip();
    };
  
    // Add `num` to `this` in-place
    BN.prototype.iadd = function iadd (num) {
      var r;
  
      // negative + positive
      if (this.negative !== 0 && num.negative === 0) {
        this.negative = 0;
        r = this.isub(num);
        this.negative ^= 1;
        return this._normSign();
  
      // positive + negative
      } else if (this.negative === 0 && num.negative !== 0) {
        num.negative = 0;
        r = this.isub(num);
        num.negative = 1;
        return r._normSign();
      }
  
      // a.length > b.length
      var a, b;
      if (this.length > num.length) {
        a = this;
        b = num;
      } else {
        a = num;
        b = this;
      }
  
      var carry = 0;
      for (var i = 0; i < b.length; i++) {
        r = (a.words[i] | 0) + (b.words[i] | 0) + carry;
        this.words[i] = r & 0x3ffffff;
        carry = r >>> 26;
      }
      for (; carry !== 0 && i < a.length; i++) {
        r = (a.words[i] | 0) + carry;
        this.words[i] = r & 0x3ffffff;
        carry = r >>> 26;
      }
  
      this.length = a.length;
      if (carry !== 0) {
        this.words[this.length] = carry;
        this.length++;
      // Copy the rest of the words
      } else if (a !== this) {
        for (; i < a.length; i++) {
          this.words[i] = a.words[i];
        }
      }
  
      return this;
    };
  
    // Add `num` to `this`
    BN.prototype.add = function add (num) {
      var res;
      if (num.negative !== 0 && this.negative === 0) {
        num.negative = 0;
        res = this.sub(num);
        num.negative ^= 1;
        return res;
      } else if (num.negative === 0 && this.negative !== 0) {
        this.negative = 0;
        res = num.sub(this);
        this.negative = 1;
        return res;
      }
  
      if (this.length > num.length) return this.clone().iadd(num);
  
      return num.clone().iadd(this);
    };
  
    // Subtract `num` from `this` in-place
    BN.prototype.isub = function isub (num) {
      // this - (-num) = this + num
      if (num.negative !== 0) {
        num.negative = 0;
        var r = this.iadd(num);
        num.negative = 1;
        return r._normSign();
  
      // -this - num = -(this + num)
      } else if (this.negative !== 0) {
        this.negative = 0;
        this.iadd(num);
        this.negative = 1;
        return this._normSign();
      }
  
      // At this point both numbers are positive
      var cmp = this.cmp(num);
  
      // Optimization - zeroify
      if (cmp === 0) {
        this.negative = 0;
        this.length = 1;
        this.words[0] = 0;
        return this;
      }
  
      // a > b
      var a, b;
      if (cmp > 0) {
        a = this;
        b = num;
      } else {
        a = num;
        b = this;
      }
  
      var carry = 0;
      for (var i = 0; i < b.length; i++) {
        r = (a.words[i] | 0) - (b.words[i] | 0) + carry;
        carry = r >> 26;
        this.words[i] = r & 0x3ffffff;
      }
      for (; carry !== 0 && i < a.length; i++) {
        r = (a.words[i] | 0) + carry;
        carry = r >> 26;
        this.words[i] = r & 0x3ffffff;
      }
  
      // Copy rest of the words
      if (carry === 0 && i < a.length && a !== this) {
        for (; i < a.length; i++) {
          this.words[i] = a.words[i];
        }
      }
  
      this.length = Math.max(this.length, i);
  
      if (a !== this) {
        this.negative = 1;
      }
  
      return this.strip();
    };
  
    // Subtract `num` from `this`
    BN.prototype.sub = function sub (num) {
      return this.clone().isub(num);
    };
  
    function smallMulTo (self, num, out) {
      out.negative = num.negative ^ self.negative;
      var len = (self.length + num.length) | 0;
      out.length = len;
      len = (len - 1) | 0;
  
      // Peel one iteration (compiler can't do it, because of code complexity)
      var a = self.words[0] | 0;
      var b = num.words[0] | 0;
      var r = a * b;
  
      var lo = r & 0x3ffffff;
      var carry = (r / 0x4000000) | 0;
      out.words[0] = lo;
  
      for (var k = 1; k < len; k++) {
        // Sum all words with the same `i + j = k` and accumulate `ncarry`,
        // note that ncarry could be >= 0x3ffffff
        var ncarry = carry >>> 26;
        var rword = carry & 0x3ffffff;
        var maxJ = Math.min(k, num.length - 1);
        for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
          var i = (k - j) | 0;
          a = self.words[i] | 0;
          b = num.words[j] | 0;
          r = a * b + rword;
          ncarry += (r / 0x4000000) | 0;
          rword = r & 0x3ffffff;
        }
        out.words[k] = rword | 0;
        carry = ncarry | 0;
      }
      if (carry !== 0) {
        out.words[k] = carry | 0;
      } else {
        out.length--;
      }
  
      return out.strip();
    }
  
    // TODO(indutny): it may be reasonable to omit it for users who don't need
    // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit
    // multiplication (like elliptic secp256k1).
    var comb10MulTo = function comb10MulTo (self, num, out) {
      var a = self.words;
      var b = num.words;
      var o = out.words;
      var c = 0;
      var lo;
      var mid;
      var hi;
      var a0 = a[0] | 0;
      var al0 = a0 & 0x1fff;
      var ah0 = a0 >>> 13;
      var a1 = a[1] | 0;
      var al1 = a1 & 0x1fff;
      var ah1 = a1 >>> 13;
      var a2 = a[2] | 0;
      var al2 = a2 & 0x1fff;
      var ah2 = a2 >>> 13;
      var a3 = a[3] | 0;
      var al3 = a3 & 0x1fff;
      var ah3 = a3 >>> 13;
      var a4 = a[4] | 0;
      var al4 = a4 & 0x1fff;
      var ah4 = a4 >>> 13;
      var a5 = a[5] | 0;
      var al5 = a5 & 0x1fff;
      var ah5 = a5 >>> 13;
      var a6 = a[6] | 0;
      var al6 = a6 & 0x1fff;
      var ah6 = a6 >>> 13;
      var a7 = a[7] | 0;
      var al7 = a7 & 0x1fff;
      var ah7 = a7 >>> 13;
      var a8 = a[8] | 0;
      var al8 = a8 & 0x1fff;
      var ah8 = a8 >>> 13;
      var a9 = a[9] | 0;
      var al9 = a9 & 0x1fff;
      var ah9 = a9 >>> 13;
      var b0 = b[0] | 0;
      var bl0 = b0 & 0x1fff;
      var bh0 = b0 >>> 13;
      var b1 = b[1] | 0;
      var bl1 = b1 & 0x1fff;
      var bh1 = b1 >>> 13;
      var b2 = b[2] | 0;
      var bl2 = b2 & 0x1fff;
      var bh2 = b2 >>> 13;
      var b3 = b[3] | 0;
      var bl3 = b3 & 0x1fff;
      var bh3 = b3 >>> 13;
      var b4 = b[4] | 0;
      var bl4 = b4 & 0x1fff;
      var bh4 = b4 >>> 13;
      var b5 = b[5] | 0;
      var bl5 = b5 & 0x1fff;
      var bh5 = b5 >>> 13;
      var b6 = b[6] | 0;
      var bl6 = b6 & 0x1fff;
      var bh6 = b6 >>> 13;
      var b7 = b[7] | 0;
      var bl7 = b7 & 0x1fff;
      var bh7 = b7 >>> 13;
      var b8 = b[8] | 0;
      var bl8 = b8 & 0x1fff;
      var bh8 = b8 >>> 13;
      var b9 = b[9] | 0;
      var bl9 = b9 & 0x1fff;
      var bh9 = b9 >>> 13;
  
      out.negative = self.negative ^ num.negative;
      out.length = 19;
      /* k = 0 */
      lo = Math.imul(al0, bl0);
      mid = Math.imul(al0, bh0);
      mid = (mid + Math.imul(ah0, bl0)) | 0;
      hi = Math.imul(ah0, bh0);
      var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;
      w0 &= 0x3ffffff;
      /* k = 1 */
      lo = Math.imul(al1, bl0);
      mid = Math.imul(al1, bh0);
      mid = (mid + Math.imul(ah1, bl0)) | 0;
      hi = Math.imul(ah1, bh0);
      lo = (lo + Math.imul(al0, bl1)) | 0;
      mid = (mid + Math.imul(al0, bh1)) | 0;
      mid = (mid + Math.imul(ah0, bl1)) | 0;
      hi = (hi + Math.imul(ah0, bh1)) | 0;
      var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;
      w1 &= 0x3ffffff;
      /* k = 2 */
      lo = Math.imul(al2, bl0);
      mid = Math.imul(al2, bh0);
      mid = (mid + Math.imul(ah2, bl0)) | 0;
      hi = Math.imul(ah2, bh0);
      lo = (lo + Math.imul(al1, bl1)) | 0;
      mid = (mid + Math.imul(al1, bh1)) | 0;
      mid = (mid + Math.imul(ah1, bl1)) | 0;
      hi = (hi + Math.imul(ah1, bh1)) | 0;
      lo = (lo + Math.imul(al0, bl2)) | 0;
      mid = (mid + Math.imul(al0, bh2)) | 0;
      mid = (mid + Math.imul(ah0, bl2)) | 0;
      hi = (hi + Math.imul(ah0, bh2)) | 0;
      var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;
      w2 &= 0x3ffffff;
      /* k = 3 */
      lo = Math.imul(al3, bl0);
      mid = Math.imul(al3, bh0);
      mid = (mid + Math.imul(ah3, bl0)) | 0;
      hi = Math.imul(ah3, bh0);
      lo = (lo + Math.imul(al2, bl1)) | 0;
      mid = (mid + Math.imul(al2, bh1)) | 0;
      mid = (mid + Math.imul(ah2, bl1)) | 0;
      hi = (hi + Math.imul(ah2, bh1)) | 0;
      lo = (lo + Math.imul(al1, bl2)) | 0;
      mid = (mid + Math.imul(al1, bh2)) | 0;
      mid = (mid + Math.imul(ah1, bl2)) | 0;
      hi = (hi + Math.imul(ah1, bh2)) | 0;
      lo = (lo + Math.imul(al0, bl3)) | 0;
      mid = (mid + Math.imul(al0, bh3)) | 0;
      mid = (mid + Math.imul(ah0, bl3)) | 0;
      hi = (hi + Math.imul(ah0, bh3)) | 0;
      var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;
      w3 &= 0x3ffffff;
      /* k = 4 */
      lo = Math.imul(al4, bl0);
      mid = Math.imul(al4, bh0);
      mid = (mid + Math.imul(ah4, bl0)) | 0;
      hi = Math.imul(ah4, bh0);
      lo = (lo + Math.imul(al3, bl1)) | 0;
      mid = (mid + Math.imul(al3, bh1)) | 0;
      mid = (mid + Math.imul(ah3, bl1)) | 0;
      hi = (hi + Math.imul(ah3, bh1)) | 0;
      lo = (lo + Math.imul(al2, bl2)) | 0;
      mid = (mid + Math.imul(al2, bh2)) | 0;
      mid = (mid + Math.imul(ah2, bl2)) | 0;
      hi = (hi + Math.imul(ah2, bh2)) | 0;
      lo = (lo + Math.imul(al1, bl3)) | 0;
      mid = (mid + Math.imul(al1, bh3)) | 0;
      mid = (mid + Math.imul(ah1, bl3)) | 0;
      hi = (hi + Math.imul(ah1, bh3)) | 0;
      lo = (lo + Math.imul(al0, bl4)) | 0;
      mid = (mid + Math.imul(al0, bh4)) | 0;
      mid = (mid + Math.imul(ah0, bl4)) | 0;
      hi = (hi + Math.imul(ah0, bh4)) | 0;
      var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;
      w4 &= 0x3ffffff;
      /* k = 5 */
      lo = Math.imul(al5, bl0);
      mid = Math.imul(al5, bh0);
      mid = (mid + Math.imul(ah5, bl0)) | 0;
      hi = Math.imul(ah5, bh0);
      lo = (lo + Math.imul(al4, bl1)) | 0;
      mid = (mid + Math.imul(al4, bh1)) | 0;
      mid = (mid + Math.imul(ah4, bl1)) | 0;
      hi = (hi + Math.imul(ah4, bh1)) | 0;
      lo = (lo + Math.imul(al3, bl2)) | 0;
      mid = (mid + Math.imul(al3, bh2)) | 0;
      mid = (mid + Math.imul(ah3, bl2)) | 0;
      hi = (hi + Math.imul(ah3, bh2)) | 0;
      lo = (lo + Math.imul(al2, bl3)) | 0;
      mid = (mid + Math.imul(al2, bh3)) | 0;
      mid = (mid + Math.imul(ah2, bl3)) | 0;
      hi = (hi + Math.imul(ah2, bh3)) | 0;
      lo = (lo + Math.imul(al1, bl4)) | 0;
      mid = (mid + Math.imul(al1, bh4)) | 0;
      mid = (mid + Math.imul(ah1, bl4)) | 0;
      hi = (hi + Math.imul(ah1, bh4)) | 0;
      lo = (lo + Math.imul(al0, bl5)) | 0;
      mid = (mid + Math.imul(al0, bh5)) | 0;
      mid = (mid + Math.imul(ah0, bl5)) | 0;
      hi = (hi + Math.imul(ah0, bh5)) | 0;
      var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;
      w5 &= 0x3ffffff;
      /* k = 6 */
      lo = Math.imul(al6, bl0);
      mid = Math.imul(al6, bh0);
      mid = (mid + Math.imul(ah6, bl0)) | 0;
      hi = Math.imul(ah6, bh0);
      lo = (lo + Math.imul(al5, bl1)) | 0;
      mid = (mid + Math.imul(al5, bh1)) | 0;
      mid = (mid + Math.imul(ah5, bl1)) | 0;
      hi = (hi + Math.imul(ah5, bh1)) | 0;
      lo = (lo + Math.imul(al4, bl2)) | 0;
      mid = (mid + Math.imul(al4, bh2)) | 0;
      mid = (mid + Math.imul(ah4, bl2)) | 0;
      hi = (hi + Math.imul(ah4, bh2)) | 0;
      lo = (lo + Math.imul(al3, bl3)) | 0;
      mid = (mid + Math.imul(al3, bh3)) | 0;
      mid = (mid + Math.imul(ah3, bl3)) | 0;
      hi = (hi + Math.imul(ah3, bh3)) | 0;
      lo = (lo + Math.imul(al2, bl4)) | 0;
      mid = (mid + Math.imul(al2, bh4)) | 0;
      mid = (mid + Math.imul(ah2, bl4)) | 0;
      hi = (hi + Math.imul(ah2, bh4)) | 0;
      lo = (lo + Math.imul(al1, bl5)) | 0;
      mid = (mid + Math.imul(al1, bh5)) | 0;
      mid = (mid + Math.imul(ah1, bl5)) | 0;
      hi = (hi + Math.imul(ah1, bh5)) | 0;
      lo = (lo + Math.imul(al0, bl6)) | 0;
      mid = (mid + Math.imul(al0, bh6)) | 0;
      mid = (mid + Math.imul(ah0, bl6)) | 0;
      hi = (hi + Math.imul(ah0, bh6)) | 0;
      var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;
      w6 &= 0x3ffffff;
      /* k = 7 */
      lo = Math.imul(al7, bl0);
      mid = Math.imul(al7, bh0);
      mid = (mid + Math.imul(ah7, bl0)) | 0;
      hi = Math.imul(ah7, bh0);
      lo = (lo + Math.imul(al6, bl1)) | 0;
      mid = (mid + Math.imul(al6, bh1)) | 0;
      mid = (mid + Math.imul(ah6, bl1)) | 0;
      hi = (hi + Math.imul(ah6, bh1)) | 0;
      lo = (lo + Math.imul(al5, bl2)) | 0;
      mid = (mid + Math.imul(al5, bh2)) | 0;
      mid = (mid + Math.imul(ah5, bl2)) | 0;
      hi = (hi + Math.imul(ah5, bh2)) | 0;
      lo = (lo + Math.imul(al4, bl3)) | 0;
      mid = (mid + Math.imul(al4, bh3)) | 0;
      mid = (mid + Math.imul(ah4, bl3)) | 0;
      hi = (hi + Math.imul(ah4, bh3)) | 0;
      lo = (lo + Math.imul(al3, bl4)) | 0;
      mid = (mid + Math.imul(al3, bh4)) | 0;
      mid = (mid + Math.imul(ah3, bl4)) | 0;
      hi = (hi + Math.imul(ah3, bh4)) | 0;
      lo = (lo + Math.imul(al2, bl5)) | 0;
      mid = (mid + Math.imul(al2, bh5)) | 0;
      mid = (mid + Math.imul(ah2, bl5)) | 0;
      hi = (hi + Math.imul(ah2, bh5)) | 0;
      lo = (lo + Math.imul(al1, bl6)) | 0;
      mid = (mid + Math.imul(al1, bh6)) | 0;
      mid = (mid + Math.imul(ah1, bl6)) | 0;
      hi = (hi + Math.imul(ah1, bh6)) | 0;
      lo = (lo + Math.imul(al0, bl7)) | 0;
      mid = (mid + Math.imul(al0, bh7)) | 0;
      mid = (mid + Math.imul(ah0, bl7)) | 0;
      hi = (hi + Math.imul(ah0, bh7)) | 0;
      var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;
      w7 &= 0x3ffffff;
      /* k = 8 */
      lo = Math.imul(al8, bl0);
      mid = Math.imul(al8, bh0);
      mid = (mid + Math.imul(ah8, bl0)) | 0;
      hi = Math.imul(ah8, bh0);
      lo = (lo + Math.imul(al7, bl1)) | 0;
      mid = (mid + Math.imul(al7, bh1)) | 0;
      mid = (mid + Math.imul(ah7, bl1)) | 0;
      hi = (hi + Math.imul(ah7, bh1)) | 0;
      lo = (lo + Math.imul(al6, bl2)) | 0;
      mid = (mid + Math.imul(al6, bh2)) | 0;
      mid = (mid + Math.imul(ah6, bl2)) | 0;
      hi = (hi + Math.imul(ah6, bh2)) | 0;
      lo = (lo + Math.imul(al5, bl3)) | 0;
      mid = (mid + Math.imul(al5, bh3)) | 0;
      mid = (mid + Math.imul(ah5, bl3)) | 0;
      hi = (hi + Math.imul(ah5, bh3)) | 0;
      lo = (lo + Math.imul(al4, bl4)) | 0;
      mid = (mid + Math.imul(al4, bh4)) | 0;
      mid = (mid + Math.imul(ah4, bl4)) | 0;
      hi = (hi + Math.imul(ah4, bh4)) | 0;
      lo = (lo + Math.imul(al3, bl5)) | 0;
      mid = (mid + Math.imul(al3, bh5)) | 0;
      mid = (mid + Math.imul(ah3, bl5)) | 0;
      hi = (hi + Math.imul(ah3, bh5)) | 0;
      lo = (lo + Math.imul(al2, bl6)) | 0;
      mid = (mid + Math.imul(al2, bh6)) | 0;
      mid = (mid + Math.imul(ah2, bl6)) | 0;
      hi = (hi + Math.imul(ah2, bh6)) | 0;
      lo = (lo + Math.imul(al1, bl7)) | 0;
      mid = (mid + Math.imul(al1, bh7)) | 0;
      mid = (mid + Math.imul(ah1, bl7)) | 0;
      hi = (hi + Math.imul(ah1, bh7)) | 0;
      lo = (lo + Math.imul(al0, bl8)) | 0;
      mid = (mid + Math.imul(al0, bh8)) | 0;
      mid = (mid + Math.imul(ah0, bl8)) | 0;
      hi = (hi + Math.imul(ah0, bh8)) | 0;
      var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;
      w8 &= 0x3ffffff;
      /* k = 9 */
      lo = Math.imul(al9, bl0);
      mid = Math.imul(al9, bh0);
      mid = (mid + Math.imul(ah9, bl0)) | 0;
      hi = Math.imul(ah9, bh0);
      lo = (lo + Math.imul(al8, bl1)) | 0;
      mid = (mid + Math.imul(al8, bh1)) | 0;
      mid = (mid + Math.imul(ah8, bl1)) | 0;
      hi = (hi + Math.imul(ah8, bh1)) | 0;
      lo = (lo + Math.imul(al7, bl2)) | 0;
      mid = (mid + Math.imul(al7, bh2)) | 0;
      mid = (mid + Math.imul(ah7, bl2)) | 0;
      hi = (hi + Math.imul(ah7, bh2)) | 0;
      lo = (lo + Math.imul(al6, bl3)) | 0;
      mid = (mid + Math.imul(al6, bh3)) | 0;
      mid = (mid + Math.imul(ah6, bl3)) | 0;
      hi = (hi + Math.imul(ah6, bh3)) | 0;
      lo = (lo + Math.imul(al5, bl4)) | 0;
      mid = (mid + Math.imul(al5, bh4)) | 0;
      mid = (mid + Math.imul(ah5, bl4)) | 0;
      hi = (hi + Math.imul(ah5, bh4)) | 0;
      lo = (lo + Math.imul(al4, bl5)) | 0;
      mid = (mid + Math.imul(al4, bh5)) | 0;
      mid = (mid + Math.imul(ah4, bl5)) | 0;
      hi = (hi + Math.imul(ah4, bh5)) | 0;
      lo = (lo + Math.imul(al3, bl6)) | 0;
      mid = (mid + Math.imul(al3, bh6)) | 0;
      mid = (mid + Math.imul(ah3, bl6)) | 0;
      hi = (hi + Math.imul(ah3, bh6)) | 0;
      lo = (lo + Math.imul(al2, bl7)) | 0;
      mid = (mid + Math.imul(al2, bh7)) | 0;
      mid = (mid + Math.imul(ah2, bl7)) | 0;
      hi = (hi + Math.imul(ah2, bh7)) | 0;
      lo = (lo + Math.imul(al1, bl8)) | 0;
      mid = (mid + Math.imul(al1, bh8)) | 0;
      mid = (mid + Math.imul(ah1, bl8)) | 0;
      hi = (hi + Math.imul(ah1, bh8)) | 0;
      lo = (lo + Math.imul(al0, bl9)) | 0;
      mid = (mid + Math.imul(al0, bh9)) | 0;
      mid = (mid + Math.imul(ah0, bl9)) | 0;
      hi = (hi + Math.imul(ah0, bh9)) | 0;
      var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;
      w9 &= 0x3ffffff;
      /* k = 10 */
      lo = Math.imul(al9, bl1);
      mid = Math.imul(al9, bh1);
      mid = (mid + Math.imul(ah9, bl1)) | 0;
      hi = Math.imul(ah9, bh1);
      lo = (lo + Math.imul(al8, bl2)) | 0;
      mid = (mid + Math.imul(al8, bh2)) | 0;
      mid = (mid + Math.imul(ah8, bl2)) | 0;
      hi = (hi + Math.imul(ah8, bh2)) | 0;
      lo = (lo + Math.imul(al7, bl3)) | 0;
      mid = (mid + Math.imul(al7, bh3)) | 0;
      mid = (mid + Math.imul(ah7, bl3)) | 0;
      hi = (hi + Math.imul(ah7, bh3)) | 0;
      lo = (lo + Math.imul(al6, bl4)) | 0;
      mid = (mid + Math.imul(al6, bh4)) | 0;
      mid = (mid + Math.imul(ah6, bl4)) | 0;
      hi = (hi + Math.imul(ah6, bh4)) | 0;
      lo = (lo + Math.imul(al5, bl5)) | 0;
      mid = (mid + Math.imul(al5, bh5)) | 0;
      mid = (mid + Math.imul(ah5, bl5)) | 0;
      hi = (hi + Math.imul(ah5, bh5)) | 0;
      lo = (lo + Math.imul(al4, bl6)) | 0;
      mid = (mid + Math.imul(al4, bh6)) | 0;
      mid = (mid + Math.imul(ah4, bl6)) | 0;
      hi = (hi + Math.imul(ah4, bh6)) | 0;
      lo = (lo + Math.imul(al3, bl7)) | 0;
      mid = (mid + Math.imul(al3, bh7)) | 0;
      mid = (mid + Math.imul(ah3, bl7)) | 0;
      hi = (hi + Math.imul(ah3, bh7)) | 0;
      lo = (lo + Math.imul(al2, bl8)) | 0;
      mid = (mid + Math.imul(al2, bh8)) | 0;
      mid = (mid + Math.imul(ah2, bl8)) | 0;
      hi = (hi + Math.imul(ah2, bh8)) | 0;
      lo = (lo + Math.imul(al1, bl9)) | 0;
      mid = (mid + Math.imul(al1, bh9)) | 0;
      mid = (mid + Math.imul(ah1, bl9)) | 0;
      hi = (hi + Math.imul(ah1, bh9)) | 0;
      var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;
      w10 &= 0x3ffffff;
      /* k = 11 */
      lo = Math.imul(al9, bl2);
      mid = Math.imul(al9, bh2);
      mid = (mid + Math.imul(ah9, bl2)) | 0;
      hi = Math.imul(ah9, bh2);
      lo = (lo + Math.imul(al8, bl3)) | 0;
      mid = (mid + Math.imul(al8, bh3)) | 0;
      mid = (mid + Math.imul(ah8, bl3)) | 0;
      hi = (hi + Math.imul(ah8, bh3)) | 0;
      lo = (lo + Math.imul(al7, bl4)) | 0;
      mid = (mid + Math.imul(al7, bh4)) | 0;
      mid = (mid + Math.imul(ah7, bl4)) | 0;
      hi = (hi + Math.imul(ah7, bh4)) | 0;
      lo = (lo + Math.imul(al6, bl5)) | 0;
      mid = (mid + Math.imul(al6, bh5)) | 0;
      mid = (mid + Math.imul(ah6, bl5)) | 0;
      hi = (hi + Math.imul(ah6, bh5)) | 0;
      lo = (lo + Math.imul(al5, bl6)) | 0;
      mid = (mid + Math.imul(al5, bh6)) | 0;
      mid = (mid + Math.imul(ah5, bl6)) | 0;
      hi = (hi + Math.imul(ah5, bh6)) | 0;
      lo = (lo + Math.imul(al4, bl7)) | 0;
      mid = (mid + Math.imul(al4, bh7)) | 0;
      mid = (mid + Math.imul(ah4, bl7)) | 0;
      hi = (hi + Math.imul(ah4, bh7)) | 0;
      lo = (lo + Math.imul(al3, bl8)) | 0;
      mid = (mid + Math.imul(al3, bh8)) | 0;
      mid = (mid + Math.imul(ah3, bl8)) | 0;
      hi = (hi + Math.imul(ah3, bh8)) | 0;
      lo = (lo + Math.imul(al2, bl9)) | 0;
      mid = (mid + Math.imul(al2, bh9)) | 0;
      mid = (mid + Math.imul(ah2, bl9)) | 0;
      hi = (hi + Math.imul(ah2, bh9)) | 0;
      var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;
      w11 &= 0x3ffffff;
      /* k = 12 */
      lo = Math.imul(al9, bl3);
      mid = Math.imul(al9, bh3);
      mid = (mid + Math.imul(ah9, bl3)) | 0;
      hi = Math.imul(ah9, bh3);
      lo = (lo + Math.imul(al8, bl4)) | 0;
      mid = (mid + Math.imul(al8, bh4)) | 0;
      mid = (mid + Math.imul(ah8, bl4)) | 0;
      hi = (hi + Math.imul(ah8, bh4)) | 0;
      lo = (lo + Math.imul(al7, bl5)) | 0;
      mid = (mid + Math.imul(al7, bh5)) | 0;
      mid = (mid + Math.imul(ah7, bl5)) | 0;
      hi = (hi + Math.imul(ah7, bh5)) | 0;
      lo = (lo + Math.imul(al6, bl6)) | 0;
      mid = (mid + Math.imul(al6, bh6)) | 0;
      mid = (mid + Math.imul(ah6, bl6)) | 0;
      hi = (hi + Math.imul(ah6, bh6)) | 0;
      lo = (lo + Math.imul(al5, bl7)) | 0;
      mid = (mid + Math.imul(al5, bh7)) | 0;
      mid = (mid + Math.imul(ah5, bl7)) | 0;
      hi = (hi + Math.imul(ah5, bh7)) | 0;
      lo = (lo + Math.imul(al4, bl8)) | 0;
      mid = (mid + Math.imul(al4, bh8)) | 0;
      mid = (mid + Math.imul(ah4, bl8)) | 0;
      hi = (hi + Math.imul(ah4, bh8)) | 0;
      lo = (lo + Math.imul(al3, bl9)) | 0;
      mid = (mid + Math.imul(al3, bh9)) | 0;
      mid = (mid + Math.imul(ah3, bl9)) | 0;
      hi = (hi + Math.imul(ah3, bh9)) | 0;
      var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;
      w12 &= 0x3ffffff;
      /* k = 13 */
      lo = Math.imul(al9, bl4);
      mid = Math.imul(al9, bh4);
      mid = (mid + Math.imul(ah9, bl4)) | 0;
      hi = Math.imul(ah9, bh4);
      lo = (lo + Math.imul(al8, bl5)) | 0;
      mid = (mid + Math.imul(al8, bh5)) | 0;
      mid = (mid + Math.imul(ah8, bl5)) | 0;
      hi = (hi + Math.imul(ah8, bh5)) | 0;
      lo = (lo + Math.imul(al7, bl6)) | 0;
      mid = (mid + Math.imul(al7, bh6)) | 0;
      mid = (mid + Math.imul(ah7, bl6)) | 0;
      hi = (hi + Math.imul(ah7, bh6)) | 0;
      lo = (lo + Math.imul(al6, bl7)) | 0;
      mid = (mid + Math.imul(al6, bh7)) | 0;
      mid = (mid + Math.imul(ah6, bl7)) | 0;
      hi = (hi + Math.imul(ah6, bh7)) | 0;
      lo = (lo + Math.imul(al5, bl8)) | 0;
      mid = (mid + Math.imul(al5, bh8)) | 0;
      mid = (mid + Math.imul(ah5, bl8)) | 0;
      hi = (hi + Math.imul(ah5, bh8)) | 0;
      lo = (lo + Math.imul(al4, bl9)) | 0;
      mid = (mid + Math.imul(al4, bh9)) | 0;
      mid = (mid + Math.imul(ah4, bl9)) | 0;
      hi = (hi + Math.imul(ah4, bh9)) | 0;
      var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;
      w13 &= 0x3ffffff;
      /* k = 14 */
      lo = Math.imul(al9, bl5);
      mid = Math.imul(al9, bh5);
      mid = (mid + Math.imul(ah9, bl5)) | 0;
      hi = Math.imul(ah9, bh5);
      lo = (lo + Math.imul(al8, bl6)) | 0;
      mid = (mid + Math.imul(al8, bh6)) | 0;
      mid = (mid + Math.imul(ah8, bl6)) | 0;
      hi = (hi + Math.imul(ah8, bh6)) | 0;
      lo = (lo + Math.imul(al7, bl7)) | 0;
      mid = (mid + Math.imul(al7, bh7)) | 0;
      mid = (mid + Math.imul(ah7, bl7)) | 0;
      hi = (hi + Math.imul(ah7, bh7)) | 0;
      lo = (lo + Math.imul(al6, bl8)) | 0;
      mid = (mid + Math.imul(al6, bh8)) | 0;
      mid = (mid + Math.imul(ah6, bl8)) | 0;
      hi = (hi + Math.imul(ah6, bh8)) | 0;
      lo = (lo + Math.imul(al5, bl9)) | 0;
      mid = (mid + Math.imul(al5, bh9)) | 0;
      mid = (mid + Math.imul(ah5, bl9)) | 0;
      hi = (hi + Math.imul(ah5, bh9)) | 0;
      var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;
      w14 &= 0x3ffffff;
      /* k = 15 */
      lo = Math.imul(al9, bl6);
      mid = Math.imul(al9, bh6);
      mid = (mid + Math.imul(ah9, bl6)) | 0;
      hi = Math.imul(ah9, bh6);
      lo = (lo + Math.imul(al8, bl7)) | 0;
      mid = (mid + Math.imul(al8, bh7)) | 0;
      mid = (mid + Math.imul(ah8, bl7)) | 0;
      hi = (hi + Math.imul(ah8, bh7)) | 0;
      lo = (lo + Math.imul(al7, bl8)) | 0;
      mid = (mid + Math.imul(al7, bh8)) | 0;
      mid = (mid + Math.imul(ah7, bl8)) | 0;
      hi = (hi + Math.imul(ah7, bh8)) | 0;
      lo = (lo + Math.imul(al6, bl9)) | 0;
      mid = (mid + Math.imul(al6, bh9)) | 0;
      mid = (mid + Math.imul(ah6, bl9)) | 0;
      hi = (hi + Math.imul(ah6, bh9)) | 0;
      var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;
      w15 &= 0x3ffffff;
      /* k = 16 */
      lo = Math.imul(al9, bl7);
      mid = Math.imul(al9, bh7);
      mid = (mid + Math.imul(ah9, bl7)) | 0;
      hi = Math.imul(ah9, bh7);
      lo = (lo + Math.imul(al8, bl8)) | 0;
      mid = (mid + Math.imul(al8, bh8)) | 0;
      mid = (mid + Math.imul(ah8, bl8)) | 0;
      hi = (hi + Math.imul(ah8, bh8)) | 0;
      lo = (lo + Math.imul(al7, bl9)) | 0;
      mid = (mid + Math.imul(al7, bh9)) | 0;
      mid = (mid + Math.imul(ah7, bl9)) | 0;
      hi = (hi + Math.imul(ah7, bh9)) | 0;
      var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;
      w16 &= 0x3ffffff;
      /* k = 17 */
      lo = Math.imul(al9, bl8);
      mid = Math.imul(al9, bh8);
      mid = (mid + Math.imul(ah9, bl8)) | 0;
      hi = Math.imul(ah9, bh8);
      lo = (lo + Math.imul(al8, bl9)) | 0;
      mid = (mid + Math.imul(al8, bh9)) | 0;
      mid = (mid + Math.imul(ah8, bl9)) | 0;
      hi = (hi + Math.imul(ah8, bh9)) | 0;
      var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;
      w17 &= 0x3ffffff;
      /* k = 18 */
      lo = Math.imul(al9, bl9);
      mid = Math.imul(al9, bh9);
      mid = (mid + Math.imul(ah9, bl9)) | 0;
      hi = Math.imul(ah9, bh9);
      var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
      c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;
      w18 &= 0x3ffffff;
      o[0] = w0;
      o[1] = w1;
      o[2] = w2;
      o[3] = w3;
      o[4] = w4;
      o[5] = w5;
      o[6] = w6;
      o[7] = w7;
      o[8] = w8;
      o[9] = w9;
      o[10] = w10;
      o[11] = w11;
      o[12] = w12;
      o[13] = w13;
      o[14] = w14;
      o[15] = w15;
      o[16] = w16;
      o[17] = w17;
      o[18] = w18;
      if (c !== 0) {
        o[19] = c;
        out.length++;
      }
      return out;
    };
  
    // Polyfill comb
    if (!Math.imul) {
      comb10MulTo = smallMulTo;
    }
  
    function bigMulTo (self, num, out) {
      out.negative = num.negative ^ self.negative;
      out.length = self.length + num.length;
  
      var carry = 0;
      var hncarry = 0;
      for (var k = 0; k < out.length - 1; k++) {
        // Sum all words with the same `i + j = k` and accumulate `ncarry`,
        // note that ncarry could be >= 0x3ffffff
        var ncarry = hncarry;
        hncarry = 0;
        var rword = carry & 0x3ffffff;
        var maxJ = Math.min(k, num.length - 1);
        for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
          var i = k - j;
          var a = self.words[i] | 0;
          var b = num.words[j] | 0;
          var r = a * b;
  
          var lo = r & 0x3ffffff;
          ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;
          lo = (lo + rword) | 0;
          rword = lo & 0x3ffffff;
          ncarry = (ncarry + (lo >>> 26)) | 0;
  
          hncarry += ncarry >>> 26;
          ncarry &= 0x3ffffff;
        }
        out.words[k] = rword;
        carry = ncarry;
        ncarry = hncarry;
      }
      if (carry !== 0) {
        out.words[k] = carry;
      } else {
        out.length--;
      }
  
      return out.strip();
    }
  
    function jumboMulTo (self, num, out) {
      var fftm = new FFTM();
      return fftm.mulp(self, num, out);
    }
  
    BN.prototype.mulTo = function mulTo (num, out) {
      var res;
      var len = this.length + num.length;
      if (this.length === 10 && num.length === 10) {
        res = comb10MulTo(this, num, out);
      } else if (len < 63) {
        res = smallMulTo(this, num, out);
      } else if (len < 1024) {
        res = bigMulTo(this, num, out);
      } else {
        res = jumboMulTo(this, num, out);
      }
  
      return res;
    };
  
    // Cooley-Tukey algorithm for FFT
    // slightly revisited to rely on looping instead of recursion
  
    function FFTM (x, y) {
      this.x = x;
      this.y = y;
    }
  
    FFTM.prototype.makeRBT = function makeRBT (N) {
      var t = new Array(N);
      var l = BN.prototype._countBits(N) - 1;
      for (var i = 0; i < N; i++) {
        t[i] = this.revBin(i, l, N);
      }
  
      return t;
    };
  
    // Returns binary-reversed representation of `x`
    FFTM.prototype.revBin = function revBin (x, l, N) {
      if (x === 0 || x === N - 1) return x;
  
      var rb = 0;
      for (var i = 0; i < l; i++) {
        rb |= (x & 1) << (l - i - 1);
        x >>= 1;
      }
  
      return rb;
    };
  
    // Performs "tweedling" phase, therefore 'emulating'
    // behaviour of the recursive algorithm
    FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {
      for (var i = 0; i < N; i++) {
        rtws[i] = rws[rbt[i]];
        itws[i] = iws[rbt[i]];
      }
    };
  
    FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {
      this.permute(rbt, rws, iws, rtws, itws, N);
  
      for (var s = 1; s < N; s <<= 1) {
        var l = s << 1;
  
        var rtwdf = Math.cos(2 * Math.PI / l);
        var itwdf = Math.sin(2 * Math.PI / l);
  
        for (var p = 0; p < N; p += l) {
          var rtwdf_ = rtwdf;
          var itwdf_ = itwdf;
  
          for (var j = 0; j < s; j++) {
            var re = rtws[p + j];
            var ie = itws[p + j];
  
            var ro = rtws[p + j + s];
            var io = itws[p + j + s];
  
            var rx = rtwdf_ * ro - itwdf_ * io;
  
            io = rtwdf_ * io + itwdf_ * ro;
            ro = rx;
  
            rtws[p + j] = re + ro;
            itws[p + j] = ie + io;
  
            rtws[p + j + s] = re - ro;
            itws[p + j + s] = ie - io;
  
            /* jshint maxdepth : false */
            if (j !== l) {
              rx = rtwdf * rtwdf_ - itwdf * itwdf_;
  
              itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
              rtwdf_ = rx;
            }
          }
        }
      }
    };
  
    FFTM.prototype.guessLen13b = function guessLen13b (n, m) {
      var N = Math.max(m, n) | 1;
      var odd = N & 1;
      var i = 0;
      for (N = N / 2 | 0; N; N = N >>> 1) {
        i++;
      }
  
      return 1 << i + 1 + odd;
    };
  
    FFTM.prototype.conjugate = function conjugate (rws, iws, N) {
      if (N <= 1) return;
  
      for (var i = 0; i < N / 2; i++) {
        var t = rws[i];
  
        rws[i] = rws[N - i - 1];
        rws[N - i - 1] = t;
  
        t = iws[i];
  
        iws[i] = -iws[N - i - 1];
        iws[N - i - 1] = -t;
      }
    };
  
    FFTM.prototype.normalize13b = function normalize13b (ws, N) {
      var carry = 0;
      for (var i = 0; i < N / 2; i++) {
        var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +
          Math.round(ws[2 * i] / N) +
          carry;
  
        ws[i] = w & 0x3ffffff;
  
        if (w < 0x4000000) {
          carry = 0;
        } else {
          carry = w / 0x4000000 | 0;
        }
      }
  
      return ws;
    };
  
    FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {
      var carry = 0;
      for (var i = 0; i < len; i++) {
        carry = carry + (ws[i] | 0);
  
        rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;
        rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;
      }
  
      // Pad with zeroes
      for (i = 2 * len; i < N; ++i) {
        rws[i] = 0;
      }
  
      assert(carry === 0);
      assert((carry & ~0x1fff) === 0);
    };
  
    FFTM.prototype.stub = function stub (N) {
      var ph = new Array(N);
      for (var i = 0; i < N; i++) {
        ph[i] = 0;
      }
  
      return ph;
    };
  
    FFTM.prototype.mulp = function mulp (x, y, out) {
      var N = 2 * this.guessLen13b(x.length, y.length);
  
      var rbt = this.makeRBT(N);
  
      var _ = this.stub(N);
  
      var rws = new Array(N);
      var rwst = new Array(N);
      var iwst = new Array(N);
  
      var nrws = new Array(N);
      var nrwst = new Array(N);
      var niwst = new Array(N);
  
      var rmws = out.words;
      rmws.length = N;
  
      this.convert13b(x.words, x.length, rws, N);
      this.convert13b(y.words, y.length, nrws, N);
  
      this.transform(rws, _, rwst, iwst, N, rbt);
      this.transform(nrws, _, nrwst, niwst, N, rbt);
  
      for (var i = 0; i < N; i++) {
        var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];
        iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];
        rwst[i] = rx;
      }
  
      this.conjugate(rwst, iwst, N);
      this.transform(rwst, iwst, rmws, _, N, rbt);
      this.conjugate(rmws, _, N);
      this.normalize13b(rmws, N);
  
      out.negative = x.negative ^ y.negative;
      out.length = x.length + y.length;
      return out.strip();
    };
  
    // Multiply `this` by `num`
    BN.prototype.mul = function mul (num) {
      var out = new BN(null);
      out.words = new Array(this.length + num.length);
      return this.mulTo(num, out);
    };
  
    // Multiply employing FFT
    BN.prototype.mulf = function mulf (num) {
      var out = new BN(null);
      out.words = new Array(this.length + num.length);
      return jumboMulTo(this, num, out);
    };
  
    // In-place Multiplication
    BN.prototype.imul = function imul (num) {
      return this.clone().mulTo(num, this);
    };
  
    BN.prototype.imuln = function imuln (num) {
      assert(typeof num === 'number');
      assert(num < 0x4000000);
  
      // Carry
      var carry = 0;
      for (var i = 0; i < this.length; i++) {
        var w = (this.words[i] | 0) * num;
        var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);
        carry >>= 26;
        carry += (w / 0x4000000) | 0;
        // NOTE: lo is 27bit maximum
        carry += lo >>> 26;
        this.words[i] = lo & 0x3ffffff;
      }
  
      if (carry !== 0) {
        this.words[i] = carry;
        this.length++;
      }
  
      return this;
    };
  
    BN.prototype.muln = function muln (num) {
      return this.clone().imuln(num);
    };
  
    // `this` * `this`
    BN.prototype.sqr = function sqr () {
      return this.mul(this);
    };
  
    // `this` * `this` in-place
    BN.prototype.isqr = function isqr () {
      return this.imul(this.clone());
    };
  
    // Math.pow(`this`, `num`)
    BN.prototype.pow = function pow (num) {
      var w = toBitArray(num);
      if (w.length === 0) return new BN(1);
  
      // Skip leading zeroes
      var res = this;
      for (var i = 0; i < w.length; i++, res = res.sqr()) {
        if (w[i] !== 0) break;
      }
  
      if (++i < w.length) {
        for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {
          if (w[i] === 0) continue;
  
          res = res.mul(q);
        }
      }
  
      return res;
    };
  
    // Shift-left in-place
    BN.prototype.iushln = function iushln (bits) {
      assert(typeof bits === 'number' && bits >= 0);
      var r = bits % 26;
      var s = (bits - r) / 26;
      var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);
      var i;
  
      if (r !== 0) {
        var carry = 0;
  
        for (i = 0; i < this.length; i++) {
          var newCarry = this.words[i] & carryMask;
          var c = ((this.words[i] | 0) - newCarry) << r;
          this.words[i] = c | carry;
          carry = newCarry >>> (26 - r);
        }
  
        if (carry) {
          this.words[i] = carry;
          this.length++;
        }
      }
  
      if (s !== 0) {
        for (i = this.length - 1; i >= 0; i--) {
          this.words[i + s] = this.words[i];
        }
  
        for (i = 0; i < s; i++) {
          this.words[i] = 0;
        }
  
        this.length += s;
      }
  
      return this.strip();
    };
  
    BN.prototype.ishln = function ishln (bits) {
      // TODO(indutny): implement me
      assert(this.negative === 0);
      return this.iushln(bits);
    };
  
    // Shift-right in-place
    // NOTE: `hint` is a lowest bit before trailing zeroes
    // NOTE: if `extended` is present - it will be filled with destroyed bits
    BN.prototype.iushrn = function iushrn (bits, hint, extended) {
      assert(typeof bits === 'number' && bits >= 0);
      var h;
      if (hint) {
        h = (hint - (hint % 26)) / 26;
      } else {
        h = 0;
      }
  
      var r = bits % 26;
      var s = Math.min((bits - r) / 26, this.length);
      var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
      var maskedWords = extended;
  
      h -= s;
      h = Math.max(0, h);
  
      // Extended mode, copy masked part
      if (maskedWords) {
        for (var i = 0; i < s; i++) {
          maskedWords.words[i] = this.words[i];
        }
        maskedWords.length = s;
      }
  
      if (s === 0) {
        // No-op, we should not move anything at all
      } else if (this.length > s) {
        this.length -= s;
        for (i = 0; i < this.length; i++) {
          this.words[i] = this.words[i + s];
        }
      } else {
        this.words[0] = 0;
        this.length = 1;
      }
  
      var carry = 0;
      for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {
        var word = this.words[i] | 0;
        this.words[i] = (carry << (26 - r)) | (word >>> r);
        carry = word & mask;
      }
  
      // Push carried bits as a mask
      if (maskedWords && carry !== 0) {
        maskedWords.words[maskedWords.length++] = carry;
      }
  
      if (this.length === 0) {
        this.words[0] = 0;
        this.length = 1;
      }
  
      return this.strip();
    };
  
    BN.prototype.ishrn = function ishrn (bits, hint, extended) {
      // TODO(indutny): implement me
      assert(this.negative === 0);
      return this.iushrn(bits, hint, extended);
    };
  
    // Shift-left
    BN.prototype.shln = function shln (bits) {
      return this.clone().ishln(bits);
    };
  
    BN.prototype.ushln = function ushln (bits) {
      return this.clone().iushln(bits);
    };
  
    // Shift-right
    BN.prototype.shrn = function shrn (bits) {
      return this.clone().ishrn(bits);
    };
  
    BN.prototype.ushrn = function ushrn (bits) {
      return this.clone().iushrn(bits);
    };
  
    // Test if n bit is set
    BN.prototype.testn = function testn (bit) {
      assert(typeof bit === 'number' && bit >= 0);
      var r = bit % 26;
      var s = (bit - r) / 26;
      var q = 1 << r;
  
      // Fast case: bit is much higher than all existing words
      if (this.length <= s) return false;
  
      // Check bit and return
      var w = this.words[s];
  
      return !!(w & q);
    };
  
    // Return only lowers bits of number (in-place)
    BN.prototype.imaskn = function imaskn (bits) {
      assert(typeof bits === 'number' && bits >= 0);
      var r = bits % 26;
      var s = (bits - r) / 26;
  
      assert(this.negative === 0, 'imaskn works only with positive numbers');
  
      if (this.length <= s) {
        return this;
      }
  
      if (r !== 0) {
        s++;
      }
      this.length = Math.min(s, this.length);
  
      if (r !== 0) {
        var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
        this.words[this.length - 1] &= mask;
      }
  
      return this.strip();
    };
  
    // Return only lowers bits of number
    BN.prototype.maskn = function maskn (bits) {
      return this.clone().imaskn(bits);
    };
  
    // Add plain number `num` to `this`
    BN.prototype.iaddn = function iaddn (num) {
      assert(typeof num === 'number');
      assert(num < 0x4000000);
      if (num < 0) return this.isubn(-num);
  
      // Possible sign change
      if (this.negative !== 0) {
        if (this.length === 1 && (this.words[0] | 0) < num) {
          this.words[0] = num - (this.words[0] | 0);
          this.negative = 0;
          return this;
        }
  
        this.negative = 0;
        this.isubn(num);
        this.negative = 1;
        return this;
      }
  
      // Add without checks
      return this._iaddn(num);
    };
  
    BN.prototype._iaddn = function _iaddn (num) {
      this.words[0] += num;
  
      // Carry
      for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {
        this.words[i] -= 0x4000000;
        if (i === this.length - 1) {
          this.words[i + 1] = 1;
        } else {
          this.words[i + 1]++;
        }
      }
      this.length = Math.max(this.length, i + 1);
  
      return this;
    };
  
    // Subtract plain number `num` from `this`
    BN.prototype.isubn = function isubn (num) {
      assert(typeof num === 'number');
      assert(num < 0x4000000);
      if (num < 0) return this.iaddn(-num);
  
      if (this.negative !== 0) {
        this.negative = 0;
        this.iaddn(num);
        this.negative = 1;
        return this;
      }
  
      this.words[0] -= num;
  
      if (this.length === 1 && this.words[0] < 0) {
        this.words[0] = -this.words[0];
        this.negative = 1;
      } else {
        // Carry
        for (var i = 0; i < this.length && this.words[i] < 0; i++) {
          this.words[i] += 0x4000000;
          this.words[i + 1] -= 1;
        }
      }
  
      return this.strip();
    };
  
    BN.prototype.addn = function addn (num) {
      return this.clone().iaddn(num);
    };
  
    BN.prototype.subn = function subn (num) {
      return this.clone().isubn(num);
    };
  
    BN.prototype.iabs = function iabs () {
      this.negative = 0;
  
      return this;
    };
  
    BN.prototype.abs = function abs () {
      return this.clone().iabs();
    };
  
    BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {
      var len = num.length + shift;
      var i;
  
      this._expand(len);
  
      var w;
      var carry = 0;
      for (i = 0; i < num.length; i++) {
        w = (this.words[i + shift] | 0) + carry;
        var right = (num.words[i] | 0) * mul;
        w -= right & 0x3ffffff;
        carry = (w >> 26) - ((right / 0x4000000) | 0);
        this.words[i + shift] = w & 0x3ffffff;
      }
      for (; i < this.length - shift; i++) {
        w = (this.words[i + shift] | 0) + carry;
        carry = w >> 26;
        this.words[i + shift] = w & 0x3ffffff;
      }
  
      if (carry === 0) return this.strip();
  
      // Subtraction overflow
      assert(carry === -1);
      carry = 0;
      for (i = 0; i < this.length; i++) {
        w = -(this.words[i] | 0) + carry;
        carry = w >> 26;
        this.words[i] = w & 0x3ffffff;
      }
      this.negative = 1;
  
      return this.strip();
    };
  
    BN.prototype._wordDiv = function _wordDiv (num, mode) {
      var shift = this.length - num.length;
  
      var a = this.clone();
      var b = num;
  
      // Normalize
      var bhi = b.words[b.length - 1] | 0;
      var bhiBits = this._countBits(bhi);
      shift = 26 - bhiBits;
      if (shift !== 0) {
        b = b.ushln(shift);
        a.iushln(shift);
        bhi = b.words[b.length - 1] | 0;
      }
  
      // Initialize quotient
      var m = a.length - b.length;
      var q;
  
      if (mode !== 'mod') {
        q = new BN(null);
        q.length = m + 1;
        q.words = new Array(q.length);
        for (var i = 0; i < q.length; i++) {
          q.words[i] = 0;
        }
      }
  
      var diff = a.clone()._ishlnsubmul(b, 1, m);
      if (diff.negative === 0) {
        a = diff;
        if (q) {
          q.words[m] = 1;
        }
      }
  
      for (var j = m - 1; j >= 0; j--) {
        var qj = (a.words[b.length + j] | 0) * 0x4000000 +
          (a.words[b.length + j - 1] | 0);
  
        // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max
        // (0x7ffffff)
        qj = Math.min((qj / bhi) | 0, 0x3ffffff);
  
        a._ishlnsubmul(b, qj, j);
        while (a.negative !== 0) {
          qj--;
          a.negative = 0;
          a._ishlnsubmul(b, 1, j);
          if (!a.isZero()) {
            a.negative ^= 1;
          }
        }
        if (q) {
          q.words[j] = qj;
        }
      }
      if (q) {
        q.strip();
      }
      a.strip();
  
      // Denormalize
      if (mode !== 'div' && shift !== 0) {
        a.iushrn(shift);
      }
  
      return {
        div: q || null,
        mod: a
      };
    };
  
    // NOTE: 1) `mode` can be set to `mod` to request mod only,
    //       to `div` to request div only, or be absent to
    //       request both div & mod
    //       2) `positive` is true if unsigned mod is requested
    BN.prototype.divmod = function divmod (num, mode, positive) {
      assert(!num.isZero());
  
      if (this.isZero()) {
        return {
          div: new BN(0),
          mod: new BN(0)
        };
      }
  
      var div, mod, res;
      if (this.negative !== 0 && num.negative === 0) {
        res = this.neg().divmod(num, mode);
  
        if (mode !== 'mod') {
          div = res.div.neg();
        }
  
        if (mode !== 'div') {
          mod = res.mod.neg();
          if (positive && mod.negative !== 0) {
            mod.iadd(num);
          }
        }
  
        return {
          div: div,
          mod: mod
        };
      }
  
      if (this.negative === 0 && num.negative !== 0) {
        res = this.divmod(num.neg(), mode);
  
        if (mode !== 'mod') {
          div = res.div.neg();
        }
  
        return {
          div: div,
          mod: res.mod
        };
      }
  
      if ((this.negative & num.negative) !== 0) {
        res = this.neg().divmod(num.neg(), mode);
  
        if (mode !== 'div') {
          mod = res.mod.neg();
          if (positive && mod.negative !== 0) {
            mod.isub(num);
          }
        }
  
        return {
          div: res.div,
          mod: mod
        };
      }
  
      // Both numbers are positive at this point
  
      // Strip both numbers to approximate shift value
      if (num.length > this.length || this.cmp(num) < 0) {
        return {
          div: new BN(0),
          mod: this
        };
      }
  
      // Very short reduction
      if (num.length === 1) {
        if (mode === 'div') {
          return {
            div: this.divn(num.words[0]),
            mod: null
          };
        }
  
        if (mode === 'mod') {
          return {
            div: null,
            mod: new BN(this.modn(num.words[0]))
          };
        }
  
        return {
          div: this.divn(num.words[0]),
          mod: new BN(this.modn(num.words[0]))
        };
      }
  
      return this._wordDiv(num, mode);
    };
  
    // Find `this` / `num`
    BN.prototype.div = function div (num) {
      return this.divmod(num, 'div', false).div;
    };
  
    // Find `this` % `num`
    BN.prototype.mod = function mod (num) {
      return this.divmod(num, 'mod', false).mod;
    };
  
    BN.prototype.umod = function umod (num) {
      return this.divmod(num, 'mod', true).mod;
    };
  
    // Find Round(`this` / `num`)
    BN.prototype.divRound = function divRound (num) {
      var dm = this.divmod(num);
  
      // Fast case - exact division
      if (dm.mod.isZero()) return dm.div;
  
      var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;
  
      var half = num.ushrn(1);
      var r2 = num.andln(1);
      var cmp = mod.cmp(half);
  
      // Round down
      if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;
  
      // Round up
      return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
    };
  
    BN.prototype.modn = function modn (num) {
      assert(num <= 0x3ffffff);
      var p = (1 << 26) % num;
  
      var acc = 0;
      for (var i = this.length - 1; i >= 0; i--) {
        acc = (p * acc + (this.words[i] | 0)) % num;
      }
  
      return acc;
    };
  
    // In-place division by number
    BN.prototype.idivn = function idivn (num) {
      assert(num <= 0x3ffffff);
  
      var carry = 0;
      for (var i = this.length - 1; i >= 0; i--) {
        var w = (this.words[i] | 0) + carry * 0x4000000;
        this.words[i] = (w / num) | 0;
        carry = w % num;
      }
  
      return this.strip();
    };
  
    BN.prototype.divn = function divn (num) {
      return this.clone().idivn(num);
    };
  
    BN.prototype.egcd = function egcd (p) {
      assert(p.negative === 0);
      assert(!p.isZero());
  
      var x = this;
      var y = p.clone();
  
      if (x.negative !== 0) {
        x = x.umod(p);
      } else {
        x = x.clone();
      }
  
      // A * x + B * y = x
      var A = new BN(1);
      var B = new BN(0);
  
      // C * x + D * y = y
      var C = new BN(0);
      var D = new BN(1);
  
      var g = 0;
  
      while (x.isEven() && y.isEven()) {
        x.iushrn(1);
        y.iushrn(1);
        ++g;
      }
  
      var yp = y.clone();
      var xp = x.clone();
  
      while (!x.isZero()) {
        for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
        if (i > 0) {
          x.iushrn(i);
          while (i-- > 0) {
            if (A.isOdd() || B.isOdd()) {
              A.iadd(yp);
              B.isub(xp);
            }
  
            A.iushrn(1);
            B.iushrn(1);
          }
        }
  
        for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
        if (j > 0) {
          y.iushrn(j);
          while (j-- > 0) {
            if (C.isOdd() || D.isOdd()) {
              C.iadd(yp);
              D.isub(xp);
            }
  
            C.iushrn(1);
            D.iushrn(1);
          }
        }
  
        if (x.cmp(y) >= 0) {
          x.isub(y);
          A.isub(C);
          B.isub(D);
        } else {
          y.isub(x);
          C.isub(A);
          D.isub(B);
        }
      }
  
      return {
        a: C,
        b: D,
        gcd: y.iushln(g)
      };
    };
  
    // This is reduced incarnation of the binary EEA
    // above, designated to invert members of the
    // _prime_ fields F(p) at a maximal speed
    BN.prototype._invmp = function _invmp (p) {
      assert(p.negative === 0);
      assert(!p.isZero());
  
      var a = this;
      var b = p.clone();
  
      if (a.negative !== 0) {
        a = a.umod(p);
      } else {
        a = a.clone();
      }
  
      var x1 = new BN(1);
      var x2 = new BN(0);
  
      var delta = b.clone();
  
      while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {
        for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
        if (i > 0) {
          a.iushrn(i);
          while (i-- > 0) {
            if (x1.isOdd()) {
              x1.iadd(delta);
            }
  
            x1.iushrn(1);
          }
        }
  
        for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
        if (j > 0) {
          b.iushrn(j);
          while (j-- > 0) {
            if (x2.isOdd()) {
              x2.iadd(delta);
            }
  
            x2.iushrn(1);
          }
        }
  
        if (a.cmp(b) >= 0) {
          a.isub(b);
          x1.isub(x2);
        } else {
          b.isub(a);
          x2.isub(x1);
        }
      }
  
      var res;
      if (a.cmpn(1) === 0) {
        res = x1;
      } else {
        res = x2;
      }
  
      if (res.cmpn(0) < 0) {
        res.iadd(p);
      }
  
      return res;
    };
  
    BN.prototype.gcd = function gcd (num) {
      if (this.isZero()) return num.abs();
      if (num.isZero()) return this.abs();
  
      var a = this.clone();
      var b = num.clone();
      a.negative = 0;
      b.negative = 0;
  
      // Remove common factor of two
      for (var shift = 0; a.isEven() && b.isEven(); shift++) {
        a.iushrn(1);
        b.iushrn(1);
      }
  
      do {
        while (a.isEven()) {
          a.iushrn(1);
        }
        while (b.isEven()) {
          b.iushrn(1);
        }
  
        var r = a.cmp(b);
        if (r < 0) {
          // Swap `a` and `b` to make `a` always bigger than `b`
          var t = a;
          a = b;
          b = t;
        } else if (r === 0 || b.cmpn(1) === 0) {
          break;
        }
  
        a.isub(b);
      } while (true);
  
      return b.iushln(shift);
    };
  
    // Invert number in the field F(num)
    BN.prototype.invm = function invm (num) {
      return this.egcd(num).a.umod(num);
    };
  
    BN.prototype.isEven = function isEven () {
      return (this.words[0] & 1) === 0;
    };
  
    BN.prototype.isOdd = function isOdd () {
      return (this.words[0] & 1) === 1;
    };
  
    // And first word and num
    BN.prototype.andln = function andln (num) {
      return this.words[0] & num;
    };
  
    // Increment at the bit position in-line
    BN.prototype.bincn = function bincn (bit) {
      assert(typeof bit === 'number');
      var r = bit % 26;
      var s = (bit - r) / 26;
      var q = 1 << r;
  
      // Fast case: bit is much higher than all existing words
      if (this.length <= s) {
        this._expand(s + 1);
        this.words[s] |= q;
        return this;
      }
  
      // Add bit and propagate, if needed
      var carry = q;
      for (var i = s; carry !== 0 && i < this.length; i++) {
        var w = this.words[i] | 0;
        w += carry;
        carry = w >>> 26;
        w &= 0x3ffffff;
        this.words[i] = w;
      }
      if (carry !== 0) {
        this.words[i] = carry;
        this.length++;
      }
      return this;
    };
  
    BN.prototype.isZero = function isZero () {
      return this.length === 1 && this.words[0] === 0;
    };
  
    BN.prototype.cmpn = function cmpn (num) {
      var negative = num < 0;
  
      if (this.negative !== 0 && !negative) return -1;
      if (this.negative === 0 && negative) return 1;
  
      this.strip();
  
      var res;
      if (this.length > 1) {
        res = 1;
      } else {
        if (negative) {
          num = -num;
        }
  
        assert(num <= 0x3ffffff, 'Number is too big');
  
        var w = this.words[0] | 0;
        res = w === num ? 0 : w < num ? -1 : 1;
      }
      if (this.negative !== 0) return -res | 0;
      return res;
    };
  
    // Compare two numbers and return:
    // 1 - if `this` > `num`
    // 0 - if `this` == `num`
    // -1 - if `this` < `num`
    BN.prototype.cmp = function cmp (num) {
      if (this.negative !== 0 && num.negative === 0) return -1;
      if (this.negative === 0 && num.negative !== 0) return 1;
  
      var res = this.ucmp(num);
      if (this.negative !== 0) return -res | 0;
      return res;
    };
  
    // Unsigned comparison
    BN.prototype.ucmp = function ucmp (num) {
      // At this point both numbers have the same sign
      if (this.length > num.length) return 1;
      if (this.length < num.length) return -1;
  
      var res = 0;
      for (var i = this.length - 1; i >= 0; i--) {
        var a = this.words[i] | 0;
        var b = num.words[i] | 0;
  
        if (a === b) continue;
        if (a < b) {
          res = -1;
        } else if (a > b) {
          res = 1;
        }
        break;
      }
      return res;
    };
  
    BN.prototype.gtn = function gtn (num) {
      return this.cmpn(num) === 1;
    };
  
    BN.prototype.gt = function gt (num) {
      return this.cmp(num) === 1;
    };
  
    BN.prototype.gten = function gten (num) {
      return this.cmpn(num) >= 0;
    };
  
    BN.prototype.gte = function gte (num) {
      return this.cmp(num) >= 0;
    };
  
    BN.prototype.ltn = function ltn (num) {
      return this.cmpn(num) === -1;
    };
  
    BN.prototype.lt = function lt (num) {
      return this.cmp(num) === -1;
    };
  
    BN.prototype.lten = function lten (num) {
      return this.cmpn(num) <= 0;
    };
  
    BN.prototype.lte = function lte (num) {
      return this.cmp(num) <= 0;
    };
  
    BN.prototype.eqn = function eqn (num) {
      return this.cmpn(num) === 0;
    };
  
    BN.prototype.eq = function eq (num) {
      return this.cmp(num) === 0;
    };
  
    //
    // A reduce context, could be using montgomery or something better, depending
    // on the `m` itself.
    //
    BN.red = function red (num) {
      return new Red(num);
    };
  
    BN.prototype.toRed = function toRed (ctx) {
      assert(!this.red, 'Already a number in reduction context');
      assert(this.negative === 0, 'red works only with positives');
      return ctx.convertTo(this)._forceRed(ctx);
    };
  
    BN.prototype.fromRed = function fromRed () {
      assert(this.red, 'fromRed works only with numbers in reduction context');
      return this.red.convertFrom(this);
    };
  
    BN.prototype._forceRed = function _forceRed (ctx) {
      this.red = ctx;
      return this;
    };
  
    BN.prototype.forceRed = function forceRed (ctx) {
      assert(!this.red, 'Already a number in reduction context');
      return this._forceRed(ctx);
    };
  
    BN.prototype.redAdd = function redAdd (num) {
      assert(this.red, 'redAdd works only with red numbers');
      return this.red.add(this, num);
    };
  
    BN.prototype.redIAdd = function redIAdd (num) {
      assert(this.red, 'redIAdd works only with red numbers');
      return this.red.iadd(this, num);
    };
  
    BN.prototype.redSub = function redSub (num) {
      assert(this.red, 'redSub works only with red numbers');
      return this.red.sub(this, num);
    };
  
    BN.prototype.redISub = function redISub (num) {
      assert(this.red, 'redISub works only with red numbers');
      return this.red.isub(this, num);
    };
  
    BN.prototype.redShl = function redShl (num) {
      assert(this.red, 'redShl works only with red numbers');
      return this.red.shl(this, num);
    };
  
    BN.prototype.redMul = function redMul (num) {
      assert(this.red, 'redMul works only with red numbers');
      this.red._verify2(this, num);
      return this.red.mul(this, num);
    };
  
    BN.prototype.redIMul = function redIMul (num) {
      assert(this.red, 'redMul works only with red numbers');
      this.red._verify2(this, num);
      return this.red.imul(this, num);
    };
  
    BN.prototype.redSqr = function redSqr () {
      assert(this.red, 'redSqr works only with red numbers');
      this.red._verify1(this);
      return this.red.sqr(this);
    };
  
    BN.prototype.redISqr = function redISqr () {
      assert(this.red, 'redISqr works only with red numbers');
      this.red._verify1(this);
      return this.red.isqr(this);
    };
  
    // Square root over p
    BN.prototype.redSqrt = function redSqrt () {
      assert(this.red, 'redSqrt works only with red numbers');
      this.red._verify1(this);
      return this.red.sqrt(this);
    };
  
    BN.prototype.redInvm = function redInvm () {
      assert(this.red, 'redInvm works only with red numbers');
      this.red._verify1(this);
      return this.red.invm(this);
    };
  
    // Return negative clone of `this` % `red modulo`
    BN.prototype.redNeg = function redNeg () {
      assert(this.red, 'redNeg works only with red numbers');
      this.red._verify1(this);
      return this.red.neg(this);
    };
  
    BN.prototype.redPow = function redPow (num) {
      assert(this.red && !num.red, 'redPow(normalNum)');
      this.red._verify1(this);
      return this.red.pow(this, num);
    };
  
    // Prime numbers with efficient reduction
    var primes = {
      k256: null,
      p224: null,
      p192: null,
      p25519: null
    };
  
    // Pseudo-Mersenne prime
    function MPrime (name, p) {
      // P = 2 ^ N - K
      this.name = name;
      this.p = new BN(p, 16);
      this.n = this.p.bitLength();
      this.k = new BN(1).iushln(this.n).isub(this.p);
  
      this.tmp = this._tmp();
    }
  
    MPrime.prototype._tmp = function _tmp () {
      var tmp = new BN(null);
      tmp.words = new Array(Math.ceil(this.n / 13));
      return tmp;
    };
  
    MPrime.prototype.ireduce = function ireduce (num) {
      // Assumes that `num` is less than `P^2`
      // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)
      var r = num;
      var rlen;
  
      do {
        this.split(r, this.tmp);
        r = this.imulK(r);
        r = r.iadd(this.tmp);
        rlen = r.bitLength();
      } while (rlen > this.n);
  
      var cmp = rlen < this.n ? -1 : r.ucmp(this.p);
      if (cmp === 0) {
        r.words[0] = 0;
        r.length = 1;
      } else if (cmp > 0) {
        r.isub(this.p);
      } else {
        r.strip();
      }
  
      return r;
    };
  
    MPrime.prototype.split = function split (input, out) {
      input.iushrn(this.n, 0, out);
    };
  
    MPrime.prototype.imulK = function imulK (num) {
      return num.imul(this.k);
    };
  
    function K256 () {
      MPrime.call(
        this,
        'k256',
        'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');
    }
    inherits(K256, MPrime);
  
    K256.prototype.split = function split (input, output) {
      // 256 = 9 * 26 + 22
      var mask = 0x3fffff;
  
      var outLen = Math.min(input.length, 9);
      for (var i = 0; i < outLen; i++) {
        output.words[i] = input.words[i];
      }
      output.length = outLen;
  
      if (input.length <= 9) {
        input.words[0] = 0;
        input.length = 1;
        return;
      }
  
      // Shift by 9 limbs
      var prev = input.words[9];
      output.words[output.length++] = prev & mask;
  
      for (i = 10; i < input.length; i++) {
        var next = input.words[i] | 0;
        input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);
        prev = next;
      }
      prev >>>= 22;
      input.words[i - 10] = prev;
      if (prev === 0 && input.length > 10) {
        input.length -= 10;
      } else {
        input.length -= 9;
      }
    };
  
    K256.prototype.imulK = function imulK (num) {
      // K = 0x1000003d1 = [ 0x40, 0x3d1 ]
      num.words[num.length] = 0;
      num.words[num.length + 1] = 0;
      num.length += 2;
  
      // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
      var lo = 0;
      for (var i = 0; i < num.length; i++) {
        var w = num.words[i] | 0;
        lo += w * 0x3d1;
        num.words[i] = lo & 0x3ffffff;
        lo = w * 0x40 + ((lo / 0x4000000) | 0);
      }
  
      // Fast length reduction
      if (num.words[num.length - 1] === 0) {
        num.length--;
        if (num.words[num.length - 1] === 0) {
          num.length--;
        }
      }
      return num;
    };
  
    function P224 () {
      MPrime.call(
        this,
        'p224',
        'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');
    }
    inherits(P224, MPrime);
  
    function P192 () {
      MPrime.call(
        this,
        'p192',
        'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');
    }
    inherits(P192, MPrime);
  
    function P25519 () {
      // 2 ^ 255 - 19
      MPrime.call(
        this,
        '25519',
        '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');
    }
    inherits(P25519, MPrime);
  
    P25519.prototype.imulK = function imulK (num) {
      // K = 0x13
      var carry = 0;
      for (var i = 0; i < num.length; i++) {
        var hi = (num.words[i] | 0) * 0x13 + carry;
        var lo = hi & 0x3ffffff;
        hi >>>= 26;
  
        num.words[i] = lo;
        carry = hi;
      }
      if (carry !== 0) {
        num.words[num.length++] = carry;
      }
      return num;
    };
  
    // Exported mostly for testing purposes, use plain name instead
    BN._prime = function prime (name) {
      // Cached version of prime
      if (primes[name]) return primes[name];
  
      var prime;
      if (name === 'k256') {
        prime = new K256();
      } else if (name === 'p224') {
        prime = new P224();
      } else if (name === 'p192') {
        prime = new P192();
      } else if (name === 'p25519') {
        prime = new P25519();
      } else {
        throw new Error('Unknown prime ' + name);
      }
      primes[name] = prime;
  
      return prime;
    };
  
    //
    // Base reduction engine
    //
    function Red (m) {
      if (typeof m === 'string') {
        var prime = BN._prime(m);
        this.m = prime.p;
        this.prime = prime;
      } else {
        assert(m.gtn(1), 'modulus must be greater than 1');
        this.m = m;
        this.prime = null;
      }
    }
  
    Red.prototype._verify1 = function _verify1 (a) {
      assert(a.negative === 0, 'red works only with positives');
      assert(a.red, 'red works only with red numbers');
    };
  
    Red.prototype._verify2 = function _verify2 (a, b) {
      assert((a.negative | b.negative) === 0, 'red works only with positives');
      assert(a.red && a.red === b.red,
        'red works only with red numbers');
    };
  
    Red.prototype.imod = function imod (a) {
      if (this.prime) return this.prime.ireduce(a)._forceRed(this);
      return a.umod(this.m)._forceRed(this);
    };
  
    Red.prototype.neg = function neg (a) {
      if (a.isZero()) {
        return a.clone();
      }
  
      return this.m.sub(a)._forceRed(this);
    };
  
    Red.prototype.add = function add (a, b) {
      this._verify2(a, b);
  
      var res = a.add(b);
      if (res.cmp(this.m) >= 0) {
        res.isub(this.m);
      }
      return res._forceRed(this);
    };
  
    Red.prototype.iadd = function iadd (a, b) {
      this._verify2(a, b);
  
      var res = a.iadd(b);
      if (res.cmp(this.m) >= 0) {
        res.isub(this.m);
      }
      return res;
    };
  
    Red.prototype.sub = function sub (a, b) {
      this._verify2(a, b);
  
      var res = a.sub(b);
      if (res.cmpn(0) < 0) {
        res.iadd(this.m);
      }
      return res._forceRed(this);
    };
  
    Red.prototype.isub = function isub (a, b) {
      this._verify2(a, b);
  
      var res = a.isub(b);
      if (res.cmpn(0) < 0) {
        res.iadd(this.m);
      }
      return res;
    };
  
    Red.prototype.shl = function shl (a, num) {
      this._verify1(a);
      return this.imod(a.ushln(num));
    };
  
    Red.prototype.imul = function imul (a, b) {
      this._verify2(a, b);
      return this.imod(a.imul(b));
    };
  
    Red.prototype.mul = function mul (a, b) {
      this._verify2(a, b);
      return this.imod(a.mul(b));
    };
  
    Red.prototype.isqr = function isqr (a) {
      return this.imul(a, a.clone());
    };
  
    Red.prototype.sqr = function sqr (a) {
      return this.mul(a, a);
    };
  
    Red.prototype.sqrt = function sqrt (a) {
      if (a.isZero()) return a.clone();
  
      var mod3 = this.m.andln(3);
      assert(mod3 % 2 === 1);
  
      // Fast case
      if (mod3 === 3) {
        var pow = this.m.add(new BN(1)).iushrn(2);
        return this.pow(a, pow);
      }
  
      // Tonelli-Shanks algorithm (Totally unoptimized and slow)
      //
      // Find Q and S, that Q * 2 ^ S = (P - 1)
      var q = this.m.subn(1);
      var s = 0;
      while (!q.isZero() && q.andln(1) === 0) {
        s++;
        q.iushrn(1);
      }
      assert(!q.isZero());
  
      var one = new BN(1).toRed(this);
      var nOne = one.redNeg();
  
      // Find quadratic non-residue
      // NOTE: Max is such because of generalized Riemann hypothesis.
      var lpow = this.m.subn(1).iushrn(1);
      var z = this.m.bitLength();
      z = new BN(2 * z * z).toRed(this);
  
      while (this.pow(z, lpow).cmp(nOne) !== 0) {
        z.redIAdd(nOne);
      }
  
      var c = this.pow(z, q);
      var r = this.pow(a, q.addn(1).iushrn(1));
      var t = this.pow(a, q);
      var m = s;
      while (t.cmp(one) !== 0) {
        var tmp = t;
        for (var i = 0; tmp.cmp(one) !== 0; i++) {
          tmp = tmp.redSqr();
        }
        assert(i < m);
        var b = this.pow(c, new BN(1).iushln(m - i - 1));
  
        r = r.redMul(b);
        c = b.redSqr();
        t = t.redMul(c);
        m = i;
      }
  
      return r;
    };
  
    Red.prototype.invm = function invm (a) {
      var inv = a._invmp(this.m);
      if (inv.negative !== 0) {
        inv.negative = 0;
        return this.imod(inv).redNeg();
      } else {
        return this.imod(inv);
      }
    };
  
    Red.prototype.pow = function pow (a, num) {
      if (num.isZero()) return new BN(1).toRed(this);
      if (num.cmpn(1) === 0) return a.clone();
  
      var windowSize = 4;
      var wnd = new Array(1 << windowSize);
      wnd[0] = new BN(1).toRed(this);
      wnd[1] = a;
      for (var i = 2; i < wnd.length; i++) {
        wnd[i] = this.mul(wnd[i - 1], a);
      }
  
      var res = wnd[0];
      var current = 0;
      var currentLen = 0;
      var start = num.bitLength() % 26;
      if (start === 0) {
        start = 26;
      }
  
      for (i = num.length - 1; i >= 0; i--) {
        var word = num.words[i];
        for (var j = start - 1; j >= 0; j--) {
          var bit = (word >> j) & 1;
          if (res !== wnd[0]) {
            res = this.sqr(res);
          }
  
          if (bit === 0 && current === 0) {
            currentLen = 0;
            continue;
          }
  
          current <<= 1;
          current |= bit;
          currentLen++;
          if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;
  
          res = this.mul(res, wnd[current]);
          currentLen = 0;
          current = 0;
        }
        start = 26;
      }
  
      return res;
    };
  
    Red.prototype.convertTo = function convertTo (num) {
      var r = num.umod(this.m);
  
      return r === num ? r.clone() : r;
    };
  
    Red.prototype.convertFrom = function convertFrom (num) {
      var res = num.clone();
      res.red = null;
      return res;
    };
  
    //
    // Montgomery method engine
    //
  
    BN.mont = function mont (num) {
      return new Mont(num);
    };
  
    function Mont (m) {
      Red.call(this, m);
  
      this.shift = this.m.bitLength();
      if (this.shift % 26 !== 0) {
        this.shift += 26 - (this.shift % 26);
      }
  
      this.r = new BN(1).iushln(this.shift);
      this.r2 = this.imod(this.r.sqr());
      this.rinv = this.r._invmp(this.m);
  
      this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
      this.minv = this.minv.umod(this.r);
      this.minv = this.r.sub(this.minv);
    }
    inherits(Mont, Red);
  
    Mont.prototype.convertTo = function convertTo (num) {
      return this.imod(num.ushln(this.shift));
    };
  
    Mont.prototype.convertFrom = function convertFrom (num) {
      var r = this.imod(num.mul(this.rinv));
      r.red = null;
      return r;
    };
  
    Mont.prototype.imul = function imul (a, b) {
      if (a.isZero() || b.isZero()) {
        a.words[0] = 0;
        a.length = 1;
        return a;
      }
  
      var t = a.imul(b);
      var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
      var u = t.isub(c).iushrn(this.shift);
      var res = u;
  
      if (u.cmp(this.m) >= 0) {
        res = u.isub(this.m);
      } else if (u.cmpn(0) < 0) {
        res = u.iadd(this.m);
      }
  
      return res._forceRed(this);
    };
  
    Mont.prototype.mul = function mul (a, b) {
      if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);
  
      var t = a.mul(b);
      var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
      var u = t.isub(c).iushrn(this.shift);
      var res = u;
      if (u.cmp(this.m) >= 0) {
        res = u.isub(this.m);
      } else if (u.cmpn(0) < 0) {
        res = u.iadd(this.m);
      }
  
      return res._forceRed(this);
    };
  
    Mont.prototype.invm = function invm (a) {
      // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R
      var res = this.imod(a._invmp(this.m).mul(this.r2));
      return res._forceRed(this);
    };
  })( false || module, this);
  
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "../../node_modules/webpack/buildin/module.js")(module)))
  
  /***/ }),
  
  /***/ "../../node_modules/bs58/index.js":
  /*!****************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/bs58/index.js ***!
    \****************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  var basex = __webpack_require__(/*! base-x */ "../../node_modules/base-x/index.js")
  var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
  
  module.exports = basex(ALPHABET)
  
  
  /***/ }),
  
  /***/ "../../node_modules/buffer/index.js":
  /*!******************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/buffer/index.js ***!
    \******************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  /* WEBPACK VAR INJECTION */(function(global) {/*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
   * @license  MIT
   */
  /* eslint-disable no-proto */
  
  
  
  var base64 = __webpack_require__(/*! base64-js */ "../../node_modules/base64-js/index.js")
  var ieee754 = __webpack_require__(/*! ieee754 */ "../../node_modules/ieee754/index.js")
  var isArray = __webpack_require__(/*! isarray */ "../../node_modules/isarray/index.js")
  
  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__(/*! ./../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
  
  /***/ }),
  
  /***/ "../../node_modules/ieee754/index.js":
  /*!*******************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/ieee754/index.js ***!
    \*******************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  exports.read = function (buffer, offset, isLE, mLen, nBytes) {
    var e, m
    var eLen = (nBytes * 8) - mLen - 1
    var eMax = (1 << eLen) - 1
    var eBias = eMax >> 1
    var nBits = -7
    var i = isLE ? (nBytes - 1) : 0
    var d = isLE ? -1 : 1
    var s = buffer[offset + i]
  
    i += d
  
    e = s & ((1 << (-nBits)) - 1)
    s >>= (-nBits)
    nBits += eLen
    for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  
    m = e & ((1 << (-nBits)) - 1)
    e >>= (-nBits)
    nBits += mLen
    for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  
    if (e === 0) {
      e = 1 - eBias
    } else if (e === eMax) {
      return m ? NaN : ((s ? -1 : 1) * Infinity)
    } else {
      m = m + Math.pow(2, mLen)
      e = e - eBias
    }
    return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  }
  
  exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
    var e, m, c
    var eLen = (nBytes * 8) - mLen - 1
    var eMax = (1 << eLen) - 1
    var eBias = eMax >> 1
    var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
    var i = isLE ? 0 : (nBytes - 1)
    var d = isLE ? 1 : -1
    var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  
    value = Math.abs(value)
  
    if (isNaN(value) || value === Infinity) {
      m = isNaN(value) ? 1 : 0
      e = eMax
    } else {
      e = Math.floor(Math.log(value) / Math.LN2)
      if (value * (c = Math.pow(2, -e)) < 1) {
        e--
        c *= 2
      }
      if (e + eBias >= 1) {
        value += rt / c
      } else {
        value += rt * Math.pow(2, 1 - eBias)
      }
      if (value * c >= 2) {
        e++
        c /= 2
      }
  
      if (e + eBias >= eMax) {
        m = 0
        e = eMax
      } else if (e + eBias >= 1) {
        m = ((value * c) - 1) * Math.pow(2, mLen)
        e = e + eBias
      } else {
        m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
        e = 0
      }
    }
  
    for (; mLen >= 8; buffer[offset + i] = m & 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
  }
  
  
  /***/ }),
  
  /***/ "../../node_modules/isarray/index.js":
  /*!*******************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/isarray/index.js ***!
    \*******************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  var toString = {}.toString;
  
  module.exports = Array.isArray || function (arr) {
    return toString.call(arr) == '[object Array]';
  };
  
  
  /***/ }),
  
  /***/ "../../node_modules/mipher/dist/base.js":
  /*!**********************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/mipher/dist/base.js ***!
    \**********************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  ///////////////////////////////////////////////////////////////////////////////
  // \author (c) Marco Paland (marco@paland.com)
  //             2015-2018, PALANDesign Hannover, Germany
  //
  // \license The MIT License (MIT)
  //
  // This file is part of the mipher crypto library.
  // Permission is hereby granted, free of charge, to any person obtaining a copy
  // of this software and associated documentation files (the "Software"), to deal
  // in the Software without restriction, including without limitation the rights
  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  // copies of the Software, and to permit persons to whom the Software is
  // furnished to do so, subject to the following conditions:
  //
  // The above copyright notice and this permission notice shall be included in
  // all copies or substantial portions of the Software.
  //
  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  // THE SOFTWARE.
  //
  // \brief mipher interface, convert and util functions
  //
  ///////////////////////////////////////////////////////////////////////////////
  Object.defineProperty(exports, "__esModule", { value: true });
  ///////////////////////////////////////////////////////////////////////////////
  // V E R S I O N
  exports.version = '1.1.4';
  ///////////////////////////////////////////////////////////////////////////////
  // C O N V E R T E R
  var Convert;
  (function (Convert) {
      /**
       * Convert a string (UTF-8 encoded) to a byte array
       * @param {String} str UTF-8 encoded string
       * @return {Uint8Array} Byte array
       */
      function str2bin(str) {
          str = str.replace(/\r\n/g, '\n');
          var bin = new Uint8Array(str.length * 3), p = 0;
          for (var i = 0, len = str.length; i < len; i++) {
              var c = str.charCodeAt(i);
              if (c < 128) {
                  bin[p++] = c;
              }
              else if (c < 2048) {
                  bin[p++] = (c >>> 6) | 192;
                  bin[p++] = (c & 63) | 128;
              }
              else {
                  bin[p++] = (c >>> 12) | 224;
                  bin[p++] = ((c >>> 6) & 63) | 128;
                  bin[p++] = (c & 63) | 128;
              }
          }
          return bin.subarray(0, p);
      }
      Convert.str2bin = str2bin;
      /**
       * Convert a hex string to byte array
       * @param {String} hex Hex string
       * @return {Uint8Array} Byte array
       */
      function hex2bin(hex) {
          if (hex.indexOf('0x') === 0 || hex.indexOf('0X') === 0) {
              hex = hex.substr(2);
          }
          if (hex.length % 2) {
              hex += '0';
          }
          var bin = new Uint8Array(hex.length >>> 1);
          for (var i = 0, len = hex.length >>> 1; i < len; i++) {
              bin[i] = parseInt(hex.substr(i << 1, 2), 16);
          }
          return bin;
      }
      Convert.hex2bin = hex2bin;
      /**
       * Convert a 32 bit integer number to a 4 byte array, LSB is first
       * @param {Number} integer Integer number
       * @return {Uint8Array} bin 4 byte array
       */
      function int2bin(integer) {
          var bin = new Uint8Array(4);
          bin[0] = (integer) & 0xff;
          bin[1] = (integer >>> 8) & 0xff;
          bin[2] = (integer >>> 16) & 0xff;
          bin[3] = (integer >>> 24) & 0xff;
          return bin;
      }
      Convert.int2bin = int2bin;
      /**
       * Convert a number to a 8 byte array, LSB is first
       * @param {Number} value Long number
       * @return {Uint8Array} bin 8 byte array
       */
      function number2bin(value) {
          var bin = new Uint8Array(8);
          if (Math.floor(value) === value) {
              var TWO_PWR_32 = 4294967296;
              var lo = (value % TWO_PWR_32) | 0, hi = (value / TWO_PWR_32) | 0;
              if (value < 0) {
                  lo = ~(-value % TWO_PWR_32) | 0, hi = ~(-value / TWO_PWR_32) | 0;
                  lo = (lo + 1) & 0xffffffff;
                  if (!lo)
                      hi++;
              }
              var i = 0;
              bin[i++] = (lo & 0xff);
              bin[i++] = (lo >>> 8) & 0xff;
              bin[i++] = (lo >>> 16) & 0xff;
              bin[i++] = (lo >>> 24) & 0xff;
              bin[i++] = (hi & 0xff);
              bin[i++] = (hi >>> 8) & 0xff;
              bin[i++] = (hi >>> 16) & 0xff;
              bin[i] = (hi >>> 24) & 0xff;
          }
          else {
              var f = new Float64Array([value]);
              var d = new Uint8Array(f.buffer);
              bin.set(d);
          }
          return bin;
      }
      Convert.number2bin = number2bin;
      /**
       * Convert a base64/base64url string to a byte array
       * @param {String} base64 Base64/Base64url encoded string
       * @return {Uint8Array} Byte array or undefined if error
       */
      function base642bin(base64) {
          // remove base64url encoding
          base64 = base64.replace(/-/g, '+').replace(/_/g, '/').replace(/%3d/g, '=');
          // length must be multiple of 4
          if (base64.length % 4 !== 0)
              return;
          var strlen = base64.length / 4 * 3;
          if (base64.charAt(base64.length - 1) === '=')
              strlen--;
          if (base64.charAt(base64.length - 2) === '=')
              strlen--;
          if (typeof atob !== 'undefined') {
              return new Uint8Array(atob(base64).split('').map(function (c) { return c.charCodeAt(0); }));
          }
          else {
              // atob not available
              var decodingTable = new Int8Array([
                  -1, -1, -1, -1, -1, -1, -1, -1,
                  -1, -1, -1, -1, -1, -1, -1, -1,
                  -1, -1, -1, -1, -1, -1, -1, -1,
                  -1, -1, -1, -1, -1, -1, -1, -1,
                  -1, -1, -1, -1, -1, -1, -1, -1,
                  -1, -1, -1, 62, -1, 62, -1, 63,
                  52, 53, 54, 55, 56, 57, 58, 59,
                  60, 61, -1, -1, -1, -2, -1, -1,
                  -1, 0, 1, 2, 3, 4, 5, 6,
                  7, 8, 9, 10, 11, 12, 13, 14,
                  15, 16, 17, 18, 19, 20, 21, 22,
                  23, 24, 25, -1, -1, -1, -1, 63,
                  -1, 26, 27, 28, 29, 30, 31, 32,
                  33, 34, 35, 36, 37, 38, 39, 40,
                  41, 42, 43, 44, 45, 46, 47, 48,
                  49, 50, 51, -1, -1, -1, -1, -1 // x y z .  . . . .
              ]);
              var p = 0, bin = new Uint8Array(strlen);
              for (var i = 0, len = base64.length; i < len;) {
                  var sextet_a = base64.charAt(i) === '=' || base64.charCodeAt(i) > 'z'.charCodeAt(0) ? 0 : decodingTable[base64.charCodeAt(i)];
                  i++;
                  var sextet_b = base64.charAt(i) === '=' || base64.charCodeAt(i) > 'z'.charCodeAt(0) ? 0 : decodingTable[base64.charCodeAt(i)];
                  i++;
                  var sextet_c = base64.charAt(i) === '=' || base64.charCodeAt(i) > 'z'.charCodeAt(0) ? 0 : decodingTable[base64.charCodeAt(i)];
                  i++;
                  var sextet_d = base64.charAt(i) === '=' || base64.charCodeAt(i) > 'z'.charCodeAt(0) ? 0 : decodingTable[base64.charCodeAt(i)];
                  i++;
                  var triple = (sextet_a << 18) +
                      (sextet_b << 12) +
                      (sextet_c << 6) +
                      (sextet_d);
                  if (base64.charAt(i - 3) !== '=')
                      bin[p++] = (triple >>> 16) & 0xff;
                  if (base64.charAt(i - 2) !== '=')
                      bin[p++] = (triple >>> 8) & 0xff;
                  if (base64.charAt(i - 1) !== '=')
                      bin[p++] = (triple) & 0xff;
              }
              return bin;
          }
      }
      Convert.base642bin = base642bin;
      /**
       * Convert a byte array to hex string
       * @param {Uint8Array} bin The input byte array
       * @param {Boolean} uppercase True for upper case hex numbers
       * @return {String} Hex sting
       */
      function bin2hex(bin, uppercase) {
          if (uppercase === void 0) { uppercase = false; }
          var hex = uppercase ? '0123456789ABCDEF' : '0123456789abcdef';
          var str = '';
          for (var i = 0, len = bin.length; i < len; i++) {
              str += hex.charAt((bin[i] >>> 4) & 0x0f) + hex.charAt(bin[i] & 0x0f);
              // str += bin[i].toString(16);
          }
          return str;
      }
      Convert.bin2hex = bin2hex;
      /**
       * Convert a byte array to string (UTF-8 dedode)
       * @param {Uint8Array} bin UTF-8 text given as array of bytes
       * @return {String} UTF-8 Text string
       */
      function bin2str(bin) {
          var str = '', len = bin.length, i = 0, c, c2, c3;
          while (i < len) {
              c = bin[i];
              if (c < 128) {
                  str += String.fromCharCode(c);
                  i++;
              }
              else if ((c > 191) && (c < 224)) {
                  c2 = bin[i + 1];
                  str += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                  i += 2;
              }
              else {
                  c2 = bin[i + 1];
                  c3 = bin[i + 2];
                  str += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                  i += 3;
              }
          }
          return str;
      }
      Convert.bin2str = bin2str;
      /**
       * Convert a byte value array in a long value array
       * @param {Uint8Array} bin Array of bytes
       * @return {Uint32Array} bin values in long format
       */
      function bin2longbin(bin) {
          var longbin = new Uint32Array(bin.length >>> 2);
          for (var i = 0, len = bin.length; i < len; i++) {
              longbin[i >>> 2] |= (bin[i] << ((i % 4) << 3));
          }
          return longbin;
      }
      Convert.bin2longbin = bin2longbin;
      /**
       * Convert a 8 byte (int64) array into a number
       * @param {Uint8Array} bin Array of 8 bytes (int64), LSB is [0], MSB is [7]
       * @return {Number} int64 value as number
       */
      function bin2number(bin) {
          var TWO_PWR_32 = 4294967296;
          var i = 0;
          var lo = bin[i++] | bin[i++] << 8 | bin[i++] << 16 | bin[i++] << 24;
          var hi = bin[i++] | bin[i++] << 8 | bin[i++] << 16 | bin[i] << 24;
          return hi * TWO_PWR_32 + ((lo >= 0) ? lo : TWO_PWR_32 + lo);
      }
      Convert.bin2number = bin2number;
      /**
       * Convert byte array to base64/base64url string
       * @param {Uint8Array} bin Array of bytes
       * @param {Boolean} url True if the string should be URL encoded (base64url encoding)
       * @return {String} Base64 encoded string
       */
      function bin2base64(bin, url) {
          if (url === void 0) { url = false; }
          if (typeof btoa !== 'undefined') {
              return url ? btoa(String.fromCharCode.apply(null, bin)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '%3d') :
                  btoa(String.fromCharCode.apply(null, bin));
          }
          else {
              // btoa not available
              var base64 = '', encodingTable = url ? 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_' :
                  'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
              for (var i = 0, len = bin.length; i < len;) {
                  var octet_a = i < bin.length ? bin[i] : 0;
                  i++;
                  var octet_b = i < bin.length ? bin[i] : 0;
                  i++;
                  var octet_c = i < bin.length ? bin[i] : 0;
                  i++;
                  var triple = (octet_a << 0x10) + (octet_b << 0x08) + octet_c;
                  base64 += encodingTable.charAt((triple >>> 18) & 0x3F);
                  base64 += encodingTable.charAt((triple >>> 12) & 0x3F);
                  base64 += (i < bin.length + 2) ? encodingTable.charAt((triple >>> 6) & 0x3F) : (url ? '%3d' : '=');
                  base64 += (i < bin.length + 1) ? encodingTable.charAt((triple >>> 0) & 0x3F) : (url ? '%3d' : '=');
              }
              return base64;
          }
      }
      Convert.bin2base64 = bin2base64;
  })(Convert = exports.Convert || (exports.Convert = {}));
  ///////////////////////////////////////////////////////////////////////////////
  // U T I L S
  var Util;
  (function (Util) {
      /**
       * Time constant comparison of two arrays
       * @param {Uint8Array} lh First array of bytes
       * @param {Uint8Array} rh Second array of bytes
       * @return {Boolean} True if the arrays are equal (length and content), false otherwise
       */
      function compare(lh, rh) {
          if (lh.length !== rh.length) {
              // abort
              return false;
          }
          var i, d = 0, len = lh.length;
          for (i = 0; i < len; i++) {
              d |= lh[i] ^ rh[i];
          }
          return d === 0;
      }
      Util.compare = compare;
      /**
       * Clear an array
       * @param {Uint8Array | Uint16Array | Uint32Array} Array to clear
       */
      function clear(data) {
          data.fill(0);
      }
      Util.clear = clear;
      /**
       * XOR two arrays and return the result array
       * @param {Uint8Array} lh First array of bytes
       * @param {Uint8Array} rh Second array of bytes
       * @return {Uint8Array} XORed result array
       */
      function xor(lh, rh) {
          return lh.map(function (val, ind) { return val ^ rh[ind]; });
      }
      Util.xor = xor;
      /**
       * Concat two arrays and returns a new result array
       * @param {Uint8Array} lh First array of bytes
       * @param {Uint8Array} rh Second array of bytes
       * @return {Uint8Array} Concatenated result array
       */
      function concat(lh, rh) {
          var x = new Uint8Array(lh.length + rh.length);
          x.set(lh, 0);
          x.set(rh, lh.length);
          return x;
      }
      Util.concat = concat;
      /**
       * Returns true if LITTLE endian is detected
       * @return {Boolean} True for LE, false for BE
       */
      function litteendian() {
          return (new Uint32Array((new Uint8Array([1, 2, 3, 4])).buffer))[0] === 0x04030201;
      }
      Util.litteendian = litteendian;
  })(Util = exports.Util || (exports.Util = {}));
  
  
  /***/ }),
  
  /***/ "../../node_modules/mipher/dist/sha256.js":
  /*!************************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/mipher/dist/sha256.js ***!
    \************************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  ///////////////////////////////////////////////////////////////////////////////
  // \author (c) Marco Paland (marco@paland.com)
  //             2015-2018, PALANDesign Hannover, Germany
  //
  // \license The MIT License (MIT)
  //
  // This file is part of the mipher crypto library.
  // Permission is hereby granted, free of charge, to any person obtaining a copy
  // of this software and associated documentation files (the "Software"), to deal
  // in the Software without restriction, including without limitation the rights
  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  // copies of the Software, and to permit persons to whom the Software is
  // furnished to do so, subject to the following conditions:
  //
  // The above copyright notice and this permission notice shall be included in
  // all copies or substantial portions of the Software.
  //
  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  // THE SOFTWARE.
  //
  // \brief SHA256 implementation
  //        Generates a 32 byte hash value
  //
  ///////////////////////////////////////////////////////////////////////////////
  Object.defineProperty(exports, "__esModule", { value: true });
  var base_1 = __webpack_require__(/*! ./base */ "../../node_modules/mipher/dist/base.js");
  /**
   * SHA256 class
   */
  var SHA256 = /** @class */ (function () {
      /**
       * SHA256 ctor
       */
      function SHA256() {
          this.hashSize = 32;
          this.buffer = new Uint8Array(64);
          this.K = new Uint32Array([
              0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
              0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
              0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
              0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
              0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
              0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
              0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
              0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
          ]);
          this.init();
      }
      /**
       * Init the hash
       * @return {SHA256} this
       */
      SHA256.prototype.init = function () {
          this.H = new Uint32Array([0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19]);
          this.bufferIndex = 0;
          this.count = new Uint32Array(2);
          base_1.Util.clear(this.buffer);
          return this;
      };
      /**
       * Perform one transformation cycle
       */
      SHA256.prototype.transform = function () {
          var h = this.H, h0 = h[0], h1 = h[1], h2 = h[2], h3 = h[3], h4 = h[4], h5 = h[5], h6 = h[6], h7 = h[7];
          // convert byte buffer into w[0..15]
          var i, w = new Uint32Array(16);
          for (i = 0; i < 16; i++) {
              w[i] = (this.buffer[(i << 2) + 3]) |
                  (this.buffer[(i << 2) + 2] << 8) |
                  (this.buffer[(i << 2) + 1] << 16) |
                  (this.buffer[(i << 2)] << 24);
          }
          for (i = 0; i < 64; i++) {
              var tmp = void 0;
              if (i < 16) {
                  tmp = w[i];
              }
              else {
                  var a = w[(i + 1) & 15];
                  var b = w[(i + 14) & 15];
                  tmp = w[i & 15] = ((a >>> 7 ^ a >>> 18 ^ a >>> 3 ^ a << 25 ^ a << 14) + (b >>> 17 ^ b >>> 19 ^ b >>> 10 ^ b << 15 ^ b << 13) + w[i & 15] + w[(i + 9) & 15]) | 0;
              }
              tmp = (tmp + h7 + (h4 >>> 6 ^ h4 >>> 11 ^ h4 >>> 25 ^ h4 << 26 ^ h4 << 21 ^ h4 << 7) + (h6 ^ h4 & (h5 ^ h6)) + this.K[i]) | 0;
              h7 = h6;
              h6 = h5;
              h5 = h4;
              h4 = h3 + tmp;
              h3 = h2;
              h2 = h1;
              h1 = h0;
              h0 = (tmp + ((h1 & h2) ^ (h3 & (h1 ^ h2))) + (h1 >>> 2 ^ h1 >>> 13 ^ h1 >>> 22 ^ h1 << 30 ^ h1 << 19 ^ h1 << 10)) | 0;
          }
          h[0] = (h[0] + h0) | 0;
          h[1] = (h[1] + h1) | 0;
          h[2] = (h[2] + h2) | 0;
          h[3] = (h[3] + h3) | 0;
          h[4] = (h[4] + h4) | 0;
          h[5] = (h[5] + h5) | 0;
          h[6] = (h[6] + h6) | 0;
          h[7] = (h[7] + h7) | 0;
      };
      /**
       * Update the hash with additional message data
       * @param {Array} msg Additional message data as byte array
       * @return {SHA256} this
       */
      SHA256.prototype.update = function (msg) {
          msg = msg || new Uint8Array(0);
          // process the msg as many times as possible, the rest is stored in the buffer
          // message is processed in 512 bit (64 byte chunks)
          for (var i = 0, len = msg.length; i < len; i++) {
              this.buffer[this.bufferIndex++] = msg[i];
              if (this.bufferIndex === 64) {
                  this.transform();
                  this.bufferIndex = 0;
              }
          }
          // counter update (number of message bits)
          var c = this.count;
          if ((c[0] += (msg.length << 3)) < (msg.length << 3)) {
              c[1]++;
          }
          c[1] += (msg.length >>> 29);
          return this;
      };
      /**
       * Finalize the hash with additional message data
       * @param {Uint8Array} msg Additional message data as byte array
       * @return {Uint8Array} Hash as 32 byte array
       */
      SHA256.prototype.digest = function (msg) {
          this.update(msg);
          // append '1'
          var b = this.buffer, idx = this.bufferIndex;
          b[idx++] = 0x80;
          // zeropad up to byte pos 56
          while (idx !== 56) {
              if (idx === 64) {
                  this.transform();
                  idx = 0;
              }
              b[idx++] = 0;
          }
          // append length in bits
          var c = this.count;
          b[56] = (c[1] >>> 24) & 0xff;
          b[57] = (c[1] >>> 16) & 0xff;
          b[58] = (c[1] >>> 8) & 0xff;
          b[59] = (c[1] >>> 0) & 0xff;
          b[60] = (c[0] >>> 24) & 0xff;
          b[61] = (c[0] >>> 16) & 0xff;
          b[62] = (c[0] >>> 8) & 0xff;
          b[63] = (c[0] >>> 0) & 0xff;
          this.transform();
          // return the hash as byte array
          var hash = new Uint8Array(32), i;
          for (i = 0; i < 8; i++) {
              hash[(i << 2) + 0] = (this.H[i] >>> 24) & 0xff;
              hash[(i << 2) + 1] = (this.H[i] >>> 16) & 0xff;
              hash[(i << 2) + 2] = (this.H[i] >>> 8) & 0xff;
              hash[(i << 2) + 3] = (this.H[i] >>> 0) & 0xff;
          }
          // clear internal states and prepare for new hash
          this.init();
          return hash;
      };
      /**
       * All in one step
       * @param {Uint8Array} msg Message data as byte array
       * @return {Uint8Array} Hash as 32 byte array
       */
      SHA256.prototype.hash = function (msg) {
          return this.init().digest(msg);
      };
      /**
       * Performs a quick selftest
       * @return {Boolean} True if successful
       */
      SHA256.prototype.selftest = function () {
          var cumulative = new SHA256(), sha = new SHA256();
          var toBeHashed = '', hash, i, n;
          for (i = 0; i < 10; i++) {
              for (n = 100 * i; n < 100 * (i + 1); n++) {
                  hash = base_1.Convert.bin2hex(sha.hash(base_1.Convert.str2bin(toBeHashed)));
                  cumulative.update(base_1.Convert.str2bin(hash));
                  toBeHashed = (hash.substring(0, 2) + toBeHashed).substring(0, n + 1);
              }
          }
          hash = base_1.Convert.bin2hex(cumulative.digest());
          return hash === 'f305c76d5d457ddf04f1927166f5e13429407049a5c5f29021916321fcdcd8b4';
      };
      return SHA256;
  }());
  exports.SHA256 = SHA256;
  
  
  /***/ }),
  
  /***/ "../../node_modules/mipher/dist/sha512.js":
  /*!************************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/mipher/dist/sha512.js ***!
    \************************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  ///////////////////////////////////////////////////////////////////////////////
  // \author (c) Marco Paland (marco@paland.com)
  //             2015-2018, PALANDesign Hannover, Germany
  //
  // \license The MIT License (MIT)
  //
  // This file is part of the mipher crypto library.
  // Permission is hereby granted, free of charge, to any person obtaining a copy
  // of this software and associated documentation files (the "Software"), to deal
  // in the Software without restriction, including without limitation the rights
  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  // copies of the Software, and to permit persons to whom the Software is
  // furnished to do so, subject to the following conditions:
  //
  // The above copyright notice and this permission notice shall be included in
  // all copies or substantial portions of the Software.
  //
  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  // THE SOFTWARE.
  //
  // \brief SHA512 implementation
  //        Generates a 64 byte (512 bit) hash value
  //
  ///////////////////////////////////////////////////////////////////////////////
  Object.defineProperty(exports, "__esModule", { value: true });
  var base_1 = __webpack_require__(/*! ./base */ "../../node_modules/mipher/dist/base.js");
  /**
   * SHA512 class
   */
  var SHA512 = /** @class */ (function () {
      /**
       * SHA512 ctor
       */
      function SHA512() {
          this.hashSize = 64;
          this.buffer = new Uint8Array(128); // 128 byte array
          this.K = new Uint32Array([
              0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
              0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
              0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
              0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
              0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
              0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
              0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
              0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
              0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
              0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
              0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
              0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
              0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
              0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
              0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
              0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
              0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
              0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
              0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
              0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
          ]);
          this.init();
      }
      /**
       * Init the hash
       * @return {Object} this
       */
      SHA512.prototype.init = function () {
          this.H = new Uint32Array([0x6a09e667, 0xf3bcc908, 0xbb67ae85, 0x84caa73b, 0x3c6ef372, 0xfe94f82b, 0xa54ff53a, 0x5f1d36f1,
              0x510e527f, 0xade682d1, 0x9b05688c, 0x2b3e6c1f, 0x1f83d9ab, 0xfb41bd6b, 0x5be0cd19, 0x137e2179]);
          this.bufferIndex = 0;
          this.count = new Uint32Array(2);
          base_1.Util.clear(this.buffer);
          return this;
      };
      /**
       * Perform one transformation cycle
       */
      SHA512.prototype.transform = function () {
          var h = this.H, h0h = h[0], h0l = h[1], h1h = h[2], h1l = h[3], h2h = h[4], h2l = h[5], h3h = h[6], h3l = h[7], h4h = h[8], h4l = h[9], h5h = h[10], h5l = h[11], h6h = h[12], h6l = h[13], h7h = h[14], h7l = h[15];
          var ah = h0h, al = h0l, bh = h1h, bl = h1l, ch = h2h, cl = h2l, dh = h3h, dl = h3l, eh = h4h, el = h4l, fh = h5h, fl = h5l, gh = h6h, gl = h6l, hh = h7h, hl = h7l;
          // convert byte buffer into w[0..31]
          var i, w = new Uint32Array(160);
          for (i = 0; i < 32; i++) {
              w[i] = (this.buffer[(i << 2) + 3]) |
                  (this.buffer[(i << 2) + 2] << 8) |
                  (this.buffer[(i << 2) + 1] << 16) |
                  (this.buffer[(i << 2)] << 24);
          }
          // fill w[32..159]
          var gamma0xl, gamma0xh, gamma0l, gamma0h, gamma1xl, gamma1xh, gamma1l, gamma1h, wrl, wrh, wr7l, wr7h, wr16l, wr16h;
          for (i = 16; i < 80; i++) {
              // Gamma0
              gamma0xh = w[(i - 15) * 2];
              gamma0xl = w[(i - 15) * 2 + 1];
              gamma0h = ((gamma0xl << 31) | (gamma0xh >>> 1)) ^
                  ((gamma0xl << 24) | (gamma0xh >>> 8)) ^
                  ((gamma0xh >>> 7));
              gamma0l = ((gamma0xh << 31) | (gamma0xl >>> 1)) ^
                  ((gamma0xh << 24) | (gamma0xl >>> 8)) ^
                  ((gamma0xh << 25) | (gamma0xl >>> 7));
              // Gamma1
              gamma1xh = w[(i - 2) * 2];
              gamma1xl = w[(i - 2) * 2 + 1];
              gamma1h = ((gamma1xl << 13) | (gamma1xh >>> 19)) ^
                  ((gamma1xh << 3) | (gamma1xl >>> 29)) ^
                  ((gamma1xh >>> 6));
              gamma1l = ((gamma1xh << 13) | (gamma1xl >>> 19)) ^
                  ((gamma1xl << 3) | (gamma1xh >>> 29)) ^
                  ((gamma1xh << 26) | (gamma1xl >>> 6));
              // shortcuts
              wr7h = w[(i - 7) * 2],
                  wr7l = w[(i - 7) * 2 + 1],
                  wr16h = w[(i - 16) * 2],
                  wr16l = w[(i - 16) * 2 + 1];
              // W(round) = gamma0 + W(round - 7) + gamma1 + W(round - 16)
              wrl = gamma0l + wr7l;
              wrh = gamma0h + wr7h + ((wrl >>> 0) < (gamma0l >>> 0) ? 1 : 0);
              wrl += gamma1l;
              wrh += gamma1h + ((wrl >>> 0) < (gamma1l >>> 0) ? 1 : 0);
              wrl += wr16l;
              wrh += wr16h + ((wrl >>> 0) < (wr16l >>> 0) ? 1 : 0);
              // store
              w[i * 2] = wrh;
              w[i * 2 + 1] = wrl;
          }
          // compress
          var chl, chh, majl, majh, sig0l, sig0h, sig1l, sig1h, krl, krh, t1l, t1h, t2l, t2h;
          for (i = 0; i < 80; i++) {
              // Ch
              chh = (eh & fh) ^ (~eh & gh);
              chl = (el & fl) ^ (~el & gl);
              // Maj
              majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);
              majl = (al & bl) ^ (al & cl) ^ (bl & cl);
              // Sigma0
              sig0h = ((al << 4) | (ah >>> 28)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));
              sig0l = ((ah << 4) | (al >>> 28)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));
              // Sigma1
              sig1h = ((el << 18) | (eh >>> 14)) ^ ((el << 14) | (eh >>> 18)) ^ ((eh << 23) | (el >>> 9));
              sig1l = ((eh << 18) | (el >>> 14)) ^ ((eh << 14) | (el >>> 18)) ^ ((el << 23) | (eh >>> 9));
              // K(round)
              krh = this.K[i * 2];
              krl = this.K[i * 2 + 1];
              // t1 = h + sigma1 + ch + K(round) + W(round)
              t1l = hl + sig1l;
              t1h = hh + sig1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);
              t1l += chl;
              t1h += chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);
              t1l += krl;
              t1h += krh + ((t1l >>> 0) < (krl >>> 0) ? 1 : 0);
              t1l = t1l + w[i * 2 + 1];
              t1h += w[i * 2] + ((t1l >>> 0) < (w[i * 2 + 1] >>> 0) ? 1 : 0);
              // t2 = sigma0 + maj
              t2l = sig0l + majl;
              t2h = sig0h + majh + ((t2l >>> 0) < (sig0l >>> 0) ? 1 : 0);
              // update working variables
              hh = gh;
              hl = gl;
              gh = fh;
              gl = fl;
              fh = eh;
              fl = el;
              el = (dl + t1l) | 0;
              eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;
              dh = ch;
              dl = cl;
              ch = bh;
              cl = bl;
              bh = ah;
              bl = al;
              al = (t1l + t2l) | 0;
              ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;
          }
          // intermediate hash
          h0l = h[1] = (h0l + al) | 0;
          h[0] = (h0h + ah + ((h0l >>> 0) < (al >>> 0) ? 1 : 0)) | 0;
          h1l = h[3] = (h1l + bl) | 0;
          h[2] = (h1h + bh + ((h1l >>> 0) < (bl >>> 0) ? 1 : 0)) | 0;
          h2l = h[5] = (h2l + cl) | 0;
          h[4] = (h2h + ch + ((h2l >>> 0) < (cl >>> 0) ? 1 : 0)) | 0;
          h3l = h[7] = (h3l + dl) | 0;
          h[6] = (h3h + dh + ((h3l >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;
          h4l = h[9] = (h4l + el) | 0;
          h[8] = (h4h + eh + ((h4l >>> 0) < (el >>> 0) ? 1 : 0)) | 0;
          h5l = h[11] = (h5l + fl) | 0;
          h[10] = (h5h + fh + ((h5l >>> 0) < (fl >>> 0) ? 1 : 0)) | 0;
          h6l = h[13] = (h6l + gl) | 0;
          h[12] = (h6h + gh + ((h6l >>> 0) < (gl >>> 0) ? 1 : 0)) | 0;
          h7l = h[15] = (h7l + hl) | 0;
          h[14] = (h7h + hh + ((h7l >>> 0) < (hl >>> 0) ? 1 : 0)) | 0;
      };
      /**
       * Update the hash with additional message data
       * @param {Uint8Array} msg Additional message data as byte array
       * @return {SHA512} this
       */
      SHA512.prototype.update = function (msg) {
          msg = msg || new Uint8Array(0);
          // process the msg as many times as possible, the rest is stored in the buffer
          // message is processed in 1024 bit (128 byte chunks)
          for (var i = 0; i < msg.length; i++) {
              this.buffer[this.bufferIndex++] = msg[i];
              if (this.bufferIndex === 128) {
                  this.transform();
                  this.bufferIndex = 0;
              }
          }
          // counter update (number of message bits)
          var c = this.count;
          if ((c[0] += (msg.length << 3)) < (msg.length << 3)) {
              c[1]++;
          }
          c[1] += (msg.length >>> 29);
          return this;
      };
      /**
       * Finalize the hash with additional message data
       * @param {Uint8Array} msg Additional message data as byte array
       * @return {Uint8Array} Hash as 64 byte array
       */
      SHA512.prototype.digest = function (msg) {
          this.update(msg);
          // append '1'
          var b = this.buffer, idx = this.bufferIndex;
          b[idx++] = 0x80;
          // zeropad up to byte pos 112
          while (idx !== 112) {
              if (idx === 128) {
                  this.transform();
                  idx = 0;
              }
              b[idx++] = 0;
          }
          // append length in bits
          var c = this.count;
          b[112] = b[113] = b[114] = b[115] = b[116] = b[117] = b[118] = b[119] = 0;
          b[120] = (c[1] >>> 24) & 0xff;
          b[121] = (c[1] >>> 16) & 0xff;
          b[122] = (c[1] >>> 8) & 0xff;
          b[123] = (c[1] >>> 0) & 0xff;
          b[124] = (c[0] >>> 24) & 0xff;
          b[125] = (c[0] >>> 16) & 0xff;
          b[126] = (c[0] >>> 8) & 0xff;
          b[127] = (c[0] >>> 0) & 0xff;
          this.transform();
          // return the hash as byte array
          var i, hash = new Uint8Array(64);
          for (i = 0; i < 16; i++) {
              hash[(i << 2) + 0] = (this.H[i] >>> 24) & 0xff;
              hash[(i << 2) + 1] = (this.H[i] >>> 16) & 0xff;
              hash[(i << 2) + 2] = (this.H[i] >>> 8) & 0xff;
              hash[(i << 2) + 3] = (this.H[i]) & 0xff;
          }
          // clear internal states and prepare for new hash
          this.init();
          return hash;
      };
      /**
       * All in one step
       * @param {Uint8Array} msg Additional message data
       * @return {Uint8Array} Hash as 64 byte array
       */
      SHA512.prototype.hash = function (msg) {
          return this.init().digest(msg);
      };
      /**
       * Performs a quick selftest
       * @return {Boolean} True if successful
       */
      SHA512.prototype.selftest = function () {
          var cumulative = new SHA512(), sha = new SHA512();
          var toBeHashed = '', hash;
          for (var i = 0; i < 10; i++) {
              for (var n = 100 * i; n < 100 * (i + 1); n++) {
                  hash = base_1.Convert.bin2hex(sha.hash(base_1.Convert.str2bin(toBeHashed)));
                  cumulative.update(base_1.Convert.str2bin(hash));
                  toBeHashed = (hash.substring(0, 2) + toBeHashed).substring(0, n + 1);
              }
          }
          hash = base_1.Convert.bin2hex(cumulative.digest());
          return hash === '602923787640dd6d77a99b101c379577a4054df2d61f39c74172cafa2d9f5b26a11b40b7ba4cdc87e84a4ab91b85391cb3e1c0200f3e3d5e317486aae7bebbf3';
      };
      return SHA512;
  }());
  exports.SHA512 = SHA512;
  
  
  /***/ }),
  
  /***/ "../../node_modules/safe-buffer/index.js":
  /*!***********************************************************************************!*\
    !*** /home/ben/Code/crypto/pascalcoin/untitled/node_modules/safe-buffer/index.js ***!
    \***********************************************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /* eslint-disable node/no-deprecated-api */
  var buffer = __webpack_require__(/*! buffer */ "../../node_modules/buffer/index.js")
  var Buffer = buffer.Buffer
  
  // alternative to using Object.keys for old browsers
  function copyProps (src, dst) {
    for (var key in src) {
      dst[key] = src[key]
    }
  }
  if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
    module.exports = buffer
  } else {
    // Copy properties from require('buffer')
    copyProps(buffer, exports)
    exports.Buffer = SafeBuffer
  }
  
  function SafeBuffer (arg, encodingOrOffset, length) {
    return Buffer(arg, encodingOrOffset, length)
  }
  
  // Copy static methods from Buffer
  copyProps(Buffer, SafeBuffer)
  
  SafeBuffer.from = function (arg, encodingOrOffset, length) {
    if (typeof arg === 'number') {
      throw new TypeError('Argument must not be a number')
    }
    return Buffer(arg, encodingOrOffset, length)
  }
  
  SafeBuffer.alloc = function (size, fill, encoding) {
    if (typeof size !== 'number') {
      throw new TypeError('Argument must be a number')
    }
    var buf = Buffer(size)
    if (fill !== undefined) {
      if (typeof encoding === 'string') {
        buf.fill(fill, encoding)
      } else {
        buf.fill(fill)
      }
    } else {
      buf.fill(0)
    }
    return buf
  }
  
  SafeBuffer.allocUnsafe = function (size) {
    if (typeof size !== 'number') {
      throw new TypeError('Argument must be a number')
    }
    return Buffer(size)
  }
  
  SafeBuffer.allocUnsafeSlow = function (size) {
    if (typeof size !== 'number') {
      throw new TypeError('Argument must be a number')
    }
    return buffer.SlowBuffer(size)
  }
  
  
  /***/ }),
  
  /***/ "../../node_modules/webpack/buildin/global.js":
  /*!***********************************!*\
    !*** (webpack)/buildin/global.js ***!
    \***********************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (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;
  
  
  /***/ }),
  
  /***/ "../../node_modules/webpack/buildin/module.js":
  /*!***********************************!*\
    !*** (webpack)/buildin/module.js ***!
    \***********************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  module.exports = function(module) {
  	if (!module.webpackPolyfill) {
  		module.deprecate = function() {};
  		module.paths = [];
  		// module.parent = undefined by default
  		if (!module.children) module.children = [];
  		Object.defineProperty(module, "loaded", {
  			enumerable: true,
  			get: function() {
  				return module.l;
  			}
  		});
  		Object.defineProperty(module, "id", {
  			enumerable: true,
  			get: function() {
  				return module.i;
  			}
  		});
  		module.webpackPolyfill = 1;
  	}
  	return module;
  };
  
  
  /***/ }),
  
  /***/ "../common/index.js":
  /*!**************************!*\
    !*** ../common/index.js ***!
    \**************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  module.exports = {
    Base58: __webpack_require__(/*! ./src/Base58 */ "../common/src/Base58.js"),
    BC: __webpack_require__(/*! ./src/BC */ "../common/src/BC.js"),
    Endian: __webpack_require__(/*! ./src/Endian */ "../common/src/Endian.js"),
    PascalCoinInfo: __webpack_require__(/*! ./src/PascalCoinInfo */ "../common/src/PascalCoinInfo.js"),
    Sha: __webpack_require__(/*! ./src/Sha */ "../common/src/Sha.js"),
    Util: __webpack_require__(/*! ./src/Util */ "../common/src/Util.js"),
    Types: __webpack_require__(/*! ./src/Types */ "../common/src/Types/index.js"),
    Coding: __webpack_require__(/*! ./src/Coding */ "../common/src/Coding/index.js")
  };
  
  /***/ }),
  
  /***/ "../common/src/BC.js":
  /*!***************************!*\
    !*** ../common/src/BC.js ***!
    \***************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /* WEBPACK VAR INJECTION */(function(Buffer) {/**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Endian = __webpack_require__(/*! ./Endian */ "../common/src/Endian.js");
  
  const P_BUFFER = Symbol('buffer');
  /**
   * A BC value as defined in PascalCoin. In essence its a wrapper for
   * a buffer.
   */
  
  class BC {
    /**
       * Constructor
       *
     * @param {Buffer|Uint8Array} buffer
       */
    constructor(buffer) {
      this[P_BUFFER] = Buffer.from(buffer);
    }
    /**
     * Gets a BC instance from the given value. If a string it expects it to be
     * in hex format.
     *
     * This method it called everywhere, so we make sure that
     *
     * @param {Buffer|Uint8Array|BC|String} data
     * @param {String} stringType
     * @returns {BC}
     */
  
  
    static from(data, stringType = 'hex') {
      if (data instanceof BC) {
        return data;
      } else if (data instanceof Buffer) {
        return new BC(data);
      } else if (data instanceof Uint8Array) {
        return new BC(data);
      }
  
      if (stringType === 'hex') {
        try {
          return BC.fromHex(data);
        } catch (e) {
          return BC.fromString(data);
        }
      }
  
      return BC.fromString(data);
    }
    /**
     * Gets an empty BC.
     *
     * @returns {BC}
     */
  
  
    static empty() {
      return BC.from([]);
    }
    /**
       * Creates a new BC instance from the given hex string.
       *
     * @param {string} hex
     * @param {Boolean} strict
       * @returns {BC}
       */
  
  
    static fromHex(hex, strict = true) {
      if (hex instanceof BC) {
        return hex;
      }
  
      if (hex.length % 2 === 1) {
        if (strict) {
          throw new Error('Invalid hex - number of nibbles need to be divideable by 2');
        } else {
          hex = `0${hex}`; // eslint-disable-line no-param-reassign
        }
      }
  
      if (hex.length > 0 && /^[0-9a-fA-F]+$/.test(hex) === false) {
        throw new Error('Invalid hex');
      }
  
      return new BC(Buffer.from(hex, 'hex'));
    }
    /**
       * Creates a new BC instance from the given string.
       *
       * @param {string} str
       * @returns {BC}
       */
  
  
    static fromString(str) {
      if (str instanceof BC) {
        return str;
      } // TODO: UTF8?
  
  
      return new BC(Buffer.from(str, 'utf8'));
    }
    /**
       * Gets a new BC from an integer.
       *
       * @param {Number} int
       * @param {Number} nBytes
       * @returns {BC}
       */
  
  
    static fromInt(int, nBytes = null) {
      let hex = parseInt(int, 10).toString(16);
      const instance = BC.fromHex(hex, false);
  
      if (nBytes !== null && instance.length < nBytes) {
        return instance.prepend(BC.fromHex('00'.repeat(nBytes - instance.length)));
      }
  
      return instance;
    }
    /**
       * Gets the binary presentation of the hexa string.
       *
       * @returns {string}
       */
  
  
    toBinary() {
      return this[P_BUFFER].toString('binary');
    }
    /**
       * Gets the BC as a string.
       *
       * @returns {string}
       * // TODO: UTF8?
       */
  
  
    toString() {
      return this[P_BUFFER].toString('utf8');
    }
    /**
     * Gets the BC as hex.
     *
     * @returns {string}
     */
  
  
    toHex(lowerCase = false) {
      if (lowerCase) {
        return this[P_BUFFER].toString('hex').toLowerCase();
      }
  
      return this[P_BUFFER].toString('hex').toUpperCase();
    }
    /**
       * Gets the integer value of the BC.
       *
       * @return {Number}
       */
  
  
    toInt() {
      return parseInt(this.toHex(), 16);
    }
    /**
       * Gets the length of BC bytes.
       *
       * @returns {number}
       */
  
  
    get length() {
      return this[P_BUFFER].length;
    }
    /**
       * Gets the length of the parsed BC (the bytes).
       *
       * @returns {number}
       */
  
  
    get hexLength() {
      return this.length * 2;
    }
    /**
       * Gets a copy of the current buffer.
       *
       * @returns {Buffer}
       */
  
  
    get buffer() {
      return Buffer.from(this[P_BUFFER].toString('hex'), 'hex');
    }
    /**
       * Returns a sub-BC defined by the start and end position.
       *
       * @param {Number}start
       * @param {Number} end
       * @returns {BC}
       */
  
  
    slice(start, end = null) {
      if (end === null) {
        return new BC(this[P_BUFFER].slice(start));
      }
  
      return new BC(this[P_BUFFER].slice(start, end));
    }
    /**
       * Concatenates one or more BC instances and returns a new instance.
       *
       * @param {...BC} bytes
       * @returns {BC}
       */
  
  
    static concat(...bytes) {
      return BC.fromHex(bytes.reduce((prev, curr) => {
        if (prev instanceof Object) {
          return `${prev.toHex()}${curr.toHex()}`;
        }
  
        return `${prev}${curr.toHex()}`;
      }));
    }
    /**
     * Appends a single BC instance to the current BC and
     * returns a new instance.
     *
     * @param {BC|Buffer|Uint8Array|String} bytes
     * @returns {BC}
     */
  
  
    append(bytes) {
      return BC.concat(this, BC.from(bytes));
    }
    /**
       * Appends a single BC instance to the current BC and
       * returns a new instance.
       *
       * @param {BC|Buffer|Uint8Array|String} bytes
       * @returns {BC}
       */
  
  
    prepend(bytes) {
      return BC.concat(BC.from(bytes), this);
    }
    /**
     * Gets a value indicating the current bc equals the given bc.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @returns {boolean}
     */
  
  
    equals(bc) {
      return Buffer.compare(BC.from(bc).buffer, this.buffer) === 0;
    }
    /**
     * Reads an 8 bit integer value from the bc from the given offset.
     *
     * @param {Number} offset
     * @param {Boolean} unsigned
     * @returns {Number}
     */
  
  
    readInt8(offset, unsigned = true) {
      return this[P_BUFFER][unsigned ? 'readUInt8' : 'readInt8'](offset);
    }
    /**
     * Reads a 16 bit integer value from the bc from the given offset.
     *
     * @param {Number} offset
     * @param {Boolean} unsigned
     * @param {String} endian
     * @returns {Number}
     */
  
  
    readInt16(offset, unsigned = true, endian = Endian.detect()) {
      const method = `read${unsigned ? 'U' : ''}Int16${endian}`;
      return this[P_BUFFER][method](offset);
    }
    /**
     * Reads a 32 bit integer value from the bc from the given offset.
     *
     * @param {Number} offset
     * @param {Boolean} unsigned
     * @param {String} endian
     * @returns {Number}
     */
  
  
    readInt32(offset, unsigned = true, endian = Endian.detect()) {
      const method = `read${unsigned ? 'U' : ''}Int32${endian}`;
      return this[P_BUFFER][method](offset);
    }
    /**
     * Creates an 8 bit integer BC.
     *
     * @param {Number} value
     * @param {Boolean} unsigned
     * @returns {BC}
     */
  
  
    static fromInt8(value, unsigned = true) {
      const method = `write${unsigned ? 'U' : ''}Int8`;
      const buf = Buffer.allocUnsafe(1);
      buf[method](value);
      return new BC(buf);
    }
    /**
     * Creates a 16 bit integer BC.
     *
     * @param {Number} value
     * @param {Boolean} unsigned
     * @param {String} endian
     * @returns {BC}
     */
  
  
    static fromInt16(value, unsigned = true, endian = Endian.detect()) {
      const method = `write${unsigned ? 'U' : ''}Int16${endian}`;
      const buf = Buffer.allocUnsafe(2);
      buf[method](value);
      return new BC(buf);
    }
    /**
     * Creates a 32 bit integer BC.
     *
     * @param {Number} value
     * @param {Boolean} unsigned
     * @param {String} endian
     * @returns {BC}
     */
  
  
    static fromInt32(value, unsigned = true, endian = Endian.detect()) {
      const method = `write${unsigned ? 'U' : ''}Int32${endian}`;
      const buf = Buffer.allocUnsafe(4);
      buf[method](value);
      return new BC(buf);
    }
    /**
     * Small helper to split a byte collection.
     *
     * @param {Number} size
     * @return {BC[]}
     */
  
  
    split(size) {
      let pos = 0;
      let splitted = [];
  
      for (; pos < this.length; pos += size) {
        splitted.push(this.slice(pos, pos + size));
      }
  
      return splitted;
    }
  
  }
  
  module.exports = BC;
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ "../../node_modules/buffer/index.js").Buffer))
  
  /***/ }),
  
  /***/ "../common/src/Base58.js":
  /*!*******************************!*\
    !*** ../common/src/Base58.js ***!
    \*******************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  
  
  const bs58 = __webpack_require__(/*! bs58 */ "../../node_modules/bs58/index.js");
  
  const BC = __webpack_require__(/*! ./BC */ "../common/src/BC.js");
  /**
   * Contains methods to convert stuff to various formats.
   */
  
  
  class Base58 {
    /**
       * Gets the base58 representation of the given buffer.
       *
       * @param {BC|Buffer|Uint8Array|String} data
       * @returns {String}
       */
    static encode(data) {
      return bs58.encode(BC.from(data).buffer);
    }
    /**
     * Decodes a Base58 encoded string.
     *
     * @param {String} str
     * @returns {BC}
     */
  
  
    static decode(str) {
      return new BC(bs58.decode(str));
    }
  
  }
  
  module.exports = Base58;
  
  /***/ }),
  
  /***/ "../common/src/Coding/AbstractType.js":
  /*!********************************************!*\
    !*** ../common/src/Coding/AbstractType.js ***!
    \********************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const P_ID = Symbol('id');
  const P_FIXED_VALUE = Symbol('fixed_value');
  const P_HAS_FIXED_VALUE = Symbol('has_fixed_value');
  const P_DESCRIPTION = Symbol('description');
  /**
   * Abstract field type to encode and decode values. Abstracts encodeToBytes and decodeFromBytes as
   * basic implementations but in fact it can be anything.
   */
  
  class AbstractType {
    /**
     * Constructor.
     *
     * @param {string|null} id
     */
    constructor(id = null) {
      this[P_ID] = id;
      this[P_HAS_FIXED_VALUE] = false;
    }
    /**
     * Gets the field ident.
     *
     * @returns {String}
     */
  
  
    get id() {
      return this[P_ID];
    }
    /**
     * Gets a value indicating whether the field type has a fixed value.
     *
     * @returns {Boolean}
     */
  
  
    get hasFixedValue() {
      return this[P_HAS_FIXED_VALUE];
    }
    /**
     * Gets the fixed value.
     *
     * @returns {*}
     */
  
  
    get fixedValue() {
      return this[P_FIXED_VALUE];
    }
    /**
     * Gets the encoded size of the type.
     *
     * @return {Number}
     */
  
  
    get encodedSize() {
      throw new Error('Encoded size getter not implemented');
    }
    /**
     * Decodes a value using the rules defined in the method from the given bytes.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @return {*}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      throw new Error('Missing implementation for decodeFromBytes.');
    }
    /**
     * Returns the encoded bytes for the given value.
     *
     * @param {*} value
     * @return {*}
     */
  
  
    encodeToBytes(value) {
      throw new Error('Missing implementation for encodeToBytes.');
    }
    /**
     * Sets a fixed value.
     *
     * @param {*} value
     * @returns {AbstractType}
     */
  
  
    withFixedValue(value) {
      this[P_FIXED_VALUE] = value;
      this[P_HAS_FIXED_VALUE] = true;
      return this;
    }
    /**
     * Sets the description and returns the type or gets the description itself.
     *
     * @param {String} description
     * @returns {AbstractType|String}
     */
  
  
    description(description = null) {
      if (description === null) {
        return this[P_DESCRIPTION];
      }
  
      if (this[P_DESCRIPTION] === undefined) {
        this[P_DESCRIPTION] = [];
      }
  
      this[P_DESCRIPTION].push(description);
      return this;
    }
    /**
     * Gets a value indicating whether the type can be decoded. It is
     * not possible in some circumstances.
     *
     * @return {boolean}
     */
  
  
    get canDecode() {
      return true;
    }
  
  }
  
  module.exports = AbstractType;
  
  /***/ }),
  
  /***/ "../common/src/Coding/CompositeType.js":
  /*!*********************************************!*\
    !*** ../common/src/Coding/CompositeType.js ***!
    \*********************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const BC = __webpack_require__(/*! ./../BC */ "../common/src/BC.js");
  
  const AbstractType = __webpack_require__(/*! ./AbstractType */ "../common/src/Coding/AbstractType.js");
  
  const P_SUBTYPES = Symbol('subtypes');
  const P_SIZE_ENCODED = Symbol('size_encoded');
  /**
   * A Type that itself is made up of multiple other (sub-)types.
   */
  
  class CompositeType extends AbstractType {
    /**
     * Constructor
     */
    constructor(id) {
      super(id || 'composite_type');
      super.description('A type that itself is made up of multiple other types.');
      this[P_SUBTYPES] = [];
    }
    /**
     * Gets all subtypes.
     *
     * @returns {Array}
     */
  
  
    get subTypes() {
      return this[P_SUBTYPES];
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return this[P_SIZE_ENCODED];
    }
    /**
     * Adds a new field (type) definition.
     *
     * @param {AbstractType} field
     */
  
  
    addSubType(field) {
      this[P_SUBTYPES].push(field);
      return this;
    }
    /**
     * Decodes the given bytes into an object.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @return {*}
     */
  
  
    decodeFromBytes(bc, options = {
      toArray: false
    }, all = null) {
      if (this.canDecode === false) {
        throw new Error('This type cannot be decoded.');
      }
  
      const obj = {};
      let offset = 0;
      bc = BC.from(bc);
      this.subTypes.forEach(subType => {
        obj[subType.id] = subType.decodeFromBytes(bc.slice(offset), options, obj);
        offset += subType.encodedSize;
      });
      this[P_SIZE_ENCODED] = offset;
      return options.toArray ? Object.values(obj) : obj;
    }
    /**
     * Encodes the given object to a list of bytes.
     *
     * @param {Object|Array|*} objOrArray
     * @returns {BC}
     */
  
  
    encodeToBytes(objOrArray) {
      let bc = BC.empty();
      this.subTypes.forEach((subType, idx) => {
        let subTypeValue;
  
        if (subType.hasFixedValue) {
          subTypeValue = subType.fixedValue;
        } else {
          subTypeValue = Array.isArray(objOrArray) ? objOrArray[idx] : objOrArray[subType.id];
        } // we will use the first available
  
  
        bc = bc.append(subType.encodeToBytes(subTypeValue, objOrArray));
      });
      this[P_SIZE_ENCODED] = bc.length;
      return bc;
    }
  
  }
  
  module.exports = CompositeType;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/AbstractInt.js":
  /*!************************************************!*\
    !*** ../common/src/Coding/Core/AbstractInt.js ***!
    \************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AbstractType = __webpack_require__(/*! ./../AbstractType */ "../common/src/Coding/AbstractType.js");
  
  const P_ENDIAN = Symbol('endian');
  const P_UNSIGNED = Symbol('unsigned');
  /**
   * Abstract integer field type.
   */
  
  class AbstractInt extends AbstractType {
    /**
     * Constructor
     *
     * @param {String} id
     * @param {Boolean} unsigned
     * @param {String} endian
     */
    constructor(id, unsigned, endian) {
      super(id);
      this[P_UNSIGNED] = unsigned;
      this[P_ENDIAN] = endian;
    }
    /**
     * Gets the endianness.
     *
     * @returns {String}
     */
  
  
    get endian() {
      return this[P_ENDIAN];
    }
    /**
     * Gets a value indicating whether the value is an unsigned integer.
     *
     * @returns {Boolean}
     */
  
  
    get unsigned() {
      return this[P_UNSIGNED];
    }
  
  }
  
  module.exports = AbstractInt;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/BytesFixedLength.js":
  /*!*****************************************************!*\
    !*** ../common/src/Coding/Core/BytesFixedLength.js ***!
    \*****************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AbstractType = __webpack_require__(/*! ./../AbstractType */ "../common/src/Coding/AbstractType.js");
  
  const BC = __webpack_require__(/*! ./../../BC */ "../common/src/BC.js");
  
  const P_SIZE = Symbol('size');
  /**
   * A field type to encode and decode bytes with a fixed length.
   */
  
  class BytesFixedLength extends AbstractType {
    /**
     * Constructor
     *
     * @param {String} id
     * @param {Number} length
     */
    constructor(id, length) {
      super(id || 'bytes_fixed_length_' + length);
      this.description('Bytes with a fixed length of ' + length);
      this[P_SIZE] = length;
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return this[P_SIZE];
    }
    /**
     * Returns the values of the given bc in the configured length.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {BC}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return BC.from(bc).slice(0, this[P_SIZE]);
    }
    /**
     * Encodes the given value to a collection of bytes.
     *
     * @param {Buffer|Uint8Array|BC|String} value
     * @returns {BC}
     */
  
  
    encodeToBytes(value) {
      value = BC.from(value);
      return value.slice(0, this[P_SIZE]);
    }
  
  }
  
  module.exports = BytesFixedLength;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/BytesWithLength.js":
  /*!****************************************************!*\
    !*** ../common/src/Coding/Core/BytesWithLength.js ***!
    \****************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AbstractType = __webpack_require__(/*! ./../AbstractType */ "../common/src/Coding/AbstractType.js");
  
  const Int8 = __webpack_require__(/*! ./Int8 */ "../common/src/Coding/Core/Int8.js");
  
  const Int16 = __webpack_require__(/*! ./Int16 */ "../common/src/Coding/Core/Int16.js");
  
  const Int32 = __webpack_require__(/*! ./Int32 */ "../common/src/Coding/Core/Int32.js");
  
  const BytesWithoutLength = __webpack_require__(/*! ./BytesWithoutLength */ "../common/src/Coding/Core/BytesWithoutLength.js");
  
  const Endian = __webpack_require__(/*! ./../../Endian */ "../common/src/Endian.js");
  
  const BC = __webpack_require__(/*! ./../../BC */ "../common/src/BC.js");
  
  const P_SIZE_ENCODED = Symbol('size_encoded');
  const P_LENGTH_FIELD = Symbol('length_field');
  const P_BYTES_FIELD = Symbol('bytes_field');
  const P_HAS_LEADING_ZB = Symbol('has_leading_zerobyte');
  /**
   * A field type to write dynamic content in form of bytes (prepends the length).
   */
  
  class BytesWithLength extends AbstractType {
    /**
     * Constructor
     *
     * @param {string} id
     * @param {Number} byteSize
     */
    constructor(id, byteSize = 1, lengthId = 'length', lengthDesc = null, endian = Endian.LITTLE_ENDIAN, hasLeadingZeroByte = false) {
      super(id || `bytes_with_length_${byteSize * 8}`);
      this.description('Bytes with variable size prepended');
      this[P_BYTES_FIELD] = new BytesWithoutLength('value');
      this[P_HAS_LEADING_ZB] = hasLeadingZeroByte;
  
      switch (byteSize) {
        case 1:
          this[P_LENGTH_FIELD] = new Int8(lengthId, true);
          break;
  
        case 2:
          this[P_LENGTH_FIELD] = new Int16(lengthId, true, endian);
          break;
  
        case 4:
          this[P_LENGTH_FIELD] = new Int32(lengthId, true, endian);
          break;
  
        default:
          throw new Error('ByteSize must be either 1, 2 or 4');
      }
  
      if (lengthDesc !== null) {
        this[P_LENGTH_FIELD].description(lengthDesc);
      }
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return this[P_SIZE_ENCODED];
    }
    /**
     * Decodes the string value from the given bytes
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {BC}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      this[P_SIZE_ENCODED] = this[P_LENGTH_FIELD].encodedSize + this[P_LENGTH_FIELD].decodeFromBytes(BC.from(bc)) + +this[P_HAS_LEADING_ZB];
      return this[P_BYTES_FIELD].decodeFromBytes(bc.slice(this[P_LENGTH_FIELD].encodedSize + +this[P_HAS_LEADING_ZB], this[P_SIZE_ENCODED]));
    }
    /**
     * Encodes the given value.
     *
     * @param {Buffer|Uint8Array|BC|String} value
     * @returns {BC}
     */
  
  
    encodeToBytes(value) {
      value = BC.from(value);
      this[P_SIZE_ENCODED] = value.length + this[P_LENGTH_FIELD].encodedSize;
      let bc = this[P_LENGTH_FIELD].encodeToBytes(this[P_SIZE_ENCODED] - this[P_LENGTH_FIELD].encodedSize);
      return bc.append(this[P_BYTES_FIELD].encodeToBytes(value));
    }
  
    get lengthField() {
      return this[P_LENGTH_FIELD];
    }
  
  }
  
  module.exports = BytesWithLength;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/BytesWithoutLength.js":
  /*!*******************************************************!*\
    !*** ../common/src/Coding/Core/BytesWithoutLength.js ***!
    \*******************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AbstractType = __webpack_require__(/*! ./../AbstractType */ "../common/src/Coding/AbstractType.js");
  
  const BC = __webpack_require__(/*! ./../../BC */ "../common/src/BC.js");
  
  const P_SIZE_ENCODED = Symbol('size_encoded');
  /**
   * A field type to write bytes without prepending the length. This cannot be decoded in some circumstances.
   */
  
  class BytesWithoutLength extends AbstractType {
    /**
     * Constructor
     *
     * @param {String} id
     */
    constructor(id = null) {
      super(id || 'bytes_without_length');
      this.description('Bytes without length prepended.');
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return this[P_SIZE_ENCODED];
    }
    /**
     * In fact this does nothing other than updating the internal size.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {BC}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      this[P_SIZE_ENCODED] = bc.length;
      return bc;
    }
    /**
     * Encodes the given value to a collection of bytes.
     *
     * @param {Buffer|Uint8Array|BC|String} value
     * @returns {BC}
     */
  
  
    encodeToBytes(value) {
      let encoded = BC.from(value);
      this[P_SIZE_ENCODED] = encoded.length;
      return encoded;
    }
  
  }
  
  module.exports = BytesWithoutLength;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/Int16.js":
  /*!******************************************!*\
    !*** ../common/src/Coding/Core/Int16.js ***!
    \******************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AbstractInt = __webpack_require__(/*! ./AbstractInt */ "../common/src/Coding/Core/AbstractInt.js");
  
  const BC = __webpack_require__(/*! ./../../BC */ "../common/src/BC.js");
  /**
   * Field type for a 16bit int value.
   */
  
  
  class Int16 extends AbstractInt {
    /**
     * Constructor.
     *
     * @param {String} id
     * @param {Boolean} unsigned
     * @param {String} endian
     */
    constructor(id, unsigned, endian) {
      super(id || 'int16', unsigned, endian);
      this.description('2byte 16bit int value');
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return 2;
    }
    /**
     * Decodes the int16 value from the given bytes.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {Number|*}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return BC.from(bc).readInt16(0, this.unsigned, this.endian);
    }
    /**
     * Encodes the given Int16 value to a byte sequence.
     *
     * @param {Number} value
     * @returns {BC}
     */
  
  
    encodeToBytes(value) {
      return BC.fromInt16(value, this.unsigned, this.endian);
    }
  
  }
  
  module.exports = Int16;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/Int32.js":
  /*!******************************************!*\
    !*** ../common/src/Coding/Core/Int32.js ***!
    \******************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AbstractInt = __webpack_require__(/*! ./AbstractInt */ "../common/src/Coding/Core/AbstractInt.js");
  
  const BC = __webpack_require__(/*! ./../../BC */ "../common/src/BC.js");
  /**
   * Field type for 32bit int values.
   */
  
  
  class Int32 extends AbstractInt {
    /**
     * Constructor
     *
     * @param {String} id
     * @param {Boolean} unsigned
     * @param {String} endian
     */
    constructor(id, unsigned, endian) {
      super(id || 'int32', unsigned, endian);
      this.description('4byte 32bit int value');
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return 4;
    }
    /**
     * Reads the given int32 value.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {Number|*}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return BC.from(bc).readInt32(0, this.unsigned, this.endian);
    }
    /**
     * Appends the given Int32 value.
     *
     * @param {Number} value
     * @returns {BC}
     */
  
  
    encodeToBytes(value) {
      return BC.fromInt32(value, this.unsigned, this.endian);
    }
  
  }
  
  module.exports = Int32;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/Int64.js":
  /*!******************************************!*\
    !*** ../common/src/Coding/Core/Int64.js ***!
    \******************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AbstractInt = __webpack_require__(/*! ./AbstractInt */ "../common/src/Coding/Core/AbstractInt.js");
  
  const BC = __webpack_require__(/*! ./../../BC */ "../common/src/BC.js");
  
  const Endian = __webpack_require__(/*! ./../../Endian */ "../common/src/Endian.js");
  
  const BN = __webpack_require__(/*! bn.js */ "../../node_modules/bn.js/lib/bn.js");
  
  function validate64Bit(isUnsigned, value) {
    if (isUnsigned) {
      if (value.isNeg()) {
        throw new Error('64bit value is negative. Only signed allowed.');
      } else if (value.gt(new BN('18446744073709551615'))) {
        throw new Error('Invalid unsigned 64 bit value.');
      }
    } else if (!isUnsigned) {
      if (value.gt(new BN('9223372036854775807')) || value.lt(new BN('-9223372036854775808'))) {
        throw new Error('Invalid signed 64 bit value.');
      }
    }
  
    return value;
  }
  /**
   * Field type for 64bit int values using BN.js.
   */
  
  
  class Int64 extends AbstractInt {
    /**
     * Constructor
     *
     * @param {String} id
     * @param {Boolean} unsigned
     * @param {String} endian
     */
    constructor(id, unsigned = true, endian = Endian.LITTLE_ENDIAN) {
      super(id || 'int64', unsigned, endian);
      this.description('8byte 64bit int value');
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return 8;
    }
    /**
     * Reads the pascal currency value from the given BC.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {BN}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      let value = new BN(BC.from(bc).slice(0, this.encodedSize).buffer, 10, this.endian.toLowerCase());
  
      if (!this.unsigned) {
        value = value.fromTwos(64);
      }
  
      return validate64Bit(this.unsigned, value);
    }
    /**
     * Appends the given currency value to the given BC.
     *
     * @param {BN} value
     */
  
  
    encodeToBytes(value) {
      value = validate64Bit(this.unsigned, value);
  
      if (!this.unsigned) {
        value = value.toTwos(64);
      }
  
      return BC.from(value.toBuffer(this.endian.toLowerCase(), this.encodedSize));
    }
  
  }
  
  module.exports = Int64;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/Int8.js":
  /*!*****************************************!*\
    !*** ../common/src/Coding/Core/Int8.js ***!
    \*****************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AbstractInt = __webpack_require__(/*! ./AbstractInt */ "../common/src/Coding/Core/AbstractInt.js");
  
  const Endian = __webpack_require__(/*! ./../../Endian */ "../common/src/Endian.js");
  
  const BC = __webpack_require__(/*! ./../../BC */ "../common/src/BC.js");
  /**
   * Fields type for an 8Bit int value.
   */
  
  
  class Int8 extends AbstractInt {
    /**
     * Constructor.
     *
     * @param {String} id
     * @param {Boolean} unsigned
     */
    constructor(id, unsigned) {
      super(id || 'int8', unsigned, Endian.LITTLE_ENDIAN);
      this.description('1byte 8bit int value');
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return 1;
    }
    /**
     * Reads the int8 value from the given bytes.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {Number|*}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return BC.from(bc).readInt8(0, this.unsigned);
    }
    /**
     * Encodes the given int8 value.
     *
     * @param {Number} value
     * @returns {BC}
     */
  
  
    encodeToBytes(value) {
      return BC.fromInt8(value, this.unsigned);
    }
  
  }
  
  module.exports = Int8;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/StringWithLength.js":
  /*!*****************************************************!*\
    !*** ../common/src/Coding/Core/StringWithLength.js ***!
    \*****************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const BC = __webpack_require__(/*! ./../../BC */ "../common/src/BC.js");
  
  const AbstractType = __webpack_require__(/*! ./../AbstractType */ "../common/src/Coding/AbstractType.js");
  
  const Int8 = __webpack_require__(/*! ./Int8 */ "../common/src/Coding/Core/Int8.js");
  
  const Int16 = __webpack_require__(/*! ./Int16 */ "../common/src/Coding/Core/Int16.js");
  
  const Int32 = __webpack_require__(/*! ./Int32 */ "../common/src/Coding/Core/Int32.js");
  
  const StringWithoutLength = __webpack_require__(/*! ./StringWithoutLength */ "../common/src/Coding/Core/StringWithoutLength.js");
  
  const Endian = __webpack_require__(/*! ./../../Endian */ "../common/src/Endian.js");
  
  const P_SIZE_ENCODED = Symbol('size_encoded');
  const P_HAS_LEADING_ZB = Symbol('has_leading_zerobyte');
  const P_LENGTH_FIELD = Symbol('length_field');
  const P_STRING_FIELD = Symbol('bytes_field');
  /**
   * A field type to write dynamic strings (prepends the length).
   */
  
  class StringWithLength extends AbstractType {
    constructor(id, byteSize = 1, lengthId = 'length', lengthDesc = null, endian = Endian.LITTLE_ENDIAN, hasLeadingZeroByte = false) {
      super(id || `bytes_size${byteSize * 8}`);
      this.description('String with size prepended');
      this[P_STRING_FIELD] = new StringWithoutLength('value');
      this[P_HAS_LEADING_ZB] = hasLeadingZeroByte;
  
      switch (byteSize) {
        case 1:
          this[P_LENGTH_FIELD] = new Int8(lengthId, true);
          break;
  
        case 2:
          this[P_LENGTH_FIELD] = new Int16(lengthId, true, endian);
          break;
  
        case 4:
          this[P_LENGTH_FIELD] = new Int32(lengthId, true, endian);
          break;
  
        default:
          throw new Error('ByteSize must be either 1, 2 or 4');
      }
  
      if (lengthDesc !== null) {
        this[P_LENGTH_FIELD].description(lengthDesc);
      }
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return this[P_SIZE_ENCODED];
    }
    /**
     * Decodes the string value from the given bytes
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {String}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      this[P_SIZE_ENCODED] = this[P_LENGTH_FIELD].encodedSize + this[P_LENGTH_FIELD].decodeFromBytes(BC.from(bc)) + +this[P_HAS_LEADING_ZB];
      return this[P_STRING_FIELD].decodeFromBytes(bc.slice(this[P_LENGTH_FIELD].encodedSize + +this[P_HAS_LEADING_ZB], this[P_SIZE_ENCODED]));
    }
    /**
     * Encodes the given value.
     *
     * @param {String} value
     * @returns {BC}
     */
  
  
    encodeToBytes(value) {
      this[P_SIZE_ENCODED] = value.length;
      let bc = this[P_LENGTH_FIELD].encodeToBytes(this[P_SIZE_ENCODED]);
  
      if (this[P_HAS_LEADING_ZB]) {
        bc = bc.append('00');
      }
  
      return bc.append(this[P_STRING_FIELD].encodeToBytes(value));
    }
  
  }
  
  module.exports = StringWithLength;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Core/StringWithoutLength.js":
  /*!********************************************************!*\
    !*** ../common/src/Coding/Core/StringWithoutLength.js ***!
    \********************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AbstractType = __webpack_require__(/*! ./../AbstractType */ "../common/src/Coding/AbstractType.js");
  
  const BC = __webpack_require__(/*! ./../../BC */ "../common/src/BC.js");
  
  const P_SIZE_ENCODED = Symbol('size_encoded');
  /**
   * A field type to write dynamic strings without prepending the length.
   */
  
  class StringWithoutLength extends AbstractType {
    /**
     * Constructor
     *
     * @param {String} id
     */
    constructor(id = null) {
      super(id || 'string_without_length');
      this.description('Single string value without length prepended.');
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return this[P_SIZE_ENCODED];
    }
    /**
     * Decodes the string value from the given bytes
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {String}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return BC.from(bc).toString();
    }
    /**
     * Encodes the given value.
     *
     * @param {String} value
     * @returns {BC}
     */
  
  
    encodeToBytes(value) {
      let encoded = BC.from(value, 'string');
      this[P_SIZE_ENCODED] = encoded.length;
      return encoded;
    }
  
  }
  
  module.exports = StringWithoutLength;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Decissive.js":
  /*!*****************************************!*\
    !*** ../common/src/Coding/Decissive.js ***!
    \*****************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const CompositeType = __webpack_require__(/*! ./CompositeType */ "../common/src/Coding/CompositeType.js");
  
  const P_SIZE_ENCODED = Symbol('size_encoded');
  const P_SUBTYPE_RESOLVER = Symbol('subtype_resolver');
  const P_MARKER_FIELD = Symbol('marker_field');
  /**
   * A Type that itself is made up of multiple other types. The types are selected dynamically
   * depending on the given resolver.
   */
  
  class Decissive extends CompositeType {
    /**
     * Constructor
     */
    constructor(id, markerField, subTypeResolver) {
      super(id || 'decissive');
      super.description('A type that itself has many sub types but only some are triggere based on a marker.');
      this[P_SUBTYPE_RESOLVER] = subTypeResolver;
      this[P_MARKER_FIELD] = markerField;
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return this[P_SIZE_ENCODED];
    }
    /**
     * Decodes the given bytes into an object.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @return {Object}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      let subType = this[P_SUBTYPE_RESOLVER](all[this[P_MARKER_FIELD]]);
      this[P_SIZE_ENCODED] = subType.encodedSize;
      return subType.decodeFromBytes(bc, options, all);
    }
    /**
     * Encodes the given object to a list of bytes.
     *
     * @param {Object|Array} objOrArray
     * @returns {BC}
     */
  
  
    encodeToBytes(objOrArray, all) {
      let subType = this[P_SUBTYPE_RESOLVER](all[this[P_MARKER_FIELD]]);
      let bc = subType.encodeToBytes(objOrArray);
      this[P_SIZE_ENCODED] = bc.length;
      return bc;
    }
  
  }
  
  module.exports = Decissive;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Pascal/AccountName.js":
  /*!**************************************************!*\
    !*** ../common/src/Coding/Pascal/AccountName.js ***!
    \**************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AccountNameType = __webpack_require__(/*! ./../../Types/AccountName */ "../common/src/Types/AccountName.js");
  
  const StringWithLength = __webpack_require__(/*! ../Core/StringWithLength */ "../common/src/Coding/Core/StringWithLength.js");
  /**
   * A pascal related type that can de/encode an account name.
   */
  
  
  class AccountName extends StringWithLength {
    /**
     * Constructor
     *
     * @param {String} id
     */
    constructor(id = null, byteSize = 2) {
      super(id || 'account_name', byteSize);
      this.description('An account name');
    }
    /**
     * Reads a value and returns a new PascalCoin AccountNumber instance.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {AccountNameType}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return new AccountNameType(super.decodeFromBytes(bc));
    }
    /**
     *
     * Appends the given pascalcoin account number to the BC.
     *
     * @param {AccountNameType} value
     */
  
  
    encodeToBytes(value) {
      return super.encodeToBytes(value.toString());
    }
  
  }
  
  module.exports = AccountName;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Pascal/AccountNumber.js":
  /*!****************************************************!*\
    !*** ../common/src/Coding/Pascal/AccountNumber.js ***!
    \****************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const AccountNumberType = __webpack_require__(/*! ./../../Types/AccountNumber */ "../common/src/Types/AccountNumber.js");
  
  const Endian = __webpack_require__(/*! ./../../Endian */ "../common/src/Endian.js");
  
  const Int32 = __webpack_require__(/*! ./../Core/Int32 */ "../common/src/Coding/Core/Int32.js");
  /**
   * A special Int32 type that can handle account number.
   */
  
  
  class AccountNumber extends Int32 {
    /**
     * Constructor
     *
     * @param {String} id
     */
    constructor(id = null) {
      super(id || 'account', true, Endian.LITTLE_ENDIAN);
      this.description('An account number');
    }
    /**
     * Reads a value and returns a new PascalCoin AccountNumber instance.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {AccountNumberType}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return new AccountNumberType(super.decodeFromBytes(bc));
    }
    /**
     *
     * Appends the given pascalcoin account number to the BC.
     *
     * @param {AccountNumberType} value
     * @return {BC}
     */
  
  
    encodeToBytes(value) {
      return super.encodeToBytes(value.account);
    }
  
  }
  
  module.exports = AccountNumber;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Pascal/Currency.js":
  /*!***********************************************!*\
    !*** ../common/src/Coding/Pascal/Currency.js ***!
    \***********************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Int64 = __webpack_require__(/*! ./../Core/Int64 */ "../common/src/Coding/Core/Int64.js");
  
  const CurrencyType = __webpack_require__(/*! ./../../Types/Currency */ "../common/src/Types/Currency.js");
  
  const Endian = __webpack_require__(/*! ./../../Endian */ "../common/src/Endian.js");
  /**
   * A special Int64 type that can handle pascalcoin currencies.
   */
  
  
  class Currency extends Int64 {
    /**
     * Constructor.
     *
     * @param {String} id
     */
    constructor(id = null, unsigned = true, endian = Endian.LITTLE_ENDIAN) {
      super(id || 'currency', unsigned, endian);
      this.description('A type for currency values.');
    }
    /**
     * Reads the pascal currency value from the given BC.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {CurrencyType}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return CurrencyType.fromMolina(super.decodeFromBytes(bc));
    }
    /**
     * Appends the given currency value to the given BC.
     *
     * @param {CurrencyType} value
     * @return {BC}
     */
  
  
    encodeToBytes(value) {
      return super.encodeToBytes(value.bn);
    }
  
  }
  
  module.exports = Currency;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Pascal/Keys/Curve.js":
  /*!*************************************************!*\
    !*** ../common/src/Coding/Pascal/Keys/Curve.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const CurveType = __webpack_require__(/*! ./../../../Types/Keys/Curve */ "../common/src/Types/Keys/Curve.js");
  
  const Endian = __webpack_require__(/*! ./../../../Endian */ "../common/src/Endian.js");
  
  const Int16 = __webpack_require__(/*! ./../../Core/Int16 */ "../common/src/Coding/Core/Int16.js");
  /**
   * A special pascal type that can en/decode a curve id.
   */
  
  
  class Curve extends Int16 {
    /**
     * Constructor.
     *
     * @param {String} id
     */
    constructor(id = null) {
      super(id || 'curve', true, Endian.LITTLE_ENDIAN);
      this.description('Key curve id');
    }
    /**
     * Reads the pascal currency value from the given BC.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {CurveType}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return new CurveType(super.decodeFromBytes(bc));
    }
    /**
     * Appends the given currency value to the given BC.
     *
     * @param {CurveType} value
     * @return {BC}
     */
  
  
    encodeToBytes(value) {
      return super.encodeToBytes(value.id);
    }
  
  }
  
  module.exports = Curve;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Pascal/Keys/PrivateKey.js":
  /*!******************************************************!*\
    !*** ../common/src/Coding/Pascal/Keys/PrivateKey.js ***!
    \******************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Curve = __webpack_require__(/*! ./Curve */ "../common/src/Coding/Pascal/Keys/Curve.js");
  
  const BytesWithLength = __webpack_require__(/*! ../../Core/BytesWithLength */ "../common/src/Coding/Core/BytesWithLength.js");
  
  const CompositeType = __webpack_require__(/*! ../../CompositeType */ "../common/src/Coding/CompositeType.js");
  
  const PrivateKeyType = __webpack_require__(/*! ./../../../../src/Types/Keys/PrivateKey */ "../common/src/Types/Keys/PrivateKey.js");
  /**
   * A coder for a private key.
   */
  
  
  class PrivateKey extends CompositeType {
    /**
     * Constructor.
     *
     * @param {String} id
     */
    constructor(id = null) {
      super(id || 'private_key');
      this.addSubType(new Curve('curve'));
      this.addSubType(new BytesWithLength('key', 2).description('The private key value.'));
    }
    /**
     * Reads a value and returns a new PascalCoin PublicKey instance.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {PrivateKeyType}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      const decoded = super.decodeFromBytes(bc);
      return new PrivateKeyType(decoded.key, decoded.curve);
    }
    /**
     * Reads a value and returns a new PascalCoin PublicKey instance.
     *
     * @param {PrivateKeyType} value
     * @returns {PrivateKeyType}
     */
  
  
    encodeToBytes(value) {
      return super.encodeToBytes(value);
    }
  
  }
  
  module.exports = PrivateKey;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Pascal/Keys/PublicKey.js":
  /*!*****************************************************!*\
    !*** ../common/src/Coding/Pascal/Keys/PublicKey.js ***!
    \*****************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Curve = __webpack_require__(/*! ./Curve */ "../common/src/Coding/Pascal/Keys/Curve.js");
  
  const BytesWithLength = __webpack_require__(/*! ../../Core/BytesWithLength */ "../common/src/Coding/Core/BytesWithLength.js");
  
  const BytesWithoutLength = __webpack_require__(/*! ../../Core/BytesWithoutLength */ "../common/src/Coding/Core/BytesWithoutLength.js");
  
  const CompositeType = __webpack_require__(/*! ../../CompositeType */ "../common/src/Coding/CompositeType.js");
  
  const BC = __webpack_require__(/*! ../../../BC */ "../common/src/BC.js");
  
  const Sha = __webpack_require__(/*! ../../../Sha */ "../common/src/Sha.js");
  
  const Base58 = __webpack_require__(/*! ../../../Base58 */ "../common/src/Base58.js");
  
  const PublicKeyType = __webpack_require__(/*! ./../../../../src/Types/Keys/PublicKey */ "../common/src/Types/Keys/PublicKey.js");
  /**
   * A Public Key value.
   */
  
  
  class PublicKey extends CompositeType {
    /**
     * Constructor.
     *
     * @param {String} id
     * @param {Boolean} omitXYLenghts
     */
    constructor(id = null, omitXYLenghts = false) {
      super(id || 'public_key');
      this.addSubType(new Curve('curve')); // oh come on..
  
      if (omitXYLenghts) {
        this.addSubType(new BytesWithoutLength('x').description('The X value of the public key.'));
        this.addSubType(new BytesWithoutLength('y'));
      } else {
        this.addSubType(new BytesWithLength('x', 2, 'x_length', 'Length of X value').description('The X value of the public key.'));
        this.addSubType(new BytesWithLength('y', 2, 'y_length', 'Length of Y value').description('The X value of the public key.'));
      }
    }
    /**
     * Reads a value and returns a new PascalCoin PublicKey instance.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {PublicKeyType}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      const decoded = super.decodeFromBytes(bc);
      return new PublicKeyType(decoded.x, decoded.y, decoded.curve);
    }
    /**
     * Gets the base58 representation of a public key.
     *
     * @returns {String}
     */
  
  
    encodeToBase58(publicKey) {
      const prefix = BC.fromHex('01');
      const encoded = this.encodeToBytes(publicKey);
      const aux = Sha.sha256(encoded);
      const suffix = aux.slice(0, 4);
      const raw = BC.concat(prefix, encoded, suffix);
      return Base58.encode(raw);
    }
    /**
     * Gets a public key instance from the given base58 string.
     *
     * @param {String} base58
     * @returns {PublicKey}
     */
  
  
    decodeFromBase58(base58) {
      const decoded = Base58.decode(base58);
      return this.decodeFromBytes(decoded.slice(1, -4));
    }
  
  }
  
  module.exports = PublicKey;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Pascal/NOperation.js":
  /*!*************************************************!*\
    !*** ../common/src/Coding/Pascal/NOperation.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Endian = __webpack_require__(/*! ./../../Endian */ "../common/src/Endian.js");
  
  const Int32 = __webpack_require__(/*! ./../Core/Int32 */ "../common/src/Coding/Core/Int32.js");
  /**
   * Simple wrapper for an unsigned Int32 value (used for the n_operation value)
   */
  
  
  class NOperation extends Int32 {
    /**
     * Constructor.
     *
     * @param {String} id
     */
    constructor(id = null) {
      super(id || 'nOperation', true, Endian.LITTLE_ENDIAN);
      this.description('Accounts n_operation value.');
    }
  
  }
  
  module.exports = NOperation;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Pascal/OpType.js":
  /*!*********************************************!*\
    !*** ../common/src/Coding/Pascal/OpType.js ***!
    \*********************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Endian = __webpack_require__(/*! ./../../Endian */ "../common/src/Endian.js");
  
  const AbstractType = __webpack_require__(/*! ./../AbstractType */ "../common/src/Coding/AbstractType.js");
  
  const Int8 = __webpack_require__(/*! ./../Core/Int8 */ "../common/src/Coding/Core/Int8.js");
  
  const Int16 = __webpack_require__(/*! ./../Core/Int16 */ "../common/src/Coding/Core/Int16.js");
  
  const Int32 = __webpack_require__(/*! ./../Core/Int32 */ "../common/src/Coding/Core/Int32.js");
  
  const P_INT_TYPE = Symbol('int_type');
  /**
   * A special Int32 type that can handle account number.
   */
  
  class OpType extends AbstractType {
    /**
     * Constructor
     *
     * @param {Number} byteSize
     */
    constructor(id, byteSize) {
      super(id || `optype_int${byteSize * 8}`);
  
      switch (byteSize) {
        case 1:
          this[P_INT_TYPE] = new Int8('OpType[Int8]', true);
          break;
  
        case 2:
          this[P_INT_TYPE] = new Int16('OpType[Int16]', true, Endian.LITTLE_ENDIAN);
          break;
  
        case 4:
          this[P_INT_TYPE] = new Int32('OpType[Int32]', true, Endian.LITTLE_ENDIAN);
          break;
  
        default:
          throw Error('Invalid byte size.');
      }
  
      this.description(`Operation type in ${byteSize * 8} bits`);
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return this[P_INT_TYPE].encodedSize;
    }
    /**
     * Decodes and returns the optype.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @return {Number}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      return this[P_INT_TYPE].decodeFromBytes(bc);
    }
    /**
     * Encodes the given optype to bytes.
     *
     * @param {Number} value
     * @return {*}
     */
  
  
    encodeToBytes(value) {
      return this[P_INT_TYPE].encodeToBytes(value);
    }
  
    get intType() {
      return this[P_INT_TYPE];
    }
  
  }
  
  module.exports = OpType;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Pascal/OperationHash.js":
  /*!****************************************************!*\
    !*** ../common/src/Coding/Pascal/OperationHash.js ***!
    \****************************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Endian = __webpack_require__(/*! ./../../Endian */ "../common/src/Endian.js");
  
  const CompositeType = __webpack_require__(/*! ./../CompositeType */ "../common/src/Coding/CompositeType.js");
  
  const Int32 = __webpack_require__(/*! ./../Core/Int32 */ "../common/src/Coding/Core/Int32.js");
  
  const AccountNumber = __webpack_require__(/*! ./AccountNumber */ "../common/src/Coding/Pascal/AccountNumber.js");
  
  const BytesWithFixedLength = __webpack_require__(/*! ./../Core/BytesFixedLength */ "../common/src/Coding/Core/BytesFixedLength.js");
  
  const NOperation = __webpack_require__(/*! ./NOperation */ "../common/src/Coding/Pascal/NOperation.js");
  
  const OperationHashType = __webpack_require__(/*! ./../../Types/OperationHash */ "../common/src/Types/OperationHash.js");
  /**
   * Simple wrapper for an unsigned Int32 value (used for the n_operation value)
   */
  
  
  class OperationHash extends CompositeType {
    /**
     * Constructor.
     *
     * @param {String} id
     */
    constructor(id = null) {
      super(id || 'ophash');
      this.description('A pascalCoin operation hash');
      this.addSubType(new Int32('block', true, Endian.LITTLE_ENDIAN).description('The block the operation is in.'));
      this.addSubType(new AccountNumber('account').description('The account number that signed the operation.'));
      this.addSubType(new NOperation('nOperation', 4).description('The n_operation value of the account with the current operation.'));
      this.addSubType(new BytesWithFixedLength('md160', 20).description('The RIPEMD160 hash of the operation data.'));
    }
    /**
     * Reads a value and returns a new PascalCoin AccountNumber instance.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @returns {OperationHash}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      const decoded = super.decodeFromBytes(bc);
      return new OperationHashType(decoded.block, decoded.account, decoded.nOperation, decoded.md160);
    }
    /**
     * Appends the given pascalcoin account number to the BC.
     *
     * @param {OperationHash} value
     * @return {BC}
     */
  
  
    encodeToBytes(value) {
      return super.encodeToBytes(value);
    }
  
  }
  
  module.exports = OperationHash;
  
  /***/ }),
  
  /***/ "../common/src/Coding/Repeating.js":
  /*!*****************************************!*\
    !*** ../common/src/Coding/Repeating.js ***!
    \*****************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const BC = __webpack_require__(/*! ./../BC */ "../common/src/BC.js");
  
  const AbstractType = __webpack_require__(/*! ./AbstractType */ "../common/src/Coding/AbstractType.js");
  
  const P_SIZE_ENCODED = Symbol('size_encoded');
  const P_REPEAT_LIMIT = Symbol('repeat_limit');
  const P_REPEAT_MARKER = Symbol('repeat_marker');
  const P_TYPE = Symbol('type');
  /**
   * A Type that itself is made up of multiple other types.
   */
  
  class Repeating extends AbstractType {
    /**
     * Constructor
     */
    constructor(id, type, repeatLimit = -1, repeatMarker = null) {
      super(id || 'repeating');
      super.description('A type that itself has one repeating type that will ' + 'be written / read until the limit is reached or data is empty.');
      this[P_TYPE] = type;
      this[P_REPEAT_LIMIT] = repeatLimit;
      this[P_REPEAT_MARKER] = repeatMarker;
    }
    /**
     * @inheritDoc AbstractType#encodedSize
     */
  
  
    get encodedSize() {
      return this[P_SIZE_ENCODED];
    }
    /**
     * Decodes the given bytes into an object.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @return {Object}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      let result = [];
      let offset = 0;
      bc = BC.from(bc);
      let limit = this[P_REPEAT_MARKER] !== null ? all[this[P_REPEAT_MARKER]] : this[P_REPEAT_LIMIT];
      let counter = limit;
  
      while (limit > -1 && counter > 0 || limit === -1 && bc.length > offset) {
        const decoded = this[P_TYPE].decodeFromBytes(bc.slice(offset));
        result.push(decoded);
        offset += this[P_TYPE].encodedSize;
        counter--;
      }
  
      this[P_SIZE_ENCODED] = offset;
      return result;
    }
    /**
     * Encodes the given object to a list of bytes.
     *
     * @param {Object|Array} objOrArray
     * @returns {BC}
     */
  
  
    encodeToBytes(arr) {
      let bc = BC.empty();
      arr.forEach((item, idx) => {
        if (idx >= this[P_REPEAT_LIMIT] && this[P_REPEAT_LIMIT] > -1) {
          return;
        }
  
        bc = bc.append(this[P_TYPE].encodeToBytes(item));
      });
      this[P_SIZE_ENCODED] = bc.length;
      return bc;
    }
  
    get repeatingType() {
      return this[P_TYPE];
    }
  
  }
  
  module.exports = Repeating;
  
  /***/ }),
  
  /***/ "../common/src/Coding/index.js":
  /*!*************************************!*\
    !*** ../common/src/Coding/index.js ***!
    \*************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  module.exports = {
    AbstractType: __webpack_require__(/*! ./AbstractType */ "../common/src/Coding/AbstractType.js"),
    CompositeType: __webpack_require__(/*! ./CompositeType */ "../common/src/Coding/CompositeType.js"),
    Repeating: __webpack_require__(/*! ./Repeating */ "../common/src/Coding/Repeating.js"),
    Decissive: __webpack_require__(/*! ./Decissive */ "../common/src/Coding/Decissive.js"),
    Core: {
      AbstractInt: __webpack_require__(/*! ./Core/AbstractInt */ "../common/src/Coding/Core/AbstractInt.js"),
      Int8: __webpack_require__(/*! ./Core/Int8 */ "../common/src/Coding/Core/Int8.js"),
      Int16: __webpack_require__(/*! ./Core/Int16 */ "../common/src/Coding/Core/Int16.js"),
      Int32: __webpack_require__(/*! ./Core/Int32 */ "../common/src/Coding/Core/Int32.js"),
      Int64: __webpack_require__(/*! ./Core/Int64 */ "../common/src/Coding/Core/Int64.js"),
      StringWithLength: __webpack_require__(/*! ./Core/StringWithLength */ "../common/src/Coding/Core/StringWithLength.js"),
      StringWithoutLength: __webpack_require__(/*! ./Core/StringWithoutLength */ "../common/src/Coding/Core/StringWithoutLength.js"),
      BytesWithLength: __webpack_require__(/*! ./Core/BytesWithLength */ "../common/src/Coding/Core/BytesWithLength.js"),
      BytesWithoutLength: __webpack_require__(/*! ./Core/BytesWithoutLength */ "../common/src/Coding/Core/BytesWithoutLength.js"),
      BytesFixedLength: __webpack_require__(/*! ./Core/BytesFixedLength */ "../common/src/Coding/Core/BytesFixedLength.js")
    },
    Pascal: {
      Keys: {
        Curve: __webpack_require__(/*! ./Pascal/Keys/Curve */ "../common/src/Coding/Pascal/Keys/Curve.js"),
        PublicKey: __webpack_require__(/*! ./Pascal/Keys/PublicKey */ "../common/src/Coding/Pascal/Keys/PublicKey.js"),
        PrivateKey: __webpack_require__(/*! ./Pascal/Keys/PrivateKey */ "../common/src/Coding/Pascal/Keys/PrivateKey.js")
      },
      AccountNumber: __webpack_require__(/*! ./Pascal/AccountNumber */ "../common/src/Coding/Pascal/AccountNumber.js"),
      AccountName: __webpack_require__(/*! ./Pascal/AccountName */ "../common/src/Coding/Pascal/AccountName.js"),
      Currency: __webpack_require__(/*! ./Pascal/Currency */ "../common/src/Coding/Pascal/Currency.js"),
      NOperation: __webpack_require__(/*! ./Pascal/NOperation */ "../common/src/Coding/Pascal/NOperation.js"),
      OpType: __webpack_require__(/*! ./Pascal/OpType */ "../common/src/Coding/Pascal/OpType.js"),
      OperationHash: __webpack_require__(/*! ./Pascal/OperationHash */ "../common/src/Coding/Pascal/OperationHash.js")
    }
  };
  
  /***/ }),
  
  /***/ "../common/src/Endian.js":
  /*!*******************************!*\
    !*** ../common/src/Endian.js ***!
    \*******************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  let detected = null;
  
  class Endian {
    /**
     * Gets the identifier for big endian.
     *
     * @returns {string}
     * @constructor
     */
    static get BIG_ENDIAN() {
      return 'BE';
    }
    /**
     * Gets the identifier for big endian.
     *
     * @returns {string}
     * @constructor
     */
  
  
    static get LITTLE_ENDIAN() {
      return 'LE';
    }
    /**
     * Detects the systems endianness.
     *
     * @returns {string}
     */
  
  
    static detect() {
      if (detected === null) {
        const b = new ArrayBuffer(4);
        const a = new Uint32Array(b);
        const c = new Uint8Array(b);
        a[0] = 0xdeadbeef;
  
        if (c[0] === 0xef) {
          detected = Endian.LITTLE_ENDIAN;
        }
  
        if (c[0] === 0xde) {
          detected = Endian.BIG_ENDIAN;
        }
      }
  
      return detected;
    }
    /**
     * Gets a value indicating whether the system uses little endian.
     *
     * @returns {boolean}
     */
  
  
    static isLittleEndian() {
      return Endian.detect() === Endian.LITTLE_ENDIAN;
    }
    /**
     * Gets a value indicating whether the system uses big endian.
     *
     * @returns {boolean}
     */
  
  
    static isBigEndian() {
      return Endian.detect() === Endian.BIG_ENDIAN;
    }
  
  }
  
  module.exports = Endian;
  
  /***/ }),
  
  /***/ "../common/src/PascalCoinInfo.js":
  /*!***************************************!*\
    !*** ../common/src/PascalCoinInfo.js ***!
    \***************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Currency = __webpack_require__(/*! ./Types/Currency */ "../common/src/Types/Currency.js");
  /**
   * Gets information about forks and features.
   */
  
  
  class PascalCoinInfo {
    /**
     * Gets the min fee.
     *
     * @param {Number|null} block
     * @returns {Currency}
     * @constructor
     */
    static MIN_FEE(block = null) {
      return Currency.fromMolina(1);
    }
    /**
     * Gets the block number when 50% inflation reduction was introduced.
     *
     * @returns {Number}
     * @constructor
     */
  
  
    static get PIP_0010() {
      return 210240;
    }
    /**
     * Gets the block number when PIP-10 was activated.
     *
     * @returns {Number}
     * @constructor
     */
  
  
    static get INFLATION_REDUCTION() {
      return PascalCoinInfo.PIP_0010;
    }
    /**
     * Gets a value indicating whether the given block has inflation reduction
     * activated (PIP-10).
     *
     * @param {number} block
     * @returns {boolean}
     */
  
  
    static isInflationReduction(block) {
      return block >= PascalCoinInfo.INFLATION_REDUCTION;
    }
    /**
     * Gets the block number when RandomHash was activated.
     *
     * @returns {Number}
     * @constructor
     */
  
  
    static get PIP_0009() {
      return 260000;
    }
    /**
     * Gets the block number when RandomHash was activated.
     *
     * @returns {Number}
     * @constructor
     */
  
  
    static get RANDOM_HASH() {
      return PascalCoinInfo.PIP_0009;
    }
    /**
     * Gets a value indicating if randomhash was active at the given block.
     *
     * @param {Number} block
     * @returns {boolean}
     */
  
  
    static isRandomHash(block) {
      return block >= PascalCoinInfo.RANDOM_HASH;
    }
    /**
     * Gets the block number when developer reward was introduced.
     *
     * @returns {Number}
     * @constructor
     */
  
  
    static get PIP_0011() {
      return 210000;
    }
    /**
     * Gets the block number when developer reward was introduced.
     *
     * @returns {Number}
     * @constructor
     */
  
  
    static get DEVELOPER_REWARD() {
      return PascalCoinInfo.PIP_0011;
    }
    /**
     * Gets a value indicating whether the given block was mined with activated
     * developer award.
     *
     * @param {number} block
     * @returns {boolean}
     */
  
  
    static isDeveloperReward(block) {
      return block >= PascalCoinInfo.DEVELOPER_REWARD;
    }
    /**
     * Gets the max payload length in bytes.
     *
     * @return {number}
     * @constructor
     */
  
  
    static get MAX_PAYLOAD_LENGTH() {
      return 255;
    }
  
  }
  
  module.exports = PascalCoinInfo;
  
  /***/ }),
  
  /***/ "../common/src/Sha.js":
  /*!****************************!*\
    !*** ../common/src/Sha.js ***!
    \****************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  /* WEBPACK VAR INJECTION */(function(Buffer) {/**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  
  
  const sha256 = __webpack_require__(/*! mipher/dist/sha256 */ "../../node_modules/mipher/dist/sha256.js");
  
  const sha512 = __webpack_require__(/*! mipher/dist/sha512 */ "../../node_modules/mipher/dist/sha512.js");
  
  const BC = __webpack_require__(/*! ./BC */ "../common/src/BC.js");
  /**
   * Holds methods to hash.
   */
  
  
  class Sha {
    /**
     * Calculates the sha256 hash from the given buffers.
     *
     * @param {...BC} buffers
     * @returns {BC}
     */
    static sha256(...buffers) {
      const hasher = new sha256.SHA256();
      buffers.forEach(buffer => hasher.update(buffer.buffer));
      return new BC(Buffer.from(hasher.digest()));
    }
    /**
     * Calculates the sha512 hash from the given buffers.
     *
     * @param {...BC} buffers
     * @returns {Buffer}
     */
  
  
    static sha512(...buffers) {
      const hasher = new sha512.SHA512();
      buffers.forEach(buffer => hasher.update(buffer.buffer));
      return new BC(Buffer.from(hasher.digest()));
    }
  
  }
  
  module.exports = Sha;
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ "../../node_modules/buffer/index.js").Buffer))
  
  /***/ }),
  
  /***/ "../common/src/Types/AccountName.js":
  /*!******************************************!*\
    !*** ../common/src/Types/AccountName.js ***!
    \******************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Util = __webpack_require__(/*! ../Util */ "../common/src/Util.js");
  
  const P_VALUE = Symbol('value'); // the list of characters to escape.
  
  const CHARS_TO_ESCAPE = '(){}[]:"<>'.split('');
  const REGEX_TO_ESCAPE = `(${CHARS_TO_ESCAPE.map(c => Util.escapeRegex(c)).join('|')})`;
  const ALLOWED_ALL = '0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()-+{}[]_:"|<>,.?/~'.split('');
  const ALLOWED_START = ALLOWED_ALL.slice(10);
  /**
   * AccountName encoding for account names.
   */
  
  class AccountName {
    /**
     * Constructor
     * @param {String|AccountName} value
     */
    constructor(value) {
      if (value instanceof AccountName) {
        this[P_VALUE] = value.toString();
      } else {
        this[P_VALUE] = AccountName.validate(value);
      }
    }
    /**
     * Validates a string.
     *
     * @param {String} value
     * @return {String}
       */
  
  
    static validate(value) {
      if (value.length === 0) {
        return value;
      }
  
      if (value.length < 3) {
        throw new Error('Invalid account name, must be at least 3 characters long.');
      }
  
      for (let pos = 0; pos < value.length; pos++) {
        if (pos === 0 && ALLOWED_START.indexOf(value[pos]) === -1) {
          throw new Error(`Invalid AccountName encoding - character ${value[pos]} not allowed at position 0`);
        } else if (pos > 0 && ALLOWED_ALL.indexOf(value[pos]) === -1) {
          throw new Error(`Invalid AccountName encoding - character ${value[pos]} not allowed at position ${pos}`);
        }
      }
  
      return value;
    }
    /**
     * Gets the string value.
     *
     * @returns {String}
     */
  
  
    toString() {
      return this[P_VALUE];
    }
    /**
     * Gets an escaped string representation for EPasa usage.
     *
     * @returns {*}
     */
  
  
    toStringEscaped() {
      return this[P_VALUE].replace(new RegExp(REGEX_TO_ESCAPE, 'gm'), '\\$1');
    }
    /**
     * Gets a value indicating whether the current char c1 is an escape modifier
     * and the second is in the list of chars to escape.
     *
     * @param {String} c1
     * @param {String} c2
     * @returns {boolean}
     */
  
  
    static isEscape(c1, c2) {
      return c1 === '\\' && CHARS_TO_ESCAPE.indexOf(c2) > -1;
    }
  
  }
  
  module.exports = AccountName;
  
  /***/ }),
  
  /***/ "../common/src/Types/AccountNumber.js":
  /*!********************************************!*\
    !*** ../common/src/Types/AccountNumber.js ***!
    \********************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const PascalCoinInfo = __webpack_require__(/*! ../PascalCoinInfo */ "../common/src/PascalCoinInfo.js");
  
  const P_ACCOUNT = Symbol('account');
  const P_CHECKSUM = Symbol('checksum');
  const P_CREATED_IN_BLOCK = Symbol('created_in_block');
  const P_IS_FOUNDATION_REWARD = Symbol('is_foundation_reward');
  /**
   * A simple type that holds an account number in a reliable way.
   */
  
  class AccountNumber {
    /**
     * Creates a new AccountNumber instance, either from an account string
     * without checksum (which can be a number), an account string with checksum
     * or another account instance.
     *
     * @param {String|Number|AccountNumber|Account} account
     */
    constructor(account) {
      if (account instanceof AccountNumber) {
        this[P_ACCOUNT] = account[P_ACCOUNT];
        this[P_CHECKSUM] = account[P_CHECKSUM];
      } else if (typeof account === 'string') {
        const splitted = account.split('-');
        splitted.map(s => {
          if (isNaN(s) || parseInt(s, 10).toString() !== s) {
            throw new Error(`Invalid account number part: ${s}`);
          }
        });
  
        if (splitted.length === 2) {
          this[P_ACCOUNT] = parseInt(splitted[0], 10);
          this[P_CHECKSUM] = parseInt(splitted[1], 10);
  
          if (this[P_CHECKSUM] !== AccountNumber.calculateChecksum(this[P_ACCOUNT])) {
            throw new Error(`Invalid checksum for account ${this[P_ACCOUNT]}`);
          }
        } else {
          this[P_ACCOUNT] = parseInt(account, 10);
          this[P_CHECKSUM] = AccountNumber.calculateChecksum(this[P_ACCOUNT]);
        }
      } else if (typeof account === 'number') {
        this[P_ACCOUNT] = account;
        this[P_CHECKSUM] = AccountNumber.calculateChecksum(this[P_ACCOUNT]);
      } else {
        throw new Error(`Unable to parse Account: ${account.toString()}`);
      }
  
      this[P_CREATED_IN_BLOCK] = Math.floor(this[P_ACCOUNT] / 5);
      this[P_IS_FOUNDATION_REWARD] = PascalCoinInfo.isDeveloperReward(this[P_CREATED_IN_BLOCK]) && this[P_ACCOUNT] % 5 === 4;
    }
    /**
     * Gets the account number.
     *
     * @returns {Number}
     */
  
  
    get account() {
      return this[P_ACCOUNT];
    }
    /**
     * Gets the checksum of the account.
     *
     * @returns {Number}
     */
  
  
    get checksum() {
      return this[P_CHECKSUM];
    }
    /**
     * Gets the block number the account was created in.
     *
     * @returns {Number}
     */
  
  
    get createdInBlock() {
      return this[P_CREATED_IN_BLOCK];
    }
    /**
     * Gets a value indicating whether the foundation got this account initially.
     *
     * @returns {Boolean}
     */
  
  
    get isFoundationReward() {
      return this[P_IS_FOUNDATION_REWARD];
    }
    /**
     * Gets the account string.
     *
     * @returns {string}
     */
  
  
    toString() {
      return `${this.account}-${this.checksum}`;
    }
    /**
     * Gets a value indicating whether the given account equals the current
     * account.
     *
     * @param {AccountNumber|String|Number} accountNumber
     * @returns {boolean}
     */
  
  
    equals(accountNumber) {
      return accountNumber !== null && this.toString() === accountNumber.toString();
    }
    /**
     * Calculates the checksum for the given account number.
     *
     * @param {Number} account
     * @returns {Number}
     */
  
  
    static calculateChecksum(account) {
      return account * 101 % 89 + 10;
    }
  
  }
  
  module.exports = AccountNumber;
  
  /***/ }),
  
  /***/ "../common/src/Types/Currency.js":
  /*!***************************************!*\
    !*** ../common/src/Types/Currency.js ***!
    \***************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const BN = __webpack_require__(/*! bn.js */ "../../node_modules/bn.js/lib/bn.js");
  
  const P_VALUE = Symbol('value');
  
  function toFixed(x) {
    let base = new BN(10).pow(new BN(4));
    let dm = x.divmod(base);
    let mod = dm.mod.toString(10, 4);
    let m = dm.div.toString();
    let isNegative = false;
  
    if (x.toString().substr(0, 1) === '-') {
      if (m.substr(0, 1) === '-') {
        m = m.substr(1);
      }
  
      if (mod.substr(0, 1) === '-') {
        mod = mod.substr(1);
      }
  
      isNegative = true;
    }
  
    return `${isNegative ? '-' : ''}${m}.${mod}`;
  }
  /**
   * A simple wrapper around bignumber for the pascal currency and
   * basic math functions.
   */
  
  
  class Currency {
    /**
       * Creates a new Currency instance.
       *
       * @param {Number|String|BigNumber|Currency} value
       */
    constructor(value) {
      let pasc = value;
  
      if (pasc instanceof Currency) {
        this[P_VALUE] = pasc.value;
        return;
      }
  
      if (BN.isBN(pasc)) {
        this[P_VALUE] = pasc;
        return;
      }
  
      pasc = pasc.toString();
      pasc = pasc.split(',').join(''); // remove commas
      // now split the '.'
  
      const ten = new BN(10);
      const base = ten.pow(new BN(4)); // Is it negative?
  
      let negative = pasc.substring(0, 1) === '-';
  
      if (negative) {
        pasc = pasc.substring(1);
      }
  
      if (pasc === '.') {
        throw new Error(`Invalid value ${pasc} cannot be converted to` + ' base unit with 4 decimals.');
      } // Split it into a whole and fractional part
  
  
      let comps = pasc.split('.');
  
      if (comps.length > 2) {
        throw new Error('Too many decimal points');
      }
  
      let whole = comps[0],
          fraction = comps[1];
  
      if (!whole) {
        whole = '0';
      }
  
      if (!fraction) {
        fraction = '0';
      }
  
      if (fraction.length > 4) {
        throw new Error('Too many decimal places');
      }
  
      while (fraction.length < 4) {
        fraction += '0';
      }
  
      whole = new BN(whole);
      fraction = new BN(fraction);
      let molina = whole.mul(base).add(fraction);
  
      if (negative) {
        molina = molina.neg();
      }
  
      this[P_VALUE] = new BN(molina.toString(10), 10);
    }
  
    static fromMolina(molina) {
      return new Currency(new BN(molina.toString()));
    }
    /**
       * Gets the BigNumber instance.
       *
       * @returns {BigNumber}
       */
  
  
    get value() {
      return this[P_VALUE];
    }
    /**
       * Gets the pascal value as a string.
       *
       * @returns {string}
       */
  
  
    toString() {
      return toFixed(this[P_VALUE]);
    }
    /**
     * Gets a value indicating that the current value has more decimals than
     * allowed.
     */
  
  
    isVague() {
      return this.toStringOpt(5) !== this.toStringOpt(4);
    }
    /**
     * Gets an optimized pascal value with less zeros as possible.
     *
     * @returns {string}
     */
  
  
    toStringOpt(decimals = 4) {
      return toFixed(this[P_VALUE]).replace(new RegExp('[0]+$'), '').replace(new RegExp('[\.]+$'), '');
    }
    /**
       * Gets the pascal value as a string.
       *
       * @returns {Number}
       */
  
  
    toMolina() {
      return this[P_VALUE].toString();
    }
    /**
     * Adds the given value to the current value and returns a **new**
     * value.
     *
     * @param {Number|String|BigNumber|Currency} addValue
     * @returns {Currency}
     */
  
  
    add(addValue) {
      return new Currency(this.value.add(new Currency(addValue).value));
    }
    /**
     * Adds the given value to the current value and returns a **new**
     * value.
     *
     * @param {Number|String|BigNumber|Currency} addValue
     * @returns {Currency}
     */
  
  
    mul(val) {
      return Currency.fromMolina(this.value.mul(new BN(val)));
    }
    /**
       * Subtracts the given value from the current value and returns a
       * **new** value.
       *
       * @param {Currency} subValue
       * @returns {Currency}
       */
  
  
    sub(subValue) {
      return new Currency(this.value.sub(new Currency(subValue).value));
    }
    /**
       * Gets a positive variant of the value. If the value is already
       * positive, the current instance will be returned, else a new
       * instance.
       *
       * @returns {Currency}
       */
  
  
    toPositive() {
      if (this[P_VALUE].isNeg() === true) {
        return new Currency(this[P_VALUE].neg());
      }
  
      return this;
    }
    /**
     * Gets a value indicating whether the given value is equal to the current
     * value.
     *
     * @param {Number|String|BigNumber|Currency} value
     * @returns {boolean}
     */
  
  
    eq(value) {
      return this[P_VALUE].eq(new Currency(value).value);
    }
    /**
     * Gets a value indicating whether the given value is greater than the current
     * value.
     *
     * @param {Number|String|BigNumber|Currency} value
     * @returns {boolean}
     */
  
  
    gt(value) {
      return this[P_VALUE].gt(new Currency(value).value);
    }
    /**
     * Gets a value indicating whether the given value is lower than the current
     * value.
     *
     * @param {Number|String|BigNumber|Currency} value
     * @returns {boolean}
     */
  
  
    lt(value) {
      return this[P_VALUE].lt(new Currency(value).value);
    }
    /**
     * Gets a value indicating whether the given value is lower or equal to the
     * current value.
     *
     * @param {Number|String|BigNumber|Currency} value
     * @returns {boolean}
     */
  
  
    lteq(value) {
      return this[P_VALUE].lte(new Currency(value).value);
    }
    /**
     * Gets a value indicating whether the given value is greater or equal to the
     * current value.
     *
     * @param {Number|String|BigNumber|Currency} value
     * @returns {boolean}
     */
  
  
    gteq(value) {
      return this[P_VALUE].gte(new Currency(value).value);
    }
  
    get bn() {
      return this[P_VALUE];
    }
    /**
       * Gets the serialized version of this instance.
       *
       * @returns {Object}
       */
  
  
    serialize() {
      return {
        pascal: this.toStringOpt(),
        molina: this.toMolina()
      };
    }
  
  }
  
  module.exports = Currency;
  
  /***/ }),
  
  /***/ "../common/src/Types/Keys/Curve.js":
  /*!*****************************************!*\
    !*** ../common/src/Types/Keys/Curve.js ***!
    \*****************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  
  /**
   * The list of available curves in pascalcoin.
   */
  const CURVES = {
    0: 'empty',
    714: 'secp256k1',
    715: 'p384',
    729: 'sect283k1',
    716: 'p521'
  };
  const XYL_PUBKEYS = {
    714: {
      x: 32,
      y: 32
    },
    715: {
      x: 48,
      y: 48
    },
    716: {
      x: 66,
      y: 66
    },
    729: {
      x: 36,
      y: 36
    },
    0: {
      x: 0,
      y: 0
    }
  };
  const L_PRIVKEYS = {
    714: 32,
    715: 48,
    716: 66,
    729: 36
  };
  const ID = Symbol('id');
  const NAME = Symbol('name');
  /**
   * Simple elliptic curve representation of keys in pascalcoin.
   */
  
  class Curve {
    /**
     * Gets the curve name of the secp256k1 curve.
     *
     * @returns {string}
     * @constructor
     */
    static get CN_SECP256K1() {
      return 'secp256k1';
    }
    /**
     * Gets the curve name of the p384 curve.
     *
     * @returns {string}
     * @constructor
     */
  
  
    static get CN_P384() {
      return 'p384';
    }
    /**
     * Gets the curve name of the sect283k1 curve.
     *
     * @returns {string}
     * @constructor
     */
  
  
    static get CN_SECT283K1() {
      return 'sect283k1';
    }
    /**
     * Gets the curve name of the p521 curve.
     *
     * @returns {string}
     * @constructor
     */
  
  
    static get CN_P521() {
      return 'p521';
    }
    /**
     * Gets the curve id of the secp256k1 curve.
     *
     * @returns {string}
     * @constructor
     */
  
  
    static get CI_SECP256K1() {
      return 714;
    }
    /**
     * Gets the curve id of the p384 curve.
     *
     * @returns {string}
     * @constructor
     */
  
  
    static get CI_P384() {
      return 715;
    }
    /**
     * Gets the curve id of the sect283k1 curve.
     *
     * @returns {string}
     * @constructor
     */
  
  
    static get CI_SECT283K1() {
      return 729;
    }
    /**
     * Gets the curve id of the p521 curve.
     *
     * @returns {Number}
     * @constructor
     */
  
  
    static get CI_P521() {
      return 716;
    }
    /**
     * Constructor
     *
     * @param {Number|String} curve
     */
  
  
    constructor(curve) {
      if (typeof curve === 'number') {
        if (CURVES[curve] === undefined) {
          throw new Error(`Unknown curve: ${curve}`);
        }
  
        this[ID] = curve;
        this[NAME] = CURVES[curve];
      } else {
        if (Object.values(CURVES).indexOf(curve.toString()) === -1) {
          throw new Error(`Unknown curve: ${curve}`);
        }
  
        this[NAME] = curve.toString();
        this[ID] = parseInt(Object.keys(CURVES)[Object.values(CURVES).indexOf(this[NAME])], 10);
      }
    }
    /**
       * Gets the id of the curve.
       *
       * @returns {Number}
       */
  
  
    get id() {
      return this[ID];
    }
    /**
       * Gets the name of the curve.
       *
       * @returns {String}
       */
  
  
    get name() {
      return this[NAME];
    }
    /**
       * Gets the name of the curve.
       *
       * @returns {String}
       */
  
  
    toString() {
      return this.name;
    }
    /**
       * Gets the default curve.
       *
       * @returns {Curve}
       */
  
  
    static getDefaultCurve() {
      return new Curve(Curve.CI_SECP256K1);
    }
    /**
     * Gets the length of either x and y for validation.
     *
     * @returns {array}
     */
  
  
    xylPublicKey(xOrY) {
      return XYL_PUBKEYS[this.id][xOrY];
    }
    /**
     * Gets the length of either x and y for validation.
     *
     * @returns {array}
     */
  
  
    lPrivateKey() {
      return L_PRIVKEYS[this.id];
    }
    /**
     * Gets a value indicating whether the key is supported for signing /
     * generation etc.
     *
     * @returns {boolean}
     */
  
  
    get supported() {
      return this.id !== Curve.CI_SECT283K1 && this.id !== 0;
    }
  
  }
  
  module.exports = Curve;
  
  /***/ }),
  
  /***/ "../common/src/Types/Keys/KeyPair.js":
  /*!*******************************************!*\
    !*** ../common/src/Types/Keys/KeyPair.js ***!
    \*******************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const P_PRIVATE_KEY = Symbol('private_key');
  const P_PUBLIC_KEY = Symbol('public_key');
  const P_CURVE = Symbol('curve');
  /**
   * Represents a private and public keypair.
   */
  
  class KeyPair {
    /**
       * Creates a new private-public keypair instance.
       *
       * @param {PrivateKey} privateKey
       * @param {PublicKey} publicKey
       */
    constructor(privateKey, publicKey) {
      this[P_CURVE] = privateKey.curve;
      this[P_PRIVATE_KEY] = privateKey;
      this[P_PUBLIC_KEY] = publicKey;
  
      if (privateKey.curve.id !== publicKey.curve.id) {
        throw new Error('Mixed up curves between private an public key');
      }
    }
    /**
       * Gets the private key.
       *
       * @returns {PrivateKey}
       */
  
  
    get privateKey() {
      return this[P_PRIVATE_KEY];
    }
    /**
       * Gets the public key.
       *
       * @returns {PublicKey}
       */
  
  
    get publicKey() {
      return this[P_PUBLIC_KEY];
    }
    /**
       * Gets the curve used for the keypair.
       *
       * @returns {Curve}
       */
  
  
    get curve() {
      return this[P_CURVE];
    }
  
  }
  
  module.exports = KeyPair;
  
  /***/ }),
  
  /***/ "../common/src/Types/Keys/PrivateKey.js":
  /*!**********************************************!*\
    !*** ../common/src/Types/Keys/PrivateKey.js ***!
    \**********************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const BC = __webpack_require__(/*! ../../BC */ "../common/src/BC.js");
  
  const P_KEY = Symbol('key');
  const P_CURVE = Symbol('curve');
  /**
   * Represents a public key in pascalcoin.
   */
  
  class PrivateKey {
    /**
       * Constructor
       *
       * @param {BC|Buffer|Uint8Array|String} key
       * @param {Curve} curve
       */
    constructor(key, curve) {
      this[P_KEY] = BC.from(key);
      this[P_CURVE] = curve;
      const privateKeyLength = curve.lPrivateKey();
  
      if (this[P_KEY].length > privateKeyLength) {
        throw new Error(`Invalid length for curve ${curve.name} - ` + `expected <= ${privateKeyLength}, got ${this[P_KEY].length}`);
      }
    }
    /**
       * Gets the key value.
       *
       * @returns {BC}
       */
  
  
    get key() {
      return this[P_KEY];
    }
    /**
       * Gets the ec key.
       *
       * @returns {BC}
       */
  
  
    get ec() {
      return this.key;
    }
    /**
       * Gets the used curve.
       *
       * @returns {Curve}
       */
  
  
    get curve() {
      return this[P_CURVE];
    }
  
  }
  
  module.exports = PrivateKey;
  
  /***/ }),
  
  /***/ "../common/src/Types/Keys/PublicKey.js":
  /*!*********************************************!*\
    !*** ../common/src/Types/Keys/PublicKey.js ***!
    \*********************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const BC = __webpack_require__(/*! ../../BC */ "../common/src/BC.js");
  
  const Curve = __webpack_require__(/*! ./Curve */ "../common/src/Types/Keys/Curve.js");
  
  const P_X = Symbol('x');
  const P_XL = Symbol('xl');
  const P_Y = Symbol('y');
  const P_YL = Symbol('yl');
  const P_CURVE = Symbol('curve');
  /**
   * Represents a public key in pascalcoin.
   */
  
  class PublicKey {
    /**
       * Constructor
       *
       * @param {BC|Buffer|Uint8Array|String} x
       * @param {BC|Buffer|Uint8Array|String} y
       * @param {Curve} curve
       */
    constructor(x, y, curve) {
      x = BC.from(x);
      y = BC.from(y);
      this[P_X] = x;
      this[P_Y] = y;
      this[P_XL] = x.length;
      this[P_YL] = y.length;
      this[P_CURVE] = curve;
  
      if (this[P_XL] > curve.xylPublicKey('x') || this[P_YL] > curve.xylPublicKey('y')) {
        throw new Error(`Invalid x and/or y length for curve ${curve.name} - ` + `expected <= X${curve.xylPublicKey('x')}:Y${curve.xylPublicKey('y')}, ` + `got X${this[P_XL]}:Y${this[P_YL]}`);
      }
    }
    /**
       * Gets the X value of the key.
       *
       * @returns {BC}
       */
  
  
    get x() {
      return this[P_X];
    }
    /**
       * Gets the y value of the key.
       *
       * @returns {BC}
       */
  
  
    get y() {
      return this[P_Y];
    }
    /**
       * Gets the length of X.
       *
       * @returns {Number}
       */
  
  
    get yl() {
      return this[P_YL];
    }
    /**
       * Gets the length of Y.
       *
       * @returns {Number}
       */
  
  
    get xl() {
      return this[P_XL];
    }
    /**
       * Gets the used curve.
       *
       * @returns {Curve}
       */
  
  
    get curve() {
      return this[P_CURVE];
    }
    /**
     * Gets the ec key.
     *
     * @returns {BC}
     */
  
  
    get ec() {
      return BC.concat(this.x, this.y);
    }
    /**
     * Gets the ecdh public key.
     *
     * @returns {BC}
     */
  
  
    get ecdh() {
      if (this.curve.id === Curve.CI_P521) {
        return BC.concat(BC.fromHex('0400'), this.x, BC.fromHex('00'), this.y);
      }
  
      return BC.concat(BC.fromHex('04'), this.x, this.y);
    }
    /**
       * Gets an empty public key instance.
       *
       * @returns {PublicKey}
       */
  
  
    static empty() {
      return new PublicKey(BC.fromString(''), BC.fromString(''), new Curve(0));
    }
  
  }
  
  module.exports = PublicKey;
  
  /***/ }),
  
  /***/ "../common/src/Types/Keys/index.js":
  /*!*****************************************!*\
    !*** ../common/src/Types/Keys/index.js ***!
    \*****************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  module.exports = {
    Curve: __webpack_require__(/*! ./Curve */ "../common/src/Types/Keys/Curve.js"),
    PrivateKey: __webpack_require__(/*! ./PrivateKey */ "../common/src/Types/Keys/PrivateKey.js"),
    PublicKey: __webpack_require__(/*! ./PublicKey */ "../common/src/Types/Keys/PublicKey.js"),
    KeyPair: __webpack_require__(/*! ./KeyPair */ "../common/src/Types/Keys/KeyPair.js")
  };
  
  /***/ }),
  
  /***/ "../common/src/Types/OperationHash.js":
  /*!********************************************!*\
    !*** ../common/src/Types/OperationHash.js ***!
    \********************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const BC = __webpack_require__(/*! ../BC */ "../common/src/BC.js");
  
  const AccountNumber = __webpack_require__(/*! ./AccountNumber */ "../common/src/Types/AccountNumber.js");
  
  const P_BLOCK = Symbol('block');
  const P_ACCOUNT = Symbol('account');
  const P_N_OPERATION = Symbol('nOperation');
  const P_MD160 = Symbol('md160');
  /**
   * Holds information about an operation hash.
   */
  
  class OperationHash {
    /**
     * Constructor
     *
     * @param {Number} block
     * @param {Number} account
     * @param {Number} nOperation
     * @param {BC|Buffer|Uint8Array|String} md160
     */
    constructor(block, account, nOperation, md160) {
      this[P_BLOCK] = block;
      this[P_ACCOUNT] = new AccountNumber(account);
      this[P_N_OPERATION] = nOperation;
      this[P_MD160] = BC.from(md160);
  
      if (this[P_MD160].length !== 20) {
        throw new Error('Invalid operation hash - md160 size !== 20 bytes.');
      }
    }
    /**
     * Gets the account that executed the operation.
     *
     * @returns {AccountNumber}
     */
  
  
    get account() {
      return this[P_ACCOUNT];
    }
    /**
     * Gets the block number.
     *
     * @returns {Number}
     */
  
  
    get block() {
      return this[P_BLOCK];
    }
    /**
     * Gets the number of operations for the executing account.
     *
     * @returns {Number}
     */
  
  
    get nOperation() {
      return this[P_N_OPERATION];
    }
    /**
     * Gets the md160 of the op.
     *
     * @returns {BC}
     */
  
  
    get md160() {
      return this[P_MD160];
    }
    /**
     * Gets a value indicating whether the given ophash equals the current ophash.
     *
     * @param opHash
     * @param ignoreBlock
     * @return {boolean}
     */
  
  
    equals(opHash, ignoreBlock = false) {
      let blockResult = true;
  
      if (!ignoreBlock) {
        blockResult = this.block === opHash.block;
      }
  
      return blockResult && this.nOperation === opHash.nOperation && this.account.account === opHash.account.account && this.md160.equals(opHash.md160);
    }
  
  }
  
  module.exports = OperationHash;
  
  /***/ }),
  
  /***/ "../common/src/Types/index.js":
  /*!************************************!*\
    !*** ../common/src/Types/index.js ***!
    \************************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  module.exports = {
    AccountName: __webpack_require__(/*! ./AccountName */ "../common/src/Types/AccountName.js"),
    AccountNumber: __webpack_require__(/*! ./AccountNumber */ "../common/src/Types/AccountNumber.js"),
    Currency: __webpack_require__(/*! ./Currency */ "../common/src/Types/Currency.js"),
    OperationHash: __webpack_require__(/*! ./OperationHash */ "../common/src/Types/OperationHash.js"),
    Keys: __webpack_require__(/*! ./Keys */ "../common/src/Types/Keys/index.js")
  };
  
  /***/ }),
  
  /***/ "../common/src/Util.js":
  /*!*****************************!*\
    !*** ../common/src/Util.js ***!
    \*****************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  class Util {
    /**
     * https://github.com/MauroJr/escape-regex/blob/master/index.js
     * Tests are not performed.
     *
     * @param {String} string
     * @returns {string}
     */
  
    /* istanbul ignore next */
    static escapeRegex(string) {
      return ('' + string).replace(/([?!${}*:()|=^[\]\/\\.+])/g, '\\$1');
    }
  
  }
  
  module.exports = Util;
  
  /***/ }),
  
  /***/ "./index.js":
  /*!******************!*\
    !*** ./index.js ***!
    \******************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  module.exports = {
    File: __webpack_require__(/*! ./src/File */ "./src/File.js"),
    Key: __webpack_require__(/*! ./src/Key */ "./src/Key.js"),
    KeyCoder: __webpack_require__(/*! ./src/KeyCoder */ "./src/KeyCoder.js"),
    FileCoder: __webpack_require__(/*! ./src/FileCoder */ "./src/FileCoder.js")
  };
  
  /***/ }),
  
  /***/ "./src/File.js":
  /*!*********************!*\
    !*** ./src/File.js ***!
    \*********************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const P_MAGIC = Symbol('magic');
  const P_VERSION = Symbol('version');
  const P_KEYS = Symbol('keys');
  /**
   * Represents the contents of a WalletKeys.dat file.
   */
  
  class File {
    /**
     * Constructor.
     *
     * @param {String} magic
     * @param {Number} version
     */
    constructor(magic, version) {
      this[P_MAGIC] = magic;
      this[P_VERSION] = version;
      this[P_KEYS] = [];
    }
    /**
     * Gets the magic string.
     *
     * @return {String}
     */
  
  
    get magic() {
      return this[P_MAGIC];
    }
    /**
     * Gets the file version.
     *
     * @return {Number}
     */
  
  
    get version() {
      return this[P_VERSION];
    }
    /**
     * Gets the number of keys.
     *
     * @return {Number}
     */
  
  
    get countKeys() {
      return this[P_KEYS].length;
    }
    /**
     * Gets the keys in the file.
     *
     * @return {Key[]}
     */
  
  
    get keys() {
      return this[P_KEYS];
    }
    /**
     * Adds a key to the list of keys.
     *
     * @param {Key} key
     */
  
  
    addKey(key) {
      this[P_KEYS].push(key);
    }
  
  }
  
  module.exports = File;
  
  /***/ }),
  
  /***/ "./src/FileCoder.js":
  /*!**************************!*\
    !*** ./src/FileCoder.js ***!
    \**************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Coding = __webpack_require__(/*! @pascalcoin-sbx/common */ "../common/index.js").Coding;
  
  const Endian = __webpack_require__(/*! @pascalcoin-sbx/common */ "../common/index.js").Endian;
  
  const File = __webpack_require__(/*! ./File */ "./src/File.js");
  
  const KeyCoder = __webpack_require__(/*! ./KeyCoder */ "./src/KeyCoder.js");
  
  const CompositeType = Coding.CompositeType;
  /**
   * Coder for a WalletKeys.dat file from the classic wallet.
   */
  
  class FileCoder extends CompositeType {
    /**
     * Constructor.
     *
     * @param {String} id
     */
    constructor(id = null) {
      super(id || 'walletkeys.dat');
      this.description('The coder for the walletkeys.dat file from the classic wallet.');
      this.addSubType(new Coding.Core.StringWithLength('magic', 1, 'magic_length', 'Length of the magic', Endian.LITTLE_ENDIAN, true).description('The name of the magic.'));
      this.addSubType(new Coding.Core.Int32('version', true, Endian.LITTLE_ENDIAN).description('Version of file'));
      const decissiveCoder = new Coding.Decissive('versioned', 'version', versionValue => {
        // Decide here when the version is updated, currently only 100 is supported
        if (versionValue === 100 || true) {
          const V100Coder = new Coding.CompositeType('v100');
          V100Coder.addSubType(new Coding.Core.Int32('countKeys', true, Endian.LITTLE_ENDIAN).description('The number of keys in the file'));
          V100Coder.addSubType(new Coding.Repeating('keys', new KeyCoder('keys'), -1, 'countKeys').description('List of keys'));
          return V100Coder;
        }
  
        throw new Error('Invalid walletkeys version');
      });
      this.addSubType(decissiveCoder);
    }
    /**
     * Decodes the given bytes.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @return {File}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      const decoded = super.decodeFromBytes(bc, options, all);
      const keyFile = new File(decoded.magic, decoded.version);
      decoded.versioned.keys.forEach(key => {
        keyFile.addKey(key);
      });
      return keyFile;
    }
    /**
     * Encodes the given File object to a list of bytes.
     *
     * @param {File} objOrArray
     * @returns {BC}
     */
  
  
    encodeToBytes(objOrArray) {
      let obj = {
        magic: objOrArray.magic,
        version: objOrArray.version,
        versioned: {
          countKeys: objOrArray.countKeys,
          keys: objOrArray.keys
        }
      };
      return super.encodeToBytes(obj);
    }
  
  }
  
  module.exports = FileCoder;
  
  /***/ }),
  
  /***/ "./src/Key.js":
  /*!********************!*\
    !*** ./src/Key.js ***!
    \********************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const P_NAME = Symbol('name');
  const P_PUBKEY = Symbol('public_key');
  const P_ENC_PRIVATE_KEY = Symbol('encrypted_private_key');
  /**
   * Represents a key entry.
   */
  
  class Key {
    /**
     * Constructor.
     *
     * @param {String} name
     * @param {PublicKey} publicKey
     * @param {BC} encryptedPrivateKey
     */
    constructor(name, publicKey, encryptedPrivateKey) {
      this[P_NAME] = name;
      this[P_PUBKEY] = publicKey;
      this[P_ENC_PRIVATE_KEY] = encryptedPrivateKey;
    }
    /**
     * Gets the name of the key.
     *
     * @return {String}
     */
  
  
    get name() {
      return this[P_NAME];
    }
    /**
     * Gets the associated public key.
     *
     * @return {PublicKey}
     */
  
  
    get publicKey() {
      return this[P_PUBKEY];
    }
    /**
     * Gets the encrypted private key.
     *
     * @return {BC}
     */
  
  
    get encryptedPrivateKey() {
      return this[P_ENC_PRIVATE_KEY];
    }
  
  }
  
  module.exports = Key;
  
  /***/ }),
  
  /***/ "./src/KeyCoder.js":
  /*!*************************!*\
    !*** ./src/KeyCoder.js ***!
    \*************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  /**
   * Copyright (c) Benjamin Ansbach - all rights reserved.
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  const Coding = __webpack_require__(/*! @pascalcoin-sbx/common */ "../common/index.js").Coding;
  
  const Key = __webpack_require__(/*! ./Key */ "./src/Key.js");
  
  const CompositeType = Coding.CompositeType;
  /**
   * Coder for a key entry in the WalletKeys.dat file.
   */
  
  class KeyCoder extends CompositeType {
    /**
     * Constructor.
     *
     * @param {String} id
     */
    constructor(id = null) {
      super(id || 'walletkeys.dat_key');
      this.description('The coder for a key entry in the walletkeys.dat file from the classic wallet.');
      this.addSubType(new Coding.Core.StringWithLength('name', 2, 'name_length', 'Length of the key name').description('The name of the key.'));
      this.addSubType(new Coding.Pascal.Keys.PublicKey('publicKey').description('The public key'));
      this.addSubType(new Coding.Core.BytesWithLength('encryptedPrivateKey', 2, 'encryptedPrivateKeyLength', 'Length of crypted').description('The crypted key'));
    }
    /**
     * Decodes the given bytes.
     *
     * @param {BC|Buffer|Uint8Array|String} bc
     * @param {Object} options
     * @param {*} all
     * @return {Key}
     */
  
  
    decodeFromBytes(bc, options = {}, all = null) {
      const decoded = super.decodeFromBytes(bc, options, all);
      return new Key(decoded.name, decoded.publicKey, decoded.encryptedPrivateKey);
    }
  
  }
  
  module.exports = KeyCoder;
  
  /***/ }),
  
  /***/ 0:
  /*!************************!*\
    !*** multi ./index.js ***!
    \************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports, __webpack_require__) {
  
  module.exports = __webpack_require__(/*! /home/ben/Code/crypto/pascalcoin/untitled/packages/walletkeys.dat/index.js */"./index.js");
  
  
  /***/ }),
  
  /***/ 1:
  /*!************************!*\
    !*** buffer (ignored) ***!
    \************************/
  /*! no static exports found */
  /*! all exports used */
  /***/ (function(module, exports) {
  
  /* (ignored) */
  
  /***/ })
  
  /******/ });
  });
  //# sourceMappingURL=walletkeys.dat.js.map