/*! For license information please see main.29f44ce2.js.LICENSE.txt */ (()=>{var e={4693:e=>{e.exports={icons:[{title:"Resim YOK",img:"_"},{title:"Bir Numara",img:"1numara.png"},{title:"On Numara",img:"10numara.png"},{title:"Yuz Numara",img:"100numara.png"},{title:"Turkiye Bayragi",img:"turkiyebayragi.png"},{title:"Kalp - 1",img:"kalp.png"},{title:"Kalp - 2",img:"kalp2.png"},{title:"Kalp Bayrak",img:"kalpbayrak.png"},{title:"Sonsuzluk",img:"sonszluk.png"},{title:"Dudak Izi",img:"dudakizi.png"},{title:"Cicek",img:"cicek.png"},{title:"Kugu",img:"kugu.png"},{title:"Civciv",img:"civciv.png"},{title:"Nazar Boncugu",img:"nazarboncugu.png"},{title:"Zar",img:"zar.png"},{title:"1938",img:"1938.png"},{title:"Besiktas",img:"besiktas.png"},{title:"Galatasaray",img:"galatasaray.png"},{title:"Galatasaray - 2",img:"gs.png"},{title:"Fenerbahce",img:"fenerbahce.png"},{title:"Trabzonspor",img:"trabzonspor.png"},{title:"Kartlar",img:"iskambil.png"},{title:"Seytan",img:"seytan1.png"},{title:"Kalp Goz",img:"kalpgozemoji.png"},{title:"smileyyz",img:"smileyyz.jpg"},{title:"Romantik",img:"indir.png"},{title:"Beyaz Papatya",img:"masa345.png"},{title:"Sar\u0131 \xc7i\xe7ek",img:"masa12.png"},{title:"Kelebek",img:"06.gif"},{title:"K\u0131rm\u0131z\u0131 G\xfcl",img:"masa13.png"},{title:"Kral Tac\u0131",img:"images.png"},{title:"Osmanl\u0131 T\xfcrk",img:"turks.png"},{title:"kiss",img:"kiss.gif"},{title:"Galatasaray 3",img:"images(14).png"},{title:"Melek Emoji",img:"images(13).png"},{title:"Kalp Ok",img:"images(12).png"},{title:"fdghg55",img:"fdghg55.png"},{title:"Ay Y\u0131ld\u0131z",img:"images(10).png"},{title:"Siyah Kalp",img:"images(9).png"},{title:"Somurtkan",img:"images(8).png"},{title:"ilone",img:"ilone.png"},{title:"g\xf6zk\u0131rp",img:"qoobee.gif"},{title:"kelebek",img:"kelebek1.jpg"},{title:"Cad\u0131",img:"cadi.gif"},{title:"Kurt",img:"bass.png"},{title:"A\u015f\u0131k Emojiler",img:"images(7).png"},{title:"\xd6fkeli Emoji",img:"images(5).png"},{title:"A\u015f\u0131k emoji",img:"images535.png"},{title:"Atat\xfcrk 1",img:"images(2).png"},{title:"Atat\xfcrk",img:"images(3).png"},{title:"\u015ea\u015fk\u0131n Emoji",img:"images(1).png"},{title:"karakalp",img:"karakalp.png"},{title:"aycicek",img:"aycicek.png"},{title:"biryildiz",img:"biryildiz.png"},{title:"ugurbocegi",img:"ugurbocegi.png"},{title:"samsunspor",img:"samsunspor.png"},{title:"1yildiz2",img:"1yildiz2.jpg"},{title:"tac_kral_taci",img:"tac_kral_taci.gif"},{title:"cute-devil",img:"cute-devil.gif"},{title:"Kalp Goz Kedi",img:"kalpgozkedi.png"},{title:"pikachu",img:"pikachury.png"},{title:"Gulen Kalp 1",img:"gulenkalp1.png"},{title:"Gulen Kalp 2",img:"gulenkalp2.png"},{title:"Melek Kalp 1",img:"melekkalp1.png"},{title:"casper",img:"afas.png"},{title:"Sari Papatya",img:"papatyasari.png"},{title:"Melek Kalp 2",img:"melekkalp2.png"},{title:"Melek Emoji 1",img:"melekemoji1.png"},{title:"\u015firin baba",img:"sirinbaba.png"},{title:"gitbas\u0131mdan",img:"gitbasimdan.gif"},{title:"unlem",img:"unlem.gif"},{title:"Melek Emoji 2",img:"melekemoji2.png"}]}},5154:e=>{e.exports={mod:function(e,t){return(e%t+t)%t}}},7821:e=>{e.exports={endMessage:(e,t)=>{var n,r,i,s,a,o,l,c;let d="";if(null!==e&&void 0!==e&&e.user)switch(null===e||void 0===e?void 0:e.r){case 1:d="".concat(null!==(n=null===(r=t[null===e||void 0===e?void 0:e.user])||void 0===r?void 0:r.username)&&void 0!==n?n:""," okey att\u0131.");break;case 2:d="".concat(null!==(i=null===(s=t[null===e||void 0===e?void 0:e.user])||void 0===s?void 0:s.username)&&void 0!==i?i:""," tura d\xf6nerek eli a\xe7t\u0131.");break;case 3:d="".concat(null!==(a=null===(o=t[null===e||void 0===e?void 0:e.user])||void 0===o?void 0:o.username)&&void 0!==a?a:""," tura d\xf6nerek okey att\u0131!");break;default:d="".concat(null!==(l=null===(c=t[null===e||void 0===e?void 0:e.user])||void 0===c?void 0:c.username)&&void 0!==l?l:""," eli a\xe7t\u0131.")}else d="Tur berabere bitti.";return null!==e&&void 0!==e&&e.end_game?d+=" Oyun bitti.":d+=" Bir sonraki tur 4 saniye i\xe7inde ba\u015flayacak.",d}}},7266:e=>{e.exports={samePieces:(e,t)=>{if(e>104||t>104)return e>104&&t>104;if(~~((e-1)/26)!==~~((t-1)/26))return!1;return(e-1)%13+1===(t-1)%13+1},findEquivalentPiece:e=>{if(105===e)return 106;if(106===e)return 105;return~~((e-1)/13)%2===1?e-13:e+13}}},6522:(e,t,n)=>{"use strict";const r=t;r.bignum=n(518),r.define=n(8199).define,r.base=n(8222),r.constants=n(3062),r.decoders=n(4023),r.encoders=n(7407)},8199:(e,t,n)=>{"use strict";const r=n(7407),i=n(4023),s=n(2534);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return s(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},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,t,n){return this._getEncoder(t).encode(e,n)}},357:(e,t,n)=>{"use strict";const r=n(2534),i=n(2382).b,s=n(9138).Buffer;function a(e,t){i.call(this,t),s.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return o.isEncoderBuffer(e)||(e=new o(e,t)),this.length+=e.length,e}),this);else if("number"===typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"===typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(a,i),t.C=a,a.isDecoderBuffer=function(e){if(e instanceof a)return!0;return"object"===typeof e&&s.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:i.prototype.save.call(this)}},a.prototype.restore=function(e){const t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new a(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=o,o.isEncoderBuffer=function(e){if(e instanceof o)return!0;return"object"===typeof e&&"EncoderBuffer"===e.constructor.name&&"number"===typeof e.length&&"function"===typeof e.join},o.prototype.join=function(e,t){return e||(e=s.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"===typeof this.value?e[t]=this.value:"string"===typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},8222:(e,t,n)=>{"use strict";const r=t;r.Reporter=n(2382).b,r.DecoderBuffer=n(357).C,r.EncoderBuffer=n(357).R,r.Node=n(2319)},2319:(e,t,n)=>{"use strict";const r=n(2382).b,i=n(357).R,s=n(357).C,a=n(2325),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"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function c(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;const d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};d.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},c.prototype._wrap=function(){const e=this._baseState;l.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(a(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),o.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(n),this}})),c.prototype.use=function(e){a(e);const t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));let r,i=n.default,a=!0,o=null;if(null!==n.key&&(o=e.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(a=this._peekTag(e,r,n.any),e.isError(a))return a}else{const r=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(l){a=!1}e.restore(r)}}if(n.obj&&a&&(r=e.enterObject()),a){if(null!==n.explicit){const t=this._decodeTag(e,n.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===n.use&&null===n.choice){let t;n.any&&(t=e.save());const r=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(r))return r;n.any?i=e.raw(t):e=r}if(t&&t.track&&null!==n.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new s(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(r,t)}}return n.obj&&a&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==o&&e.exitKey(o):e.leaveKey(o,n.key,i),i},c.prototype._decodeGeneric=function(e,t,n){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},c.prototype._decodeChoice=function(e,t){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(s){const a=e.save(),o=n.choice[s];try{const n=o._decode(e,t);if(e.isError(n))return!1;r={type:s,value:n},i=!0}catch(l){return e.restore(a),!1}return!0}),this),i?r:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,n){const r=this._baseState;if(null!==r.default&&r.default===e)return;const i=this._encodeValue(e,t,n);return void 0===i||this._skipDefault(i,t,n)?void 0:i},c.prototype._encodeValue=function(e,t,n){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new r);let s=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let a=null,o=!1;if(i.any)s=this._createEncoderBuffer(e);else if(i.choice)s=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,n)._encode(e,t),o=!0;else if(i.children)a=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");const r=t.enterKey(n._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");const i=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),i}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(n){const r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),n))}else null!==i.use?s=this._getUse(i.use,n)._encode(e,t):(a=this._encodePrimitive(i.tag,e),o=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,n=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(s=this._encodeComposite(e,o,n,a))}return null!==i.explicit&&(s=this._encodeComposite(i.explicit,!1,"context",s)),s},c.prototype._encodeChoice=function(e,t){const n=this._baseState,r=n.choice[e.type];return r||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},2382:(e,t,n)=>{"use strict";const r=n(2534);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function s(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof s},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},i.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof s;if(t=r?e:new s(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(s,Error),s.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},8266:(e,t)=>{"use strict";function n(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.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"},t.tagByName=n(t.tag)},3062:(e,t,n)=>{"use strict";const r=t;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},r.der=n(8266)},2650:(e,t,n)=>{"use strict";const r=n(2534),i=n(518),s=n(357).C,a=n(2319),o=n(8266);function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.call(this,"der",e)}function d(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=o.tagClass[n>>6],i=0===(32&n);if(31===(31&n)){let r=n;for(n=0;128===(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:o.tag[n]}}function u(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0===(128&r))return r;const i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(let s=0;s{"use strict";const r=t;r.der=n(2650),r.pem=n(6282)},6282:(e,t,n)=>{"use strict";const r=n(2534),i=n(9138).Buffer,s=n(2650);function a(e){s.call(this,e),this.enc="pem"}r(a,s),e.exports=a,a.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,l=-1;for(let i=0;i{"use strict";const r=n(2534),i=n(9138).Buffer,s=n(2319),a=n(8266);function o(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){s.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=o,o.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(l,s),l.prototype._encodeComposite=function(e,t,n,r){const s=function(e,t,n,r){let i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!==typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}if(i>=31)return r.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[n||"universal"]<<6,i}(e,t,n,this.reporter);if(r.length<128){const e=i.alloc(2);return e[0]=s,e[1]=r.length,this._createEncoderBuffer([e,r])}let o=1;for(let i=r.length;i>=256;i>>=8)o++;const l=i.alloc(2+o);l[0]=s,l[1]=128|o;for(let i=1+o,a=r.length;a>0;i--,a>>=8)l[i]=255&a;return this._createEncoderBuffer([l,r])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let i=0;i=128;t>>=7)r++}const s=i.alloc(r);let a=s.length-1;for(let i=e.length-1;i>=0;i--){let t=e[i];for(s[a--]=127&t;(t>>=7)>0;)s[a--]=128|127&t}return this._createEncoderBuffer(s)},l.prototype._encodeTime=function(e,t){let n;const r=new Date(e);return"gentime"===t?n=[c(r.getUTCFullYear()),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[c(r.getUTCFullYear()%100),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=i.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let i=e;i>=256;i>>=8)n++;const r=new Array(n);for(let i=r.length-1;i>=0;i--)r[i]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(i.from(r))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,n){const r=this._baseState;let i;if(null===r.default)return!1;const s=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),s.length!==r.defaultBuffer.length)return!1;for(i=0;i{"use strict";const r=t;r.der=n(2627),r.pem=n(8540)},8540:(e,t,n)=>{"use strict";const r=n(2534),i=n(2627);function s(e){i.call(this,e),this.enc="pem"}r(s,i),e.exports=s,s.prototype.encode=function(e,t){const n=i.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"];for(let i=0;i{"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,s=o(e),a=s[0],l=s[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),d=0,u=l>0?a-4:a;for(n=0;n>16&255,c[d++]=t>>8&255,c[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t);return c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],a=16383,o=0,c=r-i;oc?c:o+a));1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return s.join("")};for(var n=[],r=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],r[s.charCodeAt(a)]=a;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,s,a=[],o=t;o>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},518:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(6601).Buffer}catch(j){}function o(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,s=Math.min(e.length,n),a=t;a=49?o-49+10:o>=17?o-17+10:o}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"===typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===n)for(i=0,s=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=l(e,t,r)<=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,a=s%r,o=Math.min(s,s-a)+n,l=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[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],h=[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 p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,l=a/67108864|0;n.words[0]=o;for(var c=1;c>>26,u=67108863&l,h=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=h;p++){var f=c-p|0;d+=(a=(i=0|e.words[f])*(s=0|t.words[p])+u)/67108864|0,u=67108863&a}n.words[c]=0|u,l=0|d}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,a=0;a>>24-i&16777215)||a!==this.length-1?d[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,a--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],p=h[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(p).toString(e);n=(f=f.idivn(p)).isZero()?m+n:d[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.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},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return r("undefined"!==typeof a),this.toArrayLike(a,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var a,o,l="le"===t,c=new e(s),d=this.clone();if(l){for(o=0;!d.isZero();o++)a=d.andln(255),d.iushrn(8),c[o]=a;for(;o=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s>>26;for(;0!==i&&s>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;se.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==s&&a>26,this.words[a]=67108863&t;if(0===s&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],x=8191&v,w=v>>>13,k=0|a[4],S=8191&k,C=k>>>13,j=0|a[5],E=8191&j,N=j>>>13,T=0|a[6],_=8191&T,M=T>>>13,A=0|a[7],R=8191&A,I=A>>>13,D=0|a[8],B=8191&D,O=D>>>13,P=0|a[9],L=8191&P,z=P>>>13,F=0|o[0],U=8191&F,V=F>>>13,W=0|o[1],H=8191&W,K=W>>>13,Y=0|o[2],Z=8191&Y,G=Y>>>13,q=0|o[3],$=8191&q,X=q>>>13,Q=0|o[4],J=8191&Q,ee=Q>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],le=8191&oe,ce=oe>>>13,de=0|o[8],ue=8191&de,he=de>>>13,pe=0|o[9],fe=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(u,U))|0)+((8191&(i=(i=Math.imul(u,V))+Math.imul(h,U)|0))<<13)|0;c=((s=Math.imul(h,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(f,U),i=(i=Math.imul(f,V))+Math.imul(m,U)|0,s=Math.imul(m,V);var ye=(c+(r=r+Math.imul(u,H)|0)|0)+((8191&(i=(i=i+Math.imul(u,K)|0)+Math.imul(h,H)|0))<<13)|0;c=((s=s+Math.imul(h,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(b,U)|0,s=Math.imul(b,V),r=r+Math.imul(f,H)|0,i=(i=i+Math.imul(f,K)|0)+Math.imul(m,H)|0,s=s+Math.imul(m,K)|0;var be=(c+(r=r+Math.imul(u,Z)|0)|0)+((8191&(i=(i=i+Math.imul(u,G)|0)+Math.imul(h,Z)|0))<<13)|0;c=((s=s+Math.imul(h,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,V))+Math.imul(w,U)|0,s=Math.imul(w,V),r=r+Math.imul(y,H)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(b,H)|0,s=s+Math.imul(b,K)|0,r=r+Math.imul(f,Z)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(m,Z)|0,s=s+Math.imul(m,G)|0;var ve=(c+(r=r+Math.imul(u,$)|0)|0)+((8191&(i=(i=i+Math.imul(u,X)|0)+Math.imul(h,$)|0))<<13)|0;c=((s=s+Math.imul(h,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(S,U),i=(i=Math.imul(S,V))+Math.imul(C,U)|0,s=Math.imul(C,V),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(w,H)|0,s=s+Math.imul(w,K)|0,r=r+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(b,Z)|0,s=s+Math.imul(b,G)|0,r=r+Math.imul(f,$)|0,i=(i=i+Math.imul(f,X)|0)+Math.imul(m,$)|0,s=s+Math.imul(m,X)|0;var xe=(c+(r=r+Math.imul(u,J)|0)|0)+((8191&(i=(i=i+Math.imul(u,ee)|0)+Math.imul(h,J)|0))<<13)|0;c=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,V))+Math.imul(N,U)|0,s=Math.imul(N,V),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(C,H)|0,s=s+Math.imul(C,K)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(w,Z)|0,s=s+Math.imul(w,G)|0,r=r+Math.imul(y,$)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,$)|0,s=s+Math.imul(b,X)|0,r=r+Math.imul(f,J)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,ee)|0;var we=(c+(r=r+Math.imul(u,ne)|0)|0)+((8191&(i=(i=i+Math.imul(u,re)|0)+Math.imul(h,ne)|0))<<13)|0;c=((s=s+Math.imul(h,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(_,U),i=(i=Math.imul(_,V))+Math.imul(M,U)|0,s=Math.imul(M,V),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(N,H)|0,s=s+Math.imul(N,K)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(C,Z)|0,s=s+Math.imul(C,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(w,$)|0,s=s+Math.imul(w,X)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var ke=(c+(r=r+Math.imul(u,se)|0)|0)+((8191&(i=(i=i+Math.imul(u,ae)|0)+Math.imul(h,se)|0))<<13)|0;c=((s=s+Math.imul(h,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,V))+Math.imul(I,U)|0,s=Math.imul(I,V),r=r+Math.imul(_,H)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(M,H)|0,s=s+Math.imul(M,K)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(N,Z)|0,s=s+Math.imul(N,G)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(C,$)|0,s=s+Math.imul(C,X)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var Se=(c+(r=r+Math.imul(u,le)|0)|0)+((8191&(i=(i=i+Math.imul(u,ce)|0)+Math.imul(h,le)|0))<<13)|0;c=((s=s+Math.imul(h,ce)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(O,U)|0,s=Math.imul(O,V),r=r+Math.imul(R,H)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(I,H)|0,s=s+Math.imul(I,K)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(M,Z)|0,s=s+Math.imul(M,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(N,$)|0,s=s+Math.imul(N,X)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(C,J)|0,s=s+Math.imul(C,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(w,ne)|0,s=s+Math.imul(w,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,ae)|0,r=r+Math.imul(f,le)|0,i=(i=i+Math.imul(f,ce)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ce)|0;var Ce=(c+(r=r+Math.imul(u,ue)|0)|0)+((8191&(i=(i=i+Math.imul(u,he)|0)+Math.imul(h,ue)|0))<<13)|0;c=((s=s+Math.imul(h,he)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(L,U),i=(i=Math.imul(L,V))+Math.imul(z,U)|0,s=Math.imul(z,V),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(O,H)|0,s=s+Math.imul(O,K)|0,r=r+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(I,Z)|0,s=s+Math.imul(I,G)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(M,$)|0,s=s+Math.imul(M,X)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(N,J)|0,s=s+Math.imul(N,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(C,ne)|0,s=s+Math.imul(C,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,ae)|0,r=r+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(b,le)|0,s=s+Math.imul(b,ce)|0,r=r+Math.imul(f,ue)|0,i=(i=i+Math.imul(f,he)|0)+Math.imul(m,ue)|0,s=s+Math.imul(m,he)|0;var je=(c+(r=r+Math.imul(u,fe)|0)|0)+((8191&(i=(i=i+Math.imul(u,me)|0)+Math.imul(h,fe)|0))<<13)|0;c=((s=s+Math.imul(h,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,H),i=(i=Math.imul(L,K))+Math.imul(z,H)|0,s=Math.imul(z,K),r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,Z)|0,s=s+Math.imul(O,G)|0,r=r+Math.imul(R,$)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(I,$)|0,s=s+Math.imul(I,X)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(N,ne)|0,s=s+Math.imul(N,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(C,se)|0,s=s+Math.imul(C,ae)|0,r=r+Math.imul(x,le)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(w,le)|0,s=s+Math.imul(w,ce)|0,r=r+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(b,ue)|0,s=s+Math.imul(b,he)|0;var Ee=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;c=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,Z),i=(i=Math.imul(L,G))+Math.imul(z,Z)|0,s=Math.imul(z,G),r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(O,$)|0,s=s+Math.imul(O,X)|0,r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(I,J)|0,s=s+Math.imul(I,ee)|0,r=r+Math.imul(_,ne)|0,i=(i=i+Math.imul(_,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(N,se)|0,s=s+Math.imul(N,ae)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(C,le)|0,s=s+Math.imul(C,ce)|0,r=r+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(w,ue)|0,s=s+Math.imul(w,he)|0;var Ne=(c+(r=r+Math.imul(y,fe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,fe)|0))<<13)|0;c=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,$),i=(i=Math.imul(L,X))+Math.imul(z,$)|0,s=Math.imul(z,X),r=r+Math.imul(B,J)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(I,ne)|0,s=s+Math.imul(I,re)|0,r=r+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,ae)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(N,le)|0,s=s+Math.imul(N,ce)|0,r=r+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(C,ue)|0,s=s+Math.imul(C,he)|0;var Te=(c+(r=r+Math.imul(x,fe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(w,fe)|0))<<13)|0;c=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,ee))+Math.imul(z,J)|0,s=Math.imul(z,ee),r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(I,se)|0,s=s+Math.imul(I,ae)|0,r=r+Math.imul(_,le)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,ce)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(N,ue)|0,s=s+Math.imul(N,he)|0;var _e=(c+(r=r+Math.imul(S,fe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(C,fe)|0))<<13)|0;c=((s=s+Math.imul(C,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,ne),i=(i=Math.imul(L,re))+Math.imul(z,ne)|0,s=Math.imul(z,re),r=r+Math.imul(B,se)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(R,le)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(I,le)|0,s=s+Math.imul(I,ce)|0,r=r+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(M,ue)|0,s=s+Math.imul(M,he)|0;var Me=(c+(r=r+Math.imul(E,fe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(N,fe)|0))<<13)|0;c=((s=s+Math.imul(N,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,se),i=(i=Math.imul(L,ae))+Math.imul(z,se)|0,s=Math.imul(z,ae),r=r+Math.imul(B,le)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,le)|0,s=s+Math.imul(O,ce)|0,r=r+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(I,ue)|0,s=s+Math.imul(I,he)|0;var Ae=(c+(r=r+Math.imul(_,fe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(M,fe)|0))<<13)|0;c=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,le),i=(i=Math.imul(L,ce))+Math.imul(z,le)|0,s=Math.imul(z,ce),r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,he)|0)+Math.imul(O,ue)|0,s=s+Math.imul(O,he)|0;var Re=(c+(r=r+Math.imul(R,fe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(I,fe)|0))<<13)|0;c=((s=s+Math.imul(I,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,ue),i=(i=Math.imul(L,he))+Math.imul(z,ue)|0,s=Math.imul(z,he);var Ie=(c+(r=r+Math.imul(B,fe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(O,fe)|0))<<13)|0;c=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var De=(c+(r=Math.imul(L,fe))|0)+((8191&(i=(i=Math.imul(L,me))+Math.imul(z,fe)|0))<<13)|0;return c=((s=Math.imul(z,me))+(i>>>13)|0)+(De>>>26)|0,De&=67108863,l[0]=ge,l[1]=ye,l[2]=be,l[3]=ve,l[4]=xe,l[5]=we,l[6]=ke,l[7]=Se,l[8]=Ce,l[9]=je,l[10]=Ee,l[11]=Ne,l[12]=Te,l[13]=_e,l[14]=Me,l[15]=Ae,l[16]=Re,l[17]=Ie,l[18]=De,0!==c&&(l[19]=c,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=p),s.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?p(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s>>26)|0)>>>26,a&=67108863}n.words[s]=o,r=a,a=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,e,t):m(this,e,t),n},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r>=1;return r},g.prototype.permute=function(e,t,n,r,i,s){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&s,s>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=s>>>26,this.words[n]=67108863&s}return 0!==t&&(this.words[n]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<a)for(this.length-=a,c=0;c=0&&(0!==d||c>=i);c--){var u=0|this.words[c];this.words[c]=d<<26-s|u>>>s,d=u&o}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.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 t=0;t>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i>26,this.words[i+n]=67108863&s;if(0===o)return this.strip();for(r(-1===o),o=0,i=0;i>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var o,l=r.length-i.length;if("mod"!==t){(o=new s(null)).length=l+1,o.words=new Array(o.length);for(var c=0;c=0;u--){var h=67108864*(0|r.words[i.length+u])+(0|r.words[i.length+u-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,u);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,u),r.isZero()||(r.negative^=1);o&&(o.words[u]=h)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,o},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(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 n},s.prototype.idivn=function(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()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),a=new s(0),o=new s(0),l=new s(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var d=n.clone(),u=t.clone();!t.isZero();){for(var h=0,p=1;0===(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(u)),i.iushrn(1),a.iushrn(1);for(var f=0,m=1;0===(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(d),l.isub(u)),o.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o),a.isub(l)):(n.isub(t),o.isub(i),l.isub(a))}return{a:o,b:l,gcd:n.iushln(c)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new s(1),o=new s(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,d=1;0===(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var u=0,h=1;0===(n.words[0]&h)&&u<26;++u,h<<=1);if(u>0)for(n.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(o)):(n.isub(t),o.isub(a))}return(i=0===t.cmpn(1)?a:o).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0===(1&this.words[0])},s.prototype.isOdd=function(){return 1===(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new S(e)},s.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)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}b.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(v,b),v.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,s=a}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new x;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return y[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var o=new s(1).toRed(this),l=o.redNeg(),c=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);0!==this.pow(d,c).cmp(l);)d.redIAdd(l);for(var u=this.pow(d,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),f=a;0!==p.cmp(o);){for(var m=p,g=0;0!==m.cmp(o);g++)m=m.redSqr();r(g=0;r--){for(var c=t.words[r],d=l-1;d>=0;d--){var u=c>>d&1;i!==n[0]&&(i=this.sqr(i)),0!==u||0!==a?(a<<=1,a|=u,(4===++o||0===r&&0===d)&&(i=this.mul(i,n[a]),o=0,a=0)):o=0}l=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new C(e)},i(C,S),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},6084:(e,t,n)=>{var r;function i(e){this.rand=e}if(e.exports=function(e){return r||(r=new i(null)),r.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n{var r=n(2543).Buffer;function i(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,n=new Array(t),i=0;i>>24]^d[f>>>16&255]^u[m>>>8&255]^h[255&g]^t[y++],a=c[f>>>24]^d[m>>>16&255]^u[g>>>8&255]^h[255&p]^t[y++],o=c[m>>>24]^d[g>>>16&255]^u[p>>>8&255]^h[255&f]^t[y++],l=c[g>>>24]^d[p>>>16&255]^u[f>>>8&255]^h[255&m]^t[y++],p=s,f=a,m=o,g=l;return s=(r[p>>>24]<<24|r[f>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[y++],a=(r[f>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&p])^t[y++],o=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[p>>>8&255]<<8|r[255&f])^t[y++],l=(r[g>>>24]<<24|r[p>>>16&255]<<16|r[f>>>8&255]<<8|r[255&m])^t[y++],[s>>>=0,a>>>=0,o>>>=0,l>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],s=[[],[],[],[]],a=0,o=0,l=0;l<256;++l){var c=o^o<<1^o<<2^o<<3^o<<4;c=c>>>8^255&c^99,n[a]=c,r[c]=a;var d=e[a],u=e[d],h=e[u],p=257*e[c]^16843008*c;i[0][a]=p<<24|p>>>8,i[1][a]=p<<16|p>>>16,i[2][a]=p<<8|p>>>24,i[3][a]=p,p=16843009*h^65537*u^257*d^16843008*a,s[0][c]=p<<24|p>>>8,s[1][c]=p<<16|p>>>16,s[2][c]=p<<8|p>>>24,s[3][c]=p,0===a?a=o=1:(a=d^e[e[e[h^d]]],o^=e[e[o]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:s}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],s=0;s>>24,a=l.SBOX[a>>>24]<<24|l.SBOX[a>>>16&255]<<16|l.SBOX[a>>>8&255]<<8|l.SBOX[255&a],a^=o[s/t|0]<<24):t>6&&s%t===4&&(a=l.SBOX[a>>>24]<<24|l.SBOX[a>>>16&255]<<16|l.SBOX[a>>>8&255]<<8|l.SBOX[255&a]),i[s]=i[s-t]^a}for(var c=[],d=0;d>>24]]^l.INV_SUB_MIX[1][l.SBOX[h>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[h>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&h]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=a(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),s=r.allocUnsafe(16);return s.writeUInt32BE(n[0],0),s.writeUInt32BE(n[3],4),s.writeUInt32BE(n[2],8),s.writeUInt32BE(n[1],12),s},c.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},e.exports.AES=c},3560:(e,t,n)=>{var r=n(9915),i=n(2543).Buffer,s=n(2221),a=n(2534),o=n(5283),l=n(5865),c=n(8387);function d(e,t,n,a){s.call(this);var l=i.alloc(4,0);this._cipher=new r.AES(t);var d=this._cipher.encryptBlock(l);this._ghash=new o(d),n=function(e,t,n){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var r=new o(n),s=t.length,a=s%16;r.update(t),a&&(a=16-a,r.update(i.alloc(a,0))),r.update(i.alloc(8,0));var l=8*s,d=i.alloc(8);d.writeUIntBE(l,0,8),r.update(d),e._finID=r.state;var u=i.from(e._finID);return c(u),u}(this,n,d),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(d,s),d.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},d.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i{var r=n(5270),i=n(5194),s=n(4946);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(s)}},5194:(e,t,n)=>{var r=n(3560),i=n(2543).Buffer,s=n(8172),a=n(2776),o=n(2221),l=n(9915),c=n(8462);function d(e,t,n){o.call(this),this._cache=new u,this._last=void 0,this._cipher=new l.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function u(){this.cache=i.allocUnsafe(0)}function h(e,t,n){var o=s[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"===typeof n&&(n=i.from(n)),"GCM"!==o.mode&&n.length!==o.iv)throw new TypeError("invalid iv length "+n.length);if("string"===typeof t&&(t=i.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===o.type?new a(o.module,t,n,!0):"auth"===o.type?new r(o.module,t,n,!0):new d(o.module,t,n)}n(2534)(d,o),d.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return i.concat(r)},d.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var n=-1;for(;++n16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},u.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=s[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=c(t,!1,n.key,n.iv);return h(e,r.key,r.iv)},t.createDecipheriv=h},5270:(e,t,n)=>{var r=n(8172),i=n(3560),s=n(2543).Buffer,a=n(2776),o=n(2221),l=n(9915),c=n(8462);function d(e,t,n){o.call(this),this._cache=new h,this._cipher=new l.AES(t),this._prev=s.from(n),this._mode=e,this._autopadding=!0}n(2534)(d,o),d.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return s.concat(r)};var u=s.alloc(16,16);function h(){this.cache=s.allocUnsafe(0)}function p(e,t,n){var o=r[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"===typeof t&&(t=s.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"===typeof n&&(n=s.from(n)),"GCM"!==o.mode&&n.length!==o.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===o.type?new a(o.module,t,n):"auth"===o.type?new i(o.module,t,n):new d(o.module,t,n)}d.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(u))throw this._cipher.scrub(),new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=s.concat([this.cache,e])},h.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},h.prototype.flush=function(){for(var e=16-this.cache.length,t=s.allocUnsafe(e),n=-1;++n{var r=n(2543).Buffer,i=r.alloc(16,0);function s(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=s(i)},a.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(s([0,e,0,t])),this.state},e.exports=a},8387:e=>{e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},694:(e,t,n)=>{var r=n(5865);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},3492:(e,t,n)=>{var r=n(2543).Buffer,i=n(5865);function s(e,t,n){var s=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(s),e._prev=r.concat([e._prev,n?t:a]),a}t.encrypt=function(e,t,n){for(var i,a=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){a=r.concat([a,s(e,t,n)]);break}i=e._cache.length,a=r.concat([a,s(e,t.slice(0,i),n)]),t=t.slice(i)}return a}},1400:(e,t,n)=>{var r=n(2543).Buffer;function i(e,t,n){for(var r,i,a=-1,o=0;++a<8;)r=t&1<<7-a?128:0,o+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>a%8,e._prev=s(e._prev,n?r:i);return o}function s(e,t){var n=e.length,i=-1,s=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i>7;return s}t.encrypt=function(e,t,n){for(var s=t.length,a=r.allocUnsafe(s),o=-1;++o{var r=n(2543).Buffer;function i(e,t,n){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:i])]),i}t.encrypt=function(e,t,n){for(var s=t.length,a=r.allocUnsafe(s),o=-1;++o{var r=n(5865),i=n(2543).Buffer,s=n(8387);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return s(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),s=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var o=0;o{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},8172:(e,t,n)=>{var r={ECB:n(4097),CBC:n(694),CFB:n(3492),CFB8:n(8681),CFB1:n(1400),OFB:n(1746),CTR:n(9347),GCM:n(9347)},i=n(4946);for(var s in i)i[s].module=r[i[s].mode];e.exports=i},1746:(e,t,n)=>{var r=n(5865);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{var r=n(9915),i=n(2543).Buffer,s=n(2221);function a(e,t,n,a){s.call(this),this._cipher=new r.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}n(2534)(a,s),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},9161:(e,t,n)=>{var r=n(7788),i=n(3525),s=n(8172),a=n(7282),o=n(8462);function l(e,t,n){if(e=e.toLowerCase(),s[e])return i.createCipheriv(e,t,n);if(a[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function c(e,t,n){if(e=e.toLowerCase(),s[e])return i.createDecipheriv(e,t,n);if(a[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");n=8*a[e].key,r=a[e].iv}var i=o(t,!1,n,r);return l(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=l,t.createDecipher=t.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");n=8*a[e].key,r=a[e].iv}var i=o(t,!1,n,r);return c(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},7788:(e,t,n)=>{var r=n(2221),i=n(7439),s=n(2534),a=n(2543).Buffer,o={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function l(e){r.call(this);var t,n=e.mode.toLowerCase(),i=o[n];t=e.decrypt?"decrypt":"encrypt";var s=e.key;a.isBuffer(s)||(s=a.from(s)),"des-ede"!==n&&"des-ede-cbc"!==n||(s=a.concat([s,s.slice(0,8)]));var l=e.iv;a.isBuffer(l)||(l=a.from(l)),this._des=i.create({key:s,iv:l,type:t})}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],e.exports=l,s(l,r),l.prototype._update=function(e){return a.from(this._des.update(e))},l.prototype._final=function(){return a.from(this._des.final())}},7282:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},1330:(e,t,n)=>{var r=n(5987),i=n(2525);function s(e){var t,n=e.modulus.byteLength();do{t=new r(i(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var n=function(e){var t=s(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),i=t.modulus.byteLength(),a=new r(e).mul(n.blinder).umod(t.modulus),o=a.toRed(r.mont(t.prime1)),l=a.toRed(r.mont(t.prime2)),c=t.coefficient,d=t.prime1,u=t.prime2,h=o.redPow(t.exponent1).fromRed(),p=l.redPow(t.exponent2).fromRed(),f=h.isub(p).imul(c).umod(d).imul(u);return p.iadd(f).imul(n.unblinder).umod(t.modulus).toArrayLike(Buffer,"be",i)}a.getr=s,e.exports=a},5987:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(1922).Buffer}catch(T){}function o(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function l(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}function c(e,t,n,i){for(var s=0,a=0,o=Math.min(e.length,n),l=t;l=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===n)for(i=0,s=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=l(e,t,r)<=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,a=s%r,o=Math.min(s,s-a)+n,l=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(T){s.prototype.inspect=u}else s.prototype.inspect=u;function u(){return(this.red?""}var h=["","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"],p=[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],f=[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];s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==s||a!==this.length-1?h[6-l.length]+l+n:l+n}for(0!==s&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=p[e],d=f[e];n="";var u=this.clone();for(u.negative=0;!u.isZero();){var m=u.modrn(d).toString(e);n=(u=u.idivn(d)).isZero()?m+n:h[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.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},s.prototype.toJSON=function(){return this.toString(16,2)},a&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,l=a/67108864|0;n.words[0]=o;for(var c=1;c>>26,u=67108863&l,h=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=h;p++){var f=c-p|0;d+=(a=(i=0|e.words[f])*(s=0|t.words[p])+u)/67108864|0,u=67108863&a}n.words[c]=0|u,l=0|d}return 0!==l?n.words[c]=0|l:n.length--,n._strip()}s.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},s.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i>8&255),n>16&255),6===s?(n>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===s?(n>=0&&(e[n--]=a>>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s>>26;for(;0!==i&&s>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;se.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==s&&a>26,this.words[a]=67108863&t;if(0===s&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],x=8191&v,w=v>>>13,k=0|a[4],S=8191&k,C=k>>>13,j=0|a[5],E=8191&j,N=j>>>13,T=0|a[6],_=8191&T,M=T>>>13,A=0|a[7],R=8191&A,I=A>>>13,D=0|a[8],B=8191&D,O=D>>>13,P=0|a[9],L=8191&P,z=P>>>13,F=0|o[0],U=8191&F,V=F>>>13,W=0|o[1],H=8191&W,K=W>>>13,Y=0|o[2],Z=8191&Y,G=Y>>>13,q=0|o[3],$=8191&q,X=q>>>13,Q=0|o[4],J=8191&Q,ee=Q>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],le=8191&oe,ce=oe>>>13,de=0|o[8],ue=8191&de,he=de>>>13,pe=0|o[9],fe=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(u,U))|0)+((8191&(i=(i=Math.imul(u,V))+Math.imul(h,U)|0))<<13)|0;c=((s=Math.imul(h,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(f,U),i=(i=Math.imul(f,V))+Math.imul(m,U)|0,s=Math.imul(m,V);var ye=(c+(r=r+Math.imul(u,H)|0)|0)+((8191&(i=(i=i+Math.imul(u,K)|0)+Math.imul(h,H)|0))<<13)|0;c=((s=s+Math.imul(h,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(b,U)|0,s=Math.imul(b,V),r=r+Math.imul(f,H)|0,i=(i=i+Math.imul(f,K)|0)+Math.imul(m,H)|0,s=s+Math.imul(m,K)|0;var be=(c+(r=r+Math.imul(u,Z)|0)|0)+((8191&(i=(i=i+Math.imul(u,G)|0)+Math.imul(h,Z)|0))<<13)|0;c=((s=s+Math.imul(h,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,V))+Math.imul(w,U)|0,s=Math.imul(w,V),r=r+Math.imul(y,H)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(b,H)|0,s=s+Math.imul(b,K)|0,r=r+Math.imul(f,Z)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(m,Z)|0,s=s+Math.imul(m,G)|0;var ve=(c+(r=r+Math.imul(u,$)|0)|0)+((8191&(i=(i=i+Math.imul(u,X)|0)+Math.imul(h,$)|0))<<13)|0;c=((s=s+Math.imul(h,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(S,U),i=(i=Math.imul(S,V))+Math.imul(C,U)|0,s=Math.imul(C,V),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(w,H)|0,s=s+Math.imul(w,K)|0,r=r+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(b,Z)|0,s=s+Math.imul(b,G)|0,r=r+Math.imul(f,$)|0,i=(i=i+Math.imul(f,X)|0)+Math.imul(m,$)|0,s=s+Math.imul(m,X)|0;var xe=(c+(r=r+Math.imul(u,J)|0)|0)+((8191&(i=(i=i+Math.imul(u,ee)|0)+Math.imul(h,J)|0))<<13)|0;c=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,V))+Math.imul(N,U)|0,s=Math.imul(N,V),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(C,H)|0,s=s+Math.imul(C,K)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(w,Z)|0,s=s+Math.imul(w,G)|0,r=r+Math.imul(y,$)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,$)|0,s=s+Math.imul(b,X)|0,r=r+Math.imul(f,J)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,ee)|0;var we=(c+(r=r+Math.imul(u,ne)|0)|0)+((8191&(i=(i=i+Math.imul(u,re)|0)+Math.imul(h,ne)|0))<<13)|0;c=((s=s+Math.imul(h,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(_,U),i=(i=Math.imul(_,V))+Math.imul(M,U)|0,s=Math.imul(M,V),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(N,H)|0,s=s+Math.imul(N,K)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(C,Z)|0,s=s+Math.imul(C,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(w,$)|0,s=s+Math.imul(w,X)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var ke=(c+(r=r+Math.imul(u,se)|0)|0)+((8191&(i=(i=i+Math.imul(u,ae)|0)+Math.imul(h,se)|0))<<13)|0;c=((s=s+Math.imul(h,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,V))+Math.imul(I,U)|0,s=Math.imul(I,V),r=r+Math.imul(_,H)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(M,H)|0,s=s+Math.imul(M,K)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(N,Z)|0,s=s+Math.imul(N,G)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(C,$)|0,s=s+Math.imul(C,X)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var Se=(c+(r=r+Math.imul(u,le)|0)|0)+((8191&(i=(i=i+Math.imul(u,ce)|0)+Math.imul(h,le)|0))<<13)|0;c=((s=s+Math.imul(h,ce)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(O,U)|0,s=Math.imul(O,V),r=r+Math.imul(R,H)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(I,H)|0,s=s+Math.imul(I,K)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(M,Z)|0,s=s+Math.imul(M,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(N,$)|0,s=s+Math.imul(N,X)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(C,J)|0,s=s+Math.imul(C,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(w,ne)|0,s=s+Math.imul(w,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,ae)|0,r=r+Math.imul(f,le)|0,i=(i=i+Math.imul(f,ce)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ce)|0;var Ce=(c+(r=r+Math.imul(u,ue)|0)|0)+((8191&(i=(i=i+Math.imul(u,he)|0)+Math.imul(h,ue)|0))<<13)|0;c=((s=s+Math.imul(h,he)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(L,U),i=(i=Math.imul(L,V))+Math.imul(z,U)|0,s=Math.imul(z,V),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(O,H)|0,s=s+Math.imul(O,K)|0,r=r+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(I,Z)|0,s=s+Math.imul(I,G)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(M,$)|0,s=s+Math.imul(M,X)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(N,J)|0,s=s+Math.imul(N,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(C,ne)|0,s=s+Math.imul(C,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,ae)|0,r=r+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(b,le)|0,s=s+Math.imul(b,ce)|0,r=r+Math.imul(f,ue)|0,i=(i=i+Math.imul(f,he)|0)+Math.imul(m,ue)|0,s=s+Math.imul(m,he)|0;var je=(c+(r=r+Math.imul(u,fe)|0)|0)+((8191&(i=(i=i+Math.imul(u,me)|0)+Math.imul(h,fe)|0))<<13)|0;c=((s=s+Math.imul(h,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,H),i=(i=Math.imul(L,K))+Math.imul(z,H)|0,s=Math.imul(z,K),r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,Z)|0,s=s+Math.imul(O,G)|0,r=r+Math.imul(R,$)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(I,$)|0,s=s+Math.imul(I,X)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(N,ne)|0,s=s+Math.imul(N,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(C,se)|0,s=s+Math.imul(C,ae)|0,r=r+Math.imul(x,le)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(w,le)|0,s=s+Math.imul(w,ce)|0,r=r+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(b,ue)|0,s=s+Math.imul(b,he)|0;var Ee=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;c=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,Z),i=(i=Math.imul(L,G))+Math.imul(z,Z)|0,s=Math.imul(z,G),r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(O,$)|0,s=s+Math.imul(O,X)|0,r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(I,J)|0,s=s+Math.imul(I,ee)|0,r=r+Math.imul(_,ne)|0,i=(i=i+Math.imul(_,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(N,se)|0,s=s+Math.imul(N,ae)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(C,le)|0,s=s+Math.imul(C,ce)|0,r=r+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(w,ue)|0,s=s+Math.imul(w,he)|0;var Ne=(c+(r=r+Math.imul(y,fe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,fe)|0))<<13)|0;c=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,$),i=(i=Math.imul(L,X))+Math.imul(z,$)|0,s=Math.imul(z,X),r=r+Math.imul(B,J)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(I,ne)|0,s=s+Math.imul(I,re)|0,r=r+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,ae)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(N,le)|0,s=s+Math.imul(N,ce)|0,r=r+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(C,ue)|0,s=s+Math.imul(C,he)|0;var Te=(c+(r=r+Math.imul(x,fe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(w,fe)|0))<<13)|0;c=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,ee))+Math.imul(z,J)|0,s=Math.imul(z,ee),r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(I,se)|0,s=s+Math.imul(I,ae)|0,r=r+Math.imul(_,le)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,ce)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(N,ue)|0,s=s+Math.imul(N,he)|0;var _e=(c+(r=r+Math.imul(S,fe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(C,fe)|0))<<13)|0;c=((s=s+Math.imul(C,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,ne),i=(i=Math.imul(L,re))+Math.imul(z,ne)|0,s=Math.imul(z,re),r=r+Math.imul(B,se)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(R,le)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(I,le)|0,s=s+Math.imul(I,ce)|0,r=r+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(M,ue)|0,s=s+Math.imul(M,he)|0;var Me=(c+(r=r+Math.imul(E,fe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(N,fe)|0))<<13)|0;c=((s=s+Math.imul(N,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,se),i=(i=Math.imul(L,ae))+Math.imul(z,se)|0,s=Math.imul(z,ae),r=r+Math.imul(B,le)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,le)|0,s=s+Math.imul(O,ce)|0,r=r+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(I,ue)|0,s=s+Math.imul(I,he)|0;var Ae=(c+(r=r+Math.imul(_,fe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(M,fe)|0))<<13)|0;c=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,le),i=(i=Math.imul(L,ce))+Math.imul(z,le)|0,s=Math.imul(z,ce),r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,he)|0)+Math.imul(O,ue)|0,s=s+Math.imul(O,he)|0;var Re=(c+(r=r+Math.imul(R,fe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(I,fe)|0))<<13)|0;c=((s=s+Math.imul(I,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,ue),i=(i=Math.imul(L,he))+Math.imul(z,ue)|0,s=Math.imul(z,he);var Ie=(c+(r=r+Math.imul(B,fe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(O,fe)|0))<<13)|0;c=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var De=(c+(r=Math.imul(L,fe))|0)+((8191&(i=(i=Math.imul(L,me))+Math.imul(z,fe)|0))<<13)|0;return c=((s=Math.imul(z,me))+(i>>>13)|0)+(De>>>26)|0,De&=67108863,l[0]=ge,l[1]=ye,l[2]=be,l[3]=ve,l[4]=xe,l[5]=we,l[6]=ke,l[7]=Se,l[8]=Ce,l[9]=je,l[10]=Ee,l[11]=Ne,l[12]=Te,l[13]=_e,l[14]=Me,l[15]=Ae,l[16]=Re,l[17]=Ie,l[18]=De,0!==c&&(l[19]=c,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s>>26)|0)>>>26,a&=67108863}n.words[s]=o,r=a,a=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function b(e,t,n){return y(e,t,n)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=m),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?y(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,n,r,i,s){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&s,s>>>=13;for(a=2*t;a>=26,n+=s/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i&1}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<a)for(this.length-=a,c=0;c=0&&(0!==d||c>=i);c--){var u=0|this.words[c];this.words[c]=d<<26-s|u>>>s,d=u&o}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.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 t=0;t>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i>26,this.words[i+n]=67108863&s;if(0===o)return this._strip();for(r(-1===o),o=0,i=0;i>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var o,l=r.length-i.length;if("mod"!==t){(o=new s(null)).length=l+1,o.words=new Array(o.length);for(var c=0;c=0;u--){var h=67108864*(0|r.words[i.length+u])+(0|r.words[i.length+u-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,u);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,u),r.isZero()||(r.negative^=1);o&&(o.words[u]=h)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,o},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/e|0,n=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),a=new s(0),o=new s(0),l=new s(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var d=n.clone(),u=t.clone();!t.isZero();){for(var h=0,p=1;0===(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(u)),i.iushrn(1),a.iushrn(1);for(var f=0,m=1;0===(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(d),l.isub(u)),o.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o),a.isub(l)):(n.isub(t),o.isub(i),l.isub(a))}return{a:o,b:l,gcd:n.iushln(c)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new s(1),o=new s(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,d=1;0===(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var u=0,h=1;0===(n.words[0]&h)&&u<26;++u,h<<=1);if(u>0)for(n.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(o)):(n.isub(t),o.isub(a))}return(i=0===t.cmpn(1)?a:o).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0===(1&this.words[0])},s.prototype.isOdd=function(){return 1===(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new E(e)},s.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)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var x={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function j(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(k,w),k.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,s=a}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(x[e])return x[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new S;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new j}return x[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(d(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var o=new s(1).toRed(this),l=o.redNeg(),c=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);0!==this.pow(d,c).cmp(l);)d.redIAdd(l);for(var u=this.pow(d,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),f=a;0!==p.cmp(o);){for(var m=p,g=0;0!==m.cmp(o);g++)m=m.redSqr();r(g=0;r--){for(var c=t.words[r],d=l-1;d>=0;d--){var u=c>>d&1;i!==n[0]&&(i=this.sqr(i)),0!==u||0!==a?(a<<=1,a|=u,(4===++o||0===r&&0===d)&&(i=this.mul(i,n[a]),o=0,a=0)):o=0}l=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new N(e)},i(N,E),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},N.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},7050:(e,t,n)=>{e.exports=n(5207)},7834:(e,t,n)=>{var r=n(2543).Buffer,i=n(3569),s=n(723),a=n(2534),o=n(5908),l=n(1666),c=n(5207);function d(e){s.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){s.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new d(e)}function p(e){return new u(e)}Object.keys(c).forEach((function(e){c[e].id=r.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(d,s.Writable),d.prototype._write=function(e,t,n){this._hash.update(e),n()},d.prototype.update=function(e,t){return"string"===typeof e&&(e=r.from(e,t)),this._hash.update(e),this},d.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=o(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},a(u,s.Writable),u.prototype._write=function(e,t,n){this._hash.update(e),n()},u.prototype.update=function(e,t){return"string"===typeof e&&(e=r.from(e,t)),this._hash.update(e),this},u.prototype.verify=function(e,t,n){"string"===typeof t&&(t=r.from(t,n)),this.end();var i=this._hash.digest();return l(t,i,e,this._signType,this._tag)},e.exports={Sign:h,Verify:p,createSign:h,createVerify:p}},5908:(e,t,n)=>{var r=n(2543).Buffer,i=n(7651),s=n(1330),a=n(6289).ec,o=n(2699),l=n(7510),c=n(1308);function d(e,t,n,s){if((e=r.from(e.toArray())).length0&&n.ishrn(r),n}function h(e,t,n){var s,a;do{for(s=r.alloc(0);8*s.length{var r=n(2543).Buffer,i=n(2699),s=n(6289).ec,a=n(7510),o=n(1308);function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,n,c,d){var u=a(n);if("ec"===u.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,n){var r=o[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new s(r),a=n.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,u)}if("dsa"===u.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,n){var r=n.data.p,s=n.data.q,o=n.data.g,c=n.data.pub_key,d=a.signature.decode(e,"der"),u=d.s,h=d.r;l(u,s),l(h,s);var p=i.mont(r),f=u.invm(s),m=o.toRed(p).redPow(new i(t).mul(f).mod(s)).fromRed().mul(c.toRed(p).redPow(h.mul(f).mod(s)).fromRed()).mod(r).mod(s);return 0===m.cmp(h)}(e,t,u)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=r.concat([d,t]);for(var h=u.modulus.byteLength(),p=[1],f=0;t.length+p.length+2=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function l(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}function c(e,t,n,i){for(var s=0,a=0,o=Math.min(e.length,n),l=t;l=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===n)for(i=0,s=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=l(e,t,r)<=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,a=s%r,o=Math.min(s,s-a)+n,l=0,d=n;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(T){s.prototype.inspect=u}else s.prototype.inspect=u;function u(){return(this.red?""}var h=["","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"],p=[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],f=[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];s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==s||a!==this.length-1?h[6-l.length]+l+n:l+n}for(0!==s&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=p[e],d=f[e];n="";var u=this.clone();for(u.negative=0;!u.isZero();){var m=u.modrn(d).toString(e);n=(u=u.idivn(d)).isZero()?m+n:h[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.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},s.prototype.toJSON=function(){return this.toString(16,2)},a&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,l=a/67108864|0;n.words[0]=o;for(var c=1;c>>26,u=67108863&l,h=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=h;p++){var f=c-p|0;d+=(a=(i=0|e.words[f])*(s=0|t.words[p])+u)/67108864|0,u=67108863&a}n.words[c]=0|u,l=0|d}return 0!==l?n.words[c]=0|l:n.length--,n._strip()}s.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},s.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i>8&255),n>16&255),6===s?(n>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===s?(n>=0&&(e[n--]=a>>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s>>26;for(;0!==i&&s>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;se.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==s&&a>26,this.words[a]=67108863&t;if(0===s&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],x=8191&v,w=v>>>13,k=0|a[4],S=8191&k,C=k>>>13,j=0|a[5],E=8191&j,N=j>>>13,T=0|a[6],_=8191&T,M=T>>>13,A=0|a[7],R=8191&A,I=A>>>13,D=0|a[8],B=8191&D,O=D>>>13,P=0|a[9],L=8191&P,z=P>>>13,F=0|o[0],U=8191&F,V=F>>>13,W=0|o[1],H=8191&W,K=W>>>13,Y=0|o[2],Z=8191&Y,G=Y>>>13,q=0|o[3],$=8191&q,X=q>>>13,Q=0|o[4],J=8191&Q,ee=Q>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],le=8191&oe,ce=oe>>>13,de=0|o[8],ue=8191&de,he=de>>>13,pe=0|o[9],fe=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(u,U))|0)+((8191&(i=(i=Math.imul(u,V))+Math.imul(h,U)|0))<<13)|0;c=((s=Math.imul(h,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(f,U),i=(i=Math.imul(f,V))+Math.imul(m,U)|0,s=Math.imul(m,V);var ye=(c+(r=r+Math.imul(u,H)|0)|0)+((8191&(i=(i=i+Math.imul(u,K)|0)+Math.imul(h,H)|0))<<13)|0;c=((s=s+Math.imul(h,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(b,U)|0,s=Math.imul(b,V),r=r+Math.imul(f,H)|0,i=(i=i+Math.imul(f,K)|0)+Math.imul(m,H)|0,s=s+Math.imul(m,K)|0;var be=(c+(r=r+Math.imul(u,Z)|0)|0)+((8191&(i=(i=i+Math.imul(u,G)|0)+Math.imul(h,Z)|0))<<13)|0;c=((s=s+Math.imul(h,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,V))+Math.imul(w,U)|0,s=Math.imul(w,V),r=r+Math.imul(y,H)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(b,H)|0,s=s+Math.imul(b,K)|0,r=r+Math.imul(f,Z)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(m,Z)|0,s=s+Math.imul(m,G)|0;var ve=(c+(r=r+Math.imul(u,$)|0)|0)+((8191&(i=(i=i+Math.imul(u,X)|0)+Math.imul(h,$)|0))<<13)|0;c=((s=s+Math.imul(h,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(S,U),i=(i=Math.imul(S,V))+Math.imul(C,U)|0,s=Math.imul(C,V),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(w,H)|0,s=s+Math.imul(w,K)|0,r=r+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(b,Z)|0,s=s+Math.imul(b,G)|0,r=r+Math.imul(f,$)|0,i=(i=i+Math.imul(f,X)|0)+Math.imul(m,$)|0,s=s+Math.imul(m,X)|0;var xe=(c+(r=r+Math.imul(u,J)|0)|0)+((8191&(i=(i=i+Math.imul(u,ee)|0)+Math.imul(h,J)|0))<<13)|0;c=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,V))+Math.imul(N,U)|0,s=Math.imul(N,V),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(C,H)|0,s=s+Math.imul(C,K)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(w,Z)|0,s=s+Math.imul(w,G)|0,r=r+Math.imul(y,$)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,$)|0,s=s+Math.imul(b,X)|0,r=r+Math.imul(f,J)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,ee)|0;var we=(c+(r=r+Math.imul(u,ne)|0)|0)+((8191&(i=(i=i+Math.imul(u,re)|0)+Math.imul(h,ne)|0))<<13)|0;c=((s=s+Math.imul(h,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(_,U),i=(i=Math.imul(_,V))+Math.imul(M,U)|0,s=Math.imul(M,V),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(N,H)|0,s=s+Math.imul(N,K)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(C,Z)|0,s=s+Math.imul(C,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(w,$)|0,s=s+Math.imul(w,X)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var ke=(c+(r=r+Math.imul(u,se)|0)|0)+((8191&(i=(i=i+Math.imul(u,ae)|0)+Math.imul(h,se)|0))<<13)|0;c=((s=s+Math.imul(h,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,V))+Math.imul(I,U)|0,s=Math.imul(I,V),r=r+Math.imul(_,H)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(M,H)|0,s=s+Math.imul(M,K)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(N,Z)|0,s=s+Math.imul(N,G)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(C,$)|0,s=s+Math.imul(C,X)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var Se=(c+(r=r+Math.imul(u,le)|0)|0)+((8191&(i=(i=i+Math.imul(u,ce)|0)+Math.imul(h,le)|0))<<13)|0;c=((s=s+Math.imul(h,ce)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(O,U)|0,s=Math.imul(O,V),r=r+Math.imul(R,H)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(I,H)|0,s=s+Math.imul(I,K)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(M,Z)|0,s=s+Math.imul(M,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(N,$)|0,s=s+Math.imul(N,X)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(C,J)|0,s=s+Math.imul(C,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(w,ne)|0,s=s+Math.imul(w,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,ae)|0,r=r+Math.imul(f,le)|0,i=(i=i+Math.imul(f,ce)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ce)|0;var Ce=(c+(r=r+Math.imul(u,ue)|0)|0)+((8191&(i=(i=i+Math.imul(u,he)|0)+Math.imul(h,ue)|0))<<13)|0;c=((s=s+Math.imul(h,he)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(L,U),i=(i=Math.imul(L,V))+Math.imul(z,U)|0,s=Math.imul(z,V),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(O,H)|0,s=s+Math.imul(O,K)|0,r=r+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(I,Z)|0,s=s+Math.imul(I,G)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(M,$)|0,s=s+Math.imul(M,X)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(N,J)|0,s=s+Math.imul(N,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(C,ne)|0,s=s+Math.imul(C,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,ae)|0,r=r+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(b,le)|0,s=s+Math.imul(b,ce)|0,r=r+Math.imul(f,ue)|0,i=(i=i+Math.imul(f,he)|0)+Math.imul(m,ue)|0,s=s+Math.imul(m,he)|0;var je=(c+(r=r+Math.imul(u,fe)|0)|0)+((8191&(i=(i=i+Math.imul(u,me)|0)+Math.imul(h,fe)|0))<<13)|0;c=((s=s+Math.imul(h,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,H),i=(i=Math.imul(L,K))+Math.imul(z,H)|0,s=Math.imul(z,K),r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,Z)|0,s=s+Math.imul(O,G)|0,r=r+Math.imul(R,$)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(I,$)|0,s=s+Math.imul(I,X)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(N,ne)|0,s=s+Math.imul(N,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(C,se)|0,s=s+Math.imul(C,ae)|0,r=r+Math.imul(x,le)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(w,le)|0,s=s+Math.imul(w,ce)|0,r=r+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(b,ue)|0,s=s+Math.imul(b,he)|0;var Ee=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;c=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,Z),i=(i=Math.imul(L,G))+Math.imul(z,Z)|0,s=Math.imul(z,G),r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(O,$)|0,s=s+Math.imul(O,X)|0,r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(I,J)|0,s=s+Math.imul(I,ee)|0,r=r+Math.imul(_,ne)|0,i=(i=i+Math.imul(_,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(N,se)|0,s=s+Math.imul(N,ae)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(C,le)|0,s=s+Math.imul(C,ce)|0,r=r+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(w,ue)|0,s=s+Math.imul(w,he)|0;var Ne=(c+(r=r+Math.imul(y,fe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,fe)|0))<<13)|0;c=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,$),i=(i=Math.imul(L,X))+Math.imul(z,$)|0,s=Math.imul(z,X),r=r+Math.imul(B,J)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(I,ne)|0,s=s+Math.imul(I,re)|0,r=r+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,ae)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(N,le)|0,s=s+Math.imul(N,ce)|0,r=r+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(C,ue)|0,s=s+Math.imul(C,he)|0;var Te=(c+(r=r+Math.imul(x,fe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(w,fe)|0))<<13)|0;c=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,ee))+Math.imul(z,J)|0,s=Math.imul(z,ee),r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(I,se)|0,s=s+Math.imul(I,ae)|0,r=r+Math.imul(_,le)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,ce)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(N,ue)|0,s=s+Math.imul(N,he)|0;var _e=(c+(r=r+Math.imul(S,fe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(C,fe)|0))<<13)|0;c=((s=s+Math.imul(C,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,ne),i=(i=Math.imul(L,re))+Math.imul(z,ne)|0,s=Math.imul(z,re),r=r+Math.imul(B,se)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(R,le)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(I,le)|0,s=s+Math.imul(I,ce)|0,r=r+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(M,ue)|0,s=s+Math.imul(M,he)|0;var Me=(c+(r=r+Math.imul(E,fe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(N,fe)|0))<<13)|0;c=((s=s+Math.imul(N,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,se),i=(i=Math.imul(L,ae))+Math.imul(z,se)|0,s=Math.imul(z,ae),r=r+Math.imul(B,le)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,le)|0,s=s+Math.imul(O,ce)|0,r=r+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(I,ue)|0,s=s+Math.imul(I,he)|0;var Ae=(c+(r=r+Math.imul(_,fe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(M,fe)|0))<<13)|0;c=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,le),i=(i=Math.imul(L,ce))+Math.imul(z,le)|0,s=Math.imul(z,ce),r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,he)|0)+Math.imul(O,ue)|0,s=s+Math.imul(O,he)|0;var Re=(c+(r=r+Math.imul(R,fe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(I,fe)|0))<<13)|0;c=((s=s+Math.imul(I,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,ue),i=(i=Math.imul(L,he))+Math.imul(z,ue)|0,s=Math.imul(z,he);var Ie=(c+(r=r+Math.imul(B,fe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(O,fe)|0))<<13)|0;c=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var De=(c+(r=Math.imul(L,fe))|0)+((8191&(i=(i=Math.imul(L,me))+Math.imul(z,fe)|0))<<13)|0;return c=((s=Math.imul(z,me))+(i>>>13)|0)+(De>>>26)|0,De&=67108863,l[0]=ge,l[1]=ye,l[2]=be,l[3]=ve,l[4]=xe,l[5]=we,l[6]=ke,l[7]=Se,l[8]=Ce,l[9]=je,l[10]=Ee,l[11]=Ne,l[12]=Te,l[13]=_e,l[14]=Me,l[15]=Ae,l[16]=Re,l[17]=Ie,l[18]=De,0!==c&&(l[19]=c,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s>>26)|0)>>>26,a&=67108863}n.words[s]=o,r=a,a=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function b(e,t,n){return y(e,t,n)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=m),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?y(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,n,r,i,s){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&s,s>>>=13;for(a=2*t;a>=26,n+=s/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i&1}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<a)for(this.length-=a,c=0;c=0&&(0!==d||c>=i);c--){var u=0|this.words[c];this.words[c]=d<<26-s|u>>>s,d=u&o}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.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 t=0;t>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i>26,this.words[i+n]=67108863&s;if(0===o)return this._strip();for(r(-1===o),o=0,i=0;i>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var o,l=r.length-i.length;if("mod"!==t){(o=new s(null)).length=l+1,o.words=new Array(o.length);for(var c=0;c=0;u--){var h=67108864*(0|r.words[i.length+u])+(0|r.words[i.length+u-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,u);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,u),r.isZero()||(r.negative^=1);o&&(o.words[u]=h)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,o},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/e|0,n=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),a=new s(0),o=new s(0),l=new s(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var d=n.clone(),u=t.clone();!t.isZero();){for(var h=0,p=1;0===(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(u)),i.iushrn(1),a.iushrn(1);for(var f=0,m=1;0===(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(d),l.isub(u)),o.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o),a.isub(l)):(n.isub(t),o.isub(i),l.isub(a))}return{a:o,b:l,gcd:n.iushln(c)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new s(1),o=new s(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,d=1;0===(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var u=0,h=1;0===(n.words[0]&h)&&u<26;++u,h<<=1);if(u>0)for(n.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(o)):(n.isub(t),o.isub(a))}return(i=0===t.cmpn(1)?a:o).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0===(1&this.words[0])},s.prototype.isOdd=function(){return 1===(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new E(e)},s.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)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var x={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function j(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(k,w),k.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,s=a}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(x[e])return x[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new S;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new j}return x[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(d(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var o=new s(1).toRed(this),l=o.redNeg(),c=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);0!==this.pow(d,c).cmp(l);)d.redIAdd(l);for(var u=this.pow(d,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),f=a;0!==p.cmp(o);){for(var m=p,g=0;0!==m.cmp(o);g++)m=m.redSqr();r(g=0;r--){for(var c=t.words[r],d=l-1;d>=0;d--){var u=c>>d&1;i!==n[0]&&(i=this.sqr(i)),0!==u||0!==a?(a<<=1,a|=u,(4===++o||0===r&&0===d)&&(i=this.mul(i,n[a]),o=0,a=0)):o=0}l=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new N(e)},i(N,E),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},N.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},5865:e=>{e.exports=function(e,t){for(var n=Math.min(e.length,t.length),r=new Buffer(n),i=0;i{"use strict";const r=n(2009),i=n(4038),s="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return c(e,t,n)}function c(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=o(n);const i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(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(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|f(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||$(e.length)?o(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(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 u(e){return d(e),o(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),n=o(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(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);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(e).length;default:if(i)return r?-1:Y(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return _(this,t,n);case"base64":return j(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),$(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){let s,a=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(s=n;so&&(n=o-l),s=n;s>=0;s--){let n=!0;for(let r=0;ri&&(r=i):r=i;const s=t.length;let a;for(r>s/2&&(r=s/2),a=0;a>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function j(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,o,l;switch(a){case 1:t<128&&(s=t);break;case 2:n=e[i+1],128===(192&n)&&(l=(31&t)<<6|63&n,l>127&&(s=l));break;case 3:n=e[i+1],r=e[i+2],128===(192&n)&&128===(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:n=e[i+1],r=e[i+2],o=e[i+3],128===(192&n)&&128===(192&r)&&128===(192&o)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return function(e){const t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const o=Math.min(s,a),c=this.slice(r,i),d=e.slice(t,n);for(let l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return k(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function T(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let s=t;sn)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function D(e,t,n,r,i){V(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function B(e,t,n,r,i){V(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function O(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(e,t,n,r,s){return t=+t,n>>>=0,s||O(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,s){return t=+t,n>>>=0,s||O(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,s=0;for(;++s>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,s=0;for(;++s=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=t,i=1,s=this[e+--r];for(;r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){I(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,s=0;for(this[t]=255&e;++s>>=0,n>>>=0,!r){I(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Q((function(e){return D(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Q((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Q((function(e){return D(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Q((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=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-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function V(e,t,n,r,i,s){if(e>n||e3?0===t||t===BigInt(0)?">= 0".concat(r," and < 2").concat(r," ** ").concat(8*(s+1)).concat(r):">= -(2".concat(r," ** ").concat(8*(s+1)-1).concat(r,") and < 2 ** ")+"".concat(8*(s+1)-1).concat(r):">= ".concat(t).concat(r," and <= ").concat(n).concat(r),new z.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,s)}function W(e,t){if("number"!==typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw W(e,n),new z.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,n){let r='The value of "'.concat(e,'" is out of range.'),i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=U(String(n)):"bigint"===typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),r+=" It must be ".concat(t,". Received ").concat(i),r}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let n;t=t||1/0;const r=e.length;let i=null;const s=[];for(let a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function Z(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function G(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!==e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"===typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},2221:(e,t,n)=>{var r=n(2543).Buffer,i=n(1064).Transform,s=n(5948).s;function a(e){i.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(2534)(a,i),a.prototype.update=function(e,t,n){"string"===typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},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,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){r=i}finally{n(r)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(n){t=n}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new s(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=a},5827:function(e){e.exports=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n0&&e<1/0},m=Array.prototype.slice;function g(e){return Array.from?Array.from(e):m.call(e)}var y=/^image\/.+$/;function b(e){return y.test(e)}function v(e){var t=b(e)?e.substr(6):"";return"jpeg"===t&&(t="jpg"),".".concat(t)}var x=String.fromCharCode;function w(e,t,n){var r,i="";for(n+=t,r=t;r0;)n.push(x.apply(null,g(i.subarray(0,r)))),i=i.subarray(r);return"data:".concat(t,";base64,").concat(k(n.join("")))}function C(e){var t,n=new DataView(e);try{var r,i,s;if(255===n.getUint8(0)&&216===n.getUint8(1))for(var a=n.byteLength,o=2;o+1=8&&(s=l+d)}}}if(s){var u,h,p=n.getUint16(s,r);for(h=0;h1&&void 0!==arguments[1]?arguments[1]:1e11;return E.test(e)?Math.round(e*t)/t:e}function T(e){var t=e.aspectRatio,n=e.height,r=e.width,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",s=f(r),a=f(n);if(s&&a){var o=n*t;("contain"===i||"none"===i)&&o>r||"cover"===i&&o1&&a(l,j(c)),o&&(e.exif=_(i)),l.url=s||o?!I||c>1?S(i,r):I.createObjectURL(t):i,e.load(l)},l.onabort=function(){e.fail(new Error("Aborted to read the image with FileReader."))},l.onerror=function(){e.fail(new Error("Failed to read the image with FileReader."))},l.onloadend=function(){e.reader=null},s||o?l.readAsArrayBuffer(t):l.readAsDataURL(t)}else this.load({url:I.createObjectURL(t)})}else this.fail(new Error("The current browser does not support image compression."));else this.fail(new Error("The first argument must be an image File or Blob object."))}else this.fail(new Error("The first argument must be a File or Blob object."))}},{key:"load",value:function(e){var n=this,r=this.file,i=this.image;i.onload=function(){n.draw(t(t({},e),{},{naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight}))},i.onabort=function(){n.fail(new Error("Aborted to load the image."))},i.onerror=function(){n.fail(new Error("Failed to load the image."))},p.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(p.navigator.userAgent)&&(i.crossOrigin="anonymous"),i.alt=r.name,i.src=e.url}},{key:"draw",value:function(e){var t=this,n=e.naturalWidth,r=e.naturalHeight,i=e.rotate,s=void 0===i?0:i,a=e.scaleX,o=void 0===a?1:a,l=e.scaleY,c=void 0===l?1:l,u=this.file,h=this.image,p=this.options,m=document.createElement("canvas"),g=m.getContext("2d"),y=Math.abs(s)%180===90,v=("contain"===p.resize||"cover"===p.resize)&&f(p.width)&&f(p.height),x=Math.max(p.maxWidth,0)||1/0,w=Math.max(p.maxHeight,0)||1/0,k=Math.max(p.minWidth,0)||0,C=Math.max(p.minHeight,0)||0,j=n/r,E=p.width,_=p.height;if(y){var A=[w,x];x=A[0],w=A[1];var I=[C,k];k=I[0],C=I[1];var D=[_,E];E=D[0],_=D[1]}v&&(j=E/_);var B=T({aspectRatio:j,width:x,height:w},"contain");x=B.width,w=B.height;var O=T({aspectRatio:j,width:k,height:C},"cover");if(k=O.width,C=O.height,v){var P=T({aspectRatio:j,width:E,height:_},p.resize);E=P.width,_=P.height}else{var L=T({aspectRatio:j,width:E,height:_}),z=L.width;E=void 0===z?n:z;var F=L.height;_=void 0===F?r:F}var U=-(E=Math.floor(N(Math.min(Math.max(E,k),x))))/2,V=-(_=Math.floor(N(Math.min(Math.max(_,C),w))))/2,W=E,H=_,K=[];if(v){var Y=0,Z=0,G=n,q=r,$=T({aspectRatio:j,width:n,height:r},{contain:"cover",cover:"contain"}[p.resize]);G=$.width,q=$.height,Y=(n-G)/2,Z=(r-q)/2,K.push(Y,Z,G,q)}if(K.push(U,V,W,H),y){var X=[_,E];E=X[0],_=X[1]}m.width=E,m.height=_,b(p.mimeType)||(p.mimeType=u.type);var Q="transparent";u.size>p.convertSize&&p.convertTypes.indexOf(p.mimeType)>=0&&(p.mimeType="image/jpeg");var J="image/jpeg"===p.mimeType;if(J&&(Q="#fff"),g.fillStyle=Q,g.fillRect(0,0,E,_),p.beforeDraw&&p.beforeDraw.call(this,g,m),!this.aborted&&(g.save(),g.translate(E/2,_/2),g.rotate(s*Math.PI/180),g.scale(o,c),g.drawImage.apply(g,[h].concat(K)),g.restore(),p.drew&&p.drew.call(this,g,m),!this.aborted)){var ee=function(e){if(!t.aborted){var i=function(e){return t.done({naturalWidth:n,naturalHeight:r,result:e})};if(e&&J&&p.retainExif&&t.exif&&t.exif.length>0){var s=function(e){return i(d(S(M(e,t.exif),p.mimeType)))};if(e.arrayBuffer)e.arrayBuffer().then(s).catch((function(){t.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))}));else{var a=new R;t.reader=a,a.onload=function(e){var t=e.target;s(t.result)},a.onabort=function(){t.fail(new Error("Aborted to read the compressed image with FileReader."))},a.onerror=function(){t.fail(new Error("Failed to read the compressed image with FileReader."))},a.onloadend=function(){t.reader=null},a.readAsArrayBuffer(e)}}else i(e)}};m.toBlob?m.toBlob(ee,p.mimeType,p.quality):ee(d(m.toDataURL(p.mimeType,p.quality)))}}},{key:"done",value:function(e){var t=e.naturalWidth,n=e.naturalHeight,r=e.result,i=this.file,s=this.image,a=this.options;if(I&&0===s.src.indexOf("blob:")&&I.revokeObjectURL(s.src),r)if(a.strict&&!a.retainExif&&r.size>i.size&&a.mimeType===i.type&&!(a.width>t||a.height>n||a.minWidth>t||a.minHeight>n||a.maxWidth{"use strict";t.Q=function(e,t){if("string"!==typeof e)throw new TypeError("argument str must be a string");var n={},r=(t||{}).decode||i,s=0;for(;s{var r=n(6289),i=n(518);e.exports=function(e){return new a(e)};var s={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=s[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function o(e,t,n){Array.isArray(e)||(e=e.toArray());var r=new Buffer(e);if(n&&r.length{"use strict";var r=n(2534),i=n(8437),s=n(3375),a=n(997),o=n(2221);function l(e){o.call(this,"digest"),this._hash=e}r(l,o),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new s:new l(a(e))}},5378:(e,t,n)=>{var r=n(8437);e.exports=function(e){return(new r).update(e).digest()}},7651:(e,t,n)=>{"use strict";var r=n(2534),i=n(3189),s=n(2221),a=n(2543).Buffer,o=n(5378),l=n(3375),c=n(997),d=a.alloc(128);function u(e,t){s.call(this,"digest"),"string"===typeof t&&(t=a.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new l:c(e)).update(t).digest():t.length{"use strict";var r=n(2534),i=n(2543).Buffer,s=n(2221),a=i.alloc(128),o=64;function l(e,t){s.call(this,"digest"),"string"===typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>o?t=e(t):t.length{"use strict";var r=n(9640);function i(e,t){var n={zone:t};if(e?e instanceof i?this._date=e._date:e instanceof Date?this._date=r.DateTime.fromJSDate(e,n):"number"===typeof e?this._date=r.DateTime.fromMillis(e,n):"string"===typeof e&&(this._date=r.DateTime.fromISO(e,n),this._date.isValid||(this._date=r.DateTime.fromRFC2822(e,n)),this._date.isValid||(this._date=r.DateTime.fromSQL(e,n)),this._date.isValid||(this._date=r.DateTime.fromFormat(e,"EEE, d MMM yyyy HH:mm:ss",n))):this._date=r.DateTime.local(),!this._date||!this._date.isValid)throw new Error("CronDate: unhandled timestamp: "+JSON.stringify(e));t&&t!==this._date.zoneName&&(this._date=this._date.setZone(t))}i.prototype.addYear=function(){this._date=this._date.plus({years:1})},i.prototype.addMonth=function(){this._date=this._date.plus({months:1}).startOf("month")},i.prototype.addDay=function(){this._date=this._date.plus({days:1}).startOf("day")},i.prototype.addHour=function(){var e=this._date;this._date=this._date.plus({hours:1}).startOf("hour"),this._date<=e&&(this._date=this._date.plus({hours:1}))},i.prototype.addMinute=function(){var e=this._date;this._date=this._date.plus({minutes:1}).startOf("minute"),this._date=e&&(this._date=this._date.minus({hours:1}))},i.prototype.subtractMinute=function(){var e=this._date;this._date=this._date.minus({minutes:1}).endOf("minute").startOf("second"),this._date>e&&(this._date=this._date.minus({hours:1}))},i.prototype.subtractSecond=function(){var e=this._date;this._date=this._date.minus({seconds:1}).startOf("second"),this._date>e&&(this._date=this._date.minus({hours:1}))},i.prototype.getDate=function(){return this._date.day},i.prototype.getFullYear=function(){return this._date.year},i.prototype.getDay=function(){var e=this._date.weekday;return 7==e?0:e},i.prototype.getMonth=function(){return this._date.month-1},i.prototype.getHours=function(){return this._date.hour},i.prototype.getMinutes=function(){return this._date.minute},i.prototype.getSeconds=function(){return this._date.second},i.prototype.getMilliseconds=function(){return this._date.millisecond},i.prototype.getTime=function(){return this._date.valueOf()},i.prototype.getUTCDate=function(){return this._getUTC().day},i.prototype.getUTCFullYear=function(){return this._getUTC().year},i.prototype.getUTCDay=function(){var e=this._getUTC().weekday;return 7==e?0:e},i.prototype.getUTCMonth=function(){return this._getUTC().month-1},i.prototype.getUTCHours=function(){return this._getUTC().hour},i.prototype.getUTCMinutes=function(){return this._getUTC().minute},i.prototype.getUTCSeconds=function(){return this._getUTC().second},i.prototype.toISOString=function(){return this._date.toUTC().toISO()},i.prototype.toJSON=function(){return this._date.toJSON()},i.prototype.setDate=function(e){this._date=this._date.set({day:e})},i.prototype.setFullYear=function(e){this._date=this._date.set({year:e})},i.prototype.setDay=function(e){this._date=this._date.set({weekday:e})},i.prototype.setMonth=function(e){this._date=this._date.set({month:e+1})},i.prototype.setHours=function(e){this._date=this._date.set({hour:e})},i.prototype.setMinutes=function(e){this._date=this._date.set({minute:e})},i.prototype.setSeconds=function(e){this._date=this._date.set({second:e})},i.prototype.setMilliseconds=function(e){this._date=this._date.set({millisecond:e})},i.prototype._getUTC=function(){return this._date.toUTC()},i.prototype.toString=function(){return this.toDate().toString()},i.prototype.toDate=function(){return this._date.toJSDate()},i.prototype.isLastDayOfMonth=function(){var e=this._date.plus({days:1}).startOf("day");return this._date.month!==e.month},i.prototype.isLastWeekdayOfMonth=function(){var e=this._date.plus({days:7}).startOf("day");return this._date.month!==e.month},e.exports=i},647:(e,t,n)=>{"use strict";var r=n(4578),i=n(1867);function s(e,t){this._options=t,this._utc=t.utc||!1,this._tz=this._utc?"UTC":t.tz,this._currentDate=new r(t.currentDate,this._tz),this._startDate=t.startDate?new r(t.startDate,this._tz):null,this._endDate=t.endDate?new r(t.endDate,this._tz):null,this._isIterator=t.iterator||!1,this._hasIterated=!1,this._nthDayOfWeek=t.nthDayOfWeek||0,this.fields=s._freezeFields(e)}s.map=["second","minute","hour","dayOfMonth","month","dayOfWeek"],s.predefined={"@yearly":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@hourly":"0 * * * *"},s.constraints=[{min:0,max:59,chars:[]},{min:0,max:59,chars:[]},{min:0,max:23,chars:[]},{min:1,max:31,chars:["L"]},{min:1,max:12,chars:[]},{min:0,max:7,chars:["L"]}],s.daysInMonth=[31,29,31,30,31,30,31,31,30,31,30,31],s.aliases={month:{jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},dayOfWeek:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6}},s.parseDefaults=["0","*","*","*","*","*"],s.standardValidCharacters=/^[,*\d/-]+$/,s.dayOfWeekValidCharacters=/^[?,*\dL#/-]+$/,s.dayOfMonthValidCharacters=/^[?,*\dL/-]+$/,s.validCharacters={second:s.standardValidCharacters,minute:s.standardValidCharacters,hour:s.standardValidCharacters,dayOfMonth:s.dayOfMonthValidCharacters,month:s.standardValidCharacters,dayOfWeek:s.dayOfWeekValidCharacters},s._isValidConstraintChar=function(e,t){return"string"===typeof t&&e.chars.some((function(e){return t.indexOf(e)>-1}))},s._parseField=function(e,t,n){switch(e){case"month":case"dayOfWeek":var r=s.aliases[e];t=t.replace(/[a-z]{3}/gi,(function(e){if(e=e.toLowerCase(),"undefined"!==typeof r[e])return r[e];throw new Error('Validation error, cannot resolve alias "'+e+'"')}))}if(!s.validCharacters[e].test(t))throw new Error("Invalid characters, got value: "+t);function i(e){var t=e.split("/");if(t.length>2)throw new Error("Invalid repeat: "+e);return t.length>1?(t[0]==+t[0]&&(t=[t[0]+"-"+n.max,t[1]]),a(t[0],t[t.length-1])):a(e,1)}function a(t,r){var i=[],s=t.split("-");if(s.length>1){if(s.length<2)return+t;if(!s[0].length){if(!s[1].length)throw new Error("Invalid range: "+t);return+t}var a=+s[0],o=+s[1];if(Number.isNaN(a)||Number.isNaN(o)||an.max)throw new Error("Constraint error, got range "+a+"-"+o+" expected range "+n.min+"-"+n.max);if(a>o)throw new Error("Invalid range: "+t);var l=+r;if(Number.isNaN(l)||l<=0)throw new Error("Constraint error, cannot repeat at every "+l+" time.");"dayOfWeek"===e&&o%7===0&&i.push(0);for(var c=a,d=o;c<=d;c++){!(-1!==i.indexOf(c))&&l>0&&l%r===0?(l=1,i.push(c)):l++}return i}return Number.isNaN(+t)?t:+t}return-1!==t.indexOf("*")?t=t.replace(/\*/g,n.min+"-"+n.max):-1!==t.indexOf("?")&&(t=t.replace(/\?/g,n.min+"-"+n.max)),function(t){var r=[];function a(t){if(t instanceof Array)for(var i=0,a=t.length;in.max)throw new Error("Constraint error, got value "+o+" expected range "+n.min+"-"+n.max);r.push(o)}}else{if(s._isValidConstraintChar(n,t))return void r.push(t);var l=+t;if(Number.isNaN(l)||ln.max)throw new Error("Constraint error, got value "+t+" expected range "+n.min+"-"+n.max);"dayOfWeek"===e&&(l%=7),r.push(l)}}var o=t.split(",");if(!o.every((function(e){return e.length>0})))throw new Error("Invalid list value format");if(o.length>1)for(var l=0,c=o.length;lt)throw new Error("Invalid explicit day of month definition");return e.dayOfMonth.filter((function(e){return"L"===e||e<=t})).sort(s._sortCompareFn)}},s._freezeFields=function(e){for(var t=0,n=s.map.length;t=e)return t[n]===e;return t[0]===e}function n(e,t){if(t<6){if(e.getDate()<8&&1===t)return!0;var n=e.getDate()%7?1:0,r=e.getDate()-e.getDate()%7;return Math.floor(r/7)+n===t}return!1}function i(e){return e.length>0&&e.some((function(e){return"string"===typeof e&&e.indexOf("L")>=0}))}var a=(e=e||!1)?"subtract":"add",o=new r(this._currentDate,this._tz),l=this._startDate,c=this._endDate,d=o.getTime(),u=0;for(;u<1e4;){if(u++,e){if(l&&o.getTime()-l.getTime()<0)throw new Error("Out of the timespan range")}else if(c&&c.getTime()-o.getTime()<0)throw new Error("Out of the timespan range");var h=t(o.getDate(),this.fields.dayOfMonth);i(this.fields.dayOfMonth)&&(h=h||o.isLastDayOfMonth());var p=t(o.getDay(),this.fields.dayOfWeek);i(this.fields.dayOfWeek)&&(p=p||this.fields.dayOfWeek.some((function(e){if(!i([e]))return!1;var t=Number.parseInt(e[0])%7;if(Number.isNaN(t))throw new Error("Invalid last weekday of the month expression: "+e);return o.getDay()===t&&o.isLastWeekdayOfMonth()})));var f=this.fields.dayOfMonth.length>=s.daysInMonth[o.getMonth()],m=this.fields.dayOfWeek.length===s.constraints[5].max-s.constraints[5].min+1,g=o.getHours();if(h||p&&!m)if(f||!m||h)if(!f||m||p)if(this._nthDayOfWeek>0&&!n(o,this._nthDayOfWeek))this._applyTimezoneShift(o,a,"Day");else if(t(o.getMonth()+1,this.fields.month)){if(t(g,this.fields.hour)){if(this._dstEnd===g&&!e){this._dstEnd=null,this._applyTimezoneShift(o,"add","Hour");continue}}else{if(this._dstStart!==g){this._dstStart=null,this._applyTimezoneShift(o,a,"Hour");continue}if(!t(g-1,this.fields.hour)){o[a+"Hour"]();continue}}if(t(o.getMinutes(),this.fields.minute))if(t(o.getSeconds(),this.fields.second)){if(d!==o.getTime())break;"add"===a||0===o.getMilliseconds()?this._applyTimezoneShift(o,a,"Second"):o.setMilliseconds(0)}else this._applyTimezoneShift(o,a,"Second");else this._applyTimezoneShift(o,a,"Minute")}else this._applyTimezoneShift(o,a,"Month");else this._applyTimezoneShift(o,a,"Day");else this._applyTimezoneShift(o,a,"Day");else this._applyTimezoneShift(o,a,"Day")}if(u>=1e4)throw new Error("Invalid expression, loop limit exceeded");return this._currentDate=new r(o,this._tz),this._hasIterated=!0,o},s.prototype.next=function(){var e=this._findSchedule();return this._isIterator?{value:e,done:!this.hasNext()}:e},s.prototype.prev=function(){var e=this._findSchedule(!0);return this._isIterator?{value:e,done:!this.hasPrev()}:e},s.prototype.hasNext=function(){var e=this._currentDate,t=this._hasIterated;try{return this._findSchedule(),!0}catch(n){return!1}finally{this._currentDate=e,this._hasIterated=t}},s.prototype.hasPrev=function(){var e=this._currentDate,t=this._hasIterated;try{return this._findSchedule(!0),!0}catch(n){return!1}finally{this._currentDate=e,this._hasIterated=t}},s.prototype.iterate=function(e,t){var n=[];if(e>=0)for(var r=0,i=e;ri;r--)try{s=this.prev();n.push(s),t&&t(s,r)}catch(a){break}return n},s.prototype.reset=function(e){this._currentDate=new r(e||this._options.currentDate)},s.prototype.stringify=function(e){for(var t=[],n=e?0:1,r=s.map.length;n6)throw new Error("Invalid cron expression");for(var o=s.map.length-a.length,l=0,c=s.map.length;lc?l:l-o];if(l1){var r=+n[n.length-1];if(/,/.test(e))throw new Error("Constraint error, invalid dayOfWeek `#` and `,` special characters are incompatible");if(/\//.test(e))throw new Error("Constraint error, invalid dayOfWeek `#` and `/` special characters are incompatible");if(/-/.test(e))throw new Error("Constraint error, invalid dayOfWeek `#` and `-` special characters are incompatible");if(n.length>2||Number.isNaN(r)||r<1||r>5)throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return t.nthDayOfWeek=r,n[0]}return e}}return"function"===typeof t&&(t={}),i(e,t)},s.fieldsToExpression=function(e,t){function n(e,t,n){if(!t)throw new Error("Validation error, Field "+e+" is missing");if(0===t.length)throw new Error("Validation error, Field "+e+" contains no values");for(var r=0,i=t.length;rn.max))throw new Error("Constraint error, got value "+a+" expected range "+n.min+"-"+n.max)}}for(var r={},i=0,a=s.map.length;i{"use strict";function t(e){return{start:e,count:1}}function n(e,t){e.end=t,e.step=t-e.start,e.count=2}function r(e,n,r){n&&(2===n.count?(e.push(t(n.start)),e.push(t(n.end))):e.push(n)),r&&e.push(r)}e.exports=function(e){for(var i=[],s=void 0,a=0;a{"use strict";var r=n(4576);e.exports=function(e,t,n){var i=r(e);if(1===i.length){var s=i[0];if(1===(d=s.step)&&s.start===t&&s.end===n)return"*";if(1!==d&&s.start===t&&s.end===n-d+1)return"*/"+d}for(var a=[],o=0,l=i.length;oc.end?a=a.concat(Array.from({length:c.end-c.start+1}).map((function(e,t){var n=c.start+t;return(n-c.start)%c.step===0?n:null})).filter((function(e){return null!=e}))):c.end===n-c.step+1?a.push(c.start+"/"+c.step):a.push(c.start+"-"+c.end+"/"+c.step)}else a.push(c.start+"-"+c.end)}else a.push(c.start)}return a.join(",")}},9483:(e,t,n)=>{"use strict";var r=n(647);function i(){}i._parseEntry=function(e){var t=e.split(" ");if(6===t.length)return{interval:r.parse(e)};if(t.length>6)return{interval:r.parse(t.slice(0,6).join(" ")),command:t.slice(6,t.length)};throw new Error("Invalid entry: "+e)},i.parseExpression=function(e,t){return r.parse(e,t)},i.fieldsToExpression=function(e,t){return r.fieldsToExpression(e,t)},i.parseString=function(e){for(var t=e.split("\n"),n={variables:{},expressions:[],errors:{}},r=0,s=t.length;r0){if(o.match(/^#/))continue;if(a=o.match(/^(.*)=(.*)$/))n.variables[a[1]]=a[2];else{var l=null;try{l=i._parseEntry("0 "+o),n.expressions.push(l.interval)}catch(c){n.errors[o]=c}}}}return n},i.parseFile=function(e,t){n(7281).readFile(e,(function(e,n){if(!e)return t(null,i.parseString(n.toString()));t(e)}))},e.exports=i},6433:(e,t,n)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(2525),t.createHash=t.Hash=n(3569),t.createHmac=t.Hmac=n(7651);var r=n(7050),i=Object.keys(r),s=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return s};var a=n(5896);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var o=n(9161);t.Cipher=o.Cipher,t.createCipher=o.createCipher,t.Cipheriv=o.Cipheriv,t.createCipheriv=o.createCipheriv,t.Decipher=o.Decipher,t.createDecipher=o.createDecipher,t.Decipheriv=o.Decipheriv,t.createDecipheriv=o.createDecipheriv,t.getCiphers=o.getCiphers,t.listCiphers=o.listCiphers;var l=n(2197);t.DiffieHellmanGroup=l.DiffieHellmanGroup,t.createDiffieHellmanGroup=l.createDiffieHellmanGroup,t.getDiffieHellman=l.getDiffieHellman,t.createDiffieHellman=l.createDiffieHellman,t.DiffieHellman=l.DiffieHellman;var c=n(7834);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=n(9420);var d=n(12);t.publicEncrypt=d.publicEncrypt,t.privateEncrypt=d.privateEncrypt,t.publicDecrypt=d.publicDecrypt,t.privateDecrypt=d.privateDecrypt;var u=n(394);t.randomFill=u.randomFill,t.randomFillSync=u.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.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}},7892:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",s="minute",a="hour",o="day",l="week",c="month",d="quarter",u="year",h="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},y=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},b={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var o=t.name;x[o]=t,i=o}return!r&&i&&(v=i),i||!r&&v},C=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},j=b;j.l=S,j.i=k,j.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var y=g.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return j},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return C(e)68?1900:2e3)},o=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},u={A:[i,function(e){this.afternoon=d(e,!1)}],a:[i,function(e){this.afternoon=d(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,o("seconds")],ss:[r,o("seconds")],m:[r,o("minutes")],mm:[r,o("minutes")],H:[r,o("hours")],h:[r,o("hours")],HH:[r,o("hours")],hh:[r,o("hours")],D:[r,o("day")],DD:[n,o("day")],Do:[i,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,o("month")],MM:[n,o("month")],MMM:[i,function(e){var t=c("months"),n=(c("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,o("year")],YY:[n,function(e){this.year=a(e)}],YYYY:[/\d{4}/,o("year")],Z:l,ZZ:l};function h(n){var r,i;r=n,i=s&&s.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var s=r&&r.toUpperCase();return n||i[r]||e[r]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),o=a.length,l=0;l-1)return new Date(("X"===t?1e3:1)*e);var r=h(t)(e),i=r.year,s=r.month,a=r.day,o=r.hours,l=r.minutes,c=r.seconds,d=r.milliseconds,u=r.zone,p=new Date,f=a||(i||s?1:p.getDate()),m=i||p.getFullYear(),g=0;i&&!s||(g=s>0?s-1:p.getMonth());var y=o||0,b=l||0,v=c||0,x=d||0;return u?new Date(Date.UTC(m,g,f,y,b,v,x+60*u.offset*1e3)):n?new Date(Date.UTC(m,g,f,y,b,v,x)):new Date(m,g,f,y,b,v,x)}catch(e){return new Date("")}}(t,o,r),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&t!=this.format(o)&&(this.$d=new Date("")),s={}}else if(o instanceof Array)for(var p=o.length,f=1;f<=p;f+=1){a[1]=o[f-1];var m=n.apply(this,a);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}f===p&&(this.$d=new Date(""))}else i.call(this,e)}}}()},6818:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isBetween=function(e,t,r,i){var s=n(e),a=n(t),o="("===(i=i||"()")[0],l=")"===i[1];return(o?this.isAfter(s,r):!this.isBefore(s,r))&&(l?this.isBefore(a,r):!this.isAfter(a,r))||(o?this.isBefore(s,r):!this.isAfter(s,r))&&(l?this.isAfter(a,r):!this.isBefore(a,r))}}}()},9893:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var i=n.prototype,s=i.format;r.en.formats=e,i.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,i){var s=i&&i.toUpperCase();return r||n[i]||e[i]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return s.call(this,r)}}}()},9216:function(e){e.exports=function(){"use strict";var e="week",t="year";return function(n,r,i){var s=r.prototype;s.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var s=i(this).startOf(t).add(1,t).date(r),a=i(this).endOf(e);if(s.isBefore(a))return 1}var o=i(this).startOf(t).date(r).startOf(e).subtract(1,"millisecond"),l=this.diff(o,e,!0);return l<0?i(this).startOf("week").week():Math.ceil(l)},s.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},7439:(e,t,n)=>{"use strict";t.utils=n(7427),t.Cipher=n(834),t.DES=n(3688),t.CBC=n(1159),t.EDE=n(8534)},1159:(e,t,n)=>{"use strict";var r=n(2325),i=n(2534),s={};function a(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t{"use strict";var r=n(2325);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t{"use strict";var r=n(2325),i=n(2534),s=n(7427),a=n(834);function o(){this.tmp=new Array(2),this.keys=null}function l(e){a.call(this,e);var t=new o;this._desState=t,this.deriveKeys(t,e.key)}i(l,a),e.exports=l,l.create=function(e){return new l(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(e,t){e.keys=new Array(32),r.equal(t.length,this.blockSize,"Invalid key length");var n=s.readUInt32BE(t,0),i=s.readUInt32BE(t,4);s.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var a=0;a>>1];n=s.r28shl(n,o),i=s.r28shl(i,o),s.pc2(n,i,e.keys,a)}},l.prototype._update=function(e,t,n,r){var i=this._desState,a=s.readUInt32BE(e,t),o=s.readUInt32BE(e,t+4);s.ip(a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,o,i.tmp,0):this._decrypt(i,a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],s.writeUInt32BE(n,a,r),s.writeUInt32BE(n,o,r+4)},l.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var n=e.length-t,r=t;r>>0,a=h}s.rip(o,a,r,i)},l.prototype._decrypt=function(e,t,n,r,i){for(var a=n,o=t,l=e.keys.length-2;l>=0;l-=2){var c=e.keys[l],d=e.keys[l+1];s.expand(a,e.tmp,0),c^=e.tmp[0],d^=e.tmp[1];var u=s.substitute(c,d),h=a;a=(o^s.permute(u))>>>0,o=h}s.rip(a,o,r,i)}},8534:(e,t,n)=>{"use strict";var r=n(2325),i=n(2534),s=n(834),a=n(3688);function o(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),s=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:n}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:s})]:[a.create({type:"decrypt",key:s}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:n})]}function l(e){s.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t}i(l,s),e.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},l.prototype._pad=a.prototype._pad,l.prototype._unpad=a.prototype._unpad},7427:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var i=0,s=0,a=6;a>=0;a-=2){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>>o+a&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>>o+a&1}for(a=6;a>=0;a-=2){for(o=1;o<=25;o+=8)s<<=1,s|=t>>>o+a&1;for(o=1;o<=25;o+=8)s<<=1,s|=e>>>o+a&1}n[r+0]=i>>>0,n[r+1]=s>>>0},t.rip=function(e,t,n,r){for(var i=0,s=0,a=0;a<4;a++)for(var o=24;o>=0;o-=8)i<<=1,i|=t>>>o+a&1,i<<=1,i|=e>>>o+a&1;for(a=4;a<8;a++)for(o=24;o>=0;o-=8)s<<=1,s|=t>>>o+a&1,s<<=1,s|=e>>>o+a&1;n[r+0]=i>>>0,n[r+1]=s>>>0},t.pc1=function(e,t,n,r){for(var i=0,s=0,a=7;a>=5;a--){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>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|=t>>o+a&1;for(a=1;a<=3;a++){for(o=0;o<=24;o+=8)s<<=1,s|=t>>o+a&1;for(o=0;o<=24;o+=8)s<<=1,s|=e>>o+a&1}for(o=0;o<=24;o+=8)s<<=1,s|=e>>o+a&1;n[r+0]=i>>>0,n[r+1]=s>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[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];t.pc2=function(e,t,r,i){for(var s=0,a=0,o=n.length>>>1,l=0;l>>n[l]&1;for(l=o;l>>n[l]&1;r[i+0]=s>>>0,r[i+1]=a>>>0},t.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var s=23;s>=15;s-=4)r<<=6,r|=e>>>s&63;for(s=11;s>=3;s-=4)i|=e>>>s&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>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];t.substitute=function(e,t){for(var n=0,i=0;i<4;i++){n<<=4,n|=r[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){n<<=4,n|=r[256+64*i+(t>>>18-6*i&63)]}return n>>>0};var i=[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];t.permute=function(e){for(var t=0,n=0;n>>i[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length{var r=n(3164),i=n(9799),s=n(4771);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new Buffer(i[e].prime,"hex"),n=new Buffer(i[e].gen,"hex");return new s(t,n)},t.createDiffieHellman=t.DiffieHellman=function e(t,n,i,o){return Buffer.isBuffer(n)||void 0===a[n]?e(t,"binary",n,i):(n=n||"binary",o=o||"binary",i=i||new Buffer([2]),Buffer.isBuffer(i)||(i=new Buffer(i,o)),"number"===typeof t?new s(r(t,i),i,!0):(Buffer.isBuffer(t)||(t=new Buffer(t,n)),new s(t,i,!0)))}},4771:(e,t,n)=>{var r=n(518),i=new(n(1595)),s=new r(24),a=new r(11),o=new r(10),l=new r(3),c=new r(7),d=n(3164),u=n(2525);function h(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this._pub=new r(e),this}function p(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this._priv=new r(e),this}e.exports=m;var f={};function m(e,t,n){this.setGenerator(t),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,n?(this.setPublicKey=h,this.setPrivateKey=p):this._primeCode=8}function g(e,t){var n=new Buffer(e.toArray());return t?n.toString(t):n}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!==typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in f)return f[r];var u,h=0;if(e.isEven()||!d.simpleSieve||!d.fermatTest(e)||!i.test(e))return h+=1,h+="02"===n||"05"===n?8:4,f[r]=h,h;switch(i.test(e.shrn(1))||(h+=2),n){case"02":e.mod(s).cmp(a)&&(h+=8);break;case"05":(u=e.mod(o)).cmp(l)&&u.cmp(c)&&(h+=8);break;default:h+=4}return f[r]=h,h}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(u(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new Buffer(t.toArray()),i=this.getPrime();if(n.length{var r=n(2525);e.exports=b,b.simpleSieve=g,b.fermatTest=y;var i=n(518),s=new i(24),a=new(n(1595)),o=new i(1),l=new i(2),c=new i(5),d=(new i(16),new i(8),new i(10)),u=new i(3),h=(new i(7),new i(11)),p=new i(4),f=(new i(12),null);function m(){if(null!==f)return f;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;ie;)n.ishrn(1);if(n.isEven()&&n.iadd(o),n.testn(1)||n.iadd(l),t.cmp(l)){if(!t.cmp(c))for(;n.mod(d).cmp(u);)n.iadd(p)}else for(;n.mod(s).cmp(h);)n.iadd(p);if(g(f=n.shrn(1))&&g(n)&&y(f)&&y(n)&&a.test(f)&&a.test(n))return n}}},6289:(e,t,n)=>{"use strict";var r=t;r.version=n(8597).i8,r.utils=n(2629),r.rand=n(6084),r.curve=n(7075),r.curves=n(3297),r.ec=n(4170),r.eddsa=n(156)},5950:(e,t,n)=>{"use strict";var r=n(518),i=n(2629),s=i.getNAF,a=i.getJSF,o=i.assert;function l(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.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=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){o(e.precomputed);var n=e._getDoubles(),r=s(t,1,this._bitLength),i=(1<=a;d--)l=(l<<1)+r[d];c.push(l)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),p=i;p>0;p--){for(a=0;a=0;c--){for(var d=0;c>=0&&0===a[c];c--)d++;if(c>=0&&d++,l=l.dblp(d),c<0)break;var u=a[c];o(0!==u),l="affine"===e.type?u>0?l.mixedAdd(i[u-1>>1]):l.mixedAdd(i[-u-1>>1].neg()):u>0?l.add(i[u-1>>1]):l.add(i[-u-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,n,r,i){var o,l,c,d=this._wnafT1,u=this._wnafT2,h=this._wnafT3,p=0;for(o=0;o=1;o-=2){var m=o-1,g=o;if(1===d[m]&&1===d[g]){var y=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(y[1]=t[m].add(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].add(t[g].neg())):(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=a(n[m],n[g]);for(p=Math.max(v[0].length,p),h[m]=new Array(p),h[g]=new Array(p),l=0;l=0;o--){for(var C=0;o>=0;){var j=!0;for(l=0;l=0&&C++,k=k.dblp(C),o<0)break;for(l=0;l0?c=u[l][E-1>>1]:E<0&&(c=u[l][-E-1>>1].neg()),k="affine"===c.type?k.mixedAdd(c):k.add(c))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i{"use strict";var r=n(2629),i=n(518),s=n(2534),a=n(5950),o=r.assert;function l(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 i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(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 c(e,t,n,r,s){a.BasePoint.call(this,e,"projective"),null===t&&null===n&&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 i(t,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=s&&new i(s,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()))))}s(l,a),e.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),s=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=r.redMul(s.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var l=o.fromRed().isOdd();return(t&&!l||!t&&l)&&(o=o.redNeg()),this.point(e,o)},l.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),s=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(s.redInvm());if(0===a.cmp(this.zero)){if(t)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()!==t&&(o=o.redNeg()),this.point(o,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},s(c,a.BasePoint),l.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},l.prototype.point=function(e,t,n,r){return new c(this,e,t,n,r)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),s=r.redAdd(t),a=s.redSub(n),o=r.redSub(t),l=i.redMul(a),c=s.redMul(o),d=i.redMul(o),u=a.redMul(s);return this.curve.point(l,c,u,d)},c.prototype._projDbl=function(){var e,t,n,r,i,s,a=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var c=(r=this.curve._mulA(o)).redAdd(l);this.zOne?(e=a.redSub(o).redSub(l).redMul(c.redSub(this.curve.two)),t=c.redMul(r.redSub(l)),n=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),s=c.redSub(i).redISub(i),e=a.redSub(o).redISub(l).redMul(s),t=c.redMul(r.redSub(l)),n=c.redMul(s))}else r=o.redAdd(l),i=this.curve._mulC(this.z).redSqr(),s=r.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(r)).redMul(s),t=this.curve._mulC(r).redMul(o.redISub(l)),n=r.redMul(s);return this.curve.point(e,t,n)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),s=n.redSub(t),a=i.redSub(r),o=i.redAdd(r),l=n.redAdd(t),c=s.redMul(a),d=o.redMul(l),u=s.redMul(l),h=a.redMul(o);return this.curve.point(c,d,h,u)},c.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),s=this.x.redMul(e.x),a=this.y.redMul(e.y),o=this.curve.d.redMul(s).redMul(a),l=i.redSub(o),c=i.redAdd(o),d=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(a),u=r.redMul(l).redMul(d);return this.curve.twisted?(t=r.redMul(c).redMul(a.redSub(this.curve._mulA(s))),n=l.redMul(c)):(t=r.redMul(c).redMul(a.redSub(s)),n=this.curve._mulC(l).redMul(c)),this.curve.point(u,t,n)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},c.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},c.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},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},7075:(e,t,n)=>{"use strict";var r=t;r.base=n(5950),r.short=n(5536),r.mont=n(9113),r.edwards=n(2124)},9113:(e,t,n)=>{"use strict";var r=n(518),i=n(2534),s=n(5950),a=n(2629);function o(e){s.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 l(e,t,n){s.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(o,s),e.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},i(l,s.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},o.prototype.point=function(e,t){return new l(this,e,t)},o.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),s=e.x.redSub(e.z).redMul(n),a=i.redMul(r),o=t.z.redMul(s.redAdd(a).redSqr()),l=t.x.redMul(s.redISub(a).redSqr());return this.curve.point(o,l)},l.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var s=i.length-1;s>=0;s--)0===i[s]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},5536:(e,t,n)=>{"use strict";var r=n(2629),i=n(518),s=n(2534),a=n(5950),o=r.assert;function l(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(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 c(e,t,n,r){a.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(n,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 d(e,t,n,r){a.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(n,16),this.z=new i(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}s(l,a),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new i(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))?n=s[0]:(n=s[1],o(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(n)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),n=new i(2).toRed(t).redInvm(),r=n.redNeg(),s=new i(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(s).fromRed(),r.redSub(s).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,n,r,s,a,o,l,c,d,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,p=this.n.clone(),f=new i(1),m=new i(0),g=new i(0),y=new i(1),b=0;0!==h.cmpn(0);){var v=p.div(h);c=p.sub(v.mul(h)),d=g.sub(v.mul(f));var x=y.sub(v.mul(m));if(!r&&c.cmp(u)<0)t=l.neg(),n=f,r=c.neg(),s=d;else if(r&&2===++b)break;l=c,p=h,h=c,g=f,f=d,y=m,m=x}a=c.neg(),o=d;var w=r.sqr().add(s.sqr());return a.sqr().add(o.sqr()).cmp(w)>=0&&(a=t,o=n),r.negative&&(r=r.neg(),s=s.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:r,b:s},{a:a,b:o}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),o=s.mul(r.a),l=i.mul(n.b),c=s.mul(r.b);return{k1:e.sub(a).sub(o),k2:l.add(c).neg()}},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var s=r.fromRed().isOdd();return(t&&!s||!t&&s)&&(r=r.redNeg()),this.point(e,r)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,s=0;s":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(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)},c.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},c.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},c.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))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(d,a.BasePoint),l.prototype.jpoint=function(e,t,n){return new d(this,e,t,n)},d.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},d.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),o=r.redSub(i),l=s.redSub(a);if(0===o.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),d=c.redMul(o),u=r.redMul(c),h=l.redSqr().redIAdd(d).redISub(u).redISub(u),p=l.redMul(u.redISub(h)).redISub(s.redMul(d)),f=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(h,p,f)},d.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),a=n.redSub(r),o=i.redSub(s);if(0===a.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),c=l.redMul(a),d=n.redMul(l),u=o.redSqr().redIAdd(c).redISub(d).redISub(d),h=o.redMul(d.redISub(u)).redISub(i.redMul(c)),p=this.z.redMul(a);return this.curve.jpoint(u,h,p)},d.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},d.prototype.inspect=function(){return this.isInfinity()?"":""},d.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},3297:(e,t,n)=>{"use strict";var r,i=t,s=n(3125),a=n(7075),o=n(2629).assert;function l(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 c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var n=new l(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=l,c("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:s.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("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:s.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("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:s.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("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:s.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"]}),c("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:s.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"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["9"]}),c("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:s.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(1025)}catch(d){r=void 0}c("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:s.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},4170:(e,t,n)=>{"use strict";var r=n(518),i=n(7411),s=n(2629),a=n(3297),o=n(6084),l=s.assert,c=n(615),d=n(3198);function u(e){if(!(this instanceof u))return new u(e);"string"===typeof e&&(l(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=u,u.prototype.keyPair=function(e){return new c(this,e)},u.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},u.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},u.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({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()}),n=this.n.byteLength(),s=this.n.sub(new r(2));;){var a=new r(t.generate(n));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},u.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(e,t,n,s){"object"===typeof n&&(s=n,n=null),s||(s={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var a=this.n.byteLength(),o=t.getPrivate().toArray("be",a),l=e.toArray("be",a),c=new i({hash:this.hash,entropy:o,nonce:l,pers:s.pers,persEnc:s.persEnc||"utf8"}),u=this.n.sub(new r(1)),h=0;;h++){var p=s.k?s.k(h):new r(c.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(u)>=0)){var f=this.g.mul(p);if(!f.isInfinity()){var m=f.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var y=p.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var b=(f.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new d({r:g,s:y,recoveryParam:b})}}}}}},u.prototype.verify=function(e,t,n,i){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,i);var s=(t=new d(t,"hex")).r,a=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o,l=a.invm(this.n),c=l.mul(e).umod(this.n),u=l.mul(s).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(c,n.getPublic(),u)).isInfinity()&&o.eqXToP(s):!(o=this.g.mulAdd(c,n.getPublic(),u)).isInfinity()&&0===o.getX().umod(this.n).cmp(s)},u.prototype.recoverPubKey=function(e,t,n,i){l((3&n)===n,"The recovery param is more than two bits"),t=new d(t,i);var s=this.n,a=new r(e),o=t.r,c=t.s,u=1&n,h=n>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");o=h?this.curve.pointFromX(o.add(this.curve.n),u):this.curve.pointFromX(o,u);var p=t.r.invm(s),f=s.sub(a).mul(p).umod(s),m=c.mul(p).umod(s);return this.g.mulAdd(f,o,m)},u.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new d(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch(e){continue}if(s.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},615:(e,t,n)=>{"use strict";var r=n(518),i=n(2629).assert;function s(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=s,s.fromPublic=function(e,t,n){return t instanceof s?t:new s(e,{pub:t,pubEnc:n})},s.fromPrivate=function(e,t,n){return t instanceof s?t:new s(e,{priv:t,privEnc:n})},s.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"}},s.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},s.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},s.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},s.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},s.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},s.prototype.inspect=function(){return""}},3198:(e,t,n)=>{"use strict";var r=n(518),i=n(2629),s=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(s(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 l(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,s=0,a=t.place;s>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var n=new o;if(48!==e[n.place++])return!1;var s=l(e,n);if(!1===s)return!1;if(s+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var a=l(e,n);if(!1===a)return!1;var c=e.slice(n.place,a+n.place);if(n.place+=a,2!==e[n.place++])return!1;var d=l(e,n);if(!1===d)return!1;if(e.length!==d+n.place)return!1;var u=e.slice(n.place,d+n.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new r(c),this.s=new r(u),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=c(t),n=c(n);!n[0]&&!(128&n[1]);)n=n.slice(1);var r=[2];d(r,t.length),(r=r.concat(t)).push(2),d(r,n.length);var s=r.concat(n),a=[48];return d(a,s.length),a=a.concat(s),i.encode(a,e)}},156:(e,t,n)=>{"use strict";var r=n(3125),i=n(3297),s=n(2629),a=s.assert,o=s.parseBytes,l=n(1722),c=n(8574);function d(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof d))return new d(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=d,d.prototype.sign=function(e,t){e=o(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),s=this.encodePoint(i),a=this.hashInt(s,n.pubBytes(),e).mul(n.priv()),l=r.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:s})},d.prototype.verify=function(e,t,n){e=o(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(s)},d.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var r=n(2629),i=r.assert,s=r.parseBytes,a=r.cachedProperty;function o(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}o.fromPublic=function(e,t){return t instanceof o?t:new o(e,{pub:t})},o.fromSecret=function(e,t){return t instanceof o?t:new o(e,{secret:t})},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,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=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 i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},o.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},o.prototype.getSecret=function(e){return i(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},8574:(e,t,n)=>{"use strict";var r=n(518),i=n(2629),s=i.assert,a=i.cachedProperty,o=i.parseBytes;function l(e,t){this.eddsa=e,"object"!==typeof t&&(t=o(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(l,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(l,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(l,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(l,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=l},1025: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"]]}}},2629:(e,t,n)=>{"use strict";var r=t,i=n(518),s=n(2325),a=n(4034);r.assert=s,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<(i>>1)-1?(i>>1)-l:l,s.isubn(o)):o=0,r[a]=o,s.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,s=0;e.cmpn(-i)>0||t.cmpn(-s)>0;){var a,o,l=e.andln(3)+i&3,c=t.andln(3)+s&3;3===l&&(l=-1),3===c&&(c=-1),a=0===(1&l)?0:3!==(r=e.andln(7)+i&7)&&5!==r||2!==c?l:-l,n[0].push(a),o=0===(1&c)?0:3!==(r=t.andln(7)+s&7)&&5!==r||2!==l?c:-c,n[1].push(o),2*i===a+1&&(i=1-i),2*s===o+1&&(s=1-s),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},7465:e=>{"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"===typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.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 l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,s,a,c;if(o(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),a=s[t]),void 0===a)a=s[t]=n,++e._eventsCount;else if("function"===typeof a?a=s[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=a.length,c=d,console&&console.warn&&console.warn(c)}return e}function d(){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 u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=s[e];if(void 0===l)return!1;if("function"===typeof l)r(l,this,t);else{var c=l.length,d=f(l,c);for(n=0;n=0;s--)if(n[s]===t||n[s].listener===t){a=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},8462:(e,t,n)=>{var r=n(2543).Buffer,i=n(8437);e.exports=function(e,t,n,s){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,o=r.alloc(a),l=r.alloc(s||0),c=r.alloc(0);a>0||s>0;){var d=new i;d.update(c),d.update(e),t&&d.update(t),c=d.digest();var u=0;if(a>0){var h=o.length-a;u=Math.min(a,c.length),c.copy(o,h,0,u),a-=u}if(u0){var p=l.length-s,f=Math.min(s,c.length-u);c.copy(l,p,u,u+f),s-=f}}return c.fill(0),{key:o,iv:l}}},8567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFSA=a,t.isError=function(e){return a(e)&&!0===e.error};var r=s(n(4519)),i=s(n(3988));function s(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,r.default)(e)&&(0,i.default)(e.type)&&Object.keys(e).every(o)}function o(e){return["type","payload","error","meta"].indexOf(e)>-1}},732:(e,t,n)=>{"use strict";const{Buffer:r}=n(9778),{createHash:i,createHmac:s}=n(6433),a={},o=e=>{switch(e){case"sha256":case"sha3-256":case"blake2s256":return 32;case"sha512":case"sha3-512":case"blake2b512":return 64;case"sha224":case"sha3-224":return 28;case"sha384":case"sha3-384":return 48;case"sha1":return 20;case"md5":return 16;default:{let t=a[e];return void 0===t&&(t=i(e).digest().length,a[e]=t),t}}},l=(e,t,n,i)=>{const a=r.isBuffer(n)?n:r.from(n),o=i&&i.length?r.from(i):r.alloc(t,0);return s(e,o).update(a).digest()},c=(e,t,n,i,a)=>{const o=r.isBuffer(a)?a:r.from(a||""),l=o.length,c=Math.ceil(i/t);if(c>255)throw new Error("OKM length ".concat(i," is too long for ").concat(e," hash"));const d=r.alloc(t*c+l+1);for(let r=1,u=0,h=0;r<=c;++r)o.copy(d,h),d[h+l]=r,s(e,n).update(d.slice(u,h+l+1)).digest().copy(d,h),u=h,h+=t;return d.slice(0,i)};function d(e,t){let{salt:n="",info:r="",hash:i="SHA-256"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i=i.toLowerCase().replace("-","");const s=o(i),a=l(i,s,e,n);return c(i,s,a,t,r)}Object.defineProperties(d,{hash_length:{configurable:!1,enumerable:!1,writable:!1,value:o},extract:{configurable:!1,enumerable:!1,writable:!1,value:l},expand:{configurable:!1,enumerable:!1,writable:!1,value:c}}),e.exports=d},6266:(e,t,n)=>{"use strict";var r=n(2543).Buffer,i=n(723).Transform;function s(e){i.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(2534)(s,i),s.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(i){r=i}n(r)},s.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(n){t=n}e(t)},s.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var s=this._blockOffset;s0;++a)this._length[a]+=o,(o=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*o);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},s.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=s},3125:(e,t,n)=>{var r=t;r.utils=n(9046),r.common=n(9684),r.sha=n(9194),r.ripemd=n(6645),r.hmac=n(3609),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},9684:(e,t,n)=>{"use strict";var r=n(9046),i=n(2325);function s(){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}t.BlockHash=s,s.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s{"use strict";var r=n(9046),i=n(2325);function s(e,t,n){if(!(this instanceof s))return new s(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=s,s.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var r=n(9046),i=n(9684),s=r.rotl32,a=r.sum32,o=r.sum32_3,l=r.sum32_4,c=i.BlockHash;function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function u(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function p(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(d,c),t.ripemd160=d,d.blockSize=512,d.outSize=160,d.hmacStrength=192,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],c=this.h[3],d=this.h[4],b=n,v=r,x=i,w=c,k=d,S=0;S<80;S++){var C=a(s(l(n,u(S,r,i,c),e[f[S]+t],h(S)),g[S]),d);n=d,d=c,c=s(i,10),i=r,r=C,C=a(s(l(b,u(79-S,v,x,w),e[m[S]+t],p(S)),y[S]),k),b=k,k=w,w=s(x,10),x=v,v=C}C=o(this.h[1],i,w),this.h[1]=o(this.h[2],c,k),this.h[2]=o(this.h[3],d,b),this.h[3]=o(this.h[4],n,v),this.h[4]=o(this.h[0],r,x),this.h[0]=C},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var f=[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],m=[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],g=[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],y=[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]},9194:(e,t,n)=>{"use strict";t.sha1=n(7361),t.sha224=n(7753),t.sha256=n(6966),t.sha384=n(1233),t.sha512=n(9063)},7361:(e,t,n)=>{"use strict";var r=n(9046),i=n(9684),s=n(4343),a=r.rotl32,o=r.sum32,l=r.sum32_5,c=s.ft_1,d=i.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(h,d),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var r=n(9046),i=n(6966);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(s,i),e.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},6966:(e,t,n)=>{"use strict";var r=n(9046),i=n(9684),s=n(4343),a=n(2325),o=r.sum32,l=r.sum32_4,c=r.sum32_5,d=s.ch32,u=s.maj32,h=s.s0_256,p=s.s1_256,f=s.g0_256,m=s.g1_256,g=i.BlockHash,y=[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 b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}r.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var r=n(9046),i=n(9063);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(s,i),e.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},9063:(e,t,n)=>{"use strict";var r=n(9046),i=n(9684),s=n(2325),a=r.rotr64_hi,o=r.rotr64_lo,l=r.shr64_hi,c=r.shr64_lo,d=r.sum64,u=r.sum64_hi,h=r.sum64_lo,p=r.sum64_4_hi,f=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,y=i.BlockHash,b=[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 v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function x(e,t,n,r,i){var s=e&n^~e&i;return s<0&&(s+=4294967296),s}function w(e,t,n,r,i,s){var a=t&r^~t&s;return a<0&&(a+=4294967296),a}function k(e,t,n,r,i){var s=e&n^e&i^n&i;return s<0&&(s+=4294967296),s}function S(e,t,n,r,i,s){var a=t&r^t&s^r&s;return a<0&&(a+=4294967296),a}function C(e,t){var n=a(e,t,28)^a(t,e,2)^a(t,e,7);return n<0&&(n+=4294967296),n}function j(e,t){var n=o(e,t,28)^o(t,e,2)^o(t,e,7);return n<0&&(n+=4294967296),n}function E(e,t){var n=a(e,t,14)^a(e,t,18)^a(t,e,9);return n<0&&(n+=4294967296),n}function N(e,t){var n=o(e,t,14)^o(e,t,18)^o(t,e,9);return n<0&&(n+=4294967296),n}function T(e,t){var n=a(e,t,1)^a(e,t,8)^l(e,t,7);return n<0&&(n+=4294967296),n}function _(e,t){var n=o(e,t,1)^o(e,t,8)^c(e,t,7);return n<0&&(n+=4294967296),n}function M(e,t){var n=a(e,t,19)^a(t,e,29)^l(e,t,6);return n<0&&(n+=4294967296),n}function A(e,t){var n=o(e,t,19)^o(t,e,29)^c(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r{"use strict";var r=n(9046).rotr32;function i(e,t,n){return e&t^~e&n}function s(e,t,n){return e&t^e&n^t&n}function a(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?a(t,n,r):2===e?s(t,n,r):void 0},t.ch32=i,t.maj32=s,t.p32=a,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},9046:(e,t,n)=>{"use strict";var r=n(2325),i=n(2534);function s(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+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 l(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}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,n[r++]=63&a|128):s(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=255&s):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=255&s)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],s=r+e[t+1]>>>0,a=(s>>0,e[t+1]=s},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,s,a,o){var l=0,c=t;return l+=(c=c+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,i,s,a,o){return t+r+s+o>>>0},t.sum64_5_hi=function(e,t,n,r,i,s,a,o,l,c){var d=0,u=t;return d+=(u=u+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,i,s,a,o,l,c){return t+r+s+o+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},390:(e,t,n)=>{"use strict";n.d(t,{aU:()=>r,lX:()=>l});var r,i=n(7462);!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));var s=function(e){return e};var a="beforeunload",o="popstate";function l(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,l=n.history;function f(){var e=n.location,t=e.pathname,r=e.search,i=e.hash,a=l.state||{};return[a.idx,s({pathname:t,search:r,hash:i,state:a.usr||null,key:a.key||"default"})]}var m=null;n.addEventListener(o,(function(){if(m)w.call(m),m=null;else{var e=r.Pop,t=f(),n=t[0],i=t[1];if(w.length){if(null!=n){var s=b-n;s&&(m={action:e,location:i,retry:function(){N(-1*s)}},N(s))}}else E(e)}}));var g=r.Pop,y=f(),b=y[0],v=y[1],x=d(),w=d();function k(e){return"string"===typeof e?e:h(e)}function S(e,t){return void 0===t&&(t=null),s((0,i.Z)({pathname:v.pathname,hash:"",search:""},"string"===typeof e?p(e):e,{state:t,key:u()}))}function C(e,t){return[{usr:e.state,key:e.key,idx:t},k(e)]}function j(e,t,n){return!w.length||(w.call({action:e,location:t,retry:n}),!1)}function E(e){g=e;var t=f();b=t[0],v=t[1],x.call({action:g,location:v})}function N(e){l.go(e)}null==b&&(b=0,l.replaceState((0,i.Z)({},l.state,{idx:b}),""));var T={get action(){return g},get location(){return v},createHref:k,push:function e(t,i){var s=r.Push,a=S(t,i);if(j(s,a,(function(){e(t,i)}))){var o=C(a,b+1),c=o[0],d=o[1];try{l.pushState(c,"",d)}catch(u){n.location.assign(d)}E(s)}},replace:function e(t,n){var i=r.Replace,s=S(t,n);if(j(i,s,(function(){e(t,n)}))){var a=C(s,b),o=a[0],c=a[1];l.replaceState(o,"",c),E(i)}},go:N,back:function(){N(-1)},forward:function(){N(1)},listen:function(e){return x.push(e)},block:function(e){var t=w.push(e);return 1===w.length&&n.addEventListener(a,c),function(){t(),w.length||n.removeEventListener(a,c)}}};return T}function c(e){e.preventDefault(),e.returnValue=""}function d(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function u(){return Math.random().toString(36).substr(2,8)}function h(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,s=e.hash,a=void 0===s?"":s;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function p(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}},7411:(e,t,n)=>{"use strict";var r=n(3125),i=n(4034),s=n(2325);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),r=i.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=a,a.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},a.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(r=n,n=t,t=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var s=[];s.length{"use strict";var r=n(8309),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function l(e){return r.isMemo(e)?a:o[e.$$typeof]||i}o[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[r.Memo]=a;var c=Object.defineProperty,d=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var a=d(n);u&&(a=a.concat(u(n)));for(var o=l(t),m=l(n),g=0;g{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,o=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case u:case s:case o:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case l:return e;default:return t}}case i:return t}}}function k(e){return w(e)===u}t.AsyncMode=d,t.ConcurrentMode=u,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=o,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return k(e)||w(e)===d},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===s},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===o},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===s||e===u||e===o||e===a||e===p||e===f||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===b||e.$$typeof===v||e.$$typeof===x||e.$$typeof===y)},t.typeOf=w},8309:(e,t,n)=>{"use strict";e.exports=n(746)},4943:e=>{e.exports=function(e,t){var n=(t=t||{}).delimiter||",",r=t.separator||".";return(e=e.toString().split("."))[0]=e[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),e.join(r)}},4038:(e,t)=>{t.read=function(e,t,n,r,i){var s,a,o=8*i-r-1,l=(1<>1,d=-7,u=n?i-1:0,h=n?-1:1,p=e[t+u];for(u+=h,s=p&(1<<-d)-1,p>>=-d,d+=o;d>0;s=256*s+e[t+u],u+=h,d-=8);for(a=s&(1<<-d)-1,s>>=-d,d+=r;d>0;a=256*a+e[t+u],u+=h,d-=8);if(0===s)s=1-c;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),s-=c}return(p?-1:1)*a*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var a,o,l,c=8*s-i-1,d=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?h/l:h*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=d?(o=0,a=d):a+u>=1?(o=(t*l-1)*Math.pow(2,i),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&o,p+=f,o/=256,i-=8);for(a=a<0;e[n+p]=255&a,p+=f,a/=256,c-=8);e[n+p-f]|=128*m}},2534:e=>{"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},7950:e=>{function t(e){return!!e&&("object"===typeof e||"function"===typeof e)&&"function"===typeof e.then}e.exports=t,e.exports.default=t},5095:(e,t,n)=>{var r=NaN,i="[object Symbol]",s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,h=d||u||Function("return this")(),p=Object.prototype.toString,f=Math.max,m=Math.min,g=function(){return h.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==i}(e))return r;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=o.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?r:+e}e.exports=function(e,t,n){var r,i,s,a,o,l,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,s=i;return r=i=void 0,c=t,a=e.apply(s,n)}function v(e){var n=e-l;return void 0===l||n>=t||n<0||u&&e-c>=s}function x(){var e=g();if(v(e))return w(e);o=setTimeout(x,function(e){var n=t-(e-l);return u?m(n,s-(e-c)):n}(e))}function w(e){return o=void 0,h&&r?p(e):(r=i=void 0,a)}function k(){var e=g(),n=v(e);if(r=arguments,i=this,l=e,n){if(void 0===o)return function(e){return c=e,o=setTimeout(x,t),d?p(e):a}(l);if(u)return o=setTimeout(x,t),p(l)}return void 0===o&&(o=setTimeout(x,t)),a}return t=b(t)||0,y(n)&&(d=!!n.leading,s=(u="maxWait"in n)?f(b(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),k.cancel=function(){void 0!==o&&clearTimeout(o),c=0,r=l=i=o=void 0},k.flush=function(){return void 0===o?a:w(g())},k}},4519:e=>{var t,n,r=Function.prototype,i=Object.prototype,s=r.toString,a=i.hasOwnProperty,o=s.call(Object),l=i.toString,c=(t=Object.getPrototypeOf,n=Object,function(e){return t(n(e))});e.exports=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=l.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e))return!1;var t=c(e);if(null===t)return!0;var n=a.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==o}},3988:e=>{var t=Object.prototype.toString,n=Array.isArray;e.exports=function(e){return"string"==typeof e||!n(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==t.call(e)}},908:(e,t,n)=>{var r=n(5385)(n(7009),"DataView");e.exports=r},9676:(e,t,n)=>{var r=n(5403),i=n(2747),s=n(6037),a=n(4154),o=n(7728);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(3894),i=n(8699),s=n(4957),a=n(7184),o=n(7109);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(5385)(n(7009),"Map");e.exports=r},8059:(e,t,n)=>{var r=n(4086),i=n(9255),s=n(9186),a=n(3423),o=n(3739);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(5385)(n(7009),"Promise");e.exports=r},3924:(e,t,n)=>{var r=n(5385)(n(7009),"Set");e.exports=r},692:(e,t,n)=>{var r=n(8059),i=n(5774),s=n(1596);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(8384),i=n(511),s=n(835),a=n(707),o=n(8832),l=n(5077);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=s,c.prototype.get=a,c.prototype.has=o,c.prototype.set=l,e.exports=c},7197:(e,t,n)=>{var r=n(7009).Symbol;e.exports=r},6219:(e,t,n)=>{var r=n(7009).Uint8Array;e.exports=r},7091:(e,t,n)=>{var r=n(5385)(n(7009),"WeakMap");e.exports=r},4903:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n{var r=n(6478),i=n(4963),s=n(3629),a=n(5174),o=n(6800),l=n(9102),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=s(e),d=!n&&i(e),u=!n&&!d&&a(e),h=!n&&!d&&!u&&l(e),p=n||d||u||h,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||u&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,m))||f.push(g);return f}},8950:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(9231);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},1986:(e,t,n)=>{var r=n(1705),i=n(3629);e.exports=function(e,t,n){var s=t(e);return i(e)?s:r(s,n(e))}},9066:(e,t,n)=>{var r=n(7197),i=n(1587),s=n(3581),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):s(e)}},4906:(e,t,n)=>{var r=n(9066),i=n(3141);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},1848:(e,t,n)=>{var r=n(3355),i=n(3141);e.exports=function e(t,n,s,a,o){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!==t&&n!==n:r(t,n,s,a,e,o))}},3355:(e,t,n)=>{var r=n(2854),i=n(5305),s=n(2206),a=n(8078),o=n(8383),l=n(3629),c=n(5174),d=n(9102),u="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,y){var b=l(e),v=l(t),x=b?h:o(e),w=v?h:o(t),k=(x=x==u?p:x)==p,S=(w=w==u?p:w)==p,C=x==w;if(C&&c(e)){if(!c(t))return!1;b=!0,k=!1}if(C&&!k)return y||(y=new r),b||d(e)?i(e,t,n,m,g,y):s(e,t,x,n,m,g,y);if(!(1&n)){var j=k&&f.call(e,"__wrapped__"),E=S&&f.call(t,"__wrapped__");if(j||E){var N=j?e.value():e,T=E?t.value():t;return y||(y=new r),g(N,T,n,m,y)}}return!!C&&(y||(y=new r),a(e,t,n,m,g,y))}},6703:(e,t,n)=>{var r=n(4786),i=n(257),s=n(8092),a=n(7907),o=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,d=l.toString,u=c.hasOwnProperty,h=RegExp("^"+d.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||i(e))&&(r(e)?h:o).test(a(e))}},8150:(e,t,n)=>{var r=n(9066),i=n(4635),s=n(3141),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return s(e)&&i(e.length)&&!!a[r(e)]}},3654:(e,t,n)=>{var r=n(2936),i=n(8836),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))s.call(e,n)&&"constructor"!=n&&t.push(n);return t}},7255:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,i,s){for(var a=-1,o=n(t((r-e)/(i||1)),0),l=Array(o);o--;)l[s?o:++a]=e,e+=i;return l}},6478:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(7197),i=n(8950),s=n(3629),a=n(152),o=r?r.prototype:void 0,l=o?o.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},821:(e,t,n)=>{var r=n(6050),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},6194:e=>{e.exports=function(e){return function(t){return e(t)}}},75:e=>{e.exports=function(e,t){return e.has(t)}},5525:(e,t,n)=>{var r=n(7009)["__core-js_shared__"];e.exports=r},6381:(e,t,n)=>{var r=n(7255),i=n(3195),s=n(1495);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=s(t),void 0===n?(n=t,t=0):n=s(n),a=void 0===a?t{var r=n(7009),i=n(9753),s=n(2582),a=n(3518),o=r.isFinite,l=Math.min;e.exports=function(e){var t=Math[e];return function(e,n){if(e=s(e),(n=null==n?0:l(i(n),292))&&o(e)){var r=(a(e)+"e").split("e"),c=t(r[0]+"e"+(+r[1]+n));return+((r=(a(c)+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}},5305:(e,t,n)=>{var r=n(692),i=n(7897),s=n(75);e.exports=function(e,t,n,a,o,l){var c=1&n,d=e.length,u=t.length;if(d!=u&&!(c&&u>d))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f{var r=n(7197),i=n(6219),s=n(9231),a=n(5305),o=n(234),l=n(2230),c=r?r.prototype:void 0,d=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,u,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!u(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=o;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)return!1;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=a(p(e),p(t),r,c,u,h);return h.delete(e),g;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},8078:(e,t,n)=>{var r=n(8248),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,s,a,o){var l=1&n,c=r(e),d=c.length;if(d!=r(t).length&&!l)return!1;for(var u=d;u--;){var h=c[u];if(!(l?h in t:i.call(t,h)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var g=l;++u{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8248:(e,t,n)=>{var r=n(1986),i=n(5918),s=n(2742);e.exports=function(e){return r(e,s,i)}},2799:(e,t,n)=>{var r=n(5964);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},5385:(e,t,n)=>{var r=n(6703),i=n(40);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},1587:(e,t,n)=>{var r=n(7197),i=Object.prototype,s=i.hasOwnProperty,a=i.toString,o=r?r.toStringTag:void 0;e.exports=function(e){var t=s.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[o]=n:delete e[o]),i}},5918:(e,t,n)=>{var r=n(4903),i=n(8174),s=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return s.call(e,t)})))}:i;e.exports=o},8383:(e,t,n)=>{var r=n(908),i=n(5797),s=n(8319),a=n(3924),o=n(7091),l=n(9066),c=n(7907),d="[object Map]",u="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",m=c(r),g=c(i),y=c(s),b=c(a),v=c(o),x=l;(r&&x(new r(new ArrayBuffer(1)))!=f||i&&x(new i)!=d||s&&x(s.resolve())!=u||a&&x(new a)!=h||o&&x(new o)!=p)&&(x=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case m:return f;case g:return d;case y:return u;case b:return h;case v:return p}return t}),e.exports=x},40:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},5403:(e,t,n)=>{var r=n(9620);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2747:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6037:(e,t,n)=>{var r=n(9620),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},4154:(e,t,n)=>{var r=n(9620),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},7728:(e,t,n)=>{var r=n(9620);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},6800:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{var r=n(9231),i=n(1473),s=n(6800),a=n(8092);e.exports=function(e,t,n){if(!a(n))return!1;var o=typeof t;return!!("number"==o?i(n)&&s(t,n.length):"string"==o&&t in n)&&r(n[t],e)}},5964:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},257:(e,t,n)=>{var r=n(5525),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},2936:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},3894:e=>{e.exports=function(){this.__data__=[],this.size=0}},8699:(e,t,n)=>{var r=n(7112),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},4957:(e,t,n)=>{var r=n(7112);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7184:(e,t,n)=>{var r=n(7112);e.exports=function(e){return r(this.__data__,e)>-1}},7109:(e,t,n)=>{var r=n(7112);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4086:(e,t,n)=>{var r=n(9676),i=n(8384),s=n(5797);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||i),string:new r}}},9255:(e,t,n)=>{var r=n(2799);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},9186:(e,t,n)=>{var r=n(2799);e.exports=function(e){return r(this,e).get(e)}},3423:(e,t,n)=>{var r=n(2799);e.exports=function(e){return r(this,e).has(e)}},3739:(e,t,n)=>{var r=n(2799);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},234:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},9620:(e,t,n)=>{var r=n(5385)(Object,"create");e.exports=r},8836:(e,t,n)=>{var r=n(2709)(Object.keys,Object);e.exports=r},9494:(e,t,n)=>{e=n.nmd(e);var r=n(1032),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,a=s&&s.exports===i&&r.process,o=function(){try{var e=s&&s.require&&s.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=o},3581:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},2709:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},7009:(e,t,n)=>{var r=n(1032),i="object"==typeof self&&self&&self.Object===Object&&self,s=r||i||Function("return this")();e.exports=s},5774:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1596:e=>{e.exports=function(e){return this.__data__.has(e)}},2230:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},511:(e,t,n)=>{var r=n(8384);e.exports=function(){this.__data__=new r,this.size=0}},835:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},707:e=>{e.exports=function(e){return this.__data__.get(e)}},8832:e=>{e.exports=function(e){return this.__data__.has(e)}},5077:(e,t,n)=>{var r=n(8384),i=n(5797),s=n(8059);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new s(a)}return n.set(e,t),this.size=n.size,this}},7907:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},6050:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},9231:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},4963:(e,t,n)=>{var r=n(4906),i=n(3141),s=Object.prototype,a=s.hasOwnProperty,o=s.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},3629:e=>{var t=Array.isArray;e.exports=t},1473:(e,t,n)=>{var r=n(4786),i=n(4635);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},5174:(e,t,n)=>{e=n.nmd(e);var r=n(7009),i=n(9488),s=t&&!t.nodeType&&t,a=s&&e&&!e.nodeType&&e,o=a&&a.exports===s?r.Buffer:void 0,l=(o?o.isBuffer:void 0)||i;e.exports=l},8111:(e,t,n)=>{var r=n(1848);e.exports=function(e,t){return r(e,t)}},4786:(e,t,n)=>{var r=n(9066),i=n(8092);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},4635:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},8092:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3141:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},152:(e,t,n)=>{var r=n(9066),i=n(3141);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},9102:(e,t,n)=>{var r=n(8150),i=n(6194),s=n(9494),a=s&&s.isTypedArray,o=a?i(a):r;e.exports=o},2742:(e,t,n)=>{var r=n(7538),i=n(3654),s=n(1473);e.exports=function(e){return s(e)?r(e):i(e)}},6222:(e,t,n)=>{var r=n(6381)();e.exports=r},871:(e,t,n)=>{var r=n(2658)("round");e.exports=r},8174:e=>{e.exports=function(){return[]}},9488:e=>{e.exports=function(){return!1}},1495:(e,t,n)=>{var r=n(2582),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},9753:(e,t,n)=>{var r=n(1495);e.exports=function(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}},2582:(e,t,n)=>{var r=n(821),i=n(8092),s=n(152),a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=o.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},3518:(e,t,n)=>{var r=n(2446);e.exports=function(e){return null==e?"":r(e)}},9640:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(e){super("Invalid DateTime: ".concat(e.toMessage()))}}class i extends n{constructor(e){super("Invalid Interval: ".concat(e.toMessage()))}}class s extends n{constructor(e){super("Invalid Duration: ".concat(e.toMessage()))}}class a extends n{}class o extends n{constructor(e){super("Invalid unit ".concat(e))}}class l extends n{}class c extends n{constructor(){super("Zone is an abstract class")}}const d="numeric",u="short",h="long",p={year:d,month:d,day:d},f={year:d,month:u,day:d},m={year:d,month:u,day:d,weekday:u},g={year:d,month:h,day:d},y={year:d,month:h,day:d,weekday:h},b={hour:d,minute:d},v={hour:d,minute:d,second:d},x={hour:d,minute:d,second:d,timeZoneName:u},w={hour:d,minute:d,second:d,timeZoneName:h},k={hour:d,minute:d,hourCycle:"h23"},S={hour:d,minute:d,second:d,hourCycle:"h23"},C={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:u},j={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:h},E={year:d,month:d,day:d,hour:d,minute:d},N={year:d,month:d,day:d,hour:d,minute:d,second:d},T={year:d,month:u,day:d,hour:d,minute:d},_={year:d,month:u,day:d,hour:d,minute:d,second:d},M={year:d,month:u,day:d,weekday:u,hour:d,minute:d},A={year:d,month:h,day:d,hour:d,minute:d,timeZoneName:u},R={year:d,month:h,day:d,hour:d,minute:d,second:d,timeZoneName:u},I={year:d,month:h,day:d,weekday:h,hour:d,minute:d,timeZoneName:h},D={year:d,month:h,day:d,weekday:h,hour:d,minute:d,second:d,timeZoneName:h};class B{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let O=null;class P extends B{static get instance(){return null===O&&(O=new P),O}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,t){let{format:n,locale:r}=t;return $e(e,n,r)}formatOffset(e,t){return et(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let L={};const z={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let F={};class U extends B{static create(e){return F[e]||(F[e]=new U(e)),F[e]}static resetCache(){F={},L={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(t){return!1}}constructor(e){super(),this.zoneName=e,this.valid=U.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,t){let{format:n,locale:r}=t;return $e(e,n,r,this.name)}formatOffset(e,t){return et(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=(r=this.name,L[r]||(L[r]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),L[r]);var r;let[i,s,a,o,l,c,d]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let i=0;i=0?h:1e3+h,(Ye({year:i,month:s,day:a,hour:24===l?0:l,minute:c,second:d,millisecond:0})-u)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let V={};let W={};function H(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let r=W[n];return r||(r=new Intl.DateTimeFormat(e,t),W[n]=r),r}let K={};let Y={};let Z=null;let G={};function q(e,t,n,r){const i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class ${constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...s}=n;if(!t||Object.keys(s).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let r=K[n];return r||(r=new Intl.NumberFormat(e,t),K[n]=r),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Le(this.floor?Math.floor(e):Ve(e,3),this.padTo)}}class X{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?"Etc/GMT+".concat(t):"Etc/GMT".concat(t);0!==e.offset&&U.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=H(t,i)}format(){return this.originalZone?this.formatToParts().map((e=>{let{value:t}=e;return t})).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Q{constructor(e,t,n){this.opts={style:"long",...n},!t&&Re()&&(this.rtf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{base:n,...r}=t,i=JSON.stringify([e,r]);let s=Y[i];return s||(s=new Intl.RelativeTimeFormat(e,t),Y[i]=s),s}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"always",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&s){const n="days"===e;switch(t){case 1:return n?"tomorrow":"next ".concat(i[e][0]);case-1:return n?"yesterday":"last ".concat(i[e][0]);case 0:return n?"today":"this ".concat(i[e][0])}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,c=i[e],d=r?l?c[1]:c[2]||c[1]:l?i[e][0]:e;return a?"".concat(o," ").concat(d," ago"):"in ".concat(o," ").concat(d)}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const J={firstDay:1,minimalDays:4,weekend:[6,7]};class ee{static fromOpts(e){return ee.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=e||pe.defaultLocale,a=s||(i?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),o=t||pe.defaultNumberingSystem,l=n||pe.defaultOutputCalendar,c=Oe(r)||pe.defaultWeekSettings;return new ee(a,o,l,c,s)}static resetCache(){Z=null,W={},K={},Y={}}static fromObject(){let{locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ee.create(e,t,n,r)}constructor(e,t,n,r,i){const[s,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,i;try{t=H(e).resolvedOptions(),i=e}catch(r){const s=e.substring(0,n);t=H(s).resolvedOptions(),i=s}const{numberingSystem:s,calendar:a}=t;return[i,s,a]}}(e);this.locale=s,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+="-ca-".concat(n)),t&&(e+="-nu-".concat(t)),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(null===this.numberingSystem||"latn"===this.numberingSystem)&&(null===this.outputCalendar||"gregory"===this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ee.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Oe(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.clone({...e,defaultToEN:!0})}redefaultToSystem(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.clone({...e,defaultToEN:!1})}months(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return q(this,e,st,(()=>{const n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=pr.utc(2009,n,1);t.push(e(r))}return t}((e=>this.extract(e,n,"month")))),this.monthsCache[r][e]}))}weekdays(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return q(this,e,ct,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=pr.utc(2016,11,13+n);t.push(e(r))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[r][e]}))}meridiems(){return q(this,void 0,(()=>dt),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[pr.utc(2016,11,13,9),pr.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return q(this,e,ft,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[pr.utc(-40,1,1),pr.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return r?r.value:null}numberFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new $(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new X(e,this.intl,t)}relFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Q(this.intl,this.isEnglish(),e)}listFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let r=V[n];return r||(r=new Intl.ListFormat(e,t),V[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ie()?function(e){let t=G[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,G[e]=t}return t}(this.locale):J}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let te=null;class ne extends B{static get utcInstance(){return null===te&&(te=new ne(0)),te}static instance(e){return 0===e?ne.utcInstance:new ne(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ne(Xe(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":"UTC".concat(et(this.fixed,"narrow"))}get ianaName(){return 0===this.fixed?"Etc/UTC":"Etc/GMT".concat(et(-this.fixed,"narrow"))}offsetName(){return this.name}formatOffset(e,t){return et(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class re extends B{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ie(e,t){if(_e(e)||null===e)return t;if(e instanceof B)return e;if("string"===typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?P.instance:"utc"===n||"gmt"===n?ne.utcInstance:ne.parseSpecifier(n)||U.create(e)}return Me(e)?ne.instance(e):"object"===typeof e&&"offset"in e&&"function"===typeof e.offset?e:new re(e)}let se,ae=()=>Date.now(),oe="system",le=null,ce=null,de=null,ue=60,he=null;class pe{static get now(){return ae}static set now(e){ae=e}static set defaultZone(e){oe=e}static get defaultZone(){return ie(oe,P.instance)}static get defaultLocale(){return le}static set defaultLocale(e){le=e}static get defaultNumberingSystem(){return ce}static set defaultNumberingSystem(e){ce=e}static get defaultOutputCalendar(){return de}static set defaultOutputCalendar(e){de=e}static get defaultWeekSettings(){return he}static set defaultWeekSettings(e){he=Oe(e)}static get twoDigitCutoffYear(){return ue}static set twoDigitCutoffYear(e){ue=e%100}static get throwOnInvalid(){return se}static set throwOnInvalid(e){se=e}static resetCaches(){ee.resetCache(),U.resetCache()}}class fe{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?"".concat(this.reason,": ").concat(this.explanation):this.reason}}const me=[0,31,59,90,120,151,181,212,243,273,304,334],ge=[0,31,60,91,121,152,182,213,244,274,305,335];function ye(e,t){return new fe("unit out of range","you specified ".concat(t," (of type ").concat(typeof t,") as a ").concat(e,", which is invalid"))}function be(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return 0===i?7:i}function ve(e,t,n){return n+(We(e)?ge:me)[t-1]}function xe(e,t){const n=We(e)?ge:me,r=n.findIndex((e=>e1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{year:r,month:i,day:s}=e,a=ve(r,i,s),o=we(be(r,i,s),n);let l,c=Math.floor((a-o+14-t)/7);return c<1?(l=r-1,c=Ge(l,t,n)):c>Ge(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:o,...tt(e)}}function Se(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{weekYear:r,weekNumber:i,weekday:s}=e,a=we(be(r,1,t),n),o=He(r);let l,c=7*i+s-a-7+t;c<1?(l=r-1,c+=He(l)):c>o?(l=r+1,c-=He(r)):l=r;const{month:d,day:u}=xe(l,c);return{year:l,month:d,day:u,...tt(e)}}function Ce(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:ve(t,n,r),...tt(e)}}function je(e){const{year:t,ordinal:n}=e,{month:r,day:i}=xe(t,n);return{year:t,month:r,day:i,...tt(e)}}function Ee(e,t){if(!_e(e.localWeekday)||!_e(e.localWeekNumber)||!_e(e.localWeekYear)){if(!_e(e.weekday)||!_e(e.weekNumber)||!_e(e.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return _e(e.localWeekday)||(e.weekday=e.localWeekday),_e(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),_e(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Ne(e){const t=Ae(e.year),n=Pe(e.month,1,12),r=Pe(e.day,1,Ke(e.year,e.month));return t?n?!r&&ye("day",e.day):ye("month",e.month):ye("year",e.year)}function Te(e){const{hour:t,minute:n,second:r,millisecond:i}=e,s=Pe(t,0,23)||24===t&&0===n&&0===r&&0===i,a=Pe(n,0,59),o=Pe(r,0,59),l=Pe(i,0,999);return s?a?o?!l&&ye("millisecond",i):ye("second",r):ye("minute",n):ye("hour",t)}function _e(e){return"undefined"===typeof e}function Me(e){return"number"===typeof e}function Ae(e){return"number"===typeof e&&e%1===0}function Re(){try{return"undefined"!==typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Ie(){try{return"undefined"!==typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function De(e,t,n){if(0!==e.length)return e.reduce(((e,r)=>{const i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i}),null)[1]}function Be(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Oe(e){if(null==e)return null;if("object"!==typeof e)throw new l("Week settings must be an object");if(!Pe(e.firstDay,1,7)||!Pe(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!Pe(e,1,7))))throw new l("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Pe(e,t,n){return Ae(e)&&e>=t&&e<=n}function Le(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function ze(e){return _e(e)||null===e||""===e?void 0:parseInt(e,10)}function Fe(e){return _e(e)||null===e||""===e?void 0:parseFloat(e)}function Ue(e){if(!_e(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ve(e,t){const n=10**t;return(arguments.length>2&&void 0!==arguments[2]&&arguments[2]?Math.trunc:Math.round)(e*n)/n}function We(e){return e%4===0&&(e%100!==0||e%400===0)}function He(e){return We(e)?366:365}function Ke(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?We(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ye(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Ze(e,t,n){return-we(be(e,1,t),n)+t-1}function Ge(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=Ze(e,t,n),i=Ze(e+1,t,n);return(He(e)-r+i)/7}function qe(e){return e>99?e:e>pe.twoDigitCutoffYear?1900+e:2e3+e}function $e(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const a={timeZoneName:t,...s},o=new Intl.DateTimeFormat(n,a).formatToParts(i).find((e=>"timezonename"===e.type.toLowerCase()));return o?o.value:null}function Xe(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function Qe(e){const t=Number(e);if("boolean"===typeof e||""===e||Number.isNaN(t))throw new l("Invalid unit value ".concat(e));return t}function Je(e,t){const n={};for(const r in e)if(Be(e,r)){const i=e[r];if(void 0===i||null===i)continue;n[t(r)]=Qe(i)}return n}function et(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return"".concat(i).concat(Le(n,2),":").concat(Le(r,2));case"narrow":return"".concat(i).concat(n).concat(r>0?":".concat(r):"");case"techie":return"".concat(i).concat(Le(n,2)).concat(Le(r,2));default:throw new RangeError("Value format ".concat(t," is out of range for property format"))}}function tt(e){return function(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}(e,["hour","minute","second","millisecond"])}const nt=["January","February","March","April","May","June","July","August","September","October","November","December"],rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],it=["J","F","M","A","M","J","J","A","S","O","N","D"];function st(e){switch(e){case"narrow":return[...it];case"short":return[...rt];case"long":return[...nt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const at=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ot=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],lt=["M","T","W","T","F","S","S"];function ct(e){switch(e){case"narrow":return[...lt];case"short":return[...ot];case"long":return[...at];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const dt=["AM","PM"],ut=["Before Christ","Anno Domini"],ht=["BC","AD"],pt=["B","A"];function ft(e){switch(e){case"narrow":return[...pt];case"short":return[...ht];case"long":return[...ut];default:return null}}function mt(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const gt={D:p,DD:f,DDD:g,DDDD:y,t:b,tt:v,ttt:x,tttt:w,T:k,TT:S,TTT:C,TTTT:j,f:E,ff:T,fff:A,ffff:I,F:N,FF:_,FFF:R,FFFF:D};class yt{static create(e){return new yt(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}static parseFormat(e){let t=null,n="",r=!1;const i=[];for(let s=0;s0&&i.push({literal:r||/^\s+$/.test(n),val:n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return gt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.opts.forceSimple)return Le(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),s=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=()=>n?function(e){return dt[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(t,r)=>n?function(e,t){return st(t)[e.month-1]}(e,t):i(r?{month:t}:{month:t,day:"numeric"},"month"),l=(t,r)=>n?function(e,t){return ct(t)[e.weekday-1]}(e,t):i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),c=t=>{const n=yt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},d=t=>n?function(e,t){return ft(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return mt(yt.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return c(t)}}))}formatDurationFromString(e,t){const n=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=yt.parseFormat(t),i=r.reduce(((e,t)=>{let{literal:n,val:r}=t;return n?e:e.concat(r)}),[]);return mt(r,(e=>t=>{const r=n(t);return r?this.num(e.get(r),t.length):t})(e.shiftTo(...i.map(n).filter((e=>e)))))}}const bt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function vt(){for(var e=arguments.length,t=new Array(e),n=0;ne+t.source),"");return RegExp("^".concat(r,"$"))}function xt(){for(var e=arguments.length,t=new Array(e),n=0;nt.reduce(((t,n)=>{let[r,i,s]=t;const[a,o,l]=n(e,s);return[{...r,...a},o||i,l]}),[{},null,1]).slice(0,2)}function wt(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r={};let i;for(i=0;i1&&void 0!==arguments[1]&&arguments[1]||e&&d)?-e:e};return[{years:h(Fe(n)),months:h(Fe(r)),weeks:h(Fe(i)),days:h(Fe(s)),hours:h(Fe(a)),minutes:h(Fe(o)),seconds:h(Fe(l),"-0"===l),milliseconds:h(Ue(c),u)}]}const zt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ft(e,t,n,r,i,s,a){const o={year:2===t.length?qe(ze(t)):ze(t),month:rt.indexOf(n)+1,day:ze(r),hour:ze(i),minute:ze(s)};return a&&(o.second=ze(a)),e&&(o.weekday=e.length>3?at.indexOf(e)+1:ot.indexOf(e)+1),o}const Ut=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Vt(e){const[,t,n,r,i,s,a,o,l,c,d,u]=e,h=Ft(t,i,r,n,s,a,o);let p;return p=l?zt[l]:c?0:Xe(d,u),[h,new ne(p)]}const Wt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ht=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Kt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Yt(e){const[,t,n,r,i,s,a,o]=e;return[Ft(t,i,r,n,s,a,o),ne.utcInstance]}function Zt(e){const[,t,n,r,i,s,a,o]=e;return[Ft(t,o,n,r,i,s,a),ne.utcInstance]}const Gt=vt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Nt),qt=vt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Nt),$t=vt(/(\d{4})-?(\d{3})/,Nt),Xt=vt(Et),Qt=xt((function(e,t){return[{year:Rt(e,t),month:Rt(e,t+1,1),day:Rt(e,t+2,1)},null,t+3]}),It,Dt,Bt),Jt=xt(Tt,It,Dt,Bt),en=xt(_t,It,Dt,Bt),tn=xt(It,Dt,Bt);const nn=xt(It);const rn=vt(/(\d{4})-(\d\d)-(\d\d)/,At),sn=vt(Mt),an=xt(It,Dt,Bt);const on="Invalid Duration",ln={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},cn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...ln},dn=365.2425,un=30.436875,hn={years:{quarters:4,months:12,weeks:52.1775,days:dn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:un,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...ln},pn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],fn=pn.slice(0).reverse();function mn(e,t){const n={values:arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new bn(n)}function gn(e,t){var n;let r=null!=(n=t.milliseconds)?n:0;for(const i of fn.slice(1))t[i]&&(r+=t[i]*e[i].milliseconds);return r}function yn(e,t){const n=gn(e,t)<0?-1:1;pn.reduceRight(((r,i)=>{if(_e(t[i]))return r;if(r){const s=t[r]*n,a=e[i][r],o=Math.floor(s/a);t[i]+=o*n,t[r]-=o*a*n}return i}),null),pn.reduce(((n,r)=>{if(_e(t[r]))return n;if(n){const i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r}),null)}class bn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?hn:cn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ee.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return bn.fromObject({milliseconds:e},t)}static fromObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||"object"!==typeof e)throw new l("Duration.fromObject: argument expected to be an object, got ".concat(null===e?"null":typeof e));return new bn({values:Je(e,bn.normalizeUnit),loc:ee.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Me(e))return bn.fromMillis(e);if(bn.isDuration(e))return e;if("object"===typeof e)return bn.fromObject(e);throw new l("Unknown duration argument ".concat(e," of type ").concat(typeof e))}static fromISO(e,t){const[n]=function(e){return wt(e,[Pt,Lt])}(e);return n?bn.fromObject(n,t):bn.invalid("unparsable",'the input "'.concat(e,"\" can't be parsed as ISO 8601"))}static fromISOTime(e,t){const[n]=function(e){return wt(e,[Ot,nn])}(e);return n?bn.fromObject(n,t):bn.invalid("unparsable",'the input "'.concat(e,"\" can't be parsed as ISO 8601"))}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new l("need to specify a reason the Duration is invalid");const n=e instanceof fe?e:new fe(e,t);if(pe.throwOnInvalid)throw new s(n);return new bn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new o(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?yt.create(this.loc,n).formatDurationFromString(this,e):on}toHuman(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return on;const t=pn.map((t=>{const n=this.values[t];return _e(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(n)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ve(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return pr.fromMillis(t,{zone:"UTC"}).toISOTime(e)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?"Duration { values: ".concat(JSON.stringify(this.values)," }"):"Duration { Invalid, reason: ".concat(this.invalidReason," }")}toMillis(){return this.isValid?gn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=bn.fromDurationLike(e),n={};for(const r of pn)(Be(t.values,r)||Be(this.values,r))&&(n[r]=t.get(r)+this.get(r));return mn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=bn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=Qe(e(this.values[n],n));return mn(this,{values:t},!0)}get(e){return this[bn.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return mn(this,{values:{...this.values,...Je(e,bn.normalizeUnit)}})}reconfigure(){let{locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return mn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return yn(this.matrix,e),mn(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return mn(this,{values:function(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(){for(var e=arguments.length,t=new Array(e),n=0;nbn.normalizeUnit(e)));const r={},i={},s=this.toObject();let a;for(const o of pn)if(t.indexOf(o)>=0){a=o;let e=0;for(const n in i)e+=this.matrix[n][o]*i[n],i[n]=0;Me(s[o])&&(e+=s[o]);const t=Math.trunc(e);r[o]=t,i[o]=(1e3*e-1e3*t)/1e3}else Me(s[o])&&(i[o]=s[o]);for(const o in i)0!==i[o]&&(r[a]+=o===a?i[o]:i[o]/this.matrix[a][o]);return yn(this.matrix,r),mn(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return mn(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const r of pn)if(t=this.values[r],n=e.values[r],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const vn="Invalid Interval";class xn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new l("need to specify a reason the Interval is invalid");const n=e instanceof fe?e:new fe(e,t);if(pe.throwOnInvalid)throw new i(n);return new xn({invalid:n})}static fromDateTimes(e,t){const n=fr(e),r=fr(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?t0&&void 0!==arguments[0]?arguments[0]:"milliseconds";return this.isValid?this.toDuration(e).get(e):NaN}count(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"milliseconds",t=arguments.length>1?arguments[1]:void 0;if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=null!=t&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set(){let{start:e,end:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?xn.fromDateTimes(e||this.s,t||this.e):this}splitAt(){if(!this.isValid)return[];for(var e=arguments.length,t=new Array(e),n=0;nthis.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),i=[];let{s:s}=this,a=0;for(;s+this.e?this.e:e;i.push(xn.fromDateTimes(s,t)),s=t,a+=1}return i}splitBy(e){const t=bn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,i=1;const s=[];for(;re*i)));n=+e>+this.e?this.e:e,s.push(xn.fromDateTimes(r,n)),r=n,i+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e=n?null:xn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return xn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce(((e,t)=>{let[n,r]=e;return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]}),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],i=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),s=Array.prototype.concat(...i).sort(((e,t)=>e.time-t.time));for(const a of s)n+="s"===a.type?1:-1,1===n?t=a.time:(t&&+t!==+a.time&&r.push(xn.fromDateTimes(t,a.time)),t=null);return xn.merge(r)}difference(){for(var e=arguments.length,t=new Array(e),n=0;nthis.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?"[".concat(this.s.toISO()," \u2013 ").concat(this.e.toISO(),")"):vn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?"Interval { start: ".concat(this.s.toISO(),", end: ").concat(this.e.toISO()," }"):"Interval { Invalid, reason: ".concat(this.invalidReason," }")}toLocaleString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?yt.create(this.s.loc.clone(t),e).formatInterval(this):vn}toISO(e){return this.isValid?"".concat(this.s.toISO(e),"/").concat(this.e.toISO(e)):vn}toISODate(){return this.isValid?"".concat(this.s.toISODate(),"/").concat(this.e.toISODate()):vn}toISOTime(e){return this.isValid?"".concat(this.s.toISOTime(e),"/").concat(this.e.toISOTime(e)):vn}toFormat(e){let{separator:t=" \u2013 "}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?"".concat(this.s.toFormat(e)).concat(t).concat(this.e.toFormat(e)):vn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):bn.invalid(this.invalidReason)}mapEndpoints(e){return xn.fromDateTimes(e(this.s),e(this.e))}}class wn{static hasDST(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe.defaultZone;const t=pr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return U.isValidZone(e)}static normalizeZone(e){return ie(e,pe.defaultZone)}static getStartOfWeek(){let{locale:e=null,locObj:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t||ee.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek(){let{locale:e=null,locObj:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t||ee.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays(){let{locale:e=null,locObj:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t||ee.create(e)).getWeekendDays().slice()}static months(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||ee.create(t,n,i)).months(e)}static monthsFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||ee.create(t,n,i)).months(e,!0)}static weekdays(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||ee.create(t,n,null)).weekdays(e)}static weekdaysFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||ee.create(t,n,null)).weekdays(e,!0)}static meridiems(){let{locale:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ee.create(e).meridiems()}static eras(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"short",{locale:t=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ee.create(t,null,"gregory").eras(e)}static features(){return{relative:Re(),localeWeek:Ie()}}}function kn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(bn.fromMillis(r).as("days"))}function Sn(e,t,n,r){let[i,s,a,o]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=kn(e,t);return(n-n%7)/7}],["days",kn]],i={},s=e;let a,o;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,i[l]=c(e,t),o=s.plus(i),o>t?(i[l]--,(e=s.plus(i))>t&&(o=e,i[l]--,e=s.plus(i))):e=o);return[e,i,o,a]}(e,t,n);const l=t-i,c=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===c.length&&(a0?bn.fromMillis(l,r).shiftTo(...c).plus(d):d}const Cn={arab:"[\u0660-\u0669]",arabext:"[\u06f0-\u06f9]",bali:"[\u1b50-\u1b59]",beng:"[\u09e6-\u09ef]",deva:"[\u0966-\u096f]",fullwide:"[\uff10-\uff19]",gujr:"[\u0ae6-\u0aef]",hanidec:"[\u3007|\u4e00|\u4e8c|\u4e09|\u56db|\u4e94|\u516d|\u4e03|\u516b|\u4e5d]",khmr:"[\u17e0-\u17e9]",knda:"[\u0ce6-\u0cef]",laoo:"[\u0ed0-\u0ed9]",limb:"[\u1946-\u194f]",mlym:"[\u0d66-\u0d6f]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0b66-\u0b6f]",tamldec:"[\u0be6-\u0bef]",telu:"[\u0c66-\u0c6f]",thai:"[\u0e50-\u0e59]",tibt:"[\u0f20-\u0f29]",latn:"\\d"},jn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},En=Cn.hanidec.replace(/[\[|\]]/g,"").split("");function Nn(e){let{numberingSystem:t}=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new RegExp("".concat(Cn[t||"latn"]).concat(n))}const Tn="missing Intl.DateTimeFormat.formatToParts support";function _n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return{regex:e,deser:e=>{let[n]=e;return t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}(n))}}}const Mn=String.fromCharCode(160),An="[ ".concat(Mn,"]"),Rn=new RegExp(An,"g");function In(e){return e.replace(/\./g,"\\.?").replace(Rn,An)}function Dn(e){return e.replace(/\./g,"").replace(Rn," ").toLowerCase()}function Bn(e,t){return null===e?null:{regex:RegExp(e.map(In).join("|")),deser:n=>{let[r]=n;return e.findIndex((e=>Dn(r)===Dn(e)))+t}}}function On(e,t){return{regex:e,deser:e=>{let[,t,n]=e;return Xe(t,n)},groups:t}}function Pn(e){return{regex:e,deser:e=>{let[t]=e;return t}}}const Ln={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let zn=null;function Fn(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=Vn(yt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}function Un(e,t,n){const r=Fn(yt.parseFormat(n),e),i=r.map((t=>function(e,t){const n=Nn(t),r=Nn(t,"{2}"),i=Nn(t,"{3}"),s=Nn(t,"{4}"),a=Nn(t,"{6}"),o=Nn(t,"{1,2}"),l=Nn(t,"{1,3}"),c=Nn(t,"{1,6}"),d=Nn(t,"{1,9}"),u=Nn(t,"{2,4}"),h=Nn(t,"{4,6}"),p=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:e=>{let[t]=e;return t},literal:!0};var t},f=(f=>{if(e.literal)return p(f);switch(f.val){case"G":return Bn(t.eras("short"),0);case"GG":return Bn(t.eras("long"),0);case"y":return _n(c);case"yy":case"kk":return _n(u,qe);case"yyyy":case"kkkk":return _n(s);case"yyyyy":return _n(h);case"yyyyyy":return _n(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return _n(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return _n(r);case"MMM":return Bn(t.months("short",!0),1);case"MMMM":return Bn(t.months("long",!0),1);case"LLL":return Bn(t.months("short",!1),1);case"LLLL":return Bn(t.months("long",!1),1);case"o":case"S":return _n(l);case"ooo":case"SSS":return _n(i);case"u":return Pn(d);case"uu":return Pn(o);case"uuu":case"E":case"c":return _n(n);case"a":return Bn(t.meridiems(),0);case"EEE":return Bn(t.weekdays("short",!1),1);case"EEEE":return Bn(t.weekdays("long",!1),1);case"ccc":return Bn(t.weekdays("short",!0),1);case"cccc":return Bn(t.weekdays("long",!0),1);case"Z":case"ZZ":return On(new RegExp("([+-]".concat(o.source,")(?::(").concat(r.source,"))?")),2);case"ZZZ":return On(new RegExp("([+-]".concat(o.source,")(").concat(r.source,")?")),2);case"z":return Pn(/[a-z_+-/]{1,256}?/i);case" ":return Pn(/[^\S\n\r]/);default:return p(f)}})(e)||{invalidReason:Tn};return f.token=e,f}(t,e))),s=i.find((e=>e.invalidReason));if(s)return{input:t,tokens:r,invalidReason:s.invalidReason};{const[e,n]=function(e){const t=e.map((e=>e.regex)).reduce(((e,t)=>"".concat(e,"(").concat(t.source,")")),"");return["^".concat(t,"$"),e]}(i),s=RegExp(e,"i"),[o,l]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const i in n)if(Be(n,i)){const s=n[i],a=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(t,s,n),[c,d,u]=l?function(e){let t,n=null;return _e(e.z)||(n=U.create(e.z)),_e(e.Z)||(n||(n=new ne(e.Z)),t=e.Z),_e(e.q)||(e.M=3*(e.q-1)+1),_e(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),_e(e.u)||(e.S=Ue(e.u)),[Object.keys(e).reduce(((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t}),{}),n,t]}(l):[null,null,void 0];if(Be(l,"a")&&Be(l,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:s,rawMatches:o,matches:l,result:c,zone:d,specificOffset:u}}}function Vn(e,t){if(!e)return null;const n=yt.create(t,e).dtFormatter((zn||(zn=pr.fromMillis(1555555555555)),zn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map((t=>function(e,t,n){const{type:r,value:i}=e;if("literal"===r){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const s=t[r];let a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=Ln[a];if("object"===typeof o&&(o=o[s]),o)return{literal:!1,val:o}}(t,e,i)))}const Wn="Invalid DateTime",Hn=864e13;function Kn(e){return new fe("unsupported zone",'the zone "'.concat(e.name,'" is not supported'))}function Yn(e){return null===e.weekData&&(e.weekData=ke(e.c)),e.weekData}function Zn(e){return null===e.localWeekData&&(e.localWeekData=ke(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Gn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new pr({...n,...t,old:n})}function qn(e,t,n){let r=e-60*t*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;const s=n.offset(r);return i===s?[r,i]:[e-60*Math.min(i,s)*1e3,Math.max(i,s)]}function $n(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Xn(e,t,n){return qn(Ye(e),t,n)}function Qn(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:r,month:i,day:Math.min(e.c.day,Ke(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=bn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=Ye(s);let[l,c]=qn(o,n,e.zone);return 0!==a&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function Jn(e,t,n,r,i,s){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const r=t||o,i=pr.fromObject(e,{...n,zone:r,specificOffset:s});return a?i:i.setZone(o)}return pr.invalid(new fe("unparsable",'the input "'.concat(i,"\" can't be parsed as ").concat(r)))}function er(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e.isValid?yt.create(ee.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function tr(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Le(e.c.year,n?6:4),t?(r+="-",r+=Le(e.c.month),r+="-",r+=Le(e.c.day)):(r+=Le(e.c.month),r+=Le(e.c.day)),r}function nr(e,t,n,r,i,s){let a=Le(e.c.hour);return t?(a+=":",a+=Le(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(a+=":")):a+=Le(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(a+=Le(e.c.second),0===e.c.millisecond&&r||(a+=".",a+=Le(e.c.millisecond,3))),i&&(e.isOffsetFixed&&0===e.offset&&!s?a+="Z":e.o<0?(a+="-",a+=Le(Math.trunc(-e.o/60)),a+=":",a+=Le(Math.trunc(-e.o%60))):(a+="+",a+=Le(Math.trunc(e.o/60)),a+=":",a+=Le(Math.trunc(e.o%60)))),s&&(a+="["+e.zone.ianaName+"]"),a}const rr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ir={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},sr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ar=["year","month","day","hour","minute","second","millisecond"],or=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lr=["year","ordinal","hour","minute","second","millisecond"];function cr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new o(e);return t}(e)}}function dr(e,t){const n=ie(t.zone,pe.defaultZone),r=ee.fromObject(t),i=pe.now();let s,a;if(_e(e.year))s=i;else{for(const n of ar)_e(e[n])&&(e[n]=rr[n]);const t=Ne(e)||Te(e);if(t)return pr.invalid(t);const r=n.offset(i);[s,a]=Xn(e,r,n)}return new pr({ts:s,zone:n,loc:r,o:a})}function ur(e,t,n){const r=!!_e(n.round)||n.round,i=(e,i)=>{e=Ve(e,r||n.calendary?0:2,!0);return t.loc.clone(n).relFormatter(n).format(e,i)},s=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return i(s(n.unit),n.unit);for(const a of n.units){const e=s(a);if(Math.abs(e)>=1)return i(e,a)}return i(e>t?-0:0,n.units[n.units.length-1])}function hr(e){let t,n={};return e.length>0&&"object"===typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}class pr{constructor(e){const t=e.zone||pe.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new fe("invalid input"):null)||(t.isValid?null:Kn(t));this.ts=_e(e.ts)?pe.now():e.ts;let r=null,i=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);r=$n(this.ts,e),n=Number.isNaN(r.year)?new fe("invalid input"):null,r=n?null:r,i=n?null:e}}this._zone=t,this.loc=e.loc||ee.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new pr({})}static local(){const[e,t]=hr(arguments),[n,r,i,s,a,o,l]=t;return dr({year:n,month:r,day:i,hour:s,minute:a,second:o,millisecond:l},e)}static utc(){const[e,t]=hr(arguments),[n,r,i,s,a,o,l]=t;return e.zone=ne.utcInstance,dr({year:n,month:r,day:i,hour:s,minute:a,second:o,millisecond:l},e)}static fromJSDate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return pr.invalid("invalid input");const i=ie(t.zone,pe.defaultZone);return i.isValid?new pr({ts:n,zone:i,loc:ee.fromObject(t)}):pr.invalid(Kn(i))}static fromMillis(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Me(e))return e<-Hn||e>Hn?pr.invalid("Timestamp out of range"):new pr({ts:e,zone:ie(t.zone,pe.defaultZone),loc:ee.fromObject(t)});throw new l("fromMillis requires a numerical input, but received a ".concat(typeof e," with value ").concat(e))}static fromSeconds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Me(e))return new pr({ts:1e3*e,zone:ie(t.zone,pe.defaultZone),loc:ee.fromObject(t)});throw new l("fromSeconds requires a numerical input")}static fromObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=e||{};const n=ie(t.zone,pe.defaultZone);if(!n.isValid)return pr.invalid(Kn(n));const r=ee.fromObject(t),i=Je(e,cr),{minDaysInFirstWeek:s,startOfWeek:o}=Ee(i,r),l=pe.now(),c=_e(t.specificOffset)?n.offset(l):t.specificOffset,d=!_e(i.ordinal),u=!_e(i.year),h=!_e(i.month)||!_e(i.day),p=u||h,f=i.weekYear||i.weekNumber;if((p||d)&&f)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&d)throw new a("Can't mix ordinal dates with month/day");const m=f||i.weekday&&!p;let g,y,b=$n(l,c);m?(g=or,y=ir,b=ke(b,s,o)):d?(g=lr,y=sr,b=Ce(b)):(g=ar,y=rr);let v=!1;for(const a of g){_e(i[a])?i[a]=v?y[a]:b[a]:v=!0}const x=m?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=Ae(e.weekYear),i=Pe(e.weekNumber,1,Ge(e.weekYear,t,n)),s=Pe(e.weekday,1,7);return r?i?!s&&ye("weekday",e.weekday):ye("week",e.weekNumber):ye("weekYear",e.weekYear)}(i,s,o):d?function(e){const t=Ae(e.year),n=Pe(e.ordinal,1,He(e.year));return t?!n&&ye("ordinal",e.ordinal):ye("year",e.year)}(i):Ne(i),w=x||Te(i);if(w)return pr.invalid(w);const k=m?Se(i,s,o):d?je(i):i,[S,C]=Xn(k,c,n),j=new pr({ts:S,zone:n,o:C,loc:r});return i.weekday&&p&&e.weekday!==j.weekday?pr.invalid("mismatched weekday","you can't specify both a weekday of ".concat(i.weekday," and a date of ").concat(j.toISO())):j}static fromISO(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return wt(e,[Gt,Qt],[qt,Jt],[$t,en],[Xt,tn])}(e);return Jn(n,r,t,"ISO 8601",e)}static fromRFC2822(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return wt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Ut,Vt])}(e);return Jn(n,r,t,"RFC 2822",e)}static fromHTTP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return wt(e,[Wt,Yt],[Ht,Yt],[Kt,Zt])}(e);return Jn(n,r,t,"HTTP",t)}static fromFormat(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(_e(e)||_e(t))throw new l("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=n,s=ee.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[a,o,c,d]=function(e,t,n){const{result:r,zone:i,specificOffset:s,invalidReason:a}=Un(e,t,n);return[r,i,s,a]}(s,e,t);return d?pr.invalid(d):Jn(a,o,n,"format ".concat(t),e,c)}static fromString(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return pr.fromFormat(e,t,n)}static fromSQL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return wt(e,[rn,Qt],[sn,an])}(e);return Jn(n,r,t,"SQL",e)}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new l("need to specify a reason the DateTime is invalid");const n=e instanceof fe?e:new fe(e,t);if(pe.throwOnInvalid)throw new r(n);return new pr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Vn(e,ee.fromObject(t));return n?n.map((e=>e?e.val:null)).join(""):null}static expandFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Fn(yt.parseFormat(e),ee.fromObject(t)).map((e=>e.val)).join("")}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Yn(this).weekYear:NaN}get weekNumber(){return this.isValid?Yn(this).weekNumber:NaN}get weekday(){return this.isValid?Yn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Zn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Zn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Zn(this).weekYear:NaN}get ordinal(){return this.isValid?Ce(this.c).ordinal:NaN}get monthShort(){return this.isValid?wn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?wn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?wn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?wn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=Ye(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),s=this.zone.offset(n-r*t),a=this.zone.offset(n-i*t);if(s===a)return[this];const o=n-s*t,l=n-a*t,c=$n(o,s),d=$n(l,a);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[Gn(this,{ts:o}),Gn(this,{ts:l})]:[this]}get isInLeapYear(){return We(this.year)}get daysInMonth(){return Ke(this.year,this.month)}get daysInYear(){return this.isValid?He(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ge(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ge(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{locale:t,numberingSystem:n,calendar:r}=yt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.setZone(ne.instance(e),t)}toLocal(){return this.setZone(pe.defaultZone)}setZone(e){let{keepLocalTime:t=!1,keepCalendarTime:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((e=ie(e,pe.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Xn(n,t,e)}return Gn(this,{ts:r,zone:e})}return pr.invalid(Kn(e))}reconfigure(){let{locale:e,numberingSystem:t,outputCalendar:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Gn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=Je(e,cr),{minDaysInFirstWeek:n,startOfWeek:r}=Ee(t,this.loc),i=!_e(t.weekYear)||!_e(t.weekNumber)||!_e(t.weekday),s=!_e(t.ordinal),o=!_e(t.year),l=!_e(t.month)||!_e(t.day),c=o||l,d=t.weekYear||t.weekNumber;if((c||s)&&d)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new a("Can't mix ordinal dates with month/day");let u;i?u=Se({...ke(this.c,n,r),...t},n,r):_e(t.ordinal)?(u={...this.toObject(),...t},_e(t.day)&&(u.day=Math.min(Ke(u.year,u.month),u.day))):u=je({...Ce(this.c),...t});const[h,p]=Xn(u,this.o,this.zone);return Gn(this,{ts:h,o:p})}plus(e){if(!this.isValid)return this;return Gn(this,Qn(this,bn.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Gn(this,Qn(this,bn.fromDurationLike(e).negate()))}startOf(e){let{useLocaleWeeks:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isValid)return this;const n={},r=bn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?yt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Wn}toLocaleString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?yt.create(this.loc.clone(t),e).formatDateTime(this):Wn}toLocaleParts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?yt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO(){let{format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const s="extended"===e;let a=tr(this,s);return a+="T",a+=nr(this,s,t,n,r,i),a}toISODate(){let{format:e="extended"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?tr(this,"extended"===e):null}toISOWeekDate(){return er(this,"kkkk-'W'WW-c")}toISOTime(){let{suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:s="extended"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?(r?"T":"")+nr(this,"extended"===s,t,e,n,i):null}toRFC2822(){return er(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return er(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?tr(this,!0):null}toSQLTime(){let{includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),er(this,r,!0)}toSQL(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?"".concat(this.toSQLDate()," ").concat(this.toSQLTime(e)):null}toString(){return this.isValid?this.toISO():Wn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?"DateTime { ts: ".concat(this.toISO(),", zone: ").concat(this.zone.name,", locale: ").concat(this.locale," }"):"DateTime { Invalid, reason: ".concat(this.invalidReason," }")}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"milliseconds",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.isValid||!e.isValid)return bn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=(o=t,Array.isArray(o)?o:[o]).map(bn.normalizeUnit),s=e.valueOf()>this.valueOf(),a=Sn(s?this:e,s?e:this,i,r);var o;return s?a.negate():a}diffNow(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"milliseconds",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.diff(pr.now(),e,t)}until(e){return this.isValid?xn.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const t=e.base||pr.fromObject({},{zone:this.zone}),n=e.padding?this0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?ur(e.base||pr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(){for(var e=arguments.length,t=new Array(e),n=0;ne.valueOf()),Math.min)}static max(){for(var e=arguments.length,t=new Array(e),n=0;ne.valueOf()),Math.max)}static fromFormatExplain(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{locale:r=null,numberingSystem:i=null}=n;return Un(ee.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return pr.fromFormatExplain(e,t,n)}static get DATE_SHORT(){return p}static get DATE_MED(){return f}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return g}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return b}static get TIME_WITH_SECONDS(){return v}static get TIME_WITH_SHORT_OFFSET(){return x}static get TIME_WITH_LONG_OFFSET(){return w}static get TIME_24_SIMPLE(){return k}static get TIME_24_WITH_SECONDS(){return S}static get TIME_24_WITH_SHORT_OFFSET(){return C}static get TIME_24_WITH_LONG_OFFSET(){return j}static get DATETIME_SHORT(){return E}static get DATETIME_SHORT_WITH_SECONDS(){return N}static get DATETIME_MED(){return T}static get DATETIME_MED_WITH_SECONDS(){return _}static get DATETIME_MED_WITH_WEEKDAY(){return M}static get DATETIME_FULL(){return A}static get DATETIME_FULL_WITH_SECONDS(){return R}static get DATETIME_HUGE(){return I}static get DATETIME_HUGE_WITH_SECONDS(){return D}}function fr(e){if(pr.isDateTime(e))return e;if(e&&e.valueOf&&Me(e.valueOf()))return pr.fromJSDate(e);if(e&&"object"===typeof e)return pr.fromObject(e);throw new l("Unknown datetime argument: ".concat(e,", of type ").concat(typeof e))}t.DateTime=pr,t.Duration=bn,t.FixedOffsetZone=ne,t.IANAZone=U,t.Info=wn,t.Interval=xn,t.InvalidZone=re,t.Settings=pe,t.SystemZone=P,t.VERSION="3.4.4",t.Zone=B},8437:(e,t,n)=>{"use strict";var r=n(2534),i=n(6266),s=n(2543).Buffer,a=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<>>32-t}function c(e,t,n,r,i,s,a){return l(e+(t&n|~t&r)+i+s|0,a)+t|0}function d(e,t,n,r,i,s,a){return l(e+(t&r|n&~r)+i+s|0,a)+t|0}function u(e,t,n,r,i,s,a){return l(e+(t^n^r)+i+s|0,a)+t|0}function h(e,t,n,r,i,s,a){return l(e+(n^(t|~r))+i+s|0,a)+t|0}r(o,i),o.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,s=this._d;n=c(n,r,i,s,e[0],3614090360,7),s=c(s,n,r,i,e[1],3905402710,12),i=c(i,s,n,r,e[2],606105819,17),r=c(r,i,s,n,e[3],3250441966,22),n=c(n,r,i,s,e[4],4118548399,7),s=c(s,n,r,i,e[5],1200080426,12),i=c(i,s,n,r,e[6],2821735955,17),r=c(r,i,s,n,e[7],4249261313,22),n=c(n,r,i,s,e[8],1770035416,7),s=c(s,n,r,i,e[9],2336552879,12),i=c(i,s,n,r,e[10],4294925233,17),r=c(r,i,s,n,e[11],2304563134,22),n=c(n,r,i,s,e[12],1804603682,7),s=c(s,n,r,i,e[13],4254626195,12),i=c(i,s,n,r,e[14],2792965006,17),n=d(n,r=c(r,i,s,n,e[15],1236535329,22),i,s,e[1],4129170786,5),s=d(s,n,r,i,e[6],3225465664,9),i=d(i,s,n,r,e[11],643717713,14),r=d(r,i,s,n,e[0],3921069994,20),n=d(n,r,i,s,e[5],3593408605,5),s=d(s,n,r,i,e[10],38016083,9),i=d(i,s,n,r,e[15],3634488961,14),r=d(r,i,s,n,e[4],3889429448,20),n=d(n,r,i,s,e[9],568446438,5),s=d(s,n,r,i,e[14],3275163606,9),i=d(i,s,n,r,e[3],4107603335,14),r=d(r,i,s,n,e[8],1163531501,20),n=d(n,r,i,s,e[13],2850285829,5),s=d(s,n,r,i,e[2],4243563512,9),i=d(i,s,n,r,e[7],1735328473,14),n=u(n,r=d(r,i,s,n,e[12],2368359562,20),i,s,e[5],4294588738,4),s=u(s,n,r,i,e[8],2272392833,11),i=u(i,s,n,r,e[11],1839030562,16),r=u(r,i,s,n,e[14],4259657740,23),n=u(n,r,i,s,e[1],2763975236,4),s=u(s,n,r,i,e[4],1272893353,11),i=u(i,s,n,r,e[7],4139469664,16),r=u(r,i,s,n,e[10],3200236656,23),n=u(n,r,i,s,e[13],681279174,4),s=u(s,n,r,i,e[0],3936430074,11),i=u(i,s,n,r,e[3],3572445317,16),r=u(r,i,s,n,e[6],76029189,23),n=u(n,r,i,s,e[9],3654602809,4),s=u(s,n,r,i,e[12],3873151461,11),i=u(i,s,n,r,e[15],530742520,16),n=h(n,r=u(r,i,s,n,e[2],3299628645,23),i,s,e[0],4096336452,6),s=h(s,n,r,i,e[7],1126891415,10),i=h(i,s,n,r,e[14],2878612391,15),r=h(r,i,s,n,e[5],4237533241,21),n=h(n,r,i,s,e[12],1700485571,6),s=h(s,n,r,i,e[3],2399980690,10),i=h(i,s,n,r,e[10],4293915773,15),r=h(r,i,s,n,e[1],2240044497,21),n=h(n,r,i,s,e[8],1873313359,6),s=h(s,n,r,i,e[15],4264355552,10),i=h(i,s,n,r,e[6],2734768916,15),r=h(r,i,s,n,e[13],1309151649,21),n=h(n,r,i,s,e[4],4149444226,6),s=h(s,n,r,i,e[11],3174756917,10),i=h(i,s,n,r,e[2],718787259,15),r=h(r,i,s,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+s|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=s.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},1595:(e,t,n)=>{var r=n(518),i=n(6084);function s(e){this.rand=e||new i.Rand}e.exports=s,s.create=function(e){return new s(e)},s.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(e)>=0);return i},s.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},s.prototype.test=function(e,t,n){var i=e.bitLength(),s=r.mont(e),a=new r(1).toRed(s);t||(t=Math.max(1,i/48|0));for(var o=e.subn(1),l=0;!o.testn(l);l++);for(var c=e.shrn(l),d=o.toRed(s);t>0;t--){var u=this._randrange(new r(2),o);n&&n(u);var h=u.toRed(s).redPow(c);if(0!==h.cmp(a)&&0!==h.cmp(d)){for(var p=1;p0;t--){var d=this._randrange(new r(2),a),u=e.gcd(d);if(0!==u.cmpn(1))return u;var h=d.toRed(i).redPow(l);if(0!==h.cmp(s)&&0!==h.cmp(c)){for(var p=1;p{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},4034:(e,t)=>{"use strict";var n=t;function r(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n>8,a=255&i;s?n.push(s,a):n.push(a)}return n},n.zero2=r,n.toHex=i,n.encode=function(e,t){return"hex"===t?i(e):e}},2426:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function i(e){t=e}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function c(e){return void 0===e}function d(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[],i=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var O=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,L={},z={};function F(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(z[e]=i),t&&(z[t[0]]=function(){return B(i.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function V(e){var t,n,r=e.match(O);for(t=0,n=r.length;t=0&&P.test(e);)e=e.replace(P,r),P.lastIndex=0,n-=1;return e}var K={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Y(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(O).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var Z="Invalid date";function G(){return this._invalidDate}var q="%d",$=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Q={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(e,t,n,r){var i=this._relativeTime[n];return _(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return _(n)?n(t):n.replace(/%s/i,t)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,r={};for(n in e)o(e,n)&&(t=ne(n))&&(r[t]=e[n]);return r}var ie={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function se(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:ie[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}var ae,oe=/\d/,le=/\d\d/,ce=/\d{3}/,de=/\d{4}/,ue=/[+-]?\d{6}/,he=/\d\d?/,pe=/\d\d\d\d?/,fe=/\d\d\d\d\d\d?/,me=/\d{1,3}/,ge=/\d{1,4}/,ye=/[+-]?\d{1,6}/,be=/\d+/,ve=/[+-]?\d+/,xe=/Z|[+-]\d\d:?\d\d/gi,we=/Z|[+-]\d\d(?::?\d\d)?/gi,ke=/[+-]?\d+(\.\d{1,3})?/,Se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ce=/^[1-9]\d?/,je=/^([1-9]\d|\d)/;function Ee(e,t,n){ae[e]=_(t)?t:function(e,r){return e&&n?n:t}}function Ne(e,t){return o(ae,e)?ae[e](t._strict,t._locale):new RegExp(Te(e))}function Te(e){return _e(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function _e(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Me(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ae(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Me(t)),n}ae={};var Re={};function Ie(e,t){var n,r,i=t;for("string"===typeof e&&(e=[e]),d(t)&&(i=function(e,n){n[t]=Ae(e)}),r=e.length,n=0;n68?1900:2e3)};var Ze,Ge=$e("FullYear",!0);function qe(){return Oe(this.year())}function $e(e,t){return function(n){return null!=n?(Qe(this,e,n),r.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Qe(e,t,n){var r,i,s,a,o;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,a=e.month(),o=29!==(o=e.date())||1!==a||Oe(s)?o:28,i?r.setUTCFullYear(s,a,o):r.setFullYear(s,a,o)}}function Je(e){return _(this[e=ne(e)])?this[e]():this}function et(e,t){if("object"===typeof e){var n,r=se(e=re(e)),i=r.length;for(n=0;n=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function vt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function xt(e,t,n){var r=7+t-n;return-(7+vt(e,0,r).getUTCDay()-t)%7+r-1}function wt(e,t,n,r,i){var s,a,o=1+7*(t-1)+(7+n-r)%7+xt(e,r,i);return o<=0?a=Ye(s=e-1)+o:o>Ye(e)?(s=e+1,a=o-Ye(e)):(s=e,a=o),{year:s,dayOfYear:a}}function kt(e,t,n){var r,i,s=xt(e.year(),t,n),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?r=a+St(i=e.year()-1,t,n):a>St(e.year(),t,n)?(r=a-St(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function St(e,t,n){var r=xt(e,t,n),i=xt(e+1,t,n);return(Ye(e)-r+i)/7}function Ct(e){return kt(e,this._week.dow,this._week.doy).week}F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),Ee("w",he,Ce),Ee("ww",he,le),Ee("W",he,Ce),Ee("WW",he,le),De(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=Ae(e)}));var jt={dow:0,doy:6};function Et(){return this._week.dow}function Nt(){return this._week.doy}function Tt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function _t(e){var t=kt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Mt(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function At(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}F("d",0,"do","day"),F("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),F("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),F("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),Ee("d",he),Ee("e",he),Ee("E",he),Ee("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ee("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ee("dddd",(function(e,t){return t.weekdaysRegex(e)})),De(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e})),De(["d","e","E"],(function(e,t,n,r){t[r]=Ae(e)}));var It="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Dt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Bt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ot=Se,Pt=Se,Lt=Se;function zt(e,t){var n=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Rt(n,this._week.dow):e?n[e.day()]:n}function Ft(e){return!0===e?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ut(e){return!0===e?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Vt(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ze.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ze.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ze.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ze.call(this._weekdaysParse,a))||-1!==(i=Ze.call(this._shortWeekdaysParse,a))||-1!==(i=Ze.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ze.call(this._shortWeekdaysParse,a))||-1!==(i=Ze.call(this._weekdaysParse,a))||-1!==(i=Ze.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ze.call(this._minWeekdaysParse,a))||-1!==(i=Ze.call(this._weekdaysParse,a))||-1!==(i=Ze.call(this._shortWeekdaysParse,a))?i:null}function Wt(e,t,n){var r,i,s;if(this._weekdaysParseExact)return Vt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=Xe(this,"Day");return null!=e?(e=Mt(e,this.localeData()),this.add(e-t,"d")):t}function Kt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Yt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=At(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Zt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Ot),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Gt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Pt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Lt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $t(){function e(e,t){return t.length-e.length}var t,n,r,i,s,a=[],o=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=_e(this.weekdaysMin(n,"")),i=_e(this.weekdaysShort(n,"")),s=_e(this.weekdays(n,"")),a.push(r),o.push(i),l.push(s),c.push(r),c.push(i),c.push(s);a.sort(e),o.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Qt(){return this.hours()||24}function Jt(e,t){F(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}F("H",["HH",2],0,"hour"),F("h",["hh",2],0,Xt),F("k",["kk",2],0,Qt),F("hmm",0,0,(function(){return""+Xt.apply(this)+B(this.minutes(),2)})),F("hmmss",0,0,(function(){return""+Xt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)})),F("Hmm",0,0,(function(){return""+this.hours()+B(this.minutes(),2)})),F("Hmmss",0,0,(function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)})),Jt("a",!0),Jt("A",!1),Ee("a",en),Ee("A",en),Ee("H",he,je),Ee("h",he,Ce),Ee("k",he,Ce),Ee("HH",he,le),Ee("hh",he,le),Ee("kk",he,le),Ee("hmm",pe),Ee("hmmss",fe),Ee("Hmm",pe),Ee("Hmmss",fe),Ie(["H","HH"],Fe),Ie(["k","kk"],(function(e,t,n){var r=Ae(e);t[Fe]=24===r?0:r})),Ie(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Ie(["h","hh"],(function(e,t,n){t[Fe]=Ae(e),g(n).bigHour=!0})),Ie("hmm",(function(e,t,n){var r=e.length-2;t[Fe]=Ae(e.substr(0,r)),t[Ue]=Ae(e.substr(r)),g(n).bigHour=!0})),Ie("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Fe]=Ae(e.substr(0,r)),t[Ue]=Ae(e.substr(r,2)),t[Ve]=Ae(e.substr(i)),g(n).bigHour=!0})),Ie("Hmm",(function(e,t,n){var r=e.length-2;t[Fe]=Ae(e.substr(0,r)),t[Ue]=Ae(e.substr(r))})),Ie("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Fe]=Ae(e.substr(0,r)),t[Ue]=Ae(e.substr(r,2)),t[Ve]=Ae(e.substr(i))}));var nn=/[ap]\.?m?\.?/i,rn=$e("Hours",!0);function sn(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,on={calendar:I,longDateFormat:K,invalidDate:Z,ordinal:q,dayOfMonthOrdinalParse:$,relativeTime:Q,months:rt,monthsShort:it,week:jt,weekdays:It,weekdaysMin:Bt,weekdaysShort:Dt,meridiemParse:nn},ln={},cn={};function dn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=fn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dn(i,n)>=t-1)break;t--}s++}return an}function pn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function fn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&pn(t))try{n=an._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),mn(n)}catch(r){ln[t]=null}return ln[t]}function mn(e,t){var n;return e&&((n=c(t)?bn(e):gn(e,t))?an=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=on;if(t.abbr=e,null!=ln[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=fn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new R(A(r,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),mn(e),ln[e]}return delete ln[e],null}function yn(e,t){if(null!=t){var n,r,i=on;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(A(ln[e]._config,t)):(null!=(r=fn(e))&&(i=r._config),t=A(i,t),null==r&&(t.abbr=e),(n=new R(t)).parentLocale=ln[e],ln[e]=n),mn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function bn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!s(e)){if(t=fn(e))return t;e=[e]}return hn(e)}function vn(){return E(ln)}function xn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Le]<0||n[Le]>11?Le:n[ze]<1||n[ze]>nt(n[Pe],n[Le])?ze:n[Fe]<0||n[Fe]>24||24===n[Fe]&&(0!==n[Ue]||0!==n[Ve]||0!==n[We])?Fe:n[Ue]<0||n[Ue]>59?Ue:n[Ve]<0||n[Ve]>59?Ve:n[We]<0||n[We]>999?We:-1,g(e)._overflowDayOfYear&&(tze)&&(t=ze),g(e)._overflowWeeks&&-1===t&&(t=He),g(e)._overflowWeekday&&-1===t&&(t=Ke),g(e).overflow=t),e}var wn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,Cn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],jn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],En=/^\/?Date\((-?\d+)/i,Nn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Tn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function _n(e){var t,n,r,i,s,a,o=e._i,l=wn.exec(o)||kn.exec(o),c=Cn.length,d=jn.length;if(l){for(g(e).iso=!0,t=0,n=c;tYe(s)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=vt(s,0,e._dayOfYear),e._a[Le]=n.getUTCMonth(),e._a[ze]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Fe]&&0===e._a[Ue]&&0===e._a[Ve]&&0===e._a[We]&&(e._nextDay=!0,e._a[Fe]=0),e._d=(e._useUTC?vt:bt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Fe]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Fn(e){var t,n,r,i,s,a,o,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,a=4,n=Pn(t.GG,e._a[Pe],kt(qn(),1,4).year),r=Pn(t.W,1),((i=Pn(t.E,1))<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,c=kt(qn(),s,a),n=Pn(t.gg,e._a[Pe],c.year),r=Pn(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>St(n,s,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(o=wt(n,r,i,s,a),e._a[Pe]=o.year,e._dayOfYear=o.dayOfYear)}function Un(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,i,s,a,o,l,c=""+e._i,d=c.length,u=0;for(l=(i=H(e._f,e._locale).match(O)||[]).length,t=0;t0&&g(e).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),u+=n.length),z[s]?(n?g(e).empty=!1:g(e).unusedTokens.push(s),Be(s,n,e)):e._strict&&!n&&g(e).unusedTokens.push(s);g(e).charsLeftOver=d-u,c.length>0&&g(e).unusedInput.push(c),e._a[Fe]<=12&&!0===g(e).bigHour&&e._a[Fe]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Fe]=Vn(e._locale,e._a[Fe],e._meridiem),null!==(o=g(e).era)&&(e._a[Pe]=e._locale.erasConvertYear(o,e._a[Pe])),zn(e),xn(e)}else Bn(e);else _n(e)}function Vn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Wn(e){var t,n,r,i,s,a,o=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:b()}));function Qn(e,t){var n,r;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return qn();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function kr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Yn(t))._a?(e=t._isUTC?f(t._a):qn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Sr(){return!!this.isValid()&&!this._isUTC}function Cr(){return!!this.isValid()&&this._isUTC}function jr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Er=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Nr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Tr(e,t){var n,r,i,s=e,a=null;return or(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(a=Er.exec(e))?(n="-"===a[1]?-1:1,s={y:0,d:Ae(a[ze])*n,h:Ae(a[Fe])*n,m:Ae(a[Ue])*n,s:Ae(a[Ve])*n,ms:Ae(lr(1e3*a[We]))*n}):(a=Nr.exec(e))?(n="-"===a[1]?-1:1,s={y:_r(a[2],n),M:_r(a[3],n),w:_r(a[4],n),d:_r(a[5],n),h:_r(a[6],n),m:_r(a[7],n),s:_r(a[8],n)}):null==s?s={}:"object"===typeof s&&("from"in s||"to"in s)&&(i=Ar(qn(s.from),qn(s.to)),(s={}).ms=i.milliseconds,s.M=i.months),r=new ar(s),or(e)&&o(e,"_locale")&&(r._locale=e._locale),or(e)&&o(e,"_isValid")&&(r._isValid=e._isValid),r}function _r(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Mr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ar(e,t){var n;return e.isValid()&&t.isValid()?(t=pr(t,e),e.isBefore(t)?n=Mr(e,t):((n=Mr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Rr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Ir(this,Tr(n,r),e),this}}function Ir(e,t,n,i){var s=t._milliseconds,a=lr(t._days),o=lr(t._months);e.isValid()&&(i=null==i||i,o&&ht(e,Xe(e,"Month")+o*n),a&&Qe(e,"Date",Xe(e,"Date")+a*n),s&&e._d.setTime(e._d.valueOf()+s*n),i&&r.updateOffset(e,a||o))}Tr.fn=ar.prototype,Tr.invalid=sr;var Dr=Rr(1,"add"),Br=Rr(-1,"subtract");function Or(e){return"string"===typeof e||e instanceof String}function Pr(e){return S(e)||u(e)||Or(e)||d(e)||zr(e)||Lr(e)||null===e||void 0===e}function Lr(e){var t,n,r=a(e)&&!l(e),i=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=s.length;for(t=0;tn.valueOf():n.valueOf()9999?W(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):_(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",s="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=s+'[")]',this.format(e+t+n+r)}function ti(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(S(e)&&e.isValid()||qn(e).isValid())?Tr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ri(e){return this.from(qn(),e)}function ii(e,t){return this.isValid()&&(S(e)&&e.isValid()||qn(e).isValid())?Tr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function si(e){return this.to(qn(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=bn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var oi=j("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function li(){return this._locale}var ci=1e3,di=60*ci,ui=60*di,hi=3506328*ui;function pi(e,t){return(e%t+t)%t}function fi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-hi:new Date(e,t,n).valueOf()}function mi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-hi:Date.UTC(e,t,n)}function gi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:fi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pi(t+(this._isUTC?0:this.utcOffset()*di),ui);break;case"minute":t=this._d.valueOf(),t-=pi(t,di);break;case"second":t=this._d.valueOf(),t-=pi(t,ci)}return this._d.setTime(t),r.updateOffset(this,!0),this}function yi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:fi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ui-pi(t+(this._isUTC?0:this.utcOffset()*di),ui)-1;break;case"minute":t=this._d.valueOf(),t+=di-pi(t,di)-1;break;case"second":t=this._d.valueOf(),t+=ci-pi(t,ci)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function bi(){return this._d.valueOf()-6e4*(this._offset||0)}function vi(){return Math.floor(this.valueOf()/1e3)}function xi(){return new Date(this.valueOf())}function wi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function ki(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Si(){return this.isValid()?this.toISOString():null}function Ci(){return y(this)}function ji(){return p({},g(this))}function Ei(){return g(this).overflow}function Ni(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ti(e,t){var n,i,s,a=this._eras||bn("en")._eras;for(n=0,i=a.length;n=0)return l[r]}function Mi(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Ai(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e(s=St(e,r,i))&&(t=s),Xi.call(this,e,t,n,r,i))}function Xi(e,t,n,r,i){var s=wt(e,t,n,r,i),a=vt(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Qi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}F("N",0,0,"eraAbbr"),F("NN",0,0,"eraAbbr"),F("NNN",0,0,"eraAbbr"),F("NNNN",0,0,"eraName"),F("NNNNN",0,0,"eraNarrow"),F("y",["y",1],"yo","eraYear"),F("y",["yy",2],0,"eraYear"),F("y",["yyy",3],0,"eraYear"),F("y",["yyyy",4],0,"eraYear"),Ee("N",Li),Ee("NN",Li),Ee("NNN",Li),Ee("NNNN",zi),Ee("NNNNN",Fi),Ie(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e})),Ee("y",be),Ee("yy",be),Ee("yyy",be),Ee("yyyy",be),Ee("yo",Ui),Ie(["y","yy","yyy","yyyy"],Pe),Ie(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Pe]=n._locale.eraYearOrdinalParse(e,i):t[Pe]=parseInt(e,10)})),F(0,["gg",2],0,(function(){return this.weekYear()%100})),F(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Wi("gggg","weekYear"),Wi("ggggg","weekYear"),Wi("GGGG","isoWeekYear"),Wi("GGGGG","isoWeekYear"),Ee("G",ve),Ee("g",ve),Ee("GG",he,le),Ee("gg",he,le),Ee("GGGG",ge,de),Ee("gggg",ge,de),Ee("GGGGG",ye,ue),Ee("ggggg",ye,ue),De(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=Ae(e)})),De(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),F("Q",0,"Qo","quarter"),Ee("Q",oe),Ie("Q",(function(e,t){t[Le]=3*(Ae(e)-1)})),F("D",["DD",2],"Do","date"),Ee("D",he,Ce),Ee("DD",he,le),Ee("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ie(["D","DD"],ze),Ie("Do",(function(e,t){t[ze]=Ae(e.match(he)[0])}));var Ji=$e("Date",!0);function es(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}F("DDD",["DDDD",3],"DDDo","dayOfYear"),Ee("DDD",me),Ee("DDDD",ce),Ie(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=Ae(e)})),F("m",["mm",2],0,"minute"),Ee("m",he,je),Ee("mm",he,le),Ie(["m","mm"],Ue);var ts=$e("Minutes",!1);F("s",["ss",2],0,"second"),Ee("s",he,je),Ee("ss",he,le),Ie(["s","ss"],Ve);var ns,rs,is=$e("Seconds",!1);for(F("S",0,0,(function(){return~~(this.millisecond()/100)})),F(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),F(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),F(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),F(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),F(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),F(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Ee("S",me,oe),Ee("SS",me,le),Ee("SSS",me,ce),ns="SSSS";ns.length<=9;ns+="S")Ee(ns,be);function ss(e,t){t[We]=Ae(1e3*("0."+e))}for(ns="S";ns.length<=9;ns+="S")Ie(ns,ss);function as(){return this._isUTC?"UTC":""}function os(){return this._isUTC?"Coordinated Universal Time":""}rs=$e("Milliseconds",!1),F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");var ls=k.prototype;function cs(e){return qn(1e3*e)}function ds(){return qn.apply(null,arguments).parseZone()}function us(e){return e}ls.add=Dr,ls.calendar=Vr,ls.clone=Wr,ls.diff=$r,ls.endOf=yi,ls.format=ti,ls.from=ni,ls.fromNow=ri,ls.to=ii,ls.toNow=si,ls.get=Je,ls.invalidAt=Ei,ls.isAfter=Hr,ls.isBefore=Kr,ls.isBetween=Yr,ls.isSame=Zr,ls.isSameOrAfter=Gr,ls.isSameOrBefore=qr,ls.isValid=Ci,ls.lang=oi,ls.locale=ai,ls.localeData=li,ls.max=Xn,ls.min=$n,ls.parsingFlags=ji,ls.set=et,ls.startOf=gi,ls.subtract=Br,ls.toArray=wi,ls.toObject=ki,ls.toDate=xi,ls.toISOString=Jr,ls.inspect=ei,"undefined"!==typeof Symbol&&null!=Symbol.for&&(ls[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ls.toJSON=Si,ls.toString=Qr,ls.unix=vi,ls.valueOf=bi,ls.creationData=Ni,ls.eraName=Ai,ls.eraNarrow=Ri,ls.eraAbbr=Ii,ls.eraYear=Di,ls.year=Ge,ls.isLeapYear=qe,ls.weekYear=Hi,ls.isoWeekYear=Ki,ls.quarter=ls.quarters=Qi,ls.month=pt,ls.daysInMonth=ft,ls.week=ls.weeks=Tt,ls.isoWeek=ls.isoWeeks=_t,ls.weeksInYear=Gi,ls.weeksInWeekYear=qi,ls.isoWeeksInYear=Yi,ls.isoWeeksInISOWeekYear=Zi,ls.date=Ji,ls.day=ls.days=Ht,ls.weekday=Kt,ls.isoWeekday=Yt,ls.dayOfYear=es,ls.hour=ls.hours=rn,ls.minute=ls.minutes=ts,ls.second=ls.seconds=is,ls.millisecond=ls.milliseconds=rs,ls.utcOffset=mr,ls.utc=yr,ls.local=br,ls.parseZone=vr,ls.hasAlignedHourOffset=xr,ls.isDST=wr,ls.isLocal=Sr,ls.isUtcOffset=Cr,ls.isUtc=jr,ls.isUTC=jr,ls.zoneAbbr=as,ls.zoneName=os,ls.dates=j("dates accessor is deprecated. Use date instead.",Ji),ls.months=j("months accessor is deprecated. Use month instead",pt),ls.years=j("years accessor is deprecated. Use year instead",Ge),ls.zone=j("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),ls.isDSTShifted=j("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",kr);var hs=R.prototype;function ps(e,t,n,r){var i=bn(),s=f().set(r,t);return i[n](s,e)}function fs(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return ps(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=ps(e,r,n,"month");return i}function ms(e,t,n,r){"boolean"===typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i,s=bn(),a=e?s._week.dow:0,o=[];if(null!=n)return ps(t,(n+a)%7,r,"day");for(i=0;i<7;i++)o[i]=ps(t,(i+a)%7,r,"day");return o}function gs(e,t){return fs(e,t,"months")}function ys(e,t){return fs(e,t,"monthsShort")}function bs(e,t,n){return ms(e,t,n,"weekdays")}function vs(e,t,n){return ms(e,t,n,"weekdaysShort")}function xs(e,t,n){return ms(e,t,n,"weekdaysMin")}hs.calendar=D,hs.longDateFormat=Y,hs.invalidDate=G,hs.ordinal=X,hs.preparse=us,hs.postformat=us,hs.relativeTime=J,hs.pastFuture=ee,hs.set=M,hs.eras=Ti,hs.erasParse=_i,hs.erasConvertYear=Mi,hs.erasAbbrRegex=Oi,hs.erasNameRegex=Bi,hs.erasNarrowRegex=Pi,hs.months=lt,hs.monthsShort=ct,hs.monthsParse=ut,hs.monthsRegex=gt,hs.monthsShortRegex=mt,hs.week=Ct,hs.firstDayOfYear=Nt,hs.firstDayOfWeek=Et,hs.weekdays=zt,hs.weekdaysMin=Ut,hs.weekdaysShort=Ft,hs.weekdaysParse=Wt,hs.weekdaysRegex=Zt,hs.weekdaysShortRegex=Gt,hs.weekdaysMinRegex=qt,hs.isPM=tn,hs.meridiem=sn,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Ae(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=j("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=j("moment.langData is deprecated. Use moment.localeData instead.",bn);var ws=Math.abs;function ks(){var e=this._data;return this._milliseconds=ws(this._milliseconds),this._days=ws(this._days),this._months=ws(this._months),e.milliseconds=ws(e.milliseconds),e.seconds=ws(e.seconds),e.minutes=ws(e.minutes),e.hours=ws(e.hours),e.months=ws(e.months),e.years=ws(e.years),this}function Ss(e,t,n,r){var i=Tr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Cs(e,t){return Ss(this,e,t,1)}function js(e,t){return Ss(this,e,t,-1)}function Es(e){return e<0?Math.floor(e):Math.ceil(e)}function Ns(){var e,t,n,r,i,s=this._milliseconds,a=this._days,o=this._months,l=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*Es(_s(o)+a),a=0,o=0),l.milliseconds=s%1e3,e=Me(s/1e3),l.seconds=e%60,t=Me(e/60),l.minutes=t%60,n=Me(t/60),l.hours=n%24,a+=Me(n/24),o+=i=Me(Ts(a)),a-=Es(_s(i)),r=Me(o/12),o%=12,l.days=a,l.months=o,l.years=r,this}function Ts(e){return 4800*e/146097}function _s(e){return 146097*e/4800}function Ms(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ts(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(_s(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function As(e){return function(){return this.as(e)}}var Rs=As("ms"),Is=As("s"),Ds=As("m"),Bs=As("h"),Os=As("d"),Ps=As("w"),Ls=As("M"),zs=As("Q"),Fs=As("y"),Us=Rs;function Vs(){return Tr(this)}function Ws(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Hs(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ks=Hs("milliseconds"),Ys=Hs("seconds"),Zs=Hs("minutes"),Gs=Hs("hours"),qs=Hs("days"),$s=Hs("months"),Xs=Hs("years");function Qs(){return Me(this.days()/7)}var Js=Math.round,ea={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ta(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function na(e,t,n,r){var i=Tr(e).abs(),s=Js(i.as("s")),a=Js(i.as("m")),o=Js(i.as("h")),l=Js(i.as("d")),c=Js(i.as("M")),d=Js(i.as("w")),u=Js(i.as("y")),h=s<=n.ss&&["s",s]||s0,h[4]=r,ta.apply(null,h)}function ra(e){return void 0===e?Js:"function"===typeof e&&(Js=e,!0)}function ia(e,t){return void 0!==ea[e]&&(void 0===t?ea[e]:(ea[e]=t,"s"===e&&(ea.ss=t-1),!0))}function sa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=ea;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(s=Object.assign({},ea,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),r=na(this,!i,s,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var aa=Math.abs;function oa(e){return(e>0)-(e<0)||+e}function la(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,a,o,l=aa(this._milliseconds)/1e3,c=aa(this._days),d=aa(this._months),u=this.asSeconds();return u?(e=Me(l/60),t=Me(e/60),l%=60,e%=60,n=Me(d/12),d%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=u<0?"-":"",s=oa(this._months)!==oa(u)?"-":"",a=oa(this._days)!==oa(u)?"-":"",o=oa(this._milliseconds)!==oa(u)?"-":"",i+"P"+(n?s+n+"Y":"")+(d?s+d+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(l?o+r+"S":"")):"P0D"}var ca=ar.prototype;return ca.isValid=ir,ca.abs=ks,ca.add=Cs,ca.subtract=js,ca.as=Ms,ca.asMilliseconds=Rs,ca.asSeconds=Is,ca.asMinutes=Ds,ca.asHours=Bs,ca.asDays=Os,ca.asWeeks=Ps,ca.asMonths=Ls,ca.asQuarters=zs,ca.asYears=Fs,ca.valueOf=Us,ca._bubble=Ns,ca.clone=Vs,ca.get=Ws,ca.milliseconds=Ks,ca.seconds=Ys,ca.minutes=Zs,ca.hours=Gs,ca.days=qs,ca.weeks=Qs,ca.months=$s,ca.years=Xs,ca.humanize=sa,ca.toISOString=la,ca.toString=la,ca.toJSON=la,ca.locale=ai,ca.localeData=li,ca.toIsoString=j("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",la),ca.lang=oi,F("X",0,0,"unix"),F("x",0,0,"valueOf"),Ee("x",ve),Ee("X",ke),Ie("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Ie("x",(function(e,t,n){n._d=new Date(Ae(e))})),r.version="2.30.1",i(qn),r.fn=ls,r.min=Jn,r.max=er,r.now=tr,r.utc=f,r.unix=cs,r.months=gs,r.isDate=u,r.locale=mn,r.invalid=b,r.duration=Tr,r.isMoment=S,r.weekdays=bs,r.parseZone=ds,r.localeData=bn,r.isDuration=or,r.monthsShort=ys,r.weekdaysMin=xs,r.defineLocale=gn,r.updateLocale=yn,r.locales=vn,r.weekdaysShort=vs,r.normalizeUnits=ne,r.relativeTimeRounding=ra,r.relativeTimeThreshold=ia,r.calendarFormat=Ur,r.prototype=ls,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()},8605:(e,t,n)=>{var r=n(392);function i(e,t){r.cipher.registerAlgorithm(e,(function(){return new r.aes.Algorithm(e,t)}))}n(3397),n(4533),n(3877),e.exports=r.aes=r.aes||{},r.aes.startEncrypting=function(e,t,n,r){var i=m({key:e,output:n,decrypt:!1,mode:r});return i.start(t),i},r.aes.createEncryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!1,mode:t})},r.aes.startDecrypting=function(e,t,n,r){var i=m({key:e,output:n,decrypt:!0,mode:r});return i.start(t),i},r.aes.createDecryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!0,mode:t})},r.aes.Algorithm=function(e,t){d||h();var n=this;n.name=e,n.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return f(n._w,e,t,!1)},decrypt:function(e,t){return f(n._w,e,t,!0)}}}),n._init=!1},r.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,n=e.key;if("string"!==typeof n||16!==n.length&&24!==n.length&&32!==n.length){if(r.util.isArray(n)&&(16===n.length||24===n.length||32===n.length)){t=n,n=r.util.createBuffer();for(var i=0;i>>=2;for(i=0;i>8^255&u^99,s[m]=u,a[u]=m,p=(h=e[u])<<24^u<<16^u<<8^u^h,f=((n=e[m])^(r=e[n])^(i=e[r]))<<24^(m^i)<<16^(m^r^i)<<8^m^n^i;for(var y=0;y<4;++y)l[y][m]=p,c[y][u]=f,p=p<<24|p>>>8,f=f<<24|f>>>8;0===m?m=g=1:(m=n^e[e[e[n^i]]],g^=e[e[g]])}}function p(e,t){for(var n,r=e.slice(0),i=1,a=r.length,l=u*(a+6+1),d=a;d>>16&255]<<24^s[n>>>8&255]<<16^s[255&n]<<8^s[n>>>24]^o[i]<<24,i++):a>6&&d%a===4&&(n=s[n>>>24]<<24^s[n>>>16&255]<<16^s[n>>>8&255]<<8^s[255&n]),r[d]=r[d-a]^n;if(t){for(var h,p=c[0],f=c[1],m=c[2],g=c[3],y=r.slice(0),b=(d=0,(l=r.length)-u);d>>24]]^f[s[h>>>16&255]]^m[s[h>>>8&255]]^g[s[255&h]];r=y}return r}function f(e,t,n,r){var i,o,d,u,h,p,f,m,g,y,b,v,x=e.length/4-1;r?(i=c[0],o=c[1],d=c[2],u=c[3],h=a):(i=l[0],o=l[1],d=l[2],u=l[3],h=s),p=t[0]^e[0],f=t[r?3:1]^e[1],m=t[2]^e[2],g=t[r?1:3]^e[3];for(var w=3,k=1;k>>24]^o[f>>>16&255]^d[m>>>8&255]^u[255&g]^e[++w],b=i[f>>>24]^o[m>>>16&255]^d[g>>>8&255]^u[255&p]^e[++w],v=i[m>>>24]^o[g>>>16&255]^d[p>>>8&255]^u[255&f]^e[++w],g=i[g>>>24]^o[p>>>16&255]^d[f>>>8&255]^u[255&m]^e[++w],p=y,f=b,m=v;n[0]=h[p>>>24]<<24^h[f>>>16&255]<<16^h[m>>>8&255]<<8^h[255&g]^e[++w],n[r?3:1]=h[f>>>24]<<24^h[m>>>16&255]<<16^h[g>>>8&255]<<8^h[255&p]^e[++w],n[2]=h[m>>>24]<<24^h[g>>>16&255]<<16^h[p>>>8&255]<<8^h[255&f]^e[++w],n[r?1:3]=h[g>>>24]<<24^h[p>>>16&255]<<16^h[f>>>8&255]<<8^h[255&m]^e[++w]}function m(e){var t,n="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?r.cipher.createDecipher(n,e.key):r.cipher.createCipher(n,e.key)).start;return t.start=function(e,n){var s=null;n instanceof r.util.ByteBuffer&&(s=n,n={}),(n=n||{}).output=s,n.iv=e,i.call(t,n)},t}},7590:(e,t,n)=>{var r=n(392);n(8605),n(2970);var i=e.exports=r.tls;function s(e,t,n){var s=t.entity===r.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:r.cipher.createDecipher("AES-CBC",s?n.keys.server_write_key:n.keys.client_write_key),iv:s?n.keys.server_write_IV:n.keys.client_write_IV},e.write.cipherState={init:!1,cipher:r.cipher.createCipher("AES-CBC",s?n.keys.client_write_key:n.keys.server_write_key),iv:s?n.keys.client_write_IV:n.keys.server_write_IV},e.read.cipherFunction=c,e.write.cipherFunction=a,e.read.macLength=e.write.macLength=n.mac_length,e.read.macFunction=e.write.macFunction=i.hmac_sha1}function a(e,t){var n,s=!1,a=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(a),t.updateSequenceNumber(),n=e.version.minor===i.Versions.TLS_1_0.minor?t.cipherState.init?null:t.cipherState.iv:r.random.getBytesSync(16),t.cipherState.init=!0;var l=t.cipherState.cipher;return l.start({iv:n}),e.version.minor>=i.Versions.TLS_1_1.minor&&l.output.putBytes(n),l.update(e.fragment),l.finish(o)&&(e.fragment=l.output,e.length=e.fragment.length(),s=!0),s}function o(e,t,n){if(!n){var r=e-t.length()%e;t.fillWithByte(r-1,r)}return!0}function l(e,t,n){var r=!0;if(n){for(var i=t.length(),s=t.last(),a=i-1-s;a=o?(e.fragment=a.output.getBytes(d-o),c=a.output.getBytes(o)):e.fragment=a.output.getBytes(),e.fragment=r.util.createBuffer(e.fragment),e.length=e.fragment.length();var u=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),s=function(e,t,n){var i=r.hmac.create();return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(n),n=i.digest().getBytes(),t===n}(t.macKey,c,u)&&s,s}i.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:s},i.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:s}},872:(e,t,n)=>{var r=n(392);n(5049);var i=r.asn1;t.privateKeyValidator={name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},t.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},5049:(e,t,n)=>{var r=n(392);n(3877),n(2886);var i=e.exports=r.asn1=r.asn1||{};function s(e,t,n){if(n>t){var r=new Error("Too few bytes to parse DER.");throw r.available=e.length(),r.remaining=t,r.requested=n,r}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(e,t,n,s,a){if(r.util.isArray(s)){for(var o=[],l=0;lt){if(r.strict){var f=new Error("Too few bytes to read ASN.1 value.");throw f.available=e.length(),f.remaining=t,f.requested=p,f}p=t}var m=32===(32&l);if(m)if(u=[],void 0===p)for(;;){if(s(e,t,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),t-=2;break}o=e.length(),u.push(a(e,t,n+1,r)),t-=o-e.length()}else for(;p>0;)o=e.length(),u.push(a(e,p,n+1,r)),t-=o-e.length(),p-=o-e.length();if(void 0===u&&c===i.Class.UNIVERSAL&&d===i.Type.BITSTRING&&(h=e.bytes(p)),void 0===u&&r.decodeBitStrings&&c===i.Class.UNIVERSAL&&d===i.Type.BITSTRING&&p>1){var g=e.read,y=t,b=0;if(d===i.Type.BITSTRING&&(s(e,t,1),b=e.getByte(),t--),0===b)try{o=e.length();var v=a(e,t,n+1,{strict:!0,decodeBitStrings:!0}),x=o-e.length();t-=x,d==i.Type.BITSTRING&&x++;var w=v.tagClass;x!==p||w!==i.Class.UNIVERSAL&&w!==i.Class.CONTEXT_SPECIFIC||(u=[v])}catch(S){}void 0===u&&(e.read=g,t=y)}if(void 0===u){if(void 0===p){if(r.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");p=t}if(d===i.Type.BMPSTRING)for(u="";p>0;p-=2)s(e,t,2),u+=String.fromCharCode(e.getInt16()),t-=2;else u=e.getBytes(p),t-=p}var k=void 0===h?null:{bitStringContents:h};return i.create(c,d,m,u,k)}i.fromDer=function(e,t){void 0===t&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),"boolean"===typeof t&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"===typeof e&&(e=r.util.createBuffer(e));var n=e.length(),i=a(e,e.length(),0,t);if(t.parseAllBytes&&0!==e.length()){var s=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw s.byteCount=n,s.remaining=e.length(),s}return i},i.toDer=function(e){var t=r.util.createBuffer(),n=e.tagClass|e.type,s=r.util.createBuffer(),a=!1;if("bitStringContents"in e&&(a=!0,e.original&&(a=i.equals(e,e.original))),a)s.putBytes(e.bitStringContents);else if(e.composed){e.constructed?n|=32:s.putByte(0);for(var o=0;o1&&(0===e.value.charCodeAt(0)&&0===(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128===(128&e.value.charCodeAt(1)))?s.putBytes(e.value.substr(1)):s.putBytes(e.value);if(t.putByte(n),s.length()<=127)t.putByte(127&s.length());else{var l=s.length(),c="";do{c+=String.fromCharCode(255&l),l>>>=8}while(l>0);t.putByte(128|c.length);for(o=c.length-1;o>=0;--o)t.putByte(c.charCodeAt(o))}return t.putBuffer(s),t},i.oidToDer=function(e){var t,n,i,s,a=e.split("."),o=r.util.createBuffer();o.putByte(40*parseInt(a[0],10)+parseInt(a[1],10));for(var l=2;l>>=7,t||(s|=128),n.push(s),t=!1}while(i>0);for(var c=n.length-1;c>=0;--c)o.putByte(n[c])}return o},i.derToOid=function(e){var t;"string"===typeof e&&(e=r.util.createBuffer(e));var n=e.getByte();t=Math.floor(n/40)+"."+n%40;for(var i=0;e.length()>0;)i<<=7,128&(n=e.getByte())?i+=127&n:(t+="."+(i+n),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,2),10);n=n>=50?1900+n:2e3+n;var r=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),s=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),o=0;if(e.length>11){var l=e.charAt(10),c=10;"+"!==l&&"-"!==l&&(o=parseInt(e.substr(10,2),10),c+=2)}if(t.setUTCFullYear(n,r,i),t.setUTCHours(s,a,o,0),c&&("+"===(l=e.charAt(c))||"-"===l)){var d=60*parseInt(e.substr(c+1,2),10)+parseInt(e.substr(c+4,2),10);d*=6e4,"+"===l?t.setTime(+t-d):t.setTime(+t+d)}return t},i.generalizedTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,4),10),r=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),a=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),l=0,c=0,d=!1;"Z"===e.charAt(e.length-1)&&(d=!0);var u=e.length-5,h=e.charAt(u);"+"!==h&&"-"!==h||(c=60*parseInt(e.substr(u+1,2),10)+parseInt(e.substr(u+4,2),10),c*=6e4,"+"===h&&(c*=-1),d=!0);return"."===e.charAt(14)&&(l=1e3*parseFloat(e.substr(14),10)),d?(t.setUTCFullYear(n,r,i),t.setUTCHours(s,a,o,l),t.setTime(+t+c)):(t.setFullYear(n,r,i),t.setHours(s,a,o,l)),t},i.dateToUtcTime=function(e){if("string"===typeof e)return e;var t="",n=[];n.push((""+e.getUTCFullYear()).substr(2)),n.push(""+(e.getUTCMonth()+1)),n.push(""+e.getUTCDate()),n.push(""+e.getUTCHours()),n.push(""+e.getUTCMinutes()),n.push(""+e.getUTCSeconds());for(var r=0;r=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var n=new Error("Integer too large; max is 32-bits.");throw n.integer=e,n},i.derToInteger=function(e){"string"===typeof e&&(e=r.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,n,s){var a=!1;if(e.tagClass!==t.tagClass&&"undefined"!==typeof t.tagClass||e.type!==t.type&&"undefined"!==typeof t.type)s&&(e.tagClass!==t.tagClass&&s.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&s.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||"undefined"===typeof t.constructed){if(a=!0,t.value&&r.util.isArray(t.value))for(var o=0,l=0;a&&l0&&(s+="\n");for(var a="",l=0;l1?s+="0x"+r.util.bytesToHex(e.value.slice(1)):s+="(none)",e.value.length>0){var h=e.value.charCodeAt(0);1==h?s+=" (1 unused bit shown)":h>1&&(s+=" ("+h+" unused bits shown)")}}else if(e.type===i.Type.OCTETSTRING)o.test(e.value)||(s+="("+e.value+") "),s+="0x"+r.util.bytesToHex(e.value);else if(e.type===i.Type.UTF8)try{s+=r.util.decodeUtf8(e.value)}catch(f){if("URI malformed"!==f.message)throw f;s+="0x"+r.util.bytesToHex(e.value)+" (malformed UTF8)"}else e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?s+=e.value:o.test(e.value)?s+="0x"+r.util.bytesToHex(e.value):0===e.value.length?s+="[null]":s+=e.value}return s}},5754:e=>{var t={};e.exports=t;var n={};t.encode=function(e,t,n){if("string"!==typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==n&&"number"!==typeof n)throw new TypeError('"maxline" must be a number.');var r="";if(e instanceof Uint8Array){var i=0,s=t.length,a=t.charAt(0),o=[0];for(i=0;i0;)o.push(c%s),c=c/s|0}for(i=0;0===e[i]&&i=0;--i)r+=t[o[i]]}else r=function(e,t){var n=0,r=t.length,i=t.charAt(0),s=[0];for(n=0;n0;)s.push(o%r),o=o/r|0}var l="";for(n=0;0===e.at(n)&&n=0;--n)l+=t[s[n]];return l}(e,t);if(n){var d=new RegExp(".{1,"+n+"}","g");r=r.match(d).join("\r\n")}return r},t.decode=function(e,t){if("string"!==typeof e)throw new TypeError('"input" must be a string.');if("string"!==typeof t)throw new TypeError('"alphabet" must be a string.');var r=n[t];if(!r){r=n[t]=[];for(var i=0;i>=8;for(;d>0;)o.push(255&d),d>>=8}for(var u=0;e[u]===a&&u{var r=n(392);n(3877),e.exports=r.cipher=r.cipher||{},r.cipher.algorithms=r.cipher.algorithms||{},r.cipher.createCipher=function(e,t){var n=e;if("string"===typeof n&&(n=r.cipher.getAlgorithm(n))&&(n=n()),!n)throw new Error("Unsupported algorithm: "+e);return new r.cipher.BlockCipher({algorithm:n,key:t,decrypt:!1})},r.cipher.createDecipher=function(e,t){var n=e;if("string"===typeof n&&(n=r.cipher.getAlgorithm(n))&&(n=n()),!n)throw new Error("Unsupported algorithm: "+e);return new r.cipher.BlockCipher({algorithm:n,key:t,decrypt:!0})},r.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),r.cipher.algorithms[e]=t},r.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in r.cipher.algorithms?r.cipher.algorithms[e]:null};var i=r.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var n in e)t[n]=e[n];t.decrypt=this._decrypt,this._finish=!1,this._input=r.util.createBuffer(),this.output=e.output||r.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},4533:(e,t,n)=>{var r=n(392);n(3877),r.cipher=r.cipher||{};var i=e.exports=r.cipher.modes=r.cipher.modes||{};function s(e,t){if("string"===typeof e&&(e=r.util.createBuffer(e)),r.util.isArray(e)&&e.length>4){var n=e;e=r.util.createBuffer();for(var i=0;i0))return!0;for(var r=0;r0))return!0;for(var r=0;r0)return!1;var n=e.length(),r=e.at(n-1);return!(r>this.blockSize<<2)&&(e.truncate(r),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=s(e.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,n){if(e.length()0))return!0;for(var r=0;r0))return!0;for(var r=0;r0)return!1;var n=e.length(),r=e.at(n-1);return!(r>this.blockSize<<2)&&(e.truncate(r),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=s(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,n){var r=e.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i0&&(s=this.blockSize-s),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!n)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,n){var r=e.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i0&&(s=this.blockSize-s),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!n)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=s(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,n){var r=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i0&&(s=this.blockSize-s),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!n)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=s(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,n){var r=e.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i0&&(s=this.blockSize-s),this._partialOutput.clear();for(i=0;i0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!n)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}a(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,n=r.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?r.util.createBuffer(e.additionalData):r.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=r.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=n.length();if(12===i)this._j0=[n.getInt32(),n.getInt32(),n.getInt32(),1];else{for(this._j0=[0,0,0,0];n.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[n.getInt32(),n.getInt32(),n.getInt32(),n.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(o(8*i)))}this._inBlock=this._j0.slice(0),a(this._inBlock),this._partialBytes=0,t=r.util.createBuffer(t),this._aDataLength=o(8*t.length());var s=t.length()%this.blockSize;for(s&&t.fillWithByte(0,this.blockSize-s),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,n){var r=e.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize){for(var i=0;i0&&(s=this.blockSize-s),this._partialOutput.clear();for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!n)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),a(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,n){var r=e.length();if(r0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),a(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--r)t[r]=e[r]>>>1|(1&e[r-1])<<31;t[0]=e[0]>>>1,n&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],n=0;n<32;++n){var r=e[n/8|0]>>>4*(7-n%8)&15,i=this._m[n][r];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,n){return t[0]^=n[0],t[1]^=n[1],t[2]^=n[2],t[3]^=n[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var n=8/t,r=4*n,i=16*n,s=new Array(i),a=0;a>>1,i=new Array(n);i[r]=e.slice(0);for(var s=r>>>1;s>0;)this.pow(i[2*s],i[s]=[]),s>>=1;for(s=2;s{var r=n(392);function i(e,t){r.cipher.registerAlgorithm(e,(function(){return new r.des.Algorithm(e,t)}))}n(3397),n(4533),n(3877),e.exports=r.des=r.des||{},r.des.startEncrypting=function(e,t,n,r){var i=f({key:e,output:n,decrypt:!1,mode:r||(null===t?"ECB":"CBC")});return i.start(t),i},r.des.createEncryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!1,mode:t})},r.des.startDecrypting=function(e,t,n,r){var i=f({key:e,output:n,decrypt:!0,mode:r||(null===t?"ECB":"CBC")});return i.start(t),i},r.des.createDecryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!0,mode:t})},r.des.Algorithm=function(e,t){var n=this;n.name=e,n.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return p(n._keys,e,t,!1)},decrypt:function(e,t){return p(n._keys,e,t,!0)}}}),n._init=!1},r.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=r.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,n=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],s=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],l=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],d=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],p=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],f=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],m=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length()>8?3:1,y=[],b=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],v=0,x=0;x>>4^k))<<4,w^=t=65535&((k^=t)>>>-16^w),w^=(t=858993459&(w>>>2^(k^=t<<-16)))<<2,w^=t=65535&((k^=t)>>>-16^w),w^=(t=1431655765&(w>>>1^(k^=t<<-16)))<<1,w^=t=16711935&((k^=t)>>>8^w),t=(w^=(t=1431655765&(w>>>1^(k^=t<<8)))<<1)<<8|(k^=t)>>>20&240,w=k<<24|k<<8&16711680|k>>>8&65280|k>>>24&240,k=t;for(var S=0;S>>26,k=k<<2|k>>>26):(w=w<<1|w>>>27,k=k<<1|k>>>27),k&=-15;var C=n[(w&=-15)>>>28]|r[w>>>24&15]|i[w>>>20&15]|s[w>>>16&15]|a[w>>>12&15]|o[w>>>8&15]|l[w>>>4&15],j=c[k>>>28]|d[k>>>24&15]|u[k>>>20&15]|h[k>>>16&15]|p[k>>>12&15]|f[k>>>8&15]|m[k>>>4&15];t=65535&(j>>>16^C),y[v++]=C^t,y[v++]=j^t<<16}}return y}(t),this._init=!0}},i("DES-ECB",r.cipher.modes.ecb),i("DES-CBC",r.cipher.modes.cbc),i("DES-CFB",r.cipher.modes.cfb),i("DES-OFB",r.cipher.modes.ofb),i("DES-CTR",r.cipher.modes.ctr),i("3DES-ECB",r.cipher.modes.ecb),i("3DES-CBC",r.cipher.modes.cbc),i("3DES-CFB",r.cipher.modes.cfb),i("3DES-OFB",r.cipher.modes.ofb),i("3DES-CTR",r.cipher.modes.ctr);var s=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],a=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],o=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],l=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],d=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],u=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(e,t,n,r){var i,p,f=32===e.length?3:9;i=3===f?r?[30,-2,-2]:[0,32,2]:r?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var m=t[0],g=t[1];m^=(p=252645135&(m>>>4^g))<<4,m^=(p=65535&(m>>>16^(g^=p)))<<16,m^=p=858993459&((g^=p)>>>2^m),m^=p=16711935&((g^=p<<2)>>>8^m),m=(m^=(p=1431655765&(m>>>1^(g^=p<<8)))<<1)<<1|m>>>31,g=(g^=p)<<1|g>>>31;for(var y=0;y>>4|g<<28)^e[x+1];p=m,m=g,g=p^(a[w>>>24&63]|l[w>>>16&63]|d[w>>>8&63]|h[63&w]|s[k>>>24&63]|o[k>>>16&63]|c[k>>>8&63]|u[63&k])}p=m,m=g,g=p}g=g>>>1|g<<31,g^=p=1431655765&((m=m>>>1|m<<31)>>>1^g),g^=(p=16711935&(g>>>8^(m^=p<<1)))<<8,g^=(p=858993459&(g>>>2^(m^=p)))<<2,g^=p=65535&((m^=p)>>>16^g),g^=p=252645135&((m^=p<<16)>>>4^g),m^=p<<4,n[0]=m,n[1]=g}function f(e){var t,n="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?r.cipher.createDecipher(n,e.key):r.cipher.createCipher(n,e.key)).start;return t.start=function(e,n){var s=null;n instanceof r.util.ByteBuffer&&(s=n,n={}),(n=n||{}).output=s,n.iv=e,i.call(t,n)},t}},5592:(e,t,n)=>{var r=n(392);n(3055),n(3860),n(4770),n(3877);var i=n(872),s=i.publicKeyValidator,a=i.privateKeyValidator;if("undefined"===typeof o)var o=r.jsbn.BigInteger;var l=r.util.ByteBuffer,c="undefined"===typeof Buffer?Uint8Array:Buffer;r.pki=r.pki||{},e.exports=r.pki.ed25519=r.ed25519=r.ed25519||{};var d=r.ed25519;function u(e){var t=e.message;if(t instanceof Uint8Array||t instanceof c)return t;var n=e.encoding;if(void 0===t){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');t=e.md.digest().getBytes(),n="binary"}if("string"===typeof t&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"===typeof t){if("undefined"!==typeof Buffer)return Buffer.from(t,n);t=new l(t,n)}else if(!(t instanceof l))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var r=new c(t.length()),i=0;i=0;--n)L(r,r),1!==n&&z(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}(n,n),z(n,n,i),z(n,n,s),z(n,n,s),z(e[0],n,s),L(r,e[0]),z(r,r,s),N(r,i)&&z(e[0],e[0],v);if(L(r,e[0]),z(r,r,s),N(r,i))return-1;_(e[0])===t[31]>>7&&P(e[0],h,e[0]);return z(e[3],e[0],e[1]),0}(o,r))return-1;for(i=0;i=0};var h=B(),p=B([1]),f=B([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),m=B([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),g=B([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),y=B([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),b=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),v=B([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function x(e,t){var n=r.md.sha512.create(),i=new l(e);n.update(i.getBytes(t),"binary");var s=n.digest().getBytes();if("undefined"!==typeof Buffer)return Buffer.from(s,"binary");for(var a=new c(d.constants.HASH_BYTE_LENGTH),o=0;o<64;++o)a[o]=s.charCodeAt(o);return a}function w(e,t){var n,r,i,s;for(r=63;r>=32;--r){for(n=0,i=r-32,s=r-12;i>8,t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;++i)t[i]+=n-(t[31]>>4)*b[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=n*b[i];for(r=0;r<32;++r)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function k(e){for(var t=new Float64Array(64),n=0;n<64;++n)t[n]=e[n],e[n]=0;w(e,t)}function S(e,t){var n=B(),r=B(),i=B(),s=B(),a=B(),o=B(),l=B(),c=B(),d=B();P(n,e[1],e[0]),P(d,t[1],t[0]),z(n,n,d),O(r,e[0],e[1]),O(d,t[0],t[1]),z(r,r,d),z(i,e[3],t[3]),z(i,i,m),z(s,e[2],t[2]),O(s,s,s),P(a,r,n),P(o,s,i),O(l,s,i),O(c,r,n),z(e[0],a,o),z(e[1],c,l),z(e[2],l,o),z(e[3],a,c)}function C(e,t,n){for(var r=0;r<4;++r)D(e[r],t[r],n)}function j(e,t){var n=B(),r=B(),i=B();!function(e,t){var n,r=B();for(n=0;n<16;++n)r[n]=t[n];for(n=253;n>=0;--n)L(r,r),2!==n&&4!==n&&z(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}(i,t[2]),z(n,t[0],i),z(r,t[1],i),E(e,r),e[31]^=_(n)<<7}function E(e,t){var n,r,i,s=B(),a=B();for(n=0;n<16;++n)a[n]=t[n];for(I(a),I(a),I(a),r=0;r<2;++r){for(s[0]=a[0]-65517,n=1;n<15;++n)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,D(a,s,1-i)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function N(e,t){var n=new c(32),r=new c(32);return E(n,e),E(r,t),T(n,0,r,0)}function T(e,t,n,r){return function(e,t,n,r,i){var s,a=0;for(s=0;s>>8)-1}(e,t,n,r,32)}function _(e){var t=new c(32);return E(t,e),1&t[0]}function M(e,t,n){var r,i;for(R(e[0],h),R(e[1],p),R(e[2],p),R(e[3],h),i=255;i>=0;--i)C(e,t,r=n[i/8|0]>>(7&i)&1),S(t,e),S(e,e),C(e,t,r)}function A(e,t){var n=[B(),B(),B(),B()];R(n[0],g),R(n[1],y),R(n[2],p),z(n[3],g,y),M(e,n,t)}function R(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function I(e){var t,n,r=1;for(t=0;t<16;++t)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function D(e,t,n){for(var r,i=~(n-1),s=0;s<16;++s)r=i&(e[s]^t[s]),e[s]^=r,t[s]^=r}function B(e){var t,n=new Float64Array(16);if(e)for(t=0;t{e.exports={options:{usePureJavaScript:!1}}},878:(e,t,n)=>{var r=n(392);n(29),n(3877),(e.exports=r.hmac=r.hmac||{}).create=function(){var e=null,t=null,n=null,i=null,s={start:function(s,a){if(null!==s)if("string"===typeof s){if(!((s=s.toLowerCase())in r.md.algorithms))throw new Error('Unknown hash algorithm "'+s+'"');t=r.md.algorithms[s].create()}else t=s;if(null===a)a=e;else{if("string"===typeof a)a=r.util.createBuffer(a);else if(r.util.isArray(a)){var o=a;a=r.util.createBuffer();for(var l=0;lt.blockLength&&(t.start(),t.update(a.bytes()),a=t.digest()),n=r.util.createBuffer(),i=r.util.createBuffer(),c=a.length();for(l=0;l{e.exports=n(392),n(8605),n(7590),n(5049),n(3397),n(7464),n(5592),n(878),n(942),n(2772),n(5064),n(7263),n(6019),n(6193),n(6882),n(7455),n(4660),n(6878),n(5132),n(6140),n(325),n(3860),n(654),n(3417),n(2970),n(3877)},3055:(e,t,n)=>{var r,i=n(392);e.exports=i.jsbn=i.jsbn||{};function s(e,t,n){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function a(){return new s(null)}function o(e,t,n,r,i,s){for(var a=16383&t,o=t>>14;--s>=0;){var l=16383&this.data[e],c=this.data[e++]>>14,d=o*l+c*a;i=((l=a*l+((16383&d)<<14)+n.data[r]+i)>>28)+(d>>14)+o*c,n.data[r++]=268435455&l}return i}i.jsbn.BigInteger=s,"undefined"===typeof navigator?(s.prototype.am=o,r=28):"Microsoft Internet Explorer"==navigator.appName?(s.prototype.am=function(e,t,n,r,i,s){for(var a=32767&t,o=t>>15;--s>=0;){var l=32767&this.data[e],c=this.data[e++]>>15,d=o*l+c*a;i=((l=a*l+((32767&d)<<15)+n.data[r]+(1073741823&i))>>>30)+(d>>>15)+o*c+(i>>>30),n.data[r++]=1073741823&l}return i},r=30):"Netscape"!=navigator.appName?(s.prototype.am=function(e,t,n,r,i,s){for(;--s>=0;){var a=t*this.data[e++]+n.data[r]+i;i=Math.floor(a/67108864),n.data[r++]=67108863&a}return i},r=26):(s.prototype.am=o,r=28),s.prototype.DB=r,s.prototype.DM=(1<>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function g(e){this.m=e}function y(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function S(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function C(){}function j(e){return e}function E(e){this.r2=a(),this.q3=a(),s.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function(e){return e},g.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},y.prototype.convert=function(e){var t=a();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(s.ZERO)>0&&this.m.subTo(t,t),t},y.prototype.revert=function(e){var t=a();return e.copyTo(t),this.reduce(t),t},y.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e.data[n]+=this.m.am(0,r,e,t,0,this.m.t);e.data[n]>=e.DV;)e.data[n]-=e.DV,e.data[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},y.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},y.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},s.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},s.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},s.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var r=e.length,i=!1,a=0;--r>=0;){var o=8==n?255&e[r]:p(e,r);o<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==a?this.data[this.t++]=o:a+n>this.DB?(this.data[this.t-1]|=(o&(1<>this.DB-a):this.data[this.t-1]|=o<=this.DB&&(a-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,a>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t},s.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t.data[n+e]=this.data[n];for(n=e-1;n>=0;--n)t.data[n]=0;t.t=this.t+e,t.s=this.s},s.prototype.drShiftTo=function(e,t){for(var n=e;n=0;--n)t.data[n+a+1]=this.data[n]>>i|o,o=(this.data[n]&s)<=0;--n)t.data[n]=0;t.data[a]=o,t.t=this.t+a+1,t.s=this.s,t.clamp()},s.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,s=(1<>r;for(var a=n+1;a>r;r>0&&(t.data[this.t-n-1]|=(this.s&s)<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t.data[n++]=this.DV+r:r>0&&(t.data[n++]=r),t.t=n,t.clamp()},s.prototype.multiplyTo=function(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t.data[i]=0;for(i=0;i=0;)e.data[n]=0;for(n=0;n=t.DV&&(e.data[n+t.t]-=t.DV,e.data[n+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(n,t.data[n],e,2*n,0,1)),e.s=0,e.clamp()},s.prototype.divRemTo=function(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t0?(r.lShiftTo(d,o),i.lShiftTo(d,n)):(r.copyTo(o),i.copyTo(n));var u=o.t,h=o.data[u-1];if(0!=h){var p=h*(1<1?o.data[u-2]>>this.F2:0),f=this.FV/p,g=(1<=0&&(n.data[n.t++]=1,n.subTo(x,n)),s.ONE.dlShiftTo(u,x),x.subTo(o,o);o.t=0;){var w=n.data[--b]==h?this.DM:Math.floor(n.data[b]*f+(n.data[b-1]+y)*g);if((n.data[b]+=o.am(0,w,n,v,0,u))0&&n.rShiftTo(d,n),l<0&&s.ZERO.subTo(n,n)}}},s.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},s.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},s.prototype.exp=function(e,t){if(e>4294967295||e<1)return s.ONE;var n=a(),r=a(),i=t.convert(this),o=m(e)-1;for(i.copyTo(n);--o>=0;)if(t.sqrTo(n,r),(e&1<0)t.mulTo(r,i,n);else{var l=n;n=r,r=l}return t.revert(n)},s.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<0)for(o>o)>0&&(i=!0,s=h(n));a>=0;)o>(o+=this.DB-t)):(n=this.data[a]>>(o-=t)&r,o<=0&&(o+=this.DB,--a)),n>0&&(i=!0),i&&(s+=h(n));return i?s:"0"},s.prototype.negate=function(){var e=a();return s.ZERO.subTo(this,e),e},s.prototype.abs=function(){return this.s<0?this.negate():this},s.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this.data[n]-e.data[n]))return t;return 0},s.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+m(this.data[this.t-1]^this.s&this.DM)},s.prototype.mod=function(e){var t=a();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(s.ZERO)>0&&e.subTo(t,t),t},s.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new g(t):new y(t),this.exp(e,n)},s.ZERO=f(0),s.ONE=f(1),C.prototype.convert=j,C.prototype.revert=j,C.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},C.prototype.sqrTo=function(e,t){e.squareTo(t)},E.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=a();return e.copyTo(t),this.reduce(t),t},E.prototype.revert=function(e){return e},E.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},E.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},E.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],T=(1<<26)/N[N.length-1];s.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},s.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=f(n),i=a(),s=a(),o="";for(this.divRemTo(r,i,s);i.signum()>0;)o=(n+s.intValue()).toString(e).substr(1)+o,i.divRemTo(r,i,s);return s.intValue().toString(e)+o},s.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),r=Math.pow(t,n),i=!1,a=0,o=0,l=0;l=n&&(this.dMultiply(r),this.dAddOffset(o,0),a=0,o=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(o,0)),i&&s.ZERO.subTo(this,this)},s.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(s.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(s.ONE.shiftLeft(e-1),this);else{var r=new Array,i=7&e;r.length=1+(e>>3),t.nextBytes(r),i>0?r[0]&=(1<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t.data[n++]=r:r<-1&&(t.data[n++]=this.DV+r),t.t=n,t.clamp()},s.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},s.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},s.prototype.multiplyLowerTo=function(e,t,n){var r,i=Math.min(this.t+e.t,t);for(n.s=0,n.t=i;i>0;)n.data[--i]=0;for(r=n.t-this.t;i=0;)n.data[r]=0;for(r=Math.max(t-this.t,0);r0)if(0==t)n=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this.data[r])%e;return n},s.prototype.millerRabin=function(e){var t=this.subtract(s.ONE),n=t.getLowestSetBit();if(n<=0)return!1;for(var r,i=t.shiftRight(n),a={nextBytes:function(e){for(var t=0;t=0);var l=r.modPow(i,this);if(0!=l.compareTo(s.ONE)&&0!=l.compareTo(t)){for(var c=1;c++>24},s.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},s.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},s.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<=0;)r<8?(n=(this.data[e]&(1<>(r+=this.DB-8)):(n=this.data[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},s.prototype.equals=function(e){return 0==this.compareTo(e)},s.prototype.min=function(e){return this.compareTo(e)<0?this:e},s.prototype.max=function(e){return this.compareTo(e)>0?this:e},s.prototype.and=function(e){var t=a();return this.bitwiseTo(e,b,t),t},s.prototype.or=function(e){var t=a();return this.bitwiseTo(e,v,t),t},s.prototype.xor=function(e){var t=a();return this.bitwiseTo(e,x,t),t},s.prototype.andNot=function(e){var t=a();return this.bitwiseTo(e,w,t),t},s.prototype.not=function(){for(var e=a(),t=0;t=this.t?0!=this.s:0!=(this.data[t]&1<1){var u=a();for(r.sqrTo(o[1],u);l<=d;)o[l]=a(),r.mulTo(u,o[l-2],o[l]),l+=2}var h,p,b=e.t-1,v=!0,x=a();for(i=m(e.data[b])-1;b>=0;){for(i>=c?h=e.data[b]>>i-c&d:(h=(e.data[b]&(1<0&&(h|=e.data[b-1]>>this.DB+i-c)),l=n;0==(1&h);)h>>=1,--l;if((i-=l)<0&&(i+=this.DB,--b),v)o[h].copyTo(s),v=!1;else{for(;l>1;)r.sqrTo(s,x),r.sqrTo(x,s),l-=2;l>0?r.sqrTo(s,x):(p=s,s=x,x=p),r.mulTo(x,o[h],s)}for(;b>=0&&0==(e.data[b]&1<=0?(n.subTo(r,n),t&&i.subTo(o,i),a.subTo(l,a)):(r.subTo(n,r),t&&o.subTo(i,o),l.subTo(a,l))}return 0!=r.compareTo(s.ONE)?s.ZERO:l.compareTo(e)>=0?l.subtract(e):l.signum()<0?(l.addTo(e,l),l.signum()<0?l.add(e):l):l},s.prototype.pow=function(e){return this.exp(e,new C)},s.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),s=n.getLowestSetBit();if(s<0)return t;for(i0&&(t.rShiftTo(s,t),n.rShiftTo(s,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return s>0&&n.lShiftTo(s,n),n},s.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n.data[0]<=N[N.length-1]){for(t=0;t{var r=n(392);n(3877),n(3860),n(3055),e.exports=r.kem=r.kem||{};var i=r.jsbn.BigInteger;function s(e,t,n,i){e.generate=function(e,s){for(var a=new r.util.ByteBuffer,o=Math.ceil(s/i)+n,l=new r.util.ByteBuffer,c=n;c0&&(a=r.util.fillString(String.fromCharCode(0),l)+a),{encapsulation:t.encrypt(a,"NONE"),key:e.generate(a,s)}},decrypt:function(t,n,r){var i=t.decrypt(n,"NONE");return e.generate(i,r)}};return s},r.kem.kdf1=function(e,t){s(this,e,0,t||e.digestLength)},r.kem.kdf2=function(e,t){s(this,e,1,t||e.digestLength)}},2772:(e,t,n)=>{var r=n(392);n(3877),e.exports=r.log=r.log||{},r.log.levels=["none","error","warning","info","debug","verbose","max"];var i={},s=[],a=null;r.log.LEVEL_LOCKED=2,r.log.NO_LEVEL_CHECK=4,r.log.INTERPOLATE=8;for(var o=0;o{e.exports=n(29),n(1016),n(928),n(7404),n(4770)},29:(e,t,n)=>{var r=n(392);e.exports=r.md=r.md||{},r.md.algorithms=r.md.algorithms||{}},1016:(e,t,n)=>{var r=n(392);n(29),n(3877);var i=e.exports=r.md5=r.md5||{};r.md.md5=r.md.algorithms.md5=i,i.create=function(){c||function(){s=String.fromCharCode(128),s+=r.util.fillString(String.fromCharCode(0),64),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],o=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],l=new Array(64);for(var e=0;e<64;++e)l[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));c=!0}();var e=null,t=r.util.createBuffer(),n=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,s=0;s>>0,o>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=o[1],o[1]=o[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(s),d(e,n,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=r.util.createBuffer();a.putBytes(t.bytes());var o=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;a.putBytes(s.substr(0,i.blockLength-o));for(var l,c=0,u=i.fullMessageLength.length-1;u>=0;--u)c=(l=8*i.fullMessageLength[u]+c)/4294967296>>>0,a.putInt32Le(l>>>0);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};d(h,n,a);var p=r.util.createBuffer();return p.putInt32Le(h.h0),p.putInt32Le(h.h1),p.putInt32Le(h.h2),p.putInt32Le(h.h3),p},i};var s=null,a=null,o=null,l=null,c=!1;function d(e,t,n){for(var r,i,s,c,d,u,h,p=n.length();p>=64;){for(i=e.h0,s=e.h1,c=e.h2,d=e.h3,h=0;h<16;++h)t[h]=n.getInt32Le(),r=i+(d^s&(c^d))+l[h]+t[h],i=d,d=c,c=s,s+=r<<(u=o[h])|r>>>32-u;for(;h<32;++h)r=i+(c^d&(s^c))+l[h]+t[a[h]],i=d,d=c,c=s,s+=r<<(u=o[h])|r>>>32-u;for(;h<48;++h)r=i+(s^c^d)+l[h]+t[a[h]],i=d,d=c,c=s,s+=r<<(u=o[h])|r>>>32-u;for(;h<64;++h)r=i+(c^(s|~d))+l[h]+t[a[h]],i=d,d=c,c=s,s+=r<<(u=o[h])|r>>>32-u;e.h0=e.h0+i|0,e.h1=e.h1+s|0,e.h2=e.h2+c|0,e.h3=e.h3+d|0,p-=64}}},1902:(e,t,n)=>{var r=n(392);n(7263),e.exports=r.mgf=r.mgf||{},r.mgf.mgf1=r.mgf1},7263:(e,t,n)=>{var r=n(392);n(3877),r.mgf=r.mgf||{},(e.exports=r.mgf.mgf1=r.mgf1=r.mgf1||{}).create=function(e){return{generate:function(t,n){for(var i=new r.util.ByteBuffer,s=Math.ceil(n/e.digestLength),a=0;a{var r=n(392);r.pki=r.pki||{};var i=e.exports=r.pki.oids=r.oids=r.oids||{};function s(e,t){i[e]=t,i[t]=e}function a(e,t){i[e]=t}s("1.2.840.113549.1.1.1","rsaEncryption"),s("1.2.840.113549.1.1.4","md5WithRSAEncryption"),s("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),s("1.2.840.113549.1.1.7","RSAES-OAEP"),s("1.2.840.113549.1.1.8","mgf1"),s("1.2.840.113549.1.1.9","pSpecified"),s("1.2.840.113549.1.1.10","RSASSA-PSS"),s("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),s("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),s("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),s("1.3.101.112","EdDSA25519"),s("1.2.840.10040.4.3","dsa-with-sha1"),s("1.3.14.3.2.7","desCBC"),s("1.3.14.3.2.26","sha1"),s("1.3.14.3.2.29","sha1WithRSASignature"),s("2.16.840.1.101.3.4.2.1","sha256"),s("2.16.840.1.101.3.4.2.2","sha384"),s("2.16.840.1.101.3.4.2.3","sha512"),s("2.16.840.1.101.3.4.2.4","sha224"),s("2.16.840.1.101.3.4.2.5","sha512-224"),s("2.16.840.1.101.3.4.2.6","sha512-256"),s("1.2.840.113549.2.2","md2"),s("1.2.840.113549.2.5","md5"),s("1.2.840.113549.1.7.1","data"),s("1.2.840.113549.1.7.2","signedData"),s("1.2.840.113549.1.7.3","envelopedData"),s("1.2.840.113549.1.7.4","signedAndEnvelopedData"),s("1.2.840.113549.1.7.5","digestedData"),s("1.2.840.113549.1.7.6","encryptedData"),s("1.2.840.113549.1.9.1","emailAddress"),s("1.2.840.113549.1.9.2","unstructuredName"),s("1.2.840.113549.1.9.3","contentType"),s("1.2.840.113549.1.9.4","messageDigest"),s("1.2.840.113549.1.9.5","signingTime"),s("1.2.840.113549.1.9.6","counterSignature"),s("1.2.840.113549.1.9.7","challengePassword"),s("1.2.840.113549.1.9.8","unstructuredAddress"),s("1.2.840.113549.1.9.14","extensionRequest"),s("1.2.840.113549.1.9.20","friendlyName"),s("1.2.840.113549.1.9.21","localKeyId"),s("1.2.840.113549.1.9.22.1","x509Certificate"),s("1.2.840.113549.1.12.10.1.1","keyBag"),s("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),s("1.2.840.113549.1.12.10.1.3","certBag"),s("1.2.840.113549.1.12.10.1.4","crlBag"),s("1.2.840.113549.1.12.10.1.5","secretBag"),s("1.2.840.113549.1.12.10.1.6","safeContentsBag"),s("1.2.840.113549.1.5.13","pkcs5PBES2"),s("1.2.840.113549.1.5.12","pkcs5PBKDF2"),s("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),s("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),s("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),s("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),s("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),s("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),s("1.2.840.113549.2.7","hmacWithSHA1"),s("1.2.840.113549.2.8","hmacWithSHA224"),s("1.2.840.113549.2.9","hmacWithSHA256"),s("1.2.840.113549.2.10","hmacWithSHA384"),s("1.2.840.113549.2.11","hmacWithSHA512"),s("1.2.840.113549.3.7","des-EDE3-CBC"),s("2.16.840.1.101.3.4.1.2","aes128-CBC"),s("2.16.840.1.101.3.4.1.22","aes192-CBC"),s("2.16.840.1.101.3.4.1.42","aes256-CBC"),s("2.5.4.3","commonName"),s("2.5.4.4","surname"),s("2.5.4.5","serialNumber"),s("2.5.4.6","countryName"),s("2.5.4.7","localityName"),s("2.5.4.8","stateOrProvinceName"),s("2.5.4.9","streetAddress"),s("2.5.4.10","organizationName"),s("2.5.4.11","organizationalUnitName"),s("2.5.4.12","title"),s("2.5.4.13","description"),s("2.5.4.15","businessCategory"),s("2.5.4.17","postalCode"),s("2.5.4.42","givenName"),s("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),s("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),s("2.16.840.1.113730.1.1","nsCertType"),s("2.16.840.1.113730.1.13","nsComment"),a("2.5.29.1","authorityKeyIdentifier"),a("2.5.29.2","keyAttributes"),a("2.5.29.3","certificatePolicies"),a("2.5.29.4","keyUsageRestriction"),a("2.5.29.5","policyMapping"),a("2.5.29.6","subtreesConstraint"),a("2.5.29.7","subjectAltName"),a("2.5.29.8","issuerAltName"),a("2.5.29.9","subjectDirectoryAttributes"),a("2.5.29.10","basicConstraints"),a("2.5.29.11","nameConstraints"),a("2.5.29.12","policyConstraints"),a("2.5.29.13","basicConstraints"),s("2.5.29.14","subjectKeyIdentifier"),s("2.5.29.15","keyUsage"),a("2.5.29.16","privateKeyUsagePeriod"),s("2.5.29.17","subjectAltName"),s("2.5.29.18","issuerAltName"),s("2.5.29.19","basicConstraints"),a("2.5.29.20","cRLNumber"),a("2.5.29.21","cRLReason"),a("2.5.29.22","expirationDate"),a("2.5.29.23","instructionCode"),a("2.5.29.24","invalidityDate"),a("2.5.29.25","cRLDistributionPoints"),a("2.5.29.26","issuingDistributionPoint"),a("2.5.29.27","deltaCRLIndicator"),a("2.5.29.28","issuingDistributionPoint"),a("2.5.29.29","certificateIssuer"),a("2.5.29.30","nameConstraints"),s("2.5.29.31","cRLDistributionPoints"),s("2.5.29.32","certificatePolicies"),a("2.5.29.33","policyMappings"),a("2.5.29.34","policyConstraints"),s("2.5.29.35","authorityKeyIdentifier"),a("2.5.29.36","policyConstraints"),s("2.5.29.37","extKeyUsage"),a("2.5.29.46","freshestCRL"),a("2.5.29.54","inhibitAnyPolicy"),s("1.3.6.1.4.1.11129.2.4.2","timestampList"),s("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),s("1.3.6.1.5.5.7.3.1","serverAuth"),s("1.3.6.1.5.5.7.3.2","clientAuth"),s("1.3.6.1.5.5.7.3.3","codeSigning"),s("1.3.6.1.5.5.7.3.4","emailProtection"),s("1.3.6.1.5.5.7.3.8","timeStamping")},9835:(e,t,n)=>{var r=n(392);if(n(8605),n(5049),n(7464),n(29),n(2886),n(6019),n(6193),n(3860),n(654),n(5493),n(3877),"undefined"===typeof i)var i=r.jsbn.BigInteger;var s=r.asn1,a=r.pki=r.pki||{};e.exports=a.pbe=r.pbe=r.pbe||{};var o=a.oids,l={name:"EncryptedPrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},c={name:"PBES2Algorithms",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},d={name:"pkcs-12PbeParams",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"iterations"}]};function u(e,t){return e.start().update(t).digest().getBytes()}function h(e){var t;if(e){if(!(t=a.oids[s.derToOid(e)])){var n=new Error("Unsupported PRF OID.");throw n.oid=e,n.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],n}}else t="hmacWithSHA1";return p(t)}function p(e){var t=r.md;switch(e){case"hmacWithSHA224":t=r.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var n=new Error("Unsupported PRF algorithm.");throw n.algorithm=e,n.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],n}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}a.encryptPrivateKeyInfo=function(e,t,n){(n=n||{}).saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||"aes128",n.prfAlgorithm=n.prfAlgorithm||"sha1";var i,l,c,d=r.random.getBytesSync(n.saltSize),u=n.count,h=s.integerToDer(u);if(0===n.algorithm.indexOf("aes")||"des"===n.algorithm){var f,m,g;switch(n.algorithm){case"aes128":i=16,f=16,m=o["aes128-CBC"],g=r.aes.createEncryptionCipher;break;case"aes192":i=24,f=16,m=o["aes192-CBC"],g=r.aes.createEncryptionCipher;break;case"aes256":i=32,f=16,m=o["aes256-CBC"],g=r.aes.createEncryptionCipher;break;case"des":i=8,f=8,m=o.desCBC,g=r.des.createEncryptionCipher;break;default:throw(k=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=n.algorithm,k}var y="hmacWith"+n.prfAlgorithm.toUpperCase(),b=p(y),v=r.pkcs5.pbkdf2(t,d,u,i,b),x=r.random.getBytesSync(f);(S=g(v)).start(x),S.update(s.toDer(e)),S.finish(),c=S.output.getBytes();var w=function(e,t,n,i){var o=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,e),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,t.getBytes())]);"hmacWithSHA1"!==i&&o.value.push(s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,r.util.hexToBytes(n.toString(16))),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(a.oids[i]).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]));return o}(d,h,i,y);l=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(o.pkcs5PBES2).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(o.pkcs5PBKDF2).getBytes()),w]),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(m).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,x)])])])}else{var k;if("3des"!==n.algorithm)throw(k=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=n.algorithm,k;i=24;var S,C=new r.util.ByteBuffer(d);v=a.pbe.generatePkcs12Key(t,C,1,u,i),x=a.pbe.generatePkcs12Key(t,C,2,u,i);(S=r.des.createEncryptionCipher(v)).start(x),S.update(s.toDer(e)),S.finish(),c=S.output.getBytes(),l=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(o["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,d),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,h.getBytes())])])}return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[l,s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,c)])},a.decryptPrivateKeyInfo=function(e,t){var n=null,i={},o=[];if(!s.validate(e,l,i,o)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=o,c}var d=s.derToOid(i.encryptionOid),u=a.pbe.getCipher(d,i.encryptionParams,t),h=r.util.createBuffer(i.encryptedData);return u.update(h),u.finish()&&(n=s.fromDer(u.output)),n},a.encryptedPrivateKeyToPem=function(e,t){var n={type:"ENCRYPTED PRIVATE KEY",body:s.toDer(e).getBytes()};return r.pem.encode(n,{maxline:t})},a.encryptedPrivateKeyFromPem=function(e){var t=r.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var n=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw n.headerType=t.type,n}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return s.fromDer(t.body)},a.encryptRsaPrivateKey=function(e,t,n){if(!(n=n||{}).legacy){var i=a.wrapRsaPrivateKey(a.privateKeyToAsn1(e));return i=a.encryptPrivateKeyInfo(i,t,n),a.encryptedPrivateKeyToPem(i)}var o,l,c,d;switch(n.algorithm){case"aes128":o="AES-128-CBC",c=16,l=r.random.getBytesSync(16),d=r.aes.createEncryptionCipher;break;case"aes192":o="AES-192-CBC",c=24,l=r.random.getBytesSync(16),d=r.aes.createEncryptionCipher;break;case"aes256":o="AES-256-CBC",c=32,l=r.random.getBytesSync(16),d=r.aes.createEncryptionCipher;break;case"3des":o="DES-EDE3-CBC",c=24,l=r.random.getBytesSync(8),d=r.des.createEncryptionCipher;break;case"des":o="DES-CBC",c=8,l=r.random.getBytesSync(8),d=r.des.createEncryptionCipher;break;default:var u=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+n.algorithm+'".');throw u.algorithm=n.algorithm,u}var h=d(r.pbe.opensslDeriveBytes(t,l.substr(0,8),c));h.start(l),h.update(s.toDer(a.privateKeyToAsn1(e))),h.finish();var p={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:o,parameters:r.util.bytesToHex(l).toUpperCase()},body:h.output.getBytes()};return r.pem.encode(p)},a.decryptRsaPrivateKey=function(e,t){var n=null,i=r.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(c=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=c,c;if(i.procType&&"ENCRYPTED"===i.procType.type){var o,l;switch(i.dekInfo.algorithm){case"DES-CBC":o=8,l=r.des.createDecryptionCipher;break;case"DES-EDE3-CBC":o=24,l=r.des.createDecryptionCipher;break;case"AES-128-CBC":o=16,l=r.aes.createDecryptionCipher;break;case"AES-192-CBC":o=24,l=r.aes.createDecryptionCipher;break;case"AES-256-CBC":o=32,l=r.aes.createDecryptionCipher;break;case"RC2-40-CBC":o=5,l=function(e){return r.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":o=8,l=function(e){return r.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":o=16,l=function(e){return r.rc2.createDecryptionCipher(e,128)};break;default:var c;throw(c=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,c}var d=r.util.hexToBytes(i.dekInfo.parameters),u=l(r.pbe.opensslDeriveBytes(t,d.substr(0,8),o));if(u.start(d),u.update(r.util.createBuffer(i.body)),!u.finish())return n;n=u.output.getBytes()}else n=i.body;return null!==(n="ENCRYPTED PRIVATE KEY"===i.type?a.decryptPrivateKeyInfo(s.fromDer(n),t):s.fromDer(n))&&(n=a.privateKeyFromAsn1(n)),n},a.pbe.generatePkcs12Key=function(e,t,n,i,s,a){var o,l;if("undefined"===typeof a||null===a){if(!("sha1"in r.md))throw new Error('"sha1" hash algorithm unavailable.');a=r.md.sha1.create()}var c=a.digestLength,d=a.blockLength,u=new r.util.ByteBuffer,h=new r.util.ByteBuffer;if(null!==e&&void 0!==e){for(l=0;l=0;l--)_>>=8,_+=j.at(l)+T.at(l),T.setAt(l,255&_);N.putBuffer(T)}x=N,u.putBuffer(S)}return u.truncate(u.length()-s),u},a.pbe.getCipher=function(e,t,n){switch(e){case a.oids.pkcs5PBES2:return a.pbe.getCipherForPBES2(e,t,n);case a.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case a.oids["pbewithSHAAnd40BitRC2-CBC"]:return a.pbe.getCipherForPKCS12PBE(e,t,n);default:var r=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw r.oid=e,r.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],r}},a.pbe.getCipherForPBES2=function(e,t,n){var i,o={},l=[];if(!s.validate(t,c,o,l))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=l,i;if((e=s.derToOid(o.kdfOid))!==a.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=s.derToOid(o.encOid))!==a.oids["aes128-CBC"]&&e!==a.oids["aes192-CBC"]&&e!==a.oids["aes256-CBC"]&&e!==a.oids["des-EDE3-CBC"]&&e!==a.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var d,u,p=o.kdfSalt,f=r.util.createBuffer(o.kdfIterationCount);switch(f=f.getInt(f.length()<<3),a.oids[e]){case"aes128-CBC":d=16,u=r.aes.createDecryptionCipher;break;case"aes192-CBC":d=24,u=r.aes.createDecryptionCipher;break;case"aes256-CBC":d=32,u=r.aes.createDecryptionCipher;break;case"des-EDE3-CBC":d=24,u=r.des.createDecryptionCipher;break;case"desCBC":d=8,u=r.des.createDecryptionCipher}var m=h(o.prfOid),g=r.pkcs5.pbkdf2(n,p,f,d,m),y=o.encIv,b=u(g);return b.start(y),b},a.pbe.getCipherForPKCS12PBE=function(e,t,n){var i={},o=[];if(!s.validate(t,d,i,o))throw(m=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=o,m;var l,c,u,p=r.util.createBuffer(i.salt),f=r.util.createBuffer(i.iterations);switch(f=f.getInt(f.length()<<3),e){case a.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:l=24,c=8,u=r.des.startDecrypting;break;case a.oids["pbewithSHAAnd40BitRC2-CBC"]:l=5,c=8,u=function(e,t){var n=r.rc2.createDecryptionCipher(e,40);return n.start(t,null),n};break;default:var m;throw(m=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,m}var g=h(i.prfOid),y=a.pbe.generatePkcs12Key(n,p,1,f,l,g);return g.start(),u(y,a.pbe.generatePkcs12Key(n,p,2,f,c,g))},a.pbe.opensslDeriveBytes=function(e,t,n,i){if("undefined"===typeof i||null===i){if(!("md5"in r.md))throw new Error('"md5" hash algorithm unavailable.');i=r.md.md5.create()}null===t&&(t="");for(var s=[u(i,e+t)],a=16,o=1;a{var r=n(392);n(878),n(29),n(3877);var i,s=r.pkcs5=r.pkcs5||{};r.util.isNodejs&&!r.options.usePureJavaScript&&(i=n(5819)),e.exports=r.pbkdf2=s.pbkdf2=function(e,t,n,s,a,o){if("function"===typeof a&&(o=a,a=null),r.util.isNodejs&&!r.options.usePureJavaScript&&i.pbkdf2&&(null===a||"object"!==typeof a)&&(i.pbkdf2Sync.length>4||!a||"sha1"===a))return"string"!==typeof a&&(a="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),o?4===i.pbkdf2Sync.length?i.pbkdf2(e,t,n,s,(function(e,t){if(e)return o(e);o(null,t.toString("binary"))})):i.pbkdf2(e,t,n,s,a,(function(e,t){if(e)return o(e);o(null,t.toString("binary"))})):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,t,n,s).toString("binary"):i.pbkdf2Sync(e,t,n,s,a).toString("binary");if("undefined"!==typeof a&&null!==a||(a="sha1"),"string"===typeof a){if(!(a in r.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=r.md[a].create()}var l=a.digestLength;if(s>4294967295*l){var c=new Error("Derived key is too long.");if(o)return o(c);throw c}var d=Math.ceil(s/l),u=s-(d-1)*l,h=r.hmac.create();h.start(a,e);var p,f,m,g="";if(!o){for(var y=1;y<=d;++y){h.start(null,null),h.update(t),h.update(r.util.int32ToBytes(y)),p=m=h.digest().getBytes();for(var b=2;b<=n;++b)h.start(null,null),h.update(m),f=h.digest().getBytes(),p=r.util.xorBytes(p,f,l),m=f;g+=yd)return o(null,g);h.start(null,null),h.update(t),h.update(r.util.int32ToBytes(y)),p=m=h.digest().getBytes(),b=2,x()}function x(){if(b<=n)return h.start(null,null),h.update(m),f=h.digest().getBytes(),p=r.util.xorBytes(p,f,l),m=f,++b,r.util.setImmediate(x);g+=y{var r=n(392);n(3877);var i=e.exports=r.pem=r.pem||{};function s(e){for(var t=e.name+": ",n=[],r=function(e,t){return" "+t},i=0;i65&&-1!==a){var o=t[a];","===o?(++a,t=t.substr(0,a)+"\r\n "+t.substr(a)):t=t.substr(0,a)+"\r\n"+o+t.substr(a+1),s=i-a-1,a=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(a=i);return t}function a(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var n,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=s(n={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=s(n={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(n={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&n.values.push(e.dekInfo.parameters),i+=s(n)),e.headers)for(var a=0;a{var r=n(392);n(3877),n(3860),n(928);var i=e.exports=r.pkcs1=r.pkcs1||{};function s(e,t,n){n||(n=r.md.sha1.create());for(var i="",s=Math.ceil(t/n.digestLength),a=0;a>24&255,a>>16&255,a>>8&255,255&a);n.start(),n.update(e+o),i+=n.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,n){var i,a,o,l;"string"===typeof n?(i=n,a=arguments[3]||void 0,o=arguments[4]||void 0):n&&(i=n.label||void 0,a=n.seed||void 0,o=n.md||void 0,n.mgf1&&n.mgf1.md&&(l=n.mgf1.md)),o?o.start():o=r.md.sha1.create(),l||(l=o);var c=Math.ceil(e.n.bitLength()/8),d=c-2*o.digestLength-2;if(t.length>d)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=t.length,g.maxLength=d,g;i||(i=""),o.update(i,"raw");for(var u=o.digest(),h="",p=d-t.length,f=0;f{var r=n(392);n(5049),n(878),n(2886),n(4922),n(9835),n(3860),n(5493),n(928),n(3877),n(3391);var i=r.asn1,s=r.pki,a=e.exports=r.pkcs12=r.pkcs12||{},o={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},l={name:"PFX",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},o,{name:"PFX.macData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},c={name:"SafeBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},d={name:"Attribute",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,capture:"values"}]},u={name:"CertBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:i.Class.UNIVERSAL,type:i.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function h(e,t,n,r){for(var i=[],s=0;s=0&&i.push(o):i.push(o))}return i}function p(e){if(e.composed||e.constructed){for(var t=r.util.createBuffer(),n=0;n0&&(l=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,u));var h=[],p=[];null!==t&&(p=r.util.isArray(t)?t:[t]);for(var f=[],m=0;m0){var v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,f),x=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(v).getBytes())])]);h.push(x)}var w=null;if(null!==e){var k=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));w=null===n?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[k]),l]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[s.encryptPrivateKeyInfo(k,n,o)]),l]);var S=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[w]),C=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(S).getBytes())])]);h.push(C)}var j,E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,h);if(o.useMac){var N=r.md.sha1.create(),T=new r.util.ByteBuffer(r.random.getBytes(o.saltSize)),_=o.count,M=(e=a.generateKey(n,T,3,_,20),r.hmac.create());M.start(N,e),M.update(i.toDer(E).getBytes());var A=M.getMac();j=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,A.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,T.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(_).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(E).getBytes())])]),j])},a.generateKey=r.pbe.generatePkcs12Key},4660:(e,t,n)=>{var r=n(392);n(8605),n(5049),n(7464),n(2886),n(6193),n(4922),n(3860),n(3877),n(3391);var i=r.asn1,s=e.exports=r.pkcs7=r.pkcs7||{};function a(e){var t={},n=[];if(!i.validate(e,s.asn1.recipientInfoValidator,t,n)){var a=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw a.errors=n,a}return{version:t.version.charCodeAt(0),issuer:r.pki.RDNAttributesAsArray(t.issuer),serialNumber:r.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:i.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function o(e){for(var t,n=[],s=0;s0){for(var n=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),s=0;s=n&&a0&&a.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),s.length>0&&a.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,s)),a.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),a])},addSigner:function(t){var n=t.issuer,i=t.serialNumber;if(t.certificate){var s=t.certificate;"string"===typeof s&&(s=r.pki.certificateFromPem(s)),n=s.issuer.attributes,i=s.serialNumber}var a=t.key;if(!a)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof a&&(a=r.pki.privateKeyFromPem(a));var o=t.digestAlgorithm||r.pki.oids.sha1;switch(o){case r.pki.oids.sha1:case r.pki.oids.sha256:case r.pki.oids.sha384:case r.pki.oids.sha512:case r.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+o)}var l=t.authenticatedAttributes||[];if(l.length>0){for(var c=!1,d=!1,u=0;u{var r=n(392);n(5049),n(3877);var i=r.asn1,s=e.exports=r.pkcs7asn1=r.pkcs7asn1||{};r.pkcs7=r.pkcs7||{},r.pkcs7.asn1=s;var a={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};s.contentInfoValidator=a;var o={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};s.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(o)},s.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(o)};var l={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};s.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[l]}]},s.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},6878:(e,t,n)=>{var r=n(392);n(5049),n(2886),n(9835),n(6193),n(6019),n(7455),n(325),n(5493),n(3877),n(3391);var i=r.asn1,s=e.exports=r.pki=r.pki||{};s.pemToDer=function(e){var t=r.pem.decode(e)[0];if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return r.util.createBuffer(t.body)},s.privateKeyFromPem=function(e){var t=r.pem.decode(e)[0];if("PRIVATE KEY"!==t.type&&"RSA PRIVATE KEY"!==t.type){var n=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw n.headerType=t.type,n}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var a=i.fromDer(t.body);return s.privateKeyFromAsn1(a)},s.privateKeyToPem=function(e,t){var n={type:"RSA PRIVATE KEY",body:i.toDer(s.privateKeyToAsn1(e)).getBytes()};return r.pem.encode(n,{maxline:t})},s.privateKeyInfoToPem=function(e,t){var n={type:"PRIVATE KEY",body:i.toDer(e).getBytes()};return r.pem.encode(n,{maxline:t})}},5132:(e,t,n)=>{var r=n(392);n(3877),n(3055),n(3860),function(){if(r.prime)e.exports=r.prime;else{var t=e.exports=r.prime=r.prime||{},n=r.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],s=new n(null);s.fromInt(30);var a=function(e,t){return e|t};t.generateProbablePrime=function(e,t,i){"function"===typeof t&&(i=t,t={});var s=(t=t||{}).algorithm||"PRIMEINC";"string"===typeof s&&(s={name:s}),s.options=s.options||{};var a=t.prng||r.random,l={nextBytes:function(e){for(var t=a.getBytesSync(e.length),n=0;ne&&(a=c(e,t));var p=a.toString(16);i.target.postMessage({hex:p,workLoad:d}),a.dAddOffset(u,0)}}}p()}(e,t,i,s);return o(e,t,i,s)}(e,l,s.options,i);throw new Error("Invalid prime generation algorithm: "+s.name)}}function o(e,t,n,r){var i=c(e,t),s=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(i.bitLength());"millerRabinTests"in n&&(s=n.millerRabinTests);var a=10;"maxBlockTime"in n&&(a=n.maxBlockTime),l(i,e,t,0,s,a,r)}function l(e,t,n,s,a,o,d){var u=+new Date;do{if(e.bitLength()>t&&(e=c(t,n)),e.isProbablePrime(a))return d(null,e);e.dAddOffset(i[s++%8],0)}while(o<0||+new Date-u{var r=n(392);n(3877);var i=null;!r.util.isNodejs||r.options.usePureJavaScript||process.versions["node-webkit"]||(i=n(5819)),(e.exports=r.prng=r.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},n=e.md,s=new Array(32),a=0;a<32;++a)s[a]=n.create();function o(){if(t.pools[0].messageLength>=32)return l();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),l()}function l(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var n=1,r=0;r<32;++r)t.reseeds%n===0&&(e.update(t.pools[r].digest().getBytes()),t.pools[r].start()),n<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function c(e){var t=null,n=r.util.globalScope,i=n.crypto||n.msCrypto;i&&i.getRandomValues&&(t=function(e){return i.getRandomValues(e)});var s=r.util.createBuffer();if(t)for(;s.length()>16)))<<16,h=4294967295&(d=(2147483647&(d+=c>>15))+(d>>31));for(l=0;l<3;++l)u=h>>>(l<<3),u^=Math.floor(256*Math.random()),s.putByte(255&u)}return s.getBytes(e)}return t.pools=s,t.pool=0,t.generate=function(e,n){if(!n)return t.generateSync(e);var i=t.plugin.cipher,s=t.plugin.increment,a=t.plugin.formatKey,o=t.plugin.formatSeed,c=r.util.createBuffer();t.key=null,function d(u){if(u)return n(u);if(c.length()>=e)return n(null,c.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return r.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return l(),e();var n=32-t.pools[0].messageLength<<5;t.seedFile(n,(function(n,r){if(n)return e(n);t.collect(r),l(),e()}))}(d)}));var h=i(t.key,t.seed);t.generated+=h.length,c.putBytes(h),t.key=a(i(t.key,s(t.seed))),t.seed=o(i(t.key,t.seed)),r.util.setImmediate(d)}()},t.generateSync=function(e){var n=t.plugin.cipher,i=t.plugin.increment,s=t.plugin.formatKey,a=t.plugin.formatSeed;t.key=null;for(var l=r.util.createBuffer();l.length()1048575&&(t.key=null),null===t.key&&o();var c=n(t.key,t.seed);t.generated+=c.length,l.putBytes(c),t.key=s(n(t.key,i(t.seed))),t.seed=a(n(t.key,t.seed))}return l.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,(function(e,n){if(e)return t(e);t(null,n.toString())}))},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,c(e))}catch(n){t(n)}},t.seedFileSync=c),t.collect=function(e){for(var n=e.length,r=0;r>i&255);t.collect(r)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",(function e(n){var r=n.data;r.forge&&r.forge.prng&&(self.removeEventListener("message",e),t(r.forge.prng.err,r.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",(function(n){var r=n.data;r.forge&&r.forge.prng&&t.seedFile(r.forge.prng.needed,(function(t,n){e.postMessage({forge:{prng:{err:t,bytes:n}}})}))}))}},t}},325:(e,t,n)=>{var r=n(392);n(3860),n(3877),(e.exports=r.pss=r.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,n=e.md,i=e.mgf,s=n.digestLength,a=e.salt||null;if("string"===typeof a&&(a=r.util.createBuffer(a)),"saltLength"in e)t=e.saltLength;else{if(null===a)throw new Error("Salt length not specified or specific salt not given.");t=a.length()}if(null!==a&&a.length()!==t)throw new Error("Given salt length does not match length of given salt.");var o=e.prng||r.random,l={encode:function(e,l){var c,d,u=l-1,h=Math.ceil(u/8),p=e.digest().getBytes();if(h>8*h-u&255;return(x=String.fromCharCode(x.charCodeAt(0)&~w)+x.substr(1))+m+String.fromCharCode(188)},verify:function(e,a,o){var l,c=o-1,d=Math.ceil(c/8);if(a=a.substr(-d),d>8*d-c&255;if(0!==(h.charCodeAt(0)&f))throw new Error("Bits beyond keysize not zero as expected.");var m=i.generate(p,u),g="";for(l=0;l{var r=n(392);n(8605),n(7404),n(6140),n(3877),r.random&&r.random.getBytes?e.exports=r.random:function(t){var n={},i=new Array(4),s=r.util.createBuffer();function a(){var e=r.prng.create(n);return e.getBytes=function(t,n){return e.generate(t,n)},e.getBytesSync=function(t){return e.generate(t)},e}n.formatKey=function(e){var t=r.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),r.aes._expandKey(e,!1)},n.formatSeed=function(e){var t=r.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},n.cipher=function(e,t){return r.aes._updateBlock(e,t,i,!1),s.putInt32(i[0]),s.putInt32(i[1]),s.putInt32(i[2]),s.putInt32(i[3]),s.getBytes()},n.increment=function(e){return++e[3],e},n.md=r.md.sha256;var o=a(),l=null,c=r.util.globalScope,d=c.crypto||c.msCrypto;if(d&&d.getRandomValues&&(l=function(e){return d.getRandomValues(e)}),r.options.usePureJavaScript||!r.util.isNodejs&&!l){if("undefined"===typeof window||window.document,o.collectInt(+new Date,32),"undefined"!==typeof navigator){var u="";for(var h in navigator)try{"string"==typeof navigator[h]&&(u+=navigator[h])}catch(p){}o.collect(u),u=null}t&&(t().mousemove((function(e){o.collectInt(e.clientX,16),o.collectInt(e.clientY,16)})),t().keypress((function(e){o.collectInt(e.charCode,8)})))}if(r.random)for(var h in o)r.random[h]=o[h];else r.random=o;r.random.createInstance=a,e.exports=r.random}("undefined"!==typeof jQuery?jQuery:null)},654:(e,t,n)=>{var r=n(392);n(3877);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],s=[1,2,3,5],a=function(e,t){return e<>16-t},o=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=r.rc2=r.rc2||{},r.rc2.expandKey=function(e,t){"string"===typeof e&&(e=r.util.createBuffer(e)),t=t||128;var n,s=e,a=e.length(),o=t,l=Math.ceil(o/8),c=255>>(7&o);for(n=a;n<128;n++)s.putByte(i[s.at(n-1)+s.at(n-a)&255]);for(s.setAt(128-l,i[s.at(128-l)&c]),n=127-l;n>=0;n--)s.setAt(n,i[s.at(n+1)^s.at(n+l)]);return s};var l=function(e,t,n){var i,l,c,d,u=!1,h=null,p=null,f=null,m=[];for(e=r.rc2.expandKey(e,t),c=0;c<64;c++)m.push(e.getInt16Le());n?(i=function(e){for(c=0;c<4;c++)e[c]+=m[d]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),e[c]=a(e[c],s[c]),d++},l=function(e){for(c=0;c<4;c++)e[c]+=m[63&e[(c+3)%4]]}):(i=function(e){for(c=3;c>=0;c--)e[c]=o(e[c],s[c]),e[c]-=m[d]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),d--},l=function(e){for(c=3;c>=0;c--)e[c]-=m[63&e[(c+3)%4]]});var g=function(e){var t=[];for(c=0;c<4;c++){var r=h.getInt16Le();null!==f&&(n?r^=f.getInt16Le():f.putInt16Le(r)),t.push(65535&r)}d=n?0:63;for(var i=0;i=8;)g([[5,i],[1,l],[6,i],[1,l],[5,i]])},finish:function(e){var t=!0;if(n)if(e)t=e(8,h,!n);else{var r=8===h.length()?8:8-h.length();h.fillWithByte(r,r)}if(t&&(u=!0,y.update()),!n&&(t=0===h.length()))if(e)t=e(8,p,!n);else{var i=p.length(),s=p.at(i-1);s>i?t=!1:p.truncate(s)}return t}}};r.rc2.startEncrypting=function(e,t,n){var i=r.rc2.createEncryptionCipher(e,128);return i.start(t,n),i},r.rc2.createEncryptionCipher=function(e,t){return l(e,t,!0)},r.rc2.startDecrypting=function(e,t,n){var i=r.rc2.createDecryptionCipher(e,128);return i.start(t,n),i},r.rc2.createDecryptionCipher=function(e,t){return l(e,t,!1)}},5493:(e,t,n)=>{var r=n(392);if(n(5049),n(3055),n(2886),n(6882),n(5132),n(3860),n(3877),"undefined"===typeof i)var i=r.jsbn.BigInteger;var s=r.util.isNodejs?n(5819):null,a=r.asn1,o=r.util;r.pki=r.pki||{},e.exports=r.pki.rsa=r.rsa=r.rsa||{};var l=r.pki,c=[6,4,2,4,2,4,6,2],d={name:"PrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},u={name:"RSAPrivateKey",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},h={name:"RSAPublicKey",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},p=r.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},f={name:"DigestInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:a.Class.UNIVERSAL,type:a.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},m=function(e){var t;if(!(e.algorithm in l.oids)){var n=new Error("Unknown message digest algorithm.");throw n.algorithm=e.algorithm,n}t=l.oids[e.algorithm];var r=a.oidToDer(t).getBytes(),i=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),s=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);s.value.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,r)),s.value.push(a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,""));var o=a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(s),i.value.push(o),a.toDer(i).getBytes()},g=function(e,t,n){if(n)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var s;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{s=new i(r.util.bytesToHex(r.random.getBytes(t.n.bitLength()/8)),16)}while(s.compareTo(t.n)>=0||!s.gcd(t.n).equals(i.ONE));for(var a=(e=e.multiply(s.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),o=e.mod(t.q).modPow(t.dQ,t.q);a.compareTo(o)<0;)a=a.add(t.p);var l=a.subtract(o).multiply(t.qInv).mod(t.p).multiply(t.q).add(o);return l=l.multiply(s.modInverse(t.n)).mod(t.n)};function y(e,t,n){var i=r.util.createBuffer(),s=Math.ceil(t.n.bitLength()/8);if(e.length>s-11){var a=new Error("Message is too long for PKCS#1 v1.5 padding.");throw a.length=e.length,a.max=s-11,a}i.putByte(0),i.putByte(n);var o,l=s-3-e.length;if(0===n||1===n){o=0===n?0:255;for(var c=0;c0;){var d=0,u=r.random.getBytes(l);for(c=0;c1;){if(255!==a.getByte()){--a.read;break}++c}else if(2===l)for(c=0;a.length()>1;){if(0===a.getByte()){--a.read;break}++c}if(0!==a.getByte()||c!==s-3-a.length())throw new Error("Encryption block is invalid.");return a.getBytes()}function v(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=r.util.hexToBytes(t);return n.length>1&&(0===n.charCodeAt(0)&&0===(128&n.charCodeAt(1))||255===n.charCodeAt(0)&&128===(128&n.charCodeAt(1)))?n.substr(1):n}function x(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function w(e){return r.util.isNodejs&&"function"===typeof s[e]}function k(e){return"undefined"!==typeof o.globalScope&&"object"===typeof o.globalScope.crypto&&"object"===typeof o.globalScope.crypto.subtle&&"function"===typeof o.globalScope.crypto.subtle[e]}function S(e){return"undefined"!==typeof o.globalScope&&"object"===typeof o.globalScope.msCrypto&&"object"===typeof o.globalScope.msCrypto.subtle&&"function"===typeof o.globalScope.msCrypto.subtle[e]}function C(e){for(var t=r.util.hexToBytes(e.toString(16)),n=new Uint8Array(t.length),i=0;i0;)d.putByte(0),--u;return d.putBytes(r.util.hexToBytes(c)),d.getBytes()},l.rsa.decrypt=function(e,t,n,s){var a=Math.ceil(t.n.bitLength()/8);if(e.length!==a){var o=new Error("Encrypted message length is invalid.");throw o.length=e.length,o.expected=a,o}var l=new i(r.util.createBuffer(e).toHex(),16);if(l.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var c=g(l,t,n).toString(16),d=r.util.createBuffer(),u=a-Math.ceil(c.length/2);u>0;)d.putByte(0),--u;return d.putBytes(r.util.hexToBytes(c)),!1!==s?b(d.getBytes(),t,n):d.getBytes()},l.rsa.createKeyPairGenerationState=function(e,t,n){"string"===typeof e&&(e=parseInt(e,10)),e=e||2048;var s,a=(n=n||{}).prng||r.random,o={nextBytes:function(e){for(var t=a.getBytesSync(e.length),n=0;n>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(s.eInt),s},l.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var n=new i(null);n.fromInt(30);for(var r,s=0,a=function(e,t){return e|t},o=+new Date,d=0;null===e.keys&&(t<=0||du?e.pqState=0:e.num.isProbablePrime(x(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(c[s++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var p=e.e.modInverse(e.phi);e.keys={privateKey:l.rsa.setPrivateKey(e.n,e.e,p,e.p,e.q,p.mod(e.p1),p.mod(e.q1),e.q.modInverse(e.p)),publicKey:l.rsa.setPublicKey(e.n,e.e)}}d+=(r=+new Date)-o,o=r}return null!==e.keys},l.rsa.generateKeyPair=function(e,t,n,c){if(1===arguments.length?"object"===typeof e?(n=e,e=void 0):"function"===typeof e&&(c=e,e=void 0):2===arguments.length?"number"===typeof e?"function"===typeof t?(c=t,t=void 0):"number"!==typeof t&&(n=t,t=void 0):(n=e,c=t,e=void 0,t=void 0):3===arguments.length&&("number"===typeof t?"function"===typeof n&&(c=n,n=void 0):(c=n,n=t,t=void 0)),n=n||{},void 0===e&&(e=n.bits||2048),void 0===t&&(t=n.e||65537),!r.options.usePureJavaScript&&!n.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(c){if(w("generateKeyPair"))return s.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,t,n){if(e)return c(e);c(null,{privateKey:l.privateKeyFromPem(n),publicKey:l.publicKeyFromPem(t)})}));if(k("generateKey")&&k("exportKey"))return o.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:C(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return o.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){c(e)})).then((function(e){if(e){var t=l.privateKeyFromAsn1(a.fromDer(r.util.createBuffer(e)));c(null,{privateKey:t,publicKey:l.setRsaPublicKey(t.n,t.e)})}}));if(S("generateKey")&&S("exportKey")){var d=o.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:C(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return d.oncomplete=function(e){var t=e.target.result,n=o.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);n.oncomplete=function(e){var t=e.target.result,n=l.privateKeyFromAsn1(a.fromDer(r.util.createBuffer(t)));c(null,{privateKey:n,publicKey:l.setRsaPublicKey(n.n,n.e)})},n.onerror=function(e){c(e)}},void(d.onerror=function(e){c(e)})}}else if(w("generateKeyPairSync")){var u=s.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:l.privateKeyFromPem(u.privateKey),publicKey:l.publicKeyFromPem(u.publicKey)}}var h=l.rsa.createKeyPairGenerationState(e,t,n);if(!c)return l.rsa.stepKeyPairGenerationState(h,0),h.keys;!function(e,t,n){"function"===typeof t&&(n=t,t={});t=t||{};var s={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(s.prng=t.prng);function a(){o(e.pBits,(function(t,r){return t?n(t):(e.p=r,null!==e.q?c(t,e.q):void o(e.qBits,c))}))}function o(e,t){r.prime.generateProbablePrime(e,s,t)}function c(t,r){if(t)return n(t);if(e.q=r,e.p.compareTo(e.q)<0){var s=e.p;e.p=e.q,e.q=s}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void a();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void o(e.qBits,c);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void a();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void o(e.qBits,c);var d=e.e.modInverse(e.phi);e.keys={privateKey:l.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:l.rsa.setPublicKey(e.n,e.e)},n(null,e.keys)}a()}(h,n,c)},l.setRsaPublicKey=l.rsa.setPublicKey=function(e,t){var n={n:e,e:t,encrypt:function(e,t,i){if("string"===typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,n){return y(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return r.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"===typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var s=t.encode(e,n,!0);return l.rsa.encrypt(s,n,!0)},verify:function(e,t,i,s){"string"===typeof i?i=i.toUpperCase():void 0===i&&(i="RSASSA-PKCS1-V1_5"),void 0===s&&(s={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in s||(s._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===i?i={verify:function(e,t){t=b(t,n,!0);var i=a.fromDer(t,{parseAllBytes:s._parseAllDigestBytes}),o={},l=[];if(!a.validate(i,f,o,l))throw(c=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=l,c;var c,d=a.derToOid(o.algorithmIdentifier);if(d!==r.oids.md2&&d!==r.oids.md5&&d!==r.oids.sha1&&d!==r.oids.sha224&&d!==r.oids.sha256&&d!==r.oids.sha384&&d!==r.oids.sha512&&d!==r.oids["sha512-224"]&&d!==r.oids["sha512-256"])throw(c=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=d,c;if((d===r.oids.md2||d===r.oids.md5)&&!("parameters"in o))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return e===o.digest}}:"NONE"!==i&&"NULL"!==i&&null!==i||(i={verify:function(e,t){return e===(t=b(t,n,!0))}});var o=l.rsa.decrypt(t,n,!0,!1);return i.verify(e,o,n.n.bitLength())}};return n},l.setRsaPrivateKey=l.rsa.setPrivateKey=function(e,t,n,i,s,a,o,c){var d={n:e,e:t,d:n,p:i,q:s,dP:a,dQ:o,qInv:c,decrypt:function(e,t,n){"string"===typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=l.rsa.decrypt(e,d,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:b};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return r.pkcs1.decode_rsa_oaep(t,e,n)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,d,!1)},sign:function(e,t){var n=!1;"string"===typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:m},n=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},n=1);var r=t.encode(e,d.n.bitLength());return l.rsa.encrypt(r,d,n)}};return d},l.wrapRsaPrivateKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(l.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(e).getBytes())])},l.privateKeyFromAsn1=function(e){var t,n,s,o,c,h,p,f,m={},g=[];if(a.validate(e,d,m,g)&&(e=a.fromDer(r.util.createBuffer(m.privateKey))),m={},g=[],!a.validate(e,u,m,g)){var y=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=g,y}return t=r.util.createBuffer(m.privateKeyModulus).toHex(),n=r.util.createBuffer(m.privateKeyPublicExponent).toHex(),s=r.util.createBuffer(m.privateKeyPrivateExponent).toHex(),o=r.util.createBuffer(m.privateKeyPrime1).toHex(),c=r.util.createBuffer(m.privateKeyPrime2).toHex(),h=r.util.createBuffer(m.privateKeyExponent1).toHex(),p=r.util.createBuffer(m.privateKeyExponent2).toHex(),f=r.util.createBuffer(m.privateKeyCoefficient).toHex(),l.setRsaPrivateKey(new i(t,16),new i(n,16),new i(s,16),new i(o,16),new i(c,16),new i(h,16),new i(p,16),new i(f,16))},l.privateKeyToAsn1=l.privateKeyToRSAPrivateKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.e)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.d)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.p)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.q)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.dP)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.dQ)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.qInv))])},l.publicKeyFromAsn1=function(e){var t={},n=[];if(a.validate(e,p,t,n)){var s,o=a.derToOid(t.publicKeyOid);if(o!==l.oids.rsaEncryption)throw(s=new Error("Cannot read public key. Unknown OID.")).oid=o,s;e=t.rsaPublicKey}if(n=[],!a.validate(e,h,t,n))throw(s=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=n,s;var c=r.util.createBuffer(t.publicKeyModulus).toHex(),d=r.util.createBuffer(t.publicKeyExponent).toHex();return l.setRsaPublicKey(new i(c,16),new i(d,16))},l.publicKeyToAsn1=l.publicKeyToSubjectPublicKeyInfo=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(l.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,[l.publicKeyToRSAPublicKey(e)])])},l.publicKeyToRSAPublicKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.e))])}},928:(e,t,n)=>{var r=n(392);n(29),n(3877);var i=e.exports=r.sha1=r.sha1||{};r.md.sha1=r.md.algorithms.sha1=i,i.create=function(){a||(s=String.fromCharCode(128),s+=r.util.fillString(String.fromCharCode(0),64),a=!0);var e=null,t=r.util.createBuffer(),n=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,s=0;s>>0,l>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=l[1],l[1]=l[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,l[0]=l[1]/4294967296>>>0;return t.putBytes(s),o(e,n,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=r.util.createBuffer();a.putBytes(t.bytes());var l,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;a.putBytes(s.substr(0,i.blockLength-c));for(var d=8*i.fullMessageLength[0],u=0;u>>0,a.putInt32(d>>>0),d=l>>>0;a.putInt32(d);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};o(h,n,a);var p=r.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p},i};var s=null,a=!1;function o(e,t,n){for(var r,i,s,a,o,l,c,d=n.length();d>=64;){for(i=e.h0,s=e.h1,a=e.h2,o=e.h3,l=e.h4,c=0;c<16;++c)r=n.getInt32(),t[c]=r,r=(i<<5|i>>>27)+(o^s&(a^o))+l+1518500249+r,l=o,o=a,a=(s<<30|s>>>2)>>>0,s=i,i=r;for(;c<20;++c)r=(r=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|r>>>31,t[c]=r,r=(i<<5|i>>>27)+(o^s&(a^o))+l+1518500249+r,l=o,o=a,a=(s<<30|s>>>2)>>>0,s=i,i=r;for(;c<32;++c)r=(r=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|r>>>31,t[c]=r,r=(i<<5|i>>>27)+(s^a^o)+l+1859775393+r,l=o,o=a,a=(s<<30|s>>>2)>>>0,s=i,i=r;for(;c<40;++c)r=(r=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|r>>>30,t[c]=r,r=(i<<5|i>>>27)+(s^a^o)+l+1859775393+r,l=o,o=a,a=(s<<30|s>>>2)>>>0,s=i,i=r;for(;c<60;++c)r=(r=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|r>>>30,t[c]=r,r=(i<<5|i>>>27)+(s&a|o&(s^a))+l+2400959708+r,l=o,o=a,a=(s<<30|s>>>2)>>>0,s=i,i=r;for(;c<80;++c)r=(r=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|r>>>30,t[c]=r,r=(i<<5|i>>>27)+(s^a^o)+l+3395469782+r,l=o,o=a,a=(s<<30|s>>>2)>>>0,s=i,i=r;e.h0=e.h0+i|0,e.h1=e.h1+s|0,e.h2=e.h2+a|0,e.h3=e.h3+o|0,e.h4=e.h4+l|0,d-=64}}},7404:(e,t,n)=>{var r=n(392);n(29),n(3877);var i=e.exports=r.sha256=r.sha256||{};r.md.sha256=r.md.algorithms.sha256=i,i.create=function(){a||(s=String.fromCharCode(128),s+=r.util.fillString(String.fromCharCode(0),64),o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=!0);var e=null,t=r.util.createBuffer(),n=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,s=0;s>>0,o>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=o[1],o[1]=o[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(s),l(e,n,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=r.util.createBuffer();a.putBytes(t.bytes());var o,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;a.putBytes(s.substr(0,i.blockLength-c));for(var d=8*i.fullMessageLength[0],u=0;u>>0,a.putInt32(d>>>0),d=o>>>0;a.putInt32(d);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};l(h,n,a);var p=r.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p.putInt32(h.h5),p.putInt32(h.h6),p.putInt32(h.h7),p},i};var s=null,a=!1,o=null;function l(e,t,n){for(var r,i,s,a,l,c,d,u,h,p,f,m,g,y=n.length();y>=64;){for(l=0;l<16;++l)t[l]=n.getInt32();for(;l<64;++l)r=((r=t[l-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,i=((i=t[l-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[l]=r+t[l-7]+i+t[l-16]|0;for(c=e.h0,d=e.h1,u=e.h2,h=e.h3,p=e.h4,f=e.h5,m=e.h6,g=e.h7,l=0;l<64;++l)s=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),a=c&d|u&(c^d),r=g+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(m^p&(f^m))+o[l]+t[l],g=m,m=f,f=p,p=h+r>>>0,h=u,u=d,d=c,c=r+(i=s+a)>>>0;e.h0=e.h0+c|0,e.h1=e.h1+d|0,e.h2=e.h2+u|0,e.h3=e.h3+h|0,e.h4=e.h4+p|0,e.h5=e.h5+f|0,e.h6=e.h6+m|0,e.h7=e.h7+g|0,y-=64}}},4770:(e,t,n)=>{var r=n(392);n(29),n(3877);var i=e.exports=r.sha512=r.sha512||{};r.md.sha512=r.md.algorithms.sha512=i;var s=r.sha384=r.sha512.sha384=r.sha512.sha384||{};s.create=function(){return i.create("SHA-384")},r.md.sha384=r.md.algorithms.sha384=s,r.sha512.sha256=r.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},r.md["sha512/256"]=r.md.algorithms["sha512/256"]=r.sha512.sha256,r.sha512.sha224=r.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},r.md["sha512/224"]=r.md.algorithms["sha512/224"]=r.sha512.sha224,i.create=function(e){if(o||(a=String.fromCharCode(128),a+=r.util.fillString(String.fromCharCode(0),128),l=[[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]],(c={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],c["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],c["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],c["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],o=!0),"undefined"===typeof e&&(e="SHA-512"),!(e in c))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=c[e],n=null,i=r.util.createBuffer(),s=new Array(80),u=0;u<80;++u)s[u]=new Array(2);var h=64;switch(e){case"SHA-384":h=48;break;case"SHA-512/256":h=32;break;case"SHA-512/224":h=28}var p={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:h,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){p.messageLength=0,p.fullMessageLength=p.messageLength128=[];for(var e=p.messageLengthSize/4,s=0;s>>0,a>>>0];for(var o=p.fullMessageLength.length-1;o>=0;--o)p.fullMessageLength[o]+=a[1],a[1]=a[0]+(p.fullMessageLength[o]/4294967296>>>0),p.fullMessageLength[o]=p.fullMessageLength[o]>>>0,a[0]=a[1]/4294967296>>>0;return i.putBytes(e),d(n,s,i),(i.read>2048||0===i.length())&&i.compact(),p},p.digest=function(){var t=r.util.createBuffer();t.putBytes(i.bytes());var o,l=p.fullMessageLength[p.fullMessageLength.length-1]+p.messageLengthSize&p.blockLength-1;t.putBytes(a.substr(0,p.blockLength-l));for(var c=8*p.fullMessageLength[0],u=0;u>>0,t.putInt32(c>>>0),c=o>>>0;t.putInt32(c);var h=new Array(n.length);for(u=0;u=128;){for(M=0;M<16;++M)t[M][0]=n.getInt32()>>>0,t[M][1]=n.getInt32()>>>0;for(;M<80;++M)r=(((A=(I=t[M-2])[0])>>>19|(R=I[1])<<13)^(R>>>29|A<<3)^A>>>6)>>>0,i=((A<<13|R>>>19)^(R<<3|A>>>29)^(A<<26|R>>>6))>>>0,s=(((A=(B=t[M-15])[0])>>>1|(R=B[1])<<31)^(A>>>8|R<<24)^A>>>7)>>>0,a=((A<<31|R>>>1)^(A<<24|R>>>8)^(A<<25|R>>>7))>>>0,D=t[M-7],O=t[M-16],R=i+D[1]+a+O[1],t[M][0]=r+D[0]+s+O[0]+(R/4294967296>>>0)>>>0,t[M][1]=R>>>0;for(f=e[0][0],m=e[0][1],g=e[1][0],y=e[1][1],b=e[2][0],v=e[2][1],x=e[3][0],w=e[3][1],k=e[4][0],S=e[4][1],C=e[5][0],j=e[5][1],E=e[6][0],N=e[6][1],T=e[7][0],_=e[7][1],M=0;M<80;++M)d=((k>>>14|S<<18)^(k>>>18|S<<14)^(S>>>9|k<<23))>>>0,u=(E^k&(C^E))>>>0,o=((f>>>28|m<<4)^(m>>>2|f<<30)^(m>>>7|f<<25))>>>0,c=((f<<4|m>>>28)^(m<<30|f>>>2)^(m<<25|f>>>7))>>>0,h=(f&g|b&(f^g))>>>0,p=(m&y|v&(m^y))>>>0,R=_+(((k<<18|S>>>14)^(k<<14|S>>>18)^(S<<23|k>>>9))>>>0)+((N^S&(j^N))>>>0)+l[M][1]+t[M][1],r=T+d+u+l[M][0]+t[M][0]+(R/4294967296>>>0)>>>0,i=R>>>0,s=o+h+((R=c+p)/4294967296>>>0)>>>0,a=R>>>0,T=E,_=N,E=C,N=j,C=k,j=S,k=x+r+((R=w+i)/4294967296>>>0)>>>0,S=R>>>0,x=b,w=v,b=g,v=y,g=f,y=m,f=r+s+((R=i+a)/4294967296>>>0)>>>0,m=R>>>0;R=e[0][1]+m,e[0][0]=e[0][0]+f+(R/4294967296>>>0)>>>0,e[0][1]=R>>>0,R=e[1][1]+y,e[1][0]=e[1][0]+g+(R/4294967296>>>0)>>>0,e[1][1]=R>>>0,R=e[2][1]+v,e[2][0]=e[2][0]+b+(R/4294967296>>>0)>>>0,e[2][1]=R>>>0,R=e[3][1]+w,e[3][0]=e[3][0]+x+(R/4294967296>>>0)>>>0,e[3][1]=R>>>0,R=e[4][1]+S,e[4][0]=e[4][0]+k+(R/4294967296>>>0)>>>0,e[4][1]=R>>>0,R=e[5][1]+j,e[5][0]=e[5][0]+C+(R/4294967296>>>0)>>>0,e[5][1]=R>>>0,R=e[6][1]+N,e[6][0]=e[6][0]+E+(R/4294967296>>>0)>>>0,e[6][1]=R>>>0,R=e[7][1]+_,e[7][0]=e[7][0]+T+(R/4294967296>>>0)>>>0,e[7][1]=R>>>0,P-=128}}},3417:(e,t,n)=>{var r=n(392);n(8605),n(878),n(1016),n(928),n(3877);var i=e.exports=r.ssh=r.ssh||{};function s(e,t){var n=t.toString(16);n[0]>="8"&&(n="00"+n);var i=r.util.hexToBytes(n);e.putInt32(i.length),e.putBytes(i)}function a(e,t){e.putInt32(t.length),e.putString(t)}function o(){for(var e=r.md.sha1.create(),t=arguments.length,n=0;n{var r=n(392);n(5049),n(878),n(1016),n(6193),n(6878),n(3860),n(928),n(3877);var i=function(e,t,n,i){var s=r.util.createBuffer(),a=e.length>>1,o=a+(1&e.length),l=e.substr(0,o),c=e.substr(a,o),d=r.util.createBuffer(),u=r.hmac.create();n=t+n;var h=Math.ceil(i/16),p=Math.ceil(i/20);u.start("MD5",l);var f=r.util.createBuffer();d.putBytes(n);for(var m=0;m0&&(c.queue(e,c.createAlert(e,{level:c.Alert.Level.warning,description:c.Alert.Description.no_renegotiation})),c.flush(e)),e.process()},c.parseHelloMessage=function(e,t,n){var i=null,s=e.entity===c.ConnectionEnd.client;if(n<38)e.error(e,{message:s?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});else{var a=t.fragment,l=a.length();if(i={version:{major:a.getByte(),minor:a.getByte()},random:r.util.createBuffer(a.getBytes(32)),session_id:o(a,1),extensions:[]},s?(i.cipher_suite=a.getBytes(2),i.compression_method=a.getByte()):(i.cipher_suites=o(a,2),i.compression_methods=o(a,1)),(l=n-(l-a.length()))>0){for(var d=o(a,2);d.length()>0;)i.extensions.push({type:[d.getByte(),d.getByte()],data:o(d,2)});if(!s)for(var u=0;u0;){if(0!==p.getByte())break;e.session.extensions.server_name.serverNameList.push(o(p,2).getBytes())}}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}});if(s)e.session.cipherSuite=c.getCipherSuite(i.cipher_suite);else for(var f=r.util.createBuffer(i.cipher_suites.bytes());f.length()>0&&(e.session.cipherSuite=c.getCipherSuite(f.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.handshake_failure},cipherSuite:r.util.bytesToHex(i.cipher_suite)});e.session.compressionMethod=s?i.compression_method:c.CompressionMethod.none}return i},c.createSecurityParameters=function(e,t){var n=e.entity===c.ConnectionEnd.client,r=t.random.bytes(),i=n?e.session.sp.client_random:r,s=n?r:c.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:c.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:s}},c.handleServerHello=function(e,t,n){var r=c.parseHelloMessage(e,t,n);if(!e.fail){if(!(r.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}});e.version.minor=r.version.minor,e.session.version=e.version;var i=r.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=f,e.session.resuming=!0,e.session.sp.server_random=r.random.bytes()):(e.expect=d,e.session.resuming=!1,c.createSecurityParameters(e,r)),e.session.id=i,e.process()}},c.handleClientHello=function(e,t,n){var i=c.parseHelloMessage(e,t,n);if(!e.fail){var s=i.session_id.bytes(),a=null;if(e.sessionCache&&(null===(a=e.sessionCache.getSession(s))?s="":(a.version.major!==i.version.major||a.version.minor>i.version.minor)&&(a=null,s="")),0===s.length&&(s=r.random.getBytes(32)),e.session.id=s,e.session.clientHelloVersion=i.version,e.session.sp={},a)e.version=e.session.version=a.version,e.session.sp=a.sp;else{for(var o,l=1;l0;)i=o(l.certificate_list,3),s=r.asn1.fromDer(i),i=r.pki.certificateFromAsn1(s,!0),d.push(i)}catch(p){return e.error(e,{message:"Could not parse certificate list.",cause:p,send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.bad_certificate}})}var h=e.entity===c.ConnectionEnd.client;!h&&!0!==e.verifyClient||0!==d.length?0===d.length?e.expect=h?u:v:(h?e.session.serverCertificate=d[0]:e.session.clientCertificate=d[0],c.verifyCertificateChain(e,d)&&(e.expect=h?u:v)):e.error(e,{message:h?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}}),e.process()},c.handleServerKeyExchange=function(e,t,n){if(n>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.unsupported_certificate}});e.expect=h,e.process()},c.handleClientKeyExchange=function(e,t,n){if(n<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.unsupported_certificate}});var i=t.fragment,s={enc_pre_master_secret:o(i,2).getBytes()},a=null;if(e.getPrivateKey)try{a=e.getPrivateKey(e,e.session.serverCertificate),a=r.pki.privateKeyFromPem(a)}catch(u){e.error(e,{message:"Could not get private key.",cause:u,send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}})}if(null===a)return e.error(e,{message:"No private key set.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}});try{var l=e.session.sp;l.pre_master_secret=a.decrypt(s.enc_pre_master_secret);var d=e.session.clientHelloVersion;if(d.major!==l.pre_master_secret.charCodeAt(0)||d.minor!==l.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(u){l.pre_master_secret=r.random.getBytes(48)}e.expect=w,null!==e.session.clientCertificate&&(e.expect=x),e.process()},c.handleCertificateRequest=function(e,t,n){if(n<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var r=t.fragment,i={certificate_types:o(r,1),certificate_authorities:o(r,2)};e.session.certificateRequest=i,e.expect=p,e.process()},c.handleCertificateVerify=function(e,t,n){if(n<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var i=t.fragment;i.read-=4;var s=i.bytes();i.read+=4;var a={signature:o(i,2).getBytes()},l=r.util.createBuffer();l.putBuffer(e.session.md5.digest()),l.putBuffer(e.session.sha1.digest()),l=l.getBytes();try{if(!e.session.clientCertificate.publicKey.verify(l,a.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(s),e.session.sha1.update(s)}catch(d){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.handshake_failure}})}e.expect=w,e.process()},c.handleServerHelloDone=function(e,t,n){if(n>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.record_overflow}});if(null===e.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.insufficient_security}},s=e.verify(e,i.alert.description,0,[]);if(!0!==s)return(s||0===s)&&("object"!==typeof s||r.util.isArray(s)?"number"===typeof s&&(i.alert.description=s):(s.message&&(i.message=s.message),s.alert&&(i.alert.description=s.alert))),e.error(e,i)}null!==e.session.certificateRequest&&(t=c.createRecord(e,{type:c.ContentType.handshake,data:c.createCertificate(e)}),c.queue(e,t)),t=c.createRecord(e,{type:c.ContentType.handshake,data:c.createClientKeyExchange(e)}),c.queue(e,t),e.expect=y;var a=function(e,t){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&c.queue(e,c.createRecord(e,{type:c.ContentType.handshake,data:c.createCertificateVerify(e,t)})),c.queue(e,c.createRecord(e,{type:c.ContentType.change_cipher_spec,data:c.createChangeCipherSpec()})),e.state.pending=c.createConnectionState(e),e.state.current.write=e.state.pending.write,c.queue(e,c.createRecord(e,{type:c.ContentType.handshake,data:c.createFinished(e)})),e.expect=f,c.flush(e),e.process()};if(null===e.session.certificateRequest||null===e.session.clientCertificate)return a(e,null);c.getClientSignature(e,a)},c.handleChangeCipherSpec=function(e,t){if(1!==t.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var n=e.entity===c.ConnectionEnd.client;(e.session.resuming&&n||!e.session.resuming&&!n)&&(e.state.pending=c.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&n||e.session.resuming&&!n)&&(e.state.pending=null),e.expect=n?m:k,e.process()},c.handleFinished=function(e,t,n){var s=t.fragment;s.read-=4;var a=s.bytes();s.read+=4;var o=t.fragment.getBytes();(s=r.util.createBuffer()).putBuffer(e.session.md5.digest()),s.putBuffer(e.session.sha1.digest());var l=e.entity===c.ConnectionEnd.client,d=l?"server finished":"client finished",u=e.session.sp;if((s=i(u.master_secret,d,s.getBytes(),12)).getBytes()!==o)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.decrypt_error}});e.session.md5.update(a),e.session.sha1.update(a),(e.session.resuming&&l||!e.session.resuming&&!l)&&(c.queue(e,c.createRecord(e,{type:c.ContentType.change_cipher_spec,data:c.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,c.queue(e,c.createRecord(e,{type:c.ContentType.handshake,data:c.createFinished(e)}))),e.expect=l?g:S,e.handshaking=!1,++e.handshakes,e.peerCertificate=l?e.session.serverCertificate:e.session.clientCertificate,c.flush(e),e.isConnected=!0,e.connected(e),e.process()},c.handleAlert=function(e,t){var n,r=t.fragment,i={level:r.getByte(),description:r.getByte()};switch(i.description){case c.Alert.Description.close_notify:n="Connection closed.";break;case c.Alert.Description.unexpected_message:n="Unexpected message.";break;case c.Alert.Description.bad_record_mac:n="Bad record MAC.";break;case c.Alert.Description.decryption_failed:n="Decryption failed.";break;case c.Alert.Description.record_overflow:n="Record overflow.";break;case c.Alert.Description.decompression_failure:n="Decompression failed.";break;case c.Alert.Description.handshake_failure:n="Handshake failure.";break;case c.Alert.Description.bad_certificate:n="Bad certificate.";break;case c.Alert.Description.unsupported_certificate:n="Unsupported certificate.";break;case c.Alert.Description.certificate_revoked:n="Certificate revoked.";break;case c.Alert.Description.certificate_expired:n="Certificate expired.";break;case c.Alert.Description.certificate_unknown:n="Certificate unknown.";break;case c.Alert.Description.illegal_parameter:n="Illegal parameter.";break;case c.Alert.Description.unknown_ca:n="Unknown certificate authority.";break;case c.Alert.Description.access_denied:n="Access denied.";break;case c.Alert.Description.decode_error:n="Decode error.";break;case c.Alert.Description.decrypt_error:n="Decrypt error.";break;case c.Alert.Description.export_restriction:n="Export restriction.";break;case c.Alert.Description.protocol_version:n="Unsupported protocol version.";break;case c.Alert.Description.insufficient_security:n="Insufficient security.";break;case c.Alert.Description.internal_error:n="Internal error.";break;case c.Alert.Description.user_canceled:n="User canceled.";break;case c.Alert.Description.no_renegotiation:n="Renegotiation not supported.";break;default:n="Unknown error."}if(i.description===c.Alert.Description.close_notify)return e.close();e.error(e,{message:n,send:!1,origin:e.entity===c.ConnectionEnd.client?"server":"client",alert:i}),e.process()},c.handleHandshake=function(e,t){var n=t.fragment,i=n.getByte(),s=n.getInt24();if(s>n.length())return e.fragmented=t,t.fragment=r.util.createBuffer(),n.read-=4,e.process();e.fragmented=null,n.read-=4;var a=n.bytes(s+4);n.read+=4,i in L[e.entity][e.expect]?(e.entity!==c.ConnectionEnd.server||e.open||e.fail||(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:r.md.md5.create(),sha1:r.md.sha1.create()}),i!==c.HandshakeType.hello_request&&i!==c.HandshakeType.certificate_verify&&i!==c.HandshakeType.finished&&(e.session.md5.update(a),e.session.sha1.update(a)),L[e.entity][e.expect][i](e,t,s)):c.handleUnexpected(e,t)},c.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},c.handleHeartbeat=function(e,t){var n=t.fragment,i=n.getByte(),s=n.getInt16(),a=n.getBytes(s);if(i===c.HeartbeatMessageType.heartbeat_request){if(e.handshaking||s>a.length)return e.process();c.queue(e,c.createRecord(e,{type:c.ContentType.heartbeat,data:c.createHeartbeat(c.HeartbeatMessageType.heartbeat_response,a)})),c.flush(e)}else if(i===c.HeartbeatMessageType.heartbeat_response){if(a!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,r.util.createBuffer(a))}e.process()};var d=1,u=2,h=3,p=4,f=5,m=6,g=7,y=8,b=1,v=2,x=3,w=4,k=5,S=6,C=c.handleUnexpected,j=c.handleChangeCipherSpec,E=c.handleAlert,N=c.handleHandshake,T=c.handleApplicationData,_=c.handleHeartbeat,M=[];M[c.ConnectionEnd.client]=[[C,E,N,C,_],[C,E,N,C,_],[C,E,N,C,_],[C,E,N,C,_],[C,E,N,C,_],[j,E,C,C,_],[C,E,N,C,_],[C,E,N,T,_],[C,E,N,C,_]],M[c.ConnectionEnd.server]=[[C,E,N,C,_],[C,E,N,C,_],[C,E,N,C,_],[C,E,N,C,_],[j,E,C,C,_],[C,E,N,C,_],[C,E,N,T,_],[C,E,N,C,_]];var A=c.handleHelloRequest,R=c.handleServerHello,I=c.handleCertificate,D=c.handleServerKeyExchange,B=c.handleCertificateRequest,O=c.handleServerHelloDone,P=c.handleFinished,L=[];L[c.ConnectionEnd.client]=[[C,C,R,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[A,C,C,C,C,C,C,C,C,C,C,I,D,B,O,C,C,C,C,C,C],[A,C,C,C,C,C,C,C,C,C,C,C,D,B,O,C,C,C,C,C,C],[A,C,C,C,C,C,C,C,C,C,C,C,C,B,O,C,C,C,C,C,C],[A,C,C,C,C,C,C,C,C,C,C,C,C,C,O,C,C,C,C,C,C],[A,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[A,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,P],[A,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[A,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C]];var z=c.handleClientHello,F=c.handleClientKeyExchange,U=c.handleCertificateVerify;L[c.ConnectionEnd.server]=[[C,z,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,I,C,C,C,C,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,F,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,U,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,P],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C]],c.generateKeys=function(e,t){var n=i,r=t.client_random+t.server_random;e.session.resuming||(t.master_secret=n(t.pre_master_secret,"master secret",r,48).bytes(),t.pre_master_secret=null),r=t.server_random+t.client_random;var s=2*t.mac_key_length+2*t.enc_key_length,a=e.version.major===c.Versions.TLS_1_0.major&&e.version.minor===c.Versions.TLS_1_0.minor;a&&(s+=2*t.fixed_iv_length);var o=n(t.master_secret,"key expansion",r,s),l={client_write_MAC_key:o.getBytes(t.mac_key_length),server_write_MAC_key:o.getBytes(t.mac_key_length),client_write_key:o.getBytes(t.enc_key_length),server_write_key:o.getBytes(t.enc_key_length)};return a&&(l.client_write_IV=o.getBytes(t.fixed_iv_length),l.server_write_IV=o.getBytes(t.fixed_iv_length)),l},c.createConnectionState=function(e){var t=e.entity===c.ConnectionEnd.client,n=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},r={read:n(),write:n()};if(r.read.update=function(e,t){return r.read.cipherFunction(t,r.read)?r.read.compressFunction(e,t,r.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.bad_record_mac}}),!e.fail},r.write.update=function(e,t){return r.write.compressFunction(e,t,r.write)?r.write.cipherFunction(t,r.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=c.generateKeys(e,i),r.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,r.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(r,e,i),i.compression_algorithm){case c.CompressionMethod.none:break;case c.CompressionMethod.deflate:r.read.compressFunction=a,r.write.compressFunction=s;break;default:throw new Error("Unsupported compression algorithm.")}}return r},c.createRandom=function(){var e=new Date,t=+e+6e4*e.getTimezoneOffset(),n=r.util.createBuffer();return n.putInt32(t),n.putBytes(r.random.getBytes(28)),n},c.createRecord=function(e,t){return t.data?{type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data}:null},c.createAlert=function(e,t){var n=r.util.createBuffer();return n.putByte(t.level),n.putByte(t.description),c.createRecord(e,{type:c.ContentType.alert,data:n})},c.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=r.util.createBuffer(),n=0;n0&&(f+=2);var m=e.session.id,g=m.length+1+2+4+28+2+s+1+o+f,y=r.util.createBuffer();return y.putByte(c.HandshakeType.client_hello),y.putInt24(g),y.putByte(e.version.major),y.putByte(e.version.minor),y.putBytes(e.session.sp.client_random),l(y,1,r.util.createBuffer(m)),l(y,2,t),l(y,1,a),f>0&&l(y,2,d),y},c.createServerHello=function(e){var t=e.session.id,n=t.length+1+2+4+28+2+1,i=r.util.createBuffer();return i.putByte(c.HandshakeType.server_hello),i.putInt24(n),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),l(i,1,r.util.createBuffer(t)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i},c.createCertificate=function(e){var t,n=e.entity===c.ConnectionEnd.client,i=null;e.getCertificate&&(t=n?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,t));var s=r.util.createBuffer();if(null!==i)try{r.util.isArray(i)||(i=[i]);for(var a=null,o=0;oc.MaxFragment;)i.push(c.createRecord(e,{type:t.type,data:r.util.createBuffer(s.slice(0,c.MaxFragment))})),s=s.slice(c.MaxFragment);s.length>0&&i.push(c.createRecord(e,{type:t.type,data:r.util.createBuffer(s)}))}for(var a=0;a0&&(i=n.order[0]),null!==i&&i in n.cache)for(var s in t=n.cache[i],delete n.cache[i],n.order)if(n.order[s]===i){n.order.splice(s,1);break}return t},n.setSession=function(e,t){if(n.order.length===n.capacity){var i=n.order.shift();delete n.cache[i]}i=r.util.bytesToHex(e);n.order.push(i),n.cache[i]=t}}return n},c.createConnection=function(e){var t=null;t=e.caStore?r.util.isArray(e.caStore)?r.pki.createCaStore(e.caStore):e.caStore:r.pki.createCaStore();var n=e.cipherSuites||null;if(null===n)for(var i in n=[],c.CipherSuites)n.push(c.CipherSuites[i]);var s=e.server?c.ConnectionEnd.server:c.ConnectionEnd.client,a=e.sessionCache?c.createSessionCache(e.sessionCache):null,o={version:{major:c.Version.major,minor:c.Version.minor},entity:s,sessionId:e.sessionId,caStore:t,sessionCache:a,cipherSuites:n,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,t,n,r){return t},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:r.util.createBuffer(),tlsData:r.util.createBuffer(),data:r.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(t,n){n.origin=n.origin||(t.entity===c.ConnectionEnd.client?"client":"server"),n.send&&(c.queue(t,c.createAlert(t,n.alert)),c.flush(t));var r=!1!==n.fatal;r&&(t.fail=!0),e.error(t,n),r&&t.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){o.version={major:c.Version.major,minor:c.Version.minor},o.record=null,o.session=null,o.peerCertificate=null,o.state={pending:null,current:null},o.expect=(o.entity,c.ConnectionEnd.client,0),o.fragmented=null,o.records=[],o.open=!1,o.handshakes=0,o.handshaking=!1,o.isConnected=!1,o.fail=!(e||"undefined"===typeof e),o.input.clear(),o.tlsData.clear(),o.data.clear(),o.state.current=c.createConnectionState(o)}};o.reset();return o.handshake=function(e){if(o.entity!==c.ConnectionEnd.client)o.error(o,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(o.handshaking)o.error(o,{message:"Handshake already in progress.",fatal:!1});else{o.fail&&!o.open&&0===o.handshakes&&(o.fail=!1),o.handshaking=!0;var t=null;(e=e||"").length>0&&(o.sessionCache&&(t=o.sessionCache.getSession(e)),null===t&&(e="")),0===e.length&&o.sessionCache&&null!==(t=o.sessionCache.getSession())&&(e=t.id),o.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:r.md.md5.create(),sha1:r.md.sha1.create()},t&&(o.version=t.version,o.session.sp=t.sp),o.session.sp.client_random=c.createRandom().getBytes(),o.open=!0,c.queue(o,c.createRecord(o,{type:c.ContentType.handshake,data:c.createClientHello(o)})),c.flush(o)}},o.process=function(e){var t=0;return e&&o.input.putBytes(e),o.fail||(null!==o.record&&o.record.ready&&o.record.fragment.isEmpty()&&(o.record=null),null===o.record&&(t=function(e){var t=0,n=e.input,i=n.length();if(i<5)t=5-i;else{e.record={type:n.getByte(),version:{major:n.getByte(),minor:n.getByte()},length:n.getInt16(),fragment:r.util.createBuffer(),ready:!1};var s=e.record.version.major===e.version.major;s&&e.session&&e.session.version&&(s=e.record.version.minor===e.version.minor),s||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}})}return t}(o)),o.fail||null===o.record||o.record.ready||(t=function(e){var t=0,n=e.input,r=n.length();return r{var r=n(392),i=n(5754),s=e.exports=r.util=r.util||{};function a(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function o(e){if(this.data="",this.read=0,"string"===typeof e)this.data=e;else if(s.isArrayBuffer(e)||s.isArrayBufferView(e))if("undefined"!==typeof Buffer&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(r){for(var n=0;n15?(n=Date.now(),a(e)):(t.push(e),1===t.length&&i.setAttribute("a",r=!r))}}s.nextTick=s.setImmediate}(),s.isNodejs="undefined"!==typeof process&&process.versions&&process.versions.node,s.globalScope=s.isNodejs?n.g:"undefined"===typeof self?window:self,s.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isArrayBuffer=function(e){return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer},s.isArrayBufferView=function(e){return e&&s.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},s.ByteBuffer=o,s.ByteStringBuffer=o;s.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},s.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},s.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},s.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},s.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var n=this.data;t>0;)1&t&&(n+=e),(t>>>=1)>0&&(e+=e);return this.data=n,this._optimizeConstructedString(t),this},s.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},s.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(s.encodeUtf8(e))},s.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},s.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},s.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},s.ByteStringBuffer.prototype.putInt=function(e,t){a(t);var n="";do{t-=8,n+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(n)},s.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t},s.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<=n&&(t-=n<<1),t},s.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},s.ByteStringBuffer.prototype.bytes=function(e){return"undefined"===typeof e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},s.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},s.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},s.ByteStringBuffer.prototype.copy=function(){var e=s.createBuffer(this.data);return e.read=this.read,e},s.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},s.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},s.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},s.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=e)return this;t=Math.max(t||this.growSize,e);var n=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(n),this.data=new DataView(r.buffer),this},s.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},s.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var n=0;n>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},s.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},s.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},s.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},s.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},s.DataBuffer.prototype.putInt=function(e,t){a(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},s.DataBuffer.prototype.putSignedInt=function(e,t){return a(t),this.accommodate(t/8),e<0&&(e+=2<0);return t},s.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<=n&&(t-=n<<1),t},s.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},s.DataBuffer.prototype.bytes=function(e){return"undefined"===typeof e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},s.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},s.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},s.DataBuffer.prototype.copy=function(){return new s.DataBuffer(this)},s.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},s.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},s.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},s.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)1&t&&(n+=e),(t>>>=1)>0&&(e+=e);return n},s.xorBytes=function(e,t,n){for(var r="",i="",s="",a=0,o=0;n>0;--n,++a)i=e.charCodeAt(a)^t.charCodeAt(a),o>=10&&(r+=s,s="",o=0),s+=String.fromCharCode(i),++o;return r+=s},s.hexToBytes=function(e){var t="",n=0;for(!0&e.length&&(n=1,t+=String.fromCharCode(parseInt(e[0],16)));n>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],d="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";s.encode64=function(e,t){for(var n,r,i,s="",a="",o=0;o>2),s+=l.charAt((3&n)<<4|r>>4),isNaN(r)?s+="==":(s+=l.charAt((15&r)<<2|i>>6),s+=isNaN(i)?"=":l.charAt(63&i)),t&&s.length>t&&(a+=s.substr(0,t)+"\r\n",s=s.substr(t));return a+=s},s.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,n,r,i,s="",a=0;a>4),64!==r&&(s+=String.fromCharCode((15&n)<<4|r>>2),64!==i&&(s+=String.fromCharCode((3&r)<<6|i)));return s},s.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},s.decodeUtf8=function(e){return decodeURIComponent(escape(e))},s.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:i.encode,decode:i.decode}},s.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},s.binary.raw.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(e.length));for(var i=n=n||0,s=0;s>2),s+=l.charAt((3&n)<<4|r>>4),isNaN(r)?s+="==":(s+=l.charAt((15&r)<<2|i>>6),s+=isNaN(i)?"=":l.charAt(63&i)),t&&s.length>t&&(a+=s.substr(0,t)+"\r\n",s=s.substr(t));return a+=s},s.binary.base64.decode=function(e,t,n){var r,i,s,a,o=t;o||(o=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var l=0,d=n=n||0;l>4,64!==s&&(o[d++]=(15&i)<<4|s>>2,64!==a&&(o[d++]=(3&s)<<6|a));return t?d-n:o.subarray(0,d)},s.binary.base58.encode=function(e,t){return s.binary.baseN.encode(e,d,t)},s.binary.base58.decode=function(e,t){return s.binary.baseN.decode(e,d,t)},s.text={utf8:{},utf16:{}},s.text.utf8.encode=function(e,t,n){e=s.encodeUtf8(e);var r=t;r||(r=new Uint8Array(e.length));for(var i=n=n||0,a=0;a0&&s.push(n),a=r.lastIndex;var o=t[0][1];switch(o){case"s":case"o":i");break;case"%":s.push("%");break;default:s.push("<%"+o+"?>")}}return s.push(e.substring(a)),s.join("")},s.formatNumber=function(e,t,n,r){var i=e,s=isNaN(t=Math.abs(t))?2:t,a=void 0===n?",":n,o=void 0===r?".":r,l=i<0?"-":"",c=parseInt(i=Math.abs(+i||0).toFixed(s),10)+"",d=c.length>3?c.length%3:0;return l+(d?c.substr(0,d)+o:"")+c.substr(d).replace(/(\d{3})(?=\d)/g,"$1"+o)+(s?a+Math.abs(i-c).toFixed(s).slice(2):"")},s.formatSize=function(e){return e=e>=1073741824?s.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?s.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?s.formatNumber(e/1024,0)+" KiB":s.formatNumber(e,0)+" bytes"},s.bytesFromIP=function(e){return-1!==e.indexOf(".")?s.bytesFromIPv4(e):-1!==e.indexOf(":")?s.bytesFromIPv6(e):null},s.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=s.createBuffer(),n=0;nn[r].end-n[r].start&&(r=n.length-1)):n.push({start:l,end:l})}t.push(a)}if(n.length>0){var c=n[r];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),0===c.start&&t.unshift(""),7===c.end&&t.push(""))}return t.join(":")},s.estimateCores=function(e,t){if("function"===typeof e&&(t=e,e={}),e=e||{},"cores"in s&&!e.update)return t(null,s.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return s.cores=navigator.hardwareConcurrency,t(null,s.cores);if("undefined"===typeof Worker)return s.cores=1,t(null,s.cores);if("undefined"===typeof Blob)return s.cores=2,t(null,s.cores);var n=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),n=t+4;Date.now()o.st&&i.sti.st&&o.st{var r=n(392);n(8605),n(5049),n(7464),n(29),n(1902),n(2886),n(6193),n(325),n(5493),n(3877);var i=r.asn1,s=e.exports=r.pki=r.pki||{},a=s.oids,o={};o.CN=a.commonName,o.commonName="CN",o.C=a.countryName,o.countryName="C",o.L=a.localityName,o.localityName="L",o.ST=a.stateOrProvinceName,o.stateOrProvinceName="ST",o.O=a.organizationName,o.organizationName="O",o.OU=a.organizationalUnitName,o.organizationalUnitName="OU",o.E=a.emailAddress,o.emailAddress="E";var l=r.pki.rsa.publicKeyValidator,c={name:"Certificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},l,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},d={name:"rsapss",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},u={name:"CertificationRequestInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},l,{name:"CertificationRequestInfo.attributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0}]}]}]},h={name:"CertificationRequest",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[u,{name:"CertificationRequest.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function p(e,t){"string"===typeof t&&(t={shortName:t});for(var n,r=null,i=0;null===r&&i128)throw new Error('Invalid "nsComment" content.');e.value=i.create(i.Class.UNIVERSAL,i.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&t.cert){var p=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=p.toHex(),e.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,p.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);d=e.value.value;if(e.keyIdentifier){var f=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;d.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,f))}if(e.authorityCertIssuer){var m=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];d.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,m))}if(e.serialNumber){var g=r.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);d.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,g))}}else if("cRLDistributionPoints"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);d=e.value.value;var b,v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),x=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(h=0;h2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(u.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(l.validity.notBefore=u[0],l.validity.notAfter=u[1],l.tbsCertificate=n.tbsCertificate,t){l.md=m({signatureOid:l.signatureOid,type:"certificate"});var h=i.toDer(l.tbsCertificate);l.md.update(h.getBytes())}var g=r.md.sha1.create(),y=i.toDer(n.certIssuer);g.update(y.getBytes()),l.issuer.getField=function(e){return p(l.issuer,e)},l.issuer.addField=function(e){b([e]),l.issuer.attributes.push(e)},l.issuer.attributes=s.RDNAttributesAsArray(n.certIssuer),n.certIssuerUniqueId&&(l.issuer.uniqueId=n.certIssuerUniqueId),l.issuer.hash=g.digest().toHex();var v=r.md.sha1.create(),x=i.toDer(n.certSubject);return v.update(x.getBytes()),l.subject.getField=function(e){return p(l.subject,e)},l.subject.addField=function(e){b([e]),l.subject.attributes.push(e)},l.subject.attributes=s.RDNAttributesAsArray(n.certSubject),n.certSubjectUniqueId&&(l.subject.uniqueId=n.certSubjectUniqueId),l.subject.hash=v.digest().toHex(),n.certExtensions?l.extensions=s.certificateExtensionsFromAsn1(n.certExtensions):l.extensions=[],l.publicKey=s.publicKeyFromAsn1(n.subjectPublicKeyInfo),l},s.certificateExtensionsFromAsn1=function(e){for(var t=[],n=0;n1&&(n=l.value.charCodeAt(1),s=l.value.length>2?l.value.charCodeAt(2):0),t.digitalSignature=128===(128&n),t.nonRepudiation=64===(64&n),t.keyEncipherment=32===(32&n),t.dataEncipherment=16===(16&n),t.keyAgreement=8===(8&n),t.keyCertSign=4===(4&n),t.cRLSign=2===(2&n),t.encipherOnly=1===(1&n),t.decipherOnly=128===(128&s)}else if("basicConstraints"===t.name){(l=i.fromDer(t.value)).value.length>0&&l.value[0].type===i.Type.BOOLEAN?t.cA=0!==l.value[0].value.charCodeAt(0):t.cA=!1;var o=null;l.value.length>0&&l.value[0].type===i.Type.INTEGER?o=l.value[0].value:l.value.length>1&&(o=l.value[1].value),null!==o&&(t.pathLenConstraint=i.derToInteger(o))}else if("extKeyUsage"===t.name)for(var l=i.fromDer(t.value),c=0;c1&&(n=l.value.charCodeAt(1)),t.client=128===(128&n),t.server=64===(64&n),t.email=32===(32&n),t.objsign=16===(16&n),t.reserved=8===(8&n),t.sslCA=4===(4&n),t.emailCA=2===(2&n),t.objCA=1===(1&n)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var u;t.altNames=[];l=i.fromDer(t.value);for(var h=0;h=k&&e0&&a.value.push(s.certificateExtensionsToAsn1(e.extensions)),a},s.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),y(e.subject),s.publicKeyToAsn1(e.publicKey),w(e)])},s.distinguishedNameToAsn1=function(e){return y(e)},s.certificateToAsn1=function(e){var t=e.tbsCertificate||s.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),x(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},s.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),n=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(n);for(var r=0;rd.validity.notAfter)&&(l={message:"Certificate is not valid yet or has expired.",error:s.certificateError.certificate_expired,notBefore:d.validity.notBefore,notAfter:d.validity.notAfter,now:a}),null===l){if(null===(u=t[0]||e.getIssuer(d))&&d.isIssuer(d)&&(h=!0,u=d),u){var p=u;r.util.isArray(p)||(p=[p]);for(var f=!1;!f&&p.length>0;){u=p.shift();try{f=u.verify(d)}catch(k){}}f||(l={message:"Certificate signature is invalid.",error:s.certificateError.bad_certificate})}null!==l||u&&!h||e.hasCertificate(d)||(l={message:"Certificate is not trusted.",error:s.certificateError.unknown_ca})}if(null===l&&u&&!d.isIssuer(u)&&(l={message:"Certificate issuer is invalid.",error:s.certificateError.bad_certificate}),null===l)for(var m={keyUsage:!0,basicConstraints:!0},g=0;null===l&&gb.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:s.certificateError.bad_certificate})}var x=null===l||l.error,w=n.verify?n.verify(x,c,i):x;if(!0!==w)throw!0===x&&(l={message:"The application rejected the certificate.",error:s.certificateError.bad_certificate}),(w||0===w)&&("object"!==typeof w||r.util.isArray(w)?"string"===typeof w&&(l.error=w):(w.message&&(l.message=w.message),w.error&&(l.error=w.error))),l;l=null,o=!1,++c}while(t.length>0);return!0}},8136:(e,t,n)=>{e.exports=n(166)},4872:e=>{"use strict";var t=!("undefined"===typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},5811:e=>{var t,n,r,i,s,a,o,l,c,d,u,h,p,f,m,g=!1;function y(){if(!g){g=!0;var e=navigator.userAgent,y=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),b=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(h=/\b(iPhone|iP[ao]d)/.exec(e),p=/\b(iP[ao]d)/.exec(e),d=/Android/i.exec(e),f=/FBAN\/\w+;/i.exec(e),m=/Mobile/i.exec(e),u=!!/Win64/.exec(e),y){(t=y[1]?parseFloat(y[1]):y[5]?parseFloat(y[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var v=/(?:Trident\/(\d+.\d+))/.exec(e);a=v?parseFloat(v[1])+4:t,n=y[2]?parseFloat(y[2]):NaN,r=y[3]?parseFloat(y[3]):NaN,(i=y[4]?parseFloat(y[4]):NaN)?(y=/(?:Chrome\/(\d+\.\d+))/.exec(e),s=y&&y[1]?parseFloat(y[1]):NaN):s=NaN}else t=n=r=s=i=NaN;if(b){if(b[1]){var x=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);o=!x||parseFloat(x[1].replace("_","."))}else o=!1;l=!!b[2],c=!!b[3]}else o=l=c=!1}}var b={ie:function(){return y()||t},ieCompatibilityMode:function(){return y()||a>t},ie64:function(){return b.ie()&&u},firefox:function(){return y()||n},opera:function(){return y()||r},webkit:function(){return y()||i},safari:function(){return b.webkit()},chrome:function(){return y()||s},windows:function(){return y()||l},osx:function(){return y()||o},linux:function(){return y()||c},iphone:function(){return y()||h},mobile:function(){return y()||h||p||d||m},nativeApp:function(){return y()||f},android:function(){return y()||d},ipad:function(){return y()||p}};e.exports=b},5780:(e,t,n)=>{"use strict";var r,i=n(4872);i.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,s=n in document;if(!s){var a=document.createElement("div");a.setAttribute(n,"return;"),s="function"===typeof a[n]}return!s&&r&&"wheel"===e&&(s=document.implementation.hasFeature("Events.wheel","3.0")),s}},166:(e,t,n)=>{"use strict";var r=n(5811),i=n(5780);function s(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(1==e.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}s.getEventType=function(){return r.firefox()?"DOMMouseScroll":i("wheel")?"wheel":"mousewheel"},e.exports=s},3465:(e,t,n)=>{"use strict";var r=n(6522);t.certificate=n(8799);var i=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())}));t.RSAPrivateKey=i;var s=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=s;var a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));t.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())})),l=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=l;var c=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())}));t.EncryptedPrivateKey=c;var d=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())}));t.DSAPrivateKey=d,t.DSAparam=r.define("DSAparam",(function(){this.int()}));var u=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=u;var h=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},8799:(e,t,n)=>{"use strict";var r=n(6522),i=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),s=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())})),l=r.define("RelativeDistinguishedName",(function(){this.setof(s)})),c=r.define("RDNSequence",(function(){this.seqof(l)})),d=r.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),u=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),p=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(d),this.key("validity").use(u),this.key("subject").use(d),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(h).optional())})),f=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=f},722:(e,t,n)=>{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,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,s=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=n(8462),o=n(3525),l=n(2543).Buffer;e.exports=function(e,t){var n,c=e.toString(),d=c.match(r);if(d){var u="aes"+d[1],h=l.from(d[2],"hex"),p=l.from(d[3].replace(/[\r\n]/g,""),"base64"),f=a(t,h.slice(0,8),parseInt(d[1],10)).key,m=[],g=o.createDecipheriv(u,f,h);m.push(g.update(p)),m.push(g.final()),n=l.concat(m)}else{var y=c.match(s);n=l.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:n}}},7510:(e,t,n)=>{var r=n(3465),i=n(2562),s=n(722),a=n(3525),o=n(5896),l=n(2543).Buffer;function c(e){var t;"object"!==typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"===typeof e&&(e=l.from(e));var n,c,d=s(e,t),u=d.tag,h=d.data;switch(u){case"CERTIFICATE":c=r.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=r.PublicKey.decode(h,"der")),n=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=r.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),s=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,d=e.subjectPrivateKey,u=parseInt(s.split("-")[1],10)/8,h=o.pbkdf2Sync(t,n,r,u,"sha1"),p=a.createDecipheriv(s,h,c),f=[];return f.push(p.update(d)),f.push(p.final()),l.concat(f)}(h=r.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(n=(c=r.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:r.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=r.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=r.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+u)}}e.exports=c,c.signature=r.signature},5896:(e,t,n)=>{t.pbkdf2=n(6770),t.pbkdf2Sync=n(8017)},6770:(e,t,n)=>{var r,i,s=n(2543).Buffer,a=n(6048),o=n(4404),l=n(8017),c=n(2734),d=n.g.crypto&&n.g.crypto.subtle,u={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"},h=[];function p(){return i||(i=n.g.process&&n.g.process.nextTick?n.g.process.nextTick:n.g.queueMicrotask?n.g.queueMicrotask:n.g.setImmediate?n.g.setImmediate:n.g.setTimeout)}function f(e,t,n,r,i){return d.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return d.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)})).then((function(e){return s.from(e)}))}e.exports=function(e,t,i,m,g,y){"function"===typeof g&&(y=g,g=void 0);var b=u[(g=g||"sha1").toLowerCase()];if(b&&"function"===typeof n.g.Promise){if(a(i,m),e=c(e,o,"Password"),t=c(t,o,"Salt"),"function"!==typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){p()((function(){t(null,e)}))}),(function(e){p()((function(){t(e)}))}))}(function(e){if(n.g.process&&!n.g.process.browser)return Promise.resolve(!1);if(!d||!d.importKey||!d.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var t=f(r=r||s.alloc(8),r,10,128,e).then((function(){return!0})).catch((function(){return!1}));return h[e]=t,t}(b).then((function(n){return n?f(e,t,i,m,b):l(e,t,i,m,g)})),y)}else p()((function(){var n;try{n=l(e,t,i,m,g)}catch(r){return y(r)}y(null,n)}))}},4404:(e,t,n)=>{var r;if(n.g.process&&n.g.process.browser)r="utf-8";else if(n.g.process&&n.g.process.version){r=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r},6048:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,n){if("number"!==typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!==typeof n)throw new TypeError("Key length not a number");if(n<0||n>t||n!==n)throw new TypeError("Bad key length")}},8017:(e,t,n)=>{var r=n(5378),i=n(3375),s=n(997),a=n(2543).Buffer,o=n(6048),l=n(4404),c=n(2734),d=a.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,n){var o=function(e){function t(t){return s(e).update(t).digest()}function n(e){return(new i).update(e).digest()}return"rmd160"===e||"ripemd160"===e?n:"md5"===e?r:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=o(t):t.length{var r=n(2543).Buffer;e.exports=function(e,t,n){if(r.isBuffer(e))return e;if("string"===typeof e)return r.from(e,t);if(ArrayBuffer.isView(e))return r.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},888:(e,t,n)=>{"use strict";var r=n(9047);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,a){if(a!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:i};return n.PropTypes=n,n}},2007:(e,t,n)=>{e.exports=n(888)()},9047:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},12:(e,t,n)=>{t.publicEncrypt=n(2190),t.privateDecrypt=n(3936),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},7135:(e,t,n)=>{var r=n(3569),i=n(2543).Buffer;function s(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,a=i.alloc(0),o=0;a.length{var r=n(7510),i=n(7135),s=n(1214),a=n(518),o=n(1330),l=n(3569),c=n(4383),d=n(2543).Buffer;e.exports=function(e,t,n){var u;u=e.padding?e.padding:n?1:4;var h,p=r(e),f=p.modulus.byteLength();if(t.length>f||new a(t).cmp(p.modulus)>=0)throw new Error("decryption error");h=n?c(new a(t),p):o(t,p);var m=d.alloc(f-h.length);if(h=d.concat([m,h],f),4===u)return function(e,t){var n=e.modulus.byteLength(),r=l("sha1").update(d.alloc(0)).digest(),a=r.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,a+1),c=t.slice(a+1),u=s(o,i(c,a)),h=s(c,i(u,n-a-1));if(function(e,t){e=d.from(e),t=d.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));var i=-1;for(;++i=t.length){s++;break}var a=t.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&s++;a.length<8&&s++;if(s)throw new Error("decryption error");return t.slice(i)}(0,h,n);if(3===u)return h;throw new Error("unknown padding")}},2190:(e,t,n)=>{var r=n(7510),i=n(2525),s=n(3569),a=n(7135),o=n(1214),l=n(518),c=n(4383),d=n(1330),u=n(2543).Buffer;e.exports=function(e,t,n){var h;h=e.padding?e.padding:n?1:4;var p,f=r(e);if(4===h)p=function(e,t){var n=e.modulus.byteLength(),r=t.length,c=s("sha1").update(u.alloc(0)).digest(),d=c.length,h=2*d;if(r>n-h-2)throw new Error("message too long");var p=u.alloc(n-r-h-2),f=n-d-1,m=i(d),g=o(u.concat([c,p,u.alloc(1,1),t],f),a(m,f)),y=o(m,a(g,d));return new l(u.concat([u.alloc(1),y,g],n))}(f,t);else if(1===h)p=function(e,t,n){var r,s=t.length,a=e.modulus.byteLength();if(s>a-11)throw new Error("message too long");r=n?u.alloc(a-s-3,255):function(e){var t,n=u.allocUnsafe(e),r=0,s=i(2*e),a=0;for(;r=0)throw new Error("data too long for modulus")}return n?d(p,f):c(p,f)}},4383:(e,t,n)=>{var r=n(518),i=n(2543).Buffer;e.exports=function(e,t){return i.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},1214:e=>{e.exports=function(e,t){for(var n=e.length,r=-1;++r{"use strict";var r=65536,i=4294967295;var s=n(2543).Buffer,a=n.g.crypto||n.g.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>i)throw new RangeError("requested too many random bytes");var n=s.allocUnsafe(e);if(e>0)if(e>r)for(var o=0;o{"use strict";function r(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var i=n(2543),s=n(2525),a=i.Buffer,o=i.kMaxLength,l=n.g.crypto||n.g.msCrypto,c=Math.pow(2,32)-1;function d(e,t){if("number"!==typeof e||e!==e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>o||e>t)throw new RangeError("offset out of range")}function u(e,t,n){if("number"!==typeof e||e!==e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>o)throw new RangeError("buffer too small")}function h(e,t,n,r){if(process.browser){var i=e.buffer,a=new Uint8Array(i,t,n);return l.getRandomValues(a),r?void process.nextTick((function(){r(null,e)})):e}if(!r)return s(n).copy(e,t),e;s(n,(function(n,i){if(n)return r(n);i.copy(e,t),r(null,e)}))}l&&l.getRandomValues||!process.browser?(t.randomFill=function(e,t,r,i){if(!a.isBuffer(e)&&!(e instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof t)i=t,t=0,r=e.length;else if("function"===typeof r)i=r,r=e.length-t;else if("function"!==typeof i)throw new TypeError('"cb" argument must be a function');return d(t,e.length),u(r,t,e.length),h(e,t,r,i)},t.randomFillSync=function(e,t,r){"undefined"===typeof t&&(t=0);if(!a.isBuffer(e)&&!(e instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');d(t,e.length),void 0===r&&(r=e.length-t);return u(r,t,e.length),h(e,t,r)}):(t.randomFill=r,t.randomFillSync=r)},173:(e,t,n)=>{"use strict";var r,i=n(2791),s=(r=i)&&"object"===typeof r&&"default"in r?r.default:r,a=n(1338),o=new a,l=o.getBrowser(),c=o.getCPU(),d=o.getDevice(),u=o.getEngine(),h=o.getOS(),p=o.getUA(),f=function(e){return o.setUA(e)},m=function(e){if(e){var t=new a(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}console.error("No userAgent string was provided")},g=Object.freeze({ClientUAInstance:o,browser:l,cpu:c,device:d,engine:u,os:h,ua:p,setUa:f,parseUserAgent:m});function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){return b="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function v(e,t){for(var n=0;n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,s=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(s.push(r.value),!t||s.length!==t);a=!0);}catch(l){o=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(o)throw i}}return s}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"none")},z=function(){return!("undefined"===typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},F=function(e){var t=z();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},U=function(e,t,n,r){return function(e){for(var t=1;t1)&&!window.MSStream},je=function(){return F("iPad")},Ee=function(){return F("iPhone")},Ne=function(){return F("iPod")},Te=function(e){return L(e)};function _e(e){var t=e||g,n=t.device,r=t.browser,i=t.os,s=t.engine,a=t.ua;return{isSmartTV:K(n),isConsole:G(n),isWearable:Z(n),isEmbedded:q(n),isMobileSafari:he(r)||je(),isChromium:le(r),isMobile:H(n)||je(),isMobileOnly:V(n),isTablet:W(n)||je(),isBrowser:Y(n),isDesktop:Y(n),isAndroid:J(i),isWinPhone:ne(i),isIOS:re(i)||je(),isChrome:ae(r),isFirefox:oe(r),isSafari:ue(r),isOpera:pe(r),isIE:fe(r),osVersion:ie(i),osName:se(i),fullBrowserVersion:ye(r),browserVersion:be(r),browserName:ve(r),mobileVendor:$(n),mobileModel:X(n),engineName:xe(s),engineVersion:we(s),getUA:Te(a),isEdge:ce(r)||Se(a),isYandex:de(r),deviceType:Q(n),isIOS13:Ce(),isIPad13:je(),isIPhone13:Ee(),isIPod13:Ne(),isElectron:ke(),isEdgeChromium:Se(a),isLegacyEdge:ce(r)&&!Se(a),isWindows:ee(i),isMacOs:te(i),isMIUI:me(r),isSamsungBrowser:ge(r)}}var Me=K(d),Ae=G(d),Re=Z(d),Ie=q(d),De=he(l)||je(),Be=le(l),Oe=H(d)||je(),Pe=V(d),Le=W(d)||je(),ze=Y(d),Fe=Y(d),Ue=J(h),Ve=ne(h),We=re(h)||je(),He=ae(l),Ke=oe(l),Ye=ue(l),Ze=pe(l),Ge=fe(l),qe=ie(h),$e=se(h),Xe=ye(l),Qe=be(l),Je=ve(l),et=$(d),tt=X(d),nt=xe(u),rt=we(u),it=Te(p),st=ce(l)||Se(p),at=de(l),ot=Q(d),lt=Ce(),ct=je(),dt=Ee(),ut=Ne(),ht=ke(),pt=Se(p),ft=ce(l)&&!Se(p),mt=ee(h),gt=te(h),yt=me(l),bt=ge(l);function vt(e){var t=e||window.navigator.userAgent;return m(t)}t.tq=Oe,t.Qe=function(e){return function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}(this,k(n).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(j(t)),t.onOrientationChange=t.onOrientationChange.bind(j(t)),t.onPageLoad=t.onPageLoad.bind(j(t)),t.state={isLandscape:!1,isPortrait:!1},t}var r,i,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(n,t),r=n,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"===typeof window?"undefined":b(window))&&Oe&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return s.createElement(e,w({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&v(r.prototype,i),a&&v(r,a),n}(s.Component)}},7874:(e,t)=>{"use strict"},4463:(e,t,n)=>{"use strict";var r=n(2791),i=n(5296);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n