From f7b677ee074e4d62c8c255dbae59eb55fb485ccc Mon Sep 17 00:00:00 2001 From: Jannik Buhr Date: Tue, 30 Aug 2022 10:49:25 +0200 Subject: [PATCH] update to developement molstar version closes #10 --- _extensions/molstar/assets/molstar.js | 2 +- index.html | 38 +++++++++++-------- index_files/libs/bootstrap/bootstrap.min.css | 4 +- .../quarto-contrib/molstar-v3.13.0/molstar.js | 2 +- molstar.js | 2 +- presentation.html | 10 ++--- .../quarto-contrib/molstar-v3.13.0/molstar.js | 2 +- 7 files changed, 33 insertions(+), 27 deletions(-) diff --git a/_extensions/molstar/assets/molstar.js b/_extensions/molstar/assets/molstar.js index ee61b97..f4c58da 100644 --- a/_extensions/molstar/assets/molstar.js +++ b/_extensions/molstar/assets/molstar.js @@ -1,2 +1,2 @@ /*! For license information please see molstar.js.LICENSE.txt */ -!function(e,A){"object"==typeof exports&&"object"==typeof module?module.exports=A():"function"==typeof define&&define.amd?define([],A):"object"==typeof exports?exports.molstar=A():e.molstar=A()}(self,(()=>(()=>{var e={1944:()=>{"use strict";var e,A,t,r,n,i,a,o;"undefined"!=typeof window&&function(){window.console=window.console||{};for(var e,A,t=window.console,r={},n=function(){},i="memory".split(","),a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)t[e]||(t[e]=r);for(;A=a.pop();)t[A]||(t[A]=n)}(),void 0===window.HTMLCanvasElement||window.HTMLCanvasElement.prototype.toBlob||Object.defineProperty(window.HTMLCanvasElement.prototype,"toBlob",{value:function(e,A,t){for(var r=window.atob(this.toDataURL(A,t).split(",")[1]),n=r.length,i=n>>2,a=new Uint8Array(n),o=new Uint32Array(a.buffer,0,i),s=0,u=0;u0?1:-1}),Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&e>-9007199254740992&&e<9007199254740992&&Math.floor(e)===e}),Number.isNaN||(Number.isNaN=function(e){return e!=e}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var A,t=Object(e),r=!1,n=1;n1?arguments[1]:void 0,o=a?Number(a):0;Number.isNaN(o)&&(o=0);var s=Math.min(Math.max(o,0),r);if(i+s>r)return!1;for(var u=-1;++ut.length)&&(A=t.length),A-=e.length;var r=t.indexOf(e,A);return-1!==r&&r===A}),String.prototype.repeat||(String.prototype.repeat=function(e){if(null===this)throw new TypeError("can't convert "+this+" to object");var A=""+this;if(e=+e,Number.isNaN(e)&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e===1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0===A.length||0===e)return"";if(A.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var t="";1==(1&e)&&(t+=A),0!=(e>>>=1);)A+=A;return t}),String.prototype.includes||(String.prototype.includes=function(e,A){return"number"!=typeof A&&(A=0),!(A+e.length>this.length)&&-1!==this.indexOf(e,A)}),Array.prototype.includes||(Array.prototype.includes=function(e){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");var A=Object(this),t=parseInt(A.length,10)||0;if(0===t)return!1;var r,n,i=parseInt(arguments[1],10)||0;for(i>=0?r=i:(r=t+i)<0&&(r=0);r0?1:-1)*Math.floor(Math.abs(A)):A}(e);return Math.min(Math.max(A,0),i)},function(e){var A=this,t=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var r,i=arguments.length>1?arguments[1]:void 0;if(void 0!==i){if(!n(i))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(r=arguments[2])}for(var o,s=a(t.length),u=n(A)?Object(new A(s)):new Array(s),c=0;c>>0;if("function"!=typeof e)throw TypeError("predicate must be a function");for(var r=arguments[1],n=0;n>>0,r=arguments[1],n=r>>0,i=n<0?Math.max(t+n,0):Math.min(n,t),a=arguments[2],o=void 0===a?t:a>>0,s=o<0?Math.max(t+o,0):Math.min(o,t);i>>0,n=e>>0,i=n<0?Math.max(r+n,0):Math.min(n,r),a=A>>0,o=a<0?Math.max(r+a,0):Math.min(a,r),s=arguments[2],u=void 0===s?r:s>>0,c=u<0?Math.max(r+u,0):Math.min(u,r),g=Math.min(c-o,r-i),l=1;for(o0;)o in t?t[i]=t[o]:delete t[i],o+=l,i+=l,g--;return t},configurable:!0,writable:!0}),Int8Array.prototype.copyWithin||Object.defineProperty(Int8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int16Array.prototype.copyWithin||Object.defineProperty(Int16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int32Array.prototype.copyWithin||Object.defineProperty(Int32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint8Array.prototype.copyWithin||Object.defineProperty(Uint8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint16Array.prototype.copyWithin||Object.defineProperty(Uint16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint32Array.prototype.copyWithin||Object.defineProperty(Uint32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float32Array.prototype.copyWithin||Object.defineProperty(Float32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float64Array.prototype.copyWithin||Object.defineProperty(Float64Array.prototype,"copyWithin",{value:Array.prototype.copyWithin})},9809:(e,A,t)=>{"use strict";const r=A;r.bignum=t(4590),r.define=t(2500).define,r.base=t(1979),r.constants=t(6826),r.decoders=t(8307),r.encoders=t(6579)},2500:(e,A,t)=>{"use strict";const r=t(6579),n=t(8307),i=t(5717);function a(e,A){this.name=e,this.body=A,this.decoders={},this.encoders={}}A.define=function(e,A){return new a(e,A)},a.prototype._createNamed=function(e){const A=this.name;function t(e){this._initNamed(e,A)}return i(t,e),t.prototype._initNamed=function(A,t){e.call(this,A,t)},new t(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e]},a.prototype.decode=function(e,A,t){return this._getDecoder(A).decode(e,t)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},a.prototype.encode=function(e,A,t){return this._getEncoder(A).encode(e,t)}},6625:(e,A,t)=>{"use strict";const r=t(5717),n=t(8465).b,i=t(2399).Buffer;function a(e,A){n.call(this,A),i.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,A){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return o.isEncoderBuffer(e)||(e=new o(e,A)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return A.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=i.byteLength(e);else{if(!i.isBuffer(e))return A.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(a,n),A.C=a,a.isDecoderBuffer=function(e){return e instanceof a||"object"==typeof e&&i.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},a.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},a.prototype.restore=function(e){const A=new a(this.base);return A.offset=e.offset,A.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),A},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,A){if(!(this.offset+e<=this.length))return this.error(A||"DecoderBuffer overrun");const t=new a(this.base);return t._reporterState=this._reporterState,t.offset=this.offset,t.length=this.offset+e,this.offset+=e,t},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},A.R=o,o.isEncoderBuffer=function(e){return e instanceof o||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},o.prototype.join=function(e,A){return e||(e=i.alloc(this.length)),A||(A=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(t){t.join(e,A),A+=t.length})):("number"==typeof this.value?e[A]=this.value:"string"==typeof this.value?e.write(this.value,A):i.isBuffer(this.value)&&this.value.copy(e,A),A+=this.length)),e}},1979:(e,A,t)=>{"use strict";const r=A;r.Reporter=t(8465).b,r.DecoderBuffer=t(6625).C,r.EncoderBuffer=t(6625).R,r.Node=t(1949)},1949:(e,A,t)=>{"use strict";const r=t(8465).b,n=t(6625).R,i=t(6625).C,a=t(9746),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 u(e,A,t){const r={};this._baseState=r,r.name=t,r.enc=e,r.parent=A||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())}e.exports=u;const c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){const e=this._baseState,A={};c.forEach((function(t){A[t]=e[t]}));const t=new this.constructor(A.parent);return t._baseState=A,t},u.prototype._wrap=function(){const e=this._baseState;s.forEach((function(A){this[A]=function(){const t=new this.constructor(this);return e.children.push(t),t[A].apply(t,arguments)}}),this)},u.prototype._init=function(e){const A=this._baseState;a(null===A.parent),e.call(this),A.children=A.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(A.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(e){const A=this._baseState,t=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==t.length&&(a(null===A.children),A.children=t,t.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===A.args),A.args=e,A.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const A={};return Object.keys(e).forEach((function(t){t==(0|t)&&(t|=0);const r=e[t];A[r]=t})),A})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){u.prototype[e]=function(){const A=this._baseState;throw new Error(e+" not implemented for encoding: "+A.enc)}})),o.forEach((function(e){u.prototype[e]=function(){const A=this._baseState,t=Array.prototype.slice.call(arguments);return a(null===A.tag),A.tag=e,this._useArgs(t),this}})),u.prototype.use=function(e){a(e);const A=this._baseState;return a(null===A.use),A.use=e,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(e){const A=this._baseState;return a(null===A.default),A.default=e,A.optional=!0,this},u.prototype.explicit=function(e){const A=this._baseState;return a(null===A.explicit&&null===A.implicit),A.explicit=e,this},u.prototype.implicit=function(e){const A=this._baseState;return a(null===A.explicit&&null===A.implicit),A.implicit=e,this},u.prototype.obj=function(){const e=this._baseState,A=Array.prototype.slice.call(arguments);return e.obj=!0,0!==A.length&&this._useArgs(A),this},u.prototype.key=function(e){const A=this._baseState;return a(null===A.key),A.key=e,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(e){const A=this._baseState;return a(null===A.choice),A.choice=e,this._useArgs(Object.keys(e).map((function(A){return e[A]}))),this},u.prototype.contains=function(e){const A=this._baseState;return a(null===A.use),A.contains=e,this},u.prototype._decode=function(e,A){const t=this._baseState;if(null===t.parent)return e.wrapResult(t.children[0]._decode(e,A));let r,n=t.default,a=!0,o=null;if(null!==t.key&&(o=e.enterKey(t.key)),t.optional){let r=null;if(null!==t.explicit?r=t.explicit:null!==t.implicit?r=t.implicit:null!==t.tag&&(r=t.tag),null!==r||t.any){if(a=this._peekTag(e,r,t.any),e.isError(a))return a}else{const r=e.save();try{null===t.choice?this._decodeGeneric(t.tag,e,A):this._decodeChoice(e,A),a=!0}catch(e){a=!1}e.restore(r)}}if(t.obj&&a&&(r=e.enterObject()),a){if(null!==t.explicit){const A=this._decodeTag(e,t.explicit);if(e.isError(A))return A;e=A}const r=e.offset;if(null===t.use&&null===t.choice){let A;t.any&&(A=e.save());const r=this._decodeTag(e,null!==t.implicit?t.implicit:t.tag,t.any);if(e.isError(r))return r;t.any?n=e.raw(A):e=r}if(A&&A.track&&null!==t.tag&&A.track(e.path(),r,e.length,"tagged"),A&&A.track&&null!==t.tag&&A.track(e.path(),e.offset,e.length,"content"),t.any||(n=null===t.choice?this._decodeGeneric(t.tag,e,A):this._decodeChoice(e,A)),e.isError(n))return n;if(t.any||null!==t.choice||null===t.children||t.children.forEach((function(t){t._decode(e,A)})),t.contains&&("octstr"===t.tag||"bitstr"===t.tag)){const r=new i(n);n=this._getUse(t.contains,e._reporterState.obj)._decode(r,A)}}return t.obj&&a&&(n=e.leaveObject(r)),null===t.key||null===n&&!0!==a?null!==o&&e.exitKey(o):e.leaveKey(o,t.key,n),n},u.prototype._decodeGeneric=function(e,A,t){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(A,e,r.args[0],t):/str$/.test(e)?this._decodeStr(A,e,t):"objid"===e&&r.args?this._decodeObjid(A,r.args[0],r.args[1],t):"objid"===e?this._decodeObjid(A,null,null,t):"gentime"===e||"utctime"===e?this._decodeTime(A,e,t):"null_"===e?this._decodeNull(A,t):"bool"===e?this._decodeBool(A,t):"objDesc"===e?this._decodeStr(A,e,t):"int"===e||"enum"===e?this._decodeInt(A,r.args&&r.args[0],t):null!==r.use?this._getUse(r.use,A._reporterState.obj)._decode(A,t):A.error("unknown tag: "+e)},u.prototype._getUse=function(e,A){const t=this._baseState;return t.useDecoder=this._use(e,A),a(null===t.useDecoder._baseState.parent),t.useDecoder=t.useDecoder._baseState.children[0],t.implicit!==t.useDecoder._baseState.implicit&&(t.useDecoder=t.useDecoder.clone(),t.useDecoder._baseState.implicit=t.implicit),t.useDecoder},u.prototype._decodeChoice=function(e,A){const t=this._baseState;let r=null,n=!1;return Object.keys(t.choice).some((function(i){const a=e.save(),o=t.choice[i];try{const t=o._decode(e,A);if(e.isError(t))return!1;r={type:i,value:t},n=!0}catch(A){return e.restore(a),!1}return!0}),this),n?r:e.error("Choice not matched")},u.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},u.prototype._encode=function(e,A,t){const r=this._baseState;if(null!==r.default&&r.default===e)return;const n=this._encodeValue(e,A,t);return void 0===n||this._skipDefault(n,A,t)?void 0:n},u.prototype._encodeValue=function(e,A,t){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,A||new r);let i=null;if(this.reporter=A,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let a=null,o=!1;if(n.any)i=this._createEncoderBuffer(e);else if(n.choice)i=this._encodeChoice(e,A);else if(n.contains)a=this._getUse(n.contains,t)._encode(e,A),o=!0;else if(n.children)a=n.children.map((function(t){if("null_"===t._baseState.tag)return t._encode(null,A,e);if(null===t._baseState.key)return A.error("Child should have a key");const r=A.enterKey(t._baseState.key);if("object"!=typeof e)return A.error("Child expected, but input is not object");const n=t._encode(e[t._baseState.key],A,e);return A.leaveKey(r),n}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return A.error("Too many args for : "+n.tag);if(!Array.isArray(e))return A.error("seqof/setof, but data is not Array");const t=this.clone();t._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(t){const r=this._baseState;return this._getUse(r.args[0],e)._encode(t,A)}),t))}else null!==n.use?i=this._getUse(n.use,t)._encode(e,A):(a=this._encodePrimitive(n.tag,e),o=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,t=null===n.implicit?"universal":"context";null===e?null===n.use&&A.error("Tag could be omitted only for .use()"):null===n.use&&(i=this._encodeComposite(e,o,t,a))}return null!==n.explicit&&(i=this._encodeComposite(n.explicit,!1,"context",i)),i},u.prototype._encodeChoice=function(e,A){const t=this._baseState,r=t.choice[e.type];return r||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(t.choice))),r._encode(e.value,A)},u.prototype._encodePrimitive=function(e,A){const t=this._baseState;if(/str$/.test(e))return this._encodeStr(A,e);if("objid"===e&&t.args)return this._encodeObjid(A,t.reverseArgs[0],t.args[1]);if("objid"===e)return this._encodeObjid(A,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(A,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(A,t.args&&t.reverseArgs[0]);if("bool"===e)return this._encodeBool(A);if("objDesc"===e)return this._encodeStr(A,e);throw new Error("Unsupported tag: "+e)},u.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},u.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},8465:(e,A,t)=>{"use strict";const r=t(5717);function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,A){this.path=e,this.rethrow(A)}A.b=n,n.prototype.isError=function(e){return e instanceof i},n.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){const A=this._reporterState;A.obj=e.obj,A.path=A.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){const A=this._reporterState;A.path=A.path.slice(0,e-1)},n.prototype.leaveKey=function(e,A,t){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[A]=t)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const e=this._reporterState,A=e.obj;return e.obj={},A},n.prototype.leaveObject=function(e){const A=this._reporterState,t=A.obj;return A.obj=e,t},n.prototype.error=function(e){let A;const t=this._reporterState,r=e instanceof i;if(A=r?e:new i(t.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!t.options.partial)throw A;return r||t.errors.push(A),A},n.prototype.wrapResult=function(e){const A=this._reporterState;return A.options.partial?{result:this.isError(e)?null:e,errors:A.errors}:e},r(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}},160:(e,A)=>{"use strict";function t(e){const A={};return Object.keys(e).forEach((function(t){(0|t)==t&&(t|=0);const r=e[t];A[r]=t})),A}A.tagClass={0:"universal",1:"application",2:"context",3:"private"},A.tagClassByName=t(A.tagClass),A.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"},A.tagByName=t(A.tag)},6826:(e,A,t)=>{"use strict";const r=A;r._reverse=function(e){const A={};return Object.keys(e).forEach((function(t){(0|t)==t&&(t|=0);const r=e[t];A[r]=t})),A},r.der=t(160)},1671:(e,A,t)=>{"use strict";const r=t(5717),n=t(4590),i=t(6625).C,a=t(1949),o=t(160);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){a.call(this,"der",e)}function c(e,A){let t=e.readUInt8(A);if(e.isError(t))return t;const r=o.tagClass[t>>6],n=0==(32&t);if(31==(31&t)){let r=t;for(t=0;128==(128&r);){if(r=e.readUInt8(A),e.isError(r))return r;t<<=7,t|=127&r}}else t&=31;return{cls:r,primitive:n,tag:t,tagStr:o.tag[t]}}function g(e,A,t){let r=e.readUInt8(t);if(e.isError(r))return r;if(!A&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return e.error("length octect is too long");r=0;for(let A=0;A{"use strict";const r=A;r.der=t(1671),r.pem=t(9631)},9631:(e,A,t)=>{"use strict";const r=t(5717),n=t(2399).Buffer,i=t(1671);function a(e){i.call(this,e),this.enc="pem"}r(a,i),e.exports=a,a.prototype.decode=function(e,A){const t=e.toString().split(/[\r\n]+/g),r=A.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,s=-1;for(let e=0;e{"use strict";const r=t(5717),n=t(2399).Buffer,i=t(1949),a=t(160);function o(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new s,this.tree._init(e.body)}function s(e){i.call(this,"der",e)}function u(e){return e<10?"0"+e:e}e.exports=o,o.prototype.encode=function(e,A){return this.tree._encode(e,A).join()},r(s,i),s.prototype._encodeComposite=function(e,A,t,r){const i=function(e,A,t,r){let n;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))n=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);n=e}return n>=31?r.error("Multi-octet tag encoding unsupported"):(A||(n|=32),n|=a.tagClassByName[t||"universal"]<<6,n)}(e,A,t,this.reporter);if(r.length<128){const e=n.alloc(2);return e[0]=i,e[1]=r.length,this._createEncoderBuffer([e,r])}let o=1;for(let e=r.length;e>=256;e>>=8)o++;const s=n.alloc(2+o);s[0]=i,s[1]=128|o;for(let e=1+o,A=r.length;A>0;e--,A>>=8)s[e]=255&A;return this._createEncoderBuffer([s,r])},s.prototype._encodeStr=function(e,A){if("bitstr"===A)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===A){const A=n.alloc(2*e.length);for(let t=0;t=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let A=0;A=128;t>>=7)r++}const i=n.alloc(r);let a=i.length-1;for(let A=e.length-1;A>=0;A--){let t=e[A];for(i[a--]=127&t;(t>>=7)>0;)i[a--]=128|127&t}return this._createEncoderBuffer(i)},s.prototype._encodeTime=function(e,A){let t;const r=new Date(e);return"gentime"===A?t=[u(r.getUTCFullYear()),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):"utctime"===A?t=[u(r.getUTCFullYear()%100),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+A+" time is not supported yet"),this._encodeStr(t,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(e,A){if("string"==typeof e){if(!A)return this.reporter.error("String int or enum given, but no values map");if(!A.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=A[e]}if("number"!=typeof e&&!n.isBuffer(e)){const A=e.toArray();!e.sign&&128&A[0]&&A.unshift(0),e=n.from(A)}if(n.isBuffer(e)){let A=e.length;0===e.length&&A++;const t=n.alloc(A);return e.copy(t),0===e.length&&(t[0]=0),this._createEncoderBuffer(t)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let t=1;for(let A=e;A>=256;A>>=8)t++;const r=new Array(t);for(let A=r.length-1;A>=0;A--)r[A]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(n.from(r))},s.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},s.prototype._use=function(e,A){return"function"==typeof e&&(e=e(A)),e._getEncoder("der").tree},s.prototype._skipDefault=function(e,A,t){const r=this._baseState;let n;if(null===r.default)return!1;const i=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,A,t).join()),i.length!==r.defaultBuffer.length)return!1;for(n=0;n{"use strict";const r=A;r.der=t(6984),r.pem=t(2883)},2883:(e,A,t)=>{"use strict";const r=t(5717),n=t(6984);function i(e){n.call(this,e),this.enc="pem"}r(i,n),e.exports=i,i.prototype.encode=function(e,A){const t=n.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+A.label+"-----"];for(let e=0;e=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(e,A,t){var r=o(e,t);return t-1>=A&&(r|=o(e,t-1)<<4),r}function u(e,A,t,r){for(var n=0,i=Math.min(e.length,t),a=A;a=49?o-49+10:o>=17?o-17+10:o}return n}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,A){return e.cmp(A)>0?e:A},i.min=function(e,A){return e.cmp(A)<0?e:A},i.prototype._init=function(e,A,t){if("number"==typeof e)return this._initNumber(e,A,t);if("object"==typeof e)return this._initArray(e,A,t);"hex"===A&&(A=16),r(A===(0|A)&&A>=2&&A<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,A,t){this.length=Math.ceil((e.length-A)/6),this.words=new Array(this.length);for(var r=0;r=A;r-=2)n=s(e,A,r)<=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;else for(r=(e.length-A)%2==0?A+1:A;r=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,A,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=A)r++;r--,n=n/A|0;for(var i=e.length-t,a=i%r,o=Math.min(i,i-a)+t,s=0,c=t;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var c=["","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"],g=[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],l=[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 B(e,A,t){t.negative=A.negative^e.negative;var r=e.length+A.length|0;t.length=r,r=r-1|0;var n=0|e.words[0],i=0|A.words[0],a=n*i,o=67108863&a,s=a/67108864|0;t.words[0]=o;for(var u=1;u>>26,g=67108863&s,l=Math.min(u,A.length-1),B=Math.max(0,u-e.length+1);B<=l;B++){var Q=u-B|0;c+=(a=(n=0|e.words[Q])*(i=0|A.words[B])+g)/67108864|0,g=67108863&a}t.words[u]=0|g,s=0|c}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(e,A){var t;if(A=0|A||1,16===(e=e||10)||"hex"===e){t="";for(var n=0,i=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,a--)}for(0!==i&&(t=i.toString(16)+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var u=g[e],B=l[e];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(B).toString(e);t=(Q=Q.idivn(B)).isZero()?I+t:c[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,A){return r(void 0!==a),this.toArrayLike(a,e,A)},i.prototype.toArray=function(e,A){return this.toArrayLike(Array,e,A)},i.prototype.toArrayLike=function(e,A,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var a,o,s="le"===A,u=new e(i),c=this.clone();if(s){for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),u[o]=a;for(;o=4096&&(t+=13,A>>>=13),A>=64&&(t+=7,A>>>=7),A>=8&&(t+=4,A>>>=4),A>=2&&(t+=2,A>>>=2),t+A},i.prototype._zeroBits=function(e){if(0===e)return 26;var A=e,t=0;return 0==(8191&A)&&(t+=13,A>>>=13),0==(127&A)&&(t+=7,A>>>=7),0==(15&A)&&(t+=4,A>>>=4),0==(3&A)&&(t+=2,A>>>=2),0==(1&A)&&t++,t},i.prototype.bitLength=function(){var e=this.words[this.length-1],A=this._countBits(e);return 26*(this.length-1)+A},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,A=0;Ae.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var A;A=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var A,t;this.length>e.length?(A=this,t=e):(A=e,t=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var A=0|Math.ceil(e/26),t=e%26;this._expand(A),t>0&&A--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,A){r("number"==typeof e&&e>=0);var t=e/26|0,n=e%26;return this._expand(t+1),this.words[t]=A?this.words[t]|1<e.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var A=this.iadd(e);return e.negative=1,A._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&A;for(;0!==i&&a>26,this.words[a]=67108863&A;if(0===i&&a>>13,B=0|a[1],Q=8191&B,I=B>>>13,d=0|a[2],h=8191&d,f=d>>>13,E=0|a[3],p=8191&E,C=E>>>13,m=0|a[4],y=8191&m,v=m>>>13,b=0|a[5],D=8191&b,w=b>>>13,F=0|a[6],U=8191&F,S=F>>>13,N=0|a[7],R=8191&N,G=N>>>13,M=0|a[8],L=8191&M,x=M>>>13,H=0|a[9],k=8191&H,Y=H>>>13,_=0|o[0],V=8191&_,T=_>>>13,P=0|o[1],O=8191&P,J=P>>>13,K=0|o[2],j=8191&K,q=K>>>13,z=0|o[3],Z=8191&z,W=z>>>13,X=0|o[4],$=8191&X,ee=X>>>13,Ae=0|o[5],te=8191&Ae,re=Ae>>>13,ne=0|o[6],ie=8191&ne,ae=ne>>>13,oe=0|o[7],se=8191&oe,ue=oe>>>13,ce=0|o[8],ge=8191&ce,le=ce>>>13,Be=0|o[9],Qe=8191&Be,Ie=Be>>>13;t.negative=e.negative^A.negative,t.length=19;var de=(u+(r=Math.imul(g,V))|0)+((8191&(n=(n=Math.imul(g,T))+Math.imul(l,V)|0))<<13)|0;u=((i=Math.imul(l,T))+(n>>>13)|0)+(de>>>26)|0,de&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var he=(u+(r=r+Math.imul(g,O)|0)|0)+((8191&(n=(n=n+Math.imul(g,J)|0)+Math.imul(l,O)|0))<<13)|0;u=((i=i+Math.imul(l,J)|0)+(n>>>13)|0)+(he>>>26)|0,he&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(f,V)|0,i=Math.imul(f,T),r=r+Math.imul(Q,O)|0,n=(n=n+Math.imul(Q,J)|0)+Math.imul(I,O)|0,i=i+Math.imul(I,J)|0;var fe=(u+(r=r+Math.imul(g,j)|0)|0)+((8191&(n=(n=n+Math.imul(g,q)|0)+Math.imul(l,j)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(n>>>13)|0)+(fe>>>26)|0,fe&=67108863,r=Math.imul(p,V),n=(n=Math.imul(p,T))+Math.imul(C,V)|0,i=Math.imul(C,T),r=r+Math.imul(h,O)|0,n=(n=n+Math.imul(h,J)|0)+Math.imul(f,O)|0,i=i+Math.imul(f,J)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,q)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,q)|0;var Ee=(u+(r=r+Math.imul(g,Z)|0)|0)+((8191&(n=(n=n+Math.imul(g,W)|0)+Math.imul(l,Z)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(p,O)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(C,O)|0,i=i+Math.imul(C,J)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,q)|0)+Math.imul(f,j)|0,i=i+Math.imul(f,q)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var pe=(u+(r=r+Math.imul(g,$)|0)|0)+((8191&(n=(n=n+Math.imul(g,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(n>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(D,V),n=(n=Math.imul(D,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,O)|0,n=(n=n+Math.imul(y,J)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,J)|0,r=r+Math.imul(p,j)|0,n=(n=n+Math.imul(p,q)|0)+Math.imul(C,j)|0,i=i+Math.imul(C,q)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(f,Z)|0,i=i+Math.imul(f,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0;var Ce=(u+(r=r+Math.imul(g,te)|0)|0)+((8191&(n=(n=n+Math.imul(g,re)|0)+Math.imul(l,te)|0))<<13)|0;u=((i=i+Math.imul(l,re)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(D,O)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(w,O)|0,i=i+Math.imul(w,J)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,q)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,q)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(f,$)|0,i=i+Math.imul(f,ee)|0,r=r+Math.imul(Q,te)|0,n=(n=n+Math.imul(Q,re)|0)+Math.imul(I,te)|0,i=i+Math.imul(I,re)|0;var me=(u+(r=r+Math.imul(g,ie)|0)|0)+((8191&(n=(n=n+Math.imul(g,ae)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,ae)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(G,V)|0,i=Math.imul(G,T),r=r+Math.imul(U,O)|0,n=(n=n+Math.imul(U,J)|0)+Math.imul(S,O)|0,i=i+Math.imul(S,J)|0,r=r+Math.imul(D,j)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(h,te)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(f,te)|0,i=i+Math.imul(f,re)|0,r=r+Math.imul(Q,ie)|0,n=(n=n+Math.imul(Q,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0;var ye=(u+(r=r+Math.imul(g,se)|0)|0)+((8191&(n=(n=n+Math.imul(g,ue)|0)+Math.imul(l,se)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(L,V),n=(n=Math.imul(L,T))+Math.imul(x,V)|0,i=Math.imul(x,T),r=r+Math.imul(R,O)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(G,O)|0,i=i+Math.imul(G,J)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,q)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,q)|0,r=r+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,r=r+Math.imul(p,te)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(C,te)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,ae)|0)+Math.imul(f,ie)|0,i=i+Math.imul(f,ae)|0,r=r+Math.imul(Q,se)|0,n=(n=n+Math.imul(Q,ue)|0)+Math.imul(I,se)|0,i=i+Math.imul(I,ue)|0;var ve=(u+(r=r+Math.imul(g,ge)|0)|0)+((8191&(n=(n=n+Math.imul(g,le)|0)+Math.imul(l,ge)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(L,O)|0,n=(n=n+Math.imul(L,J)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,J)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,q)|0)+Math.imul(G,j)|0,i=i+Math.imul(G,q)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(y,te)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(v,te)|0,i=i+Math.imul(v,re)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(h,se)|0,n=(n=n+Math.imul(h,ue)|0)+Math.imul(f,se)|0,i=i+Math.imul(f,ue)|0,r=r+Math.imul(Q,ge)|0,n=(n=n+Math.imul(Q,le)|0)+Math.imul(I,ge)|0,i=i+Math.imul(I,le)|0;var be=(u+(r=r+Math.imul(g,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(g,Ie)|0)+Math.imul(l,Qe)|0))<<13)|0;u=((i=i+Math.imul(l,Ie)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,O),n=(n=Math.imul(k,J))+Math.imul(Y,O)|0,i=Math.imul(Y,J),r=r+Math.imul(L,j)|0,n=(n=n+Math.imul(L,q)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,q)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(G,Z)|0,i=i+Math.imul(G,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(D,te)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(w,te)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,r=r+Math.imul(p,se)|0,n=(n=n+Math.imul(p,ue)|0)+Math.imul(C,se)|0,i=i+Math.imul(C,ue)|0,r=r+Math.imul(h,ge)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(f,ge)|0,i=i+Math.imul(f,le)|0;var De=(u+(r=r+Math.imul(Q,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(Q,Ie)|0)+Math.imul(I,Qe)|0))<<13)|0;u=((i=i+Math.imul(I,Ie)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,q))+Math.imul(Y,j)|0,i=Math.imul(Y,q),r=r+Math.imul(L,Z)|0,n=(n=n+Math.imul(L,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(G,$)|0,i=i+Math.imul(G,ee)|0,r=r+Math.imul(U,te)|0,n=(n=n+Math.imul(U,re)|0)+Math.imul(S,te)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(y,se)|0,n=(n=n+Math.imul(y,ue)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ue)|0,r=r+Math.imul(p,ge)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(C,ge)|0,i=i+Math.imul(C,le)|0;var we=(u+(r=r+Math.imul(h,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(h,Ie)|0)+Math.imul(f,Qe)|0))<<13)|0;u=((i=i+Math.imul(f,Ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(R,te)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(G,te)|0,i=i+Math.imul(G,re)|0,r=r+Math.imul(U,ie)|0,n=(n=n+Math.imul(U,ae)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,ae)|0,r=r+Math.imul(D,se)|0,n=(n=n+Math.imul(D,ue)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,ue)|0,r=r+Math.imul(y,ge)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(v,ge)|0,i=i+Math.imul(v,le)|0;var Fe=(u+(r=r+Math.imul(p,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(p,Ie)|0)+Math.imul(C,Qe)|0))<<13)|0;u=((i=i+Math.imul(C,Ie)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,ee))+Math.imul(Y,$)|0,i=Math.imul(Y,ee),r=r+Math.imul(L,te)|0,n=(n=n+Math.imul(L,re)|0)+Math.imul(x,te)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,ae)|0)+Math.imul(G,ie)|0,i=i+Math.imul(G,ae)|0,r=r+Math.imul(U,se)|0,n=(n=n+Math.imul(U,ue)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,ue)|0,r=r+Math.imul(D,ge)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(w,ge)|0,i=i+Math.imul(w,le)|0;var Ue=(u+(r=r+Math.imul(y,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(y,Ie)|0)+Math.imul(v,Qe)|0))<<13)|0;u=((i=i+Math.imul(v,Ie)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul(k,te),n=(n=Math.imul(k,re))+Math.imul(Y,te)|0,i=Math.imul(Y,re),r=r+Math.imul(L,ie)|0,n=(n=n+Math.imul(L,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(R,se)|0,n=(n=n+Math.imul(R,ue)|0)+Math.imul(G,se)|0,i=i+Math.imul(G,ue)|0,r=r+Math.imul(U,ge)|0,n=(n=n+Math.imul(U,le)|0)+Math.imul(S,ge)|0,i=i+Math.imul(S,le)|0;var Se=(u+(r=r+Math.imul(D,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(D,Ie)|0)+Math.imul(w,Qe)|0))<<13)|0;u=((i=i+Math.imul(w,Ie)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,ie),n=(n=Math.imul(k,ae))+Math.imul(Y,ie)|0,i=Math.imul(Y,ae),r=r+Math.imul(L,se)|0,n=(n=n+Math.imul(L,ue)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ue)|0,r=r+Math.imul(R,ge)|0,n=(n=n+Math.imul(R,le)|0)+Math.imul(G,ge)|0,i=i+Math.imul(G,le)|0;var Ne=(u+(r=r+Math.imul(U,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(U,Ie)|0)+Math.imul(S,Qe)|0))<<13)|0;u=((i=i+Math.imul(S,Ie)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(k,se),n=(n=Math.imul(k,ue))+Math.imul(Y,se)|0,i=Math.imul(Y,ue),r=r+Math.imul(L,ge)|0,n=(n=n+Math.imul(L,le)|0)+Math.imul(x,ge)|0,i=i+Math.imul(x,le)|0;var Re=(u+(r=r+Math.imul(R,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(R,Ie)|0)+Math.imul(G,Qe)|0))<<13)|0;u=((i=i+Math.imul(G,Ie)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(k,ge),n=(n=Math.imul(k,le))+Math.imul(Y,ge)|0,i=Math.imul(Y,le);var Ge=(u+(r=r+Math.imul(L,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(L,Ie)|0)+Math.imul(x,Qe)|0))<<13)|0;u=((i=i+Math.imul(x,Ie)|0)+(n>>>13)|0)+(Ge>>>26)|0,Ge&=67108863;var Me=(u+(r=Math.imul(k,Qe))|0)+((8191&(n=(n=Math.imul(k,Ie))+Math.imul(Y,Qe)|0))<<13)|0;return u=((i=Math.imul(Y,Ie))+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=de,s[1]=he,s[2]=fe,s[3]=Ee,s[4]=pe,s[5]=Ce,s[6]=me,s[7]=ye,s[8]=ve,s[9]=be,s[10]=De,s[11]=we,s[12]=Fe,s[13]=Ue,s[14]=Se,s[15]=Ne,s[16]=Re,s[17]=Ge,s[18]=Me,0!==u&&(s[19]=u,t.length++),t};function I(e,A,t){return(new d).mulp(e,A,t)}function d(e,A){this.x=e,this.y=A}Math.imul||(Q=B),i.prototype.mulTo=function(e,A){var t,r=this.length+e.length;return t=10===this.length&&10===e.length?Q(this,e,A):r<63?B(this,e,A):r<1024?function(e,A,t){t.negative=A.negative^e.negative,t.length=e.length+A.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,a&=67108863}t.words[i]=o,r=a,a=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,e,A):I(this,e,A),t},d.prototype.makeRBT=function(e){for(var A=new Array(e),t=i.prototype._countBits(e)-1,r=0;r>=1;return r},d.prototype.permute=function(e,A,t,r,n,i){for(var a=0;a>>=1)n++;return 1<>>=13,t[2*a+1]=8191&i,i>>>=13;for(a=2*A;a>=26,A+=n/67108864|0,A+=i>>>26,this.words[t]=67108863&i}return 0!==A&&(this.words[t]=A,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var A=function(e){for(var A=new Array(e.bitLength()),t=0;t>>n}return A}(e);if(0===A.length)return new i(1);for(var t=this,r=0;r=0);var A,t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var a=0;for(A=0;A>>26-t}a&&(this.words[A]=a,this.length++)}if(0!==n){for(A=this.length-1;A>=0;A--)this.words[A+n]=this.words[A];for(A=0;A=0),n=A?(A-A%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var g=0|this.words[u];this.words[u]=c<<26-i|g>>>i,c=g&o}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,A,t){return r(0===this.negative),this.iushrn(e,A,t)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var A=e%26,t=(e-A)/26,n=1<=0);var A=e%26,t=(e-A)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==A&&t++,this.length=Math.min(t,this.length),0!==A){var n=67108863^67108863>>>A<=67108864;A++)this.words[A]-=67108864,A===this.length-1?this.words[A+1]=1:this.words[A+1]++;return this.length=Math.max(this.length,A+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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 A=0;A>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,A){var t=(this.length,e.length),r=this.clone(),n=e,a=0|n.words[n.length-1];0!=(t=26-this._countBits(a))&&(n=n.ushln(t),r.iushln(t),a=0|n.words[n.length-1]);var o,s=r.length-n.length;if("mod"!==A){(o=new i(null)).length=s+1,o.words=new Array(o.length);for(var u=0;u=0;g--){var l=67108864*(0|r.words[n.length+g])+(0|r.words[n.length+g-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(n,l,g);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,g),r.isZero()||(r.negative^=1);o&&(o.words[g]=l)}return o&&o.strip(),r.strip(),"div"!==A&&0!==t&&r.iushrn(t),{div:o||null,mod:r}},i.prototype.divmod=function(e,A,t){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,A),"mod"!==A&&(n=o.div.neg()),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),A),"mod"!==A&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),A),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===A?{div:this.divn(e.words[0]),mod:null}:"mod"===A?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,A);var n,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var A=this.divmod(e);if(A.mod.isZero())return A.div;var t=0!==A.div.negative?A.mod.isub(e):A.mod,r=e.ushrn(1),n=e.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?A.div:0!==A.div.negative?A.div.isubn(1):A.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var A=(1<<26)%e,t=0,n=this.length-1;n>=0;n--)t=(A*t+(0|this.words[n]))%e;return t},i.prototype.idivn=function(e){r(e<=67108863);for(var A=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*A;this.words[t]=n/e|0,A=n%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n=new i(1),a=new i(0),o=new i(0),s=new i(1),u=0;A.isEven()&&t.isEven();)A.iushrn(1),t.iushrn(1),++u;for(var c=t.clone(),g=A.clone();!A.isZero();){for(var l=0,B=1;0==(A.words[0]&B)&&l<26;++l,B<<=1);if(l>0)for(A.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(c),a.isub(g)),n.iushrn(1),a.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(g)),o.iushrn(1),s.iushrn(1);A.cmp(t)>=0?(A.isub(t),n.isub(o),a.isub(s)):(t.isub(A),o.isub(n),s.isub(a))}return{a:o,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n,a=new i(1),o=new i(0),s=t.clone();A.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,c=1;0==(A.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var g=0,l=1;0==(t.words[0]&l)&&g<26;++g,l<<=1);if(g>0)for(t.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);A.cmp(t)>=0?(A.isub(t),a.isub(o)):(t.isub(A),o.isub(a))}return(n=0===A.cmpn(1)?a:o).cmpn(0)<0&&n.iadd(e),n},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var A=this.clone(),t=e.clone();A.negative=0,t.negative=0;for(var r=0;A.isEven()&&t.isEven();r++)A.iushrn(1),t.iushrn(1);for(;;){for(;A.isEven();)A.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=A.cmp(t);if(n<0){var i=A;A=t,t=i}else if(0===n||0===t.cmpn(1))break;A.isub(t)}return t.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var A=e%26,t=(e-A)/26,n=1<>>26,o&=67108863,this.words[a]=o}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var A,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)A=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];A=n===e?0:ne.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|e.words[t];if(r!==n){rn&&(A=1);break}}return A},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var h={k256:null,p224:null,p192:null,p25519:null};function f(e,A){this.name=e,this.p=new i(A,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var A=i._prime(e);this.m=A.p,this.prime=A}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}f.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},f.prototype.ireduce=function(e){var A,t=e;do{this.split(t,this.tmp),A=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(A>this.n);var r=A0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},f.prototype.split=function(e,A){e.iushrn(this.n,0,A)},f.prototype.imulK=function(e){return e.imul(this.k)},n(E,f),E.prototype.split=function(e,A){for(var t=4194303,r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var A=0,t=0;t>>=26,e.words[t]=n,A=r}return 0!==A&&(e.words[e.length++]=A),e},i._prime=function(e){if(h[e])return h[e];var A;if("k256"===e)A=new E;else if("p224"===e)A=new p;else if("p192"===e)A=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);A=new m}return h[e]=A,A},y.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,A){r(0==(e.negative|A.negative),"red works only with positives"),r(e.red&&e.red===A.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,A){this._verify2(e,A);var t=e.add(A);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(e,A){this._verify2(e,A);var t=e.iadd(A);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(e,A){this._verify2(e,A);var t=e.sub(A);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(e,A){this._verify2(e,A);var t=e.isub(A);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(e,A){return this._verify1(e),this.imod(e.ushln(A))},y.prototype.imul=function(e,A){return this._verify2(e,A),this.imod(e.imul(A))},y.prototype.mul=function(e,A){return this._verify2(e,A),this.imod(e.mul(A))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var A=this.m.andln(3);if(r(A%2==1),3===A){var t=this.m.add(new i(1)).iushrn(2);return this.pow(e,t)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var o=new i(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var g=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),B=this.pow(e,n),Q=a;0!==B.cmp(o);){for(var I=B,d=0;0!==I.cmp(o);d++)I=I.redSqr();r(d=0;r--){for(var u=A.words[r],c=s-1;c>=0;c--){var g=u>>c&1;n!==t[0]&&(n=this.sqr(n)),0!==g||0!==a?(a<<=1,a|=g,(4==++o||0===r&&0===c)&&(n=this.mul(n,t[a]),o=0,a=0)):o=0}s=26}return n},y.prototype.convertTo=function(e){var A=e.umod(this.m);return A===e?A.clone():A},y.prototype.convertFrom=function(e){var A=e.clone();return A.red=null,A},i.mont=function(e){return new v(e)},n(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var A=this.imod(e.mul(this.rinv));return A.red=null,A},v.prototype.imul=function(e,A){if(e.isZero()||A.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,A){if(e.isZero()||A.isZero())return new i(0)._forceRed(this);var t=e.mul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},9742:(e,A)=>{"use strict";A.byteLength=function(e){var A=s(e),t=A[0],r=A[1];return 3*(t+r)/4-r},A.toByteArray=function(e){var A,t,i=s(e),a=i[0],o=i[1],u=new n(function(e,A,t){return 3*(A+t)/4-t}(0,a,o)),c=0,g=o>0?a-4:a;for(t=0;t>16&255,u[c++]=A>>8&255,u[c++]=255&A;return 2===o&&(A=r[e.charCodeAt(t)]<<2|r[e.charCodeAt(t+1)]>>4,u[c++]=255&A),1===o&&(A=r[e.charCodeAt(t)]<<10|r[e.charCodeAt(t+1)]<<4|r[e.charCodeAt(t+2)]>>2,u[c++]=A>>8&255,u[c++]=255&A),u},A.fromByteArray=function(e){for(var A,r=e.length,n=r%3,i=[],a=16383,o=0,s=r-n;os?s:o+a));return 1===n?(A=e[r-1],i.push(t[A>>2]+t[A<<4&63]+"==")):2===n&&(A=(e[r-2]<<8)+e[r-1],i.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),i.join("")};for(var t=[],r=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=A),[t,t===A?0:4-t%4]}function u(e,A,r){for(var n,i,a=[],o=A;o>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},3550:function(e,A,t){!function(e,A){"use strict";function r(e,A){if(!e)throw new Error(A||"Assertion failed")}function n(e,A){e.super_=A;var t=function(){};t.prototype=A.prototype,e.prototype=new t,e.prototype.constructor=e}function i(e,A,t){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==A&&"be"!==A||(t=A,A=10),this._init(e||0,A||10,t||"be"))}var a;"object"==typeof e?e.exports=i:A.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(6601).Buffer}catch(e){}function o(e,A){var t=e.charCodeAt(A);return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void r(!1,"Invalid character in "+e)}function s(e,A,t){var r=o(e,t);return t-1>=A&&(r|=o(e,t-1)<<4),r}function u(e,A,t,n){for(var i=0,a=0,o=Math.min(e.length,t),s=A;s=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a0?e:A},i.min=function(e,A){return e.cmp(A)<0?e:A},i.prototype._init=function(e,A,t){if("number"==typeof e)return this._initNumber(e,A,t);if("object"==typeof e)return this._initArray(e,A,t);"hex"===A&&(A=16),r(A===(0|A)&&A>=2&&A<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this._strip()},i.prototype._parseHex=function(e,A,t){this.length=Math.ceil((e.length-A)/6),this.words=new Array(this.length);for(var r=0;r=A;r-=2)n=s(e,A,r)<=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;else for(r=(e.length-A)%2==0?A+1:A;r=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,A,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=A)r++;r--,n=n/A|0;for(var i=e.length-t,a=i%r,o=Math.min(i,i-a)+t,s=0,c=t;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=g}catch(e){i.prototype.inspect=g}else i.prototype.inspect=g;function g(){return(this.red?""}var l=["","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"],B=[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],Q=[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 I(e,A,t){t.negative=A.negative^e.negative;var r=e.length+A.length|0;t.length=r,r=r-1|0;var n=0|e.words[0],i=0|A.words[0],a=n*i,o=67108863&a,s=a/67108864|0;t.words[0]=o;for(var u=1;u>>26,g=67108863&s,l=Math.min(u,A.length-1),B=Math.max(0,u-e.length+1);B<=l;B++){var Q=u-B|0;c+=(a=(n=0|e.words[Q])*(i=0|A.words[B])+g)/67108864|0,g=67108863&a}t.words[u]=0|g,s=0|c}return 0!==s?t.words[u]=0|s:t.length--,t._strip()}i.prototype.toString=function(e,A){var t;if(A=0|A||1,16===(e=e||10)||"hex"===e){t="";for(var n=0,i=0,a=0;a>>24-n&16777215)||a!==this.length-1?l[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,a--)}for(0!==i&&(t=i.toString(16)+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var u=B[e],c=Q[e];t="";var g=this.clone();for(g.negative=0;!g.isZero();){var I=g.modrn(c).toString(e);t=(g=g.idivn(c)).isZero()?I+t:l[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(e,A){return this.toArrayLike(a,e,A)}),i.prototype.toArray=function(e,A){return this.toArrayLike(Array,e,A)},i.prototype.toArrayLike=function(e,A,t){this._strip();var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var a=function(e,A){return e.allocUnsafe?e.allocUnsafe(A):new e(A)}(e,i);return this["_toArrayLike"+("le"===A?"LE":"BE")](a,n),a},i.prototype._toArrayLikeLE=function(e,A){for(var t=0,r=0,n=0,i=0;n>8&255),t>16&255),6===i?(t>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(t=0&&(e[t--]=a>>8&255),t>=0&&(e[t--]=a>>16&255),6===i?(t>=0&&(e[t--]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(t>=0)for(e[t--]=r;t>=0;)e[t--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var A=e,t=0;return A>=4096&&(t+=13,A>>>=13),A>=64&&(t+=7,A>>>=7),A>=8&&(t+=4,A>>>=4),A>=2&&(t+=2,A>>>=2),t+A},i.prototype._zeroBits=function(e){if(0===e)return 26;var A=e,t=0;return 0==(8191&A)&&(t+=13,A>>>=13),0==(127&A)&&(t+=7,A>>>=7),0==(15&A)&&(t+=4,A>>>=4),0==(3&A)&&(t+=2,A>>>=2),0==(1&A)&&t++,t},i.prototype.bitLength=function(){var e=this.words[this.length-1],A=this._countBits(e);return 26*(this.length-1)+A},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,A=0;Ae.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var A;A=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var A,t;this.length>e.length?(A=this,t=e):(A=e,t=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var A=0|Math.ceil(e/26),t=e%26;this._expand(A),t>0&&A--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,A){r("number"==typeof e&&e>=0);var t=e/26|0,n=e%26;return this._expand(t+1),this.words[t]=A?this.words[t]|1<e.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var A=this.iadd(e);return e.negative=1,A._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&A;for(;0!==i&&a>26,this.words[a]=67108863&A;if(0===i&&a>>13,B=0|a[1],Q=8191&B,I=B>>>13,d=0|a[2],h=8191&d,f=d>>>13,E=0|a[3],p=8191&E,C=E>>>13,m=0|a[4],y=8191&m,v=m>>>13,b=0|a[5],D=8191&b,w=b>>>13,F=0|a[6],U=8191&F,S=F>>>13,N=0|a[7],R=8191&N,G=N>>>13,M=0|a[8],L=8191&M,x=M>>>13,H=0|a[9],k=8191&H,Y=H>>>13,_=0|o[0],V=8191&_,T=_>>>13,P=0|o[1],O=8191&P,J=P>>>13,K=0|o[2],j=8191&K,q=K>>>13,z=0|o[3],Z=8191&z,W=z>>>13,X=0|o[4],$=8191&X,ee=X>>>13,Ae=0|o[5],te=8191&Ae,re=Ae>>>13,ne=0|o[6],ie=8191&ne,ae=ne>>>13,oe=0|o[7],se=8191&oe,ue=oe>>>13,ce=0|o[8],ge=8191&ce,le=ce>>>13,Be=0|o[9],Qe=8191&Be,Ie=Be>>>13;t.negative=e.negative^A.negative,t.length=19;var de=(u+(r=Math.imul(g,V))|0)+((8191&(n=(n=Math.imul(g,T))+Math.imul(l,V)|0))<<13)|0;u=((i=Math.imul(l,T))+(n>>>13)|0)+(de>>>26)|0,de&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var he=(u+(r=r+Math.imul(g,O)|0)|0)+((8191&(n=(n=n+Math.imul(g,J)|0)+Math.imul(l,O)|0))<<13)|0;u=((i=i+Math.imul(l,J)|0)+(n>>>13)|0)+(he>>>26)|0,he&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(f,V)|0,i=Math.imul(f,T),r=r+Math.imul(Q,O)|0,n=(n=n+Math.imul(Q,J)|0)+Math.imul(I,O)|0,i=i+Math.imul(I,J)|0;var fe=(u+(r=r+Math.imul(g,j)|0)|0)+((8191&(n=(n=n+Math.imul(g,q)|0)+Math.imul(l,j)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(n>>>13)|0)+(fe>>>26)|0,fe&=67108863,r=Math.imul(p,V),n=(n=Math.imul(p,T))+Math.imul(C,V)|0,i=Math.imul(C,T),r=r+Math.imul(h,O)|0,n=(n=n+Math.imul(h,J)|0)+Math.imul(f,O)|0,i=i+Math.imul(f,J)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,q)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,q)|0;var Ee=(u+(r=r+Math.imul(g,Z)|0)|0)+((8191&(n=(n=n+Math.imul(g,W)|0)+Math.imul(l,Z)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(p,O)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(C,O)|0,i=i+Math.imul(C,J)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,q)|0)+Math.imul(f,j)|0,i=i+Math.imul(f,q)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var pe=(u+(r=r+Math.imul(g,$)|0)|0)+((8191&(n=(n=n+Math.imul(g,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(n>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(D,V),n=(n=Math.imul(D,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,O)|0,n=(n=n+Math.imul(y,J)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,J)|0,r=r+Math.imul(p,j)|0,n=(n=n+Math.imul(p,q)|0)+Math.imul(C,j)|0,i=i+Math.imul(C,q)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(f,Z)|0,i=i+Math.imul(f,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0;var Ce=(u+(r=r+Math.imul(g,te)|0)|0)+((8191&(n=(n=n+Math.imul(g,re)|0)+Math.imul(l,te)|0))<<13)|0;u=((i=i+Math.imul(l,re)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(D,O)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(w,O)|0,i=i+Math.imul(w,J)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,q)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,q)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(f,$)|0,i=i+Math.imul(f,ee)|0,r=r+Math.imul(Q,te)|0,n=(n=n+Math.imul(Q,re)|0)+Math.imul(I,te)|0,i=i+Math.imul(I,re)|0;var me=(u+(r=r+Math.imul(g,ie)|0)|0)+((8191&(n=(n=n+Math.imul(g,ae)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,ae)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(G,V)|0,i=Math.imul(G,T),r=r+Math.imul(U,O)|0,n=(n=n+Math.imul(U,J)|0)+Math.imul(S,O)|0,i=i+Math.imul(S,J)|0,r=r+Math.imul(D,j)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(h,te)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(f,te)|0,i=i+Math.imul(f,re)|0,r=r+Math.imul(Q,ie)|0,n=(n=n+Math.imul(Q,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0;var ye=(u+(r=r+Math.imul(g,se)|0)|0)+((8191&(n=(n=n+Math.imul(g,ue)|0)+Math.imul(l,se)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(L,V),n=(n=Math.imul(L,T))+Math.imul(x,V)|0,i=Math.imul(x,T),r=r+Math.imul(R,O)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(G,O)|0,i=i+Math.imul(G,J)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,q)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,q)|0,r=r+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,r=r+Math.imul(p,te)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(C,te)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,ae)|0)+Math.imul(f,ie)|0,i=i+Math.imul(f,ae)|0,r=r+Math.imul(Q,se)|0,n=(n=n+Math.imul(Q,ue)|0)+Math.imul(I,se)|0,i=i+Math.imul(I,ue)|0;var ve=(u+(r=r+Math.imul(g,ge)|0)|0)+((8191&(n=(n=n+Math.imul(g,le)|0)+Math.imul(l,ge)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(L,O)|0,n=(n=n+Math.imul(L,J)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,J)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,q)|0)+Math.imul(G,j)|0,i=i+Math.imul(G,q)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(y,te)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(v,te)|0,i=i+Math.imul(v,re)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(h,se)|0,n=(n=n+Math.imul(h,ue)|0)+Math.imul(f,se)|0,i=i+Math.imul(f,ue)|0,r=r+Math.imul(Q,ge)|0,n=(n=n+Math.imul(Q,le)|0)+Math.imul(I,ge)|0,i=i+Math.imul(I,le)|0;var be=(u+(r=r+Math.imul(g,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(g,Ie)|0)+Math.imul(l,Qe)|0))<<13)|0;u=((i=i+Math.imul(l,Ie)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,O),n=(n=Math.imul(k,J))+Math.imul(Y,O)|0,i=Math.imul(Y,J),r=r+Math.imul(L,j)|0,n=(n=n+Math.imul(L,q)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,q)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(G,Z)|0,i=i+Math.imul(G,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(D,te)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(w,te)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,r=r+Math.imul(p,se)|0,n=(n=n+Math.imul(p,ue)|0)+Math.imul(C,se)|0,i=i+Math.imul(C,ue)|0,r=r+Math.imul(h,ge)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(f,ge)|0,i=i+Math.imul(f,le)|0;var De=(u+(r=r+Math.imul(Q,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(Q,Ie)|0)+Math.imul(I,Qe)|0))<<13)|0;u=((i=i+Math.imul(I,Ie)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,q))+Math.imul(Y,j)|0,i=Math.imul(Y,q),r=r+Math.imul(L,Z)|0,n=(n=n+Math.imul(L,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(G,$)|0,i=i+Math.imul(G,ee)|0,r=r+Math.imul(U,te)|0,n=(n=n+Math.imul(U,re)|0)+Math.imul(S,te)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(y,se)|0,n=(n=n+Math.imul(y,ue)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ue)|0,r=r+Math.imul(p,ge)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(C,ge)|0,i=i+Math.imul(C,le)|0;var we=(u+(r=r+Math.imul(h,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(h,Ie)|0)+Math.imul(f,Qe)|0))<<13)|0;u=((i=i+Math.imul(f,Ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(R,te)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(G,te)|0,i=i+Math.imul(G,re)|0,r=r+Math.imul(U,ie)|0,n=(n=n+Math.imul(U,ae)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,ae)|0,r=r+Math.imul(D,se)|0,n=(n=n+Math.imul(D,ue)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,ue)|0,r=r+Math.imul(y,ge)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(v,ge)|0,i=i+Math.imul(v,le)|0;var Fe=(u+(r=r+Math.imul(p,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(p,Ie)|0)+Math.imul(C,Qe)|0))<<13)|0;u=((i=i+Math.imul(C,Ie)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,ee))+Math.imul(Y,$)|0,i=Math.imul(Y,ee),r=r+Math.imul(L,te)|0,n=(n=n+Math.imul(L,re)|0)+Math.imul(x,te)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,ae)|0)+Math.imul(G,ie)|0,i=i+Math.imul(G,ae)|0,r=r+Math.imul(U,se)|0,n=(n=n+Math.imul(U,ue)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,ue)|0,r=r+Math.imul(D,ge)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(w,ge)|0,i=i+Math.imul(w,le)|0;var Ue=(u+(r=r+Math.imul(y,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(y,Ie)|0)+Math.imul(v,Qe)|0))<<13)|0;u=((i=i+Math.imul(v,Ie)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul(k,te),n=(n=Math.imul(k,re))+Math.imul(Y,te)|0,i=Math.imul(Y,re),r=r+Math.imul(L,ie)|0,n=(n=n+Math.imul(L,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(R,se)|0,n=(n=n+Math.imul(R,ue)|0)+Math.imul(G,se)|0,i=i+Math.imul(G,ue)|0,r=r+Math.imul(U,ge)|0,n=(n=n+Math.imul(U,le)|0)+Math.imul(S,ge)|0,i=i+Math.imul(S,le)|0;var Se=(u+(r=r+Math.imul(D,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(D,Ie)|0)+Math.imul(w,Qe)|0))<<13)|0;u=((i=i+Math.imul(w,Ie)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,ie),n=(n=Math.imul(k,ae))+Math.imul(Y,ie)|0,i=Math.imul(Y,ae),r=r+Math.imul(L,se)|0,n=(n=n+Math.imul(L,ue)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ue)|0,r=r+Math.imul(R,ge)|0,n=(n=n+Math.imul(R,le)|0)+Math.imul(G,ge)|0,i=i+Math.imul(G,le)|0;var Ne=(u+(r=r+Math.imul(U,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(U,Ie)|0)+Math.imul(S,Qe)|0))<<13)|0;u=((i=i+Math.imul(S,Ie)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(k,se),n=(n=Math.imul(k,ue))+Math.imul(Y,se)|0,i=Math.imul(Y,ue),r=r+Math.imul(L,ge)|0,n=(n=n+Math.imul(L,le)|0)+Math.imul(x,ge)|0,i=i+Math.imul(x,le)|0;var Re=(u+(r=r+Math.imul(R,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(R,Ie)|0)+Math.imul(G,Qe)|0))<<13)|0;u=((i=i+Math.imul(G,Ie)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(k,ge),n=(n=Math.imul(k,le))+Math.imul(Y,ge)|0,i=Math.imul(Y,le);var Ge=(u+(r=r+Math.imul(L,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(L,Ie)|0)+Math.imul(x,Qe)|0))<<13)|0;u=((i=i+Math.imul(x,Ie)|0)+(n>>>13)|0)+(Ge>>>26)|0,Ge&=67108863;var Me=(u+(r=Math.imul(k,Qe))|0)+((8191&(n=(n=Math.imul(k,Ie))+Math.imul(Y,Qe)|0))<<13)|0;return u=((i=Math.imul(Y,Ie))+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=de,s[1]=he,s[2]=fe,s[3]=Ee,s[4]=pe,s[5]=Ce,s[6]=me,s[7]=ye,s[8]=ve,s[9]=be,s[10]=De,s[11]=we,s[12]=Fe,s[13]=Ue,s[14]=Se,s[15]=Ne,s[16]=Re,s[17]=Ge,s[18]=Me,0!==u&&(s[19]=u,t.length++),t};function h(e,A,t){t.negative=A.negative^e.negative,t.length=e.length+A.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,a&=67108863}t.words[i]=o,r=a,a=n}return 0!==r?t.words[i]=r:t.length--,t._strip()}function f(e,A,t){return h(e,A,t)}function E(e,A){this.x=e,this.y=A}Math.imul||(d=I),i.prototype.mulTo=function(e,A){var t=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,A):t<63?I(this,e,A):t<1024?h(this,e,A):f(this,e,A)},E.prototype.makeRBT=function(e){for(var A=new Array(e),t=i.prototype._countBits(e)-1,r=0;r>=1;return r},E.prototype.permute=function(e,A,t,r,n,i){for(var a=0;a>>=1)n++;return 1<>>=13,t[2*a+1]=8191&i,i>>>=13;for(a=2*A;a>=26,t+=i/67108864|0,t+=a>>>26,this.words[n]=67108863&a}return 0!==t&&(this.words[n]=t,this.length++),A?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var A=function(e){for(var A=new Array(e.bitLength()),t=0;t>>n&1}return A}(e);if(0===A.length)return new i(1);for(var t=this,r=0;r=0);var A,t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var a=0;for(A=0;A>>26-t}a&&(this.words[A]=a,this.length++)}if(0!==n){for(A=this.length-1;A>=0;A--)this.words[A+n]=this.words[A];for(A=0;A=0),n=A?(A-A%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var g=0|this.words[u];this.words[u]=c<<26-i|g>>>i,c=g&o}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,A,t){return r(0===this.negative),this.iushrn(e,A,t)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var A=e%26,t=(e-A)/26,n=1<=0);var A=e%26,t=(e-A)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==A&&t++,this.length=Math.min(t,this.length),0!==A){var n=67108863^67108863>>>A<=67108864;A++)this.words[A]-=67108864,A===this.length-1?this.words[A+1]=1:this.words[A+1]++;return this.length=Math.max(this.length,A+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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 A=0;A>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,A){var t=(this.length,e.length),r=this.clone(),n=e,a=0|n.words[n.length-1];0!=(t=26-this._countBits(a))&&(n=n.ushln(t),r.iushln(t),a=0|n.words[n.length-1]);var o,s=r.length-n.length;if("mod"!==A){(o=new i(null)).length=s+1,o.words=new Array(o.length);for(var u=0;u=0;g--){var l=67108864*(0|r.words[n.length+g])+(0|r.words[n.length+g-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(n,l,g);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,g),r.isZero()||(r.negative^=1);o&&(o.words[g]=l)}return o&&o._strip(),r._strip(),"div"!==A&&0!==t&&r.iushrn(t),{div:o||null,mod:r}},i.prototype.divmod=function(e,A,t){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,A),"mod"!==A&&(n=o.div.neg()),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),A),"mod"!==A&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),A),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===A?{div:this.divn(e.words[0]),mod:null}:"mod"===A?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,A);var n,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var A=this.divmod(e);if(A.mod.isZero())return A.div;var t=0!==A.div.negative?A.mod.isub(e):A.mod,r=e.ushrn(1),n=e.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?A.div:0!==A.div.negative?A.div.isubn(1):A.div.iaddn(1)},i.prototype.modrn=function(e){var A=e<0;A&&(e=-e),r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return A?-n:n},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var A=e<0;A&&(e=-e),r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this._strip(),A?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n=new i(1),a=new i(0),o=new i(0),s=new i(1),u=0;A.isEven()&&t.isEven();)A.iushrn(1),t.iushrn(1),++u;for(var c=t.clone(),g=A.clone();!A.isZero();){for(var l=0,B=1;0==(A.words[0]&B)&&l<26;++l,B<<=1);if(l>0)for(A.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(c),a.isub(g)),n.iushrn(1),a.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(g)),o.iushrn(1),s.iushrn(1);A.cmp(t)>=0?(A.isub(t),n.isub(o),a.isub(s)):(t.isub(A),o.isub(n),s.isub(a))}return{a:o,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n,a=new i(1),o=new i(0),s=t.clone();A.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,c=1;0==(A.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var g=0,l=1;0==(t.words[0]&l)&&g<26;++g,l<<=1);if(g>0)for(t.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);A.cmp(t)>=0?(A.isub(t),a.isub(o)):(t.isub(A),o.isub(a))}return(n=0===A.cmpn(1)?a:o).cmpn(0)<0&&n.iadd(e),n},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var A=this.clone(),t=e.clone();A.negative=0,t.negative=0;for(var r=0;A.isEven()&&t.isEven();r++)A.iushrn(1),t.iushrn(1);for(;;){for(;A.isEven();)A.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=A.cmp(t);if(n<0){var i=A;A=t,t=i}else if(0===n||0===t.cmpn(1))break;A.isub(t)}return t.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var A=e%26,t=(e-A)/26,n=1<>>26,o&=67108863,this.words[a]=o}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var A,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this._strip(),this.length>1)A=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];A=n===e?0:ne.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|e.words[t];if(r!==n){rn&&(A=1);break}}return A},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new D(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var p={k256:null,p224:null,p192:null,p25519:null};function C(e,A){this.name=e,this.p=new i(A,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){C.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){C.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function b(){C.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function D(e){if("string"==typeof e){var A=i._prime(e);this.m=A.p,this.prime=A}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function w(e){D.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}C.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},C.prototype.ireduce=function(e){var A,t=e;do{this.split(t,this.tmp),A=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(A>this.n);var r=A0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},C.prototype.split=function(e,A){e.iushrn(this.n,0,A)},C.prototype.imulK=function(e){return e.imul(this.k)},n(m,C),m.prototype.split=function(e,A){for(var t=4194303,r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?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 A=0,t=0;t>>=26,e.words[t]=n,A=r}return 0!==A&&(e.words[e.length++]=A),e},i._prime=function(e){if(p[e])return p[e];var A;if("k256"===e)A=new m;else if("p224"===e)A=new y;else if("p192"===e)A=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);A=new b}return p[e]=A,A},D.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},D.prototype._verify2=function(e,A){r(0==(e.negative|A.negative),"red works only with positives"),r(e.red&&e.red===A.red,"red works only with red numbers")},D.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},D.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},D.prototype.add=function(e,A){this._verify2(e,A);var t=e.add(A);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},D.prototype.iadd=function(e,A){this._verify2(e,A);var t=e.iadd(A);return t.cmp(this.m)>=0&&t.isub(this.m),t},D.prototype.sub=function(e,A){this._verify2(e,A);var t=e.sub(A);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},D.prototype.isub=function(e,A){this._verify2(e,A);var t=e.isub(A);return t.cmpn(0)<0&&t.iadd(this.m),t},D.prototype.shl=function(e,A){return this._verify1(e),this.imod(e.ushln(A))},D.prototype.imul=function(e,A){return this._verify2(e,A),this.imod(e.imul(A))},D.prototype.mul=function(e,A){return this._verify2(e,A),this.imod(e.mul(A))},D.prototype.isqr=function(e){return this.imul(e,e.clone())},D.prototype.sqr=function(e){return this.mul(e,e)},D.prototype.sqrt=function(e){if(e.isZero())return e.clone();var A=this.m.andln(3);if(r(A%2==1),3===A){var t=this.m.add(new i(1)).iushrn(2);return this.pow(e,t)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var o=new i(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var g=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),B=this.pow(e,n),Q=a;0!==B.cmp(o);){for(var I=B,d=0;0!==I.cmp(o);d++)I=I.redSqr();r(d=0;r--){for(var u=A.words[r],c=s-1;c>=0;c--){var g=u>>c&1;n!==t[0]&&(n=this.sqr(n)),0!==g||0!==a?(a<<=1,a|=g,(4==++o||0===r&&0===c)&&(n=this.mul(n,t[a]),o=0,a=0)):o=0}s=26}return n},D.prototype.convertTo=function(e){var A=e.umod(this.m);return A===e?A.clone():A},D.prototype.convertFrom=function(e){var A=e.clone();return A.red=null,A},i.mont=function(e){return new w(e)},n(w,D),w.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},w.prototype.convertFrom=function(e){var A=this.imod(e.mul(this.rinv));return A.red=null,A},w.prototype.imul=function(e,A){if(e.isZero()||A.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},w.prototype.mul=function(e,A){if(e.isZero()||A.isZero())return new i(0)._forceRed(this);var t=e.mul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},w.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},9931:(e,A,t)=>{var r;function n(e){this.rand=e}if(e.exports=function(e){return r||(r=new n(null)),r.generate(e)},e.exports.Rand=n,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 A=new Uint8Array(e),t=0;t{var r=t(9509).Buffer;function n(e){r.isBuffer(e)||(e=r.from(e));for(var A=e.length/4|0,t=new Array(A),n=0;n>>24]^c[Q>>>16&255]^g[I>>>8&255]^l[255&d]^A[h++],a=u[Q>>>24]^c[I>>>16&255]^g[d>>>8&255]^l[255&B]^A[h++],o=u[I>>>24]^c[d>>>16&255]^g[B>>>8&255]^l[255&Q]^A[h++],s=u[d>>>24]^c[B>>>16&255]^g[Q>>>8&255]^l[255&I]^A[h++],B=i,Q=a,I=o,d=s;return i=(r[B>>>24]<<24|r[Q>>>16&255]<<16|r[I>>>8&255]<<8|r[255&d])^A[h++],a=(r[Q>>>24]<<24|r[I>>>16&255]<<16|r[d>>>8&255]<<8|r[255&B])^A[h++],o=(r[I>>>24]<<24|r[d>>>16&255]<<16|r[B>>>8&255]<<8|r[255&Q])^A[h++],s=(r[d>>>24]<<24|r[B>>>16&255]<<16|r[Q>>>8&255]<<8|r[255&I])^A[h++],[i>>>=0,a>>>=0,o>>>=0,s>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var e=new Array(256),A=0;A<256;A++)e[A]=A<128?A<<1:A<<1^283;for(var t=[],r=[],n=[[],[],[],[]],i=[[],[],[],[]],a=0,o=0,s=0;s<256;++s){var u=o^o<<1^o<<2^o<<3^o<<4;u=u>>>8^255&u^99,t[a]=u,r[u]=a;var c=e[a],g=e[c],l=e[g],B=257*e[u]^16843008*u;n[0][a]=B<<24|B>>>8,n[1][a]=B<<16|B>>>16,n[2][a]=B<<8|B>>>24,n[3][a]=B,B=16843009*l^65537*g^257*c^16843008*a,i[0][u]=B<<24|B>>>8,i[1][u]=B<<16|B>>>16,i[2][u]=B<<8|B>>>24,i[3][u]=B,0===a?a=o=1:(a=c^e[e[e[l^c]]],o^=e[e[o]])}return{SBOX:t,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:i}}();function u(e){this._key=n(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,A=e.length,t=A+6,r=4*(t+1),n=[],i=0;i>>24,a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a],a^=o[i/A|0]<<24):A>6&&i%A==4&&(a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a]),n[i]=n[i-A]^a}for(var u=[],c=0;c>>24]]^s.INV_SUB_MIX[1][s.SBOX[l>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[l>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&l]]}this._nRounds=t,this._keySchedule=n,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return a(e=n(e),this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var A=this.encryptBlockRaw(e),t=r.allocUnsafe(16);return t.writeUInt32BE(A[0],0),t.writeUInt32BE(A[1],4),t.writeUInt32BE(A[2],8),t.writeUInt32BE(A[3],12),t},u.prototype.decryptBlock=function(e){var A=(e=n(e))[1];e[1]=e[3],e[3]=A;var t=a(e,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[3],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[1],12),i},u.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},e.exports.AES=u},2422:(e,A,t)=>{var r=t(4497),n=t(9509).Buffer,i=t(1027),a=t(5717),o=t(3288),s=t(7295),u=t(685);function c(e,A,t,a){i.call(this);var s=n.alloc(4,0);this._cipher=new r.AES(A);var c=this._cipher.encryptBlock(s);this._ghash=new o(c),t=function(e,A,t){if(12===A.length)return e._finID=n.concat([A,n.from([0,0,0,1])]),n.concat([A,n.from([0,0,0,2])]);var r=new o(t),i=A.length,a=i%16;r.update(A),a&&(a=16-a,r.update(n.alloc(a,0))),r.update(n.alloc(8,0));var s=8*i,c=n.alloc(8);c.writeUIntBE(s,0,8),r.update(c),e._finID=r.state;var g=n.from(e._finID);return u(g),g}(this,t,c),this._prev=n.from(t),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(c,i),c.prototype._update=function(e){if(!this._called&&this._alen){var A=16-this._alen%16;A<16&&(A=n.alloc(A,0),this._ghash.update(A))}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=s(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,A){var t=0;e.length!==A.length&&t++;for(var r=Math.min(e.length,A.length),n=0;n{var r=t(1494),n=t(6193),i=t(4946);A.createCipher=A.Cipher=r.createCipher,A.createCipheriv=A.Cipheriv=r.createCipheriv,A.createDecipher=A.Decipher=n.createDecipher,A.createDecipheriv=A.Decipheriv=n.createDecipheriv,A.listCiphers=A.getCiphers=function(){return Object.keys(i)}},6193:(e,A,t)=>{var r=t(2422),n=t(9509).Buffer,i=t(45),a=t(5969),o=t(1027),s=t(4497),u=t(3048);function c(e,A,t){o.call(this),this._cache=new g,this._last=void 0,this._cipher=new s.AES(A),this._prev=n.from(t),this._mode=e,this._autopadding=!0}function g(){this.cache=n.allocUnsafe(0)}function l(e,A,t){var o=i[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=n.from(t)),"GCM"!==o.mode&&t.length!==o.iv)throw new TypeError("invalid iv length "+t.length);if("string"==typeof A&&(A=n.from(A)),A.length!==o.key/8)throw new TypeError("invalid key length "+A.length);return"stream"===o.type?new a(o.module,A,t,!0):"auth"===o.type?new r(o.module,A,t,!0):new c(o.module,A,t)}t(5717)(c,o),c.prototype._update=function(e){var A,t;this._cache.add(e);for(var r=[];A=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,A),r.push(t);return n.concat(r)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var A=e[15];if(A<1||A>16)throw new Error("unable to decrypt data");for(var t=-1;++t16)return A=this.cache.slice(0,16),this.cache=this.cache.slice(16),A}else if(this.cache.length>=16)return A=this.cache.slice(0,16),this.cache=this.cache.slice(16),A;return null},g.prototype.flush=function(){if(this.cache.length)return this.cache},A.createDecipher=function(e,A){var t=i[e.toLowerCase()];if(!t)throw new TypeError("invalid suite type");var r=u(A,!1,t.key,t.iv);return l(e,r.key,r.iv)},A.createDecipheriv=l},1494:(e,A,t)=>{var r=t(45),n=t(2422),i=t(9509).Buffer,a=t(5969),o=t(1027),s=t(4497),u=t(3048);function c(e,A,t){o.call(this),this._cache=new l,this._cipher=new s.AES(A),this._prev=i.from(t),this._mode=e,this._autopadding=!0}t(5717)(c,o),c.prototype._update=function(e){var A,t;this._cache.add(e);for(var r=[];A=this._cache.get();)t=this._mode.encrypt(this,A),r.push(t);return i.concat(r)};var g=i.alloc(16,16);function l(){this.cache=i.allocUnsafe(0)}function B(e,A,t){var o=r[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof A&&(A=i.from(A)),A.length!==o.key/8)throw new TypeError("invalid key length "+A.length);if("string"==typeof t&&(t=i.from(t)),"GCM"!==o.mode&&t.length!==o.iv)throw new TypeError("invalid iv length "+t.length);return"stream"===o.type?new a(o.module,A,t):"auth"===o.type?new n(o.module,A,t):new c(o.module,A,t)}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(g))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=i.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,A=i.allocUnsafe(e),t=-1;++t{var r=t(9509).Buffer,n=r.alloc(16,0);function i(e){var A=r.allocUnsafe(16);return A.writeUInt32BE(e[0]>>>0,0),A.writeUInt32BE(e[1]>>>0,4),A.writeUInt32BE(e[2]>>>0,8),A.writeUInt32BE(e[3]>>>0,12),A}function a(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(e){for(var A=-1;++A0;A--)r[A]=r[A]>>>1|(1&r[A-1])<<31;r[0]=r[0]>>>1,t&&(r[0]=r[0]^225<<24)}this.state=i(n)},a.prototype.update=function(e){var A;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)A=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(A)},a.prototype.final=function(e,A){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(i([0,e,0,A])),this.state},e.exports=a},685:e=>{e.exports=function(e){for(var A,t=e.length;t--;){if(255!==(A=e.readUInt8(t))){A++,e.writeUInt8(A,t);break}e.writeUInt8(0,t)}}},5292:(e,A,t)=>{var r=t(7295);A.encrypt=function(e,A){var t=r(A,e._prev);return e._prev=e._cipher.encryptBlock(t),e._prev},A.decrypt=function(e,A){var t=e._prev;e._prev=A;var n=e._cipher.decryptBlock(A);return r(n,t)}},6311:(e,A,t)=>{var r=t(9509).Buffer,n=t(7295);function i(e,A,t){var i=A.length,a=n(A,e._cache);return e._cache=e._cache.slice(i),e._prev=r.concat([e._prev,t?A:a]),a}A.encrypt=function(e,A,t){for(var n,a=r.allocUnsafe(0);A.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=A.length)){a=r.concat([a,i(e,A,t)]);break}n=e._cache.length,a=r.concat([a,i(e,A.slice(0,n),t)]),A=A.slice(n)}return a}},1510:(e,A,t)=>{var r=t(9509).Buffer;function n(e,A,t){for(var r,n,a=-1,o=0;++a<8;)r=A&1<<7-a?128:0,o+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^r))>>a%8,e._prev=i(e._prev,t?r:n);return o}function i(e,A){var t=e.length,n=-1,i=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([A])]);++n>7;return i}A.encrypt=function(e,A,t){for(var i=A.length,a=r.allocUnsafe(i),o=-1;++o{var r=t(9509).Buffer;function n(e,A,t){var n=e._cipher.encryptBlock(e._prev)[0]^A;return e._prev=r.concat([e._prev.slice(1),r.from([t?A:n])]),n}A.encrypt=function(e,A,t){for(var i=A.length,a=r.allocUnsafe(i),o=-1;++o{var r=t(7295),n=t(9509).Buffer,i=t(685);function a(e){var A=e._cipher.encryptBlockRaw(e._prev);return i(e._prev),A}A.encrypt=function(e,A){var t=Math.ceil(A.length/16),i=e._cache.length;e._cache=n.concat([e._cache,n.allocUnsafe(16*t)]);for(var o=0;o{A.encrypt=function(e,A){return e._cipher.encryptBlock(A)},A.decrypt=function(e,A){return e._cipher.decryptBlock(A)}},45:(e,A,t)=>{var r={ECB:t(1084),CBC:t(5292),CFB:t(6311),CFB8:t(1964),CFB1:t(1510),OFB:t(8861),CTR:t(6009),GCM:t(6009)},n=t(4946);for(var i in n)n[i].module=r[n[i].mode];e.exports=n},8861:(e,A,t)=>{var r=t(7295);function n(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}A.encrypt=function(e,A){for(;e._cache.length{var r=t(4497),n=t(9509).Buffer,i=t(1027);function a(e,A,t,a){i.call(this),this._cipher=new r.AES(A),this._prev=n.from(t),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=a,this._mode=e}t(5717)(a,i),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},3614:(e,A,t)=>{var r=t(7667),n=t(4696),i=t(45),a=t(9715),o=t(3048);function s(e,A,t){if(e=e.toLowerCase(),i[e])return n.createCipheriv(e,A,t);if(a[e])return new r({key:A,iv:t,mode:e});throw new TypeError("invalid suite type")}function u(e,A,t){if(e=e.toLowerCase(),i[e])return n.createDecipheriv(e,A,t);if(a[e])return new r({key:A,iv:t,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}A.createCipher=A.Cipher=function(e,A){var t,r;if(e=e.toLowerCase(),i[e])t=i[e].key,r=i[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");t=8*a[e].key,r=a[e].iv}var n=o(A,!1,t,r);return s(e,n.key,n.iv)},A.createCipheriv=A.Cipheriv=s,A.createDecipher=A.Decipher=function(e,A){var t,r;if(e=e.toLowerCase(),i[e])t=i[e].key,r=i[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");t=8*a[e].key,r=a[e].iv}var n=o(A,!1,t,r);return u(e,n.key,n.iv)},A.createDecipheriv=A.Decipheriv=u,A.listCiphers=A.getCiphers=function(){return Object.keys(a).concat(n.getCiphers())}},7667:(e,A,t)=>{var r=t(1027),n=t(9540),i=t(5717),a=t(9509).Buffer,o={"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 s(e){r.call(this);var A,t=e.mode.toLowerCase(),n=o[t];A=e.decrypt?"decrypt":"encrypt";var i=e.key;a.isBuffer(i)||(i=a.from(i)),"des-ede"!==t&&"des-ede-cbc"!==t||(i=a.concat([i,i.slice(0,8)]));var s=e.iv;a.isBuffer(s)||(s=a.from(s)),this._des=n.create({key:i,iv:s,type:A})}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],e.exports=s,i(s,r),s.prototype._update=function(e){return a.from(this._des.update(e))},s.prototype._final=function(){return a.from(this._des.final())}},9715:(e,A)=>{A["des-ecb"]={key:8,iv:0},A["des-cbc"]=A.des={key:8,iv:8},A["des-ede3-cbc"]=A.des3={key:24,iv:8},A["des-ede3"]={key:24,iv:0},A["des-ede-cbc"]={key:16,iv:8},A["des-ede"]={key:16,iv:0}},3663:(e,A,t)=>{var r=t(3550),n=t(1798);function i(e){var A,t=e.modulus.byteLength();do{A=new r(n(t))}while(A.cmp(e.modulus)>=0||!A.umod(e.prime1)||!A.umod(e.prime2));return A}function a(e,A){var t=function(e){var A=i(e);return{blinder:A.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:A.invm(e.modulus)}}(A),n=A.modulus.byteLength(),a=new r(e).mul(t.blinder).umod(A.modulus),o=a.toRed(r.mont(A.prime1)),s=a.toRed(r.mont(A.prime2)),u=A.coefficient,c=A.prime1,g=A.prime2,l=o.redPow(A.exponent1).fromRed(),B=s.redPow(A.exponent2).fromRed(),Q=l.isub(B).imul(u).umod(c).imul(g);return B.iadd(Q).imul(t.unblinder).umod(A.modulus).toArrayLike(Buffer,"be",n)}a.getr=i,e.exports=a},6042:(e,A,t)=>{e.exports=t(5207)},4743:(e,A,t)=>{var r=t(5679).Buffer,n=t(3482),i=t(8473),a=t(5717),o=t(2957),s=t(7753),u=t(5207);function c(e){i.Writable.call(this);var A=u[e];if(!A)throw new Error("Unknown message digest");this._hashType=A.hash,this._hash=n(A.hash),this._tag=A.id,this._signType=A.sign}function g(e){i.Writable.call(this);var A=u[e];if(!A)throw new Error("Unknown message digest");this._hash=n(A.hash),this._tag=A.id,this._signType=A.sign}function l(e){return new c(e)}function B(e){return new g(e)}Object.keys(u).forEach((function(e){u[e].id=r.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]})),a(c,i.Writable),c.prototype._write=function(e,A,t){this._hash.update(e),t()},c.prototype.update=function(e,A){return"string"==typeof e&&(e=r.from(e,A)),this._hash.update(e),this},c.prototype.sign=function(e,A){this.end();var t=this._hash.digest(),r=o(t,e,this._hashType,this._signType,this._tag);return A?r.toString(A):r},a(g,i.Writable),g.prototype._write=function(e,A,t){this._hash.update(e),t()},g.prototype.update=function(e,A){return"string"==typeof e&&(e=r.from(e,A)),this._hash.update(e),this},g.prototype.verify=function(e,A,t){"string"==typeof A&&(A=r.from(A,t)),this.end();var n=this._hash.digest();return s(A,n,e,this._signType,this._tag)},e.exports={Sign:l,Verify:B,createSign:l,createVerify:B}},2957:(e,A,t)=>{var r=t(5679).Buffer,n=t(8355),i=t(3663),a=t(6266).ec,o=t(3550),s=t(980),u=t(1308);function c(e,A,t,i){if((e=r.from(e.toArray())).length0&&t.ishrn(r),t}function l(e,A,t){var i,a;do{for(i=r.alloc(0);8*i.length{var r=t(5679).Buffer,n=t(3550),i=t(6266).ec,a=t(980),o=t(1308);function s(e,A){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(A)>=A)throw new Error("invalid sig")}e.exports=function(e,A,t,u,c){var g=a(t);if("ec"===g.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,A,t){var r=o[t.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+t.data.algorithm.curve.join("."));var n=new i(r),a=t.data.subjectPrivateKey.data;return n.verify(A,e,a)}(e,A,g)}if("dsa"===g.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,A,t){var r=t.data.p,i=t.data.q,o=t.data.g,u=t.data.pub_key,c=a.signature.decode(e,"der"),g=c.s,l=c.r;s(g,i),s(l,i);var B=n.mont(r),Q=g.invm(i);return 0===o.toRed(B).redPow(new n(A).mul(Q).mod(i)).fromRed().mul(u.toRed(B).redPow(l.mul(Q).mod(i)).fromRed()).mod(r).mod(i).cmp(l)}(e,A,g)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");A=r.concat([c,A]);for(var l=g.modulus.byteLength(),B=[1],Q=0;A.length+B.length+2{var r=t(8764),n=r.Buffer;function i(e,A){for(var t in e)A[t]=e[t]}function a(e,A,t){return n(e,A,t)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,A),A.Buffer=a),a.prototype=Object.create(n.prototype),i(n,a),a.from=function(e,A,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,A,t)},a.alloc=function(e,A,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==A?"string"==typeof t?r.fill(A,t):r.fill(A):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},7295:e=>{e.exports=function(e,A){for(var t=Math.min(e.length,A.length),r=new Buffer(t),n=0;n{"use strict";var r=t(9742),n=t(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;A.Buffer=s,A.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},A.INSPECT_MAX_BYTES=50;var a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var A=new Uint8Array(e);return Object.setPrototypeOf(A,s.prototype),A}function s(e,A,t){if("number"==typeof e){if("string"==typeof A)throw new TypeError('The "string" argument must be of type string. Received type number');return g(e)}return u(e,A,t)}function u(e,A,t){if("string"==typeof e)return function(e,A){if("string"==typeof A&&""!==A||(A="utf8"),!s.isEncoding(A))throw new TypeError("Unknown encoding: "+A);var t=0|I(e,A),r=o(t),n=r.write(e,A);return n!==t&&(r=r.slice(0,n)),r}(e,A);if(ArrayBuffer.isView(e))return function(e){if(V(e,Uint8Array)){var A=new Uint8Array(e);return B(A.buffer,A.byteOffset,A.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer))return B(e,A,t);if("undefined"!=typeof SharedArrayBuffer&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return B(e,A,t);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,A,t);var n=function(e){if(s.isBuffer(e)){var A=0|Q(e.length),t=o(A);return 0===t.length||e.copy(t,0,0,A),t}return void 0!==e.length?"number"!=typeof e.length||T(e.length)?o(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),A,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(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 g(e){return c(e),o(e<0?0:0|Q(e))}function l(e){for(var A=e.length<0?0:0|Q(e.length),t=o(A),r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function I(e,A){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(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 t=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===t)return 0;for(var n=!1;;)switch(A){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return k(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return Y(e).length;default:if(n)return r?-1:k(e).length;A=(""+A).toLowerCase(),n=!0}}function d(e,A,t){var r=!1;if((void 0===A||A<0)&&(A=0),A>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(A>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,A,t);case"utf8":case"utf-8":return D(this,A,t);case"ascii":return F(this,A,t);case"latin1":case"binary":return U(this,A,t);case"base64":return b(this,A,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,A,t);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,A,t){var r=e[A];e[A]=e[t],e[t]=r}function f(e,A,t,r,n){if(0===e.length)return-1;if("string"==typeof t?(r=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),T(t=+t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0){if(!n)return-1;t=0}if("string"==typeof A&&(A=s.from(A,r)),s.isBuffer(A))return 0===A.length?-1:E(e,A,t,r,n);if("number"==typeof A)return A&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,A,t):Uint8Array.prototype.lastIndexOf.call(e,A,t):E(e,[A],t,r,n);throw new TypeError("val must be string, number or Buffer")}function E(e,A,t,r,n){var i,a=1,o=e.length,s=A.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||A.length<2)return-1;a=2,o/=2,s/=2,t/=2}function u(e,A){return 1===a?e[A]:e.readUInt16BE(A*a)}if(n){var c=-1;for(i=t;io&&(t=o-s),i=t;i>=0;i--){for(var g=!0,l=0;ln&&(r=n):r=n;var i=A.length;r>i/2&&(r=i/2);for(var a=0;a>8,n=t%256,i.push(n),i.push(r);return i}(A,e.length-t),e,t,r)}function b(e,A,t){return 0===A&&t===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(A,t))}function D(e,A,t){t=Math.min(e.length,t);for(var r=[],n=A;n239?4:u>223?3:u>191?2:1;if(n+g<=t)switch(g){case 1:u<128&&(c=u);break;case 2:128==(192&(i=e[n+1]))&&(s=(31&u)<<6|63&i)>127&&(c=s);break;case 3:i=e[n+1],a=e[n+2],128==(192&i)&&128==(192&a)&&(s=(15&u)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=e[n+1],a=e[n+2],o=e[n+3],128==(192&i)&&128==(192&a)&&128==(192&o)&&(s=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&o)>65535&&s<1114112&&(c=s)}null===c?(c=65533,g=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),n+=g}return function(e){var A=e.length;if(A<=w)return String.fromCharCode.apply(String,e);for(var t="",r=0;rr.length?s.from(i).copy(r,n):Uint8Array.prototype.set.call(r,i,n);else{if(!s.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,n)}n+=i.length}return r},s.byteLength=I,s.prototype._isBuffer=!0,s.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 A=0;At&&(e+=" ... "),""},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(e,A,t,r,n){if(V(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===A&&(A=0),void 0===t&&(t=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),A<0||t>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&A>=t)return 0;if(r>=n)return-1;if(A>=t)return 1;if(this===e)return 0;for(var i=(n>>>=0)-(r>>>=0),a=(t>>>=0)-(A>>>=0),o=Math.min(i,a),u=this.slice(r,n),c=e.slice(A,t),g=0;g>>=0,isFinite(t)?(t>>>=0,void 0===r&&(r="utf8")):(r=t,t=void 0)}var n=this.length-A;if((void 0===t||t>n)&&(t=n),e.length>0&&(t<0||A<0)||A>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return p(this,e,A,t);case"utf8":case"utf-8":return C(this,e,A,t);case"ascii":case"latin1":case"binary":return m(this,e,A,t);case"base64":return y(this,e,A,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,e,A,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function F(e,A,t){var r="";t=Math.min(e.length,t);for(var n=A;nr)&&(t=r);for(var n="",i=A;it)throw new RangeError("Trying to access beyond buffer length")}function G(e,A,t,r,n,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>n||Ae.length)throw new RangeError("Index out of range")}function M(e,A,t,r,n,i){if(t+r>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function L(e,A,t,r,i){return A=+A,t>>>=0,i||M(e,0,t,4),n.write(e,A,t,r,23,4),t+4}function x(e,A,t,r,i){return A=+A,t>>>=0,i||M(e,0,t,8),n.write(e,A,t,r,52,8),t+8}s.prototype.slice=function(e,A){var t=this.length;(e=~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),(A=void 0===A?t:~~A)<0?(A+=t)<0&&(A=0):A>t&&(A=t),A>>=0,A>>>=0,t||R(e,A,this.length);for(var r=this[e],n=1,i=0;++i>>=0,A>>>=0,t||R(e,A,this.length);for(var r=this[e+--A],n=1;A>0&&(n*=256);)r+=this[e+--A]*n;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,A){return e>>>=0,A||R(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,A){return e>>>=0,A||R(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,A){return e>>>=0,A||R(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,A){return e>>>=0,A||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,A){return e>>>=0,A||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,A,t){e>>>=0,A>>>=0,t||R(e,A,this.length);for(var r=this[e],n=1,i=0;++i=(n*=128)&&(r-=Math.pow(2,8*A)),r},s.prototype.readIntBE=function(e,A,t){e>>>=0,A>>>=0,t||R(e,A,this.length);for(var r=A,n=1,i=this[e+--r];r>0&&(n*=256);)i+=this[e+--r]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*A)),i},s.prototype.readInt8=function(e,A){return e>>>=0,A||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,A){e>>>=0,A||R(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},s.prototype.readInt16BE=function(e,A){e>>>=0,A||R(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},s.prototype.readInt32LE=function(e,A){return e>>>=0,A||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,A){return e>>>=0,A||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,A){return e>>>=0,A||R(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,A){return e>>>=0,A||R(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,A){return e>>>=0,A||R(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,A){return e>>>=0,A||R(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,A,t,r){e=+e,A>>>=0,t>>>=0,r||G(this,e,A,t,Math.pow(2,8*t)-1,0);var n=1,i=0;for(this[A]=255&e;++i>>=0,t>>>=0,r||G(this,e,A,t,Math.pow(2,8*t)-1,0);var n=t-1,i=1;for(this[A+n]=255&e;--n>=0&&(i*=256);)this[A+n]=e/i&255;return A+t},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,1,255,0),this[A]=255&e,A+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,2,65535,0),this[A]=255&e,this[A+1]=e>>>8,A+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,2,65535,0),this[A]=e>>>8,this[A+1]=255&e,A+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,4,4294967295,0),this[A+3]=e>>>24,this[A+2]=e>>>16,this[A+1]=e>>>8,this[A]=255&e,A+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,4,4294967295,0),this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e,A+4},s.prototype.writeIntLE=function(e,A,t,r){if(e=+e,A>>>=0,!r){var n=Math.pow(2,8*t-1);G(this,e,A,t,n-1,-n)}var i=0,a=1,o=0;for(this[A]=255&e;++i>0)-o&255;return A+t},s.prototype.writeIntBE=function(e,A,t,r){if(e=+e,A>>>=0,!r){var n=Math.pow(2,8*t-1);G(this,e,A,t,n-1,-n)}var i=t-1,a=1,o=0;for(this[A+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[A+i+1]&&(o=1),this[A+i]=(e/a>>0)-o&255;return A+t},s.prototype.writeInt8=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,1,127,-128),e<0&&(e=255+e+1),this[A]=255&e,A+1},s.prototype.writeInt16LE=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,2,32767,-32768),this[A]=255&e,this[A+1]=e>>>8,A+2},s.prototype.writeInt16BE=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,2,32767,-32768),this[A]=e>>>8,this[A+1]=255&e,A+2},s.prototype.writeInt32LE=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,4,2147483647,-2147483648),this[A]=255&e,this[A+1]=e>>>8,this[A+2]=e>>>16,this[A+3]=e>>>24,A+4},s.prototype.writeInt32BE=function(e,A,t){return e=+e,A>>>=0,t||G(this,e,A,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e,A+4},s.prototype.writeFloatLE=function(e,A,t){return L(this,e,A,!0,t)},s.prototype.writeFloatBE=function(e,A,t){return L(this,e,A,!1,t)},s.prototype.writeDoubleLE=function(e,A,t){return x(this,e,A,!0,t)},s.prototype.writeDoubleBE=function(e,A,t){return x(this,e,A,!1,t)},s.prototype.copy=function(e,A,t,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(t||(t=0),r||0===r||(r=this.length),A>=e.length&&(A=e.length),A||(A=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-A>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(i=A;i55295&&t<57344){if(!n){if(t>56319){(A-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(A-=3)>-1&&i.push(239,191,189);continue}n=t;continue}if(t<56320){(A-=3)>-1&&i.push(239,191,189),n=t;continue}t=65536+(n-55296<<10|t-56320)}else n&&(A-=3)>-1&&i.push(239,191,189);if(n=null,t<128){if((A-=1)<0)break;i.push(t)}else if(t<2048){if((A-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((A-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((A-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function Y(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,A,t,r){for(var n=0;n=A.length||n>=e.length);++n)A[n+t]=e[n];return n}function V(e,A){return e instanceof A||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===A.name}function T(e){return e!=e}var P=function(){for(var e="0123456789abcdef",A=new Array(256),t=0;t<16;++t)for(var r=16*t,n=0;n<16;++n)A[r+n]=e[t]+e[n];return A}()},1027:(e,A,t)=>{var r=t(9509).Buffer,n=t(2830).Transform,i=t(2553).s;function a(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}t(5717)(a,n),a.prototype.update=function(e,A,t){"string"==typeof e&&(e=r.from(e,A));var n=this._update(e);return this.hashMode?this:(t&&(n=this._toString(n,t)),n)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,A,t){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{t(r)}},a.prototype._flush=function(e){var A;try{this.push(this.__final())}catch(e){A=e}e(A)},a.prototype._finalOrDigest=function(e){var A=this.__final()||r.alloc(0);return e&&(A=this._toString(A,e,!0)),A},a.prototype._toString=function(e,A,t){if(this._decoder||(this._decoder=new i(A),this._encoding=A),this._encoding!==A)throw new Error("can't switch encodings");var r=this._decoder.write(e);return t&&(r+=this._decoder.end()),r},e.exports=a},6393:(e,A,t)=>{var r=t(6266),n=t(6426);e.exports=function(e){return new a(e)};var i={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 a(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function o(e,A,t){Array.isArray(e)||(e=e.toArray());var r=new Buffer(e);if(t&&r.length=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(e,A,t){var r=o(e,t);return t-1>=A&&(r|=o(e,t-1)<<4),r}function u(e,A,t,r){for(var n=0,i=Math.min(e.length,t),a=A;a=49?o-49+10:o>=17?o-17+10:o}return n}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,A){return e.cmp(A)>0?e:A},i.min=function(e,A){return e.cmp(A)<0?e:A},i.prototype._init=function(e,A,t){if("number"==typeof e)return this._initNumber(e,A,t);if("object"==typeof e)return this._initArray(e,A,t);"hex"===A&&(A=16),r(A===(0|A)&&A>=2&&A<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,A,t){this.length=Math.ceil((e.length-A)/6),this.words=new Array(this.length);for(var r=0;r=A;r-=2)n=s(e,A,r)<=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;else for(r=(e.length-A)%2==0?A+1:A;r=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,A,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=A)r++;r--,n=n/A|0;for(var i=e.length-t,a=i%r,o=Math.min(i,i-a)+t,s=0,c=t;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var c=["","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"],g=[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],l=[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 B(e,A,t){t.negative=A.negative^e.negative;var r=e.length+A.length|0;t.length=r,r=r-1|0;var n=0|e.words[0],i=0|A.words[0],a=n*i,o=67108863&a,s=a/67108864|0;t.words[0]=o;for(var u=1;u>>26,g=67108863&s,l=Math.min(u,A.length-1),B=Math.max(0,u-e.length+1);B<=l;B++){var Q=u-B|0;c+=(a=(n=0|e.words[Q])*(i=0|A.words[B])+g)/67108864|0,g=67108863&a}t.words[u]=0|g,s=0|c}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(e,A){var t;if(A=0|A||1,16===(e=e||10)||"hex"===e){t="";for(var n=0,i=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,a--)}for(0!==i&&(t=i.toString(16)+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var u=g[e],B=l[e];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(B).toString(e);t=(Q=Q.idivn(B)).isZero()?I+t:c[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,A){return r(void 0!==a),this.toArrayLike(a,e,A)},i.prototype.toArray=function(e,A){return this.toArrayLike(Array,e,A)},i.prototype.toArrayLike=function(e,A,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var a,o,s="le"===A,u=new e(i),c=this.clone();if(s){for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),u[o]=a;for(;o=4096&&(t+=13,A>>>=13),A>=64&&(t+=7,A>>>=7),A>=8&&(t+=4,A>>>=4),A>=2&&(t+=2,A>>>=2),t+A},i.prototype._zeroBits=function(e){if(0===e)return 26;var A=e,t=0;return 0==(8191&A)&&(t+=13,A>>>=13),0==(127&A)&&(t+=7,A>>>=7),0==(15&A)&&(t+=4,A>>>=4),0==(3&A)&&(t+=2,A>>>=2),0==(1&A)&&t++,t},i.prototype.bitLength=function(){var e=this.words[this.length-1],A=this._countBits(e);return 26*(this.length-1)+A},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,A=0;Ae.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var A;A=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var A,t;this.length>e.length?(A=this,t=e):(A=e,t=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var A=0|Math.ceil(e/26),t=e%26;this._expand(A),t>0&&A--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,A){r("number"==typeof e&&e>=0);var t=e/26|0,n=e%26;return this._expand(t+1),this.words[t]=A?this.words[t]|1<e.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var A=this.iadd(e);return e.negative=1,A._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&A;for(;0!==i&&a>26,this.words[a]=67108863&A;if(0===i&&a>>13,B=0|a[1],Q=8191&B,I=B>>>13,d=0|a[2],h=8191&d,f=d>>>13,E=0|a[3],p=8191&E,C=E>>>13,m=0|a[4],y=8191&m,v=m>>>13,b=0|a[5],D=8191&b,w=b>>>13,F=0|a[6],U=8191&F,S=F>>>13,N=0|a[7],R=8191&N,G=N>>>13,M=0|a[8],L=8191&M,x=M>>>13,H=0|a[9],k=8191&H,Y=H>>>13,_=0|o[0],V=8191&_,T=_>>>13,P=0|o[1],O=8191&P,J=P>>>13,K=0|o[2],j=8191&K,q=K>>>13,z=0|o[3],Z=8191&z,W=z>>>13,X=0|o[4],$=8191&X,ee=X>>>13,Ae=0|o[5],te=8191&Ae,re=Ae>>>13,ne=0|o[6],ie=8191&ne,ae=ne>>>13,oe=0|o[7],se=8191&oe,ue=oe>>>13,ce=0|o[8],ge=8191&ce,le=ce>>>13,Be=0|o[9],Qe=8191&Be,Ie=Be>>>13;t.negative=e.negative^A.negative,t.length=19;var de=(u+(r=Math.imul(g,V))|0)+((8191&(n=(n=Math.imul(g,T))+Math.imul(l,V)|0))<<13)|0;u=((i=Math.imul(l,T))+(n>>>13)|0)+(de>>>26)|0,de&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var he=(u+(r=r+Math.imul(g,O)|0)|0)+((8191&(n=(n=n+Math.imul(g,J)|0)+Math.imul(l,O)|0))<<13)|0;u=((i=i+Math.imul(l,J)|0)+(n>>>13)|0)+(he>>>26)|0,he&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(f,V)|0,i=Math.imul(f,T),r=r+Math.imul(Q,O)|0,n=(n=n+Math.imul(Q,J)|0)+Math.imul(I,O)|0,i=i+Math.imul(I,J)|0;var fe=(u+(r=r+Math.imul(g,j)|0)|0)+((8191&(n=(n=n+Math.imul(g,q)|0)+Math.imul(l,j)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(n>>>13)|0)+(fe>>>26)|0,fe&=67108863,r=Math.imul(p,V),n=(n=Math.imul(p,T))+Math.imul(C,V)|0,i=Math.imul(C,T),r=r+Math.imul(h,O)|0,n=(n=n+Math.imul(h,J)|0)+Math.imul(f,O)|0,i=i+Math.imul(f,J)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,q)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,q)|0;var Ee=(u+(r=r+Math.imul(g,Z)|0)|0)+((8191&(n=(n=n+Math.imul(g,W)|0)+Math.imul(l,Z)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(p,O)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(C,O)|0,i=i+Math.imul(C,J)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,q)|0)+Math.imul(f,j)|0,i=i+Math.imul(f,q)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var pe=(u+(r=r+Math.imul(g,$)|0)|0)+((8191&(n=(n=n+Math.imul(g,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(n>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(D,V),n=(n=Math.imul(D,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,O)|0,n=(n=n+Math.imul(y,J)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,J)|0,r=r+Math.imul(p,j)|0,n=(n=n+Math.imul(p,q)|0)+Math.imul(C,j)|0,i=i+Math.imul(C,q)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(f,Z)|0,i=i+Math.imul(f,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0;var Ce=(u+(r=r+Math.imul(g,te)|0)|0)+((8191&(n=(n=n+Math.imul(g,re)|0)+Math.imul(l,te)|0))<<13)|0;u=((i=i+Math.imul(l,re)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(D,O)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(w,O)|0,i=i+Math.imul(w,J)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,q)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,q)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(f,$)|0,i=i+Math.imul(f,ee)|0,r=r+Math.imul(Q,te)|0,n=(n=n+Math.imul(Q,re)|0)+Math.imul(I,te)|0,i=i+Math.imul(I,re)|0;var me=(u+(r=r+Math.imul(g,ie)|0)|0)+((8191&(n=(n=n+Math.imul(g,ae)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,ae)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(G,V)|0,i=Math.imul(G,T),r=r+Math.imul(U,O)|0,n=(n=n+Math.imul(U,J)|0)+Math.imul(S,O)|0,i=i+Math.imul(S,J)|0,r=r+Math.imul(D,j)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(h,te)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(f,te)|0,i=i+Math.imul(f,re)|0,r=r+Math.imul(Q,ie)|0,n=(n=n+Math.imul(Q,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0;var ye=(u+(r=r+Math.imul(g,se)|0)|0)+((8191&(n=(n=n+Math.imul(g,ue)|0)+Math.imul(l,se)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(L,V),n=(n=Math.imul(L,T))+Math.imul(x,V)|0,i=Math.imul(x,T),r=r+Math.imul(R,O)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(G,O)|0,i=i+Math.imul(G,J)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,q)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,q)|0,r=r+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,r=r+Math.imul(p,te)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(C,te)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,ae)|0)+Math.imul(f,ie)|0,i=i+Math.imul(f,ae)|0,r=r+Math.imul(Q,se)|0,n=(n=n+Math.imul(Q,ue)|0)+Math.imul(I,se)|0,i=i+Math.imul(I,ue)|0;var ve=(u+(r=r+Math.imul(g,ge)|0)|0)+((8191&(n=(n=n+Math.imul(g,le)|0)+Math.imul(l,ge)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(L,O)|0,n=(n=n+Math.imul(L,J)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,J)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,q)|0)+Math.imul(G,j)|0,i=i+Math.imul(G,q)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(y,te)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(v,te)|0,i=i+Math.imul(v,re)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(h,se)|0,n=(n=n+Math.imul(h,ue)|0)+Math.imul(f,se)|0,i=i+Math.imul(f,ue)|0,r=r+Math.imul(Q,ge)|0,n=(n=n+Math.imul(Q,le)|0)+Math.imul(I,ge)|0,i=i+Math.imul(I,le)|0;var be=(u+(r=r+Math.imul(g,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(g,Ie)|0)+Math.imul(l,Qe)|0))<<13)|0;u=((i=i+Math.imul(l,Ie)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,O),n=(n=Math.imul(k,J))+Math.imul(Y,O)|0,i=Math.imul(Y,J),r=r+Math.imul(L,j)|0,n=(n=n+Math.imul(L,q)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,q)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(G,Z)|0,i=i+Math.imul(G,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(D,te)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(w,te)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,r=r+Math.imul(p,se)|0,n=(n=n+Math.imul(p,ue)|0)+Math.imul(C,se)|0,i=i+Math.imul(C,ue)|0,r=r+Math.imul(h,ge)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(f,ge)|0,i=i+Math.imul(f,le)|0;var De=(u+(r=r+Math.imul(Q,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(Q,Ie)|0)+Math.imul(I,Qe)|0))<<13)|0;u=((i=i+Math.imul(I,Ie)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,q))+Math.imul(Y,j)|0,i=Math.imul(Y,q),r=r+Math.imul(L,Z)|0,n=(n=n+Math.imul(L,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(G,$)|0,i=i+Math.imul(G,ee)|0,r=r+Math.imul(U,te)|0,n=(n=n+Math.imul(U,re)|0)+Math.imul(S,te)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(y,se)|0,n=(n=n+Math.imul(y,ue)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ue)|0,r=r+Math.imul(p,ge)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(C,ge)|0,i=i+Math.imul(C,le)|0;var we=(u+(r=r+Math.imul(h,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(h,Ie)|0)+Math.imul(f,Qe)|0))<<13)|0;u=((i=i+Math.imul(f,Ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(R,te)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(G,te)|0,i=i+Math.imul(G,re)|0,r=r+Math.imul(U,ie)|0,n=(n=n+Math.imul(U,ae)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,ae)|0,r=r+Math.imul(D,se)|0,n=(n=n+Math.imul(D,ue)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,ue)|0,r=r+Math.imul(y,ge)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(v,ge)|0,i=i+Math.imul(v,le)|0;var Fe=(u+(r=r+Math.imul(p,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(p,Ie)|0)+Math.imul(C,Qe)|0))<<13)|0;u=((i=i+Math.imul(C,Ie)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,ee))+Math.imul(Y,$)|0,i=Math.imul(Y,ee),r=r+Math.imul(L,te)|0,n=(n=n+Math.imul(L,re)|0)+Math.imul(x,te)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,ae)|0)+Math.imul(G,ie)|0,i=i+Math.imul(G,ae)|0,r=r+Math.imul(U,se)|0,n=(n=n+Math.imul(U,ue)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,ue)|0,r=r+Math.imul(D,ge)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(w,ge)|0,i=i+Math.imul(w,le)|0;var Ue=(u+(r=r+Math.imul(y,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(y,Ie)|0)+Math.imul(v,Qe)|0))<<13)|0;u=((i=i+Math.imul(v,Ie)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul(k,te),n=(n=Math.imul(k,re))+Math.imul(Y,te)|0,i=Math.imul(Y,re),r=r+Math.imul(L,ie)|0,n=(n=n+Math.imul(L,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(R,se)|0,n=(n=n+Math.imul(R,ue)|0)+Math.imul(G,se)|0,i=i+Math.imul(G,ue)|0,r=r+Math.imul(U,ge)|0,n=(n=n+Math.imul(U,le)|0)+Math.imul(S,ge)|0,i=i+Math.imul(S,le)|0;var Se=(u+(r=r+Math.imul(D,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(D,Ie)|0)+Math.imul(w,Qe)|0))<<13)|0;u=((i=i+Math.imul(w,Ie)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,ie),n=(n=Math.imul(k,ae))+Math.imul(Y,ie)|0,i=Math.imul(Y,ae),r=r+Math.imul(L,se)|0,n=(n=n+Math.imul(L,ue)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ue)|0,r=r+Math.imul(R,ge)|0,n=(n=n+Math.imul(R,le)|0)+Math.imul(G,ge)|0,i=i+Math.imul(G,le)|0;var Ne=(u+(r=r+Math.imul(U,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(U,Ie)|0)+Math.imul(S,Qe)|0))<<13)|0;u=((i=i+Math.imul(S,Ie)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(k,se),n=(n=Math.imul(k,ue))+Math.imul(Y,se)|0,i=Math.imul(Y,ue),r=r+Math.imul(L,ge)|0,n=(n=n+Math.imul(L,le)|0)+Math.imul(x,ge)|0,i=i+Math.imul(x,le)|0;var Re=(u+(r=r+Math.imul(R,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(R,Ie)|0)+Math.imul(G,Qe)|0))<<13)|0;u=((i=i+Math.imul(G,Ie)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(k,ge),n=(n=Math.imul(k,le))+Math.imul(Y,ge)|0,i=Math.imul(Y,le);var Ge=(u+(r=r+Math.imul(L,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(L,Ie)|0)+Math.imul(x,Qe)|0))<<13)|0;u=((i=i+Math.imul(x,Ie)|0)+(n>>>13)|0)+(Ge>>>26)|0,Ge&=67108863;var Me=(u+(r=Math.imul(k,Qe))|0)+((8191&(n=(n=Math.imul(k,Ie))+Math.imul(Y,Qe)|0))<<13)|0;return u=((i=Math.imul(Y,Ie))+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=de,s[1]=he,s[2]=fe,s[3]=Ee,s[4]=pe,s[5]=Ce,s[6]=me,s[7]=ye,s[8]=ve,s[9]=be,s[10]=De,s[11]=we,s[12]=Fe,s[13]=Ue,s[14]=Se,s[15]=Ne,s[16]=Re,s[17]=Ge,s[18]=Me,0!==u&&(s[19]=u,t.length++),t};function I(e,A,t){return(new d).mulp(e,A,t)}function d(e,A){this.x=e,this.y=A}Math.imul||(Q=B),i.prototype.mulTo=function(e,A){var t,r=this.length+e.length;return t=10===this.length&&10===e.length?Q(this,e,A):r<63?B(this,e,A):r<1024?function(e,A,t){t.negative=A.negative^e.negative,t.length=e.length+A.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,a&=67108863}t.words[i]=o,r=a,a=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,e,A):I(this,e,A),t},d.prototype.makeRBT=function(e){for(var A=new Array(e),t=i.prototype._countBits(e)-1,r=0;r>=1;return r},d.prototype.permute=function(e,A,t,r,n,i){for(var a=0;a>>=1)n++;return 1<>>=13,t[2*a+1]=8191&i,i>>>=13;for(a=2*A;a>=26,A+=n/67108864|0,A+=i>>>26,this.words[t]=67108863&i}return 0!==A&&(this.words[t]=A,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var A=function(e){for(var A=new Array(e.bitLength()),t=0;t>>n}return A}(e);if(0===A.length)return new i(1);for(var t=this,r=0;r=0);var A,t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var a=0;for(A=0;A>>26-t}a&&(this.words[A]=a,this.length++)}if(0!==n){for(A=this.length-1;A>=0;A--)this.words[A+n]=this.words[A];for(A=0;A=0),n=A?(A-A%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var g=0|this.words[u];this.words[u]=c<<26-i|g>>>i,c=g&o}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,A,t){return r(0===this.negative),this.iushrn(e,A,t)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var A=e%26,t=(e-A)/26,n=1<=0);var A=e%26,t=(e-A)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==A&&t++,this.length=Math.min(t,this.length),0!==A){var n=67108863^67108863>>>A<=67108864;A++)this.words[A]-=67108864,A===this.length-1?this.words[A+1]=1:this.words[A+1]++;return this.length=Math.max(this.length,A+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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 A=0;A>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,A){var t=(this.length,e.length),r=this.clone(),n=e,a=0|n.words[n.length-1];0!=(t=26-this._countBits(a))&&(n=n.ushln(t),r.iushln(t),a=0|n.words[n.length-1]);var o,s=r.length-n.length;if("mod"!==A){(o=new i(null)).length=s+1,o.words=new Array(o.length);for(var u=0;u=0;g--){var l=67108864*(0|r.words[n.length+g])+(0|r.words[n.length+g-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(n,l,g);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,g),r.isZero()||(r.negative^=1);o&&(o.words[g]=l)}return o&&o.strip(),r.strip(),"div"!==A&&0!==t&&r.iushrn(t),{div:o||null,mod:r}},i.prototype.divmod=function(e,A,t){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,A),"mod"!==A&&(n=o.div.neg()),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),A),"mod"!==A&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),A),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===A?{div:this.divn(e.words[0]),mod:null}:"mod"===A?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,A);var n,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var A=this.divmod(e);if(A.mod.isZero())return A.div;var t=0!==A.div.negative?A.mod.isub(e):A.mod,r=e.ushrn(1),n=e.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?A.div:0!==A.div.negative?A.div.isubn(1):A.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var A=(1<<26)%e,t=0,n=this.length-1;n>=0;n--)t=(A*t+(0|this.words[n]))%e;return t},i.prototype.idivn=function(e){r(e<=67108863);for(var A=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*A;this.words[t]=n/e|0,A=n%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n=new i(1),a=new i(0),o=new i(0),s=new i(1),u=0;A.isEven()&&t.isEven();)A.iushrn(1),t.iushrn(1),++u;for(var c=t.clone(),g=A.clone();!A.isZero();){for(var l=0,B=1;0==(A.words[0]&B)&&l<26;++l,B<<=1);if(l>0)for(A.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(c),a.isub(g)),n.iushrn(1),a.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(g)),o.iushrn(1),s.iushrn(1);A.cmp(t)>=0?(A.isub(t),n.isub(o),a.isub(s)):(t.isub(A),o.isub(n),s.isub(a))}return{a:o,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n,a=new i(1),o=new i(0),s=t.clone();A.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,c=1;0==(A.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var g=0,l=1;0==(t.words[0]&l)&&g<26;++g,l<<=1);if(g>0)for(t.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);A.cmp(t)>=0?(A.isub(t),a.isub(o)):(t.isub(A),o.isub(a))}return(n=0===A.cmpn(1)?a:o).cmpn(0)<0&&n.iadd(e),n},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var A=this.clone(),t=e.clone();A.negative=0,t.negative=0;for(var r=0;A.isEven()&&t.isEven();r++)A.iushrn(1),t.iushrn(1);for(;;){for(;A.isEven();)A.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=A.cmp(t);if(n<0){var i=A;A=t,t=i}else if(0===n||0===t.cmpn(1))break;A.isub(t)}return t.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var A=e%26,t=(e-A)/26,n=1<>>26,o&=67108863,this.words[a]=o}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var A,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)A=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];A=n===e?0:ne.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|e.words[t];if(r!==n){rn&&(A=1);break}}return A},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var h={k256:null,p224:null,p192:null,p25519:null};function f(e,A){this.name=e,this.p=new i(A,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var A=i._prime(e);this.m=A.p,this.prime=A}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}f.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},f.prototype.ireduce=function(e){var A,t=e;do{this.split(t,this.tmp),A=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(A>this.n);var r=A0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},f.prototype.split=function(e,A){e.iushrn(this.n,0,A)},f.prototype.imulK=function(e){return e.imul(this.k)},n(E,f),E.prototype.split=function(e,A){for(var t=4194303,r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var A=0,t=0;t>>=26,e.words[t]=n,A=r}return 0!==A&&(e.words[e.length++]=A),e},i._prime=function(e){if(h[e])return h[e];var A;if("k256"===e)A=new E;else if("p224"===e)A=new p;else if("p192"===e)A=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);A=new m}return h[e]=A,A},y.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,A){r(0==(e.negative|A.negative),"red works only with positives"),r(e.red&&e.red===A.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,A){this._verify2(e,A);var t=e.add(A);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(e,A){this._verify2(e,A);var t=e.iadd(A);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(e,A){this._verify2(e,A);var t=e.sub(A);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(e,A){this._verify2(e,A);var t=e.isub(A);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(e,A){return this._verify1(e),this.imod(e.ushln(A))},y.prototype.imul=function(e,A){return this._verify2(e,A),this.imod(e.imul(A))},y.prototype.mul=function(e,A){return this._verify2(e,A),this.imod(e.mul(A))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var A=this.m.andln(3);if(r(A%2==1),3===A){var t=this.m.add(new i(1)).iushrn(2);return this.pow(e,t)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var o=new i(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var g=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),B=this.pow(e,n),Q=a;0!==B.cmp(o);){for(var I=B,d=0;0!==I.cmp(o);d++)I=I.redSqr();r(d=0;r--){for(var u=A.words[r],c=s-1;c>=0;c--){var g=u>>c&1;n!==t[0]&&(n=this.sqr(n)),0!==g||0!==a?(a<<=1,a|=g,(4==++o||0===r&&0===c)&&(n=this.mul(n,t[a]),o=0,a=0)):o=0}s=26}return n},y.prototype.convertTo=function(e){var A=e.umod(this.m);return A===e?A.clone():A},y.prototype.convertFrom=function(e){var A=e.clone();return A.red=null,A},i.mont=function(e){return new v(e)},n(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var A=this.imod(e.mul(this.rinv));return A.red=null,A},v.prototype.imul=function(e,A){if(e.isZero()||A.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,A){if(e.isZero()||A.isZero())return new i(0)._forceRed(this);var t=e.mul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},3482:(e,A,t)=>{"use strict";var r=t(5717),n=t(2318),i=t(9785),a=t(9072),o=t(1027);function s(e){o.call(this,"digest"),this._hash=e}r(s,o),s.prototype._update=function(e){this._hash.update(e)},s.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new n:"rmd160"===e||"ripemd160"===e?new i:new s(a(e))}},8028:(e,A,t)=>{var r=t(2318);e.exports=function(e){return(new r).update(e).digest()}},8355:(e,A,t)=>{"use strict";var r=t(5717),n=t(1031),i=t(1027),a=t(9509).Buffer,o=t(8028),s=t(9785),u=t(9072),c=a.alloc(128);function g(e,A){i.call(this,"digest"),"string"==typeof A&&(A=a.from(A));var t="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=A,A.length>t?A=("rmd160"===e?new s:u(e)).update(A).digest():A.length{"use strict";var r=t(5717),n=t(9509).Buffer,i=t(1027),a=n.alloc(128),o=64;function s(e,A){i.call(this,"digest"),"string"==typeof A&&(A=n.from(A)),this._alg=e,this._key=A,A.length>o?A=e(A):A.length{"use strict";A.randomBytes=A.rng=A.pseudoRandomBytes=A.prng=t(1798),A.createHash=A.Hash=t(3482),A.createHmac=A.Hmac=t(8355);var r=t(6042),n=Object.keys(r),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);A.getHashes=function(){return i};var a=t(5632);A.pbkdf2=a.pbkdf2,A.pbkdf2Sync=a.pbkdf2Sync;var o=t(3614);A.Cipher=o.Cipher,A.createCipher=o.createCipher,A.Cipheriv=o.Cipheriv,A.createCipheriv=o.createCipheriv,A.Decipher=o.Decipher,A.createDecipher=o.createDecipher,A.Decipheriv=o.Decipheriv,A.createDecipheriv=o.createDecipheriv,A.getCiphers=o.getCiphers,A.listCiphers=o.listCiphers;var s=t(2607);A.DiffieHellmanGroup=s.DiffieHellmanGroup,A.createDiffieHellmanGroup=s.createDiffieHellmanGroup,A.getDiffieHellman=s.getDiffieHellman,A.createDiffieHellman=s.createDiffieHellman,A.DiffieHellman=s.DiffieHellman;var u=t(4743);A.createSign=u.createSign,A.Sign=u.Sign,A.createVerify=u.createVerify,A.Verify=u.Verify,A.createECDH=t(6393);var c=t(7900);A.publicEncrypt=c.publicEncrypt,A.privateEncrypt=c.privateEncrypt,A.publicDecrypt=c.publicDecrypt,A.privateDecrypt=c.privateDecrypt;var g=t(7963);A.randomFill=g.randomFill,A.randomFillSync=g.randomFillSync,A.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},A.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}},9540:(e,A,t)=>{"use strict";A.utils=t(1278),A.Cipher=t(5756),A.DES=t(778),A.CBC=t(9051),A.EDE=t(651)},9051:(e,A,t)=>{"use strict";var r=t(9746),n=t(5717),i={};function a(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var A=0;A{"use strict";var r=t(9746);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}e.exports=n,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,A){for(var t=Math.min(this.buffer.length-this.bufferOff,e.length-A),r=0;r0;r--)A+=this._buffer(e,A),t+=this._flushBuffer(n,t);return A+=this._buffer(e,A),n},n.prototype.final=function(e){var A,t;return e&&(A=this.update(e)),t="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),A?A.concat(t):t},n.prototype._pad=function(e,A){if(0===A)return!1;for(;A{"use strict";var r=t(9746),n=t(5717),i=t(1278),a=t(5756);function o(){this.tmp=new Array(2),this.keys=null}function s(e){a.call(this,e);var A=new o;this._desState=A,this.deriveKeys(A,e.key)}n(s,a),e.exports=s,s.create=function(e){return new s(e)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];s.prototype.deriveKeys=function(e,A){e.keys=new Array(32),r.equal(A.length,this.blockSize,"Invalid key length");var t=i.readUInt32BE(A,0),n=i.readUInt32BE(A,4);i.pc1(t,n,e.tmp,0),t=e.tmp[0],n=e.tmp[1];for(var a=0;a>>1];t=i.r28shl(t,o),n=i.r28shl(n,o),i.pc2(t,n,e.keys,a)}},s.prototype._update=function(e,A,t,r){var n=this._desState,a=i.readUInt32BE(e,A),o=i.readUInt32BE(e,A+4);i.ip(a,o,n.tmp,0),a=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,a,o,n.tmp,0):this._decrypt(n,a,o,n.tmp,0),a=n.tmp[0],o=n.tmp[1],i.writeUInt32BE(t,a,r),i.writeUInt32BE(t,o,r+4)},s.prototype._pad=function(e,A){for(var t=e.length-A,r=A;r>>0,a=l}i.rip(o,a,r,n)},s.prototype._decrypt=function(e,A,t,r,n){for(var a=t,o=A,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],c=e.keys[s+1];i.expand(a,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var g=i.substitute(u,c),l=a;a=(o^i.permute(g))>>>0,o=l}i.rip(a,o,r,n)}},651:(e,A,t)=>{"use strict";var r=t(9746),n=t(5717),i=t(5756),a=t(778);function o(e,A){r.equal(A.length,24,"Invalid key length");var t=A.slice(0,8),n=A.slice(8,16),i=A.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:t}),a.create({type:"decrypt",key:n}),a.create({type:"encrypt",key:i})]:[a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:n}),a.create({type:"decrypt",key:t})]}function s(e){i.call(this,e);var A=new o(this.type,this.options.key);this._edeState=A}n(s,i),e.exports=s,s.create=function(e){return new s(e)},s.prototype._update=function(e,A,t,r){var n=this._edeState;n.ciphers[0]._update(e,A,t,r),n.ciphers[1]._update(t,r,t,r),n.ciphers[2]._update(t,r,t,r)},s.prototype._pad=a.prototype._pad,s.prototype._unpad=a.prototype._unpad},1278:(e,A)=>{"use strict";A.readUInt32BE=function(e,A){return(e[0+A]<<24|e[1+A]<<16|e[2+A]<<8|e[3+A])>>>0},A.writeUInt32BE=function(e,A,t){e[0+t]=A>>>24,e[1+t]=A>>>16&255,e[2+t]=A>>>8&255,e[3+t]=255&A},A.ip=function(e,A,t,r){for(var n=0,i=0,a=6;a>=0;a-=2){for(var o=0;o<=24;o+=8)n<<=1,n|=A>>>o+a&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>>o+a&1}for(a=6;a>=0;a-=2){for(o=1;o<=25;o+=8)i<<=1,i|=A>>>o+a&1;for(o=1;o<=25;o+=8)i<<=1,i|=e>>>o+a&1}t[r+0]=n>>>0,t[r+1]=i>>>0},A.rip=function(e,A,t,r){for(var n=0,i=0,a=0;a<4;a++)for(var o=24;o>=0;o-=8)n<<=1,n|=A>>>o+a&1,n<<=1,n|=e>>>o+a&1;for(a=4;a<8;a++)for(o=24;o>=0;o-=8)i<<=1,i|=A>>>o+a&1,i<<=1,i|=e>>>o+a&1;t[r+0]=n>>>0,t[r+1]=i>>>0},A.pc1=function(e,A,t,r){for(var n=0,i=0,a=7;a>=5;a--){for(var o=0;o<=24;o+=8)n<<=1,n|=A>>o+a&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>o+a&1}for(o=0;o<=24;o+=8)n<<=1,n|=A>>o+a&1;for(a=1;a<=3;a++){for(o=0;o<=24;o+=8)i<<=1,i|=A>>o+a&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+a&1}for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+a&1;t[r+0]=n>>>0,t[r+1]=i>>>0},A.r28shl=function(e,A){return e<>>28-A};var t=[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];A.pc2=function(e,A,r,n){for(var i=0,a=0,o=t.length>>>1,s=0;s>>t[s]&1;for(s=o;s>>t[s]&1;r[n+0]=i>>>0,r[n+1]=a>>>0},A.expand=function(e,A,t){var r=0,n=0;r=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)r<<=6,r|=e>>>i&63;for(i=11;i>=3;i-=4)n|=e>>>i&63,n<<=6;n|=(31&e)<<1|e>>>31,A[t+0]=r>>>0,A[t+1]=n>>>0};var r=[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];A.substitute=function(e,A){for(var t=0,n=0;n<4;n++)t<<=4,t|=r[64*n+(e>>>18-6*n&63)];for(n=0;n<4;n++)t<<=4,t|=r[256+64*n+(A>>>18-6*n&63)];return t>>>0};var n=[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];A.permute=function(e){for(var A=0,t=0;t>>n[t]&1;return A>>>0},A.padSplit=function(e,A,t){for(var r=e.toString(2);r.length{var r=t(3590),n=t(9799),i=t(7426),a={binary:!0,hex:!0,base64:!0};A.DiffieHellmanGroup=A.createDiffieHellmanGroup=A.getDiffieHellman=function(e){var A=new Buffer(n[e].prime,"hex"),t=new Buffer(n[e].gen,"hex");return new i(A,t)},A.createDiffieHellman=A.DiffieHellman=function e(A,t,n,o){return Buffer.isBuffer(t)||void 0===a[t]?e(A,"binary",t,n):(t=t||"binary",o=o||"binary",n=n||new Buffer([2]),Buffer.isBuffer(n)||(n=new Buffer(n,o)),"number"==typeof A?new i(r(A,n),n,!0):(Buffer.isBuffer(A)||(A=new Buffer(A,t)),new i(A,n,!0)))}},7426:(e,A,t)=>{var r=t(3620),n=new(t(3047)),i=new r(24),a=new r(11),o=new r(10),s=new r(3),u=new r(7),c=t(3590),g=t(1798);function l(e,A){return A=A||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,A)),this._pub=new r(e),this}function B(e,A){return A=A||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,A)),this._priv=new r(e),this}e.exports=I;var Q={};function I(e,A,t){this.setGenerator(A),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,t?(this.setPublicKey=l,this.setPrivateKey=B):this._primeCode=8}function d(e,A){var t=new Buffer(e.toArray());return A?t.toString(A):t}Object.defineProperty(I.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,A){var t=A.toString("hex"),r=[t,e.toString(16)].join("_");if(r in Q)return Q[r];var g,l=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!n.test(e))return l+=1,l+="02"===t||"05"===t?8:4,Q[r]=l,l;switch(n.test(e.shrn(1))||(l+=2),t){case"02":e.mod(i).cmp(a)&&(l+=8);break;case"05":(g=e.mod(o)).cmp(s)&&g.cmp(u)&&(l+=8);break;default:l+=4}return Q[r]=l,l}(this.__prime,this.__gen)),this._primeCode}}),I.prototype.generateKeys=function(){return this._priv||(this._priv=new r(g(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},I.prototype.computeSecret=function(e){var A=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),t=new Buffer(A.toArray()),n=this.getPrime();if(t.length{var r=t(1798);e.exports=f,f.simpleSieve=d,f.fermatTest=h;var n=t(3620),i=new n(24),a=new(t(3047)),o=new n(1),s=new n(2),u=new n(5),c=(new n(16),new n(8),new n(10)),g=new n(3),l=(new n(7),new n(11)),B=new n(4),Q=(new n(12),null);function I(){if(null!==Q)return Q;var e=[];e[0]=2;for(var A=1,t=3;t<1048576;t+=2){for(var r=Math.ceil(Math.sqrt(t)),n=0;ne;)t.ishrn(1);if(t.isEven()&&t.iadd(o),t.testn(1)||t.iadd(s),A.cmp(s)){if(!A.cmp(u))for(;t.mod(c).cmp(g);)t.iadd(B)}else for(;t.mod(i).cmp(l);)t.iadd(B);if(d(Q=t.shrn(1))&&d(t)&&h(Q)&&h(t)&&a.test(Q)&&a.test(t))return t}}},3620:function(e,A,t){!function(e,A){"use strict";function r(e,A){if(!e)throw new Error(A||"Assertion failed")}function n(e,A){e.super_=A;var t=function(){};t.prototype=A.prototype,e.prototype=new t,e.prototype.constructor=e}function i(e,A,t){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==A&&"be"!==A||(t=A,A=10),this._init(e||0,A||10,t||"be"))}var a;"object"==typeof e?e.exports=i:A.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(7748).Buffer}catch(e){}function o(e,A){var t=e.charCodeAt(A);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(e,A,t){var r=o(e,t);return t-1>=A&&(r|=o(e,t-1)<<4),r}function u(e,A,t,r){for(var n=0,i=Math.min(e.length,t),a=A;a=49?o-49+10:o>=17?o-17+10:o}return n}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,A){return e.cmp(A)>0?e:A},i.min=function(e,A){return e.cmp(A)<0?e:A},i.prototype._init=function(e,A,t){if("number"==typeof e)return this._initNumber(e,A,t);if("object"==typeof e)return this._initArray(e,A,t);"hex"===A&&(A=16),r(A===(0|A)&&A>=2&&A<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,A,t){this.length=Math.ceil((e.length-A)/6),this.words=new Array(this.length);for(var r=0;r=A;r-=2)n=s(e,A,r)<=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;else for(r=(e.length-A)%2==0?A+1:A;r=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,A,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=A)r++;r--,n=n/A|0;for(var i=e.length-t,a=i%r,o=Math.min(i,i-a)+t,s=0,c=t;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var c=["","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"],g=[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],l=[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 B(e,A,t){t.negative=A.negative^e.negative;var r=e.length+A.length|0;t.length=r,r=r-1|0;var n=0|e.words[0],i=0|A.words[0],a=n*i,o=67108863&a,s=a/67108864|0;t.words[0]=o;for(var u=1;u>>26,g=67108863&s,l=Math.min(u,A.length-1),B=Math.max(0,u-e.length+1);B<=l;B++){var Q=u-B|0;c+=(a=(n=0|e.words[Q])*(i=0|A.words[B])+g)/67108864|0,g=67108863&a}t.words[u]=0|g,s=0|c}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(e,A){var t;if(A=0|A||1,16===(e=e||10)||"hex"===e){t="";for(var n=0,i=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,a--)}for(0!==i&&(t=i.toString(16)+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var u=g[e],B=l[e];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(B).toString(e);t=(Q=Q.idivn(B)).isZero()?I+t:c[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,A){return r(void 0!==a),this.toArrayLike(a,e,A)},i.prototype.toArray=function(e,A){return this.toArrayLike(Array,e,A)},i.prototype.toArrayLike=function(e,A,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var a,o,s="le"===A,u=new e(i),c=this.clone();if(s){for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),u[o]=a;for(;o=4096&&(t+=13,A>>>=13),A>=64&&(t+=7,A>>>=7),A>=8&&(t+=4,A>>>=4),A>=2&&(t+=2,A>>>=2),t+A},i.prototype._zeroBits=function(e){if(0===e)return 26;var A=e,t=0;return 0==(8191&A)&&(t+=13,A>>>=13),0==(127&A)&&(t+=7,A>>>=7),0==(15&A)&&(t+=4,A>>>=4),0==(3&A)&&(t+=2,A>>>=2),0==(1&A)&&t++,t},i.prototype.bitLength=function(){var e=this.words[this.length-1],A=this._countBits(e);return 26*(this.length-1)+A},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,A=0;Ae.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var A;A=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var A,t;this.length>e.length?(A=this,t=e):(A=e,t=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var A=0|Math.ceil(e/26),t=e%26;this._expand(A),t>0&&A--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,A){r("number"==typeof e&&e>=0);var t=e/26|0,n=e%26;return this._expand(t+1),this.words[t]=A?this.words[t]|1<e.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var A=this.iadd(e);return e.negative=1,A._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&A;for(;0!==i&&a>26,this.words[a]=67108863&A;if(0===i&&a>>13,B=0|a[1],Q=8191&B,I=B>>>13,d=0|a[2],h=8191&d,f=d>>>13,E=0|a[3],p=8191&E,C=E>>>13,m=0|a[4],y=8191&m,v=m>>>13,b=0|a[5],D=8191&b,w=b>>>13,F=0|a[6],U=8191&F,S=F>>>13,N=0|a[7],R=8191&N,G=N>>>13,M=0|a[8],L=8191&M,x=M>>>13,H=0|a[9],k=8191&H,Y=H>>>13,_=0|o[0],V=8191&_,T=_>>>13,P=0|o[1],O=8191&P,J=P>>>13,K=0|o[2],j=8191&K,q=K>>>13,z=0|o[3],Z=8191&z,W=z>>>13,X=0|o[4],$=8191&X,ee=X>>>13,Ae=0|o[5],te=8191&Ae,re=Ae>>>13,ne=0|o[6],ie=8191&ne,ae=ne>>>13,oe=0|o[7],se=8191&oe,ue=oe>>>13,ce=0|o[8],ge=8191&ce,le=ce>>>13,Be=0|o[9],Qe=8191&Be,Ie=Be>>>13;t.negative=e.negative^A.negative,t.length=19;var de=(u+(r=Math.imul(g,V))|0)+((8191&(n=(n=Math.imul(g,T))+Math.imul(l,V)|0))<<13)|0;u=((i=Math.imul(l,T))+(n>>>13)|0)+(de>>>26)|0,de&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var he=(u+(r=r+Math.imul(g,O)|0)|0)+((8191&(n=(n=n+Math.imul(g,J)|0)+Math.imul(l,O)|0))<<13)|0;u=((i=i+Math.imul(l,J)|0)+(n>>>13)|0)+(he>>>26)|0,he&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(f,V)|0,i=Math.imul(f,T),r=r+Math.imul(Q,O)|0,n=(n=n+Math.imul(Q,J)|0)+Math.imul(I,O)|0,i=i+Math.imul(I,J)|0;var fe=(u+(r=r+Math.imul(g,j)|0)|0)+((8191&(n=(n=n+Math.imul(g,q)|0)+Math.imul(l,j)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(n>>>13)|0)+(fe>>>26)|0,fe&=67108863,r=Math.imul(p,V),n=(n=Math.imul(p,T))+Math.imul(C,V)|0,i=Math.imul(C,T),r=r+Math.imul(h,O)|0,n=(n=n+Math.imul(h,J)|0)+Math.imul(f,O)|0,i=i+Math.imul(f,J)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,q)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,q)|0;var Ee=(u+(r=r+Math.imul(g,Z)|0)|0)+((8191&(n=(n=n+Math.imul(g,W)|0)+Math.imul(l,Z)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(p,O)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(C,O)|0,i=i+Math.imul(C,J)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,q)|0)+Math.imul(f,j)|0,i=i+Math.imul(f,q)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var pe=(u+(r=r+Math.imul(g,$)|0)|0)+((8191&(n=(n=n+Math.imul(g,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(n>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(D,V),n=(n=Math.imul(D,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,O)|0,n=(n=n+Math.imul(y,J)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,J)|0,r=r+Math.imul(p,j)|0,n=(n=n+Math.imul(p,q)|0)+Math.imul(C,j)|0,i=i+Math.imul(C,q)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(f,Z)|0,i=i+Math.imul(f,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0;var Ce=(u+(r=r+Math.imul(g,te)|0)|0)+((8191&(n=(n=n+Math.imul(g,re)|0)+Math.imul(l,te)|0))<<13)|0;u=((i=i+Math.imul(l,re)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(D,O)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(w,O)|0,i=i+Math.imul(w,J)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,q)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,q)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(f,$)|0,i=i+Math.imul(f,ee)|0,r=r+Math.imul(Q,te)|0,n=(n=n+Math.imul(Q,re)|0)+Math.imul(I,te)|0,i=i+Math.imul(I,re)|0;var me=(u+(r=r+Math.imul(g,ie)|0)|0)+((8191&(n=(n=n+Math.imul(g,ae)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,ae)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(G,V)|0,i=Math.imul(G,T),r=r+Math.imul(U,O)|0,n=(n=n+Math.imul(U,J)|0)+Math.imul(S,O)|0,i=i+Math.imul(S,J)|0,r=r+Math.imul(D,j)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(h,te)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(f,te)|0,i=i+Math.imul(f,re)|0,r=r+Math.imul(Q,ie)|0,n=(n=n+Math.imul(Q,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0;var ye=(u+(r=r+Math.imul(g,se)|0)|0)+((8191&(n=(n=n+Math.imul(g,ue)|0)+Math.imul(l,se)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(L,V),n=(n=Math.imul(L,T))+Math.imul(x,V)|0,i=Math.imul(x,T),r=r+Math.imul(R,O)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(G,O)|0,i=i+Math.imul(G,J)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,q)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,q)|0,r=r+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,r=r+Math.imul(p,te)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(C,te)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,ae)|0)+Math.imul(f,ie)|0,i=i+Math.imul(f,ae)|0,r=r+Math.imul(Q,se)|0,n=(n=n+Math.imul(Q,ue)|0)+Math.imul(I,se)|0,i=i+Math.imul(I,ue)|0;var ve=(u+(r=r+Math.imul(g,ge)|0)|0)+((8191&(n=(n=n+Math.imul(g,le)|0)+Math.imul(l,ge)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(L,O)|0,n=(n=n+Math.imul(L,J)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,J)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,q)|0)+Math.imul(G,j)|0,i=i+Math.imul(G,q)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(y,te)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(v,te)|0,i=i+Math.imul(v,re)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(h,se)|0,n=(n=n+Math.imul(h,ue)|0)+Math.imul(f,se)|0,i=i+Math.imul(f,ue)|0,r=r+Math.imul(Q,ge)|0,n=(n=n+Math.imul(Q,le)|0)+Math.imul(I,ge)|0,i=i+Math.imul(I,le)|0;var be=(u+(r=r+Math.imul(g,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(g,Ie)|0)+Math.imul(l,Qe)|0))<<13)|0;u=((i=i+Math.imul(l,Ie)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,O),n=(n=Math.imul(k,J))+Math.imul(Y,O)|0,i=Math.imul(Y,J),r=r+Math.imul(L,j)|0,n=(n=n+Math.imul(L,q)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,q)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(G,Z)|0,i=i+Math.imul(G,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(D,te)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(w,te)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,r=r+Math.imul(p,se)|0,n=(n=n+Math.imul(p,ue)|0)+Math.imul(C,se)|0,i=i+Math.imul(C,ue)|0,r=r+Math.imul(h,ge)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(f,ge)|0,i=i+Math.imul(f,le)|0;var De=(u+(r=r+Math.imul(Q,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(Q,Ie)|0)+Math.imul(I,Qe)|0))<<13)|0;u=((i=i+Math.imul(I,Ie)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,q))+Math.imul(Y,j)|0,i=Math.imul(Y,q),r=r+Math.imul(L,Z)|0,n=(n=n+Math.imul(L,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(G,$)|0,i=i+Math.imul(G,ee)|0,r=r+Math.imul(U,te)|0,n=(n=n+Math.imul(U,re)|0)+Math.imul(S,te)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(y,se)|0,n=(n=n+Math.imul(y,ue)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ue)|0,r=r+Math.imul(p,ge)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(C,ge)|0,i=i+Math.imul(C,le)|0;var we=(u+(r=r+Math.imul(h,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(h,Ie)|0)+Math.imul(f,Qe)|0))<<13)|0;u=((i=i+Math.imul(f,Ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(R,te)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(G,te)|0,i=i+Math.imul(G,re)|0,r=r+Math.imul(U,ie)|0,n=(n=n+Math.imul(U,ae)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,ae)|0,r=r+Math.imul(D,se)|0,n=(n=n+Math.imul(D,ue)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,ue)|0,r=r+Math.imul(y,ge)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(v,ge)|0,i=i+Math.imul(v,le)|0;var Fe=(u+(r=r+Math.imul(p,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(p,Ie)|0)+Math.imul(C,Qe)|0))<<13)|0;u=((i=i+Math.imul(C,Ie)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,ee))+Math.imul(Y,$)|0,i=Math.imul(Y,ee),r=r+Math.imul(L,te)|0,n=(n=n+Math.imul(L,re)|0)+Math.imul(x,te)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,ae)|0)+Math.imul(G,ie)|0,i=i+Math.imul(G,ae)|0,r=r+Math.imul(U,se)|0,n=(n=n+Math.imul(U,ue)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,ue)|0,r=r+Math.imul(D,ge)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(w,ge)|0,i=i+Math.imul(w,le)|0;var Ue=(u+(r=r+Math.imul(y,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(y,Ie)|0)+Math.imul(v,Qe)|0))<<13)|0;u=((i=i+Math.imul(v,Ie)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul(k,te),n=(n=Math.imul(k,re))+Math.imul(Y,te)|0,i=Math.imul(Y,re),r=r+Math.imul(L,ie)|0,n=(n=n+Math.imul(L,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(R,se)|0,n=(n=n+Math.imul(R,ue)|0)+Math.imul(G,se)|0,i=i+Math.imul(G,ue)|0,r=r+Math.imul(U,ge)|0,n=(n=n+Math.imul(U,le)|0)+Math.imul(S,ge)|0,i=i+Math.imul(S,le)|0;var Se=(u+(r=r+Math.imul(D,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(D,Ie)|0)+Math.imul(w,Qe)|0))<<13)|0;u=((i=i+Math.imul(w,Ie)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,ie),n=(n=Math.imul(k,ae))+Math.imul(Y,ie)|0,i=Math.imul(Y,ae),r=r+Math.imul(L,se)|0,n=(n=n+Math.imul(L,ue)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ue)|0,r=r+Math.imul(R,ge)|0,n=(n=n+Math.imul(R,le)|0)+Math.imul(G,ge)|0,i=i+Math.imul(G,le)|0;var Ne=(u+(r=r+Math.imul(U,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(U,Ie)|0)+Math.imul(S,Qe)|0))<<13)|0;u=((i=i+Math.imul(S,Ie)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(k,se),n=(n=Math.imul(k,ue))+Math.imul(Y,se)|0,i=Math.imul(Y,ue),r=r+Math.imul(L,ge)|0,n=(n=n+Math.imul(L,le)|0)+Math.imul(x,ge)|0,i=i+Math.imul(x,le)|0;var Re=(u+(r=r+Math.imul(R,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(R,Ie)|0)+Math.imul(G,Qe)|0))<<13)|0;u=((i=i+Math.imul(G,Ie)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(k,ge),n=(n=Math.imul(k,le))+Math.imul(Y,ge)|0,i=Math.imul(Y,le);var Ge=(u+(r=r+Math.imul(L,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(L,Ie)|0)+Math.imul(x,Qe)|0))<<13)|0;u=((i=i+Math.imul(x,Ie)|0)+(n>>>13)|0)+(Ge>>>26)|0,Ge&=67108863;var Me=(u+(r=Math.imul(k,Qe))|0)+((8191&(n=(n=Math.imul(k,Ie))+Math.imul(Y,Qe)|0))<<13)|0;return u=((i=Math.imul(Y,Ie))+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=de,s[1]=he,s[2]=fe,s[3]=Ee,s[4]=pe,s[5]=Ce,s[6]=me,s[7]=ye,s[8]=ve,s[9]=be,s[10]=De,s[11]=we,s[12]=Fe,s[13]=Ue,s[14]=Se,s[15]=Ne,s[16]=Re,s[17]=Ge,s[18]=Me,0!==u&&(s[19]=u,t.length++),t};function I(e,A,t){return(new d).mulp(e,A,t)}function d(e,A){this.x=e,this.y=A}Math.imul||(Q=B),i.prototype.mulTo=function(e,A){var t,r=this.length+e.length;return t=10===this.length&&10===e.length?Q(this,e,A):r<63?B(this,e,A):r<1024?function(e,A,t){t.negative=A.negative^e.negative,t.length=e.length+A.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,a&=67108863}t.words[i]=o,r=a,a=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,e,A):I(this,e,A),t},d.prototype.makeRBT=function(e){for(var A=new Array(e),t=i.prototype._countBits(e)-1,r=0;r>=1;return r},d.prototype.permute=function(e,A,t,r,n,i){for(var a=0;a>>=1)n++;return 1<>>=13,t[2*a+1]=8191&i,i>>>=13;for(a=2*A;a>=26,A+=n/67108864|0,A+=i>>>26,this.words[t]=67108863&i}return 0!==A&&(this.words[t]=A,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var A=function(e){for(var A=new Array(e.bitLength()),t=0;t>>n}return A}(e);if(0===A.length)return new i(1);for(var t=this,r=0;r=0);var A,t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var a=0;for(A=0;A>>26-t}a&&(this.words[A]=a,this.length++)}if(0!==n){for(A=this.length-1;A>=0;A--)this.words[A+n]=this.words[A];for(A=0;A=0),n=A?(A-A%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var g=0|this.words[u];this.words[u]=c<<26-i|g>>>i,c=g&o}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,A,t){return r(0===this.negative),this.iushrn(e,A,t)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var A=e%26,t=(e-A)/26,n=1<=0);var A=e%26,t=(e-A)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==A&&t++,this.length=Math.min(t,this.length),0!==A){var n=67108863^67108863>>>A<=67108864;A++)this.words[A]-=67108864,A===this.length-1?this.words[A+1]=1:this.words[A+1]++;return this.length=Math.max(this.length,A+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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 A=0;A>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,A){var t=(this.length,e.length),r=this.clone(),n=e,a=0|n.words[n.length-1];0!=(t=26-this._countBits(a))&&(n=n.ushln(t),r.iushln(t),a=0|n.words[n.length-1]);var o,s=r.length-n.length;if("mod"!==A){(o=new i(null)).length=s+1,o.words=new Array(o.length);for(var u=0;u=0;g--){var l=67108864*(0|r.words[n.length+g])+(0|r.words[n.length+g-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(n,l,g);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,g),r.isZero()||(r.negative^=1);o&&(o.words[g]=l)}return o&&o.strip(),r.strip(),"div"!==A&&0!==t&&r.iushrn(t),{div:o||null,mod:r}},i.prototype.divmod=function(e,A,t){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,A),"mod"!==A&&(n=o.div.neg()),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),A),"mod"!==A&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),A),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===A?{div:this.divn(e.words[0]),mod:null}:"mod"===A?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,A);var n,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var A=this.divmod(e);if(A.mod.isZero())return A.div;var t=0!==A.div.negative?A.mod.isub(e):A.mod,r=e.ushrn(1),n=e.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?A.div:0!==A.div.negative?A.div.isubn(1):A.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var A=(1<<26)%e,t=0,n=this.length-1;n>=0;n--)t=(A*t+(0|this.words[n]))%e;return t},i.prototype.idivn=function(e){r(e<=67108863);for(var A=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*A;this.words[t]=n/e|0,A=n%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n=new i(1),a=new i(0),o=new i(0),s=new i(1),u=0;A.isEven()&&t.isEven();)A.iushrn(1),t.iushrn(1),++u;for(var c=t.clone(),g=A.clone();!A.isZero();){for(var l=0,B=1;0==(A.words[0]&B)&&l<26;++l,B<<=1);if(l>0)for(A.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(c),a.isub(g)),n.iushrn(1),a.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(g)),o.iushrn(1),s.iushrn(1);A.cmp(t)>=0?(A.isub(t),n.isub(o),a.isub(s)):(t.isub(A),o.isub(n),s.isub(a))}return{a:o,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n,a=new i(1),o=new i(0),s=t.clone();A.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,c=1;0==(A.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var g=0,l=1;0==(t.words[0]&l)&&g<26;++g,l<<=1);if(g>0)for(t.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);A.cmp(t)>=0?(A.isub(t),a.isub(o)):(t.isub(A),o.isub(a))}return(n=0===A.cmpn(1)?a:o).cmpn(0)<0&&n.iadd(e),n},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var A=this.clone(),t=e.clone();A.negative=0,t.negative=0;for(var r=0;A.isEven()&&t.isEven();r++)A.iushrn(1),t.iushrn(1);for(;;){for(;A.isEven();)A.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=A.cmp(t);if(n<0){var i=A;A=t,t=i}else if(0===n||0===t.cmpn(1))break;A.isub(t)}return t.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var A=e%26,t=(e-A)/26,n=1<>>26,o&=67108863,this.words[a]=o}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var A,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)A=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];A=n===e?0:ne.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|e.words[t];if(r!==n){rn&&(A=1);break}}return A},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var h={k256:null,p224:null,p192:null,p25519:null};function f(e,A){this.name=e,this.p=new i(A,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var A=i._prime(e);this.m=A.p,this.prime=A}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}f.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},f.prototype.ireduce=function(e){var A,t=e;do{this.split(t,this.tmp),A=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(A>this.n);var r=A0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},f.prototype.split=function(e,A){e.iushrn(this.n,0,A)},f.prototype.imulK=function(e){return e.imul(this.k)},n(E,f),E.prototype.split=function(e,A){for(var t=4194303,r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var A=0,t=0;t>>=26,e.words[t]=n,A=r}return 0!==A&&(e.words[e.length++]=A),e},i._prime=function(e){if(h[e])return h[e];var A;if("k256"===e)A=new E;else if("p224"===e)A=new p;else if("p192"===e)A=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);A=new m}return h[e]=A,A},y.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,A){r(0==(e.negative|A.negative),"red works only with positives"),r(e.red&&e.red===A.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,A){this._verify2(e,A);var t=e.add(A);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(e,A){this._verify2(e,A);var t=e.iadd(A);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(e,A){this._verify2(e,A);var t=e.sub(A);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(e,A){this._verify2(e,A);var t=e.isub(A);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(e,A){return this._verify1(e),this.imod(e.ushln(A))},y.prototype.imul=function(e,A){return this._verify2(e,A),this.imod(e.imul(A))},y.prototype.mul=function(e,A){return this._verify2(e,A),this.imod(e.mul(A))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var A=this.m.andln(3);if(r(A%2==1),3===A){var t=this.m.add(new i(1)).iushrn(2);return this.pow(e,t)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var o=new i(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var g=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),B=this.pow(e,n),Q=a;0!==B.cmp(o);){for(var I=B,d=0;0!==I.cmp(o);d++)I=I.redSqr();r(d=0;r--){for(var u=A.words[r],c=s-1;c>=0;c--){var g=u>>c&1;n!==t[0]&&(n=this.sqr(n)),0!==g||0!==a?(a<<=1,a|=g,(4==++o||0===r&&0===c)&&(n=this.mul(n,t[a]),o=0,a=0)):o=0}s=26}return n},y.prototype.convertTo=function(e){var A=e.umod(this.m);return A===e?A.clone():A},y.prototype.convertFrom=function(e){var A=e.clone();return A.red=null,A},i.mont=function(e){return new v(e)},n(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var A=this.imod(e.mul(this.rinv));return A.red=null,A},v.prototype.imul=function(e,A){if(e.isZero()||A.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,A){if(e.isZero()||A.isZero())return new i(0)._forceRed(this);var t=e.mul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},6266:(e,A,t)=>{"use strict";var r=A;r.version=t(8597).i8,r.utils=t(953),r.rand=t(9931),r.curve=t(8254),r.curves=t(5427),r.ec=t(7954),r.eddsa=t(5980)},4918:(e,A,t)=>{"use strict";var r=t(3785),n=t(953),i=n.getNAF,a=n.getJSF,o=n.assert;function s(e,A){this.type=e,this.p=new r(A.p,16),this.red=A.prime?r.red(A.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=A.n&&new r(A.n,16),this.g=A.g&&this.pointFromJSON(A.g,A.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;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,A){this.curve=e,this.type=A,this.precomputed=null}e.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(e,A){o(e.precomputed);var t=e._getDoubles(),r=i(A,1,this._bitLength),n=(1<=a;c--)s=(s<<1)+r[c];u.push(s)}for(var g=this.jpoint(null,null,null),l=this.jpoint(null,null,null),B=n;B>0;B--){for(a=0;a=0;u--){for(var c=0;u>=0&&0===a[u];u--)c++;if(u>=0&&c++,s=s.dblp(c),u<0)break;var g=a[u];o(0!==g),s="affine"===e.type?g>0?s.mixedAdd(n[g-1>>1]):s.mixedAdd(n[-g-1>>1].neg()):g>0?s.add(n[g-1>>1]):s.add(n[-g-1>>1].neg())}return"affine"===e.type?s.toP():s},s.prototype._wnafMulAdd=function(e,A,t,r,n){var o,s,u,c=this._wnafT1,g=this._wnafT2,l=this._wnafT3,B=0;for(o=0;o=1;o-=2){var I=o-1,d=o;if(1===c[I]&&1===c[d]){var h=[A[I],null,null,A[d]];0===A[I].y.cmp(A[d].y)?(h[1]=A[I].add(A[d]),h[2]=A[I].toJ().mixedAdd(A[d].neg())):0===A[I].y.cmp(A[d].y.redNeg())?(h[1]=A[I].toJ().mixedAdd(A[d]),h[2]=A[I].add(A[d].neg())):(h[1]=A[I].toJ().mixedAdd(A[d]),h[2]=A[I].toJ().mixedAdd(A[d].neg()));var f=[-3,-1,-5,-7,0,7,5,1,3],E=a(t[I],t[d]);for(B=Math.max(E[0].length,B),l[I]=new Array(B),l[d]=new Array(B),s=0;s=0;o--){for(var v=0;o>=0;){var b=!0;for(s=0;s=0&&v++,m=m.dblp(v),o<0)break;for(s=0;s0?u=g[s][D-1>>1]:D<0&&(u=g[s][-D-1>>1].neg()),m="affine"===u.type?m.mixedAdd(u):m.add(u))}}for(o=0;o=Math.ceil((e.bitLength()+1)/A.step)},u.prototype._getDoubles=function(e,A){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],r=this,n=0;n{"use strict";var r=t(953),n=t(3785),i=t(5717),a=t(4918),o=r.assert;function s(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 n(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,A,t,r,i){a.BasePoint.call(this,e,"projective"),null===A&&null===t&&null===r?(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 n(A,16),this.y=new n(t,16),this.z=r?new n(r,16):this.curve.one,this.t=i&&new n(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(s,a),e.exports=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,A,t,r){return this.point(e,A,t,r)},s.prototype.pointFromX=function(e,A){(e=new n(e,16)).red||(e=e.toRed(this.red));var t=e.redSqr(),r=this.c2.redSub(this.a.redMul(t)),i=this.one.redSub(this.c2.redMul(this.d).redMul(t)),a=r.redMul(i.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var s=o.fromRed().isOdd();return(A&&!s||!A&&s)&&(o=o.redNeg()),this.point(e,o)},s.prototype.pointFromY=function(e,A){(e=new n(e,16)).red||(e=e.toRed(this.red));var t=e.redSqr(),r=t.redSub(this.c2),i=t.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(i.redInvm());if(0===a.cmp(this.zero)){if(A)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==A&&(o=o.redNeg()),this.point(o,e)},s.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var A=e.x.redSqr(),t=e.y.redSqr(),r=A.redMul(this.a).redAdd(t),n=this.c2.redMul(this.one.redAdd(this.d.redMul(A).redMul(t)));return 0===r.cmp(n)},i(u,a.BasePoint),s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},s.prototype.point=function(e,A,t,r){return new u(this,e,A,t,r)},u.fromJSON=function(e,A){return new u(e,A[0],A[1],A[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},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(),A=this.y.redSqr(),t=this.z.redSqr();t=t.redIAdd(t);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(A),i=r.redAdd(A),a=i.redSub(t),o=r.redSub(A),s=n.redMul(a),u=i.redMul(o),c=n.redMul(o),g=a.redMul(i);return this.curve.point(s,u,g,c)},u.prototype._projDbl=function(){var e,A,t,r,n,i,a=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(o)).redAdd(s);this.zOne?(e=a.redSub(o).redSub(s).redMul(u.redSub(this.curve.two)),A=u.redMul(r.redSub(s)),t=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),i=u.redSub(n).redISub(n),e=a.redSub(o).redISub(s).redMul(i),A=u.redMul(r.redSub(s)),t=u.redMul(i))}else r=o.redAdd(s),n=this.curve._mulC(this.z).redSqr(),i=r.redSub(n).redSub(n),e=this.curve._mulC(a.redISub(r)).redMul(i),A=this.curve._mulC(r).redMul(o.redISub(s)),t=r.redMul(i);return this.curve.point(e,A,t)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var A=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),t=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),i=t.redSub(A),a=n.redSub(r),o=n.redAdd(r),s=t.redAdd(A),u=i.redMul(a),c=o.redMul(s),g=i.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,g)},u.prototype._projAdd=function(e){var A,t,r=this.z.redMul(e.z),n=r.redSqr(),i=this.x.redMul(e.x),a=this.y.redMul(e.y),o=this.curve.d.redMul(i).redMul(a),s=n.redSub(o),u=n.redAdd(o),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(a),g=r.redMul(s).redMul(c);return this.curve.twisted?(A=r.redMul(u).redMul(a.redSub(this.curve._mulA(i))),t=s.redMul(u)):(A=r.redMul(u).redMul(a.redSub(i)),t=this.curve._mulC(s).redMul(u)),this.curve.point(g,A,t)},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,A,t){return this.curve._wnafMulAdd(1,[this,A],[e,t],2,!1)},u.prototype.jmulAdd=function(e,A,t){return this.curve._wnafMulAdd(1,[this,A],[e,t],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return 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 A=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(A))return!0;for(var t=e.clone(),r=this.curve.redN.redMul(this.z);;){if(t.iadd(this.curve.n),t.cmp(this.curve.p)>=0)return!1;if(A.redIAdd(r),0===this.x.cmp(A))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},8254:(e,A,t)=>{"use strict";var r=A;r.base=t(4918),r.short=t(6673),r.mont=t(2881),r.edwards=t(1138)},2881:(e,A,t)=>{"use strict";var r=t(3785),n=t(5717),i=t(4918),a=t(953);function o(e){i.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(e,A,t){i.BasePoint.call(this,e,"projective"),null===A&&null===t?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(A,16),this.z=new r(t,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(o,i),e.exports=o,o.prototype.validate=function(e){var A=e.normalize().x,t=A.redSqr(),r=t.redMul(A).redAdd(t.redMul(this.a)).redAdd(A);return 0===r.redSqrt().redSqr().cmp(r)},n(s,i.BasePoint),o.prototype.decodePoint=function(e,A){return this.point(a.toArray(e,A),1)},o.prototype.point=function(e,A){return new s(this,e,A)},o.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(e,A){return new s(e,A[0],A[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),A=this.x.redSub(this.z).redSqr(),t=e.redSub(A),r=e.redMul(A),n=t.redMul(A.redAdd(this.curve.a24.redMul(t)));return this.curve.point(r,n)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(e,A){var t=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),i=e.x.redSub(e.z).redMul(t),a=n.redMul(r),o=A.z.redMul(i.redAdd(a).redSqr()),s=A.x.redMul(i.redISub(a).redSqr());return this.curve.point(o,s)},s.prototype.mul=function(e){for(var A=e.clone(),t=this,r=this.curve.point(null,null),n=[];0!==A.cmpn(0);A.iushrn(1))n.push(A.andln(1));for(var i=n.length-1;i>=0;i--)0===n[i]?(t=t.diffAdd(r,this),r=r.dbl()):(r=t.diffAdd(r,this),t=t.dbl());return r},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(e,A,t)=>{"use strict";var r=t(953),n=t(3785),i=t(5717),a=t(4918),o=r.assert;function s(e){a.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(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 u(e,A,t,r){a.BasePoint.call(this,e,"affine"),null===A&&null===t?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(A,16),this.y=new n(t,16),r&&(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 c(e,A,t,r){a.BasePoint.call(this,e,"jacobian"),null===A&&null===t&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(A,16),this.y=new n(t,16),this.z=new n(r,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,a),e.exports=s,s.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var A,t;if(e.beta)A=new n(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);A=(A=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)t=new n(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(A))?t=i[0]:(t=i[1],o(0===this.g.mul(t).x.cmp(this.g.x.redMul(A))))}return{beta:A,lambda:t,basis:e.basis?e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(t)}}},s.prototype._getEndoRoots=function(e){var A=e===this.p?this.red:n.mont(e),t=new n(2).toRed(A).redInvm(),r=t.redNeg(),i=new n(3).toRed(A).redNeg().redSqrt().redMul(t);return[r.redAdd(i).fromRed(),r.redSub(i).fromRed()]},s.prototype._getEndoBasis=function(e){for(var A,t,r,i,a,o,s,u,c,g=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,B=this.n.clone(),Q=new n(1),I=new n(0),d=new n(0),h=new n(1),f=0;0!==l.cmpn(0);){var E=B.div(l);u=B.sub(E.mul(l)),c=d.sub(E.mul(Q));var p=h.sub(E.mul(I));if(!r&&u.cmp(g)<0)A=s.neg(),t=Q,r=u.neg(),i=c;else if(r&&2==++f)break;s=u,B=l,l=u,d=Q,Q=c,h=I,I=p}a=u.neg(),o=c;var C=r.sqr().add(i.sqr());return a.sqr().add(o.sqr()).cmp(C)>=0&&(a=A,o=t),r.negative&&(r=r.neg(),i=i.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:r,b:i},{a,b:o}]},s.prototype._endoSplit=function(e){var A=this.endo.basis,t=A[0],r=A[1],n=r.b.mul(e).divRound(this.n),i=t.b.neg().mul(e).divRound(this.n),a=n.mul(t.a),o=i.mul(r.a),s=n.mul(t.b),u=i.mul(r.b);return{k1:e.sub(a).sub(o),k2:s.add(u).neg()}},s.prototype.pointFromX=function(e,A){(e=new n(e,16)).red||(e=e.toRed(this.red));var t=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=t.redSqrt();if(0!==r.redSqr().redSub(t).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(A&&!i||!A&&i)&&(r=r.redNeg()),this.point(e,r)},s.prototype.validate=function(e){if(e.inf)return!0;var A=e.x,t=e.y,r=this.a.redMul(A),n=A.redSqr().redMul(A).redIAdd(r).redIAdd(this.b);return 0===t.redSqr().redISub(n).cmpn(0)},s.prototype._endoWnafMulAdd=function(e,A,t){for(var r=this._endoWnafT1,n=this._endoWnafT2,i=0;i":""},u.prototype.isInfinity=function(){return this.inf},u.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 A=this.y.redSub(e.y);0!==A.cmpn(0)&&(A=A.redMul(this.x.redSub(e.x).redInvm()));var t=A.redSqr().redISub(this.x).redISub(e.x),r=A.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,r)},u.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 A=this.curve.a,t=this.x.redSqr(),r=e.redInvm(),n=t.redAdd(t).redIAdd(t).redIAdd(A).redMul(r),i=n.redSqr().redISub(this.x.redAdd(this.x)),a=n.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new n(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)},u.prototype.mulAdd=function(e,A,t){var r=[this,A],n=[e,t];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},u.prototype.jmulAdd=function(e,A,t){var r=[this,A],n=[e,t];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},u.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))},u.prototype.neg=function(e){if(this.inf)return this;var A=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var t=this.precomputed,r=function(e){return e.neg()};A.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return A},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i(c,a.BasePoint),s.prototype.jpoint=function(e,A,t){return new c(this,e,A,t)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),A=e.redSqr(),t=this.x.redMul(A),r=this.y.redMul(A).redMul(e);return this.curve.point(t,r)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var A=e.z.redSqr(),t=this.z.redSqr(),r=this.x.redMul(A),n=e.x.redMul(t),i=this.y.redMul(A.redMul(e.z)),a=e.y.redMul(t.redMul(this.z)),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),c=u.redMul(o),g=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(g).redISub(g),B=s.redMul(g.redISub(l)).redISub(i.redMul(c)),Q=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(l,B,Q)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var A=this.z.redSqr(),t=this.x,r=e.x.redMul(A),n=this.y,i=e.y.redMul(A).redMul(this.z),a=t.redSub(r),o=n.redSub(i);if(0===a.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=a.redSqr(),u=s.redMul(a),c=t.redMul(s),g=o.redSqr().redIAdd(u).redISub(c).redISub(c),l=o.redMul(c.redISub(g)).redISub(n.redMul(u)),B=this.z.redMul(a);return this.curve.jpoint(g,l,B)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var A;if(this.curve.zeroA||this.curve.threeA){var t=this;for(A=0;A=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:(e,A,t)=>{"use strict";var r,n=A,i=t(3715),a=t(8254),o=t(953).assert;function s(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,A){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var t=new s(A);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:t}),t}})}n.PresetCurve=s,u("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("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:i.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"]}),u("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:i.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"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),u("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:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=t(1037)}catch(e){r=void 0}u("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},7954:(e,A,t)=>{"use strict";var r=t(3785),n=t(2156),i=t(953),a=t(5427),o=t(9931),s=i.assert,u=t(1251),c=t(611);function g(e){if(!(this instanceof g))return new g(e);"string"==typeof e&&(s(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.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}e.exports=g,g.prototype.keyPair=function(e){return new u(this,e)},g.prototype.keyFromPrivate=function(e,A){return u.fromPrivate(this,e,A)},g.prototype.keyFromPublic=function(e,A){return u.fromPublic(this,e,A)},g.prototype.genKeyPair=function(e){e||(e={});for(var A=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),i=this.n.sub(new r(2));;){var a=new r(A.generate(t));if(!(a.cmp(i)>0))return a.iaddn(1),this.keyFromPrivate(a)}},g.prototype._truncateToN=function(e,A){var t=8*e.byteLength()-this.n.bitLength();return t>0&&(e=e.ushrn(t)),!A&&e.cmp(this.n)>=0?e.sub(this.n):e},g.prototype.sign=function(e,A,t,i){"object"==typeof t&&(i=t,t=null),i||(i={}),A=this.keyFromPrivate(A,t),e=this._truncateToN(new r(e,16));for(var a=this.n.byteLength(),o=A.getPrivate().toArray("be",a),s=e.toArray("be",a),u=new n({hash:this.hash,entropy:o,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),g=this.n.sub(new r(1)),l=0;;l++){var B=i.k?i.k(l):new r(u.generate(this.n.byteLength()));if(!((B=this._truncateToN(B,!0)).cmpn(1)<=0||B.cmp(g)>=0)){var Q=this.g.mul(B);if(!Q.isInfinity()){var I=Q.getX(),d=I.umod(this.n);if(0!==d.cmpn(0)){var h=B.invm(this.n).mul(d.mul(A.getPrivate()).iadd(e));if(0!==(h=h.umod(this.n)).cmpn(0)){var f=(Q.getY().isOdd()?1:0)|(0!==I.cmp(d)?2:0);return i.canonical&&h.cmp(this.nh)>0&&(h=this.n.sub(h),f^=1),new c({r:d,s:h,recoveryParam:f})}}}}}},g.prototype.verify=function(e,A,t,n){e=this._truncateToN(new r(e,16)),t=this.keyFromPublic(t,n);var i=(A=new c(A,"hex")).r,a=A.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o,s=a.invm(this.n),u=s.mul(e).umod(this.n),g=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(u,t.getPublic(),g)).isInfinity()&&o.eqXToP(i):!(o=this.g.mulAdd(u,t.getPublic(),g)).isInfinity()&&0===o.getX().umod(this.n).cmp(i)},g.prototype.recoverPubKey=function(e,A,t,n){s((3&t)===t,"The recovery param is more than two bits"),A=new c(A,n);var i=this.n,a=new r(e),o=A.r,u=A.s,g=1&t,l=t>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");o=l?this.curve.pointFromX(o.add(this.curve.n),g):this.curve.pointFromX(o,g);var B=A.r.invm(i),Q=i.sub(a).mul(B).umod(i),I=u.mul(B).umod(i);return this.g.mulAdd(Q,o,I)},g.prototype.getKeyRecoveryParam=function(e,A,t,r){if(null!==(A=new c(A,r)).recoveryParam)return A.recoveryParam;for(var n=0;n<4;n++){var i;try{i=this.recoverPubKey(e,A,n)}catch(e){continue}if(i.eq(t))return n}throw new Error("Unable to find valid recovery factor")}},1251:(e,A,t)=>{"use strict";var r=t(3785),n=t(953).assert;function i(e,A){this.ec=e,this.priv=null,this.pub=null,A.priv&&this._importPrivate(A.priv,A.privEnc),A.pub&&this._importPublic(A.pub,A.pubEnc)}e.exports=i,i.fromPublic=function(e,A,t){return A instanceof i?A:new i(e,{pub:A,pubEnc:t})},i.fromPrivate=function(e,A,t){return A instanceof i?A:new i(e,{priv:A,privEnc:t})},i.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"}},i.prototype.getPublic=function(e,A){return"string"==typeof e&&(A=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),A?this.pub.encode(A,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,A){this.priv=new r(e,A||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,A){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,A)},i.prototype.derive=function(e){return e.validate()||n(e.validate(),"public point not validated"),e.mul(this.priv).getX()},i.prototype.sign=function(e,A,t){return this.ec.sign(e,this,A,t)},i.prototype.verify=function(e,A){return this.ec.verify(e,A,this)},i.prototype.inspect=function(){return""}},611:(e,A,t)=>{"use strict";var r=t(3785),n=t(953),i=n.assert;function a(e,A){if(e instanceof a)return e;this._importDER(e,A)||(i(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function s(e,A){var t=e[A.place++];if(!(128&t))return t;var r=15&t;if(0===r||r>4)return!1;for(var n=0,i=0,a=A.place;i>>=0;return!(n<=127)&&(A.place=a,n)}function u(e){for(var A=0,t=e.length-1;!e[A]&&!(128&e[A+1])&&A>>3);for(e.push(128|t);--t;)e.push(A>>>(t<<3)&255);e.push(A)}}e.exports=a,a.prototype._importDER=function(e,A){e=n.toArray(e,A);var t=new o;if(48!==e[t.place++])return!1;var i=s(e,t);if(!1===i)return!1;if(i+t.place!==e.length)return!1;if(2!==e[t.place++])return!1;var a=s(e,t);if(!1===a)return!1;var u=e.slice(t.place,a+t.place);if(t.place+=a,2!==e[t.place++])return!1;var c=s(e,t);if(!1===c)return!1;if(e.length!==c+t.place)return!1;var g=e.slice(t.place,c+t.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===g[0]){if(!(128&g[1]))return!1;g=g.slice(1)}return this.r=new r(u),this.s=new r(g),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var A=this.r.toArray(),t=this.s.toArray();for(128&A[0]&&(A=[0].concat(A)),128&t[0]&&(t=[0].concat(t)),A=u(A),t=u(t);!(t[0]||128&t[1]);)t=t.slice(1);var r=[2];c(r,A.length),(r=r.concat(A)).push(2),c(r,t.length);var i=r.concat(t),a=[48];return c(a,i.length),a=a.concat(i),n.encode(a,e)}},5980:(e,A,t)=>{"use strict";var r=t(3715),n=t(5427),i=t(953),a=i.assert,o=i.parseBytes,s=t(9087),u=t(3622);function c(e){if(a("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=r.sha512}e.exports=c,c.prototype.sign=function(e,A){e=o(e);var t=this.keyFromSecret(A),r=this.hashInt(t.messagePrefix(),e),n=this.g.mul(r),i=this.encodePoint(n),a=this.hashInt(i,t.pubBytes(),e).mul(t.priv()),s=r.add(a).umod(this.curve.n);return this.makeSignature({R:n,S:s,Rencoded:i})},c.prototype.verify=function(e,A,t){e=o(e),A=this.makeSignature(A);var r=this.keyFromPublic(t),n=this.hashInt(A.Rencoded(),r.pubBytes(),e),i=this.g.mul(A.S());return A.R().add(r.pub().mul(n)).eq(i)},c.prototype.hashInt=function(){for(var e=this.hash(),A=0;A{"use strict";var r=t(953),n=r.assert,i=r.parseBytes,a=r.cachedProperty;function o(e,A){this.eddsa=e,this._secret=i(A.secret),e.isPoint(A.pub)?this._pub=A.pub:this._pubBytes=i(A.pub)}o.fromPublic=function(e,A){return A instanceof o?A:new o(e,{pub:A})},o.fromSecret=function(e,A){return A instanceof o?A:new o(e,{secret:A})},o.prototype.secret=function(){return this._secret},a(o,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(o,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(o,"privBytes",(function(){var e=this.eddsa,A=this.hash(),t=e.encodingLength-1,r=A.slice(0,e.encodingLength);return r[0]&=248,r[t]&=127,r[t]|=64,r})),a(o,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(o,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(o,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),o.prototype.sign=function(e){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},o.prototype.verify=function(e,A){return this.eddsa.verify(e,A,this)},o.prototype.getSecret=function(e){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},o.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=o},3622:(e,A,t)=>{"use strict";var r=t(3785),n=t(953),i=n.assert,a=n.cachedProperty,o=n.parseBytes;function s(e,A){this.eddsa=e,"object"!=typeof A&&(A=o(A)),Array.isArray(A)&&(A={R:A.slice(0,e.encodingLength),S:A.slice(e.encodingLength)}),i(A.R&&A.S,"Signature without R or S"),e.isPoint(A.R)&&(this._R=A.R),A.S instanceof r&&(this._S=A.S),this._Rencoded=Array.isArray(A.R)?A.R:A.Rencoded,this._Sencoded=Array.isArray(A.S)?A.S:A.Sencoded}a(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},e.exports=s},1037:e=>{e.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"]]}}},953:(e,A,t)=>{"use strict";var r=A,n=t(3785),i=t(9746),a=t(4504);r.assert=i,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(e,A,t){var r=new Array(Math.max(e.bitLength(),t)+1);r.fill(0);for(var n=1<(n>>1)-1?(n>>1)-s:s,i.isubn(o)):o=0,r[a]=o,i.iushrn(1)}return r},r.getJSF=function(e,A){var t=[[],[]];e=e.clone(),A=A.clone();for(var r,n=0,i=0;e.cmpn(-n)>0||A.cmpn(-i)>0;){var a,o,s=e.andln(3)+n&3,u=A.andln(3)+i&3;3===s&&(s=-1),3===u&&(u=-1),a=0==(1&s)?0:3!=(r=e.andln(7)+n&7)&&5!==r||2!==u?s:-s,t[0].push(a),o=0==(1&u)?0:3!=(r=A.andln(7)+i&7)&&5!==r||2!==s?u:-u,t[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),A.iushrn(1)}return t},r.cachedProperty=function(e,A,t){var r="_"+A;e.prototype[A]=function(){return void 0!==this[r]?this[r]:this[r]=t.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new n(e,"hex","le")}},3785:function(e,A,t){!function(e,A){"use strict";function r(e,A){if(!e)throw new Error(A||"Assertion failed")}function n(e,A){e.super_=A;var t=function(){};t.prototype=A.prototype,e.prototype=new t,e.prototype.constructor=e}function i(e,A,t){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==A&&"be"!==A||(t=A,A=10),this._init(e||0,A||10,t||"be"))}var a;"object"==typeof e?e.exports=i:A.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(5568).Buffer}catch(e){}function o(e,A){var t=e.charCodeAt(A);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(e,A,t){var r=o(e,t);return t-1>=A&&(r|=o(e,t-1)<<4),r}function u(e,A,t,r){for(var n=0,i=Math.min(e.length,t),a=A;a=49?o-49+10:o>=17?o-17+10:o}return n}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,A){return e.cmp(A)>0?e:A},i.min=function(e,A){return e.cmp(A)<0?e:A},i.prototype._init=function(e,A,t){if("number"==typeof e)return this._initNumber(e,A,t);if("object"==typeof e)return this._initArray(e,A,t);"hex"===A&&(A=16),r(A===(0|A)&&A>=2&&A<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,A,t){this.length=Math.ceil((e.length-A)/6),this.words=new Array(this.length);for(var r=0;r=A;r-=2)n=s(e,A,r)<=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;else for(r=(e.length-A)%2==0?A+1:A;r=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,A,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=A)r++;r--,n=n/A|0;for(var i=e.length-t,a=i%r,o=Math.min(i,i-a)+t,s=0,c=t;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var c=["","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"],g=[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],l=[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 B(e,A,t){t.negative=A.negative^e.negative;var r=e.length+A.length|0;t.length=r,r=r-1|0;var n=0|e.words[0],i=0|A.words[0],a=n*i,o=67108863&a,s=a/67108864|0;t.words[0]=o;for(var u=1;u>>26,g=67108863&s,l=Math.min(u,A.length-1),B=Math.max(0,u-e.length+1);B<=l;B++){var Q=u-B|0;c+=(a=(n=0|e.words[Q])*(i=0|A.words[B])+g)/67108864|0,g=67108863&a}t.words[u]=0|g,s=0|c}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(e,A){var t;if(A=0|A||1,16===(e=e||10)||"hex"===e){t="";for(var n=0,i=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,a--)}for(0!==i&&(t=i.toString(16)+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var u=g[e],B=l[e];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(B).toString(e);t=(Q=Q.idivn(B)).isZero()?I+t:c[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,A){return r(void 0!==a),this.toArrayLike(a,e,A)},i.prototype.toArray=function(e,A){return this.toArrayLike(Array,e,A)},i.prototype.toArrayLike=function(e,A,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var a,o,s="le"===A,u=new e(i),c=this.clone();if(s){for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),u[o]=a;for(;o=4096&&(t+=13,A>>>=13),A>=64&&(t+=7,A>>>=7),A>=8&&(t+=4,A>>>=4),A>=2&&(t+=2,A>>>=2),t+A},i.prototype._zeroBits=function(e){if(0===e)return 26;var A=e,t=0;return 0==(8191&A)&&(t+=13,A>>>=13),0==(127&A)&&(t+=7,A>>>=7),0==(15&A)&&(t+=4,A>>>=4),0==(3&A)&&(t+=2,A>>>=2),0==(1&A)&&t++,t},i.prototype.bitLength=function(){var e=this.words[this.length-1],A=this._countBits(e);return 26*(this.length-1)+A},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,A=0;Ae.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var A;A=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var A,t;this.length>e.length?(A=this,t=e):(A=e,t=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var A=0|Math.ceil(e/26),t=e%26;this._expand(A),t>0&&A--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,A){r("number"==typeof e&&e>=0);var t=e/26|0,n=e%26;return this._expand(t+1),this.words[t]=A?this.words[t]|1<e.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var A=this.iadd(e);return e.negative=1,A._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&A;for(;0!==i&&a>26,this.words[a]=67108863&A;if(0===i&&a>>13,B=0|a[1],Q=8191&B,I=B>>>13,d=0|a[2],h=8191&d,f=d>>>13,E=0|a[3],p=8191&E,C=E>>>13,m=0|a[4],y=8191&m,v=m>>>13,b=0|a[5],D=8191&b,w=b>>>13,F=0|a[6],U=8191&F,S=F>>>13,N=0|a[7],R=8191&N,G=N>>>13,M=0|a[8],L=8191&M,x=M>>>13,H=0|a[9],k=8191&H,Y=H>>>13,_=0|o[0],V=8191&_,T=_>>>13,P=0|o[1],O=8191&P,J=P>>>13,K=0|o[2],j=8191&K,q=K>>>13,z=0|o[3],Z=8191&z,W=z>>>13,X=0|o[4],$=8191&X,ee=X>>>13,Ae=0|o[5],te=8191&Ae,re=Ae>>>13,ne=0|o[6],ie=8191&ne,ae=ne>>>13,oe=0|o[7],se=8191&oe,ue=oe>>>13,ce=0|o[8],ge=8191&ce,le=ce>>>13,Be=0|o[9],Qe=8191&Be,Ie=Be>>>13;t.negative=e.negative^A.negative,t.length=19;var de=(u+(r=Math.imul(g,V))|0)+((8191&(n=(n=Math.imul(g,T))+Math.imul(l,V)|0))<<13)|0;u=((i=Math.imul(l,T))+(n>>>13)|0)+(de>>>26)|0,de&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var he=(u+(r=r+Math.imul(g,O)|0)|0)+((8191&(n=(n=n+Math.imul(g,J)|0)+Math.imul(l,O)|0))<<13)|0;u=((i=i+Math.imul(l,J)|0)+(n>>>13)|0)+(he>>>26)|0,he&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(f,V)|0,i=Math.imul(f,T),r=r+Math.imul(Q,O)|0,n=(n=n+Math.imul(Q,J)|0)+Math.imul(I,O)|0,i=i+Math.imul(I,J)|0;var fe=(u+(r=r+Math.imul(g,j)|0)|0)+((8191&(n=(n=n+Math.imul(g,q)|0)+Math.imul(l,j)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(n>>>13)|0)+(fe>>>26)|0,fe&=67108863,r=Math.imul(p,V),n=(n=Math.imul(p,T))+Math.imul(C,V)|0,i=Math.imul(C,T),r=r+Math.imul(h,O)|0,n=(n=n+Math.imul(h,J)|0)+Math.imul(f,O)|0,i=i+Math.imul(f,J)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,q)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,q)|0;var Ee=(u+(r=r+Math.imul(g,Z)|0)|0)+((8191&(n=(n=n+Math.imul(g,W)|0)+Math.imul(l,Z)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(p,O)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(C,O)|0,i=i+Math.imul(C,J)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,q)|0)+Math.imul(f,j)|0,i=i+Math.imul(f,q)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var pe=(u+(r=r+Math.imul(g,$)|0)|0)+((8191&(n=(n=n+Math.imul(g,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(n>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(D,V),n=(n=Math.imul(D,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,O)|0,n=(n=n+Math.imul(y,J)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,J)|0,r=r+Math.imul(p,j)|0,n=(n=n+Math.imul(p,q)|0)+Math.imul(C,j)|0,i=i+Math.imul(C,q)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(f,Z)|0,i=i+Math.imul(f,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0;var Ce=(u+(r=r+Math.imul(g,te)|0)|0)+((8191&(n=(n=n+Math.imul(g,re)|0)+Math.imul(l,te)|0))<<13)|0;u=((i=i+Math.imul(l,re)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(D,O)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(w,O)|0,i=i+Math.imul(w,J)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,q)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,q)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(f,$)|0,i=i+Math.imul(f,ee)|0,r=r+Math.imul(Q,te)|0,n=(n=n+Math.imul(Q,re)|0)+Math.imul(I,te)|0,i=i+Math.imul(I,re)|0;var me=(u+(r=r+Math.imul(g,ie)|0)|0)+((8191&(n=(n=n+Math.imul(g,ae)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,ae)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(G,V)|0,i=Math.imul(G,T),r=r+Math.imul(U,O)|0,n=(n=n+Math.imul(U,J)|0)+Math.imul(S,O)|0,i=i+Math.imul(S,J)|0,r=r+Math.imul(D,j)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(h,te)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(f,te)|0,i=i+Math.imul(f,re)|0,r=r+Math.imul(Q,ie)|0,n=(n=n+Math.imul(Q,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0;var ye=(u+(r=r+Math.imul(g,se)|0)|0)+((8191&(n=(n=n+Math.imul(g,ue)|0)+Math.imul(l,se)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(L,V),n=(n=Math.imul(L,T))+Math.imul(x,V)|0,i=Math.imul(x,T),r=r+Math.imul(R,O)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(G,O)|0,i=i+Math.imul(G,J)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,q)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,q)|0,r=r+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,r=r+Math.imul(p,te)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(C,te)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,ae)|0)+Math.imul(f,ie)|0,i=i+Math.imul(f,ae)|0,r=r+Math.imul(Q,se)|0,n=(n=n+Math.imul(Q,ue)|0)+Math.imul(I,se)|0,i=i+Math.imul(I,ue)|0;var ve=(u+(r=r+Math.imul(g,ge)|0)|0)+((8191&(n=(n=n+Math.imul(g,le)|0)+Math.imul(l,ge)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(L,O)|0,n=(n=n+Math.imul(L,J)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,J)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,q)|0)+Math.imul(G,j)|0,i=i+Math.imul(G,q)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(y,te)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(v,te)|0,i=i+Math.imul(v,re)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(h,se)|0,n=(n=n+Math.imul(h,ue)|0)+Math.imul(f,se)|0,i=i+Math.imul(f,ue)|0,r=r+Math.imul(Q,ge)|0,n=(n=n+Math.imul(Q,le)|0)+Math.imul(I,ge)|0,i=i+Math.imul(I,le)|0;var be=(u+(r=r+Math.imul(g,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(g,Ie)|0)+Math.imul(l,Qe)|0))<<13)|0;u=((i=i+Math.imul(l,Ie)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,O),n=(n=Math.imul(k,J))+Math.imul(Y,O)|0,i=Math.imul(Y,J),r=r+Math.imul(L,j)|0,n=(n=n+Math.imul(L,q)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,q)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(G,Z)|0,i=i+Math.imul(G,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(D,te)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(w,te)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,r=r+Math.imul(p,se)|0,n=(n=n+Math.imul(p,ue)|0)+Math.imul(C,se)|0,i=i+Math.imul(C,ue)|0,r=r+Math.imul(h,ge)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(f,ge)|0,i=i+Math.imul(f,le)|0;var De=(u+(r=r+Math.imul(Q,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(Q,Ie)|0)+Math.imul(I,Qe)|0))<<13)|0;u=((i=i+Math.imul(I,Ie)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,q))+Math.imul(Y,j)|0,i=Math.imul(Y,q),r=r+Math.imul(L,Z)|0,n=(n=n+Math.imul(L,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(G,$)|0,i=i+Math.imul(G,ee)|0,r=r+Math.imul(U,te)|0,n=(n=n+Math.imul(U,re)|0)+Math.imul(S,te)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(y,se)|0,n=(n=n+Math.imul(y,ue)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ue)|0,r=r+Math.imul(p,ge)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(C,ge)|0,i=i+Math.imul(C,le)|0;var we=(u+(r=r+Math.imul(h,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(h,Ie)|0)+Math.imul(f,Qe)|0))<<13)|0;u=((i=i+Math.imul(f,Ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(R,te)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(G,te)|0,i=i+Math.imul(G,re)|0,r=r+Math.imul(U,ie)|0,n=(n=n+Math.imul(U,ae)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,ae)|0,r=r+Math.imul(D,se)|0,n=(n=n+Math.imul(D,ue)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,ue)|0,r=r+Math.imul(y,ge)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(v,ge)|0,i=i+Math.imul(v,le)|0;var Fe=(u+(r=r+Math.imul(p,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(p,Ie)|0)+Math.imul(C,Qe)|0))<<13)|0;u=((i=i+Math.imul(C,Ie)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,ee))+Math.imul(Y,$)|0,i=Math.imul(Y,ee),r=r+Math.imul(L,te)|0,n=(n=n+Math.imul(L,re)|0)+Math.imul(x,te)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,ae)|0)+Math.imul(G,ie)|0,i=i+Math.imul(G,ae)|0,r=r+Math.imul(U,se)|0,n=(n=n+Math.imul(U,ue)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,ue)|0,r=r+Math.imul(D,ge)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(w,ge)|0,i=i+Math.imul(w,le)|0;var Ue=(u+(r=r+Math.imul(y,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(y,Ie)|0)+Math.imul(v,Qe)|0))<<13)|0;u=((i=i+Math.imul(v,Ie)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul(k,te),n=(n=Math.imul(k,re))+Math.imul(Y,te)|0,i=Math.imul(Y,re),r=r+Math.imul(L,ie)|0,n=(n=n+Math.imul(L,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(R,se)|0,n=(n=n+Math.imul(R,ue)|0)+Math.imul(G,se)|0,i=i+Math.imul(G,ue)|0,r=r+Math.imul(U,ge)|0,n=(n=n+Math.imul(U,le)|0)+Math.imul(S,ge)|0,i=i+Math.imul(S,le)|0;var Se=(u+(r=r+Math.imul(D,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(D,Ie)|0)+Math.imul(w,Qe)|0))<<13)|0;u=((i=i+Math.imul(w,Ie)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,ie),n=(n=Math.imul(k,ae))+Math.imul(Y,ie)|0,i=Math.imul(Y,ae),r=r+Math.imul(L,se)|0,n=(n=n+Math.imul(L,ue)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ue)|0,r=r+Math.imul(R,ge)|0,n=(n=n+Math.imul(R,le)|0)+Math.imul(G,ge)|0,i=i+Math.imul(G,le)|0;var Ne=(u+(r=r+Math.imul(U,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(U,Ie)|0)+Math.imul(S,Qe)|0))<<13)|0;u=((i=i+Math.imul(S,Ie)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(k,se),n=(n=Math.imul(k,ue))+Math.imul(Y,se)|0,i=Math.imul(Y,ue),r=r+Math.imul(L,ge)|0,n=(n=n+Math.imul(L,le)|0)+Math.imul(x,ge)|0,i=i+Math.imul(x,le)|0;var Re=(u+(r=r+Math.imul(R,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(R,Ie)|0)+Math.imul(G,Qe)|0))<<13)|0;u=((i=i+Math.imul(G,Ie)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(k,ge),n=(n=Math.imul(k,le))+Math.imul(Y,ge)|0,i=Math.imul(Y,le);var Ge=(u+(r=r+Math.imul(L,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(L,Ie)|0)+Math.imul(x,Qe)|0))<<13)|0;u=((i=i+Math.imul(x,Ie)|0)+(n>>>13)|0)+(Ge>>>26)|0,Ge&=67108863;var Me=(u+(r=Math.imul(k,Qe))|0)+((8191&(n=(n=Math.imul(k,Ie))+Math.imul(Y,Qe)|0))<<13)|0;return u=((i=Math.imul(Y,Ie))+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=de,s[1]=he,s[2]=fe,s[3]=Ee,s[4]=pe,s[5]=Ce,s[6]=me,s[7]=ye,s[8]=ve,s[9]=be,s[10]=De,s[11]=we,s[12]=Fe,s[13]=Ue,s[14]=Se,s[15]=Ne,s[16]=Re,s[17]=Ge,s[18]=Me,0!==u&&(s[19]=u,t.length++),t};function I(e,A,t){return(new d).mulp(e,A,t)}function d(e,A){this.x=e,this.y=A}Math.imul||(Q=B),i.prototype.mulTo=function(e,A){var t,r=this.length+e.length;return t=10===this.length&&10===e.length?Q(this,e,A):r<63?B(this,e,A):r<1024?function(e,A,t){t.negative=A.negative^e.negative,t.length=e.length+A.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,a&=67108863}t.words[i]=o,r=a,a=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,e,A):I(this,e,A),t},d.prototype.makeRBT=function(e){for(var A=new Array(e),t=i.prototype._countBits(e)-1,r=0;r>=1;return r},d.prototype.permute=function(e,A,t,r,n,i){for(var a=0;a>>=1)n++;return 1<>>=13,t[2*a+1]=8191&i,i>>>=13;for(a=2*A;a>=26,A+=n/67108864|0,A+=i>>>26,this.words[t]=67108863&i}return 0!==A&&(this.words[t]=A,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var A=function(e){for(var A=new Array(e.bitLength()),t=0;t>>n}return A}(e);if(0===A.length)return new i(1);for(var t=this,r=0;r=0);var A,t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var a=0;for(A=0;A>>26-t}a&&(this.words[A]=a,this.length++)}if(0!==n){for(A=this.length-1;A>=0;A--)this.words[A+n]=this.words[A];for(A=0;A=0),n=A?(A-A%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var g=0|this.words[u];this.words[u]=c<<26-i|g>>>i,c=g&o}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,A,t){return r(0===this.negative),this.iushrn(e,A,t)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var A=e%26,t=(e-A)/26,n=1<=0);var A=e%26,t=(e-A)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==A&&t++,this.length=Math.min(t,this.length),0!==A){var n=67108863^67108863>>>A<=67108864;A++)this.words[A]-=67108864,A===this.length-1?this.words[A+1]=1:this.words[A+1]++;return this.length=Math.max(this.length,A+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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 A=0;A>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,A){var t=(this.length,e.length),r=this.clone(),n=e,a=0|n.words[n.length-1];0!=(t=26-this._countBits(a))&&(n=n.ushln(t),r.iushln(t),a=0|n.words[n.length-1]);var o,s=r.length-n.length;if("mod"!==A){(o=new i(null)).length=s+1,o.words=new Array(o.length);for(var u=0;u=0;g--){var l=67108864*(0|r.words[n.length+g])+(0|r.words[n.length+g-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(n,l,g);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,g),r.isZero()||(r.negative^=1);o&&(o.words[g]=l)}return o&&o.strip(),r.strip(),"div"!==A&&0!==t&&r.iushrn(t),{div:o||null,mod:r}},i.prototype.divmod=function(e,A,t){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,A),"mod"!==A&&(n=o.div.neg()),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),A),"mod"!==A&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),A),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===A?{div:this.divn(e.words[0]),mod:null}:"mod"===A?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,A);var n,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var A=this.divmod(e);if(A.mod.isZero())return A.div;var t=0!==A.div.negative?A.mod.isub(e):A.mod,r=e.ushrn(1),n=e.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?A.div:0!==A.div.negative?A.div.isubn(1):A.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var A=(1<<26)%e,t=0,n=this.length-1;n>=0;n--)t=(A*t+(0|this.words[n]))%e;return t},i.prototype.idivn=function(e){r(e<=67108863);for(var A=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*A;this.words[t]=n/e|0,A=n%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n=new i(1),a=new i(0),o=new i(0),s=new i(1),u=0;A.isEven()&&t.isEven();)A.iushrn(1),t.iushrn(1),++u;for(var c=t.clone(),g=A.clone();!A.isZero();){for(var l=0,B=1;0==(A.words[0]&B)&&l<26;++l,B<<=1);if(l>0)for(A.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(c),a.isub(g)),n.iushrn(1),a.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(g)),o.iushrn(1),s.iushrn(1);A.cmp(t)>=0?(A.isub(t),n.isub(o),a.isub(s)):(t.isub(A),o.isub(n),s.isub(a))}return{a:o,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n,a=new i(1),o=new i(0),s=t.clone();A.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,c=1;0==(A.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var g=0,l=1;0==(t.words[0]&l)&&g<26;++g,l<<=1);if(g>0)for(t.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);A.cmp(t)>=0?(A.isub(t),a.isub(o)):(t.isub(A),o.isub(a))}return(n=0===A.cmpn(1)?a:o).cmpn(0)<0&&n.iadd(e),n},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var A=this.clone(),t=e.clone();A.negative=0,t.negative=0;for(var r=0;A.isEven()&&t.isEven();r++)A.iushrn(1),t.iushrn(1);for(;;){for(;A.isEven();)A.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=A.cmp(t);if(n<0){var i=A;A=t,t=i}else if(0===n||0===t.cmpn(1))break;A.isub(t)}return t.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var A=e%26,t=(e-A)/26,n=1<>>26,o&=67108863,this.words[a]=o}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var A,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)A=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];A=n===e?0:ne.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|e.words[t];if(r!==n){rn&&(A=1);break}}return A},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var h={k256:null,p224:null,p192:null,p25519:null};function f(e,A){this.name=e,this.p=new i(A,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var A=i._prime(e);this.m=A.p,this.prime=A}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}f.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},f.prototype.ireduce=function(e){var A,t=e;do{this.split(t,this.tmp),A=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(A>this.n);var r=A0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},f.prototype.split=function(e,A){e.iushrn(this.n,0,A)},f.prototype.imulK=function(e){return e.imul(this.k)},n(E,f),E.prototype.split=function(e,A){for(var t=4194303,r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var A=0,t=0;t>>=26,e.words[t]=n,A=r}return 0!==A&&(e.words[e.length++]=A),e},i._prime=function(e){if(h[e])return h[e];var A;if("k256"===e)A=new E;else if("p224"===e)A=new p;else if("p192"===e)A=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);A=new m}return h[e]=A,A},y.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,A){r(0==(e.negative|A.negative),"red works only with positives"),r(e.red&&e.red===A.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,A){this._verify2(e,A);var t=e.add(A);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(e,A){this._verify2(e,A);var t=e.iadd(A);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(e,A){this._verify2(e,A);var t=e.sub(A);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(e,A){this._verify2(e,A);var t=e.isub(A);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(e,A){return this._verify1(e),this.imod(e.ushln(A))},y.prototype.imul=function(e,A){return this._verify2(e,A),this.imod(e.imul(A))},y.prototype.mul=function(e,A){return this._verify2(e,A),this.imod(e.mul(A))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var A=this.m.andln(3);if(r(A%2==1),3===A){var t=this.m.add(new i(1)).iushrn(2);return this.pow(e,t)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var o=new i(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var g=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),B=this.pow(e,n),Q=a;0!==B.cmp(o);){for(var I=B,d=0;0!==I.cmp(o);d++)I=I.redSqr();r(d=0;r--){for(var u=A.words[r],c=s-1;c>=0;c--){var g=u>>c&1;n!==t[0]&&(n=this.sqr(n)),0!==g||0!==a?(a<<=1,a|=g,(4==++o||0===r&&0===c)&&(n=this.mul(n,t[a]),o=0,a=0)):o=0}s=26}return n},y.prototype.convertTo=function(e){var A=e.umod(this.m);return A===e?A.clone():A},y.prototype.convertFrom=function(e){var A=e.clone();return A.red=null,A},i.mont=function(e){return new v(e)},n(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var A=this.imod(e.mul(this.rinv));return A.red=null,A},v.prototype.imul=function(e,A){if(e.isZero()||A.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,A){if(e.isZero()||A.isZero())return new i(0)._forceRed(this);var t=e.mul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},7187:e=>{"use strict";var A,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(e,A,t){return Function.prototype.apply.call(e,A,t)};A=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,A){return new Promise((function(t,r){function n(t){e.removeListener(A,i),r(t)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",n),t([].slice.call(arguments))}I(e,A,i,{once:!0}),"error"!==A&&function(e,A,t){"function"==typeof e.on&&I(e,"error",A,{once:!0})}(e,n)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,A,t,r){var n,i,a,u;if(o(t),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",A,t.listener?t.listener:t),i=e._events),a=i[A]),void 0===a)a=i[A]=t,++e._eventsCount;else if("function"==typeof a?a=i[A]=r?[t,a]:[a,t]:r?a.unshift(t):a.push(t),(n=s(e))>0&&a.length>n&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(A)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=A,c.count=a.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){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)}function g(e,A,t){var r={fired:!1,wrapFn:void 0,target:e,type:A,listener:t},n=c.bind(r);return n.listener=t,r.wrapFn=n,n}function l(e,A,t){var r=e._events;if(void 0===r)return[];var n=r[A];return void 0===n?[]:"function"==typeof n?t?[n.listener||n]:[n]:t?function(e){for(var A=new Array(e.length),t=0;t0&&(a=A[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)r(s,this,A);else{var u=s.length,c=Q(s,u);for(t=0;t=0;i--)if(t[i]===A||t[i].listener===A){a=t[i].listener,n=i;break}if(n<0)return this;0===n?t.shift():function(e,A){for(;A+1=0;r--)this.removeListener(e,A[r]);return this},i.prototype.listeners=function(e){return l(this,e,!0)},i.prototype.rawListeners=function(e){return l(this,e,!1)},i.listenerCount=function(e,A){return"function"==typeof e.listenerCount?e.listenerCount(A):B.call(e,A)},i.prototype.listenerCount=B,i.prototype.eventNames=function(){return this._eventsCount>0?A(this._events):[]}},3048:(e,A,t)=>{var r=t(9509).Buffer,n=t(2318);e.exports=function(e,A,t,i){if(r.isBuffer(e)||(e=r.from(e,"binary")),A&&(r.isBuffer(A)||(A=r.from(A,"binary")),8!==A.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=t/8,o=r.alloc(a),s=r.alloc(i||0),u=r.alloc(0);a>0||i>0;){var c=new n;c.update(u),c.update(e),A&&c.update(A),u=c.digest();var g=0;if(a>0){var l=o.length-a;g=Math.min(a,u.length),u.copy(o,l,0,g),a-=g}if(g0){var B=s.length-i,Q=Math.min(i,u.length-g);u.copy(s,B,g,g+Q),i-=Q}}return u.fill(0),{key:o,iv:s}}},9071:(e,A,t)=>{e.exports=function(e){var A={};function t(r){if(A[r])return A[r].exports;var n=A[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}return t.m=e,t.c=A,t.d=function(e,A,r){t.o(e,A)||Object.defineProperty(e,A,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,A){if(1&A&&(e=t(e)),8&A)return e;if(4&A&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&A&&"string"!=typeof e)for(var n in e)t.d(r,n,function(A){return e[A]}.bind(null,n));return r},t.n=function(e){var A=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(A,"a",A),A},t.o=function(e,A){return Object.prototype.hasOwnProperty.call(e,A)},t.p="",t(t.s=2)}([function(e,A){e.exports=t(6470)},function(e,A,t){(function(A,r){var n,i=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||A,function(e){var A;e=e||{},A||(A=void 0!==e?e:{});var i,a={};for(i in A)A.hasOwnProperty(i)&&(a[i]=A[i]);var o,s,u,c,g="./this.program";o="object"==typeof window,s="function"==typeof importScripts,u="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,c=!o&&!u&&!s;var l,B,Q,I,d="";u?(d=s?t(0).dirname(d)+"/":r+"/",l=function(e,A){var r=XA(e);return r?A?r:r.toString():(Q||(Q=t(3)),I||(I=t(0)),e=I.normalize(e),Q.readFileSync(e,A?null:"utf8"))},B=function(e){return(e=l(e,!0)).buffer||(e=new Uint8Array(e)),v(e.buffer),e},1=r);)++t;if(16(n=224==(240&n)?(15&n)<<12|i<<6|a:(7&n)<<18|i<<12|a<<6|63&e[A++])?r+=String.fromCharCode(n):(n-=65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n))}}else r+=String.fromCharCode(n)}return r}function w(e){return e?D(R,e,void 0):""}function F(e,A,t,r){if(!(0=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),127>=a){if(t>=r)break;A[t++]=a}else{if(2047>=a){if(t+1>=r)break;A[t++]=192|a>>6}else{if(65535>=a){if(t+2>=r)break;A[t++]=224|a>>12}else{if(t+3>=r)break;A[t++]=240|a>>18,A[t++]=128|a>>12&63}A[t++]=128|a>>6&63}A[t++]=128|63&a}}return A[t]=0,t-n}function U(e){for(var A=0,t=0;t=r&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++t)),127>=r?++A:A=2047>=r?A+2:65535>=r?A+3:A+4}return A}var S,N,R,G,M,L,x,H,k,Y="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function _(e){var A;for(A=e>>1;G[A];)++A;if(32<(A<<=1)-e&&Y)return Y.decode(R.subarray(e,A));A=0;for(var t="";;){var r=G[e+2*A>>1];if(0==r)return t;++A,t+=String.fromCharCode(r)}}function V(e,A,t){if(void 0===t&&(t=2147483647),2>t)return 0;var r=A;t=(t-=2)<2*e.length?t/2:e.length;for(var n=0;n>1]=e.charCodeAt(n),A+=2;return G[A>>1]=0,A-r}function T(e){return 2*e.length}function P(e){for(var A=0,t="";;){var r=L[e+4*A>>2];if(0==r)return t;++A,65536<=r?(r-=65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=String.fromCharCode(r)}}function O(e,A,t){if(void 0===t&&(t=2147483647),4>t)return 0;var r=A;t=r+t-4;for(var n=0;n=i&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++n)),L[A>>2]=i,(A+=4)+4>t)break}return L[A>>2]=0,A-r}function J(e){for(var A=0,t=0;t=r&&++t,A+=4}return A}function K(e){S=e,A.HEAP8=N=new Int8Array(e),A.HEAP16=G=new Int16Array(e),A.HEAP32=L=new Int32Array(e),A.HEAPU8=R=new Uint8Array(e),A.HEAPU16=M=new Uint16Array(e),A.HEAPU32=x=new Uint32Array(e),A.HEAPF32=H=new Float32Array(e),A.HEAPF64=k=new Float64Array(e)}var j=A.INITIAL_MEMORY||16777216;function q(e){for(;0>2]=e}function ve(e,A){for(var t=0,r=e.length-1;0<=r;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),t++):t&&(e.splice(r,1),t--)}if(A)for(;t;t--)e.unshift("..");return e}function be(e){var A="/"===e.charAt(0),t="/"===e.substr(-1);return(e=ve(e.split("/").filter((function(e){return!!e})),!A).join("/"))||A||(e="."),e&&t&&(e+="/"),(A?"/":"")+e}function De(e){var A=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=A[0],A=A[1],e||A?(A&&(A=A.substr(0,A.length-1)),e+A):"."}function we(e){if("/"===e)return"/";var A=e.lastIndexOf("/");return-1===A?e:e.substr(A+1)}function Fe(){var e=Array.prototype.slice.call(arguments,0);return be(e.join("/"))}function Ue(e,A){return be(e+"/"+A)}function Se(){for(var e="",A=!1,t=arguments.length-1;-1<=t&&!A;t--){if("string"!=typeof(A=0<=t?arguments[t]:ke.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!A)return"";e=A+"/"+e,A="/"===A.charAt(0)}return(A?"/":"")+(e=ve(e.split("/").filter((function(e){return!!e})),!A).join("/"))||"."}function Ne(e,A){function t(e){for(var A=0;At?[]:e.slice(A,t-A+1)}e=Se(e).substr(1),A=Se(A).substr(1),e=t(e.split("/")),A=t(A.split("/"));for(var r=Math.min(e.length,A.length),n=r,i=0;i=A||(A=Math.max(A,t*(1048576>t?2:1.125)>>>0),0!=t&&(A=Math.max(A,256)),t=e.f,e.f=new Uint8Array(A),0A)e.f.length=A;else for(;e.f.length=e.node.l)return 0;if(8<(e=Math.min(e.node.l-n,r))&&i.subarray)A.set(i.subarray(n,n+e),t);else for(r=0;rA)throw new ke.b(28);return A},ia:function(e,A,t){He.lb(e.node,A+t),e.node.l=Math.max(e.node.l,A+t)},na:function(e,A,t,r,n,i,a){if(!ke.isFile(e.node.mode))throw new ke.b(43);if(e=e.node.f,2&a||e.buffer!==A.buffer){if((0>>0)%ke.L.length},sb:function(e){var A=ke.Pa(e.parent.id,e.name);e.Y=ke.L[A],ke.L[A]=e},tb:function(e){var A=ke.Pa(e.parent.id,e.name);if(ke.L[A]===e)ke.L[A]=e.Y;else for(A=ke.L[A];A;){if(A.Y===e){A.Y=e.Y;break}A=A.Y}},P:function(e,A){var t=ke.bc(e);if(t)throw new ke.b(t,e);for(t=ke.L[ke.Pa(e.id,A)];t;t=t.Y){var r=t.name;if(t.parent.id===e.id&&r===A)return t}return ke.lookup(e,A)},createNode:function(e,A,t,r){return e=new ke.Ab(e,A,t,r),ke.sb(e),e},La:function(e){ke.tb(e)},Aa:function(e){return e===e.parent},W:function(e){return!!e.oa},isFile:function(e){return 32768==(61440&e)},v:function(e){return 16384==(61440&e)},ma:function(e){return 40960==(61440&e)},ya:function(e){return 8192==(61440&e)},$b:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},Vb:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},dc:function(e){var A=ke.Vb[e];if(void 0===A)throw Error("Unknown file open mode: "+e);return A},mb:function(e){var A=["r","w","rw"][3&e];return 512&e&&(A+="w"),A},Z:function(e,A){return ke.ub||(-1===A.indexOf("r")||292&e.mode)&&(-1===A.indexOf("w")||146&e.mode)&&(-1===A.indexOf("x")||73&e.mode)?0:2},bc:function(e){return ke.Z(e,"x")||(e.g.lookup?0:2)},Wa:function(e,A){try{return ke.P(e,A),20}catch(e){}return ke.Z(e,"wx")},Ca:function(e,A,t){try{var r=ke.P(e,A)}catch(e){return e.B}if(e=ke.Z(e,"wx"))return e;if(t){if(!ke.v(r.mode))return 54;if(ke.Aa(r)||ke.I(r)===ke.cwd())return 10}else if(ke.v(r.mode))return 31;return 0},cc:function(e,A){return e?ke.ma(e.mode)?32:ke.v(e.mode)&&("r"!==ke.mb(A)||512&A)?31:ke.Z(e,ke.mb(A)):44},Bb:4096,fc:function(e,A){for(A=A||ke.Bb,e=e||0;e<=A;e++)if(!ke.streams[e])return e;throw new ke.b(33)},ba:function(e){return ke.streams[e]},Sb:function(e,A,t){ke.Ja||(ke.Ja=function(){},ke.Ja.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}}});var r,n=new ke.Ja;for(r in e)n[r]=e[r];return e=n,A=ke.fc(A,t),e.fd=A,ke.streams[A]=e},Lb:function(e){ke.streams[e]=null},Kb:{open:function(e){e.h=ke.Xb(e.node.rdev).h,e.h.open&&e.h.open(e)},K:function(){throw new ke.b(70)}},Va:function(e){return e>>8},Oc:function(e){return 255&e},X:function(e,A){return e<<8|A},$a:function(e,A){ke.jb[e]={h:A}},Xb:function(e){return ke.jb[e]},pb:function(e){var A=[];for(e=[e];e.length;){var t=e.pop();A.push(t),e.push.apply(e,t.pa)}return A},yb:function(e,A){function t(e){return ke.Fa--,A(e)}function r(e){if(e){if(!r.S)return r.S=!0,t(e)}else++i>=n.length&&t(null)}"function"==typeof e&&(A=e,e=!1),ke.Fa++,1A)throw new ke.b(28);var t;if(!(t="string"==typeof e?ke.m(e,{H:!0}).node:e).g.A)throw new ke.b(63);if(ke.v(t.mode))throw new ke.b(31);if(!ke.isFile(t.mode))throw new ke.b(28);if(e=ke.Z(t,"w"))throw new ke.b(e);t.g.A(t,{size:A,timestamp:Date.now()})},Fc:function(e,A){if(!(e=ke.ba(e)))throw new ke.b(8);if(0==(2097155&e.flags))throw new ke.b(28);ke.truncate(e.node,A)},Xc:function(e,A,t){(e=ke.m(e,{H:!0}).node).g.A(e,{timestamp:Math.max(A,t)})},open:function(e,t,r,n,i){if(""===e)throw new ke.b(44);if(r=64&(t="string"==typeof t?ke.dc(t):t)?4095&(void 0===r?438:r)|32768:0,"object"==typeof e)var a=e;else{e=be(e);try{a=ke.m(e,{H:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(a){if(128&t)throw new ke.b(20)}else a=ke.R(e,r,0),o=!0;if(!a)throw new ke.b(44);if(ke.ya(a.mode)&&(t&=-513),65536&t&&!ke.v(a.mode))throw new ke.b(54);if(!o&&(r=ke.cc(a,t)))throw new ke.b(r);512&t&&ke.truncate(a,0),t&=-131713,(n=ke.Sb({node:a,path:ke.I(a),flags:t,seekable:!0,position:0,h:a.h,wc:[],error:!1},n,i)).h.open&&n.h.open(n),!A.logReadFiles||1&t||(ke.Ya||(ke.Ya={}),e in ke.Ya||(ke.Ya[e]=1,f("FS.trackingDelegate error on read file: "+e)));try{ke.u.onOpenFile&&(i=0,1!=(2097155&t)&&(i|=ke.zb.wb.Cb),0!=(2097155&t)&&(i|=ke.zb.wb.Db),ke.u.onOpenFile(e,i))}catch(A){f("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+A.message)}return n},close:function(e){if(ke.la(e))throw new ke.b(8);e.Oa&&(e.Oa=null);try{e.h.close&&e.h.close(e)}catch(e){throw e}finally{ke.Lb(e.fd)}e.fd=null},la:function(e){return null===e.fd},K:function(e,A,t){if(ke.la(e))throw new ke.b(8);if(!e.seekable||!e.h.K)throw new ke.b(70);if(0!=t&&1!=t&&2!=t)throw new ke.b(28);return e.position=e.h.K(e,A,t),e.wc=[],e.position},read:function(e,A,t,r,n){if(0>r||0>n)throw new ke.b(28);if(ke.la(e))throw new ke.b(8);if(1==(2097155&e.flags))throw new ke.b(8);if(ke.v(e.node.mode))throw new ke.b(31);if(!e.h.read)throw new ke.b(28);var i=void 0!==n;if(i){if(!e.seekable)throw new ke.b(70)}else n=e.position;return A=e.h.read(e,A,t,r,n),i||(e.position+=A),A},write:function(e,A,t,r,n,i){if(0>r||0>n)throw new ke.b(28);if(ke.la(e))throw new ke.b(8);if(0==(2097155&e.flags))throw new ke.b(8);if(ke.v(e.node.mode))throw new ke.b(31);if(!e.h.write)throw new ke.b(28);e.seekable&&1024&e.flags&&ke.K(e,0,2);var a=void 0!==n;if(a){if(!e.seekable)throw new ke.b(70)}else n=e.position;A=e.h.write(e,A,t,r,n,i),a||(e.position+=A);try{e.path&&ke.u.onWriteToFile&&ke.u.onWriteToFile(e.path)}catch(A){f("FS.trackingDelegate['onWriteToFile']('"+e.path+"') threw an exception: "+A.message)}return A},ia:function(e,A,t){if(ke.la(e))throw new ke.b(8);if(0>A||0>=t)throw new ke.b(28);if(0==(2097155&e.flags))throw new ke.b(8);if(!ke.isFile(e.node.mode)&&!ke.v(e.node.mode))throw new ke.b(43);if(!e.h.ia)throw new ke.b(138);e.h.ia(e,A,t)},na:function(e,A,t,r,n,i,a){if(0!=(2&i)&&0==(2&a)&&2!=(2097155&e.flags))throw new ke.b(2);if(1==(2097155&e.flags))throw new ke.b(2);if(!e.h.na)throw new ke.b(43);return e.h.na(e,A,t,r,n,i,a)},da:function(e,A,t,r,n){return e&&e.h.da?e.h.da(e,A,t,r,n):0},Qc:function(){return 0},Ra:function(e,A,t){if(!e.h.Ra)throw new ke.b(59);return e.h.Ra(e,A,t)},readFile:function(e,A){if((A=A||{}).flags=A.flags||"r",A.encoding=A.encoding||"binary","utf8"!==A.encoding&&"binary"!==A.encoding)throw Error('Invalid encoding type "'+A.encoding+'"');var t,r=ke.open(e,A.flags);e=ke.stat(e).size;var n=new Uint8Array(e);return ke.read(r,n,0,e,0),"utf8"===A.encoding?t=D(n,0):"binary"===A.encoding&&(t=n),ke.close(r),t},writeFile:function(e,A,t){if((t=t||{}).flags=t.flags||"w",e=ke.open(e,t.flags,t.mode),"string"==typeof A){var r=new Uint8Array(U(A)+1);A=F(A,r,0,r.length),ke.write(e,r,0,A,void 0,t.Jb)}else{if(!ArrayBuffer.isView(A))throw Error("Unsupported data type");ke.write(e,A,0,A.byteLength,void 0,t.Jb)}ke.close(e)},cwd:function(){return ke.ib},chdir:function(e){if(null===(e=ke.m(e,{H:!0})).node)throw new ke.b(44);if(!ke.v(e.node.mode))throw new ke.b(54);var A=ke.Z(e.node,"x");if(A)throw new ke.b(A);ke.ib=e.path},Ob:function(){ke.mkdir("/tmp"),ke.mkdir("/home"),ke.mkdir("/home/web_user")},Nb:function(){if(ke.mkdir("/dev"),ke.$a(ke.X(1,3),{read:function(){return 0},write:function(e,A,t,r){return r}}),ke.Da("/dev/null",ke.X(1,3)),Ge(ke.X(5,0),Le),Ge(ke.X(6,0),xe),ke.Da("/dev/tty",ke.X(5,0)),ke.Da("/dev/tty1",ke.X(6,0)),"object"==typeof crypto&&"function"==typeof crypto.getRandomValues)var e=new Uint8Array(1),A=function(){return crypto.getRandomValues(e),e[0]};else if(u)try{var r=t(4);A=function(){return r.randomBytes(1)[0]}}catch(e){}A||(A=function(){ce("random_device")}),ke.T("/dev","random",A),ke.T("/dev","urandom",A),ke.mkdir("/dev/shm"),ke.mkdir("/dev/shm/tmp")},Qb:function(){ke.mkdir("/proc"),ke.mkdir("/proc/self"),ke.mkdir("/proc/self/fd"),ke.s({s:function(){var e=ke.createNode("/proc/self","fd",16895,73);return e.g={lookup:function(e,A){var t=ke.ba(+A);if(!t)throw new ke.b(8);return(e={parent:null,s:{vb:"fake"},g:{readlink:function(){return t.path}}}).parent=e}},e}},{},"/proc/self/fd")},Rb:function(){A.stdin?ke.T("/dev","stdin",A.stdin):ke.symlink("/dev/tty","/dev/stdin"),A.stdout?ke.T("/dev","stdout",null,A.stdout):ke.symlink("/dev/tty","/dev/stdout"),A.stderr?ke.T("/dev","stderr",null,A.stderr):ke.symlink("/dev/tty1","/dev/stderr"),ke.open("/dev/stdin","r"),ke.open("/dev/stdout","w"),ke.open("/dev/stderr","w")},kb:function(){ke.b||(ke.b=function(e,A){this.node=A,this.pc=function(e){this.B=e},this.pc(e),this.message="FS error"},ke.b.prototype=Error(),ke.b.prototype.constructor=ke.b,[44].forEach((function(e){ke.Na[e]=new ke.b(e),ke.Na[e].stack=""})))},rc:function(){ke.kb(),ke.L=Array(4096),ke.s(He,{},"/"),ke.Ob(),ke.Nb(),ke.Qb(),ke.Ub={MEMFS:He}},ka:function(e,t,r){ke.ka.Qa=!0,ke.kb(),A.stdin=e||A.stdin,A.stdout=t||A.stdout,A.stderr=r||A.stderr,ke.Rb()},quit:function(){ke.ka.Qa=!1;var e=A._fflush;for(e&&e(0),e=0;ethis.length-1||0>e)){var A=e%this.chunkSize;return this.rb(e/this.chunkSize|0)[A]}},i.prototype.Ib=function(e){this.rb=e},i.prototype.eb=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(200<=e.status&&300>e.status||304===e.status))throw Error("Couldn't load "+t+". Status: "+e.status);var A,r=Number(e.getResponseHeader("Content-length")),n=(A=e.getResponseHeader("Accept-Ranges"))&&"bytes"===A;e=(A=e.getResponseHeader("Content-Encoding"))&&"gzip"===A;var i=1048576;n||(i=r);var a=this;a.Ib((function(e){var A=e*i,n=(e+1)*i-1;if(n=Math.min(n,r-1),void 0===a.S[e]){var o=a.S;if(A>n)throw Error("invalid range ("+A+", "+n+") or no bytes requested!");if(n>r-1)throw Error("only "+r+" bytes available! programmer error!");var s=new XMLHttpRequest;if(s.open("GET",t,!1),r!==i&&s.setRequestHeader("Range","bytes="+A+"-"+n),"undefined"!=typeof Uint8Array&&(s.responseType="arraybuffer"),s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.send(null),!(200<=s.status&&300>s.status||304===s.status))throw Error("Couldn't load "+t+". Status: "+s.status);A=void 0!==s.response?new Uint8Array(s.response||[]):zA(s.responseText||"",!0),o[e]=A}if(void 0===a.S[e])throw Error("doXHR failed!");return a.S[e]})),!e&&r||(i=r=1,i=r=this.rb(0).length,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this.Fb=r,this.Eb=i,this.Ua=!0},"undefined"!=typeof XMLHttpRequest){if(!s)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.Ua||this.eb(),this.Fb}},chunkSize:{get:function(){return this.Ua||this.eb(),this.Eb}}}),a={Sa:!1,f:a}}else a={Sa:!1,url:t};var o=ke.Pb(e,A,a,r,n);a.f?o.f=a.f:a.url&&(o.f=null,o.url=a.url),Object.defineProperties(o,{l:{get:function(){return this.f.length}}});var u={};return Object.keys(o.h).forEach((function(e){var A=o.h[e];u[e]=function(){if(!ke.nb(o))throw new ke.b(29);return A.apply(null,arguments)}})),u.read=function(e,A,t,r,n){if(!ke.nb(o))throw new ke.b(29);if(n>=(e=e.node.f).length)return 0;if(r=Math.min(e.length-n,r),e.slice)for(var i=0;i>2]}function Te(e){if(!(e=ke.ba(e)))throw new ke.b(8);return e}function Pe(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var Oe=void 0;function Je(e){for(var A="";R[e];)A+=Oe[R[e++]];return A}var Ke={},je={},qe={};function ze(e){if(void 0===e)return"_unknown";var A=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=A&&57>=A?"_"+e:e}function Ze(e,A){return e=ze(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(A)}function We(e){var A=Error,t=Ze(e,(function(A){this.name=e,this.message=A,void 0!==(A=Error(A).stack)&&(this.stack=this.toString()+"\n"+A.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(A.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},t}var Xe=void 0;function $e(e){throw new Xe(e)}var eA=void 0;function AA(e){throw new eA(e)}function tA(e,A,t){function r(A){(A=t(A)).length!==e.length&&AA("Mismatched type converter count");for(var r=0;r>2])}var mA={};function yA(e,A){return A.o&&A.j||AA("makeClassHandle requires ptr and ptrType"),!!A.F!=!!A.D&&AA("Both smartPtrType and smartPtr must be specified"),A.count={value:1},uA(Object.create(e,{c:{value:A}}))}function vA(e,A,t,r){this.name=e,this.i=A,this.Ta=t,this.za=r,this.Ba=!1,this.$=this.nc=this.mc=this.xb=this.qc=this.kc=void 0,void 0!==A.G?this.toWireType=EA:(this.toWireType=r?fA:pA,this.O=null)}function bA(e,t){e=Je(e);for(var r=A["dynCall_"+e],n=[],i=1;i>2)+r]);return t}function SA(e){for(;e.length;){var A=e.pop();e.pop()(A)}}function NA(e,A,t){return e instanceof Object||$e(t+' with invalid "this": '+e),e instanceof A.i.constructor||$e(t+' incompatible with "this" of type '+e.constructor.name),e.c.j||$e("cannot call emscripten binding method "+t+" on deleted object"),hA(e.c.j,e.c.o.i,A.i)}var RA=[],GA=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function MA(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var A=RA.length?RA.pop():GA.length;return GA[A]={ra:1,value:e},A}}function LA(e){if(null===e)return"null";var A=typeof e;return"object"===A||"array"===A||"function"===A?e.toString():""+e}function xA(e,A){switch(A){case 2:return function(e){return this.fromWireType(H[e>>2])};case 3:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function HA(e,A,t){switch(A){case 0:return t?function(e){return N[e]}:function(e){return R[e]};case 1:return t?function(e){return G[e>>1]}:function(e){return M[e>>1]};case 2:return t?function(e){return L[e>>2]}:function(e){return x[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var kA,YA={};function _A(){if(!kA){var e,A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:g||"./this.program"};for(e in YA)A[e]=YA[e];var t=[];for(e in A)t.push(e+"="+A[e]);kA=t}return kA}function VA(e){return 0==e%4&&(0!=e%100||0==e%400)}function TA(e,A){for(var t=0,r=0;r<=A;t+=e[r++]);return t}var PA=[31,29,31,30,31,30,31,31,30,31,30,31],OA=[31,28,31,30,31,30,31,31,30,31,30,31];function JA(e,A){for(e=new Date(e.getTime());0r-e.getDate())){e.setDate(e.getDate()+A);break}A-=r-e.getDate()+1,e.setDate(1),11>t?e.setMonth(t+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function KA(e,A,t,r){e||(e=this),this.parent=e,this.s=e.s,this.oa=null,this.id=ke.ec++,this.name=A,this.mode=t,this.g={},this.h={},this.rdev=r}Object.defineProperties(KA.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},ac:{get:function(){return ke.v(this.mode)}},Sa:{get:function(){return ke.ya(this.mode)}}}),ke.Ab=KA,ke.rc();for(var jA=Array(256),qA=0;256>qA;++qA)jA[qA]=String.fromCharCode(qA);function zA(e,A){var t=Array(U(e)+1);return e=F(e,t,0,t.length),A&&(t.length=e),t}function ZA(e){for(var A=[],t=0;t>4,n=(15&n)<<4|i>>2;var o=(3&i)<<6|a;A+=String.fromCharCode(r),64!==i&&(A+=String.fromCharCode(n)),64!==a&&(A+=String.fromCharCode(o))}while(t>2],A.ha.push(e),p=r[n],0|e;return e=L[e>>2],p=t,0|e},__cxa_find_matching_catch_3:function(){var e=Ce;if(!e)return p=0;var A=fe[e],t=A.type;if(!t)return p=0,0|e;var r=Array.prototype.slice.call(arguments);st(t),L[22792]=e,e=91168;for(var n=0;n>2],A.ha.push(e),p=r[n],0|e;return e=L[e>>2],p=t,0|e},__cxa_find_matching_catch_4:function(){var e=Ce;if(!e)return p=0;var A=fe[e],t=A.type;if(!t)return p=0,0|e;var r=Array.prototype.slice.call(arguments);st(t),L[22792]=e,e=91168;for(var n=0;n>2],A.ha.push(e),p=r[n],0|e;return e=L[e>>2],p=t,0|e},__cxa_find_matching_catch_5:function(){var e=Ce;if(!e)return p=0;var A=fe[e],t=A.type;if(!t)return p=0,0|e;var r=Array.prototype.slice.call(arguments);st(t),L[22792]=e,e=91168;for(var n=0;n>2],A.ha.push(e),p=r[n],0|e;return e=L[e>>2],p=t,0|e},__cxa_free_exception:me,__cxa_get_exception_ptr:function(e){return e},__cxa_rethrow:function(){var e=Ee.pop();throw e=pe(e),fe[e].Ea||(Ee.push(e),fe[e].Ea=!0),Ce=e,e},__cxa_throw:function(e,A,t){throw fe[e]={j:e,ha:[e],type:A,ja:t,ra:0,fb:!1,Ea:!1},Ce=e,"uncaught_exception"in at?at.ab++:at.ab=1,e},__cxa_uncaught_exceptions:function(){return at.ab},__map_file:function(){return ye(63),-1},__resumeException:function(e){throw Ce||(Ce=e),e},__sys_fcntl64:function(e,A,t){_e=t;try{var r=Te(e);switch(A){case 0:var n=Ve();return 0>n?-28:ke.open(r.path,r.flags,0,n).fd;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:return n=Ve(),r.flags|=n,0;case 12:return n=Ve(),G[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ye(28),-1}}catch(e){return void 0!==ke&&e instanceof ke.b||ce(e),-e.B}},__sys_ioctl:function(e,A,t){_e=t;try{var r=Te(e);switch(A){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return r.tty?0:-59;case 21519:if(!r.tty)return-59;var n=Ve();return L[n>>2]=0;case 21520:return r.tty?-28:-59;case 21531:return n=Ve(),ke.Ra(r,A,n);default:ce("bad ioctl syscall "+A)}}catch(e){return void 0!==ke&&e instanceof ke.b||ce(e),-e.B}},__sys_munmap:function(e,A){try{if(-1==(0|e)||0===A)var t=-28;else{var r=Ye[e];if(r&&A===r.Lc){var n=ke.ba(r.fd);if(2&r.Sc){var i=r.flags,a=r.offset,o=R.slice(e,e+A);ke.da(n,o,a,A,i)}Ye[e]=null,r.Gb&&rt(r.Nc)}t=0}return t}catch(e){return void 0!==ke&&e instanceof ke.b||ce(e),-e.B}},__sys_open:function(e,A,t){_e=t;try{var r=w(e),n=Ve();return ke.open(r,A,n).fd}catch(e){return void 0!==ke&&e instanceof ke.b||ce(e),-e.B}},__sys_stat64:function(e,A){try{e=w(e);e:{var t=ke.stat;try{var r=t(e)}catch(A){if(A&&A.node&&be(e)!==be(ke.I(A.node))){var n=-54;break e}throw A}L[A>>2]=r.dev,L[A+4>>2]=0,L[A+8>>2]=r.ino,L[A+12>>2]=r.mode,L[A+16>>2]=r.nlink,L[A+20>>2]=r.uid,L[A+24>>2]=r.gid,L[A+28>>2]=r.rdev,L[A+32>>2]=0,Be=[r.size>>>0,(le=r.size,1<=+Ae(le)?0>>0:~~+te((le-+(~~le>>>0))/4294967296)>>>0:0)],L[A+40>>2]=Be[0],L[A+44>>2]=Be[1],L[A+48>>2]=4096,L[A+52>>2]=r.blocks,L[A+56>>2]=r.atime.getTime()/1e3|0,L[A+60>>2]=0,L[A+64>>2]=r.mtime.getTime()/1e3|0,L[A+68>>2]=0,L[A+72>>2]=r.ctime.getTime()/1e3|0,L[A+76>>2]=0,Be=[r.ino>>>0,(le=r.ino,1<=+Ae(le)?0>>0:~~+te((le-+(~~le>>>0))/4294967296)>>>0:0)],L[A+80>>2]=Be[0],L[A+84>>2]=Be[1],n=0}return n}catch(e){return void 0!==ke&&e instanceof ke.b||ce(e),-e.B}},_embind_register_bool:function(e,A,t,r,n){var i=Pe(t);rA(e,{name:A=Je(A),fromWireType:function(e){return!!e},toWireType:function(e,A){return A?r:n},argPackAdvance:8,readValueFromPointer:function(e){if(1===t)var r=N;else if(2===t)r=G;else{if(4!==t)throw new TypeError("Unknown boolean type size: "+A);r=L}return this.fromWireType(r[e>>i])},O:null})},_embind_register_class:function(e,t,r,n,i,a,o,s,u,c,g,l,B){g=Je(g),a=bA(i,a),s&&(s=bA(o,s)),c&&(c=bA(u,c)),B=bA(l,B);var Q=ze(g);!function(e,t){A.hasOwnProperty(e)?($e("Cannot register public name '"+e+"' twice"),IA(A,e,e),A.hasOwnProperty(void 0)&&$e("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),A[e].N[void 0]=t):A[e]=t}(Q,(function(){FA("Cannot construct "+g+" due to unbound types",[n])})),tA([e,t,r],n?[n]:[],(function(t){if(t=t[0],n)var r=t.i,i=r.U;else i=BA.prototype;t=Ze(Q,(function(){if(Object.getPrototypeOf(this)!==o)throw new Xe("Use 'new' to construct "+g);if(void 0===u.V)throw new Xe(g+" has no accessible constructor");var e=u.V[arguments.length];if(void 0===e)throw new Xe("Tried to invoke ctor of "+g+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(u.V).toString()+") parameters instead!");return e.apply(this,arguments)}));var o=Object.create(i,{constructor:{value:t}});t.prototype=o;var u=new dA(g,t,o,B,r,a,s,c);r=new vA(g,u,!0,!1),i=new vA(g+"*",u,!1,!1);var l=new vA(g+" const*",u,!1,!0);return QA[e]={pointerType:i,Mb:l},function(e,t){A.hasOwnProperty(e)||AA("Replacing nonexistant public symbol"),A[e]=t,A[e].va=void 0}(Q,t),[r,i,l]}))},_embind_register_class_constructor:function(e,A,t,r,n,i){v(0g&&$e("argTypes array size mismatch! Must at least get return value and 'this' types!");var l=null!==r[1]&&null!==s,B=!1;for(s=1;s>>o}}var s=-1!=A.indexOf("unsigned");rA(e,{name:A,fromWireType:i,toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+LA(t)+'" to '+this.name);if(tn)throw new TypeError('Passing a number "'+LA(t)+'" from JS side to C/C++ side to an argument of type "'+A+'", which is outside the valid range ['+r+", "+n+"]!");return s?t>>>0:0|t},argPackAdvance:8,readValueFromPointer:HA(A,a,0!==r),O:null})},_embind_register_memory_view:function(e,A,t){function r(e){var A=x;return new n(S,A[1+(e>>=2)],A[e])}var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][A];rA(e,{name:t=Je(t),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Zb:!0})},_embind_register_std_string:function(e,A){var t="std::string"===(A=Je(A));rA(e,{name:A,fromWireType:function(e){var A=x[e>>2];if(t){var r=R[e+4+A],n=0;0!=r&&(n=r,R[e+4+A]=0);var i=e+4;for(r=0;r<=A;++r){var a=e+4+r;if(0==R[a]){if(i=w(i),void 0===o)var o=i;else o+=String.fromCharCode(0),o+=i;i=a+1}}0!=n&&(R[e+4+A]=n)}else{for(o=Array(A),r=0;r>2]=n,t&&r)F(A,R,i+4,n+1);else if(r)for(r=0;r>2],n=a(),i=n[e+4+t*A>>o],s=0;0!=i&&(s=i,n[e+4+t*A>>o]=0);var u=e+4;for(i=0;i<=t;++i){var c=e+4+i*A;if(0==n[c>>o]){if(u=r(u),void 0===g)var g=u;else g+=String.fromCharCode(0),g+=u;u=c+A}}return 0!=s&&(n[e+4+t*A>>o]=s),rt(e),g},toWireType:function(e,r){"string"!=typeof r&&$e("Cannot pass non-string to C++ string type "+t);var a=i(r),s=tt(4+a+A);return x[s>>2]=a>>o,n(r,s+4,a+A),null!==e&&e.push(rt,s),s},argPackAdvance:8,readValueFromPointer:CA,O:function(e){rt(e)}})},_embind_register_void:function(e,A){rA(e,{Jc:!0,name:A=Je(A),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},abort:function(){ce()},emscripten_get_sbrk_ptr:function(){return 91008},emscripten_memcpy_big:function(e,A,t){R.copyWithin(e,A,A+t)},emscripten_resize_heap:function(e){e>>>=0;var A=R.length;if(2147483648=t;t*=2){var r=A*(1+.2/t);r=Math.min(r,e+100663296),0<(r=Math.max(16777216,e,r))%65536&&(r+=65536-r%65536);e:{try{C.grow(Math.min(2147483648,r)-S.byteLength+65535>>>16),K(C.buffer);var n=1;break e}catch(e){}n=void 0}if(n)return!0}return!1},environ_get:function(e,A){var t=0;return _A().forEach((function(r,n){var i=A+t;for(n=L[e+4*n>>2]=i,i=0;i>0]=r.charCodeAt(i);N[n>>0]=0,t+=r.length+1})),0},environ_sizes_get:function(e,A){var t=_A();L[e>>2]=t.length;var r=0;return t.forEach((function(e){r+=e.length+1})),L[A>>2]=r,0},fd_close:function(e){try{var A=Te(e);return ke.close(A),0}catch(e){return void 0!==ke&&e instanceof ke.b||ce(e),e.B}},fd_read:function(e,A,t,r){try{e:{for(var n=Te(e),i=e=0;i>2],o=ke.read(n,N,L[A+8*i>>2],a,void 0);if(0>o){var s=-1;break e}if(e+=o,o>2]=s,0}catch(e){return void 0!==ke&&e instanceof ke.b||ce(e),e.B}},fd_seek:function(e,A,t,r,n){try{var i=Te(e);return-9007199254740992>=(e=4294967296*t+(A>>>0))||9007199254740992<=e?-61:(ke.K(i,e,r),Be=[i.position>>>0,(le=i.position,1<=+Ae(le)?0>>0:~~+te((le-+(~~le>>>0))/4294967296)>>>0:0)],L[n>>2]=Be[0],L[n+4>>2]=Be[1],i.Oa&&0===e&&0===r&&(i.Oa=null),0)}catch(e){return void 0!==ke&&e instanceof ke.b||ce(e),e.B}},fd_write:function(e,A,t,r){try{e:{for(var n=Te(e),i=e=0;i>2],L[A+(8*i+4)>>2],void 0);if(0>a){var o=-1;break e}e+=a}o=e}return L[r>>2]=o,0}catch(e){return void 0!==ke&&e instanceof ke.b||ce(e),e.B}},getTempRet0:function(){return 0|p},gettimeofday:function(e){var A=Date.now();return L[e>>2]=A/1e3|0,L[e+4>>2]=A%1e3*1e3|0,0},invoke_diii:function(e,A,t,r){var n=Tt();try{return Vt(e,A,t,r)}catch(e){if(Ot(n),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_fiii:function(e,A,t,r){var n=Tt();try{return _t(e,A,t,r)}catch(e){if(Ot(n),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_i:function(e){var A=Tt();try{return mt(e)}catch(e){if(Ot(A),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_ii:function(e,A){var t=Tt();try{return yt(e,A)}catch(e){if(Ot(t),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iif:function(e,A,t){var r=Tt();try{return Ht(e,A,t)}catch(e){if(Ot(r),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iii:function(e,A,t){var r=Tt();try{return vt(e,A,t)}catch(e){if(Ot(r),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiii:function(e,A,t,r){var n=Tt();try{return bt(e,A,t,r)}catch(e){if(Ot(n),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiiii:function(e,A,t,r,n){var i=Tt();try{return Dt(e,A,t,r,n)}catch(e){if(Ot(i),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiiiid:function(e,A,t,r,n,i){var a=Tt();try{return Mt(e,A,t,r,n,i)}catch(e){if(Ot(a),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiiiii:function(e,A,t,r,n,i){var a=Tt();try{return wt(e,A,t,r,n,i)}catch(e){if(Ot(a),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiiiiii:function(e,A,t,r,n,i,a){var o=Tt();try{return Ft(e,A,t,r,n,i,a)}catch(e){if(Ot(o),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiiiiiii:function(e,A,t,r,n,i,a,o){var s=Tt();try{return Ut(e,A,t,r,n,i,a,o)}catch(e){if(Ot(s),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiiiiiiiiii:function(e,A,t,r,n,i,a,o,s,u,c){var g=Tt();try{return St(e,A,t,r,n,i,a,o,s,u,c)}catch(e){if(Ot(g),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiiiiiiiiiii:function(e,A,t,r,n,i,a,o,s,u,c,g){var l=Tt();try{return Nt(e,A,t,r,n,i,a,o,s,u,c,g)}catch(e){if(Ot(l),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiiiiiiiiiiii:function(e,A,t,r,n,i,a,o,s,u,c,g,l){var B=Tt();try{return Rt(e,A,t,r,n,i,a,o,s,u,c,g,l)}catch(e){if(Ot(B),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiiiij:function(e,A,t,r,n,i,a){var o=Tt();try{return Gt(e,A,t,r,n,i,a)}catch(e){if(Ot(o),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iiijiiiiii:function(e,A,t,r,n,i,a,o,s,u,c){var g=Tt();try{return Lt(e,A,t,r,n,i,a,o,s,u,c)}catch(e){if(Ot(g),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_iij:function(e,A,t,r){var n=Tt();try{return xt(e,A,t,r)}catch(e){if(Ot(n),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_jii:function(e,A,t){var r=Tt();try{return kt(e,A,t)}catch(e){if(Ot(r),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_jiiii:function(e,A,t,r,n){var i=Tt();try{return Yt(e,A,t,r,n)}catch(e){if(Ot(i),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_v:function(e){var A=Tt();try{ct(e)}catch(e){if(Ot(A),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_vi:function(e,A){var t=Tt();try{gt(e,A)}catch(e){if(Ot(t),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_vii:function(e,A,t){var r=Tt();try{lt(e,A,t)}catch(e){if(Ot(r),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_viii:function(e,A,t,r){var n=Tt();try{Bt(e,A,t,r)}catch(e){if(Ot(n),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_viiii:function(e,A,t,r,n){var i=Tt();try{Qt(e,A,t,r,n)}catch(e){if(Ot(i),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_viiiii:function(e,A,t,r,n,i){var a=Tt();try{It(e,A,t,r,n,i)}catch(e){if(Ot(a),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_viiiiiii:function(e,A,t,r,n,i,a,o){var s=Tt();try{dt(e,A,t,r,n,i,a,o)}catch(e){if(Ot(s),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_viiiiiiiiii:function(e,A,t,r,n,i,a,o,s,u,c){var g=Tt();try{ht(e,A,t,r,n,i,a,o,s,u,c)}catch(e){if(Ot(g),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_viiiiiiiiiiiiiii:function(e,A,t,r,n,i,a,o,s,u,c,g,l,B,Q,I){var d=Tt();try{ft(e,A,t,r,n,i,a,o,s,u,c,g,l,B,Q,I)}catch(e){if(Ot(d),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_viiiijji:function(e,A,t,r,n,i,a,o,s,u){var c=Tt();try{Et(e,A,t,r,n,i,a,o,s,u)}catch(e){if(Ot(c),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_viijii:function(e,A,t,r,n,i,a){var o=Tt();try{pt(e,A,t,r,n,i,a)}catch(e){if(Ot(o),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},invoke_viji:function(e,A,t,r,n){var i=Tt();try{Ct(e,A,t,r,n)}catch(e){if(Ot(i),e!==e+0&&"longjmp"!==e)throw e;it(1,0)}},llvm_eh_typeid_for:function(e){return e},memory:C,setTempRet0:function(e){p=0|e},strftime_l:function(e,A,t,r){return function(e,A,t,r){function n(e,A,t){for(e="number"==typeof e?e.toString():e||"";e.lengthe?-1:0=a(t,e)?0>=a(A,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var u=L[r+40>>2];for(var c in r={uc:L[r>>2],tc:L[r+4>>2],Ga:L[r+8>>2],sa:L[r+12>>2],fa:L[r+16>>2],C:L[r+20>>2],Ha:L[r+24>>2],Ia:L[r+28>>2],Vc:L[r+32>>2],sc:L[r+36>>2],vc:u?w(u):""},t=w(t),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})t=t.replace(new RegExp(c,"g"),u[c]);var g="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),l="January February March April May June July August September October November December".split(" ");for(c in u={"%a":function(e){return g[e.Ha].substring(0,3)},"%A":function(e){return g[e.Ha]},"%b":function(e){return l[e.fa].substring(0,3)},"%B":function(e){return l[e.fa]},"%C":function(e){return i((e.C+1900)/100|0,2)},"%d":function(e){return i(e.sa,2)},"%e":function(e){return n(e.sa,2," ")},"%g":function(e){return s(e).toString().substring(2)},"%G":function(e){return s(e)},"%H":function(e){return i(e.Ga,2)},"%I":function(e){return 0==(e=e.Ga)?e=12:12e.Ga?"AM":"PM"},"%S":function(e){return i(e.uc,2)},"%t":function(){return"\t"},"%u":function(e){return e.Ha||7},"%U":function(e){var A=new Date(e.C+1900,0,1),t=0===A.getDay()?A:JA(A,7-A.getDay());return 0>a(t,e=new Date(e.C+1900,e.fa,e.sa))?i(Math.ceil((31-t.getDate()+(TA(VA(e.getFullYear())?PA:OA,e.getMonth()-1)-31)+e.getDate())/7),2):0===a(t,A)?"01":"00"},"%V":function(e){var A=new Date(e.C+1901,0,4),t=o(new Date(e.C+1900,0,4));A=o(A);var r=JA(new Date(e.C+1900,0,1),e.Ia);return 0>a(r,t)?"53":0>=a(A,r)?"01":i(Math.ceil((t.getFullYear()a(t,e=new Date(e.C+1900,e.fa,e.sa))?i(Math.ceil((31-t.getDate()+(TA(VA(e.getFullYear())?PA:OA,e.getMonth()-1)-31)+e.getDate())/7),2):0===a(t,A)?"01":"00"},"%y":function(e){return(e.C+1900).toString().substring(2)},"%Y":function(e){return e.C+1900},"%z":function(e){var A=0<=(e=e.sc);return e=Math.abs(e)/60,(A?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.vc},"%%":function(){return"%"}})0<=t.indexOf(c)&&(t=t.replace(new RegExp(c,"g"),u[c](r)));return(c=zA(t,!1)).length>A?0:(N.set(c,e),c.length-1)}(e,A,t,r)},table:m},et=function(){function e(e){A.asm=e.exports,ue()}function t(A){e(A.instance)}function r(e){return(E||!o&&!s||"function"!=typeof fetch||ge(Ie,"file://")?new Promise((function(e){e(he())})):fetch(Ie,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Ie+"'";return e.arrayBuffer()})).catch((function(){return he()}))).then((function(e){return WebAssembly.instantiate(e,n)})).then(e,(function(e){f("failed to asynchronously prepare wasm: "+e),ce(e)}))}var n={env:$A,wasi_snapshot_preview1:$A};if(se(),A.instantiateWasm)try{return A.instantiateWasm(n,e)}catch(e){return f("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(E||"function"!=typeof WebAssembly.instantiateStreaming||ge(Ie,Qe)||ge(Ie,"file://")||"function"!=typeof fetch)return r(t);fetch(Ie,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,n).then(t,(function(e){f("wasm streaming compile failed: "+e),f("falling back to ArrayBuffer instantiation"),r(t)}))}))}(),{}}();A.asm=et;var At=A.___wasm_call_ctors=function(){return(At=A.___wasm_call_ctors=A.asm.__wasm_call_ctors).apply(null,arguments)},tt=A._malloc=function(){return(tt=A._malloc=A.asm.malloc).apply(null,arguments)},rt=A._free=function(){return(rt=A._free=A.asm.free).apply(null,arguments)},nt=A.___errno_location=function(){return(nt=A.___errno_location=A.asm.__errno_location).apply(null,arguments)},it=A._setThrew=function(){return(it=A._setThrew=A.asm.setThrew).apply(null,arguments)},at=A.__ZSt18uncaught_exceptionv=function(){return(at=A.__ZSt18uncaught_exceptionv=A.asm._ZSt18uncaught_exceptionv).apply(null,arguments)},ot=A.___cxa_can_catch=function(){return(ot=A.___cxa_can_catch=A.asm.__cxa_can_catch).apply(null,arguments)},st=A.___cxa_is_pointer_type=function(){return(st=A.___cxa_is_pointer_type=A.asm.__cxa_is_pointer_type).apply(null,arguments)},ut=A.___getTypeName=function(){return(ut=A.___getTypeName=A.asm.__getTypeName).apply(null,arguments)};A.___embind_register_native_and_builtin_types=function(){return(A.___embind_register_native_and_builtin_types=A.asm.__embind_register_native_and_builtin_types).apply(null,arguments)};var ct=A.dynCall_v=function(){return(ct=A.dynCall_v=A.asm.dynCall_v).apply(null,arguments)},gt=A.dynCall_vi=function(){return(gt=A.dynCall_vi=A.asm.dynCall_vi).apply(null,arguments)},lt=A.dynCall_vii=function(){return(lt=A.dynCall_vii=A.asm.dynCall_vii).apply(null,arguments)},Bt=A.dynCall_viii=function(){return(Bt=A.dynCall_viii=A.asm.dynCall_viii).apply(null,arguments)},Qt=A.dynCall_viiii=function(){return(Qt=A.dynCall_viiii=A.asm.dynCall_viiii).apply(null,arguments)},It=A.dynCall_viiiii=function(){return(It=A.dynCall_viiiii=A.asm.dynCall_viiiii).apply(null,arguments)},dt=A.dynCall_viiiiiii=function(){return(dt=A.dynCall_viiiiiii=A.asm.dynCall_viiiiiii).apply(null,arguments)},ht=A.dynCall_viiiiiiiiii=function(){return(ht=A.dynCall_viiiiiiiiii=A.asm.dynCall_viiiiiiiiii).apply(null,arguments)},ft=A.dynCall_viiiiiiiiiiiiiii=function(){return(ft=A.dynCall_viiiiiiiiiiiiiii=A.asm.dynCall_viiiiiiiiiiiiiii).apply(null,arguments)},Et=A.dynCall_viiiijji=function(){return(Et=A.dynCall_viiiijji=A.asm.dynCall_viiiijji).apply(null,arguments)},pt=A.dynCall_viijii=function(){return(pt=A.dynCall_viijii=A.asm.dynCall_viijii).apply(null,arguments)},Ct=A.dynCall_viji=function(){return(Ct=A.dynCall_viji=A.asm.dynCall_viji).apply(null,arguments)},mt=A.dynCall_i=function(){return(mt=A.dynCall_i=A.asm.dynCall_i).apply(null,arguments)},yt=A.dynCall_ii=function(){return(yt=A.dynCall_ii=A.asm.dynCall_ii).apply(null,arguments)},vt=A.dynCall_iii=function(){return(vt=A.dynCall_iii=A.asm.dynCall_iii).apply(null,arguments)},bt=A.dynCall_iiii=function(){return(bt=A.dynCall_iiii=A.asm.dynCall_iiii).apply(null,arguments)},Dt=A.dynCall_iiiii=function(){return(Dt=A.dynCall_iiiii=A.asm.dynCall_iiiii).apply(null,arguments)},wt=A.dynCall_iiiiii=function(){return(wt=A.dynCall_iiiiii=A.asm.dynCall_iiiiii).apply(null,arguments)},Ft=A.dynCall_iiiiiii=function(){return(Ft=A.dynCall_iiiiiii=A.asm.dynCall_iiiiiii).apply(null,arguments)},Ut=A.dynCall_iiiiiiii=function(){return(Ut=A.dynCall_iiiiiiii=A.asm.dynCall_iiiiiiii).apply(null,arguments)},St=A.dynCall_iiiiiiiiiii=function(){return(St=A.dynCall_iiiiiiiiiii=A.asm.dynCall_iiiiiiiiiii).apply(null,arguments)},Nt=A.dynCall_iiiiiiiiiiii=function(){return(Nt=A.dynCall_iiiiiiiiiiii=A.asm.dynCall_iiiiiiiiiiii).apply(null,arguments)},Rt=A.dynCall_iiiiiiiiiiiii=function(){return(Rt=A.dynCall_iiiiiiiiiiiii=A.asm.dynCall_iiiiiiiiiiiii).apply(null,arguments)},Gt=A.dynCall_iiiiij=function(){return(Gt=A.dynCall_iiiiij=A.asm.dynCall_iiiiij).apply(null,arguments)},Mt=A.dynCall_iiiiid=function(){return(Mt=A.dynCall_iiiiid=A.asm.dynCall_iiiiid).apply(null,arguments)},Lt=A.dynCall_iiijiiiiii=function(){return(Lt=A.dynCall_iiijiiiiii=A.asm.dynCall_iiijiiiiii).apply(null,arguments)},xt=A.dynCall_iij=function(){return(xt=A.dynCall_iij=A.asm.dynCall_iij).apply(null,arguments)},Ht=A.dynCall_iif=function(){return(Ht=A.dynCall_iif=A.asm.dynCall_iif).apply(null,arguments)},kt=A.dynCall_jii=function(){return(kt=A.dynCall_jii=A.asm.dynCall_jii).apply(null,arguments)},Yt=A.dynCall_jiiii=function(){return(Yt=A.dynCall_jiiii=A.asm.dynCall_jiiii).apply(null,arguments)},_t=A.dynCall_fiii=function(){return(_t=A.dynCall_fiii=A.asm.dynCall_fiii).apply(null,arguments)},Vt=A.dynCall_diii=function(){return(Vt=A.dynCall_diii=A.asm.dynCall_diii).apply(null,arguments)},Tt=A.stackSave=function(){return(Tt=A.stackSave=A.asm.stackSave).apply(null,arguments)};A.stackAlloc=function(){return(A.stackAlloc=A.asm.stackAlloc).apply(null,arguments)};var Pt,Ot=A.stackRestore=function(){return(Ot=A.stackRestore=A.asm.stackRestore).apply(null,arguments)};function Jt(){function e(){if(!Pt&&(Pt=!0,A.calledRun=!0,!y)){if(A.noFSInit||ke.ka.Qa||ke.ka(),q(Z),ke.ub=!1,q(W),A.onRuntimeInitialized&&A.onRuntimeInitialized(),A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;){var e=A.postRun.shift();$.unshift(e)}q($)}}if(!(0{n.then((()=>{e()}))})),a=()=>function(e,A,t,r){return new(t||(t=Promise))((function(e,A){function n(e){try{a(r.next(e))}catch(e){A(e)}}function i(e){try{a(r.throw(e))}catch(e){A(e)}}function a(A){var r;A.done?e(A.value):(r=A.value,r instanceof t?r:new t((function(e){e(r)}))).then(n,i)}a((r=r.apply(undefined,[])).next())}))}(0,0,void 0,(function*(){yield i;const e=new n.H264MP4Encoder;return e.FS=n.FS,e}))},function(e,A){e.exports=t(1497)},function(e,A){e.exports=t(5835)}])},3349:(e,A,t)=>{"use strict";var r=t(213).Buffer,n=t(8473).Transform;function i(e){n.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t(5717)(i,n),i.prototype._transform=function(e,A,t){var r=null;try{this.update(e,A)}catch(e){r=e}t(r)},i.prototype._flush=function(e){var A=null;try{this.push(this.digest())}catch(e){A=e}e(A)},i.prototype.update=function(e,A){if(function(e,A){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,A));for(var t=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var i=this._blockOffset;i0;++a)this._length[a]+=o,(o=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*o);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 A=this._digest();void 0!==e&&(A=A.toString(e)),this._block.fill(0),this._blockOffset=0;for(var t=0;t<4;++t)this._length[t]=0;return A},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i},213:(e,A,t)=>{var r=t(8764),n=r.Buffer;function i(e,A){for(var t in e)A[t]=e[t]}function a(e,A,t){return n(e,A,t)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,A),A.Buffer=a),a.prototype=Object.create(n.prototype),i(n,a),a.from=function(e,A,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,A,t)},a.alloc=function(e,A,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==A?"string"==typeof t?r.fill(A,t):r.fill(A):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},3715:(e,A,t)=>{var r=A;r.utils=t(6436),r.common=t(5772),r.sha=t(9041),r.ripemd=t(2949),r.hmac=t(2344),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},5772:(e,A,t)=>{"use strict";var r=t(6436),n=t(9746);function i(){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}A.BlockHash=i,i.prototype.update=function(e,A){if(e=r.toArray(e,A),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var t=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-t,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-t,this.endian);for(var n=0;n>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,i=8;i{"use strict";var r=t(6436),n=t(9746);function i(e,A,t){if(!(this instanceof i))return new i(e,A,t);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(A,t))}e.exports=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var A=e.length;A{"use strict";var r=t(6436),n=t(5772),i=r.rotl32,a=r.sum32,o=r.sum32_3,s=r.sum32_4,u=n.BlockHash;function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function g(e,A,t,r){return e<=15?A^t^r:e<=31?A&t|~A&r:e<=47?(A|~t)^r:e<=63?A&r|t&~r:A^(t|~r)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function B(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(c,u),A.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,A){for(var t=this.h[0],r=this.h[1],n=this.h[2],u=this.h[3],c=this.h[4],f=t,E=r,p=n,C=u,m=c,y=0;y<80;y++){var v=a(i(s(t,g(y,r,n,u),e[Q[y]+A],l(y)),d[y]),c);t=c,c=u,u=i(n,10),n=r,r=v,v=a(i(s(f,g(79-y,E,p,C),e[I[y]+A],B(y)),h[y]),m),f=m,m=C,C=i(p,10),p=E,E=v}v=o(this.h[1],n,C),this.h[1]=o(this.h[2],u,m),this.h[2]=o(this.h[3],c,f),this.h[3]=o(this.h[4],t,E),this.h[4]=o(this.h[0],r,p),this.h[0]=v},c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var Q=[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],I=[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],d=[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],h=[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]},9041:(e,A,t)=>{"use strict";A.sha1=t(4761),A.sha224=t(799),A.sha256=t(9344),A.sha384=t(772),A.sha512=t(5900)},4761:(e,A,t)=>{"use strict";var r=t(6436),n=t(5772),i=t(7038),a=r.rotl32,o=r.sum32,s=r.sum32_5,u=i.ft_1,c=n.BlockHash,g=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(l,c),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,A){for(var t=this.W,r=0;r<16;r++)t[r]=e[A+r];for(;r{"use strict";var r=t(6436),n=t(9344);function i(){if(!(this instanceof i))return new i;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(i,n),e.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},9344:(e,A,t)=>{"use strict";var r=t(6436),n=t(5772),i=t(7038),a=t(9746),o=r.sum32,s=r.sum32_4,u=r.sum32_5,c=i.ch32,g=i.maj32,l=i.s0_256,B=i.s1_256,Q=i.g0_256,I=i.g1_256,d=n.BlockHash,h=[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;d.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=h,this.W=new Array(64)}r.inherits(f,d),e.exports=f,f.blockSize=512,f.outSize=256,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,A){for(var t=this.W,r=0;r<16;r++)t[r]=e[A+r];for(;r{"use strict";var r=t(6436),n=t(5900);function i(){if(!(this instanceof i))return new i;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(i,n),e.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},5900:(e,A,t)=>{"use strict";var r=t(6436),n=t(5772),i=t(9746),a=r.rotr64_hi,o=r.rotr64_lo,s=r.shr64_hi,u=r.shr64_lo,c=r.sum64,g=r.sum64_hi,l=r.sum64_lo,B=r.sum64_4_hi,Q=r.sum64_4_lo,I=r.sum64_5_hi,d=r.sum64_5_lo,h=n.BlockHash,f=[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 E(){if(!(this instanceof E))return new E;h.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=f,this.W=new Array(160)}function p(e,A,t,r,n){var i=e&t^~e&n;return i<0&&(i+=4294967296),i}function C(e,A,t,r,n,i){var a=A&r^~A&i;return a<0&&(a+=4294967296),a}function m(e,A,t,r,n){var i=e&t^e&n^t&n;return i<0&&(i+=4294967296),i}function y(e,A,t,r,n,i){var a=A&r^A&i^r&i;return a<0&&(a+=4294967296),a}function v(e,A){var t=a(e,A,28)^a(A,e,2)^a(A,e,7);return t<0&&(t+=4294967296),t}function b(e,A){var t=o(e,A,28)^o(A,e,2)^o(A,e,7);return t<0&&(t+=4294967296),t}function D(e,A){var t=o(e,A,14)^o(e,A,18)^o(A,e,9);return t<0&&(t+=4294967296),t}function w(e,A){var t=a(e,A,1)^a(e,A,8)^s(e,A,7);return t<0&&(t+=4294967296),t}function F(e,A){var t=o(e,A,1)^o(e,A,8)^u(e,A,7);return t<0&&(t+=4294967296),t}function U(e,A){var t=o(e,A,19)^o(A,e,29)^u(e,A,6);return t<0&&(t+=4294967296),t}r.inherits(E,h),e.exports=E,E.blockSize=1024,E.outSize=512,E.hmacStrength=192,E.padLength=128,E.prototype._prepareBlock=function(e,A){for(var t=this.W,r=0;r<32;r++)t[r]=e[A+r];for(;r{"use strict";var r=t(6436).rotr32;function n(e,A,t){return e&A^~e&t}function i(e,A,t){return e&A^e&t^A&t}function a(e,A,t){return e^A^t}A.ft_1=function(e,A,t,r){return 0===e?n(A,t,r):1===e||3===e?a(A,t,r):2===e?i(A,t,r):void 0},A.ch32=n,A.maj32=i,A.p32=a,A.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},A.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},A.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},A.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},6436:(e,A,t)=>{"use strict";var r=t(9746),n=t(5717);function i(e,A){return 55296==(64512&e.charCodeAt(A))&&!(A<0||A+1>=e.length)&&56320==(64512&e.charCodeAt(A+1))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(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}A.inherits=n,A.toArray=function(e,A){if(Array.isArray(e))return e.slice();if(!e)return[];var t=[];if("string"==typeof e)if(A){if("hex"===A)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,t[r++]=63&a|128):i(e,n)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++n)),t[r++]=a>>18|240,t[r++]=a>>12&63|128,t[r++]=a>>6&63|128,t[r++]=63&a|128):(t[r++]=a>>12|224,t[r++]=a>>6&63|128,t[r++]=63&a|128)}else for(n=0;n>>0}return a},A.split32=function(e,A){for(var t=new Array(4*e.length),r=0,n=0;r>>24,t[n+1]=i>>>16&255,t[n+2]=i>>>8&255,t[n+3]=255&i):(t[n+3]=i>>>24,t[n+2]=i>>>16&255,t[n+1]=i>>>8&255,t[n]=255&i)}return t},A.rotr32=function(e,A){return e>>>A|e<<32-A},A.rotl32=function(e,A){return e<>>32-A},A.sum32=function(e,A){return e+A>>>0},A.sum32_3=function(e,A,t){return e+A+t>>>0},A.sum32_4=function(e,A,t,r){return e+A+t+r>>>0},A.sum32_5=function(e,A,t,r,n){return e+A+t+r+n>>>0},A.sum64=function(e,A,t,r){var n=e[A],i=r+e[A+1]>>>0,a=(i>>0,e[A+1]=i},A.sum64_hi=function(e,A,t,r){return(A+r>>>0>>0},A.sum64_lo=function(e,A,t,r){return A+r>>>0},A.sum64_4_hi=function(e,A,t,r,n,i,a,o){var s=0,u=A;return s+=(u=u+r>>>0)>>0)>>0)>>0},A.sum64_4_lo=function(e,A,t,r,n,i,a,o){return A+r+i+o>>>0},A.sum64_5_hi=function(e,A,t,r,n,i,a,o,s,u){var c=0,g=A;return c+=(g=g+r>>>0)>>0)>>0)>>0)>>0},A.sum64_5_lo=function(e,A,t,r,n,i,a,o,s,u){return A+r+i+o+u>>>0},A.rotr64_hi=function(e,A,t){return(A<<32-t|e>>>t)>>>0},A.rotr64_lo=function(e,A,t){return(e<<32-t|A>>>t)>>>0},A.shr64_hi=function(e,A,t){return e>>>t},A.shr64_lo=function(e,A,t){return(e<<32-t|A>>>t)>>>0}},2156:(e,A,t)=>{"use strict";var r=t(3715),n=t(4504),i=t(9746);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 A=n.toArray(e.entropy,e.entropyEnc||"hex"),t=n.toArray(e.nonce,e.nonceEnc||"hex"),r=n.toArray(e.pers,e.persEnc||"hex");i(A.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(A,t,r)}e.exports=a,a.prototype._init=function(e,A,t){var r=e.concat(A).concat(t);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(t||[])),this._reseed=1},a.prototype.generate=function(e,A,t,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof A&&(r=t,t=A,A=null),t&&(t=n.toArray(t,r||"hex"),this._update(t));for(var i=[];i.length{A.read=function(e,A,t,r,n){var i,a,o=8*n-r-1,s=(1<>1,c=-7,g=t?n-1:0,l=t?-1:1,B=e[A+g];for(g+=l,i=B&(1<<-c)-1,B>>=-c,c+=o;c>0;i=256*i+e[A+g],g+=l,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+e[A+g],g+=l,c-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(B?-1:1);a+=Math.pow(2,r),i-=u}return(B?-1:1)*a*Math.pow(2,i-r)},A.write=function(e,A,t,r,n,i){var a,o,s,u=8*i-n-1,c=(1<>1,l=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,B=r?0:i-1,Q=r?1:-1,I=A<0||0===A&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(o=isNaN(A)?1:0,a=c):(a=Math.floor(Math.log(A)/Math.LN2),A*(s=Math.pow(2,-a))<1&&(a--,s*=2),(A+=a+g>=1?l/s:l*Math.pow(2,1-g))*s>=2&&(a++,s/=2),a+g>=c?(o=0,a=c):a+g>=1?(o=(A*s-1)*Math.pow(2,n),a+=g):(o=A*Math.pow(2,g-1)*Math.pow(2,n),a=0));n>=8;e[t+B]=255&o,B+=Q,o/=256,n-=8);for(a=a<0;e[t+B]=255&a,B+=Q,a/=256,u-=8);e[t+B-Q]|=128*I}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,A){A&&(e.super_=A,e.prototype=Object.create(A.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,A){if(A){e.super_=A;var t=function(){};t.prototype=A.prototype,e.prototype=new t,e.prototype.constructor=e}}},2318:(e,A,t)=>{"use strict";var r=t(5717),n=t(3349),i=t(9509).Buffer,a=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,A){return e<>>32-A}function u(e,A,t,r,n,i,a){return s(e+(A&t|~A&r)+n+i|0,a)+A|0}function c(e,A,t,r,n,i,a){return s(e+(A&r|t&~r)+n+i|0,a)+A|0}function g(e,A,t,r,n,i,a){return s(e+(A^t^r)+n+i|0,a)+A|0}function l(e,A,t,r,n,i,a){return s(e+(t^(A|~r))+n+i|0,a)+A|0}r(o,n),o.prototype._update=function(){for(var e=a,A=0;A<16;++A)e[A]=this._block.readInt32LE(4*A);var t=this._a,r=this._b,n=this._c,i=this._d;t=u(t,r,n,i,e[0],3614090360,7),i=u(i,t,r,n,e[1],3905402710,12),n=u(n,i,t,r,e[2],606105819,17),r=u(r,n,i,t,e[3],3250441966,22),t=u(t,r,n,i,e[4],4118548399,7),i=u(i,t,r,n,e[5],1200080426,12),n=u(n,i,t,r,e[6],2821735955,17),r=u(r,n,i,t,e[7],4249261313,22),t=u(t,r,n,i,e[8],1770035416,7),i=u(i,t,r,n,e[9],2336552879,12),n=u(n,i,t,r,e[10],4294925233,17),r=u(r,n,i,t,e[11],2304563134,22),t=u(t,r,n,i,e[12],1804603682,7),i=u(i,t,r,n,e[13],4254626195,12),n=u(n,i,t,r,e[14],2792965006,17),t=c(t,r=u(r,n,i,t,e[15],1236535329,22),n,i,e[1],4129170786,5),i=c(i,t,r,n,e[6],3225465664,9),n=c(n,i,t,r,e[11],643717713,14),r=c(r,n,i,t,e[0],3921069994,20),t=c(t,r,n,i,e[5],3593408605,5),i=c(i,t,r,n,e[10],38016083,9),n=c(n,i,t,r,e[15],3634488961,14),r=c(r,n,i,t,e[4],3889429448,20),t=c(t,r,n,i,e[9],568446438,5),i=c(i,t,r,n,e[14],3275163606,9),n=c(n,i,t,r,e[3],4107603335,14),r=c(r,n,i,t,e[8],1163531501,20),t=c(t,r,n,i,e[13],2850285829,5),i=c(i,t,r,n,e[2],4243563512,9),n=c(n,i,t,r,e[7],1735328473,14),t=g(t,r=c(r,n,i,t,e[12],2368359562,20),n,i,e[5],4294588738,4),i=g(i,t,r,n,e[8],2272392833,11),n=g(n,i,t,r,e[11],1839030562,16),r=g(r,n,i,t,e[14],4259657740,23),t=g(t,r,n,i,e[1],2763975236,4),i=g(i,t,r,n,e[4],1272893353,11),n=g(n,i,t,r,e[7],4139469664,16),r=g(r,n,i,t,e[10],3200236656,23),t=g(t,r,n,i,e[13],681279174,4),i=g(i,t,r,n,e[0],3936430074,11),n=g(n,i,t,r,e[3],3572445317,16),r=g(r,n,i,t,e[6],76029189,23),t=g(t,r,n,i,e[9],3654602809,4),i=g(i,t,r,n,e[12],3873151461,11),n=g(n,i,t,r,e[15],530742520,16),t=l(t,r=g(r,n,i,t,e[2],3299628645,23),n,i,e[0],4096336452,6),i=l(i,t,r,n,e[7],1126891415,10),n=l(n,i,t,r,e[14],2878612391,15),r=l(r,n,i,t,e[5],4237533241,21),t=l(t,r,n,i,e[12],1700485571,6),i=l(i,t,r,n,e[3],2399980690,10),n=l(n,i,t,r,e[10],4293915773,15),r=l(r,n,i,t,e[1],2240044497,21),t=l(t,r,n,i,e[8],1873313359,6),i=l(i,t,r,n,e[15],4264355552,10),n=l(n,i,t,r,e[6],2734768916,15),r=l(r,n,i,t,e[13],1309151649,21),t=l(t,r,n,i,e[4],4149444226,6),i=l(i,t,r,n,e[11],3174756917,10),n=l(n,i,t,r,e[2],718787259,15),r=l(r,n,i,t,e[9],3951481745,21),this._a=this._a+t|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+i|0},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(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.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=o},3047:(e,A,t)=>{var r=t(6240),n=t(9931);function i(e){this.rand=e||new n.Rand}e.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var A=e.bitLength(),t=Math.ceil(A/8);do{var n=new r(this.rand.generate(t))}while(n.cmp(e)>=0);return n},i.prototype._randrange=function(e,A){var t=A.sub(e);return e.add(this._randbelow(t))},i.prototype.test=function(e,A,t){var n=e.bitLength(),i=r.mont(e),a=new r(1).toRed(i);A||(A=Math.max(1,n/48|0));for(var o=e.subn(1),s=0;!o.testn(s);s++);for(var u=e.shrn(s),c=o.toRed(i);A>0;A--){var g=this._randrange(new r(2),o);t&&t(g);var l=g.toRed(i).redPow(u);if(0!==l.cmp(a)&&0!==l.cmp(c)){for(var B=1;B0;A--){var c=this._randrange(new r(2),a),g=e.gcd(c);if(0!==g.cmpn(1))return g;var l=c.toRed(n).redPow(s);if(0!==l.cmp(i)&&0!==l.cmp(u)){for(var B=1;B=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(e,A,t){var r=o(e,t);return t-1>=A&&(r|=o(e,t-1)<<4),r}function u(e,A,t,r){for(var n=0,i=Math.min(e.length,t),a=A;a=49?o-49+10:o>=17?o-17+10:o}return n}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,A){return e.cmp(A)>0?e:A},i.min=function(e,A){return e.cmp(A)<0?e:A},i.prototype._init=function(e,A,t){if("number"==typeof e)return this._initNumber(e,A,t);if("object"==typeof e)return this._initArray(e,A,t);"hex"===A&&(A=16),r(A===(0|A)&&A>=2&&A<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,A,t){this.length=Math.ceil((e.length-A)/6),this.words=new Array(this.length);for(var r=0;r=A;r-=2)n=s(e,A,r)<=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;else for(r=(e.length-A)%2==0?A+1:A;r=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,A,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=A)r++;r--,n=n/A|0;for(var i=e.length-t,a=i%r,o=Math.min(i,i-a)+t,s=0,c=t;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var c=["","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"],g=[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],l=[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 B(e,A,t){t.negative=A.negative^e.negative;var r=e.length+A.length|0;t.length=r,r=r-1|0;var n=0|e.words[0],i=0|A.words[0],a=n*i,o=67108863&a,s=a/67108864|0;t.words[0]=o;for(var u=1;u>>26,g=67108863&s,l=Math.min(u,A.length-1),B=Math.max(0,u-e.length+1);B<=l;B++){var Q=u-B|0;c+=(a=(n=0|e.words[Q])*(i=0|A.words[B])+g)/67108864|0,g=67108863&a}t.words[u]=0|g,s=0|c}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(e,A){var t;if(A=0|A||1,16===(e=e||10)||"hex"===e){t="";for(var n=0,i=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,a--)}for(0!==i&&(t=i.toString(16)+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var u=g[e],B=l[e];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(B).toString(e);t=(Q=Q.idivn(B)).isZero()?I+t:c[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,A){return r(void 0!==a),this.toArrayLike(a,e,A)},i.prototype.toArray=function(e,A){return this.toArrayLike(Array,e,A)},i.prototype.toArrayLike=function(e,A,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var a,o,s="le"===A,u=new e(i),c=this.clone();if(s){for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),u[o]=a;for(;o=4096&&(t+=13,A>>>=13),A>=64&&(t+=7,A>>>=7),A>=8&&(t+=4,A>>>=4),A>=2&&(t+=2,A>>>=2),t+A},i.prototype._zeroBits=function(e){if(0===e)return 26;var A=e,t=0;return 0==(8191&A)&&(t+=13,A>>>=13),0==(127&A)&&(t+=7,A>>>=7),0==(15&A)&&(t+=4,A>>>=4),0==(3&A)&&(t+=2,A>>>=2),0==(1&A)&&t++,t},i.prototype.bitLength=function(){var e=this.words[this.length-1],A=this._countBits(e);return 26*(this.length-1)+A},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,A=0;Ae.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var A;A=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var A,t;this.length>e.length?(A=this,t=e):(A=e,t=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var A=0|Math.ceil(e/26),t=e%26;this._expand(A),t>0&&A--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,A){r("number"==typeof e&&e>=0);var t=e/26|0,n=e%26;return this._expand(t+1),this.words[t]=A?this.words[t]|1<e.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var A=this.iadd(e);return e.negative=1,A._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&A;for(;0!==i&&a>26,this.words[a]=67108863&A;if(0===i&&a>>13,B=0|a[1],Q=8191&B,I=B>>>13,d=0|a[2],h=8191&d,f=d>>>13,E=0|a[3],p=8191&E,C=E>>>13,m=0|a[4],y=8191&m,v=m>>>13,b=0|a[5],D=8191&b,w=b>>>13,F=0|a[6],U=8191&F,S=F>>>13,N=0|a[7],R=8191&N,G=N>>>13,M=0|a[8],L=8191&M,x=M>>>13,H=0|a[9],k=8191&H,Y=H>>>13,_=0|o[0],V=8191&_,T=_>>>13,P=0|o[1],O=8191&P,J=P>>>13,K=0|o[2],j=8191&K,q=K>>>13,z=0|o[3],Z=8191&z,W=z>>>13,X=0|o[4],$=8191&X,ee=X>>>13,Ae=0|o[5],te=8191&Ae,re=Ae>>>13,ne=0|o[6],ie=8191&ne,ae=ne>>>13,oe=0|o[7],se=8191&oe,ue=oe>>>13,ce=0|o[8],ge=8191&ce,le=ce>>>13,Be=0|o[9],Qe=8191&Be,Ie=Be>>>13;t.negative=e.negative^A.negative,t.length=19;var de=(u+(r=Math.imul(g,V))|0)+((8191&(n=(n=Math.imul(g,T))+Math.imul(l,V)|0))<<13)|0;u=((i=Math.imul(l,T))+(n>>>13)|0)+(de>>>26)|0,de&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var he=(u+(r=r+Math.imul(g,O)|0)|0)+((8191&(n=(n=n+Math.imul(g,J)|0)+Math.imul(l,O)|0))<<13)|0;u=((i=i+Math.imul(l,J)|0)+(n>>>13)|0)+(he>>>26)|0,he&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(f,V)|0,i=Math.imul(f,T),r=r+Math.imul(Q,O)|0,n=(n=n+Math.imul(Q,J)|0)+Math.imul(I,O)|0,i=i+Math.imul(I,J)|0;var fe=(u+(r=r+Math.imul(g,j)|0)|0)+((8191&(n=(n=n+Math.imul(g,q)|0)+Math.imul(l,j)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(n>>>13)|0)+(fe>>>26)|0,fe&=67108863,r=Math.imul(p,V),n=(n=Math.imul(p,T))+Math.imul(C,V)|0,i=Math.imul(C,T),r=r+Math.imul(h,O)|0,n=(n=n+Math.imul(h,J)|0)+Math.imul(f,O)|0,i=i+Math.imul(f,J)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,q)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,q)|0;var Ee=(u+(r=r+Math.imul(g,Z)|0)|0)+((8191&(n=(n=n+Math.imul(g,W)|0)+Math.imul(l,Z)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(p,O)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(C,O)|0,i=i+Math.imul(C,J)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,q)|0)+Math.imul(f,j)|0,i=i+Math.imul(f,q)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var pe=(u+(r=r+Math.imul(g,$)|0)|0)+((8191&(n=(n=n+Math.imul(g,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(n>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(D,V),n=(n=Math.imul(D,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,O)|0,n=(n=n+Math.imul(y,J)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,J)|0,r=r+Math.imul(p,j)|0,n=(n=n+Math.imul(p,q)|0)+Math.imul(C,j)|0,i=i+Math.imul(C,q)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(f,Z)|0,i=i+Math.imul(f,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0;var Ce=(u+(r=r+Math.imul(g,te)|0)|0)+((8191&(n=(n=n+Math.imul(g,re)|0)+Math.imul(l,te)|0))<<13)|0;u=((i=i+Math.imul(l,re)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(D,O)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(w,O)|0,i=i+Math.imul(w,J)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,q)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,q)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(f,$)|0,i=i+Math.imul(f,ee)|0,r=r+Math.imul(Q,te)|0,n=(n=n+Math.imul(Q,re)|0)+Math.imul(I,te)|0,i=i+Math.imul(I,re)|0;var me=(u+(r=r+Math.imul(g,ie)|0)|0)+((8191&(n=(n=n+Math.imul(g,ae)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,ae)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(G,V)|0,i=Math.imul(G,T),r=r+Math.imul(U,O)|0,n=(n=n+Math.imul(U,J)|0)+Math.imul(S,O)|0,i=i+Math.imul(S,J)|0,r=r+Math.imul(D,j)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(h,te)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(f,te)|0,i=i+Math.imul(f,re)|0,r=r+Math.imul(Q,ie)|0,n=(n=n+Math.imul(Q,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0;var ye=(u+(r=r+Math.imul(g,se)|0)|0)+((8191&(n=(n=n+Math.imul(g,ue)|0)+Math.imul(l,se)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(L,V),n=(n=Math.imul(L,T))+Math.imul(x,V)|0,i=Math.imul(x,T),r=r+Math.imul(R,O)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(G,O)|0,i=i+Math.imul(G,J)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,q)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,q)|0,r=r+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,r=r+Math.imul(p,te)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(C,te)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,ae)|0)+Math.imul(f,ie)|0,i=i+Math.imul(f,ae)|0,r=r+Math.imul(Q,se)|0,n=(n=n+Math.imul(Q,ue)|0)+Math.imul(I,se)|0,i=i+Math.imul(I,ue)|0;var ve=(u+(r=r+Math.imul(g,ge)|0)|0)+((8191&(n=(n=n+Math.imul(g,le)|0)+Math.imul(l,ge)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(L,O)|0,n=(n=n+Math.imul(L,J)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,J)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,q)|0)+Math.imul(G,j)|0,i=i+Math.imul(G,q)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(y,te)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(v,te)|0,i=i+Math.imul(v,re)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(h,se)|0,n=(n=n+Math.imul(h,ue)|0)+Math.imul(f,se)|0,i=i+Math.imul(f,ue)|0,r=r+Math.imul(Q,ge)|0,n=(n=n+Math.imul(Q,le)|0)+Math.imul(I,ge)|0,i=i+Math.imul(I,le)|0;var be=(u+(r=r+Math.imul(g,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(g,Ie)|0)+Math.imul(l,Qe)|0))<<13)|0;u=((i=i+Math.imul(l,Ie)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,O),n=(n=Math.imul(k,J))+Math.imul(Y,O)|0,i=Math.imul(Y,J),r=r+Math.imul(L,j)|0,n=(n=n+Math.imul(L,q)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,q)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(G,Z)|0,i=i+Math.imul(G,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(D,te)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(w,te)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,r=r+Math.imul(p,se)|0,n=(n=n+Math.imul(p,ue)|0)+Math.imul(C,se)|0,i=i+Math.imul(C,ue)|0,r=r+Math.imul(h,ge)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(f,ge)|0,i=i+Math.imul(f,le)|0;var De=(u+(r=r+Math.imul(Q,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(Q,Ie)|0)+Math.imul(I,Qe)|0))<<13)|0;u=((i=i+Math.imul(I,Ie)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,q))+Math.imul(Y,j)|0,i=Math.imul(Y,q),r=r+Math.imul(L,Z)|0,n=(n=n+Math.imul(L,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(G,$)|0,i=i+Math.imul(G,ee)|0,r=r+Math.imul(U,te)|0,n=(n=n+Math.imul(U,re)|0)+Math.imul(S,te)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(y,se)|0,n=(n=n+Math.imul(y,ue)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ue)|0,r=r+Math.imul(p,ge)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(C,ge)|0,i=i+Math.imul(C,le)|0;var we=(u+(r=r+Math.imul(h,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(h,Ie)|0)+Math.imul(f,Qe)|0))<<13)|0;u=((i=i+Math.imul(f,Ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(R,te)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(G,te)|0,i=i+Math.imul(G,re)|0,r=r+Math.imul(U,ie)|0,n=(n=n+Math.imul(U,ae)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,ae)|0,r=r+Math.imul(D,se)|0,n=(n=n+Math.imul(D,ue)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,ue)|0,r=r+Math.imul(y,ge)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(v,ge)|0,i=i+Math.imul(v,le)|0;var Fe=(u+(r=r+Math.imul(p,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(p,Ie)|0)+Math.imul(C,Qe)|0))<<13)|0;u=((i=i+Math.imul(C,Ie)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,ee))+Math.imul(Y,$)|0,i=Math.imul(Y,ee),r=r+Math.imul(L,te)|0,n=(n=n+Math.imul(L,re)|0)+Math.imul(x,te)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,ae)|0)+Math.imul(G,ie)|0,i=i+Math.imul(G,ae)|0,r=r+Math.imul(U,se)|0,n=(n=n+Math.imul(U,ue)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,ue)|0,r=r+Math.imul(D,ge)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(w,ge)|0,i=i+Math.imul(w,le)|0;var Ue=(u+(r=r+Math.imul(y,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(y,Ie)|0)+Math.imul(v,Qe)|0))<<13)|0;u=((i=i+Math.imul(v,Ie)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul(k,te),n=(n=Math.imul(k,re))+Math.imul(Y,te)|0,i=Math.imul(Y,re),r=r+Math.imul(L,ie)|0,n=(n=n+Math.imul(L,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(R,se)|0,n=(n=n+Math.imul(R,ue)|0)+Math.imul(G,se)|0,i=i+Math.imul(G,ue)|0,r=r+Math.imul(U,ge)|0,n=(n=n+Math.imul(U,le)|0)+Math.imul(S,ge)|0,i=i+Math.imul(S,le)|0;var Se=(u+(r=r+Math.imul(D,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(D,Ie)|0)+Math.imul(w,Qe)|0))<<13)|0;u=((i=i+Math.imul(w,Ie)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,ie),n=(n=Math.imul(k,ae))+Math.imul(Y,ie)|0,i=Math.imul(Y,ae),r=r+Math.imul(L,se)|0,n=(n=n+Math.imul(L,ue)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ue)|0,r=r+Math.imul(R,ge)|0,n=(n=n+Math.imul(R,le)|0)+Math.imul(G,ge)|0,i=i+Math.imul(G,le)|0;var Ne=(u+(r=r+Math.imul(U,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(U,Ie)|0)+Math.imul(S,Qe)|0))<<13)|0;u=((i=i+Math.imul(S,Ie)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(k,se),n=(n=Math.imul(k,ue))+Math.imul(Y,se)|0,i=Math.imul(Y,ue),r=r+Math.imul(L,ge)|0,n=(n=n+Math.imul(L,le)|0)+Math.imul(x,ge)|0,i=i+Math.imul(x,le)|0;var Re=(u+(r=r+Math.imul(R,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(R,Ie)|0)+Math.imul(G,Qe)|0))<<13)|0;u=((i=i+Math.imul(G,Ie)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(k,ge),n=(n=Math.imul(k,le))+Math.imul(Y,ge)|0,i=Math.imul(Y,le);var Ge=(u+(r=r+Math.imul(L,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(L,Ie)|0)+Math.imul(x,Qe)|0))<<13)|0;u=((i=i+Math.imul(x,Ie)|0)+(n>>>13)|0)+(Ge>>>26)|0,Ge&=67108863;var Me=(u+(r=Math.imul(k,Qe))|0)+((8191&(n=(n=Math.imul(k,Ie))+Math.imul(Y,Qe)|0))<<13)|0;return u=((i=Math.imul(Y,Ie))+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=de,s[1]=he,s[2]=fe,s[3]=Ee,s[4]=pe,s[5]=Ce,s[6]=me,s[7]=ye,s[8]=ve,s[9]=be,s[10]=De,s[11]=we,s[12]=Fe,s[13]=Ue,s[14]=Se,s[15]=Ne,s[16]=Re,s[17]=Ge,s[18]=Me,0!==u&&(s[19]=u,t.length++),t};function I(e,A,t){return(new d).mulp(e,A,t)}function d(e,A){this.x=e,this.y=A}Math.imul||(Q=B),i.prototype.mulTo=function(e,A){var t,r=this.length+e.length;return t=10===this.length&&10===e.length?Q(this,e,A):r<63?B(this,e,A):r<1024?function(e,A,t){t.negative=A.negative^e.negative,t.length=e.length+A.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,a&=67108863}t.words[i]=o,r=a,a=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,e,A):I(this,e,A),t},d.prototype.makeRBT=function(e){for(var A=new Array(e),t=i.prototype._countBits(e)-1,r=0;r>=1;return r},d.prototype.permute=function(e,A,t,r,n,i){for(var a=0;a>>=1)n++;return 1<>>=13,t[2*a+1]=8191&i,i>>>=13;for(a=2*A;a>=26,A+=n/67108864|0,A+=i>>>26,this.words[t]=67108863&i}return 0!==A&&(this.words[t]=A,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var A=function(e){for(var A=new Array(e.bitLength()),t=0;t>>n}return A}(e);if(0===A.length)return new i(1);for(var t=this,r=0;r=0);var A,t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var a=0;for(A=0;A>>26-t}a&&(this.words[A]=a,this.length++)}if(0!==n){for(A=this.length-1;A>=0;A--)this.words[A+n]=this.words[A];for(A=0;A=0),n=A?(A-A%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var g=0|this.words[u];this.words[u]=c<<26-i|g>>>i,c=g&o}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,A,t){return r(0===this.negative),this.iushrn(e,A,t)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var A=e%26,t=(e-A)/26,n=1<=0);var A=e%26,t=(e-A)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==A&&t++,this.length=Math.min(t,this.length),0!==A){var n=67108863^67108863>>>A<=67108864;A++)this.words[A]-=67108864,A===this.length-1?this.words[A+1]=1:this.words[A+1]++;return this.length=Math.max(this.length,A+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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 A=0;A>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,A){var t=(this.length,e.length),r=this.clone(),n=e,a=0|n.words[n.length-1];0!=(t=26-this._countBits(a))&&(n=n.ushln(t),r.iushln(t),a=0|n.words[n.length-1]);var o,s=r.length-n.length;if("mod"!==A){(o=new i(null)).length=s+1,o.words=new Array(o.length);for(var u=0;u=0;g--){var l=67108864*(0|r.words[n.length+g])+(0|r.words[n.length+g-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(n,l,g);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,g),r.isZero()||(r.negative^=1);o&&(o.words[g]=l)}return o&&o.strip(),r.strip(),"div"!==A&&0!==t&&r.iushrn(t),{div:o||null,mod:r}},i.prototype.divmod=function(e,A,t){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,A),"mod"!==A&&(n=o.div.neg()),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),A),"mod"!==A&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),A),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===A?{div:this.divn(e.words[0]),mod:null}:"mod"===A?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,A);var n,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var A=this.divmod(e);if(A.mod.isZero())return A.div;var t=0!==A.div.negative?A.mod.isub(e):A.mod,r=e.ushrn(1),n=e.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?A.div:0!==A.div.negative?A.div.isubn(1):A.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var A=(1<<26)%e,t=0,n=this.length-1;n>=0;n--)t=(A*t+(0|this.words[n]))%e;return t},i.prototype.idivn=function(e){r(e<=67108863);for(var A=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*A;this.words[t]=n/e|0,A=n%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n=new i(1),a=new i(0),o=new i(0),s=new i(1),u=0;A.isEven()&&t.isEven();)A.iushrn(1),t.iushrn(1),++u;for(var c=t.clone(),g=A.clone();!A.isZero();){for(var l=0,B=1;0==(A.words[0]&B)&&l<26;++l,B<<=1);if(l>0)for(A.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(c),a.isub(g)),n.iushrn(1),a.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(g)),o.iushrn(1),s.iushrn(1);A.cmp(t)>=0?(A.isub(t),n.isub(o),a.isub(s)):(t.isub(A),o.isub(n),s.isub(a))}return{a:o,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n,a=new i(1),o=new i(0),s=t.clone();A.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,c=1;0==(A.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var g=0,l=1;0==(t.words[0]&l)&&g<26;++g,l<<=1);if(g>0)for(t.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);A.cmp(t)>=0?(A.isub(t),a.isub(o)):(t.isub(A),o.isub(a))}return(n=0===A.cmpn(1)?a:o).cmpn(0)<0&&n.iadd(e),n},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var A=this.clone(),t=e.clone();A.negative=0,t.negative=0;for(var r=0;A.isEven()&&t.isEven();r++)A.iushrn(1),t.iushrn(1);for(;;){for(;A.isEven();)A.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=A.cmp(t);if(n<0){var i=A;A=t,t=i}else if(0===n||0===t.cmpn(1))break;A.isub(t)}return t.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var A=e%26,t=(e-A)/26,n=1<>>26,o&=67108863,this.words[a]=o}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var A,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)A=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];A=n===e?0:ne.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|e.words[t];if(r!==n){rn&&(A=1);break}}return A},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var h={k256:null,p224:null,p192:null,p25519:null};function f(e,A){this.name=e,this.p=new i(A,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var A=i._prime(e);this.m=A.p,this.prime=A}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}f.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},f.prototype.ireduce=function(e){var A,t=e;do{this.split(t,this.tmp),A=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(A>this.n);var r=A0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},f.prototype.split=function(e,A){e.iushrn(this.n,0,A)},f.prototype.imulK=function(e){return e.imul(this.k)},n(E,f),E.prototype.split=function(e,A){for(var t=4194303,r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var A=0,t=0;t>>=26,e.words[t]=n,A=r}return 0!==A&&(e.words[e.length++]=A),e},i._prime=function(e){if(h[e])return h[e];var A;if("k256"===e)A=new E;else if("p224"===e)A=new p;else if("p192"===e)A=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);A=new m}return h[e]=A,A},y.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,A){r(0==(e.negative|A.negative),"red works only with positives"),r(e.red&&e.red===A.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,A){this._verify2(e,A);var t=e.add(A);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(e,A){this._verify2(e,A);var t=e.iadd(A);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(e,A){this._verify2(e,A);var t=e.sub(A);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(e,A){this._verify2(e,A);var t=e.isub(A);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(e,A){return this._verify1(e),this.imod(e.ushln(A))},y.prototype.imul=function(e,A){return this._verify2(e,A),this.imod(e.imul(A))},y.prototype.mul=function(e,A){return this._verify2(e,A),this.imod(e.mul(A))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var A=this.m.andln(3);if(r(A%2==1),3===A){var t=this.m.add(new i(1)).iushrn(2);return this.pow(e,t)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var o=new i(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var g=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),B=this.pow(e,n),Q=a;0!==B.cmp(o);){for(var I=B,d=0;0!==I.cmp(o);d++)I=I.redSqr();r(d=0;r--){for(var u=A.words[r],c=s-1;c>=0;c--){var g=u>>c&1;n!==t[0]&&(n=this.sqr(n)),0!==g||0!==a?(a<<=1,a|=g,(4==++o||0===r&&0===c)&&(n=this.mul(n,t[a]),o=0,a=0)):o=0}s=26}return n},y.prototype.convertTo=function(e){var A=e.umod(this.m);return A===e?A.clone():A},y.prototype.convertFrom=function(e){var A=e.clone();return A.red=null,A},i.mont=function(e){return new v(e)},n(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var A=this.imod(e.mul(this.rinv));return A.red=null,A},v.prototype.imul=function(e,A){if(e.isZero()||A.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,A){if(e.isZero()||A.isZero())return new i(0)._forceRed(this);var t=e.mul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},5733:(e,A,t)=>{"use strict";t.r(A)},9746:e=>{function A(e,A){if(!e)throw new Error(A||"Assertion failed")}e.exports=A,A.equal=function(e,A,t){if(e!=A)throw new Error(t||"Assertion failed: "+e+" != "+A)}},4504:(e,A)=>{"use strict";var t=A;function r(e){return 1===e.length?"0"+e:e}function n(e){for(var A="",t=0;t>8,a=255&n;i?t.push(i,a):t.push(a)}return t},t.zero2=r,t.toHex=n,t.encode=function(e,A){return"hex"===A?n(e):e}},2818:(e,A,t)=>{"use strict";var r=t(9809);A.certificate=t(1934);var n=r.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())}));A.RSAPrivateKey=n;var i=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));A.RSAPublicKey=i;var a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));A.PublicKey=a;var o=r.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())})),s=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));A.PrivateKey=s;var u=r.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())}));A.EncryptedPrivateKey=u;var c=r.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())}));A.DSAPrivateKey=c,A.DSAparam=r.define("DSAparam",(function(){this.int()}));var g=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));A.ECPrivateKey=g;var l=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));A.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1934:(e,A,t)=>{"use strict";var r=t(9809),n=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),i=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),s=r.define("RelativeDistinguishedName",(function(){this.setof(i)})),u=r.define("RDNSequence",(function(){this.seqof(s)})),c=r.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),g=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),l=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),B=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(c),this.key("validity").use(g),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),Q=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(B),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=Q},7631:(e,A,t)=>{var r=/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,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=t(3048),o=t(4696),s=t(9509).Buffer;e.exports=function(e,A){var t,u=e.toString(),c=u.match(r);if(c){var g="aes"+c[1],l=s.from(c[2],"hex"),B=s.from(c[3].replace(/[\r\n]/g,""),"base64"),Q=a(A,l.slice(0,8),parseInt(c[1],10)).key,I=[],d=o.createDecipheriv(g,Q,l);I.push(d.update(B)),I.push(d.final()),t=s.concat(I)}else{var h=u.match(i);t=s.from(h[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(n)[1],data:t}}},980:(e,A,t)=>{var r=t(2818),n=t(2562),i=t(7631),a=t(4696),o=t(5632),s=t(9509).Buffer;function u(e){var A;"object"!=typeof e||s.isBuffer(e)||(A=e.passphrase,e=e.key),"string"==typeof e&&(e=s.from(e));var t,u,c=i(e,A),g=c.tag,l=c.data;switch(g){case"CERTIFICATE":u=r.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=r.PublicKey.decode(l,"der")),t=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=r.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+t)}case"ENCRYPTED PRIVATE KEY":l=function(e,A){var t=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=n[e.algorithm.decrypt.cipher.algo.join(".")],u=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,g=parseInt(i.split("-")[1],10)/8,l=o.pbkdf2Sync(A,t,r,g,"sha1"),B=a.createDecipheriv(i,l,u),Q=[];return Q.push(B.update(c)),Q.push(B.final()),s.concat(Q)}(l=r.EncryptedPrivateKey.decode(l,"der"),A);case"PRIVATE KEY":switch(t=(u=r.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:r.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=r.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+t)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=r.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+g)}}e.exports=u,u.signature=r.signature},6470:e=>{"use strict";function A(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function t(e,A){for(var t,r="",n=0,i=-1,a=0,o=0;o<=e.length;++o){if(o2){var s=r.lastIndexOf("/");if(s!==r.length-1){-1===s?(r="",n=0):n=(r=r.slice(0,s)).length-1-r.lastIndexOf("/"),i=o,a=0;continue}}else if(2===r.length||1===r.length){r="",n=0,i=o,a=0;continue}A&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(i+1,o):r=e.slice(i+1,o),n=o-i-1;i=o,a=0}else 46===t&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var a;i>=0?a=arguments[i]:(void 0===e&&(e=process.cwd()),a=e),A(a),0!==a.length&&(r=a+"/"+r,n=47===a.charCodeAt(0))}return r=t(r,!n),n?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(A(e),0===e.length)return".";var r=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=t(e,!r)).length||r||(e="."),e.length>0&&n&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return A(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":r.normalize(e)},relative:function(e,t){if(A(e),A(t),e===t)return"";if((e=r.resolve(e))===(t=r.resolve(t)))return"";for(var n=1;nu){if(47===t.charCodeAt(o+g))return t.slice(o+g+1);if(0===g)return t.slice(o+g)}else a>u&&(47===e.charCodeAt(n+g)?c=g:0===g&&(c=0));break}var l=e.charCodeAt(n+g);if(l!==t.charCodeAt(o+g))break;47===l&&(c=g)}var B="";for(g=n+c+1;g<=i;++g)g!==i&&47!==e.charCodeAt(g)||(0===B.length?B+="..":B+="/..");return B.length>0?B+t.slice(o+c):(o+=c,47===t.charCodeAt(o)&&++o,t.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(A(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){n=a;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');A(e);var r,n=0,i=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var o=t.length-1,s=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!a){n=r+1;break}}else-1===s&&(a=!1,s=r+1),o>=0&&(u===t.charCodeAt(o)?-1==--o&&(i=r):(o=-1,i=s))}return n===i?i=s:-1===i&&(i=e.length),e.slice(n,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){n=r+1;break}}else-1===i&&(a=!1,i=r+1);return-1===i?"":e.slice(n,i)},extname:function(e){A(e);for(var t=-1,r=0,n=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===n&&(i=!1,n=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){r=o+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,A){var t=A.dir||A.root,r=A.base||(A.name||"")+(A.ext||"");return t?t===A.root?t+r:t+"/"+r:r}(0,e)},parse:function(e){A(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),i=47===n;i?(t.root="/",r=1):r=0;for(var a=-1,o=0,s=-1,u=!0,c=e.length-1,g=0;c>=r;--c)if(47!==(n=e.charCodeAt(c)))-1===s&&(u=!1,s=c+1),46===n?-1===a?a=c:1!==g&&(g=1):-1!==a&&(g=-1);else if(!u){o=c+1;break}return-1===a||-1===s||0===g||1===g&&a===s-1&&a===o+1?-1!==s&&(t.base=t.name=0===o&&i?e.slice(1,s):e.slice(o,s)):(0===o&&i?(t.name=e.slice(1,a),t.base=e.slice(1,s)):(t.name=e.slice(o,a),t.base=e.slice(o,s)),t.ext=e.slice(a,s)),o>0?t.dir=e.slice(0,o-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},5632:(e,A,t)=>{A.pbkdf2=t(8638),A.pbkdf2Sync=t(1257)},8638:(e,A,t)=>{var r,n,i=t(9509).Buffer,a=t(7357),o=t(2368),s=t(1257),u=t(7777),c=t.g.crypto&&t.g.crypto.subtle,g={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"},l=[];function B(){return n||(n=t.g.process&&t.g.process.nextTick?t.g.process.nextTick:t.g.queueMicrotask?t.g.queueMicrotask:t.g.setImmediate?t.g.setImmediate:t.g.setTimeout)}function Q(e,A,t,r,n){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:A,iterations:t,hash:{name:n}},e,r<<3)})).then((function(e){return i.from(e)}))}e.exports=function(e,A,n,I,d,h){"function"==typeof d&&(h=d,d=void 0);var f=g[(d=d||"sha1").toLowerCase()];if(f&&"function"==typeof t.g.Promise){if(a(n,I),e=u(e,o,"Password"),A=u(A,o,"Salt"),"function"!=typeof h)throw new Error("No callback provided to pbkdf2");!function(e,A){e.then((function(e){B()((function(){A(null,e)}))}),(function(e){B()((function(){A(e)}))}))}(function(e){if(t.g.process&&!t.g.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];var A=Q(r=r||i.alloc(8),r,10,128,e).then((function(){return!0})).catch((function(){return!1}));return l[e]=A,A}(f).then((function(t){return t?Q(e,A,n,I,f):s(e,A,n,I,d)})),h)}else B()((function(){var t;try{t=s(e,A,n,I,d)}catch(e){return h(e)}h(null,t)}))}},2368:(e,A,t)=>{var r;r=t.g.process&&t.g.process.browser?"utf-8":t.g.process&&t.g.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=r},7357:e=>{var A=Math.pow(2,30)-1;e.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||t>A||t!=t)throw new TypeError("Bad key length")}},1257:(e,A,t)=>{var r=t(8028),n=t(9785),i=t(9072),a=t(9509).Buffer,o=t(7357),s=t(2368),u=t(7777),c=a.alloc(128),g={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,A,t){var o=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new n).update(e).digest()}:"md5"===e?r:function(A){return i(e).update(A).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;A.length>s?A=o(A):A.length{var r=t(9509).Buffer;e.exports=function(e,A,t){if(r.isBuffer(e))return e;if("string"==typeof e)return r.from(e,A);if(ArrayBuffer.isView(e))return r.from(e.buffer);throw new TypeError(t+" must be a string, a Buffer, a typed array or a DataView")}},7900:(e,A,t)=>{A.publicEncrypt=t(6559),A.privateDecrypt=t(6138),A.privateEncrypt=function(e,t){return A.publicEncrypt(e,t,!0)},A.publicDecrypt=function(e,t){return A.privateDecrypt(e,t,!0)}},9199:(e,A,t)=>{var r=t(3482),n=t(9509).Buffer;function i(e){var A=n.allocUnsafe(4);return A.writeUInt32BE(e,0),A}e.exports=function(e,A){for(var t,a=n.alloc(0),o=0;a.length=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(e,A,t){var r=o(e,t);return t-1>=A&&(r|=o(e,t-1)<<4),r}function u(e,A,t,r){for(var n=0,i=Math.min(e.length,t),a=A;a=49?o-49+10:o>=17?o-17+10:o}return n}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,A){return e.cmp(A)>0?e:A},i.min=function(e,A){return e.cmp(A)<0?e:A},i.prototype._init=function(e,A,t){if("number"==typeof e)return this._initNumber(e,A,t);if("object"==typeof e)return this._initArray(e,A,t);"hex"===A&&(A=16),r(A===(0|A)&&A>=2&&A<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,A,t){this.length=Math.ceil((e.length-A)/6),this.words=new Array(this.length);for(var r=0;r=A;r-=2)n=s(e,A,r)<=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;else for(r=(e.length-A)%2==0?A+1:A;r=18?(i-=18,a+=1,this.words[a]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,A,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=A)r++;r--,n=n/A|0;for(var i=e.length-t,a=i%r,o=Math.min(i,i-a)+t,s=0,c=t;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var c=["","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"],g=[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],l=[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 B(e,A,t){t.negative=A.negative^e.negative;var r=e.length+A.length|0;t.length=r,r=r-1|0;var n=0|e.words[0],i=0|A.words[0],a=n*i,o=67108863&a,s=a/67108864|0;t.words[0]=o;for(var u=1;u>>26,g=67108863&s,l=Math.min(u,A.length-1),B=Math.max(0,u-e.length+1);B<=l;B++){var Q=u-B|0;c+=(a=(n=0|e.words[Q])*(i=0|A.words[B])+g)/67108864|0,g=67108863&a}t.words[u]=0|g,s=0|c}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(e,A){var t;if(A=0|A||1,16===(e=e||10)||"hex"===e){t="";for(var n=0,i=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,a--)}for(0!==i&&(t=i.toString(16)+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var u=g[e],B=l[e];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(B).toString(e);t=(Q=Q.idivn(B)).isZero()?I+t:c[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%A!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,A){return r(void 0!==a),this.toArrayLike(a,e,A)},i.prototype.toArray=function(e,A){return this.toArrayLike(Array,e,A)},i.prototype.toArrayLike=function(e,A,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var a,o,s="le"===A,u=new e(i),c=this.clone();if(s){for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),u[o]=a;for(;o=4096&&(t+=13,A>>>=13),A>=64&&(t+=7,A>>>=7),A>=8&&(t+=4,A>>>=4),A>=2&&(t+=2,A>>>=2),t+A},i.prototype._zeroBits=function(e){if(0===e)return 26;var A=e,t=0;return 0==(8191&A)&&(t+=13,A>>>=13),0==(127&A)&&(t+=7,A>>>=7),0==(15&A)&&(t+=4,A>>>=4),0==(3&A)&&(t+=2,A>>>=2),0==(1&A)&&t++,t},i.prototype.bitLength=function(){var e=this.words[this.length-1],A=this._countBits(e);return 26*(this.length-1)+A},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,A=0;Ae.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var A;A=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var A,t;this.length>e.length?(A=this,t=e):(A=e,t=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var A=0|Math.ceil(e/26),t=e%26;this._expand(A),t>0&&A--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,A){r("number"==typeof e&&e>=0);var t=e/26|0,n=e%26;return this._expand(t+1),this.words[t]=A?this.words[t]|1<e.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var A=this.iadd(e);return e.negative=1,A._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&A;for(;0!==i&&a>26,this.words[a]=67108863&A;if(0===i&&a>>13,B=0|a[1],Q=8191&B,I=B>>>13,d=0|a[2],h=8191&d,f=d>>>13,E=0|a[3],p=8191&E,C=E>>>13,m=0|a[4],y=8191&m,v=m>>>13,b=0|a[5],D=8191&b,w=b>>>13,F=0|a[6],U=8191&F,S=F>>>13,N=0|a[7],R=8191&N,G=N>>>13,M=0|a[8],L=8191&M,x=M>>>13,H=0|a[9],k=8191&H,Y=H>>>13,_=0|o[0],V=8191&_,T=_>>>13,P=0|o[1],O=8191&P,J=P>>>13,K=0|o[2],j=8191&K,q=K>>>13,z=0|o[3],Z=8191&z,W=z>>>13,X=0|o[4],$=8191&X,ee=X>>>13,Ae=0|o[5],te=8191&Ae,re=Ae>>>13,ne=0|o[6],ie=8191&ne,ae=ne>>>13,oe=0|o[7],se=8191&oe,ue=oe>>>13,ce=0|o[8],ge=8191&ce,le=ce>>>13,Be=0|o[9],Qe=8191&Be,Ie=Be>>>13;t.negative=e.negative^A.negative,t.length=19;var de=(u+(r=Math.imul(g,V))|0)+((8191&(n=(n=Math.imul(g,T))+Math.imul(l,V)|0))<<13)|0;u=((i=Math.imul(l,T))+(n>>>13)|0)+(de>>>26)|0,de&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var he=(u+(r=r+Math.imul(g,O)|0)|0)+((8191&(n=(n=n+Math.imul(g,J)|0)+Math.imul(l,O)|0))<<13)|0;u=((i=i+Math.imul(l,J)|0)+(n>>>13)|0)+(he>>>26)|0,he&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(f,V)|0,i=Math.imul(f,T),r=r+Math.imul(Q,O)|0,n=(n=n+Math.imul(Q,J)|0)+Math.imul(I,O)|0,i=i+Math.imul(I,J)|0;var fe=(u+(r=r+Math.imul(g,j)|0)|0)+((8191&(n=(n=n+Math.imul(g,q)|0)+Math.imul(l,j)|0))<<13)|0;u=((i=i+Math.imul(l,q)|0)+(n>>>13)|0)+(fe>>>26)|0,fe&=67108863,r=Math.imul(p,V),n=(n=Math.imul(p,T))+Math.imul(C,V)|0,i=Math.imul(C,T),r=r+Math.imul(h,O)|0,n=(n=n+Math.imul(h,J)|0)+Math.imul(f,O)|0,i=i+Math.imul(f,J)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,q)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,q)|0;var Ee=(u+(r=r+Math.imul(g,Z)|0)|0)+((8191&(n=(n=n+Math.imul(g,W)|0)+Math.imul(l,Z)|0))<<13)|0;u=((i=i+Math.imul(l,W)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(p,O)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(C,O)|0,i=i+Math.imul(C,J)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,q)|0)+Math.imul(f,j)|0,i=i+Math.imul(f,q)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var pe=(u+(r=r+Math.imul(g,$)|0)|0)+((8191&(n=(n=n+Math.imul(g,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((i=i+Math.imul(l,ee)|0)+(n>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(D,V),n=(n=Math.imul(D,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,O)|0,n=(n=n+Math.imul(y,J)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,J)|0,r=r+Math.imul(p,j)|0,n=(n=n+Math.imul(p,q)|0)+Math.imul(C,j)|0,i=i+Math.imul(C,q)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(f,Z)|0,i=i+Math.imul(f,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0;var Ce=(u+(r=r+Math.imul(g,te)|0)|0)+((8191&(n=(n=n+Math.imul(g,re)|0)+Math.imul(l,te)|0))<<13)|0;u=((i=i+Math.imul(l,re)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(D,O)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(w,O)|0,i=i+Math.imul(w,J)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,q)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,q)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(f,$)|0,i=i+Math.imul(f,ee)|0,r=r+Math.imul(Q,te)|0,n=(n=n+Math.imul(Q,re)|0)+Math.imul(I,te)|0,i=i+Math.imul(I,re)|0;var me=(u+(r=r+Math.imul(g,ie)|0)|0)+((8191&(n=(n=n+Math.imul(g,ae)|0)+Math.imul(l,ie)|0))<<13)|0;u=((i=i+Math.imul(l,ae)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(G,V)|0,i=Math.imul(G,T),r=r+Math.imul(U,O)|0,n=(n=n+Math.imul(U,J)|0)+Math.imul(S,O)|0,i=i+Math.imul(S,J)|0,r=r+Math.imul(D,j)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(h,te)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(f,te)|0,i=i+Math.imul(f,re)|0,r=r+Math.imul(Q,ie)|0,n=(n=n+Math.imul(Q,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0;var ye=(u+(r=r+Math.imul(g,se)|0)|0)+((8191&(n=(n=n+Math.imul(g,ue)|0)+Math.imul(l,se)|0))<<13)|0;u=((i=i+Math.imul(l,ue)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(L,V),n=(n=Math.imul(L,T))+Math.imul(x,V)|0,i=Math.imul(x,T),r=r+Math.imul(R,O)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(G,O)|0,i=i+Math.imul(G,J)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,q)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,q)|0,r=r+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,r=r+Math.imul(p,te)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(C,te)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,ae)|0)+Math.imul(f,ie)|0,i=i+Math.imul(f,ae)|0,r=r+Math.imul(Q,se)|0,n=(n=n+Math.imul(Q,ue)|0)+Math.imul(I,se)|0,i=i+Math.imul(I,ue)|0;var ve=(u+(r=r+Math.imul(g,ge)|0)|0)+((8191&(n=(n=n+Math.imul(g,le)|0)+Math.imul(l,ge)|0))<<13)|0;u=((i=i+Math.imul(l,le)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(L,O)|0,n=(n=n+Math.imul(L,J)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,J)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,q)|0)+Math.imul(G,j)|0,i=i+Math.imul(G,q)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(y,te)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(v,te)|0,i=i+Math.imul(v,re)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(h,se)|0,n=(n=n+Math.imul(h,ue)|0)+Math.imul(f,se)|0,i=i+Math.imul(f,ue)|0,r=r+Math.imul(Q,ge)|0,n=(n=n+Math.imul(Q,le)|0)+Math.imul(I,ge)|0,i=i+Math.imul(I,le)|0;var be=(u+(r=r+Math.imul(g,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(g,Ie)|0)+Math.imul(l,Qe)|0))<<13)|0;u=((i=i+Math.imul(l,Ie)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,O),n=(n=Math.imul(k,J))+Math.imul(Y,O)|0,i=Math.imul(Y,J),r=r+Math.imul(L,j)|0,n=(n=n+Math.imul(L,q)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,q)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(G,Z)|0,i=i+Math.imul(G,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(D,te)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(w,te)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,r=r+Math.imul(p,se)|0,n=(n=n+Math.imul(p,ue)|0)+Math.imul(C,se)|0,i=i+Math.imul(C,ue)|0,r=r+Math.imul(h,ge)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(f,ge)|0,i=i+Math.imul(f,le)|0;var De=(u+(r=r+Math.imul(Q,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(Q,Ie)|0)+Math.imul(I,Qe)|0))<<13)|0;u=((i=i+Math.imul(I,Ie)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,q))+Math.imul(Y,j)|0,i=Math.imul(Y,q),r=r+Math.imul(L,Z)|0,n=(n=n+Math.imul(L,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(G,$)|0,i=i+Math.imul(G,ee)|0,r=r+Math.imul(U,te)|0,n=(n=n+Math.imul(U,re)|0)+Math.imul(S,te)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(y,se)|0,n=(n=n+Math.imul(y,ue)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ue)|0,r=r+Math.imul(p,ge)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(C,ge)|0,i=i+Math.imul(C,le)|0;var we=(u+(r=r+Math.imul(h,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(h,Ie)|0)+Math.imul(f,Qe)|0))<<13)|0;u=((i=i+Math.imul(f,Ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(R,te)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(G,te)|0,i=i+Math.imul(G,re)|0,r=r+Math.imul(U,ie)|0,n=(n=n+Math.imul(U,ae)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,ae)|0,r=r+Math.imul(D,se)|0,n=(n=n+Math.imul(D,ue)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,ue)|0,r=r+Math.imul(y,ge)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(v,ge)|0,i=i+Math.imul(v,le)|0;var Fe=(u+(r=r+Math.imul(p,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(p,Ie)|0)+Math.imul(C,Qe)|0))<<13)|0;u=((i=i+Math.imul(C,Ie)|0)+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,ee))+Math.imul(Y,$)|0,i=Math.imul(Y,ee),r=r+Math.imul(L,te)|0,n=(n=n+Math.imul(L,re)|0)+Math.imul(x,te)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,ae)|0)+Math.imul(G,ie)|0,i=i+Math.imul(G,ae)|0,r=r+Math.imul(U,se)|0,n=(n=n+Math.imul(U,ue)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,ue)|0,r=r+Math.imul(D,ge)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(w,ge)|0,i=i+Math.imul(w,le)|0;var Ue=(u+(r=r+Math.imul(y,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(y,Ie)|0)+Math.imul(v,Qe)|0))<<13)|0;u=((i=i+Math.imul(v,Ie)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul(k,te),n=(n=Math.imul(k,re))+Math.imul(Y,te)|0,i=Math.imul(Y,re),r=r+Math.imul(L,ie)|0,n=(n=n+Math.imul(L,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(R,se)|0,n=(n=n+Math.imul(R,ue)|0)+Math.imul(G,se)|0,i=i+Math.imul(G,ue)|0,r=r+Math.imul(U,ge)|0,n=(n=n+Math.imul(U,le)|0)+Math.imul(S,ge)|0,i=i+Math.imul(S,le)|0;var Se=(u+(r=r+Math.imul(D,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(D,Ie)|0)+Math.imul(w,Qe)|0))<<13)|0;u=((i=i+Math.imul(w,Ie)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,ie),n=(n=Math.imul(k,ae))+Math.imul(Y,ie)|0,i=Math.imul(Y,ae),r=r+Math.imul(L,se)|0,n=(n=n+Math.imul(L,ue)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ue)|0,r=r+Math.imul(R,ge)|0,n=(n=n+Math.imul(R,le)|0)+Math.imul(G,ge)|0,i=i+Math.imul(G,le)|0;var Ne=(u+(r=r+Math.imul(U,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(U,Ie)|0)+Math.imul(S,Qe)|0))<<13)|0;u=((i=i+Math.imul(S,Ie)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(k,se),n=(n=Math.imul(k,ue))+Math.imul(Y,se)|0,i=Math.imul(Y,ue),r=r+Math.imul(L,ge)|0,n=(n=n+Math.imul(L,le)|0)+Math.imul(x,ge)|0,i=i+Math.imul(x,le)|0;var Re=(u+(r=r+Math.imul(R,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(R,Ie)|0)+Math.imul(G,Qe)|0))<<13)|0;u=((i=i+Math.imul(G,Ie)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(k,ge),n=(n=Math.imul(k,le))+Math.imul(Y,ge)|0,i=Math.imul(Y,le);var Ge=(u+(r=r+Math.imul(L,Qe)|0)|0)+((8191&(n=(n=n+Math.imul(L,Ie)|0)+Math.imul(x,Qe)|0))<<13)|0;u=((i=i+Math.imul(x,Ie)|0)+(n>>>13)|0)+(Ge>>>26)|0,Ge&=67108863;var Me=(u+(r=Math.imul(k,Qe))|0)+((8191&(n=(n=Math.imul(k,Ie))+Math.imul(Y,Qe)|0))<<13)|0;return u=((i=Math.imul(Y,Ie))+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=de,s[1]=he,s[2]=fe,s[3]=Ee,s[4]=pe,s[5]=Ce,s[6]=me,s[7]=ye,s[8]=ve,s[9]=be,s[10]=De,s[11]=we,s[12]=Fe,s[13]=Ue,s[14]=Se,s[15]=Ne,s[16]=Re,s[17]=Ge,s[18]=Me,0!==u&&(s[19]=u,t.length++),t};function I(e,A,t){return(new d).mulp(e,A,t)}function d(e,A){this.x=e,this.y=A}Math.imul||(Q=B),i.prototype.mulTo=function(e,A){var t,r=this.length+e.length;return t=10===this.length&&10===e.length?Q(this,e,A):r<63?B(this,e,A):r<1024?function(e,A,t){t.negative=A.negative^e.negative,t.length=e.length+A.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,a&=67108863}t.words[i]=o,r=a,a=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,e,A):I(this,e,A),t},d.prototype.makeRBT=function(e){for(var A=new Array(e),t=i.prototype._countBits(e)-1,r=0;r>=1;return r},d.prototype.permute=function(e,A,t,r,n,i){for(var a=0;a>>=1)n++;return 1<>>=13,t[2*a+1]=8191&i,i>>>=13;for(a=2*A;a>=26,A+=n/67108864|0,A+=i>>>26,this.words[t]=67108863&i}return 0!==A&&(this.words[t]=A,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var A=function(e){for(var A=new Array(e.bitLength()),t=0;t>>n}return A}(e);if(0===A.length)return new i(1);for(var t=this,r=0;r=0);var A,t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var a=0;for(A=0;A>>26-t}a&&(this.words[A]=a,this.length++)}if(0!==n){for(A=this.length-1;A>=0;A--)this.words[A+n]=this.words[A];for(A=0;A=0),n=A?(A-A%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var g=0|this.words[u];this.words[u]=c<<26-i|g>>>i,c=g&o}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,A,t){return r(0===this.negative),this.iushrn(e,A,t)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var A=e%26,t=(e-A)/26,n=1<=0);var A=e%26,t=(e-A)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==A&&t++,this.length=Math.min(t,this.length),0!==A){var n=67108863^67108863>>>A<=67108864;A++)this.words[A]-=67108864,A===this.length-1?this.words[A+1]=1:this.words[A+1]++;return this.length=Math.max(this.length,A+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(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 A=0;A>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,A){var t=(this.length,e.length),r=this.clone(),n=e,a=0|n.words[n.length-1];0!=(t=26-this._countBits(a))&&(n=n.ushln(t),r.iushln(t),a=0|n.words[n.length-1]);var o,s=r.length-n.length;if("mod"!==A){(o=new i(null)).length=s+1,o.words=new Array(o.length);for(var u=0;u=0;g--){var l=67108864*(0|r.words[n.length+g])+(0|r.words[n.length+g-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(n,l,g);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,g),r.isZero()||(r.negative^=1);o&&(o.words[g]=l)}return o&&o.strip(),r.strip(),"div"!==A&&0!==t&&r.iushrn(t),{div:o||null,mod:r}},i.prototype.divmod=function(e,A,t){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,A),"mod"!==A&&(n=o.div.neg()),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),A),"mod"!==A&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),A),"div"!==A&&(a=o.mod.neg(),t&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===A?{div:this.divn(e.words[0]),mod:null}:"mod"===A?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,A);var n,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var A=this.divmod(e);if(A.mod.isZero())return A.div;var t=0!==A.div.negative?A.mod.isub(e):A.mod,r=e.ushrn(1),n=e.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?A.div:0!==A.div.negative?A.div.isubn(1):A.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var A=(1<<26)%e,t=0,n=this.length-1;n>=0;n--)t=(A*t+(0|this.words[n]))%e;return t},i.prototype.idivn=function(e){r(e<=67108863);for(var A=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*A;this.words[t]=n/e|0,A=n%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n=new i(1),a=new i(0),o=new i(0),s=new i(1),u=0;A.isEven()&&t.isEven();)A.iushrn(1),t.iushrn(1),++u;for(var c=t.clone(),g=A.clone();!A.isZero();){for(var l=0,B=1;0==(A.words[0]&B)&&l<26;++l,B<<=1);if(l>0)for(A.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(c),a.isub(g)),n.iushrn(1),a.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(g)),o.iushrn(1),s.iushrn(1);A.cmp(t)>=0?(A.isub(t),n.isub(o),a.isub(s)):(t.isub(A),o.isub(n),s.isub(a))}return{a:o,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var A=this,t=e.clone();A=0!==A.negative?A.umod(e):A.clone();for(var n,a=new i(1),o=new i(0),s=t.clone();A.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,c=1;0==(A.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var g=0,l=1;0==(t.words[0]&l)&&g<26;++g,l<<=1);if(g>0)for(t.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);A.cmp(t)>=0?(A.isub(t),a.isub(o)):(t.isub(A),o.isub(a))}return(n=0===A.cmpn(1)?a:o).cmpn(0)<0&&n.iadd(e),n},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var A=this.clone(),t=e.clone();A.negative=0,t.negative=0;for(var r=0;A.isEven()&&t.isEven();r++)A.iushrn(1),t.iushrn(1);for(;;){for(;A.isEven();)A.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=A.cmp(t);if(n<0){var i=A;A=t,t=i}else if(0===n||0===t.cmpn(1))break;A.isub(t)}return t.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var A=e%26,t=(e-A)/26,n=1<>>26,o&=67108863,this.words[a]=o}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var A,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)A=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];A=n===e?0:ne.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|e.words[t];if(r!==n){rn&&(A=1);break}}return A},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var h={k256:null,p224:null,p192:null,p25519:null};function f(e,A){this.name=e,this.p=new i(A,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var A=i._prime(e);this.m=A.p,this.prime=A}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}f.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},f.prototype.ireduce=function(e){var A,t=e;do{this.split(t,this.tmp),A=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(A>this.n);var r=A0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},f.prototype.split=function(e,A){e.iushrn(this.n,0,A)},f.prototype.imulK=function(e){return e.imul(this.k)},n(E,f),E.prototype.split=function(e,A){for(var t=4194303,r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var A=0,t=0;t>>=26,e.words[t]=n,A=r}return 0!==A&&(e.words[e.length++]=A),e},i._prime=function(e){if(h[e])return h[e];var A;if("k256"===e)A=new E;else if("p224"===e)A=new p;else if("p192"===e)A=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);A=new m}return h[e]=A,A},y.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,A){r(0==(e.negative|A.negative),"red works only with positives"),r(e.red&&e.red===A.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,A){this._verify2(e,A);var t=e.add(A);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(e,A){this._verify2(e,A);var t=e.iadd(A);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(e,A){this._verify2(e,A);var t=e.sub(A);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(e,A){this._verify2(e,A);var t=e.isub(A);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(e,A){return this._verify1(e),this.imod(e.ushln(A))},y.prototype.imul=function(e,A){return this._verify2(e,A),this.imod(e.imul(A))},y.prototype.mul=function(e,A){return this._verify2(e,A),this.imod(e.mul(A))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var A=this.m.andln(3);if(r(A%2==1),3===A){var t=this.m.add(new i(1)).iushrn(2);return this.pow(e,t)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var o=new i(1).toRed(this),s=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var g=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),B=this.pow(e,n),Q=a;0!==B.cmp(o);){for(var I=B,d=0;0!==I.cmp(o);d++)I=I.redSqr();r(d=0;r--){for(var u=A.words[r],c=s-1;c>=0;c--){var g=u>>c&1;n!==t[0]&&(n=this.sqr(n)),0!==g||0!==a?(a<<=1,a|=g,(4==++o||0===r&&0===c)&&(n=this.mul(n,t[a]),o=0,a=0)):o=0}s=26}return n},y.prototype.convertTo=function(e){var A=e.umod(this.m);return A===e?A.clone():A},y.prototype.convertFrom=function(e){var A=e.clone();return A.red=null,A},i.mont=function(e){return new v(e)},n(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var A=this.imod(e.mul(this.rinv));return A.red=null,A},v.prototype.imul=function(e,A){if(e.isZero()||A.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,A){if(e.isZero()||A.isZero())return new i(0)._forceRed(this);var t=e.mul(A),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},6138:(e,A,t)=>{var r=t(980),n=t(9199),i=t(7859),a=t(2144),o=t(3663),s=t(3482),u=t(4818),c=t(9509).Buffer;e.exports=function(e,A,t){var g;g=e.padding?e.padding:t?1:4;var l,B=r(e),Q=B.modulus.byteLength();if(A.length>Q||new a(A).cmp(B.modulus)>=0)throw new Error("decryption error");l=t?u(new a(A),B):o(A,B);var I=c.alloc(Q-l.length);if(l=c.concat([I,l],Q),4===g)return function(e,A){var t=e.modulus.byteLength(),r=s("sha1").update(c.alloc(0)).digest(),a=r.length;if(0!==A[0])throw new Error("decryption error");var o=A.slice(1,a+1),u=A.slice(a+1),g=i(o,n(u,a)),l=i(u,n(g,t-a-1));if(function(e,A){e=c.from(e),A=c.from(A);var t=0,r=e.length;e.length!==A.length&&(t++,r=Math.min(e.length,A.length));for(var n=-1;++n=A.length){i++;break}var a=A.slice(2,n-1);if(("0002"!==r.toString("hex")&&!t||"0001"!==r.toString("hex")&&t)&&i++,a.length<8&&i++,i)throw new Error("decryption error");return A.slice(n)}(0,l,t);if(3===g)return l;throw new Error("unknown padding")}},6559:(e,A,t)=>{var r=t(980),n=t(1798),i=t(3482),a=t(9199),o=t(7859),s=t(2144),u=t(4818),c=t(3663),g=t(9509).Buffer;e.exports=function(e,A,t){var l;l=e.padding?e.padding:t?1:4;var B,Q=r(e);if(4===l)B=function(e,A){var t=e.modulus.byteLength(),r=A.length,u=i("sha1").update(g.alloc(0)).digest(),c=u.length,l=2*c;if(r>t-l-2)throw new Error("message too long");var B=g.alloc(t-r-l-2),Q=t-c-1,I=n(c),d=o(g.concat([u,B,g.alloc(1,1),A],Q),a(I,Q)),h=o(I,a(d,c));return new s(g.concat([g.alloc(1),h,d],t))}(Q,A);else if(1===l)B=function(e,A,t){var r,i=A.length,a=e.modulus.byteLength();if(i>a-11)throw new Error("message too long");return r=t?g.alloc(a-i-3,255):function(e){for(var A,t=g.allocUnsafe(e),r=0,i=n(2*e),a=0;r=0)throw new Error("data too long for modulus")}return t?c(B,Q):u(B,Q)}},4818:(e,A,t)=>{var r=t(2144),n=t(9509).Buffer;e.exports=function(e,A){return n.from(e.toRed(r.mont(A.modulus)).redPow(new r(A.publicExponent)).fromRed().toArray())}},7859:e=>{e.exports=function(e,A){for(var t=e.length,r=-1;++r{"use strict";var r=65536,n=t(9509).Buffer,i=t.g.crypto||t.g.msCrypto;i&&i.getRandomValues?e.exports=function(e,A){if(e>4294967295)throw new RangeError("requested too many random bytes");var t=n.allocUnsafe(e);if(e>0)if(e>r)for(var a=0;a{"use strict";function r(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var n=t(9509),i=t(1798),a=n.Buffer,o=n.kMaxLength,s=t.g.crypto||t.g.msCrypto,u=Math.pow(2,32)-1;function c(e,A){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>u||e<0)throw new TypeError("offset must be a uint32");if(e>o||e>A)throw new RangeError("offset out of range")}function g(e,A,t){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+A>t||e>o)throw new RangeError("buffer too small")}function l(e,A,t,r){if(process.browser){var n=e.buffer,a=new Uint8Array(n,A,t);return s.getRandomValues(a),r?void process.nextTick((function(){r(null,e)})):e}if(!r)return i(t).copy(e,A),e;i(t,(function(t,n){if(t)return r(t);n.copy(e,A),r(null,e)}))}s&&s.getRandomValues||!process.browser?(A.randomFill=function(e,A,r,n){if(!(a.isBuffer(e)||e instanceof t.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof A)n=A,A=0,r=e.length;else if("function"==typeof r)n=r,r=e.length-A;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return c(A,e.length),g(r,A,e.length),l(e,A,r,n)},A.randomFillSync=function(e,A,r){if(void 0===A&&(A=0),!(a.isBuffer(e)||e instanceof t.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return c(A,e.length),void 0===r&&(r=e.length-A),g(r,A,e.length),l(e,A,r)}):(A.randomFill=r,A.randomFillSync=r)},3101:(e,A,t)=>{"use strict";var r=t(7294),n=t(3840);function i(e){for(var A="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t