@web3auth/no-modal 8.10.2 → 8.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/noModal.cjs.js +1 -1
- package/dist/noModal.esm.js +1 -1
- package/dist/noModal.umd.min.js +1 -1
- package/package.json +6 -6
package/dist/noModal.umd.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see noModal.umd.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.NoModal=t():e.NoModal=t()}(self,(()=>(()=>{var e={9363:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(3670),{AbortError:i,codes:o}=r(5443),{isNodeStream:s,isWebStream:a,kControllerErrorFunction:c}=r(4579),f=r(862),{ERR_INVALID_ARG_TYPE:u}=o;let d;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new u("signal","AbortSignal",e)})(t),!s(r)&&!a(r))throw new u("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const o=s(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[c](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{d=d||r(3968).addAbortListener;const i=d(e,o);f(t,i[n])}return t}},1753:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(3670),{Buffer:a}=r(1048),{inspect:c}=r(3968);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,i=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(o(t,a,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}o(t,a,r-e),e-=a.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return c(this,{...t,depth:0,customInspect:!1})}}},5366:(e,t,r)=>{"use strict";const{pipeline:n}=r(4846),i=r(8842),{destroyer:o}=r(3432),{isNodeStream:s,isReadable:a,isWritable:c,isWebStream:f,isTransformStream:u,isWritableStream:d,isReadableStream:l}=r(4579),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(5443),g=r(862);e.exports=function(...e){if(0===e.length)throw new b("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r<e.length;++r)if(s(e[r])||f(e[r])){if(r<e.length-1&&!(a(e[r])||l(e[r])||u(e[r])))throw new p(`streams[${r}]`,t[r],"must be readable");if(r>0&&!(c(e[r])||d(e[r])||u(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,y,m,v,w;const _=e[0],S=n(e,(function(e){const t=v;v=null,t?t(e):e?w.destroy(e):A||E||w.destroy()})),E=!!(c(_)||d(_)||u(_)),A=!!(a(S)||l(S)||u(S));if(w=new i({writableObjectMode:!(null==_||!_.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:E,readable:A}),E){if(s(_))w._write=function(e,t,n){_.write(e,t)?n():r=n},w._final=function(e){_.end(),y=e},_.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(f(_)){const e=(u(_)?_.writable:_).getWriter();w._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},w._final=async function(t){try{await e.ready,e.close().catch((()=>{})),y=t}catch(e){t(e)}}}const e=u(S)?S.readable:S;g(e,(()=>{if(y){const e=y;y=null,e()}}))}if(A)if(s(S))S.on("readable",(function(){if(m){const e=m;m=null,e()}})),S.on("end",(function(){w.push(null)})),w._read=function(){for(;;){const e=S.read();if(null===e)return void(m=w._read);if(!w.push(e))return}};else if(f(S)){const e=(u(S)?S.readable:S).getReader();w._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!w.push(t))return;if(r)return void w.push(null)}catch{return}}}return w._destroy=function(e,t){e||null===v||(e=new h),m=null,r=null,y=null,null===v?t(e):(v=t,s(S)&&o(S,e))},w}},3432:(e,t,r)=>{"use strict";const n=r(9907),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(5443),{Symbol:a}=r(3670),{kIsDestroyed:c,isDestroyed:f,isFinished:u,isServerRequest:d}=r(4579),l=a("kDestroy"),h=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function b(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(y,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function g(e,t){m(e,t),y(e)}function y(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function m(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(m,e,t):m(e,t))}function w(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(l,r):r?v(e,r,!0):n.nextTick(_,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function _(e){e.emit(h)}function S(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function E(e){e.emit("close")}function A(e,t){e.emit("error",t),n.nextTick(E,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(w,e)},destroyer:function(e,t){e&&!f(e)&&(t||u(e)||(t=new s),d(e)?(e.socket=null,e.destroy(t)):S(e)?e.abort():S(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(A,e,t):n.nextTick(E,e),e.destroyed||(e[c]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,e,t):this.once(l,(function(r){b(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},8842:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(3670);e.exports=f;const a=r(4664),c=r(5672);s(f.prototype,a.prototype),s(f,a);{const e=o(c.prototype);for(let t=0;t<e.length;t++){const r=e[t];f.prototype[r]||(f.prototype[r]=c.prototype[r])}}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),c.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let u,d;function l(){return void 0===u&&(u={}),u}n(f.prototype,{writable:{__proto__:null,...i(c.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(c.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(c.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(c.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(c.prototype,"writableLength")},writableFinished:{__proto__:null,...i(c.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(c.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(c.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(c.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),f.fromWeb=function(e,t){return l().newStreamDuplexFromReadableWritablePair(e,t)},f.toWeb=function(e){return l().newReadableWritablePairFromDuplex(e)},f.from=function(e){return d||(d=r(7426)),d(e,"body")}},7426:(e,t,r)=>{const n=r(9907),i=r(1048),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:c,isReadableNodeStream:f,isWritableNodeStream:u,isDuplexNodeStream:d,isReadableStream:l,isWritableStream:h}=r(4579),p=r(862),{AbortError:b,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:y}}=r(5443),{destroyer:m}=r(3432),v=r(8842),w=r(4664),_=r(5672),{createDeferredPromise:S}=r(3968),E=r(7556),A=globalThis.Blob||i.Blob,M=void 0!==A?function(e){return e instanceof A}:function(e){return!1},O=globalThis.AbortController||r(7083).AbortController,{FunctionPrototypeCall:R}=r(3670);class x extends v{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(e){const t=e.readable&&"function"!=typeof e.readable.read?w.wrap(e.readable):e.readable,r=e.writable;let n,i,a,c,f,u=!!o(t),d=!!s(r);function l(e){const t=c;c=null,t?t(e):e&&f.destroy(e)}return f=new x({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:u,writable:d}),d&&(p(r,(e=>{d=!1,e&&m(t,e),l(e)})),f._write=function(e,t,i){r.write(e,t)?i():n=i},f._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),u&&(p(t,(e=>{u=!1,e&&m(t,e),l(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){f.push(null)})),f._read=function(){for(;;){const e=t.read();if(null===e)return void(a=f._read);if(!f.push(e))return}}),f._destroy=function(e,o){e||null===c||(e=new b),a=null,n=null,i=null,null===c?o(e):(c=o,m(r,e),m(t,e))},f}e.exports=function e(t,r){if(d(t))return t;if(f(t))return I({readable:t});if(u(t))return I({writable:t});if(c(t))return I({writable:!1,readable:!1});if(l(t))return I({readable:w.fromWeb(t)});if(h(t))return I({writable:_.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:s}=function(e){let{promise:t,resolve:r}=S();const i=new O,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(o.aborted)throw new b(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return E(x,e,{objectMode:!0,write:i,final:o,destroy:s});const c=null==e?void 0:e.then;if("function"==typeof c){let t;const r=R(c,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{m(t,e)}));return t=new x({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(M(t))return e(t.arrayBuffer());if(a(t))return E(x,t,{objectMode:!0,writable:!1});if(l(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return x.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return I({readable:null!=t&&t.readable?f(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?u(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{m(e,t)})),e=new x({objectMode:!0,writable:!1,read(){}})}throw new g(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},862:(e,t,r)=>{const n=r(9907),{AbortError:i,codes:o}=r(5443),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:c,once:f}=r(3968),{validateAbortSignal:u,validateFunction:d,validateObject:l,validateBoolean:h}=r(3045),{Promise:p,PromisePrototypeThen:b,SymbolDispose:g}=r(3670),{isClosed:y,isReadable:m,isReadableNodeStream:v,isReadableStream:w,isReadableFinished:_,isReadableErrored:S,isWritable:E,isWritableNodeStream:A,isWritableStream:M,isWritableFinished:O,isWritableErrored:R,isNodeStream:x,willEmitClose:I,kIsClosedPromise:P}=r(4579);let N;const k=()=>{};function C(e,t,o){var h,p;if(2===arguments.length?(o=t,t=c):null==t?t=c:l(t,"options"),d(o,"callback"),u(t.signal,"options.signal"),o=f(o),w(e)||M(e))return function(e,t,o){let s=!1,a=k;if(t.signal)if(a=()=>{s=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(a);else{N=N||r(3968).addAbortListener;const n=N(t.signal,a),i=o;o=f(((...t)=>{n[g](),i.apply(e,t)}))}const c=(...t)=>{s||n.nextTick((()=>o.apply(e,t)))};return b(e[P].promise,c,c),k}(e,t,o);if(!x(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const C=null!==(h=t.readable)&&void 0!==h?h:v(e),T=null!==(p=t.writable)&&void 0!==p?p:A(e),B=e._writableState,L=e._readableState,j=()=>{e.writable||D()};let F=I(e)&&v(e)===C&&A(e)===T,U=O(e,!1);const D=()=>{U=!0,e.destroyed&&(F=!1),(!F||e.readable&&!C)&&(C&&!q||o.call(e))};let q=_(e,!1);const z=()=>{q=!0,e.destroyed&&(F=!1),(!F||e.writable&&!T)&&(T&&!U||o.call(e))},$=t=>{o.call(e,t)};let W=y(e);const H=()=>{W=!0;const t=R(e)||S(e);return t&&"boolean"!=typeof t?o.call(e,t):C&&!q&&v(e,!0)&&!_(e,!1)?o.call(e,new a):!T||U||O(e,!1)?void o.call(e):o.call(e,new a)},V=()=>{W=!0;const t=R(e)||S(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},G=()=>{e.req.on("finish",D)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?T&&!B&&(e.on("end",j),e.on("close",j)):(e.on("complete",D),F||e.on("abort",H),e.req?G():e.on("request",G)),F||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",z),e.on("finish",D),!1!==t.error&&e.on("error",$),e.on("close",H),W?n.nextTick(H):null!=B&&B.errorEmitted||null!=L&&L.errorEmitted?F||n.nextTick(V):(C||F&&!m(e)||!U&&!1!==E(e))&&(T||F&&!E(e)||!q&&!1!==m(e))?L&&e.req&&e.aborted&&n.nextTick(V):n.nextTick(V);const K=()=>{o=k,e.removeListener("aborted",H),e.removeListener("complete",D),e.removeListener("abort",H),e.removeListener("request",G),e.req&&e.req.removeListener("finish",D),e.removeListener("end",j),e.removeListener("close",j),e.removeListener("finish",D),e.removeListener("end",z),e.removeListener("error",$),e.removeListener("close",H)};if(t.signal&&!W){const s=()=>{const r=o;K(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(s);else{N=N||r(3968).addAbortListener;const n=N(t.signal,s),i=o;o=f(((...t)=>{n[g](),i.apply(e,t)}))}}return K}e.exports=C,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=c),null!==(r=t)&&void 0!==r&&r.cleanup&&(h(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,i)=>{const o=C(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},7556:(e,t,r)=>{"use strict";const n=r(9907),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(3670),{Buffer:a}=r(1048),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:f}=r(5443).codes;e.exports=function(e,t,r){let u,d;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])d=!0,u=t[o]();else{if(!t||!t[s])throw new c("iterable",["Iterable"],t);d=!1,u=t[s]()}const l=new e({objectMode:!0,highWaterMark:1,...r});let h=!1;return l._read=function(){h||(h=!0,async function(){for(;;){try{const{value:e,done:t}=d?await u.next():u.next();if(t)l.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw h=!1,new f;if(l.push(t))continue;h=!1}}catch(e){l.destroy(e)}break}}())},l._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof u.throw;if(t&&r){const{value:t,done:r}=await u.throw(e);if(await t,r)return}if("function"==typeof u.return){const{value:e}=await u.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},l}},9731:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(3670),{EventEmitter:o}=r(46);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",c),r.on("close",f));let s=!1;function c(){s||(s=!0,e.end())}function f(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){d(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function d(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",c),r.removeListener("close",f),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return a(r,"error",u),a(e,"error",u),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},1543:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(7083).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:c}=r(5443),{validateAbortSignal:f,validateInteger:u,validateObject:d}=r(3045),l=r(3670).Symbol("kWeak"),h=r(3670).Symbol("kResistStopPropagation"),{finished:p}=r(862),b=r(5366),{addAbortSignalNoValidate:g}=r(9363),{isWritable:y,isNodeStream:m}=r(4579),{deprecate:v}=r(3968),{ArrayPrototypePush:w,Boolean:_,MathFloor:S,Number:E,NumberIsNaN:A,Promise:M,PromiseReject:O,PromiseResolve:R,PromisePrototypeThen:x,Symbol:I}=r(3670),P=I("kEmpty"),N=I("kEof");function k(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&f(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(3968).AbortSignalAny([null==t?void 0:t.signal].filter(_)),s=this,a=[],f={signal:o};let u,d,l=!1,h=0;function p(){l=!0,b()}function b(){h-=1,g()}function g(){d&&!l&&h<n&&a.length<i&&(d(),d=null)}!async function(){try{for await(let t of s){if(l)return;if(o.aborted)throw new c;try{if(t=e(t,f),t===P)continue;t=R(t)}catch(e){t=O(e)}h+=1,x(t,b,p),a.push(t),u&&(u(),u=null),!l&&(a.length>=i||h>=n)&&await new M((e=>{d=e}))}a.push(N)}catch(e){const t=O(e);x(t,b,p),a.push(t)}finally{l=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===N)return;if(o.aborted)throw new c;e!==P&&(yield e),a.shift(),g()}await new M((e=>{u=e}))}}finally{l=!0,d&&(d(),d=null)}}.call(this)}async function C(e,t=void 0){for await(const r of T.call(this,e,t))return!0;return!1}function T(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return k.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class B extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function L(e){if(e=E(e),A(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:v((function(e=void 0){return null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&f(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&f(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;e--<=0&&(yield r)}}.call(this)},filter:T,flatMap:function(e,t){const r=k.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:k,take:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&f(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&f(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&g(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of k.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&d(r,"options"),null!=(null==r?void 0:r.signal)&&f(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new c(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[l]:this,[h]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var g;if(b=!0,null!=r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new c;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new B}finally{a.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&f(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c(void 0,{cause:e.signal.reason});w(t,n)}return t},some:C,find:async function(e,t){for await(const r of T.call(this,e,t))return r}}},7932:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(3670);e.exports=o;const i=r(8102);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},4846:(e,t,r)=>{const n=r(9907),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s,SymbolDispose:a}=r(3670),c=r(862),{once:f}=r(3968),u=r(3432),d=r(8842),{aggregateTwoErrors:l,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:b,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:m}=r(5443),{validateFunction:v,validateAbortSignal:w}=r(3045),{isIterable:_,isReadable:S,isReadableNodeStream:E,isNodeStream:A,isTransformStream:M,isWebStream:O,isReadableStream:R,isReadableFinished:x}=r(4579),I=globalThis.AbortController||r(7083).AbortController;let P,N,k;function C(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,u.destroyer(e,t||new g("pipe")))},cleanup:c(e,{readable:t,writable:r},(e=>{n=!e}))}}function T(e){if(_(e))return e;if(E(e))return async function*(e){N||(N=r(4664)),yield*N.prototype[s].call(e)}(e);throw new h("val",["Readable","Iterable","AsyncIterable"],e)}async function B(e,t,r,{end:n}){let i,s=null;const a=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},f=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",a);const u=c(t,{readable:!1},a);try{t.writableNeedDrain&&await f();for await(const r of e)t.write(r)||await f();n&&(t.end(),await f()),r()}catch(e){r(i!==e?l(i,e):e)}finally{u(),t.off("drain",a)}}async function L(e,t,r,{end:n}){M(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function j(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new b("streams");const s=new I,c=s.signal,f=null==o?void 0:o.signal,u=[];function l(){D(new m)}let g,y,v;w(f,"options.signal"),k=k||r(3968).addAbortListener,f&&(g=k(f,l));const x=[];let N,j=0;function U(e){D(e,0==--j)}function D(e,r){var i;if(!e||y&&"ERR_STREAM_PREMATURE_CLOSE"!==y.code||(y=e),y||r){for(;x.length;)x.shift()(y);null===(i=g)||void 0===i||i[a](),s.abort(),r&&(y||u.forEach((e=>e())),n.nextTick(t,y,v))}}for(let W=0;W<e.length;W++){const H=e[W],V=W<e.length-1,G=W>0,K=V||!1!==(null==o?void 0:o.end),J=W===e.length-1;if(A(H)){if(K){const{destroy:Y,cleanup:X}=C(H,V,G);x.push(Y),S(H)&&J&&u.push(X)}function q(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&U(e)}H.on("error",q),S(H)&&J&&u.push((()=>{H.removeListener("error",q)}))}if(0===W)if("function"==typeof H){if(N=H({signal:c}),!_(N))throw new p("Iterable, AsyncIterable or Stream","source",N)}else N=_(H)||E(H)||M(H)?H:d.from(H);else if("function"==typeof H){var z;if(N=M(N)?T(null===(z=N)||void 0===z?void 0:z.readable):T(N),N=H(N,{signal:c}),V){if(!_(N,!0))throw new p("AsyncIterable",`transform[${W-1}]`,N)}else{var $;P||(P=r(7932));const Z=new P({objectMode:!0}),Q=null===($=N)||void 0===$?void 0:$.then;if("function"==typeof Q)j++,Q.call(N,(e=>{v=e,null!=e&&Z.write(e),K&&Z.end(),n.nextTick(U)}),(e=>{Z.destroy(e),n.nextTick(U,e)}));else if(_(N,!0))j++,B(N,Z,U,{end:K});else{if(!R(N)&&!M(N))throw new p("AsyncIterable or Promise","destination",N);{const re=N.readable||N;j++,B(re,Z,U,{end:K})}}N=Z;const{destroy:ee,cleanup:te}=C(N,!1,!0);x.push(ee),J&&u.push(te)}}else if(A(H)){if(E(N)){j+=2;const ne=F(N,H,U,{end:K});S(H)&&J&&u.push(ne)}else if(M(N)||R(N)){const ie=N.readable||N;j++,B(ie,H,U,{end:K})}else{if(!_(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);j++,B(N,H,U,{end:K})}N=H}else if(O(H)){if(E(N))j++,L(T(N),H,U,{end:K});else if(R(N)||_(N))j++,L(N,H,U,{end:K});else{if(!M(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);j++,L(N.readable,H,U,{end:K})}N=H}else N=d.from(H)}return(null!=c&&c.aborted||null!=f&&f.aborted)&&n.nextTick(l),N}function F(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new y)})),e.pipe(t,{end:!1}),i){function s(){o=!0,t.end()}x(e)?n.nextTick(s):e.once("end",s)}else r();return c(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),c(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:j,pipeline:function(...e){return j(e,f(function(e){return v(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},4664:(e,t,r)=>{const n=r(9907),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:c,ObjectKeys:f,ObjectSetPrototypeOf:u,Promise:d,SafeSet:l,SymbolAsyncDispose:h,SymbolAsyncIterator:p,Symbol:b}=r(3670);e.exports=J,J.ReadableState=K;const{EventEmitter:g}=r(46),{Stream:y,prependListener:m}=r(9731),{Buffer:v}=r(1048),{addAbortSignal:w}=r(9363),_=r(862);let S=r(3968).debuglog("stream",(e=>{S=e}));const E=r(1753),A=r(3432),{getHighWaterMark:M,getDefaultHighWaterMark:O}=r(107),{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:P,ERR_STREAM_PUSH_AFTER_EOF:N,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:k},AbortError:C}=r(5443),{validateObject:T}=r(3045),B=b("kPaused"),{StringDecoder:L}=r(9301),j=r(7556);u(J.prototype,y.prototype),u(J,y);const F=()=>{},{errorOrDestroy:U}=A,D=1,q=16,z=32,$=64,W=2048,H=4096,V=65536;function G(e){return{enumerable:!1,get(){return!!(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function K(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8842)),this.state=W|H|q|z,e&&e.objectMode&&(this.state|=D),n&&e&&e.readableObjectMode&&(this.state|=D),this.highWaterMark=e?M(this,e,"readableHighWaterMark",n):O(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this[B]=null,e&&!1===e.emitClose&&(this.state&=~W),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function J(e){if(!(this instanceof J))return new J(e);const t=this instanceof r(8842);this._readableState=new K(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&w(e.signal,this)),y.call(this,e),A.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function Y(e,t,r,n){S("readableAddChunk",t);const i=e._readableState;let o;if(i.state&D||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=v.from(t,r).toString(i.encoding):(t=v.from(t,r),r=""))):t instanceof v?r="":y._isUint8Array(t)?(t=y._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new x("chunk",["string","Buffer","Uint8Array"],t))),o)U(e,o);else if(null===t)i.state&=-9,function(e,t){if(S("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Q(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(i.state&D||t&&t.length>0)if(n)if(4&i.state)U(e,new k);else{if(i.destroyed||i.errored)return!1;X(e,i,t,!0)}else if(i.ended)U(e,new N);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?X(e,i,t,!1):te(e,i)):X(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function X(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(t.state&V?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.state&$&&Q(e)),te(e,t)}function Z(e,t){return e<=0||0===t.length&&t.ended?0:t.state&D?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Q(e){const t=e._readableState;S("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(S("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;S("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,se(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const r=t.length;if(S("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function ne(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[B]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){S("readable nexttick read 0"),e.read(0)}function oe(e,t){S("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),se(e),t.flowing&&!t.reading&&e.read(0)}function se(e){const t=e._readableState;for(S("flow",t.flowing);t.flowing&&null!==e.read(););}function ae(e,t){"function"!=typeof e.read&&(e=J.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=F;function i(t){this===e?(n(),n=F):n=t}e.on("readable",i);const o=_(e,{writable:!1},(e=>{r=e?R(r,e):null,n(),n=F}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new d(i)}}}catch(e){throw r=R(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):A.destroyer(e,null)}}(e,t);return r.stream=e,r}function ce(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function fe(e){const t=e._readableState;S("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ue,t,e))}function ue(e,t){if(S("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let le;function he(){return void 0===le&&(le={}),le}c(K.prototype,{objectMode:G(D),ended:G(2),endEmitted:G(4),reading:G(8),constructed:G(q),sync:G(z),needReadable:G($),emittedReadable:G(128),readableListening:G(256),resumeScheduled:G(512),errorEmitted:G(1024),emitClose:G(W),autoDestroy:G(H),destroyed:G(8192),closed:G(16384),closeEmitted:G(32768),multiAwaitDrain:G(V),readingMore:G(1<<17),dataEmitted:G(1<<18)}),J.prototype.destroy=A.destroy,J.prototype._undestroy=A.undestroy,J.prototype._destroy=function(e,t){t(e)},J.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},J.prototype[h]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new C,this.destroy(e)),new d(((t,r)=>_(this,(n=>n&&n!==e?r(n):t(null)))))},J.prototype.push=function(e,t){return Y(this,e,t,!1)},J.prototype.unshift=function(e,t){return Y(this,e,t,!0)},J.prototype.isPaused=function(){const e=this._readableState;return!0===e[B]||!1===e.flowing},J.prototype.setEncoding=function(e){const t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},J.prototype.read=function(e){S("read",e),void 0===e?e=NaN:o(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new P("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return S("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?fe(this):Q(this),null;if(0===(e=Z(e,t))&&t.ended)return 0===t.length&&fe(this),null;let n,i=!!(t.state&$);if(S("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,S("length less than watermark",i)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)i=!1,S("reading, ended or constructing",i);else if(i){S("do read"),t.state|=8|z,0===t.length&&(t.state|=$);try{this._read(t.highWaterMark)}catch(e){U(this,e)}t.state&=~z,t.reading||(e=Z(r,t))}return n=e>0?ce(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&fe(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},J.prototype._read=function(e){throw new I("_read()")},J.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new l(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),S("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?b:s;function s(){S("onend"),e.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){S("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,S("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",u),c=!0,a&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let c=!1;function f(){c||(1===i.pipes.length&&i.pipes[0]===e?(S("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(S("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(S("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(S("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function u(t){S("ondata");const r=e.write(t);S("dest.write",r),!1===r&&f()}function d(t){if(S("onerror",t),b(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?U(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",p),b()}function p(){S("onfinish"),e.removeListener("close",h),b()}function b(){S("unpipe"),r.unpipe(e)}return r.on("data",u),m(e,"error",d),e.once("close",h),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?f():i.flowing||(S("pipe resume"),r.resume()),e},J.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const r=i(t.pipes,e);return-1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},J.prototype.on=function(e,t){const r=y.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,S("on readable",i.length,i.reading),i.length?Q(this):i.reading||n.nextTick(ie,this))),r},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(e,t){const r=y.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},J.prototype.off=J.prototype.removeListener,J.prototype.removeAllListeners=function(e){const t=y.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},J.prototype.resume=function(){const e=this._readableState;return e.flowing||(S("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(oe,e,t))}(this,e)),e[B]=!1,this},J.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[B]=!0,this},J.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{U(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=f(e);for(let t=1;t<r.length;t++){const n=r[t];void 0===this[n]&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},J.prototype[p]=function(){return ae(this)},J.prototype.iterator=function(e){return void 0!==e&&T(e,"options"),ae(this,e)},c(J.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),c(K.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[B]},set(e){this[B]=!!e}}}),J._fromList=ce,J.from=function(e,t){return j(J,e,t)},J.fromWeb=function(e,t){return he().newStreamReadableFromReadableStream(e,t)},J.toWeb=function(e,t){return he().newReadableStreamFromStreamReadable(e,t)},J.wrap=function(e,t){var r,n;return new J({objectMode:null===(r=null!==(n=e.readableObjectMode)&&void 0!==n?n:e.objectMode)||void 0===r||r,...t,destroy(t,r){A.destroyer(e,t),r(t)}}).wrap(e)}},107:(e,t,r)=>{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(3670),{validateInteger:o}=r(3045),{ERR_INVALID_ARG_VALUE:s}=r(5443).codes;let a=16384,c=16;function f(e){return e?c:a}e.exports={getHighWaterMark:function(e,t,r,o){const a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=a){if(!i(a)||a<0)throw new s(o?`options.${r}`:"options.highWaterMark",a);return n(a)}return f(e.objectMode)},getDefaultHighWaterMark:f,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?c=t:a=t}}},8102:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(3670);e.exports=f;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(5443).codes,s=r(8842),{getHighWaterMark:a}=r(107);n(f.prototype,s.prototype),n(f,s);const c=i("kCallback");function f(e){if(!(this instanceof f))return new f(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function u(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function d(){this._final!==u&&u.call(this)}f.prototype._final=u,f.prototype._transform=function(e,t,r){throw new o("_transform()")},f.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length<n.highWaterMark?r():this[c]=r)}))},f.prototype._read=function(){if(this[c]){const e=this[c];this[c]=null,e()}}},4579:(e,t,r)=>{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(3670),s=o("nodejs.stream.destroyed"),a=o("nodejs.stream.errored"),c=o("nodejs.stream.readable"),f=o("nodejs.stream.writable"),u=o("nodejs.stream.disturbed"),d=o("nodejs.webstream.isClosedPromise"),l=o("nodejs.webstream.controllerErrorFunction");function h(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function b(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||b(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function y(e){return!(!e||b(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function m(e){return!(!e||b(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[s]||null!=n&&n.destroyed)}function w(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function _(e,t){if(!h(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function S(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&h(e)&&e.readable&&!_(e)}function E(e){return e&&null!=e[f]?e[f]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&p(e)&&e.writable&&!w(e)}function A(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function M(e){return"boolean"==typeof e._sent100&&A(e)}e.exports={isDestroyed:v,kIsDestroyed:s,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[u])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:u,isErrored:function(e){var t,r,n,i,o,s,c,f,u,d;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[a])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(c=e._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==n?n:null===(f=e._writableState)||void 0===f?void 0:f.errorEmitted)&&void 0!==r?r:null===(u=e._readableState)||void 0===u?void 0:u.errored)&&void 0!==t?t:null===(d=e._writableState)||void 0===d?void 0:d.errored))},kIsErrored:a,isReadable:S,kIsReadable:c,kIsClosedPromise:d,kControllerErrorFunction:l,kIsWritable:f,isClosed:function(e){if(!b(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&A(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return b(e)?!(!v(e)&&(!1!==(null==t?void 0:t.readable)&&S(e)||!1!==(null==t?void 0:t.writable)&&E(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:h,isReadableStream:g,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:_,isReadableErrored:function(e){var t,r;return b(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:b,isWebStream:function(e){return g(e)||y(e)||m(e)},isWritable:E,isWritableNodeStream:p,isWritableStream:y,isWritableEnded:w,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return b(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:M,willEmitClose:function(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&M(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:m}},5672:(e,t,r)=>{const n=r(9907),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:c,ObjectSetPrototypeOf:f,StringPrototypeToLowerCase:u,Symbol:d,SymbolHasInstance:l}=r(3670);e.exports=T,T.WritableState=k;const{EventEmitter:h}=r(46),p=r(9731).Stream,{Buffer:b}=r(1048),g=r(3432),{addAbortSignal:y}=r(9363),{getHighWaterMark:m,getDefaultHighWaterMark:v}=r(107),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:E,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:M,ERR_STREAM_NULL_VALUES:O,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:x}=r(5443).codes,{errorOrDestroy:I}=g;function P(){}f(T.prototype,p.prototype),f(T,p);const N=d("kOnFinished");function k(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8842)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?m(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,C(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[N]=[]}function C(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function T(e){const t=this instanceof r(8842);if(!t&&!s(T,this))return new T(e);this._writableState=new k(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&y(e.signal,this)),p.call(this,e),g.construct(this,(()=>{const e=this._writableState;e.writing||z(this,e),W(this,e)}))}function B(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new x(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===t)throw new O;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=b.from(t,r),r="buffer");else if(t instanceof b)r="buffer";else{if(!p._isUint8Array(t))throw new w("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new R:o.destroyed&&(s=new A("write")),s?(n.nextTick(i,s),I(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:r,encoding:n,callback:i}),t.allBuffers&&"buffer"!==n&&(t.allBuffers=!1),t.allNoop&&i!==P&&(t.allNoop=!1)):(t.writelen=o,t.writecb=i,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1),s&&!t.errored&&!t.destroyed}(e,o,t,r,i))}function L(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new A("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function j(e,t,r,n){--t.pendingcb,n(r),q(t),I(e,r)}function F(e,t){const r=e._writableState,i=r.sync,o=r.writecb;"function"==typeof o?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?n.nextTick(j,e,r,t,o):j(e,r,t,o)):(r.buffered.length>r.bufferedIndex&&z(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(U,r.afterWriteTickInfo)):D(e,r,1,o))):I(e,new S)}function U({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,D(e,t,r,n)}function D(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&q(t),W(e,t)}function q(e){if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){var t;const{chunk:n,callback:i}=e.buffered[r],o=e.objectMode?1:n.length;e.length-=o,i(null!==(t=e.errored)&&void 0!==t?t:new A("write"))}const r=e[N].splice(0);for(let t=0;t<r.length;t++){var n;r[t](null!==(n=e.errored)&&void 0!==n?n:new A("end"))}C(e)}function z(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:o}=t,s=r.length-n;if(!s)return;let a=n;if(t.bufferProcessing=!0,s>1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?P:e=>{for(let t=a;t<r.length;++t)r[t].callback(e)},o=t.allNoop&&0===a?r:i(r,a);o.allBuffers=t.allBuffers,L(e,t,!0,t.length,o,"",n),C(t)}else{do{const{chunk:n,encoding:i,callback:s}=r[a];r[a++]=null,L(e,t,!1,o?1:n.length,n,i,s)}while(a<r.length&&!t.writing);a===r.length?C(t):a>256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function $(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function W(e,t,r){$(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)I(e,null!=i?i:S());else if(r=!0,t.pendingcb--,i){const r=t[N].splice(0);for(let e=0;e<r.length;e++)r[e](i);I(e,i,t.sync)}else $(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,n.nextTick(H,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}(e,t)))}(e,t),0===t.pendingcb&&(r?(t.pendingcb++,n.nextTick(((e,t)=>{$(t)?H(e,t):t.pendingcb--}),e,t)):$(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[N].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}k.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},a(k.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(T,l,{__proto__:null,value:function(e){return!!s(this,e)||this===T&&e&&e._writableState instanceof k}}),T.prototype.pipe=function(){I(this,new E)},T.prototype.write=function(e,t,r){return!0===B(this,e,t,r)},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||z(this,e))},T.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=u(e)),!b.isEncoding(e))throw new x(e);return this._writableState.defaultEncoding=e,this},T.prototype._write=function(e,t,r){if(!this._writev)throw new _("_write()");this._writev([{chunk:e,encoding:t}],r)},T.prototype._writev=null,T.prototype.end=function(e,t,r){const i=this._writableState;let s;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){const r=B(this,e,t);r instanceof o&&(s=r)}return i.corked&&(i.corked=1,this.uncork()),s||(i.errored||i.ending?i.finished?s=new M("end"):i.destroyed&&(s=new A("end")):(i.ending=!0,W(this,i,!0),i.ended=!0)),"function"==typeof r&&(s||i.finished?n.nextTick(r,s):i[N].push(r)),this},c(T.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const V=g.destroy;let G;function K(){return void 0===G&&(G={}),G}T.prototype.destroy=function(e,t){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[N].length)&&n.nextTick(q,r),V.call(this,e,t),this},T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(e,t){t(e)},T.prototype[h.captureRejectionSymbol]=function(e){this.destroy(e)},T.fromWeb=function(e,t){return K().newStreamWritableFromWritableStream(e,t)},T.toWeb=function(e){return K().newWritableStreamFromStreamWritable(e)}},3045:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:f,NumberMIN_SAFE_INTEGER:u,NumberParseInt:d,ObjectPrototypeHasOwnProperty:l,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:g}=r(3670),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:m,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:S}}=r(5443),{normalizeEncoding:E}=r(3968),{isAsyncFunction:A,isArrayBufferView:M}=r(3968).types,O={},R=/^[0-7]+$/,x=y(((e,t,r=u,n=f)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),I=y(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),P=y(((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);const n=r?1:0,i=4294967295;if(e<n||e>i)throw new _(t,`>= ${n} && <= ${i}`,e)}));function N(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const k=y(((e,t,r)=>{if(!i(r,e)){const n=o(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new w(t,e,"must be one of: "+n)}}));function C(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function T(e,t,r){return null!=e&&l(e,t)?e[t]:r}const B=y(((e,t,r=null)=>{const i=T(r,"allowArray",!1),o=T(r,"allowFunction",!1);if(!T(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new v(t,"Object",e)})),L=y(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)})),j=y(((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length<r)throw new w(t,e,`must be longer than ${r}`)})),F=y(((e,t="buffer")=>{if(!M(e))throw new v(t,["Buffer","TypedArray","DataView"],e)})),U=y(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)})),D=y(((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)})),q=y(((e,t)=>{if("function"!=typeof e||A(e))throw new v(t,"Function",e)})),z=y(((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)})),$=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function W(e,t){if(void 0===e||!h($,e))throw new w(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(R,e))throw new w(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return P(e,t),e},validateArray:j,validateStringArray:function(e,t){j(e,t);for(let r=0;r<e.length;r++)N(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){j(e,t);for(let r=0;r<e.length;r++)C(e[r],`${t}[${r}]`)},validateAbortSignalArray:function(e,t){j(e,t);for(let r=0;r<e.length;r++){const n=e[r],i=`${t}[${r}]`;if(null==n)throw new v(i,"AbortSignal",n);U(n,i)}},validateBoolean:C,validateBuffer:F,validateDictionary:L,validateEncoding:function(e,t){const r=E(t),n=e.length;if("hex"===r&&n%2!=0)throw new w("encoding",t,`is invalid for data of length ${n}`)},validateFunction:D,validateInt32:I,validateInteger:x,validateNumber:function(e,t,r=void 0,n){if("number"!=typeof e)throw new v(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&c(e))throw new _(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:B,validateOneOf:k,validatePlainFunction:q,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new m(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(N(e,t),void 0===O[e]){if(void 0!==O[b(e)])throw new S(e+" (signals must use all capital letters)");throw new S(e)}},validateString:N,validateUint32:P,validateUndefined:z,validateUnion:function(e,t,r){if(!i(r,e))throw new v(t,`('${o(r,"|")}')`,e)},validateAbortSignal:U,validateLinkHeaderValue:function(e){if("string"==typeof e)return W(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const i=e[n];W(i,"hints"),r+=i,n!==t-1&&(r+=", ")}return r}throw new w("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},446:(e,t,r)=>{"use strict";const n=r(8690),i=r(359),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},5443:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(3968),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],f=/^([A-Z][a-z0-9]*)+$/,u={};function d(e,t){if(!e)throw new u.ERR_INTERNAL_ASSERTION(t)}function l(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function h(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return d(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return d(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,u[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class b extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new u.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((e,t,r)=>{d("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)d("string"==typeof e,"All expected entries have to be of type string"),c.includes(e)?o.push(e.toLowerCase()):f.test(e)?s.push(e):(d("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var u;null!==(u=r.constructor)&&void 0!==u&&u.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",((...e)=>{let t;d(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return d(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=l(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=l(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:b,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:u}},3670:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},3968:(e,t,r)=>{"use strict";const n=r(1048),{kResistStopPropagation:i,SymbolDispose:o}=r(3670),s=globalThis.AbortSignal||r(7083).AbortSignal,a=globalThis.AbortController||r(7083).AbortController,c=Object.getPrototypeOf((async function(){})).constructor,f=globalThis.Blob||n.Blob,u=void 0!==f?function(e){return e instanceof f}:function(e){return!1},d=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class l extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}e.exports={AggregateError:l,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:u,deprecate:(e,t)=>e,addAbortListener:r(46).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return d(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:s.any||function(e){if(1===e.length)return e[0];const t=new a,r=()=>t.abort();return e.forEach((e=>{d(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},8690:(e,t,r)=>{const{Buffer:n}=r(1048),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(3670),{promisify:{custom:a}}=r(3968),{streamReturningOperators:c,promiseReturningOperators:f}=r(1543),{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=r(5443),d=r(5366),{setDefaultHighWaterMark:l,getDefaultHighWaterMark:h}=r(107),{pipeline:p}=r(4846),{destroyer:b}=r(3432),g=r(862),y=r(359),m=r(4579),v=e.exports=r(9731).Stream;v.isDestroyed=m.isDestroyed,v.isDisturbed=m.isDisturbed,v.isErrored=m.isErrored,v.isReadable=m.isReadable,v.isWritable=m.isWritable,v.Readable=r(4664);for(const S of o(c)){const E=c[S];function w(...e){if(new.target)throw u();return v.Readable.from(s(E,this,e))}i(w,"name",{__proto__:null,value:E.name}),i(w,"length",{__proto__:null,value:E.length}),i(v.Readable.prototype,S,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(const A of o(f)){const M=f[A];function w(...e){if(new.target)throw u();return s(M,this,e)}i(w,"name",{__proto__:null,value:M.name}),i(w,"length",{__proto__:null,value:M.length}),i(v.Readable.prototype,A,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(5672),v.Duplex=r(8842),v.Transform=r(8102),v.PassThrough=r(7932),v.pipeline=p;const{addAbortSignal:_}=r(9363);v.addAbortSignal=_,v.finished=g,v.destroy=b,v.compose=d,v.setDefaultHighWaterMark=l,v.getDefaultHighWaterMark=h,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,a,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(g,a,{__proto__:null,enumerable:!0,get:()=>y.finished}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},359:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(3670),{isIterable:o,isNodeStream:s,isWebStream:a}=r(4579),{pipelineImpl:c}=r(4846),{finished:f}=r(862);r(8690),e.exports={finished:f,pipeline:function(...e){return new i(((t,r)=>{let i,f;const u=e[e.length-1];if(u&&"object"==typeof u&&!s(u)&&!o(u)&&!a(u)){const t=n(e);i=t.signal,f=t.end}c(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:f})}))}}},9301:(e,t,r)=>{"use strict";var n=r(5636).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=f,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=l,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},7083:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],c=o[1],f=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,c)),u=0,d=c>0?s-4:s;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],f[u++]=t>>16&255,f[u++]=t>>8&255,f[u++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[u++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[u++]=t>>8&255,f[u++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,f=n-i;a<f;a+=s)o.push(c(e,a,a+s>f?f:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},527:(e,t,r)=>{"use strict";var n=r(1048).Buffer,i=r(3330);function o(e,t){return void 0===t&&(t="utf8"),n.isBuffer(e)?a(e.toString("base64")):a(n.from(e,t).toString("base64"))}function s(e){return e=e.toString(),i.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function a(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var c=o;c.encode=o,c.decode=function(e,t){return void 0===t&&(t="utf8"),n.from(s(e),"base64").toString(t)},c.toBase64=s,c.fromBase64=a,c.toBuffer=function(e){return n.from(s(e),"base64")},t.default=c},3330:(e,t,r)=>{"use strict";var n=r(1048).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var i=t,o=4-r,s=t+o,a=n.alloc(s);for(a.write(e);o--;)a.write("=",i++);return a.toString()}},7702:(e,t,r)=>{e.exports=r(527).default,e.exports.default=e.exports},2823:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8379).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function f(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),c=t;c<a;c++){var f=e.charCodeAt(c)-48;o*=i,s=f>=49?f-49+10:f>=17?f-17+10:f,n(f>=0&&s<i,"Invalid character"),o+=s}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=c(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=c(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,u=r;u<a;u+=n)c=f(e,u,u+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var d=1;for(c=f(e,u,e.length,t),u=0;u<s;u++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var u=c>>>26,d=67108863&c,l=Math.min(f,t.length-1),h=Math.max(0,f-e.length+1);h<=l;h++){var p=f-h|0;u+=(s=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&s}r.words[f]=0|d,c=0|u}return 0!==c?r.words[f]=0|c:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?l[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var f=h[e],u=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(u).toString(e);r=(d=d.idivn(u)).isZero()?b+r:l[f-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,o,s=e.words,a=t.words,c=r.words,f=0,u=0|s[0],d=8191&u,l=u>>>13,h=0|s[1],p=8191&h,b=h>>>13,g=0|s[2],y=8191&g,m=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],E=8191&S,A=S>>>13,M=0|s[5],O=8191&M,R=M>>>13,x=0|s[6],I=8191&x,P=x>>>13,N=0|s[7],k=8191&N,C=N>>>13,T=0|s[8],B=8191&T,L=T>>>13,j=0|s[9],F=8191&j,U=j>>>13,D=0|a[0],q=8191&D,z=D>>>13,$=0|a[1],W=8191&$,H=$>>>13,V=0|a[2],G=8191&V,K=V>>>13,J=0|a[3],Y=8191&J,X=J>>>13,Z=0|a[4],Q=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,fe=ae>>>13,ue=0|a[8],de=8191&ue,le=ue>>>13,he=0|a[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(f+(n=Math.imul(d,q))|0)+((8191&(i=(i=Math.imul(d,z))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var ye=(f+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,z))+Math.imul(m,q)|0,o=Math.imul(m,z),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,H)|0;var me=(f+(n=n+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(l,G)|0))<<13)|0;f=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(_,q)|0,o=Math.imul(_,z),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0;var ve=(f+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0;var we=(f+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,z))+Math.imul(R,q)|0,o=Math.imul(R,z),n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(f+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;f=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(P,q)|0,o=Math.imul(P,z),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(f+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,se)|0)+Math.imul(l,oe)|0))<<13)|0;f=((o=o+Math.imul(l,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,z))+Math.imul(C,q)|0,o=Math.imul(C,z),n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0;var Ee=(f+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(l,ce)|0))<<13)|0;f=((o=o+Math.imul(l,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,z))+Math.imul(L,q)|0,o=Math.imul(L,z),n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(b,ce)|0,o=o+Math.imul(b,fe)|0;var Ae=(f+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;f=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,H)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,H)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,le)|0;var Me=(f+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;f=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,H))+Math.imul(U,W)|0,o=Math.imul(U,H),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,G)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,fe)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,le)|0;var Oe=(f+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;f=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,K))+Math.imul(U,G)|0,o=Math.imul(U,K),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,X)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,fe)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,le)|0;var Re=(f+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,be)|0)+Math.imul(m,pe)|0))<<13)|0;f=((o=o+Math.imul(m,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,X))+Math.imul(U,Y)|0,o=Math.imul(U,X),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,fe)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,le)|0;var xe=(f+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;f=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(U,Q)|0,o=Math.imul(U,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(P,ce)|0,o=o+Math.imul(P,fe)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,le)|0;var Ie=(f+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(A,pe)|0))<<13)|0;f=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,se)|0,n=n+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,fe)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0;var Pe=(f+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,be)|0)+Math.imul(R,pe)|0))<<13)|0;f=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,oe),i=(i=Math.imul(F,se))+Math.imul(U,oe)|0,o=Math.imul(U,se),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,fe)|0,n=n+Math.imul(k,de)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,le)|0;var Ne=(f+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(P,pe)|0))<<13)|0;f=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(F,ce),i=(i=Math.imul(F,fe))+Math.imul(U,ce)|0,o=Math.imul(U,fe),n=n+Math.imul(B,de)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,le)|0;var ke=(f+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(C,pe)|0))<<13)|0;f=((o=o+Math.imul(C,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(F,de),i=(i=Math.imul(F,le))+Math.imul(U,de)|0,o=Math.imul(U,le);var Ce=(f+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(L,pe)|0))<<13)|0;f=((o=o+Math.imul(L,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Te=(f+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,be))+Math.imul(U,pe)|0))<<13)|0;return f=((o=Math.imul(U,be))+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,c[0]=ge,c[1]=ye,c[2]=me,c[3]=ve,c[4]=we,c[5]=_e,c[6]=Se,c[7]=Ee,c[8]=Ae,c[9]=Me,c[10]=Oe,c[11]=Re,c[12]=xe,c[13]=Ie,c[14]=Pe,c[15]=Ne,c[16]=ke,c[17]=Ce,c[18]=Te,0!==f&&(c[19]=f,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,c=Math.min(o,t.length-1),f=Math.max(0,o-e.length+1);f<=c;f++){var u=o-f,d=(0|e.words[u])*(0|t.words[f]),l=67108863&d;a=67108863&(l=l+a|0),i+=(s=(s=s+(d/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=b),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?b(this,e,t):r<1024?y(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var d=c,l=f,h=0;h<s;h++){var p=r[u+h],b=n[u+h],g=r[u+h+s],y=n[u+h+s],m=d*g-l*y;y=d*y+l*g,g=m,r[u+h]=p+g,n[u+h]=b+y,r[u+h+s]=p-g,n[u+h+s]=b-y,h!==a&&(m=c*d-f*l,l=c*l+f*d,d=m)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),c=new Array(n),f=new Array(n),u=new Array(n),d=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,f,n),this.transform(s,o,a,c,n,i),this.transform(f,o,u,d,n,i);for(var h=0;h<n;h++){var p=a[h]*u[h]-c[h]*d[h];c[h]=a[h]*d[h]+c[h]*u[h],a[h]=p}return this.conjugate(a,c,n),this.transform(a,c,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,c=(0|this.words[t])-a<<r;this.words[t]=c|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var f=0;f<s;f++)c.words[f]=this.words[f];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var u=0;for(f=this.length-1;f>=0&&(0!==u||f>=i);f--){var d=0|this.words[f];this.words[f]=u<<26-o|d>>>o,u=d&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[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},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var c=(0|e.words[i])*t;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var u=n.clone()._ishlnsubmul(i,1,c);0===u.negative&&(n=u,a&&(a.words[c]=1));for(var d=c-1;d>=0;d--){var l=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);a&&(a.words[d]=l)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),f=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++f;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;!(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;!(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(d)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(c)):(r.isub(t),a.isub(i),c.isub(s))}return{a,b:c,gcd:r.iushln(f)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,u=1;!(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var d=0,l=1;!(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new O(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function R(e){O.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(S,_),S.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,_),i(A,_),i(M,_),M.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new E;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return w[e]=t,t},O.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},O.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},O.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},O.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},O.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},O.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},O.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},O.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},O.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},O.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},O.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},O.prototype.isqr=function(e){return this.imul(e,e.clone())},O.prototype.sqr=function(e){return this.mul(e,e)},O.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,f).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),l=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=s;0!==h.cmp(a);){for(var b=h,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g<p);var y=this.pow(d,new o(1).iushln(p-g-1));l=l.redMul(y),d=y.redSqr(),h=h.redMul(d),p=g}return l},O.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},O.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var f=t.words[n],u=c-1;u>=0;u--){var d=f>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4==++a||0===n&&0===u)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},O.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},O.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new R(e)},i(R,O),R.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},R.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},R.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},R.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},R.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},3643:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),s=Math.max(i,o),a=0,c=e.map([t,r],(function(t){var r=s-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=o.length;t<r;t+=1)a();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(t.prototype,null),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=c(r(92)),i=c(r(93)),o=c(r(94)),s=c(r(95)),a=c(r(17));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(r[t]=s,n+=1)})),n>0){var s=Object.keys(r),c=a.default.find(s,(function(e){return t.isOS(e)}));if(c){var f=this.satisfies(r[c]);if(void 0!==f)return f}var u=a.default.find(s,(function(e){return t.isPlatform(e)}));if(u){var d=this.satisfies(r[u]);if(void 0!==d)return d}}if(o>0){var l=Object.keys(i),h=a.default.find(l,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=f,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},7048:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.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),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(3553);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},1048:(e,t,r)=>{"use strict";const n=r(7991),i=r(9318),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(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 d(e){return u(e),a(e<0?0:0|p(e))}function l(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function b(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(f(e,o)===f(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(f(e,o+n)!==f(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Y(n))return s;e[r+s]=n}return s}function _(e,t,r,n){return K(V(t,e.length-r),e,r,n)}function S(e,t,r,n){return K(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return K(G(t),e,r,n)}function A(e,t,r,n){return K(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function M(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}(n)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return f(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(J(t,Uint8Array))i+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=b,c.prototype._isBuffer=!0,c.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;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.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===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),f=this.slice(n,i),u=e.slice(t,r);for(let e=0;e<a;++e)if(f[e]!==u[e]){o=f[e],s=u[e];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function x(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=X[e[n]];return i}function N(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function k(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function T(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function B(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function L(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Z((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=Z((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Z((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Z((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(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},c.prototype.writeBigUInt64LE=Z((function(e,t=0){return T(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Z((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(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},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(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},c.prototype.writeBigInt64LE=Z((function(e,t=0){return T(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Z((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=c.isBuffer(e)?e:c.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const U={};function D(e,t,r){U[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){$(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,i,o)}function $(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw $(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},9818:(e,t,r)=>{"use strict";var n=r(528),i=r(8498),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},8498:(e,t,r)=>{"use strict";var n=r(9138),i=r(528),o=r(6108),s=r(3468),a=i("%Function.prototype.apply%"),c=i("%Function.prototype.call%"),f=i("%Reflect.apply%",!0)||n.call(c,a),u=r(4940),d=i("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new s("a function is required");var t=f(n,c,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var l=function(){return f(n,a,arguments)};u?u(e.exports,"apply",{value:l}):e.exports.apply=l},686:(e,t,r)=>{"use strict";var n=r(4940),i=r(5731),o=r(3468),s=r(9336);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new o("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!s&&s(e,t);if(n)n(e,t,{configurable:null===f&&d?d.configurable:!f,enumerable:null===a&&d?d.enumerable:!a,value:r,writable:null===c&&d?d.writable:!c});else{if(!u&&(a||c||f))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},3360:(e,t,r)=>{"use strict";var n=t;n.version=r(183).rE,n.utils=r(1874),n.rand=r(7048),n.curve=r(7131),n.curves=r(6443),n.ec=r(5064),n.eddsa=r(4807)},5174:(e,t,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.getNAF,s=i.getJSF,a=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,c,f=[];for(s=0;s<n.length;s+=r.step){c=0;for(var u=s+r.step-1;u>=s;u--)c=(c<<1)+n[u];f.push(c)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(s=0;s<f.length;s++)(c=f[s])===h?l=l.mixedAdd(r.points[s]):c===-h&&(l=l.mixedAdd(r.points[s].neg()));d=d.add(l)}return d.toP()},c.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(t,r,this._bitLength),c=this.jpoint(null,null,null),f=s.length-1;f>=0;f--){for(var u=0;f>=0&&0===s[f];f--)u++;if(f>=0&&u++,c=c.dblp(u),f<0)break;var d=s[f];a(0!==d),c="affine"===e.type?d>0?c.mixedAdd(i[d-1>>1]):c.mixedAdd(i[-d-1>>1].neg()):d>0?c.add(i[d-1>>1]):c.add(i[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){var a,c,f,u=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(a=0;a<n;a++){var p=(f=t[a])._getNAFPoints(e);u[a]=p.wnd,d[a]=p.points}for(a=n-1;a>=1;a-=2){var b=a-1,g=a;if(1===u[b]&&1===u[g]){var y=[t[b],null,null,t[g]];0===t[b].y.cmp(t[g].y)?(y[1]=t[b].add(t[g]),y[2]=t[b].toJ().mixedAdd(t[g].neg())):0===t[b].y.cmp(t[g].y.redNeg())?(y[1]=t[b].toJ().mixedAdd(t[g]),y[2]=t[b].add(t[g].neg())):(y[1]=t[b].toJ().mixedAdd(t[g]),y[2]=t[b].toJ().mixedAdd(t[g].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[b],r[g]);for(h=Math.max(v[0].length,h),l[b]=new Array(h),l[g]=new Array(h),c=0;c<h;c++){var w=0|v[0][c],_=0|v[1][c];l[b][c]=m[3*(w+1)+(_+1)],l[g][c]=0,d[b]=y}}else l[b]=o(r[b],u[b],this._bitLength),l[g]=o(r[g],u[g],this._bitLength),h=Math.max(l[b].length,h),h=Math.max(l[g].length,h)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(a=h;a>=0;a--){for(var A=0;a>=0;){var M=!0;for(c=0;c<n;c++)E[c]=0|l[c][a],0!==E[c]&&(M=!1);if(!M)break;A++,a--}if(a>=0&&A++,S=S.dblp(A),a<0)break;for(c=0;c<n;c++){var O=E[c];0!==O&&(O>0?f=d[c][O-1>>1]:O<0&&(f=d[c][-O-1>>1].neg()),S="affine"===f.type?S.mixedAdd(f):S.add(f))}}for(a=0;a<n;a++)d[a]=null;return i?S:S.toP()},c.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(e){return this.encode(e,!0)},f.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},f.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},f.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},f.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},f.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},1547:(e,t,r)=>{"use strict";var n=r(1874),i=r(2823),o=r(5615),s=r(5174),a=n.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new 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),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function f(e,t,r,n,o){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,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()))))}o(c,s),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var c=a.fromRed().isOdd();return(t&&!c||!t&&c)&&(a=a.redNeg()),this.point(e,a)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(f,s.BasePoint),c.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},c.prototype.point=function(e,t,r,n){return new f(this,e,t,r,n)},f.fromJSON=function(e,t){return new f(e,t[0],t[1],t[2])},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),c=i.redMul(s),f=o.redMul(a),u=i.redMul(a),d=s.redMul(o);return this.curve.point(c,f,d,u)},f.prototype._projDbl=function(){var e,t,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var f=(n=this.curve._mulA(a)).redAdd(c);this.zOne?(e=s.redSub(a).redSub(c).redMul(f.redSub(this.curve.two)),t=f.redMul(n.redSub(c)),r=f.redSqr().redSub(f).redSub(f)):(i=this.z.redSqr(),o=f.redSub(i).redISub(i),e=s.redSub(a).redISub(c).redMul(o),t=f.redMul(n.redSub(c)),r=f.redMul(o))}else n=a.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),c=r.redAdd(t),f=o.redMul(s),u=a.redMul(c),d=o.redMul(c),l=s.redMul(a);return this.curve.point(f,u,l,d)},f.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),c=i.redSub(a),f=i.redAdd(a),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),d=n.redMul(c).redMul(u);return this.curve.twisted?(t=n.redMul(f).redMul(s.redSub(this.curve._mulA(o))),r=c.redMul(f)):(t=n.redMul(f).redMul(s.redSub(o)),r=this.curve._mulC(c).redMul(f)),this.curve.point(d,t,r)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},f.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},f.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},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},7131:(e,t,r)=>{"use strict";var n=t;n.base=r(5174),n.short=r(277),n.mont=r(3245),n.edwards=r(1547)},3245:(e,t,r)=>{"use strict";var n=r(2823),i=r(5615),o=r(5174),s=r(1874);function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new c(this,e,t)},a.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=i.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),c=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,c)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},277:(e,t,r)=>{"use strict";var n=r(1874),i=r(2823),o=r(5615),s=r(5174),a=n.assert;function c(e){s.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 f(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(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(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,s),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,c,f,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new i(1),b=new i(0),g=new i(0),y=new i(1),m=0;0!==l.cmpn(0);){var v=h.div(l);f=h.sub(v.mul(l)),u=g.sub(v.mul(p));var w=y.sub(v.mul(b));if(!n&&f.cmp(d)<0)t=c.neg(),r=p,n=f.neg(),o=u;else if(n&&2==++m)break;c=f,h=l,l=f,g=p,p=u,y=b,b=w}s=f.neg(),a=u;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),c=i.mul(r.b),f=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:c.add(f).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],c=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),n[2*o]=a,n[2*o+1]=c,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var f=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return f},o(f,s.BasePoint),c.prototype.point=function(e,t,r){return new f(this,e,t,r)},c.prototype.pointFromJSON=function(e,t){return f.fromJSON(this,e,t)},f.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.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)},f.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,s.BasePoint),c.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),c=o.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),d=n.redMul(f),l=c.redSqr().redIAdd(u).redISub(d).redISub(d),h=c.redMul(d.redISub(l)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(l,h,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),u=r.redMul(c),d=a.redSqr().redIAdd(f).redISub(u).redISub(u),l=a.redMul(u.redISub(d)).redISub(i.redMul(f)),h=this.z.redMul(s);return this.curve.jpoint(d,l,h)},u.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 r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,c=a.redSqr().redSqr(),f=s.redAdd(s);for(t=0;t<e;t++){var u=o.redSqr(),d=f.redSqr(),l=d.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(c)),p=o.redMul(d),b=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(b),y=h.redMul(g);y=y.redIAdd(y).redISub(l);var m=f.redMul(a);t+1<e&&(c=c.redMul(l)),o=b,a=m,f=y}return this.curve.jpoint(o,f.redMul(i),a)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),c=a.redSqr().redISub(s).redISub(s),f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),e=c,t=a.redMul(s.redISub(c)).redISub(f),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),l=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(u).redISub(l);h=h.redIAdd(h);var p=u.redAdd(u).redIAdd(u),b=p.redSqr(),g=l.redIAdd(l);g=(g=g.redIAdd(g)).redIAdd(g),e=b.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},u.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);e=c;var f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),t=a.redMul(s.redISub(c)).redISub(f),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),l=this.x.redMul(d),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var p=l.redIAdd(l),b=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t),f=(c=c.redIAdd(c)).redMul(s),u=a.redSqr().redISub(f.redAdd(f)),d=f.redISub(u),l=s.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=a.redMul(d).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(u,h,p)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var f=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(c),u=t.redMul(f);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(a).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var l=this.y.redMul(f.redMul(c.redISub(f)).redISub(s.redMul(a)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(d,l,h)},u.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},6443:(e,t,r)=>{"use strict";var n,i=t,o=r(9499),s=r(7131),a=r(1874).assert;function c(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(3986)}catch(e){n=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},5064:(e,t,r)=>{"use strict";var n=r(2823),i=r(4742),o=r(1874),s=r(6443),a=r(7048),c=o.assert,f=r(7531),u=r(7782);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.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=d,d.prototype.keyPair=function(e){return new f(this,e)},d.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),c=e.toArray("be",s),f=new i({hash:this.hash,entropy:a,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),l=0;;l++){var h=o.k?o.k(l):new n(f.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var y=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),m^=1),new u({r:g,s:y,recoveryParam:m})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,c=s.invm(this.n),f=c.mul(e).umod(this.n),d=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),d)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,r.getPublic(),d)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){c((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,s=new n(e),a=t.r,f=t.s,d=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),d):this.curve.pointFromX(a,d);var h=t.r.invm(o),p=o.sub(s).mul(h).umod(o),b=f.mul(h).umod(o);return this.g.mulAdd(p,a,b)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},7531:(e,t,r)=>{"use strict";var n=r(2823),i=r(1874).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){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)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},7782:(e,t,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=t.place;o<n;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function f(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function u(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=c(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=c(e,r);if(!1===s)return!1;var f=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var u=c(e,r);if(!1===u)return!1;if(e.length!==u+r.place)return!1;var d=e.slice(r.place,u+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(f),this.s=new n(d),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var o=n.concat(r),s=[48];return u(s,o.length),s=s.concat(o),i.encode(s,e)}},4807:(e,t,r)=>{"use strict";var n=r(9499),i=r(6443),o=r(1874),s=o.assert,a=o.parseBytes,c=r(4672),f=r(8401);function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),c=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},u.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},u.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},u.prototype.makeSignature=function(e){return e instanceof f?e:new f(this,e)},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},u.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=!!(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(e){return o.intFromLE(e)},u.prototype.isPoint=function(e){return e instanceof this.pointClass}},4672:(e,t,r)=>{"use strict";var n=r(1874),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=a},8401:(e,t,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},3986: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"]]}}},1874:(e,t,r)=>{"use strict";var n=t,i=r(2823),o=r(7784),s=r(9042);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(e,t,r){var n,i=new Array(Math.max(e.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<t+1,s=e.clone();for(n=0;n<i.length;n++){var a,c=s.andln(o-1);s.isOdd()?(a=c>(o>>1)-1?(o>>1)-c:c,s.isubn(a)):a=0,i[n]=a,s.iushrn(1)}return i},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,c=e.andln(3)+i&3,f=t.andln(3)+o&3;3===c&&(c=-1),3===f&&(f=-1),s=1&c?3!=(n=e.andln(7)+i&7)&&5!==n||2!==f?c:-c:0,r[0].push(s),a=1&f?3!=(n=t.andln(7)+o&7)&&5!==n||2!==c?f:-f:0,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},1822:(e,t,r)=>{var n=r(9907),i=r(3358),o=function(){},s=function(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=i(r||o);var a=e._writableState,c=e._readableState,f=t.readable||!1!==t.readable&&e.readable,u=t.writable||!1!==t.writable&&e.writable,d=!1,l=function(){e.writable||h()},h=function(){u=!1,f||r.call(e)},p=function(){f=!1,u||r.call(e)},b=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){r.call(e,t)},y=function(){n.nextTick(m)},m=function(){if(!d)return(!f||c&&c.ended&&!c.destroyed)&&(!u||a&&a.ended&&!a.destroyed)?void 0:r.call(e,new Error("premature close"))},v=function(){e.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",h),e.on("abort",y),e.req?v():e.on("request",v)):u&&!a&&(e.on("end",l),e.on("close",l)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",b),e.on("end",p),e.on("finish",h),!1!==t.error&&e.on("error",g),e.on("close",y),function(){d=!0,e.removeListener("complete",h),e.removeListener("abort",y),e.removeListener("request",v),e.req&&e.req.removeListener("finish",h),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",h),e.removeListener("exit",b),e.removeListener("end",p),e.removeListener("error",g),e.removeListener("close",y)}};e.exports=s},4940:(e,t,r)=>{"use strict";var n=r(528)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},9110:e=>{"use strict";e.exports=EvalError},9838:e=>{"use strict";e.exports=Error},1155:e=>{"use strict";e.exports=RangeError},4943:e=>{"use strict";e.exports=ReferenceError},5731:e=>{"use strict";e.exports=SyntaxError},3468:e=>{"use strict";e.exports=TypeError},2140:e=>{"use strict";e.exports=URIError},46:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.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 o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,o,s,f;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,f=u,console&&console.warn&&console.warn(f)}return e}function u(){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 d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function l(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var f=c.length,u=p(c,f);for(r=0;r<f;++r)n(u[r],this,t)}return!0},o.prototype.addListener=function(e,t){return f(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return f(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return l(this,e,!0)},o.prototype.rawListeners=function(e){return l(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},282:e=>{e.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=o()),c(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,l(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var f=n.pop();4===f.length?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return a}function a(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:e}),n.push([o,r,t,s])):i.push([t,r,e]):(o[r]=e,n.push([o,r,t]))}function c(e,n,i,o,s,f,u){var d;if(f+=1,"object"==typeof e&&null!==e){for(d=0;d<o.length;d++)if(o[d]===e)return void a(r,e,n,s);if(void 0!==u.depthLimit&&f>u.depthLimit)return void a(t,e,n,s);if(void 0!==u.edgesLimit&&i+1>u.edgesLimit)return void a(t,e,n,s);if(o.push(e),Array.isArray(e))for(d=0;d<e.length;d++)c(e[d],d,d,o,e,f,u);else{var l=Object.keys(e);for(d=0;d<l.length;d++){var h=l[d];c(e[h],h,d,o,e,f,u)}}o.pop()}}function f(e,t){return e<t?-1:e>t?1:0}function u(e,t,r,s){void 0===s&&(s=o());var a,c=d(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(c,t,r):JSON.stringify(c,l(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var f=n.pop();4===f.length?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return a}function d(e,i,o,s,c,u,l){var h;if(u+=1,"object"==typeof e&&null!==e){for(h=0;h<s.length;h++)if(s[h]===e)return void a(r,e,i,c);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&u>l.depthLimit)return void a(t,e,i,c);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void a(t,e,i,c);if(s.push(e),Array.isArray(e))for(h=0;h<e.length;h++)d(e[h],h,h,s,e,u,l);else{var p={},b=Object.keys(e).sort(f);for(h=0;h<b.length;h++){var g=b[h];d(e[g],g,h,s,e,u,l),p[g]=e[g]}if(void 0===c)return p;n.push([c,i,e]),c[i]=p}s.pop()}}function l(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===t&&o[0]===r){r=o[2],i.splice(n,1);break}}return e.call(this,t,r)}}},8794:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r};e.exports=function(e){var i=this;if("function"!=typeof i||"[object Function]"!==t.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,s=function(e,t){for(var r=[],n=1,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r}(arguments),a=r(0,i.length-s.length),c=[],f=0;f<a;f++)c[f]="$"+f;if(o=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=",");return r}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var t=i.apply(this,n(s,arguments));return Object(t)===t?t:this}return i.apply(e,n(s,arguments))})),i.prototype){var u=function(){};u.prototype=i.prototype,o.prototype=new u,u.prototype=null}return o}},9138:(e,t,r)=>{"use strict";var n=r(8794);e.exports=Function.prototype.bind||n},528:(e,t,r)=>{"use strict";var n,i=r(9838),o=r(9110),s=r(1155),a=r(4943),c=r(5731),f=r(3468),u=r(2140),d=Function,l=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var p=function(){throw new f},b=h?function(){try{return p}catch(e){try{return h(arguments,"callee").get}catch(e){return p}}}():p,g=r(3558)(),y=r(6869)(),m=Object.getPrototypeOf||(y?function(e){return e.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&m?m(Uint8Array):n,_={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&m?m([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&m?m(m([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&m?m((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&m?m((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&m?m(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":b,"%TypedArray%":w,"%TypeError%":f,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(m)try{null.error}catch(e){var S=m(m(e));_["%Error.prototype%"]=S}var E=function e(t){var r;if("%AsyncFunction%"===t)r=l("async function () {}");else if("%GeneratorFunction%"===t)r=l("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=l("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&m&&(r=m(i.prototype))}return _[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(9138),O=r(8554),R=M.call(Function.call,Array.prototype.concat),x=M.call(Function.apply,Array.prototype.splice),I=M.call(Function.call,String.prototype.replace),P=M.call(Function.call,String.prototype.slice),N=M.call(Function.call,RegExp.prototype.exec),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,T=function(e,t){var r,n=e;if(O(A,n)&&(n="%"+(r=A[n])[0]+"%"),O(_,n)){var i=_[n];if(i===v&&(i=E(n)),void 0===i&&!t)throw new f("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new f('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=P(e,0,1),r=P(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return I(e,k,(function(e,t,r,i){n[n.length]=r?I(i,C,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=T("%"+n+"%",t),o=i.name,s=i.value,a=!1,u=i.alias;u&&(n=u[0],x(r,R([0,1],u)));for(var d=1,l=!0;d<r.length;d+=1){var p=r[d],b=P(p,0,1),g=P(p,-1);if(('"'===b||"'"===b||"`"===b||'"'===g||"'"===g||"`"===g)&&b!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==p&&l||(a=!0),O(_,o="%"+(n+="."+p)+"%"))s=_[o];else if(null!=s){if(!(p in s)){if(!t)throw new f("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&d+1>=r.length){var y=h(s,p);s=(l=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[p]}else l=O(s,p),s=s[p];l&&!a&&(_[o]=s)}}return s}},9336:(e,t,r)=>{"use strict";var n=r(528)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},7239:(e,t,r)=>{"use strict";var n=r(4940),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},6869:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},3558:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(2908);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},2908:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9499:(e,t,r)=>{var n=t;n.utils=r(461),n.common=r(2191),n.sha=r(5746),n.ripemd=r(4169),n.hmac=r(1825),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},2191:(e,t,r)=>{"use strict";var n=r(461),i=r(7784);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},1825:(e,t,r)=>{"use strict";var n=r(461),i=r(7784);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},4169:(e,t,r)=>{"use strict";var n=r(461),i=r(2191),o=n.rotl32,s=n.sum32,a=n.sum32_3,c=n.sum32_4,f=i.BlockHash;function u(){if(!(this instanceof u))return new u;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,f),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],f=this.h[3],u=this.h[4],m=r,v=n,w=i,_=f,S=u,E=0;E<80;E++){var A=s(o(c(r,d(E,n,i,f),e[p[E]+t],l(E)),g[E]),u);r=u,u=f,f=o(i,10),i=n,n=A,A=s(o(c(m,d(79-E,v,w,_),e[b[E]+t],h(E)),y[E]),S),m=S,S=_,_=o(w,10),w=v,v=A}A=a(this.h[1],i,_),this.h[1]=a(this.h[2],f,S),this.h[2]=a(this.h[3],u,m),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=A},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],b=[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]},5746:(e,t,r)=>{"use strict";t.sha1=r(2986),t.sha224=r(5393),t.sha256=r(536),t.sha384=r(2348),t.sha512=r(2157)},2986:(e,t,r)=>{"use strict";var n=r(461),i=r(2191),o=r(600),s=n.rotl32,a=n.sum32,c=n.sum32_5,f=o.ft_1,u=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,u),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],l=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=c(s(i,5),f(p,o,u,l),h,r[n],d[p]);h=l,l=u,u=s(o,30),o=i,i=b}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],u),this.h[3]=a(this.h[3],l),this.h[4]=a(this.h[4],h)},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},5393:(e,t,r)=>{"use strict";var n=r(461),i=r(536);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},536:(e,t,r)=>{"use strict";var n=r(461),i=r(2191),o=r(600),s=r(7784),a=n.sum32,c=n.sum32_4,f=n.sum32_5,u=o.ch32,d=o.maj32,l=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.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 m(){if(!(this instanceof m))return new m;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(m,g),e.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=c(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],m=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var S=f(_,h(m),u(m,v,w),this.k[n],r[n]),E=a(l(i),d(i,o,g));_=w,w=v,v=m,m=a(y,S),y=g,g=o,o=i,i=a(S,E)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],m),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},m.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},2348:(e,t,r)=>{"use strict";var n=r(461),i=r(2157);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},2157:(e,t,r)=>{"use strict";var n=r(461),i=r(2191),o=r(7784),s=n.rotr64_hi,a=n.rotr64_lo,c=n.shr64_hi,f=n.shr64_lo,u=n.sum64,d=n.sum64_hi,l=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,m=[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=m,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function R(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,1)^a(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,19)^a(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}n.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 r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(g=r[n-4],y=r[n-3],m=void 0,(m=s(g,y,19)^s(y,g,29)^c(g,y,6))<0&&(m+=4294967296),m),o=I(r[n-4],r[n-3]),a=r[n-14],f=r[n-13],u=R(r[n-30],r[n-29]),d=x(r[n-30],r[n-29]),l=r[n-32],b=r[n-31];r[n]=h(i,o,a,f,u,d,l,b),r[n+1]=p(i,o,a,f,u,d,l,b)}var g,y,m},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,a=this.W,c=this.h[0],f=this.h[1],h=this.h[2],p=this.h[3],y=this.h[4],m=this.h[5],v=this.h[6],R=this.h[7],x=this.h[8],I=this.h[9],P=this.h[10],N=this.h[11],k=this.h[12],C=this.h[13],T=this.h[14],B=this.h[15];o(this.k.length===a.length);for(var L=0;L<a.length;L+=2){var j=T,F=B,U=(i=void 0,(i=s(r=x,n=I,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),D=O(x,I),q=w(x,0,P,0,k),z=_(0,I,0,N,0,C),$=this.k[L],W=this.k[L+1],H=a[L],V=a[L+1],G=b(j,F,U,D,q,z,$,W,H,V),K=g(j,F,U,D,q,z,$,W,H,V);j=A(c,f),F=M(c,f),U=S(c,0,h,0,y),D=E(0,f,0,p,0,m);var J=d(j,F,U,D),Y=l(j,F,U,D);T=k,B=C,k=P,C=N,P=x,N=I,x=d(v,R,G,K),I=l(R,R,G,K),v=y,R=m,y=h,m=p,h=c,p=f,c=d(G,K,J,Y),f=l(G,K,J,Y)}u(this.h,0,c,f),u(this.h,2,h,p),u(this.h,4,y,m),u(this.h,6,v,R),u(this.h,8,x,I),u(this.h,10,P,N),u(this.h,12,k,C),u(this.h,14,T,B)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},600:(e,t,r)=>{"use strict";var n=r(461).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},461:(e,t,r)=>{"use strict";var n=r(7784),i=r(5615);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function c(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 r=[];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<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=s(i)),r+=c(i.toString(16))}return r},t.zero2=a,t.zero8=c,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var s=new Array(o/4),a=0,c=t;a<s.length;a++,c+=4){var f;f="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],s[a]=f>>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o<n?1:0)+r+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var c=0,f=t;return c+=(f=f+n>>>0)<t?1:0,c+=(f=f+o>>>0)<o?1:0,e+r+i+s+(c+=(f=f+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,c,f){var u=0,d=t;return u+=(d=d+n>>>0)<t?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+a>>>0)<a?1:0,e+r+i+s+c+(u+=(d=d+f>>>0)<f?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,c,f){return t+n+o+a+f>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},8554:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(9138);e.exports=o.call(n,i)},4742:(e,t,r)=>{"use strict";var n=r(9499),i=r(9042),o=r(7784);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,e);return this._update(r),this._reseed++,i.encode(s,t)}},9318:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,f=c>>1,u=-7,d=r?i-1:0,l=r?-1:1,h=e[t+d];for(d+=l,o=h&(1<<-u)-1,h>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=l,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+d],d+=l,u-=8);if(0===o)o=1-f;else{if(o===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=f}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,f=8*o-i-1,u=(1<<f)-1,d=u>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?l/c:l*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*c-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[r+h]=255&s,h+=p,s/=256,f-=8);e[r+h-p]|=128*b}},5615: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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},6512:e=>{e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},5172:(e,t,r)=>{"use strict";var n=("undefined"!=typeof JSON?JSON:r(6998)).stringify,i=r(9549),o=r(9228),s=r(8498),a=r(9818),c=a("Array.prototype.join"),f=a("Array.prototype.push"),u=function(e,t){for(var r="",n=0;n<e;n+=1)r+=t;return r},d=function(e,t,r){return r};e.exports=function(e){var t=arguments.length>1?arguments[1]:void 0,r=t&&t.space||"";"number"==typeof r&&(r=u(r," "));var a=!!t&&"boolean"==typeof t.cycles&&t.cycles,l=t&&t.replacer?s(t.replacer):d,h="function"==typeof t?t:t&&t.cmp,p=h&&function(e){var t=h.length>2&&function(t){return e[t]};return function(r,n){return h({key:r,value:e[r]},{key:n,value:e[n]},t?{__proto__:null,get:t}:void 0)}},b=[];return function e(t,s,d,h){var g=r?"\n"+u(h,r):"",y=r?": ":":";if(d&&d.toJSON&&"function"==typeof d.toJSON&&(d=d.toJSON()),void 0!==(d=l(t,s,d))){if("object"!=typeof d||null===d)return n(d);if(i(d)){for(var m=[],v=0;v<d.length;v++){var w=e(d,v,d[v],h+1)||n(null);f(m,g+r+w)}return"["+c(m,",")+g+"]"}if(-1!==b.indexOf(d)){if(a)return n("__cycle__");throw new TypeError("Converting circular structure to JSON")}f(b,d);var _=o(d).sort(p&&p(d));for(m=[],v=0;v<_.length;v++){var S=e(d,s=_[v],d[s],h+1);if(S){var E=n(s)+y+S;f(m,g+r+E)}}return b.splice(b.indexOf(d),1),"{"+c(m,",")+g+"}"}}({"":e},"",e,0)}},9549:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},6998:(e,t,r)=>{"use strict";t.parse=r(6921),t.stringify=r(9191)},6921:e=>{"use strict";var t,r,n,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function o(e){throw{name:"SyntaxError",message:e,at:t,text:n}}function s(e){return e&&e!==r&&o("Expected '"+e+"' instead of '"+r+"'"),r=n.charAt(t),t+=1,r}function a(){var e,t="";for("-"===r&&(t="-",s("-"));r>="0"&&r<="9";)t+=r,s();if("."===r)for(t+=".";s()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,s(),"-"!==r&&"+"!==r||(t+=r,s());r>="0"&&r<="9";)t+=r,s();return e=Number(t),isFinite(e)||o("Bad number"),e}function c(){var e,t,n,a="";if('"'===r)for(;s();){if('"'===r)return s(),a;if("\\"===r)if(s(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(s(),16),isFinite(e));t+=1)n=16*n+e;a+=String.fromCharCode(n)}else{if("string"!=typeof i[r])break;a+=i[r]}else a+=r}o("Bad string")}function f(){for(;r&&r<=" ";)s()}function u(){switch(f(),r){case"{":return function(){var e,t={};if("{"===r){if(s("{"),f(),"}"===r)return s("}"),t;for(;r;){if(e=c(),f(),s(":"),Object.prototype.hasOwnProperty.call(t,e)&&o('Duplicate key "'+e+'"'),t[e]=u(),f(),"}"===r)return s("}"),t;s(","),f()}}o("Bad object")}();case"[":return function(){var e=[];if("["===r){if(s("["),f(),"]"===r)return s("]"),e;for(;r;){if(e.push(u()),f(),"]"===r)return s("]"),e;s(","),f()}}o("Bad array")}();case'"':return c();case"-":return a();default:return r>="0"&&r<="9"?a():function(){switch(r){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null;default:o("Unexpected '"+r+"'")}}()}}e.exports=function(e,i){var s;return n=e,t=0,r=" ",s=u(),f(),r&&o("Syntax error"),"function"==typeof i?function e(t,r){var n,o,s=t[r];if(s&&"object"==typeof s)for(n in u)Object.prototype.hasOwnProperty.call(s,n)&&(void 0===(o=e(s,n))?delete s[n]:s[n]=o);return i.call(t,r,s)}({"":s},""):s}},9191:e=>{"use strict";var t,r,n,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=o[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function a(e,i){var o,c,f,u,d,l=t,h=i[e];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(e)),"function"==typeof n&&(h=n.call(i,e,h)),typeof h){case"string":return s(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(t+=r,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(u=h.length,o=0;o<u;o+=1)d[o]=a(o,h)||"null";return f=0===d.length?"[]":t?"[\n"+t+d.join(",\n"+t)+"\n"+l+"]":"["+d.join(",")+"]",t=l,f}if(n&&"object"==typeof n)for(u=n.length,o=0;o<u;o+=1)"string"==typeof(c=n[o])&&(f=a(c,h))&&d.push(s(c)+(t?": ":":")+f);else for(c in h)Object.prototype.hasOwnProperty.call(h,c)&&(f=a(c,h))&&d.push(s(c)+(t?": ":":")+f);return f=0===d.length?"{}":t?"{\n"+t+d.join(",\n"+t)+"\n"+l+"}":"{"+d.join(",")+"}",t=l,f}}e.exports=function(e,i,o){var s;if(t="",r="","number"==typeof o)for(s=0;s<o;s+=1)r+=" ";else"string"==typeof o&&(r=o);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return a("",{"":e})}},8290:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Boolean]",a="[object Date]",c="[object Function]",f="[object GeneratorFunction]",u="[object Map]",d="[object Number]",l="[object Object]",h="[object Promise]",p="[object RegExp]",b="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",_="[object Float32Array]",S="[object Float64Array]",E="[object Int8Array]",A="[object Int16Array]",M="[object Int32Array]",O="[object Uint8Array]",R="[object Uint8ClampedArray]",x="[object Uint16Array]",I="[object Uint32Array]",P=/\w*$/,N=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,C={};C[o]=C["[object Array]"]=C[v]=C[w]=C[s]=C[a]=C[_]=C[S]=C[E]=C[A]=C[M]=C[u]=C[d]=C[l]=C[p]=C[b]=C[g]=C[y]=C[O]=C[R]=C[x]=C[I]=!0,C["[object Error]"]=C[c]=C[m]=!1;var T="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,B="object"==typeof self&&self&&self.Object===Object&&self,L=T||B||Function("return this")(),j=t&&!t.nodeType&&t,F=j&&e&&!e.nodeType&&e,U=F&&F.exports===j;function D(e,t){return e.set(t[0],t[1]),e}function q(e,t){return e.add(t),e}function z(e,t,r,n){var i=-1,o=e?e.length:0;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function $(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function W(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function H(e,t){return function(r){return e(t(r))}}function V(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var G,K=Array.prototype,J=Function.prototype,Y=Object.prototype,X=L["__core-js_shared__"],Z=(G=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",Q=J.toString,ee=Y.hasOwnProperty,te=Y.toString,re=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=U?L.Buffer:void 0,ie=L.Symbol,oe=L.Uint8Array,se=H(Object.getPrototypeOf,Object),ae=Object.create,ce=Y.propertyIsEnumerable,fe=K.splice,ue=Object.getOwnPropertySymbols,de=ne?ne.isBuffer:void 0,le=H(Object.keys,Object),he=Le(L,"DataView"),pe=Le(L,"Map"),be=Le(L,"Promise"),ge=Le(L,"Set"),ye=Le(L,"WeakMap"),me=Le(Object,"create"),ve=qe(he),we=qe(pe),_e=qe(be),Se=qe(ge),Ee=qe(ye),Ae=ie?ie.prototype:void 0,Me=Ae?Ae.valueOf:void 0;function Oe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Re(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ie(e){this.__data__=new Re(e)}function Pe(e,t,r){var n=e[t];ee.call(e,t)&&ze(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function Ne(e,t){for(var r=e.length;r--;)if(ze(e[r][0],t))return r;return-1}function ke(e,t,r,n,i,h,m){var N;if(n&&(N=h?n(e,i,h,m):n(e)),void 0!==N)return N;if(!Ge(e))return e;var k=$e(e);if(k){if(N=function(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&ee.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!t)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(e,N)}else{var T=Fe(e),B=T==c||T==f;if(He(e))return function(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}(e,t);if(T==l||T==o||B&&!h){if($(e))return h?e:{};if(N=function(e){return"function"!=typeof e.constructor||De(e)?{}:Ge(t=se(e))?ae(t):{};var t}(B?{}:e),!t)return function(e,t){return Te(e,je(e),t)}(e,function(e,t){return e&&Te(t,Ke(t),e)}(N,e))}else{if(!C[T])return h?e:{};N=function(e,t,r,n){var i,o=e.constructor;switch(t){case v:return Ce(e);case s:case a:return new o(+e);case w:return function(e,t){var r=t?Ce(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case _:case S:case E:case A:case M:case O:case R:case x:case I:return function(e,t){var r=t?Ce(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,n);case u:return function(e,t,r){return z(t?r(W(e),!0):W(e),D,new e.constructor)}(e,n,r);case d:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,P.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return function(e,t,r){return z(t?r(V(e),!0):V(e),q,new e.constructor)}(e,n,r);case y:return i=e,Me?Object(Me.call(i)):{}}}(e,T,ke,t)}}m||(m=new Ie);var L=m.get(e);if(L)return L;if(m.set(e,N),!k)var j=r?function(e){return function(e,t,r){var n=t(e);return $e(e)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(e))}(e,Ke,je)}(e):Ke(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r););}(j||e,(function(i,o){j&&(i=e[o=i]),Pe(N,o,ke(i,t,r,n,o,e,m))})),N}function Ce(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Te(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n?n(r[s],e[s],s,r,e):void 0;Pe(r,s,void 0===a?e[s]:a)}return r}function Be(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function Le(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ge(e)||(t=e,Z&&Z in t))&&(Ve(e)||$(e)?re:N).test(qe(e));var t}(r)?r:void 0}Oe.prototype.clear=function(){this.__data__=me?me(null):{}},Oe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Oe.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return ee.call(t,e)?t[e]:void 0},Oe.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Oe.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},Re.prototype.clear=function(){this.__data__=[]},Re.prototype.delete=function(e){var t=this.__data__,r=Ne(t,e);return!(r<0||(r==t.length-1?t.pop():fe.call(t,r,1),0))},Re.prototype.get=function(e){var t=this.__data__,r=Ne(t,e);return r<0?void 0:t[r][1]},Re.prototype.has=function(e){return Ne(this.__data__,e)>-1},Re.prototype.set=function(e,t){var r=this.__data__,n=Ne(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Oe,map:new(pe||Re),string:new Oe}},xe.prototype.delete=function(e){return Be(this,e).delete(e)},xe.prototype.get=function(e){return Be(this,e).get(e)},xe.prototype.has=function(e){return Be(this,e).has(e)},xe.prototype.set=function(e,t){return Be(this,e).set(e,t),this},Ie.prototype.clear=function(){this.__data__=new Re},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Re){var n=r.__data__;if(!pe||n.length<199)return n.push([e,t]),this;r=this.__data__=new xe(n)}return r.set(e,t),this};var je=ue?H(ue,Object):function(){return[]},Fe=function(e){return te.call(e)};function Ue(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e<t}function De(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function qe(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ze(e,t){return e===t||e!=e&&t!=t}(he&&Fe(new he(new ArrayBuffer(1)))!=w||pe&&Fe(new pe)!=u||be&&Fe(be.resolve())!=h||ge&&Fe(new ge)!=b||ye&&Fe(new ye)!=m)&&(Fe=function(e){var t=te.call(e),r=t==l?e.constructor:void 0,n=r?qe(r):void 0;if(n)switch(n){case ve:return w;case we:return u;case _e:return h;case Se:return b;case Ee:return m}return t});var $e=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!Ve(e)}var He=de||function(){return!1};function Ve(e){var t=Ge(e)?te.call(e):"";return t==c||t==f}function Ge(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ke(e){return We(e)?function(e,t){var r=$e(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,i=!!n;for(var s in e)!t&&!ee.call(e,s)||i&&("length"==s||Ue(s,n))||r.push(s);return r}(e):function(e){if(!De(e))return le(e);var t=[];for(var r in Object(e))ee.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}e.exports=function(e){return ke(e,!0,!0)}},8089:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",f="[object Null]",u="[object Object]",d="[object Proxy]",l="[object Undefined]",h=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[o]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[a]=b["[object Map]"]=b["[object Number]"]=b[u]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var g,y,m,v="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,w="object"==typeof self&&self&&self.Object===Object&&self,_=v||w||Function("return this")(),S=t&&!t.nodeType&&t,E=S&&e&&!e.nodeType&&e,A=E&&E.exports===S,M=A&&v.process,O=function(){try{return E&&E.require&&E.require("util").types||M&&M.binding&&M.binding("util")}catch(e){}}(),R=O&&O.isTypedArray,x=Array.prototype,I=Function.prototype,P=Object.prototype,N=_["__core-js_shared__"],k=I.toString,C=P.hasOwnProperty,T=(g=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",B=P.toString,L=k.call(Object),j=RegExp("^"+k.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=A?_.Buffer:void 0,U=_.Symbol,D=_.Uint8Array,q=(F&&F.allocUnsafe,y=Object.getPrototypeOf,m=Object,function(e){return y(m(e))}),z=Object.create,$=P.propertyIsEnumerable,W=x.splice,H=U?U.toStringTag:void 0,V=function(){try{var e=le(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),G=F?F.isBuffer:void 0,K=Math.max,J=Date.now,Y=le(_,"Map"),X=le(Object,"create"),Z=function(){function e(){}return function(t){if(!Ae(t))return{};if(z)return z(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function re(e){var t=this.__data__=new ee(e);this.size=t.size}function ne(e,t,r){(void 0!==r&&!ye(e[t],r)||void 0===r&&!(t in e))&&se(e,t,r)}function ie(e,t,r){var n=e[t];C.call(e,t)&&ye(n,r)&&(void 0!==r||t in e)||se(e,t,r)}function oe(e,t){for(var r=e.length;r--;)if(ye(e[r][0],t))return r;return-1}function se(e,t,r){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Q.prototype.clear=function(){this.__data__=X?X(null):{},this.size=0},Q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Q.prototype.get=function(e){var t=this.__data__;if(X){var r=t[e];return r===n?void 0:r}return C.call(t,e)?t[e]:void 0},Q.prototype.has=function(e){var t=this.__data__;return X?void 0!==t[e]:C.call(t,e)},Q.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=X&&void 0===t?n:t,this},ee.prototype.clear=function(){this.__data__=[],this.size=0},ee.prototype.delete=function(e){var t=this.__data__,r=oe(t,e);return!(r<0||(r==t.length-1?t.pop():W.call(t,r,1),--this.size,0))},ee.prototype.get=function(e){var t=this.__data__,r=oe(t,e);return r<0?void 0:t[r][1]},ee.prototype.has=function(e){return oe(this.__data__,e)>-1},ee.prototype.set=function(e,t){var r=this.__data__,n=oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(Y||ee),string:new Q}},te.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return de(this,e).get(e)},te.prototype.has=function(e){return de(this,e).has(e)},te.prototype.set=function(e,t){var r=de(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},re.prototype.clear=function(){this.__data__=new ee,this.size=0},re.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!Y||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new te(n)}return r.set(e,t),this.size=r.size,this};function ae(e){return null==e?void 0===e?l:f:H&&H in Object(e)?function(e){var t=C.call(e,H),r=e[H];try{e[H]=void 0;var n=!0}catch(e){}var i=B.call(e);return n&&(t?e[H]=r:delete e[H]),i}(e):function(e){return B.call(e)}(e)}function ce(e){return Me(e)&&ae(e)==o}function fe(e,t,r,n,i){e!==t&&function(e,t,r){for(var n=-1,i=Object(e),o=r(e),s=o.length;s--;){var a=o[++n];if(!1===t(i[a],a,i))break}}(t,(function(o,s){if(i||(i=new re),Ae(o))!function(e,t,r,n,i,o,s){var a=be(e,r),c=be(t,r),f=s.get(c);if(f)ne(e,r,f);else{var d,l,h,p,b,g=o?o(a,c,r+"",e,t,s):void 0,y=void 0===g;if(y){var m=ve(c),v=!m&&_e(c),w=!m&&!v&&Oe(c);g=c,m||v||w?ve(a)?g=a:Me(b=a)&&we(b)?g=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(a):v?(y=!1,g=function(e,t){return e.slice()}(c)):w?(y=!1,p=new(h=(d=c).buffer).constructor(h.byteLength),new D(p).set(new D(h)),l=p,g=new d.constructor(l,d.byteOffset,d.length)):g=[]:function(e){if(!Me(e)||ae(e)!=u)return!1;var t=q(e);if(null===t)return!0;var r=C.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&k.call(r)==L}(c)||me(c)?(g=a,me(a)?g=function(e){return function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var a=t[o],c=void 0;void 0===c&&(c=e[a]),i?se(r,a,c):ie(r,a,c)}return r}(e,Re(e))}(a):Ae(a)&&!Se(a)||(g=function(e){return"function"!=typeof e.constructor||pe(e)?{}:Z(q(e))}(c))):y=!1}y&&(s.set(c,g),i(g,c,n,o,s),s.delete(c)),ne(e,r,g)}}(e,t,s,r,fe,n,i);else{var a=n?n(be(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),ne(e,s,a)}}),Re)}var ue=V?function(e,t){return V(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Pe;function de(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function le(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ae(e)||function(e){return!!T&&T in e}(e))&&(Se(e)?j:h).test(function(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(r)?r:void 0}function he(e,t){var r=typeof e;return!!(t=null==t?i:t)&&("number"==r||"symbol"!=r&&p.test(e))&&e>-1&&e%1==0&&e<t}function pe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||P)}function be(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ge=function(e){var t=0,r=0;return function(){var n=J(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ue);function ye(e,t){return e===t||e!=e&&t!=t}var me=ce(function(){return arguments}())?ce:function(e){return Me(e)&&C.call(e,"callee")&&!$.call(e,"callee")},ve=Array.isArray;function we(e){return null!=e&&Ee(e.length)&&!Se(e)}var _e=G||function(){return!1};function Se(e){if(!Ae(e))return!1;var t=ae(e);return t==a||t==c||t==s||t==d}function Ee(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Ae(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Me(e){return null!=e&&"object"==typeof e}var Oe=R?function(e){return function(t){return e(t)}}(R):function(e){return Me(e)&&Ee(e.length)&&!!b[ae(e)]};function Re(e){return we(e)?function(e,t){var r=ve(e),n=!r&&me(e),i=!r&&!n&&_e(e),o=!r&&!n&&!i&&Oe(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=a.length;for(var f in e)!t&&!C.call(e,f)||s&&("length"==f||i&&("offset"==f||"parent"==f)||o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||he(f,c))||a.push(f);return a}(e,!0):function(e){if(!Ae(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=pe(e),r=[];for(var n in e)("constructor"!=n||!t&&C.call(e,n))&&r.push(n);return r}(e)}var xe,Ie=(xe=function(e,t,r){fe(e,t,r)},function(e,t){return ge(function(e,t,r){return t=K(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=K(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(s),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,Pe),e+"")}((function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=xe.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!Ae(r))return!1;var n=typeof t;return!!("number"==n?we(r)&&he(t,r.length):"string"==n&&t in r)&&ye(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var s=t[r];s&&xe(e,s,r)}return e})));function Pe(e){return e}e.exports=Ie},5880:function(e,t,r){var n,i;!function(o,s){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function s(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(){for(var r=this.getLevel(),i=0;i<n.length;i++){var o=n[i];this[o]=i<r?e:this.methodFactory(o,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function f(e){return function(){typeof console!==t&&(c.call(this),this[e].apply(this,arguments))}}function u(n,i,o){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?a:void 0!==console[n]?s(console,n):void 0!==console.log?s(console,"log"):e)}(n)||f.apply(this,arguments)}function d(e,r){var s,a,f,d=this,l="loglevel";function h(){var e;if(typeof window!==t&&l){try{e=window.localStorage[l]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(l),i=r.indexOf(n+"=");-1!==i&&(e=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?l+=":"+e:"symbol"==typeof e&&(l=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=r||u,d.getLevel=function(){return null!=f?f:null!=a?a:s},d.setLevel=function(e,r){return f=p(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&l){try{return void(window.localStorage[l]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"="+r+";"}catch(e){}}}(f),c.call(d)},d.setDefaultLevel=function(e){a=p(e),h()||d.setLevel(e,!1)},d.resetLevel=function(){f=null,function(){if(typeof window!==t&&l){try{window.localStorage.removeItem(l)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),c.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(o!==d&&(s=p(o.getLevel())),c.call(d),o===d)for(var e in i)i[e].rebuild()},s=p(o?o.getLevel():"WARN");var b=h();null!=b&&(f=p(b)),c.call(d)}(o=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new d(e,o.methodFactory)),t};var l=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=l),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=n.call(t,r,t,e))||(e.exports=i)}()},7784:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},9042:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},8160:(e,t,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(968),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),f=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!l["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=s(e),a=t&&"[object String]"===o.call(e),l=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=f&&r;if(a&&e.length>0&&!i.call(e,0))for(var b=0;b<e.length;++b)l.push(String(b));if(n&&e.length>0)for(var g=0;g<e.length;++g)l.push(String(g));else for(var y in e)p&&"prototype"===y||!i.call(e,y)||l.push(String(y));if(c)for(var m=function(e){if("undefined"==typeof window||!h)return d(e);try{return d(e)}catch(e){return!1}}(e),v=0;v<u.length;++v)m&&"constructor"===u[v]||!i.call(e,u[v])||l.push(u[v]);return l}}e.exports=n},9228:(e,t,r)=>{"use strict";var n=Array.prototype.slice,i=r(968),o=Object.keys,s=o?function(e){return o(e)}:r(8160),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?a(n.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},968:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},3358:(e,t,r)=>{var n=r(7086);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},9907:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,c=[],f=!1,u=-1;function d(){f&&a&&(f=!1,a.length?c=a.concat(c):u=-1,c.length&&l())}function l(){if(!f){var e=s(d);f=!0;for(var t=c.length;t;){for(a=c,c=[];++u<t;)a&&a[u].run();u=-1,t=c.length}a=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||f||s(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},2720:(e,t,r)=>{var n=r(9907),i=r(3358),o=r(1822),s=r(9467),a=function(){},c=/^v?\.0/.test(n.version),f=function(e){return"function"==typeof e},u=function(e){e()},d=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=f(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(d,l){var h=l<t.length-1;return function(e,t,r,n){n=i(n);var u=!1;e.on("close",(function(){u=!0})),o(e,{readable:t,writable:r},(function(e){if(e)return n(e);u=!0,n()}));var d=!1;return function(t){if(!u&&!d)return d=!0,function(e){return!!c&&!!s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&f(e.close)}(e)?e.close(a):function(e){return e.setHeader&&f(e.abort)}(e)?e.abort():f(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}}(d,h,l>0,(function(t){e||(e=t),t&&n.forEach(u),h||(n.forEach(u),r(e))}))}));return t.reduce(d)}},5636:(e,t,r)=>{var n=r(1048),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},6108:(e,t,r)=>{"use strict";var n=r(528),i=r(686),o=r(7239)(),s=r(9336),a=r(3468),c=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,f=!0;if("length"in e&&s){var u=s(e,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(f=!1)}return(n||f||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},7086:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}},2671:()=>{},8379:()=>{},3553:()=>{},9467:()=>{},183:e=>{"use strict";e.exports={rE:"6.5.5"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";r.r(n),r.d(n,{Web3AuthNoModal:()=>ia});var e={};r.r(e),r.d(e,{OG:()=>Yt,My:()=>Ut,bytesToNumberBE:()=>Wt,lX:()=>Ht,Id:()=>Jt,fg:()=>Qt,qj:()=>Kt,hexToBytes:()=>$t,aY:()=>jt,lq:()=>Vt,z:()=>Gt,Q5:()=>tr});var t={};function i(e){return i="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},i(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}r.r(t),r.d(t,{Decoder:()=>Ji,Encoder:()=>Gi,PacketType:()=>Vi,protocol:()=>Hi});var c=r(446),f=r(46),u=r(282),d=r.n(u),l=-32e3,h=-32001,p=-32002,b=-32003,g=-32004,y=-32005,m=-32700,v=-32600,w=-32601,_=-32602,S=-32603,E={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};function A(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}var M=(e,t)=>Object.hasOwnProperty.call(e,t);Error;class O extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...o}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function R(e){return"object"==typeof e&&null!=e}function x(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function I(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${x(n)}\``}=e;return{value:n,type:s,refinement:a,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*P(e,t,r,n){var i;R(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const i of e){const e=I(i,t,r,n);e&&(yield e)}}function*N(e,t,r={}){const{path:n=[],branch:i=[e],coerce:o=!1,mask:s=!1}=r,a={path:n,branch:i};if(o&&(e=t.coercer(e,a),s&&"type"!==t.type&&R(t.schema)&&R(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c="valid";for(const n of t.validator(e,a))n.explanation=r.message,c="not_valid",yield[n,void 0];for(let[f,u,d]of t.entries(e,a)){const t=N(u,d,{path:void 0===f?n:[...n,f],branch:void 0===f?i:[...i,u],coerce:o,mask:s,message:r.message});for(const r of t)r[0]?(c=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):o&&(u=r[1],void 0===f?e=u:e instanceof Map?e.set(f,u):e instanceof Set?e.add(u):R(e)&&(void 0!==u||f in e)&&(e[f]=u))}if("not_valid"!==c)for(const n of t.refiner(e,a))n.explanation=r.message,c="not_refined",yield[n,void 0];"valid"===c&&(yield[void 0,e])}class k{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:o=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(e,t)=>P(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>P(i(e,t),t,this,e):()=>[]}assert(e,t){return C(e,this,t)}create(e,t){return T(e,this,t)}is(e){return B(e,this)}mask(e,t){return function(e,t,r){const n=L(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(e,this,t)}validate(e,t={}){return L(e,this,t)}}function C(e,t,r){const n=L(e,t,{message:r});if(n[0])throw n[0]}function T(e,t,r){const n=L(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function B(e,t){return!L(e,t)[0]}function L(e,t,r={}){const n=N(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return i[0]?[new O(i[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function j(e,t){return new k({type:e,schema:null,validator:t})}function F(e){let t;return new k({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function U(e){return new k({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${x(e)}`})}function D(e){const t=x(e),r=typeof e;return new k({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${x(r)}`})}function q(){return j("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${x(e)}`))}function z(e){const t=e?Object.keys(e):[],r=j("never",(()=>!1));return new k({type:"object",schema:e||null,*entries(n){if(e&&R(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>R(e)||`Expected an object, but received: ${x(e)}`,coercer:e=>R(e)?{...e}:e})}function $(e){return new k({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function W(e,t){return new k({type:"record",schema:null,*entries(r){if(R(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>R(e)||`Expected an object, but received: ${x(e)}`})}function H(){return j("string",(e=>"string"==typeof e||`Expected a string, but received: ${x(e)}`))}function V(e){const t=e.map((e=>e.type)).join(" | ");return new k({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=N(r,t,n),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${x(r)}`,...i]}})}var G=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}},K=e=>z(e);function J({path:e,branch:t}){const r=e[e.length-1];return M(t[t.length-2],r)}function Y(e){return new k({...e,type:`optional ${e.type}`,validator:(t,r)=>!J(r)||e.validator(t,r),refiner:(t,r)=>!J(r)||e.refiner(t,r)})}var X,Z,Q,ee=V([D(null),j("boolean",(e=>"boolean"==typeof e)),j("finite number",(e=>B(e,q())&&Number.isFinite(e))),H(),U(F((()=>ee))),W(H(),F((()=>ee)))]),te=(X=ee,Z=j("any",(()=>!0)),Q=e=>(function(e,t,r="Assertion failed",n=G){try{C(e,t)}catch(e){throw function(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}(n,`${r}: ${function(e){return function(e){return function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)&&"string"==typeof e.message?e.message:function(e){return null==e}(e)?"":String(e)}(e).replace(/\.$/u,"")}(e)}.`)}}(e,ee),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))),new k({...X,coercer:(e,t)=>B(e,Z)?X.coercer(Q(e,t),t):X.coercer(e,t)}));function re(e){try{return function(e){T(e,te)}(e),!0}catch{return!1}}var ne=D("2.0"),ie=function(e){return new k({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}(V([q(),H()])),oe=K({code:j("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${x(e)}`)),message:H(),data:Y(te),stack:Y(H())}),se=V([W(H(),te),U(te)]);function ae(e){return B(e,oe)}K({id:ie,jsonrpc:ne,method:H(),params:Y(se)}),K({jsonrpc:ne,method:H(),params:Y(se)}),z({id:ie,jsonrpc:ne,result:$(j("unknown",(()=>!0))),error:$(oe)}),V([K({id:ie,jsonrpc:ne,result:te}),K({id:ie,jsonrpc:ne,error:oe})]);var ce="Unspecified error message. This is a bug, please report it.",fe={code:S,message:de(S)},ue="Unspecified server error.";function de(e,t=ce){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(M(E,t))return E[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return ue}return t}function le(e,{fallbackError:t=fe,shouldIncludeStack:r=!0}={}){if(!ae(t))throw new Error("Must provide fallback error with integer number code and string message.");const n=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if(ae(e))return e;return{...t,data:{cause:he(e)}}}(e,t);return r||delete n.stack,n}function he(e){return Array.isArray(e)?e.map((e=>re(e)?e:A(e)?pe(e):null)):A(e)?pe(e):re(e)?e:null}function pe(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const n=e[r];return re(n)&&(t[r]=n),t}),{})}var be=class extends Error{constructor(e,t,r){var n=(...e)=>{super(...e)};if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');!function(e){return A(e)&&M(e,"cause")&&A(e.cause)}(r)?n(t):(n(t,{cause:r.cause}),M(this,"cause")||Object.assign(this,{cause:r.cause})),void 0!==r&&(this.data=r),this.code=e}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(this.data)&&(e.data.cause=he(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return u(this.serialize(),ye,2)}},ge=class extends be{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}};function ye(e,t){if("[Circular]"!==t)return t}var me={parse:e=>ve(m,e),invalidRequest:e=>ve(v,e),invalidParams:e=>ve(_,e),methodNotFound:e=>ve(w,e),internal:e=>ve(S,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return ve(t,e)},invalidInput:e=>ve(l,e),resourceNotFound:e=>ve(h,e),resourceUnavailable:e=>ve(p,e),transactionRejected:e=>ve(b,e),methodNotSupported:e=>ve(g,e),limitExceeded:e=>ve(y,e)};function ve(e,t){const[r,n]=function(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}(t);return new be(e,r??de(e),n)}function we(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}r(1822),r(3358),r(2720),c.Duplex;class _e extends f.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(t){let e;if(i.length>0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)we(s,this,i);else{const e=s.length,t=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(s);for(let r=0;r<e;r+=1)we(t[r],this,i)}return!0}}class Se extends Error{constructor(e){let{code:t,message:r,data:n}=e;if(!Number.isInteger(t))throw new Error("code must be an integer");if(!r||"string"!=typeof r)throw new Error("message must be string");super(r),o(this,"code",void 0),o(this,"data",void 0),this.code=t,void 0!==n&&(this.data=n)}toString(){return d()({code:this.code,message:this.message,data:this.data,stack:this.stack})}}function Ee(e){return async(t,r,n,i)=>{let o;const s=new Promise((e=>{o=e}));let a=null,c=!1;const f=async()=>{c=!0,n((e=>{a=e,o()})),await s};try{await e(t,r,f),c?(await s,a(null)):i(null)}catch(e){const t=e;a?a(t):i(t)}}}class Ae extends _e{constructor(){super(),o(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,r){const n=[];let i=null,o=!1;for(const s of r)if([i,o]=await Ae._runMiddleware(e,t,s,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((i=>{const o=e=>{const r=e||t.error;r&&("object"==typeof r&&!1===Object.keys(r).includes("stack")&&(r.stack="Stack trace is not available."),t.error=le(r,{shouldIncludeStack:!0,fallbackError:{message:(null==r?void 0:r.message)||(null==r?void 0:r.toString()),code:(null==r?void 0:r.code)||-32603,stack:(null==r?void 0:r.stack)||"Stack trace is not available.",data:(null==r?void 0:r.data)||(null==r?void 0:r.message)||(null==r?void 0:r.toString())}})),i([r,!0])},s=e=>{t.error?o(t.error):(e&&("function"!=typeof e&&o(new Se({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(e)),i([null,!1]))};try{r(e,t,s,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new Se({code:-32603,message:"Response has no error or result for request"});if(!r)throw new Se({code:-32603,message:"Nothing ended request"})}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[i,o,s]=await Ae._runAllMiddleware(e,t,this._middleware);return o?(await Ae._runReturnHandlers(s),n(i)):r((async e=>{try{await Ae._runReturnHandlers(s)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise(((t,r)=>{this._handle(e,((e,n)=>{e&&void 0===n?r(e):t(n)})).catch(r)}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const e=new Se({code:-32603,message:"request must be plain object"});return t(e,{id:void 0,jsonrpc:"2.0",error:e})}if("string"!=typeof e.method){const r=new Se({code:-32603,message:"method must be string"});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=a({},e),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(e){i=e}var o,s,c,f,u,d,l;return i&&(delete n.result,n.error||("object"==typeof i&&!1===Object.keys(i).includes("stack")&&(i.stack="Stack trace is not available."),n.error=le(i,{shouldIncludeStack:!0,fallbackError:{message:(null===(o=i)||void 0===o?void 0:o.message)||(null===(s=i)||void 0===s?void 0:s.toString()),code:(null===(c=i)||void 0===c?void 0:c.code)||-32603,stack:(null===(f=i)||void 0===f?void 0:f.stack)||"Stack trace is not available.",data:(null===(u=i)||void 0===u?void 0:u.data)||(null===(d=i)||void 0===d?void 0:d.message)||(null===(l=i)||void 0===l?void 0:l.toString())}}))),t(i,n)}async _processRequest(e,t){const[r,n,i]=await Ae._runAllMiddleware(e,t,this._middleware);if(Ae._checkForCompletion(e,t,n),await Ae._runReturnHandlers(i),r)throw r}}function Me(e){const t=new Ae;return e.forEach((e=>t.push(e))),t.asMiddleware()}function Oe(e){const t=new _e;return t.sendAsync=async t=>{const r=await e.handle(t);if(r.error){var n,i,o,s,a,c,f;"object"==typeof r.error&&!1===Object.keys(r.error).includes("stack")&&(r.error.stack="Stack trace is not available.");const e=le(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||(null===(i=r.error)||void 0===i?void 0:i.toString()),code:(null===(o=r.error)||void 0===o?void 0:o.code)||-32603,stack:(null===(s=r.error)||void 0===s?void 0:s.stack)||"Stack trace is not available.",data:(null===(a=r.error)||void 0===a?void 0:a.data)||(null===(c=r.error)||void 0===c?void 0:c.message)||(null===(f=r.error)||void 0===f?void 0:f.toString())},shouldIncludeStack:!0});throw me.internal(e)}return r.result},t.send=(t,r)=>{if("function"!=typeof r)throw new Error('Must provide callback to "send" method.');e.handle(t,r)},e.on&&e.on("notification",(e=>{t.emit("data",null,e)})),t.request=async e=>{const r=a(a({},e),{},{id:Math.random().toString(36).slice(2),jsonrpc:"2.0"});return await t.sendAsync(r)},t}c.Duplex,Symbol("IGNORE_SUBSTREAM"),c.Duplex;var Re=r(7702),xe=r.n(Re);const Ie={MAINNET:"mainnet",TESTNET:"testnet",CYAN:"cyan",AQUA:"aqua",CELESTE:"celeste"},Pe={SAPPHIRE_DEVNET:"sapphire_devnet",SAPPHIRE_MAINNET:"sapphire_mainnet"},Ne={[Pe.SAPPHIRE_MAINNET]:"https://signer.web3auth.io",[Pe.SAPPHIRE_DEVNET]:"https://signer.web3auth.io",[Ie.MAINNET]:"https://signer.web3auth.io",[Ie.TESTNET]:"https://signer.web3auth.io",[Ie.CYAN]:"https://signer-polygon.web3auth.io",[Ie.AQUA]:"https://signer-polygon.web3auth.io",[Ie.CELESTE]:"https://signer-polygon.web3auth.io"};function ke(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){const t=e;return t&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&r&&0!==n}}xe();class Ce{constructor(){o(this,"store",new Map)}getItem(e){return this.store.get(e)||null}setItem(e,t){this.store.set(e,t)}removeItem(e){this.store.delete(e)}}o(class{constructor(e,t){o(this,"storage",void 0),o(this,"_storeKey",void 0),this.storage=t,this._storeKey=e;try{t.getItem(e)||this.resetStore()}catch(e){}}static getInstance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instanceMap.has(e)){let r;r="local"===t&&ke("localStorage")?window.localStorage:"session"===t&&ke("sessionStorage")?window.sessionStorage:new Ce,this.instanceMap.set(e,new this(e,r))}return this.instanceMap.get(e)}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const e=this.getStore();return this.storage.removeItem(this._storeKey),e}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(e){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[e]}set(e,t){const r=JSON.parse(this.storage.getItem(this._storeKey)||"{}");r[e]=t,this.storage.setItem(this._storeKey,JSON.stringify(r))}},"instanceMap",new Map);const Te=a(a({},Pe),Ie),Be="sms_passwordless";var Le,je=(Le=function(e,t){return Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Le(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Le(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Fe=function(e){function t(t,r){var n,i,o,s=this.constructor,a=e.call(this,t,r)||this;return Object.defineProperty(a,"name",{value:s.name,enumerable:!1,configurable:!0}),n=a,i=s.prototype,(o=Object.setPrototypeOf)?o(n,i):n.__proto__=i,function(e,t){void 0===t&&(t=e.constructor);var r=Error.captureStackTrace;r&&r(e,t)}(a),a}return je(t,e),t}(Error);class Ue extends Error{}Ue.prototype.name="InvalidTokenError";var De=r(8089),qe=r.n(De),ze=r(5880),$e=r.n(ze);const We=$e().getLogger("http-helpers");We.setLevel(ze.levels.INFO);let He="torus-default";const Ve=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={mode:"cors",headers:{}};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useAPIKey&&(r.headers=a(a({},r.headers),function(){const e={};return He&&(e["x-api-key"]=He),e}()));const n=qe()(r,t,{method:"GET"}),i=await async function(e,t){let r=null;try{r=new URL(e)}catch(e){}return fetch(e,t)}(e,n);if(i.ok){const e=i.headers.get("content-type");return null!=e&&e.includes("application/json")?i.json():i.text()}throw function(e){We.info(`Response: ${e.status} ${e.statusText}`),We.info(`Url: ${e.url}`)}(i),i};function Ge(e){const t=e.findIndex((e=>e instanceof Error)),r=e.findIndex((e=>"string"==typeof e)),n=e.findIndex((e=>e&&"object"==typeof e&&"status"in e&&"type"in e));let i;if(-1!==n){const t=e[n];i=new Error(`${t.status} ${t.type.toString()} ${t.statusText}`)}else i=-1!==t?e.splice(t,1)[0]:-1!==r?new Error(e.splice(r,1)[0]):new Error("Unknown error");return[i,e]}class Ke extends Fe{constructor(e,t,r){super(t),o(this,"code",void 0),o(this,"message",void 0),o(this,"cause",void 0),this.code=e,this.message=t||"",this.cause=r,Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message,cause:Ge([this.cause])}}toString(){return JSON.stringify(this.toJSON())}}class Je extends Ke{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(e,t="",r){return new Je(e,`${Je.messages[e]}, ${t}`,r)}static notFound(e="",t){return Je.fromCode(5001,e,t)}static notInstalled(e="",t){return Je.fromCode(5002,e,t)}static notReady(e="",t){return Je.fromCode(5003,e,t)}static windowBlocked(e="",t){return Je.fromCode(5004,e,t)}static windowClosed(e="",t){return Je.fromCode(5005,e,t)}static incompatibleChainNameSpace(e="",t){return Je.fromCode(5006,e,t)}static duplicateAdapterError(e="",t){return Je.fromCode(5007,e,t)}static invalidProviderConfigError(e="",t){return Je.fromCode(5008,e,t)}static providerNotReadyError(e="",t){return Je.fromCode(5009,e,t)}static rpcConnectionError(e="",t){return Je.fromCode(5010,e,t)}static invalidParams(e="",t){return Je.fromCode(5011,e,t)}static invalidNetwork(e="",t){return Je.fromCode(5013,e,t)}}o(Je,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class Ye extends Ke{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(e,t="",r){return new Ye(e,`${Ye.messages[e]}. ${t}`,r)}static connectionError(e="",t){return Ye.fromCode(5111,e,t)}static disconnectionError(e="",t){return Ye.fromCode(5112,e,t)}static notConnectedError(e="",t){return Ye.fromCode(5113,e,t)}static popupClosed(e="",t){return Ye.fromCode(5114,e,t)}static mfaEnabled(e="",t){return Ye.fromCode(5115,e,t)}static chainConfigNotAdded(e="",t){return Ye.fromCode(5116,e,t)}static unsupportedOperation(e="",t){return Ye.fromCode(5117,e,t)}static coreKitKeyNotFound(e="",t){return Ye.fromCode(5118,e,t)}static userNotLoggedIn(e="",t){return Ye.fromCode(5119,e,t)}}o(Ye,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class Xe extends Ke{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(e,t="",r){return new Xe(e,`${Xe.messages[e]}, ${t}`,r)}static chainIDNotAllowed(e="",t){return Xe.fromCode(5201,e,t)}static operationNotAllowed(e="",t){return Xe.fromCode(5202,e,t)}static chainNamespaceNotAllowed(e="",t){return Xe.fromCode(5203,e,t)}}o(Xe,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});class Ze extends Ke{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletProviderError"})}static fromCode(e,t="",r){return new Xe(e,`${Ze.messages[e]}, ${t}`,r)}static invalidRequestArgs(e="",t){return Xe.fromCode(5301,e,t)}static invalidRequestMethod(e="",t){return Xe.fromCode(5302,e,t)}static invalidRequestParams(e="",t){return Xe.fromCode(5303,e,t)}}o(Ze,"messages",{5e3:"Custom",5301:"Expected a single, non-array, object argument.",5302:"'args.method' must be a non-empty string.",5303:"'args.params' must be an object or array if provided."});const Qe={EIP155:"eip155",SOLANA:"solana",CASPER:"casper",XRPL:"xrpl",OTHER:"other"},et="multichain",tt=(e,t)=>{if(e===Qe.OTHER)return null;const r=t?"number"==typeof t?t:parseInt(t,16):(e=>{if(e===Qe.EIP155)return 1;if(e===Qe.SOLANA)return 1;if(e===Qe.XRPL)return 1;throw Je.invalidParams(`Chain namespace ${e} is not supported`)})(e);return e===Qe.EIP155?(e=>{const t=Qe.EIP155;return 1===e?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorerUrl:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:5===e?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:t,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorerUrl:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:11155111===e?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:t,chainId:"0xaa36a7",rpcTarget:"https://rpc.ankr.com/eth_sepolia",displayName:"Sepolia Testnet",blockExplorerUrl:"https://sepolia.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:137===e?{logo:"https://images.toruswallet.io/polygon.svg",chainNamespace:t,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorerUrl:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80002===e?{logo:"https://images.toruswallet.io/polygon.svg",chainNamespace:t,chainId:"0x13882",rpcTarget:"https://rpc.ankr.com/polygon_amoy",displayName:"Polygon Amoy Testnet",blockExplorerUrl:"https://www.oklink.com/amoy",ticker:"MATIC",tickerName:"Polygon",decimals:18}:56===e?{logo:"https://images.toruswallet.io/bnb.png",chainNamespace:t,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorerUrl:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:97===e?{logo:"https://images.toruswallet.io/bnb.png",chainNamespace:t,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorerUrl:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:25===e?{logo:"https://images.toruswallet.io/cro.svg",chainNamespace:t,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorerUrl:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===e?{logo:"https://images.toruswallet.io/cro.svg",chainNamespace:t,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorerUrl:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos",decimals:18}:8217===e?{logo:"https://images.toruswallet.io/klay.svg",chainNamespace:t,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorerUrl:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn",decimals:18}:null})(r):e===Qe.SOLANA?(e=>{const t=Qe.SOLANA;return 1===e?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorerUrl:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana",decimals:9}:2===e?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:t,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorerUrl:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana",decimals:9}:3===e?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:t,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorerUrl:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana",decimals:9}:null})(r):e===Qe.XRPL?(e=>{const t=Qe.XRPL;return 1===e?{chainNamespace:t,decimals:15,chainId:"0x1",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://ripple-node.tor.us",wsTarget:"wss://s2.ripple.com",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl mainnet",blockExplorerUrl:"https://livenet.xrpl.org"}:2===e?{chainNamespace:t,decimals:15,chainId:"0x2",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://testnet-ripple-node.tor.us",wsTarget:"wss://s.altnet.rippletest.net",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl testnet",blockExplorerUrl:"https://testnet.xrpl.org",isTestnet:!0}:3===e?{chainNamespace:t,decimals:15,chainId:"0x3",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://devnet-ripple-node.tor.us",wsTarget:"wss://s.devnet.rippletest.net/",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl devnet",blockExplorerUrl:"https://devnet.xrpl.org",isTestnet:!0}:null})(r):null},rt={OPENLOGIN:"openlogin",WALLET_CONNECT_V2:"wallet-connect-v2",SFA:"sfa"},nt=a({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},rt),it=a({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},rt),ot=a(a({},it),nt),st=(nt.TORUS_SOLANA,nt.PHANTOM,nt.SOLFLARE,nt.SLOPE,it.TORUS_EVM,it.METAMASK,it.COINBASE,Te),at={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},ct=a(a({},at),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"});function ft(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){const t=e;return!(!t||22!==t.code&&1014!==t.code&&"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||!r||0===n)}}var ut=$e().getLogger("web3auth-logger");class dt extends Ke{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletServicesPluginError"})}static fromCode(e,t="",r){return new dt(e,`${dt.messages[e]}${t}`,r)}static notInitialized(e="",t){return dt.fromCode(5210,e,t)}static unsupportedAdapter(e="",t){return dt.fromCode(5211,e,t)}static providerRequired(e="",t){return dt.fromCode(5212,e,t)}static web3authRequired(e="",t){return dt.fromCode(5213,e,t)}static web3AuthNotConnected(e="",t){return dt.fromCode(5214,e,t)}static alreadyInitialized(e="",t){return dt.fromCode(5216,e,t)}static unsupportedChainNamespace(e="",t){return dt.fromCode(5218,e,t)}static differentWeb3AuthNetwork(e="",t){return dt.fromCode(5219,e,t)}static invalidParams(e="",t){return dt.fromCode(5220,e,t)}static web3authNotInitialized(e="",t){return dt.fromCode(5221,e,t)}static invalidSession(e="",t){return dt.fromCode(5222,e,t)}}o(dt,"messages",{5210:"Wallet Services Plugin is not initialized",5211:"Web3Auth is connected to unsupported adapter. Wallet services connector plugin requires web3auth connected to openlogin adapter.",5212:"Provider is required..",5213:"Web3Auth instance is required while initialization.",5214:"Web3Auth is not connected.",5216:"Plugin is already initialized",5218:"Unsupported chain namespace.",5219:"Plugin network different than web3auth instance network.",5221:"Web3Auth is not initialized",5222:"Invalid session inside wallet services. Please report this issue."});const lt=a(a({},Qe),{},{MULTICHAIN:"multichain"}),ht={READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"};function pt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function bt(e,...t){if(!((r=e)instanceof Uint8Array||null!=r&&"object"==typeof r&&"Uint8Array"===r.constructor.name))throw new Error("Expected Uint8Array");var r;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function gt(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");pt(e.outputLen),pt(e.blockLen)}function yt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function mt(e,t){bt(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}a({},ht),a(a({},{WALLET_SERVICES:"wallet-services"}),{SOLANA:"solana"});const vt={number:pt,bool:function(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)},bytes:bt,hash:gt,exists:yt,output:mt},wt="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function _t(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}const St=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Et=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function At(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!_t(e))throw new Error("expected Uint8Array, got "+typeof e);return e}class Mt{clone(){return this._cloneInto()}}function Ot(e){const t=t=>e().update(At(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Rt(e=32){if(wt&&"function"==typeof wt.getRandomValues)return wt.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}class xt extends Mt{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=St(this.buffer)}update(e){yt(this);const{view:t,buffer:r,blockLen:n}=this,i=(e=At(e)).length;for(let o=0;o<i;){const s=Math.min(n-this.pos,i-o);if(s!==n)r.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(t,0),this.pos=0);else{const t=St(e);for(;n<=i-o;o+=n)this.process(t,o)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){yt(this),mt(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let e=o;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,f=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+f,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const s=St(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,f[e],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}const It=(e,t,r)=>e&t^e&r^t&r,Pt=new Uint32Array([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]),Nt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),kt=new Uint32Array(64);class Ct extends xt{constructor(){super(64,32,8,!1),this.A=0|Nt[0],this.B=0|Nt[1],this.C=0|Nt[2],this.D=0|Nt[3],this.E=0|Nt[4],this.F=0|Nt[5],this.G=0|Nt[6],this.H=0|Nt[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)kt[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=kt[e-15],r=kt[e-2],n=Et(t,7)^Et(t,18)^t>>>3,i=Et(r,17)^Et(r,19)^r>>>10;kt[e]=i+kt[e-7]+n+kt[e-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:c,H:f}=this;for(let e=0;e<64;e++){const t=f+(Et(s,6)^Et(s,11)^Et(s,25))+((u=s)&a^~u&c)+Pt[e]+kt[e]|0,d=(Et(r,2)^Et(r,13)^Et(r,22))+It(r,n,i)|0;f=c,c=a,a=s,s=o+t|0,o=i,i=n,n=r,r=t+d|0}var u;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(r,n,i,o,s,a,c,f)}roundClean(){kt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Tt=Ot((()=>new Ct)),Bt=(BigInt(0),BigInt(1)),Lt=BigInt(2);function jt(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}const Ft=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function Ut(e){if(!jt(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=Ft[e[r]];return t}function Dt(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}const qt={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function zt(e){return e>=qt._0&&e<=qt._9?e-qt._0:e>=qt._A&&e<=qt._F?e-(qt._A-10):e>=qt._a&&e<=qt._f?e-(qt._a-10):void 0}function $t(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=zt(e.charCodeAt(i)),o=zt(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n}function Wt(e){return Dt(Ut(e))}function Ht(e){if(!jt(e))throw new Error("Uint8Array expected");return Dt(Ut(Uint8Array.from(e).reverse()))}function Vt(e,t){return $t(e.toString(16).padStart(2*t,"0"))}function Gt(e,t){return Vt(e,t).reverse()}function Kt(e,t,r){let n;if("string"==typeof t)try{n=$t(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!jt(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n}function Jt(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];if(!jt(n))throw new Error("Uint8Array expected");t+=n.length}let r=new Uint8Array(t),n=0;for(let t=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}const Yt=e=>(Lt<<BigInt(e-1))-Bt,Xt=e=>new Uint8Array(e),Zt=e=>Uint8Array.from(e);function Qt(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=Xt(e),i=Xt(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),c=(e=Xt())=>{i=a(Zt([0]),e),n=a(),0!==e.length&&(i=a(Zt([1]),e),n=a())},f=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return Jt(...r)};return(e,t)=>{let r;for(s(),c(e);!(r=t(f()));)c();return s(),r}}const er={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||jt(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function tr(e,t,r={}){const n=(t,r,n)=>{const i=er[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const rr=BigInt(0),nr=BigInt(1),ir=BigInt(2),or=BigInt(3),sr=BigInt(4),ar=BigInt(5),cr=BigInt(8);function fr(e,t){const r=e%t;return r>=rr?r:t+r}function ur(e,t,r){if(r<=rr||t<rr)throw new Error("Expected power/modulo > 0");if(r===nr)return rr;let n=nr;for(;t>rr;)t&nr&&(n=n*e%r),e=e*e%r,t>>=nr;return n}function dr(e,t,r){let n=e;for(;t-- >rr;)n*=n,n%=r;return n}function lr(e,t){if(e===rr||t<=rr)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=fr(e,t),n=t,i=rr,o=nr,s=nr,a=rr;for(;r!==rr;){const e=n/r,t=n%r,c=i-s*e,f=o-a*e;n=r,r=t,i=s,o=a,s=c,a=f}if(n!==nr)throw new Error("invert: does not exist");return fr(i,t)}BigInt(9),BigInt(16);const hr=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function pr(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function br(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function gr(e){const t=br(e);return t+Math.ceil(t/2)}class yr extends Mt{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,gt(e);const r=At(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return yt(this),this.iHash.update(e),this}digestInto(e){yt(this),bt(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const mr=(e,t,r)=>new yr(e,t).update(r).digest();mr.create=(e,t)=>new yr(e,t);const vr=BigInt(0),wr=BigInt(1);function _r(e){return tr(e.Fp,hr.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),tr(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...pr(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{bytesToNumberBE:Sr,hexToBytes:Er}=e,Ar={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:t}=Ar;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(128&n[0])throw new t("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Sr(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=Ar,r="string"==typeof e?Er(e):e;if(!jt(r))throw new Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=Ar._parseInt(r.subarray(2)),{d:s,l:a}=Ar._parseInt(o);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),c=r(s);return`30${r(s+o+4)}02${c}${i}02${a}${n}`}},Mr=BigInt(0),Or=BigInt(1),Rr=(BigInt(2),BigInt(3));function xr(e){const t=function(e){const t=_r(e);return tr(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,i=r.BYTES+1,o=2*r.BYTES+1;function s(e){return fr(e,n)}function a(e){return lr(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:f,weierstrassEquation:u,isWithinCurveOrder:d}=function(e){const t=function(e){const t=_r(e);tr(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const i=t.toAffine();return Jt(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function o(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function s(e){return"bigint"==typeof e&&Mr<e&&e<t.n}function a(e){if(!s(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:i,n:o}=t;if(r&&"bigint"!=typeof e){if(jt(e)&&(e=Ut(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*n,"0")}let s;try{s="bigint"==typeof e?e:Wt(Kt("private key",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return i&&(s=fr(s,o)),a(s),s}const f=new Map;function u(e){if(!(e instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof d)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(i(Kt("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,f.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),s=o(e);if(!r.eql(i,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){u(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),f=r.eql(r.mul(n,a),r.mul(s,i));return c&&f}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,Rr),{px:o,py:s,pz:a}=this;let c=r.ZERO,f=r.ZERO,u=r.ZERO,l=r.mul(o,o),h=r.mul(s,s),p=r.mul(a,a),b=r.mul(o,s);return b=r.add(b,b),u=r.mul(o,a),u=r.add(u,u),c=r.mul(e,u),f=r.mul(i,p),f=r.add(c,f),c=r.sub(h,f),f=r.add(h,f),f=r.mul(c,f),c=r.mul(b,c),u=r.mul(i,u),p=r.mul(e,p),b=r.sub(l,p),b=r.mul(e,b),b=r.add(b,u),u=r.add(l,l),l=r.add(u,l),l=r.add(l,p),l=r.mul(l,b),f=r.add(f,l),p=r.mul(s,a),p=r.add(p,p),l=r.mul(p,b),c=r.sub(c,l),u=r.mul(p,h),u=r.add(u,u),u=r.add(u,u),new d(c,f,u)}add(e){u(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:c}=e;let f=r.ZERO,l=r.ZERO,h=r.ZERO;const p=t.a,b=r.mul(t.b,Rr);let g=r.mul(n,s),y=r.mul(i,a),m=r.mul(o,c),v=r.add(n,i),w=r.add(s,a);v=r.mul(v,w),w=r.add(g,y),v=r.sub(v,w),w=r.add(n,o);let _=r.add(s,c);return w=r.mul(w,_),_=r.add(g,m),w=r.sub(w,_),_=r.add(i,o),f=r.add(a,c),_=r.mul(_,f),f=r.add(y,m),_=r.sub(_,f),h=r.mul(p,w),f=r.mul(b,m),h=r.add(f,h),f=r.sub(y,h),h=r.add(y,h),l=r.mul(f,h),y=r.add(g,g),y=r.add(y,g),m=r.mul(p,m),w=r.mul(b,w),y=r.add(y,m),m=r.sub(g,m),m=r.mul(p,m),w=r.add(w,m),g=r.mul(y,w),l=r.add(l,g),g=r.mul(_,w),f=r.mul(v,f),f=r.sub(f,g),g=r.mul(v,y),h=r.mul(_,h),h=r.add(h,g),new d(f,l,h)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return h.wNAFCached(this,f,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}))}multiplyUnsafe(e){const n=d.ZERO;if(e===Mr)return n;if(a(e),e===Or)return this;const{endo:i}=t;if(!i)return h.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:c,k2:f}=i.splitScalar(e),u=n,l=n,p=this;for(;s>Mr||f>Mr;)s&Or&&(u=u.add(p)),f&Or&&(l=l.add(p)),p=p.double(),s>>=Or,f>>=Or;return o&&(u=u.negate()),c&&(l=l.negate()),l=new d(r.mul(l.px,i.beta),l.py,l.pz),u.add(l)}multiply(e){a(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(o);let{p:f,f:u}=this.wNAF(t),{p:l,f:p}=this.wNAF(c);f=h.constTimeNegate(e,f),l=h.constTimeNegate(a,l),l=new d(r.mul(l.px,s.beta),l.py,l.pz),n=f.add(l),i=u.add(p)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return d.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,i=(e,t)=>t!==Mr&&t!==Or&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),c=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===Or)return!0;if(r)return r(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===Or?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return Ut(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const l=t.nBitLength,h=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>vr;)r&wr&&(n=n.add(i)),i=i.double(),r>>=wr;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:s,windowSize:a}=n(t);let c=e.ZERO,f=e.BASE;const u=BigInt(2**t-1),d=2**t,l=BigInt(t);for(let e=0;e<s;e++){const t=e*a;let n=Number(o&u);o>>=l,n>a&&(n-=d,o+=wr);const s=t,h=t+Math.abs(n)-1,p=e%2!=0,b=n<0;0===n?f=f.add(r(p,i[s])):c=c.add(r(b,i[h]))}return{p:c,f}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}}(d,t.endo?Math.ceil(l/2):l);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:s}}({...t,toBytes(e,t,n){const i=t.toAffine(),o=r.toBytes(i.x),s=Jt;return n?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(e){const t=e.length,n=e[0],s=e.subarray(1);if(t!==i||2!==n&&3!==n){if(t===o&&4===n)return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}{const e=Wt(s);if(!(Mr<(a=e)&&a<r.ORDER))throw new Error("Point is not on curve");const t=u(e);let i=r.sqrt(t);return!(1&~n)!=((i&Or)===Or)&&(i=r.neg(i)),{x:e,y:i}}var a}}),l=e=>Ut(Vt(e,t.nByteLength));function h(e){return e>n>>Or}const p=(e,t,r)=>Wt(e.slice(t,r));class b{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=Kt("compactSignature",e,2*r),new b(p(e,0,r),p(e,r,2*r))}static fromDER(e){const{r:t,s:r}=Ar.toSig(Kt("DER",e));return new b(t,r)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new b(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:i,recovery:o}=this,f=v(Kt("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const u=2===o||3===o?n+t.n:n;if(u>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=1&o?"03":"02",h=c.fromHex(d+l(u)),p=a(u),b=s(-f*p),g=s(i*p),y=c.BASE.multiplyAndAddUnsafe(h,b,g);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return $t(this.toDERHex())}toDERHex(){return Ar.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return $t(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}const g={isValidPrivateKey(e){try{return f(e),!0}catch(e){return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const e=gr(t.n);return function(e,t,r=!1){const n=e.length,i=br(t),o=gr(t);if(n<16||n<o||n>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const s=fr(r?Wt(e):Ht(e),t-nr)+nr;return r?Gt(s,i):Vt(s,i)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function y(e){const t=jt(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===i||n===o:r?n===2*i||n===2*o:e instanceof c}const m=t.bits2int||function(e){const r=Wt(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},v=t.bits2int_modN||function(e){return s(m(e))},w=Yt(t.nBitLength);function _(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(Mr<=e&&e<w))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Vt(e,t.nByteLength)}const S={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(y(e))throw new Error("first arg must be private key");if(!y(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(f(e)).toRawBytes(r)},sign:function(e,n,i=S){const{seed:o,k2sig:u}=function(e,n,i=S){if(["recovered","canonical"].some((e=>e in i)))throw new Error("sign() legacy options not supported");const{hash:o,randomBytes:u}=t;let{lowS:l,prehash:p,extraEntropy:g}=i;null==l&&(l=!0),e=Kt("msgHash",e),p&&(e=Kt("prehashed msgHash",o(e)));const y=v(e),w=f(n),E=[_(w),_(y)];if(null!=g){const e=!0===g?u(r.BYTES):g;E.push(Kt("extraEntropy",e))}const A=Jt(...E),M=y;return{seed:A,k2sig:function(e){const t=m(e);if(!d(t))return;const r=a(t),n=c.BASE.multiply(t).toAffine(),i=s(n.x);if(i===Mr)return;const o=s(r*s(M+i*w));if(o===Mr)return;let f=(n.x===i?0:2)|Number(n.y&Or),u=o;return l&&h(o)&&(u=function(e){return h(e)?s(-e):e}(o),f^=1),new b(i,u,f)}}}(e,n,i),l=t;return Qt(l.hash.outputLen,l.nByteLength,l.hmac)(o,u)},verify:function(e,r,n,i=E){const o=e;if(r=Kt("msgHash",r),n=Kt("publicKey",n),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:f,prehash:u}=i;let d,l;try{if("string"==typeof o||jt(o))try{d=b.fromDER(o)}catch(e){if(!(e instanceof Ar.Err))throw e;d=b.fromCompact(o)}else{if("object"!=typeof o||"bigint"!=typeof o.r||"bigint"!=typeof o.s)throw new Error("PARSE");{const{r:e,s:t}=o;d=new b(e,t)}}l=c.fromHex(n)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(f&&d.hasHighS())return!1;u&&(r=t.hash(r));const{r:h,s:p}=d,g=v(r),y=a(p),m=s(g*y),w=s(h*y),_=c.BASE.multiplyAndAddUnsafe(l,m,w)?.toAffine();return!!_&&s(_.x)===h},ProjectivePoint:c,Signature:b,utils:g}}function Ir(e){return{hash:e,hmac:(t,...r)=>mr(e,t,function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];if(!_t(n))throw new Error("Uint8Array expected");t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}(...r)),randomBytes:Rt}}BigInt(4);const Pr=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Nr=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),kr=BigInt(1),Cr=BigInt(2),Tr=(e,t)=>(e+t/Cr)/t;const Br=function(e,t,r=!1,n={}){if(e<=rr)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=pr(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=function(e){if(e%sr===or){const t=(e+nr)/sr;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%cr===ar){const t=(e-ar)/cr;return function(e,r){const n=e.mul(r,ir),i=e.pow(n,t),o=e.mul(r,i),s=e.mul(e.mul(o,ir),i),a=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),r))throw new Error("Cannot find square root");return a}}return function(e){const t=(e-nr)/ir;let r,n,i;for(r=e-nr,n=0;r%ir===rr;r/=ir,n++);for(i=ir;i<e&&ur(i,t,e)!==e-nr;i++);if(1===n){const t=(e+nr)/sr;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const o=(r+nr)/ir;return function(e,s){if(e.pow(s,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let a=n,c=e.pow(e.mul(e.ONE,i),r),f=e.pow(s,o),u=e.pow(s,r);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(u);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,nr<<BigInt(a-t-1));c=e.sqr(r),f=e.mul(f,r),u=e.mul(u,c),a=t}return f}}(e)}(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:Yt(i),ZERO:rr,ONE:nr,create:t=>fr(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return rr<=t&&t<e},is0:e=>e===rr,isOdd:e=>(e&nr)===nr,neg:t=>fr(-t,e),eql:(e,t)=>e===t,sqr:t=>fr(t*t,e),add:(t,r)=>fr(t+r,e),sub:(t,r)=>fr(t-r,e),mul:(t,r)=>fr(t*r,e),pow:(e,t)=>function(e,t,r){if(r<rr)throw new Error("Expected power > 0");if(r===rr)return e.ONE;if(r===nr)return t;let n=e.ONE,i=t;for(;r>rr;)r&nr&&(n=e.mul(n,i)),i=e.sqr(i),r>>=nr;return n}(a,e,t),div:(t,r)=>fr(t*lr(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>lr(t,e),sqrt:n.sqrt||(e=>s(a,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?Gt(e,o):Vt(e,o),fromBytes:e=>{if(e.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${e.length}`);return r?Ht(e):Wt(e)}});return Object.freeze(a)}(Pr,void 0,void 0,{sqrt:function(e){const t=Pr,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),f=e*e*e%t,u=f*f*e%t,d=dr(u,r,t)*u%t,l=dr(d,r,t)*u%t,h=dr(l,Cr,t)*f%t,p=dr(h,i,t)*h%t,b=dr(p,o,t)*p%t,g=dr(b,a,t)*b%t,y=dr(g,c,t)*g%t,m=dr(y,a,t)*b%t,v=dr(m,r,t)*u%t,w=dr(v,s,t)*p%t,_=dr(w,n,t)*f%t,S=dr(_,Cr,t);if(!Br.eql(Br.sqr(S),e))throw new Error("Cannot find square root");return S}}),Lr=function(e,t){const r=t=>xr({...e,...Ir(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:Br,n:Nr,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Nr,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-kr*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),a=Tr(o*e,t),c=Tr(-n*e,t);let f=fr(e-a*r-c*i,t),u=fr(-a*n-c*o,t);const d=f>s,l=u>s;if(d&&(f=t-f),l&&(u=t-u),f>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:f,k2neg:l,k2:u}}}},Tt);function jr(e){return t=>(vt.bytes(t),e(t))}BigInt(0),Lr.ProjectivePoint,vt.bool,vt.bytes,(()=>{const e="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,t="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);t&&!e&&t("crypto")})(),BigInt(0);const Fr={},Ur={};for(let e=0;e<16;e++){const t=e,r=16*e,n=e.toString(16).toLowerCase();Ur[n]=t,Ur[n.toUpperCase()]=t,Fr[n]=r,Fr[n.toUpperCase()]=r}Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const Dr=[];for(let e=0;e<=65535;e++)Dr[e]=BigInt(e);const qr=e=>{if("string"!=typeof e)throw new Error(`hex argument type ${typeof e} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(e))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${e}`);return(e=e.slice(2)).length%2!=0&&(e=function(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}(e)),function(e){const t=e.length,r=new Uint8Array(t/2);for(let n=0;n<t;n+=2)r[n/2]=Fr[e[n]]+Ur[e[n+1]];return r}(e)};BigInt("0xffffffffffffffff"),BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),Lr.CURVE.n,Lr.CURVE.n,BigInt(2),BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),qr("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"),qr("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"),qr("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"),Uint8Array.from([128]),BigInt(-1),BigInt(0),BigInt(1),BigInt(2),BigInt(3),BigInt(7),BigInt(8),BigInt(27),BigInt(28),BigInt(31),BigInt(32),BigInt(64),BigInt(128),BigInt(255),BigInt(256),BigInt(96),BigInt(100),BigInt(160),BigInt(224),BigInt(7922816251426434e13),BigInt(1461501637330903e33),BigInt(2695994666715064e52),BigInt(1e9),Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const zr=BigInt(2**32-1),$r=BigInt(32);function Wr(e,t=!1){return t?{h:Number(e&zr),l:Number(e>>$r&zr)}:{h:0|Number(e>>$r&zr),l:0|Number(e&zr)}}function Hr(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:s}=Wr(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]}const[Vr,Gr,Kr]=[[],[],[]],Jr=BigInt(0),Yr=BigInt(1),Xr=BigInt(2),Zr=BigInt(7),Qr=BigInt(256),en=BigInt(113);for(let e=0,t=Yr,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Vr.push(2*(5*n+r)),Gr.push((e+1)*(e+2)/2%64);let i=Jr;for(let e=0;e<7;e++)t=(t<<Yr^(t>>Zr)*en)%Qr,t&Xr&&(i^=Yr<<(Yr<<BigInt(e))-Yr);Kr.push(i)}const[tn,rn]=Hr(Kr,!0),nn=(e,t,r)=>r>32?((e,t,r)=>t<<r-32|e>>>64-r)(e,t,r):((e,t,r)=>e<<r|t>>>32-r)(e,t,r),on=(e,t,r)=>r>32?((e,t,r)=>e<<r-32|t>>>64-r)(e,t,r):((e,t,r)=>t<<r|e>>>32-r)(e,t,r);class sn extends Mt{constructor(e,t,r,n=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,pt(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=nn(o,s,1)^r[n],c=on(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=Gr[r],o=nn(t,i,n),s=on(t,i,n),a=Vr[r];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=tn[n],e[1]^=rn[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){yt(this);const{blockLen:t,state:r}=this,n=(e=At(e)).length;for(let i=0;i<n;){const o=Math.min(t-this.pos,n-i);for(let t=0;t<o;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){yt(this,!1),bt(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return pt(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(mt(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new sn(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}const an=(e,t,r)=>Ot((()=>new sn(t,e,r))),cn=an(1,144,28),fn=an(1,136,32),un=an(1,104,48),dn=an(1,72,64),ln=(jr(cn),(()=>{const e=jr(fn);return e.create=fn.create,e})());var hn,pn,bn,gn;jr(un),jr(dn),new Uint8Array(0),function(e){e.String="string",e.Bytes="view",e.Number="number"}(hn||(hn={})),function(e){e.String="string",e.Bytes="view",e.JSON="json"}(pn||(pn={})),(gn=bn||(bn={}))[gn.Number=0]="Number",gn[gn.BigInt=1]="BigInt",gn[gn.Uint8Array=2]="Uint8Array",gn[gn.PrefixedHexString=3]="PrefixedHexString",jr(Tt);var yn=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mn=Math.ceil,vn=Math.floor,wn="[BigNumber Error] ",_n=wn+"Number primitive has more than 15 significant digits: ",Sn=1e14,En=14,An=9007199254740991,Mn=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],On=1e7,Rn=1e9;function xn(e){var t=0|e;return e>0||e===t?t:t-1}function In(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=En-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function Pn(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,c=e.e,f=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=c==f,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>f^r?1:-1;for(a=(c=i.length)<(f=o.length)?c:f,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return c==f?0:c>f^r?1:-1}function Nn(e,t,r,n){if(e<t||e>r||e!==vn(e))throw Error(wn+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function kn(e){var t=e.c.length-1;return xn(e.e/En)==t&&e.c[t]%2!=0}function Cn(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Tn(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}!function e(t){var r,n,i,o,s,a,c,f,u,d,l=O.prototype={constructor:O,toString:null,valueOf:null},h=new O(1),p=20,b=4,g=-7,y=21,m=-1e7,v=1e7,w=!1,_=1,S=0,E={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",M=!0;function O(e,t){var r,o,s,a,c,f,u,d,l=this;if(!(l instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return l.s=e.s,void(!e.c||e.e>v?l.c=l.e=null:e.e<m?l.c=[l.e=0]:(l.e=e.e,l.c=e.c.slice()));if((f="number"==typeof e)&&0*e==0){if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,c=e;c>=10;c/=10,a++);return void(a>v?l.c=l.e=null:(l.e=a,l.c=[e]))}d=String(e)}else{if(!yn.test(d=String(e)))return i(l,d,f);l.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(a=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(a<0&&(a=c),a+=+d.slice(c+1),d=d.substring(0,c)):a<0&&(a=d.length)}else{if(Nn(t,2,A.length,"Base"),10==t&&M)return P(l=new O(e),p+l.e+1,b);if(d=String(e),f="number"==typeof e){if(0*e!=0)return i(l,d,f,t);if(l.s=1/e<0?(d=d.slice(1),-1):1,O.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(_n+e)}else l.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=A.slice(0,t),a=c=0,u=d.length;c<u;c++)if(r.indexOf(o=d.charAt(c))<0){if("."==o){if(c>a){a=u;continue}}else if(!s&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){s=!0,c=-1,a=0;continue}return i(l,String(e),f,t)}f=!1,(a=(d=n(d,t,10,l.s)).indexOf("."))>-1?d=d.replace(".",""):a=d.length}for(c=0;48===d.charCodeAt(c);c++);for(u=d.length;48===d.charCodeAt(--u););if(d=d.slice(c,++u)){if(u-=c,f&&O.DEBUG&&u>15&&(e>An||e!==vn(e)))throw Error(_n+l.s*e);if((a=a-c-1)>v)l.c=l.e=null;else if(a<m)l.c=[l.e=0];else{if(l.e=a,l.c=[],c=(a+1)%En,a<0&&(c+=En),c<u){for(c&&l.c.push(+d.slice(0,c)),u-=En;c<u;)l.c.push(+d.slice(c,c+=En));c=En-(d=d.slice(c)).length}else c-=u;for(;c--;d+="0");l.c.push(+d)}}else l.c=[l.e=0]}function R(e,t,r,n){var i,o,s,a,c;if(null==r?r=b:Nn(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=In(e.c),c=1==n||2==n&&(s<=g||s>=y)?Cn(c,s):Tn(c,s,"0");else if(o=(e=P(new O(e),t,r)).e,a=(c=In(e.c)).length,1==n||2==n&&(t<=o||o<=g)){for(;a<t;c+="0",a++);c=Cn(c,o)}else if(t-=s,c=Tn(c,o,"0"),o+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function x(e,t){for(var r,n,i=1,o=new O(e[0]);i<e.length;i++)(!(n=new O(e[i])).s||(r=Pn(o,n))===t||0===r&&o.s===t)&&(o=n);return o}function I(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*En-1)>v?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function P(e,t,r,n){var i,o,s,a,c,f,u,d=e.c,l=Mn;if(d){e:{for(i=1,a=d[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=En,s=t,c=d[f=0],u=vn(c/l[i-s-1]%10);else if((f=mn((o+1)/En))>=d.length){if(!n)break e;for(;d.length<=f;d.push(0));c=u=0,i=1,s=(o%=En)-En+1}else{for(c=a=d[f],i=1;a>=10;a/=10,i++);u=(s=(o%=En)-En+i)<0?0:vn(c/l[i-s-1]%10)}if(n=n||t<0||null!=d[f+1]||(s<0?c:c%l[i-s-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(o>0?s>0?c/l[i-s]:0:d[f-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,n?(t-=e.e+1,d[0]=l[(En-t%En)%En],e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=f,a=1,f--):(d.length=f+1,a=l[En-o],d[f]=s>0?vn(c/l[i-s]%l[s])*a:0),n)for(;;){if(0==f){for(o=1,s=d[0];s>=10;s/=10,o++);for(s=d[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,d[0]==Sn&&(d[0]=1));break}if(d[f]+=a,d[f]!=Sn)break;d[f--]=0,a=1}for(o=d.length;0===d[--o];d.pop());}e.e>v?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function N(e){var t,r=e.e;return null===r?e.toString():(t=In(e.c),t=r<=g||r>=y?Cn(t,r):Tn(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=e,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(wn+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Nn(r=e[t],0,Rn,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(Nn(r=e[t],0,8,t),b=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(Nn(r[0],-Rn,0,t),Nn(r[1],0,Rn,t),g=r[0],y=r[1]):(Nn(r,-Rn,Rn,t),g=-(y=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)Nn(r[0],-Rn,-1,t),Nn(r[1],1,Rn,t),m=r[0],v=r[1];else{if(Nn(r,-Rn,Rn,t),!r)throw Error(wn+t+" cannot be zero: "+r);m=-(v=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(wn+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(wn+"crypto unavailable");w=r}else w=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(Nn(r=e[t],0,9,t),_=r),e.hasOwnProperty(t="POW_PRECISION")&&(Nn(r=e[t],0,Rn,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(wn+t+" not an object: "+r);E=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(wn+t+" invalid: "+r);M="0123456789"==r.slice(0,10),A=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:b,EXPONENTIAL_AT:[g,y],RANGE:[m,v],CRYPTO:w,MODULO_MODE:_,POW_PRECISION:S,FORMAT:E,ALPHABET:A}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-Rn&&i<=Rn&&i===vn(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%En)<1&&(t+=En),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=Sn||r!==vn(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(wn+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return x(arguments,-1)},O.minimum=O.min=function(){return x(arguments,1)},O.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return vn(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,a=0,c=[],f=new O(h);if(null==e?e=p:Nn(e,0,Rn),i=mn(e/En),w)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(c.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw w=!1,Error(wn+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(c.push(o%1e14),a+=7);a=i/7}if(!w)for(;a<i;)(o=s())<9e15&&(c[a++]=o%1e14);for(i=c[--a],e%=En,i&&e&&(o=Mn[En-e],c[a]=vn(i/o)*o);0===c[a];c.pop(),a--);if(a<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=En);for(a=1,o=c[0];o>=10;o/=10,a++);a<En&&(n-=En-a)}return f.e=n,f.c=c,f}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,c=e.length;a<c;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var c,f,u,d,l,h,g,y,m=n.indexOf("."),v=p,w=b;for(m>=0&&(d=S,S=0,n=n.replace(".",""),h=(y=new O(i)).pow(n.length-m),S=d,y.c=t(Tn(In(h.c),h.e,"0"),10,o,e),y.e=y.c.length),u=d=(g=t(n,i,o,a?(c=A,e):(c=e,A))).length;0==g[--d];g.pop());if(!g[0])return c.charAt(0);if(m<0?--u:(h.c=g,h.e=u,h.s=s,g=(h=r(h,y,v,w,o)).c,l=h.r,u=h.e),m=g[f=u+v+1],d=o/2,l=l||f<0||null!=g[f+1],l=w<4?(null!=m||l)&&(0==w||w==(h.s<0?3:2)):m>d||m==d&&(4==w||l||6==w&&1&g[f-1]||w==(h.s<0?8:7)),f<1||!g[0])n=l?Tn(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(g.length=f,l)for(--o;++g[--f]>o;)g[f]=0,f||(++u,g=[1].concat(g));for(d=g.length;!g[--d];);for(m=0,n="";m<=d;n+=c.charAt(g[m++]));n=Tn(n,u,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,c=e.length,f=t%On,u=t/On|0;for(e=e.slice();c--;)a=((i=f*(o=e[c]%On)+(n=u*o+(s=e[c]/On|0)*f)%On*On+a)/r|0)+(n/On|0)+u*s,e[c]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var c,f,u,d,l,h,p,b,g,y,m,v,w,_,S,E,A,M=n.s==i.s?1:-1,R=n.c,x=i.c;if(!(R&&R[0]&&x&&x[0]))return new O(n.s&&i.s&&(R?!x||R[0]!=x[0]:x)?R&&0==R[0]||!x?0*M:M/0:NaN);for(g=(b=new O(M)).c=[],M=o+(f=n.e-i.e)+1,a||(a=Sn,f=xn(n.e/En)-xn(i.e/En),M=M/En|0),u=0;x[u]==(R[u]||0);u++);if(x[u]>(R[u]||0)&&f--,M<0)g.push(1),d=!0;else{for(_=R.length,E=x.length,u=0,M+=2,(l=vn(a/(x[0]+1)))>1&&(x=e(x,l,a),R=e(R,l,a),E=x.length,_=R.length),w=E,m=(y=R.slice(0,E)).length;m<E;y[m++]=0);A=x.slice(),A=[0].concat(A),S=x[0],x[1]>=a/2&&S++;do{if(l=0,(c=t(x,y,E,m))<0){if(v=y[0],E!=m&&(v=v*a+(y[1]||0)),(l=vn(v/S))>1)for(l>=a&&(l=a-1),p=(h=e(x,l,a)).length,m=y.length;1==t(h,y,p,m);)l--,r(h,E<p?A:x,p,a),p=h.length,c=1;else 0==l&&(c=l=1),p=(h=x.slice()).length;if(p<m&&(h=[0].concat(h)),r(y,h,m,a),m=y.length,-1==c)for(;t(x,y,E,m)<1;)l++,r(y,E<m?A:x,m,a),m=y.length}else 0===c&&(l++,y=[0]);g[u++]=l,y[0]?y[m++]=R[w]||0:(y=[R[w]],m=1)}while((w++<_||null!=y[0])&&M--);d=null!=y[0],g[0]||g.splice(0,1)}if(a==Sn){for(u=1,M=g[0];M>=10;M/=10,u++);P(b,o+(b.e=u+f*En-1)+1,s,d)}else b.e=f,b.r=+d;return b}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,f=/^\.([^.]+)$/,u=/^-?(Infinity|NaN)$/,d=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(d,"");if(u.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(c,"$1").replace(f,"0.$1")),t!=o))return new O(o,i);if(O.DEBUG)throw Error(wn+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},l.absoluteValue=l.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},l.comparedTo=function(e,t){return Pn(this,new O(e,t))},l.decimalPlaces=l.dp=function(e,t){var r,n,i,o=this;if(null!=e)return Nn(e,0,Rn),null==t?t=b:Nn(t,0,8),P(new O(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-xn(this.e/En))*En,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},l.dividedBy=l.div=function(e,t){return r(this,new O(e,t),p,b)},l.dividedToIntegerBy=l.idiv=function(e,t){return r(this,new O(e,t),0,1)},l.exponentiatedBy=l.pow=function(e,t){var r,n,i,o,s,a,c,f,u=this;if((e=new O(e)).c&&!e.isInteger())throw Error(wn+"Exponent not an integer: "+N(e));if(null!=t&&(t=new O(t)),s=e.e>14,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return f=new O(Math.pow(+N(u),s?e.s*(2-kn(e)):+N(e))),t?f.mod(t):f;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!a&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(e.e>9&&(u.e>0||u.e<-1||(0==u.e?u.c[0]>1||s&&u.c[1]>=24e7:u.c[0]<8e13||s&&u.c[0]<=9999975e7)))return o=u.s<0&&kn(e)?-0:0,u.e>-1&&(o=1/o),new O(a?1/o:o);S&&(o=mn(S/En+2))}for(s?(r=new O(.5),a&&(e.s=1),c=kn(e)):c=(i=Math.abs(+N(e)))%2,f=new O(h);;){if(c){if(!(f=f.times(u)).c)break;o?f.c.length>o&&(f.c.length=o):n&&(f=f.mod(t))}if(i){if(0===(i=vn(i/2)))break;c=i%2}else if(P(e=e.times(r),e.e+1,1),e.e>14)c=kn(e);else{if(0==(i=+N(e)))break;c=i%2}u=u.times(u),o?u.c&&u.c.length>o&&(u.c.length=o):n&&(u=u.mod(t))}return n?f:(a&&(f=h.div(f)),t?f.mod(t):o?P(f,S,b,void 0):f)},l.integerValue=function(e){var t=new O(this);return null==e?e=b:Nn(e,0,8),P(t,t.e+1,e)},l.isEqualTo=l.eq=function(e,t){return 0===Pn(this,new O(e,t))},l.isFinite=function(){return!!this.c},l.isGreaterThan=l.gt=function(e,t){return Pn(this,new O(e,t))>0},l.isGreaterThanOrEqualTo=l.gte=function(e,t){return 1===(t=Pn(this,new O(e,t)))||0===t},l.isInteger=function(){return!!this.c&&xn(this.e/En)>this.c.length-2},l.isLessThan=l.lt=function(e,t){return Pn(this,new O(e,t))<0},l.isLessThanOrEqualTo=l.lte=function(e,t){return-1===(t=Pn(this,new O(e,t)))||0===t},l.isNaN=function(){return!this.s},l.isNegative=function(){return this.s<0},l.isPositive=function(){return this.s>0},l.isZero=function(){return!!this.c&&0==this.c[0]},l.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new O(e,t)).s,!a||!t)return new O(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/En,f=e.e/En,u=s.c,d=e.c;if(!c||!f){if(!u||!d)return u?(e.s=-t,e):new O(d?s:NaN);if(!u[0]||!d[0])return d[0]?(e.s=-t,e):new O(u[0]?s:3==b?-0:0)}if(c=xn(c),f=xn(f),u=u.slice(),a=c-f){for((o=a<0)?(a=-a,i=u):(f=c,i=d),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=u.length)<(t=d.length))?a:t,a=t=0;t<n;t++)if(u[t]!=d[t]){o=u[t]<d[t];break}if(o&&(i=u,u=d,d=i,e.s=-e.s),(t=(n=d.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=Sn-1;n>a;){if(u[--n]<d[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=Sn}u[n]-=d[n]}for(;0==u[0];u.splice(0,1),--f);return u[0]?I(e,u,f):(e.s=3==b?-1:1,e.c=[e.e=0],e)},l.modulo=l.mod=function(e,t){var n,i,o=this;return e=new O(e,t),!o.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||o.c&&!o.c[0]?new O(o):(9==_?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,_),(e=o.minus(n.times(e))).c[0]||1!=_||(e.s=o.s),e)},l.multipliedBy=l.times=function(e,t){var r,n,i,o,s,a,c,f,u,d,l,h,p,b,g,y=this,m=y.c,v=(e=new O(e,t)).c;if(!(m&&v&&m[0]&&v[0]))return!y.s||!e.s||m&&!m[0]&&!v||v&&!v[0]&&!m?e.c=e.e=e.s=null:(e.s*=y.s,m&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=xn(y.e/En)+xn(e.e/En),e.s*=y.s,(c=m.length)<(d=v.length)&&(p=m,m=v,v=p,i=c,c=d,d=i),i=c+d,p=[];i--;p.push(0));for(b=Sn,g=On,i=d;--i>=0;){for(r=0,l=v[i]%g,h=v[i]/g|0,o=i+(s=c);o>i;)r=((f=l*(f=m[--s]%g)+(a=h*f+(u=m[s]/g|0)*l)%g*g+p[o]+r)/b|0)+(a/g|0)+h*u,p[o--]=f%b;p[o]=r}return r?++n:p.splice(0,1),I(e,p,n)},l.negated=function(){var e=new O(this);return e.s=-e.s||null,e},l.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new O(e,t)).s,!i||!t)return new O(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/En,s=e.e/En,a=n.c,c=e.c;if(!o||!s){if(!a||!c)return new O(i/0);if(!a[0]||!c[0])return c[0]?e:new O(a[0]?n:0*i)}if(o=xn(o),s=xn(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=c):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/Sn|0,a[t]=Sn===a[t]?0:a[t]%Sn;return i&&(a=[i].concat(a),++s),I(e,a,s)},l.precision=l.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return Nn(e,1,Rn),null==t?t=b:Nn(t,0,8),P(new O(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*En+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},l.shiftedBy=function(e){return Nn(e,-9007199254740991,An),this.times("1e"+e)},l.squareRoot=l.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,c=s.s,f=s.e,u=p+4,d=new O("0.5");if(1!==c||!a||!a[0])return new O(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+N(s)))||c==1/0?(((t=In(a)).length+f)%2==0&&(t+="0"),c=Math.sqrt(+t),f=xn((f+1)/2)-(f<0||f%2),n=new O(t=c==1/0?"5e"+f:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+f)):n=new O(c+""),n.c[0])for((c=(f=n.e)+u)<3&&(c=0);;)if(o=n,n=d.times(o.plus(r(s,o,u,1))),In(o.c).slice(0,c)===(t=In(n.c)).slice(0,c)){if(n.e<f&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(n,n.e+p+2,1),e=!n.times(n).eq(s));break}if(!i&&(P(o,o.e+p+2,0),o.times(o).eq(s))){n=o;break}u+=4,c+=4,i=1}return P(n,n.e+p+1,b,e)},l.toExponential=function(e,t){return null!=e&&(Nn(e,0,Rn),e++),R(this,e,t,1)},l.toFixed=function(e,t){return null!=e&&(Nn(e,0,Rn),e=e+this.e+1),R(this,e,t)},l.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=E;else if("object"!=typeof r)throw Error(wn+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,c=+r.secondaryGroupSize,f=r.groupSeparator||"",u=s[0],d=s[1],l=i.s<0,h=l?u.slice(1):u,p=h.length;if(c&&(o=a,a=c,c=o,p-=o),a>0&&p>0){for(o=p%a||a,u=h.substr(0,o);o<p;o+=a)u+=f+h.substr(o,a);c>0&&(u+=f+h.slice(o)),l&&(u="-"+u)}n=d?u+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):u}return(r.prefix||"")+n+(r.suffix||"")},l.toFraction=function(e){var t,n,i,o,s,a,c,f,u,d,l,p,g=this,y=g.c;if(null!=e&&(!(c=new O(e)).isInteger()&&(c.c||1!==c.s)||c.lt(h)))throw Error(wn+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+N(c));if(!y)return new O(g);for(t=new O(h),u=n=new O(h),i=f=new O(h),p=In(y),s=t.e=p.length-g.e-1,t.c[0]=Mn[(a=s%En)<0?En+a:a],e=!e||c.comparedTo(t)>0?s>0?t:u:c,a=v,v=1/0,c=new O(p),f.c[0]=0;d=r(c,t,0,1),1!=(o=n.plus(d.times(i))).comparedTo(e);)n=i,i=o,u=f.plus(d.times(o=u)),f=o,t=c.minus(d.times(o=t)),c=o;return o=r(e.minus(n),i,0,1),f=f.plus(o.times(u)),n=n.plus(o.times(i)),f.s=u.s=g.s,l=r(u,i,s*=2,b).minus(g).abs().comparedTo(r(f,n,s,b).minus(g).abs())<1?[u,i]:[f,n],v=a,l},l.toNumber=function(){return+N(this)},l.toPrecision=function(e,t){return null!=e&&Nn(e,1,Rn),R(this,e,t,2)},l.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=g||o>=y?Cn(In(r.c),o):Tn(In(r.c),o,"0"):10===e&&M?t=Tn(In((r=P(new O(r),p+o+1,b)).c),r.e,"0"):(Nn(e,2,A.length,"Base"),t=n(Tn(In(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},l.valueOf=l.toJSON=function(){return N(this)},l._isBigNumber=!0,l[Symbol.toStringTag]="BigNumber",l[Symbol.for("nodejs.util.inspect.custom")]=l.valueOf,null!=t&&O.set(t),O}();class Bn{ttl;map=new Map;_to=!1;constructor(e){this.ttl=e}has(e){return this.map.has(e)}add(e){this.map.set(e,Ln()),this._to||(this._to=!0,setTimeout((()=>{this._to=!1,function(e){const t=Ln()-e.ttl,r=e.map[Symbol.iterator]();for(;;){const n=r.next().value;if(!n)return;const i=n[0];if(!(n[1]<t))return;e.map.delete(i)}}(this)}),0))}clear(){this.map.clear()}}function Ln(){return Date.now()}const jn=Object.create(null);jn.open="0",jn.close="1",jn.ping="2",jn.pong="3",jn.message="4",jn.upgrade="5",jn.noop="6";const Fn=Object.create(null);Object.keys(jn).forEach((e=>{Fn[jn[e]]=e}));const Un={type:"error",data:"parser error"},Dn="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),qn="function"==typeof ArrayBuffer,zn=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$n=({type:e,data:t},r,n)=>Dn&&t instanceof Blob?r?n(t):Wn(t,n):qn&&(t instanceof ArrayBuffer||zn(t))?r?n(t):Wn(new Blob([t]),n):n(jn[e]+(t||"")),Wn=(e,t)=>{const r=new FileReader;return r.onload=function(){const e=r.result.split(",")[1];t("b"+(e||""))},r.readAsDataURL(e)};function Hn(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Vn;const Gn="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)Gn["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)]=e;const Kn="function"==typeof ArrayBuffer,Jn=(e,t)=>{if("string"!=typeof e)return{type:"message",data:Xn(e,t)};const r=e.charAt(0);return"b"===r?{type:"message",data:Yn(e.substring(1),t)}:Fn[r]?e.length>1?{type:Fn[r],data:e.substring(1)}:{type:Fn[r]}:Un},Yn=(e,t)=>{if(Kn){const r=(e=>{let t,r,n,i,o,s=.75*e.length,a=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);const f=new ArrayBuffer(s),u=new Uint8Array(f);for(t=0;t<a;t+=4)r=Gn[e.charCodeAt(t)],n=Gn[e.charCodeAt(t+1)],i=Gn[e.charCodeAt(t+2)],o=Gn[e.charCodeAt(t+3)],u[c++]=r<<2|n>>4,u[c++]=(15&n)<<4|i>>2,u[c++]=(3&i)<<6|63&o;return f})(e);return Xn(r,t)}return{base64:!0,data:e}},Xn=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Zn=String.fromCharCode(30);let Qn;function ei(e){return e.reduce(((e,t)=>e+t.length),0)}function ti(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let i=0;i<t;i++)r[i]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function ri(e){if(e)return function(e){for(var t in ri.prototype)e[t]=ri.prototype[t];return e}(e)}ri.prototype.on=ri.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},ri.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},ri.prototype.off=ri.prototype.removeListener=ri.prototype.removeAllListeners=ri.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+e],this},ri.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){n=0;for(var i=(r=r.slice(0)).length;n<i;++n)r[n].apply(this,t)}return this},ri.prototype.emitReserved=ri.prototype.emit,ri.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},ri.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ni="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function ii(e,...t){return t.reduce(((t,r)=>(e.hasOwnProperty(r)&&(t[r]=e[r]),t)),{})}const oi=ni.setTimeout,si=ni.clearTimeout;function ai(e,t){t.useNativeTimers?(e.setTimeoutFn=oi.bind(ni),e.clearTimeoutFn=si.bind(ni)):(e.setTimeoutFn=ni.setTimeout.bind(ni),e.clearTimeoutFn=ni.clearTimeout.bind(ni))}class ci extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class fi extends ri{constructor(e){super(),this.writable=!1,ai(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new ci(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Jn(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}(e);return t.length?"?"+t:""}}const ui="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),di=64,li={};let hi,pi=0,bi=0;function gi(e){let t="";do{t=ui[e%di]+t,e=Math.floor(e/di)}while(e>0);return t}function yi(){const e=gi(+new Date);return e!==hi?(pi=0,hi=e):e+"."+gi(pi++)}for(;bi<di;bi++)li[ui[bi]]=bi;let mi=!1;try{mi="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}const vi=mi;function wi(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||vi))return new XMLHttpRequest}catch(e){}if(!t)try{return new(ni[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}function _i(){}const Si=null!=new wi({xdomain:!1}).responseType;class Ei extends ri{constructor(e,t){super(),ai(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=void 0!==t.data?t.data:null,this.create()}create(){var e;const t=ii(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const r=this.xhr=new wi(t);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{r.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this.opts.cookieJar)||void 0===e||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var e;3===r.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=Ei.requestsCount++,Ei.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=_i,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Ei.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function Ai(){for(let e in Ei.requests)Ei.requests.hasOwnProperty(e)&&Ei.requests[e].abort()}Ei.requestsCount=0,Ei.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",Ai):"function"==typeof addEventListener&&addEventListener("onpagehide"in ni?"pagehide":"unload",Ai,!1));const Mi="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Oi=ni.WebSocket||ni.MozWebSocket;r(1048).Buffer;const Ri="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),xi={websocket:class extends fi{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,r=Ri?{}:ii(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Ri?new Oi(e,t,r):t?new Oi(e,t):new Oi(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;$n(r,this.supportsBinary,(e=>{try{this.ws.send(e)}catch(e){}n&&Mi((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=yi()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!Oi}},webtransport:class extends fi{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((e=>{const t=function(e,t){Qn||(Qn=new TextDecoder);const r=[];let n=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===n){if(ei(r)<1)break;const e=ti(r,1);o=!(128&~e[0]),i=127&e[0],n=i<126?3:126===i?1:2}else if(1===n){if(ei(r)<2)break;const e=ti(r,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),n=3}else if(2===n){if(ei(r)<8)break;const e=ti(r,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(Un);break}i=o*Math.pow(2,32)+t.getUint32(4),n=3}else{if(ei(r)<i)break;const e=ti(r,i);a.enqueue(Jn(o?e:Qn.decode(e),t)),n=0}if(0===i||i>e){a.enqueue(Un);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),n=new TransformStream({transform(e,t){!function(e,t){Dn&&e.data instanceof Blob?e.data.arrayBuffer().then(Hn).then(t):qn&&(e.data instanceof ArrayBuffer||zn(e.data))?t(Hn(e.data)):$n(e,!1,(e=>{Vn||(Vn=new TextEncoder),t(Vn.encode(e))}))}(e,(r=>{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,n)}else{i=new Uint8Array(9);const e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(n))}e.data&&"string"!=typeof e.data&&(i[0]|=128),t.enqueue(i),t.enqueue(r)}))}});n.readable.pipeTo(e.writable),this.writer=n.writable.getWriter();const i=()=>{r.read().then((({done:e,value:t})=>{e||(this.onPacket(t),i())})).catch((e=>{}))};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then((()=>this.onOpen()))}))})))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;this.writer.write(r).then((()=>{n&&Mi((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}},polling:class extends fi{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let r=location.port;r||(r=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||r!==e.port}const t=e&&e.forceBase64;this.supportsBinary=Si&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const r=e.split(Zn),n=[];for(let e=0;e<r.length;e++){const i=Jn(r[e],t);if(n.push(i),"error"===i.type)break}return n})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const r=e.length,n=new Array(r);let i=0;e.forEach(((e,o)=>{$n(e,!1,(e=>{n[o]=e,++i===r&&t(n.join(Zn))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=yi()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ei(this.uri(),e)}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},Ii=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Pi=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ni(e){if(e.length>2e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");-1!=r&&-1!=n&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let i=Ii.exec(e||""),o={},s=14;for(;s--;)o[Pi[s]]=i[s]||"";return-1!=r&&-1!=n&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(e,t){const r=t.replace(/\/{2,9}/g,"/").split("/");return"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1),"/"==t.slice(-1)&&r.splice(r.length-1,1),r}(0,o.path),o.queryKey=function(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(r[t]=n)})),r}(0,o.query),o}class ki extends ri{constructor(e,t={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=Ni(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=Ni(t.host).host),ai(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},r=e.split("&");for(let e=0,n=r.length;e<n;e++){let n=r[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new xi[e](r)}open(){let e;if(this.opts.rememberUpgrade&&ki.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){let t=this.createTransport(e),r=!1;ki.priorWebsocketSuccess=!1;const n=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",(e=>{if(!r)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;ki.priorWebsocketSuccess="websocket"===t.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(f(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}})))};function i(){r||(r=!0,f(),t.close(),t=null)}const o=e=>{const r=new Error("probe error: "+e);r.transport=t.name,i(),this.emitReserved("upgradeError",r)};function s(){o("transport closed")}function a(){o("socket closed")}function c(e){t&&e.name!==t.name&&i()}const f=()=>{t.removeListener("open",n),t.removeListener("error",o),t.removeListener("close",s),this.off("close",a),this.off("upgrading",c)};t.once("open",n),t.once("error",o),t.once("close",s),this.once("close",a),this.once("upgrading",c),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn((()=>{r||t.open()}),200):t.open()}onOpen(){if(this.readyState="open",ki.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let r=0;r<this.writeBuffer.length;r++){const n=this.writeBuffer[r].data;if(n&&(e+="string"==typeof(t=n)?function(e){let t=0,r=0;for(let n=0,i=e.length;n<i;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))),r>0&&e>this.maxPayload)return this.writeBuffer.slice(0,r);e+=2}var t;return this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const i={type:e,data:t,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?r():e()})):this.upgrading?r():e()),this}onError(e){ki.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let r=0;const n=e.length;for(;r<n;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}}ki.protocol=4,ki.protocol;const Ci="function"==typeof ArrayBuffer,Ti=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Bi=Object.prototype.toString,Li="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Bi.call(Blob),ji="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Bi.call(File);function Fi(e){return Ci&&(e instanceof ArrayBuffer||Ti(e))||Li&&e instanceof Blob||ji&&e instanceof File}function Ui(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,r=e.length;t<r;t++)if(Ui(e[t]))return!0;return!1}if(Fi(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return Ui(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&Ui(e[t]))return!0;return!1}function Di(e){const t=[],r=e.data,n=e;return n.data=qi(r,t),n.attachments=t.length,{packet:n,buffers:t}}function qi(e,t){if(!e)return e;if(Fi(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=qi(e[n],t);return r}if("object"==typeof e&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=qi(e[n],t));return r}return e}function zi(e,t){return e.data=$i(e.data,t),delete e.attachments,e}function $i(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=$i(e[r],t);else if("object"==typeof e)for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=$i(e[r],t));return e}const Wi=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Hi=5;var Vi;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(Vi||(Vi={}));class Gi{constructor(e){this.replacer=e}encode(e){return e.type!==Vi.EVENT&&e.type!==Vi.ACK||!Ui(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===Vi.EVENT?Vi.BINARY_EVENT:Vi.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==Vi.BINARY_EVENT&&e.type!==Vi.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=Di(e),r=this.encodeAsString(t.packet),n=t.buffers;return n.unshift(r),n}}function Ki(e){return"[object Object]"===Object.prototype.toString.call(e)}class Ji extends ri{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const r=t.type===Vi.BINARY_EVENT;r||t.type===Vi.BINARY_ACK?(t.type=r?Vi.EVENT:Vi.ACK,this.reconstructor=new Yi(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!Fi(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const r={type:Number(e.charAt(0))};if(void 0===Vi[r.type])throw new Error("unknown packet type "+r.type);if(r.type===Vi.BINARY_EVENT||r.type===Vi.BINARY_ACK){const n=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(n,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");r.attachments=Number(i)}if("/"===e.charAt(t+1)){const n=t+1;for(;++t&&","!==e.charAt(t)&&t!==e.length;);r.nsp=e.substring(n,t)}else r.nsp="/";const n=e.charAt(t+1);if(""!==n&&Number(n)==n){const n=t+1;for(;++t;){const r=e.charAt(t);if(null==r||Number(r)!=r){--t;break}if(t===e.length)break}r.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){const n=this.tryParse(e.substr(t));if(!Ji.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case Vi.CONNECT:return Ki(t);case Vi.DISCONNECT:return void 0===t;case Vi.CONNECT_ERROR:return"string"==typeof t||Ki(t);case Vi.EVENT:case Vi.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===Wi.indexOf(t[0]));case Vi.ACK:case Vi.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Yi{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=zi(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Xi(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const Zi=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Qi extends ri{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Xi(e,"open",this.onopen.bind(this)),Xi(e,"packet",this.onpacket.bind(this)),Xi(e,"error",this.onerror.bind(this)),Xi(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(Zi.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const r={type:Vi.EVENT,data:t,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,n=t.pop();this._registerAckCallback(e,n),r.id=e}const n=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!n||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,t){var r;const n=null!==(r=this.flags.timeout)&&void 0!==r?r:this._opts.ackTimeout;if(void 0===n)return void(this.acks[e]=t);const i=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),n),o=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,e)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise(((r,n)=>{const i=(e,t)=>e?n(e):r(t);i.withError=!0,t.push(i),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...n)=>{if(r===this._queue[0])return null!==e?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...n)),r.pending=!1,this._drainQueue()})),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Vi.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((e=>{if(!this.sendBuffer.some((t=>String(t.id)===e))){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}}))}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Vi.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Vi.EVENT:case Vi.BINARY_EVENT:this.onevent(e);break;case Vi.ACK:case Vi.BINARY_ACK:this.onack(e);break;case Vi.DISCONNECT:this.ondisconnect();break;case Vi.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...n){r||(r=!0,t.packet({type:Vi.ACK,id:e,data:n}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Vi.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const r of t)r.apply(this,e.data)}}}function eo(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}eo.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+r:e-r}return 0|Math.min(e,this.max)},eo.prototype.reset=function(){this.attempts=0},eo.prototype.setMin=function(e){this.ms=e},eo.prototype.setMax=function(e){this.max=e},eo.prototype.setJitter=function(e){this.jitter=e};class to extends ri{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(r=e,e=void 0),(r=r||{}).path=r.path||"/socket.io",this.opts=r,ai(this,r),this.reconnection(!1!==r.reconnection),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=r.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new eo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==r.timeout?2e4:r.timeout),this._readyState="closed",this.uri=e;const i=r.parser||t;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=!1!==r.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ki(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=Xi(t,"open",(function(){r.onopen(),e&&e()})),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},o=Xi(t,"error",i);if(!1!==this._timeout){const e=this._timeout,r=this.setTimeoutFn((()=>{n(),i(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}return this.subs.push(n),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Xi(e,"ping",this.onping.bind(this)),Xi(e,"data",this.ondata.bind(this)),Xi(e,"error",this.onerror.bind(this)),Xi(e,"close",this.onclose.bind(this)),Xi(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){Mi((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Qi(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const e of t)if(this.nsps[e].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const ro={};function no(e,t){"object"==typeof e&&(t=e,e=void 0);const r=function(e,t="",r){let n=e;r=r||"undefined"!=typeof location&&location,null==e&&(e=r.protocol+"//"+r.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?r.protocol+e:r.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==r?r.protocol+"//"+e:"https://"+e),n=Ni(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}(e,(t=t||{}).path||"/socket.io"),n=r.source,i=r.id,o=r.path,s=ro[i]&&o in ro[i].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||s?a=new to(n,t):(ro[i]||(ro[i]=new to(n,t)),a=ro[i]),r.query&&!t.query&&(t.query=r.queryKey),a.socket(r.path,t)}Object.assign(no,{Manager:to,Socket:Qi,io:no,connect:no});var io=r(2671),oo=r.n(io),so=r(3360),ao=r(1048).Buffer;const co=new so.ec("secp256k1"),fo=r.g.crypto||r.g.msCrypto||{},uo=fo.subtle||fo.webkitSubtle,lo=ao.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),ho=ao.alloc(32,0);function po(e,t){if(!e)throw new Error(t||"Assertion failed")}function bo(e){return t=e,!(!ao.isBuffer(t)||32!==t.length)&&e.compare(ho)>0&&e.compare(lo)<0;var t}function go(e){const t=new Uint8Array(e);return void 0===fo.getRandomValues?ao.from(oo().randomBytes(e)):(fo.getRandomValues(t),ao.from(t))}async function yo(e){if(uo){const t=await uo.digest("SHA-512",e);return new Uint8Array(t)}const t=oo().createHash("sha512").update(e).digest();return new Uint8Array(t)}function mo(e){return async function(t,r,n){if(uo){const i={name:"AES-CBC"},o=await uo.importKey("raw",r,i,!1,[e]),s={name:"AES-CBC",iv:t},a=await uo[e](s,o,n);return ao.from(new Uint8Array(a))}if("encrypt"===e){const e=oo().createCipheriv("aes-256-cbc",r,t),i=e.update(n),o=e.final();return ao.concat([i,o])}if("decrypt"===e){const e=oo().createDecipheriv("aes-256-cbc",r,t),i=e.update(n),o=e.final();return ao.concat([i,o])}throw new Error(`Unsupported operation: ${e}`)}}const vo=mo("encrypt"),wo=mo("decrypt");async function _o(e,t){if(uo){const r={name:"HMAC",hash:{name:"SHA-256"}},n=await uo.importKey("raw",new Uint8Array(e),r,!1,["sign","verify"]),i=await uo.sign("HMAC",n,t);return ao.from(new Uint8Array(i))}const r=oo().createHmac("sha256",ao.from(e));return r.update(t),r.digest()}const So=function(e){return po(32===e.length,"Bad private key"),po(bo(e),"Bad private key"),ao.from(co.keyFromPrivate(e).getPublic("array"))},Eo=async function(e,t){return po(32===e.length,"Bad private key"),po(bo(e),"Bad private key"),po(t.length>0,"Message should not be empty"),po(t.length<=32,"Message is too long"),ao.from(co.sign(t,e,{canonical:!0}).toDER())},Ao=async function(e,t){po(ao.isBuffer(e),"Bad private key"),po(ao.isBuffer(t),"Bad public key"),po(32===e.length,"Bad private key"),po(bo(e),"Bad private key"),po(65===t.length||33===t.length,"Bad public key"),65===t.length&&po(4===t[0],"Bad public key"),33===t.length&&po(2===t[0]||3===t[0],"Bad public key");const r=co.keyFromPrivate(e),n=co.keyFromPublic(t),i=r.derive(n.getPublic());return ao.from(i.toArray())},Mo=async function(e,t){po(ao.isBuffer(e),"Bad private key"),po(ao.isBuffer(t),"Bad public key"),po(32===e.length,"Bad private key"),po(bo(e),"Bad private key"),po(65===t.length||33===t.length,"Bad public key"),65===t.length&&po(4===t[0],"Bad public key"),33===t.length&&po(2===t[0]||3===t[0],"Bad public key");const r=co.keyFromPrivate(e),n=co.keyFromPublic(t),i=r.derive(n.getPublic());return ao.from(i.toString(16,64),"hex")},Oo=async function(e,t,r){const n=null!=r&&r,i=n?Mo:Ao,o=await i(e,t.ephemPublicKey),s=await yo(o),a=s.slice(0,32),c=s.slice(32),f=ao.concat([t.iv,t.ephemPublicKey,t.ciphertext]),u=await async function(e,t,r){return function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}(await _o(e,t),r)}(ao.from(c),f,t.mac);if(!u&&!1===n)return Oo(e,t,!0);if(!u&&!0===n)throw new Error("bad MAC after trying padded");const d=await wo(t.iv,ao.from(a),t.ciphertext);return ao.from(new Uint8Array(d))};r(5172);var Ro=r(1048).Buffer;function xo(e){return Ro.from(ln(e))}const Io=new so.ec("secp256k1");async function Po(e,t){const r=JSON.stringify(t),n=Ro.from(r,"utf-8"),i=(o=await async function(e,t,r){let n=(r=r||{}).ephemPrivateKey||go(32);for(;!bo(n);)n=r.ephemPrivateKey||go(32);const i=So(n),o=await Ao(n,e),s=await yo(o),a=r.iv||go(16),c=s.slice(0,32),f=s.slice(32),u=await vo(a,ao.from(c),t),d=ao.concat([a,i,u]);return{iv:a,ephemPublicKey:i,ciphertext:u,mac:await _o(ao.from(f),d)}}(So(Ro.from(e,"hex")),n),{iv:Ro.from(o.iv).toString("hex"),ephemPublicKey:Ro.from(o.ephemPublicKey).toString("hex"),ciphertext:Ro.from(o.ciphertext).toString("hex"),mac:Ro.from(o.mac).toString("hex")});var o;return JSON.stringify(i)}async function No(e,t){const r=(o=JSON.parse(t),{iv:Ro.from(o.iv,"hex"),ephemPublicKey:Ro.from(o.ephemPublicKey,"hex"),ciphertext:Ro.from(o.ciphertext,"hex"),mac:Ro.from(o.mac,"hex")}),n=Io.keyFromPrivate(e),i=(await Oo(Ro.from(n.getPrivate().toString("hex",64),"hex"),r)).toString("utf-8");var o;return JSON.parse(i)}var ko=r(1048).Buffer;Promise.resolve(!1),Promise.resolve(!0);const Co=Promise.resolve();function To(e,t){return e||(e=0),new Promise((r=>setTimeout((()=>r(t)),e)))}function Bo(){return Math.random().toString(36).substring(2)}let Lo=0;function jo(){let e=1e3*Date.now();return e<=Lo&&(e=Lo+1),Lo=e,e}const Fo=$e().getLogger("broadcast-channel");Fo.setLevel("error");var Uo={create:function(e){const t={time:jo(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=e=>{t.messagesCallback&&t.messagesCallback(e.data)},t},close:function(e){e.bc.close(),e.subFns=[]},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){try{return e.bc.postMessage(t,!1),Co}catch(e){return Promise.reject(e)}},canBeUsed:function(){if("undefined"==typeof window)return!1;if("function"==typeof BroadcastChannel){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}return!1},type:"native",averageResponseTime:function(){return 150},microSeconds:jo};function Do(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=JSON.parse(JSON.stringify(e));return void 0===t.webWorkerSupport&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=45e3),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&"function"==typeof e.idb.onclose&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=6e4),t.server||(t.server={}),t.server.url||(t.server.url="https://session.web3auth.io"),t.server.removeTimeout||(t.server.removeTimeout=3e5),e.methods&&(t.methods=e.methods),t}const qo="messages",zo={durability:"relaxed"};function $o(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function Wo(e){e.commit&&e.commit()}function Ho(e){const t="pubkey.broadcast-channel-0-"+e,r=$o().open(t);return r.onupgradeneeded=e=>{e.target.result.createObjectStore(qo,{keyPath:"id",autoIncrement:!0})},new Promise(((e,t)=>{r.onerror=e=>t(e),r.onsuccess=()=>{e(r.result)}}))}function Vo(e,t,r){const n={uuid:t,time:Date.now(),data:r},i=e.transaction([qo],"readwrite",zo);return new Promise(((e,t)=>{i.oncomplete=()=>e(),i.onerror=e=>t(e),i.objectStore(qo).add(n),Wo(i)}))}function Go(e,t){const r=e.transaction(qo,"readonly",zo),n=r.objectStore(qo),i=[];let o=IDBKeyRange.bound(t+1,1/0);if(n.getAll){const e=n.getAll(o);return new Promise(((t,r)=>{e.onerror=e=>r(e),e.onsuccess=function(e){t(e.target.result)}}))}return new Promise(((e,s)=>{const a=function(){try{return o=IDBKeyRange.bound(t+1,1/0),n.openCursor(o)}catch(e){return n.openCursor()}}();a.onerror=e=>s(e),a.onsuccess=n=>{const o=n.target.result;o?o.value.id<t+1?o.continue(t+1):(i.push(o.value),o.continue()):(Wo(r),e(i))}}))}function Ko(e,t){const r=Date.now()-t,n=e.transaction(qo,"readonly",zo),i=n.objectStore(qo),o=[];return new Promise((e=>{i.openCursor().onsuccess=t=>{const i=t.target.result;if(i){const t=i.value;if(!(t.time<r))return Wo(n),void e(o);o.push(t),i.continue()}else e(o)}}))}function Jo(e,t){return Ko(e,t).then((t=>function(e,t){const r=e.transaction([qo],"readwrite",zo).objectStore(qo);return Promise.all(t.map((e=>{const t=r.delete(e);return new Promise((e=>{t.onsuccess=()=>e()}))})))}(e,t.map((e=>e.id)))))}function Yo(e){e.closed||Xo(e).then((()=>To(e.options.idb.fallbackInterval))).then((()=>Yo(e)))}function Xo(e){return e.closed?Co:e.messagesCallback?Go(e.db,e.lastCursorId).then((t=>{const r=t.filter((e=>!!e)).map((t=>(t.id>e.lastCursorId&&(e.lastCursorId=t.id),t))).filter((t=>function(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}(t,e))).sort(((e,t)=>e.time-t.time));return r.forEach((t=>{e.messagesCallback&&(e.eMIs.add(t.id),e.messagesCallback(t.data))})),Co})):Co}var Zo={getIdb:$o,createDatabase:Ho,create:function(e,t){return t=Do(t),Ho(e).then((r=>{const n={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:Bo(),eMIs:new Bn(2*t.idb.ttl),writeBlockPromise:Co,messagesCallback:null,readQueuePromises:[],db:r,time:jo()};return r.onclose=function(){n.closed=!0,t.idb.onclose&&t.idb.onclose()},Yo(n),n}))},close:function(e){e.closed=!0,e.db.close()},onMessage:function(e,t,r){e.messagesCallbackTime=r,e.messagesCallback=t,Xo(e)},postMessage:function(e,t){return e.writeBlockPromise=e.writeBlockPromise.then((()=>Vo(e.db,e.uuid,t))).then((()=>{0===Math.floor(11*Math.random()+0)&&Jo(e.db,e.options.idb.ttl)})),e.writeBlockPromise},canBeUsed:function(){return!!$o()},type:"idb",averageResponseTime:function(e){return 2*e.idb.fallbackInterval},microSeconds:jo,writeMessage:Vo,getAllMessages:function(e){const t=e.transaction(qo,"readonly",zo),r=t.objectStore(qo),n=[];return new Promise((e=>{r.openCursor().onsuccess=r=>{const i=r.target.result;i?(n.push(i.value),i.continue()):(Wo(t),e(n))}}))},cleanOldMessages:Jo,getMessagesHigherThan:Go,getOldMessages:Ko};const Qo="pubkey.broadcastChannel-";function es(){let e;if("undefined"==typeof window)return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch(e){}return e}function ts(e){return Qo+e}function rs(e,t){const r=ts(e),n=e=>{e.key===r&&t(JSON.parse(e.newValue))};return window.addEventListener("storage",n),n}function ns(e){window.removeEventListener("storage",e)}function is(){const e=es();if(!e)return!1;try{const t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch(e){return!1}return!0}var os={getLocalStorage:es,create:function(e,t){if(t=Do(t),!is())throw new Error("BroadcastChannel: localstorage cannot be used");const r=Bo(),n=new Bn(t.localstorage.removeTimeout),i={channelName:e,uuid:r,time:jo(),eMIs:n};return i.listener=rs(e,(e=>{i.messagesCallback&&e.uuid!==r&&e.token&&!n.has(e.token)&&(e.data.time&&e.data.time<i.messagesCallbackTime||(n.add(e.token),i.messagesCallback(e.data)))})),i},close:function(e){ns(e.listener)},onMessage:function(e,t,r){e.messagesCallbackTime=r,e.messagesCallback=t},postMessage:function(e,t){return new Promise((r=>{To().then((()=>{const n=ts(e.channelName),i={token:Bo(),time:Date.now(),data:t,uuid:e.uuid},o=JSON.stringify(i);es().setItem(n,o);const s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=n,s.newValue=o,window.dispatchEvent(s),r()}))}))},canBeUsed:is,type:"localstorage",averageResponseTime:function(){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?240:120},microSeconds:jo,storageKey:ts,addStorageEventListener:rs,removeStorageEventListener:ns};const ss=jo,as="pubkey.broadcastChannel-";let cs=null;const fs=new Set;function us(e){return as+e}var ds={create:function(e,t){t=Do(t);const r={channelName:e,uuid:Bo(),eMIs:new Bn(t.server.removeTimeout),serverUrl:t.server.url,time:jo()};return t.server.timeout&&(r.timeout=t.server.timeout),function(e,t,r){const n=function(e){if(cs)return cs;const t=no(e,{transports:["websocket","polling"],withCredentials:!0,reconnectionDelayMax:1e4,reconnectionAttempts:10});return t.on("connect_error",(e=>{t.io.opts.transports=["polling","websocket"],Fo.error("connect error",e)})),t.on("connect",(async()=>{const{engine:e}=t.io;Fo.debug("initially connected to",e.transport.name),e.once("upgrade",(()=>{Fo.debug("upgraded",e.transport.name)})),e.once("close",(e=>{Fo.debug("connection closed",e)}))})),t.on("error",(e=>{Fo.error("socket errored",e),t.disconnect()})),cs=t,t}(e),i=us(t.channelName),o=xo(ko.from(i,"utf8")),s=So(o).toString("hex");n.connected?n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0}):n.once("connect",(()=>{Fo.debug("connected with socket"),n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0})}));const a=()=>{n.once("connect",(async()=>{fs.has(t.channelName)&&n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0})}))},c=()=>{n&&fs.has(t.channelName)?n.connected||"visible"!==document.visibilityState||a():document.removeEventListener("visibilitychange",c)};n.on("disconnect",(()=>{Fo.debug("socket disconnected"),fs.has(t.channelName)&&(Fo.error("socket disconnected unexpectedly, reconnecting socket"),a())})),n.on(`${s}_success`,(async e=>{try{const t=await No(o.toString("hex"),e);Fo.info(t),r(t)}catch(e){Fo.error(e)}})),"undefined"!=typeof document&&document.addEventListener("visibilitychange",c)}(t.server.url,r,(e=>{r.messagesCallback&&e.uuid!==r.uuid&&e.token&&!r.eMIs.has(e.token)&&(r.eMIs.add(e.token),r.messagesCallback(e.data))})),fs.add(e),r},close:function(e){fs.delete(e.channelName)},onMessage:function(e,t,r){e.messagesCallbackTime=r,e.messagesCallback=t},postMessage:function(e,t){return new Promise(((r,n)=>{To().then((async()=>{const i=us(e.channelName),o=xo(ko.from(i,"utf8")),s=await Po(o.toString("hex"),{token:Bo(),time:Date.now(),data:t,uuid:e.uuid}),a={sameOriginCheck:!0,sameIpCheck:!0,key:So(o).toString("hex"),data:s,signature:(await Eo(o,xo(ko.from(s,"utf8")))).toString("hex")};return e.timeout&&(a.timeout=e.timeout),fetch(e.serverUrl+"/channel/set",{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json; charset=utf-8"}}).then(r).catch(n)}))}))},canBeUsed:function(){return!0},type:"server",averageResponseTime:function(){return 500},microSeconds:ss};const ls=jo,hs=new Set;var ps={create:function(e){const t={time:jo(),name:e,messagesCallback:null};return hs.add(t),t},close:function(e){hs.delete(e)},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){return new Promise((r=>setTimeout((()=>{Array.from(hs).forEach((r=>{r.name===e.name&&r!==e&&r.messagesCallback&&r.time<t.time&&r.messagesCallback(t)})),r()}),5)))},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:ls};const bs=[Uo,Zo,os,ds],gs=new Set;let ys=0;const ms=function(e,t){this.id=ys++,gs.add(this),this.name=e,this.options=Do(t),this.method=function(e){let t=[].concat(e.methods,bs).filter(Boolean);if(e.type){if("simulate"===e.type)return ps;const r=t.find((t=>t.type===e.type));if(r)return r;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter((e=>"idb"!==e.type)));const r=t.find((t=>t.canBeUsed(e)));if(r)return r;throw new Error(`No useable method found in ${JSON.stringify(bs.map((e=>e.type)))}`)}(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,function(e){const t=e.method.create(e.name,e.options);var r;(r=t)&&"function"==typeof r.then?(e._prepP=t,t.then((t=>{e._state=t}))):e._state=t}(this)};function vs(e,t,r){const n={time:e.method.microSeconds(),type:t,data:r};return(e._prepP?e._prepP:Co).then((()=>{const t=e.method.postMessage(e._state,n);return e._uMP.add(t),t.catch().then((()=>e._uMP.delete(t))),t}))}function ws(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function _s(e,t,r){e._addEL[t].push(r),function(e){if(!e._iL&&ws(e)){const t=t=>{e._addEL[t.type].forEach((r=>{(t.time>=r.time||"server"===e.method.type)&&r.fn(t.data)}))},r=e.method.microSeconds();e._prepP?e._prepP.then((()=>{e._iL=!0,e.method.onMessage(e._state,t,r)})):(e._iL=!0,e.method.onMessage(e._state,t,r))}}(e)}function Ss(e,t,r){e._addEL[t]=e._addEL[t].filter((e=>e!==r)),function(e){if(e._iL&&!ws(e)){e._iL=!1;const t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}(e)}ms._pubkey=!0,ms.prototype={postMessage(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return vs(this,"message",e)},postInternal(e){return vs(this,"internal",e)},set onmessage(e){const t={time:this.method.microSeconds(),fn:e};Ss(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,_s(this,"message",t)):this._onML=null},addEventListener(e,t){_s(this,e,{time:this.method.microSeconds(),fn:t})},removeEventListener(e,t){Ss(this,e,this._addEL[e].find((e=>e.fn===t)))},close(){if(this.closed)return;gs.delete(this),this.closed=!0;const e=this._prepP?this._prepP:Co;return this._onML=null,this._addEL.message=[],e.then((()=>Promise.all(Array.from(this._uMP)))).then((()=>Promise.all(this._befC.map((e=>e()))))).then((()=>this.method.close(this._state)))},get type(){return this.method.type},get isClosed(){return this.closed}},r(3643),r(1048).Buffer;class Es extends _e{constructor({config:e={},state:t={}}){super(),o(this,"defaultConfig",{}),o(this,"defaultState",{}),o(this,"disabled",!1),o(this,"name","BaseController"),o(this,"initialConfig",void 0),o(this,"initialState",void 0),o(this,"internalConfig",this.defaultConfig),o(this,"internalState",this.defaultState),this.initialState=t,this.initialConfig=e}get config(){return this.internalConfig}get state(){return this.internalState}configure(e,t=!1,r=!0){if(r){this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e in this.internalConfig)void 0!==this.internalConfig[e]&&(this[e]=this.internalConfig[e])}else for(const t in e)void 0!==this.internalConfig[t]&&(this.internalConfig[t]=e[t],this[t]=e[t])}update(e,t=!1){this.internalState=a(t?{}:a({},this.internalState),e),this.emit("store",this.internalState)}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}}const As=()=>!0,Ms=["newListener","removeListener"],Os=e=>!Ms.includes(e);function Rs(e,t){let r=(t||{}).eventFilter||As;if("string"==typeof r&&"skipInternal"===r&&(r=Os),"function"!=typeof r)throw new Error("createEventEmitterProxy - Invalid eventFilter");let n=e,i=e=>{const t=n;n=e,t.eventNames().filter(r).forEach((r=>{(function(e,t){return void 0!==e.rawListeners?e.rawListeners(t):e.listeners(t)})(t,r).forEach((t=>{e.on(r,t)}))})),t.removeAllListeners()};const o=new Proxy({},{get:(e,t)=>"setTarget"===t?i:n[t],set:(e,t,r)=>"setTarget"===t?(i=r,!0):(n[t]=r,!0)});return o}Error;const xs=["Gateway timeout","ETIMEDOUT","failed to parse response body","Failed to fetch"];function Is(e){switch(e.status){case 405:throw me.methodNotFound();case 418:throw me.internal({message:"Request is being rate limited.",data:{cause:e}});case 503:case 504:throw me.internal({message:"Gateway timeout. The request took too long to process.This can happen when querying over too wide a block range."})}}function Ps(e){return new Promise((t=>{setTimeout(t,e)}))}function Ns(e,t){if(200!==e.status)throw me.internal({message:`Non-200 status code: '${e.status}'`,data:t});if(t.error)throw me.internal({data:t.error});return t.result}var ks,Cs,Ts=r(6512),Bs=r.n(Ts);class Ls extends Es{constructor({config:e,state:t}){if(super({config:e,state:t}),o(this,"_providerEngineProxy",null),!e.chainConfig)throw Je.invalidProviderConfigError("Please provide chainConfig");if(!e.chainConfig.chainId)throw Je.invalidProviderConfigError("Please provide chainId inside chainConfig");if(!e.chainConfig.rpcTarget)throw Je.invalidProviderConfigError("Please provide rpcTarget inside chainConfig");this.defaultState={chainId:"loading"},this.defaultConfig={chainConfig:e.chainConfig,networks:{[e.chainConfig.chainId]:e.chainConfig}},super.initialize()}get currentChainConfig(){return this.config.chainConfig}get provider(){return this._providerEngineProxy}get chainId(){return this.state.chainId}set provider(e){throw new Error("Method not implemented.")}async request(e){var t;if(!e||"object"!=typeof e||Array.isArray(e))throw me.invalidRequest({message:Ze.invalidRequestArgs().message,data:a(a({},e||{}),{},{cause:Ze.invalidRequestArgs().message})});const{method:r,params:n}=e;if("string"!=typeof r||0===r.length)throw me.invalidRequest({message:Ze.invalidRequestMethod().message,data:a(a({},e||{}),{},{cause:Ze.invalidRequestMethod().message})});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw me.invalidRequest({message:Ze.invalidRequestParams().message,data:a(a({},e||{}),{},{cause:Ze.invalidRequestParams().message})});return null===(t=this.provider)||void 0===t?void 0:t.request(e)}sendAsync(e,t){return t?this.send(e,t):this.request(e)}send(e,t){this.request(e).then((e=>t(null,{result:e}))).catch((e=>t(e,null)))}addChain(e){if(!e.chainId)throw me.invalidParams("chainId is required");if(!e.rpcTarget)throw me.invalidParams("chainId is required");this.configure({networks:a(a({},this.config.networks),{},{[e.chainId]:e})})}getChainConfig(e){var t;const r=null===(t=this.config.networks)||void 0===t?void 0:t[e];if(!r)throw me.invalidRequest(`Chain ${e} is not supported, please add chainConfig for it`);return r}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=Rs(e)}getProviderEngineProxy(){return this._providerEngineProxy}}function js(e){return(t,r,n,i)=>"chainId"===t.method?(r.result=e,i()):n()}function Fs(e){return(t,r,n,i)=>"provider_config"===t.method?(r.result=e,i()):n()}class Us extends Ls{constructor({config:e,state:t}){super({config:e,state:t})}async setupProvider(){const{networkMiddleware:e}=function(e){const{chainId:t,rpcTarget:r}=e,n=function({rpcTarget:e,originHttpHeaderKey:t}){return Ee((async(r,n,i)=>{const{fetchUrl:o,fetchParams:s}=function({req:e,rpcTarget:t,originHttpHeaderKey:r}){const n=new URL(t),i={id:e.id,jsonrpc:e.jsonrpc,method:e.method,params:e.params},o=e.origin,s={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)};return r&&o&&(s.headers[r]=o),{fetchUrl:n.href,fetchParams:s}}({req:r,rpcTarget:e,originHttpHeaderKey:t});for(let e=0;e<5;e++){try{const e=await fetch(o,s);Is(e);const t=await e.json(),r=Ns(e,t);return void(n.result=r)}catch(e){const t=(e.message||e).toString();if(!xs.some((e=>t.includes(e))))throw e}await Ps(1e3)}}))}({rpcTarget:r});return{networkMiddleware:Me([js(t),Fs(e),n]),fetchMiddleware:n}}(this.config.chainConfig),t=new Ae;t.push(e);const r=Oe(t);this.updateProviderEngineProxy(r);const n=this.config.chainConfig.chainId;this.state.chainId!==n&&(this.emit("chainChanged",n),this.emit("connect",{chainId:n})),this.update({chainId:this.config.chainConfig.chainId})}async switchChain(e){if(!this._providerEngineProxy)throw(e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new ge(t,r,n)})({message:"Provider is not initialized",code:4902});const t=this.getChainConfig(e.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:t}),await this.setupProvider()}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=Rs(e)}getProviderEngineProxy(){return this._providerEngineProxy}lookupNetwork(){throw new Error("Method not implemented.")}}ks=Us,o(Us,"getProviderInstance",(async e=>{const t=new ks({config:{chainConfig:e.chainConfig}});return await t.setupProvider(),t}));class Ds extends Ls{constructor({config:e,state:t}){super({config:e,state:t}),o(this,"_providerEngineProxy",null)}get provider(){return this._providerEngineProxy}set provider(e){throw new Error("Method not implemented.")}addChain(e){throw new Error("Method not implemented.")}async setupProvider(e){const t=this.getPrivKeyMiddleware(e),r=new Ae;r.push(t);const n=Oe(r);this.updateProviderEngineProxy(n)}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=Rs(e)}async switchChain(e){return Promise.resolve()}getProviderEngineProxy(){return this._providerEngineProxy}async lookupNetwork(){return Promise.resolve("")}getPrivKeyMiddleware(e){const t={getPrivatekey:async()=>e};return this.createPrivKeyMiddleware(t)}createPrivKeyMiddleware({getPrivatekey:e}){return t={private_key:Ee((async function(t,r){r.result=await e()}))},(e,r,n,i)=>{const o=t[e.method];return void 0===o?n():"function"==typeof o?o(e,r,n,i):(r.result=o,i())};var t}}Cs=Ds,o(Ds,"getProviderInstance",(async e=>{const t=new Cs({config:{chainConfig:e.chainConfig}});return await t.setupProvider(e.privKey),t})),Bs()(),r(1048).Buffer,r(1048).Buffer,$e().getLogger("SecurePubSub"),r(1048).Buffer;class qs extends Fe{constructor(e,t){super(t),o(this,"code",void 0),o(this,"message",void 0),this.code=e,this.message=t||"",Object.defineProperty(this,"name",{value:"OpenloginError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class zs extends qs{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"InitializationError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new zs(e,`${zs.messages[e]}, ${t}`)}static invalidParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return zs.fromCode(5001,e)}static notInitialized(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return zs.fromCode(5002,e)}}o(zs,"messages",{5e3:"Custom",5001:"Invalid constructor params",5002:"SDK not initialized. please call init first"});class $s extends qs{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"LoginError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new $s(e,`${$s.messages[e]}, ${t}`)}static invalidLoginParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return $s.fromCode(5111,e)}static userNotLoggedIn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return $s.fromCode(5112,e)}static popupClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return $s.fromCode(5113,e)}static loginFailed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return $s.fromCode(5114,e)}static popupBlocked(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return $s.fromCode(5115,e)}static mfaAlreadyEnabled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return $s.fromCode(5116,e)}static mfaNotEnabled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return $s.fromCode(5117,e)}}o($s,"messages",{5e3:"Custom",5111:"Invalid login params",5112:"User not logged in.",5113:"login popup has been closed by the user",5114:"Login failed",5115:"Popup was blocked. Please call this function as soon as user clicks button or use redirect mode",5116:"MFA already enabled",5117:"MFA not yet enabled. Please call `enableMFA` first"});function Ws(e){const t=e.findIndex((e=>e instanceof Error)),r=e.findIndex((e=>"string"==typeof e)),n=e.findIndex((e=>e&&"object"==typeof e&&"status"in e&&"type"in e));let i;if(-1!==n){const t=e[n];i=new Error(`${t.status} ${t.type.toString()} ${t.statusText}`)}else i=-1!==t?e.splice(t,1)[0]:-1!==r?new Error(e.splice(r,1)[0]):new Error("Unknown error");return[i,e]}(0,ze.getLogger)("openlogin").setLevel("error"),f.EventEmitter;class Hs extends Fe{constructor(e,t,r){super(t),o(this,"code",void 0),o(this,"message",void 0),o(this,"cause",void 0),this.code=e,this.message=t||"",this.cause=r,Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message,cause:Ws([this.cause])}}toString(){return JSON.stringify(this.toJSON())}}class Vs extends Hs{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(e,t="",r){return new Vs(e,`${Vs.messages[e]}, ${t}`,r)}static notFound(e="",t){return Vs.fromCode(5001,e,t)}static notInstalled(e="",t){return Vs.fromCode(5002,e,t)}static notReady(e="",t){return Vs.fromCode(5003,e,t)}static windowBlocked(e="",t){return Vs.fromCode(5004,e,t)}static windowClosed(e="",t){return Vs.fromCode(5005,e,t)}static incompatibleChainNameSpace(e="",t){return Vs.fromCode(5006,e,t)}static duplicateAdapterError(e="",t){return Vs.fromCode(5007,e,t)}static invalidProviderConfigError(e="",t){return Vs.fromCode(5008,e,t)}static providerNotReadyError(e="",t){return Vs.fromCode(5009,e,t)}static rpcConnectionError(e="",t){return Vs.fromCode(5010,e,t)}static invalidParams(e="",t){return Vs.fromCode(5011,e,t)}static invalidNetwork(e="",t){return Vs.fromCode(5013,e,t)}}o(Vs,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class Gs extends Hs{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(e,t="",r){return new Gs(e,`${Gs.messages[e]}. ${t}`,r)}static connectionError(e="",t){return Gs.fromCode(5111,e,t)}static disconnectionError(e="",t){return Gs.fromCode(5112,e,t)}static notConnectedError(e="",t){return Gs.fromCode(5113,e,t)}static popupClosed(e="",t){return Gs.fromCode(5114,e,t)}static mfaEnabled(e="",t){return Gs.fromCode(5115,e,t)}static chainConfigNotAdded(e="",t){return Gs.fromCode(5116,e,t)}static unsupportedOperation(e="",t){return Gs.fromCode(5117,e,t)}static coreKitKeyNotFound(e="",t){return Gs.fromCode(5118,e,t)}static userNotLoggedIn(e="",t){return Gs.fromCode(5119,e,t)}}o(Gs,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class Ks extends Hs{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(e,t="",r){return new Ks(e,`${Ks.messages[e]}, ${t}`,r)}static chainIDNotAllowed(e="",t){return Ks.fromCode(5201,e,t)}static operationNotAllowed(e="",t){return Ks.fromCode(5202,e,t)}static chainNamespaceNotAllowed(e="",t){return Ks.fromCode(5203,e,t)}}o(Ks,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});class Js extends Hs{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletProviderError"})}static fromCode(e,t="",r){return new Ks(e,`${Js.messages[e]}, ${t}`,r)}static invalidRequestArgs(e="",t){return Ks.fromCode(5301,e,t)}static invalidRequestMethod(e="",t){return Ks.fromCode(5302,e,t)}static invalidRequestParams(e="",t){return Ks.fromCode(5303,e,t)}}o(Js,"messages",{5e3:"Custom",5301:"Expected a single, non-array, object argument.",5302:"'args.method' must be a non-empty string.",5303:"'args.params' must be an object or array if provided."});const Ys={OPENLOGIN:"openlogin",WALLET_CONNECT_V2:"wallet-connect-v2",SFA:"sfa"},Xs=a({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},Ys),Zs=a({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},Ys),Qs=(a(a({},Zs),Xs),Xs.TORUS_SOLANA,Xs.PHANTOM,Xs.SOLFLARE,Xs.SLOPE,Zs.TORUS_EVM,Zs.METAMASK,Zs.COINBASE,{NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"});a(a({},Qs),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"}),$e().getLogger("web3auth-logger");class ea extends Hs{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletServicesPluginError"})}static fromCode(e,t="",r){return new ea(e,`${ea.messages[e]}${t}`,r)}static notInitialized(e="",t){return ea.fromCode(5210,e,t)}static unsupportedAdapter(e="",t){return ea.fromCode(5211,e,t)}static providerRequired(e="",t){return ea.fromCode(5212,e,t)}static web3authRequired(e="",t){return ea.fromCode(5213,e,t)}static web3AuthNotConnected(e="",t){return ea.fromCode(5214,e,t)}static alreadyInitialized(e="",t){return ea.fromCode(5216,e,t)}static unsupportedChainNamespace(e="",t){return ea.fromCode(5218,e,t)}static differentWeb3AuthNetwork(e="",t){return ea.fromCode(5219,e,t)}static invalidParams(e="",t){return ea.fromCode(5220,e,t)}static web3authNotInitialized(e="",t){return ea.fromCode(5221,e,t)}static invalidSession(e="",t){return ea.fromCode(5222,e,t)}}o(ea,"messages",{5210:"Wallet Services Plugin is not initialized",5211:"Web3Auth is connected to unsupported adapter. Wallet services connector plugin requires web3auth connected to openlogin adapter.",5212:"Provider is required..",5213:"Web3Auth instance is required while initialization.",5214:"Web3Auth is not connected.",5216:"Plugin is already initialized",5218:"Unsupported chain namespace.",5219:"Plugin network different than web3auth instance network.",5221:"Web3Auth is not initialized",5222:"Invalid session inside wallet services. Please report this issue."}),a(a({},{EIP155:"eip155",SOLANA:"solana",CASPER:"casper",XRPL:"xrpl",OTHER:"other"}),{},{MULTICHAIN:"multichain"}),a({},{READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"}),a(a({},{WALLET_SERVICES:"wallet-services"}),{SOLANA:"solana"});var ta=r(8290),ra=r.n(ta);const na="Web3Auth-cachedAdapter";class ia extends _e{constructor(e){var t,r,n,i;if(super(),o(this,"coreOptions",void 0),o(this,"connectedAdapterName",null),o(this,"status",at.NOT_READY),o(this,"cachedAdapter",null),o(this,"walletAdapters",{}),o(this,"commonJRPCProvider",null),o(this,"plugins",{}),o(this,"storage","localStorage"),!e.clientId)throw Je.invalidParams("Please provide a valid clientId in constructor");if(e.enableLogging?ut.enableAll():ut.setLevel("error"),!e.privateKeyProvider&&!e.chainConfig)throw Je.invalidParams("Please provide chainConfig or privateKeyProvider");if(e.chainConfig=e.chainConfig||e.privateKeyProvider.currentChainConfig,null===(t=e.chainConfig)||void 0===t||!t.chainNamespace||!Object.values(Qe).includes(null===(r=e.chainConfig)||void 0===r?void 0:r.chainNamespace))throw Je.invalidParams("Please provide a valid chainNamespace in chainConfig");"session"===e.storageKey&&(this.storage="sessionStorage"),this.cachedAdapter=ft(this.storage)?window[this.storage].getItem(na):null,this.coreOptions=a(a({},e),{},{chainConfig:a(a({},tt(null===(n=e.chainConfig)||void 0===n?void 0:n.chainNamespace,null===(i=e.chainConfig)||void 0===i?void 0:i.chainId)||{}),e.chainConfig)}),this.subscribeToAdapterEvents=this.subscribeToAdapterEvents.bind(this)}get connected(){return Boolean(this.connectedAdapterName)}get provider(){return this.status!==at.NOT_READY&&this.commonJRPCProvider?this.commonJRPCProvider:null}set provider(e){throw new Error("Not implemented")}async init(){let e;this.commonJRPCProvider=await Us.getProviderInstance({chainConfig:this.coreOptions.chainConfig});try{e=await(async(e,t)=>{const r=new URL(`${(e=>Ne[null!=e?e:st.SAPPHIRE_MAINNET])(t)}/api/configuration`);return r.searchParams.append("project_id",e),r.searchParams.append("network",t),r.searchParams.append("whitelist","true"),await Ve(r.href)})(this.coreOptions.clientId,this.coreOptions.web3AuthNetwork)}catch(e){throw ut.error("Failed to fetch project configurations",e),Je.notReady("failed to fetch project configurations",e)}const t=Object.keys(this.walletAdapters).map((async t=>{if(this.subscribeToAdapterEvents(this.walletAdapters[t]),this.walletAdapters[t].chainConfigProxy)this.walletAdapters[t].setAdapterSettings({sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey});else{const e=this.coreOptions.chainConfig;if(!e.chainNamespace)throw Je.invalidParams("Please provide chainNamespace in chainConfig");this.walletAdapters[t].setAdapterSettings({chainConfig:e,sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey})}if(t===ot.OPENLOGIN){const r=this.walletAdapters[t],{whitelabel:n}=e;this.coreOptions.uiConfig=qe()(ra()(n),this.coreOptions.uiConfig),this.coreOptions.uiConfig.mode||(this.coreOptions.uiConfig.mode="light");const{sms_otp_enabled:i,whitelist:o}=e;if(void 0!==i&&r.setAdapterSettings({loginConfig:{[Be]:{showOnModal:i,showOnDesktop:i,showOnMobile:i,showOnSocialBackupFactor:i}}}),o&&r.setAdapterSettings({originData:o.signed_urls}),this.coreOptions.privateKeyProvider){if(r.currentChainNamespace!==this.coreOptions.privateKeyProvider.currentChainConfig.chainNamespace)throw Je.incompatibleChainNameSpace("private key provider is not compatible with provided chainNamespace for openlogin adapter");r.setAdapterSettings({privateKeyProvider:this.coreOptions.privateKeyProvider})}if(r.setAdapterSettings({whiteLabel:this.coreOptions.uiConfig}),!r.privateKeyProvider)throw Je.invalidParams("privateKeyProvider is required for openlogin adapter")}else if(t===ot.WALLET_CONNECT_V2){const r=this.walletAdapters[t],{wallet_connect_enabled:n,wallet_connect_project_id:i}=e;if(!1===n)throw Je.invalidParams("Please enable wallet connect v2 addon on dashboard");if(!i)throw Je.invalidParams("Invalid wallet connect project id. Please configure it on the dashboard");r.setAdapterSettings({adapterSettings:{walletConnectInitOptions:{projectId:i}}})}return this.walletAdapters[t].init({autoConnect:this.cachedAdapter===t}).catch((e=>ut.error(e)))}));await Promise.all(t),this.status===at.NOT_READY&&(this.status=at.READY,this.emit(ct.READY))}getAdapter(e){return this.walletAdapters[e]||null}configureAdapter(e){this.checkInitRequirements();const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw Je.invalidParams("Please provide chainNamespace in chainConfig");if(this.walletAdapters[e.name])throw Je.duplicateAdapterError(`Wallet adapter for ${e.name} already exists`);if(e.adapterNamespace!==et&&e.adapterNamespace!==t.chainNamespace)throw Je.incompatibleChainNameSpace(`This wallet adapter belongs to ${e.adapterNamespace} which is incompatible with currently used namespace: ${t.chainNamespace}`);return e.adapterNamespace===et&&e.currentChainNamespace&&t.chainNamespace!==e.currentChainNamespace&&e.setAdapterSettings({chainConfig:t}),this.walletAdapters[e.name]=e,this}clearCache(){ft(this.storage)&&(window[this.storage].removeItem(na),this.cachedAdapter=null)}async addChain(e){if(this.status===at.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].addChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.addChain(e);throw Je.notReady("No wallet is ready")}async switchChain(e){if(this.status===at.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].switchChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.switchChain(e);throw Je.notReady("No wallet is ready")}async connectTo(e,t){if(!this.walletAdapters[e]||!this.commonJRPCProvider)throw Je.notFound(`Please add wallet adapter for ${e} wallet, before connecting`);const r=await this.walletAdapters[e].connect(t);return this.commonJRPCProvider.updateProviderEngineProxy(r.provider||r),this.provider}async logout(e={cleanup:!1}){if(this.status!==at.CONNECTED||!this.connectedAdapterName)throw Ye.notConnectedError("No wallet is connected");await this.walletAdapters[this.connectedAdapterName].disconnect(e)}async getUserInfo(){if(ut.debug("Getting user info",this.status,this.connectedAdapterName),this.status!==at.CONNECTED||!this.connectedAdapterName)throw Ye.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].getUserInfo()}async enableMFA(e){if(this.status!==at.CONNECTED||!this.connectedAdapterName)throw Ye.notConnectedError("No wallet is connected");if(this.connectedAdapterName!==ot.OPENLOGIN)throw Ye.unsupportedOperation("EnableMFA is not supported for this adapter.");return this.walletAdapters[this.connectedAdapterName].enableMFA(e)}async authenticateUser(){if(this.status!==at.CONNECTED||!this.connectedAdapterName)throw Ye.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].authenticateUser()}addPlugin(e){if(this.plugins[e.name])throw Je.duplicateAdapterError(`Plugin ${e.name} already exist`);if(e.pluginNamespace!==lt.MULTICHAIN&&e.pluginNamespace!==this.coreOptions.chainConfig.chainNamespace)throw Je.incompatibleChainNameSpace(`This plugin belongs to ${e.pluginNamespace} namespace which is incompatible with currently used namespace: ${this.coreOptions.chainConfig.chainNamespace}`);return this.plugins[e.name]=e,this.status===at.CONNECTED&&this.connectedAdapterName&&this.connectToPlugins({adapter:this.connectedAdapterName}),this}getPlugin(e){return this.plugins[e]||null}subscribeToAdapterEvents(e){e.on(ct.CONNECTED,(async e=>{if(!this.commonJRPCProvider)throw Je.notFound("CommonJrpcProvider not found");const{provider:t}=e;this.commonJRPCProvider.updateProviderEngineProxy(t.provider||t),this.status=at.CONNECTED,this.connectedAdapterName=e.adapter,this.cacheWallet(e.adapter),ut.debug("connected",this.status,this.connectedAdapterName),this.connectToPlugins(e),this.emit(ct.CONNECTED,a({},e))})),e.on(ct.DISCONNECTED,(async e=>{if(this.status=at.READY,ft(this.storage)){const e=window[this.storage].getItem(na);this.connectedAdapterName===e&&this.clearCache()}ut.debug("disconnected",this.status,this.connectedAdapterName),await Promise.all(Object.values(this.plugins).map((e=>e.disconnect().catch((e=>{5211!==e.code&&ut.error(e)}))))),this.connectedAdapterName=null,this.emit(ct.DISCONNECTED,e)})),e.on(ct.CONNECTING,(e=>{this.status=at.CONNECTING,this.emit(ct.CONNECTING,e),ut.debug("connecting",this.status,this.connectedAdapterName)})),e.on(ct.ERRORED,(e=>{this.status=at.ERRORED,this.clearCache(),this.emit(ct.ERRORED,e),ut.debug("errored",this.status,this.connectedAdapterName)})),e.on(ct.ADAPTER_DATA_UPDATED,(e=>{ut.debug("adapter data updated",e),this.emit(ct.ADAPTER_DATA_UPDATED,e)})),e.on(ct.CACHE_CLEAR,(e=>{ut.debug("adapter cache clear",e),ft(this.storage)&&this.clearCache()}))}checkInitRequirements(){if(this.status===at.CONNECTING)throw Je.notReady("Already pending connection");if(this.status===at.CONNECTED)throw Je.notReady("Already connected");if(this.status===at.READY)throw Je.notReady("Adapter is already initialized")}cacheWallet(e){ft(this.storage)&&(window[this.storage].setItem(na,e),this.cachedAdapter=e)}connectToPlugins(e){Object.values(this.plugins).map((async t=>{try{if(!t.SUPPORTED_ADAPTERS.includes(e.adapter))return;if(t.status===ht.CONNECTED)return;const{openloginInstance:r}=this.walletAdapters[this.connectedAdapterName],{options:n,sessionId:i,sessionNamespace:o}=r||{};await t.initWithWeb3Auth(this,n.whiteLabel),await t.connect({sessionId:i,sessionNamespace:o})}catch(e){if(5211===e.code)return;ut.error(e)}}))}}})(),n})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.NoModal=t():e.NoModal=t()}(self,(()=>(()=>{var e={9363:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(3670),{AbortError:i,codes:o}=r(5443),{isNodeStream:s,isWebStream:a,kControllerErrorFunction:c}=r(4579),f=r(862),{ERR_INVALID_ARG_TYPE:u}=o;let d;e.exports.addAbortSignal=function(t,r){if((e=>{if("object"!=typeof e||!("aborted"in e))throw new u("signal","AbortSignal",e)})(t),!s(r)&&!a(r))throw new u("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const o=s(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[c](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{d=d||r(3968).addAbortListener;const i=d(e,o);f(t,i[n])}return t}},1753:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(3670),{Buffer:a}=r(1048),{inspect:c}=r(3968);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,i=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(o(t,a,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}o(t,a,r-e),e-=a.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return c(this,{...t,depth:0,customInspect:!1})}}},5366:(e,t,r)=>{"use strict";const{pipeline:n}=r(4846),i=r(8842),{destroyer:o}=r(3432),{isNodeStream:s,isReadable:a,isWritable:c,isWebStream:f,isTransformStream:u,isWritableStream:d,isReadableStream:l}=r(4579),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(5443),g=r(862);e.exports=function(...e){if(0===e.length)throw new b("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r<e.length;++r)if(s(e[r])||f(e[r])){if(r<e.length-1&&!(a(e[r])||l(e[r])||u(e[r])))throw new p(`streams[${r}]`,t[r],"must be readable");if(r>0&&!(c(e[r])||d(e[r])||u(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,y,m,v,w;const _=e[0],S=n(e,(function(e){const t=v;v=null,t?t(e):e?w.destroy(e):E||A||w.destroy()})),A=!!(c(_)||d(_)||u(_)),E=!!(a(S)||l(S)||u(S));if(w=new i({writableObjectMode:!(null==_||!_.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:A,readable:E}),A){if(s(_))w._write=function(e,t,n){_.write(e,t)?n():r=n},w._final=function(e){_.end(),y=e},_.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(f(_)){const e=(u(_)?_.writable:_).getWriter();w._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},w._final=async function(t){try{await e.ready,e.close().catch((()=>{})),y=t}catch(e){t(e)}}}const e=u(S)?S.readable:S;g(e,(()=>{if(y){const e=y;y=null,e()}}))}if(E)if(s(S))S.on("readable",(function(){if(m){const e=m;m=null,e()}})),S.on("end",(function(){w.push(null)})),w._read=function(){for(;;){const e=S.read();if(null===e)return void(m=w._read);if(!w.push(e))return}};else if(f(S)){const e=(u(S)?S.readable:S).getReader();w._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!w.push(t))return;if(r)return void w.push(null)}catch{return}}}return w._destroy=function(e,t){e||null===v||(e=new h),m=null,r=null,y=null,null===v?t(e):(v=t,s(S)&&o(S,e))},w}},3432:(e,t,r)=>{"use strict";const n=r(9907),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(5443),{Symbol:a}=r(3670),{kIsDestroyed:c,isDestroyed:f,isFinished:u,isServerRequest:d}=r(4579),l=a("kDestroy"),h=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function b(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(y,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function g(e,t){m(e,t),y(e)}function y(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function m(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(m,e,t):m(e,t))}function w(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(l,r):r?v(e,r,!0):n.nextTick(_,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function _(e){e.emit(h)}function S(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function A(e){e.emit("close")}function E(e,t){e.emit("error",t),n.nextTick(A,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(w,e)},destroyer:function(e,t){e&&!f(e)&&(t||u(e)||(t=new s),d(e)?(e.socket=null,e.destroy(t)):S(e)?e.abort():S(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(E,e,t):n.nextTick(A,e),e.destroyed||(e[c]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,e,t):this.once(l,(function(r){b(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},8842:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(3670);e.exports=f;const a=r(4664),c=r(5672);s(f.prototype,a.prototype),s(f,a);{const e=o(c.prototype);for(let t=0;t<e.length;t++){const r=e[t];f.prototype[r]||(f.prototype[r]=c.prototype[r])}}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),c.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let u,d;function l(){return void 0===u&&(u={}),u}n(f.prototype,{writable:{__proto__:null,...i(c.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(c.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(c.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(c.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(c.prototype,"writableLength")},writableFinished:{__proto__:null,...i(c.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(c.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(c.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(c.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),f.fromWeb=function(e,t){return l().newStreamDuplexFromReadableWritablePair(e,t)},f.toWeb=function(e){return l().newReadableWritablePairFromDuplex(e)},f.from=function(e){return d||(d=r(7426)),d(e,"body")}},7426:(e,t,r)=>{const n=r(9907),i=r(1048),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:c,isReadableNodeStream:f,isWritableNodeStream:u,isDuplexNodeStream:d,isReadableStream:l,isWritableStream:h}=r(4579),p=r(862),{AbortError:b,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:y}}=r(5443),{destroyer:m}=r(3432),v=r(8842),w=r(4664),_=r(5672),{createDeferredPromise:S}=r(3968),A=r(7556),E=globalThis.Blob||i.Blob,M=void 0!==E?function(e){return e instanceof E}:function(e){return!1},R=globalThis.AbortController||r(7083).AbortController,{FunctionPrototypeCall:O}=r(3670);class x extends v{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(e){const t=e.readable&&"function"!=typeof e.readable.read?w.wrap(e.readable):e.readable,r=e.writable;let n,i,a,c,f,u=!!o(t),d=!!s(r);function l(e){const t=c;c=null,t?t(e):e&&f.destroy(e)}return f=new x({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:u,writable:d}),d&&(p(r,(e=>{d=!1,e&&m(t,e),l(e)})),f._write=function(e,t,i){r.write(e,t)?i():n=i},f._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),u&&(p(t,(e=>{u=!1,e&&m(t,e),l(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){f.push(null)})),f._read=function(){for(;;){const e=t.read();if(null===e)return void(a=f._read);if(!f.push(e))return}}),f._destroy=function(e,o){e||null===c||(e=new b),a=null,n=null,i=null,null===c?o(e):(c=o,m(r,e),m(t,e))},f}e.exports=function e(t,r){if(d(t))return t;if(f(t))return I({readable:t});if(u(t))return I({writable:t});if(c(t))return I({writable:!1,readable:!1});if(l(t))return I({readable:w.fromWeb(t)});if(h(t))return I({writable:_.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:s}=function(e){let{promise:t,resolve:r}=S();const i=new R,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(o.aborted)throw new b(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return A(x,e,{objectMode:!0,write:i,final:o,destroy:s});const c=null==e?void 0:e.then;if("function"==typeof c){let t;const r=O(c,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{m(t,e)}));return t=new x({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(M(t))return e(t.arrayBuffer());if(a(t))return A(x,t,{objectMode:!0,writable:!1});if(l(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return x.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return I({readable:null!=t&&t.readable?f(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?u(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return O(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{m(e,t)})),e=new x({objectMode:!0,writable:!1,read(){}})}throw new g(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},862:(e,t,r)=>{const n=r(9907),{AbortError:i,codes:o}=r(5443),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:c,once:f}=r(3968),{validateAbortSignal:u,validateFunction:d,validateObject:l,validateBoolean:h}=r(3045),{Promise:p,PromisePrototypeThen:b,SymbolDispose:g}=r(3670),{isClosed:y,isReadable:m,isReadableNodeStream:v,isReadableStream:w,isReadableFinished:_,isReadableErrored:S,isWritable:A,isWritableNodeStream:E,isWritableStream:M,isWritableFinished:R,isWritableErrored:O,isNodeStream:x,willEmitClose:I,kIsClosedPromise:P}=r(4579);let k;const N=()=>{};function T(e,t,o){var h,p;if(2===arguments.length?(o=t,t=c):null==t?t=c:l(t,"options"),d(o,"callback"),u(t.signal,"options.signal"),o=f(o),w(e)||M(e))return function(e,t,o){let s=!1,a=N;if(t.signal)if(a=()=>{s=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(a);else{k=k||r(3968).addAbortListener;const n=k(t.signal,a),i=o;o=f(((...t)=>{n[g](),i.apply(e,t)}))}const c=(...t)=>{s||n.nextTick((()=>o.apply(e,t)))};return b(e[P].promise,c,c),N}(e,t,o);if(!x(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const T=null!==(h=t.readable)&&void 0!==h?h:v(e),C=null!==(p=t.writable)&&void 0!==p?p:E(e),B=e._writableState,L=e._readableState,j=()=>{e.writable||D()};let F=I(e)&&v(e)===T&&E(e)===C,U=R(e,!1);const D=()=>{U=!0,e.destroyed&&(F=!1),(!F||e.readable&&!T)&&(T&&!q||o.call(e))};let q=_(e,!1);const z=()=>{q=!0,e.destroyed&&(F=!1),(!F||e.writable&&!C)&&(C&&!U||o.call(e))},$=t=>{o.call(e,t)};let W=y(e);const H=()=>{W=!0;const t=O(e)||S(e);return t&&"boolean"!=typeof t?o.call(e,t):T&&!q&&v(e,!0)&&!_(e,!1)?o.call(e,new a):!C||U||R(e,!1)?void o.call(e):o.call(e,new a)},V=()=>{W=!0;const t=O(e)||S(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},G=()=>{e.req.on("finish",D)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?C&&!B&&(e.on("end",j),e.on("close",j)):(e.on("complete",D),F||e.on("abort",H),e.req?G():e.on("request",G)),F||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",z),e.on("finish",D),!1!==t.error&&e.on("error",$),e.on("close",H),W?n.nextTick(H):null!=B&&B.errorEmitted||null!=L&&L.errorEmitted?F||n.nextTick(V):(T||F&&!m(e)||!U&&!1!==A(e))&&(C||F&&!A(e)||!q&&!1!==m(e))?L&&e.req&&e.aborted&&n.nextTick(V):n.nextTick(V);const K=()=>{o=N,e.removeListener("aborted",H),e.removeListener("complete",D),e.removeListener("abort",H),e.removeListener("request",G),e.req&&e.req.removeListener("finish",D),e.removeListener("end",j),e.removeListener("close",j),e.removeListener("finish",D),e.removeListener("end",z),e.removeListener("error",$),e.removeListener("close",H)};if(t.signal&&!W){const s=()=>{const r=o;K(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(s);else{k=k||r(3968).addAbortListener;const n=k(t.signal,s),i=o;o=f(((...t)=>{n[g](),i.apply(e,t)}))}}return K}e.exports=T,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=c),null!==(r=t)&&void 0!==r&&r.cleanup&&(h(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,i)=>{const o=T(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},7556:(e,t,r)=>{"use strict";const n=r(9907),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(3670),{Buffer:a}=r(1048),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:f}=r(5443).codes;e.exports=function(e,t,r){let u,d;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])d=!0,u=t[o]();else{if(!t||!t[s])throw new c("iterable",["Iterable"],t);d=!1,u=t[s]()}const l=new e({objectMode:!0,highWaterMark:1,...r});let h=!1;return l._read=function(){h||(h=!0,async function(){for(;;){try{const{value:e,done:t}=d?await u.next():u.next();if(t)l.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw h=!1,new f;if(l.push(t))continue;h=!1}}catch(e){l.destroy(e)}break}}())},l._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof u.throw;if(t&&r){const{value:t,done:r}=await u.throw(e);if(await t,r)return}if("function"==typeof u.return){const{value:e}=await u.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},l}},9731:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(3670),{EventEmitter:o}=r(46);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",c),r.on("close",f));let s=!1;function c(){s||(s=!0,e.end())}function f(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){d(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function d(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",c),r.removeListener("close",f),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return a(r,"error",u),a(e,"error",u),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},1543:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(7083).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:c}=r(5443),{validateAbortSignal:f,validateInteger:u,validateObject:d}=r(3045),l=r(3670).Symbol("kWeak"),h=r(3670).Symbol("kResistStopPropagation"),{finished:p}=r(862),b=r(5366),{addAbortSignalNoValidate:g}=r(9363),{isWritable:y,isNodeStream:m}=r(4579),{deprecate:v}=r(3968),{ArrayPrototypePush:w,Boolean:_,MathFloor:S,Number:A,NumberIsNaN:E,Promise:M,PromiseReject:R,PromiseResolve:O,PromisePrototypeThen:x,Symbol:I}=r(3670),P=I("kEmpty"),k=I("kEof");function N(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&f(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(3968).AbortSignalAny([null==t?void 0:t.signal].filter(_)),s=this,a=[],f={signal:o};let u,d,l=!1,h=0;function p(){l=!0,b()}function b(){h-=1,g()}function g(){d&&!l&&h<n&&a.length<i&&(d(),d=null)}!async function(){try{for await(let t of s){if(l)return;if(o.aborted)throw new c;try{if(t=e(t,f),t===P)continue;t=O(t)}catch(e){t=R(e)}h+=1,x(t,b,p),a.push(t),u&&(u(),u=null),!l&&(a.length>=i||h>=n)&&await new M((e=>{d=e}))}a.push(k)}catch(e){const t=R(e);x(t,b,p),a.push(t)}finally{l=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===k)return;if(o.aborted)throw new c;e!==P&&(yield e),a.shift(),g()}await new M((e=>{u=e}))}}finally{l=!0,d&&(d(),d=null)}}.call(this)}async function T(e,t=void 0){for await(const r of C.call(this,e,t))return!0;return!1}function C(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return N.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class B extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function L(e){if(e=A(e),E(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:v((function(e=void 0){return null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&f(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&f(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;e--<=0&&(yield r)}}.call(this)},filter:C,flatMap:function(e,t){const r=N.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:N,take:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&f(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&f(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&g(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await T.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of N.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&d(r,"options"),null!=(null==r?void 0:r.signal)&&f(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new c(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[l]:this,[h]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var g;if(b=!0,null!=r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new c;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new B}finally{a.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&f(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c(void 0,{cause:e.signal.reason});w(t,n)}return t},some:T,find:async function(e,t){for await(const r of C.call(this,e,t))return r}}},7932:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(3670);e.exports=o;const i=r(8102);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},4846:(e,t,r)=>{const n=r(9907),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s,SymbolDispose:a}=r(3670),c=r(862),{once:f}=r(3968),u=r(3432),d=r(8842),{aggregateTwoErrors:l,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:b,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:m}=r(5443),{validateFunction:v,validateAbortSignal:w}=r(3045),{isIterable:_,isReadable:S,isReadableNodeStream:A,isNodeStream:E,isTransformStream:M,isWebStream:R,isReadableStream:O,isReadableFinished:x}=r(4579),I=globalThis.AbortController||r(7083).AbortController;let P,k,N;function T(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,u.destroyer(e,t||new g("pipe")))},cleanup:c(e,{readable:t,writable:r},(e=>{n=!e}))}}function C(e){if(_(e))return e;if(A(e))return async function*(e){k||(k=r(4664)),yield*k.prototype[s].call(e)}(e);throw new h("val",["Readable","Iterable","AsyncIterable"],e)}async function B(e,t,r,{end:n}){let i,s=null;const a=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},f=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",a);const u=c(t,{readable:!1},a);try{t.writableNeedDrain&&await f();for await(const r of e)t.write(r)||await f();n&&(t.end(),await f()),r()}catch(e){r(i!==e?l(i,e):e)}finally{u(),t.off("drain",a)}}async function L(e,t,r,{end:n}){M(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function j(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new b("streams");const s=new I,c=s.signal,f=null==o?void 0:o.signal,u=[];function l(){D(new m)}let g,y,v;w(f,"options.signal"),N=N||r(3968).addAbortListener,f&&(g=N(f,l));const x=[];let k,j=0;function U(e){D(e,0==--j)}function D(e,r){var i;if(!e||y&&"ERR_STREAM_PREMATURE_CLOSE"!==y.code||(y=e),y||r){for(;x.length;)x.shift()(y);null===(i=g)||void 0===i||i[a](),s.abort(),r&&(y||u.forEach((e=>e())),n.nextTick(t,y,v))}}for(let W=0;W<e.length;W++){const H=e[W],V=W<e.length-1,G=W>0,K=V||!1!==(null==o?void 0:o.end),J=W===e.length-1;if(E(H)){if(K){const{destroy:Y,cleanup:X}=T(H,V,G);x.push(Y),S(H)&&J&&u.push(X)}function q(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&U(e)}H.on("error",q),S(H)&&J&&u.push((()=>{H.removeListener("error",q)}))}if(0===W)if("function"==typeof H){if(k=H({signal:c}),!_(k))throw new p("Iterable, AsyncIterable or Stream","source",k)}else k=_(H)||A(H)||M(H)?H:d.from(H);else if("function"==typeof H){var z;if(k=M(k)?C(null===(z=k)||void 0===z?void 0:z.readable):C(k),k=H(k,{signal:c}),V){if(!_(k,!0))throw new p("AsyncIterable",`transform[${W-1}]`,k)}else{var $;P||(P=r(7932));const Z=new P({objectMode:!0}),Q=null===($=k)||void 0===$?void 0:$.then;if("function"==typeof Q)j++,Q.call(k,(e=>{v=e,null!=e&&Z.write(e),K&&Z.end(),n.nextTick(U)}),(e=>{Z.destroy(e),n.nextTick(U,e)}));else if(_(k,!0))j++,B(k,Z,U,{end:K});else{if(!O(k)&&!M(k))throw new p("AsyncIterable or Promise","destination",k);{const re=k.readable||k;j++,B(re,Z,U,{end:K})}}k=Z;const{destroy:ee,cleanup:te}=T(k,!1,!0);x.push(ee),J&&u.push(te)}}else if(E(H)){if(A(k)){j+=2;const ne=F(k,H,U,{end:K});S(H)&&J&&u.push(ne)}else if(M(k)||O(k)){const ie=k.readable||k;j++,B(ie,H,U,{end:K})}else{if(!_(k))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],k);j++,B(k,H,U,{end:K})}k=H}else if(R(H)){if(A(k))j++,L(C(k),H,U,{end:K});else if(O(k)||_(k))j++,L(k,H,U,{end:K});else{if(!M(k))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],k);j++,L(k.readable,H,U,{end:K})}k=H}else k=d.from(H)}return(null!=c&&c.aborted||null!=f&&f.aborted)&&n.nextTick(l),k}function F(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new y)})),e.pipe(t,{end:!1}),i){function s(){o=!0,t.end()}x(e)?n.nextTick(s):e.once("end",s)}else r();return c(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),c(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:j,pipeline:function(...e){return j(e,f(function(e){return v(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},4664:(e,t,r)=>{const n=r(9907),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:c,ObjectKeys:f,ObjectSetPrototypeOf:u,Promise:d,SafeSet:l,SymbolAsyncDispose:h,SymbolAsyncIterator:p,Symbol:b}=r(3670);e.exports=J,J.ReadableState=K;const{EventEmitter:g}=r(46),{Stream:y,prependListener:m}=r(9731),{Buffer:v}=r(1048),{addAbortSignal:w}=r(9363),_=r(862);let S=r(3968).debuglog("stream",(e=>{S=e}));const A=r(1753),E=r(3432),{getHighWaterMark:M,getDefaultHighWaterMark:R}=r(107),{aggregateTwoErrors:O,codes:{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:P,ERR_STREAM_PUSH_AFTER_EOF:k,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:T}=r(5443),{validateObject:C}=r(3045),B=b("kPaused"),{StringDecoder:L}=r(9301),j=r(7556);u(J.prototype,y.prototype),u(J,y);const F=()=>{},{errorOrDestroy:U}=E,D=1,q=16,z=32,$=64,W=2048,H=4096,V=65536;function G(e){return{enumerable:!1,get(){return!!(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function K(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8842)),this.state=W|H|q|z,e&&e.objectMode&&(this.state|=D),n&&e&&e.readableObjectMode&&(this.state|=D),this.highWaterMark=e?M(this,e,"readableHighWaterMark",n):R(!1),this.buffer=new A,this.length=0,this.pipes=[],this.flowing=null,this[B]=null,e&&!1===e.emitClose&&(this.state&=~W),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function J(e){if(!(this instanceof J))return new J(e);const t=this instanceof r(8842);this._readableState=new K(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&w(e.signal,this)),y.call(this,e),E.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function Y(e,t,r,n){S("readableAddChunk",t);const i=e._readableState;let o;if(i.state&D||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=v.from(t,r).toString(i.encoding):(t=v.from(t,r),r=""))):t instanceof v?r="":y._isUint8Array(t)?(t=y._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new x("chunk",["string","Buffer","Uint8Array"],t))),o)U(e,o);else if(null===t)i.state&=-9,function(e,t){if(S("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Q(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(i.state&D||t&&t.length>0)if(n)if(4&i.state)U(e,new N);else{if(i.destroyed||i.errored)return!1;X(e,i,t,!0)}else if(i.ended)U(e,new k);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?X(e,i,t,!1):te(e,i)):X(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function X(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(t.state&V?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.state&$&&Q(e)),te(e,t)}function Z(e,t){return e<=0||0===t.length&&t.ended?0:t.state&D?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Q(e){const t=e._readableState;S("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(S("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;S("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,se(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const r=t.length;if(S("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function ne(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[B]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){S("readable nexttick read 0"),e.read(0)}function oe(e,t){S("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),se(e),t.flowing&&!t.reading&&e.read(0)}function se(e){const t=e._readableState;for(S("flow",t.flowing);t.flowing&&null!==e.read(););}function ae(e,t){"function"!=typeof e.read&&(e=J.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=F;function i(t){this===e?(n(),n=F):n=t}e.on("readable",i);const o=_(e,{writable:!1},(e=>{r=e?O(r,e):null,n(),n=F}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new d(i)}}}catch(e){throw r=O(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):E.destroyer(e,null)}}(e,t);return r.stream=e,r}function ce(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function fe(e){const t=e._readableState;S("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ue,t,e))}function ue(e,t){if(S("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let le;function he(){return void 0===le&&(le={}),le}c(K.prototype,{objectMode:G(D),ended:G(2),endEmitted:G(4),reading:G(8),constructed:G(q),sync:G(z),needReadable:G($),emittedReadable:G(128),readableListening:G(256),resumeScheduled:G(512),errorEmitted:G(1024),emitClose:G(W),autoDestroy:G(H),destroyed:G(8192),closed:G(16384),closeEmitted:G(32768),multiAwaitDrain:G(V),readingMore:G(1<<17),dataEmitted:G(1<<18)}),J.prototype.destroy=E.destroy,J.prototype._undestroy=E.undestroy,J.prototype._destroy=function(e,t){t(e)},J.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},J.prototype[h]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new T,this.destroy(e)),new d(((t,r)=>_(this,(n=>n&&n!==e?r(n):t(null)))))},J.prototype.push=function(e,t){return Y(this,e,t,!1)},J.prototype.unshift=function(e,t){return Y(this,e,t,!0)},J.prototype.isPaused=function(){const e=this._readableState;return!0===e[B]||!1===e.flowing},J.prototype.setEncoding=function(e){const t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},J.prototype.read=function(e){S("read",e),void 0===e?e=NaN:o(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new P("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return S("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?fe(this):Q(this),null;if(0===(e=Z(e,t))&&t.ended)return 0===t.length&&fe(this),null;let n,i=!!(t.state&$);if(S("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,S("length less than watermark",i)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)i=!1,S("reading, ended or constructing",i);else if(i){S("do read"),t.state|=8|z,0===t.length&&(t.state|=$);try{this._read(t.highWaterMark)}catch(e){U(this,e)}t.state&=~z,t.reading||(e=Z(r,t))}return n=e>0?ce(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&fe(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},J.prototype._read=function(e){throw new I("_read()")},J.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new l(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),S("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?b:s;function s(){S("onend"),e.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){S("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,S("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",u),c=!0,a&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let c=!1;function f(){c||(1===i.pipes.length&&i.pipes[0]===e?(S("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(S("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(S("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(S("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function u(t){S("ondata");const r=e.write(t);S("dest.write",r),!1===r&&f()}function d(t){if(S("onerror",t),b(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?U(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",p),b()}function p(){S("onfinish"),e.removeListener("close",h),b()}function b(){S("unpipe"),r.unpipe(e)}return r.on("data",u),m(e,"error",d),e.once("close",h),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?f():i.flowing||(S("pipe resume"),r.resume()),e},J.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const r=i(t.pipes,e);return-1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},J.prototype.on=function(e,t){const r=y.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,S("on readable",i.length,i.reading),i.length?Q(this):i.reading||n.nextTick(ie,this))),r},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(e,t){const r=y.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},J.prototype.off=J.prototype.removeListener,J.prototype.removeAllListeners=function(e){const t=y.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},J.prototype.resume=function(){const e=this._readableState;return e.flowing||(S("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(oe,e,t))}(this,e)),e[B]=!1,this},J.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[B]=!0,this},J.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{U(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=f(e);for(let t=1;t<r.length;t++){const n=r[t];void 0===this[n]&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},J.prototype[p]=function(){return ae(this)},J.prototype.iterator=function(e){return void 0!==e&&C(e,"options"),ae(this,e)},c(J.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),c(K.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[B]},set(e){this[B]=!!e}}}),J._fromList=ce,J.from=function(e,t){return j(J,e,t)},J.fromWeb=function(e,t){return he().newStreamReadableFromReadableStream(e,t)},J.toWeb=function(e,t){return he().newReadableStreamFromStreamReadable(e,t)},J.wrap=function(e,t){var r,n;return new J({objectMode:null===(r=null!==(n=e.readableObjectMode)&&void 0!==n?n:e.objectMode)||void 0===r||r,...t,destroy(t,r){E.destroyer(e,t),r(t)}}).wrap(e)}},107:(e,t,r)=>{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(3670),{validateInteger:o}=r(3045),{ERR_INVALID_ARG_VALUE:s}=r(5443).codes;let a=16384,c=16;function f(e){return e?c:a}e.exports={getHighWaterMark:function(e,t,r,o){const a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=a){if(!i(a)||a<0)throw new s(o?`options.${r}`:"options.highWaterMark",a);return n(a)}return f(e.objectMode)},getDefaultHighWaterMark:f,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?c=t:a=t}}},8102:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(3670);e.exports=f;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(5443).codes,s=r(8842),{getHighWaterMark:a}=r(107);n(f.prototype,s.prototype),n(f,s);const c=i("kCallback");function f(e){if(!(this instanceof f))return new f(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function u(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function d(){this._final!==u&&u.call(this)}f.prototype._final=u,f.prototype._transform=function(e,t,r){throw new o("_transform()")},f.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length<n.highWaterMark?r():this[c]=r)}))},f.prototype._read=function(){if(this[c]){const e=this[c];this[c]=null,e()}}},4579:(e,t,r)=>{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(3670),s=o("nodejs.stream.destroyed"),a=o("nodejs.stream.errored"),c=o("nodejs.stream.readable"),f=o("nodejs.stream.writable"),u=o("nodejs.stream.disturbed"),d=o("nodejs.webstream.isClosedPromise"),l=o("nodejs.webstream.controllerErrorFunction");function h(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function b(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||b(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function y(e){return!(!e||b(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function m(e){return!(!e||b(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[s]||null!=n&&n.destroyed)}function w(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function _(e,t){if(!h(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function S(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&h(e)&&e.readable&&!_(e)}function A(e){return e&&null!=e[f]?e[f]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&p(e)&&e.writable&&!w(e)}function E(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function M(e){return"boolean"==typeof e._sent100&&E(e)}e.exports={isDestroyed:v,kIsDestroyed:s,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[u])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:u,isErrored:function(e){var t,r,n,i,o,s,c,f,u,d;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[a])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(c=e._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==n?n:null===(f=e._writableState)||void 0===f?void 0:f.errorEmitted)&&void 0!==r?r:null===(u=e._readableState)||void 0===u?void 0:u.errored)&&void 0!==t?t:null===(d=e._writableState)||void 0===d?void 0:d.errored))},kIsErrored:a,isReadable:S,kIsReadable:c,kIsClosedPromise:d,kControllerErrorFunction:l,kIsWritable:f,isClosed:function(e){if(!b(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&E(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return b(e)?!(!v(e)&&(!1!==(null==t?void 0:t.readable)&&S(e)||!1!==(null==t?void 0:t.writable)&&A(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:h,isReadableStream:g,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:_,isReadableErrored:function(e){var t,r;return b(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:b,isWebStream:function(e){return g(e)||y(e)||m(e)},isWritable:A,isWritableNodeStream:p,isWritableStream:y,isWritableEnded:w,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return b(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:M,willEmitClose:function(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&M(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:m}},5672:(e,t,r)=>{const n=r(9907),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:c,ObjectSetPrototypeOf:f,StringPrototypeToLowerCase:u,Symbol:d,SymbolHasInstance:l}=r(3670);e.exports=C,C.WritableState=N;const{EventEmitter:h}=r(46),p=r(9731).Stream,{Buffer:b}=r(1048),g=r(3432),{addAbortSignal:y}=r(9363),{getHighWaterMark:m,getDefaultHighWaterMark:v}=r(107),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:A,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:M,ERR_STREAM_NULL_VALUES:R,ERR_STREAM_WRITE_AFTER_END:O,ERR_UNKNOWN_ENCODING:x}=r(5443).codes,{errorOrDestroy:I}=g;function P(){}f(C.prototype,p.prototype),f(C,p);const k=d("kOnFinished");function N(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8842)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?m(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,T(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[k]=[]}function T(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function C(e){const t=this instanceof r(8842);if(!t&&!s(C,this))return new C(e);this._writableState=new N(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&y(e.signal,this)),p.call(this,e),g.construct(this,(()=>{const e=this._writableState;e.writing||z(this,e),W(this,e)}))}function B(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new x(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===t)throw new R;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=b.from(t,r),r="buffer");else if(t instanceof b)r="buffer";else{if(!p._isUint8Array(t))throw new w("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new O:o.destroyed&&(s=new E("write")),s?(n.nextTick(i,s),I(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:r,encoding:n,callback:i}),t.allBuffers&&"buffer"!==n&&(t.allBuffers=!1),t.allNoop&&i!==P&&(t.allNoop=!1)):(t.writelen=o,t.writecb=i,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1),s&&!t.errored&&!t.destroyed}(e,o,t,r,i))}function L(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new E("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function j(e,t,r,n){--t.pendingcb,n(r),q(t),I(e,r)}function F(e,t){const r=e._writableState,i=r.sync,o=r.writecb;"function"==typeof o?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?n.nextTick(j,e,r,t,o):j(e,r,t,o)):(r.buffered.length>r.bufferedIndex&&z(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(U,r.afterWriteTickInfo)):D(e,r,1,o))):I(e,new S)}function U({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,D(e,t,r,n)}function D(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&q(t),W(e,t)}function q(e){if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){var t;const{chunk:n,callback:i}=e.buffered[r],o=e.objectMode?1:n.length;e.length-=o,i(null!==(t=e.errored)&&void 0!==t?t:new E("write"))}const r=e[k].splice(0);for(let t=0;t<r.length;t++){var n;r[t](null!==(n=e.errored)&&void 0!==n?n:new E("end"))}T(e)}function z(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:o}=t,s=r.length-n;if(!s)return;let a=n;if(t.bufferProcessing=!0,s>1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?P:e=>{for(let t=a;t<r.length;++t)r[t].callback(e)},o=t.allNoop&&0===a?r:i(r,a);o.allBuffers=t.allBuffers,L(e,t,!0,t.length,o,"",n),T(t)}else{do{const{chunk:n,encoding:i,callback:s}=r[a];r[a++]=null,L(e,t,!1,o?1:n.length,n,i,s)}while(a<r.length&&!t.writing);a===r.length?T(t):a>256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function $(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function W(e,t,r){$(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)I(e,null!=i?i:S());else if(r=!0,t.pendingcb--,i){const r=t[k].splice(0);for(let e=0;e<r.length;e++)r[e](i);I(e,i,t.sync)}else $(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,n.nextTick(H,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}(e,t)))}(e,t),0===t.pendingcb&&(r?(t.pendingcb++,n.nextTick(((e,t)=>{$(t)?H(e,t):t.pendingcb--}),e,t)):$(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[k].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}N.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},a(N.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(C,l,{__proto__:null,value:function(e){return!!s(this,e)||this===C&&e&&e._writableState instanceof N}}),C.prototype.pipe=function(){I(this,new A)},C.prototype.write=function(e,t,r){return!0===B(this,e,t,r)},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||z(this,e))},C.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=u(e)),!b.isEncoding(e))throw new x(e);return this._writableState.defaultEncoding=e,this},C.prototype._write=function(e,t,r){if(!this._writev)throw new _("_write()");this._writev([{chunk:e,encoding:t}],r)},C.prototype._writev=null,C.prototype.end=function(e,t,r){const i=this._writableState;let s;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){const r=B(this,e,t);r instanceof o&&(s=r)}return i.corked&&(i.corked=1,this.uncork()),s||(i.errored||i.ending?i.finished?s=new M("end"):i.destroyed&&(s=new E("end")):(i.ending=!0,W(this,i,!0),i.ended=!0)),"function"==typeof r&&(s||i.finished?n.nextTick(r,s):i[k].push(r)),this},c(C.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const V=g.destroy;let G;function K(){return void 0===G&&(G={}),G}C.prototype.destroy=function(e,t){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[k].length)&&n.nextTick(q,r),V.call(this,e,t),this},C.prototype._undestroy=g.undestroy,C.prototype._destroy=function(e,t){t(e)},C.prototype[h.captureRejectionSymbol]=function(e){this.destroy(e)},C.fromWeb=function(e,t){return K().newStreamWritableFromWritableStream(e,t)},C.toWeb=function(e){return K().newWritableStreamFromStreamWritable(e)}},3045:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:f,NumberMIN_SAFE_INTEGER:u,NumberParseInt:d,ObjectPrototypeHasOwnProperty:l,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:g}=r(3670),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:m,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:S}}=r(5443),{normalizeEncoding:A}=r(3968),{isAsyncFunction:E,isArrayBufferView:M}=r(3968).types,R={},O=/^[0-7]+$/,x=y(((e,t,r=u,n=f)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),I=y(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),P=y(((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);const n=r?1:0,i=4294967295;if(e<n||e>i)throw new _(t,`>= ${n} && <= ${i}`,e)}));function k(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const N=y(((e,t,r)=>{if(!i(r,e)){const n=o(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new w(t,e,"must be one of: "+n)}}));function T(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function C(e,t,r){return null!=e&&l(e,t)?e[t]:r}const B=y(((e,t,r=null)=>{const i=C(r,"allowArray",!1),o=C(r,"allowFunction",!1);if(!C(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new v(t,"Object",e)})),L=y(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)})),j=y(((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length<r)throw new w(t,e,`must be longer than ${r}`)})),F=y(((e,t="buffer")=>{if(!M(e))throw new v(t,["Buffer","TypedArray","DataView"],e)})),U=y(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)})),D=y(((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)})),q=y(((e,t)=>{if("function"!=typeof e||E(e))throw new v(t,"Function",e)})),z=y(((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)})),$=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function W(e,t){if(void 0===e||!h($,e))throw new w(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(O,e))throw new w(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return P(e,t),e},validateArray:j,validateStringArray:function(e,t){j(e,t);for(let r=0;r<e.length;r++)k(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){j(e,t);for(let r=0;r<e.length;r++)T(e[r],`${t}[${r}]`)},validateAbortSignalArray:function(e,t){j(e,t);for(let r=0;r<e.length;r++){const n=e[r],i=`${t}[${r}]`;if(null==n)throw new v(i,"AbortSignal",n);U(n,i)}},validateBoolean:T,validateBuffer:F,validateDictionary:L,validateEncoding:function(e,t){const r=A(t),n=e.length;if("hex"===r&&n%2!=0)throw new w("encoding",t,`is invalid for data of length ${n}`)},validateFunction:D,validateInt32:I,validateInteger:x,validateNumber:function(e,t,r=void 0,n){if("number"!=typeof e)throw new v(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&c(e))throw new _(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:B,validateOneOf:N,validatePlainFunction:q,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new m(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(k(e,t),void 0===R[e]){if(void 0!==R[b(e)])throw new S(e+" (signals must use all capital letters)");throw new S(e)}},validateString:k,validateUint32:P,validateUndefined:z,validateUnion:function(e,t,r){if(!i(r,e))throw new v(t,`('${o(r,"|")}')`,e)},validateAbortSignal:U,validateLinkHeaderValue:function(e){if("string"==typeof e)return W(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const i=e[n];W(i,"hints"),r+=i,n!==t-1&&(r+=", ")}return r}throw new w("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},446:(e,t,r)=>{"use strict";const n=r(8690),i=r(359),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},5443:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(3968),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],f=/^([A-Z][a-z0-9]*)+$/,u={};function d(e,t){if(!e)throw new u.ERR_INTERNAL_ASSERTION(t)}function l(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function h(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return d(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return d(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,u[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class b extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new u.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((e,t,r)=>{d("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)d("string"==typeof e,"All expected entries have to be of type string"),c.includes(e)?o.push(e.toLowerCase()):f.test(e)?s.push(e):(d("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var u;null!==(u=r.constructor)&&void 0!==u&&u.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",((...e)=>{let t;d(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return d(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=l(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=l(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:b,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:u}},3670:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},3968:(e,t,r)=>{"use strict";const n=r(1048),{kResistStopPropagation:i,SymbolDispose:o}=r(3670),s=globalThis.AbortSignal||r(7083).AbortSignal,a=globalThis.AbortController||r(7083).AbortController,c=Object.getPrototypeOf((async function(){})).constructor,f=globalThis.Blob||n.Blob,u=void 0!==f?function(e){return e instanceof f}:function(e){return!1},d=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class l extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}e.exports={AggregateError:l,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:u,deprecate:(e,t)=>e,addAbortListener:r(46).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return d(e,"signal"),(e=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:s.any||function(e){if(1===e.length)return e[0];const t=new a,r=()=>t.abort();return e.forEach((e=>{d(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},8690:(e,t,r)=>{const{Buffer:n}=r(1048),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(3670),{promisify:{custom:a}}=r(3968),{streamReturningOperators:c,promiseReturningOperators:f}=r(1543),{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=r(5443),d=r(5366),{setDefaultHighWaterMark:l,getDefaultHighWaterMark:h}=r(107),{pipeline:p}=r(4846),{destroyer:b}=r(3432),g=r(862),y=r(359),m=r(4579),v=e.exports=r(9731).Stream;v.isDestroyed=m.isDestroyed,v.isDisturbed=m.isDisturbed,v.isErrored=m.isErrored,v.isReadable=m.isReadable,v.isWritable=m.isWritable,v.Readable=r(4664);for(const S of o(c)){const A=c[S];function w(...e){if(new.target)throw u();return v.Readable.from(s(A,this,e))}i(w,"name",{__proto__:null,value:A.name}),i(w,"length",{__proto__:null,value:A.length}),i(v.Readable.prototype,S,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(const E of o(f)){const M=f[E];function w(...e){if(new.target)throw u();return s(M,this,e)}i(w,"name",{__proto__:null,value:M.name}),i(w,"length",{__proto__:null,value:M.length}),i(v.Readable.prototype,E,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(5672),v.Duplex=r(8842),v.Transform=r(8102),v.PassThrough=r(7932),v.pipeline=p;const{addAbortSignal:_}=r(9363);v.addAbortSignal=_,v.finished=g,v.destroy=b,v.compose=d,v.setDefaultHighWaterMark=l,v.getDefaultHighWaterMark=h,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,a,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(g,a,{__proto__:null,enumerable:!0,get:()=>y.finished}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},359:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(3670),{isIterable:o,isNodeStream:s,isWebStream:a}=r(4579),{pipelineImpl:c}=r(4846),{finished:f}=r(862);r(8690),e.exports={finished:f,pipeline:function(...e){return new i(((t,r)=>{let i,f;const u=e[e.length-1];if(u&&"object"==typeof u&&!s(u)&&!o(u)&&!a(u)){const t=n(e);i=t.signal,f=t.end}c(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:f})}))}}},9301:(e,t,r)=>{"use strict";var n=r(5636).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=f,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=l,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},7083:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],c=o[1],f=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,c)),u=0,d=c>0?s-4:s;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],f[u++]=t>>16&255,f[u++]=t>>8&255,f[u++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[u++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[u++]=t>>8&255,f[u++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,f=n-i;a<f;a+=s)o.push(c(e,a,a+s>f?f:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},527:(e,t,r)=>{"use strict";var n=r(1048).Buffer,i=r(3330);function o(e,t){return void 0===t&&(t="utf8"),n.isBuffer(e)?a(e.toString("base64")):a(n.from(e,t).toString("base64"))}function s(e){return e=e.toString(),i.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function a(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var c=o;c.encode=o,c.decode=function(e,t){return void 0===t&&(t="utf8"),n.from(s(e),"base64").toString(t)},c.toBase64=s,c.fromBase64=a,c.toBuffer=function(e){return n.from(s(e),"base64")},t.default=c},3330:(e,t,r)=>{"use strict";var n=r(1048).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var i=t,o=4-r,s=t+o,a=n.alloc(s);for(a.write(e);o--;)a.write("=",i++);return a.toString()}},7702:(e,t,r)=>{e.exports=r(527).default,e.exports.default=e.exports},2823:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8379).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function f(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),c=t;c<a;c++){var f=e.charCodeAt(c)-48;o*=i,s=f>=49?f-49+10:f>=17?f-17+10:f,n(f>=0&&s<i,"Invalid character"),o+=s}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=c(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=c(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,u=r;u<a;u+=n)c=f(e,u,u+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var d=1;for(c=f(e,u,e.length,t),u=0;u<s;u++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var u=c>>>26,d=67108863&c,l=Math.min(f,t.length-1),h=Math.max(0,f-e.length+1);h<=l;h++){var p=f-h|0;u+=(s=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&s}r.words[f]=0|d,c=0|u}return 0!==c?r.words[f]=0|c:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?l[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var f=h[e],u=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(u).toString(e);r=(d=d.idivn(u)).isZero()?b+r:l[f-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,o,s=e.words,a=t.words,c=r.words,f=0,u=0|s[0],d=8191&u,l=u>>>13,h=0|s[1],p=8191&h,b=h>>>13,g=0|s[2],y=8191&g,m=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],A=8191&S,E=S>>>13,M=0|s[5],R=8191&M,O=M>>>13,x=0|s[6],I=8191&x,P=x>>>13,k=0|s[7],N=8191&k,T=k>>>13,C=0|s[8],B=8191&C,L=C>>>13,j=0|s[9],F=8191&j,U=j>>>13,D=0|a[0],q=8191&D,z=D>>>13,$=0|a[1],W=8191&$,H=$>>>13,V=0|a[2],G=8191&V,K=V>>>13,J=0|a[3],Y=8191&J,X=J>>>13,Z=0|a[4],Q=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,fe=ae>>>13,ue=0|a[8],de=8191&ue,le=ue>>>13,he=0|a[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(f+(n=Math.imul(d,q))|0)+((8191&(i=(i=Math.imul(d,z))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var ye=(f+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,z))+Math.imul(m,q)|0,o=Math.imul(m,z),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,H)|0;var me=(f+(n=n+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(l,G)|0))<<13)|0;f=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(_,q)|0,o=Math.imul(_,z),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0;var ve=(f+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,z))+Math.imul(E,q)|0,o=Math.imul(E,z),n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0;var we=(f+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,z))+Math.imul(O,q)|0,o=Math.imul(O,z),n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,H)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(f+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;f=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(P,q)|0,o=Math.imul(P,z),n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(f+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,se)|0)+Math.imul(l,oe)|0))<<13)|0;f=((o=o+Math.imul(l,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0;var Ae=(f+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(l,ce)|0))<<13)|0;f=((o=o+Math.imul(l,fe)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,z))+Math.imul(L,q)|0,o=Math.imul(L,z),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(b,ce)|0,o=o+Math.imul(b,fe)|0;var Ee=(f+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;f=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,H)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,H)|0,n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,le)|0;var Me=(f+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;f=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,H))+Math.imul(U,W)|0,o=Math.imul(U,H),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,G)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,fe)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,le)|0;var Re=(f+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;f=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,K))+Math.imul(U,G)|0,o=Math.imul(U,K),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,X)|0,n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(E,ce)|0,o=o+Math.imul(E,fe)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,le)|0;var Oe=(f+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,be)|0)+Math.imul(m,pe)|0))<<13)|0;f=((o=o+Math.imul(m,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,X))+Math.imul(U,Y)|0,o=Math.imul(U,X),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,fe)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(E,de)|0,o=o+Math.imul(E,le)|0;var xe=(f+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;f=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(U,Q)|0,o=Math.imul(U,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(P,ce)|0,o=o+Math.imul(P,fe)|0,n=n+Math.imul(R,de)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,le)|0;var Ie=(f+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,be)|0)+Math.imul(E,pe)|0))<<13)|0;f=((o=o+Math.imul(E,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,se)|0,n=n+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,fe)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0;var Pe=(f+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(O,pe)|0))<<13)|0;f=((o=o+Math.imul(O,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,oe),i=(i=Math.imul(F,se))+Math.imul(U,oe)|0,o=Math.imul(U,se),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,fe)|0,n=n+Math.imul(N,de)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var ke=(f+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(P,pe)|0))<<13)|0;f=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(F,ce),i=(i=Math.imul(F,fe))+Math.imul(U,ce)|0,o=Math.imul(U,fe),n=n+Math.imul(B,de)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,le)|0;var Ne=(f+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,be)|0)+Math.imul(T,pe)|0))<<13)|0;f=((o=o+Math.imul(T,be)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(F,de),i=(i=Math.imul(F,le))+Math.imul(U,de)|0,o=Math.imul(U,le);var Te=(f+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(L,pe)|0))<<13)|0;f=((o=o+Math.imul(L,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Ce=(f+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,be))+Math.imul(U,pe)|0))<<13)|0;return f=((o=Math.imul(U,be))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c[0]=ge,c[1]=ye,c[2]=me,c[3]=ve,c[4]=we,c[5]=_e,c[6]=Se,c[7]=Ae,c[8]=Ee,c[9]=Me,c[10]=Re,c[11]=Oe,c[12]=xe,c[13]=Ie,c[14]=Pe,c[15]=ke,c[16]=Ne,c[17]=Te,c[18]=Ce,0!==f&&(c[19]=f,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,c=Math.min(o,t.length-1),f=Math.max(0,o-e.length+1);f<=c;f++){var u=o-f,d=(0|e.words[u])*(0|t.words[f]),l=67108863&d;a=67108863&(l=l+a|0),i+=(s=(s=s+(d/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=b),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?b(this,e,t):r<1024?y(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var d=c,l=f,h=0;h<s;h++){var p=r[u+h],b=n[u+h],g=r[u+h+s],y=n[u+h+s],m=d*g-l*y;y=d*y+l*g,g=m,r[u+h]=p+g,n[u+h]=b+y,r[u+h+s]=p-g,n[u+h+s]=b-y,h!==a&&(m=c*d-f*l,l=c*l+f*d,d=m)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),c=new Array(n),f=new Array(n),u=new Array(n),d=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,f,n),this.transform(s,o,a,c,n,i),this.transform(f,o,u,d,n,i);for(var h=0;h<n;h++){var p=a[h]*u[h]-c[h]*d[h];c[h]=a[h]*d[h]+c[h]*u[h],a[h]=p}return this.conjugate(a,c,n),this.transform(a,c,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,c=(0|this.words[t])-a<<r;this.words[t]=c|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var f=0;f<s;f++)c.words[f]=this.words[f];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var u=0;for(f=this.length-1;f>=0&&(0!==u||f>=i);f--){var d=0|this.words[f];this.words[f]=u<<26-o|d>>>o,u=d&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[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},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var c=(0|e.words[i])*t;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var u=n.clone()._ishlnsubmul(i,1,c);0===u.negative&&(n=u,a&&(a.words[c]=1));for(var d=c-1;d>=0;d--){var l=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);a&&(a.words[d]=l)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),f=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++f;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;!(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;!(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(d)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(c)):(r.isub(t),a.isub(i),c.isub(s))}return{a,b:c,gcd:r.iushln(f)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,u=1;!(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var d=0,l=1;!(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new R(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){R.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(S,_),S.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(A,_),i(E,_),i(M,_),M.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new A;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return w[e]=t,t},R.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},R.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},R.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},R.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},R.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},R.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},R.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},R.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},R.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},R.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},R.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},R.prototype.isqr=function(e){return this.imul(e,e.clone())},R.prototype.sqr=function(e){return this.mul(e,e)},R.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,f).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),l=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=s;0!==h.cmp(a);){for(var b=h,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g<p);var y=this.pow(d,new o(1).iushln(p-g-1));l=l.redMul(y),d=y.redSqr(),h=h.redMul(d),p=g}return l},R.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},R.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var f=t.words[n],u=c-1;u>=0;u--){var d=f>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4==++a||0===n&&0===u)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},R.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},R.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},i(O,R),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},3643:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),s=Math.max(i,o),a=0,c=e.map([t,r],(function(t){var r=s-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=o.length;t<r;t+=1)a();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(t.prototype,null),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=c(r(92)),i=c(r(93)),o=c(r(94)),s=c(r(95)),a=c(r(17));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(r[t]=s,n+=1)})),n>0){var s=Object.keys(r),c=a.default.find(s,(function(e){return t.isOS(e)}));if(c){var f=this.satisfies(r[c]);if(void 0!==f)return f}var u=a.default.find(s,(function(e){return t.isPlatform(e)}));if(u){var d=this.satisfies(r[u]);if(void 0!==d)return d}}if(o>0){var l=Object.keys(i),h=a.default.find(l,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=f,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},7048:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.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),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(3553);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},1048:(e,t,r)=>{"use strict";const n=r(7991),i=r(9318),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(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 d(e){return u(e),a(e<0?0:0|p(e))}function l(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function b(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(f(e,o)===f(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(f(e,o+n)!==f(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Y(n))return s;e[r+s]=n}return s}function _(e,t,r,n){return K(V(t,e.length-r),e,r,n)}function S(e,t,r,n){return K(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return K(G(t),e,r,n)}function E(e,t,r,n){return K(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function M(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function R(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=O));return r}(n)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return f(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(J(t,Uint8Array))i+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=b,c.prototype._isBuffer=!0,c.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;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?R(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.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===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),f=this.slice(n,i),u=e.slice(t,r);for(let e=0;e<a;++e)if(f[e]!==u[e]){o=f[e],s=u[e];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function x(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=X[e[n]];return i}function k(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function N(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function C(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function B(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function L(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Z((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=Z((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Z((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Z((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(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},c.prototype.writeBigUInt64LE=Z((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Z((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(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},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(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},c.prototype.writeBigInt64LE=Z((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Z((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=c.isBuffer(e)?e:c.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const U={};function D(e,t,r){U[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){$(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,i,o)}function $(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw $(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},9818:(e,t,r)=>{"use strict";var n=r(528),i=r(8498),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},8498:(e,t,r)=>{"use strict";var n=r(9138),i=r(528),o=r(6108),s=r(3468),a=i("%Function.prototype.apply%"),c=i("%Function.prototype.call%"),f=i("%Reflect.apply%",!0)||n.call(c,a),u=r(4940),d=i("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new s("a function is required");var t=f(n,c,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var l=function(){return f(n,a,arguments)};u?u(e.exports,"apply",{value:l}):e.exports.apply=l},686:(e,t,r)=>{"use strict";var n=r(4940),i=r(5731),o=r(3468),s=r(9336);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new o("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!s&&s(e,t);if(n)n(e,t,{configurable:null===f&&d?d.configurable:!f,enumerable:null===a&&d?d.enumerable:!a,value:r,writable:null===c&&d?d.writable:!c});else{if(!u&&(a||c||f))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},3360:(e,t,r)=>{"use strict";var n=t;n.version=r(183).rE,n.utils=r(1874),n.rand=r(7048),n.curve=r(7131),n.curves=r(6443),n.ec=r(5064),n.eddsa=r(4807)},5174:(e,t,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.getNAF,s=i.getJSF,a=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,c,f=[];for(s=0;s<n.length;s+=r.step){c=0;for(var u=s+r.step-1;u>=s;u--)c=(c<<1)+n[u];f.push(c)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(s=0;s<f.length;s++)(c=f[s])===h?l=l.mixedAdd(r.points[s]):c===-h&&(l=l.mixedAdd(r.points[s].neg()));d=d.add(l)}return d.toP()},c.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(t,r,this._bitLength),c=this.jpoint(null,null,null),f=s.length-1;f>=0;f--){for(var u=0;f>=0&&0===s[f];f--)u++;if(f>=0&&u++,c=c.dblp(u),f<0)break;var d=s[f];a(0!==d),c="affine"===e.type?d>0?c.mixedAdd(i[d-1>>1]):c.mixedAdd(i[-d-1>>1].neg()):d>0?c.add(i[d-1>>1]):c.add(i[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){var a,c,f,u=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(a=0;a<n;a++){var p=(f=t[a])._getNAFPoints(e);u[a]=p.wnd,d[a]=p.points}for(a=n-1;a>=1;a-=2){var b=a-1,g=a;if(1===u[b]&&1===u[g]){var y=[t[b],null,null,t[g]];0===t[b].y.cmp(t[g].y)?(y[1]=t[b].add(t[g]),y[2]=t[b].toJ().mixedAdd(t[g].neg())):0===t[b].y.cmp(t[g].y.redNeg())?(y[1]=t[b].toJ().mixedAdd(t[g]),y[2]=t[b].add(t[g].neg())):(y[1]=t[b].toJ().mixedAdd(t[g]),y[2]=t[b].toJ().mixedAdd(t[g].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[b],r[g]);for(h=Math.max(v[0].length,h),l[b]=new Array(h),l[g]=new Array(h),c=0;c<h;c++){var w=0|v[0][c],_=0|v[1][c];l[b][c]=m[3*(w+1)+(_+1)],l[g][c]=0,d[b]=y}}else l[b]=o(r[b],u[b],this._bitLength),l[g]=o(r[g],u[g],this._bitLength),h=Math.max(l[b].length,h),h=Math.max(l[g].length,h)}var S=this.jpoint(null,null,null),A=this._wnafT4;for(a=h;a>=0;a--){for(var E=0;a>=0;){var M=!0;for(c=0;c<n;c++)A[c]=0|l[c][a],0!==A[c]&&(M=!1);if(!M)break;E++,a--}if(a>=0&&E++,S=S.dblp(E),a<0)break;for(c=0;c<n;c++){var R=A[c];0!==R&&(R>0?f=d[c][R-1>>1]:R<0&&(f=d[c][-R-1>>1].neg()),S="affine"===f.type?S.mixedAdd(f):S.add(f))}}for(a=0;a<n;a++)d[a]=null;return i?S:S.toP()},c.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(e){return this.encode(e,!0)},f.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},f.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},f.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},f.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},f.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},1547:(e,t,r)=>{"use strict";var n=r(1874),i=r(2823),o=r(5615),s=r(5174),a=n.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new 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),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function f(e,t,r,n,o){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,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()))))}o(c,s),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var c=a.fromRed().isOdd();return(t&&!c||!t&&c)&&(a=a.redNeg()),this.point(e,a)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(f,s.BasePoint),c.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},c.prototype.point=function(e,t,r,n){return new f(this,e,t,r,n)},f.fromJSON=function(e,t){return new f(e,t[0],t[1],t[2])},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),c=i.redMul(s),f=o.redMul(a),u=i.redMul(a),d=s.redMul(o);return this.curve.point(c,f,d,u)},f.prototype._projDbl=function(){var e,t,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var f=(n=this.curve._mulA(a)).redAdd(c);this.zOne?(e=s.redSub(a).redSub(c).redMul(f.redSub(this.curve.two)),t=f.redMul(n.redSub(c)),r=f.redSqr().redSub(f).redSub(f)):(i=this.z.redSqr(),o=f.redSub(i).redISub(i),e=s.redSub(a).redISub(c).redMul(o),t=f.redMul(n.redSub(c)),r=f.redMul(o))}else n=a.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),c=r.redAdd(t),f=o.redMul(s),u=a.redMul(c),d=o.redMul(c),l=s.redMul(a);return this.curve.point(f,u,l,d)},f.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),c=i.redSub(a),f=i.redAdd(a),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),d=n.redMul(c).redMul(u);return this.curve.twisted?(t=n.redMul(f).redMul(s.redSub(this.curve._mulA(o))),r=c.redMul(f)):(t=n.redMul(f).redMul(s.redSub(o)),r=this.curve._mulC(c).redMul(f)),this.curve.point(d,t,r)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},f.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},f.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},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},7131:(e,t,r)=>{"use strict";var n=t;n.base=r(5174),n.short=r(277),n.mont=r(3245),n.edwards=r(1547)},3245:(e,t,r)=>{"use strict";var n=r(2823),i=r(5615),o=r(5174),s=r(1874);function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new c(this,e,t)},a.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=i.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),c=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,c)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},277:(e,t,r)=>{"use strict";var n=r(1874),i=r(2823),o=r(5615),s=r(5174),a=n.assert;function c(e){s.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 f(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(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(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,s),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,c,f,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new i(1),b=new i(0),g=new i(0),y=new i(1),m=0;0!==l.cmpn(0);){var v=h.div(l);f=h.sub(v.mul(l)),u=g.sub(v.mul(p));var w=y.sub(v.mul(b));if(!n&&f.cmp(d)<0)t=c.neg(),r=p,n=f.neg(),o=u;else if(n&&2==++m)break;c=f,h=l,l=f,g=p,p=u,y=b,b=w}s=f.neg(),a=u;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),c=i.mul(r.b),f=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:c.add(f).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],c=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),n[2*o]=a,n[2*o+1]=c,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var f=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return f},o(f,s.BasePoint),c.prototype.point=function(e,t,r){return new f(this,e,t,r)},c.prototype.pointFromJSON=function(e,t){return f.fromJSON(this,e,t)},f.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.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)},f.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,s.BasePoint),c.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),c=o.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),d=n.redMul(f),l=c.redSqr().redIAdd(u).redISub(d).redISub(d),h=c.redMul(d.redISub(l)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(l,h,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),u=r.redMul(c),d=a.redSqr().redIAdd(f).redISub(u).redISub(u),l=a.redMul(u.redISub(d)).redISub(i.redMul(f)),h=this.z.redMul(s);return this.curve.jpoint(d,l,h)},u.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 r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,c=a.redSqr().redSqr(),f=s.redAdd(s);for(t=0;t<e;t++){var u=o.redSqr(),d=f.redSqr(),l=d.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(c)),p=o.redMul(d),b=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(b),y=h.redMul(g);y=y.redIAdd(y).redISub(l);var m=f.redMul(a);t+1<e&&(c=c.redMul(l)),o=b,a=m,f=y}return this.curve.jpoint(o,f.redMul(i),a)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),c=a.redSqr().redISub(s).redISub(s),f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),e=c,t=a.redMul(s.redISub(c)).redISub(f),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),l=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(u).redISub(l);h=h.redIAdd(h);var p=u.redAdd(u).redIAdd(u),b=p.redSqr(),g=l.redIAdd(l);g=(g=g.redIAdd(g)).redIAdd(g),e=b.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},u.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);e=c;var f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),t=a.redMul(s.redISub(c)).redISub(f),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),l=this.x.redMul(d),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var p=l.redIAdd(l),b=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t),f=(c=c.redIAdd(c)).redMul(s),u=a.redSqr().redISub(f.redAdd(f)),d=f.redISub(u),l=s.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=a.redMul(d).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(u,h,p)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var f=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(c),u=t.redMul(f);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(a).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var l=this.y.redMul(f.redMul(c.redISub(f)).redISub(s.redMul(a)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(d,l,h)},u.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},6443:(e,t,r)=>{"use strict";var n,i=t,o=r(9499),s=r(7131),a=r(1874).assert;function c(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(3986)}catch(e){n=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},5064:(e,t,r)=>{"use strict";var n=r(2823),i=r(4742),o=r(1874),s=r(6443),a=r(7048),c=o.assert,f=r(7531),u=r(7782);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.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=d,d.prototype.keyPair=function(e){return new f(this,e)},d.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),c=e.toArray("be",s),f=new i({hash:this.hash,entropy:a,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),l=0;;l++){var h=o.k?o.k(l):new n(f.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var y=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),m^=1),new u({r:g,s:y,recoveryParam:m})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,c=s.invm(this.n),f=c.mul(e).umod(this.n),d=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),d)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,r.getPublic(),d)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){c((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,s=new n(e),a=t.r,f=t.s,d=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),d):this.curve.pointFromX(a,d);var h=t.r.invm(o),p=o.sub(s).mul(h).umod(o),b=f.mul(h).umod(o);return this.g.mulAdd(p,a,b)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},7531:(e,t,r)=>{"use strict";var n=r(2823),i=r(1874).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){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)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},7782:(e,t,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=t.place;o<n;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function f(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function u(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=c(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=c(e,r);if(!1===s)return!1;var f=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var u=c(e,r);if(!1===u)return!1;if(e.length!==u+r.place)return!1;var d=e.slice(r.place,u+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(f),this.s=new n(d),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var o=n.concat(r),s=[48];return u(s,o.length),s=s.concat(o),i.encode(s,e)}},4807:(e,t,r)=>{"use strict";var n=r(9499),i=r(6443),o=r(1874),s=o.assert,a=o.parseBytes,c=r(4672),f=r(8401);function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),c=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},u.prototype.verify=function(e,t,r){if(e=a(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},u.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},u.prototype.makeSignature=function(e){return e instanceof f?e:new f(this,e)},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},u.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=!!(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(e){return o.intFromLE(e)},u.prototype.isPoint=function(e){return e instanceof this.pointClass}},4672:(e,t,r)=>{"use strict";var n=r(1874),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=a},8401:(e,t,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},3986: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"]]}}},1874:(e,t,r)=>{"use strict";var n=t,i=r(2823),o=r(7784),s=r(9042);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(e,t,r){var n,i=new Array(Math.max(e.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<t+1,s=e.clone();for(n=0;n<i.length;n++){var a,c=s.andln(o-1);s.isOdd()?(a=c>(o>>1)-1?(o>>1)-c:c,s.isubn(a)):a=0,i[n]=a,s.iushrn(1)}return i},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,c=e.andln(3)+i&3,f=t.andln(3)+o&3;3===c&&(c=-1),3===f&&(f=-1),s=1&c?3!=(n=e.andln(7)+i&7)&&5!==n||2!==f?c:-c:0,r[0].push(s),a=1&f?3!=(n=t.andln(7)+o&7)&&5!==n||2!==c?f:-f:0,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},1822:(e,t,r)=>{var n=r(9907),i=r(3358),o=function(){},s=function(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=i(r||o);var a=e._writableState,c=e._readableState,f=t.readable||!1!==t.readable&&e.readable,u=t.writable||!1!==t.writable&&e.writable,d=!1,l=function(){e.writable||h()},h=function(){u=!1,f||r.call(e)},p=function(){f=!1,u||r.call(e)},b=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){r.call(e,t)},y=function(){n.nextTick(m)},m=function(){if(!d)return(!f||c&&c.ended&&!c.destroyed)&&(!u||a&&a.ended&&!a.destroyed)?void 0:r.call(e,new Error("premature close"))},v=function(){e.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",h),e.on("abort",y),e.req?v():e.on("request",v)):u&&!a&&(e.on("end",l),e.on("close",l)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",b),e.on("end",p),e.on("finish",h),!1!==t.error&&e.on("error",g),e.on("close",y),function(){d=!0,e.removeListener("complete",h),e.removeListener("abort",y),e.removeListener("request",v),e.req&&e.req.removeListener("finish",h),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",h),e.removeListener("exit",b),e.removeListener("end",p),e.removeListener("error",g),e.removeListener("close",y)}};e.exports=s},4940:(e,t,r)=>{"use strict";var n=r(528)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},9110:e=>{"use strict";e.exports=EvalError},9838:e=>{"use strict";e.exports=Error},1155:e=>{"use strict";e.exports=RangeError},4943:e=>{"use strict";e.exports=ReferenceError},5731:e=>{"use strict";e.exports=SyntaxError},3468:e=>{"use strict";e.exports=TypeError},2140:e=>{"use strict";e.exports=URIError},46:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.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 o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,o,s,f;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,f=u,console&&console.warn&&console.warn(f)}return e}function u(){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 d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function l(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var f=c.length,u=p(c,f);for(r=0;r<f;++r)n(u[r],this,t)}return!0},o.prototype.addListener=function(e,t){return f(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return f(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return l(this,e,!0)},o.prototype.rawListeners=function(e){return l(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},282:e=>{e.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=o()),c(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,l(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var f=n.pop();4===f.length?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return a}function a(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:e}),n.push([o,r,t,s])):i.push([t,r,e]):(o[r]=e,n.push([o,r,t]))}function c(e,n,i,o,s,f,u){var d;if(f+=1,"object"==typeof e&&null!==e){for(d=0;d<o.length;d++)if(o[d]===e)return void a(r,e,n,s);if(void 0!==u.depthLimit&&f>u.depthLimit)return void a(t,e,n,s);if(void 0!==u.edgesLimit&&i+1>u.edgesLimit)return void a(t,e,n,s);if(o.push(e),Array.isArray(e))for(d=0;d<e.length;d++)c(e[d],d,d,o,e,f,u);else{var l=Object.keys(e);for(d=0;d<l.length;d++){var h=l[d];c(e[h],h,d,o,e,f,u)}}o.pop()}}function f(e,t){return e<t?-1:e>t?1:0}function u(e,t,r,s){void 0===s&&(s=o());var a,c=d(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(c,t,r):JSON.stringify(c,l(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var f=n.pop();4===f.length?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return a}function d(e,i,o,s,c,u,l){var h;if(u+=1,"object"==typeof e&&null!==e){for(h=0;h<s.length;h++)if(s[h]===e)return void a(r,e,i,c);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&u>l.depthLimit)return void a(t,e,i,c);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void a(t,e,i,c);if(s.push(e),Array.isArray(e))for(h=0;h<e.length;h++)d(e[h],h,h,s,e,u,l);else{var p={},b=Object.keys(e).sort(f);for(h=0;h<b.length;h++){var g=b[h];d(e[g],g,h,s,e,u,l),p[g]=e[g]}if(void 0===c)return p;n.push([c,i,e]),c[i]=p}s.pop()}}function l(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===t&&o[0]===r){r=o[2],i.splice(n,1);break}}return e.call(this,t,r)}}},8794:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r};e.exports=function(e){var i=this;if("function"!=typeof i||"[object Function]"!==t.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,s=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t}(arguments),a=r(0,i.length-s.length),c=[],f=0;f<a;f++)c[f]="$"+f;if(o=Function("binder","return function ("+function(e){for(var t="",r=0;r<e.length;r+=1)t+=e[r],r+1<e.length&&(t+=",");return t}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var t=i.apply(this,n(s,arguments));return Object(t)===t?t:this}return i.apply(e,n(s,arguments))})),i.prototype){var u=function(){};u.prototype=i.prototype,o.prototype=new u,u.prototype=null}return o}},9138:(e,t,r)=>{"use strict";var n=r(8794);e.exports=Function.prototype.bind||n},528:(e,t,r)=>{"use strict";var n,i=r(9838),o=r(9110),s=r(1155),a=r(4943),c=r(5731),f=r(3468),u=r(2140),d=Function,l=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var p=function(){throw new f},b=h?function(){try{return p}catch(e){try{return h(arguments,"callee").get}catch(e){return p}}}():p,g=r(3558)(),y=r(6869)(),m=Object.getPrototypeOf||(y?function(e){return e.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&m?m(Uint8Array):n,_={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&m?m([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&m?m(m([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&m?m((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&m?m((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&m?m(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":b,"%TypedArray%":w,"%TypeError%":f,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(m)try{null.error}catch(e){var S=m(m(e));_["%Error.prototype%"]=S}var A=function e(t){var r;if("%AsyncFunction%"===t)r=l("async function () {}");else if("%GeneratorFunction%"===t)r=l("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=l("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&m&&(r=m(i.prototype))}return _[t]=r,r},E={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(9138),R=r(8554),O=M.call(Function.call,Array.prototype.concat),x=M.call(Function.apply,Array.prototype.splice),I=M.call(Function.call,String.prototype.replace),P=M.call(Function.call,String.prototype.slice),k=M.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,C=function(e,t){var r,n=e;if(R(E,n)&&(n="%"+(r=E[n])[0]+"%"),R(_,n)){var i=_[n];if(i===v&&(i=A(n)),void 0===i&&!t)throw new f("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new f('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=P(e,0,1),r=P(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return I(e,N,(function(e,t,r,i){n[n.length]=r?I(i,T,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=C("%"+n+"%",t),o=i.name,s=i.value,a=!1,u=i.alias;u&&(n=u[0],x(r,O([0,1],u)));for(var d=1,l=!0;d<r.length;d+=1){var p=r[d],b=P(p,0,1),g=P(p,-1);if(('"'===b||"'"===b||"`"===b||'"'===g||"'"===g||"`"===g)&&b!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==p&&l||(a=!0),R(_,o="%"+(n+="."+p)+"%"))s=_[o];else if(null!=s){if(!(p in s)){if(!t)throw new f("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&d+1>=r.length){var y=h(s,p);s=(l=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[p]}else l=R(s,p),s=s[p];l&&!a&&(_[o]=s)}}return s}},9336:(e,t,r)=>{"use strict";var n=r(528)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},7239:(e,t,r)=>{"use strict";var n=r(4940),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},6869:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},3558:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(2908);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},2908:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9499:(e,t,r)=>{var n=t;n.utils=r(461),n.common=r(2191),n.sha=r(5746),n.ripemd=r(4169),n.hmac=r(1825),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},2191:(e,t,r)=>{"use strict";var n=r(461),i=r(7784);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},1825:(e,t,r)=>{"use strict";var n=r(461),i=r(7784);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},4169:(e,t,r)=>{"use strict";var n=r(461),i=r(2191),o=n.rotl32,s=n.sum32,a=n.sum32_3,c=n.sum32_4,f=i.BlockHash;function u(){if(!(this instanceof u))return new u;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,f),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],f=this.h[3],u=this.h[4],m=r,v=n,w=i,_=f,S=u,A=0;A<80;A++){var E=s(o(c(r,d(A,n,i,f),e[p[A]+t],l(A)),g[A]),u);r=u,u=f,f=o(i,10),i=n,n=E,E=s(o(c(m,d(79-A,v,w,_),e[b[A]+t],h(A)),y[A]),S),m=S,S=_,_=o(w,10),w=v,v=E}E=a(this.h[1],i,_),this.h[1]=a(this.h[2],f,S),this.h[2]=a(this.h[3],u,m),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=E},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],b=[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]},5746:(e,t,r)=>{"use strict";t.sha1=r(2986),t.sha224=r(5393),t.sha256=r(536),t.sha384=r(2348),t.sha512=r(2157)},2986:(e,t,r)=>{"use strict";var n=r(461),i=r(2191),o=r(600),s=n.rotl32,a=n.sum32,c=n.sum32_5,f=o.ft_1,u=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,u),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],l=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=c(s(i,5),f(p,o,u,l),h,r[n],d[p]);h=l,l=u,u=s(o,30),o=i,i=b}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],u),this.h[3]=a(this.h[3],l),this.h[4]=a(this.h[4],h)},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},5393:(e,t,r)=>{"use strict";var n=r(461),i=r(536);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},536:(e,t,r)=>{"use strict";var n=r(461),i=r(2191),o=r(600),s=r(7784),a=n.sum32,c=n.sum32_4,f=n.sum32_5,u=o.ch32,d=o.maj32,l=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.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 m(){if(!(this instanceof m))return new m;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(m,g),e.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=c(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],m=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var S=f(_,h(m),u(m,v,w),this.k[n],r[n]),A=a(l(i),d(i,o,g));_=w,w=v,v=m,m=a(y,S),y=g,g=o,o=i,i=a(S,A)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],m),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},m.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},2348:(e,t,r)=>{"use strict";var n=r(461),i=r(2157);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},2157:(e,t,r)=>{"use strict";var n=r(461),i=r(2191),o=r(7784),s=n.rotr64_hi,a=n.rotr64_lo,c=n.shr64_hi,f=n.shr64_lo,u=n.sum64,d=n.sum64_hi,l=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,m=[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=m,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}function E(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,1)^a(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,19)^a(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}n.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 r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(g=r[n-4],y=r[n-3],m=void 0,(m=s(g,y,19)^s(y,g,29)^c(g,y,6))<0&&(m+=4294967296),m),o=I(r[n-4],r[n-3]),a=r[n-14],f=r[n-13],u=O(r[n-30],r[n-29]),d=x(r[n-30],r[n-29]),l=r[n-32],b=r[n-31];r[n]=h(i,o,a,f,u,d,l,b),r[n+1]=p(i,o,a,f,u,d,l,b)}var g,y,m},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,a=this.W,c=this.h[0],f=this.h[1],h=this.h[2],p=this.h[3],y=this.h[4],m=this.h[5],v=this.h[6],O=this.h[7],x=this.h[8],I=this.h[9],P=this.h[10],k=this.h[11],N=this.h[12],T=this.h[13],C=this.h[14],B=this.h[15];o(this.k.length===a.length);for(var L=0;L<a.length;L+=2){var j=C,F=B,U=(i=void 0,(i=s(r=x,n=I,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),D=R(x,I),q=w(x,0,P,0,N),z=_(0,I,0,k,0,T),$=this.k[L],W=this.k[L+1],H=a[L],V=a[L+1],G=b(j,F,U,D,q,z,$,W,H,V),K=g(j,F,U,D,q,z,$,W,H,V);j=E(c,f),F=M(c,f),U=S(c,0,h,0,y),D=A(0,f,0,p,0,m);var J=d(j,F,U,D),Y=l(j,F,U,D);C=N,B=T,N=P,T=k,P=x,k=I,x=d(v,O,G,K),I=l(O,O,G,K),v=y,O=m,y=h,m=p,h=c,p=f,c=d(G,K,J,Y),f=l(G,K,J,Y)}u(this.h,0,c,f),u(this.h,2,h,p),u(this.h,4,y,m),u(this.h,6,v,O),u(this.h,8,x,I),u(this.h,10,P,k),u(this.h,12,N,T),u(this.h,14,C,B)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},600:(e,t,r)=>{"use strict";var n=r(461).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},461:(e,t,r)=>{"use strict";var n=r(7784),i=r(5615);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function c(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 r=[];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<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=s(i)),r+=c(i.toString(16))}return r},t.zero2=a,t.zero8=c,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var s=new Array(o/4),a=0,c=t;a<s.length;a++,c+=4){var f;f="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],s[a]=f>>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o<n?1:0)+r+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var c=0,f=t;return c+=(f=f+n>>>0)<t?1:0,c+=(f=f+o>>>0)<o?1:0,e+r+i+s+(c+=(f=f+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,c,f){var u=0,d=t;return u+=(d=d+n>>>0)<t?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+a>>>0)<a?1:0,e+r+i+s+c+(u+=(d=d+f>>>0)<f?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,c,f){return t+n+o+a+f>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},8554:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(9138);e.exports=o.call(n,i)},4742:(e,t,r)=>{"use strict";var n=r(9499),i=r(9042),o=r(7784);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,e);return this._update(r),this._reseed++,i.encode(s,t)}},9318:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,f=c>>1,u=-7,d=r?i-1:0,l=r?-1:1,h=e[t+d];for(d+=l,o=h&(1<<-u)-1,h>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=l,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+d],d+=l,u-=8);if(0===o)o=1-f;else{if(o===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=f}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,f=8*o-i-1,u=(1<<f)-1,d=u>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?l/c:l*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*c-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[r+h]=255&s,h+=p,s/=256,f-=8);e[r+h-p]|=128*b}},5615: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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},6512:e=>{e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},5172:(e,t,r)=>{"use strict";var n=("undefined"!=typeof JSON?JSON:r(6998)).stringify,i=r(9549),o=r(9228),s=r(8498),a=r(9818),c=a("Array.prototype.join"),f=a("Array.prototype.push"),u=function(e,t){for(var r="",n=0;n<e;n+=1)r+=t;return r},d=function(e,t,r){return r};e.exports=function(e){var t=arguments.length>1?arguments[1]:void 0,r=t&&t.space||"";"number"==typeof r&&(r=u(r," "));var a=!!t&&"boolean"==typeof t.cycles&&t.cycles,l=t&&t.replacer?s(t.replacer):d,h="function"==typeof t?t:t&&t.cmp,p=h&&function(e){var t=h.length>2&&function(t){return e[t]};return function(r,n){return h({key:r,value:e[r]},{key:n,value:e[n]},t?{__proto__:null,get:t}:void 0)}},b=[];return function e(t,s,d,h){var g=r?"\n"+u(h,r):"",y=r?": ":":";if(d&&d.toJSON&&"function"==typeof d.toJSON&&(d=d.toJSON()),void 0!==(d=l(t,s,d))){if("object"!=typeof d||null===d)return n(d);if(i(d)){for(var m=[],v=0;v<d.length;v++){var w=e(d,v,d[v],h+1)||n(null);f(m,g+r+w)}return"["+c(m,",")+g+"]"}if(-1!==b.indexOf(d)){if(a)return n("__cycle__");throw new TypeError("Converting circular structure to JSON")}f(b,d);var _=o(d).sort(p&&p(d));for(m=[],v=0;v<_.length;v++){var S=e(d,s=_[v],d[s],h+1);if(S){var A=n(s)+y+S;f(m,g+r+A)}}return b.splice(b.indexOf(d),1),"{"+c(m,",")+g+"}"}}({"":e},"",e,0)}},9549:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},6998:(e,t,r)=>{"use strict";t.parse=r(6921),t.stringify=r(9191)},6921:e=>{"use strict";var t,r,n,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function o(e){throw{name:"SyntaxError",message:e,at:t,text:n}}function s(e){return e&&e!==r&&o("Expected '"+e+"' instead of '"+r+"'"),r=n.charAt(t),t+=1,r}function a(){var e,t="";for("-"===r&&(t="-",s("-"));r>="0"&&r<="9";)t+=r,s();if("."===r)for(t+=".";s()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,s(),"-"!==r&&"+"!==r||(t+=r,s());r>="0"&&r<="9";)t+=r,s();return e=Number(t),isFinite(e)||o("Bad number"),e}function c(){var e,t,n,a="";if('"'===r)for(;s();){if('"'===r)return s(),a;if("\\"===r)if(s(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(s(),16),isFinite(e));t+=1)n=16*n+e;a+=String.fromCharCode(n)}else{if("string"!=typeof i[r])break;a+=i[r]}else a+=r}o("Bad string")}function f(){for(;r&&r<=" ";)s()}function u(){switch(f(),r){case"{":return function(){var e,t={};if("{"===r){if(s("{"),f(),"}"===r)return s("}"),t;for(;r;){if(e=c(),f(),s(":"),Object.prototype.hasOwnProperty.call(t,e)&&o('Duplicate key "'+e+'"'),t[e]=u(),f(),"}"===r)return s("}"),t;s(","),f()}}o("Bad object")}();case"[":return function(){var e=[];if("["===r){if(s("["),f(),"]"===r)return s("]"),e;for(;r;){if(e.push(u()),f(),"]"===r)return s("]"),e;s(","),f()}}o("Bad array")}();case'"':return c();case"-":return a();default:return r>="0"&&r<="9"?a():function(){switch(r){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null;default:o("Unexpected '"+r+"'")}}()}}e.exports=function(e,i){var s;return n=e,t=0,r=" ",s=u(),f(),r&&o("Syntax error"),"function"==typeof i?function e(t,r){var n,o,s=t[r];if(s&&"object"==typeof s)for(n in u)Object.prototype.hasOwnProperty.call(s,n)&&(void 0===(o=e(s,n))?delete s[n]:s[n]=o);return i.call(t,r,s)}({"":s},""):s}},9191:e=>{"use strict";var t,r,n,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=o[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function a(e,i){var o,c,f,u,d,l=t,h=i[e];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(e)),"function"==typeof n&&(h=n.call(i,e,h)),typeof h){case"string":return s(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(t+=r,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(u=h.length,o=0;o<u;o+=1)d[o]=a(o,h)||"null";return f=0===d.length?"[]":t?"[\n"+t+d.join(",\n"+t)+"\n"+l+"]":"["+d.join(",")+"]",t=l,f}if(n&&"object"==typeof n)for(u=n.length,o=0;o<u;o+=1)"string"==typeof(c=n[o])&&(f=a(c,h))&&d.push(s(c)+(t?": ":":")+f);else for(c in h)Object.prototype.hasOwnProperty.call(h,c)&&(f=a(c,h))&&d.push(s(c)+(t?": ":":")+f);return f=0===d.length?"{}":t?"{\n"+t+d.join(",\n"+t)+"\n"+l+"}":"{"+d.join(",")+"}",t=l,f}}e.exports=function(e,i,o){var s;if(t="",r="","number"==typeof o)for(s=0;s<o;s+=1)r+=" ";else"string"==typeof o&&(r=o);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return a("",{"":e})}},8290:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Boolean]",a="[object Date]",c="[object Function]",f="[object GeneratorFunction]",u="[object Map]",d="[object Number]",l="[object Object]",h="[object Promise]",p="[object RegExp]",b="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",_="[object Float32Array]",S="[object Float64Array]",A="[object Int8Array]",E="[object Int16Array]",M="[object Int32Array]",R="[object Uint8Array]",O="[object Uint8ClampedArray]",x="[object Uint16Array]",I="[object Uint32Array]",P=/\w*$/,k=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,T={};T[o]=T["[object Array]"]=T[v]=T[w]=T[s]=T[a]=T[_]=T[S]=T[A]=T[E]=T[M]=T[u]=T[d]=T[l]=T[p]=T[b]=T[g]=T[y]=T[R]=T[O]=T[x]=T[I]=!0,T["[object Error]"]=T[c]=T[m]=!1;var C="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,B="object"==typeof self&&self&&self.Object===Object&&self,L=C||B||Function("return this")(),j=t&&!t.nodeType&&t,F=j&&e&&!e.nodeType&&e,U=F&&F.exports===j;function D(e,t){return e.set(t[0],t[1]),e}function q(e,t){return e.add(t),e}function z(e,t,r,n){var i=-1,o=e?e.length:0;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function $(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function W(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function H(e,t){return function(r){return e(t(r))}}function V(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var G,K=Array.prototype,J=Function.prototype,Y=Object.prototype,X=L["__core-js_shared__"],Z=(G=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",Q=J.toString,ee=Y.hasOwnProperty,te=Y.toString,re=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=U?L.Buffer:void 0,ie=L.Symbol,oe=L.Uint8Array,se=H(Object.getPrototypeOf,Object),ae=Object.create,ce=Y.propertyIsEnumerable,fe=K.splice,ue=Object.getOwnPropertySymbols,de=ne?ne.isBuffer:void 0,le=H(Object.keys,Object),he=Le(L,"DataView"),pe=Le(L,"Map"),be=Le(L,"Promise"),ge=Le(L,"Set"),ye=Le(L,"WeakMap"),me=Le(Object,"create"),ve=qe(he),we=qe(pe),_e=qe(be),Se=qe(ge),Ae=qe(ye),Ee=ie?ie.prototype:void 0,Me=Ee?Ee.valueOf:void 0;function Re(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ie(e){this.__data__=new Oe(e)}function Pe(e,t,r){var n=e[t];ee.call(e,t)&&ze(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function ke(e,t){for(var r=e.length;r--;)if(ze(e[r][0],t))return r;return-1}function Ne(e,t,r,n,i,h,m){var k;if(n&&(k=h?n(e,i,h,m):n(e)),void 0!==k)return k;if(!Ge(e))return e;var N=$e(e);if(N){if(k=function(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&ee.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!t)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(e,k)}else{var C=Fe(e),B=C==c||C==f;if(He(e))return function(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}(e,t);if(C==l||C==o||B&&!h){if($(e))return h?e:{};if(k=function(e){return"function"!=typeof e.constructor||De(e)?{}:Ge(t=se(e))?ae(t):{};var t}(B?{}:e),!t)return function(e,t){return Ce(e,je(e),t)}(e,function(e,t){return e&&Ce(t,Ke(t),e)}(k,e))}else{if(!T[C])return h?e:{};k=function(e,t,r,n){var i,o=e.constructor;switch(t){case v:return Te(e);case s:case a:return new o(+e);case w:return function(e,t){var r=t?Te(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case _:case S:case A:case E:case M:case R:case O:case x:case I:return function(e,t){var r=t?Te(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,n);case u:return function(e,t,r){return z(t?r(W(e),!0):W(e),D,new e.constructor)}(e,n,r);case d:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,P.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return function(e,t,r){return z(t?r(V(e),!0):V(e),q,new e.constructor)}(e,n,r);case y:return i=e,Me?Object(Me.call(i)):{}}}(e,C,Ne,t)}}m||(m=new Ie);var L=m.get(e);if(L)return L;if(m.set(e,k),!N)var j=r?function(e){return function(e,t,r){var n=t(e);return $e(e)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(e))}(e,Ke,je)}(e):Ke(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r););}(j||e,(function(i,o){j&&(i=e[o=i]),Pe(k,o,Ne(i,t,r,n,o,e,m))})),k}function Te(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Ce(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n?n(r[s],e[s],s,r,e):void 0;Pe(r,s,void 0===a?e[s]:a)}return r}function Be(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function Le(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ge(e)||(t=e,Z&&Z in t))&&(Ve(e)||$(e)?re:k).test(qe(e));var t}(r)?r:void 0}Re.prototype.clear=function(){this.__data__=me?me(null):{}},Re.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Re.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return ee.call(t,e)?t[e]:void 0},Re.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Re.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},Oe.prototype.clear=function(){this.__data__=[]},Oe.prototype.delete=function(e){var t=this.__data__,r=ke(t,e);return!(r<0||(r==t.length-1?t.pop():fe.call(t,r,1),0))},Oe.prototype.get=function(e){var t=this.__data__,r=ke(t,e);return r<0?void 0:t[r][1]},Oe.prototype.has=function(e){return ke(this.__data__,e)>-1},Oe.prototype.set=function(e,t){var r=this.__data__,n=ke(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Re,map:new(pe||Oe),string:new Re}},xe.prototype.delete=function(e){return Be(this,e).delete(e)},xe.prototype.get=function(e){return Be(this,e).get(e)},xe.prototype.has=function(e){return Be(this,e).has(e)},xe.prototype.set=function(e,t){return Be(this,e).set(e,t),this},Ie.prototype.clear=function(){this.__data__=new Oe},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Oe){var n=r.__data__;if(!pe||n.length<199)return n.push([e,t]),this;r=this.__data__=new xe(n)}return r.set(e,t),this};var je=ue?H(ue,Object):function(){return[]},Fe=function(e){return te.call(e)};function Ue(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||N.test(e))&&e>-1&&e%1==0&&e<t}function De(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function qe(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ze(e,t){return e===t||e!=e&&t!=t}(he&&Fe(new he(new ArrayBuffer(1)))!=w||pe&&Fe(new pe)!=u||be&&Fe(be.resolve())!=h||ge&&Fe(new ge)!=b||ye&&Fe(new ye)!=m)&&(Fe=function(e){var t=te.call(e),r=t==l?e.constructor:void 0,n=r?qe(r):void 0;if(n)switch(n){case ve:return w;case we:return u;case _e:return h;case Se:return b;case Ae:return m}return t});var $e=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!Ve(e)}var He=de||function(){return!1};function Ve(e){var t=Ge(e)?te.call(e):"";return t==c||t==f}function Ge(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ke(e){return We(e)?function(e,t){var r=$e(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,i=!!n;for(var s in e)!t&&!ee.call(e,s)||i&&("length"==s||Ue(s,n))||r.push(s);return r}(e):function(e){if(!De(e))return le(e);var t=[];for(var r in Object(e))ee.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}e.exports=function(e){return Ne(e,!0,!0)}},8089:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",f="[object Null]",u="[object Object]",d="[object Proxy]",l="[object Undefined]",h=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[o]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[a]=b["[object Map]"]=b["[object Number]"]=b[u]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var g,y,m,v="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,w="object"==typeof self&&self&&self.Object===Object&&self,_=v||w||Function("return this")(),S=t&&!t.nodeType&&t,A=S&&e&&!e.nodeType&&e,E=A&&A.exports===S,M=E&&v.process,R=function(){try{return A&&A.require&&A.require("util").types||M&&M.binding&&M.binding("util")}catch(e){}}(),O=R&&R.isTypedArray,x=Array.prototype,I=Function.prototype,P=Object.prototype,k=_["__core-js_shared__"],N=I.toString,T=P.hasOwnProperty,C=(g=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",B=P.toString,L=N.call(Object),j=RegExp("^"+N.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=E?_.Buffer:void 0,U=_.Symbol,D=_.Uint8Array,q=(F&&F.allocUnsafe,y=Object.getPrototypeOf,m=Object,function(e){return y(m(e))}),z=Object.create,$=P.propertyIsEnumerable,W=x.splice,H=U?U.toStringTag:void 0,V=function(){try{var e=le(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),G=F?F.isBuffer:void 0,K=Math.max,J=Date.now,Y=le(_,"Map"),X=le(Object,"create"),Z=function(){function e(){}return function(t){if(!Ee(t))return{};if(z)return z(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function re(e){var t=this.__data__=new ee(e);this.size=t.size}function ne(e,t,r){(void 0!==r&&!ye(e[t],r)||void 0===r&&!(t in e))&&se(e,t,r)}function ie(e,t,r){var n=e[t];T.call(e,t)&&ye(n,r)&&(void 0!==r||t in e)||se(e,t,r)}function oe(e,t){for(var r=e.length;r--;)if(ye(e[r][0],t))return r;return-1}function se(e,t,r){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Q.prototype.clear=function(){this.__data__=X?X(null):{},this.size=0},Q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Q.prototype.get=function(e){var t=this.__data__;if(X){var r=t[e];return r===n?void 0:r}return T.call(t,e)?t[e]:void 0},Q.prototype.has=function(e){var t=this.__data__;return X?void 0!==t[e]:T.call(t,e)},Q.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=X&&void 0===t?n:t,this},ee.prototype.clear=function(){this.__data__=[],this.size=0},ee.prototype.delete=function(e){var t=this.__data__,r=oe(t,e);return!(r<0||(r==t.length-1?t.pop():W.call(t,r,1),--this.size,0))},ee.prototype.get=function(e){var t=this.__data__,r=oe(t,e);return r<0?void 0:t[r][1]},ee.prototype.has=function(e){return oe(this.__data__,e)>-1},ee.prototype.set=function(e,t){var r=this.__data__,n=oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(Y||ee),string:new Q}},te.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return de(this,e).get(e)},te.prototype.has=function(e){return de(this,e).has(e)},te.prototype.set=function(e,t){var r=de(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},re.prototype.clear=function(){this.__data__=new ee,this.size=0},re.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!Y||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new te(n)}return r.set(e,t),this.size=r.size,this};function ae(e){return null==e?void 0===e?l:f:H&&H in Object(e)?function(e){var t=T.call(e,H),r=e[H];try{e[H]=void 0;var n=!0}catch(e){}var i=B.call(e);return n&&(t?e[H]=r:delete e[H]),i}(e):function(e){return B.call(e)}(e)}function ce(e){return Me(e)&&ae(e)==o}function fe(e,t,r,n,i){e!==t&&function(e,t,r){for(var n=-1,i=Object(e),o=r(e),s=o.length;s--;){var a=o[++n];if(!1===t(i[a],a,i))break}}(t,(function(o,s){if(i||(i=new re),Ee(o))!function(e,t,r,n,i,o,s){var a=be(e,r),c=be(t,r),f=s.get(c);if(f)ne(e,r,f);else{var d,l,h,p,b,g=o?o(a,c,r+"",e,t,s):void 0,y=void 0===g;if(y){var m=ve(c),v=!m&&_e(c),w=!m&&!v&&Re(c);g=c,m||v||w?ve(a)?g=a:Me(b=a)&&we(b)?g=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(a):v?(y=!1,g=function(e){return e.slice()}(c)):w?(y=!1,p=new(h=(d=c).buffer).constructor(h.byteLength),new D(p).set(new D(h)),l=p,g=new d.constructor(l,d.byteOffset,d.length)):g=[]:function(e){if(!Me(e)||ae(e)!=u)return!1;var t=q(e);if(null===t)return!0;var r=T.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&N.call(r)==L}(c)||me(c)?(g=a,me(a)?g=function(e){return function(e,t,r){var n=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var s=t[i],a=void 0;void 0===a&&(a=e[s]),n?se(r,s,a):ie(r,s,a)}return r}(e,Oe(e))}(a):Ee(a)&&!Se(a)||(g=function(e){return"function"!=typeof e.constructor||pe(e)?{}:Z(q(e))}(c))):y=!1}y&&(s.set(c,g),i(g,c,n,o,s),s.delete(c)),ne(e,r,g)}}(e,t,s,r,fe,n,i);else{var a=n?n(be(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),ne(e,s,a)}}),Oe)}var ue=V?function(e,t){return V(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Pe;function de(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function le(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ee(e)||function(e){return!!C&&C in e}(e))&&(Se(e)?j:h).test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(r)?r:void 0}function he(e,t){var r=typeof e;return!!(t=null==t?i:t)&&("number"==r||"symbol"!=r&&p.test(e))&&e>-1&&e%1==0&&e<t}function pe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||P)}function be(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ge=function(e){var t=0,r=0;return function(){var n=J(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ue);function ye(e,t){return e===t||e!=e&&t!=t}var me=ce(function(){return arguments}())?ce:function(e){return Me(e)&&T.call(e,"callee")&&!$.call(e,"callee")},ve=Array.isArray;function we(e){return null!=e&&Ae(e.length)&&!Se(e)}var _e=G||function(){return!1};function Se(e){if(!Ee(e))return!1;var t=ae(e);return t==a||t==c||t==s||t==d}function Ae(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Ee(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Me(e){return null!=e&&"object"==typeof e}var Re=O?function(e){return function(t){return e(t)}}(O):function(e){return Me(e)&&Ae(e.length)&&!!b[ae(e)]};function Oe(e){return we(e)?function(e,t){var r=ve(e),n=!r&&me(e),i=!r&&!n&&_e(e),o=!r&&!n&&!i&&Re(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=a.length;for(var f in e)!t&&!T.call(e,f)||s&&("length"==f||i&&("offset"==f||"parent"==f)||o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||he(f,c))||a.push(f);return a}(e,!0):function(e){if(!Ee(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=pe(e),r=[];for(var n in e)("constructor"!=n||!t&&T.call(e,n))&&r.push(n);return r}(e)}var xe,Ie=(xe=function(e,t,r){fe(e,t,r)},function(e,t){return ge(function(e,t,r){return t=K(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=K(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(s),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,Pe),e+"")}((function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=xe.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!Ee(r))return!1;var n=typeof t;return!!("number"==n?we(r)&&he(t,r.length):"string"==n&&t in r)&&ye(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var s=t[r];s&&xe(e,s,r)}return e})));function Pe(e){return e}e.exports=Ie},5880:function(e,t,r){var n,i;!function(){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function s(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(){for(var r=this.getLevel(),i=0;i<n.length;i++){var o=n[i];this[o]=i<r?e:this.methodFactory(o,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function f(e){return function(){typeof console!==t&&(c.call(this),this[e].apply(this,arguments))}}function u(n,i,o){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?a:void 0!==console[n]?s(console,n):void 0!==console.log?s(console,"log"):e)}(n)||f.apply(this,arguments)}function d(e,r){var s,a,f,d=this,l="loglevel";function h(){var e;if(typeof window!==t&&l){try{e=window.localStorage[l]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(l),i=r.indexOf(n+"=");-1!==i&&(e=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?l+=":"+e:"symbol"==typeof e&&(l=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=r||u,d.getLevel=function(){return null!=f?f:null!=a?a:s},d.setLevel=function(e,r){return f=p(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&l){try{return void(window.localStorage[l]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"="+r+";"}catch(e){}}}(f),c.call(d)},d.setDefaultLevel=function(e){a=p(e),h()||d.setLevel(e,!1)},d.resetLevel=function(){f=null,function(){if(typeof window!==t&&l){try{window.localStorage.removeItem(l)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),c.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(o!==d&&(s=p(o.getLevel())),c.call(d),o===d)for(var e in i)i[e].rebuild()},s=p(o?o.getLevel():"WARN");var b=h();null!=b&&(f=p(b)),c.call(d)}(o=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new d(e,o.methodFactory)),t};var l=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=l),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=n.call(t,r,t,e))||(e.exports=i)}()},7784:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},9042:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},8160:(e,t,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(968),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),f=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!l["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=s(e),a=t&&"[object String]"===o.call(e),l=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=f&&r;if(a&&e.length>0&&!i.call(e,0))for(var b=0;b<e.length;++b)l.push(String(b));if(n&&e.length>0)for(var g=0;g<e.length;++g)l.push(String(g));else for(var y in e)p&&"prototype"===y||!i.call(e,y)||l.push(String(y));if(c)for(var m=function(e){if("undefined"==typeof window||!h)return d(e);try{return d(e)}catch(e){return!1}}(e),v=0;v<u.length;++v)m&&"constructor"===u[v]||!i.call(e,u[v])||l.push(u[v]);return l}}e.exports=n},9228:(e,t,r)=>{"use strict";var n=Array.prototype.slice,i=r(968),o=Object.keys,s=o?function(e){return o(e)}:r(8160),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?a(n.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},968:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},3358:(e,t,r)=>{var n=r(7086);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},9907:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,c=[],f=!1,u=-1;function d(){f&&a&&(f=!1,a.length?c=a.concat(c):u=-1,c.length&&l())}function l(){if(!f){var e=s(d);f=!0;for(var t=c.length;t;){for(a=c,c=[];++u<t;)a&&a[u].run();u=-1,t=c.length}a=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||f||s(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},2720:(e,t,r)=>{var n=r(9907),i=r(3358),o=r(1822),s=r(9467),a=function(){},c=/^v?\.0/.test(n.version),f=function(e){return"function"==typeof e},u=function(e){e()},d=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=f(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(d,l){var h=l<t.length-1;return function(e,t,r,n){n=i(n);var u=!1;e.on("close",(function(){u=!0})),o(e,{readable:t,writable:r},(function(e){if(e)return n(e);u=!0,n()}));var d=!1;return function(t){if(!u&&!d)return d=!0,function(e){return!!c&&!!s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&f(e.close)}(e)?e.close(a):function(e){return e.setHeader&&f(e.abort)}(e)?e.abort():f(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}}(d,h,l>0,(function(t){e||(e=t),t&&n.forEach(u),h||(n.forEach(u),r(e))}))}));return t.reduce(d)}},5636:(e,t,r)=>{var n=r(1048),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},6108:(e,t,r)=>{"use strict";var n=r(528),i=r(686),o=r(7239)(),s=r(9336),a=r(3468),c=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,f=!0;if("length"in e&&s){var u=s(e,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(f=!1)}return(n||f||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},7086:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}},2671:()=>{},8379:()=>{},3553:()=>{},9467:()=>{},183:e=>{"use strict";e.exports={rE:"6.5.6"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";r.r(n),r.d(n,{Web3AuthNoModal:()=>Ks});var e={};r.r(e),r.d(e,{DO:()=>Dt,OG:()=>Qt,My:()=>zt,Ph:()=>Gt,lX:()=>Kt,Id:()=>Zt,fg:()=>rr,qj:()=>Xt,aT:()=>Vt,aY:()=>Ut,lq:()=>Jt,z:()=>Yt,Q5:()=>ir});var t={};function i(e){return i="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},i(e)}function o(e,t,r){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}r.r(t),r.d(t,{Decoder:()=>Yi,Encoder:()=>Ki,PacketType:()=>Gi,protocol:()=>Vi});var c=r(446),f=r(46),u=r(282),d=r.n(u),l=-32e3,h=-32001,p=-32002,b=-32003,g=-32004,y=-32005,m=-32700,v=-32600,w=-32601,_=-32602,S=-32603,A={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};function E(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}const M=(e,t)=>Object.hasOwnProperty.call(e,t);var R;!function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(R=R||(R={}));class O extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...o}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function x(e){return"object"==typeof e&&null!==e}function I(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function P(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${I(n)}\``}=e;return{value:n,type:s,refinement:a,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*k(e,t,r,n){(function(e){return x(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const i of e){const e=P(i,t,r,n);e&&(yield e)}}function*N(e,t,r={}){const{path:n=[],branch:i=[e],coerce:o=!1,mask:s=!1}=r,a={path:n,branch:i};if(o&&(e=t.coercer(e,a),s&&"type"!==t.type&&x(t.schema)&&x(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c="valid";for(const n of t.validator(e,a))n.explanation=r.message,c="not_valid",yield[n,void 0];for(let[f,u,d]of t.entries(e,a)){const t=N(u,d,{path:void 0===f?n:[...n,f],branch:void 0===f?i:[...i,u],coerce:o,mask:s,message:r.message});for(const r of t)r[0]?(c=null===r[0].refinement||void 0===r[0].refinement?"not_valid":"not_refined",yield[r[0],void 0]):o&&(u=r[1],void 0===f?e=u:e instanceof Map?e.set(f,u):e instanceof Set?e.add(u):x(e)&&(void 0!==u||f in e)&&(e[f]=u))}if("not_valid"!==c)for(const n of t.refiner(e,a))n.explanation=r.message,c="not_refined",yield[n,void 0];"valid"===c&&(yield[void 0,e])}class T{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:o=e=>e,entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(e,t)=>k(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>k(i(e,t),t,this,e):()=>[]}assert(e,t){return C(e,this,t)}create(e,t){return B(e,this,t)}is(e){return L(e,this)}mask(e,t){return function(e,t,r){const n=j(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(e,this,t)}validate(e,t={}){return j(e,this,t)}}function C(e,t,r){const n=j(e,t,{message:r});if(n[0])throw n[0]}function B(e,t,r){const n=j(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function L(e,t){return!j(e,t)[0]}function j(e,t,r={}){const n=N(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return i[0]?[new O(i[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function F(e,t){return new T({type:e,schema:null,validator:t})}function U(e){let t;return new T({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function D(e){return new T({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${I(e)}`})}function q(e){const t=I(e),r=typeof e;return new T({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${I(r)}`})}function z(){return F("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${I(e)}`))}function $(e){const t=e?Object.keys(e):[],r=F("never",(()=>!1));return new T({type:"object",schema:e??null,*entries(n){if(e&&x(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>x(e)||`Expected an object, but received: ${I(e)}`,coercer:e=>x(e)?{...e}:e})}function W(e){return new T({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function H(e,t){return new T({type:"record",schema:null,*entries(r){if(x(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>x(e)||`Expected an object, but received: ${I(e)}`})}function V(){return F("string",(e=>"string"==typeof e||`Expected a string, but received: ${I(e)}`))}function G(e){const t=e.map((e=>e.type)).join(" | ");return new T({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=N(r,t,n),[o]=e;if(!o?.[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${I(r)}`,...i]}})}Error;class K extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}const J=e=>$(e);function Y({path:e,branch:t}){const r=e[e.length-1];return M(t[t.length-2],r)}function X(e){return new T({...e,type:`optional ${e.type}`,validator:(t,r)=>!Y(r)||e.validator(t,r),refiner:(t,r)=>!Y(r)||e.refiner(t,r)})}const Z=G([q(null),F("boolean",(e=>"boolean"==typeof e)),F("finite number",(e=>L(e,z())&&Number.isFinite(e))),V(),D(U((()=>Z))),H(V(),U((()=>Z)))]),Q=function(e,t,r){return new T({...e,coercer:(n,i)=>L(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}(Z,F("any",(()=>!0)),(e=>(function(e,t,r="Assertion failed",n=K){try{C(e,t)}catch(e){throw function(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}(n,`${r}: ${function(e){return function(e){return function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)&&"string"==typeof e.message?e.message:function(e){return null==e}(e)?"":String(e)}(e).replace(/\.$/u,"")}(e)}.`)}}(e,Z),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))));function ee(e){try{return function(e){B(e,Q)}(e),!0}catch{return!1}}const te=q("2.0"),re=(ne=G([z(),V()]),new T({...ne,validator:(e,t)=>null===e||ne.validator(e,t),refiner:(e,t)=>null===e||ne.refiner(e,t)}));var ne;const ie=J({code:F("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${I(e)}`)),message:V(),data:X(Q),stack:X(V())}),oe=G([H(V(),Q),D(Q)]);J({id:re,jsonrpc:te,method:V(),params:X(oe)}),J({jsonrpc:te,method:V(),params:X(oe)}),$({id:re,jsonrpc:te,result:W(F("unknown",(()=>!0))),error:W(ie)});function se(e){return L(e,ie)}G([J({id:re,jsonrpc:te,result:Q}),J({id:re,jsonrpc:te,error:ie})]);var ae="Unspecified error message. This is a bug, please report it.",ce={code:S,message:ue(S)},fe="Unspecified server error.";function ue(e,t=ae){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(M(A,t))return A[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return fe}return t}function de(e,{fallbackError:t=ce,shouldIncludeStack:r=!0}={}){if(!se(t))throw new Error("Must provide fallback error with integer number code and string message.");const n=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if(se(e))return e;return{...t,data:{cause:le(e)}}}(e,t);return r||delete n.stack,n}function le(e){return Array.isArray(e)?e.map((e=>ee(e)?e:E(e)?he(e):null)):E(e)?he(e):ee(e)?e:null}function he(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const n=e[r];return ee(n)&&(t[r]=n),t}),{})}var pe=class extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(this.data)&&(e.data.cause=le(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return u(this.serialize(),ge,2)}},be=class extends pe{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}};function ge(e,t){if("[Circular]"!==t)return t}var ye={parse:e=>me(m,e),invalidRequest:e=>me(v,e),invalidParams:e=>me(_,e),methodNotFound:e=>me(w,e),internal:e=>me(S,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return me(t,e)},invalidInput:e=>me(l,e),resourceNotFound:e=>me(h,e),resourceUnavailable:e=>me(p,e),transactionRejected:e=>me(b,e),methodNotSupported:e=>me(g,e),limitExceeded:e=>me(y,e)};function me(e,t){const[r,n]=function(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}(t);return new pe(e,r??ue(e),n)}function ve(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}r(1822),r(3358),r(2720),c.Duplex;class we extends f.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(t){let e;if(i.length>0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)ve(s,this,i);else{const e=s.length,t=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(s);for(let r=0;r<e;r+=1)ve(t[r],this,i)}return!0}}class _e extends Error{constructor(e){let{code:t,message:r,data:n}=e;if(!Number.isInteger(t))throw new Error("code must be an integer");if(!r||"string"!=typeof r)throw new Error("message must be string");super(r),o(this,"code",void 0),o(this,"data",void 0),this.code=t,void 0!==n&&(this.data=n)}toString(){return d()({code:this.code,message:this.message,data:this.data,stack:this.stack})}}function Se(e){return async(t,r,n,i)=>{let o;const s=new Promise((e=>{o=e}));let a=null,c=!1;const f=async()=>{c=!0,n((e=>{a=e,o()})),await s};try{await e(t,r,f),c?(await s,a(null)):i(null)}catch(e){const t=e;a?a(t):i(t)}}}class Ae extends we{constructor(){super(),o(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,r){const n=[];let i=null,o=!1;for(const s of r)if([i,o]=await Ae._runMiddleware(e,t,s,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((i=>{const o=e=>{const r=e||t.error;r&&("object"==typeof r&&!1===Object.keys(r).includes("stack")&&(r.stack="Stack trace is not available."),t.error=de(r,{shouldIncludeStack:!0,fallbackError:{message:(null==r?void 0:r.message)||(null==r?void 0:r.toString()),code:(null==r?void 0:r.code)||-32603,stack:(null==r?void 0:r.stack)||"Stack trace is not available.",data:(null==r?void 0:r.data)||(null==r?void 0:r.message)||(null==r?void 0:r.toString())}})),i([r,!0])},s=e=>{t.error?o(t.error):(e&&("function"!=typeof e&&o(new _e({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(e)),i([null,!1]))};try{r(e,t,s,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new _e({code:-32603,message:"Response has no error or result for request"});if(!r)throw new _e({code:-32603,message:"Nothing ended request"})}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[i,o,s]=await Ae._runAllMiddleware(e,t,this._middleware);return o?(await Ae._runReturnHandlers(s),n(i)):r((async e=>{try{await Ae._runReturnHandlers(s)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise(((t,r)=>{this._handle(e,((e,n)=>{e&&void 0===n?r(e):t(n)})).catch(r)}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const e=new _e({code:-32603,message:"request must be plain object"});return t(e,{id:void 0,jsonrpc:"2.0",error:e})}if("string"!=typeof e.method){const r=new _e({code:-32603,message:"method must be string"});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=a({},e),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(e){i=e}var o,s,c,f,u,d,l;return i&&(delete n.result,n.error||("object"==typeof i&&!1===Object.keys(i).includes("stack")&&(i.stack="Stack trace is not available."),n.error=de(i,{shouldIncludeStack:!0,fallbackError:{message:(null===(o=i)||void 0===o?void 0:o.message)||(null===(s=i)||void 0===s?void 0:s.toString()),code:(null===(c=i)||void 0===c?void 0:c.code)||-32603,stack:(null===(f=i)||void 0===f?void 0:f.stack)||"Stack trace is not available.",data:(null===(u=i)||void 0===u?void 0:u.data)||(null===(d=i)||void 0===d?void 0:d.message)||(null===(l=i)||void 0===l?void 0:l.toString())}}))),t(i,n)}async _processRequest(e,t){const[r,n,i]=await Ae._runAllMiddleware(e,t,this._middleware);if(Ae._checkForCompletion(e,t,n),await Ae._runReturnHandlers(i),r)throw r}}function Ee(e){const t=new Ae;return e.forEach((e=>t.push(e))),t.asMiddleware()}function Me(e){const t=new we;return t.sendAsync=async t=>{const r=await e.handle(t);if(r.error){var n,i,o,s,a,c,f;"object"==typeof r.error&&!1===Object.keys(r.error).includes("stack")&&(r.error.stack="Stack trace is not available.");const e=de(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||(null===(i=r.error)||void 0===i?void 0:i.toString()),code:(null===(o=r.error)||void 0===o?void 0:o.code)||-32603,stack:(null===(s=r.error)||void 0===s?void 0:s.stack)||"Stack trace is not available.",data:(null===(a=r.error)||void 0===a?void 0:a.data)||(null===(c=r.error)||void 0===c?void 0:c.message)||(null===(f=r.error)||void 0===f?void 0:f.toString())},shouldIncludeStack:!0});throw ye.internal(e)}return r.result},t.send=(t,r)=>{if("function"!=typeof r)throw new Error('Must provide callback to "send" method.');e.handle(t,r)},e.on&&e.on("notification",(e=>{t.emit("data",null,e)})),t.request=async e=>{const r=a(a({},e),{},{id:Math.random().toString(36).slice(2),jsonrpc:"2.0"});return await t.sendAsync(r)},t}c.Duplex,Symbol("IGNORE_SUBSTREAM"),c.Duplex;var Re=r(7702),Oe=r.n(Re);const xe={MAINNET:"mainnet",TESTNET:"testnet",CYAN:"cyan",AQUA:"aqua",CELESTE:"celeste"},Ie={SAPPHIRE_DEVNET:"sapphire_devnet",SAPPHIRE_MAINNET:"sapphire_mainnet"},Pe={[Ie.SAPPHIRE_MAINNET]:"https://signer.web3auth.io",[Ie.SAPPHIRE_DEVNET]:"https://signer.web3auth.io",[xe.MAINNET]:"https://signer.web3auth.io",[xe.TESTNET]:"https://signer.web3auth.io",[xe.CYAN]:"https://signer-polygon.web3auth.io",[xe.AQUA]:"https://signer-polygon.web3auth.io",[xe.CELESTE]:"https://signer-polygon.web3auth.io"};function ke(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){const t=e;return t&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&r&&0!==n}}Oe();class Ne{constructor(){o(this,"store",new Map)}getItem(e){return this.store.get(e)||null}setItem(e,t){this.store.set(e,t)}removeItem(e){this.store.delete(e)}}o(class{constructor(e,t){o(this,"storage",void 0),o(this,"_storeKey",void 0),this.storage=t,this._storeKey=e;try{t.getItem(e)||this.resetStore()}catch(e){}}static getInstance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instanceMap.has(e)){let r;r="local"===t&&ke("localStorage")?window.localStorage:"session"===t&&ke("sessionStorage")?window.sessionStorage:new Ne,this.instanceMap.set(e,new this(e,r))}return this.instanceMap.get(e)}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const e=this.getStore();return this.storage.removeItem(this._storeKey),e}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(e){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[e]}set(e,t){const r=JSON.parse(this.storage.getItem(this._storeKey)||"{}");r[e]=t,this.storage.setItem(this._storeKey,JSON.stringify(r))}},"instanceMap",new Map);const Te=a(a({},Ie),xe),Ce="sms_passwordless";var Be,Le=(Be=function(e,t){return Be=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Be(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Be(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),je=function(e){function t(t,r){var n,i,o,s=this.constructor,a=e.call(this,t,r)||this;return Object.defineProperty(a,"name",{value:s.name,enumerable:!1,configurable:!0}),n=a,i=s.prototype,(o=Object.setPrototypeOf)?o(n,i):n.__proto__=i,function(e,t){void 0===t&&(t=e.constructor);var r=Error.captureStackTrace;r&&r(e,t)}(a),a}return Le(t,e),t}(Error);class Fe extends Error{}Fe.prototype.name="InvalidTokenError";var Ue=r(8089),De=r.n(Ue),qe=r(5880),ze=r.n(qe);const $e=ze().getLogger("http-helpers");$e.setLevel(qe.levels.INFO);let We="torus-default";const He=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={mode:"cors",headers:{}};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useAPIKey&&(r.headers=a(a({},r.headers),function(){const e={};return We&&(e["x-api-key"]=We),e}()));const n=De()(r,t,{method:"GET"}),i=await async function(e,t){let r=null;try{r=new URL(e)}catch(e){}return fetch(e,t)}(e,n);if(i.ok){const e=i.headers.get("content-type");return null!=e&&e.includes("application/json")?i.json():i.text()}throw function(e){$e.info(`Response: ${e.status} ${e.statusText}`),$e.info(`Url: ${e.url}`)}(i),i};function Ve(e){const t=e.findIndex((e=>e instanceof Error)),r=e.findIndex((e=>"string"==typeof e)),n=e.findIndex((e=>e&&"object"==typeof e&&"status"in e&&"type"in e));let i;if(-1!==n){const t=e[n];i=new Error(`${t.status} ${t.type.toString()} ${t.statusText}`)}else i=-1!==t?e.splice(t,1)[0]:-1!==r?new Error(e.splice(r,1)[0]):new Error("Unknown error");return[i,e]}class Ge extends je{constructor(e,t,r){super(t),o(this,"code",void 0),o(this,"message",void 0),o(this,"cause",void 0),this.code=e,this.message=t||"",this.cause=r,Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message,cause:Ve([this.cause])}}toString(){return JSON.stringify(this.toJSON())}}class Ke extends Ge{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(e,t="",r){return new Ke(e,`${Ke.messages[e]}, ${t}`,r)}static notFound(e="",t){return Ke.fromCode(5001,e,t)}static notInstalled(e="",t){return Ke.fromCode(5002,e,t)}static notReady(e="",t){return Ke.fromCode(5003,e,t)}static windowBlocked(e="",t){return Ke.fromCode(5004,e,t)}static windowClosed(e="",t){return Ke.fromCode(5005,e,t)}static incompatibleChainNameSpace(e="",t){return Ke.fromCode(5006,e,t)}static duplicateAdapterError(e="",t){return Ke.fromCode(5007,e,t)}static invalidProviderConfigError(e="",t){return Ke.fromCode(5008,e,t)}static providerNotReadyError(e="",t){return Ke.fromCode(5009,e,t)}static rpcConnectionError(e="",t){return Ke.fromCode(5010,e,t)}static invalidParams(e="",t){return Ke.fromCode(5011,e,t)}static invalidNetwork(e="",t){return Ke.fromCode(5013,e,t)}}o(Ke,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class Je extends Ge{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(e,t="",r){return new Je(e,`${Je.messages[e]}. ${t}`,r)}static connectionError(e="",t){return Je.fromCode(5111,e,t)}static disconnectionError(e="",t){return Je.fromCode(5112,e,t)}static notConnectedError(e="",t){return Je.fromCode(5113,e,t)}static popupClosed(e="",t){return Je.fromCode(5114,e,t)}static mfaEnabled(e="",t){return Je.fromCode(5115,e,t)}static chainConfigNotAdded(e="",t){return Je.fromCode(5116,e,t)}static unsupportedOperation(e="",t){return Je.fromCode(5117,e,t)}static coreKitKeyNotFound(e="",t){return Je.fromCode(5118,e,t)}static userNotLoggedIn(e="",t){return Je.fromCode(5119,e,t)}}o(Je,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class Ye extends Ge{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(e,t="",r){return new Ye(e,`${Ye.messages[e]}, ${t}`,r)}static chainIDNotAllowed(e="",t){return Ye.fromCode(5201,e,t)}static operationNotAllowed(e="",t){return Ye.fromCode(5202,e,t)}static chainNamespaceNotAllowed(e="",t){return Ye.fromCode(5203,e,t)}}o(Ye,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});class Xe extends Ge{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletProviderError"})}static fromCode(e,t="",r){return new Ye(e,`${Xe.messages[e]}, ${t}`,r)}static invalidRequestArgs(e="",t){return Ye.fromCode(5301,e,t)}static invalidRequestMethod(e="",t){return Ye.fromCode(5302,e,t)}static invalidRequestParams(e="",t){return Ye.fromCode(5303,e,t)}}o(Xe,"messages",{5e3:"Custom",5301:"Expected a single, non-array, object argument.",5302:"'args.method' must be a non-empty string.",5303:"'args.params' must be an object or array if provided."});const Ze={EIP155:"eip155",SOLANA:"solana",CASPER:"casper",XRPL:"xrpl",OTHER:"other"},Qe="multichain",et=(e,t)=>{if(e===Ze.OTHER)return null;const r=t?"number"==typeof t?t:parseInt(t,16):(e=>{if(e===Ze.EIP155)return 1;if(e===Ze.SOLANA)return 1;if(e===Ze.XRPL)return 1;throw Ke.invalidParams(`Chain namespace ${e} is not supported`)})(e);return e===Ze.EIP155?(e=>{const t=Ze.EIP155;return 1===e?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorerUrl:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:5===e?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:t,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorerUrl:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:11155111===e?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:t,chainId:"0xaa36a7",rpcTarget:"https://rpc.ankr.com/eth_sepolia",displayName:"Sepolia Testnet",blockExplorerUrl:"https://sepolia.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:137===e?{logo:"https://images.toruswallet.io/polygon.svg",chainNamespace:t,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorerUrl:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80002===e?{logo:"https://images.toruswallet.io/polygon.svg",chainNamespace:t,chainId:"0x13882",rpcTarget:"https://rpc.ankr.com/polygon_amoy",displayName:"Polygon Amoy Testnet",blockExplorerUrl:"https://www.oklink.com/amoy",ticker:"MATIC",tickerName:"Polygon",decimals:18}:56===e?{logo:"https://images.toruswallet.io/bnb.png",chainNamespace:t,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorerUrl:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:97===e?{logo:"https://images.toruswallet.io/bnb.png",chainNamespace:t,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorerUrl:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:25===e?{logo:"https://images.toruswallet.io/cro.svg",chainNamespace:t,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorerUrl:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===e?{logo:"https://images.toruswallet.io/cro.svg",chainNamespace:t,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorerUrl:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos",decimals:18}:8217===e?{logo:"https://images.toruswallet.io/klay.svg",chainNamespace:t,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorerUrl:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn",decimals:18}:null})(r):e===Ze.SOLANA?(e=>{const t=Ze.SOLANA;return 1===e?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorerUrl:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana",decimals:9}:2===e?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:t,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorerUrl:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana",decimals:9}:3===e?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:t,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorerUrl:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana",decimals:9}:null})(r):e===Ze.XRPL?(e=>{const t=Ze.XRPL;return 1===e?{chainNamespace:t,decimals:15,chainId:"0x1",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://ripple-node.tor.us",wsTarget:"wss://s2.ripple.com",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl mainnet",blockExplorerUrl:"https://livenet.xrpl.org"}:2===e?{chainNamespace:t,decimals:15,chainId:"0x2",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://testnet-ripple-node.tor.us",wsTarget:"wss://s.altnet.rippletest.net",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl testnet",blockExplorerUrl:"https://testnet.xrpl.org",isTestnet:!0}:3===e?{chainNamespace:t,decimals:15,chainId:"0x3",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://devnet-ripple-node.tor.us",wsTarget:"wss://s.devnet.rippletest.net/",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl devnet",blockExplorerUrl:"https://devnet.xrpl.org",isTestnet:!0}:null})(r):null},tt={OPENLOGIN:"openlogin",WALLET_CONNECT_V2:"wallet-connect-v2",SFA:"sfa"},rt=a({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},tt),nt=a({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},tt),it=a(a({},nt),rt),ot=(rt.TORUS_SOLANA,rt.PHANTOM,rt.SOLFLARE,rt.SLOPE,nt.TORUS_EVM,nt.METAMASK,nt.COINBASE,Te),st={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},at=a(a({},st),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"});function ct(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){const t=e;return!(!t||22!==t.code&&1014!==t.code&&"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||!r||0===n)}}var ft=ze().getLogger("web3auth-logger");class ut extends Ge{constructor(e,t,r){super(e,t,r),Object.defineProperty(this,"name",{value:"WalletServicesPluginError"})}static fromCode(e,t="",r){return new ut(e,`${ut.messages[e]}${t}`,r)}static notInitialized(e="",t){return ut.fromCode(5210,e,t)}static unsupportedAdapter(e="",t){return ut.fromCode(5211,e,t)}static providerRequired(e="",t){return ut.fromCode(5212,e,t)}static web3authRequired(e="",t){return ut.fromCode(5213,e,t)}static web3AuthNotConnected(e="",t){return ut.fromCode(5214,e,t)}static alreadyInitialized(e="",t){return ut.fromCode(5216,e,t)}static unsupportedChainNamespace(e="",t){return ut.fromCode(5218,e,t)}static differentWeb3AuthNetwork(e="",t){return ut.fromCode(5219,e,t)}static invalidParams(e="",t){return ut.fromCode(5220,e,t)}static web3authNotInitialized(e="",t){return ut.fromCode(5221,e,t)}static invalidSession(e="",t){return ut.fromCode(5222,e,t)}static walletPluginNotConnected(e="",t){return ut.fromCode(5223,e,t)}}o(ut,"messages",{5210:"Wallet Services Plugin is not initialized",5211:"Web3Auth is connected to unsupported adapter. Wallet services connector plugin requires web3auth connected to openlogin adapter.",5212:"Provider is required..",5213:"Web3Auth instance is required while initialization.",5214:"Web3Auth is not connected.",5216:"Plugin is already initialized",5218:"Unsupported chain namespace.",5219:"Plugin network different than web3auth instance network.",5221:"Web3Auth is not initialized",5222:"Invalid session inside wallet services. Please report this issue.",5223:"Wallet plugin is not connected Yet. Please wait for plugin to connect and listen via `connected` event on the plugin"});const dt=a(a({},Ze),{},{MULTICHAIN:"multichain"}),lt={READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"};function ht(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function pt(e,...t){if(!((r=e)instanceof Uint8Array||null!=r&&"object"==typeof r&&"Uint8Array"===r.constructor.name))throw new Error("Uint8Array expected");var r;if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function bt(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");ht(e.outputLen),ht(e.blockLen)}function gt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function yt(e,t){pt(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}a({},lt),a(a({},{WALLET_SERVICES:"wallet-services"}),{SOLANA:"solana"});const mt={number:ht,bool:function(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)},bytes:pt,hash:bt,exists:gt,output:yt},vt="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,wt=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),_t=(e,t)=>e<<32-t|e>>>t,St=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];function At(e){for(let r=0;r<e.length;r++)e[r]=(t=e[r])<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;var t}function Et(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),pt(e),e}class Mt{clone(){return this._cloneInto()}}function Rt(e){const t=t=>e().update(Et(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Ot(e=32){if(vt&&"function"==typeof vt.getRandomValues)return vt.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const xt=(e,t,r)=>e&t^e&r^t&r;class It extends Mt{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=wt(this.buffer)}update(e){gt(this);const{view:t,buffer:r,blockLen:n}=this,i=(e=Et(e)).length;for(let o=0;o<i;){const s=Math.min(n-this.pos,i-o);if(s!==n)r.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(t,0),this.pos=0);else{const t=wt(e);for(;n<=i-o;o+=n)this.process(t,o)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){gt(this),yt(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let e=o;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,f=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+f,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const s=wt(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,f[e],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}const Pt=new Uint32Array([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]),kt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Nt=new Uint32Array(64);class Tt extends It{constructor(){super(64,32,8,!1),this.A=0|kt[0],this.B=0|kt[1],this.C=0|kt[2],this.D=0|kt[3],this.E=0|kt[4],this.F=0|kt[5],this.G=0|kt[6],this.H=0|kt[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)Nt[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=Nt[e-15],r=Nt[e-2],n=_t(t,7)^_t(t,18)^t>>>3,i=_t(r,17)^_t(r,19)^r>>>10;Nt[e]=i+Nt[e-7]+n+Nt[e-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:c,H:f}=this;for(let e=0;e<64;e++){const t=f+(_t(s,6)^_t(s,11)^_t(s,25))+((u=s)&a^~u&c)+Pt[e]+Nt[e]|0,d=(_t(r,2)^_t(r,13)^_t(r,22))+xt(r,n,i)|0;f=c,c=a,a=s,s=o+t|0,o=i,i=n,n=r,r=t+d|0}var u;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(r,n,i,o,s,a,c,f)}roundClean(){Nt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Ct=Rt((()=>new Tt));class Bt extends Mt{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,bt(e);const r=Et(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return gt(this),this.iHash.update(e),this}digestInto(e){gt(this),pt(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Lt=(e,t,r)=>new Bt(e,t).update(r).digest();Lt.create=(e,t)=>new Bt(e,t);const jt=BigInt(1),Ft=BigInt(2);function Ut(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function Dt(e){if(!Ut(e))throw new Error("Uint8Array expected")}const qt=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function zt(e){Dt(e);let t="";for(let r=0;r<e.length;r++)t+=qt[e[r]];return t}function $t(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}const Wt={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Ht(e){return e>=Wt._0&&e<=Wt._9?e-Wt._0:e>=Wt._A&&e<=Wt._F?e-(Wt._A-10):e>=Wt._a&&e<=Wt._f?e-(Wt._a-10):void 0}function Vt(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=Ht(e.charCodeAt(i)),o=Ht(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n}function Gt(e){return $t(zt(e))}function Kt(e){return Dt(e),$t(zt(Uint8Array.from(e).reverse()))}function Jt(e,t){return Vt(e.toString(16).padStart(2*t,"0"))}function Yt(e,t){return Jt(e,t).reverse()}function Xt(e,t,r){let n;if("string"==typeof t)try{n=Vt(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!Ut(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n}function Zt(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Dt(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}const Qt=e=>(Ft<<BigInt(e-1))-jt,er=e=>new Uint8Array(e),tr=e=>Uint8Array.from(e);function rr(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=er(e),i=er(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),c=(e=er())=>{i=a(tr([0]),e),n=a(),0!==e.length&&(i=a(tr([1]),e),n=a())},f=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return Zt(...r)};return(e,t)=>{let r;for(s(),c(e);!(r=t(f()));)c();return s(),r}}const nr={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||Ut(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function ir(e,t,r={}){const n=(t,r,n)=>{const i=nr[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const or=BigInt(0),sr=BigInt(1),ar=BigInt(2),cr=BigInt(3),fr=BigInt(4),ur=BigInt(5),dr=BigInt(8);function lr(e,t){const r=e%t;return r>=or?r:t+r}function hr(e,t,r){if(r<=or||t<or)throw new Error("Expected power/modulo > 0");if(r===sr)return or;let n=sr;for(;t>or;)t&sr&&(n=n*e%r),e=e*e%r,t>>=sr;return n}function pr(e,t,r){let n=e;for(;t-- >or;)n*=n,n%=r;return n}function br(e,t){if(e===or||t<=or)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=lr(e,t),n=t,i=or,o=sr,s=sr,a=or;for(;r!==or;){const e=n/r,t=n%r,c=i-s*e,f=o-a*e;n=r,r=t,i=s,o=a,s=c,a=f}if(n!==sr)throw new Error("invert: does not exist");return lr(i,t)}BigInt(9),BigInt(16);const gr=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function yr(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function mr(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function vr(e){const t=mr(e);return t+Math.ceil(t/2)}const wr=BigInt(0),_r=BigInt(1);function Sr(e){return ir(e.Fp,gr.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),ir(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...yr(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:Ar,aT:Er}=e,Mr={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:t}=Mr;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(128&n[0])throw new t("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Ar(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=Mr,r="string"==typeof e?Er(e):e;Dt(r);let n=r.length;if(n<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=Mr._parseInt(r.subarray(2)),{d:s,l:a}=Mr._parseInt(o);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),c=r(s);return`30${r(s+o+4)}02${c}${i}02${a}${n}`}},Rr=BigInt(0),Or=BigInt(1),xr=(BigInt(2),BigInt(3));function Ir(e){const t=function(e){const t=Sr(e);return ir(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,i=r.BYTES+1,o=2*r.BYTES+1;function s(e){return lr(e,n)}function a(e){return br(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:f,weierstrassEquation:u,isWithinCurveOrder:d}=function(e){const t=function(e){const t=Sr(e);ir(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const i=t.toAffine();return Zt(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function o(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function s(e){return"bigint"==typeof e&&Rr<e&&e<t.n}function a(e){if(!s(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:i,n:o}=t;if(r&&"bigint"!=typeof e){if(Ut(e)&&(e=zt(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*n,"0")}let s;try{s="bigint"==typeof e?e:Gt(Xt("private key",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return i&&(s=lr(s,o)),a(s),s}const f=new Map;function u(e){if(!(e instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof d)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(i(Xt("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,f.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),s=o(e);if(!r.eql(i,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){u(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),f=r.eql(r.mul(n,a),r.mul(s,i));return c&&f}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,xr),{px:o,py:s,pz:a}=this;let c=r.ZERO,f=r.ZERO,u=r.ZERO,l=r.mul(o,o),h=r.mul(s,s),p=r.mul(a,a),b=r.mul(o,s);return b=r.add(b,b),u=r.mul(o,a),u=r.add(u,u),c=r.mul(e,u),f=r.mul(i,p),f=r.add(c,f),c=r.sub(h,f),f=r.add(h,f),f=r.mul(c,f),c=r.mul(b,c),u=r.mul(i,u),p=r.mul(e,p),b=r.sub(l,p),b=r.mul(e,b),b=r.add(b,u),u=r.add(l,l),l=r.add(u,l),l=r.add(l,p),l=r.mul(l,b),f=r.add(f,l),p=r.mul(s,a),p=r.add(p,p),l=r.mul(p,b),c=r.sub(c,l),u=r.mul(p,h),u=r.add(u,u),u=r.add(u,u),new d(c,f,u)}add(e){u(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:c}=e;let f=r.ZERO,l=r.ZERO,h=r.ZERO;const p=t.a,b=r.mul(t.b,xr);let g=r.mul(n,s),y=r.mul(i,a),m=r.mul(o,c),v=r.add(n,i),w=r.add(s,a);v=r.mul(v,w),w=r.add(g,y),v=r.sub(v,w),w=r.add(n,o);let _=r.add(s,c);return w=r.mul(w,_),_=r.add(g,m),w=r.sub(w,_),_=r.add(i,o),f=r.add(a,c),_=r.mul(_,f),f=r.add(y,m),_=r.sub(_,f),h=r.mul(p,w),f=r.mul(b,m),h=r.add(f,h),f=r.sub(y,h),h=r.add(y,h),l=r.mul(f,h),y=r.add(g,g),y=r.add(y,g),m=r.mul(p,m),w=r.mul(b,w),y=r.add(y,m),m=r.sub(g,m),m=r.mul(p,m),w=r.add(w,m),g=r.mul(y,w),l=r.add(l,g),g=r.mul(_,w),f=r.mul(v,f),f=r.sub(f,g),g=r.mul(v,y),h=r.mul(_,h),h=r.add(h,g),new d(f,l,h)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return h.wNAFCached(this,f,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}))}multiplyUnsafe(e){const n=d.ZERO;if(e===Rr)return n;if(a(e),e===Or)return this;const{endo:i}=t;if(!i)return h.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:c,k2:f}=i.splitScalar(e),u=n,l=n,p=this;for(;s>Rr||f>Rr;)s&Or&&(u=u.add(p)),f&Or&&(l=l.add(p)),p=p.double(),s>>=Or,f>>=Or;return o&&(u=u.negate()),c&&(l=l.negate()),l=new d(r.mul(l.px,i.beta),l.py,l.pz),u.add(l)}multiply(e){a(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(o);let{p:f,f:u}=this.wNAF(t),{p:l,f:p}=this.wNAF(c);f=h.constTimeNegate(e,f),l=h.constTimeNegate(a,l),l=new d(r.mul(l.px,s.beta),l.py,l.pz),n=f.add(l),i=u.add(p)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return d.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,i=(e,t)=>t!==Rr&&t!==Or&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),c=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===Or)return!0;if(r)return r(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===Or?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return zt(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const l=t.nBitLength,h=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>wr;)r&_r&&(n=n.add(i)),i=i.double(),r>>=_r;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:s,windowSize:a}=n(t);let c=e.ZERO,f=e.BASE;const u=BigInt(2**t-1),d=2**t,l=BigInt(t);for(let e=0;e<s;e++){const t=e*a;let n=Number(o&u);o>>=l,n>a&&(n-=d,o+=_r);const s=t,h=t+Math.abs(n)-1,p=e%2!=0,b=n<0;0===n?f=f.add(r(p,i[s])):c=c.add(r(b,i[h]))}return{p:c,f}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}}(d,t.endo?Math.ceil(l/2):l);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:s}}({...t,toBytes(e,t,n){const i=t.toAffine(),o=r.toBytes(i.x),s=Zt;return n?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(e){const t=e.length,n=e[0],s=e.subarray(1);if(t!==i||2!==n&&3!==n){if(t===o&&4===n)return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}{const e=Gt(s);if(!(Rr<(a=e)&&a<r.ORDER))throw new Error("Point is not on curve");const t=u(e);let i;try{i=r.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("Point is not on curve"+t)}return!(1&~n)!=((i&Or)===Or)&&(i=r.neg(i)),{x:e,y:i}}var a}}),l=e=>zt(Jt(e,t.nByteLength));function h(e){return e>n>>Or}const p=(e,t,r)=>Gt(e.slice(t,r));class b{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=Xt("compactSignature",e,2*r),new b(p(e,0,r),p(e,r,2*r))}static fromDER(e){const{r:t,s:r}=Mr.toSig(Xt("DER",e));return new b(t,r)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new b(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:i,recovery:o}=this,f=v(Xt("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const u=2===o||3===o?n+t.n:n;if(u>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=1&o?"03":"02",h=c.fromHex(d+l(u)),p=a(u),b=s(-f*p),g=s(i*p),y=c.BASE.multiplyAndAddUnsafe(h,b,g);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return Vt(this.toDERHex())}toDERHex(){return Mr.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Vt(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}const g={isValidPrivateKey(e){try{return f(e),!0}catch(e){return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const e=vr(t.n);return function(e,t,r=!1){const n=e.length,i=mr(t),o=vr(t);if(n<16||n<o||n>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const s=lr(r?Gt(e):Kt(e),t-sr)+sr;return r?Yt(s,i):Jt(s,i)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function y(e){const t=Ut(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===i||n===o:r?n===2*i||n===2*o:e instanceof c}const m=t.bits2int||function(e){const r=Gt(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},v=t.bits2int_modN||function(e){return s(m(e))},w=Qt(t.nBitLength);function _(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(Rr<=e&&e<w))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Jt(e,t.nByteLength)}const S={lowS:t.lowS,prehash:!1},A={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(y(e))throw new Error("first arg must be private key");if(!y(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(f(e)).toRawBytes(r)},sign:function(e,n,i=S){const{seed:o,k2sig:u}=function(e,n,i=S){if(["recovered","canonical"].some((e=>e in i)))throw new Error("sign() legacy options not supported");const{hash:o,randomBytes:u}=t;let{lowS:l,prehash:p,extraEntropy:g}=i;null==l&&(l=!0),e=Xt("msgHash",e),p&&(e=Xt("prehashed msgHash",o(e)));const y=v(e),w=f(n),A=[_(w),_(y)];if(null!=g&&!1!==g){const e=!0===g?u(r.BYTES):g;A.push(Xt("extraEntropy",e))}const E=Zt(...A),M=y;return{seed:E,k2sig:function(e){const t=m(e);if(!d(t))return;const r=a(t),n=c.BASE.multiply(t).toAffine(),i=s(n.x);if(i===Rr)return;const o=s(r*s(M+i*w));if(o===Rr)return;let f=(n.x===i?0:2)|Number(n.y&Or),u=o;return l&&h(o)&&(u=function(e){return h(e)?s(-e):e}(o),f^=1),new b(i,u,f)}}}(e,n,i),l=t;return rr(l.hash.outputLen,l.nByteLength,l.hmac)(o,u)},verify:function(e,r,n,i=A){const o=e;if(r=Xt("msgHash",r),n=Xt("publicKey",n),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:f,prehash:u}=i;let d,l;try{if("string"==typeof o||Ut(o))try{d=b.fromDER(o)}catch(e){if(!(e instanceof Mr.Err))throw e;d=b.fromCompact(o)}else{if("object"!=typeof o||"bigint"!=typeof o.r||"bigint"!=typeof o.s)throw new Error("PARSE");{const{r:e,s:t}=o;d=new b(e,t)}}l=c.fromHex(n)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(f&&d.hasHighS())return!1;u&&(r=t.hash(r));const{r:h,s:p}=d,g=v(r),y=a(p),m=s(g*y),w=s(h*y),_=c.BASE.multiplyAndAddUnsafe(l,m,w)?.toAffine();return!!_&&s(_.x)===h},ProjectivePoint:c,Signature:b,utils:g}}function Pr(e){return{hash:e,hmac:(t,...r)=>Lt(e,t,function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];pt(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}(...r)),randomBytes:Ot}}BigInt(4);const kr=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Nr=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Tr=BigInt(1),Cr=BigInt(2),Br=(e,t)=>(e+t/Cr)/t;const Lr=function(e,t,r=!1,n={}){if(e<=or)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=yr(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=function(e){if(e%fr===cr){const t=(e+sr)/fr;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%dr===ur){const t=(e-ur)/dr;return function(e,r){const n=e.mul(r,ar),i=e.pow(n,t),o=e.mul(r,i),s=e.mul(e.mul(o,ar),i),a=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),r))throw new Error("Cannot find square root");return a}}return function(e){const t=(e-sr)/ar;let r,n,i;for(r=e-sr,n=0;r%ar===or;r/=ar,n++);for(i=ar;i<e&&hr(i,t,e)!==e-sr;i++);if(1===n){const t=(e+sr)/fr;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const o=(r+sr)/ar;return function(e,s){if(e.pow(s,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let a=n,c=e.pow(e.mul(e.ONE,i),r),f=e.pow(s,o),u=e.pow(s,r);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(u);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,sr<<BigInt(a-t-1));c=e.sqr(r),f=e.mul(f,r),u=e.mul(u,c),a=t}return f}}(e)}(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:Qt(i),ZERO:or,ONE:sr,create:t=>lr(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return or<=t&&t<e},is0:e=>e===or,isOdd:e=>(e&sr)===sr,neg:t=>lr(-t,e),eql:(e,t)=>e===t,sqr:t=>lr(t*t,e),add:(t,r)=>lr(t+r,e),sub:(t,r)=>lr(t-r,e),mul:(t,r)=>lr(t*r,e),pow:(e,t)=>function(e,t,r){if(r<or)throw new Error("Expected power > 0");if(r===or)return e.ONE;if(r===sr)return t;let n=e.ONE,i=t;for(;r>or;)r&sr&&(n=e.mul(n,i)),i=e.sqr(i),r>>=sr;return n}(a,e,t),div:(t,r)=>lr(t*br(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>br(t,e),sqrt:n.sqrt||(e=>s(a,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?Yt(e,o):Jt(e,o),fromBytes:e=>{if(e.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${e.length}`);return r?Kt(e):Gt(e)}});return Object.freeze(a)}(kr,void 0,void 0,{sqrt:function(e){const t=kr,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),f=e*e*e%t,u=f*f*e%t,d=pr(u,r,t)*u%t,l=pr(d,r,t)*u%t,h=pr(l,Cr,t)*f%t,p=pr(h,i,t)*h%t,b=pr(p,o,t)*p%t,g=pr(b,a,t)*b%t,y=pr(g,c,t)*g%t,m=pr(y,a,t)*b%t,v=pr(m,r,t)*u%t,w=pr(v,s,t)*p%t,_=pr(w,n,t)*f%t,S=pr(_,Cr,t);if(!Lr.eql(Lr.sqr(S),e))throw new Error("Cannot find square root");return S}}),jr=function(e,t){const r=t=>Ir({...e,...Pr(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:Lr,n:Nr,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Nr,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Tr*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),a=Br(o*e,t),c=Br(-n*e,t);let f=lr(e-a*r-c*i,t),u=lr(-a*n-c*o,t);const d=f>s,l=u>s;if(d&&(f=t-f),l&&(u=t-u),f>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:f,k2neg:l,k2:u}}}},Ct);function Fr(e){return t=>(mt.bytes(t),e(t))}BigInt(0),jr.ProjectivePoint,mt.bool,mt.bytes,(()=>{const e="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,t="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);t&&!e&&t("crypto")})(),BigInt(0);const Ur={},Dr={};for(let e=0;e<16;e++){const t=e,r=16*e,n=e.toString(16).toLowerCase();Dr[n]=t,Dr[n.toUpperCase()]=t,Ur[n]=r,Ur[n.toUpperCase()]=r}Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const qr=[];for(let e=0;e<=65535;e++)qr[e]=BigInt(e);const zr=e=>{if("string"!=typeof e)throw new Error(`hex argument type ${typeof e} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(e))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${e}`);return(e=e.slice(2)).length%2!=0&&(e=function(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}(e)),function(e){const t=e.length,r=new Uint8Array(t/2);for(let n=0;n<t;n+=2)r[n/2]=Ur[e[n]]+Dr[e[n+1]];return r}(e)};BigInt("0xffffffffffffffff"),BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),jr.CURVE.n,jr.CURVE.n,BigInt(2),BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),zr("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"),zr("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"),zr("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"),Uint8Array.from([128]),BigInt(-1),BigInt(0),BigInt(1),BigInt(2),BigInt(3),BigInt(7),BigInt(8),BigInt(27),BigInt(28),BigInt(31),BigInt(32),BigInt(64),BigInt(128),BigInt(255),BigInt(256),BigInt(96),BigInt(100),BigInt(160),BigInt(224),BigInt(7922816251426434e13),BigInt(1461501637330903e33),BigInt(2695994666715064e52),BigInt(1e9),Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const $r=BigInt(2**32-1),Wr=BigInt(32);function Hr(e,t=!1){return t?{h:Number(e&$r),l:Number(e>>Wr&$r)}:{h:0|Number(e>>Wr&$r),l:0|Number(e&$r)}}function Vr(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:s}=Hr(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]}const Gr=[],Kr=[],Jr=[],Yr=BigInt(0),Xr=BigInt(1),Zr=BigInt(2),Qr=BigInt(7),en=BigInt(256),tn=BigInt(113);for(let e=0,t=Xr,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Gr.push(2*(5*n+r)),Kr.push((e+1)*(e+2)/2%64);let i=Yr;for(let e=0;e<7;e++)t=(t<<Xr^(t>>Qr)*tn)%en,t&Zr&&(i^=Xr<<(Xr<<BigInt(e))-Xr);Jr.push(i)}const[rn,nn]=Vr(Jr,!0),on=(e,t,r)=>r>32?((e,t,r)=>t<<r-32|e>>>64-r)(e,t,r):((e,t,r)=>e<<r|t>>>32-r)(e,t,r),sn=(e,t,r)=>r>32?((e,t,r)=>e<<r-32|t>>>64-r)(e,t,r):((e,t,r)=>t<<r|e>>>32-r)(e,t,r);class an extends Mt{constructor(e,t,r,n=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ht(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){St||At(this.state32),function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=on(o,s,1)^r[n],c=sn(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=Kr[r],o=on(t,i,n),s=sn(t,i,n),a=Gr[r];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=rn[n],e[1]^=nn[n]}r.fill(0)}(this.state32,this.rounds),St||At(this.state32),this.posOut=0,this.pos=0}update(e){gt(this);const{blockLen:t,state:r}=this,n=(e=Et(e)).length;for(let i=0;i<n;){const o=Math.min(t-this.pos,n-i);for(let t=0;t<o;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){gt(this,!1),pt(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return ht(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(yt(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new an(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}const cn=(e,t,r)=>Rt((()=>new an(t,e,r))),fn=cn(1,144,28),un=cn(1,136,32),dn=cn(1,104,48),ln=cn(1,72,64),hn=(Fr(fn),(()=>{const e=Fr(un);return e.create=un.create,e})());var pn,bn,gn,yn;Fr(dn),Fr(ln),new Uint8Array(0),function(e){e.String="string",e.Bytes="view",e.Number="number"}(pn||(pn={})),function(e){e.String="string",e.Bytes="view",e.JSON="json"}(bn||(bn={})),(yn=gn||(gn={}))[yn.Number=0]="Number",yn[yn.BigInt=1]="BigInt",yn[yn.Uint8Array=2]="Uint8Array",yn[yn.PrefixedHexString=3]="PrefixedHexString",Fr(Ct);var mn=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,vn=Math.ceil,wn=Math.floor,_n="[BigNumber Error] ",Sn=_n+"Number primitive has more than 15 significant digits: ",An=1e14,En=14,Mn=9007199254740991,Rn=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],On=1e7,xn=1e9;function In(e){var t=0|e;return e>0||e===t?t:t-1}function Pn(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=En-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function kn(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,c=e.e,f=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=c==f,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>f^r?1:-1;for(a=(c=i.length)<(f=o.length)?c:f,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return c==f?0:c>f^r?1:-1}function Nn(e,t,r,n){if(e<t||e>r||e!==wn(e))throw Error(_n+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Tn(e){var t=e.c.length-1;return In(e.e/En)==t&&e.c[t]%2!=0}function Cn(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Bn(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}!function e(t){var r,n,i,o,s,a,c,f,u,d,l=R.prototype={constructor:R,toString:null,valueOf:null},h=new R(1),p=20,b=4,g=-7,y=21,m=-1e7,v=1e7,w=!1,_=1,S=0,A={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",M=!0;function R(e,t){var r,o,s,a,c,f,u,d,l=this;if(!(l instanceof R))return new R(e,t);if(null==t){if(e&&!0===e._isBigNumber)return l.s=e.s,void(!e.c||e.e>v?l.c=l.e=null:e.e<m?l.c=[l.e=0]:(l.e=e.e,l.c=e.c.slice()));if((f="number"==typeof e)&&0*e==0){if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,c=e;c>=10;c/=10,a++);return void(a>v?l.c=l.e=null:(l.e=a,l.c=[e]))}d=String(e)}else{if(!mn.test(d=String(e)))return i(l,d,f);l.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(a=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(a<0&&(a=c),a+=+d.slice(c+1),d=d.substring(0,c)):a<0&&(a=d.length)}else{if(Nn(t,2,E.length,"Base"),10==t&&M)return P(l=new R(e),p+l.e+1,b);if(d=String(e),f="number"==typeof e){if(0*e!=0)return i(l,d,f,t);if(l.s=1/e<0?(d=d.slice(1),-1):1,R.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(Sn+e)}else l.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=E.slice(0,t),a=c=0,u=d.length;c<u;c++)if(r.indexOf(o=d.charAt(c))<0){if("."==o){if(c>a){a=u;continue}}else if(!s&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){s=!0,c=-1,a=0;continue}return i(l,String(e),f,t)}f=!1,(a=(d=n(d,t,10,l.s)).indexOf("."))>-1?d=d.replace(".",""):a=d.length}for(c=0;48===d.charCodeAt(c);c++);for(u=d.length;48===d.charCodeAt(--u););if(d=d.slice(c,++u)){if(u-=c,f&&R.DEBUG&&u>15&&(e>Mn||e!==wn(e)))throw Error(Sn+l.s*e);if((a=a-c-1)>v)l.c=l.e=null;else if(a<m)l.c=[l.e=0];else{if(l.e=a,l.c=[],c=(a+1)%En,a<0&&(c+=En),c<u){for(c&&l.c.push(+d.slice(0,c)),u-=En;c<u;)l.c.push(+d.slice(c,c+=En));c=En-(d=d.slice(c)).length}else c-=u;for(;c--;d+="0");l.c.push(+d)}}else l.c=[l.e=0]}function O(e,t,r,n){var i,o,s,a,c;if(null==r?r=b:Nn(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=Pn(e.c),c=1==n||2==n&&(s<=g||s>=y)?Cn(c,s):Bn(c,s,"0");else if(o=(e=P(new R(e),t,r)).e,a=(c=Pn(e.c)).length,1==n||2==n&&(t<=o||o<=g)){for(;a<t;c+="0",a++);c=Cn(c,o)}else if(t-=s,c=Bn(c,o,"0"),o+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function x(e,t){for(var r,n,i=1,o=new R(e[0]);i<e.length;i++)(!(n=new R(e[i])).s||(r=kn(o,n))===t||0===r&&o.s===t)&&(o=n);return o}function I(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*En-1)>v?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function P(e,t,r,n){var i,o,s,a,c,f,u,d=e.c,l=Rn;if(d){e:{for(i=1,a=d[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=En,s=t,c=d[f=0],u=wn(c/l[i-s-1]%10);else if((f=vn((o+1)/En))>=d.length){if(!n)break e;for(;d.length<=f;d.push(0));c=u=0,i=1,s=(o%=En)-En+1}else{for(c=a=d[f],i=1;a>=10;a/=10,i++);u=(s=(o%=En)-En+i)<0?0:wn(c/l[i-s-1]%10)}if(n=n||t<0||null!=d[f+1]||(s<0?c:c%l[i-s-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(o>0?s>0?c/l[i-s]:0:d[f-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,n?(t-=e.e+1,d[0]=l[(En-t%En)%En],e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=f,a=1,f--):(d.length=f+1,a=l[En-o],d[f]=s>0?wn(c/l[i-s]%l[s])*a:0),n)for(;;){if(0==f){for(o=1,s=d[0];s>=10;s/=10,o++);for(s=d[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,d[0]==An&&(d[0]=1));break}if(d[f]+=a,d[f]!=An)break;d[f--]=0,a=1}for(o=d.length;0===d[--o];d.pop());}e.e>v?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function k(e){var t,r=e.e;return null===r?e.toString():(t=Pn(e.c),t=r<=g||r>=y?Cn(t,r):Bn(t,r,"0"),e.s<0?"-"+t:t)}return R.clone=e,R.ROUND_UP=0,R.ROUND_DOWN=1,R.ROUND_CEIL=2,R.ROUND_FLOOR=3,R.ROUND_HALF_UP=4,R.ROUND_HALF_DOWN=5,R.ROUND_HALF_EVEN=6,R.ROUND_HALF_CEIL=7,R.ROUND_HALF_FLOOR=8,R.EUCLID=9,R.config=R.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(_n+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Nn(r=e[t],0,xn,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(Nn(r=e[t],0,8,t),b=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(Nn(r[0],-xn,0,t),Nn(r[1],0,xn,t),g=r[0],y=r[1]):(Nn(r,-xn,xn,t),g=-(y=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)Nn(r[0],-xn,-1,t),Nn(r[1],1,xn,t),m=r[0],v=r[1];else{if(Nn(r,-xn,xn,t),!r)throw Error(_n+t+" cannot be zero: "+r);m=-(v=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(_n+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(_n+"crypto unavailable");w=r}else w=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(Nn(r=e[t],0,9,t),_=r),e.hasOwnProperty(t="POW_PRECISION")&&(Nn(r=e[t],0,xn,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(_n+t+" not an object: "+r);A=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(_n+t+" invalid: "+r);M="0123456789"==r.slice(0,10),E=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:b,EXPONENTIAL_AT:[g,y],RANGE:[m,v],CRYPTO:w,MODULO_MODE:_,POW_PRECISION:S,FORMAT:A,ALPHABET:E}},R.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!R.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-xn&&i<=xn&&i===wn(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%En)<1&&(t+=En),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=An||r!==wn(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(_n+"Invalid BigNumber: "+e)},R.maximum=R.max=function(){return x(arguments,-1)},R.minimum=R.min=function(){return x(arguments,1)},R.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return wn(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,a=0,c=[],f=new R(h);if(null==e?e=p:Nn(e,0,xn),i=vn(e/En),w)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(c.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw w=!1,Error(_n+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(c.push(o%1e14),a+=7);a=i/7}if(!w)for(;a<i;)(o=s())<9e15&&(c[a++]=o%1e14);for(i=c[--a],e%=En,i&&e&&(o=Rn[En-e],c[a]=wn(i/o)*o);0===c[a];c.pop(),a--);if(a<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=En);for(a=1,o=c[0];o>=10;o/=10,a++);a<En&&(n-=En-a)}return f.e=n,f.c=c,f}),R.sum=function(){for(var e=1,t=arguments,r=new R(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,c=e.length;a<c;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var c,f,u,d,l,h,g,y,m=n.indexOf("."),v=p,w=b;for(m>=0&&(d=S,S=0,n=n.replace(".",""),h=(y=new R(i)).pow(n.length-m),S=d,y.c=t(Bn(Pn(h.c),h.e,"0"),10,o,e),y.e=y.c.length),u=d=(g=t(n,i,o,a?(c=E,e):(c=e,E))).length;0==g[--d];g.pop());if(!g[0])return c.charAt(0);if(m<0?--u:(h.c=g,h.e=u,h.s=s,g=(h=r(h,y,v,w,o)).c,l=h.r,u=h.e),m=g[f=u+v+1],d=o/2,l=l||f<0||null!=g[f+1],l=w<4?(null!=m||l)&&(0==w||w==(h.s<0?3:2)):m>d||m==d&&(4==w||l||6==w&&1&g[f-1]||w==(h.s<0?8:7)),f<1||!g[0])n=l?Bn(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(g.length=f,l)for(--o;++g[--f]>o;)g[f]=0,f||(++u,g=[1].concat(g));for(d=g.length;!g[--d];);for(m=0,n="";m<=d;n+=c.charAt(g[m++]));n=Bn(n,u,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,c=e.length,f=t%On,u=t/On|0;for(e=e.slice();c--;)a=((i=f*(o=e[c]%On)+(n=u*o+(s=e[c]/On|0)*f)%On*On+a)/r|0)+(n/On|0)+u*s,e[c]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var c,f,u,d,l,h,p,b,g,y,m,v,w,_,S,A,E,M=n.s==i.s?1:-1,O=n.c,x=i.c;if(!(O&&O[0]&&x&&x[0]))return new R(n.s&&i.s&&(O?!x||O[0]!=x[0]:x)?O&&0==O[0]||!x?0*M:M/0:NaN);for(g=(b=new R(M)).c=[],M=o+(f=n.e-i.e)+1,a||(a=An,f=In(n.e/En)-In(i.e/En),M=M/En|0),u=0;x[u]==(O[u]||0);u++);if(x[u]>(O[u]||0)&&f--,M<0)g.push(1),d=!0;else{for(_=O.length,A=x.length,u=0,M+=2,(l=wn(a/(x[0]+1)))>1&&(x=e(x,l,a),O=e(O,l,a),A=x.length,_=O.length),w=A,m=(y=O.slice(0,A)).length;m<A;y[m++]=0);E=x.slice(),E=[0].concat(E),S=x[0],x[1]>=a/2&&S++;do{if(l=0,(c=t(x,y,A,m))<0){if(v=y[0],A!=m&&(v=v*a+(y[1]||0)),(l=wn(v/S))>1)for(l>=a&&(l=a-1),p=(h=e(x,l,a)).length,m=y.length;1==t(h,y,p,m);)l--,r(h,A<p?E:x,p,a),p=h.length,c=1;else 0==l&&(c=l=1),p=(h=x.slice()).length;if(p<m&&(h=[0].concat(h)),r(y,h,m,a),m=y.length,-1==c)for(;t(x,y,A,m)<1;)l++,r(y,A<m?E:x,m,a),m=y.length}else 0===c&&(l++,y=[0]);g[u++]=l,y[0]?y[m++]=O[w]||0:(y=[O[w]],m=1)}while((w++<_||null!=y[0])&&M--);d=null!=y[0],g[0]||g.splice(0,1)}if(a==An){for(u=1,M=g[0];M>=10;M/=10,u++);P(b,o+(b.e=u+f*En-1)+1,s,d)}else b.e=f,b.r=+d;return b}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,f=/^\.([^.]+)$/,u=/^-?(Infinity|NaN)$/,d=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(d,"");if(u.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(c,"$1").replace(f,"0.$1")),t!=o))return new R(o,i);if(R.DEBUG)throw Error(_n+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},l.absoluteValue=l.abs=function(){var e=new R(this);return e.s<0&&(e.s=1),e},l.comparedTo=function(e,t){return kn(this,new R(e,t))},l.decimalPlaces=l.dp=function(e,t){var r,n,i,o=this;if(null!=e)return Nn(e,0,xn),null==t?t=b:Nn(t,0,8),P(new R(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-In(this.e/En))*En,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},l.dividedBy=l.div=function(e,t){return r(this,new R(e,t),p,b)},l.dividedToIntegerBy=l.idiv=function(e,t){return r(this,new R(e,t),0,1)},l.exponentiatedBy=l.pow=function(e,t){var r,n,i,o,s,a,c,f,u=this;if((e=new R(e)).c&&!e.isInteger())throw Error(_n+"Exponent not an integer: "+k(e));if(null!=t&&(t=new R(t)),s=e.e>14,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return f=new R(Math.pow(+k(u),s?e.s*(2-Tn(e)):+k(e))),t?f.mod(t):f;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new R(NaN);(n=!a&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(e.e>9&&(u.e>0||u.e<-1||(0==u.e?u.c[0]>1||s&&u.c[1]>=24e7:u.c[0]<8e13||s&&u.c[0]<=9999975e7)))return o=u.s<0&&Tn(e)?-0:0,u.e>-1&&(o=1/o),new R(a?1/o:o);S&&(o=vn(S/En+2))}for(s?(r=new R(.5),a&&(e.s=1),c=Tn(e)):c=(i=Math.abs(+k(e)))%2,f=new R(h);;){if(c){if(!(f=f.times(u)).c)break;o?f.c.length>o&&(f.c.length=o):n&&(f=f.mod(t))}if(i){if(0===(i=wn(i/2)))break;c=i%2}else if(P(e=e.times(r),e.e+1,1),e.e>14)c=Tn(e);else{if(0==(i=+k(e)))break;c=i%2}u=u.times(u),o?u.c&&u.c.length>o&&(u.c.length=o):n&&(u=u.mod(t))}return n?f:(a&&(f=h.div(f)),t?f.mod(t):o?P(f,S,b,void 0):f)},l.integerValue=function(e){var t=new R(this);return null==e?e=b:Nn(e,0,8),P(t,t.e+1,e)},l.isEqualTo=l.eq=function(e,t){return 0===kn(this,new R(e,t))},l.isFinite=function(){return!!this.c},l.isGreaterThan=l.gt=function(e,t){return kn(this,new R(e,t))>0},l.isGreaterThanOrEqualTo=l.gte=function(e,t){return 1===(t=kn(this,new R(e,t)))||0===t},l.isInteger=function(){return!!this.c&&In(this.e/En)>this.c.length-2},l.isLessThan=l.lt=function(e,t){return kn(this,new R(e,t))<0},l.isLessThanOrEqualTo=l.lte=function(e,t){return-1===(t=kn(this,new R(e,t)))||0===t},l.isNaN=function(){return!this.s},l.isNegative=function(){return this.s<0},l.isPositive=function(){return this.s>0},l.isZero=function(){return!!this.c&&0==this.c[0]},l.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new R(e,t)).s,!a||!t)return new R(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/En,f=e.e/En,u=s.c,d=e.c;if(!c||!f){if(!u||!d)return u?(e.s=-t,e):new R(d?s:NaN);if(!u[0]||!d[0])return d[0]?(e.s=-t,e):new R(u[0]?s:3==b?-0:0)}if(c=In(c),f=In(f),u=u.slice(),a=c-f){for((o=a<0)?(a=-a,i=u):(f=c,i=d),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=u.length)<(t=d.length))?a:t,a=t=0;t<n;t++)if(u[t]!=d[t]){o=u[t]<d[t];break}if(o&&(i=u,u=d,d=i,e.s=-e.s),(t=(n=d.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=An-1;n>a;){if(u[--n]<d[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=An}u[n]-=d[n]}for(;0==u[0];u.splice(0,1),--f);return u[0]?I(e,u,f):(e.s=3==b?-1:1,e.c=[e.e=0],e)},l.modulo=l.mod=function(e,t){var n,i,o=this;return e=new R(e,t),!o.c||!e.s||e.c&&!e.c[0]?new R(NaN):!e.c||o.c&&!o.c[0]?new R(o):(9==_?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,_),(e=o.minus(n.times(e))).c[0]||1!=_||(e.s=o.s),e)},l.multipliedBy=l.times=function(e,t){var r,n,i,o,s,a,c,f,u,d,l,h,p,b,g,y=this,m=y.c,v=(e=new R(e,t)).c;if(!(m&&v&&m[0]&&v[0]))return!y.s||!e.s||m&&!m[0]&&!v||v&&!v[0]&&!m?e.c=e.e=e.s=null:(e.s*=y.s,m&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=In(y.e/En)+In(e.e/En),e.s*=y.s,(c=m.length)<(d=v.length)&&(p=m,m=v,v=p,i=c,c=d,d=i),i=c+d,p=[];i--;p.push(0));for(b=An,g=On,i=d;--i>=0;){for(r=0,l=v[i]%g,h=v[i]/g|0,o=i+(s=c);o>i;)r=((f=l*(f=m[--s]%g)+(a=h*f+(u=m[s]/g|0)*l)%g*g+p[o]+r)/b|0)+(a/g|0)+h*u,p[o--]=f%b;p[o]=r}return r?++n:p.splice(0,1),I(e,p,n)},l.negated=function(){var e=new R(this);return e.s=-e.s||null,e},l.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new R(e,t)).s,!i||!t)return new R(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/En,s=e.e/En,a=n.c,c=e.c;if(!o||!s){if(!a||!c)return new R(i/0);if(!a[0]||!c[0])return c[0]?e:new R(a[0]?n:0*i)}if(o=In(o),s=In(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=c):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/An|0,a[t]=An===a[t]?0:a[t]%An;return i&&(a=[i].concat(a),++s),I(e,a,s)},l.precision=l.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return Nn(e,1,xn),null==t?t=b:Nn(t,0,8),P(new R(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*En+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},l.shiftedBy=function(e){return Nn(e,-9007199254740991,Mn),this.times("1e"+e)},l.squareRoot=l.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,c=s.s,f=s.e,u=p+4,d=new R("0.5");if(1!==c||!a||!a[0])return new R(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+k(s)))||c==1/0?(((t=Pn(a)).length+f)%2==0&&(t+="0"),c=Math.sqrt(+t),f=In((f+1)/2)-(f<0||f%2),n=new R(t=c==1/0?"5e"+f:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+f)):n=new R(c+""),n.c[0])for((c=(f=n.e)+u)<3&&(c=0);;)if(o=n,n=d.times(o.plus(r(s,o,u,1))),Pn(o.c).slice(0,c)===(t=Pn(n.c)).slice(0,c)){if(n.e<f&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(n,n.e+p+2,1),e=!n.times(n).eq(s));break}if(!i&&(P(o,o.e+p+2,0),o.times(o).eq(s))){n=o;break}u+=4,c+=4,i=1}return P(n,n.e+p+1,b,e)},l.toExponential=function(e,t){return null!=e&&(Nn(e,0,xn),e++),O(this,e,t,1)},l.toFixed=function(e,t){return null!=e&&(Nn(e,0,xn),e=e+this.e+1),O(this,e,t)},l.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=A;else if("object"!=typeof r)throw Error(_n+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,c=+r.secondaryGroupSize,f=r.groupSeparator||"",u=s[0],d=s[1],l=i.s<0,h=l?u.slice(1):u,p=h.length;if(c&&(o=a,a=c,c=o,p-=o),a>0&&p>0){for(o=p%a||a,u=h.substr(0,o);o<p;o+=a)u+=f+h.substr(o,a);c>0&&(u+=f+h.slice(o)),l&&(u="-"+u)}n=d?u+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):u}return(r.prefix||"")+n+(r.suffix||"")},l.toFraction=function(e){var t,n,i,o,s,a,c,f,u,d,l,p,g=this,y=g.c;if(null!=e&&(!(c=new R(e)).isInteger()&&(c.c||1!==c.s)||c.lt(h)))throw Error(_n+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+k(c));if(!y)return new R(g);for(t=new R(h),u=n=new R(h),i=f=new R(h),p=Pn(y),s=t.e=p.length-g.e-1,t.c[0]=Rn[(a=s%En)<0?En+a:a],e=!e||c.comparedTo(t)>0?s>0?t:u:c,a=v,v=1/0,c=new R(p),f.c[0]=0;d=r(c,t,0,1),1!=(o=n.plus(d.times(i))).comparedTo(e);)n=i,i=o,u=f.plus(d.times(o=u)),f=o,t=c.minus(d.times(o=t)),c=o;return o=r(e.minus(n),i,0,1),f=f.plus(o.times(u)),n=n.plus(o.times(i)),f.s=u.s=g.s,l=r(u,i,s*=2,b).minus(g).abs().comparedTo(r(f,n,s,b).minus(g).abs())<1?[u,i]:[f,n],v=a,l},l.toNumber=function(){return+k(this)},l.toPrecision=function(e,t){return null!=e&&Nn(e,1,xn),O(this,e,t,2)},l.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=g||o>=y?Cn(Pn(r.c),o):Bn(Pn(r.c),o,"0"):10===e&&M?t=Bn(Pn((r=P(new R(r),p+o+1,b)).c),r.e,"0"):(Nn(e,2,E.length,"Base"),t=n(Bn(Pn(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},l.valueOf=l.toJSON=function(){return k(this)},l._isBigNumber=!0,l[Symbol.toStringTag]="BigNumber",l[Symbol.for("nodejs.util.inspect.custom")]=l.valueOf,null!=t&&R.set(t),R}();class Ln{ttl;map=new Map;_to=!1;constructor(e){this.ttl=e}has(e){return this.map.has(e)}add(e){this.map.set(e,jn()),this._to||(this._to=!0,setTimeout((()=>{this._to=!1,function(e){const t=jn()-e.ttl,r=e.map[Symbol.iterator]();for(;;){const n=r.next().value;if(!n)return;const i=n[0];if(!(n[1]<t))return;e.map.delete(i)}}(this)}),0))}clear(){this.map.clear()}}function jn(){return Date.now()}const Fn=Object.create(null);Fn.open="0",Fn.close="1",Fn.ping="2",Fn.pong="3",Fn.message="4",Fn.upgrade="5",Fn.noop="6";const Un=Object.create(null);Object.keys(Fn).forEach((e=>{Un[Fn[e]]=e}));const Dn={type:"error",data:"parser error"},qn="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),zn="function"==typeof ArrayBuffer,$n=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Wn=({type:e,data:t},r,n)=>qn&&t instanceof Blob?r?n(t):Hn(t,n):zn&&(t instanceof ArrayBuffer||$n(t))?r?n(t):Hn(new Blob([t]),n):n(Fn[e]+(t||"")),Hn=(e,t)=>{const r=new FileReader;return r.onload=function(){const e=r.result.split(",")[1];t("b"+(e||""))},r.readAsDataURL(e)};function Vn(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Gn;const Kn="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)Kn["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)]=e;const Jn="function"==typeof ArrayBuffer,Yn=(e,t)=>{if("string"!=typeof e)return{type:"message",data:Zn(e,t)};const r=e.charAt(0);return"b"===r?{type:"message",data:Xn(e.substring(1),t)}:Un[r]?e.length>1?{type:Un[r],data:e.substring(1)}:{type:Un[r]}:Dn},Xn=(e,t)=>{if(Jn){const r=(e=>{let t,r,n,i,o,s=.75*e.length,a=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);const f=new ArrayBuffer(s),u=new Uint8Array(f);for(t=0;t<a;t+=4)r=Kn[e.charCodeAt(t)],n=Kn[e.charCodeAt(t+1)],i=Kn[e.charCodeAt(t+2)],o=Kn[e.charCodeAt(t+3)],u[c++]=r<<2|n>>4,u[c++]=(15&n)<<4|i>>2,u[c++]=(3&i)<<6|63&o;return f})(e);return Zn(r,t)}return{base64:!0,data:e}},Zn=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Qn=String.fromCharCode(30);let ei;function ti(e){return e.reduce(((e,t)=>e+t.length),0)}function ri(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let i=0;i<t;i++)r[i]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function ni(e){if(e)return function(e){for(var t in ni.prototype)e[t]=ni.prototype[t];return e}(e)}ni.prototype.on=ni.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},ni.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},ni.prototype.off=ni.prototype.removeListener=ni.prototype.removeAllListeners=ni.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+e],this},ni.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){n=0;for(var i=(r=r.slice(0)).length;n<i;++n)r[n].apply(this,t)}return this},ni.prototype.emitReserved=ni.prototype.emit,ni.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},ni.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ii="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function oi(e,...t){return t.reduce(((t,r)=>(e.hasOwnProperty(r)&&(t[r]=e[r]),t)),{})}const si=ii.setTimeout,ai=ii.clearTimeout;function ci(e,t){t.useNativeTimers?(e.setTimeoutFn=si.bind(ii),e.clearTimeoutFn=ai.bind(ii)):(e.setTimeoutFn=ii.setTimeout.bind(ii),e.clearTimeoutFn=ii.clearTimeout.bind(ii))}class fi extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class ui extends ni{constructor(e){super(),this.writable=!1,ci(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new fi(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Yn(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}(e);return t.length?"?"+t:""}}const di="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),li=64,hi={};let pi,bi=0,gi=0;function yi(e){let t="";do{t=di[e%li]+t,e=Math.floor(e/li)}while(e>0);return t}function mi(){const e=yi(+new Date);return e!==pi?(bi=0,pi=e):e+"."+yi(bi++)}for(;gi<li;gi++)hi[di[gi]]=gi;let vi=!1;try{vi="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}const wi=vi;function _i(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||wi))return new XMLHttpRequest}catch(e){}if(!t)try{return new(ii[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}function Si(){}const Ai=null!=new _i({xdomain:!1}).responseType;class Ei extends ni{constructor(e,t){super(),ci(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=void 0!==t.data?t.data:null,this.create()}create(){var e;const t=oi(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const r=this.xhr=new _i(t);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{r.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this.opts.cookieJar)||void 0===e||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var e;3===r.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=Ei.requestsCount++,Ei.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Si,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Ei.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function Mi(){for(let e in Ei.requests)Ei.requests.hasOwnProperty(e)&&Ei.requests[e].abort()}Ei.requestsCount=0,Ei.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",Mi):"function"==typeof addEventListener&&addEventListener("onpagehide"in ii?"pagehide":"unload",Mi,!1));const Ri="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Oi=ii.WebSocket||ii.MozWebSocket;r(1048).Buffer;const xi="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),Ii={websocket:class extends ui{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,r=xi?{}:oi(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=xi?new Oi(e,t,r):t?new Oi(e,t):new Oi(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;Wn(r,this.supportsBinary,(e=>{try{this.ws.send(e)}catch(e){}n&&Ri((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=mi()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!Oi}},webtransport:class extends ui{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((e=>{const t=function(e,t){ei||(ei=new TextDecoder);const r=[];let n=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===n){if(ti(r)<1)break;const e=ri(r,1);o=!(128&~e[0]),i=127&e[0],n=i<126?3:126===i?1:2}else if(1===n){if(ti(r)<2)break;const e=ri(r,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),n=3}else if(2===n){if(ti(r)<8)break;const e=ri(r,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(Dn);break}i=o*Math.pow(2,32)+t.getUint32(4),n=3}else{if(ti(r)<i)break;const e=ri(r,i);a.enqueue(Yn(o?e:ei.decode(e),t)),n=0}if(0===i||i>e){a.enqueue(Dn);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),n=new TransformStream({transform(e,t){!function(e,t){qn&&e.data instanceof Blob?e.data.arrayBuffer().then(Vn).then(t):zn&&(e.data instanceof ArrayBuffer||$n(e.data))?t(Vn(e.data)):Wn(e,!1,(e=>{Gn||(Gn=new TextEncoder),t(Gn.encode(e))}))}(e,(r=>{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,n)}else{i=new Uint8Array(9);const e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(n))}e.data&&"string"!=typeof e.data&&(i[0]|=128),t.enqueue(i),t.enqueue(r)}))}});n.readable.pipeTo(e.writable),this.writer=n.writable.getWriter();const i=()=>{r.read().then((({done:e,value:t})=>{e||(this.onPacket(t),i())})).catch((e=>{}))};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then((()=>this.onOpen()))}))})))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;this.writer.write(r).then((()=>{n&&Ri((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}},polling:class extends ui{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let r=location.port;r||(r=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||r!==e.port}const t=e&&e.forceBase64;this.supportsBinary=Ai&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const r=e.split(Qn),n=[];for(let e=0;e<r.length;e++){const i=Yn(r[e],t);if(n.push(i),"error"===i.type)break}return n})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const r=e.length,n=new Array(r);let i=0;e.forEach(((e,o)=>{Wn(e,!1,(e=>{n[o]=e,++i===r&&t(n.join(Qn))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=mi()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ei(this.uri(),e)}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},Pi=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ki=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ni(e){if(e.length>2e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");-1!=r&&-1!=n&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let i=Pi.exec(e||""),o={},s=14;for(;s--;)o[ki[s]]=i[s]||"";return-1!=r&&-1!=n&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(e,t){const r=t.replace(/\/{2,9}/g,"/").split("/");return"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1),"/"==t.slice(-1)&&r.splice(r.length-1,1),r}(0,o.path),o.queryKey=function(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(r[t]=n)})),r}(0,o.query),o}class Ti extends ni{constructor(e,t={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=Ni(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=Ni(t.host).host),ci(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},r=e.split("&");for(let e=0,n=r.length;e<n;e++){let n=r[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new Ii[e](r)}open(){let e;if(this.opts.rememberUpgrade&&Ti.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){let t=this.createTransport(e),r=!1;Ti.priorWebsocketSuccess=!1;const n=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",(e=>{if(!r)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Ti.priorWebsocketSuccess="websocket"===t.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(f(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}})))};function i(){r||(r=!0,f(),t.close(),t=null)}const o=e=>{const r=new Error("probe error: "+e);r.transport=t.name,i(),this.emitReserved("upgradeError",r)};function s(){o("transport closed")}function a(){o("socket closed")}function c(e){t&&e.name!==t.name&&i()}const f=()=>{t.removeListener("open",n),t.removeListener("error",o),t.removeListener("close",s),this.off("close",a),this.off("upgrading",c)};t.once("open",n),t.once("error",o),t.once("close",s),this.once("close",a),this.once("upgrading",c),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn((()=>{r||t.open()}),200):t.open()}onOpen(){if(this.readyState="open",Ti.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let r=0;r<this.writeBuffer.length;r++){const n=this.writeBuffer[r].data;if(n&&(e+="string"==typeof(t=n)?function(e){let t=0,r=0;for(let n=0,i=e.length;n<i;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))),r>0&&e>this.maxPayload)return this.writeBuffer.slice(0,r);e+=2}var t;return this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const i={type:e,data:t,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?r():e()})):this.upgrading?r():e()),this}onError(e){Ti.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let r=0;const n=e.length;for(;r<n;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}}Ti.protocol=4,Ti.protocol;const Ci="function"==typeof ArrayBuffer,Bi=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Li=Object.prototype.toString,ji="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Li.call(Blob),Fi="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Li.call(File);function Ui(e){return Ci&&(e instanceof ArrayBuffer||Bi(e))||ji&&e instanceof Blob||Fi&&e instanceof File}function Di(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,r=e.length;t<r;t++)if(Di(e[t]))return!0;return!1}if(Ui(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return Di(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&Di(e[t]))return!0;return!1}function qi(e){const t=[],r=e.data,n=e;return n.data=zi(r,t),n.attachments=t.length,{packet:n,buffers:t}}function zi(e,t){if(!e)return e;if(Ui(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=zi(e[n],t);return r}if("object"==typeof e&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=zi(e[n],t));return r}return e}function $i(e,t){return e.data=Wi(e.data,t),delete e.attachments,e}function Wi(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=Wi(e[r],t);else if("object"==typeof e)for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=Wi(e[r],t));return e}const Hi=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Vi=5;var Gi;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(Gi||(Gi={}));class Ki{constructor(e){this.replacer=e}encode(e){return e.type!==Gi.EVENT&&e.type!==Gi.ACK||!Di(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===Gi.EVENT?Gi.BINARY_EVENT:Gi.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==Gi.BINARY_EVENT&&e.type!==Gi.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=qi(e),r=this.encodeAsString(t.packet),n=t.buffers;return n.unshift(r),n}}function Ji(e){return"[object Object]"===Object.prototype.toString.call(e)}class Yi extends ni{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const r=t.type===Gi.BINARY_EVENT;r||t.type===Gi.BINARY_ACK?(t.type=r?Gi.EVENT:Gi.ACK,this.reconstructor=new Xi(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!Ui(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const r={type:Number(e.charAt(0))};if(void 0===Gi[r.type])throw new Error("unknown packet type "+r.type);if(r.type===Gi.BINARY_EVENT||r.type===Gi.BINARY_ACK){const n=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(n,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");r.attachments=Number(i)}if("/"===e.charAt(t+1)){const n=t+1;for(;++t&&","!==e.charAt(t)&&t!==e.length;);r.nsp=e.substring(n,t)}else r.nsp="/";const n=e.charAt(t+1);if(""!==n&&Number(n)==n){const n=t+1;for(;++t;){const r=e.charAt(t);if(null==r||Number(r)!=r){--t;break}if(t===e.length)break}r.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){const n=this.tryParse(e.substr(t));if(!Yi.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case Gi.CONNECT:return Ji(t);case Gi.DISCONNECT:return void 0===t;case Gi.CONNECT_ERROR:return"string"==typeof t||Ji(t);case Gi.EVENT:case Gi.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===Hi.indexOf(t[0]));case Gi.ACK:case Gi.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Xi{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=$i(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Zi(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const Qi=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class eo extends ni{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Zi(e,"open",this.onopen.bind(this)),Zi(e,"packet",this.onpacket.bind(this)),Zi(e,"error",this.onerror.bind(this)),Zi(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(Qi.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const r={type:Gi.EVENT,data:t,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,n=t.pop();this._registerAckCallback(e,n),r.id=e}const n=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!n||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,t){var r;const n=null!==(r=this.flags.timeout)&&void 0!==r?r:this._opts.ackTimeout;if(void 0===n)return void(this.acks[e]=t);const i=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),n),o=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,e)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise(((r,n)=>{const i=(e,t)=>e?n(e):r(t);i.withError=!0,t.push(i),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...n)=>{if(r===this._queue[0])return null!==e?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...n)),r.pending=!1,this._drainQueue()})),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Gi.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((e=>{if(!this.sendBuffer.some((t=>String(t.id)===e))){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}}))}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Gi.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Gi.EVENT:case Gi.BINARY_EVENT:this.onevent(e);break;case Gi.ACK:case Gi.BINARY_ACK:this.onack(e);break;case Gi.DISCONNECT:this.ondisconnect();break;case Gi.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...n){r||(r=!0,t.packet({type:Gi.ACK,id:e,data:n}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Gi.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const r of t)r.apply(this,e.data)}}}function to(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}to.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+r:e-r}return 0|Math.min(e,this.max)},to.prototype.reset=function(){this.attempts=0},to.prototype.setMin=function(e){this.ms=e},to.prototype.setMax=function(e){this.max=e},to.prototype.setJitter=function(e){this.jitter=e};class ro extends ni{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(r=e,e=void 0),(r=r||{}).path=r.path||"/socket.io",this.opts=r,ci(this,r),this.reconnection(!1!==r.reconnection),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=r.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new to({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==r.timeout?2e4:r.timeout),this._readyState="closed",this.uri=e;const i=r.parser||t;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=!1!==r.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Ti(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=Zi(t,"open",(function(){r.onopen(),e&&e()})),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},o=Zi(t,"error",i);if(!1!==this._timeout){const e=this._timeout,r=this.setTimeoutFn((()=>{n(),i(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}return this.subs.push(n),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Zi(e,"ping",this.onping.bind(this)),Zi(e,"data",this.ondata.bind(this)),Zi(e,"error",this.onerror.bind(this)),Zi(e,"close",this.onclose.bind(this)),Zi(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){Ri((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new eo(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const e of t)if(this.nsps[e].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const no={};function io(e,t){"object"==typeof e&&(t=e,e=void 0);const r=function(e,t="",r){let n=e;r=r||"undefined"!=typeof location&&location,null==e&&(e=r.protocol+"//"+r.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?r.protocol+e:r.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==r?r.protocol+"//"+e:"https://"+e),n=Ni(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}(e,(t=t||{}).path||"/socket.io"),n=r.source,i=r.id,o=r.path,s=no[i]&&o in no[i].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||s?a=new ro(n,t):(no[i]||(no[i]=new ro(n,t)),a=no[i]),r.query&&!t.query&&(t.query=r.queryKey),a.socket(r.path,t)}Object.assign(io,{Manager:ro,Socket:eo,io,connect:io});var oo=r(2671),so=r.n(oo),ao=r(3360),co=r(1048).Buffer;const fo=new ao.ec("secp256k1"),uo=r.g.crypto||r.g.msCrypto||{},lo=uo.subtle||uo.webkitSubtle,ho=co.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),po=co.alloc(32,0);function bo(e,t){if(!e)throw new Error(t||"Assertion failed")}function go(e){return t=e,!(!co.isBuffer(t)||32!==t.length)&&e.compare(po)>0&&e.compare(ho)<0;var t}function yo(e){const t=new Uint8Array(e);return void 0===uo.getRandomValues?co.from(so().randomBytes(e)):(uo.getRandomValues(t),co.from(t))}async function mo(e){if(lo){const t=await lo.digest("SHA-512",e);return new Uint8Array(t)}const t=so().createHash("sha512").update(e).digest();return new Uint8Array(t)}function vo(e){return async function(t,r,n){if(lo){const i={name:"AES-CBC"},o=await lo.importKey("raw",r,i,!1,[e]),s={name:"AES-CBC",iv:t},a=await lo[e](s,o,n);return co.from(new Uint8Array(a))}if("encrypt"===e){const e=so().createCipheriv("aes-256-cbc",r,t),i=e.update(n),o=e.final();return co.concat([i,o])}if("decrypt"===e){const e=so().createDecipheriv("aes-256-cbc",r,t),i=e.update(n),o=e.final();return co.concat([i,o])}throw new Error(`Unsupported operation: ${e}`)}}const wo=vo("encrypt"),_o=vo("decrypt");async function So(e,t){if(lo){const r={name:"HMAC",hash:{name:"SHA-256"}},n=await lo.importKey("raw",new Uint8Array(e),r,!1,["sign","verify"]),i=await lo.sign("HMAC",n,t);return co.from(new Uint8Array(i))}const r=so().createHmac("sha256",co.from(e));return r.update(t),r.digest()}const Ao=function(e){return bo(32===e.length,"Bad private key"),bo(go(e),"Bad private key"),co.from(fo.keyFromPrivate(e).getPublic("array"))},Eo=async function(e,t){return bo(32===e.length,"Bad private key"),bo(go(e),"Bad private key"),bo(t.length>0,"Message should not be empty"),bo(t.length<=32,"Message is too long"),co.from(fo.sign(t,e,{canonical:!0}).toDER())},Mo=async function(e,t){bo(co.isBuffer(e),"Bad private key"),bo(co.isBuffer(t),"Bad public key"),bo(32===e.length,"Bad private key"),bo(go(e),"Bad private key"),bo(65===t.length||33===t.length,"Bad public key"),65===t.length&&bo(4===t[0],"Bad public key"),33===t.length&&bo(2===t[0]||3===t[0],"Bad public key");const r=fo.keyFromPrivate(e),n=fo.keyFromPublic(t),i=r.derive(n.getPublic());return co.from(i.toArray())},Ro=async function(e,t){bo(co.isBuffer(e),"Bad private key"),bo(co.isBuffer(t),"Bad public key"),bo(32===e.length,"Bad private key"),bo(go(e),"Bad private key"),bo(65===t.length||33===t.length,"Bad public key"),65===t.length&&bo(4===t[0],"Bad public key"),33===t.length&&bo(2===t[0]||3===t[0],"Bad public key");const r=fo.keyFromPrivate(e),n=fo.keyFromPublic(t),i=r.derive(n.getPublic());return co.from(i.toString(16,64),"hex")},Oo=async function(e,t,r){const n=null!=r&&r,i=n?Ro:Mo,o=await i(e,t.ephemPublicKey),s=await mo(o),a=s.slice(0,32),c=s.slice(32),f=co.concat([t.iv,t.ephemPublicKey,t.ciphertext]),u=await async function(e,t,r){return function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}(await So(e,t),r)}(co.from(c),f,t.mac);if(!u&&!1===n)return Oo(e,t,!0);if(!u&&!0===n)throw new Error("bad MAC after trying padded");const d=await _o(t.iv,co.from(a),t.ciphertext);return co.from(new Uint8Array(d))};r(5172);var xo=r(1048).Buffer;function Io(e){return xo.from(hn(e))}const Po=new ao.ec("secp256k1");async function ko(e,t){const r=JSON.stringify(t),n=xo.from(r,"utf-8"),i=(o=await async function(e,t,r){let n=(r=r||{}).ephemPrivateKey||yo(32);for(;!go(n);)n=r.ephemPrivateKey||yo(32);const i=Ao(n),o=await Mo(n,e),s=await mo(o),a=r.iv||yo(16),c=s.slice(0,32),f=s.slice(32),u=await wo(a,co.from(c),t),d=co.concat([a,i,u]);return{iv:a,ephemPublicKey:i,ciphertext:u,mac:await So(co.from(f),d)}}(Ao(xo.from(e,"hex")),n),{iv:xo.from(o.iv).toString("hex"),ephemPublicKey:xo.from(o.ephemPublicKey).toString("hex"),ciphertext:xo.from(o.ciphertext).toString("hex"),mac:xo.from(o.mac).toString("hex")});var o;return JSON.stringify(i)}async function No(e,t){const r=(o=JSON.parse(t),{iv:xo.from(o.iv,"hex"),ephemPublicKey:xo.from(o.ephemPublicKey,"hex"),ciphertext:xo.from(o.ciphertext,"hex"),mac:xo.from(o.mac,"hex")}),n=Po.keyFromPrivate(e),i=(await Oo(xo.from(n.getPrivate().toString("hex",64),"hex"),r)).toString("utf-8");var o;return JSON.parse(i)}var To=r(1048).Buffer;Promise.resolve(!1),Promise.resolve(!0);const Co=Promise.resolve();function Bo(e,t){return e||(e=0),new Promise((r=>setTimeout((()=>r(t)),e)))}function Lo(){return Math.random().toString(36).substring(2)}let jo=0;function Fo(){let e=1e3*Date.now();return e<=jo&&(e=jo+1),jo=e,e}const Uo=ze().getLogger("broadcast-channel");Uo.setLevel("error");var Do={create:function(e){const t={time:Fo(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=e=>{t.messagesCallback&&t.messagesCallback(e.data)},t},close:function(e){e.bc.close(),e.subFns=[]},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){try{return e.bc.postMessage(t,!1),Co}catch(e){return Promise.reject(e)}},canBeUsed:function(){if("undefined"==typeof window)return!1;if("function"==typeof BroadcastChannel){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}return!1},type:"native",averageResponseTime:function(){return 150},microSeconds:Fo};function qo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=JSON.parse(JSON.stringify(e));return void 0===t.webWorkerSupport&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=45e3),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&"function"==typeof e.idb.onclose&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=6e4),t.server||(t.server={}),t.server.url||(t.server.url="https://session.web3auth.io"),t.server.removeTimeout||(t.server.removeTimeout=3e5),e.methods&&(t.methods=e.methods),t}const zo="messages",$o={durability:"relaxed"};function Wo(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function Ho(e){e.commit&&e.commit()}function Vo(e){const t="pubkey.broadcast-channel-0-"+e,r=Wo().open(t);return r.onupgradeneeded=e=>{e.target.result.createObjectStore(zo,{keyPath:"id",autoIncrement:!0})},new Promise(((e,t)=>{r.onerror=e=>t(e),r.onsuccess=()=>{e(r.result)}}))}function Go(e,t,r){const n={uuid:t,time:Date.now(),data:r},i=e.transaction([zo],"readwrite",$o);return new Promise(((e,t)=>{i.oncomplete=()=>e(),i.onerror=e=>t(e),i.objectStore(zo).add(n),Ho(i)}))}function Ko(e,t){const r=e.transaction(zo,"readonly",$o),n=r.objectStore(zo),i=[];let o=IDBKeyRange.bound(t+1,1/0);if(n.getAll){const e=n.getAll(o);return new Promise(((t,r)=>{e.onerror=e=>r(e),e.onsuccess=function(e){t(e.target.result)}}))}return new Promise(((e,s)=>{const a=function(){try{return o=IDBKeyRange.bound(t+1,1/0),n.openCursor(o)}catch(e){return n.openCursor()}}();a.onerror=e=>s(e),a.onsuccess=n=>{const o=n.target.result;o?o.value.id<t+1?o.continue(t+1):(i.push(o.value),o.continue()):(Ho(r),e(i))}}))}function Jo(e,t){const r=Date.now()-t,n=e.transaction(zo,"readonly",$o),i=n.objectStore(zo),o=[];return new Promise((e=>{i.openCursor().onsuccess=t=>{const i=t.target.result;if(i){const t=i.value;if(!(t.time<r))return Ho(n),void e(o);o.push(t),i.continue()}else e(o)}}))}function Yo(e,t){return Jo(e,t).then((t=>function(e,t){const r=e.transaction([zo],"readwrite",$o).objectStore(zo);return Promise.all(t.map((e=>{const t=r.delete(e);return new Promise((e=>{t.onsuccess=()=>e()}))})))}(e,t.map((e=>e.id)))))}function Xo(e){e.closed||Zo(e).then((()=>Bo(e.options.idb.fallbackInterval))).then((()=>Xo(e)))}function Zo(e){return e.closed?Co:e.messagesCallback?Ko(e.db,e.lastCursorId).then((t=>{const r=t.filter((e=>!!e)).map((t=>(t.id>e.lastCursorId&&(e.lastCursorId=t.id),t))).filter((t=>function(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}(t,e))).sort(((e,t)=>e.time-t.time));return r.forEach((t=>{e.messagesCallback&&(e.eMIs.add(t.id),e.messagesCallback(t.data))})),Co})):Co}var Qo={getIdb:Wo,createDatabase:Vo,create:function(e,t){return t=qo(t),Vo(e).then((r=>{const n={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:Lo(),eMIs:new Ln(2*t.idb.ttl),writeBlockPromise:Co,messagesCallback:null,readQueuePromises:[],db:r,time:Fo()};return r.onclose=function(){n.closed=!0,t.idb.onclose&&t.idb.onclose()},Xo(n),n}))},close:function(e){e.closed=!0,e.db.close()},onMessage:function(e,t,r){e.messagesCallbackTime=r,e.messagesCallback=t,Zo(e)},postMessage:function(e,t){return e.writeBlockPromise=e.writeBlockPromise.then((()=>Go(e.db,e.uuid,t))).then((()=>{0===Math.floor(11*Math.random()+0)&&Yo(e.db,e.options.idb.ttl)})),e.writeBlockPromise},canBeUsed:function(){return!!Wo()},type:"idb",averageResponseTime:function(e){return 2*e.idb.fallbackInterval},microSeconds:Fo,writeMessage:Go,getAllMessages:function(e){const t=e.transaction(zo,"readonly",$o),r=t.objectStore(zo),n=[];return new Promise((e=>{r.openCursor().onsuccess=r=>{const i=r.target.result;i?(n.push(i.value),i.continue()):(Ho(t),e(n))}}))},cleanOldMessages:Yo,getMessagesHigherThan:Ko,getOldMessages:Jo};const es="pubkey.broadcastChannel-";function ts(){let e;if("undefined"==typeof window)return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch(e){}return e}function rs(e){return es+e}function ns(e,t){const r=rs(e),n=e=>{e.key===r&&t(JSON.parse(e.newValue))};return window.addEventListener("storage",n),n}function is(e){window.removeEventListener("storage",e)}function os(){const e=ts();if(!e)return!1;try{const t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch(e){return!1}return!0}var ss={getLocalStorage:ts,create:function(e,t){if(t=qo(t),!os())throw new Error("BroadcastChannel: localstorage cannot be used");const r=Lo(),n=new Ln(t.localstorage.removeTimeout),i={channelName:e,uuid:r,time:Fo(),eMIs:n};return i.listener=ns(e,(e=>{i.messagesCallback&&e.uuid!==r&&e.token&&!n.has(e.token)&&(e.data.time&&e.data.time<i.messagesCallbackTime||(n.add(e.token),i.messagesCallback(e.data)))})),i},close:function(e){is(e.listener)},onMessage:function(e,t,r){e.messagesCallbackTime=r,e.messagesCallback=t},postMessage:function(e,t){return new Promise((r=>{Bo().then((()=>{const n=rs(e.channelName),i={token:Lo(),time:Date.now(),data:t,uuid:e.uuid},o=JSON.stringify(i);ts().setItem(n,o);const s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=n,s.newValue=o,window.dispatchEvent(s),r()}))}))},canBeUsed:os,type:"localstorage",averageResponseTime:function(){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?240:120},microSeconds:Fo,storageKey:rs,addStorageEventListener:ns,removeStorageEventListener:is};const as=Fo,cs="pubkey.broadcastChannel-";let fs=null;const us=new Set;function ds(e){return cs+e}var ls={create:function(e,t){t=qo(t);const r={channelName:e,uuid:Lo(),eMIs:new Ln(t.server.removeTimeout),serverUrl:t.server.url,time:Fo()};return t.server.timeout&&(r.timeout=t.server.timeout),function(e,t,r){const n=function(e){if(fs)return fs;const t=io(e,{transports:["websocket","polling"],withCredentials:!0,reconnectionDelayMax:1e4,reconnectionAttempts:10});return t.on("connect_error",(e=>{t.io.opts.transports=["polling","websocket"],Uo.error("connect error",e)})),t.on("connect",(async()=>{const{engine:e}=t.io;Uo.debug("initially connected to",e.transport.name),e.once("upgrade",(()=>{Uo.debug("upgraded",e.transport.name)})),e.once("close",(e=>{Uo.debug("connection closed",e)}))})),t.on("error",(e=>{Uo.error("socket errored",e),t.disconnect()})),fs=t,t}(e),i=ds(t.channelName),o=Io(To.from(i,"utf8")),s=Ao(o).toString("hex");n.connected?n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0}):n.once("connect",(()=>{Uo.debug("connected with socket"),n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0})}));const a=()=>{n.once("connect",(async()=>{us.has(t.channelName)&&n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0})}))},c=()=>{n&&us.has(t.channelName)?n.connected||"visible"!==document.visibilityState||a():document.removeEventListener("visibilitychange",c)};n.on("disconnect",(()=>{Uo.debug("socket disconnected"),us.has(t.channelName)&&(Uo.error("socket disconnected unexpectedly, reconnecting socket"),a())})),n.on(`${s}_success`,(async e=>{try{const t=await No(o.toString("hex"),e);Uo.info(t),r(t)}catch(e){Uo.error(e)}})),"undefined"!=typeof document&&document.addEventListener("visibilitychange",c)}(t.server.url,r,(e=>{r.messagesCallback&&e.uuid!==r.uuid&&e.token&&!r.eMIs.has(e.token)&&(r.eMIs.add(e.token),r.messagesCallback(e.data))})),us.add(e),r},close:function(e){us.delete(e.channelName)},onMessage:function(e,t,r){e.messagesCallbackTime=r,e.messagesCallback=t},postMessage:function(e,t){return new Promise(((r,n)=>{Bo().then((async()=>{const i=ds(e.channelName),o=Io(To.from(i,"utf8")),s=await ko(o.toString("hex"),{token:Lo(),time:Date.now(),data:t,uuid:e.uuid}),a={sameOriginCheck:!0,sameIpCheck:!0,key:Ao(o).toString("hex"),data:s,signature:(await Eo(o,Io(To.from(s,"utf8")))).toString("hex")};return e.timeout&&(a.timeout=e.timeout),fetch(e.serverUrl+"/channel/set",{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json; charset=utf-8"}}).then(r).catch(n)}))}))},canBeUsed:function(){return!0},type:"server",averageResponseTime:function(){return 500},microSeconds:as};const hs=Fo,ps=new Set;var bs={create:function(e){const t={time:Fo(),name:e,messagesCallback:null};return ps.add(t),t},close:function(e){ps.delete(e)},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){return new Promise((r=>setTimeout((()=>{Array.from(ps).forEach((r=>{r.name===e.name&&r!==e&&r.messagesCallback&&r.time<t.time&&r.messagesCallback(t)})),r()}),5)))},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:hs};const gs=[Do,Qo,ss,ls],ys=new Set;let ms=0;const vs=function(e,t){this.id=ms++,ys.add(this),this.name=e,this.options=qo(t),this.method=function(e){let t=[].concat(e.methods,gs).filter(Boolean);if(e.type){if("simulate"===e.type)return bs;const r=t.find((t=>t.type===e.type));if(r)return r;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter((e=>"idb"!==e.type)));const r=t.find((t=>t.canBeUsed(e)));if(r)return r;throw new Error(`No useable method found in ${JSON.stringify(gs.map((e=>e.type)))}`)}(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,function(e){const t=e.method.create(e.name,e.options);var r;(r=t)&&"function"==typeof r.then?(e._prepP=t,t.then((t=>{e._state=t}))):e._state=t}(this)};function ws(e,t,r){const n={time:e.method.microSeconds(),type:t,data:r};return(e._prepP?e._prepP:Co).then((()=>{const t=e.method.postMessage(e._state,n);return e._uMP.add(t),t.catch().then((()=>e._uMP.delete(t))),t}))}function _s(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function Ss(e,t,r){e._addEL[t].push(r),function(e){if(!e._iL&&_s(e)){const t=t=>{e._addEL[t.type].forEach((r=>{(t.time>=r.time||"server"===e.method.type)&&r.fn(t.data)}))},r=e.method.microSeconds();e._prepP?e._prepP.then((()=>{e._iL=!0,e.method.onMessage(e._state,t,r)})):(e._iL=!0,e.method.onMessage(e._state,t,r))}}(e)}function As(e,t,r){e._addEL[t]=e._addEL[t].filter((e=>e!==r)),function(e){if(e._iL&&!_s(e)){e._iL=!1;const t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}(e)}vs._pubkey=!0,vs.prototype={postMessage(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return ws(this,"message",e)},postInternal(e){return ws(this,"internal",e)},set onmessage(e){const t={time:this.method.microSeconds(),fn:e};As(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,Ss(this,"message",t)):this._onML=null},addEventListener(e,t){Ss(this,e,{time:this.method.microSeconds(),fn:t})},removeEventListener(e,t){As(this,e,this._addEL[e].find((e=>e.fn===t)))},close(){if(this.closed)return;ys.delete(this),this.closed=!0;const e=this._prepP?this._prepP:Co;return this._onML=null,this._addEL.message=[],e.then((()=>Promise.all(Array.from(this._uMP)))).then((()=>Promise.all(this._befC.map((e=>e()))))).then((()=>this.method.close(this._state)))},get type(){return this.method.type},get isClosed(){return this.closed}},r(3643),r(1048).Buffer;class Es extends we{constructor({config:e={},state:t={}}){super(),o(this,"defaultConfig",{}),o(this,"defaultState",{}),o(this,"disabled",!1),o(this,"name","BaseController"),o(this,"initialConfig",void 0),o(this,"initialState",void 0),o(this,"internalConfig",this.defaultConfig),o(this,"internalState",this.defaultState),this.initialState=t,this.initialConfig=e}get config(){return this.internalConfig}get state(){return this.internalState}configure(e,t=!1,r=!0){if(r){this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e in this.internalConfig)void 0!==this.internalConfig[e]&&(this[e]=this.internalConfig[e])}else for(const t in e)void 0!==this.internalConfig[t]&&(this.internalConfig[t]=e[t],this[t]=e[t])}update(e,t=!1){this.internalState=a(t?{}:a({},this.internalState),e),this.emit("store",this.internalState)}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}}const Ms=()=>!0,Rs=["newListener","removeListener"],Os=e=>!Rs.includes(e);function xs(e,t){let r=(t||{}).eventFilter||Ms;if("string"==typeof r&&"skipInternal"===r&&(r=Os),"function"!=typeof r)throw new Error("createEventEmitterProxy - Invalid eventFilter");let n=e,i=e=>{const t=n;n=e,t.eventNames().filter(r).forEach((r=>{(function(e,t){return void 0!==e.rawListeners?e.rawListeners(t):e.listeners(t)})(t,r).forEach((t=>{e.on(r,t)}))})),t.removeAllListeners()};const o=new Proxy({},{get:(e,t)=>"setTarget"===t?i:n[t],set:(e,t,r)=>"setTarget"===t?(i=r,!0):(n[t]=r,!0)});return o}Error;const Is=["Gateway timeout","ETIMEDOUT","failed to parse response body","Failed to fetch"];function Ps(e){switch(e.status){case 405:throw ye.methodNotFound();case 418:throw ye.internal({message:"Request is being rate limited.",data:{cause:e}});case 503:case 504:throw ye.internal({message:"Gateway timeout. The request took too long to process.This can happen when querying over too wide a block range."})}}function ks(e){return new Promise((t=>{setTimeout(t,e)}))}function Ns(e,t){if(200!==e.status)throw ye.internal({message:`Non-200 status code: '${e.status}'`,data:t});if(t.error)throw ye.internal({data:t.error});return t.result}var Ts,Cs,Bs=r(6512),Ls=r.n(Bs);class js extends Es{constructor({config:e,state:t}){if(super({config:e,state:t}),o(this,"_providerEngineProxy",null),!e.chainConfig)throw Ke.invalidProviderConfigError("Please provide chainConfig");if(!e.chainConfig.chainId)throw Ke.invalidProviderConfigError("Please provide chainId inside chainConfig");if(!e.chainConfig.rpcTarget)throw Ke.invalidProviderConfigError("Please provide rpcTarget inside chainConfig");this.defaultState={chainId:"loading"},this.defaultConfig={chainConfig:e.chainConfig,networks:{[e.chainConfig.chainId]:e.chainConfig}},super.initialize()}get currentChainConfig(){return this.config.chainConfig}get provider(){return this._providerEngineProxy}get chainId(){return this.state.chainId}set provider(e){throw new Error("Method not implemented.")}async request(e){var t;if(!e||"object"!=typeof e||Array.isArray(e))throw ye.invalidRequest({message:Xe.invalidRequestArgs().message,data:a(a({},e||{}),{},{cause:Xe.invalidRequestArgs().message})});const{method:r,params:n}=e;if("string"!=typeof r||0===r.length)throw ye.invalidRequest({message:Xe.invalidRequestMethod().message,data:a(a({},e||{}),{},{cause:Xe.invalidRequestMethod().message})});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw ye.invalidRequest({message:Xe.invalidRequestParams().message,data:a(a({},e||{}),{},{cause:Xe.invalidRequestParams().message})});return null===(t=this.provider)||void 0===t?void 0:t.request(e)}sendAsync(e,t){return t?this.send(e,t):this.request(e)}send(e,t){this.request(e).then((e=>t(null,{result:e}))).catch((e=>t(e,null)))}addChain(e){if(!e.chainId)throw ye.invalidParams("chainId is required");if(!e.rpcTarget)throw ye.invalidParams("chainId is required");this.configure({networks:a(a({},this.config.networks),{},{[e.chainId]:e})})}getChainConfig(e){var t;const r=null===(t=this.config.networks)||void 0===t?void 0:t[e];if(!r)throw ye.invalidRequest(`Chain ${e} is not supported, please add chainConfig for it`);return r}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=xs(e)}getProviderEngineProxy(){return this._providerEngineProxy}}function Fs(e){return(t,r,n,i)=>"chainId"===t.method?(r.result=e,i()):n()}function Us(e){return(t,r,n,i)=>"provider_config"===t.method?(r.result=e,i()):n()}class Ds extends js{constructor({config:e,state:t}){super({config:e,state:t})}async setupProvider(){const{networkMiddleware:e}=function(e){const{chainId:t,rpcTarget:r}=e,n=function({rpcTarget:e,originHttpHeaderKey:t}){return Se((async(r,n,i)=>{const{fetchUrl:o,fetchParams:s}=function({req:e,rpcTarget:t,originHttpHeaderKey:r}){const n=new URL(t),i={id:e.id,jsonrpc:e.jsonrpc,method:e.method,params:e.params},o=e.origin,s={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)};return r&&o&&(s.headers[r]=o),{fetchUrl:n.href,fetchParams:s}}({req:r,rpcTarget:e,originHttpHeaderKey:t});for(let e=0;e<5;e++){try{const e=await fetch(o,s);Ps(e);const t=await e.json(),r=Ns(e,t);return void(n.result=r)}catch(e){const t=(e.message||e).toString();if(!Is.some((e=>t.includes(e))))throw e}await ks(1e3)}}))}({rpcTarget:r});return{networkMiddleware:Ee([Fs(t),Us(e),n]),fetchMiddleware:n}}(this.config.chainConfig),t=new Ae;t.push(e);const r=Me(t);this.updateProviderEngineProxy(r);const n=this.config.chainConfig.chainId;this.state.chainId!==n&&(this.emit("chainChanged",n),this.emit("connect",{chainId:n})),this.update({chainId:this.config.chainConfig.chainId})}async switchChain(e){if(!this._providerEngineProxy)throw(e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new be(t,r,n)})({message:"Provider is not initialized",code:4902});const t=this.getChainConfig(e.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:t}),await this.setupProvider()}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=xs(e)}getProviderEngineProxy(){return this._providerEngineProxy}lookupNetwork(){throw new Error("Method not implemented.")}}Ts=Ds,o(Ds,"getProviderInstance",(async e=>{const t=new Ts({config:{chainConfig:e.chainConfig}});return await t.setupProvider(),t}));class qs extends js{constructor({config:e,state:t}){super({config:e,state:t}),o(this,"_providerEngineProxy",null)}get provider(){return this._providerEngineProxy}set provider(e){throw new Error("Method not implemented.")}addChain(e){throw new Error("Method not implemented.")}async setupProvider(e){const t=this.getPrivKeyMiddleware(e),r=new Ae;r.push(t);const n=Me(r);this.updateProviderEngineProxy(n)}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=xs(e)}async switchChain(e){return Promise.resolve()}getProviderEngineProxy(){return this._providerEngineProxy}async lookupNetwork(){return Promise.resolve("")}getPrivKeyMiddleware(e){const t={getPrivatekey:async()=>e};return this.createPrivKeyMiddleware(t)}createPrivKeyMiddleware({getPrivatekey:e}){return t={private_key:Se((async function(t,r){r.result=await e()}))},(e,r,n,i)=>{const o=t[e.method];return void 0===o?n():"function"==typeof o?o(e,r,n,i):(r.result=o,i())};var t}}Cs=qs,o(qs,"getProviderInstance",(async e=>{const t=new Cs({config:{chainConfig:e.chainConfig}});return await t.setupProvider(e.privKey),t})),Ls()(),r(1048).Buffer,r(1048).Buffer,ze().getLogger("SecurePubSub"),r(1048).Buffer;class zs extends je{constructor(e,t){super(t),o(this,"code",void 0),o(this,"message",void 0),this.code=e,this.message=t||"",Object.defineProperty(this,"name",{value:"OpenloginError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class $s extends zs{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"InitializationError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new $s(e,`${$s.messages[e]}, ${t}`)}static invalidParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return $s.fromCode(5001,e)}static notInitialized(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return $s.fromCode(5002,e)}}o($s,"messages",{5e3:"Custom",5001:"Invalid constructor params",5002:"SDK not initialized. please call init first"});class Ws extends zs{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"LoginError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Ws(e,`${Ws.messages[e]}, ${t}`)}static invalidLoginParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ws.fromCode(5111,e)}static userNotLoggedIn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ws.fromCode(5112,e)}static popupClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ws.fromCode(5113,e)}static loginFailed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ws.fromCode(5114,e)}static popupBlocked(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ws.fromCode(5115,e)}static mfaAlreadyEnabled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ws.fromCode(5116,e)}static mfaNotEnabled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ws.fromCode(5117,e)}}o(Ws,"messages",{5e3:"Custom",5111:"Invalid login params",5112:"User not logged in.",5113:"login popup has been closed by the user",5114:"Login failed",5115:"Popup was blocked. Please call this function as soon as user clicks button or use redirect mode",5116:"MFA already enabled",5117:"MFA not yet enabled. Please call `enableMFA` first"});(0,qe.getLogger)("openlogin").setLevel("error"),f.EventEmitter;var Hs=r(8290),Vs=r.n(Hs);const Gs="Web3Auth-cachedAdapter";class Ks extends we{constructor(e){var t,r,n,i;if(super(),o(this,"coreOptions",void 0),o(this,"connectedAdapterName",null),o(this,"status",st.NOT_READY),o(this,"cachedAdapter",null),o(this,"walletAdapters",{}),o(this,"commonJRPCProvider",null),o(this,"plugins",{}),o(this,"storage","localStorage"),!e.clientId)throw Ke.invalidParams("Please provide a valid clientId in constructor");if(e.enableLogging?ft.enableAll():ft.setLevel("error"),!e.privateKeyProvider&&!e.chainConfig)throw Ke.invalidParams("Please provide chainConfig or privateKeyProvider");if(e.chainConfig=e.chainConfig||e.privateKeyProvider.currentChainConfig,null===(t=e.chainConfig)||void 0===t||!t.chainNamespace||!Object.values(Ze).includes(null===(r=e.chainConfig)||void 0===r?void 0:r.chainNamespace))throw Ke.invalidParams("Please provide a valid chainNamespace in chainConfig");"session"===e.storageKey&&(this.storage="sessionStorage"),this.cachedAdapter=ct(this.storage)?window[this.storage].getItem(Gs):null,this.coreOptions=a(a({},e),{},{chainConfig:a(a({},et(null===(n=e.chainConfig)||void 0===n?void 0:n.chainNamespace,null===(i=e.chainConfig)||void 0===i?void 0:i.chainId)||{}),e.chainConfig)}),this.subscribeToAdapterEvents=this.subscribeToAdapterEvents.bind(this)}get connected(){return Boolean(this.connectedAdapterName)}get provider(){return this.status!==st.NOT_READY&&this.commonJRPCProvider?this.commonJRPCProvider:null}set provider(e){throw new Error("Not implemented")}async init(){let e;this.commonJRPCProvider=await Ds.getProviderInstance({chainConfig:this.coreOptions.chainConfig});try{e=await(async(e,t)=>{const r=new URL(`${(e=>Pe[null!=e?e:ot.SAPPHIRE_MAINNET])(t)}/api/configuration`);return r.searchParams.append("project_id",e),r.searchParams.append("network",t),r.searchParams.append("whitelist","true"),await He(r.href)})(this.coreOptions.clientId,this.coreOptions.web3AuthNetwork)}catch(e){throw ft.error("Failed to fetch project configurations",e),Ke.notReady("failed to fetch project configurations",e)}const t=Object.keys(this.walletAdapters).map((async t=>{if(this.subscribeToAdapterEvents(this.walletAdapters[t]),this.walletAdapters[t].chainConfigProxy)this.walletAdapters[t].setAdapterSettings({sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey});else{const e=this.coreOptions.chainConfig;if(!e.chainNamespace)throw Ke.invalidParams("Please provide chainNamespace in chainConfig");this.walletAdapters[t].setAdapterSettings({chainConfig:e,sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey})}if(t===it.OPENLOGIN){const r=this.walletAdapters[t],{whitelabel:n}=e;this.coreOptions.uiConfig=De()(Vs()(n),this.coreOptions.uiConfig),this.coreOptions.uiConfig.mode||(this.coreOptions.uiConfig.mode="light");const{sms_otp_enabled:i,whitelist:o}=e;if(void 0!==i&&r.setAdapterSettings({loginConfig:{[Ce]:{showOnModal:i,showOnDesktop:i,showOnMobile:i,showOnSocialBackupFactor:i}}}),o&&r.setAdapterSettings({originData:o.signed_urls}),this.coreOptions.privateKeyProvider){if(r.currentChainNamespace!==this.coreOptions.privateKeyProvider.currentChainConfig.chainNamespace)throw Ke.incompatibleChainNameSpace("private key provider is not compatible with provided chainNamespace for openlogin adapter");r.setAdapterSettings({privateKeyProvider:this.coreOptions.privateKeyProvider})}if(r.setAdapterSettings({whiteLabel:this.coreOptions.uiConfig}),!r.privateKeyProvider)throw Ke.invalidParams("privateKeyProvider is required for openlogin adapter")}else if(t===it.WALLET_CONNECT_V2){const r=this.walletAdapters[t],{wallet_connect_enabled:n,wallet_connect_project_id:i}=e;if(!1===n)throw Ke.invalidParams("Please enable wallet connect v2 addon on dashboard");if(!i)throw Ke.invalidParams("Invalid wallet connect project id. Please configure it on the dashboard");r.setAdapterSettings({adapterSettings:{walletConnectInitOptions:{projectId:i}}})}return this.walletAdapters[t].init({autoConnect:this.cachedAdapter===t}).catch((e=>ft.error(e,t)))}));await Promise.all(t),this.status===st.NOT_READY&&(this.status=st.READY,this.emit(at.READY))}getAdapter(e){return this.walletAdapters[e]||null}configureAdapter(e){this.checkInitRequirements();const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw Ke.invalidParams("Please provide chainNamespace in chainConfig");if(this.walletAdapters[e.name])throw Ke.duplicateAdapterError(`Wallet adapter for ${e.name} already exists`);if(e.adapterNamespace!==Qe&&e.adapterNamespace!==t.chainNamespace)throw Ke.incompatibleChainNameSpace(`This wallet adapter belongs to ${e.adapterNamespace} which is incompatible with currently used namespace: ${t.chainNamespace}`);return e.adapterNamespace===Qe&&e.currentChainNamespace&&t.chainNamespace!==e.currentChainNamespace&&e.setAdapterSettings({chainConfig:t}),this.walletAdapters[e.name]=e,this}clearCache(){ct(this.storage)&&(window[this.storage].removeItem(Gs),this.cachedAdapter=null)}async addChain(e){if(this.status===st.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].addChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.addChain(e);throw Ke.notReady("No wallet is ready")}async switchChain(e){if(this.status===st.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].switchChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.switchChain(e);throw Ke.notReady("No wallet is ready")}async connectTo(e,t){if(!this.walletAdapters[e]||!this.commonJRPCProvider)throw Ke.notFound(`Please add wallet adapter for ${e} wallet, before connecting`);const r=await this.walletAdapters[e].connect(t);return this.commonJRPCProvider.updateProviderEngineProxy(r.provider||r),this.provider}async logout(e={cleanup:!1}){if(this.status!==st.CONNECTED||!this.connectedAdapterName)throw Je.notConnectedError("No wallet is connected");await this.walletAdapters[this.connectedAdapterName].disconnect(e)}async getUserInfo(){if(ft.debug("Getting user info",this.status,this.connectedAdapterName),this.status!==st.CONNECTED||!this.connectedAdapterName)throw Je.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].getUserInfo()}async enableMFA(e){if(this.status!==st.CONNECTED||!this.connectedAdapterName)throw Je.notConnectedError("No wallet is connected");if(this.connectedAdapterName!==it.OPENLOGIN)throw Je.unsupportedOperation("EnableMFA is not supported for this adapter.");return this.walletAdapters[this.connectedAdapterName].enableMFA(e)}async authenticateUser(){if(this.status!==st.CONNECTED||!this.connectedAdapterName)throw Je.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].authenticateUser()}addPlugin(e){if(this.plugins[e.name])throw Ke.duplicateAdapterError(`Plugin ${e.name} already exist`);if(e.pluginNamespace!==dt.MULTICHAIN&&e.pluginNamespace!==this.coreOptions.chainConfig.chainNamespace)throw Ke.incompatibleChainNameSpace(`This plugin belongs to ${e.pluginNamespace} namespace which is incompatible with currently used namespace: ${this.coreOptions.chainConfig.chainNamespace}`);return this.plugins[e.name]=e,this.status===st.CONNECTED&&this.connectedAdapterName&&this.connectToPlugins({adapter:this.connectedAdapterName}),this}getPlugin(e){return this.plugins[e]||null}subscribeToAdapterEvents(e){e.on(at.CONNECTED,(async e=>{if(!this.commonJRPCProvider)throw Ke.notFound("CommonJrpcProvider not found");const{provider:t}=e;this.commonJRPCProvider.updateProviderEngineProxy(t.provider||t),this.status=st.CONNECTED,this.connectedAdapterName=e.adapter,this.cacheWallet(e.adapter),ft.debug("connected",this.status,this.connectedAdapterName),this.connectToPlugins(e),this.emit(at.CONNECTED,a({},e))})),e.on(at.DISCONNECTED,(async e=>{if(this.status=st.READY,ct(this.storage)){const e=window[this.storage].getItem(Gs);this.connectedAdapterName===e&&this.clearCache()}ft.debug("disconnected",this.status,this.connectedAdapterName),await Promise.all(Object.values(this.plugins).map((e=>e.disconnect().catch((e=>{5211!==e.code&&ft.error(e)}))))),this.connectedAdapterName=null,this.emit(at.DISCONNECTED,e)})),e.on(at.CONNECTING,(e=>{this.status=st.CONNECTING,this.emit(at.CONNECTING,e),ft.debug("connecting",this.status,this.connectedAdapterName)})),e.on(at.ERRORED,(e=>{this.status=st.ERRORED,this.clearCache(),this.emit(at.ERRORED,e),ft.debug("errored",this.status,this.connectedAdapterName)})),e.on(at.ADAPTER_DATA_UPDATED,(e=>{ft.debug("adapter data updated",e),this.emit(at.ADAPTER_DATA_UPDATED,e)})),e.on(at.CACHE_CLEAR,(e=>{ft.debug("adapter cache clear",e),ct(this.storage)&&this.clearCache()}))}checkInitRequirements(){if(this.status===st.CONNECTING)throw Ke.notReady("Already pending connection");if(this.status===st.CONNECTED)throw Ke.notReady("Already connected");if(this.status===st.READY)throw Ke.notReady("Adapter is already initialized")}cacheWallet(e){ct(this.storage)&&(window[this.storage].setItem(Gs,e),this.cachedAdapter=e)}connectToPlugins(e){Object.values(this.plugins).map((async t=>{try{if(!t.SUPPORTED_ADAPTERS.includes(e.adapter))return;if(t.status===lt.CONNECTED)return;const{openloginInstance:r}=this.walletAdapters[this.connectedAdapterName],{options:n,sessionId:i,sessionNamespace:o}=r||{};await t.initWithWeb3Auth(this,n.whiteLabel),await t.connect({sessionId:i,sessionNamespace:o})}catch(e){if(5211===e.code)return;ft.error(e)}}))}}})(),n})()));
|