tool-db 2.6.1 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/bundle.js +1 -1
  2. package/dist/adapters-base/storageAdapter.js +1 -1
  3. package/dist/adapters-base/userAdapter.js +1 -1
  4. package/dist/crdt/counterCrdt.d.ts +2 -2
  5. package/dist/crdt/listCrdt.d.ts +2 -2
  6. package/dist/crdt/mapCrdt.d.ts +2 -2
  7. package/dist/messageHandlers/handlePut.js +101 -12
  8. package/dist/messageHandlers/handlePut.js.map +1 -1
  9. package/dist/toolDbAnonSignIn.js +1 -1
  10. package/dist/toolDbCheckSignupConflicts.d.ts +7 -0
  11. package/dist/toolDbCheckSignupConflicts.js +123 -0
  12. package/dist/toolDbCheckSignupConflicts.js.map +1 -0
  13. package/dist/toolDbKeysSignIn.js +1 -1
  14. package/dist/toolDbSignIn.js +1 -1
  15. package/dist/toolDbSignUp.d.ts +10 -0
  16. package/dist/toolDbSignUp.js +83 -54
  17. package/dist/toolDbSignUp.js.map +1 -1
  18. package/dist/toolDbVerificationWrapper.js +1 -1
  19. package/dist/tooldb.d.ts +18 -0
  20. package/dist/tooldb.js +120 -32
  21. package/dist/tooldb.js.map +1 -1
  22. package/dist/types/message.d.ts +2 -2
  23. package/dist/types/tooldb.d.ts +7 -7
  24. package/dist/utils/verifyMessage.js +1 -1
  25. package/package.json +3 -3
  26. package/lib/adapters-base/networkAdapter.ts +0 -218
  27. package/lib/adapters-base/storageAdapter.ts +0 -57
  28. package/lib/adapters-base/userAdapter.ts +0 -49
  29. package/lib/crdt/baseCrdt.ts +0 -21
  30. package/lib/crdt/counterCrdt.ts +0 -112
  31. package/lib/crdt/listCrdt.ts +0 -190
  32. package/lib/crdt/mapCrdt.ts +0 -121
  33. package/lib/index.ts +0 -49
  34. package/lib/logger.ts +0 -30
  35. package/lib/messageHandlers/handleCrdtGet.ts +0 -34
  36. package/lib/messageHandlers/handleCrdtPut.ts +0 -133
  37. package/lib/messageHandlers/handleFunction.ts +0 -59
  38. package/lib/messageHandlers/handleGet.ts +0 -34
  39. package/lib/messageHandlers/handlePing.ts +0 -40
  40. package/lib/messageHandlers/handlePong.ts +0 -37
  41. package/lib/messageHandlers/handlePut.ts +0 -59
  42. package/lib/messageHandlers/handleQuery.ts +0 -30
  43. package/lib/messageHandlers/handleSubscribe.ts +0 -46
  44. package/lib/server.ts +0 -7
  45. package/lib/shared.ts +0 -5
  46. package/lib/toolDbAnonSignIn.ts +0 -5
  47. package/lib/toolDbClientOnMessage.ts +0 -79
  48. package/lib/toolDbCrdtGet.ts +0 -83
  49. package/lib/toolDbCrdtPut.ts +0 -78
  50. package/lib/toolDbFunction.ts +0 -49
  51. package/lib/toolDbGet.ts +0 -81
  52. package/lib/toolDbKeysSignIn.ts +0 -13
  53. package/lib/toolDbPut.ts +0 -84
  54. package/lib/toolDbQueryKeys.ts +0 -71
  55. package/lib/toolDbSignIn.ts +0 -37
  56. package/lib/toolDbSignUp.ts +0 -72
  57. package/lib/toolDbSubscribe.ts +0 -54
  58. package/lib/toolDbVerificationWrapper.ts +0 -55
  59. package/lib/tooldb.ts +0 -343
  60. package/lib/types/message.ts +0 -154
  61. package/lib/types/tooldb.ts +0 -140
  62. package/lib/utils/catchReturn.ts +0 -4
  63. package/lib/utils/encoding/arrayBufferToHex.ts +0 -18
  64. package/lib/utils/encoding/arrayBufferToString.ts +0 -4
  65. package/lib/utils/encoding/base64ToUint8.ts +0 -13
  66. package/lib/utils/encoding/fromBase64.ts +0 -4
  67. package/lib/utils/encoding/hexToArrayBuffer.ts +0 -13
  68. package/lib/utils/encoding/hexToString.ts +0 -8
  69. package/lib/utils/encoding/hexToUint8.ts +0 -5
  70. package/lib/utils/encoding/stringToArrayBuffer.ts +0 -4
  71. package/lib/utils/encoding/toBase64.ts +0 -4
  72. package/lib/utils/encoding/uint8ToBase64.ts +0 -11
  73. package/lib/utils/generateGroupKey.ts +0 -11
  74. package/lib/utils/getPeerSignature.ts +0 -12
  75. package/lib/utils/getTimestamp.ts +0 -3
  76. package/lib/utils/proofOfWork.ts +0 -31
  77. package/lib/utils/randomAnimal.ts +0 -77
  78. package/lib/utils/sha1.ts +0 -7
  79. package/lib/utils/sha256.ts +0 -7
  80. package/lib/utils/textRandom.ts +0 -11
  81. package/lib/utils/uniq.ts +0 -3
  82. package/lib/utils/verifyMessage.ts +0 -88
  83. package/lib/utils/verifyPeer.ts +0 -15
package/bundle.js CHANGED
@@ -1 +1 @@
1
- !function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).tooldb=e()}(function(){return function i(n,o,s){function a(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(f)return f(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,i,n,o,s)}return o[t].exports}for(var f="function"==typeof require&&require,e=0;e<s.length;e++)a(s[e]);return a}({1:[function(e,t,r){"use strict";const i=r;i.bignum=e("bn.js"),i.define=e("./asn1/api").define,i.base=e("./asn1/base"),i.constants=e("./asn1/constants"),i.decoders=e("./asn1/decoders"),i.encoders=e("./asn1/encoders")},{"./asn1/api":2,"./asn1/base":4,"./asn1/constants":8,"./asn1/decoders":10,"./asn1/encoders":13,"bn.js":16}],2:[function(e,t,r){"use strict";const i=e("./encoders"),n=e("./decoders"),o=e("inherits"),s=r;function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}s.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(r){const t=this.name;function e(e){this._initNamed(e,t)}return o(e,r),e.prototype._initNamed=function(e,t){r.call(this,e,t)},new e(this)},a.prototype._getDecoder=function(e){return this.decoders.hasOwnProperty(e=e||"der")||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return this.encoders.hasOwnProperty(e=e||"der")||(this.encoders[e]=this._createNamed(i[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"./decoders":10,"./encoders":13,inherits:102}],3:[function(e,t,r){"use strict";const i=e("inherits"),n=e("../base/reporter").Reporter,o=e("safer-buffer").Buffer;function s(e,t){n.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}i(s,n),(r.DecoderBuffer=s).isDecoderBuffer=function(e){return e instanceof s||"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice((e||this).offset,this.length)},(r.EncoderBuffer=a).isEncoderBuffer=function(e){return e instanceof a||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},a.prototype.join=function(t,r){return t=t||o.alloc(this.length),r=r||0,0!==this.length&&(Array.isArray(this.value)?this.value.forEach(function(e){e.join(t,r),r+=e.length}):("number"==typeof this.value?t[r]=this.value:"string"==typeof this.value?t.write(this.value,r):o.isBuffer(this.value)&&this.value.copy(t,r),r+=this.length)),t}},{"../base/reporter":6,inherits:102,"safer-buffer":144}],4:[function(e,t,r){"use strict";const i=r;i.Reporter=e("./reporter").Reporter,i.DecoderBuffer=e("./buffer").DecoderBuffer,i.EncoderBuffer=e("./buffer").EncoderBuffer,i.Node=e("./node")},{"./buffer":3,"./node":5,"./reporter":6}],5:[function(e,t,r){"use strict";const u=e("../base/reporter").Reporter,i=e("../base/buffer").EncoderBuffer,c=e("../base/buffer").DecoderBuffer,n=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function a(e,t,r){const i={};(this._baseState=i).name=r,i.enc=e,i.parent=t||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}t.exports=a;const f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];a.prototype.clone=function(){const t=this._baseState,r={},e=(f.forEach(function(e){r[e]=t[e]}),new this.constructor(r.parent));return e._baseState=r,e},a.prototype._wrap=function(){const r=this._baseState;s.forEach(function(t){this[t]=function(){const e=new this.constructor(this);return r.children.push(e),e[t].apply(e,arguments)}},this)},a.prototype._init=function(e){const t=this._baseState;n(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),n.equal(t.children.length,1,"Root node can have only one child")},a.prototype._useArgs=function(e){const t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(n(null===t.children),(t.children=r).forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(n(null===t.args),t.args=e,t.reverseArgs=e.map(function(r){if("object"!=typeof r||r.constructor!==Object)return r;const i={};return Object.keys(r).forEach(function(e){e==(0|e)&&(e|=0);var t=r[e];i[t]=e}),i}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(t){a.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),o.forEach(function(r){a.prototype[r]=function(){const e=this._baseState;var t=Array.prototype.slice.call(arguments);return n(null===e.tag),e.tag=r,this._useArgs(t),this}}),a.prototype.use=function(e){n(e);const t=this._baseState;return n(null===t.use),t.use=e,this},a.prototype.optional=function(){const e=this._baseState;return e.optional=!0,this},a.prototype.def=function(e){const t=this._baseState;return n(null===t.default),t.default=e,t.optional=!0,this},a.prototype.explicit=function(e){const t=this._baseState;return n(null===t.explicit&&null===t.implicit),t.explicit=e,this},a.prototype.implicit=function(e){const t=this._baseState;return n(null===t.explicit&&null===t.implicit),t.implicit=e,this},a.prototype.obj=function(){const e=this._baseState;var t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},a.prototype.key=function(e){const t=this._baseState;return n(null===t.key),t.key=e,this},a.prototype.any=function(){const e=this._baseState;return e.any=!0,this},a.prototype.choice=function(t){const e=this._baseState;return n(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},a.prototype.contains=function(e){const t=this._baseState;return n(null===t.use),t.contains=e,this},a.prototype._decode=function(t,r){const i=this._baseState;if(null===i.parent)return t.wrapResult(i.children[0]._decode(t,r));let n=i.default,o=!0,e=null;if(null!==i.key&&(e=t.enterKey(i.key)),i.optional){let e=null;if(null!==i.explicit?e=i.explicit:null!==i.implicit?e=i.implicit:null!==i.tag&&(e=i.tag),null!==e||i.any){if(o=this._peekTag(t,e,i.any),t.isError(o))return o}else{var s=t.save();try{null===i.choice?this._decodeGeneric(i.tag,t,r):this._decodeChoice(t,r),o=!0}catch(e){o=!1}t.restore(s)}}let a;if(i.obj&&o&&(a=t.enterObject()),o){if(null!==i.explicit){s=this._decodeTag(t,i.explicit);if(t.isError(s))return s;t=s}s=t.offset;if(null===i.use&&null===i.choice){let e;i.any&&(e=t.save());var f=this._decodeTag(t,null!==i.implicit?i.implicit:i.tag,i.any);if(t.isError(f))return f;i.any?n=t.raw(e):t=f}if(r&&r.track&&null!==i.tag&&r.track(t.path(),s,t.length,"tagged"),r&&r.track&&null!==i.tag&&r.track(t.path(),t.offset,t.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,t,r):this._decodeChoice(t,r)),t.isError(n))return n;i.any||null!==i.choice||null===i.children||i.children.forEach(function(e){e._decode(t,r)}),!i.contains||"octstr"!==i.tag&&"bitstr"!==i.tag||(f=new c(n),n=this._getUse(i.contains,t._reporterState.obj)._decode(f,r))}return i.obj&&o&&(n=t.leaveObject(a)),null===i.key||null===n&&!0!==o?null!==e&&t.exitKey(e):t.leaveKey(e,i.key,n),n},a.prototype._decodeGeneric=function(e,t,r){var i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},a.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),n(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},a.prototype._decodeChoice=function(n,o){const s=this._baseState;let a=null,f=!1;return Object.keys(s.choice).some(function(e){var t=n.save();const r=s.choice[e];try{var i=r._decode(n,o);if(n.isError(i))return!1;a={type:e,value:i},f=!0}catch(e){return n.restore(t),!1}return!0},this),f?a:n.error("Choice not matched")},a.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},a.prototype._encode=function(e,t,r){var i=this._baseState;if(null===i.default||i.default!==e){i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},a.prototype._encodeValue=function(r,i,e){const t=this._baseState;if(null===t.parent)return t.children[0]._encode(r,i||new u);let n=null;if(this.reporter=i,t.optional&&void 0===r){if(null===t.default)return;r=t.default}let o=null,s=!1;if(t.any)n=this._createEncoderBuffer(r);else if(t.choice)n=this._encodeChoice(r,i);else if(t.contains)o=this._getUse(t.contains,e)._encode(r,i),s=!0;else if(t.children)o=t.children.map(function(e){if("null_"===e._baseState.tag)return e._encode(null,i,r);if(null===e._baseState.key)return i.error("Child should have a key");var t=i.enterKey(e._baseState.key);if("object"!=typeof r)return i.error("Child expected, but input is not object");e=e._encode(r[e._baseState.key],i,r);return i.leaveKey(t),e},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===t.tag||"setof"===t.tag){if(!t.args||1!==t.args.length)return i.error("Too many args for : "+t.tag);if(!Array.isArray(r))return i.error("seqof/setof, but data is not Array");const f=this.clone();f._baseState.implicit=null,o=this._createEncoderBuffer(r.map(function(e){var t=this._baseState;return this._getUse(t.args[0],r)._encode(e,i)},f))}else null!==t.use?n=this._getUse(t.use,e)._encode(r,i):(o=this._encodePrimitive(t.tag,r),s=!0);var a;return t.any||null!==t.choice||(e=null!==t.implicit?t.implicit:t.tag,a=null===t.implicit?"universal":"context",null===e?null===t.use&&i.error("Tag could be omitted only for .use()"):null===t.use&&(n=this._encodeComposite(e,s,a,o))),n=null!==t.explicit?this._encodeComposite(t.explicit,!1,"context",n):n},a.prototype._encodeChoice=function(e,t){var r=this._baseState;const i=r.choice[e.type];return i||n(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(e.value,t)},a.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},a.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},a.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{"../base/buffer":3,"../base/reporter":6,"minimalistic-assert":105}],6:[function(e,t,r){"use strict";const i=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}(r.Reporter=n).prototype.isError=function(e){return e instanceof o},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,r){const i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const e=this._reporterState;var t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){const t=this._reporterState;var r=t.obj;return t.obj=e,r},n.prototype.error=function(e){let t;const r=this._reporterState;var i=e instanceof o;if(t=i?e:new o(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),r.options.partial)return i||r.errors.push(t),t;throw t},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},i(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:102}],7:[function(e,t,r){"use strict";function i(r){const i={};return Object.keys(r).forEach(function(e){(0|e)==e&&(e|=0);var t=r[e];i[t]=e}),i}r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=i(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=i(r.tag)},{}],8:[function(e,t,r){"use strict";const i=r;i._reverse=function(r){const i={};return Object.keys(r).forEach(function(e){(0|e)==e&&(e|=0);var t=r[e];i[t]=e}),i},i.der=e("./der")},{"./der":7}],9:[function(e,t,r){"use strict";const i=e("inherits"),n=e("bn.js"),o=e("../base/buffer").DecoderBuffer,s=e("../base/node"),a=e("../constants/der");function f(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){s.call(this,"der",e)}function c(t,r){let i=t.readUInt8(r);if(t.isError(i))return i;var e=a.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){let e=i;for(i=0;128==(128&e);){if(e=t.readUInt8(r),t.isError(e))return e;i=(i<<=7)|127&e}}else i&=31;var o=a.tag[i];return{cls:e,primitive:n,tag:i,tagStr:o}}function h(t,e,r){let i=t.readUInt8(r);if(!t.isError(i)){if(!e&&128===i)return null;if(0!=(128&i)){var n=127&i;if(4<n)return t.error("length octect is too long");for(let e=i=0;e<n;e++){i<<=8;var o=t.readUInt8(r);if(t.isError(o))return o;i|=o}}}return i}(t.exports=f).prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},i(u,s),u.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var i=e.save(),n=c(e,'Failed to peek tag: "'+t+'"');return e.isError(n)?n:(e.restore(i),n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r)},u.prototype._decodeTag=function(e,t,r){var i=c(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;let n=h(e,i.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!r&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(!i.primitive&&null===n){r=e.save(),i=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');if(e.isError(i))return i;n=e.offset-r.offset,e.restore(r)}return e.skip(n,'Failed to match body of: "'+t+'"')},u.prototype._skipUntilEnd=function(t,r){for(;;){var i=c(t,r);if(t.isError(i))return i;var n=h(t,i.primitive,r);if(t.isError(n))return n;let e;if(e=i.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,r),t.isError(e))return e;if("end"===i.tagStr)break}},u.prototype._decodeList=function(e,t,r,i){const n=[];for(;!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var s=r.decode(e,"der",i);if(e.isError(s)&&o)break;n.push(s)}return n},u.prototype._decodeStr=function(e,t){var r;if("bitstr"===t)return r=e.readUInt8(),e.isError(r)?r:{unused:r,data:e.raw()};if("bmpstr"!==t)return"numstr"===t?(r=e.raw().toString("ascii"),this._isNumstr(r)?r:e.error("Decoding of string type: numstr unsupported characters")):"octstr"===t||"objDesc"===t?e.raw():"printstr"===t?(r=e.raw().toString("ascii"),this._isPrintstr(r)?r:e.error("Decoding of string type: printstr unsupported characters")):/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported");{const i=e.raw();if(i.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let t="";for(let e=0;e<i.length/2;e++)t+=String.fromCharCode(i.readUInt16BE(2*e));return t}},u.prototype._decodeObjid=function(e,t,r){let i;const n=[];let o=0,s=0;for(;!e.isEmpty();)s=e.readUInt8(),o=(o<<=7)|127&s,0==(128&s)&&(n.push(o),o=0);128&s&&n.push(o);const a=n[0]/40|0,f=n[0]%40;if(i=r?n:[a,f].concat(n.slice(1)),t){let e=t[i.join(" ")];void 0!==(e=void 0===e?t[i.join(".")]:e)&&(i=e)}return i},u.prototype._decodeTime=function(e,t){const r=e.raw().toString();let i,n,o,s,a,f;if("gentime"===t)i=0|r.slice(0,4),n=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),f=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");i=0|r.slice(0,2),n=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),f=0|r.slice(10,12),i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,o,s,a,f,0)},u.prototype._decodeNull=function(){return null},u.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},u.prototype._decodeInt=function(e,t){e=e.raw();let r=new n(e);return r=t?t[r.toString(10)]||r:r},u.prototype._use=function(e,t){return(e="function"==typeof e?e(t):e)._getDecoder("der").tree}},{"../base/buffer":3,"../base/node":5,"../constants/der":7,"bn.js":16,inherits:102}],10:[function(e,t,r){"use strict";const i=r;i.der=e("./der"),i.pem=e("./pem")},{"./der":9,"./pem":11}],11:[function(e,t,r){"use strict";const i=e("inherits"),u=e("safer-buffer").Buffer,c=e("./der");function n(e){c.call(this,e),this.enc="pem"}i(n,c),(t.exports=n).prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g);var i=t.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,s=-1;for(let e=0;e<r.length;e++){var a=r[e].match(n);if(null!==a&&a[2]===i){if(-1!==o){if("END"!==a[1])break;s=e;break}if("BEGIN"!==a[1])break;o=e}}if(-1===o||-1===s)throw new Error("PEM section not found for: "+i);const f=r.slice(o+1,s).join("");f.replace(/[^a-z0-9+/=]+/gi,"");e=u.from(f,"base64");return c.prototype.decode.call(this,e,t)}},{"./der":9,inherits:102,"safer-buffer":144}],12:[function(e,t,r){"use strict";const i=e("inherits"),s=e("safer-buffer").Buffer,n=e("../base/node"),a=e("../constants/der");function o(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){n.call(this,"der",e)}function u(e){return e<10?"0"+e:e}(t.exports=o).prototype.encode=function(e,t){return this.tree._encode(e,t).join()},i(f,n),f.prototype._encodeComposite=function(e,t,r,i){e=function(e,t,r,i){let n;"seqof"===e?e="seq":"setof"===e&&(e="set");if(a.tagByName.hasOwnProperty(e))n=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return i.error("Unknown tag: "+e);n=e}if(31<=n)return i.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(i.length<128){const o=s.alloc(2);return o[0]=e,o[1]=i.length,this._createEncoderBuffer([o,i])}let n=1;for(let e=i.length;256<=e;e>>=8)n++;const o=s.alloc(2+n);o[0]=e,o[1]=128|n;for(let e=1+n,t=i.length;0<t;e--,t>>=8)o[e]=255&t;return this._createEncoderBuffer([o,i])},f.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"!==e)return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported");{const r=s.alloc(2*t.length);for(let e=0;e<t.length;e++)r.writeUInt16BE(t.charCodeAt(e),2*e);return this._createEncoderBuffer(r)}},f.prototype._encodeObjid=function(r,e,t){if("string"==typeof r){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(r))return this.reporter.error("objid not found in values map");r=e[r].split(/[\s.]+/g);for(let e=0;e<r.length;e++)r[e]|=0}else if(Array.isArray(r)){r=r.slice();for(let e=0;e<r.length;e++)r[e]|=0}if(!Array.isArray(r))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(r));if(!t){if(40<=r[1])return this.reporter.error("Second objid identifier OOB");r.splice(0,2,40*r[0]+r[1])}let i=0;for(let t=0;t<r.length;t++){let e=r[t];for(i++;128<=e;e>>=7)i++}const n=s.alloc(i);let o=n.length-1;for(let t=r.length-1;0<=t;t--){let e=r[t];for(n[o--]=127&e;0<(e>>=7);)n[o--]=128|127&e}return this._createEncoderBuffer(n)},f.prototype._encodeTime=function(e,t){let r;const i=new Date(e);return"gentime"===t?r=[u(i.getUTCFullYear()),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(i.getUTCFullYear()%100),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!s.isBuffer(t)){const n=t.toArray();!t.sign&&128&n[0]&&n.unshift(0),t=s.from(n)}if(s.isBuffer(t)){let e=t.length;0===t.length&&e++;const i=s.alloc(e);return t.copy(i),0===t.length&&(i[0]=0),this._createEncoderBuffer(i)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;256<=e;e>>=8)r++;const i=new Array(r);for(let e=i.length-1;0<=e;e--)i[e]=255&t,t>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(s.from(i))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,t){return(e="function"==typeof e?e(t):e)._getEncoder("der").tree},f.prototype._skipDefault=function(e,t,r){const i=this._baseState;let n;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},{"../base/node":5,"../constants/der":7,inherits:102,"safer-buffer":144}],13:[function(e,t,r){"use strict";const i=r;i.der=e("./der"),i.pem=e("./pem")},{"./der":12,"./pem":14}],14:[function(e,t,r){"use strict";const i=e("inherits"),o=e("./der");function n(e){o.call(this,e),this.enc="pem"}i(n,o),(t.exports=n).prototype.encode=function(e,t){const r=o.prototype.encode.call(this,e),i=r.toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e<i.length;e+=64)n.push(i.slice(e,e+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},{"./der":12,inherits:102}],15:[function(e,t,r){"use strict";r.byteLength=function(e){var e=c(e),t=e[0],e=e[1];return 3*(t+e)/4-e},r.toByteArray=function(e){var t,r,i=c(e),n=i[0],i=i[1],o=new u(function(e,t){return 3*(e+t)/4-t}(n,i)),s=0,a=0<i?n-4:n;for(r=0;r<a;r+=4)t=f[e.charCodeAt(r)]<<18|f[e.charCodeAt(r+1)]<<12|f[e.charCodeAt(r+2)]<<6|f[e.charCodeAt(r+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=255&t;2===i&&(t=f[e.charCodeAt(r)]<<2|f[e.charCodeAt(r+1)]>>4,o[s++]=255&t);1===i&&(t=f[e.charCodeAt(r)]<<10|f[e.charCodeAt(r+1)]<<4|f[e.charCodeAt(r+2)]>>2,o[s++]=t>>8&255,o[s++]=255&t);return o},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,n=[],o=0,s=r-i;o<s;o+=16383)n.push(function(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),n.push(function(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}(i));return n.join("")}(e,o,s<o+16383?s:o+16383));1==i?(t=e[r-1],n.push(a[t>>2]+a[t<<4&63]+"==")):2==i&&(t=(e[r-2]<<8)+e[r-1],n.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"="));return n.join("")};for(var a=[],f=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)a[n]=i[n],f[i.charCodeAt(n)]=n;function c(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("="),t=(e=-1===e?t:e)===t?0:4-e%4;return[e,t]}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],16:[function(A,e,t){!function(e,t){"use strict";function b(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function m(e,t,r){if(m.isBN(e))return e;this.negative=0,this.words=null,this.length=0,(this.red=null)!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var i;"object"==typeof e?e.exports=m:t.BN=m,(m.BN=m).wordSize=26;try{i=("undefined"!=typeof window&&void 0!==window.Buffer?window:A("buffer")).Buffer}catch(e){}function n(e,t){e=e.charCodeAt(t);return 65<=e&&e<=70?e-55:97<=e&&e<=102?e-87:e-48&15}function a(e,t,r){var i=n(e,r);return t<=r-1&&(i|=n(e,r-1)<<4),i}function h(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++)var a=e.charCodeAt(s)-48,n=n*i+(49<=a?a-49+10:17<=a?a-17+10:a);return n}m.isBN=function(e){return e instanceof m||null!==e&&"object"==typeof e&&e.constructor.wordSize===m.wordSize&&Array.isArray(e.words)},m.max=function(e,t){return 0<e.cmp(t)?e:t},m.min=function(e,t){return e.cmp(t)<0?e:t},m.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);b((t="hex"===t?16:t)===(0|t)&&2<=t&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},m.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(b(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},m.prototype._initArray=function(e,t,r){if(b("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i,n,o=0;o<this.length;o++)this.words[o]=0;var s=0;if("be"===r)for(o=e.length-1,i=0;0<=o;o-=3)n=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=n<<s&67108863,this.words[i+1]=n>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);else if("le"===r)for(i=o=0;o<e.length;o+=3)n=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=n<<s&67108863,this.words[i+1]=n>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);return this.strip()},m.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;t<=i;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,18<=o?(o-=18,this.words[s+=1]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,18<=o?(o-=18,this.words[s+=1]|=n>>>26):o+=8;this.strip()},m.prototype._parseBase=function(e,t,r){this.words=[0];for(var i=0,n=this.length=1;n<=67108863;n*=t)i++;for(var n=n/t|0,o=e.length-r,s=o%--i,a=Math.min(o,o-s)+r,f=0,u=r;u<a;u+=i)f=h(e,u,u+i,t),this.imuln(n),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!=s){for(var c=1,f=h(e,u,e.length,t),u=0;u<s;u++)c*=t;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this.strip()},m.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},m.prototype.clone=function(){var e=new m(null);return this.copy(e),e},m.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},m.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},m.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},m.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],l=[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],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function o(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0,i=(r.length=i)-1|0,n=(s=(0|e.words[0])*(0|t.words[0]))/67108864|0;r.words[0]=67108863&s;for(var o=1;o<i;o++){for(var s,a=n>>>26,f=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++)a+=(s=(0|e.words[o-c|0])*(0|t.words[c])+f)/67108864|0,f=67108863&s;r.words[o]=0|f,n=0|a}return 0!==n?r.words[o]=0|n:r.length--,r.strip()}m.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,n=0;n<this.length;n++){var o=this.words[n],s=(16777215&(o<<r|i)).toString(16),a=0!==(i=o>>>24-r&16777215)||n!==this.length-1?d[6-s.length]+s+a:s+a;26<=(r+=2)&&(r-=26,n--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return a=0!==this.negative?"-"+a:a}if(e===(0|e)&&2<=e&&e<=36){var f=l[e],u=p[e];for(a="",(c=this.clone()).negative=0;!c.isZero();){var c,h=c.modn(u).toString(e);a=(c=c.idivn(u)).isZero()?h+a:d[f-h.length]+h+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return a=0!==this.negative?"-"+a:a}b(!1,"Base should be between 2 and 36")},m.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2<this.length&&b(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},m.prototype.toJSON=function(){return this.toString(16)},m.prototype.toBuffer=function(e,t){return b(void 0!==i),this.toArrayLike(i,e,t)},m.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},m.prototype.toArrayLike=function(e,t,r){var i,n,o=this.byteLength(),s=r||Math.max(1,o),r=(b(o<=s,"byte array longer than desired length"),b(0<s,"Requested array length <= 0"),this.strip(),"le"===t),a=new e(s),f=this.clone();if(r){for(n=0;!f.isZero();n++)i=f.andln(255),f.iushrn(8),a[n]=i;for(;n<s;n++)a[n]=0}else{for(n=0;n<s-o;n++)a[n]=0;for(n=0;!f.isZero();n++)i=f.andln(255),f.iushrn(8),a[s-n-1]=i}return a},Math.clz32?m.prototype._countBits=function(e){return 32-Math.clz32(e)}:m.prototype._countBits=function(e){var t=0;return 4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},m.prototype._zeroBits=function(e){if(0===e)return 26;var t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},m.prototype.bitLength=function(){var e=this.words[this.length-1],e=this._countBits(e);return 26*(this.length-1)+e},m.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},m.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},m.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},m.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},m.prototype.isNeg=function(){return 0!==this.negative},m.prototype.neg=function(){return this.clone().ineg()},m.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},m.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},m.prototype.ior=function(e){return b(0==(this.negative|e.negative)),this.iuor(e)},m.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},m.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},m.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},m.prototype.iand=function(e){return b(0==(this.negative|e.negative)),this.iuand(e)},m.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},m.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},m.prototype.iuxor=function(e){for(var t,r=this.length>e.length?(t=this,e):(t=e,this),i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},m.prototype.ixor=function(e){return b(0==(this.negative|e.negative)),this.iuxor(e)},m.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},m.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},m.prototype.inotn=function(e){b("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26),e=e%26;this._expand(t),0<e&&t--;for(var r=0;r<t;r++)this.words[r]=67108863&~this.words[r];return 0<e&&(this.words[r]=~this.words[r]&67108863>>26-e),this.strip()},m.prototype.notn=function(e){return this.clone().inotn(e)},m.prototype.setn=function(e,t){b("number"==typeof e&&0<=e);var r=e/26|0,e=e%26;return this._expand(1+r),this.words[r]=t?this.words[r]|1<<e:this.words[r]&~(1<<e),this.strip()},m.prototype.iadd=function(e){var t,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();for(var i=this.length>e.length?(r=this,e):(r=e,this),n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},m.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},m.prototype.isub=function(e){var t;if(0!==e.negative)return e.negative=0,t=this.iadd(e),e.negative=1,t._normSign();if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0<i?(r=this,e):(r=e,this),o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},m.prototype.sub=function(e){return this.clone().isub(e)};var s=function(e,L,D){var t,r=e.words,i=L.words,n=D.words,o=0|r[0],s=8191&o,o=o>>>13,a=0|r[1],f=8191&a,a=a>>>13,u=0|r[2],c=8191&u,u=u>>>13,h=0|r[3],d=8191&h,h=h>>>13,l=0|r[4],p=8191&l,l=l>>>13,b=0|r[5],m=8191&b,b=b>>>13,y=0|r[6],g=8191&y,y=y>>>13,v=0|r[7],_=8191&v,v=v>>>13,w=0|r[8],N=8191&w,w=w>>>13,r=0|r[9],U=8191&r,r=r>>>13,M=0|i[0],S=8191&M,M=M>>>13,A=0|i[1],k=8191&A,A=A>>>13,E=0|i[2],x=8191&E,E=E>>>13,P=0|i[3],q=8191&P,P=P>>>13,I=0|i[4],z=8191&I,I=I>>>13,R=0|i[5],H=8191&R,R=R>>>13,B=0|i[6],K=8191&B,B=B>>>13,j=0|i[7],F=8191&j,j=j>>>13,T=0|i[8],V=8191&T,T=T>>>13,i=0|i[9],W=8191&i,i=i>>>13,L=(D.negative=e.negative^L.negative,D.length=19,(0+Math.imul(s,S)|0)+((8191&(e=Math.imul(s,M)+Math.imul(o,S)|0))<<13)|0),O=(Math.imul(o,M)+(e>>>13)|0)+(L>>>26)|0;L&=67108863,t=Math.imul(f,S),e=Math.imul(f,M)+Math.imul(a,S)|0,C=Math.imul(a,M);var C,G=(O+(t+Math.imul(s,k)|0)|0)+((8191&(e=(e+Math.imul(s,A)|0)+Math.imul(o,k)|0))<<13)|0,J=(O=((C+Math.imul(o,A)|0)+(e>>>13)|0)+(G>>>26)|0,G&=67108863,t=Math.imul(c,S),e=Math.imul(c,M)+Math.imul(u,S)|0,C=Math.imul(u,M),t=t+Math.imul(f,k)|0,e=(e+Math.imul(f,A)|0)+Math.imul(a,k)|0,C=C+Math.imul(a,A)|0,(O+(t+Math.imul(s,x)|0)|0)+((8191&(e=(e+Math.imul(s,E)|0)+Math.imul(o,x)|0))<<13)|0),Z=(O=((C+Math.imul(o,E)|0)+(e>>>13)|0)+(J>>>26)|0,J&=67108863,t=Math.imul(d,S),e=Math.imul(d,M)+Math.imul(h,S)|0,C=Math.imul(h,M),t=t+Math.imul(c,k)|0,e=(e+Math.imul(c,A)|0)+Math.imul(u,k)|0,C=C+Math.imul(u,A)|0,t=t+Math.imul(f,x)|0,e=(e+Math.imul(f,E)|0)+Math.imul(a,x)|0,C=C+Math.imul(a,E)|0,(O+(t+Math.imul(s,q)|0)|0)+((8191&(e=(e+Math.imul(s,P)|0)+Math.imul(o,q)|0))<<13)|0),X=(O=((C+Math.imul(o,P)|0)+(e>>>13)|0)+(Z>>>26)|0,Z&=67108863,t=Math.imul(p,S),e=Math.imul(p,M)+Math.imul(l,S)|0,C=Math.imul(l,M),t=t+Math.imul(d,k)|0,e=(e+Math.imul(d,A)|0)+Math.imul(h,k)|0,C=C+Math.imul(h,A)|0,t=t+Math.imul(c,x)|0,e=(e+Math.imul(c,E)|0)+Math.imul(u,x)|0,C=C+Math.imul(u,E)|0,t=t+Math.imul(f,q)|0,e=(e+Math.imul(f,P)|0)+Math.imul(a,q)|0,C=C+Math.imul(a,P)|0,(O+(t+Math.imul(s,z)|0)|0)+((8191&(e=(e+Math.imul(s,I)|0)+Math.imul(o,z)|0))<<13)|0),Y=(O=((C+Math.imul(o,I)|0)+(e>>>13)|0)+(X>>>26)|0,X&=67108863,t=Math.imul(m,S),e=Math.imul(m,M)+Math.imul(b,S)|0,C=Math.imul(b,M),t=t+Math.imul(p,k)|0,e=(e+Math.imul(p,A)|0)+Math.imul(l,k)|0,C=C+Math.imul(l,A)|0,t=t+Math.imul(d,x)|0,e=(e+Math.imul(d,E)|0)+Math.imul(h,x)|0,C=C+Math.imul(h,E)|0,t=t+Math.imul(c,q)|0,e=(e+Math.imul(c,P)|0)+Math.imul(u,q)|0,C=C+Math.imul(u,P)|0,t=t+Math.imul(f,z)|0,e=(e+Math.imul(f,I)|0)+Math.imul(a,z)|0,C=C+Math.imul(a,I)|0,(O+(t+Math.imul(s,H)|0)|0)+((8191&(e=(e+Math.imul(s,R)|0)+Math.imul(o,H)|0))<<13)|0),Q=(O=((C+Math.imul(o,R)|0)+(e>>>13)|0)+(Y>>>26)|0,Y&=67108863,t=Math.imul(g,S),e=Math.imul(g,M)+Math.imul(y,S)|0,C=Math.imul(y,M),t=t+Math.imul(m,k)|0,e=(e+Math.imul(m,A)|0)+Math.imul(b,k)|0,C=C+Math.imul(b,A)|0,t=t+Math.imul(p,x)|0,e=(e+Math.imul(p,E)|0)+Math.imul(l,x)|0,C=C+Math.imul(l,E)|0,t=t+Math.imul(d,q)|0,e=(e+Math.imul(d,P)|0)+Math.imul(h,q)|0,C=C+Math.imul(h,P)|0,t=t+Math.imul(c,z)|0,e=(e+Math.imul(c,I)|0)+Math.imul(u,z)|0,C=C+Math.imul(u,I)|0,t=t+Math.imul(f,H)|0,e=(e+Math.imul(f,R)|0)+Math.imul(a,H)|0,C=C+Math.imul(a,R)|0,(O+(t+Math.imul(s,K)|0)|0)+((8191&(e=(e+Math.imul(s,B)|0)+Math.imul(o,K)|0))<<13)|0),$=(O=((C+Math.imul(o,B)|0)+(e>>>13)|0)+(Q>>>26)|0,Q&=67108863,t=Math.imul(_,S),e=Math.imul(_,M)+Math.imul(v,S)|0,C=Math.imul(v,M),t=t+Math.imul(g,k)|0,e=(e+Math.imul(g,A)|0)+Math.imul(y,k)|0,C=C+Math.imul(y,A)|0,t=t+Math.imul(m,x)|0,e=(e+Math.imul(m,E)|0)+Math.imul(b,x)|0,C=C+Math.imul(b,E)|0,t=t+Math.imul(p,q)|0,e=(e+Math.imul(p,P)|0)+Math.imul(l,q)|0,C=C+Math.imul(l,P)|0,t=t+Math.imul(d,z)|0,e=(e+Math.imul(d,I)|0)+Math.imul(h,z)|0,C=C+Math.imul(h,I)|0,t=t+Math.imul(c,H)|0,e=(e+Math.imul(c,R)|0)+Math.imul(u,H)|0,C=C+Math.imul(u,R)|0,t=t+Math.imul(f,K)|0,e=(e+Math.imul(f,B)|0)+Math.imul(a,K)|0,C=C+Math.imul(a,B)|0,(O+(t+Math.imul(s,F)|0)|0)+((8191&(e=(e+Math.imul(s,j)|0)+Math.imul(o,F)|0))<<13)|0),ee=(O=((C+Math.imul(o,j)|0)+(e>>>13)|0)+($>>>26)|0,$&=67108863,t=Math.imul(N,S),e=Math.imul(N,M)+Math.imul(w,S)|0,C=Math.imul(w,M),t=t+Math.imul(_,k)|0,e=(e+Math.imul(_,A)|0)+Math.imul(v,k)|0,C=C+Math.imul(v,A)|0,t=t+Math.imul(g,x)|0,e=(e+Math.imul(g,E)|0)+Math.imul(y,x)|0,C=C+Math.imul(y,E)|0,t=t+Math.imul(m,q)|0,e=(e+Math.imul(m,P)|0)+Math.imul(b,q)|0,C=C+Math.imul(b,P)|0,t=t+Math.imul(p,z)|0,e=(e+Math.imul(p,I)|0)+Math.imul(l,z)|0,C=C+Math.imul(l,I)|0,t=t+Math.imul(d,H)|0,e=(e+Math.imul(d,R)|0)+Math.imul(h,H)|0,C=C+Math.imul(h,R)|0,t=t+Math.imul(c,K)|0,e=(e+Math.imul(c,B)|0)+Math.imul(u,K)|0,C=C+Math.imul(u,B)|0,t=t+Math.imul(f,F)|0,e=(e+Math.imul(f,j)|0)+Math.imul(a,F)|0,C=C+Math.imul(a,j)|0,(O+(t+Math.imul(s,V)|0)|0)+((8191&(e=(e+Math.imul(s,T)|0)+Math.imul(o,V)|0))<<13)|0),S=(O=((C+Math.imul(o,T)|0)+(e>>>13)|0)+(ee>>>26)|0,ee&=67108863,t=Math.imul(U,S),e=Math.imul(U,M)+Math.imul(r,S)|0,C=Math.imul(r,M),t=t+Math.imul(N,k)|0,e=(e+Math.imul(N,A)|0)+Math.imul(w,k)|0,C=C+Math.imul(w,A)|0,t=t+Math.imul(_,x)|0,e=(e+Math.imul(_,E)|0)+Math.imul(v,x)|0,C=C+Math.imul(v,E)|0,t=t+Math.imul(g,q)|0,e=(e+Math.imul(g,P)|0)+Math.imul(y,q)|0,C=C+Math.imul(y,P)|0,t=t+Math.imul(m,z)|0,e=(e+Math.imul(m,I)|0)+Math.imul(b,z)|0,C=C+Math.imul(b,I)|0,t=t+Math.imul(p,H)|0,e=(e+Math.imul(p,R)|0)+Math.imul(l,H)|0,C=C+Math.imul(l,R)|0,t=t+Math.imul(d,K)|0,e=(e+Math.imul(d,B)|0)+Math.imul(h,K)|0,C=C+Math.imul(h,B)|0,t=t+Math.imul(c,F)|0,e=(e+Math.imul(c,j)|0)+Math.imul(u,F)|0,C=C+Math.imul(u,j)|0,t=t+Math.imul(f,V)|0,e=(e+Math.imul(f,T)|0)+Math.imul(a,V)|0,C=C+Math.imul(a,T)|0,(O+(t+Math.imul(s,W)|0)|0)+((8191&(e=(e+Math.imul(s,i)|0)+Math.imul(o,W)|0))<<13)|0),M=(O=((C+Math.imul(o,i)|0)+(e>>>13)|0)+(S>>>26)|0,S&=67108863,t=Math.imul(U,k),e=Math.imul(U,A)+Math.imul(r,k)|0,C=Math.imul(r,A),t=t+Math.imul(N,x)|0,e=(e+Math.imul(N,E)|0)+Math.imul(w,x)|0,C=C+Math.imul(w,E)|0,t=t+Math.imul(_,q)|0,e=(e+Math.imul(_,P)|0)+Math.imul(v,q)|0,C=C+Math.imul(v,P)|0,t=t+Math.imul(g,z)|0,e=(e+Math.imul(g,I)|0)+Math.imul(y,z)|0,C=C+Math.imul(y,I)|0,t=t+Math.imul(m,H)|0,e=(e+Math.imul(m,R)|0)+Math.imul(b,H)|0,C=C+Math.imul(b,R)|0,t=t+Math.imul(p,K)|0,e=(e+Math.imul(p,B)|0)+Math.imul(l,K)|0,C=C+Math.imul(l,B)|0,t=t+Math.imul(d,F)|0,e=(e+Math.imul(d,j)|0)+Math.imul(h,F)|0,C=C+Math.imul(h,j)|0,t=t+Math.imul(c,V)|0,e=(e+Math.imul(c,T)|0)+Math.imul(u,V)|0,C=C+Math.imul(u,T)|0,(O+(t+Math.imul(f,W)|0)|0)+((8191&(e=(e+Math.imul(f,i)|0)+Math.imul(a,W)|0))<<13)|0),s=(O=((C+Math.imul(a,i)|0)+(e>>>13)|0)+(M>>>26)|0,M&=67108863,t=Math.imul(U,x),e=Math.imul(U,E)+Math.imul(r,x)|0,C=Math.imul(r,E),t=t+Math.imul(N,q)|0,e=(e+Math.imul(N,P)|0)+Math.imul(w,q)|0,C=C+Math.imul(w,P)|0,t=t+Math.imul(_,z)|0,e=(e+Math.imul(_,I)|0)+Math.imul(v,z)|0,C=C+Math.imul(v,I)|0,t=t+Math.imul(g,H)|0,e=(e+Math.imul(g,R)|0)+Math.imul(y,H)|0,C=C+Math.imul(y,R)|0,t=t+Math.imul(m,K)|0,e=(e+Math.imul(m,B)|0)+Math.imul(b,K)|0,C=C+Math.imul(b,B)|0,t=t+Math.imul(p,F)|0,e=(e+Math.imul(p,j)|0)+Math.imul(l,F)|0,C=C+Math.imul(l,j)|0,t=t+Math.imul(d,V)|0,e=(e+Math.imul(d,T)|0)+Math.imul(h,V)|0,C=C+Math.imul(h,T)|0,(O+(t+Math.imul(c,W)|0)|0)+((8191&(e=(e+Math.imul(c,i)|0)+Math.imul(u,W)|0))<<13)|0),o=(O=((C+Math.imul(u,i)|0)+(e>>>13)|0)+(s>>>26)|0,s&=67108863,t=Math.imul(U,q),e=Math.imul(U,P)+Math.imul(r,q)|0,C=Math.imul(r,P),t=t+Math.imul(N,z)|0,e=(e+Math.imul(N,I)|0)+Math.imul(w,z)|0,C=C+Math.imul(w,I)|0,t=t+Math.imul(_,H)|0,e=(e+Math.imul(_,R)|0)+Math.imul(v,H)|0,C=C+Math.imul(v,R)|0,t=t+Math.imul(g,K)|0,e=(e+Math.imul(g,B)|0)+Math.imul(y,K)|0,C=C+Math.imul(y,B)|0,t=t+Math.imul(m,F)|0,e=(e+Math.imul(m,j)|0)+Math.imul(b,F)|0,C=C+Math.imul(b,j)|0,t=t+Math.imul(p,V)|0,e=(e+Math.imul(p,T)|0)+Math.imul(l,V)|0,C=C+Math.imul(l,T)|0,(O+(t+Math.imul(d,W)|0)|0)+((8191&(e=(e+Math.imul(d,i)|0)+Math.imul(h,W)|0))<<13)|0),k=(O=((C+Math.imul(h,i)|0)+(e>>>13)|0)+(o>>>26)|0,o&=67108863,t=Math.imul(U,z),e=Math.imul(U,I)+Math.imul(r,z)|0,C=Math.imul(r,I),t=t+Math.imul(N,H)|0,e=(e+Math.imul(N,R)|0)+Math.imul(w,H)|0,C=C+Math.imul(w,R)|0,t=t+Math.imul(_,K)|0,e=(e+Math.imul(_,B)|0)+Math.imul(v,K)|0,C=C+Math.imul(v,B)|0,t=t+Math.imul(g,F)|0,e=(e+Math.imul(g,j)|0)+Math.imul(y,F)|0,C=C+Math.imul(y,j)|0,t=t+Math.imul(m,V)|0,e=(e+Math.imul(m,T)|0)+Math.imul(b,V)|0,C=C+Math.imul(b,T)|0,(O+(t+Math.imul(p,W)|0)|0)+((8191&(e=(e+Math.imul(p,i)|0)+Math.imul(l,W)|0))<<13)|0),A=(O=((C+Math.imul(l,i)|0)+(e>>>13)|0)+(k>>>26)|0,k&=67108863,t=Math.imul(U,H),e=Math.imul(U,R)+Math.imul(r,H)|0,C=Math.imul(r,R),t=t+Math.imul(N,K)|0,e=(e+Math.imul(N,B)|0)+Math.imul(w,K)|0,C=C+Math.imul(w,B)|0,t=t+Math.imul(_,F)|0,e=(e+Math.imul(_,j)|0)+Math.imul(v,F)|0,C=C+Math.imul(v,j)|0,t=t+Math.imul(g,V)|0,e=(e+Math.imul(g,T)|0)+Math.imul(y,V)|0,C=C+Math.imul(y,T)|0,(O+(t+Math.imul(m,W)|0)|0)+((8191&(e=(e+Math.imul(m,i)|0)+Math.imul(b,W)|0))<<13)|0),f=(O=((C+Math.imul(b,i)|0)+(e>>>13)|0)+(A>>>26)|0,A&=67108863,t=Math.imul(U,K),e=Math.imul(U,B)+Math.imul(r,K)|0,C=Math.imul(r,B),t=t+Math.imul(N,F)|0,e=(e+Math.imul(N,j)|0)+Math.imul(w,F)|0,C=C+Math.imul(w,j)|0,t=t+Math.imul(_,V)|0,e=(e+Math.imul(_,T)|0)+Math.imul(v,V)|0,C=C+Math.imul(v,T)|0,(O+(t+Math.imul(g,W)|0)|0)+((8191&(e=(e+Math.imul(g,i)|0)+Math.imul(y,W)|0))<<13)|0),a=(O=((C+Math.imul(y,i)|0)+(e>>>13)|0)+(f>>>26)|0,f&=67108863,t=Math.imul(U,F),e=Math.imul(U,j)+Math.imul(r,F)|0,C=Math.imul(r,j),t=t+Math.imul(N,V)|0,e=(e+Math.imul(N,T)|0)+Math.imul(w,V)|0,C=C+Math.imul(w,T)|0,(O+(t+Math.imul(_,W)|0)|0)+((8191&(e=(e+Math.imul(_,i)|0)+Math.imul(v,W)|0))<<13)|0),x=(O=((C+Math.imul(v,i)|0)+(e>>>13)|0)+(a>>>26)|0,a&=67108863,t=Math.imul(U,V),e=Math.imul(U,T)+Math.imul(r,V)|0,C=Math.imul(r,T),(O+(t+Math.imul(N,W)|0)|0)+((8191&(e=(e+Math.imul(N,i)|0)+Math.imul(w,W)|0))<<13)|0),E=(O=((C+Math.imul(w,i)|0)+(e>>>13)|0)+(x>>>26)|0,x&=67108863,(O+Math.imul(U,W)|0)+((8191&(e=Math.imul(U,i)+Math.imul(r,W)|0))<<13)|0);return O=(Math.imul(r,i)+(e>>>13)|0)+(E>>>26)|0,E&=67108863,n[0]=L,n[1]=G,n[2]=J,n[3]=Z,n[4]=X,n[5]=Y,n[6]=Q,n[7]=$,n[8]=ee,n[9]=S,n[10]=M,n[11]=s,n[12]=o,n[13]=k,n[14]=A,n[15]=f,n[16]=a,n[17]=x,n[18]=E,0!=O&&(n[19]=O,D.length++),D};function f(e,t,r){return(new u).mulp(e,t,r)}function u(e,t){this.x=e,this.y=t}Math.imul||(s=o),m.prototype.mulTo=function(e,t){var r=this.length+e.length,r=(10===this.length&&10===e.length?s:r<63?o:r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){for(var s=n,n=0,a=67108863&i,f=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=f;u++){var c,h=(0|e.words[o-u])*(0|t.words[u]),a=67108863&(c=(67108863&h)+a|0);n+=(s=(s=s+(h/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}:f)(this,e,t);return r},u.prototype.makeRBT=function(e){for(var t=new Array(e),r=m.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},u.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},u.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},u.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,f=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<n;c+=a)for(var h=f,d=u,l=0;l<s;l++){var p=r[c+l],b=i[c+l],m=r[c+l+s],y=h*m-d*(g=i[c+l+s]),g=h*g+d*m;r[c+l]=p+(m=y),i[c+l]=b+g,r[c+l+s]=p-m,i[c+l+s]=b-g,l!==a&&(y=f*h-u*d,d=f*d+u*h,h=y)}},u.prototype.guessLen13b=function(e,t){for(var t=1&(i=1|Math.max(t,e)),r=0,i=i/2|0;i;i>>>=1)r++;return 1<<r+1+t},u.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},u.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},u.prototype.convert13b=function(e,t,r,i){for(var n=0,o=0;o<t;o++)n+=0|e[o],r[2*o]=8191&n,r[2*o+1]=8191&(n>>>=13),n>>>=13;for(o=2*t;o<i;++o)r[o]=0;b(0===n),b(0==(-8192&n))},u.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},u.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),f=new Array(i),u=new Array(i),c=new Array(i),h=new Array(i),d=r.words;d.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,u,i),this.transform(s,o,a,f,i,n),this.transform(u,o,c,h,i,n);for(var l=0;l<i;l++){var p=a[l]*c[l]-f[l]*h[l];f[l]=a[l]*h[l]+f[l]*c[l],a[l]=p}return this.conjugate(a,f,i),this.transform(a,f,d,o,i,n),this.conjugate(d,o,i),this.normalize13b(d,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},m.prototype.mul=function(e){var t=new m(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},m.prototype.mulf=function(e){var t=new m(null);return t.words=new Array(this.length+e.length),f(this,e,t)},m.prototype.imul=function(e){return this.clone().mulTo(e,this)},m.prototype.imuln=function(e){b("number"==typeof e),b(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,n=(67108863&i)+(67108863&t),t=(t>>=26)+(i/67108864|0)+(n>>>26);this.words[r]=67108863&n}return 0!==t&&(this.words[r]=t,this.length++),this},m.prototype.muln=function(e){return this.clone().imuln(e)},m.prototype.sqr=function(){return this.mul(this)},m.prototype.isqr=function(){return this.imul(this.clone())},m.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r%26;t[r]=(e.words[r/26|0]&1<<i)>>>i}return t}(e);if(0===t.length)return new m(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},m.prototype.iushln=function(e){b("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!=t){for(var n=0,o=0;o<this.length;o++){var s=this.words[o]&i,a=(0|this.words[o])-s<<t;this.words[o]=a|n,n=s>>>26-t}n&&(this.words[o]=n,this.length++)}if(0!=r){for(o=this.length-1;0<=o;o--)this.words[o+r]=this.words[o];for(o=0;o<r;o++)this.words[o]=0;this.length+=r}return this.strip()},m.prototype.ishln=function(e){return b(0===this.negative),this.iushln(e)},m.prototype.iushrn=function(e,t,r){b("number"==typeof e&&0<=e),i=t?(t-t%26)/26:0;var i,n=e%26,o=Math.min((e-n)/26,this.length),s=67108863^67108863>>>n<<n,a=r;if(i-=o,i=Math.max(0,i),a){for(var f=0;f<o;f++)a.words[f]=this.words[f];a.length=o}if(0!==o)if(this.length>o)for(this.length-=o,f=0;f<this.length;f++)this.words[f]=this.words[f+o];else this.words[0]=0,this.length=1;for(var u=0,f=this.length-1;0<=f&&(0!==u||i<=f);f--){var c=0|this.words[f];this.words[f]=u<<26-n|c>>>n,u=c&s}return a&&0!==u&&(a.words[a.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},m.prototype.ishrn=function(e,t,r){return b(0===this.negative),this.iushrn(e,t,r)},m.prototype.shln=function(e){return this.clone().ishln(e)},m.prototype.ushln=function(e){return this.clone().iushln(e)},m.prototype.shrn=function(e){return this.clone().ishrn(e)},m.prototype.ushrn=function(e){return this.clone().iushrn(e)},m.prototype.testn=function(e){b("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return!(this.length<=e)&&!!(this.words[e]&1<<t)},m.prototype.imaskn=function(e){b("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return b(0===this.negative,"imaskn works only with positive numbers"),this.length<=e?this:(0!=t&&e++,this.length=Math.min(e,this.length),0!=t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this.strip())},m.prototype.maskn=function(e){return this.clone().imaskn(e)},m.prototype.iaddn=function(e){return b("number"==typeof e),b(e<67108864),e<0?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},m.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&67108864<=this.words[t];t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},m.prototype.isubn=function(e){if(b("number"==typeof e),b(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this.strip()},m.prototype.addn=function(e){return this.clone().iaddn(e)},m.prototype.subn=function(e){return this.clone().isubn(e)},m.prototype.iabs=function(){return this.negative=0,this},m.prototype.abs=function(){return this.clone().iabs()},m.prototype._ishlnsubmul=function(e,t,r){for(var i=e.length+r,n=(this._expand(i),0),o=0;o<e.length;o++){var s=(0|this.words[o+r])+n,a=(0|e.words[o])*t,n=((s-=67108863&a)>>26)-(a/67108864|0);this.words[o+r]=67108863&s}for(;o<this.length-r;o++)n=(s=(0|this.words[o+r])+n)>>26,this.words[o+r]=67108863&s;if(0!==n){for(b(-1===n),o=n=0;o<this.length;o++)n=(s=-(0|this.words[o])+n)>>26,this.words[o]=67108863&s;this.negative=1}return this.strip()},m.prototype._wordDiv=function(e,t){this.length,e.length;var r,i=this.clone(),n=e,o=0|n.words[n.length-1],s=(0!=(e=26-this._countBits(o))&&(n=n.ushln(e),i.iushln(e),o=0|n.words[n.length-1]),i.length-n.length);if("mod"!==t){(r=new m(null)).length=1+s,r.words=new Array(r.length);for(var a=0;a<r.length;a++)r.words[a]=0}var f=i.clone()._ishlnsubmul(n,1,s);0===f.negative&&(i=f,r&&(r.words[s]=1));for(var u=s-1;0<=u;u--){var c=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]),c=Math.min(c/o|0,67108863);for(i._ishlnsubmul(n,c,u);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);r&&(r.words[u]=c)}return r&&r.strip(),i.strip(),"div"!==t&&0!=e&&i.iushrn(e),{div:r||null,mod:i}},m.prototype.divmod=function(e,t,r){return b(!e.isZero()),this.isZero()?{div:new m(0),mod:new m(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(n=o.mod.neg(),r&&0!==n.negative&&n.iadd(e)),{div:i,mod:n}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),{div:i="mod"!==t?o.div.neg():i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(n=o.mod.neg(),r&&0!==n.negative&&n.isub(e)),{div:o.div,mod:n}):e.length>this.length||this.cmp(e)<0?{div:new m(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new m(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new m(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,n,o},m.prototype.div=function(e){return this.divmod(e,"div",!1).div},m.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},m.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},m.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),e=e.andln(1),r=r.cmp(i);return r<0||1===e&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},m.prototype.modn=function(e){b(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;0<=i;i--)r=(t*r+(0|this.words[i]))%e;return r},m.prototype.idivn=function(e){b(e<=67108863);for(var t=0,r=this.length-1;0<=r;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},m.prototype.divn=function(e){return this.clone().idivn(e)},m.prototype.egcd=function(e){b(0===e.negative),b(!e.isZero());for(var t=this,r=e.clone(),t=0!==t.negative?t.umod(e):t.clone(),i=new m(1),n=new m(0),o=new m(0),s=new m(1),a=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++a;for(var f=r.clone(),u=t.clone();!t.isZero();){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(0<c)for(t.iushrn(c);0<c--;)(i.isOdd()||n.isOdd())&&(i.iadd(f),n.isub(u)),i.iushrn(1),n.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(0<d)for(r.iushrn(d);0<d--;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(u)),o.iushrn(1),s.iushrn(1);0<=t.cmp(r)?(t.isub(r),i.isub(o),n.isub(s)):(r.isub(t),o.isub(i),s.isub(n))}return{a:o,b:s,gcd:r.iushln(a)}},m.prototype._invmp=function(e){b(0===e.negative),b(!e.isZero());for(var t,r=this,i=e.clone(),r=0!==r.negative?r.umod(e):r.clone(),n=new m(1),o=new m(0),s=i.clone();0<r.cmpn(1)&&0<i.cmpn(1);){for(var a=0,f=1;0==(r.words[0]&f)&&a<26;++a,f<<=1);if(0<a)for(r.iushrn(a);0<a--;)n.isOdd()&&n.iadd(s),n.iushrn(1);for(var u=0,c=1;0==(i.words[0]&c)&&u<26;++u,c<<=1);if(0<u)for(i.iushrn(u);0<u--;)o.isOdd()&&o.iadd(s),o.iushrn(1);0<=r.cmp(i)?(r.isub(i),n.isub(o)):(i.isub(r),o.isub(n))}return(t=0===r.cmpn(1)?n:o).cmpn(0)<0&&t.iadd(e),t},m.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0;for(var i=r.negative=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0)var o=t,t=r,r=o;else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},m.prototype.invm=function(e){return this.egcd(e).a.umod(e)},m.prototype.isEven=function(){return 0==(1&this.words[0])},m.prototype.isOdd=function(){return 1==(1&this.words[0])},m.prototype.andln=function(e){return this.words[0]&e},m.prototype.bincn=function(e){b("number"==typeof e);var t=e%26,e=(e-t)/26,t=1<<t;if(this.length<=e)return this._expand(1+e),this.words[e]|=t,this;for(var r=t,i=e;0!==r&&i<this.length;i++){var n=0|this.words[i],r=(n+=r)>>>26;n&=67108863,this.words[i]=n}return 0!==r&&(this.words[i]=r,this.length++),this},m.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},m.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this.strip(),t=1<this.length?1:(b((e=t?-e:e)<=67108863,"Number is too big"),(t=0|this.words[0])===e?0:t<e?-1:1),0!==this.negative?0|-t:t):-1},m.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;e=this.ucmp(e);return 0!==this.negative?0|-e:e},m.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;0<=r;r--){var i=0|this.words[r],n=0|e.words[r];if(i!=n){i<n?t=-1:n<i&&(t=1);break}}return t},m.prototype.gtn=function(e){return 1===this.cmpn(e)},m.prototype.gt=function(e){return 1===this.cmp(e)},m.prototype.gten=function(e){return 0<=this.cmpn(e)},m.prototype.gte=function(e){return 0<=this.cmp(e)},m.prototype.ltn=function(e){return-1===this.cmpn(e)},m.prototype.lt=function(e){return-1===this.cmp(e)},m.prototype.lten=function(e){return this.cmpn(e)<=0},m.prototype.lte=function(e){return this.cmp(e)<=0},m.prototype.eqn=function(e){return 0===this.cmpn(e)},m.prototype.eq=function(e){return 0===this.cmp(e)},m.red=function(e){return new M(e)},m.prototype.toRed=function(e){return b(!this.red,"Already a number in reduction context"),b(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},m.prototype.fromRed=function(){return b(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},m.prototype._forceRed=function(e){return this.red=e,this},m.prototype.forceRed=function(e){return b(!this.red,"Already a number in reduction context"),this._forceRed(e)},m.prototype.redAdd=function(e){return b(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},m.prototype.redIAdd=function(e){return b(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},m.prototype.redSub=function(e){return b(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},m.prototype.redISub=function(e){return b(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},m.prototype.redShl=function(e){return b(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},m.prototype.redMul=function(e){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},m.prototype.redIMul=function(e){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},m.prototype.redSqr=function(){return b(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},m.prototype.redISqr=function(){return b(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},m.prototype.redSqrt=function(){return b(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},m.prototype.redInvm=function(){return b(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},m.prototype.redNeg=function(){return b(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},m.prototype.redPow=function(e){return b(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var c={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new m(t,16),this.n=this.p.bitLength(),this.k=new m(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){var t;"string"==typeof e?(t=m._prime(e),this.m=t.p,this.prime=t):(b(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null)}function S(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new m(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)}y.prototype._tmp=function(){var e=new m(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){for(var t,r=e;this.split(r,this.tmp),(t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength())>this.n;);e=t<this.n?-1:r.ucmp(this.p);return 0===e?(r.words[0]=0,r.length=1):0<e?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(g,y),g.prototype.split=function(e,t){for(var r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(4194303&o)<<4|n>>>22,n=o}0===(e.words[i-10]=n>>>=22)&&10<e.length?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(v,y),r(_,y),r(w,y),w.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},m._prime=function(e){if(c[e])return c[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new v;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return c[e]=t},M.prototype._verify1=function(e){b(0===e.negative,"red works only with positives"),b(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){b(0==(e.negative|t.negative),"red works only with positives"),b(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return(this.prime?this.prime.ireduce(e):e.umod(this.m))._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);e=e.add(t);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);e=e.iadd(t);return 0<=e.cmp(this.m)&&e.isub(this.m),e},M.prototype.sub=function(e,t){this._verify2(e,t);e=e.sub(t);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);e=e.isub(t);return e.cmpn(0)<0&&e.iadd(this.m),e},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(b(t%2==1),3===t)return t=this.m.add(new m(1)).iushrn(2),this.pow(e,t);for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);b(!r.isZero());for(var n=new m(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),a=new m(2*(a=this.m.bitLength())*a).toRed(this);0!==this.pow(a,s).cmp(o);)a.redIAdd(o);for(var f=this.pow(a,r),u=this.pow(e,r.addn(1).iushrn(1)),c=this.pow(e,r),h=i;0!==c.cmp(n);){for(var d=c,l=0;0!==d.cmp(n);l++)d=d.redSqr();b(l<h);var p=this.pow(f,new m(1).iushln(h-l-1)),u=u.redMul(p),f=p.redSqr(),c=c.redMul(f),h=l}return u},M.prototype.invm=function(e){e=e._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(e,t){if(t.isZero())return new m(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new m(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],o=0,s=0,a=t.bitLength()%26;for(0===a&&(a=26),i=t.length-1;0<=i;i--){for(var f=t.words[i],u=a-1;0<=u;u--){var c=f>>u&1;n!==r[0]&&(n=this.sqr(n)),0==c&&0===o?s=0:(o=o<<1|c,(4===++s||0===i&&0===u)&&(n=this.mul(n,r[o]),o=s=0))}a=26}return n},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){e=e.clone();return e.red=null,e},m.mont=function(e){return new S(e)},r(S,M),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){e=this.imod(e.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;e=e.imul(t),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=e.isub(t).iushrn(this.shift),t=e;return 0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new m(0)._forceRed(this);e=e.mul(t),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=e.isub(t).iushrn(this.shift),t=e;return 0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:18}],17:[function(e,t,r){var i;function n(e){this.rand=e}if(t.exports=function(e){return(i=i||new n(null)).generate(e)},(t.exports.Rand=n).prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(e){e=new Uint8Array(e);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(e){e=new Uint8Array(e);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=e("crypto");if("function"!=typeof o.randomBytes)throw new Error("Not supported");n.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},{crypto:18}],18:[function(e,t,r){},{}],19:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e){for(var t=(e=n.isBuffer(e)?e:n.from(e)).length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function o(e){for(;0<e.length;e++)e[0]=0}function s(e,t,r,i,n){for(var o,s,a,f,u=r[0],c=r[1],h=r[2],d=r[3],l=e[0]^t[0],p=e[1]^t[1],b=e[2]^t[2],m=e[3]^t[3],y=4,g=1;g<n;g++)o=u[l>>>24]^c[p>>>16&255]^h[b>>>8&255]^d[255&m]^t[y++],s=u[p>>>24]^c[b>>>16&255]^h[m>>>8&255]^d[255&l]^t[y++],a=u[b>>>24]^c[m>>>16&255]^h[l>>>8&255]^d[255&p]^t[y++],f=u[m>>>24]^c[l>>>16&255]^h[p>>>8&255]^d[255&b]^t[y++],l=o,p=s,b=a,m=f;return o=(i[l>>>24]<<24|i[p>>>16&255]<<16|i[b>>>8&255]<<8|i[255&m])^t[y++],s=(i[p>>>24]<<24|i[b>>>16&255]<<16|i[m>>>8&255]<<8|i[255&l])^t[y++],a=(i[b>>>24]<<24|i[m>>>16&255]<<16|i[l>>>8&255]<<8|i[255&p])^t[y++],f=(i[m>>>24]<<24|i[l>>>16&255]<<16|i[p>>>8&255]<<8|i[255&b])^t[y++],[o>>>=0,s>>>=0,a>>>=0,f>>>=0]}var h=[0,1,2,4,8,16,32,64,128,27,54],d=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,f=0;f<256;++f){var u=a^a<<1^a<<2^a<<3^a<<4,c=(r[s]=u=u>>>8^255&u^99,e[i[u]=s]),h=e[c],d=e[h],l=257*e[u]^16843008*u;n[0][s]=l<<24|l>>>8,n[1][s]=l<<16|l>>>16,n[2][s]=l<<8|l>>>24,n[3][s]=l,o[0][u]=(l=16843009*d^65537*h^257*c^16843008*s)<<24|l>>>8,o[1][u]=l<<16|l>>>16,o[2][u]=l<<8|l>>>24,o[3][u]=l,0===s?s=a=1:(s=c^e[e[e[d^c]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function a(e){this._key=i(e),this._reset()}a.blockSize=16,a.keySize=32,a.prototype.blockSize=a.blockSize,a.prototype.keySize=a.keySize,a.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=4*(r+1),n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<i;o++){var s=n[o-1];o%t==0?(s=d.SBOX[(s=s<<8|s>>>24)>>>24]<<24|d.SBOX[s>>>16&255]<<16|d.SBOX[s>>>8&255]<<8|d.SBOX[255&s],s^=h[o/t|0]<<24):6<t&&o%t==4&&(s=d.SBOX[s>>>24]<<24|d.SBOX[s>>>16&255]<<16|d.SBOX[s>>>8&255]<<8|d.SBOX[255&s]),n[o]=n[o-t]^s}for(var a=[],f=0;f<i;f++){var u=i-f,c=n[u-(f%4?0:4)];a[f]=f<4||u<=4?c:d.INV_SUB_MIX[0][d.SBOX[c>>>24]]^d.INV_SUB_MIX[1][d.SBOX[c>>>16&255]]^d.INV_SUB_MIX[2][d.SBOX[c>>>8&255]]^d.INV_SUB_MIX[3][d.SBOX[255&c]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=a},a.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,d.SUB_MIX,d.SBOX,this._nRounds)},a.prototype.encryptBlock=function(e){var e=this.encryptBlockRaw(e),t=n.allocUnsafe(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[1],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[3],12),t},a.prototype.decryptBlock=function(e){var t=(e=i(e))[1],t=(e[1]=e[3],e[3]=t,s(e,this._invKeySchedule,d.INV_SUB_MIX,d.INV_SBOX,this._nRounds)),e=n.allocUnsafe(16);return e.writeUInt32BE(t[0],0),e.writeUInt32BE(t[3],4),e.writeUInt32BE(t[2],8),e.writeUInt32BE(t[1],12),e},a.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=a},{"safe-buffer":143}],20:[function(e,t,r){var o=e("./aes"),s=e("safe-buffer").Buffer,a=e("cipher-base"),i=e("inherits"),f=e("./ghash"),n=e("buffer-xor"),u=e("./incr32");function c(e,t,r,i){a.call(this);var n=s.alloc(4,0),t=(this._cipher=new o.AES(t),this._cipher.encryptBlock(n));this._ghash=new f(t),r=function(e,t,r){if(12===t.length)return e._finID=s.concat([t,s.from([0,0,0,1])]),s.concat([t,s.from([0,0,0,2])]);var r=new f(r),i=(n=t.length)%16,t=(r.update(t),i&&r.update(s.alloc(16-i,0)),r.update(s.alloc(8,0)),8*n),n=((i=s.alloc(8)).writeUIntBE(t,0,8),r.update(i),e._finID=r.state,s.from(e._finID));return u(n),n}(this,r,t),this._prev=s.from(r),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}i(c,a),c.prototype._update=function(e){!this._called&&this._alen&&(t=16-this._alen%16)<16&&(t=s.alloc(t,0),this._ghash.update(t)),this._called=!0;var t=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(t),this._len+=e.length,t},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=n(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){for(var r=0,i=(e.length!==t.length&&r++,Math.min(e.length,t.length)),n=0;n<i;++n)r+=e[n]^t[n];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!s.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},c.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},c.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=c},{"./aes":19,"./ghash":24,"./incr32":25,"buffer-xor":50,"cipher-base":51,inherits:102,"safe-buffer":143}],21:[function(e,t,r){var i=e("./encrypter"),n=e("./decrypter"),o=e("./modes/list.json");r.createCipher=r.Cipher=i.createCipher,r.createCipheriv=r.Cipheriv=i.createCipheriv,r.createDecipher=r.Decipher=n.createDecipher,r.createDecipheriv=r.Decipheriv=n.createDecipheriv,r.listCiphers=r.getCiphers=function(){return Object.keys(o)}},{"./decrypter":22,"./encrypter":23,"./modes/list.json":33}],22:[function(e,t,r){var i=e("./authCipher"),n=e("safe-buffer").Buffer,o=e("./modes"),s=e("./streamCipher"),a=e("cipher-base"),f=e("./aes"),u=e("evp_bytestokey");function c(e,t,r){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new f.AES(t),this._prev=n.from(r),this._mode=e,this._autopadding=!0}function h(){this.cache=n.allocUnsafe(0)}function d(e,t,r){e=o[e.toLowerCase()];if(!e)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=n.from(r)),"GCM"!==e.mode&&r.length!==e.iv)throw new TypeError("invalid iv length "+r.length);if((t="string"==typeof t?n.from(t):t).length!==e.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===e.type?new s(e.module,t,r,!0):"auth"===e.type?new i(e.module,t,r,!0):new c(e.module,t,r)}e("inherits")(c,a),c.prototype._update=function(e){this._cache.add(e);for(var t,r=[];t=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,t),r.push(t);return n.concat(r)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding){var t=this._mode.decrypt(this,e),r=t[15];if(r<1||16<r)throw new Error("unable to decrypt data");for(var i=-1;++i<r;)if(t[i+(16-r)]!==r)throw new Error("unable to decrypt data");if(16!==r)return t.slice(0,16-r)}else if(e)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=n.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(16<this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(16<=this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(r)return t=u(t,!1,r.key,r.iv),d(e,t.key,t.iv);throw new TypeError("invalid suite type")},r.createDecipheriv=d},{"./aes":19,"./authCipher":20,"./modes":32,"./streamCipher":35,"cipher-base":51,evp_bytestokey:85,inherits:102,"safe-buffer":143}],23:[function(e,t,r){var i=e("./modes"),n=e("./authCipher"),o=e("safe-buffer").Buffer,s=e("./streamCipher"),a=e("cipher-base"),f=e("./aes"),u=e("evp_bytestokey");function c(e,t,r){a.call(this),this._cache=new d,this._cipher=new f.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}e("inherits")(c,a),c.prototype._update=function(e){this._cache.add(e);for(var t,r=[];t=this._cache.get();)t=this._mode.encrypt(this,t),r.push(t);return o.concat(r)};var h=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function l(e,t,r){e=i[e.toLowerCase()];if(!e)throw new TypeError("invalid suite type");if((t="string"==typeof t?o.from(t):t).length!==e.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==e.mode&&r.length!==e.iv)throw new TypeError("invalid iv length "+r.length);return new("stream"===e.type?s:"auth"===e.type?n:c)(e.module,t,r)}c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){var e;return 15<this.cache.length?(e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e):null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},r.createCipheriv=l,r.createCipher=function(e,t){var r=i[e.toLowerCase()];if(r)return t=u(t,!1,r.key,r.iv),l(e,t.key,t.iv);throw new TypeError("invalid suite type")}},{"./aes":19,"./authCipher":20,"./modes":32,"./streamCipher":35,"cipher-base":51,evp_bytestokey:85,inherits:102,"safe-buffer":143}],24:[function(e,t,r){var i=e("safe-buffer").Buffer,n=i.alloc(16,0);function s(e){var t=i.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,r,i=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],n=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(n[0]^=i[0],n[1]^=i[1],n[2]^=i[2],n[3]^=i[3]),r=0!=(1&i[3]),t=3;0<t;t--)i[t]=i[t]>>>1|(1&i[t-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=s(n)},o.prototype.update=function(e){var t;for(this.cache=i.concat([this.cache,e]);16<=this.cache.length;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(i.concat([this.cache,n],16)),this.ghash(s([0,e,0,t])),this.state},t.exports=o},{"safe-buffer":143}],25:[function(e,t,r){t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},{}],26:[function(e,t,r){var i=e("buffer-xor");r.encrypt=function(e,t){t=i(t,e._prev);return e._prev=e._cipher.encryptBlock(t),e._prev},r.decrypt=function(e,t){var r=e._prev,e=(e._prev=t,e._cipher.decryptBlock(t));return i(e,r)}},{"buffer-xor":50}],27:[function(e,t,r){var o=e("safe-buffer").Buffer,s=e("buffer-xor");function a(e,t,r){var i=t.length,n=s(t,e._cache);return e._cache=e._cache.slice(i),e._prev=o.concat([e._prev,r?t:n]),n}r.encrypt=function(e,t,r){for(var i,n=o.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=o.allocUnsafe(0)),!(e._cache.length<=t.length)){n=o.concat([n,a(e,t,r)]);break}i=e._cache.length,n=o.concat([n,a(e,t.slice(0,i),r)]),t=t.slice(i)}return n}},{"buffer-xor":50,"safe-buffer":143}],28:[function(e,t,r){var a=e("safe-buffer").Buffer;function s(e,t,r){for(var i,n,o=-1,s=0;++o<8;)s+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^(i=t&1<<7-o?128:0)))>>o%8,e._prev=function(e,t){var r=e.length,i=-1,n=a.allocUnsafe(e.length);e=a.concat([e,a.from([t])]);for(;++i<r;)n[i]=e[i]<<1|e[i+1]>>7;return n}(e._prev,r?i:n);return s}r.encrypt=function(e,t,r){for(var i=t.length,n=a.allocUnsafe(i),o=-1;++o<i;)n[o]=s(e,t[o],r);return n}},{"safe-buffer":143}],29:[function(e,t,r){var c=e("safe-buffer").Buffer;r.encrypt=function(e,t,r){for(var i,n,o,s,a=t.length,f=c.allocUnsafe(a),u=-1;++u<a;)f[u]=(i=e,n=t[u],o=r,s=void 0,s=i._cipher.encryptBlock(i._prev)[0]^n,i._prev=c.concat([i._prev.slice(1),c.from([o?n:s])]),s);return f}},{"safe-buffer":143}],30:[function(e,t,r){var f=e("buffer-xor"),u=e("safe-buffer").Buffer,c=e("../incr32");r.encrypt=function(e,t){var r=Math.ceil(t.length/16),i=e._cache.length;e._cache=u.concat([e._cache,u.allocUnsafe(16*r)]);for(var n=0;n<r;n++){s=void 0,s=(o=e)._cipher.encryptBlockRaw(o._prev),c(o._prev);var o=s,s=i+16*n;e._cache.writeUInt32BE(o[0],s+0),e._cache.writeUInt32BE(o[1],s+4),e._cache.writeUInt32BE(o[2],s+8),e._cache.writeUInt32BE(o[3],s+12)}var a=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),f(t,a)}},{"../incr32":25,"buffer-xor":50,"safe-buffer":143}],31:[function(e,t,r){r.encrypt=function(e,t){return e._cipher.encryptBlock(t)},r.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],32:[function(e,t,r){var i,n={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},o=e("./list.json");for(i in o)o[i].module=n[o[i].mode];t.exports=o},{"./cbc":26,"./cfb":27,"./cfb1":28,"./cfb8":29,"./ctr":30,"./ecb":31,"./list.json":33,"./ofb":34}],33:[function(e,t,r){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],34:[function(e,t,r){!function(o){!function(){var n=e("buffer-xor");r.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=o.concat([e._cache,((r=e)._prev=r._cipher.encryptBlock(r._prev),r._prev)]);var r,i=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,i)}}.call(this)}.call(this,e("buffer").Buffer)},{buffer:49,"buffer-xor":50}],35:[function(e,t,r){var n=e("./aes"),o=e("safe-buffer").Buffer,s=e("cipher-base");function i(e,t,r,i){s.call(this),this._cipher=new n.AES(t),this._prev=o.from(r),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=i,this._mode=e}e("inherits")(i,s),i.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()},t.exports=i},{"./aes":19,"cipher-base":51,inherits:102,"safe-buffer":143}],36:[function(e,t,r){var i=e("browserify-des"),n=e("browserify-aes/browser"),o=e("browserify-aes/modes"),s=e("browserify-des/modes"),a=e("evp_bytestokey");function f(e,t,r){if(e=e.toLowerCase(),o[e])return n.createCipheriv(e,t,r);if(s[e])return new i({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),o[e])return n.createDecipheriv(e,t,r);if(s[e])return new i({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}r.createCipher=r.Cipher=function(e,t){var r,i;if(e=e.toLowerCase(),o[e])r=o[e].key,i=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,i=s[e].iv}return t=a(t,!1,r,i),f(e,t.key,t.iv)},r.createCipheriv=r.Cipheriv=f,r.createDecipher=r.Decipher=function(e,t){var r,i;if(e=e.toLowerCase(),o[e])r=o[e].key,i=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,i=s[e].iv}return t=a(t,!1,r,i),u(e,t.key,t.iv)},r.createDecipheriv=r.Decipheriv=u,r.listCiphers=r.getCiphers=function(){return Object.keys(s).concat(n.getCiphers())}},{"browserify-aes/browser":21,"browserify-aes/modes":32,"browserify-des":37,"browserify-des/modes":38,evp_bytestokey:85}],37:[function(e,t,r){var o=e("cipher-base"),i=e("des.js"),n=e("inherits"),s=e("safe-buffer").Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function f(e){o.call(this);var t=e.mode.toLowerCase(),r=a[t],i=e.decrypt?"decrypt":"encrypt",n=e.key,t=(s.isBuffer(n)||(n=s.from(n)),"des-ede"!==t&&"des-ede-cbc"!==t||(n=s.concat([n,n.slice(0,8)])),e.iv);s.isBuffer(t)||(t=s.from(t)),this._des=r.create({key:n,iv:t,type:i})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],n(t.exports=f,o),f.prototype._update=function(e){return s.from(this._des.update(e))},f.prototype._final=function(){return s.from(this._des.final())}},{"cipher-base":51,"des.js":58,inherits:102,"safe-buffer":143}],38:[function(e,t,r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},{}],39:[function(t,r,e){!function(c){!function(){var f=t("bn.js"),i=t("randombytes");function u(e){for(var t,r=e.modulus.byteLength();0<=(t=new f(i(r))).cmp(e.modulus)||!t.umod(e.prime1)||!t.umod(e.prime2););return t}function e(e,t){var r={blinder:(r=u(i=t)).toRed(f.mont(i.modulus)).redPow(new f(i.publicExponent)).fromRed(),unblinder:r.invm(i.modulus)},i=t.modulus.byteLength(),e=new f(e).mul(r.blinder).umod(t.modulus),n=e.toRed(f.mont(t.prime1)),e=e.toRed(f.mont(t.prime2)),o=t.coefficient,s=t.prime1,a=t.prime2,n=n.redPow(t.exponent1).fromRed(),e=e.redPow(t.exponent2).fromRed(),n=n.isub(e).imul(o).umod(s).imul(a);return e.iadd(n).imul(r.unblinder).umod(t.modulus).toArrayLike(c,"be",i)}e.getr=u,r.exports=e}.call(this)}.call(this,t("buffer").Buffer)},{"bn.js":40,buffer:49,randombytes:125}],40:[function(E,e,t){!function(e,t){"use strict";function b(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function m(e,t,r){if(m.isBN(e))return e;this.negative=0,this.words=null,this.length=0,(this.red=null)!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var i;"object"==typeof e?e.exports=m:t.BN=m,(m.BN=m).wordSize=26;try{i=("undefined"!=typeof window&&void 0!==window.Buffer?window:E("buffer")).Buffer}catch(e){}function n(e,t){t=e.charCodeAt(t);return 48<=t&&t<=57?t-48:65<=t&&t<=70?t-55:97<=t&&t<=102?t-87:void b(!1,"Invalid character in "+e)}function a(e,t,r){var i=n(e,r);return t<=r-1&&(i|=n(e,r-1)<<4),i}function h(e,t,r,i){for(var n=0,o=0,s=Math.min(e.length,r),a=t;a<s;a++){var f=e.charCodeAt(a)-48;n*=i,o=49<=f?f-49+10:17<=f?f-17+10:f,b(0<=f&&o<i,"Invalid character"),n+=o}return n}function o(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(m.isBN=function(e){return e instanceof m||null!==e&&"object"==typeof e&&e.constructor.wordSize===m.wordSize&&Array.isArray(e.words)},m.max=function(e,t){return 0<e.cmp(t)?e:t},m.min=function(e,t){return e.cmp(t)<0?e:t},m.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);b((t="hex"===t?16:t)===(0|t)&&2<=t&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},m.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(b(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},m.prototype._initArray=function(e,t,r){if(b("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i,n,o=0;o<this.length;o++)this.words[o]=0;var s=0;if("be"===r)for(o=e.length-1,i=0;0<=o;o-=3)n=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=n<<s&67108863,this.words[i+1]=n>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);else if("le"===r)for(i=o=0;o<e.length;o+=3)n=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=n<<s&67108863,this.words[i+1]=n>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);return this._strip()},m.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;t<=i;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,18<=o?(o-=18,this.words[s+=1]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,18<=o?(o-=18,this.words[s+=1]|=n>>>26):o+=8;this._strip()},m.prototype._parseBase=function(e,t,r){this.words=[0];for(var i=0,n=this.length=1;n<=67108863;n*=t)i++;for(var n=n/t|0,o=e.length-r,s=o%--i,a=Math.min(o,o-s)+r,f=0,u=r;u<a;u+=i)f=h(e,u,u+i,t),this.imuln(n),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!=s){for(var c=1,f=h(e,u,e.length,t),u=0;u<s;u++)c*=t;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this._strip()},m.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},m.prototype._move=function(e){o(e,this)},m.prototype.clone=function(){var e=new m(null);return this.copy(e),e},m.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},m.prototype._strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},m.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{m.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch(e){m.prototype.inspect=s}else m.prototype.inspect=s;function s(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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"],l=[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],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];m.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){for(var r="",i=0,n=0,o=0;o<this.length;o++){var s=this.words[o],a=(16777215&(s<<i|n)).toString(16),n=s>>>24-i&16777215;26<=(i+=2)&&(i-=26,o--),r=0!==n||o!==this.length-1?d[6-a.length]+a+r:a+r}for(0!==n&&(r=n.toString(16)+r);r.length%t!=0;)r="0"+r;return r=0!==this.negative?"-"+r:r}if(e===(0|e)&&2<=e&&e<=36){var f=l[e],u=p[e];for(r="",(c=this.clone()).negative=0;!c.isZero();){var c,h=c.modrn(u).toString(e);r=(c=c.idivn(u)).isZero()?h+r:d[f-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return r=0!==this.negative?"-"+r:r}b(!1,"Base should be between 2 and 36")},m.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2<this.length&&b(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},m.prototype.toJSON=function(){return this.toString(16,2)},i&&(m.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),m.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function f(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0,i=(r.length=i)-1|0,n=(s=(0|e.words[0])*(0|t.words[0]))/67108864|0;r.words[0]=67108863&s;for(var o=1;o<i;o++){for(var s,a=n>>>26,f=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++)a+=(s=(0|e.words[o-c|0])*(0|t.words[c])+f)/67108864|0,f=67108863&s;r.words[o]=0|f,n=0|a}return 0!==n?r.words[o]=0|n:r.length--,r._strip()}m.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),r=r||Math.max(1,i),e=(b(i<=r,"byte array longer than desired length"),b(0<r,"Requested array length <= 0"),r=r,(e=e).allocUnsafe?e.allocUnsafe(r):new e(r));return this["_toArrayLike"+("le"===t?"LE":"BE")](e,i),e},m.prototype._toArrayLikeLE=function(e,t){for(var r=0,i=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|i;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),o=i=0):(i=s>>>24,o+=2)}if(r<e.length)for(e[r++]=i;r<e.length;)e[r++]=0},m.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,i=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|i;e[r--]=255&s,0<=r&&(e[r--]=s>>8&255),0<=r&&(e[r--]=s>>16&255),6===o?(0<=r&&(e[r--]=s>>24&255),o=i=0):(i=s>>>24,o+=2)}if(0<=r)for(e[r--]=i;0<=r;)e[r--]=0},Math.clz32?m.prototype._countBits=function(e){return 32-Math.clz32(e)}:m.prototype._countBits=function(e){var t=0;return 4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},m.prototype._zeroBits=function(e){if(0===e)return 26;var t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},m.prototype.bitLength=function(){var e=this.words[this.length-1],e=this._countBits(e);return 26*(this.length-1)+e},m.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},m.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},m.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},m.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},m.prototype.isNeg=function(){return 0!==this.negative},m.prototype.neg=function(){return this.clone().ineg()},m.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},m.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},m.prototype.ior=function(e){return b(0==(this.negative|e.negative)),this.iuor(e)},m.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},m.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},m.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},m.prototype.iand=function(e){return b(0==(this.negative|e.negative)),this.iuand(e)},m.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},m.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},m.prototype.iuxor=function(e){for(var t,r=this.length>e.length?(t=this,e):(t=e,this),i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this._strip()},m.prototype.ixor=function(e){return b(0==(this.negative|e.negative)),this.iuxor(e)},m.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},m.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},m.prototype.inotn=function(e){b("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26),e=e%26;this._expand(t),0<e&&t--;for(var r=0;r<t;r++)this.words[r]=67108863&~this.words[r];return 0<e&&(this.words[r]=~this.words[r]&67108863>>26-e),this._strip()},m.prototype.notn=function(e){return this.clone().inotn(e)},m.prototype.setn=function(e,t){b("number"==typeof e&&0<=e);var r=e/26|0,e=e%26;return this._expand(1+r),this.words[r]=t?this.words[r]|1<<e:this.words[r]&~(1<<e),this._strip()},m.prototype.iadd=function(e){var t,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();for(var i=this.length>e.length?(r=this,e):(r=e,this),n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},m.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},m.prototype.isub=function(e){var t;if(0!==e.negative)return e.negative=0,t=this.iadd(e),e.negative=1,t._normSign();if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0<i?(r=this,e):(r=e,this),o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},m.prototype.sub=function(e){return this.clone().isub(e)};var u=function(e,L,D){var t,r=e.words,i=L.words,n=D.words,o=0|r[0],s=8191&o,o=o>>>13,a=0|r[1],f=8191&a,a=a>>>13,u=0|r[2],c=8191&u,u=u>>>13,h=0|r[3],d=8191&h,h=h>>>13,l=0|r[4],p=8191&l,l=l>>>13,b=0|r[5],m=8191&b,b=b>>>13,y=0|r[6],g=8191&y,y=y>>>13,v=0|r[7],_=8191&v,v=v>>>13,w=0|r[8],N=8191&w,w=w>>>13,r=0|r[9],U=8191&r,r=r>>>13,M=0|i[0],S=8191&M,M=M>>>13,A=0|i[1],k=8191&A,A=A>>>13,E=0|i[2],x=8191&E,E=E>>>13,P=0|i[3],q=8191&P,P=P>>>13,I=0|i[4],z=8191&I,I=I>>>13,R=0|i[5],H=8191&R,R=R>>>13,B=0|i[6],K=8191&B,B=B>>>13,j=0|i[7],F=8191&j,j=j>>>13,T=0|i[8],V=8191&T,T=T>>>13,i=0|i[9],W=8191&i,i=i>>>13,L=(D.negative=e.negative^L.negative,D.length=19,(0+Math.imul(s,S)|0)+((8191&(e=Math.imul(s,M)+Math.imul(o,S)|0))<<13)|0),O=(Math.imul(o,M)+(e>>>13)|0)+(L>>>26)|0;L&=67108863,t=Math.imul(f,S),e=Math.imul(f,M)+Math.imul(a,S)|0,C=Math.imul(a,M);var C,G=(O+(t+Math.imul(s,k)|0)|0)+((8191&(e=(e+Math.imul(s,A)|0)+Math.imul(o,k)|0))<<13)|0,J=(O=((C+Math.imul(o,A)|0)+(e>>>13)|0)+(G>>>26)|0,G&=67108863,t=Math.imul(c,S),e=Math.imul(c,M)+Math.imul(u,S)|0,C=Math.imul(u,M),t=t+Math.imul(f,k)|0,e=(e+Math.imul(f,A)|0)+Math.imul(a,k)|0,C=C+Math.imul(a,A)|0,(O+(t+Math.imul(s,x)|0)|0)+((8191&(e=(e+Math.imul(s,E)|0)+Math.imul(o,x)|0))<<13)|0),Z=(O=((C+Math.imul(o,E)|0)+(e>>>13)|0)+(J>>>26)|0,J&=67108863,t=Math.imul(d,S),e=Math.imul(d,M)+Math.imul(h,S)|0,C=Math.imul(h,M),t=t+Math.imul(c,k)|0,e=(e+Math.imul(c,A)|0)+Math.imul(u,k)|0,C=C+Math.imul(u,A)|0,t=t+Math.imul(f,x)|0,e=(e+Math.imul(f,E)|0)+Math.imul(a,x)|0,C=C+Math.imul(a,E)|0,(O+(t+Math.imul(s,q)|0)|0)+((8191&(e=(e+Math.imul(s,P)|0)+Math.imul(o,q)|0))<<13)|0),X=(O=((C+Math.imul(o,P)|0)+(e>>>13)|0)+(Z>>>26)|0,Z&=67108863,t=Math.imul(p,S),e=Math.imul(p,M)+Math.imul(l,S)|0,C=Math.imul(l,M),t=t+Math.imul(d,k)|0,e=(e+Math.imul(d,A)|0)+Math.imul(h,k)|0,C=C+Math.imul(h,A)|0,t=t+Math.imul(c,x)|0,e=(e+Math.imul(c,E)|0)+Math.imul(u,x)|0,C=C+Math.imul(u,E)|0,t=t+Math.imul(f,q)|0,e=(e+Math.imul(f,P)|0)+Math.imul(a,q)|0,C=C+Math.imul(a,P)|0,(O+(t+Math.imul(s,z)|0)|0)+((8191&(e=(e+Math.imul(s,I)|0)+Math.imul(o,z)|0))<<13)|0),Y=(O=((C+Math.imul(o,I)|0)+(e>>>13)|0)+(X>>>26)|0,X&=67108863,t=Math.imul(m,S),e=Math.imul(m,M)+Math.imul(b,S)|0,C=Math.imul(b,M),t=t+Math.imul(p,k)|0,e=(e+Math.imul(p,A)|0)+Math.imul(l,k)|0,C=C+Math.imul(l,A)|0,t=t+Math.imul(d,x)|0,e=(e+Math.imul(d,E)|0)+Math.imul(h,x)|0,C=C+Math.imul(h,E)|0,t=t+Math.imul(c,q)|0,e=(e+Math.imul(c,P)|0)+Math.imul(u,q)|0,C=C+Math.imul(u,P)|0,t=t+Math.imul(f,z)|0,e=(e+Math.imul(f,I)|0)+Math.imul(a,z)|0,C=C+Math.imul(a,I)|0,(O+(t+Math.imul(s,H)|0)|0)+((8191&(e=(e+Math.imul(s,R)|0)+Math.imul(o,H)|0))<<13)|0),Q=(O=((C+Math.imul(o,R)|0)+(e>>>13)|0)+(Y>>>26)|0,Y&=67108863,t=Math.imul(g,S),e=Math.imul(g,M)+Math.imul(y,S)|0,C=Math.imul(y,M),t=t+Math.imul(m,k)|0,e=(e+Math.imul(m,A)|0)+Math.imul(b,k)|0,C=C+Math.imul(b,A)|0,t=t+Math.imul(p,x)|0,e=(e+Math.imul(p,E)|0)+Math.imul(l,x)|0,C=C+Math.imul(l,E)|0,t=t+Math.imul(d,q)|0,e=(e+Math.imul(d,P)|0)+Math.imul(h,q)|0,C=C+Math.imul(h,P)|0,t=t+Math.imul(c,z)|0,e=(e+Math.imul(c,I)|0)+Math.imul(u,z)|0,C=C+Math.imul(u,I)|0,t=t+Math.imul(f,H)|0,e=(e+Math.imul(f,R)|0)+Math.imul(a,H)|0,C=C+Math.imul(a,R)|0,(O+(t+Math.imul(s,K)|0)|0)+((8191&(e=(e+Math.imul(s,B)|0)+Math.imul(o,K)|0))<<13)|0),$=(O=((C+Math.imul(o,B)|0)+(e>>>13)|0)+(Q>>>26)|0,Q&=67108863,t=Math.imul(_,S),e=Math.imul(_,M)+Math.imul(v,S)|0,C=Math.imul(v,M),t=t+Math.imul(g,k)|0,e=(e+Math.imul(g,A)|0)+Math.imul(y,k)|0,C=C+Math.imul(y,A)|0,t=t+Math.imul(m,x)|0,e=(e+Math.imul(m,E)|0)+Math.imul(b,x)|0,C=C+Math.imul(b,E)|0,t=t+Math.imul(p,q)|0,e=(e+Math.imul(p,P)|0)+Math.imul(l,q)|0,C=C+Math.imul(l,P)|0,t=t+Math.imul(d,z)|0,e=(e+Math.imul(d,I)|0)+Math.imul(h,z)|0,C=C+Math.imul(h,I)|0,t=t+Math.imul(c,H)|0,e=(e+Math.imul(c,R)|0)+Math.imul(u,H)|0,C=C+Math.imul(u,R)|0,t=t+Math.imul(f,K)|0,e=(e+Math.imul(f,B)|0)+Math.imul(a,K)|0,C=C+Math.imul(a,B)|0,(O+(t+Math.imul(s,F)|0)|0)+((8191&(e=(e+Math.imul(s,j)|0)+Math.imul(o,F)|0))<<13)|0),ee=(O=((C+Math.imul(o,j)|0)+(e>>>13)|0)+($>>>26)|0,$&=67108863,t=Math.imul(N,S),e=Math.imul(N,M)+Math.imul(w,S)|0,C=Math.imul(w,M),t=t+Math.imul(_,k)|0,e=(e+Math.imul(_,A)|0)+Math.imul(v,k)|0,C=C+Math.imul(v,A)|0,t=t+Math.imul(g,x)|0,e=(e+Math.imul(g,E)|0)+Math.imul(y,x)|0,C=C+Math.imul(y,E)|0,t=t+Math.imul(m,q)|0,e=(e+Math.imul(m,P)|0)+Math.imul(b,q)|0,C=C+Math.imul(b,P)|0,t=t+Math.imul(p,z)|0,e=(e+Math.imul(p,I)|0)+Math.imul(l,z)|0,C=C+Math.imul(l,I)|0,t=t+Math.imul(d,H)|0,e=(e+Math.imul(d,R)|0)+Math.imul(h,H)|0,C=C+Math.imul(h,R)|0,t=t+Math.imul(c,K)|0,e=(e+Math.imul(c,B)|0)+Math.imul(u,K)|0,C=C+Math.imul(u,B)|0,t=t+Math.imul(f,F)|0,e=(e+Math.imul(f,j)|0)+Math.imul(a,F)|0,C=C+Math.imul(a,j)|0,(O+(t+Math.imul(s,V)|0)|0)+((8191&(e=(e+Math.imul(s,T)|0)+Math.imul(o,V)|0))<<13)|0),S=(O=((C+Math.imul(o,T)|0)+(e>>>13)|0)+(ee>>>26)|0,ee&=67108863,t=Math.imul(U,S),e=Math.imul(U,M)+Math.imul(r,S)|0,C=Math.imul(r,M),t=t+Math.imul(N,k)|0,e=(e+Math.imul(N,A)|0)+Math.imul(w,k)|0,C=C+Math.imul(w,A)|0,t=t+Math.imul(_,x)|0,e=(e+Math.imul(_,E)|0)+Math.imul(v,x)|0,C=C+Math.imul(v,E)|0,t=t+Math.imul(g,q)|0,e=(e+Math.imul(g,P)|0)+Math.imul(y,q)|0,C=C+Math.imul(y,P)|0,t=t+Math.imul(m,z)|0,e=(e+Math.imul(m,I)|0)+Math.imul(b,z)|0,C=C+Math.imul(b,I)|0,t=t+Math.imul(p,H)|0,e=(e+Math.imul(p,R)|0)+Math.imul(l,H)|0,C=C+Math.imul(l,R)|0,t=t+Math.imul(d,K)|0,e=(e+Math.imul(d,B)|0)+Math.imul(h,K)|0,C=C+Math.imul(h,B)|0,t=t+Math.imul(c,F)|0,e=(e+Math.imul(c,j)|0)+Math.imul(u,F)|0,C=C+Math.imul(u,j)|0,t=t+Math.imul(f,V)|0,e=(e+Math.imul(f,T)|0)+Math.imul(a,V)|0,C=C+Math.imul(a,T)|0,(O+(t+Math.imul(s,W)|0)|0)+((8191&(e=(e+Math.imul(s,i)|0)+Math.imul(o,W)|0))<<13)|0),M=(O=((C+Math.imul(o,i)|0)+(e>>>13)|0)+(S>>>26)|0,S&=67108863,t=Math.imul(U,k),e=Math.imul(U,A)+Math.imul(r,k)|0,C=Math.imul(r,A),t=t+Math.imul(N,x)|0,e=(e+Math.imul(N,E)|0)+Math.imul(w,x)|0,C=C+Math.imul(w,E)|0,t=t+Math.imul(_,q)|0,e=(e+Math.imul(_,P)|0)+Math.imul(v,q)|0,C=C+Math.imul(v,P)|0,t=t+Math.imul(g,z)|0,e=(e+Math.imul(g,I)|0)+Math.imul(y,z)|0,C=C+Math.imul(y,I)|0,t=t+Math.imul(m,H)|0,e=(e+Math.imul(m,R)|0)+Math.imul(b,H)|0,C=C+Math.imul(b,R)|0,t=t+Math.imul(p,K)|0,e=(e+Math.imul(p,B)|0)+Math.imul(l,K)|0,C=C+Math.imul(l,B)|0,t=t+Math.imul(d,F)|0,e=(e+Math.imul(d,j)|0)+Math.imul(h,F)|0,C=C+Math.imul(h,j)|0,t=t+Math.imul(c,V)|0,e=(e+Math.imul(c,T)|0)+Math.imul(u,V)|0,C=C+Math.imul(u,T)|0,(O+(t+Math.imul(f,W)|0)|0)+((8191&(e=(e+Math.imul(f,i)|0)+Math.imul(a,W)|0))<<13)|0),s=(O=((C+Math.imul(a,i)|0)+(e>>>13)|0)+(M>>>26)|0,M&=67108863,t=Math.imul(U,x),e=Math.imul(U,E)+Math.imul(r,x)|0,C=Math.imul(r,E),t=t+Math.imul(N,q)|0,e=(e+Math.imul(N,P)|0)+Math.imul(w,q)|0,C=C+Math.imul(w,P)|0,t=t+Math.imul(_,z)|0,e=(e+Math.imul(_,I)|0)+Math.imul(v,z)|0,C=C+Math.imul(v,I)|0,t=t+Math.imul(g,H)|0,e=(e+Math.imul(g,R)|0)+Math.imul(y,H)|0,C=C+Math.imul(y,R)|0,t=t+Math.imul(m,K)|0,e=(e+Math.imul(m,B)|0)+Math.imul(b,K)|0,C=C+Math.imul(b,B)|0,t=t+Math.imul(p,F)|0,e=(e+Math.imul(p,j)|0)+Math.imul(l,F)|0,C=C+Math.imul(l,j)|0,t=t+Math.imul(d,V)|0,e=(e+Math.imul(d,T)|0)+Math.imul(h,V)|0,C=C+Math.imul(h,T)|0,(O+(t+Math.imul(c,W)|0)|0)+((8191&(e=(e+Math.imul(c,i)|0)+Math.imul(u,W)|0))<<13)|0),o=(O=((C+Math.imul(u,i)|0)+(e>>>13)|0)+(s>>>26)|0,s&=67108863,t=Math.imul(U,q),e=Math.imul(U,P)+Math.imul(r,q)|0,C=Math.imul(r,P),t=t+Math.imul(N,z)|0,e=(e+Math.imul(N,I)|0)+Math.imul(w,z)|0,C=C+Math.imul(w,I)|0,t=t+Math.imul(_,H)|0,e=(e+Math.imul(_,R)|0)+Math.imul(v,H)|0,C=C+Math.imul(v,R)|0,t=t+Math.imul(g,K)|0,e=(e+Math.imul(g,B)|0)+Math.imul(y,K)|0,C=C+Math.imul(y,B)|0,t=t+Math.imul(m,F)|0,e=(e+Math.imul(m,j)|0)+Math.imul(b,F)|0,C=C+Math.imul(b,j)|0,t=t+Math.imul(p,V)|0,e=(e+Math.imul(p,T)|0)+Math.imul(l,V)|0,C=C+Math.imul(l,T)|0,(O+(t+Math.imul(d,W)|0)|0)+((8191&(e=(e+Math.imul(d,i)|0)+Math.imul(h,W)|0))<<13)|0),k=(O=((C+Math.imul(h,i)|0)+(e>>>13)|0)+(o>>>26)|0,o&=67108863,t=Math.imul(U,z),e=Math.imul(U,I)+Math.imul(r,z)|0,C=Math.imul(r,I),t=t+Math.imul(N,H)|0,e=(e+Math.imul(N,R)|0)+Math.imul(w,H)|0,C=C+Math.imul(w,R)|0,t=t+Math.imul(_,K)|0,e=(e+Math.imul(_,B)|0)+Math.imul(v,K)|0,C=C+Math.imul(v,B)|0,t=t+Math.imul(g,F)|0,e=(e+Math.imul(g,j)|0)+Math.imul(y,F)|0,C=C+Math.imul(y,j)|0,t=t+Math.imul(m,V)|0,e=(e+Math.imul(m,T)|0)+Math.imul(b,V)|0,C=C+Math.imul(b,T)|0,(O+(t+Math.imul(p,W)|0)|0)+((8191&(e=(e+Math.imul(p,i)|0)+Math.imul(l,W)|0))<<13)|0),A=(O=((C+Math.imul(l,i)|0)+(e>>>13)|0)+(k>>>26)|0,k&=67108863,t=Math.imul(U,H),e=Math.imul(U,R)+Math.imul(r,H)|0,C=Math.imul(r,R),t=t+Math.imul(N,K)|0,e=(e+Math.imul(N,B)|0)+Math.imul(w,K)|0,C=C+Math.imul(w,B)|0,t=t+Math.imul(_,F)|0,e=(e+Math.imul(_,j)|0)+Math.imul(v,F)|0,C=C+Math.imul(v,j)|0,t=t+Math.imul(g,V)|0,e=(e+Math.imul(g,T)|0)+Math.imul(y,V)|0,C=C+Math.imul(y,T)|0,(O+(t+Math.imul(m,W)|0)|0)+((8191&(e=(e+Math.imul(m,i)|0)+Math.imul(b,W)|0))<<13)|0),f=(O=((C+Math.imul(b,i)|0)+(e>>>13)|0)+(A>>>26)|0,A&=67108863,t=Math.imul(U,K),e=Math.imul(U,B)+Math.imul(r,K)|0,C=Math.imul(r,B),t=t+Math.imul(N,F)|0,e=(e+Math.imul(N,j)|0)+Math.imul(w,F)|0,C=C+Math.imul(w,j)|0,t=t+Math.imul(_,V)|0,e=(e+Math.imul(_,T)|0)+Math.imul(v,V)|0,C=C+Math.imul(v,T)|0,(O+(t+Math.imul(g,W)|0)|0)+((8191&(e=(e+Math.imul(g,i)|0)+Math.imul(y,W)|0))<<13)|0),a=(O=((C+Math.imul(y,i)|0)+(e>>>13)|0)+(f>>>26)|0,f&=67108863,t=Math.imul(U,F),e=Math.imul(U,j)+Math.imul(r,F)|0,C=Math.imul(r,j),t=t+Math.imul(N,V)|0,e=(e+Math.imul(N,T)|0)+Math.imul(w,V)|0,C=C+Math.imul(w,T)|0,(O+(t+Math.imul(_,W)|0)|0)+((8191&(e=(e+Math.imul(_,i)|0)+Math.imul(v,W)|0))<<13)|0),x=(O=((C+Math.imul(v,i)|0)+(e>>>13)|0)+(a>>>26)|0,a&=67108863,t=Math.imul(U,V),e=Math.imul(U,T)+Math.imul(r,V)|0,C=Math.imul(r,T),(O+(t+Math.imul(N,W)|0)|0)+((8191&(e=(e+Math.imul(N,i)|0)+Math.imul(w,W)|0))<<13)|0),E=(O=((C+Math.imul(w,i)|0)+(e>>>13)|0)+(x>>>26)|0,x&=67108863,(O+Math.imul(U,W)|0)+((8191&(e=Math.imul(U,i)+Math.imul(r,W)|0))<<13)|0);return O=(Math.imul(r,i)+(e>>>13)|0)+(E>>>26)|0,E&=67108863,n[0]=L,n[1]=G,n[2]=J,n[3]=Z,n[4]=X,n[5]=Y,n[6]=Q,n[7]=$,n[8]=ee,n[9]=S,n[10]=M,n[11]=s,n[12]=o,n[13]=k,n[14]=A,n[15]=f,n[16]=a,n[17]=x,n[18]=E,0!=O&&(n[19]=O,D.length++),D};function c(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){for(var s=n,n=0,a=67108863&i,f=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=f;u++){var c,h=(0|e.words[o-u])*(0|t.words[u]),a=67108863&(c=(67108863&h)+a|0);n+=(s=(s=s+(h/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function y(e,t,r){return c(e,t,r)}Math.imul||(u=f),m.prototype.mulTo=function(e,t){var r=this.length+e.length,r=(10===this.length&&10===e.length?u:r<63?f:r<1024?c:y)(this,e,t);return r},m.prototype.mul=function(e){var t=new m(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},m.prototype.mulf=function(e){var t=new m(null);return t.words=new Array(this.length+e.length),y(this,e,t)},m.prototype.imul=function(e){return this.clone().mulTo(e,this)},m.prototype.imuln=function(e){for(var t=e<0,r=(b("number"==typeof(e=t?-e:e)),b(e<67108864),0),i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&r),r=(r>>=26)+(n/67108864|0)+(o>>>26);this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},m.prototype.muln=function(e){return this.clone().imuln(e)},m.prototype.sqr=function(){return this.mul(this)},m.prototype.isqr=function(){return this.imul(this.clone())},m.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++)t[r]=e.words[r/26|0]>>>r%26&1;return t}(e);if(0===t.length)return new m(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},m.prototype.iushln=function(e){b("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!=t){for(var n=0,o=0;o<this.length;o++){var s=this.words[o]&i,a=(0|this.words[o])-s<<t;this.words[o]=a|n,n=s>>>26-t}n&&(this.words[o]=n,this.length++)}if(0!=r){for(o=this.length-1;0<=o;o--)this.words[o+r]=this.words[o];for(o=0;o<r;o++)this.words[o]=0;this.length+=r}return this._strip()},m.prototype.ishln=function(e){return b(0===this.negative),this.iushln(e)},m.prototype.iushrn=function(e,t,r){b("number"==typeof e&&0<=e),i=t?(t-t%26)/26:0;var i,n=e%26,o=Math.min((e-n)/26,this.length),s=67108863^67108863>>>n<<n,a=r;if(i-=o,i=Math.max(0,i),a){for(var f=0;f<o;f++)a.words[f]=this.words[f];a.length=o}if(0!==o)if(this.length>o)for(this.length-=o,f=0;f<this.length;f++)this.words[f]=this.words[f+o];else this.words[0]=0,this.length=1;for(var u=0,f=this.length-1;0<=f&&(0!==u||i<=f);f--){var c=0|this.words[f];this.words[f]=u<<26-n|c>>>n,u=c&s}return a&&0!==u&&(a.words[a.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},m.prototype.ishrn=function(e,t,r){return b(0===this.negative),this.iushrn(e,t,r)},m.prototype.shln=function(e){return this.clone().ishln(e)},m.prototype.ushln=function(e){return this.clone().iushln(e)},m.prototype.shrn=function(e){return this.clone().ishrn(e)},m.prototype.ushrn=function(e){return this.clone().iushrn(e)},m.prototype.testn=function(e){b("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return!(this.length<=e)&&!!(this.words[e]&1<<t)},m.prototype.imaskn=function(e){b("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return b(0===this.negative,"imaskn works only with positive numbers"),this.length<=e?this:(0!=t&&e++,this.length=Math.min(e,this.length),0!=t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this._strip())},m.prototype.maskn=function(e){return this.clone().imaskn(e)},m.prototype.iaddn=function(e){return b("number"==typeof e),b(e<67108864),e<0?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},m.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&67108864<=this.words[t];t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},m.prototype.isubn=function(e){if(b("number"==typeof e),b(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this._strip()},m.prototype.addn=function(e){return this.clone().iaddn(e)},m.prototype.subn=function(e){return this.clone().isubn(e)},m.prototype.iabs=function(){return this.negative=0,this},m.prototype.abs=function(){return this.clone().iabs()},m.prototype._ishlnsubmul=function(e,t,r){for(var i=e.length+r,n=(this._expand(i),0),o=0;o<e.length;o++){var s=(0|this.words[o+r])+n,a=(0|e.words[o])*t,n=((s-=67108863&a)>>26)-(a/67108864|0);this.words[o+r]=67108863&s}for(;o<this.length-r;o++)n=(s=(0|this.words[o+r])+n)>>26,this.words[o+r]=67108863&s;if(0!==n){for(b(-1===n),o=n=0;o<this.length;o++)n=(s=-(0|this.words[o])+n)>>26,this.words[o]=67108863&s;this.negative=1}return this._strip()},m.prototype._wordDiv=function(e,t){this.length,e.length;var r,i=this.clone(),n=e,o=0|n.words[n.length-1],s=(0!=(e=26-this._countBits(o))&&(n=n.ushln(e),i.iushln(e),o=0|n.words[n.length-1]),i.length-n.length);if("mod"!==t){(r=new m(null)).length=1+s,r.words=new Array(r.length);for(var a=0;a<r.length;a++)r.words[a]=0}var f=i.clone()._ishlnsubmul(n,1,s);0===f.negative&&(i=f,r&&(r.words[s]=1));for(var u=s-1;0<=u;u--){var c=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]),c=Math.min(c/o|0,67108863);for(i._ishlnsubmul(n,c,u);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);r&&(r.words[u]=c)}return r&&r._strip(),i._strip(),"div"!==t&&0!=e&&i.iushrn(e),{div:r||null,mod:i}},m.prototype.divmod=function(e,t,r){return b(!e.isZero()),this.isZero()?{div:new m(0),mod:new m(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(n=o.mod.neg(),r&&0!==n.negative&&n.iadd(e)),{div:i,mod:n}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),{div:i="mod"!==t?o.div.neg():i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(n=o.mod.neg(),r&&0!==n.negative&&n.isub(e)),{div:o.div,mod:n}):e.length>this.length||this.cmp(e)<0?{div:new m(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new m(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new m(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,n,o},m.prototype.div=function(e){return this.divmod(e,"div",!1).div},m.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},m.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},m.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),e=e.andln(1),r=r.cmp(i);return r<0||1===e&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},m.prototype.modrn=function(e){for(var t=e<0,r=(b((e=t?-e:e)<=67108863),(1<<26)%e),i=0,n=this.length-1;0<=n;n--)i=(r*i+(0|this.words[n]))%e;return t?-i:i},m.prototype.modn=function(e){return this.modrn(e)},m.prototype.idivn=function(e){for(var t=e<0,r=(b((e=t?-e:e)<=67108863),0),i=this.length-1;0<=i;i--){var n=(0|this.words[i])+67108864*r;this.words[i]=n/e|0,r=n%e}return this._strip(),t?this.ineg():this},m.prototype.divn=function(e){return this.clone().idivn(e)},m.prototype.egcd=function(e){b(0===e.negative),b(!e.isZero());for(var t=this,r=e.clone(),t=0!==t.negative?t.umod(e):t.clone(),i=new m(1),n=new m(0),o=new m(0),s=new m(1),a=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++a;for(var f=r.clone(),u=t.clone();!t.isZero();){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(0<c)for(t.iushrn(c);0<c--;)(i.isOdd()||n.isOdd())&&(i.iadd(f),n.isub(u)),i.iushrn(1),n.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(0<d)for(r.iushrn(d);0<d--;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(u)),o.iushrn(1),s.iushrn(1);0<=t.cmp(r)?(t.isub(r),i.isub(o),n.isub(s)):(r.isub(t),o.isub(i),s.isub(n))}return{a:o,b:s,gcd:r.iushln(a)}},m.prototype._invmp=function(e){b(0===e.negative),b(!e.isZero());for(var t,r=this,i=e.clone(),r=0!==r.negative?r.umod(e):r.clone(),n=new m(1),o=new m(0),s=i.clone();0<r.cmpn(1)&&0<i.cmpn(1);){for(var a=0,f=1;0==(r.words[0]&f)&&a<26;++a,f<<=1);if(0<a)for(r.iushrn(a);0<a--;)n.isOdd()&&n.iadd(s),n.iushrn(1);for(var u=0,c=1;0==(i.words[0]&c)&&u<26;++u,c<<=1);if(0<u)for(i.iushrn(u);0<u--;)o.isOdd()&&o.iadd(s),o.iushrn(1);0<=r.cmp(i)?(r.isub(i),n.isub(o)):(i.isub(r),o.isub(n))}return(t=0===r.cmpn(1)?n:o).cmpn(0)<0&&t.iadd(e),t},m.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0;for(var i=r.negative=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0)var o=t,t=r,r=o;else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},m.prototype.invm=function(e){return this.egcd(e).a.umod(e)},m.prototype.isEven=function(){return 0==(1&this.words[0])},m.prototype.isOdd=function(){return 1==(1&this.words[0])},m.prototype.andln=function(e){return this.words[0]&e},m.prototype.bincn=function(e){b("number"==typeof e);var t=e%26,e=(e-t)/26,t=1<<t;if(this.length<=e)return this._expand(1+e),this.words[e]|=t,this;for(var r=t,i=e;0!==r&&i<this.length;i++){var n=0|this.words[i],r=(n+=r)>>>26;n&=67108863,this.words[i]=n}return 0!==r&&(this.words[i]=r,this.length++),this},m.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},m.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this._strip(),t=1<this.length?1:(b((e=t?-e:e)<=67108863,"Number is too big"),(t=0|this.words[0])===e?0:t<e?-1:1),0!==this.negative?0|-t:t):-1},m.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;e=this.ucmp(e);return 0!==this.negative?0|-e:e},m.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;0<=r;r--){var i=0|this.words[r],n=0|e.words[r];if(i!=n){i<n?t=-1:n<i&&(t=1);break}}return t},m.prototype.gtn=function(e){return 1===this.cmpn(e)},m.prototype.gt=function(e){return 1===this.cmp(e)},m.prototype.gten=function(e){return 0<=this.cmpn(e)},m.prototype.gte=function(e){return 0<=this.cmp(e)},m.prototype.ltn=function(e){return-1===this.cmpn(e)},m.prototype.lt=function(e){return-1===this.cmp(e)},m.prototype.lten=function(e){return this.cmpn(e)<=0},m.prototype.lte=function(e){return this.cmp(e)<=0},m.prototype.eqn=function(e){return 0===this.cmpn(e)},m.prototype.eq=function(e){return 0===this.cmp(e)},m.red=function(e){return new A(e)},m.prototype.toRed=function(e){return b(!this.red,"Already a number in reduction context"),b(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},m.prototype.fromRed=function(){return b(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},m.prototype._forceRed=function(e){return this.red=e,this},m.prototype.forceRed=function(e){return b(!this.red,"Already a number in reduction context"),this._forceRed(e)},m.prototype.redAdd=function(e){return b(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},m.prototype.redIAdd=function(e){return b(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},m.prototype.redSub=function(e){return b(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},m.prototype.redISub=function(e){return b(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},m.prototype.redShl=function(e){return b(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},m.prototype.redMul=function(e){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},m.prototype.redIMul=function(e){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},m.prototype.redSqr=function(){return b(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},m.prototype.redISqr=function(){return b(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},m.prototype.redSqrt=function(){return b(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},m.prototype.redInvm=function(){return b(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},m.prototype.redNeg=function(){return b(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},m.prototype.redPow=function(e){return b(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new m(t,16),this.n=this.p.bitLength(),this.k=new m(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){var t;"string"==typeof e?(t=m._prime(e),this.m=t.p,this.prime=t):(b(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null)}function k(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new m(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)}v.prototype._tmp=function(){var e=new m(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){for(var t,r=e;this.split(r,this.tmp),(t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength())>this.n;);e=t<this.n?-1:r.ucmp(this.p);return 0===e?(r.words[0]=0,r.length=1):0<e?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(_,v),_.prototype.split=function(e,t){for(var r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(4194303&o)<<4|n>>>22,n=o}0===(e.words[i-10]=n>>>=22)&&10<e.length?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(w,v),r(M,v),r(S,v),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},m._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new w;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return g[e]=t},A.prototype._verify1=function(e){b(0===e.negative,"red works only with positives"),b(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){b(0==(e.negative|t.negative),"red works only with positives"),b(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(o(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);e=e.add(t);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);e=e.iadd(t);return 0<=e.cmp(this.m)&&e.isub(this.m),e},A.prototype.sub=function(e,t){this._verify2(e,t);e=e.sub(t);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);e=e.isub(t);return e.cmpn(0)<0&&e.iadd(this.m),e},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(b(t%2==1),3===t)return t=this.m.add(new m(1)).iushrn(2),this.pow(e,t);for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);b(!r.isZero());for(var n=new m(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),a=new m(2*(a=this.m.bitLength())*a).toRed(this);0!==this.pow(a,s).cmp(o);)a.redIAdd(o);for(var f=this.pow(a,r),u=this.pow(e,r.addn(1).iushrn(1)),c=this.pow(e,r),h=i;0!==c.cmp(n);){for(var d=c,l=0;0!==d.cmp(n);l++)d=d.redSqr();b(l<h);var p=this.pow(f,new m(1).iushln(h-l-1)),u=u.redMul(p),f=p.redSqr(),c=c.redMul(f),h=l}return u},A.prototype.invm=function(e){e=e._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(e,t){if(t.isZero())return new m(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new m(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],o=0,s=0,a=t.bitLength()%26;for(0===a&&(a=26),i=t.length-1;0<=i;i--){for(var f=t.words[i],u=a-1;0<=u;u--){var c=f>>u&1;n!==r[0]&&(n=this.sqr(n)),0==c&&0===o?s=0:(o=o<<1|c,(4===++s||0===i&&0===u)&&(n=this.mul(n,r[o]),o=s=0))}a=26}return n},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){e=e.clone();return e.red=null,e},m.mont=function(e){return new k(e)},r(k,A),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){e=this.imod(e.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;e=e.imul(t),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=e.isub(t).iushrn(this.shift),t=e;return 0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new m(0)._forceRed(this);e=e.mul(t),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=e.isub(t).iushrn(this.shift),t=e;return 0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:18}],41:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":42}],42:[function(e,t,r){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],43:[function(e,t,r){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],44:[function(e,t,r){var i=e("safe-buffer").Buffer,n=e("create-hash"),o=e("readable-stream"),s=e("inherits"),a=e("./sign"),f=e("./verify"),u=e("./algorithms.json");function c(e){o.Writable.call(this);e=u[e];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function h(e){o.Writable.call(this);e=u[e];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function d(e){return new c(e)}function l(e){return new h(e)}Object.keys(u).forEach(function(e){u[e].id=i.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]}),s(c,o.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=i.from(e,t)),this._hash.update(e),this},c.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),r=a(r,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},s(h,o.Writable),h.prototype._write=function(e,t,r){this._hash.update(e),r()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=i.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,r){"string"==typeof t&&(t=i.from(t,r)),this.end();r=this._hash.digest();return f(t,r,e,this._signType,this._tag)},t.exports={Sign:d,Verify:l,createSign:d,createVerify:l}},{"./algorithms.json":42,"./sign":45,"./verify":46,"create-hash":53,inherits:102,"readable-stream":141,"safe-buffer":48}],45:[function(e,t,r){var M=e("safe-buffer").Buffer,o=e("create-hmac"),S=e("browserify-rsa"),A=e("elliptic").ec,k=e("bn.js"),E=e("parse-asn1"),x=e("./curves.json");function P(e,t,r,i){(e=M.from(e.toArray())).length<t.byteLength()&&(n=M.alloc(t.byteLength()-e.length),e=M.concat([n,e]));var n=r.length,r=function(e,t){e=(e=I(e,t)).mod(t);e=M.from(e.toArray());e.length<t.byteLength()&&(t=M.alloc(t.byteLength()-e.length),e=M.concat([t,e]));return e}(r,t),n=((t=M.alloc(n)).fill(1),M.alloc(n)),n=o(i,n).update(t).update(M.from([0])).update(e).update(r).digest(),t=o(i,n).update(t).digest();return{k:n=o(i,n).update(t).update(M.from([1])).update(e).update(r).digest(),v:t=o(i,n).update(t).digest()}}function I(e,t){var r=new k(e),e=(e.length<<3)-t.bitLength();return 0<e&&r.ishrn(e),r}function R(e,t,r){var i,n;do{for(i=M.alloc(0);8*i.length<e.bitLength();)t.v=o(r,t.k).update(t.v).digest(),i=M.concat([i,t.v])}while(n=I(i,e),t.k=o(r,t.k).update(t.v).update(M.from([0])).digest(),t.v=o(r,t.k).update(t.v).digest(),-1!==n.cmp(e));return n}t.exports=function(e,t,r,i,n){if((t=E(t)).curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");var o=e,s=t,a=x[s.curve.join(".")];if(a)return a=new A(a).keyFromPrivate(s.privateKey).sign(o),M.from(a.toDER());throw new Error("unknown curve "+s.curve.join("."))}if("dsa"===t.type){if("dsa"!==i)throw new Error("wrong private key type");for(var f,o=e,a=t,u=r,c=a.params.priv_key,h=a.params.p,d=a.params.q,l=a.params.g,p=new k(0),b=I(o,d).mod(d),m=!1,y=P(c,d,o,u);!1===m;)f=R(d,y,u),p=function(e,t,r,i){return e.toRed(k.mont(r)).redPow(t).fromRed().mod(i)}(l,f,h,d),0===(m=f.invm(d).imul(b.add(c.mul(p))).mod(d)).cmpn(0)&&(m=!1,p=new k(0));var s=p,r=m,g=(s=s.toArray(),r=r.toArray(),128&s[0]&&(s=[0].concat(s)),128&r[0]&&(r=[0].concat(r)),[48,s.length+r.length+4,2,s.length]);return g=g.concat(s,[2,r.length],r),M.from(g)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=M.concat([n,e]);for(var v=t.modulus.byteLength(),_=[0,1];e.length+_.length+1<v;)_.push(255);_.push(0);for(var w=-1;++w<e.length;)_.push(e[w]);return S(_,t)},t.exports.getKey=P,t.exports.makeKey=R},{"./curves.json":43,"bn.js":47,"browserify-rsa":39,"create-hmac":55,elliptic:68,"parse-asn1":111,"safe-buffer":48}],46:[function(e,t,r){var g=e("safe-buffer").Buffer,v=e("bn.js"),_=e("elliptic").ec,w=e("parse-asn1"),M=e("./curves.json");function S(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}t.exports=function(e,t,r,i,n){var o,s,a;if("ec"===(r=w(r)).type){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong public key type");var f=e,u=t,c=r,h=M[c.data.algorithm.curve.join(".")];if(h)return h=new _(h),c=c.data.subjectPrivateKey.data,h.verify(u,f,c);throw new Error("unknown curve "+c.data.algorithm.curve.join("."))}if("dsa"===r.type){if("dsa"!==i)throw new Error("wrong public key type");return h=e,u=t,c=(f=r).data.p,o=r.data.q,m=r.data.g,f=r.data.pub_key,h=w.signature.decode(h,"der"),s=h.s,h=h.r,S(s,o),S(h,o),a=v.mont(c),s=s.invm(o),0===m.toRed(a).redPow(new v(u).mul(s).mod(o)).fromRed().mul(f.toRed(a).redPow(h.mul(s).mod(o)).fromRed()).mod(c).mod(o).cmp(h)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong public key type");t=g.concat([n,t]);for(var d=r.modulus.byteLength(),l=[1],p=0;t.length+l.length+2<d;)l.push(255),p++;l.push(0);for(var b=-1;++b<t.length;)l.push(t[b]);var l=g.from(l),m=v.mont(r.modulus),y=(e=(e=new v(e).toRed(m)).redPow(new v(r.publicExponent)),e=g.from(e.fromRed().toArray()),p<8?1:0),d=Math.min(e.length,l.length);for(e.length!==l.length&&(y=1),b=-1;++b<d;)y|=e[b]^l[b];return 0===y}},{"./curves.json":43,"bn.js":47,elliptic:68,"parse-asn1":111,"safe-buffer":48}],47:[function(e,t,r){arguments[4][40][0].apply(r,arguments)},{buffer:18,dup:40}],48:[function(e,t,r){var i=e("buffer"),n=i.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(o(i,r),r.Buffer=s),s.prototype=Object.create(n.prototype),o(n,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=n(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},{buffer:49}],49:[function(B,e,j){!function(e){!function(){"use strict";var A=B("base64-js"),o=B("ieee754"),t=(j.Buffer=h,j.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},j.INSPECT_MAX_BYTES=50,2147483647);function f(e){if(t<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return e.__proto__=h.prototype,e}function h(e,t,r){if("number"!=typeof e)return i(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}function i(e,t,r){if("string"==typeof e){var i=e,n=t;if(!h.isEncoding(n="string"==typeof n&&""!==n?n:"utf8"))throw new TypeError("Unknown encoding: "+n);var o=0|d(i,n),s=f(o);return s=(i=s.write(i,n))!==o?s.slice(0,i):s}if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(I(e,ArrayBuffer)||e&&I(e.buffer,ArrayBuffer)){n=e,o=t,i=r;if(o<0||n.byteLength<o)throw new RangeError('"offset" is outside of buffer bounds');if(n.byteLength<o+(i||0))throw new RangeError('"length" is outside of buffer bounds');return(n=void 0===o&&void 0===i?new Uint8Array(n):void 0===i?new Uint8Array(n,o):new Uint8Array(n,o,i)).__proto__=h.prototype,n}if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');s=e.valueOf&&e.valueOf();if(null!=s&&s!==e)return h.from(s,t,r);var a=function(e){{var t,r;if(h.isBuffer(e))return t=0|c(e.length),0!==(r=f(t)).length&&e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||R(e.length)?f(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return h.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function n(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return n(e),f(e<0?0:0|c(e))}function u(e){for(var t=e.length<0?0:0|c(e.length),r=f(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function c(e){if(t<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return 0|e}function d(e,t){if(h.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||I(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=2<arguments.length&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return x(e).length;default:if(n)return i?-1:E(e).length;t=(""+t).toLowerCase(),n=!0}}function r(e,t,r){var i,n=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,s=t,a=r,f=o.length;(!a||a<0||f<a)&&(a=f);for(var u="",c=s=!s||s<0?0:s;c<a;++c)u+=function(e){return e<16?"0"+e.toString(16):e.toString(16)}(o[c]);return u;case"utf8":case"utf-8":return k(this,t,r);case"ascii":var h=this,f=t,d=r,l="";d=Math.min(h.length,d);for(var p=f;p<d;++p)l+=String.fromCharCode(127&h[p]);return l;case"latin1":case"binary":var b=this,s=t,m=r,y="";m=Math.min(b.length,m);for(var g=s;g<m;++g)y+=String.fromCharCode(b[g]);return y;case"base64":return v=this,i=r,0===(_=t)&&i===v.length?A.fromByteArray(v):A.fromByteArray(v.slice(_,i));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(var v=t,_=r,w=this.slice(v,_),M="",S=0;S<w.length;S+=2)M+=String.fromCharCode(w[S]+256*w[S+1]);return M;default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function a(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function l(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=R(r=+r)?n?0:e.length-1:r)<0?e.length+r:r)>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=h.from(t,i)),h.isBuffer(t))return 0===t.length?-1:p(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(n?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):p(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function p(e,t,r,i,n){var o=1,s=e.length,a=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s/=o=2,a/=2,r/=2}function f(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n)for(var u=-1,c=r;c<s;c++)if(f(e,c)===f(t,-1===u?0:c-u)){if(c-(u=-1===u?c:u)+1===a)return u*o}else-1!==u&&(c-=c-u),u=-1;else for(c=r=s<r+a?s-a:r;0<=c;c--){for(var h=!0,d=0;d<a;d++)if(f(e,c+d)!==f(t,d)){h=!1;break}if(h)return c}return-1}function m(e,t,r,i){return P(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function y(e,t,r,i){return P(function(e,t){for(var r,i,n=[],o=0;o<e.length&&!((t-=2)<0);++o)i=e.charCodeAt(o),r=i>>8,i=i%256,n.push(i),n.push(r);return n}(t,e.length-r),e,r,i)}function k(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var o,s,a,f,u=e[n],c=null,h=239<u?4:223<u?3:191<u?2:1;if(n+h<=r)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[n+1]))&&127<(f=(31&u)<<6|63&o)&&(c=f);break;case 3:o=e[n+1],s=e[n+2],128==(192&o)&&128==(192&s)&&2047<(f=(15&u)<<12|(63&o)<<6|63&s)&&(f<55296||57343<f)&&(c=f);break;case 4:o=e[n+1],s=e[n+2],a=e[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&65535<(f=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)&&f<1114112&&(c=f)}null===c?(c=65533,h=1):65535<c&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),n+=h}var d=i,l=d.length;if(l<=g)return String.fromCharCode.apply(String,d);for(var p="",b=0;b<l;)p+=String.fromCharCode.apply(String,d.slice(b,b+=g));return p}j.kMaxLength=t,(h.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),h.poolSize=8192,h.from=i,h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,h.alloc=function(e,t,r){return t=t,r=r,n(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?f(e).fill(t,r):f(e).fill(t):f(e)},h.allocUnsafe=s,h.allocUnsafeSlow=s,h.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==h.prototype},h.compare=function(e,t){if(I(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),I(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(e)||!h.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,i=t.length,n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},h.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);if(void 0===t)for(n=t=0;n<e.length;++n)t+=e[n].length;for(var r=h.allocUnsafe(t),i=0,n=0;n<e.length;++n){var o=e[n];if(I(o,Uint8Array)&&(o=h.from(o)),!h.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},h.byteLength=d,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)a(this,t,t+1);return this},h.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)a(this,t,t+3),a(this,t+1,t+2);return this},h.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)a(this,t,t+7),a(this,t+1,t+6),a(this,t+2,t+5),a(this,t+3,t+4);return this},h.prototype.toLocaleString=h.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):r.apply(this,arguments)},h.prototype.equals=function(e){if(h.isBuffer(e))return this===e||0===h.compare(this,e);throw new TypeError("Argument must be a Buffer")},h.prototype.inspect=function(){var e="",t=j.INSPECT_MAX_BYTES,e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim();return this.length>t&&(e+=" ... "),"<Buffer "+e+">"},h.prototype.compare=function(e,t,r,i,n){if(I(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),(t=void 0===t?0:t)<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(n<=i&&r<=t)return 0;if(n<=i)return-1;if(r<=t)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),f=this.slice(i,n),u=e.slice(t,r),c=0;c<a;++c)if(f[c]!==u[c]){o=f[c],s=u[c];break}return o<s?-1:s<o?1:0},h.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},h.prototype.indexOf=function(e,t,r){return l(this,e,t,r,!0)},h.prototype.lastIndexOf=function(e,t,r){return l(this,e,t,r,!1)},h.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||n<r)&&(r=n),0<e.length&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i=i||"utf8";for(var o,s,a,f=!1;;)switch(i){case"hex":var u=this,c=e,h=t,d=r,l=(h=Number(h)||0,u.length-h);(!d||l<(d=Number(d)))&&(d=l),(l=c.length)/2<d&&(d=l/2);for(var p=0;p<d;++p){var b=parseInt(c.substr(2*p,2),16);if(R(b))return p;u[h+p]=b}return p;case"utf8":case"utf-8":return l=t,a=r,P(E(e,(s=this).length-l),s,l,a);case"ascii":return m(this,e,t,r);case"latin1":case"binary":return m(this,e,t,r);case"base64":return s=this,a=t,o=r,P(x(e),s,a,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,e,t,r);default:if(f)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var g=4096;function b(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function v(e,t,r,i,n,o){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n<t||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function _(e,t,r,i){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function w(e,t,r,i,n){return t=+t,r>>>=0,n||_(e,0,r,4),o.write(e,t,r,i,23,4),r+4}function M(e,t,r,i,n){return t=+t,r>>>=0,n||_(e,0,r,8),o.write(e,t,r,i,52,8),r+8}h.prototype.slice=function(e,t){var r=this.length,r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e),this.subarray(e,t));return r.__proto__=h.prototype,r},h.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return i},h.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e+--t],n=1;0<t&&(n*=256);)i+=this[e+--t]*n;return i},h.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},h.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return(n*=128)<=i&&(i-=Math.pow(2,8*t)),i},h.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=t,n=1,o=this[e+--i];0<i&&(n*=256);)o+=this[e+--i]*n;return(n*=128)<=o&&(o-=Math.pow(2,8*t)),o},h.prototype.readInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},h.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},h.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||v(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},h.prototype.writeUIntBE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||v(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[t+n]=255&e;0<=--n&&(o*=256);)this[t+n]=e/o&255;return t+r},h.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,255,0),this[t]=255&e,t+1},h.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},h.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeIntLE=function(e,t,r,i){e=+e,t>>>=0,i||v(this,e,t,r,(i=Math.pow(2,8*r-1))-1,-i);var n=0,o=1,s=0;for(this[t]=255&e;++n<r&&(o*=256);)e<0&&0===s&&0!==this[t+n-1]&&(s=1),this[t+n]=(e/o>>0)-s&255;return t+r},h.prototype.writeIntBE=function(e,t,r,i){e=+e,t>>>=0,i||v(this,e,t,r,(i=Math.pow(2,8*r-1))-1,-i);var n=r-1,o=1,s=0;for(this[t+n]=255&e;0<=--n&&(o*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/o>>0)-s&255;return t+r},h.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},h.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},h.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeFloatLE=function(e,t,r){return w(this,e,t,!0,r)},h.prototype.writeFloatBE=function(e,t,r){return w(this,e,t,!1,r)},h.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},h.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},h.prototype.copy=function(e,t,r,i){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,i||0===i||(i=this.length),t>=e.length&&(t=e.length),(i=0<i&&i<r?r:i)===r)return 0;if(0===e.length||0===this.length)return 0;if((t=t||0)<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length);var n=(i=e.length-t<i-r?e.length-t+r:i)-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,i);else if(this===e&&r<t&&t<i)for(var o=n-1;0<=o;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,i),t);return n},h.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!h.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var n;1===e.length&&(n=e.charCodeAt(0),("utf8"===i&&n<128||"latin1"===i)&&(e=n))}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");var o;if(!(r<=t))if(t>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(o=t;o<r;++o)this[o]=e;else{var s=h.isBuffer(e)?e:h.from(e,i),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var S=/[^+/0-9A-Za-z-_]/g;function E(e,t){t=t||1/0;for(var r,i=e.length,n=null,o=[],s=0;s<i;++s){if(55295<(r=e.charCodeAt(s))&&r<57344){if(!n){if(56319<r){-1<(t-=3)&&o.push(239,191,189);continue}if(s+1===i){-1<(t-=3)&&o.push(239,191,189);continue}n=r;continue}if(r<56320){-1<(t-=3)&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&-1<(t-=3)&&o.push(239,191,189);if(n=null,r<128){if(--t<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function x(e){return A.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(S,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function P(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function I(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function R(e){return e!=e}}.call(this)}.call(this,B("buffer").Buffer)},{"base64-js":15,buffer:49,ieee754:101}],50:[function(e,t,r){!function(o){!function(){t.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new o(r),n=0;n<r;++n)i[n]=e[n]^t[n];return i}}.call(this)}.call(this,e("buffer").Buffer)},{buffer:49}],51:[function(e,t,r){var i=e("safe-buffer").Buffer,n=e("stream").Transform,o=e("string_decoder").StringDecoder;function s(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(s,n),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=i.from(e,t));t=this._update(e);return this.hashMode?this:r?this._toString(t,r):t},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||i.alloc(0);return t=e?this._toString(t,e,!0):t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");t=this._decoder.write(e);return r&&(t+=this._decoder.end()),t},t.exports=s},{inherits:102,"safe-buffer":143,stream:153,string_decoder:154}],52:[function(e,a,t){!function(s){!function(){var t=e("elliptic"),r=e("bn.js"),i=(a.exports=function(e){return new n(e)},{secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}});function n(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function o(e,t,r){Array.isArray(e)||(e=e.toArray());e=new s(e);return r&&e.length<r&&((r=new s(r-e.length)).fill(0),e=s.concat([r,e])),t?e.toString(t):e}i.p224=i.secp224r1,i.p256=i.secp256r1=i.prime256v1,i.p192=i.secp192r1=i.prime192v1,i.p384=i.secp384r1,i.p521=i.secp521r1,n.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},n.prototype.computeSecret=function(e,t,r){return t=t||"utf8",s.isBuffer(e)||(e=new s(e,t)),o(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},n.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),o(r,e)},n.prototype.getPrivateKey=function(e){return o(this.keys.getPrivate(),e)},n.prototype.setPublicKey=function(e,t){return t=t||"utf8",s.isBuffer(e)||(e=new s(e,t)),this.keys._importPublic(e),this},n.prototype.setPrivateKey=function(e,t){t=t||"utf8",s.isBuffer(e)||(e=new s(e,t));t=(t=new r(e)).toString(16);return this.keys=this.curve.genKeyPair(),this.keys._importPrivate(t),this}}.call(this)}.call(this,e("buffer").Buffer)},{"bn.js":16,buffer:49,elliptic:68}],53:[function(e,t,r){"use strict";var i=e("inherits"),n=e("md5.js"),o=e("ripemd160"),s=e("sha.js"),a=e("cipher-base");function f(e){a.call(this,"digest"),this._hash=e}i(f,a),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return"md5"===(e=e.toLowerCase())?new n:"rmd160"===e||"ripemd160"===e?new o:new f(s(e))}},{"cipher-base":51,inherits:102,"md5.js":103,ripemd160:142,"sha.js":146}],54:[function(e,t,r){var i=e("md5.js");t.exports=function(e){return(new i).update(e).digest()}},{"md5.js":103}],55:[function(e,t,r){"use strict";var i=e("inherits"),n=e("./legacy"),s=e("cipher-base"),a=e("safe-buffer").Buffer,o=e("create-hash/md5"),f=e("ripemd160"),u=e("sha.js"),c=a.alloc(128);function h(e,t){s.call(this,"digest"),"string"==typeof t&&(t=a.from(t));for(var r="sha512"===e||"sha384"===e?128:64,i=(this._alg=e,(this._key=t).length>r?t=("rmd160"===e?new f:u(e)).update(t).digest():t.length<r&&(t=a.concat([t,c],r)),this._ipad=a.allocUnsafe(r)),n=this._opad=a.allocUnsafe(r),o=0;o<r;o++)i[o]=54^t[o],n[o]=92^t[o];this._hash="rmd160"===e?new f:u(e),this._hash.update(i)}i(h,s),h.prototype._update=function(e){this._hash.update(e)},h.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new f:u(this._alg)).update(this._opad).update(e).digest()},t.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new h("rmd160",t):"md5"===e?new n(o,t):new h(e,t)}},{"./legacy":56,"cipher-base":51,"create-hash/md5":54,inherits:102,ripemd160:142,"safe-buffer":143,"sha.js":146}],56:[function(e,t,r){"use strict";var i=e("inherits"),o=e("safe-buffer").Buffer,s=e("cipher-base"),a=o.alloc(128);function n(e,t){s.call(this,"digest"),"string"==typeof t&&(t=o.from(t)),this._alg=e,64<(this._key=t).length?t=e(t):t.length<64&&(t=o.concat([t,a],64));for(var r=this._ipad=o.allocUnsafe(64),i=this._opad=o.allocUnsafe(64),n=0;n<64;n++)r[n]=54^t[n],i[n]=92^t[n];this._hash=[r]}i(n,s),n.prototype._update=function(e){this._hash.push(e)},n.prototype._final=function(){var e=this._alg(o.concat(this._hash));return this._alg(o.concat([this._opad,e]))},t.exports=n},{"cipher-base":51,inherits:102,"safe-buffer":143}],57:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var i=e("browserify-sign/algos"),i=Object.keys(i),n=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i),i=(r.getHashes=function(){return n},e("pbkdf2")),i=(r.pbkdf2=i.pbkdf2,r.pbkdf2Sync=i.pbkdf2Sync,e("browserify-cipher")),i=(r.Cipher=i.Cipher,r.createCipher=i.createCipher,r.Cipheriv=i.Cipheriv,r.createCipheriv=i.createCipheriv,r.Decipher=i.Decipher,r.createDecipher=i.createDecipher,r.Decipheriv=i.Decipheriv,r.createDecipheriv=i.createDecipheriv,r.getCiphers=i.getCiphers,r.listCiphers=i.listCiphers,e("diffie-hellman")),i=(r.DiffieHellmanGroup=i.DiffieHellmanGroup,r.createDiffieHellmanGroup=i.createDiffieHellmanGroup,r.getDiffieHellman=i.getDiffieHellman,r.createDiffieHellman=i.createDiffieHellman,r.DiffieHellman=i.DiffieHellman,e("browserify-sign")),i=(r.createSign=i.createSign,r.Sign=i.Sign,r.createVerify=i.createVerify,r.Verify=i.Verify,r.createECDH=e("create-ecdh"),e("public-encrypt")),i=(r.publicEncrypt=i.publicEncrypt,r.privateEncrypt=i.privateEncrypt,r.publicDecrypt=i.publicDecrypt,r.privateDecrypt=i.privateDecrypt,e("randomfill"));r.randomFill=i.randomFill,r.randomFillSync=i.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":36,"browserify-sign":44,"browserify-sign/algos":41,"create-ecdh":52,"create-hash":53,"create-hmac":55,"diffie-hellman":64,pbkdf2:112,"public-encrypt":119,randombytes:125,randomfill:126}],58:[function(e,t,r){"use strict";r.utils=e("./des/utils"),r.Cipher=e("./des/cipher"),r.DES=e("./des/des"),r.CBC=e("./des/cbc"),r.EDE=e("./des/ede")},{"./des/cbc":59,"./des/cipher":60,"./des/des":61,"./des/ede":62,"./des/utils":63}],59:[function(e,t,r){"use strict";var i=e("minimalistic-assert"),o=e("inherits"),s={};function n(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}r.instantiate=function(t){function r(e){t.call(this,e),this._cbcInit()}o(r,t);for(var e=Object.keys(s),i=0;i<e.length;i++){var n=e[i];r.prototype[n]=s[n]}return r.create=function(e){return new r(e)},r},s._cbcInit=function(){var e=new n(this.options.iv);this._cbcState=e},s._update=function(e,t,r,i){var n=this._cbcState,o=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=e[t+a];o._update.call(this,s,0,r,i);for(a=0;a<this.blockSize;a++)s[a]=r[i+a]}else{o._update.call(this,e,t,r,i);for(a=0;a<this.blockSize;a++)r[i+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=e[t+a]}}},{inherits:102,"minimalistic-assert":105}],60:[function(e,t,r){"use strict";var i=e("minimalistic-assert");function n(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}(t.exports=n).prototype._init=function(){},n.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},n.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),i=0;i<r;i++)this.buffer[this.bufferOff+i]=e[t+i];return this.bufferOff+=r,r},n.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(e){for(var t=0,r=0,i=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(i*this.blockSize),o=(0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r))),e.length-(e.length-t)%this.blockSize);t<o;t+=this.blockSize)this._update(e,t,n,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n},n.prototype._updateDecrypt=function(e){for(var t=0,r=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(i*this.blockSize);0<i;i--)t+=this._buffer(e,t),r+=this._flushBuffer(n,r);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t;return e&&(t=this.update(e)),e="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(e):e},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},n.prototype._unpad=function(e){return e},n.prototype._finalDecrypt=function(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},{"minimalistic-assert":105}],61:[function(e,t,r){"use strict";var s=e("minimalistic-assert"),i=e("inherits"),c=e("./utils"),n=e("./cipher");function o(){this.tmp=new Array(2),this.keys=null}function a(e){n.call(this,e);var t=new o;this._desState=t,this.deriveKeys(t,e.key)}i(a,n),(t.exports=a).create=function(e){return new a(e)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];a.prototype.deriveKeys=function(e,t){e.keys=new Array(32),s.equal(t.length,this.blockSize,"Invalid key length");var r=c.readUInt32BE(t,0),i=c.readUInt32BE(t,4);c.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var n=0;n<e.keys.length;n+=2){var o=f[n>>>1],r=c.r28shl(r,o),i=c.r28shl(i,o);c.pc2(r,i,e.keys,n)}},a.prototype._update=function(e,t,r,i){var n=this._desState,o=c.readUInt32BE(e,t),e=c.readUInt32BE(e,t+4);c.ip(o,e,n.tmp,0),o=n.tmp[0],e=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,e,n.tmp,0):this._decrypt(n,o,e,n.tmp,0),o=n.tmp[0],e=n.tmp[1],c.writeUInt32BE(r,o,i),c.writeUInt32BE(r,e,i+4)},a.prototype._pad=function(e,t){for(var r=e.length-t,i=t;i<e.length;i++)e[i]=r;return!0},a.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)s.equal(e[r],t);return e.slice(0,e.length-t)},a.prototype._encrypt=function(e,t,r,i,n){for(var o=t,s=r,a=0;a<e.keys.length;a+=2)var f=e.keys[a],u=e.keys[a+1],f=(c.expand(s,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1],c.substitute(f,u)),u=s,s=(o^c.permute(f))>>>0,o=u;c.rip(s,o,i,n)},a.prototype._decrypt=function(e,t,r,i,n){for(var o=r,s=t,a=e.keys.length-2;0<=a;a-=2)var f=e.keys[a],u=e.keys[a+1],f=(c.expand(o,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1],c.substitute(f,u)),u=o,o=(s^c.permute(f))>>>0,s=u;c.rip(o,s,i,n)}},{"./cipher":60,"./utils":63,inherits:102,"minimalistic-assert":105}],62:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits"),o=e("./cipher"),s=e("./des");function a(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),t=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:t})]:[s.create({type:"decrypt",key:t}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function f(e){o.call(this,e);e=new a(this.type,this.options.key);this._edeState=e}i(f,o),(t.exports=f).create=function(e){return new f(e)},f.prototype._update=function(e,t,r,i){var n=this._edeState;n.ciphers[0]._update(e,t,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},f.prototype._pad=s.prototype._pad,f.prototype._unpad=s.prototype._unpad},{"./cipher":60,"./des":61,inherits:102,"minimalistic-assert":105}],63:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,i){for(var n=0,o=0,s=6;0<=s;s-=2){for(var a=0;a<=24;a+=8)n=n<<1|t>>>a+s&1;for(a=0;a<=24;a+=8)n=n<<1|e>>>a+s&1}for(s=6;0<=s;s-=2){for(a=1;a<=25;a+=8)o=o<<1|t>>>a+s&1;for(a=1;a<=25;a+=8)o=o<<1|e>>>a+s&1}r[i+0]=n>>>0,r[i+1]=o>>>0},r.rip=function(e,t,r,i){for(var n=0,o=0,s=0;s<4;s++)for(var a=24;0<=a;a-=8)n=(n=n<<1|t>>>a+s&1)<<1|e>>>a+s&1;for(s=4;s<8;s++)for(a=24;0<=a;a-=8)o=(o=o<<1|t>>>a+s&1)<<1|e>>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r.pc1=function(e,t,r,i){for(var n=0,o=0,s=7;5<=s;s--){for(var a=0;a<=24;a+=8)n=n<<1|t>>a+s&1;for(a=0;a<=24;a+=8)n=n<<1|e>>a+s&1}for(a=0;a<=24;a+=8)n=n<<1|t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o=o<<1|t>>a+s&1;for(a=0;a<=24;a+=8)o=o<<1|e>>a+s&1}for(a=0;a<=24;a+=8)o=o<<1|e>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var f=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24],n=(r.pc2=function(e,t,r,i){for(var n=0,o=0,s=f.length>>>1,a=0;a<s;a++)n=n<<1|e>>>f[a]&1;for(a=s;a<f.length;a++)o=o<<1|t>>>f[a]&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r.expand=function(e,t,r){for(var i=0,n=0,i=(1&e)<<5|e>>>27,o=23;15<=o;o-=4)i=i<<6|e>>>o&63;for(o=11;3<=o;o-=4)n=(n|e>>>o&63)<<6;n|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0},[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11]),i=(r.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r=r<<4|n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r=r<<4|n[256+64*i+(t>>>18-6*i&63)];return r>>>0},[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7]);r.permute=function(e){for(var t=0,r=0;r<i.length;r++)t=t<<1|e>>>i[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var i=e.toString(2);i.length<t;)i="0"+i;for(var n=[],o=0;o<t;o+=r)n.push(i.slice(o,o+r));return n.join(" ")}},{}],64:[function(e,t,i){!function(f){!function(){var o=e("./lib/generatePrime"),r=e("./lib/primes.json"),s=e("./lib/dh");var a={binary:!0,hex:!0,base64:!0};i.DiffieHellmanGroup=i.createDiffieHellmanGroup=i.getDiffieHellman=function(e){var t=new f(r[e].prime,"hex"),e=new f(r[e].gen,"hex");return new s(t,e)},i.createDiffieHellman=i.DiffieHellman=function e(t,r,i,n){return f.isBuffer(r)||void 0===a[r]?e(t,"binary",r,i):(r=r||"binary",n=n||"binary",i=i||new f([2]),f.isBuffer(i)||(i=new f(i,n)),"number"==typeof t?new s(o(t,i),i,!0):(f.isBuffer(t)||(t=new f(t,r)),new s(t,i,!0)))}}.call(this)}.call(this,e("buffer").Buffer)},{"./lib/dh":65,"./lib/generatePrime":66,"./lib/primes.json":67,buffer:49}],65:[function(b,m,e){!function(p){!function(){var i=b("bn.js"),o=new(b("miller-rabin")),s=new i(24),a=new i(11),f=new i(10),u=new i(3),c=new i(7),h=b("./generatePrime"),e=b("randombytes");function n(e,t){return t=t||"utf8",p.isBuffer(e)||(e=new p(e,t)),this._pub=new i(e),this}function d(e,t){return t=t||"utf8",p.isBuffer(e)||(e=new p(e,t)),this._priv=new i(e),this}m.exports=t;var l={};function t(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=n,this.setPrivateKey=d):this._primeCode=8}function r(e,t){e=new p(e.toArray());return t?e.toString(t):e}Object.defineProperty(t.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=[t=t.toString("hex"),e.toString(16)].join("_");if(r in l)return l[r];var i,n=0;if(e.isEven()||!h.simpleSieve||!h.fermatTest(e)||!o.test(e))return l[r]=n=n+1+("02"===t||"05"===t?8:4);switch(o.test(e.shrn(1))||(n+=2),t){case"02":e.mod(s).cmp(a)&&(n+=8);break;case"05":(i=e.mod(f)).cmp(u)&&i.cmp(c)&&(n+=8);break;default:n+=4}return l[r]=n}(this.__prime,this.__gen)),this._primeCode}}),t.prototype.generateKeys=function(){return this._priv||(this._priv=new i(e(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},t.prototype.computeSecret=function(e){var e=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),e=new p(e.toArray()),t=this.getPrime();return e.length<t.length&&((t=new p(t.length-e.length)).fill(0),e=p.concat([t,e])),e},t.prototype.getPublicKey=function(e){return r(this._pub,e)},t.prototype.getPrivateKey=function(e){return r(this._priv,e)},t.prototype.getPrime=function(e){return r(this.__prime,e)},t.prototype.getGenerator=function(e){return r(this._gen,e)},t.prototype.setGenerator=function(e,t){return t=t||"utf8",p.isBuffer(e)||(e=new p(e,t)),this.__gen=e,this._gen=new i(e),this}}.call(this)}.call(this,b("buffer").Buffer)},{"./generatePrime":66,"bn.js":16,buffer:49,"miller-rabin":104,randombytes:125}],66:[function(e,t,r){var n=e("randombytes"),o=((t.exports=i).simpleSieve=m,i.fermatTest=y,e("bn.js")),s=new o(24),a=new(e("miller-rabin")),f=new o(1),u=new o(2),c=new o(5),h=(new o(16),new o(8),new o(10)),d=new o(3),l=(new o(7),new o(11)),p=new o(4),b=(new o(12),null);function m(e){for(var t=function(){if(null!==b)return b;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<t&&e[n]<=i&&r%e[n]!=0;n++);t!==n&&e[n]<=i||(e[t++]=r)}return b=e}(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function y(e){var t=o.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function i(e,t){if(e<16)return new o(2===t||5===t?[140,123]:[140,39]);var r,i;for(t=new o(t);;){for(r=new o(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(f),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(h).cmp(d);)r.iadd(p)}else for(;r.mod(s).cmp(l);)r.iadd(p);if(m(i=r.shrn(1))&&m(r)&&y(i)&&y(r)&&a.test(i)&&a.test(r))return r}}},{"bn.js":16,"miller-rabin":104,randombytes:125}],67:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],68:[function(e,t,r){"use strict";r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa")},{"../package.json":83,"./elliptic/curve":71,"./elliptic/curves":74,"./elliptic/ec":75,"./elliptic/eddsa":78,"./elliptic/utils":82,brorand:17}],69:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("../utils"),k=n.getNAF,E=n.getJSF,h=n.assert;function o(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;e=this.n&&this.p.div(this.n);!e||0<e.cmpn(100)?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function s(e,t){this.curve=e,this.type=t,this.precomputed=null}(t.exports=o).prototype.point=function(){throw new Error("Not implemented")},o.prototype.validate=function(){throw new Error("Not implemented")},o.prototype._fixedNafMul=function(e,t){h(e.precomputed);for(var r=e._getDoubles(),i=k(t,1,this._bitLength),e=(1<<r.step+1)-(r.step%2==0?2:1),n=(e/=3,[]),o=0;o<i.length;o+=r.step){for(var s=0,a=o+r.step-1;o<=a;a--)s=(s<<1)+i[a];n.push(s)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),c=e;0<c;c--){for(o=0;o<n.length;o++)(s=n[o])===c?u=u.mixedAdd(r.points[o]):s===-c&&(u=u.mixedAdd(r.points[o].neg()));f=f.add(u)}return f.toP()},o.prototype._wnafMul=function(e,t){for(var r=e._getNAFPoints(4),i=r.wnd,n=r.points,o=k(t,i,this._bitLength),s=this.jpoint(null,null,null),a=o.length-1;0<=a;a--){for(var f=0;0<=a&&0===o[a];a--)f++;if(0<=a&&f++,s=s.dblp(f),a<0)break;var u=o[a];h(0!==u),s="affine"===e.type?0<u?s.mixedAdd(n[u-1>>1]):s.mixedAdd(n[-u-1>>1].neg()):0<u?s.add(n[u-1>>1]):s.add(n[-u-1>>1].neg())}return"affine"===e.type?s.toP():s},o.prototype._wnafMulAdd=function(e,t,r,i,n){for(var o=this._wnafT1,s=this._wnafT2,a=this._wnafT3,f=0,u=0;u<i;u++){var c,h=(c=t[u])._getNAFPoints(e);o[u]=h.wnd,s[u]=h.points}for(u=i-1;1<=u;u-=2){var d=u-1,l=u;if(1!==o[d]||1!==o[l])a[d]=k(r[d],o[d],this._bitLength),a[l]=k(r[l],o[l],this._bitLength),f=Math.max(a[d].length,f),f=Math.max(a[l].length,f);else{var p=[t[d],null,null,t[l]],b=(0===t[d].y.cmp(t[l].y)?(p[1]=t[d].add(t[l]),p[2]=t[d].toJ().mixedAdd(t[l].neg())):0===t[d].y.cmp(t[l].y.redNeg())?(p[1]=t[d].toJ().mixedAdd(t[l]),p[2]=t[d].add(t[l].neg())):(p[1]=t[d].toJ().mixedAdd(t[l]),p[2]=t[d].toJ().mixedAdd(t[l].neg())),[-3,-1,-5,-7,0,7,5,1,3]),m=E(r[d],r[l]),f=Math.max(m[0].length,f);for(a[d]=new Array(f),a[l]=new Array(f),S=0;S<f;S++){var y=0|m[0][S],g=0|m[1][S];a[d][S]=b[3*(1+y)+(1+g)],a[l][S]=0,s[d]=p}}}var v=this.jpoint(null,null,null),_=this._wnafT4;for(u=f;0<=u;u--){for(var w=0;0<=u;){for(var M=!0,S=0;S<i;S++)_[S]=0|a[S][u],0!==_[S]&&(M=!1);if(!M)break;w++,u--}if(0<=u&&w++,v=v.dblp(w),u<0)break;for(S=0;S<i;S++){var A=_[S];0!==A&&(0<A?c=s[S][A-1>>1]:A<0&&(c=s[S][-A-1>>1].neg()),v="affine"===c.type?v.mixedAdd(c):v.add(c))}}for(u=0;u<i;u++)s[u]=null;return n?v:v.toP()},(o.BasePoint=s).prototype.eq=function(){throw new Error("Not implemented")},s.prototype.validate=function(){return this.curve.validate(this)},o.prototype.decodePoint=function(e,t){e=n.toArray(e,t);t=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*t)return 6===e[0]?h(e[e.length-1]%2==0):7===e[0]&&h(e[e.length-1]%2==1),this.point(e.slice(1,1+t),e.slice(1+t,1+2*t));if(2!==e[0]&&3!==e[0]||e.length-1!==t)throw new Error("Unknown point format");return this.pointFromX(e.slice(1,1+t),3===e[0])},s.prototype.encodeCompressed=function(e){return this.encode(e,!0)},s.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},s.prototype.encode=function(e,t){return n.encode(this._encode(t),e)},s.prototype.precompute=function(e){var t;return this.precomputed||((t={doubles:null,naf:null,beta:null}).naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t),this},s.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},s.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<t;n+=e){for(var o=0;o<e;o++)i=i.dbl();r.push(i)}return{step:e,points:r}},s.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=1==r?null:this.dbl(),n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}},s.prototype._getBeta=function(){return null},s.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},{"../utils":82,"bn.js":16}],70:[function(e,t,r){"use strict";var i=e("../utils"),o=e("bn.js"),n=e("inherits"),s=e("./base"),a=i.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,i,n){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(t,16),this.y=new o(r,16),this.z=i?new o(i,16):this.curve.one,this.t=n&&new o(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}n(f,s),(t.exports=f).prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},f.prototype.pointFromX=function(e,t){var r=(e=(e=new o(e,16)).red?e:e.toRed(this.red)).redSqr(),i=this.c2.redSub(this.a.redMul(r)),r=this.one.redSub(this.c2.redMul(this.d).redMul(r)),i=i.redMul(r.redInvm()),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");i=r.fromRed().isOdd();return(t&&!i||!t&&i)&&(r=r.redNeg()),this.point(e,r)},f.prototype.pointFromY=function(e,t){var r=(e=(e=new o(e,16)).red?e:e.toRed(this.red)).redSqr(),i=r.redSub(this.c2),r=r.redMul(this.d).redMul(this.c2).redSub(this.a),i=i.redMul(r.redInvm());if(0===i.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");return r.fromRed().isOdd()!==t&&(r=r.redNeg()),this.point(r,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),e=e.y.redSqr(),r=t.redMul(this.a).redAdd(e),t=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(e)));return 0===r.cmp(t)},n(u,s.BasePoint),f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},f.prototype.point=function(e,t,r,i){return new u(this,e,t,r,i)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=(r=this.z.redSqr()).redIAdd(r),i=this.curve._mulA(e),e=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),n=i.redAdd(t),r=n.redSub(r),i=i.redSub(t),t=e.redMul(r),o=n.redMul(i),e=e.redMul(i),i=r.redMul(n);return this.curve.point(t,o,i,e)},u.prototype._projDbl=function(){var e,t,r,i,n,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),f=this.y.redSqr();return o=this.curve.twisted?(o=(n=this.curve._mulA(a)).redAdd(f),this.zOne?(e=s.redSub(a).redSub(f).redMul(o.redSub(this.curve.two)),t=o.redMul(n.redSub(f)),o.redSqr().redSub(o).redSub(o)):(r=this.z.redSqr(),i=o.redSub(r).redISub(r),e=s.redSub(a).redISub(f).redMul(i),t=o.redMul(n.redSub(f)),o.redMul(i))):(n=a.redAdd(f),r=this.curve._mulC(this.z).redSqr(),i=n.redSub(r).redSub(r),e=this.curve._mulC(s.redISub(n)).redMul(i),t=this.curve._mulC(n).redMul(a.redISub(f)),n.redMul(i)),this.curve.point(e,t,o)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),e=this.z.redMul(e.z.redAdd(e.z)),n=r.redSub(t),o=e.redSub(i),e=e.redAdd(i),i=r.redAdd(t),r=n.redMul(o),t=e.redMul(i),n=n.redMul(i),i=o.redMul(e);return this.curve.point(r,t,i,n)},u.prototype._projAdd=function(e){var t,r=this.z.redMul(e.z),i=r.redSqr(),n=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(n).redMul(o),a=i.redSub(s),i=i.redAdd(s),s=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(n).redISub(o),e=r.redMul(a).redMul(s),s=this.curve.twisted?(t=r.redMul(i).redMul(o.redSub(this.curve._mulA(n))),a.redMul(i)):(t=r.redMul(i).redMul(o.redSub(n)),this.curve._mulC(a).redMul(i));return this.curve.point(e,t,s)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){var e;return this.zOne||(e=this.z.redInvm(),this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0),this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),0<=r.cmp(this.curve.p))return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},{"../utils":82,"./base":69,"bn.js":16,inherits:102}],71:[function(e,t,r){"use strict";r.base=e("./base"),r.short=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards")},{"./base":69,"./edwards":70,"./mont":72,"./short":73}],72:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("inherits"),o=e("./base"),s=e("../utils");function a(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(a,o),(t.exports=a).prototype.validate=function(e){var e=e.normalize().x,t=e.redSqr(),t=t.redMul(e).redAdd(t.redMul(this.a)).redAdd(e);return 0===t.redSqrt().redSqr().cmp(t)},n(f,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new f(this,e,t)},a.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),e=e.redMul(t),t=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(e,t)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),e=e.x.redSub(e.z).redMul(r),r=n.redMul(i),n=t.z.redMul(e.redAdd(r).redSqr()),i=t.x.redMul(e.redISub(r).redSqr());return this.curve.point(n,i)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var o=n.length-1;0<=o;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":82,"./base":69,"bn.js":16,inherits:102}],73:[function(e,t,r){"use strict";var i=e("../utils"),v=e("bn.js"),n=e("inherits"),o=e("./base"),s=i.assert;function a(e){o.call(this,"short",e),this.a=new v(e.a,16).toRed(this.red),this.b=new v(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,r,i){o.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new v(t,16),this.y=new v(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,i){o.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new v(0)):(this.x=new v(t,16),this.y=new v(r,16),this.z=new v(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}n(a,o),(t.exports=a).prototype._getEndomorphism=function(e){var t,r,i;if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3))return r=(e.beta?new v(e.beta,16):r=(r=this._getEndoRoots(this.p))[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red),e.lambda?t=new v(e.lambda,16):(i=this._getEndoRoots(this.n),0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(r))?t=i[0]:(t=i[1],s(0===this.g.mul(t).x.cmp(this.g.x.redMul(r))))),{beta:r,lambda:t,basis:e.basis?e.basis.map(function(e){return{a:new v(e.a,16),b:new v(e.b,16)}}):this._getEndoBasis(t)}},a.prototype._getEndoRoots=function(e){var e=e===this.p?this.red:v.mont(e),t=new v(2).toRed(e).redInvm(),r=t.redNeg(),e=new v(3).toRed(e).redNeg().redSqrt().redMul(t);return[r.redAdd(e).fromRed(),r.redSub(e).fromRed()]},a.prototype._getEndoBasis=function(e){for(var t,r,i,n,o,s=this.n.ushrn(Math.floor(this.n.bitLength()/2)),a=e,f=this.n.clone(),u=new v(1),c=new v(0),h=new v(0),d=new v(1),l=0;0!==a.cmpn(0);){var p=f.div(a),b=f.sub(p.mul(a)),m=h.sub(p.mul(u)),p=d.sub(p.mul(c));if(!i&&b.cmp(s)<0)t=o.neg(),r=u,i=b.neg(),n=m;else if(i&&2==++l)break;f=a,a=o=b,h=u,u=m,d=c,c=p}var e=b.neg(),y=m,g=i.sqr().add(n.sqr());return 0<=e.sqr().add(y.sqr()).cmp(g)&&(e=t,y=r),i.negative&&(i=i.neg(),n=n.neg()),e.negative&&(e=e.neg(),y=y.neg()),[{a:i,b:n},{a:e,b:y}]},a.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],t=t[1],i=t.b.mul(e).divRound(this.n),n=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=n.mul(t.a),i=i.mul(r.b),r=n.mul(t.b);return{k1:e.sub(o).sub(s),k2:i.add(r).neg()}},a.prototype.pointFromX=function(e,t){var r=(e=(e=new v(e,16)).red?e:e.toRed(this.red)).redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)},a.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,e=e.y,r=this.a.redMul(t),t=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===e.redSqr().redISub(t).cmpn(0)},a.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],f=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),f=f.neg(!0)),i[2*o]=a,i[2*o+1]=f,n[2*o]=s.k1,n[2*o+1]=s.k2}for(var r=this._wnafMulAdd(1,i,n,2*o,r),u=0;u<2*o;u++)i[u]=null,n[u]=null;return r},n(f,o.BasePoint),a.prototype.point=function(e,t,r){return new f(this,e,t,r)},a.prototype.pointFromJSON=function(e,t){return f.fromJSON(this,e,t)},f.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t,r,i=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);return e&&(t=this.curve,r=function(e){return t.point(e.x.redMul(t.endo.beta),e.y)},(e.beta=i).precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}),i}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var i=t.point(e[0],e[1],r);return e[2]&&(e=e[2],i.precomputed={beta:null,doubles:e.doubles&&{step:e.doubles.step,points:[i].concat(e.doubles.points.map(n))},naf:e.naf&&{wnd:e.naf.wnd,points:[i].concat(e.naf.points.map(n))}}),i;function n(e){return t.point(e[0],e[1],r)}},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y),e=(t=0!==t.cmpn(0)?t.redMul(this.x.redSub(e.x).redInvm()):t).redSqr().redISub(this.x).redISub(e.x),t=t.redMul(this.x.redSub(e)).redISub(this.y);return this.curve.point(e,t)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),e=e.redInvm(),r=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(e),t=r.redSqr().redISub(this.x.redAdd(this.x)),e=r.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,e)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new v(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){t=[this,t],e=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(t,e):this.curve._wnafMulAdd(1,t,e,2)},f.prototype.jmulAdd=function(e,t,r){t=[this,t],e=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(t,e,!0):this.curve._wnafMulAdd(1,t,e,2,!0)},f.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},f.prototype.neg=function(e){if(this.inf)return this;var t,r=this.curve.point(this.x,this.y.redNeg());return e&&this.precomputed&&(e=this.precomputed,t=function(e){return e.neg()},r.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(t)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(t)}}),r},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(u,o.BasePoint),a.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),t=this.y.redMul(t).redMul(e);return this.curve.point(r,t)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),t=this.y.redMul(t.redMul(e.z)),r=e.y.redMul(r.redMul(this.z)),n=i.redSub(n),r=t.redSub(r);if(0===n.cmpn(0))return 0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var o=n.redSqr(),s=o.redMul(n),i=i.redMul(o),o=r.redSqr().redIAdd(s).redISub(i).redISub(i),r=r.redMul(i.redISub(o)).redISub(t.redMul(s)),i=this.z.redMul(e.z).redMul(n);return this.curve.jpoint(o,r,i)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,e=e.y.redMul(t).redMul(this.z),t=r.redSub(i),i=n.redSub(e);if(0===t.cmpn(0))return 0!==i.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var e=t.redSqr(),o=e.redMul(t),r=r.redMul(e),e=i.redSqr().redIAdd(o).redISub(r).redISub(r),i=i.redMul(r.redISub(e)).redISub(n.redMul(o)),r=this.z.redMul(t);return this.curve.jpoint(e,i,r)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}var i=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,a=this.z,f=a.redSqr().redSqr(),u=s.redAdd(s);for(r=0;r<e;r++){var c=o.redSqr(),h=u.redSqr(),d=h.redSqr(),c=c.redAdd(c).redIAdd(c).redIAdd(i.redMul(f)),h=o.redMul(h),l=c.redSqr().redISub(h.redAdd(h)),h=h.redISub(l),c=(c=c.redMul(h)).redIAdd(c).redISub(d),h=u.redMul(a);r+1<e&&(f=f.redMul(d)),o=l,a=h,u=c}return this.curve.jpoint(o,u.redMul(n),a)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,r,i,n,o=this.zOne?(t=this.x.redSqr(),r=(e=this.y.redSqr()).redSqr(),e=(e=this.x.redAdd(e).redSqr().redISub(t).redISub(r)).redIAdd(e),i=(t=t.redAdd(t).redIAdd(t)).redSqr().redISub(e).redISub(e),r=(r=(r=r.redIAdd(r)).redIAdd(r)).redIAdd(r),e=t.redMul(e.redISub(t=i)).redISub(r),this.y.redAdd(this.y)):(i=this.x.redSqr(),n=(r=this.y.redSqr()).redSqr(),r=(r=this.x.redAdd(r).redSqr().redISub(i).redISub(n)).redIAdd(r),o=(i=i.redAdd(i).redIAdd(i)).redSqr(),n=(n=(n=n.redIAdd(n)).redIAdd(n)).redIAdd(n),t=o.redISub(r).redISub(r),e=i.redMul(r.redISub(t)).redISub(n),(o=this.y.redMul(this.z)).redIAdd(o));return this.curve.jpoint(t,e,o)},u.prototype._threeDbl=function(){var e,t,r,i,n,o,s,a;return this.zOne?(t=this.x.redSqr(),n=(e=this.y.redSqr()).redSqr(),e=(e=this.x.redAdd(e).redSqr().redISub(t).redISub(n)).redIAdd(e),r=i=(t=t.redAdd(t).redIAdd(t).redIAdd(this.curve.a)).redSqr().redISub(e).redISub(e),n=(n=(n=n.redIAdd(n)).redIAdd(n)).redIAdd(n),t=t.redMul(e.redISub(i)).redISub(n),e=this.y.redAdd(this.y)):(i=this.z.redSqr(),n=this.y.redSqr(),s=this.x.redMul(n),o=(o=this.x.redSub(i).redMul(this.x.redAdd(i))).redAdd(o).redIAdd(o),a=(s=(s=s.redIAdd(s)).redIAdd(s)).redAdd(s),r=o.redSqr().redISub(a),e=this.y.redAdd(this.z).redSqr().redISub(n).redISub(i),a=(a=(a=(a=n.redSqr()).redIAdd(a)).redIAdd(a)).redIAdd(a),t=o.redMul(s.redISub(r)).redISub(a)),this.curve.jpoint(r,t,e)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),o=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(n)),e=t.redAdd(t),n=(e=e.redIAdd(e)).redMul(s),t=o.redSqr().redISub(n.redAdd(n)),e=n.redISub(t),n=s.redSqr(),s=(n=(n=(n=n.redIAdd(n)).redIAdd(n)).redIAdd(n),o.redMul(e).redISub(n)),o=r.redAdd(r).redMul(i);return this.curve.jpoint(t,s,o)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),n=e.redAdd(e).redIAdd(e),o=n.redSqr(),e=this.x.redAdd(t).redSqr().redISub(e).redISub(i),s=(e=(e=(e=e.redIAdd(e)).redAdd(e).redIAdd(e)).redISub(o)).redSqr(),i=i.redIAdd(i),n=(i=(i=(i=i.redIAdd(i)).redIAdd(i)).redIAdd(i),n.redIAdd(e).redSqr().redISub(o).redISub(s).redISub(i)),o=t.redMul(n),t=(o=(o=o.redIAdd(o)).redIAdd(o),this.x.redMul(s).redISub(o)),o=(t=(t=t.redIAdd(t)).redIAdd(t),this.y.redMul(n.redMul(i.redISub(n)).redISub(e.redMul(s)))),i=(o=(o=(o=o.redIAdd(o)).redIAdd(o)).redIAdd(o),this.z.redAdd(e).redSqr().redISub(r).redISub(s));return this.curve.jpoint(t,o,i)},u.prototype.mul=function(e,t){return e=new v(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;t=t.redMul(this.z),r=r.redMul(e.z);return 0===this.y.redMul(r).redISub(e.y.redMul(t)).cmpn(0)},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),0<=i.cmp(this.curve.p))return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":82,"./base":69,"bn.js":16,inherits:102}],74:[function(e,t,r){"use strict";var i,n=r,r=e("hash.js"),o=e("./curve"),s=e("./utils").assert;function a(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(t,r){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var e=new a(r);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:e}),e}})}n.PresetCurve=a,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=e("./precomputed/secp256k1")}catch(e){i=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},{"./curve":71,"./precomputed/secp256k1":81,"./utils":82,"hash.js":88}],75:[function(e,t,r){"use strict";var d=e("bn.js"),l=e("hmac-drbg"),i=e("../utils"),n=e("../curves"),o=e("brorand"),a=i.assert,s=e("./key"),p=e("./signature");function f(e){if(!(this instanceof f))return new f(e);"string"==typeof e&&(a(Object.prototype.hasOwnProperty.call(n,e),"Unknown curve "+e),e=n[e]),e instanceof n.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}(t.exports=f).prototype.keyPair=function(e){return new s(this,e)},f.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},f.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},f.prototype.genKeyPair=function(e){for(var t=new l({hash:this.hash,pers:(e=e||{}).pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new d(2));;){var n=new d(t.generate(r));if(!(0<n.cmp(i)))return n.iaddn(1),this.keyFromPrivate(n)}},f.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return 0<r&&(e=e.ushrn(r)),!t&&0<=e.cmp(this.n)?e.sub(this.n):e},f.prototype.sign=function(e,t,r,i){"object"==typeof r&&(i=r,r=null),i=i||{},t=this.keyFromPrivate(t,r),e=this._truncateToN(new d(e,16));for(var r=this.n.byteLength(),n=t.getPrivate().toArray("be",r),r=e.toArray("be",r),o=new l({hash:this.hash,entropy:n,nonce:r,pers:i.pers,persEnc:i.persEnc||"utf8"}),s=this.n.sub(new d(1)),a=0;;a++){var f=i.k?i.k(a):new d(o.generate(this.n.byteLength())),f=this._truncateToN(f,!0);if(!(f.cmpn(1)<=0||0<=f.cmp(s))){var u=this.g.mul(f);if(!u.isInfinity()){var c=u.getX(),h=c.umod(this.n);if(0!==h.cmpn(0)){f=(f=f.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e))).umod(this.n);if(0!==f.cmpn(0))return u=(u.getY().isOdd()?1:0)|(0!==c.cmp(h)?2:0),i.canonical&&0<f.cmp(this.nh)&&(f=this.n.sub(f),u^=1),new p({r:h,s:f,recoveryParam:u})}}}}},f.prototype.verify=function(e,t,r,i){e=this._truncateToN(new d(e,16)),r=this.keyFromPublic(r,i);i=(t=new p(t,"hex")).r,t=t.s;if(i.cmpn(1)<0||0<=i.cmp(this.n))return!1;if(t.cmpn(1)<0||0<=t.cmp(this.n))return!1;var n,t=t.invm(this.n),e=t.mul(e).umod(this.n),t=t.mul(i).umod(this.n);return this.curve._maxwellTrick?!(n=this.g.jmulAdd(e,r.getPublic(),t)).isInfinity()&&n.eqXToP(i):!(n=this.g.mulAdd(e,r.getPublic(),t)).isInfinity()&&0===n.getX().umod(this.n).cmp(i)},f.prototype.recoverPubKey=function(e,t,r,i){a((3&r)===r,"The recovery param is more than two bits"),t=new p(t,i);var i=this.n,e=new d(e),n=t.r,o=t.s,s=1&r,r=r>>1;if(0<=n.cmp(this.curve.p.umod(this.curve.n))&&r)throw new Error("Unable to find sencond key candinate");n=r?this.curve.pointFromX(n.add(this.curve.n),s):this.curve.pointFromX(n,s),r=t.r.invm(i),s=i.sub(e).mul(r).umod(i),t=o.mul(r).umod(i);return this.g.mulAdd(s,n,t)},f.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new p(t,i)).recoveryParam)return t.recoveryParam;for(var n,o=0;o<4;o++){try{n=this.recoverPubKey(e,t,o)}catch(e){continue}if(n.eq(r))return o}throw new Error("Unable to find valid recovery factor")}},{"../curves":74,"../utils":82,"./key":76,"./signature":77,"bn.js":16,brorand:17,"hmac-drbg":100}],76:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("../utils").assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}(t.exports=o).fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||n(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":82,"bn.js":16}],77:[function(e,t,r){"use strict";var n=e("bn.js"),o=e("../utils"),i=o.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(i(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;var i=15&r;if(0==i||4<i)return!1;for(var n=0,o=0,s=t.place;o<i;o++,s++)n=((n<<=8)|e[s])>>>0;return!(n<=127)&&(t.place=s,n)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function c(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}(t.exports=s).prototype._importDER=function(e,t){e=o.toArray(e,t);t=new a;if(48!==e[t.place++])return!1;var r=f(e,t);if(!1===r)return!1;if(r+t.place!==e.length)return!1;if(2!==e[t.place++])return!1;r=f(e,t);if(!1===r)return!1;var i=e.slice(t.place,r+t.place);if(t.place+=r,2!==e[t.place++])return!1;r=f(e,t);if(!1===r)return!1;if(e.length!==r+t.place)return!1;e=e.slice(t.place,r+t.place);if(0===i[0]){if(!(128&i[1]))return!1;i=i.slice(1)}if(0===e[0]){if(!(128&e[1]))return!1;e=e.slice(1)}return this.r=new n(i),this.s=new n(e),!(this.recoveryParam=null)},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2],t=(c(i,t.length),(i=i.concat(t)).push(2),c(i,r.length),i.concat(r)),i=[48];return c(i,t.length),i=i.concat(t),o.encode(i,e)}},{"../utils":82,"bn.js":16}],78:[function(e,t,r){"use strict";var i=e("hash.js"),n=e("../curves"),o=e("../utils"),s=o.assert,a=o.parseBytes,f=e("./key"),u=e("./signature");function c(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=n[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}(t.exports=c).prototype.sign=function(e,t){e=a(e);var t=this.keyFromSecret(t),r=this.hashInt(t.messagePrefix(),e),i=this.g.mul(r),n=this.encodePoint(i),e=this.hashInt(n,t.pubBytes(),e).mul(t.priv()),t=r.add(e).umod(this.curve.n);return this.makeSignature({R:i,S:t,Rencoded:n})},c.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var r=this.keyFromPublic(r),e=this.hashInt(t.Rencoded(),r.pubBytes(),e),i=this.g.mul(t.S());return t.R().add(r.pub().mul(e)).eq(i)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(e){return f.fromPublic(this,e)},c.prototype.keyFromSecret=function(e){return f.fromSecret(this,e)},c.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},c.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},c.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),e=0!=(128&e[t]),t=o.intFromLE(r);return this.curve.pointFromY(t,e)},c.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(e){return o.intFromLE(e)},c.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../curves":74,"../utils":82,"./key":79,"./signature":80,"hash.js":88}],79:[function(e,t,r){"use strict";var i=e("../utils"),n=i.assert,o=i.parseBytes,e=i.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},e(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),e(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),e(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,t=t.slice(0,e.encodingLength);return t[0]&=248,t[r]&=127,t[r]|=64,t}),e(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),e(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),e(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return n(this._secret,"KeyPair is public only"),i.encode(this.secret(),e)},s.prototype.getPublic=function(e){return i.encode(this.pubBytes(),e)},t.exports=s},{"../utils":82}],80:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("../utils"),o=n.assert,e=n.cachedProperty,s=n.parseBytes;function a(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}e(a,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),e(a,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),e(a,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),e(a,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},a.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},t.exports=a},{"../utils":82,"bn.js":16}],81:[function(e,t,r){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],82:[function(e,t,r){"use strict";var i=r,n=e("bn.js"),r=e("minimalistic-assert"),e=e("minimalistic-crypto-utils");i.assert=r,i.toArray=e.toArray,i.zero2=e.zero2,i.toHex=e.toHex,i.encode=e.encode,i.getNAF=function(e,t,r){for(var i=new Array(Math.max(e.bitLength(),r)+1),n=(i.fill(0),1<<t+1),o=e.clone(),s=0;s<i.length;s++){var a,f=o.andln(n-1);o.isOdd()?o.isubn(a=(n>>1)-1<f?(n>>1)-f:f):a=0,i[s]=a,o.iushrn(1)}return i},i.getJSF=function(e,t){for(var r,i=[[],[]],n=(e=e.clone(),t=t.clone(),0),o=0;0<e.cmpn(-n)||0<t.cmpn(-o);){var s,a=e.andln(3)+n&3,f=t.andln(3)+o&3;3===f&&(f=-1),s=0==(1&(a=3===a?-1:a))?0:3!==(r=e.andln(7)+n&7)&&5!==r||2!==f?a:-a,i[0].push(s),a=0==(1&f)?0:3!==(r=t.andln(7)+o&7)&&5!==r||2!==a?f:-f,i[1].push(a),2*n===s+1&&(n=1-n),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return i},i.cachedProperty=function(e,t,r){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function(e){return"string"==typeof e?i.toArray(e,"hex"):e},i.intFromLE=function(e){return new n(e,"hex","le")}},{"bn.js":16,"minimalistic-assert":105,"minimalistic-crypto-utils":106}],83:[function(e,t,r){t.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}},{}],84:[function(e,t,r){"use strict";var i="object"==typeof Reflect?Reflect:null,f=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};var n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(a,f){return new Promise(function(e,t){function r(e){a.removeListener(f,i),t(e)}function i(){"function"==typeof a.removeListener&&a.removeListener("error",r),e([].slice.call(arguments))}var n,o,s;m(a,f,i,{once:!0}),"error"!==f&&(o=r,s={once:!0},"function"==typeof(n=a).on&&m(n,"error",o,s))})},(s.EventEmitter=s).prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,r,i){var n,o;return u(r),void 0===(n=e._events)?(n=e._events=Object.create(null),e._eventsCount=0):(void 0!==n.newListener&&(e.emit("newListener",t,r.listener||r),n=e._events),o=n[t]),void 0===o?(o=n[t]=r,++e._eventsCount):("function"==typeof o?o=n[t]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),0<(n=c(e))&&o.length>n&&!o.warned&&(o.warned=!0,(i=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",i.emitter=e,i.type=t,i.count=o.length,r=i,console&&console.warn&&console.warn(r))),e}function d(e,t,r){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},t=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(e);return t.listener=r,e.wrapFn=t}function l(e,t,r){e=e._events;if(void 0===e)return[];e=e[t];{if(void 0===e)return[];if("function"==typeof e)return r?[e.listener||e]:[e];if(r){for(var i=e,n=new Array(i.length),o=0;o<n.length;++o)n[o]=i[o].listener||i[o];return n}return b(e,e.length)}}function p(e){var t=this._events;if(void 0!==t){t=t[e];if("function"==typeof t)return 1;if(void 0!==t)return t.length}return 0}function b(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function m(r,i,n,o){if("function"==typeof r.on)o.once?r.once(i,n):r.on(i,n);else{if("function"!=typeof r.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r);r.addEventListener(i,function e(t){o.once&&r.removeEventListener(i,e),n(t)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){if((o=0<t.length?t[0]:o)instanceof Error)throw o;i=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw i.context=o,i}var o=n[e];if(void 0===o)return!1;if("function"==typeof o)f(o,this,t);else for(var s=o.length,a=b(o,s),r=0;r<s;++r)f(a[r],this,t);return!0},s.prototype.on=s.prototype.addListener=function(e,t){return h(this,e,t,!1)},s.prototype.prependListener=function(e,t){return h(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,d(this,e,t)),this},s.prototype.off=s.prototype.removeListener=function(e,t){var r,i,n,o,s;if(u(t),void 0!==(i=this._events)&&void 0!==(r=i[e]))if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,o=r.length-1;0<=o;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,n=o;break}if(n<0)return this;if(0===n)r.shift();else{for(var a=r,f=n;f+1<a.length;f++)a[f]=a[f+1];a.pop()}1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},s.prototype.removeAllListeners=function(e){var t,r=this._events;if(void 0!==r){if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){for(var i,n=Object.keys(r),o=0;o<n.length;++o)"removeListener"!==(i=n[o])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(o=t.length-1;0<=o;o--)this.removeListener(e,t[o])}return this},s.prototype.listeners=function(e){return l(this,e,!0)},s.prototype.rawListeners=function(e){return l(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return 0<this._eventsCount?n(this._events):[]}},{}],85:[function(e,t,r){var h=e("safe-buffer").Buffer,d=e("md5.js");t.exports=function(e,t,r,i){if(h.isBuffer(e)||(e=h.from(e,"binary")),t&&8!==(t=h.isBuffer(t)?t:h.from(t,"binary")).length)throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,o=h.alloc(n),s=h.alloc(i||0),a=h.alloc(0);0<n||0<i;){var f,u,c=new d,c=(c.update(a),c.update(e),t&&c.update(t),a=c.digest(),0);0<n&&(f=o.length-n,c=Math.min(n,a.length),a.copy(o,f,0,c),n-=c),c<a.length&&0<i&&(f=s.length-i,u=Math.min(i,a.length-c),a.copy(s,f,c,c+u),i-=u)}return a.fill(0),{key:o,iv:s}}},{"md5.js":103,"safe-buffer":143}],86:[function(e,t,r){"use strict";var u=e("safe-buffer").Buffer,i=e("readable-stream").Transform;function n(e){i.call(this),this._block=u.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(n,i),n.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)},n.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},n.prototype.update=function(e,t){var r=e,i="Data";if(!u.isBuffer(r)&&"string"!=typeof r)throw new TypeError(i+" must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");u.isBuffer(e)||(e=u.from(e,t));for(var n=this._block,o=0;this._blockOffset+e.length-o>=this._blockSize;){for(var s=this._blockOffset;s<this._blockSize;)n[s++]=e[o++];this._update(),this._blockOffset=0}for(;o<e.length;)n[this._blockOffset++]=e[o++];for(var a=0,f=8*e.length;0<f;++a)this._length[a]+=f,0<(f=this._length[a]/4294967296|0)&&(this._length[a]-=4294967296*f);return this},n.prototype._update=function(){throw new Error("_update is not implemented")},n.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0);for(var r=this._blockOffset=0;r<4;++r)this._length[r]=0;return t},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n},{inherits:102,"readable-stream":141,"safe-buffer":87}],87:[function(e,t,r){arguments[4][48][0].apply(r,arguments)},{buffer:49,dup:48}],88:[function(e,t,r){r.utils=e("./hash/utils"),r.common=e("./hash/common"),r.sha=e("./hash/sha"),r.ripemd=e("./hash/ripemd"),r.hmac=e("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},{"./hash/common":89,"./hash/hmac":90,"./hash/ripemd":91,"./hash/sha":92,"./hash/utils":99}],89:[function(e,t,r){"use strict";var i=e("./utils"),n=e("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}(r.BlockHash=o).prototype.update=function(e,t){if(e=i.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){t=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-t,e.length),0===this.pending.length&&(this.pending=null),e=i.join32(e,0,e.length-t,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),n(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=e>>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;o<this.padLength;o++)i[n++]=0;return i}},{"./utils":99,"minimalistic-assert":105}],90:[function(e,t,r){"use strict";var i=e("./utils"),n=e("minimalistic-assert");function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(t,r))}(t.exports=o).prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"./utils":99,"minimalistic-assert":105}],91:[function(e,t,r){"use strict";var i=e("./utils"),e=e("./common"),b=i.rotl32,m=i.sum32,y=i.sum32_3,g=i.sum32_4,n=e.BlockHash;function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function v(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}i.inherits(o,n),(r.ripemd160=o).blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,t){for(var r,i=c=this.h[0],n=p=this.h[1],o=l=this.h[2],s=d=this.h[3],a=h=this.h[4],f=0;f<80;f++)var u=m(b(g(c,v(f,p,l,d),e[_[f]+t],(r=f)<=15?0:r<=31?1518500249:r<=47?1859775393:r<=63?2400959708:2840853838),M[f]),h),c=h,h=d,d=b(l,10),l=p,p=u,u=m(b(g(i,v(79-f,n,o,s),e[w[f]+t],(r=f)<=15?1352829926:r<=31?1548603684:r<=47?1836072691:r<=63?2053994217:0),S[f]),a),i=a,a=s,s=b(o,10),o=n,n=u;u=y(this.h[1],l,s),this.h[1]=y(this.h[2],d,a),this.h[2]=y(this.h[3],h,i),this.h[3]=y(this.h[4],c,n),this.h[4]=y(this.h[0],p,o),this.h[0]=u},o.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var _=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],S=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":89,"./utils":99}],92:[function(e,t,r){"use strict";r.sha1=e("./sha/1"),r.sha224=e("./sha/224"),r.sha256=e("./sha/256"),r.sha384=e("./sha/384"),r.sha512=e("./sha/512")},{"./sha/1":93,"./sha/224":94,"./sha/256":95,"./sha/384":96,"./sha/512":97}],93:[function(e,t,r){"use strict";var i=e("../utils"),n=e("../common"),e=e("./common"),c=i.rotl32,h=i.sum32,d=i.sum32_5,l=e.ft_1,o=n.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function s(){if(!(this instanceof s))return new s;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(s,o),(t.exports=s).blockSize=512,s.outSize=160,s.hmacStrength=80,s.padLength=64,s.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=c(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);for(var n=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],f=this.h[4],i=0;i<r.length;i++)var u=~~(i/20),u=d(c(n,5),l(u,o,s,a),f,r[i],p[u]),f=a,a=s,s=c(o,30),o=n,n=u;this.h[0]=h(this.h[0],n),this.h[1]=h(this.h[1],o),this.h[2]=h(this.h[2],s),this.h[3]=h(this.h[3],a),this.h[4]=h(this.h[4],f)},s.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":89,"../utils":99,"./common":98}],94:[function(e,t,r){"use strict";var i=e("../utils"),n=e("./256");function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(o,n),(t.exports=o).blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},{"../utils":99,"./256":95}],95:[function(e,t,r){"use strict";var i=e("../utils"),n=e("../common"),o=e("./common"),p=e("minimalistic-assert"),b=i.sum32,m=i.sum32_4,y=i.sum32_5,g=o.ch32,v=o.maj32,_=o.s0_256,w=o.s1_256,M=o.g0_256,S=o.g1_256,s=n.BlockHash,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function f(){if(!(this instanceof f))return new f;s.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=a,this.W=new Array(64)}i.inherits(f,s),(t.exports=f).blockSize=512,f.outSize=256,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=m(S(r[i-2]),r[i-7],M(r[i-15]),r[i-16]);var n=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],f=this.h[4],u=this.h[5],c=this.h[6],h=this.h[7];for(p(this.k.length===r.length),i=0;i<r.length;i++)var d=y(h,w(f),g(f,u,c),this.k[i],r[i]),l=b(_(n),v(n,o,s)),h=c,c=u,u=f,f=b(a,d),a=s,s=o,o=n,n=b(d,l);this.h[0]=b(this.h[0],n),this.h[1]=b(this.h[1],o),this.h[2]=b(this.h[2],s),this.h[3]=b(this.h[3],a),this.h[4]=b(this.h[4],f),this.h[5]=b(this.h[5],u),this.h[6]=b(this.h[6],c),this.h[7]=b(this.h[7],h)},f.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":89,"../utils":99,"./common":98,"minimalistic-assert":105}],96:[function(e,t,r){"use strict";var i=e("../utils"),n=e("./512");function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(o,n),(t.exports=o).blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},{"../utils":99,"./512":97}],97:[function(e,t,r){"use strict";var i=e("../utils"),n=e("../common"),B=e("minimalistic-assert"),j=i.rotr64_hi,T=i.rotr64_lo,d=i.shr64_hi,l=i.shr64_lo,O=i.sum64,C=i.sum64_hi,L=i.sum64_lo,p=i.sum64_4_hi,b=i.sum64_4_lo,D=i.sum64_5_hi,N=i.sum64_5_lo,o=n.BlockHash,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=s,this.W=new Array(160)}i.inherits(a,o),(t.exports=a).blockSize=1024,a.outSize=512,a.hmacStrength=192,a.padLength=128,a.prototype._prepareBlock=function(e,t){for(var r=this.W,i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=function(e,t){var r=j(e,t,19),i=j(t,e,29),e=d(e,t,6),t=r^i^e;t<0&&(t+=4294967296);return t}(r[i-4],r[i-3]),o=function(e,t){var r=T(e,t,19),i=T(t,e,29),e=l(e,t,6),t=r^i^e;t<0&&(t+=4294967296);return t}(r[i-4],r[i-3]),s=r[i-14],a=r[i-13],f=function(e,t){var r=j(e,t,1),i=j(e,t,8),e=d(e,t,7),t=r^i^e;t<0&&(t+=4294967296);return t}(r[i-30],r[i-29]),u=function(e,t){var r=T(e,t,1),i=T(e,t,8),e=l(e,t,7),t=r^i^e;t<0&&(t+=4294967296);return t}(r[i-30],r[i-29]),c=r[i-32],h=r[i-31];r[i]=p(n,o,s,a,f,u,c,h),r[i+1]=b(n,o,s,a,f,u,c,h)}},a.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],n=this.h[1],o=this.h[2],s=this.h[3],a=this.h[4],f=this.h[5],u=this.h[6],c=this.h[7],h=this.h[8],d=this.h[9],l=this.h[10],p=this.h[11],b=this.h[12],m=this.h[13],y=this.h[14],g=this.h[15];B(this.k.length===r.length);for(var v=0;v<r.length;v+=2)var _=y,w=g,M=function(e,t){var r=j(e,t,14),i=j(e,t,18),t=j(t,e,9),e=r^i^t;e<0&&(e+=4294967296);return e}(h,d),S=function(e,t){var r=T(e,t,14),i=T(e,t,18),t=T(t,e,9),e=r^i^t;e<0&&(e+=4294967296);return e}(h,d),A=function(e,t,r){t=e&t^~e&r;t<0&&(t+=4294967296);return t}(h,l,b),k=function(e,t,r){t=e&t^~e&r;t<0&&(t+=4294967296);return t}(d,p,m),E=this.k[v],x=this.k[v+1],P=r[v],I=r[v+1],R=D(_,w,M,S,A,k,E,x,P,I),A=N(_,w,M,S,A,k,E,x,P,I),_=function(e,t){var r=j(e,t,28),i=j(t,e,2),t=j(t,e,7),e=r^i^t;e<0&&(e+=4294967296);return e}(i,n),w=function(e,t){var r=T(e,t,28),i=T(t,e,2),t=T(t,e,7),e=r^i^t;e<0&&(e+=4294967296);return e}(i,n),M=function(e,t,r){e=e&t^e&r^t&r;e<0&&(e+=4294967296);return e}(i,o,a),S=function(e,t,r){e=e&t^e&r^t&r;e<0&&(e+=4294967296);return e}(n,s,f),k=C(_,w,M,S),E=L(_,w,M,S),y=b,g=m,b=l,m=p,l=h,p=d,h=C(u,c,R,A),d=L(c,c,R,A),u=a,c=f,a=o,f=s,o=i,s=n,i=C(R,A,k,E),n=L(R,A,k,E);O(this.h,0,i,n),O(this.h,2,o,s),O(this.h,4,a,f),O(this.h,6,u,c),O(this.h,8,h,d),O(this.h,10,l,p),O(this.h,12,b,m),O(this.h,14,y,g)},a.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":89,"../utils":99,"minimalistic-assert":105}],98:[function(e,t,r){"use strict";var i=e("../utils").rotr32;function n(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}r.ft_1=function(e,t,r,i){return 0===e?n(t,r,i):1===e||3===e?t^r^i:2===e?o(t,r,i):void 0},r.ch32=n,r.maj32=o,r.p32=s,r.s0_256=function(e){return i(e,2)^i(e,13)^i(e,22)},r.s1_256=function(e){return i(e,6)^i(e,11)^i(e,25)},r.g0_256=function(e){return i(e,7)^i(e,18)^e>>>3},r.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},{"../utils":99}],99:[function(e,t,r){"use strict";var f=e("minimalistic-assert"),e=e("inherits");function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function i(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=e,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r,i,n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),s=0;s<e.length;s+=2)n.push(parseInt(e[s]+e[s+1],16))}else for(var o=0,s=0;s<e.length;s++){var a=e.charCodeAt(s);a<128?n[o++]=a:a<2048?(n[o++]=a>>6|192,n[o++]=63&a|128):(i=s,55296!=(64512&(r=e).charCodeAt(i))||i<0||i+1>=r.length||56320!=(64512&r.charCodeAt(i+1))?n[o++]=a>>12|224:(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++s)),n[o++]=a>>18|240,n[o++]=a>>12&63|128),n[o++]=a>>6&63|128,n[o++]=63&a|128)}else for(s=0;s<e.length;s++)n[s]=0|e[s];return n},r.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t},r.htonl=o,r.toHex32=function(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];r+=s((n="little"===t?o(n):n).toString(16))}return r},r.zero2=i,r.zero8=s,r.join32=function(e,t,r,i){f((r=r-t)%4==0);for(var n=new Array(r/4),o=0,s=t;o<n.length;o++,s+=4){var a="big"===i?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s];n[o]=a>>>0}return n},r.split32=function(e,t){for(var r=new Array(4*e.length),i=0,n=0;i<e.length;i++,n+=4){var o=e[i];"big"===t?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<<t|e>>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,i){return e+t+r+i>>>0},r.sum32_5=function(e,t,r,i,n){return e+t+r+i+n>>>0},r.sum64=function(e,t,r,i){var n=e[t],o=i+e[t+1]>>>0;e[t]=(o<i?1:0)+r+n>>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,i){return(t+i>>>0<t?1:0)+e+r>>>0},r.sum64_lo=function(e,t,r,i){return t+i>>>0},r.sum64_4_hi=function(e,t,r,i,n,o,s,a){var f=0;return e+r+n+s+((f+=(e=t+i>>>0)<t?1:0)+((e=e+o>>>0)<o?1:0)+(e+a>>>0<a?1:0))>>>0},r.sum64_4_lo=function(e,t,r,i,n,o,s,a){return t+i+o+a>>>0},r.sum64_5_hi=function(e,t,r,i,n,o,s,a,f,u){var c=0;return e+r+n+s+f+(c+((e=t+i>>>0)<t?1:0)+((e=e+o>>>0)<o?1:0)+((e=e+a>>>0)<a?1:0)+(e+u>>>0<u?1:0))>>>0},r.sum64_5_lo=function(e,t,r,i,n,o,s,a,f,u){return t+i+o+a+u>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:102,"minimalistic-assert":105}],100:[function(e,t,r){"use strict";var i=e("hash.js"),o=e("minimalistic-crypto-utils"),n=e("minimalistic-assert");function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),r=o.toArray(e.nonce,e.nonceEnc||"hex"),e=o.toArray(e.pers,e.persEnc||"hex");n(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,e)}(t.exports=s).prototype._init=function(e,t,r){e=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(e),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(e,t,r,i){"string"!=typeof t&&(i=r,r=t,t=null),e=o.toArray(e,t),r=o.toArray(r,i),n(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=o.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);i=n.slice(0,e);return this._update(r),this._reseed++,o.encode(i,t)}},{"hash.js":88,"minimalistic-assert":105,"minimalistic-crypto-utils":106}],101:[function(e,t,r){r.read=function(e,t,r,i,n){var o,s,a=8*n-i-1,f=(1<<a)-1,u=f>>1,c=-7,h=r?n-1:0,d=r?-1:1,n=e[t+h];for(h+=d,o=n&(1<<-c)-1,n>>=-c,c+=a;0<c;o=256*o+e[t+h],h+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;0<c;s=256*s+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===f)return s?NaN:1/0*(n?-1:1);s+=Math.pow(2,i),o-=u}return(n?-1:1)*s*Math.pow(2,o-i)},r.write=function(e,t,r,i,n,o){var s,a,f=8*o-n-1,u=(1<<f)-1,c=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,l=i?1:-1,o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(i=Math.pow(2,-s))<1&&(s--,i*=2),2<=(t+=1<=s+c?h/i:h*Math.pow(2,1-c))*i&&(s++,i/=2),u<=s+c?(a=0,s=u):1<=s+c?(a=(t*i-1)*Math.pow(2,n),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,n),s=0));8<=n;e[r+d]=255&a,d+=l,a/=256,n-=8);for(s=s<<n|a,f+=n;0<f;e[r+d]=255&s,d+=l,s/=256,f-=8);e[r+d-l]|=128*o}},{}],102:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){var r;t&&(e.super_=t,(r=function(){}).prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e)}},{}],103:[function(e,t,r){"use strict";var i=e("inherits"),n=e("hash-base"),o=e("safe-buffer").Buffer,s=new Array(16);function a(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<<t|e>>>32-t}function u(e,t,r,i,n,o,s){return f(e+(t&r|~t&i)+n+o|0,s)+t|0}function c(e,t,r,i,n,o,s){return f(e+(t&i|r&~i)+n+o|0,s)+t|0}function h(e,t,r,i,n,o,s){return f(e+(t^r^i)+n+o|0,s)+t|0}function d(e,t,r,i,n,o,s){return f(e+(r^(t|~i))+n+o|0,s)+t|0}i(a,n),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=u(this._a,o=this._b,n=this._c,i=this._d,e[0],3614090360,7),i=u(i,r,o,n,e[1],3905402710,12),n=u(n,i,r,o,e[2],606105819,17),o=u(o,n,i,r,e[3],3250441966,22);r=u(r,o,n,i,e[4],4118548399,7),i=u(i,r,o,n,e[5],1200080426,12),n=u(n,i,r,o,e[6],2821735955,17),o=u(o,n,i,r,e[7],4249261313,22),r=u(r,o,n,i,e[8],1770035416,7),i=u(i,r,o,n,e[9],2336552879,12),n=u(n,i,r,o,e[10],4294925233,17),o=u(o,n,i,r,e[11],2304563134,22),r=u(r,o,n,i,e[12],1804603682,7),i=u(i,r,o,n,e[13],4254626195,12),n=u(n,i,r,o,e[14],2792965006,17),r=c(r,o=u(o,n,i,r,e[15],1236535329,22),n,i,e[1],4129170786,5),i=c(i,r,o,n,e[6],3225465664,9),n=c(n,i,r,o,e[11],643717713,14),o=c(o,n,i,r,e[0],3921069994,20),r=c(r,o,n,i,e[5],3593408605,5),i=c(i,r,o,n,e[10],38016083,9),n=c(n,i,r,o,e[15],3634488961,14),o=c(o,n,i,r,e[4],3889429448,20),r=c(r,o,n,i,e[9],568446438,5),i=c(i,r,o,n,e[14],3275163606,9),n=c(n,i,r,o,e[3],4107603335,14),o=c(o,n,i,r,e[8],1163531501,20),r=c(r,o,n,i,e[13],2850285829,5),i=c(i,r,o,n,e[2],4243563512,9),n=c(n,i,r,o,e[7],1735328473,14),r=h(r,o=c(o,n,i,r,e[12],2368359562,20),n,i,e[5],4294588738,4),i=h(i,r,o,n,e[8],2272392833,11),n=h(n,i,r,o,e[11],1839030562,16),o=h(o,n,i,r,e[14],4259657740,23),r=h(r,o,n,i,e[1],2763975236,4),i=h(i,r,o,n,e[4],1272893353,11),n=h(n,i,r,o,e[7],4139469664,16),o=h(o,n,i,r,e[10],3200236656,23),r=h(r,o,n,i,e[13],681279174,4),i=h(i,r,o,n,e[0],3936430074,11),n=h(n,i,r,o,e[3],3572445317,16),o=h(o,n,i,r,e[6],76029189,23),r=h(r,o,n,i,e[9],3654602809,4),i=h(i,r,o,n,e[12],3873151461,11),n=h(n,i,r,o,e[15],530742520,16),r=d(r,o=h(o,n,i,r,e[2],3299628645,23),n,i,e[0],4096336452,6),i=d(i,r,o,n,e[7],1126891415,10),n=d(n,i,r,o,e[14],2878612391,15),o=d(o,n,i,r,e[5],4237533241,21),r=d(r,o,n,i,e[12],1700485571,6),i=d(i,r,o,n,e[3],2399980690,10),n=d(n,i,r,o,e[10],4293915773,15),o=d(o,n,i,r,e[1],2240044497,21),r=d(r,o,n,i,e[8],1873313359,6),i=d(i,r,o,n,e[15],4264355552,10),n=d(n,i,r,o,e[6],2734768916,15),o=d(o,n,i,r,e[13],1309151649,21),r=d(r,o,n,i,e[4],4149444226,6),i=d(i,r,o,n,e[11],3174756917,10),n=d(n,i,r,o,e[2],718787259,15),o=d(o,n,i,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+o|0,this._c=this._c+n|0,this._d=this._d+i|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=a},{"hash-base":86,inherits:102,"safe-buffer":143}],104:[function(e,t,r){var l=e("bn.js"),i=e("brorand");function n(e){this.rand=e||new i.Rand}(t.exports=n).create=function(e){return new n(e)},n.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new l(this.rand.generate(r))}while(0<=i.cmp(e));return i},n.prototype._randrange=function(e,t){t=t.sub(e);return e.add(this._randbelow(t))},n.prototype.test=function(e,t,r){for(var i=e.bitLength(),n=l.mont(e),o=new l(1).toRed(n),s=(t=t||Math.max(1,i/48|0),e.subn(1)),a=0;!s.testn(a);a++);for(var f=e.shrn(a),u=s.toRed(n);0<t;t--){var c=this._randrange(new l(2),s),h=(r&&r(c),c.toRed(n).redPow(f));if(0!==h.cmp(o)&&0!==h.cmp(u)){for(var d=1;d<a;d++){if(0===(h=h.redSqr()).cmp(o))return!1;if(0===h.cmp(u))break}if(d===a)return!1}}return!0},n.prototype.getDivisor=function(e,t){for(var r=e.bitLength(),i=l.mont(e),n=new l(1).toRed(i),o=(t=t||Math.max(1,r/48|0),e.subn(1)),s=0;!o.testn(s);s++);for(var a=e.shrn(s),f=o.toRed(i);0<t;t--){var u=this._randrange(new l(2),o),c=e.gcd(u);if(0!==c.cmpn(1))return c;var h=u.toRed(i).redPow(a);if(0!==h.cmp(n)&&0!==h.cmp(f)){for(var d=1;d<s;d++){if(0===(h=h.redSqr()).cmp(n))return h.fromRed().subn(1).gcd(e);if(0===h.cmp(f))break}if(d===s)return(h=h.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},{"bn.js":16,brorand:17}],105:[function(e,t,r){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}(t.exports=i).equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],106:[function(e,t,r){"use strict";function i(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e)for(var i=0;i<e.length;i++)r[i]=0|e[i];else if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(i=0;i<e.length;i++){var n=e.charCodeAt(i),o=n>>8,n=255&n;o?r.push(o,n):r.push(n)}return r},r.zero2=i,r.toHex=n,r.encode=function(e,t){return"hex"===t?n(e):e}},{}],107:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],108:[function(e,t,r){"use strict";var i=e("asn1.js"),e=(r.certificate=e("./certificate"),i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())})),e=(r.RSAPrivateKey=e,i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())})),e=(r.RSAPublicKey=e,i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(n),this.key("subjectPublicKey").bitstr())})),n=(r.PublicKey=e,i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),e=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(n),this.key("subjectPrivateKey").octstr())}),e=(r.PrivateKey=e,i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())})),e=(r.EncryptedPrivateKey=e,i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())})),e=(r.DSAPrivateKey=e,r.DSAparam=i.define("DSAparam",function(){this.int()}),i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(o),this.key("publicKey").optional().explicit(1).bitstr())})),o=(r.ECPrivateKey=e,i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}));r.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":109,"asn1.js":1}],109:[function(e,t,r){"use strict";var e=e("asn1.js"),i=e.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),n=e.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=e.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),s=e.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),a=e.define("RelativeDistinguishedName",function(){this.setof(n)}),f=e.define("RDNSequence",function(){this.seqof(a)}),u=e.define("Name",function(){this.choice({rdnSequence:this.use(f)})}),c=e.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),h=e.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=e.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(u),this.key("validity").use(c),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())}),e=e.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});t.exports=e},{"asn1.js":1}],110:[function(e,t,r){var s=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,f=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,u=e("evp_bytestokey"),c=e("browserify-aes"),h=e("safe-buffer").Buffer;t.exports=function(e,t){var r,i,n,e=e.toString(),o=e.match(s);return n=o?(i="aes"+o[1],n=h.from(o[2],"hex"),r=h.from(o[3].replace(/[\r\n]/g,""),"base64"),t=u(t,n.slice(0,8),parseInt(o[1],10)).key,o=[],i=c.createDecipheriv(i,t,n),o.push(i.update(r)),o.push(i.final()),h.concat(o)):(t=e.match(f),h.from(t[2].replace(/[\r\n]/g,""),"base64")),{tag:e.match(a)[1],data:n}}},{"browserify-aes":21,evp_bytestokey:85,"safe-buffer":143}],111:[function(e,t,r){var l=e("./asn1"),p=e("./aesid.json"),b=e("./fixProc"),m=e("browserify-aes"),y=e("pbkdf2"),g=e("safe-buffer").Buffer;function i(e){"object"!=typeof e||g.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=g.from(e));var t,r,i,n,o,s,a,f,u,c,e=b(e,t),h=e.tag,d=e.data;switch(h){case"CERTIFICATE":i=l.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(r=(i=i||l.PublicKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return l.RSAPublicKey.decode(i.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return i.subjectPrivateKey=i.subjectPublicKey,{type:"ec",data:i};case"1.2.840.10040.4.1":return i.algorithm.params.pub_key=l.DSAparam.decode(i.subjectPublicKey.data,"der"),{type:"dsa",data:i.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":d=l.EncryptedPrivateKey.decode(d,"der"),o=t,s=(n=d).algorithm.decrypt.kde.kdeparams.salt,a=parseInt(n.algorithm.decrypt.kde.kdeparams.iters.toString(),10),f=p[n.algorithm.decrypt.cipher.algo.join(".")],u=n.algorithm.decrypt.cipher.iv,n=n.subjectPrivateKey,c=parseInt(f.split("-")[1],10)/8,o=y.pbkdf2Sync(o,s,a,c,"sha1"),s=m.createDecipheriv(f,o,u),(a=[]).push(s.update(n)),a.push(s.final()),d=g.concat(a);case"PRIVATE KEY":switch(r=(i=l.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return l.RSAPrivateKey.decode(i.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:i.algorithm.curve,privateKey:l.ECPrivateKey.decode(i.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return i.algorithm.params.priv_key=l.DSAparam.decode(i.subjectPrivateKey,"der"),{type:"dsa",params:i.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return l.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return l.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:l.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=l.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}(t.exports=i).signature=l.signature},{"./aesid.json":107,"./asn1":108,"./fixProc":110,"browserify-aes":21,pbkdf2:112,"safe-buffer":143}],112:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":113,"./lib/sync":116}],113:[function(t,r,e){!function(_){!function(){var u,e,c=t("safe-buffer").Buffer,h=t("./precondition"),d=t("./default-encoding"),l=t("./sync"),p=t("./to-buffer"),b=_.crypto&&_.crypto.subtle,m={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},y=[];function g(){return e=e||(_.process&&_.process.nextTick?_.process.nextTick:_.queueMicrotask||_.setImmediate||_.setTimeout)}function v(e,t,r,i,n){return b.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return b.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},e,i<<3)}).then(function(e){return c.from(e)})}r.exports=function(t,r,i,n,o,s){"function"==typeof o&&(s=o,o=void 0);var e,a,f=m[(o=o||"sha1").toLowerCase()];if(f&&"function"==typeof _.Promise){if(h(i,n),t=p(t,d,"Password"),r=p(r,d,"Salt"),"function"!=typeof s)throw new Error("No callback provided to pbkdf2");e=function(e){if(_.process&&!_.process.browser)return Promise.resolve(!1);if(!b||!b.importKey||!b.deriveBits)return Promise.resolve(!1);if(void 0!==y[e])return y[e];var t=v(u=u||c.alloc(8),u,10,128,e).then(function(){return!0}).catch(function(){return!1});return y[e]=t}(f).then(function(e){return e?v(t,r,i,n,f):l(t,r,i,n,o)}),a=s,e.then(function(e){g()(function(){a(null,e)})},function(e){g()(function(){a(e)})})}else g()(function(){var e;try{e=l(t,r,i,n,o)}catch(e){return s(e)}s(null,e)})}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":114,"./precondition":115,"./sync":116,"./to-buffer":117,"safe-buffer":143}],114:[function(e,i,t){!function(t,r){!function(){var e;e=r.process&&r.process.browser||!r.process||!r.process.version||6<=parseInt(t.version.split(".")[0].slice(1),10)?"utf-8":"binary",i.exports=e}.call(this)}.call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:118}],115:[function(e,t,r){var i=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||i<t||t!=t)throw new TypeError("Bad key length")}},{}],116:[function(e,t,r){var u=e("create-hash/md5"),c=e("ripemd160"),h=e("sha.js"),m=e("safe-buffer").Buffer,y=e("./precondition"),g=e("./default-encoding"),v=e("./to-buffer"),d=m.alloc(128),_={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function w(e,t,r){for(var i,n="rmd160"===(i=e)||"ripemd160"===i?function(e){return(new c).update(e).digest()}:"md5"===i?u:function(e){return h(i).update(e).digest()},o="sha512"===e||"sha384"===e?128:64,s=(t.length>o?t=n(t):t.length<o&&(t=m.concat([t,d],o)),m.allocUnsafe(o+_[e])),a=m.allocUnsafe(o+_[e]),f=0;f<o;f++)s[f]=54^t[f],a[f]=92^t[f];r=m.allocUnsafe(o+r+4);s.copy(r,0,0,o),this.ipad1=r,this.ipad2=s,this.opad=a,this.alg=e,this.blocksize=o,this.hash=n,this.size=_[e]}w.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(e,t,r,i,n){y(r,i);for(var o=new w(n=n||"sha1",e=v(e,g,"Password"),(t=v(t,g,"Salt")).length),s=m.allocUnsafe(i),a=m.allocUnsafe(t.length+4),f=(t.copy(a,0,0,t.length),0),u=_[n],c=Math.ceil(i/u),h=1;h<=c;h++){a.writeUInt32BE(h,t.length);for(var d=o.run(a,o.ipad1),l=d,p=1;p<r;p++)for(var l=o.run(l,o.ipad2),b=0;b<u;b++)d[b]^=l[b];d.copy(s,f),f+=u}return s}},{"./default-encoding":114,"./precondition":115,"./to-buffer":117,"create-hash/md5":54,ripemd160:142,"safe-buffer":143,"sha.js":146}],117:[function(e,t,r){var i=e("safe-buffer").Buffer;t.exports=function(e,t,r){if(i.isBuffer(e))return e;if("string"==typeof e)return i.from(e,t);if(ArrayBuffer.isView(e))return i.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":143}],118:[function(e,t,r){var i,n,t=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===o||!i)&&setTimeout)return(i=setTimeout)(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}var f,u=[],c=!1,h=-1;function d(){c&&f&&(c=!1,f.length?u=f.concat(u):h=-1,u.length&&l())}function l(){if(!c){for(var e=a(d),t=(c=!0,u.length);t;){for(f=u,u=[];++h<t;)f&&f[h].run();h=-1,t=u.length}f=null,c=!1,!function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return(n=clearTimeout)(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function b(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||c||a(l)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=b,t.addListener=b,t.once=b,t.off=b,t.removeListener=b,t.removeAllListeners=b,t.emit=b,t.prependListener=b,t.prependOnceListener=b,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],119:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(e,t){return r.publicEncrypt(e,t,!0)},r.publicDecrypt=function(e,t){return r.privateDecrypt(e,t,!0)}},{"./privateDecrypt":121,"./publicEncrypt":122}],120:[function(e,t,r){var s=e("create-hash"),a=e("safe-buffer").Buffer;t.exports=function(e,t){for(var r,i,n=a.alloc(0),o=0;n.length<t;)r=o++,i=void 0,(i=a.allocUnsafe(4)).writeUInt32BE(r,0),r=i,n=a.concat([n,s("sha1").update(e).update(r).digest()]);return n.slice(0,t)}},{"create-hash":53,"safe-buffer":143}],121:[function(e,t,r){var l=e("parse-asn1"),p=e("./mgf"),b=e("./xor"),m=e("bn.js"),y=e("browserify-rsa"),g=e("create-hash"),v=e("./withPublic"),_=e("safe-buffer").Buffer;t.exports=function(e,t,r){var i=e.padding||(r?1:4),e=l(e),n=e.modulus.byteLength();if(t.length>n||0<=new m(t).cmp(e.modulus))throw new Error("decryption error");var t=r?v(new m(t),e):y(t,e),o=_.alloc(n-t.length);if(t=_.concat([o,t],n),4===i){var o=t,n=(n=e).modulus.byteLength(),e=g("sha1").update(_.alloc(0)).digest(),s=e.length;if(0===o[0]){var a=o.slice(1,s+1),o=o.slice(s+1),a=b(a,p(o,s)),f=b(o,p(a,n-s-1));if(!function(e,t){e=_.from(e),t=_.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));var n=-1;for(;++n<i;)r+=e[n]^t[n];return r}(e,f.slice(0,s))){for(var u=s;0===f[u];)u++;if(1===f[u++])return f.slice(u)}}throw new Error("decryption error")}if(1===i){for(var c=t,o=r,a=c.slice(0,2),h=2,d=0;0!==c[h++];)if(h>=c.length){d++;break}n=c.slice(2,h-1);if(("0002"!==a.toString("hex")&&!o||"0001"!==a.toString("hex")&&o)&&d++,n.length<8&&d++,d)throw new Error("decryption error");return c.slice(h)}if(3===i)return t;throw new Error("unknown padding")}},{"./mgf":120,"./withPublic":123,"./xor":124,"bn.js":16,"browserify-rsa":39,"create-hash":53,"parse-asn1":111,"safe-buffer":143}],122:[function(e,t,r){var o=e("parse-asn1"),a=e("randombytes"),f=e("create-hash"),u=e("./mgf"),c=e("./xor"),h=e("bn.js"),s=e("./withPublic"),d=e("browserify-rsa"),l=e("safe-buffer").Buffer;t.exports=function(e,t,r){var i,n=e.padding||(r?1:4),e=o(e);if(4===n)i=function(e,t){var e=e.modulus.byteLength(),r=t.length,i=f("sha1").update(l.alloc(0)).digest(),n=i.length,o=2*n;if(e-o-2<r)throw new Error("message too long");var r=l.alloc(e-r-o-2),o=e-n-1,s=a(n),i=c(l.concat([i,r,l.alloc(1,1),t],o),u(s,o)),r=c(s,u(i,n));return new h(l.concat([l.alloc(1),r,i],e))}(e,t);else if(1===n)i=function(e,t,r){var i=t.length,e=e.modulus.byteLength();if(e-11<i)throw new Error("message too long");i=r?l.alloc(e-i-3,255):function(e){var t,r=l.allocUnsafe(e),i=0,n=a(2*e),o=0;for(;i<e;)o===n.length&&(n=a(2*e),o=0),(t=n[o++])&&(r[i++]=t);return r}(e-i-3);return new h(l.concat([l.from([0,r?1:2]),i,l.alloc(1),t],e))}(e,t,r);else{if(3!==n)throw new Error("unknown padding");if(0<=(i=new h(t)).cmp(e.modulus))throw new Error("data too long for modulus")}return(r?d:s)(i,e)}},{"./mgf":120,"./withPublic":123,"./xor":124,"bn.js":16,"browserify-rsa":39,"create-hash":53,"parse-asn1":111,randombytes:125,"safe-buffer":143}],123:[function(e,t,r){var i=e("bn.js"),n=e("safe-buffer").Buffer;t.exports=function(e,t){return n.from(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}},{"bn.js":16,"safe-buffer":143}],124:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,i=-1;++i<r;)e[i]^=t[i];return e}},{}],125:[function(t,r,e){!function(s,e){!function(){"use strict";var n=t("safe-buffer").Buffer,o=e.crypto||e.msCrypto;o&&o.getRandomValues?r.exports=function(e,t){if(4294967295<e)throw new RangeError("requested too many random bytes");var r=n.allocUnsafe(e);if(0<e)if(65536<e)for(var i=0;i<e;i+=65536)o.getRandomValues(r.slice(i,i+65536));else o.getRandomValues(r);return"function"!=typeof t?r:s.nextTick(function(){t(null,r)})}:r.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}.call(this)}.call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:118,"safe-buffer":143}],126:[function(r,e,l){!function(h,d){!function(){"use strict";function e(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var t=r("safe-buffer"),o=r("randombytes"),n=t.Buffer,i=t.kMaxLength,s=d.crypto||d.msCrypto,a=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(a<e||e<0)throw new TypeError("offset must be a uint32");if(i<e||t<e)throw new RangeError("offset out of range")}function u(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(a<e||e<0)throw new TypeError("size must be a uint32");if(r<e+t||i<e)throw new RangeError("buffer too small")}function c(r,i,e,n){var t;if(h.browser)return t=r.buffer,t=new Uint8Array(t,i,e),s.getRandomValues(t),n?void h.nextTick(function(){n(null,r)}):r;{if(!n)return o(e).copy(r,i),r;o(e,function(e,t){if(e)return n(e);t.copy(r,i),n(null,r)})}}s&&s.getRandomValues||!h.browser?(l.randomFill=function(e,t,r,i){if(!(n.isBuffer(e)||e instanceof d.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(t,e.length),u(r,t,e.length),c(e,t,r,i)},l.randomFillSync=function(e,t,r){void 0===t&&(t=0);if(!(n.isBuffer(e)||e instanceof d.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');f(t,e.length),void 0===r&&(r=e.length-t);return u(r,t,e.length),c(e,t,r)}):(l.randomFill=e,l.randomFillSync=e)}.call(this)}.call(this,r("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:118,randombytes:125,"safe-buffer":143}],127:[function(e,t,r){"use strict";var i={};function n(e,n,t){var r=function(i){var e,t;function r(e,t,r){return i.call(this,(e=e,t=t,r=r,"string"==typeof n?n:n(e,t,r)))||this}return t=i,(e=r).prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t,r}(t=t||Error);r.prototype.name=t.name,r.prototype.code=e,i[e]=r}function f(e,t){var r;return Array.isArray(e)?(r=e.length,e=e.map(function(e){return String(e)}),2<r?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])):"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,n,o,s,a;return"string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",o=e,s=" argument",(void 0===a||a>o.length)&&(a=o.length),o=o.substring(a-s.length,a)===s?"The ".concat(e," ").concat(i," ").concat(f(t,"type")):(a=(n="number"!=typeof n?0:n)+(o=".").length>(a=e).length||-1===a.indexOf(o,n)?"argument":"property",'The "'.concat(e,'" ').concat(a," ").concat(i," ").concat(f(t,"type"))),o+=". Received type ".concat(typeof r)},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},{}],128:[function(c,h,e){!function(u){!function(){"use strict";var e=Object.keys||function(e){var t,r=[];for(t in e)r.push(t);return r},t=(h.exports=s,c("./_stream_readable")),r=c("./_stream_writable");c("inherits")(s,t);for(var i=e(r.prototype),n=0;n<i.length;n++){var o=i[n];s.prototype[o]||(s.prototype[o]=r.prototype[o])}function s(e){if(!(this instanceof s))return new s(e);t.call(this,e),r.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||u.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}.call(this)}.call(this,c("_process"))},{"./_stream_readable":130,"./_stream_writable":132,_process:118,inherits:102}],129:[function(e,t,r){"use strict";t.exports=n;var i=e("./_stream_transform");function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}e("inherits")(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":131,inherits:102}],130:[function(U,q,e){!function(D,N){!function(){"use strict";function p(e,t){return e.listeners(t).length}(q.exports=_).ReadableState=v,U("events").EventEmitter;var i,n=U("./internal/streams/stream"),c=U("buffer").Buffer,h=N.Uint8Array||function(){};var o,e,r,t=U("util"),b=t&&t.debuglog?t.debuglog("stream"):function(){},s=U("./internal/streams/buffer_list"),t=U("./internal/streams/destroy"),a=U("./internal/streams/state").getHighWaterMark,f=U("../errors").codes,d=f.ERR_INVALID_ARG_TYPE,l=f.ERR_STREAM_PUSH_AFTER_EOF,u=f.ERR_METHOD_NOT_IMPLEMENTED,m=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,y=(U("inherits")(_,n),t.errorOrDestroy),g=["error","close","destroy","pause","resume"];function v(e,t,r){i=i||U("./_stream_duplex"),e=e||{},"boolean"!=typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=a(this,e,"readableHighWaterMark",r),this.buffer=new s,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o=o||U("string_decoder/").StringDecoder,this.decoder=new o(e.encoding),this.encoding=e.encoding)}function _(e){if(i=i||U("./_stream_duplex"),!(this instanceof _))return new _(e);var t=this instanceof i;this._readableState=new v(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function w(e,t,r,i,n){b("readableAddChunk",t);var o,s,a,f,u=e._readableState;if(null===t)u.reading=!1,s=e,a=u,b("onEofChunk"),a.ended||(a.decoder&&(f=a.decoder.end())&&f.length&&(a.buffer.push(f),a.length+=a.objectMode?1:f.length),a.ended=!0,a.sync?k(s):(a.needReadable=!1,a.emittedReadable||(a.emittedReadable=!0,E(s))));else if(o=n?o:function(e,t){var r;!function(e){return c.isBuffer(e)||e instanceof h}(t)&&"string"!=typeof t&&void 0!==t&&!e.objectMode&&(r=new d("chunk",["string","Buffer","Uint8Array"],t));return r}(u,t))y(e,o);else if(u.objectMode||t&&0<t.length)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===c.prototype||(f=t,t=c.from(f)),i)u.endEmitted?y(e,new m):M(e,u,t,!0);else if(u.ended)y(e,new l);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?M(e,u,t,!1):x(e,u)):M(e,u,t,!1)}else i||(u.reading=!1,x(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function M(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=t.destroy,_.prototype._undestroy=t.undestroy,_.prototype._destroy=function(e,t){t(e)},_.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=c.from(e,t),t=""),r=!0),w(this,e,t,!1,r)},_.prototype.unshift=function(e){return w(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){for(var t=new(o=o||U("string_decoder/").StringDecoder)(e),r=(this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding,this._readableState.buffer.head),i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var S=1073741824;function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?(t.flowing&&t.length?t.buffer.head.data:t).length:(e>t.highWaterMark&&(t.highWaterMark=(S<=(r=e)?r=S:(r--,r=(r=(r=(r=(r|=r>>>1)|r>>>2)|r>>>4)|r>>>8)|r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function k(e){var t=e._readableState;b("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(b("emitReadable",t.flowing),t.emittedReadable=!0,D.nextTick(E,e))}function E(e){var t=e._readableState;b("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function x(e,t){t.readingMore||(t.readingMore=!0,D.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(b("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=0<e.listenerCount("readable"),t.resumeScheduled&&!t.paused?t.flowing=!0:0<e.listenerCount("data")&&e.resume()}function R(e){b("readable nexttick read 0"),e.read(0)}function B(e,t){b("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(b("flow",t.flowing);t.flowing&&null!==e.read(););}function T(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function O(e){var t=e._readableState;b("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,D.nextTick(L,t,e))}function L(e,t){b("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy&&(!(e=t._writableState)||e.autoDestroy&&e.finished)&&t.destroy())}function C(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}_.prototype.read=function(e){b("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:0<t.length)||t.ended))return b("read: emitReadable",t.length,t.ended),(0===t.length&&t.ended?O:k)(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&O(this),null;var i=t.needReadable;return b("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&b("length less than watermark",i=!0),t.ended||t.reading?b("reading or ended",i=!1):i&&(b("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(r,t))),null===(i=0<e?T(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&O(this)),null!==i&&this.emit("data",i),i},_.prototype._read=function(e){y(this,new u("_read()"))},_.prototype.pipe=function(r,e){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=r;break;case 1:n.pipes=[n.pipes,r];break;default:n.pipes.push(r)}n.pipesCount+=1,b("pipe count=%d opts=%j",n.pipesCount,e);e=(!e||!1!==e.end)&&r!==D.stdout&&r!==D.stderr?s:l;function o(e,t){b("onunpipe"),e===i&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,b("cleanup"),r.removeListener("close",h),r.removeListener("finish",d),r.removeListener("drain",a),r.removeListener("error",c),r.removeListener("unpipe",o),i.removeListener("end",s),i.removeListener("end",l),i.removeListener("data",u),f=!0,!n.awaitDrain||r._writableState&&!r._writableState.needDrain||a())}function s(){b("onend"),r.end()}n.endEmitted?D.nextTick(e):i.once("end",e),r.on("unpipe",o);t=i;var t,a=function(){var e=t._readableState;b("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&p(t,"data")&&(e.flowing=!0,j(t))},f=(r.on("drain",a),!1);function u(e){b("ondata");e=r.write(e);b("dest.write",e),!1===e&&((1===n.pipesCount&&n.pipes===r||1<n.pipesCount&&-1!==C(n.pipes,r))&&!f&&(b("false write response, pause",n.awaitDrain),n.awaitDrain++),i.pause())}function c(e){b("onerror",e),l(),r.removeListener("error",c),0===p(r,"error")&&y(r,e)}function h(){r.removeListener("finish",d),l()}function d(){b("onfinish"),r.removeListener("close",h),l()}function l(){b("unpipe"),i.unpipe(r)}return i.on("data",u),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(r,"error",c),r.once("close",h),r.once("finish",d),r.emit("pipe",i),n.flowing||(b("pipe resume"),i.resume()),r},_.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0!==t.pipesCount){if(1===t.pipesCount)return e&&e!==t.pipes||(e=e||t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(e){var i=C(t.pipes,e);-1!==i&&(t.pipes.splice(i,1),--t.pipesCount,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r))}else{var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<o;s++)n[s].emit("unpipe",this,{hasUnpiped:!1})}}return this},_.prototype.addListener=_.prototype.on=function(e,t){var t=n.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=0<this.listenerCount("readable"),!1!==r.flowing&&this.resume()):"readable"!==e||r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,b("on readable",r.length,r.reading),r.length?k(this):r.reading||D.nextTick(R,this)),t},_.prototype.removeListener=function(e,t){t=n.prototype.removeListener.call(this,e,t);return"readable"===e&&D.nextTick(I,this),t},_.prototype.removeAllListeners=function(e){var t=n.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||D.nextTick(I,this),t},_.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(b("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,D.nextTick(B,e,t))),r.paused=!1,this},_.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(t){var e,r=this,i=this._readableState,n=!1;for(e in t.on("end",function(){var e;b("wrapped end"),i.decoder&&!i.ended&&(e=i.decoder.end())&&e.length&&r.push(e),r.push(null)}),t.on("data",function(e){b("wrapped data"),i.decoder&&(e=i.decoder.write(e)),i.objectMode&&null==e||(i.objectMode||e&&e.length)&&!r.push(e)&&(n=!0,t.pause())}),t)void 0===this[e]&&"function"==typeof t[e]&&(this[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e));for(var o=0;o<g.length;o++)t.on(g[o],this.emit.bind(this,g[o]));return this._read=function(e){b("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(_.prototype[Symbol.asyncIterator]=function(){return(e=void 0===e?U("./internal/streams/async_iterator"):e)(this)}),Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(_.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(_.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),_._fromList=T,Object.defineProperty(_.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(_.from=function(e,t){return(r=void 0===r?U("./internal/streams/from"):r)(_,e,t)})}.call(this)}.call(this,U("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":127,"./_stream_duplex":128,"./internal/streams/async_iterator":133,"./internal/streams/buffer_list":134,"./internal/streams/destroy":135,"./internal/streams/from":137,"./internal/streams/state":139,"./internal/streams/stream":140,_process:118,buffer:49,events:84,inherits:102,"string_decoder/":154,util:18}],131:[function(e,t,r){"use strict";t.exports=f;var t=e("../errors").codes,i=t.ERR_METHOD_NOT_IMPLEMENTED,n=t.ERR_MULTIPLE_CALLBACK,o=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=t.ERR_TRANSFORM_WITH_LENGTH_0,a=e("./_stream_duplex");function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState,i=(r.transforming=!1,r.writecb);if(null===i)return this.emit("error",new n);r.writechunk=null,(r.writecb=null)!=t&&this.push(t),i(e),(r=this._readableState).reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var r=this;"function"!=typeof this._flush||this._readableState.destroyed?c(this,null,null):this._flush(function(e,t){c(r,e,t)})}function c(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;e.push(null)}e("inherits")(f,a),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var i=this._transformState;i.writecb=r,i.writechunk=e,i.writeencoding=t,i.transforming||(r=this._readableState,(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark))},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){a.prototype._destroy.call(this,e,function(e){t(e)})}},{"../errors":127,"./_stream_duplex":128,inherits:102}],132:[function(R,B,e){!function(P,I){!function(){"use strict";function h(o){var s=this;this.next=null,this.entry=null,this.finish=function(){var e=s,t=o,r=void 0,i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}}(B.exports=w).WritableState=_;var r,e={deprecate:R("util-deprecate")},i=R("./internal/streams/stream"),d=R("buffer").Buffer,l=I.Uint8Array||function(){};var n,t=R("./internal/streams/destroy"),o=R("./internal/streams/state").getHighWaterMark,s=R("../errors").codes,p=s.ERR_INVALID_ARG_TYPE,a=s.ERR_METHOD_NOT_IMPLEMENTED,b=s.ERR_MULTIPLE_CALLBACK,f=s.ERR_STREAM_CANNOT_PIPE,u=s.ERR_STREAM_DESTROYED,m=s.ERR_STREAM_NULL_VALUES,y=s.ERR_STREAM_WRITE_AFTER_END,c=s.ERR_UNKNOWN_ENCODING,g=t.errorOrDestroy;function v(){}function _(e,c,t){r=r||R("./_stream_duplex"),e=e||{},"boolean"!=typeof t&&(t=c instanceof r),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=o(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;t=(this.destroyed=!1)===e.decodeStrings;this.decodeStrings=!t,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){var t=c,r=t._writableState,i=r.sync,n=r.writecb;if("function"!=typeof n)throw new b;var o,s,a,f,u=r;u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0,e?(u=t,s=i,a=e,f=n,--(o=r).pendingcb,s?(P.nextTick(f,a),P.nextTick(x,u,o),u._writableState.errorEmitted=!0,g(u,a)):(f(a),u._writableState.errorEmitted=!0,g(u,a),x(u,o))):((e=k(r)||t.destroyed)||r.corked||r.bufferProcessing||!r.bufferedRequest||A(t,r),i?P.nextTick(S,t,r,e,n):S(t,r,e,n))},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new h(this)}R("inherits")(w,i),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(_.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}function w(e){var t=this instanceof(r=r||R("./_stream_duplex"));if(!t&&!n.call(w,this))return new w(e);this._writableState=new _(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function M(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new u("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function S(e,t,r,i){var n;r||(r=e,0===(n=t).length&&n.needDrain&&(n.needDrain=!1,r.emit("drain"))),t.pendingcb--,i(),x(e,t)}function A(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){for(var i=t.bufferedRequestCount,n=new Array(i),i=t.corkedRequestsFree,o=(i.entry=r,0),s=!0;r;)(n[o]=r).isBuf||(s=!1),r=r.next,o+=1;n.allBuffers=s,M(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new h(t),t.bufferedRequestCount=0}else{for(;r;){var a=r.chunk,f=r.encoding,u=r.callback;if(M(e,t,!1,t.objectMode?1:a.length,a,f,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(t,r){t._final(function(e){r.pendingcb--,e&&g(t,e),r.prefinished=!0,t.emit("prefinish"),x(t,r)})}function x(e,t){var r,i,n=k(t);return n&&(r=e,(i=t).prefinished||i.finalCalled||("function"!=typeof r._final||i.destroyed?(i.prefinished=!0,r.emit("prefinish")):(i.pendingcb++,i.finalCalled=!0,P.nextTick(E,r,i))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy&&(!(r=e._readableState)||r.autoDestroy&&r.endEmitted)&&e.destroy())),n}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===w&&(e&&e._writableState instanceof _)}})):n=function(e){return e instanceof this},w.prototype.pipe=function(){g(this,new f)},w.prototype.write=function(e,t,r){var i,n,o,s,a,f,u=this._writableState,c=!1,h=!u.objectMode&&(h=e,d.isBuffer(h)||h instanceof l);return h&&!d.isBuffer(e)&&(s=e,e=d.from(s)),"function"==typeof t&&(r=t,t=null),t=h?"buffer":t||u.defaultEncoding,"function"!=typeof r&&(r=v),u.ending?(s=this,a=r,f=new y,g(s,f),P.nextTick(a,f)):!h&&(a=this,f=u,n=r,null===(i=e)?o=new m:"string"==typeof i||f.objectMode||(o=new p("chunk",["string","Buffer"],i)),o&&(g(a,o),!void P.nextTick(n,o)))||(u.pendingcb++,c=function(e,t,r,i,n,o){r||(s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,i,n),i!==s&&(r=!0,n="buffer",i=s));var s=t.objectMode?1:i.length,a=(t.length+=s,t.length<t.highWaterMark);a||(t.needDrain=!0);{var f;t.writing||t.corked?(f=t.lastBufferedRequest,t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1):M(e,t,!1,s,i,n,o)}return a}(this,u,h,e,t,r)),c},w.prototype.cork=function(){this._writableState.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||A(this,e))},w.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase()))return this._writableState.defaultEncoding=e,this;throw new c(e)},Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,r){r(new a("_write()"))},w.prototype._writev=null,w.prototype.end=function(e,t,r){var i=this._writableState;if("function"==typeof e?(r=e,t=e=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),!i.ending){e=this,t=i,i=r;t.ending=!0,x(e,t),i&&(t.finished?P.nextTick(i):e.once("finish",i)),t.ended=!0,e.writable=!1}return this},Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=t.destroy,w.prototype._undestroy=t.undestroy,w.prototype._destroy=function(e,t){t(e)}}.call(this)}.call(this,R("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":127,"./_stream_duplex":128,"./internal/streams/destroy":135,"./internal/streams/state":139,"./internal/streams/stream":140,_process:118,buffer:49,inherits:102,"util-deprecate":156}],133:[function(i,m,e){!function(b){!function(){"use strict";var e;function r(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}var n=i("./end-of-stream"),o=Symbol("lastResolve"),s=Symbol("lastReject"),a=Symbol("error"),f=Symbol("ended"),u=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function l(e){var t,r=e[o];null!==r&&null!==(t=e[h].read())&&(e[u]=null,e[o]=null,e[s]=null,r(d(t,!1)))}var t=Object.getPrototypeOf(function(){}),p=Object.setPrototypeOf((r(e={get stream(){return this[h]},next:function(){var r=this,e=this[a];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise(function(e,t){b.nextTick(function(){r[a]?t(r[a]):e(d(void 0,!0))})});var t,i,n,e=this[u];if(e)t=new Promise((i=e,n=this,function(e,t){i.then(function(){n[f]?e(d(void 0,!0)):n[c](e,t)},t)}));else{e=this[h].read();if(null!==e)return Promise.resolve(d(e,!1));t=new Promise(this[c])}return this[u]=t}},Symbol.asyncIterator,function(){return this}),r(e,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),e),t);m.exports=function(e){var t,i=Object.create(p,(r(t={},h,{value:e,writable:!0}),r(t,o,{value:null,writable:!0}),r(t,s,{value:null,writable:!0}),r(t,a,{value:null,writable:!0}),r(t,f,{value:e._readableState.endEmitted,writable:!0}),r(t,c,{value:function(e,t){var r=i[h].read();r?(i[u]=null,i[o]=null,i[s]=null,e(d(r,!1))):(i[o]=e,i[s]=t)},writable:!0}),t));return i[u]=null,n(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code)return null!==(t=i[s])&&(i[u]=null,i[o]=null,i[s]=null,t(e)),void(i[a]=e);var t=i[o];null!==t&&(i[u]=null,i[o]=null,t(d(void 0,!(i[s]=null)))),i[f]=!0}),e.on("readable",function(e){b.nextTick(l,e)}.bind(null,i)),i}}.call(this)}.call(this,i("_process"))},{"./end-of-stream":136,_process:118}],134:[function(e,t,r){"use strict";function o(t,e){var r,i=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,r)),i}function n(i){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){var t,r;t=i,r=n[e=e],e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(n,e))})}return i}function s(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=e("buffer").Buffer,f=e("util").inspect,u=f&&f.custom||"inspect";t.exports=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}var t,r,i;return t=e,(r=[{key:"push",value:function(e){e={data:e,next:null};0<this.length?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(e){e={data:e,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){var e;if(0!==this.length)return e=this.head.data,1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,i=a.allocUnsafe(e>>>0),n=this.head,o=0;n;)t=n.data,r=o,a.prototype.copy.call(t,i,r),o+=n.data.length,n=n.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,i=t.data;for(e-=i.length;t=t.next;){var n=t.data,o=e>n.length?n.length:e;if(o===n.length?i+=n:i+=n.slice(0,e),0===(e-=o)){o===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t).data=n.slice(o);break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0===(e-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r).data=n.slice(o);break}++i}return this.length-=i,t}},{key:u,value:function(e,t){return f(this,n({},t,{depth:0,customInspect:!1}))}}])&&s(t.prototype,r),i&&s(t,i),e}()},{buffer:49,util:18}],135:[function(e,t,r){!function(f){!function(){"use strict";function o(e,t){a(e,t),s(e)}function s(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,f.nextTick(a,this,e)):f.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?f.nextTick(s,r):(r._writableState.errorEmitted=!0,f.nextTick(o,r,e)):f.nextTick(o,r,e):t?(f.nextTick(s,r),t(e)):f.nextTick(s,r)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}}.call(this)}.call(this,e("_process"))},{_process:118}],136:[function(e,t,r){"use strict";var y=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function g(){}t.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);function n(){t.writable||o()}function o(){b=!(p=!1),l||i.call(t)}function s(){m=!(l=!1),p||i.call(t)}function a(e){i.call(t,e)}function f(){var e;return l&&!m?(t._readableState&&t._readableState.ended||(e=new y),i.call(t,e)):p&&!b?(t._writableState&&t._writableState.ended||(e=new y),i.call(t,e)):void 0}function u(){t.req.on("finish",o)}c=i||g,h=!1,i=function(){if(!h){h=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];c.apply(this,t)}};var c,h,d,l=(r=r||{}).readable||!1!==r.readable&&t.readable,p=r.writable||!1!==r.writable&&t.writable,b=t._writableState&&t._writableState.finished,m=t._readableState&&t._readableState.endEmitted;return(d=t).setHeader&&"function"==typeof d.abort?(t.on("complete",o),t.on("abort",f),t.req?u():t.on("request",u)):p&&!t._writableState&&(t.on("end",n),t.on("close",n)),t.on("end",s),t.on("finish",o),!1!==r.error&&t.on("error",a),t.on("close",f),function(){t.removeListener("complete",o),t.removeListener("abort",f),t.removeListener("request",u),t.req&&t.req.removeListener("finish",o),t.removeListener("end",n),t.removeListener("close",n),t.removeListener("finish",o),t.removeListener("end",s),t.removeListener("error",a),t.removeListener("close",f)}}},{"../../../errors":127}],137:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],138:[function(f,e,t){"use strict";var u;var r=f("../../../errors").codes,a=r.ERR_MISSING_ARGS,c=r.ERR_STREAM_DESTROYED;function h(e){if(e)throw e}function d(r,e,t,i){n=i,o=!1;var n,o,s=!(i=function(){o||(o=!0,n.apply(void 0,arguments))}),a=(r.on("close",function(){s=!0}),(u=void 0===u?f("./end-of-stream"):u)(r,{readable:e,writable:t},function(e){if(e)return i(e);s=!0,i()}),!1);return function(e){var t;if(!s&&!a)return a=!0,(t=r).setHeader&&"function"==typeof t.abort?r.abort():"function"==typeof r.destroy?r.destroy():void i(e||new c("pipe"))}}function l(e){e()}function p(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];var r,n,o=!(r=i).length||"function"!=typeof r[r.length-1]?h:r.pop();if((i=Array.isArray(i[0])?i[0]:i).length<2)throw new a("streams");var s=i.map(function(e,t){var r=t<i.length-1;return d(e,r,0<t,function(e){n=n||e,e&&s.forEach(l),r||(s.forEach(l),o(n))})});return i.reduce(p)}},{"../../../errors":127,"./end-of-stream":136}],139:[function(e,t,r){"use strict";var s=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){o=i,n=r;var n,o=null!=(t=t).highWaterMark?t.highWaterMark:o?t[n]:null;if(null==o)return e.objectMode?16:16384;if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new s(i?r:"highWaterMark",o);return Math.floor(o)}}},{"../../../errors":127}],140:[function(e,t,r){t.exports=e("events").EventEmitter},{events:84}],141:[function(e,t,r){(((r=t.exports=e("./lib/_stream_readable.js")).Stream=r).Readable=r).Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":128,"./lib/_stream_passthrough.js":129,"./lib/_stream_readable.js":130,"./lib/_stream_transform.js":131,"./lib/_stream_writable.js":132,"./lib/internal/streams/end-of-stream.js":136,"./lib/internal/streams/pipeline.js":138}],142:[function(e,t,r){"use strict";var i=e("buffer").Buffer,n=e("inherits"),o=e("hash-base"),m=new Array(16),y=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],v=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],_=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],w=[0,1518500249,1859775393,2400959708,2840853838],M=[1352829926,1548603684,1836072691,2053994217,0];function s(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function S(e,t){return e<<t|e>>>32-t}function A(e,t,r,i,n,o,s,a){return S(e+(t^r^i)+o+s|0,a)+n|0}function k(e,t,r,i,n,o,s,a){return S(e+(t&r|~t&i)+o+s|0,a)+n|0}function E(e,t,r,i,n,o,s,a){return S(e+((t|~r)^i)+o+s|0,a)+n|0}function x(e,t,r,i,n,o,s,a){return S(e+(t&i|r&~i)+o+s|0,a)+n|0}function P(e,t,r,i,n,o,s,a){return S(e+(t^(r|~i))+o+s|0,a)+n|0}n(s,o),s.prototype._update=function(){for(var e=m,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,s=0|this._e,a=0|this._a,f=0|this._b,u=0|this._c,c=0|this._d,h=0|this._e,d=0;d<80;d+=1)var l,p=d<16?(l=A(r,i,n,o,s,e[y[d]],w[0],v[d]),P(a,f,u,c,h,e[g[d]],M[0],_[d])):d<32?(l=k(r,i,n,o,s,e[y[d]],w[1],v[d]),x(a,f,u,c,h,e[g[d]],M[1],_[d])):d<48?(l=E(r,i,n,o,s,e[y[d]],w[2],v[d]),E(a,f,u,c,h,e[g[d]],M[2],_[d])):d<64?(l=x(r,i,n,o,s,e[y[d]],w[3],v[d]),k(a,f,u,c,h,e[g[d]],M[3],_[d])):(l=P(r,i,n,o,s,e[y[d]],w[4],v[d]),A(a,f,u,c,h,e[g[d]],M[4],_[d])),r=s,s=o,o=S(n,10),n=i,i=l,a=h,h=c,c=S(u,10),u=f,f=p;var b=this._b+n+c|0;this._b=this._c+o+h|0,this._c=this._d+s+a|0,this._d=this._e+r+f|0,this._e=this._a+i+u|0,this._a=b},s.prototype._digest=function(){this._block[this._blockOffset++]=128,56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=i.alloc?i.alloc(20):new i(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=s},{buffer:49,"hash-base":86,inherits:102}],143:[function(e,t,r){var i=e("buffer"),n=i.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(o(i,r),r.Buffer=s),o(n,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=n(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},{buffer:49}],144:[function(s,a,e){!function(o){!function(){"use strict";var e,t=s("buffer"),i=t.Buffer,r={};for(e in t)t.hasOwnProperty(e)&&"SlowBuffer"!==e&&"Buffer"!==e&&(r[e]=t[e]);var n=r.Buffer={};for(e in i)i.hasOwnProperty(e)&&"allocUnsafe"!==e&&"allocUnsafeSlow"!==e&&(n[e]=i[e]);if(r.Buffer.prototype=i.prototype,n.from&&n.from!==Uint8Array.from||(n.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return i(e,t,r)}),n.alloc||(n.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||2*(1<<30)<=e)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=i(e);return t&&0!==t.length?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e}),!r.kStringMaxLength)try{r.kStringMaxLength=o.binding("buffer").kStringMaxLength}catch(e){}r.constants||(r.constants={MAX_LENGTH:r.kMaxLength},r.kStringMaxLength&&(r.constants.MAX_STRING_LENGTH=r.kStringMaxLength)),a.exports=r}.call(this)}.call(this,s("_process"))},{_process:118,buffer:49}],145:[function(e,t,r){var c=e("safe-buffer").Buffer;function i(e,t){this._block=c.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(e=c.from(e,t=t||"utf8"));for(var r=this._block,i=this._blockSize,n=e.length,o=this._len,s=0;s<n;){for(var a=o%i,f=Math.min(n-s,i-a),u=0;u<f;u++)r[a+u]=e[s+u];s+=f,(o+=f)%i==0&&this._update(r)}return this._len+=n,this},i.prototype.digest=function(e){var t=this._len%this._blockSize,t=(this._block[t]=128,this._block.fill(0,1+t),t>=this._finalSize&&(this._update(this._block),this._block.fill(0)),8*this._len),t=(t<=4294967295?this._block.writeUInt32BE(t,this._blockSize-4):(this._block.writeUInt32BE((t-(t=(4294967295&t)>>>0))/4294967296,this._blockSize-8),this._block.writeUInt32BE(t,this._blockSize-4)),this._update(this._block),this._hash());return e?t.toString(e):t},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":143}],146:[function(e,t,r){(r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(t)return new t;throw new Error(e+" is not supported (we accept pull requests)")}).sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":147,"./sha1":148,"./sha224":149,"./sha256":150,"./sha384":151,"./sha512":152}],147:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,p=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,n.call(this,64,56)}i(a,n),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,s=0|this._e,a=0;a<16;++a)t[a]=e.readInt32BE(4*a);for(;a<80;++a)t[a]=t[a-3]^t[a-8]^t[a-14]^t[a-16];for(var f,u,c,h=0;h<80;++h)var d=~~(h/20),l=0|(r<<5|r>>>27)+(f=i,u=n,c=o,0===(l=d)?f&u|~f&c:2===l?f&u|f&c|u&c:f^u^c)+s+t[h]+p[d],s=o,o=n,n=i<<30|i>>>2,i=r,r=l;this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},a.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=a},{"./hash":145,inherits:102,"safe-buffer":143}],148:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,b=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,n.call(this,64,56)}i(a,n),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=(t=r[f-3]^r[f-8]^r[f-14]^r[f-16])<<1|t>>>31;for(var u,c,h,d=0;d<80;++d)var l=~~(d/20),p=0|(i<<5|i>>>27)+(u=n,c=o,h=s,0===(p=l)?u&c|~u&h:2===p?u&c|u&h|c&h:u^c^h)+a+r[d]+b[l],a=s,s=o,o=n<<30|n>>>2,n=i,i=p;this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},a.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=a},{"./hash":145,inherits:102,"safe-buffer":143}],149:[function(e,t,r){var i=e("inherits"),n=e("./sha256"),o=e("./hash"),s=e("safe-buffer").Buffer,a=new Array(64);function f(){this.init(),this._w=a,o.call(this,64,56)}i(f,n),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=f},{"./hash":145,"./sha256":150,inherits:102,"safe-buffer":143}],150:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function a(){this.init(),this._w=s,n.call(this,64,56)}i(a,n),a.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},a.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,f=0|this._f,u=0|this._g,c=0|this._h,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<64;++h)r[h]=0|(((t=r[h-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[h-7]+(((t=r[h-15])>>>7|t<<25)^(t>>>18|t<<14)^t>>>3)+r[h-16];for(var d=0;d<64;++d)var l=c+((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(u^a&(f^u))+b[d]+r[d]|0,p=0|((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&n|o&(i|n)),c=u,u=f,f=a,a=s+l|0,s=o,o=n,n=i,i=l+p|0;this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0,this._f=f+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0},a.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=a},{"./hash":145,inherits:102,"safe-buffer":143}],151:[function(e,t,r){var i=e("inherits"),n=e("./sha512"),o=e("./hash"),s=e("safe-buffer").Buffer,a=new Array(160);function f(){this.init(),this._w=a,o.call(this,128,112)}i(f,n),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var i=s.allocUnsafe(48);function e(e,t,r){i.writeInt32BE(e,r),i.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),i},t.exports=f},{"./hash":145,"./sha512":152,inherits:102,"safe-buffer":143}],152:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,q=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function a(){this.init(),this._w=s,n.call(this,128,112)}function z(e,t,r){return r^e&(t^r)}function H(e,t,r){return e&t|r&(e|t)}function K(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function F(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function V(e,t){return e>>>0<t>>>0?1:0}i(a,n),a.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},a.prototype._update=function(e){for(var t=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,a=0|this._fh,f=0|this._gh,u=0|this._hh,c=0|this._al,h=0|this._bl,d=0|this._cl,l=0|this._dl,p=0|this._el,b=0|this._fl,m=0|this._gl,y=0|this._hl,g=0;g<32;g+=2)t[g]=e.readInt32BE(4*g),t[g+1]=e.readInt32BE(4*g+4);for(;g<160;g+=2){var v=t[g-30],_=t[g-30+1],w=(v>>>1|_<<31)^(v>>>8|_<<24)^v>>>7,M=(_>>>1|v<<31)^(_>>>8|v<<24)^(_>>>7|v<<25),v=t[g-4],S=((_=t[g-4+1])>>>19|v<<13)^(v>>>29|_<<3)^(_>>>6|v<<26),A=t[g-14],k=t[g-14+1],L=t[g-32],E=t[g-32+1],x=M+k|0,P=w+A+V(x,M)|0;P=(P=P+((v>>>19|_<<13)^(_>>>29|v<<3)^v>>>6)+V(x=x+S|0,S)|0)+L+V(x=x+E|0,E)|0,t[g]=P,t[g+1]=x}for(var I=0;I<160;I+=2){P=t[I],x=t[I+1];var D=H(r,i,n),N=H(c,h,d),U=K(r,c),R=K(c,r),B=F(s,p),j=F(p,s),T=q[I+1],O=z(s,a,f),C=z(p,b,m),j=y+j|0,O=(B=(((u+B+V(j,y)|0)+O+V(j=j+C|0,C)|0)+q[I]+V(j=j+T|0,T)|0)+P+V(j=j+x|0,x)|0,R+N|0),C=U+D+V(O,R)|0,u=f,y=m,f=a,m=b,a=s,b=p,s=o+B+V(p=l+j|0,l)|0,o=n,l=d,n=i,d=h,i=r,h=c,r=B+C+V(c=j+O|0,j)|0}this._al=this._al+c|0,this._bl=this._bl+h|0,this._cl=this._cl+d|0,this._dl=this._dl+l|0,this._el=this._el+p|0,this._fl=this._fl+b|0,this._gl=this._gl+m|0,this._hl=this._hl+y|0,this._ah=this._ah+r+V(this._al,c)|0,this._bh=this._bh+i+V(this._bl,h)|0,this._ch=this._ch+n+V(this._cl,d)|0,this._dh=this._dh+o+V(this._dl,l)|0,this._eh=this._eh+s+V(this._el,p)|0,this._fh=this._fh+a+V(this._fl,b)|0,this._gh=this._gh+f+V(this._gl,m)|0,this._hh=this._hh+u+V(this._hl,y)|0},a.prototype._hash=function(){var i=o.allocUnsafe(64);function e(e,t,r){i.writeInt32BE(e,r),i.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),i},t.exports=a},{"./hash":145,inherits:102,"safe-buffer":143}],153:[function(e,t,r){t.exports=i;var c=e("events").EventEmitter;function i(){c.call(this)}e("inherits")(i,c),i.Readable=e("readable-stream/lib/_stream_readable.js"),i.Writable=e("readable-stream/lib/_stream_writable.js"),i.Duplex=e("readable-stream/lib/_stream_duplex.js"),i.Transform=e("readable-stream/lib/_stream_transform.js"),i.PassThrough=e("readable-stream/lib/_stream_passthrough.js"),i.finished=e("readable-stream/lib/internal/streams/end-of-stream.js"),i.pipeline=e("readable-stream/lib/internal/streams/pipeline.js"),(i.Stream=i).prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function n(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",n),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",a));var o=!1;function s(){o||(o=!0,t.end())}function a(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function f(e){if(u(),0===c.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",s),r.removeListener("close",a),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u)}return r.on("error",f),t.on("error",f),r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t}},{events:84,inherits:102,"readable-stream/lib/_stream_duplex.js":128,"readable-stream/lib/_stream_passthrough.js":129,"readable-stream/lib/_stream_readable.js":130,"readable-stream/lib/_stream_transform.js":131,"readable-stream/lib/_stream_writable.js":132,"readable-stream/lib/internal/streams/end-of-stream.js":136,"readable-stream/lib/internal/streams/pipeline.js":138}],154:[function(e,t,r){"use strict";var i=e("safe-buffer").Buffer,n=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||i.isEncoding!==n&&n(e))return t||e;throw new Error("Unknown encoding: "+e)}function s(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=h,this.end=d,t=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function f(e){var t,r=this.lastTotal-this.lastNeed,i=(t=this,128!=(192&(i=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<i.length?128!=(192&i[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<i.length&&128!=(192&i[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==i?i:this.lastNeed<=e.length?(e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,r,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);t=e.toString("utf16le",t);if(t){var r=t.charCodeAt(t.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function c(e){var t,e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function h(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}(r.StringDecoder=s).prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},s.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(!(i<r)){var n=a(t[i]);if(0<=n)return 0<n&&(e.lastNeed=n-1),n;if(!(--i<r||-2===n)){if(0<=(n=a(t[i])))return 0<n&&(e.lastNeed=n-2),n;if(!(--i<r||-2===n)&&0<=(n=a(t[i])))return 0<n&&(2===n?n=0:e.lastNeed=n-3),n}}return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;r=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":155}],155:[function(e,t,r){arguments[4][48][0].apply(r,arguments)},{buffer:49,dup:48}],156:[function(e,r,t){!function(t){!function(){function i(e){try{if(!t.localStorage)return}catch(e){return}e=t.localStorage[e];return null!=e&&"true"===String(e).toLowerCase()}r.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],157:[function(e,t,r){"use strict";var s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||((i=i||Array.prototype.slice.call(t,0,n))[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},f=(Object.defineProperty(r,"__esModule",{value:!0}),e(".."));function i(e){var t=this;this._clientToSend={},this._isClientConnected={},this._clientIsServer={},this._tooldb=e,this.tooldb.once("init",function(){t.tooldb.options.server&&t.getMeAsPeer().then(function(e){t.tooldb.serverPeers.push(e)})})}Object.defineProperty(i.prototype,"clientToSend",{get:function(){return this._clientToSend},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isClientConnected",{get:function(){return this._isClientConnected},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tooldb",{get:function(){return this._tooldb},enumerable:!1,configurable:!0}),i.prototype.getMeAsPeer=function(){var t=this,r=(new Date).getTime();return(0,f.getPeerSignature)(this.tooldb.peerAccount,this.tooldb.options.topic,r,this.tooldb.options.host,this.tooldb.options.port).then(function(e){return{topic:t.tooldb.options.topic,timestamp:r,host:t.tooldb.options.host,port:t.tooldb.options.port,address:t.tooldb.peerAccount.getAddress()||"",sig:e}})},i.prototype.isConnected=function(e){return!!this._isClientConnected[e]&&this._isClientConnected[e]()},i.prototype.isServer=function(e){return this._clientIsServer[e]||!1},i.prototype.craftPingMessage=function(){var t=this;return this.getMeAsPeer().then(function(e){return JSON.stringify({type:"ping",clientId:t.getClientAddress(),to:[t.getClientAddress()],isServer:t.tooldb.options.server,id:(0,f.textRandom)(10),peer:e})})},i.prototype.executeSendToClient=function(e,t){this._clientToSend[e]&&this._clientToSend[e](t)},i.prototype.getClientAddress=function(){return(this.tooldb.peerAccount.getAddress()||"").slice(-20)},i.prototype.onClientDisconnect=function(e){delete this._clientToSend[e],delete this._clientIsServer[e]},i.prototype.onClientMessage=function(t,e,r){e&&!this.tooldb.processedOutHashes[e]&&(this.tooldb.processedOutHashes[e]=[]);try{var i,n=JSON.parse(t);"ping"===n.type||"pong"===n.type?(r(i=n.clientId),this.tooldb.onPeerConnect(i),this._clientIsServer[i]=n.isServer,this.tooldb.processedOutHashes[i]=[],this.tooldb.clientOnMessage(n,i)):e&&this.tooldb.clientOnMessage(n,e)}catch(e){this.tooldb.logger("Got message ERR",t),this.tooldb.logger(e)}},i.prototype.sendToAll=function(t,r){var i=this,n=(void 0===r&&(r=!1),(0,f.uniq)(a(a([],t.to,!0),[this.getClientAddress()],!1))),o=JSON.stringify(s(s({},t),{to:n}));Object.keys(this.clientToSend).filter(function(e){return!n.includes(e)}).filter(function(e){return i.isConnected(e)}).forEach(function(e){(r&&i.isServer(e)||!r)&&(i.tooldb.logger(n,"Sent out to:",e),"put"===t.type||"crdtPut"===t.type?i.tooldb.processedOutHashes[e].includes(t.data.h)||(i.executeSendToClient(e,o),i.tooldb.processedOutHashes[e].push(t.data.h)):i.executeSendToClient(e,o))})},i.prototype.sendToClientId=function(e,t){var r=(0,f.uniq)(a(a([],t.to,!0),[this.getClientAddress()],!1)),r=JSON.stringify(s(s({},t),{to:r}));"put"===t.type||"crdtPut"===t.type?e&&!this.tooldb.processedOutHashes[e].includes(t.data.h)&&(this.executeSendToClient(e,r),this.tooldb.processedOutHashes[e].push(t.data.h)):this.executeSendToClient(e,r)},r.default=i},{"..":164}],158:[function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,s,a,f){return new(a=a||Promise)(function(r,t){function i(e){try{o(f.next(e))}catch(e){t(e)}}function n(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,n)}o((f=f.apply(e,s||[])).next())})},n=this&&this.__generator||function(i,n){var o,s,a,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,s=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(a=0<(a=f.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){f.label=t[1];break}if(6===t[0]&&f.label<a[1]){f.label=a[1],a=t;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(t);break}a[2]&&f.ops.pop(),f.trys.pop();continue}t=n.call(i,f)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function o(e,t){this._readyPromise=Promise.resolve(),this._tooldb=e,t&&(this._forceStorageName=t)}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(o.prototype,"ready",{get:function(){return this._readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"tooldb",{get:function(){return this._tooldb},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"storageName",{get:function(){return this._forceStorageName||this._tooldb.options.storageName},enumerable:!1,configurable:!0}),o.prototype.waitForReady=function(){return i(this,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,this._readyPromise];case 1:return e.sent(),[2]}})})},o.prototype.put=function(e,t){return Promise.resolve()},o.prototype.get=function(e){return Promise.resolve("")},o.prototype.query=function(e){return Promise.resolve([])},r.default=o},{}],159:[function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,s,a,f){return new(a=a||Promise)(function(r,t){function i(e){try{o(f.next(e))}catch(e){t(e)}}function n(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,n)}o((f=f.apply(e,s||[])).next())})},n=this&&this.__generator||function(i,n){var o,s,a,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,s=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(a=0<(a=f.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){f.label=t[1];break}if(6===t[0]&&f.label<a[1]){f.label=a[1],a=t;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(t);break}a[2]&&f.ops.pop(),f.trys.pop();continue}t=n.call(i,f)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function o(e){this._tooldb=e}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(o.prototype,"tooldb",{get:function(){return this._tooldb},enumerable:!1,configurable:!0}),o.prototype.anonUser=function(){return i(this,void 0,void 0,function(){return n(this,function(e){return[2]})})},o.prototype.setUser=function(e,t){return i(this,void 0,void 0,function(){return n(this,function(e){return[2]})})},o.prototype.signData=function(e){return Promise.resolve("")},o.prototype.verifySignature=function(e){return Promise.resolve(!1)},o.prototype.getAccountFromPrivate=function(e){return Promise.resolve(void 0)},o.prototype.encryptAccount=function(e){return Promise.resolve(void 0)},o.prototype.decryptAccount=function(e,t){return Promise.resolve(void 0)},o.prototype.getAddress=function(){return""},o.prototype.getUsername=function(){return""},r.default=o},{}],160:[function(e,t,r){"use strict";function i(){this.type=""}Object.defineProperty(r,"__esModule",{value:!0}),r.BaseCrdt=r.CRDT_COUNTER=r.CRDT_LIST=r.CRDT_MAP=void 0,r.CRDT_MAP="MAP",r.CRDT_LIST="LIST",r.CRDT_COUNTER="COUNTER",i.prototype.mergeChanges=function(e){},i.prototype.getChanges=function(){return[]},Object.defineProperty(i.prototype,"value",{get:function(){return""},enumerable:!1,configurable:!0}),r.BaseCrdt=i},{}],161:[function(e,t,r){"use strict";var i,n,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(r,"__esModule",{value:!0}),r.CounterCrdt=void 0,e("..")),e=(n=s.BaseCrdt,o(a,n),a.prototype.changesSort=function(e,t){return e.i>t.i?1:e.i<t.i?-1:0},a.prototype.calculate=function(){var t=0;this._changes.length!==this._lastUpdateSize&&(this._changes.sort(this.changesSort).forEach(function(e){"ADD"===e.t?t+=e.v:"SUB"===e.t&&(t-=e.v)}),this._lastUpdateSize=this._changes.length,this._value=t)},Object.defineProperty(a.prototype,"value",{get:function(){return this.calculate(),this._value},enumerable:!1,configurable:!0}),a.prototype.mergeChanges=function(e){var r=this;e.forEach(function(t){0===r._changes.filter(function(e){return e.i===t.i&&e.a===t.a&&e.t===t.t}).length&&r._changes.push(t)}),this.calculate()},a.prototype.getChanges=function(){return this._changes},a.prototype.ADD=function(e){var t=this,r=this._changes.filter(function(e){return e.a===t._author});this._changes.push({t:"ADD",v:e,a:this._author,i:r.length}),this.calculate()},a.prototype.SUB=function(e){var t=this,r=this._changes.filter(function(e){return e.a===t._author});this._changes.push({t:"SUB",v:e,a:this._author,i:r.length}),this.calculate()},a);function a(e,t){var r=n.call(this)||this;return r.type=s.CRDT_LIST,r._changes=[],r._author="",r._value=0,r._lastUpdateSize=0,r._author=e,t&&r.mergeChanges(t),r.calculate(),r}r.CounterCrdt=e},{"..":164}],162:[function(e,t,r){"use strict";var i,n,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(r,"__esModule",{value:!0}),r.ListCrdt=void 0,e("..")),e=(n=s.BaseCrdt,o(a,n),a.prototype.changesSort=function(e,t){return e.i>t.i?1:e.i<t.i?-1:0},a.prototype.calculate=function(){var i=[];this._changes.length!==this._lastUpdateSize&&(this._changes.sort(this.changesSort).forEach(function(t){var e,r;"INS"===t.t?(r=0,t.p?r=i.findIndex(function(e){return e.index===t.p})+1:t.n&&(r=i.findIndex(function(e){return e.index===t.n})),e={value:t.v,index:t.i,tomb:!1,prev:t.p,next:t.n},i.splice(r,0,e)):"DEL"===t.t&&(r=i.findIndex(function(e){return e.index===t.v}),i[r].tomb=!0)}),this._lastUpdateSize=this._changes.length,this._tempValues=i,this._value=i.filter(function(e){return!e.tomb}).map(function(e){return e.value}))},Object.defineProperty(a.prototype,"value",{get:function(){return this.calculate(),this._value},enumerable:!1,configurable:!0}),a.prototype.mergeChanges=function(e){var r=this;e.forEach(function(t){0===r._changes.filter(function(e){return e.i===t.i&&e.t===t.t&&e.v===t.v}).length&&r._changes.push(t)}),this.calculate()},a.prototype.getChanges=function(){return this._changes},a.prototype.INS=function(e,t){var r,i=this,n=this._tempValues.filter(function(e){return!e.tomb}),o=void 0,s=void 0,t=(0!==n.length&&(r=n[t].index,n=this._tempValues.findIndex(function(e){return e.index===r}),o=this._tempValues[n-1],s=this._tempValues[n]),this._changes.filter(function(e){return e.i.startsWith(i._author)}));this._changes.push({t:"INS",p:null==o?void 0:o.index,n:null==s?void 0:s.index,v:e,i:this._author+"-"+"".concat(t.length).padStart(8,"0")}),this.calculate()},a.prototype.PUSH=function(e){var t=this,r=this._tempValues.filter(function(e){return!e.tomb}),i=null==(r=r[r.length-1])?void 0:r.index,r=this._tempValues.findIndex(function(e){return e.index===i}),r=this._tempValues[r],n=this._changes.filter(function(e){return e.i.startsWith(t._author)});this._changes.push({t:"INS",p:null==r?void 0:r.index,n:void 0,v:e,i:this._author+"-"+"".concat(n.length).padStart(8,"0")}),this.calculate()},a.prototype.DEL=function(e){var t=this,r=this._tempValues.filter(function(e){return!e.tomb})[e].index,e=this._tempValues.findIndex(function(e){return e.index===r}),e=this._tempValues[e],i=this._changes.filter(function(e){return e.i.startsWith(t._author)});this._changes.push({t:"DEL",v:e.index,i:this._author+"-"+"".concat(i.length).padStart(8,"0")}),this.calculate()},a);function a(e,t){var r=n.call(this)||this;return r.type=s.CRDT_LIST,r._changes=[],r._author="",r._value=[],r._tempValues=[],r._lastUpdateSize=0,r._author=e,t&&r.mergeChanges(t),r.calculate(),r}r.ListCrdt=e},{"..":164}],163:[function(e,t,r){"use strict";var i,n,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(r,"__esModule",{value:!0}),r.MapCrdt=void 0,e("..")),e=(n=s.BaseCrdt,o(a,n),a.prototype.changesSort=function(e,t){return e.i<t.i?-1:e.i>t.i?1:"SET"===e.t&&"DEL"===t.t?-1:"DEL"===e.t&&"SET"===t.t?1:e.a<t.a?-1:e.a>t.a?1:0},a.prototype.calculate=function(){var t=this,r={};this._changes.length!==this._lastUpdateSize&&(this._changes.sort(this.changesSort).forEach(function(e){"SET"===e.t?r[e.k]=e.v:"DEL"===e.t&&delete r[e.k],t._keyIndex[e.k]=e.i}),this._lastUpdateSize=this._changes.length,this._value=r)},Object.defineProperty(a.prototype,"value",{get:function(){return this.calculate(),this._value},enumerable:!1,configurable:!0}),a.prototype.mergeChanges=function(e){var r=this;e.forEach(function(t){0===r._changes.filter(function(e){return e.k===t.k&&e.i===t.i&&e.a===t.a&&e.t===t.t}).length&&r._changes.push(t)}),this.calculate()},a.prototype.getChanges=function(){return this._changes},a.prototype.SET=function(e,t){this._keyIndex[e]=(this._keyIndex[e]||0)+1,this._changes.push({t:"SET",k:e,a:this._author,v:t,i:this._keyIndex[e]}),this.calculate()},a.prototype.DEL=function(e){this._keyIndex[e]=(this._keyIndex[e]||0)+1,this._changes.push({t:"DEL",k:e,a:this._author,i:this._keyIndex[e]}),this.calculate()},a);function a(e,t){var r=n.call(this)||this;return r.type=s.CRDT_MAP,r._changes=[],r._author="",r._value={},r._keyIndex={},r._lastUpdateSize=0,r._author=e,t&&r.mergeChanges(t),r.calculate(),r}r.MapCrdt=e},{"..":164}],164:[function(e,L,t){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){e[i=void 0===i?r:i]=t[r]}),r=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(t,"__esModule",{value:!0}),t.ToolDb=t.handlePut=t.handleGet=t.handlePong=t.handlePing=t.handleQuery=t.handleCrdtPut=t.handleCrdtGet=t.handleFunction=t.handleSubscribe=t.ToolDbUserAdapter=t.ToolDbStorageAdapter=t.ToolDbNetworkAdapter=t.base64ToUint8=t.uint8ToBase64=t.fromBase64=t.toBase64=t.hexToUint8=t.hexToString=t.hexToArrayBuffer=t.arrayBufferToHex=t.arrayBufferToString=t.stringToArrayBuffer=t.catchReturn=t.textRandom=t.verifyPeer=t.getPeerSignature=t.verifyMessage=t.randomAnimal=t.generateGroupKey=t.uniq=t.sha256=t.sha1=t.proofOfWork=void 0,e("./utils/proofOfWork")),s=(Object.defineProperty(t,"proofOfWork",{enumerable:!0,get:function(){return n(o).default}}),e("./utils/sha1")),a=(Object.defineProperty(t,"sha1",{enumerable:!0,get:function(){return n(s).default}}),e("./utils/sha256")),f=(Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return n(a).default}}),e("./utils/uniq")),u=(Object.defineProperty(t,"uniq",{enumerable:!0,get:function(){return n(f).default}}),e("./utils/generateGroupKey")),c=(Object.defineProperty(t,"generateGroupKey",{enumerable:!0,get:function(){return n(u).default}}),e("./utils/randomAnimal")),h=(Object.defineProperty(t,"randomAnimal",{enumerable:!0,get:function(){return n(c).default}}),e("./utils/verifyMessage")),d=(Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return n(h).default}}),e("./utils/getPeerSignature")),l=(Object.defineProperty(t,"getPeerSignature",{enumerable:!0,get:function(){return n(d).default}}),e("./utils/verifyPeer")),p=(Object.defineProperty(t,"verifyPeer",{enumerable:!0,get:function(){return n(l).default}}),e("./utils/textRandom")),b=(Object.defineProperty(t,"textRandom",{enumerable:!0,get:function(){return n(p).default}}),e("./utils/catchReturn")),m=(Object.defineProperty(t,"catchReturn",{enumerable:!0,get:function(){return n(b).default}}),e("./utils/encoding/stringToArrayBuffer")),y=(Object.defineProperty(t,"stringToArrayBuffer",{enumerable:!0,get:function(){return n(m).default}}),e("./utils/encoding/arrayBufferToString")),g=(Object.defineProperty(t,"arrayBufferToString",{enumerable:!0,get:function(){return n(y).default}}),e("./utils/encoding/arrayBufferToHex")),v=(Object.defineProperty(t,"arrayBufferToHex",{enumerable:!0,get:function(){return n(g).default}}),e("./utils/encoding/hexToArrayBuffer")),_=(Object.defineProperty(t,"hexToArrayBuffer",{enumerable:!0,get:function(){return n(v).default}}),e("./utils/encoding/hexToString")),w=(Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return n(_).default}}),e("./utils/encoding/hexToUint8")),M=(Object.defineProperty(t,"hexToUint8",{enumerable:!0,get:function(){return n(w).default}}),e("./utils/encoding/toBase64")),S=(Object.defineProperty(t,"toBase64",{enumerable:!0,get:function(){return n(M).default}}),e("./utils/encoding/fromBase64")),A=(Object.defineProperty(t,"fromBase64",{enumerable:!0,get:function(){return n(S).default}}),e("./utils/encoding/uint8ToBase64")),k=(Object.defineProperty(t,"uint8ToBase64",{enumerable:!0,get:function(){return n(A).default}}),e("./utils/encoding/base64ToUint8")),E=(Object.defineProperty(t,"base64ToUint8",{enumerable:!0,get:function(){return n(k).default}}),e("./adapters-base/networkAdapter")),x=(Object.defineProperty(t,"ToolDbNetworkAdapter",{enumerable:!0,get:function(){return n(E).default}}),e("./adapters-base/storageAdapter")),P=(Object.defineProperty(t,"ToolDbStorageAdapter",{enumerable:!0,get:function(){return n(x).default}}),e("./adapters-base/userAdapter")),I=(Object.defineProperty(t,"ToolDbUserAdapter",{enumerable:!0,get:function(){return n(P).default}}),r(e("./types/tooldb"),t),r(e("./types/message"),t),r(e("./crdt/baseCrdt"),t),r(e("./crdt/counterCrdt"),t),r(e("./crdt/listCrdt"),t),r(e("./crdt/mapCrdt"),t),e("./messageHandlers/handleSubscribe")),R=(Object.defineProperty(t,"handleSubscribe",{enumerable:!0,get:function(){return n(I).default}}),e("./messageHandlers/handleFunction")),B=(Object.defineProperty(t,"handleFunction",{enumerable:!0,get:function(){return n(R).default}}),e("./messageHandlers/handleCrdtGet")),j=(Object.defineProperty(t,"handleCrdtGet",{enumerable:!0,get:function(){return n(B).default}}),e("./messageHandlers/handleCrdtPut")),T=(Object.defineProperty(t,"handleCrdtPut",{enumerable:!0,get:function(){return n(j).default}}),e("./messageHandlers/handleQuery")),O=(Object.defineProperty(t,"handleQuery",{enumerable:!0,get:function(){return n(T).default}}),e("./messageHandlers/handlePing")),C=(Object.defineProperty(t,"handlePing",{enumerable:!0,get:function(){return n(O).default}}),e("./messageHandlers/handlePong")),D=(Object.defineProperty(t,"handlePong",{enumerable:!0,get:function(){return n(C).default}}),e("./messageHandlers/handleGet")),N=(Object.defineProperty(t,"handleGet",{enumerable:!0,get:function(){return n(D).default}}),e("./messageHandlers/handlePut")),U=(Object.defineProperty(t,"handlePut",{enumerable:!0,get:function(){return n(N).default}}),e("./tooldb"));Object.defineProperty(t,"ToolDb",{enumerable:!0,get:function(){return n(U).default}})},{"./adapters-base/networkAdapter":157,"./adapters-base/storageAdapter":158,"./adapters-base/userAdapter":159,"./crdt/baseCrdt":160,"./crdt/counterCrdt":161,"./crdt/listCrdt":162,"./crdt/mapCrdt":163,"./messageHandlers/handleCrdtGet":166,"./messageHandlers/handleCrdtPut":167,"./messageHandlers/handleFunction":168,"./messageHandlers/handleGet":169,"./messageHandlers/handlePing":170,"./messageHandlers/handlePong":171,"./messageHandlers/handlePut":172,"./messageHandlers/handleQuery":173,"./messageHandlers/handleSubscribe":174,"./tooldb":188,"./types/message":189,"./types/tooldb":190,"./utils/catchReturn":191,"./utils/encoding/arrayBufferToHex":192,"./utils/encoding/arrayBufferToString":193,"./utils/encoding/base64ToUint8":194,"./utils/encoding/fromBase64":195,"./utils/encoding/hexToArrayBuffer":196,"./utils/encoding/hexToString":197,"./utils/encoding/hexToUint8":198,"./utils/encoding/stringToArrayBuffer":199,"./utils/encoding/toBase64":200,"./utils/encoding/uint8ToBase64":201,"./utils/generateGroupKey":202,"./utils/getPeerSignature":203,"./utils/proofOfWork":204,"./utils/randomAnimal":205,"./utils/sha1":206,"./utils/sha256":207,"./utils/textRandom":208,"./utils/uniq":209,"./utils/verifyMessage":210,"./utils/verifyPeer":211}],165:[function(e,t,r){"use strict";var f=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||((i=i||Array.prototype.slice.call(t,0,n))[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},u=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(e,t,r,i,n,o){var s,a;this.options.debug&&(s=(a="undefined"==typeof window)?this.options.storageName:"%c"+this.options.storageName,a=a?"":"background: #"+(0,u.sha1)(this.options.storageName).slice(-6)+"; padding: 2px; color: black",console.log.apply(console,f([s,a],[e,t,r,i,n,n,o].slice(0,arguments.length),!1)))}},{".":164}],166:[function(e,t,r){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||((i=i||Array.prototype.slice.call(t,0,n))[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r,i){var n=this;this.store.get(r.key).then(function(e){try{var t={type:"crdtPut",data:JSON.parse(e),to:[],id:r.id};n.network.sendToClientId(i,t)}catch(e){}}).catch(function(e){var t=o(o({},r),{to:s(s([],r.to,!0),[i],!1)});n.logger("Local key not found, relay",JSON.stringify(t)),n.network.sendToAll(t,!1)})}},{}],167:[function(e,t,r){"use strict";var u=this&&this.__assign||function(){return(u=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||((i=i||Array.prototype.slice.call(t,0,n))[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c=(Object.defineProperty(r,"__esModule",{value:!0}),e("..")),o=n(e("../toolDbVerificationWrapper"));r.default=function(a,t){var f=this;o.default.call(this,a.data).then(function(e){var s;e===c.VerifyResult.Verified?(s=u(u({},a),{to:i(i([],a.to,!0),[t],!1)}),f.emit("crdtput",s),f.emit("data",s.data),f.emit("verified",s),f.network.sendToAll(s,!0),f.store.get(s.data.k).then(function(t){if(t)try{var e=JSON.parse(t),r=s,i=void 0,n=(e.c===c.CRDT_MAP&&(i=new c.MapCrdt(f.userAccount.getAddress()||"",e.v)),e.c===c.CRDT_LIST&&(i=new c.ListCrdt(f.userAccount.getAddress()||"",e.v)),e.c===c.CRDT_COUNTER&&(i=new c.CounterCrdt(f.userAccount.getAddress()||"",e.v)),[]);i&&(i.mergeChanges(s.data.v),n=i.getChanges()),(r=u({},s)).data.v=n,e.t<s.data.t?(o=r.data.k,f.triggerKeyListener(o,r.data),f.store.put(r.data.k,JSON.stringify(r.data)).catch(function(e){})):(o=a.data.k,f.triggerKeyListener(o,e))}catch(e){f.logger("Couldnt parse crdt data",t,e)}else{var o=s.data.k;f.triggerKeyListener(o,s.data),f.store.put(s.data.k,JSON.stringify(s.data)).catch(function(e){f.logger("Couldnt insert crdt data",e)})}}).catch(function(e){var t=s.data.k;f.triggerKeyListener(t,s.data),f.store.put(s.data.k,JSON.stringify(s.data)).catch(function(e){})})):f.logger("unverified message: ",e,a)})}},{"..":164,"../toolDbVerificationWrapper":187}],168:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,r){var i=this;if(this.functions[t.function])try{this.functions[t.function](t.args).then(function(e){e={return:e,type:"functionReturn",id:t.id,code:"OK",to:[]};i.network.sendToClientId(r,e)}).catch(function(e){e={return:e.toString(),type:"functionReturn",id:t.id,code:"ERR",to:[]};i.network.sendToClientId(r,e)})}catch(e){var n={return:e.toString(),type:"functionReturn",id:t.id,code:"ERR",to:[]};this.network.sendToClientId(r,n)}else{n={return:"Function not found",type:"functionReturn",id:t.id,code:"NOT_FOUND",to:[]};this.network.sendToClientId(r,n)}}},{}],169:[function(e,t,r){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||((i=i||Array.prototype.slice.call(t,0,n))[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r,i){var n=this;this.store.get(r.key).then(function(e){try{var t={type:"put",data:JSON.parse(e),to:[],id:r.id};n.network.sendToClientId(i,t)}catch(e){}}).catch(function(e){var t=o(o({},r),{to:s(s([],r.to,!0),[i],!1)});n.logger("Local key not found, relay",JSON.stringify(t)),n.network.sendToAll(t,!1)})}},{}],170:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("..");r.default=function(t,r){var i=this;this.isConnected||(this.isConnected=!0,this.onConnect()),(0,n.verifyPeer)(this,t.peer).then(function(e){e&&t.peer.topic===i.options.topic?(0===i.serverPeers.filter(function(e){return e.address===t.peer.address}).length&&t.isServer&&i.serverPeers.push(t.peer),i.network.sendToClientId(r,{type:"pong",isServer:i.options.server,clientId:i.network.getClientAddress(),to:[],servers:i.serverPeers,id:t.id}),i.onPeerConnect(i.peerAccount.getAddress()||"")):i.logger("Blocked a remote peer from joining; ",e,t)})}},{"..":164}],171:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=e("..");r.default=function(e,t){var r=this;this.isConnected||(this.isConnected=!0,this.onConnect()),e.servers.forEach(function(t){0===r.serverPeers.filter(function(e){return e.address===t.address}).length&&t.host&&t.port&&(0,i.verifyPeer)(r,t).then(function(e){e&&t.topic===r.options.topic&&0===r.serverPeers.filter(function(e){return e.address===t.address}).length&&r.serverPeers.push(t)})}),this.onPeerConnect(this.peerAccount.getAddress()||"")}},{"..":164}],172:[function(e,t,r){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||((i=i||Array.prototype.slice.call(t,0,n))[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=(Object.defineProperty(r,"__esModule",{value:!0}),e("..")),f=i(e("../toolDbVerificationWrapper"));r.default=function(i,t){var n=this;f.default.call(this,i.data).then(function(e){var r;e===a.VerifyResult.Verified?(n.emit("put",i),n.emit("data",i.data),n.emit("verified",i),r=o(o({},i),{to:s(s([],i.to,!0),[t],!1)}),n.network.sendToAll(r,!0),n.store.get(r.data.k).then(function(e){var t,e=JSON.parse(e);e.t<r.data.t?(t=r.data.k,n.triggerKeyListener(t,r.data),n.store.put(r.data.k,JSON.stringify(r.data)).catch(function(e){})):(t=r.data.k,n.triggerKeyListener(t,e))}).catch(function(e){var t=i.data.k;n.triggerKeyListener(t,i.data),n.store.put(i.data.k,JSON.stringify(i.data)).catch(function(e){})})):n.logger("unverified message: ",e,i)})}},{"..":164,"../toolDbVerificationWrapper":187}],173:[function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||((i=i||Array.prototype.slice.call(t,0,n))[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,r){var e,i=this;this.store.query(t.key).then(function(e){i.network.sendToClientId(r,{type:"queryAck",id:t.id,to:[],keys:e})}).catch(function(e){}),this.options.server&&(e=n(n({},t),{to:o(o([],t.to,!0),[r],!1)}),this.network.sendToAll(e,!0))}},{}],174:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r,i){var n=this,e=i+"-"+r.key;this.subscriptions.includes(e)||(this.subscriptions.push(e),this.addKeyListener(r.key,function(e){i&&(e={data:e,id:r.id,type:"put",to:[]},n.network.sendToClientId(i,e))})),this.store.get(r.key).then(function(e){try{var t={data:JSON.parse(e),id:r.id,type:"put",to:[]};n.network.sendToClientId(i,t)}catch(e){}}).catch(function(e){})}},{}],175:[function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,s,a,f){return new(a=a||Promise)(function(r,t){function i(e){try{o(f.next(e))}catch(e){t(e)}}function n(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,n)}o((f=f.apply(e,s||[])).next())})},n=this&&this.__generator||function(i,n){var o,s,a,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,s=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(a=0<(a=f.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){f.label=t[1];break}if(6===t[0]&&f.label<a[1]){f.label=a[1],a=t;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(t);break}a[2]&&f.ops.pop(),f.trys.pop();continue}t=n.call(i,f)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return i(this,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,this.userAccount.anonUser()];case 1:return e.sent(),[2]}})})}},{}],176:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){var r;if(this.processedIds[e.type]||(this.processedIds[e.type]=[]),!this.processedIds[e.type].includes(e.id))if(this.emit("message",e,t),this.processedIds[e.type].push(e.id),this.logger("Got message ".concat(e.type," from ").concat(t)),this.logger(e),e.id&&(r=e.id,this._idListeners[r]&&(this._idListeners[r](e),this.removeIdListener(r))),void 0===e||void 0===e.type)this.logger("Message is invalid!",e,typeof e);else switch(e.type){case"ping":this.handlePing(e,t);break;case"pong":this.handlePong(e,t);break;case"subscribe":this.handleSubscribe(e,t);break;case"get":this.handleGet(e,t);break;case"put":this.handlePut(e,t);break;case"crdtPut":this.handleCrdtPut(e,t);break;case"crdtGet":this.handleCrdtGet(e,t);break;case"query":this.handleQuery(e,t);break;case"function":this.handleFunction(e,t)}}},{}],177:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var h=e(".");r.default=function(o,s,a,f,u){var c=this;return void 0===a&&(a=!1),void 0===f&&(f=1e3),new Promise(function(r,e){var t,i,n;a&&void 0===c.userAccount.getAddress()?e(new Error("You are not authorized yet!")):(t=a?":".concat(c.userAccount.getAddress(),".").concat(o):o,c.logger("CRDT GET",t),i=(0,h.textRandom)(10),n=setTimeout(function(){c.store.get(t).then(function(e){try{var t=JSON.parse(e);s.mergeChanges(t.v),c.emit("data",t),r(t)}catch(e){r(null)}}).catch(function(e){return r(null)})},f),c.addIdListener(i,function(e){c.logger("GET RECV",t),clearTimeout(n),"crdtPut"===e.type&&(s.mergeChanges(e.data.v),r(e))}),c.store.get(t).then(function(e){try{var t=JSON.parse(e);clearTimeout(n),c.removeIdListener(i),s.mergeChanges(t.v),c.emit("data",t),r(t)}catch(e){}}).catch(function(){}),c.network.sendToAll({type:"crdtGet",to:u||[],key:t,id:i}))})}},{".":164}],178:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var h=e(".");r.default=function(s,a,f,u){var c=this;return void 0===f&&(f=!1),new Promise(function(i,e){var n,o,t;s.includes(".")?e(new Error("Key cannot include dots!; ".concat(s))):c.userAccount.getAddress()?(n=(new Date).getTime(),o=a.getChanges(),t=JSON.stringify(o),t="".concat(t).concat(c.userAccount.getAddress()).concat(n),(0,h.proofOfWork)(t,c.options.pow).then(function(e){var t=e.hash,r=e.nonce;c.userAccount.signData(t).then(function(e){e&&c.userAccount.getAddress()&&(e={k:f?":".concat(c.userAccount.getAddress(),".").concat(s):s,a:c.userAccount.getAddress()||"",n:r,t:n,h:t,s:e,v:o,c:a.type},c.logger("PUT CRDT",s,e),e={type:"crdtPut",id:(0,h.textRandom)(10),to:u||[],data:e},c.network.sendToAll(e),i(e))})}).catch(e)):e(new Error("You need to log in before you can PUT."))})}},{".":164}],179:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var f=e(".");r.default=function(n,o,s){var a=this;return void 0===s&&(s=1e4),new Promise(function(t,e){a.logger("FUNCTION > "+n);var r=(0,f.textRandom)(10),i=setTimeout(function(){t({return:"Timed out",code:"ERR"})},s);a.addIdListener(r,function(e){a.logger("FUNCTION RECV > "+n,e),clearTimeout(i),"functionReturn"===e.type&&t({return:e.return,code:e.code})}),a.network.sendToAll({type:"function",to:[],function:n,args:o,id:r})})}},{".":164}],180:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var c=e(".");r.default=function(r,s,a,f){var u=this;return void 0===s&&(s=!1),void 0===a&&(a=1e3),new Promise(function(i,e){var t,n,o;s&&void 0===u.userAccount.getAddress()?e(new Error("You are not authorized yet!")):(t=s?":".concat(u.userAccount.getAddress(),".").concat(r):r,u.logger("GET",t),n=(0,c.textRandom)(10),o=setTimeout(function(){u.store.get(t).then(function(e){try{var t=JSON.parse(e);u.emit("data",t),i(t.v)}catch(e){i(null)}}).catch(function(e){i(null)})},a),u.addIdListener(n,function(e){u.logger("GET RECV",t),clearTimeout(o),"put"===e.type&&i(e.data.v)}),u.store.get(t).then(function(e){try{var t=JSON.parse(e),r=t.v;clearTimeout(o),u.removeIdListener(n),u.emit("data",t),i(r)}catch(e){}}).catch(function(e){}),u.network.sendToAll({type:"get",to:f||[],key:t,id:n}))})}},{".":164}],181:[function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,s,a,f){return new(a=a||Promise)(function(r,t){function i(e){try{o(f.next(e))}catch(e){t(e)}}function n(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,n)}o((f=f.apply(e,s||[])).next())})},o=this&&this.__generator||function(i,n){var o,s,a,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,s=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(a=0<(a=f.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){f.label=t[1];break}if(6===t[0]&&f.label<a[1]){f.label=a[1],a=t;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(t);break}a[2]&&f.ops.pop(),f.trys.pop();continue}t=n.call(i,f)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},s=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(r,i){return n(this,void 0,void 0,function(){var t;return o(this,function(e){switch(e.label){case 0:return this.userAccount?[4,this.userAccount.getAccountFromPrivate(r)]:[2,Promise.resolve(void 0)];case 1:return t=e.sent(),[4,this.userAccount.setUser(t,i||(0,s.randomAnimal)())];case 2:return e.sent(),[2,t]}})})}},{".":164}],182:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var d=e(".");r.default=function(a,f,u,c){var h=this;return void 0===u&&(u=!1),new Promise(function(o,e){var s,t;a.includes(".")?e(new Error("Key cannot include dots!; ".concat(a))):h.userAccount&&h.userAccount.getAddress()?(s=(new Date).getTime(),t="".concat(JSON.stringify(f)).concat(h.userAccount.getAddress()).concat(s),(0,d.proofOfWork)(t,h.options.pow).then(function(e){var i=e.hash,n=e.nonce;h.userAccount.signData(i).then(function(e){var t,r;e&&h.userAccount.getAddress()&&(e={k:t=u?":".concat(h.userAccount.getAddress(),".").concat(a):a,a:h.userAccount.getAddress()||"",n:n,t:s,h:i,s:e,v:f,c:null},h.logger("PUT",a,e),r={type:"put",id:(0,d.textRandom)(10),to:c||[],data:e},h.network.sendToAll(r),h.store.put(t,JSON.stringify(e)).catch(function(e){}).finally(function(){o(r)}))})}).catch(e)):e(new Error("You need to log in before you can PUT."))})}},{".":164}],183:[function(e,t,r){"use strict";var l=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||((i=i||Array.prototype.slice.call(t,0,n))[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},p=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(a,f,u,c){var h=this,d=(void 0===f&&(f=!1),void 0===u&&(u=1e3),this.userAccount);return new Promise(function(e,t){var r,i,n,o,s;f&&void 0===d.getAddress()?t(new Error("You are not authorized yet!")):(r=f?":".concat(d.getAddress(),".").concat(a):a,h.logger("QUERY",r),t=(0,p.textRandom)(10),o=!(i=[]),h.store.query(r).then(function(e){i=l(l([],i,!0),e,!0),o=!0,n=setTimeout(s,u)}).catch(function(e){o=!0,n=setTimeout(s,u)}),s=function(){e((0,p.uniq)(i))},h.addIdListener(t,function(e){h.logger("QUERY RECV",r),"queryAck"===e.type&&(i=l(l([],i,!0),e.keys,!0),n&&clearTimeout(n),o&&(n=setTimeout(s,u)))}),h.network.sendToAll({type:"query",to:c||[],key:r,id:t}))})}},{".":164}],184:[function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,s,a,f){return new(a=a||Promise)(function(r,t){function i(e){try{o(f.next(e))}catch(e){t(e)}}function n(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,n)}o((f=f.apply(e,s||[])).next())})},a=this&&this.__generator||function(i,n){var o,s,a,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,s=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(a=0<(a=f.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){f.label=t[1];break}if(6===t[0]&&f.label<a[1]){f.label=a[1],a=t;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(t);break}a[2]&&f.ops.pop(),f.trys.pop();continue}t=n.call(i,f)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},f=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(n,e,r){var o=this;return new Promise(function(i,t){o.getData("==".concat(n),!1,2e3,r).then(function(r){if(r)try{o.userAccount.decryptAccount(r,(0,f.sha256)(e)).then(function(t){return s(o,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this.userAccount.setUser(t,n||"Anonymous ".concat((0,f.randomAnimal)()))];case 1:return e.sent(),i(r),[2]}})})}).catch(function(e){t(e)})}catch(e){t(e)}else t("Could not find user")}).catch(function(e){t(e)})})}},{".":164}],185:[function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,s,a,f){return new(a=a||Promise)(function(r,t){function i(e){try{o(f.next(e))}catch(e){t(e)}}function n(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,n)}o((f=f.apply(e,s||[])).next())})},n=this&&this.__generator||function(i,n){var o,s,a,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,s=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(a=0<(a=f.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){f.label=t[1];break}if(6===t[0]&&f.label<a[1]){f.label=a[1],a=t;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(t);break}a[2]&&f.ops.pop(),f.trys.pop();continue}t=n.call(i,f)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},h=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(t,r,c){return i(this,void 0,void 0,function(){var f,u=this;return n(this,function(e){return f="==".concat(t),[2,new Promise(function(a,t){u.getData(f,!1,3e3,c).then(function(e){var s;null===e?(s=new u.options.userAdapter(u)).encryptAccount((0,h.sha256)(r)).then(function(n){var o=(new Date).getTime(),e="".concat(JSON.stringify(n)).concat(s.getAddress()).concat(o);(0,h.proofOfWork)(e,u.options.pow).then(function(e){var r=e.hash,i=e.nonce;s.signData(r).then(function(e){var e={k:f,a:s.getAddress()||"",n:i,t:o,h:r,s:e,v:n,c:null},t=(u.logger("SIGNUP PUT",f,e),{type:"put",id:(0,h.textRandom)(10),to:c||[],data:e});u.network.sendToAll(t),u.store.put(f,JSON.stringify(e)).catch(function(e){}).finally(function(){a(t)})})}).catch(t)}):t(new Error("User already exists!"))}).catch(function(){t(new Error("Could not fetch user"))})})]})})}},{".":164}],186:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=e(".");r.default=function(i,n,o){var s=this;return void 0===n&&(n=!1),new Promise(function(e,t){var r;n&&void 0===s.userAccount.getAddress()?t(new Error("You are not authorized yet!")):(r=n?":".concat(s.userAccount.getAddress(),".").concat(i):i,s.logger("SUBSCRIBE",r),t=(0,a.textRandom)(10),s.network.sendToAll({type:"subscribe",key:r,to:o||[],id:t}),s.store.get(r).then(function(e){try{var t=JSON.parse(e);s.triggerKeyListener(r,t)}catch(e){}}).catch(function(e){}).finally(function(){e()}))})}},{".":164}],187:[function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,s,a,f){return new(a=a||Promise)(function(r,t){function i(e){try{o(f.next(e))}catch(e){t(e)}}function n(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,n)}o((f=f.apply(e,s||[])).next())})},s=this&&this.__generator||function(i,n){var o,s,a,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,s=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(a=0<(a=f.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){f.label=t[1];break}if(6===t[0]&&f.label<a[1]){f.label=a[1],a=t;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(t);break}a[2]&&f.ops.pop(),f.trys.pop();continue}t=n.call(i,f)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},a=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(o){var e=this;return new Promise(function(n){e.verifyMessage(o,e.options.pow).then(function(t){return i(e,void 0,void 0,function(){var r,i=this;return s(this,function(e){return t?(r=!0,this._customVerificator.forEach(function(e){var t;e&&o.k&&o.k.startsWith(e.key)&&(r=!1,t=void 0,i.store.get(o.k).then(function(e){try{t=JSON.parse(e)}catch(e){}}).catch(function(e){}).finally(function(){e.fn(o,t).then(function(e){n(e?a.VerifyResult.Verified:a.VerifyResult.CustomVerificationFailed)}).catch(function(e){n(a.VerifyResult.CustomVerificationFailed)})}))}),r&&n(t)):n(a.VerifyResult.InvalidVerification),[2]})})})})}},{".":164}],188:[function(e,C,t){"use strict";var i,n,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},s=this&&this.__awaiter||function(e,s,a,f){return new(a=a||Promise)(function(r,t){function i(e){try{o(f.next(e))}catch(e){t(e)}}function n(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,n)}o((f=f.apply(e,s||[])).next())})},a=this&&this.__generator||function(i,n){var o,s,a,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,s=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(a=0<(a=f.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){f.label=t[1];break}if(6===t[0]&&f.label<a[1]){f.label=a[1],a=t;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(t);break}a[2]&&f.ops.pop(),f.trys.pop();continue}t=n.call(i,f)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},u=(Object.defineProperty(t,"__esModule",{value:!0}),f(e("events"))),c=e("."),h=f(e("./toolDbGet")),d=f(e("./toolDbPut")),l=f(e("./toolDbSignIn")),p=f(e("./toolDbSignUp")),b=f(e("./toolDbCrdtGet")),m=f(e("./toolDbCrdtPut")),y=f(e("./toolDbFunction")),g=f(e("./toolDbAnonSignIn")),v=f(e("./toolDbClientOnMessage")),_=f(e("./toolDbVerificationWrapper")),w=f(e("./toolDbQueryKeys")),M=f(e("./toolDbKeysSignIn")),S=f(e("./toolDbSubscribe")),A=f(e("./messageHandlers/handleGet")),k=f(e("./messageHandlers/handlePut")),E=f(e("./messageHandlers/handlePing")),x=f(e("./messageHandlers/handlePong")),P=f(e("./messageHandlers/handleQuery")),I=f(e("./messageHandlers/handleFunction")),R=f(e("./messageHandlers/handleCrdtGet")),B=f(e("./messageHandlers/handleCrdtPut")),j=f(e("./messageHandlers/handleSubscribe")),T=f(e("./logger")),f=(n=u.default,r(O,n),Object.defineProperty(O.prototype,"subscriptions",{get:function(){return this._subscriptions},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"processedIds",{get:function(){return this._processedIds},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"processedOutHashes",{get:function(){return this._processedOutHashes},enumerable:!1,configurable:!0}),O.prototype.getUserNamespacedKey=function(e){var t;return":"+((null==(t=this.userAccount)?void 0:t.getAddress())||"")+"."+e},Object.defineProperty(O.prototype,"functions",{get:function(){return this._functions},enumerable:!1,configurable:!0}),O.prototype.addServerFunction=function(e,t){this._functions[e]=t},Object.defineProperty(O.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"network",{get:function(){return this._network},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"serverPeers",{get:function(){return this._serverPeers},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"store",{get:function(){return this._store},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"userAccount",{get:function(){return this._userAccount},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"peerAccount",{get:function(){return this._peerAccount},enumerable:!1,configurable:!0}),O);function O(e){void 0===e&&(e={});var i=n.call(this)||this,t=(i._serverPeers=[],i.logger=T.default,i.clientOnMessage=v.default,i.verifyMessage=c.verifyMessage,i._subscriptions=[],i._processedIds={},i._processedOutHashes={},i.subscribeData=S.default,i.isConnected=!1,i.onDisconnect=function(){},i.onConnect=function(){},i.onPeerDisconnect=function(e){},i.onPeerConnect=function(e){},i.getData=h.default,i.putData=d.default,i.putCrdt=m.default,i.getCrdt=b.default,i.queryKeys=w.default,i.doFunction=y.default,i.signIn=l.default,i.anonSignIn=g.default,i.keysSignIn=M.default,i.signUp=p.default,i.verify=_.default,i.handlePing=E.default,i.handlePong=x.default,i.handleCrdtGet=R.default,i.handleCrdtPut=B.default,i.handleGet=A.default,i.handlePut=k.default,i.handleQuery=P.default,i.handleSubscribe=j.default,i.handleFunction=I.default,i._idListeners={},i.addIdListener=function(e,t){i._idListeners[e]=t},i.removeIdListener=function(e){delete i._idListeners[e]},i._functions={},i._keyListeners=[],i.addKeyListener=function(e,t){return i.logger("Add key listener: ".concat(e)),i._keyListeners.push({key:e,timeout:null,fn:t}),i._keyListeners.length-1},i.removeKeyListener=function(e){var t;null!=(t=i._keyListeners[e])&&t.timeout&&clearTimeout((null==(t=i._keyListeners[e])?void 0:t.timeout)||void 0),i._keyListeners[e]=null},i.triggerKeyListener=function(t,r){i._keyListeners.forEach(function(e){(null==e?void 0:e.key)===t&&(i.logger("Trigger key listener: ".concat(t)),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(function(){return e.fn(r)},i.options.triggerDebouce))})},i._customVerificator=[],i.addCustomVerification=function(e,t){return i._customVerificator.push({key:e,fn:t}),i._customVerificator.length},i.removeCustomVerification=function(e){i._customVerificator[e]=null},i._options={peers:[],maxRetries:5,triggerDebouce:100,wait:2e3,pow:0,server:!1,host:"127.0.0.1",port:8080,debug:!1,httpServer:void 0,networkAdapter:c.ToolDbNetworkAdapter,storageAdapter:c.ToolDbStorageAdapter,userAdapter:c.ToolDbUserAdapter,storageName:"tooldb",topic:"tool-db-default",serverName:void 0,ssl:!1,modules:{}},i._options=o(o({},i.options),e),i._store=new i.options.storageAdapter(i),i._peerAccount=new i.options.userAdapter(i),i._userAccount=new i.options.userAdapter(i),i._network=new i.options.networkAdapter(i),"%default-peer%"),r=new i.options.storageAdapter(i,"_____peer_"+i.options.storageName);return r.get(t).then(function(e){i.peerAccount.decryptAccount(JSON.parse(e),t).then(function(t){return s(i,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this.peerAccount.setUser(t,(0,c.randomAnimal)())];case 1:return e.sent(),[2]}})})}).finally(function(){i.emit("init",i.userAccount.getAddress())})}).catch(function(e){i.peerAccount.encryptAccount(t).then(function(e){r.put(t,JSON.stringify(e)).catch(function(){}).finally(function(){i.emit("init",i.userAccount.getAddress())})})}),i}t.default=f},{".":164,"./logger":165,"./messageHandlers/handleCrdtGet":166,"./messageHandlers/handleCrdtPut":167,"./messageHandlers/handleFunction":168,"./messageHandlers/handleGet":169,"./messageHandlers/handlePing":170,"./messageHandlers/handlePong":171,"./messageHandlers/handlePut":172,"./messageHandlers/handleQuery":173,"./messageHandlers/handleSubscribe":174,"./toolDbAnonSignIn":175,"./toolDbClientOnMessage":176,"./toolDbCrdtGet":177,"./toolDbCrdtPut":178,"./toolDbFunction":179,"./toolDbGet":180,"./toolDbKeysSignIn":181,"./toolDbPut":182,"./toolDbQueryKeys":183,"./toolDbSignIn":184,"./toolDbSignUp":185,"./toolDbSubscribe":186,"./toolDbVerificationWrapper":187,events:84}],189:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.VerifyResult=void 0,(r=r.VerifyResult||(r.VerifyResult={})).CustomVerificationFailed="CustomVerificationFailed",r.InvalidData="InvalidData",r.InvalidVerification="InvalidVerification",r.CantOverwrite="CantOverwrite",r.InvalidTimestamp="InvalidTimestamp",r.AddressMismatch="AddressMismatch",r.NoProofOfWork="NoProofOfWork",r.InvalidHashNonce="InvalidHashNonce",r.InvalidSignature="InvalidSignature",r.Verified="Verified"},{}],190:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},{}],191:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){}},{}],192:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){for(var t,r=new DataView(e),i="",n=0,o=r.byteLength;n<o;n+=1)i+=t=(t=r.getUint8(n).toString(16)).length<2?"0"+t:t;return i.toLowerCase()}},{}],193:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return(new TextDecoder).decode(e)}},{}],194:[function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(r,"__esModule",{value:!0}),i(e("./fromBase64")));r.default=function(e){for(var t=(0,o.default)(e),e=new ArrayBuffer(t.length),r=new Uint8Array(e),i=0,n=t.length;i<n;i+=1)r[i]=t.charCodeAt(i);return r}},{"./fromBase64":195}],195:[function(e,t,r){!function(t){!function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return decodeURIComponent(escape(t.atob(e)))}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],196:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return(e=e.toUpperCase().match(/[\dA-F]{2}/gi))?(e=e.map(function(e){return parseInt(e,16)}),new Uint8Array(e).buffer):new Uint8Array}},{}],197:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){for(var t=e.toString(),r="",i=0;i<t.length;i+=2)r+=String.fromCharCode(parseInt(t.substr(i,2),16));return r}},{}],198:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=e("../..");r.default=function(e){return new Uint8Array((0,i.hexToArrayBuffer)(e))}},{"../..":164}],199:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return(new TextEncoder).encode(e).buffer}},{}],200:[function(e,t,r){!function(t){!function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return t.btoa(unescape(encodeURIComponent(e)))}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],201:[function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=(Object.defineProperty(r,"__esModule",{value:!0}),i(e("./toBase64")));r.default=function(e){for(var t="",r=0;r<e.byteLength;r+=1)t+=String.fromCodePoint(e[r]);return(0,n.default)(t)}},{"./toBase64":200}],202:[function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=(Object.defineProperty(r,"__esModule",{value:!0}),i(e("./encoding/arrayBufferToHex")));r.default=function(){var e=crypto.getRandomValues(new Uint8Array(32));return(0,n.default)(e.buffer)}},{"./encoding/arrayBufferToHex":192}],203:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=e("..");r.default=function(e,t,r,i,n){return t=(0,o.sha256)("".concat(t,"-").concat(r,"-").concat(i,":").concat(n)),e.signData(t)}},{"..":164}],204:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=e("..");r.default=function(i,n){return new Promise(function(e){if(null===n||0===n)e({nonce:0,hash:(0,o.sha256)("".concat(i,"0"))});else{for(var t=0,r=(0,o.sha256)("".concat(i).concat(t));r.substring(0,n)!==Array(n+1).join("0");)t+=1,r=(0,o.sha256)("".concat(i).concat(t));e({nonce:t,hash:r})}})}},{"..":164}],205:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=["Fast","Slow","Cute","Evil","Anxious","Cursed","Average","Zombie","Smart","Small","Tall","Amazing","Splendid","Fat","Invisible","Regular","Domestic","Unique","Soft","Lazy","Angry","Relaxed","Huge","Shy","Playful","Creepy","Ancient","Beautiful"],n=["Snake","Monkey","Platypus","Fox","Lynx","Pug","Chicken","Slug","Snail","Pig","Cow","Sheep","Horse","Squirrel","Turtle","Unicorn","Dragon","Dolphin","Cat","Chow Chow","Elephant","Meerkat","Polar Bear","Bear","Rabbit","Koala","Parrot","Raven","Frog","Rat","Mouse","Bee","Tiger","Lion","Giraffe","Ant","Spider","Zebra"];r.default=function(){return"".concat(i[Math.floor(Math.random()*i.length)]," ").concat(n[Math.floor(Math.random()*n.length)])}},{}],206:[function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=(Object.defineProperty(r,"__esModule",{value:!0}),i(e("crypto")));r.default=function(e){var t=n.default.createHash("sha1");return t.update(e),t.digest("hex")}},{crypto:57}],207:[function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=(Object.defineProperty(r,"__esModule",{value:!0}),i(e("crypto")));r.default=function(e){var t=n.default.createHash("sha256");return t.update(e),t.digest("hex")}},{crypto:57}],208:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){for(var r=e=void 0===e?24:e,i="",n=t||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";0<r;)i+=n.charAt(Math.floor(Math.random()*n.length)),--r;return i}},{}],209:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return Array.from(new Set(e))}},{}],210:[function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,s,a,f){return new(a=a||Promise)(function(r,t){function i(e){try{o(f.next(e))}catch(e){t(e)}}function n(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,n)}o((f=f.apply(e,s||[])).next())})},a=this&&this.__generator||function(i,n){var o,s,a,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,s=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(a=0<(a=f.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){f.label=t[1];break}if(6===t[0]&&f.label<a[1]){f.label=a[1],a=t;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(t);break}a[2]&&f.ops.pop(),f.trys.pop();continue}t=n.call(i,f)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},f=(Object.defineProperty(r,"__esModule",{value:!0}),e(".."));r.default=function(o,s){return void 0===s&&(s=0),i(this,void 0,void 0,function(){var t,r,i,n;return a(this,function(e){switch(e.label){case 0:return(t=JSON.stringify(o.v),void 0===o.t||void 0===o.k||void 0===o.h||void 0===o.a||void 0===o.s||void 0===o.c)?[2,f.VerifyResult.InvalidData]:o.t>(new Date).getTime()+3e4?[2,f.VerifyResult.InvalidTimestamp]:(r=!1,":"==o.k.slice(0,1)&&(r=o.k.split(".")[0].slice(1)),"=="!=o.k.slice(0,2)?[3,2]:(i=o.k,[4,this.store.get(i).then(function(e){try{return JSON.parse(e)}catch(e){return null}}).catch(function(){return null})]));case 1:if((i=e.sent())&&i.a!==o.a)return[2,f.VerifyResult.CantOverwrite];e.label=2;case 2:if(r&&r!==o.a)return[2,f.VerifyResult.AddressMismatch];if(null!==s&&0<s){if(o.h.slice(0,s)!==new Array(s).fill("0").join(""))return[2,f.VerifyResult.NoProofOfWork];if((0,f.sha256)("".concat(t).concat(o.a).concat(o.t).concat(o.n))!==o.h)return[2,f.VerifyResult.InvalidHashNonce]}return this.userAccount?[4,this.userAccount.verifySignature(o)]:[3,4];case 3:return n=e.sent(),[3,5];case 4:n=!1,e.label=5;case 5:return[2,n?f.VerifyResult.Verified:f.VerifyResult.InvalidSignature]}})})}},{"..":164}],211:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=e("..");r.default=function(e,t){var r=(0,i.sha256)("".concat(t.topic,"-").concat(t.timestamp,"-").concat(t.host,":").concat(t.port));return e.verifyMessage({h:r,a:t.address,s:t.sig})}},{"..":164}]},{},[164])(164)});
1
+ !function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).tooldb=e()}(function(){var define,module,exports;return function n(i,o,a){function s(t,e){if(!o[t]){if(!i[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(f)return f(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}r=o[t]={exports:{}},i[t][0].call(r.exports,function(e){return s(i[t][1][e]||e)},r,r.exports,n,i,o,a)}return o[t].exports}for(var f="function"==typeof require&&require,e=0;e<a.length;e++)s(a[e]);return s}({1:[function(e,t,r){r.bignum=e("bn.js"),r.define=e("./asn1/api").define,r.base=e("./asn1/base"),r.constants=e("./asn1/constants"),r.decoders=e("./asn1/decoders"),r.encoders=e("./asn1/encoders")},{"./asn1/api":2,"./asn1/base":4,"./asn1/constants":8,"./asn1/decoders":10,"./asn1/encoders":13,"bn.js":15}],2:[function(e,t,r){var n=e("../asn1"),i=e("inherits");function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}r.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return i(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},o.prototype._getDecoder=function(e){return this.decoders.hasOwnProperty(e=e||"der")||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return this.encoders.hasOwnProperty(e=e||"der")||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":1,inherits:137,vm:222}],3:[function(e,t,r){var n=e("inherits"),i=e("../base").Reporter,o=e("buffer").Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),(r.DecoderBuffer=a).prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){var r;return this.offset+e<=this.length?((r=new a(this.base))._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r):this.error(t||"DecoderBuffer overrun")},a.prototype.raw=function(e){return this.base.slice((e||this).offset,this.length)},(r.EncoderBuffer=s).prototype.join=function(t,r){return t=t||new o(this.length),r=r||0,0!==this.length&&(Array.isArray(this.value)?this.value.forEach(function(e){e.join(t,r),r+=e.length}):("number"==typeof this.value?t[r]=this.value:"string"==typeof this.value?t.write(this.value,r):o.isBuffer(this.value)&&this.value.copy(t,r),r+=this.length)),t}},{"../base":4,buffer:49,inherits:137}],4:[function(e,t,r){r.Reporter=e("./reporter").Reporter,r.DecoderBuffer=e("./buffer").DecoderBuffer,r.EncoderBuffer=e("./buffer").EncoderBuffer,r.Node=e("./node")},{"./buffer":3,"./node":5,"./reporter":6}],5:[function(e,t,r){var f=e("../base").Reporter,n=e("../base").EncoderBuffer,c=e("../base").DecoderBuffer,i=e("minimalistic-assert"),e=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],o=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(e);function a(e,t){var r={};(this._baseState=r).enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=a;var s=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];a.prototype.clone=function(){var t=this._baseState,r={},e=(s.forEach(function(e){r[e]=t[e]}),new this.constructor(r.parent));return e._baseState=r,e},a.prototype._wrap=function(){var r=this._baseState;o.forEach(function(t){this[t]=function(){var e=new this.constructor(this);return r.children.push(e),e[t].apply(e,arguments)}},this)},a.prototype._init=function(e){var t=this._baseState;i(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),i.equal(t.children.length,1,"Root node can have only one child")},a.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(i(null===t.children),(t.children=r).forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(i(null===t.args),t.args=e,t.reverseArgs=e.map(function(r){var n;return"object"!=typeof r||r.constructor!==Object?r:(n={},Object.keys(r).forEach(function(e){e==(0|e)&&(e|=0);var t=r[e];n[t]=e}),n)}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(t){a.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),e.forEach(function(r){a.prototype[r]=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return i(null===e.tag),e.tag=r,this._useArgs(t),this}}),a.prototype.use=function(e){i(e);var t=this._baseState;return i(null===t.use),t.use=e,this},a.prototype.optional=function(){return this._baseState.optional=!0,this},a.prototype.def=function(e){var t=this._baseState;return i(null===t.default),t.default=e,t.optional=!0,this},a.prototype.explicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.explicit=e,this},a.prototype.implicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.implicit=e,this},a.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},a.prototype.key=function(e){var t=this._baseState;return i(null===t.key),t.key=e,this},a.prototype.any=function(){return this._baseState.any=!0,this},a.prototype.choice=function(t){var e=this._baseState;return i(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},a.prototype.contains=function(e){var t=this._baseState;return i(null===t.use),t.contains=e,this},a.prototype._decode=function(t,r){var e=this._baseState;if(null===e.parent)return t.wrapResult(e.children[0]._decode(t,r));var n,i=e.default,o=!0,a=null;if(null!==e.key&&(a=t.enterKey(e.key)),e.optional){var s=null;if(null!==e.explicit?s=e.explicit:null!==e.implicit?s=e.implicit:null!==e.tag&&(s=e.tag),null!==s||e.any){if(o=this._peekTag(t,s,e.any),t.isError(o))return o}else{var f=t.save();try{null===e.choice?this._decodeGeneric(e.tag,t,r):this._decodeChoice(t,r),o=!0}catch(e){o=!1}t.restore(f)}}if(e.obj&&o&&(n=t.enterObject()),o){if(null!==e.explicit){s=this._decodeTag(t,e.explicit);if(t.isError(s))return s;t=s}s=t.offset;if(null===e.use&&null===e.choice){e.any&&(f=t.save());var u=this._decodeTag(t,null!==e.implicit?e.implicit:e.tag,e.any);if(t.isError(u))return u;e.any?i=t.raw(f):t=u}if(r&&r.track&&null!==e.tag&&r.track(t.path(),s,t.length,"tagged"),r&&r.track&&null!==e.tag&&r.track(t.path(),t.offset,t.length,"content"),e.any||(i=null===e.choice?this._decodeGeneric(e.tag,t,r):this._decodeChoice(t,r)),t.isError(i))return i;e.any||null!==e.choice||null===e.children||e.children.forEach(function(e){e._decode(t,r)}),!e.contains||"octstr"!==e.tag&&"bitstr"!==e.tag||(f=new c(i),i=this._getUse(e.contains,t._reporterState.obj)._decode(f,r))}return e.obj&&o&&(i=t.leaveObject(n)),null===e.key||null===i&&!0!==o?null!==a&&t.exitKey(a):t.leaveKey(a,e.key,i),i},a.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},a.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),i(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},a.prototype._decodeChoice=function(i,o){var a=this._baseState,s=null,f=!1;return Object.keys(a.choice).some(function(e){var t=i.save(),r=a.choice[e];try{var n=r._decode(i,o);if(i.isError(n))return!1;s={type:e,value:n},f=!0}catch(e){return i.restore(t),!1}return!0},this),f?s:i.error("Choice not matched")},a.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},a.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){n=this._encodeValue(e,t,r);if(void 0!==n&&!this._skipDefault(n,t,r))return n}},a.prototype._encodeValue=function(r,n,e){var t=this._baseState;if(null===t.parent)return t.children[0]._encode(r,n||new f);var i=null;if(this.reporter=n,t.optional&&void 0===r){if(null===t.default)return;r=t.default}var o=null,a=!1;if(t.any)i=this._createEncoderBuffer(r);else if(t.choice)i=this._encodeChoice(r,n);else if(t.contains)o=this._getUse(t.contains,e)._encode(r,n),a=!0;else if(t.children)o=t.children.map(function(e){var t;return"null_"===e._baseState.tag?e._encode(null,n,r):null===e._baseState.key?n.error("Child should have a key"):(t=n.enterKey(e._baseState.key),"object"!=typeof r?n.error("Child expected, but input is not object"):(e=e._encode(r[e._baseState.key],n,r),n.leaveKey(t),e))},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===t.tag||"setof"===t.tag){if(!t.args||1!==t.args.length)return n.error("Too many args for : "+t.tag);if(!Array.isArray(r))return n.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,o=this._createEncoderBuffer(r.map(function(e){var t=this._baseState;return this._getUse(t.args[0],r)._encode(e,n)},s))}else null!==t.use?i=this._getUse(t.use,e)._encode(r,n):(o=this._encodePrimitive(t.tag,r),a=!0);return t.any||null!==t.choice||(s=null!==t.implicit?t.implicit:t.tag,e=null===t.implicit?"universal":"context",null===s?null===t.use&&n.error("Tag could be omitted only for .use()"):null===t.use&&(i=this._encodeComposite(s,a,e,o))),i=null!==t.explicit?this._encodeComposite(t.explicit,!1,"context",i):i},a.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||i(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},a.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},a.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},a.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":4,"minimalistic-assert":152}],6:[function(e,t,r){e=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,t){this.path=e,this.rethrow(t)}(r.Reporter=n).prototype.isError=function(e){return e instanceof i},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},n.prototype.error=function(e){var t=this._reporterState,r=e instanceof i,e=r?e:new i(t.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e);if(t.options.partial)return r||t.errors.push(e),e;throw e},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},e(i,Error),i.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:137}],7:[function(e,t,r){e=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=e._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=e._reverse(r.tag)},{"../constants":8}],8:[function(e,t,r){r._reverse=function(r){var n={};return Object.keys(r).forEach(function(e){(0|e)==e&&(e|=0);var t=r[e];n[t]=e}),n},r.der=e("./der")},{"./der":7}],9:[function(e,t,r){var n=e("inherits"),e=e("../../asn1"),i=e.base,o=e.bignum,a=e.constants.der;function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){i.Node.call(this,"der",e)}function u(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r))for(var o=r,r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r=r<<7|127&o}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function c(e,t,r){var n=e.readUInt8(r);if(!e.isError(n)){if(!t&&128===n)return null;if(0!=(128&n)){var i=127&n;if(4<i)return e.error("length octect is too long");for(var n=0,o=0;o<i;o++){n<<=8;var a=e.readUInt8(r);if(e.isError(a))return a;n|=a}}}return n}(t.exports=s).prototype.decode=function(e,t){return e instanceof i.DecoderBuffer||(e=new i.DecoderBuffer(e,t)),this.tree._decode(e,t)},n(f,i.Node),f.prototype._peekTag=function(e,t,r){var n,i;return!e.isEmpty()&&(n=e.save(),i=u(e,'Failed to peek tag: "'+t+'"'),e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r))},f.prototype._decodeTag=function(e,t,r){var n=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;var i=c(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(!n.primitive&&null===i){r=e.save(),n=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');if(e.isError(n))return n;i=e.offset-r.offset,e.restore(r)}return e.skip(i,'Failed to match body of: "'+t+'"')},f.prototype._skipUntilEnd=function(e,t){for(;;){var r=u(e,t);if(e.isError(r))return r;var n=c(e,r.primitive,t);if(e.isError(n))return n;if(n=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},f.prototype._decodeList=function(e,t,r,n){for(var i=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var a=r.decode(e,"der",n);if(e.isError(a)&&o)break;i.push(a)}return i},f.prototype._decodeStr=function(e,t){var r;if("bitstr"===t)return r=e.readUInt8(),e.isError(r)?r:{unused:r,data:e.raw()};if("bmpstr"!==t)return"numstr"===t?(r=e.raw().toString("ascii"),this._isNumstr(r)?r:e.error("Decoding of string type: numstr unsupported characters")):"octstr"===t||"objDesc"===t?e.raw():"printstr"===t?(r=e.raw().toString("ascii"),this._isPrintstr(r)?r:e.error("Decoding of string type: printstr unsupported characters")):/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported");var n=e.raw();if(n.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i},f.prototype._decodeObjid=function(e,t,r){for(var n=[],i=0;!e.isEmpty();){var o=e.readUInt8(),i=i<<7|127&o;0==(128&o)&&(n.push(i),i=0)}128&o&&n.push(i);var a,r=r?n:[n[0]/40|0,n[0]%40].concat(n.slice(1));return r=t&&void 0!==(a=void 0===(a=t[r.join(" ")])?t[r.join(".")]:a)?a:r},f.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),f=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),f=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,s,f,0)},f.prototype._decodeNull=function(e){return null},f.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},f.prototype._decodeInt=function(e,t){e=e.raw(),e=new o(e);return e=t?t[e.toString(10)]||e:e},f.prototype._use=function(e,t){return(e="function"==typeof e?e(t):e)._getDecoder("der").tree}},{"../../asn1":1,inherits:137}],10:[function(e,t,r){r.der=e("./der"),r.pem=e("./pem")},{"./der":9,"./pem":11}],11:[function(e,t,r){var n=e("inherits"),u=e("buffer").Buffer,c=e("./der");function i(e){c.call(this,e),this.enc="pem"}n(i,c),(t.exports=i).prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),i=/^-----(BEGIN|END) ([^-]+)-----$/,o=-1,a=-1,s=0;s<r.length;s++){var f=r[s].match(i);if(null!==f&&f[2]===n){if(-1!==o){if("END"!==f[1])break;a=s;break}if("BEGIN"!==f[1])break;o=s}}if(-1===o||-1===a)throw new Error("PEM section not found for: "+n);e=r.slice(o+1,a).join(""),e.replace(/[^a-z0-9\+\/=]+/gi,""),e=new u(e,"base64");return c.prototype.decode.call(this,e,t)}},{"./der":9,buffer:49,inherits:137}],12:[function(e,t,r){var n=e("inherits"),f=e("buffer").Buffer,e=e("../../asn1"),i=e.base,u=e.constants.der;function o(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new a,this.tree._init(e.body)}function a(e){i.Node.call(this,"der",e)}function s(e){return e<10?"0"+e:e}(t.exports=o).prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(a,i.Node),a.prototype._encodeComposite=function(e,t,r,n){e=((e,t,r,n)=>{var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),u.tagByName.hasOwnProperty(e))i=u.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return 31<=i?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=u.tagClassByName[r||"universal"]<<6)})(e,t,r,this.reporter);if(n.length<128)(i=new f(2))[0]=e,i[1]=n.length;else{for(var i,o=1,a=n.length;256<=a;a>>=8)o++;(i=new f(2+o))[0]=e,i[1]=128|o;for(var a=1+o,s=n.length;0<s;a--,s>>=8)i[a]=255&s}return this._createEncoderBuffer([i,n])},a.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"!==t)return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported");for(var r=new f(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(r)},a.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(40<=e[1])return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var i=0,n=0;n<e.length;n++){var o=e[n];for(i++;128<=o;o>>=7)i++}for(var a=new f(i),s=a.length-1,n=e.length-1;0<=n;n--){o=e[n];for(a[s--]=127&o;0<(o>>=7);)a[s--]=128|127&o}return this._createEncoderBuffer(a)},a.prototype._encodeTime=function(e,t){var r,e=new Date(e);return"gentime"===t?r=[s(e.getFullYear()),s(e.getUTCMonth()+1),s(e.getUTCDate()),s(e.getUTCHours()),s(e.getUTCMinutes()),s(e.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[s(e.getFullYear()%100),s(e.getUTCMonth()+1),s(e.getUTCDate()),s(e.getUTCHours()),s(e.getUTCMinutes()),s(e.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"==typeof e||f.isBuffer(e)||(t=e.toArray(),!e.sign&&128&t[0]&&t.unshift(0),e=new f(t)),f.isBuffer(e))return r=e.length,0===e.length&&r++,i=new f(r),e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i);if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var r=1,n=e;256<=n;n>>=8)r++;for(var i,n=(i=new Array(r)).length-1;0<=n;n--)i[n]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new f(i))},a.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},a.prototype._use=function(e,t){return(e="function"==typeof e?e(t):e)._getEncoder("der").tree},a.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},{"../../asn1":1,buffer:49,inherits:137}],13:[function(e,t,r){r.der=e("./der"),r.pem=e("./pem")},{"./der":12,"./pem":14}],14:[function(e,t,r){var n=e("inherits"),o=e("./der");function i(e){o.call(this,e),this.enc="pem"}n(i,o),(t.exports=i).prototype.encode=function(e,t){for(var r=o.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],i=0;i<r.length;i+=64)n.push(r.slice(i,i+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},{"./der":12,inherits:137}],15:[function(e,t,r){var n,t=void 0===t||t,i=this;function b(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function y(e,t,r){if(y.isBN(e))return e;this.negative=0,this.words=null,this.length=0,(this.red=null)!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof t?t.exports=y:i.BN=y,(y.BN=y).wordSize=26;try{n=("undefined"!=typeof window&&void 0!==window.Buffer?window:e("buffer")).Buffer}catch(e){}function a(e,t){e=e.charCodeAt(t);return 65<=e&&e<=70?e-55:97<=e&&e<=102?e-87:e-48&15}function s(e,t,r){var n=a(e,r);return t<=r-1&&(n|=a(e,r-1)<<4),n}function h(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++)var s=e.charCodeAt(a)-48,i=i*n+(49<=s?s-49+10:17<=s?s-17+10:s);return i}y.isBN=function(e){return e instanceof y||null!==e&&"object"==typeof e&&e.constructor.wordSize===y.wordSize&&Array.isArray(e.words)},y.max=function(e,t){return 0<e.cmp(t)?e:t},y.min=function(e,t){return e.cmp(t)<0?e:t},y.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);b((t="hex"===t?16:t)===(0|t)&&2<=t&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},y.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(b(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},y.prototype._initArray=function(e,t,r){if(b("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n,i,o=0;o<this.length;o++)this.words[o]=0;var a=0;if("be"===r)for(o=e.length-1,n=0;0<=o;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[n]|=i<<a&67108863,this.words[n+1]=i>>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===r)for(n=o=0;o<e.length;o+=3)this.words[n]|=(i=e[o]|e[o+1]<<8|e[o+2]<<16)<<a&67108863,this.words[n+1]=i>>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this.strip()},y.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;t<=n;n-=2)i=s(e,t,n)<<o,this.words[a]|=67108863&i,18<=o?(o-=18,this.words[a+=1]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=s(e,t,n)<<o,this.words[a]|=67108863&i,18<=o?(o-=18,this.words[a+=1]|=i>>>26):o+=8;this.strip()},y.prototype._parseBase=function(e,t,r){this.words=[0];for(var n=0,i=this.length=1;i<=67108863;i*=t)n++;for(var i=i/t|0,o=e.length-r,a=o%--n,s=Math.min(o,o-a)+r,f=0,u=r;u<s;u+=n)f=h(e,u,u+n,t),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!=a){for(var c=1,f=h(e,u,e.length,t),u=0;u<a;u++)c*=t;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this.strip()},y.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},y.prototype.clone=function(){var e=new y(null);return this.copy(e),e},y.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},y.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},y.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},y.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],l=[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],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,r){r.negative=t.negative^e.negative;var n=(r.length=e.length+t.length|0)-1|0,i=(a=(0|e.words[0])*(0|t.words[0]))/67108864|0;r.words[0]=67108863&a;for(var o=1;o<n;o++){for(var a,s=i>>>26,f=67108863&i,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++)s+=(a=(0|e.words[o-c|0])*(0|t.words[c])+f)/67108864|0,f=67108863&a;r.words[o]=0|f,i=0|s}return 0!==i?r.words[o]=0|i:r.length--,r.strip()}y.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){for(var r="",n=0,i=0,o=0;o<this.length;o++){var a=this.words[o],s=(16777215&(a<<n|i)).toString(16),i=a>>>24-n&16777215;26<=(n+=2)&&(n-=26,o--),r=0!==i||o!==this.length-1?d[6-s.length]+s+r:s+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return r=0!==this.negative?"-"+r:r}if(e===(0|e)&&2<=e&&e<=36){var f=l[e],u=p[e];for(r="",(c=this.clone()).negative=0;!c.isZero();){var c,h=c.modn(u).toString(e);r=(c=c.idivn(u)).isZero()?h+r:d[f-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return r=0!==this.negative?"-"+r:r}b(!1,"Base should be between 2 and 36")},y.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2<this.length&&b(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},y.prototype.toJSON=function(){return this.toString(16)},y.prototype.toBuffer=function(e,t){return b(void 0!==n),this.toArrayLike(n,e,t)},y.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},y.prototype.toArrayLike=function(e,t,r){var n,i,o=this.byteLength(),a=r||Math.max(1,o),r=(b(o<=a,"byte array longer than desired length"),b(0<a,"Requested array length <= 0"),this.strip(),"le"===t),s=new e(a),f=this.clone();if(r){for(i=0;!f.isZero();i++)n=f.andln(255),f.iushrn(8),s[i]=n;for(;i<a;i++)s[i]=0}else{for(i=0;i<a-o;i++)s[i]=0;for(i=0;!f.isZero();i++)n=f.andln(255),f.iushrn(8),s[a-i-1]=n}return s},Math.clz32?y.prototype._countBits=function(e){return 32-Math.clz32(e)}:y.prototype._countBits=function(e){var t=0;return 4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},y.prototype._zeroBits=function(e){var t;return 0===e?26:((t=0)==(8191&(e=e))&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t)},y.prototype.bitLength=function(){var e=this.words[this.length-1],e=this._countBits(e);return 26*(this.length-1)+e},y.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},y.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},y.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},y.prototype.isNeg=function(){return 0!==this.negative},y.prototype.neg=function(){return this.clone().ineg()},y.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},y.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},y.prototype.ior=function(e){return b(0==(this.negative|e.negative)),this.iuor(e)},y.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},y.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},y.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},y.prototype.iand=function(e){return b(0==(this.negative|e.negative)),this.iuand(e)},y.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},y.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},y.prototype.iuxor=function(e){for(var t,r=this.length>e.length?(t=this,e):(t=e,this),n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},y.prototype.ixor=function(e){return b(0==(this.negative|e.negative)),this.iuxor(e)},y.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},y.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},y.prototype.inotn=function(e){b("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26),e=e%26;this._expand(t),0<e&&t--;for(var r=0;r<t;r++)this.words[r]=67108863&~this.words[r];return 0<e&&(this.words[r]=~this.words[r]&67108863>>26-e),this.strip()},y.prototype.notn=function(e){return this.clone().inotn(e)},y.prototype.setn=function(e,t){b("number"==typeof e&&0<=e);var r=e/26|0,e=e%26;return this._expand(1+r),this.words[r]=t?this.words[r]|1<<e:this.words[r]&~(1<<e),this.strip()},y.prototype.iadd=function(e){var t,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();for(var n=this.length>e.length?(r=this,e):(r=e,this),i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},y.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},y.prototype.isub=function(e){var t;if(0!==e.negative)return e.negative=0,t=this.iadd(e),e.negative=1,t._normSign();if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;for(var i=0<n?(r=this,e):(r=e,this),o=0,a=0;a<i.length;a++)o=(t=(0|r.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},y.prototype.sub=function(e){return this.clone().isub(e)};var u=function(e,L,D){var t,r=e.words,n=L.words,i=D.words,o=0|r[0],a=8191&o,o=o>>>13,s=0|r[1],f=8191&s,s=s>>>13,u=0|r[2],c=8191&u,u=u>>>13,h=0|r[3],d=8191&h,h=h>>>13,l=0|r[4],p=8191&l,l=l>>>13,b=0|r[5],y=8191&b,b=b>>>13,m=0|r[6],g=8191&m,m=m>>>13,v=0|r[7],_=8191&v,v=v>>>13,w=0|r[8],U=8191&w,w=w>>>13,r=0|r[9],N=8191&r,r=r>>>13,M=0|n[0],S=8191&M,M=M>>>13,A=0|n[1],k=8191&A,A=A>>>13,E=0|n[2],x=8191&E,E=E>>>13,P=0|n[3],q=8191&P,P=P>>>13,j=0|n[4],z=8191&j,j=j>>>13,R=0|n[5],F=8191&R,R=R>>>13,O=0|n[6],H=8191&O,O=O>>>13,I=0|n[7],K=8191&I,I=I>>>13,T=0|n[8],V=8191&T,T=T>>>13,n=0|n[9],W=8191&n,n=n>>>13,L=(D.negative=e.negative^L.negative,D.length=19,(0+Math.imul(a,S)|0)+((8191&(e=Math.imul(a,M)+Math.imul(o,S)|0))<<13)|0),B=(Math.imul(o,M)+(e>>>13)|0)+(L>>>26)|0;L&=67108863,t=Math.imul(f,S),e=Math.imul(f,M)+Math.imul(s,S)|0,C=Math.imul(s,M);var C,G=(B+(t+Math.imul(a,k)|0)|0)+((8191&(e=(e+Math.imul(a,A)|0)+Math.imul(o,k)|0))<<13)|0,J=(B=((C+Math.imul(o,A)|0)+(e>>>13)|0)+(G>>>26)|0,G&=67108863,t=Math.imul(c,S),e=Math.imul(c,M)+Math.imul(u,S)|0,C=Math.imul(u,M),t=t+Math.imul(f,k)|0,e=(e+Math.imul(f,A)|0)+Math.imul(s,k)|0,C=C+Math.imul(s,A)|0,(B+(t+Math.imul(a,x)|0)|0)+((8191&(e=(e+Math.imul(a,E)|0)+Math.imul(o,x)|0))<<13)|0),Z=(B=((C+Math.imul(o,E)|0)+(e>>>13)|0)+(J>>>26)|0,J&=67108863,t=Math.imul(d,S),e=Math.imul(d,M)+Math.imul(h,S)|0,C=Math.imul(h,M),t=t+Math.imul(c,k)|0,e=(e+Math.imul(c,A)|0)+Math.imul(u,k)|0,C=C+Math.imul(u,A)|0,t=t+Math.imul(f,x)|0,e=(e+Math.imul(f,E)|0)+Math.imul(s,x)|0,C=C+Math.imul(s,E)|0,(B+(t+Math.imul(a,q)|0)|0)+((8191&(e=(e+Math.imul(a,P)|0)+Math.imul(o,q)|0))<<13)|0),X=(B=((C+Math.imul(o,P)|0)+(e>>>13)|0)+(Z>>>26)|0,Z&=67108863,t=Math.imul(p,S),e=Math.imul(p,M)+Math.imul(l,S)|0,C=Math.imul(l,M),t=t+Math.imul(d,k)|0,e=(e+Math.imul(d,A)|0)+Math.imul(h,k)|0,C=C+Math.imul(h,A)|0,t=t+Math.imul(c,x)|0,e=(e+Math.imul(c,E)|0)+Math.imul(u,x)|0,C=C+Math.imul(u,E)|0,t=t+Math.imul(f,q)|0,e=(e+Math.imul(f,P)|0)+Math.imul(s,q)|0,C=C+Math.imul(s,P)|0,(B+(t+Math.imul(a,z)|0)|0)+((8191&(e=(e+Math.imul(a,j)|0)+Math.imul(o,z)|0))<<13)|0),Y=(B=((C+Math.imul(o,j)|0)+(e>>>13)|0)+(X>>>26)|0,X&=67108863,t=Math.imul(y,S),e=Math.imul(y,M)+Math.imul(b,S)|0,C=Math.imul(b,M),t=t+Math.imul(p,k)|0,e=(e+Math.imul(p,A)|0)+Math.imul(l,k)|0,C=C+Math.imul(l,A)|0,t=t+Math.imul(d,x)|0,e=(e+Math.imul(d,E)|0)+Math.imul(h,x)|0,C=C+Math.imul(h,E)|0,t=t+Math.imul(c,q)|0,e=(e+Math.imul(c,P)|0)+Math.imul(u,q)|0,C=C+Math.imul(u,P)|0,t=t+Math.imul(f,z)|0,e=(e+Math.imul(f,j)|0)+Math.imul(s,z)|0,C=C+Math.imul(s,j)|0,(B+(t+Math.imul(a,F)|0)|0)+((8191&(e=(e+Math.imul(a,R)|0)+Math.imul(o,F)|0))<<13)|0),$=(B=((C+Math.imul(o,R)|0)+(e>>>13)|0)+(Y>>>26)|0,Y&=67108863,t=Math.imul(g,S),e=Math.imul(g,M)+Math.imul(m,S)|0,C=Math.imul(m,M),t=t+Math.imul(y,k)|0,e=(e+Math.imul(y,A)|0)+Math.imul(b,k)|0,C=C+Math.imul(b,A)|0,t=t+Math.imul(p,x)|0,e=(e+Math.imul(p,E)|0)+Math.imul(l,x)|0,C=C+Math.imul(l,E)|0,t=t+Math.imul(d,q)|0,e=(e+Math.imul(d,P)|0)+Math.imul(h,q)|0,C=C+Math.imul(h,P)|0,t=t+Math.imul(c,z)|0,e=(e+Math.imul(c,j)|0)+Math.imul(u,z)|0,C=C+Math.imul(u,j)|0,t=t+Math.imul(f,F)|0,e=(e+Math.imul(f,R)|0)+Math.imul(s,F)|0,C=C+Math.imul(s,R)|0,(B+(t+Math.imul(a,H)|0)|0)+((8191&(e=(e+Math.imul(a,O)|0)+Math.imul(o,H)|0))<<13)|0),Q=(B=((C+Math.imul(o,O)|0)+(e>>>13)|0)+($>>>26)|0,$&=67108863,t=Math.imul(_,S),e=Math.imul(_,M)+Math.imul(v,S)|0,C=Math.imul(v,M),t=t+Math.imul(g,k)|0,e=(e+Math.imul(g,A)|0)+Math.imul(m,k)|0,C=C+Math.imul(m,A)|0,t=t+Math.imul(y,x)|0,e=(e+Math.imul(y,E)|0)+Math.imul(b,x)|0,C=C+Math.imul(b,E)|0,t=t+Math.imul(p,q)|0,e=(e+Math.imul(p,P)|0)+Math.imul(l,q)|0,C=C+Math.imul(l,P)|0,t=t+Math.imul(d,z)|0,e=(e+Math.imul(d,j)|0)+Math.imul(h,z)|0,C=C+Math.imul(h,j)|0,t=t+Math.imul(c,F)|0,e=(e+Math.imul(c,R)|0)+Math.imul(u,F)|0,C=C+Math.imul(u,R)|0,t=t+Math.imul(f,H)|0,e=(e+Math.imul(f,O)|0)+Math.imul(s,H)|0,C=C+Math.imul(s,O)|0,(B+(t+Math.imul(a,K)|0)|0)+((8191&(e=(e+Math.imul(a,I)|0)+Math.imul(o,K)|0))<<13)|0),ee=(B=((C+Math.imul(o,I)|0)+(e>>>13)|0)+(Q>>>26)|0,Q&=67108863,t=Math.imul(U,S),e=Math.imul(U,M)+Math.imul(w,S)|0,C=Math.imul(w,M),t=t+Math.imul(_,k)|0,e=(e+Math.imul(_,A)|0)+Math.imul(v,k)|0,C=C+Math.imul(v,A)|0,t=t+Math.imul(g,x)|0,e=(e+Math.imul(g,E)|0)+Math.imul(m,x)|0,C=C+Math.imul(m,E)|0,t=t+Math.imul(y,q)|0,e=(e+Math.imul(y,P)|0)+Math.imul(b,q)|0,C=C+Math.imul(b,P)|0,t=t+Math.imul(p,z)|0,e=(e+Math.imul(p,j)|0)+Math.imul(l,z)|0,C=C+Math.imul(l,j)|0,t=t+Math.imul(d,F)|0,e=(e+Math.imul(d,R)|0)+Math.imul(h,F)|0,C=C+Math.imul(h,R)|0,t=t+Math.imul(c,H)|0,e=(e+Math.imul(c,O)|0)+Math.imul(u,H)|0,C=C+Math.imul(u,O)|0,t=t+Math.imul(f,K)|0,e=(e+Math.imul(f,I)|0)+Math.imul(s,K)|0,C=C+Math.imul(s,I)|0,(B+(t+Math.imul(a,V)|0)|0)+((8191&(e=(e+Math.imul(a,T)|0)+Math.imul(o,V)|0))<<13)|0),S=(B=((C+Math.imul(o,T)|0)+(e>>>13)|0)+(ee>>>26)|0,ee&=67108863,t=Math.imul(N,S),e=Math.imul(N,M)+Math.imul(r,S)|0,C=Math.imul(r,M),t=t+Math.imul(U,k)|0,e=(e+Math.imul(U,A)|0)+Math.imul(w,k)|0,C=C+Math.imul(w,A)|0,t=t+Math.imul(_,x)|0,e=(e+Math.imul(_,E)|0)+Math.imul(v,x)|0,C=C+Math.imul(v,E)|0,t=t+Math.imul(g,q)|0,e=(e+Math.imul(g,P)|0)+Math.imul(m,q)|0,C=C+Math.imul(m,P)|0,t=t+Math.imul(y,z)|0,e=(e+Math.imul(y,j)|0)+Math.imul(b,z)|0,C=C+Math.imul(b,j)|0,t=t+Math.imul(p,F)|0,e=(e+Math.imul(p,R)|0)+Math.imul(l,F)|0,C=C+Math.imul(l,R)|0,t=t+Math.imul(d,H)|0,e=(e+Math.imul(d,O)|0)+Math.imul(h,H)|0,C=C+Math.imul(h,O)|0,t=t+Math.imul(c,K)|0,e=(e+Math.imul(c,I)|0)+Math.imul(u,K)|0,C=C+Math.imul(u,I)|0,t=t+Math.imul(f,V)|0,e=(e+Math.imul(f,T)|0)+Math.imul(s,V)|0,C=C+Math.imul(s,T)|0,(B+(t+Math.imul(a,W)|0)|0)+((8191&(e=(e+Math.imul(a,n)|0)+Math.imul(o,W)|0))<<13)|0),M=(B=((C+Math.imul(o,n)|0)+(e>>>13)|0)+(S>>>26)|0,S&=67108863,t=Math.imul(N,k),e=Math.imul(N,A)+Math.imul(r,k)|0,C=Math.imul(r,A),t=t+Math.imul(U,x)|0,e=(e+Math.imul(U,E)|0)+Math.imul(w,x)|0,C=C+Math.imul(w,E)|0,t=t+Math.imul(_,q)|0,e=(e+Math.imul(_,P)|0)+Math.imul(v,q)|0,C=C+Math.imul(v,P)|0,t=t+Math.imul(g,z)|0,e=(e+Math.imul(g,j)|0)+Math.imul(m,z)|0,C=C+Math.imul(m,j)|0,t=t+Math.imul(y,F)|0,e=(e+Math.imul(y,R)|0)+Math.imul(b,F)|0,C=C+Math.imul(b,R)|0,t=t+Math.imul(p,H)|0,e=(e+Math.imul(p,O)|0)+Math.imul(l,H)|0,C=C+Math.imul(l,O)|0,t=t+Math.imul(d,K)|0,e=(e+Math.imul(d,I)|0)+Math.imul(h,K)|0,C=C+Math.imul(h,I)|0,t=t+Math.imul(c,V)|0,e=(e+Math.imul(c,T)|0)+Math.imul(u,V)|0,C=C+Math.imul(u,T)|0,(B+(t+Math.imul(f,W)|0)|0)+((8191&(e=(e+Math.imul(f,n)|0)+Math.imul(s,W)|0))<<13)|0),a=(B=((C+Math.imul(s,n)|0)+(e>>>13)|0)+(M>>>26)|0,M&=67108863,t=Math.imul(N,x),e=Math.imul(N,E)+Math.imul(r,x)|0,C=Math.imul(r,E),t=t+Math.imul(U,q)|0,e=(e+Math.imul(U,P)|0)+Math.imul(w,q)|0,C=C+Math.imul(w,P)|0,t=t+Math.imul(_,z)|0,e=(e+Math.imul(_,j)|0)+Math.imul(v,z)|0,C=C+Math.imul(v,j)|0,t=t+Math.imul(g,F)|0,e=(e+Math.imul(g,R)|0)+Math.imul(m,F)|0,C=C+Math.imul(m,R)|0,t=t+Math.imul(y,H)|0,e=(e+Math.imul(y,O)|0)+Math.imul(b,H)|0,C=C+Math.imul(b,O)|0,t=t+Math.imul(p,K)|0,e=(e+Math.imul(p,I)|0)+Math.imul(l,K)|0,C=C+Math.imul(l,I)|0,t=t+Math.imul(d,V)|0,e=(e+Math.imul(d,T)|0)+Math.imul(h,V)|0,C=C+Math.imul(h,T)|0,(B+(t+Math.imul(c,W)|0)|0)+((8191&(e=(e+Math.imul(c,n)|0)+Math.imul(u,W)|0))<<13)|0),o=(B=((C+Math.imul(u,n)|0)+(e>>>13)|0)+(a>>>26)|0,a&=67108863,t=Math.imul(N,q),e=Math.imul(N,P)+Math.imul(r,q)|0,C=Math.imul(r,P),t=t+Math.imul(U,z)|0,e=(e+Math.imul(U,j)|0)+Math.imul(w,z)|0,C=C+Math.imul(w,j)|0,t=t+Math.imul(_,F)|0,e=(e+Math.imul(_,R)|0)+Math.imul(v,F)|0,C=C+Math.imul(v,R)|0,t=t+Math.imul(g,H)|0,e=(e+Math.imul(g,O)|0)+Math.imul(m,H)|0,C=C+Math.imul(m,O)|0,t=t+Math.imul(y,K)|0,e=(e+Math.imul(y,I)|0)+Math.imul(b,K)|0,C=C+Math.imul(b,I)|0,t=t+Math.imul(p,V)|0,e=(e+Math.imul(p,T)|0)+Math.imul(l,V)|0,C=C+Math.imul(l,T)|0,(B+(t+Math.imul(d,W)|0)|0)+((8191&(e=(e+Math.imul(d,n)|0)+Math.imul(h,W)|0))<<13)|0),k=(B=((C+Math.imul(h,n)|0)+(e>>>13)|0)+(o>>>26)|0,o&=67108863,t=Math.imul(N,z),e=Math.imul(N,j)+Math.imul(r,z)|0,C=Math.imul(r,j),t=t+Math.imul(U,F)|0,e=(e+Math.imul(U,R)|0)+Math.imul(w,F)|0,C=C+Math.imul(w,R)|0,t=t+Math.imul(_,H)|0,e=(e+Math.imul(_,O)|0)+Math.imul(v,H)|0,C=C+Math.imul(v,O)|0,t=t+Math.imul(g,K)|0,e=(e+Math.imul(g,I)|0)+Math.imul(m,K)|0,C=C+Math.imul(m,I)|0,t=t+Math.imul(y,V)|0,e=(e+Math.imul(y,T)|0)+Math.imul(b,V)|0,C=C+Math.imul(b,T)|0,(B+(t+Math.imul(p,W)|0)|0)+((8191&(e=(e+Math.imul(p,n)|0)+Math.imul(l,W)|0))<<13)|0),A=(B=((C+Math.imul(l,n)|0)+(e>>>13)|0)+(k>>>26)|0,k&=67108863,t=Math.imul(N,F),e=Math.imul(N,R)+Math.imul(r,F)|0,C=Math.imul(r,R),t=t+Math.imul(U,H)|0,e=(e+Math.imul(U,O)|0)+Math.imul(w,H)|0,C=C+Math.imul(w,O)|0,t=t+Math.imul(_,K)|0,e=(e+Math.imul(_,I)|0)+Math.imul(v,K)|0,C=C+Math.imul(v,I)|0,t=t+Math.imul(g,V)|0,e=(e+Math.imul(g,T)|0)+Math.imul(m,V)|0,C=C+Math.imul(m,T)|0,(B+(t+Math.imul(y,W)|0)|0)+((8191&(e=(e+Math.imul(y,n)|0)+Math.imul(b,W)|0))<<13)|0),f=(B=((C+Math.imul(b,n)|0)+(e>>>13)|0)+(A>>>26)|0,A&=67108863,t=Math.imul(N,H),e=Math.imul(N,O)+Math.imul(r,H)|0,C=Math.imul(r,O),t=t+Math.imul(U,K)|0,e=(e+Math.imul(U,I)|0)+Math.imul(w,K)|0,C=C+Math.imul(w,I)|0,t=t+Math.imul(_,V)|0,e=(e+Math.imul(_,T)|0)+Math.imul(v,V)|0,C=C+Math.imul(v,T)|0,(B+(t+Math.imul(g,W)|0)|0)+((8191&(e=(e+Math.imul(g,n)|0)+Math.imul(m,W)|0))<<13)|0),s=(B=((C+Math.imul(m,n)|0)+(e>>>13)|0)+(f>>>26)|0,f&=67108863,t=Math.imul(N,K),e=Math.imul(N,I)+Math.imul(r,K)|0,C=Math.imul(r,I),t=t+Math.imul(U,V)|0,e=(e+Math.imul(U,T)|0)+Math.imul(w,V)|0,C=C+Math.imul(w,T)|0,(B+(t+Math.imul(_,W)|0)|0)+((8191&(e=(e+Math.imul(_,n)|0)+Math.imul(v,W)|0))<<13)|0),x=(B=((C+Math.imul(v,n)|0)+(e>>>13)|0)+(s>>>26)|0,s&=67108863,t=Math.imul(N,V),e=Math.imul(N,T)+Math.imul(r,V)|0,C=Math.imul(r,T),(B+(t+Math.imul(U,W)|0)|0)+((8191&(e=(e+Math.imul(U,n)|0)+Math.imul(w,W)|0))<<13)|0),E=(B=((C+Math.imul(w,n)|0)+(e>>>13)|0)+(x>>>26)|0,x&=67108863,(B+Math.imul(N,W)|0)+((8191&(e=Math.imul(N,n)+Math.imul(r,W)|0))<<13)|0);return B=(Math.imul(r,n)+(e>>>13)|0)+(E>>>26)|0,E&=67108863,i[0]=L,i[1]=G,i[2]=J,i[3]=Z,i[4]=X,i[5]=Y,i[6]=$,i[7]=Q,i[8]=ee,i[9]=S,i[10]=M,i[11]=a,i[12]=o,i[13]=k,i[14]=A,i[15]=f,i[16]=s,i[17]=x,i[18]=E,0!=B&&(i[19]=B,D.length++),D};function c(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(u=f),y.prototype.mulTo=function(e,t){var r=this.length+e.length,r=(10===this.length&&10===e.length?u:r<63?f:r<1024?(e,t,r)=>{r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){for(var a=i,i=0,s=67108863&n,f=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=f;u++){var c,h=(0|e.words[o-u])*(0|t.words[u]),s=67108863&(c=(67108863&h)+s|0);i+=(a=(a=a+(h/67108864|0)|0)+(c>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}:c)(this,e,t);return r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=y.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},m.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,f=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var h=f,d=u,l=0;l<a;l++){var p=r[c+l],b=n[c+l],y=r[c+l+a],m=h*y-d*(g=n[c+l+a]),g=h*g+d*y;r[c+l]=p+(y=m),n[c+l]=b+g,r[c+l+a]=p-y,n[c+l+a]=b-g,l!==s&&(m=f*h-u*d,d=f*d+u*h,h=m)}},m.prototype.guessLen13b=function(e,t){for(var t=1&(n=1|Math.max(t,e)),r=0,n=n/2|0;n;n>>>=1)r++;return 1<<r+1+t},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},m.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,n){for(var i=0,o=0;o<t;o++)i+=0|e[o],r[2*o]=8191&i,r[2*o+1]=8191&(i>>>=13),i>>>=13;for(o=2*t;o<n;++o)r[o]=0;b(0===i),b(0==(-8192&i))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),f=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,u,n),this.transform(a,o,s,f,n,i),this.transform(u,o,c,h,n,i);for(var l=0;l<n;l++){var p=s[l]*c[l]-f[l]*h[l];f[l]=s[l]*h[l]+f[l]*c[l],s[l]=p}return this.conjugate(s,f,n),this.transform(s,f,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},y.prototype.mul=function(e){var t=new y(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},y.prototype.mulf=function(e){var t=new y(null);return t.words=new Array(this.length+e.length),c(this,e,t)},y.prototype.imul=function(e){return this.clone().mulTo(e,this)},y.prototype.imuln=function(e){b("number"==typeof e),b(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,i=(67108863&n)+(67108863&t),t=(t>>=26)+(n/67108864|0)+(i>>>26);this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this.length=0===e?1:this.length,this},y.prototype.muln=function(e){return this.clone().imuln(e)},y.prototype.sqr=function(){return this.mul(this)},y.prototype.isqr=function(){return this.imul(this.clone())},y.prototype.pow=function(e){var t=(e=>{for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r%26;t[r]=(e.words[r/26|0]&1<<n)>>>n}return t})(e);if(0===t.length)return new y(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},y.prototype.iushln=function(e){b("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!=t){for(var i=0,o=0;o<this.length;o++){var a=this.words[o]&n,s=(0|this.words[o])-a<<t;this.words[o]=s|i,i=a>>>26-t}i&&(this.words[o]=i,this.length++)}if(0!=r){for(o=this.length-1;0<=o;o--)this.words[o+r]=this.words[o];for(o=0;o<r;o++)this.words[o]=0;this.length+=r}return this.strip()},y.prototype.ishln=function(e){return b(0===this.negative),this.iushln(e)},y.prototype.iushrn=function(e,t,r){b("number"==typeof e&&0<=e),n=t?(t-t%26)/26:0;var n,i=e%26,o=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<<i,s=r;if(n-=o,n=Math.max(0,n),s){for(var f=0;f<o;f++)s.words[f]=this.words[f];s.length=o}if(0!==o)if(this.length>o)for(this.length-=o,f=0;f<this.length;f++)this.words[f]=this.words[f+o];else this.words[0]=0,this.length=1;for(var u=0,f=this.length-1;0<=f&&(0!==u||n<=f);f--){var c=0|this.words[f];this.words[f]=u<<26-i|c>>>i,u=c&a}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},y.prototype.ishrn=function(e,t,r){return b(0===this.negative),this.iushrn(e,t,r)},y.prototype.shln=function(e){return this.clone().ishln(e)},y.prototype.ushln=function(e){return this.clone().iushln(e)},y.prototype.shrn=function(e){return this.clone().ishrn(e)},y.prototype.ushrn=function(e){return this.clone().iushrn(e)},y.prototype.testn=function(e){b("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return!(this.length<=e||!(this.words[e]&1<<t))},y.prototype.imaskn=function(e){b("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return b(0===this.negative,"imaskn works only with positive numbers"),this.length<=e?this:(0!=t&&e++,this.length=Math.min(e,this.length),0!=t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),0===this.length&&(this.words[0]=0,this.length=1),this.strip())},y.prototype.maskn=function(e){return this.clone().imaskn(e)},y.prototype.iaddn=function(e){return b("number"==typeof e),b(e<67108864),e<0?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},y.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&67108864<=this.words[t];t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},y.prototype.isubn=function(e){if(b("number"==typeof e),b(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this.strip()},y.prototype.addn=function(e){return this.clone().iaddn(e)},y.prototype.subn=function(e){return this.clone().isubn(e)},y.prototype.iabs=function(){return this.negative=0,this},y.prototype.abs=function(){return this.clone().iabs()},y.prototype._ishlnsubmul=function(e,t,r){for(var n=e.length+r,i=(this._expand(n),0),o=0;o<e.length;o++){var a=(0|this.words[o+r])+i,s=(0|e.words[o])*t,i=((a-=67108863&s)>>26)-(s/67108864|0);this.words[o+r]=67108863&a}for(;o<this.length-r;o++)i=(a=(0|this.words[o+r])+i)>>26,this.words[o+r]=67108863&a;if(0!==i){for(b(-1===i),o=i=0;o<this.length;o++)i=(a=-(0|this.words[o])+i)>>26,this.words[o]=67108863&a;this.negative=1}return this.strip()},y.prototype._wordDiv=function(e,t){this.length,e.length;var r,n=this.clone(),i=e,o=0|i.words[i.length-1],a=(0!=(e=26-this._countBits(o))&&(i=i.ushln(e),n.iushln(e),o=0|i.words[i.length-1]),n.length-i.length);if("mod"!==t){(r=new y(null)).length=1+a,r.words=new Array(r.length);for(var s=0;s<r.length;s++)r.words[s]=0}var f=n.clone()._ishlnsubmul(i,1,a);0===f.negative&&(n=f,r)&&(r.words[a]=1);for(var u=a-1;0<=u;u--){var c=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]),c=Math.min(c/o|0,67108863);for(n._ishlnsubmul(i,c,u);0!==n.negative;)c--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);r&&(r.words[u]=c)}return r&&r.strip(),n.strip(),"div"!==t&&0!=e&&n.iushrn(e),{div:r||null,mod:n}},y.prototype.divmod=function(e,t,r){var n,i,o;return b(!e.isZero()),this.isZero()?{div:new y(0),mod:new y(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(i=o.mod.neg(),r)&&0!==i.negative&&i.iadd(e),{div:n,mod:i}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),{div:n="mod"!==t?o.div.neg():n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(i=o.mod.neg(),r)&&0!==i.negative&&i.isub(e),{div:o.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new y(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new y(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new y(this.modn(e.words[0]))}:this._wordDiv(e,t)},y.prototype.div=function(e){return this.divmod(e,"div",!1).div},y.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},y.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},y.prototype.divRound=function(e){var t,r,n=this.divmod(e);return n.mod.isZero()||(r=0!==n.div.negative?n.mod.isub(e):n.mod,t=e.ushrn(1),e=e.andln(1),(r=r.cmp(t))<0)||1===e&&0===r?n.div:0!==n.div.negative?n.div.isubn(1):n.div.iaddn(1)},y.prototype.modn=function(e){b(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;0<=n;n--)r=(t*r+(0|this.words[n]))%e;return r},y.prototype.idivn=function(e){b(e<=67108863);for(var t=0,r=this.length-1;0<=r;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},y.prototype.divn=function(e){return this.clone().idivn(e)},y.prototype.egcd=function(e){b(0===e.negative),b(!e.isZero());for(var t=this,r=e.clone(),t=0!==t.negative?t.umod(e):t.clone(),n=new y(1),i=new y(0),o=new y(0),a=new y(1),s=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++s;for(var f=r.clone(),u=t.clone();!t.isZero();){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(0<c)for(t.iushrn(c);0<c--;)(n.isOdd()||i.isOdd())&&(n.iadd(f),i.isub(u)),n.iushrn(1),i.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(0<d)for(r.iushrn(d);0<d--;)(o.isOdd()||a.isOdd())&&(o.iadd(f),a.isub(u)),o.iushrn(1),a.iushrn(1);0<=t.cmp(r)?(t.isub(r),n.isub(o),i.isub(a)):(r.isub(t),o.isub(n),a.isub(i))}return{a:o,b:a,gcd:r.iushln(s)}},y.prototype._invmp=function(e){b(0===e.negative),b(!e.isZero());for(var t,r=this,n=e.clone(),r=0!==r.negative?r.umod(e):r.clone(),i=new y(1),o=new y(0),a=n.clone();0<r.cmpn(1)&&0<n.cmpn(1);){for(var s=0,f=1;0==(r.words[0]&f)&&s<26;++s,f<<=1);if(0<s)for(r.iushrn(s);0<s--;)i.isOdd()&&i.iadd(a),i.iushrn(1);for(var u=0,c=1;0==(n.words[0]&c)&&u<26;++u,c<<=1);if(0<u)for(n.iushrn(u);0<u--;)o.isOdd()&&o.iadd(a),o.iushrn(1);0<=r.cmp(n)?(r.isub(n),i.isub(o)):(n.isub(r),o.isub(i))}return(t=0===r.cmpn(1)?i:o).cmpn(0)<0&&t.iadd(e),t},y.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0;for(var n=r.negative=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0)var o=t,t=r,r=o;else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},y.prototype.invm=function(e){return this.egcd(e).a.umod(e)},y.prototype.isEven=function(){return 0==(1&this.words[0])},y.prototype.isOdd=function(){return 1==(1&this.words[0])},y.prototype.andln=function(e){return this.words[0]&e},y.prototype.bincn=function(e){b("number"==typeof e);var t=e%26,e=(e-t)/26,t=1<<t;if(this.length<=e)this._expand(1+e),this.words[e]|=t;else{for(var r=t,n=e;0!==r&&n<this.length;n++){var i=0|this.words[n],r=(i+=r)>>>26;i&=67108863,this.words[n]=i}0!==r&&(this.words[n]=r,this.length++)}return this},y.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},y.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this.strip(),t=1<this.length?1:(b((e=t?-e:e)<=67108863,"Number is too big"),(t=0|this.words[0])===e?0:t<e?-1:1),0!==this.negative?0|-t:t):-1},y.prototype.cmp=function(e){return 0!==this.negative&&0===e.negative?-1:0===this.negative&&0!==e.negative?1:(e=this.ucmp(e),0!==this.negative?0|-e:e)},y.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;0<=r;r--){var n=0|this.words[r],i=0|e.words[r];if(n!=i){n<i?t=-1:i<n&&(t=1);break}}return t},y.prototype.gtn=function(e){return 1===this.cmpn(e)},y.prototype.gt=function(e){return 1===this.cmp(e)},y.prototype.gten=function(e){return 0<=this.cmpn(e)},y.prototype.gte=function(e){return 0<=this.cmp(e)},y.prototype.ltn=function(e){return-1===this.cmpn(e)},y.prototype.lt=function(e){return-1===this.cmp(e)},y.prototype.lten=function(e){return this.cmpn(e)<=0},y.prototype.lte=function(e){return this.cmp(e)<=0},y.prototype.eqn=function(e){return 0===this.cmpn(e)},y.prototype.eq=function(e){return 0===this.cmp(e)},y.red=function(e){return new A(e)},y.prototype.toRed=function(e){return b(!this.red,"Already a number in reduction context"),b(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},y.prototype.fromRed=function(){return b(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},y.prototype._forceRed=function(e){return this.red=e,this},y.prototype.forceRed=function(e){return b(!this.red,"Already a number in reduction context"),this._forceRed(e)},y.prototype.redAdd=function(e){return b(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},y.prototype.redIAdd=function(e){return b(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},y.prototype.redSub=function(e){return b(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},y.prototype.redISub=function(e){return b(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},y.prototype.redShl=function(e){return b(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},y.prototype.redMul=function(e){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},y.prototype.redIMul=function(e){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},y.prototype.redSqr=function(){return b(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},y.prototype.redISqr=function(){return b(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},y.prototype.redSqrt=function(){return b(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},y.prototype.redInvm=function(){return b(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},y.prototype.redNeg=function(){return b(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},y.prototype.redPow=function(e){return b(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new y(t,16),this.n=this.p.bitLength(),this.k=new y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){var t;"string"==typeof e?(t=y._prime(e),this.m=t.p,this.prime=t):(b(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null)}function k(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new y(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)}v.prototype._tmp=function(){var e=new y(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){for(var t,r=e;this.split(r,this.tmp),(t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength())>this.n;);e=t<this.n?-1:r.ucmp(this.p);return 0===e?(r.words[0]=0,r.length=1):0<e?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},o(_,v),_.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)e.words[0]=0,e.length=1;else{var i=e.words[9];for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(4194303&o)<<4|i>>>22,i=o}0===(e.words[n-10]=i>>>=22)&&10<e.length?e.length-=10:e.length-=9}},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1])&&e.length--,e},o(w,v),o(M,v),o(S,v),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},y._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new w;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return g[e]=t},A.prototype._verify1=function(e){b(0===e.negative,"red works only with positives"),b(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){b(0==(e.negative|t.negative),"red works only with positives"),b(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return(this.prime?this.prime.ireduce(e):e.umod(this.m))._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);e=e.add(t);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);e=e.iadd(t);return 0<=e.cmp(this.m)&&e.isub(this.m),e},A.prototype.sub=function(e,t){this._verify2(e,t);e=e.sub(t);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);e=e.isub(t);return e.cmpn(0)<0&&e.iadd(this.m),e},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(b(t%2==1),3===t)return t=this.m.add(new y(1)).iushrn(2),this.pow(e,t);for(var r=this.m.subn(1),n=0;!r.isZero()&&0===r.andln(1);)n++,r.iushrn(1);b(!r.isZero());for(var i=new y(1).toRed(this),o=i.redNeg(),a=this.m.subn(1).iushrn(1),s=new y(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var f=this.pow(s,r),u=this.pow(e,r.addn(1).iushrn(1)),c=this.pow(e,r),h=n;0!==c.cmp(i);){for(var d=c,l=0;0!==d.cmp(i);l++)d=d.redSqr();b(l<h);var p=this.pow(f,new y(1).iushln(h-l-1)),u=u.redMul(p),f=p.redSqr(),c=c.redMul(f),h=l}return u},A.prototype.invm=function(e){e=e._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(e,t){if(t.isZero())return new y(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new y(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],o=0,a=0,s=t.bitLength()%26;for(0===s&&(s=26),n=t.length-1;0<=n;n--){for(var f=t.words[n],u=s-1;0<=u;u--){var c=f>>u&1;i!==r[0]&&(i=this.sqr(i)),0==c&&0===o?a=0:(o=o<<1|c,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[o]),o=a=0))}s=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){e=e.clone();return e.red=null,e},y.mont=function(e){return new k(e)},o(k,A),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){e=this.imod(e.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(e,t){return e.isZero()||t.isZero()?(e.words[0]=0,e.length=1,e):(t=(e=e.imul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(t=e=e.isub(t).iushrn(this.shift)).cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this))},k.prototype.mul=function(e,t){return(e.isZero()||t.isZero()?new y(0):(t=(e=e.mul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(t=e=e.isub(t).iushrn(this.shift)).cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t))._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}},{buffer:20}],16:[function(t,i,e){!function(e){!function(){var r=t("possible-typed-array-names"),n="undefined"==typeof globalThis?e:globalThis;i.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof n[r[t]]&&(e[e.length]=r[t]);return e}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"possible-typed-array-names":165}],17:[function(e,t,r){r.byteLength=function(e){var e=c(e),t=e[0],e=e[1];return 3*(t+e)/4-e},r.toByteArray=function(e){var t,r,n=c(e),i=n[0],n=n[1],o=new u(((e,t)=>3*(e+t)/4-t)(i,n)),a=0,s=0<n?i-4:i;for(r=0;r<s;r+=4)t=f[e.charCodeAt(r)]<<18|f[e.charCodeAt(r+1)]<<12|f[e.charCodeAt(r+2)]<<6|f[e.charCodeAt(r+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=255&t;2===n&&(t=f[e.charCodeAt(r)]<<2|f[e.charCodeAt(r+1)]>>4,o[a++]=255&t);1===n&&(t=f[e.charCodeAt(r)]<<10|f[e.charCodeAt(r+1)]<<4|f[e.charCodeAt(r+2)]>>2,o[a++]=t>>8&255,o[a++]=255&t);return o},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,i=[],o=0,a=r-n;o<a;o+=16383)i.push(((e,t,r)=>{for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push((e=>s[e>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e])(n));return i.join("")})(e,o,a<o+16383?a:o+16383));1==n?(t=e[r-1],i.push(s[t>>2]+s[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],i.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return i.join("")};for(var s=[],f=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i<o;++i)s[i]=n[i],f[n.charCodeAt(i)]=i;function c(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("="),t=(e=-1===e?t:e)===t?0:4-e%4;return[e,t]}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],18:[function(e,t,r){var n,t=void 0===t||t,i=this;function b(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function y(e,t,r){if(y.isBN(e))return e;this.negative=0,this.words=null,this.length=0,(this.red=null)!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof t?t.exports=y:i.BN=y,(y.BN=y).wordSize=26;try{n=("undefined"!=typeof window&&void 0!==window.Buffer?window:e("buffer")).Buffer}catch(e){}function a(e,t){t=e.charCodeAt(t);return 48<=t&&t<=57?t-48:65<=t&&t<=70?t-55:97<=t&&t<=102?t-87:void b(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return t<=r-1&&(n|=a(e,r-1)<<4),n}function h(e,t,r,n){for(var i=0,o=0,a=Math.min(e.length,r),s=t;s<a;s++){var f=e.charCodeAt(s)-48;i*=n,o=49<=f?f-49+10:17<=f?f-17+10:f,b(0<=f&&o<n,"Invalid character"),i+=o}return i}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(y.isBN=function(e){return e instanceof y||null!==e&&"object"==typeof e&&e.constructor.wordSize===y.wordSize&&Array.isArray(e.words)},y.max=function(e,t){return 0<e.cmp(t)?e:t},y.min=function(e,t){return e.cmp(t)<0?e:t},y.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);b((t="hex"===t?16:t)===(0|t)&&2<=t&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},y.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(b(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},y.prototype._initArray=function(e,t,r){if(b("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n,i,o=0;o<this.length;o++)this.words[o]=0;var a=0;if("be"===r)for(o=e.length-1,n=0;0<=o;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[n]|=i<<a&67108863,this.words[n+1]=i>>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===r)for(n=o=0;o<e.length;o+=3)this.words[n]|=(i=e[o]|e[o+1]<<8|e[o+2]<<16)<<a&67108863,this.words[n+1]=i>>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this._strip()},y.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;t<=n;n-=2)i=s(e,t,n)<<o,this.words[a]|=67108863&i,18<=o?(o-=18,this.words[a+=1]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=s(e,t,n)<<o,this.words[a]|=67108863&i,18<=o?(o-=18,this.words[a+=1]|=i>>>26):o+=8;this._strip()},y.prototype._parseBase=function(e,t,r){this.words=[0];for(var n=0,i=this.length=1;i<=67108863;i*=t)n++;for(var i=i/t|0,o=e.length-r,a=o%--n,s=Math.min(o,o-a)+r,f=0,u=r;u<s;u+=n)f=h(e,u,u+n,t),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!=a){for(var c=1,f=h(e,u,e.length,t),u=0;u<a;u++)c*=t;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this._strip()},y.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},y.prototype._move=function(e){f(e,this)},y.prototype.clone=function(){var e=new y(null);return this.copy(e),e},y.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},y.prototype._strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},y.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{y.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){y.prototype.inspect=u}else y.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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"],l=[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],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,r){r.negative=t.negative^e.negative;var n=(r.length=e.length+t.length|0)-1|0,i=(a=(0|e.words[0])*(0|t.words[0]))/67108864|0;r.words[0]=67108863&a;for(var o=1;o<n;o++){for(var a,s=i>>>26,f=67108863&i,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++)s+=(a=(0|e.words[o-c|0])*(0|t.words[c])+f)/67108864|0,f=67108863&a;r.words[o]=0|f,i=0|s}return 0!==i?r.words[o]=0|i:r.length--,r._strip()}y.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){for(var r="",n=0,i=0,o=0;o<this.length;o++){var a=this.words[o],s=(16777215&(a<<n|i)).toString(16),i=a>>>24-n&16777215;26<=(n+=2)&&(n-=26,o--),r=0!==i||o!==this.length-1?d[6-s.length]+s+r:s+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return r=0!==this.negative?"-"+r:r}if(e===(0|e)&&2<=e&&e<=36){var f=l[e],u=p[e];for(r="",(c=this.clone()).negative=0;!c.isZero();){var c,h=c.modrn(u).toString(e);r=(c=c.idivn(u)).isZero()?h+r:d[f-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return r=0!==this.negative?"-"+r:r}b(!1,"Base should be between 2 and 36")},y.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2<this.length&&b(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},y.prototype.toJSON=function(){return this.toString(16,2)},n&&(y.prototype.toBuffer=function(e,t){return this.toArrayLike(n,e,t)}),y.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},y.prototype.toArrayLike=function(e,t,r){this._strip();var n=this.byteLength(),r=r||Math.max(1,n),e=(b(n<=r,"byte array longer than desired length"),b(0<r,"Requested array length <= 0"),r=r,(e=e).allocUnsafe?e.allocUnsafe(r):new e(r));return this["_toArrayLike"+("le"===t?"LE":"BE")](e,n),e},y.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),o=n=0):(n=a>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},y.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r--]=255&a,0<=r&&(e[r--]=a>>8&255),0<=r&&(e[r--]=a>>16&255),6===o?(0<=r&&(e[r--]=a>>24&255),o=n=0):(n=a>>>24,o+=2)}if(0<=r)for(e[r--]=n;0<=r;)e[r--]=0},Math.clz32?y.prototype._countBits=function(e){return 32-Math.clz32(e)}:y.prototype._countBits=function(e){var t=0;return 4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},y.prototype._zeroBits=function(e){var t;return 0===e?26:((t=0)==(8191&(e=e))&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t)},y.prototype.bitLength=function(){var e=this.words[this.length-1],e=this._countBits(e);return 26*(this.length-1)+e},y.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},y.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},y.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},y.prototype.isNeg=function(){return 0!==this.negative},y.prototype.neg=function(){return this.clone().ineg()},y.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},y.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},y.prototype.ior=function(e){return b(0==(this.negative|e.negative)),this.iuor(e)},y.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},y.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},y.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},y.prototype.iand=function(e){return b(0==(this.negative|e.negative)),this.iuand(e)},y.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},y.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},y.prototype.iuxor=function(e){for(var t,r=this.length>e.length?(t=this,e):(t=e,this),n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},y.prototype.ixor=function(e){return b(0==(this.negative|e.negative)),this.iuxor(e)},y.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},y.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},y.prototype.inotn=function(e){b("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26),e=e%26;this._expand(t),0<e&&t--;for(var r=0;r<t;r++)this.words[r]=67108863&~this.words[r];return 0<e&&(this.words[r]=~this.words[r]&67108863>>26-e),this._strip()},y.prototype.notn=function(e){return this.clone().inotn(e)},y.prototype.setn=function(e,t){b("number"==typeof e&&0<=e);var r=e/26|0,e=e%26;return this._expand(1+r),this.words[r]=t?this.words[r]|1<<e:this.words[r]&~(1<<e),this._strip()},y.prototype.iadd=function(e){var t,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();for(var n=this.length>e.length?(r=this,e):(r=e,this),i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},y.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},y.prototype.isub=function(e){var t;if(0!==e.negative)return e.negative=0,t=this.iadd(e),e.negative=1,t._normSign();if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;for(var i=0<n?(r=this,e):(r=e,this),o=0,a=0;a<i.length;a++)o=(t=(0|r.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},y.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,L,D){var t,r=e.words,n=L.words,i=D.words,o=0|r[0],a=8191&o,o=o>>>13,s=0|r[1],f=8191&s,s=s>>>13,u=0|r[2],c=8191&u,u=u>>>13,h=0|r[3],d=8191&h,h=h>>>13,l=0|r[4],p=8191&l,l=l>>>13,b=0|r[5],y=8191&b,b=b>>>13,m=0|r[6],g=8191&m,m=m>>>13,v=0|r[7],_=8191&v,v=v>>>13,w=0|r[8],U=8191&w,w=w>>>13,r=0|r[9],N=8191&r,r=r>>>13,M=0|n[0],S=8191&M,M=M>>>13,A=0|n[1],k=8191&A,A=A>>>13,E=0|n[2],x=8191&E,E=E>>>13,P=0|n[3],q=8191&P,P=P>>>13,j=0|n[4],z=8191&j,j=j>>>13,R=0|n[5],F=8191&R,R=R>>>13,O=0|n[6],H=8191&O,O=O>>>13,I=0|n[7],K=8191&I,I=I>>>13,T=0|n[8],V=8191&T,T=T>>>13,n=0|n[9],W=8191&n,n=n>>>13,L=(D.negative=e.negative^L.negative,D.length=19,(0+Math.imul(a,S)|0)+((8191&(e=Math.imul(a,M)+Math.imul(o,S)|0))<<13)|0),B=(Math.imul(o,M)+(e>>>13)|0)+(L>>>26)|0;L&=67108863,t=Math.imul(f,S),e=Math.imul(f,M)+Math.imul(s,S)|0,C=Math.imul(s,M);var C,G=(B+(t+Math.imul(a,k)|0)|0)+((8191&(e=(e+Math.imul(a,A)|0)+Math.imul(o,k)|0))<<13)|0,J=(B=((C+Math.imul(o,A)|0)+(e>>>13)|0)+(G>>>26)|0,G&=67108863,t=Math.imul(c,S),e=Math.imul(c,M)+Math.imul(u,S)|0,C=Math.imul(u,M),t=t+Math.imul(f,k)|0,e=(e+Math.imul(f,A)|0)+Math.imul(s,k)|0,C=C+Math.imul(s,A)|0,(B+(t+Math.imul(a,x)|0)|0)+((8191&(e=(e+Math.imul(a,E)|0)+Math.imul(o,x)|0))<<13)|0),Z=(B=((C+Math.imul(o,E)|0)+(e>>>13)|0)+(J>>>26)|0,J&=67108863,t=Math.imul(d,S),e=Math.imul(d,M)+Math.imul(h,S)|0,C=Math.imul(h,M),t=t+Math.imul(c,k)|0,e=(e+Math.imul(c,A)|0)+Math.imul(u,k)|0,C=C+Math.imul(u,A)|0,t=t+Math.imul(f,x)|0,e=(e+Math.imul(f,E)|0)+Math.imul(s,x)|0,C=C+Math.imul(s,E)|0,(B+(t+Math.imul(a,q)|0)|0)+((8191&(e=(e+Math.imul(a,P)|0)+Math.imul(o,q)|0))<<13)|0),X=(B=((C+Math.imul(o,P)|0)+(e>>>13)|0)+(Z>>>26)|0,Z&=67108863,t=Math.imul(p,S),e=Math.imul(p,M)+Math.imul(l,S)|0,C=Math.imul(l,M),t=t+Math.imul(d,k)|0,e=(e+Math.imul(d,A)|0)+Math.imul(h,k)|0,C=C+Math.imul(h,A)|0,t=t+Math.imul(c,x)|0,e=(e+Math.imul(c,E)|0)+Math.imul(u,x)|0,C=C+Math.imul(u,E)|0,t=t+Math.imul(f,q)|0,e=(e+Math.imul(f,P)|0)+Math.imul(s,q)|0,C=C+Math.imul(s,P)|0,(B+(t+Math.imul(a,z)|0)|0)+((8191&(e=(e+Math.imul(a,j)|0)+Math.imul(o,z)|0))<<13)|0),Y=(B=((C+Math.imul(o,j)|0)+(e>>>13)|0)+(X>>>26)|0,X&=67108863,t=Math.imul(y,S),e=Math.imul(y,M)+Math.imul(b,S)|0,C=Math.imul(b,M),t=t+Math.imul(p,k)|0,e=(e+Math.imul(p,A)|0)+Math.imul(l,k)|0,C=C+Math.imul(l,A)|0,t=t+Math.imul(d,x)|0,e=(e+Math.imul(d,E)|0)+Math.imul(h,x)|0,C=C+Math.imul(h,E)|0,t=t+Math.imul(c,q)|0,e=(e+Math.imul(c,P)|0)+Math.imul(u,q)|0,C=C+Math.imul(u,P)|0,t=t+Math.imul(f,z)|0,e=(e+Math.imul(f,j)|0)+Math.imul(s,z)|0,C=C+Math.imul(s,j)|0,(B+(t+Math.imul(a,F)|0)|0)+((8191&(e=(e+Math.imul(a,R)|0)+Math.imul(o,F)|0))<<13)|0),$=(B=((C+Math.imul(o,R)|0)+(e>>>13)|0)+(Y>>>26)|0,Y&=67108863,t=Math.imul(g,S),e=Math.imul(g,M)+Math.imul(m,S)|0,C=Math.imul(m,M),t=t+Math.imul(y,k)|0,e=(e+Math.imul(y,A)|0)+Math.imul(b,k)|0,C=C+Math.imul(b,A)|0,t=t+Math.imul(p,x)|0,e=(e+Math.imul(p,E)|0)+Math.imul(l,x)|0,C=C+Math.imul(l,E)|0,t=t+Math.imul(d,q)|0,e=(e+Math.imul(d,P)|0)+Math.imul(h,q)|0,C=C+Math.imul(h,P)|0,t=t+Math.imul(c,z)|0,e=(e+Math.imul(c,j)|0)+Math.imul(u,z)|0,C=C+Math.imul(u,j)|0,t=t+Math.imul(f,F)|0,e=(e+Math.imul(f,R)|0)+Math.imul(s,F)|0,C=C+Math.imul(s,R)|0,(B+(t+Math.imul(a,H)|0)|0)+((8191&(e=(e+Math.imul(a,O)|0)+Math.imul(o,H)|0))<<13)|0),Q=(B=((C+Math.imul(o,O)|0)+(e>>>13)|0)+($>>>26)|0,$&=67108863,t=Math.imul(_,S),e=Math.imul(_,M)+Math.imul(v,S)|0,C=Math.imul(v,M),t=t+Math.imul(g,k)|0,e=(e+Math.imul(g,A)|0)+Math.imul(m,k)|0,C=C+Math.imul(m,A)|0,t=t+Math.imul(y,x)|0,e=(e+Math.imul(y,E)|0)+Math.imul(b,x)|0,C=C+Math.imul(b,E)|0,t=t+Math.imul(p,q)|0,e=(e+Math.imul(p,P)|0)+Math.imul(l,q)|0,C=C+Math.imul(l,P)|0,t=t+Math.imul(d,z)|0,e=(e+Math.imul(d,j)|0)+Math.imul(h,z)|0,C=C+Math.imul(h,j)|0,t=t+Math.imul(c,F)|0,e=(e+Math.imul(c,R)|0)+Math.imul(u,F)|0,C=C+Math.imul(u,R)|0,t=t+Math.imul(f,H)|0,e=(e+Math.imul(f,O)|0)+Math.imul(s,H)|0,C=C+Math.imul(s,O)|0,(B+(t+Math.imul(a,K)|0)|0)+((8191&(e=(e+Math.imul(a,I)|0)+Math.imul(o,K)|0))<<13)|0),ee=(B=((C+Math.imul(o,I)|0)+(e>>>13)|0)+(Q>>>26)|0,Q&=67108863,t=Math.imul(U,S),e=Math.imul(U,M)+Math.imul(w,S)|0,C=Math.imul(w,M),t=t+Math.imul(_,k)|0,e=(e+Math.imul(_,A)|0)+Math.imul(v,k)|0,C=C+Math.imul(v,A)|0,t=t+Math.imul(g,x)|0,e=(e+Math.imul(g,E)|0)+Math.imul(m,x)|0,C=C+Math.imul(m,E)|0,t=t+Math.imul(y,q)|0,e=(e+Math.imul(y,P)|0)+Math.imul(b,q)|0,C=C+Math.imul(b,P)|0,t=t+Math.imul(p,z)|0,e=(e+Math.imul(p,j)|0)+Math.imul(l,z)|0,C=C+Math.imul(l,j)|0,t=t+Math.imul(d,F)|0,e=(e+Math.imul(d,R)|0)+Math.imul(h,F)|0,C=C+Math.imul(h,R)|0,t=t+Math.imul(c,H)|0,e=(e+Math.imul(c,O)|0)+Math.imul(u,H)|0,C=C+Math.imul(u,O)|0,t=t+Math.imul(f,K)|0,e=(e+Math.imul(f,I)|0)+Math.imul(s,K)|0,C=C+Math.imul(s,I)|0,(B+(t+Math.imul(a,V)|0)|0)+((8191&(e=(e+Math.imul(a,T)|0)+Math.imul(o,V)|0))<<13)|0),S=(B=((C+Math.imul(o,T)|0)+(e>>>13)|0)+(ee>>>26)|0,ee&=67108863,t=Math.imul(N,S),e=Math.imul(N,M)+Math.imul(r,S)|0,C=Math.imul(r,M),t=t+Math.imul(U,k)|0,e=(e+Math.imul(U,A)|0)+Math.imul(w,k)|0,C=C+Math.imul(w,A)|0,t=t+Math.imul(_,x)|0,e=(e+Math.imul(_,E)|0)+Math.imul(v,x)|0,C=C+Math.imul(v,E)|0,t=t+Math.imul(g,q)|0,e=(e+Math.imul(g,P)|0)+Math.imul(m,q)|0,C=C+Math.imul(m,P)|0,t=t+Math.imul(y,z)|0,e=(e+Math.imul(y,j)|0)+Math.imul(b,z)|0,C=C+Math.imul(b,j)|0,t=t+Math.imul(p,F)|0,e=(e+Math.imul(p,R)|0)+Math.imul(l,F)|0,C=C+Math.imul(l,R)|0,t=t+Math.imul(d,H)|0,e=(e+Math.imul(d,O)|0)+Math.imul(h,H)|0,C=C+Math.imul(h,O)|0,t=t+Math.imul(c,K)|0,e=(e+Math.imul(c,I)|0)+Math.imul(u,K)|0,C=C+Math.imul(u,I)|0,t=t+Math.imul(f,V)|0,e=(e+Math.imul(f,T)|0)+Math.imul(s,V)|0,C=C+Math.imul(s,T)|0,(B+(t+Math.imul(a,W)|0)|0)+((8191&(e=(e+Math.imul(a,n)|0)+Math.imul(o,W)|0))<<13)|0),M=(B=((C+Math.imul(o,n)|0)+(e>>>13)|0)+(S>>>26)|0,S&=67108863,t=Math.imul(N,k),e=Math.imul(N,A)+Math.imul(r,k)|0,C=Math.imul(r,A),t=t+Math.imul(U,x)|0,e=(e+Math.imul(U,E)|0)+Math.imul(w,x)|0,C=C+Math.imul(w,E)|0,t=t+Math.imul(_,q)|0,e=(e+Math.imul(_,P)|0)+Math.imul(v,q)|0,C=C+Math.imul(v,P)|0,t=t+Math.imul(g,z)|0,e=(e+Math.imul(g,j)|0)+Math.imul(m,z)|0,C=C+Math.imul(m,j)|0,t=t+Math.imul(y,F)|0,e=(e+Math.imul(y,R)|0)+Math.imul(b,F)|0,C=C+Math.imul(b,R)|0,t=t+Math.imul(p,H)|0,e=(e+Math.imul(p,O)|0)+Math.imul(l,H)|0,C=C+Math.imul(l,O)|0,t=t+Math.imul(d,K)|0,e=(e+Math.imul(d,I)|0)+Math.imul(h,K)|0,C=C+Math.imul(h,I)|0,t=t+Math.imul(c,V)|0,e=(e+Math.imul(c,T)|0)+Math.imul(u,V)|0,C=C+Math.imul(u,T)|0,(B+(t+Math.imul(f,W)|0)|0)+((8191&(e=(e+Math.imul(f,n)|0)+Math.imul(s,W)|0))<<13)|0),a=(B=((C+Math.imul(s,n)|0)+(e>>>13)|0)+(M>>>26)|0,M&=67108863,t=Math.imul(N,x),e=Math.imul(N,E)+Math.imul(r,x)|0,C=Math.imul(r,E),t=t+Math.imul(U,q)|0,e=(e+Math.imul(U,P)|0)+Math.imul(w,q)|0,C=C+Math.imul(w,P)|0,t=t+Math.imul(_,z)|0,e=(e+Math.imul(_,j)|0)+Math.imul(v,z)|0,C=C+Math.imul(v,j)|0,t=t+Math.imul(g,F)|0,e=(e+Math.imul(g,R)|0)+Math.imul(m,F)|0,C=C+Math.imul(m,R)|0,t=t+Math.imul(y,H)|0,e=(e+Math.imul(y,O)|0)+Math.imul(b,H)|0,C=C+Math.imul(b,O)|0,t=t+Math.imul(p,K)|0,e=(e+Math.imul(p,I)|0)+Math.imul(l,K)|0,C=C+Math.imul(l,I)|0,t=t+Math.imul(d,V)|0,e=(e+Math.imul(d,T)|0)+Math.imul(h,V)|0,C=C+Math.imul(h,T)|0,(B+(t+Math.imul(c,W)|0)|0)+((8191&(e=(e+Math.imul(c,n)|0)+Math.imul(u,W)|0))<<13)|0),o=(B=((C+Math.imul(u,n)|0)+(e>>>13)|0)+(a>>>26)|0,a&=67108863,t=Math.imul(N,q),e=Math.imul(N,P)+Math.imul(r,q)|0,C=Math.imul(r,P),t=t+Math.imul(U,z)|0,e=(e+Math.imul(U,j)|0)+Math.imul(w,z)|0,C=C+Math.imul(w,j)|0,t=t+Math.imul(_,F)|0,e=(e+Math.imul(_,R)|0)+Math.imul(v,F)|0,C=C+Math.imul(v,R)|0,t=t+Math.imul(g,H)|0,e=(e+Math.imul(g,O)|0)+Math.imul(m,H)|0,C=C+Math.imul(m,O)|0,t=t+Math.imul(y,K)|0,e=(e+Math.imul(y,I)|0)+Math.imul(b,K)|0,C=C+Math.imul(b,I)|0,t=t+Math.imul(p,V)|0,e=(e+Math.imul(p,T)|0)+Math.imul(l,V)|0,C=C+Math.imul(l,T)|0,(B+(t+Math.imul(d,W)|0)|0)+((8191&(e=(e+Math.imul(d,n)|0)+Math.imul(h,W)|0))<<13)|0),k=(B=((C+Math.imul(h,n)|0)+(e>>>13)|0)+(o>>>26)|0,o&=67108863,t=Math.imul(N,z),e=Math.imul(N,j)+Math.imul(r,z)|0,C=Math.imul(r,j),t=t+Math.imul(U,F)|0,e=(e+Math.imul(U,R)|0)+Math.imul(w,F)|0,C=C+Math.imul(w,R)|0,t=t+Math.imul(_,H)|0,e=(e+Math.imul(_,O)|0)+Math.imul(v,H)|0,C=C+Math.imul(v,O)|0,t=t+Math.imul(g,K)|0,e=(e+Math.imul(g,I)|0)+Math.imul(m,K)|0,C=C+Math.imul(m,I)|0,t=t+Math.imul(y,V)|0,e=(e+Math.imul(y,T)|0)+Math.imul(b,V)|0,C=C+Math.imul(b,T)|0,(B+(t+Math.imul(p,W)|0)|0)+((8191&(e=(e+Math.imul(p,n)|0)+Math.imul(l,W)|0))<<13)|0),A=(B=((C+Math.imul(l,n)|0)+(e>>>13)|0)+(k>>>26)|0,k&=67108863,t=Math.imul(N,F),e=Math.imul(N,R)+Math.imul(r,F)|0,C=Math.imul(r,R),t=t+Math.imul(U,H)|0,e=(e+Math.imul(U,O)|0)+Math.imul(w,H)|0,C=C+Math.imul(w,O)|0,t=t+Math.imul(_,K)|0,e=(e+Math.imul(_,I)|0)+Math.imul(v,K)|0,C=C+Math.imul(v,I)|0,t=t+Math.imul(g,V)|0,e=(e+Math.imul(g,T)|0)+Math.imul(m,V)|0,C=C+Math.imul(m,T)|0,(B+(t+Math.imul(y,W)|0)|0)+((8191&(e=(e+Math.imul(y,n)|0)+Math.imul(b,W)|0))<<13)|0),f=(B=((C+Math.imul(b,n)|0)+(e>>>13)|0)+(A>>>26)|0,A&=67108863,t=Math.imul(N,H),e=Math.imul(N,O)+Math.imul(r,H)|0,C=Math.imul(r,O),t=t+Math.imul(U,K)|0,e=(e+Math.imul(U,I)|0)+Math.imul(w,K)|0,C=C+Math.imul(w,I)|0,t=t+Math.imul(_,V)|0,e=(e+Math.imul(_,T)|0)+Math.imul(v,V)|0,C=C+Math.imul(v,T)|0,(B+(t+Math.imul(g,W)|0)|0)+((8191&(e=(e+Math.imul(g,n)|0)+Math.imul(m,W)|0))<<13)|0),s=(B=((C+Math.imul(m,n)|0)+(e>>>13)|0)+(f>>>26)|0,f&=67108863,t=Math.imul(N,K),e=Math.imul(N,I)+Math.imul(r,K)|0,C=Math.imul(r,I),t=t+Math.imul(U,V)|0,e=(e+Math.imul(U,T)|0)+Math.imul(w,V)|0,C=C+Math.imul(w,T)|0,(B+(t+Math.imul(_,W)|0)|0)+((8191&(e=(e+Math.imul(_,n)|0)+Math.imul(v,W)|0))<<13)|0),x=(B=((C+Math.imul(v,n)|0)+(e>>>13)|0)+(s>>>26)|0,s&=67108863,t=Math.imul(N,V),e=Math.imul(N,T)+Math.imul(r,V)|0,C=Math.imul(r,T),(B+(t+Math.imul(U,W)|0)|0)+((8191&(e=(e+Math.imul(U,n)|0)+Math.imul(w,W)|0))<<13)|0),E=(B=((C+Math.imul(w,n)|0)+(e>>>13)|0)+(x>>>26)|0,x&=67108863,(B+Math.imul(N,W)|0)+((8191&(e=Math.imul(N,n)+Math.imul(r,W)|0))<<13)|0);return B=(Math.imul(r,n)+(e>>>13)|0)+(E>>>26)|0,E&=67108863,i[0]=L,i[1]=G,i[2]=J,i[3]=Z,i[4]=X,i[5]=Y,i[6]=$,i[7]=Q,i[8]=ee,i[9]=S,i[10]=M,i[11]=a,i[12]=o,i[13]=k,i[14]=A,i[15]=f,i[16]=s,i[17]=x,i[18]=E,0!=B&&(i[19]=B,D.length++),D};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){for(var a=i,i=0,s=67108863&n,f=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=f;u++){var c,h=(0|e.words[o-u])*(0|t.words[u]),s=67108863&(c=(67108863&h)+s|0);i+=(a=(a=a+(h/67108864|0)|0)+(c>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(e,t,r){return g(e,t,r)}Math.imul||(m=c),y.prototype.mulTo=function(e,t){var r=this.length+e.length,r=(10===this.length&&10===e.length?m:r<63?c:r<1024?g:v)(this,e,t);return r},y.prototype.mul=function(e){var t=new y(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},y.prototype.mulf=function(e){var t=new y(null);return t.words=new Array(this.length+e.length),v(this,e,t)},y.prototype.imul=function(e){return this.clone().mulTo(e,this)},y.prototype.imuln=function(e){for(var t=e<0,r=(b("number"==typeof(e=t?-e:e)),b(e<67108864),0),n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&r),r=(r>>=26)+(i/67108864|0)+(o>>>26);this.words[n]=67108863&o}return 0!==r&&(this.words[n]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},y.prototype.muln=function(e){return this.clone().imuln(e)},y.prototype.sqr=function(){return this.mul(this)},y.prototype.isqr=function(){return this.imul(this.clone())},y.prototype.pow=function(e){var t=(e=>{for(var t=new Array(e.bitLength()),r=0;r<t.length;r++)t[r]=e.words[r/26|0]>>>r%26&1;return t})(e);if(0===t.length)return new y(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},y.prototype.iushln=function(e){b("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!=t){for(var i=0,o=0;o<this.length;o++){var a=this.words[o]&n,s=(0|this.words[o])-a<<t;this.words[o]=s|i,i=a>>>26-t}i&&(this.words[o]=i,this.length++)}if(0!=r){for(o=this.length-1;0<=o;o--)this.words[o+r]=this.words[o];for(o=0;o<r;o++)this.words[o]=0;this.length+=r}return this._strip()},y.prototype.ishln=function(e){return b(0===this.negative),this.iushln(e)},y.prototype.iushrn=function(e,t,r){b("number"==typeof e&&0<=e),n=t?(t-t%26)/26:0;var n,i=e%26,o=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<<i,s=r;if(n-=o,n=Math.max(0,n),s){for(var f=0;f<o;f++)s.words[f]=this.words[f];s.length=o}if(0!==o)if(this.length>o)for(this.length-=o,f=0;f<this.length;f++)this.words[f]=this.words[f+o];else this.words[0]=0,this.length=1;for(var u=0,f=this.length-1;0<=f&&(0!==u||n<=f);f--){var c=0|this.words[f];this.words[f]=u<<26-i|c>>>i,u=c&a}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},y.prototype.ishrn=function(e,t,r){return b(0===this.negative),this.iushrn(e,t,r)},y.prototype.shln=function(e){return this.clone().ishln(e)},y.prototype.ushln=function(e){return this.clone().iushln(e)},y.prototype.shrn=function(e){return this.clone().ishrn(e)},y.prototype.ushrn=function(e){return this.clone().iushrn(e)},y.prototype.testn=function(e){b("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return!(this.length<=e||!(this.words[e]&1<<t))},y.prototype.imaskn=function(e){b("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return b(0===this.negative,"imaskn works only with positive numbers"),this.length<=e?this:(0!=t&&e++,this.length=Math.min(e,this.length),0!=t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),0===this.length&&(this.words[0]=0,this.length=1),this._strip())},y.prototype.maskn=function(e){return this.clone().imaskn(e)},y.prototype.iaddn=function(e){return b("number"==typeof e),b(e<67108864),e<0?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},y.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&67108864<=this.words[t];t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},y.prototype.isubn=function(e){if(b("number"==typeof e),b(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this._strip()},y.prototype.addn=function(e){return this.clone().iaddn(e)},y.prototype.subn=function(e){return this.clone().isubn(e)},y.prototype.iabs=function(){return this.negative=0,this},y.prototype.abs=function(){return this.clone().iabs()},y.prototype._ishlnsubmul=function(e,t,r){for(var n=e.length+r,i=(this._expand(n),0),o=0;o<e.length;o++){var a=(0|this.words[o+r])+i,s=(0|e.words[o])*t,i=((a-=67108863&s)>>26)-(s/67108864|0);this.words[o+r]=67108863&a}for(;o<this.length-r;o++)i=(a=(0|this.words[o+r])+i)>>26,this.words[o+r]=67108863&a;if(0!==i){for(b(-1===i),o=i=0;o<this.length;o++)i=(a=-(0|this.words[o])+i)>>26,this.words[o]=67108863&a;this.negative=1}return this._strip()},y.prototype._wordDiv=function(e,t){this.length,e.length;var r,n=this.clone(),i=e,o=0|i.words[i.length-1],a=(0!=(e=26-this._countBits(o))&&(i=i.ushln(e),n.iushln(e),o=0|i.words[i.length-1]),n.length-i.length);if("mod"!==t){(r=new y(null)).length=1+a,r.words=new Array(r.length);for(var s=0;s<r.length;s++)r.words[s]=0}var f=n.clone()._ishlnsubmul(i,1,a);0===f.negative&&(n=f,r)&&(r.words[a]=1);for(var u=a-1;0<=u;u--){var c=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]),c=Math.min(c/o|0,67108863);for(n._ishlnsubmul(i,c,u);0!==n.negative;)c--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);r&&(r.words[u]=c)}return r&&r._strip(),n._strip(),"div"!==t&&0!=e&&n.iushrn(e),{div:r||null,mod:n}},y.prototype.divmod=function(e,t,r){var n,i,o;return b(!e.isZero()),this.isZero()?{div:new y(0),mod:new y(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(i=o.mod.neg(),r)&&0!==i.negative&&i.iadd(e),{div:n,mod:i}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),{div:n="mod"!==t?o.div.neg():n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(i=o.mod.neg(),r)&&0!==i.negative&&i.isub(e),{div:o.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new y(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new y(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new y(this.modrn(e.words[0]))}:this._wordDiv(e,t)},y.prototype.div=function(e){return this.divmod(e,"div",!1).div},y.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},y.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},y.prototype.divRound=function(e){var t,r,n=this.divmod(e);return n.mod.isZero()||(r=0!==n.div.negative?n.mod.isub(e):n.mod,t=e.ushrn(1),e=e.andln(1),(r=r.cmp(t))<0)||1===e&&0===r?n.div:0!==n.div.negative?n.div.isubn(1):n.div.iaddn(1)},y.prototype.modrn=function(e){for(var t=e<0,r=(b((e=t?-e:e)<=67108863),(1<<26)%e),n=0,i=this.length-1;0<=i;i--)n=(r*n+(0|this.words[i]))%e;return t?-n:n},y.prototype.modn=function(e){return this.modrn(e)},y.prototype.idivn=function(e){for(var t=e<0,r=(b((e=t?-e:e)<=67108863),0),n=this.length-1;0<=n;n--){var i=(0|this.words[n])+67108864*r;this.words[n]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},y.prototype.divn=function(e){return this.clone().idivn(e)},y.prototype.egcd=function(e){b(0===e.negative),b(!e.isZero());for(var t=this,r=e.clone(),t=0!==t.negative?t.umod(e):t.clone(),n=new y(1),i=new y(0),o=new y(0),a=new y(1),s=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++s;for(var f=r.clone(),u=t.clone();!t.isZero();){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(0<c)for(t.iushrn(c);0<c--;)(n.isOdd()||i.isOdd())&&(n.iadd(f),i.isub(u)),n.iushrn(1),i.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(0<d)for(r.iushrn(d);0<d--;)(o.isOdd()||a.isOdd())&&(o.iadd(f),a.isub(u)),o.iushrn(1),a.iushrn(1);0<=t.cmp(r)?(t.isub(r),n.isub(o),i.isub(a)):(r.isub(t),o.isub(n),a.isub(i))}return{a:o,b:a,gcd:r.iushln(s)}},y.prototype._invmp=function(e){b(0===e.negative),b(!e.isZero());for(var t,r=this,n=e.clone(),r=0!==r.negative?r.umod(e):r.clone(),i=new y(1),o=new y(0),a=n.clone();0<r.cmpn(1)&&0<n.cmpn(1);){for(var s=0,f=1;0==(r.words[0]&f)&&s<26;++s,f<<=1);if(0<s)for(r.iushrn(s);0<s--;)i.isOdd()&&i.iadd(a),i.iushrn(1);for(var u=0,c=1;0==(n.words[0]&c)&&u<26;++u,c<<=1);if(0<u)for(n.iushrn(u);0<u--;)o.isOdd()&&o.iadd(a),o.iushrn(1);0<=r.cmp(n)?(r.isub(n),i.isub(o)):(n.isub(r),o.isub(i))}return(t=0===r.cmpn(1)?i:o).cmpn(0)<0&&t.iadd(e),t},y.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0;for(var n=r.negative=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0)var o=t,t=r,r=o;else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},y.prototype.invm=function(e){return this.egcd(e).a.umod(e)},y.prototype.isEven=function(){return 0==(1&this.words[0])},y.prototype.isOdd=function(){return 1==(1&this.words[0])},y.prototype.andln=function(e){return this.words[0]&e},y.prototype.bincn=function(e){b("number"==typeof e);var t=e%26,e=(e-t)/26,t=1<<t;if(this.length<=e)this._expand(1+e),this.words[e]|=t;else{for(var r=t,n=e;0!==r&&n<this.length;n++){var i=0|this.words[n],r=(i+=r)>>>26;i&=67108863,this.words[n]=i}0!==r&&(this.words[n]=r,this.length++)}return this},y.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},y.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this._strip(),t=1<this.length?1:(b((e=t?-e:e)<=67108863,"Number is too big"),(t=0|this.words[0])===e?0:t<e?-1:1),0!==this.negative?0|-t:t):-1},y.prototype.cmp=function(e){return 0!==this.negative&&0===e.negative?-1:0===this.negative&&0!==e.negative?1:(e=this.ucmp(e),0!==this.negative?0|-e:e)},y.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;0<=r;r--){var n=0|this.words[r],i=0|e.words[r];if(n!=i){n<i?t=-1:i<n&&(t=1);break}}return t},y.prototype.gtn=function(e){return 1===this.cmpn(e)},y.prototype.gt=function(e){return 1===this.cmp(e)},y.prototype.gten=function(e){return 0<=this.cmpn(e)},y.prototype.gte=function(e){return 0<=this.cmp(e)},y.prototype.ltn=function(e){return-1===this.cmpn(e)},y.prototype.lt=function(e){return-1===this.cmp(e)},y.prototype.lten=function(e){return this.cmpn(e)<=0},y.prototype.lte=function(e){return this.cmp(e)<=0},y.prototype.eqn=function(e){return 0===this.cmpn(e)},y.prototype.eq=function(e){return 0===this.cmp(e)},y.red=function(e){return new E(e)},y.prototype.toRed=function(e){return b(!this.red,"Already a number in reduction context"),b(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},y.prototype.fromRed=function(){return b(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},y.prototype._forceRed=function(e){return this.red=e,this},y.prototype.forceRed=function(e){return b(!this.red,"Already a number in reduction context"),this._forceRed(e)},y.prototype.redAdd=function(e){return b(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},y.prototype.redIAdd=function(e){return b(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},y.prototype.redSub=function(e){return b(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},y.prototype.redISub=function(e){return b(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},y.prototype.redShl=function(e){return b(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},y.prototype.redMul=function(e){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},y.prototype.redIMul=function(e){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},y.prototype.redSqr=function(){return b(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},y.prototype.redISqr=function(){return b(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},y.prototype.redSqrt=function(){return b(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},y.prototype.redInvm=function(){return b(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},y.prototype.redNeg=function(){return b(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},y.prototype.redPow=function(e){return b(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new y(t,16),this.n=this.p.bitLength(),this.k=new y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){var t;"string"==typeof e?(t=y._prime(e),this.m=t.p,this.prime=t):(b(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null)}function x(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new y(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)}w.prototype._tmp=function(){var e=new y(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){for(var t,r=e;this.split(r,this.tmp),(t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength())>this.n;);e=t<this.n?-1:r.ucmp(this.p);return 0===e?(r.words[0]=0,r.length=1):0<e?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},o(M,w),M.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)e.words[0]=0,e.length=1;else{var i=e.words[9];for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(4194303&o)<<4|i>>>22,i=o}0===(e.words[n-10]=i>>>=22)&&10<e.length?e.length-=10:e.length-=9}},M.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1])&&e.length--,e},o(S,w),o(A,w),o(k,w),k.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},y._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new M;else if("p224"===e)t=new S;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return _[e]=t},E.prototype._verify1=function(e){b(0===e.negative,"red works only with positives"),b(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){b(0==(e.negative|t.negative),"red works only with positives"),b(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);e=e.add(t);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);e=e.iadd(t);return 0<=e.cmp(this.m)&&e.isub(this.m),e},E.prototype.sub=function(e,t){this._verify2(e,t);e=e.sub(t);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);e=e.isub(t);return e.cmpn(0)<0&&e.iadd(this.m),e},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(b(t%2==1),3===t)return t=this.m.add(new y(1)).iushrn(2),this.pow(e,t);for(var r=this.m.subn(1),n=0;!r.isZero()&&0===r.andln(1);)n++,r.iushrn(1);b(!r.isZero());for(var i=new y(1).toRed(this),o=i.redNeg(),a=this.m.subn(1).iushrn(1),s=new y(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var f=this.pow(s,r),u=this.pow(e,r.addn(1).iushrn(1)),c=this.pow(e,r),h=n;0!==c.cmp(i);){for(var d=c,l=0;0!==d.cmp(i);l++)d=d.redSqr();b(l<h);var p=this.pow(f,new y(1).iushln(h-l-1)),u=u.redMul(p),f=p.redSqr(),c=c.redMul(f),h=l}return u},E.prototype.invm=function(e){e=e._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(e,t){if(t.isZero())return new y(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new y(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],o=0,a=0,s=t.bitLength()%26;for(0===s&&(s=26),n=t.length-1;0<=n;n--){for(var f=t.words[n],u=s-1;0<=u;u--){var c=f>>u&1;i!==r[0]&&(i=this.sqr(i)),0==c&&0===o?a=0:(o=o<<1|c,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[o]),o=a=0))}s=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){e=e.clone();return e.red=null,e},y.mont=function(e){return new x(e)},o(x,E),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){e=this.imod(e.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(e,t){return e.isZero()||t.isZero()?(e.words[0]=0,e.length=1,e):(t=(e=e.imul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(t=e=e.isub(t).iushrn(this.shift)).cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this))},x.prototype.mul=function(e,t){return(e.isZero()||t.isZero()?new y(0):(t=(e=e.mul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(t=e=e.isub(t).iushrn(this.shift)).cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t))._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}},{buffer:20}],19:[function(e,t,r){var n;function i(e){this.rand=e}if(t.exports=function(e){return(n=n||new i(null)).generate(e)},(t.exports.Rand=i).prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){e=new Uint8Array(e);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){e=new Uint8Array(e);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=e("crypto");if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},{crypto:20}],20:[function(e,t,r){},{}],21:[function(e,t,r){var i=e("safe-buffer").Buffer;function n(e){for(var t=(e=i.isBuffer(e)?e:i.from(e)).length/4|0,r=new Array(t),n=0;n<t;n++)r[n]=e.readUInt32BE(4*n);return r}function o(e){for(;0<e.length;e++)e[0]=0}function a(e,t,r,n,i){for(var o,a,s,f,u=r[0],c=r[1],h=r[2],d=r[3],l=e[0]^t[0],p=e[1]^t[1],b=e[2]^t[2],y=e[3]^t[3],m=4,g=1;g<i;g++)o=u[l>>>24]^c[p>>>16&255]^h[b>>>8&255]^d[255&y]^t[m++],a=u[p>>>24]^c[b>>>16&255]^h[y>>>8&255]^d[255&l]^t[m++],s=u[b>>>24]^c[y>>>16&255]^h[l>>>8&255]^d[255&p]^t[m++],f=u[y>>>24]^c[l>>>16&255]^h[p>>>8&255]^d[255&b]^t[m++],l=o,p=a,b=s,y=f;return o=(n[l>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&y])^t[m++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[y>>>8&255]<<8|n[255&l])^t[m++],s=(n[b>>>24]<<24|n[y>>>16&255]<<16|n[l>>>8&255]<<8|n[255&p])^t[m++],f=(n[y>>>24]<<24|n[l>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[m++],[o>>>=0,a>>>=0,s>>>=0,f>>>=0]}var h=[0,1,2,4,8,16,32,64,128,27,54],d=(()=>{for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,f=0;f<256;++f){var u=s^s<<1^s<<2^s<<3^s<<4,c=(r[a]=u=u>>>8^255&u^99,e[n[u]=a]),h=e[c],d=e[h],l=257*e[u]^16843008*u;i[0][a]=l<<24|l>>>8,i[1][a]=l<<16|l>>>16,i[2][a]=l<<8|l>>>24,i[3][a]=l,o[0][u]=(l=16843009*d^65537*h^257*c^16843008*a)<<24|l>>>8,o[1][u]=l<<16|l>>>16,o[2][u]=l<<8|l>>>24,o[3][u]=l,0===a?a=s=1:(a=c^e[e[e[d^c]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}})();function s(e){this._key=n(e),this._reset()}s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<n;o++){var a=i[o-1];o%t==0?(a=d.SBOX[(a=a<<8|a>>>24)>>>24]<<24|d.SBOX[a>>>16&255]<<16|d.SBOX[a>>>8&255]<<8|d.SBOX[255&a],a^=h[o/t|0]<<24):6<t&&o%t==4&&(a=d.SBOX[a>>>24]<<24|d.SBOX[a>>>16&255]<<16|d.SBOX[a>>>8&255]<<8|d.SBOX[255&a]),i[o]=i[o-t]^a}for(var s=[],f=0;f<n;f++){var u=n-f,c=i[u-(f%4?0:4)];s[f]=f<4||u<=4?c:d.INV_SUB_MIX[0][d.SBOX[c>>>24]]^d.INV_SUB_MIX[1][d.SBOX[c>>>16&255]]^d.INV_SUB_MIX[2][d.SBOX[c>>>8&255]]^d.INV_SUB_MIX[3][d.SBOX[255&c]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=s},s.prototype.encryptBlockRaw=function(e){return a(e=n(e),this._keySchedule,d.SUB_MIX,d.SBOX,this._nRounds)},s.prototype.encryptBlock=function(e){var e=this.encryptBlockRaw(e),t=i.allocUnsafe(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[1],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[3],12),t},s.prototype.decryptBlock=function(e){var t=(e=n(e))[1],t=(e[1]=e[3],e[3]=t,a(e,this._invKeySchedule,d.INV_SUB_MIX,d.INV_SBOX,this._nRounds)),e=i.allocUnsafe(16);return e.writeUInt32BE(t[0],0),e.writeUInt32BE(t[3],4),e.writeUInt32BE(t[2],8),e.writeUInt32BE(t[1],12),e},s.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=s},{"safe-buffer":191}],22:[function(e,t,r){var f=e("./aes"),u=e("safe-buffer").Buffer,c=e("cipher-base"),n=e("inherits"),h=e("./ghash"),i=e("buffer-xor"),d=e("./incr32");function o(e,t,r,n){c.call(this);var i,o,a,s=u.alloc(4,0),t=(this._cipher=new f.AES(t),this._cipher.encryptBlock(s));this._ghash=new h(t),s=this,t=t,r=12===(i=r).length?(s._finID=u.concat([i,u.from([0,0,0,1])]),u.concat([i,u.from([0,0,0,2])])):(t=new h(t),o=(a=i.length)%16,t.update(i),o&&t.update(u.alloc(o=16-o,0)),t.update(u.alloc(8,0)),i=8*a,(o=u.alloc(8)).writeUIntBE(i,0,8),t.update(o),s._finID=t.state,a=u.from(s._finID),d(a),a),this._prev=u.from(r),this._cache=u.allocUnsafe(0),this._secCache=u.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}n(o,c),o.prototype._update=function(e){!this._called&&this._alen&&(t=16-this._alen%16)<16&&(t=u.alloc(t,0),this._ghash.update(t)),this._called=!0;var t=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(t),this._len+=e.length,t},o.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=i(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&((e,t)=>{for(var r=0,n=(e.length!==t.length&&r++,Math.min(e.length,t.length)),i=0;i<n;++i)r+=e[i]^t[i];return r})(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},o.prototype.getAuthTag=function(){if(this._decrypt||!u.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},o.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},o.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=o},{"./aes":21,"./ghash":26,"./incr32":27,"buffer-xor":48,"cipher-base":58,inherits:137,"safe-buffer":191}],23:[function(e,t,r){var n=e("./encrypter"),i=e("./decrypter"),o=e("./modes/list.json");r.createCipher=r.Cipher=n.createCipher,r.createCipheriv=r.Cipheriv=n.createCipheriv,r.createDecipher=r.Decipher=i.createDecipher,r.createDecipheriv=r.Decipheriv=i.createDecipheriv,r.listCiphers=r.getCiphers=function(){return Object.keys(o)}},{"./decrypter":24,"./encrypter":25,"./modes/list.json":35}],24:[function(e,t,r){var n=e("./authCipher"),i=e("safe-buffer").Buffer,o=e("./modes"),a=e("./streamCipher"),s=e("cipher-base"),f=e("./aes"),u=e("evp_bytestokey");function c(e,t,r){s.call(this),this._cache=new h,this._last=void 0,this._cipher=new f.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function d(e,t,r){e=o[e.toLowerCase()];if(!e)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==e.mode&&r.length!==e.iv)throw new TypeError("invalid iv length "+r.length);if((t="string"==typeof t?i.from(t):t).length!==e.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===e.type?new a(e.module,t,r,!0):"auth"===e.type?new n(e.module,t,r,!0):new c(e.module,t,r)}e("inherits")(c,s),c.prototype._update=function(e){this._cache.add(e);for(var t,r=[];t=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,t),r.push(t);return i.concat(r)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding){var t=this._mode.decrypt(this,e),r=t[15];if(r<1||16<r)throw new Error("unable to decrypt data");for(var n=-1;++n<r;)if(t[n+(16-r)]!==r)throw new Error("unable to decrypt data");if(16!==r)return t.slice(0,16-r)}else if(e)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(16<this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(16<=this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(r)return d(e,(e=u(t,!1,r.key,r.iv)).key,e.iv);throw new TypeError("invalid suite type")},r.createDecipheriv=d},{"./aes":21,"./authCipher":22,"./modes":34,"./streamCipher":37,"cipher-base":58,evp_bytestokey:107,inherits:137,"safe-buffer":191}],25:[function(e,t,r){var n=e("./modes"),i=e("./authCipher"),o=e("safe-buffer").Buffer,a=e("./streamCipher"),s=e("cipher-base"),f=e("./aes"),u=e("evp_bytestokey");function c(e,t,r){s.call(this),this._cache=new d,this._cipher=new f.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}e("inherits")(c,s),c.prototype._update=function(e){this._cache.add(e);for(var t,r=[];t=this._cache.get();)t=this._mode.encrypt(this,t),r.push(t);return o.concat(r)};var h=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function l(e,t,r){e=n[e.toLowerCase()];if(!e)throw new TypeError("invalid suite type");if((t="string"==typeof t?o.from(t):t).length!==e.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==e.mode&&r.length!==e.iv)throw new TypeError("invalid iv length "+r.length);return new("stream"===e.type?a:"auth"===e.type?i:c)(e.module,t,r)}c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){var e;return 15<this.cache.length?(e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e):null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},r.createCipheriv=l,r.createCipher=function(e,t){var r=n[e.toLowerCase()];if(r)return l(e,(e=u(t,!1,r.key,r.iv)).key,e.iv);throw new TypeError("invalid suite type")}},{"./aes":21,"./authCipher":22,"./modes":34,"./streamCipher":37,"cipher-base":58,evp_bytestokey:107,inherits:137,"safe-buffer":191}],26:[function(e,t,r){var n=e("safe-buffer").Buffer,i=n.alloc(16,0);function a(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),t=3;0<t;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=a(i)},o.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);16<=this.cache.length;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(a([0,e,0,t])),this.state},t.exports=o},{"safe-buffer":191}],27:[function(e,t,r){t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},{}],28:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){t=n(t,e._prev);return e._prev=e._cipher.encryptBlock(t),e._prev},r.decrypt=function(e,t){var r=e._prev,e=(e._prev=t,e._cipher.decryptBlock(t));return n(e,r)}},{"buffer-xor":48}],29:[function(e,t,r){var o=e("safe-buffer").Buffer,a=e("buffer-xor");function s(e,t,r){var n=t.length,i=a(t,e._cache);return e._cache=e._cache.slice(n),e._prev=o.concat([e._prev,r?t:i]),i}r.encrypt=function(e,t,r){for(var n,i=o.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=o.allocUnsafe(0)),!(e._cache.length<=t.length)){i=o.concat([i,s(e,t,r)]);break}n=e._cache.length,i=o.concat([i,s(e,t.slice(0,n),r)]),t=t.slice(n)}return i}},{"buffer-xor":48,"safe-buffer":191}],30:[function(e,t,r){var s=e("safe-buffer").Buffer;function a(e,t,r){for(var n,i,o=-1,a=0;++o<8;)a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^(n=t&1<<7-o?128:0)))>>o%8,e._prev=((e,t)=>{var r=e.length,n=-1,i=s.allocUnsafe(e.length);for(e=s.concat([e,s.from([t])]);++n<r;)i[n]=e[n]<<1|e[n+1]>>7;return i})(e._prev,r?n:i);return a}r.encrypt=function(e,t,r){for(var n=t.length,i=s.allocUnsafe(n),o=-1;++o<n;)i[o]=a(e,t[o],r);return i}},{"safe-buffer":191}],31:[function(e,t,r){var c=e("safe-buffer").Buffer;r.encrypt=function(e,t,r){for(var n,i,o,a,s=t.length,f=c.allocUnsafe(s),u=-1;++u<s;)f[u]=(n=e,i=t[u],o=r,a=void 0,a=n._cipher.encryptBlock(n._prev)[0]^i,n._prev=c.concat([n._prev.slice(1),c.from([o?i:a])]),a);return f}},{"safe-buffer":191}],32:[function(e,t,r){var f=e("buffer-xor"),u=e("safe-buffer").Buffer,c=e("../incr32");r.encrypt=function(e,t){var r=Math.ceil(t.length/16),n=e._cache.length;e._cache=u.concat([e._cache,u.allocUnsafe(16*r)]);for(var i=0;i<r;i++){a=void 0,a=(o=e)._cipher.encryptBlockRaw(o._prev),c(o._prev);var o=a,a=n+16*i;e._cache.writeUInt32BE(o[0],a+0),e._cache.writeUInt32BE(o[1],a+4),e._cache.writeUInt32BE(o[2],a+8),e._cache.writeUInt32BE(o[3],a+12)}var s=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),f(t,s)}},{"../incr32":27,"buffer-xor":48,"safe-buffer":191}],33:[function(e,t,r){r.encrypt=function(e,t){return e._cipher.encryptBlock(t)},r.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],34:[function(e,t,r){var n,i={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},o=e("./list.json");for(n in o)o[n].module=i[o[n].mode];t.exports=o},{"./cbc":28,"./cfb":29,"./cfb1":30,"./cfb8":31,"./ctr":32,"./ecb":33,"./list.json":35,"./ofb":36}],35:[function(e,t,r){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],36:[function(e,t,r){!function(o){!function(){var i=e("buffer-xor");r.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=o.concat([e._cache,((r=e)._prev=r._cipher.encryptBlock(r._prev),r._prev)]);var r,n=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,n)}}.call(this)}.call(this,e("buffer").Buffer)},{buffer:49,"buffer-xor":48}],37:[function(e,t,r){var i=e("./aes"),o=e("safe-buffer").Buffer,a=e("cipher-base");function n(e,t,r,n){a.call(this),this._cipher=new i.AES(t),this._prev=o.from(r),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=n,this._mode=e}e("inherits")(n,a),n.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},n.prototype._final=function(){this._cipher.scrub()},t.exports=n},{"./aes":21,"cipher-base":58,inherits:137,"safe-buffer":191}],38:[function(e,t,r){var n=e("browserify-des"),i=e("browserify-aes/browser"),o=e("browserify-aes/modes"),a=e("browserify-des/modes"),s=e("evp_bytestokey");function f(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}r.createCipher=r.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}return t=s(t,!1,r,n),f(e,t.key,t.iv)},r.createCipheriv=r.Cipheriv=f,r.createDecipher=r.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}return t=s(t,!1,r,n),u(e,t.key,t.iv)},r.createDecipheriv=r.Decipheriv=u,r.listCiphers=r.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},{"browserify-aes/browser":23,"browserify-aes/modes":34,"browserify-des":39,"browserify-des/modes":40,evp_bytestokey:107}],39:[function(e,t,r){var o=e("cipher-base"),n=e("des.js"),i=e("inherits"),a=e("safe-buffer").Buffer,s={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function f(e){o.call(this);var t=e.mode.toLowerCase(),r=s[t],n=e.decrypt?"decrypt":"encrypt",i=e.key,t=(a.isBuffer(i)||(i=a.from(i)),"des-ede"!==t&&"des-ede-cbc"!==t||(i=a.concat([i,i.slice(0,8)])),e.iv);a.isBuffer(t)||(t=a.from(t)),this._des=r.create({key:i,iv:t,type:n})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],i(t.exports=f,o),f.prototype._update=function(e){return a.from(this._des.update(e))},f.prototype._final=function(){return a.from(this._des.final())}},{"cipher-base":58,"des.js":68,inherits:137,"safe-buffer":191}],40:[function(e,t,r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},{}],41:[function(e,t,r){var f=e("bn.js"),n=e("randombytes"),u=e("safe-buffer").Buffer;function c(e){for(var t,r=e.modulus.byteLength();0<=(t=new f(n(r))).cmp(e.modulus)||!t.umod(e.prime1)||!t.umod(e.prime2););return t}function i(e,t){var r={blinder:(r=c(n=t)).toRed(f.mont(n.modulus)).redPow(new f(n.publicExponent)).fromRed(),unblinder:r.invm(n.modulus)},n=t.modulus.byteLength(),e=new f(e).mul(r.blinder).umod(t.modulus),i=e.toRed(f.mont(t.prime1)),e=e.toRed(f.mont(t.prime2)),o=t.coefficient,a=t.prime1,s=t.prime2,i=i.redPow(t.exponent1).fromRed(),e=e.redPow(t.exponent2).fromRed(),i=i.isub(e).imul(o).umod(a).imul(s);return e.iadd(i).imul(r.unblinder).umod(t.modulus).toArrayLike(u,"be",n)}i.getr=c,t.exports=i},{"bn.js":18,randombytes:175,"safe-buffer":191}],42:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":43}],43:[function(e,t,r){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],44:[function(e,t,r){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],45:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("create-hash"),o=e("readable-stream"),a=e("inherits"),s=e("./sign"),f=e("./verify"),u=e("./algorithms.json");function c(e){o.Writable.call(this);e=u[e];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function h(e){o.Writable.call(this);e=u[e];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function d(e){return new c(e)}function l(e){return new h(e)}Object.keys(u).forEach(function(e){u[e].id=n.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]}),a(c,o.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},c.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),r=s(r,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},a(h,o.Writable),h.prototype._write=function(e,t,r){this._hash.update(e),r()},h.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},h.prototype.verify=function(e,t,r){r="string"==typeof t?n.from(t,r):t,this.end(),t=this._hash.digest();return f(r,t,e,this._signType,this._tag)},t.exports={Sign:d,Verify:l,createSign:d,createVerify:l}},{"./algorithms.json":43,"./sign":46,"./verify":47,"create-hash":62,inherits:137,"readable-stream":187,"safe-buffer":191}],46:[function(e,t,r){var M=e("safe-buffer").Buffer,o=e("create-hmac"),S=e("browserify-rsa"),A=e("elliptic").ec,k=e("bn.js"),E=e("parse-asn1"),x=e("./curves.json");function P(e,t,r,n){(e=M.from(e.toArray())).length<t.byteLength()&&(i=M.alloc(t.byteLength()-e.length),e=M.concat([i,e]));var i=r.length,r=((e,t)=>(e=(e=j(e,t)).mod(t),(e=M.from(e.toArray())).length<t.byteLength()&&(t=M.alloc(t.byteLength()-e.length),e=M.concat([t,e])),e))(r,t),i=((t=M.alloc(i)).fill(1),M.alloc(i)),i=o(n,i).update(t).update(M.from([0])).update(e).update(r).digest(),t=o(n,i).update(t).digest();return{k:i=o(n,i).update(t).update(M.from([1])).update(e).update(r).digest(),v:t=o(n,i).update(t).digest()}}function j(e,t){var r=new k(e),e=(e.length<<3)-t.bitLength();return 0<e&&r.ishrn(e),r}function R(e,t,r){var n,i;do{for(n=M.alloc(0);8*n.length<e.bitLength();)t.v=o(r,t.k).update(t.v).digest(),n=M.concat([n,t.v])}while(i=j(n,e),t.k=o(r,t.k).update(t.v).update(M.from([0])).digest(),t.v=o(r,t.k).update(t.v).digest(),-1!==i.cmp(e));return i}t.exports=function(e,t,r,n,i){var o=E(t);if(o.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");var a=e,s=o,f=x[s.curve.join(".")];if(f)return f=new A(f).keyFromPrivate(s.privateKey).sign(a),M.from(f.toDER());throw new Error("unknown curve "+s.curve.join("."))}if("dsa"===o.type){if("dsa"!==n)throw new Error("wrong private key type");for(var u,a=e,f=o,c=r,h=f.params.priv_key,d=f.params.p,l=f.params.q,p=f.params.g,b=new k(0),y=j(a,l).mod(l),m=!1,g=P(h,l,a,c);!1===m;)u=R(l,g,c),b=((e,t,r,n)=>e.toRed(k.mont(r)).redPow(t).fromRed().mod(n))(p,u,d,l),0===(m=u.invm(l).imul(y.add(h.mul(b))).mod(l)).cmpn(0)&&(m=!1,b=new k(0));a=m,s=(f=(f=b).toArray(),a=a.toArray(),128&f[0]&&(f=[0].concat(f)),128&a[0]&&(a=[0].concat(a)),[48,f.length+a.length+4,2,f.length]);return s=s.concat(f,[2,a.length],a),M.from(s)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");if(void 0!==t.padding&&1!==t.padding)throw new Error("illegal or unsupported padding mode");e=M.concat([i,e]);for(var v=o.modulus.byteLength(),_=[0,1];e.length+_.length+1<v;)_.push(255);_.push(0);for(var w=-1;++w<e.length;)_.push(e[w]);return S(_,o)},t.exports.getKey=P,t.exports.makeKey=R},{"./curves.json":44,"bn.js":18,"browserify-rsa":41,"create-hmac":64,elliptic:80,"parse-asn1":158,"safe-buffer":191}],47:[function(e,t,r){var g=e("safe-buffer").Buffer,v=e("bn.js"),_=e("elliptic").ec,w=e("parse-asn1"),M=e("./curves.json");function S(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(0<=e.cmp(t))throw new Error("invalid sig")}t.exports=function(e,t,r,n,i){var o,a;if("ec"===(r=w(r)).type){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong public key type");var s,f=e,u=t,c=r,h=M[c.data.algorithm.curve.join(".")];if(h)return h=new _(h),s=c.data.subjectPrivateKey.data,h.verify(u,f,s);throw new Error("unknown curve "+c.data.algorithm.curve.join("."))}if("dsa"===r.type){if("dsa"!==n)throw new Error("wrong public key type");return h=e,u=t,s=(f=r).data.p,c=r.data.q,y=r.data.g,f=r.data.pub_key,h=w.signature.decode(h,"der"),o=h.s,h=h.r,S(o,c),S(h,c),a=v.mont(s),o=o.invm(c),0===y.toRed(a).redPow(new v(u).mul(o).mod(c)).fromRed().mul(f.toRed(a).redPow(h.mul(o).mod(c)).fromRed()).mod(s).mod(c).cmp(h)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong public key type");t=g.concat([i,t]);for(var d=r.modulus.byteLength(),l=[1],p=0;t.length+l.length+2<d;)l.push(255),p+=1;l.push(0);for(var b=-1;++b<t.length;)l.push(t[b]);var l=g.from(l),y=v.mont(r.modulus),m=(e=(e=new v(e).toRed(y)).redPow(new v(r.publicExponent)),e=g.from(e.fromRed().toArray()),p<8?1:0),d=Math.min(e.length,l.length);for(e.length!==l.length&&(m=1),b=-1;++b<d;)m|=e[b]^l[b];return 0===m}},{"./curves.json":44,"bn.js":18,elliptic:80,"parse-asn1":158,"safe-buffer":191}],48:[function(e,t,r){!function(o){!function(){t.exports=function(e,t){for(var r=Math.min(e.length,t.length),n=new o(r),i=0;i<r;++i)n[i]=e[i]^t[i];return n}}.call(this)}.call(this,e("buffer").Buffer)},{buffer:49}],49:[function(O,e,I){!function(e){!function(){var A=O("base64-js"),o=O("ieee754"),t=(I.Buffer=h,I.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},I.INSPECT_MAX_BYTES=50,2147483647);function f(e){if(t<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return e.__proto__=h.prototype,e}function h(e,t,r){if("number"!=typeof e)return n(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return a(e)}function n(e,t,r){if("string"==typeof e){var n=e,i=t;if(h.isEncoding(i="string"==typeof i&&""!==i?i:"utf8"))return o=0|d(n,i),a=f(o),a=(n=a.write(n,i))!==o?a.slice(0,n):a;throw new TypeError("Unknown encoding: "+i)}if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer)){var o=e,n=t,a=r;if(n<0||o.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(o.byteLength<n+(a||0))throw new RangeError('"length" is outside of buffer bounds');return(o=void 0===n&&void 0===a?new Uint8Array(o):void 0===a?new Uint8Array(o,n):new Uint8Array(o,n,a)).__proto__=h.prototype,o}if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return h.from(i,t,r);var s=(e=>{var t,r;return h.isBuffer(e)?(t=0|c(e.length),0!==(r=f(t)).length&&e.copy(r,0,0,t),r):void 0!==e.length?"number"!=typeof e.length||R(e.length)?f(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0})(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return h.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function i(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function a(e){return i(e),f(e<0?0:0|c(e))}function u(e){for(var t=e.length<0?0:0|c(e.length),r=f(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function c(e){if(t<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return 0|e}function d(e,t){if(h.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return x(e).length;default:if(i)return n?-1:E(e).length;t=(""+t).toLowerCase(),i=!0}}function r(e,t,r){var n,i=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,a=t,s=r,f=o.length;(!s||s<0||f<s)&&(s=f);for(var u="",c=a=!a||a<0?0:a;c<s;++c)u+=(e=>e<16?"0"+e.toString(16):e.toString(16))(o[c]);return u;case"utf8":case"utf-8":return k(this,t,r);case"ascii":var h=this,f=t,d=r,l="";d=Math.min(h.length,d);for(var p=f;p<d;++p)l+=String.fromCharCode(127&h[p]);return l;case"latin1":case"binary":var b=this,a=t,y=r,m="";y=Math.min(b.length,y);for(var g=a;g<y;++g)m+=String.fromCharCode(b[g]);return m;case"base64":return v=this,n=r,0===(_=t)&&n===v.length?A.fromByteArray(v):A.fromByteArray(v.slice(_,n));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(var v=t,_=r,w=this.slice(v,_),M="",S=0;S<w.length;S+=2)M+=String.fromCharCode(w[S]+256*w[S+1]);return M;default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function s(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function l(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=R(r=+r)?i?0:e.length-1:r)<0&&(r=e.length+r),e.length<=r){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=h.from(t,n)),h.isBuffer(t))return 0===t.length?-1:p(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):p(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function p(e,t,r,n,i){var o=1,a=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a/=o=2,s/=2,r/=2}function f(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i)for(var u=-1,c=r;c<a;c++)if(f(e,c)===f(t,-1===u?0:c-u)){if(c-(u=-1===u?c:u)+1===s)return u*o}else-1!==u&&(c-=c-u),u=-1;else for(c=r=a<r+s?a-s:r;0<=c;c--){for(var h=!0,d=0;d<s;d++)if(f(e,c+d)!==f(t,d)){h=!1;break}if(h)return c}return-1}function y(e,t,r,n){return P((e=>{for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t})(t),e,r,n)}function m(e,t,r,n){return P(((e,t)=>{for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i.push(r%256),i.push(n);return i})(t,e.length-r),e,r,n)}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,f,u=e[i],c=null,h=239<u?4:223<u?3:191<u?2:1;if(i+h<=r)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&127<(f=(31&u)<<6|63&o)&&(c=f);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&2047<(f=(15&u)<<12|(63&o)<<6|63&a)&&(f<55296||57343<f)&&(c=f);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&65535<(f=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)&&f<1114112&&(c=f)}null===c?(c=65533,h=1):65535<c&&(n.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}var d=n,l=d.length;if(l<=g)return String.fromCharCode.apply(String,d);for(var p="",b=0;b<l;)p+=String.fromCharCode.apply(String,d.slice(b,b+=g));return p}I.kMaxLength=t,(h.TYPED_ARRAY_SUPPORT=(()=>{try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}})())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),h.poolSize=8192,h.from=n,h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,h.alloc=function(e,t,r){return t=t,r=r,i(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?f(e).fill(t,r):f(e).fill(t):f(e)},h.allocUnsafe=a,h.allocUnsafeSlow=a,h.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==h.prototype},h.compare=function(e,t){if(j(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),j(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(e)||!h.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},h.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);if(void 0===t)for(i=t=0;i<e.length;++i)t+=e[i].length;for(var r=h.allocUnsafe(t),n=0,i=0;i<e.length;++i){var o=e[i];if(j(o,Uint8Array)&&(o=h.from(o)),!h.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},h.byteLength=d,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)s(this,t,t+1);return this},h.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)s(this,t,t+3),s(this,t+1,t+2);return this},h.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)s(this,t,t+7),s(this,t+1,t+6),s(this,t+2,t+5),s(this,t+3,t+4);return this},h.prototype.toLocaleString=h.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):r.apply(this,arguments)},h.prototype.equals=function(e){if(h.isBuffer(e))return this===e||0===h.compare(this,e);throw new TypeError("Argument must be a Buffer")},h.prototype.inspect=function(){var e="",t=I.INSPECT_MAX_BYTES,e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim();return this.length>t&&(e+=" ... "),"<Buffer "+e+">"},h.prototype.compare=function(e,t,r,n,i){if(j(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=t)return 0;if(i<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),f=this.slice(n,i),u=e.slice(t,r),c=0;c<s;++c)if(f[c]!==u[c]){o=f[c],a=u[c];break}return o<a?-1:a<o?1:0},h.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},h.prototype.indexOf=function(e,t,r){return l(this,e,t,r,!0)},h.prototype.lastIndexOf=function(e,t,r){return l(this,e,t,r,!1)},h.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||i<r)&&(r=i),0<e.length&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var o,a,s,f=!1;;)switch(n){case"hex":var u=this,c=e,h=t,d=r,l=(h=Number(h)||0,u.length-h);(!d||l<(d=Number(d)))&&(d=l),(l=c.length)/2<d&&(d=l/2);for(var p=0;p<d;++p){var b=parseInt(c.substr(2*p,2),16);if(R(b))return p;u[h+p]=b}return p;case"utf8":case"utf-8":return l=t,s=r,P(E(e,(a=this).length-l),a,l,s);case"ascii":return y(this,e,t,r);case"latin1":case"binary":return y(this,e,t,r);case"base64":return a=this,s=t,o=r,P(x(e),a,s,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,e,t,r);default:if(f)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var g=4096;function b(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function v(e,t,r,n,i,o){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<t||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function _(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function w(e,t,r,n,i){return t=+t,r>>>=0,i||_(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,i){return t=+t,r>>>=0,i||_(e,0,r,8),o.write(e,t,r,n,52,8),r+8}h.prototype.slice=function(e,t){var r=this.length,r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e),this.subarray(e,t));return r.__proto__=h.prototype,r},h.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},h.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],i=1;0<t&&(i*=256);)n+=this[e+--t]*i;return n},h.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},h.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return(i*=128)<=n&&(n-=Math.pow(2,8*t)),n},h.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,i=1,o=this[e+--n];0<n&&(i*=256);)o+=this[e+--n]*i;return(i*=128)<=o&&(o-=Math.pow(2,8*t)),o},h.prototype.readInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},h.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},h.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||v(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},h.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||v(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;0<=--i&&(o*=256);)this[t+i]=e/o&255;return t+r},h.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,255,0),this[t]=255&e,t+1},h.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},h.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||v(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},h.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||v(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=r-1,o=1,a=0;for(this[t+i]=255&e;0<=--i&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},h.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},h.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},h.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||v(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeFloatLE=function(e,t,r){return w(this,e,t,!0,r)},h.prototype.writeFloatBE=function(e,t,r){return w(this,e,t,!1,r)},h.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},h.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},h.prototype.copy=function(e,t,r,n){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0<n&&n<r?r:n)===r)return 0;if(0===e.length||0===this.length)return 0;if((t=t||0)<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var i=(n=e.length-t<n-r?e.length-t+r:n)-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=i-1;0<=o;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},h.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!h.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var i;1===e.length&&(i=e.charCodeAt(0),"utf8"===n&&i<128||"latin1"===n)&&(e=i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");var o;if(!(r<=t))if(t>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(o=t;o<r;++o)this[o]=e;else{var a=h.isBuffer(e)?e:h.from(e,n),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var S=/[^+/0-9A-Za-z-_]/g;function E(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a<n;++a){if(55295<(r=e.charCodeAt(a))&&r<57344){if(!i){if(56319<r){-1<(t-=3)&&o.push(239,191,189);continue}if(a+1===n){-1<(t-=3)&&o.push(239,191,189);continue}i=r;continue}if(r<56320){-1<(t-=3)&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&-1<(t-=3)&&o.push(239,191,189);if(i=null,r<128){if(--t<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function x(e){return A.toByteArray((e=>{if((e=(e=e.split("=")[0]).trim().replace(S,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e})(e))}function P(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function R(e){return e!=e}}.call(this)}.call(this,O("buffer").Buffer)},{"base64-js":17,buffer:49,ieee754:136}],50:[function(e,t,r){var n=e("function-bind"),i=e("./functionApply"),o=e("./functionCall"),e=e("./reflectApply");t.exports=e||n.call(o,i)},{"./functionApply":52,"./functionCall":53,"./reflectApply":55,"function-bind":110}],51:[function(e,t,r){var n=e("function-bind"),i=e("./functionApply"),o=e("./actualApply");t.exports=function(){return o(n,i,arguments)}},{"./actualApply":50,"./functionApply":52,"function-bind":110}],52:[function(e,t,r){t.exports=Function.prototype.apply},{}],53:[function(e,t,r){t.exports=Function.prototype.call},{}],54:[function(e,t,r){var n=e("function-bind"),i=e("es-errors/type"),o=e("./functionCall"),a=e("./actualApply");t.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return a(n,o,e)}},{"./actualApply":50,"./functionCall":53,"es-errors/type":103,"function-bind":110}],55:[function(e,t,r){t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},{}],56:[function(e,t,r){var n=e("set-function-length"),i=e("es-define-property"),o=e("call-bind-apply-helpers"),e=e("call-bind-apply-helpers/applyBind");t.exports=function(e){var t=o(arguments),e=e.length-(arguments.length-1);return n(t,1+(0<e?e:0),!0)},i?i(t.exports,"apply",{value:e}):t.exports.apply=e},{"call-bind-apply-helpers":54,"call-bind-apply-helpers/applyBind":51,"es-define-property":97,"set-function-length":192}],57:[function(e,t,r){var n=e("get-intrinsic"),i=e("call-bind-apply-helpers"),o=i([n("%String.prototype.indexOf%")]);t.exports=function(e,t){t=n(e,!!t);return"function"==typeof t&&-1<o(e,".prototype.")?i([t]):t}},{"call-bind-apply-helpers":54,"get-intrinsic":111}],58:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("stream").Transform,o=e("string_decoder").StringDecoder,a=e("inherits"),s=e("to-buffer");function f(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}a(f,i),f.prototype.update=function(e,t,r){e=s(e,t),t=this._update(e);return this.hashMode?this:r?this._toString(t,r):t},f.prototype.setAutoPadding=function(){},f.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},f.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},f.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},f.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},f.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},f.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return t=e?this._toString(t,e,!0):t},f.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can’t switch encodings");t=this._decoder.write(e);return r&&(t+=this._decoder.end()),t},t.exports=f},{inherits:137,"safe-buffer":191,stream:201,string_decoder:216,"to-buffer":218}],59:[function(e,t,r){function n(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===n(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===n(e)},r.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("buffer").Buffer.isBuffer},{buffer:49}],60:[function(e,s,t){!function(a){!function(){var t=e("elliptic"),r=e("bn.js"),n=(s.exports=function(e){return new i(e)},{secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}});function i(e){this.curveType=n[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function o(e,t,r){Array.isArray(e)||(e=e.toArray());e=new a(e);return r&&e.length<r&&((r=new a(r-e.length)).fill(0),e=a.concat([r,e])),t?e.toString(t):e}n.p224=n.secp224r1,n.p256=n.secp256r1=n.prime256v1,n.p192=n.secp192r1=n.prime192v1,n.p384=n.secp384r1,n.p521=n.secp521r1,i.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},i.prototype.computeSecret=function(e,t,r){return t=t||"utf8",a.isBuffer(e)||(e=new a(e,t)),o(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},i.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),o(r,e)},i.prototype.getPrivateKey=function(e){return o(this.keys.getPrivate(),e)},i.prototype.setPublicKey=function(e,t){return t=t||"utf8",a.isBuffer(e)||(e=new a(e,t)),this.keys._importPublic(e),this},i.prototype.setPrivateKey=function(e,t){t=t||"utf8",a.isBuffer(e)||(e=new a(e,t));t=(t=new r(e)).toString(16);return this.keys=this.curve.genKeyPair(),this.keys._importPrivate(t),this}}.call(this)}.call(this,e("buffer").Buffer)},{"bn.js":61,buffer:49,elliptic:80}],61:[function(e,t,r){arguments[4][15][0].apply(r,arguments)},{buffer:20,dup:15}],62:[function(e,t,r){var n=e("inherits"),i=e("md5.js"),o=e("ripemd160"),a=e("sha.js"),s=e("cipher-base");function f(e){s.call(this,"digest"),this._hash=e}n(f,s),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new f(a(e))}},{"cipher-base":58,inherits:137,"md5.js":149,ripemd160:188,"sha.js":194}],63:[function(e,t,r){var n=e("md5.js");t.exports=function(e){return(new n).update(e).digest()}},{"md5.js":149}],64:[function(e,t,r){var n=e("inherits"),i=e("./legacy"),a=e("cipher-base"),s=e("safe-buffer").Buffer,o=e("create-hash/md5"),f=e("ripemd160"),u=e("sha.js"),c=s.alloc(128);function h(e,t){a.call(this,"digest"),"string"==typeof t&&(t=s.from(t));for(var r="sha512"===e||"sha384"===e?128:64,n=(this._alg=e,(this._key=t).length>r?t=("rmd160"===e?new f:u(e)).update(t).digest():t.length<r&&(t=s.concat([t,c],r)),this._ipad=s.allocUnsafe(r)),i=this._opad=s.allocUnsafe(r),o=0;o<r;o++)n[o]=54^t[o],i[o]=92^t[o];this._hash="rmd160"===e?new f:u(e),this._hash.update(n)}n(h,a),h.prototype._update=function(e){this._hash.update(e)},h.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new f:u(this._alg)).update(this._opad).update(e).digest()},t.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new h("rmd160",t):"md5"===e?new i(o,t):new h(e,t)}},{"./legacy":65,"cipher-base":58,"create-hash/md5":63,inherits:137,ripemd160:188,"safe-buffer":191,"sha.js":194}],65:[function(e,t,r){var n=e("inherits"),o=e("safe-buffer").Buffer,a=e("cipher-base"),s=o.alloc(128);function i(e,t){a.call(this,"digest"),"string"==typeof t&&(t=o.from(t)),this._alg=e,64<(this._key=t).length?t=e(t):t.length<64&&(t=o.concat([t,s],64));for(var r=this._ipad=o.allocUnsafe(64),n=this._opad=o.allocUnsafe(64),i=0;i<64;i++)r[i]=54^t[i],n[i]=92^t[i];this._hash=[r]}n(i,a),i.prototype._update=function(e){this._hash.push(e)},i.prototype._final=function(){var e=this._alg(o.concat(this._hash));return this._alg(o.concat([this._opad,e]))},t.exports=i},{"cipher-base":58,inherits:137,"safe-buffer":191}],66:[function(e,t,r){r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var n=e("browserify-sign/algos"),n=Object.keys(n),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n),n=(r.getHashes=function(){return i},e("pbkdf2")),n=(r.pbkdf2=n.pbkdf2,r.pbkdf2Sync=n.pbkdf2Sync,e("browserify-cipher")),n=(r.Cipher=n.Cipher,r.createCipher=n.createCipher,r.Cipheriv=n.Cipheriv,r.createCipheriv=n.createCipheriv,r.Decipher=n.Decipher,r.createDecipher=n.createDecipher,r.Decipheriv=n.Decipheriv,r.createDecipheriv=n.createDecipheriv,r.getCiphers=n.getCiphers,r.listCiphers=n.listCiphers,e("diffie-hellman")),n=(r.DiffieHellmanGroup=n.DiffieHellmanGroup,r.createDiffieHellmanGroup=n.createDiffieHellmanGroup,r.getDiffieHellman=n.getDiffieHellman,r.createDiffieHellman=n.createDiffieHellman,r.DiffieHellman=n.DiffieHellman,e("browserify-sign")),n=(r.createSign=n.createSign,r.Sign=n.Sign,r.createVerify=n.createVerify,r.Verify=n.Verify,r.createECDH=e("create-ecdh"),e("public-encrypt")),n=(r.publicEncrypt=n.publicEncrypt,r.privateEncrypt=n.privateEncrypt,r.publicDecrypt=n.publicDecrypt,r.privateDecrypt=n.privateDecrypt,e("randomfill"));r.randomFill=n.randomFill,r.randomFillSync=n.randomFillSync,r.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":38,"browserify-sign":45,"browserify-sign/algos":42,"create-ecdh":60,"create-hash":62,"create-hmac":64,"diffie-hellman":74,pbkdf2:159,"public-encrypt":168,randombytes:175,randomfill:176}],67:[function(e,t,r){var f=e("es-define-property"),u=e("es-errors/syntax"),c=e("es-errors/type"),h=e("gopd");t.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new c("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new c("`property` must be a string or a symbol`");if(3<arguments.length&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new c("`nonEnumerable`, if provided, must be a boolean or null");if(4<arguments.length&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new c("`nonWritable`, if provided, must be a boolean or null");if(5<arguments.length&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new c("`nonConfigurable`, if provided, must be a boolean or null");if(6<arguments.length&&"boolean"!=typeof arguments[6])throw new c("`loose`, if provided, must be a boolean");var n=3<arguments.length?arguments[3]:null,i=4<arguments.length?arguments[4]:null,o=5<arguments.length?arguments[5]:null,a=6<arguments.length&&arguments[6],s=!!h&&h(e,t);if(f)f(e,t,{configurable:null===o&&s?s.configurable:!o,enumerable:null===n&&s?s.enumerable:!n,value:r,writable:null===i&&s?s.writable:!i});else{if(!a&&(n||i||o))throw new u("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},{"es-define-property":97,"es-errors/syntax":102,"es-errors/type":103,gopd:116}],68:[function(e,t,r){r.utils=e("./des/utils"),r.Cipher=e("./des/cipher"),r.DES=e("./des/des"),r.CBC=e("./des/cbc"),r.EDE=e("./des/ede")},{"./des/cbc":69,"./des/cipher":70,"./des/des":71,"./des/ede":72,"./des/utils":73}],69:[function(e,t,r){var n=e("minimalistic-assert"),o=e("inherits"),a={};function i(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}r.instantiate=function(t){function r(e){t.call(this,e),this._cbcInit()}o(r,t);for(var e=Object.keys(a),n=0;n<e.length;n++){var i=e[n];r.prototype[i]=a[i]}return r.create=function(e){return new r(e)},r},a._cbcInit=function(){var e=new i(this.options.iv);this._cbcState=e},a._update=function(e,t,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];o._update.call(this,a,0,r,n);for(s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{o._update.call(this,e,t,r,n);for(s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},{inherits:137,"minimalistic-assert":152}],70:[function(e,t,r){var n=e("minimalistic-assert");function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}(t.exports=i).prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){for(var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize),o=(0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length)&&(r+=this._flushBuffer(i,r)),e.length-(e.length-t)%this.blockSize);t<o;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);0<n;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t;return e&&(t=this.update(e)),e="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(e):e},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){var e;return this._pad(this.buffer,this.bufferOff)?(e=new Array(this.blockSize),this._update(this.buffer,0,e,0),e):[]},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},{"minimalistic-assert":152}],71:[function(e,t,r){var a=e("minimalistic-assert"),n=e("inherits"),c=e("./utils"),i=e("./cipher");function o(){this.tmp=new Array(2),this.keys=null}function s(e){i.call(this,e);var t=new o;this._desState=t,this.deriveKeys(t,e.key)}n(s,i),(t.exports=s).create=function(e){return new s(e)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];s.prototype.deriveKeys=function(e,t){e.keys=new Array(32),a.equal(t.length,this.blockSize,"Invalid key length");var r=c.readUInt32BE(t,0),n=c.readUInt32BE(t,4);c.pc1(r,n,e.tmp,0),r=e.tmp[0],n=e.tmp[1];for(var i=0;i<e.keys.length;i+=2){var o=f[i>>>1],r=c.r28shl(r,o),n=c.r28shl(n,o);c.pc2(r,n,e.keys,i)}},s.prototype._update=function(e,t,r,n){var i=this._desState,o=c.readUInt32BE(e,t),e=c.readUInt32BE(e,t+4);c.ip(o,e,i.tmp,0),o=i.tmp[0],e=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,e,i.tmp,0):this._decrypt(i,o,e,i.tmp,0),o=i.tmp[0],e=i.tmp[1],c.writeUInt32BE(r,o,n),c.writeUInt32BE(r,e,n+4)},s.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},s.prototype._unpad=function(e){if(!1===this.padding)return e;for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)a.equal(e[r],t);return e.slice(0,e.length-t)},s.prototype._encrypt=function(e,t,r,n,i){for(var o=t,a=r,s=0;s<e.keys.length;s+=2)var f=e.keys[s],u=e.keys[s+1],f=(c.expand(a,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1],c.substitute(f,u)),u=a,a=(o^c.permute(f))>>>0,o=u;c.rip(a,o,n,i)},s.prototype._decrypt=function(e,t,r,n,i){for(var o=r,a=t,s=e.keys.length-2;0<=s;s-=2)var f=e.keys[s],u=e.keys[s+1],f=(c.expand(o,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1],c.substitute(f,u)),u=o,o=(a^c.permute(f))>>>0,a=u;c.rip(o,a,n,i)}},{"./cipher":70,"./utils":73,inherits:137,"minimalistic-assert":152}],72:[function(e,t,r){var i=e("minimalistic-assert"),n=e("inherits"),o=e("./cipher"),a=e("./des");function s(e,t){i.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),n=t.slice(8,16),t=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:n}),a.create({type:"encrypt",key:t})]:[a.create({type:"decrypt",key:t}),a.create({type:"encrypt",key:n}),a.create({type:"decrypt",key:r})]}function f(e){o.call(this,e);e=new s(this.type,this.options.key);this._edeState=e}n(f,o),(t.exports=f).create=function(e){return new f(e)},f.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},f.prototype._pad=a.prototype._pad,f.prototype._unpad=a.prototype._unpad},{"./cipher":70,"./des":71,inherits:137,"minimalistic-assert":152}],73:[function(e,t,r){r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,o=0,a=6;0<=a;a-=2){for(var s=0;s<=24;s+=8)i=i<<1|t>>>s+a&1;for(s=0;s<=24;s+=8)i=i<<1|e>>>s+a&1}for(a=6;0<=a;a-=2){for(s=1;s<=25;s+=8)o=o<<1|t>>>s+a&1;for(s=1;s<=25;s+=8)o=o<<1|e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},r.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;0<=s;s-=8)i=(i=i<<1|t>>>s+a&1)<<1|e>>>s+a&1;for(a=4;a<8;a++)for(s=24;0<=s;s-=8)o=(o=o<<1|t>>>s+a&1)<<1|e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;5<=a;a--){for(var s=0;s<=24;s+=8)i=i<<1|t>>s+a&1;for(s=0;s<=24;s+=8)i=i<<1|e>>s+a&1}for(s=0;s<=24;s+=8)i=i<<1|t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o=o<<1|t>>s+a&1;for(s=0;s<=24;s+=8)o=o<<1|e>>s+a&1}for(s=0;s<=24;s+=8)o=o<<1|e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var f=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24],i=(r.pc2=function(e,t,r,n){for(var i=0,o=0,a=f.length>>>1,s=0;s<a;s++)i=i<<1|e>>>f[s]&1;for(s=a;s<f.length;s++)o=o<<1|t>>>f[s]&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.expand=function(e,t,r){for(var n=0,i=0,n=(1&e)<<5|e>>>27,o=23;15<=o;o-=4)n=n<<6|e>>>o&63;for(o=11;3<=o;o-=4)i=(i|e>>>o&63)<<6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0},[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11]),n=(r.substitute=function(e,t){for(var r=0,n=0;n<4;n++)r=r<<4|i[64*n+(e>>>18-6*n&63)];for(n=0;n<4;n++)r=r<<4|i[256+64*n+(t>>>18-6*n&63)];return r>>>0},[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7]);r.permute=function(e){for(var t=0,r=0;r<n.length;r++)t=t<<1|e>>>n[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],o=0;o<t;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},{}],74:[function(e,t,n){!function(f){!function(){var o=e("./lib/generatePrime"),r=e("./lib/primes.json"),a=e("./lib/dh");var s={binary:!0,hex:!0,base64:!0};n.DiffieHellmanGroup=n.createDiffieHellmanGroup=n.getDiffieHellman=function(e){var t=new f(r[e].prime,"hex"),e=new f(r[e].gen,"hex");return new a(t,e)},n.createDiffieHellman=n.DiffieHellman=function e(t,r,n,i){return f.isBuffer(r)||void 0===s[r]?e(t,"binary",r,n):(r=r||"binary",i=i||"binary",n=n||new f([2]),f.isBuffer(n)||(n=new f(n,i)),"number"==typeof t?new a(o(t,n),n,!0):(f.isBuffer(t)||(t=new f(t,r)),new a(t,n,!0)))}}.call(this)}.call(this,e("buffer").Buffer)},{"./lib/dh":75,"./lib/generatePrime":76,"./lib/primes.json":77,buffer:49}],75:[function(b,y,e){!function(p){!function(){var n=b("bn.js"),o=new(b("miller-rabin")),a=new n(24),s=new n(11),f=new n(10),u=new n(3),c=new n(7),h=b("./generatePrime"),e=b("randombytes");function i(e,t){return t=t||"utf8",p.isBuffer(e)||(e=new p(e,t)),this._pub=new n(e),this}function d(e,t){return t=t||"utf8",p.isBuffer(e)||(e=new p(e,t)),this._priv=new n(e),this}y.exports=t;var l={};function t(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=i,this.setPrivateKey=d):this._primeCode=8}function r(e,t){e=new p(e.toArray());return t?e.toString(t):e}Object.defineProperty(t.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=((e,t)=>{var r=[t=t.toString("hex"),e.toString(16)].join("_");if(r in l)return l[r];var n,i=0;if(e.isEven()||!h.simpleSieve||!h.fermatTest(e)||!o.test(e))return l[r]=i=i+1+("02"===t||"05"===t?8:4);switch(o.test(e.shrn(1))||(i+=2),t){case"02":e.mod(a).cmp(s)&&(i+=8);break;case"05":(n=e.mod(f)).cmp(u)&&n.cmp(c)&&(i+=8);break;default:i+=4}return l[r]=i})(this.__prime,this.__gen)),this._primeCode}}),t.prototype.generateKeys=function(){return this._priv||(this._priv=new n(e(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},t.prototype.computeSecret=function(e){var e=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),e=new p(e.toArray()),t=this.getPrime();return e.length<t.length&&((t=new p(t.length-e.length)).fill(0),e=p.concat([t,e])),e},t.prototype.getPublicKey=function(e){return r(this._pub,e)},t.prototype.getPrivateKey=function(e){return r(this._priv,e)},t.prototype.getPrime=function(e){return r(this.__prime,e)},t.prototype.getGenerator=function(e){return r(this._gen,e)},t.prototype.setGenerator=function(e,t){return t=t||"utf8",p.isBuffer(e)||(e=new p(e,t)),this.__gen=e,this._gen=new n(e),this}}.call(this)}.call(this,b("buffer").Buffer)},{"./generatePrime":76,"bn.js":78,buffer:49,"miller-rabin":150,randombytes:175}],76:[function(e,t,r){var i=e("randombytes"),o=((t.exports=n).simpleSieve=y,n.fermatTest=m,e("bn.js")),a=new o(24),s=new(e("miller-rabin")),f=new o(1),u=new o(2),c=new o(5),h=(new o(16),new o(8),new o(10)),d=new o(3),l=(new o(7),new o(11)),p=new o(4),b=(new o(12),null);function y(e){for(var t=(()=>{if(null!==b)return b;for(var e=[2],t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!=0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return b=e})(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function m(e){var t=o.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function n(e,t){if(e<16)return new o(2===t||5===t?[140,123]:[140,39]);var r,n;for(t=new o(t);;){for(r=new o(i(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(f),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(h).cmp(d);)r.iadd(p)}else for(;r.mod(a).cmp(l);)r.iadd(p);if(y(n=r.shrn(1))&&y(r)&&m(n)&&m(r)&&s.test(n)&&s.test(r))return r}}},{"bn.js":78,"miller-rabin":150,randombytes:175}],77:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],78:[function(e,t,r){arguments[4][15][0].apply(r,arguments)},{buffer:20,dup:15}],79:[function(e,t,r){var n=e("call-bind-apply-helpers"),e=e("gopd");try{i=[].__proto__===Array.prototype}catch(e){if(!(e&&"object"==typeof e&&"code"in e&&"ERR_PROTO_ACCESS"===e.code))throw e}var i=!!i&&e&&e(Object.prototype,"__proto__"),o=Object,a=o.getPrototypeOf;t.exports=i&&"function"==typeof i.get?n([i.get]):"function"==typeof a&&function(e){return a(null==e?e:o(e))}},{"call-bind-apply-helpers":54,gopd:116}],80:[function(e,t,r){r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa")},{"../package.json":96,"./elliptic/curve":83,"./elliptic/curves":86,"./elliptic/ec":87,"./elliptic/eddsa":90,"./elliptic/utils":94,brorand:19}],81:[function(e,t,r){var n=e("bn.js"),i=e("../utils"),k=i.getNAF,E=i.getJSF,h=i.assert;function o(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;e=this.n&&this.p.div(this.n);!e||0<e.cmpn(100)?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function a(e,t){this.curve=e,this.type=t,this.precomputed=null}(t.exports=o).prototype.point=function(){throw new Error("Not implemented")},o.prototype.validate=function(){throw new Error("Not implemented")},o.prototype._fixedNafMul=function(e,t){h(e.precomputed);for(var r=e._getDoubles(),n=k(t,1,this._bitLength),e=(1<<r.step+1)-(r.step%2==0?2:1),i=(e/=3,[]),o=0;o<n.length;o+=r.step){for(var a=0,s=o+r.step-1;o<=s;s--)a=(a<<1)+n[s];i.push(a)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),c=e;0<c;c--){for(o=0;o<i.length;o++)(a=i[o])===c?u=u.mixedAdd(r.points[o]):a===-c&&(u=u.mixedAdd(r.points[o].neg()));f=f.add(u)}return f.toP()},o.prototype._wnafMul=function(e,t){for(var r=e._getNAFPoints(4),n=r.wnd,i=r.points,o=k(t,n,this._bitLength),a=this.jpoint(null,null,null),s=o.length-1;0<=s;s--){for(var f=0;0<=s&&0===o[s];s--)f++;if(0<=s&&f++,a=a.dblp(f),s<0)break;var u=o[s];h(0!==u),a="affine"===e.type?0<u?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):0<u?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},o.prototype._wnafMulAdd=function(e,t,r,n,i){for(var o=this._wnafT1,a=this._wnafT2,s=this._wnafT3,f=0,u=0;u<n;u++){var c,h=(c=t[u])._getNAFPoints(e);o[u]=h.wnd,a[u]=h.points}for(u=n-1;1<=u;u-=2){var d=u-1,l=u;if(1!==o[d]||1!==o[l])s[d]=k(r[d],o[d],this._bitLength),s[l]=k(r[l],o[l],this._bitLength),f=Math.max(s[d].length,f),f=Math.max(s[l].length,f);else{var p=[t[d],null,null,t[l]],b=(0===t[d].y.cmp(t[l].y)?(p[1]=t[d].add(t[l]),p[2]=t[d].toJ().mixedAdd(t[l].neg())):0===t[d].y.cmp(t[l].y.redNeg())?(p[1]=t[d].toJ().mixedAdd(t[l]),p[2]=t[d].add(t[l].neg())):(p[1]=t[d].toJ().mixedAdd(t[l]),p[2]=t[d].toJ().mixedAdd(t[l].neg())),[-3,-1,-5,-7,0,7,5,1,3]),y=E(r[d],r[l]),f=Math.max(y[0].length,f);for(s[d]=new Array(f),s[l]=new Array(f),S=0;S<f;S++){var m=0|y[0][S],g=0|y[1][S];s[d][S]=b[3*(1+m)+(1+g)],s[l][S]=0,a[d]=p}}}var v=this.jpoint(null,null,null),_=this._wnafT4;for(u=f;0<=u;u--){for(var w=0;0<=u;){for(var M=!0,S=0;S<n;S++)_[S]=0|s[S][u],0!==_[S]&&(M=!1);if(!M)break;w++,u--}if(0<=u&&w++,v=v.dblp(w),u<0)break;for(S=0;S<n;S++){var A=_[S];0!==A&&(0<A?c=a[S][A-1>>1]:A<0&&(c=a[S][-A-1>>1].neg()),v="affine"===c.type?v.mixedAdd(c):v.add(c))}}for(u=0;u<n;u++)a[u]=null;return i?v:v.toP()},(o.BasePoint=a).prototype.eq=function(){throw new Error("Not implemented")},a.prototype.validate=function(){return this.curve.validate(this)},o.prototype.decodePoint=function(e,t){e=i.toArray(e,t);t=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*t)return 6===e[0]?h(e[e.length-1]%2==0):7===e[0]&&h(e[e.length-1]%2==1),this.point(e.slice(1,1+t),e.slice(1+t,1+2*t));if(2!==e[0]&&3!==e[0]||e.length-1!==t)throw new Error("Unknown point format");return this.pointFromX(e.slice(1,1+t),3===e[0])},a.prototype.encodeCompressed=function(e){return this.encode(e,!0)},a.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},a.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},a.prototype.precompute=function(e){var t;return this.precomputed||((t={doubles:null,naf:null,beta:null}).naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t),this},a.prototype._hasDoubles=function(e){var t;return!!this.precomputed&&!!(t=this.precomputed.doubles)&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},a.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1==r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},a.prototype._getBeta=function(){return null},a.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},{"../utils":94,"bn.js":95}],82:[function(e,t,r){var n=e("../utils"),o=e("bn.js"),i=e("inherits"),a=e("./base"),s=n.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,i){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(t,16),this.y=new o(r,16),this.z=n?new o(n,16):this.curve.one,this.t=i&&new o(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}i(f,a),(t.exports=f).prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},f.prototype.pointFromX=function(e,t){var r=(e=(e=new o(e,16)).red?e:e.toRed(this.red)).redSqr(),n=this.c2.redSub(this.a.redMul(r)),r=this.one.redSub(this.c2.redMul(this.d).redMul(r)),n=n.redMul(r.redInvm()),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");n=r.fromRed().isOdd();return(t&&!n||!t&&n)&&(r=r.redNeg()),this.point(e,r)},f.prototype.pointFromY=function(e,t){var r=(e=(e=new o(e,16)).red?e:e.toRed(this.red)).redSqr(),n=r.redSub(this.c2),r=r.redMul(this.d).redMul(this.c2).redSub(this.a),n=n.redMul(r.redInvm());if(0===n.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");return r.fromRed().isOdd()!==t&&(r=r.redNeg()),this.point(r,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),e=e.y.redSqr(),r=t.redMul(this.a).redAdd(e),t=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(e)));return 0===r.cmp(t)},i(u,a.BasePoint),f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},f.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=(r=this.z.redSqr()).redIAdd(r),n=this.curve._mulA(e),e=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=n.redAdd(t),r=i.redSub(r),n=n.redSub(t),t=e.redMul(r),o=i.redMul(n),e=e.redMul(n),n=r.redMul(i);return this.curve.point(t,o,n,e)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),f=this.y.redSqr();return o=this.curve.twisted?(o=(i=this.curve._mulA(s)).redAdd(f),this.zOne?(e=a.redSub(s).redSub(f).redMul(o.redSub(this.curve.two)),t=o.redMul(i.redSub(f)),o.redSqr().redSub(o).redSub(o)):(r=this.z.redSqr(),n=o.redSub(r).redISub(r),e=a.redSub(s).redISub(f).redMul(n),t=o.redMul(i.redSub(f)),o.redMul(n))):(i=s.redAdd(f),r=this.curve._mulC(this.z).redSqr(),n=i.redSub(r).redSub(r),e=this.curve._mulC(a.redISub(i)).redMul(n),t=this.curve._mulC(i).redMul(s.redISub(f)),i.redMul(n)),this.curve.point(e,t,o)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),e=this.z.redMul(e.z.redAdd(e.z)),i=r.redSub(t),o=e.redSub(n),e=e.redAdd(n),n=r.redAdd(t),r=i.redMul(o),t=e.redMul(n),i=i.redMul(n),n=o.redMul(e);return this.curve.point(r,t,n,i)},u.prototype._projAdd=function(e){var t,r=this.z.redMul(e.z),n=r.redSqr(),i=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(i).redMul(o),s=n.redSub(a),n=n.redAdd(a),a=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(o),e=r.redMul(s).redMul(a),a=(this.curve.twisted?(t=r.redMul(n).redMul(o.redSub(this.curve._mulA(i))),s):(t=r.redMul(n).redMul(o.redSub(i)),this.curve._mulC(s))).redMul(n);return this.curve.point(e,t,a)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){var e;return this.zOne||(e=this.z.redInvm(),this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0),this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),0<=r.cmp(this.curve.p))return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},{"../utils":94,"./base":81,"bn.js":95,inherits:137}],83:[function(e,t,r){r.base=e("./base"),r.short=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards")},{"./base":81,"./edwards":82,"./mont":84,"./short":85}],84:[function(e,t,r){var n=e("bn.js"),i=e("inherits"),o=e("./base"),a=e("../utils");function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),(t.exports=s).prototype.validate=function(e){var e=e.normalize().x,t=e.redSqr(),t=t.redMul(e).redAdd(t.redMul(this.a)).redAdd(e);return 0===t.redSqrt().redSqr().cmp(t)},i(f,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new f(this,e,t)},s.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),e=e.redMul(t),t=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(e,t)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),e=e.x.redSub(e.z).redMul(r),r=i.redMul(n),i=t.z.redMul(e.redAdd(r).redSqr()),n=t.x.redMul(e.redISub(r).redSqr());return this.curve.point(i,n)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;0<=o;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":94,"./base":81,"bn.js":95,inherits:137}],85:[function(e,t,r){var n=e("../utils"),v=e("bn.js"),i=e("inherits"),o=e("./base"),a=n.assert;function s(e){o.call(this,"short",e),this.a=new v(e.a,16).toRed(this.red),this.b=new v(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,r,n){o.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new v(t,16),this.y=new v(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,n){o.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new v(0)):(this.x=new v(t,16),this.y=new v(r,16),this.z=new v(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}i(s,o),(t.exports=s).prototype._getEndomorphism=function(e){var t,r,n;if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3))return r=(e.beta?new v(e.beta,16):r=(r=this._getEndoRoots(this.p))[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red),e.lambda?t=new v(e.lambda,16):(n=this._getEndoRoots(this.n),0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(r))?t=n[0]:(t=n[1],a(0===this.g.mul(t).x.cmp(this.g.x.redMul(r))))),{beta:r,lambda:t,basis:e.basis?e.basis.map(function(e){return{a:new v(e.a,16),b:new v(e.b,16)}}):this._getEndoBasis(t)}},s.prototype._getEndoRoots=function(e){var e=e===this.p?this.red:v.mont(e),t=new v(2).toRed(e).redInvm(),r=t.redNeg(),e=new v(3).toRed(e).redNeg().redSqrt().redMul(t);return[r.redAdd(e).fromRed(),r.redSub(e).fromRed()]},s.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,a=this.n.ushrn(Math.floor(this.n.bitLength()/2)),s=e,f=this.n.clone(),u=new v(1),c=new v(0),h=new v(0),d=new v(1),l=0;0!==s.cmpn(0);){var p=f.div(s),b=f.sub(p.mul(s)),y=h.sub(p.mul(u)),p=d.sub(p.mul(c));if(!n&&b.cmp(a)<0)t=o.neg(),r=u,n=b.neg(),i=y;else if(n&&2==++l)break;f=s,s=o=b,h=u,u=y,d=c,c=p}var e=b.neg(),m=y,g=n.sqr().add(i.sqr());return 0<=e.sqr().add(m.sqr()).cmp(g)&&(e=t,m=r),n.negative&&(n=n.neg(),i=i.neg()),e.negative&&(e=e.neg(),m=m.neg()),[{a:n,b:i},{a:e,b:m}]},s.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],t=t[1],n=t.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),o=n.mul(r.a),a=i.mul(t.a),n=n.mul(r.b),r=i.mul(t.b);return{k1:e.sub(o).sub(a),k2:n.add(r).neg()}},s.prototype.pointFromX=function(e,t){var r=(e=(e=new v(e,16)).red?e:e.toRed(this.red)).redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");r=n.fromRed().isOdd();return(t&&!r||!t&&r)&&(n=n.redNeg()),this.point(e,n)},s.prototype.validate=function(e){var t,r;return!!e.inf||(t=e.y,r=this.a.redMul(e=e.x),e=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b),0===t.redSqr().redISub(e).cmpn(0))},s.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],f=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),f=f.neg(!0)),n[2*o]=s,n[2*o+1]=f,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var r=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return r},i(f,o.BasePoint),s.prototype.point=function(e,t,r){return new f(this,e,t,r)},s.prototype.pointFromJSON=function(e,t){return f.fromJSON(this,e,t)},f.prototype._getBeta=function(){var e,t,r,n;if(this.curve.endo)return(e=this.precomputed)&&e.beta?e.beta:(t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y),e&&(r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)},(e.beta=t).precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}),t)},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);return e[2]&&(e=e[2],n.precomputed={beta:null,doubles:e.doubles&&{step:e.doubles.step,points:[n].concat(e.doubles.points.map(i))},naf:e.naf&&{wnd:e.naf.wnd,points:[n].concat(e.naf.points.map(i))}}),n;function i(e){return t.point(e[0],e[1],r)}},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(e){var t;return this.inf?e:e.inf?this:this.eq(e)?this.dbl():this.neg().eq(e)||0===this.x.cmp(e.x)?this.curve.point(null,null):(e=(t=0!==(t=this.y.redSub(e.y)).cmpn(0)?t.redMul(this.x.redSub(e.x).redInvm()):t).redSqr().redISub(this.x).redISub(e.x),t=t.redMul(this.x.redSub(e)).redISub(this.y),this.curve.point(e,t))},f.prototype.dbl=function(){var e,t,r;return this.inf?this:0===(r=this.y.redAdd(this.y)).cmpn(0)?this.curve.point(null,null):(t=this.curve.a,e=this.x.redSqr(),r=r.redInvm(),t=(e=e.redAdd(e).redIAdd(e).redIAdd(t).redMul(r)).redSqr().redISub(this.x.redAdd(this.x)),r=e.redMul(this.x.redSub(t)).redISub(this.y),this.curve.point(t,r))},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new v(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){t=[this,t],e=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(t,e):this.curve._wnafMulAdd(1,t,e,2)},f.prototype.jmulAdd=function(e,t,r){t=[this,t],e=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(t,e,!0):this.curve._wnafMulAdd(1,t,e,2,!0)},f.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},f.prototype.neg=function(e){var t,r;return this.inf?this:(t=this.curve.point(this.x,this.y.redNeg()),e&&this.precomputed&&(e=this.precomputed,r=function(e){return e.neg()},t.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}),t)},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i(u,o.BasePoint),s.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){var e,t,r;return this.isInfinity()?this.curve.point(null,null):(r=(e=this.z.redInvm()).redSqr(),t=this.x.redMul(r),r=this.y.redMul(r).redMul(e),this.curve.point(t,r))},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){var t,r,n,i,o,a;return this.isInfinity()?e:e.isInfinity()?this:(t=e.z.redSqr(),o=this.z.redSqr(),a=this.x.redMul(t),r=e.x.redMul(o),t=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(o.redMul(this.z)),r=a.redSub(r),o=t.redSub(o),0===r.cmpn(0)?0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(n=(i=r.redSqr()).redMul(r),a=a.redMul(i),i=o.redSqr().redIAdd(n).redISub(a).redISub(a),o=o.redMul(a.redISub(i)).redISub(t.redMul(n)),a=this.z.redMul(e.z).redMul(r),this.curve.jpoint(i,o,a)))},u.prototype.mixedAdd=function(e){var t,r,n,i,o;return this.isInfinity()?e.toJ():e.isInfinity()?this:(r=this.z.redSqr(),o=this.x,i=e.x.redMul(r),t=this.y,e=e.y.redMul(r).redMul(this.z),r=o.redSub(i),i=t.redSub(e),0===r.cmpn(0)?0!==i.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(n=(e=r.redSqr()).redMul(r),o=o.redMul(e),e=i.redSqr().redIAdd(n).redISub(o).redISub(o),i=i.redMul(o.redISub(e)).redISub(t.redMul(n)),o=this.z.redMul(r),this.curve.jpoint(e,i,o)))},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,f=s.redSqr().redSqr(),u=a.redAdd(a);for(r=0;r<e;r++){var c=o.redSqr(),h=u.redSqr(),d=h.redSqr(),c=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(f)),h=o.redMul(h),l=c.redSqr().redISub(h.redAdd(h)),h=h.redISub(l),c=(c=c.redMul(h)).redIAdd(c).redISub(d),h=u.redMul(s);r+1<e&&(f=f.redMul(d)),o=l,s=h,u=c}return this.curve.jpoint(o,u.redMul(i),s)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,r,n,i,o=this.zOne?(t=this.x.redSqr(),r=(e=this.y.redSqr()).redSqr(),e=(e=this.x.redAdd(e).redSqr().redISub(t).redISub(r)).redIAdd(e),n=(t=t.redAdd(t).redIAdd(t)).redSqr().redISub(e).redISub(e),r=(r=(r=r.redIAdd(r)).redIAdd(r)).redIAdd(r),e=t.redMul(e.redISub(t=n)).redISub(r),this.y.redAdd(this.y)):(n=this.x.redSqr(),i=(r=this.y.redSqr()).redSqr(),r=(r=this.x.redAdd(r).redSqr().redISub(n).redISub(i)).redIAdd(r),o=(n=n.redAdd(n).redIAdd(n)).redSqr(),i=(i=(i=i.redIAdd(i)).redIAdd(i)).redIAdd(i),t=o.redISub(r).redISub(r),e=n.redMul(r.redISub(t)).redISub(i),(o=this.y.redMul(this.z)).redIAdd(o));return this.curve.jpoint(t,e,o)},u.prototype._threeDbl=function(){var e,t,r,n,i,o,a,s;return this.zOne?(t=this.x.redSqr(),i=(e=this.y.redSqr()).redSqr(),e=(e=this.x.redAdd(e).redSqr().redISub(t).redISub(i)).redIAdd(e),r=n=(t=t.redAdd(t).redIAdd(t).redIAdd(this.curve.a)).redSqr().redISub(e).redISub(e),i=(i=(i=i.redIAdd(i)).redIAdd(i)).redIAdd(i),t=t.redMul(e.redISub(n)).redISub(i),e=this.y.redAdd(this.y)):(n=this.z.redSqr(),i=this.y.redSqr(),a=this.x.redMul(i),o=(o=this.x.redSub(n).redMul(this.x.redAdd(n))).redAdd(o).redIAdd(o),s=(a=(a=a.redIAdd(a)).redIAdd(a)).redAdd(a),r=o.redSqr().redISub(s),e=this.y.redAdd(this.z).redSqr().redISub(i).redISub(n),s=(s=(s=(s=i.redSqr()).redIAdd(s)).redIAdd(s)).redIAdd(s),t=o.redMul(a.redISub(r)).redISub(s)),this.curve.jpoint(r,t,e)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),o=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),e=t.redAdd(t),i=(e=e.redIAdd(e)).redMul(a),t=o.redSqr().redISub(i.redAdd(i)),e=i.redISub(t),i=a.redSqr(),a=(i=(i=(i=i.redIAdd(i)).redIAdd(i)).redIAdd(i),o.redMul(e).redISub(i)),o=r.redAdd(r).redMul(n);return this.curve.jpoint(t,a,o)},u.prototype.trpl=function(){var e,t,r,n,i,o,a;return this.curve.zeroA?(t=this.x.redSqr(),i=this.y.redSqr(),e=this.z.redSqr(),a=i.redSqr(),o=(n=t.redAdd(t).redIAdd(t)).redSqr(),r=(t=(t=(t=(t=this.x.redAdd(i).redSqr().redISub(t).redISub(a)).redIAdd(t)).redAdd(t).redIAdd(t)).redISub(o)).redSqr(),a=(a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a)).redIAdd(a),n=n.redIAdd(t).redSqr().redISub(o).redISub(r).redISub(a),o=(o=(o=i.redMul(n)).redIAdd(o)).redIAdd(o),i=(i=(i=this.x.redMul(r).redISub(o)).redIAdd(i)).redIAdd(i),o=(o=(o=(o=this.y.redMul(n.redMul(a.redISub(n)).redISub(t.redMul(r)))).redIAdd(o)).redIAdd(o)).redIAdd(o),a=this.z.redAdd(t).redSqr().redISub(e).redISub(r),this.curve.jpoint(i,o,a)):this.dbl().add(this)},u.prototype.mul=function(e,t){return e=new v(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){var t,r;return"affine"===e.type?this.eq(e.toJ()):this===e||(t=this.z.redSqr(),r=e.z.redSqr(),0===this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)&&(t=t.redMul(this.z),r=r.redMul(e.z),0===this.y.redMul(r).redISub(e.y.redMul(t)).cmpn(0)))},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),0<=n.cmp(this.curve.p))return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":94,"./base":81,"bn.js":95,inherits:137}],86:[function(e,t,r){var n,i=r,r=e("hash.js"),o=e("./curve"),a=e("./utils").assert;function s(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(t,r){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var e=new s(r);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:e}),e}})}i.PresetCurve=s,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=e("./precomputed/secp256k1")}catch(e){n=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"./curve":83,"./precomputed/secp256k1":93,"./utils":94,"hash.js":122}],87:[function(e,t,r){var l=e("bn.js"),p=e("hmac-drbg"),n=e("../utils"),i=e("../curves"),o=e("brorand"),b=n.assert,a=e("./key"),y=e("./signature");function s(e){if(!(this instanceof s))return new s(e);"string"==typeof e&&(b(Object.prototype.hasOwnProperty.call(i,e),"Unknown curve "+e),e=i[e]),e instanceof i.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}(t.exports=s).prototype.keyPair=function(e){return new a(this,e)},s.prototype.keyFromPrivate=function(e,t){return a.fromPrivate(this,e,t)},s.prototype.keyFromPublic=function(e,t){return a.fromPublic(this,e,t)},s.prototype.genKeyPair=function(e){for(var t=new p({hash:this.hash,pers:(e=e||{}).pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new l(2));;){var i=new l(t.generate(r));if(!(0<i.cmp(n)))return i.iaddn(1),this.keyFromPrivate(i)}},s.prototype._truncateToN=function(e,t,r){l.isBN(e)||"number"==typeof e?n=(e=new l(e,16)).byteLength():e="object"==typeof e?(n=e.length,new l(e,16)):(n=(i=e.toString()).length+1>>>1,new l(i,16));var n,i=(r="number"!=typeof r?8*n:r)-this.n.bitLength();return 0<i&&(e=e.ushrn(i)),!t&&0<=e.cmp(this.n)?e.sub(this.n):e},s.prototype.sign=function(e,t,r,n){if("object"==typeof r&&(n=r,r=null),n=n||{},"string"!=typeof e&&"number"!=typeof e&&!l.isBN(e)){b("object"==typeof e&&e&&"number"==typeof e.length,"Expected message to be an array-like, a hex string, or a BN instance"),b(e.length>>>0===e.length);for(var i=0;i<e.length;i++)b((255&e[i])===e[i])}t=this.keyFromPrivate(t,r),e=this._truncateToN(e,!1,n.msgBitLength),b(!e.isNeg(),"Can not sign a negative message");for(var r=this.n.byteLength(),o=t.getPrivate().toArray("be",r),r=e.toArray("be",r),a=(b(new l(r).eq(e),"Can not sign message"),new p({hash:this.hash,entropy:o,nonce:r,pers:n.pers,persEnc:n.persEnc||"utf8"})),s=this.n.sub(new l(1)),f=0;;f++){var u=n.k?n.k(f):new l(a.generate(this.n.byteLength())),u=this._truncateToN(u,!0);if(!(u.cmpn(1)<=0||0<=u.cmp(s))){var c=this.g.mul(u);if(!c.isInfinity()){var h=c.getX(),d=h.umod(this.n);if(0!==d.cmpn(0)){u=(u=u.invm(this.n).mul(d.mul(t.getPrivate()).iadd(e))).umod(this.n);if(0!==u.cmpn(0))return c=(c.getY().isOdd()?1:0)|(0!==h.cmp(d)?2:0),n.canonical&&0<u.cmp(this.nh)&&(u=this.n.sub(u),c^=1),new y({r:d,s:u,recoveryParam:c})}}}}},s.prototype.verify=function(e,t,r,n,i){e=this._truncateToN(e,!1,(i=i||{}).msgBitLength),r=this.keyFromPublic(r,n);var o,i=(t=new y(t,"hex")).r,n=t.s;return!(i.cmpn(1)<0||0<=i.cmp(this.n)||n.cmpn(1)<0||0<=n.cmp(this.n))&&(n=(t=n.invm(this.n)).mul(e).umod(this.n),e=t.mul(i).umod(this.n),this.curve._maxwellTrick?!(o=this.g.jmulAdd(n,r.getPublic(),e)).isInfinity()&&o.eqXToP(i):!(o=this.g.mulAdd(n,r.getPublic(),e)).isInfinity()&&0===o.getX().umod(this.n).cmp(i))},s.prototype.recoverPubKey=function(e,t,r,n){b((3&r)===r,"The recovery param is more than two bits"),t=new y(t,n);var n=this.n,e=new l(e),i=t.r,o=t.s,a=1&r,r=r>>1;if(0<=i.cmp(this.curve.p.umod(this.curve.n))&&r)throw new Error("Unable to find sencond key candinate");i=r?this.curve.pointFromX(i.add(this.curve.n),a):this.curve.pointFromX(i,a),r=t.r.invm(n),a=n.sub(e).mul(r).umod(n),t=o.mul(r).umod(n);return this.g.mulAdd(a,i,t)},s.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new y(t,n)).recoveryParam)return t.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")}},{"../curves":86,"../utils":94,"./key":88,"./signature":89,"bn.js":95,brorand:19,"hmac-drbg":135}],88:[function(e,t,r){var n=e("bn.js"),i=e("../utils").assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}(t.exports=o).fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){e.x||e.y?("mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y)):this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t,r){return this.ec.verify(e,t,this,void 0,r)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":94,"bn.js":95}],89:[function(e,t,r){var i=e("bn.js"),o=e("../utils"),n=o.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(n(e.r&&e.s,"Signature without r or s"),this.r=new i(e.r,16),this.s=new i(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0==n||4<n)return!1;if(0===e[t.place])return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i=((i<<=8)|e[a])>>>0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function c(e,t){if(!(t<128)){var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255)}e.push(t)}(t.exports=a).prototype._importDER=function(e,t){e=o.toArray(e,t);t=new s;if(48!==e[t.place++])return!1;var r=f(e,t);if(!1===r)return!1;if(r+t.place!==e.length)return!1;if(2!==e[t.place++])return!1;r=f(e,t);if(!1===r)return!1;if(0!=(128&e[t.place]))return!1;var n=e.slice(t.place,r+t.place);if(t.place+=r,2!==e[t.place++])return!1;r=f(e,t);if(!1===r)return!1;if(e.length!==r+t.place)return!1;if(0!=(128&e[t.place]))return!1;e=e.slice(t.place,r+t.place);if(0===n[0]){if(!(128&n[1]))return!1;n=n.slice(1)}if(0===e[0]){if(!(128&e[1]))return!1;e=e.slice(1)}return this.r=new i(n),this.s=new i(e),!(this.recoveryParam=null)},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2],t=(c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length),n.concat(r)),n=[48];return c(n,t.length),n=n.concat(t),o.encode(n,e)}},{"../utils":94,"bn.js":95}],90:[function(e,t,r){var n=e("hash.js"),i=e("../curves"),o=e("../utils"),a=o.assert,s=o.parseBytes,f=e("./key"),u=e("./signature");function c(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}(t.exports=c).prototype.sign=function(e,t){e=s(e);var t=this.keyFromSecret(t),r=this.hashInt(t.messagePrefix(),e),n=this.g.mul(r),i=this.encodePoint(n),e=this.hashInt(i,t.pubBytes(),e).mul(t.priv()),t=r.add(e).umod(this.curve.n);return this.makeSignature({R:n,S:t,Rencoded:i})},c.prototype.verify=function(e,t,r){var n;return e=s(e),!(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)&&!t.S().isNeg()&&(r=this.keyFromPublic(r),e=this.hashInt(t.Rencoded(),r.pubBytes(),e),n=this.g.mul(t.S()),t.R().add(r.pub().mul(e)).eq(n))},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(e){return f.fromPublic(this,e)},c.prototype.keyFromSecret=function(e){return f.fromSecret(this,e)},c.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},c.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},c.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),e=0!=(128&e[t]),t=o.intFromLE(r);return this.curve.pointFromY(t,e)},c.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(e){return o.intFromLE(e)},c.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../curves":86,"../utils":94,"./key":91,"./signature":92,"hash.js":122}],91:[function(e,t,r){var n=e("../utils"),i=n.assert,o=n.parseBytes,e=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},e(a,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),e(a,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),e(a,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,t=t.slice(0,e.encodingLength);return t[0]&=248,t[r]&=127,t[r]|=64,t}),e(a,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),e(a,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),e(a,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},t.exports=a},{"../utils":94}],92:[function(e,t,r){var n=e("bn.js"),i=e("../utils"),o=i.assert,e=i.cachedProperty,a=i.parseBytes;function s(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(o(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}e(s,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),e(s,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),e(s,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),e(s,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=s},{"../utils":94,"bn.js":95}],93:[function(e,t,r){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],94:[function(e,t,r){var n=r,i=e("bn.js"),r=e("minimalistic-assert"),e=e("minimalistic-crypto-utils");n.assert=r,n.toArray=e.toArray,n.zero2=e.zero2,n.toHex=e.toHex,n.encode=e.encode,n.getNAF=function(e,t,r){for(var n=new Array(Math.max(e.bitLength(),r)+1),i=0;i<n.length;i+=1)n[i]=0;var o=1<<t+1,a=e.clone();for(i=0;i<n.length;i++){var s,f=a.andln(o-1);a.isOdd()?a.isubn(s=(o>>1)-1<f?(o>>1)-f:f):s=0,n[i]=s,a.iushrn(1)}return n},n.getJSF=function(e,t){for(var r,n=[[],[]],i=(e=e.clone(),t=t.clone(),0),o=0;0<e.cmpn(-i)||0<t.cmpn(-o);){var a,s=e.andln(3)+i&3,f=t.andln(3)+o&3;3===f&&(f=-1),a=0==(1&(s=3===s?-1:s))?0:3!==(r=e.andln(7)+i&7)&&5!==r||2!==f?s:-s,n[0].push(a),s=0==(1&f)?0:3!==(r=t.andln(7)+o&7)&&5!==r||2!==s?f:-f,n[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},{"bn.js":95,"minimalistic-assert":152,"minimalistic-crypto-utils":153}],95:[function(e,t,r){arguments[4][15][0].apply(r,arguments)},{buffer:20,dup:15}],96:[function(e,t,r){t.exports={name:"elliptic",version:"6.6.1",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}},{}],97:[function(e,t,r){var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}t.exports=n},{}],98:[function(e,t,r){t.exports=EvalError},{}],99:[function(e,t,r){t.exports=Error},{}],100:[function(e,t,r){t.exports=RangeError},{}],101:[function(e,t,r){t.exports=ReferenceError},{}],102:[function(e,t,r){t.exports=SyntaxError},{}],103:[function(e,t,r){t.exports=TypeError},{}],104:[function(e,t,r){t.exports=URIError},{}],105:[function(e,t,r){t.exports=Object},{}],106:[function(e,t,r){var n="object"==typeof Reflect?Reflect:null,f=n&&"function"==typeof n.apply?n.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};var i=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(s,f){return new Promise(function(e,t){function r(e){s.removeListener(f,n),t(e)}function n(){"function"==typeof s.removeListener&&s.removeListener("error",r),e([].slice.call(arguments))}var i,o,a;y(s,f,n,{once:!0}),"error"!==f&&(o=r,a={once:!0},"function"==typeof(i=s).on)&&y(i,"error",o,a)})},(a.EventEmitter=a).prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function h(e,t,r,n){var i,o;return u(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener||r),i=e._events),o=i[t]),void 0===o?(o=i[t]=r,++e._eventsCount):("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),0<(i=c(e))&&o.length>i&&!o.warned&&(o.warned=!0,(n=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",n.emitter=e,n.type=t,n.count=o.length,r=n,console)&&console.warn&&console.warn(r)),e}function d(e,t,r){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},t=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(e);return t.listener=r,e.wrapFn=t}function l(e,t,r){e=e._events;if(void 0===e)return[];e=e[t];if(void 0===e)return[];if("function"==typeof e)return r?[e.listener||e]:[e];if(r){for(var n=e,i=new Array(n.length),o=0;o<i.length;++o)i[o]=n[o].listener||n[o];return i}return b(e,e.length)}function p(e){var t=this._events;if(void 0!==t){t=t[e];if("function"==typeof t)return 1;if(void 0!==t)return t.length}return 0}function b(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(r,n,i,o){if("function"==typeof r.on)o.once?r.once(n,i):r.on(n,i);else{if("function"!=typeof r.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r);r.addEventListener(n,function e(t){o.once&&r.removeEventListener(n,e),i(t)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){if((o=0<t.length?t[0]:o)instanceof Error)throw o;n=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw n.context=o,n}var o=i[e];if(void 0===o)return!1;if("function"==typeof o)f(o,this,t);else for(var a=o.length,s=b(o,a),r=0;r<a;++r)f(s[r],this,t);return!0},a.prototype.on=a.prototype.addListener=function(e,t){return h(this,e,t,!1)},a.prototype.prependListener=function(e,t){return h(this,e,t,!0)},a.prototype.once=function(e,t){return u(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,d(this,e,t)),this},a.prototype.off=a.prototype.removeListener=function(e,t){var r,n,i,o,a;if(u(t),void 0!==(n=this._events)&&void 0!==(r=n[e]))if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;0<=o;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;if(0===i)r.shift();else{for(var s=r,f=i;f+1<s.length;f++)s[f]=s[f+1];s.pop()}1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.removeAllListeners=function(e){var t,r=this._events;if(void 0!==r)if(void 0===r.removeListener)0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]);else if(0===arguments.length){for(var n,i=Object.keys(r),o=0;o<i.length;++o)"removeListener"!==(n=i[o])&&this.removeAllListeners(n);this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0}else if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(o=t.length-1;0<=o;o--)this.removeListener(e,t[o]);return this},a.prototype.listeners=function(e){return l(this,e,!0)},a.prototype.rawListeners=function(e){return l(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return 0<this._eventsCount?i(this._events):[]}},{}],107:[function(e,t,r){var h=e("safe-buffer").Buffer,d=e("md5.js");t.exports=function(e,t,r,n){if(h.isBuffer(e)||(e=h.from(e,"binary")),t&&8!==(t=h.isBuffer(t)?t:h.from(t,"binary")).length)throw new RangeError("salt should be Buffer with 8 byte length");for(var i=r/8,o=h.alloc(i),a=h.alloc(n||0),s=h.alloc(0);0<i||0<n;){var f,u,c=new d,c=(c.update(s),c.update(e),t&&c.update(t),s=c.digest(),0);0<i&&(f=o.length-i,c=Math.min(i,s.length),s.copy(o,f,0,c),i-=c),c<s.length&&0<n&&(f=a.length-n,u=Math.min(n,s.length-c),s.copy(a,f,c,c+u),n-=u)}return s.fill(0),{key:o,iv:a}}},{"md5.js":149,"safe-buffer":191}],108:[function(e,t,r){var g=e("is-callable"),v=Object.prototype.toString,_=Object.prototype.hasOwnProperty;t.exports=function(e,t,r){if(!g(t))throw new TypeError("iterator must be a function");var n;if(3<=arguments.length&&(n=r),r=e,"[object Array]"===v.call(r))for(var i=e,o=t,a=n,s=0,f=i.length;s<f;s++)_.call(i,s)&&(null==a?o(i[s],s,i):o.call(a,i[s],s,i));else if("string"==typeof e)for(var u=e,c=t,h=n,d=0,l=u.length;d<l;d++)null==h?c(u.charAt(d),d,u):c.call(h,u.charAt(d),d,u);else{var p,b=e,y=t,m=n;for(p in b)_.call(b,p)&&(null==m?y(b[p],p,b):y.call(m,b[p],p,b))}}},{"is-callable":138}],109:[function(e,t,r){function f(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r}var u=Object.prototype.toString,c=Math.max;t.exports=function(t){var r=this;if("function"!=typeof r||"[object Function]"!==u.apply(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var n,e,i=((e,t)=>{for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r})(arguments,1),o=c(0,r.length-i.length),a=[],s=0;s<o;s++)a[s]="$"+s;return n=Function("binder","return function ("+((e,t)=>{for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r})(a,",")+"){ return binder.apply(this,arguments); }")(function(){var e;return this instanceof n?(e=r.apply(this,f(i,arguments)),Object(e)===e?e:this):r.apply(t,f(i,arguments))}),r.prototype&&((e=function(){}).prototype=r.prototype,n.prototype=new e,e.prototype=null),n}},{}],110:[function(e,t,r){e=e("./implementation");t.exports=Function.prototype.bind||e},{"./implementation":109}],111:[function(e,t,L){function r(){throw new l}var n,i=e("es-object-atoms"),o=e("es-errors"),a=e("es-errors/eval"),s=e("es-errors/range"),f=e("es-errors/ref"),d=e("es-errors/syntax"),l=e("es-errors/type"),u=e("es-errors/uri"),c=e("math-intrinsics/abs"),h=e("math-intrinsics/floor"),p=e("math-intrinsics/max"),b=e("math-intrinsics/min"),y=e("math-intrinsics/pow"),m=e("math-intrinsics/round"),g=e("math-intrinsics/sign"),v=Function,_=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},w=e("gopd"),M=e("es-define-property"),S=w?function(){try{return r}catch(e){try{return w(arguments,"callee").get}catch(e){return r}}}():r,A=e("has-symbols")(),k=e("get-proto"),E=e("get-proto/Object.getPrototypeOf"),D=e("get-proto/Reflect.getPrototypeOf"),x=e("call-bind-apply-helpers/functionApply"),P=e("call-bind-apply-helpers/functionCall"),j={},U="undefined"!=typeof Uint8Array&&k?k(Uint8Array):n,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":A&&k?k([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":j,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&k?k(k([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&A&&k?k((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":f,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&A&&k?k((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&k?k(""[Symbol.iterator]()):n,"%Symbol%":A?Symbol:n,"%SyntaxError%":d,"%ThrowTypeError%":S,"%TypedArray%":U,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":P,"%Function.prototype.apply%":x,"%Object.defineProperty%":M,"%Object.getPrototypeOf%":E,"%Math.abs%":c,"%Math.floor%":h,"%Math.max%":p,"%Math.min%":b,"%Math.pow%":y,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":D};if(k)try{null.error}catch(e){o=k(k(e));R["%Error.prototype%"]=o}function O(e){var t,r;return"%AsyncFunction%"===e?t=_("async function () {}"):"%GeneratorFunction%"===e?t=_("function* () {}"):"%AsyncGeneratorFunction%"===e?t=_("async function* () {}"):"%AsyncGenerator%"===e?(r=O("%AsyncGeneratorFunction%"))&&(t=r.prototype):"%AsyncIteratorPrototype%"===e&&(r=O("%AsyncGenerator%"))&&k&&(t=k(r.prototype)),R[e]=t}var I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},a=e("function-bind"),T=e("hasown"),N=a.call(P,Array.prototype.concat),q=a.call(x,Array.prototype.splice),B=a.call(P,String.prototype.replace),C=a.call(P,String.prototype.slice),z=a.call(P,RegExp.prototype.exec),F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g;t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new d("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=(e=>{var t=C(e,0,1),r=C(e,-1);if("%"===t&&"%"!==r)throw new d("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new d("invalid intrinsic syntax, expected opening `%`");var i=[];return B(e,F,function(e,t,r,n){i[i.length]=r?B(n,H,"$1"):t||e}),i})(e),n=0<r.length?r[0]:"",i=((e,t)=>{var r,n=e;if(T(I,n)&&(n="%"+(r=I[n])[0]+"%"),T(R,n)){var i=R[n];if(void 0!==(i=i===j?O(n):i)||t)return{alias:r,name:n,value:i};throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new d("intrinsic "+e+" does not exist!")})("%"+n+"%",t),o=(i.name,i.value),a=!1,i=i.alias;i&&(n=i[0],q(r,N([0,1],i)));for(var s=1,f=!0;s<r.length;s+=1){var u=r[s],c=C(u,0,1),h=C(u,-1);if(('"'===c||"'"===c||"`"===c||'"'===h||"'"===h||"`"===h)&&c!==h)throw new d("property names with quotes must have matching quotes");if("constructor"!==u&&f||(a=!0),T(R,c="%"+(n+="."+u)+"%"))o=R[c];else if(null!=o){if(!(u in o)){if(t)return;throw new l("base intrinsic for "+e+" exists, but the property is not available.")}o=w&&s+1>=r.length?(f=!!(h=w(o,u)))&&"get"in h&&!("originalValue"in h.get)?h.get:o[u]:(f=T(o,u),o[u]),f&&!a&&(R[c]=o)}}return o}},{"call-bind-apply-helpers/functionApply":52,"call-bind-apply-helpers/functionCall":53,"es-define-property":97,"es-errors":99,"es-errors/eval":98,"es-errors/range":100,"es-errors/ref":101,"es-errors/syntax":102,"es-errors/type":103,"es-errors/uri":104,"es-object-atoms":105,"function-bind":110,"get-proto":114,"get-proto/Object.getPrototypeOf":112,"get-proto/Reflect.getPrototypeOf":113,gopd:116,"has-symbols":118,hasown:134,"math-intrinsics/abs":141,"math-intrinsics/floor":142,"math-intrinsics/max":144,"math-intrinsics/min":145,"math-intrinsics/pow":146,"math-intrinsics/round":147,"math-intrinsics/sign":148}],112:[function(e,t,r){e=e("es-object-atoms");t.exports=e.getPrototypeOf||null},{"es-object-atoms":105}],113:[function(e,t,r){t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},{}],114:[function(e,t,r){var n=e("./Reflect.getPrototypeOf"),i=e("./Object.getPrototypeOf"),o=e("dunder-proto/get");t.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return i(e)}:o?function(e){return o(e)}:null},{"./Object.getPrototypeOf":112,"./Reflect.getPrototypeOf":113,"dunder-proto/get":79}],115:[function(e,t,r){t.exports=Object.getOwnPropertyDescriptor},{}],116:[function(t,e,r){t=t("./gOPD");if(t)try{t([],"length")}catch(e){t=null}e.exports=t},{"./gOPD":115}],117:[function(e,t,r){function n(){return!!i}var i=e("es-define-property");n.hasArrayLengthDefineBug=function(){if(!i)return null;try{return 1!==i([],"length",{value:1}).length}catch(e){return!0}},t.exports=n},{"es-define-property":97}],118:[function(e,t,r){var n="undefined"!=typeof Symbol&&Symbol,i=e("./shams");t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},{"./shams":119}],119:[function(e,t,r){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"!=typeof Symbol.iterator){var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){r=Object.getOwnPropertyDescriptor(e,t);if(42!==r.value||!0!==r.enumerable)return!1}}return!0}},{}],120:[function(e,t,r){var n=e("has-symbols/shams");t.exports=function(){return n()&&!!Symbol.toStringTag}},{"has-symbols/shams":119}],121:[function(e,t,r){var s=e("safe-buffer").Buffer,n=e("stream").Transform;function i(e){n.call(this),this._block=s.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(i,n),i.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},i.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)};var f="undefined"!=typeof Uint8Array,u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(s.prototype instanceof Uint8Array||s.TYPED_ARRAY_SUPPORT);i.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");e=((e,t)=>{if(e instanceof s)return e;if("string"==typeof e)return s.from(e,t);if(u&&ArrayBuffer.isView(e)){if(0===e.byteLength)return s.alloc(0);t=s.from(e.buffer,e.byteOffset,e.byteLength);if(t.byteLength===e.byteLength)return t}if(f&&e instanceof Uint8Array)return s.from(e);if(s.isBuffer(e)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return s.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')})(e,t);for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];for(var o=0,a=8*e.length;0<a;++o)this._length[o]+=a,0<(a=this._length[o]/4294967296|0)&&(this._length[o]-=4294967296*a);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0);for(var r=this._blockOffset=0;r<4;++r)this._length[r]=0;return t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i},{inherits:137,"safe-buffer":191,stream:201}],122:[function(e,t,r){r.utils=e("./hash/utils"),r.common=e("./hash/common"),r.sha=e("./hash/sha"),r.ripemd=e("./hash/ripemd"),r.hmac=e("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},{"./hash/common":123,"./hash/hmac":124,"./hash/ripemd":125,"./hash/sha":126,"./hash/utils":133}],123:[function(e,t,r){var n=e("./utils"),i=e("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}(r.BlockHash=o).prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){t=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-t,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-t,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},{"./utils":133,"minimalistic-assert":152}],124:[function(e,t,r){var n=e("./utils"),i=e("minimalistic-assert");function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}(t.exports=o).prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"./utils":133,"minimalistic-assert":152}],125:[function(e,t,r){var n=e("./utils"),e=e("./common"),b=n.rotl32,y=n.sum32,m=n.sum32_3,g=n.sum32_4,i=e.BlockHash;function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function v(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}n.inherits(o,i),(r.ripemd160=o).blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,t){for(var r,n=c=this.h[0],i=p=this.h[1],o=l=this.h[2],a=d=this.h[3],s=h=this.h[4],f=0;f<80;f++)var u=y(b(g(c,v(f,p,l,d),e[_[f]+t],(r=f)<=15?0:r<=31?1518500249:r<=47?1859775393:r<=63?2400959708:2840853838),M[f]),h),c=h,h=d,d=b(l,10),l=p,p=u,u=y(b(g(n,v(79-f,i,o,a),e[w[f]+t],(r=f)<=15?1352829926:r<=31?1548603684:r<=47?1836072691:r<=63?2053994217:0),S[f]),s),n=s,s=a,a=b(o,10),o=i,i=u;u=m(this.h[1],l,a),this.h[1]=m(this.h[2],d,s),this.h[2]=m(this.h[3],h,n),this.h[3]=m(this.h[4],c,i),this.h[4]=m(this.h[0],p,o),this.h[0]=u},o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var _=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],S=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":123,"./utils":133}],126:[function(e,t,r){r.sha1=e("./sha/1"),r.sha224=e("./sha/224"),r.sha256=e("./sha/256"),r.sha384=e("./sha/384"),r.sha512=e("./sha/512")},{"./sha/1":127,"./sha/224":128,"./sha/256":129,"./sha/384":130,"./sha/512":131}],127:[function(e,t,r){var n=e("../utils"),i=e("../common"),e=e("./common"),c=n.rotl32,h=n.sum32,d=n.sum32_5,l=e.ft_1,o=i.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(a,o),(t.exports=a).blockSize=512,a.outSize=160,a.hmacStrength=80,a.padLength=64,a.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=c(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);for(var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],f=this.h[4],n=0;n<r.length;n++)var u=~~(n/20),u=d(c(i,5),l(u,o,a,s),f,r[n],p[u]),f=s,s=a,a=c(o,30),o=i,i=u;this.h[0]=h(this.h[0],i),this.h[1]=h(this.h[1],o),this.h[2]=h(this.h[2],a),this.h[3]=h(this.h[3],s),this.h[4]=h(this.h[4],f)},a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":123,"../utils":133,"./common":132}],128:[function(e,t,r){var n=e("../utils"),i=e("./256");function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),(t.exports=o).blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},{"../utils":133,"./256":129}],129:[function(e,t,r){var n=e("../utils"),i=e("../common"),o=e("./common"),p=e("minimalistic-assert"),b=n.sum32,y=n.sum32_4,m=n.sum32_5,g=o.ch32,v=o.maj32,_=o.s0_256,w=o.s1_256,M=o.g0_256,S=o.g1_256,a=i.BlockHash,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function f(){if(!(this instanceof f))return new f;a.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=s,this.W=new Array(64)}n.inherits(f,a),(t.exports=f).blockSize=512,f.outSize=256,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=y(S(r[n-2]),r[n-7],M(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],f=this.h[4],u=this.h[5],c=this.h[6],h=this.h[7];for(p(this.k.length===r.length),n=0;n<r.length;n++)var d=m(h,w(f),g(f,u,c),this.k[n],r[n]),l=b(_(i),v(i,o,a)),h=c,c=u,u=f,f=b(s,d),s=a,a=o,o=i,i=b(d,l);this.h[0]=b(this.h[0],i),this.h[1]=b(this.h[1],o),this.h[2]=b(this.h[2],a),this.h[3]=b(this.h[3],s),this.h[4]=b(this.h[4],f),this.h[5]=b(this.h[5],u),this.h[6]=b(this.h[6],c),this.h[7]=b(this.h[7],h)},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":123,"../utils":133,"./common":132,"minimalistic-assert":152}],130:[function(e,t,r){var n=e("../utils"),i=e("./512");function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),(t.exports=o).blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},{"../utils":133,"./512":131}],131:[function(e,t,r){var n=e("../utils"),i=e("../common"),O=e("minimalistic-assert"),I=n.rotr64_hi,T=n.rotr64_lo,d=n.shr64_hi,l=n.shr64_lo,B=n.sum64,C=n.sum64_hi,L=n.sum64_lo,p=n.sum64_4_hi,b=n.sum64_4_lo,D=n.sum64_5_hi,U=n.sum64_5_lo,o=i.BlockHash,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function s(){if(!(this instanceof s))return new s;o.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=a,this.W=new Array(160)}n.inherits(s,o),(t.exports=s).blockSize=1024,s.outSize=512,s.hmacStrength=192,s.padLength=128,s.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=((e,t)=>{var r=I(e,t,19),n=I(t,e,29),e=d(e,t,6);return(t=r^n^e)<0&&(t+=4294967296),t})(r[n-4],r[n-3]),o=((e,t)=>{var r=T(e,t,19),n=T(t,e,29),e=l(e,t,6);return(t=r^n^e)<0&&(t+=4294967296),t})(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],f=((e,t)=>{var r=I(e,t,1),n=I(e,t,8),e=d(e,t,7);return(t=r^n^e)<0&&(t+=4294967296),t})(r[n-30],r[n-29]),u=((e,t)=>{var r=T(e,t,1),n=T(e,t,8),e=l(e,t,7);return(t=r^n^e)<0&&(t+=4294967296),t})(r[n-30],r[n-29]),c=r[n-32],h=r[n-31];r[n]=p(i,o,a,s,f,u,c,h),r[n+1]=b(i,o,a,s,f,u,c,h)}},s.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],f=this.h[5],u=this.h[6],c=this.h[7],h=this.h[8],d=this.h[9],l=this.h[10],p=this.h[11],b=this.h[12],y=this.h[13],m=this.h[14],g=this.h[15];O(this.k.length===r.length);for(var v=0;v<r.length;v+=2)var _=m,w=g,M=((e,t)=>{var r=I(e,t,14),n=I(e,t,18),t=I(t,e,9);return(e=r^n^t)<0&&(e+=4294967296),e})(h,d),S=((e,t)=>{var r=T(e,t,14),n=T(e,t,18),t=T(t,e,9);return(e=r^n^t)<0&&(e+=4294967296),e})(h,d),A=((e,t,r)=>((t=e&t^~e&r)<0&&(t+=4294967296),t))(h,l,b),k=((e,t,r)=>((t=e&t^~e&r)<0&&(t+=4294967296),t))(d,p,y),E=this.k[v],x=this.k[v+1],P=r[v],j=r[v+1],R=D(_,w,M,S,A,k,E,x,P,j),A=U(_,w,M,S,A,k,E,x,P,j),_=((e,t)=>{var r=I(e,t,28),n=I(t,e,2),t=I(t,e,7);return(e=r^n^t)<0&&(e+=4294967296),e})(n,i),w=((e,t)=>{var r=T(e,t,28),n=T(t,e,2),t=T(t,e,7);return(e=r^n^t)<0&&(e+=4294967296),e})(n,i),M=((e,t,r)=>((e=e&t^e&r^t&r)<0&&(e+=4294967296),e))(n,o,s),S=((e,t,r)=>((e=e&t^e&r^t&r)<0&&(e+=4294967296),e))(i,a,f),k=C(_,w,M,S),E=L(_,w,M,S),m=b,g=y,b=l,y=p,l=h,p=d,h=C(u,c,R,A),d=L(c,c,R,A),u=s,c=f,s=o,f=a,o=n,a=i,n=C(R,A,k,E),i=L(R,A,k,E);B(this.h,0,n,i),B(this.h,2,o,a),B(this.h,4,s,f),B(this.h,6,u,c),B(this.h,8,h,d),B(this.h,10,l,p),B(this.h,12,b,y),B(this.h,14,m,g)},s.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":123,"../utils":133,"minimalistic-assert":152}],132:[function(e,t,r){var n=e("../utils").rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}r.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?t^r^n:2===e?o(t,r,n):void 0},r.ch32=i,r.maj32=o,r.p32=a,r.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},r.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},r.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":133}],133:[function(e,t,r){var f=e("minimalistic-assert"),e=e("inherits");function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=e,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r,n,i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)i.push(parseInt(e[a]+e[a+1],16))}else for(var o=0,a=0;a<e.length;a++){var s=e.charCodeAt(a);s<128?i[o++]=s:s<2048?(i[o++]=s>>6|192,i[o++]=63&s|128):(n=a,55296!=(64512&(r=e).charCodeAt(n))||n<0||n+1>=r.length||56320!=(64512&r.charCodeAt(n+1))?i[o++]=s>>12|224:(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++a)),i[o++]=s>>18|240,i[o++]=s>>12&63|128),i[o++]=s>>6&63|128,i[o++]=63&s|128)}else for(a=0;a<e.length;a++)i[a]=0|e[a];return i},r.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t},r.htonl=o,r.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];r+=a((i="little"===t?o(i):i).toString(16))}return r},r.zero2=n,r.zero8=a,r.join32=function(e,t,r,n){f((r=r-t)%4==0);for(var i=new Array(r/4),o=0,a=t;o<i.length;o++,a+=4){var s="big"===n?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a];i[o]=s>>>0}return i},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<<t|e>>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0;e[t]=(o<n?1:0)+r+i>>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,o,a,s){var f=0;return e+r+i+a+((f+=(e=t+n>>>0)<t?1:0)+((e=e+o>>>0)<o?1:0)+(e+s>>>0<s?1:0))>>>0},r.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},r.sum64_5_hi=function(e,t,r,n,i,o,a,s,f,u){var c=0;return e+r+i+a+f+(c+((e=t+n>>>0)<t?1:0)+((e=e+o>>>0)<o?1:0)+((e=e+s>>>0)<s?1:0)+(e+u>>>0<u?1:0))>>>0},r.sum64_5_lo=function(e,t,r,n,i,o,a,s,f,u){return t+n+o+s+u>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:137,"minimalistic-assert":152}],134:[function(e,t,r){var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,e=e("function-bind");t.exports=e.call(n,i)},{"function-bind":110}],135:[function(e,t,r){var n=e("hash.js"),o=e("minimalistic-crypto-utils"),i=e("minimalistic-assert");function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),r=o.toArray(e.nonce,e.nonceEnc||"hex"),e=o.toArray(e.pers,e.persEnc||"hex");i(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,e)}(t.exports=a).prototype._init=function(e,t,r){e=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(e),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=o.toArray(e,t),r=o.toArray(r,n),i(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=o.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);n=i.slice(0,e);return this._update(r),this._reseed++,o.encode(n,t)}},{"hash.js":122,"minimalistic-assert":152,"minimalistic-crypto-utils":153}],136:[function(e,t,r){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,f=(1<<s)-1,u=f>>1,c=-7,h=r?i-1:0,d=r?-1:1,i=e[t+h];for(h+=d,o=i&(1<<-c)-1,i>>=-c,c+=s;0<c;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;0<c;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===f)return a?NaN:1/0*(i?-1:1);a+=Math.pow(2,n),o-=u}return(i?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,f=8*o-i-1,u=(1<<f)-1,c=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,l=n?1:-1,o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-a))<1&&(a--,n*=2),2<=(t+=1<=a+c?h/n:h*Math.pow(2,1-c))*n&&(a++,n/=2),u<=a+c?(s=0,a=u):1<=a+c?(s=(t*n-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));8<=i;e[r+d]=255&s,d+=l,s/=256,i-=8);for(a=a<<i|s,f+=i;0<f;e[r+d]=255&a,d+=l,a/=256,f-=8);e[r+d-l]|=128*o}},{}],137:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){var r;t&&(e.super_=t,(r=function(){}).prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e)}},{}],138:[function(e,t,r){var n,i,o=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},a(function(){throw 42},null,n)}catch(e){e!==i&&(a=null)}else a=null;function s(e){try{var t=o.call(e);return u.test(t)}catch(e){return}}function f(e){try{return s(e)?!1:(o.call(e),!0)}catch(e){return!1}}var u=/^\s*class\b/,c=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),l=function(){return!1};"object"==typeof document&&c.call(document.all)===c.call(document.all)&&(l=function(e){if(!(!d&&e||void 0!==e&&"object"!=typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1}),t.exports=a?function(e){if(l(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{a(e,null,n)}catch(e){if(e!==i)return!1}return!s(e)&&f(e)}:function(e){var t;return!!l(e)||!!e&&!("function"!=typeof e&&"object"!=typeof e||!h&&(s(e)||"[object Function]"!==(t=c.call(e))&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t)))&&f(e)}},{}],139:[function(e,t,r){var n=e("which-typed-array");t.exports=function(e){return!!n(e)}},{"which-typed-array":223}],140:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],141:[function(e,t,r){t.exports=Math.abs},{}],142:[function(e,t,r){t.exports=Math.floor},{}],143:[function(e,t,r){t.exports=Number.isNaN||function(e){return e!=e}},{}],144:[function(e,t,r){t.exports=Math.max},{}],145:[function(e,t,r){t.exports=Math.min},{}],146:[function(e,t,r){t.exports=Math.pow},{}],147:[function(e,t,r){t.exports=Math.round},{}],148:[function(e,t,r){var n=e("./isNaN");t.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},{"./isNaN":143}],149:[function(e,t,r){var n=e("inherits"),i=e("hash-base"),o=e("safe-buffer").Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<<t|e>>>32-t}function u(e,t,r,n,i,o,a){return f(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return f(e+(t&n|r&~n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return f(e+(t^r^n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return f(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=u(this._a,o=this._b,i=this._c,n=this._d,e[0],3614090360,7),n=u(n,r,o,i,e[1],3905402710,12),i=u(i,n,r,o,e[2],606105819,17),o=u(o,i,n,r,e[3],3250441966,22);r=u(r,o,i,n,e[4],4118548399,7),n=u(n,r,o,i,e[5],1200080426,12),i=u(i,n,r,o,e[6],2821735955,17),o=u(o,i,n,r,e[7],4249261313,22),r=u(r,o,i,n,e[8],1770035416,7),n=u(n,r,o,i,e[9],2336552879,12),i=u(i,n,r,o,e[10],4294925233,17),o=u(o,i,n,r,e[11],2304563134,22),r=u(r,o,i,n,e[12],1804603682,7),n=u(n,r,o,i,e[13],4254626195,12),i=u(i,n,r,o,e[14],2792965006,17),r=c(r,o=u(o,i,n,r,e[15],1236535329,22),i,n,e[1],4129170786,5),n=c(n,r,o,i,e[6],3225465664,9),i=c(i,n,r,o,e[11],643717713,14),o=c(o,i,n,r,e[0],3921069994,20),r=c(r,o,i,n,e[5],3593408605,5),n=c(n,r,o,i,e[10],38016083,9),i=c(i,n,r,o,e[15],3634488961,14),o=c(o,i,n,r,e[4],3889429448,20),r=c(r,o,i,n,e[9],568446438,5),n=c(n,r,o,i,e[14],3275163606,9),i=c(i,n,r,o,e[3],4107603335,14),o=c(o,i,n,r,e[8],1163531501,20),r=c(r,o,i,n,e[13],2850285829,5),n=c(n,r,o,i,e[2],4243563512,9),i=c(i,n,r,o,e[7],1735328473,14),r=h(r,o=c(o,i,n,r,e[12],2368359562,20),i,n,e[5],4294588738,4),n=h(n,r,o,i,e[8],2272392833,11),i=h(i,n,r,o,e[11],1839030562,16),o=h(o,i,n,r,e[14],4259657740,23),r=h(r,o,i,n,e[1],2763975236,4),n=h(n,r,o,i,e[4],1272893353,11),i=h(i,n,r,o,e[7],4139469664,16),o=h(o,i,n,r,e[10],3200236656,23),r=h(r,o,i,n,e[13],681279174,4),n=h(n,r,o,i,e[0],3936430074,11),i=h(i,n,r,o,e[3],3572445317,16),o=h(o,i,n,r,e[6],76029189,23),r=h(r,o,i,n,e[9],3654602809,4),n=h(n,r,o,i,e[12],3873151461,11),i=h(i,n,r,o,e[15],530742520,16),r=d(r,o=h(o,i,n,r,e[2],3299628645,23),i,n,e[0],4096336452,6),n=d(n,r,o,i,e[7],1126891415,10),i=d(i,n,r,o,e[14],2878612391,15),o=d(o,i,n,r,e[5],4237533241,21),r=d(r,o,i,n,e[12],1700485571,6),n=d(n,r,o,i,e[3],2399980690,10),i=d(i,n,r,o,e[10],4293915773,15),o=d(o,i,n,r,e[1],2240044497,21),r=d(r,o,i,n,e[8],1873313359,6),n=d(n,r,o,i,e[15],4264355552,10),i=d(i,n,r,o,e[6],2734768916,15),o=d(o,i,n,r,e[13],1309151649,21),r=d(r,o,i,n,e[4],4149444226,6),n=d(n,r,o,i,e[11],3174756917,10),i=d(i,n,r,o,e[2],718787259,15),o=d(o,i,n,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+o|0,this._c=this._c+i|0,this._d=this._d+n|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=s},{"hash-base":121,inherits:137,"safe-buffer":191}],150:[function(e,t,r){var l=e("bn.js"),n=e("brorand");function i(e){this.rand=e||new n.Rand}(t.exports=i).create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var n=new l(this.rand.generate(r))}while(0<=n.cmp(e));return n},i.prototype._randrange=function(e,t){t=t.sub(e);return e.add(this._randbelow(t))},i.prototype.test=function(e,t,r){for(var n=e.bitLength(),i=l.mont(e),o=new l(1).toRed(i),a=(t=t||Math.max(1,n/48|0),e.subn(1)),s=0;!a.testn(s);s++);for(var f=e.shrn(s),u=a.toRed(i);0<t;t--){var c=this._randrange(new l(2),a),h=(r&&r(c),c.toRed(i).redPow(f));if(0!==h.cmp(o)&&0!==h.cmp(u)){for(var d=1;d<s;d++){if(0===(h=h.redSqr()).cmp(o))return!1;if(0===h.cmp(u))break}if(d===s)return!1}}return!0},i.prototype.getDivisor=function(e,t){for(var r=e.bitLength(),n=l.mont(e),i=new l(1).toRed(n),o=(t=t||Math.max(1,r/48|0),e.subn(1)),a=0;!o.testn(a);a++);for(var s=e.shrn(a),f=o.toRed(n);0<t;t--){var u=this._randrange(new l(2),o),c=e.gcd(u);if(0!==c.cmpn(1))return c;var h=u.toRed(n).redPow(s);if(0!==h.cmp(i)&&0!==h.cmp(f)){for(var d=1;d<a;d++){if(0===(h=h.redSqr()).cmp(i))return h.fromRed().subn(1).gcd(e);if(0===h.cmp(f))break}if(d===a)return(h=h.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},{"bn.js":151,brorand:19}],151:[function(e,t,r){arguments[4][15][0].apply(r,arguments)},{buffer:20,dup:15}],152:[function(e,t,r){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}(t.exports=n).equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],153:[function(e,t,r){function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e)for(var n=0;n<e.length;n++)r[n]=0|e[n];else if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,i=255&i;o?r.push(o,i):r.push(i)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},{}],154:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],155:[function(e,t,r){var n=e("asn1.js"),e=(r.certificate=e("./certificate"),n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())})),e=(r.RSAPrivateKey=e,n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())})),i=(r.RSAPublicKey=e,n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),e=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())}),e=(r.PublicKey=e,n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(i),this.key("subjectPrivateKey").octstr())})),e=(r.PrivateKey=e,n.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())})),e=(r.EncryptedPrivateKey=e,n.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())})),o=(r.DSAPrivateKey=e,r.DSAparam=n.define("DSAparam",function(){this.int()}),n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})})),e=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(o),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=e,r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":156,"asn1.js":1}],156:[function(e,t,r){var e=e("asn1.js"),n=e.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),i=e.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=e.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),a=e.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),s=e.define("RelativeDistinguishedName",function(){this.setof(i)}),f=e.define("RDNSequence",function(){this.seqof(s)}),u=e.define("Name",function(){this.choice({rdnSequence:this.use(f)})}),c=e.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))}),h=e.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=e.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(u),this.key("validity").use(c),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())}),e=e.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});t.exports=e},{"asn1.js":1}],157:[function(e,t,r){var a=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,s=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,f=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,u=e("evp_bytestokey"),c=e("browserify-aes"),h=e("safe-buffer").Buffer;t.exports=function(e,t){var r,n,i,e=e.toString(),o=e.match(a);return i=o?(n="aes"+o[1],i=h.from(o[2],"hex"),r=h.from(o[3].replace(/[\r\n]/g,""),"base64"),t=u(t,i.slice(0,8),parseInt(o[1],10)).key,o=[],n=c.createDecipheriv(n,t,i),o.push(n.update(r)),o.push(n.final()),h.concat(o)):(t=e.match(f),h.from(t[2].replace(/[\r\n]/g,""),"base64")),{tag:e.match(s)[1],data:i}}},{"browserify-aes":23,evp_bytestokey:107,"safe-buffer":191}],158:[function(e,t,r){var l=e("./asn1"),p=e("./aesid.json"),b=e("./fixProc"),y=e("browserify-aes"),m=e("pbkdf2").pbkdf2Sync,g=e("safe-buffer").Buffer;function n(e){"object"!=typeof e||g.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=g.from(e));var t,r,n,i,o,a,s,f,u,c,e=b(e,t),h=e.tag,d=e.data;switch(h){case"CERTIFICATE":n=l.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(r=(n=n||l.PublicKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return l.RSAPublicKey.decode(n.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return n.subjectPrivateKey=n.subjectPublicKey,{type:"ec",data:n};case"1.2.840.10040.4.1":return n.algorithm.params.pub_key=l.DSAparam.decode(n.subjectPublicKey.data,"der"),{type:"dsa",data:n.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":d=l.EncryptedPrivateKey.decode(d,"der"),o=t,a=(i=d).algorithm.decrypt.kde.kdeparams.salt,s=parseInt(i.algorithm.decrypt.kde.kdeparams.iters.toString(),10),f=p[i.algorithm.decrypt.cipher.algo.join(".")],u=i.algorithm.decrypt.cipher.iv,i=i.subjectPrivateKey,c=parseInt(f.split("-")[1],10)/8,o=m(o,a,s,c,"sha1"),a=y.createDecipheriv(f,o,u),(s=[]).push(a.update(i)),s.push(a.final()),d=g.concat(s);case"PRIVATE KEY":switch(r=(n=l.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return l.RSAPrivateKey.decode(n.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:n.algorithm.curve,privateKey:l.ECPrivateKey.decode(n.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return n.algorithm.params.priv_key=l.DSAparam.decode(n.subjectPrivateKey,"der"),{type:"dsa",params:n.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return l.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return l.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:l.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=l.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}n.signature=l.signature,t.exports=n},{"./aesid.json":154,"./asn1":155,"./fixProc":157,"browserify-aes":23,pbkdf2:159,"safe-buffer":191}],159:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":160,"./lib/sync":163}],160:[function(t,r,e){!function(w){!function(){var c,e,h=t("safe-buffer").Buffer,d=t("./precondition"),l=t("./default-encoding"),p=t("./sync"),b=t("./to-buffer"),y=w.crypto&&w.crypto.subtle,m={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},g=[];function v(){return e=e||(w.process&&w.process.nextTick?w.process.nextTick:w.queueMicrotask||w.setImmediate||w.setTimeout)}function _(e,t,r,n,i){return y.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return y.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)}).then(function(e){return h.from(e)})}r.exports=function(t,r,n,i,o,a){if("function"==typeof o&&(a=o,o=void 0),d(n,i),t=b(t,l,"Password"),r=b(r,l,"Salt"),"function"!=typeof a)throw new Error("No callback provided to pbkdf2");var s,e,f,u=m[(o=o||"sha1").toLowerCase()];u&&"function"==typeof w.Promise?(e=u,e=((!w.process||w.process.browser)&&y&&y.importKey&&y.deriveBits?void 0!==g[e]?g[e]:(f=_(c=c||h.alloc(8),c,10,128,e).then(function(){return!0},function(){return!1}),g[e]=f):Promise.resolve(!1)).then(function(e){return e?_(t,r,n,i,u):p(t,r,n,i,o)}),s=a,e.then(function(e){v()(function(){s(null,e)})},function(e){v()(function(){s(e)})})):v()(function(){var e;try{e=p(t,r,n,i,o)}catch(e){return void a(e)}a(null,e)})}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":161,"./precondition":162,"./sync":163,"./to-buffer":164,"safe-buffer":191}],161:[function(e,n,t){!function(t,r){!function(){var e;e=r.process&&r.process.browser||!r.process||!r.process.version||6<=parseInt(t.version.split(".")[0].slice(1),10)?"utf-8":"binary",n.exports=e}.call(this)}.call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:167}],162:[function(e,t,r){var n=isFinite,i=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0||!n(e))throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||i<t||t!=t)throw new TypeError("Bad key length")}},{}],163:[function(e,t,r){var n=e("create-hash/md5"),i=e("ripemd160"),o=e("sha.js"),g=e("safe-buffer").Buffer,v=e("./precondition"),_=e("./default-encoding"),w=e("./to-buffer"),f=g.alloc(128),M={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},S={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function a(e){return(new i).update(e).digest()}function u(t){return"rmd160"===t||"ripemd160"===t?a:"md5"===t?n:function(e){return o(t).update(e).digest()}}function A(e,t,r){for(var n=u(e),i="sha512"===e||"sha384"===e?128:64,o=(t.length>i?t=n(t):t.length<i&&(t=g.concat([t,f],i)),g.allocUnsafe(i+M[e])),a=g.allocUnsafe(i+M[e]),s=0;s<i;s++)o[s]=54^t[s],a[s]=92^t[s];r=g.allocUnsafe(i+r+4);o.copy(r,0,0,i),this.ipad1=r,this.ipad2=o,this.opad=a,this.alg=e,this.blocksize=i,this.hash=n,this.size=M[e]}A.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(e,t,r,n,i){v(r,n),e=w(e,_,"Password"),t=w(t,_,"Salt");var o=(i||"sha1").toLowerCase(),o=S[o]||o,a=M[o];if("number"!=typeof a||!a)throw new TypeError("Digest algorithm not supported: "+i);for(var s=new A(o,e,t.length),f=g.allocUnsafe(n),u=g.allocUnsafe(t.length+4),c=(t.copy(u,0,0,t.length),0),h=a,d=Math.ceil(n/h),l=1;l<=d;l++){u.writeUInt32BE(l,t.length);for(var p=s.run(u,s.ipad1),b=p,y=1;y<r;y++)for(var b=s.run(b,s.ipad2),m=0;m<h;m++)p[m]^=b[m];p.copy(f,c),c+=h}return f}},{"./default-encoding":161,"./precondition":162,"./to-buffer":164,"create-hash/md5":63,ripemd160:188,"safe-buffer":191,"sha.js":194}],164:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("to-buffer"),o="undefined"!=typeof Uint8Array,a=o&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView;t.exports=function(e,t,r){if("string"==typeof e||n.isBuffer(e)||o&&e instanceof Uint8Array||a&&a(e))return i(e,t);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}},{"safe-buffer":191,"to-buffer":218}],165:[function(e,t,r){t.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},{}],166:[function(e,t,r){!function(s){!function(){void 0===s||!s.version||0===s.version.indexOf("v0.")||0===s.version.indexOf("v1.")&&0!==s.version.indexOf("v1.8.")?t.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return s.nextTick(e);case 2:return s.nextTick(function(){e.call(null,t)});case 3:return s.nextTick(function(){e.call(null,t,r)});case 4:return s.nextTick(function(){e.call(null,t,r,n)});default:for(i=new Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return s.nextTick(function(){e.apply(null,i)})}}}:t.exports=s}.call(this)}.call(this,e("_process"))},{_process:167}],167:[function(e,t,r){var n,i,t=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return(n=setTimeout)(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}var f,u=[],c=!1,h=-1;function d(){c&&f&&(c=!1,f.length?u=f.concat(u):h=-1,u.length)&&l()}function l(){if(!c){for(var e=s(d),t=(c=!0,u.length);t;){for(f=u,u=[];++h<t;)f&&f[h].run();h=-1,t=u.length}f=null,c=!1,!function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return(i=clearTimeout)(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function b(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||c||s(l)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=b,t.addListener=b,t.once=b,t.off=b,t.removeListener=b,t.removeAllListeners=b,t.emit=b,t.prependListener=b,t.prependOnceListener=b,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],168:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(e,t){return r.publicEncrypt(e,t,!0)},r.publicDecrypt=function(e,t){return r.privateDecrypt(e,t,!0)}},{"./privateDecrypt":171,"./publicEncrypt":172}],169:[function(e,t,r){var a=e("create-hash"),s=e("safe-buffer").Buffer;t.exports=function(e,t){for(var r,n,i=s.alloc(0),o=0;i.length<t;)r=o++,n=void 0,(n=s.allocUnsafe(4)).writeUInt32BE(r,0),r=n,i=s.concat([i,a("sha1").update(e).update(r).digest()]);return i.slice(0,t)}},{"create-hash":62,"safe-buffer":191}],170:[function(e,t,r){arguments[4][15][0].apply(r,arguments)},{buffer:20,dup:15}],171:[function(e,t,r){var l=e("parse-asn1"),p=e("./mgf"),b=e("./xor"),y=e("bn.js"),m=e("browserify-rsa"),g=e("create-hash"),v=e("./withPublic"),_=e("safe-buffer").Buffer;t.exports=function(e,t,r){var n=e.padding||(r?1:4),e=l(e),i=e.modulus.byteLength();if(t.length>i||0<=new y(t).cmp(e.modulus))throw new Error("decryption error");var t=r?v(new y(t),e):m(t,e),o=_.alloc(i-t.length);if(t=_.concat([o,t],i),4===n){var o=t,i=(i=e).modulus.byteLength(),e=g("sha1").update(_.alloc(0)).digest(),a=e.length;if(0===o[0]){var s=o.slice(1,a+1),o=o.slice(a+1),s=b(s,p(o,a)),f=b(o,p(s,i-a-1));if(!((e,t)=>{e=_.from(e),t=_.from(t);for(var r=0,n=e.length,i=(e.length!==t.length&&(r++,n=Math.min(e.length,t.length)),-1);++i<n;)r+=e[i]^t[i];return r})(e,f.slice(0,a))){for(var u=a;0===f[u];)u++;if(1===f[u++])return f.slice(u)}}throw new Error("decryption error")}if(1===n){for(var c=t,o=r,s=c.slice(0,2),h=2,d=0;0!==c[h++];)if(c.length<=h){d++;break}i=c.slice(2,h-1);if(("0002"!==s.toString("hex")&&!o||"0001"!==s.toString("hex")&&o)&&d++,i.length<8&&d++,d)throw new Error("decryption error");return c.slice(h)}if(3===n)return t;throw new Error("unknown padding")}},{"./mgf":169,"./withPublic":173,"./xor":174,"bn.js":170,"browserify-rsa":41,"create-hash":62,"parse-asn1":158,"safe-buffer":191}],172:[function(e,t,r){var o=e("parse-asn1"),s=e("randombytes"),f=e("create-hash"),u=e("./mgf"),c=e("./xor"),h=e("bn.js"),a=e("./withPublic"),d=e("browserify-rsa"),l=e("safe-buffer").Buffer;t.exports=function(e,t,r){var n,i=e.padding||(r?1:4),e=o(e);if(4===i)n=((e,t)=>{var e=e.modulus.byteLength(),r=t.length,n=(a=f("sha1").update(l.alloc(0)).digest()).length;if(e-(i=2*n)-2<r)throw new Error("message too long");var r=l.alloc(e-r-i-2),i=e-n-1,o=s(n),a=c(l.concat([a,r,l.alloc(1,1),t],i),u(o,i)),r=c(o,u(a,n));return new h(l.concat([l.alloc(1),r,a],e))})(e,t);else if(1===i)n=((e,t,r)=>{var n=t.length;if((e=e.modulus.byteLength())-11<n)throw new Error("message too long");return n=r?l.alloc(e-n-3,255):(e=>{for(var t,r=l.allocUnsafe(e),n=0,i=s(2*e),o=0;n<e;)o===i.length&&(i=s(2*e),o=0),(t=i[o++])&&(r[n++]=t);return r})(e-n-3),new h(l.concat([l.from([0,r?1:2]),n,l.alloc(1),t],e))})(e,t,r);else{if(3!==i)throw new Error("unknown padding");if(0<=(n=new h(t)).cmp(e.modulus))throw new Error("data too long for modulus")}return(r?d:a)(n,e)}},{"./mgf":169,"./withPublic":173,"./xor":174,"bn.js":170,"browserify-rsa":41,"create-hash":62,"parse-asn1":158,randombytes:175,"safe-buffer":191}],173:[function(e,t,r){var n=e("bn.js"),i=e("safe-buffer").Buffer;t.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},{"bn.js":170,"safe-buffer":191}],174:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},{}],175:[function(t,r,e){!function(a,e){!function(){var i=t("safe-buffer").Buffer,o=e.crypto||e.msCrypto;o&&o.getRandomValues?r.exports=function(e,t){if(4294967295<e)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(0<e)if(65536<e)for(var n=0;n<e;n+=65536)o.getRandomValues(r.slice(n,n+65536));else o.getRandomValues(r);return"function"!=typeof t?r:a.nextTick(function(){t(null,r)})}:r.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}.call(this)}.call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:167,"safe-buffer":191}],176:[function(r,e,l){!function(h,d){!function(){function e(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var t=r("safe-buffer"),o=r("randombytes"),i=t.Buffer,n=t.kMaxLength,a=d.crypto||d.msCrypto,s=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(s<e||e<0)throw new TypeError("offset must be a uint32");if(n<e||t<e)throw new RangeError("offset out of range")}function u(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(s<e||e<0)throw new TypeError("size must be a uint32");if(r<e+t||n<e)throw new RangeError("buffer too small")}function c(r,n,e,i){var t;return h.browser?(t=r.buffer,t=new Uint8Array(t,n,e),a.getRandomValues(t),i?void h.nextTick(function(){i(null,r)}):r):i?void o(e,function(e,t){if(e)return i(e);t.copy(r,n),i(null,r)}):(o(e).copy(r,n),r)}a&&a.getRandomValues||!h.browser?(l.randomFill=function(e,t,r,n){if(!(i.isBuffer(e)||e instanceof d.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,r=e.length;else if("function"==typeof r)n=r,r=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return f(t,e.length),u(r,t,e.length),c(e,t,r,n)},l.randomFillSync=function(e,t,r){void 0===t&&(t=0);if(!(i.isBuffer(e)||e instanceof d.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');f(t,e.length),void 0===r&&(r=e.length-t);return u(r,t,e.length),c(e,t,r)}):(l.randomFill=e,l.randomFillSync=e)}.call(this)}.call(this,r("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:167,randombytes:175,"safe-buffer":191}],177:[function(e,t,r){var n=e("process-nextick-args"),i=Object.keys||function(e){var t,r=[];for(t in e)r.push(t);return r},t=(t.exports=c,Object.create(e("core-util-is"))),o=(t.inherits=e("inherits"),e("./_stream_readable")),a=e("./_stream_writable");t.inherits(c,o);for(var s=i(a.prototype),f=0;f<s.length;f++){var u=s[f];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},{"./_stream_readable":179,"./_stream_writable":181,"core-util-is":59,inherits:137,"process-nextick-args":166}],178:[function(e,t,r){t.exports=i;var n=e("./_stream_transform"),t=Object.create(e("core-util-is"));function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}t.inherits=e("inherits"),t.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":180,"core-util-is":59,inherits:137}],179:[function(I,T,e){!function(R,O){!function(){function b(e,t){return e.listeners(t).length}var o,y=I("process-nextick-args"),m=(T.exports=i,I("isarray")),r=(i.ReadableState=n,I("events").EventEmitter,I("./internal/streams/stream")),c=I("safe-buffer").Buffer,h=(void 0!==O?O:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a,e=Object.create(I("core-util-is")),t=(e.inherits=I("inherits"),I("util")),g=void 0,g=t&&t.debuglog?t.debuglog("stream"):function(){},s=I("./internal/streams/BufferList"),t=I("./internal/streams/destroy"),f=(e.inherits(i,r),["error","close","destroy","pause","resume"]);function n(e,t){e=e||{};var t=t instanceof(o=o||I("./_stream_duplex")),r=(this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),e.highWaterMark),n=e.readableHighWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:t&&(n||0===n)?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new s,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(a=a||I("string_decoder/").StringDecoder,this.decoder=new a(e.encoding),this.encoding=e.encoding)}function i(e){if(o=o||I("./_stream_duplex"),!(this instanceof i))return new i(e);this._readableState=new n(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy)&&(this._destroy=e.destroy),r.call(this)}function u(e,t,r,n,i){var o,a,s,f,u=e._readableState;return null===t?(u.reading=!1,a=e,(f=u).ended||(f.decoder&&(s=f.decoder.end())&&s.length&&(f.buffer.push(s),f.length+=f.objectMode?1:s.length),f.ended=!0,v(a))):(o=i?o:((e,t)=>{var r;return r=(e=>c.isBuffer(e)||e instanceof h)(t)||"string"==typeof t||void 0===t||e.objectMode?r:new TypeError("Invalid non-string/buffer chunk")})(u,t))?e.emit("error",o):u.objectMode||t&&0<t.length?("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===c.prototype||(s=t,t=c.from(s)),n?u.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):d(e,u,t,!0):u.ended?e.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,!u.decoder||r||(t=u.decoder.write(t),u.objectMode)||0!==t.length?d(e,u,t,!1):w(e,u))):n||(u.reading=!1),!(f=u).ended&&(f.needReadable||f.length<f.highWaterMark||0===f.length)}function d(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&v(e)),w(e,t)}Object.defineProperty(i.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),i.prototype.destroy=t.destroy,i.prototype._undestroy=t.undestroy,i.prototype._destroy=function(e,t){this.push(null),t(e)},i.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),u(this,e,t,!1,r)},i.prototype.unshift=function(e){return u(this,e,null,!0,!1)},i.prototype.isPaused=function(){return!1===this._readableState.flowing},i.prototype.setEncoding=function(e){return a=a||I("string_decoder/").StringDecoder,this._readableState.decoder=new a(e),this._readableState.encoding=e,this};var l=8388608;function p(e,t){var r;return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?(t.flowing&&t.length?t.buffer.head.data:t).length:(t.highWaterMark<e&&(t.highWaterMark=(l<=(r=e)?r=l:(r--,r=(r=(r=(r=(r|=r>>>1)|r>>>2)|r>>>4)|r>>>8)|r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function v(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y.nextTick(_,e):_(e))}function _(e){g("emit readable"),e.emit("readable"),k(e)}function w(e,t){t.readingMore||(t.readingMore=!0,y.nextTick(M,e,t))}function M(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function S(e){g("readable nexttick read 0"),e.read(0)}function A(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function E(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=((e,t,r)=>{var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():(r?(e,t)=>{var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(i+=a===o.length?o:o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=o.slice(a);break}++n}return t.length-=n,i}:(e,t)=>{var r=c.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=o.slice(a);break}++i}return t.length-=i,r})(e,t),n})(e,t.buffer,t.decoder),r)}function x(e){var t=e._readableState;if(0<t.length)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,y.nextTick(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}i.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;return 0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&(r.length>=r.highWaterMark||r.ended)?(g("read: emitReadable",r.length,r.ended),(0===r.length&&r.ended?x:v)(this),null):0===(e=p(e,r))&&r.ended?(0===r.length&&x(this),null):(t=r.needReadable,g("need readable",t),(0===r.length||r.length-e<r.highWaterMark)&&g("length less than watermark",t=!0),r.ended||r.reading?g("reading or ended",t=!1):t&&(g("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=p(n,r))),null===(t=0<e?E(e,r):null)?(r.needReadable=!0,e=0):r.length-=e,0===r.length&&(r.ended||(r.needReadable=!0),n!==e)&&r.ended&&x(this),null!==t&&this.emit("data",t),t)},i.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},i.prototype.pipe=function(r,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=r;break;case 1:i.pipes=[i.pipes,r];break;default:i.pipes.push(r)}i.pipesCount+=1,g("pipe count=%d opts=%j",i.pipesCount,e);e=(!e||!1!==e.end)&&r!==R.stdout&&r!==R.stderr?a:p;function o(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,g("cleanup"),r.removeListener("close",d),r.removeListener("finish",l),r.removeListener("drain",s),r.removeListener("error",h),r.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",p),n.removeListener("data",c),f=!0,!i.awaitDrain||r._writableState&&!r._writableState.needDrain||s())}function a(){g("onend"),r.end()}i.endEmitted?y.nextTick(e):n.once("end",e),r.on("unpipe",o);t=n;var t,s=function(){var e=t._readableState;g("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&b(t,"data")&&(e.flowing=!0,k(t))},f=(r.on("drain",s),!1);var u=!1;function c(e){g("ondata"),(u=!1)!==r.write(e)||u||((1===i.pipesCount&&i.pipes===r||1<i.pipesCount&&-1!==j(i.pipes,r))&&!f&&(g("false write response, pause",i.awaitDrain),i.awaitDrain++,u=!0),n.pause())}function h(e){g("onerror",e),p(),r.removeListener("error",h),0===b(r,"error")&&r.emit("error",e)}function d(){r.removeListener("finish",l),p()}function l(){g("onfinish"),r.removeListener("close",d),p()}function p(){g("unpipe"),n.unpipe(r)}return n.on("data",c),((e,t,r)=>{if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?m(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)})(r,"error",h),r.once("close",d),r.once("finish",l),r.emit("pipe",n),i.flowing||(g("pipe resume"),n.resume()),r},i.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0!==t.pipesCount)if(1===t.pipesCount)e&&e!==t.pipes||(e=e||t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r));else if(e){var n=j(t.pipes,e);-1!==n&&(t.pipes.splice(n,1),--t.pipesCount,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r))}else{var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)i[a].emit("unpipe",this,{hasUnpiped:!1})}return this},i.prototype.addListener=i.prototype.on=function(e,t){t=r.prototype.on.call(this,e,t);return"data"===e?!1!==this._readableState.flowing&&this.resume():"readable"!==e||(e=this._readableState).endEmitted||e.readableListening||(e.readableListening=e.needReadable=!0,e.emittedReadable=!1,e.reading?e.length&&v(this):y.nextTick(S,this)),t},i.prototype.resume=function(){var e,t=this._readableState;return t.flowing||(g("resume"),t.flowing=!0,e=this,(t=t).resumeScheduled)||(t.resumeScheduled=!0,y.nextTick(A,e,t)),this},i.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e,r=this,n=this._readableState,i=!1;for(e in t.on("end",function(){var e;g("wrapped end"),n.decoder&&!n.ended&&(e=n.decoder.end())&&e.length&&r.push(e),r.push(null)}),t.on("data",function(e){g("wrapped data"),n.decoder&&(e=n.decoder.write(e)),n.objectMode&&null==e||(n.objectMode||e&&e.length)&&!r.push(e)&&(i=!0,t.pause())}),t)void 0===this[e]&&"function"==typeof t[e]&&(this[e]=(e=>function(){return t[e].apply(t,arguments)})(e));for(var o=0;o<f.length;o++)t.on(f[o],this.emit.bind(this,f[o]));return this._read=function(e){g("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(i.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),i._fromList=E}.call(this)}.call(this,I("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":177,"./internal/streams/BufferList":182,"./internal/streams/destroy":183,"./internal/streams/stream":184,_process:167,"core-util-is":59,events:106,inherits:137,isarray:140,"process-nextick-args":166,"safe-buffer":185,"string_decoder/":186,util:20}],180:[function(e,t,r){t.exports=i;var n=e("./_stream_duplex"),t=Object.create(e("core-util-is"));function i(e){if(!(this instanceof i))return new i(e);n.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState,n=(r.transforming=!1,r.writecb);if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,(r.writecb=null)!=t&&this.push(t),n(e),(r=this._readableState).reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush)&&(this._flush=e.flush),this.on("prefinish",o)}function o(){var r=this;"function"==typeof this._flush?this._flush(function(e,t){a(r,e,t)}):a(this,null,null)}function a(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");e.push(null)}t.inherits=e("inherits"),t.inherits(i,n),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},i.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,r){var n=this._transformState;n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming&&(r=this._readableState,n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)},i.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},i.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,function(e){t(e),r.emit("close")})}},{"./_stream_duplex":177,"core-util-is":59,inherits:137}],181:[function(S,A,e){!function(u,c,M){!function(){var l=S("process-nextick-args");function h(o){var a=this;this.next=null,this.entry=null,this.finish=function(){var e=a,t=o,r=void 0,n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}}A.exports=s;var o,d=!u.browser&&-1<["v0.10","v0.9."].indexOf(u.version.slice(0,5))?M:l.nextTick,e=(s.WritableState=a,Object.create(S("core-util-is"))),t=(e.inherits=S("inherits"),{deprecate:S("util-deprecate")}),r=S("./internal/streams/stream"),p=S("safe-buffer").Buffer,b=(void 0!==c?c:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var n,i=S("./internal/streams/destroy");function y(){}function a(e,c){o=o||S("./_stream_duplex"),e=e||{};var t=c instanceof o,r=(this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),e.highWaterMark),n=e.writableHighWaterMark,i=this.objectMode?16:16384,r=(this.highWaterMark=r||0===r?r:t&&(n||0===n)?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,(this.destroyed=!1)===e.decodeStrings);this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){e=e,r=(t=c)._writableState,n=r.sync,i=r.writecb;var t,r,n,i,o=r;{var a,s,f,u;(o.writing=!1,o.writecb=null,o.length-=o.writelen,o.writelen=0,e)?(o=t,s=n,f=e,u=i,--(a=r).pendingcb,s?(l.nextTick(u,f),l.nextTick(w,o,a),o._writableState.errorEmitted=!0,o.emit("error",f)):(u(f),o._writableState.errorEmitted=!0,o.emit("error",f),w(o,a))):((e=_(r))||r.corked||r.bufferProcessing||!r.bufferedRequest||v(t,r),n?d(g,t,r,e,i):g(t,r,e,i))}},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new h(this)}e.inherits(s,r),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(a.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}function s(e){if(o=o||S("./_stream_duplex"),!(n.call(s,this)||this instanceof o))return new s(e);this._writableState=new a(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final)&&(this._final=e.final),r.call(this)}function m(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function g(e,t,r,n){var i;r||(r=e,0===(i=t).length&&i.needDrain&&(i.needDrain=!1,r.emit("drain"))),t.pendingcb--,n(),w(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){for(var n=t.bufferedRequestCount,i=new Array(n),n=t.corkedRequestsFree,o=(n.entry=r,0),a=!0;r;)(i[o]=r).isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,m(e,t,!0,t.length,i,"",n.finish),t.pendingcb++,t.lastBufferedRequest=null,n.next?(t.corkedRequestsFree=n.next,n.next=null):t.corkedRequestsFree=new h(t),t.bufferedRequestCount=0}else{for(;r;){var s=r.chunk,f=r.encoding,u=r.callback;if(m(e,t,!1,t.objectMode?1:s.length,s,f,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function f(t,r){t._final(function(e){r.pendingcb--,e&&t.emit("error",e),r.prefinished=!0,t.emit("prefinish"),w(t,r)})}function w(e,t){var r,n,i=_(t);return i&&(r=e,(n=t).prefinished||n.finalCalled||("function"==typeof r._final?(n.pendingcb++,n.finalCalled=!0,l.nextTick(f,r,n)):(n.prefinished=!0,r.emit("prefinish"))),0===t.pendingcb)&&(t.finished=!0,e.emit("finish")),i}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===s&&e&&e._writableState instanceof a}})):n=function(e){return e instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(e,t,r){var n,i,o,a,s,f,u,c=this._writableState,h=!1,d=!c.objectMode&&(d=e,p.isBuffer(d)||d instanceof b);return d&&!p.isBuffer(e)&&(s=e,e=p.from(s)),"function"==typeof t&&(r=t,t=null),t=d?"buffer":t||c.defaultEncoding,"function"!=typeof r&&(r=y),c.ended?(s=this,f=r,u=new Error("write after end"),s.emit("error",u),l.nextTick(f,u)):(d||(f=this,u=c,i=r,a=!(o=!0),null===(n=e)?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||u.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(f.emit("error",a),l.nextTick(i,a),o=!1),o))&&(c.pendingcb++,h=((e,t,r,n,i,o)=>{r||(s=((e,t,r)=>t=e.objectMode||!1===e.decodeStrings||"string"!=typeof t?t:p.from(t,r))(t,n,i),n!==s&&(r=!0,i="buffer",n=s));var a,s=t.objectMode?1:n.length,f=(t.length+=s,t.length<t.highWaterMark);return f||(t.needDrain=!0),t.writing||t.corked?(a=t.lastBufferedRequest,t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},a?a.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1):m(e,t,!1,s,n,i,o),f})(this,c,d,e,t,r)),h},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||v(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase()))return this._writableState.defaultEncoding=e,this;throw new TypeError("Unknown encoding: "+e)},Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),s.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,t=e=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||(e=this,t=r,(r=n).ending=!0,w(e,r),t&&(r.finished?l.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1)},Object.defineProperty(s.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),s.prototype.destroy=i.destroy,s.prototype._undestroy=i.undestroy,s.prototype._destroy=function(e,t){this.end(),t(e)}}.call(this)}.call(this,S("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},S("timers").setImmediate)},{"./_stream_duplex":177,"./internal/streams/destroy":183,"./internal/streams/stream":184,_process:167,"core-util-is":59,inherits:137,"process-nextick-args":166,"safe-buffer":185,timers:217,"util-deprecate":221}],182:[function(e,t,r){var a=e("safe-buffer").Buffer,n=e("util");function i(){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}t.exports=(i.prototype.push=function(e){e={data:e,next:null};0<this.length?this.tail.next=e:this.head=e,this.tail=e,++this.length},i.prototype.unshift=function(e){e={data:e,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},i.prototype.shift=function(){var e;if(0!==this.length)return e=this.head.data,1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e},i.prototype.clear=function(){this.head=this.tail=null,this.length=0},i.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},i.prototype.concat=function(e){if(0===this.length)return a.alloc(0);for(var t,r,n=a.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=o,t.copy(n,r),o+=i.data.length,i=i.next;return n},i),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":185,util:20}],183:[function(e,t,r){var o=e("process-nextick-args");function a(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(a,this,e)):o.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,o.nextTick(a,r,e)):o.nextTick(a,r,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":166}],184:[function(e,t,r){t.exports=e("events").EventEmitter},{events:106}],185:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=i(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:49}],186:[function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=(e=>{if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}})(e);if("string"==typeof t||n.isEncoding!==i&&i(e))return t||e;throw new Error("Unknown encoding: "+e)}function a(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=h,this.end=d,t=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function f(e){var t,r=this.lastTotal-this.lastNeed,n=(t=this,128!=(192&(n=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<n.length?128!=(192&n[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<n.length&&128!=(192&n[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,r,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);t=e.toString("utf16le",t);if(t){var r=t.charCodeAt(t.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function c(e){var t,e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function h(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}(r.StringDecoder=a).prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},a.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},a.prototype.text=function(e,t){var r=((e,t,r)=>{var n=t.length-1;if(!(n<r)){var i=s(t[n]);if(0<=i)return 0<i&&(e.lastNeed=i-1),i;if(!(--n<r||-2===i)){if(0<=(i=s(t[n])))return 0<i&&(e.lastNeed=i-2),i;if(!(--n<r||-2===i)&&0<=(i=s(t[n])))return 0<i&&(2===i?i=0:e.lastNeed=i-3),i}}return 0})(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;r=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":185}],187:[function(e,t,r){(((r=t.exports=e("./lib/_stream_readable.js")).Stream=r).Readable=r).Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":177,"./lib/_stream_passthrough.js":178,"./lib/_stream_readable.js":179,"./lib/_stream_transform.js":180,"./lib/_stream_writable.js":181}],188:[function(e,t,r){var n=e("buffer").Buffer,i=e("inherits"),o=e("hash-base"),y=new Array(16),m=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],v=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],_=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],w=[0,1518500249,1859775393,2400959708,2840853838],M=[1352829926,1548603684,1836072691,2053994217,0];function S(e,t){return e<<t|e>>>32-t}function A(e,t,r,n,i,o,a,s){return S(e+(t^r^n)+o+a|0,s)+i|0}function k(e,t,r,n,i,o,a,s){return S(e+(t&r|~t&n)+o+a|0,s)+i|0}function E(e,t,r,n,i,o,a,s){return S(e+((t|~r)^n)+o+a|0,s)+i|0}function x(e,t,r,n,i,o,a,s){return S(e+(t&n|r&~n)+o+a|0,s)+i|0}function P(e,t,r,n,i,o,a,s){return S(e+(t^(r|~n))+o+a|0,s)+i|0}function a(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}i(a,o),a.prototype._update=function(){for(var e=y,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._a,f=0|this._b,u=0|this._c,c=0|this._d,h=0|this._e,d=0;d<80;d+=1)var l,p=d<16?(l=A(r,n,i,o,a,e[m[d]],w[0],v[d]),P(s,f,u,c,h,e[g[d]],M[0],_[d])):d<32?(l=k(r,n,i,o,a,e[m[d]],w[1],v[d]),x(s,f,u,c,h,e[g[d]],M[1],_[d])):d<48?(l=E(r,n,i,o,a,e[m[d]],w[2],v[d]),E(s,f,u,c,h,e[g[d]],M[2],_[d])):d<64?(l=x(r,n,i,o,a,e[m[d]],w[3],v[d]),k(s,f,u,c,h,e[g[d]],M[3],_[d])):(l=P(r,n,i,o,a,e[m[d]],w[4],v[d]),A(s,f,u,c,h,e[g[d]],M[4],_[d])),r=a,a=o,o=S(i,10),i=n,n=l,s=h,h=c,c=S(u,10),u=f,f=p;var b=this._b+i+c|0;this._b=this._c+o+h|0,this._c=this._d+a+s|0,this._d=this._e+r+f|0,this._e=this._a+n+u|0,this._a=b},a.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=a},{buffer:49,"hash-base":189,inherits:137}],189:[function(e,t,r){var n=e("safe-buffer").Buffer,f=e("./to-buffer"),i=e("readable-stream").Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");for(var r=f(e,t),n=this._block,i=0;this._blockOffset+r.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o]=r[i],o+=1,i+=1;this._update(),this._blockOffset=0}for(;i<r.length;)n[this._blockOffset]=r[i],this._blockOffset+=1,i+=1;for(var a=0,s=8*r.length;0<s;++a)this._length[a]+=s,0<(s=this._length[a]/4294967296|0)&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0);for(var r=this._blockOffset=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},{"./to-buffer":190,inherits:137,"readable-stream":187,"safe-buffer":191}],190:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("to-buffer"),o="undefined"!=typeof Uint8Array,a=o&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView;t.exports=function(e,t){if("string"==typeof e||n.isBuffer(e)||o&&e instanceof Uint8Array||a&&a(e))return i(e,t);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}},{"safe-buffer":191,"to-buffer":218}],191:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=i(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:49}],192:[function(e,t,r){var n=e("get-intrinsic"),a=e("define-data-property"),s=e("has-property-descriptors")(),f=e("gopd"),u=e("es-errors/type"),c=n("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new u("`fn` is not a function");if("number"!=typeof t||t<0||4294967295<t||c(t)!==t)throw new u("`length` must be a positive 32-bit integer");var r,n=2<arguments.length&&!!arguments[2],i=!0,o=!0;return"length"in e&&f&&((r=f(e,"length"))&&!r.configurable&&(i=!1),r)&&!r.writable&&(o=!1),!i&&!o&&n||(s?a(e,"length",t,!0,!0):a(e,"length",t)),e}},{"define-data-property":67,"es-errors/type":103,"get-intrinsic":111,gopd:116,"has-property-descriptors":117}],193:[function(e,t,r){var n=e("safe-buffer").Buffer,c=e("to-buffer");function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){e=c(e,t||"utf8");for(var r=this._block,n=this._blockSize,i=e.length,o=this._len,a=0;a<i;){for(var s=o%n,f=Math.min(i-a,n-s),u=0;u<f;u++)r[s+u]=e[a+u];a+=f,(o+=f)%n==0&&this._update(r)}return this._len+=i,this},i.prototype.digest=function(e){var t=this._len%this._blockSize,t=(this._block[t]=128,this._block.fill(0,1+t),t>=this._finalSize&&(this._update(this._block),this._block.fill(0)),8*this._len),t=(t<=4294967295?this._block.writeUInt32BE(t,this._blockSize-4):(this._block.writeUInt32BE((t-(t=(4294967295&t)>>>0))/4294967296,this._blockSize-8),this._block.writeUInt32BE(t,this._blockSize-4)),this._update(this._block),this._hash());return e?t.toString(e):t},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":191,"to-buffer":218}],194:[function(e,r,t){r.exports=function(e){var e=e.toLowerCase(),t=r.exports[e];if(t)return new t;throw new Error(e+" is not supported (we accept pull requests)")},r.exports.sha=e("./sha"),r.exports.sha1=e("./sha1"),r.exports.sha224=e("./sha224"),r.exports.sha256=e("./sha256"),r.exports.sha384=e("./sha384"),r.exports.sha512=e("./sha512")},{"./sha":195,"./sha1":196,"./sha224":197,"./sha256":198,"./sha384":199,"./sha512":200}],195:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,p=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}n(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0;s<16;++s)t[s]=e.readInt32BE(4*s);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var f,u,c,h=0;h<80;++h)var d=~~(h/20),l=0|(r<<5|r>>>27)+(f=n,u=i,c=o,0===(l=d)?f&u|~f&c:2===l?f&u|f&c|u&c:f^u^c)+a+t[h]+p[d],a=o,o=i,i=n<<30|n>>>2,n=r,r=l;this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},s.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=s},{"./hash":193,inherits:137,"safe-buffer":191}],196:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,b=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}n(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=(t=r[f-3]^r[f-8]^r[f-14]^r[f-16])<<1|t>>>31;for(var u,c,h,d=0;d<80;++d)var l=~~(d/20),p=0|(n<<5|n>>>27)+(u=i,c=o,h=a,0===(p=l)?u&c|~u&h:2===p?u&c|u&h|c&h:u^c^h)+s+r[d]+b[l],s=a,a=o,o=i<<30|i>>>2,i=n,n=p;this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=s},{"./hash":193,inherits:137,"safe-buffer":191}],197:[function(e,t,r){var n=e("inherits"),i=e("./sha256"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(64);function f(){this.init(),this._w=s,o.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=f},{"./hash":193,"./sha256":198,inherits:137,"safe-buffer":191}],198:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function s(){this.init(),this._w=a,i.call(this,64,56)}n(s,i),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},s.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0|this._f,u=0|this._g,c=0|this._h,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<64;++h)r[h]=0|(((t=r[h-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[h-7]+(((t=r[h-15])>>>7|t<<25)^(t>>>18|t<<14)^t>>>3)+r[h-16];for(var d=0;d<64;++d)var l=c+((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(u^s&(f^u))+b[d]+r[d]|0,p=0|((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i|o&(n|i)),c=u,u=f,f=s,s=a+l|0,a=o,o=i,i=n,n=l+p|0;this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=f+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0},s.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=s},{"./hash":193,inherits:137,"safe-buffer":191}],199:[function(e,t,r){var n=e("inherits"),i=e("./sha512"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(160);function f(){this.init(),this._w=s,o.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var n=a.allocUnsafe(48);function e(e,t,r){n.writeInt32BE(e,r),n.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),n},t.exports=f},{"./hash":193,"./sha512":200,inherits:137,"safe-buffer":191}],200:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,q=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function s(){this.init(),this._w=a,i.call(this,128,112)}function z(e,t,r){return r^e&(t^r)}function F(e,t,r){return e&t|r&(e|t)}function H(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function K(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function V(e,t){return e>>>0<t>>>0?1:0}n(s,i),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},s.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,f=0|this._gh,u=0|this._hh,c=0|this._al,h=0|this._bl,d=0|this._cl,l=0|this._dl,p=0|this._el,b=0|this._fl,y=0|this._gl,m=0|this._hl,g=0;g<32;g+=2)t[g]=e.readInt32BE(4*g),t[g+1]=e.readInt32BE(4*g+4);for(;g<160;g+=2){var v=t[g-30],_=t[g-30+1],w=(v>>>1|_<<31)^(v>>>8|_<<24)^v>>>7,M=(_>>>1|v<<31)^(_>>>8|v<<24)^(_>>>7|v<<25),v=t[g-4],S=((_=t[g-4+1])>>>19|v<<13)^(v>>>29|_<<3)^(_>>>6|v<<26),A=t[g-14],k=t[g-14+1],L=t[g-32],E=t[g-32+1],x=M+k|0,P=w+A+V(x,M)|0;P=(P=P+((v>>>19|_<<13)^(_>>>29|v<<3)^v>>>6)+V(x=x+S|0,S)|0)+L+V(x=x+E|0,E)|0,t[g]=P,t[g+1]=x}for(var j=0;j<160;j+=2){P=t[j],x=t[j+1];var D=F(r,n,i),U=F(c,h,d),N=H(r,c),R=H(c,r),O=K(a,p),I=K(p,a),T=q[j+1],B=z(a,s,f),C=z(p,b,y),I=m+I|0,B=(O=(((u+O+V(I,m)|0)+B+V(I=I+C|0,C)|0)+q[j]+V(I=I+T|0,T)|0)+P+V(I=I+x|0,x)|0,R+U|0),C=N+D+V(B,R)|0,u=f,m=y,f=s,y=b,s=a,b=p,a=o+O+V(p=l+I|0,l)|0,o=i,l=d,i=n,d=h,n=r,h=c,r=O+C+V(c=I+B|0,I)|0}this._al=this._al+c|0,this._bl=this._bl+h|0,this._cl=this._cl+d|0,this._dl=this._dl+l|0,this._el=this._el+p|0,this._fl=this._fl+b|0,this._gl=this._gl+y|0,this._hl=this._hl+m|0,this._ah=this._ah+r+V(this._al,c)|0,this._bh=this._bh+n+V(this._bl,h)|0,this._ch=this._ch+i+V(this._cl,d)|0,this._dh=this._dh+o+V(this._dl,l)|0,this._eh=this._eh+a+V(this._el,p)|0,this._fh=this._fh+s+V(this._fl,b)|0,this._gh=this._gh+f+V(this._gl,y)|0,this._hh=this._hh+u+V(this._hl,m)|0},s.prototype._hash=function(){var n=o.allocUnsafe(64);function e(e,t,r){n.writeInt32BE(e,r),n.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),n},t.exports=s},{"./hash":193,inherits:137,"safe-buffer":191}],201:[function(e,t,r){t.exports=n;var c=e("events").EventEmitter;function n(){c.call(this)}e("inherits")(n,c),n.Readable=e("readable-stream/lib/_stream_readable.js"),n.Writable=e("readable-stream/lib/_stream_writable.js"),n.Duplex=e("readable-stream/lib/_stream_duplex.js"),n.Transform=e("readable-stream/lib/_stream_transform.js"),n.PassThrough=e("readable-stream/lib/_stream_passthrough.js"),n.finished=e("readable-stream/lib/internal/streams/end-of-stream.js"),n.pipeline=e("readable-stream/lib/internal/streams/pipeline.js"),(n.Stream=n).prototype.pipe=function(t,e){var r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",i),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function f(e){if(u(),0===c.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u)}return r.on("error",f),t.on("error",f),r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t}},{events:106,inherits:137,"readable-stream/lib/_stream_duplex.js":203,"readable-stream/lib/_stream_passthrough.js":204,"readable-stream/lib/_stream_readable.js":205,"readable-stream/lib/_stream_transform.js":206,"readable-stream/lib/_stream_writable.js":207,"readable-stream/lib/internal/streams/end-of-stream.js":211,"readable-stream/lib/internal/streams/pipeline.js":213}],202:[function(e,t,r){var n={};function i(e,i,t){var r=(n=>{var e,t;function r(e,t,r){return n.call(this,(e=e,t=t,r=r,"string"==typeof i?i:i(e,t,r)))||this}return t=n,(e=r).prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t,r})(t=t||Error);r.prototype.name=t.name,r.prototype.code=e,n[e]=r}function f(e,t){var r;return Array.isArray(e)?(r=e.length,e=e.map(function(e){return String(e)}),2<r?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])):"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,i,o,a,s;return"string"==typeof t&&(a="not ",t.substr(!o||o<0?0:+o,a.length)===a)?(n="must not be",t=t.replace(/^not /,"")):n="must be",o=e,a=" argument",(void 0===s||s>o.length)&&(s=o.length),o=(o.substring(s-a.length,s)===a?"The ".concat(e," "):(s=(i="number"!=typeof i?0:i)+(o=".").length>(s=e).length||-1===s.indexOf(o,i)?"argument":"property",'The "'.concat(e,'" ').concat(s," "))).concat(n," ").concat(f(t,"type")),o+=". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],203:[function(c,h,e){!function(u){!function(){var e=Object.keys||function(e){var t,r=[];for(t in e)r.push(t);return r},t=(h.exports=a,c("./_stream_readable")),r=c("./_stream_writable");c("inherits")(a,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var o=n[i];a.prototype[o]||(a.prototype[o]=r.prototype[o])}function a(e){if(!(this instanceof a))return new a(e);t.call(this,e),r.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen)&&(this.allowHalfOpen=!1,this.once("end",s))}function s(){this._writableState.ended||u.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}.call(this)}.call(this,c("_process"))},{"./_stream_readable":205,"./_stream_writable":207,_process:167,inherits:137}],204:[function(e,t,r){t.exports=i;var n=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e("inherits")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":206,inherits:137}],205:[function(N,q,e){!function(D,U){!function(){function p(e,t){return e.listeners(t).length}(q.exports=_).ReadableState=v,N("events").EventEmitter;var n,i=N("./internal/streams/stream"),c=N("buffer").Buffer,h=(void 0!==U?U:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var o,e,r,t=N("util"),b=t&&t.debuglog?t.debuglog("stream"):function(){},a=N("./internal/streams/buffer_list"),t=N("./internal/streams/destroy"),s=N("./internal/streams/state").getHighWaterMark,f=N("../errors").codes,d=f.ERR_INVALID_ARG_TYPE,l=f.ERR_STREAM_PUSH_AFTER_EOF,u=f.ERR_METHOD_NOT_IMPLEMENTED,y=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,m=(N("inherits")(_,i),t.errorOrDestroy),g=["error","close","destroy","pause","resume"];function v(e,t,r){n=n||N("./_stream_duplex"),e=e||{},"boolean"!=typeof r&&(r=t instanceof n),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=s(this,e,"readableHighWaterMark",r),this.buffer=new a,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o=o||N("string_decoder/").StringDecoder,this.decoder=new o(e.encoding),this.encoding=e.encoding)}function _(e){if(n=n||N("./_stream_duplex"),!(this instanceof _))return new _(e);var t=this instanceof n;this._readableState=new v(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy)&&(this._destroy=e.destroy),i.call(this)}function w(e,t,r,n,i){b("readableAddChunk",t);var o,a,s,f,u=e._readableState;if(null===t)u.reading=!1,a=e,s=u,b("onEofChunk"),s.ended||(s.decoder&&(f=s.decoder.end())&&f.length&&(s.buffer.push(f),s.length+=s.objectMode?1:f.length),s.ended=!0,s.sync?k(a):(s.needReadable=!1,s.emittedReadable||(s.emittedReadable=!0,E(a))));else if(o=i?o:((e,t)=>{var r;return r=(e=>c.isBuffer(e)||e instanceof h)(t)||"string"==typeof t||void 0===t||e.objectMode?r:new d("chunk",["string","Buffer","Uint8Array"],t)})(u,t))m(e,o);else if(u.objectMode||t&&0<t.length)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===c.prototype||(f=t,t=c.from(f)),n)u.endEmitted?m(e,new y):M(e,u,t,!0);else if(u.ended)m(e,new l);else{if(u.destroyed)return!1;u.reading=!1,!u.decoder||r||(t=u.decoder.write(t),u.objectMode)||0!==t.length?M(e,u,t,!1):x(e,u)}else n||(u.reading=!1,x(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function M(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=t.destroy,_.prototype._undestroy=t.undestroy,_.prototype._destroy=function(e,t){t(e)},_.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),w(this,e,t,!1,r)},_.prototype.unshift=function(e){return w(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){for(var t=new(o=o||N("string_decoder/").StringDecoder)(e),r=(this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding,this._readableState.buffer.head),n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var S=1073741824;function A(e,t){var r;return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?(t.flowing&&t.length?t.buffer.head.data:t).length:(t.highWaterMark<e&&(t.highWaterMark=(S<=(r=e)?r=S:(r--,r=(r=(r=(r=(r|=r>>>1)|r>>>2)|r>>>4)|r>>>8)|r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;b("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(b("emitReadable",t.flowing),t.emittedReadable=!0,D.nextTick(E,e))}function E(e){var t=e._readableState;b("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,I(e)}function x(e,t){t.readingMore||(t.readingMore=!0,D.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(b("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function j(e){var t=e._readableState;t.readableListening=0<e.listenerCount("readable"),t.resumeScheduled&&!t.paused?t.flowing=!0:0<e.listenerCount("data")&&e.resume()}function R(e){b("readable nexttick read 0"),e.read(0)}function O(e,t){b("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(b("flow",t.flowing);t.flowing&&null!==e.read(););}function T(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function B(e){var t=e._readableState;b("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,D.nextTick(L,t,e))}function L(e,t){b("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy&&(!(e=t._writableState)||e.autoDestroy&&e.finished)&&t.destroy())}function C(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}_.prototype.read=function(e){b("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;return 0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:0<r.length)||r.ended)?(b("read: emitReadable",r.length,r.ended),(0===r.length&&r.ended?B:k)(this),null):0===(e=A(e,r))&&r.ended?(0===r.length&&B(this),null):(t=r.needReadable,b("need readable",t),(0===r.length||r.length-e<r.highWaterMark)&&b("length less than watermark",t=!0),r.ended||r.reading?b("reading or ended",t=!1):t&&(b("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=A(n,r))),null===(t=0<e?T(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e)&&r.ended&&B(this),null!==t&&this.emit("data",t),t)},_.prototype._read=function(e){m(this,new u("_read()"))},_.prototype.pipe=function(r,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=r;break;case 1:i.pipes=[i.pipes,r];break;default:i.pipes.push(r)}i.pipesCount+=1,b("pipe count=%d opts=%j",i.pipesCount,e);e=(!e||!1!==e.end)&&r!==D.stdout&&r!==D.stderr?a:l;function o(e,t){b("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,b("cleanup"),r.removeListener("close",h),r.removeListener("finish",d),r.removeListener("drain",s),r.removeListener("error",c),r.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",l),n.removeListener("data",u),f=!0,!i.awaitDrain||r._writableState&&!r._writableState.needDrain||s())}function a(){b("onend"),r.end()}i.endEmitted?D.nextTick(e):n.once("end",e),r.on("unpipe",o);t=n;var t,s=function(){var e=t._readableState;b("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&p(t,"data")&&(e.flowing=!0,I(t))},f=(r.on("drain",s),!1);function u(e){b("ondata");e=r.write(e);b("dest.write",e),!1===e&&((1===i.pipesCount&&i.pipes===r||1<i.pipesCount&&-1!==C(i.pipes,r))&&!f&&(b("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function c(e){b("onerror",e),l(),r.removeListener("error",c),0===p(r,"error")&&m(r,e)}function h(){r.removeListener("finish",d),l()}function d(){b("onfinish"),r.removeListener("close",h),l()}function l(){b("unpipe"),n.unpipe(r)}return n.on("data",u),((e,t,r)=>{if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)})(r,"error",c),r.once("close",h),r.once("finish",d),r.emit("pipe",n),i.flowing||(b("pipe resume"),n.resume()),r},_.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0!==t.pipesCount)if(1===t.pipesCount)e&&e!==t.pipes||(e=e||t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r));else if(e){var n=C(t.pipes,e);-1!==n&&(t.pipes.splice(n,1),--t.pipesCount,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r))}else{var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)i[a].emit("unpipe",this,{hasUnpiped:!1})}return this},_.prototype.addListener=_.prototype.on=function(e,t){var t=i.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=0<this.listenerCount("readable"),!1!==r.flowing&&this.resume()):"readable"!==e||r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,b("on readable",r.length,r.reading),r.length?k(this):r.reading||D.nextTick(R,this)),t},_.prototype.removeListener=function(e,t){t=i.prototype.removeListener.call(this,e,t);return"readable"===e&&D.nextTick(j,this),t},_.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||D.nextTick(j,this),t},_.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(b("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled)||(t.resumeScheduled=!0,D.nextTick(O,e,t)),r.paused=!1,this},_.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(t){var e,r=this,n=this._readableState,i=!1;for(e in t.on("end",function(){var e;b("wrapped end"),n.decoder&&!n.ended&&(e=n.decoder.end())&&e.length&&r.push(e),r.push(null)}),t.on("data",function(e){b("wrapped data"),n.decoder&&(e=n.decoder.write(e)),n.objectMode&&null==e||(n.objectMode||e&&e.length)&&!r.push(e)&&(i=!0,t.pause())}),t)void 0===this[e]&&"function"==typeof t[e]&&(this[e]=(e=>function(){return t[e].apply(t,arguments)})(e));for(var o=0;o<g.length;o++)t.on(g[o],this.emit.bind(this,g[o]));return this._read=function(e){b("wrapped _read",e),i&&(i=!1,t.resume())},this},"function"==typeof Symbol&&(_.prototype[Symbol.asyncIterator]=function(){return(e=void 0===e?N("./internal/streams/async_iterator"):e)(this)}),Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(_.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(_.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),_._fromList=T,Object.defineProperty(_.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(_.from=function(e,t){return(r=void 0===r?N("./internal/streams/from"):r)(_,e,t)})}.call(this)}.call(this,N("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":202,"./_stream_duplex":203,"./internal/streams/async_iterator":208,"./internal/streams/buffer_list":209,"./internal/streams/destroy":210,"./internal/streams/from":212,"./internal/streams/state":214,"./internal/streams/stream":215,_process:167,buffer:49,events:106,inherits:137,"string_decoder/":216,util:20}],206:[function(e,t,r){t.exports=f;var t=e("../errors").codes,n=t.ERR_METHOD_NOT_IMPLEMENTED,i=t.ERR_MULTIPLE_CALLBACK,o=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=t.ERR_TRANSFORM_WITH_LENGTH_0,s=e("./_stream_duplex");function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState,n=(r.transforming=!1,r.writecb);if(null===n)return this.emit("error",new i);r.writechunk=null,(r.writecb=null)!=t&&this.push(t),n(e),(r=this._readableState).reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush)&&(this._flush=e.flush),this.on("prefinish",u)}function u(){var r=this;"function"!=typeof this._flush||this._readableState.destroyed?c(this,null,null):this._flush(function(e,t){c(r,e,t)})}function c(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;e.push(null)}e("inherits")(f,s),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new n("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming&&(r=this._readableState,n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){s.prototype._destroy.call(this,e,function(e){t(e)})}},{"../errors":202,"./_stream_duplex":203,inherits:137}],207:[function(R,O,e){!function(P,j){!function(){function h(o){var a=this;this.next=null,this.entry=null,this.finish=function(){var e=a,t=o,r=void 0,n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}}(O.exports=w).WritableState=_;var r,e={deprecate:R("util-deprecate")},n=R("./internal/streams/stream"),u=R("buffer").Buffer,c=(void 0!==j?j:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var i,t=R("./internal/streams/destroy"),o=R("./internal/streams/state").getHighWaterMark,a=R("../errors").codes,d=a.ERR_INVALID_ARG_TYPE,s=a.ERR_METHOD_NOT_IMPLEMENTED,l=a.ERR_MULTIPLE_CALLBACK,f=a.ERR_STREAM_CANNOT_PIPE,p=a.ERR_STREAM_DESTROYED,b=a.ERR_STREAM_NULL_VALUES,y=a.ERR_STREAM_WRITE_AFTER_END,m=a.ERR_UNKNOWN_ENCODING,g=t.errorOrDestroy;function v(){}function _(e,c,t){r=r||R("./_stream_duplex"),e=e||{},"boolean"!=typeof t&&(t=c instanceof r),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=o(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;t=(this.destroyed=!1)===e.decodeStrings;this.decodeStrings=!t,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){var t=c,r=t._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new l;var o,a,s,f,u=r;u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0,e?(u=t,a=n,s=e,f=i,--(o=r).pendingcb,a?(P.nextTick(f,s),P.nextTick(x,u,o),u._writableState.errorEmitted=!0,g(u,s)):(f(s),u._writableState.errorEmitted=!0,g(u,s),x(u,o))):((e=k(r)||t.destroyed)||r.corked||r.bufferProcessing||!r.bufferedRequest||A(t,r),n?P.nextTick(S,t,r,e,i):S(t,r,e,i))},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new h(this)}R("inherits")(w,n),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(_.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}function w(e){var t=this instanceof(r=r||R("./_stream_duplex"));if(!t&&!i.call(w,this))return new w(e);this._writableState=new _(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final)&&(this._final=e.final),n.call(this)}function M(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new p("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function S(e,t,r,n){var i;r||(r=e,0===(i=t).length&&i.needDrain&&(i.needDrain=!1,r.emit("drain"))),t.pendingcb--,n(),x(e,t)}function A(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){for(var n=t.bufferedRequestCount,i=new Array(n),n=t.corkedRequestsFree,o=(n.entry=r,0),a=!0;r;)(i[o]=r).isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,M(e,t,!0,t.length,i,"",n.finish),t.pendingcb++,t.lastBufferedRequest=null,n.next?(t.corkedRequestsFree=n.next,n.next=null):t.corkedRequestsFree=new h(t),t.bufferedRequestCount=0}else{for(;r;){var s=r.chunk,f=r.encoding,u=r.callback;if(M(e,t,!1,t.objectMode?1:s.length,s,f,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(t,r){t._final(function(e){r.pendingcb--,e&&g(t,e),r.prefinished=!0,t.emit("prefinish"),x(t,r)})}function x(e,t){var r,n,i=k(t);return i&&(r=e,(n=t).prefinished||n.finalCalled||("function"!=typeof r._final||n.destroyed?(n.prefinished=!0,r.emit("prefinish")):(n.pendingcb++,n.finalCalled=!0,P.nextTick(E,r,n))),0===t.pendingcb)&&(t.finished=!0,e.emit("finish"),t.autoDestroy)&&(!(r=e._readableState)||r.autoDestroy&&r.endEmitted)&&e.destroy(),i}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===w&&e&&e._writableState instanceof _}})):i=function(e){return e instanceof this},w.prototype.pipe=function(){g(this,new f)},w.prototype.write=function(e,t,r){var n,i,o,a=this._writableState,s=!1,f=!a.objectMode&&(f=e,u.isBuffer(f)||f instanceof c);return f&&!u.isBuffer(e)&&(n=e,e=u.from(n)),"function"==typeof t&&(r=t,t=null),t=f?"buffer":t||a.defaultEncoding,"function"!=typeof r&&(r=v),a.ending?(n=this,i=r,o=new y,g(n,o),P.nextTick(i,o)):(f||((e,t,r,n)=>{var i;if(null===r?i=new b:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i)return 1;g(e,i),P.nextTick(n,i)})(this,a,e,r))&&(a.pendingcb++,s=((e,t,r,n,i,o)=>{r||(s=((e,t,r)=>t=e.objectMode||!1===e.decodeStrings||"string"!=typeof t?t:u.from(t,r))(t,n,i),n!==s&&(r=!0,i="buffer",n=s));var a,s=t.objectMode?1:n.length,f=(t.length+=s,t.length<t.highWaterMark);return f||(t.needDrain=!0),t.writing||t.corked?(a=t.lastBufferedRequest,t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},a?a.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1):M(e,t,!1,s,n,i,o),f})(this,a,f,e,t,r)),s},w.prototype.cork=function(){this._writableState.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||A(this,e))},w.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase()))return this._writableState.defaultEncoding=e,this;throw new m(e)},Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,r){r(new s("_write()"))},w.prototype._writev=null,w.prototype.end=function(e,t,r){var n=this._writableState;if("function"==typeof e?(r=e,t=e=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),!n.ending){e=this,t=n,n=r;t.ending=!0,x(e,t),n&&(t.finished?P.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}return this},Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=t.destroy,w.prototype._undestroy=t.undestroy,w.prototype._destroy=function(e,t){t(e)}}.call(this)}.call(this,R("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":202,"./_stream_duplex":203,"./internal/streams/destroy":210,"./internal/streams/state":214,"./internal/streams/stream":215,_process:167,buffer:49,inherits:137,"util-deprecate":221}],208:[function(n,y,e){!function(b){!function(){var e;function r(e,t,r){(t=(e=>"symbol"==typeof(e=((e,t)=>{if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);if("object"!=typeof(r=r.call(e,t||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"))?e:String(e))(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}var i=n("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),f=Symbol("ended"),u=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function l(e){var t,r=e[o];null!==r&&null!==(t=e[h].read())&&(e[u]=null,e[o]=null,e[a]=null,r(d(t,!1)))}var t=Object.getPrototypeOf(function(){}),p=Object.setPrototypeOf((r(e={get stream(){return this[h]},next:function(){var r=this,e=this[s];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise(function(e,t){b.nextTick(function(){r[s]?t(r[s]):e(d(void 0,!0))})});var t,n,i,e=this[u];if(e)t=new Promise((n=e,i=this,function(e,t){n.then(function(){i[f]?e(d(void 0,!0)):i[c](e,t)},t)}));else{e=this[h].read();if(null!==e)return Promise.resolve(d(e,!1));t=new Promise(this[c])}return this[u]=t}},Symbol.asyncIterator,function(){return this}),r(e,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),e),t);y.exports=function(e){var t,n=Object.create(p,(r(t={},h,{value:e,writable:!0}),r(t,o,{value:null,writable:!0}),r(t,a,{value:null,writable:!0}),r(t,s,{value:null,writable:!0}),r(t,f,{value:e._readableState.endEmitted,writable:!0}),r(t,c,{value:function(e,t){var r=n[h].read();r?(n[u]=null,n[o]=null,n[a]=null,e(d(r,!1))):(n[o]=e,n[a]=t)},writable:!0}),t));return n[u]=null,i(e,function(e){var t;e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code?(null!==(t=n[a])&&(n[u]=null,n[o]=null,n[a]=null,t(e)),n[s]=e):(null!==(t=n[o])&&(n[u]=null,n[o]=null,t(d(void 0,!(n[a]=null)))),n[f]=!0)}),e.on("readable",function(e){b.nextTick(l,e)}.bind(null,n)),n}}.call(this)}.call(this,n("_process"))},{"./end-of-stream":211,_process:167}],209:[function(e,t,r){function o(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function i(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=s(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){e=((e,t)=>{if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);if("object"!=typeof(r=r.call(e,t||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==typeof e?e:String(e)}var f=e("buffer").Buffer,u=e("util").inspect,c=u&&u.custom||"inspect";t.exports=(()=>{function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){e={data:e,next:null};0<this.length?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(e){e={data:e,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){var e;if(0!==this.length)return e=this.head.data,1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return f.alloc(0);for(var t,r,n=f.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=o,f.prototype.copy.call(t,n,r),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(n+=o===i.length?i:i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t).data=i.slice(o);break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=f.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r).data=i.slice(o);break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return u(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e})()},{buffer:49,util:20}],210:[function(e,t,r){!function(f){!function(){function o(e,t){s(e,t),a(e)}function a(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,f.nextTick(s,this,e)):f.nextTick(s,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?f.nextTick(a,r):(r._writableState.errorEmitted=!0,f.nextTick(o,r,e)):f.nextTick(o,r,e):t?(f.nextTick(a,r),t(e)):f.nextTick(a,r)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}.call(this)}.call(this,e("_process"))},{_process:167}],211:[function(e,t,r){var m=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function g(){}t.exports=function e(t,r,n){var i,o,a,s,f,u,c,h,d,l,p,b,y;return"function"==typeof r?e(t,null,r):(i=n||g,o=!1,n=function(){if(!o){o=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];i.apply(this,t)}},a=(r=r||{}).readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,f=function(){t.writable||c()},u=t._writableState&&t._writableState.finished,c=function(){u=!(s=!1),a||n.call(t)},h=t._readableState&&t._readableState.endEmitted,d=function(){h=!(a=!1),s||n.call(t)},l=function(e){n.call(t,e)},p=function(){var e;return a&&!h?(t._readableState&&t._readableState.ended||(e=new m),n.call(t,e)):s&&!u?(t._writableState&&t._writableState.ended||(e=new m),n.call(t,e)):void 0},b=function(){t.req.on("finish",c)},(y=t).setHeader&&"function"==typeof y.abort?(t.on("complete",c),t.on("abort",p),t.req?b():t.on("request",b)):s&&!t._writableState&&(t.on("end",f),t.on("close",f)),t.on("end",d),t.on("finish",c),!1!==r.error&&t.on("error",l),t.on("close",p),function(){t.removeListener("complete",c),t.removeListener("abort",p),t.removeListener("request",b),t.req&&t.req.removeListener("finish",c),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",c),t.removeListener("end",d),t.removeListener("error",l),t.removeListener("close",p)})}},{"../../../errors":202}],212:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],213:[function(f,e,t){var u;var r=f("../../../errors").codes,s=r.ERR_MISSING_ARGS,c=r.ERR_STREAM_DESTROYED;function h(e){if(e)throw e}function d(r,e,t,n){i=n,o=!1;var i,o,a=!(n=function(){o||(o=!0,i.apply(void 0,arguments))}),s=(r.on("close",function(){a=!0}),(u=void 0===u?f("./end-of-stream"):u)(r,{readable:e,writable:t},function(e){if(e)return n(e);a=!0,n()}),!1);return function(e){var t;if(!a&&!s)return s=!0,(t=r).setHeader&&"function"==typeof t.abort?r.abort():"function"==typeof r.destroy?r.destroy():void n(e||new c("pipe"))}}function l(e){e()}function p(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r,i,o=!(r=n).length||"function"!=typeof r[r.length-1]?h:r.pop();if((n=Array.isArray(n[0])?n[0]:n).length<2)throw new s("streams");var a=n.map(function(e,t){var r=t<n.length-1;return d(e,r,0<t,function(e){i=i||e,e&&a.forEach(l),r||(a.forEach(l),o(i))})});return n.reduce(p)}},{"../../../errors":202,"./end-of-stream":211}],214:[function(e,t,r){var a=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,n){o=n,i=r;var i,o=null!=(t=t).highWaterMark?t.highWaterMark:o?t[i]:null;if(null==o)return e.objectMode?16:16384;if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new a(n?r:"highWaterMark",o);return Math.floor(o)}}},{"../../../errors":202}],215:[function(e,t,r){arguments[4][184][0].apply(r,arguments)},{dup:184,events:106}],216:[function(e,t,r){arguments[4][186][0].apply(r,arguments)},{dup:186,"safe-buffer":191}],217:[function(f,e,u){!function(r,s){!function(){var n=f("process/browser.js").nextTick,e=Function.prototype.apply,i=Array.prototype.slice,o={},a=0;function t(e,t){this._id=e,this._clearFn=t}u.setTimeout=function(){return new t(e.call(setTimeout,window,arguments),clearTimeout)},u.setInterval=function(){return new t(e.call(setInterval,window,arguments),clearInterval)},u.clearTimeout=u.clearInterval=function(e){e.close()},t.prototype.unref=t.prototype.ref=function(){},t.prototype.close=function(){this._clearFn.call(window,this._id)},u.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},u.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},u._unrefActive=u.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},u.setImmediate="function"==typeof r?r:function(e){var t=a++,r=!(arguments.length<2)&&i.call(arguments,1);return o[t]=!0,n(function(){o[t]&&(r?e.apply(null,r):e.call(null),u.clearImmediate(t))}),t},u.clearImmediate="function"==typeof s?s:function(e){delete o[e]}}.call(this)}.call(this,f("timers").setImmediate,f("timers").clearImmediate)},{"process/browser.js":167,timers:217}],218:[function(e,t,r){var i=e("safe-buffer").Buffer,o=e("isarray"),n=e("typed-array-buffer"),a=ArrayBuffer.isView||function(e){try{return n(e),!0}catch(e){return!1}},s="undefined"!=typeof Uint8Array,f=void 0!==ArrayBuffer&&"undefined"!=typeof Uint8Array,u=f&&(i.prototype instanceof Uint8Array||i.TYPED_ARRAY_SUPPORT);t.exports=function(e,t){if(i.isBuffer(e))return!e.constructor||"isBuffer"in e?e:i.from(e);if("string"==typeof e)return i.from(e,t);if(f&&a(e)){if(0===e.byteLength)return i.alloc(0);if(u){t=i.from(e.buffer,e.byteOffset,e.byteLength);if(t.byteLength===e.byteLength)return t}t=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t=i.from(t);if(t.length===e.byteLength)return t}if(s&&e instanceof Uint8Array)return i.from(e);t=o(e);if(t)for(var r=0;r<e.length;r+=1){var n=e[r];if("number"!=typeof n||n<0||255<n||~~n!==n)throw new RangeError("Array items must be numbers in the range 0-255.")}if(t||i.isBuffer(e)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return i.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},{isarray:219,"safe-buffer":191,"typed-array-buffer":220}],219:[function(e,t,r){arguments[4][140][0].apply(r,arguments)},{dup:140}],220:[function(e,t,r){var n=e("es-errors/type"),i=e("call-bound")("TypedArray.prototype.buffer",!0),o=e("is-typed-array");t.exports=i||function(e){if(o(e))return e.buffer;throw new n("Not a Typed Array")}},{"call-bound":57,"es-errors/type":103,"is-typed-array":139}],221:[function(e,r,t){!function(t){!function(){function n(e){try{if(!t.localStorage)return}catch(e){return}e=t.localStorage[e];return null!=e&&"true"===String(e).toLowerCase()}r.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],222:[function(require,module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t,r=[];for(t in e)r.push(t);return r},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=(()=>{try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(t){var e,r,n,i,o;if(t instanceof Context)return(e=document.createElement("iframe")).style||(e.style={}),e.style.display="none",document.body.appendChild(e),n=(r=e.contentWindow).eval,o=r.execScript,!n&&o&&(o.call(r,"null"),n=r.eval),forEach(Object_keys(t),function(e){r[e]=t[e]}),forEach(globals,function(e){t[e]&&(r[e]=t[e])}),i=Object_keys(r),o=n.call(r,this.code),forEach(Object_keys(r),function(e){(e in t||-1===indexOf(i,e))&&(t[e]=r[e])}),forEach(globals,function(e){e in t||defineProp(t,e,r[e])}),document.body.removeChild(e),o;throw new TypeError("needs a 'context' argument.")},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var r=Script.createContext(t),e=this.runInContext(r);return t&&forEach(Object_keys(r),function(e){t[e]=r[e]}),e},forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){e=Script(e);return e[t].apply(e,[].slice.call(arguments,1))}}),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(t){var r=new Context;return"object"==typeof t&&forEach(Object_keys(t),function(e){r[e]=t[e]}),r}},{}],223:[function(p,b,e){!function(r){!function(){var a=p("for-each"),e=p("available-typed-arrays"),n=p("call-bind"),t=p("call-bound"),s=p("gopd"),i=p("get-proto"),f=t("Object.prototype.toString"),u=p("has-tostringtag/shams")(),o="undefined"==typeof globalThis?r:globalThis,c=e(),h=t("String.prototype.slice"),d=t("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},l={__proto__:null};a(c,u&&s&&i?function(e){var t,r=new o[e];Symbol.toStringTag in r&&i&&(r=i(r),!(t=s(r,Symbol.toStringTag))&&r&&(r=i(r),t=s(r,Symbol.toStringTag)),t)&&t.get&&(r=n(t.get),l["$"+e]=r)}:function(e){var t=new o[e],t=t.slice||t.set;t&&(t=n(t),l["$"+e]=t)});b.exports=function(e){var t,r,n,i,o;return!(!e||"object"!=typeof e)&&(u?s?(i=e,o=!1,a(l,function(e,t){if(!o)try{"$"+e(i)===t&&(o=h(t,1))}catch(e){}}),o):null:(t=h(f(e),8,-1),-1<d(c,t)?t:"Object"===t&&(r=e,n=!1,a(l,function(e,t){if(!n)try{e(r),n=h(t,1)}catch(e){}}),n)))}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"available-typed-arrays":16,"call-bind":56,"call-bound":57,"for-each":108,"get-proto":114,gopd:116,"has-tostringtag/shams":120}],224:[function(e,t,r){var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},f=(Object.defineProperty(r,"__esModule",{value:!0}),e(".."));function n(e){var t=this;this._clientToSend={},this._isClientConnected={},this._clientIsServer={},this._tooldb=e,this.tooldb.once("init",function(){t.tooldb.options.server&&t.getMeAsPeer().then(function(e){t.tooldb.serverPeers.push(e)})})}Object.defineProperty(n.prototype,"clientToSend",{get:function(){return this._clientToSend},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isClientConnected",{get:function(){return this._isClientConnected},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tooldb",{get:function(){return this._tooldb},enumerable:!1,configurable:!0}),n.prototype.getMeAsPeer=function(){var t=this,r=(new Date).getTime();return(0,f.getPeerSignature)(this.tooldb.peerAccount,this.tooldb.options.topic,r,this.tooldb.options.host,this.tooldb.options.port).then(function(e){return{topic:t.tooldb.options.topic,timestamp:r,host:t.tooldb.options.host,port:t.tooldb.options.port,address:t.tooldb.peerAccount.getAddress()||"",sig:e}})},n.prototype.isConnected=function(e){return!!this._isClientConnected[e]&&this._isClientConnected[e]()},n.prototype.isServer=function(e){return this._clientIsServer[e]||!1},n.prototype.craftPingMessage=function(){var t=this;return this.getMeAsPeer().then(function(e){return JSON.stringify({type:"ping",clientId:t.getClientAddress(),to:[t.getClientAddress()],isServer:t.tooldb.options.server,id:(0,f.textRandom)(10),peer:e})})},n.prototype.executeSendToClient=function(e,t){this._clientToSend[e]&&this._clientToSend[e](t)},n.prototype.getClientAddress=function(){return(this.tooldb.peerAccount.getAddress()||"").slice(-20)},n.prototype.onClientDisconnect=function(e){delete this._clientToSend[e],delete this._clientIsServer[e]},n.prototype.onClientMessage=function(t,e,r){e&&!this.tooldb.processedOutHashes[e]&&(this.tooldb.processedOutHashes[e]=[]);try{var n,i=JSON.parse(t);"ping"===i.type||"pong"===i.type?(r(n=i.clientId),this.tooldb.onPeerConnect(n),this._clientIsServer[n]=i.isServer,this.tooldb.processedOutHashes[n]=[],this.tooldb.clientOnMessage(i,n)):e&&this.tooldb.clientOnMessage(i,e)}catch(e){this.tooldb.logger("Got message ERR",t),this.tooldb.logger(e)}},n.prototype.sendToAll=function(t,r){var n=this,i=(void 0===r&&(r=!1),(0,f.uniq)(s(s([],t.to,!0),[this.getClientAddress()],!1))),o=JSON.stringify(a(a({},t),{to:i}));Object.keys(this.clientToSend).filter(function(e){return!i.includes(e)}).filter(function(e){return n.isConnected(e)}).forEach(function(e){(r&&n.isServer(e)||!r)&&(n.tooldb.logger(i,"Sent out to:",e),"put"===t.type||"crdtPut"===t.type?n.tooldb.processedOutHashes[e].includes(t.data.h)||(n.executeSendToClient(e,o),n.tooldb.processedOutHashes[e].push(t.data.h)):n.executeSendToClient(e,o))})},n.prototype.sendToClientId=function(e,t){var r=(0,f.uniq)(s(s([],t.to,!0),[this.getClientAddress()],!1)),r=JSON.stringify(a(a({},t),{to:r}));"put"===t.type||"crdtPut"===t.type?e&&!this.tooldb.processedOutHashes[e].includes(t.data.h)&&(this.executeSendToClient(e,r),this.tooldb.processedOutHashes[e].push(t.data.h)):this.executeSendToClient(e,r)},r.default=n},{"..":231}],225:[function(e,t,r){var n=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},i=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function o(e,t){this._readyPromise=Promise.resolve(),this._tooldb=e,t&&(this._forceStorageName=t)}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(o.prototype,"ready",{get:function(){return this._readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"tooldb",{get:function(){return this._tooldb},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"storageName",{get:function(){return this._forceStorageName||this._tooldb.options.storageName},enumerable:!1,configurable:!0}),o.prototype.waitForReady=function(){return n(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,this._readyPromise];case 1:return e.sent(),[2]}})})},o.prototype.put=function(e,t){return Promise.resolve()},o.prototype.get=function(e){return Promise.resolve("")},o.prototype.query=function(e){return Promise.resolve([])},r.default=o},{}],226:[function(e,t,r){var n=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},i=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function o(e){this._tooldb=e}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(o.prototype,"tooldb",{get:function(){return this._tooldb},enumerable:!1,configurable:!0}),o.prototype.anonUser=function(){return n(this,void 0,void 0,function(){return i(this,function(e){return[2]})})},o.prototype.setUser=function(e,t){return n(this,void 0,void 0,function(){return i(this,function(e){return[2]})})},o.prototype.signData=function(e){return Promise.resolve("")},o.prototype.verifySignature=function(e){return Promise.resolve(!1)},o.prototype.getAccountFromPrivate=function(e){return Promise.resolve(void 0)},o.prototype.encryptAccount=function(e){return Promise.resolve(void 0)},o.prototype.decryptAccount=function(e,t){return Promise.resolve(void 0)},o.prototype.getAddress=function(){return""},o.prototype.getUsername=function(){return""},r.default=o},{}],227:[function(e,t,r){function n(){this.type=""}Object.defineProperty(r,"__esModule",{value:!0}),r.BaseCrdt=r.CRDT_COUNTER=r.CRDT_LIST=r.CRDT_MAP=void 0,r.CRDT_MAP="MAP",r.CRDT_LIST="LIST",r.CRDT_COUNTER="COUNTER",n.prototype.mergeChanges=function(e){},n.prototype.getChanges=function(){return[]},Object.defineProperty(n.prototype,"value",{get:function(){return""},enumerable:!1,configurable:!0}),r.BaseCrdt=n},{}],228:[function(e,t,r){var n,i,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=(Object.defineProperty(r,"__esModule",{value:!0}),r.CounterCrdt=void 0,e("..")),e=(i=a.BaseCrdt,o(s,i),s.prototype.changesSort=function(e,t){return e.i>t.i?1:e.i<t.i?-1:0},s.prototype.calculate=function(){var t=0;this._changes.length!==this._lastUpdateSize&&(this._changes.sort(this.changesSort).forEach(function(e){"ADD"===e.t?t+=e.v:"SUB"===e.t&&(t-=e.v)}),this._lastUpdateSize=this._changes.length,this._value=t)},Object.defineProperty(s.prototype,"value",{get:function(){return this.calculate(),this._value},enumerable:!1,configurable:!0}),s.prototype.mergeChanges=function(e){var r=this;e.forEach(function(t){0===r._changes.filter(function(e){return e.i===t.i&&e.a===t.a&&e.t===t.t}).length&&r._changes.push(t)}),this.calculate()},s.prototype.getChanges=function(){return this._changes},s.prototype.ADD=function(e){var t=this,r=this._changes.filter(function(e){return e.a===t._author});this._changes.push({t:"ADD",v:e,a:this._author,i:r.length}),this.calculate()},s.prototype.SUB=function(e){var t=this,r=this._changes.filter(function(e){return e.a===t._author});this._changes.push({t:"SUB",v:e,a:this._author,i:r.length}),this.calculate()},s);function s(e,t){var r=i.call(this)||this;return r.type=a.CRDT_LIST,r._changes=[],r._author="",r._value=0,r._lastUpdateSize=0,r._author=e,t&&r.mergeChanges(t),r.calculate(),r}r.CounterCrdt=e},{"..":231}],229:[function(e,t,r){var n,i,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=(Object.defineProperty(r,"__esModule",{value:!0}),r.ListCrdt=void 0,e("..")),e=(i=a.BaseCrdt,o(s,i),s.prototype.changesSort=function(e,t){return e.i>t.i?1:e.i<t.i?-1:0},s.prototype.calculate=function(){var r=[];this._changes.length!==this._lastUpdateSize&&(this._changes.sort(this.changesSort).forEach(function(t){var e;"INS"===t.t?(e=0,t.p?e=r.findIndex(function(e){return e.index===t.p})+1:t.n&&(e=r.findIndex(function(e){return e.index===t.n})),r.splice(e,0,{value:t.v,index:t.i,tomb:!1,prev:t.p,next:t.n})):"DEL"===t.t&&(e=r.findIndex(function(e){return e.index===t.v}),r[e].tomb=!0)}),this._lastUpdateSize=this._changes.length,this._tempValues=r,this._value=r.filter(function(e){return!e.tomb}).map(function(e){return e.value}))},Object.defineProperty(s.prototype,"value",{get:function(){return this.calculate(),this._value},enumerable:!1,configurable:!0}),s.prototype.mergeChanges=function(e){var r=this;e.forEach(function(t){0===r._changes.filter(function(e){return e.i===t.i&&e.t===t.t&&e.v===t.v}).length&&r._changes.push(t)}),this.calculate()},s.prototype.getChanges=function(){return this._changes},s.prototype.INS=function(e,t){var r,n=this,i=this._tempValues.filter(function(e){return!e.tomb}),o=void 0,a=void 0,t=(0!==i.length&&(r=i[t].index,i=this._tempValues.findIndex(function(e){return e.index===r}),o=this._tempValues[i-1],a=this._tempValues[i]),this._changes.filter(function(e){return e.i.startsWith(n._author)}));this._changes.push({t:"INS",p:null==o?void 0:o.index,n:null==a?void 0:a.index,v:e,i:this._author+"-"+"".concat(t.length).padStart(8,"0")}),this.calculate()},s.prototype.PUSH=function(e){var t=this,r=this._tempValues.filter(function(e){return!e.tomb}),n=null==(r=r[r.length-1])?void 0:r.index,r=this._tempValues.findIndex(function(e){return e.index===n}),r=this._tempValues[r],i=this._changes.filter(function(e){return e.i.startsWith(t._author)});this._changes.push({t:"INS",p:null==r?void 0:r.index,n:void 0,v:e,i:this._author+"-"+"".concat(i.length).padStart(8,"0")}),this.calculate()},s.prototype.DEL=function(e){var t=this,r=this._tempValues.filter(function(e){return!e.tomb})[e].index,e=this._tempValues.findIndex(function(e){return e.index===r}),e=this._tempValues[e],n=this._changes.filter(function(e){return e.i.startsWith(t._author)});this._changes.push({t:"DEL",v:e.index,i:this._author+"-"+"".concat(n.length).padStart(8,"0")}),this.calculate()},s);function s(e,t){var r=i.call(this)||this;return r.type=a.CRDT_LIST,r._changes=[],r._author="",r._value=[],r._tempValues=[],r._lastUpdateSize=0,r._author=e,t&&r.mergeChanges(t),r.calculate(),r}r.ListCrdt=e},{"..":231}],230:[function(e,t,r){var n,i,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=(Object.defineProperty(r,"__esModule",{value:!0}),r.MapCrdt=void 0,e("..")),e=(i=a.BaseCrdt,o(s,i),s.prototype.changesSort=function(e,t){return e.i<t.i?-1:t.i<e.i?1:"SET"===e.t&&"DEL"===t.t?-1:"DEL"===e.t&&"SET"===t.t?1:e.a<t.a?-1:t.a<e.a?1:0},s.prototype.calculate=function(){var t=this,r={};this._changes.length!==this._lastUpdateSize&&(this._changes.sort(this.changesSort).forEach(function(e){"SET"===e.t?r[e.k]=e.v:"DEL"===e.t&&delete r[e.k],t._keyIndex[e.k]=e.i}),this._lastUpdateSize=this._changes.length,this._value=r)},Object.defineProperty(s.prototype,"value",{get:function(){return this.calculate(),this._value},enumerable:!1,configurable:!0}),s.prototype.mergeChanges=function(e){var r=this;e.forEach(function(t){0===r._changes.filter(function(e){return e.k===t.k&&e.i===t.i&&e.a===t.a&&e.t===t.t}).length&&r._changes.push(t)}),this.calculate()},s.prototype.getChanges=function(){return this._changes},s.prototype.SET=function(e,t){this._keyIndex[e]=(this._keyIndex[e]||0)+1,this._changes.push({t:"SET",k:e,a:this._author,v:t,i:this._keyIndex[e]}),this.calculate()},s.prototype.DEL=function(e){this._keyIndex[e]=(this._keyIndex[e]||0)+1,this._changes.push({t:"DEL",k:e,a:this._author,i:this._keyIndex[e]}),this.calculate()},s);function s(e,t){var r=i.call(this)||this;return r.type=a.CRDT_MAP,r._changes=[],r._author="",r._value={},r._keyIndex={},r._lastUpdateSize=0,r._author=e,t&&r.mergeChanges(t),r.calculate(),r}r.MapCrdt=e},{"..":231}],231:[function(e,L,t){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),r=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(t,"__esModule",{value:!0}),t.ToolDb=t.handlePut=t.handleGet=t.handlePong=t.handlePing=t.handleQuery=t.handleCrdtPut=t.handleCrdtGet=t.handleFunction=t.handleSubscribe=t.ToolDbUserAdapter=t.ToolDbStorageAdapter=t.ToolDbNetworkAdapter=t.base64ToUint8=t.uint8ToBase64=t.fromBase64=t.toBase64=t.hexToUint8=t.hexToString=t.hexToArrayBuffer=t.arrayBufferToHex=t.arrayBufferToString=t.stringToArrayBuffer=t.catchReturn=t.textRandom=t.verifyPeer=t.getPeerSignature=t.verifyMessage=t.randomAnimal=t.generateGroupKey=t.uniq=t.sha256=t.sha1=t.proofOfWork=void 0,e("./utils/proofOfWork")),a=(Object.defineProperty(t,"proofOfWork",{enumerable:!0,get:function(){return i(o).default}}),e("./utils/sha1")),s=(Object.defineProperty(t,"sha1",{enumerable:!0,get:function(){return i(a).default}}),e("./utils/sha256")),f=(Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return i(s).default}}),e("./utils/uniq")),u=(Object.defineProperty(t,"uniq",{enumerable:!0,get:function(){return i(f).default}}),e("./utils/generateGroupKey")),c=(Object.defineProperty(t,"generateGroupKey",{enumerable:!0,get:function(){return i(u).default}}),e("./utils/randomAnimal")),h=(Object.defineProperty(t,"randomAnimal",{enumerable:!0,get:function(){return i(c).default}}),e("./utils/verifyMessage")),d=(Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return i(h).default}}),e("./utils/getPeerSignature")),l=(Object.defineProperty(t,"getPeerSignature",{enumerable:!0,get:function(){return i(d).default}}),e("./utils/verifyPeer")),p=(Object.defineProperty(t,"verifyPeer",{enumerable:!0,get:function(){return i(l).default}}),e("./utils/textRandom")),b=(Object.defineProperty(t,"textRandom",{enumerable:!0,get:function(){return i(p).default}}),e("./utils/catchReturn")),y=(Object.defineProperty(t,"catchReturn",{enumerable:!0,get:function(){return i(b).default}}),e("./utils/encoding/stringToArrayBuffer")),m=(Object.defineProperty(t,"stringToArrayBuffer",{enumerable:!0,get:function(){return i(y).default}}),e("./utils/encoding/arrayBufferToString")),g=(Object.defineProperty(t,"arrayBufferToString",{enumerable:!0,get:function(){return i(m).default}}),e("./utils/encoding/arrayBufferToHex")),v=(Object.defineProperty(t,"arrayBufferToHex",{enumerable:!0,get:function(){return i(g).default}}),e("./utils/encoding/hexToArrayBuffer")),_=(Object.defineProperty(t,"hexToArrayBuffer",{enumerable:!0,get:function(){return i(v).default}}),e("./utils/encoding/hexToString")),w=(Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return i(_).default}}),e("./utils/encoding/hexToUint8")),M=(Object.defineProperty(t,"hexToUint8",{enumerable:!0,get:function(){return i(w).default}}),e("./utils/encoding/toBase64")),S=(Object.defineProperty(t,"toBase64",{enumerable:!0,get:function(){return i(M).default}}),e("./utils/encoding/fromBase64")),A=(Object.defineProperty(t,"fromBase64",{enumerable:!0,get:function(){return i(S).default}}),e("./utils/encoding/uint8ToBase64")),k=(Object.defineProperty(t,"uint8ToBase64",{enumerable:!0,get:function(){return i(A).default}}),e("./utils/encoding/base64ToUint8")),E=(Object.defineProperty(t,"base64ToUint8",{enumerable:!0,get:function(){return i(k).default}}),e("./adapters-base/networkAdapter")),x=(Object.defineProperty(t,"ToolDbNetworkAdapter",{enumerable:!0,get:function(){return i(E).default}}),e("./adapters-base/storageAdapter")),P=(Object.defineProperty(t,"ToolDbStorageAdapter",{enumerable:!0,get:function(){return i(x).default}}),e("./adapters-base/userAdapter")),j=(Object.defineProperty(t,"ToolDbUserAdapter",{enumerable:!0,get:function(){return i(P).default}}),r(e("./types/tooldb"),t),r(e("./types/message"),t),r(e("./crdt/baseCrdt"),t),r(e("./crdt/counterCrdt"),t),r(e("./crdt/listCrdt"),t),r(e("./crdt/mapCrdt"),t),e("./messageHandlers/handleSubscribe")),R=(Object.defineProperty(t,"handleSubscribe",{enumerable:!0,get:function(){return i(j).default}}),e("./messageHandlers/handleFunction")),O=(Object.defineProperty(t,"handleFunction",{enumerable:!0,get:function(){return i(R).default}}),e("./messageHandlers/handleCrdtGet")),I=(Object.defineProperty(t,"handleCrdtGet",{enumerable:!0,get:function(){return i(O).default}}),e("./messageHandlers/handleCrdtPut")),T=(Object.defineProperty(t,"handleCrdtPut",{enumerable:!0,get:function(){return i(I).default}}),e("./messageHandlers/handleQuery")),B=(Object.defineProperty(t,"handleQuery",{enumerable:!0,get:function(){return i(T).default}}),e("./messageHandlers/handlePing")),C=(Object.defineProperty(t,"handlePing",{enumerable:!0,get:function(){return i(B).default}}),e("./messageHandlers/handlePong")),D=(Object.defineProperty(t,"handlePong",{enumerable:!0,get:function(){return i(C).default}}),e("./messageHandlers/handleGet")),U=(Object.defineProperty(t,"handleGet",{enumerable:!0,get:function(){return i(D).default}}),e("./messageHandlers/handlePut")),N=(Object.defineProperty(t,"handlePut",{enumerable:!0,get:function(){return i(U).default}}),e("./tooldb"));Object.defineProperty(t,"ToolDb",{enumerable:!0,get:function(){return i(N).default}})},{"./adapters-base/networkAdapter":224,"./adapters-base/storageAdapter":225,"./adapters-base/userAdapter":226,"./crdt/baseCrdt":227,"./crdt/counterCrdt":228,"./crdt/listCrdt":229,"./crdt/mapCrdt":230,"./messageHandlers/handleCrdtGet":233,"./messageHandlers/handleCrdtPut":234,"./messageHandlers/handleFunction":235,"./messageHandlers/handleGet":236,"./messageHandlers/handlePing":237,"./messageHandlers/handlePong":238,"./messageHandlers/handlePut":239,"./messageHandlers/handleQuery":240,"./messageHandlers/handleSubscribe":241,"./tooldb":256,"./types/message":257,"./types/tooldb":258,"./utils/catchReturn":259,"./utils/encoding/arrayBufferToHex":260,"./utils/encoding/arrayBufferToString":261,"./utils/encoding/base64ToUint8":262,"./utils/encoding/fromBase64":263,"./utils/encoding/hexToArrayBuffer":264,"./utils/encoding/hexToString":265,"./utils/encoding/hexToUint8":266,"./utils/encoding/stringToArrayBuffer":267,"./utils/encoding/toBase64":268,"./utils/encoding/uint8ToBase64":269,"./utils/generateGroupKey":270,"./utils/getPeerSignature":271,"./utils/proofOfWork":272,"./utils/randomAnimal":273,"./utils/sha1":274,"./utils/sha256":275,"./utils/textRandom":276,"./utils/uniq":277,"./utils/verifyMessage":278,"./utils/verifyPeer":279}],232:[function(e,t,r){var f=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},u=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(e,t,r,n,i,o){var a,s;this.options.debug&&(a=(s="undefined"==typeof window)?this.options.storageName:"%c"+this.options.storageName,s=s?"":"background: #"+(0,u.sha1)(this.options.storageName).slice(-6)+"; padding: 2px; color: black",console.log.apply(console,f([a,s],[e,t,r,n,i,i,o].slice(0,arguments.length),!1)))}},{".":231}],233:[function(e,t,r){var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r,n){var i=this;this.store.get(r.key).then(function(e){try{var t={type:"crdtPut",data:JSON.parse(e),to:[],id:r.id};i.network.sendToClientId(n,t)}catch(e){}}).catch(function(e){var t=o(o({},r),{to:a(a([],r.to,!0),[n],!1)});i.logger("Local key not found, relay",JSON.stringify(t)),i.network.sendToAll(t,!1)})}},{}],234:[function(e,t,r){var u=this&&this.__assign||function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},n=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c=(Object.defineProperty(r,"__esModule",{value:!0}),e("..")),o=i(e("../toolDbVerificationWrapper"));r.default=function(s,t){var f=this;o.default.call(this,s.data).then(function(e){var a;e===c.VerifyResult.Verified?(a=u(u({},s),{to:n(n([],s.to,!0),[t],!1)}),f.emit("crdtput",a),f.emit("data",a.data),f.emit("verified",a),f.network.sendToAll(a,!0),f.store.get(a.data.k).then(function(t){if(t)try{var e=JSON.parse(t),r=a,n=void 0,i=(e.c===c.CRDT_MAP&&(n=new c.MapCrdt(f.userAccount.getAddress()||"",e.v)),e.c===c.CRDT_LIST&&(n=new c.ListCrdt(f.userAccount.getAddress()||"",e.v)),e.c===c.CRDT_COUNTER&&(n=new c.CounterCrdt(f.userAccount.getAddress()||"",e.v)),[]);n&&(n.mergeChanges(a.data.v),i=n.getChanges()),(r=u({},a)).data.v=i,e.t<a.data.t?(o=r.data.k,f.triggerKeyListener(o,r.data),f.store.put(r.data.k,JSON.stringify(r.data)).catch(function(e){})):(o=s.data.k,f.triggerKeyListener(o,e))}catch(e){f.logger("Couldnt parse crdt data",t,e)}else{var o=a.data.k;f.triggerKeyListener(o,a.data),f.store.put(a.data.k,JSON.stringify(a.data)).catch(function(e){f.logger("Couldnt insert crdt data",e)})}}).catch(function(e){var t=a.data.k;f.triggerKeyListener(t,a.data),f.store.put(a.data.k,JSON.stringify(a.data)).catch(function(e){})})):f.logger("unverified message: ",e,s)})}},{"..":231,"../toolDbVerificationWrapper":255}],235:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,r){var n=this;if(this.functions[t.function])try{this.functions[t.function](t.args).then(function(e){e={return:e,type:"functionReturn",id:t.id,code:"OK",to:[]};n.network.sendToClientId(r,e)}).catch(function(e){e={return:e.toString(),type:"functionReturn",id:t.id,code:"ERR",to:[]};n.network.sendToClientId(r,e)})}catch(e){var i={return:e.toString(),type:"functionReturn",id:t.id,code:"ERR",to:[]};this.network.sendToClientId(r,i)}else{i={return:"Function not found",type:"functionReturn",id:t.id,code:"NOT_FOUND",to:[]};this.network.sendToClientId(r,i)}}},{}],236:[function(e,t,r){var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r,n){var i=this;this.store.get(r.key).then(function(e){try{var t={type:"put",data:JSON.parse(e),to:[],id:r.id};i.network.sendToClientId(n,t)}catch(e){}}).catch(function(e){var t=o(o({},r),{to:a(a([],r.to,!0),[n],!1)});i.logger("Local key not found, relay",JSON.stringify(t)),i.network.sendToAll(t,!1)})}},{}],237:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var i=e("..");r.default=function(t,r){var n=this;this.isConnected||(this.isConnected=!0,this.onConnect()),(0,i.verifyPeer)(this,t.peer).then(function(e){e&&t.peer.topic===n.options.topic?(0===n.serverPeers.filter(function(e){return e.address===t.peer.address}).length&&t.isServer&&n.serverPeers.push(t.peer),n.network.sendToClientId(r,{type:"pong",isServer:n.options.server,clientId:n.network.getClientAddress(),to:[],servers:n.serverPeers,id:t.id}),n.onPeerConnect(n.peerAccount.getAddress()||"")):n.logger("Blocked a remote peer from joining; ",e,t)})}},{"..":231}],238:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("..");r.default=function(e,t){var r=this;this.isConnected||(this.isConnected=!0,this.onConnect()),e.servers.forEach(function(t){0===r.serverPeers.filter(function(e){return e.address===t.address}).length&&t.host&&t.port&&(0,n.verifyPeer)(r,t).then(function(e){e&&t.topic===r.options.topic&&0===r.serverPeers.filter(function(e){return e.address===t.address}).length&&r.serverPeers.push(t)})}),this.onPeerConnect(this.peerAccount.getAddress()||"")}},{"..":231}],239:[function(e,t,r){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=(Object.defineProperty(r,"__esModule",{value:!0}),e("..")),f=i(e("../toolDbVerificationWrapper"));r.default=function(t,r){var o=this;f.default.call(this,t.data).then(function(e){var i;e===s.VerifyResult.Verified?(o.emit("put",t),o.emit("data",t.data),o.emit("verified",t),i=n(n({},t),{to:a(a([],t.to,!0),[r],!1)}),o.network.sendToAll(i,!0),o.store.get(i.data.k).then(function(e){var t,r,e=JSON.parse(e),n=i.data.k;n.startsWith("==")&&e.a!==i.data.a?e.t<i.data.t?(o.logger("Username conflict detected: local signup is older, rejecting incoming data for ".concat(n)),o.emit("username-conflict-resolved",{username:n,winner:"local",localTimestamp:e.t,remoteTimestamp:i.data.t,localAddress:e.a,remoteAddress:i.data.a}),o.triggerKeyListener(n,e)):e.t>i.data.t?(o.logger("Username conflict detected: remote signup is older, accepting incoming data for ".concat(n)),(r=null==(r=o.userAccount)?void 0:r.getAddress())&&r===e.a&&o.emit("current-user-lost-username",{username:n.replace("==",""),timestamp:e.t,winnerTimestamp:i.data.t,winnerAddress:i.data.a}),o.emit("username-conflict-resolved",{username:n,winner:"remote",localTimestamp:e.t,remoteTimestamp:i.data.t,localAddress:e.a,remoteAddress:i.data.a}),o.triggerKeyListener(n,i.data),o.store.put(n,JSON.stringify(i.data)).catch(function(){})):e.a<i.data.a?(o.logger("Username conflict with same timestamp: local address wins for ".concat(n)),o.emit("username-conflict-resolved",{username:n,winner:"local",localTimestamp:e.t,remoteTimestamp:i.data.t,localAddress:e.a,remoteAddress:i.data.a}),o.triggerKeyListener(n,e)):(o.logger("Username conflict with same timestamp: remote address wins for ".concat(n)),(r=null==(t=o.userAccount)?void 0:t.getAddress())&&r===e.a&&o.emit("current-user-lost-username",{username:n.replace("==",""),timestamp:e.t,winnerTimestamp:i.data.t,winnerAddress:i.data.a}),o.emit("username-conflict-resolved",{username:n,winner:"remote",localTimestamp:e.t,remoteTimestamp:i.data.t,localAddress:e.a,remoteAddress:i.data.a}),o.triggerKeyListener(n,i.data),o.store.put(n,JSON.stringify(i.data)).catch(function(){})):e.t<i.data.t?(o.triggerKeyListener(n,i.data),o.store.put(n,JSON.stringify(i.data)).catch(function(){})):o.triggerKeyListener(n,e)}).catch(function(){var e=t.data.k;o.triggerKeyListener(e,t.data),o.store.put(t.data.k,JSON.stringify(t.data)).catch(function(){})})):o.logger("unverified message: ",e,t)})}},{"..":231,"../toolDbVerificationWrapper":255}],240:[function(e,t,r){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,r){var e,n=this;this.store.query(t.key).then(function(e){n.network.sendToClientId(r,{type:"queryAck",id:t.id,to:[],keys:e})}).catch(function(e){}),this.options.server&&(e=i(i({},t),{to:o(o([],t.to,!0),[r],!1)}),this.network.sendToAll(e,!0))}},{}],241:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r,n){var i=this,e=n+"-"+r.key;this.subscriptions.includes(e)||(this.subscriptions.push(e),this.addKeyListener(r.key,function(e){n&&(e={data:e,id:r.id,type:"put",to:[]},i.network.sendToClientId(n,e))})),this.store.get(r.key).then(function(e){try{var t={data:JSON.parse(e),id:r.id,type:"put",to:[]};i.network.sendToClientId(n,t)}catch(e){}}).catch(function(e){})}},{}],242:[function(e,t,r){var n=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},i=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,this.userAccount.anonUser()];case 1:return e.sent(),[2]}})})}},{}],243:[function(e,t,r){var n=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},u=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},c=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(a,s,f){return n(this,void 0,void 0,function(){var i,o=this;return u(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e){return setTimeout(e,500)})];case 1:return(e.sent(),this.isConnected)?(i=(0,c.textRandom)(10),[2,new Promise(function(t,r){var n=setTimeout(function(){o.removeIdListener(i),t()},2e3);o.addIdListener(i,function(e){if(clearTimeout(n),o.removeIdListener(i),"put"===e.type&&e.data){e=e.data;if(e.a!==s.a)return e.t<s.t?void r(new Error("Username conflict: peer registered first at ".concat(new Date(e.t).toISOString()))):e.t>s.t?(o.logger("Our signup is older, keeping our version"),void t()):void(s.a<e.a?(o.logger("Same timestamp, our address wins alphabetically"),t()):r(new Error("Username conflict: peer's address wins tiebreaker")))}t()}),o.network.sendToAll({type:"get",to:f||[],key:a,id:i})})]):(this.logger("No peers connected, skipping conflict check"),[2])}})})}},{".":231}],244:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){var r;if(this.processedIds[e.type]||(this.processedIds[e.type]=[]),!this.processedIds[e.type].includes(e.id))if(this.emit("message",e,t),this.processedIds[e.type].push(e.id),this.logger("Got message ".concat(e.type," from ").concat(t)),this.logger(e),e.id&&(r=e.id,this._idListeners[r])&&(this._idListeners[r](e),this.removeIdListener(r)),void 0===e||void 0===e.type)this.logger("Message is invalid!",e,typeof e);else switch(e.type){case"ping":this.handlePing(e,t);break;case"pong":this.handlePong(e,t);break;case"subscribe":this.handleSubscribe(e,t);break;case"get":this.handleGet(e,t);break;case"put":this.handlePut(e,t);break;case"crdtPut":this.handleCrdtPut(e,t);break;case"crdtGet":this.handleCrdtGet(e,t);break;case"query":this.handleQuery(e,t);break;case"function":this.handleFunction(e,t)}}},{}],245:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var h=e(".");r.default=function(o,a,s,f,u){var c=this;return void 0===s&&(s=!1),void 0===f&&(f=1e3),new Promise(function(r,e){var t,n,i;s&&void 0===c.userAccount.getAddress()?e(new Error("You are not authorized yet!")):(t=s?":".concat(c.userAccount.getAddress(),".").concat(o):o,c.logger("CRDT GET",t),n=(0,h.textRandom)(10),i=setTimeout(function(){c.store.get(t).then(function(e){try{var t=JSON.parse(e);a.mergeChanges(t.v),c.emit("data",t),r(t)}catch(e){r(null)}}).catch(function(e){return r(null)})},f),c.addIdListener(n,function(e){c.logger("GET RECV",t),clearTimeout(i),"crdtPut"===e.type&&(a.mergeChanges(e.data.v),r(e))}),c.store.get(t).then(function(e){try{var t=JSON.parse(e);clearTimeout(i),c.removeIdListener(n),a.mergeChanges(t.v),c.emit("data",t),r(t)}catch(e){}}).catch(function(){}),c.network.sendToAll({type:"crdtGet",to:u||[],key:t,id:n}))})}},{".":231}],246:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var h=e(".");r.default=function(a,s,f,u){var c=this;return void 0===f&&(f=!1),new Promise(function(n,e){var i,o,t;a.includes(".")?e(new Error("Key cannot include dots!; ".concat(a))):c.userAccount.getAddress()?(i=(new Date).getTime(),o=s.getChanges(),t=JSON.stringify(o),t="".concat(t).concat(c.userAccount.getAddress()).concat(i),(0,h.proofOfWork)(t,c.options.pow).then(function(e){var t=e.hash,r=e.nonce;c.userAccount.signData(t).then(function(e){e&&c.userAccount.getAddress()&&(e={k:f?":".concat(c.userAccount.getAddress(),".").concat(a):a,a:c.userAccount.getAddress()||"",n:r,t:i,h:t,s:e,v:o,c:s.type},c.logger("PUT CRDT",a,e),e={type:"crdtPut",id:(0,h.textRandom)(10),to:u||[],data:e},c.network.sendToAll(e),n(e))})}).catch(e)):e(new Error("You need to log in before you can PUT."))})}},{".":231}],247:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var f=e(".");r.default=function(i,o,a){var s=this;return void 0===a&&(a=1e4),new Promise(function(t,e){s.logger("FUNCTION > "+i);var r=(0,f.textRandom)(10),n=setTimeout(function(){t({return:"Timed out",code:"ERR"})},a);s.addIdListener(r,function(e){s.logger("FUNCTION RECV > "+i,e),clearTimeout(n),"functionReturn"===e.type&&t({return:e.return,code:e.code})}),s.network.sendToAll({type:"function",to:[],function:i,args:o,id:r})})}},{".":231}],248:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var c=e(".");r.default=function(r,a,s,f){var u=this;return void 0===a&&(a=!1),void 0===s&&(s=1e3),new Promise(function(n,e){var t,i,o;a&&void 0===u.userAccount.getAddress()?e(new Error("You are not authorized yet!")):(t=a?":".concat(u.userAccount.getAddress(),".").concat(r):r,u.logger("GET",t),i=(0,c.textRandom)(10),o=setTimeout(function(){u.store.get(t).then(function(e){try{var t=JSON.parse(e);u.emit("data",t),n(t.v)}catch(e){n(null)}}).catch(function(e){n(null)})},s),u.addIdListener(i,function(e){u.logger("GET RECV",t),clearTimeout(o),"put"===e.type&&n(e.data.v)}),u.store.get(t).then(function(e){try{var t=JSON.parse(e),r=t.v;clearTimeout(o),u.removeIdListener(i),u.emit("data",t),n(r)}catch(e){}}).catch(function(e){}),u.network.sendToAll({type:"get",to:f||[],key:t,id:i}))})}},{".":231}],249:[function(e,t,r){var i=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},o=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},a=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(r,n){return i(this,void 0,void 0,function(){var t;return o(this,function(e){switch(e.label){case 0:return this.userAccount?[4,this.userAccount.getAccountFromPrivate(r)]:[2,Promise.resolve(void 0)];case 1:return t=e.sent(),[4,this.userAccount.setUser(t,n||(0,a.randomAnimal)())];case 2:return e.sent(),[2,t]}})})}},{".":231}],250:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var d=e(".");r.default=function(s,f,u,c){var h=this;return void 0===u&&(u=!1),new Promise(function(o,e){var a,t;s.includes(".")?e(new Error("Key cannot include dots!; ".concat(s))):h.userAccount&&h.userAccount.getAddress()?(a=(new Date).getTime(),t="".concat(JSON.stringify(f)).concat(h.userAccount.getAddress()).concat(a),(0,d.proofOfWork)(t,h.options.pow).then(function(e){var n=e.hash,i=e.nonce;h.userAccount.signData(n).then(function(e){var t,r;e&&h.userAccount.getAddress()&&(e={k:t=u?":".concat(h.userAccount.getAddress(),".").concat(s):s,a:h.userAccount.getAddress()||"",n:i,t:a,h:n,s:e,v:f,c:null},h.logger("PUT",s,e),r={type:"put",id:(0,d.textRandom)(10),to:c||[],data:e},h.network.sendToAll(r),h.store.put(t,JSON.stringify(e)).catch(function(e){}).finally(function(){o(r)}))})}).catch(e)):e(new Error("You need to log in before you can PUT."))})}},{".":231}],251:[function(e,t,r){var l=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},p=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(s,f,u,c){var h=this,d=(void 0===f&&(f=!1),void 0===u&&(u=1e3),this.userAccount);return new Promise(function(e,t){var r,n,i,o,a;f&&void 0===d.getAddress()?t(new Error("You are not authorized yet!")):(r=f?":".concat(d.getAddress(),".").concat(s):s,h.logger("QUERY",r),t=(0,p.textRandom)(10),o=!(n=[]),h.store.query(r).then(function(e){n=l(l([],n,!0),e,!0),o=!0,i=setTimeout(a,u)}).catch(function(e){o=!0,i=setTimeout(a,u)}),a=function(){e((0,p.uniq)(n))},h.addIdListener(t,function(e){h.logger("QUERY RECV",r),"queryAck"===e.type&&(n=l(l([],n,!0),e.keys,!0),i&&clearTimeout(i),o)&&(i=setTimeout(a,u))}),h.network.sendToAll({type:"query",to:c||[],key:r,id:t}))})}},{".":231}],252:[function(e,t,r){var a=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},s=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},f=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(i,e,r){var o=this;return new Promise(function(n,t){o.getData("==".concat(i),!1,2e3,r).then(function(r){if(r)try{o.userAccount.decryptAccount(r,(0,f.sha256)(e)).then(function(t){return a(o,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.userAccount.setUser(t,i||"Anonymous ".concat((0,f.randomAnimal)()))];case 1:return e.sent(),n(r),[2]}})})}).catch(function(e){t(e)})}catch(e){t(e)}else t("Could not find user")}).catch(function(e){t(e)})})}},{".":231}],253:[function(e,t,r){var n=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},b=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},y=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(d,l,p){return n(this,void 0,void 0,function(){var t,r,n,i,o,a,s,f,u,c,h=this;return b(this,function(e){switch(e.label){case 0:t="==".concat(d),r=null,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.store.get(t)];case 2:return a=e.sent(),r=JSON.parse(a),[3,4];case 3:return e.sent(),r=null,[3,4];case 4:if(null!==r)throw new Error("User already exists locally!");return[4,(n=new this.options.userAdapter(this)).encryptAccount((0,y.sha256)(l))];case 5:return i=e.sent(),o=(new Date).getTime(),a="".concat(JSON.stringify(i)).concat(n.getAddress()).concat(o),[4,(0,y.proofOfWork)(a,this.options.pow)];case 6:return f=e.sent(),s=f.hash,f=f.nonce,[4,n.signData(s)];case 7:return u=e.sent(),u={k:t,a:n.getAddress()||"",n:f,t:o,h:s,s:u,v:i,c:null},this.logger("SIGNUP PUT",t,u),c={type:"put",id:(0,y.textRandom)(10),to:p||[],data:u},[4,this.store.put(t,JSON.stringify(u))];case 8:return e.sent(),this.network.sendToAll(c),this._checkSignupConflicts(t,u,p).catch(function(e){h.logger("Signup conflict check warning:",e.message),h.emit("signup-conflict-detected",{username:d,localTimestamp:o,error:e.message})}),[2,c]}})})}},{".":231}],254:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var s=e(".");r.default=function(n,i,o){var a=this;return void 0===i&&(i=!1),new Promise(function(e,t){var r;i&&void 0===a.userAccount.getAddress()?t(new Error("You are not authorized yet!")):(r=i?":".concat(a.userAccount.getAddress(),".").concat(n):n,a.logger("SUBSCRIBE",r),t=(0,s.textRandom)(10),a.network.sendToAll({type:"subscribe",key:r,to:o||[],id:t}),a.store.get(r).then(function(e){try{var t=JSON.parse(e);a.triggerKeyListener(r,t)}catch(e){}}).catch(function(e){}).finally(function(){e()}))})}},{".":231}],255:[function(e,t,r){var n=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},a=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},s=(Object.defineProperty(r,"__esModule",{value:!0}),e("."));r.default=function(o){var e=this;return new Promise(function(i){e.verifyMessage(o,e.options.pow).then(function(t){return n(e,void 0,void 0,function(){var r,n=this;return a(this,function(e){return t?(r=!0,this._customVerificator.forEach(function(e){var t;e&&o.k&&o.k.startsWith(e.key)&&(r=!1,t=void 0,n.store.get(o.k).then(function(e){try{t=JSON.parse(e)}catch(e){}}).catch(function(e){}).finally(function(){e.fn(o,t).then(function(e){i(e?s.VerifyResult.Verified:s.VerifyResult.CustomVerificationFailed)}).catch(function(e){i(s.VerifyResult.CustomVerificationFailed)})}))}),r&&i(t)):i(s.VerifyResult.InvalidVerification),[2]})})})})}},{".":231}],256:[function(e,L,t){var n,r,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},f=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},u=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=(Object.defineProperty(t,"__esModule",{value:!0}),a(e("events"))),c=e("."),h=a(e("./toolDbGet")),d=a(e("./toolDbPut")),l=a(e("./toolDbSignIn")),p=a(e("./toolDbSignUp")),b=a(e("./toolDbCrdtGet")),y=a(e("./toolDbCrdtPut")),m=a(e("./toolDbFunction")),g=a(e("./toolDbAnonSignIn")),v=a(e("./toolDbClientOnMessage")),_=a(e("./toolDbVerificationWrapper")),w=a(e("./toolDbCheckSignupConflicts")),M=a(e("./toolDbQueryKeys")),S=a(e("./toolDbKeysSignIn")),A=a(e("./toolDbSubscribe")),k=a(e("./messageHandlers/handleGet")),E=a(e("./messageHandlers/handlePut")),x=a(e("./messageHandlers/handlePing")),P=a(e("./messageHandlers/handlePong")),j=a(e("./messageHandlers/handleQuery")),R=a(e("./messageHandlers/handleFunction")),O=a(e("./messageHandlers/handleCrdtGet")),I=a(e("./messageHandlers/handleCrdtPut")),T=a(e("./messageHandlers/handleSubscribe")),B=a(e("./logger")),a=(r=s.default,i(C,r),Object.defineProperty(C.prototype,"subscriptions",{get:function(){return this._subscriptions},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"processedIds",{get:function(){return this._processedIds},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"processedOutHashes",{get:function(){return this._processedOutHashes},enumerable:!1,configurable:!0}),C.prototype.getUserNamespacedKey=function(e){var t;return":"+((null==(t=this.userAccount)?void 0:t.getAddress())||"")+"."+e},Object.defineProperty(C.prototype,"functions",{get:function(){return this._functions},enumerable:!1,configurable:!0}),C.prototype.addServerFunction=function(e,t){this._functions[e]=t},Object.defineProperty(C.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"network",{get:function(){return this._network},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"serverPeers",{get:function(){return this._serverPeers},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"store",{get:function(){return this._store},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"userAccount",{get:function(){return this._userAccount},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"peerAccount",{get:function(){return this._peerAccount},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"ready",{get:function(){return this._initPromise},enumerable:!1,configurable:!0}),C.prototype._initializeAccounts=function(o,a,s){return f(this,void 0,void 0,function(){var t,r,n,i;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,11]),[4,o.get(a)];case 1:return t=e.sent(),[4,this.peerAccount.decryptAccount(JSON.parse(t),a)];case 2:return t=e.sent(),[4,this.peerAccount.setUser(t,(0,c.randomAnimal)())];case 3:return e.sent(),[3,11];case 4:return e.sent(),[4,this.peerAccount.anonUser()];case 5:return e.sent(),[4,this.peerAccount.encryptAccount(a)];case 6:r=e.sent(),e.label=7;case 7:return e.trys.push([7,9,,10]),[4,o.put(a,JSON.stringify(r))];case 8:return e.sent(),[3,10];case 9:return e.sent(),[3,10];case 10:return[3,11];case 11:return e.trys.push([11,15,,17]),[4,o.get(s)];case 12:return n=e.sent(),[4,this.userAccount.decryptAccount(JSON.parse(n),s)];case 13:return n=e.sent(),i=(null==n?void 0:n.name)||this.userAccount.getUsername()||(0,c.randomAnimal)(),[4,this.userAccount.setUser(n,i)];case 14:return e.sent(),[3,17];case 15:return e.sent(),[4,this.userAccount.anonUser()];case 16:return e.sent(),[3,17];case 17:return this.emit("init",this.userAccount.getAddress()),[2]}})})},C.prototype.close=function(){return f(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return this._store&&"function"==typeof this._store.close?[4,this._store.close()]:[3,2];case 1:e.sent(),e.label=2;case 2:return this._peerStore&&"function"==typeof this._peerStore.close?[4,this._peerStore.close()]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},C);function C(e){void 0===e&&(e={});var n=r.call(this)||this;n._serverPeers=[],n.logger=B.default,n.clientOnMessage=v.default,n.verifyMessage=c.verifyMessage,n._subscriptions=[],n._processedIds={},n._processedOutHashes={},n.subscribeData=A.default,n.isConnected=!1,n.onDisconnect=function(){},n.onConnect=function(){},n.onPeerDisconnect=function(e){},n.onPeerConnect=function(e){},n.getData=h.default,n.putData=d.default,n.putCrdt=y.default,n.getCrdt=b.default,n.queryKeys=M.default,n.doFunction=m.default,n.signIn=l.default,n.anonSignIn=g.default,n.keysSignIn=S.default,n.signUp=p.default,n.verify=_.default,n._checkSignupConflicts=w.default,n.handlePing=x.default,n.handlePong=P.default,n.handleCrdtGet=O.default,n.handleCrdtPut=I.default,n.handleGet=k.default,n.handlePut=E.default,n.handleQuery=j.default,n.handleSubscribe=T.default,n.handleFunction=R.default,n._idListeners={},n.addIdListener=function(e,t){n._idListeners[e]=t},n.removeIdListener=function(e){delete n._idListeners[e]},n._functions={},n._keyListeners=[],n.addKeyListener=function(e,t){return n.logger("Add key listener: ".concat(e)),n._keyListeners.push({key:e,timeout:null,fn:t}),n._keyListeners.length-1},n.removeKeyListener=function(e){var t;null!=(t=n._keyListeners[e])&&t.timeout&&clearTimeout((null==(t=n._keyListeners[e])?void 0:t.timeout)||void 0),n._keyListeners[e]=null},n.triggerKeyListener=function(t,r){n._keyListeners.forEach(function(e){(null==e?void 0:e.key)===t&&(n.logger("Trigger key listener: ".concat(t)),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(function(){return e.fn(r)},n.options.triggerDebouce))})},n._customVerificator=[],n.addCustomVerification=function(e,t){return n._customVerificator.push({key:e,fn:t}),n._customVerificator.length},n.removeCustomVerification=function(e){n._customVerificator[e]=null},n._options={peers:[],maxRetries:5,triggerDebouce:100,wait:2e3,pow:0,server:!1,host:"127.0.0.1",port:8080,debug:!1,httpServer:void 0,networkAdapter:c.ToolDbNetworkAdapter,storageAdapter:c.ToolDbStorageAdapter,userAdapter:c.ToolDbUserAdapter,storageName:"tooldb",topic:"tool-db-default",serverName:void 0,ssl:!1,modules:{}},n._options=o(o({},n.options),e),n._store=new n.options.storageAdapter(n),n._peerAccount=new n.options.userAdapter(n),n._userAccount=new n.options.userAdapter(n),n._network=new n.options.networkAdapter(n);return n._peerStore=new n.options.storageAdapter(n,"_____peer_"+n.options.storageName),n._initPromise=n._initializeAccounts(n._peerStore,"%default-peer%","%default-user%").catch(function(e){throw n.logger("Failed to initialize ToolDb",e),e}),n}t.default=a},{".":231,"./logger":232,"./messageHandlers/handleCrdtGet":233,"./messageHandlers/handleCrdtPut":234,"./messageHandlers/handleFunction":235,"./messageHandlers/handleGet":236,"./messageHandlers/handlePing":237,"./messageHandlers/handlePong":238,"./messageHandlers/handlePut":239,"./messageHandlers/handleQuery":240,"./messageHandlers/handleSubscribe":241,"./toolDbAnonSignIn":242,"./toolDbCheckSignupConflicts":243,"./toolDbClientOnMessage":244,"./toolDbCrdtGet":245,"./toolDbCrdtPut":246,"./toolDbFunction":247,"./toolDbGet":248,"./toolDbKeysSignIn":249,"./toolDbPut":250,"./toolDbQueryKeys":251,"./toolDbSignIn":252,"./toolDbSignUp":253,"./toolDbSubscribe":254,"./toolDbVerificationWrapper":255,events:106}],257:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.VerifyResult=void 0,(r=r.VerifyResult||(r.VerifyResult={})).CustomVerificationFailed="CustomVerificationFailed",r.InvalidData="InvalidData",r.InvalidVerification="InvalidVerification",r.CantOverwrite="CantOverwrite",r.InvalidTimestamp="InvalidTimestamp",r.AddressMismatch="AddressMismatch",r.NoProofOfWork="NoProofOfWork",r.InvalidHashNonce="InvalidHashNonce",r.InvalidSignature="InvalidSignature",r.Verified="Verified"},{}],258:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})},{}],259:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){}},{}],260:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){for(var t,r=new DataView(e),n="",i=0,o=r.byteLength;i<o;i+=1)n+=t=(t=r.getUint8(i).toString(16)).length<2?"0"+t:t;return n.toLowerCase()}},{}],261:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return(new TextDecoder).decode(e)}},{}],262:[function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(r,"__esModule",{value:!0}),n(e("./fromBase64")));r.default=function(e){for(var t=(0,o.default)(e),e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0,i=t.length;n<i;n+=1)r[n]=t.charCodeAt(n);return r}},{"./fromBase64":263}],263:[function(e,t,r){!function(t){!function(){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return decodeURIComponent(escape(t.atob(e)))}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],264:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return(e=e.toUpperCase().match(/[\dA-F]{2}/gi))?(e=e.map(function(e){return parseInt(e,16)}),new Uint8Array(e).buffer):new Uint8Array}},{}],265:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){for(var t=e.toString(),r="",n=0;n<t.length;n+=2)r+=String.fromCharCode(parseInt(t.substr(n,2),16));return r}},{}],266:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("../..");r.default=function(e){return new Uint8Array((0,n.hexToArrayBuffer)(e))}},{"../..":231}],267:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return(new TextEncoder).encode(e).buffer}},{}],268:[function(e,t,r){!function(t){!function(){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return t.btoa(unescape(encodeURIComponent(e)))}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],269:[function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=(Object.defineProperty(r,"__esModule",{value:!0}),n(e("./toBase64")));r.default=function(e){for(var t="",r=0;r<e.byteLength;r+=1)t+=String.fromCodePoint(e[r]);return(0,i.default)(t)}},{"./toBase64":268}],270:[function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=(Object.defineProperty(r,"__esModule",{value:!0}),n(e("./encoding/arrayBufferToHex")));r.default=function(){var e=crypto.getRandomValues(new Uint8Array(32));return(0,i.default)(e.buffer)}},{"./encoding/arrayBufferToHex":260}],271:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var o=e("..");r.default=function(e,t,r,n,i){return t=(0,o.sha256)("".concat(t,"-").concat(r,"-").concat(n,":").concat(i)),e.signData(t)}},{"..":231}],272:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var o=e("..");r.default=function(n,i){return new Promise(function(e){if(null===i||0===i)e({nonce:0,hash:(0,o.sha256)("".concat(n,"0"))});else{for(var t=0,r=(0,o.sha256)("".concat(n).concat(t));r.substring(0,i)!==Array(i+1).join("0");)t+=1,r=(0,o.sha256)("".concat(n).concat(t));e({nonce:t,hash:r})}})}},{"..":231}],273:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=["Fast","Slow","Cute","Evil","Anxious","Cursed","Average","Zombie","Smart","Small","Tall","Amazing","Splendid","Fat","Invisible","Regular","Domestic","Unique","Soft","Lazy","Angry","Relaxed","Huge","Shy","Playful","Creepy","Ancient","Beautiful"],i=["Snake","Monkey","Platypus","Fox","Lynx","Pug","Chicken","Slug","Snail","Pig","Cow","Sheep","Horse","Squirrel","Turtle","Unicorn","Dragon","Dolphin","Cat","Chow Chow","Elephant","Meerkat","Polar Bear","Bear","Rabbit","Koala","Parrot","Raven","Frog","Rat","Mouse","Bee","Tiger","Lion","Giraffe","Ant","Spider","Zebra"];r.default=function(){return"".concat(n[Math.floor(Math.random()*n.length)]," ").concat(i[Math.floor(Math.random()*i.length)])}},{}],274:[function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=(Object.defineProperty(r,"__esModule",{value:!0}),n(e("crypto")));r.default=function(e){var t=i.default.createHash("sha1");return t.update(e),t.digest("hex")}},{crypto:66}],275:[function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=(Object.defineProperty(r,"__esModule",{value:!0}),n(e("crypto")));r.default=function(e){var t=i.default.createHash("sha256");return t.update(e),t.digest("hex")}},{crypto:66}],276:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){for(var r=e=void 0===e?24:e,n="",i=t||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";0<r;)n+=i.charAt(Math.floor(Math.random()*i.length)),--r;return n}},{}],277:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return Array.from(new Set(e))}},{}],278:[function(e,t,r){var n=this&&this.__awaiter||function(e,a,s,f){return new(s=s||Promise)(function(r,t){function n(e){try{o(f.next(e))}catch(e){t(e)}}function i(e){try{o(f.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((f=f.apply(e,a||[])).next())})},s=this&&this.__generator||function(n,i){var o,a,s,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},u={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;f=u&&t[u=0]?0:f;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return f.label++,{value:t[1],done:!1};case 5:f.label++,a=t[1],t=[0];continue;case 7:t=f.ops.pop(),f.trys.pop();continue;default:if(!(s=0<(s=f.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){f=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))f.label=t[1];else if(6===t[0]&&f.label<s[1])f.label=s[1],s=t;else{if(!(s&&f.label<s[2])){s[2]&&f.ops.pop(),f.trys.pop();continue}f.label=s[2],f.ops.push(t)}}t=i.call(n,f)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},f=(Object.defineProperty(r,"__esModule",{value:!0}),e(".."));r.default=function(o,a){return void 0===a&&(a=0),n(this,void 0,void 0,function(){var t,r,n,i;return s(this,function(e){switch(e.label){case 0:return(t=JSON.stringify(o.v),void 0===o.t||void 0===o.k||void 0===o.h||void 0===o.a||void 0===o.s||void 0===o.c)?[2,f.VerifyResult.InvalidData]:o.t>(new Date).getTime()+3e4?[2,f.VerifyResult.InvalidTimestamp]:(r=!1,":"==o.k.slice(0,1)&&(r=o.k.split(".")[0].slice(1)),"=="!=o.k.slice(0,2)?[3,2]:(n=o.k,[4,this.store.get(n).then(function(e){try{return JSON.parse(e)}catch(e){return null}}).catch(function(){return null})]));case 1:if((n=e.sent())&&n.a!==o.a)return[2,f.VerifyResult.CantOverwrite];e.label=2;case 2:if(r&&r!==o.a)return[2,f.VerifyResult.AddressMismatch];if(null!==a&&0<a){if(o.h.slice(0,a)!==new Array(a).fill("0").join(""))return[2,f.VerifyResult.NoProofOfWork];if((0,f.sha256)("".concat(t).concat(o.a).concat(o.t).concat(o.n))!==o.h)return[2,f.VerifyResult.InvalidHashNonce]}return this.userAccount?[4,this.userAccount.verifySignature(o)]:[3,4];case 3:return i=e.sent(),[3,5];case 4:i=!1,e.label=5;case 5:return[2,i?f.VerifyResult.Verified:f.VerifyResult.InvalidSignature]}})})}},{"..":231}],279:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("..");r.default=function(e,t){var r=(0,n.sha256)("".concat(t.topic,"-").concat(t.timestamp,"-").concat(t.host,":").concat(t.port));return e.verifyMessage({h:r,a:t.address,s:t.sig})}},{"..":231}]},{},[231])(231)});