zigap-utils 0.0.2 → 0.0.21

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/README.md CHANGED
@@ -52,12 +52,11 @@ const App = () => {
52
52
 
53
53
  ### `AddressProvideQR` props
54
54
 
55
- | prop | required | type | default value | description |
56
- | ------------ | :------: | --------------- | ------------- | -------------------------------------------------- |
57
- | `sigMessage` | true | string | | Messages signed to verify the identity of the user |
58
- | `validTime` | true | number | | QR code valid time(minutes) |
59
- | `onReceive` | true | (value) => void | | Function called after login request |
60
- | `size` | false | number | 128 | canvas width |
61
- | `bgColor` | false | string | #fff | background color |
62
- | `fgColor` | false | string | #000 | foreground color |
63
- | `style` | false | CSSProperties | | custom css style |
55
+ | prop | required | type | default value | description |
56
+ | ----------- | :------: | --------------- | ------------- | ----------------------------------- |
57
+ | `validTime` | true | number | | QR code valid time(minutes) |
58
+ | `onReceive` | true | (value) => void | | Function called after login request |
59
+ | `size` | false | number | 128 | canvas width |
60
+ | `bgColor` | false | string | #fff | background color |
61
+ | `fgColor` | false | string | #000 | foreground color |
62
+ | `style` | false | CSSProperties | | custom css style |
package/dist/index.cjs.js CHANGED
@@ -53,4 +53,4 @@ React keys must be passed directly to JSX without using spread:
53
53
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(A){return A instanceof this?A:new this(A)}static concat(A,...N){const q=new this(A);return N.forEach(j=>q.set(j)),q}static accessor(A){const q=(this[pe]=this[pe]={accessors:{}}).accessors,j=this.prototype;function Q(te){const le=de(te);q[le]||(ke(j,te),q[le]=!0)}return re.isArray(A)?A.forEach(Q):Q(A),this}}Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(Oe.prototype,({value:m},A)=>{let N=A[0].toUpperCase()+A.slice(1);return{get:()=>m,set(q){this[N]=q}}}),re.freezeMethods(Oe);var Me=Oe;function De(m,A){const N=this||L,q=A||N,j=Me.from(q.headers);let Q=q.data;return re.forEach(m,function(le){Q=le.call(N,Q,j.normalize(),A?A.status:void 0)}),j.normalize(),Q}function we(m){return!!(m&&m.__CANCEL__)}function Be(m,A,N){Ae.call(this,m??"canceled",Ae.ERR_CANCELED,A,N),this.name="CanceledError"}re.inherits(Be,Ae,{__CANCEL__:!0});function ye(m,A,N){const q=N.config.validateStatus;!N.status||!q||q(N.status)?m(N):A(new Ae("Request failed with status code "+N.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(N.status/100)-4],N.config,N.request,N))}function Ce(m){const A=/^([-+\w]{1,25})(:?\/\/|:)/.exec(m);return A&&A[1]||""}function Re(m,A){m=m||10;const N=new Array(m),q=new Array(m);let j=0,Q=0,te;return A=A!==void 0?A:1e3,function(Te){const Pe=Date.now(),ve=q[Q];te||(te=Pe),N[j]=Te,q[j]=Pe;let $e=Q,Ut=0;for(;$e!==j;)Ut+=N[$e++],$e=$e%m;if(j=(j+1)%m,j===Q&&(Q=(Q+1)%m),Pe-te<A)return;const Ot=ve&&Pe-ve;return Ot?Math.round(Ut*1e3/Ot):void 0}}function me(m,A){let N=0;const q=1e3/A;let j=null;return function(){const te=this===!0,le=Date.now();if(te||le-N>q)return j&&(clearTimeout(j),j=null),N=le,m.apply(null,arguments);j||(j=setTimeout(()=>(j=null,N=Date.now(),m.apply(null,arguments)),q-(le-N)))}}var ie=(m,A,N=3)=>{let q=0;const j=Re(50,250);return me(Q=>{const te=Q.loaded,le=Q.lengthComputable?Q.total:void 0,Te=te-q,Pe=j(Te),ve=te<=le;q=te;const $e={loaded:te,total:le,progress:le?te/le:void 0,bytes:Te,rate:Pe||void 0,estimated:Pe&&le&&ve?(le-te)/Pe:void 0,event:Q,lengthComputable:le!=null};$e[A?"download":"upload"]=!0,m($e)},N)},se=qe.hasStandardBrowserEnv?function(){const A=/(msie|trident)/i.test(navigator.userAgent),N=document.createElement("a");let q;function j(Q){let te=Q;return A&&(N.setAttribute("href",te),te=N.href),N.setAttribute("href",te),{href:N.href,protocol:N.protocol?N.protocol.replace(/:$/,""):"",host:N.host,search:N.search?N.search.replace(/^\?/,""):"",hash:N.hash?N.hash.replace(/^#/,""):"",hostname:N.hostname,port:N.port,pathname:N.pathname.charAt(0)==="/"?N.pathname:"/"+N.pathname}}return q=j(window.location.href),function(te){const le=re.isString(te)?j(te):te;return le.protocol===q.protocol&&le.host===q.host}}():function(){return function(){return!0}}(),xe=qe.hasStandardBrowserEnv?{write(m,A,N,q,j,Q){const te=[m+"="+encodeURIComponent(A)];re.isNumber(N)&&te.push("expires="+new Date(N).toGMTString()),re.isString(q)&&te.push("path="+q),re.isString(j)&&te.push("domain="+j),Q===!0&&te.push("secure"),document.cookie=te.join("; ")},read(m){const A=document.cookie.match(new RegExp("(^|;\\s*)("+m+")=([^;]*)"));return A?decodeURIComponent(A[3]):null},remove(m){this.write(m,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oe(m){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(m)}function ce(m,A){return A?m.replace(/\/?\/$/,"")+"/"+A.replace(/^\/+/,""):m}function be(m,A){return m&&!oe(A)?ce(m,A):A}const Ne=m=>m instanceof Me?{...m}:m;function He(m,A){A=A||{};const N={};function q(Pe,ve,$e){return re.isPlainObject(Pe)&&re.isPlainObject(ve)?re.merge.call({caseless:$e},Pe,ve):re.isPlainObject(ve)?re.merge({},ve):re.isArray(ve)?ve.slice():ve}function j(Pe,ve,$e){if(re.isUndefined(ve)){if(!re.isUndefined(Pe))return q(void 0,Pe,$e)}else return q(Pe,ve,$e)}function Q(Pe,ve){if(!re.isUndefined(ve))return q(void 0,ve)}function te(Pe,ve){if(re.isUndefined(ve)){if(!re.isUndefined(Pe))return q(void 0,Pe)}else return q(void 0,ve)}function le(Pe,ve,$e){if($e in A)return q(Pe,ve);if($e in m)return q(void 0,Pe)}const Te={url:Q,method:Q,data:Q,baseURL:te,transformRequest:te,transformResponse:te,paramsSerializer:te,timeout:te,timeoutMessage:te,withCredentials:te,withXSRFToken:te,adapter:te,responseType:te,xsrfCookieName:te,xsrfHeaderName:te,onUploadProgress:te,onDownloadProgress:te,decompress:te,maxContentLength:te,maxBodyLength:te,beforeRedirect:te,transport:te,httpAgent:te,httpsAgent:te,cancelToken:te,socketPath:te,responseEncoding:te,validateStatus:le,headers:(Pe,ve)=>j(Ne(Pe),Ne(ve),!0)};return re.forEach(Object.keys(Object.assign({},m,A)),function(ve){const $e=Te[ve]||j,Ut=$e(m[ve],A[ve],ve);re.isUndefined(Ut)&&$e!==le||(N[ve]=Ut)}),N}var We=m=>{const A=He({},m);let{data:N,withXSRFToken:q,xsrfHeaderName:j,xsrfCookieName:Q,headers:te,auth:le}=A;A.headers=te=Me.from(te),A.url=ut(be(A.baseURL,A.url),m.params,m.paramsSerializer),le&&te.set("Authorization","Basic "+btoa((le.username||"")+":"+(le.password?unescape(encodeURIComponent(le.password)):"")));let Te;if(re.isFormData(N)){if(qe.hasStandardBrowserEnv||qe.hasStandardBrowserWebWorkerEnv)te.setContentType(void 0);else if((Te=te.getContentType())!==!1){const[Pe,...ve]=Te?Te.split(";").map($e=>$e.trim()).filter(Boolean):[];te.setContentType([Pe||"multipart/form-data",...ve].join("; "))}}if(qe.hasStandardBrowserEnv&&(q&&re.isFunction(q)&&(q=q(A)),q||q!==!1&&se(A.url))){const Pe=j&&Q&&xe.read(Q);Pe&&te.set(j,Pe)}return A},$=typeof XMLHttpRequest<"u"&&function(m){return new Promise(function(N,q){const j=We(m);let Q=j.data;const te=Me.from(j.headers).normalize();let{responseType:le}=j,Te;function Pe(){j.cancelToken&&j.cancelToken.unsubscribe(Te),j.signal&&j.signal.removeEventListener("abort",Te)}let ve=new XMLHttpRequest;ve.open(j.method.toUpperCase(),j.url,!0),ve.timeout=j.timeout;function $e(){if(!ve)return;const Ot=Me.from("getAllResponseHeaders"in ve&&ve.getAllResponseHeaders()),it={data:!le||le==="text"||le==="json"?ve.responseText:ve.response,status:ve.status,statusText:ve.statusText,headers:Ot,config:m,request:ve};ye(function(cr){N(cr),Pe()},function(cr){q(cr),Pe()},it),ve=null}"onloadend"in ve?ve.onloadend=$e:ve.onreadystatechange=function(){!ve||ve.readyState!==4||ve.status===0&&!(ve.responseURL&&ve.responseURL.indexOf("file:")===0)||setTimeout($e)},ve.onabort=function(){ve&&(q(new Ae("Request aborted",Ae.ECONNABORTED,j,ve)),ve=null)},ve.onerror=function(){q(new Ae("Network Error",Ae.ERR_NETWORK,j,ve)),ve=null},ve.ontimeout=function(){let ze=j.timeout?"timeout of "+j.timeout+"ms exceeded":"timeout exceeded";const it=j.transitional||Et;j.timeoutErrorMessage&&(ze=j.timeoutErrorMessage),q(new Ae(ze,it.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,j,ve)),ve=null},Q===void 0&&te.setContentType(null),"setRequestHeader"in ve&&re.forEach(te.toJSON(),function(ze,it){ve.setRequestHeader(it,ze)}),re.isUndefined(j.withCredentials)||(ve.withCredentials=!!j.withCredentials),le&&le!=="json"&&(ve.responseType=j.responseType),typeof j.onDownloadProgress=="function"&&ve.addEventListener("progress",ie(j.onDownloadProgress,!0)),typeof j.onUploadProgress=="function"&&ve.upload&&ve.upload.addEventListener("progress",ie(j.onUploadProgress)),(j.cancelToken||j.signal)&&(Te=Ot=>{ve&&(q(!Ot||Ot.type?new Be(null,m,ve):Ot),ve.abort(),ve=null)},j.cancelToken&&j.cancelToken.subscribe(Te),j.signal&&(j.signal.aborted?Te():j.signal.addEventListener("abort",Te)));const Ut=Ce(j.url);if(Ut&&qe.protocols.indexOf(Ut)===-1){q(new Ae("Unsupported protocol "+Ut+":",Ae.ERR_BAD_REQUEST,m));return}ve.send(Q||null)})},lt=(m,A)=>{let N=new AbortController,q;const j=function(Te){if(!q){q=!0,te();const Pe=Te instanceof Error?Te:this.reason;N.abort(Pe instanceof Ae?Pe:new Be(Pe instanceof Error?Pe.message:Pe))}};let Q=A&&setTimeout(()=>{j(new Ae(`timeout ${A} of ms exceeded`,Ae.ETIMEDOUT))},A);const te=()=>{m&&(Q&&clearTimeout(Q),Q=null,m.forEach(Te=>{Te&&(Te.removeEventListener?Te.removeEventListener("abort",j):Te.unsubscribe(j))}),m=null)};m.forEach(Te=>Te&&Te.addEventListener&&Te.addEventListener("abort",j));const{signal:le}=N;return le.unsubscribe=te,[le,()=>{Q&&clearTimeout(Q),Q=null}]};const xt=function*(m,A){let N=m.byteLength;if(N<A){yield m;return}let q=0,j;for(;q<N;)j=q+A,yield m.slice(q,j),q=j},Xe=async function*(m,A,N){for await(const q of m)yield*xt(ArrayBuffer.isView(q)?q:await N(String(q)),A)},ft=(m,A,N,q,j)=>{const Q=Xe(m,A,j);let te=0;return new ReadableStream({type:"bytes",async pull(le){const{done:Te,value:Pe}=await Q.next();if(Te){le.close(),q();return}let ve=Pe.byteLength;N&&N(te+=ve),le.enqueue(new Uint8Array(Pe))},cancel(le){return q(le),Q.return()}},{highWaterMark:2})},st=(m,A)=>{const N=m!=null;return q=>setTimeout(()=>A({lengthComputable:N,total:m,loaded:q}))},Dt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",wt=Dt&&typeof ReadableStream=="function",Rt=Dt&&(typeof TextEncoder=="function"?(m=>A=>m.encode(A))(new TextEncoder):async m=>new Uint8Array(await new Response(m).arrayBuffer())),kt=wt&&(()=>{let m=!1;const A=new Request(qe.origin,{body:new ReadableStream,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!A})(),Tt=64*1024,It=wt&&!!(()=>{try{return re.isReadableStream(new Response("").body)}catch{}})(),Lt={stream:It&&(m=>m.body)};Dt&&(m=>{["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!Lt[A]&&(Lt[A]=re.isFunction(m[A])?N=>N[A]():(N,q)=>{throw new Ae(`Response type '${A}' is not supported`,Ae.ERR_NOT_SUPPORT,q)})})})(new Response);const Vt=async m=>{if(m==null)return 0;if(re.isBlob(m))return m.size;if(re.isSpecCompliantForm(m))return(await new Request(m).arrayBuffer()).byteLength;if(re.isArrayBufferView(m))return m.byteLength;if(re.isURLSearchParams(m)&&(m=m+""),re.isString(m))return(await Rt(m)).byteLength},Yt=async(m,A)=>{const N=re.toFiniteNumber(m.getContentLength());return N??Vt(A)};var ua=Dt&&(async m=>{let{url:A,method:N,data:q,signal:j,cancelToken:Q,timeout:te,onDownloadProgress:le,onUploadProgress:Te,responseType:Pe,headers:ve,withCredentials:$e="same-origin",fetchOptions:Ut}=We(m);Pe=Pe?(Pe+"").toLowerCase():"text";let[Ot,ze]=j||Q||te?lt([j,Q],te):[],it,or;const cr=()=>{!it&&setTimeout(()=>{Ot&&Ot.unsubscribe()}),it=!0};let Tr;try{if(Te&&kt&&N!=="get"&&N!=="head"&&(Tr=await Yt(ve,q))!==0){let Lr=new Request(A,{method:"POST",body:q,duplex:"half"}),r0;re.isFormData(q)&&(r0=Lr.headers.get("content-type"))&&ve.setContentType(r0),Lr.body&&(q=ft(Lr.body,Tt,st(Tr,ie(Te)),null,Rt))}re.isString($e)||($e=$e?"cors":"omit"),or=new Request(A,{...Ut,signal:Ot,method:N.toUpperCase(),headers:ve.normalize().toJSON(),body:q,duplex:"half",withCredentials:$e});let qt=await fetch(or);const y0=It&&(Pe==="stream"||Pe==="response");if(It&&(le||y0)){const Lr={};["status","statusText","headers"].forEach(Ki=>{Lr[Ki]=qt[Ki]});const r0=re.toFiniteNumber(qt.headers.get("content-length"));qt=new Response(ft(qt.body,Tt,le&&st(r0,ie(le,!0)),y0&&cr,Rt),Lr)}Pe=Pe||"text";let ya=await Lt[re.findKey(Lt,Pe)||"text"](qt,m);return!y0&&cr(),ze&&ze(),await new Promise((Lr,r0)=>{ye(Lr,r0,{data:ya,headers:Me.from(qt.headers),status:qt.status,statusText:qt.statusText,config:m,request:or})})}catch(qt){throw cr(),qt&&qt.name==="TypeError"&&/fetch/i.test(qt.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,m,or),{cause:qt.cause||qt}):Ae.from(qt,qt&&qt.code,m,or)}});const on={http:Ft,xhr:$,fetch:ua};re.forEach(on,(m,A)=>{if(m){try{Object.defineProperty(m,"name",{value:A})}catch{}Object.defineProperty(m,"adapterName",{value:A})}});const Li=m=>`- ${m}`,ha=m=>re.isFunction(m)||m===null||m===!1;var Hi={getAdapter:m=>{m=re.isArray(m)?m:[m];const{length:A}=m;let N,q;const j={};for(let Q=0;Q<A;Q++){N=m[Q];let te;if(q=N,!ha(N)&&(q=on[(te=String(N)).toLowerCase()],q===void 0))throw new Ae(`Unknown adapter '${te}'`);if(q)break;j[te||"#"+Q]=q}if(!q){const Q=Object.entries(j).map(([le,Te])=>`adapter ${le} `+(Te===!1?"is not supported by the environment":"is not available in the build"));let te=A?Q.length>1?`since :
54
54
  `+Q.map(Li).join(`
55
55
  `):" "+Li(Q[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+te,"ERR_NOT_SUPPORT")}return q},adapters:on};function cn(m){if(m.cancelToken&&m.cancelToken.throwIfRequested(),m.signal&&m.signal.aborted)throw new Be(null,m)}function $i(m){return cn(m),m.headers=Me.from(m.headers),m.data=De.call(m,m.transformRequest),["post","put","patch"].indexOf(m.method)!==-1&&m.headers.setContentType("application/x-www-form-urlencoded",!1),Hi.getAdapter(m.adapter||L.adapter)(m).then(function(q){return cn(m),q.data=De.call(m,m.transformResponse,q),q.headers=Me.from(q.headers),q},function(q){return we(q)||(cn(m),q&&q.response&&(q.response.data=De.call(m,m.transformResponse,q.response),q.response.headers=Me.from(q.response.headers))),Promise.reject(q)})}const Ui="1.7.2",dn={};["object","boolean","number","function","string","symbol"].forEach((m,A)=>{dn[m]=function(q){return typeof q===m||"a"+(A<1?"n ":" ")+m}});const ji={};dn.transitional=function(A,N,q){function j(Q,te){return"[Axios v"+Ui+"] Transitional option '"+Q+"'"+te+(q?". "+q:"")}return(Q,te,le)=>{if(A===!1)throw new Ae(j(te," has been removed"+(N?" in "+N:"")),Ae.ERR_DEPRECATED);return N&&!ji[te]&&(ji[te]=!0,console.warn(j(te," has been deprecated since v"+N+" and will be removed in the near future"))),A?A(Q,te,le):!0}};function la(m,A,N){if(typeof m!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const q=Object.keys(m);let j=q.length;for(;j-- >0;){const Q=q[j],te=A[Q];if(te){const le=m[Q],Te=le===void 0||te(le,Q,m);if(Te!==!0)throw new Ae("option "+Q+" must be "+Te,Ae.ERR_BAD_OPTION_VALUE);continue}if(N!==!0)throw new Ae("Unknown option "+Q,Ae.ERR_BAD_OPTION)}}var un={assertOptions:la,validators:dn};const zr=un.validators;class R0{constructor(A){this.defaults=A,this.interceptors={request:new tr,response:new tr}}async request(A,N){try{return await this._request(A,N)}catch(q){if(q instanceof Error){let j;Error.captureStackTrace?Error.captureStackTrace(j={}):j=new Error;const Q=j.stack?j.stack.replace(/^.+\n/,""):"";try{q.stack?Q&&!String(q.stack).endsWith(Q.replace(/^.+\n.+\n/,""))&&(q.stack+=`
56
- `+Q):q.stack=Q}catch{}}throw q}}_request(A,N){typeof A=="string"?(N=N||{},N.url=A):N=A||{},N=He(this.defaults,N);const{transitional:q,paramsSerializer:j,headers:Q}=N;q!==void 0&&un.assertOptions(q,{silentJSONParsing:zr.transitional(zr.boolean),forcedJSONParsing:zr.transitional(zr.boolean),clarifyTimeoutError:zr.transitional(zr.boolean)},!1),j!=null&&(re.isFunction(j)?N.paramsSerializer={serialize:j}:un.assertOptions(j,{encode:zr.function,serialize:zr.function},!0)),N.method=(N.method||this.defaults.method||"get").toLowerCase();let te=Q&&re.merge(Q.common,Q[N.method]);Q&&re.forEach(["delete","get","head","post","put","patch","common"],ze=>{delete Q[ze]}),N.headers=Me.concat(te,Q);const le=[];let Te=!0;this.interceptors.request.forEach(function(it){typeof it.runWhen=="function"&&it.runWhen(N)===!1||(Te=Te&&it.synchronous,le.unshift(it.fulfilled,it.rejected))});const Pe=[];this.interceptors.response.forEach(function(it){Pe.push(it.fulfilled,it.rejected)});let ve,$e=0,Ut;if(!Te){const ze=[$i.bind(this),void 0];for(ze.unshift.apply(ze,le),ze.push.apply(ze,Pe),Ut=ze.length,ve=Promise.resolve(N);$e<Ut;)ve=ve.then(ze[$e++],ze[$e++]);return ve}Ut=le.length;let Ot=N;for($e=0;$e<Ut;){const ze=le[$e++],it=le[$e++];try{Ot=ze(Ot)}catch(or){it.call(this,or);break}}try{ve=$i.call(this,Ot)}catch(ze){return Promise.reject(ze)}for($e=0,Ut=Pe.length;$e<Ut;)ve=ve.then(Pe[$e++],Pe[$e++]);return ve}getUri(A){A=He(this.defaults,A);const N=be(A.baseURL,A.url);return ut(N,A.params,A.paramsSerializer)}}re.forEach(["delete","get","head","options"],function(A){R0.prototype[A]=function(N,q){return this.request(He(q||{},{method:A,url:N,data:(q||{}).data}))}}),re.forEach(["post","put","patch"],function(A){function N(q){return function(Q,te,le){return this.request(He(le||{},{method:A,headers:q?{"Content-Type":"multipart/form-data"}:{},url:Q,data:te}))}}R0.prototype[A]=N(),R0.prototype[A+"Form"]=N(!0)});var P0=R0;class hn{constructor(A){if(typeof A!="function")throw new TypeError("executor must be a function.");let N;this.promise=new Promise(function(Q){N=Q});const q=this;this.promise.then(j=>{if(!q._listeners)return;let Q=q._listeners.length;for(;Q-- >0;)q._listeners[Q](j);q._listeners=null}),this.promise.then=j=>{let Q;const te=new Promise(le=>{q.subscribe(le),Q=le}).then(j);return te.cancel=function(){q.unsubscribe(Q)},te},A(function(Q,te,le){q.reason||(q.reason=new Be(Q,te,le),N(q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}this._listeners?this._listeners.push(A):this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;const N=this._listeners.indexOf(A);N!==-1&&this._listeners.splice(N,1)}static source(){let A;return{token:new hn(function(j){A=j}),cancel:A}}}var xa=hn;function pa(m){return function(N){return m.apply(null,N)}}function ba(m){return re.isObject(m)&&m.isAxiosError===!0}const ln={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ln).forEach(([m,A])=>{ln[A]=m});var va=ln;function Wi(m){const A=new P0(m),N=i(P0.prototype.request,A);return re.extend(N,P0.prototype,A,{allOwnKeys:!0}),re.extend(N,A,null,{allOwnKeys:!0}),N.create=function(j){return Wi(He(m,j))},N}const $t=Wi(L);return $t.Axios=P0,$t.CanceledError=Be,$t.CancelToken=xa,$t.isCancel=we,$t.VERSION=Ui,$t.toFormData=ot,$t.AxiosError=Ae,$t.Cancel=$t.CanceledError,$t.all=function(A){return Promise.all(A)},$t.spread=pa,$t.isAxiosError=ba,$t.mergeConfig=He,$t.AxiosHeaders=Me,$t.formToJSON=m=>d(re.isHTMLForm(m)?new FormData(m):m),$t.getAdapter=Hi.getAdapter,$t.HttpStatusCode=va,$t.default=$t,ti=$t,ti}var zf;function vo(){return zf||(zf=1,function(i,e){(function(t,r){i.exports=r(d0(),bo())})(Ue,function(t,r){return function(){var a=t,s=a.Util,b=a.Enc,p=a.Sign,u=a.Rpc={_default_peers:["https://main.saseul.net","https://sub.saseul.net","https://aroma.saseul.net","https://blanc.saseul.net"],_endpoints:null,_timeout:3e4,_headers:{},_broadcast_limit:32,endpoint:function(f){const o=this.endpoints(f),x=Math.floor(Math.random()*o.length);return o[x]},endpoints:function(f){return typeof f=="object"?this._endpoints=Object.values(f):typeof f<"u"&&(this._endpoints=[String(f)]),this._endpoints?this._endpoints:this._default_peers},timeout:function(f){return typeof f=="number"&&f>0&&(this._timeout=f),this._timeout},headers:function(f){return typeof f=="object"&&(this._headers=f),this._headers},broadcastLimit:function(f){return typeof f=="number"&&f>0&&(this._broadcast_limit=f),this._broadcast_limit},tracker:function(){return this.get("peer",{})},trackerFromAll:function(){return new Promise((f,o)=>{u.all("GET","peer",{}).then(x=>{let v={peers:[],known_hosts:[]};x.forEach(_=>{_.data&&_.data.peers&&_.data.known_hosts&&typeof _.data.peers=="object"&&Array.isArray(_.data.known_hosts)&&(v.peers.push(Object.values(_.data.peers)),v.known_hosts.push(_.data.known_hosts))}),v.peers.length>0?(v.peers=s.flatMerge(v.peers),v.known_hosts=s.flatMerge(v.known_hosts),f(v)):o(x)})})},peer:function(){return new Promise((f,o)=>{u.tracker().then(x=>f(Object.values(x.data.peers))).catch(o)})},peerFromAll:function(){return new Promise((f,o)=>{u.all("GET","peer",{}).then(x=>{let v=[];x.forEach(_=>{_.data&&_.data.peers&&typeof _.data.peers=="object"&&v.push(Object.values(_.data.peers))}),v.length>0?(v=s.flatMerge(v),f(v)):o(x)})})},ping:function(){return this.get("ping",{})},round:function(){return this.get("round",{chain_type:"all"})},bestRound:function(){return new Promise((f,o)=>{this.all("GET","round",{chain_type:"all"}).then(x=>{let v=x,_=Math.max(...v.map(H=>H.data?H.data.main.block.height:0)),E=Math.max(...v.map(H=>H.data?H.data.resource.block.height:0)),D=v.find(H=>H.data&&H.data.main.block.height===_),k=v.find(H=>H.data&&H.data.resource.block.height===E);!D||!k?o({main:null,resource:null}):f({main:D.data.main.block,resource:k.data.resource.block})}).catch(o)})},signedRequest:function(f,o){return this.signedData(f,o,"request")},simpleRequest:function(f){return{request:f}},signedTransaction:function(f,o){return this.signedData(f,o,"transaction")},request:function(f){return this.get("request",f)},raceRequest:function(f,o=()=>!0){return this.race("GET","request",f,o)},sendTransaction:function(f){return this.post("sendtransaction",f)},sendTransactionToAll:function(f){return this.all("POST","sendtransaction",f)},broadcastTransaction:function(f){return new Promise((o,x)=>{this.peerFromAll().then(v=>{let _=u.broadcastLimit()-u.endpoints().length,E=s.merge(u.endpoints(),s.randomSlice(v,_).map(D=>D.host));u._all(E,"POST","sendtransaction",f,()=>!0,D=>{let k=D.filter(H=>H.code===200);if(k.length>0)o(k[0]);else{let H=Math.max(...D.map(T=>T.code)),P=D.filter(T=>T.code===H);P.length>0?x(P[0]):x(D[0])}})}).catch(x)})},estimatedFee:function(f){const o=JSON.stringify(f).length;return new Promise((x,v)=>{this.race("POST","weight",f,s.isInt).then(_=>{let E=parseInt(_.data||"0"),D=E===o?(o+336)*1e9:E*1e9;x(D)}).catch(_=>{v(_)})})},get:function(f,o){return this.fetch("GET",f,o)},post:function(f,o){return this.fetch("POST",f,o)},fetch:function(f,o,x){return new Promise(function(v,_){let E=u.axiosItem(u.endpoint(),f,o,x,u.headers());r(E).then(D=>{D.data&&D.data.code?v(D.data):_({code:901,msg:"Invalid response parameter"})}).catch(D=>{D.code==="ECONNABORTED"||D.message.includes("timeout")?_({code:408,msg:"Request timed out"}):D.response&&D.response.data&&D.response.data.code?v(D.response.data):D.response.status&&D.response.statusText&&D.response.data?_({code:D.response.status,msg:D.response.statusText,data:D.response.data}):_(D)})})},signedData:function(f,o,x="transaction"){if(o||(o=t.Sign.privateKey()),!p.keyValidity(o))return console.error("Invalid private key: "+o),{};let v={};return f.from=p.address(p.publicKey(o)),typeof f.timestamp!="number"&&(f.timestamp=s.utime()+(x==="transaction"?2e6:0)),v[x]=f,v.public_key=p.publicKey(o),v.signature=p.signature(b.txHash(f),o),v},axiosItem:function(f,o,x,v,_){let E={method:o,url:`${s.wrappedEndpoint(f)}/${x}`,timeout:u.timeout()};if(typeof _=="object"&&Object.keys(_).length>0&&(E.headers=_),o==="GET"){let D=[];for(let k in v)D.push(`${k}=${s.string(v[k])}`);E.url=E.url+(Object.keys(v).length===0?"":"?"+D.join("&"))}else{let D=new FormData;for(let k in v)D.set(k,s.string(v[k]));E.data=D}return E},race:function(f,o,x,v=()=>!0){const _=this.endpoints();return new Promise(function(E,D){u._race(_,f,o,x,v,E,D)})},_race:function(f,o,x,v,_=()=>!1,E=()=>{},D=()=>{}){(!Array.isArray(f)||f.length===0)&&D();try{let k=0,H,P,T,z=new r.CancelToken(Y=>T=Y),V=f.map(Y=>{P=u.axiosItem(Y,o,x,v,u.headers()),P.cancelToken=z,r(P).then(Z=>{Z.data&&Z.data.code&&_(Z.data.data)?(E(Z.data),T()):k++}).catch(Z=>{k++,H||(Z.code==="ECONNABORTED"||Z.message.includes("timeout")?H={code:408,msg:"Request timed out"}:Z.response&&Z.response.data&&Z.response.data.code?H=Z.response.data:Z.response&&Z.response.status?H={code:Z.response.status,msg:Z.response.statusText,data:Z.response.data}:H=Z)}).finally(()=>k>=f.length&&D(H))});Promise.race(V).then()}catch(k){console.error(k)}},all:function(f,o,x,v=()=>!0){const _=this.endpoints();return new Promise(function(E){u._all(_,f,o,x,v,E)})},_all:function(f,o,x,v,_=()=>!0,E=()=>{}){(!Array.isArray(f)||f.length===0)&&fallback();try{let D=[],k,H=f.map(P=>{k=u.axiosItem(P,o,x,v,u.headers()),r(k).then(T=>{T.data&&T.data.code&&_(T.data.data)?D.push({endpoint:P,code:T.data.code,data:T.data.data}):D.push({endpoint:P,msg:"Condition not met"})}).catch(T=>{if(T.code==="ECONNABORTED"||T.message.includes("timeout"))D.push({endpoint:P,code:408,msg:"Request timed out"});else if(T.response&&T.response.data&&T.response.data.code){let z=T.response.data;z.endpoint=P,D.push(z)}else T.response&&T.response.status?D.push({endpoint:P,code:T.response.status,msg:T.response.statusText,data:T.response.data}):D.push({endpoint:P,error:T})}).finally(()=>{D.length>=f.length&&E(D)})});Promise.race(H).then()}catch(D){console.error(D)}}}}(),t.Rpc})}(ei)),ei.exports}var ri={exports:{}},Lf;function yo(){return Lf||(Lf=1,function(i,e){(function(t,r){i.exports=r(d0())})(Ue,function(t){return function(){var r=t,a=t.Util,s=t.Enc,b=t.Sign,p=t.Rpc,u=r.SmartContract={ZERO_ADDRESS:"00000000000000000000000000000000000000000000",Operator:{legacy_condition:function(f,o="Conditional error"){return[f,o]},condition:function(f,o="Conditional error"){return{$condition:[f,o]}},response:function(f){return{$response:[f]}},weight:function(){return{$weight:[]}},if:function(f=!1,o=null,x=null){return{$if:[f,o,x]}},and:function(f=[]){return{$and:f}},or:function(f=[]){return{$or:f}},get:function(f={},o=""){return{$get:[f,o]}},add:function(f=[]){return{$add:f}},sub:function(f=[]){return{$sub:f}},mul:function(f=[]){return{$mul:f}},div:function(f=[]){return{$div:f}},precise_add:function(f=null,o=null,x=0){return{$precise_add:[f,o,x]}},precise_sub:function(f=null,o=null,x=0){return{$precise_sub:[f,o,x]}},precise_mul:function(f=null,o=null,x=0){return{$precise_mul:[f,o,x]}},precise_div:function(f=null,o=null,x=0){return{$precise_div:[f,o,x]}},scale:function(f=null){return{$scale:[f]}},get_type:function(f){return{$get_type:[f]}},is_numeric:function(f=[]){return{$is_numeric:f}},is_int:function(f=[]){return{$is_int:f}},is_string:function(f=[]){return{$is_string:f}},is_null:function(f=[]){return{$is_null:f}},is_bool:function(f=[]){return{$is_bool:f}},is_array:function(f=[]){return{$is_array:f}},is_double:function(f=[]){return{$is_double:f}},eq:function(f=0,o=0){return{$eq:[f,o]}},ne:function(f=0,o=0){return{$ne:[f,o]}},gt:function(f=0,o=0){return{$gt:[f,o]}},lt:function(f=0,o=0){return{$lt:[f,o]}},gte:function(f=0,o=0){return{$gte:[f,o]}},lte:function(f=0,o=0){return{$lte:[f,o]}},in:function(f=null,o=[]){return{$in:[f,o]}},load_param:function(f){return typeof f=="string"?{$load_param:[f]}:{$load_param:f}},read_universal:function(f=null,o=null,x=null){return{$read_universal:[f,o,x]}},read_local:function(f=null,o=null,x=null){return{$read_local:[f,o,x]}},write_universal:function(f=null,o=null,x=null){return{$write_universal:[f,o,x]}},write_local:function(f=null,o=null,x=null){return{$write_local:[f,o,x]}},concat:function(f=[]){return{$concat:f}},strlen:function(f=""){return{$strlen:[f]}},reg_match:function(f=null,o=""){return{$reg_match:[f,o]}},encode_json:function(f=null){return{$encode_json:[f]}},decode_json:function(f=""){return{$decode_json:[f]}},hash:function(f=[]){return{$hash:[f]}},short_hash:function(f=[]){return{$short_hash:[f]}},id_hash:function(f=[]){return{$id_hash:[f]}},sign_verify:function(f=null,o="",x=""){return{$sign_verify:[f,o,x]}},get_block:function(f,o){return{$get_block:[f,o]}},get_resource_block:function(f,o){return{$get_resource_block:[f,o]}},get_transaction:function(f){return{$get_transaction:[f]}},list_universal:function(f,o,x){return{$list_universal:[f,o,x]}}},Contract:function(f,o){this._methods={},this._writer=f,this._nonce=o,this.method=function(x){return this._methods[x]},this.writer=function(x){typeof x<"u"&&(typeof x=="string"&&(b.addressValidity(x)||x===s.ZERO_ADDRESS)?this._writer=x:console.error("Invalid writer address. "))},this.nonce=function(x){typeof x<"u"&&(typeof x=="string"?this._nonce=x:console.error("The 'nonce' parameter should be of string."))},this.methods=function(x=!1){let v={};if(x)for(let _ in this._methods)v[_]=this._methods[_].compile();else for(let _ in this._methods)v[_]=this._methods[_].type();return v},this.addMethod=function(x){x.writer(this._writer),x.nonce(this._nonce),this._methods[x.name()]=x},this.publish=function(x){this.register(x,"Publish")},this.register=function(x,v="Register"){let _=function(E){let D=a.utime()+1e6,k={type:v,code:E.compile(),timestamp:D},H=s.txHash(k),P=p.signedTransaction(k,x),T=function(){console.log("Checking results... "+H),p.round().then(function(z){typeof z.data<"u"&&z.data.main.block.s_timestamp>D?p.request(p.signedRequest({type:"GetCode",ctype:E.type(),target:E.mid()}),b.privateKey()).then(function(V){for(let Y in V.data)V.data[Y]===null?(console.log("Failed. Resending code... "+H),_(E)):console.log("Success! "+H)}):setTimeout(T,2e3)})};p.broadcastTransaction(P).then(function(z){z.code===200?(console.log(z.data),setTimeout(T,2e3)):z.code!==999?(console.log("Failed. Resending code... "+H),_(E)):console.dir(z)}).catch(function(z){console.dir(z)})};for(let E in this._methods)_(this._methods[E])}},Method:function(f){this._type="request",this._machine="0.2.0",this._name="",this._version="",this._space="",this._writer="",this._parameters={},this._executions=[],typeof f=="object"&&(typeof f.type<"u"&&(typeof f.type=="string"&&f.type==="contract"?this._type="contract":this._type="request"),typeof f.t<"u"&&(typeof f.t=="string"&&f.t==="contract"?this._type="contract":this._type="request"),typeof f.machine<"u"&&(typeof f.machine=="string"?this._machine=f.machine:console.error("The 'machine' parameter should be of string.")),typeof f.m<"u"&&(typeof f.m=="string"?this._machine=f.m:console.error("The 'machine' parameter should be of string.")),typeof f.name<"u"&&(typeof f.name=="string"?this._name=f.name:console.error("The 'name' parameter should be of string.")),typeof f.n<"u"&&(typeof f.n=="string"?this._name=f.n:console.error("The 'name' parameter should be of string.")),typeof f.version<"u"&&(typeof f.version=="string"?this._version=f.version:console.error("The 'version' parameter should be of string.")),typeof f.v<"u"&&(typeof f.v=="string"?this._version=f.v:console.error("The 'version' parameter should be of string.")),typeof f.space<"u"&&(typeof f.space=="string"?this._space=f.space:console.error("The 'space' parameter should be of string.")),typeof f.s<"u"&&(typeof f.s=="string"?this._space=f.s:console.error("The 'space' parameter should be of string.")),typeof f.writer<"u"&&(typeof f.writer=="string"&&(b.addressValidity(f.writer)||f.writer===s.ZERO_ADDRESS)?this._writer=f.writer:console.error("Invalid writer address. ")),typeof f.w<"u"&&(typeof f.w=="string"&&(b.addressValidity(f.w)||f.w===s.ZERO_ADDRESS)?this._writer=f.w:console.error("Invalid writer address. ")),typeof f.parameters<"u"&&(typeof f.parameters=="object"&&u.parametersValidity(f.parameters)?this._parameters=f.parameters:console.error("Invalid parameters. ")),typeof f.p<"u"&&(typeof f.p=="object"&&u.parametersValidity(f.p)?this._parameters=f.p:console.error("Invalid parameters. ")),typeof f.executions<"u"&&(typeof f.executions=="object"?this._executions=f.executions:console.error("Invalid executions. ")),typeof f.e<"u"&&(typeof f.e=="object"?this._executions=f.e:console.error("Invalid executions. "))),this.cid=function(){return s.cid(this.writer(),this.space())},this.mid=function(){return s.hash([this.writer(),this.space(),this.name()])},this.type=function(o){return typeof o<"u"&&(o==="contract"?this._type="contract":this._type="request"),this._type},this.machine=function(o){return typeof o<"u"&&(typeof o=="string"?this._machine=o:console.error("The 'machine' parameter should be of string.")),this._machine},this.name=function(o){return typeof o<"u"&&(typeof o=="string"?this._name=o:console.error("The 'name' parameter should be of string.")),this._name},this.version=function(o){return typeof o<"u"&&(typeof o=="string"?this._version=o:console.error("The 'version' parameter should be of string.")),this._version},this.nonce=function(o){return typeof o<"u"&&(typeof o=="string"?this._space=o:console.error("The 'space' parameter should be of string.")),this._space},this.space=function(o){return this.nonce(o)},this.writer=function(o){return typeof o<"u"&&(b.addressValidity(o)||o===s.ZERO_ADDRESS?this._writer=o:console.error("Invalid writer address. ")),this._writer},this.parameters=function(o){return typeof o<"u"&&(typeof o=="object"&&u.parametersValidity(o)?this._parameters=o:console.error("Invalid parameters. ")),this._parameters},this.executions=function(o){return typeof o=="object"&&(this._executions=o),this._executions},this.addParameter=function(o){typeof o.default>"u"&&(o.default=null),typeof o.cases>"u"&&(o.cases=null),typeof o=="object"&&u.parameterValidity(o)?this._parameters[o.name]=o:console.error("Invalid parameter. ")},this.addExecution=function(o){this._executions.push(o)},this.compile=function(){let o;return Object.keys(this._parameters).length===0&&(this._parameters=[]),o=JSON.stringify({t:this._type,m:this._machine,n:this._name,v:this._version,s:this._space,w:this._writer,p:this._parameters,e:this._executions}),o.replaceAll("/","\\/")}},LegacyMethod:function(f){this._type="request",this._name="",this._version="",this._space="",this._writer="",this._parameters={},this._conditions=[],this._updates=[],this._response=[],typeof f=="object"&&(typeof f.type<"u"&&(typeof f.type=="string"&&f.type==="contract"?this._type="contract":this._type="request"),typeof f.name<"u"&&(typeof f.name=="string"?this._name=f.name:console.error("The 'name' parameter should be of string.")),typeof f.version<"u"&&(typeof f.version=="string"?this._version=f.version:console.error("The 'version' parameter should be of string.")),typeof f.nonce<"u"&&(typeof f.nonce=="string"?this._space=f.nonce:console.error("The 'space' parameter should be of string.")),typeof f.space<"u"&&(typeof f.space=="string"?this._space=f.space:console.error("The 'space' parameter should be of string.")),typeof f.writer<"u"&&(typeof f.writer=="string"&&(b.addressValidity(f.writer)||f.writer===s.ZERO_ADDRESS)?this._writer=f.writer:console.error("Invalid writer address. ")),typeof f.parameters<"u"&&(typeof f.parameters=="object"&&u.parametersValidity(f.parameters)?this._parameters=f.parameters:console.error("Invalid parameters. ")),typeof f.conditions<"u"&&(typeof f.conditions=="object"?this._conditions=f.conditions:console.error("Invalid conditions. ")),typeof f.updates<"u"&&(typeof f.updates=="object"?this._updates=f.updates:console.error("Invalid updates. ")),typeof f.response<"u"&&(this._response=f.response)),this.cid=function(){return s.cid(this.writer(),this.space())},this.mid=function(){return s.idHash([this.name(),this.space()])+"00000000000000000000"},this.type=function(o){return typeof o<"u"&&(o==="contract"?this._type="contract":this._type="request"),this._type},this.name=function(o){return typeof o<"u"&&(typeof o=="string"?this._name=o:console.error("The 'name' parameter should be of string.")),this._name},this.version=function(o){return typeof o<"u"&&(typeof o=="string"?this._version=o:console.error("The 'version' parameter should be of string.")),this._version},this.nonce=function(o){return typeof o<"u"&&(typeof o=="string"?this._space=o:console.error("The 'nonce' parameter should be of string.")),this._space},this.space=function(o){return this.nonce(o)},this.writer=function(o){return typeof o<"u"&&(b.addressValidity(o)||o===s.ZERO_ADDRESS?this._writer=o:console.error("Invalid writer address. ")),this._writer},this.parameters=function(o){return typeof o<"u"&&(typeof o=="object"&&u.parametersValidity(o)?this._parameters=o:console.error("Invalid parameters. ")),this._parameters},this.conditions=function(o){return typeof o=="object"&&(this._conditions=o),this._conditions},this.updates=function(o){return typeof o=="object"&&(this._updates=o),this._updates},this.response=function(o){return typeof o<"u"&&(this._response=o),this._response},this.addParameter=function(o){typeof o.default>"u"&&(o.default=null),typeof o.cases>"u"&&(o.cases=null),typeof o=="object"&&u.parameterValidity(o)?this._parameters[o.name]=o:console.error("Invalid parameter. ")},this.addCondition=function(o){this._conditions.push(o)},this.addUpdate=function(o){this._updates.push(o)},this.compile=function(){let o;return Object.keys(this._parameters).length===0&&(this._parameters=[]),this._type==="contract"?o=JSON.stringify({type:this._type,name:this._name,version:this._version,nonce:this._space,writer:this._writer,parameters:this._parameters,conditions:this._conditions,updates:this._updates}):o=JSON.stringify({type:this._type,name:this._name,version:this._version,nonce:this._space,writer:this._writer,parameters:this._parameters,conditions:this._conditions,response:this._response}),o.replaceAll("/","\\/")}},parametersValidity(f){for(let o in f)if(this.parameterValidity(f[o])===!1)return!1;return!0},parameterValidity(f){let o=!1,x=!1,v=!1,_=!1,E=!1;return typeof f.name=="string"?o=!0:o=!1,typeof f.type=="string"&&u.typeValidity(f.type)?x=!0:x=!1,typeof f.maxlength=="number"?v=!0:v=!1,typeof f.requirements=="boolean"?_=!0:_=!1,typeof f.cases>"u"||typeof f.cases=="object"||f.cases===null?E=!0:E=!1,o&&x&&v&&_&&E},typeValidity(f){return f==="string"||f==="int"||f==="array"||f==="bool"||f==="double"||f==="any"}}}(),t.SmartContract})}(ri)),ri.exports}(function(i,e){(function(t,r){i.exports=r(d0(),qa(),lo(),po(),vo(),yo())})(Ue,function(t){return t})})(xs);var gs=xs.exports;const _s=as(gs),mo=Ea({__proto__:null,default:_s},[gs]);var Es={};const go="elliptic",_o="6.5.5",Eo="EC cryptography",wo="lib/elliptic.js",Ao=["lib"],Bo={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},Co={type:"git",url:"git@github.com:indutny/elliptic"},So=["EC","Elliptic","curve","Cryptography"],Fo="Fedor Indutny <fedor@indutny.com>",Mo="MIT",Do={url:"https://github.com/indutny/elliptic/issues"},Ro="https://github.com/indutny/elliptic",Po={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},To={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},ko={name:go,version:_o,description:Eo,main:wo,files:Ao,scripts:Bo,repository:Co,keywords:So,author:Fo,license:Mo,bugs:Do,homepage:Ro,devDependencies:Po,dependencies:To};var xr={},Si={exports:{}};Si.exports;(function(i){(function(e,t){function r(S,c){if(!S)throw new Error(c||"Assertion failed")}function a(S,c){S.super_=c;var h=function(){};h.prototype=c.prototype,S.prototype=new h,S.prototype.constructor=S}function s(S,c,h){if(s.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((c==="le"||c==="be")&&(h=c,c=10),this._init(S||0,c||10,h||"be"))}typeof e=="object"?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var b;try{typeof window<"u"&&typeof window.Buffer<"u"?b=window.Buffer:b=V0.Buffer}catch{}s.isBN=function(c){return c instanceof s?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===s.wordSize&&Array.isArray(c.words)},s.max=function(c,h){return c.cmp(h)>0?c:h},s.min=function(c,h){return c.cmp(h)<0?c:h},s.prototype._init=function(c,h,w){if(typeof c=="number")return this._initNumber(c,h,w);if(typeof c=="object")return this._initArray(c,h,w);h==="hex"&&(h=16),r(h===(h|0)&&h>=2&&h<=36),c=c.toString().replace(/\s+/g,"");var M=0;c[0]==="-"&&(M++,this.negative=1),M<c.length&&(h===16?this._parseHex(c,M,w):(this._parseBase(c,h,M),w==="le"&&this._initArray(this.toArray(),h,w)))},s.prototype._initNumber=function(c,h,w){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(r(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),w==="le"&&this._initArray(this.toArray(),h,w)},s.prototype._initArray=function(c,h,w){if(r(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var O,U,W=0;if(w==="be")for(M=c.length-1,O=0;M>=0;M-=3)U=c[M]|c[M-1]<<8|c[M-2]<<16,this.words[O]|=U<<W&67108863,this.words[O+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,O++);else if(w==="le")for(M=0,O=0;M<c.length;M+=3)U=c[M]|c[M+1]<<8|c[M+2]<<16,this.words[O]|=U<<W&67108863,this.words[O+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,O++);return this.strip()};function p(S,c){var h=S.charCodeAt(c);return h>=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function u(S,c,h){var w=p(S,h);return h-1>=c&&(w|=p(S,h-1)<<4),w}s.prototype._parseHex=function(c,h,w){this.length=Math.ceil((c.length-h)/6),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var O=0,U=0,W;if(w==="be")for(M=c.length-1;M>=h;M-=2)W=u(c,h,M)<<O,this.words[U]|=W&67108863,O>=18?(O-=18,U+=1,this.words[U]|=W>>>26):O+=8;else{var I=c.length-h;for(M=I%2===0?h+1:h;M<c.length;M+=2)W=u(c,h,M)<<O,this.words[U]|=W&67108863,O>=18?(O-=18,U+=1,this.words[U]|=W>>>26):O+=8}this.strip()};function f(S,c,h,w){for(var M=0,O=Math.min(S.length,h),U=c;U<O;U++){var W=S.charCodeAt(U)-48;M*=w,W>=49?M+=W-49+10:W>=17?M+=W-17+10:M+=W}return M}s.prototype._parseBase=function(c,h,w){this.words=[0],this.length=1;for(var M=0,O=1;O<=67108863;O*=h)M++;M--,O=O/h|0;for(var U=c.length-w,W=U%M,I=Math.min(U,U-W)+w,l=0,F=w;F<I;F+=M)l=f(c,F,F+M,h),this.imuln(O),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(W!==0){var ee=1;for(l=f(c,F,c.length,h),F=0;F<W;F++)ee*=h;this.imuln(ee),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},s.prototype.copy=function(c){c.words=new Array(this.length);for(var h=0;h<this.length;h++)c.words[h]=this.words[h];c.length=this.length,c.negative=this.negative,c.red=this.red},s.prototype.clone=function(){var c=new s(null);return this.copy(c),c},s.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var o=["","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"],x=[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],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(c,h){c=c||10,h=h|0||1;var w;if(c===16||c==="hex"){w="";for(var M=0,O=0,U=0;U<this.length;U++){var W=this.words[U],I=((W<<M|O)&16777215).toString(16);O=W>>>24-M&16777215,O!==0||U!==this.length-1?w=o[6-I.length]+I+w:w=I+w,M+=2,M>=26&&(M-=26,U--)}for(O!==0&&(w=O.toString(16)+w);w.length%h!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}if(c===(c|0)&&c>=2&&c<=36){var l=x[c],F=v[c];w="";var ee=this.clone();for(ee.negative=0;!ee.isZero();){var J=ee.modn(F).toString(c);ee=ee.idivn(F),ee.isZero()?w=J+w:w=o[l-J.length]+J+w}for(this.isZero()&&(w="0"+w);w.length%h!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(c,h){return r(typeof b<"u"),this.toArrayLike(b,c,h)},s.prototype.toArray=function(c,h){return this.toArrayLike(Array,c,h)},s.prototype.toArrayLike=function(c,h,w){var M=this.byteLength(),O=w||Math.max(1,M);r(M<=O,"byte array longer than desired length"),r(O>0,"Requested array length <= 0"),this.strip();var U=h==="le",W=new c(O),I,l,F=this.clone();if(U){for(l=0;!F.isZero();l++)I=F.andln(255),F.iushrn(8),W[l]=I;for(;l<O;l++)W[l]=0}else{for(l=0;l<O-M;l++)W[l]=0;for(l=0;!F.isZero();l++)I=F.andln(255),F.iushrn(8),W[O-l-1]=I}return W},Math.clz32?s.prototype._countBits=function(c){return 32-Math.clz32(c)}:s.prototype._countBits=function(c){var h=c,w=0;return h>=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},s.prototype._zeroBits=function(c){if(c===0)return 26;var h=c,w=0;return h&8191||(w+=13,h>>>=13),h&127||(w+=7,h>>>=7),h&15||(w+=4,h>>>=4),h&3||(w+=2,h>>>=2),h&1||w++,w},s.prototype.bitLength=function(){var c=this.words[this.length-1],h=this._countBits(c);return(this.length-1)*26+h};function _(S){for(var c=new Array(S.bitLength()),h=0;h<c.length;h++){var w=h/26|0,M=h%26;c[h]=(S.words[w]&1<<M)>>>M}return c}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,h=0;h<this.length;h++){var w=this._zeroBits(this.words[h]);if(c+=w,w!==26)break}return c},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},s.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var h=0;h<c.length;h++)this.words[h]=this.words[h]|c.words[h];return this.strip()},s.prototype.ior=function(c){return r((this.negative|c.negative)===0),this.iuor(c)},s.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},s.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},s.prototype.iuand=function(c){var h;this.length>c.length?h=c:h=this;for(var w=0;w<h.length;w++)this.words[w]=this.words[w]&c.words[w];return this.length=h.length,this.strip()},s.prototype.iand=function(c){return r((this.negative|c.negative)===0),this.iuand(c)},s.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},s.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},s.prototype.iuxor=function(c){var h,w;this.length>c.length?(h=this,w=c):(h=c,w=this);for(var M=0;M<w.length;M++)this.words[M]=h.words[M]^w.words[M];if(this!==h)for(;M<h.length;M++)this.words[M]=h.words[M];return this.length=h.length,this.strip()},s.prototype.ixor=function(c){return r((this.negative|c.negative)===0),this.iuxor(c)},s.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},s.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},s.prototype.inotn=function(c){r(typeof c=="number"&&c>=0);var h=Math.ceil(c/26)|0,w=c%26;this._expand(h),w>0&&h--;for(var M=0;M<h;M++)this.words[M]=~this.words[M]&67108863;return w>0&&(this.words[M]=~this.words[M]&67108863>>26-w),this.strip()},s.prototype.notn=function(c){return this.clone().inotn(c)},s.prototype.setn=function(c,h){r(typeof c=="number"&&c>=0);var w=c/26|0,M=c%26;return this._expand(w+1),h?this.words[w]=this.words[w]|1<<M:this.words[w]=this.words[w]&~(1<<M),this.strip()},s.prototype.iadd=function(c){var h;if(this.negative!==0&&c.negative===0)return this.negative=0,h=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,h=this.isub(c),c.negative=1,h._normSign();var w,M;this.length>c.length?(w=this,M=c):(w=c,M=this);for(var O=0,U=0;U<M.length;U++)h=(w.words[U]|0)+(M.words[U]|0)+O,this.words[U]=h&67108863,O=h>>>26;for(;O!==0&&U<w.length;U++)h=(w.words[U]|0)+O,this.words[U]=h&67108863,O=h>>>26;if(this.length=w.length,O!==0)this.words[this.length]=O,this.length++;else if(w!==this)for(;U<w.length;U++)this.words[U]=w.words[U];return this},s.prototype.add=function(c){var h;return c.negative!==0&&this.negative===0?(c.negative=0,h=this.sub(c),c.negative^=1,h):c.negative===0&&this.negative!==0?(this.negative=0,h=c.sub(this),this.negative=1,h):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},s.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var h=this.iadd(c);return c.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var w=this.cmp(c);if(w===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,O;w>0?(M=this,O=c):(M=c,O=this);for(var U=0,W=0;W<O.length;W++)h=(M.words[W]|0)-(O.words[W]|0)+U,U=h>>26,this.words[W]=h&67108863;for(;U!==0&&W<M.length;W++)h=(M.words[W]|0)+U,U=h>>26,this.words[W]=h&67108863;if(U===0&&W<M.length&&M!==this)for(;W<M.length;W++)this.words[W]=M.words[W];return this.length=Math.max(this.length,W),M!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(c){return this.clone().isub(c)};function E(S,c,h){h.negative=c.negative^S.negative;var w=S.length+c.length|0;h.length=w,w=w-1|0;var M=S.words[0]|0,O=c.words[0]|0,U=M*O,W=U&67108863,I=U/67108864|0;h.words[0]=W;for(var l=1;l<w;l++){for(var F=I>>>26,ee=I&67108863,J=Math.min(l,c.length-1),G=Math.max(0,l-S.length+1);G<=J;G++){var he=l-G|0;M=S.words[he]|0,O=c.words[G]|0,U=M*O+ee,F+=U/67108864|0,ee=U&67108863}h.words[l]=ee|0,I=F|0}return I!==0?h.words[l]=I|0:h.length--,h.strip()}var D=function(c,h,w){var M=c.words,O=h.words,U=w.words,W=0,I,l,F,ee=M[0]|0,J=ee&8191,G=ee>>>13,he=M[1]|0,_e=he&8191,Le=he>>>13,Ie=M[2]|0,je=Ie&8191,Ke=Ie>>>13,dr=M[3]|0,at=dr&8191,Je=dr>>>13,Nt=M[4]|0,vt=Nt&8191,rt=Nt>>>13,nr=M[5]|0,dt=nr&8191,Qe=nr>>>13,Qt=M[6]|0,et=Qt&8191,Ve=Qt>>>13,Kt=M[7]|0,re=Kt&8191,Ae=Kt>>>13,Ht=M[8]|0,tt=Ht&8191,Ft=Ht>>>13,sr=M[9]|0,At=sr&8191,nt=sr>>>13,ir=O[0]|0,Bt=ir&8191,ot=ir>>>13,er=O[1]|0,yt=er&8191,gt=er>>>13,ar=O[2]|0,ut=ar&8191,_t=ar>>>13,tr=O[3]|0,Et=tr&8191,Mt=tr>>>13,Wt=O[4]|0,mt=Wt&8191,ht=Wt>>>13,ur=O[5]|0,Ct=ur&8191,St=ur>>>13,wr=O[6]|0,Ze=wr&8191,qe=wr>>>13,y=O[7]|0,C=y&8191,B=y>>>13,d=O[8]|0,R=d&8191,g=d>>>13,L=O[9]|0,K=L&8191,ne=L>>>13;w.negative=c.negative^h.negative,w.length=19,I=Math.imul(J,Bt),l=Math.imul(J,ot),l=l+Math.imul(G,Bt)|0,F=Math.imul(G,ot);var pe=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(pe>>>26)|0,pe&=67108863,I=Math.imul(_e,Bt),l=Math.imul(_e,ot),l=l+Math.imul(Le,Bt)|0,F=Math.imul(Le,ot),I=I+Math.imul(J,yt)|0,l=l+Math.imul(J,gt)|0,l=l+Math.imul(G,yt)|0,F=F+Math.imul(G,gt)|0;var de=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(de>>>26)|0,de&=67108863,I=Math.imul(je,Bt),l=Math.imul(je,ot),l=l+Math.imul(Ke,Bt)|0,F=Math.imul(Ke,ot),I=I+Math.imul(_e,yt)|0,l=l+Math.imul(_e,gt)|0,l=l+Math.imul(Le,yt)|0,F=F+Math.imul(Le,gt)|0,I=I+Math.imul(J,ut)|0,l=l+Math.imul(J,_t)|0,l=l+Math.imul(G,ut)|0,F=F+Math.imul(G,_t)|0;var ge=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ge>>>26)|0,ge&=67108863,I=Math.imul(at,Bt),l=Math.imul(at,ot),l=l+Math.imul(Je,Bt)|0,F=Math.imul(Je,ot),I=I+Math.imul(je,yt)|0,l=l+Math.imul(je,gt)|0,l=l+Math.imul(Ke,yt)|0,F=F+Math.imul(Ke,gt)|0,I=I+Math.imul(_e,ut)|0,l=l+Math.imul(_e,_t)|0,l=l+Math.imul(Le,ut)|0,F=F+Math.imul(Le,_t)|0,I=I+Math.imul(J,Et)|0,l=l+Math.imul(J,Mt)|0,l=l+Math.imul(G,Et)|0,F=F+Math.imul(G,Mt)|0;var ue=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ue>>>26)|0,ue&=67108863,I=Math.imul(vt,Bt),l=Math.imul(vt,ot),l=l+Math.imul(rt,Bt)|0,F=Math.imul(rt,ot),I=I+Math.imul(at,yt)|0,l=l+Math.imul(at,gt)|0,l=l+Math.imul(Je,yt)|0,F=F+Math.imul(Je,gt)|0,I=I+Math.imul(je,ut)|0,l=l+Math.imul(je,_t)|0,l=l+Math.imul(Ke,ut)|0,F=F+Math.imul(Ke,_t)|0,I=I+Math.imul(_e,Et)|0,l=l+Math.imul(_e,Mt)|0,l=l+Math.imul(Le,Et)|0,F=F+Math.imul(Le,Mt)|0,I=I+Math.imul(J,mt)|0,l=l+Math.imul(J,ht)|0,l=l+Math.imul(G,mt)|0,F=F+Math.imul(G,ht)|0;var Se=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Se>>>26)|0,Se&=67108863,I=Math.imul(dt,Bt),l=Math.imul(dt,ot),l=l+Math.imul(Qe,Bt)|0,F=Math.imul(Qe,ot),I=I+Math.imul(vt,yt)|0,l=l+Math.imul(vt,gt)|0,l=l+Math.imul(rt,yt)|0,F=F+Math.imul(rt,gt)|0,I=I+Math.imul(at,ut)|0,l=l+Math.imul(at,_t)|0,l=l+Math.imul(Je,ut)|0,F=F+Math.imul(Je,_t)|0,I=I+Math.imul(je,Et)|0,l=l+Math.imul(je,Mt)|0,l=l+Math.imul(Ke,Et)|0,F=F+Math.imul(Ke,Mt)|0,I=I+Math.imul(_e,mt)|0,l=l+Math.imul(_e,ht)|0,l=l+Math.imul(Le,mt)|0,F=F+Math.imul(Le,ht)|0,I=I+Math.imul(J,Ct)|0,l=l+Math.imul(J,St)|0,l=l+Math.imul(G,Ct)|0,F=F+Math.imul(G,St)|0;var Ee=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,I=Math.imul(et,Bt),l=Math.imul(et,ot),l=l+Math.imul(Ve,Bt)|0,F=Math.imul(Ve,ot),I=I+Math.imul(dt,yt)|0,l=l+Math.imul(dt,gt)|0,l=l+Math.imul(Qe,yt)|0,F=F+Math.imul(Qe,gt)|0,I=I+Math.imul(vt,ut)|0,l=l+Math.imul(vt,_t)|0,l=l+Math.imul(rt,ut)|0,F=F+Math.imul(rt,_t)|0,I=I+Math.imul(at,Et)|0,l=l+Math.imul(at,Mt)|0,l=l+Math.imul(Je,Et)|0,F=F+Math.imul(Je,Mt)|0,I=I+Math.imul(je,mt)|0,l=l+Math.imul(je,ht)|0,l=l+Math.imul(Ke,mt)|0,F=F+Math.imul(Ke,ht)|0,I=I+Math.imul(_e,Ct)|0,l=l+Math.imul(_e,St)|0,l=l+Math.imul(Le,Ct)|0,F=F+Math.imul(Le,St)|0,I=I+Math.imul(J,Ze)|0,l=l+Math.imul(J,qe)|0,l=l+Math.imul(G,Ze)|0,F=F+Math.imul(G,qe)|0;var Fe=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,I=Math.imul(re,Bt),l=Math.imul(re,ot),l=l+Math.imul(Ae,Bt)|0,F=Math.imul(Ae,ot),I=I+Math.imul(et,yt)|0,l=l+Math.imul(et,gt)|0,l=l+Math.imul(Ve,yt)|0,F=F+Math.imul(Ve,gt)|0,I=I+Math.imul(dt,ut)|0,l=l+Math.imul(dt,_t)|0,l=l+Math.imul(Qe,ut)|0,F=F+Math.imul(Qe,_t)|0,I=I+Math.imul(vt,Et)|0,l=l+Math.imul(vt,Mt)|0,l=l+Math.imul(rt,Et)|0,F=F+Math.imul(rt,Mt)|0,I=I+Math.imul(at,mt)|0,l=l+Math.imul(at,ht)|0,l=l+Math.imul(Je,mt)|0,F=F+Math.imul(Je,ht)|0,I=I+Math.imul(je,Ct)|0,l=l+Math.imul(je,St)|0,l=l+Math.imul(Ke,Ct)|0,F=F+Math.imul(Ke,St)|0,I=I+Math.imul(_e,Ze)|0,l=l+Math.imul(_e,qe)|0,l=l+Math.imul(Le,Ze)|0,F=F+Math.imul(Le,qe)|0,I=I+Math.imul(J,C)|0,l=l+Math.imul(J,B)|0,l=l+Math.imul(G,C)|0,F=F+Math.imul(G,B)|0;var ke=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ke>>>26)|0,ke&=67108863,I=Math.imul(tt,Bt),l=Math.imul(tt,ot),l=l+Math.imul(Ft,Bt)|0,F=Math.imul(Ft,ot),I=I+Math.imul(re,yt)|0,l=l+Math.imul(re,gt)|0,l=l+Math.imul(Ae,yt)|0,F=F+Math.imul(Ae,gt)|0,I=I+Math.imul(et,ut)|0,l=l+Math.imul(et,_t)|0,l=l+Math.imul(Ve,ut)|0,F=F+Math.imul(Ve,_t)|0,I=I+Math.imul(dt,Et)|0,l=l+Math.imul(dt,Mt)|0,l=l+Math.imul(Qe,Et)|0,F=F+Math.imul(Qe,Mt)|0,I=I+Math.imul(vt,mt)|0,l=l+Math.imul(vt,ht)|0,l=l+Math.imul(rt,mt)|0,F=F+Math.imul(rt,ht)|0,I=I+Math.imul(at,Ct)|0,l=l+Math.imul(at,St)|0,l=l+Math.imul(Je,Ct)|0,F=F+Math.imul(Je,St)|0,I=I+Math.imul(je,Ze)|0,l=l+Math.imul(je,qe)|0,l=l+Math.imul(Ke,Ze)|0,F=F+Math.imul(Ke,qe)|0,I=I+Math.imul(_e,C)|0,l=l+Math.imul(_e,B)|0,l=l+Math.imul(Le,C)|0,F=F+Math.imul(Le,B)|0,I=I+Math.imul(J,R)|0,l=l+Math.imul(J,g)|0,l=l+Math.imul(G,R)|0,F=F+Math.imul(G,g)|0;var Oe=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,I=Math.imul(At,Bt),l=Math.imul(At,ot),l=l+Math.imul(nt,Bt)|0,F=Math.imul(nt,ot),I=I+Math.imul(tt,yt)|0,l=l+Math.imul(tt,gt)|0,l=l+Math.imul(Ft,yt)|0,F=F+Math.imul(Ft,gt)|0,I=I+Math.imul(re,ut)|0,l=l+Math.imul(re,_t)|0,l=l+Math.imul(Ae,ut)|0,F=F+Math.imul(Ae,_t)|0,I=I+Math.imul(et,Et)|0,l=l+Math.imul(et,Mt)|0,l=l+Math.imul(Ve,Et)|0,F=F+Math.imul(Ve,Mt)|0,I=I+Math.imul(dt,mt)|0,l=l+Math.imul(dt,ht)|0,l=l+Math.imul(Qe,mt)|0,F=F+Math.imul(Qe,ht)|0,I=I+Math.imul(vt,Ct)|0,l=l+Math.imul(vt,St)|0,l=l+Math.imul(rt,Ct)|0,F=F+Math.imul(rt,St)|0,I=I+Math.imul(at,Ze)|0,l=l+Math.imul(at,qe)|0,l=l+Math.imul(Je,Ze)|0,F=F+Math.imul(Je,qe)|0,I=I+Math.imul(je,C)|0,l=l+Math.imul(je,B)|0,l=l+Math.imul(Ke,C)|0,F=F+Math.imul(Ke,B)|0,I=I+Math.imul(_e,R)|0,l=l+Math.imul(_e,g)|0,l=l+Math.imul(Le,R)|0,F=F+Math.imul(Le,g)|0,I=I+Math.imul(J,K)|0,l=l+Math.imul(J,ne)|0,l=l+Math.imul(G,K)|0,F=F+Math.imul(G,ne)|0;var Me=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Me>>>26)|0,Me&=67108863,I=Math.imul(At,yt),l=Math.imul(At,gt),l=l+Math.imul(nt,yt)|0,F=Math.imul(nt,gt),I=I+Math.imul(tt,ut)|0,l=l+Math.imul(tt,_t)|0,l=l+Math.imul(Ft,ut)|0,F=F+Math.imul(Ft,_t)|0,I=I+Math.imul(re,Et)|0,l=l+Math.imul(re,Mt)|0,l=l+Math.imul(Ae,Et)|0,F=F+Math.imul(Ae,Mt)|0,I=I+Math.imul(et,mt)|0,l=l+Math.imul(et,ht)|0,l=l+Math.imul(Ve,mt)|0,F=F+Math.imul(Ve,ht)|0,I=I+Math.imul(dt,Ct)|0,l=l+Math.imul(dt,St)|0,l=l+Math.imul(Qe,Ct)|0,F=F+Math.imul(Qe,St)|0,I=I+Math.imul(vt,Ze)|0,l=l+Math.imul(vt,qe)|0,l=l+Math.imul(rt,Ze)|0,F=F+Math.imul(rt,qe)|0,I=I+Math.imul(at,C)|0,l=l+Math.imul(at,B)|0,l=l+Math.imul(Je,C)|0,F=F+Math.imul(Je,B)|0,I=I+Math.imul(je,R)|0,l=l+Math.imul(je,g)|0,l=l+Math.imul(Ke,R)|0,F=F+Math.imul(Ke,g)|0,I=I+Math.imul(_e,K)|0,l=l+Math.imul(_e,ne)|0,l=l+Math.imul(Le,K)|0,F=F+Math.imul(Le,ne)|0;var De=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(De>>>26)|0,De&=67108863,I=Math.imul(At,ut),l=Math.imul(At,_t),l=l+Math.imul(nt,ut)|0,F=Math.imul(nt,_t),I=I+Math.imul(tt,Et)|0,l=l+Math.imul(tt,Mt)|0,l=l+Math.imul(Ft,Et)|0,F=F+Math.imul(Ft,Mt)|0,I=I+Math.imul(re,mt)|0,l=l+Math.imul(re,ht)|0,l=l+Math.imul(Ae,mt)|0,F=F+Math.imul(Ae,ht)|0,I=I+Math.imul(et,Ct)|0,l=l+Math.imul(et,St)|0,l=l+Math.imul(Ve,Ct)|0,F=F+Math.imul(Ve,St)|0,I=I+Math.imul(dt,Ze)|0,l=l+Math.imul(dt,qe)|0,l=l+Math.imul(Qe,Ze)|0,F=F+Math.imul(Qe,qe)|0,I=I+Math.imul(vt,C)|0,l=l+Math.imul(vt,B)|0,l=l+Math.imul(rt,C)|0,F=F+Math.imul(rt,B)|0,I=I+Math.imul(at,R)|0,l=l+Math.imul(at,g)|0,l=l+Math.imul(Je,R)|0,F=F+Math.imul(Je,g)|0,I=I+Math.imul(je,K)|0,l=l+Math.imul(je,ne)|0,l=l+Math.imul(Ke,K)|0,F=F+Math.imul(Ke,ne)|0;var we=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(we>>>26)|0,we&=67108863,I=Math.imul(At,Et),l=Math.imul(At,Mt),l=l+Math.imul(nt,Et)|0,F=Math.imul(nt,Mt),I=I+Math.imul(tt,mt)|0,l=l+Math.imul(tt,ht)|0,l=l+Math.imul(Ft,mt)|0,F=F+Math.imul(Ft,ht)|0,I=I+Math.imul(re,Ct)|0,l=l+Math.imul(re,St)|0,l=l+Math.imul(Ae,Ct)|0,F=F+Math.imul(Ae,St)|0,I=I+Math.imul(et,Ze)|0,l=l+Math.imul(et,qe)|0,l=l+Math.imul(Ve,Ze)|0,F=F+Math.imul(Ve,qe)|0,I=I+Math.imul(dt,C)|0,l=l+Math.imul(dt,B)|0,l=l+Math.imul(Qe,C)|0,F=F+Math.imul(Qe,B)|0,I=I+Math.imul(vt,R)|0,l=l+Math.imul(vt,g)|0,l=l+Math.imul(rt,R)|0,F=F+Math.imul(rt,g)|0,I=I+Math.imul(at,K)|0,l=l+Math.imul(at,ne)|0,l=l+Math.imul(Je,K)|0,F=F+Math.imul(Je,ne)|0;var Be=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Be>>>26)|0,Be&=67108863,I=Math.imul(At,mt),l=Math.imul(At,ht),l=l+Math.imul(nt,mt)|0,F=Math.imul(nt,ht),I=I+Math.imul(tt,Ct)|0,l=l+Math.imul(tt,St)|0,l=l+Math.imul(Ft,Ct)|0,F=F+Math.imul(Ft,St)|0,I=I+Math.imul(re,Ze)|0,l=l+Math.imul(re,qe)|0,l=l+Math.imul(Ae,Ze)|0,F=F+Math.imul(Ae,qe)|0,I=I+Math.imul(et,C)|0,l=l+Math.imul(et,B)|0,l=l+Math.imul(Ve,C)|0,F=F+Math.imul(Ve,B)|0,I=I+Math.imul(dt,R)|0,l=l+Math.imul(dt,g)|0,l=l+Math.imul(Qe,R)|0,F=F+Math.imul(Qe,g)|0,I=I+Math.imul(vt,K)|0,l=l+Math.imul(vt,ne)|0,l=l+Math.imul(rt,K)|0,F=F+Math.imul(rt,ne)|0;var ye=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ye>>>26)|0,ye&=67108863,I=Math.imul(At,Ct),l=Math.imul(At,St),l=l+Math.imul(nt,Ct)|0,F=Math.imul(nt,St),I=I+Math.imul(tt,Ze)|0,l=l+Math.imul(tt,qe)|0,l=l+Math.imul(Ft,Ze)|0,F=F+Math.imul(Ft,qe)|0,I=I+Math.imul(re,C)|0,l=l+Math.imul(re,B)|0,l=l+Math.imul(Ae,C)|0,F=F+Math.imul(Ae,B)|0,I=I+Math.imul(et,R)|0,l=l+Math.imul(et,g)|0,l=l+Math.imul(Ve,R)|0,F=F+Math.imul(Ve,g)|0,I=I+Math.imul(dt,K)|0,l=l+Math.imul(dt,ne)|0,l=l+Math.imul(Qe,K)|0,F=F+Math.imul(Qe,ne)|0;var Ce=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,I=Math.imul(At,Ze),l=Math.imul(At,qe),l=l+Math.imul(nt,Ze)|0,F=Math.imul(nt,qe),I=I+Math.imul(tt,C)|0,l=l+Math.imul(tt,B)|0,l=l+Math.imul(Ft,C)|0,F=F+Math.imul(Ft,B)|0,I=I+Math.imul(re,R)|0,l=l+Math.imul(re,g)|0,l=l+Math.imul(Ae,R)|0,F=F+Math.imul(Ae,g)|0,I=I+Math.imul(et,K)|0,l=l+Math.imul(et,ne)|0,l=l+Math.imul(Ve,K)|0,F=F+Math.imul(Ve,ne)|0;var Re=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Re>>>26)|0,Re&=67108863,I=Math.imul(At,C),l=Math.imul(At,B),l=l+Math.imul(nt,C)|0,F=Math.imul(nt,B),I=I+Math.imul(tt,R)|0,l=l+Math.imul(tt,g)|0,l=l+Math.imul(Ft,R)|0,F=F+Math.imul(Ft,g)|0,I=I+Math.imul(re,K)|0,l=l+Math.imul(re,ne)|0,l=l+Math.imul(Ae,K)|0,F=F+Math.imul(Ae,ne)|0;var me=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(me>>>26)|0,me&=67108863,I=Math.imul(At,R),l=Math.imul(At,g),l=l+Math.imul(nt,R)|0,F=Math.imul(nt,g),I=I+Math.imul(tt,K)|0,l=l+Math.imul(tt,ne)|0,l=l+Math.imul(Ft,K)|0,F=F+Math.imul(Ft,ne)|0;var ie=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ie>>>26)|0,ie&=67108863,I=Math.imul(At,K),l=Math.imul(At,ne),l=l+Math.imul(nt,K)|0,F=Math.imul(nt,ne);var se=(W+I|0)+((l&8191)<<13)|0;return W=(F+(l>>>13)|0)+(se>>>26)|0,se&=67108863,U[0]=pe,U[1]=de,U[2]=ge,U[3]=ue,U[4]=Se,U[5]=Ee,U[6]=Fe,U[7]=ke,U[8]=Oe,U[9]=Me,U[10]=De,U[11]=we,U[12]=Be,U[13]=ye,U[14]=Ce,U[15]=Re,U[16]=me,U[17]=ie,U[18]=se,W!==0&&(U[19]=W,w.length++),w};Math.imul||(D=E);function k(S,c,h){h.negative=c.negative^S.negative,h.length=S.length+c.length;for(var w=0,M=0,O=0;O<h.length-1;O++){var U=M;M=0;for(var W=w&67108863,I=Math.min(O,c.length-1),l=Math.max(0,O-S.length+1);l<=I;l++){var F=O-l,ee=S.words[F]|0,J=c.words[l]|0,G=ee*J,he=G&67108863;U=U+(G/67108864|0)|0,he=he+W|0,W=he&67108863,U=U+(he>>>26)|0,M+=U>>>26,U&=67108863}h.words[O]=W,w=U,U=M}return w!==0?h.words[O]=w:h.length--,h.strip()}function H(S,c,h){var w=new P;return w.mulp(S,c,h)}s.prototype.mulTo=function(c,h){var w,M=this.length+c.length;return this.length===10&&c.length===10?w=D(this,c,h):M<63?w=E(this,c,h):M<1024?w=k(this,c,h):w=H(this,c,h),w};function P(S,c){this.x=S,this.y=c}P.prototype.makeRBT=function(c){for(var h=new Array(c),w=s.prototype._countBits(c)-1,M=0;M<c;M++)h[M]=this.revBin(M,w,c);return h},P.prototype.revBin=function(c,h,w){if(c===0||c===w-1)return c;for(var M=0,O=0;O<h;O++)M|=(c&1)<<h-O-1,c>>=1;return M},P.prototype.permute=function(c,h,w,M,O,U){for(var W=0;W<U;W++)M[W]=h[c[W]],O[W]=w[c[W]]},P.prototype.transform=function(c,h,w,M,O,U){this.permute(U,c,h,w,M,O);for(var W=1;W<O;W<<=1)for(var I=W<<1,l=Math.cos(2*Math.PI/I),F=Math.sin(2*Math.PI/I),ee=0;ee<O;ee+=I)for(var J=l,G=F,he=0;he<W;he++){var _e=w[ee+he],Le=M[ee+he],Ie=w[ee+he+W],je=M[ee+he+W],Ke=J*Ie-G*je;je=J*je+G*Ie,Ie=Ke,w[ee+he]=_e+Ie,M[ee+he]=Le+je,w[ee+he+W]=_e-Ie,M[ee+he+W]=Le-je,he!==I&&(Ke=l*J-F*G,G=l*G+F*J,J=Ke)}},P.prototype.guessLen13b=function(c,h){var w=Math.max(h,c)|1,M=w&1,O=0;for(w=w/2|0;w;w=w>>>1)O++;return 1<<O+1+M},P.prototype.conjugate=function(c,h,w){if(!(w<=1))for(var M=0;M<w/2;M++){var O=c[M];c[M]=c[w-M-1],c[w-M-1]=O,O=h[M],h[M]=-h[w-M-1],h[w-M-1]=-O}},P.prototype.normalize13b=function(c,h){for(var w=0,M=0;M<h/2;M++){var O=Math.round(c[2*M+1]/h)*8192+Math.round(c[2*M]/h)+w;c[M]=O&67108863,O<67108864?w=0:w=O/67108864|0}return c},P.prototype.convert13b=function(c,h,w,M){for(var O=0,U=0;U<h;U++)O=O+(c[U]|0),w[2*U]=O&8191,O=O>>>13,w[2*U+1]=O&8191,O=O>>>13;for(U=2*h;U<M;++U)w[U]=0;r(O===0),r((O&-8192)===0)},P.prototype.stub=function(c){for(var h=new Array(c),w=0;w<c;w++)h[w]=0;return h},P.prototype.mulp=function(c,h,w){var M=2*this.guessLen13b(c.length,h.length),O=this.makeRBT(M),U=this.stub(M),W=new Array(M),I=new Array(M),l=new Array(M),F=new Array(M),ee=new Array(M),J=new Array(M),G=w.words;G.length=M,this.convert13b(c.words,c.length,W,M),this.convert13b(h.words,h.length,F,M),this.transform(W,U,I,l,M,O),this.transform(F,U,ee,J,M,O);for(var he=0;he<M;he++){var _e=I[he]*ee[he]-l[he]*J[he];l[he]=I[he]*J[he]+l[he]*ee[he],I[he]=_e}return this.conjugate(I,l,M),this.transform(I,l,G,U,M,O),this.conjugate(G,U,M),this.normalize13b(G,M),w.negative=c.negative^h.negative,w.length=c.length+h.length,w.strip()},s.prototype.mul=function(c){var h=new s(null);return h.words=new Array(this.length+c.length),this.mulTo(c,h)},s.prototype.mulf=function(c){var h=new s(null);return h.words=new Array(this.length+c.length),H(this,c,h)},s.prototype.imul=function(c){return this.clone().mulTo(c,this)},s.prototype.imuln=function(c){r(typeof c=="number"),r(c<67108864);for(var h=0,w=0;w<this.length;w++){var M=(this.words[w]|0)*c,O=(M&67108863)+(h&67108863);h>>=26,h+=M/67108864|0,h+=O>>>26,this.words[w]=O&67108863}return h!==0&&(this.words[w]=h,this.length++),this},s.prototype.muln=function(c){return this.clone().imuln(c)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(c){var h=_(c);if(h.length===0)return new s(1);for(var w=this,M=0;M<h.length&&h[M]===0;M++,w=w.sqr());if(++M<h.length)for(var O=w.sqr();M<h.length;M++,O=O.sqr())h[M]!==0&&(w=w.mul(O));return w},s.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var h=c%26,w=(c-h)/26,M=67108863>>>26-h<<26-h,O;if(h!==0){var U=0;for(O=0;O<this.length;O++){var W=this.words[O]&M,I=(this.words[O]|0)-W<<h;this.words[O]=I|U,U=W>>>26-h}U&&(this.words[O]=U,this.length++)}if(w!==0){for(O=this.length-1;O>=0;O--)this.words[O+w]=this.words[O];for(O=0;O<w;O++)this.words[O]=0;this.length+=w}return this.strip()},s.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},s.prototype.iushrn=function(c,h,w){r(typeof c=="number"&&c>=0);var M;h?M=(h-h%26)/26:M=0;var O=c%26,U=Math.min((c-O)/26,this.length),W=67108863^67108863>>>O<<O,I=w;if(M-=U,M=Math.max(0,M),I){for(var l=0;l<U;l++)I.words[l]=this.words[l];I.length=U}if(U!==0)if(this.length>U)for(this.length-=U,l=0;l<this.length;l++)this.words[l]=this.words[l+U];else this.words[0]=0,this.length=1;var F=0;for(l=this.length-1;l>=0&&(F!==0||l>=M);l--){var ee=this.words[l]|0;this.words[l]=F<<26-O|ee>>>O,F=ee&W}return I&&F!==0&&(I.words[I.length++]=F),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(c,h,w){return r(this.negative===0),this.iushrn(c,h,w)},s.prototype.shln=function(c){return this.clone().ishln(c)},s.prototype.ushln=function(c){return this.clone().iushln(c)},s.prototype.shrn=function(c){return this.clone().ishrn(c)},s.prototype.ushrn=function(c){return this.clone().iushrn(c)},s.prototype.testn=function(c){r(typeof c=="number"&&c>=0);var h=c%26,w=(c-h)/26,M=1<<h;if(this.length<=w)return!1;var O=this.words[w];return!!(O&M)},s.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var h=c%26,w=(c-h)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(h!==0&&w++,this.length=Math.min(w,this.length),h!==0){var M=67108863^67108863>>>h<<h;this.words[this.length-1]&=M}return this.strip()},s.prototype.maskn=function(c){return this.clone().imaskn(c)},s.prototype.iaddn=function(c){return r(typeof c=="number"),r(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},s.prototype._iaddn=function(c){this.words[0]+=c;for(var h=0;h<this.length&&this.words[h]>=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(c){if(r(typeof c=="number"),r(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h<this.length&&this.words[h]<0;h++)this.words[h]+=67108864,this.words[h+1]-=1;return this.strip()},s.prototype.addn=function(c){return this.clone().iaddn(c)},s.prototype.subn=function(c){return this.clone().isubn(c)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(c,h,w){var M=c.length+w,O;this._expand(M);var U,W=0;for(O=0;O<c.length;O++){U=(this.words[O+w]|0)+W;var I=(c.words[O]|0)*h;U-=I&67108863,W=(U>>26)-(I/67108864|0),this.words[O+w]=U&67108863}for(;O<this.length-w;O++)U=(this.words[O+w]|0)+W,W=U>>26,this.words[O+w]=U&67108863;if(W===0)return this.strip();for(r(W===-1),W=0,O=0;O<this.length;O++)U=-(this.words[O]|0)+W,W=U>>26,this.words[O]=U&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(c,h){var w=this.length-c.length,M=this.clone(),O=c,U=O.words[O.length-1]|0,W=this._countBits(U);w=26-W,w!==0&&(O=O.ushln(w),M.iushln(w),U=O.words[O.length-1]|0);var I=M.length-O.length,l;if(h!=="mod"){l=new s(null),l.length=I+1,l.words=new Array(l.length);for(var F=0;F<l.length;F++)l.words[F]=0}var ee=M.clone()._ishlnsubmul(O,1,I);ee.negative===0&&(M=ee,l&&(l.words[I]=1));for(var J=I-1;J>=0;J--){var G=(M.words[O.length+J]|0)*67108864+(M.words[O.length+J-1]|0);for(G=Math.min(G/U|0,67108863),M._ishlnsubmul(O,G,J);M.negative!==0;)G--,M.negative=0,M._ishlnsubmul(O,1,J),M.isZero()||(M.negative^=1);l&&(l.words[J]=G)}return l&&l.strip(),M.strip(),h!=="div"&&w!==0&&M.iushrn(w),{div:l||null,mod:M}},s.prototype.divmod=function(c,h,w){if(r(!c.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var M,O,U;return this.negative!==0&&c.negative===0?(U=this.neg().divmod(c,h),h!=="mod"&&(M=U.div.neg()),h!=="div"&&(O=U.mod.neg(),w&&O.negative!==0&&O.iadd(c)),{div:M,mod:O}):this.negative===0&&c.negative!==0?(U=this.divmod(c.neg(),h),h!=="mod"&&(M=U.div.neg()),{div:M,mod:U.mod}):this.negative&c.negative?(U=this.neg().divmod(c.neg(),h),h!=="div"&&(O=U.mod.neg(),w&&O.negative!==0&&O.isub(c)),{div:U.div,mod:O}):c.length>this.length||this.cmp(c)<0?{div:new s(0),mod:this}:c.length===1?h==="div"?{div:this.divn(c.words[0]),mod:null}:h==="mod"?{div:null,mod:new s(this.modn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new s(this.modn(c.words[0]))}:this._wordDiv(c,h)},s.prototype.div=function(c){return this.divmod(c,"div",!1).div},s.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},s.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},s.prototype.divRound=function(c){var h=this.divmod(c);if(h.mod.isZero())return h.div;var w=h.div.negative!==0?h.mod.isub(c):h.mod,M=c.ushrn(1),O=c.andln(1),U=w.cmp(M);return U<0||O===1&&U===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(c){r(c<=67108863);for(var h=(1<<26)%c,w=0,M=this.length-1;M>=0;M--)w=(h*w+(this.words[M]|0))%c;return w},s.prototype.idivn=function(c){r(c<=67108863);for(var h=0,w=this.length-1;w>=0;w--){var M=(this.words[w]|0)+h*67108864;this.words[w]=M/c|0,h=M%c}return this.strip()},s.prototype.divn=function(c){return this.clone().idivn(c)},s.prototype.egcd=function(c){r(c.negative===0),r(!c.isZero());var h=this,w=c.clone();h.negative!==0?h=h.umod(c):h=h.clone();for(var M=new s(1),O=new s(0),U=new s(0),W=new s(1),I=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++I;for(var l=w.clone(),F=h.clone();!h.isZero();){for(var ee=0,J=1;!(h.words[0]&J)&&ee<26;++ee,J<<=1);if(ee>0)for(h.iushrn(ee);ee-- >0;)(M.isOdd()||O.isOdd())&&(M.iadd(l),O.isub(F)),M.iushrn(1),O.iushrn(1);for(var G=0,he=1;!(w.words[0]&he)&&G<26;++G,he<<=1);if(G>0)for(w.iushrn(G);G-- >0;)(U.isOdd()||W.isOdd())&&(U.iadd(l),W.isub(F)),U.iushrn(1),W.iushrn(1);h.cmp(w)>=0?(h.isub(w),M.isub(U),O.isub(W)):(w.isub(h),U.isub(M),W.isub(O))}return{a:U,b:W,gcd:w.iushln(I)}},s.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var h=this,w=c.clone();h.negative!==0?h=h.umod(c):h=h.clone();for(var M=new s(1),O=new s(0),U=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var W=0,I=1;!(h.words[0]&I)&&W<26;++W,I<<=1);if(W>0)for(h.iushrn(W);W-- >0;)M.isOdd()&&M.iadd(U),M.iushrn(1);for(var l=0,F=1;!(w.words[0]&F)&&l<26;++l,F<<=1);if(l>0)for(w.iushrn(l);l-- >0;)O.isOdd()&&O.iadd(U),O.iushrn(1);h.cmp(w)>=0?(h.isub(w),M.isub(O)):(w.isub(h),O.isub(M))}var ee;return h.cmpn(1)===0?ee=M:ee=O,ee.cmpn(0)<0&&ee.iadd(c),ee},s.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var h=this.clone(),w=c.clone();h.negative=0,w.negative=0;for(var M=0;h.isEven()&&w.isEven();M++)h.iushrn(1),w.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var O=h.cmp(w);if(O<0){var U=h;h=w,w=U}else if(O===0||w.cmpn(1)===0)break;h.isub(w)}while(!0);return w.iushln(M)},s.prototype.invm=function(c){return this.egcd(c).a.umod(c)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(c){return this.words[0]&c},s.prototype.bincn=function(c){r(typeof c=="number");var h=c%26,w=(c-h)/26,M=1<<h;if(this.length<=w)return this._expand(w+1),this.words[w]|=M,this;for(var O=M,U=w;O!==0&&U<this.length;U++){var W=this.words[U]|0;W+=O,O=W>>>26,W&=67108863,this.words[U]=W}return O!==0&&(this.words[U]=O,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(c){var h=c<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this.strip();var w;if(this.length>1)w=1;else{h&&(c=-c),r(c<=67108863,"Number is too big");var M=this.words[0]|0;w=M===c?0:M<c?-1:1}return this.negative!==0?-w|0:w},s.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var h=this.ucmp(c);return this.negative!==0?-h|0:h},s.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var h=0,w=this.length-1;w>=0;w--){var M=this.words[w]|0,O=c.words[w]|0;if(M!==O){M<O?h=-1:M>O&&(h=1);break}}return h},s.prototype.gtn=function(c){return this.cmpn(c)===1},s.prototype.gt=function(c){return this.cmp(c)===1},s.prototype.gten=function(c){return this.cmpn(c)>=0},s.prototype.gte=function(c){return this.cmp(c)>=0},s.prototype.ltn=function(c){return this.cmpn(c)===-1},s.prototype.lt=function(c){return this.cmp(c)===-1},s.prototype.lten=function(c){return this.cmpn(c)<=0},s.prototype.lte=function(c){return this.cmp(c)<=0},s.prototype.eqn=function(c){return this.cmpn(c)===0},s.prototype.eq=function(c){return this.cmp(c)===0},s.red=function(c){return new ae(c)},s.prototype.toRed=function(c){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(c){return this.red=c,this},s.prototype.forceRed=function(c){return r(!this.red,"Already a number in reduction context"),this._forceRed(c)},s.prototype.redAdd=function(c){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},s.prototype.redIAdd=function(c){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},s.prototype.redSub=function(c){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},s.prototype.redISub=function(c){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},s.prototype.redShl=function(c){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},s.prototype.redMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},s.prototype.redIMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(c){return r(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var T={k256:null,p224:null,p192:null,p25519:null};function z(S,c){this.name=S,this.p=new s(c,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var c=new s(null);return c.words=new Array(Math.ceil(this.n/13)),c},z.prototype.ireduce=function(c){var h=c,w;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),w=h.bitLength();while(w>this.n);var M=w<this.n?-1:h.ucmp(this.p);return M===0?(h.words[0]=0,h.length=1):M>0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},z.prototype.split=function(c,h){c.iushrn(this.n,0,h)},z.prototype.imulK=function(c){return c.imul(this.k)};function V(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(V,z),V.prototype.split=function(c,h){for(var w=4194303,M=Math.min(c.length,9),O=0;O<M;O++)h.words[O]=c.words[O];if(h.length=M,c.length<=9){c.words[0]=0,c.length=1;return}var U=c.words[9];for(h.words[h.length++]=U&w,O=10;O<c.length;O++){var W=c.words[O]|0;c.words[O-10]=(W&w)<<4|U>>>22,U=W}U>>>=22,c.words[O-10]=U,U===0&&c.length>10?c.length-=10:c.length-=9},V.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var h=0,w=0;w<c.length;w++){var M=c.words[w]|0;h+=M*977,c.words[w]=h&67108863,h=M*64+(h/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function Y(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}a(Y,z);function Z(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}a(Z,z);function fe(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}a(fe,z),fe.prototype.imulK=function(c){for(var h=0,w=0;w<c.length;w++){var M=(c.words[w]|0)*19+h,O=M&67108863;M>>>=26,c.words[w]=O,h=M}return h!==0&&(c.words[c.length++]=h),c},s._prime=function(c){if(T[c])return T[c];var h;if(c==="k256")h=new V;else if(c==="p224")h=new Y;else if(c==="p192")h=new Z;else if(c==="p25519")h=new fe;else throw new Error("Unknown prime "+c);return T[c]=h,h};function ae(S){if(typeof S=="string"){var c=s._prime(S);this.m=c.p,this.prime=c}else r(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}ae.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},ae.prototype._verify2=function(c,h){r((c.negative|h.negative)===0,"red works only with positives"),r(c.red&&c.red===h.red,"red works only with red numbers")},ae.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):c.umod(this.m)._forceRed(this)},ae.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},ae.prototype.add=function(c,h){this._verify2(c,h);var w=c.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},ae.prototype.iadd=function(c,h){this._verify2(c,h);var w=c.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},ae.prototype.sub=function(c,h){this._verify2(c,h);var w=c.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},ae.prototype.isub=function(c,h){this._verify2(c,h);var w=c.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},ae.prototype.shl=function(c,h){return this._verify1(c),this.imod(c.ushln(h))},ae.prototype.imul=function(c,h){return this._verify2(c,h),this.imod(c.imul(h))},ae.prototype.mul=function(c,h){return this._verify2(c,h),this.imod(c.mul(h))},ae.prototype.isqr=function(c){return this.imul(c,c.clone())},ae.prototype.sqr=function(c){return this.mul(c,c)},ae.prototype.sqrt=function(c){if(c.isZero())return c.clone();var h=this.m.andln(3);if(r(h%2===1),h===3){var w=this.m.add(new s(1)).iushrn(2);return this.pow(c,w)}for(var M=this.m.subn(1),O=0;!M.isZero()&&M.andln(1)===0;)O++,M.iushrn(1);r(!M.isZero());var U=new s(1).toRed(this),W=U.redNeg(),I=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new s(2*l*l).toRed(this);this.pow(l,I).cmp(W)!==0;)l.redIAdd(W);for(var F=this.pow(l,M),ee=this.pow(c,M.addn(1).iushrn(1)),J=this.pow(c,M),G=O;J.cmp(U)!==0;){for(var he=J,_e=0;he.cmp(U)!==0;_e++)he=he.redSqr();r(_e<G);var Le=this.pow(F,new s(1).iushln(G-_e-1));ee=ee.redMul(Le),F=Le.redSqr(),J=J.redMul(F),G=_e}return ee},ae.prototype.invm=function(c){var h=c._invmp(this.m);return h.negative!==0?(h.negative=0,this.imod(h).redNeg()):this.imod(h)},ae.prototype.pow=function(c,h){if(h.isZero())return new s(1).toRed(this);if(h.cmpn(1)===0)return c.clone();var w=4,M=new Array(1<<w);M[0]=new s(1).toRed(this),M[1]=c;for(var O=2;O<M.length;O++)M[O]=this.mul(M[O-1],c);var U=M[0],W=0,I=0,l=h.bitLength()%26;for(l===0&&(l=26),O=h.length-1;O>=0;O--){for(var F=h.words[O],ee=l-1;ee>=0;ee--){var J=F>>ee&1;if(U!==M[0]&&(U=this.sqr(U)),J===0&&W===0){I=0;continue}W<<=1,W|=J,I++,!(I!==w&&(O!==0||ee!==0))&&(U=this.mul(U,M[W]),I=0,W=0)}l=26}return U},ae.prototype.convertTo=function(c){var h=c.umod(this.m);return h===c?h.clone():h},ae.prototype.convertFrom=function(c){var h=c.clone();return h.red=null,h},s.mont=function(c){return new X(c)};function X(S){ae.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(X,ae),X.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},X.prototype.convertFrom=function(c){var h=this.imod(c.mul(this.rinv));return h.red=null,h},X.prototype.imul=function(c,h){if(c.isZero()||h.isZero())return c.words[0]=0,c.length=1,c;var w=c.imul(h),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=w.isub(M).iushrn(this.shift),U=O;return O.cmp(this.m)>=0?U=O.isub(this.m):O.cmpn(0)<0&&(U=O.iadd(this.m)),U._forceRed(this)},X.prototype.mul=function(c,h){if(c.isZero()||h.isZero())return new s(0)._forceRed(this);var w=c.mul(h),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=w.isub(M).iushrn(this.shift),U=O;return O.cmp(this.m)>=0?U=O.isub(this.m):O.cmpn(0)<0&&(U=O.iadd(this.m)),U._forceRed(this)},X.prototype.invm=function(c){var h=this.imod(c._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(i,Ue)})(Si);var qr=Si.exports,e0=ws;function ws(i,e){if(!i)throw new Error(e||"Assertion failed")}ws.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Fi={};(function(i){var e=i;function t(s,b){if(Array.isArray(s))return s.slice();if(!s)return[];var p=[];if(typeof s!="string"){for(var u=0;u<s.length;u++)p[u]=s[u]|0;return p}if(b==="hex"){s=s.replace(/[^a-z0-9]+/ig,""),s.length%2!==0&&(s="0"+s);for(var u=0;u<s.length;u+=2)p.push(parseInt(s[u]+s[u+1],16))}else for(var u=0;u<s.length;u++){var f=s.charCodeAt(u),o=f>>8,x=f&255;o?p.push(o,x):p.push(x)}return p}e.toArray=t;function r(s){return s.length===1?"0"+s:s}e.zero2=r;function a(s){for(var b="",p=0;p<s.length;p++)b+=r(s[p].toString(16));return b}e.toHex=a,e.encode=function(b,p){return p==="hex"?a(b):b}})(Fi);(function(i){var e=i,t=qr,r=e0,a=Fi;e.assert=r,e.toArray=a.toArray,e.zero2=a.zero2,e.toHex=a.toHex,e.encode=a.encode;function s(o,x,v){var _=new Array(Math.max(o.bitLength(),v)+1),E;for(E=0;E<_.length;E+=1)_[E]=0;var D=1<<x+1,k=o.clone();for(E=0;E<_.length;E++){var H,P=k.andln(D-1);k.isOdd()?(P>(D>>1)-1?H=(D>>1)-P:H=P,k.isubn(H)):H=0,_[E]=H,k.iushrn(1)}return _}e.getNAF=s;function b(o,x){var v=[[],[]];o=o.clone(),x=x.clone();for(var _=0,E=0,D;o.cmpn(-_)>0||x.cmpn(-E)>0;){var k=o.andln(3)+_&3,H=x.andln(3)+E&3;k===3&&(k=-1),H===3&&(H=-1);var P;k&1?(D=o.andln(7)+_&7,(D===3||D===5)&&H===2?P=-k:P=k):P=0,v[0].push(P);var T;H&1?(D=x.andln(7)+E&7,(D===3||D===5)&&k===2?T=-H:T=H):T=0,v[1].push(T),2*_===P+1&&(_=1-_),2*E===T+1&&(E=1-E),o.iushrn(1),x.iushrn(1)}return v}e.getJSF=b;function p(o,x,v){var _="_"+x;o.prototype[x]=function(){return this[_]!==void 0?this[_]:this[_]=v.call(this)}}e.cachedProperty=p;function u(o){return typeof o=="string"?e.toArray(o,"hex"):o}e.parseBytes=u;function f(o){return new t(o,"hex","le")}e.intFromLE=f})(xr);var Mi={exports:{}},ni;Mi.exports=function(e){return ni||(ni=new $r(null)),ni.generate(e)};function $r(i){this.rand=i}Mi.exports.Rand=$r;$r.prototype.generate=function(e){return this._rand(e)};$r.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};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?$r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?$r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:typeof window=="object"&&($r.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var Hf=V0;if(typeof Hf.randomBytes!="function")throw new Error("Not supported");$r.prototype._rand=function(e){return Hf.randomBytes(e)}}catch{}var As=Mi.exports,Di={},Kr=qr,M0=xr,j0=M0.getNAF,Oo=M0.getJSF,W0=M0.assert;function Wr(i,e){this.type=i,this.p=new Kr(e.p,16),this.red=e.prime?Kr.red(e.prime):Kr.mont(this.p),this.zero=new Kr(0).toRed(this.red),this.one=new Kr(1).toRed(this.red),this.two=new Kr(2).toRed(this.red),this.n=e.n&&new Kr(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var X0=Wr;Wr.prototype.point=function(){throw new Error("Not implemented")};Wr.prototype.validate=function(){throw new Error("Not implemented")};Wr.prototype._fixedNafMul=function(e,t){W0(e.precomputed);var r=e._getDoubles(),a=j0(t,1,this._bitLength),s=(1<<r.step+1)-(r.step%2===0?2:1);s/=3;var b=[],p,u;for(p=0;p<a.length;p+=r.step){u=0;for(var f=p+r.step-1;f>=p;f--)u=(u<<1)+a[f];b.push(u)}for(var o=this.jpoint(null,null,null),x=this.jpoint(null,null,null),v=s;v>0;v--){for(p=0;p<b.length;p++)u=b[p],u===v?x=x.mixedAdd(r.points[p]):u===-v&&(x=x.mixedAdd(r.points[p].neg()));o=o.add(x)}return o.toP()};Wr.prototype._wnafMul=function(e,t){var r=4,a=e._getNAFPoints(r);r=a.wnd;for(var s=a.points,b=j0(t,r,this._bitLength),p=this.jpoint(null,null,null),u=b.length-1;u>=0;u--){for(var f=0;u>=0&&b[u]===0;u--)f++;if(u>=0&&f++,p=p.dblp(f),u<0)break;var o=b[u];W0(o!==0),e.type==="affine"?o>0?p=p.mixedAdd(s[o-1>>1]):p=p.mixedAdd(s[-o-1>>1].neg()):o>0?p=p.add(s[o-1>>1]):p=p.add(s[-o-1>>1].neg())}return e.type==="affine"?p.toP():p};Wr.prototype._wnafMulAdd=function(e,t,r,a,s){var b=this._wnafT1,p=this._wnafT2,u=this._wnafT3,f=0,o,x,v;for(o=0;o<a;o++){v=t[o];var _=v._getNAFPoints(e);b[o]=_.wnd,p[o]=_.points}for(o=a-1;o>=1;o-=2){var E=o-1,D=o;if(b[E]!==1||b[D]!==1){u[E]=j0(r[E],b[E],this._bitLength),u[D]=j0(r[D],b[D],this._bitLength),f=Math.max(u[E].length,f),f=Math.max(u[D].length,f);continue}var k=[t[E],null,null,t[D]];t[E].y.cmp(t[D].y)===0?(k[1]=t[E].add(t[D]),k[2]=t[E].toJ().mixedAdd(t[D].neg())):t[E].y.cmp(t[D].y.redNeg())===0?(k[1]=t[E].toJ().mixedAdd(t[D]),k[2]=t[E].add(t[D].neg())):(k[1]=t[E].toJ().mixedAdd(t[D]),k[2]=t[E].toJ().mixedAdd(t[D].neg()));var H=[-3,-1,-5,-7,0,7,5,1,3],P=Oo(r[E],r[D]);for(f=Math.max(P[0].length,f),u[E]=new Array(f),u[D]=new Array(f),x=0;x<f;x++){var T=P[0][x]|0,z=P[1][x]|0;u[E][x]=H[(T+1)*3+(z+1)],u[D][x]=0,p[E]=k}}var V=this.jpoint(null,null,null),Y=this._wnafT4;for(o=f;o>=0;o--){for(var Z=0;o>=0;){var fe=!0;for(x=0;x<a;x++)Y[x]=u[x][o]|0,Y[x]!==0&&(fe=!1);if(!fe)break;Z++,o--}if(o>=0&&Z++,V=V.dblp(Z),o<0)break;for(x=0;x<a;x++){var ae=Y[x];ae!==0&&(ae>0?v=p[x][ae-1>>1]:ae<0&&(v=p[x][-ae-1>>1].neg()),v.type==="affine"?V=V.mixedAdd(v):V=V.add(v))}}for(o=0;o<a;o++)p[o]=null;return s?V:V.toP()};function yr(i,e){this.curve=i,this.type=e,this.precomputed=null}Wr.BasePoint=yr;yr.prototype.eq=function(){throw new Error("Not implemented")};yr.prototype.validate=function(){return this.curve.validate(this)};Wr.prototype.decodePoint=function(e,t){e=M0.toArray(e,t);var r=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*r){e[0]===6?W0(e[e.length-1]%2===0):e[0]===7&&W0(e[e.length-1]%2===1);var a=this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));return a}else if((e[0]===2||e[0]===3)&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),e[0]===3);throw new Error("Unknown point format")};yr.prototype.encodeCompressed=function(e){return this.encode(e,!0)};yr.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))};yr.prototype.encode=function(e,t){return M0.encode(this._encode(t),e)};yr.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};yr.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):!1};yr.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],a=this,s=0;s<t;s+=e){for(var b=0;b<e;b++)a=a.dbl();r.push(a)}return{step:e,points:r}};yr.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,a=r===1?null:this.dbl(),s=1;s<r;s++)t[s]=t[s-1].add(a);return{wnd:e,points:t}};yr.prototype._getBeta=function(){return null};yr.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var xi={exports:{}};typeof Object.create=="function"?xi.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:xi.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}};var Z0=xi.exports,Io=xr,zt=qr,Ri=Z0,u0=X0,No=Io.assert;function mr(i){u0.call(this,"short",i),this.a=new zt(i.a,16).toRed(this.red),this.b=new zt(i.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(i),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Ri(mr,u0);var qo=mr;mr.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var t,r;if(e.beta)t=new zt(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);t=a[0].cmp(a[1])<0?a[0]:a[1],t=t.toRed(this.red)}if(e.lambda)r=new zt(e.lambda,16);else{var s=this._getEndoRoots(this.n);this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))===0?r=s[0]:(r=s[1],No(this.g.mul(r).x.cmp(this.g.x.redMul(t))===0))}var b;return e.basis?b=e.basis.map(function(p){return{a:new zt(p.a,16),b:new zt(p.b,16)}}):b=this._getEndoBasis(r),{beta:t,lambda:r,basis:b}}};mr.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:zt.mont(e),r=new zt(2).toRed(t).redInvm(),a=r.redNeg(),s=new zt(3).toRed(t).redNeg().redSqrt().redMul(r),b=a.redAdd(s).fromRed(),p=a.redSub(s).fromRed();return[b,p]};mr.prototype._getEndoBasis=function(e){for(var t=this.n.ushrn(Math.floor(this.n.bitLength()/2)),r=e,a=this.n.clone(),s=new zt(1),b=new zt(0),p=new zt(0),u=new zt(1),f,o,x,v,_,E,D,k=0,H,P;r.cmpn(0)!==0;){var T=a.div(r);H=a.sub(T.mul(r)),P=p.sub(T.mul(s));var z=u.sub(T.mul(b));if(!x&&H.cmp(t)<0)f=D.neg(),o=s,x=H.neg(),v=P;else if(x&&++k===2)break;D=H,a=r,r=H,p=s,s=P,u=b,b=z}_=H.neg(),E=P;var V=x.sqr().add(v.sqr()),Y=_.sqr().add(E.sqr());return Y.cmp(V)>=0&&(_=f,E=o),x.negative&&(x=x.neg(),v=v.neg()),_.negative&&(_=_.neg(),E=E.neg()),[{a:x,b:v},{a:_,b:E}]};mr.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],a=t[1],s=a.b.mul(e).divRound(this.n),b=r.b.neg().mul(e).divRound(this.n),p=s.mul(r.a),u=b.mul(a.a),f=s.mul(r.b),o=b.mul(a.b),x=e.sub(p).sub(u),v=f.add(o).neg();return{k1:x,k2:v}};mr.prototype.pointFromX=function(e,t){e=new zt(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=r.redSqrt();if(a.redSqr().redSub(r).cmp(this.zero)!==0)throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)};mr.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,a=this.a.redMul(t),s=t.redSqr().redMul(t).redIAdd(a).redIAdd(this.b);return r.redSqr().redISub(s).cmpn(0)===0};mr.prototype._endoWnafMulAdd=function(e,t,r){for(var a=this._endoWnafT1,s=this._endoWnafT2,b=0;b<e.length;b++){var p=this._endoSplit(t[b]),u=e[b],f=u._getBeta();p.k1.negative&&(p.k1.ineg(),u=u.neg(!0)),p.k2.negative&&(p.k2.ineg(),f=f.neg(!0)),a[b*2]=u,a[b*2+1]=f,s[b*2]=p.k1,s[b*2+1]=p.k2}for(var o=this._wnafMulAdd(1,a,s,b*2,r),x=0;x<b*2;x++)a[x]=null,s[x]=null;return o};function Jt(i,e,t,r){u0.BasePoint.call(this,i,"affine"),e===null&&t===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new zt(e,16),this.y=new zt(t,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Ri(Jt,u0.BasePoint);mr.prototype.point=function(e,t,r){return new Jt(this,e,t,r)};mr.prototype.pointFromJSON=function(e,t){return Jt.fromJSON(this,e,t)};Jt.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,a=function(s){return r.point(s.x.redMul(r.endo.beta),s.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(a)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(a)}}}return t}};Jt.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]};Jt.fromJSON=function(e,t,r){typeof t=="string"&&(t=JSON.parse(t));var a=e.point(t[0],t[1],r);if(!t[2])return a;function s(p){return e.point(p[0],p[1],r)}var b=t[2];return a.precomputed={beta:null,doubles:b.doubles&&{step:b.doubles.step,points:[a].concat(b.doubles.points.map(s))},naf:b.naf&&{wnd:b.naf.wnd,points:[a].concat(b.naf.points.map(s))}},a};Jt.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)+">"};Jt.prototype.isInfinity=function(){return this.inf};Jt.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(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),a=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,a)};Jt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),a=e.redInvm(),s=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(a),b=s.redSqr().redISub(this.x.redAdd(this.x)),p=s.redMul(this.x.redSub(b)).redISub(this.y);return this.curve.point(b,p)};Jt.prototype.getX=function(){return this.x.fromRed()};Jt.prototype.getY=function(){return this.y.fromRed()};Jt.prototype.mul=function(e){return e=new zt(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)};Jt.prototype.mulAdd=function(e,t,r){var a=[this,t],s=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,s):this.curve._wnafMulAdd(1,a,s,2)};Jt.prototype.jmulAdd=function(e,t,r){var a=[this,t],s=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,s,!0):this.curve._wnafMulAdd(1,a,s,2,!0)};Jt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Jt.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,a=function(s){return s.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(a)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(a)}}}return t};Jt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function rr(i,e,t,r){u0.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&r===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new zt(0)):(this.x=new zt(e,16),this.y=new zt(t,16),this.z=new zt(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Ri(rr,u0.BasePoint);mr.prototype.jpoint=function(e,t,r){return new rr(this,e,t,r)};rr.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),a=this.y.redMul(t).redMul(e);return this.curve.point(r,a)};rr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};rr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),a=this.x.redMul(t),s=e.x.redMul(r),b=this.y.redMul(t.redMul(e.z)),p=e.y.redMul(r.redMul(this.z)),u=a.redSub(s),f=b.redSub(p);if(u.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var o=u.redSqr(),x=o.redMul(u),v=a.redMul(o),_=f.redSqr().redIAdd(x).redISub(v).redISub(v),E=f.redMul(v.redISub(_)).redISub(b.redMul(x)),D=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(_,E,D)};rr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,a=e.x.redMul(t),s=this.y,b=e.y.redMul(t).redMul(this.z),p=r.redSub(a),u=s.redSub(b);if(p.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=p.redSqr(),o=f.redMul(p),x=r.redMul(f),v=u.redSqr().redIAdd(o).redISub(x).redISub(x),_=u.redMul(x.redISub(v)).redISub(s.redMul(o)),E=this.z.redMul(p);return this.curve.jpoint(v,_,E)};rr.prototype.dblp=function(e){if(e===0)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 a=this.curve.a,s=this.curve.tinv,b=this.x,p=this.y,u=this.z,f=u.redSqr().redSqr(),o=p.redAdd(p);for(t=0;t<e;t++){var x=b.redSqr(),v=o.redSqr(),_=v.redSqr(),E=x.redAdd(x).redIAdd(x).redIAdd(a.redMul(f)),D=b.redMul(v),k=E.redSqr().redISub(D.redAdd(D)),H=D.redISub(k),P=E.redMul(H);P=P.redIAdd(P).redISub(_);var T=o.redMul(u);t+1<e&&(f=f.redMul(_)),b=k,u=T,o=P}return this.curve.jpoint(b,o.redMul(s),u)};rr.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};rr.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var a=this.x.redSqr(),s=this.y.redSqr(),b=s.redSqr(),p=this.x.redAdd(s).redSqr().redISub(a).redISub(b);p=p.redIAdd(p);var u=a.redAdd(a).redIAdd(a),f=u.redSqr().redISub(p).redISub(p),o=b.redIAdd(b);o=o.redIAdd(o),o=o.redIAdd(o),e=f,t=u.redMul(p.redISub(f)).redISub(o),r=this.y.redAdd(this.y)}else{var x=this.x.redSqr(),v=this.y.redSqr(),_=v.redSqr(),E=this.x.redAdd(v).redSqr().redISub(x).redISub(_);E=E.redIAdd(E);var D=x.redAdd(x).redIAdd(x),k=D.redSqr(),H=_.redIAdd(_);H=H.redIAdd(H),H=H.redIAdd(H),e=k.redISub(E).redISub(E),t=D.redMul(E.redISub(e)).redISub(H),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)};rr.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var a=this.x.redSqr(),s=this.y.redSqr(),b=s.redSqr(),p=this.x.redAdd(s).redSqr().redISub(a).redISub(b);p=p.redIAdd(p);var u=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a),f=u.redSqr().redISub(p).redISub(p);e=f;var o=b.redIAdd(b);o=o.redIAdd(o),o=o.redIAdd(o),t=u.redMul(p.redISub(f)).redISub(o),r=this.y.redAdd(this.y)}else{var x=this.z.redSqr(),v=this.y.redSqr(),_=this.x.redMul(v),E=this.x.redSub(x).redMul(this.x.redAdd(x));E=E.redAdd(E).redIAdd(E);var D=_.redIAdd(_);D=D.redIAdd(D);var k=D.redAdd(D);e=E.redSqr().redISub(k),r=this.y.redAdd(this.z).redSqr().redISub(v).redISub(x);var H=v.redSqr();H=H.redIAdd(H),H=H.redIAdd(H),H=H.redIAdd(H),t=E.redMul(D.redISub(e)).redISub(H)}return this.curve.jpoint(e,t,r)};rr.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,a=this.z,s=a.redSqr().redSqr(),b=t.redSqr(),p=r.redSqr(),u=b.redAdd(b).redIAdd(b).redIAdd(e.redMul(s)),f=t.redAdd(t);f=f.redIAdd(f);var o=f.redMul(p),x=u.redSqr().redISub(o.redAdd(o)),v=o.redISub(x),_=p.redSqr();_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var E=u.redMul(v).redISub(_),D=r.redAdd(r).redMul(a);return this.curve.jpoint(x,E,D)};rr.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(),a=t.redSqr(),s=e.redAdd(e).redIAdd(e),b=s.redSqr(),p=this.x.redAdd(t).redSqr().redISub(e).redISub(a);p=p.redIAdd(p),p=p.redAdd(p).redIAdd(p),p=p.redISub(b);var u=p.redSqr(),f=a.redIAdd(a);f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var o=s.redIAdd(p).redSqr().redISub(b).redISub(u).redISub(f),x=t.redMul(o);x=x.redIAdd(x),x=x.redIAdd(x);var v=this.x.redMul(u).redISub(x);v=v.redIAdd(v),v=v.redIAdd(v);var _=this.y.redMul(o.redMul(f.redISub(o)).redISub(p.redMul(u)));_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var E=this.z.redAdd(p).redSqr().redISub(r).redISub(u);return this.curve.jpoint(v,_,E)};rr.prototype.mul=function(e,t){return e=new zt(e,t),this.curve._wnafMul(this,e)};rr.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)!==0)return!1;var a=t.redMul(this.z),s=r.redMul(e.z);return this.y.redMul(s).redISub(e.y.redMul(a)).cmpn(0)===0};rr.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(this.x.cmp(r)===0)return!0;for(var a=e.clone(),s=this.curve.redN.redMul(t);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(s),this.x.cmp(r)===0)return!0}};rr.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)+">"};rr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var i0=qr,Bs=Z0,G0=X0,zo=xr;function h0(i){G0.call(this,"mont",i),this.a=new i0(i.a,16).toRed(this.red),this.b=new i0(i.b,16).toRed(this.red),this.i4=new i0(4).toRed(this.red).redInvm(),this.two=new i0(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Bs(h0,G0);var Lo=h0;h0.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),a=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),s=a.redSqrt();return s.redSqr().cmp(a)===0};function Zt(i,e,t){G0.BasePoint.call(this,i,"projective"),e===null&&t===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i0(e,16),this.z=new i0(t,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Bs(Zt,G0.BasePoint);h0.prototype.decodePoint=function(e,t){return this.point(zo.toArray(e,t),1)};h0.prototype.point=function(e,t){return new Zt(this,e,t)};h0.prototype.pointFromJSON=function(e){return Zt.fromJSON(this,e)};Zt.prototype.precompute=function(){};Zt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Zt.fromJSON=function(e,t){return new Zt(e,t[0],t[1]||e.one)};Zt.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)+">"};Zt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Zt.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),a=r.redSqr(),s=t.redSub(a),b=t.redMul(a),p=s.redMul(a.redAdd(this.curve.a24.redMul(s)));return this.curve.point(b,p)};Zt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Zt.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),a=this.x.redSub(this.z),s=e.x.redAdd(e.z),b=e.x.redSub(e.z),p=b.redMul(r),u=s.redMul(a),f=t.z.redMul(p.redAdd(u).redSqr()),o=t.x.redMul(p.redISub(u).redSqr());return this.curve.point(f,o)};Zt.prototype.mul=function(e){for(var t=e.clone(),r=this,a=this.curve.point(null,null),s=this,b=[];t.cmpn(0)!==0;t.iushrn(1))b.push(t.andln(1));for(var p=b.length-1;p>=0;p--)b[p]===0?(r=r.diffAdd(a,s),a=a.dbl()):(a=r.diffAdd(a,s),r=r.dbl());return a};Zt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Zt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Zt.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};Zt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Ho=xr,kr=qr,Cs=Z0,J0=X0,$o=Ho.assert;function Rr(i){this.twisted=(i.a|0)!==1,this.mOneA=this.twisted&&(i.a|0)===-1,this.extended=this.mOneA,J0.call(this,"edwards",i),this.a=new kr(i.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new kr(i.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new kr(i.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),$o(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(i.c|0)===1}Cs(Rr,J0);var Uo=Rr;Rr.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};Rr.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};Rr.prototype.jpoint=function(e,t,r,a){return this.point(e,t,r,a)};Rr.prototype.pointFromX=function(e,t){e=new kr(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),a=this.c2.redSub(this.a.redMul(r)),s=this.one.redSub(this.c2.redMul(this.d).redMul(r)),b=a.redMul(s.redInvm()),p=b.redSqrt();if(p.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");var u=p.fromRed().isOdd();return(t&&!u||!t&&u)&&(p=p.redNeg()),this.point(e,p)};Rr.prototype.pointFromY=function(e,t){e=new kr(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),a=r.redSub(this.c2),s=r.redMul(this.d).redMul(this.c2).redSub(this.a),b=a.redMul(s.redInvm());if(b.cmp(this.zero)===0){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var p=b.redSqrt();if(p.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");return p.fromRed().isOdd()!==t&&(p=p.redNeg()),this.point(p,e)};Rr.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),a=t.redMul(this.a).redAdd(r),s=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return a.cmp(s)===0};function Pt(i,e,t,r,a){J0.BasePoint.call(this,i,"projective"),e===null&&t===null&&r===null?(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 kr(e,16),this.y=new kr(t,16),this.z=r?new kr(r,16):this.curve.one,this.t=a&&new kr(a,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()))))}Cs(Pt,J0.BasePoint);Rr.prototype.pointFromJSON=function(e){return Pt.fromJSON(this,e)};Rr.prototype.point=function(e,t,r,a){return new Pt(this,e,t,r,a)};Pt.fromJSON=function(e,t){return new Pt(e,t[0],t[1],t[2])};Pt.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)+">"};Pt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Pt.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var a=this.curve._mulA(e),s=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),b=a.redAdd(t),p=b.redSub(r),u=a.redSub(t),f=s.redMul(p),o=b.redMul(u),x=s.redMul(u),v=p.redMul(b);return this.curve.point(f,o,v,x)};Pt.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),t=this.x.redSqr(),r=this.y.redSqr(),a,s,b,p,u,f;if(this.curve.twisted){p=this.curve._mulA(t);var o=p.redAdd(r);this.zOne?(a=e.redSub(t).redSub(r).redMul(o.redSub(this.curve.two)),s=o.redMul(p.redSub(r)),b=o.redSqr().redSub(o).redSub(o)):(u=this.z.redSqr(),f=o.redSub(u).redISub(u),a=e.redSub(t).redISub(r).redMul(f),s=o.redMul(p.redSub(r)),b=o.redMul(f))}else p=t.redAdd(r),u=this.curve._mulC(this.z).redSqr(),f=p.redSub(u).redSub(u),a=this.curve._mulC(e.redISub(p)).redMul(f),s=this.curve._mulC(p).redMul(t.redISub(r)),b=p.redMul(f);return this.curve.point(a,s,b)};Pt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Pt.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)),a=this.t.redMul(this.curve.dd).redMul(e.t),s=this.z.redMul(e.z.redAdd(e.z)),b=r.redSub(t),p=s.redSub(a),u=s.redAdd(a),f=r.redAdd(t),o=b.redMul(p),x=u.redMul(f),v=b.redMul(f),_=p.redMul(u);return this.curve.point(o,x,_,v)};Pt.prototype._projAdd=function(e){var t=this.z.redMul(e.z),r=t.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),b=this.curve.d.redMul(a).redMul(s),p=r.redSub(b),u=r.redAdd(b),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),o=t.redMul(p).redMul(f),x,v;return this.curve.twisted?(x=t.redMul(u).redMul(s.redSub(this.curve._mulA(a))),v=p.redMul(u)):(x=t.redMul(u).redMul(s.redSub(a)),v=this.curve._mulC(p).redMul(u)),this.curve.point(o,x,v)};Pt.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};Pt.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};Pt.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)};Pt.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)};Pt.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};Pt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Pt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Pt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Pt.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};Pt.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return!0;for(var r=e.clone(),a=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(a),this.x.cmp(t)===0)return!0}};Pt.prototype.toP=Pt.prototype.normalize;Pt.prototype.mixedAdd=Pt.prototype.add;(function(i){var e=i;e.base=X0,e.short=qo,e.mont=Lo,e.edwards=Uo})(Di);var Q0={},en={},ct={},jo=e0,Wo=Z0;ct.inherits=Wo;function Ko(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function Vo(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),a=0;a<i.length;a+=2)t.push(parseInt(i[a]+i[a+1],16))}else for(var r=0,a=0;a<i.length;a++){var s=i.charCodeAt(a);s<128?t[r++]=s:s<2048?(t[r++]=s>>6|192,t[r++]=s&63|128):Ko(i,a)?(s=65536+((s&1023)<<10)+(i.charCodeAt(++a)&1023),t[r++]=s>>18|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128,t[r++]=s&63|128):(t[r++]=s>>12|224,t[r++]=s>>6&63|128,t[r++]=s&63|128)}else for(a=0;a<i.length;a++)t[a]=i[a]|0;return t}ct.toArray=Vo;function Yo(i){for(var e="",t=0;t<i.length;t++)e+=Fs(i[t].toString(16));return e}ct.toHex=Yo;function Ss(i){var e=i>>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}ct.htonl=Ss;function Xo(i,e){for(var t="",r=0;r<i.length;r++){var a=i[r];e==="little"&&(a=Ss(a)),t+=Ms(a.toString(16))}return t}ct.toHex32=Xo;function Fs(i){return i.length===1?"0"+i:i}ct.zero2=Fs;function Ms(i){return i.length===7?"0"+i:i.length===6?"00"+i:i.length===5?"000"+i:i.length===4?"0000"+i:i.length===3?"00000"+i:i.length===2?"000000"+i:i.length===1?"0000000"+i:i}ct.zero8=Ms;function Zo(i,e,t,r){var a=t-e;jo(a%4===0);for(var s=new Array(a/4),b=0,p=e;b<s.length;b++,p+=4){var u;r==="big"?u=i[p]<<24|i[p+1]<<16|i[p+2]<<8|i[p+3]:u=i[p+3]<<24|i[p+2]<<16|i[p+1]<<8|i[p],s[b]=u>>>0}return s}ct.join32=Zo;function Go(i,e){for(var t=new Array(i.length*4),r=0,a=0;r<i.length;r++,a+=4){var s=i[r];e==="big"?(t[a]=s>>>24,t[a+1]=s>>>16&255,t[a+2]=s>>>8&255,t[a+3]=s&255):(t[a+3]=s>>>24,t[a+2]=s>>>16&255,t[a+1]=s>>>8&255,t[a]=s&255)}return t}ct.split32=Go;function Jo(i,e){return i>>>e|i<<32-e}ct.rotr32=Jo;function Qo(i,e){return i<<e|i>>>32-e}ct.rotl32=Qo;function ec(i,e){return i+e>>>0}ct.sum32=ec;function tc(i,e,t){return i+e+t>>>0}ct.sum32_3=tc;function rc(i,e,t,r){return i+e+t+r>>>0}ct.sum32_4=rc;function nc(i,e,t,r,a){return i+e+t+r+a>>>0}ct.sum32_5=nc;function ic(i,e,t,r){var a=i[e],s=i[e+1],b=r+s>>>0,p=(b<r?1:0)+t+a;i[e]=p>>>0,i[e+1]=b}ct.sum64=ic;function fc(i,e,t,r){var a=e+r>>>0,s=(a<e?1:0)+i+t;return s>>>0}ct.sum64_hi=fc;function sc(i,e,t,r){var a=e+r;return a>>>0}ct.sum64_lo=sc;function ac(i,e,t,r,a,s,b,p){var u=0,f=e;f=f+r>>>0,u+=f<e?1:0,f=f+s>>>0,u+=f<s?1:0,f=f+p>>>0,u+=f<p?1:0;var o=i+t+a+b+u;return o>>>0}ct.sum64_4_hi=ac;function oc(i,e,t,r,a,s,b,p){var u=e+r+s+p;return u>>>0}ct.sum64_4_lo=oc;function cc(i,e,t,r,a,s,b,p,u,f){var o=0,x=e;x=x+r>>>0,o+=x<e?1:0,x=x+s>>>0,o+=x<s?1:0,x=x+p>>>0,o+=x<p?1:0,x=x+f>>>0,o+=x<f?1:0;var v=i+t+a+b+u+o;return v>>>0}ct.sum64_5_hi=cc;function dc(i,e,t,r,a,s,b,p,u,f){var o=e+r+s+p+f;return o>>>0}ct.sum64_5_lo=dc;function uc(i,e,t){var r=e<<32-t|i>>>t;return r>>>0}ct.rotr64_hi=uc;function hc(i,e,t){var r=i<<32-t|e>>>t;return r>>>0}ct.rotr64_lo=hc;function lc(i,e,t){return i>>>t}ct.shr64_hi=lc;function xc(i,e,t){var r=i<<32-t|e>>>t;return r>>>0}ct.shr64_lo=xc;var l0={},$f=ct,pc=e0;function tn(){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}l0.BlockHash=tn;tn.prototype.update=function(e,t){if(e=$f.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),this.pending.length===0&&(this.pending=null),e=$f.join32(e,0,e.length-r,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this};tn.prototype.digest=function(e){return this.update(this._pad()),pc(this.pending===null),this._digest(e)};tn.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,a=new Array(r+this.padLength);a[0]=128;for(var s=1;s<r;s++)a[s]=0;if(e<<=3,this.endian==="big"){for(var b=8;b<this.padLength;b++)a[s++]=0;a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=e>>>24&255,a[s++]=e>>>16&255,a[s++]=e>>>8&255,a[s++]=e&255}else for(a[s++]=e&255,a[s++]=e>>>8&255,a[s++]=e>>>16&255,a[s++]=e>>>24&255,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,b=8;b<this.padLength;b++)a[s++]=0;return a};var x0={},Pr={},bc=ct,Ar=bc.rotr32;function vc(i,e,t,r){if(i===0)return Ds(e,t,r);if(i===1||i===3)return Ps(e,t,r);if(i===2)return Rs(e,t,r)}Pr.ft_1=vc;function Ds(i,e,t){return i&e^~i&t}Pr.ch32=Ds;function Rs(i,e,t){return i&e^i&t^e&t}Pr.maj32=Rs;function Ps(i,e,t){return i^e^t}Pr.p32=Ps;function yc(i){return Ar(i,2)^Ar(i,13)^Ar(i,22)}Pr.s0_256=yc;function mc(i){return Ar(i,6)^Ar(i,11)^Ar(i,25)}Pr.s1_256=mc;function gc(i){return Ar(i,7)^Ar(i,18)^i>>>3}Pr.g0_256=gc;function _c(i){return Ar(i,17)^Ar(i,19)^i>>>10}Pr.g1_256=_c;var s0=ct,Ec=l0,wc=Pr,ii=s0.rotl32,E0=s0.sum32,Ac=s0.sum32_5,Bc=wc.ft_1,Ts=Ec.BlockHash,Cc=[1518500249,1859775393,2400959708,3395469782];function Sr(){if(!(this instanceof Sr))return new Sr;Ts.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}s0.inherits(Sr,Ts);var Sc=Sr;Sr.blockSize=512;Sr.outSize=160;Sr.hmacStrength=80;Sr.padLength=64;Sr.prototype._update=function(e,t){for(var r=this.W,a=0;a<16;a++)r[a]=e[t+a];for(;a<r.length;a++)r[a]=ii(r[a-3]^r[a-8]^r[a-14]^r[a-16],1);var s=this.h[0],b=this.h[1],p=this.h[2],u=this.h[3],f=this.h[4];for(a=0;a<r.length;a++){var o=~~(a/20),x=Ac(ii(s,5),Bc(o,b,p,u),f,r[a],Cc[o]);f=u,u=p,p=ii(b,30),b=s,s=x}this.h[0]=E0(this.h[0],s),this.h[1]=E0(this.h[1],b),this.h[2]=E0(this.h[2],p),this.h[3]=E0(this.h[3],u),this.h[4]=E0(this.h[4],f)};Sr.prototype._digest=function(e){return e==="hex"?s0.toHex32(this.h,"big"):s0.split32(this.h,"big")};var a0=ct,Fc=l0,p0=Pr,Mc=e0,gr=a0.sum32,Dc=a0.sum32_4,Rc=a0.sum32_5,Pc=p0.ch32,Tc=p0.maj32,kc=p0.s0_256,Oc=p0.s1_256,Ic=p0.g0_256,Nc=p0.g1_256,ks=Fc.BlockHash,qc=[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 Fr(){if(!(this instanceof Fr))return new Fr;ks.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=qc,this.W=new Array(64)}a0.inherits(Fr,ks);var Os=Fr;Fr.blockSize=512;Fr.outSize=256;Fr.hmacStrength=192;Fr.padLength=64;Fr.prototype._update=function(e,t){for(var r=this.W,a=0;a<16;a++)r[a]=e[t+a];for(;a<r.length;a++)r[a]=Dc(Nc(r[a-2]),r[a-7],Ic(r[a-15]),r[a-16]);var s=this.h[0],b=this.h[1],p=this.h[2],u=this.h[3],f=this.h[4],o=this.h[5],x=this.h[6],v=this.h[7];for(Mc(this.k.length===r.length),a=0;a<r.length;a++){var _=Rc(v,Oc(f),Pc(f,o,x),this.k[a],r[a]),E=gr(kc(s),Tc(s,b,p));v=x,x=o,o=f,f=gr(u,_),u=p,p=b,b=s,s=gr(_,E)}this.h[0]=gr(this.h[0],s),this.h[1]=gr(this.h[1],b),this.h[2]=gr(this.h[2],p),this.h[3]=gr(this.h[3],u),this.h[4]=gr(this.h[4],f),this.h[5]=gr(this.h[5],o),this.h[6]=gr(this.h[6],x),this.h[7]=gr(this.h[7],v)};Fr.prototype._digest=function(e){return e==="hex"?a0.toHex32(this.h,"big"):a0.split32(this.h,"big")};var pi=ct,Is=Os;function Ir(){if(!(this instanceof Ir))return new Ir;Is.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}pi.inherits(Ir,Is);var zc=Ir;Ir.blockSize=512;Ir.outSize=224;Ir.hmacStrength=192;Ir.padLength=64;Ir.prototype._digest=function(e){return e==="hex"?pi.toHex32(this.h.slice(0,7),"big"):pi.split32(this.h.slice(0,7),"big")};var hr=ct,Lc=l0,Hc=e0,Br=hr.rotr64_hi,Cr=hr.rotr64_lo,Ns=hr.shr64_hi,qs=hr.shr64_lo,Hr=hr.sum64,fi=hr.sum64_hi,si=hr.sum64_lo,$c=hr.sum64_4_hi,Uc=hr.sum64_4_lo,jc=hr.sum64_5_hi,Wc=hr.sum64_5_lo,zs=Lc.BlockHash,Kc=[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 Er(){if(!(this instanceof Er))return new Er;zs.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Kc,this.W=new Array(160)}hr.inherits(Er,zs);var Ls=Er;Er.blockSize=1024;Er.outSize=512;Er.hmacStrength=192;Er.padLength=128;Er.prototype._prepareBlock=function(e,t){for(var r=this.W,a=0;a<32;a++)r[a]=e[t+a];for(;a<r.length;a+=2){var s=nd(r[a-4],r[a-3]),b=id(r[a-4],r[a-3]),p=r[a-14],u=r[a-13],f=td(r[a-30],r[a-29]),o=rd(r[a-30],r[a-29]),x=r[a-32],v=r[a-31];r[a]=$c(s,b,p,u,f,o,x,v),r[a+1]=Uc(s,b,p,u,f,o,x,v)}};Er.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,a=this.h[0],s=this.h[1],b=this.h[2],p=this.h[3],u=this.h[4],f=this.h[5],o=this.h[6],x=this.h[7],v=this.h[8],_=this.h[9],E=this.h[10],D=this.h[11],k=this.h[12],H=this.h[13],P=this.h[14],T=this.h[15];Hc(this.k.length===r.length);for(var z=0;z<r.length;z+=2){var V=P,Y=T,Z=Qc(v,_),fe=ed(v,_),ae=Vc(v,_,E,D,k),X=Yc(v,_,E,D,k,H),S=this.k[z],c=this.k[z+1],h=r[z],w=r[z+1],M=jc(V,Y,Z,fe,ae,X,S,c,h,w),O=Wc(V,Y,Z,fe,ae,X,S,c,h,w);V=Gc(a,s),Y=Jc(a,s),Z=Xc(a,s,b,p,u),fe=Zc(a,s,b,p,u,f);var U=fi(V,Y,Z,fe),W=si(V,Y,Z,fe);P=k,T=H,k=E,H=D,E=v,D=_,v=fi(o,x,M,O),_=si(x,x,M,O),o=u,x=f,u=b,f=p,b=a,p=s,a=fi(M,O,U,W),s=si(M,O,U,W)}Hr(this.h,0,a,s),Hr(this.h,2,b,p),Hr(this.h,4,u,f),Hr(this.h,6,o,x),Hr(this.h,8,v,_),Hr(this.h,10,E,D),Hr(this.h,12,k,H),Hr(this.h,14,P,T)};Er.prototype._digest=function(e){return e==="hex"?hr.toHex32(this.h,"big"):hr.split32(this.h,"big")};function Vc(i,e,t,r,a){var s=i&t^~i&a;return s<0&&(s+=4294967296),s}function Yc(i,e,t,r,a,s){var b=e&r^~e&s;return b<0&&(b+=4294967296),b}function Xc(i,e,t,r,a){var s=i&t^i&a^t&a;return s<0&&(s+=4294967296),s}function Zc(i,e,t,r,a,s){var b=e&r^e&s^r&s;return b<0&&(b+=4294967296),b}function Gc(i,e){var t=Br(i,e,28),r=Br(e,i,2),a=Br(e,i,7),s=t^r^a;return s<0&&(s+=4294967296),s}function Jc(i,e){var t=Cr(i,e,28),r=Cr(e,i,2),a=Cr(e,i,7),s=t^r^a;return s<0&&(s+=4294967296),s}function Qc(i,e){var t=Br(i,e,14),r=Br(i,e,18),a=Br(e,i,9),s=t^r^a;return s<0&&(s+=4294967296),s}function ed(i,e){var t=Cr(i,e,14),r=Cr(i,e,18),a=Cr(e,i,9),s=t^r^a;return s<0&&(s+=4294967296),s}function td(i,e){var t=Br(i,e,1),r=Br(i,e,8),a=Ns(i,e,7),s=t^r^a;return s<0&&(s+=4294967296),s}function rd(i,e){var t=Cr(i,e,1),r=Cr(i,e,8),a=qs(i,e,7),s=t^r^a;return s<0&&(s+=4294967296),s}function nd(i,e){var t=Br(i,e,19),r=Br(e,i,29),a=Ns(i,e,6),s=t^r^a;return s<0&&(s+=4294967296),s}function id(i,e){var t=Cr(i,e,19),r=Cr(e,i,29),a=qs(i,e,6),s=t^r^a;return s<0&&(s+=4294967296),s}var bi=ct,Hs=Ls;function Nr(){if(!(this instanceof Nr))return new Nr;Hs.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}bi.inherits(Nr,Hs);var fd=Nr;Nr.blockSize=1024;Nr.outSize=384;Nr.hmacStrength=192;Nr.padLength=128;Nr.prototype._digest=function(e){return e==="hex"?bi.toHex32(this.h.slice(0,12),"big"):bi.split32(this.h.slice(0,12),"big")};x0.sha1=Sc;x0.sha224=zc;x0.sha256=Os;x0.sha384=fd;x0.sha512=Ls;var $s={},Gr=ct,sd=l0,T0=Gr.rotl32,Uf=Gr.sum32,w0=Gr.sum32_3,jf=Gr.sum32_4,Us=sd.BlockHash;function Mr(){if(!(this instanceof Mr))return new Mr;Us.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Gr.inherits(Mr,Us);$s.ripemd160=Mr;Mr.blockSize=512;Mr.outSize=160;Mr.hmacStrength=192;Mr.padLength=64;Mr.prototype._update=function(e,t){for(var r=this.h[0],a=this.h[1],s=this.h[2],b=this.h[3],p=this.h[4],u=r,f=a,o=s,x=b,v=p,_=0;_<80;_++){var E=Uf(T0(jf(r,Wf(_,a,s,b),e[cd[_]+t],ad(_)),ud[_]),p);r=p,p=b,b=T0(s,10),s=a,a=E,E=Uf(T0(jf(u,Wf(79-_,f,o,x),e[dd[_]+t],od(_)),hd[_]),v),u=v,v=x,x=T0(o,10),o=f,f=E}E=w0(this.h[1],s,x),this.h[1]=w0(this.h[2],b,v),this.h[2]=w0(this.h[3],p,u),this.h[3]=w0(this.h[4],r,f),this.h[4]=w0(this.h[0],a,o),this.h[0]=E};Mr.prototype._digest=function(e){return e==="hex"?Gr.toHex32(this.h,"little"):Gr.split32(this.h,"little")};function Wf(i,e,t,r){return i<=15?e^t^r:i<=31?e&t|~e&r:i<=47?(e|~t)^r:i<=63?e&r|t&~r:e^(t|~r)}function ad(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function od(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var cd=[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],dd=[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],ud=[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],hd=[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],ld=ct,xd=e0;function o0(i,e,t){if(!(this instanceof o0))return new o0(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(ld.toArray(e,t))}var pd=o0;o0.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),xd(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)};o0.prototype.update=function(e,t){return this.inner.update(e,t),this};o0.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};(function(i){var e=i;e.utils=ct,e.common=l0,e.sha=x0,e.ripemd=$s,e.hmac=pd,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(en);var ai,Kf;function bd(){return Kf||(Kf=1,ai={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"]]}}),ai}(function(i){var e=i,t=en,r=Di,a=xr,s=a.assert;function b(f){f.type==="short"?this.curve=new r.short(f):f.type==="edwards"?this.curve=new r.edwards(f):this.curve=new r.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=b;function p(f,o){Object.defineProperty(e,f,{configurable:!0,enumerable:!0,get:function(){var x=new b(o);return Object.defineProperty(e,f,{configurable:!0,enumerable:!0,value:x}),x}})}p("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:t.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),p("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:t.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),p("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:t.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),p("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:t.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"]}),p("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:t.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"]}),p("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["9"]}),p("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:t.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=bd()}catch{u=void 0}p("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:t.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})})(Q0);var vd=en,Yr=Fi,js=e0;function Ur(i){if(!(this instanceof Ur))return new Ur(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Yr.toArray(i.entropy,i.entropyEnc||"hex"),t=Yr.toArray(i.nonce,i.nonceEnc||"hex"),r=Yr.toArray(i.pers,i.persEnc||"hex");js(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,r)}var yd=Ur;Ur.prototype._init=function(e,t,r){var a=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s<this.V.length;s++)this.K[s]=0,this.V[s]=1;this._update(a),this._reseed=1,this.reseedInterval=281474976710656};Ur.prototype._hmac=function(){return new vd.hmac(this.hash,this.K)};Ur.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())};Ur.prototype.reseed=function(e,t,r,a){typeof t!="string"&&(a=r,r=t,t=null),e=Yr.toArray(e,t),r=Yr.toArray(r,a),js(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1};Ur.prototype.generate=function(e,t,r,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(a=r,r=t,t=null),r&&(r=Yr.toArray(r,a||"hex"),this._update(r));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var b=s.slice(0,e);return this._update(r),this._reseed++,Yr.encode(b,t)};var md=qr,gd=xr,vi=gd.assert;function fr(i,e){this.ec=i,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var _d=fr;fr.fromPublic=function(e,t,r){return t instanceof fr?t:new fr(e,{pub:t,pubEnc:r})};fr.fromPrivate=function(e,t,r){return t instanceof fr?t:new fr(e,{priv:t,privEnc:r})};fr.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"}};fr.prototype.getPublic=function(e,t){return typeof e=="string"&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub};fr.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};fr.prototype._importPrivate=function(e,t){this.priv=new md(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)};fr.prototype._importPublic=function(e,t){if(e.x||e.y){this.ec.curve.type==="mont"?vi(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&vi(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)};fr.prototype.derive=function(e){return e.validate()||vi(e.validate(),"public point not validated"),e.mul(this.priv).getX()};fr.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)};fr.prototype.verify=function(e,t){return this.ec.verify(e,t,this)};fr.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var K0=qr,Pi=xr,Ed=Pi.assert;function rn(i,e){if(i instanceof rn)return i;this._importDER(i,e)||(Ed(i.r&&i.s,"Signature without r or s"),this.r=new K0(i.r,16),this.s=new K0(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var wd=rn;function Ad(){this.place=0}function oi(i,e){var t=i[e.place++];if(!(t&128))return t;var r=t&15;if(r===0||r>4)return!1;for(var a=0,s=0,b=e.place;s<r;s++,b++)a<<=8,a|=i[b],a>>>=0;return a<=127?!1:(e.place=b,a)}function Vf(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e<t;)e++;return e===0?i:i.slice(e)}rn.prototype._importDER=function(e,t){e=Pi.toArray(e,t);var r=new Ad;if(e[r.place++]!==48)return!1;var a=oi(e,r);if(a===!1||a+r.place!==e.length||e[r.place++]!==2)return!1;var s=oi(e,r);if(s===!1)return!1;var b=e.slice(r.place,s+r.place);if(r.place+=s,e[r.place++]!==2)return!1;var p=oi(e,r);if(p===!1||e.length!==p+r.place)return!1;var u=e.slice(r.place,p+r.place);if(b[0]===0)if(b[1]&128)b=b.slice(1);else return!1;if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;return this.r=new K0(b),this.s=new K0(u),this.recoveryParam=null,!0};function ci(i,e){if(e<128){i.push(e);return}var t=1+(Math.log(e)/Math.LN2>>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}rn.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),r[0]&128&&(r=[0].concat(r)),t=Vf(t),r=Vf(r);!r[0]&&!(r[1]&128);)r=r.slice(1);var a=[2];ci(a,t.length),a=a.concat(t),a.push(2),ci(a,r.length);var s=a.concat(r),b=[48];return ci(b,s.length),b=b.concat(s),Pi.encode(b,e)};var Xr=qr,Ws=yd,Bd=xr,di=Q0,Cd=As,Ks=Bd.assert,Ti=_d,nn=wd;function vr(i){if(!(this instanceof vr))return new vr(i);typeof i=="string"&&(Ks(Object.prototype.hasOwnProperty.call(di,i),"Unknown curve "+i),i=di[i]),i instanceof di.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var Sd=vr;vr.prototype.keyPair=function(e){return new Ti(this,e)};vr.prototype.keyFromPrivate=function(e,t){return Ti.fromPrivate(this,e,t)};vr.prototype.keyFromPublic=function(e,t){return Ti.fromPublic(this,e,t)};vr.prototype.genKeyPair=function(e){e||(e={});for(var t=new Ws({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Cd(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new Xr(2));;){var s=new Xr(t.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}};vr.prototype._truncateToN=function(e,t){var r=e.byteLength()*8-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};vr.prototype.sign=function(e,t,r,a){typeof r=="object"&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new Xr(e,16));for(var s=this.n.byteLength(),b=t.getPrivate().toArray("be",s),p=e.toArray("be",s),u=new Ws({hash:this.hash,entropy:b,nonce:p,pers:a.pers,persEnc:a.persEnc||"utf8"}),f=this.n.sub(new Xr(1)),o=0;;o++){var x=a.k?a.k(o):new Xr(u.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(f)>=0)){var v=this.g.mul(x);if(!v.isInfinity()){var _=v.getX(),E=_.umod(this.n);if(E.cmpn(0)!==0){var D=x.invm(this.n).mul(E.mul(t.getPrivate()).iadd(e));if(D=D.umod(this.n),D.cmpn(0)!==0){var k=(v.getY().isOdd()?1:0)|(_.cmp(E)!==0?2:0);return a.canonical&&D.cmp(this.nh)>0&&(D=this.n.sub(D),k^=1),new nn({r:E,s:D,recoveryParam:k})}}}}}};vr.prototype.verify=function(e,t,r,a){e=this._truncateToN(new Xr(e,16)),r=this.keyFromPublic(r,a),t=new nn(t,"hex");var s=t.r,b=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||b.cmpn(1)<0||b.cmp(this.n)>=0)return!1;var p=b.invm(this.n),u=p.mul(e).umod(this.n),f=p.mul(s).umod(this.n),o;return this.curve._maxwellTrick?(o=this.g.jmulAdd(u,r.getPublic(),f),o.isInfinity()?!1:o.eqXToP(s)):(o=this.g.mulAdd(u,r.getPublic(),f),o.isInfinity()?!1:o.getX().umod(this.n).cmp(s)===0)};vr.prototype.recoverPubKey=function(i,e,t,r){Ks((3&t)===t,"The recovery param is more than two bits"),e=new nn(e,r);var a=this.n,s=new Xr(i),b=e.r,p=e.s,u=t&1,f=t>>1;if(b.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");f?b=this.curve.pointFromX(b.add(this.curve.n),u):b=this.curve.pointFromX(b,u);var o=e.r.invm(a),x=a.sub(s).mul(o).umod(a),v=p.mul(o).umod(a);return this.g.mulAdd(x,b,v)};vr.prototype.getKeyRecoveryParam=function(i,e,t,r){if(e=new nn(e,r),e.recoveryParam!==null)return e.recoveryParam;for(var a=0;a<4;a++){var s;try{s=this.recoverPubKey(i,e,a)}catch{continue}if(s.eq(t))return a}throw new Error("Unable to find valid recovery factor")};var D0=xr,Vs=D0.assert,Yf=D0.parseBytes,b0=D0.cachedProperty;function Xt(i,e){this.eddsa=i,this._secret=Yf(e.secret),i.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Yf(e.pub)}Xt.fromPublic=function(e,t){return t instanceof Xt?t:new Xt(e,{pub:t})};Xt.fromSecret=function(e,t){return t instanceof Xt?t:new Xt(e,{secret:t})};Xt.prototype.secret=function(){return this._secret};b0(Xt,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});b0(Xt,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});b0(Xt,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,a=t.slice(0,e.encodingLength);return a[0]&=248,a[r]&=127,a[r]|=64,a});b0(Xt,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});b0(Xt,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});b0(Xt,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Xt.prototype.sign=function(e){return Vs(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};Xt.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)};Xt.prototype.getSecret=function(e){return Vs(this._secret,"KeyPair is public only"),D0.encode(this.secret(),e)};Xt.prototype.getPublic=function(e){return D0.encode(this.pubBytes(),e)};var Fd=Xt,Md=qr,fn=xr,Dd=fn.assert,sn=fn.cachedProperty,Rd=fn.parseBytes;function t0(i,e){this.eddsa=i,typeof e!="object"&&(e=Rd(e)),Array.isArray(e)&&(e={R:e.slice(0,i.encodingLength),S:e.slice(i.encodingLength)}),Dd(e.R&&e.S,"Signature without R or S"),i.isPoint(e.R)&&(this._R=e.R),e.S instanceof Md&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}sn(t0,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});sn(t0,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});sn(t0,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});sn(t0,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});t0.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};t0.prototype.toHex=function(){return fn.encode(this.toBytes(),"hex").toUpperCase()};var Pd=t0,Td=en,kd=Q0,c0=xr,Od=c0.assert,Ys=c0.parseBytes,Xs=Fd,Xf=Pd;function lr(i){if(Od(i==="ed25519","only tested with ed25519 so far"),!(this instanceof lr))return new lr(i);i=kd[i].curve,this.curve=i,this.g=i.g,this.g.precompute(i.n.bitLength()+1),this.pointClass=i.point().constructor,this.encodingLength=Math.ceil(i.n.bitLength()/8),this.hash=Td.sha512}var Id=lr;lr.prototype.sign=function(e,t){e=Ys(e);var r=this.keyFromSecret(t),a=this.hashInt(r.messagePrefix(),e),s=this.g.mul(a),b=this.encodePoint(s),p=this.hashInt(b,r.pubBytes(),e).mul(r.priv()),u=a.add(p).umod(this.curve.n);return this.makeSignature({R:s,S:u,Rencoded:b})};lr.prototype.verify=function(e,t,r){e=Ys(e),t=this.makeSignature(t);var a=this.keyFromPublic(r),s=this.hashInt(t.Rencoded(),a.pubBytes(),e),b=this.g.mul(t.S()),p=t.R().add(a.pub().mul(s));return p.eq(b)};lr.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return c0.intFromLE(e.digest()).umod(this.curve.n)};lr.prototype.keyFromPublic=function(e){return Xs.fromPublic(this,e)};lr.prototype.keyFromSecret=function(e){return Xs.fromSecret(this,e)};lr.prototype.makeSignature=function(e){return e instanceof Xf?e:new Xf(this,e)};lr.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t};lr.prototype.decodePoint=function(e){e=c0.parseBytes(e);var t=e.length-1,r=e.slice(0,t).concat(e[t]&-129),a=(e[t]&128)!==0,s=c0.intFromLE(r);return this.curve.pointFromY(s,a)};lr.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};lr.prototype.decodeInt=function(e){return c0.intFromLE(e)};lr.prototype.isPoint=function(e){return e instanceof this.pointClass};(function(i){var e=i;e.version=ko.version,e.utils=xr,e.rand=As,e.curve=Di,e.curves=Q0,e.ec=Sd,e.eddsa=Id})(Es);const Zf=_s||mo;class Nd{constructor(){m0(this,"ec");this.ec=new Es.ec("secp256k1")}xphereSign(e,t){return Zf.Sign.signature(e,t)}xphereVerify(e,t,r){return Zf.Sign.signatureValidity(e,t,r)}generateKeys(){const e=this.ec.genKeyPair(),t=e.getPrivate("hex"),r=e.getPublic("hex");return{privateKey:t,publicKey:r}}sign(e,t){return this.ec.keyFromPrivate(t,"hex").sign(e)}verify(e,t,r){return this.ec.keyFromPublic(r,"hex").verify(e,t)}encrypt(e,t){return F0.AES.encrypt(e,t).toString()}decrypt(e,t){return F0.AES.decrypt(e,t).toString(F0.enc.Utf8)}}const qd=new Nd,Dr=Object.create(null);Dr.open="0";Dr.close="1";Dr.ping="2";Dr.pong="3";Dr.message="4";Dr.upgrade="5";Dr.noop="6";const q0=Object.create(null);Object.keys(Dr).forEach(i=>{q0[Dr[i]]=i});const yi={type:"error",data:"parser error"},Zs=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gs=typeof ArrayBuffer=="function",Js=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,ki=({type:i,data:e},t,r)=>Zs&&e instanceof Blob?t?r(e):Gf(e,r):Gs&&(e instanceof ArrayBuffer||Js(e))?t?r(e):Gf(new Blob([e]),r):r(Dr[i]+(e||"")),Gf=(i,e)=>{const t=new FileReader;return t.onload=function(){const r=t.result.split(",")[1];e("b"+(r||""))},t.readAsDataURL(i)};function Jf(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let ui;function zd(i,e){if(Zs&&i.data instanceof Blob)return i.data.arrayBuffer().then(Jf).then(e);if(Gs&&(i.data instanceof ArrayBuffer||Js(i.data)))return e(Jf(i.data));ki(i,!1,t=>{ui||(ui=new TextEncoder),e(ui.encode(t))})}const Qf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S0=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<Qf.length;i++)S0[Qf.charCodeAt(i)]=i;const Ld=i=>{let e=i.length*.75,t=i.length,r,a=0,s,b,p,u;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);const f=new ArrayBuffer(e),o=new Uint8Array(f);for(r=0;r<t;r+=4)s=S0[i.charCodeAt(r)],b=S0[i.charCodeAt(r+1)],p=S0[i.charCodeAt(r+2)],u=S0[i.charCodeAt(r+3)],o[a++]=s<<2|b>>4,o[a++]=(b&15)<<4|p>>2,o[a++]=(p&3)<<6|u&63;return f},Hd=typeof ArrayBuffer=="function",Oi=(i,e)=>{if(typeof i!="string")return{type:"message",data:Qs(i,e)};const t=i.charAt(0);return t==="b"?{type:"message",data:$d(i.substring(1),e)}:q0[t]?i.length>1?{type:q0[t],data:i.substring(1)}:{type:q0[t]}:yi},$d=(i,e)=>{if(Hd){const t=Ld(i);return Qs(t,e)}else return{base64:!0,data:i}},Qs=(i,e)=>{switch(e){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},ea="",Ud=(i,e)=>{const t=i.length,r=new Array(t);let a=0;i.forEach((s,b)=>{ki(s,!1,p=>{r[b]=p,++a===t&&e(r.join(ea))})})},jd=(i,e)=>{const t=i.split(ea),r=[];for(let a=0;a<t.length;a++){const s=Oi(t[a],e);if(r.push(s),s.type==="error")break}return r};function Wd(){return new TransformStream({transform(i,e){zd(i,t=>{const r=t.length;let a;if(r<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,r);else if(r<65536){a=new Uint8Array(3);const s=new DataView(a.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{a=new Uint8Array(9);const s=new DataView(a.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}i.data&&typeof i.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(t)})}})}let hi;function k0(i){return i.reduce((e,t)=>e+t.length,0)}function O0(i,e){if(i[0].length===e)return i.shift();const t=new Uint8Array(e);let r=0;for(let a=0;a<e;a++)t[a]=i[0][r++],r===i[0].length&&(i.shift(),r=0);return i.length&&r<i[0].length&&(i[0]=i[0].slice(r)),t}function Kd(i,e){hi||(hi=new TextDecoder);const t=[];let r=0,a=-1,s=!1;return new TransformStream({transform(b,p){for(t.push(b);;){if(r===0){if(k0(t)<1)break;const u=O0(t,1);s=(u[0]&128)===128,a=u[0]&127,a<126?r=3:a===126?r=1:r=2}else if(r===1){if(k0(t)<2)break;const u=O0(t,2);a=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(k0(t)<8)break;const u=O0(t,8),f=new DataView(u.buffer,u.byteOffset,u.length),o=f.getUint32(0);if(o>Math.pow(2,21)-1){p.enqueue(yi);break}a=o*Math.pow(2,32)+f.getUint32(4),r=3}else{if(k0(t)<a)break;const u=O0(t,a);p.enqueue(Oi(s?u:hi.decode(u),e)),r=0}if(a===0||a>i){p.enqueue(yi);break}}}})}const ta=4;function jt(i){if(i)return Vd(i)}function Vd(i){for(var e in jt.prototype)i[e]=jt.prototype[e];return i}jt.prototype.on=jt.prototype.addEventListener=function(i,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(e),this};jt.prototype.once=function(i,e){function t(){this.off(i,t),e.apply(this,arguments)}return t.fn=e,this.on(i,t),this};jt.prototype.off=jt.prototype.removeListener=jt.prototype.removeAllListeners=jt.prototype.removeEventListener=function(i,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+i];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var r,a=0;a<t.length;a++)if(r=t[a],r===e||r.fn===e){t.splice(a,1);break}return t.length===0&&delete this._callbacks["$"+i],this};jt.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+i],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(t){t=t.slice(0);for(var r=0,a=t.length;r<a;++r)t[r].apply(this,e)}return this};jt.prototype.emitReserved=jt.prototype.emit;jt.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};jt.prototype.hasListeners=function(i){return!!this.listeners(i).length};const pr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ra(i,...e){return e.reduce((t,r)=>(i.hasOwnProperty(r)&&(t[r]=i[r]),t),{})}const Yd=pr.setTimeout,Xd=pr.clearTimeout;function an(i,e){e.useNativeTimers?(i.setTimeoutFn=Yd.bind(pr),i.clearTimeoutFn=Xd.bind(pr)):(i.setTimeoutFn=pr.setTimeout.bind(pr),i.clearTimeoutFn=pr.clearTimeout.bind(pr))}const Zd=1.33;function Gd(i){return typeof i=="string"?Jd(i):Math.ceil((i.byteLength||i.size)*Zd)}function Jd(i){let e=0,t=0;for(let r=0,a=i.length;r<a;r++)e=i.charCodeAt(r),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(r++,t+=4);return t}function Qd(i){let e="";for(let t in i)i.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e}function eu(i){let e={},t=i.split("&");for(let r=0,a=t.length;r<a;r++){let s=t[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}class tu extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class Ii extends jt{constructor(e){super(),this.writable=!1,an(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new tu(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Oi(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 e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Qd(e);return t.length?"?"+t:""}}const na="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),mi=64,ru={};let es=0,I0=0,ts;function rs(i){let e="";do e=na[i%mi]+e,i=Math.floor(i/mi);while(i>0);return e}function ia(){const i=rs(+new Date);return i!==ts?(es=0,ts=i):i+"."+rs(es++)}for(;I0<mi;I0++)ru[na[I0]]=I0;let fa=!1;try{fa=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nu=fa;function sa(i){const e=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||nu))return new XMLHttpRequest}catch{}if(!e)try{return new pr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function iu(){}const fu=function(){return new sa({xdomain:!1}).responseType!=null}();class su extends Ii{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||a!==e.port}const t=e&&e.forceBase64;this.supportsBinary=fu&&!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 r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||t()})),this.writable||(r++,this.once("drain",function(){--r||t()}))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};jd(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Ud(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=ia()),!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 f0(this.uri(),e)}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(a,s)=>{this.onError("xhr post error",a,s)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,r)=>{this.onError("xhr poll error",t,r)}),this.pollXhr=e}}let f0=class z0 extends jt{constructor(e,t){super(),an(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=t.data!==void 0?t.data:null,this.create()}create(){var e;const t=ra(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const r=this.xhr=new sa(t);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let a in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(a)&&r.setRequestHeader(a,this.opts.extraHeaders[a])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var a;r.readyState===3&&((a=this.opts.cookieJar)===null||a===void 0||a.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(a){this.setTimeoutFn(()=>{this.onError(a)},0);return}typeof document<"u"&&(this.index=z0.requestsCount++,z0.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=iu,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete z0.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};f0.requestsCount=0;f0.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ns);else if(typeof addEventListener=="function"){const i="onpagehide"in pr?"pagehide":"unload";addEventListener(i,ns,!1)}}function ns(){for(let i in f0.requests)f0.requests.hasOwnProperty(i)&&f0.requests[i].abort()}const Ni=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),N0=pr.WebSocket||pr.MozWebSocket,is=!0,au="arraybuffer",fs=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ou extends Ii{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=fs?{}:ra(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=is&&!fs?t?new N0(e,t):new N0(e):new N0(e,t,r)}catch(a){return this.emitReserved("error",a)}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],a=t===e.length-1;ki(r,this.supportsBinary,s=>{const b={};try{is&&this.ws.send(s)}catch{}a&&Ni(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(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]=ia()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!N0}}class cu extends Ii{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(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=Kd(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),a=Wd();a.readable.pipeTo(e.writable),this.writer=a.writable.getWriter();const s=()=>{r.read().then(({done:p,value:u})=>{p||(this.onPacket(u),s())}).catch(p=>{})};s();const b={type:"open"};this.query.sid&&(b.data=`{"sid":"${this.query.sid}"}`),this.writer.write(b).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],a=t===e.length-1;this.writer.write(r).then(()=>{a&&Ni(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const du={websocket:ou,webtransport:cu,polling:su},uu=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,hu=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gi(i){if(i.length>2e3)throw"URI too long";const e=i,t=i.indexOf("["),r=i.indexOf("]");t!=-1&&r!=-1&&(i=i.substring(0,t)+i.substring(t,r).replace(/:/g,";")+i.substring(r,i.length));let a=uu.exec(i||""),s={},b=14;for(;b--;)s[hu[b]]=a[b]||"";return t!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=lu(s,s.path),s.queryKey=xu(s,s.query),s}function lu(i,e){const t=/\/{2,9}/g,r=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function xu(i,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,a,s){a&&(t[a]=s)}),t}let aa=class n0 extends jt{constructor(e,t={}){super(),this.binaryType=au,this.writeBuffer=[],e&&typeof e=="object"&&(t=e,e=null),e?(e=gi(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=gi(t.host).host),an(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&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?"/":""),typeof this.opts.query=="string"&&(this.opts.query=eu(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(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=ta,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 du[e](r)}open(){let e;if(this.opts.rememberUpgrade&&n0.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}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",t=>this.onClose("transport close",t))}probe(e){let t=this.createTransport(e),r=!1;n0.priorWebsocketSuccess=!1;const a=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",x=>{if(!r)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;n0.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(o(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const v=new Error("probe error");v.transport=t.name,this.emitReserved("upgradeError",v)}}))};function s(){r||(r=!0,o(),t.close(),t=null)}const b=x=>{const v=new Error("probe error: "+x);v.transport=t.name,s(),this.emitReserved("upgradeError",v)};function p(){b("transport closed")}function u(){b("socket closed")}function f(x){t&&x.name!==t.name&&s()}const o=()=>{t.removeListener("open",a),t.removeListener("error",b),t.removeListener("close",p),this.off("close",u),this.off("upgrading",f)};t.once("open",a),t.once("error",b),t.once("close",p),this.once("close",u),this.once("upgrading",f),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onOpen(){if(this.readyState="open",n0.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")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);break}}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(),this.readyState!=="closed"&&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,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&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&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){const a=this.writeBuffer[r].data;if(a&&(t+=Gd(a)),r>0&&t>this.maxPayload)return this.writeBuffer.slice(0,r);t+=2}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,a){if(typeof t=="function"&&(a=t,t=void 0),typeof r=="function"&&(a=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:e,data:t,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),a&&this.once("flush",a),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(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){n0.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(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 a=e.length;for(;r<a;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}};aa.protocol=ta;function pu(i,e="",t){let r=i;t=t||typeof location<"u"&&location,i==null&&(i=t.protocol+"//"+t.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=t.protocol+i:i=t.host+i),/^(https?|wss?):\/\//.test(i)||(typeof t<"u"?i=t.protocol+"//"+i:i="https://"+i),r=gi(i)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(t&&t.port===r.port?"":":"+r.port),r}const bu=typeof ArrayBuffer=="function",vu=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,oa=Object.prototype.toString,yu=typeof Blob=="function"||typeof Blob<"u"&&oa.call(Blob)==="[object BlobConstructor]",mu=typeof File=="function"||typeof File<"u"&&oa.call(File)==="[object FileConstructor]";function qi(i){return bu&&(i instanceof ArrayBuffer||vu(i))||yu&&i instanceof Blob||mu&&i instanceof File}function L0(i,e){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let t=0,r=i.length;t<r;t++)if(L0(i[t]))return!0;return!1}if(qi(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return L0(i.toJSON(),!0);for(const t in i)if(Object.prototype.hasOwnProperty.call(i,t)&&L0(i[t]))return!0;return!1}function gu(i){const e=[],t=i.data,r=i;return r.data=_i(t,e),r.attachments=e.length,{packet:r,buffers:e}}function _i(i,e){if(!i)return i;if(qi(i)){const t={_placeholder:!0,num:e.length};return e.push(i),t}else if(Array.isArray(i)){const t=new Array(i.length);for(let r=0;r<i.length;r++)t[r]=_i(i[r],e);return t}else if(typeof i=="object"&&!(i instanceof Date)){const t={};for(const r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=_i(i[r],e));return t}return i}function _u(i,e){return i.data=Ei(i.data,e),delete i.attachments,i}function Ei(i,e){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<e.length)return e[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let t=0;t<i.length;t++)i[t]=Ei(i[t],e);else if(typeof i=="object")for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=Ei(i[t],e));return i}const Eu=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],wu=5;var pt;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(pt||(pt={}));class Au{constructor(e){this.replacer=e}encode(e){return(e.type===pt.EVENT||e.type===pt.ACK)&&L0(e)?this.encodeAsBinary({type:e.type===pt.EVENT?pt.BINARY_EVENT:pt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===pt.BINARY_EVENT||e.type===pt.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=gu(e),r=this.encodeAsString(t.packet),a=t.buffers;return a.unshift(r),a}}function ss(i){return Object.prototype.toString.call(i)==="[object Object]"}class zi extends jt{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const r=t.type===pt.BINARY_EVENT;r||t.type===pt.BINARY_ACK?(t.type=r?pt.EVENT:pt.ACK,this.reconstructor=new Bu(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(qi(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const r={type:Number(e.charAt(0))};if(pt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===pt.BINARY_EVENT||r.type===pt.BINARY_ACK){const s=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const b=e.substring(s,t);if(b!=Number(b)||e.charAt(t)!=="-")throw new Error("Illegal attachments");r.attachments=Number(b)}if(e.charAt(t+1)==="/"){const s=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););r.nsp=e.substring(s,t)}else r.nsp="/";const a=e.charAt(t+1);if(a!==""&&Number(a)==a){const s=t+1;for(;++t;){const b=e.charAt(t);if(b==null||Number(b)!=b){--t;break}if(t===e.length)break}r.id=Number(e.substring(s,t+1))}if(e.charAt(++t)){const s=this.tryParse(e.substr(t));if(zi.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case pt.CONNECT:return ss(t);case pt.DISCONNECT:return t===void 0;case pt.CONNECT_ERROR:return typeof t=="string"||ss(t);case pt.EVENT:case pt.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Eu.indexOf(t[0])===-1);case pt.ACK:case pt.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Bu{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=_u(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Cu=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zi,Encoder:Au,get PacketType(){return pt},protocol:wu},Symbol.toStringTag,{value:"Module"}));function _r(i,e,t){return i.on(e,t),function(){i.off(e,t)}}const Su=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ca extends jt{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=[_r(e,"open",this.onopen.bind(this)),_r(e,"packet",this.onpacket.bind(this)),_r(e,"error",this.onerror.bind(this)),_r(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(Su.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:pt.EVENT,data:t};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const b=this.ids++,p=t.pop();this._registerAckCallback(b,p),r.id=b}const a=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!a||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,t){var r;const a=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(a===void 0){this.acks[e]=t;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===e&&this.sendBuffer.splice(p,1);t.call(this,new Error("operation has timed out"))},a),b=(...p)=>{this.io.clearTimeoutFn(s),t.apply(this,p)};b.withError=!0,this.acks[e]=b}emitWithAck(e,...t){return new Promise((r,a)=>{const s=(b,p)=>b?a(b):r(p);s.withError=!0,t.push(s),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...s)=>r!==this._queue[0]?void 0:(a!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(a)):(this._queue.shift(),t&&t(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)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(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:pt.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(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case pt.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 pt.EVENT:case pt.BINARY_EVENT:this.onevent(e);break;case pt.ACK:case pt.BINARY_ACK:this.onack(e);break;case pt.DISCONNECT:this.ondisconnect();break;case pt.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const t=e.data||[];e.id!=null&&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&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...a){r||(r=!0,t.packet({type:pt.ACK,id:e,data:a}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(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:pt.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 v0(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}v0.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*i);i=Math.floor(e*10)&1?i+t:i-t}return Math.min(i,this.max)|0};v0.prototype.reset=function(){this.attempts=0};v0.prototype.setMin=function(i){this.ms=i};v0.prototype.setMax=function(i){this.max=i};v0.prototype.setJitter=function(i){this.jitter=i};class wi extends jt{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,an(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((r=t.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new v0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const a=t.parser||Cu;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new aa(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const a=_r(t,"open",function(){r.onopen(),e&&e()}),s=p=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",p),e?e(p):this.maybeReconnectOnOpen()},b=_r(t,"error",s);if(this._timeout!==!1){const p=this._timeout,u=this.setTimeoutFn(()=>{a(),s(new Error("timeout")),t.close()},p);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(a),this.subs.push(b),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(_r(e,"ping",this.onping.bind(this)),_r(e,"data",this.ondata.bind(this)),_r(e,"error",this.onerror.bind(this)),_r(e,"close",this.onclose.bind(this)),_r(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){Ni(()=>{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 ca(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const r of t)if(this.nsps[r].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(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):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 A0={};function H0(i,e){typeof i=="object"&&(e=i,i=void 0),e=e||{};const t=pu(i,e.path||"/socket.io"),r=t.source,a=t.id,s=t.path,b=A0[a]&&s in A0[a].nsps,p=e.forceNew||e["force new connection"]||e.multiplex===!1||b;let u;return p?u=new wi(r,e):(A0[a]||(A0[a]=new wi(r,e)),u=A0[a]),t.query&&!e.query&&(e.query=t.queryKey),u.socket(t.path,e)}Object.assign(H0,{Manager:wi,Socket:ca,io:H0,connect:H0});const Vr=class Vr{constructor(){m0(this,"socket");this.socket=H0("http://159.138.233.132:8080")}static getInstance(){return Vr.instance||(Vr.instance=new Vr),Vr.instance}};m0(Vr,"instance");let Ai=Vr;class Fu{constructor(){m0(this,"socketInstance");this.socketInstance=Ai.getInstance()}joinRoom(e){this.socketInstance.socket.emit("joinRoom",e)}leaveRoom(e){this.socketInstance.socket.emit("leaveRoom",e)}confirmMessage(e,t){return this.socketInstance.socket.emit("confirmMessage",e,t)}onMessageReceived(e,t){e==="accountInfo"?this.socketInstance.socket.on("accountInfo",r=>{t(r)}):e==="requestMessage"?this.socketInstance.socket.on("requestMessage",r=>{t(r)}):e==="addressProvide"&&this.socketInstance.socket.on("addressProvide",r=>{t(r)})}offMessageReceived(e){e==="accountInfo"?this.socketInstance.socket.off("accountInfo"):e==="requestMessage"?this.socketInstance.socket.off("requestMessage"):e==="addressProvide"&&this.socketInstance.socket.off("addressProvide")}}const Or=new Fu;class Mu{isAccountCryptoType(e){return typeof e=="object"&&e!==null&&typeof e.signature=="string"&&typeof e.publicKey=="string"&&typeof e.address=="string"&&typeof e.etc=="string"}getAccountCrypto(){return new Promise((e,t)=>{Or.onMessageReceived("accountInfo",r=>{this.isAccountCryptoType(r)?e(r):t(new Error("Invalid account crypto"))})})}reciveRequest(){return new Promise((e,t)=>{Or.onMessageReceived("requestMessage",r=>{r.message==="Request Message"?e(!0):t(new Error("Request message is different"))})})}sendMessage(e,t){return new Promise((r,a)=>{Or.confirmMessage(e,t).connected?r():a(new Error("Send failed"))})}async qrLogin(e,t){try{if(await this.reciveRequest()){await this.sendMessage(e,t);const{publicKey:a,signature:s,address:b}=await this.getAccountCrypto();if(!qd.xphereVerify(t,a,s))throw new Error("Verification failed");return{address:b}}else throw new Error("Verification failed")}catch(r){return Promise.reject(r)}finally{Or.leaveRoom(e)}}}const Du=new Mu;class Ru{generateQrCode(e){const t=F0.lib.WordArray.random(32).toString(F0.enc.Hex);let r="";return e==="login"?r=`zigap://login?roomId=${t}&type=${e}`:e==="send"?r=`zigap://send?roomId=${t}&type=${e}`:e==="provide"&&(r=`zigap://provide?roomId=${t}&type=${e}`),Or.joinRoom(t),{qrCode:r,roomId:t}}}const da=new Ru,Pu=({sigMessage:i,validTime:e,onReceive:t,...r})=>{const[a,s]=br.useState(!0),{qrCode:b,roomId:p}=da.generateQrCode("login");return br.useEffect(()=>{const u=setTimeout(()=>{Or.leaveRoom(p),s(!1)},e*60*1e3);return()=>clearTimeout(u)},[p,e]),br.useEffect(()=>{(async()=>{try{console.log("roomId",p);const o={isSuccess:!0,address:(await Du.qrLogin(p,i)).address};t(o)}catch{t({isSuccess:!1})}})()},[t,i]),a?$0.jsx(ls,{value:b,...r}):$0.jsx("div",{children:"QR loading error"})};class Tu{isAccountType(e){return typeof e=="object"&&e!==null&&typeof e.address=="string"}getAccount(){return new Promise((e,t)=>{Or.onMessageReceived("addressProvide",r=>{this.isAccountType(r)?e(r):t(new Error("Invalid address"))})})}async qrAddressProvide(e){try{return await this.getAccount()}catch(t){return Promise.reject(t)}finally{Or.leaveRoom(e)}}}const ku=new Tu,Ou=({validTime:i,onReceive:e,...t})=>{const[r,a]=br.useState(!0),{qrCode:s,roomId:b}=da.generateQrCode("provide");return br.useEffect(()=>{const p=setTimeout(()=>{Or.leaveRoom(b),a(!1)},i*60*1e3);return()=>clearTimeout(p)},[b,i]),br.useEffect(()=>{(async()=>{try{const f={isSuccess:!0,address:(await ku.qrAddressProvide(b)).address};e(f)}catch{e({isSuccess:!1})}})()},[e]),r?$0.jsx(ls,{value:s,...t}):$0.jsx("div",{children:"QR loading error"})};exports.AddressProvideQR=Ou;exports.LoginQR=Pu;
56
+ `+Q):q.stack=Q}catch{}}throw q}}_request(A,N){typeof A=="string"?(N=N||{},N.url=A):N=A||{},N=He(this.defaults,N);const{transitional:q,paramsSerializer:j,headers:Q}=N;q!==void 0&&un.assertOptions(q,{silentJSONParsing:zr.transitional(zr.boolean),forcedJSONParsing:zr.transitional(zr.boolean),clarifyTimeoutError:zr.transitional(zr.boolean)},!1),j!=null&&(re.isFunction(j)?N.paramsSerializer={serialize:j}:un.assertOptions(j,{encode:zr.function,serialize:zr.function},!0)),N.method=(N.method||this.defaults.method||"get").toLowerCase();let te=Q&&re.merge(Q.common,Q[N.method]);Q&&re.forEach(["delete","get","head","post","put","patch","common"],ze=>{delete Q[ze]}),N.headers=Me.concat(te,Q);const le=[];let Te=!0;this.interceptors.request.forEach(function(it){typeof it.runWhen=="function"&&it.runWhen(N)===!1||(Te=Te&&it.synchronous,le.unshift(it.fulfilled,it.rejected))});const Pe=[];this.interceptors.response.forEach(function(it){Pe.push(it.fulfilled,it.rejected)});let ve,$e=0,Ut;if(!Te){const ze=[$i.bind(this),void 0];for(ze.unshift.apply(ze,le),ze.push.apply(ze,Pe),Ut=ze.length,ve=Promise.resolve(N);$e<Ut;)ve=ve.then(ze[$e++],ze[$e++]);return ve}Ut=le.length;let Ot=N;for($e=0;$e<Ut;){const ze=le[$e++],it=le[$e++];try{Ot=ze(Ot)}catch(or){it.call(this,or);break}}try{ve=$i.call(this,Ot)}catch(ze){return Promise.reject(ze)}for($e=0,Ut=Pe.length;$e<Ut;)ve=ve.then(Pe[$e++],Pe[$e++]);return ve}getUri(A){A=He(this.defaults,A);const N=be(A.baseURL,A.url);return ut(N,A.params,A.paramsSerializer)}}re.forEach(["delete","get","head","options"],function(A){R0.prototype[A]=function(N,q){return this.request(He(q||{},{method:A,url:N,data:(q||{}).data}))}}),re.forEach(["post","put","patch"],function(A){function N(q){return function(Q,te,le){return this.request(He(le||{},{method:A,headers:q?{"Content-Type":"multipart/form-data"}:{},url:Q,data:te}))}}R0.prototype[A]=N(),R0.prototype[A+"Form"]=N(!0)});var P0=R0;class hn{constructor(A){if(typeof A!="function")throw new TypeError("executor must be a function.");let N;this.promise=new Promise(function(Q){N=Q});const q=this;this.promise.then(j=>{if(!q._listeners)return;let Q=q._listeners.length;for(;Q-- >0;)q._listeners[Q](j);q._listeners=null}),this.promise.then=j=>{let Q;const te=new Promise(le=>{q.subscribe(le),Q=le}).then(j);return te.cancel=function(){q.unsubscribe(Q)},te},A(function(Q,te,le){q.reason||(q.reason=new Be(Q,te,le),N(q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}this._listeners?this._listeners.push(A):this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;const N=this._listeners.indexOf(A);N!==-1&&this._listeners.splice(N,1)}static source(){let A;return{token:new hn(function(j){A=j}),cancel:A}}}var xa=hn;function pa(m){return function(N){return m.apply(null,N)}}function ba(m){return re.isObject(m)&&m.isAxiosError===!0}const ln={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ln).forEach(([m,A])=>{ln[A]=m});var va=ln;function Wi(m){const A=new P0(m),N=i(P0.prototype.request,A);return re.extend(N,P0.prototype,A,{allOwnKeys:!0}),re.extend(N,A,null,{allOwnKeys:!0}),N.create=function(j){return Wi(He(m,j))},N}const $t=Wi(L);return $t.Axios=P0,$t.CanceledError=Be,$t.CancelToken=xa,$t.isCancel=we,$t.VERSION=Ui,$t.toFormData=ot,$t.AxiosError=Ae,$t.Cancel=$t.CanceledError,$t.all=function(A){return Promise.all(A)},$t.spread=pa,$t.isAxiosError=ba,$t.mergeConfig=He,$t.AxiosHeaders=Me,$t.formToJSON=m=>d(re.isHTMLForm(m)?new FormData(m):m),$t.getAdapter=Hi.getAdapter,$t.HttpStatusCode=va,$t.default=$t,ti=$t,ti}var zf;function vo(){return zf||(zf=1,function(i,e){(function(t,r){i.exports=r(d0(),bo())})(Ue,function(t,r){return function(){var a=t,s=a.Util,b=a.Enc,p=a.Sign,u=a.Rpc={_default_peers:["https://main.saseul.net","https://sub.saseul.net","https://aroma.saseul.net","https://blanc.saseul.net"],_endpoints:null,_timeout:3e4,_headers:{},_broadcast_limit:32,endpoint:function(f){const o=this.endpoints(f),x=Math.floor(Math.random()*o.length);return o[x]},endpoints:function(f){return typeof f=="object"?this._endpoints=Object.values(f):typeof f<"u"&&(this._endpoints=[String(f)]),this._endpoints?this._endpoints:this._default_peers},timeout:function(f){return typeof f=="number"&&f>0&&(this._timeout=f),this._timeout},headers:function(f){return typeof f=="object"&&(this._headers=f),this._headers},broadcastLimit:function(f){return typeof f=="number"&&f>0&&(this._broadcast_limit=f),this._broadcast_limit},tracker:function(){return this.get("peer",{})},trackerFromAll:function(){return new Promise((f,o)=>{u.all("GET","peer",{}).then(x=>{let v={peers:[],known_hosts:[]};x.forEach(_=>{_.data&&_.data.peers&&_.data.known_hosts&&typeof _.data.peers=="object"&&Array.isArray(_.data.known_hosts)&&(v.peers.push(Object.values(_.data.peers)),v.known_hosts.push(_.data.known_hosts))}),v.peers.length>0?(v.peers=s.flatMerge(v.peers),v.known_hosts=s.flatMerge(v.known_hosts),f(v)):o(x)})})},peer:function(){return new Promise((f,o)=>{u.tracker().then(x=>f(Object.values(x.data.peers))).catch(o)})},peerFromAll:function(){return new Promise((f,o)=>{u.all("GET","peer",{}).then(x=>{let v=[];x.forEach(_=>{_.data&&_.data.peers&&typeof _.data.peers=="object"&&v.push(Object.values(_.data.peers))}),v.length>0?(v=s.flatMerge(v),f(v)):o(x)})})},ping:function(){return this.get("ping",{})},round:function(){return this.get("round",{chain_type:"all"})},bestRound:function(){return new Promise((f,o)=>{this.all("GET","round",{chain_type:"all"}).then(x=>{let v=x,_=Math.max(...v.map(H=>H.data?H.data.main.block.height:0)),E=Math.max(...v.map(H=>H.data?H.data.resource.block.height:0)),D=v.find(H=>H.data&&H.data.main.block.height===_),k=v.find(H=>H.data&&H.data.resource.block.height===E);!D||!k?o({main:null,resource:null}):f({main:D.data.main.block,resource:k.data.resource.block})}).catch(o)})},signedRequest:function(f,o){return this.signedData(f,o,"request")},simpleRequest:function(f){return{request:f}},signedTransaction:function(f,o){return this.signedData(f,o,"transaction")},request:function(f){return this.get("request",f)},raceRequest:function(f,o=()=>!0){return this.race("GET","request",f,o)},sendTransaction:function(f){return this.post("sendtransaction",f)},sendTransactionToAll:function(f){return this.all("POST","sendtransaction",f)},broadcastTransaction:function(f){return new Promise((o,x)=>{this.peerFromAll().then(v=>{let _=u.broadcastLimit()-u.endpoints().length,E=s.merge(u.endpoints(),s.randomSlice(v,_).map(D=>D.host));u._all(E,"POST","sendtransaction",f,()=>!0,D=>{let k=D.filter(H=>H.code===200);if(k.length>0)o(k[0]);else{let H=Math.max(...D.map(T=>T.code)),P=D.filter(T=>T.code===H);P.length>0?x(P[0]):x(D[0])}})}).catch(x)})},estimatedFee:function(f){const o=JSON.stringify(f).length;return new Promise((x,v)=>{this.race("POST","weight",f,s.isInt).then(_=>{let E=parseInt(_.data||"0"),D=E===o?(o+336)*1e9:E*1e9;x(D)}).catch(_=>{v(_)})})},get:function(f,o){return this.fetch("GET",f,o)},post:function(f,o){return this.fetch("POST",f,o)},fetch:function(f,o,x){return new Promise(function(v,_){let E=u.axiosItem(u.endpoint(),f,o,x,u.headers());r(E).then(D=>{D.data&&D.data.code?v(D.data):_({code:901,msg:"Invalid response parameter"})}).catch(D=>{D.code==="ECONNABORTED"||D.message.includes("timeout")?_({code:408,msg:"Request timed out"}):D.response&&D.response.data&&D.response.data.code?v(D.response.data):D.response.status&&D.response.statusText&&D.response.data?_({code:D.response.status,msg:D.response.statusText,data:D.response.data}):_(D)})})},signedData:function(f,o,x="transaction"){if(o||(o=t.Sign.privateKey()),!p.keyValidity(o))return console.error("Invalid private key: "+o),{};let v={};return f.from=p.address(p.publicKey(o)),typeof f.timestamp!="number"&&(f.timestamp=s.utime()+(x==="transaction"?2e6:0)),v[x]=f,v.public_key=p.publicKey(o),v.signature=p.signature(b.txHash(f),o),v},axiosItem:function(f,o,x,v,_){let E={method:o,url:`${s.wrappedEndpoint(f)}/${x}`,timeout:u.timeout()};if(typeof _=="object"&&Object.keys(_).length>0&&(E.headers=_),o==="GET"){let D=[];for(let k in v)D.push(`${k}=${s.string(v[k])}`);E.url=E.url+(Object.keys(v).length===0?"":"?"+D.join("&"))}else{let D=new FormData;for(let k in v)D.set(k,s.string(v[k]));E.data=D}return E},race:function(f,o,x,v=()=>!0){const _=this.endpoints();return new Promise(function(E,D){u._race(_,f,o,x,v,E,D)})},_race:function(f,o,x,v,_=()=>!1,E=()=>{},D=()=>{}){(!Array.isArray(f)||f.length===0)&&D();try{let k=0,H,P,T,z=new r.CancelToken(Y=>T=Y),V=f.map(Y=>{P=u.axiosItem(Y,o,x,v,u.headers()),P.cancelToken=z,r(P).then(Z=>{Z.data&&Z.data.code&&_(Z.data.data)?(E(Z.data),T()):k++}).catch(Z=>{k++,H||(Z.code==="ECONNABORTED"||Z.message.includes("timeout")?H={code:408,msg:"Request timed out"}:Z.response&&Z.response.data&&Z.response.data.code?H=Z.response.data:Z.response&&Z.response.status?H={code:Z.response.status,msg:Z.response.statusText,data:Z.response.data}:H=Z)}).finally(()=>k>=f.length&&D(H))});Promise.race(V).then()}catch(k){console.error(k)}},all:function(f,o,x,v=()=>!0){const _=this.endpoints();return new Promise(function(E){u._all(_,f,o,x,v,E)})},_all:function(f,o,x,v,_=()=>!0,E=()=>{}){(!Array.isArray(f)||f.length===0)&&fallback();try{let D=[],k,H=f.map(P=>{k=u.axiosItem(P,o,x,v,u.headers()),r(k).then(T=>{T.data&&T.data.code&&_(T.data.data)?D.push({endpoint:P,code:T.data.code,data:T.data.data}):D.push({endpoint:P,msg:"Condition not met"})}).catch(T=>{if(T.code==="ECONNABORTED"||T.message.includes("timeout"))D.push({endpoint:P,code:408,msg:"Request timed out"});else if(T.response&&T.response.data&&T.response.data.code){let z=T.response.data;z.endpoint=P,D.push(z)}else T.response&&T.response.status?D.push({endpoint:P,code:T.response.status,msg:T.response.statusText,data:T.response.data}):D.push({endpoint:P,error:T})}).finally(()=>{D.length>=f.length&&E(D)})});Promise.race(H).then()}catch(D){console.error(D)}}}}(),t.Rpc})}(ei)),ei.exports}var ri={exports:{}},Lf;function yo(){return Lf||(Lf=1,function(i,e){(function(t,r){i.exports=r(d0())})(Ue,function(t){return function(){var r=t,a=t.Util,s=t.Enc,b=t.Sign,p=t.Rpc,u=r.SmartContract={ZERO_ADDRESS:"00000000000000000000000000000000000000000000",Operator:{legacy_condition:function(f,o="Conditional error"){return[f,o]},condition:function(f,o="Conditional error"){return{$condition:[f,o]}},response:function(f){return{$response:[f]}},weight:function(){return{$weight:[]}},if:function(f=!1,o=null,x=null){return{$if:[f,o,x]}},and:function(f=[]){return{$and:f}},or:function(f=[]){return{$or:f}},get:function(f={},o=""){return{$get:[f,o]}},add:function(f=[]){return{$add:f}},sub:function(f=[]){return{$sub:f}},mul:function(f=[]){return{$mul:f}},div:function(f=[]){return{$div:f}},precise_add:function(f=null,o=null,x=0){return{$precise_add:[f,o,x]}},precise_sub:function(f=null,o=null,x=0){return{$precise_sub:[f,o,x]}},precise_mul:function(f=null,o=null,x=0){return{$precise_mul:[f,o,x]}},precise_div:function(f=null,o=null,x=0){return{$precise_div:[f,o,x]}},scale:function(f=null){return{$scale:[f]}},get_type:function(f){return{$get_type:[f]}},is_numeric:function(f=[]){return{$is_numeric:f}},is_int:function(f=[]){return{$is_int:f}},is_string:function(f=[]){return{$is_string:f}},is_null:function(f=[]){return{$is_null:f}},is_bool:function(f=[]){return{$is_bool:f}},is_array:function(f=[]){return{$is_array:f}},is_double:function(f=[]){return{$is_double:f}},eq:function(f=0,o=0){return{$eq:[f,o]}},ne:function(f=0,o=0){return{$ne:[f,o]}},gt:function(f=0,o=0){return{$gt:[f,o]}},lt:function(f=0,o=0){return{$lt:[f,o]}},gte:function(f=0,o=0){return{$gte:[f,o]}},lte:function(f=0,o=0){return{$lte:[f,o]}},in:function(f=null,o=[]){return{$in:[f,o]}},load_param:function(f){return typeof f=="string"?{$load_param:[f]}:{$load_param:f}},read_universal:function(f=null,o=null,x=null){return{$read_universal:[f,o,x]}},read_local:function(f=null,o=null,x=null){return{$read_local:[f,o,x]}},write_universal:function(f=null,o=null,x=null){return{$write_universal:[f,o,x]}},write_local:function(f=null,o=null,x=null){return{$write_local:[f,o,x]}},concat:function(f=[]){return{$concat:f}},strlen:function(f=""){return{$strlen:[f]}},reg_match:function(f=null,o=""){return{$reg_match:[f,o]}},encode_json:function(f=null){return{$encode_json:[f]}},decode_json:function(f=""){return{$decode_json:[f]}},hash:function(f=[]){return{$hash:[f]}},short_hash:function(f=[]){return{$short_hash:[f]}},id_hash:function(f=[]){return{$id_hash:[f]}},sign_verify:function(f=null,o="",x=""){return{$sign_verify:[f,o,x]}},get_block:function(f,o){return{$get_block:[f,o]}},get_resource_block:function(f,o){return{$get_resource_block:[f,o]}},get_transaction:function(f){return{$get_transaction:[f]}},list_universal:function(f,o,x){return{$list_universal:[f,o,x]}}},Contract:function(f,o){this._methods={},this._writer=f,this._nonce=o,this.method=function(x){return this._methods[x]},this.writer=function(x){typeof x<"u"&&(typeof x=="string"&&(b.addressValidity(x)||x===s.ZERO_ADDRESS)?this._writer=x:console.error("Invalid writer address. "))},this.nonce=function(x){typeof x<"u"&&(typeof x=="string"?this._nonce=x:console.error("The 'nonce' parameter should be of string."))},this.methods=function(x=!1){let v={};if(x)for(let _ in this._methods)v[_]=this._methods[_].compile();else for(let _ in this._methods)v[_]=this._methods[_].type();return v},this.addMethod=function(x){x.writer(this._writer),x.nonce(this._nonce),this._methods[x.name()]=x},this.publish=function(x){this.register(x,"Publish")},this.register=function(x,v="Register"){let _=function(E){let D=a.utime()+1e6,k={type:v,code:E.compile(),timestamp:D},H=s.txHash(k),P=p.signedTransaction(k,x),T=function(){console.log("Checking results... "+H),p.round().then(function(z){typeof z.data<"u"&&z.data.main.block.s_timestamp>D?p.request(p.signedRequest({type:"GetCode",ctype:E.type(),target:E.mid()}),b.privateKey()).then(function(V){for(let Y in V.data)V.data[Y]===null?(console.log("Failed. Resending code... "+H),_(E)):console.log("Success! "+H)}):setTimeout(T,2e3)})};p.broadcastTransaction(P).then(function(z){z.code===200?(console.log(z.data),setTimeout(T,2e3)):z.code!==999?(console.log("Failed. Resending code... "+H),_(E)):console.dir(z)}).catch(function(z){console.dir(z)})};for(let E in this._methods)_(this._methods[E])}},Method:function(f){this._type="request",this._machine="0.2.0",this._name="",this._version="",this._space="",this._writer="",this._parameters={},this._executions=[],typeof f=="object"&&(typeof f.type<"u"&&(typeof f.type=="string"&&f.type==="contract"?this._type="contract":this._type="request"),typeof f.t<"u"&&(typeof f.t=="string"&&f.t==="contract"?this._type="contract":this._type="request"),typeof f.machine<"u"&&(typeof f.machine=="string"?this._machine=f.machine:console.error("The 'machine' parameter should be of string.")),typeof f.m<"u"&&(typeof f.m=="string"?this._machine=f.m:console.error("The 'machine' parameter should be of string.")),typeof f.name<"u"&&(typeof f.name=="string"?this._name=f.name:console.error("The 'name' parameter should be of string.")),typeof f.n<"u"&&(typeof f.n=="string"?this._name=f.n:console.error("The 'name' parameter should be of string.")),typeof f.version<"u"&&(typeof f.version=="string"?this._version=f.version:console.error("The 'version' parameter should be of string.")),typeof f.v<"u"&&(typeof f.v=="string"?this._version=f.v:console.error("The 'version' parameter should be of string.")),typeof f.space<"u"&&(typeof f.space=="string"?this._space=f.space:console.error("The 'space' parameter should be of string.")),typeof f.s<"u"&&(typeof f.s=="string"?this._space=f.s:console.error("The 'space' parameter should be of string.")),typeof f.writer<"u"&&(typeof f.writer=="string"&&(b.addressValidity(f.writer)||f.writer===s.ZERO_ADDRESS)?this._writer=f.writer:console.error("Invalid writer address. ")),typeof f.w<"u"&&(typeof f.w=="string"&&(b.addressValidity(f.w)||f.w===s.ZERO_ADDRESS)?this._writer=f.w:console.error("Invalid writer address. ")),typeof f.parameters<"u"&&(typeof f.parameters=="object"&&u.parametersValidity(f.parameters)?this._parameters=f.parameters:console.error("Invalid parameters. ")),typeof f.p<"u"&&(typeof f.p=="object"&&u.parametersValidity(f.p)?this._parameters=f.p:console.error("Invalid parameters. ")),typeof f.executions<"u"&&(typeof f.executions=="object"?this._executions=f.executions:console.error("Invalid executions. ")),typeof f.e<"u"&&(typeof f.e=="object"?this._executions=f.e:console.error("Invalid executions. "))),this.cid=function(){return s.cid(this.writer(),this.space())},this.mid=function(){return s.hash([this.writer(),this.space(),this.name()])},this.type=function(o){return typeof o<"u"&&(o==="contract"?this._type="contract":this._type="request"),this._type},this.machine=function(o){return typeof o<"u"&&(typeof o=="string"?this._machine=o:console.error("The 'machine' parameter should be of string.")),this._machine},this.name=function(o){return typeof o<"u"&&(typeof o=="string"?this._name=o:console.error("The 'name' parameter should be of string.")),this._name},this.version=function(o){return typeof o<"u"&&(typeof o=="string"?this._version=o:console.error("The 'version' parameter should be of string.")),this._version},this.nonce=function(o){return typeof o<"u"&&(typeof o=="string"?this._space=o:console.error("The 'space' parameter should be of string.")),this._space},this.space=function(o){return this.nonce(o)},this.writer=function(o){return typeof o<"u"&&(b.addressValidity(o)||o===s.ZERO_ADDRESS?this._writer=o:console.error("Invalid writer address. ")),this._writer},this.parameters=function(o){return typeof o<"u"&&(typeof o=="object"&&u.parametersValidity(o)?this._parameters=o:console.error("Invalid parameters. ")),this._parameters},this.executions=function(o){return typeof o=="object"&&(this._executions=o),this._executions},this.addParameter=function(o){typeof o.default>"u"&&(o.default=null),typeof o.cases>"u"&&(o.cases=null),typeof o=="object"&&u.parameterValidity(o)?this._parameters[o.name]=o:console.error("Invalid parameter. ")},this.addExecution=function(o){this._executions.push(o)},this.compile=function(){let o;return Object.keys(this._parameters).length===0&&(this._parameters=[]),o=JSON.stringify({t:this._type,m:this._machine,n:this._name,v:this._version,s:this._space,w:this._writer,p:this._parameters,e:this._executions}),o.replaceAll("/","\\/")}},LegacyMethod:function(f){this._type="request",this._name="",this._version="",this._space="",this._writer="",this._parameters={},this._conditions=[],this._updates=[],this._response=[],typeof f=="object"&&(typeof f.type<"u"&&(typeof f.type=="string"&&f.type==="contract"?this._type="contract":this._type="request"),typeof f.name<"u"&&(typeof f.name=="string"?this._name=f.name:console.error("The 'name' parameter should be of string.")),typeof f.version<"u"&&(typeof f.version=="string"?this._version=f.version:console.error("The 'version' parameter should be of string.")),typeof f.nonce<"u"&&(typeof f.nonce=="string"?this._space=f.nonce:console.error("The 'space' parameter should be of string.")),typeof f.space<"u"&&(typeof f.space=="string"?this._space=f.space:console.error("The 'space' parameter should be of string.")),typeof f.writer<"u"&&(typeof f.writer=="string"&&(b.addressValidity(f.writer)||f.writer===s.ZERO_ADDRESS)?this._writer=f.writer:console.error("Invalid writer address. ")),typeof f.parameters<"u"&&(typeof f.parameters=="object"&&u.parametersValidity(f.parameters)?this._parameters=f.parameters:console.error("Invalid parameters. ")),typeof f.conditions<"u"&&(typeof f.conditions=="object"?this._conditions=f.conditions:console.error("Invalid conditions. ")),typeof f.updates<"u"&&(typeof f.updates=="object"?this._updates=f.updates:console.error("Invalid updates. ")),typeof f.response<"u"&&(this._response=f.response)),this.cid=function(){return s.cid(this.writer(),this.space())},this.mid=function(){return s.idHash([this.name(),this.space()])+"00000000000000000000"},this.type=function(o){return typeof o<"u"&&(o==="contract"?this._type="contract":this._type="request"),this._type},this.name=function(o){return typeof o<"u"&&(typeof o=="string"?this._name=o:console.error("The 'name' parameter should be of string.")),this._name},this.version=function(o){return typeof o<"u"&&(typeof o=="string"?this._version=o:console.error("The 'version' parameter should be of string.")),this._version},this.nonce=function(o){return typeof o<"u"&&(typeof o=="string"?this._space=o:console.error("The 'nonce' parameter should be of string.")),this._space},this.space=function(o){return this.nonce(o)},this.writer=function(o){return typeof o<"u"&&(b.addressValidity(o)||o===s.ZERO_ADDRESS?this._writer=o:console.error("Invalid writer address. ")),this._writer},this.parameters=function(o){return typeof o<"u"&&(typeof o=="object"&&u.parametersValidity(o)?this._parameters=o:console.error("Invalid parameters. ")),this._parameters},this.conditions=function(o){return typeof o=="object"&&(this._conditions=o),this._conditions},this.updates=function(o){return typeof o=="object"&&(this._updates=o),this._updates},this.response=function(o){return typeof o<"u"&&(this._response=o),this._response},this.addParameter=function(o){typeof o.default>"u"&&(o.default=null),typeof o.cases>"u"&&(o.cases=null),typeof o=="object"&&u.parameterValidity(o)?this._parameters[o.name]=o:console.error("Invalid parameter. ")},this.addCondition=function(o){this._conditions.push(o)},this.addUpdate=function(o){this._updates.push(o)},this.compile=function(){let o;return Object.keys(this._parameters).length===0&&(this._parameters=[]),this._type==="contract"?o=JSON.stringify({type:this._type,name:this._name,version:this._version,nonce:this._space,writer:this._writer,parameters:this._parameters,conditions:this._conditions,updates:this._updates}):o=JSON.stringify({type:this._type,name:this._name,version:this._version,nonce:this._space,writer:this._writer,parameters:this._parameters,conditions:this._conditions,response:this._response}),o.replaceAll("/","\\/")}},parametersValidity(f){for(let o in f)if(this.parameterValidity(f[o])===!1)return!1;return!0},parameterValidity(f){let o=!1,x=!1,v=!1,_=!1,E=!1;return typeof f.name=="string"?o=!0:o=!1,typeof f.type=="string"&&u.typeValidity(f.type)?x=!0:x=!1,typeof f.maxlength=="number"?v=!0:v=!1,typeof f.requirements=="boolean"?_=!0:_=!1,typeof f.cases>"u"||typeof f.cases=="object"||f.cases===null?E=!0:E=!1,o&&x&&v&&_&&E},typeValidity(f){return f==="string"||f==="int"||f==="array"||f==="bool"||f==="double"||f==="any"}}}(),t.SmartContract})}(ri)),ri.exports}(function(i,e){(function(t,r){i.exports=r(d0(),qa(),lo(),po(),vo(),yo())})(Ue,function(t){return t})})(xs);var gs=xs.exports;const _s=as(gs),mo=Ea({__proto__:null,default:_s},[gs]);var Es={};const go="elliptic",_o="6.5.5",Eo="EC cryptography",wo="lib/elliptic.js",Ao=["lib"],Bo={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},Co={type:"git",url:"git@github.com:indutny/elliptic"},So=["EC","Elliptic","curve","Cryptography"],Fo="Fedor Indutny <fedor@indutny.com>",Mo="MIT",Do={url:"https://github.com/indutny/elliptic/issues"},Ro="https://github.com/indutny/elliptic",Po={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},To={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},ko={name:go,version:_o,description:Eo,main:wo,files:Ao,scripts:Bo,repository:Co,keywords:So,author:Fo,license:Mo,bugs:Do,homepage:Ro,devDependencies:Po,dependencies:To};var xr={},Si={exports:{}};Si.exports;(function(i){(function(e,t){function r(S,c){if(!S)throw new Error(c||"Assertion failed")}function a(S,c){S.super_=c;var h=function(){};h.prototype=c.prototype,S.prototype=new h,S.prototype.constructor=S}function s(S,c,h){if(s.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((c==="le"||c==="be")&&(h=c,c=10),this._init(S||0,c||10,h||"be"))}typeof e=="object"?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var b;try{typeof window<"u"&&typeof window.Buffer<"u"?b=window.Buffer:b=V0.Buffer}catch{}s.isBN=function(c){return c instanceof s?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===s.wordSize&&Array.isArray(c.words)},s.max=function(c,h){return c.cmp(h)>0?c:h},s.min=function(c,h){return c.cmp(h)<0?c:h},s.prototype._init=function(c,h,w){if(typeof c=="number")return this._initNumber(c,h,w);if(typeof c=="object")return this._initArray(c,h,w);h==="hex"&&(h=16),r(h===(h|0)&&h>=2&&h<=36),c=c.toString().replace(/\s+/g,"");var M=0;c[0]==="-"&&(M++,this.negative=1),M<c.length&&(h===16?this._parseHex(c,M,w):(this._parseBase(c,h,M),w==="le"&&this._initArray(this.toArray(),h,w)))},s.prototype._initNumber=function(c,h,w){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(r(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),w==="le"&&this._initArray(this.toArray(),h,w)},s.prototype._initArray=function(c,h,w){if(r(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var O,U,W=0;if(w==="be")for(M=c.length-1,O=0;M>=0;M-=3)U=c[M]|c[M-1]<<8|c[M-2]<<16,this.words[O]|=U<<W&67108863,this.words[O+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,O++);else if(w==="le")for(M=0,O=0;M<c.length;M+=3)U=c[M]|c[M+1]<<8|c[M+2]<<16,this.words[O]|=U<<W&67108863,this.words[O+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,O++);return this.strip()};function p(S,c){var h=S.charCodeAt(c);return h>=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function u(S,c,h){var w=p(S,h);return h-1>=c&&(w|=p(S,h-1)<<4),w}s.prototype._parseHex=function(c,h,w){this.length=Math.ceil((c.length-h)/6),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var O=0,U=0,W;if(w==="be")for(M=c.length-1;M>=h;M-=2)W=u(c,h,M)<<O,this.words[U]|=W&67108863,O>=18?(O-=18,U+=1,this.words[U]|=W>>>26):O+=8;else{var I=c.length-h;for(M=I%2===0?h+1:h;M<c.length;M+=2)W=u(c,h,M)<<O,this.words[U]|=W&67108863,O>=18?(O-=18,U+=1,this.words[U]|=W>>>26):O+=8}this.strip()};function f(S,c,h,w){for(var M=0,O=Math.min(S.length,h),U=c;U<O;U++){var W=S.charCodeAt(U)-48;M*=w,W>=49?M+=W-49+10:W>=17?M+=W-17+10:M+=W}return M}s.prototype._parseBase=function(c,h,w){this.words=[0],this.length=1;for(var M=0,O=1;O<=67108863;O*=h)M++;M--,O=O/h|0;for(var U=c.length-w,W=U%M,I=Math.min(U,U-W)+w,l=0,F=w;F<I;F+=M)l=f(c,F,F+M,h),this.imuln(O),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(W!==0){var ee=1;for(l=f(c,F,c.length,h),F=0;F<W;F++)ee*=h;this.imuln(ee),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},s.prototype.copy=function(c){c.words=new Array(this.length);for(var h=0;h<this.length;h++)c.words[h]=this.words[h];c.length=this.length,c.negative=this.negative,c.red=this.red},s.prototype.clone=function(){var c=new s(null);return this.copy(c),c},s.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var o=["","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"],x=[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],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(c,h){c=c||10,h=h|0||1;var w;if(c===16||c==="hex"){w="";for(var M=0,O=0,U=0;U<this.length;U++){var W=this.words[U],I=((W<<M|O)&16777215).toString(16);O=W>>>24-M&16777215,O!==0||U!==this.length-1?w=o[6-I.length]+I+w:w=I+w,M+=2,M>=26&&(M-=26,U--)}for(O!==0&&(w=O.toString(16)+w);w.length%h!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}if(c===(c|0)&&c>=2&&c<=36){var l=x[c],F=v[c];w="";var ee=this.clone();for(ee.negative=0;!ee.isZero();){var J=ee.modn(F).toString(c);ee=ee.idivn(F),ee.isZero()?w=J+w:w=o[l-J.length]+J+w}for(this.isZero()&&(w="0"+w);w.length%h!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(c,h){return r(typeof b<"u"),this.toArrayLike(b,c,h)},s.prototype.toArray=function(c,h){return this.toArrayLike(Array,c,h)},s.prototype.toArrayLike=function(c,h,w){var M=this.byteLength(),O=w||Math.max(1,M);r(M<=O,"byte array longer than desired length"),r(O>0,"Requested array length <= 0"),this.strip();var U=h==="le",W=new c(O),I,l,F=this.clone();if(U){for(l=0;!F.isZero();l++)I=F.andln(255),F.iushrn(8),W[l]=I;for(;l<O;l++)W[l]=0}else{for(l=0;l<O-M;l++)W[l]=0;for(l=0;!F.isZero();l++)I=F.andln(255),F.iushrn(8),W[O-l-1]=I}return W},Math.clz32?s.prototype._countBits=function(c){return 32-Math.clz32(c)}:s.prototype._countBits=function(c){var h=c,w=0;return h>=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},s.prototype._zeroBits=function(c){if(c===0)return 26;var h=c,w=0;return h&8191||(w+=13,h>>>=13),h&127||(w+=7,h>>>=7),h&15||(w+=4,h>>>=4),h&3||(w+=2,h>>>=2),h&1||w++,w},s.prototype.bitLength=function(){var c=this.words[this.length-1],h=this._countBits(c);return(this.length-1)*26+h};function _(S){for(var c=new Array(S.bitLength()),h=0;h<c.length;h++){var w=h/26|0,M=h%26;c[h]=(S.words[w]&1<<M)>>>M}return c}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,h=0;h<this.length;h++){var w=this._zeroBits(this.words[h]);if(c+=w,w!==26)break}return c},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},s.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var h=0;h<c.length;h++)this.words[h]=this.words[h]|c.words[h];return this.strip()},s.prototype.ior=function(c){return r((this.negative|c.negative)===0),this.iuor(c)},s.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},s.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},s.prototype.iuand=function(c){var h;this.length>c.length?h=c:h=this;for(var w=0;w<h.length;w++)this.words[w]=this.words[w]&c.words[w];return this.length=h.length,this.strip()},s.prototype.iand=function(c){return r((this.negative|c.negative)===0),this.iuand(c)},s.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},s.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},s.prototype.iuxor=function(c){var h,w;this.length>c.length?(h=this,w=c):(h=c,w=this);for(var M=0;M<w.length;M++)this.words[M]=h.words[M]^w.words[M];if(this!==h)for(;M<h.length;M++)this.words[M]=h.words[M];return this.length=h.length,this.strip()},s.prototype.ixor=function(c){return r((this.negative|c.negative)===0),this.iuxor(c)},s.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},s.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},s.prototype.inotn=function(c){r(typeof c=="number"&&c>=0);var h=Math.ceil(c/26)|0,w=c%26;this._expand(h),w>0&&h--;for(var M=0;M<h;M++)this.words[M]=~this.words[M]&67108863;return w>0&&(this.words[M]=~this.words[M]&67108863>>26-w),this.strip()},s.prototype.notn=function(c){return this.clone().inotn(c)},s.prototype.setn=function(c,h){r(typeof c=="number"&&c>=0);var w=c/26|0,M=c%26;return this._expand(w+1),h?this.words[w]=this.words[w]|1<<M:this.words[w]=this.words[w]&~(1<<M),this.strip()},s.prototype.iadd=function(c){var h;if(this.negative!==0&&c.negative===0)return this.negative=0,h=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,h=this.isub(c),c.negative=1,h._normSign();var w,M;this.length>c.length?(w=this,M=c):(w=c,M=this);for(var O=0,U=0;U<M.length;U++)h=(w.words[U]|0)+(M.words[U]|0)+O,this.words[U]=h&67108863,O=h>>>26;for(;O!==0&&U<w.length;U++)h=(w.words[U]|0)+O,this.words[U]=h&67108863,O=h>>>26;if(this.length=w.length,O!==0)this.words[this.length]=O,this.length++;else if(w!==this)for(;U<w.length;U++)this.words[U]=w.words[U];return this},s.prototype.add=function(c){var h;return c.negative!==0&&this.negative===0?(c.negative=0,h=this.sub(c),c.negative^=1,h):c.negative===0&&this.negative!==0?(this.negative=0,h=c.sub(this),this.negative=1,h):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},s.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var h=this.iadd(c);return c.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var w=this.cmp(c);if(w===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,O;w>0?(M=this,O=c):(M=c,O=this);for(var U=0,W=0;W<O.length;W++)h=(M.words[W]|0)-(O.words[W]|0)+U,U=h>>26,this.words[W]=h&67108863;for(;U!==0&&W<M.length;W++)h=(M.words[W]|0)+U,U=h>>26,this.words[W]=h&67108863;if(U===0&&W<M.length&&M!==this)for(;W<M.length;W++)this.words[W]=M.words[W];return this.length=Math.max(this.length,W),M!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(c){return this.clone().isub(c)};function E(S,c,h){h.negative=c.negative^S.negative;var w=S.length+c.length|0;h.length=w,w=w-1|0;var M=S.words[0]|0,O=c.words[0]|0,U=M*O,W=U&67108863,I=U/67108864|0;h.words[0]=W;for(var l=1;l<w;l++){for(var F=I>>>26,ee=I&67108863,J=Math.min(l,c.length-1),G=Math.max(0,l-S.length+1);G<=J;G++){var he=l-G|0;M=S.words[he]|0,O=c.words[G]|0,U=M*O+ee,F+=U/67108864|0,ee=U&67108863}h.words[l]=ee|0,I=F|0}return I!==0?h.words[l]=I|0:h.length--,h.strip()}var D=function(c,h,w){var M=c.words,O=h.words,U=w.words,W=0,I,l,F,ee=M[0]|0,J=ee&8191,G=ee>>>13,he=M[1]|0,_e=he&8191,Le=he>>>13,Ie=M[2]|0,je=Ie&8191,Ke=Ie>>>13,dr=M[3]|0,at=dr&8191,Je=dr>>>13,Nt=M[4]|0,vt=Nt&8191,rt=Nt>>>13,nr=M[5]|0,dt=nr&8191,Qe=nr>>>13,Qt=M[6]|0,et=Qt&8191,Ve=Qt>>>13,Kt=M[7]|0,re=Kt&8191,Ae=Kt>>>13,Ht=M[8]|0,tt=Ht&8191,Ft=Ht>>>13,sr=M[9]|0,At=sr&8191,nt=sr>>>13,ir=O[0]|0,Bt=ir&8191,ot=ir>>>13,er=O[1]|0,yt=er&8191,gt=er>>>13,ar=O[2]|0,ut=ar&8191,_t=ar>>>13,tr=O[3]|0,Et=tr&8191,Mt=tr>>>13,Wt=O[4]|0,mt=Wt&8191,ht=Wt>>>13,ur=O[5]|0,Ct=ur&8191,St=ur>>>13,wr=O[6]|0,Ze=wr&8191,qe=wr>>>13,y=O[7]|0,C=y&8191,B=y>>>13,d=O[8]|0,R=d&8191,g=d>>>13,L=O[9]|0,K=L&8191,ne=L>>>13;w.negative=c.negative^h.negative,w.length=19,I=Math.imul(J,Bt),l=Math.imul(J,ot),l=l+Math.imul(G,Bt)|0,F=Math.imul(G,ot);var pe=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(pe>>>26)|0,pe&=67108863,I=Math.imul(_e,Bt),l=Math.imul(_e,ot),l=l+Math.imul(Le,Bt)|0,F=Math.imul(Le,ot),I=I+Math.imul(J,yt)|0,l=l+Math.imul(J,gt)|0,l=l+Math.imul(G,yt)|0,F=F+Math.imul(G,gt)|0;var de=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(de>>>26)|0,de&=67108863,I=Math.imul(je,Bt),l=Math.imul(je,ot),l=l+Math.imul(Ke,Bt)|0,F=Math.imul(Ke,ot),I=I+Math.imul(_e,yt)|0,l=l+Math.imul(_e,gt)|0,l=l+Math.imul(Le,yt)|0,F=F+Math.imul(Le,gt)|0,I=I+Math.imul(J,ut)|0,l=l+Math.imul(J,_t)|0,l=l+Math.imul(G,ut)|0,F=F+Math.imul(G,_t)|0;var ge=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ge>>>26)|0,ge&=67108863,I=Math.imul(at,Bt),l=Math.imul(at,ot),l=l+Math.imul(Je,Bt)|0,F=Math.imul(Je,ot),I=I+Math.imul(je,yt)|0,l=l+Math.imul(je,gt)|0,l=l+Math.imul(Ke,yt)|0,F=F+Math.imul(Ke,gt)|0,I=I+Math.imul(_e,ut)|0,l=l+Math.imul(_e,_t)|0,l=l+Math.imul(Le,ut)|0,F=F+Math.imul(Le,_t)|0,I=I+Math.imul(J,Et)|0,l=l+Math.imul(J,Mt)|0,l=l+Math.imul(G,Et)|0,F=F+Math.imul(G,Mt)|0;var ue=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ue>>>26)|0,ue&=67108863,I=Math.imul(vt,Bt),l=Math.imul(vt,ot),l=l+Math.imul(rt,Bt)|0,F=Math.imul(rt,ot),I=I+Math.imul(at,yt)|0,l=l+Math.imul(at,gt)|0,l=l+Math.imul(Je,yt)|0,F=F+Math.imul(Je,gt)|0,I=I+Math.imul(je,ut)|0,l=l+Math.imul(je,_t)|0,l=l+Math.imul(Ke,ut)|0,F=F+Math.imul(Ke,_t)|0,I=I+Math.imul(_e,Et)|0,l=l+Math.imul(_e,Mt)|0,l=l+Math.imul(Le,Et)|0,F=F+Math.imul(Le,Mt)|0,I=I+Math.imul(J,mt)|0,l=l+Math.imul(J,ht)|0,l=l+Math.imul(G,mt)|0,F=F+Math.imul(G,ht)|0;var Se=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Se>>>26)|0,Se&=67108863,I=Math.imul(dt,Bt),l=Math.imul(dt,ot),l=l+Math.imul(Qe,Bt)|0,F=Math.imul(Qe,ot),I=I+Math.imul(vt,yt)|0,l=l+Math.imul(vt,gt)|0,l=l+Math.imul(rt,yt)|0,F=F+Math.imul(rt,gt)|0,I=I+Math.imul(at,ut)|0,l=l+Math.imul(at,_t)|0,l=l+Math.imul(Je,ut)|0,F=F+Math.imul(Je,_t)|0,I=I+Math.imul(je,Et)|0,l=l+Math.imul(je,Mt)|0,l=l+Math.imul(Ke,Et)|0,F=F+Math.imul(Ke,Mt)|0,I=I+Math.imul(_e,mt)|0,l=l+Math.imul(_e,ht)|0,l=l+Math.imul(Le,mt)|0,F=F+Math.imul(Le,ht)|0,I=I+Math.imul(J,Ct)|0,l=l+Math.imul(J,St)|0,l=l+Math.imul(G,Ct)|0,F=F+Math.imul(G,St)|0;var Ee=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,I=Math.imul(et,Bt),l=Math.imul(et,ot),l=l+Math.imul(Ve,Bt)|0,F=Math.imul(Ve,ot),I=I+Math.imul(dt,yt)|0,l=l+Math.imul(dt,gt)|0,l=l+Math.imul(Qe,yt)|0,F=F+Math.imul(Qe,gt)|0,I=I+Math.imul(vt,ut)|0,l=l+Math.imul(vt,_t)|0,l=l+Math.imul(rt,ut)|0,F=F+Math.imul(rt,_t)|0,I=I+Math.imul(at,Et)|0,l=l+Math.imul(at,Mt)|0,l=l+Math.imul(Je,Et)|0,F=F+Math.imul(Je,Mt)|0,I=I+Math.imul(je,mt)|0,l=l+Math.imul(je,ht)|0,l=l+Math.imul(Ke,mt)|0,F=F+Math.imul(Ke,ht)|0,I=I+Math.imul(_e,Ct)|0,l=l+Math.imul(_e,St)|0,l=l+Math.imul(Le,Ct)|0,F=F+Math.imul(Le,St)|0,I=I+Math.imul(J,Ze)|0,l=l+Math.imul(J,qe)|0,l=l+Math.imul(G,Ze)|0,F=F+Math.imul(G,qe)|0;var Fe=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,I=Math.imul(re,Bt),l=Math.imul(re,ot),l=l+Math.imul(Ae,Bt)|0,F=Math.imul(Ae,ot),I=I+Math.imul(et,yt)|0,l=l+Math.imul(et,gt)|0,l=l+Math.imul(Ve,yt)|0,F=F+Math.imul(Ve,gt)|0,I=I+Math.imul(dt,ut)|0,l=l+Math.imul(dt,_t)|0,l=l+Math.imul(Qe,ut)|0,F=F+Math.imul(Qe,_t)|0,I=I+Math.imul(vt,Et)|0,l=l+Math.imul(vt,Mt)|0,l=l+Math.imul(rt,Et)|0,F=F+Math.imul(rt,Mt)|0,I=I+Math.imul(at,mt)|0,l=l+Math.imul(at,ht)|0,l=l+Math.imul(Je,mt)|0,F=F+Math.imul(Je,ht)|0,I=I+Math.imul(je,Ct)|0,l=l+Math.imul(je,St)|0,l=l+Math.imul(Ke,Ct)|0,F=F+Math.imul(Ke,St)|0,I=I+Math.imul(_e,Ze)|0,l=l+Math.imul(_e,qe)|0,l=l+Math.imul(Le,Ze)|0,F=F+Math.imul(Le,qe)|0,I=I+Math.imul(J,C)|0,l=l+Math.imul(J,B)|0,l=l+Math.imul(G,C)|0,F=F+Math.imul(G,B)|0;var ke=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ke>>>26)|0,ke&=67108863,I=Math.imul(tt,Bt),l=Math.imul(tt,ot),l=l+Math.imul(Ft,Bt)|0,F=Math.imul(Ft,ot),I=I+Math.imul(re,yt)|0,l=l+Math.imul(re,gt)|0,l=l+Math.imul(Ae,yt)|0,F=F+Math.imul(Ae,gt)|0,I=I+Math.imul(et,ut)|0,l=l+Math.imul(et,_t)|0,l=l+Math.imul(Ve,ut)|0,F=F+Math.imul(Ve,_t)|0,I=I+Math.imul(dt,Et)|0,l=l+Math.imul(dt,Mt)|0,l=l+Math.imul(Qe,Et)|0,F=F+Math.imul(Qe,Mt)|0,I=I+Math.imul(vt,mt)|0,l=l+Math.imul(vt,ht)|0,l=l+Math.imul(rt,mt)|0,F=F+Math.imul(rt,ht)|0,I=I+Math.imul(at,Ct)|0,l=l+Math.imul(at,St)|0,l=l+Math.imul(Je,Ct)|0,F=F+Math.imul(Je,St)|0,I=I+Math.imul(je,Ze)|0,l=l+Math.imul(je,qe)|0,l=l+Math.imul(Ke,Ze)|0,F=F+Math.imul(Ke,qe)|0,I=I+Math.imul(_e,C)|0,l=l+Math.imul(_e,B)|0,l=l+Math.imul(Le,C)|0,F=F+Math.imul(Le,B)|0,I=I+Math.imul(J,R)|0,l=l+Math.imul(J,g)|0,l=l+Math.imul(G,R)|0,F=F+Math.imul(G,g)|0;var Oe=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,I=Math.imul(At,Bt),l=Math.imul(At,ot),l=l+Math.imul(nt,Bt)|0,F=Math.imul(nt,ot),I=I+Math.imul(tt,yt)|0,l=l+Math.imul(tt,gt)|0,l=l+Math.imul(Ft,yt)|0,F=F+Math.imul(Ft,gt)|0,I=I+Math.imul(re,ut)|0,l=l+Math.imul(re,_t)|0,l=l+Math.imul(Ae,ut)|0,F=F+Math.imul(Ae,_t)|0,I=I+Math.imul(et,Et)|0,l=l+Math.imul(et,Mt)|0,l=l+Math.imul(Ve,Et)|0,F=F+Math.imul(Ve,Mt)|0,I=I+Math.imul(dt,mt)|0,l=l+Math.imul(dt,ht)|0,l=l+Math.imul(Qe,mt)|0,F=F+Math.imul(Qe,ht)|0,I=I+Math.imul(vt,Ct)|0,l=l+Math.imul(vt,St)|0,l=l+Math.imul(rt,Ct)|0,F=F+Math.imul(rt,St)|0,I=I+Math.imul(at,Ze)|0,l=l+Math.imul(at,qe)|0,l=l+Math.imul(Je,Ze)|0,F=F+Math.imul(Je,qe)|0,I=I+Math.imul(je,C)|0,l=l+Math.imul(je,B)|0,l=l+Math.imul(Ke,C)|0,F=F+Math.imul(Ke,B)|0,I=I+Math.imul(_e,R)|0,l=l+Math.imul(_e,g)|0,l=l+Math.imul(Le,R)|0,F=F+Math.imul(Le,g)|0,I=I+Math.imul(J,K)|0,l=l+Math.imul(J,ne)|0,l=l+Math.imul(G,K)|0,F=F+Math.imul(G,ne)|0;var Me=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Me>>>26)|0,Me&=67108863,I=Math.imul(At,yt),l=Math.imul(At,gt),l=l+Math.imul(nt,yt)|0,F=Math.imul(nt,gt),I=I+Math.imul(tt,ut)|0,l=l+Math.imul(tt,_t)|0,l=l+Math.imul(Ft,ut)|0,F=F+Math.imul(Ft,_t)|0,I=I+Math.imul(re,Et)|0,l=l+Math.imul(re,Mt)|0,l=l+Math.imul(Ae,Et)|0,F=F+Math.imul(Ae,Mt)|0,I=I+Math.imul(et,mt)|0,l=l+Math.imul(et,ht)|0,l=l+Math.imul(Ve,mt)|0,F=F+Math.imul(Ve,ht)|0,I=I+Math.imul(dt,Ct)|0,l=l+Math.imul(dt,St)|0,l=l+Math.imul(Qe,Ct)|0,F=F+Math.imul(Qe,St)|0,I=I+Math.imul(vt,Ze)|0,l=l+Math.imul(vt,qe)|0,l=l+Math.imul(rt,Ze)|0,F=F+Math.imul(rt,qe)|0,I=I+Math.imul(at,C)|0,l=l+Math.imul(at,B)|0,l=l+Math.imul(Je,C)|0,F=F+Math.imul(Je,B)|0,I=I+Math.imul(je,R)|0,l=l+Math.imul(je,g)|0,l=l+Math.imul(Ke,R)|0,F=F+Math.imul(Ke,g)|0,I=I+Math.imul(_e,K)|0,l=l+Math.imul(_e,ne)|0,l=l+Math.imul(Le,K)|0,F=F+Math.imul(Le,ne)|0;var De=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(De>>>26)|0,De&=67108863,I=Math.imul(At,ut),l=Math.imul(At,_t),l=l+Math.imul(nt,ut)|0,F=Math.imul(nt,_t),I=I+Math.imul(tt,Et)|0,l=l+Math.imul(tt,Mt)|0,l=l+Math.imul(Ft,Et)|0,F=F+Math.imul(Ft,Mt)|0,I=I+Math.imul(re,mt)|0,l=l+Math.imul(re,ht)|0,l=l+Math.imul(Ae,mt)|0,F=F+Math.imul(Ae,ht)|0,I=I+Math.imul(et,Ct)|0,l=l+Math.imul(et,St)|0,l=l+Math.imul(Ve,Ct)|0,F=F+Math.imul(Ve,St)|0,I=I+Math.imul(dt,Ze)|0,l=l+Math.imul(dt,qe)|0,l=l+Math.imul(Qe,Ze)|0,F=F+Math.imul(Qe,qe)|0,I=I+Math.imul(vt,C)|0,l=l+Math.imul(vt,B)|0,l=l+Math.imul(rt,C)|0,F=F+Math.imul(rt,B)|0,I=I+Math.imul(at,R)|0,l=l+Math.imul(at,g)|0,l=l+Math.imul(Je,R)|0,F=F+Math.imul(Je,g)|0,I=I+Math.imul(je,K)|0,l=l+Math.imul(je,ne)|0,l=l+Math.imul(Ke,K)|0,F=F+Math.imul(Ke,ne)|0;var we=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(we>>>26)|0,we&=67108863,I=Math.imul(At,Et),l=Math.imul(At,Mt),l=l+Math.imul(nt,Et)|0,F=Math.imul(nt,Mt),I=I+Math.imul(tt,mt)|0,l=l+Math.imul(tt,ht)|0,l=l+Math.imul(Ft,mt)|0,F=F+Math.imul(Ft,ht)|0,I=I+Math.imul(re,Ct)|0,l=l+Math.imul(re,St)|0,l=l+Math.imul(Ae,Ct)|0,F=F+Math.imul(Ae,St)|0,I=I+Math.imul(et,Ze)|0,l=l+Math.imul(et,qe)|0,l=l+Math.imul(Ve,Ze)|0,F=F+Math.imul(Ve,qe)|0,I=I+Math.imul(dt,C)|0,l=l+Math.imul(dt,B)|0,l=l+Math.imul(Qe,C)|0,F=F+Math.imul(Qe,B)|0,I=I+Math.imul(vt,R)|0,l=l+Math.imul(vt,g)|0,l=l+Math.imul(rt,R)|0,F=F+Math.imul(rt,g)|0,I=I+Math.imul(at,K)|0,l=l+Math.imul(at,ne)|0,l=l+Math.imul(Je,K)|0,F=F+Math.imul(Je,ne)|0;var Be=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Be>>>26)|0,Be&=67108863,I=Math.imul(At,mt),l=Math.imul(At,ht),l=l+Math.imul(nt,mt)|0,F=Math.imul(nt,ht),I=I+Math.imul(tt,Ct)|0,l=l+Math.imul(tt,St)|0,l=l+Math.imul(Ft,Ct)|0,F=F+Math.imul(Ft,St)|0,I=I+Math.imul(re,Ze)|0,l=l+Math.imul(re,qe)|0,l=l+Math.imul(Ae,Ze)|0,F=F+Math.imul(Ae,qe)|0,I=I+Math.imul(et,C)|0,l=l+Math.imul(et,B)|0,l=l+Math.imul(Ve,C)|0,F=F+Math.imul(Ve,B)|0,I=I+Math.imul(dt,R)|0,l=l+Math.imul(dt,g)|0,l=l+Math.imul(Qe,R)|0,F=F+Math.imul(Qe,g)|0,I=I+Math.imul(vt,K)|0,l=l+Math.imul(vt,ne)|0,l=l+Math.imul(rt,K)|0,F=F+Math.imul(rt,ne)|0;var ye=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ye>>>26)|0,ye&=67108863,I=Math.imul(At,Ct),l=Math.imul(At,St),l=l+Math.imul(nt,Ct)|0,F=Math.imul(nt,St),I=I+Math.imul(tt,Ze)|0,l=l+Math.imul(tt,qe)|0,l=l+Math.imul(Ft,Ze)|0,F=F+Math.imul(Ft,qe)|0,I=I+Math.imul(re,C)|0,l=l+Math.imul(re,B)|0,l=l+Math.imul(Ae,C)|0,F=F+Math.imul(Ae,B)|0,I=I+Math.imul(et,R)|0,l=l+Math.imul(et,g)|0,l=l+Math.imul(Ve,R)|0,F=F+Math.imul(Ve,g)|0,I=I+Math.imul(dt,K)|0,l=l+Math.imul(dt,ne)|0,l=l+Math.imul(Qe,K)|0,F=F+Math.imul(Qe,ne)|0;var Ce=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,I=Math.imul(At,Ze),l=Math.imul(At,qe),l=l+Math.imul(nt,Ze)|0,F=Math.imul(nt,qe),I=I+Math.imul(tt,C)|0,l=l+Math.imul(tt,B)|0,l=l+Math.imul(Ft,C)|0,F=F+Math.imul(Ft,B)|0,I=I+Math.imul(re,R)|0,l=l+Math.imul(re,g)|0,l=l+Math.imul(Ae,R)|0,F=F+Math.imul(Ae,g)|0,I=I+Math.imul(et,K)|0,l=l+Math.imul(et,ne)|0,l=l+Math.imul(Ve,K)|0,F=F+Math.imul(Ve,ne)|0;var Re=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Re>>>26)|0,Re&=67108863,I=Math.imul(At,C),l=Math.imul(At,B),l=l+Math.imul(nt,C)|0,F=Math.imul(nt,B),I=I+Math.imul(tt,R)|0,l=l+Math.imul(tt,g)|0,l=l+Math.imul(Ft,R)|0,F=F+Math.imul(Ft,g)|0,I=I+Math.imul(re,K)|0,l=l+Math.imul(re,ne)|0,l=l+Math.imul(Ae,K)|0,F=F+Math.imul(Ae,ne)|0;var me=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(me>>>26)|0,me&=67108863,I=Math.imul(At,R),l=Math.imul(At,g),l=l+Math.imul(nt,R)|0,F=Math.imul(nt,g),I=I+Math.imul(tt,K)|0,l=l+Math.imul(tt,ne)|0,l=l+Math.imul(Ft,K)|0,F=F+Math.imul(Ft,ne)|0;var ie=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ie>>>26)|0,ie&=67108863,I=Math.imul(At,K),l=Math.imul(At,ne),l=l+Math.imul(nt,K)|0,F=Math.imul(nt,ne);var se=(W+I|0)+((l&8191)<<13)|0;return W=(F+(l>>>13)|0)+(se>>>26)|0,se&=67108863,U[0]=pe,U[1]=de,U[2]=ge,U[3]=ue,U[4]=Se,U[5]=Ee,U[6]=Fe,U[7]=ke,U[8]=Oe,U[9]=Me,U[10]=De,U[11]=we,U[12]=Be,U[13]=ye,U[14]=Ce,U[15]=Re,U[16]=me,U[17]=ie,U[18]=se,W!==0&&(U[19]=W,w.length++),w};Math.imul||(D=E);function k(S,c,h){h.negative=c.negative^S.negative,h.length=S.length+c.length;for(var w=0,M=0,O=0;O<h.length-1;O++){var U=M;M=0;for(var W=w&67108863,I=Math.min(O,c.length-1),l=Math.max(0,O-S.length+1);l<=I;l++){var F=O-l,ee=S.words[F]|0,J=c.words[l]|0,G=ee*J,he=G&67108863;U=U+(G/67108864|0)|0,he=he+W|0,W=he&67108863,U=U+(he>>>26)|0,M+=U>>>26,U&=67108863}h.words[O]=W,w=U,U=M}return w!==0?h.words[O]=w:h.length--,h.strip()}function H(S,c,h){var w=new P;return w.mulp(S,c,h)}s.prototype.mulTo=function(c,h){var w,M=this.length+c.length;return this.length===10&&c.length===10?w=D(this,c,h):M<63?w=E(this,c,h):M<1024?w=k(this,c,h):w=H(this,c,h),w};function P(S,c){this.x=S,this.y=c}P.prototype.makeRBT=function(c){for(var h=new Array(c),w=s.prototype._countBits(c)-1,M=0;M<c;M++)h[M]=this.revBin(M,w,c);return h},P.prototype.revBin=function(c,h,w){if(c===0||c===w-1)return c;for(var M=0,O=0;O<h;O++)M|=(c&1)<<h-O-1,c>>=1;return M},P.prototype.permute=function(c,h,w,M,O,U){for(var W=0;W<U;W++)M[W]=h[c[W]],O[W]=w[c[W]]},P.prototype.transform=function(c,h,w,M,O,U){this.permute(U,c,h,w,M,O);for(var W=1;W<O;W<<=1)for(var I=W<<1,l=Math.cos(2*Math.PI/I),F=Math.sin(2*Math.PI/I),ee=0;ee<O;ee+=I)for(var J=l,G=F,he=0;he<W;he++){var _e=w[ee+he],Le=M[ee+he],Ie=w[ee+he+W],je=M[ee+he+W],Ke=J*Ie-G*je;je=J*je+G*Ie,Ie=Ke,w[ee+he]=_e+Ie,M[ee+he]=Le+je,w[ee+he+W]=_e-Ie,M[ee+he+W]=Le-je,he!==I&&(Ke=l*J-F*G,G=l*G+F*J,J=Ke)}},P.prototype.guessLen13b=function(c,h){var w=Math.max(h,c)|1,M=w&1,O=0;for(w=w/2|0;w;w=w>>>1)O++;return 1<<O+1+M},P.prototype.conjugate=function(c,h,w){if(!(w<=1))for(var M=0;M<w/2;M++){var O=c[M];c[M]=c[w-M-1],c[w-M-1]=O,O=h[M],h[M]=-h[w-M-1],h[w-M-1]=-O}},P.prototype.normalize13b=function(c,h){for(var w=0,M=0;M<h/2;M++){var O=Math.round(c[2*M+1]/h)*8192+Math.round(c[2*M]/h)+w;c[M]=O&67108863,O<67108864?w=0:w=O/67108864|0}return c},P.prototype.convert13b=function(c,h,w,M){for(var O=0,U=0;U<h;U++)O=O+(c[U]|0),w[2*U]=O&8191,O=O>>>13,w[2*U+1]=O&8191,O=O>>>13;for(U=2*h;U<M;++U)w[U]=0;r(O===0),r((O&-8192)===0)},P.prototype.stub=function(c){for(var h=new Array(c),w=0;w<c;w++)h[w]=0;return h},P.prototype.mulp=function(c,h,w){var M=2*this.guessLen13b(c.length,h.length),O=this.makeRBT(M),U=this.stub(M),W=new Array(M),I=new Array(M),l=new Array(M),F=new Array(M),ee=new Array(M),J=new Array(M),G=w.words;G.length=M,this.convert13b(c.words,c.length,W,M),this.convert13b(h.words,h.length,F,M),this.transform(W,U,I,l,M,O),this.transform(F,U,ee,J,M,O);for(var he=0;he<M;he++){var _e=I[he]*ee[he]-l[he]*J[he];l[he]=I[he]*J[he]+l[he]*ee[he],I[he]=_e}return this.conjugate(I,l,M),this.transform(I,l,G,U,M,O),this.conjugate(G,U,M),this.normalize13b(G,M),w.negative=c.negative^h.negative,w.length=c.length+h.length,w.strip()},s.prototype.mul=function(c){var h=new s(null);return h.words=new Array(this.length+c.length),this.mulTo(c,h)},s.prototype.mulf=function(c){var h=new s(null);return h.words=new Array(this.length+c.length),H(this,c,h)},s.prototype.imul=function(c){return this.clone().mulTo(c,this)},s.prototype.imuln=function(c){r(typeof c=="number"),r(c<67108864);for(var h=0,w=0;w<this.length;w++){var M=(this.words[w]|0)*c,O=(M&67108863)+(h&67108863);h>>=26,h+=M/67108864|0,h+=O>>>26,this.words[w]=O&67108863}return h!==0&&(this.words[w]=h,this.length++),this},s.prototype.muln=function(c){return this.clone().imuln(c)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(c){var h=_(c);if(h.length===0)return new s(1);for(var w=this,M=0;M<h.length&&h[M]===0;M++,w=w.sqr());if(++M<h.length)for(var O=w.sqr();M<h.length;M++,O=O.sqr())h[M]!==0&&(w=w.mul(O));return w},s.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var h=c%26,w=(c-h)/26,M=67108863>>>26-h<<26-h,O;if(h!==0){var U=0;for(O=0;O<this.length;O++){var W=this.words[O]&M,I=(this.words[O]|0)-W<<h;this.words[O]=I|U,U=W>>>26-h}U&&(this.words[O]=U,this.length++)}if(w!==0){for(O=this.length-1;O>=0;O--)this.words[O+w]=this.words[O];for(O=0;O<w;O++)this.words[O]=0;this.length+=w}return this.strip()},s.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},s.prototype.iushrn=function(c,h,w){r(typeof c=="number"&&c>=0);var M;h?M=(h-h%26)/26:M=0;var O=c%26,U=Math.min((c-O)/26,this.length),W=67108863^67108863>>>O<<O,I=w;if(M-=U,M=Math.max(0,M),I){for(var l=0;l<U;l++)I.words[l]=this.words[l];I.length=U}if(U!==0)if(this.length>U)for(this.length-=U,l=0;l<this.length;l++)this.words[l]=this.words[l+U];else this.words[0]=0,this.length=1;var F=0;for(l=this.length-1;l>=0&&(F!==0||l>=M);l--){var ee=this.words[l]|0;this.words[l]=F<<26-O|ee>>>O,F=ee&W}return I&&F!==0&&(I.words[I.length++]=F),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(c,h,w){return r(this.negative===0),this.iushrn(c,h,w)},s.prototype.shln=function(c){return this.clone().ishln(c)},s.prototype.ushln=function(c){return this.clone().iushln(c)},s.prototype.shrn=function(c){return this.clone().ishrn(c)},s.prototype.ushrn=function(c){return this.clone().iushrn(c)},s.prototype.testn=function(c){r(typeof c=="number"&&c>=0);var h=c%26,w=(c-h)/26,M=1<<h;if(this.length<=w)return!1;var O=this.words[w];return!!(O&M)},s.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var h=c%26,w=(c-h)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(h!==0&&w++,this.length=Math.min(w,this.length),h!==0){var M=67108863^67108863>>>h<<h;this.words[this.length-1]&=M}return this.strip()},s.prototype.maskn=function(c){return this.clone().imaskn(c)},s.prototype.iaddn=function(c){return r(typeof c=="number"),r(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},s.prototype._iaddn=function(c){this.words[0]+=c;for(var h=0;h<this.length&&this.words[h]>=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(c){if(r(typeof c=="number"),r(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h<this.length&&this.words[h]<0;h++)this.words[h]+=67108864,this.words[h+1]-=1;return this.strip()},s.prototype.addn=function(c){return this.clone().iaddn(c)},s.prototype.subn=function(c){return this.clone().isubn(c)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(c,h,w){var M=c.length+w,O;this._expand(M);var U,W=0;for(O=0;O<c.length;O++){U=(this.words[O+w]|0)+W;var I=(c.words[O]|0)*h;U-=I&67108863,W=(U>>26)-(I/67108864|0),this.words[O+w]=U&67108863}for(;O<this.length-w;O++)U=(this.words[O+w]|0)+W,W=U>>26,this.words[O+w]=U&67108863;if(W===0)return this.strip();for(r(W===-1),W=0,O=0;O<this.length;O++)U=-(this.words[O]|0)+W,W=U>>26,this.words[O]=U&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(c,h){var w=this.length-c.length,M=this.clone(),O=c,U=O.words[O.length-1]|0,W=this._countBits(U);w=26-W,w!==0&&(O=O.ushln(w),M.iushln(w),U=O.words[O.length-1]|0);var I=M.length-O.length,l;if(h!=="mod"){l=new s(null),l.length=I+1,l.words=new Array(l.length);for(var F=0;F<l.length;F++)l.words[F]=0}var ee=M.clone()._ishlnsubmul(O,1,I);ee.negative===0&&(M=ee,l&&(l.words[I]=1));for(var J=I-1;J>=0;J--){var G=(M.words[O.length+J]|0)*67108864+(M.words[O.length+J-1]|0);for(G=Math.min(G/U|0,67108863),M._ishlnsubmul(O,G,J);M.negative!==0;)G--,M.negative=0,M._ishlnsubmul(O,1,J),M.isZero()||(M.negative^=1);l&&(l.words[J]=G)}return l&&l.strip(),M.strip(),h!=="div"&&w!==0&&M.iushrn(w),{div:l||null,mod:M}},s.prototype.divmod=function(c,h,w){if(r(!c.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var M,O,U;return this.negative!==0&&c.negative===0?(U=this.neg().divmod(c,h),h!=="mod"&&(M=U.div.neg()),h!=="div"&&(O=U.mod.neg(),w&&O.negative!==0&&O.iadd(c)),{div:M,mod:O}):this.negative===0&&c.negative!==0?(U=this.divmod(c.neg(),h),h!=="mod"&&(M=U.div.neg()),{div:M,mod:U.mod}):this.negative&c.negative?(U=this.neg().divmod(c.neg(),h),h!=="div"&&(O=U.mod.neg(),w&&O.negative!==0&&O.isub(c)),{div:U.div,mod:O}):c.length>this.length||this.cmp(c)<0?{div:new s(0),mod:this}:c.length===1?h==="div"?{div:this.divn(c.words[0]),mod:null}:h==="mod"?{div:null,mod:new s(this.modn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new s(this.modn(c.words[0]))}:this._wordDiv(c,h)},s.prototype.div=function(c){return this.divmod(c,"div",!1).div},s.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},s.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},s.prototype.divRound=function(c){var h=this.divmod(c);if(h.mod.isZero())return h.div;var w=h.div.negative!==0?h.mod.isub(c):h.mod,M=c.ushrn(1),O=c.andln(1),U=w.cmp(M);return U<0||O===1&&U===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(c){r(c<=67108863);for(var h=(1<<26)%c,w=0,M=this.length-1;M>=0;M--)w=(h*w+(this.words[M]|0))%c;return w},s.prototype.idivn=function(c){r(c<=67108863);for(var h=0,w=this.length-1;w>=0;w--){var M=(this.words[w]|0)+h*67108864;this.words[w]=M/c|0,h=M%c}return this.strip()},s.prototype.divn=function(c){return this.clone().idivn(c)},s.prototype.egcd=function(c){r(c.negative===0),r(!c.isZero());var h=this,w=c.clone();h.negative!==0?h=h.umod(c):h=h.clone();for(var M=new s(1),O=new s(0),U=new s(0),W=new s(1),I=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++I;for(var l=w.clone(),F=h.clone();!h.isZero();){for(var ee=0,J=1;!(h.words[0]&J)&&ee<26;++ee,J<<=1);if(ee>0)for(h.iushrn(ee);ee-- >0;)(M.isOdd()||O.isOdd())&&(M.iadd(l),O.isub(F)),M.iushrn(1),O.iushrn(1);for(var G=0,he=1;!(w.words[0]&he)&&G<26;++G,he<<=1);if(G>0)for(w.iushrn(G);G-- >0;)(U.isOdd()||W.isOdd())&&(U.iadd(l),W.isub(F)),U.iushrn(1),W.iushrn(1);h.cmp(w)>=0?(h.isub(w),M.isub(U),O.isub(W)):(w.isub(h),U.isub(M),W.isub(O))}return{a:U,b:W,gcd:w.iushln(I)}},s.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var h=this,w=c.clone();h.negative!==0?h=h.umod(c):h=h.clone();for(var M=new s(1),O=new s(0),U=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var W=0,I=1;!(h.words[0]&I)&&W<26;++W,I<<=1);if(W>0)for(h.iushrn(W);W-- >0;)M.isOdd()&&M.iadd(U),M.iushrn(1);for(var l=0,F=1;!(w.words[0]&F)&&l<26;++l,F<<=1);if(l>0)for(w.iushrn(l);l-- >0;)O.isOdd()&&O.iadd(U),O.iushrn(1);h.cmp(w)>=0?(h.isub(w),M.isub(O)):(w.isub(h),O.isub(M))}var ee;return h.cmpn(1)===0?ee=M:ee=O,ee.cmpn(0)<0&&ee.iadd(c),ee},s.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var h=this.clone(),w=c.clone();h.negative=0,w.negative=0;for(var M=0;h.isEven()&&w.isEven();M++)h.iushrn(1),w.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var O=h.cmp(w);if(O<0){var U=h;h=w,w=U}else if(O===0||w.cmpn(1)===0)break;h.isub(w)}while(!0);return w.iushln(M)},s.prototype.invm=function(c){return this.egcd(c).a.umod(c)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(c){return this.words[0]&c},s.prototype.bincn=function(c){r(typeof c=="number");var h=c%26,w=(c-h)/26,M=1<<h;if(this.length<=w)return this._expand(w+1),this.words[w]|=M,this;for(var O=M,U=w;O!==0&&U<this.length;U++){var W=this.words[U]|0;W+=O,O=W>>>26,W&=67108863,this.words[U]=W}return O!==0&&(this.words[U]=O,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(c){var h=c<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this.strip();var w;if(this.length>1)w=1;else{h&&(c=-c),r(c<=67108863,"Number is too big");var M=this.words[0]|0;w=M===c?0:M<c?-1:1}return this.negative!==0?-w|0:w},s.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var h=this.ucmp(c);return this.negative!==0?-h|0:h},s.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var h=0,w=this.length-1;w>=0;w--){var M=this.words[w]|0,O=c.words[w]|0;if(M!==O){M<O?h=-1:M>O&&(h=1);break}}return h},s.prototype.gtn=function(c){return this.cmpn(c)===1},s.prototype.gt=function(c){return this.cmp(c)===1},s.prototype.gten=function(c){return this.cmpn(c)>=0},s.prototype.gte=function(c){return this.cmp(c)>=0},s.prototype.ltn=function(c){return this.cmpn(c)===-1},s.prototype.lt=function(c){return this.cmp(c)===-1},s.prototype.lten=function(c){return this.cmpn(c)<=0},s.prototype.lte=function(c){return this.cmp(c)<=0},s.prototype.eqn=function(c){return this.cmpn(c)===0},s.prototype.eq=function(c){return this.cmp(c)===0},s.red=function(c){return new ae(c)},s.prototype.toRed=function(c){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(c){return this.red=c,this},s.prototype.forceRed=function(c){return r(!this.red,"Already a number in reduction context"),this._forceRed(c)},s.prototype.redAdd=function(c){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},s.prototype.redIAdd=function(c){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},s.prototype.redSub=function(c){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},s.prototype.redISub=function(c){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},s.prototype.redShl=function(c){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},s.prototype.redMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},s.prototype.redIMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(c){return r(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var T={k256:null,p224:null,p192:null,p25519:null};function z(S,c){this.name=S,this.p=new s(c,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var c=new s(null);return c.words=new Array(Math.ceil(this.n/13)),c},z.prototype.ireduce=function(c){var h=c,w;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),w=h.bitLength();while(w>this.n);var M=w<this.n?-1:h.ucmp(this.p);return M===0?(h.words[0]=0,h.length=1):M>0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},z.prototype.split=function(c,h){c.iushrn(this.n,0,h)},z.prototype.imulK=function(c){return c.imul(this.k)};function V(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(V,z),V.prototype.split=function(c,h){for(var w=4194303,M=Math.min(c.length,9),O=0;O<M;O++)h.words[O]=c.words[O];if(h.length=M,c.length<=9){c.words[0]=0,c.length=1;return}var U=c.words[9];for(h.words[h.length++]=U&w,O=10;O<c.length;O++){var W=c.words[O]|0;c.words[O-10]=(W&w)<<4|U>>>22,U=W}U>>>=22,c.words[O-10]=U,U===0&&c.length>10?c.length-=10:c.length-=9},V.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var h=0,w=0;w<c.length;w++){var M=c.words[w]|0;h+=M*977,c.words[w]=h&67108863,h=M*64+(h/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function Y(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}a(Y,z);function Z(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}a(Z,z);function fe(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}a(fe,z),fe.prototype.imulK=function(c){for(var h=0,w=0;w<c.length;w++){var M=(c.words[w]|0)*19+h,O=M&67108863;M>>>=26,c.words[w]=O,h=M}return h!==0&&(c.words[c.length++]=h),c},s._prime=function(c){if(T[c])return T[c];var h;if(c==="k256")h=new V;else if(c==="p224")h=new Y;else if(c==="p192")h=new Z;else if(c==="p25519")h=new fe;else throw new Error("Unknown prime "+c);return T[c]=h,h};function ae(S){if(typeof S=="string"){var c=s._prime(S);this.m=c.p,this.prime=c}else r(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}ae.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},ae.prototype._verify2=function(c,h){r((c.negative|h.negative)===0,"red works only with positives"),r(c.red&&c.red===h.red,"red works only with red numbers")},ae.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):c.umod(this.m)._forceRed(this)},ae.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},ae.prototype.add=function(c,h){this._verify2(c,h);var w=c.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},ae.prototype.iadd=function(c,h){this._verify2(c,h);var w=c.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},ae.prototype.sub=function(c,h){this._verify2(c,h);var w=c.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},ae.prototype.isub=function(c,h){this._verify2(c,h);var w=c.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},ae.prototype.shl=function(c,h){return this._verify1(c),this.imod(c.ushln(h))},ae.prototype.imul=function(c,h){return this._verify2(c,h),this.imod(c.imul(h))},ae.prototype.mul=function(c,h){return this._verify2(c,h),this.imod(c.mul(h))},ae.prototype.isqr=function(c){return this.imul(c,c.clone())},ae.prototype.sqr=function(c){return this.mul(c,c)},ae.prototype.sqrt=function(c){if(c.isZero())return c.clone();var h=this.m.andln(3);if(r(h%2===1),h===3){var w=this.m.add(new s(1)).iushrn(2);return this.pow(c,w)}for(var M=this.m.subn(1),O=0;!M.isZero()&&M.andln(1)===0;)O++,M.iushrn(1);r(!M.isZero());var U=new s(1).toRed(this),W=U.redNeg(),I=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new s(2*l*l).toRed(this);this.pow(l,I).cmp(W)!==0;)l.redIAdd(W);for(var F=this.pow(l,M),ee=this.pow(c,M.addn(1).iushrn(1)),J=this.pow(c,M),G=O;J.cmp(U)!==0;){for(var he=J,_e=0;he.cmp(U)!==0;_e++)he=he.redSqr();r(_e<G);var Le=this.pow(F,new s(1).iushln(G-_e-1));ee=ee.redMul(Le),F=Le.redSqr(),J=J.redMul(F),G=_e}return ee},ae.prototype.invm=function(c){var h=c._invmp(this.m);return h.negative!==0?(h.negative=0,this.imod(h).redNeg()):this.imod(h)},ae.prototype.pow=function(c,h){if(h.isZero())return new s(1).toRed(this);if(h.cmpn(1)===0)return c.clone();var w=4,M=new Array(1<<w);M[0]=new s(1).toRed(this),M[1]=c;for(var O=2;O<M.length;O++)M[O]=this.mul(M[O-1],c);var U=M[0],W=0,I=0,l=h.bitLength()%26;for(l===0&&(l=26),O=h.length-1;O>=0;O--){for(var F=h.words[O],ee=l-1;ee>=0;ee--){var J=F>>ee&1;if(U!==M[0]&&(U=this.sqr(U)),J===0&&W===0){I=0;continue}W<<=1,W|=J,I++,!(I!==w&&(O!==0||ee!==0))&&(U=this.mul(U,M[W]),I=0,W=0)}l=26}return U},ae.prototype.convertTo=function(c){var h=c.umod(this.m);return h===c?h.clone():h},ae.prototype.convertFrom=function(c){var h=c.clone();return h.red=null,h},s.mont=function(c){return new X(c)};function X(S){ae.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(X,ae),X.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},X.prototype.convertFrom=function(c){var h=this.imod(c.mul(this.rinv));return h.red=null,h},X.prototype.imul=function(c,h){if(c.isZero()||h.isZero())return c.words[0]=0,c.length=1,c;var w=c.imul(h),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=w.isub(M).iushrn(this.shift),U=O;return O.cmp(this.m)>=0?U=O.isub(this.m):O.cmpn(0)<0&&(U=O.iadd(this.m)),U._forceRed(this)},X.prototype.mul=function(c,h){if(c.isZero()||h.isZero())return new s(0)._forceRed(this);var w=c.mul(h),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=w.isub(M).iushrn(this.shift),U=O;return O.cmp(this.m)>=0?U=O.isub(this.m):O.cmpn(0)<0&&(U=O.iadd(this.m)),U._forceRed(this)},X.prototype.invm=function(c){var h=this.imod(c._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(i,Ue)})(Si);var qr=Si.exports,e0=ws;function ws(i,e){if(!i)throw new Error(e||"Assertion failed")}ws.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Fi={};(function(i){var e=i;function t(s,b){if(Array.isArray(s))return s.slice();if(!s)return[];var p=[];if(typeof s!="string"){for(var u=0;u<s.length;u++)p[u]=s[u]|0;return p}if(b==="hex"){s=s.replace(/[^a-z0-9]+/ig,""),s.length%2!==0&&(s="0"+s);for(var u=0;u<s.length;u+=2)p.push(parseInt(s[u]+s[u+1],16))}else for(var u=0;u<s.length;u++){var f=s.charCodeAt(u),o=f>>8,x=f&255;o?p.push(o,x):p.push(x)}return p}e.toArray=t;function r(s){return s.length===1?"0"+s:s}e.zero2=r;function a(s){for(var b="",p=0;p<s.length;p++)b+=r(s[p].toString(16));return b}e.toHex=a,e.encode=function(b,p){return p==="hex"?a(b):b}})(Fi);(function(i){var e=i,t=qr,r=e0,a=Fi;e.assert=r,e.toArray=a.toArray,e.zero2=a.zero2,e.toHex=a.toHex,e.encode=a.encode;function s(o,x,v){var _=new Array(Math.max(o.bitLength(),v)+1),E;for(E=0;E<_.length;E+=1)_[E]=0;var D=1<<x+1,k=o.clone();for(E=0;E<_.length;E++){var H,P=k.andln(D-1);k.isOdd()?(P>(D>>1)-1?H=(D>>1)-P:H=P,k.isubn(H)):H=0,_[E]=H,k.iushrn(1)}return _}e.getNAF=s;function b(o,x){var v=[[],[]];o=o.clone(),x=x.clone();for(var _=0,E=0,D;o.cmpn(-_)>0||x.cmpn(-E)>0;){var k=o.andln(3)+_&3,H=x.andln(3)+E&3;k===3&&(k=-1),H===3&&(H=-1);var P;k&1?(D=o.andln(7)+_&7,(D===3||D===5)&&H===2?P=-k:P=k):P=0,v[0].push(P);var T;H&1?(D=x.andln(7)+E&7,(D===3||D===5)&&k===2?T=-H:T=H):T=0,v[1].push(T),2*_===P+1&&(_=1-_),2*E===T+1&&(E=1-E),o.iushrn(1),x.iushrn(1)}return v}e.getJSF=b;function p(o,x,v){var _="_"+x;o.prototype[x]=function(){return this[_]!==void 0?this[_]:this[_]=v.call(this)}}e.cachedProperty=p;function u(o){return typeof o=="string"?e.toArray(o,"hex"):o}e.parseBytes=u;function f(o){return new t(o,"hex","le")}e.intFromLE=f})(xr);var Mi={exports:{}},ni;Mi.exports=function(e){return ni||(ni=new $r(null)),ni.generate(e)};function $r(i){this.rand=i}Mi.exports.Rand=$r;$r.prototype.generate=function(e){return this._rand(e)};$r.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};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?$r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?$r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:typeof window=="object"&&($r.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var Hf=V0;if(typeof Hf.randomBytes!="function")throw new Error("Not supported");$r.prototype._rand=function(e){return Hf.randomBytes(e)}}catch{}var As=Mi.exports,Di={},Kr=qr,M0=xr,j0=M0.getNAF,Oo=M0.getJSF,W0=M0.assert;function Wr(i,e){this.type=i,this.p=new Kr(e.p,16),this.red=e.prime?Kr.red(e.prime):Kr.mont(this.p),this.zero=new Kr(0).toRed(this.red),this.one=new Kr(1).toRed(this.red),this.two=new Kr(2).toRed(this.red),this.n=e.n&&new Kr(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var X0=Wr;Wr.prototype.point=function(){throw new Error("Not implemented")};Wr.prototype.validate=function(){throw new Error("Not implemented")};Wr.prototype._fixedNafMul=function(e,t){W0(e.precomputed);var r=e._getDoubles(),a=j0(t,1,this._bitLength),s=(1<<r.step+1)-(r.step%2===0?2:1);s/=3;var b=[],p,u;for(p=0;p<a.length;p+=r.step){u=0;for(var f=p+r.step-1;f>=p;f--)u=(u<<1)+a[f];b.push(u)}for(var o=this.jpoint(null,null,null),x=this.jpoint(null,null,null),v=s;v>0;v--){for(p=0;p<b.length;p++)u=b[p],u===v?x=x.mixedAdd(r.points[p]):u===-v&&(x=x.mixedAdd(r.points[p].neg()));o=o.add(x)}return o.toP()};Wr.prototype._wnafMul=function(e,t){var r=4,a=e._getNAFPoints(r);r=a.wnd;for(var s=a.points,b=j0(t,r,this._bitLength),p=this.jpoint(null,null,null),u=b.length-1;u>=0;u--){for(var f=0;u>=0&&b[u]===0;u--)f++;if(u>=0&&f++,p=p.dblp(f),u<0)break;var o=b[u];W0(o!==0),e.type==="affine"?o>0?p=p.mixedAdd(s[o-1>>1]):p=p.mixedAdd(s[-o-1>>1].neg()):o>0?p=p.add(s[o-1>>1]):p=p.add(s[-o-1>>1].neg())}return e.type==="affine"?p.toP():p};Wr.prototype._wnafMulAdd=function(e,t,r,a,s){var b=this._wnafT1,p=this._wnafT2,u=this._wnafT3,f=0,o,x,v;for(o=0;o<a;o++){v=t[o];var _=v._getNAFPoints(e);b[o]=_.wnd,p[o]=_.points}for(o=a-1;o>=1;o-=2){var E=o-1,D=o;if(b[E]!==1||b[D]!==1){u[E]=j0(r[E],b[E],this._bitLength),u[D]=j0(r[D],b[D],this._bitLength),f=Math.max(u[E].length,f),f=Math.max(u[D].length,f);continue}var k=[t[E],null,null,t[D]];t[E].y.cmp(t[D].y)===0?(k[1]=t[E].add(t[D]),k[2]=t[E].toJ().mixedAdd(t[D].neg())):t[E].y.cmp(t[D].y.redNeg())===0?(k[1]=t[E].toJ().mixedAdd(t[D]),k[2]=t[E].add(t[D].neg())):(k[1]=t[E].toJ().mixedAdd(t[D]),k[2]=t[E].toJ().mixedAdd(t[D].neg()));var H=[-3,-1,-5,-7,0,7,5,1,3],P=Oo(r[E],r[D]);for(f=Math.max(P[0].length,f),u[E]=new Array(f),u[D]=new Array(f),x=0;x<f;x++){var T=P[0][x]|0,z=P[1][x]|0;u[E][x]=H[(T+1)*3+(z+1)],u[D][x]=0,p[E]=k}}var V=this.jpoint(null,null,null),Y=this._wnafT4;for(o=f;o>=0;o--){for(var Z=0;o>=0;){var fe=!0;for(x=0;x<a;x++)Y[x]=u[x][o]|0,Y[x]!==0&&(fe=!1);if(!fe)break;Z++,o--}if(o>=0&&Z++,V=V.dblp(Z),o<0)break;for(x=0;x<a;x++){var ae=Y[x];ae!==0&&(ae>0?v=p[x][ae-1>>1]:ae<0&&(v=p[x][-ae-1>>1].neg()),v.type==="affine"?V=V.mixedAdd(v):V=V.add(v))}}for(o=0;o<a;o++)p[o]=null;return s?V:V.toP()};function yr(i,e){this.curve=i,this.type=e,this.precomputed=null}Wr.BasePoint=yr;yr.prototype.eq=function(){throw new Error("Not implemented")};yr.prototype.validate=function(){return this.curve.validate(this)};Wr.prototype.decodePoint=function(e,t){e=M0.toArray(e,t);var r=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*r){e[0]===6?W0(e[e.length-1]%2===0):e[0]===7&&W0(e[e.length-1]%2===1);var a=this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));return a}else if((e[0]===2||e[0]===3)&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),e[0]===3);throw new Error("Unknown point format")};yr.prototype.encodeCompressed=function(e){return this.encode(e,!0)};yr.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))};yr.prototype.encode=function(e,t){return M0.encode(this._encode(t),e)};yr.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};yr.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):!1};yr.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],a=this,s=0;s<t;s+=e){for(var b=0;b<e;b++)a=a.dbl();r.push(a)}return{step:e,points:r}};yr.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,a=r===1?null:this.dbl(),s=1;s<r;s++)t[s]=t[s-1].add(a);return{wnd:e,points:t}};yr.prototype._getBeta=function(){return null};yr.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var xi={exports:{}};typeof Object.create=="function"?xi.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:xi.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}};var Z0=xi.exports,Io=xr,zt=qr,Ri=Z0,u0=X0,No=Io.assert;function mr(i){u0.call(this,"short",i),this.a=new zt(i.a,16).toRed(this.red),this.b=new zt(i.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(i),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Ri(mr,u0);var qo=mr;mr.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var t,r;if(e.beta)t=new zt(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);t=a[0].cmp(a[1])<0?a[0]:a[1],t=t.toRed(this.red)}if(e.lambda)r=new zt(e.lambda,16);else{var s=this._getEndoRoots(this.n);this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))===0?r=s[0]:(r=s[1],No(this.g.mul(r).x.cmp(this.g.x.redMul(t))===0))}var b;return e.basis?b=e.basis.map(function(p){return{a:new zt(p.a,16),b:new zt(p.b,16)}}):b=this._getEndoBasis(r),{beta:t,lambda:r,basis:b}}};mr.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:zt.mont(e),r=new zt(2).toRed(t).redInvm(),a=r.redNeg(),s=new zt(3).toRed(t).redNeg().redSqrt().redMul(r),b=a.redAdd(s).fromRed(),p=a.redSub(s).fromRed();return[b,p]};mr.prototype._getEndoBasis=function(e){for(var t=this.n.ushrn(Math.floor(this.n.bitLength()/2)),r=e,a=this.n.clone(),s=new zt(1),b=new zt(0),p=new zt(0),u=new zt(1),f,o,x,v,_,E,D,k=0,H,P;r.cmpn(0)!==0;){var T=a.div(r);H=a.sub(T.mul(r)),P=p.sub(T.mul(s));var z=u.sub(T.mul(b));if(!x&&H.cmp(t)<0)f=D.neg(),o=s,x=H.neg(),v=P;else if(x&&++k===2)break;D=H,a=r,r=H,p=s,s=P,u=b,b=z}_=H.neg(),E=P;var V=x.sqr().add(v.sqr()),Y=_.sqr().add(E.sqr());return Y.cmp(V)>=0&&(_=f,E=o),x.negative&&(x=x.neg(),v=v.neg()),_.negative&&(_=_.neg(),E=E.neg()),[{a:x,b:v},{a:_,b:E}]};mr.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],a=t[1],s=a.b.mul(e).divRound(this.n),b=r.b.neg().mul(e).divRound(this.n),p=s.mul(r.a),u=b.mul(a.a),f=s.mul(r.b),o=b.mul(a.b),x=e.sub(p).sub(u),v=f.add(o).neg();return{k1:x,k2:v}};mr.prototype.pointFromX=function(e,t){e=new zt(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=r.redSqrt();if(a.redSqr().redSub(r).cmp(this.zero)!==0)throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)};mr.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,a=this.a.redMul(t),s=t.redSqr().redMul(t).redIAdd(a).redIAdd(this.b);return r.redSqr().redISub(s).cmpn(0)===0};mr.prototype._endoWnafMulAdd=function(e,t,r){for(var a=this._endoWnafT1,s=this._endoWnafT2,b=0;b<e.length;b++){var p=this._endoSplit(t[b]),u=e[b],f=u._getBeta();p.k1.negative&&(p.k1.ineg(),u=u.neg(!0)),p.k2.negative&&(p.k2.ineg(),f=f.neg(!0)),a[b*2]=u,a[b*2+1]=f,s[b*2]=p.k1,s[b*2+1]=p.k2}for(var o=this._wnafMulAdd(1,a,s,b*2,r),x=0;x<b*2;x++)a[x]=null,s[x]=null;return o};function Jt(i,e,t,r){u0.BasePoint.call(this,i,"affine"),e===null&&t===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new zt(e,16),this.y=new zt(t,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Ri(Jt,u0.BasePoint);mr.prototype.point=function(e,t,r){return new Jt(this,e,t,r)};mr.prototype.pointFromJSON=function(e,t){return Jt.fromJSON(this,e,t)};Jt.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,a=function(s){return r.point(s.x.redMul(r.endo.beta),s.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(a)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(a)}}}return t}};Jt.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]};Jt.fromJSON=function(e,t,r){typeof t=="string"&&(t=JSON.parse(t));var a=e.point(t[0],t[1],r);if(!t[2])return a;function s(p){return e.point(p[0],p[1],r)}var b=t[2];return a.precomputed={beta:null,doubles:b.doubles&&{step:b.doubles.step,points:[a].concat(b.doubles.points.map(s))},naf:b.naf&&{wnd:b.naf.wnd,points:[a].concat(b.naf.points.map(s))}},a};Jt.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)+">"};Jt.prototype.isInfinity=function(){return this.inf};Jt.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(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),a=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,a)};Jt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),a=e.redInvm(),s=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(a),b=s.redSqr().redISub(this.x.redAdd(this.x)),p=s.redMul(this.x.redSub(b)).redISub(this.y);return this.curve.point(b,p)};Jt.prototype.getX=function(){return this.x.fromRed()};Jt.prototype.getY=function(){return this.y.fromRed()};Jt.prototype.mul=function(e){return e=new zt(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)};Jt.prototype.mulAdd=function(e,t,r){var a=[this,t],s=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,s):this.curve._wnafMulAdd(1,a,s,2)};Jt.prototype.jmulAdd=function(e,t,r){var a=[this,t],s=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,s,!0):this.curve._wnafMulAdd(1,a,s,2,!0)};Jt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Jt.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,a=function(s){return s.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(a)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(a)}}}return t};Jt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function rr(i,e,t,r){u0.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&r===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new zt(0)):(this.x=new zt(e,16),this.y=new zt(t,16),this.z=new zt(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Ri(rr,u0.BasePoint);mr.prototype.jpoint=function(e,t,r){return new rr(this,e,t,r)};rr.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),a=this.y.redMul(t).redMul(e);return this.curve.point(r,a)};rr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};rr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),a=this.x.redMul(t),s=e.x.redMul(r),b=this.y.redMul(t.redMul(e.z)),p=e.y.redMul(r.redMul(this.z)),u=a.redSub(s),f=b.redSub(p);if(u.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var o=u.redSqr(),x=o.redMul(u),v=a.redMul(o),_=f.redSqr().redIAdd(x).redISub(v).redISub(v),E=f.redMul(v.redISub(_)).redISub(b.redMul(x)),D=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(_,E,D)};rr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,a=e.x.redMul(t),s=this.y,b=e.y.redMul(t).redMul(this.z),p=r.redSub(a),u=s.redSub(b);if(p.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=p.redSqr(),o=f.redMul(p),x=r.redMul(f),v=u.redSqr().redIAdd(o).redISub(x).redISub(x),_=u.redMul(x.redISub(v)).redISub(s.redMul(o)),E=this.z.redMul(p);return this.curve.jpoint(v,_,E)};rr.prototype.dblp=function(e){if(e===0)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 a=this.curve.a,s=this.curve.tinv,b=this.x,p=this.y,u=this.z,f=u.redSqr().redSqr(),o=p.redAdd(p);for(t=0;t<e;t++){var x=b.redSqr(),v=o.redSqr(),_=v.redSqr(),E=x.redAdd(x).redIAdd(x).redIAdd(a.redMul(f)),D=b.redMul(v),k=E.redSqr().redISub(D.redAdd(D)),H=D.redISub(k),P=E.redMul(H);P=P.redIAdd(P).redISub(_);var T=o.redMul(u);t+1<e&&(f=f.redMul(_)),b=k,u=T,o=P}return this.curve.jpoint(b,o.redMul(s),u)};rr.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};rr.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var a=this.x.redSqr(),s=this.y.redSqr(),b=s.redSqr(),p=this.x.redAdd(s).redSqr().redISub(a).redISub(b);p=p.redIAdd(p);var u=a.redAdd(a).redIAdd(a),f=u.redSqr().redISub(p).redISub(p),o=b.redIAdd(b);o=o.redIAdd(o),o=o.redIAdd(o),e=f,t=u.redMul(p.redISub(f)).redISub(o),r=this.y.redAdd(this.y)}else{var x=this.x.redSqr(),v=this.y.redSqr(),_=v.redSqr(),E=this.x.redAdd(v).redSqr().redISub(x).redISub(_);E=E.redIAdd(E);var D=x.redAdd(x).redIAdd(x),k=D.redSqr(),H=_.redIAdd(_);H=H.redIAdd(H),H=H.redIAdd(H),e=k.redISub(E).redISub(E),t=D.redMul(E.redISub(e)).redISub(H),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)};rr.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var a=this.x.redSqr(),s=this.y.redSqr(),b=s.redSqr(),p=this.x.redAdd(s).redSqr().redISub(a).redISub(b);p=p.redIAdd(p);var u=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a),f=u.redSqr().redISub(p).redISub(p);e=f;var o=b.redIAdd(b);o=o.redIAdd(o),o=o.redIAdd(o),t=u.redMul(p.redISub(f)).redISub(o),r=this.y.redAdd(this.y)}else{var x=this.z.redSqr(),v=this.y.redSqr(),_=this.x.redMul(v),E=this.x.redSub(x).redMul(this.x.redAdd(x));E=E.redAdd(E).redIAdd(E);var D=_.redIAdd(_);D=D.redIAdd(D);var k=D.redAdd(D);e=E.redSqr().redISub(k),r=this.y.redAdd(this.z).redSqr().redISub(v).redISub(x);var H=v.redSqr();H=H.redIAdd(H),H=H.redIAdd(H),H=H.redIAdd(H),t=E.redMul(D.redISub(e)).redISub(H)}return this.curve.jpoint(e,t,r)};rr.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,a=this.z,s=a.redSqr().redSqr(),b=t.redSqr(),p=r.redSqr(),u=b.redAdd(b).redIAdd(b).redIAdd(e.redMul(s)),f=t.redAdd(t);f=f.redIAdd(f);var o=f.redMul(p),x=u.redSqr().redISub(o.redAdd(o)),v=o.redISub(x),_=p.redSqr();_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var E=u.redMul(v).redISub(_),D=r.redAdd(r).redMul(a);return this.curve.jpoint(x,E,D)};rr.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(),a=t.redSqr(),s=e.redAdd(e).redIAdd(e),b=s.redSqr(),p=this.x.redAdd(t).redSqr().redISub(e).redISub(a);p=p.redIAdd(p),p=p.redAdd(p).redIAdd(p),p=p.redISub(b);var u=p.redSqr(),f=a.redIAdd(a);f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var o=s.redIAdd(p).redSqr().redISub(b).redISub(u).redISub(f),x=t.redMul(o);x=x.redIAdd(x),x=x.redIAdd(x);var v=this.x.redMul(u).redISub(x);v=v.redIAdd(v),v=v.redIAdd(v);var _=this.y.redMul(o.redMul(f.redISub(o)).redISub(p.redMul(u)));_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var E=this.z.redAdd(p).redSqr().redISub(r).redISub(u);return this.curve.jpoint(v,_,E)};rr.prototype.mul=function(e,t){return e=new zt(e,t),this.curve._wnafMul(this,e)};rr.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)!==0)return!1;var a=t.redMul(this.z),s=r.redMul(e.z);return this.y.redMul(s).redISub(e.y.redMul(a)).cmpn(0)===0};rr.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(this.x.cmp(r)===0)return!0;for(var a=e.clone(),s=this.curve.redN.redMul(t);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(s),this.x.cmp(r)===0)return!0}};rr.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)+">"};rr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var i0=qr,Bs=Z0,G0=X0,zo=xr;function h0(i){G0.call(this,"mont",i),this.a=new i0(i.a,16).toRed(this.red),this.b=new i0(i.b,16).toRed(this.red),this.i4=new i0(4).toRed(this.red).redInvm(),this.two=new i0(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Bs(h0,G0);var Lo=h0;h0.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),a=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),s=a.redSqrt();return s.redSqr().cmp(a)===0};function Zt(i,e,t){G0.BasePoint.call(this,i,"projective"),e===null&&t===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i0(e,16),this.z=new i0(t,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Bs(Zt,G0.BasePoint);h0.prototype.decodePoint=function(e,t){return this.point(zo.toArray(e,t),1)};h0.prototype.point=function(e,t){return new Zt(this,e,t)};h0.prototype.pointFromJSON=function(e){return Zt.fromJSON(this,e)};Zt.prototype.precompute=function(){};Zt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Zt.fromJSON=function(e,t){return new Zt(e,t[0],t[1]||e.one)};Zt.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)+">"};Zt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Zt.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),a=r.redSqr(),s=t.redSub(a),b=t.redMul(a),p=s.redMul(a.redAdd(this.curve.a24.redMul(s)));return this.curve.point(b,p)};Zt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Zt.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),a=this.x.redSub(this.z),s=e.x.redAdd(e.z),b=e.x.redSub(e.z),p=b.redMul(r),u=s.redMul(a),f=t.z.redMul(p.redAdd(u).redSqr()),o=t.x.redMul(p.redISub(u).redSqr());return this.curve.point(f,o)};Zt.prototype.mul=function(e){for(var t=e.clone(),r=this,a=this.curve.point(null,null),s=this,b=[];t.cmpn(0)!==0;t.iushrn(1))b.push(t.andln(1));for(var p=b.length-1;p>=0;p--)b[p]===0?(r=r.diffAdd(a,s),a=a.dbl()):(a=r.diffAdd(a,s),r=r.dbl());return a};Zt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Zt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Zt.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};Zt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Ho=xr,kr=qr,Cs=Z0,J0=X0,$o=Ho.assert;function Rr(i){this.twisted=(i.a|0)!==1,this.mOneA=this.twisted&&(i.a|0)===-1,this.extended=this.mOneA,J0.call(this,"edwards",i),this.a=new kr(i.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new kr(i.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new kr(i.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),$o(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(i.c|0)===1}Cs(Rr,J0);var Uo=Rr;Rr.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};Rr.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};Rr.prototype.jpoint=function(e,t,r,a){return this.point(e,t,r,a)};Rr.prototype.pointFromX=function(e,t){e=new kr(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),a=this.c2.redSub(this.a.redMul(r)),s=this.one.redSub(this.c2.redMul(this.d).redMul(r)),b=a.redMul(s.redInvm()),p=b.redSqrt();if(p.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");var u=p.fromRed().isOdd();return(t&&!u||!t&&u)&&(p=p.redNeg()),this.point(e,p)};Rr.prototype.pointFromY=function(e,t){e=new kr(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),a=r.redSub(this.c2),s=r.redMul(this.d).redMul(this.c2).redSub(this.a),b=a.redMul(s.redInvm());if(b.cmp(this.zero)===0){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var p=b.redSqrt();if(p.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");return p.fromRed().isOdd()!==t&&(p=p.redNeg()),this.point(p,e)};Rr.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),a=t.redMul(this.a).redAdd(r),s=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return a.cmp(s)===0};function Pt(i,e,t,r,a){J0.BasePoint.call(this,i,"projective"),e===null&&t===null&&r===null?(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 kr(e,16),this.y=new kr(t,16),this.z=r?new kr(r,16):this.curve.one,this.t=a&&new kr(a,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()))))}Cs(Pt,J0.BasePoint);Rr.prototype.pointFromJSON=function(e){return Pt.fromJSON(this,e)};Rr.prototype.point=function(e,t,r,a){return new Pt(this,e,t,r,a)};Pt.fromJSON=function(e,t){return new Pt(e,t[0],t[1],t[2])};Pt.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)+">"};Pt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Pt.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var a=this.curve._mulA(e),s=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),b=a.redAdd(t),p=b.redSub(r),u=a.redSub(t),f=s.redMul(p),o=b.redMul(u),x=s.redMul(u),v=p.redMul(b);return this.curve.point(f,o,v,x)};Pt.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),t=this.x.redSqr(),r=this.y.redSqr(),a,s,b,p,u,f;if(this.curve.twisted){p=this.curve._mulA(t);var o=p.redAdd(r);this.zOne?(a=e.redSub(t).redSub(r).redMul(o.redSub(this.curve.two)),s=o.redMul(p.redSub(r)),b=o.redSqr().redSub(o).redSub(o)):(u=this.z.redSqr(),f=o.redSub(u).redISub(u),a=e.redSub(t).redISub(r).redMul(f),s=o.redMul(p.redSub(r)),b=o.redMul(f))}else p=t.redAdd(r),u=this.curve._mulC(this.z).redSqr(),f=p.redSub(u).redSub(u),a=this.curve._mulC(e.redISub(p)).redMul(f),s=this.curve._mulC(p).redMul(t.redISub(r)),b=p.redMul(f);return this.curve.point(a,s,b)};Pt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Pt.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)),a=this.t.redMul(this.curve.dd).redMul(e.t),s=this.z.redMul(e.z.redAdd(e.z)),b=r.redSub(t),p=s.redSub(a),u=s.redAdd(a),f=r.redAdd(t),o=b.redMul(p),x=u.redMul(f),v=b.redMul(f),_=p.redMul(u);return this.curve.point(o,x,_,v)};Pt.prototype._projAdd=function(e){var t=this.z.redMul(e.z),r=t.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),b=this.curve.d.redMul(a).redMul(s),p=r.redSub(b),u=r.redAdd(b),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),o=t.redMul(p).redMul(f),x,v;return this.curve.twisted?(x=t.redMul(u).redMul(s.redSub(this.curve._mulA(a))),v=p.redMul(u)):(x=t.redMul(u).redMul(s.redSub(a)),v=this.curve._mulC(p).redMul(u)),this.curve.point(o,x,v)};Pt.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};Pt.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};Pt.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)};Pt.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)};Pt.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};Pt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Pt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Pt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Pt.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};Pt.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return!0;for(var r=e.clone(),a=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(a),this.x.cmp(t)===0)return!0}};Pt.prototype.toP=Pt.prototype.normalize;Pt.prototype.mixedAdd=Pt.prototype.add;(function(i){var e=i;e.base=X0,e.short=qo,e.mont=Lo,e.edwards=Uo})(Di);var Q0={},en={},ct={},jo=e0,Wo=Z0;ct.inherits=Wo;function Ko(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function Vo(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),a=0;a<i.length;a+=2)t.push(parseInt(i[a]+i[a+1],16))}else for(var r=0,a=0;a<i.length;a++){var s=i.charCodeAt(a);s<128?t[r++]=s:s<2048?(t[r++]=s>>6|192,t[r++]=s&63|128):Ko(i,a)?(s=65536+((s&1023)<<10)+(i.charCodeAt(++a)&1023),t[r++]=s>>18|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128,t[r++]=s&63|128):(t[r++]=s>>12|224,t[r++]=s>>6&63|128,t[r++]=s&63|128)}else for(a=0;a<i.length;a++)t[a]=i[a]|0;return t}ct.toArray=Vo;function Yo(i){for(var e="",t=0;t<i.length;t++)e+=Fs(i[t].toString(16));return e}ct.toHex=Yo;function Ss(i){var e=i>>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}ct.htonl=Ss;function Xo(i,e){for(var t="",r=0;r<i.length;r++){var a=i[r];e==="little"&&(a=Ss(a)),t+=Ms(a.toString(16))}return t}ct.toHex32=Xo;function Fs(i){return i.length===1?"0"+i:i}ct.zero2=Fs;function Ms(i){return i.length===7?"0"+i:i.length===6?"00"+i:i.length===5?"000"+i:i.length===4?"0000"+i:i.length===3?"00000"+i:i.length===2?"000000"+i:i.length===1?"0000000"+i:i}ct.zero8=Ms;function Zo(i,e,t,r){var a=t-e;jo(a%4===0);for(var s=new Array(a/4),b=0,p=e;b<s.length;b++,p+=4){var u;r==="big"?u=i[p]<<24|i[p+1]<<16|i[p+2]<<8|i[p+3]:u=i[p+3]<<24|i[p+2]<<16|i[p+1]<<8|i[p],s[b]=u>>>0}return s}ct.join32=Zo;function Go(i,e){for(var t=new Array(i.length*4),r=0,a=0;r<i.length;r++,a+=4){var s=i[r];e==="big"?(t[a]=s>>>24,t[a+1]=s>>>16&255,t[a+2]=s>>>8&255,t[a+3]=s&255):(t[a+3]=s>>>24,t[a+2]=s>>>16&255,t[a+1]=s>>>8&255,t[a]=s&255)}return t}ct.split32=Go;function Jo(i,e){return i>>>e|i<<32-e}ct.rotr32=Jo;function Qo(i,e){return i<<e|i>>>32-e}ct.rotl32=Qo;function ec(i,e){return i+e>>>0}ct.sum32=ec;function tc(i,e,t){return i+e+t>>>0}ct.sum32_3=tc;function rc(i,e,t,r){return i+e+t+r>>>0}ct.sum32_4=rc;function nc(i,e,t,r,a){return i+e+t+r+a>>>0}ct.sum32_5=nc;function ic(i,e,t,r){var a=i[e],s=i[e+1],b=r+s>>>0,p=(b<r?1:0)+t+a;i[e]=p>>>0,i[e+1]=b}ct.sum64=ic;function fc(i,e,t,r){var a=e+r>>>0,s=(a<e?1:0)+i+t;return s>>>0}ct.sum64_hi=fc;function sc(i,e,t,r){var a=e+r;return a>>>0}ct.sum64_lo=sc;function ac(i,e,t,r,a,s,b,p){var u=0,f=e;f=f+r>>>0,u+=f<e?1:0,f=f+s>>>0,u+=f<s?1:0,f=f+p>>>0,u+=f<p?1:0;var o=i+t+a+b+u;return o>>>0}ct.sum64_4_hi=ac;function oc(i,e,t,r,a,s,b,p){var u=e+r+s+p;return u>>>0}ct.sum64_4_lo=oc;function cc(i,e,t,r,a,s,b,p,u,f){var o=0,x=e;x=x+r>>>0,o+=x<e?1:0,x=x+s>>>0,o+=x<s?1:0,x=x+p>>>0,o+=x<p?1:0,x=x+f>>>0,o+=x<f?1:0;var v=i+t+a+b+u+o;return v>>>0}ct.sum64_5_hi=cc;function dc(i,e,t,r,a,s,b,p,u,f){var o=e+r+s+p+f;return o>>>0}ct.sum64_5_lo=dc;function uc(i,e,t){var r=e<<32-t|i>>>t;return r>>>0}ct.rotr64_hi=uc;function hc(i,e,t){var r=i<<32-t|e>>>t;return r>>>0}ct.rotr64_lo=hc;function lc(i,e,t){return i>>>t}ct.shr64_hi=lc;function xc(i,e,t){var r=i<<32-t|e>>>t;return r>>>0}ct.shr64_lo=xc;var l0={},$f=ct,pc=e0;function tn(){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}l0.BlockHash=tn;tn.prototype.update=function(e,t){if(e=$f.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),this.pending.length===0&&(this.pending=null),e=$f.join32(e,0,e.length-r,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this};tn.prototype.digest=function(e){return this.update(this._pad()),pc(this.pending===null),this._digest(e)};tn.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,a=new Array(r+this.padLength);a[0]=128;for(var s=1;s<r;s++)a[s]=0;if(e<<=3,this.endian==="big"){for(var b=8;b<this.padLength;b++)a[s++]=0;a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=e>>>24&255,a[s++]=e>>>16&255,a[s++]=e>>>8&255,a[s++]=e&255}else for(a[s++]=e&255,a[s++]=e>>>8&255,a[s++]=e>>>16&255,a[s++]=e>>>24&255,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,b=8;b<this.padLength;b++)a[s++]=0;return a};var x0={},Pr={},bc=ct,Ar=bc.rotr32;function vc(i,e,t,r){if(i===0)return Ds(e,t,r);if(i===1||i===3)return Ps(e,t,r);if(i===2)return Rs(e,t,r)}Pr.ft_1=vc;function Ds(i,e,t){return i&e^~i&t}Pr.ch32=Ds;function Rs(i,e,t){return i&e^i&t^e&t}Pr.maj32=Rs;function Ps(i,e,t){return i^e^t}Pr.p32=Ps;function yc(i){return Ar(i,2)^Ar(i,13)^Ar(i,22)}Pr.s0_256=yc;function mc(i){return Ar(i,6)^Ar(i,11)^Ar(i,25)}Pr.s1_256=mc;function gc(i){return Ar(i,7)^Ar(i,18)^i>>>3}Pr.g0_256=gc;function _c(i){return Ar(i,17)^Ar(i,19)^i>>>10}Pr.g1_256=_c;var s0=ct,Ec=l0,wc=Pr,ii=s0.rotl32,E0=s0.sum32,Ac=s0.sum32_5,Bc=wc.ft_1,Ts=Ec.BlockHash,Cc=[1518500249,1859775393,2400959708,3395469782];function Sr(){if(!(this instanceof Sr))return new Sr;Ts.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}s0.inherits(Sr,Ts);var Sc=Sr;Sr.blockSize=512;Sr.outSize=160;Sr.hmacStrength=80;Sr.padLength=64;Sr.prototype._update=function(e,t){for(var r=this.W,a=0;a<16;a++)r[a]=e[t+a];for(;a<r.length;a++)r[a]=ii(r[a-3]^r[a-8]^r[a-14]^r[a-16],1);var s=this.h[0],b=this.h[1],p=this.h[2],u=this.h[3],f=this.h[4];for(a=0;a<r.length;a++){var o=~~(a/20),x=Ac(ii(s,5),Bc(o,b,p,u),f,r[a],Cc[o]);f=u,u=p,p=ii(b,30),b=s,s=x}this.h[0]=E0(this.h[0],s),this.h[1]=E0(this.h[1],b),this.h[2]=E0(this.h[2],p),this.h[3]=E0(this.h[3],u),this.h[4]=E0(this.h[4],f)};Sr.prototype._digest=function(e){return e==="hex"?s0.toHex32(this.h,"big"):s0.split32(this.h,"big")};var a0=ct,Fc=l0,p0=Pr,Mc=e0,gr=a0.sum32,Dc=a0.sum32_4,Rc=a0.sum32_5,Pc=p0.ch32,Tc=p0.maj32,kc=p0.s0_256,Oc=p0.s1_256,Ic=p0.g0_256,Nc=p0.g1_256,ks=Fc.BlockHash,qc=[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 Fr(){if(!(this instanceof Fr))return new Fr;ks.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=qc,this.W=new Array(64)}a0.inherits(Fr,ks);var Os=Fr;Fr.blockSize=512;Fr.outSize=256;Fr.hmacStrength=192;Fr.padLength=64;Fr.prototype._update=function(e,t){for(var r=this.W,a=0;a<16;a++)r[a]=e[t+a];for(;a<r.length;a++)r[a]=Dc(Nc(r[a-2]),r[a-7],Ic(r[a-15]),r[a-16]);var s=this.h[0],b=this.h[1],p=this.h[2],u=this.h[3],f=this.h[4],o=this.h[5],x=this.h[6],v=this.h[7];for(Mc(this.k.length===r.length),a=0;a<r.length;a++){var _=Rc(v,Oc(f),Pc(f,o,x),this.k[a],r[a]),E=gr(kc(s),Tc(s,b,p));v=x,x=o,o=f,f=gr(u,_),u=p,p=b,b=s,s=gr(_,E)}this.h[0]=gr(this.h[0],s),this.h[1]=gr(this.h[1],b),this.h[2]=gr(this.h[2],p),this.h[3]=gr(this.h[3],u),this.h[4]=gr(this.h[4],f),this.h[5]=gr(this.h[5],o),this.h[6]=gr(this.h[6],x),this.h[7]=gr(this.h[7],v)};Fr.prototype._digest=function(e){return e==="hex"?a0.toHex32(this.h,"big"):a0.split32(this.h,"big")};var pi=ct,Is=Os;function Ir(){if(!(this instanceof Ir))return new Ir;Is.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}pi.inherits(Ir,Is);var zc=Ir;Ir.blockSize=512;Ir.outSize=224;Ir.hmacStrength=192;Ir.padLength=64;Ir.prototype._digest=function(e){return e==="hex"?pi.toHex32(this.h.slice(0,7),"big"):pi.split32(this.h.slice(0,7),"big")};var hr=ct,Lc=l0,Hc=e0,Br=hr.rotr64_hi,Cr=hr.rotr64_lo,Ns=hr.shr64_hi,qs=hr.shr64_lo,Hr=hr.sum64,fi=hr.sum64_hi,si=hr.sum64_lo,$c=hr.sum64_4_hi,Uc=hr.sum64_4_lo,jc=hr.sum64_5_hi,Wc=hr.sum64_5_lo,zs=Lc.BlockHash,Kc=[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 Er(){if(!(this instanceof Er))return new Er;zs.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Kc,this.W=new Array(160)}hr.inherits(Er,zs);var Ls=Er;Er.blockSize=1024;Er.outSize=512;Er.hmacStrength=192;Er.padLength=128;Er.prototype._prepareBlock=function(e,t){for(var r=this.W,a=0;a<32;a++)r[a]=e[t+a];for(;a<r.length;a+=2){var s=nd(r[a-4],r[a-3]),b=id(r[a-4],r[a-3]),p=r[a-14],u=r[a-13],f=td(r[a-30],r[a-29]),o=rd(r[a-30],r[a-29]),x=r[a-32],v=r[a-31];r[a]=$c(s,b,p,u,f,o,x,v),r[a+1]=Uc(s,b,p,u,f,o,x,v)}};Er.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,a=this.h[0],s=this.h[1],b=this.h[2],p=this.h[3],u=this.h[4],f=this.h[5],o=this.h[6],x=this.h[7],v=this.h[8],_=this.h[9],E=this.h[10],D=this.h[11],k=this.h[12],H=this.h[13],P=this.h[14],T=this.h[15];Hc(this.k.length===r.length);for(var z=0;z<r.length;z+=2){var V=P,Y=T,Z=Qc(v,_),fe=ed(v,_),ae=Vc(v,_,E,D,k),X=Yc(v,_,E,D,k,H),S=this.k[z],c=this.k[z+1],h=r[z],w=r[z+1],M=jc(V,Y,Z,fe,ae,X,S,c,h,w),O=Wc(V,Y,Z,fe,ae,X,S,c,h,w);V=Gc(a,s),Y=Jc(a,s),Z=Xc(a,s,b,p,u),fe=Zc(a,s,b,p,u,f);var U=fi(V,Y,Z,fe),W=si(V,Y,Z,fe);P=k,T=H,k=E,H=D,E=v,D=_,v=fi(o,x,M,O),_=si(x,x,M,O),o=u,x=f,u=b,f=p,b=a,p=s,a=fi(M,O,U,W),s=si(M,O,U,W)}Hr(this.h,0,a,s),Hr(this.h,2,b,p),Hr(this.h,4,u,f),Hr(this.h,6,o,x),Hr(this.h,8,v,_),Hr(this.h,10,E,D),Hr(this.h,12,k,H),Hr(this.h,14,P,T)};Er.prototype._digest=function(e){return e==="hex"?hr.toHex32(this.h,"big"):hr.split32(this.h,"big")};function Vc(i,e,t,r,a){var s=i&t^~i&a;return s<0&&(s+=4294967296),s}function Yc(i,e,t,r,a,s){var b=e&r^~e&s;return b<0&&(b+=4294967296),b}function Xc(i,e,t,r,a){var s=i&t^i&a^t&a;return s<0&&(s+=4294967296),s}function Zc(i,e,t,r,a,s){var b=e&r^e&s^r&s;return b<0&&(b+=4294967296),b}function Gc(i,e){var t=Br(i,e,28),r=Br(e,i,2),a=Br(e,i,7),s=t^r^a;return s<0&&(s+=4294967296),s}function Jc(i,e){var t=Cr(i,e,28),r=Cr(e,i,2),a=Cr(e,i,7),s=t^r^a;return s<0&&(s+=4294967296),s}function Qc(i,e){var t=Br(i,e,14),r=Br(i,e,18),a=Br(e,i,9),s=t^r^a;return s<0&&(s+=4294967296),s}function ed(i,e){var t=Cr(i,e,14),r=Cr(i,e,18),a=Cr(e,i,9),s=t^r^a;return s<0&&(s+=4294967296),s}function td(i,e){var t=Br(i,e,1),r=Br(i,e,8),a=Ns(i,e,7),s=t^r^a;return s<0&&(s+=4294967296),s}function rd(i,e){var t=Cr(i,e,1),r=Cr(i,e,8),a=qs(i,e,7),s=t^r^a;return s<0&&(s+=4294967296),s}function nd(i,e){var t=Br(i,e,19),r=Br(e,i,29),a=Ns(i,e,6),s=t^r^a;return s<0&&(s+=4294967296),s}function id(i,e){var t=Cr(i,e,19),r=Cr(e,i,29),a=qs(i,e,6),s=t^r^a;return s<0&&(s+=4294967296),s}var bi=ct,Hs=Ls;function Nr(){if(!(this instanceof Nr))return new Nr;Hs.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}bi.inherits(Nr,Hs);var fd=Nr;Nr.blockSize=1024;Nr.outSize=384;Nr.hmacStrength=192;Nr.padLength=128;Nr.prototype._digest=function(e){return e==="hex"?bi.toHex32(this.h.slice(0,12),"big"):bi.split32(this.h.slice(0,12),"big")};x0.sha1=Sc;x0.sha224=zc;x0.sha256=Os;x0.sha384=fd;x0.sha512=Ls;var $s={},Gr=ct,sd=l0,T0=Gr.rotl32,Uf=Gr.sum32,w0=Gr.sum32_3,jf=Gr.sum32_4,Us=sd.BlockHash;function Mr(){if(!(this instanceof Mr))return new Mr;Us.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Gr.inherits(Mr,Us);$s.ripemd160=Mr;Mr.blockSize=512;Mr.outSize=160;Mr.hmacStrength=192;Mr.padLength=64;Mr.prototype._update=function(e,t){for(var r=this.h[0],a=this.h[1],s=this.h[2],b=this.h[3],p=this.h[4],u=r,f=a,o=s,x=b,v=p,_=0;_<80;_++){var E=Uf(T0(jf(r,Wf(_,a,s,b),e[cd[_]+t],ad(_)),ud[_]),p);r=p,p=b,b=T0(s,10),s=a,a=E,E=Uf(T0(jf(u,Wf(79-_,f,o,x),e[dd[_]+t],od(_)),hd[_]),v),u=v,v=x,x=T0(o,10),o=f,f=E}E=w0(this.h[1],s,x),this.h[1]=w0(this.h[2],b,v),this.h[2]=w0(this.h[3],p,u),this.h[3]=w0(this.h[4],r,f),this.h[4]=w0(this.h[0],a,o),this.h[0]=E};Mr.prototype._digest=function(e){return e==="hex"?Gr.toHex32(this.h,"little"):Gr.split32(this.h,"little")};function Wf(i,e,t,r){return i<=15?e^t^r:i<=31?e&t|~e&r:i<=47?(e|~t)^r:i<=63?e&r|t&~r:e^(t|~r)}function ad(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function od(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var cd=[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],dd=[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],ud=[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],hd=[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],ld=ct,xd=e0;function o0(i,e,t){if(!(this instanceof o0))return new o0(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(ld.toArray(e,t))}var pd=o0;o0.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),xd(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)};o0.prototype.update=function(e,t){return this.inner.update(e,t),this};o0.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};(function(i){var e=i;e.utils=ct,e.common=l0,e.sha=x0,e.ripemd=$s,e.hmac=pd,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(en);var ai,Kf;function bd(){return Kf||(Kf=1,ai={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"]]}}),ai}(function(i){var e=i,t=en,r=Di,a=xr,s=a.assert;function b(f){f.type==="short"?this.curve=new r.short(f):f.type==="edwards"?this.curve=new r.edwards(f):this.curve=new r.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=b;function p(f,o){Object.defineProperty(e,f,{configurable:!0,enumerable:!0,get:function(){var x=new b(o);return Object.defineProperty(e,f,{configurable:!0,enumerable:!0,value:x}),x}})}p("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:t.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),p("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:t.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),p("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:t.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),p("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:t.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"]}),p("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:t.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"]}),p("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["9"]}),p("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:t.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=bd()}catch{u=void 0}p("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:t.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})})(Q0);var vd=en,Yr=Fi,js=e0;function Ur(i){if(!(this instanceof Ur))return new Ur(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Yr.toArray(i.entropy,i.entropyEnc||"hex"),t=Yr.toArray(i.nonce,i.nonceEnc||"hex"),r=Yr.toArray(i.pers,i.persEnc||"hex");js(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,r)}var yd=Ur;Ur.prototype._init=function(e,t,r){var a=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s<this.V.length;s++)this.K[s]=0,this.V[s]=1;this._update(a),this._reseed=1,this.reseedInterval=281474976710656};Ur.prototype._hmac=function(){return new vd.hmac(this.hash,this.K)};Ur.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())};Ur.prototype.reseed=function(e,t,r,a){typeof t!="string"&&(a=r,r=t,t=null),e=Yr.toArray(e,t),r=Yr.toArray(r,a),js(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1};Ur.prototype.generate=function(e,t,r,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(a=r,r=t,t=null),r&&(r=Yr.toArray(r,a||"hex"),this._update(r));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var b=s.slice(0,e);return this._update(r),this._reseed++,Yr.encode(b,t)};var md=qr,gd=xr,vi=gd.assert;function fr(i,e){this.ec=i,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var _d=fr;fr.fromPublic=function(e,t,r){return t instanceof fr?t:new fr(e,{pub:t,pubEnc:r})};fr.fromPrivate=function(e,t,r){return t instanceof fr?t:new fr(e,{priv:t,privEnc:r})};fr.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"}};fr.prototype.getPublic=function(e,t){return typeof e=="string"&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub};fr.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};fr.prototype._importPrivate=function(e,t){this.priv=new md(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)};fr.prototype._importPublic=function(e,t){if(e.x||e.y){this.ec.curve.type==="mont"?vi(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&vi(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)};fr.prototype.derive=function(e){return e.validate()||vi(e.validate(),"public point not validated"),e.mul(this.priv).getX()};fr.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)};fr.prototype.verify=function(e,t){return this.ec.verify(e,t,this)};fr.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var K0=qr,Pi=xr,Ed=Pi.assert;function rn(i,e){if(i instanceof rn)return i;this._importDER(i,e)||(Ed(i.r&&i.s,"Signature without r or s"),this.r=new K0(i.r,16),this.s=new K0(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var wd=rn;function Ad(){this.place=0}function oi(i,e){var t=i[e.place++];if(!(t&128))return t;var r=t&15;if(r===0||r>4)return!1;for(var a=0,s=0,b=e.place;s<r;s++,b++)a<<=8,a|=i[b],a>>>=0;return a<=127?!1:(e.place=b,a)}function Vf(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e<t;)e++;return e===0?i:i.slice(e)}rn.prototype._importDER=function(e,t){e=Pi.toArray(e,t);var r=new Ad;if(e[r.place++]!==48)return!1;var a=oi(e,r);if(a===!1||a+r.place!==e.length||e[r.place++]!==2)return!1;var s=oi(e,r);if(s===!1)return!1;var b=e.slice(r.place,s+r.place);if(r.place+=s,e[r.place++]!==2)return!1;var p=oi(e,r);if(p===!1||e.length!==p+r.place)return!1;var u=e.slice(r.place,p+r.place);if(b[0]===0)if(b[1]&128)b=b.slice(1);else return!1;if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;return this.r=new K0(b),this.s=new K0(u),this.recoveryParam=null,!0};function ci(i,e){if(e<128){i.push(e);return}var t=1+(Math.log(e)/Math.LN2>>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}rn.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),r[0]&128&&(r=[0].concat(r)),t=Vf(t),r=Vf(r);!r[0]&&!(r[1]&128);)r=r.slice(1);var a=[2];ci(a,t.length),a=a.concat(t),a.push(2),ci(a,r.length);var s=a.concat(r),b=[48];return ci(b,s.length),b=b.concat(s),Pi.encode(b,e)};var Xr=qr,Ws=yd,Bd=xr,di=Q0,Cd=As,Ks=Bd.assert,Ti=_d,nn=wd;function vr(i){if(!(this instanceof vr))return new vr(i);typeof i=="string"&&(Ks(Object.prototype.hasOwnProperty.call(di,i),"Unknown curve "+i),i=di[i]),i instanceof di.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var Sd=vr;vr.prototype.keyPair=function(e){return new Ti(this,e)};vr.prototype.keyFromPrivate=function(e,t){return Ti.fromPrivate(this,e,t)};vr.prototype.keyFromPublic=function(e,t){return Ti.fromPublic(this,e,t)};vr.prototype.genKeyPair=function(e){e||(e={});for(var t=new Ws({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Cd(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new Xr(2));;){var s=new Xr(t.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}};vr.prototype._truncateToN=function(e,t){var r=e.byteLength()*8-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};vr.prototype.sign=function(e,t,r,a){typeof r=="object"&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new Xr(e,16));for(var s=this.n.byteLength(),b=t.getPrivate().toArray("be",s),p=e.toArray("be",s),u=new Ws({hash:this.hash,entropy:b,nonce:p,pers:a.pers,persEnc:a.persEnc||"utf8"}),f=this.n.sub(new Xr(1)),o=0;;o++){var x=a.k?a.k(o):new Xr(u.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(f)>=0)){var v=this.g.mul(x);if(!v.isInfinity()){var _=v.getX(),E=_.umod(this.n);if(E.cmpn(0)!==0){var D=x.invm(this.n).mul(E.mul(t.getPrivate()).iadd(e));if(D=D.umod(this.n),D.cmpn(0)!==0){var k=(v.getY().isOdd()?1:0)|(_.cmp(E)!==0?2:0);return a.canonical&&D.cmp(this.nh)>0&&(D=this.n.sub(D),k^=1),new nn({r:E,s:D,recoveryParam:k})}}}}}};vr.prototype.verify=function(e,t,r,a){e=this._truncateToN(new Xr(e,16)),r=this.keyFromPublic(r,a),t=new nn(t,"hex");var s=t.r,b=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||b.cmpn(1)<0||b.cmp(this.n)>=0)return!1;var p=b.invm(this.n),u=p.mul(e).umod(this.n),f=p.mul(s).umod(this.n),o;return this.curve._maxwellTrick?(o=this.g.jmulAdd(u,r.getPublic(),f),o.isInfinity()?!1:o.eqXToP(s)):(o=this.g.mulAdd(u,r.getPublic(),f),o.isInfinity()?!1:o.getX().umod(this.n).cmp(s)===0)};vr.prototype.recoverPubKey=function(i,e,t,r){Ks((3&t)===t,"The recovery param is more than two bits"),e=new nn(e,r);var a=this.n,s=new Xr(i),b=e.r,p=e.s,u=t&1,f=t>>1;if(b.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");f?b=this.curve.pointFromX(b.add(this.curve.n),u):b=this.curve.pointFromX(b,u);var o=e.r.invm(a),x=a.sub(s).mul(o).umod(a),v=p.mul(o).umod(a);return this.g.mulAdd(x,b,v)};vr.prototype.getKeyRecoveryParam=function(i,e,t,r){if(e=new nn(e,r),e.recoveryParam!==null)return e.recoveryParam;for(var a=0;a<4;a++){var s;try{s=this.recoverPubKey(i,e,a)}catch{continue}if(s.eq(t))return a}throw new Error("Unable to find valid recovery factor")};var D0=xr,Vs=D0.assert,Yf=D0.parseBytes,b0=D0.cachedProperty;function Xt(i,e){this.eddsa=i,this._secret=Yf(e.secret),i.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Yf(e.pub)}Xt.fromPublic=function(e,t){return t instanceof Xt?t:new Xt(e,{pub:t})};Xt.fromSecret=function(e,t){return t instanceof Xt?t:new Xt(e,{secret:t})};Xt.prototype.secret=function(){return this._secret};b0(Xt,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});b0(Xt,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});b0(Xt,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,a=t.slice(0,e.encodingLength);return a[0]&=248,a[r]&=127,a[r]|=64,a});b0(Xt,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});b0(Xt,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});b0(Xt,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Xt.prototype.sign=function(e){return Vs(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};Xt.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)};Xt.prototype.getSecret=function(e){return Vs(this._secret,"KeyPair is public only"),D0.encode(this.secret(),e)};Xt.prototype.getPublic=function(e){return D0.encode(this.pubBytes(),e)};var Fd=Xt,Md=qr,fn=xr,Dd=fn.assert,sn=fn.cachedProperty,Rd=fn.parseBytes;function t0(i,e){this.eddsa=i,typeof e!="object"&&(e=Rd(e)),Array.isArray(e)&&(e={R:e.slice(0,i.encodingLength),S:e.slice(i.encodingLength)}),Dd(e.R&&e.S,"Signature without R or S"),i.isPoint(e.R)&&(this._R=e.R),e.S instanceof Md&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}sn(t0,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});sn(t0,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});sn(t0,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});sn(t0,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});t0.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};t0.prototype.toHex=function(){return fn.encode(this.toBytes(),"hex").toUpperCase()};var Pd=t0,Td=en,kd=Q0,c0=xr,Od=c0.assert,Ys=c0.parseBytes,Xs=Fd,Xf=Pd;function lr(i){if(Od(i==="ed25519","only tested with ed25519 so far"),!(this instanceof lr))return new lr(i);i=kd[i].curve,this.curve=i,this.g=i.g,this.g.precompute(i.n.bitLength()+1),this.pointClass=i.point().constructor,this.encodingLength=Math.ceil(i.n.bitLength()/8),this.hash=Td.sha512}var Id=lr;lr.prototype.sign=function(e,t){e=Ys(e);var r=this.keyFromSecret(t),a=this.hashInt(r.messagePrefix(),e),s=this.g.mul(a),b=this.encodePoint(s),p=this.hashInt(b,r.pubBytes(),e).mul(r.priv()),u=a.add(p).umod(this.curve.n);return this.makeSignature({R:s,S:u,Rencoded:b})};lr.prototype.verify=function(e,t,r){e=Ys(e),t=this.makeSignature(t);var a=this.keyFromPublic(r),s=this.hashInt(t.Rencoded(),a.pubBytes(),e),b=this.g.mul(t.S()),p=t.R().add(a.pub().mul(s));return p.eq(b)};lr.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return c0.intFromLE(e.digest()).umod(this.curve.n)};lr.prototype.keyFromPublic=function(e){return Xs.fromPublic(this,e)};lr.prototype.keyFromSecret=function(e){return Xs.fromSecret(this,e)};lr.prototype.makeSignature=function(e){return e instanceof Xf?e:new Xf(this,e)};lr.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t};lr.prototype.decodePoint=function(e){e=c0.parseBytes(e);var t=e.length-1,r=e.slice(0,t).concat(e[t]&-129),a=(e[t]&128)!==0,s=c0.intFromLE(r);return this.curve.pointFromY(s,a)};lr.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};lr.prototype.decodeInt=function(e){return c0.intFromLE(e)};lr.prototype.isPoint=function(e){return e instanceof this.pointClass};(function(i){var e=i;e.version=ko.version,e.utils=xr,e.rand=As,e.curve=Di,e.curves=Q0,e.ec=Sd,e.eddsa=Id})(Es);const Zf=_s||mo;class Nd{constructor(){m0(this,"ec");this.ec=new Es.ec("secp256k1")}xphereSign(e,t){return Zf.Sign.signature(e,t)}xphereVerify(e,t,r){return Zf.Sign.signatureValidity(e,t,r)}generateKeys(){const e=this.ec.genKeyPair(),t=e.getPrivate("hex"),r=e.getPublic("hex");return{privateKey:t,publicKey:r}}sign(e,t){return this.ec.keyFromPrivate(t,"hex").sign(e)}verify(e,t,r){return this.ec.keyFromPublic(r,"hex").verify(e,t)}encrypt(e,t){return F0.AES.encrypt(e,t).toString()}decrypt(e,t){return F0.AES.decrypt(e,t).toString(F0.enc.Utf8)}}const qd=new Nd,Dr=Object.create(null);Dr.open="0";Dr.close="1";Dr.ping="2";Dr.pong="3";Dr.message="4";Dr.upgrade="5";Dr.noop="6";const q0=Object.create(null);Object.keys(Dr).forEach(i=>{q0[Dr[i]]=i});const yi={type:"error",data:"parser error"},Zs=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gs=typeof ArrayBuffer=="function",Js=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,ki=({type:i,data:e},t,r)=>Zs&&e instanceof Blob?t?r(e):Gf(e,r):Gs&&(e instanceof ArrayBuffer||Js(e))?t?r(e):Gf(new Blob([e]),r):r(Dr[i]+(e||"")),Gf=(i,e)=>{const t=new FileReader;return t.onload=function(){const r=t.result.split(",")[1];e("b"+(r||""))},t.readAsDataURL(i)};function Jf(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let ui;function zd(i,e){if(Zs&&i.data instanceof Blob)return i.data.arrayBuffer().then(Jf).then(e);if(Gs&&(i.data instanceof ArrayBuffer||Js(i.data)))return e(Jf(i.data));ki(i,!1,t=>{ui||(ui=new TextEncoder),e(ui.encode(t))})}const Qf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S0=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<Qf.length;i++)S0[Qf.charCodeAt(i)]=i;const Ld=i=>{let e=i.length*.75,t=i.length,r,a=0,s,b,p,u;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);const f=new ArrayBuffer(e),o=new Uint8Array(f);for(r=0;r<t;r+=4)s=S0[i.charCodeAt(r)],b=S0[i.charCodeAt(r+1)],p=S0[i.charCodeAt(r+2)],u=S0[i.charCodeAt(r+3)],o[a++]=s<<2|b>>4,o[a++]=(b&15)<<4|p>>2,o[a++]=(p&3)<<6|u&63;return f},Hd=typeof ArrayBuffer=="function",Oi=(i,e)=>{if(typeof i!="string")return{type:"message",data:Qs(i,e)};const t=i.charAt(0);return t==="b"?{type:"message",data:$d(i.substring(1),e)}:q0[t]?i.length>1?{type:q0[t],data:i.substring(1)}:{type:q0[t]}:yi},$d=(i,e)=>{if(Hd){const t=Ld(i);return Qs(t,e)}else return{base64:!0,data:i}},Qs=(i,e)=>{switch(e){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},ea="",Ud=(i,e)=>{const t=i.length,r=new Array(t);let a=0;i.forEach((s,b)=>{ki(s,!1,p=>{r[b]=p,++a===t&&e(r.join(ea))})})},jd=(i,e)=>{const t=i.split(ea),r=[];for(let a=0;a<t.length;a++){const s=Oi(t[a],e);if(r.push(s),s.type==="error")break}return r};function Wd(){return new TransformStream({transform(i,e){zd(i,t=>{const r=t.length;let a;if(r<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,r);else if(r<65536){a=new Uint8Array(3);const s=new DataView(a.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{a=new Uint8Array(9);const s=new DataView(a.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}i.data&&typeof i.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(t)})}})}let hi;function k0(i){return i.reduce((e,t)=>e+t.length,0)}function O0(i,e){if(i[0].length===e)return i.shift();const t=new Uint8Array(e);let r=0;for(let a=0;a<e;a++)t[a]=i[0][r++],r===i[0].length&&(i.shift(),r=0);return i.length&&r<i[0].length&&(i[0]=i[0].slice(r)),t}function Kd(i,e){hi||(hi=new TextDecoder);const t=[];let r=0,a=-1,s=!1;return new TransformStream({transform(b,p){for(t.push(b);;){if(r===0){if(k0(t)<1)break;const u=O0(t,1);s=(u[0]&128)===128,a=u[0]&127,a<126?r=3:a===126?r=1:r=2}else if(r===1){if(k0(t)<2)break;const u=O0(t,2);a=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(k0(t)<8)break;const u=O0(t,8),f=new DataView(u.buffer,u.byteOffset,u.length),o=f.getUint32(0);if(o>Math.pow(2,21)-1){p.enqueue(yi);break}a=o*Math.pow(2,32)+f.getUint32(4),r=3}else{if(k0(t)<a)break;const u=O0(t,a);p.enqueue(Oi(s?u:hi.decode(u),e)),r=0}if(a===0||a>i){p.enqueue(yi);break}}}})}const ta=4;function jt(i){if(i)return Vd(i)}function Vd(i){for(var e in jt.prototype)i[e]=jt.prototype[e];return i}jt.prototype.on=jt.prototype.addEventListener=function(i,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(e),this};jt.prototype.once=function(i,e){function t(){this.off(i,t),e.apply(this,arguments)}return t.fn=e,this.on(i,t),this};jt.prototype.off=jt.prototype.removeListener=jt.prototype.removeAllListeners=jt.prototype.removeEventListener=function(i,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+i];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var r,a=0;a<t.length;a++)if(r=t[a],r===e||r.fn===e){t.splice(a,1);break}return t.length===0&&delete this._callbacks["$"+i],this};jt.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+i],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(t){t=t.slice(0);for(var r=0,a=t.length;r<a;++r)t[r].apply(this,e)}return this};jt.prototype.emitReserved=jt.prototype.emit;jt.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};jt.prototype.hasListeners=function(i){return!!this.listeners(i).length};const pr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ra(i,...e){return e.reduce((t,r)=>(i.hasOwnProperty(r)&&(t[r]=i[r]),t),{})}const Yd=pr.setTimeout,Xd=pr.clearTimeout;function an(i,e){e.useNativeTimers?(i.setTimeoutFn=Yd.bind(pr),i.clearTimeoutFn=Xd.bind(pr)):(i.setTimeoutFn=pr.setTimeout.bind(pr),i.clearTimeoutFn=pr.clearTimeout.bind(pr))}const Zd=1.33;function Gd(i){return typeof i=="string"?Jd(i):Math.ceil((i.byteLength||i.size)*Zd)}function Jd(i){let e=0,t=0;for(let r=0,a=i.length;r<a;r++)e=i.charCodeAt(r),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(r++,t+=4);return t}function Qd(i){let e="";for(let t in i)i.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e}function eu(i){let e={},t=i.split("&");for(let r=0,a=t.length;r<a;r++){let s=t[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}class tu extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class Ii extends jt{constructor(e){super(),this.writable=!1,an(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new tu(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Oi(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 e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Qd(e);return t.length?"?"+t:""}}const na="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),mi=64,ru={};let es=0,I0=0,ts;function rs(i){let e="";do e=na[i%mi]+e,i=Math.floor(i/mi);while(i>0);return e}function ia(){const i=rs(+new Date);return i!==ts?(es=0,ts=i):i+"."+rs(es++)}for(;I0<mi;I0++)ru[na[I0]]=I0;let fa=!1;try{fa=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nu=fa;function sa(i){const e=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||nu))return new XMLHttpRequest}catch{}if(!e)try{return new pr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function iu(){}const fu=function(){return new sa({xdomain:!1}).responseType!=null}();class su extends Ii{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||a!==e.port}const t=e&&e.forceBase64;this.supportsBinary=fu&&!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 r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||t()})),this.writable||(r++,this.once("drain",function(){--r||t()}))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};jd(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Ud(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=ia()),!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 f0(this.uri(),e)}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(a,s)=>{this.onError("xhr post error",a,s)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,r)=>{this.onError("xhr poll error",t,r)}),this.pollXhr=e}}let f0=class z0 extends jt{constructor(e,t){super(),an(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=t.data!==void 0?t.data:null,this.create()}create(){var e;const t=ra(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const r=this.xhr=new sa(t);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let a in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(a)&&r.setRequestHeader(a,this.opts.extraHeaders[a])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var a;r.readyState===3&&((a=this.opts.cookieJar)===null||a===void 0||a.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(a){this.setTimeoutFn(()=>{this.onError(a)},0);return}typeof document<"u"&&(this.index=z0.requestsCount++,z0.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=iu,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete z0.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};f0.requestsCount=0;f0.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ns);else if(typeof addEventListener=="function"){const i="onpagehide"in pr?"pagehide":"unload";addEventListener(i,ns,!1)}}function ns(){for(let i in f0.requests)f0.requests.hasOwnProperty(i)&&f0.requests[i].abort()}const Ni=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),N0=pr.WebSocket||pr.MozWebSocket,is=!0,au="arraybuffer",fs=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ou extends Ii{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=fs?{}:ra(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=is&&!fs?t?new N0(e,t):new N0(e):new N0(e,t,r)}catch(a){return this.emitReserved("error",a)}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],a=t===e.length-1;ki(r,this.supportsBinary,s=>{const b={};try{is&&this.ws.send(s)}catch{}a&&Ni(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(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]=ia()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!N0}}class cu extends Ii{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(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=Kd(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),a=Wd();a.readable.pipeTo(e.writable),this.writer=a.writable.getWriter();const s=()=>{r.read().then(({done:p,value:u})=>{p||(this.onPacket(u),s())}).catch(p=>{})};s();const b={type:"open"};this.query.sid&&(b.data=`{"sid":"${this.query.sid}"}`),this.writer.write(b).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],a=t===e.length-1;this.writer.write(r).then(()=>{a&&Ni(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const du={websocket:ou,webtransport:cu,polling:su},uu=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,hu=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gi(i){if(i.length>2e3)throw"URI too long";const e=i,t=i.indexOf("["),r=i.indexOf("]");t!=-1&&r!=-1&&(i=i.substring(0,t)+i.substring(t,r).replace(/:/g,";")+i.substring(r,i.length));let a=uu.exec(i||""),s={},b=14;for(;b--;)s[hu[b]]=a[b]||"";return t!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=lu(s,s.path),s.queryKey=xu(s,s.query),s}function lu(i,e){const t=/\/{2,9}/g,r=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function xu(i,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,a,s){a&&(t[a]=s)}),t}let aa=class n0 extends jt{constructor(e,t={}){super(),this.binaryType=au,this.writeBuffer=[],e&&typeof e=="object"&&(t=e,e=null),e?(e=gi(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=gi(t.host).host),an(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&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?"/":""),typeof this.opts.query=="string"&&(this.opts.query=eu(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(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=ta,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 du[e](r)}open(){let e;if(this.opts.rememberUpgrade&&n0.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}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",t=>this.onClose("transport close",t))}probe(e){let t=this.createTransport(e),r=!1;n0.priorWebsocketSuccess=!1;const a=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",x=>{if(!r)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;n0.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(o(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const v=new Error("probe error");v.transport=t.name,this.emitReserved("upgradeError",v)}}))};function s(){r||(r=!0,o(),t.close(),t=null)}const b=x=>{const v=new Error("probe error: "+x);v.transport=t.name,s(),this.emitReserved("upgradeError",v)};function p(){b("transport closed")}function u(){b("socket closed")}function f(x){t&&x.name!==t.name&&s()}const o=()=>{t.removeListener("open",a),t.removeListener("error",b),t.removeListener("close",p),this.off("close",u),this.off("upgrading",f)};t.once("open",a),t.once("error",b),t.once("close",p),this.once("close",u),this.once("upgrading",f),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onOpen(){if(this.readyState="open",n0.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")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);break}}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(),this.readyState!=="closed"&&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,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&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&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){const a=this.writeBuffer[r].data;if(a&&(t+=Gd(a)),r>0&&t>this.maxPayload)return this.writeBuffer.slice(0,r);t+=2}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,a){if(typeof t=="function"&&(a=t,t=void 0),typeof r=="function"&&(a=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:e,data:t,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),a&&this.once("flush",a),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(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){n0.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(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 a=e.length;for(;r<a;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}};aa.protocol=ta;function pu(i,e="",t){let r=i;t=t||typeof location<"u"&&location,i==null&&(i=t.protocol+"//"+t.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=t.protocol+i:i=t.host+i),/^(https?|wss?):\/\//.test(i)||(typeof t<"u"?i=t.protocol+"//"+i:i="https://"+i),r=gi(i)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(t&&t.port===r.port?"":":"+r.port),r}const bu=typeof ArrayBuffer=="function",vu=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,oa=Object.prototype.toString,yu=typeof Blob=="function"||typeof Blob<"u"&&oa.call(Blob)==="[object BlobConstructor]",mu=typeof File=="function"||typeof File<"u"&&oa.call(File)==="[object FileConstructor]";function qi(i){return bu&&(i instanceof ArrayBuffer||vu(i))||yu&&i instanceof Blob||mu&&i instanceof File}function L0(i,e){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let t=0,r=i.length;t<r;t++)if(L0(i[t]))return!0;return!1}if(qi(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return L0(i.toJSON(),!0);for(const t in i)if(Object.prototype.hasOwnProperty.call(i,t)&&L0(i[t]))return!0;return!1}function gu(i){const e=[],t=i.data,r=i;return r.data=_i(t,e),r.attachments=e.length,{packet:r,buffers:e}}function _i(i,e){if(!i)return i;if(qi(i)){const t={_placeholder:!0,num:e.length};return e.push(i),t}else if(Array.isArray(i)){const t=new Array(i.length);for(let r=0;r<i.length;r++)t[r]=_i(i[r],e);return t}else if(typeof i=="object"&&!(i instanceof Date)){const t={};for(const r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=_i(i[r],e));return t}return i}function _u(i,e){return i.data=Ei(i.data,e),delete i.attachments,i}function Ei(i,e){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<e.length)return e[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let t=0;t<i.length;t++)i[t]=Ei(i[t],e);else if(typeof i=="object")for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=Ei(i[t],e));return i}const Eu=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],wu=5;var pt;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(pt||(pt={}));class Au{constructor(e){this.replacer=e}encode(e){return(e.type===pt.EVENT||e.type===pt.ACK)&&L0(e)?this.encodeAsBinary({type:e.type===pt.EVENT?pt.BINARY_EVENT:pt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===pt.BINARY_EVENT||e.type===pt.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=gu(e),r=this.encodeAsString(t.packet),a=t.buffers;return a.unshift(r),a}}function ss(i){return Object.prototype.toString.call(i)==="[object Object]"}class zi extends jt{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const r=t.type===pt.BINARY_EVENT;r||t.type===pt.BINARY_ACK?(t.type=r?pt.EVENT:pt.ACK,this.reconstructor=new Bu(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(qi(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const r={type:Number(e.charAt(0))};if(pt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===pt.BINARY_EVENT||r.type===pt.BINARY_ACK){const s=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const b=e.substring(s,t);if(b!=Number(b)||e.charAt(t)!=="-")throw new Error("Illegal attachments");r.attachments=Number(b)}if(e.charAt(t+1)==="/"){const s=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););r.nsp=e.substring(s,t)}else r.nsp="/";const a=e.charAt(t+1);if(a!==""&&Number(a)==a){const s=t+1;for(;++t;){const b=e.charAt(t);if(b==null||Number(b)!=b){--t;break}if(t===e.length)break}r.id=Number(e.substring(s,t+1))}if(e.charAt(++t)){const s=this.tryParse(e.substr(t));if(zi.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case pt.CONNECT:return ss(t);case pt.DISCONNECT:return t===void 0;case pt.CONNECT_ERROR:return typeof t=="string"||ss(t);case pt.EVENT:case pt.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Eu.indexOf(t[0])===-1);case pt.ACK:case pt.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Bu{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=_u(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Cu=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zi,Encoder:Au,get PacketType(){return pt},protocol:wu},Symbol.toStringTag,{value:"Module"}));function _r(i,e,t){return i.on(e,t),function(){i.off(e,t)}}const Su=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ca extends jt{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=[_r(e,"open",this.onopen.bind(this)),_r(e,"packet",this.onpacket.bind(this)),_r(e,"error",this.onerror.bind(this)),_r(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(Su.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:pt.EVENT,data:t};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const b=this.ids++,p=t.pop();this._registerAckCallback(b,p),r.id=b}const a=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!a||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,t){var r;const a=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(a===void 0){this.acks[e]=t;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===e&&this.sendBuffer.splice(p,1);t.call(this,new Error("operation has timed out"))},a),b=(...p)=>{this.io.clearTimeoutFn(s),t.apply(this,p)};b.withError=!0,this.acks[e]=b}emitWithAck(e,...t){return new Promise((r,a)=>{const s=(b,p)=>b?a(b):r(p);s.withError=!0,t.push(s),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...s)=>r!==this._queue[0]?void 0:(a!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(a)):(this._queue.shift(),t&&t(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)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(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:pt.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(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case pt.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 pt.EVENT:case pt.BINARY_EVENT:this.onevent(e);break;case pt.ACK:case pt.BINARY_ACK:this.onack(e);break;case pt.DISCONNECT:this.ondisconnect();break;case pt.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const t=e.data||[];e.id!=null&&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&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...a){r||(r=!0,t.packet({type:pt.ACK,id:e,data:a}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(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:pt.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 v0(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}v0.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*i);i=Math.floor(e*10)&1?i+t:i-t}return Math.min(i,this.max)|0};v0.prototype.reset=function(){this.attempts=0};v0.prototype.setMin=function(i){this.ms=i};v0.prototype.setMax=function(i){this.max=i};v0.prototype.setJitter=function(i){this.jitter=i};class wi extends jt{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,an(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((r=t.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new v0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const a=t.parser||Cu;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new aa(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const a=_r(t,"open",function(){r.onopen(),e&&e()}),s=p=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",p),e?e(p):this.maybeReconnectOnOpen()},b=_r(t,"error",s);if(this._timeout!==!1){const p=this._timeout,u=this.setTimeoutFn(()=>{a(),s(new Error("timeout")),t.close()},p);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(a),this.subs.push(b),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(_r(e,"ping",this.onping.bind(this)),_r(e,"data",this.ondata.bind(this)),_r(e,"error",this.onerror.bind(this)),_r(e,"close",this.onclose.bind(this)),_r(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){Ni(()=>{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 ca(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const r of t)if(this.nsps[r].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(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):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 A0={};function H0(i,e){typeof i=="object"&&(e=i,i=void 0),e=e||{};const t=pu(i,e.path||"/socket.io"),r=t.source,a=t.id,s=t.path,b=A0[a]&&s in A0[a].nsps,p=e.forceNew||e["force new connection"]||e.multiplex===!1||b;let u;return p?u=new wi(r,e):(A0[a]||(A0[a]=new wi(r,e)),u=A0[a]),t.query&&!e.query&&(e.query=t.queryKey),u.socket(t.path,e)}Object.assign(H0,{Manager:wi,Socket:ca,io:H0,connect:H0});const Vr=class Vr{constructor(){m0(this,"socket");this.socket=H0("http://159.138.233.132:8080")}static getInstance(){return Vr.instance||(Vr.instance=new Vr),Vr.instance}};m0(Vr,"instance");let Ai=Vr;class Fu{constructor(){m0(this,"socketInstance");this.socketInstance=Ai.getInstance()}joinRoom(e){this.socketInstance.socket.emit("joinRoom",e)}leaveRoom(e){this.socketInstance.socket.emit("leaveRoom",e)}confirmMessage(e,t){return this.socketInstance.socket.emit("confirmMessage",e,t)}onMessageReceived(e,t){e==="accountInfo"?this.socketInstance.socket.on("accountInfo",r=>{t(r)}):e==="requestMessage"?this.socketInstance.socket.on("requestMessage",r=>{t(r)}):e==="addressProvide"&&this.socketInstance.socket.on("addressProvide",r=>{t(r)})}offMessageReceived(e){e==="accountInfo"?this.socketInstance.socket.off("accountInfo"):e==="requestMessage"?this.socketInstance.socket.off("requestMessage"):e==="addressProvide"&&this.socketInstance.socket.off("addressProvide")}}const Or=new Fu;class Mu{isAccountCryptoType(e){return typeof e=="object"&&e!==null&&typeof e.signature=="string"&&typeof e.publicKey=="string"&&typeof e.address=="string"&&typeof e.etc=="string"}getAccountCrypto(){return new Promise((e,t)=>{Or.onMessageReceived("accountInfo",r=>{this.isAccountCryptoType(r)?e(r):t(new Error("Invalid account crypto"))})})}reciveRequest(){return new Promise((e,t)=>{Or.onMessageReceived("requestMessage",r=>{r.message==="Request Message"?e(!0):t(new Error("Request message is different"))})})}sendMessage(e,t){return new Promise((r,a)=>{Or.confirmMessage(e,t).connected?r():a(new Error("Send failed"))})}async qrLogin(e,t){try{if(await this.reciveRequest()){await this.sendMessage(e,t);const{publicKey:a,signature:s,address:b}=await this.getAccountCrypto();if(!qd.xphereVerify(t,a,s))throw new Error("Verification failed");return{address:b}}else throw new Error("Verification failed")}catch(r){return Promise.reject(r)}finally{Or.leaveRoom(e)}}}const Du=new Mu;class Ru{generateQrCode(e){const t=F0.lib.WordArray.random(32).toString(F0.enc.Hex);let r="";return e==="login"?r=`zigap://login?roomId=${t}&type=${e}`:e==="send"?r=`zigap://send?roomId=${t}&type=${e}`:e==="provide"&&(r=`zigap://provide?roomId=${t}&type=${e}`),Or.joinRoom(t),{qrCode:r,roomId:t}}}const da=new Ru,Pu=({sigMessage:i,validTime:e,onReceive:t,...r})=>{const[a,s]=br.useState(!0),{qrCode:b,roomId:p}=da.generateQrCode("login");return br.useEffect(()=>{const u=setTimeout(()=>{Or.leaveRoom(p),s(!1)},e*60*1e3);return()=>clearTimeout(u)},[p,e]),br.useEffect(()=>{(async()=>{try{console.log("roomId",p);const o={isSuccess:!0,address:(await Du.qrLogin(p,i)).address};t(o)}catch{t({isSuccess:!1})}})()},[t,i]),a?$0.jsx(ls,{value:b,...r,imageSettings:{src:"/public/zigap-icon.svg",height:35,width:35,excavate:!0}}):$0.jsx("div",{children:"QR loading error"})};class Tu{isAccountType(e){return typeof e=="object"&&e!==null&&typeof e.address=="string"}getAccount(){return new Promise((e,t)=>{Or.onMessageReceived("addressProvide",r=>{this.isAccountType(r)?e(r):t(new Error("Invalid address"))})})}async qrAddressProvide(e){try{return await this.getAccount()}catch(t){return Promise.reject(t)}finally{Or.leaveRoom(e)}}}const ku=new Tu,Ou=({validTime:i,onReceive:e,...t})=>{const[r,a]=br.useState(!0),{qrCode:s,roomId:b}=da.generateQrCode("provide");return br.useEffect(()=>{const p=setTimeout(()=>{Or.leaveRoom(b),a(!1)},i*60*1e3);return()=>clearTimeout(p)},[b,i]),br.useEffect(()=>{(async()=>{try{const f={isSuccess:!0,address:(await ku.qrAddressProvide(b)).address};e(f)}catch{e({isSuccess:!1})}})()},[e]),r?$0.jsx(ls,{value:s,...t}):$0.jsx("div",{children:"QR loading error"})};exports.AddressProvideQR=Ou;exports.LoginQR=Pu;
package/dist/index.es.js CHANGED
@@ -16448,7 +16448,14 @@ const ha = new Tu(), qu = ({ sigMessage: i, validTime: e, onReceive: t, ...r })
16448
16448
  });
16449
16449
  }
16450
16450
  })();
16451
- }, [t, i]), a ? /* @__PURE__ */ $0.jsx(ps, { value: b, ...r }) : /* @__PURE__ */ $0.jsx("div", { children: "QR loading error" });
16451
+ }, [t, i]), a ? /* @__PURE__ */ $0.jsx(
16452
+ ps,
16453
+ {
16454
+ value: b,
16455
+ ...r,
16456
+ imageSettings: { src: "/public/zigap-icon.svg", height: 35, width: 35, excavate: !0 }
16457
+ }
16458
+ ) : /* @__PURE__ */ $0.jsx("div", { children: "QR loading error" });
16452
16459
  };
16453
16460
  class ku {
16454
16461
  // 타입 가드 함수
@@ -0,0 +1,9 @@
1
+ <svg width="167" height="166" viewBox="0 0 167 166" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M116.052 115.296H166.355H166.36V0H51.0675V50.3042H0.759995V165.6H116.052V115.296ZM90.3366 65.3428L40.21 115.296H40.4307L40.2551 115.471H101.014V150.561H15.7981V65.3428H90.3366ZM76.7327 100.257H151.317V15.0386H66.1006V50.1536L109.424 50.3042H126.684L126.624 50.364L126.669 50.3642L113.846 63.1431L76.7327 100.257Z" fill="url(#paint0_linear_2322_66)"/>
3
+ <defs>
4
+ <linearGradient id="paint0_linear_2322_66" x1="167.74" y1="-2.07" x2="-3.37985" y2="172.5" gradientUnits="userSpaceOnUse">
5
+ <stop stop-color="#1349F8"/>
6
+ <stop offset="1" stop-color="#5C13F8"/>
7
+ </linearGradient>
8
+ </defs>
9
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigap-utils",
3
- "version": "0.0.2",
3
+ "version": "0.0.21",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",