From a258e881fb526607b9d183dffdf710c981eec3be Mon Sep 17 00:00:00 2001 From: Koshik Raj Date: Fri, 15 Dec 2023 00:48:17 +0530 Subject: [PATCH] Updates --- .../{index-3dee7f48.js => index-0f097d8c.js} | 84 +++++++++---------- ...{index-b5be2b39.css => index-ab9dd86d.css} | 2 +- ...pto-b53e1cbd.js => nodecrypto-de819dc3.js} | 2 +- ...ypto-83eb6fa6.js => webcrypto-f8fc69c2.js} | 2 +- index.html | 4 +- 5 files changed, 47 insertions(+), 47 deletions(-) rename assets/{index-3dee7f48.js => index-0f097d8c.js} (90%) rename assets/{index-b5be2b39.css => index-ab9dd86d.css} (97%) rename assets/{nodecrypto-b53e1cbd.js => nodecrypto-de819dc3.js} (80%) rename assets/{webcrypto-83eb6fa6.js => webcrypto-f8fc69c2.js} (94%) diff --git a/assets/index-3dee7f48.js b/assets/index-0f097d8c.js similarity index 90% rename from assets/index-3dee7f48.js rename to assets/index-0f097d8c.js index 5cb8eb00..4ecaba65 100644 --- a/assets/index-3dee7f48.js +++ b/assets/index-0f097d8c.js @@ -1,9 +1,9 @@ -var hW=Object.defineProperty;var pW=(t,e,r)=>e in t?hW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Oe=(t,e,r)=>(pW(t,typeof e!="symbol"?e+"":e,r),r),f3=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var X=(t,e,r)=>(f3(t,e,"read from private field"),r?r.call(t):e.get(t)),Ne=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ce=(t,e,r,n)=>(f3(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var C1=(t,e,r,n)=>({set _(i){ce(t,e,i,r)},get _(){return X(t,e,n)}}),Ke=(t,e,r)=>(f3(t,e,"access private method"),r);function BE(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function es(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function mW(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Rn={},b5={};b5.byteLength=yW;b5.toByteArray=wW;b5.fromByteArray=AW;var Aa=[],Mo=[],gW=typeof Uint8Array<"u"?Uint8Array:Array,c3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var jl=0,bW=c3.length;jl0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function yW(t){var e=dO(t),r=e[0],n=e[1];return(r+n)*3/4-n}function vW(t,e,r){return(e+r)*3/4-r}function wW(t){var e,r=dO(t),n=r[0],i=r[1],o=new gW(vW(t,n,i)),s=0,f=i>0?n-4:n,d;for(d=0;d>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=Mo[t.charCodeAt(d)]<<2|Mo[t.charCodeAt(d+1)]>>4,o[s++]=e&255),i===1&&(e=Mo[t.charCodeAt(d)]<<10|Mo[t.charCodeAt(d+1)]<<4|Mo[t.charCodeAt(d+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function xW(t){return Aa[t>>18&63]+Aa[t>>12&63]+Aa[t>>6&63]+Aa[t&63]}function EW(t,e,r){for(var n,i=[],o=e;of?f:s+o));return n===1?(e=t[r-1],i.push(Aa[e>>2]+Aa[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Aa[e>>10]+Aa[e>>4&63]+Aa[e<<2&63]+"=")),i.join("")}var OE={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */OE.read=function(t,e,r,n,i){var o,s,f=i*8-n-1,d=(1<>1,b=-7,v=r?i-1:0,A=r?-1:1,_=t[e+v];for(v+=A,o=_&(1<<-b)-1,_>>=-b,b+=f;b>0;o=o*256+t[e+v],v+=A,b-=8);for(s=o&(1<<-b)-1,o>>=-b,b+=n;b>0;s=s*256+t[e+v],v+=A,b-=8);if(o===0)o=1-p;else{if(o===d)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-p}return(_?-1:1)*s*Math.pow(2,o-n)};OE.write=function(t,e,r,n,i,o){var s,f,d,p=o*8-i-1,b=(1<>1,A=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:o-1,S=n?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,s=b):(s=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-s))<1&&(s--,d*=2),s+v>=1?e+=A/d:e+=A*Math.pow(2,1-v),e*d>=2&&(s++,d/=2),s+v>=b?(f=0,s=b):s+v>=1?(f=(e*d-1)*Math.pow(2,i),s=s+v):(f=e*Math.pow(2,v-1)*Math.pow(2,i),s=0));i>=8;t[r+_]=f&255,_+=S,f/=256,i-=8);for(s=s<0;t[r+_]=s&255,_+=S,s/=256,p-=8);t[r+_-S]|=P*128};/*! +var hW=Object.defineProperty;var pW=(t,e,r)=>e in t?hW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Oe=(t,e,r)=>(pW(t,typeof e!="symbol"?e+"":e,r),r),f3=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var X=(t,e,r)=>(f3(t,e,"read from private field"),r?r.call(t):e.get(t)),Ne=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ce=(t,e,r,n)=>(f3(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var I1=(t,e,r,n)=>({set _(i){ce(t,e,i,r)},get _(){return X(t,e,n)}}),Ke=(t,e,r)=>(f3(t,e,"access private method"),r);function BE(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function es(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function mW(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Rn={},b5={};b5.byteLength=yW;b5.toByteArray=wW;b5.fromByteArray=AW;var Aa=[],Mo=[],gW=typeof Uint8Array<"u"?Uint8Array:Array,c3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var jl=0,bW=c3.length;jl0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function yW(t){var e=dO(t),r=e[0],n=e[1];return(r+n)*3/4-n}function vW(t,e,r){return(e+r)*3/4-r}function wW(t){var e,r=dO(t),n=r[0],i=r[1],o=new gW(vW(t,n,i)),s=0,f=i>0?n-4:n,d;for(d=0;d>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=Mo[t.charCodeAt(d)]<<2|Mo[t.charCodeAt(d+1)]>>4,o[s++]=e&255),i===1&&(e=Mo[t.charCodeAt(d)]<<10|Mo[t.charCodeAt(d+1)]<<4|Mo[t.charCodeAt(d+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function xW(t){return Aa[t>>18&63]+Aa[t>>12&63]+Aa[t>>6&63]+Aa[t&63]}function EW(t,e,r){for(var n,i=[],o=e;of?f:s+o));return n===1?(e=t[r-1],i.push(Aa[e>>2]+Aa[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Aa[e>>10]+Aa[e>>4&63]+Aa[e<<2&63]+"=")),i.join("")}var OE={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */OE.read=function(t,e,r,n,i){var o,s,f=i*8-n-1,d=(1<>1,b=-7,v=r?i-1:0,A=r?-1:1,_=t[e+v];for(v+=A,o=_&(1<<-b)-1,_>>=-b,b+=f;b>0;o=o*256+t[e+v],v+=A,b-=8);for(s=o&(1<<-b)-1,o>>=-b,b+=n;b>0;s=s*256+t[e+v],v+=A,b-=8);if(o===0)o=1-p;else{if(o===d)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-p}return(_?-1:1)*s*Math.pow(2,o-n)};OE.write=function(t,e,r,n,i,o){var s,f,d,p=o*8-i-1,b=(1<>1,A=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:o-1,S=n?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,s=b):(s=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-s))<1&&(s--,d*=2),s+v>=1?e+=A/d:e+=A*Math.pow(2,1-v),e*d>=2&&(s++,d/=2),s+v>=b?(f=0,s=b):s+v>=1?(f=(e*d-1)*Math.pow(2,i),s=s+v):(f=e*Math.pow(2,v-1)*Math.pow(2,i),s=0));i>=8;t[r+_]=f&255,_+=S,f/=256,i-=8);for(s=s<0;t[r+_]=s&255,_+=S,s/=256,p-=8);t[r+_-S]|=P*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */(function(t){const e=b5,r=OE,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=f,t.SlowBuffer=T,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i,f.TYPED_ARRAY_SUPPORT=o(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const j=new Uint8Array(1),N={foo:function(){return 42}};return Object.setPrototypeOf(N,Uint8Array.prototype),Object.setPrototypeOf(j,N),j.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function s(j){if(j>i)throw new RangeError('The value "'+j+'" is invalid for option "size"');const N=new Uint8Array(j);return Object.setPrototypeOf(N,f.prototype),N}function f(j,N,$){if(typeof j=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(j)}return d(j,N,$)}f.poolSize=8192;function d(j,N,$){if(typeof j=="string")return A(j,N);if(ArrayBuffer.isView(j))return S(j);if(j==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j);if(ye(j,ArrayBuffer)||j&&ye(j.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(j,SharedArrayBuffer)||j&&ye(j.buffer,SharedArrayBuffer)))return P(j,N,$);if(typeof j=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const J=j.valueOf&&j.valueOf();if(J!=null&&J!==j)return f.from(J,N,$);const te=I(j);if(te)return te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof j[Symbol.toPrimitive]=="function")return f.from(j[Symbol.toPrimitive]("string"),N,$);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j)}f.from=function(j,N,$){return d(j,N,$)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function p(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function b(j,N,$){return p(j),j<=0?s(j):N!==void 0?typeof $=="string"?s(j).fill(N,$):s(j).fill(N):s(j)}f.alloc=function(j,N,$){return b(j,N,$)};function v(j){return p(j),s(j<0?0:C(j)|0)}f.allocUnsafe=function(j){return v(j)},f.allocUnsafeSlow=function(j){return v(j)};function A(j,N){if((typeof N!="string"||N==="")&&(N="utf8"),!f.isEncoding(N))throw new TypeError("Unknown encoding: "+N);const $=O(j,N)|0;let J=s($);const te=J.write(j,N);return te!==$&&(J=J.slice(0,te)),J}function _(j){const N=j.length<0?0:C(j.length)|0,$=s(N);for(let J=0;J=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return j|0}function T(j){return+j!=j&&(j=0),f.alloc(+j)}f.isBuffer=function(N){return N!=null&&N._isBuffer===!0&&N!==f.prototype},f.compare=function(N,$){if(ye(N,Uint8Array)&&(N=f.from(N,N.offset,N.byteLength)),ye($,Uint8Array)&&($=f.from($,$.offset,$.byteLength)),!f.isBuffer(N)||!f.isBuffer($))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(N===$)return 0;let J=N.length,te=$.length;for(let me=0,ne=Math.min(J,te);mete.length?(f.isBuffer(ne)||(ne=f.from(ne)),ne.copy(te,me)):Uint8Array.prototype.set.call(te,ne,me);else if(f.isBuffer(ne))ne.copy(te,me);else throw new TypeError('"list" argument must be an Array of Buffers');me+=ne.length}return te};function O(j,N){if(f.isBuffer(j))return j.length;if(ArrayBuffer.isView(j)||ye(j,ArrayBuffer))return j.byteLength;if(typeof j!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof j);const $=j.length,J=arguments.length>2&&arguments[2]===!0;if(!J&&$===0)return 0;let te=!1;for(;;)switch(N){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return He(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return Xe(j).length;default:if(te)return J?-1:He(j).length;N=(""+N).toLowerCase(),te=!0}}f.byteLength=O;function B(j,N,$){let J=!1;if((N===void 0||N<0)&&(N=0),N>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0,N>>>=0,$<=N))return"";for(j||(j="utf8");;)switch(j){case"hex":return y(this,N,$);case"utf8":case"utf-8":return l(this,N,$);case"ascii":return w(this,N,$);case"latin1":case"binary":return E(this,N,$);case"base64":return u(this,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c(this,N,$);default:if(J)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),J=!0}}f.prototype._isBuffer=!0;function D(j,N,$){const J=j[N];j[N]=j[$],j[$]=J}f.prototype.swap16=function(){const N=this.length;if(N%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let $=0;$$&&(N+=" ... "),""},n&&(f.prototype[n]=f.prototype.inspect),f.prototype.compare=function(N,$,J,te,me){if(ye(N,Uint8Array)&&(N=f.from(N,N.offset,N.byteLength)),!f.isBuffer(N))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof N);if($===void 0&&($=0),J===void 0&&(J=N?N.length:0),te===void 0&&(te=0),me===void 0&&(me=this.length),$<0||J>N.length||te<0||me>this.length)throw new RangeError("out of range index");if(te>=me&&$>=J)return 0;if(te>=me)return-1;if($>=J)return 1;if($>>>=0,J>>>=0,te>>>=0,me>>>=0,this===N)return 0;let ne=me-te,we=J-$;const tt=Math.min(ne,we),ve=this.slice(te,me),Ie=N.slice($,J);for(let Qe=0;Qe2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,it($)&&($=te?0:j.length-1),$<0&&($=j.length+$),$>=j.length){if(te)return-1;$=j.length-1}else if($<0)if(te)$=0;else return-1;if(typeof N=="string"&&(N=f.from(N,J)),f.isBuffer(N))return N.length===0?-1:K(j,N,$,J,te);if(typeof N=="number")return N=N&255,typeof Uint8Array.prototype.indexOf=="function"?te?Uint8Array.prototype.indexOf.call(j,N,$):Uint8Array.prototype.lastIndexOf.call(j,N,$):K(j,[N],$,J,te);throw new TypeError("val must be string, number or Buffer")}function K(j,N,$,J,te){let me=1,ne=j.length,we=N.length;if(J!==void 0&&(J=String(J).toLowerCase(),J==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(j.length<2||N.length<2)return-1;me=2,ne/=2,we/=2,$/=2}function tt(Ie,Qe){return me===1?Ie[Qe]:Ie.readUInt16BE(Qe*me)}let ve;if(te){let Ie=-1;for(ve=$;vene&&($=ne-we),ve=$;ve>=0;ve--){let Ie=!0;for(let Qe=0;Qete&&(J=te)):J=te;const me=N.length;J>me/2&&(J=me/2);let ne;for(ne=0;ne>>0,isFinite(J)?(J=J>>>0,te===void 0&&(te="utf8")):(te=J,J=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const me=this.length-$;if((J===void 0||J>me)&&(J=me),N.length>0&&(J<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");let ne=!1;for(;;)switch(te){case"hex":return Y(this,N,$,J);case"utf8":case"utf-8":return W(this,N,$,J);case"ascii":case"latin1":case"binary":return ie(this,N,$,J);case"base64":return x(this,N,$,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,N,$,J);default:if(ne)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),ne=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function u(j,N,$){return N===0&&$===j.length?e.fromByteArray(j):e.fromByteArray(j.slice(N,$))}function l(j,N,$){$=Math.min(j.length,$);const J=[];let te=N;for(;te<$;){const me=j[te];let ne=null,we=me>239?4:me>223?3:me>191?2:1;if(te+we<=$){let tt,ve,Ie,Qe;switch(we){case 1:me<128&&(ne=me);break;case 2:tt=j[te+1],(tt&192)===128&&(Qe=(me&31)<<6|tt&63,Qe>127&&(ne=Qe));break;case 3:tt=j[te+1],ve=j[te+2],(tt&192)===128&&(ve&192)===128&&(Qe=(me&15)<<12|(tt&63)<<6|ve&63,Qe>2047&&(Qe<55296||Qe>57343)&&(ne=Qe));break;case 4:tt=j[te+1],ve=j[te+2],Ie=j[te+3],(tt&192)===128&&(ve&192)===128&&(Ie&192)===128&&(Qe=(me&15)<<18|(tt&63)<<12|(ve&63)<<6|Ie&63,Qe>65535&&Qe<1114112&&(ne=Qe))}}ne===null?(ne=65533,we=1):ne>65535&&(ne-=65536,J.push(ne>>>10&1023|55296),ne=56320|ne&1023),J.push(ne),te+=we}return m(J)}const h=4096;function m(j){const N=j.length;if(N<=h)return String.fromCharCode.apply(String,j);let $="",J=0;for(;JJ)&&($=J);let te="";for(let me=N;me<$;++me)te+=Pe[j[me]];return te}function c(j,N,$){const J=j.slice(N,$);let te="";for(let me=0;meJ&&(N=J),$<0?($+=J,$<0&&($=0)):$>J&&($=J),$$)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(N,$,J){N=N>>>0,$=$>>>0,J||g(N,$,this.length);let te=this[N],me=1,ne=0;for(;++ne<$&&(me*=256);)te+=this[N+ne]*me;return te},f.prototype.readUintBE=f.prototype.readUIntBE=function(N,$,J){N=N>>>0,$=$>>>0,J||g(N,$,this.length);let te=this[N+--$],me=1;for(;$>0&&(me*=256);)te+=this[N+--$]*me;return te},f.prototype.readUint8=f.prototype.readUInt8=function(N,$){return N=N>>>0,$||g(N,1,this.length),this[N]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(N,$){return N=N>>>0,$||g(N,2,this.length),this[N]|this[N+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(N,$){return N=N>>>0,$||g(N,2,this.length),this[N]<<8|this[N+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(N,$){return N=N>>>0,$||g(N,4,this.length),(this[N]|this[N+1]<<8|this[N+2]<<16)+this[N+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(N,$){return N=N>>>0,$||g(N,4,this.length),this[N]*16777216+(this[N+1]<<16|this[N+2]<<8|this[N+3])},f.prototype.readBigUInt64LE=Te(function(N){N=N>>>0,ee(N,"offset");const $=this[N],J=this[N+7];($===void 0||J===void 0)&&ue(N,this.length-8);const te=$+this[++N]*2**8+this[++N]*2**16+this[++N]*2**24,me=this[++N]+this[++N]*2**8+this[++N]*2**16+J*2**24;return BigInt(te)+(BigInt(me)<>>0,ee(N,"offset");const $=this[N],J=this[N+7];($===void 0||J===void 0)&&ue(N,this.length-8);const te=$*2**24+this[++N]*2**16+this[++N]*2**8+this[++N],me=this[++N]*2**24+this[++N]*2**16+this[++N]*2**8+J;return(BigInt(te)<>>0,$=$>>>0,J||g(N,$,this.length);let te=this[N],me=1,ne=0;for(;++ne<$&&(me*=256);)te+=this[N+ne]*me;return me*=128,te>=me&&(te-=Math.pow(2,8*$)),te},f.prototype.readIntBE=function(N,$,J){N=N>>>0,$=$>>>0,J||g(N,$,this.length);let te=$,me=1,ne=this[N+--te];for(;te>0&&(me*=256);)ne+=this[N+--te]*me;return me*=128,ne>=me&&(ne-=Math.pow(2,8*$)),ne},f.prototype.readInt8=function(N,$){return N=N>>>0,$||g(N,1,this.length),this[N]&128?(255-this[N]+1)*-1:this[N]},f.prototype.readInt16LE=function(N,$){N=N>>>0,$||g(N,2,this.length);const J=this[N]|this[N+1]<<8;return J&32768?J|4294901760:J},f.prototype.readInt16BE=function(N,$){N=N>>>0,$||g(N,2,this.length);const J=this[N+1]|this[N]<<8;return J&32768?J|4294901760:J},f.prototype.readInt32LE=function(N,$){return N=N>>>0,$||g(N,4,this.length),this[N]|this[N+1]<<8|this[N+2]<<16|this[N+3]<<24},f.prototype.readInt32BE=function(N,$){return N=N>>>0,$||g(N,4,this.length),this[N]<<24|this[N+1]<<16|this[N+2]<<8|this[N+3]},f.prototype.readBigInt64LE=Te(function(N){N=N>>>0,ee(N,"offset");const $=this[N],J=this[N+7];($===void 0||J===void 0)&&ue(N,this.length-8);const te=this[N+4]+this[N+5]*2**8+this[N+6]*2**16+(J<<24);return(BigInt(te)<>>0,ee(N,"offset");const $=this[N],J=this[N+7];($===void 0||J===void 0)&&ue(N,this.length-8);const te=($<<24)+this[++N]*2**16+this[++N]*2**8+this[++N];return(BigInt(te)<>>0,$||g(N,4,this.length),r.read(this,N,!0,23,4)},f.prototype.readFloatBE=function(N,$){return N=N>>>0,$||g(N,4,this.length),r.read(this,N,!1,23,4)},f.prototype.readDoubleLE=function(N,$){return N=N>>>0,$||g(N,8,this.length),r.read(this,N,!0,52,8)},f.prototype.readDoubleBE=function(N,$){return N=N>>>0,$||g(N,8,this.length),r.read(this,N,!1,52,8)};function M(j,N,$,J,te,me){if(!f.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>te||Nj.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(N,$,J,te){if(N=+N,$=$>>>0,J=J>>>0,!te){const we=Math.pow(2,8*J)-1;M(this,N,$,J,we,0)}let me=1,ne=0;for(this[$]=N&255;++ne>>0,J=J>>>0,!te){const we=Math.pow(2,8*J)-1;M(this,N,$,J,we,0)}let me=J-1,ne=1;for(this[$+me]=N&255;--me>=0&&(ne*=256);)this[$+me]=N/ne&255;return $+J},f.prototype.writeUint8=f.prototype.writeUInt8=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,1,255,0),this[$]=N&255,$+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,2,65535,0),this[$]=N&255,this[$+1]=N>>>8,$+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,2,65535,0),this[$]=N>>>8,this[$+1]=N&255,$+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,4,4294967295,0),this[$+3]=N>>>24,this[$+2]=N>>>16,this[$+1]=N>>>8,this[$]=N&255,$+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,4,4294967295,0),this[$]=N>>>24,this[$+1]=N>>>16,this[$+2]=N>>>8,this[$+3]=N&255,$+4};function k(j,N,$,J,te){H(N,J,te,j,$,7);let me=Number(N&BigInt(4294967295));j[$++]=me,me=me>>8,j[$++]=me,me=me>>8,j[$++]=me,me=me>>8,j[$++]=me;let ne=Number(N>>BigInt(32)&BigInt(4294967295));return j[$++]=ne,ne=ne>>8,j[$++]=ne,ne=ne>>8,j[$++]=ne,ne=ne>>8,j[$++]=ne,$}function L(j,N,$,J,te){H(N,J,te,j,$,7);let me=Number(N&BigInt(4294967295));j[$+7]=me,me=me>>8,j[$+6]=me,me=me>>8,j[$+5]=me,me=me>>8,j[$+4]=me;let ne=Number(N>>BigInt(32)&BigInt(4294967295));return j[$+3]=ne,ne=ne>>8,j[$+2]=ne,ne=ne>>8,j[$+1]=ne,ne=ne>>8,j[$]=ne,$+8}f.prototype.writeBigUInt64LE=Te(function(N,$=0){return k(this,N,$,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=Te(function(N,$=0){return L(this,N,$,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(N,$,J,te){if(N=+N,$=$>>>0,!te){const tt=Math.pow(2,8*J-1);M(this,N,$,J,tt-1,-tt)}let me=0,ne=1,we=0;for(this[$]=N&255;++me>0)-we&255;return $+J},f.prototype.writeIntBE=function(N,$,J,te){if(N=+N,$=$>>>0,!te){const tt=Math.pow(2,8*J-1);M(this,N,$,J,tt-1,-tt)}let me=J-1,ne=1,we=0;for(this[$+me]=N&255;--me>=0&&(ne*=256);)N<0&&we===0&&this[$+me+1]!==0&&(we=1),this[$+me]=(N/ne>>0)-we&255;return $+J},f.prototype.writeInt8=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,1,127,-128),N<0&&(N=255+N+1),this[$]=N&255,$+1},f.prototype.writeInt16LE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,2,32767,-32768),this[$]=N&255,this[$+1]=N>>>8,$+2},f.prototype.writeInt16BE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,2,32767,-32768),this[$]=N>>>8,this[$+1]=N&255,$+2},f.prototype.writeInt32LE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,4,2147483647,-2147483648),this[$]=N&255,this[$+1]=N>>>8,this[$+2]=N>>>16,this[$+3]=N>>>24,$+4},f.prototype.writeInt32BE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,4,2147483647,-2147483648),N<0&&(N=4294967295+N+1),this[$]=N>>>24,this[$+1]=N>>>16,this[$+2]=N>>>8,this[$+3]=N&255,$+4},f.prototype.writeBigInt64LE=Te(function(N,$=0){return k(this,N,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=Te(function(N,$=0){return L(this,N,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function R(j,N,$,J,te,me){if($+J>j.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function F(j,N,$,J,te){return N=+N,$=$>>>0,te||R(j,N,$,4),r.write(j,N,$,J,23,4),$+4}f.prototype.writeFloatLE=function(N,$,J){return F(this,N,$,!0,J)},f.prototype.writeFloatBE=function(N,$,J){return F(this,N,$,!1,J)};function z(j,N,$,J,te){return N=+N,$=$>>>0,te||R(j,N,$,8),r.write(j,N,$,J,52,8),$+8}f.prototype.writeDoubleLE=function(N,$,J){return z(this,N,$,!0,J)},f.prototype.writeDoubleBE=function(N,$,J){return z(this,N,$,!1,J)},f.prototype.copy=function(N,$,J,te){if(!f.isBuffer(N))throw new TypeError("argument should be a Buffer");if(J||(J=0),!te&&te!==0&&(te=this.length),$>=N.length&&($=N.length),$||($=0),te>0&&te=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),N.length-$>>0,J=J===void 0?this.length:J>>>0,N||(N=0);let me;if(typeof N=="number")for(me=$;me2**32?te=Q(String($)):typeof $=="bigint"&&(te=String($),($>BigInt(2)**BigInt(32)||$<-(BigInt(2)**BigInt(32)))&&(te=Q(te)),te+="n"),J+=` It must be ${N}. Received ${te}`,J},RangeError);function Q(j){let N="",$=j.length;const J=j[0]==="-"?1:0;for(;$>=J+4;$-=3)N=`_${j.slice($-3,$)}${N}`;return`${j.slice(0,$)}${N}`}function G(j,N,$){ee(N,"offset"),(j[N]===void 0||j[N+$]===void 0)&&ue(N,j.length-($+1))}function H(j,N,$,J,te,me){if(j>$||j3?N===0||N===BigInt(0)?we=`>= 0${ne} and < 2${ne} ** ${(me+1)*8}${ne}`:we=`>= -(2${ne} ** ${(me+1)*8-1}${ne}) and < 2 ** ${(me+1)*8-1}${ne}`:we=`>= ${N}${ne} and <= ${$}${ne}`,new V.ERR_OUT_OF_RANGE("value",we,j)}G(J,te,me)}function ee(j,N){if(typeof j!="number")throw new V.ERR_INVALID_ARG_TYPE(N,"number",j)}function ue(j,N,$){throw Math.floor(j)!==j?(ee(j,$),new V.ERR_OUT_OF_RANGE($||"offset","an integer",j)):N<0?new V.ERR_BUFFER_OUT_OF_BOUNDS:new V.ERR_OUT_OF_RANGE($||"offset",`>= ${$?1:0} and <= ${N}`,j)}const fe=/[^+/0-9A-Za-z-_]/g;function he(j){if(j=j.split("=")[0],j=j.trim().replace(fe,""),j.length<2)return"";for(;j.length%4!==0;)j=j+"=";return j}function He(j,N){N=N||1/0;let $;const J=j.length;let te=null;const me=[];for(let ne=0;ne55295&&$<57344){if(!te){if($>56319){(N-=3)>-1&&me.push(239,191,189);continue}else if(ne+1===J){(N-=3)>-1&&me.push(239,191,189);continue}te=$;continue}if($<56320){(N-=3)>-1&&me.push(239,191,189),te=$;continue}$=(te-55296<<10|$-56320)+65536}else te&&(N-=3)>-1&&me.push(239,191,189);if(te=null,$<128){if((N-=1)<0)break;me.push($)}else if($<2048){if((N-=2)<0)break;me.push($>>6|192,$&63|128)}else if($<65536){if((N-=3)<0)break;me.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((N-=4)<0)break;me.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return me}function be(j){const N=[];for(let $=0;$>8,te=$%256,me.push(te),me.push(J);return me}function Xe(j){return e.toByteArray(he(j))}function Ee(j,N,$,J){let te;for(te=0;te=N.length||te>=j.length);++te)N[te+$]=j[te];return te}function ye(j,N){return j instanceof N||j!=null&&j.constructor!=null&&j.constructor.name!=null&&j.constructor.name===N.name}function it(j){return j!==j}const Pe=function(){const j="0123456789abcdef",N=new Array(256);for(let $=0;$<16;++$){const J=$*16;for(let te=0;te<16;++te)N[J+te]=j[$]+j[te]}return N}();function Te(j){return typeof BigInt>"u"?lt:j}function lt(){throw new Error("BigInt not supported")}})(Rn);var hO={exports:{}},Zr=hO.exports={},ha,pa;function O4(){throw new Error("setTimeout has not been defined")}function N4(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ha=setTimeout:ha=O4}catch{ha=O4}try{typeof clearTimeout=="function"?pa=clearTimeout:pa=N4}catch{pa=N4}})();function pO(t){if(ha===setTimeout)return setTimeout(t,0);if((ha===O4||!ha)&&setTimeout)return ha=setTimeout,setTimeout(t,0);try{return ha(t,0)}catch{try{return ha.call(null,t,0)}catch{return ha.call(this,t,0)}}}function SW(t){if(pa===clearTimeout)return clearTimeout(t);if((pa===N4||!pa)&&clearTimeout)return pa=clearTimeout,clearTimeout(t);try{return pa(t)}catch{try{return pa.call(null,t)}catch{return pa.call(this,t)}}}var Sf=[],Dd=!1,ru,mv=-1;function MW(){!Dd||!ru||(Dd=!1,ru.length?Sf=ru.concat(Sf):mv=-1,Sf.length&&mO())}function mO(){if(!Dd){var t=pO(MW);Dd=!0;for(var e=Sf.length;e;){for(ru=Sf,Sf=[];++mv1)for(var r=1;ri)throw new RangeError('The value "'+j+'" is invalid for option "size"');const N=new Uint8Array(j);return Object.setPrototypeOf(N,f.prototype),N}function f(j,N,$){if(typeof j=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(j)}return d(j,N,$)}f.poolSize=8192;function d(j,N,$){if(typeof j=="string")return A(j,N);if(ArrayBuffer.isView(j))return S(j);if(j==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j);if(ye(j,ArrayBuffer)||j&&ye(j.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(j,SharedArrayBuffer)||j&&ye(j.buffer,SharedArrayBuffer)))return P(j,N,$);if(typeof j=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const J=j.valueOf&&j.valueOf();if(J!=null&&J!==j)return f.from(J,N,$);const te=I(j);if(te)return te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof j[Symbol.toPrimitive]=="function")return f.from(j[Symbol.toPrimitive]("string"),N,$);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j)}f.from=function(j,N,$){return d(j,N,$)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function p(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function b(j,N,$){return p(j),j<=0?s(j):N!==void 0?typeof $=="string"?s(j).fill(N,$):s(j).fill(N):s(j)}f.alloc=function(j,N,$){return b(j,N,$)};function v(j){return p(j),s(j<0?0:C(j)|0)}f.allocUnsafe=function(j){return v(j)},f.allocUnsafeSlow=function(j){return v(j)};function A(j,N){if((typeof N!="string"||N==="")&&(N="utf8"),!f.isEncoding(N))throw new TypeError("Unknown encoding: "+N);const $=k(j,N)|0;let J=s($);const te=J.write(j,N);return te!==$&&(J=J.slice(0,te)),J}function _(j){const N=j.length<0?0:C(j.length)|0,$=s(N);for(let J=0;J=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return j|0}function T(j){return+j!=j&&(j=0),f.alloc(+j)}f.isBuffer=function(N){return N!=null&&N._isBuffer===!0&&N!==f.prototype},f.compare=function(N,$){if(ye(N,Uint8Array)&&(N=f.from(N,N.offset,N.byteLength)),ye($,Uint8Array)&&($=f.from($,$.offset,$.byteLength)),!f.isBuffer(N)||!f.isBuffer($))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(N===$)return 0;let J=N.length,te=$.length;for(let me=0,ne=Math.min(J,te);mete.length?(f.isBuffer(ne)||(ne=f.from(ne)),ne.copy(te,me)):Uint8Array.prototype.set.call(te,ne,me);else if(f.isBuffer(ne))ne.copy(te,me);else throw new TypeError('"list" argument must be an Array of Buffers');me+=ne.length}return te};function k(j,N){if(f.isBuffer(j))return j.length;if(ArrayBuffer.isView(j)||ye(j,ArrayBuffer))return j.byteLength;if(typeof j!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof j);const $=j.length,J=arguments.length>2&&arguments[2]===!0;if(!J&&$===0)return 0;let te=!1;for(;;)switch(N){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return He(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return Xe(j).length;default:if(te)return J?-1:He(j).length;N=(""+N).toLowerCase(),te=!0}}f.byteLength=k;function O(j,N,$){let J=!1;if((N===void 0||N<0)&&(N=0),N>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0,N>>>=0,$<=N))return"";for(j||(j="utf8");;)switch(j){case"hex":return y(this,N,$);case"utf8":case"utf-8":return l(this,N,$);case"ascii":return w(this,N,$);case"latin1":case"binary":return E(this,N,$);case"base64":return u(this,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c(this,N,$);default:if(J)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),J=!0}}f.prototype._isBuffer=!0;function D(j,N,$){const J=j[N];j[N]=j[$],j[$]=J}f.prototype.swap16=function(){const N=this.length;if(N%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let $=0;$$&&(N+=" ... "),""},n&&(f.prototype[n]=f.prototype.inspect),f.prototype.compare=function(N,$,J,te,me){if(ye(N,Uint8Array)&&(N=f.from(N,N.offset,N.byteLength)),!f.isBuffer(N))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof N);if($===void 0&&($=0),J===void 0&&(J=N?N.length:0),te===void 0&&(te=0),me===void 0&&(me=this.length),$<0||J>N.length||te<0||me>this.length)throw new RangeError("out of range index");if(te>=me&&$>=J)return 0;if(te>=me)return-1;if($>=J)return 1;if($>>>=0,J>>>=0,te>>>=0,me>>>=0,this===N)return 0;let ne=me-te,we=J-$;const tt=Math.min(ne,we),ve=this.slice(te,me),Ie=N.slice($,J);for(let Qe=0;Qe2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,it($)&&($=te?0:j.length-1),$<0&&($=j.length+$),$>=j.length){if(te)return-1;$=j.length-1}else if($<0)if(te)$=0;else return-1;if(typeof N=="string"&&(N=f.from(N,J)),f.isBuffer(N))return N.length===0?-1:V(j,N,$,J,te);if(typeof N=="number")return N=N&255,typeof Uint8Array.prototype.indexOf=="function"?te?Uint8Array.prototype.indexOf.call(j,N,$):Uint8Array.prototype.lastIndexOf.call(j,N,$):V(j,[N],$,J,te);throw new TypeError("val must be string, number or Buffer")}function V(j,N,$,J,te){let me=1,ne=j.length,we=N.length;if(J!==void 0&&(J=String(J).toLowerCase(),J==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(j.length<2||N.length<2)return-1;me=2,ne/=2,we/=2,$/=2}function tt(Ie,Qe){return me===1?Ie[Qe]:Ie.readUInt16BE(Qe*me)}let ve;if(te){let Ie=-1;for(ve=$;vene&&($=ne-we),ve=$;ve>=0;ve--){let Ie=!0;for(let Qe=0;Qete&&(J=te)):J=te;const me=N.length;J>me/2&&(J=me/2);let ne;for(ne=0;ne>>0,isFinite(J)?(J=J>>>0,te===void 0&&(te="utf8")):(te=J,J=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const me=this.length-$;if((J===void 0||J>me)&&(J=me),N.length>0&&(J<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");let ne=!1;for(;;)switch(te){case"hex":return Y(this,N,$,J);case"utf8":case"utf-8":return W(this,N,$,J);case"ascii":case"latin1":case"binary":return ie(this,N,$,J);case"base64":return x(this,N,$,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,N,$,J);default:if(ne)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),ne=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function u(j,N,$){return N===0&&$===j.length?e.fromByteArray(j):e.fromByteArray(j.slice(N,$))}function l(j,N,$){$=Math.min(j.length,$);const J=[];let te=N;for(;te<$;){const me=j[te];let ne=null,we=me>239?4:me>223?3:me>191?2:1;if(te+we<=$){let tt,ve,Ie,Qe;switch(we){case 1:me<128&&(ne=me);break;case 2:tt=j[te+1],(tt&192)===128&&(Qe=(me&31)<<6|tt&63,Qe>127&&(ne=Qe));break;case 3:tt=j[te+1],ve=j[te+2],(tt&192)===128&&(ve&192)===128&&(Qe=(me&15)<<12|(tt&63)<<6|ve&63,Qe>2047&&(Qe<55296||Qe>57343)&&(ne=Qe));break;case 4:tt=j[te+1],ve=j[te+2],Ie=j[te+3],(tt&192)===128&&(ve&192)===128&&(Ie&192)===128&&(Qe=(me&15)<<18|(tt&63)<<12|(ve&63)<<6|Ie&63,Qe>65535&&Qe<1114112&&(ne=Qe))}}ne===null?(ne=65533,we=1):ne>65535&&(ne-=65536,J.push(ne>>>10&1023|55296),ne=56320|ne&1023),J.push(ne),te+=we}return m(J)}const h=4096;function m(j){const N=j.length;if(N<=h)return String.fromCharCode.apply(String,j);let $="",J=0;for(;JJ)&&($=J);let te="";for(let me=N;me<$;++me)te+=Pe[j[me]];return te}function c(j,N,$){const J=j.slice(N,$);let te="";for(let me=0;meJ&&(N=J),$<0?($+=J,$<0&&($=0)):$>J&&($=J),$$)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(N,$,J){N=N>>>0,$=$>>>0,J||g(N,$,this.length);let te=this[N],me=1,ne=0;for(;++ne<$&&(me*=256);)te+=this[N+ne]*me;return te},f.prototype.readUintBE=f.prototype.readUIntBE=function(N,$,J){N=N>>>0,$=$>>>0,J||g(N,$,this.length);let te=this[N+--$],me=1;for(;$>0&&(me*=256);)te+=this[N+--$]*me;return te},f.prototype.readUint8=f.prototype.readUInt8=function(N,$){return N=N>>>0,$||g(N,1,this.length),this[N]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(N,$){return N=N>>>0,$||g(N,2,this.length),this[N]|this[N+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(N,$){return N=N>>>0,$||g(N,2,this.length),this[N]<<8|this[N+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(N,$){return N=N>>>0,$||g(N,4,this.length),(this[N]|this[N+1]<<8|this[N+2]<<16)+this[N+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(N,$){return N=N>>>0,$||g(N,4,this.length),this[N]*16777216+(this[N+1]<<16|this[N+2]<<8|this[N+3])},f.prototype.readBigUInt64LE=Te(function(N){N=N>>>0,ee(N,"offset");const $=this[N],J=this[N+7];($===void 0||J===void 0)&&ue(N,this.length-8);const te=$+this[++N]*2**8+this[++N]*2**16+this[++N]*2**24,me=this[++N]+this[++N]*2**8+this[++N]*2**16+J*2**24;return BigInt(te)+(BigInt(me)<>>0,ee(N,"offset");const $=this[N],J=this[N+7];($===void 0||J===void 0)&&ue(N,this.length-8);const te=$*2**24+this[++N]*2**16+this[++N]*2**8+this[++N],me=this[++N]*2**24+this[++N]*2**16+this[++N]*2**8+J;return(BigInt(te)<>>0,$=$>>>0,J||g(N,$,this.length);let te=this[N],me=1,ne=0;for(;++ne<$&&(me*=256);)te+=this[N+ne]*me;return me*=128,te>=me&&(te-=Math.pow(2,8*$)),te},f.prototype.readIntBE=function(N,$,J){N=N>>>0,$=$>>>0,J||g(N,$,this.length);let te=$,me=1,ne=this[N+--te];for(;te>0&&(me*=256);)ne+=this[N+--te]*me;return me*=128,ne>=me&&(ne-=Math.pow(2,8*$)),ne},f.prototype.readInt8=function(N,$){return N=N>>>0,$||g(N,1,this.length),this[N]&128?(255-this[N]+1)*-1:this[N]},f.prototype.readInt16LE=function(N,$){N=N>>>0,$||g(N,2,this.length);const J=this[N]|this[N+1]<<8;return J&32768?J|4294901760:J},f.prototype.readInt16BE=function(N,$){N=N>>>0,$||g(N,2,this.length);const J=this[N+1]|this[N]<<8;return J&32768?J|4294901760:J},f.prototype.readInt32LE=function(N,$){return N=N>>>0,$||g(N,4,this.length),this[N]|this[N+1]<<8|this[N+2]<<16|this[N+3]<<24},f.prototype.readInt32BE=function(N,$){return N=N>>>0,$||g(N,4,this.length),this[N]<<24|this[N+1]<<16|this[N+2]<<8|this[N+3]},f.prototype.readBigInt64LE=Te(function(N){N=N>>>0,ee(N,"offset");const $=this[N],J=this[N+7];($===void 0||J===void 0)&&ue(N,this.length-8);const te=this[N+4]+this[N+5]*2**8+this[N+6]*2**16+(J<<24);return(BigInt(te)<>>0,ee(N,"offset");const $=this[N],J=this[N+7];($===void 0||J===void 0)&&ue(N,this.length-8);const te=($<<24)+this[++N]*2**16+this[++N]*2**8+this[++N];return(BigInt(te)<>>0,$||g(N,4,this.length),r.read(this,N,!0,23,4)},f.prototype.readFloatBE=function(N,$){return N=N>>>0,$||g(N,4,this.length),r.read(this,N,!1,23,4)},f.prototype.readDoubleLE=function(N,$){return N=N>>>0,$||g(N,8,this.length),r.read(this,N,!0,52,8)},f.prototype.readDoubleBE=function(N,$){return N=N>>>0,$||g(N,8,this.length),r.read(this,N,!1,52,8)};function M(j,N,$,J,te,me){if(!f.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>te||Nj.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(N,$,J,te){if(N=+N,$=$>>>0,J=J>>>0,!te){const we=Math.pow(2,8*J)-1;M(this,N,$,J,we,0)}let me=1,ne=0;for(this[$]=N&255;++ne>>0,J=J>>>0,!te){const we=Math.pow(2,8*J)-1;M(this,N,$,J,we,0)}let me=J-1,ne=1;for(this[$+me]=N&255;--me>=0&&(ne*=256);)this[$+me]=N/ne&255;return $+J},f.prototype.writeUint8=f.prototype.writeUInt8=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,1,255,0),this[$]=N&255,$+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,2,65535,0),this[$]=N&255,this[$+1]=N>>>8,$+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,2,65535,0),this[$]=N>>>8,this[$+1]=N&255,$+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,4,4294967295,0),this[$+3]=N>>>24,this[$+2]=N>>>16,this[$+1]=N>>>8,this[$]=N&255,$+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,4,4294967295,0),this[$]=N>>>24,this[$+1]=N>>>16,this[$+2]=N>>>8,this[$+3]=N&255,$+4};function B(j,N,$,J,te){H(N,J,te,j,$,7);let me=Number(N&BigInt(4294967295));j[$++]=me,me=me>>8,j[$++]=me,me=me>>8,j[$++]=me,me=me>>8,j[$++]=me;let ne=Number(N>>BigInt(32)&BigInt(4294967295));return j[$++]=ne,ne=ne>>8,j[$++]=ne,ne=ne>>8,j[$++]=ne,ne=ne>>8,j[$++]=ne,$}function L(j,N,$,J,te){H(N,J,te,j,$,7);let me=Number(N&BigInt(4294967295));j[$+7]=me,me=me>>8,j[$+6]=me,me=me>>8,j[$+5]=me,me=me>>8,j[$+4]=me;let ne=Number(N>>BigInt(32)&BigInt(4294967295));return j[$+3]=ne,ne=ne>>8,j[$+2]=ne,ne=ne>>8,j[$+1]=ne,ne=ne>>8,j[$]=ne,$+8}f.prototype.writeBigUInt64LE=Te(function(N,$=0){return B(this,N,$,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=Te(function(N,$=0){return L(this,N,$,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(N,$,J,te){if(N=+N,$=$>>>0,!te){const tt=Math.pow(2,8*J-1);M(this,N,$,J,tt-1,-tt)}let me=0,ne=1,we=0;for(this[$]=N&255;++me>0)-we&255;return $+J},f.prototype.writeIntBE=function(N,$,J,te){if(N=+N,$=$>>>0,!te){const tt=Math.pow(2,8*J-1);M(this,N,$,J,tt-1,-tt)}let me=J-1,ne=1,we=0;for(this[$+me]=N&255;--me>=0&&(ne*=256);)N<0&&we===0&&this[$+me+1]!==0&&(we=1),this[$+me]=(N/ne>>0)-we&255;return $+J},f.prototype.writeInt8=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,1,127,-128),N<0&&(N=255+N+1),this[$]=N&255,$+1},f.prototype.writeInt16LE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,2,32767,-32768),this[$]=N&255,this[$+1]=N>>>8,$+2},f.prototype.writeInt16BE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,2,32767,-32768),this[$]=N>>>8,this[$+1]=N&255,$+2},f.prototype.writeInt32LE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,4,2147483647,-2147483648),this[$]=N&255,this[$+1]=N>>>8,this[$+2]=N>>>16,this[$+3]=N>>>24,$+4},f.prototype.writeInt32BE=function(N,$,J){return N=+N,$=$>>>0,J||M(this,N,$,4,2147483647,-2147483648),N<0&&(N=4294967295+N+1),this[$]=N>>>24,this[$+1]=N>>>16,this[$+2]=N>>>8,this[$+3]=N&255,$+4},f.prototype.writeBigInt64LE=Te(function(N,$=0){return B(this,N,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=Te(function(N,$=0){return L(this,N,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function R(j,N,$,J,te,me){if($+J>j.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function F(j,N,$,J,te){return N=+N,$=$>>>0,te||R(j,N,$,4),r.write(j,N,$,J,23,4),$+4}f.prototype.writeFloatLE=function(N,$,J){return F(this,N,$,!0,J)},f.prototype.writeFloatBE=function(N,$,J){return F(this,N,$,!1,J)};function z(j,N,$,J,te){return N=+N,$=$>>>0,te||R(j,N,$,8),r.write(j,N,$,J,52,8),$+8}f.prototype.writeDoubleLE=function(N,$,J){return z(this,N,$,!0,J)},f.prototype.writeDoubleBE=function(N,$,J){return z(this,N,$,!1,J)},f.prototype.copy=function(N,$,J,te){if(!f.isBuffer(N))throw new TypeError("argument should be a Buffer");if(J||(J=0),!te&&te!==0&&(te=this.length),$>=N.length&&($=N.length),$||($=0),te>0&&te=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),N.length-$>>0,J=J===void 0?this.length:J>>>0,N||(N=0);let me;if(typeof N=="number")for(me=$;me2**32?te=Q(String($)):typeof $=="bigint"&&(te=String($),($>BigInt(2)**BigInt(32)||$<-(BigInt(2)**BigInt(32)))&&(te=Q(te)),te+="n"),J+=` It must be ${N}. Received ${te}`,J},RangeError);function Q(j){let N="",$=j.length;const J=j[0]==="-"?1:0;for(;$>=J+4;$-=3)N=`_${j.slice($-3,$)}${N}`;return`${j.slice(0,$)}${N}`}function G(j,N,$){ee(N,"offset"),(j[N]===void 0||j[N+$]===void 0)&&ue(N,j.length-($+1))}function H(j,N,$,J,te,me){if(j>$||j3?N===0||N===BigInt(0)?we=`>= 0${ne} and < 2${ne} ** ${(me+1)*8}${ne}`:we=`>= -(2${ne} ** ${(me+1)*8-1}${ne}) and < 2 ** ${(me+1)*8-1}${ne}`:we=`>= ${N}${ne} and <= ${$}${ne}`,new K.ERR_OUT_OF_RANGE("value",we,j)}G(J,te,me)}function ee(j,N){if(typeof j!="number")throw new K.ERR_INVALID_ARG_TYPE(N,"number",j)}function ue(j,N,$){throw Math.floor(j)!==j?(ee(j,$),new K.ERR_OUT_OF_RANGE($||"offset","an integer",j)):N<0?new K.ERR_BUFFER_OUT_OF_BOUNDS:new K.ERR_OUT_OF_RANGE($||"offset",`>= ${$?1:0} and <= ${N}`,j)}const fe=/[^+/0-9A-Za-z-_]/g;function he(j){if(j=j.split("=")[0],j=j.trim().replace(fe,""),j.length<2)return"";for(;j.length%4!==0;)j=j+"=";return j}function He(j,N){N=N||1/0;let $;const J=j.length;let te=null;const me=[];for(let ne=0;ne55295&&$<57344){if(!te){if($>56319){(N-=3)>-1&&me.push(239,191,189);continue}else if(ne+1===J){(N-=3)>-1&&me.push(239,191,189);continue}te=$;continue}if($<56320){(N-=3)>-1&&me.push(239,191,189),te=$;continue}$=(te-55296<<10|$-56320)+65536}else te&&(N-=3)>-1&&me.push(239,191,189);if(te=null,$<128){if((N-=1)<0)break;me.push($)}else if($<2048){if((N-=2)<0)break;me.push($>>6|192,$&63|128)}else if($<65536){if((N-=3)<0)break;me.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((N-=4)<0)break;me.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return me}function be(j){const N=[];for(let $=0;$>8,te=$%256,me.push(te),me.push(J);return me}function Xe(j){return e.toByteArray(he(j))}function Ee(j,N,$,J){let te;for(te=0;te=N.length||te>=j.length);++te)N[te+$]=j[te];return te}function ye(j,N){return j instanceof N||j!=null&&j.constructor!=null&&j.constructor.name!=null&&j.constructor.name===N.name}function it(j){return j!==j}const Pe=function(){const j="0123456789abcdef",N=new Array(256);for(let $=0;$<16;++$){const J=$*16;for(let te=0;te<16;++te)N[J+te]=j[$]+j[te]}return N}();function Te(j){return typeof BigInt>"u"?lt:j}function lt(){throw new Error("BigInt not supported")}})(Rn);var hO={exports:{}},Zr=hO.exports={},ha,pa;function O4(){throw new Error("setTimeout has not been defined")}function N4(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ha=setTimeout:ha=O4}catch{ha=O4}try{typeof clearTimeout=="function"?pa=clearTimeout:pa=N4}catch{pa=N4}})();function pO(t){if(ha===setTimeout)return setTimeout(t,0);if((ha===O4||!ha)&&setTimeout)return ha=setTimeout,setTimeout(t,0);try{return ha(t,0)}catch{try{return ha.call(null,t,0)}catch{return ha.call(this,t,0)}}}function SW(t){if(pa===clearTimeout)return clearTimeout(t);if((pa===N4||!pa)&&clearTimeout)return pa=clearTimeout,clearTimeout(t);try{return pa(t)}catch{try{return pa.call(null,t)}catch{return pa.call(this,t)}}}var Sf=[],Dd=!1,ru,mv=-1;function MW(){!Dd||!ru||(Dd=!1,ru.length?Sf=ru.concat(Sf):mv=-1,Sf.length&&mO())}function mO(){if(!Dd){var t=pO(MW);Dd=!0;for(var e=Sf.length;e;){for(ru=Sf,Sf=[];++mv1)for(var r=1;re in t?hW(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var lb=Symbol.for("react.element"),PW=Symbol.for("react.portal"),CW=Symbol.for("react.fragment"),IW=Symbol.for("react.strict_mode"),TW=Symbol.for("react.profiler"),RW=Symbol.for("react.provider"),kW=Symbol.for("react.context"),BW=Symbol.for("react.forward_ref"),OW=Symbol.for("react.suspense"),NW=Symbol.for("react.memo"),LW=Symbol.for("react.lazy"),DP=Symbol.iterator;function DW(t){return t===null||typeof t!="object"?null:(t=DP&&t[DP]||t["@@iterator"],typeof t=="function"?t:null)}var wO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xO=Object.assign,EO={};function Jp(t,e,r){this.props=t,this.context=e,this.refs=EO,this.updater=r||wO}Jp.prototype.isReactComponent={};Jp.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Jp.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function AO(){}AO.prototype=Jp.prototype;function NE(t,e,r){this.props=t,this.context=e,this.refs=EO,this.updater=r||wO}var LE=NE.prototype=new AO;LE.constructor=NE;xO(LE,Jp.prototype);LE.isPureReactComponent=!0;var FP=Array.isArray,SO=Object.prototype.hasOwnProperty,DE={current:null},MO={key:!0,ref:!0,__self:!0,__source:!0};function _O(t,e,r){var n,i={},o=null,s=null;if(e!=null)for(n in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)SO.call(e,n)&&!MO.hasOwnProperty(n)&&(i[n]=e[n]);var f=arguments.length-2;if(f===1)i.children=r;else if(1e in t?hW(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(E,y){var c=E.length;E.push(y);e:for(;0>>1,M=E[g];if(0>>1;gi(R,c))Fi(z,R)?(E[g]=z,E[F]=c,g=F):(E[g]=R,E[L]=c,g=L);else if(Fi(z,c))E[g]=z,E[F]=c,g=F;else break e}}return y}function i(E,y){var c=E.sortIndex-y.sortIndex;return c!==0?c:E.id-y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,f=s.now();t.unstable_now=function(){return s.now()-f}}var d=[],p=[],b=1,v=null,A=3,_=!1,S=!1,P=!1,I=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(E){for(var y=r(p);y!==null;){if(y.callback===null)n(p);else if(y.startTime<=E)n(p),y.sortIndex=y.expirationTime,e(d,y);else break;y=r(p)}}function B(E){if(P=!1,O(E),!S)if(r(d)!==null)S=!0,m(D);else{var y=r(p);y!==null&&w(B,y.startTime-E)}}function D(E,y){S=!1,P&&(P=!1,C(Y),Y=-1),_=!0;var c=A;try{for(O(y),v=r(d);v!==null&&(!(v.expirationTime>y)||E&&!x());){var g=v.callback;if(typeof g=="function"){v.callback=null,A=v.priorityLevel;var M=g(v.expirationTime<=y);y=t.unstable_now(),typeof M=="function"?v.callback=M:v===r(d)&&n(d),O(y)}else n(d);v=r(d)}if(v!==null)var k=!0;else{var L=r(p);L!==null&&w(B,L.startTime-y),k=!1}return k}finally{v=null,A=c,_=!1}}var U=!1,K=null,Y=-1,W=5,ie=-1;function x(){return!(t.unstable_now()-ieE||125g?(E.sortIndex=c,e(p,E),r(d)===null&&E===r(p)&&(P?(C(Y),Y=-1):P=!0,w(B,c-g))):(E.sortIndex=M,e(d,E),S||_||(S=!0,m(D))),E},t.unstable_shouldYield=x,t.unstable_wrapCallback=function(E){var y=A;return function(){var c=A;A=y;try{return E.apply(this,arguments)}finally{A=c}}}})(TO);IO.exports=TO;var WW=IO.exports;/** + */(function(t){function e(E,y){var c=E.length;E.push(y);e:for(;0>>1,M=E[g];if(0>>1;gi(R,c))Fi(z,R)?(E[g]=z,E[F]=c,g=F):(E[g]=R,E[L]=c,g=L);else if(Fi(z,c))E[g]=z,E[F]=c,g=F;else break e}}return y}function i(E,y){var c=E.sortIndex-y.sortIndex;return c!==0?c:E.id-y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,f=s.now();t.unstable_now=function(){return s.now()-f}}var d=[],p=[],b=1,v=null,A=3,_=!1,S=!1,P=!1,I=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(E){for(var y=r(p);y!==null;){if(y.callback===null)n(p);else if(y.startTime<=E)n(p),y.sortIndex=y.expirationTime,e(d,y);else break;y=r(p)}}function O(E){if(P=!1,k(E),!S)if(r(d)!==null)S=!0,m(D);else{var y=r(p);y!==null&&w(O,y.startTime-E)}}function D(E,y){S=!1,P&&(P=!1,C(Y),Y=-1),_=!0;var c=A;try{for(k(y),v=r(d);v!==null&&(!(v.expirationTime>y)||E&&!x());){var g=v.callback;if(typeof g=="function"){v.callback=null,A=v.priorityLevel;var M=g(v.expirationTime<=y);y=t.unstable_now(),typeof M=="function"?v.callback=M:v===r(d)&&n(d),k(y)}else n(d);v=r(d)}if(v!==null)var B=!0;else{var L=r(p);L!==null&&w(O,L.startTime-y),B=!1}return B}finally{v=null,A=c,_=!1}}var U=!1,V=null,Y=-1,W=5,ie=-1;function x(){return!(t.unstable_now()-ieE||125g?(E.sortIndex=c,e(p,E),r(d)===null&&E===r(p)&&(P?(C(Y),Y=-1):P=!0,w(O,c-g))):(E.sortIndex=M,e(d,E),S||_||(S=!0,m(D))),E},t.unstable_shouldYield=x,t.unstable_wrapCallback=function(E){var y=A;return function(){var c=A;A=y;try{return E.apply(this,arguments)}finally{A=c}}}})(TO);IO.exports=TO;var WW=IO.exports;/** * @license React * react-dom.production.min.js * @@ -35,14 +35,14 @@ var hW=Object.defineProperty;var pW=(t,e,r)=>e in t?hW(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var RO=Z,fo=WW;function Ve(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),D4=Object.prototype.hasOwnProperty,JW=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,UP={},zP={};function ZW(t){return D4.call(zP,t)?!0:D4.call(UP,t)?!1:JW.test(t)?zP[t]=!0:(UP[t]=!0,!1)}function YW(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function QW(t,e,r,n){if(e===null||typeof e>"u"||YW(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function gi(t,e,r,n,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Tn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Tn[t]=new gi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Tn[e]=new gi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Tn[t]=new gi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Tn[t]=new gi(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Tn[t]=new gi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Tn[t]=new gi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Tn[t]=new gi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Tn[t]=new gi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Tn[t]=new gi(t,5,!1,t.toLowerCase(),null,!1,!1)});var UE=/[\-:]([a-z])/g;function zE(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(UE,zE);Tn[e]=new gi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(UE,zE);Tn[e]=new gi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(UE,zE);Tn[e]=new gi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Tn[t]=new gi(t,1,!1,t.toLowerCase(),null,!1,!1)});Tn.xlinkHref=new gi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Tn[t]=new gi(t,1,!1,t.toLowerCase(),null,!0,!0)});function jE(t,e,r,n){var i=Tn.hasOwnProperty(e)?Tn[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),D4=Object.prototype.hasOwnProperty,JW=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,UP={},zP={};function ZW(t){return D4.call(zP,t)?!0:D4.call(UP,t)?!1:JW.test(t)?zP[t]=!0:(UP[t]=!0,!1)}function YW(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function QW(t,e,r,n){if(e===null||typeof e>"u"||YW(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function gi(t,e,r,n,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Tn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Tn[t]=new gi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Tn[e]=new gi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Tn[t]=new gi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Tn[t]=new gi(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Tn[t]=new gi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Tn[t]=new gi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Tn[t]=new gi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Tn[t]=new gi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Tn[t]=new gi(t,5,!1,t.toLowerCase(),null,!1,!1)});var UE=/[\-:]([a-z])/g;function zE(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(UE,zE);Tn[e]=new gi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(UE,zE);Tn[e]=new gi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(UE,zE);Tn[e]=new gi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Tn[t]=new gi(t,1,!1,t.toLowerCase(),null,!1,!1)});Tn.xlinkHref=new gi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Tn[t]=new gi(t,1,!1,t.toLowerCase(),null,!0,!0)});function jE(t,e,r,n){var i=Tn.hasOwnProperty(e)?Tn[e]:null;(i!==null?i.type!==0:n||!(2f||i[s]!==o[f]){var d=` -`+i[s].replace(" at new "," at ");return t.displayName&&d.includes("")&&(d=d.replace("",t.displayName)),d}while(1<=s&&0<=f);break}}}finally{d3=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?fm(t):""}function XW(t){switch(t.tag){case 5:return fm(t.type);case 16:return fm("Lazy");case 13:return fm("Suspense");case 19:return fm("SuspenseList");case 0:case 2:case 15:return t=h3(t.type,!1),t;case 11:return t=h3(t.type.render,!1),t;case 1:return t=h3(t.type,!0),t;default:return""}}function z4(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case hd:return"Fragment";case dd:return"Portal";case F4:return"Profiler";case HE:return"StrictMode";case $4:return"Suspense";case U4:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case OO:return(t.displayName||"Context")+".Consumer";case BO:return(t._context.displayName||"Context")+".Provider";case qE:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case GE:return e=t.displayName||null,e!==null?e:z4(t.type)||"Memo";case Ac:e=t._payload,t=t._init;try{return z4(t(e))}catch{}}return null}function eJ(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return z4(e);case 8:return e===HE?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function p0(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function LO(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function tJ(t){var e=LO(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function xy(t){t._valueTracker||(t._valueTracker=tJ(t))}function DO(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=LO(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function b2(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function j4(t,e){var r=e.checked;return kr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function HP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=p0(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function FO(t,e){e=e.checked,e!=null&&jE(t,"checked",e,!1)}function H4(t,e){FO(t,e);var r=p0(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?q4(t,e.type,r):e.hasOwnProperty("defaultValue")&&q4(t,e.type,p0(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function qP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function q4(t,e,r){(e!=="number"||b2(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var cm=Array.isArray;function Fd(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Ey.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Wm(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Am={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rJ=["Webkit","ms","Moz","O"];Object.keys(Am).forEach(function(t){rJ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Am[e]=Am[t]})});function jO(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Am.hasOwnProperty(t)&&Am[t]?(""+e).trim():e+"px"}function HO(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=jO(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var nJ=kr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function K4(t,e){if(e){if(nJ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ve(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ve(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ve(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ve(62))}}function W4(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var J4=null;function VE(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Z4=null,$d=null,Ud=null;function KP(t){if(t=pb(t)){if(typeof Z4!="function")throw Error(Ve(280));var e=t.stateNode;e&&(e=A5(e),Z4(t.stateNode,t.type,e))}}function qO(t){$d?Ud?Ud.push(t):Ud=[t]:$d=t}function GO(){if($d){var t=$d,e=Ud;if(Ud=$d=null,KP(t),e)for(t=0;t>>=0,t===0?32:31-(pJ(t)/mJ|0)|0}var Ay=64,Sy=4194304;function um(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function x2(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,s=r&268435455;if(s!==0){var f=s&~i;f!==0?n=um(f):(o&=s,o!==0&&(n=um(o)))}else s=r&~i,s!==0?n=um(s):o!==0&&(n=um(o));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function db(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fs(e),t[e]=r}function vJ(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=Mm),rC=String.fromCharCode(32),nC=!1;function lN(t,e){switch(t){case"keyup":return KJ.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dN(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var pd=!1;function JJ(t,e){switch(t){case"compositionend":return dN(e);case"keypress":return e.which!==32?null:(nC=!0,rC);case"textInput":return t=e.data,t===rC&&nC?null:t;default:return null}}function ZJ(t,e){if(pd)return t==="compositionend"||!eA&&lN(t,e)?(t=cN(),vv=YE=Kc=null,pd=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=aC(r)}}function gN(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?gN(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function bN(){for(var t=window,e=b2();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=b2(t.document)}return e}function tA(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function oZ(t){var e=bN(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&gN(r.ownerDocument.documentElement,r)){if(n!==null&&tA(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=fC(r,o);var s=fC(r,n);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,md=null,r9=null,Pm=null,n9=!1;function cC(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;n9||md==null||md!==b2(n)||(n=md,"selectionStart"in n&&tA(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Pm&&eg(Pm,n)||(Pm=n,n=S2(r9,"onSelect"),0yd||(t.current=c9[yd],c9[yd]=null,yd--)}function mr(t,e){yd++,c9[yd]=t.current,t.current=e}var m0={},Xn=k0(m0),ki=k0(!1),Wu=m0;function Jh(t,e){var r=t.type.contextTypes;if(!r)return m0;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Bi(t){return t=t.childContextTypes,t!=null}function _2(){wr(ki),wr(Xn)}function gC(t,e,r){if(Xn.current!==m0)throw Error(Ve(168));mr(Xn,e),mr(ki,r)}function _N(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(Ve(108,eJ(t)||"Unknown",i));return kr({},r,n)}function P2(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||m0,Wu=Xn.current,mr(Xn,t),mr(ki,ki.current),!0}function bC(t,e,r){var n=t.stateNode;if(!n)throw Error(Ve(169));r?(t=_N(t,e,Wu),n.__reactInternalMemoizedMergedChildContext=t,wr(ki),wr(Xn),mr(Xn,t)):wr(ki),mr(ki,r)}var of=null,S5=!1,P3=!1;function PN(t){of===null?of=[t]:of.push(t)}function bZ(t){S5=!0,PN(t)}function B0(){if(!P3&&of!==null){P3=!0;var t=0,e=er;try{var r=of;for(er=1;t>=s,i-=s,Mf=1<<32-Fs(e)+i|r<Y?(W=K,K=null):W=K.sibling;var ie=A(C,K,O[Y],B);if(ie===null){K===null&&(K=W);break}t&&K&&ie.alternate===null&&e(C,K),T=o(ie,T,Y),U===null?D=ie:U.sibling=ie,U=ie,K=W}if(Y===O.length)return r(C,K),Er&&Z0(C,Y),D;if(K===null){for(;YY?(W=K,K=null):W=K.sibling;var x=A(C,K,ie.value,B);if(x===null){K===null&&(K=W);break}t&&K&&x.alternate===null&&e(C,K),T=o(x,T,Y),U===null?D=x:U.sibling=x,U=x,K=W}if(ie.done)return r(C,K),Er&&Z0(C,Y),D;if(K===null){for(;!ie.done;Y++,ie=O.next())ie=v(C,ie.value,B),ie!==null&&(T=o(ie,T,Y),U===null?D=ie:U.sibling=ie,U=ie);return Er&&Z0(C,Y),D}for(K=n(C,K);!ie.done;Y++,ie=O.next())ie=_(K,C,Y,ie.value,B),ie!==null&&(t&&ie.alternate!==null&&K.delete(ie.key===null?Y:ie.key),T=o(ie,T,Y),U===null?D=ie:U.sibling=ie,U=ie);return t&&K.forEach(function(a){return e(C,a)}),Er&&Z0(C,Y),D}function I(C,T,O,B){if(typeof O=="object"&&O!==null&&O.type===hd&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case wy:e:{for(var D=O.key,U=T;U!==null;){if(U.key===D){if(D=O.type,D===hd){if(U.tag===7){r(C,U.sibling),T=i(U,O.props.children),T.return=C,C=T;break e}}else if(U.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Ac&&SC(D)===U.type){r(C,U.sibling),T=i(U,O.props),T.ref=O1(C,U,O),T.return=C,C=T;break e}r(C,U);break}else e(C,U);U=U.sibling}O.type===hd?(T=Nu(O.props.children,C.mode,B,O.key),T.return=C,C=T):(B=Pv(O.type,O.key,O.props,null,C.mode,B),B.ref=O1(C,T,O),B.return=C,C=B)}return s(C);case dd:e:{for(U=O.key;T!==null;){if(T.key===U)if(T.tag===4&&T.stateNode.containerInfo===O.containerInfo&&T.stateNode.implementation===O.implementation){r(C,T.sibling),T=i(T,O.children||[]),T.return=C,C=T;break e}else{r(C,T);break}else e(C,T);T=T.sibling}T=N3(O,C.mode,B),T.return=C,C=T}return s(C);case Ac:return U=O._init,I(C,T,U(O._payload),B)}if(cm(O))return S(C,T,O,B);if(I1(O))return P(C,T,O,B);Ry(C,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,T!==null&&T.tag===6?(r(C,T.sibling),T=i(T,O),T.return=C,C=T):(r(C,T),T=O3(O,C.mode,B),T.return=C,C=T),s(C)):r(C,T)}return I}var Yh=NN(!0),LN=NN(!1),mb={},Ra=k0(mb),ig=k0(mb),og=k0(mb);function ou(t){if(t===mb)throw Error(Ve(174));return t}function uA(t,e){switch(mr(og,e),mr(ig,t),mr(Ra,mb),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:V4(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=V4(e,t)}wr(Ra),mr(Ra,e)}function Qh(){wr(Ra),wr(ig),wr(og)}function DN(t){ou(og.current);var e=ou(Ra.current),r=V4(e,t.type);e!==r&&(mr(ig,t),mr(Ra,r))}function lA(t){ig.current===t&&(wr(Ra),wr(ig))}var Pr=k0(0);function B2(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var C3=[];function dA(){for(var t=0;tr?r:4,t(!0);var n=I3.transition;I3.transition={};try{t(!1),e()}finally{er=r,I3.transition=n}}function XN(){return qo().memoizedState}function xZ(t,e,r){var n=o0(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},eL(t))tL(e,r);else if(r=RN(t,e,r,n),r!==null){var i=fi();$s(r,t,n,i),rL(r,e,n)}}function EZ(t,e,r){var n=o0(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(eL(t))tL(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,f=o(s,r);if(i.hasEagerState=!0,i.eagerState=f,Gs(f,s)){var d=e.interleaved;d===null?(i.next=i,fA(e)):(i.next=d.next,d.next=i),e.interleaved=i;return}}catch{}finally{}r=RN(t,e,i,n),r!==null&&(i=fi(),$s(r,t,n,i),rL(r,e,n))}}function eL(t){var e=t.alternate;return t===Rr||e!==null&&e===Rr}function tL(t,e){Cm=O2=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function rL(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,WE(t,r)}}var N2={readContext:Ho,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},AZ={readContext:Ho,useCallback:function(t,e){return da().memoizedState=[t,e===void 0?null:e],t},useContext:Ho,useEffect:_C,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Av(4194308,4,WN.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Av(4194308,4,t,e)},useInsertionEffect:function(t,e){return Av(4,2,t,e)},useMemo:function(t,e){var r=da();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=da();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=xZ.bind(null,Rr,t),[n.memoizedState,t]},useRef:function(t){var e=da();return t={current:t},e.memoizedState=t},useState:MC,useDebugValue:bA,useDeferredValue:function(t){return da().memoizedState=t},useTransition:function(){var t=MC(!1),e=t[0];return t=wZ.bind(null,t[1]),da().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Rr,i=da();if(Er){if(r===void 0)throw Error(Ve(407));r=r()}else{if(r=e(),yn===null)throw Error(Ve(349));Zu&30||UN(n,e,r)}i.memoizedState=r;var o={value:r,getSnapshot:e};return i.queue=o,_C(jN.bind(null,n,o,t),[t]),n.flags|=2048,fg(9,zN.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=da(),e=yn.identifierPrefix;if(Er){var r=_f,n=Mf;r=(n&~(1<<32-Fs(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=sg++,0")&&(d=d.replace("",t.displayName)),d}while(1<=s&&0<=f);break}}}finally{d3=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?cm(t):""}function XW(t){switch(t.tag){case 5:return cm(t.type);case 16:return cm("Lazy");case 13:return cm("Suspense");case 19:return cm("SuspenseList");case 0:case 2:case 15:return t=h3(t.type,!1),t;case 11:return t=h3(t.type.render,!1),t;case 1:return t=h3(t.type,!0),t;default:return""}}function z4(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case hd:return"Fragment";case dd:return"Portal";case F4:return"Profiler";case HE:return"StrictMode";case $4:return"Suspense";case U4:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case OO:return(t.displayName||"Context")+".Consumer";case BO:return(t._context.displayName||"Context")+".Provider";case qE:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case GE:return e=t.displayName||null,e!==null?e:z4(t.type)||"Memo";case Ac:e=t._payload,t=t._init;try{return z4(t(e))}catch{}}return null}function eJ(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return z4(e);case 8:return e===HE?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function p0(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function LO(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function tJ(t){var e=LO(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function xy(t){t._valueTracker||(t._valueTracker=tJ(t))}function DO(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=LO(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function b2(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function j4(t,e){var r=e.checked;return kr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function HP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=p0(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function FO(t,e){e=e.checked,e!=null&&jE(t,"checked",e,!1)}function H4(t,e){FO(t,e);var r=p0(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?q4(t,e.type,r):e.hasOwnProperty("defaultValue")&&q4(t,e.type,p0(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function qP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function q4(t,e,r){(e!=="number"||b2(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var um=Array.isArray;function Fd(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Ey.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Jm(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Sm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rJ=["Webkit","ms","Moz","O"];Object.keys(Sm).forEach(function(t){rJ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Sm[e]=Sm[t]})});function jO(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Sm.hasOwnProperty(t)&&Sm[t]?(""+e).trim():e+"px"}function HO(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=jO(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var nJ=kr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function K4(t,e){if(e){if(nJ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ve(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ve(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ve(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ve(62))}}function W4(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var J4=null;function VE(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Z4=null,$d=null,Ud=null;function KP(t){if(t=mb(t)){if(typeof Z4!="function")throw Error(Ve(280));var e=t.stateNode;e&&(e=A5(e),Z4(t.stateNode,t.type,e))}}function qO(t){$d?Ud?Ud.push(t):Ud=[t]:$d=t}function GO(){if($d){var t=$d,e=Ud;if(Ud=$d=null,KP(t),e)for(t=0;t>>=0,t===0?32:31-(pJ(t)/mJ|0)|0}var Ay=64,Sy=4194304;function lm(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function x2(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,s=r&268435455;if(s!==0){var f=s&~i;f!==0?n=lm(f):(o&=s,o!==0&&(n=lm(o)))}else s=r&~i,s!==0?n=lm(s):o!==0&&(n=lm(o));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function hb(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fs(e),t[e]=r}function vJ(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=_m),rC=String.fromCharCode(32),nC=!1;function lN(t,e){switch(t){case"keyup":return KJ.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dN(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var pd=!1;function JJ(t,e){switch(t){case"compositionend":return dN(e);case"keypress":return e.which!==32?null:(nC=!0,rC);case"textInput":return t=e.data,t===rC&&nC?null:t;default:return null}}function ZJ(t,e){if(pd)return t==="compositionend"||!eA&&lN(t,e)?(t=cN(),vv=YE=Kc=null,pd=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=aC(r)}}function gN(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?gN(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function bN(){for(var t=window,e=b2();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=b2(t.document)}return e}function tA(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function oZ(t){var e=bN(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&gN(r.ownerDocument.documentElement,r)){if(n!==null&&tA(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=fC(r,o);var s=fC(r,n);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,md=null,r9=null,Cm=null,n9=!1;function cC(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;n9||md==null||md!==b2(n)||(n=md,"selectionStart"in n&&tA(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Cm&&tg(Cm,n)||(Cm=n,n=S2(r9,"onSelect"),0yd||(t.current=c9[yd],c9[yd]=null,yd--)}function mr(t,e){yd++,c9[yd]=t.current,t.current=e}var m0={},Xn=k0(m0),ki=k0(!1),Wu=m0;function Jh(t,e){var r=t.type.contextTypes;if(!r)return m0;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Bi(t){return t=t.childContextTypes,t!=null}function _2(){wr(ki),wr(Xn)}function gC(t,e,r){if(Xn.current!==m0)throw Error(Ve(168));mr(Xn,e),mr(ki,r)}function _N(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(Ve(108,eJ(t)||"Unknown",i));return kr({},r,n)}function P2(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||m0,Wu=Xn.current,mr(Xn,t),mr(ki,ki.current),!0}function bC(t,e,r){var n=t.stateNode;if(!n)throw Error(Ve(169));r?(t=_N(t,e,Wu),n.__reactInternalMemoizedMergedChildContext=t,wr(ki),wr(Xn),mr(Xn,t)):wr(ki),mr(ki,r)}var of=null,S5=!1,P3=!1;function PN(t){of===null?of=[t]:of.push(t)}function bZ(t){S5=!0,PN(t)}function B0(){if(!P3&&of!==null){P3=!0;var t=0,e=er;try{var r=of;for(er=1;t>=s,i-=s,Mf=1<<32-Fs(e)+i|r<Y?(W=V,V=null):W=V.sibling;var ie=A(C,V,k[Y],O);if(ie===null){V===null&&(V=W);break}t&&V&&ie.alternate===null&&e(C,V),T=o(ie,T,Y),U===null?D=ie:U.sibling=ie,U=ie,V=W}if(Y===k.length)return r(C,V),Er&&Z0(C,Y),D;if(V===null){for(;YY?(W=V,V=null):W=V.sibling;var x=A(C,V,ie.value,O);if(x===null){V===null&&(V=W);break}t&&V&&x.alternate===null&&e(C,V),T=o(x,T,Y),U===null?D=x:U.sibling=x,U=x,V=W}if(ie.done)return r(C,V),Er&&Z0(C,Y),D;if(V===null){for(;!ie.done;Y++,ie=k.next())ie=v(C,ie.value,O),ie!==null&&(T=o(ie,T,Y),U===null?D=ie:U.sibling=ie,U=ie);return Er&&Z0(C,Y),D}for(V=n(C,V);!ie.done;Y++,ie=k.next())ie=_(V,C,Y,ie.value,O),ie!==null&&(t&&ie.alternate!==null&&V.delete(ie.key===null?Y:ie.key),T=o(ie,T,Y),U===null?D=ie:U.sibling=ie,U=ie);return t&&V.forEach(function(a){return e(C,a)}),Er&&Z0(C,Y),D}function I(C,T,k,O){if(typeof k=="object"&&k!==null&&k.type===hd&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case wy:e:{for(var D=k.key,U=T;U!==null;){if(U.key===D){if(D=k.type,D===hd){if(U.tag===7){r(C,U.sibling),T=i(U,k.props.children),T.return=C,C=T;break e}}else if(U.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Ac&&SC(D)===U.type){r(C,U.sibling),T=i(U,k.props),T.ref=N1(C,U,k),T.return=C,C=T;break e}r(C,U);break}else e(C,U);U=U.sibling}k.type===hd?(T=Nu(k.props.children,C.mode,O,k.key),T.return=C,C=T):(O=Pv(k.type,k.key,k.props,null,C.mode,O),O.ref=N1(C,T,k),O.return=C,C=O)}return s(C);case dd:e:{for(U=k.key;T!==null;){if(T.key===U)if(T.tag===4&&T.stateNode.containerInfo===k.containerInfo&&T.stateNode.implementation===k.implementation){r(C,T.sibling),T=i(T,k.children||[]),T.return=C,C=T;break e}else{r(C,T);break}else e(C,T);T=T.sibling}T=N3(k,C.mode,O),T.return=C,C=T}return s(C);case Ac:return U=k._init,I(C,T,U(k._payload),O)}if(um(k))return S(C,T,k,O);if(T1(k))return P(C,T,k,O);Ry(C,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,T!==null&&T.tag===6?(r(C,T.sibling),T=i(T,k),T.return=C,C=T):(r(C,T),T=O3(k,C.mode,O),T.return=C,C=T),s(C)):r(C,T)}return I}var Yh=NN(!0),LN=NN(!1),gb={},Ra=k0(gb),og=k0(gb),sg=k0(gb);function ou(t){if(t===gb)throw Error(Ve(174));return t}function uA(t,e){switch(mr(sg,e),mr(og,t),mr(Ra,gb),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:V4(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=V4(e,t)}wr(Ra),mr(Ra,e)}function Qh(){wr(Ra),wr(og),wr(sg)}function DN(t){ou(sg.current);var e=ou(Ra.current),r=V4(e,t.type);e!==r&&(mr(og,t),mr(Ra,r))}function lA(t){og.current===t&&(wr(Ra),wr(og))}var Pr=k0(0);function B2(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var C3=[];function dA(){for(var t=0;tr?r:4,t(!0);var n=I3.transition;I3.transition={};try{t(!1),e()}finally{er=r,I3.transition=n}}function XN(){return qo().memoizedState}function xZ(t,e,r){var n=o0(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},eL(t))tL(e,r);else if(r=RN(t,e,r,n),r!==null){var i=fi();$s(r,t,n,i),rL(r,e,n)}}function EZ(t,e,r){var n=o0(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(eL(t))tL(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,f=o(s,r);if(i.hasEagerState=!0,i.eagerState=f,Gs(f,s)){var d=e.interleaved;d===null?(i.next=i,fA(e)):(i.next=d.next,d.next=i),e.interleaved=i;return}}catch{}finally{}r=RN(t,e,i,n),r!==null&&(i=fi(),$s(r,t,n,i),rL(r,e,n))}}function eL(t){var e=t.alternate;return t===Rr||e!==null&&e===Rr}function tL(t,e){Im=O2=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function rL(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,WE(t,r)}}var N2={readContext:Ho,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},AZ={readContext:Ho,useCallback:function(t,e){return da().memoizedState=[t,e===void 0?null:e],t},useContext:Ho,useEffect:_C,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Av(4194308,4,WN.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Av(4194308,4,t,e)},useInsertionEffect:function(t,e){return Av(4,2,t,e)},useMemo:function(t,e){var r=da();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=da();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=xZ.bind(null,Rr,t),[n.memoizedState,t]},useRef:function(t){var e=da();return t={current:t},e.memoizedState=t},useState:MC,useDebugValue:bA,useDeferredValue:function(t){return da().memoizedState=t},useTransition:function(){var t=MC(!1),e=t[0];return t=wZ.bind(null,t[1]),da().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Rr,i=da();if(Er){if(r===void 0)throw Error(Ve(407));r=r()}else{if(r=e(),yn===null)throw Error(Ve(349));Zu&30||UN(n,e,r)}i.memoizedState=r;var o={value:r,getSnapshot:e};return i.queue=o,_C(jN.bind(null,n,o,t),[t]),n.flags|=2048,cg(9,zN.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=da(),e=yn.identifierPrefix;if(Er){var r=_f,n=Mf;r=(n&~(1<<32-Fs(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=ag++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=s.createElement(r,{is:n.is}):(t=s.createElement(r),r==="select"&&(s=t,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):t=s.createElementNS(t,r),t[Sa]=e,t[ng]=n,lL(t,e,!1,!1),e.stateNode=t;e:{switch(s=W4(r,n),r){case"dialog":yr("cancel",t),yr("close",t),i=n;break;case"iframe":case"object":case"embed":yr("load",t),i=n;break;case"video":case"audio":for(i=0;iep&&(e.flags|=128,n=!0,N1(o,!1),e.lanes=4194304)}else{if(!n)if(t=B2(s),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),N1(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Er)return Nn(e),null}else 2*Vr()-o.renderingStartTime>ep&&r!==1073741824&&(e.flags|=128,n=!0,N1(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(r=o.last,r!==null?r.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Vr(),e.sibling=null,r=Pr.current,mr(Pr,n?r&1|2:r&1),e):(Nn(e),null);case 22:case 23:return AA(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Yi&1073741824&&(Nn(e),e.subtreeFlags&6&&(e.flags|=8192)):Nn(e),null;case 24:return null;case 25:return null}throw Error(Ve(156,e.tag))}function RZ(t,e){switch(nA(e),e.tag){case 1:return Bi(e.type)&&_2(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Qh(),wr(ki),wr(Xn),dA(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return lA(e),null;case 13:if(wr(Pr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Ve(340));Zh()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return wr(Pr),null;case 4:return Qh(),null;case 10:return aA(e.type._context),null;case 22:case 23:return AA(),null;case 24:return null;default:return null}}var By=!1,Vn=!1,kZ=typeof WeakSet=="function"?WeakSet:Set,at=null;function Ed(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Nr(t,e,n)}else r.current=null}function x9(t,e,r){try{r()}catch(n){Nr(t,e,n)}}var NC=!1;function BZ(t,e){if(i9=E2,t=bN(),tA(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,f=-1,d=-1,p=0,b=0,v=t,A=null;t:for(;;){for(var _;v!==r||i!==0&&v.nodeType!==3||(f=s+i),v!==o||n!==0&&v.nodeType!==3||(d=s+n),v.nodeType===3&&(s+=v.nodeValue.length),(_=v.firstChild)!==null;)A=v,v=_;for(;;){if(v===t)break t;if(A===r&&++p===i&&(f=s),A===o&&++b===n&&(d=s),(_=v.nextSibling)!==null)break;v=A,A=v.parentNode}v=_}r=f===-1||d===-1?null:{start:f,end:d}}else r=null}r=r||{start:0,end:0}}else r=null;for(o9={focusedElem:t,selectionRange:r},E2=!1,at=e;at!==null;)if(e=at,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,at=t;else for(;at!==null;){e=at;try{var S=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var P=S.memoizedProps,I=S.memoizedState,C=e.stateNode,T=C.getSnapshotBeforeUpdate(e.elementType===e.type?P:vs(e.type,P),I);C.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var O=e.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ve(163))}}catch(B){Nr(e,e.return,B)}if(t=e.sibling,t!==null){t.return=e.return,at=t;break}at=e.return}return S=NC,NC=!1,S}function Im(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&x9(e,r,o)}i=i.next}while(i!==n)}}function P5(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function E9(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function pL(t){var e=t.alternate;e!==null&&(t.alternate=null,pL(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Sa],delete e[ng],delete e[f9],delete e[mZ],delete e[gZ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function mL(t){return t.tag===5||t.tag===3||t.tag===4}function LC(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||mL(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function A9(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=M2));else if(n!==4&&(t=t.child,t!==null))for(A9(t,e,r),t=t.sibling;t!==null;)A9(t,e,r),t=t.sibling}function S9(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(S9(t,e,r),t=t.sibling;t!==null;)S9(t,e,r),t=t.sibling}var Sn=null,Ps=!1;function ac(t,e,r){for(r=r.child;r!==null;)gL(t,e,r),r=r.sibling}function gL(t,e,r){if(Ta&&typeof Ta.onCommitFiberUnmount=="function")try{Ta.onCommitFiberUnmount(v5,r)}catch{}switch(r.tag){case 5:Vn||Ed(r,e);case 6:var n=Sn,i=Ps;Sn=null,ac(t,e,r),Sn=n,Ps=i,Sn!==null&&(Ps?(t=Sn,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Sn.removeChild(r.stateNode));break;case 18:Sn!==null&&(Ps?(t=Sn,r=r.stateNode,t.nodeType===8?_3(t.parentNode,r):t.nodeType===1&&_3(t,r),Qm(t)):_3(Sn,r.stateNode));break;case 4:n=Sn,i=Ps,Sn=r.stateNode.containerInfo,Ps=!0,ac(t,e,r),Sn=n,Ps=i;break;case 0:case 11:case 14:case 15:if(!Vn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&x9(r,e,s),i=i.next}while(i!==n)}ac(t,e,r);break;case 1:if(!Vn&&(Ed(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(f){Nr(r,e,f)}ac(t,e,r);break;case 21:ac(t,e,r);break;case 22:r.mode&1?(Vn=(n=Vn)||r.memoizedState!==null,ac(t,e,r),Vn=n):ac(t,e,r);break;default:ac(t,e,r)}}function DC(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new kZ),e.forEach(function(n){var i=jZ.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function ps(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=s),n&=~o}if(n=i,n=Vr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*NZ(n/1960))-n,10t?16:t,Wc===null)var n=!1;else{if(t=Wc,Wc=null,F2=0,Kt&6)throw Error(Ve(331));var i=Kt;for(Kt|=4,at=t.current;at!==null;){var o=at,s=o.child;if(at.flags&16){var f=o.deletions;if(f!==null){for(var d=0;dVr()-xA?Ou(t,0):wA|=r),Oi(t,e)}function SL(t,e){e===0&&(t.mode&1?(e=Sy,Sy<<=1,!(Sy&130023424)&&(Sy=4194304)):e=1);var r=fi();t=$f(t,e),t!==null&&(db(t,e,r),Oi(t,r))}function zZ(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),SL(t,r)}function jZ(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(Ve(314))}n!==null&&n.delete(e),SL(t,r)}var ML;ML=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||ki.current)Ti=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Ti=!1,IZ(t,e,r);Ti=!!(t.flags&131072)}else Ti=!1,Er&&e.flags&1048576&&CN(e,I2,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Sv(t,e),t=e.pendingProps;var i=Jh(e,Xn.current);jd(e,r),i=pA(null,e,n,t,i,r);var o=mA();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Bi(n)?(o=!0,P2(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,cA(e),i.updater=M5,e.stateNode=i,i._reactInternals=e,p9(e,n,t,r),e=b9(null,e,n,!0,o,r)):(e.tag=0,Er&&o&&rA(e),ri(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Sv(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=qZ(n),t=vs(n,t),i){case 0:e=g9(null,e,n,t,r);break e;case 1:e=kC(null,e,n,t,r);break e;case 11:e=TC(null,e,n,t,r);break e;case 14:e=RC(null,e,n,vs(n.type,t),r);break e}throw Error(Ve(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vs(n,i),g9(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vs(n,i),kC(t,e,n,i,r);case 3:e:{if(fL(e),t===null)throw Error(Ve(387));n=e.pendingProps,o=e.memoizedState,i=o.element,kN(t,e),k2(e,n,null,r);var s=e.memoizedState;if(n=s.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Xh(Error(Ve(423)),e),e=BC(t,e,n,r,i);break e}else if(n!==i){i=Xh(Error(Ve(424)),e),e=BC(t,e,n,r,i);break e}else for(no=r0(e.stateNode.containerInfo.firstChild),so=e,Er=!0,Is=null,r=LN(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zh(),n===i){e=Uf(t,e,r);break e}ri(t,e,n,r)}e=e.child}return e;case 5:return DN(e),t===null&&l9(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,s9(n,i)?s=null:o!==null&&s9(n,o)&&(e.flags|=32),aL(t,e),ri(t,e,s,r),e.child;case 6:return t===null&&l9(e),null;case 13:return cL(t,e,r);case 4:return uA(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Yh(e,null,n,r):ri(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vs(n,i),TC(t,e,n,i,r);case 7:return ri(t,e,e.pendingProps,r),e.child;case 8:return ri(t,e,e.pendingProps.children,r),e.child;case 12:return ri(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,mr(T2,n._currentValue),n._currentValue=s,o!==null)if(Gs(o.value,s)){if(o.children===i.children&&!ki.current){e=Uf(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var f=o.dependencies;if(f!==null){s=o.child;for(var d=f.firstContext;d!==null;){if(d.context===n){if(o.tag===1){d=Tf(-1,r&-r),d.tag=2;var p=o.updateQueue;if(p!==null){p=p.shared;var b=p.pending;b===null?d.next=d:(d.next=b.next,b.next=d),p.pending=d}}o.lanes|=r,d=o.alternate,d!==null&&(d.lanes|=r),d9(o.return,r,e),f.lanes|=r;break}d=d.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Ve(341));s.lanes|=r,f=s.alternate,f!==null&&(f.lanes|=r),d9(s,r,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ri(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,jd(e,r),i=Ho(i),n=n(i),e.flags|=1,ri(t,e,n,r),e.child;case 14:return n=e.type,i=vs(n,e.pendingProps),i=vs(n.type,i),RC(t,e,n,i,r);case 15:return oL(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vs(n,i),Sv(t,e),e.tag=1,Bi(n)?(t=!0,P2(e)):t=!1,jd(e,r),ON(e,n,i),p9(e,n,i,r),b9(null,e,n,!0,t,r);case 19:return uL(t,e,r);case 22:return sL(t,e,r)}throw Error(Ve(156,e.tag))};function _L(t,e){return QO(t,e)}function HZ(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lo(t,e,r,n){return new HZ(t,e,r,n)}function MA(t){return t=t.prototype,!(!t||!t.isReactComponent)}function qZ(t){if(typeof t=="function")return MA(t)?1:0;if(t!=null){if(t=t.$$typeof,t===qE)return 11;if(t===GE)return 14}return 2}function s0(t,e){var r=t.alternate;return r===null?(r=Lo(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Pv(t,e,r,n,i,o){var s=2;if(n=t,typeof t=="function")MA(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case hd:return Nu(r.children,i,o,e);case HE:s=8,i|=8;break;case F4:return t=Lo(12,r,e,i|2),t.elementType=F4,t.lanes=o,t;case $4:return t=Lo(13,r,e,i),t.elementType=$4,t.lanes=o,t;case U4:return t=Lo(19,r,e,i),t.elementType=U4,t.lanes=o,t;case NO:return I5(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case BO:s=10;break e;case OO:s=9;break e;case qE:s=11;break e;case GE:s=14;break e;case Ac:s=16,n=null;break e}throw Error(Ve(130,t==null?t:typeof t,""))}return e=Lo(s,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function Nu(t,e,r,n){return t=Lo(7,t,n,e),t.lanes=r,t}function I5(t,e,r,n){return t=Lo(22,t,n,e),t.elementType=NO,t.lanes=r,t.stateNode={isHidden:!1},t}function O3(t,e,r){return t=Lo(6,t,null,e),t.lanes=r,t}function N3(t,e,r){return e=Lo(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function GZ(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=m3(0),this.expirationTimes=m3(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=m3(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function _A(t,e,r,n,i,o,s,f,d){return t=new GZ(t,e,r,f,d),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Lo(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},cA(o),t}function VZ(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(TL)}catch(t){console.error(t)}}TL(),CO.exports=ho;var gb=CO.exports;const YZ=es(gb),QZ=BE({__proto__:null,default:YZ},[gb]);var GC=gb;L4.createRoot=GC.createRoot,L4.hydrateRoot=GC.hydrateRoot;var Dr=function(){return Dr=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return pY;var e=mY(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},bY=OL(),yY=function(t,e,r,n){var i=t.left,o=t.top,s=t.right,f=t.gap;return r===void 0&&(r="margin"),` +`+o.stack}return{value:t,source:e,stack:i,digest:null}}function k3(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function m9(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var _Z=typeof WeakMap=="function"?WeakMap:Map;function nL(t,e,r){r=Tf(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){D2||(D2=!0,M9=n),m9(t,e)},r}function iL(t,e,r){r=Tf(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){m9(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){m9(t,e),typeof n!="function"&&(i0===null?i0=new Set([this]):i0.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),r}function PC(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new _Z;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=UZ.bind(null,t,e,r),e.then(t,t))}function CC(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function IC(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Tf(-1,1),e.tag=2,n0(r,e,1))),r.lanes|=1),t)}var PZ=Qf.ReactCurrentOwner,Ti=!1;function ri(t,e,r,n){e.child=t===null?LN(e,null,r,n):Yh(e,t.child,r,n)}function TC(t,e,r,n,i){r=r.render;var o=e.ref;return jd(e,i),n=pA(t,e,r,n,o,i),r=mA(),t!==null&&!Ti?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Uf(t,e,i)):(Er&&r&&rA(e),e.flags|=1,ri(t,e,n,i),e.child)}function RC(t,e,r,n,i){if(t===null){var o=r.type;return typeof o=="function"&&!MA(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,oL(t,e,o,n,i)):(t=Pv(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(r=r.compare,r=r!==null?r:tg,r(s,n)&&t.ref===e.ref)return Uf(t,e,i)}return e.flags|=1,t=s0(o,n),t.ref=e.ref,t.return=e,e.child=t}function oL(t,e,r,n,i){if(t!==null){var o=t.memoizedProps;if(tg(o,n)&&t.ref===e.ref)if(Ti=!1,e.pendingProps=n=o,(t.lanes&i)!==0)t.flags&131072&&(Ti=!0);else return e.lanes=t.lanes,Uf(t,e,i)}return g9(t,e,r,n,i)}function sL(t,e,r){var n=e.pendingProps,i=n.children,o=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},mr(Ad,Yi),Yi|=r;else{if(!(r&1073741824))return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,mr(Ad,Yi),Yi|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,mr(Ad,Yi),Yi|=n}else o!==null?(n=o.baseLanes|r,e.memoizedState=null):n=r,mr(Ad,Yi),Yi|=n;return ri(t,e,i,r),e.child}function aL(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function g9(t,e,r,n,i){var o=Bi(r)?Wu:Xn.current;return o=Jh(e,o),jd(e,i),r=pA(t,e,r,n,o,i),n=mA(),t!==null&&!Ti?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Uf(t,e,i)):(Er&&n&&rA(e),e.flags|=1,ri(t,e,r,i),e.child)}function kC(t,e,r,n,i){if(Bi(r)){var o=!0;P2(e)}else o=!1;if(jd(e,i),e.stateNode===null)Sv(t,e),ON(e,r,n),p9(e,r,n,i),n=!0;else if(t===null){var s=e.stateNode,f=e.memoizedProps;s.props=f;var d=s.context,p=r.contextType;typeof p=="object"&&p!==null?p=Ho(p):(p=Bi(r)?Wu:Xn.current,p=Jh(e,p));var b=r.getDerivedStateFromProps,v=typeof b=="function"||typeof s.getSnapshotBeforeUpdate=="function";v||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(f!==n||d!==p)&&AC(e,s,n,p),Sc=!1;var A=e.memoizedState;s.state=A,k2(e,n,s,i),d=e.memoizedState,f!==n||A!==d||ki.current||Sc?(typeof b=="function"&&(h9(e,r,b,n),d=e.memoizedState),(f=Sc||EC(e,r,f,n,A,d,p))?(v||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=d),s.props=n,s.state=d,s.context=p,n=f):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{s=e.stateNode,kN(t,e),f=e.memoizedProps,p=e.type===e.elementType?f:vs(e.type,f),s.props=p,v=e.pendingProps,A=s.context,d=r.contextType,typeof d=="object"&&d!==null?d=Ho(d):(d=Bi(r)?Wu:Xn.current,d=Jh(e,d));var _=r.getDerivedStateFromProps;(b=typeof _=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(f!==v||A!==d)&&AC(e,s,n,d),Sc=!1,A=e.memoizedState,s.state=A,k2(e,n,s,i);var S=e.memoizedState;f!==v||A!==S||ki.current||Sc?(typeof _=="function"&&(h9(e,r,_,n),S=e.memoizedState),(p=Sc||EC(e,r,p,n,A,S,d)||!1)?(b||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,S,d),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,S,d)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||f===t.memoizedProps&&A===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===t.memoizedProps&&A===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=S),s.props=n,s.state=S,s.context=d,n=p):(typeof s.componentDidUpdate!="function"||f===t.memoizedProps&&A===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===t.memoizedProps&&A===t.memoizedState||(e.flags|=1024),n=!1)}return b9(t,e,r,n,o,i)}function b9(t,e,r,n,i,o){aL(t,e);var s=(e.flags&128)!==0;if(!n&&!s)return i&&bC(e,r,!1),Uf(t,e,o);n=e.stateNode,PZ.current=e;var f=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&s?(e.child=Yh(e,t.child,null,o),e.child=Yh(e,null,f,o)):ri(t,e,f,o),e.memoizedState=n.state,i&&bC(e,r,!0),e.child}function fL(t){var e=t.stateNode;e.pendingContext?gC(t,e.pendingContext,e.pendingContext!==e.context):e.context&&gC(t,e.context,!1),uA(t,e.containerInfo)}function BC(t,e,r,n,i){return Zh(),iA(i),e.flags|=256,ri(t,e,r,n),e.child}var y9={dehydrated:null,treeContext:null,retryLane:0};function v9(t){return{baseLanes:t,cachePool:null,transitions:null}}function cL(t,e,r){var n=e.pendingProps,i=Pr.current,o=!1,s=(e.flags&128)!==0,f;if((f=s)||(f=t!==null&&t.memoizedState===null?!1:(i&2)!==0),f?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),mr(Pr,i&1),t===null)return l9(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=n.children,t=n.fallback,o?(n=e.mode,o=e.child,s={mode:"hidden",children:s},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=I5(s,n,0,null),t=Nu(t,n,r,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=v9(r),e.memoizedState=y9,t):yA(e,s));if(i=t.memoizedState,i!==null&&(f=i.dehydrated,f!==null))return CZ(t,e,s,n,f,i,r);if(o){o=n.fallback,s=e.mode,i=t.child,f=i.sibling;var d={mode:"hidden",children:n.children};return!(s&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=d,e.deletions=null):(n=s0(i,d),n.subtreeFlags=i.subtreeFlags&14680064),f!==null?o=s0(f,o):(o=Nu(o,s,r,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,n=o,o=e.child,s=t.child.memoizedState,s=s===null?v9(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~r,e.memoizedState=y9,n}return o=t.child,t=o.sibling,n=s0(o,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function yA(t,e){return e=I5({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function ky(t,e,r,n){return n!==null&&iA(n),Yh(e,t.child,null,r),t=yA(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function CZ(t,e,r,n,i,o,s){if(r)return e.flags&256?(e.flags&=-257,n=k3(Error(Ve(422))),ky(t,e,s,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=n.fallback,i=e.mode,n=I5({mode:"visible",children:n.children},i,0,null),o=Nu(o,i,s,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,e.mode&1&&Yh(e,t.child,null,s),e.child.memoizedState=v9(s),e.memoizedState=y9,o);if(!(e.mode&1))return ky(t,e,s,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var f=n.dgst;return n=f,o=Error(Ve(419)),n=k3(o,n,void 0),ky(t,e,s,n)}if(f=(s&t.childLanes)!==0,Ti||f){if(n=yn,n!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,$f(t,i),$s(n,t,i,-1))}return SA(),n=k3(Error(Ve(421))),ky(t,e,s,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=zZ.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,no=r0(i.nextSibling),so=e,Er=!0,Is=null,t!==null&&(ko[Bo++]=Mf,ko[Bo++]=_f,ko[Bo++]=Ju,Mf=t.id,_f=t.overflow,Ju=e),e=yA(e,n.children),e.flags|=4096,e)}function OC(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),d9(t.return,e,r)}function B3(t,e,r,n,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function uL(t,e,r){var n=e.pendingProps,i=n.revealOrder,o=n.tail;if(ri(t,e,n.children,r),n=Pr.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&OC(t,r,e);else if(t.tag===19)OC(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(mr(Pr,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&B2(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),B3(e,!1,i,r,o);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&B2(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}B3(e,!0,r,null,o);break;case"together":B3(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Sv(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Uf(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Yu|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Ve(153));if(e.child!==null){for(t=e.child,r=s0(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=s0(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function IZ(t,e,r){switch(e.tag){case 3:fL(e),Zh();break;case 5:DN(e);break;case 1:Bi(e.type)&&P2(e);break;case 4:uA(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;mr(T2,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(mr(Pr,Pr.current&1),e.flags|=128,null):r&e.child.childLanes?cL(t,e,r):(mr(Pr,Pr.current&1),t=Uf(t,e,r),t!==null?t.sibling:null);mr(Pr,Pr.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return uL(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),mr(Pr,Pr.current),n)break;return null;case 22:case 23:return e.lanes=0,sL(t,e,r)}return Uf(t,e,r)}var lL,w9,dL,hL;lL=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};w9=function(){};dL=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,ou(Ra.current);var o=null;switch(r){case"input":i=j4(t,i),n=j4(t,n),o=[];break;case"select":i=kr({},i,{value:void 0}),n=kr({},n,{value:void 0}),o=[];break;case"textarea":i=G4(t,i),n=G4(t,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=M2)}K4(r,n);var s;r=null;for(p in i)if(!n.hasOwnProperty(p)&&i.hasOwnProperty(p)&&i[p]!=null)if(p==="style"){var f=i[p];for(s in f)f.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else p!=="dangerouslySetInnerHTML"&&p!=="children"&&p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(Wm.hasOwnProperty(p)?o||(o=[]):(o=o||[]).push(p,null));for(p in n){var d=n[p];if(f=i!=null?i[p]:void 0,n.hasOwnProperty(p)&&d!==f&&(d!=null||f!=null))if(p==="style")if(f){for(s in f)!f.hasOwnProperty(s)||d&&d.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in d)d.hasOwnProperty(s)&&f[s]!==d[s]&&(r||(r={}),r[s]=d[s])}else r||(o||(o=[]),o.push(p,r)),r=d;else p==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,f=f?f.__html:void 0,d!=null&&f!==d&&(o=o||[]).push(p,d)):p==="children"?typeof d!="string"&&typeof d!="number"||(o=o||[]).push(p,""+d):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(Wm.hasOwnProperty(p)?(d!=null&&p==="onScroll"&&yr("scroll",t),o||f===d||(o=[])):(o=o||[]).push(p,d))}r&&(o=o||[]).push("style",r);var p=o;(e.updateQueue=p)&&(e.flags|=4)}};hL=function(t,e,r,n){r!==n&&(e.flags|=4)};function L1(t,e){if(!Er)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Nn(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function TZ(t,e,r){var n=e.pendingProps;switch(nA(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(e),null;case 1:return Bi(e.type)&&_2(),Nn(e),null;case 3:return n=e.stateNode,Qh(),wr(ki),wr(Xn),dA(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ty(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Is!==null&&(C9(Is),Is=null))),w9(t,e),Nn(e),null;case 5:lA(e);var i=ou(sg.current);if(r=e.type,t!==null&&e.stateNode!=null)dL(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(Ve(166));return Nn(e),null}if(t=ou(Ra.current),Ty(e)){n=e.stateNode,r=e.type;var o=e.memoizedProps;switch(n[Sa]=e,n[ig]=o,t=(e.mode&1)!==0,r){case"dialog":yr("cancel",n),yr("close",n);break;case"iframe":case"object":case"embed":yr("load",n);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=s.createElement(r,{is:n.is}):(t=s.createElement(r),r==="select"&&(s=t,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):t=s.createElementNS(t,r),t[Sa]=e,t[ig]=n,lL(t,e,!1,!1),e.stateNode=t;e:{switch(s=W4(r,n),r){case"dialog":yr("cancel",t),yr("close",t),i=n;break;case"iframe":case"object":case"embed":yr("load",t),i=n;break;case"video":case"audio":for(i=0;iep&&(e.flags|=128,n=!0,L1(o,!1),e.lanes=4194304)}else{if(!n)if(t=B2(s),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),L1(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Er)return Nn(e),null}else 2*Vr()-o.renderingStartTime>ep&&r!==1073741824&&(e.flags|=128,n=!0,L1(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(r=o.last,r!==null?r.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Vr(),e.sibling=null,r=Pr.current,mr(Pr,n?r&1|2:r&1),e):(Nn(e),null);case 22:case 23:return AA(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Yi&1073741824&&(Nn(e),e.subtreeFlags&6&&(e.flags|=8192)):Nn(e),null;case 24:return null;case 25:return null}throw Error(Ve(156,e.tag))}function RZ(t,e){switch(nA(e),e.tag){case 1:return Bi(e.type)&&_2(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Qh(),wr(ki),wr(Xn),dA(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return lA(e),null;case 13:if(wr(Pr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Ve(340));Zh()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return wr(Pr),null;case 4:return Qh(),null;case 10:return aA(e.type._context),null;case 22:case 23:return AA(),null;case 24:return null;default:return null}}var By=!1,Vn=!1,kZ=typeof WeakSet=="function"?WeakSet:Set,at=null;function Ed(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Nr(t,e,n)}else r.current=null}function x9(t,e,r){try{r()}catch(n){Nr(t,e,n)}}var NC=!1;function BZ(t,e){if(i9=E2,t=bN(),tA(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,f=-1,d=-1,p=0,b=0,v=t,A=null;t:for(;;){for(var _;v!==r||i!==0&&v.nodeType!==3||(f=s+i),v!==o||n!==0&&v.nodeType!==3||(d=s+n),v.nodeType===3&&(s+=v.nodeValue.length),(_=v.firstChild)!==null;)A=v,v=_;for(;;){if(v===t)break t;if(A===r&&++p===i&&(f=s),A===o&&++b===n&&(d=s),(_=v.nextSibling)!==null)break;v=A,A=v.parentNode}v=_}r=f===-1||d===-1?null:{start:f,end:d}}else r=null}r=r||{start:0,end:0}}else r=null;for(o9={focusedElem:t,selectionRange:r},E2=!1,at=e;at!==null;)if(e=at,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,at=t;else for(;at!==null;){e=at;try{var S=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var P=S.memoizedProps,I=S.memoizedState,C=e.stateNode,T=C.getSnapshotBeforeUpdate(e.elementType===e.type?P:vs(e.type,P),I);C.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var k=e.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ve(163))}}catch(O){Nr(e,e.return,O)}if(t=e.sibling,t!==null){t.return=e.return,at=t;break}at=e.return}return S=NC,NC=!1,S}function Tm(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&x9(e,r,o)}i=i.next}while(i!==n)}}function P5(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function E9(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function pL(t){var e=t.alternate;e!==null&&(t.alternate=null,pL(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Sa],delete e[ig],delete e[f9],delete e[mZ],delete e[gZ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function mL(t){return t.tag===5||t.tag===3||t.tag===4}function LC(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||mL(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function A9(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=M2));else if(n!==4&&(t=t.child,t!==null))for(A9(t,e,r),t=t.sibling;t!==null;)A9(t,e,r),t=t.sibling}function S9(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(S9(t,e,r),t=t.sibling;t!==null;)S9(t,e,r),t=t.sibling}var Sn=null,Ps=!1;function ac(t,e,r){for(r=r.child;r!==null;)gL(t,e,r),r=r.sibling}function gL(t,e,r){if(Ta&&typeof Ta.onCommitFiberUnmount=="function")try{Ta.onCommitFiberUnmount(v5,r)}catch{}switch(r.tag){case 5:Vn||Ed(r,e);case 6:var n=Sn,i=Ps;Sn=null,ac(t,e,r),Sn=n,Ps=i,Sn!==null&&(Ps?(t=Sn,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Sn.removeChild(r.stateNode));break;case 18:Sn!==null&&(Ps?(t=Sn,r=r.stateNode,t.nodeType===8?_3(t.parentNode,r):t.nodeType===1&&_3(t,r),Xm(t)):_3(Sn,r.stateNode));break;case 4:n=Sn,i=Ps,Sn=r.stateNode.containerInfo,Ps=!0,ac(t,e,r),Sn=n,Ps=i;break;case 0:case 11:case 14:case 15:if(!Vn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&x9(r,e,s),i=i.next}while(i!==n)}ac(t,e,r);break;case 1:if(!Vn&&(Ed(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(f){Nr(r,e,f)}ac(t,e,r);break;case 21:ac(t,e,r);break;case 22:r.mode&1?(Vn=(n=Vn)||r.memoizedState!==null,ac(t,e,r),Vn=n):ac(t,e,r);break;default:ac(t,e,r)}}function DC(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new kZ),e.forEach(function(n){var i=jZ.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function ps(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=s),n&=~o}if(n=i,n=Vr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*NZ(n/1960))-n,10t?16:t,Wc===null)var n=!1;else{if(t=Wc,Wc=null,F2=0,Kt&6)throw Error(Ve(331));var i=Kt;for(Kt|=4,at=t.current;at!==null;){var o=at,s=o.child;if(at.flags&16){var f=o.deletions;if(f!==null){for(var d=0;dVr()-xA?Ou(t,0):wA|=r),Oi(t,e)}function SL(t,e){e===0&&(t.mode&1?(e=Sy,Sy<<=1,!(Sy&130023424)&&(Sy=4194304)):e=1);var r=fi();t=$f(t,e),t!==null&&(hb(t,e,r),Oi(t,r))}function zZ(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),SL(t,r)}function jZ(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(Ve(314))}n!==null&&n.delete(e),SL(t,r)}var ML;ML=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||ki.current)Ti=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Ti=!1,IZ(t,e,r);Ti=!!(t.flags&131072)}else Ti=!1,Er&&e.flags&1048576&&CN(e,I2,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Sv(t,e),t=e.pendingProps;var i=Jh(e,Xn.current);jd(e,r),i=pA(null,e,n,t,i,r);var o=mA();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Bi(n)?(o=!0,P2(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,cA(e),i.updater=M5,e.stateNode=i,i._reactInternals=e,p9(e,n,t,r),e=b9(null,e,n,!0,o,r)):(e.tag=0,Er&&o&&rA(e),ri(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Sv(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=qZ(n),t=vs(n,t),i){case 0:e=g9(null,e,n,t,r);break e;case 1:e=kC(null,e,n,t,r);break e;case 11:e=TC(null,e,n,t,r);break e;case 14:e=RC(null,e,n,vs(n.type,t),r);break e}throw Error(Ve(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vs(n,i),g9(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vs(n,i),kC(t,e,n,i,r);case 3:e:{if(fL(e),t===null)throw Error(Ve(387));n=e.pendingProps,o=e.memoizedState,i=o.element,kN(t,e),k2(e,n,null,r);var s=e.memoizedState;if(n=s.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Xh(Error(Ve(423)),e),e=BC(t,e,n,r,i);break e}else if(n!==i){i=Xh(Error(Ve(424)),e),e=BC(t,e,n,r,i);break e}else for(no=r0(e.stateNode.containerInfo.firstChild),so=e,Er=!0,Is=null,r=LN(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zh(),n===i){e=Uf(t,e,r);break e}ri(t,e,n,r)}e=e.child}return e;case 5:return DN(e),t===null&&l9(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,s9(n,i)?s=null:o!==null&&s9(n,o)&&(e.flags|=32),aL(t,e),ri(t,e,s,r),e.child;case 6:return t===null&&l9(e),null;case 13:return cL(t,e,r);case 4:return uA(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Yh(e,null,n,r):ri(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vs(n,i),TC(t,e,n,i,r);case 7:return ri(t,e,e.pendingProps,r),e.child;case 8:return ri(t,e,e.pendingProps.children,r),e.child;case 12:return ri(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,mr(T2,n._currentValue),n._currentValue=s,o!==null)if(Gs(o.value,s)){if(o.children===i.children&&!ki.current){e=Uf(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var f=o.dependencies;if(f!==null){s=o.child;for(var d=f.firstContext;d!==null;){if(d.context===n){if(o.tag===1){d=Tf(-1,r&-r),d.tag=2;var p=o.updateQueue;if(p!==null){p=p.shared;var b=p.pending;b===null?d.next=d:(d.next=b.next,b.next=d),p.pending=d}}o.lanes|=r,d=o.alternate,d!==null&&(d.lanes|=r),d9(o.return,r,e),f.lanes|=r;break}d=d.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Ve(341));s.lanes|=r,f=s.alternate,f!==null&&(f.lanes|=r),d9(s,r,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ri(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,jd(e,r),i=Ho(i),n=n(i),e.flags|=1,ri(t,e,n,r),e.child;case 14:return n=e.type,i=vs(n,e.pendingProps),i=vs(n.type,i),RC(t,e,n,i,r);case 15:return oL(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vs(n,i),Sv(t,e),e.tag=1,Bi(n)?(t=!0,P2(e)):t=!1,jd(e,r),ON(e,n,i),p9(e,n,i,r),b9(null,e,n,!0,t,r);case 19:return uL(t,e,r);case 22:return sL(t,e,r)}throw Error(Ve(156,e.tag))};function _L(t,e){return QO(t,e)}function HZ(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lo(t,e,r,n){return new HZ(t,e,r,n)}function MA(t){return t=t.prototype,!(!t||!t.isReactComponent)}function qZ(t){if(typeof t=="function")return MA(t)?1:0;if(t!=null){if(t=t.$$typeof,t===qE)return 11;if(t===GE)return 14}return 2}function s0(t,e){var r=t.alternate;return r===null?(r=Lo(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Pv(t,e,r,n,i,o){var s=2;if(n=t,typeof t=="function")MA(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case hd:return Nu(r.children,i,o,e);case HE:s=8,i|=8;break;case F4:return t=Lo(12,r,e,i|2),t.elementType=F4,t.lanes=o,t;case $4:return t=Lo(13,r,e,i),t.elementType=$4,t.lanes=o,t;case U4:return t=Lo(19,r,e,i),t.elementType=U4,t.lanes=o,t;case NO:return I5(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case BO:s=10;break e;case OO:s=9;break e;case qE:s=11;break e;case GE:s=14;break e;case Ac:s=16,n=null;break e}throw Error(Ve(130,t==null?t:typeof t,""))}return e=Lo(s,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function Nu(t,e,r,n){return t=Lo(7,t,n,e),t.lanes=r,t}function I5(t,e,r,n){return t=Lo(22,t,n,e),t.elementType=NO,t.lanes=r,t.stateNode={isHidden:!1},t}function O3(t,e,r){return t=Lo(6,t,null,e),t.lanes=r,t}function N3(t,e,r){return e=Lo(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function GZ(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=m3(0),this.expirationTimes=m3(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=m3(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function _A(t,e,r,n,i,o,s,f,d){return t=new GZ(t,e,r,f,d),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Lo(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},cA(o),t}function VZ(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(TL)}catch(t){console.error(t)}}TL(),CO.exports=ho;var bb=CO.exports;const YZ=es(bb),QZ=BE({__proto__:null,default:YZ},[bb]);var GC=bb;L4.createRoot=GC.createRoot,L4.hydrateRoot=GC.hydrateRoot;var Dr=function(){return Dr=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return pY;var e=mY(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},bY=OL(),yY=function(t,e,r,n){var i=t.left,o=t.top,s=t.right,f=t.gap;return r===void 0&&(r="margin"),` .`.concat(XZ,` { overflow: hidden `).concat(n,`; padding-right: `).concat(f,"px ").concat(n,`; @@ -82,10 +82,10 @@ Error generating stack: `+o.message+` `)},vY=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,o=Z.useMemo(function(){return gY(i)},[i]);return Z.createElement(bY,{styles:yY(o,!e,i,r?"":"!important")})},I9=!1;if(typeof window<"u")try{var Ly=Object.defineProperty({},"passive",{get:function(){return I9=!0,!0}});window.addEventListener("test",Ly,Ly),window.removeEventListener("test",Ly,Ly)}catch{I9=!1}var ql=I9?{passive:!1}:!1,wY=function(t){return t.tagName==="TEXTAREA"},NL=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!wY(t)&&r[e]==="visible")},xY=function(t){return NL(t,"overflowY")},EY=function(t){return NL(t,"overflowX")},KC=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=LL(t,n);if(i){var o=DL(t,n),s=o[1],f=o[2];if(s>f)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},AY=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},SY=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},LL=function(t,e){return t==="v"?xY(e):EY(e)},DL=function(t,e){return t==="v"?AY(e):SY(e)},MY=function(t,e){return t==="h"&&e==="rtl"?-1:1},_Y=function(t,e,r,n,i){var o=MY(t,window.getComputedStyle(e).direction),s=o*n,f=r.target,d=e.contains(f),p=!1,b=s>0,v=0,A=0;do{var _=DL(t,f),S=_[0],P=_[1],I=_[2],C=P-I-o*S;(S||C)&&LL(t,f)&&(v+=C,A+=S),f instanceof ShadowRoot?f=f.host:f=f.parentNode}while(!d&&f!==document.body||d&&(e.contains(f)||e===f));return(b&&(i&&Math.abs(v)<1||!i&&s>v)||!b&&(i&&Math.abs(A)<1||!i&&-s>A))&&(p=!0),p},Dy=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},WC=function(t){return[t.deltaX,t.deltaY]},JC=function(t){return t&&"current"in t?t.current:t},PY=function(t,e){return t[0]===e[0]&&t[1]===e[1]},CY=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},IY=0,Gl=[];function TY(t){var e=Z.useRef([]),r=Z.useRef([0,0]),n=Z.useRef(),i=Z.useState(IY++)[0],o=Z.useState(OL)[0],s=Z.useRef(t);Z.useEffect(function(){s.current=t},[t]),Z.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var P=ug([t.lockRef.current],(t.shards||[]).map(JC),!0).filter(Boolean);return P.forEach(function(I){return I.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),P.forEach(function(I){return I.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var f=Z.useCallback(function(P,I){if("touches"in P&&P.touches.length===2)return!s.current.allowPinchZoom;var C=Dy(P),T=r.current,O="deltaX"in P?P.deltaX:T[0]-C[0],B="deltaY"in P?P.deltaY:T[1]-C[1],D,U=P.target,K=Math.abs(O)>Math.abs(B)?"h":"v";if("touches"in P&&K==="h"&&U.type==="range")return!1;var Y=KC(K,U);if(!Y)return!0;if(Y?D=K:(D=K==="v"?"h":"v",Y=KC(K,U)),!Y)return!1;if(!n.current&&"changedTouches"in P&&(O||B)&&(n.current=D),!D)return!0;var W=n.current||D;return _Y(W,I,P,W==="h"?O:B,!0)},[]),d=Z.useCallback(function(P){var I=P;if(!(!Gl.length||Gl[Gl.length-1]!==o)){var C="deltaY"in I?WC(I):Dy(I),T=e.current.filter(function(D){return D.name===I.type&&(D.target===I.target||I.target===D.shadowParent)&&PY(D.delta,C)})[0];if(T&&T.should){I.cancelable&&I.preventDefault();return}if(!T){var O=(s.current.shards||[]).map(JC).filter(Boolean).filter(function(D){return D.contains(I.target)}),B=O.length>0?f(I,O[0]):!s.current.noIsolation;B&&I.cancelable&&I.preventDefault()}}},[]),p=Z.useCallback(function(P,I,C,T){var O={name:P,delta:I,target:C,should:T,shadowParent:RY(C)};e.current.push(O),setTimeout(function(){e.current=e.current.filter(function(B){return B!==O})},1)},[]),b=Z.useCallback(function(P){r.current=Dy(P),n.current=void 0},[]),v=Z.useCallback(function(P){p(P.type,WC(P),P.target,f(P,t.lockRef.current))},[]),A=Z.useCallback(function(P){p(P.type,Dy(P),P.target,f(P,t.lockRef.current))},[]);Z.useEffect(function(){return Gl.push(o),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:A}),document.addEventListener("wheel",d,ql),document.addEventListener("touchmove",d,ql),document.addEventListener("touchstart",b,ql),function(){Gl=Gl.filter(function(P){return P!==o}),document.removeEventListener("wheel",d,ql),document.removeEventListener("touchmove",d,ql),document.removeEventListener("touchstart",b,ql)}},[]);var _=t.removeScrollBar,S=t.inert;return Z.createElement(Z.Fragment,null,S?Z.createElement(o,{styles:CY(i)}):null,_?Z.createElement(vY,{gapMode:t.gapMode}):null)}function RY(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const kY=aY(BL,TY);var FL=Z.forwardRef(function(t,e){return Z.createElement(O5,Dr({},t,{ref:e,sideCar:kY}))});FL.classNames=O5.classNames;const TA=FL;function Cn(t){return Object.keys(t)}function F3(t){return t&&typeof t=="object"&&!Array.isArray(t)}function RA(t,e){const r={...t},n=e;return F3(t)&&F3(e)&&Object.keys(e).forEach(i=>{F3(n[i])&&i in t?r[i]=RA(r[i],n[i]):r[i]=n[i]}),r}function BY(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function OY(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function T9(t){const e=OY(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function $3(t){return`calc(${t} * var(--mantine-scale))`}function $L(t,{shouldScale:e=!1}={}){function r(n){if(n===0||n==="0")return"0";if(typeof n=="number"){const i=`${n/16}${t}`;return e?$3(i):i}if(typeof n=="string"){if(n.startsWith("calc(")||n.startsWith("var("))return n;if(n.includes(" "))return n.split(" ").map(o=>r(o)).join(" ");if(n.includes(t))return e?$3(n):n;const i=n.replace("px","");if(!Number.isNaN(Number(i))){const o=`${Number(i)/16}${t}`;return e?$3(o):o}}return n}return r}const Fe=$L("rem",{shouldScale:!0}),z2=$L("em");function kA(t){return Object.keys(t).reduce((e,r)=>(t[r]!==void 0&&(e[r]=t[r]),e),{})}function UL(t){return typeof t=="number"?!0:typeof t=="string"?t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!==""?!0:/[0-9]/.test(t.trim().replace("-","")[0]):!1}function yl(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==se.Fragment:!1}function vl(t){const e=Z.createContext(null);return[({children:i,value:o})=>se.createElement(e.Provider,{value:o},i),()=>{const i=Z.useContext(e);if(i===null)throw new Error(t);return i}]}function NY(t=null){const e=Z.createContext(t);return[({children:i,value:o})=>se.createElement(e.Provider,{value:o},i),()=>Z.useContext(e)]}const LY={app:100,modal:200,popover:300,overlay:400,max:9999};function Ha(t){return LY[t]}const DY=()=>{};function FY(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||DY:r=>{var n;r.key==="Escape"&&(t(r),(n=e.onTrigger)==null||n.call(e))}}function zr(t,e="size",r=!0){if(t!==void 0)return UL(t)?r?Fe(t):t:`var(--${e}-${t})`}function bb(t){return zr(t,"mantine-spacing")}function bi(t){return t===void 0?"var(--mantine-radius-default)":zr(t,"mantine-radius")}function Fo(t){return zr(t,"mantine-font-size")}function $Y(t){return zr(t,"mantine-line-height",!1)}function BA(t){if(t)return zr(t,"mantine-shadow",!1)}function OA(t,e){return t in e.breakpoints?T9(e.breakpoints[t]):T9(t)}function ZC(t,e){const r=t.map(n=>({value:n,px:OA(n,e)}));return r.sort((n,i)=>n.px-i.px),r}function zL(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{Object.entries(r).forEach(([n,i])=>{e[n]?e[n]=cn(e[n],i):e[n]=i})}),e}function N5({theme:t,classNames:e,props:r,stylesCtx:n}){const o=(Array.isArray(e)?e:[e]).map(s=>typeof s=="function"?s(t,r,n):s||UY);return zY(o)}function j2({theme:t,styles:e,props:r,stylesCtx:n}){return(Array.isArray(e)?e:[e]).reduce((o,s)=>typeof s=="function"?{...o,...s(t,r,n)}:{...o,...s},{})}function jL(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function X0(t){const e=Z.useRef(t);return Z.useEffect(()=>{e.current=t}),Z.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function L5(t,e){const r=X0(t),n=Z.useRef(0);return Z.useEffect(()=>()=>window.clearTimeout(n.current),[]),Z.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,e)},[r,e])}const YC=["mousedown","touchstart"];function jY(t,e,r){const n=Z.useRef();return Z.useEffect(()=>{const i=o=>{const{target:s}=o??{};if(Array.isArray(r)){const f=(s==null?void 0:s.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(s)&&s.tagName!=="HTML";r.every(p=>!!p&&!o.composedPath().includes(p))&&!f&&t()}else n.current&&!n.current.contains(s)&&t()};return(e||YC).forEach(o=>document.addEventListener(o,i)),()=>{(e||YC).forEach(o=>document.removeEventListener(o,i))}},[n,t,r]),n}function HY({timeout:t=2e3}={}){const[e,r]=Z.useState(null),[n,i]=Z.useState(!1),[o,s]=Z.useState(null),f=b=>{window.clearTimeout(o),s(window.setTimeout(()=>i(!1),t)),i(b)};return{copy:b=>{"clipboard"in navigator?navigator.clipboard.writeText(b).then(()=>f(!0)).catch(v=>r(v)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{i(!1),r(null),window.clearTimeout(o)},error:e,copied:n}}function qY(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function GY(t,e){return typeof e=="boolean"?e:typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function HL(t,e,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,i]=Z.useState(r?e:GY(t,e)),o=Z.useRef();return Z.useEffect(()=>{if("matchMedia"in window)return o.current=window.matchMedia(t),i(o.current.matches),qY(o.current,s=>i(s.matches))},[t]),n}function VY(t,e){return HL("(prefers-color-scheme: dark)",t==="dark",e)?"dark":"light"}const Qp=typeof document<"u"?Z.useLayoutEffect:Z.useEffect;function Xu(t,e){const r=Z.useRef(!1);Z.useEffect(()=>()=>{r.current=!1},[]),Z.useEffect(()=>{if(r.current)return t();r.current=!0},e)}function qL({opened:t,shouldReturnFocus:e=!0}){const r=Z.useRef(),n=()=>{var i;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((i=r.current)==null||i.focus({preventScroll:!0}))};return Xu(()=>{let i=-1;const o=s=>{s.key==="Tab"&&window.clearTimeout(i)};return document.addEventListener("keydown",o),t?r.current=document.activeElement:e&&(i=window.setTimeout(n,10)),()=>{window.clearTimeout(i),document.removeEventListener("keydown",o)}},[t,e]),n}const KY=/input|select|textarea|button|object/,GL="a, input, select, textarea, button, object, [tabindex]";function WY(t){return t.style.display==="none"}function JY(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let r=t;for(;r&&!(r===document.body||r.nodeType===11);){if(WY(r))return!1;r=r.parentNode}return!0}function VL(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function R9(t){const e=t.nodeName.toLowerCase(),r=!Number.isNaN(VL(t));return(KY.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||r)&&JY(t)}function KL(t){const e=VL(t);return(Number.isNaN(e)||e>=0)&&R9(t)}function ZY(t){return Array.from(t.querySelectorAll(GL)).filter(KL)}function YY(t,e){const r=ZY(t);if(!r.length){e.preventDefault();return}const n=r[e.shiftKey?0:r.length-1],i=t.getRootNode();let o=n===i.activeElement||t===i.activeElement;const s=i.activeElement;if(s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(o=r.filter(b=>b.getAttribute("type")==="radio"&&b.getAttribute("name")===s.getAttribute("name")).includes(n)),!o)return;e.preventDefault();const d=r[e.shiftKey?r.length-1:0];d&&d.focus()}function QY(t,e="body > :not(script)"){const r=jL(),n=Array.from(document.querySelectorAll(e)).map(i=>{var d;if((d=i==null?void 0:i.shadowRoot)!=null&&d.contains(t)||i.contains(t))return;const o=i.getAttribute("aria-hidden"),s=i.getAttribute("data-hidden"),f=i.getAttribute("data-focus-id");return i.setAttribute("data-focus-id",r),o===null||o==="false"?i.setAttribute("aria-hidden","true"):!s&&!f&&i.setAttribute("data-hidden",o),{node:i,ariaHidden:s||null}});return()=>{n.forEach(i=>{!i||r!==i.node.getAttribute("data-focus-id")||(i.ariaHidden===null?i.node.removeAttribute("aria-hidden"):i.node.setAttribute("aria-hidden",i.ariaHidden),i.node.removeAttribute("data-focus-id"),i.node.removeAttribute("data-hidden"))})}}function XY(t=!0){const e=Z.useRef(),r=Z.useRef(null),n=o=>{let s=o.querySelector("[data-autofocus]");if(!s){const f=Array.from(o.querySelectorAll(GL));s=f.find(KL)||f.find(R9)||null,!s&&R9(o)&&(s=o)}s&&s.focus({preventScroll:!0})},i=Z.useCallback(o=>{if(t){if(o===null){r.current&&(r.current(),r.current=null);return}r.current=QY(o),e.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&n(o)}),e.current=o):e.current=null)}},[t]);return Z.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>n(e.current));const o=s=>{s.key==="Tab"&&e.current&&YY(e.current,s)};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),r.current&&r.current()}},[t]),i}const eQ=se["useId".toString()]||(()=>{});function tQ(){const t=eQ();return t?`mantine-${t.replace(/:/g,"")}`:""}function wl(t){const e=tQ(),[r,n]=Z.useState(e);return Qp(()=>{n(jL())},[]),typeof t=="string"?t:typeof window>"u"?e:r}function WL(t,e,r){Z.useEffect(()=>(window.addEventListener(t,e,r),()=>window.removeEventListener(t,e,r)),[t,e])}function JL(t,e){typeof t=="function"?t(e):typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function rQ(...t){return e=>{t.forEach(r=>JL(r,e))}}function Ui(...t){return Z.useCallback(rQ(...t),t)}function H2({value:t,defaultValue:e,finalValue:r,onChange:n=()=>{}}){const[i,o]=Z.useState(e!==void 0?e:r),s=f=>{o(f),n==null||n(f)};return t!==void 0?[t,n,!0]:[i,s,!1]}function ZL(t,e){return HL("(prefers-reduced-motion: reduce)",t,e)}function NA(t=!1,e){const{onOpen:r,onClose:n}=e||{},[i,o]=Z.useState(t),s=Z.useCallback(()=>{o(p=>p||(r==null||r(),!0))},[r]),f=Z.useCallback(()=>{o(p=>p&&(n==null||n(),!1))},[n]),d=Z.useCallback(()=>{i?f():s()},[f,s,i]);return[i,{open:s,close:f,toggle:d}]}const LA=Z.createContext(null);function D5(){const t=Z.useContext(LA);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function nQ(){return D5().cssVariablesResolver}function iQ(){return D5().classNamesPrefix}function DA(){return D5().getStyleNonce}const oQ={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#4a4a4a","#404040","#383838","#2e2e2e","#242424","#212121"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function k9(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function FA({color:t,theme:e,colorScheme:r}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Instead got ${typeof t}`);if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,variable:`--mantine-color-${t}`};const[n,i]=t.split("."),o=i?Number(i):void 0,s=n in e.colors;return s?{color:n,value:o!==void 0?e.colors[n][o]:e.colors[n][k9(e,r||"light")],shade:o,isThemeColor:s,variable:i?`--mantine-color-${n}-${o}`:`--mantine-color-${n}-filled`}:{color:t,value:t,isThemeColor:s,shade:o,variable:void 0}}function zf(t,e){const r=FA({color:t||e.primaryColor,theme:e});return r.variable?`var(${r.variable})`:t}function B9(t,e){const r={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(t==null?void 0:t.deg)||e.defaultGradient.deg||0},n=zf(r.from,e),i=zf(r.to,e);return`linear-gradient(${r.deg}deg, ${n} 0%, ${i} 100%)`}function sQ(t){return/^#?([0-9A-F]{3}){1,2}$/i.test(t)}function aQ(t){let e=t.replace("#","");if(e.length===3){const s=e.split("");e=[s[0],s[0],s[1],s[1],s[2],s[2]].join("")}const r=parseInt(e,16),n=r>>16&255,i=r>>8&255,o=r&255;return{r:n,g:i,b:o,a:1}}function fQ(t){const[e,r,n,i]=t.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:e,g:r,b:n,a:i||1}}function cQ(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,r=t.match(e);if(!r)return{r:0,g:0,b:0,a:1};const n=parseInt(r[1],10),i=parseInt(r[2],10)/100,o=parseInt(r[3],10)/100,s=r[5]?parseFloat(r[5]):void 0,f=(1-Math.abs(2*o-1))*i,d=n/60,p=f*(1-Math.abs(d%2-1)),b=o-f/2;let v,A,_;return d>=0&&d<1?(v=f,A=p,_=0):d>=1&&d<2?(v=p,A=f,_=0):d>=2&&d<3?(v=0,A=f,_=p):d>=3&&d<4?(v=0,A=p,_=f):d>=4&&d<5?(v=p,A=0,_=f):(v=f,A=0,_=p),{r:Math.round((v+b)*255),g:Math.round((A+b)*255),b:Math.round((_+b)*255),a:s||1}}function YL(t){return sQ(t)?aQ(t):t.startsWith("rgb")?fQ(t):t.startsWith("hsl")?cQ(t):{r:0,g:0,b:0,a:1}}function Fy(t,e){if(t.startsWith("var("))return t;const{r,g:n,b:i,a:o}=YL(t),s=1-e,f=d=>Math.round(d*s);return`rgba(${f(r)}, ${f(n)}, ${f(i)}, ${o})`}function ii(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";const{r,g:n,b:i}=YL(t);return`rgba(${r}, ${n}, ${i}, ${e})`}const uQ=({color:t,theme:e,variant:r,gradient:n})=>{const i=FA({color:t,theme:e});if(r==="filled")return i.isThemeColor?i.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:"var(--mantine-color-white)",border:`${Fe(1)} solid transparent`}:{background:`var(--mantine-color-${i.color}-${i.shade})`,hover:`var(--mantine-color-${i.color}-${i.shade===9?8:i.shade+1})`,color:"var(--mantine-color-white)",border:`${Fe(1)} solid transparent`}:{background:t,hover:Fy(t,.1),color:"var(--mantine-color-white)",border:`${Fe(1)} solid transparent`};if(r==="light"){if(i.isThemeColor){if(i.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Fe(1)} solid transparent`};const o=e.colors[i.color][i.shade];return{background:ii(o,.1),hover:ii(o,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Fe(1)} solid transparent`}}return{background:ii(t,.1),hover:ii(t,.12),color:t,border:`${Fe(1)} solid transparent`}}if(r==="outline")return i.isThemeColor?i.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${Fe(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:ii(e.colors[i.color][i.shade],.05),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Fe(1)} solid var(--mantine-color-${i.color}-${i.shade})`}:{background:"transparent",hover:ii(t,.05),color:t,border:`${Fe(1)} solid ${t}`};if(r==="subtle"){if(i.isThemeColor){if(i.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Fe(1)} solid transparent`};const o=e.colors[i.color][i.shade];return{background:"transparent",hover:ii(o,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Fe(1)} solid transparent`}}return{background:"transparent",hover:ii(t,.12),color:t,border:`${Fe(1)} solid transparent`}}return r==="transparent"?i.isThemeColor?i.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${Fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${Fe(1)} solid transparent`}:r==="white"?i.isThemeColor?i.shade===void 0?{background:"var(--mantine-color-white)",hover:Fy(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${Fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Fy(e.white,.01),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Fy(e.white,.01),color:t,border:`${Fe(1)} solid transparent`}:r==="gradient"?{background:B9(n,e),hover:B9(n,e),color:"var(--mantine-color-white)",border:"none"}:r==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${Fe(1)} solid var(--mantine-color-default-border)`}:{}},QC="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",$A={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:oQ,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:uQ,fontFamily:QC,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:QC,fontWeight:"700",sizes:{h1:{fontSize:Fe(34),lineHeight:"1.3"},h2:{fontSize:Fe(26),lineHeight:"1.35"},h3:{fontSize:Fe(22),lineHeight:"1.4"},h4:{fontSize:Fe(18),lineHeight:"1.45"},h5:{fontSize:Fe(16),lineHeight:"1.5"},h6:{fontSize:Fe(14),lineHeight:"1.5"}}},fontSizes:{xs:Fe(12),sm:Fe(14),md:Fe(16),lg:Fe(18),xl:Fe(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:Fe(2),sm:Fe(4),md:Fe(8),lg:Fe(16),xl:Fe(32)},spacing:{xs:Fe(10),sm:Fe(12),md:Fe(16),lg:Fe(20),xl:Fe(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), 0 ${Fe(1)} ${Fe(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(10)} ${Fe(15)} ${Fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${Fe(7)} ${Fe(7)} ${Fe(-5)}`,md:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(20)} ${Fe(25)} ${Fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${Fe(10)} ${Fe(10)} ${Fe(-5)}`,lg:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(28)} ${Fe(23)} ${Fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${Fe(12)} ${Fe(12)} ${Fe(-7)}`,xl:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(36)} ${Fe(28)} ${Fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${Fe(17)} ${Fe(17)} ${Fe(-7)}`},other:{},components:{}};function lQ(){const t=console.error;console.error=(...e)=>{e.length>1&&typeof e[0]=="string"&&e[0].toLowerCase().includes("extra attributes from the server")&&typeof e[1]=="string"&&e[1].toLowerCase().includes("data-mantine-color-scheme")||t(...e)}}const dQ="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",XC="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function U3(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function eI(t){if(!(t.primaryColor in t.colors))throw new Error(dQ);if(typeof t.primaryShade=="object"&&(!U3(t.primaryShade.dark)||!U3(t.primaryShade.light)))throw new Error(XC);if(typeof t.primaryShade=="number"&&!U3(t.primaryShade))throw new Error(XC)}function hQ(t,e){var n;if(!e)return eI(t),t;const r=RA(t,e);return e.fontFamily&&!((n=e.headings)!=null&&n.fontFamily)&&(r.headings.fontFamily=e.fontFamily),eI(r),r}const UA=Z.createContext(null),pQ=()=>Z.useContext(UA)||$A;function ta(){const t=Z.useContext(UA);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function QL({theme:t,children:e,inherit:r=!0}){const n=pQ(),i=Z.useMemo(()=>hQ(r?n:$A,t),[t,n,r]);return se.createElement(UA.Provider,{value:i},e)}QL.displayName="@mantine/core/MantineThemeProvider";function z3(t){return Object.entries(t).map(([e,r])=>`${e}: ${r};`).join("")}function j3(t,e){return(Array.isArray(t)?t:[t]).reduce((n,i)=>`${i}{${n}}`,e)}function mQ(t,e){const r=z3(t.variables),n=r?j3(e,r):"",i=z3(t.dark),o=i?j3(`${e}[data-mantine-color-scheme="dark"]`,i):"",s=z3(t.light),f=s?j3(`${e}[data-mantine-color-scheme="light"]`,s):"";return`${n}${o}${f}`}function Vl(t,e,r){Cn(e).forEach(n=>Object.assign(t,{[`--mantine-${r}-${n}`]:e[n]}))}const XL=t=>{const e=k9(t,"dark"),r=k9(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:Fe(t.defaultRadius),i={variables:{"--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-color-scheme":"light dark","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${r})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)"},dark:{"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)"}};Vl(i.variables,t.breakpoints,"breakpoint"),Vl(i.variables,t.spacing,"spacing"),Vl(i.variables,t.fontSizes,"font-size"),Vl(i.variables,t.lineHeights,"line-height"),Vl(i.variables,t.shadows,"shadow"),Vl(i.variables,t.radius,"radius"),Cn(t.colors).forEach(s=>{t.colors[s].forEach((p,b)=>{i.variables[`--mantine-color-${s}-${b}`]=p});const f=`var(--mantine-color-${s}-${r===9?8:r+1})`,d=`var(--mantine-color-${s}-${e===9?8:e+1})`;i.light["--mantine-color-dimmed"]="var(--mantine-color-gray-6)",i.light[`--mantine-color-${s}-text`]=`var(--mantine-color-${s}-filled)`,i.light[`--mantine-color-${s}-filled`]=`var(--mantine-color-${s}-${r})`,i.light[`--mantine-color-${s}-filled-hover`]=f,i.light[`--mantine-color-${s}-light`]=ii(t.colors[s][r],.1),i.light[`--mantine-color-${s}-light-hover`]=ii(t.colors[s][r],.12),i.light[`--mantine-color-${s}-light-color`]=`var(--mantine-color-${s}-${r})`,i.light[`--mantine-color-${s}-outline`]=`var(--mantine-color-${s}-${r})`,i.light[`--mantine-color-${s}-outline-hover`]=ii(t.colors[s][r],.05),i.dark["--mantine-color-dimmed"]="var(--mantine-color-dark-2)",i.dark[`--mantine-color-${s}-text`]=`var(--mantine-color-${s}-4)`,i.dark[`--mantine-color-${s}-filled`]=`var(--mantine-color-${s}-${e})`,i.dark[`--mantine-color-${s}-filled-hover`]=d,i.dark[`--mantine-color-${s}-light`]=ii(t.colors[s][Math.max(0,e-2)],.15),i.dark[`--mantine-color-${s}-light-hover`]=ii(t.colors[s][Math.max(0,e-2)],.2),i.dark[`--mantine-color-${s}-light-color`]=`var(--mantine-color-${s}-${Math.max(e-5,0)})`,i.dark[`--mantine-color-${s}-outline`]=`var(--mantine-color-${s}-${Math.max(e-4,0)})`,i.dark[`--mantine-color-${s}-outline-hover`]=ii(t.colors[s][Math.max(e-4,0)],.05)});const o=t.headings.sizes;return Cn(o).forEach(s=>{i.variables[`--mantine-${s}-font-size`]=o[s].fontSize,i.variables[`--mantine-${s}-line-height`]=o[s].lineHeight,i.variables[`--mantine-${s}-font-weight`]=o[s].fontWeight||t.headings.fontWeight}),i};function gQ({theme:t,generator:e}){const r=XL(t),n=e==null?void 0:e(t);return n?RA(r,n):r}const H3=XL($A);function bQ(t){const e={variables:{},light:{},dark:{}};return Cn(t.variables).forEach(r=>{H3.variables[r]!==t.variables[r]&&(e.variables[r]=t.variables[r])}),Cn(t.light).forEach(r=>{H3.light[r]!==t.light[r]&&(e.light[r]=t.light[r])}),Cn(t.dark).forEach(r=>{H3.dark[r]!==t.dark[r]&&(e.dark[r]=t.dark[r])}),e}function yQ(t){return` +`)},IY=0,Gl=[];function TY(t){var e=Z.useRef([]),r=Z.useRef([0,0]),n=Z.useRef(),i=Z.useState(IY++)[0],o=Z.useState(OL)[0],s=Z.useRef(t);Z.useEffect(function(){s.current=t},[t]),Z.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var P=lg([t.lockRef.current],(t.shards||[]).map(JC),!0).filter(Boolean);return P.forEach(function(I){return I.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),P.forEach(function(I){return I.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var f=Z.useCallback(function(P,I){if("touches"in P&&P.touches.length===2)return!s.current.allowPinchZoom;var C=Dy(P),T=r.current,k="deltaX"in P?P.deltaX:T[0]-C[0],O="deltaY"in P?P.deltaY:T[1]-C[1],D,U=P.target,V=Math.abs(k)>Math.abs(O)?"h":"v";if("touches"in P&&V==="h"&&U.type==="range")return!1;var Y=KC(V,U);if(!Y)return!0;if(Y?D=V:(D=V==="v"?"h":"v",Y=KC(V,U)),!Y)return!1;if(!n.current&&"changedTouches"in P&&(k||O)&&(n.current=D),!D)return!0;var W=n.current||D;return _Y(W,I,P,W==="h"?k:O,!0)},[]),d=Z.useCallback(function(P){var I=P;if(!(!Gl.length||Gl[Gl.length-1]!==o)){var C="deltaY"in I?WC(I):Dy(I),T=e.current.filter(function(D){return D.name===I.type&&(D.target===I.target||I.target===D.shadowParent)&&PY(D.delta,C)})[0];if(T&&T.should){I.cancelable&&I.preventDefault();return}if(!T){var k=(s.current.shards||[]).map(JC).filter(Boolean).filter(function(D){return D.contains(I.target)}),O=k.length>0?f(I,k[0]):!s.current.noIsolation;O&&I.cancelable&&I.preventDefault()}}},[]),p=Z.useCallback(function(P,I,C,T){var k={name:P,delta:I,target:C,should:T,shadowParent:RY(C)};e.current.push(k),setTimeout(function(){e.current=e.current.filter(function(O){return O!==k})},1)},[]),b=Z.useCallback(function(P){r.current=Dy(P),n.current=void 0},[]),v=Z.useCallback(function(P){p(P.type,WC(P),P.target,f(P,t.lockRef.current))},[]),A=Z.useCallback(function(P){p(P.type,Dy(P),P.target,f(P,t.lockRef.current))},[]);Z.useEffect(function(){return Gl.push(o),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:A}),document.addEventListener("wheel",d,ql),document.addEventListener("touchmove",d,ql),document.addEventListener("touchstart",b,ql),function(){Gl=Gl.filter(function(P){return P!==o}),document.removeEventListener("wheel",d,ql),document.removeEventListener("touchmove",d,ql),document.removeEventListener("touchstart",b,ql)}},[]);var _=t.removeScrollBar,S=t.inert;return Z.createElement(Z.Fragment,null,S?Z.createElement(o,{styles:CY(i)}):null,_?Z.createElement(vY,{gapMode:t.gapMode}):null)}function RY(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const kY=aY(BL,TY);var FL=Z.forwardRef(function(t,e){return Z.createElement(O5,Dr({},t,{ref:e,sideCar:kY}))});FL.classNames=O5.classNames;const TA=FL;function Cn(t){return Object.keys(t)}function F3(t){return t&&typeof t=="object"&&!Array.isArray(t)}function RA(t,e){const r={...t},n=e;return F3(t)&&F3(e)&&Object.keys(e).forEach(i=>{F3(n[i])&&i in t?r[i]=RA(r[i],n[i]):r[i]=n[i]}),r}function BY(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function OY(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function T9(t){const e=OY(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function $3(t){return`calc(${t} * var(--mantine-scale))`}function $L(t,{shouldScale:e=!1}={}){function r(n){if(n===0||n==="0")return"0";if(typeof n=="number"){const i=`${n/16}${t}`;return e?$3(i):i}if(typeof n=="string"){if(n.startsWith("calc(")||n.startsWith("var("))return n;if(n.includes(" "))return n.split(" ").map(o=>r(o)).join(" ");if(n.includes(t))return e?$3(n):n;const i=n.replace("px","");if(!Number.isNaN(Number(i))){const o=`${Number(i)/16}${t}`;return e?$3(o):o}}return n}return r}const Fe=$L("rem",{shouldScale:!0}),z2=$L("em");function kA(t){return Object.keys(t).reduce((e,r)=>(t[r]!==void 0&&(e[r]=t[r]),e),{})}function UL(t){return typeof t=="number"?!0:typeof t=="string"?t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!==""?!0:/[0-9]/.test(t.trim().replace("-","")[0]):!1}function yl(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==se.Fragment:!1}function vl(t){const e=Z.createContext(null);return[({children:i,value:o})=>se.createElement(e.Provider,{value:o},i),()=>{const i=Z.useContext(e);if(i===null)throw new Error(t);return i}]}function NY(t=null){const e=Z.createContext(t);return[({children:i,value:o})=>se.createElement(e.Provider,{value:o},i),()=>Z.useContext(e)]}const LY={app:100,modal:200,popover:300,overlay:400,max:9999};function Ha(t){return LY[t]}const DY=()=>{};function FY(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||DY:r=>{var n;r.key==="Escape"&&(t(r),(n=e.onTrigger)==null||n.call(e))}}function zr(t,e="size",r=!0){if(t!==void 0)return UL(t)?r?Fe(t):t:`var(--${e}-${t})`}function yb(t){return zr(t,"mantine-spacing")}function bi(t){return t===void 0?"var(--mantine-radius-default)":zr(t,"mantine-radius")}function Fo(t){return zr(t,"mantine-font-size")}function $Y(t){return zr(t,"mantine-line-height",!1)}function BA(t){if(t)return zr(t,"mantine-shadow",!1)}function OA(t,e){return t in e.breakpoints?T9(e.breakpoints[t]):T9(t)}function ZC(t,e){const r=t.map(n=>({value:n,px:OA(n,e)}));return r.sort((n,i)=>n.px-i.px),r}function zL(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{Object.entries(r).forEach(([n,i])=>{e[n]?e[n]=cn(e[n],i):e[n]=i})}),e}function N5({theme:t,classNames:e,props:r,stylesCtx:n}){const o=(Array.isArray(e)?e:[e]).map(s=>typeof s=="function"?s(t,r,n):s||UY);return zY(o)}function j2({theme:t,styles:e,props:r,stylesCtx:n}){return(Array.isArray(e)?e:[e]).reduce((o,s)=>typeof s=="function"?{...o,...s(t,r,n)}:{...o,...s},{})}function jL(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function X0(t){const e=Z.useRef(t);return Z.useEffect(()=>{e.current=t}),Z.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function L5(t,e){const r=X0(t),n=Z.useRef(0);return Z.useEffect(()=>()=>window.clearTimeout(n.current),[]),Z.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,e)},[r,e])}const YC=["mousedown","touchstart"];function jY(t,e,r){const n=Z.useRef();return Z.useEffect(()=>{const i=o=>{const{target:s}=o??{};if(Array.isArray(r)){const f=(s==null?void 0:s.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(s)&&s.tagName!=="HTML";r.every(p=>!!p&&!o.composedPath().includes(p))&&!f&&t()}else n.current&&!n.current.contains(s)&&t()};return(e||YC).forEach(o=>document.addEventListener(o,i)),()=>{(e||YC).forEach(o=>document.removeEventListener(o,i))}},[n,t,r]),n}function HY({timeout:t=2e3}={}){const[e,r]=Z.useState(null),[n,i]=Z.useState(!1),[o,s]=Z.useState(null),f=b=>{window.clearTimeout(o),s(window.setTimeout(()=>i(!1),t)),i(b)};return{copy:b=>{"clipboard"in navigator?navigator.clipboard.writeText(b).then(()=>f(!0)).catch(v=>r(v)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{i(!1),r(null),window.clearTimeout(o)},error:e,copied:n}}function qY(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function GY(t,e){return typeof e=="boolean"?e:typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function HL(t,e,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,i]=Z.useState(r?e:GY(t,e)),o=Z.useRef();return Z.useEffect(()=>{if("matchMedia"in window)return o.current=window.matchMedia(t),i(o.current.matches),qY(o.current,s=>i(s.matches))},[t]),n}function VY(t,e){return HL("(prefers-color-scheme: dark)",t==="dark",e)?"dark":"light"}const Qp=typeof document<"u"?Z.useLayoutEffect:Z.useEffect;function Xu(t,e){const r=Z.useRef(!1);Z.useEffect(()=>()=>{r.current=!1},[]),Z.useEffect(()=>{if(r.current)return t();r.current=!0},e)}function qL({opened:t,shouldReturnFocus:e=!0}){const r=Z.useRef(),n=()=>{var i;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((i=r.current)==null||i.focus({preventScroll:!0}))};return Xu(()=>{let i=-1;const o=s=>{s.key==="Tab"&&window.clearTimeout(i)};return document.addEventListener("keydown",o),t?r.current=document.activeElement:e&&(i=window.setTimeout(n,10)),()=>{window.clearTimeout(i),document.removeEventListener("keydown",o)}},[t,e]),n}const KY=/input|select|textarea|button|object/,GL="a, input, select, textarea, button, object, [tabindex]";function WY(t){return t.style.display==="none"}function JY(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let r=t;for(;r&&!(r===document.body||r.nodeType===11);){if(WY(r))return!1;r=r.parentNode}return!0}function VL(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function R9(t){const e=t.nodeName.toLowerCase(),r=!Number.isNaN(VL(t));return(KY.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||r)&&JY(t)}function KL(t){const e=VL(t);return(Number.isNaN(e)||e>=0)&&R9(t)}function ZY(t){return Array.from(t.querySelectorAll(GL)).filter(KL)}function YY(t,e){const r=ZY(t);if(!r.length){e.preventDefault();return}const n=r[e.shiftKey?0:r.length-1],i=t.getRootNode();let o=n===i.activeElement||t===i.activeElement;const s=i.activeElement;if(s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(o=r.filter(b=>b.getAttribute("type")==="radio"&&b.getAttribute("name")===s.getAttribute("name")).includes(n)),!o)return;e.preventDefault();const d=r[e.shiftKey?r.length-1:0];d&&d.focus()}function QY(t,e="body > :not(script)"){const r=jL(),n=Array.from(document.querySelectorAll(e)).map(i=>{var d;if((d=i==null?void 0:i.shadowRoot)!=null&&d.contains(t)||i.contains(t))return;const o=i.getAttribute("aria-hidden"),s=i.getAttribute("data-hidden"),f=i.getAttribute("data-focus-id");return i.setAttribute("data-focus-id",r),o===null||o==="false"?i.setAttribute("aria-hidden","true"):!s&&!f&&i.setAttribute("data-hidden",o),{node:i,ariaHidden:s||null}});return()=>{n.forEach(i=>{!i||r!==i.node.getAttribute("data-focus-id")||(i.ariaHidden===null?i.node.removeAttribute("aria-hidden"):i.node.setAttribute("aria-hidden",i.ariaHidden),i.node.removeAttribute("data-focus-id"),i.node.removeAttribute("data-hidden"))})}}function XY(t=!0){const e=Z.useRef(),r=Z.useRef(null),n=o=>{let s=o.querySelector("[data-autofocus]");if(!s){const f=Array.from(o.querySelectorAll(GL));s=f.find(KL)||f.find(R9)||null,!s&&R9(o)&&(s=o)}s&&s.focus({preventScroll:!0})},i=Z.useCallback(o=>{if(t){if(o===null){r.current&&(r.current(),r.current=null);return}r.current=QY(o),e.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&n(o)}),e.current=o):e.current=null)}},[t]);return Z.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>n(e.current));const o=s=>{s.key==="Tab"&&e.current&&YY(e.current,s)};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),r.current&&r.current()}},[t]),i}const eQ=se["useId".toString()]||(()=>{});function tQ(){const t=eQ();return t?`mantine-${t.replace(/:/g,"")}`:""}function wl(t){const e=tQ(),[r,n]=Z.useState(e);return Qp(()=>{n(jL())},[]),typeof t=="string"?t:typeof window>"u"?e:r}function WL(t,e,r){Z.useEffect(()=>(window.addEventListener(t,e,r),()=>window.removeEventListener(t,e,r)),[t,e])}function JL(t,e){typeof t=="function"?t(e):typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function rQ(...t){return e=>{t.forEach(r=>JL(r,e))}}function Ui(...t){return Z.useCallback(rQ(...t),t)}function H2({value:t,defaultValue:e,finalValue:r,onChange:n=()=>{}}){const[i,o]=Z.useState(e!==void 0?e:r),s=f=>{o(f),n==null||n(f)};return t!==void 0?[t,n,!0]:[i,s,!1]}function ZL(t,e){return HL("(prefers-reduced-motion: reduce)",t,e)}function NA(t=!1,e){const{onOpen:r,onClose:n}=e||{},[i,o]=Z.useState(t),s=Z.useCallback(()=>{o(p=>p||(r==null||r(),!0))},[r]),f=Z.useCallback(()=>{o(p=>p&&(n==null||n(),!1))},[n]),d=Z.useCallback(()=>{i?f():s()},[f,s,i]);return[i,{open:s,close:f,toggle:d}]}const LA=Z.createContext(null);function D5(){const t=Z.useContext(LA);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function nQ(){return D5().cssVariablesResolver}function iQ(){return D5().classNamesPrefix}function DA(){return D5().getStyleNonce}const oQ={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#4a4a4a","#404040","#383838","#2e2e2e","#242424","#212121"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function k9(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function FA({color:t,theme:e,colorScheme:r}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Instead got ${typeof t}`);if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,variable:`--mantine-color-${t}`};const[n,i]=t.split("."),o=i?Number(i):void 0,s=n in e.colors;return s?{color:n,value:o!==void 0?e.colors[n][o]:e.colors[n][k9(e,r||"light")],shade:o,isThemeColor:s,variable:i?`--mantine-color-${n}-${o}`:`--mantine-color-${n}-filled`}:{color:t,value:t,isThemeColor:s,shade:o,variable:void 0}}function zf(t,e){const r=FA({color:t||e.primaryColor,theme:e});return r.variable?`var(${r.variable})`:t}function B9(t,e){const r={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(t==null?void 0:t.deg)||e.defaultGradient.deg||0},n=zf(r.from,e),i=zf(r.to,e);return`linear-gradient(${r.deg}deg, ${n} 0%, ${i} 100%)`}function sQ(t){return/^#?([0-9A-F]{3}){1,2}$/i.test(t)}function aQ(t){let e=t.replace("#","");if(e.length===3){const s=e.split("");e=[s[0],s[0],s[1],s[1],s[2],s[2]].join("")}const r=parseInt(e,16),n=r>>16&255,i=r>>8&255,o=r&255;return{r:n,g:i,b:o,a:1}}function fQ(t){const[e,r,n,i]=t.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:e,g:r,b:n,a:i||1}}function cQ(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,r=t.match(e);if(!r)return{r:0,g:0,b:0,a:1};const n=parseInt(r[1],10),i=parseInt(r[2],10)/100,o=parseInt(r[3],10)/100,s=r[5]?parseFloat(r[5]):void 0,f=(1-Math.abs(2*o-1))*i,d=n/60,p=f*(1-Math.abs(d%2-1)),b=o-f/2;let v,A,_;return d>=0&&d<1?(v=f,A=p,_=0):d>=1&&d<2?(v=p,A=f,_=0):d>=2&&d<3?(v=0,A=f,_=p):d>=3&&d<4?(v=0,A=p,_=f):d>=4&&d<5?(v=p,A=0,_=f):(v=f,A=0,_=p),{r:Math.round((v+b)*255),g:Math.round((A+b)*255),b:Math.round((_+b)*255),a:s||1}}function YL(t){return sQ(t)?aQ(t):t.startsWith("rgb")?fQ(t):t.startsWith("hsl")?cQ(t):{r:0,g:0,b:0,a:1}}function Fy(t,e){if(t.startsWith("var("))return t;const{r,g:n,b:i,a:o}=YL(t),s=1-e,f=d=>Math.round(d*s);return`rgba(${f(r)}, ${f(n)}, ${f(i)}, ${o})`}function ii(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";const{r,g:n,b:i}=YL(t);return`rgba(${r}, ${n}, ${i}, ${e})`}const uQ=({color:t,theme:e,variant:r,gradient:n})=>{const i=FA({color:t,theme:e});if(r==="filled")return i.isThemeColor?i.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:"var(--mantine-color-white)",border:`${Fe(1)} solid transparent`}:{background:`var(--mantine-color-${i.color}-${i.shade})`,hover:`var(--mantine-color-${i.color}-${i.shade===9?8:i.shade+1})`,color:"var(--mantine-color-white)",border:`${Fe(1)} solid transparent`}:{background:t,hover:Fy(t,.1),color:"var(--mantine-color-white)",border:`${Fe(1)} solid transparent`};if(r==="light"){if(i.isThemeColor){if(i.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Fe(1)} solid transparent`};const o=e.colors[i.color][i.shade];return{background:ii(o,.1),hover:ii(o,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Fe(1)} solid transparent`}}return{background:ii(t,.1),hover:ii(t,.12),color:t,border:`${Fe(1)} solid transparent`}}if(r==="outline")return i.isThemeColor?i.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${Fe(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:ii(e.colors[i.color][i.shade],.05),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Fe(1)} solid var(--mantine-color-${i.color}-${i.shade})`}:{background:"transparent",hover:ii(t,.05),color:t,border:`${Fe(1)} solid ${t}`};if(r==="subtle"){if(i.isThemeColor){if(i.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Fe(1)} solid transparent`};const o=e.colors[i.color][i.shade];return{background:"transparent",hover:ii(o,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Fe(1)} solid transparent`}}return{background:"transparent",hover:ii(t,.12),color:t,border:`${Fe(1)} solid transparent`}}return r==="transparent"?i.isThemeColor?i.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${Fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${Fe(1)} solid transparent`}:r==="white"?i.isThemeColor?i.shade===void 0?{background:"var(--mantine-color-white)",hover:Fy(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${Fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Fy(e.white,.01),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Fy(e.white,.01),color:t,border:`${Fe(1)} solid transparent`}:r==="gradient"?{background:B9(n,e),hover:B9(n,e),color:"var(--mantine-color-white)",border:"none"}:r==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${Fe(1)} solid var(--mantine-color-default-border)`}:{}},QC="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",$A={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:oQ,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:uQ,fontFamily:QC,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:QC,fontWeight:"700",sizes:{h1:{fontSize:Fe(34),lineHeight:"1.3"},h2:{fontSize:Fe(26),lineHeight:"1.35"},h3:{fontSize:Fe(22),lineHeight:"1.4"},h4:{fontSize:Fe(18),lineHeight:"1.45"},h5:{fontSize:Fe(16),lineHeight:"1.5"},h6:{fontSize:Fe(14),lineHeight:"1.5"}}},fontSizes:{xs:Fe(12),sm:Fe(14),md:Fe(16),lg:Fe(18),xl:Fe(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:Fe(2),sm:Fe(4),md:Fe(8),lg:Fe(16),xl:Fe(32)},spacing:{xs:Fe(10),sm:Fe(12),md:Fe(16),lg:Fe(20),xl:Fe(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), 0 ${Fe(1)} ${Fe(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(10)} ${Fe(15)} ${Fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${Fe(7)} ${Fe(7)} ${Fe(-5)}`,md:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(20)} ${Fe(25)} ${Fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${Fe(10)} ${Fe(10)} ${Fe(-5)}`,lg:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(28)} ${Fe(23)} ${Fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${Fe(12)} ${Fe(12)} ${Fe(-7)}`,xl:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(36)} ${Fe(28)} ${Fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${Fe(17)} ${Fe(17)} ${Fe(-7)}`},other:{},components:{}};function lQ(){const t=console.error;console.error=(...e)=>{e.length>1&&typeof e[0]=="string"&&e[0].toLowerCase().includes("extra attributes from the server")&&typeof e[1]=="string"&&e[1].toLowerCase().includes("data-mantine-color-scheme")||t(...e)}}const dQ="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",XC="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function U3(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function eI(t){if(!(t.primaryColor in t.colors))throw new Error(dQ);if(typeof t.primaryShade=="object"&&(!U3(t.primaryShade.dark)||!U3(t.primaryShade.light)))throw new Error(XC);if(typeof t.primaryShade=="number"&&!U3(t.primaryShade))throw new Error(XC)}function hQ(t,e){var n;if(!e)return eI(t),t;const r=RA(t,e);return e.fontFamily&&!((n=e.headings)!=null&&n.fontFamily)&&(r.headings.fontFamily=e.fontFamily),eI(r),r}const UA=Z.createContext(null),pQ=()=>Z.useContext(UA)||$A;function ta(){const t=Z.useContext(UA);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function QL({theme:t,children:e,inherit:r=!0}){const n=pQ(),i=Z.useMemo(()=>hQ(r?n:$A,t),[t,n,r]);return se.createElement(UA.Provider,{value:i},e)}QL.displayName="@mantine/core/MantineThemeProvider";function z3(t){return Object.entries(t).map(([e,r])=>`${e}: ${r};`).join("")}function j3(t,e){return(Array.isArray(t)?t:[t]).reduce((n,i)=>`${i}{${n}}`,e)}function mQ(t,e){const r=z3(t.variables),n=r?j3(e,r):"",i=z3(t.dark),o=i?j3(`${e}[data-mantine-color-scheme="dark"]`,i):"",s=z3(t.light),f=s?j3(`${e}[data-mantine-color-scheme="light"]`,s):"";return`${n}${o}${f}`}function Vl(t,e,r){Cn(e).forEach(n=>Object.assign(t,{[`--mantine-${r}-${n}`]:e[n]}))}const XL=t=>{const e=k9(t,"dark"),r=k9(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:Fe(t.defaultRadius),i={variables:{"--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-color-scheme":"light dark","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${r})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)"},dark:{"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)"}};Vl(i.variables,t.breakpoints,"breakpoint"),Vl(i.variables,t.spacing,"spacing"),Vl(i.variables,t.fontSizes,"font-size"),Vl(i.variables,t.lineHeights,"line-height"),Vl(i.variables,t.shadows,"shadow"),Vl(i.variables,t.radius,"radius"),Cn(t.colors).forEach(s=>{t.colors[s].forEach((p,b)=>{i.variables[`--mantine-color-${s}-${b}`]=p});const f=`var(--mantine-color-${s}-${r===9?8:r+1})`,d=`var(--mantine-color-${s}-${e===9?8:e+1})`;i.light["--mantine-color-dimmed"]="var(--mantine-color-gray-6)",i.light[`--mantine-color-${s}-text`]=`var(--mantine-color-${s}-filled)`,i.light[`--mantine-color-${s}-filled`]=`var(--mantine-color-${s}-${r})`,i.light[`--mantine-color-${s}-filled-hover`]=f,i.light[`--mantine-color-${s}-light`]=ii(t.colors[s][r],.1),i.light[`--mantine-color-${s}-light-hover`]=ii(t.colors[s][r],.12),i.light[`--mantine-color-${s}-light-color`]=`var(--mantine-color-${s}-${r})`,i.light[`--mantine-color-${s}-outline`]=`var(--mantine-color-${s}-${r})`,i.light[`--mantine-color-${s}-outline-hover`]=ii(t.colors[s][r],.05),i.dark["--mantine-color-dimmed"]="var(--mantine-color-dark-2)",i.dark[`--mantine-color-${s}-text`]=`var(--mantine-color-${s}-4)`,i.dark[`--mantine-color-${s}-filled`]=`var(--mantine-color-${s}-${e})`,i.dark[`--mantine-color-${s}-filled-hover`]=d,i.dark[`--mantine-color-${s}-light`]=ii(t.colors[s][Math.max(0,e-2)],.15),i.dark[`--mantine-color-${s}-light-hover`]=ii(t.colors[s][Math.max(0,e-2)],.2),i.dark[`--mantine-color-${s}-light-color`]=`var(--mantine-color-${s}-${Math.max(e-5,0)})`,i.dark[`--mantine-color-${s}-outline`]=`var(--mantine-color-${s}-${Math.max(e-4,0)})`,i.dark[`--mantine-color-${s}-outline-hover`]=ii(t.colors[s][Math.max(e-4,0)],.05)});const o=t.headings.sizes;return Cn(o).forEach(s=>{i.variables[`--mantine-${s}-font-size`]=o[s].fontSize,i.variables[`--mantine-${s}-line-height`]=o[s].lineHeight,i.variables[`--mantine-${s}-font-weight`]=o[s].fontWeight||t.headings.fontWeight}),i};function gQ({theme:t,generator:e}){const r=XL(t),n=e==null?void 0:e(t);return n?RA(r,n):r}const H3=XL($A);function bQ(t){const e={variables:{},light:{},dark:{}};return Cn(t.variables).forEach(r=>{H3.variables[r]!==t.variables[r]&&(e.variables[r]=t.variables[r])}),Cn(t.light).forEach(r=>{H3.light[r]!==t.light[r]&&(e.light[r]=t.light[r])}),Cn(t.dark).forEach(r=>{H3.dark[r]!==t.dark[r]&&(e.dark[r]=t.dark[r])}),e}function yQ(t){return` ${t}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; } ${t}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; } -`}function eD({cssVariablesSelector:t}){const e=ta(),r=DA(),n=nQ(),i=gQ({theme:e,generator:n}),o=t===":root",s=o?bQ(i):i,f=mQ(s,t);return f?se.createElement("style",{"data-mantine-styles":!0,nonce:r==null?void 0:r(),dangerouslySetInnerHTML:{__html:`${f}${o?"":yQ(t)}`}}):null}eD.displayName="@mantine/CssVariables";function vQ(){const t=ta(),e=DA(),r=Cn(t.breakpoints).reduce((n,i)=>{const o=T9(t.breakpoints[i]);return`${n}@media (max-width: ${z2(o-.1)}) {.mantine-visible-from-${i} {display: none !important;}}@media (min-width: ${z2(o)}) {.mantine-hidden-from-${i} {display: none !important;}}`},"");return se.createElement("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:r}})}function tI(t){return t==="auto"||t==="dark"||t==="light"}function wQ({key:t="mantine-color-scheme-value"}={}){let e;return{get:r=>{if(typeof window>"u")return r;try{const n=window.localStorage.getItem(t);return tI(n)?n:r}catch{return r}},set:r=>{try{window.localStorage.setItem(t,r)}catch(n){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",n)}},subscribe:r=>{e=n=>{n.storageArea===window.localStorage&&n.key===t&&tI(n.newValue)&&r(n.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}function D1(t,e){var n;const r=t!=="auto"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";(n=e())==null||n.setAttribute("data-mantine-color-scheme",r)}function xQ({manager:t,defaultColorScheme:e,getRootElement:r,forceColorScheme:n}){const i=Z.useRef(),[o,s]=Z.useState(()=>t.get(e)),f=n||o,d=Z.useCallback(b=>{n||(D1(b,r),s(b),t.set(b))},[t.set,f,n]),p=Z.useCallback(()=>{s(e),D1(e,r),t.clear()},[t.clear,e]);return Z.useEffect(()=>(t.subscribe(d),t.unsubscribe),[t.subscribe,t.unsubscribe]),Qp(()=>{D1(t.get(e),r)},[]),Z.useEffect(()=>{var v;if(n)return D1(n,r),()=>{};i.current=window.matchMedia("(prefers-color-scheme: dark)");const b=A=>{o==="auto"&&D1(A.matches?"dark":"light",r)};return(v=i.current)==null||v.addEventListener("change",b),()=>{var A;return(A=i.current)==null?void 0:A.removeEventListener("change",b)}},[o,n]),{colorScheme:f,setColorScheme:d,clearColorScheme:p}}function EQ({respectReducedMotion:t,getRootElement:e}){Qp(()=>{var r;t&&((r=e())==null||r.setAttribute("data-respect-reduced-motion","true"))},[t])}lQ();function tD({theme:t,children:e,getStyleNonce:r,withCssVariables:n=!0,cssVariablesSelector:i=":root",classNamesPrefix:o="mantine",colorSchemeManager:s=wQ(),defaultColorScheme:f="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:b}){const{colorScheme:v,setColorScheme:A,clearColorScheme:_}=xQ({defaultColorScheme:f,forceColorScheme:b,manager:s,getRootElement:d});return EQ({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:d}),se.createElement(LA.Provider,{value:{colorSchemeManager:s,colorScheme:v,setColorScheme:A,clearColorScheme:_,getRootElement:d,classNamesPrefix:o,getStyleNonce:r,cssVariablesResolver:p,cssVariablesSelector:i}},se.createElement(QL,{theme:t},n&&se.createElement(eD,{cssVariablesSelector:i}),se.createElement(vQ,null),e))}tD.displayName="@mantine/core/MantineProvider";function AQ({classNames:t,styles:e,props:r,stylesCtx:n}){const i=ta();return{resolvedClassNames:N5({theme:i,classNames:t,props:r,stylesCtx:n||void 0}),resolvedStyles:j2({theme:i,styles:e,props:r,stylesCtx:n||void 0})}}const SQ={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function MQ({theme:t,options:e,unstyled:r}){return cn((e==null?void 0:e.focusable)&&!r&&(t.focusClassName||SQ[t.focusRing]),(e==null?void 0:e.active)&&!r&&t.activeClassName)}function _Q({themeName:t,classNamesPrefix:e,selector:r}){return t.map(n=>`${e}-${n}-${r}`)}function PQ({themeName:t,theme:e,selector:r,props:n,stylesCtx:i}){return t.map(o=>{var s,f;return(f=N5({theme:e,classNames:(s=e.components[o])==null?void 0:s.classNames,props:n,stylesCtx:i}))==null?void 0:f[r]})}function CQ({options:t,classes:e,selector:r,unstyled:n}){return t!=null&&t.variant&&!n?e[`${r}--${t.variant}`]:void 0}function IQ({rootSelector:t,selector:e,className:r}){return t===e?r:void 0}function TQ({selector:t,classes:e,unstyled:r}){return r?void 0:e[t]}function RQ({selector:t,stylesCtx:e,theme:r,classNames:n,props:i}){return N5({theme:r,classNames:n,props:i,stylesCtx:e})[t]}function kQ({selector:t,stylesCtx:e,options:r,props:n,theme:i}){return N5({theme:i,classNames:r==null?void 0:r.classNames,props:(r==null?void 0:r.props)||n,stylesCtx:e})[t]}function BQ({theme:t,options:e,themeName:r,selector:n,classNamesPrefix:i,classNames:o,classes:s,unstyled:f,className:d,rootSelector:p,props:b,stylesCtx:v}){return cn(MQ({theme:t,options:e,unstyled:f}),PQ({theme:t,themeName:r,selector:n,props:b,stylesCtx:v}),CQ({options:e,classes:s,selector:n,unstyled:f}),RQ({selector:n,stylesCtx:v,theme:t,classNames:o,props:b}),kQ({selector:n,stylesCtx:v,options:e,props:b,theme:t}),IQ({rootSelector:p,selector:n,className:d}),TQ({selector:n,classes:s,unstyled:f}),_Q({themeName:r,classNamesPrefix:i,selector:n}),e==null?void 0:e.className)}function OQ({theme:t,themeName:e,props:r,stylesCtx:n,selector:i}){return e.map(o=>{var s;return j2({theme:t,styles:(s=t.components[o])==null?void 0:s.styles,props:r,stylesCtx:n})[i]}).reduce((o,s)=>({...o,...s}),{})}function O9({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((r,n)=>({...r,...O9({style:n,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function NQ(t){return t.reduce((e,r)=>(r&&Object.keys(r).forEach(n=>{e[n]={...e[n],...kA(r[n])}}),e),{})}function LQ({vars:t,varsResolver:e,theme:r,props:n,stylesCtx:i,selector:o,themeName:s}){var f;return(f=NQ([e==null?void 0:e(r,n,i),...s.map(d=>{var p,b,v;return(v=(b=(p=r.components)==null?void 0:p[d])==null?void 0:b.vars)==null?void 0:v.call(b,r,n,i)}),t==null?void 0:t(r,n,i)]))==null?void 0:f[o]}function DQ({theme:t,themeName:e,selector:r,options:n,props:i,stylesCtx:o,rootSelector:s,styles:f,style:d,vars:p,varsResolver:b}){return{...OQ({theme:t,themeName:e,props:i,stylesCtx:o,selector:r}),...j2({theme:t,styles:f,props:i,stylesCtx:o})[r],...j2({theme:t,styles:n==null?void 0:n.styles,props:(n==null?void 0:n.props)||i,stylesCtx:o})[r],...LQ({theme:t,props:i,stylesCtx:o,vars:p,varsResolver:b,selector:r,themeName:e}),...s===r?O9({style:d,theme:t}):null,...O9({style:n==null?void 0:n.style,theme:t})}}function Ht({name:t,classes:e,props:r,stylesCtx:n,className:i,style:o,rootSelector:s="root",unstyled:f,classNames:d,styles:p,vars:b,varsResolver:v}){const A=ta(),_=iQ(),S=(Array.isArray(t)?t:[t]).filter(P=>P);return(P,I)=>({className:BQ({theme:A,options:I,themeName:S,selector:P,classNamesPrefix:_,classNames:d,classes:e,unstyled:f,className:i,rootSelector:s,props:r,stylesCtx:n}),style:DQ({theme:A,themeName:S,selector:P,options:I,props:r,stylesCtx:n,rootSelector:s,styles:p,style:o,vars:b,varsResolver:v})})}function rI(){const t=document.createElement("style");return t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(r=>r.remove())}function FQ({keepTransitions:t}={}){const e=Z.useRef(),r=Z.useRef(),n=Z.useContext(LA);if(!n)throw new Error("[@mantine/core] MantineProvider was not found in tree");const i=p=>{n.setColorScheme(p),e.current=t?()=>{}:rI(),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{var b;(b=e.current)==null||b.call(e)},10)},o=()=>{n.clearColorScheme(),e.current=t?()=>{}:rI(),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{var p;(p=e.current)==null||p.call(e)},10)},s=VY("light",{getInitialValueInEffect:!1}),f=n.colorScheme==="auto"?s:n.colorScheme,d=Z.useCallback(()=>i(f==="light"?"dark":"light"),[i,f]);return Z.useEffect(()=>()=>{var p;(p=e.current)==null||p.call(e),window.clearTimeout(r.current)},[]),{colorScheme:n.colorScheme,setColorScheme:i,clearColorScheme:o,toggleColorScheme:d}}function Ye(t,e,r){var s;const n=ta(),i=(s=n.components[t])==null?void 0:s.defaultProps,o=typeof i=="function"?i(n):i;return{...e,...o,...kA(r)}}function nI(t){return Cn(t).reduce((e,r)=>t[r]!==void 0?`${e}${BY(r)}:${t[r]};`:e,"").trim()}function $Q({selector:t,styles:e,media:r}){const n=e?nI(e):"",i=Array.isArray(r)?r.map(o=>`@media${o.query}{${t}{${nI(o.styles)}}}`):[];return`${n?`${t}{${n}}`:""}${i.join("")}`.trim()}function rD({selector:t,styles:e,media:r}){const n=DA();return se.createElement("style",{"data-mantine-styles":"inline",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:$Q({selector:t,styles:e,media:r})}})}function zA(t){const{m:e,mx:r,my:n,mt:i,mb:o,ml:s,mr:f,p:d,px:p,py:b,pt:v,pb:A,pl:_,pr:S,bg:P,c:I,opacity:C,ff:T,fz:O,fw:B,lts:D,ta:U,lh:K,fs:Y,tt:W,td:ie,w:x,miw:a,maw:u,h:l,mih:h,mah:m,bgsz:w,bgp:E,bgr:y,bga:c,pos:g,top:M,left:k,bottom:L,right:R,inset:F,display:z,hiddenFrom:V,visibleFrom:q,lightHidden:Q,darkHidden:G,...H}=t;return{styleProps:kA({m:e,mx:r,my:n,mt:i,mb:o,ml:s,mr:f,p:d,px:p,py:b,pt:v,pb:A,pl:_,pr:S,bg:P,c:I,opacity:C,ff:T,fz:O,fw:B,lts:D,ta:U,lh:K,fs:Y,tt:W,td:ie,w:x,miw:a,maw:u,h:l,mih:h,mah:m,bgsz:w,bgp:E,bgr:y,bga:c,pos:g,top:M,left:k,bottom:L,right:R,inset:F,display:z,hiddenFrom:V,visibleFrom:q,lightHidden:Q,darkHidden:G}),rest:H}}const UQ={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};function zQ(t,e){const r=FA({color:t,theme:e});return r.color==="dimmed"?"var(--mantine-color-dimmed)":r.color==="bright"?"var(--mantine-color-bright)":r.isThemeColor&&r.shade===void 0?`var(--mantine-color-${r.color}-text)`:r.variable?`var(${r.variable})`:r.color}function jQ(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="number"||typeof t=="string"?Fe(t):t}function HQ(t,e){if(typeof t=="number")return Fe(t);if(typeof t=="string"){const r=t.replace("-","");if(!(r in e.spacing))return Fe(t);const n=`--mantine-spacing-${r}`;return t.startsWith("-")?`calc(var(${n}) * -1)`:`var(${n})`}return t}function qQ(t){return t}function GQ(t){return typeof t=="number"?Fe(t):t}function VQ(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-line-height-${t})`:t}const q3={color:zQ,fontSize:jQ,spacing:HQ,identity:qQ,size:GQ,lineHeight:VQ};function iI(t){return t.replace("(min-width: ","").replace("em)","")}function KQ({media:t,...e}){const n=Object.keys(t).sort((i,o)=>Number(iI(i))-Number(iI(o))).map(i=>({query:i,styles:t[i]}));return{...e,media:n}}function WQ(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function JQ(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function ZQ(t){return typeof t=="object"&&t!==null?Cn(t).filter(e=>e!=="base"):[]}function YQ(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function QQ({styleProps:t,data:e,theme:r}){return KQ(Cn(t).reduce((n,i)=>{if(i==="hiddenFrom"||i==="visibleFrom")return n;const o=e[i],s=Array.isArray(o.property)?o.property:[o.property],f=JQ(t[i]);if(!WQ(t[i]))return s.forEach(p=>{n.inlineStyles[p]=q3[o.type](f,r)}),n;n.hasResponsiveStyles=!0;const d=ZQ(t[i]);return s.forEach(p=>{f&&(n.styles[p]=q3[o.type](f,r)),d.forEach(b=>{const v=`(min-width: ${r.breakpoints[b]})`;n.media[v]={...n.media[v],[p]:q3[o.type](YQ(t[i],b),r)}})}),n},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function XQ(){return`__m__-${Z.useId().replace(/:/g,"")}`}function nD(t,e){return Array.isArray(t)?[...t].reduce((r,n)=>({...r,...nD(n,e)}),{}):typeof t=="function"?t(e):t??{}}function N9(t,e){return Array.isArray(t)?[...t].reduce((r,n)=>({...r,...N9(n,e)}),{}):typeof t=="function"?t(e):t??{}}function eX({theme:t,style:e,vars:r,styleProps:n}){const i=N9(e,t),o=N9(r,t);return{...i,...o,...n}}function iD(t){return t.startsWith("data-")?t:`data-${t}`}function tX(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return n===void 0||n===""||n===!1||n===null||(e[iD(r)]=t[r]),e},{})}function oD(t){return t?typeof t=="string"?{[iD(t)]:!0}:Array.isArray(t)?[...t].reduce((e,r)=>({...e,...oD(r)}),{}):tX(t):null}const sD=Z.forwardRef(({component:t,style:e,__vars:r,className:n,variant:i,mod:o,size:s,hiddenFrom:f,visibleFrom:d,lightHidden:p,darkHidden:b,renderRoot:v,...A},_)=>{const S=ta(),P=t||"div",{styleProps:I,rest:C}=zA(A),T=XQ(),O=QQ({styleProps:I,theme:S,data:UQ}),B={ref:_,style:eX({theme:S,style:e,vars:r,styleProps:O.inlineStyles}),className:cn(n,{[T]:O.hasResponsiveStyles,"mantine-light-hidden":p,"mantine-dark-hidden":b,[`mantine-hidden-from-${f}`]:f,[`mantine-visible-from-${d}`]:d}),"data-variant":i,"data-size":UL(s)?void 0:s||void 0,...oD(o),...C};return se.createElement(se.Fragment,null,O.hasResponsiveStyles&&se.createElement(rD,{selector:`.${T}`,styles:O.styles,media:O.media}),typeof v=="function"?v(B):se.createElement(P,{...B}))});sD.displayName="@mantine/core/Box";const ft=sD;function aD(t){return t}function Et(t){const e=Z.forwardRef(t);return e.extend=aD,e}function zi(t){const e=Z.forwardRef(t);return e.extend=aD,e}const rX=Z.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function F5(){return Z.useContext(rX)}const[nX,ts]=vl("ScrollArea.Root component was not found in tree");function tp(t,e){const r=X0(e);Qp(()=>{let n=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(t),()=>{window.cancelAnimationFrame(n),i.unobserve(t)}}},[t,r])}const[iX,fD]=vl("ScrollAreaScrollbar was not found in tree");function Lu(t,e,{checkForDefaultPrevented:r=!0}={}){return n=>{t==null||t(n),(r===!1||!n.defaultPrevented)&&(e==null||e(n))}}const cD=Z.forwardRef((t,e)=>{const{sizes:r,hasThumb:n,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:p,onResize:b,...v}=t,A=ts(),[_,S]=se.useState(null),P=Ui(e,Y=>S(Y)),I=se.useRef(null),C=se.useRef(""),{viewport:T}=A,O=r.content-r.viewport,B=X0(p),D=X0(f),U=L5(b,10),K=Y=>{if(I.current){const W=Y.clientX-I.current.left,ie=Y.clientY-I.current.top;d({x:W,y:ie})}};return Z.useEffect(()=>{const Y=W=>{const ie=W.target;(_==null?void 0:_.contains(ie))&&B(W,O)};return document.addEventListener("wheel",Y,{passive:!1}),()=>document.removeEventListener("wheel",Y,{passive:!1})},[T,_,O,B]),Z.useEffect(D,[r,D]),tp(_,U),tp(A.content,U),se.createElement(iX,{value:{scrollbar:_,hasThumb:n,onThumbChange:X0(i),onThumbPointerUp:X0(o),onThumbPositionChange:D,onThumbPointerDown:X0(s)}},se.createElement("div",{...v,ref:P,style:{position:"absolute",...v.style},onPointerDown:Lu(t.onPointerDown,Y=>{Y.button===0&&(Y.target.setPointerCapture(Y.pointerId),I.current=_.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",K(Y))}),onPointerMove:Lu(t.onPointerMove,K),onPointerUp:Lu(t.onPointerUp,Y=>{const W=Y.target;W.hasPointerCapture(Y.pointerId)&&W.releasePointerCapture(Y.pointerId),document.body.style.webkitUserSelect=C.current,I.current=null})}))});function uD(t,e){return t>0&&t{const{sizes:r,onSizesChange:n,style:i,...o}=t,s=ts(),[f,d]=Z.useState(),p=Z.useRef(null),b=Ui(e,p,s.onScrollbarXChange);return Z.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),se.createElement(cD,{"data-orientation":"horizontal",...o,ref:b,sizes:r,style:{...i,"--sa-thumb-width":`${$5(r)}px`},onThumbPointerDown:v=>t.onThumbPointerDown(v.x),onDragScroll:v=>t.onDragScroll(v.x),onWheelScroll:(v,A)=>{if(s.viewport){const _=s.viewport.scrollLeft+v.deltaX;t.onWheelScroll(_),uD(_,A)&&v.preventDefault()}},onResize:()=>{p.current&&s.viewport&&f&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:q2(f.paddingLeft),paddingEnd:q2(f.paddingRight)}})}})}),sX=Z.forwardRef((t,e)=>{const{sizes:r,onSizesChange:n,style:i,...o}=t,s=ts(),[f,d]=se.useState(),p=Z.useRef(null),b=Ui(e,p,s.onScrollbarYChange);return Z.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),se.createElement(cD,{...o,"data-orientation":"vertical",ref:b,sizes:r,style:{"--sa-thumb-height":`${$5(r)}px`,...i},onThumbPointerDown:v=>t.onThumbPointerDown(v.y),onDragScroll:v=>t.onDragScroll(v.y),onWheelScroll:(v,A)=>{if(s.viewport){const _=s.viewport.scrollTop+v.deltaY;t.onWheelScroll(_),uD(_,A)&&v.preventDefault()}},onResize:()=>{p.current&&s.viewport&&f&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:q2(f.paddingTop),paddingEnd:q2(f.paddingBottom)}})}})});function dD(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(t[1]-t[0]);return e[0]+n*(r-t[0])}}function aX(t,[e,r]){return Math.min(r,Math.max(e,t))}function oI(t,e,r="ltr"){const n=$5(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-i,s=e.content-e.viewport,f=o-n,d=r==="ltr"?[0,s]:[s*-1,0],p=aX(t,d);return dD([0,s],[0,f])(p)}function fX(t,e,r,n="ltr"){const i=$5(r),o=i/2,s=e||o,f=i-s,d=r.scrollbar.paddingStart+s,p=r.scrollbar.size-r.scrollbar.paddingEnd-f,b=r.content-r.viewport,v=n==="ltr"?[0,b]:[b*-1,0];return dD([d,p],v)(t)}const jA=Z.forwardRef((t,e)=>{const{orientation:r="vertical",...n}=t,{dir:i}=F5(),o=ts(),s=Z.useRef(null),f=Z.useRef(0),[d,p]=Z.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),b=lD(d.viewport,d.content),v={...n,sizes:d,onSizesChange:p,hasThumb:b>0&&b<1,onThumbChange:_=>{s.current=_},onThumbPointerUp:()=>{f.current=0},onThumbPointerDown:_=>{f.current=_}},A=(_,S)=>fX(_,f.current,d,S);return r==="horizontal"?se.createElement(oX,{...v,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const _=o.viewport.scrollLeft,S=oI(_,d,i);s.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:_=>{o.viewport&&(o.viewport.scrollLeft=_)},onDragScroll:_=>{o.viewport&&(o.viewport.scrollLeft=A(_,i))}}):r==="vertical"?se.createElement(sX,{...v,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const _=o.viewport.scrollTop,S=oI(_,d);s.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:_=>{o.viewport&&(o.viewport.scrollTop=_)},onDragScroll:_=>{o.viewport&&(o.viewport.scrollTop=A(_))}}):null}),hD=Z.forwardRef((t,e)=>{const r=ts(),{forceMount:n,...i}=t,[o,s]=Z.useState(!1),f=t.orientation==="horizontal",d=L5(()=>{if(r.viewport){const p=r.viewport.offsetWidth{const{forceMount:r,...n}=t,i=ts(),[o,s]=Z.useState(!1);return Z.useEffect(()=>{const{scrollArea:f}=i;let d=0;if(f){const p=()=>{window.clearTimeout(d),s(!0)},b=()=>{d=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return f.addEventListener("pointerenter",p),f.addEventListener("pointerleave",b),()=>{window.clearTimeout(d),f.removeEventListener("pointerenter",p),f.removeEventListener("pointerleave",b)}}},[i.scrollArea,i.scrollHideDelay]),r||o?se.createElement(hD,{"data-state":o?"visible":"hidden",...n,ref:e}):null}),uX=Z.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=ts(),o=t.orientation==="horizontal",[s,f]=Z.useState("hidden"),d=L5(()=>f("idle"),100);return Z.useEffect(()=>{if(s==="idle"){const p=window.setTimeout(()=>f("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(p)}},[s,i.scrollHideDelay]),Z.useEffect(()=>{const{viewport:p}=i,b=o?"scrollLeft":"scrollTop";if(p){let v=p[b];const A=()=>{const _=p[b];v!==_&&(f("scrolling"),d()),v=_};return p.addEventListener("scroll",A),()=>p.removeEventListener("scroll",A)}},[i.viewport,o,d]),r||s!=="hidden"?se.createElement(jA,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:e,onPointerEnter:Lu(t.onPointerEnter,()=>f("interacting")),onPointerLeave:Lu(t.onPointerLeave,()=>f("idle"))}):null}),sI=se.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=ts(),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,f=t.orientation==="horizontal";return se.useEffect(()=>(f?o(!0):s(!0),()=>{f?o(!1):s(!1)}),[f,o,s]),i.type==="hover"?se.createElement(cX,{...n,ref:e,forceMount:r}):i.type==="scroll"?se.createElement(uX,{...n,ref:e,forceMount:r}):i.type==="auto"?se.createElement(hD,{...n,ref:e,forceMount:r}):i.type==="always"?se.createElement(jA,{...n,ref:e}):null}),lX=se.forwardRef((t,e)=>{const{style:r,...n}=t,i=ts(),[o,s]=se.useState(0),[f,d]=se.useState(0),p=!!(o&&f);return tp(i.scrollbarX,()=>{var v;const b=((v=i.scrollbarX)==null?void 0:v.offsetHeight)||0;i.onCornerHeightChange(b),d(b)}),tp(i.scrollbarY,()=>{var v;const b=((v=i.scrollbarY)==null?void 0:v.offsetWidth)||0;i.onCornerWidthChange(b),s(b)}),p?se.createElement("div",{...n,ref:e,style:{...r,width:o,height:f}}):null}),dX=se.forwardRef((t,e)=>{const r=ts(),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?se.createElement(lX,{...t,ref:e}):null}),hX={scrollHideDelay:1e3,type:"hover"},pD=Z.forwardRef((t,e)=>{const r=Ye("ScrollAreaRoot",hX,t),{type:n,scrollHideDelay:i,...o}=r,[s,f]=Z.useState(null),[d,p]=Z.useState(null),[b,v]=Z.useState(null),[A,_]=Z.useState(null),[S,P]=Z.useState(null),[I,C]=Z.useState(0),[T,O]=Z.useState(0),[B,D]=Z.useState(!1),[U,K]=Z.useState(!1),Y=Ui(e,W=>f(W));return se.createElement(nX,{value:{type:n,scrollHideDelay:i,scrollArea:s,viewport:d,onViewportChange:p,content:b,onContentChange:v,scrollbarX:A,onScrollbarXChange:_,scrollbarXEnabled:B,onScrollbarXEnabledChange:D,scrollbarY:S,onScrollbarYChange:P,scrollbarYEnabled:U,onScrollbarYEnabledChange:K,onCornerWidthChange:C,onCornerHeightChange:O}},se.createElement(ft,{...o,ref:Y,__vars:{"--sa-corner-width":`${I}px`,"--sa-corner-height":`${T}px`}}))});pD.displayName="@mantine/core/ScrollAreaRoot";const mD=Z.forwardRef(({children:t,style:e,...r},n)=>{const i=ts(),o=Ui(n,i.onViewportChange);return se.createElement(ft,{...r,ref:o,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e}},se.createElement("div",{style:{minWidth:"100%",display:"table"},ref:i.onContentChange},t))});mD.displayName="@mantine/core/ScrollAreaViewport";var HA={root:"m-d57069b5",viewport:"m-c0783ff9",viewportInner:"m-f8f631dd",scrollbar:"m-c44ba933",thumb:"m-d8b5e363",corner:"m-21657268"};function pX(t,e=()=>{}){let r={left:t.scrollLeft,top:t.scrollTop},n=0;return function i(){const o={left:t.scrollLeft,top:t.scrollTop},s=r.left!==o.left,f=r.top!==o.top;(s||f)&&e(),r=o,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)}const mX=Z.forwardRef((t,e)=>{const{style:r,...n}=t,i=ts(),o=fD(),{onThumbPositionChange:s}=o,f=Ui(e,b=>o.onThumbChange(b)),d=Z.useRef(),p=L5(()=>{d.current&&(d.current(),d.current=void 0)},100);return Z.useEffect(()=>{const{viewport:b}=i;if(b){const v=()=>{if(p(),!d.current){const A=pX(b,s);d.current=A,s()}};return s(),b.addEventListener("scroll",v),()=>b.removeEventListener("scroll",v)}},[i.viewport,p,s]),se.createElement("div",{"data-state":o.hasThumb?"visible":"hidden",...n,ref:f,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:Lu(t.onPointerDownCapture,b=>{const A=b.target.getBoundingClientRect(),_=b.clientX-A.left,S=b.clientY-A.top;o.onThumbPointerDown({x:_,y:S})}),onPointerUp:Lu(t.onPointerUp,o.onThumbPointerUp)})}),aI=se.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=fD();return r||i.hasThumb?se.createElement(mX,{ref:e,...n}):null}),gD={scrollHideDelay:1e3,type:"hover"},gX=(t,{scrollbarSize:e})=>({root:{"--scrollarea-scrollbar-size":Fe(e)}}),yb=Et((t,e)=>{const r=Ye("ScrollArea",gD,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,scrollbarSize:d,vars:p,type:b,scrollHideDelay:v,viewportProps:A,viewportRef:_,onScrollPositionChange:S,children:P,offsetScrollbars:I,...C}=r,[T,O]=Z.useState(!1),B=Ht({name:"ScrollArea",props:r,classes:HA,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:p,varsResolver:gX});return se.createElement(pD,{type:b==="never"?"always":b,scrollHideDelay:v,ref:e,...B("root"),...C},se.createElement(mD,{...A,...B("viewport"),ref:_,"data-offset-scrollbars":I===!0?"xy":I||void 0,onScroll:typeof S=="function"?({currentTarget:D})=>S({x:D.scrollLeft,y:D.scrollTop}):void 0},P),se.createElement(sI,{...B("scrollbar"),orientation:"horizontal","data-hidden":b==="never"||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},se.createElement(aI,{...B("thumb")})),se.createElement(sI,{...B("scrollbar"),orientation:"vertical","data-hidden":b==="never"||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},se.createElement(aI,{...B("thumb")})),se.createElement(dX,{...B("corner"),"data-hovered":T||void 0,"data-hidden":b==="never"||void 0}))});yb.displayName="@mantine/core/ScrollArea";const qA=Et((t,e)=>{const{children:r,classNames:n,styles:i,scrollbarSize:o,scrollHideDelay:s,type:f,dir:d,offsetScrollbars:p,viewportRef:b,onScrollPositionChange:v,unstyled:A,variant:_,viewportProps:S,style:P,vars:I,...C}=Ye("ScrollAreaAutosize",gD,t);return se.createElement(ft,{...C,ref:e,style:[{display:"flex"},P]},se.createElement(ft,{style:{display:"flex",flexDirection:"column",flex:1}},se.createElement(yb,{classNames:n,styles:i,scrollHideDelay:s,scrollbarSize:o,type:f,dir:d,offsetScrollbars:p,viewportRef:b,onScrollPositionChange:v,unstyled:A,variant:_,viewportProps:S,vars:I},r)))});yb.classes=HA;qA.displayName="@mantine/core/ScrollAreaAutosize";qA.classes=HA;yb.Autosize=qA;var bD={root:"m-87cf2631"};const bX={__staticSelector:"UnstyledButton"},vb=zi((t,e)=>{const r=Ye("UnstyledButton",bX,t),{className:n,component:i="button",__staticSelector:o,unstyled:s,classNames:f,styles:d,style:p,...b}=r,v=Ht({name:o,props:r,classes:bD,className:n,style:p,classNames:f,styles:d,unstyled:s});return se.createElement(ft,{...v("root",{focusable:!0}),component:i,ref:e,type:i==="button"?"button":void 0,...b})});vb.classes=bD;vb.displayName="@mantine/core/UnstyledButton";var yD={root:"m-1b7284a3"};const yX={},vX=(t,{radius:e,shadow:r})=>({root:{"--paper-radius":e===void 0?void 0:bi(e),"--paper-shadow":BA(r)}}),wb=zi((t,e)=>{const r=Ye("Paper",yX,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,withBorder:d,vars:p,radius:b,shadow:v,variant:A,..._}=r,S=Ht({name:"Paper",props:r,classes:yD,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:p,varsResolver:vX});return se.createElement(ft,{ref:e,mod:{"data-with-border":d},...S("root"),variant:A,..._})});wb.classes=yD;wb.displayName="@mantine/core/Paper";const Vs=Math.min,Kn=Math.max,G2=Math.round,$y=Math.floor,g0=t=>({x:t,y:t}),wX={left:"right",right:"left",bottom:"top",top:"bottom"},xX={start:"end",end:"start"};function L9(t,e,r){return Kn(t,Vs(e,r))}function jf(t,e){return typeof t=="function"?t(e):t}function Ks(t){return t.split("-")[0]}function Xp(t){return t.split("-")[1]}function GA(t){return t==="x"?"y":"x"}function VA(t){return t==="y"?"height":"width"}function xl(t){return["top","bottom"].includes(Ks(t))?"y":"x"}function KA(t){return GA(xl(t))}function EX(t,e,r){r===void 0&&(r=!1);const n=Xp(t),i=KA(t),o=VA(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=V2(s)),[s,V2(s)]}function AX(t){const e=V2(t);return[D9(t),e,D9(e)]}function D9(t){return t.replace(/start|end/g,e=>xX[e])}function SX(t,e,r){const n=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?o:s;default:return[]}}function MX(t,e,r,n){const i=Xp(t);let o=SX(Ks(t),r==="start",n);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(D9)))),o}function V2(t){return t.replace(/left|right|bottom|top/g,e=>wX[e])}function _X(t){return{top:0,right:0,bottom:0,left:0,...t}}function WA(t){return typeof t!="number"?_X(t):{top:t,right:t,bottom:t,left:t}}function rp(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function fI(t,e,r){let{reference:n,floating:i}=t;const o=xl(e),s=KA(e),f=VA(s),d=Ks(e),p=o==="y",b=n.x+n.width/2-i.width/2,v=n.y+n.height/2-i.height/2,A=n[f]/2-i[f]/2;let _;switch(d){case"top":_={x:b,y:n.y-i.height};break;case"bottom":_={x:b,y:n.y+n.height};break;case"right":_={x:n.x+n.width,y:v};break;case"left":_={x:n.x-i.width,y:v};break;default:_={x:n.x,y:n.y}}switch(Xp(e)){case"start":_[s]-=A*(r&&p?-1:1);break;case"end":_[s]+=A*(r&&p?-1:1);break}return _}const PX=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,f=o.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(e));let p=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:b,y:v}=fI(p,n,d),A=n,_={},S=0;for(let P=0;P({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:o,platform:s,elements:f,middlewareData:d}=e,{element:p,padding:b=0}=jf(t,e)||{};if(p==null)return{};const v=WA(b),A={x:r,y:n},_=KA(i),S=VA(_),P=await s.getDimensions(p),I=_==="y",C=I?"top":"left",T=I?"bottom":"right",O=I?"clientHeight":"clientWidth",B=o.reference[S]+o.reference[_]-A[_]-o.floating[S],D=A[_]-o.reference[_],U=await(s.getOffsetParent==null?void 0:s.getOffsetParent(p));let K=U?U[O]:0;(!K||!await(s.isElement==null?void 0:s.isElement(U)))&&(K=f.floating[O]||o.floating[S]);const Y=B/2-D/2,W=K/2-P[S]/2-1,ie=Vs(v[C],W),x=Vs(v[T],W),a=ie,u=K-P[S]-x,l=K/2-P[S]/2+Y,h=L9(a,l,u),m=!d.arrow&&Xp(i)!=null&&l!=h&&o.reference[S]/2-(la<=0)){var W,ie;const a=(((W=o.flip)==null?void 0:W.index)||0)+1,u=D[a];if(u)return{data:{index:a,overflows:Y},reset:{placement:u}};let l=(ie=Y.filter(h=>h.overflows[0]<=0).sort((h,m)=>h.overflows[1]-m.overflows[1])[0])==null?void 0:ie.placement;if(!l)switch(_){case"bestFit":{var x;const h=(x=Y.map(m=>[m.placement,m.overflows.filter(w=>w>0).reduce((w,E)=>w+E,0)]).sort((m,w)=>m[1]-w[1])[0])==null?void 0:x[0];h&&(l=h);break}case"initialPlacement":l=f;break}if(i!==l)return{reset:{placement:l}}}return{}}}};function wD(t){const e=Vs(...t.map(o=>o.left)),r=Vs(...t.map(o=>o.top)),n=Kn(...t.map(o=>o.right)),i=Kn(...t.map(o=>o.bottom));return{x:e,y:r,width:n-e,height:i-r}}function CX(t){const e=t.slice().sort((i,o)=>i.y-o.y),r=[];let n=null;for(let i=0;in.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>rp(wD(i)))}const xD=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:r,elements:n,rects:i,platform:o,strategy:s}=e,{padding:f=2,x:d,y:p}=jf(t,e),b=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),v=CX(b),A=rp(wD(b)),_=WA(f);function S(){if(v.length===2&&v[0].left>v[1].right&&d!=null&&p!=null)return v.find(I=>d>I.left-_.left&&dI.top-_.top&&p=2){if(xl(r)==="y"){const ie=v[0],x=v[v.length-1],a=Ks(r)==="top",u=ie.top,l=x.bottom,h=a?ie.left:x.left,m=a?ie.right:x.right,w=m-h,E=l-u;return{top:u,bottom:l,left:h,right:m,width:w,height:E,x:h,y:u}}const I=Ks(r)==="left",C=Kn(...v.map(ie=>ie.right)),T=Vs(...v.map(ie=>ie.left)),O=v.filter(ie=>I?ie.left===T:ie.right===C),B=O[0].top,D=O[O.length-1].bottom,U=T,K=C,Y=K-U,W=D-B;return{top:B,bottom:D,left:U,right:K,width:Y,height:W,x:U,y:B}}return A}const P=await o.getElementRects({reference:{getBoundingClientRect:S},floating:n.floating,strategy:s});return i.reference.x!==P.reference.x||i.reference.y!==P.reference.y||i.reference.width!==P.reference.width||i.reference.height!==P.reference.height?{reset:{rects:P}}:{}}}};async function IX(t,e){const{placement:r,platform:n,elements:i}=t,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=Ks(r),f=Xp(r),d=xl(r)==="y",p=["left","top"].includes(s)?-1:1,b=o&&d?-1:1,v=jf(e,t);let{mainAxis:A,crossAxis:_,alignmentAxis:S}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...v};return f&&typeof S=="number"&&(_=f==="end"?S*-1:S),d?{x:_*b,y:A*p}:{x:A*p,y:_*b}}const ED=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:i,y:o,placement:s,middlewareData:f}=e,d=await IX(e,t);return s===((r=f.offset)==null?void 0:r.placement)&&(n=f.arrow)!=null&&n.alignmentOffset?{}:{x:i+d.x,y:o+d.y,data:{...d,placement:s}}}}},ZA=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:f={fn:I=>{let{x:C,y:T}=I;return{x:C,y:T}}},...d}=jf(t,e),p={x:r,y:n},b=await JA(e,d),v=xl(Ks(i)),A=GA(v);let _=p[A],S=p[v];if(o){const I=A==="y"?"top":"left",C=A==="y"?"bottom":"right",T=_+b[I],O=_-b[C];_=L9(T,_,O)}if(s){const I=v==="y"?"top":"left",C=v==="y"?"bottom":"right",T=S+b[I],O=S-b[C];S=L9(T,S,O)}const P=f.fn({...e,[A]:_,[v]:S});return{...P,data:{x:P.x-r,y:P.y-n}}}}},TX=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:o,middlewareData:s}=e,{offset:f=0,mainAxis:d=!0,crossAxis:p=!0}=jf(t,e),b={x:r,y:n},v=xl(i),A=GA(v);let _=b[A],S=b[v];const P=jf(f,e),I=typeof P=="number"?{mainAxis:P,crossAxis:0}:{mainAxis:0,crossAxis:0,...P};if(d){const O=A==="y"?"height":"width",B=o.reference[A]-o.floating[O]+I.mainAxis,D=o.reference[A]+o.reference[O]-I.mainAxis;_D&&(_=D)}if(p){var C,T;const O=A==="y"?"width":"height",B=["top","left"].includes(Ks(i)),D=o.reference[v]-o.floating[O]+(B&&((C=s.offset)==null?void 0:C[v])||0)+(B?0:I.crossAxis),U=o.reference[v]+o.reference[O]+(B?0:((T=s.offset)==null?void 0:T[v])||0)-(B?I.crossAxis:0);SU&&(S=U)}return{[A]:_,[v]:S}}}},RX=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:o}=e,{apply:s=()=>{},...f}=jf(t,e),d=await JA(e,f),p=Ks(r),b=Xp(r),v=xl(r)==="y",{width:A,height:_}=n.floating;let S,P;p==="top"||p==="bottom"?(S=p,P=b===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(P=p,S=b==="end"?"top":"bottom");const I=_-d[S],C=A-d[P],T=!e.middlewareData.shift;let O=I,B=C;if(v){const U=A-d.left-d.right;B=b||T?Vs(C,U):U}else{const U=_-d.top-d.bottom;O=b||T?Vs(I,U):U}if(T&&!b){const U=Kn(d.left,0),K=Kn(d.right,0),Y=Kn(d.top,0),W=Kn(d.bottom,0);v?B=A-2*(U!==0||K!==0?U+K:Kn(d.left,d.right)):O=_-2*(Y!==0||W!==0?Y+W:Kn(d.top,d.bottom))}await s({...e,availableWidth:B,availableHeight:O});const D=await i.getDimensions(o.floating);return A!==D.width||_!==D.height?{reset:{rects:!0}}:{}}}};function b0(t){return AD(t)?(t.nodeName||"").toLowerCase():"#document"}function ao(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xf(t){var e;return(e=(AD(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function AD(t){return t instanceof Node||t instanceof ao(t).Node}function Hf(t){return t instanceof Element||t instanceof ao(t).Element}function Da(t){return t instanceof HTMLElement||t instanceof ao(t).HTMLElement}function uI(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ao(t).ShadowRoot}function xb(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Go(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function kX(t){return["table","td","th"].includes(b0(t))}function YA(t){const e=QA(),r=Go(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function BX(t){let e=np(t);for(;Da(e)&&!U5(e);){if(YA(e))return e;e=np(e)}return null}function QA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U5(t){return["html","body","#document"].includes(b0(t))}function Go(t){return ao(t).getComputedStyle(t)}function z5(t){return Hf(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function np(t){if(b0(t)==="html")return t;const e=t.assignedSlot||t.parentNode||uI(t)&&t.host||Xf(t);return uI(e)?e.host:e}function SD(t){const e=np(t);return U5(e)?t.ownerDocument?t.ownerDocument.body:t.body:Da(e)&&xb(e)?e:SD(e)}function Rf(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=SD(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),s=ao(i);return o?e.concat(s,s.visualViewport||[],xb(i)?i:[],s.frameElement&&r?Rf(s.frameElement):[]):e.concat(i,Rf(i,[],r))}function MD(t){const e=Go(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Da(t),o=i?t.offsetWidth:r,s=i?t.offsetHeight:n,f=G2(r)!==o||G2(n)!==s;return f&&(r=o,n=s),{width:r,height:n,$:f}}function XA(t){return Hf(t)?t:t.contextElement}function qd(t){const e=XA(t);if(!Da(e))return g0(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:o}=MD(e);let s=(o?G2(r.width):r.width)/n,f=(o?G2(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!f||!Number.isFinite(f))&&(f=1),{x:s,y:f}}const OX=g0(0);function _D(t){const e=ao(t);return!QA()||!e.visualViewport?OX:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function NX(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==ao(t)?!1:e}function el(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),o=XA(t);let s=g0(1);e&&(n?Hf(n)&&(s=qd(n)):s=qd(t));const f=NX(o,r,n)?_D(o):g0(0);let d=(i.left+f.x)/s.x,p=(i.top+f.y)/s.y,b=i.width/s.x,v=i.height/s.y;if(o){const A=ao(o),_=n&&Hf(n)?ao(n):n;let S=A.frameElement;for(;S&&n&&_!==A;){const P=qd(S),I=S.getBoundingClientRect(),C=Go(S),T=I.left+(S.clientLeft+parseFloat(C.paddingLeft))*P.x,O=I.top+(S.clientTop+parseFloat(C.paddingTop))*P.y;d*=P.x,p*=P.y,b*=P.x,v*=P.y,d+=T,p+=O,S=ao(S).frameElement}}return rp({width:b,height:v,x:d,y:p})}function LX(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=Da(r),o=Xf(r);if(r===o)return e;let s={scrollLeft:0,scrollTop:0},f=g0(1);const d=g0(0);if((i||!i&&n!=="fixed")&&((b0(r)!=="body"||xb(o))&&(s=z5(r)),Da(r))){const p=el(r);f=qd(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}return{width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-s.scrollLeft*f.x+d.x,y:e.y*f.y-s.scrollTop*f.y+d.y}}function DX(t){return Array.from(t.getClientRects())}function PD(t){return el(Xf(t)).left+z5(t).scrollLeft}function FX(t){const e=Xf(t),r=z5(t),n=t.ownerDocument.body,i=Kn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Kn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+PD(t);const f=-r.scrollTop;return Go(n).direction==="rtl"&&(s+=Kn(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:f}}function $X(t,e){const r=ao(t),n=Xf(t),i=r.visualViewport;let o=n.clientWidth,s=n.clientHeight,f=0,d=0;if(i){o=i.width,s=i.height;const p=QA();(!p||p&&e==="fixed")&&(f=i.offsetLeft,d=i.offsetTop)}return{width:o,height:s,x:f,y:d}}function UX(t,e){const r=el(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=Da(t)?qd(t):g0(1),s=t.clientWidth*o.x,f=t.clientHeight*o.y,d=i*o.x,p=n*o.y;return{width:s,height:f,x:d,y:p}}function lI(t,e,r){let n;if(e==="viewport")n=$X(t,r);else if(e==="document")n=FX(Xf(t));else if(Hf(e))n=UX(e,r);else{const i=_D(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return rp(n)}function CD(t,e){const r=np(t);return r===e||!Hf(r)||U5(r)?!1:Go(r).position==="fixed"||CD(r,e)}function zX(t,e){const r=e.get(t);if(r)return r;let n=Rf(t,[],!1).filter(f=>Hf(f)&&b0(f)!=="body"),i=null;const o=Go(t).position==="fixed";let s=o?np(t):t;for(;Hf(s)&&!U5(s);){const f=Go(s),d=YA(s);!d&&f.position==="fixed"&&(i=null),(o?!d&&!i:!d&&f.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||xb(s)&&!d&&CD(t,s))?n=n.filter(b=>b!==s):i=f,s=np(s)}return e.set(t,n),n}function jX(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const s=[...r==="clippingAncestors"?zX(e,this._c):[].concat(r),n],f=s[0],d=s.reduce((p,b)=>{const v=lI(e,b,i);return p.top=Kn(v.top,p.top),p.right=Vs(v.right,p.right),p.bottom=Vs(v.bottom,p.bottom),p.left=Kn(v.left,p.left),p},lI(e,f,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function HX(t){return MD(t)}function qX(t,e,r){const n=Da(e),i=Xf(e),o=r==="fixed",s=el(t,!0,o,e);let f={scrollLeft:0,scrollTop:0};const d=g0(0);if(n||!n&&!o)if((b0(e)!=="body"||xb(i))&&(f=z5(e)),n){const p=el(e,!0,o,e);d.x=p.x+e.clientLeft,d.y=p.y+e.clientTop}else i&&(d.x=PD(i));return{x:s.left+f.scrollLeft-d.x,y:s.top+f.scrollTop-d.y,width:s.width,height:s.height}}function dI(t,e){return!Da(t)||Go(t).position==="fixed"?null:e?e(t):t.offsetParent}function ID(t,e){const r=ao(t);if(!Da(t))return r;let n=dI(t,e);for(;n&&kX(n)&&Go(n).position==="static";)n=dI(n,e);return n&&(b0(n)==="html"||b0(n)==="body"&&Go(n).position==="static"&&!YA(n))?r:n||BX(t)||r}const GX=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||ID,o=this.getDimensions;return{reference:qX(e,await i(r),n),floating:{x:0,y:0,...await o(r)}}};function VX(t){return Go(t).direction==="rtl"}const KX={convertOffsetParentRelativeRectToViewportRelativeRect:LX,getDocumentElement:Xf,getClippingRect:jX,getOffsetParent:ID,getElementRects:GX,getClientRects:DX,getDimensions:HX,getScale:qd,isElement:Hf,isRTL:VX};function WX(t,e){let r=null,n;const i=Xf(t);function o(){clearTimeout(n),r&&r.disconnect(),r=null}function s(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),o();const{left:p,top:b,width:v,height:A}=t.getBoundingClientRect();if(f||e(),!v||!A)return;const _=$y(b),S=$y(i.clientWidth-(p+v)),P=$y(i.clientHeight-(b+A)),I=$y(p),T={rootMargin:-_+"px "+-S+"px "+-P+"px "+-I+"px",threshold:Kn(0,Vs(1,d))||1};let O=!0;function B(D){const U=D[0].intersectionRatio;if(U!==d){if(!O)return s();U?s(!1,U):n=setTimeout(()=>{s(!1,1e-7)},100)}O=!1}try{r=new IntersectionObserver(B,{...T,root:i.ownerDocument})}catch{r=new IntersectionObserver(B,T)}r.observe(t)}return s(!0),o}function JX(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,p=XA(t),b=i||o?[...p?Rf(p):[],...Rf(e)]:[];b.forEach(C=>{i&&C.addEventListener("scroll",r,{passive:!0}),o&&C.addEventListener("resize",r)});const v=p&&f?WX(p,r):null;let A=-1,_=null;s&&(_=new ResizeObserver(C=>{let[T]=C;T&&T.target===p&&_&&(_.unobserve(e),cancelAnimationFrame(A),A=requestAnimationFrame(()=>{_&&_.observe(e)})),r()}),p&&!d&&_.observe(p),_.observe(e));let S,P=d?el(t):null;d&&I();function I(){const C=el(t);P&&(C.x!==P.x||C.y!==P.y||C.width!==P.width||C.height!==P.height)&&r(),P=C,S=requestAnimationFrame(I)}return r(),()=>{b.forEach(C=>{i&&C.removeEventListener("scroll",r),o&&C.removeEventListener("resize",r)}),v&&v(),_&&_.disconnect(),_=null,d&&cancelAnimationFrame(S)}}const ZX=(t,e,r)=>{const n=new Map,i={platform:KX,...r},o={...i.platform,_c:n};return PX(t,e,{...i,platform:o})},TD=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?cI({element:n.current,padding:i}).fn(r):{}:n?cI({element:n,padding:i}).fn(r):{}}}};var Tv=typeof document<"u"?Z.useLayoutEffect:Z.useEffect;function K2(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!K2(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const o=i[n];if(!(o==="_owner"&&t.$$typeof)&&!K2(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function RD(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function hI(t,e){const r=RD(t);return Math.round(e*r)/r}function pI(t){const e=Z.useRef(t);return Tv(()=>{e.current=t}),e}function YX(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:s}={},transform:f=!0,whileElementsMounted:d,open:p}=t,[b,v]=Z.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[A,_]=Z.useState(n);K2(A,n)||_(n);const[S,P]=Z.useState(null),[I,C]=Z.useState(null),T=Z.useCallback(m=>{m!=U.current&&(U.current=m,P(m))},[P]),O=Z.useCallback(m=>{m!==K.current&&(K.current=m,C(m))},[C]),B=o||S,D=s||I,U=Z.useRef(null),K=Z.useRef(null),Y=Z.useRef(b),W=pI(d),ie=pI(i),x=Z.useCallback(()=>{if(!U.current||!K.current)return;const m={placement:e,strategy:r,middleware:A};ie.current&&(m.platform=ie.current),ZX(U.current,K.current,m).then(w=>{const E={...w,isPositioned:!0};a.current&&!K2(Y.current,E)&&(Y.current=E,gb.flushSync(()=>{v(E)}))})},[A,e,r,ie]);Tv(()=>{p===!1&&Y.current.isPositioned&&(Y.current.isPositioned=!1,v(m=>({...m,isPositioned:!1})))},[p]);const a=Z.useRef(!1);Tv(()=>(a.current=!0,()=>{a.current=!1}),[]),Tv(()=>{if(B&&(U.current=B),D&&(K.current=D),B&&D){if(W.current)return W.current(B,D,x);x()}},[B,D,x,W]);const u=Z.useMemo(()=>({reference:U,floating:K,setReference:T,setFloating:O}),[T,O]),l=Z.useMemo(()=>({reference:B,floating:D}),[B,D]),h=Z.useMemo(()=>{const m={position:r,left:0,top:0};if(!l.floating)return m;const w=hI(l.floating,b.x),E=hI(l.floating,b.y);return f?{...m,transform:"translate("+w+"px, "+E+"px)",...RD(l.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:w,top:E}},[r,f,l.floating,b.x,b.y]);return Z.useMemo(()=>({...b,update:x,refs:u,elements:l,floatingStyles:h}),[b,x,u,l,h])}var kf=typeof document<"u"?Z.useLayoutEffect:Z.useEffect;let G3=!1,QX=0;const mI=()=>"floating-ui-"+QX++;function XX(){const[t,e]=Z.useState(()=>G3?mI():void 0);return kf(()=>{t==null&&e(mI())},[]),Z.useEffect(()=>{G3||(G3=!0)},[]),t}const eee=$E["useId".toString()],kD=eee||XX;function tee(){const t=new Map;return{emit(e,r){var n;(n=t.get(e))==null||n.forEach(i=>i(r))},on(e,r){t.set(e,[...t.get(e)||[],r])},off(e,r){var n;t.set(e,((n=t.get(e))==null?void 0:n.filter(i=>i!==r))||[])}}}const ree=Z.createContext(null),nee=Z.createContext(null),BD=()=>{var t;return((t=Z.useContext(ree))==null?void 0:t.id)||null},eS=()=>Z.useContext(nee);function Jc(t){return(t==null?void 0:t.ownerDocument)||document}function iee(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function oee(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:r,version:n}=e;return r+"/"+n}).join(" "):navigator.userAgent}function j5(t){return Jc(t).defaultView||window}function Pa(t){return t?t instanceof Element||t instanceof j5(t).Element:!1}function OD(t){return t?t instanceof HTMLElement||t instanceof j5(t).HTMLElement:!1}function see(t){if(typeof ShadowRoot>"u")return!1;const e=j5(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function aee(t){if(t.mozInputSource===0&&t.isTrusted)return!0;const e=/Android/i;return(e.test(iee())||e.test(oee()))&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function fee(t){return t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType!=="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0}function ND(t,e){const r=["mouse","pen"];return e||r.push("",void 0),r.includes(t)}function cee(t){return"nativeEvent"in t}function F9(t,e){if(!t||!e)return!1;const r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&see(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function LD(t){return"data-floating-ui-"+t}function gI(t){const e=Z.useRef(t);return kf(()=>{e.current=t}),e}const bI=LD("safe-polygon");function Rv(t,e,r){return r&&!ND(r)?0:typeof t=="number"?t:t==null?void 0:t[e]}function uee(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,dataRef:i,events:o,elements:{domReference:s,floating:f},refs:d}=t,{enabled:p=!0,delay:b=0,handleClose:v=null,mouseOnly:A=!1,restMs:_=0,move:S=!0}=e,P=eS(),I=BD(),C=gI(v),T=gI(b),O=Z.useRef(),B=Z.useRef(),D=Z.useRef(),U=Z.useRef(),K=Z.useRef(!0),Y=Z.useRef(!1),W=Z.useRef(()=>{}),ie=Z.useCallback(()=>{var l;const h=(l=i.current.openEvent)==null?void 0:l.type;return(h==null?void 0:h.includes("mouse"))&&h!=="mousedown"},[i]);Z.useEffect(()=>{if(!p)return;function l(){clearTimeout(B.current),clearTimeout(U.current),K.current=!0}return o.on("dismiss",l),()=>{o.off("dismiss",l)}},[p,o]),Z.useEffect(()=>{if(!p||!C.current||!r)return;function l(m){ie()&&n(!1,m)}const h=Jc(f).documentElement;return h.addEventListener("mouseleave",l),()=>{h.removeEventListener("mouseleave",l)}},[f,r,n,p,C,i,ie]);const x=Z.useCallback(function(l,h){h===void 0&&(h=!0);const m=Rv(T.current,"close",O.current);m&&!D.current?(clearTimeout(B.current),B.current=setTimeout(()=>n(!1,l),m)):h&&(clearTimeout(B.current),n(!1,l))},[T,n]),a=Z.useCallback(()=>{W.current(),D.current=void 0},[]),u=Z.useCallback(()=>{if(Y.current){const l=Jc(d.floating.current).body;l.style.pointerEvents="",l.removeAttribute(bI),Y.current=!1}},[d]);return Z.useEffect(()=>{if(!p)return;function l(){return i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1}function h(E){if(clearTimeout(B.current),K.current=!1,A&&!ND(O.current)||_>0&&Rv(T.current,"open")===0)return;const y=Rv(T.current,"open",O.current);y?B.current=setTimeout(()=>{n(!0,E)},y):n(!0,E)}function m(E){if(l())return;W.current();const y=Jc(f);if(clearTimeout(U.current),C.current){r||clearTimeout(B.current),D.current=C.current({...t,tree:P,x:E.clientX,y:E.clientY,onClose(){u(),a(),x(E)}});const g=D.current;y.addEventListener("mousemove",g),W.current=()=>{y.removeEventListener("mousemove",g)};return}(O.current==="touch"?!F9(f,E.relatedTarget):!0)&&x(E)}function w(E){l()||C.current==null||C.current({...t,tree:P,x:E.clientX,y:E.clientY,onClose(){u(),a(),x(E)}})(E)}if(Pa(s)){const E=s;return r&&E.addEventListener("mouseleave",w),f==null||f.addEventListener("mouseleave",w),S&&E.addEventListener("mousemove",h,{once:!0}),E.addEventListener("mouseenter",h),E.addEventListener("mouseleave",m),()=>{r&&E.removeEventListener("mouseleave",w),f==null||f.removeEventListener("mouseleave",w),S&&E.removeEventListener("mousemove",h),E.removeEventListener("mouseenter",h),E.removeEventListener("mouseleave",m)}}},[s,f,p,t,A,_,S,x,a,u,n,r,P,T,C,i]),kf(()=>{var l;if(p&&r&&(l=C.current)!=null&&l.__options.blockPointerEvents&&ie()){const w=Jc(f).body;if(w.setAttribute(bI,""),w.style.pointerEvents="none",Y.current=!0,Pa(s)&&f){var h,m;const E=s,y=P==null||(h=P.nodesRef.current.find(c=>c.id===I))==null||(m=h.context)==null?void 0:m.elements.floating;return y&&(y.style.pointerEvents=""),E.style.pointerEvents="auto",f.style.pointerEvents="auto",()=>{E.style.pointerEvents="",f.style.pointerEvents=""}}}},[p,r,I,f,s,P,C,i,ie]),kf(()=>{r||(O.current=void 0,a(),u())},[r,a,u]),Z.useEffect(()=>()=>{a(),clearTimeout(B.current),clearTimeout(U.current),u()},[p,a,u]),Z.useMemo(()=>{if(!p)return{};function l(h){O.current=h.pointerType}return{reference:{onPointerDown:l,onPointerEnter:l,onMouseMove(h){r||_===0||(clearTimeout(U.current),U.current=setTimeout(()=>{K.current||n(!0,h.nativeEvent)},_))}},floating:{onMouseEnter(){clearTimeout(B.current)},onMouseLeave(h){o.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),x(h.nativeEvent,!1)}}}},[o,p,_,r,n,x])}const DD=Z.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),FD=()=>Z.useContext(DD),lee=t=>{let{children:e,delay:r,timeoutMs:n=0}=t;const[i,o]=Z.useReducer((d,p)=>({...d,...p}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),s=Z.useRef(null),f=Z.useCallback(d=>{o({currentId:d})},[]);return kf(()=>{i.currentId?s.current===null?s.current=i.currentId:o({isInstantPhase:!0}):(o({isInstantPhase:!1}),s.current=null)},[i.currentId]),Z.createElement(DD.Provider,{value:Z.useMemo(()=>({...i,setState:o,setCurrentId:f}),[i,o,f])},e)},dee=(t,e)=>{let{open:r,onOpenChange:n}=t,{id:i}=e;const{currentId:o,setCurrentId:s,initialDelay:f,setState:d,timeoutMs:p}=FD();kf(()=>{o&&(d({delay:{open:1,close:Rv(f,"close")}}),o!==i&&n(!1))},[i,n,d,o,f]),kf(()=>{function b(){n(!1),d({delay:f,currentId:null})}if(!r&&o===i)if(p){const v=window.setTimeout(b,p);return()=>{clearTimeout(v)}}else b()},[r,d,o,i,n,f,p]),kf(()=>{r&&s(i)},[r,s,i])};function hee(t){let e=t.activeElement;for(;((r=e)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;e=e.shadowRoot.activeElement}return e}function V3(t,e){let r=t.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)}),n=r;for(;n.length;)n=t.filter(i=>{var o;return(o=n)==null?void 0:o.some(s=>{var f;return i.parentId===s.id&&((f=i.context)==null?void 0:f.open)})}),r=r.concat(n);return r}function pee(t){return"composedPath"in t?t.composedPath()[0]:t.target}const mee=$E["useInsertionEffect".toString()],gee=mee||(t=>t());function kv(t){const e=Z.useRef(()=>{});return gee(()=>{e.current=t}),Z.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i{var e,r;return{escapeKeyBubbles:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePressBubbles:typeof t=="boolean"?t:(r=t==null?void 0:t.outsidePress)!=null?r:!0}};function wee(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,events:i,nodeId:o,elements:{reference:s,domReference:f,floating:d},dataRef:p}=t,{enabled:b=!0,escapeKey:v=!0,outsidePress:A=!0,outsidePressEvent:_="pointerdown",referencePress:S=!1,referencePressEvent:P="pointerdown",ancestorScroll:I=!1,bubbles:C}=e,T=eS(),O=BD()!=null,B=kv(typeof A=="function"?A:()=>!1),D=typeof A=="function"?B:A,U=Z.useRef(!1),{escapeKeyBubbles:K,outsidePressBubbles:Y}=vee(C),W=kv(x=>{if(!r||!b||!v||x.key!=="Escape")return;const a=T?V3(T.nodesRef.current,o):[];if(!K&&(x.stopPropagation(),a.length>0)){let u=!0;if(a.forEach(l=>{var h;if((h=l.context)!=null&&h.open&&!l.context.dataRef.current.__escapeKeyBubbles){u=!1;return}}),!u)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1,cee(x)?x.nativeEvent:x)}),ie=kv(x=>{const a=U.current;if(U.current=!1,a||typeof D=="function"&&!D(x))return;const u=pee(x);if(OD(u)&&d){const m=u.clientWidth>0&&u.scrollWidth>u.clientWidth,w=u.clientHeight>0&&u.scrollHeight>u.clientHeight;let E=w&&x.offsetX>u.clientWidth;if(w&&j5(d).getComputedStyle(u).direction==="rtl"&&(E=x.offsetX<=u.offsetWidth-u.clientWidth),E||m&&x.offsetY>u.clientHeight)return}const l=T&&V3(T.nodesRef.current,o).some(m=>{var w;return Bv(x,(w=m.context)==null?void 0:w.elements.floating)});if(Bv(x,d)||Bv(x,f)||l)return;const h=T?V3(T.nodesRef.current,o):[];if(h.length>0){let m=!0;if(h.forEach(w=>{var E;if((E=w.context)!=null&&E.open&&!w.context.dataRef.current.__outsidePressBubbles){m=!1;return}}),!m)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:O?{preventScroll:!0}:aee(x)||fee(x)}}),n(!1,x)});return Z.useEffect(()=>{if(!r||!b)return;p.current.__escapeKeyBubbles=K,p.current.__outsidePressBubbles=Y;function x(l){n(!1,l)}const a=Jc(d);v&&a.addEventListener("keydown",W),D&&a.addEventListener(_,ie);let u=[];return I&&(Pa(f)&&(u=Rf(f)),Pa(d)&&(u=u.concat(Rf(d))),!Pa(s)&&s&&s.contextElement&&(u=u.concat(Rf(s.contextElement)))),u=u.filter(l=>{var h;return l!==((h=a.defaultView)==null?void 0:h.visualViewport)}),u.forEach(l=>{l.addEventListener("scroll",x,{passive:!0})}),()=>{v&&a.removeEventListener("keydown",W),D&&a.removeEventListener(_,ie),u.forEach(l=>{l.removeEventListener("scroll",x)})}},[p,d,f,s,v,D,_,r,n,I,b,K,Y,W,ie]),Z.useEffect(()=>{U.current=!1},[D,_]),Z.useMemo(()=>b?{reference:{onKeyDown:W,[bee[P]]:x=>{S&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1,x.nativeEvent))}},floating:{onKeyDown:W,[yee[_]]:()=>{U.current=!0}}}:{},[b,i,S,_,P,n,W])}function tS(t){var e;t===void 0&&(t={});const{open:r=!1,onOpenChange:n,nodeId:i}=t,[o,s]=Z.useState(null),f=((e=t.elements)==null?void 0:e.reference)||o,d=YX(t),p=eS(),b=kv((B,D)=>{B&&(A.current.openEvent=D),n==null||n(B,D)}),v=Z.useRef(null),A=Z.useRef({}),_=Z.useState(()=>tee())[0],S=kD(),P=Z.useCallback(B=>{const D=Pa(B)?{getBoundingClientRect:()=>B.getBoundingClientRect(),contextElement:B}:B;d.refs.setReference(D)},[d.refs]),I=Z.useCallback(B=>{(Pa(B)||B===null)&&(v.current=B,s(B)),(Pa(d.refs.reference.current)||d.refs.reference.current===null||B!==null&&!Pa(B))&&d.refs.setReference(B)},[d.refs]),C=Z.useMemo(()=>({...d.refs,setReference:I,setPositionReference:P,domReference:v}),[d.refs,I,P]),T=Z.useMemo(()=>({...d.elements,domReference:f}),[d.elements,f]),O=Z.useMemo(()=>({...d,refs:C,elements:T,dataRef:A,nodeId:i,floatingId:S,events:_,open:r,onOpenChange:b}),[d,i,S,_,r,b,C,T]);return kf(()=>{const B=p==null?void 0:p.nodesRef.current.find(D=>D.id===i);B&&(B.context=O)}),Z.useMemo(()=>({...d,context:O,refs:C,elements:T}),[d,C,T,O])}function xee(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,dataRef:i,events:o,refs:s,elements:{floating:f,domReference:d}}=t,{enabled:p=!0,keyboardOnly:b=!0}=e,v=Z.useRef(""),A=Z.useRef(!1),_=Z.useRef();return Z.useEffect(()=>{if(!p)return;const P=Jc(f).defaultView||window;function I(){!r&&OD(d)&&d===hee(Jc(d))&&(A.current=!0)}return P.addEventListener("blur",I),()=>{P.removeEventListener("blur",I)}},[f,d,r,p]),Z.useEffect(()=>{if(!p)return;function S(P){(P.type==="referencePress"||P.type==="escapeKey")&&(A.current=!0)}return o.on("dismiss",S),()=>{o.off("dismiss",S)}},[o,p]),Z.useEffect(()=>()=>{clearTimeout(_.current)},[]),Z.useMemo(()=>p?{reference:{onPointerDown(S){let{pointerType:P}=S;v.current=P,A.current=!!(P&&b)},onMouseLeave(){A.current=!1},onFocus(S){var P;A.current||S.type==="focus"&&((P=i.current.openEvent)==null?void 0:P.type)==="mousedown"&&Bv(i.current.openEvent,d)||n(!0,S.nativeEvent)},onBlur(S){A.current=!1;const P=S.relatedTarget,I=Pa(P)&&P.hasAttribute(LD("focus-guard"))&&P.getAttribute("data-type")==="outside";_.current=setTimeout(()=>{F9(s.floating.current,P)||F9(d,P)||I||n(!1,S.nativeEvent)})}}}:{},[p,b,d,s,i,n])}function K3(t,e,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...t,...e.map(i=>i?i[r]:null).concat(t).reduce((i,o)=>(o&&Object.entries(o).forEach(s=>{let[f,d]=s;if(f.indexOf("on")===0){if(n.has(f)||n.set(f,[]),typeof d=="function"){var p;(p=n.get(f))==null||p.push(d),i[f]=function(){for(var b,v=arguments.length,A=new Array(v),_=0;_S(...A)).find(S=>S!==void 0)}}}else i[f]=d}),i),{})}}function Eee(t){t===void 0&&(t=[]);const e=t,r=Z.useCallback(o=>K3(o,t,"reference"),e),n=Z.useCallback(o=>K3(o,t,"floating"),e),i=Z.useCallback(o=>K3(o,t,"item"),t.map(o=>o==null?void 0:o.item));return Z.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:i}),[r,n,i])}function Aee(t,e){e===void 0&&(e={});const{open:r,floatingId:n}=t,{enabled:i=!0,role:o="dialog"}=e,s=kD();return Z.useMemo(()=>{const f={id:n,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":r?n:void 0},floating:f}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":r?n:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:s}},floating:{...f,...o==="menu"&&{"aria-labelledby":s}}}:{}},[i,o,r,n,s])}function $D(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[r,n]=e.split("-"),i=r==="right"?"left":"right";return n===void 0?i:`${i}-${n}`}return e}function yI(t,e,r,n){return t==="center"||n==="center"?{top:e}:t==="end"?{bottom:r}:t==="start"?{top:r}:{}}function vI(t,e,r,n,i){return t==="center"||n==="center"?{left:e}:t==="end"?{[i==="ltr"?"right":"left"]:r}:t==="start"?{[i==="ltr"?"left":"right"]:r}:{}}const See={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function Mee({position:t,arrowSize:e,arrowOffset:r,arrowRadius:n,arrowPosition:i,arrowX:o,arrowY:s,dir:f}){const[d,p="center"]=t.split("-"),b={width:Fe(e),height:Fe(e),transform:"rotate(45deg)",position:"absolute",[See[d]]:Fe(n)},v=Fe(-e/2);return d==="left"?{...b,...yI(p,s,r,i),right:v,borderLeftColor:"transparent",borderBottomColor:"transparent"}:d==="right"?{...b,...yI(p,s,r,i),left:v,borderRightColor:"transparent",borderTopColor:"transparent"}:d==="top"?{...b,...vI(p,o,r,i,f),bottom:v,borderTopColor:"transparent",borderLeftColor:"transparent"}:d==="bottom"?{...b,...vI(p,o,r,i,f),top:v,borderBottomColor:"transparent",borderRightColor:"transparent"}:{}}const rS=Z.forwardRef(({position:t,arrowSize:e,arrowOffset:r,arrowRadius:n,arrowPosition:i,visible:o,arrowX:s,arrowY:f,style:d,...p},b)=>{const{dir:v}=F5();return o?se.createElement("div",{...p,ref:b,style:{...d,...Mee({position:t,arrowSize:e,arrowOffset:r,arrowRadius:n,arrowPosition:i,dir:v,arrowX:s,arrowY:f})}}):null});rS.displayName="@mantine/core/FloatingArrow";function UD({opened:t,floating:e,position:r,positionDependencies:n}){const[i,o]=Z.useState(0);Z.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current)return JX(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,t,i,r]),Xu(()=>{e.update()},n),Xu(()=>{o(s=>s+1)},[t])}function _ee(t,e){var n,i,o,s;const r=[ED(t.offset)];return(n=t.middlewares)!=null&&n.shift&&r.push(ZA({limiter:TX()})),(i=t.middlewares)!=null&&i.flip&&r.push(vD()),(o=t.middlewares)!=null&&o.inline&&r.push(xD()),r.push(TD({element:t.arrowRef,padding:t.arrowOffset})),((s=t.middlewares)!=null&&s.size||t.width==="target")&&r.push(RX({apply({rects:f,availableWidth:d,availableHeight:p}){var A,_;const v=((A=e().refs.floating.current)==null?void 0:A.style)??{};(_=t.middlewares)!=null&&_.size&&Object.assign(v,{maxWidth:`${d}px`,maxHeight:`${p}px`}),t.width==="target"&&Object.assign(v,{width:`${f.reference.width}px`})}})),r}function Pee(t){const[e,r]=H2({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),n=()=>{var s;e&&((s=t.onClose)==null||s.call(t),r(!1))},i=()=>{var s,f;e?((s=t.onClose)==null||s.call(t),r(!1)):((f=t.onOpen)==null||f.call(t),r(!0))},o=tS({placement:t.position,middleware:_ee(t,()=>o)});return UD({opened:t.opened,position:t.position,positionDependencies:t.positionDependencies||[],floating:o}),Xu(()=>{var s;(s=t.onPositionChange)==null||s.call(t,o.placement)},[o.placement]),Xu(()=>{var s,f;t.opened?(f=t.onOpen)==null||f.call(t):(s=t.onClose)==null||s.call(t)},[t.opened]),{floating:o,controlled:typeof t.opened=="boolean",opened:e,onClose:n,onToggle:i}}const[Cee,zD]=vl("Popover component was not found in the tree"),Iee={refProp:"ref",popupType:"dialog"},jD=Et((t,e)=>{const{children:r,refProp:n,popupType:i,...o}=Ye("PopoverTarget",Iee,t);if(!yl(r))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const s=o,f=zD(),d=Ui(f.reference,r.ref,e),p=f.withRoles?{"aria-haspopup":i,"aria-expanded":f.opened,"aria-controls":f.getDropdownId(),id:f.getTargetId()}:{};return Z.cloneElement(r,{...s,...p,...f.targetProps,className:cn(f.targetProps.className,s.className,r.props.className),[n]:d,...f.controlled?null:{onClick:f.onToggle}})});jD.displayName="@mantine/core/PopoverTarget";function Tee(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ")),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}const Ree={},HD=Z.forwardRef((t,e)=>{const{children:r,target:n,...i}=Ye("Portal",Ree,t),[o,s]=Z.useState(!1),f=Z.useRef(null);return Qp(()=>(s(!0),f.current=n?typeof n=="string"?document.querySelector(n):n:Tee(i),JL(e,f.current),!n&&f.current&&document.body.appendChild(f.current),()=>{!n&&f.current&&document.body.removeChild(f.current)}),[n]),!o||!f.current?null:gb.createPortal(se.createElement(se.Fragment,null,r),f.current)});HD.displayName="@mantine/core/Portal";function e1({withinPortal:t=!0,children:e,...r}){return t?se.createElement(HD,{...r},e):se.createElement(se.Fragment,null,e)}e1.displayName="@mantine/core/OptionalPortal";const F1=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${Fe(t==="bottom"?10:-10)})`},transitionProperty:"transform, opacity"}),Uy={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${Fe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${Fe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${Fe(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${Fe(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...F1("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...F1("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...F1("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...F1("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...F1("top"),common:{transformOrigin:"top right"}}},wI={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function kee({transition:t,state:e,duration:r,timingFunction:n}){const i={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof t=="string"?t in Uy?{transitionProperty:Uy[t].transitionProperty,...i,...Uy[t].common,...Uy[t][wI[e]]}:{}:{transitionProperty:t.transitionProperty,...i,...t.common,...t[wI[e]]}}function Bee({duration:t,exitDuration:e,timingFunction:r,mounted:n,onEnter:i,onExit:o,onEntered:s,onExited:f}){const d=ta(),p=ZL(),b=d.respectReducedMotion?p:!1,[v,A]=Z.useState(b?0:t),[_,S]=Z.useState(n?"entered":"exited"),P=Z.useRef(-1),I=C=>{const T=C?i:o,O=C?s:f;S(C?"pre-entering":"pre-exiting"),window.clearTimeout(P.current);const B=b?0:C?t:e;if(A(B),B===0)typeof T=="function"&&T(),typeof O=="function"&&O(),S(C?"entered":"exited");else{const D=window.setTimeout(()=>{typeof T=="function"&&T(),S(C?"entering":"exiting")},10);P.current=window.setTimeout(()=>{window.clearTimeout(D),typeof O=="function"&&O(),S(C?"entered":"exited")},B)}};return Xu(()=>{I(n)},[n]),Z.useEffect(()=>()=>window.clearTimeout(P.current),[]),{transitionDuration:v,transitionStatus:_,transitionTimingFunction:r||"ease"}}function El({keepMounted:t,transition:e="fade",duration:r=250,exitDuration:n=r,mounted:i,children:o,timingFunction:s="ease",onExit:f,onEntered:d,onEnter:p,onExited:b}){const{transitionDuration:v,transitionStatus:A,transitionTimingFunction:_}=Bee({mounted:i,exitDuration:n,duration:r,timingFunction:s,onExit:f,onEntered:d,onEnter:p,onExited:b});return v===0?i?se.createElement(se.Fragment,null,o({})):t?o({display:"none"}):null:A==="exited"?t?o({display:"none"}):null:se.createElement(se.Fragment,null,o(kee({transition:e,duration:v,state:A,timingFunction:_})))}El.displayName="@mantine/core/Transition";function nS({children:t,active:e=!0,refProp:r="ref"}){const n=XY(e),i=Ui(n,t==null?void 0:t.ref);return yl(t)?Z.cloneElement(t,{[r]:i}):t}nS.displayName="@mantine/core/FocusTrap";var qD={dropdown:"m-38a85659",arrow:"m-a31dc6c1"};const Oee={},iS=Et((t,e)=>{var I,C,T,O;const r=Ye("PopoverDropdown",Oee,t),{className:n,style:i,vars:o,children:s,onKeyDownCapture:f,variant:d,classNames:p,styles:b,...v}=r,A=zD(),_=qL({opened:A.opened,shouldReturnFocus:A.returnFocus}),S=A.withRoles?{"aria-labelledby":A.getTargetId(),id:A.getDropdownId(),role:"dialog",tabIndex:-1}:{},P=Ui(e,A.floating);return A.disabled?null:se.createElement(e1,{...A.portalProps,withinPortal:A.withinPortal},se.createElement(El,{mounted:A.opened,...A.transitionProps,transition:((I=A.transitionProps)==null?void 0:I.transition)||"fade",duration:((C=A.transitionProps)==null?void 0:C.duration)??150,keepMounted:A.keepMounted,exitDuration:typeof((T=A.transitionProps)==null?void 0:T.exitDuration)=="number"?A.transitionProps.exitDuration:(O=A.transitionProps)==null?void 0:O.duration},B=>se.createElement(nS,{active:A.trapFocus},se.createElement(ft,{...S,...v,variant:d,ref:P,onKeyDownCapture:FY(A.onClose,{active:A.closeOnEscape,onTrigger:_,onKeyDown:f}),"data-position":A.placement,...A.getStyles("dropdown",{className:n,props:r,classNames:p,styles:b,style:[{...B,zIndex:A.zIndex,top:A.y??0,left:A.x??0,width:A.width==="target"?void 0:Fe(A.width)},i]})},s,se.createElement(rS,{ref:A.arrowRef,arrowX:A.arrowX,arrowY:A.arrowY,visible:A.withArrow,position:A.placement,arrowSize:A.arrowSize,arrowRadius:A.arrowRadius,arrowOffset:A.arrowOffset,arrowPosition:A.arrowPosition,...A.getStyles("arrow",{props:r,classNames:p,styles:b})})))))});iS.classes=qD;iS.displayName="@mantine/core/PopoverDropdown";const Nee={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ha("popover"),__staticSelector:"Popover",width:"max-content"},Lee=(t,{radius:e,shadow:r})=>({dropdown:{"--popover-radius":e===void 0?void 0:bi(e),"--popover-shadow":BA(r)}});function O0(t){var he,He,be,oe,Xe,Ee;const e=Ye("Popover",Nee,t),{children:r,position:n,offset:i,onPositionChange:o,positionDependencies:s,opened:f,transitionProps:d,width:p,middlewares:b,withArrow:v,arrowSize:A,arrowOffset:_,arrowRadius:S,arrowPosition:P,unstyled:I,classNames:C,styles:T,closeOnClickOutside:O,withinPortal:B,portalProps:D,closeOnEscape:U,clickOutsideEvents:K,trapFocus:Y,onClose:W,onOpen:ie,onChange:x,zIndex:a,radius:u,shadow:l,id:h,defaultOpened:m,__staticSelector:w,withRoles:E,disabled:y,returnFocus:c,variant:g,keepMounted:M,vars:k,...L}=e,R=Ht({name:w,props:e,classes:qD,classNames:C,styles:T,unstyled:I,rootSelector:"dropdown",vars:k,varsResolver:Lee}),F=Z.useRef(null),[z,V]=Z.useState(null),[q,Q]=Z.useState(null),{dir:G}=F5(),H=wl(h),ee=Pee({middlewares:b,width:p,position:$D(G,n),offset:typeof i=="number"?i+(v?A/2:0):i,arrowRef:F,arrowOffset:_,onPositionChange:o,positionDependencies:s,opened:f,defaultOpened:m,onChange:x,onOpen:ie,onClose:W});jY(()=>O&&ee.onClose(),K,[z,q]);const ue=Z.useCallback(ye=>{V(ye),ee.floating.refs.setReference(ye)},[ee.floating.refs.setReference]),fe=Z.useCallback(ye=>{Q(ye),ee.floating.refs.setFloating(ye)},[ee.floating.refs.setFloating]);return se.createElement(Cee,{value:{returnFocus:c,disabled:y,controlled:ee.controlled,reference:ue,floating:fe,x:ee.floating.x,y:ee.floating.y,arrowX:(be=(He=(he=ee.floating)==null?void 0:he.middlewareData)==null?void 0:He.arrow)==null?void 0:be.x,arrowY:(Ee=(Xe=(oe=ee.floating)==null?void 0:oe.middlewareData)==null?void 0:Xe.arrow)==null?void 0:Ee.y,opened:ee.opened,arrowRef:F,transitionProps:d,width:p,withArrow:v,arrowSize:A,arrowOffset:_,arrowRadius:S,arrowPosition:P,placement:ee.floating.placement,trapFocus:Y,withinPortal:B,portalProps:D,zIndex:a,radius:u,shadow:l,closeOnEscape:U,onClose:ee.onClose,onToggle:ee.onToggle,getTargetId:()=>`${H}-target`,getDropdownId:()=>`${H}-dropdown`,withRoles:E,targetProps:L,__staticSelector:w,classNames:C,styles:T,unstyled:I,variant:g,keepMounted:M,getStyles:R}},r)}O0.Target=jD;O0.Dropdown=iS;O0.displayName="@mantine/core/Popover";O0.extend=t=>t;var Ns={root:"m-5ae2e3c",barsLoader:"m-7a2bd4cd",bar:"m-870bb79","bars-loader-animation":"m-5d2b3b9d",dotsLoader:"m-4e3f22d7",dot:"m-870c4af","loader-dots-animation":"m-aac34a1",ovalLoader:"m-b34414df","oval-loader-animation":"m-f8e89c4b"};const Dee=Z.forwardRef(({className:t,...e},r)=>se.createElement(ft,{component:"span",className:cn(Ns.barsLoader,t),...e,ref:r},se.createElement("span",{className:Ns.bar}),se.createElement("span",{className:Ns.bar}),se.createElement("span",{className:Ns.bar}))),Fee=Z.forwardRef(({className:t,...e},r)=>se.createElement(ft,{component:"span",className:cn(Ns.ovalLoader,t),...e,ref:r})),$ee=Z.forwardRef(({className:t,...e},r)=>se.createElement(ft,{component:"span",className:cn(Ns.dotsLoader,t),...e,ref:r},se.createElement("span",{className:Ns.dot}),se.createElement("span",{className:Ns.dot}),se.createElement("span",{className:Ns.dot}))),Uee={bars:Dee,oval:Fee,dots:$ee},zee={loaders:Uee,type:"oval"},jee=(t,{size:e,color:r})=>({root:{"--loader-size":zr(e,"loader-size"),"--loader-color":r?zf(r,t):void 0}}),Al=Et((t,e)=>{const r=Ye("Loader",zee,t),{size:n,color:i,type:o,vars:s,className:f,style:d,classNames:p,styles:b,unstyled:v,loaders:A,variant:_,children:S,...P}=r,I=Ht({name:"Loader",props:r,classes:Ns,className:f,style:d,classNames:p,styles:b,unstyled:v,vars:s,varsResolver:jee});return S?se.createElement(ft,{...I("root"),ref:e,...P},S):se.createElement(ft,{...I("root"),ref:e,component:A[o],variant:_,size:n,...P})});Al.classes=Ns;Al.displayName="@mantine/core/Loader";var H5={root:"m-8d3f4000",loader:"m-302b9fb1",group:"m-1a0f1b21"};const xI={orientation:"horizontal"},Hee=(t,{borderWidth:e})=>({group:{"--ai-border-width":Fe(e)}}),oS=Et((t,e)=>{const r=Ye("ActionIconGroup",xI,t),{className:n,style:i,classNames:o,styles:s,unstyled:f,orientation:d,vars:p,borderWidth:b,variant:v,...A}=Ye("ActionIconGroup",xI,t),_=Ht({name:"ActionIconGroup",props:r,classes:H5,className:n,style:i,classNames:o,styles:s,unstyled:f,vars:p,varsResolver:Hee,rootSelector:"group"});return se.createElement(ft,{..._("group"),ref:e,variant:v,mod:{"data-orientation":d},role:"group",...A})});oS.classes=H5;oS.displayName="@mantine/core/ActionIconGroup";const qee={},Gee=(t,{size:e,radius:r,variant:n,gradient:i,color:o})=>{const s=t.variantColorResolver({color:o||t.primaryColor,theme:t,gradient:i,variant:n||"filled"});return{root:{"--ai-size":zr(e,"ai-size"),"--ai-radius":r===void 0?void 0:bi(r),"--ai-bg":o||n?s.background:void 0,"--ai-hover":o||n?s.hover:void 0,"--ai-hover-color":o||n?s.hoverColor:void 0,"--ai-color":o||n?s.color:void 0,"--ai-bd":o||n?s.border:void 0}}},q5=zi((t,e)=>{const r=Ye("ActionIcon",qee,t),{className:n,unstyled:i,variant:o,classNames:s,styles:f,style:d,loading:p,loaderProps:b,size:v,color:A,radius:_,__staticSelector:S,gradient:P,vars:I,children:C,disabled:T,"data-disabled":O,...B}=r,D=Ht({name:["ActionIcon",S],props:r,className:n,style:d,classes:H5,classNames:s,styles:f,unstyled:i,vars:I,varsResolver:Gee});return se.createElement(vb,{...D("root",{active:!T&&!p&&!O}),...B,unstyled:i,variant:o,size:v,disabled:T||p,ref:e,mod:{loading:p,disabled:T||O}},p?se.createElement(Al,{...D("loader"),color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...b}):C)});q5.classes=H5;q5.displayName="@mantine/core/ActionIcon";q5.Group=oS;const GD=Z.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:e,...r},n)=>se.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},ref:n,...r},se.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})));GD.displayName="@mantine/core/CloseIcon";var VD={root:"m-86a44da5","root--subtle":"m-220c80f2"};const Vee={variant:"subtle"},Kee=(t,{size:e,radius:r,iconSize:n})=>({root:{"--cb-size":zr(e,"cb-size"),"--cb-radius":r===void 0?void 0:bi(r),"--cb-icon-size":Fe(n)}}),Sl=zi((t,e)=>{const r=Ye("CloseButton",Vee,t),{iconSize:n,children:i,vars:o,radius:s,className:f,classNames:d,style:p,styles:b,unstyled:v,"data-disabled":A,disabled:_,variant:S,...P}=r,I=Ht({name:"CloseButton",props:r,className:f,style:p,classes:VD,classNames:d,styles:b,unstyled:v,vars:o,varsResolver:Kee});return se.createElement(vb,{ref:e,...P,unstyled:v,variant:S,disabled:_,mod:{disabled:_||A},...I("root",{variant:S,active:!0})},se.createElement(GD,null),i)});Sl.classes=VD;Sl.displayName="@mantine/core/CloseButton";function Wee(t){return Z.Children.toArray(t).filter(Boolean)}var KD={root:"m-4081bf90"};const Jee={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},Zee=(t,{grow:e,preventGrowOverflow:r,gap:n,align:i,justify:o,wrap:s},{childWidth:f})=>({root:{"--group-child-width":e&&r?f:void 0,"--group-gap":bb(n),"--group-align":i,"--group-justify":o,"--group-wrap":s}}),km=Et((t,e)=>{const r=Ye("Group",Jee,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,children:d,gap:p,align:b,justify:v,wrap:A,grow:_,preventGrowOverflow:S,vars:P,variant:I,__size:C,...T}=r,O=Wee(d),B=O.length,D=bb(p??"md"),K={childWidth:`calc(${100/B}% - (${D} - ${D} / ${B}))`},Y=Ht({name:"Group",props:r,stylesCtx:K,className:i,style:o,classes:KD,classNames:n,styles:s,unstyled:f,vars:P,varsResolver:Zee});return se.createElement(ft,{...Y("root"),ref:e,variant:I,mod:{grow:_},size:C,...T},O)});km.classes=KD;km.displayName="@mantine/core/Group";var WD={root:"m-9814e45f"};const Yee={zIndex:Ha("modal")},Qee=(t,{gradient:e,color:r,backgroundOpacity:n,blur:i,radius:o,zIndex:s})=>({root:{"--overlay-bg":e||(r!==void 0||n!==void 0)&&ii(r||"#000",n??.6)||void 0,"--overlay-filter":i?`blur(${Fe(i)})`:void 0,"--overlay-radius":o===void 0?void 0:bi(o),"--overlay-z-index":s==null?void 0:s.toString()}}),lg=zi((t,e)=>{const r=Ye("Overlay",Yee,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,fixed:p,center:b,children:v,radius:A,zIndex:_,gradient:S,blur:P,color:I,backgroundOpacity:C,...T}=r,O=Ht({name:"Overlay",props:r,classes:WD,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Qee});return se.createElement(ft,{ref:e,...O("root"),mod:{center:b,fixed:p},...T},v)});lg.classes=WD;lg.displayName="@mantine/core/Overlay";const[Xee,ec]=vl("ModalBase component was not found in tree");function ete({opened:t,transitionDuration:e}){const[r,n]=Z.useState(t),i=Z.useRef(),s=ZL()?0:e;return Z.useEffect(()=>(t?(n(!0),window.clearTimeout(i.current)):s===0?n(!1):i.current=window.setTimeout(()=>n(!1),s),()=>window.clearTimeout(i.current)),[t,s]),r}function tte({id:t,transitionProps:e,opened:r,trapFocus:n,closeOnEscape:i,onClose:o,returnFocus:s}){const f=wl(t),[d,p]=Z.useState(!1),[b,v]=Z.useState(!1),A=typeof(e==null?void 0:e.duration)=="number"?e==null?void 0:e.duration:200,_=ete({opened:r,transitionDuration:A});return WL("keydown",S=>{!n&&S.key==="Escape"&&i&&o()}),qL({opened:r,shouldReturnFocus:n&&s}),{_id:f,titleMounted:d,bodyMounted:b,shouldLockScroll:_,setTitleMounted:p,setBodyMounted:v}}const rte=Z.forwardRef(({keepMounted:t,opened:e,onClose:r,id:n,transitionProps:i,trapFocus:o,closeOnEscape:s,returnFocus:f,closeOnClickOutside:d,withinPortal:p,portalProps:b,lockScroll:v,children:A,zIndex:_,shadow:S,padding:P,__vars:I,unstyled:C,removeScrollProps:T,...O},B)=>{const{_id:D,titleMounted:U,bodyMounted:K,shouldLockScroll:Y,setTitleMounted:W,setBodyMounted:ie}=tte({id:n,transitionProps:i,opened:e,trapFocus:o,closeOnEscape:s,onClose:r,returnFocus:f});return se.createElement(e1,{...b,withinPortal:p},se.createElement(Xee,{value:{opened:e,onClose:r,closeOnClickOutside:d,transitionProps:{...i,keepMounted:t},getTitleId:()=>`${D}-title`,getBodyId:()=>`${D}-body`,titleMounted:U,bodyMounted:K,setTitleMounted:W,setBodyMounted:ie,trapFocus:o,closeOnEscape:s,zIndex:_,unstyled:C}},se.createElement(TA,{enabled:Y&&v,...T},se.createElement(ft,{ref:B,...O,__vars:{...I,"--mb-z-index":(_||Ha("modal")).toString(),"--mb-shadow":BA(S),"--mb-padding":bb(P)}},A))))});function nte(){const t=ec();return Z.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}var ip={title:"m-615af6c9",header:"m-b5489c3c",inner:"m-60c222c7",content:"m-fd1ab0aa",close:"m-606cb269",body:"m-5df29311"};const JD=Z.forwardRef(({className:t,...e},r)=>{const n=nte(),i=ec();return se.createElement(ft,{ref:r,...e,id:n,className:cn({[ip.body]:!i.unstyled},t)})});JD.displayName="@mantine/core/ModalBaseBody";const ZD=Z.forwardRef(({className:t,onClick:e,...r},n)=>{const i=ec();return se.createElement(Sl,{ref:n,...r,onClick:o=>{i.onClose(),e==null||e(o)},className:cn({[ip.close]:!i.unstyled},t),unstyled:i.unstyled})});ZD.displayName="@mantine/core/ModalBaseCloseButton";const ite=Z.forwardRef(({transitionProps:t,className:e,innerProps:r,onKeyDown:n,style:i,...o},s)=>{const f=ec(),d=p=>{var v;((v=p.target)==null?void 0:v.getAttribute("data-mantine-stop-propagation"))!=="true"&&p.key==="Escape"&&f.closeOnEscape&&f.onClose(),n==null||n(p)};return se.createElement(El,{mounted:f.opened,transition:"pop",...f.transitionProps,...t},p=>se.createElement("div",{...r,className:cn({[ip.inner]:!f.unstyled},r.className)},se.createElement(nS,{active:f.opened&&f.trapFocus},se.createElement(wb,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":f.bodyMounted?f.getBodyId():void 0,"aria-labelledby":f.titleMounted?f.getTitleId():void 0,onKeyDown:d,ref:s,style:[i,p],className:cn({[ip.content]:!f.unstyled},e),unstyled:f.unstyled},o.children))))}),YD=Z.forwardRef(({className:t,...e},r)=>{const n=ec();return se.createElement(ft,{ref:r,className:cn({[ip.header]:!n.unstyled},t),...e})});YD.displayName="@mantine/core/ModalBaseHeader";const ote={duration:200,timingFunction:"ease",transition:"fade"};function ste(t){const e=ec();return{...ote,...e.transitionProps,...t}}const QD=Z.forwardRef(({onClick:t,transitionProps:e,style:r,...n},i)=>{const o=ec(),s=ste(e);return se.createElement(El,{mounted:o.opened,...s,transition:"fade"},f=>se.createElement(lg,{ref:i,fixed:!0,style:[r,f],zIndex:o.zIndex,unstyled:o.unstyled,onClick:d=>{t==null||t(d),o.closeOnClickOutside&&o.onClose()},...n}))});QD.displayName="@mantine/core/ModalBaseOverlay";function ate(){const t=ec();return Z.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}const XD=Z.forwardRef(({className:t,...e},r)=>{const n=ate(),i=ec();return se.createElement(ft,{component:"h2",ref:r,className:cn({[ip.title]:!i.unstyled},t),...e,id:n})});XD.displayName="@mantine/core/ModalBaseTitle";function fte({children:t}){return se.createElement(se.Fragment,null,t)}const[cte,G5]=NY({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var rs={wrapper:"m-6c018570",input:"m-8fb7ebe7",section:"m-82577fc2",placeholder:"m-88bacfd0",root:"m-46b77525",label:"m-8fdc1311",required:"m-78a94662",error:"m-8f816625",description:"m-fe47ce59"};const EI={labelElement:"label"},ute=(t,{size:e})=>({label:{"--input-label-size":Fo(e),"--input-asterisk-color":void 0}}),V5=Et((t,e)=>{const r=Ye("InputLabel",EI,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,labelElement:p,size:b,required:v,htmlFor:A,onMouseDown:_,children:S,__staticSelector:P,variant:I,...C}=Ye("InputLabel",EI,r),T=Ht({name:["InputWrapper",P],props:r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,rootSelector:"label",vars:d,varsResolver:ute}),O=G5(),B=(O==null?void 0:O.getStyles)||T;return se.createElement(ft,{...B("label"),component:p,variant:I,size:b,ref:e,htmlFor:p==="label"?A:void 0,mod:{required:v},onMouseDown:D=>{_==null||_(D),!D.defaultPrevented&&D.detail>1&&D.preventDefault()},...C},S,v&&se.createElement("span",{...B("required"),"aria-hidden":!0}," *"))});V5.classes=rs;V5.displayName="@mantine/core/InputLabel";const lte={},dte=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${Fo(e)} - ${Fe(2)})`}}),K5=Et((t,e)=>{const r=Ye("InputError",lte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,size:p,__staticSelector:b,__inheritStyles:v=!0,variant:A,..._}=r,S=Ht({name:["InputWrapper",b],props:r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,rootSelector:"error",vars:d,varsResolver:dte}),P=G5(),I=v&&(P==null?void 0:P.getStyles)||S;return se.createElement(ft,{component:"p",ref:e,variant:A,size:p,...I("error"),..._})});K5.classes=rs;K5.displayName="@mantine/core/InputError";const AI={},hte=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${Fo(e)} - ${Fe(2)})`}}),W5=Et((t,e)=>{const r=Ye("InputDescription",AI,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,size:p,__staticSelector:b,__inheritStyles:v=!0,variant:A,..._}=Ye("InputDescription",AI,r),S=G5(),P=Ht({name:["InputWrapper",b],props:r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,rootSelector:"description",vars:d,varsResolver:hte}),I=v&&(S==null?void 0:S.getStyles)||P;return se.createElement(ft,{component:"p",ref:e,variant:A,size:p,...I("description"),..._})});W5.classes=rs;W5.displayName="@mantine/core/InputDescription";const SI={},sS=Et((t,e)=>{const r=Ye("InputPlaceholder",SI,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,__staticSelector:p,variant:b,error:v,...A}=Ye("InputPlaceholder",SI,r),_=Ht({name:["InputPlaceholder",p],props:r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,rootSelector:"placeholder"});return se.createElement(ft,{..._("placeholder"),mod:{error:!!v},component:"span",variant:b,ref:e,...A})});sS.classes=rs;sS.displayName="@mantine/core/InputPlaceholder";function pte(t,{hasDescription:e,hasError:r}){const n=t.findIndex(d=>d==="input"),i=t[n-1],o=t[n+1];return{offsetBottom:e&&o==="description"||r&&o==="error",offsetTop:e&&i==="description"||r&&i==="error"}}const mte={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},gte=(t,{size:e})=>({label:{"--input-label-size":Fo(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${Fo(e)} - ${Fe(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${Fo(e)} - ${Fe(2)})`}}),aS=Et((t,e)=>{const r=Ye("InputWrapper",mte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,size:p,variant:b,__staticSelector:v,inputContainer:A,inputWrapperOrder:_,label:S,error:P,description:I,labelProps:C,descriptionProps:T,errorProps:O,labelElement:B,children:D,withAsterisk:U,id:K,required:Y,__stylesApiProps:W,...ie}=r,x=Ht({name:["InputWrapper",v],props:W||r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:gte}),a={size:p,variant:b,__staticSelector:v},u=wl(K),l=typeof U=="boolean"?U:Y,h=(O==null?void 0:O.id)||`${u}-error`,m=(T==null?void 0:T.id)||`${u}-description`,w=u,E=!!P&&typeof P!="boolean",y=!!I,c=`${E?h:""} ${y?m:""}`,g=c.trim().length>0?c.trim():void 0,M=(C==null?void 0:C.id)||`${u}-label`,k=S&&se.createElement(V5,{key:"label",labelElement:B,id:M,htmlFor:w,required:l,...a,...C},S),L=y&&se.createElement(W5,{key:"description",...T,...a,size:(T==null?void 0:T.size)||a.size,id:(T==null?void 0:T.id)||m},I),R=se.createElement(se.Fragment,{key:"input"},A(D)),F=E&&se.createElement(K5,{...O,...a,size:(O==null?void 0:O.size)||a.size,key:"error",id:(O==null?void 0:O.id)||h},P),z=_.map(V=>{switch(V){case"label":return k;case"input":return R;case"description":return L;case"error":return F;default:return null}});return se.createElement(cte,{value:{getStyles:x,describedBy:g,inputId:w,labelId:M,...pte(_,{hasDescription:y,hasError:E})}},se.createElement(ft,{ref:e,variant:b,size:p,...x("root"),...ie},z))});aS.classes=rs;aS.displayName="@mantine/core/InputWrapper";const bte={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},yte=(t,e,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":zr(e.size,"input-height"),"--input-fz":Fo(e.size),"--input-radius":e.radius===void 0?void 0:bi(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?Fe(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?Fe(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?zr(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),an=zi((t,e)=>{const r=Ye("Input",bte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,required:d,__staticSelector:p,__stylesApiProps:b,size:v,wrapperProps:A,error:_,disabled:S,leftSection:P,leftSectionProps:I,leftSectionWidth:C,rightSection:T,rightSectionProps:O,rightSectionWidth:B,rightSectionPointerEvents:D,leftSectionPointerEvents:U,variant:K,vars:Y,pointer:W,multiline:ie,radius:x,id:a,withAria:u,withErrorStyles:l,...h}=r,{styleProps:m,rest:w}=zA(h),E=G5(),y={offsetBottom:E==null?void 0:E.offsetBottom,offsetTop:E==null?void 0:E.offsetTop},c=Ht({name:["Input",p],props:b||r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,stylesCtx:y,rootSelector:"wrapper",vars:Y,varsResolver:yte}),g=u?{required:d,disabled:S,"aria-invalid":!!_,"aria-describedby":E==null?void 0:E.describedBy,id:(E==null?void 0:E.inputId)||a}:{};return se.createElement(ft,{...c("wrapper"),...m,...A,mod:{error:!!_&&l,pointer:W,disabled:S,multiline:ie,"data-with-right-section":!!T,"data-with-left-section":!!P},variant:K,size:v},P&&se.createElement("div",{...I,"data-position":"left",...c("section",{className:I==null?void 0:I.className,style:I==null?void 0:I.style})},P),se.createElement(ft,{component:"input",...w,...g,ref:e,required:d,mod:{disabled:S,error:!!_&&l},variant:K,...c("input")}),T&&se.createElement("div",{...O,"data-position":"right",...c("section",{className:O==null?void 0:O.className,style:O==null?void 0:O.style})},T))});an.classes=rs;an.Wrapper=aS;an.Label=V5;an.Error=K5;an.Description=W5;an.Placeholder=sS;an.displayName="@mantine/core/Input";function vte(t,e,r){const n=Ye(t,e,r),{label:i,description:o,error:s,required:f,classNames:d,styles:p,className:b,unstyled:v,__staticSelector:A,__stylesApiProps:_,errorProps:S,labelProps:P,descriptionProps:I,wrapperProps:C,id:T,size:O,style:B,inputContainer:D,inputWrapperOrder:U,withAsterisk:K,variant:Y,vars:W,...ie}=n,{styleProps:x,rest:a}=zA(ie),u={label:i,description:o,error:s,required:f,classNames:d,className:b,__staticSelector:A,__stylesApiProps:_||n,errorProps:S,labelProps:P,descriptionProps:I,unstyled:v,styles:p,size:O,style:B,inputContainer:D,inputWrapperOrder:U,withAsterisk:K,variant:Y,id:T,...C};return{...a,classNames:d,styles:p,unstyled:v,wrapperProps:{...u,...x},inputProps:{required:f,classNames:d,styles:p,unstyled:v,size:O,__staticSelector:A,__stylesApiProps:_||n,error:s,variant:Y,id:T}}}const wte={__staticSelector:"InputBase",withAria:!0},J5=zi((t,e)=>{const{inputProps:r,wrapperProps:n,...i}=vte("InputBase",wte,t);return se.createElement(an.Wrapper,{...n},se.createElement(an,{...r,...i,ref:e}))});J5.classes={...an.classes,...an.Wrapper.classes};J5.displayName="@mantine/core/InputBase";var eF={root:"m-7f854edf"};const xte={position:{bottom:0,right:0},zIndex:Ha("modal"),withinPortal:!0},Ete=(t,{zIndex:e,position:r})=>({root:{"--affix-z-index":e==null?void 0:e.toString(),"--affix-top":Fe(r==null?void 0:r.top),"--affix-left":Fe(r==null?void 0:r.left),"--affix-bottom":Fe(r==null?void 0:r.bottom),"--affix-right":Fe(r==null?void 0:r.right)}}),fS=Et((t,e)=>{const r=Ye("Affix",xte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,portalProps:p,zIndex:b,withinPortal:v,position:A,..._}=r,S=Ht({name:"Affix",classes:eF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Ete});return se.createElement(e1,{...p,withinPortal:v},se.createElement(ft,{ref:e,...S("root"),..._}))});fS.classes=eF;fS.displayName="@mantine/core/Affix";var tF={root:"m-66836ed3","root--filled":"m-12b2e6d5","root--white":"m-cffd1856",wrapper:"m-a5d60502",body:"m-667c2793",title:"m-6a03f287",label:"m-698f4f23",icon:"m-667f2a6a",message:"m-7fa78076",closeButton:"m-87f54839"};const Ate={},Ste=(t,{radius:e,color:r,variant:n})=>{const i=t.variantColorResolver({color:r||t.primaryColor,theme:t,variant:n||"light"});return{root:{"--alert-radius":e===void 0?void 0:bi(e),"--alert-bg":r||n?i.background:void 0,"--alert-color":r||n?i.color:void 0,"--alert-bd":r||n?i.border:void 0}}},cS=Et((t,e)=>{const r=Ye("Alert",Ate,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,radius:p,color:b,title:v,children:A,id:_,icon:S,withCloseButton:P,onClose:I,closeButtonLabel:C,variant:T,...O}=r,B=Ht({name:"Alert",classes:tF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Ste}),D=wl(_),U=v&&`${D}-title`||void 0,K=`${D}-body`;return se.createElement(ft,{id:D,...B("root",{variant:T}),variant:T,ref:e,...O,role:"alert","aria-describedby":K,"aria-labelledby":U},se.createElement("div",{...B("wrapper")},S&&se.createElement("div",{...B("icon")},S),se.createElement("div",{...B("body")},v&&se.createElement("div",{...B("title"),"data-with-close-button":P||void 0},se.createElement("span",{id:U,...B("label")},v)),A&&se.createElement("div",{id:K,...B("message")},A)),P&&se.createElement(Sl,{...B("closeButton"),onClick:I,variant:"transparent",size:16,iconSize:16,"aria-label":C,unstyled:f})))});cS.classes=tF;cS.displayName="@mantine/core/Alert";var rF={root:"m-b6d8b162"};function Mte(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const _te={inherit:!1},Pte=(t,{variant:e,lineClamp:r,gradient:n,size:i,color:o})=>({root:{"--text-fz":Fo(i),"--text-lh":$Y(i),"--text-gradient":e==="gradient"?B9(n,t):void 0,"--text-line-clamp":typeof r=="number"?r.toString():void 0,"--text-color":o?zf(o,t):void 0}}),uS=zi((t,e)=>{const r=Ye("Text",_te,t),{lineClamp:n,truncate:i,inline:o,inherit:s,gradient:f,span:d,__staticSelector:p,vars:b,className:v,style:A,classNames:_,styles:S,unstyled:P,variant:I,mod:C,size:T,...O}=r,B=Ht({name:["Text",p],props:r,classes:rF,className:v,style:A,classNames:_,styles:S,unstyled:P,vars:b,varsResolver:Pte});return se.createElement(ft,{...B("root",{focusable:!0}),ref:e,component:d?"span":"p",variant:I,mod:[{"data-truncate":Mte(i),"data-line-clamp":typeof n=="number","data-inline":o,"data-inherit":s},C],size:T,...O})});uS.classes=rF;uS.displayName="@mantine/core/Text";var nF={root:"m-849cf0da"};const Cte={underline:"hover"},lS=zi((t,e)=>{const{underline:r,className:n,unstyled:i,...o}=Ye("Anchor",Cte,t);return se.createElement(uS,{component:"a",ref:e,className:cn({[nF.root]:!i},n),...o,mod:{underline:r},__staticSelector:"Anchor",unstyled:i})});lS.classes=nF;lS.displayName="@mantine/core/Anchor";const[Ite,t1]=vl("AppShell was not found in tree");var N0={root:"m-89ab340",navbar:"m-45252eee",aside:"m-9cdde9a",header:"m-3b16f56b",main:"m-8983817",footer:"m-3840c879",section:"m-6dcfc7c7"};const Tte={},dS=Et((t,e)=>{const r=Ye("AppShellNavbar",Tte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,withBorder:p,zIndex:b,...v}=r,A=t1();return A.disabled?null:se.createElement(ft,{component:"nav",ref:e,mod:{"with-border":p??A.withBorder},...A.getStyles("navbar",{className:i,classNames:n,styles:s,style:o}),...v,__vars:{"--app-shell-navbar-z-index":`calc(${b??A.zIndex} + 1)`}})});dS.classes=N0;dS.displayName="@mantine/core/AppShellNavbar";const Rte={},hS=Et((t,e)=>{var _;const r=Ye("AppShellHeader",Rte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,withBorder:p,zIndex:b,...v}=r,A=t1();return A.disabled?null:se.createElement(ft,{component:"header",ref:e,mod:{"with-border":p??A.withBorder},...A.getStyles("header",{className:cn({[TA.classNames.zeroRight]:A.offsetScrollbars},i),classNames:n,styles:s,style:o}),...v,__vars:{"--app-shell-header-z-index":(_=b??A.zIndex)==null?void 0:_.toString()}})});hS.classes=N0;hS.displayName="@mantine/core/AppShellHeader";const kte={},pS=Et((t,e)=>{var _;const r=Ye("AppShellFooter",kte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,withBorder:p,zIndex:b,...v}=r,A=t1();return A.disabled?null:se.createElement(ft,{component:"footer",ref:e,mod:{"with-border":p??A.withBorder},...A.getStyles("footer",{className:cn({[TA.classNames.zeroRight]:A.offsetScrollbars},i),classNames:n,styles:s,style:o}),...v,__vars:{"--app-shell-footer-z-index":(_=b??A.zIndex)==null?void 0:_.toString()}})});pS.classes=N0;pS.displayName="@mantine/core/AppShellFooter";const Bte={},mS=Et((t,e)=>{const r=Ye("AppShellAside",Bte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,withBorder:p,zIndex:b,...v}=r,A=t1();return A.disabled?null:se.createElement(ft,{component:"aside",ref:e,mod:{"with-border":p??A.withBorder},...A.getStyles("aside",{className:i,classNames:n,styles:s,style:o}),...v,__vars:{"--app-shell-aside-z-index":`calc(${b??A.zIndex} + 1)`}})});mS.classes=N0;mS.displayName="@mantine/core/AppShellAside";const Ote={},gS=Et((t,e)=>{const r=Ye("AppShellMain",Ote,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=t1();return se.createElement(ft,{component:"main",ref:e,...p.getStyles("main",{className:i,style:o,classNames:n,styles:s}),...d})});gS.classes=N0;gS.displayName="@mantine/core/AppShellMain";const Nte={},bS=zi((t,e)=>{const r=Ye("AppShellSection",Nte,t),{classNames:n,className:i,style:o,styles:s,vars:f,grow:d,...p}=r,b=t1();return se.createElement(ft,{ref:e,mod:{grow:d},...b.getStyles("section",{className:i,style:o,classNames:n,styles:s}),...p})});bS.classes=N0;bS.displayName="@mantine/core/AppShellSection";function Eb(t){return!(typeof t!="object"||t===null||Object.keys(t).length===1&&"base"in t)}function Ab(t){const e=typeof t=="object"&&t!==null&&typeof t.base<"u"&&Object.keys(t).length===1;return typeof t=="number"||typeof t=="string"||e}function Sb(t){return typeof t=="object"?t.base:t}function Lte({baseStyles:t,minMediaStyles:e,maxMediaStyles:r,aside:n,theme:i}){var d,p,b;const o=n==null?void 0:n.width,s="translateX(var(--app-shell-aside-width))",f="translateX(calc(var(--app-shell-aside-width) * -1))";if(n!=null&&n.breakpoint&&!((d=n==null?void 0:n.collapsed)!=null&&d.mobile)&&(r[n==null?void 0:n.breakpoint]=r[n==null?void 0:n.breakpoint]||{},r[n==null?void 0:n.breakpoint]["--app-shell-aside-width"]="100%",r[n==null?void 0:n.breakpoint]["--app-shell-aside-offset"]="0px"),Ab(o)){const v=Fe(Sb(o));t["--app-shell-aside-width"]=v,t["--app-shell-aside-offset"]=v}if(Eb(o)&&(typeof o.base<"u"&&(t["--app-shell-aside-width"]=Fe(o.base),t["--app-shell-aside-offset"]=Fe(o.base)),Cn(o).forEach(v=>{v!=="base"&&(e[v]=e[v]||{},e[v]["--app-shell-aside-width"]=Fe(o[v]),e[v]["--app-shell-aside-offset"]=Fe(o[v]))})),(p=n==null?void 0:n.collapsed)!=null&&p.desktop){const v=n.breakpoint;e[v]=e[v]||{},e[v]["--app-shell-aside-transform"]=s,e[v]["--app-shell-aside-transform-rtl"]=f,e[v]["--app-shell-aside-offset"]="0px !important"}if((b=n==null?void 0:n.collapsed)!=null&&b.mobile){const v=OA(n.breakpoint,i)-.1;r[v]=r[v]||{},r[v]["--app-shell-aside-width"]="100%",r[v]["--app-shell-aside-offset"]="0px",r[v]["--app-shell-aside-transform"]=s,r[v]["--app-shell-aside-transform-rtl"]=f}}function Dte({baseStyles:t,minMediaStyles:e,footer:r}){const n=r==null?void 0:r.height,i="translateY(var(--app-shell-footer-height))",o=(r==null?void 0:r.offset)??!0;if(Ab(n)){const s=Fe(Sb(n));t["--app-shell-footer-height"]=s,o&&(t["--app-shell-footer-offset"]=s)}Eb(n)&&(typeof n.base<"u"&&(t["--app-shell-footer-height"]=Fe(n.base),o&&(t["--app-shell-footer-offset"]=Fe(n.base))),Cn(n).forEach(s=>{s!=="base"&&(e[s]=e[s]||{},e[s]["--app-shell-footer-height"]=Fe(n[s]),o&&(e[s]["--app-shell-footer-offset"]=Fe(n[s])))})),r!=null&&r.collapsed&&(t["--app-shell-footer-transform"]=i,t["--app-shell-footer-offset"]="0px !important")}function Fte({baseStyles:t,minMediaStyles:e,header:r}){const n=r==null?void 0:r.height,i="translateY(calc(var(--app-shell-header-height) * -1))",o=(r==null?void 0:r.offset)??!0;if(Ab(n)){const s=Fe(Sb(n));t["--app-shell-header-height"]=s,o&&(t["--app-shell-header-offset"]=s)}Eb(n)&&(typeof n.base<"u"&&(t["--app-shell-header-height"]=Fe(n.base),o&&(t["--app-shell-header-offset"]=Fe(n.base))),Cn(n).forEach(s=>{s!=="base"&&(e[s]=e[s]||{},e[s]["--app-shell-header-height"]=Fe(n[s]),o&&(e[s]["--app-shell-header-offset"]=Fe(n[s])))})),r!=null&&r.collapsed&&(t["--app-shell-header-transform"]=i,t["--app-shell-header-offset"]="0px !important")}function $te({baseStyles:t,minMediaStyles:e,maxMediaStyles:r,navbar:n,theme:i}){var d,p,b;const o=n==null?void 0:n.width,s="translateX(calc(var(--app-shell-navbar-width) * -1))",f="translateX(var(--app-shell-navbar-width))";if(n!=null&&n.breakpoint&&!((d=n==null?void 0:n.collapsed)!=null&&d.mobile)&&(r[n==null?void 0:n.breakpoint]=r[n==null?void 0:n.breakpoint]||{},r[n==null?void 0:n.breakpoint]["--app-shell-navbar-width"]="100%",r[n==null?void 0:n.breakpoint]["--app-shell-navbar-offset"]="0px"),Ab(o)){const v=Fe(Sb(o));t["--app-shell-navbar-width"]=v,t["--app-shell-navbar-offset"]=v}if(Eb(o)&&(typeof o.base<"u"&&(t["--app-shell-navbar-width"]=Fe(o.base),t["--app-shell-navbar-offset"]=Fe(o.base)),Cn(o).forEach(v=>{v!=="base"&&(e[v]=e[v]||{},e[v]["--app-shell-navbar-width"]=Fe(o[v]),e[v]["--app-shell-navbar-offset"]=Fe(o[v]))})),(p=n==null?void 0:n.collapsed)!=null&&p.desktop){const v=n.breakpoint;e[v]=e[v]||{},e[v]["--app-shell-navbar-transform"]=s,e[v]["--app-shell-navbar-transform-rtl"]=f,e[v]["--app-shell-navbar-offset"]="0px !important"}if((b=n==null?void 0:n.collapsed)!=null&&b.mobile){const v=OA(n.breakpoint,i)-.1;r[v]=r[v]||{},r[v]["--app-shell-navbar-width"]="100%",r[v]["--app-shell-navbar-offset"]="0px",r[v]["--app-shell-navbar-transform"]=s,r[v]["--app-shell-navbar-transform-rtl"]=f}}function W3(t){return Number(t)===0?"0px":bb(t)}function Ute({padding:t,baseStyles:e,minMediaStyles:r}){Ab(t)&&(e["--app-shell-padding"]=W3(Sb(t))),Eb(t)&&(t.base&&(e["--app-shell-padding"]=W3(t.base)),Cn(t).forEach(n=>{n!=="base"&&(r[n]=r[n]||{},r[n]["--app-shell-padding"]=W3(t[n]))}))}function zte({navbar:t,header:e,footer:r,aside:n,padding:i,theme:o}){const s={},f={},d={};$te({baseStyles:d,minMediaStyles:s,maxMediaStyles:f,navbar:t,theme:o}),Lte({baseStyles:d,minMediaStyles:s,maxMediaStyles:f,aside:n,theme:o}),Fte({baseStyles:d,minMediaStyles:s,header:e}),Dte({baseStyles:d,minMediaStyles:s,footer:r}),Ute({baseStyles:d,minMediaStyles:s,padding:i});const p=ZC(Cn(s),o).map(A=>({query:`(min-width: ${z2(A.px)})`,styles:s[A.value]})),b=ZC(Cn(f),o).map(A=>({query:`(max-width: ${z2(A.px)})`,styles:f[A.value]})),v=[...p,...b];return{baseStyles:d,media:v}}function jte({navbar:t,header:e,aside:r,footer:n,padding:i}){const o=ta(),s=D5(),{media:f,baseStyles:d}=zte({navbar:t,header:e,footer:n,aside:r,padding:i,theme:o});return se.createElement(rD,{media:f,styles:d,selector:s.cssVariablesSelector})}function Hte({transitionDuration:t,disabled:e}){const[r,n]=Z.useState(!1),i=Z.useRef(),o=Z.useRef();return WL("resize",()=>{n(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>n(!1),200)}),Qp(()=>{n(!0),clearTimeout(o.current),o.current=window.setTimeout(()=>n(!1),t||0)},[e,t]),r}const qte={withBorder:!0,offsetScrollbars:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Ha("app")},Gte=(t,{transitionDuration:e,transitionTimingFunction:r})=>({root:{"--app-shell-transition-duration":`${e}ms`,"--app-shell-transition-timing-function":r}}),Ws=Et((t,e)=>{const r=Ye("AppShell",qte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,navbar:p,withBorder:b,padding:v,transitionDuration:A,transitionTimingFunction:_,header:S,zIndex:P,layout:I,disabled:C,aside:T,footer:O,offsetScrollbars:B,...D}=r,U=Ht({name:"AppShell",classes:N0,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Gte}),K=Hte({disabled:C,transitionDuration:A});return se.createElement(Ite,{value:{getStyles:U,withBorder:b,zIndex:P,disabled:C,offsetScrollbars:B}},se.createElement(jte,{navbar:p,header:S,aside:T,footer:O,padding:v}),se.createElement(ft,{ref:e,...U("root"),mod:{resizing:K,layout:I,disabled:C},...D}))});Ws.classes=N0;Ws.displayName="@mantine/core/AppShell";Ws.Navbar=dS;Ws.Header=hS;Ws.Main=gS;Ws.Aside=mS;Ws.Footer=pS;Ws.Section=bS;function iF(t){return typeof t=="string"?{value:t,label:t}:typeof t=="number"?{value:t.toString(),label:t.toString()}:"group"in t?{group:t.group,items:t.items.map(e=>iF(e))}:t}function Vte(t){return t?t.map(iF):[]}function oF(t){return t.reduce((e,r)=>"group"in r?{...e,...oF(r.items)}:(e[r.value]=r,e),{})}var di={dropdown:"m-88b62a41",options:"m-b2821a6e",option:"m-92253aa5",search:"m-985517d8",empty:"m-2530cd1d",header:"m-858f94bd",footer:"m-82b967cb",group:"m-254f3e4f",groupLabel:"m-2bb2e9e5",chevron:"m-2943220b",optionsDropdownScrollArea:"m-71d052f9",optionsDropdownOption:"m-390b5f4",optionsDropdownCheckIcon:"m-8ee53fc2"};const Kte={error:null},Wte=(t,{size:e})=>({chevron:{"--combobox-chevron-size":zr(e,"combobox-chevron-size")}}),yS=Et((t,e)=>{const r=Ye("ComboboxChevron",Kte,t),{size:n,error:i,style:o,className:s,classNames:f,styles:d,unstyled:p,vars:b,...v}=r,A=Ht({name:"ComboboxChevron",classes:di,props:r,style:o,className:s,classNames:f,styles:d,unstyled:p,vars:b,varsResolver:Wte,rootSelector:"chevron"});return se.createElement(ft,{component:"svg",...v,...A("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i}],ref:e},se.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))});yS.classes=di;yS.displayName="@mantine/core/ComboboxChevron";function Jte(t,e,r){for(let n=t-1;n>=0;n-=1)if(!e[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=e.length-1;n>-1;n-=1)if(!e[n].hasAttribute("data-combobox-disabled"))return n}return t}function Zte(t,e,r){for(let n=t+1;n{f||(d(!0),i==null||i(h))},[d,i,f]),C=Z.useCallback((h="unknown")=>{f&&(d(!1),n==null||n(h))},[d,n,f]),T=Z.useCallback((h="unknown")=>{f?C(h):I(h)},[C,I,f]),O=Z.useCallback(()=>{const h=document.querySelector(`#${p.current} [data-combobox-selected]`);h==null||h.removeAttribute("data-combobox-selected"),h==null||h.removeAttribute("aria-selected")},[]),B=Z.useCallback(h=>{const m=document.getElementById(p.current),w=m==null?void 0:m.querySelectorAll("[data-combobox-option]");if(!w)return null;const E=h>=w.length?0:h<0?w.length-1:h;return b.current=E,w!=null&&w[E]&&!w[E].hasAttribute("data-combobox-disabled")?(O(),w[E].setAttribute("data-combobox-selected","true"),w[E].setAttribute("aria-selected","true"),w[E].scrollIntoView({block:"nearest",behavior:s}),w[E].id):null},[s,O]),D=Z.useCallback(()=>{const h=document.querySelector(`#${p.current} [data-combobox-active]`);if(h){const m=document.querySelectorAll(`#${p.current} [data-combobox-option]`),w=Array.from(m).findIndex(E=>E===h);return B(w)}return B(0)},[B]),U=Z.useCallback(()=>B(Zte(b.current,document.querySelectorAll(`#${p.current} [data-combobox-option]`),o)),[B,o]),K=Z.useCallback(()=>B(Jte(b.current,document.querySelectorAll(`#${p.current} [data-combobox-option]`),o)),[B,o]),Y=Z.useCallback(()=>B(Yte(document.querySelectorAll(`#${p.current} [data-combobox-option]`))),[B]),W=Z.useCallback((h="selected")=>{P.current=window.setTimeout(()=>{const m=document.querySelectorAll(`#${p.current} [data-combobox-option]`),w=Array.from(m).findIndex(E=>E.hasAttribute(`data-combobox-${h}`));b.current=w},0)},[]),ie=Z.useCallback(()=>{b.current=-1,O()},[O]),x=Z.useCallback(()=>{const h=document.querySelectorAll(`#${p.current} [data-combobox-option]`),m=h==null?void 0:h[b.current];m==null||m.click()},[]),a=Z.useCallback(h=>{p.current=h},[]),u=Z.useCallback(()=>{_.current=window.setTimeout(()=>v.current.focus(),0)},[]),l=Z.useCallback(()=>{S.current=window.setTimeout(()=>A.current.focus(),0)},[]);return Z.useEffect(()=>()=>{window.clearTimeout(_.current),window.clearTimeout(S.current),window.clearTimeout(P.current)},[]),{dropdownOpened:f,openDropdown:I,closeDropdown:C,toggleDropdown:T,selectedOptionIndex:b.current,selectOption:B,selectFirstOption:Y,selectActiveOption:D,selectNextOption:U,selectPreviousOption:K,resetSelectedOption:ie,updateSelectedOptionIndex:W,listId:p.current,setListId:a,clickSelectedOption:x,searchRef:v,focusSearchInput:u,targetRef:A,focusTarget:l}}const[Qte,ns]=vl("Combobox component was not found in tree");function vS({onKeyDown:t,withKeyboardNavigation:e,withAriaAttributes:r,withExpandedAttribute:n,targetType:i}){const o=ns(),[s,f]=Z.useState(null),d=b=>{t==null||t(b),!o.readOnly&&e&&(b.nativeEvent.code==="ArrowDown"&&(b.preventDefault(),o.store.dropdownOpened?f(o.store.selectNextOption()):(o.store.openDropdown("keyboard"),f(o.store.selectActiveOption()))),b.nativeEvent.code==="ArrowUp"&&(b.preventDefault(),o.store.dropdownOpened?f(o.store.selectPreviousOption()):(o.store.openDropdown("keyboard"),f(o.store.selectActiveOption()))),b.nativeEvent.code==="Enter"&&(o.store.dropdownOpened?(b.preventDefault(),o.store.clickSelectedOption()):i==="button"&&(b.preventDefault(),o.store.openDropdown("keyboard"))),b.nativeEvent.code==="Escape"&&o.store.closeDropdown("keyboard"),b.nativeEvent.code==="Space"&&i==="button"&&(b.preventDefault(),o.store.toggleDropdown("keyboard")))};return{...r?{"aria-haspopup":"listbox","aria-expanded":n&&!!(o.store.listId&&o.store.dropdownOpened)||void 0,"aria-controls":o.store.listId,"aria-activedescendant":o.store.dropdownOpened&&s||void 0,autoComplete:"off","data-expanded":o.store.dropdownOpened?!0:void 0}:{},onKeyDown:d}}const Xte={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1},aF=Et((t,e)=>{const{children:r,refProp:n,withKeyboardNavigation:i,withAriaAttributes:o,withExpandedAttribute:s,targetType:f,...d}=Ye("ComboboxTarget",Xte,t);if(!yl(r))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const p=ns(),b=vS({targetType:f,withAriaAttributes:o,withKeyboardNavigation:i,withExpandedAttribute:s,onKeyDown:r.props.onKeyDown}),v=Z.cloneElement(r,{...b,...d});return se.createElement(O0.Target,{ref:Ui(e,p.store.targetRef)},v)});aF.displayName="@mantine/core/ComboboxTarget";const ere={},wS=Et((t,e)=>{const{classNames:r,styles:n,className:i,style:o,hidden:s,...f}=Ye("ComboboxDropdown",ere,t),d=ns();return se.createElement(O0.Dropdown,{...f,ref:e,role:"presentation","data-hidden":s||void 0,...d.getStyles("dropdown",{className:i,style:o,classNames:r,styles:n})})});wS.classes=di;wS.displayName="@mantine/core/ComboboxDropdown";const tre={},xS=Et((t,e)=>{const r=Ye("ComboboxOptions",tre,t),{classNames:n,className:i,style:o,styles:s,id:f,onMouseDown:d,labelledBy:p,...b}=r,v=ns(),A=wl(f);return Z.useEffect(()=>{v.store.setListId(A)},[A]),se.createElement(ft,{ref:e,...v.getStyles("options",{className:i,style:o,classNames:n,styles:s}),...b,id:A,role:"listbox","aria-labelledby":p,onMouseDown:_=>{_.preventDefault(),d==null||d(_)}})});xS.classes=di;xS.displayName="@mantine/core/ComboboxOptions";const rre={},ES=Et((t,e)=>{const r=Ye("ComboboxOption",rre,t),{classNames:n,className:i,style:o,styles:s,vars:f,onClick:d,id:p,active:b,onMouseDown:v,onMouseOver:A,disabled:_,selected:S,...P}=r,I=ns(),C=Z.useId(),T=p||C;return se.createElement(ft,{...I.getStyles("option",{className:i,classNames:n,styles:s,style:o}),...P,ref:e,id:T,mod:["combobox-option",{"combobox-active":b,"combobox-disabled":_,"combobox-selected":S}],role:"option",onClick:O=>{var B;_?O.preventDefault():((B=I.onOptionSubmit)==null||B.call(I,r.value,r),d==null||d(O))},onMouseDown:O=>{O.preventDefault(),v==null||v(O)},onMouseOver:O=>{I.resetSelectionOnOptionHover&&I.store.resetSelectedOption(),A==null||A(O)}})});ES.classes=di;ES.displayName="@mantine/core/ComboboxOption";const nre={withAriaAttributes:!0,withKeyboardNavigation:!0},AS=Et((t,e)=>{const r=Ye("ComboboxSearch",nre,t),{classNames:n,styles:i,unstyled:o,vars:s,withAriaAttributes:f,onKeyDown:d,withKeyboardNavigation:p,size:b,...v}=r,A=ns(),_=A.getStyles("search"),S=vS({targetType:"input",withAriaAttributes:f,withKeyboardNavigation:p,withExpandedAttribute:!1,onKeyDown:d});return se.createElement(an,{ref:Ui(e,A.store.searchRef),classNames:[{input:_.className},n],styles:[{input:_.style},i],size:b||A.size,...S,...v,__staticSelector:"Combobox"})});AS.classes=di;AS.displayName="@mantine/core/ComboboxSearch";const ire={},SS=Et((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:s,...f}=Ye("ComboboxEmpty",ire,t),d=ns();return se.createElement(ft,{ref:e,...d.getStyles("empty",{className:n,classNames:r,styles:o,style:i}),...f})});SS.classes=di;SS.displayName="@mantine/core/ComboboxEmpty";const ore={},MS=Et((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:s,...f}=Ye("ComboboxFooter",ore,t),d=ns();return se.createElement(ft,{ref:e,...d.getStyles("footer",{className:n,classNames:r,style:i,styles:o}),...f})});MS.classes=di;MS.displayName="@mantine/core/ComboboxFooter";const sre={},_S=Et((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:s,...f}=Ye("ComboboxHeader",sre,t),d=ns();return se.createElement(ft,{ref:e,...d.getStyles("header",{className:n,classNames:r,style:i,styles:o}),...f})});_S.classes=di;_S.displayName="@mantine/core/ComboboxHeader";const are={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1},fF=Et((t,e)=>{const{children:r,refProp:n,withKeyboardNavigation:i,withAriaAttributes:o,withExpandedAttribute:s,targetType:f,...d}=Ye("ComboboxEventsTarget",are,t);if(!yl(r))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const p=ns(),b=vS({targetType:f,withAriaAttributes:o,withKeyboardNavigation:i,withExpandedAttribute:s,onKeyDown:r.props.onKeyDown});return Z.cloneElement(r,{...b,...d,[n]:Ui(e,p.store.targetRef,r==null?void 0:r.ref)})});fF.displayName="@mantine/core/ComboboxEventsTarget";const fre={refProp:"ref"},cF=Et((t,e)=>{const{children:r,refProp:n}=Ye("ComboboxDropdownTarget",fre,t);if(ns(),!yl(r))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return se.createElement(O0.Target,{ref:e,refProp:n},r)});cF.displayName="@mantine/core/ComboboxDropdownTarget";const cre={},PS=Et((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:s,children:f,label:d,...p}=Ye("ComboboxGroup",cre,t),b=ns();return se.createElement(ft,{ref:e,...b.getStyles("group",{className:n,classNames:r,style:i,styles:o}),...p},d&&se.createElement("div",{...b.getStyles("groupLabel",{classNames:r,styles:o})},d),f)});PS.classes=di;PS.displayName="@mantine/core/ComboboxGroup";const uF=Z.forwardRef(({size:t,onMouseDown:e,onClick:r,onClear:n,...i},o)=>se.createElement(Sl,{ref:o,size:t||"sm",variant:"transparent",tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:s=>{s.preventDefault(),e==null||e(s)},onClick:s=>{n(),r==null||r(s)}}));uF.displayName="@mantine/core/ComboboxClearButton";const ure={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},lre=(t,{size:e,dropdownPadding:r})=>({options:{"--combobox-option-fz":Fo(e),"--combobox-option-padding":zr(e,"combobox-option-padding")},dropdown:{"--combobox-padding":r===void 0?void 0:Fe(r),"--combobox-option-fz":Fo(e),"--combobox-option-padding":zr(e,"combobox-option-padding")}});function gr(t){const e=Ye("Combobox",ure,t),{classNames:r,styles:n,unstyled:i,children:o,store:s,vars:f,onOptionSubmit:d,size:p,dropdownPadding:b,resetSelectionOnOptionHover:v,__staticSelector:A,readOnly:_,...S}=e,P=sF(),I=s||P,C=Ht({name:A||"Combobox",classes:di,props:e,classNames:r,styles:n,unstyled:i,vars:f,varsResolver:lre});return se.createElement(Qte,{value:{getStyles:C,store:I,onOptionSubmit:d,size:p,resetSelectionOnOptionHover:v,readOnly:_}},se.createElement(O0,{opened:I.dropdownOpened,...S,onClose:I.closeDropdown,withRoles:!1,unstyled:i},o))}const dre=t=>t;gr.extend=dre;gr.classes=di;gr.displayName="@mantine/core/Combobox";gr.Target=aF;gr.Dropdown=wS;gr.Options=xS;gr.Option=ES;gr.Search=AS;gr.Empty=SS;gr.Chevron=yS;gr.Footer=MS;gr.Header=_S;gr.EventsTarget=fF;gr.DropdownTarget=cF;gr.Group=PS;gr.ClearButton=uF;function hre({size:t,style:e,...r}){const n=t!==void 0?{width:Fe(t),height:Fe(t),...e}:e;return se.createElement("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,"aria-hidden":!0,...r},se.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function dg(t){return"group"in t}function lF({options:t,search:e,limit:r}){const n=e.trim().toLowerCase(),i=[];for(let o=0;o0)return!1;return!0}function dF(t,e=new Set){if(Array.isArray(t))for(const r of t)if(dg(r))dF(r.items,e);else{if(typeof r.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof r.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof r.value}`);if(e.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);e.add(r.value)}}function J3(t,e){return Array.isArray(t)?t.includes(e):t===e}function hF({data:t,withCheckIcon:e,value:r,checkIconPosition:n,unstyled:i}){if(!dg(t)){const s=e&&J3(r,t.value)&&se.createElement(hre,{className:di.optionsDropdownCheckIcon});return se.createElement(gr.Option,{value:t.value,disabled:t.disabled,className:cn({[di.optionsDropdownOption]:!i}),"data-reverse":n==="right"||void 0,"data-checked":J3(r,t.value)||void 0,"aria-selected":J3(r,t.value)},n==="left"&&s,t.label,n==="right"&&s)}const o=t.items.map(s=>se.createElement(hF,{data:s,value:r,key:s.value,unstyled:i,withCheckIcon:e,checkIconPosition:n}));return se.createElement(gr.Group,{label:t.group},o)}function mre({data:t,hidden:e,hiddenWhenEmpty:r,filter:n,search:i,limit:o,maxDropdownHeight:s,withScrollArea:f=!0,filterOptions:d=!0,withCheckIcon:p=!1,value:b,checkIconPosition:v,nothingFoundMessage:A,unstyled:_,labelId:S}){dF(t);const I=typeof i=="string"?(n||lF)({options:t,search:d?i:"",limit:o??1/0}):t,C=pre(I),T=I.map(O=>se.createElement(hF,{data:O,key:dg(O)?O.group:O.value,withCheckIcon:p,value:b,checkIconPosition:v,unstyled:_}));return se.createElement(gr.Dropdown,{hidden:e||r&&C},se.createElement(gr.Options,{labelledBy:S},f?se.createElement(yb.Autosize,{mah:s??220,type:"scroll",scrollbarSize:"var(--_combobox-padding)",offsetScrollbars:"y",className:di.optionsDropdownScrollArea},T):T,C&&A&&se.createElement(gr.Empty,null,A)))}const pF=Z.createContext(null),gre=pF.Provider;function bre(){return{withinGroup:!!Z.useContext(pF)}}var Z5={root:"m-f85678b6",image:"m-11f8ac07",placeholder:"m-104cd71f",group:"m-11def92b"};const yre={},vre=(t,{spacing:e})=>({group:{"--ag-spacing":bb(e)}}),CS=Et((t,e)=>{const r=Ye("AvatarGroup",yre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,spacing:p,...b}=r,v=Ht({name:"AvatarGroup",classes:Z5,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:vre,rootSelector:"group"});return se.createElement(gre,{value:!0},se.createElement(ft,{ref:e,...v("group"),...b}))});CS.classes=Z5;CS.displayName="@mantine/core/AvatarGroup";function wre(t){return se.createElement("svg",{...t,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},se.createElement("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const xre={},Ere=(t,{size:e,radius:r,variant:n,gradient:i,color:o})=>{const s=t.variantColorResolver({color:o||"gray",theme:t,gradient:i,variant:n||"light"});return{root:{"--avatar-size":zr(e,"avatar-size"),"--avatar-radius":r===void 0?void 0:bi(r),"--avatar-bg":o||n?s.background:void 0,"--avatar-color":o||n?s.color:void 0,"--avatar-bd":o||n?s.border:void 0}}},Y5=zi((t,e)=>{const r=Ye("Avatar",xre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,src:p,alt:b,radius:v,color:A,gradient:_,imageProps:S,children:P,...I}=r,C=bre(),[T,O]=Z.useState(!p),B=Ht({name:"Avatar",props:r,classes:Z5,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Ere});return Z.useEffect(()=>O(!p),[p]),se.createElement(ft,{...B("root"),mod:{"within-group":C.withinGroup},ref:e,...I},T?se.createElement("span",{...B("placeholder"),title:b},P||se.createElement(wre,null)):se.createElement("img",{...S,...B("image"),src:p,alt:b,onError:D=>{var U;O(!0),(U=S==null?void 0:S.onError)==null||U.call(S,D)}}))});Y5.classes=Z5;Y5.displayName="@mantine/core/Avatar";Y5.Group=CS;var mF={root:"m-347db0ec","root--dot":"m-fbd81e3d",label:"m-5add502a",section:"m-91fdda9b"};const Are={},Sre=(t,{radius:e,color:r,gradient:n,variant:i,size:o})=>{const s=t.variantColorResolver({color:r||t.primaryColor,theme:t,gradient:n,variant:i||"filled"});return{root:{"--badge-height":zr(o,"badge-height"),"--badge-padding-x":zr(o,"badge-padding-x"),"--badge-fz":zr(o,"badge-fz"),"--badge-radius":e===void 0?void 0:bi(e),"--badge-bg":r||i?s.background:void 0,"--badge-color":r||i?s.color:void 0,"--badge-bd":r||i?s.border:void 0,"--badge-dot-color":i==="dot"?zf(r,t):void 0}}},IS=zi((t,e)=>{const r=Ye("Badge",Are,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,radius:p,color:b,gradient:v,leftSection:A,rightSection:_,children:S,variant:P,fullWidth:I,...C}=r,T=Ht({name:"Badge",props:r,classes:mF,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Sre});return se.createElement(ft,{variant:P,mod:{block:I},...T("root",{variant:P}),ref:e,...C},A&&se.createElement("span",{...T("section"),"data-position":"left"},A),se.createElement("span",{...T("label")},S),_&&se.createElement("span",{...T("section"),"data-position":"right"},_))});IS.classes=mF;IS.displayName="@mantine/core/Badge";var Q5={root:"m-77c9d27d",inner:"m-80f1301b",loader:"m-a25b86ee",label:"m-811560b9",section:"m-a74036a",group:"m-80d6d844"};const MI={orientation:"horizontal"},Mre=(t,{borderWidth:e})=>({group:{"--button-border-width":Fe(e)}}),TS=Et((t,e)=>{const r=Ye("ButtonGroup",MI,t),{className:n,style:i,classNames:o,styles:s,unstyled:f,orientation:d,vars:p,borderWidth:b,variant:v,...A}=Ye("ButtonGroup",MI,t),_=Ht({name:"ButtonGroup",props:r,classes:Q5,className:n,style:i,classNames:o,styles:s,unstyled:f,vars:p,varsResolver:Mre,rootSelector:"group"});return se.createElement(ft,{..._("group"),ref:e,variant:v,mod:{"data-orientation":d},role:"group",...A})});TS.classes=Q5;TS.displayName="@mantine/core/ButtonGroup";const _re={},Pre=(t,{radius:e,color:r,gradient:n,variant:i,size:o,justify:s})=>{const f=t.variantColorResolver({color:r||t.primaryColor,theme:t,gradient:n,variant:i||"filled"});return{root:{"--button-justify":s,"--button-height":zr(o,"button-height"),"--button-padding-x":zr(o,"button-padding-x"),"--button-fz":o!=null&&o.includes("compact")?Fo(o.replace("compact-","")):Fo(o),"--button-radius":e===void 0?void 0:bi(e),"--button-bg":r||i?f.background:void 0,"--button-hover":r||i?f.hover:void 0,"--button-color":r||i?f.color:void 0,"--button-bd":r||i?f.border:void 0,"--button-hover-color":r||i?f.hoverColor:void 0}}},io=zi((t,e)=>{const r=Ye("Button",_re,t),{style:n,vars:i,className:o,color:s,disabled:f,children:d,leftSection:p,rightSection:b,fullWidth:v,variant:A,radius:_,loading:S,loaderProps:P,gradient:I,classNames:C,styles:T,unstyled:O,"data-disabled":B,...D}=r,U=Ht({name:"Button",props:r,classes:Q5,className:o,style:n,classNames:C,styles:T,unstyled:O,vars:i,varsResolver:Pre}),K=!!p,Y=!!b;return se.createElement(vb,{ref:e,...U("root",{active:!f&&!S&&!B}),unstyled:O,variant:A,disabled:f||S,mod:{disabled:f||B,loading:S,block:v,"with-left-section":K,"with-right-section":Y},...D},se.createElement(ft,{component:"span",...U("loader"),"aria-hidden":!0},se.createElement(Al,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...P})),se.createElement("span",{...U("inner")},p&&se.createElement(ft,{component:"span",...U("section"),mod:{position:"left"}},p),se.createElement(ft,{component:"span",mod:{loading:S},...U("label")},d),b&&se.createElement(ft,{component:"span",...U("section"),mod:{position:"right"}},b)))});io.classes=Q5;io.displayName="@mantine/core/Button";io.Group=TS;const Cre={timeout:1e3};function RS(t){const{children:e,timeout:r,value:n,...i}=Ye("CopyButton",Cre,t),o=HY({timeout:r}),s=()=>o.copy(n);return se.createElement(se.Fragment,null,e({copy:s,copied:o.copied,...i}))}RS.displayName="@mantine/core/CopyButton";var gF={root:"m-e2125a27",closeButton:"m-5abab665"};const Ire={shadow:"md",p:"md",withBorder:!1,transitionProps:{transition:"pop-top-right",duration:200},position:{bottom:30,right:30}},Tre=(t,{size:e})=>({root:{"--dialog-size":zr(e,"dialog-size")}}),W2=Et((t,e)=>{const r=Ye("Dialog",Ire,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,zIndex:p,position:b,keepMounted:v,opened:A,transitionProps:_,withCloseButton:S,withinPortal:P,children:I,onClose:C,portalProps:T,...O}=r,B=Ht({name:"Dialog",classes:gF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Tre});return se.createElement(fS,{zIndex:p,position:b,ref:e,withinPortal:P,portalProps:T,unstyled:f},se.createElement(El,{keepMounted:v,mounted:A,..._},D=>se.createElement(wb,{unstyled:f,...B("root",{style:D}),...O},S&&se.createElement(Sl,{onClick:C,unstyled:f,...B("closeButton")}),I)))});W2.classes=gF;W2.displayName="@mantine/core/Dialog";var bF={root:"m-3eebeb36",label:"m-9e365f20"};const Rre={orientation:"horizontal"},kre=(t,{color:e,variant:r,size:n})=>({root:{"--divider-color":e?zf(e,t):void 0,"--divider-border-style":r,"--divider-size":zr(n,"divider-size")}}),X5=Et((t,e)=>{const r=Ye("Divider",Rre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,color:p,orientation:b,label:v,labelPosition:A,..._}=r,S=Ht({name:"Divider",classes:bF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:kre});return se.createElement(ft,{ref:e,mod:{orientation:b,"with-label":!!v},...S("root"),..._,role:"separator"},v&&se.createElement(ft,{component:"span",mod:{position:A},...S("label")},v))});X5.classes=bF;X5.displayName="@mantine/core/Divider";var yF={root:"m-9e117634"};const Bre={},Ore=(t,{radius:e,fit:r})=>({root:{"--image-radius":e===void 0?void 0:bi(e),"--image-object-fit":r}}),kS=zi((t,e)=>{const r=Ye("Image",Bre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,onError:p,src:b,radius:v,fit:A,fallbackSrc:_,...S}=r,[P,I]=Z.useState(!b);Z.useEffect(()=>I(!b),[b]);const C=Ht({name:"Image",classes:yF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Ore});return P&&_?se.createElement(ft,{component:"img",src:_,...C("root"),onError:p,mod:"fallback",...S}):se.createElement(ft,{component:"img",ref:e,...C("root"),src:b,onError:T=>{p==null||p(T),I(!0)},...S})});kS.classes=yF;kS.displayName="@mantine/core/Image";var vF={root:"m-6e45937b",loader:"m-e8eb006c",overlay:"m-df587f17"};const _I={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:Ha("overlay")},Nre=(t,{zIndex:e})=>({root:{"--lo-z-index":e==null?void 0:e.toString()}}),BS=Et((t,e)=>{const r=Ye("LoadingOverlay",_I,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,transitionProps:p,loaderProps:b,overlayProps:v,visible:A,zIndex:_,...S}=r,P=ta(),I=Ht({name:"LoadingOverlay",classes:vF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Nre}),C={..._I.overlayProps,...v};return se.createElement(El,{transition:"fade",...p,mounted:!!A},T=>se.createElement(ft,{...I("root",{style:T}),ref:e,...S},se.createElement(Al,{...I("loader"),unstyled:f,...b}),se.createElement(lg,{...C,...I("overlay"),"data-light":!0,unstyled:f,color:(v==null?void 0:v.color)||P.white}),se.createElement(lg,{...C,...I("overlay"),"data-dark":!0,unstyled:f,color:(v==null?void 0:v.color)||P.colors.dark[5]})))});BS.classes=vF;BS.displayName="@mantine/core/LoadingOverlay";const[Lre,r1]=vl("Modal component was not found in tree");var tc={root:"m-9df02822",content:"m-54c44539",inner:"m-1f958f16",header:"m-d0e2b9cd"};const Dre={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ha("modal"),transitionProps:{duration:200,transition:"pop"},yOffset:"5dvh"},Fre=(t,{radius:e,size:r,yOffset:n,xOffset:i})=>({root:{"--modal-radius":e===void 0?void 0:bi(e),"--modal-size":zr(r,"modal-size"),"--modal-y-offset":Fe(n),"--modal-x-offset":Fe(i)}}),ew=Et((t,e)=>{const r=Ye("ModalRoot",Dre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,yOffset:p,scrollAreaComponent:b,radius:v,fullScreen:A,centered:_,xOffset:S,__staticSelector:P,...I}=r,C=Ht({name:P,classes:tc,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Fre});return se.createElement(Lre,{value:{yOffset:p,scrollAreaComponent:b,getStyles:C}},se.createElement(rte,{ref:e,...C("root"),"data-full-screen":A||void 0,"data-centered":_||void 0,unstyled:f,...I}))});ew.classes=tc;ew.displayName="@mantine/core/ModalRoot";const $re={},tw=Et((t,e)=>{const r=Ye("ModalBody",$re,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=r1();return se.createElement(JD,{ref:e,...p.getStyles("body",{classNames:n,style:o,styles:s,className:i}),...d})});tw.classes=tc;tw.displayName="@mantine/core/ModalBody";const Ure={},rw=Et((t,e)=>{const r=Ye("ModalCloseButton",Ure,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=r1();return se.createElement(ZD,{ref:e,...p.getStyles("close",{classNames:n,style:o,styles:s,className:i}),...d})});rw.classes=tc;rw.displayName="@mantine/core/ModalCloseButton";const zre={},nw=Et((t,e)=>{const r=Ye("ModalOverlay",zre,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=r1();return se.createElement(QD,{ref:e,...p.getStyles("overlay",{classNames:n,style:o,styles:s,className:i}),...d})});nw.classes=tc;nw.displayName="@mantine/core/ModalOverlay";const jre={},iw=Et((t,e)=>{const r=Ye("ModalContent",jre,t),{classNames:n,className:i,style:o,styles:s,vars:f,children:d,...p}=r,b=r1(),v=b.scrollAreaComponent||fte;return se.createElement(ite,{...b.getStyles("content",{className:i,style:o,styles:s,classNames:n}),innerProps:b.getStyles("inner",{className:i,style:o,styles:s,classNames:n}),ref:e,...p},se.createElement(v,{style:{maxHeight:`calc(100vh - (${Fe(b.yOffset)} * 2))`}},d))});iw.classes=tc;iw.displayName="@mantine/core/ModalContent";const Hre={},ow=Et((t,e)=>{const r=Ye("ModalTitle",Hre,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=r1();return se.createElement(XD,{ref:e,...p.getStyles("title",{classNames:n,style:o,styles:s,className:i}),...d})});ow.classes=tc;ow.displayName="@mantine/core/ModalTitle";const qre={},sw=Et((t,e)=>{const r=Ye("ModalHeader",qre,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=r1();return se.createElement(YD,{ref:e,...p.getStyles("header",{classNames:n,style:o,styles:s,className:i}),...d})});sw.classes=tc;sw.displayName="@mantine/core/ModalHeader";const Gre={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ha("modal"),transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0},ra=Et((t,e)=>{const{title:r,withOverlay:n,overlayProps:i,withCloseButton:o,closeButtonProps:s,children:f,radius:d,...p}=Ye("Modal",Gre,t),b=!!r||o;return se.createElement(ew,{ref:e,radius:d,...p},n&&se.createElement(nw,{...i}),se.createElement(iw,{radius:d},b&&se.createElement(sw,null,r&&se.createElement(ow,null,r),o&&se.createElement(rw,{...s})),se.createElement(tw,null,f)))});ra.classes=tc;ra.displayName="@mantine/core/Modal";ra.Root=ew;ra.Overlay=nw;ra.Content=iw;ra.Body=tw;ra.Header=sw;ra.Title=ow;ra.CloseButton=rw;var wF={root:"m-a513464",icon:"m-a4ceffb",loader:"m-b0920b15",body:"m-a49ed24",title:"m-3feedf16",description:"m-3d733a3a",closeButton:"m-919a4d88"};const Vre={withCloseButton:!0},Kre=(t,{radius:e,color:r})=>({root:{"--notification-radius":e===void 0?void 0:bi(e),"--notification-color":r?zf(r,t):void 0}}),J2=Et((t,e)=>{const r=Ye("Notification",Vre,t),{className:n,color:i,radius:o,loading:s,withCloseButton:f,withBorder:d,title:p,icon:b,children:v,onClose:A,closeButtonProps:_,classNames:S,style:P,styles:I,unstyled:C,variant:T,vars:O,...B}=r,D=Ht({name:"Notification",classes:wF,props:r,className:n,style:P,classNames:S,styles:I,unstyled:C,vars:O,varsResolver:Kre});return se.createElement(ft,{...D("root"),mod:{"data-with-icon":!!b||s,"data-with-border":d},ref:e,variant:T,...B,role:"alert"},b&&!s&&se.createElement("div",{...D("icon")},b),s&&se.createElement(Al,{size:28,color:i,...D("loader")}),se.createElement("div",{...D("body")},p&&se.createElement("div",{...D("title")},p),se.createElement(ft,{...D("description"),mod:{"data-with-title":!!p}},v)),f&&se.createElement(Sl,{iconSize:16,color:"gray",..._,unstyled:C,onClick:A,...D("closeButton")}))});J2.classes=wF;J2.displayName="@mantine/core/Notification";const Wre={duration:100,transition:"fade"};function Jre(t,e){return{...Wre,...e,...t}}var aw={tooltip:"m-1b3c8819",arrow:"m-f898399f"};function Zre({offset:t,position:e}){const[r,n]=Z.useState(!1),i=Z.useRef(),{x:o,y:s,elements:f,refs:d,update:p,placement:b}=tS({placement:e,middleware:[ZA({crossAxis:!0,padding:5,rootBoundary:"document"})]}),v=b.includes("right")?t:e.includes("left")?t*-1:0,A=b.includes("bottom")?t:e.includes("top")?t*-1:0,_=Z.useCallback(({clientX:S,clientY:P})=>{d.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:S,y:P,left:S+v,top:P+A,right:S,bottom:P}}})},[f.reference]);return Z.useEffect(()=>{if(d.floating.current){const S=i.current;S.addEventListener("mousemove",_);const P=Rf(d.floating.current);return P.forEach(I=>{I.addEventListener("scroll",p)}),()=>{S.removeEventListener("mousemove",_),P.forEach(I=>{I.removeEventListener("scroll",p)})}}},[f.reference,d.floating.current,p,_,r]),{handleMouseMove:_,x:o,y:s,opened:r,setOpened:n,boundaryRef:i,floating:d.setFloating}}const Yre={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Ha("popover")},Qre=(t,{radius:e,color:r})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:bi(e),"--tooltip-bg":r?zf(r,t):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),OS=Et((t,e)=>{const r=Ye("TooltipFloating",Yre,t),{children:n,refProp:i,withinPortal:o,style:s,className:f,classNames:d,styles:p,unstyled:b,radius:v,color:A,label:_,offset:S,position:P,multiline:I,zIndex:C,disabled:T,variant:O,vars:B,portalProps:D,...U}=r,K=ta(),Y=Ht({name:"TooltipFloating",props:r,classes:aw,className:f,style:s,classNames:d,styles:p,unstyled:b,rootSelector:"tooltip",vars:B,varsResolver:Qre}),{handleMouseMove:W,x:ie,y:x,opened:a,boundaryRef:u,floating:l,setOpened:h}=Zre({offset:S,position:P});if(!yl(n))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const m=Ui(u,n.ref,e),w=y=>{var c,g;(g=(c=n.props).onMouseEnter)==null||g.call(c,y),W(y),h(!0)},E=y=>{var c,g;(g=(c=n.props).onMouseLeave)==null||g.call(c,y),h(!1)};return se.createElement(se.Fragment,null,se.createElement(e1,{...D,withinPortal:o},se.createElement(ft,{...U,...Y("tooltip",{style:{...nD(s,K),zIndex:C,display:!T&&a?"block":"none",top:(x&&Math.round(x))??"",left:(ie&&Math.round(ie))??""}}),variant:O,ref:l},_)),Z.cloneElement(n,{...n.props,[i]:m,onMouseEnter:w,onMouseLeave:E}))});OS.classes=aw;OS.displayName="@mantine/core/TooltipFloating";const xF=Z.createContext(!1),Xre=xF.Provider,ene=()=>Z.useContext(xF),tne={openDelay:0,closeDelay:0};function EF(t){const{openDelay:e,closeDelay:r,children:n}=Ye("TooltipGroup",tne,t);return se.createElement(Xre,{value:!0},se.createElement(lee,{delay:{open:e,close:r}},n))}EF.displayName="@mantine/core/TooltipGroup";function rne(t){var U,K,Y;const[e,r]=Z.useState(!1),i=typeof t.opened=="boolean"?t.opened:e,o=ene(),s=wl(),{delay:f,currentId:d,setCurrentId:p}=FD(),b=Z.useCallback(W=>{r(W),W&&p(s)},[p,s]),{x:v,y:A,context:_,refs:S,update:P,placement:I,middlewareData:{arrow:{x:C,y:T}={}}}=tS({placement:t.position,open:i,onOpenChange:b,middleware:[ED(t.offset),ZA({padding:8}),vD(),TD({element:t.arrowRef,padding:t.arrowOffset}),...t.inline?[xD()]:[]]}),{getReferenceProps:O,getFloatingProps:B}=Eee([uee(_,{enabled:(U=t.events)==null?void 0:U.hover,delay:o?f:{open:t.openDelay,close:t.closeDelay},mouseOnly:!((K=t.events)!=null&&K.touch)}),xee(_,{enabled:(Y=t.events)==null?void 0:Y.focus,keyboardOnly:!0}),Aee(_,{role:"tooltip"}),wee(_,{enabled:typeof t.opened>"u"}),dee(_,{id:s})]);UD({opened:i,position:t.position,positionDependencies:t.positionDependencies,floating:{refs:S,update:P}}),Xu(()=>{var W;(W=t.onPositionChange)==null||W.call(t,I)},[I]);const D=i&&d&&d!==s;return{x:v,y:A,arrowX:C,arrowY:T,reference:S.setReference,floating:S.setFloating,getFloatingProps:B,getReferenceProps:O,isGroupPhase:D,opened:i,placement:I}}const PI={position:"top",refProp:"ref",withinPortal:!0,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:Ha("popover"),positionDependencies:[]},nne=(t,{radius:e,color:r})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:bi(e),"--tooltip-bg":r?zf(r,t):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),Mb=Et((t,e)=>{const r=Ye("Tooltip",PI,t),{children:n,position:i,refProp:o,label:s,openDelay:f,closeDelay:d,onPositionChange:p,opened:b,withinPortal:v,radius:A,color:_,classNames:S,styles:P,unstyled:I,style:C,className:T,withArrow:O,arrowSize:B,arrowOffset:D,arrowRadius:U,arrowPosition:K,offset:Y,transitionProps:W,multiline:ie,events:x,zIndex:a,disabled:u,positionDependencies:l,onClick:h,onMouseEnter:m,onMouseLeave:w,inline:E,variant:y,keepMounted:c,vars:g,portalProps:M,...k}=Ye("Tooltip",PI,r),{dir:L}=F5(),R=Z.useRef(null),F=rne({position:$D(L,i),closeDelay:d,openDelay:f,onPositionChange:p,opened:b,events:x,arrowRef:R,arrowOffset:D,offset:typeof Y=="number"?Y+(O?B/2:0):Y,positionDependencies:[...l,n],inline:E}),z=Ht({name:"Tooltip",props:r,classes:aw,className:T,style:C,classNames:S,styles:P,unstyled:I,rootSelector:"tooltip",vars:g,varsResolver:nne});if(!yl(n))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const V=Ui(F.reference,n.ref,e),q=Jre(W,{duration:100,transition:"fade"});return se.createElement(se.Fragment,null,se.createElement(e1,{...M,withinPortal:v},se.createElement(El,{...q,keepMounted:c,mounted:!u&&!!F.opened,duration:F.isGroupPhase?10:q.duration},Q=>se.createElement(ft,{...k,variant:y,mod:{multiline:ie},...F.getFloatingProps({ref:F.floating,className:z("tooltip").className,style:{...z("tooltip").style,...Q,zIndex:a,top:F.y??0,left:F.x??0}})},s,se.createElement(rS,{ref:R,arrowX:F.arrowX,arrowY:F.arrowY,visible:O,position:F.placement,arrowSize:B,arrowOffset:D,arrowRadius:U,arrowPosition:K,...z("arrow")})))),Z.cloneElement(n,F.getReferenceProps({onClick:h,onMouseEnter:m,onMouseLeave:w,onMouseMove:r.onMouseMove,onPointerDown:r.onPointerDown,onPointerEnter:r.onPointerEnter,[o]:V,className:cn(T,n.props.className),...n.props})))});Mb.classes=aw;Mb.displayName="@mantine/core/Tooltip";Mb.Floating=OS;Mb.Group=EF;const ine={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},NS=Et((t,e)=>{const r=Ye("Select",ine,t),{classNames:n,styles:i,unstyled:o,vars:s,dropdownOpened:f,defaultDropdownOpened:d,onDropdownClose:p,onDropdownOpen:b,onFocus:v,onBlur:A,onClick:_,onChange:S,data:P,value:I,defaultValue:C,selectFirstOptionOnChange:T,onOptionSubmit:O,comboboxProps:B,readOnly:D,disabled:U,filter:K,limit:Y,withScrollArea:W,maxDropdownHeight:ie,size:x,searchable:a,rightSection:u,checkIconPosition:l,withCheckIcon:h,nothingFoundMessage:m,name:w,form:E,searchValue:y,defaultSearchValue:c,onSearchChange:g,allowDeselect:M,error:k,rightSectionPointerEvents:L,id:R,clearable:F,clearButtonProps:z,hiddenInputProps:V,...q}=r,Q=Z.useMemo(()=>Vte(P),[P]),G=Z.useMemo(()=>oF(Q),[Q]),H=wl(R),[ee,ue]=H2({value:I,defaultValue:C,finalValue:null,onChange:S}),fe=ee?G[ee]:void 0,[he,He]=H2({value:y,defaultValue:c,finalValue:fe?fe.label:"",onChange:g}),be=sF({opened:f,defaultOpened:d,onDropdownOpen:b,onDropdownClose:()=>{p==null||p(),be.resetSelectedOption()}}),{resolvedClassNames:oe,resolvedStyles:Xe}=AQ({props:r,styles:i,classNames:n});Z.useEffect(()=>{T&&be.selectFirstOption()},[T,ee]),Z.useEffect(()=>{I===null&&He(""),typeof I=="string"&&fe&&He(fe.label)},[I,fe]);const Ee=F&&!!ee&&!U&&!D&&se.createElement(gr.ClearButton,{size:x,...z,onClear:()=>{ue(null),He("")}});return se.createElement(se.Fragment,null,se.createElement(gr,{store:be,__staticSelector:"Select",classNames:oe,styles:Xe,unstyled:o,readOnly:D,onOptionSubmit:ye=>{O==null||O(ye);const it=M&&G[ye].value===ee?null:G[ye].value;ue(it),He(typeof it=="string"?G[ye].label:""),be.closeDropdown()},size:x,...B},se.createElement(gr.Target,{targetType:a?"input":"button"},se.createElement(J5,{id:H,ref:e,rightSection:u||Ee||se.createElement(gr.Chevron,{size:x,error:k,unstyled:o}),rightSectionPointerEvents:L||Ee?"all":"none",...q,size:x,__staticSelector:"Select",disabled:U,readOnly:D||!a,value:he,onChange:ye=>{He(ye.currentTarget.value),be.openDropdown(),T&&be.selectFirstOption()},onFocus:ye=>{a&&be.openDropdown(),v==null||v(ye)},onBlur:ye=>{var it;a&&be.closeDropdown(),He(ee!=null&&((it=G[ee])==null?void 0:it.label)||""),A==null||A(ye)},onClick:ye=>{a?be.openDropdown():be.toggleDropdown(),_==null||_(ye)},classNames:oe,styles:Xe,unstyled:o,pointer:!a,error:k})),se.createElement(mre,{data:Q,hidden:D||U,filter:K,search:he,limit:Y,hiddenWhenEmpty:!a||!m,withScrollArea:W,maxDropdownHeight:ie,filterOptions:a&&(fe==null?void 0:fe.label)!==he,value:ee,checkIconPosition:l,withCheckIcon:h,nothingFoundMessage:m,unstyled:o,labelId:`${H}-label`})),se.createElement("input",{type:"hidden",name:w,value:ee||"",form:E,disabled:U,...V}))});NS.classes={...J5.classes,...gr.classes};NS.displayName="@mantine/core/Select";const CI=t=>{let e;const r=new Set,n=(d,p)=>{const b=typeof d=="function"?d(e):d;if(!Object.is(b,e)){const v=e;e=p??(typeof b!="object"||b===null)?b:Object.assign({},e,b),r.forEach(A=>A(e,v))}},i=()=>e,f={setState:n,getState:i,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{r.clear()}};return e=t(n,i,f),f},one=t=>t?CI(t):CI;var AF={exports:{}},SF={},MF={exports:{}},_F={};/** +`}function eD({cssVariablesSelector:t}){const e=ta(),r=DA(),n=nQ(),i=gQ({theme:e,generator:n}),o=t===":root",s=o?bQ(i):i,f=mQ(s,t);return f?se.createElement("style",{"data-mantine-styles":!0,nonce:r==null?void 0:r(),dangerouslySetInnerHTML:{__html:`${f}${o?"":yQ(t)}`}}):null}eD.displayName="@mantine/CssVariables";function vQ(){const t=ta(),e=DA(),r=Cn(t.breakpoints).reduce((n,i)=>{const o=T9(t.breakpoints[i]);return`${n}@media (max-width: ${z2(o-.1)}) {.mantine-visible-from-${i} {display: none !important;}}@media (min-width: ${z2(o)}) {.mantine-hidden-from-${i} {display: none !important;}}`},"");return se.createElement("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:r}})}function tI(t){return t==="auto"||t==="dark"||t==="light"}function wQ({key:t="mantine-color-scheme-value"}={}){let e;return{get:r=>{if(typeof window>"u")return r;try{const n=window.localStorage.getItem(t);return tI(n)?n:r}catch{return r}},set:r=>{try{window.localStorage.setItem(t,r)}catch(n){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",n)}},subscribe:r=>{e=n=>{n.storageArea===window.localStorage&&n.key===t&&tI(n.newValue)&&r(n.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}function F1(t,e){var n;const r=t!=="auto"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";(n=e())==null||n.setAttribute("data-mantine-color-scheme",r)}function xQ({manager:t,defaultColorScheme:e,getRootElement:r,forceColorScheme:n}){const i=Z.useRef(),[o,s]=Z.useState(()=>t.get(e)),f=n||o,d=Z.useCallback(b=>{n||(F1(b,r),s(b),t.set(b))},[t.set,f,n]),p=Z.useCallback(()=>{s(e),F1(e,r),t.clear()},[t.clear,e]);return Z.useEffect(()=>(t.subscribe(d),t.unsubscribe),[t.subscribe,t.unsubscribe]),Qp(()=>{F1(t.get(e),r)},[]),Z.useEffect(()=>{var v;if(n)return F1(n,r),()=>{};i.current=window.matchMedia("(prefers-color-scheme: dark)");const b=A=>{o==="auto"&&F1(A.matches?"dark":"light",r)};return(v=i.current)==null||v.addEventListener("change",b),()=>{var A;return(A=i.current)==null?void 0:A.removeEventListener("change",b)}},[o,n]),{colorScheme:f,setColorScheme:d,clearColorScheme:p}}function EQ({respectReducedMotion:t,getRootElement:e}){Qp(()=>{var r;t&&((r=e())==null||r.setAttribute("data-respect-reduced-motion","true"))},[t])}lQ();function tD({theme:t,children:e,getStyleNonce:r,withCssVariables:n=!0,cssVariablesSelector:i=":root",classNamesPrefix:o="mantine",colorSchemeManager:s=wQ(),defaultColorScheme:f="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:b}){const{colorScheme:v,setColorScheme:A,clearColorScheme:_}=xQ({defaultColorScheme:f,forceColorScheme:b,manager:s,getRootElement:d});return EQ({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:d}),se.createElement(LA.Provider,{value:{colorSchemeManager:s,colorScheme:v,setColorScheme:A,clearColorScheme:_,getRootElement:d,classNamesPrefix:o,getStyleNonce:r,cssVariablesResolver:p,cssVariablesSelector:i}},se.createElement(QL,{theme:t},n&&se.createElement(eD,{cssVariablesSelector:i}),se.createElement(vQ,null),e))}tD.displayName="@mantine/core/MantineProvider";function AQ({classNames:t,styles:e,props:r,stylesCtx:n}){const i=ta();return{resolvedClassNames:N5({theme:i,classNames:t,props:r,stylesCtx:n||void 0}),resolvedStyles:j2({theme:i,styles:e,props:r,stylesCtx:n||void 0})}}const SQ={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function MQ({theme:t,options:e,unstyled:r}){return cn((e==null?void 0:e.focusable)&&!r&&(t.focusClassName||SQ[t.focusRing]),(e==null?void 0:e.active)&&!r&&t.activeClassName)}function _Q({themeName:t,classNamesPrefix:e,selector:r}){return t.map(n=>`${e}-${n}-${r}`)}function PQ({themeName:t,theme:e,selector:r,props:n,stylesCtx:i}){return t.map(o=>{var s,f;return(f=N5({theme:e,classNames:(s=e.components[o])==null?void 0:s.classNames,props:n,stylesCtx:i}))==null?void 0:f[r]})}function CQ({options:t,classes:e,selector:r,unstyled:n}){return t!=null&&t.variant&&!n?e[`${r}--${t.variant}`]:void 0}function IQ({rootSelector:t,selector:e,className:r}){return t===e?r:void 0}function TQ({selector:t,classes:e,unstyled:r}){return r?void 0:e[t]}function RQ({selector:t,stylesCtx:e,theme:r,classNames:n,props:i}){return N5({theme:r,classNames:n,props:i,stylesCtx:e})[t]}function kQ({selector:t,stylesCtx:e,options:r,props:n,theme:i}){return N5({theme:i,classNames:r==null?void 0:r.classNames,props:(r==null?void 0:r.props)||n,stylesCtx:e})[t]}function BQ({theme:t,options:e,themeName:r,selector:n,classNamesPrefix:i,classNames:o,classes:s,unstyled:f,className:d,rootSelector:p,props:b,stylesCtx:v}){return cn(MQ({theme:t,options:e,unstyled:f}),PQ({theme:t,themeName:r,selector:n,props:b,stylesCtx:v}),CQ({options:e,classes:s,selector:n,unstyled:f}),RQ({selector:n,stylesCtx:v,theme:t,classNames:o,props:b}),kQ({selector:n,stylesCtx:v,options:e,props:b,theme:t}),IQ({rootSelector:p,selector:n,className:d}),TQ({selector:n,classes:s,unstyled:f}),_Q({themeName:r,classNamesPrefix:i,selector:n}),e==null?void 0:e.className)}function OQ({theme:t,themeName:e,props:r,stylesCtx:n,selector:i}){return e.map(o=>{var s;return j2({theme:t,styles:(s=t.components[o])==null?void 0:s.styles,props:r,stylesCtx:n})[i]}).reduce((o,s)=>({...o,...s}),{})}function O9({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((r,n)=>({...r,...O9({style:n,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function NQ(t){return t.reduce((e,r)=>(r&&Object.keys(r).forEach(n=>{e[n]={...e[n],...kA(r[n])}}),e),{})}function LQ({vars:t,varsResolver:e,theme:r,props:n,stylesCtx:i,selector:o,themeName:s}){var f;return(f=NQ([e==null?void 0:e(r,n,i),...s.map(d=>{var p,b,v;return(v=(b=(p=r.components)==null?void 0:p[d])==null?void 0:b.vars)==null?void 0:v.call(b,r,n,i)}),t==null?void 0:t(r,n,i)]))==null?void 0:f[o]}function DQ({theme:t,themeName:e,selector:r,options:n,props:i,stylesCtx:o,rootSelector:s,styles:f,style:d,vars:p,varsResolver:b}){return{...OQ({theme:t,themeName:e,props:i,stylesCtx:o,selector:r}),...j2({theme:t,styles:f,props:i,stylesCtx:o})[r],...j2({theme:t,styles:n==null?void 0:n.styles,props:(n==null?void 0:n.props)||i,stylesCtx:o})[r],...LQ({theme:t,props:i,stylesCtx:o,vars:p,varsResolver:b,selector:r,themeName:e}),...s===r?O9({style:d,theme:t}):null,...O9({style:n==null?void 0:n.style,theme:t})}}function Ht({name:t,classes:e,props:r,stylesCtx:n,className:i,style:o,rootSelector:s="root",unstyled:f,classNames:d,styles:p,vars:b,varsResolver:v}){const A=ta(),_=iQ(),S=(Array.isArray(t)?t:[t]).filter(P=>P);return(P,I)=>({className:BQ({theme:A,options:I,themeName:S,selector:P,classNamesPrefix:_,classNames:d,classes:e,unstyled:f,className:i,rootSelector:s,props:r,stylesCtx:n}),style:DQ({theme:A,themeName:S,selector:P,options:I,props:r,stylesCtx:n,rootSelector:s,styles:p,style:o,vars:b,varsResolver:v})})}function rI(){const t=document.createElement("style");return t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(r=>r.remove())}function FQ({keepTransitions:t}={}){const e=Z.useRef(),r=Z.useRef(),n=Z.useContext(LA);if(!n)throw new Error("[@mantine/core] MantineProvider was not found in tree");const i=p=>{n.setColorScheme(p),e.current=t?()=>{}:rI(),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{var b;(b=e.current)==null||b.call(e)},10)},o=()=>{n.clearColorScheme(),e.current=t?()=>{}:rI(),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{var p;(p=e.current)==null||p.call(e)},10)},s=VY("light",{getInitialValueInEffect:!1}),f=n.colorScheme==="auto"?s:n.colorScheme,d=Z.useCallback(()=>i(f==="light"?"dark":"light"),[i,f]);return Z.useEffect(()=>()=>{var p;(p=e.current)==null||p.call(e),window.clearTimeout(r.current)},[]),{colorScheme:n.colorScheme,setColorScheme:i,clearColorScheme:o,toggleColorScheme:d}}function Ye(t,e,r){var s;const n=ta(),i=(s=n.components[t])==null?void 0:s.defaultProps,o=typeof i=="function"?i(n):i;return{...e,...o,...kA(r)}}function nI(t){return Cn(t).reduce((e,r)=>t[r]!==void 0?`${e}${BY(r)}:${t[r]};`:e,"").trim()}function $Q({selector:t,styles:e,media:r}){const n=e?nI(e):"",i=Array.isArray(r)?r.map(o=>`@media${o.query}{${t}{${nI(o.styles)}}}`):[];return`${n?`${t}{${n}}`:""}${i.join("")}`.trim()}function rD({selector:t,styles:e,media:r}){const n=DA();return se.createElement("style",{"data-mantine-styles":"inline",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:$Q({selector:t,styles:e,media:r})}})}function zA(t){const{m:e,mx:r,my:n,mt:i,mb:o,ml:s,mr:f,p:d,px:p,py:b,pt:v,pb:A,pl:_,pr:S,bg:P,c:I,opacity:C,ff:T,fz:k,fw:O,lts:D,ta:U,lh:V,fs:Y,tt:W,td:ie,w:x,miw:a,maw:u,h:l,mih:h,mah:m,bgsz:w,bgp:E,bgr:y,bga:c,pos:g,top:M,left:B,bottom:L,right:R,inset:F,display:z,hiddenFrom:K,visibleFrom:q,lightHidden:Q,darkHidden:G,...H}=t;return{styleProps:kA({m:e,mx:r,my:n,mt:i,mb:o,ml:s,mr:f,p:d,px:p,py:b,pt:v,pb:A,pl:_,pr:S,bg:P,c:I,opacity:C,ff:T,fz:k,fw:O,lts:D,ta:U,lh:V,fs:Y,tt:W,td:ie,w:x,miw:a,maw:u,h:l,mih:h,mah:m,bgsz:w,bgp:E,bgr:y,bga:c,pos:g,top:M,left:B,bottom:L,right:R,inset:F,display:z,hiddenFrom:K,visibleFrom:q,lightHidden:Q,darkHidden:G}),rest:H}}const UQ={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};function zQ(t,e){const r=FA({color:t,theme:e});return r.color==="dimmed"?"var(--mantine-color-dimmed)":r.color==="bright"?"var(--mantine-color-bright)":r.isThemeColor&&r.shade===void 0?`var(--mantine-color-${r.color}-text)`:r.variable?`var(${r.variable})`:r.color}function jQ(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="number"||typeof t=="string"?Fe(t):t}function HQ(t,e){if(typeof t=="number")return Fe(t);if(typeof t=="string"){const r=t.replace("-","");if(!(r in e.spacing))return Fe(t);const n=`--mantine-spacing-${r}`;return t.startsWith("-")?`calc(var(${n}) * -1)`:`var(${n})`}return t}function qQ(t){return t}function GQ(t){return typeof t=="number"?Fe(t):t}function VQ(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-line-height-${t})`:t}const q3={color:zQ,fontSize:jQ,spacing:HQ,identity:qQ,size:GQ,lineHeight:VQ};function iI(t){return t.replace("(min-width: ","").replace("em)","")}function KQ({media:t,...e}){const n=Object.keys(t).sort((i,o)=>Number(iI(i))-Number(iI(o))).map(i=>({query:i,styles:t[i]}));return{...e,media:n}}function WQ(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function JQ(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function ZQ(t){return typeof t=="object"&&t!==null?Cn(t).filter(e=>e!=="base"):[]}function YQ(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function QQ({styleProps:t,data:e,theme:r}){return KQ(Cn(t).reduce((n,i)=>{if(i==="hiddenFrom"||i==="visibleFrom")return n;const o=e[i],s=Array.isArray(o.property)?o.property:[o.property],f=JQ(t[i]);if(!WQ(t[i]))return s.forEach(p=>{n.inlineStyles[p]=q3[o.type](f,r)}),n;n.hasResponsiveStyles=!0;const d=ZQ(t[i]);return s.forEach(p=>{f&&(n.styles[p]=q3[o.type](f,r)),d.forEach(b=>{const v=`(min-width: ${r.breakpoints[b]})`;n.media[v]={...n.media[v],[p]:q3[o.type](YQ(t[i],b),r)}})}),n},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function XQ(){return`__m__-${Z.useId().replace(/:/g,"")}`}function nD(t,e){return Array.isArray(t)?[...t].reduce((r,n)=>({...r,...nD(n,e)}),{}):typeof t=="function"?t(e):t??{}}function N9(t,e){return Array.isArray(t)?[...t].reduce((r,n)=>({...r,...N9(n,e)}),{}):typeof t=="function"?t(e):t??{}}function eX({theme:t,style:e,vars:r,styleProps:n}){const i=N9(e,t),o=N9(r,t);return{...i,...o,...n}}function iD(t){return t.startsWith("data-")?t:`data-${t}`}function tX(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return n===void 0||n===""||n===!1||n===null||(e[iD(r)]=t[r]),e},{})}function oD(t){return t?typeof t=="string"?{[iD(t)]:!0}:Array.isArray(t)?[...t].reduce((e,r)=>({...e,...oD(r)}),{}):tX(t):null}const sD=Z.forwardRef(({component:t,style:e,__vars:r,className:n,variant:i,mod:o,size:s,hiddenFrom:f,visibleFrom:d,lightHidden:p,darkHidden:b,renderRoot:v,...A},_)=>{const S=ta(),P=t||"div",{styleProps:I,rest:C}=zA(A),T=XQ(),k=QQ({styleProps:I,theme:S,data:UQ}),O={ref:_,style:eX({theme:S,style:e,vars:r,styleProps:k.inlineStyles}),className:cn(n,{[T]:k.hasResponsiveStyles,"mantine-light-hidden":p,"mantine-dark-hidden":b,[`mantine-hidden-from-${f}`]:f,[`mantine-visible-from-${d}`]:d}),"data-variant":i,"data-size":UL(s)?void 0:s||void 0,...oD(o),...C};return se.createElement(se.Fragment,null,k.hasResponsiveStyles&&se.createElement(rD,{selector:`.${T}`,styles:k.styles,media:k.media}),typeof v=="function"?v(O):se.createElement(P,{...O}))});sD.displayName="@mantine/core/Box";const ft=sD;function aD(t){return t}function Et(t){const e=Z.forwardRef(t);return e.extend=aD,e}function zi(t){const e=Z.forwardRef(t);return e.extend=aD,e}const rX=Z.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function F5(){return Z.useContext(rX)}const[nX,ts]=vl("ScrollArea.Root component was not found in tree");function tp(t,e){const r=X0(e);Qp(()=>{let n=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(t),()=>{window.cancelAnimationFrame(n),i.unobserve(t)}}},[t,r])}const[iX,fD]=vl("ScrollAreaScrollbar was not found in tree");function Lu(t,e,{checkForDefaultPrevented:r=!0}={}){return n=>{t==null||t(n),(r===!1||!n.defaultPrevented)&&(e==null||e(n))}}const cD=Z.forwardRef((t,e)=>{const{sizes:r,hasThumb:n,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:p,onResize:b,...v}=t,A=ts(),[_,S]=se.useState(null),P=Ui(e,Y=>S(Y)),I=se.useRef(null),C=se.useRef(""),{viewport:T}=A,k=r.content-r.viewport,O=X0(p),D=X0(f),U=L5(b,10),V=Y=>{if(I.current){const W=Y.clientX-I.current.left,ie=Y.clientY-I.current.top;d({x:W,y:ie})}};return Z.useEffect(()=>{const Y=W=>{const ie=W.target;(_==null?void 0:_.contains(ie))&&O(W,k)};return document.addEventListener("wheel",Y,{passive:!1}),()=>document.removeEventListener("wheel",Y,{passive:!1})},[T,_,k,O]),Z.useEffect(D,[r,D]),tp(_,U),tp(A.content,U),se.createElement(iX,{value:{scrollbar:_,hasThumb:n,onThumbChange:X0(i),onThumbPointerUp:X0(o),onThumbPositionChange:D,onThumbPointerDown:X0(s)}},se.createElement("div",{...v,ref:P,style:{position:"absolute",...v.style},onPointerDown:Lu(t.onPointerDown,Y=>{Y.button===0&&(Y.target.setPointerCapture(Y.pointerId),I.current=_.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",V(Y))}),onPointerMove:Lu(t.onPointerMove,V),onPointerUp:Lu(t.onPointerUp,Y=>{const W=Y.target;W.hasPointerCapture(Y.pointerId)&&W.releasePointerCapture(Y.pointerId),document.body.style.webkitUserSelect=C.current,I.current=null})}))});function uD(t,e){return t>0&&t{const{sizes:r,onSizesChange:n,style:i,...o}=t,s=ts(),[f,d]=Z.useState(),p=Z.useRef(null),b=Ui(e,p,s.onScrollbarXChange);return Z.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),se.createElement(cD,{"data-orientation":"horizontal",...o,ref:b,sizes:r,style:{...i,"--sa-thumb-width":`${$5(r)}px`},onThumbPointerDown:v=>t.onThumbPointerDown(v.x),onDragScroll:v=>t.onDragScroll(v.x),onWheelScroll:(v,A)=>{if(s.viewport){const _=s.viewport.scrollLeft+v.deltaX;t.onWheelScroll(_),uD(_,A)&&v.preventDefault()}},onResize:()=>{p.current&&s.viewport&&f&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:q2(f.paddingLeft),paddingEnd:q2(f.paddingRight)}})}})}),sX=Z.forwardRef((t,e)=>{const{sizes:r,onSizesChange:n,style:i,...o}=t,s=ts(),[f,d]=se.useState(),p=Z.useRef(null),b=Ui(e,p,s.onScrollbarYChange);return Z.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),se.createElement(cD,{...o,"data-orientation":"vertical",ref:b,sizes:r,style:{"--sa-thumb-height":`${$5(r)}px`,...i},onThumbPointerDown:v=>t.onThumbPointerDown(v.y),onDragScroll:v=>t.onDragScroll(v.y),onWheelScroll:(v,A)=>{if(s.viewport){const _=s.viewport.scrollTop+v.deltaY;t.onWheelScroll(_),uD(_,A)&&v.preventDefault()}},onResize:()=>{p.current&&s.viewport&&f&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:q2(f.paddingTop),paddingEnd:q2(f.paddingBottom)}})}})});function dD(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(t[1]-t[0]);return e[0]+n*(r-t[0])}}function aX(t,[e,r]){return Math.min(r,Math.max(e,t))}function oI(t,e,r="ltr"){const n=$5(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-i,s=e.content-e.viewport,f=o-n,d=r==="ltr"?[0,s]:[s*-1,0],p=aX(t,d);return dD([0,s],[0,f])(p)}function fX(t,e,r,n="ltr"){const i=$5(r),o=i/2,s=e||o,f=i-s,d=r.scrollbar.paddingStart+s,p=r.scrollbar.size-r.scrollbar.paddingEnd-f,b=r.content-r.viewport,v=n==="ltr"?[0,b]:[b*-1,0];return dD([d,p],v)(t)}const jA=Z.forwardRef((t,e)=>{const{orientation:r="vertical",...n}=t,{dir:i}=F5(),o=ts(),s=Z.useRef(null),f=Z.useRef(0),[d,p]=Z.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),b=lD(d.viewport,d.content),v={...n,sizes:d,onSizesChange:p,hasThumb:b>0&&b<1,onThumbChange:_=>{s.current=_},onThumbPointerUp:()=>{f.current=0},onThumbPointerDown:_=>{f.current=_}},A=(_,S)=>fX(_,f.current,d,S);return r==="horizontal"?se.createElement(oX,{...v,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const _=o.viewport.scrollLeft,S=oI(_,d,i);s.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:_=>{o.viewport&&(o.viewport.scrollLeft=_)},onDragScroll:_=>{o.viewport&&(o.viewport.scrollLeft=A(_,i))}}):r==="vertical"?se.createElement(sX,{...v,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const _=o.viewport.scrollTop,S=oI(_,d);s.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:_=>{o.viewport&&(o.viewport.scrollTop=_)},onDragScroll:_=>{o.viewport&&(o.viewport.scrollTop=A(_))}}):null}),hD=Z.forwardRef((t,e)=>{const r=ts(),{forceMount:n,...i}=t,[o,s]=Z.useState(!1),f=t.orientation==="horizontal",d=L5(()=>{if(r.viewport){const p=r.viewport.offsetWidth{const{forceMount:r,...n}=t,i=ts(),[o,s]=Z.useState(!1);return Z.useEffect(()=>{const{scrollArea:f}=i;let d=0;if(f){const p=()=>{window.clearTimeout(d),s(!0)},b=()=>{d=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return f.addEventListener("pointerenter",p),f.addEventListener("pointerleave",b),()=>{window.clearTimeout(d),f.removeEventListener("pointerenter",p),f.removeEventListener("pointerleave",b)}}},[i.scrollArea,i.scrollHideDelay]),r||o?se.createElement(hD,{"data-state":o?"visible":"hidden",...n,ref:e}):null}),uX=Z.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=ts(),o=t.orientation==="horizontal",[s,f]=Z.useState("hidden"),d=L5(()=>f("idle"),100);return Z.useEffect(()=>{if(s==="idle"){const p=window.setTimeout(()=>f("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(p)}},[s,i.scrollHideDelay]),Z.useEffect(()=>{const{viewport:p}=i,b=o?"scrollLeft":"scrollTop";if(p){let v=p[b];const A=()=>{const _=p[b];v!==_&&(f("scrolling"),d()),v=_};return p.addEventListener("scroll",A),()=>p.removeEventListener("scroll",A)}},[i.viewport,o,d]),r||s!=="hidden"?se.createElement(jA,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:e,onPointerEnter:Lu(t.onPointerEnter,()=>f("interacting")),onPointerLeave:Lu(t.onPointerLeave,()=>f("idle"))}):null}),sI=se.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=ts(),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,f=t.orientation==="horizontal";return se.useEffect(()=>(f?o(!0):s(!0),()=>{f?o(!1):s(!1)}),[f,o,s]),i.type==="hover"?se.createElement(cX,{...n,ref:e,forceMount:r}):i.type==="scroll"?se.createElement(uX,{...n,ref:e,forceMount:r}):i.type==="auto"?se.createElement(hD,{...n,ref:e,forceMount:r}):i.type==="always"?se.createElement(jA,{...n,ref:e}):null}),lX=se.forwardRef((t,e)=>{const{style:r,...n}=t,i=ts(),[o,s]=se.useState(0),[f,d]=se.useState(0),p=!!(o&&f);return tp(i.scrollbarX,()=>{var v;const b=((v=i.scrollbarX)==null?void 0:v.offsetHeight)||0;i.onCornerHeightChange(b),d(b)}),tp(i.scrollbarY,()=>{var v;const b=((v=i.scrollbarY)==null?void 0:v.offsetWidth)||0;i.onCornerWidthChange(b),s(b)}),p?se.createElement("div",{...n,ref:e,style:{...r,width:o,height:f}}):null}),dX=se.forwardRef((t,e)=>{const r=ts(),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?se.createElement(lX,{...t,ref:e}):null}),hX={scrollHideDelay:1e3,type:"hover"},pD=Z.forwardRef((t,e)=>{const r=Ye("ScrollAreaRoot",hX,t),{type:n,scrollHideDelay:i,...o}=r,[s,f]=Z.useState(null),[d,p]=Z.useState(null),[b,v]=Z.useState(null),[A,_]=Z.useState(null),[S,P]=Z.useState(null),[I,C]=Z.useState(0),[T,k]=Z.useState(0),[O,D]=Z.useState(!1),[U,V]=Z.useState(!1),Y=Ui(e,W=>f(W));return se.createElement(nX,{value:{type:n,scrollHideDelay:i,scrollArea:s,viewport:d,onViewportChange:p,content:b,onContentChange:v,scrollbarX:A,onScrollbarXChange:_,scrollbarXEnabled:O,onScrollbarXEnabledChange:D,scrollbarY:S,onScrollbarYChange:P,scrollbarYEnabled:U,onScrollbarYEnabledChange:V,onCornerWidthChange:C,onCornerHeightChange:k}},se.createElement(ft,{...o,ref:Y,__vars:{"--sa-corner-width":`${I}px`,"--sa-corner-height":`${T}px`}}))});pD.displayName="@mantine/core/ScrollAreaRoot";const mD=Z.forwardRef(({children:t,style:e,...r},n)=>{const i=ts(),o=Ui(n,i.onViewportChange);return se.createElement(ft,{...r,ref:o,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e}},se.createElement("div",{style:{minWidth:"100%",display:"table"},ref:i.onContentChange},t))});mD.displayName="@mantine/core/ScrollAreaViewport";var HA={root:"m-d57069b5",viewport:"m-c0783ff9",viewportInner:"m-f8f631dd",scrollbar:"m-c44ba933",thumb:"m-d8b5e363",corner:"m-21657268"};function pX(t,e=()=>{}){let r={left:t.scrollLeft,top:t.scrollTop},n=0;return function i(){const o={left:t.scrollLeft,top:t.scrollTop},s=r.left!==o.left,f=r.top!==o.top;(s||f)&&e(),r=o,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)}const mX=Z.forwardRef((t,e)=>{const{style:r,...n}=t,i=ts(),o=fD(),{onThumbPositionChange:s}=o,f=Ui(e,b=>o.onThumbChange(b)),d=Z.useRef(),p=L5(()=>{d.current&&(d.current(),d.current=void 0)},100);return Z.useEffect(()=>{const{viewport:b}=i;if(b){const v=()=>{if(p(),!d.current){const A=pX(b,s);d.current=A,s()}};return s(),b.addEventListener("scroll",v),()=>b.removeEventListener("scroll",v)}},[i.viewport,p,s]),se.createElement("div",{"data-state":o.hasThumb?"visible":"hidden",...n,ref:f,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:Lu(t.onPointerDownCapture,b=>{const A=b.target.getBoundingClientRect(),_=b.clientX-A.left,S=b.clientY-A.top;o.onThumbPointerDown({x:_,y:S})}),onPointerUp:Lu(t.onPointerUp,o.onThumbPointerUp)})}),aI=se.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=fD();return r||i.hasThumb?se.createElement(mX,{ref:e,...n}):null}),gD={scrollHideDelay:1e3,type:"hover"},gX=(t,{scrollbarSize:e})=>({root:{"--scrollarea-scrollbar-size":Fe(e)}}),vb=Et((t,e)=>{const r=Ye("ScrollArea",gD,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,scrollbarSize:d,vars:p,type:b,scrollHideDelay:v,viewportProps:A,viewportRef:_,onScrollPositionChange:S,children:P,offsetScrollbars:I,...C}=r,[T,k]=Z.useState(!1),O=Ht({name:"ScrollArea",props:r,classes:HA,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:p,varsResolver:gX});return se.createElement(pD,{type:b==="never"?"always":b,scrollHideDelay:v,ref:e,...O("root"),...C},se.createElement(mD,{...A,...O("viewport"),ref:_,"data-offset-scrollbars":I===!0?"xy":I||void 0,onScroll:typeof S=="function"?({currentTarget:D})=>S({x:D.scrollLeft,y:D.scrollTop}):void 0},P),se.createElement(sI,{...O("scrollbar"),orientation:"horizontal","data-hidden":b==="never"||void 0,forceMount:!0,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1)},se.createElement(aI,{...O("thumb")})),se.createElement(sI,{...O("scrollbar"),orientation:"vertical","data-hidden":b==="never"||void 0,forceMount:!0,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1)},se.createElement(aI,{...O("thumb")})),se.createElement(dX,{...O("corner"),"data-hovered":T||void 0,"data-hidden":b==="never"||void 0}))});vb.displayName="@mantine/core/ScrollArea";const qA=Et((t,e)=>{const{children:r,classNames:n,styles:i,scrollbarSize:o,scrollHideDelay:s,type:f,dir:d,offsetScrollbars:p,viewportRef:b,onScrollPositionChange:v,unstyled:A,variant:_,viewportProps:S,style:P,vars:I,...C}=Ye("ScrollAreaAutosize",gD,t);return se.createElement(ft,{...C,ref:e,style:[{display:"flex"},P]},se.createElement(ft,{style:{display:"flex",flexDirection:"column",flex:1}},se.createElement(vb,{classNames:n,styles:i,scrollHideDelay:s,scrollbarSize:o,type:f,dir:d,offsetScrollbars:p,viewportRef:b,onScrollPositionChange:v,unstyled:A,variant:_,viewportProps:S,vars:I},r)))});vb.classes=HA;qA.displayName="@mantine/core/ScrollAreaAutosize";qA.classes=HA;vb.Autosize=qA;var bD={root:"m-87cf2631"};const bX={__staticSelector:"UnstyledButton"},wb=zi((t,e)=>{const r=Ye("UnstyledButton",bX,t),{className:n,component:i="button",__staticSelector:o,unstyled:s,classNames:f,styles:d,style:p,...b}=r,v=Ht({name:o,props:r,classes:bD,className:n,style:p,classNames:f,styles:d,unstyled:s});return se.createElement(ft,{...v("root",{focusable:!0}),component:i,ref:e,type:i==="button"?"button":void 0,...b})});wb.classes=bD;wb.displayName="@mantine/core/UnstyledButton";var yD={root:"m-1b7284a3"};const yX={},vX=(t,{radius:e,shadow:r})=>({root:{"--paper-radius":e===void 0?void 0:bi(e),"--paper-shadow":BA(r)}}),Xp=zi((t,e)=>{const r=Ye("Paper",yX,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,withBorder:d,vars:p,radius:b,shadow:v,variant:A,..._}=r,S=Ht({name:"Paper",props:r,classes:yD,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:p,varsResolver:vX});return se.createElement(ft,{ref:e,mod:{"data-with-border":d},...S("root"),variant:A,..._})});Xp.classes=yD;Xp.displayName="@mantine/core/Paper";const Vs=Math.min,Kn=Math.max,G2=Math.round,$y=Math.floor,g0=t=>({x:t,y:t}),wX={left:"right",right:"left",bottom:"top",top:"bottom"},xX={start:"end",end:"start"};function L9(t,e,r){return Kn(t,Vs(e,r))}function jf(t,e){return typeof t=="function"?t(e):t}function Ks(t){return t.split("-")[0]}function e1(t){return t.split("-")[1]}function GA(t){return t==="x"?"y":"x"}function VA(t){return t==="y"?"height":"width"}function xl(t){return["top","bottom"].includes(Ks(t))?"y":"x"}function KA(t){return GA(xl(t))}function EX(t,e,r){r===void 0&&(r=!1);const n=e1(t),i=KA(t),o=VA(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=V2(s)),[s,V2(s)]}function AX(t){const e=V2(t);return[D9(t),e,D9(e)]}function D9(t){return t.replace(/start|end/g,e=>xX[e])}function SX(t,e,r){const n=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?o:s;default:return[]}}function MX(t,e,r,n){const i=e1(t);let o=SX(Ks(t),r==="start",n);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(D9)))),o}function V2(t){return t.replace(/left|right|bottom|top/g,e=>wX[e])}function _X(t){return{top:0,right:0,bottom:0,left:0,...t}}function WA(t){return typeof t!="number"?_X(t):{top:t,right:t,bottom:t,left:t}}function rp(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function fI(t,e,r){let{reference:n,floating:i}=t;const o=xl(e),s=KA(e),f=VA(s),d=Ks(e),p=o==="y",b=n.x+n.width/2-i.width/2,v=n.y+n.height/2-i.height/2,A=n[f]/2-i[f]/2;let _;switch(d){case"top":_={x:b,y:n.y-i.height};break;case"bottom":_={x:b,y:n.y+n.height};break;case"right":_={x:n.x+n.width,y:v};break;case"left":_={x:n.x-i.width,y:v};break;default:_={x:n.x,y:n.y}}switch(e1(e)){case"start":_[s]-=A*(r&&p?-1:1);break;case"end":_[s]+=A*(r&&p?-1:1);break}return _}const PX=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,f=o.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(e));let p=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:b,y:v}=fI(p,n,d),A=n,_={},S=0;for(let P=0;P({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:o,platform:s,elements:f,middlewareData:d}=e,{element:p,padding:b=0}=jf(t,e)||{};if(p==null)return{};const v=WA(b),A={x:r,y:n},_=KA(i),S=VA(_),P=await s.getDimensions(p),I=_==="y",C=I?"top":"left",T=I?"bottom":"right",k=I?"clientHeight":"clientWidth",O=o.reference[S]+o.reference[_]-A[_]-o.floating[S],D=A[_]-o.reference[_],U=await(s.getOffsetParent==null?void 0:s.getOffsetParent(p));let V=U?U[k]:0;(!V||!await(s.isElement==null?void 0:s.isElement(U)))&&(V=f.floating[k]||o.floating[S]);const Y=O/2-D/2,W=V/2-P[S]/2-1,ie=Vs(v[C],W),x=Vs(v[T],W),a=ie,u=V-P[S]-x,l=V/2-P[S]/2+Y,h=L9(a,l,u),m=!d.arrow&&e1(i)!=null&&l!=h&&o.reference[S]/2-(la<=0)){var W,ie;const a=(((W=o.flip)==null?void 0:W.index)||0)+1,u=D[a];if(u)return{data:{index:a,overflows:Y},reset:{placement:u}};let l=(ie=Y.filter(h=>h.overflows[0]<=0).sort((h,m)=>h.overflows[1]-m.overflows[1])[0])==null?void 0:ie.placement;if(!l)switch(_){case"bestFit":{var x;const h=(x=Y.map(m=>[m.placement,m.overflows.filter(w=>w>0).reduce((w,E)=>w+E,0)]).sort((m,w)=>m[1]-w[1])[0])==null?void 0:x[0];h&&(l=h);break}case"initialPlacement":l=f;break}if(i!==l)return{reset:{placement:l}}}return{}}}};function wD(t){const e=Vs(...t.map(o=>o.left)),r=Vs(...t.map(o=>o.top)),n=Kn(...t.map(o=>o.right)),i=Kn(...t.map(o=>o.bottom));return{x:e,y:r,width:n-e,height:i-r}}function CX(t){const e=t.slice().sort((i,o)=>i.y-o.y),r=[];let n=null;for(let i=0;in.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>rp(wD(i)))}const xD=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:r,elements:n,rects:i,platform:o,strategy:s}=e,{padding:f=2,x:d,y:p}=jf(t,e),b=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),v=CX(b),A=rp(wD(b)),_=WA(f);function S(){if(v.length===2&&v[0].left>v[1].right&&d!=null&&p!=null)return v.find(I=>d>I.left-_.left&&dI.top-_.top&&p=2){if(xl(r)==="y"){const ie=v[0],x=v[v.length-1],a=Ks(r)==="top",u=ie.top,l=x.bottom,h=a?ie.left:x.left,m=a?ie.right:x.right,w=m-h,E=l-u;return{top:u,bottom:l,left:h,right:m,width:w,height:E,x:h,y:u}}const I=Ks(r)==="left",C=Kn(...v.map(ie=>ie.right)),T=Vs(...v.map(ie=>ie.left)),k=v.filter(ie=>I?ie.left===T:ie.right===C),O=k[0].top,D=k[k.length-1].bottom,U=T,V=C,Y=V-U,W=D-O;return{top:O,bottom:D,left:U,right:V,width:Y,height:W,x:U,y:O}}return A}const P=await o.getElementRects({reference:{getBoundingClientRect:S},floating:n.floating,strategy:s});return i.reference.x!==P.reference.x||i.reference.y!==P.reference.y||i.reference.width!==P.reference.width||i.reference.height!==P.reference.height?{reset:{rects:P}}:{}}}};async function IX(t,e){const{placement:r,platform:n,elements:i}=t,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=Ks(r),f=e1(r),d=xl(r)==="y",p=["left","top"].includes(s)?-1:1,b=o&&d?-1:1,v=jf(e,t);let{mainAxis:A,crossAxis:_,alignmentAxis:S}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...v};return f&&typeof S=="number"&&(_=f==="end"?S*-1:S),d?{x:_*b,y:A*p}:{x:A*p,y:_*b}}const ED=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:i,y:o,placement:s,middlewareData:f}=e,d=await IX(e,t);return s===((r=f.offset)==null?void 0:r.placement)&&(n=f.arrow)!=null&&n.alignmentOffset?{}:{x:i+d.x,y:o+d.y,data:{...d,placement:s}}}}},ZA=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:f={fn:I=>{let{x:C,y:T}=I;return{x:C,y:T}}},...d}=jf(t,e),p={x:r,y:n},b=await JA(e,d),v=xl(Ks(i)),A=GA(v);let _=p[A],S=p[v];if(o){const I=A==="y"?"top":"left",C=A==="y"?"bottom":"right",T=_+b[I],k=_-b[C];_=L9(T,_,k)}if(s){const I=v==="y"?"top":"left",C=v==="y"?"bottom":"right",T=S+b[I],k=S-b[C];S=L9(T,S,k)}const P=f.fn({...e,[A]:_,[v]:S});return{...P,data:{x:P.x-r,y:P.y-n}}}}},TX=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:o,middlewareData:s}=e,{offset:f=0,mainAxis:d=!0,crossAxis:p=!0}=jf(t,e),b={x:r,y:n},v=xl(i),A=GA(v);let _=b[A],S=b[v];const P=jf(f,e),I=typeof P=="number"?{mainAxis:P,crossAxis:0}:{mainAxis:0,crossAxis:0,...P};if(d){const k=A==="y"?"height":"width",O=o.reference[A]-o.floating[k]+I.mainAxis,D=o.reference[A]+o.reference[k]-I.mainAxis;_D&&(_=D)}if(p){var C,T;const k=A==="y"?"width":"height",O=["top","left"].includes(Ks(i)),D=o.reference[v]-o.floating[k]+(O&&((C=s.offset)==null?void 0:C[v])||0)+(O?0:I.crossAxis),U=o.reference[v]+o.reference[k]+(O?0:((T=s.offset)==null?void 0:T[v])||0)-(O?I.crossAxis:0);SU&&(S=U)}return{[A]:_,[v]:S}}}},RX=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:o}=e,{apply:s=()=>{},...f}=jf(t,e),d=await JA(e,f),p=Ks(r),b=e1(r),v=xl(r)==="y",{width:A,height:_}=n.floating;let S,P;p==="top"||p==="bottom"?(S=p,P=b===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(P=p,S=b==="end"?"top":"bottom");const I=_-d[S],C=A-d[P],T=!e.middlewareData.shift;let k=I,O=C;if(v){const U=A-d.left-d.right;O=b||T?Vs(C,U):U}else{const U=_-d.top-d.bottom;k=b||T?Vs(I,U):U}if(T&&!b){const U=Kn(d.left,0),V=Kn(d.right,0),Y=Kn(d.top,0),W=Kn(d.bottom,0);v?O=A-2*(U!==0||V!==0?U+V:Kn(d.left,d.right)):k=_-2*(Y!==0||W!==0?Y+W:Kn(d.top,d.bottom))}await s({...e,availableWidth:O,availableHeight:k});const D=await i.getDimensions(o.floating);return A!==D.width||_!==D.height?{reset:{rects:!0}}:{}}}};function b0(t){return AD(t)?(t.nodeName||"").toLowerCase():"#document"}function ao(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xf(t){var e;return(e=(AD(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function AD(t){return t instanceof Node||t instanceof ao(t).Node}function Hf(t){return t instanceof Element||t instanceof ao(t).Element}function Da(t){return t instanceof HTMLElement||t instanceof ao(t).HTMLElement}function uI(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ao(t).ShadowRoot}function xb(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Go(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function kX(t){return["table","td","th"].includes(b0(t))}function YA(t){const e=QA(),r=Go(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function BX(t){let e=np(t);for(;Da(e)&&!U5(e);){if(YA(e))return e;e=np(e)}return null}function QA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U5(t){return["html","body","#document"].includes(b0(t))}function Go(t){return ao(t).getComputedStyle(t)}function z5(t){return Hf(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function np(t){if(b0(t)==="html")return t;const e=t.assignedSlot||t.parentNode||uI(t)&&t.host||Xf(t);return uI(e)?e.host:e}function SD(t){const e=np(t);return U5(e)?t.ownerDocument?t.ownerDocument.body:t.body:Da(e)&&xb(e)?e:SD(e)}function Rf(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=SD(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),s=ao(i);return o?e.concat(s,s.visualViewport||[],xb(i)?i:[],s.frameElement&&r?Rf(s.frameElement):[]):e.concat(i,Rf(i,[],r))}function MD(t){const e=Go(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Da(t),o=i?t.offsetWidth:r,s=i?t.offsetHeight:n,f=G2(r)!==o||G2(n)!==s;return f&&(r=o,n=s),{width:r,height:n,$:f}}function XA(t){return Hf(t)?t:t.contextElement}function qd(t){const e=XA(t);if(!Da(e))return g0(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:o}=MD(e);let s=(o?G2(r.width):r.width)/n,f=(o?G2(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!f||!Number.isFinite(f))&&(f=1),{x:s,y:f}}const OX=g0(0);function _D(t){const e=ao(t);return!QA()||!e.visualViewport?OX:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function NX(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==ao(t)?!1:e}function el(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),o=XA(t);let s=g0(1);e&&(n?Hf(n)&&(s=qd(n)):s=qd(t));const f=NX(o,r,n)?_D(o):g0(0);let d=(i.left+f.x)/s.x,p=(i.top+f.y)/s.y,b=i.width/s.x,v=i.height/s.y;if(o){const A=ao(o),_=n&&Hf(n)?ao(n):n;let S=A.frameElement;for(;S&&n&&_!==A;){const P=qd(S),I=S.getBoundingClientRect(),C=Go(S),T=I.left+(S.clientLeft+parseFloat(C.paddingLeft))*P.x,k=I.top+(S.clientTop+parseFloat(C.paddingTop))*P.y;d*=P.x,p*=P.y,b*=P.x,v*=P.y,d+=T,p+=k,S=ao(S).frameElement}}return rp({width:b,height:v,x:d,y:p})}function LX(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=Da(r),o=Xf(r);if(r===o)return e;let s={scrollLeft:0,scrollTop:0},f=g0(1);const d=g0(0);if((i||!i&&n!=="fixed")&&((b0(r)!=="body"||xb(o))&&(s=z5(r)),Da(r))){const p=el(r);f=qd(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}return{width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-s.scrollLeft*f.x+d.x,y:e.y*f.y-s.scrollTop*f.y+d.y}}function DX(t){return Array.from(t.getClientRects())}function PD(t){return el(Xf(t)).left+z5(t).scrollLeft}function FX(t){const e=Xf(t),r=z5(t),n=t.ownerDocument.body,i=Kn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Kn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+PD(t);const f=-r.scrollTop;return Go(n).direction==="rtl"&&(s+=Kn(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:f}}function $X(t,e){const r=ao(t),n=Xf(t),i=r.visualViewport;let o=n.clientWidth,s=n.clientHeight,f=0,d=0;if(i){o=i.width,s=i.height;const p=QA();(!p||p&&e==="fixed")&&(f=i.offsetLeft,d=i.offsetTop)}return{width:o,height:s,x:f,y:d}}function UX(t,e){const r=el(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=Da(t)?qd(t):g0(1),s=t.clientWidth*o.x,f=t.clientHeight*o.y,d=i*o.x,p=n*o.y;return{width:s,height:f,x:d,y:p}}function lI(t,e,r){let n;if(e==="viewport")n=$X(t,r);else if(e==="document")n=FX(Xf(t));else if(Hf(e))n=UX(e,r);else{const i=_D(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return rp(n)}function CD(t,e){const r=np(t);return r===e||!Hf(r)||U5(r)?!1:Go(r).position==="fixed"||CD(r,e)}function zX(t,e){const r=e.get(t);if(r)return r;let n=Rf(t,[],!1).filter(f=>Hf(f)&&b0(f)!=="body"),i=null;const o=Go(t).position==="fixed";let s=o?np(t):t;for(;Hf(s)&&!U5(s);){const f=Go(s),d=YA(s);!d&&f.position==="fixed"&&(i=null),(o?!d&&!i:!d&&f.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||xb(s)&&!d&&CD(t,s))?n=n.filter(b=>b!==s):i=f,s=np(s)}return e.set(t,n),n}function jX(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const s=[...r==="clippingAncestors"?zX(e,this._c):[].concat(r),n],f=s[0],d=s.reduce((p,b)=>{const v=lI(e,b,i);return p.top=Kn(v.top,p.top),p.right=Vs(v.right,p.right),p.bottom=Vs(v.bottom,p.bottom),p.left=Kn(v.left,p.left),p},lI(e,f,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function HX(t){return MD(t)}function qX(t,e,r){const n=Da(e),i=Xf(e),o=r==="fixed",s=el(t,!0,o,e);let f={scrollLeft:0,scrollTop:0};const d=g0(0);if(n||!n&&!o)if((b0(e)!=="body"||xb(i))&&(f=z5(e)),n){const p=el(e,!0,o,e);d.x=p.x+e.clientLeft,d.y=p.y+e.clientTop}else i&&(d.x=PD(i));return{x:s.left+f.scrollLeft-d.x,y:s.top+f.scrollTop-d.y,width:s.width,height:s.height}}function dI(t,e){return!Da(t)||Go(t).position==="fixed"?null:e?e(t):t.offsetParent}function ID(t,e){const r=ao(t);if(!Da(t))return r;let n=dI(t,e);for(;n&&kX(n)&&Go(n).position==="static";)n=dI(n,e);return n&&(b0(n)==="html"||b0(n)==="body"&&Go(n).position==="static"&&!YA(n))?r:n||BX(t)||r}const GX=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||ID,o=this.getDimensions;return{reference:qX(e,await i(r),n),floating:{x:0,y:0,...await o(r)}}};function VX(t){return Go(t).direction==="rtl"}const KX={convertOffsetParentRelativeRectToViewportRelativeRect:LX,getDocumentElement:Xf,getClippingRect:jX,getOffsetParent:ID,getElementRects:GX,getClientRects:DX,getDimensions:HX,getScale:qd,isElement:Hf,isRTL:VX};function WX(t,e){let r=null,n;const i=Xf(t);function o(){clearTimeout(n),r&&r.disconnect(),r=null}function s(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),o();const{left:p,top:b,width:v,height:A}=t.getBoundingClientRect();if(f||e(),!v||!A)return;const _=$y(b),S=$y(i.clientWidth-(p+v)),P=$y(i.clientHeight-(b+A)),I=$y(p),T={rootMargin:-_+"px "+-S+"px "+-P+"px "+-I+"px",threshold:Kn(0,Vs(1,d))||1};let k=!0;function O(D){const U=D[0].intersectionRatio;if(U!==d){if(!k)return s();U?s(!1,U):n=setTimeout(()=>{s(!1,1e-7)},100)}k=!1}try{r=new IntersectionObserver(O,{...T,root:i.ownerDocument})}catch{r=new IntersectionObserver(O,T)}r.observe(t)}return s(!0),o}function JX(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,p=XA(t),b=i||o?[...p?Rf(p):[],...Rf(e)]:[];b.forEach(C=>{i&&C.addEventListener("scroll",r,{passive:!0}),o&&C.addEventListener("resize",r)});const v=p&&f?WX(p,r):null;let A=-1,_=null;s&&(_=new ResizeObserver(C=>{let[T]=C;T&&T.target===p&&_&&(_.unobserve(e),cancelAnimationFrame(A),A=requestAnimationFrame(()=>{_&&_.observe(e)})),r()}),p&&!d&&_.observe(p),_.observe(e));let S,P=d?el(t):null;d&&I();function I(){const C=el(t);P&&(C.x!==P.x||C.y!==P.y||C.width!==P.width||C.height!==P.height)&&r(),P=C,S=requestAnimationFrame(I)}return r(),()=>{b.forEach(C=>{i&&C.removeEventListener("scroll",r),o&&C.removeEventListener("resize",r)}),v&&v(),_&&_.disconnect(),_=null,d&&cancelAnimationFrame(S)}}const ZX=(t,e,r)=>{const n=new Map,i={platform:KX,...r},o={...i.platform,_c:n};return PX(t,e,{...i,platform:o})},TD=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?cI({element:n.current,padding:i}).fn(r):{}:n?cI({element:n,padding:i}).fn(r):{}}}};var Tv=typeof document<"u"?Z.useLayoutEffect:Z.useEffect;function K2(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!K2(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const o=i[n];if(!(o==="_owner"&&t.$$typeof)&&!K2(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function RD(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function hI(t,e){const r=RD(t);return Math.round(e*r)/r}function pI(t){const e=Z.useRef(t);return Tv(()=>{e.current=t}),e}function YX(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:s}={},transform:f=!0,whileElementsMounted:d,open:p}=t,[b,v]=Z.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[A,_]=Z.useState(n);K2(A,n)||_(n);const[S,P]=Z.useState(null),[I,C]=Z.useState(null),T=Z.useCallback(m=>{m!=U.current&&(U.current=m,P(m))},[P]),k=Z.useCallback(m=>{m!==V.current&&(V.current=m,C(m))},[C]),O=o||S,D=s||I,U=Z.useRef(null),V=Z.useRef(null),Y=Z.useRef(b),W=pI(d),ie=pI(i),x=Z.useCallback(()=>{if(!U.current||!V.current)return;const m={placement:e,strategy:r,middleware:A};ie.current&&(m.platform=ie.current),ZX(U.current,V.current,m).then(w=>{const E={...w,isPositioned:!0};a.current&&!K2(Y.current,E)&&(Y.current=E,bb.flushSync(()=>{v(E)}))})},[A,e,r,ie]);Tv(()=>{p===!1&&Y.current.isPositioned&&(Y.current.isPositioned=!1,v(m=>({...m,isPositioned:!1})))},[p]);const a=Z.useRef(!1);Tv(()=>(a.current=!0,()=>{a.current=!1}),[]),Tv(()=>{if(O&&(U.current=O),D&&(V.current=D),O&&D){if(W.current)return W.current(O,D,x);x()}},[O,D,x,W]);const u=Z.useMemo(()=>({reference:U,floating:V,setReference:T,setFloating:k}),[T,k]),l=Z.useMemo(()=>({reference:O,floating:D}),[O,D]),h=Z.useMemo(()=>{const m={position:r,left:0,top:0};if(!l.floating)return m;const w=hI(l.floating,b.x),E=hI(l.floating,b.y);return f?{...m,transform:"translate("+w+"px, "+E+"px)",...RD(l.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:w,top:E}},[r,f,l.floating,b.x,b.y]);return Z.useMemo(()=>({...b,update:x,refs:u,elements:l,floatingStyles:h}),[b,x,u,l,h])}var kf=typeof document<"u"?Z.useLayoutEffect:Z.useEffect;let G3=!1,QX=0;const mI=()=>"floating-ui-"+QX++;function XX(){const[t,e]=Z.useState(()=>G3?mI():void 0);return kf(()=>{t==null&&e(mI())},[]),Z.useEffect(()=>{G3||(G3=!0)},[]),t}const eee=$E["useId".toString()],kD=eee||XX;function tee(){const t=new Map;return{emit(e,r){var n;(n=t.get(e))==null||n.forEach(i=>i(r))},on(e,r){t.set(e,[...t.get(e)||[],r])},off(e,r){var n;t.set(e,((n=t.get(e))==null?void 0:n.filter(i=>i!==r))||[])}}}const ree=Z.createContext(null),nee=Z.createContext(null),BD=()=>{var t;return((t=Z.useContext(ree))==null?void 0:t.id)||null},eS=()=>Z.useContext(nee);function Jc(t){return(t==null?void 0:t.ownerDocument)||document}function iee(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function oee(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:r,version:n}=e;return r+"/"+n}).join(" "):navigator.userAgent}function j5(t){return Jc(t).defaultView||window}function Pa(t){return t?t instanceof Element||t instanceof j5(t).Element:!1}function OD(t){return t?t instanceof HTMLElement||t instanceof j5(t).HTMLElement:!1}function see(t){if(typeof ShadowRoot>"u")return!1;const e=j5(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function aee(t){if(t.mozInputSource===0&&t.isTrusted)return!0;const e=/Android/i;return(e.test(iee())||e.test(oee()))&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function fee(t){return t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType!=="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0}function ND(t,e){const r=["mouse","pen"];return e||r.push("",void 0),r.includes(t)}function cee(t){return"nativeEvent"in t}function F9(t,e){if(!t||!e)return!1;const r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&see(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function LD(t){return"data-floating-ui-"+t}function gI(t){const e=Z.useRef(t);return kf(()=>{e.current=t}),e}const bI=LD("safe-polygon");function Rv(t,e,r){return r&&!ND(r)?0:typeof t=="number"?t:t==null?void 0:t[e]}function uee(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,dataRef:i,events:o,elements:{domReference:s,floating:f},refs:d}=t,{enabled:p=!0,delay:b=0,handleClose:v=null,mouseOnly:A=!1,restMs:_=0,move:S=!0}=e,P=eS(),I=BD(),C=gI(v),T=gI(b),k=Z.useRef(),O=Z.useRef(),D=Z.useRef(),U=Z.useRef(),V=Z.useRef(!0),Y=Z.useRef(!1),W=Z.useRef(()=>{}),ie=Z.useCallback(()=>{var l;const h=(l=i.current.openEvent)==null?void 0:l.type;return(h==null?void 0:h.includes("mouse"))&&h!=="mousedown"},[i]);Z.useEffect(()=>{if(!p)return;function l(){clearTimeout(O.current),clearTimeout(U.current),V.current=!0}return o.on("dismiss",l),()=>{o.off("dismiss",l)}},[p,o]),Z.useEffect(()=>{if(!p||!C.current||!r)return;function l(m){ie()&&n(!1,m)}const h=Jc(f).documentElement;return h.addEventListener("mouseleave",l),()=>{h.removeEventListener("mouseleave",l)}},[f,r,n,p,C,i,ie]);const x=Z.useCallback(function(l,h){h===void 0&&(h=!0);const m=Rv(T.current,"close",k.current);m&&!D.current?(clearTimeout(O.current),O.current=setTimeout(()=>n(!1,l),m)):h&&(clearTimeout(O.current),n(!1,l))},[T,n]),a=Z.useCallback(()=>{W.current(),D.current=void 0},[]),u=Z.useCallback(()=>{if(Y.current){const l=Jc(d.floating.current).body;l.style.pointerEvents="",l.removeAttribute(bI),Y.current=!1}},[d]);return Z.useEffect(()=>{if(!p)return;function l(){return i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1}function h(E){if(clearTimeout(O.current),V.current=!1,A&&!ND(k.current)||_>0&&Rv(T.current,"open")===0)return;const y=Rv(T.current,"open",k.current);y?O.current=setTimeout(()=>{n(!0,E)},y):n(!0,E)}function m(E){if(l())return;W.current();const y=Jc(f);if(clearTimeout(U.current),C.current){r||clearTimeout(O.current),D.current=C.current({...t,tree:P,x:E.clientX,y:E.clientY,onClose(){u(),a(),x(E)}});const g=D.current;y.addEventListener("mousemove",g),W.current=()=>{y.removeEventListener("mousemove",g)};return}(k.current==="touch"?!F9(f,E.relatedTarget):!0)&&x(E)}function w(E){l()||C.current==null||C.current({...t,tree:P,x:E.clientX,y:E.clientY,onClose(){u(),a(),x(E)}})(E)}if(Pa(s)){const E=s;return r&&E.addEventListener("mouseleave",w),f==null||f.addEventListener("mouseleave",w),S&&E.addEventListener("mousemove",h,{once:!0}),E.addEventListener("mouseenter",h),E.addEventListener("mouseleave",m),()=>{r&&E.removeEventListener("mouseleave",w),f==null||f.removeEventListener("mouseleave",w),S&&E.removeEventListener("mousemove",h),E.removeEventListener("mouseenter",h),E.removeEventListener("mouseleave",m)}}},[s,f,p,t,A,_,S,x,a,u,n,r,P,T,C,i]),kf(()=>{var l;if(p&&r&&(l=C.current)!=null&&l.__options.blockPointerEvents&&ie()){const w=Jc(f).body;if(w.setAttribute(bI,""),w.style.pointerEvents="none",Y.current=!0,Pa(s)&&f){var h,m;const E=s,y=P==null||(h=P.nodesRef.current.find(c=>c.id===I))==null||(m=h.context)==null?void 0:m.elements.floating;return y&&(y.style.pointerEvents=""),E.style.pointerEvents="auto",f.style.pointerEvents="auto",()=>{E.style.pointerEvents="",f.style.pointerEvents=""}}}},[p,r,I,f,s,P,C,i,ie]),kf(()=>{r||(k.current=void 0,a(),u())},[r,a,u]),Z.useEffect(()=>()=>{a(),clearTimeout(O.current),clearTimeout(U.current),u()},[p,a,u]),Z.useMemo(()=>{if(!p)return{};function l(h){k.current=h.pointerType}return{reference:{onPointerDown:l,onPointerEnter:l,onMouseMove(h){r||_===0||(clearTimeout(U.current),U.current=setTimeout(()=>{V.current||n(!0,h.nativeEvent)},_))}},floating:{onMouseEnter(){clearTimeout(O.current)},onMouseLeave(h){o.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),x(h.nativeEvent,!1)}}}},[o,p,_,r,n,x])}const DD=Z.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),FD=()=>Z.useContext(DD),lee=t=>{let{children:e,delay:r,timeoutMs:n=0}=t;const[i,o]=Z.useReducer((d,p)=>({...d,...p}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),s=Z.useRef(null),f=Z.useCallback(d=>{o({currentId:d})},[]);return kf(()=>{i.currentId?s.current===null?s.current=i.currentId:o({isInstantPhase:!0}):(o({isInstantPhase:!1}),s.current=null)},[i.currentId]),Z.createElement(DD.Provider,{value:Z.useMemo(()=>({...i,setState:o,setCurrentId:f}),[i,o,f])},e)},dee=(t,e)=>{let{open:r,onOpenChange:n}=t,{id:i}=e;const{currentId:o,setCurrentId:s,initialDelay:f,setState:d,timeoutMs:p}=FD();kf(()=>{o&&(d({delay:{open:1,close:Rv(f,"close")}}),o!==i&&n(!1))},[i,n,d,o,f]),kf(()=>{function b(){n(!1),d({delay:f,currentId:null})}if(!r&&o===i)if(p){const v=window.setTimeout(b,p);return()=>{clearTimeout(v)}}else b()},[r,d,o,i,n,f,p]),kf(()=>{r&&s(i)},[r,s,i])};function hee(t){let e=t.activeElement;for(;((r=e)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;e=e.shadowRoot.activeElement}return e}function V3(t,e){let r=t.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)}),n=r;for(;n.length;)n=t.filter(i=>{var o;return(o=n)==null?void 0:o.some(s=>{var f;return i.parentId===s.id&&((f=i.context)==null?void 0:f.open)})}),r=r.concat(n);return r}function pee(t){return"composedPath"in t?t.composedPath()[0]:t.target}const mee=$E["useInsertionEffect".toString()],gee=mee||(t=>t());function kv(t){const e=Z.useRef(()=>{});return gee(()=>{e.current=t}),Z.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i{var e,r;return{escapeKeyBubbles:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePressBubbles:typeof t=="boolean"?t:(r=t==null?void 0:t.outsidePress)!=null?r:!0}};function wee(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,events:i,nodeId:o,elements:{reference:s,domReference:f,floating:d},dataRef:p}=t,{enabled:b=!0,escapeKey:v=!0,outsidePress:A=!0,outsidePressEvent:_="pointerdown",referencePress:S=!1,referencePressEvent:P="pointerdown",ancestorScroll:I=!1,bubbles:C}=e,T=eS(),k=BD()!=null,O=kv(typeof A=="function"?A:()=>!1),D=typeof A=="function"?O:A,U=Z.useRef(!1),{escapeKeyBubbles:V,outsidePressBubbles:Y}=vee(C),W=kv(x=>{if(!r||!b||!v||x.key!=="Escape")return;const a=T?V3(T.nodesRef.current,o):[];if(!V&&(x.stopPropagation(),a.length>0)){let u=!0;if(a.forEach(l=>{var h;if((h=l.context)!=null&&h.open&&!l.context.dataRef.current.__escapeKeyBubbles){u=!1;return}}),!u)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1,cee(x)?x.nativeEvent:x)}),ie=kv(x=>{const a=U.current;if(U.current=!1,a||typeof D=="function"&&!D(x))return;const u=pee(x);if(OD(u)&&d){const m=u.clientWidth>0&&u.scrollWidth>u.clientWidth,w=u.clientHeight>0&&u.scrollHeight>u.clientHeight;let E=w&&x.offsetX>u.clientWidth;if(w&&j5(d).getComputedStyle(u).direction==="rtl"&&(E=x.offsetX<=u.offsetWidth-u.clientWidth),E||m&&x.offsetY>u.clientHeight)return}const l=T&&V3(T.nodesRef.current,o).some(m=>{var w;return Bv(x,(w=m.context)==null?void 0:w.elements.floating)});if(Bv(x,d)||Bv(x,f)||l)return;const h=T?V3(T.nodesRef.current,o):[];if(h.length>0){let m=!0;if(h.forEach(w=>{var E;if((E=w.context)!=null&&E.open&&!w.context.dataRef.current.__outsidePressBubbles){m=!1;return}}),!m)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:k?{preventScroll:!0}:aee(x)||fee(x)}}),n(!1,x)});return Z.useEffect(()=>{if(!r||!b)return;p.current.__escapeKeyBubbles=V,p.current.__outsidePressBubbles=Y;function x(l){n(!1,l)}const a=Jc(d);v&&a.addEventListener("keydown",W),D&&a.addEventListener(_,ie);let u=[];return I&&(Pa(f)&&(u=Rf(f)),Pa(d)&&(u=u.concat(Rf(d))),!Pa(s)&&s&&s.contextElement&&(u=u.concat(Rf(s.contextElement)))),u=u.filter(l=>{var h;return l!==((h=a.defaultView)==null?void 0:h.visualViewport)}),u.forEach(l=>{l.addEventListener("scroll",x,{passive:!0})}),()=>{v&&a.removeEventListener("keydown",W),D&&a.removeEventListener(_,ie),u.forEach(l=>{l.removeEventListener("scroll",x)})}},[p,d,f,s,v,D,_,r,n,I,b,V,Y,W,ie]),Z.useEffect(()=>{U.current=!1},[D,_]),Z.useMemo(()=>b?{reference:{onKeyDown:W,[bee[P]]:x=>{S&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1,x.nativeEvent))}},floating:{onKeyDown:W,[yee[_]]:()=>{U.current=!0}}}:{},[b,i,S,_,P,n,W])}function tS(t){var e;t===void 0&&(t={});const{open:r=!1,onOpenChange:n,nodeId:i}=t,[o,s]=Z.useState(null),f=((e=t.elements)==null?void 0:e.reference)||o,d=YX(t),p=eS(),b=kv((O,D)=>{O&&(A.current.openEvent=D),n==null||n(O,D)}),v=Z.useRef(null),A=Z.useRef({}),_=Z.useState(()=>tee())[0],S=kD(),P=Z.useCallback(O=>{const D=Pa(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;d.refs.setReference(D)},[d.refs]),I=Z.useCallback(O=>{(Pa(O)||O===null)&&(v.current=O,s(O)),(Pa(d.refs.reference.current)||d.refs.reference.current===null||O!==null&&!Pa(O))&&d.refs.setReference(O)},[d.refs]),C=Z.useMemo(()=>({...d.refs,setReference:I,setPositionReference:P,domReference:v}),[d.refs,I,P]),T=Z.useMemo(()=>({...d.elements,domReference:f}),[d.elements,f]),k=Z.useMemo(()=>({...d,refs:C,elements:T,dataRef:A,nodeId:i,floatingId:S,events:_,open:r,onOpenChange:b}),[d,i,S,_,r,b,C,T]);return kf(()=>{const O=p==null?void 0:p.nodesRef.current.find(D=>D.id===i);O&&(O.context=k)}),Z.useMemo(()=>({...d,context:k,refs:C,elements:T}),[d,C,T,k])}function xee(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,dataRef:i,events:o,refs:s,elements:{floating:f,domReference:d}}=t,{enabled:p=!0,keyboardOnly:b=!0}=e,v=Z.useRef(""),A=Z.useRef(!1),_=Z.useRef();return Z.useEffect(()=>{if(!p)return;const P=Jc(f).defaultView||window;function I(){!r&&OD(d)&&d===hee(Jc(d))&&(A.current=!0)}return P.addEventListener("blur",I),()=>{P.removeEventListener("blur",I)}},[f,d,r,p]),Z.useEffect(()=>{if(!p)return;function S(P){(P.type==="referencePress"||P.type==="escapeKey")&&(A.current=!0)}return o.on("dismiss",S),()=>{o.off("dismiss",S)}},[o,p]),Z.useEffect(()=>()=>{clearTimeout(_.current)},[]),Z.useMemo(()=>p?{reference:{onPointerDown(S){let{pointerType:P}=S;v.current=P,A.current=!!(P&&b)},onMouseLeave(){A.current=!1},onFocus(S){var P;A.current||S.type==="focus"&&((P=i.current.openEvent)==null?void 0:P.type)==="mousedown"&&Bv(i.current.openEvent,d)||n(!0,S.nativeEvent)},onBlur(S){A.current=!1;const P=S.relatedTarget,I=Pa(P)&&P.hasAttribute(LD("focus-guard"))&&P.getAttribute("data-type")==="outside";_.current=setTimeout(()=>{F9(s.floating.current,P)||F9(d,P)||I||n(!1,S.nativeEvent)})}}}:{},[p,b,d,s,i,n])}function K3(t,e,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...t,...e.map(i=>i?i[r]:null).concat(t).reduce((i,o)=>(o&&Object.entries(o).forEach(s=>{let[f,d]=s;if(f.indexOf("on")===0){if(n.has(f)||n.set(f,[]),typeof d=="function"){var p;(p=n.get(f))==null||p.push(d),i[f]=function(){for(var b,v=arguments.length,A=new Array(v),_=0;_S(...A)).find(S=>S!==void 0)}}}else i[f]=d}),i),{})}}function Eee(t){t===void 0&&(t=[]);const e=t,r=Z.useCallback(o=>K3(o,t,"reference"),e),n=Z.useCallback(o=>K3(o,t,"floating"),e),i=Z.useCallback(o=>K3(o,t,"item"),t.map(o=>o==null?void 0:o.item));return Z.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:i}),[r,n,i])}function Aee(t,e){e===void 0&&(e={});const{open:r,floatingId:n}=t,{enabled:i=!0,role:o="dialog"}=e,s=kD();return Z.useMemo(()=>{const f={id:n,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":r?n:void 0},floating:f}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":r?n:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:s}},floating:{...f,...o==="menu"&&{"aria-labelledby":s}}}:{}},[i,o,r,n,s])}function $D(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[r,n]=e.split("-"),i=r==="right"?"left":"right";return n===void 0?i:`${i}-${n}`}return e}function yI(t,e,r,n){return t==="center"||n==="center"?{top:e}:t==="end"?{bottom:r}:t==="start"?{top:r}:{}}function vI(t,e,r,n,i){return t==="center"||n==="center"?{left:e}:t==="end"?{[i==="ltr"?"right":"left"]:r}:t==="start"?{[i==="ltr"?"left":"right"]:r}:{}}const See={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function Mee({position:t,arrowSize:e,arrowOffset:r,arrowRadius:n,arrowPosition:i,arrowX:o,arrowY:s,dir:f}){const[d,p="center"]=t.split("-"),b={width:Fe(e),height:Fe(e),transform:"rotate(45deg)",position:"absolute",[See[d]]:Fe(n)},v=Fe(-e/2);return d==="left"?{...b,...yI(p,s,r,i),right:v,borderLeftColor:"transparent",borderBottomColor:"transparent"}:d==="right"?{...b,...yI(p,s,r,i),left:v,borderRightColor:"transparent",borderTopColor:"transparent"}:d==="top"?{...b,...vI(p,o,r,i,f),bottom:v,borderTopColor:"transparent",borderLeftColor:"transparent"}:d==="bottom"?{...b,...vI(p,o,r,i,f),top:v,borderBottomColor:"transparent",borderRightColor:"transparent"}:{}}const rS=Z.forwardRef(({position:t,arrowSize:e,arrowOffset:r,arrowRadius:n,arrowPosition:i,visible:o,arrowX:s,arrowY:f,style:d,...p},b)=>{const{dir:v}=F5();return o?se.createElement("div",{...p,ref:b,style:{...d,...Mee({position:t,arrowSize:e,arrowOffset:r,arrowRadius:n,arrowPosition:i,dir:v,arrowX:s,arrowY:f})}}):null});rS.displayName="@mantine/core/FloatingArrow";function UD({opened:t,floating:e,position:r,positionDependencies:n}){const[i,o]=Z.useState(0);Z.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current)return JX(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,t,i,r]),Xu(()=>{e.update()},n),Xu(()=>{o(s=>s+1)},[t])}function _ee(t,e){var n,i,o,s;const r=[ED(t.offset)];return(n=t.middlewares)!=null&&n.shift&&r.push(ZA({limiter:TX()})),(i=t.middlewares)!=null&&i.flip&&r.push(vD()),(o=t.middlewares)!=null&&o.inline&&r.push(xD()),r.push(TD({element:t.arrowRef,padding:t.arrowOffset})),((s=t.middlewares)!=null&&s.size||t.width==="target")&&r.push(RX({apply({rects:f,availableWidth:d,availableHeight:p}){var A,_;const v=((A=e().refs.floating.current)==null?void 0:A.style)??{};(_=t.middlewares)!=null&&_.size&&Object.assign(v,{maxWidth:`${d}px`,maxHeight:`${p}px`}),t.width==="target"&&Object.assign(v,{width:`${f.reference.width}px`})}})),r}function Pee(t){const[e,r]=H2({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),n=()=>{var s;e&&((s=t.onClose)==null||s.call(t),r(!1))},i=()=>{var s,f;e?((s=t.onClose)==null||s.call(t),r(!1)):((f=t.onOpen)==null||f.call(t),r(!0))},o=tS({placement:t.position,middleware:_ee(t,()=>o)});return UD({opened:t.opened,position:t.position,positionDependencies:t.positionDependencies||[],floating:o}),Xu(()=>{var s;(s=t.onPositionChange)==null||s.call(t,o.placement)},[o.placement]),Xu(()=>{var s,f;t.opened?(f=t.onOpen)==null||f.call(t):(s=t.onClose)==null||s.call(t)},[t.opened]),{floating:o,controlled:typeof t.opened=="boolean",opened:e,onClose:n,onToggle:i}}const[Cee,zD]=vl("Popover component was not found in the tree"),Iee={refProp:"ref",popupType:"dialog"},jD=Et((t,e)=>{const{children:r,refProp:n,popupType:i,...o}=Ye("PopoverTarget",Iee,t);if(!yl(r))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const s=o,f=zD(),d=Ui(f.reference,r.ref,e),p=f.withRoles?{"aria-haspopup":i,"aria-expanded":f.opened,"aria-controls":f.getDropdownId(),id:f.getTargetId()}:{};return Z.cloneElement(r,{...s,...p,...f.targetProps,className:cn(f.targetProps.className,s.className,r.props.className),[n]:d,...f.controlled?null:{onClick:f.onToggle}})});jD.displayName="@mantine/core/PopoverTarget";function Tee(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ")),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}const Ree={},HD=Z.forwardRef((t,e)=>{const{children:r,target:n,...i}=Ye("Portal",Ree,t),[o,s]=Z.useState(!1),f=Z.useRef(null);return Qp(()=>(s(!0),f.current=n?typeof n=="string"?document.querySelector(n):n:Tee(i),JL(e,f.current),!n&&f.current&&document.body.appendChild(f.current),()=>{!n&&f.current&&document.body.removeChild(f.current)}),[n]),!o||!f.current?null:bb.createPortal(se.createElement(se.Fragment,null,r),f.current)});HD.displayName="@mantine/core/Portal";function t1({withinPortal:t=!0,children:e,...r}){return t?se.createElement(HD,{...r},e):se.createElement(se.Fragment,null,e)}t1.displayName="@mantine/core/OptionalPortal";const $1=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${Fe(t==="bottom"?10:-10)})`},transitionProperty:"transform, opacity"}),Uy={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${Fe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${Fe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${Fe(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${Fe(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...$1("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...$1("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...$1("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...$1("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...$1("top"),common:{transformOrigin:"top right"}}},wI={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function kee({transition:t,state:e,duration:r,timingFunction:n}){const i={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof t=="string"?t in Uy?{transitionProperty:Uy[t].transitionProperty,...i,...Uy[t].common,...Uy[t][wI[e]]}:{}:{transitionProperty:t.transitionProperty,...i,...t.common,...t[wI[e]]}}function Bee({duration:t,exitDuration:e,timingFunction:r,mounted:n,onEnter:i,onExit:o,onEntered:s,onExited:f}){const d=ta(),p=ZL(),b=d.respectReducedMotion?p:!1,[v,A]=Z.useState(b?0:t),[_,S]=Z.useState(n?"entered":"exited"),P=Z.useRef(-1),I=C=>{const T=C?i:o,k=C?s:f;S(C?"pre-entering":"pre-exiting"),window.clearTimeout(P.current);const O=b?0:C?t:e;if(A(O),O===0)typeof T=="function"&&T(),typeof k=="function"&&k(),S(C?"entered":"exited");else{const D=window.setTimeout(()=>{typeof T=="function"&&T(),S(C?"entering":"exiting")},10);P.current=window.setTimeout(()=>{window.clearTimeout(D),typeof k=="function"&&k(),S(C?"entered":"exited")},O)}};return Xu(()=>{I(n)},[n]),Z.useEffect(()=>()=>window.clearTimeout(P.current),[]),{transitionDuration:v,transitionStatus:_,transitionTimingFunction:r||"ease"}}function El({keepMounted:t,transition:e="fade",duration:r=250,exitDuration:n=r,mounted:i,children:o,timingFunction:s="ease",onExit:f,onEntered:d,onEnter:p,onExited:b}){const{transitionDuration:v,transitionStatus:A,transitionTimingFunction:_}=Bee({mounted:i,exitDuration:n,duration:r,timingFunction:s,onExit:f,onEntered:d,onEnter:p,onExited:b});return v===0?i?se.createElement(se.Fragment,null,o({})):t?o({display:"none"}):null:A==="exited"?t?o({display:"none"}):null:se.createElement(se.Fragment,null,o(kee({transition:e,duration:v,state:A,timingFunction:_})))}El.displayName="@mantine/core/Transition";function nS({children:t,active:e=!0,refProp:r="ref"}){const n=XY(e),i=Ui(n,t==null?void 0:t.ref);return yl(t)?Z.cloneElement(t,{[r]:i}):t}nS.displayName="@mantine/core/FocusTrap";var qD={dropdown:"m-38a85659",arrow:"m-a31dc6c1"};const Oee={},iS=Et((t,e)=>{var I,C,T,k;const r=Ye("PopoverDropdown",Oee,t),{className:n,style:i,vars:o,children:s,onKeyDownCapture:f,variant:d,classNames:p,styles:b,...v}=r,A=zD(),_=qL({opened:A.opened,shouldReturnFocus:A.returnFocus}),S=A.withRoles?{"aria-labelledby":A.getTargetId(),id:A.getDropdownId(),role:"dialog",tabIndex:-1}:{},P=Ui(e,A.floating);return A.disabled?null:se.createElement(t1,{...A.portalProps,withinPortal:A.withinPortal},se.createElement(El,{mounted:A.opened,...A.transitionProps,transition:((I=A.transitionProps)==null?void 0:I.transition)||"fade",duration:((C=A.transitionProps)==null?void 0:C.duration)??150,keepMounted:A.keepMounted,exitDuration:typeof((T=A.transitionProps)==null?void 0:T.exitDuration)=="number"?A.transitionProps.exitDuration:(k=A.transitionProps)==null?void 0:k.duration},O=>se.createElement(nS,{active:A.trapFocus},se.createElement(ft,{...S,...v,variant:d,ref:P,onKeyDownCapture:FY(A.onClose,{active:A.closeOnEscape,onTrigger:_,onKeyDown:f}),"data-position":A.placement,...A.getStyles("dropdown",{className:n,props:r,classNames:p,styles:b,style:[{...O,zIndex:A.zIndex,top:A.y??0,left:A.x??0,width:A.width==="target"?void 0:Fe(A.width)},i]})},s,se.createElement(rS,{ref:A.arrowRef,arrowX:A.arrowX,arrowY:A.arrowY,visible:A.withArrow,position:A.placement,arrowSize:A.arrowSize,arrowRadius:A.arrowRadius,arrowOffset:A.arrowOffset,arrowPosition:A.arrowPosition,...A.getStyles("arrow",{props:r,classNames:p,styles:b})})))))});iS.classes=qD;iS.displayName="@mantine/core/PopoverDropdown";const Nee={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ha("popover"),__staticSelector:"Popover",width:"max-content"},Lee=(t,{radius:e,shadow:r})=>({dropdown:{"--popover-radius":e===void 0?void 0:bi(e),"--popover-shadow":BA(r)}});function O0(t){var he,He,be,oe,Xe,Ee;const e=Ye("Popover",Nee,t),{children:r,position:n,offset:i,onPositionChange:o,positionDependencies:s,opened:f,transitionProps:d,width:p,middlewares:b,withArrow:v,arrowSize:A,arrowOffset:_,arrowRadius:S,arrowPosition:P,unstyled:I,classNames:C,styles:T,closeOnClickOutside:k,withinPortal:O,portalProps:D,closeOnEscape:U,clickOutsideEvents:V,trapFocus:Y,onClose:W,onOpen:ie,onChange:x,zIndex:a,radius:u,shadow:l,id:h,defaultOpened:m,__staticSelector:w,withRoles:E,disabled:y,returnFocus:c,variant:g,keepMounted:M,vars:B,...L}=e,R=Ht({name:w,props:e,classes:qD,classNames:C,styles:T,unstyled:I,rootSelector:"dropdown",vars:B,varsResolver:Lee}),F=Z.useRef(null),[z,K]=Z.useState(null),[q,Q]=Z.useState(null),{dir:G}=F5(),H=wl(h),ee=Pee({middlewares:b,width:p,position:$D(G,n),offset:typeof i=="number"?i+(v?A/2:0):i,arrowRef:F,arrowOffset:_,onPositionChange:o,positionDependencies:s,opened:f,defaultOpened:m,onChange:x,onOpen:ie,onClose:W});jY(()=>k&&ee.onClose(),V,[z,q]);const ue=Z.useCallback(ye=>{K(ye),ee.floating.refs.setReference(ye)},[ee.floating.refs.setReference]),fe=Z.useCallback(ye=>{Q(ye),ee.floating.refs.setFloating(ye)},[ee.floating.refs.setFloating]);return se.createElement(Cee,{value:{returnFocus:c,disabled:y,controlled:ee.controlled,reference:ue,floating:fe,x:ee.floating.x,y:ee.floating.y,arrowX:(be=(He=(he=ee.floating)==null?void 0:he.middlewareData)==null?void 0:He.arrow)==null?void 0:be.x,arrowY:(Ee=(Xe=(oe=ee.floating)==null?void 0:oe.middlewareData)==null?void 0:Xe.arrow)==null?void 0:Ee.y,opened:ee.opened,arrowRef:F,transitionProps:d,width:p,withArrow:v,arrowSize:A,arrowOffset:_,arrowRadius:S,arrowPosition:P,placement:ee.floating.placement,trapFocus:Y,withinPortal:O,portalProps:D,zIndex:a,radius:u,shadow:l,closeOnEscape:U,onClose:ee.onClose,onToggle:ee.onToggle,getTargetId:()=>`${H}-target`,getDropdownId:()=>`${H}-dropdown`,withRoles:E,targetProps:L,__staticSelector:w,classNames:C,styles:T,unstyled:I,variant:g,keepMounted:M,getStyles:R}},r)}O0.Target=jD;O0.Dropdown=iS;O0.displayName="@mantine/core/Popover";O0.extend=t=>t;var Ns={root:"m-5ae2e3c",barsLoader:"m-7a2bd4cd",bar:"m-870bb79","bars-loader-animation":"m-5d2b3b9d",dotsLoader:"m-4e3f22d7",dot:"m-870c4af","loader-dots-animation":"m-aac34a1",ovalLoader:"m-b34414df","oval-loader-animation":"m-f8e89c4b"};const Dee=Z.forwardRef(({className:t,...e},r)=>se.createElement(ft,{component:"span",className:cn(Ns.barsLoader,t),...e,ref:r},se.createElement("span",{className:Ns.bar}),se.createElement("span",{className:Ns.bar}),se.createElement("span",{className:Ns.bar}))),Fee=Z.forwardRef(({className:t,...e},r)=>se.createElement(ft,{component:"span",className:cn(Ns.ovalLoader,t),...e,ref:r})),$ee=Z.forwardRef(({className:t,...e},r)=>se.createElement(ft,{component:"span",className:cn(Ns.dotsLoader,t),...e,ref:r},se.createElement("span",{className:Ns.dot}),se.createElement("span",{className:Ns.dot}),se.createElement("span",{className:Ns.dot}))),Uee={bars:Dee,oval:Fee,dots:$ee},zee={loaders:Uee,type:"oval"},jee=(t,{size:e,color:r})=>({root:{"--loader-size":zr(e,"loader-size"),"--loader-color":r?zf(r,t):void 0}}),Al=Et((t,e)=>{const r=Ye("Loader",zee,t),{size:n,color:i,type:o,vars:s,className:f,style:d,classNames:p,styles:b,unstyled:v,loaders:A,variant:_,children:S,...P}=r,I=Ht({name:"Loader",props:r,classes:Ns,className:f,style:d,classNames:p,styles:b,unstyled:v,vars:s,varsResolver:jee});return S?se.createElement(ft,{...I("root"),ref:e,...P},S):se.createElement(ft,{...I("root"),ref:e,component:A[o],variant:_,size:n,...P})});Al.classes=Ns;Al.displayName="@mantine/core/Loader";var H5={root:"m-8d3f4000",loader:"m-302b9fb1",group:"m-1a0f1b21"};const xI={orientation:"horizontal"},Hee=(t,{borderWidth:e})=>({group:{"--ai-border-width":Fe(e)}}),oS=Et((t,e)=>{const r=Ye("ActionIconGroup",xI,t),{className:n,style:i,classNames:o,styles:s,unstyled:f,orientation:d,vars:p,borderWidth:b,variant:v,...A}=Ye("ActionIconGroup",xI,t),_=Ht({name:"ActionIconGroup",props:r,classes:H5,className:n,style:i,classNames:o,styles:s,unstyled:f,vars:p,varsResolver:Hee,rootSelector:"group"});return se.createElement(ft,{..._("group"),ref:e,variant:v,mod:{"data-orientation":d},role:"group",...A})});oS.classes=H5;oS.displayName="@mantine/core/ActionIconGroup";const qee={},Gee=(t,{size:e,radius:r,variant:n,gradient:i,color:o})=>{const s=t.variantColorResolver({color:o||t.primaryColor,theme:t,gradient:i,variant:n||"filled"});return{root:{"--ai-size":zr(e,"ai-size"),"--ai-radius":r===void 0?void 0:bi(r),"--ai-bg":o||n?s.background:void 0,"--ai-hover":o||n?s.hover:void 0,"--ai-hover-color":o||n?s.hoverColor:void 0,"--ai-color":o||n?s.color:void 0,"--ai-bd":o||n?s.border:void 0}}},q5=zi((t,e)=>{const r=Ye("ActionIcon",qee,t),{className:n,unstyled:i,variant:o,classNames:s,styles:f,style:d,loading:p,loaderProps:b,size:v,color:A,radius:_,__staticSelector:S,gradient:P,vars:I,children:C,disabled:T,"data-disabled":k,...O}=r,D=Ht({name:["ActionIcon",S],props:r,className:n,style:d,classes:H5,classNames:s,styles:f,unstyled:i,vars:I,varsResolver:Gee});return se.createElement(wb,{...D("root",{active:!T&&!p&&!k}),...O,unstyled:i,variant:o,size:v,disabled:T||p,ref:e,mod:{loading:p,disabled:T||k}},p?se.createElement(Al,{...D("loader"),color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...b}):C)});q5.classes=H5;q5.displayName="@mantine/core/ActionIcon";q5.Group=oS;const GD=Z.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:e,...r},n)=>se.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},ref:n,...r},se.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})));GD.displayName="@mantine/core/CloseIcon";var VD={root:"m-86a44da5","root--subtle":"m-220c80f2"};const Vee={variant:"subtle"},Kee=(t,{size:e,radius:r,iconSize:n})=>({root:{"--cb-size":zr(e,"cb-size"),"--cb-radius":r===void 0?void 0:bi(r),"--cb-icon-size":Fe(n)}}),Sl=zi((t,e)=>{const r=Ye("CloseButton",Vee,t),{iconSize:n,children:i,vars:o,radius:s,className:f,classNames:d,style:p,styles:b,unstyled:v,"data-disabled":A,disabled:_,variant:S,...P}=r,I=Ht({name:"CloseButton",props:r,className:f,style:p,classes:VD,classNames:d,styles:b,unstyled:v,vars:o,varsResolver:Kee});return se.createElement(wb,{ref:e,...P,unstyled:v,variant:S,disabled:_,mod:{disabled:_||A},...I("root",{variant:S,active:!0})},se.createElement(GD,null),i)});Sl.classes=VD;Sl.displayName="@mantine/core/CloseButton";function Wee(t){return Z.Children.toArray(t).filter(Boolean)}var KD={root:"m-4081bf90"};const Jee={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},Zee=(t,{grow:e,preventGrowOverflow:r,gap:n,align:i,justify:o,wrap:s},{childWidth:f})=>({root:{"--group-child-width":e&&r?f:void 0,"--group-gap":yb(n),"--group-align":i,"--group-justify":o,"--group-wrap":s}}),Bm=Et((t,e)=>{const r=Ye("Group",Jee,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,children:d,gap:p,align:b,justify:v,wrap:A,grow:_,preventGrowOverflow:S,vars:P,variant:I,__size:C,...T}=r,k=Wee(d),O=k.length,D=yb(p??"md"),V={childWidth:`calc(${100/O}% - (${D} - ${D} / ${O}))`},Y=Ht({name:"Group",props:r,stylesCtx:V,className:i,style:o,classes:KD,classNames:n,styles:s,unstyled:f,vars:P,varsResolver:Zee});return se.createElement(ft,{...Y("root"),ref:e,variant:I,mod:{grow:_},size:C,...T},k)});Bm.classes=KD;Bm.displayName="@mantine/core/Group";var WD={root:"m-9814e45f"};const Yee={zIndex:Ha("modal")},Qee=(t,{gradient:e,color:r,backgroundOpacity:n,blur:i,radius:o,zIndex:s})=>({root:{"--overlay-bg":e||(r!==void 0||n!==void 0)&&ii(r||"#000",n??.6)||void 0,"--overlay-filter":i?`blur(${Fe(i)})`:void 0,"--overlay-radius":o===void 0?void 0:bi(o),"--overlay-z-index":s==null?void 0:s.toString()}}),dg=zi((t,e)=>{const r=Ye("Overlay",Yee,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,fixed:p,center:b,children:v,radius:A,zIndex:_,gradient:S,blur:P,color:I,backgroundOpacity:C,...T}=r,k=Ht({name:"Overlay",props:r,classes:WD,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Qee});return se.createElement(ft,{ref:e,...k("root"),mod:{center:b,fixed:p},...T},v)});dg.classes=WD;dg.displayName="@mantine/core/Overlay";const[Xee,ec]=vl("ModalBase component was not found in tree");function ete({opened:t,transitionDuration:e}){const[r,n]=Z.useState(t),i=Z.useRef(),s=ZL()?0:e;return Z.useEffect(()=>(t?(n(!0),window.clearTimeout(i.current)):s===0?n(!1):i.current=window.setTimeout(()=>n(!1),s),()=>window.clearTimeout(i.current)),[t,s]),r}function tte({id:t,transitionProps:e,opened:r,trapFocus:n,closeOnEscape:i,onClose:o,returnFocus:s}){const f=wl(t),[d,p]=Z.useState(!1),[b,v]=Z.useState(!1),A=typeof(e==null?void 0:e.duration)=="number"?e==null?void 0:e.duration:200,_=ete({opened:r,transitionDuration:A});return WL("keydown",S=>{!n&&S.key==="Escape"&&i&&o()}),qL({opened:r,shouldReturnFocus:n&&s}),{_id:f,titleMounted:d,bodyMounted:b,shouldLockScroll:_,setTitleMounted:p,setBodyMounted:v}}const rte=Z.forwardRef(({keepMounted:t,opened:e,onClose:r,id:n,transitionProps:i,trapFocus:o,closeOnEscape:s,returnFocus:f,closeOnClickOutside:d,withinPortal:p,portalProps:b,lockScroll:v,children:A,zIndex:_,shadow:S,padding:P,__vars:I,unstyled:C,removeScrollProps:T,...k},O)=>{const{_id:D,titleMounted:U,bodyMounted:V,shouldLockScroll:Y,setTitleMounted:W,setBodyMounted:ie}=tte({id:n,transitionProps:i,opened:e,trapFocus:o,closeOnEscape:s,onClose:r,returnFocus:f});return se.createElement(t1,{...b,withinPortal:p},se.createElement(Xee,{value:{opened:e,onClose:r,closeOnClickOutside:d,transitionProps:{...i,keepMounted:t},getTitleId:()=>`${D}-title`,getBodyId:()=>`${D}-body`,titleMounted:U,bodyMounted:V,setTitleMounted:W,setBodyMounted:ie,trapFocus:o,closeOnEscape:s,zIndex:_,unstyled:C}},se.createElement(TA,{enabled:Y&&v,...T},se.createElement(ft,{ref:O,...k,__vars:{...I,"--mb-z-index":(_||Ha("modal")).toString(),"--mb-shadow":BA(S),"--mb-padding":yb(P)}},A))))});function nte(){const t=ec();return Z.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}var ip={title:"m-615af6c9",header:"m-b5489c3c",inner:"m-60c222c7",content:"m-fd1ab0aa",close:"m-606cb269",body:"m-5df29311"};const JD=Z.forwardRef(({className:t,...e},r)=>{const n=nte(),i=ec();return se.createElement(ft,{ref:r,...e,id:n,className:cn({[ip.body]:!i.unstyled},t)})});JD.displayName="@mantine/core/ModalBaseBody";const ZD=Z.forwardRef(({className:t,onClick:e,...r},n)=>{const i=ec();return se.createElement(Sl,{ref:n,...r,onClick:o=>{i.onClose(),e==null||e(o)},className:cn({[ip.close]:!i.unstyled},t),unstyled:i.unstyled})});ZD.displayName="@mantine/core/ModalBaseCloseButton";const ite=Z.forwardRef(({transitionProps:t,className:e,innerProps:r,onKeyDown:n,style:i,...o},s)=>{const f=ec(),d=p=>{var v;((v=p.target)==null?void 0:v.getAttribute("data-mantine-stop-propagation"))!=="true"&&p.key==="Escape"&&f.closeOnEscape&&f.onClose(),n==null||n(p)};return se.createElement(El,{mounted:f.opened,transition:"pop",...f.transitionProps,...t},p=>se.createElement("div",{...r,className:cn({[ip.inner]:!f.unstyled},r.className)},se.createElement(nS,{active:f.opened&&f.trapFocus},se.createElement(Xp,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":f.bodyMounted?f.getBodyId():void 0,"aria-labelledby":f.titleMounted?f.getTitleId():void 0,onKeyDown:d,ref:s,style:[i,p],className:cn({[ip.content]:!f.unstyled},e),unstyled:f.unstyled},o.children))))}),YD=Z.forwardRef(({className:t,...e},r)=>{const n=ec();return se.createElement(ft,{ref:r,className:cn({[ip.header]:!n.unstyled},t),...e})});YD.displayName="@mantine/core/ModalBaseHeader";const ote={duration:200,timingFunction:"ease",transition:"fade"};function ste(t){const e=ec();return{...ote,...e.transitionProps,...t}}const QD=Z.forwardRef(({onClick:t,transitionProps:e,style:r,...n},i)=>{const o=ec(),s=ste(e);return se.createElement(El,{mounted:o.opened,...s,transition:"fade"},f=>se.createElement(dg,{ref:i,fixed:!0,style:[r,f],zIndex:o.zIndex,unstyled:o.unstyled,onClick:d=>{t==null||t(d),o.closeOnClickOutside&&o.onClose()},...n}))});QD.displayName="@mantine/core/ModalBaseOverlay";function ate(){const t=ec();return Z.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}const XD=Z.forwardRef(({className:t,...e},r)=>{const n=ate(),i=ec();return se.createElement(ft,{component:"h2",ref:r,className:cn({[ip.title]:!i.unstyled},t),...e,id:n})});XD.displayName="@mantine/core/ModalBaseTitle";function fte({children:t}){return se.createElement(se.Fragment,null,t)}const[cte,G5]=NY({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var rs={wrapper:"m-6c018570",input:"m-8fb7ebe7",section:"m-82577fc2",placeholder:"m-88bacfd0",root:"m-46b77525",label:"m-8fdc1311",required:"m-78a94662",error:"m-8f816625",description:"m-fe47ce59"};const EI={labelElement:"label"},ute=(t,{size:e})=>({label:{"--input-label-size":Fo(e),"--input-asterisk-color":void 0}}),V5=Et((t,e)=>{const r=Ye("InputLabel",EI,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,labelElement:p,size:b,required:v,htmlFor:A,onMouseDown:_,children:S,__staticSelector:P,variant:I,...C}=Ye("InputLabel",EI,r),T=Ht({name:["InputWrapper",P],props:r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,rootSelector:"label",vars:d,varsResolver:ute}),k=G5(),O=(k==null?void 0:k.getStyles)||T;return se.createElement(ft,{...O("label"),component:p,variant:I,size:b,ref:e,htmlFor:p==="label"?A:void 0,mod:{required:v},onMouseDown:D=>{_==null||_(D),!D.defaultPrevented&&D.detail>1&&D.preventDefault()},...C},S,v&&se.createElement("span",{...O("required"),"aria-hidden":!0}," *"))});V5.classes=rs;V5.displayName="@mantine/core/InputLabel";const lte={},dte=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${Fo(e)} - ${Fe(2)})`}}),K5=Et((t,e)=>{const r=Ye("InputError",lte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,size:p,__staticSelector:b,__inheritStyles:v=!0,variant:A,..._}=r,S=Ht({name:["InputWrapper",b],props:r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,rootSelector:"error",vars:d,varsResolver:dte}),P=G5(),I=v&&(P==null?void 0:P.getStyles)||S;return se.createElement(ft,{component:"p",ref:e,variant:A,size:p,...I("error"),..._})});K5.classes=rs;K5.displayName="@mantine/core/InputError";const AI={},hte=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${Fo(e)} - ${Fe(2)})`}}),W5=Et((t,e)=>{const r=Ye("InputDescription",AI,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,size:p,__staticSelector:b,__inheritStyles:v=!0,variant:A,..._}=Ye("InputDescription",AI,r),S=G5(),P=Ht({name:["InputWrapper",b],props:r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,rootSelector:"description",vars:d,varsResolver:hte}),I=v&&(S==null?void 0:S.getStyles)||P;return se.createElement(ft,{component:"p",ref:e,variant:A,size:p,...I("description"),..._})});W5.classes=rs;W5.displayName="@mantine/core/InputDescription";const SI={},sS=Et((t,e)=>{const r=Ye("InputPlaceholder",SI,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,__staticSelector:p,variant:b,error:v,...A}=Ye("InputPlaceholder",SI,r),_=Ht({name:["InputPlaceholder",p],props:r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,rootSelector:"placeholder"});return se.createElement(ft,{..._("placeholder"),mod:{error:!!v},component:"span",variant:b,ref:e,...A})});sS.classes=rs;sS.displayName="@mantine/core/InputPlaceholder";function pte(t,{hasDescription:e,hasError:r}){const n=t.findIndex(d=>d==="input"),i=t[n-1],o=t[n+1];return{offsetBottom:e&&o==="description"||r&&o==="error",offsetTop:e&&i==="description"||r&&i==="error"}}const mte={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},gte=(t,{size:e})=>({label:{"--input-label-size":Fo(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${Fo(e)} - ${Fe(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${Fo(e)} - ${Fe(2)})`}}),aS=Et((t,e)=>{const r=Ye("InputWrapper",mte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,size:p,variant:b,__staticSelector:v,inputContainer:A,inputWrapperOrder:_,label:S,error:P,description:I,labelProps:C,descriptionProps:T,errorProps:k,labelElement:O,children:D,withAsterisk:U,id:V,required:Y,__stylesApiProps:W,...ie}=r,x=Ht({name:["InputWrapper",v],props:W||r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:gte}),a={size:p,variant:b,__staticSelector:v},u=wl(V),l=typeof U=="boolean"?U:Y,h=(k==null?void 0:k.id)||`${u}-error`,m=(T==null?void 0:T.id)||`${u}-description`,w=u,E=!!P&&typeof P!="boolean",y=!!I,c=`${E?h:""} ${y?m:""}`,g=c.trim().length>0?c.trim():void 0,M=(C==null?void 0:C.id)||`${u}-label`,B=S&&se.createElement(V5,{key:"label",labelElement:O,id:M,htmlFor:w,required:l,...a,...C},S),L=y&&se.createElement(W5,{key:"description",...T,...a,size:(T==null?void 0:T.size)||a.size,id:(T==null?void 0:T.id)||m},I),R=se.createElement(se.Fragment,{key:"input"},A(D)),F=E&&se.createElement(K5,{...k,...a,size:(k==null?void 0:k.size)||a.size,key:"error",id:(k==null?void 0:k.id)||h},P),z=_.map(K=>{switch(K){case"label":return B;case"input":return R;case"description":return L;case"error":return F;default:return null}});return se.createElement(cte,{value:{getStyles:x,describedBy:g,inputId:w,labelId:M,...pte(_,{hasDescription:y,hasError:E})}},se.createElement(ft,{ref:e,variant:b,size:p,...x("root"),...ie},z))});aS.classes=rs;aS.displayName="@mantine/core/InputWrapper";const bte={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},yte=(t,e,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":zr(e.size,"input-height"),"--input-fz":Fo(e.size),"--input-radius":e.radius===void 0?void 0:bi(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?Fe(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?Fe(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?zr(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),an=zi((t,e)=>{const r=Ye("Input",bte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,required:d,__staticSelector:p,__stylesApiProps:b,size:v,wrapperProps:A,error:_,disabled:S,leftSection:P,leftSectionProps:I,leftSectionWidth:C,rightSection:T,rightSectionProps:k,rightSectionWidth:O,rightSectionPointerEvents:D,leftSectionPointerEvents:U,variant:V,vars:Y,pointer:W,multiline:ie,radius:x,id:a,withAria:u,withErrorStyles:l,...h}=r,{styleProps:m,rest:w}=zA(h),E=G5(),y={offsetBottom:E==null?void 0:E.offsetBottom,offsetTop:E==null?void 0:E.offsetTop},c=Ht({name:["Input",p],props:b||r,classes:rs,className:i,style:o,classNames:n,styles:s,unstyled:f,stylesCtx:y,rootSelector:"wrapper",vars:Y,varsResolver:yte}),g=u?{required:d,disabled:S,"aria-invalid":!!_,"aria-describedby":E==null?void 0:E.describedBy,id:(E==null?void 0:E.inputId)||a}:{};return se.createElement(ft,{...c("wrapper"),...m,...A,mod:{error:!!_&&l,pointer:W,disabled:S,multiline:ie,"data-with-right-section":!!T,"data-with-left-section":!!P},variant:V,size:v},P&&se.createElement("div",{...I,"data-position":"left",...c("section",{className:I==null?void 0:I.className,style:I==null?void 0:I.style})},P),se.createElement(ft,{component:"input",...w,...g,ref:e,required:d,mod:{disabled:S,error:!!_&&l},variant:V,...c("input")}),T&&se.createElement("div",{...k,"data-position":"right",...c("section",{className:k==null?void 0:k.className,style:k==null?void 0:k.style})},T))});an.classes=rs;an.Wrapper=aS;an.Label=V5;an.Error=K5;an.Description=W5;an.Placeholder=sS;an.displayName="@mantine/core/Input";function vte(t,e,r){const n=Ye(t,e,r),{label:i,description:o,error:s,required:f,classNames:d,styles:p,className:b,unstyled:v,__staticSelector:A,__stylesApiProps:_,errorProps:S,labelProps:P,descriptionProps:I,wrapperProps:C,id:T,size:k,style:O,inputContainer:D,inputWrapperOrder:U,withAsterisk:V,variant:Y,vars:W,...ie}=n,{styleProps:x,rest:a}=zA(ie),u={label:i,description:o,error:s,required:f,classNames:d,className:b,__staticSelector:A,__stylesApiProps:_||n,errorProps:S,labelProps:P,descriptionProps:I,unstyled:v,styles:p,size:k,style:O,inputContainer:D,inputWrapperOrder:U,withAsterisk:V,variant:Y,id:T,...C};return{...a,classNames:d,styles:p,unstyled:v,wrapperProps:{...u,...x},inputProps:{required:f,classNames:d,styles:p,unstyled:v,size:k,__staticSelector:A,__stylesApiProps:_||n,error:s,variant:Y,id:T}}}const wte={__staticSelector:"InputBase",withAria:!0},J5=zi((t,e)=>{const{inputProps:r,wrapperProps:n,...i}=vte("InputBase",wte,t);return se.createElement(an.Wrapper,{...n},se.createElement(an,{...r,...i,ref:e}))});J5.classes={...an.classes,...an.Wrapper.classes};J5.displayName="@mantine/core/InputBase";var eF={root:"m-7f854edf"};const xte={position:{bottom:0,right:0},zIndex:Ha("modal"),withinPortal:!0},Ete=(t,{zIndex:e,position:r})=>({root:{"--affix-z-index":e==null?void 0:e.toString(),"--affix-top":Fe(r==null?void 0:r.top),"--affix-left":Fe(r==null?void 0:r.left),"--affix-bottom":Fe(r==null?void 0:r.bottom),"--affix-right":Fe(r==null?void 0:r.right)}}),fS=Et((t,e)=>{const r=Ye("Affix",xte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,portalProps:p,zIndex:b,withinPortal:v,position:A,..._}=r,S=Ht({name:"Affix",classes:eF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Ete});return se.createElement(t1,{...p,withinPortal:v},se.createElement(ft,{ref:e,...S("root"),..._}))});fS.classes=eF;fS.displayName="@mantine/core/Affix";var tF={root:"m-66836ed3","root--filled":"m-12b2e6d5","root--white":"m-cffd1856",wrapper:"m-a5d60502",body:"m-667c2793",title:"m-6a03f287",label:"m-698f4f23",icon:"m-667f2a6a",message:"m-7fa78076",closeButton:"m-87f54839"};const Ate={},Ste=(t,{radius:e,color:r,variant:n})=>{const i=t.variantColorResolver({color:r||t.primaryColor,theme:t,variant:n||"light"});return{root:{"--alert-radius":e===void 0?void 0:bi(e),"--alert-bg":r||n?i.background:void 0,"--alert-color":r||n?i.color:void 0,"--alert-bd":r||n?i.border:void 0}}},cS=Et((t,e)=>{const r=Ye("Alert",Ate,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,radius:p,color:b,title:v,children:A,id:_,icon:S,withCloseButton:P,onClose:I,closeButtonLabel:C,variant:T,...k}=r,O=Ht({name:"Alert",classes:tF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Ste}),D=wl(_),U=v&&`${D}-title`||void 0,V=`${D}-body`;return se.createElement(ft,{id:D,...O("root",{variant:T}),variant:T,ref:e,...k,role:"alert","aria-describedby":V,"aria-labelledby":U},se.createElement("div",{...O("wrapper")},S&&se.createElement("div",{...O("icon")},S),se.createElement("div",{...O("body")},v&&se.createElement("div",{...O("title"),"data-with-close-button":P||void 0},se.createElement("span",{id:U,...O("label")},v)),A&&se.createElement("div",{id:V,...O("message")},A)),P&&se.createElement(Sl,{...O("closeButton"),onClick:I,variant:"transparent",size:16,iconSize:16,"aria-label":C,unstyled:f})))});cS.classes=tF;cS.displayName="@mantine/core/Alert";var rF={root:"m-b6d8b162"};function Mte(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const _te={inherit:!1},Pte=(t,{variant:e,lineClamp:r,gradient:n,size:i,color:o})=>({root:{"--text-fz":Fo(i),"--text-lh":$Y(i),"--text-gradient":e==="gradient"?B9(n,t):void 0,"--text-line-clamp":typeof r=="number"?r.toString():void 0,"--text-color":o?zf(o,t):void 0}}),uS=zi((t,e)=>{const r=Ye("Text",_te,t),{lineClamp:n,truncate:i,inline:o,inherit:s,gradient:f,span:d,__staticSelector:p,vars:b,className:v,style:A,classNames:_,styles:S,unstyled:P,variant:I,mod:C,size:T,...k}=r,O=Ht({name:["Text",p],props:r,classes:rF,className:v,style:A,classNames:_,styles:S,unstyled:P,vars:b,varsResolver:Pte});return se.createElement(ft,{...O("root",{focusable:!0}),ref:e,component:d?"span":"p",variant:I,mod:[{"data-truncate":Mte(i),"data-line-clamp":typeof n=="number","data-inline":o,"data-inherit":s},C],size:T,...k})});uS.classes=rF;uS.displayName="@mantine/core/Text";var nF={root:"m-849cf0da"};const Cte={underline:"hover"},lS=zi((t,e)=>{const{underline:r,className:n,unstyled:i,...o}=Ye("Anchor",Cte,t);return se.createElement(uS,{component:"a",ref:e,className:cn({[nF.root]:!i},n),...o,mod:{underline:r},__staticSelector:"Anchor",unstyled:i})});lS.classes=nF;lS.displayName="@mantine/core/Anchor";const[Ite,r1]=vl("AppShell was not found in tree");var N0={root:"m-89ab340",navbar:"m-45252eee",aside:"m-9cdde9a",header:"m-3b16f56b",main:"m-8983817",footer:"m-3840c879",section:"m-6dcfc7c7"};const Tte={},dS=Et((t,e)=>{const r=Ye("AppShellNavbar",Tte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,withBorder:p,zIndex:b,...v}=r,A=r1();return A.disabled?null:se.createElement(ft,{component:"nav",ref:e,mod:{"with-border":p??A.withBorder},...A.getStyles("navbar",{className:i,classNames:n,styles:s,style:o}),...v,__vars:{"--app-shell-navbar-z-index":`calc(${b??A.zIndex} + 1)`}})});dS.classes=N0;dS.displayName="@mantine/core/AppShellNavbar";const Rte={},hS=Et((t,e)=>{var _;const r=Ye("AppShellHeader",Rte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,withBorder:p,zIndex:b,...v}=r,A=r1();return A.disabled?null:se.createElement(ft,{component:"header",ref:e,mod:{"with-border":p??A.withBorder},...A.getStyles("header",{className:cn({[TA.classNames.zeroRight]:A.offsetScrollbars},i),classNames:n,styles:s,style:o}),...v,__vars:{"--app-shell-header-z-index":(_=b??A.zIndex)==null?void 0:_.toString()}})});hS.classes=N0;hS.displayName="@mantine/core/AppShellHeader";const kte={},pS=Et((t,e)=>{var _;const r=Ye("AppShellFooter",kte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,withBorder:p,zIndex:b,...v}=r,A=r1();return A.disabled?null:se.createElement(ft,{component:"footer",ref:e,mod:{"with-border":p??A.withBorder},...A.getStyles("footer",{className:cn({[TA.classNames.zeroRight]:A.offsetScrollbars},i),classNames:n,styles:s,style:o}),...v,__vars:{"--app-shell-footer-z-index":(_=b??A.zIndex)==null?void 0:_.toString()}})});pS.classes=N0;pS.displayName="@mantine/core/AppShellFooter";const Bte={},mS=Et((t,e)=>{const r=Ye("AppShellAside",Bte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,withBorder:p,zIndex:b,...v}=r,A=r1();return A.disabled?null:se.createElement(ft,{component:"aside",ref:e,mod:{"with-border":p??A.withBorder},...A.getStyles("aside",{className:i,classNames:n,styles:s,style:o}),...v,__vars:{"--app-shell-aside-z-index":`calc(${b??A.zIndex} + 1)`}})});mS.classes=N0;mS.displayName="@mantine/core/AppShellAside";const Ote={},gS=Et((t,e)=>{const r=Ye("AppShellMain",Ote,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=r1();return se.createElement(ft,{component:"main",ref:e,...p.getStyles("main",{className:i,style:o,classNames:n,styles:s}),...d})});gS.classes=N0;gS.displayName="@mantine/core/AppShellMain";const Nte={},bS=zi((t,e)=>{const r=Ye("AppShellSection",Nte,t),{classNames:n,className:i,style:o,styles:s,vars:f,grow:d,...p}=r,b=r1();return se.createElement(ft,{ref:e,mod:{grow:d},...b.getStyles("section",{className:i,style:o,classNames:n,styles:s}),...p})});bS.classes=N0;bS.displayName="@mantine/core/AppShellSection";function Eb(t){return!(typeof t!="object"||t===null||Object.keys(t).length===1&&"base"in t)}function Ab(t){const e=typeof t=="object"&&t!==null&&typeof t.base<"u"&&Object.keys(t).length===1;return typeof t=="number"||typeof t=="string"||e}function Sb(t){return typeof t=="object"?t.base:t}function Lte({baseStyles:t,minMediaStyles:e,maxMediaStyles:r,aside:n,theme:i}){var d,p,b;const o=n==null?void 0:n.width,s="translateX(var(--app-shell-aside-width))",f="translateX(calc(var(--app-shell-aside-width) * -1))";if(n!=null&&n.breakpoint&&!((d=n==null?void 0:n.collapsed)!=null&&d.mobile)&&(r[n==null?void 0:n.breakpoint]=r[n==null?void 0:n.breakpoint]||{},r[n==null?void 0:n.breakpoint]["--app-shell-aside-width"]="100%",r[n==null?void 0:n.breakpoint]["--app-shell-aside-offset"]="0px"),Ab(o)){const v=Fe(Sb(o));t["--app-shell-aside-width"]=v,t["--app-shell-aside-offset"]=v}if(Eb(o)&&(typeof o.base<"u"&&(t["--app-shell-aside-width"]=Fe(o.base),t["--app-shell-aside-offset"]=Fe(o.base)),Cn(o).forEach(v=>{v!=="base"&&(e[v]=e[v]||{},e[v]["--app-shell-aside-width"]=Fe(o[v]),e[v]["--app-shell-aside-offset"]=Fe(o[v]))})),(p=n==null?void 0:n.collapsed)!=null&&p.desktop){const v=n.breakpoint;e[v]=e[v]||{},e[v]["--app-shell-aside-transform"]=s,e[v]["--app-shell-aside-transform-rtl"]=f,e[v]["--app-shell-aside-offset"]="0px !important"}if((b=n==null?void 0:n.collapsed)!=null&&b.mobile){const v=OA(n.breakpoint,i)-.1;r[v]=r[v]||{},r[v]["--app-shell-aside-width"]="100%",r[v]["--app-shell-aside-offset"]="0px",r[v]["--app-shell-aside-transform"]=s,r[v]["--app-shell-aside-transform-rtl"]=f}}function Dte({baseStyles:t,minMediaStyles:e,footer:r}){const n=r==null?void 0:r.height,i="translateY(var(--app-shell-footer-height))",o=(r==null?void 0:r.offset)??!0;if(Ab(n)){const s=Fe(Sb(n));t["--app-shell-footer-height"]=s,o&&(t["--app-shell-footer-offset"]=s)}Eb(n)&&(typeof n.base<"u"&&(t["--app-shell-footer-height"]=Fe(n.base),o&&(t["--app-shell-footer-offset"]=Fe(n.base))),Cn(n).forEach(s=>{s!=="base"&&(e[s]=e[s]||{},e[s]["--app-shell-footer-height"]=Fe(n[s]),o&&(e[s]["--app-shell-footer-offset"]=Fe(n[s])))})),r!=null&&r.collapsed&&(t["--app-shell-footer-transform"]=i,t["--app-shell-footer-offset"]="0px !important")}function Fte({baseStyles:t,minMediaStyles:e,header:r}){const n=r==null?void 0:r.height,i="translateY(calc(var(--app-shell-header-height) * -1))",o=(r==null?void 0:r.offset)??!0;if(Ab(n)){const s=Fe(Sb(n));t["--app-shell-header-height"]=s,o&&(t["--app-shell-header-offset"]=s)}Eb(n)&&(typeof n.base<"u"&&(t["--app-shell-header-height"]=Fe(n.base),o&&(t["--app-shell-header-offset"]=Fe(n.base))),Cn(n).forEach(s=>{s!=="base"&&(e[s]=e[s]||{},e[s]["--app-shell-header-height"]=Fe(n[s]),o&&(e[s]["--app-shell-header-offset"]=Fe(n[s])))})),r!=null&&r.collapsed&&(t["--app-shell-header-transform"]=i,t["--app-shell-header-offset"]="0px !important")}function $te({baseStyles:t,minMediaStyles:e,maxMediaStyles:r,navbar:n,theme:i}){var d,p,b;const o=n==null?void 0:n.width,s="translateX(calc(var(--app-shell-navbar-width) * -1))",f="translateX(var(--app-shell-navbar-width))";if(n!=null&&n.breakpoint&&!((d=n==null?void 0:n.collapsed)!=null&&d.mobile)&&(r[n==null?void 0:n.breakpoint]=r[n==null?void 0:n.breakpoint]||{},r[n==null?void 0:n.breakpoint]["--app-shell-navbar-width"]="100%",r[n==null?void 0:n.breakpoint]["--app-shell-navbar-offset"]="0px"),Ab(o)){const v=Fe(Sb(o));t["--app-shell-navbar-width"]=v,t["--app-shell-navbar-offset"]=v}if(Eb(o)&&(typeof o.base<"u"&&(t["--app-shell-navbar-width"]=Fe(o.base),t["--app-shell-navbar-offset"]=Fe(o.base)),Cn(o).forEach(v=>{v!=="base"&&(e[v]=e[v]||{},e[v]["--app-shell-navbar-width"]=Fe(o[v]),e[v]["--app-shell-navbar-offset"]=Fe(o[v]))})),(p=n==null?void 0:n.collapsed)!=null&&p.desktop){const v=n.breakpoint;e[v]=e[v]||{},e[v]["--app-shell-navbar-transform"]=s,e[v]["--app-shell-navbar-transform-rtl"]=f,e[v]["--app-shell-navbar-offset"]="0px !important"}if((b=n==null?void 0:n.collapsed)!=null&&b.mobile){const v=OA(n.breakpoint,i)-.1;r[v]=r[v]||{},r[v]["--app-shell-navbar-width"]="100%",r[v]["--app-shell-navbar-offset"]="0px",r[v]["--app-shell-navbar-transform"]=s,r[v]["--app-shell-navbar-transform-rtl"]=f}}function W3(t){return Number(t)===0?"0px":yb(t)}function Ute({padding:t,baseStyles:e,minMediaStyles:r}){Ab(t)&&(e["--app-shell-padding"]=W3(Sb(t))),Eb(t)&&(t.base&&(e["--app-shell-padding"]=W3(t.base)),Cn(t).forEach(n=>{n!=="base"&&(r[n]=r[n]||{},r[n]["--app-shell-padding"]=W3(t[n]))}))}function zte({navbar:t,header:e,footer:r,aside:n,padding:i,theme:o}){const s={},f={},d={};$te({baseStyles:d,minMediaStyles:s,maxMediaStyles:f,navbar:t,theme:o}),Lte({baseStyles:d,minMediaStyles:s,maxMediaStyles:f,aside:n,theme:o}),Fte({baseStyles:d,minMediaStyles:s,header:e}),Dte({baseStyles:d,minMediaStyles:s,footer:r}),Ute({baseStyles:d,minMediaStyles:s,padding:i});const p=ZC(Cn(s),o).map(A=>({query:`(min-width: ${z2(A.px)})`,styles:s[A.value]})),b=ZC(Cn(f),o).map(A=>({query:`(max-width: ${z2(A.px)})`,styles:f[A.value]})),v=[...p,...b];return{baseStyles:d,media:v}}function jte({navbar:t,header:e,aside:r,footer:n,padding:i}){const o=ta(),s=D5(),{media:f,baseStyles:d}=zte({navbar:t,header:e,footer:n,aside:r,padding:i,theme:o});return se.createElement(rD,{media:f,styles:d,selector:s.cssVariablesSelector})}function Hte({transitionDuration:t,disabled:e}){const[r,n]=Z.useState(!1),i=Z.useRef(),o=Z.useRef();return WL("resize",()=>{n(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>n(!1),200)}),Qp(()=>{n(!0),clearTimeout(o.current),o.current=window.setTimeout(()=>n(!1),t||0)},[e,t]),r}const qte={withBorder:!0,offsetScrollbars:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Ha("app")},Gte=(t,{transitionDuration:e,transitionTimingFunction:r})=>({root:{"--app-shell-transition-duration":`${e}ms`,"--app-shell-transition-timing-function":r}}),Ws=Et((t,e)=>{const r=Ye("AppShell",qte,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,navbar:p,withBorder:b,padding:v,transitionDuration:A,transitionTimingFunction:_,header:S,zIndex:P,layout:I,disabled:C,aside:T,footer:k,offsetScrollbars:O,...D}=r,U=Ht({name:"AppShell",classes:N0,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Gte}),V=Hte({disabled:C,transitionDuration:A});return se.createElement(Ite,{value:{getStyles:U,withBorder:b,zIndex:P,disabled:C,offsetScrollbars:O}},se.createElement(jte,{navbar:p,header:S,aside:T,footer:k,padding:v}),se.createElement(ft,{ref:e,...U("root"),mod:{resizing:V,layout:I,disabled:C},...D}))});Ws.classes=N0;Ws.displayName="@mantine/core/AppShell";Ws.Navbar=dS;Ws.Header=hS;Ws.Main=gS;Ws.Aside=mS;Ws.Footer=pS;Ws.Section=bS;function iF(t){return typeof t=="string"?{value:t,label:t}:typeof t=="number"?{value:t.toString(),label:t.toString()}:"group"in t?{group:t.group,items:t.items.map(e=>iF(e))}:t}function Vte(t){return t?t.map(iF):[]}function oF(t){return t.reduce((e,r)=>"group"in r?{...e,...oF(r.items)}:(e[r.value]=r,e),{})}var di={dropdown:"m-88b62a41",options:"m-b2821a6e",option:"m-92253aa5",search:"m-985517d8",empty:"m-2530cd1d",header:"m-858f94bd",footer:"m-82b967cb",group:"m-254f3e4f",groupLabel:"m-2bb2e9e5",chevron:"m-2943220b",optionsDropdownScrollArea:"m-71d052f9",optionsDropdownOption:"m-390b5f4",optionsDropdownCheckIcon:"m-8ee53fc2"};const Kte={error:null},Wte=(t,{size:e})=>({chevron:{"--combobox-chevron-size":zr(e,"combobox-chevron-size")}}),yS=Et((t,e)=>{const r=Ye("ComboboxChevron",Kte,t),{size:n,error:i,style:o,className:s,classNames:f,styles:d,unstyled:p,vars:b,...v}=r,A=Ht({name:"ComboboxChevron",classes:di,props:r,style:o,className:s,classNames:f,styles:d,unstyled:p,vars:b,varsResolver:Wte,rootSelector:"chevron"});return se.createElement(ft,{component:"svg",...v,...A("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i}],ref:e},se.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))});yS.classes=di;yS.displayName="@mantine/core/ComboboxChevron";function Jte(t,e,r){for(let n=t-1;n>=0;n-=1)if(!e[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=e.length-1;n>-1;n-=1)if(!e[n].hasAttribute("data-combobox-disabled"))return n}return t}function Zte(t,e,r){for(let n=t+1;n{f||(d(!0),i==null||i(h))},[d,i,f]),C=Z.useCallback((h="unknown")=>{f&&(d(!1),n==null||n(h))},[d,n,f]),T=Z.useCallback((h="unknown")=>{f?C(h):I(h)},[C,I,f]),k=Z.useCallback(()=>{const h=document.querySelector(`#${p.current} [data-combobox-selected]`);h==null||h.removeAttribute("data-combobox-selected"),h==null||h.removeAttribute("aria-selected")},[]),O=Z.useCallback(h=>{const m=document.getElementById(p.current),w=m==null?void 0:m.querySelectorAll("[data-combobox-option]");if(!w)return null;const E=h>=w.length?0:h<0?w.length-1:h;return b.current=E,w!=null&&w[E]&&!w[E].hasAttribute("data-combobox-disabled")?(k(),w[E].setAttribute("data-combobox-selected","true"),w[E].setAttribute("aria-selected","true"),w[E].scrollIntoView({block:"nearest",behavior:s}),w[E].id):null},[s,k]),D=Z.useCallback(()=>{const h=document.querySelector(`#${p.current} [data-combobox-active]`);if(h){const m=document.querySelectorAll(`#${p.current} [data-combobox-option]`),w=Array.from(m).findIndex(E=>E===h);return O(w)}return O(0)},[O]),U=Z.useCallback(()=>O(Zte(b.current,document.querySelectorAll(`#${p.current} [data-combobox-option]`),o)),[O,o]),V=Z.useCallback(()=>O(Jte(b.current,document.querySelectorAll(`#${p.current} [data-combobox-option]`),o)),[O,o]),Y=Z.useCallback(()=>O(Yte(document.querySelectorAll(`#${p.current} [data-combobox-option]`))),[O]),W=Z.useCallback((h="selected")=>{P.current=window.setTimeout(()=>{const m=document.querySelectorAll(`#${p.current} [data-combobox-option]`),w=Array.from(m).findIndex(E=>E.hasAttribute(`data-combobox-${h}`));b.current=w},0)},[]),ie=Z.useCallback(()=>{b.current=-1,k()},[k]),x=Z.useCallback(()=>{const h=document.querySelectorAll(`#${p.current} [data-combobox-option]`),m=h==null?void 0:h[b.current];m==null||m.click()},[]),a=Z.useCallback(h=>{p.current=h},[]),u=Z.useCallback(()=>{_.current=window.setTimeout(()=>v.current.focus(),0)},[]),l=Z.useCallback(()=>{S.current=window.setTimeout(()=>A.current.focus(),0)},[]);return Z.useEffect(()=>()=>{window.clearTimeout(_.current),window.clearTimeout(S.current),window.clearTimeout(P.current)},[]),{dropdownOpened:f,openDropdown:I,closeDropdown:C,toggleDropdown:T,selectedOptionIndex:b.current,selectOption:O,selectFirstOption:Y,selectActiveOption:D,selectNextOption:U,selectPreviousOption:V,resetSelectedOption:ie,updateSelectedOptionIndex:W,listId:p.current,setListId:a,clickSelectedOption:x,searchRef:v,focusSearchInput:u,targetRef:A,focusTarget:l}}const[Qte,ns]=vl("Combobox component was not found in tree");function vS({onKeyDown:t,withKeyboardNavigation:e,withAriaAttributes:r,withExpandedAttribute:n,targetType:i}){const o=ns(),[s,f]=Z.useState(null),d=b=>{t==null||t(b),!o.readOnly&&e&&(b.nativeEvent.code==="ArrowDown"&&(b.preventDefault(),o.store.dropdownOpened?f(o.store.selectNextOption()):(o.store.openDropdown("keyboard"),f(o.store.selectActiveOption()))),b.nativeEvent.code==="ArrowUp"&&(b.preventDefault(),o.store.dropdownOpened?f(o.store.selectPreviousOption()):(o.store.openDropdown("keyboard"),f(o.store.selectActiveOption()))),b.nativeEvent.code==="Enter"&&(o.store.dropdownOpened?(b.preventDefault(),o.store.clickSelectedOption()):i==="button"&&(b.preventDefault(),o.store.openDropdown("keyboard"))),b.nativeEvent.code==="Escape"&&o.store.closeDropdown("keyboard"),b.nativeEvent.code==="Space"&&i==="button"&&(b.preventDefault(),o.store.toggleDropdown("keyboard")))};return{...r?{"aria-haspopup":"listbox","aria-expanded":n&&!!(o.store.listId&&o.store.dropdownOpened)||void 0,"aria-controls":o.store.listId,"aria-activedescendant":o.store.dropdownOpened&&s||void 0,autoComplete:"off","data-expanded":o.store.dropdownOpened?!0:void 0}:{},onKeyDown:d}}const Xte={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1},aF=Et((t,e)=>{const{children:r,refProp:n,withKeyboardNavigation:i,withAriaAttributes:o,withExpandedAttribute:s,targetType:f,...d}=Ye("ComboboxTarget",Xte,t);if(!yl(r))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const p=ns(),b=vS({targetType:f,withAriaAttributes:o,withKeyboardNavigation:i,withExpandedAttribute:s,onKeyDown:r.props.onKeyDown}),v=Z.cloneElement(r,{...b,...d});return se.createElement(O0.Target,{ref:Ui(e,p.store.targetRef)},v)});aF.displayName="@mantine/core/ComboboxTarget";const ere={},wS=Et((t,e)=>{const{classNames:r,styles:n,className:i,style:o,hidden:s,...f}=Ye("ComboboxDropdown",ere,t),d=ns();return se.createElement(O0.Dropdown,{...f,ref:e,role:"presentation","data-hidden":s||void 0,...d.getStyles("dropdown",{className:i,style:o,classNames:r,styles:n})})});wS.classes=di;wS.displayName="@mantine/core/ComboboxDropdown";const tre={},xS=Et((t,e)=>{const r=Ye("ComboboxOptions",tre,t),{classNames:n,className:i,style:o,styles:s,id:f,onMouseDown:d,labelledBy:p,...b}=r,v=ns(),A=wl(f);return Z.useEffect(()=>{v.store.setListId(A)},[A]),se.createElement(ft,{ref:e,...v.getStyles("options",{className:i,style:o,classNames:n,styles:s}),...b,id:A,role:"listbox","aria-labelledby":p,onMouseDown:_=>{_.preventDefault(),d==null||d(_)}})});xS.classes=di;xS.displayName="@mantine/core/ComboboxOptions";const rre={},ES=Et((t,e)=>{const r=Ye("ComboboxOption",rre,t),{classNames:n,className:i,style:o,styles:s,vars:f,onClick:d,id:p,active:b,onMouseDown:v,onMouseOver:A,disabled:_,selected:S,...P}=r,I=ns(),C=Z.useId(),T=p||C;return se.createElement(ft,{...I.getStyles("option",{className:i,classNames:n,styles:s,style:o}),...P,ref:e,id:T,mod:["combobox-option",{"combobox-active":b,"combobox-disabled":_,"combobox-selected":S}],role:"option",onClick:k=>{var O;_?k.preventDefault():((O=I.onOptionSubmit)==null||O.call(I,r.value,r),d==null||d(k))},onMouseDown:k=>{k.preventDefault(),v==null||v(k)},onMouseOver:k=>{I.resetSelectionOnOptionHover&&I.store.resetSelectedOption(),A==null||A(k)}})});ES.classes=di;ES.displayName="@mantine/core/ComboboxOption";const nre={withAriaAttributes:!0,withKeyboardNavigation:!0},AS=Et((t,e)=>{const r=Ye("ComboboxSearch",nre,t),{classNames:n,styles:i,unstyled:o,vars:s,withAriaAttributes:f,onKeyDown:d,withKeyboardNavigation:p,size:b,...v}=r,A=ns(),_=A.getStyles("search"),S=vS({targetType:"input",withAriaAttributes:f,withKeyboardNavigation:p,withExpandedAttribute:!1,onKeyDown:d});return se.createElement(an,{ref:Ui(e,A.store.searchRef),classNames:[{input:_.className},n],styles:[{input:_.style},i],size:b||A.size,...S,...v,__staticSelector:"Combobox"})});AS.classes=di;AS.displayName="@mantine/core/ComboboxSearch";const ire={},SS=Et((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:s,...f}=Ye("ComboboxEmpty",ire,t),d=ns();return se.createElement(ft,{ref:e,...d.getStyles("empty",{className:n,classNames:r,styles:o,style:i}),...f})});SS.classes=di;SS.displayName="@mantine/core/ComboboxEmpty";const ore={},MS=Et((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:s,...f}=Ye("ComboboxFooter",ore,t),d=ns();return se.createElement(ft,{ref:e,...d.getStyles("footer",{className:n,classNames:r,style:i,styles:o}),...f})});MS.classes=di;MS.displayName="@mantine/core/ComboboxFooter";const sre={},_S=Et((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:s,...f}=Ye("ComboboxHeader",sre,t),d=ns();return se.createElement(ft,{ref:e,...d.getStyles("header",{className:n,classNames:r,style:i,styles:o}),...f})});_S.classes=di;_S.displayName="@mantine/core/ComboboxHeader";const are={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1},fF=Et((t,e)=>{const{children:r,refProp:n,withKeyboardNavigation:i,withAriaAttributes:o,withExpandedAttribute:s,targetType:f,...d}=Ye("ComboboxEventsTarget",are,t);if(!yl(r))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const p=ns(),b=vS({targetType:f,withAriaAttributes:o,withKeyboardNavigation:i,withExpandedAttribute:s,onKeyDown:r.props.onKeyDown});return Z.cloneElement(r,{...b,...d,[n]:Ui(e,p.store.targetRef,r==null?void 0:r.ref)})});fF.displayName="@mantine/core/ComboboxEventsTarget";const fre={refProp:"ref"},cF=Et((t,e)=>{const{children:r,refProp:n}=Ye("ComboboxDropdownTarget",fre,t);if(ns(),!yl(r))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return se.createElement(O0.Target,{ref:e,refProp:n},r)});cF.displayName="@mantine/core/ComboboxDropdownTarget";const cre={},PS=Et((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:s,children:f,label:d,...p}=Ye("ComboboxGroup",cre,t),b=ns();return se.createElement(ft,{ref:e,...b.getStyles("group",{className:n,classNames:r,style:i,styles:o}),...p},d&&se.createElement("div",{...b.getStyles("groupLabel",{classNames:r,styles:o})},d),f)});PS.classes=di;PS.displayName="@mantine/core/ComboboxGroup";const uF=Z.forwardRef(({size:t,onMouseDown:e,onClick:r,onClear:n,...i},o)=>se.createElement(Sl,{ref:o,size:t||"sm",variant:"transparent",tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:s=>{s.preventDefault(),e==null||e(s)},onClick:s=>{n(),r==null||r(s)}}));uF.displayName="@mantine/core/ComboboxClearButton";const ure={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},lre=(t,{size:e,dropdownPadding:r})=>({options:{"--combobox-option-fz":Fo(e),"--combobox-option-padding":zr(e,"combobox-option-padding")},dropdown:{"--combobox-padding":r===void 0?void 0:Fe(r),"--combobox-option-fz":Fo(e),"--combobox-option-padding":zr(e,"combobox-option-padding")}});function gr(t){const e=Ye("Combobox",ure,t),{classNames:r,styles:n,unstyled:i,children:o,store:s,vars:f,onOptionSubmit:d,size:p,dropdownPadding:b,resetSelectionOnOptionHover:v,__staticSelector:A,readOnly:_,...S}=e,P=sF(),I=s||P,C=Ht({name:A||"Combobox",classes:di,props:e,classNames:r,styles:n,unstyled:i,vars:f,varsResolver:lre});return se.createElement(Qte,{value:{getStyles:C,store:I,onOptionSubmit:d,size:p,resetSelectionOnOptionHover:v,readOnly:_}},se.createElement(O0,{opened:I.dropdownOpened,...S,onClose:I.closeDropdown,withRoles:!1,unstyled:i},o))}const dre=t=>t;gr.extend=dre;gr.classes=di;gr.displayName="@mantine/core/Combobox";gr.Target=aF;gr.Dropdown=wS;gr.Options=xS;gr.Option=ES;gr.Search=AS;gr.Empty=SS;gr.Chevron=yS;gr.Footer=MS;gr.Header=_S;gr.EventsTarget=fF;gr.DropdownTarget=cF;gr.Group=PS;gr.ClearButton=uF;function hre({size:t,style:e,...r}){const n=t!==void 0?{width:Fe(t),height:Fe(t),...e}:e;return se.createElement("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,"aria-hidden":!0,...r},se.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function hg(t){return"group"in t}function lF({options:t,search:e,limit:r}){const n=e.trim().toLowerCase(),i=[];for(let o=0;o0)return!1;return!0}function dF(t,e=new Set){if(Array.isArray(t))for(const r of t)if(hg(r))dF(r.items,e);else{if(typeof r.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof r.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof r.value}`);if(e.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);e.add(r.value)}}function J3(t,e){return Array.isArray(t)?t.includes(e):t===e}function hF({data:t,withCheckIcon:e,value:r,checkIconPosition:n,unstyled:i}){if(!hg(t)){const s=e&&J3(r,t.value)&&se.createElement(hre,{className:di.optionsDropdownCheckIcon});return se.createElement(gr.Option,{value:t.value,disabled:t.disabled,className:cn({[di.optionsDropdownOption]:!i}),"data-reverse":n==="right"||void 0,"data-checked":J3(r,t.value)||void 0,"aria-selected":J3(r,t.value)},n==="left"&&s,t.label,n==="right"&&s)}const o=t.items.map(s=>se.createElement(hF,{data:s,value:r,key:s.value,unstyled:i,withCheckIcon:e,checkIconPosition:n}));return se.createElement(gr.Group,{label:t.group},o)}function mre({data:t,hidden:e,hiddenWhenEmpty:r,filter:n,search:i,limit:o,maxDropdownHeight:s,withScrollArea:f=!0,filterOptions:d=!0,withCheckIcon:p=!1,value:b,checkIconPosition:v,nothingFoundMessage:A,unstyled:_,labelId:S}){dF(t);const I=typeof i=="string"?(n||lF)({options:t,search:d?i:"",limit:o??1/0}):t,C=pre(I),T=I.map(k=>se.createElement(hF,{data:k,key:hg(k)?k.group:k.value,withCheckIcon:p,value:b,checkIconPosition:v,unstyled:_}));return se.createElement(gr.Dropdown,{hidden:e||r&&C},se.createElement(gr.Options,{labelledBy:S},f?se.createElement(vb.Autosize,{mah:s??220,type:"scroll",scrollbarSize:"var(--_combobox-padding)",offsetScrollbars:"y",className:di.optionsDropdownScrollArea},T):T,C&&A&&se.createElement(gr.Empty,null,A)))}const pF=Z.createContext(null),gre=pF.Provider;function bre(){return{withinGroup:!!Z.useContext(pF)}}var Z5={root:"m-f85678b6",image:"m-11f8ac07",placeholder:"m-104cd71f",group:"m-11def92b"};const yre={},vre=(t,{spacing:e})=>({group:{"--ag-spacing":yb(e)}}),CS=Et((t,e)=>{const r=Ye("AvatarGroup",yre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,spacing:p,...b}=r,v=Ht({name:"AvatarGroup",classes:Z5,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:vre,rootSelector:"group"});return se.createElement(gre,{value:!0},se.createElement(ft,{ref:e,...v("group"),...b}))});CS.classes=Z5;CS.displayName="@mantine/core/AvatarGroup";function wre(t){return se.createElement("svg",{...t,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},se.createElement("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const xre={},Ere=(t,{size:e,radius:r,variant:n,gradient:i,color:o})=>{const s=t.variantColorResolver({color:o||"gray",theme:t,gradient:i,variant:n||"light"});return{root:{"--avatar-size":zr(e,"avatar-size"),"--avatar-radius":r===void 0?void 0:bi(r),"--avatar-bg":o||n?s.background:void 0,"--avatar-color":o||n?s.color:void 0,"--avatar-bd":o||n?s.border:void 0}}},Y5=zi((t,e)=>{const r=Ye("Avatar",xre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,src:p,alt:b,radius:v,color:A,gradient:_,imageProps:S,children:P,...I}=r,C=bre(),[T,k]=Z.useState(!p),O=Ht({name:"Avatar",props:r,classes:Z5,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Ere});return Z.useEffect(()=>k(!p),[p]),se.createElement(ft,{...O("root"),mod:{"within-group":C.withinGroup},ref:e,...I},T?se.createElement("span",{...O("placeholder"),title:b},P||se.createElement(wre,null)):se.createElement("img",{...S,...O("image"),src:p,alt:b,onError:D=>{var U;k(!0),(U=S==null?void 0:S.onError)==null||U.call(S,D)}}))});Y5.classes=Z5;Y5.displayName="@mantine/core/Avatar";Y5.Group=CS;var mF={root:"m-347db0ec","root--dot":"m-fbd81e3d",label:"m-5add502a",section:"m-91fdda9b"};const Are={},Sre=(t,{radius:e,color:r,gradient:n,variant:i,size:o})=>{const s=t.variantColorResolver({color:r||t.primaryColor,theme:t,gradient:n,variant:i||"filled"});return{root:{"--badge-height":zr(o,"badge-height"),"--badge-padding-x":zr(o,"badge-padding-x"),"--badge-fz":zr(o,"badge-fz"),"--badge-radius":e===void 0?void 0:bi(e),"--badge-bg":r||i?s.background:void 0,"--badge-color":r||i?s.color:void 0,"--badge-bd":r||i?s.border:void 0,"--badge-dot-color":i==="dot"?zf(r,t):void 0}}},IS=zi((t,e)=>{const r=Ye("Badge",Are,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,radius:p,color:b,gradient:v,leftSection:A,rightSection:_,children:S,variant:P,fullWidth:I,...C}=r,T=Ht({name:"Badge",props:r,classes:mF,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Sre});return se.createElement(ft,{variant:P,mod:{block:I},...T("root",{variant:P}),ref:e,...C},A&&se.createElement("span",{...T("section"),"data-position":"left"},A),se.createElement("span",{...T("label")},S),_&&se.createElement("span",{...T("section"),"data-position":"right"},_))});IS.classes=mF;IS.displayName="@mantine/core/Badge";var Q5={root:"m-77c9d27d",inner:"m-80f1301b",loader:"m-a25b86ee",label:"m-811560b9",section:"m-a74036a",group:"m-80d6d844"};const MI={orientation:"horizontal"},Mre=(t,{borderWidth:e})=>({group:{"--button-border-width":Fe(e)}}),TS=Et((t,e)=>{const r=Ye("ButtonGroup",MI,t),{className:n,style:i,classNames:o,styles:s,unstyled:f,orientation:d,vars:p,borderWidth:b,variant:v,...A}=Ye("ButtonGroup",MI,t),_=Ht({name:"ButtonGroup",props:r,classes:Q5,className:n,style:i,classNames:o,styles:s,unstyled:f,vars:p,varsResolver:Mre,rootSelector:"group"});return se.createElement(ft,{..._("group"),ref:e,variant:v,mod:{"data-orientation":d},role:"group",...A})});TS.classes=Q5;TS.displayName="@mantine/core/ButtonGroup";const _re={},Pre=(t,{radius:e,color:r,gradient:n,variant:i,size:o,justify:s})=>{const f=t.variantColorResolver({color:r||t.primaryColor,theme:t,gradient:n,variant:i||"filled"});return{root:{"--button-justify":s,"--button-height":zr(o,"button-height"),"--button-padding-x":zr(o,"button-padding-x"),"--button-fz":o!=null&&o.includes("compact")?Fo(o.replace("compact-","")):Fo(o),"--button-radius":e===void 0?void 0:bi(e),"--button-bg":r||i?f.background:void 0,"--button-hover":r||i?f.hover:void 0,"--button-color":r||i?f.color:void 0,"--button-bd":r||i?f.border:void 0,"--button-hover-color":r||i?f.hoverColor:void 0}}},io=zi((t,e)=>{const r=Ye("Button",_re,t),{style:n,vars:i,className:o,color:s,disabled:f,children:d,leftSection:p,rightSection:b,fullWidth:v,variant:A,radius:_,loading:S,loaderProps:P,gradient:I,classNames:C,styles:T,unstyled:k,"data-disabled":O,...D}=r,U=Ht({name:"Button",props:r,classes:Q5,className:o,style:n,classNames:C,styles:T,unstyled:k,vars:i,varsResolver:Pre}),V=!!p,Y=!!b;return se.createElement(wb,{ref:e,...U("root",{active:!f&&!S&&!O}),unstyled:k,variant:A,disabled:f||S,mod:{disabled:f||O,loading:S,block:v,"with-left-section":V,"with-right-section":Y},...D},se.createElement(ft,{component:"span",...U("loader"),"aria-hidden":!0},se.createElement(Al,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...P})),se.createElement("span",{...U("inner")},p&&se.createElement(ft,{component:"span",...U("section"),mod:{position:"left"}},p),se.createElement(ft,{component:"span",mod:{loading:S},...U("label")},d),b&&se.createElement(ft,{component:"span",...U("section"),mod:{position:"right"}},b)))});io.classes=Q5;io.displayName="@mantine/core/Button";io.Group=TS;const Cre={timeout:1e3};function RS(t){const{children:e,timeout:r,value:n,...i}=Ye("CopyButton",Cre,t),o=HY({timeout:r}),s=()=>o.copy(n);return se.createElement(se.Fragment,null,e({copy:s,copied:o.copied,...i}))}RS.displayName="@mantine/core/CopyButton";var gF={root:"m-e2125a27",closeButton:"m-5abab665"};const Ire={shadow:"md",p:"md",withBorder:!1,transitionProps:{transition:"pop-top-right",duration:200},position:{bottom:30,right:30}},Tre=(t,{size:e})=>({root:{"--dialog-size":zr(e,"dialog-size")}}),W2=Et((t,e)=>{const r=Ye("Dialog",Ire,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,zIndex:p,position:b,keepMounted:v,opened:A,transitionProps:_,withCloseButton:S,withinPortal:P,children:I,onClose:C,portalProps:T,...k}=r,O=Ht({name:"Dialog",classes:gF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Tre});return se.createElement(fS,{zIndex:p,position:b,ref:e,withinPortal:P,portalProps:T,unstyled:f},se.createElement(El,{keepMounted:v,mounted:A,..._},D=>se.createElement(Xp,{unstyled:f,...O("root",{style:D}),...k},S&&se.createElement(Sl,{onClick:C,unstyled:f,...O("closeButton")}),I)))});W2.classes=gF;W2.displayName="@mantine/core/Dialog";var bF={root:"m-3eebeb36",label:"m-9e365f20"};const Rre={orientation:"horizontal"},kre=(t,{color:e,variant:r,size:n})=>({root:{"--divider-color":e?zf(e,t):void 0,"--divider-border-style":r,"--divider-size":zr(n,"divider-size")}}),X5=Et((t,e)=>{const r=Ye("Divider",Rre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,color:p,orientation:b,label:v,labelPosition:A,..._}=r,S=Ht({name:"Divider",classes:bF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:kre});return se.createElement(ft,{ref:e,mod:{orientation:b,"with-label":!!v},...S("root"),..._,role:"separator"},v&&se.createElement(ft,{component:"span",mod:{position:A},...S("label")},v))});X5.classes=bF;X5.displayName="@mantine/core/Divider";var yF={root:"m-9e117634"};const Bre={},Ore=(t,{radius:e,fit:r})=>({root:{"--image-radius":e===void 0?void 0:bi(e),"--image-object-fit":r}}),kS=zi((t,e)=>{const r=Ye("Image",Bre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,onError:p,src:b,radius:v,fit:A,fallbackSrc:_,...S}=r,[P,I]=Z.useState(!b);Z.useEffect(()=>I(!b),[b]);const C=Ht({name:"Image",classes:yF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Ore});return P&&_?se.createElement(ft,{component:"img",src:_,...C("root"),onError:p,mod:"fallback",...S}):se.createElement(ft,{component:"img",ref:e,...C("root"),src:b,onError:T=>{p==null||p(T),I(!0)},...S})});kS.classes=yF;kS.displayName="@mantine/core/Image";var vF={root:"m-6e45937b",loader:"m-e8eb006c",overlay:"m-df587f17"};const _I={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:Ha("overlay")},Nre=(t,{zIndex:e})=>({root:{"--lo-z-index":e==null?void 0:e.toString()}}),BS=Et((t,e)=>{const r=Ye("LoadingOverlay",_I,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,transitionProps:p,loaderProps:b,overlayProps:v,visible:A,zIndex:_,...S}=r,P=ta(),I=Ht({name:"LoadingOverlay",classes:vF,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Nre}),C={..._I.overlayProps,...v};return se.createElement(El,{transition:"fade",...p,mounted:!!A},T=>se.createElement(ft,{...I("root",{style:T}),ref:e,...S},se.createElement(Al,{...I("loader"),unstyled:f,...b}),se.createElement(dg,{...C,...I("overlay"),"data-light":!0,unstyled:f,color:(v==null?void 0:v.color)||P.white}),se.createElement(dg,{...C,...I("overlay"),"data-dark":!0,unstyled:f,color:(v==null?void 0:v.color)||P.colors.dark[5]})))});BS.classes=vF;BS.displayName="@mantine/core/LoadingOverlay";const[Lre,n1]=vl("Modal component was not found in tree");var tc={root:"m-9df02822",content:"m-54c44539",inner:"m-1f958f16",header:"m-d0e2b9cd"};const Dre={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ha("modal"),transitionProps:{duration:200,transition:"pop"},yOffset:"5dvh"},Fre=(t,{radius:e,size:r,yOffset:n,xOffset:i})=>({root:{"--modal-radius":e===void 0?void 0:bi(e),"--modal-size":zr(r,"modal-size"),"--modal-y-offset":Fe(n),"--modal-x-offset":Fe(i)}}),ew=Et((t,e)=>{const r=Ye("ModalRoot",Dre,t),{classNames:n,className:i,style:o,styles:s,unstyled:f,vars:d,yOffset:p,scrollAreaComponent:b,radius:v,fullScreen:A,centered:_,xOffset:S,__staticSelector:P,...I}=r,C=Ht({name:P,classes:tc,props:r,className:i,style:o,classNames:n,styles:s,unstyled:f,vars:d,varsResolver:Fre});return se.createElement(Lre,{value:{yOffset:p,scrollAreaComponent:b,getStyles:C}},se.createElement(rte,{ref:e,...C("root"),"data-full-screen":A||void 0,"data-centered":_||void 0,unstyled:f,...I}))});ew.classes=tc;ew.displayName="@mantine/core/ModalRoot";const $re={},tw=Et((t,e)=>{const r=Ye("ModalBody",$re,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=n1();return se.createElement(JD,{ref:e,...p.getStyles("body",{classNames:n,style:o,styles:s,className:i}),...d})});tw.classes=tc;tw.displayName="@mantine/core/ModalBody";const Ure={},rw=Et((t,e)=>{const r=Ye("ModalCloseButton",Ure,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=n1();return se.createElement(ZD,{ref:e,...p.getStyles("close",{classNames:n,style:o,styles:s,className:i}),...d})});rw.classes=tc;rw.displayName="@mantine/core/ModalCloseButton";const zre={},nw=Et((t,e)=>{const r=Ye("ModalOverlay",zre,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=n1();return se.createElement(QD,{ref:e,...p.getStyles("overlay",{classNames:n,style:o,styles:s,className:i}),...d})});nw.classes=tc;nw.displayName="@mantine/core/ModalOverlay";const jre={},iw=Et((t,e)=>{const r=Ye("ModalContent",jre,t),{classNames:n,className:i,style:o,styles:s,vars:f,children:d,...p}=r,b=n1(),v=b.scrollAreaComponent||fte;return se.createElement(ite,{...b.getStyles("content",{className:i,style:o,styles:s,classNames:n}),innerProps:b.getStyles("inner",{className:i,style:o,styles:s,classNames:n}),ref:e,...p},se.createElement(v,{style:{maxHeight:`calc(100vh - (${Fe(b.yOffset)} * 2))`}},d))});iw.classes=tc;iw.displayName="@mantine/core/ModalContent";const Hre={},ow=Et((t,e)=>{const r=Ye("ModalTitle",Hre,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=n1();return se.createElement(XD,{ref:e,...p.getStyles("title",{classNames:n,style:o,styles:s,className:i}),...d})});ow.classes=tc;ow.displayName="@mantine/core/ModalTitle";const qre={},sw=Et((t,e)=>{const r=Ye("ModalHeader",qre,t),{classNames:n,className:i,style:o,styles:s,vars:f,...d}=r,p=n1();return se.createElement(YD,{ref:e,...p.getStyles("header",{classNames:n,style:o,styles:s,className:i}),...d})});sw.classes=tc;sw.displayName="@mantine/core/ModalHeader";const Gre={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ha("modal"),transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0},ra=Et((t,e)=>{const{title:r,withOverlay:n,overlayProps:i,withCloseButton:o,closeButtonProps:s,children:f,radius:d,...p}=Ye("Modal",Gre,t),b=!!r||o;return se.createElement(ew,{ref:e,radius:d,...p},n&&se.createElement(nw,{...i}),se.createElement(iw,{radius:d},b&&se.createElement(sw,null,r&&se.createElement(ow,null,r),o&&se.createElement(rw,{...s})),se.createElement(tw,null,f)))});ra.classes=tc;ra.displayName="@mantine/core/Modal";ra.Root=ew;ra.Overlay=nw;ra.Content=iw;ra.Body=tw;ra.Header=sw;ra.Title=ow;ra.CloseButton=rw;var wF={root:"m-a513464",icon:"m-a4ceffb",loader:"m-b0920b15",body:"m-a49ed24",title:"m-3feedf16",description:"m-3d733a3a",closeButton:"m-919a4d88"};const Vre={withCloseButton:!0},Kre=(t,{radius:e,color:r})=>({root:{"--notification-radius":e===void 0?void 0:bi(e),"--notification-color":r?zf(r,t):void 0}}),J2=Et((t,e)=>{const r=Ye("Notification",Vre,t),{className:n,color:i,radius:o,loading:s,withCloseButton:f,withBorder:d,title:p,icon:b,children:v,onClose:A,closeButtonProps:_,classNames:S,style:P,styles:I,unstyled:C,variant:T,vars:k,...O}=r,D=Ht({name:"Notification",classes:wF,props:r,className:n,style:P,classNames:S,styles:I,unstyled:C,vars:k,varsResolver:Kre});return se.createElement(ft,{...D("root"),mod:{"data-with-icon":!!b||s,"data-with-border":d},ref:e,variant:T,...O,role:"alert"},b&&!s&&se.createElement("div",{...D("icon")},b),s&&se.createElement(Al,{size:28,color:i,...D("loader")}),se.createElement("div",{...D("body")},p&&se.createElement("div",{...D("title")},p),se.createElement(ft,{...D("description"),mod:{"data-with-title":!!p}},v)),f&&se.createElement(Sl,{iconSize:16,color:"gray",..._,unstyled:C,onClick:A,...D("closeButton")}))});J2.classes=wF;J2.displayName="@mantine/core/Notification";const Wre={duration:100,transition:"fade"};function Jre(t,e){return{...Wre,...e,...t}}var aw={tooltip:"m-1b3c8819",arrow:"m-f898399f"};function Zre({offset:t,position:e}){const[r,n]=Z.useState(!1),i=Z.useRef(),{x:o,y:s,elements:f,refs:d,update:p,placement:b}=tS({placement:e,middleware:[ZA({crossAxis:!0,padding:5,rootBoundary:"document"})]}),v=b.includes("right")?t:e.includes("left")?t*-1:0,A=b.includes("bottom")?t:e.includes("top")?t*-1:0,_=Z.useCallback(({clientX:S,clientY:P})=>{d.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:S,y:P,left:S+v,top:P+A,right:S,bottom:P}}})},[f.reference]);return Z.useEffect(()=>{if(d.floating.current){const S=i.current;S.addEventListener("mousemove",_);const P=Rf(d.floating.current);return P.forEach(I=>{I.addEventListener("scroll",p)}),()=>{S.removeEventListener("mousemove",_),P.forEach(I=>{I.removeEventListener("scroll",p)})}}},[f.reference,d.floating.current,p,_,r]),{handleMouseMove:_,x:o,y:s,opened:r,setOpened:n,boundaryRef:i,floating:d.setFloating}}const Yre={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Ha("popover")},Qre=(t,{radius:e,color:r})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:bi(e),"--tooltip-bg":r?zf(r,t):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),OS=Et((t,e)=>{const r=Ye("TooltipFloating",Yre,t),{children:n,refProp:i,withinPortal:o,style:s,className:f,classNames:d,styles:p,unstyled:b,radius:v,color:A,label:_,offset:S,position:P,multiline:I,zIndex:C,disabled:T,variant:k,vars:O,portalProps:D,...U}=r,V=ta(),Y=Ht({name:"TooltipFloating",props:r,classes:aw,className:f,style:s,classNames:d,styles:p,unstyled:b,rootSelector:"tooltip",vars:O,varsResolver:Qre}),{handleMouseMove:W,x:ie,y:x,opened:a,boundaryRef:u,floating:l,setOpened:h}=Zre({offset:S,position:P});if(!yl(n))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const m=Ui(u,n.ref,e),w=y=>{var c,g;(g=(c=n.props).onMouseEnter)==null||g.call(c,y),W(y),h(!0)},E=y=>{var c,g;(g=(c=n.props).onMouseLeave)==null||g.call(c,y),h(!1)};return se.createElement(se.Fragment,null,se.createElement(t1,{...D,withinPortal:o},se.createElement(ft,{...U,...Y("tooltip",{style:{...nD(s,V),zIndex:C,display:!T&&a?"block":"none",top:(x&&Math.round(x))??"",left:(ie&&Math.round(ie))??""}}),variant:k,ref:l},_)),Z.cloneElement(n,{...n.props,[i]:m,onMouseEnter:w,onMouseLeave:E}))});OS.classes=aw;OS.displayName="@mantine/core/TooltipFloating";const xF=Z.createContext(!1),Xre=xF.Provider,ene=()=>Z.useContext(xF),tne={openDelay:0,closeDelay:0};function EF(t){const{openDelay:e,closeDelay:r,children:n}=Ye("TooltipGroup",tne,t);return se.createElement(Xre,{value:!0},se.createElement(lee,{delay:{open:e,close:r}},n))}EF.displayName="@mantine/core/TooltipGroup";function rne(t){var U,V,Y;const[e,r]=Z.useState(!1),i=typeof t.opened=="boolean"?t.opened:e,o=ene(),s=wl(),{delay:f,currentId:d,setCurrentId:p}=FD(),b=Z.useCallback(W=>{r(W),W&&p(s)},[p,s]),{x:v,y:A,context:_,refs:S,update:P,placement:I,middlewareData:{arrow:{x:C,y:T}={}}}=tS({placement:t.position,open:i,onOpenChange:b,middleware:[ED(t.offset),ZA({padding:8}),vD(),TD({element:t.arrowRef,padding:t.arrowOffset}),...t.inline?[xD()]:[]]}),{getReferenceProps:k,getFloatingProps:O}=Eee([uee(_,{enabled:(U=t.events)==null?void 0:U.hover,delay:o?f:{open:t.openDelay,close:t.closeDelay},mouseOnly:!((V=t.events)!=null&&V.touch)}),xee(_,{enabled:(Y=t.events)==null?void 0:Y.focus,keyboardOnly:!0}),Aee(_,{role:"tooltip"}),wee(_,{enabled:typeof t.opened>"u"}),dee(_,{id:s})]);UD({opened:i,position:t.position,positionDependencies:t.positionDependencies,floating:{refs:S,update:P}}),Xu(()=>{var W;(W=t.onPositionChange)==null||W.call(t,I)},[I]);const D=i&&d&&d!==s;return{x:v,y:A,arrowX:C,arrowY:T,reference:S.setReference,floating:S.setFloating,getFloatingProps:O,getReferenceProps:k,isGroupPhase:D,opened:i,placement:I}}const PI={position:"top",refProp:"ref",withinPortal:!0,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:Ha("popover"),positionDependencies:[]},nne=(t,{radius:e,color:r})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:bi(e),"--tooltip-bg":r?zf(r,t):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),Mb=Et((t,e)=>{const r=Ye("Tooltip",PI,t),{children:n,position:i,refProp:o,label:s,openDelay:f,closeDelay:d,onPositionChange:p,opened:b,withinPortal:v,radius:A,color:_,classNames:S,styles:P,unstyled:I,style:C,className:T,withArrow:k,arrowSize:O,arrowOffset:D,arrowRadius:U,arrowPosition:V,offset:Y,transitionProps:W,multiline:ie,events:x,zIndex:a,disabled:u,positionDependencies:l,onClick:h,onMouseEnter:m,onMouseLeave:w,inline:E,variant:y,keepMounted:c,vars:g,portalProps:M,...B}=Ye("Tooltip",PI,r),{dir:L}=F5(),R=Z.useRef(null),F=rne({position:$D(L,i),closeDelay:d,openDelay:f,onPositionChange:p,opened:b,events:x,arrowRef:R,arrowOffset:D,offset:typeof Y=="number"?Y+(k?O/2:0):Y,positionDependencies:[...l,n],inline:E}),z=Ht({name:"Tooltip",props:r,classes:aw,className:T,style:C,classNames:S,styles:P,unstyled:I,rootSelector:"tooltip",vars:g,varsResolver:nne});if(!yl(n))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const K=Ui(F.reference,n.ref,e),q=Jre(W,{duration:100,transition:"fade"});return se.createElement(se.Fragment,null,se.createElement(t1,{...M,withinPortal:v},se.createElement(El,{...q,keepMounted:c,mounted:!u&&!!F.opened,duration:F.isGroupPhase?10:q.duration},Q=>se.createElement(ft,{...B,variant:y,mod:{multiline:ie},...F.getFloatingProps({ref:F.floating,className:z("tooltip").className,style:{...z("tooltip").style,...Q,zIndex:a,top:F.y??0,left:F.x??0}})},s,se.createElement(rS,{ref:R,arrowX:F.arrowX,arrowY:F.arrowY,visible:k,position:F.placement,arrowSize:O,arrowOffset:D,arrowRadius:U,arrowPosition:V,...z("arrow")})))),Z.cloneElement(n,F.getReferenceProps({onClick:h,onMouseEnter:m,onMouseLeave:w,onMouseMove:r.onMouseMove,onPointerDown:r.onPointerDown,onPointerEnter:r.onPointerEnter,[o]:K,className:cn(T,n.props.className),...n.props})))});Mb.classes=aw;Mb.displayName="@mantine/core/Tooltip";Mb.Floating=OS;Mb.Group=EF;const ine={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},NS=Et((t,e)=>{const r=Ye("Select",ine,t),{classNames:n,styles:i,unstyled:o,vars:s,dropdownOpened:f,defaultDropdownOpened:d,onDropdownClose:p,onDropdownOpen:b,onFocus:v,onBlur:A,onClick:_,onChange:S,data:P,value:I,defaultValue:C,selectFirstOptionOnChange:T,onOptionSubmit:k,comboboxProps:O,readOnly:D,disabled:U,filter:V,limit:Y,withScrollArea:W,maxDropdownHeight:ie,size:x,searchable:a,rightSection:u,checkIconPosition:l,withCheckIcon:h,nothingFoundMessage:m,name:w,form:E,searchValue:y,defaultSearchValue:c,onSearchChange:g,allowDeselect:M,error:B,rightSectionPointerEvents:L,id:R,clearable:F,clearButtonProps:z,hiddenInputProps:K,...q}=r,Q=Z.useMemo(()=>Vte(P),[P]),G=Z.useMemo(()=>oF(Q),[Q]),H=wl(R),[ee,ue]=H2({value:I,defaultValue:C,finalValue:null,onChange:S}),fe=ee?G[ee]:void 0,[he,He]=H2({value:y,defaultValue:c,finalValue:fe?fe.label:"",onChange:g}),be=sF({opened:f,defaultOpened:d,onDropdownOpen:b,onDropdownClose:()=>{p==null||p(),be.resetSelectedOption()}}),{resolvedClassNames:oe,resolvedStyles:Xe}=AQ({props:r,styles:i,classNames:n});Z.useEffect(()=>{T&&be.selectFirstOption()},[T,ee]),Z.useEffect(()=>{I===null&&He(""),typeof I=="string"&&fe&&He(fe.label)},[I,fe]);const Ee=F&&!!ee&&!U&&!D&&se.createElement(gr.ClearButton,{size:x,...z,onClear:()=>{ue(null),He("")}});return se.createElement(se.Fragment,null,se.createElement(gr,{store:be,__staticSelector:"Select",classNames:oe,styles:Xe,unstyled:o,readOnly:D,onOptionSubmit:ye=>{k==null||k(ye);const it=M&&G[ye].value===ee?null:G[ye].value;ue(it),He(typeof it=="string"?G[ye].label:""),be.closeDropdown()},size:x,...O},se.createElement(gr.Target,{targetType:a?"input":"button"},se.createElement(J5,{id:H,ref:e,rightSection:u||Ee||se.createElement(gr.Chevron,{size:x,error:B,unstyled:o}),rightSectionPointerEvents:L||Ee?"all":"none",...q,size:x,__staticSelector:"Select",disabled:U,readOnly:D||!a,value:he,onChange:ye=>{He(ye.currentTarget.value),be.openDropdown(),T&&be.selectFirstOption()},onFocus:ye=>{a&&be.openDropdown(),v==null||v(ye)},onBlur:ye=>{var it;a&&be.closeDropdown(),He(ee!=null&&((it=G[ee])==null?void 0:it.label)||""),A==null||A(ye)},onClick:ye=>{a?be.openDropdown():be.toggleDropdown(),_==null||_(ye)},classNames:oe,styles:Xe,unstyled:o,pointer:!a,error:B})),se.createElement(mre,{data:Q,hidden:D||U,filter:V,search:he,limit:Y,hiddenWhenEmpty:!a||!m,withScrollArea:W,maxDropdownHeight:ie,filterOptions:a&&(fe==null?void 0:fe.label)!==he,value:ee,checkIconPosition:l,withCheckIcon:h,nothingFoundMessage:m,unstyled:o,labelId:`${H}-label`})),se.createElement("input",{type:"hidden",name:w,value:ee||"",form:E,disabled:U,...K}))});NS.classes={...J5.classes,...gr.classes};NS.displayName="@mantine/core/Select";const CI=t=>{let e;const r=new Set,n=(d,p)=>{const b=typeof d=="function"?d(e):d;if(!Object.is(b,e)){const v=e;e=p??(typeof b!="object"||b===null)?b:Object.assign({},e,b),r.forEach(A=>A(e,v))}},i=()=>e,f={setState:n,getState:i,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{r.clear()}};return e=t(n,i,f),f},one=t=>t?CI(t):CI;var AF={exports:{}},SF={},MF={exports:{}},_F={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -101,31 +101,31 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var fw=Z,gne=mne;function bne(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var yne=typeof Object.is=="function"?Object.is:bne,vne=gne.useSyncExternalStore,wne=fw.useRef,xne=fw.useEffect,Ene=fw.useMemo,Ane=fw.useDebugValue;SF.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var o=wne(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Ene(function(){function d(_){if(!p){if(p=!0,b=_,_=n(_),i!==void 0&&s.hasValue){var S=s.value;if(i(S,_))return v=S}return v=_}if(S=v,yne(b,_))return S;var P=n(_);return i!==void 0&&i(S,P)?S:(b=_,v=P)}var p=!1,b,v,A=r===void 0?null:r;return[function(){return d(e())},A===null?void 0:function(){return d(A())}]},[e,r,n,i]);var f=vne(t,o[0],o[1]);return xne(function(){s.hasValue=!0,s.value=f},[f]),Ane(f),f};AF.exports=SF;var Sne=AF.exports;const Mne=es(Sne),{useDebugValue:_ne}=se,{useSyncExternalStoreWithSelector:Pne}=Mne;function Cne(t,e=t.getState,r){const n=Pne(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return _ne(n),n}const II=t=>{const e=typeof t=="function"?one(t):t,r=(n,i)=>Cne(e,n,i);return Object.assign(r,e),r},Ine=t=>t?II(t):II;var Tne=t=>Ine(t);const LS=Tne(t=>({fetching:!1,accountDetails:{},authDetails:{},chainId:localStorage.getItem("chainId")?parseInt(localStorage.getItem("chainId")):84531,confirming:!1,confirmed:!1,claimDetails:{chainId:5},wallet:{},setChainId:e=>{t(r=>({...r,chainId:e}))},setClaimDetails:e=>{t(r=>({...r,claimDetails:e}))},setWallet:e=>{t(r=>({...r,wallet:e}))},setConfirming:e=>{t(r=>({...r,confirming:e}))},setConfirmed:e=>{t(r=>({...r,confirmed:e}))},setFetching:e=>{t(r=>({...r,fetching:e}))},setAccountDetails:e=>t(r=>({accountDetails:e})),setAuthDetails:e=>t(r=>({authDetails:e}))}));var Je={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Rn,r=bO,n=s=>s&&s.__esModule?s:{default:s},i=n(r),o=globalThis||void 0||self;Object.defineProperty(t,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(t,"process",{enumerable:!0,get:()=>i.default}),t.global=o})(Je);var vr="-ms-",Bm="-moz-",Qt="-webkit-",PF="comm",cw="rule",DS="decl",Rne="@import",CF="@keyframes",kne="@layer",Bne=Math.abs,FS=String.fromCharCode,$9=Object.assign;function One(t,e){return mn(t,0)^45?(((e<<2^mn(t,0))<<2^mn(t,1))<<2^mn(t,2))<<2^mn(t,3):0}function IF(t){return t.trim()}function ef(t,e){return(t=e.exec(t))?t[0]:t}function It(t,e,r){return t.replace(e,r)}function Ov(t,e){return t.indexOf(e)}function mn(t,e){return t.charCodeAt(e)|0}function sp(t,e,r){return t.slice(e,r)}function Ea(t){return t.length}function TF(t){return t.length}function dm(t,e){return e.push(t),t}function Nne(t,e){return t.map(e).join("")}function TI(t,e){return t.filter(function(r){return!ef(r,e)})}var uw=1,ap=1,RF=0,Vo=0,Qr=0,n1="";function lw(t,e,r,n,i,o,s,f){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:uw,column:ap,length:s,return:"",siblings:f}}function wc(t,e){return $9(lw("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function Kl(t){for(;t.root;)t=wc(t.root,{children:[t]});dm(t,t.siblings)}function Lne(){return Qr}function Dne(){return Qr=Vo>0?mn(n1,--Vo):0,ap--,Qr===10&&(ap=1,uw--),Qr}function Us(){return Qr=Vo2||U9(Qr)>3?"":" "}function zne(t,e){for(;--e&&Us()&&!(Qr<48||Qr>102||Qr>57&&Qr<65||Qr>70&&Qr<97););return dw(t,Nv()+(e<6&&Du()==32&&Us()==32))}function z9(t){for(;Us();)switch(Qr){case t:return Vo;case 34:case 39:t!==34&&t!==39&&z9(Qr);break;case 40:t===41&&z9(t);break;case 92:Us();break}return Vo}function jne(t,e){for(;Us()&&t+Qr!==47+10;)if(t+Qr===42+42&&Du()===47)break;return"/*"+dw(e,Vo-1)+"*"+FS(t===47?t:Us())}function Hne(t){for(;!U9(Du());)Us();return dw(t,Vo)}function qne(t){return $ne(Lv("",null,null,null,[""],t=Fne(t),0,[0],t))}function Lv(t,e,r,n,i,o,s,f,d){for(var p=0,b=0,v=s,A=0,_=0,S=0,P=1,I=1,C=1,T=0,O="",B=i,D=o,U=n,K=O;I;)switch(S=T,T=Us()){case 40:if(S!=108&&mn(K,v-1)==58){Ov(K+=It(Y3(T),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:K+=Y3(T);break;case 9:case 10:case 13:case 32:K+=Une(S);break;case 92:K+=zne(Nv()-1,7);continue;case 47:switch(Du()){case 42:case 47:dm(Gne(jne(Us(),Nv()),e,r,d),d);break;default:K+="/"}break;case 123*P:f[p++]=Ea(K)*C;case 125*P:case 59:case 0:switch(T){case 0:case 125:I=0;case 59+b:C==-1&&(K=It(K,/\f/g,"")),_>0&&Ea(K)-v&&dm(_>32?kI(K+";",n,r,v-1,d):kI(It(K," ","")+";",n,r,v-2,d),d);break;case 59:K+=";";default:if(dm(U=RI(K,e,r,p,b,i,f,O,B=[],D=[],v,o),o),T===123)if(b===0)Lv(K,e,U,U,B,o,v,f,D);else switch(A===99&&mn(K,3)===110?100:A){case 100:case 108:case 109:case 115:Lv(t,U,U,n&&dm(RI(t,U,U,0,0,i,f,O,i,B=[],v,D),D),i,D,v,f,n?B:D);break;default:Lv(K,U,U,U,[""],D,0,f,D)}}p=b=_=0,P=C=1,O=K="",v=s;break;case 58:v=1+Ea(K),_=S;default:if(P<1){if(T==123)--P;else if(T==125&&P++==0&&Dne()==125)continue}switch(K+=FS(T),T*P){case 38:C=b>0?1:(K+="\f",-1);break;case 44:f[p++]=(Ea(K)-1)*C,C=1;break;case 64:Du()===45&&(K+=Y3(Us())),A=Du(),b=v=Ea(O=K+=Hne(Nv())),T++;break;case 45:S===45&&Ea(K)==2&&(P=0)}}return o}function RI(t,e,r,n,i,o,s,f,d,p,b,v){for(var A=i-1,_=i===0?o:[""],S=TF(_),P=0,I=0,C=0;P0?_[T]+" "+O:It(O,/&\f/g,_[T])))&&(d[C++]=B);return lw(t,e,r,i===0?cw:f,d,p,b,v)}function Gne(t,e,r,n){return lw(t,e,r,PF,FS(Lne()),sp(t,2,-2),0,n)}function kI(t,e,r,n,i){return lw(t,e,r,DS,sp(t,0,n),sp(t,n+1,-1),n,i)}function kF(t,e,r){switch(One(t,e)){case 5103:return Qt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Qt+t+t;case 4789:return Bm+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Qt+t+Bm+t+vr+t+t;case 5936:switch(mn(t,e+11)){case 114:return Qt+t+vr+It(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Qt+t+vr+It(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Qt+t+vr+It(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return Qt+t+vr+t+t;case 6165:return Qt+t+vr+"flex-"+t+t;case 5187:return Qt+t+It(t,/(\w+).+(:[^]+)/,Qt+"box-$1$2"+vr+"flex-$1$2")+t;case 5443:return Qt+t+vr+"flex-item-"+It(t,/flex-|-self/g,"")+(ef(t,/flex-|baseline/)?"":vr+"grid-row-"+It(t,/flex-|-self/g,""))+t;case 4675:return Qt+t+vr+"flex-line-pack"+It(t,/align-content|flex-|-self/g,"")+t;case 5548:return Qt+t+vr+It(t,"shrink","negative")+t;case 5292:return Qt+t+vr+It(t,"basis","preferred-size")+t;case 6060:return Qt+"box-"+It(t,"-grow","")+Qt+t+vr+It(t,"grow","positive")+t;case 4554:return Qt+It(t,/([^-])(transform)/g,"$1"+Qt+"$2")+t;case 6187:return It(It(It(t,/(zoom-|grab)/,Qt+"$1"),/(image-set)/,Qt+"$1"),t,"")+t;case 5495:case 3959:return It(t,/(image-set\([^]*)/,Qt+"$1$`$1");case 4968:return It(It(t,/(.+:)(flex-)?(.*)/,Qt+"box-pack:$3"+vr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Qt+t+t;case 4200:if(!ef(t,/flex-|baseline/))return vr+"grid-column-align"+sp(t,e)+t;break;case 2592:case 3360:return vr+It(t,"template-","")+t;case 4384:case 3616:return r&&r.some(function(n,i){return e=i,ef(n.props,/grid-\w+-end/)})?~Ov(t+(r=r[e].value),"span")?t:vr+It(t,"-start","")+t+vr+"grid-row-span:"+(~Ov(r,"span")?ef(r,/\d+/):+ef(r,/\d+/)-+ef(t,/\d+/))+";":vr+It(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(n){return ef(n.props,/grid-\w+-start/)})?t:vr+It(It(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return It(t,/(.+)-inline(.+)/,Qt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ea(t)-1-e>6)switch(mn(t,e+1)){case 109:if(mn(t,e+4)!==45)break;case 102:return It(t,/(.+:)(.+)-([^]+)/,"$1"+Qt+"$2-$3$1"+Bm+(mn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Ov(t,"stretch")?kF(It(t,"stretch","fill-available"),e,r)+t:t}break;case 5152:case 5920:return It(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,i,o,s,f,d,p){return vr+i+":"+o+p+(s?vr+i+"-span:"+(f?d:+d-+o)+p:"")+t});case 4949:if(mn(t,e+6)===121)return It(t,":",":"+Qt)+t;break;case 6444:switch(mn(t,mn(t,14)===45?18:11)){case 120:return It(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Qt+(mn(t,14)===45?"inline-":"")+"box$3$1"+Qt+"$2$3$1"+vr+"$2box$3")+t;case 100:return It(t,":",":"+vr)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return It(t,"scroll-","scroll-snap-")+t}return t}function Z2(t,e){for(var r="",n=0;n-1&&!t.return)switch(t.type){case DS:t.return=kF(t.value,t.length,r);return;case CF:return Z2([wc(t,{value:It(t.value,"@","@"+Qt)})],n);case cw:if(t.length)return Nne(r=t.props,function(i){switch(ef(i,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Kl(wc(t,{props:[It(i,/:(read-\w+)/,":"+Bm+"$1")]})),Kl(wc(t,{props:[i]})),$9(t,{props:TI(r,n)});break;case"::placeholder":Kl(wc(t,{props:[It(i,/:(plac\w+)/,":"+Qt+"input-$1")]})),Kl(wc(t,{props:[It(i,/:(plac\w+)/,":"+Bm+"$1")]})),Kl(wc(t,{props:[It(i,/:(plac\w+)/,vr+"input-$1")]})),Kl(wc(t,{props:[i]})),$9(t,{props:TI(r,n)});break}return""})}}var Zne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},fp=typeof Je.process<"u"&&Je.process.env!==void 0&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||"data-styled",$S=typeof window<"u"&&"HTMLElement"in window,Yne=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof Je.process<"u"&&Je.process.env!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==""?{}.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&{}.REACT_APP_SC_DISABLE_SPEEDY:typeof Je.process<"u"&&Je.process.env!==void 0&&{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==""&&{}.SC_DISABLE_SPEEDY!=="false"&&{}.SC_DISABLE_SPEEDY),hw=Object.freeze([]),cp=Object.freeze({});function Qne(t,e,r){return r===void 0&&(r=cp),t.theme!==r.theme&&t.theme||e||r.theme}var BF=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Xne=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,eie=/(^-|-$)/g;function BI(t){return t.replace(Xne,"-").replace(eie,"")}var tie=/(a)(d)/gi,OI=function(t){return String.fromCharCode(t+(t>25?39:97))};function j9(t){var e,r="";for(e=Math.abs(t);e>52;e=e/52|0)r=OI(e%52)+r;return(OI(e%52)+r).replace(tie,"$1-$2")}var Q3,Sd=function(t,e){for(var r=e.length;r;)t=33*t^e.charCodeAt(--r);return t},OF=function(t){return Sd(5381,t)};function rie(t){return j9(OF(t)>>>0)}function nie(t){return t.displayName||t.name||"Component"}function X3(t){return typeof t=="string"&&!0}var NF=typeof Symbol=="function"&&Symbol.for,LF=NF?Symbol.for("react.memo"):60115,iie=NF?Symbol.for("react.forward_ref"):60112,oie={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},sie={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},DF={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},aie=((Q3={})[iie]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Q3[LF]=DF,Q3);function NI(t){return("type"in(e=t)&&e.type.$$typeof)===LF?DF:"$$typeof"in t?aie[t.$$typeof]:oie;var e}var fie=Object.defineProperty,cie=Object.getOwnPropertyNames,LI=Object.getOwnPropertySymbols,uie=Object.getOwnPropertyDescriptor,lie=Object.getPrototypeOf,DI=Object.prototype;function FF(t,e,r){if(typeof e!="string"){if(DI){var n=lie(e);n&&n!==DI&&FF(t,n,r)}var i=cie(e);LI&&(i=i.concat(LI(e)));for(var o=NI(t),s=NI(e),f=0;f0?" Args: ".concat(e.join(", ")):""))}var die=function(){function t(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return t.prototype.indexOfGroup=function(e){for(var r=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,i=n.length,o=i;e>=o;)if((o<<=1)<0)throw _b(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=i;s=this.length||this.groupSizes[e]===0)return r;for(var n=this.groupSizes[e],i=this.indexOfGroup(e),o=i+n,s=i;s{const e=typeof t=="function"?one(t):t,r=(n,i)=>Cne(e,n,i);return Object.assign(r,e),r},Ine=t=>t?II(t):II;var Tne=t=>Ine(t);const LS=Tne(t=>({fetching:!1,accountDetails:{},authDetails:{},chainId:localStorage.getItem("chainId")?parseInt(localStorage.getItem("chainId")):84531,confirming:!1,confirmed:!1,claimDetails:{chainId:5},wallet:{},setChainId:e=>{t(r=>({...r,chainId:e}))},setClaimDetails:e=>{t(r=>({...r,claimDetails:e}))},setWallet:e=>{t(r=>({...r,wallet:e}))},setConfirming:e=>{t(r=>({...r,confirming:e}))},setConfirmed:e=>{t(r=>({...r,confirmed:e}))},setFetching:e=>{t(r=>({...r,fetching:e}))},setAccountDetails:e=>t(r=>({accountDetails:e})),setAuthDetails:e=>t(r=>({authDetails:e}))}));var Je={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Rn,r=bO,n=s=>s&&s.__esModule?s:{default:s},i=n(r),o=globalThis||void 0||self;Object.defineProperty(t,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(t,"process",{enumerable:!0,get:()=>i.default}),t.global=o})(Je);var vr="-ms-",Om="-moz-",Qt="-webkit-",PF="comm",cw="rule",DS="decl",Rne="@import",CF="@keyframes",kne="@layer",Bne=Math.abs,FS=String.fromCharCode,$9=Object.assign;function One(t,e){return mn(t,0)^45?(((e<<2^mn(t,0))<<2^mn(t,1))<<2^mn(t,2))<<2^mn(t,3):0}function IF(t){return t.trim()}function ef(t,e){return(t=e.exec(t))?t[0]:t}function It(t,e,r){return t.replace(e,r)}function Ov(t,e){return t.indexOf(e)}function mn(t,e){return t.charCodeAt(e)|0}function sp(t,e,r){return t.slice(e,r)}function Ea(t){return t.length}function TF(t){return t.length}function hm(t,e){return e.push(t),t}function Nne(t,e){return t.map(e).join("")}function TI(t,e){return t.filter(function(r){return!ef(r,e)})}var uw=1,ap=1,RF=0,Vo=0,Qr=0,i1="";function lw(t,e,r,n,i,o,s,f){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:uw,column:ap,length:s,return:"",siblings:f}}function wc(t,e){return $9(lw("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function Kl(t){for(;t.root;)t=wc(t.root,{children:[t]});hm(t,t.siblings)}function Lne(){return Qr}function Dne(){return Qr=Vo>0?mn(i1,--Vo):0,ap--,Qr===10&&(ap=1,uw--),Qr}function Us(){return Qr=Vo2||U9(Qr)>3?"":" "}function zne(t,e){for(;--e&&Us()&&!(Qr<48||Qr>102||Qr>57&&Qr<65||Qr>70&&Qr<97););return dw(t,Nv()+(e<6&&Du()==32&&Us()==32))}function z9(t){for(;Us();)switch(Qr){case t:return Vo;case 34:case 39:t!==34&&t!==39&&z9(Qr);break;case 40:t===41&&z9(t);break;case 92:Us();break}return Vo}function jne(t,e){for(;Us()&&t+Qr!==47+10;)if(t+Qr===42+42&&Du()===47)break;return"/*"+dw(e,Vo-1)+"*"+FS(t===47?t:Us())}function Hne(t){for(;!U9(Du());)Us();return dw(t,Vo)}function qne(t){return $ne(Lv("",null,null,null,[""],t=Fne(t),0,[0],t))}function Lv(t,e,r,n,i,o,s,f,d){for(var p=0,b=0,v=s,A=0,_=0,S=0,P=1,I=1,C=1,T=0,k="",O=i,D=o,U=n,V=k;I;)switch(S=T,T=Us()){case 40:if(S!=108&&mn(V,v-1)==58){Ov(V+=It(Y3(T),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:V+=Y3(T);break;case 9:case 10:case 13:case 32:V+=Une(S);break;case 92:V+=zne(Nv()-1,7);continue;case 47:switch(Du()){case 42:case 47:hm(Gne(jne(Us(),Nv()),e,r,d),d);break;default:V+="/"}break;case 123*P:f[p++]=Ea(V)*C;case 125*P:case 59:case 0:switch(T){case 0:case 125:I=0;case 59+b:C==-1&&(V=It(V,/\f/g,"")),_>0&&Ea(V)-v&&hm(_>32?kI(V+";",n,r,v-1,d):kI(It(V," ","")+";",n,r,v-2,d),d);break;case 59:V+=";";default:if(hm(U=RI(V,e,r,p,b,i,f,k,O=[],D=[],v,o),o),T===123)if(b===0)Lv(V,e,U,U,O,o,v,f,D);else switch(A===99&&mn(V,3)===110?100:A){case 100:case 108:case 109:case 115:Lv(t,U,U,n&&hm(RI(t,U,U,0,0,i,f,k,i,O=[],v,D),D),i,D,v,f,n?O:D);break;default:Lv(V,U,U,U,[""],D,0,f,D)}}p=b=_=0,P=C=1,k=V="",v=s;break;case 58:v=1+Ea(V),_=S;default:if(P<1){if(T==123)--P;else if(T==125&&P++==0&&Dne()==125)continue}switch(V+=FS(T),T*P){case 38:C=b>0?1:(V+="\f",-1);break;case 44:f[p++]=(Ea(V)-1)*C,C=1;break;case 64:Du()===45&&(V+=Y3(Us())),A=Du(),b=v=Ea(k=V+=Hne(Nv())),T++;break;case 45:S===45&&Ea(V)==2&&(P=0)}}return o}function RI(t,e,r,n,i,o,s,f,d,p,b,v){for(var A=i-1,_=i===0?o:[""],S=TF(_),P=0,I=0,C=0;P0?_[T]+" "+k:It(k,/&\f/g,_[T])))&&(d[C++]=O);return lw(t,e,r,i===0?cw:f,d,p,b,v)}function Gne(t,e,r,n){return lw(t,e,r,PF,FS(Lne()),sp(t,2,-2),0,n)}function kI(t,e,r,n,i){return lw(t,e,r,DS,sp(t,0,n),sp(t,n+1,-1),n,i)}function kF(t,e,r){switch(One(t,e)){case 5103:return Qt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Qt+t+t;case 4789:return Om+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Qt+t+Om+t+vr+t+t;case 5936:switch(mn(t,e+11)){case 114:return Qt+t+vr+It(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Qt+t+vr+It(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Qt+t+vr+It(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return Qt+t+vr+t+t;case 6165:return Qt+t+vr+"flex-"+t+t;case 5187:return Qt+t+It(t,/(\w+).+(:[^]+)/,Qt+"box-$1$2"+vr+"flex-$1$2")+t;case 5443:return Qt+t+vr+"flex-item-"+It(t,/flex-|-self/g,"")+(ef(t,/flex-|baseline/)?"":vr+"grid-row-"+It(t,/flex-|-self/g,""))+t;case 4675:return Qt+t+vr+"flex-line-pack"+It(t,/align-content|flex-|-self/g,"")+t;case 5548:return Qt+t+vr+It(t,"shrink","negative")+t;case 5292:return Qt+t+vr+It(t,"basis","preferred-size")+t;case 6060:return Qt+"box-"+It(t,"-grow","")+Qt+t+vr+It(t,"grow","positive")+t;case 4554:return Qt+It(t,/([^-])(transform)/g,"$1"+Qt+"$2")+t;case 6187:return It(It(It(t,/(zoom-|grab)/,Qt+"$1"),/(image-set)/,Qt+"$1"),t,"")+t;case 5495:case 3959:return It(t,/(image-set\([^]*)/,Qt+"$1$`$1");case 4968:return It(It(t,/(.+:)(flex-)?(.*)/,Qt+"box-pack:$3"+vr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Qt+t+t;case 4200:if(!ef(t,/flex-|baseline/))return vr+"grid-column-align"+sp(t,e)+t;break;case 2592:case 3360:return vr+It(t,"template-","")+t;case 4384:case 3616:return r&&r.some(function(n,i){return e=i,ef(n.props,/grid-\w+-end/)})?~Ov(t+(r=r[e].value),"span")?t:vr+It(t,"-start","")+t+vr+"grid-row-span:"+(~Ov(r,"span")?ef(r,/\d+/):+ef(r,/\d+/)-+ef(t,/\d+/))+";":vr+It(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(n){return ef(n.props,/grid-\w+-start/)})?t:vr+It(It(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return It(t,/(.+)-inline(.+)/,Qt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ea(t)-1-e>6)switch(mn(t,e+1)){case 109:if(mn(t,e+4)!==45)break;case 102:return It(t,/(.+:)(.+)-([^]+)/,"$1"+Qt+"$2-$3$1"+Om+(mn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Ov(t,"stretch")?kF(It(t,"stretch","fill-available"),e,r)+t:t}break;case 5152:case 5920:return It(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,i,o,s,f,d,p){return vr+i+":"+o+p+(s?vr+i+"-span:"+(f?d:+d-+o)+p:"")+t});case 4949:if(mn(t,e+6)===121)return It(t,":",":"+Qt)+t;break;case 6444:switch(mn(t,mn(t,14)===45?18:11)){case 120:return It(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Qt+(mn(t,14)===45?"inline-":"")+"box$3$1"+Qt+"$2$3$1"+vr+"$2box$3")+t;case 100:return It(t,":",":"+vr)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return It(t,"scroll-","scroll-snap-")+t}return t}function Z2(t,e){for(var r="",n=0;n-1&&!t.return)switch(t.type){case DS:t.return=kF(t.value,t.length,r);return;case CF:return Z2([wc(t,{value:It(t.value,"@","@"+Qt)})],n);case cw:if(t.length)return Nne(r=t.props,function(i){switch(ef(i,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Kl(wc(t,{props:[It(i,/:(read-\w+)/,":"+Om+"$1")]})),Kl(wc(t,{props:[i]})),$9(t,{props:TI(r,n)});break;case"::placeholder":Kl(wc(t,{props:[It(i,/:(plac\w+)/,":"+Qt+"input-$1")]})),Kl(wc(t,{props:[It(i,/:(plac\w+)/,":"+Om+"$1")]})),Kl(wc(t,{props:[It(i,/:(plac\w+)/,vr+"input-$1")]})),Kl(wc(t,{props:[i]})),$9(t,{props:TI(r,n)});break}return""})}}var Zne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},fp=typeof Je.process<"u"&&Je.process.env!==void 0&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||"data-styled",$S=typeof window<"u"&&"HTMLElement"in window,Yne=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof Je.process<"u"&&Je.process.env!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==""?{}.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&{}.REACT_APP_SC_DISABLE_SPEEDY:typeof Je.process<"u"&&Je.process.env!==void 0&&{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==""&&{}.SC_DISABLE_SPEEDY!=="false"&&{}.SC_DISABLE_SPEEDY),hw=Object.freeze([]),cp=Object.freeze({});function Qne(t,e,r){return r===void 0&&(r=cp),t.theme!==r.theme&&t.theme||e||r.theme}var BF=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Xne=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,eie=/(^-|-$)/g;function BI(t){return t.replace(Xne,"-").replace(eie,"")}var tie=/(a)(d)/gi,OI=function(t){return String.fromCharCode(t+(t>25?39:97))};function j9(t){var e,r="";for(e=Math.abs(t);e>52;e=e/52|0)r=OI(e%52)+r;return(OI(e%52)+r).replace(tie,"$1-$2")}var Q3,Sd=function(t,e){for(var r=e.length;r;)t=33*t^e.charCodeAt(--r);return t},OF=function(t){return Sd(5381,t)};function rie(t){return j9(OF(t)>>>0)}function nie(t){return t.displayName||t.name||"Component"}function X3(t){return typeof t=="string"&&!0}var NF=typeof Symbol=="function"&&Symbol.for,LF=NF?Symbol.for("react.memo"):60115,iie=NF?Symbol.for("react.forward_ref"):60112,oie={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},sie={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},DF={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},aie=((Q3={})[iie]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Q3[LF]=DF,Q3);function NI(t){return("type"in(e=t)&&e.type.$$typeof)===LF?DF:"$$typeof"in t?aie[t.$$typeof]:oie;var e}var fie=Object.defineProperty,cie=Object.getOwnPropertyNames,LI=Object.getOwnPropertySymbols,uie=Object.getOwnPropertyDescriptor,lie=Object.getPrototypeOf,DI=Object.prototype;function FF(t,e,r){if(typeof e!="string"){if(DI){var n=lie(e);n&&n!==DI&&FF(t,n,r)}var i=cie(e);LI&&(i=i.concat(LI(e)));for(var o=NI(t),s=NI(e),f=0;f0?" Args: ".concat(e.join(", ")):""))}var die=function(){function t(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return t.prototype.indexOfGroup=function(e){for(var r=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,i=n.length,o=i;e>=o;)if((o<<=1)<0)throw _b(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=i;s=this.length||this.groupSizes[e]===0)return r;for(var n=this.groupSizes[e],i=this.indexOfGroup(e),o=i+n,s=i;s=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.prototype.getRule=function(e){return e0&&(I+="".concat(C,","))}),d+="".concat(S).concat(P,'{content:"').concat(I,'"}').concat(`/*!sc*/ -`)},b=0;b0?".".concat(e):A},b=d.slice();b.push(function(A){A.type===cw&&A.value.includes("&")&&(A.props[0]=A.props[0].replace(Aie,r).replace(n,p))}),s.prefix&&b.push(Jne),b.push(Vne);var v=function(A,_,S,P){_===void 0&&(_=""),S===void 0&&(S=""),P===void 0&&(P="&"),e=P,r=_,n=new RegExp("\\".concat(r,"\\b"),"g");var I=A.replace(Sie,""),C=qne(S||_?"".concat(S," ").concat(_," { ").concat(I," }"):I);s.namespace&&(C=zF(C,s.namespace));var T=[];return Z2(C,Kne(b.concat(Wne(function(O){return T.push(O)})))),T};return v.hash=d.length?d.reduce(function(A,_){return _.name||_b(15),Sd(A,_.name)},5381).toString():"",v}var _ie=new UF,q9=Mie(),jF=se.createContext({shouldForwardProp:void 0,styleSheet:_ie,stylis:q9});jF.Consumer;se.createContext(void 0);function UI(){return Z.useContext(jF)}var Pie=function(){function t(e,r){var n=this;this.inject=function(i,o){o===void 0&&(o=q9);var s=n.name+o.hash;i.hasNameForId(n.id,s)||i.insertRules(n.id,s,o(n.rules,s,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=r,zS(this,function(){throw _b(12,String(n.name))})}return t.prototype.getName=function(e){return e===void 0&&(e=q9),this.name+e.hash},t}(),Cie=function(t){return t>="A"&&t<="Z"};function zI(t){for(var e="",r=0;r>>0);if(!r.hasNameForId(this.componentId,s)){var f=n(o,".".concat(s),void 0,this.componentId);r.insertRules(this.componentId,s,f)}i=su(i,s),this.staticRulesId=s}else{for(var d=Sd(this.baseHash,n.hash),p="",b=0;b>>0);r.hasNameForId(this.componentId,_)||r.insertRules(this.componentId,_,n(p,".".concat(_),void 0,this.componentId)),i=su(i,_)}}return i},t}(),GF=se.createContext(void 0);GF.Consumer;var e8={};function kie(t,e,r){var n=US(t),i=t,o=!X3(t),s=e.attrs,f=s===void 0?hw:s,d=e.componentId,p=d===void 0?function(B,D){var U=typeof B!="string"?"sc":BI(B);e8[U]=(e8[U]||0)+1;var K="".concat(U,"-").concat(rie("6.1.1"+U+e8[U]));return D?"".concat(D,"-").concat(K):K}(e.displayName,e.parentComponentId):d,b=e.displayName,v=b===void 0?function(B){return X3(B)?"styled.".concat(B):"Styled(".concat(nie(B),")")}(t):b,A=e.displayName&&e.componentId?"".concat(BI(e.displayName),"-").concat(e.componentId):e.componentId||p,_=n&&i.attrs?i.attrs.concat(f).filter(Boolean):f,S=e.shouldForwardProp;if(n&&i.shouldForwardProp){var P=i.shouldForwardProp;if(e.shouldForwardProp){var I=e.shouldForwardProp;S=function(B,D){return P(B,D)&&I(B,D)}}else S=P}var C=new Rie(r,A,n?i.componentStyle:void 0);function T(B,D){return function(U,K,Y){var W=U.attrs,ie=U.componentStyle,x=U.defaultProps,a=U.foldedComponentIds,u=U.styledComponentId,l=U.target,h=se.useContext(GF),m=UI(),w=U.shouldForwardProp||m.shouldForwardProp,E=function(L,R,F){for(var z,V=Dr(Dr({},R),{className:void 0,theme:F}),q=0;q0?".".concat(e):A},b=d.slice();b.push(function(A){A.type===cw&&A.value.includes("&")&&(A.props[0]=A.props[0].replace(Aie,r).replace(n,p))}),s.prefix&&b.push(Jne),b.push(Vne);var v=function(A,_,S,P){_===void 0&&(_=""),S===void 0&&(S=""),P===void 0&&(P="&"),e=P,r=_,n=new RegExp("\\".concat(r,"\\b"),"g");var I=A.replace(Sie,""),C=qne(S||_?"".concat(S," ").concat(_," { ").concat(I," }"):I);s.namespace&&(C=zF(C,s.namespace));var T=[];return Z2(C,Kne(b.concat(Wne(function(k){return T.push(k)})))),T};return v.hash=d.length?d.reduce(function(A,_){return _.name||_b(15),Sd(A,_.name)},5381).toString():"",v}var _ie=new UF,q9=Mie(),jF=se.createContext({shouldForwardProp:void 0,styleSheet:_ie,stylis:q9});jF.Consumer;se.createContext(void 0);function UI(){return Z.useContext(jF)}var Pie=function(){function t(e,r){var n=this;this.inject=function(i,o){o===void 0&&(o=q9);var s=n.name+o.hash;i.hasNameForId(n.id,s)||i.insertRules(n.id,s,o(n.rules,s,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=r,zS(this,function(){throw _b(12,String(n.name))})}return t.prototype.getName=function(e){return e===void 0&&(e=q9),this.name+e.hash},t}(),Cie=function(t){return t>="A"&&t<="Z"};function zI(t){for(var e="",r=0;r>>0);if(!r.hasNameForId(this.componentId,s)){var f=n(o,".".concat(s),void 0,this.componentId);r.insertRules(this.componentId,s,f)}i=su(i,s),this.staticRulesId=s}else{for(var d=Sd(this.baseHash,n.hash),p="",b=0;b>>0);r.hasNameForId(this.componentId,_)||r.insertRules(this.componentId,_,n(p,".".concat(_),void 0,this.componentId)),i=su(i,_)}}return i},t}(),GF=se.createContext(void 0);GF.Consumer;var e8={};function kie(t,e,r){var n=US(t),i=t,o=!X3(t),s=e.attrs,f=s===void 0?hw:s,d=e.componentId,p=d===void 0?function(O,D){var U=typeof O!="string"?"sc":BI(O);e8[U]=(e8[U]||0)+1;var V="".concat(U,"-").concat(rie("6.1.1"+U+e8[U]));return D?"".concat(D,"-").concat(V):V}(e.displayName,e.parentComponentId):d,b=e.displayName,v=b===void 0?function(O){return X3(O)?"styled.".concat(O):"Styled(".concat(nie(O),")")}(t):b,A=e.displayName&&e.componentId?"".concat(BI(e.displayName),"-").concat(e.componentId):e.componentId||p,_=n&&i.attrs?i.attrs.concat(f).filter(Boolean):f,S=e.shouldForwardProp;if(n&&i.shouldForwardProp){var P=i.shouldForwardProp;if(e.shouldForwardProp){var I=e.shouldForwardProp;S=function(O,D){return P(O,D)&&I(O,D)}}else S=P}var C=new Rie(r,A,n?i.componentStyle:void 0);function T(O,D){return function(U,V,Y){var W=U.attrs,ie=U.componentStyle,x=U.defaultProps,a=U.foldedComponentIds,u=U.styledComponentId,l=U.target,h=se.useContext(GF),m=UI(),w=U.shouldForwardProp||m.shouldForwardProp,E=function(L,R,F){for(var z,K=Dr(Dr({},R),{className:void 0,theme:F}),q=0;q{const{children:e}=t;ta();const{confirming:r,confirmed:n}=LS(i=>i);return ze.jsxs(Oie,{children:[ze.jsx(W2,{position:{bottom:20,right:100},opened:r,withCloseButton:!0,size:"lg",radius:"md",style:{backgroundColor:"light-dark(var(--mantine-color-black),var(--mantine-color-white));"},children:ze.jsx(J2,{withBorder:!1,withCloseButton:!1,style:{margin:10,backgroundColor:"light-dark(var(--mantine-color-black),var(--mantine-color-white));"},loading:!0,title:"Confirming the transaction",children:"Waiting for the transaction to get confirmed"})}),ze.jsx(W2,{position:{bottom:20,right:100},opened:n,withCloseButton:!0,size:"lg",radius:"md",style:{backgroundColor:"light-dark(var(--mantine-color-black),var(--mantine-color-white));"},children:ze.jsx(J2,{withBorder:!1,withCloseButton:!1,style:{margin:10,backgroundColor:"light-dark(var(--mantine-color-black),var(--mantine-color-white));"},title:"Transaction confirmed!",children:"Transaction has been confirmed now"})}),e]})};function tl(){return tl=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(b[d]=s[d]);return b}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var Lie=["size","color","stroke"];function Die(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,Lie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-check",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("path",{d:"M5 12l5 5l10 -10"}))}var Fie=["size","color","stroke"];function $ie(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,Fie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-copy",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("rect",{x:8,y:8,width:12,height:12,rx:2}),Z.createElement("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"}))}var Uie=["size","color","stroke"];function zie(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,Uie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-gift",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("rect",{x:3,y:8,width:18,height:4,rx:1}),Z.createElement("line",{x1:12,y1:8,x2:12,y2:21}),Z.createElement("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),Z.createElement("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"}))}var jie=["size","color","stroke"];function Hie(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,jie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-moon-stars",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z"}),Z.createElement("path",{d:"M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),Z.createElement("path",{d:"M19 11h2m-1 -1v2"}))}var qie=["size","color","stroke"];function Gie(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,qie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-sun",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("circle",{cx:12,cy:12,r:4}),Z.createElement("path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7"}))}const Vie="/assets/logo-light-5ab92abc.svg",Kie="/assets/logo-dark-bcd9fcaf.svg",Wie="/assets/base-8a61917f.png",Jie="/assets/eth-dc2fb7da.svg",Zie="/assets/gno-7494440b.svg";var $u=(t=>(t.home="/",t.claim="/claim",t.account="/account",t.notFound="*",t))($u||{});const t8="05d830413c5a4ac8873c84319679c7b2",fc="H8IGZCCS8XCJYSXIA3GUUKW6CDECYYMNPG",Yie="GVZS4QAMWFBGS5PK2BR76FNFPJ7X2GR44I",Qie="",qI={localhost:{name:"Local Chain",chainId:31337,type:"Testnet",url:"http://localhost:8545",safeService:"",blockExplorer:"",api:"",easExplorer:""},mainnet:{name:"Ethereum",type:"Mainnet",chainId:1,url:`https://mainnet.infura.io/v3/${t8}`,safeService:"https://safe-transaction-mainnet.safe.global",blockExplorer:"https://etherscan.io",api:`https://api.etherscan.io/api?apikey=${fc}`,easExplorer:""},goerli:{name:"Goerli",type:"Testnet",chainId:5,url:`https://goerli.infura.io/v3/${t8}`,safeService:"https://safe-transaction-goerli.safe.global",blockExplorer:"https://goerli.etherscan.io",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:""},sepolia:{name:"Sepolia",type:"Testnet",chainId:11155111,url:"https://eth-sepolia.g.alchemy.com/v2/eCr9bFDzgYgDrox-mnXPPh7_koP-agKo",safeService:"https://safe-transaction-sepolia.safe.global",blockExplorer:"https://sepolia.etherscan.io",api:`https://api-sepolia.etherscan.io/api?apikey=${fc}`,easExplorer:""},basegoerli:{name:"Base",type:"Testnet",chainId:84531,url:"https://base-goerli.g.alchemy.com/v2/K1GZzIiF6-PthdjPtfzvTOMcej2zOWWA",blockExplorer:"https://goerli.basescan.org",safeService:"https://safe-transaction-base-testnet.safe.global",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:"https://base-goerli.easscan.org/attestation/view/"},base:{name:"Base",type:"Testnet",chainId:84531,url:"https://base-mainnet.g.alchemy.com/v2/NTGkSXMuKkoHwQ_W4eNpGlihUScplXYV",blockExplorer:"https://basescan.org",safeService:"https://safe-transaction-base.safe.global",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:""},basemain:{name:"Base",type:"Mainnet",chainId:8453,url:"https://base-mainnet.g.alchemy.com/v2/NTGkSXMuKkoHwQ_W4eNpGlihUScplXYV",blockExplorer:"https://basescan.org",safeService:"https://safe-transaction-base.safe.global",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:""},optimism:{name:"Optimism",type:"Mainnet",chainId:10,url:`https://optimism-mainnet.infura.io/v3/${t8}`,blockExplorer:"https://optimistic.etherscan.io",safeService:"https://safe-transaction-optimism.safe.global",api:`https://api-optimistic.etherscan.io/api?apikey=${fc}`,easExplorer:"https://optimism.easscan.org/attestation/view/"},gnosis:{name:"Gnosis",type:"Mainnet",chainId:100,url:"https://rpc.ankr.com/gnosis",safeService:"https://safe-transaction-gnosis-chain.safe.global",blockExplorer:"https://gnosisscan.io",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:""},polygontestnet:{name:"Polygon",type:"Testnet",chainId:80001,url:"https://matic-mumbai.chainstacklabs.com",safeService:"",blockExplorer:"https://mumbai.polygonscan.com",api:`https://api-testnet.polygonscan.com/api?module=account&action=balance&address=${Qie}&apikey=${Yie}`,easExplorer:""},polygon:{name:"Polygon",type:"Mainnet",chainId:137,url:"https://rpc.ankr.com/polygon",safeService:"https://safe-transaction-polygon.safe.global",blockExplorer:"https://polygonscan.com",api:"",easExplorer:""},celo:{name:"Celo",type:"Mainnet",chainId:42220,url:"https://1rpc.io/celo ",safeService:"https://safe-transaction-polygon.safe.global",blockExplorer:"https://celoscan.com",api:"",easExplorer:""}};class co{static getNetworkById(e){return Object.values(qI).find(n=>e===n.chainId)}static getNetworkByName(e){return qI[e]}}const Xie="6.7.1";function eoe(t,e,r){const n=e.split("|").map(o=>o.trim());for(let o=0;oPromise.resolve(t[n])))).reduce((n,i,o)=>(n[e[o]]=i,n),{})}function xt(t,e,r){for(let n in e){let i=e[n];const o=r?r[n]:null;o&&eoe(i,o,n),Object.defineProperty(t,n,{enumerable:!0,value:i,writable:!1})}}function Md(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(Md).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return Md(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${Md(r)}: ${Md(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function $o(t,e){return t&&t.code===e}function jS(t){return $o(t,"CALL_EXCEPTION")}function rn(t,e,r){{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${Md(r)}`);for(const o in r){const s=r[o];i.push(o+"="+Md(s))}}i.push(`code=${e}`),i.push(`version=${Xie}`),i.length&&(t+=" ("+i.join(", ")+")")}let n;switch(e){case"INVALID_ARGUMENT":n=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":n=new RangeError(t);break;default:n=new Error(t)}return xt(n,{code:e}),r&&Object.assign(n,r),n}function Ge(t,e,r,n){if(!t)throw rn(e,r,n)}function _e(t,e,r,n){Ge(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function WF(t,e,r){r==null&&(r=""),r&&(r=": "+r),Ge(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),Ge(t<=e,"too many arguemnts"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const toe=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"){const r=String.fromCharCode(233).normalize("NFD"),n=String.fromCharCode(101,769);if(r!==n)throw new Error("broken")}t.push(e)}catch{}return t},[]);function roe(t){Ge(toe.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function Cb(t,e,r){if(r==null&&(r=""),t!==e){let n=r,i="new";r&&(n+=".",i+=" "+r),Ge(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function JF(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x([0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let i=2;for(let o=0;o>4]+GI[i&15]}return r}function en(t){return"0x"+t.map(e=>dt(e).substring(2)).join("")}function Gd(t){return Tr(t,!0)?(t.length-2)/2:qt(t).length}function Br(t,e,r){const n=qt(t);return r!=null&&r>n.length&&Ge(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),dt(n.slice(e??0,r??n.length))}function ZF(t,e,r){const n=qt(t);Ge(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),r?i.set(n,e-n.length):i.set(n,0),dt(i)}function rl(t,e){return ZF(t,e,!0)}function ioe(t,e){return ZF(t,e,!1)}const pw=BigInt(0),Rs=BigInt(1),_d=9007199254740991;function Q2(t,e){const r=mw(t,"value"),n=BigInt(Tt(e,"width"));if(Ge(r>>n===pw,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Rs){const i=(Rs<=-_d&&t<=_d,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){_e(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}_e(!1,"invalid BigNumberish value",e||"value",t)}function mw(t,e){const r=pt(t,e);return Ge(r>=pw,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const VI="0123456789abcdef";function gw(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=VI[r>>4],e+=VI[r&15];return BigInt(e)}return pt(t)}function Tt(t,e){switch(typeof t){case"bigint":return _e(t>=-_d&&t<=_d,"overflow",e||"value",t),Number(t);case"number":return _e(Number.isInteger(t),"underflow",e||"value",t),_e(t>=-_d&&t<=_d,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Tt(BigInt(t),e)}catch(r){_e(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}_e(!1,"invalid numeric value",e||"value",t)}function ooe(t){return Tt(gw(t))}function y0(t,e){let n=mw(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const i=Tt(e,"width");for(Ge(i*2>=n.length,`value exceeds width (${i} bits)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length>6===2;s++)o++;return o}return t==="OVERRUN"?r.length-e-1:0}function loe(t,e,r,n,i){return t==="OVERLONG"?(_e(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),XF(t,e,r))}const doe=Object.freeze({error:uoe,ignore:XF,replace:loe});function hoe(t,e){e==null&&(e=doe.error);const r=qt(t,"bytes"),n=[];let i=0;for(;i>7)){n.push(o);continue}let s=null,f=null;if((o&224)===192)s=1,f=127;else if((o&240)===224)s=2,f=2047;else if((o&248)===240)s=3,f=65535;else{(o&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,r,n):i+=e("BAD_PREFIX",i-1,r,n);continue}if(i-1+s>=r.length){i+=e("OVERRUN",i-1,r,n);continue}let d=o&(1<<8-s-1)-1;for(let p=0;p1114111){i+=e("OUT_OF_RANGE",i-1-s,r,n,d);continue}if(d>=55296&&d<=57343){i+=e("UTF16_SURROGATE",i-1-s,r,n,d);continue}if(d<=f){i+=e("OVERLONG",i-1-s,r,n,d);continue}n.push(d)}}return n}function Bf(t,e){e!=null&&(roe(e),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const o=t.charCodeAt(n);_e(n>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return new Uint8Array(r)}function poe(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function HS(t,e){return poe(hoe(t,e))}async function moe(t,e){const r=t.url.split(":")[0].toLowerCase();Ge(r==="http"||r==="https",`unsupported protocol ${r}`,"UNSUPPORTED_OPERATION",{info:{protocol:r},operation:"request"}),Ge(r==="https"||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let n;if(e){const p=new AbortController;n=p.signal,e.addListener(()=>{p.abort()})}const i={method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:n},o=await fetch(t.url,i),s={};o.headers.forEach((p,b)=>{s[b.toLowerCase()]=p});const f=await o.arrayBuffer(),d=f==null?null:new Uint8Array(f);return{statusCode:o.status,statusMessage:o.statusText,headers:s,body:d}}const goe=12,boe=250;let WI=moe;const yoe=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),voe=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let r8=!1;async function e$(t,e){try{const r=t.match(yoe);if(!r)throw new Error("invalid data");return new a0(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?foe(r[3]):xoe(r[3]))}catch{return new a0(599,"BAD REQUEST (invalid data: URI)",{},null,new qf(t))}}function t$(t){async function e(r,n){try{const i=r.match(voe);if(!i)throw new Error("invalid link");return new qf(`${t}${i[2]}`)}catch{return new a0(599,"BAD REQUEST (invalid IPFS URI)",{},null,new qf(r))}}return e}const jy={data:e$,ipfs:t$("https://gateway.ipfs.io/ipfs/")},r$=new WeakMap;var mu,Bc;class woe{constructor(e){Ne(this,mu,void 0);Ne(this,Bc,void 0);ce(this,mu,[]),ce(this,Bc,!1),r$.set(e,()=>{if(!X(this,Bc)){ce(this,Bc,!0);for(const r of X(this,mu))setTimeout(()=>{r()},0);ce(this,mu,[])}})}addListener(e){Ge(!X(this,Bc),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),X(this,mu).push(e)}get cancelled(){return X(this,Bc)}checkSignal(){Ge(!this.cancelled,"cancelled","CANCELLED",{})}}mu=new WeakMap,Bc=new WeakMap;function Hy(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var ch,uh,xs,ff,lh,dh,dn,Ki,cf,gu,bu,yu,ma,uf,vu,hm;const c5=class c5{constructor(e){Ne(this,vu);Ne(this,ch,void 0);Ne(this,uh,void 0);Ne(this,xs,void 0);Ne(this,ff,void 0);Ne(this,lh,void 0);Ne(this,dh,void 0);Ne(this,dn,void 0);Ne(this,Ki,void 0);Ne(this,cf,void 0);Ne(this,gu,void 0);Ne(this,bu,void 0);Ne(this,yu,void 0);Ne(this,ma,void 0);Ne(this,uf,void 0);ce(this,dh,String(e)),ce(this,ch,!1),ce(this,uh,!0),ce(this,xs,{}),ce(this,ff,""),ce(this,lh,3e5),ce(this,uf,{slotInterval:boe,maxAttempts:goe})}get url(){return X(this,dh)}set url(e){ce(this,dh,String(e))}get body(){return X(this,dn)==null?null:new Uint8Array(X(this,dn))}set body(e){if(e==null)ce(this,dn,void 0),ce(this,Ki,void 0);else if(typeof e=="string")ce(this,dn,Bf(e)),ce(this,Ki,"text/plain");else if(e instanceof Uint8Array)ce(this,dn,e),ce(this,Ki,"application/octet-stream");else if(typeof e=="object")ce(this,dn,Bf(JSON.stringify(e))),ce(this,Ki,"application/json");else throw new Error("invalid body")}hasBody(){return X(this,dn)!=null}get method(){return X(this,ff)?X(this,ff):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),ce(this,ff,String(e).toUpperCase())}get headers(){const e=Object.assign({},X(this,xs));return X(this,cf)&&(e.authorization=`Basic ${coe(Bf(X(this,cf)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&X(this,Ki)&&(e["content-type"]=X(this,Ki)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){X(this,xs)[String(e).toLowerCase()]=String(r)}clearHeaders(){ce(this,xs,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),ce(this,lh,e)}get preflightFunc(){return X(this,gu)||null}set preflightFunc(e){ce(this,gu,e)}get processFunc(){return X(this,bu)||null}set processFunc(e){ce(this,bu,e)}get retryFunc(){return X(this,yu)||null}set retryFunc(e){ce(this,yu,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(X(this,uf).slotInterval=e.slotInterval),e.maxAttempts!=null&&(X(this,uf).maxAttempts=e.maxAttempts)}send(){return Ge(X(this,ma)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),ce(this,ma,new woe(this)),Ke(this,vu,hm).call(this,0,JI()+this.timeout,0,this,new a0(0,"",{},null,this))}cancel(){Ge(X(this,ma)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=r$.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();Ge(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new c5(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,ce(i,xs,Object.assign({},X(this,xs))),X(this,dn)&&ce(i,dn,new Uint8Array(X(this,dn))),ce(i,Ki,X(this,Ki)),i}clone(){const e=new c5(this.url);return ce(e,ff,X(this,ff)),X(this,dn)&&ce(e,dn,X(this,dn)),ce(e,Ki,X(this,Ki)),ce(e,xs,Object.assign({},X(this,xs))),ce(e,cf,X(this,cf)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),ce(e,gu,X(this,gu)),ce(e,bu,X(this,bu)),ce(e,yu,X(this,yu)),e}static lockConfig(){r8=!0}static getGateway(e){return jy[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(r8)throw new Error("gateways locked");jy[e]=r}static registerGetUrl(e){if(r8)throw new Error("gateways locked");WI=e}static createDataGateway(){return e$}static createIpfsGatewayFunc(e){return t$(e)}};ch=new WeakMap,uh=new WeakMap,xs=new WeakMap,ff=new WeakMap,lh=new WeakMap,dh=new WeakMap,dn=new WeakMap,Ki=new WeakMap,cf=new WeakMap,gu=new WeakMap,bu=new WeakMap,yu=new WeakMap,ma=new WeakMap,uf=new WeakMap,vu=new WeakSet,hm=async function(e,r,n,i,o){var b,v,A;if(e>=X(this,uf).maxAttempts)return o.makeServerError("exceeded maximum retry limit");Ge(JI()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await Eoe(n);let s=this.clone();const f=(s.url.split(":")[0]||"").toLowerCase();if(f in jy){const _=await jy[f](s.url,Hy(X(i,ma)));if(_ instanceof a0){let S=_;if(this.processFunc){Hy(X(i,ma));try{S=await this.processFunc(s,S)}catch(P){(P.throttle==null||typeof P.stall!="number")&&S.makeServerError("error in post-processing function",P).assertOk()}}return S}s=_}this.preflightFunc&&(s=await this.preflightFunc(s));const d=await WI(s,Hy(X(i,ma)));let p=new a0(d.statusCode,d.statusMessage,d.headers,d.body,i);if(p.statusCode===301||p.statusCode===302){try{const _=p.headers.location||"";return Ke(b=s.redirect(_),vu,hm).call(b,e+1,r,0,i,p)}catch{}return p}else if(p.statusCode===429&&(this.retryFunc==null||await this.retryFunc(s,p,e))){const _=p.headers["retry-after"];let S=X(this,uf).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof _=="string"&&_.match(/^[1-9][0-9]*$/)&&(S=parseInt(_)),Ke(v=s.clone(),vu,hm).call(v,e+1,r,S,i,p)}if(this.processFunc){Hy(X(i,ma));try{p=await this.processFunc(s,p)}catch(_){(_.throttle==null||typeof _.stall!="number")&&p.makeServerError("error in post-processing function",_).assertOk();let S=X(this,uf).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return _.stall>=0&&(S=_.stall),Ke(A=s.clone(),vu,hm).call(A,e+1,r,S,i,p)}}return p};let qf=c5;var qg,Gg,Vg,Es,hh,wu;const OP=class OP{constructor(e,r,n,i,o){Ne(this,qg,void 0);Ne(this,Gg,void 0);Ne(this,Vg,void 0);Ne(this,Es,void 0);Ne(this,hh,void 0);Ne(this,wu,void 0);ce(this,qg,e),ce(this,Gg,r),ce(this,Vg,Object.keys(n).reduce((s,f)=>(s[f.toLowerCase()]=String(n[f]),s),{})),ce(this,Es,i==null?null:new Uint8Array(i)),ce(this,hh,o||null),ce(this,wu,{message:""})}toString(){return``}get statusCode(){return X(this,qg)}get statusMessage(){return X(this,Gg)}get headers(){return Object.assign({},X(this,Vg))}get body(){return X(this,Es)==null?null:new Uint8Array(X(this,Es))}get bodyText(){try{return X(this,Es)==null?"":HS(X(this,Es))}catch{Ge(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{Ge(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw xt(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return X(this,Es)!=null}get request(){return X(this,hh)}ok(){return X(this,wu).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=X(this,wu);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`),Ge(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r})}};qg=new WeakMap,Gg=new WeakMap,Vg=new WeakMap,Es=new WeakMap,hh=new WeakMap,wu=new WeakMap;let a0=OP;function JI(){return new Date().getTime()}function xoe(t){return Bf(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function Eoe(t){return new Promise(e=>setTimeout(e,t))}const Aoe=BigInt(-1),ys=BigInt(0),Cd=BigInt(1),Soe=BigInt(5),Wl={};let Vd="0000";for(;Vd.length<80;)Vd+=Vd;function G0(t){let e=Vd;for(;e.length=-i&&tys?t=Q2(au(t,n),n):t=-Q2(au(-t,n),n)}else{const i=Cd<=0&&to[f]==null?p:(_e(typeof o[f]===d,"invalid fixed format ("+f+" not "+d+")","format."+f,o[f]),o[f]);e=s("signed","boolean",e),r=s("width","number",r),n=s("decimals","number",n)}_e(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),_e(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:i}}function Moe(t,e){let r="";t0?n*=G0(i):i<0&&(r*=G0(-i)),rn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=X(this,tr);return X(this,tr)ys&&(e+=X(this,ti)-Cd),e=X(this,tr)/X(this,ti)*X(this,ti),Ke(this,Ss,Qa).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=Soe*G0(r-1);let i=this.value+n;const o=G0(r);return i=i/o*o,$1(i,X(this,As),"round"),new Pc(Wl,i,X(this,As))}isZero(){return X(this,tr)===ys}isNegative(){return X(this,tr)0){const d=G0(f);Ge(s%d===ys,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),s/=d}else f<0&&(s*=G0(-f));return $1(s,o,"fromValue"),new Pc(Wl,s,o)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);_e(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=n8(r);let o=n[2]||"0",s=n[3]||"";for(;s.length{Ge(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const i=ZI(t,e+1,n);return r(e+1+n+i),YI(t,e,e+1+n,n+i)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),YI(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const i=ZI(t,e+1,n);r(e+1+n+i);const o=dt(t.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:o}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const i=dt(t.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:_oe(t[e])}}function qS(t){const e=qt(t,"data"),r=n$(e,0);return _e(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function QI(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function i$(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(o){n=n.concat(i$(o))}),n.length<=55)return n.unshift(192+n.length),n;const i=QI(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(qt(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=QI(e.length);return r.unshift(183+r.length),r.concat(e)}const XI="0123456789abcdef";function pg(t){let e="0x";for(const r of i$(t))e+=XI[r>>4],e+=XI[r&15];return e}const o$=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Poe(t,e){let r=18;if(typeof e=="string"){const n=o$.indexOf(e);_e(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Tt(e,"unit"));return X2.fromValue(t,r,{decimals:r,width:512}).toString()}function Coe(t,e){_e(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=o$.indexOf(e);_e(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Tt(e,"unit"));return X2.fromString(t,{decimals:r,width:512}).value}function Z9(t){return Poe(t,18)}function Ioe(t){return Coe(t,18)}const si=32,Y9=new Uint8Array(si),Toe=["then"],qy={};function U1(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}var Oc;const Gm=class Gm extends Array{constructor(...r){const n=r[0];let i=r[1],o=(r[2]||[]).slice(),s=!0;n!==qy&&(i=r,o=[],s=!1);super(i.length);Ne(this,Oc,void 0);i.forEach((d,p)=>{this[p]=d});const f=o.reduce((d,p)=>(typeof p=="string"&&d.set(p,(d.get(p)||0)+1),d),new Map);if(ce(this,Oc,Object.freeze(i.map((d,p)=>{const b=o[p];return b!=null&&f.get(b)===1?b:null}))),!!s)return Object.freeze(this),new Proxy(this,{get:(d,p,b)=>{if(typeof p=="string"){if(p.match(/^[0-9]+$/)){const A=Tt(p,"%index");if(A<0||A>=this.length)throw new RangeError("out of result range");const _=d[A];return _ instanceof Error&&U1(`index ${A}`,_),_}if(Toe.indexOf(p)>=0)return Reflect.get(d,p,b);const v=d[p];if(v instanceof Function)return function(...A){return v.apply(this===b?d:this,A)};if(!(p in d))return d.getValue.apply(this===b?d:this,[p])}return Reflect.get(d,p,b)}})}toArray(){const r=[];return this.forEach((n,i)=>{n instanceof Error&&U1(`index ${i}`,n),r.push(n)}),r}toObject(){return X(this,Oc).reduce((r,n,i)=>(Ge(n!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),n in r||(r[n]=this.getValue(n)),r),{})}slice(r,n){r==null&&(r=0),r<0&&(r+=this.length,r<0&&(r=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const i=[],o=[];for(let s=r;s{X(this,df)[e]=eT(r)}}}df=new WeakMap,xu=new WeakMap,ph=new WeakSet,$v=function(e){return X(this,df).push(e),ce(this,xu,X(this,xu)+e.length),e.length};var Wi,_o,u5,s$;const NP=class NP{constructor(e,r){Ne(this,u5);Oe(this,"allowLoose");Ne(this,Wi,void 0);Ne(this,_o,void 0);xt(this,{allowLoose:!!r}),ce(this,Wi,Ii(e)),ce(this,_o,0)}get data(){return dt(X(this,Wi))}get dataLength(){return X(this,Wi).length}get consumed(){return X(this,_o)}get bytes(){return new Uint8Array(X(this,Wi))}subReader(e){return new NP(X(this,Wi).slice(X(this,_o)+e),this.allowLoose)}readBytes(e,r){let n=Ke(this,u5,s$).call(this,0,e,!!r);return ce(this,_o,X(this,_o)+n.length),n.slice(0,e)}readValue(){return gw(this.readBytes(si))}readIndex(){return ooe(this.readBytes(si))}};Wi=new WeakMap,_o=new WeakMap,u5=new WeakSet,s$=function(e,r,n){let i=Math.ceil(r/si)*si;return X(this,_o)+i>X(this,Wi).length&&(this.allowLoose&&n&&X(this,_o)+r<=X(this,Wi).length?i=r:Ge(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Ii(X(this,Wi)),length:X(this,Wi).length,offset:X(this,_o)+i})),X(this,Wi).slice(X(this,_o),X(this,_o)+i)};let X9=NP;function e7(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function Roe(t){if(typeof t!="boolean")throw new Error(`Expected boolean, not ${t}`)}function a$(t,...e){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function koe(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");e7(t.outputLen),e7(t.blockLen)}function Boe(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Ooe(t,e){a$(t);const r=e.outputLen;if(t.lengthnew Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),i8=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),ua=(t,e)=>t<<32-e|t>>>e,Loe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Loe)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Doe(t){if(typeof t!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof t}`);return new TextEncoder().encode(t)}function Ib(t){if(typeof t=="string"&&(t=Doe(t)),!(t instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof t})`);return t}let t6=class{clone(){return this._cloneInto()}};function Tb(t){const e=n=>t().update(Ib(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Foe(t){const e=(n,i)=>t(i).update(Ib(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}let f$=class extends t6{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,eo.hash(e);const n=Ib(r);if(this.iHash=e.create(),!(this.iHash instanceof t6))throw new TypeError("Expected instance of class which extends utils.Hash");const i=this.blockLen=this.iHash.blockLen;this.outputLen=this.iHash.outputLen;const o=new Uint8Array(i);o.set(n.length>this.iHash.blockLen?e.create().update(n).digest():n);for(let s=0;snew f$(t,e).update(r).digest();c$.create=(t,e)=>new f$(t,e);function $oe(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),f=Number(r&o),d=n?4:0,p=n?0:4;t.setUint32(e+d,s,n),t.setUint32(e+p,f,n)}let u$=class extends t6{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=i8(this.buffer)}update(e){eo.exists(this);const{view:r,buffer:n,blockLen:i}=this;e=Ib(e);const o=e.length;for(let s=0;si-s&&(this.process(n,0),s=0);for(let d=s;df.setUint32(4*p,d,o))}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:o,destroyed:s,pos:f}=this;return e.length=i,e.pos=f,e.finished=o,e.destroyed=s,i%r&&e.buffer.set(n),e}};const Uoe=(t,e,r)=>t&e^~t&r,zoe=(t,e,r)=>t&e^t&r^e&r,joe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),cc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),uc=new Uint32Array(64);let Hoe=class extends u${constructor(){super(64,32,8,!1),this.A=cc[0]|0,this.B=cc[1]|0,this.C=cc[2]|0,this.D=cc[3]|0,this.E=cc[4]|0,this.F=cc[5]|0,this.G=cc[6]|0,this.H=cc[7]|0}get(){const{A:e,B:r,C:n,D:i,E:o,F:s,G:f,H:d}=this;return[e,r,n,i,o,s,f,d]}set(e,r,n,i,o,s,f,d){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=f|0,this.H=d|0}process(e,r){for(let v=0;v<16;v++,r+=4)uc[v]=e.getUint32(r,!1);for(let v=16;v<64;v++){const A=uc[v-15],_=uc[v-2],S=ua(A,7)^ua(A,18)^A>>>3,P=ua(_,17)^ua(_,19)^_>>>10;uc[v]=P+uc[v-7]+S+uc[v-16]|0}let{A:n,B:i,C:o,D:s,E:f,F:d,G:p,H:b}=this;for(let v=0;v<64;v++){const A=ua(f,6)^ua(f,11)^ua(f,25),_=b+A+Uoe(f,d,p)+joe[v]+uc[v]|0,P=(ua(n,2)^ua(n,13)^ua(n,22))+zoe(n,i,o)|0;b=p,p=d,d=f,f=s+_|0,s=o,o=i,i=n,n=_+P|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,f=f+this.E|0,d=d+this.F|0,p=p+this.G|0,b=b+this.H|0,this.set(n,i,o,s,f,d,p,b)}roundClean(){uc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const qoe=Tb(()=>new Hoe),Gy=BigInt(2**32-1),t7=BigInt(32);function l$(t,e=!1){return e?{h:Number(t&Gy),l:Number(t>>t7&Gy)}:{h:Number(t>>t7&Gy)|0,l:Number(t&Gy)|0}}function Goe(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;iBigInt(t>>>0)<>>0),Koe=(t,e,r)=>t>>>r,Woe=(t,e,r)=>t<<32-r|e>>>r,Joe=(t,e,r)=>t>>>r|e<<32-r,Zoe=(t,e,r)=>t<<32-r|e>>>r,Yoe=(t,e,r)=>t<<64-r|e>>>r-32,Qoe=(t,e,r)=>t>>>r-32|e<<64-r,Xoe=(t,e)=>e,ese=(t,e)=>t,tse=(t,e,r)=>t<>>32-r,rse=(t,e,r)=>e<>>32-r,nse=(t,e,r)=>e<>>64-r,ise=(t,e,r)=>t<>>64-r;function ose(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const sse=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),ase=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,fse=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),cse=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,use=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),lse=(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0,Mt={fromBig:l$,split:Goe,toBig:Voe,shrSH:Koe,shrSL:Woe,rotrSH:Joe,rotrSL:Zoe,rotrBH:Yoe,rotrBL:Qoe,rotr32H:Xoe,rotr32L:ese,rotlSH:tse,rotlSL:rse,rotlBH:nse,rotlBL:ise,add:ose,add3L:sse,add3H:ase,add4L:fse,add4H:cse,add5H:lse,add5L:use},[dse,hse]=Mt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),lc=new Uint32Array(80),dc=new Uint32Array(80);let GS=class extends u${constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:o,Cl:s,Dh:f,Dl:d,Eh:p,El:b,Fh:v,Fl:A,Gh:_,Gl:S,Hh:P,Hl:I}=this;return[e,r,n,i,o,s,f,d,p,b,v,A,_,S,P,I]}set(e,r,n,i,o,s,f,d,p,b,v,A,_,S,P,I){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=f|0,this.Dl=d|0,this.Eh=p|0,this.El=b|0,this.Fh=v|0,this.Fl=A|0,this.Gh=_|0,this.Gl=S|0,this.Hh=P|0,this.Hl=I|0}process(e,r){for(let O=0;O<16;O++,r+=4)lc[O]=e.getUint32(r),dc[O]=e.getUint32(r+=4);for(let O=16;O<80;O++){const B=lc[O-15]|0,D=dc[O-15]|0,U=Mt.rotrSH(B,D,1)^Mt.rotrSH(B,D,8)^Mt.shrSH(B,D,7),K=Mt.rotrSL(B,D,1)^Mt.rotrSL(B,D,8)^Mt.shrSL(B,D,7),Y=lc[O-2]|0,W=dc[O-2]|0,ie=Mt.rotrSH(Y,W,19)^Mt.rotrBH(Y,W,61)^Mt.shrSH(Y,W,6),x=Mt.rotrSL(Y,W,19)^Mt.rotrBL(Y,W,61)^Mt.shrSL(Y,W,6),a=Mt.add4L(K,x,dc[O-7],dc[O-16]),u=Mt.add4H(a,U,ie,lc[O-7],lc[O-16]);lc[O]=u|0,dc[O]=a|0}let{Ah:n,Al:i,Bh:o,Bl:s,Ch:f,Cl:d,Dh:p,Dl:b,Eh:v,El:A,Fh:_,Fl:S,Gh:P,Gl:I,Hh:C,Hl:T}=this;for(let O=0;O<80;O++){const B=Mt.rotrSH(v,A,14)^Mt.rotrSH(v,A,18)^Mt.rotrBH(v,A,41),D=Mt.rotrSL(v,A,14)^Mt.rotrSL(v,A,18)^Mt.rotrBL(v,A,41),U=v&_^~v&P,K=A&S^~A&I,Y=Mt.add5L(T,D,K,hse[O],dc[O]),W=Mt.add5H(Y,C,B,U,dse[O],lc[O]),ie=Y|0,x=Mt.rotrSH(n,i,28)^Mt.rotrBH(n,i,34)^Mt.rotrBH(n,i,39),a=Mt.rotrSL(n,i,28)^Mt.rotrBL(n,i,34)^Mt.rotrBL(n,i,39),u=n&o^n&f^o&f,l=i&s^i&d^s&d;C=P|0,T=I|0,P=_|0,I=S|0,_=v|0,S=A|0,{h:v,l:A}=Mt.add(p|0,b|0,W|0,ie|0),p=f|0,b=d|0,f=o|0,d=s|0,o=n|0,s=i|0;const h=Mt.add3L(ie,a,l);n=Mt.add3H(h,W,x,u),i=h|0}({h:n,l:i}=Mt.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:o,l:s}=Mt.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:f,l:d}=Mt.add(this.Ch|0,this.Cl|0,f|0,d|0),{h:p,l:b}=Mt.add(this.Dh|0,this.Dl|0,p|0,b|0),{h:v,l:A}=Mt.add(this.Eh|0,this.El|0,v|0,A|0),{h:_,l:S}=Mt.add(this.Fh|0,this.Fl|0,_|0,S|0),{h:P,l:I}=Mt.add(this.Gh|0,this.Gl|0,P|0,I|0),{h:C,l:T}=Mt.add(this.Hh|0,this.Hl|0,C|0,T|0),this.set(n,i,o,s,f,d,p,b,v,A,_,S,P,I,C,T)}roundClean(){lc.fill(0),dc.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};class pse extends GS{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}let mse=class extends GS{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}};const gse=Tb(()=>new GS);Tb(()=>new pse);Tb(()=>new mse);function bse(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Je.global<"u")return Je.global;throw new Error("unable to locate global object")}const tT=bse();tT.crypto||tT.msCrypto;function yse(t,e){const r={sha256:qoe,sha512:gse}[t];return _e(r!=null,"invalid hmac algorithm","algorithm",t),c$.create(r,e)}let d$=!1;const h$=function(t,e,r){return yse(t,e).update(r).digest()};let p$=h$;function Rb(t,e,r){const n=qt(e,"key"),i=qt(r,"data");return dt(p$(t,n,i))}Rb._=h$;Rb.lock=function(){d$=!0};Rb.register=function(t){if(d$)throw new Error("computeHmac is locked");p$=t};Object.freeze(Rb);const[m$,g$,b$]=[[],[],[]],vse=BigInt(0),z1=BigInt(1),wse=BigInt(2),xse=BigInt(7),Ese=BigInt(256),Ase=BigInt(113);for(let t=0,e=z1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],m$.push(2*(5*n+r)),g$.push((t+1)*(t+2)/2%64);let i=vse;for(let o=0;o<7;o++)e=(e<>xse)*Ase)%Ese,e&wse&&(i^=z1<<(z1<r>32?Mt.rotlBH(t,e,r):Mt.rotlSH(t,e,r),nT=(t,e,r)=>r>32?Mt.rotlBL(t,e,r):Mt.rotlSL(t,e,r);function _se(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let s=0;s<10;s++)r[s]=t[s]^t[s+10]^t[s+20]^t[s+30]^t[s+40];for(let s=0;s<10;s+=2){const f=(s+8)%10,d=(s+2)%10,p=r[d],b=r[d+1],v=rT(p,b,1)^r[f],A=nT(p,b,1)^r[f+1];for(let _=0;_<50;_+=10)t[s+_]^=v,t[s+_+1]^=A}let i=t[2],o=t[3];for(let s=0;s<24;s++){const f=g$[s],d=rT(i,o,f),p=nT(i,o,f),b=m$[s];i=t[b],o=t[b+1],t[b]=d,t[b+1]=p}for(let s=0;s<50;s+=10){for(let f=0;f<10;f++)r[f]=t[s+f];for(let f=0;f<10;f++)t[s+f]^=~r[(f+2)%10]&r[(f+4)%10]}t[0]^=Sse[n],t[1]^=Mse[n]}r.fill(0)}let y$=class v$ extends t6{constructor(e,r,n,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,eo.number(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Noe(this.state)}keccak(){_se(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){eo.exists(this);const{blockLen:r,state:n}=this;e=Ib(e);const i=e.length;for(let o=0;o=n&&this.keccak();const s=Math.min(n-this.posOut,o-i);e.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return eo.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(eo.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return e||(e=new v$(r,n,i,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=i,e.enableXOF=s,e.destroyed=this.destroyed,e}};const L0=(t,e,r)=>Tb(()=>new y$(e,t,r));L0(6,144,224/8);L0(6,136,256/8);L0(6,104,384/8);L0(6,72,512/8);L0(1,144,224/8);const Pse=L0(1,136,256/8);L0(1,104,384/8);L0(1,72,512/8);const w$=(t,e,r)=>Foe((n={})=>new y$(e,t,n.dkLen===void 0?r:n.dkLen,!0));w$(31,168,128/8);w$(31,136,256/8);let x$=!1;const E$=function(t){return Pse(t)};let A$=E$;function Ir(t){const e=qt(t,"data");return dt(A$(e))}Ir._=E$;Ir.lock=function(){x$=!0};Ir.register=function(t){if(x$)throw new TypeError("keccak256 is locked");A$=t};Object.freeze(Ir);var Ct={},r7={exports:{}},n7={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(t,e){var r=Rn,n=r.Buffer;function i(s,f){for(var d in s)f[d]=s[d]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=o);function o(s,f,d){return n(s,f,d)}o.prototype=Object.create(n.prototype),i(n,o),o.from=function(s,f,d){if(typeof s=="number")throw new TypeError("Argument must not be a number");return n(s,f,d)},o.alloc=function(s,f,d){if(typeof s!="number")throw new TypeError("Argument must be a number");var p=n(s);return f!==void 0?typeof d=="string"?p.fill(f,d):p.fill(f):p.fill(0),p},o.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n(s)},o.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(s)}})(n7,n7.exports);var Bt=n7.exports,o8=65536,Cse=4294967295;function Ise(){throw new Error(`Secure random number generation is not supported by this browser. -Use Chrome, Firefox or Internet Explorer 11`)}var Tse=Bt.Buffer,r6=et.crypto||et.msCrypto;r6&&r6.getRandomValues?r7.exports=Rse:r7.exports=Ise;function Rse(t,e){if(t>Cse)throw new RangeError("requested too many random bytes");var r=Tse.allocUnsafe(t);if(t>0)if(t>o8)for(var n=0;n0&&(s=r[0]),s instanceof Error)throw s;var f=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw f.context=s,f}var d=o[e];if(d===void 0)return!1;if(typeof d=="function")iT(d,this,r);else for(var p=d.length,b=T$(d,p),n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,kse(f)}return t}nr.prototype.addListener=function(e,r){return _$(this,e,r,!1)};nr.prototype.on=nr.prototype.addListener;nr.prototype.prependListener=function(e,r){return _$(this,e,r,!0)};function Bse(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function P$(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=Bse.bind(n);return i.listener=r,n.wrapFn=i,i}nr.prototype.once=function(e,r){return bw(r),this.on(e,P$(this,e,r)),this};nr.prototype.prependOnceListener=function(e,r){return bw(r),this.prependListener(e,P$(this,e,r)),this};nr.prototype.removeListener=function(e,r){var n,i,o,s,f;if(bw(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(o=-1,s=n.length-1;s>=0;s--)if(n[s]===r||n[s].listener===r){f=n[s].listener,o=s;break}if(o<0)return this;o===0?n.shift():Ose(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,f||r)}return this};nr.prototype.off=nr.prototype.removeListener;nr.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),s;for(i=0;i=0;i--)this.removeListener(e,r[i]);return this};function C$(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Nse(i):T$(i,i.length)}nr.prototype.listeners=function(e){return C$(this,e,!0)};nr.prototype.rawListeners=function(e){return C$(this,e,!1)};nr.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):I$.call(t,e)};nr.prototype.listenerCount=I$;function I$(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}nr.prototype.eventNames=function(){return this._eventsCount>0?Uv(this._events):[]};function T$(t,e){for(var r=new Array(e),n=0;n"u"||!hn?Lt:hn(Uint8Array),zu={"%AggregateError%":typeof AggregateError>"u"?Lt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Lt:ArrayBuffer,"%ArrayIteratorPrototype%":Jl&&hn?hn([][Symbol.iterator]()):Lt,"%AsyncFromSyncIteratorPrototype%":Lt,"%AsyncFunction%":sd,"%AsyncGenerator%":sd,"%AsyncGeneratorFunction%":sd,"%AsyncIteratorPrototype%":sd,"%Atomics%":typeof Atomics>"u"?Lt:Atomics,"%BigInt%":typeof BigInt>"u"?Lt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Lt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Lt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Lt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Lt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Lt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Lt:FinalizationRegistry,"%Function%":N$,"%GeneratorFunction%":sd,"%Int8Array%":typeof Int8Array>"u"?Lt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Lt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Lt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Jl&&hn?hn(hn([][Symbol.iterator]())):Lt,"%JSON%":typeof JSON=="object"?JSON:Lt,"%Map%":typeof Map>"u"?Lt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Jl||!hn?Lt:hn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Lt:Promise,"%Proxy%":typeof Proxy>"u"?Lt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Lt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Lt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Jl||!hn?Lt:hn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Lt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Jl&&hn?hn(""[Symbol.iterator]()):Lt,"%Symbol%":Jl?Symbol:Lt,"%SyntaxError%":lp,"%ThrowTypeError%":Zse,"%TypedArray%":Qse,"%TypeError%":Wd,"%Uint8Array%":typeof Uint8Array>"u"?Lt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Lt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Lt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Lt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Lt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Lt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Lt:WeakSet};if(hn)try{null.error}catch(t){var Xse=hn(hn(t));zu["%Error.prototype%"]=Xse}var eae=function t(e){var r;if(e==="%AsyncFunction%")r=a8("async function () {}");else if(e==="%GeneratorFunction%")r=a8("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=a8("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&hn&&(r=hn(i.prototype))}return zu[e]=r,r},fT={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},kb=JS,n6=Jse,tae=kb.call(Function.call,Array.prototype.concat),rae=kb.call(Function.apply,Array.prototype.splice),cT=kb.call(Function.call,String.prototype.replace),i6=kb.call(Function.call,String.prototype.slice),nae=kb.call(Function.call,RegExp.prototype.exec),iae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oae=/\\(\\)?/g,sae=function(e){var r=i6(e,0,1),n=i6(e,-1);if(r==="%"&&n!=="%")throw new lp("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new lp("invalid intrinsic syntax, expected opening `%`");var i=[];return cT(e,iae,function(o,s,f,d){i[i.length]=f?cT(d,oae,"$1"):s||o}),i},aae=function(e,r){var n=e,i;if(n6(fT,n)&&(i=fT[n],n="%"+i[0]+"%"),n6(zu,n)){var o=zu[n];if(o===sd&&(o=eae(n)),typeof o>"u"&&!r)throw new Wd("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new lp("intrinsic "+e+" does not exist!")},D0=function(e,r){if(typeof e!="string"||e.length===0)throw new Wd("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Wd('"allowMissing" argument must be a boolean');if(nae(/^%?[^%]*%?$/,e)===null)throw new lp("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=sae(e),i=n.length>0?n[0]:"",o=aae("%"+i+"%",r),s=o.name,f=o.value,d=!1,p=o.alias;p&&(i=p[0],rae(n,tae([0,1],p)));for(var b=1,v=!0;b=n.length){var P=Uu(f,A);v=!!P,v&&"get"in P&&!("originalValue"in P.get)?f=P.get:f=f[A]}else v=n6(f,A),f=f[A];v&&!d&&(zu[s]=f)}}return f},L$={exports:{}};(function(t){var e=JS,r=D0,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),o=r("%Reflect.apply%",!0)||e.call(i,n),s=r("%Object.getOwnPropertyDescriptor%",!0),f=r("%Object.defineProperty%",!0),d=r("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}t.exports=function(v){var A=o(e,i,arguments);if(s&&f){var _=s(A,"length");_.configurable&&f(A,"length",{value:1+d(0,v.length-(arguments.length-1))})}return A};var p=function(){return o(e,n,arguments)};f?f(t.exports,"apply",{value:p}):t.exports.apply=p})(L$);var fae=L$.exports,D$=D0,F$=fae,cae=F$(D$("String.prototype.indexOf")),uae=function(e,r){var n=D$(e,!!r);return typeof n=="function"&&cae(e,".prototype.")>-1?F$(n):n},lae=WS(),dae=uae,s7=dae("Object.prototype.toString"),vw=function(e){return lae&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:s7(e)==="[object Arguments]"},$$=function(e){return vw(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&s7(e)!=="[object Array]"&&s7(e.callee)==="[object Function]"},hae=function(){return vw(arguments)}();vw.isLegacyArguments=$$;var pae=hae?vw:$$,mae=Object.prototype.toString,gae=Function.prototype.toString,bae=/^\s*(?:function)?\*/,U$=WS(),c8=Object.getPrototypeOf,yae=function(){if(!U$)return!1;try{return Function("return function*() {}")()}catch{}},u8,vae=function(e){if(typeof e!="function")return!1;if(bae.test(gae.call(e)))return!0;if(!U$){var r=mae.call(e);return r==="[object GeneratorFunction]"}if(!c8)return!1;if(typeof u8>"u"){var n=yae();u8=n?c8(n):!1}return c8(e)===u8},z$=Function.prototype.toString,Id=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,a7,zv;if(typeof Id=="function"&&typeof Object.defineProperty=="function")try{a7=Object.defineProperty({},"length",{get:function(){throw zv}}),zv={},Id(function(){throw 42},null,a7)}catch(t){t!==zv&&(Id=null)}else Id=null;var wae=/^\s*class\b/,f7=function(e){try{var r=z$.call(e);return wae.test(r)}catch{return!1}},l8=function(e){try{return f7(e)?!1:(z$.call(e),!0)}catch{return!1}},jv=Object.prototype.toString,xae="[object Object]",Eae="[object Function]",Aae="[object GeneratorFunction]",Sae="[object HTMLAllCollection]",Mae="[object HTML document.all class]",_ae="[object HTMLCollection]",Pae=typeof Symbol=="function"&&!!Symbol.toStringTag,Cae=!(0 in[,]),c7=function(){return!1};if(typeof document=="object"){var Iae=document.all;jv.call(Iae)===jv.call(document.all)&&(c7=function(e){if((Cae||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=jv.call(e);return(r===Sae||r===Mae||r===_ae||r===xae)&&e("")==null}catch{}return!1})}var Tae=Id?function(e){if(c7(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Id(e,null,a7)}catch(r){if(r!==zv)return!1}return!f7(e)&&l8(e)}:function(e){if(c7(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Pae)return l8(e);if(f7(e))return!1;var r=jv.call(e);return r!==Eae&&r!==Aae&&!/^\[object HTML/.test(r)?!1:l8(e)},Rae=Tae,kae=Object.prototype.toString,j$=Object.prototype.hasOwnProperty,Bae=function(e,r,n){for(var i=0,o=e.length;i=3&&(i=n),kae.call(e)==="[object Array]"?Bae(e,r,i):typeof e=="string"?Oae(e,r,i):Nae(e,r,i)},Dae=Lae,d8=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],Fae=typeof globalThis>"u"?et:globalThis,$ae=function(){for(var e=[],r=0;r3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Zl("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Zl("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Zl("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Zl("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,d=!!lT&&lT(e,r);if(Om)Om(e,r,{configurable:s===null&&d?d.configurable:!s,enumerable:i===null&&d?d.enumerable:!i,value:n,writable:o===null&&d?d.writable:!o});else if(f||!i&&!o&&!s)e[r]=n;else throw new Qae("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},G$=D0,dT=Xae,efe=q$(),hT=ZS,pT=G$("%TypeError%"),tfe=G$("%Math.floor%"),rfe=function(e,r){if(typeof e!="function")throw new pT("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||tfe(r)!==r)throw new pT("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&hT){var s=hT(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!n)&&(efe?dT(e,"length",r,!0,!0):dT(e,"length",r)),e};(function(t){var e=Wae,r=D0,n=rfe,i=r("%TypeError%"),o=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),f=r("%Reflect.apply%",!0)||e.call(s,o),d=r("%Object.defineProperty%",!0),p=r("%Math.max%");if(d)try{d({},"a",{value:1})}catch{d=null}t.exports=function(A){if(typeof A!="function")throw new i("a function is required");var _=f(e,s,arguments);return n(_,1+p(0,A.length-(arguments.length-1)),!0)};var b=function(){return f(e,o,arguments)};d?d(t.exports,"apply",{value:b}):t.exports.apply=b})(H$);var V$=H$.exports,K$=D0,W$=V$,nfe=W$(K$("String.prototype.indexOf")),ife=function(e,r){var n=K$(e,!!r);return typeof n=="function"&&nfe(e,".prototype.")>-1?W$(n):n},o6=Dae,ofe=$ae,mT=V$,QS=ife,qv=ZS,sfe=QS("Object.prototype.toString"),J$=WS(),gT=typeof globalThis>"u"?et:globalThis,d7=ofe(),XS=QS("String.prototype.slice"),h8=Object.getPrototypeOf,afe=QS("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n-1?r:r!=="Object"?!1:cfe(e)}return qv?ffe(e):null},ufe=Z$,lfe=function(e){return!!ufe(e)};(function(t){var e=pae,r=vae,n=Z$,i=lfe;function o(oe){return oe.call.bind(oe)}var s=typeof BigInt<"u",f=typeof Symbol<"u",d=o(Object.prototype.toString),p=o(Number.prototype.valueOf),b=o(String.prototype.valueOf),v=o(Boolean.prototype.valueOf);if(s)var A=o(BigInt.prototype.valueOf);if(f)var _=o(Symbol.prototype.valueOf);function S(oe,Xe){if(typeof oe!="object")return!1;try{return Xe(oe),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=i;function P(oe){return typeof Promise<"u"&&oe instanceof Promise||oe!==null&&typeof oe=="object"&&typeof oe.then=="function"&&typeof oe.catch=="function"}t.isPromise=P;function I(oe){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(oe):i(oe)||k(oe)}t.isArrayBufferView=I;function C(oe){return n(oe)==="Uint8Array"}t.isUint8Array=C;function T(oe){return n(oe)==="Uint8ClampedArray"}t.isUint8ClampedArray=T;function O(oe){return n(oe)==="Uint16Array"}t.isUint16Array=O;function B(oe){return n(oe)==="Uint32Array"}t.isUint32Array=B;function D(oe){return n(oe)==="Int8Array"}t.isInt8Array=D;function U(oe){return n(oe)==="Int16Array"}t.isInt16Array=U;function K(oe){return n(oe)==="Int32Array"}t.isInt32Array=K;function Y(oe){return n(oe)==="Float32Array"}t.isFloat32Array=Y;function W(oe){return n(oe)==="Float64Array"}t.isFloat64Array=W;function ie(oe){return n(oe)==="BigInt64Array"}t.isBigInt64Array=ie;function x(oe){return n(oe)==="BigUint64Array"}t.isBigUint64Array=x;function a(oe){return d(oe)==="[object Map]"}a.working=typeof Map<"u"&&a(new Map);function u(oe){return typeof Map>"u"?!1:a.working?a(oe):oe instanceof Map}t.isMap=u;function l(oe){return d(oe)==="[object Set]"}l.working=typeof Set<"u"&&l(new Set);function h(oe){return typeof Set>"u"?!1:l.working?l(oe):oe instanceof Set}t.isSet=h;function m(oe){return d(oe)==="[object WeakMap]"}m.working=typeof WeakMap<"u"&&m(new WeakMap);function w(oe){return typeof WeakMap>"u"?!1:m.working?m(oe):oe instanceof WeakMap}t.isWeakMap=w;function E(oe){return d(oe)==="[object WeakSet]"}E.working=typeof WeakSet<"u"&&E(new WeakSet);function y(oe){return E(oe)}t.isWeakSet=y;function c(oe){return d(oe)==="[object ArrayBuffer]"}c.working=typeof ArrayBuffer<"u"&&c(new ArrayBuffer);function g(oe){return typeof ArrayBuffer>"u"?!1:c.working?c(oe):oe instanceof ArrayBuffer}t.isArrayBuffer=g;function M(oe){return d(oe)==="[object DataView]"}M.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&M(new DataView(new ArrayBuffer(1),0,1));function k(oe){return typeof DataView>"u"?!1:M.working?M(oe):oe instanceof DataView}t.isDataView=k;var L=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function R(oe){return d(oe)==="[object SharedArrayBuffer]"}function F(oe){return typeof L>"u"?!1:(typeof R.working>"u"&&(R.working=R(new L)),R.working?R(oe):oe instanceof L)}t.isSharedArrayBuffer=F;function z(oe){return d(oe)==="[object AsyncFunction]"}t.isAsyncFunction=z;function V(oe){return d(oe)==="[object Map Iterator]"}t.isMapIterator=V;function q(oe){return d(oe)==="[object Set Iterator]"}t.isSetIterator=q;function Q(oe){return d(oe)==="[object Generator]"}t.isGeneratorObject=Q;function G(oe){return d(oe)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=G;function H(oe){return S(oe,p)}t.isNumberObject=H;function ee(oe){return S(oe,b)}t.isStringObject=ee;function ue(oe){return S(oe,v)}t.isBooleanObject=ue;function fe(oe){return s&&S(oe,A)}t.isBigIntObject=fe;function he(oe){return f&&S(oe,_)}t.isSymbolObject=he;function He(oe){return H(oe)||ee(oe)||ue(oe)||fe(oe)||he(oe)}t.isBoxedPrimitive=He;function be(oe){return typeof Uint8Array<"u"&&(g(oe)||F(oe))}t.isAnyArrayBuffer=be,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(oe){Object.defineProperty(t,oe,{enumerable:!1,value:function(){throw new Error(oe+" is not supported in userland")}})})})(B$);var dfe=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"};(function(t){var e=Object.getOwnPropertyDescriptors||function(k){for(var L=Object.keys(k),R={},F=0;F=F)return q;switch(q){case"%s":return String(R[L++]);case"%d":return Number(R[L++]);case"%j":try{return JSON.stringify(R[L++])}catch{return"[Circular]"}default:return q}}),V=R[L];L"u")return function(){return t.deprecate(M,k).apply(this,arguments)};var L=!1;function R(){if(!L){if(Je.process.throwDeprecation)throw new Error(k);Je.process.traceDeprecation?console.trace(k):console.error(k),L=!0}return M.apply(this,arguments)}return R};var n={},i=/^$/;if({}.NODE_DEBUG){var o={}.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}t.debuglog=function(M){if(M=M.toUpperCase(),!n[M])if(i.test(M)){var k=Je.process.pid;n[M]=function(){var L=t.format.apply(t,arguments);console.error("%s %d: %s",M,k,L)}}else n[M]=function(){};return n[M]};function s(M,k){var L={seen:[],stylize:d};return arguments.length>=3&&(L.depth=arguments[2]),arguments.length>=4&&(L.colors=arguments[3]),C(k)?L.showHidden=k:k&&t._extend(L,k),K(L.showHidden)&&(L.showHidden=!1),K(L.depth)&&(L.depth=2),K(L.colors)&&(L.colors=!1),K(L.customInspect)&&(L.customInspect=!0),L.colors&&(L.stylize=f),b(L,M,L.depth)}t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function f(M,k){var L=s.styles[k];return L?"\x1B["+s.colors[L][0]+"m"+M+"\x1B["+s.colors[L][1]+"m":M}function d(M,k){return M}function p(M){var k={};return M.forEach(function(L,R){k[L]=!0}),k}function b(M,k,L){if(M.customInspect&&k&&a(k.inspect)&&k.inspect!==t.inspect&&!(k.constructor&&k.constructor.prototype===k)){var R=k.inspect(L,M);return D(R)||(R=b(M,R,L)),R}var F=v(M,k);if(F)return F;var z=Object.keys(k),V=p(z);if(M.showHidden&&(z=Object.getOwnPropertyNames(k)),x(k)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return A(k);if(z.length===0){if(a(k)){var q=k.name?": "+k.name:"";return M.stylize("[Function"+q+"]","special")}if(Y(k))return M.stylize(RegExp.prototype.toString.call(k),"regexp");if(ie(k))return M.stylize(Date.prototype.toString.call(k),"date");if(x(k))return A(k)}var Q="",G=!1,H=["{","}"];if(I(k)&&(G=!0,H=["[","]"]),a(k)){var ee=k.name?": "+k.name:"";Q=" [Function"+ee+"]"}if(Y(k)&&(Q=" "+RegExp.prototype.toString.call(k)),ie(k)&&(Q=" "+Date.prototype.toUTCString.call(k)),x(k)&&(Q=" "+A(k)),z.length===0&&(!G||k.length==0))return H[0]+Q+H[1];if(L<0)return Y(k)?M.stylize(RegExp.prototype.toString.call(k),"regexp"):M.stylize("[Object]","special");M.seen.push(k);var ue;return G?ue=_(M,k,L,V,z):ue=z.map(function(fe){return S(M,k,L,V,fe,G)}),M.seen.pop(),P(ue,Q,H)}function v(M,k){if(K(k))return M.stylize("undefined","undefined");if(D(k)){var L="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(L,"string")}if(B(k))return M.stylize(""+k,"number");if(C(k))return M.stylize(""+k,"boolean");if(T(k))return M.stylize("null","null")}function A(M){return"["+Error.prototype.toString.call(M)+"]"}function _(M,k,L,R,F){for(var z=[],V=0,q=k.length;V{const{children:e}=t;ta();const{confirming:r,confirmed:n}=LS(i=>i);return ze.jsxs(Oie,{children:[ze.jsx(W2,{position:{bottom:20,right:100},opened:r,withCloseButton:!0,size:"lg",radius:"md",style:{backgroundColor:"light-dark(var(--mantine-color-black),var(--mantine-color-white));"},children:ze.jsx(J2,{withBorder:!1,withCloseButton:!1,style:{margin:10,backgroundColor:"light-dark(var(--mantine-color-black),var(--mantine-color-white));"},loading:!0,title:"Confirming the transaction",children:"Waiting for the transaction to get confirmed"})}),ze.jsx(W2,{position:{bottom:20,right:100},opened:n,withCloseButton:!0,size:"lg",radius:"md",style:{backgroundColor:"light-dark(var(--mantine-color-black),var(--mantine-color-white));"},children:ze.jsx(J2,{withBorder:!1,withCloseButton:!1,style:{margin:10,backgroundColor:"light-dark(var(--mantine-color-black),var(--mantine-color-white));"},title:"Transaction confirmed!",children:"Transaction has been confirmed now"})}),e]})};function tl(){return tl=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(b[d]=s[d]);return b}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var Lie=["size","color","stroke"];function Die(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,Lie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-check",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("path",{d:"M5 12l5 5l10 -10"}))}var Fie=["size","color","stroke"];function $ie(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,Fie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-copy",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("rect",{x:8,y:8,width:12,height:12,rx:2}),Z.createElement("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"}))}var Uie=["size","color","stroke"];function zie(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,Uie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-gift",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("rect",{x:3,y:8,width:18,height:4,rx:1}),Z.createElement("line",{x1:12,y1:8,x2:12,y2:21}),Z.createElement("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),Z.createElement("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"}))}var jie=["size","color","stroke"];function Hie(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,jie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-moon-stars",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z"}),Z.createElement("path",{d:"M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),Z.createElement("path",{d:"M19 11h2m-1 -1v2"}))}var qie=["size","color","stroke"];function Gie(t){var e=t.size,r=e===void 0?24:e,n=t.color,i=n===void 0?"currentColor":n,o=t.stroke,s=o===void 0?2:o,f=Pb(t,qie);return Z.createElement("svg",tl({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-sun",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:s,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),Z.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Z.createElement("circle",{cx:12,cy:12,r:4}),Z.createElement("path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7"}))}const Vie="/assets/logo-light-5ab92abc.svg",Kie="/assets/logo-dark-bcd9fcaf.svg",Wie="/assets/base-8a61917f.png",Jie="/assets/eth-dc2fb7da.svg",Zie="/assets/gno-7494440b.svg";var $u=(t=>(t.home="/",t.claim="/claim",t.account="/account",t.notFound="*",t))($u||{});const t8="05d830413c5a4ac8873c84319679c7b2",fc="H8IGZCCS8XCJYSXIA3GUUKW6CDECYYMNPG",Yie="GVZS4QAMWFBGS5PK2BR76FNFPJ7X2GR44I",Qie="",qI={localhost:{name:"Local Chain",chainId:31337,type:"Testnet",url:"http://localhost:8545",safeService:"",blockExplorer:"",api:"",easExplorer:""},mainnet:{name:"Ethereum",type:"Mainnet",chainId:1,url:`https://mainnet.infura.io/v3/${t8}`,safeService:"https://safe-transaction-mainnet.safe.global",blockExplorer:"https://etherscan.io",api:`https://api.etherscan.io/api?apikey=${fc}`,easExplorer:""},goerli:{name:"Goerli",type:"Testnet",chainId:5,url:`https://goerli.infura.io/v3/${t8}`,safeService:"https://safe-transaction-goerli.safe.global",blockExplorer:"https://goerli.etherscan.io",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:""},sepolia:{name:"Sepolia",type:"Testnet",chainId:11155111,url:"https://eth-sepolia.g.alchemy.com/v2/eCr9bFDzgYgDrox-mnXPPh7_koP-agKo",safeService:"https://safe-transaction-sepolia.safe.global",blockExplorer:"https://sepolia.etherscan.io",api:`https://api-sepolia.etherscan.io/api?apikey=${fc}`,easExplorer:""},basegoerli:{name:"Base",type:"Testnet",chainId:84531,url:"https://base-goerli.g.alchemy.com/v2/K1GZzIiF6-PthdjPtfzvTOMcej2zOWWA",blockExplorer:"https://goerli.basescan.org",safeService:"https://safe-transaction-base-testnet.safe.global",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:"https://base-goerli.easscan.org/attestation/view/"},base:{name:"Base",type:"Testnet",chainId:84531,url:"https://base-mainnet.g.alchemy.com/v2/NTGkSXMuKkoHwQ_W4eNpGlihUScplXYV",blockExplorer:"https://basescan.org",safeService:"https://safe-transaction-base.safe.global",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:""},basemain:{name:"Base",type:"Mainnet",chainId:8453,url:"https://base-mainnet.g.alchemy.com/v2/NTGkSXMuKkoHwQ_W4eNpGlihUScplXYV",blockExplorer:"https://basescan.org",safeService:"https://safe-transaction-base.safe.global",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:""},optimism:{name:"Optimism",type:"Mainnet",chainId:10,url:`https://optimism-mainnet.infura.io/v3/${t8}`,blockExplorer:"https://optimistic.etherscan.io",safeService:"https://safe-transaction-optimism.safe.global",api:`https://api-optimistic.etherscan.io/api?apikey=${fc}`,easExplorer:"https://optimism.easscan.org/attestation/view/"},gnosis:{name:"Gnosis",type:"Mainnet",chainId:100,url:"https://rpc.ankr.com/gnosis",safeService:"https://safe-transaction-gnosis-chain.safe.global",blockExplorer:"https://gnosisscan.io",api:`https://api-goerli.etherscan.io/api?apikey=${fc}`,easExplorer:""},polygontestnet:{name:"Polygon",type:"Testnet",chainId:80001,url:"https://matic-mumbai.chainstacklabs.com",safeService:"",blockExplorer:"https://mumbai.polygonscan.com",api:`https://api-testnet.polygonscan.com/api?module=account&action=balance&address=${Qie}&apikey=${Yie}`,easExplorer:""},polygon:{name:"Polygon",type:"Mainnet",chainId:137,url:"https://rpc.ankr.com/polygon",safeService:"https://safe-transaction-polygon.safe.global",blockExplorer:"https://polygonscan.com",api:"",easExplorer:""},celo:{name:"Celo",type:"Mainnet",chainId:42220,url:"https://1rpc.io/celo ",safeService:"https://safe-transaction-polygon.safe.global",blockExplorer:"https://celoscan.com",api:"",easExplorer:""}};class co{static getNetworkById(e){return Object.values(qI).find(n=>e===n.chainId)}static getNetworkByName(e){return qI[e]}}const Xie="6.7.1";function eoe(t,e,r){const n=e.split("|").map(o=>o.trim());for(let o=0;oPromise.resolve(t[n])))).reduce((n,i,o)=>(n[e[o]]=i,n),{})}function xt(t,e,r){for(let n in e){let i=e[n];const o=r?r[n]:null;o&&eoe(i,o,n),Object.defineProperty(t,n,{enumerable:!0,value:i,writable:!1})}}function Md(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(Md).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return Md(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${Md(r)}: ${Md(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function $o(t,e){return t&&t.code===e}function jS(t){return $o(t,"CALL_EXCEPTION")}function rn(t,e,r){{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${Md(r)}`);for(const o in r){const s=r[o];i.push(o+"="+Md(s))}}i.push(`code=${e}`),i.push(`version=${Xie}`),i.length&&(t+=" ("+i.join(", ")+")")}let n;switch(e){case"INVALID_ARGUMENT":n=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":n=new RangeError(t);break;default:n=new Error(t)}return xt(n,{code:e}),r&&Object.assign(n,r),n}function Ge(t,e,r,n){if(!t)throw rn(e,r,n)}function _e(t,e,r,n){Ge(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function WF(t,e,r){r==null&&(r=""),r&&(r=": "+r),Ge(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),Ge(t<=e,"too many arguemnts"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const toe=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"){const r=String.fromCharCode(233).normalize("NFD"),n=String.fromCharCode(101,769);if(r!==n)throw new Error("broken")}t.push(e)}catch{}return t},[]);function roe(t){Ge(toe.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function Cb(t,e,r){if(r==null&&(r=""),t!==e){let n=r,i="new";r&&(n+=".",i+=" "+r),Ge(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function JF(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x([0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let i=2;for(let o=0;o>4]+GI[i&15]}return r}function en(t){return"0x"+t.map(e=>dt(e).substring(2)).join("")}function Gd(t){return Tr(t,!0)?(t.length-2)/2:qt(t).length}function Br(t,e,r){const n=qt(t);return r!=null&&r>n.length&&Ge(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),dt(n.slice(e??0,r??n.length))}function ZF(t,e,r){const n=qt(t);Ge(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),r?i.set(n,e-n.length):i.set(n,0),dt(i)}function rl(t,e){return ZF(t,e,!0)}function ioe(t,e){return ZF(t,e,!1)}const pw=BigInt(0),Rs=BigInt(1),_d=9007199254740991;function Q2(t,e){const r=mw(t,"value"),n=BigInt(Tt(e,"width"));if(Ge(r>>n===pw,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Rs){const i=(Rs<=-_d&&t<=_d,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){_e(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}_e(!1,"invalid BigNumberish value",e||"value",t)}function mw(t,e){const r=pt(t,e);return Ge(r>=pw,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const VI="0123456789abcdef";function gw(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=VI[r>>4],e+=VI[r&15];return BigInt(e)}return pt(t)}function Tt(t,e){switch(typeof t){case"bigint":return _e(t>=-_d&&t<=_d,"overflow",e||"value",t),Number(t);case"number":return _e(Number.isInteger(t),"underflow",e||"value",t),_e(t>=-_d&&t<=_d,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Tt(BigInt(t),e)}catch(r){_e(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}_e(!1,"invalid numeric value",e||"value",t)}function ooe(t){return Tt(gw(t))}function y0(t,e){let n=mw(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const i=Tt(e,"width");for(Ge(i*2>=n.length,`value exceeds width (${i} bits)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length>6===2;s++)o++;return o}return t==="OVERRUN"?r.length-e-1:0}function loe(t,e,r,n,i){return t==="OVERLONG"?(_e(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),XF(t,e,r))}const doe=Object.freeze({error:uoe,ignore:XF,replace:loe});function hoe(t,e){e==null&&(e=doe.error);const r=qt(t,"bytes"),n=[];let i=0;for(;i>7)){n.push(o);continue}let s=null,f=null;if((o&224)===192)s=1,f=127;else if((o&240)===224)s=2,f=2047;else if((o&248)===240)s=3,f=65535;else{(o&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,r,n):i+=e("BAD_PREFIX",i-1,r,n);continue}if(i-1+s>=r.length){i+=e("OVERRUN",i-1,r,n);continue}let d=o&(1<<8-s-1)-1;for(let p=0;p1114111){i+=e("OUT_OF_RANGE",i-1-s,r,n,d);continue}if(d>=55296&&d<=57343){i+=e("UTF16_SURROGATE",i-1-s,r,n,d);continue}if(d<=f){i+=e("OVERLONG",i-1-s,r,n,d);continue}n.push(d)}}return n}function Bf(t,e){e!=null&&(roe(e),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const o=t.charCodeAt(n);_e(n>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return new Uint8Array(r)}function poe(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function HS(t,e){return poe(hoe(t,e))}async function moe(t,e){const r=t.url.split(":")[0].toLowerCase();Ge(r==="http"||r==="https",`unsupported protocol ${r}`,"UNSUPPORTED_OPERATION",{info:{protocol:r},operation:"request"}),Ge(r==="https"||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let n;if(e){const p=new AbortController;n=p.signal,e.addListener(()=>{p.abort()})}const i={method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:n},o=await fetch(t.url,i),s={};o.headers.forEach((p,b)=>{s[b.toLowerCase()]=p});const f=await o.arrayBuffer(),d=f==null?null:new Uint8Array(f);return{statusCode:o.status,statusMessage:o.statusText,headers:s,body:d}}const goe=12,boe=250;let WI=moe;const yoe=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),voe=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let r8=!1;async function e$(t,e){try{const r=t.match(yoe);if(!r)throw new Error("invalid data");return new a0(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?foe(r[3]):xoe(r[3]))}catch{return new a0(599,"BAD REQUEST (invalid data: URI)",{},null,new qf(t))}}function t$(t){async function e(r,n){try{const i=r.match(voe);if(!i)throw new Error("invalid link");return new qf(`${t}${i[2]}`)}catch{return new a0(599,"BAD REQUEST (invalid IPFS URI)",{},null,new qf(r))}}return e}const jy={data:e$,ipfs:t$("https://gateway.ipfs.io/ipfs/")},r$=new WeakMap;var mu,Bc;class woe{constructor(e){Ne(this,mu,void 0);Ne(this,Bc,void 0);ce(this,mu,[]),ce(this,Bc,!1),r$.set(e,()=>{if(!X(this,Bc)){ce(this,Bc,!0);for(const r of X(this,mu))setTimeout(()=>{r()},0);ce(this,mu,[])}})}addListener(e){Ge(!X(this,Bc),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),X(this,mu).push(e)}get cancelled(){return X(this,Bc)}checkSignal(){Ge(!this.cancelled,"cancelled","CANCELLED",{})}}mu=new WeakMap,Bc=new WeakMap;function Hy(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var ch,uh,xs,ff,lh,dh,dn,Ki,cf,gu,bu,yu,ma,uf,vu,pm;const c5=class c5{constructor(e){Ne(this,vu);Ne(this,ch,void 0);Ne(this,uh,void 0);Ne(this,xs,void 0);Ne(this,ff,void 0);Ne(this,lh,void 0);Ne(this,dh,void 0);Ne(this,dn,void 0);Ne(this,Ki,void 0);Ne(this,cf,void 0);Ne(this,gu,void 0);Ne(this,bu,void 0);Ne(this,yu,void 0);Ne(this,ma,void 0);Ne(this,uf,void 0);ce(this,dh,String(e)),ce(this,ch,!1),ce(this,uh,!0),ce(this,xs,{}),ce(this,ff,""),ce(this,lh,3e5),ce(this,uf,{slotInterval:boe,maxAttempts:goe})}get url(){return X(this,dh)}set url(e){ce(this,dh,String(e))}get body(){return X(this,dn)==null?null:new Uint8Array(X(this,dn))}set body(e){if(e==null)ce(this,dn,void 0),ce(this,Ki,void 0);else if(typeof e=="string")ce(this,dn,Bf(e)),ce(this,Ki,"text/plain");else if(e instanceof Uint8Array)ce(this,dn,e),ce(this,Ki,"application/octet-stream");else if(typeof e=="object")ce(this,dn,Bf(JSON.stringify(e))),ce(this,Ki,"application/json");else throw new Error("invalid body")}hasBody(){return X(this,dn)!=null}get method(){return X(this,ff)?X(this,ff):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),ce(this,ff,String(e).toUpperCase())}get headers(){const e=Object.assign({},X(this,xs));return X(this,cf)&&(e.authorization=`Basic ${coe(Bf(X(this,cf)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&X(this,Ki)&&(e["content-type"]=X(this,Ki)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){X(this,xs)[String(e).toLowerCase()]=String(r)}clearHeaders(){ce(this,xs,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),ce(this,lh,e)}get preflightFunc(){return X(this,gu)||null}set preflightFunc(e){ce(this,gu,e)}get processFunc(){return X(this,bu)||null}set processFunc(e){ce(this,bu,e)}get retryFunc(){return X(this,yu)||null}set retryFunc(e){ce(this,yu,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(X(this,uf).slotInterval=e.slotInterval),e.maxAttempts!=null&&(X(this,uf).maxAttempts=e.maxAttempts)}send(){return Ge(X(this,ma)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),ce(this,ma,new woe(this)),Ke(this,vu,pm).call(this,0,JI()+this.timeout,0,this,new a0(0,"",{},null,this))}cancel(){Ge(X(this,ma)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=r$.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();Ge(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new c5(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,ce(i,xs,Object.assign({},X(this,xs))),X(this,dn)&&ce(i,dn,new Uint8Array(X(this,dn))),ce(i,Ki,X(this,Ki)),i}clone(){const e=new c5(this.url);return ce(e,ff,X(this,ff)),X(this,dn)&&ce(e,dn,X(this,dn)),ce(e,Ki,X(this,Ki)),ce(e,xs,Object.assign({},X(this,xs))),ce(e,cf,X(this,cf)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),ce(e,gu,X(this,gu)),ce(e,bu,X(this,bu)),ce(e,yu,X(this,yu)),e}static lockConfig(){r8=!0}static getGateway(e){return jy[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(r8)throw new Error("gateways locked");jy[e]=r}static registerGetUrl(e){if(r8)throw new Error("gateways locked");WI=e}static createDataGateway(){return e$}static createIpfsGatewayFunc(e){return t$(e)}};ch=new WeakMap,uh=new WeakMap,xs=new WeakMap,ff=new WeakMap,lh=new WeakMap,dh=new WeakMap,dn=new WeakMap,Ki=new WeakMap,cf=new WeakMap,gu=new WeakMap,bu=new WeakMap,yu=new WeakMap,ma=new WeakMap,uf=new WeakMap,vu=new WeakSet,pm=async function(e,r,n,i,o){var b,v,A;if(e>=X(this,uf).maxAttempts)return o.makeServerError("exceeded maximum retry limit");Ge(JI()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await Eoe(n);let s=this.clone();const f=(s.url.split(":")[0]||"").toLowerCase();if(f in jy){const _=await jy[f](s.url,Hy(X(i,ma)));if(_ instanceof a0){let S=_;if(this.processFunc){Hy(X(i,ma));try{S=await this.processFunc(s,S)}catch(P){(P.throttle==null||typeof P.stall!="number")&&S.makeServerError("error in post-processing function",P).assertOk()}}return S}s=_}this.preflightFunc&&(s=await this.preflightFunc(s));const d=await WI(s,Hy(X(i,ma)));let p=new a0(d.statusCode,d.statusMessage,d.headers,d.body,i);if(p.statusCode===301||p.statusCode===302){try{const _=p.headers.location||"";return Ke(b=s.redirect(_),vu,pm).call(b,e+1,r,0,i,p)}catch{}return p}else if(p.statusCode===429&&(this.retryFunc==null||await this.retryFunc(s,p,e))){const _=p.headers["retry-after"];let S=X(this,uf).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof _=="string"&&_.match(/^[1-9][0-9]*$/)&&(S=parseInt(_)),Ke(v=s.clone(),vu,pm).call(v,e+1,r,S,i,p)}if(this.processFunc){Hy(X(i,ma));try{p=await this.processFunc(s,p)}catch(_){(_.throttle==null||typeof _.stall!="number")&&p.makeServerError("error in post-processing function",_).assertOk();let S=X(this,uf).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return _.stall>=0&&(S=_.stall),Ke(A=s.clone(),vu,pm).call(A,e+1,r,S,i,p)}}return p};let qf=c5;var Gg,Vg,Kg,Es,hh,wu;const OP=class OP{constructor(e,r,n,i,o){Ne(this,Gg,void 0);Ne(this,Vg,void 0);Ne(this,Kg,void 0);Ne(this,Es,void 0);Ne(this,hh,void 0);Ne(this,wu,void 0);ce(this,Gg,e),ce(this,Vg,r),ce(this,Kg,Object.keys(n).reduce((s,f)=>(s[f.toLowerCase()]=String(n[f]),s),{})),ce(this,Es,i==null?null:new Uint8Array(i)),ce(this,hh,o||null),ce(this,wu,{message:""})}toString(){return``}get statusCode(){return X(this,Gg)}get statusMessage(){return X(this,Vg)}get headers(){return Object.assign({},X(this,Kg))}get body(){return X(this,Es)==null?null:new Uint8Array(X(this,Es))}get bodyText(){try{return X(this,Es)==null?"":HS(X(this,Es))}catch{Ge(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{Ge(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw xt(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return X(this,Es)!=null}get request(){return X(this,hh)}ok(){return X(this,wu).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=X(this,wu);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`),Ge(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r})}};Gg=new WeakMap,Vg=new WeakMap,Kg=new WeakMap,Es=new WeakMap,hh=new WeakMap,wu=new WeakMap;let a0=OP;function JI(){return new Date().getTime()}function xoe(t){return Bf(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function Eoe(t){return new Promise(e=>setTimeout(e,t))}const Aoe=BigInt(-1),ys=BigInt(0),Cd=BigInt(1),Soe=BigInt(5),Wl={};let Vd="0000";for(;Vd.length<80;)Vd+=Vd;function G0(t){let e=Vd;for(;e.length=-i&&tys?t=Q2(au(t,n),n):t=-Q2(au(-t,n),n)}else{const i=Cd<=0&&to[f]==null?p:(_e(typeof o[f]===d,"invalid fixed format ("+f+" not "+d+")","format."+f,o[f]),o[f]);e=s("signed","boolean",e),r=s("width","number",r),n=s("decimals","number",n)}_e(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),_e(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:i}}function Moe(t,e){let r="";t0?n*=G0(i):i<0&&(r*=G0(-i)),rn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=X(this,tr);return X(this,tr)ys&&(e+=X(this,ti)-Cd),e=X(this,tr)/X(this,ti)*X(this,ti),Ke(this,Ss,Qa).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=Soe*G0(r-1);let i=this.value+n;const o=G0(r);return i=i/o*o,U1(i,X(this,As),"round"),new Pc(Wl,i,X(this,As))}isZero(){return X(this,tr)===ys}isNegative(){return X(this,tr)0){const d=G0(f);Ge(s%d===ys,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),s/=d}else f<0&&(s*=G0(-f));return U1(s,o,"fromValue"),new Pc(Wl,s,o)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);_e(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=n8(r);let o=n[2]||"0",s=n[3]||"";for(;s.length{Ge(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const i=ZI(t,e+1,n);return r(e+1+n+i),YI(t,e,e+1+n,n+i)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),YI(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const i=ZI(t,e+1,n);r(e+1+n+i);const o=dt(t.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:o}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const i=dt(t.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:_oe(t[e])}}function qS(t){const e=qt(t,"data"),r=n$(e,0);return _e(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function QI(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function i$(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(o){n=n.concat(i$(o))}),n.length<=55)return n.unshift(192+n.length),n;const i=QI(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(qt(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=QI(e.length);return r.unshift(183+r.length),r.concat(e)}const XI="0123456789abcdef";function mg(t){let e="0x";for(const r of i$(t))e+=XI[r>>4],e+=XI[r&15];return e}const o$=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Poe(t,e){let r=18;if(typeof e=="string"){const n=o$.indexOf(e);_e(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Tt(e,"unit"));return X2.fromValue(t,r,{decimals:r,width:512}).toString()}function Coe(t,e){_e(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=o$.indexOf(e);_e(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Tt(e,"unit"));return X2.fromString(t,{decimals:r,width:512}).value}function Z9(t){return Poe(t,18)}function Ioe(t){return Coe(t,18)}const si=32,Y9=new Uint8Array(si),Toe=["then"],qy={};function z1(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}var Oc;const Vm=class Vm extends Array{constructor(...r){const n=r[0];let i=r[1],o=(r[2]||[]).slice(),s=!0;n!==qy&&(i=r,o=[],s=!1);super(i.length);Ne(this,Oc,void 0);i.forEach((d,p)=>{this[p]=d});const f=o.reduce((d,p)=>(typeof p=="string"&&d.set(p,(d.get(p)||0)+1),d),new Map);if(ce(this,Oc,Object.freeze(i.map((d,p)=>{const b=o[p];return b!=null&&f.get(b)===1?b:null}))),!!s)return Object.freeze(this),new Proxy(this,{get:(d,p,b)=>{if(typeof p=="string"){if(p.match(/^[0-9]+$/)){const A=Tt(p,"%index");if(A<0||A>=this.length)throw new RangeError("out of result range");const _=d[A];return _ instanceof Error&&z1(`index ${A}`,_),_}if(Toe.indexOf(p)>=0)return Reflect.get(d,p,b);const v=d[p];if(v instanceof Function)return function(...A){return v.apply(this===b?d:this,A)};if(!(p in d))return d.getValue.apply(this===b?d:this,[p])}return Reflect.get(d,p,b)}})}toArray(){const r=[];return this.forEach((n,i)=>{n instanceof Error&&z1(`index ${i}`,n),r.push(n)}),r}toObject(){return X(this,Oc).reduce((r,n,i)=>(Ge(n!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),n in r||(r[n]=this.getValue(n)),r),{})}slice(r,n){r==null&&(r=0),r<0&&(r+=this.length,r<0&&(r=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const i=[],o=[];for(let s=r;s{X(this,df)[e]=eT(r)}}}df=new WeakMap,xu=new WeakMap,ph=new WeakSet,$v=function(e){return X(this,df).push(e),ce(this,xu,X(this,xu)+e.length),e.length};var Wi,_o,u5,s$;const NP=class NP{constructor(e,r){Ne(this,u5);Oe(this,"allowLoose");Ne(this,Wi,void 0);Ne(this,_o,void 0);xt(this,{allowLoose:!!r}),ce(this,Wi,Ii(e)),ce(this,_o,0)}get data(){return dt(X(this,Wi))}get dataLength(){return X(this,Wi).length}get consumed(){return X(this,_o)}get bytes(){return new Uint8Array(X(this,Wi))}subReader(e){return new NP(X(this,Wi).slice(X(this,_o)+e),this.allowLoose)}readBytes(e,r){let n=Ke(this,u5,s$).call(this,0,e,!!r);return ce(this,_o,X(this,_o)+n.length),n.slice(0,e)}readValue(){return gw(this.readBytes(si))}readIndex(){return ooe(this.readBytes(si))}};Wi=new WeakMap,_o=new WeakMap,u5=new WeakSet,s$=function(e,r,n){let i=Math.ceil(r/si)*si;return X(this,_o)+i>X(this,Wi).length&&(this.allowLoose&&n&&X(this,_o)+r<=X(this,Wi).length?i=r:Ge(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Ii(X(this,Wi)),length:X(this,Wi).length,offset:X(this,_o)+i})),X(this,Wi).slice(X(this,_o),X(this,_o)+i)};let X9=NP;function e7(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function Roe(t){if(typeof t!="boolean")throw new Error(`Expected boolean, not ${t}`)}function a$(t,...e){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function koe(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");e7(t.outputLen),e7(t.blockLen)}function Boe(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Ooe(t,e){a$(t);const r=e.outputLen;if(t.lengthnew Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),i8=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),ua=(t,e)=>t<<32-e|t>>>e,Loe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Loe)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Doe(t){if(typeof t!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof t}`);return new TextEncoder().encode(t)}function Ib(t){if(typeof t=="string"&&(t=Doe(t)),!(t instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof t})`);return t}let t6=class{clone(){return this._cloneInto()}};function Tb(t){const e=n=>t().update(Ib(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Foe(t){const e=(n,i)=>t(i).update(Ib(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}let f$=class extends t6{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,eo.hash(e);const n=Ib(r);if(this.iHash=e.create(),!(this.iHash instanceof t6))throw new TypeError("Expected instance of class which extends utils.Hash");const i=this.blockLen=this.iHash.blockLen;this.outputLen=this.iHash.outputLen;const o=new Uint8Array(i);o.set(n.length>this.iHash.blockLen?e.create().update(n).digest():n);for(let s=0;snew f$(t,e).update(r).digest();c$.create=(t,e)=>new f$(t,e);function $oe(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),f=Number(r&o),d=n?4:0,p=n?0:4;t.setUint32(e+d,s,n),t.setUint32(e+p,f,n)}let u$=class extends t6{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=i8(this.buffer)}update(e){eo.exists(this);const{view:r,buffer:n,blockLen:i}=this;e=Ib(e);const o=e.length;for(let s=0;si-s&&(this.process(n,0),s=0);for(let d=s;df.setUint32(4*p,d,o))}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:o,destroyed:s,pos:f}=this;return e.length=i,e.pos=f,e.finished=o,e.destroyed=s,i%r&&e.buffer.set(n),e}};const Uoe=(t,e,r)=>t&e^~t&r,zoe=(t,e,r)=>t&e^t&r^e&r,joe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),cc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),uc=new Uint32Array(64);let Hoe=class extends u${constructor(){super(64,32,8,!1),this.A=cc[0]|0,this.B=cc[1]|0,this.C=cc[2]|0,this.D=cc[3]|0,this.E=cc[4]|0,this.F=cc[5]|0,this.G=cc[6]|0,this.H=cc[7]|0}get(){const{A:e,B:r,C:n,D:i,E:o,F:s,G:f,H:d}=this;return[e,r,n,i,o,s,f,d]}set(e,r,n,i,o,s,f,d){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=f|0,this.H=d|0}process(e,r){for(let v=0;v<16;v++,r+=4)uc[v]=e.getUint32(r,!1);for(let v=16;v<64;v++){const A=uc[v-15],_=uc[v-2],S=ua(A,7)^ua(A,18)^A>>>3,P=ua(_,17)^ua(_,19)^_>>>10;uc[v]=P+uc[v-7]+S+uc[v-16]|0}let{A:n,B:i,C:o,D:s,E:f,F:d,G:p,H:b}=this;for(let v=0;v<64;v++){const A=ua(f,6)^ua(f,11)^ua(f,25),_=b+A+Uoe(f,d,p)+joe[v]+uc[v]|0,P=(ua(n,2)^ua(n,13)^ua(n,22))+zoe(n,i,o)|0;b=p,p=d,d=f,f=s+_|0,s=o,o=i,i=n,n=_+P|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,f=f+this.E|0,d=d+this.F|0,p=p+this.G|0,b=b+this.H|0,this.set(n,i,o,s,f,d,p,b)}roundClean(){uc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const qoe=Tb(()=>new Hoe),Gy=BigInt(2**32-1),t7=BigInt(32);function l$(t,e=!1){return e?{h:Number(t&Gy),l:Number(t>>t7&Gy)}:{h:Number(t>>t7&Gy)|0,l:Number(t&Gy)|0}}function Goe(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;iBigInt(t>>>0)<>>0),Koe=(t,e,r)=>t>>>r,Woe=(t,e,r)=>t<<32-r|e>>>r,Joe=(t,e,r)=>t>>>r|e<<32-r,Zoe=(t,e,r)=>t<<32-r|e>>>r,Yoe=(t,e,r)=>t<<64-r|e>>>r-32,Qoe=(t,e,r)=>t>>>r-32|e<<64-r,Xoe=(t,e)=>e,ese=(t,e)=>t,tse=(t,e,r)=>t<>>32-r,rse=(t,e,r)=>e<>>32-r,nse=(t,e,r)=>e<>>64-r,ise=(t,e,r)=>t<>>64-r;function ose(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const sse=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),ase=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,fse=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),cse=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,use=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),lse=(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0,Mt={fromBig:l$,split:Goe,toBig:Voe,shrSH:Koe,shrSL:Woe,rotrSH:Joe,rotrSL:Zoe,rotrBH:Yoe,rotrBL:Qoe,rotr32H:Xoe,rotr32L:ese,rotlSH:tse,rotlSL:rse,rotlBH:nse,rotlBL:ise,add:ose,add3L:sse,add3H:ase,add4L:fse,add4H:cse,add5H:lse,add5L:use},[dse,hse]=Mt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),lc=new Uint32Array(80),dc=new Uint32Array(80);let GS=class extends u${constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:o,Cl:s,Dh:f,Dl:d,Eh:p,El:b,Fh:v,Fl:A,Gh:_,Gl:S,Hh:P,Hl:I}=this;return[e,r,n,i,o,s,f,d,p,b,v,A,_,S,P,I]}set(e,r,n,i,o,s,f,d,p,b,v,A,_,S,P,I){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=f|0,this.Dl=d|0,this.Eh=p|0,this.El=b|0,this.Fh=v|0,this.Fl=A|0,this.Gh=_|0,this.Gl=S|0,this.Hh=P|0,this.Hl=I|0}process(e,r){for(let k=0;k<16;k++,r+=4)lc[k]=e.getUint32(r),dc[k]=e.getUint32(r+=4);for(let k=16;k<80;k++){const O=lc[k-15]|0,D=dc[k-15]|0,U=Mt.rotrSH(O,D,1)^Mt.rotrSH(O,D,8)^Mt.shrSH(O,D,7),V=Mt.rotrSL(O,D,1)^Mt.rotrSL(O,D,8)^Mt.shrSL(O,D,7),Y=lc[k-2]|0,W=dc[k-2]|0,ie=Mt.rotrSH(Y,W,19)^Mt.rotrBH(Y,W,61)^Mt.shrSH(Y,W,6),x=Mt.rotrSL(Y,W,19)^Mt.rotrBL(Y,W,61)^Mt.shrSL(Y,W,6),a=Mt.add4L(V,x,dc[k-7],dc[k-16]),u=Mt.add4H(a,U,ie,lc[k-7],lc[k-16]);lc[k]=u|0,dc[k]=a|0}let{Ah:n,Al:i,Bh:o,Bl:s,Ch:f,Cl:d,Dh:p,Dl:b,Eh:v,El:A,Fh:_,Fl:S,Gh:P,Gl:I,Hh:C,Hl:T}=this;for(let k=0;k<80;k++){const O=Mt.rotrSH(v,A,14)^Mt.rotrSH(v,A,18)^Mt.rotrBH(v,A,41),D=Mt.rotrSL(v,A,14)^Mt.rotrSL(v,A,18)^Mt.rotrBL(v,A,41),U=v&_^~v&P,V=A&S^~A&I,Y=Mt.add5L(T,D,V,hse[k],dc[k]),W=Mt.add5H(Y,C,O,U,dse[k],lc[k]),ie=Y|0,x=Mt.rotrSH(n,i,28)^Mt.rotrBH(n,i,34)^Mt.rotrBH(n,i,39),a=Mt.rotrSL(n,i,28)^Mt.rotrBL(n,i,34)^Mt.rotrBL(n,i,39),u=n&o^n&f^o&f,l=i&s^i&d^s&d;C=P|0,T=I|0,P=_|0,I=S|0,_=v|0,S=A|0,{h:v,l:A}=Mt.add(p|0,b|0,W|0,ie|0),p=f|0,b=d|0,f=o|0,d=s|0,o=n|0,s=i|0;const h=Mt.add3L(ie,a,l);n=Mt.add3H(h,W,x,u),i=h|0}({h:n,l:i}=Mt.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:o,l:s}=Mt.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:f,l:d}=Mt.add(this.Ch|0,this.Cl|0,f|0,d|0),{h:p,l:b}=Mt.add(this.Dh|0,this.Dl|0,p|0,b|0),{h:v,l:A}=Mt.add(this.Eh|0,this.El|0,v|0,A|0),{h:_,l:S}=Mt.add(this.Fh|0,this.Fl|0,_|0,S|0),{h:P,l:I}=Mt.add(this.Gh|0,this.Gl|0,P|0,I|0),{h:C,l:T}=Mt.add(this.Hh|0,this.Hl|0,C|0,T|0),this.set(n,i,o,s,f,d,p,b,v,A,_,S,P,I,C,T)}roundClean(){lc.fill(0),dc.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};class pse extends GS{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}let mse=class extends GS{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}};const gse=Tb(()=>new GS);Tb(()=>new pse);Tb(()=>new mse);function bse(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Je.global<"u")return Je.global;throw new Error("unable to locate global object")}const tT=bse();tT.crypto||tT.msCrypto;function yse(t,e){const r={sha256:qoe,sha512:gse}[t];return _e(r!=null,"invalid hmac algorithm","algorithm",t),c$.create(r,e)}let d$=!1;const h$=function(t,e,r){return yse(t,e).update(r).digest()};let p$=h$;function Rb(t,e,r){const n=qt(e,"key"),i=qt(r,"data");return dt(p$(t,n,i))}Rb._=h$;Rb.lock=function(){d$=!0};Rb.register=function(t){if(d$)throw new Error("computeHmac is locked");p$=t};Object.freeze(Rb);const[m$,g$,b$]=[[],[],[]],vse=BigInt(0),j1=BigInt(1),wse=BigInt(2),xse=BigInt(7),Ese=BigInt(256),Ase=BigInt(113);for(let t=0,e=j1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],m$.push(2*(5*n+r)),g$.push((t+1)*(t+2)/2%64);let i=vse;for(let o=0;o<7;o++)e=(e<>xse)*Ase)%Ese,e&wse&&(i^=j1<<(j1<r>32?Mt.rotlBH(t,e,r):Mt.rotlSH(t,e,r),nT=(t,e,r)=>r>32?Mt.rotlBL(t,e,r):Mt.rotlSL(t,e,r);function _se(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let s=0;s<10;s++)r[s]=t[s]^t[s+10]^t[s+20]^t[s+30]^t[s+40];for(let s=0;s<10;s+=2){const f=(s+8)%10,d=(s+2)%10,p=r[d],b=r[d+1],v=rT(p,b,1)^r[f],A=nT(p,b,1)^r[f+1];for(let _=0;_<50;_+=10)t[s+_]^=v,t[s+_+1]^=A}let i=t[2],o=t[3];for(let s=0;s<24;s++){const f=g$[s],d=rT(i,o,f),p=nT(i,o,f),b=m$[s];i=t[b],o=t[b+1],t[b]=d,t[b+1]=p}for(let s=0;s<50;s+=10){for(let f=0;f<10;f++)r[f]=t[s+f];for(let f=0;f<10;f++)t[s+f]^=~r[(f+2)%10]&r[(f+4)%10]}t[0]^=Sse[n],t[1]^=Mse[n]}r.fill(0)}let y$=class v$ extends t6{constructor(e,r,n,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,eo.number(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Noe(this.state)}keccak(){_se(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){eo.exists(this);const{blockLen:r,state:n}=this;e=Ib(e);const i=e.length;for(let o=0;o=n&&this.keccak();const s=Math.min(n-this.posOut,o-i);e.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return eo.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(eo.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return e||(e=new v$(r,n,i,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=i,e.enableXOF=s,e.destroyed=this.destroyed,e}};const L0=(t,e,r)=>Tb(()=>new y$(e,t,r));L0(6,144,224/8);L0(6,136,256/8);L0(6,104,384/8);L0(6,72,512/8);L0(1,144,224/8);const Pse=L0(1,136,256/8);L0(1,104,384/8);L0(1,72,512/8);const w$=(t,e,r)=>Foe((n={})=>new y$(e,t,n.dkLen===void 0?r:n.dkLen,!0));w$(31,168,128/8);w$(31,136,256/8);let x$=!1;const E$=function(t){return Pse(t)};let A$=E$;function Ir(t){const e=qt(t,"data");return dt(A$(e))}Ir._=E$;Ir.lock=function(){x$=!0};Ir.register=function(t){if(x$)throw new TypeError("keccak256 is locked");A$=t};Object.freeze(Ir);var Ct={},r7={exports:{}},n7={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(t,e){var r=Rn,n=r.Buffer;function i(s,f){for(var d in s)f[d]=s[d]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=o);function o(s,f,d){return n(s,f,d)}o.prototype=Object.create(n.prototype),i(n,o),o.from=function(s,f,d){if(typeof s=="number")throw new TypeError("Argument must not be a number");return n(s,f,d)},o.alloc=function(s,f,d){if(typeof s!="number")throw new TypeError("Argument must be a number");var p=n(s);return f!==void 0?typeof d=="string"?p.fill(f,d):p.fill(f):p.fill(0),p},o.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n(s)},o.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(s)}})(n7,n7.exports);var Bt=n7.exports,o8=65536,Cse=4294967295;function Ise(){throw new Error(`Secure random number generation is not supported by this browser. +Use Chrome, Firefox or Internet Explorer 11`)}var Tse=Bt.Buffer,r6=et.crypto||et.msCrypto;r6&&r6.getRandomValues?r7.exports=Rse:r7.exports=Ise;function Rse(t,e){if(t>Cse)throw new RangeError("requested too many random bytes");var r=Tse.allocUnsafe(t);if(t>0)if(t>o8)for(var n=0;n0&&(s=r[0]),s instanceof Error)throw s;var f=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw f.context=s,f}var d=o[e];if(d===void 0)return!1;if(typeof d=="function")iT(d,this,r);else for(var p=d.length,b=T$(d,p),n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,kse(f)}return t}nr.prototype.addListener=function(e,r){return _$(this,e,r,!1)};nr.prototype.on=nr.prototype.addListener;nr.prototype.prependListener=function(e,r){return _$(this,e,r,!0)};function Bse(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function P$(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=Bse.bind(n);return i.listener=r,n.wrapFn=i,i}nr.prototype.once=function(e,r){return bw(r),this.on(e,P$(this,e,r)),this};nr.prototype.prependOnceListener=function(e,r){return bw(r),this.prependListener(e,P$(this,e,r)),this};nr.prototype.removeListener=function(e,r){var n,i,o,s,f;if(bw(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(o=-1,s=n.length-1;s>=0;s--)if(n[s]===r||n[s].listener===r){f=n[s].listener,o=s;break}if(o<0)return this;o===0?n.shift():Ose(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,f||r)}return this};nr.prototype.off=nr.prototype.removeListener;nr.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),s;for(i=0;i=0;i--)this.removeListener(e,r[i]);return this};function C$(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Nse(i):T$(i,i.length)}nr.prototype.listeners=function(e){return C$(this,e,!0)};nr.prototype.rawListeners=function(e){return C$(this,e,!1)};nr.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):I$.call(t,e)};nr.prototype.listenerCount=I$;function I$(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}nr.prototype.eventNames=function(){return this._eventsCount>0?Uv(this._events):[]};function T$(t,e){for(var r=new Array(e),n=0;n"u"||!hn?Lt:hn(Uint8Array),zu={"%AggregateError%":typeof AggregateError>"u"?Lt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Lt:ArrayBuffer,"%ArrayIteratorPrototype%":Jl&&hn?hn([][Symbol.iterator]()):Lt,"%AsyncFromSyncIteratorPrototype%":Lt,"%AsyncFunction%":sd,"%AsyncGenerator%":sd,"%AsyncGeneratorFunction%":sd,"%AsyncIteratorPrototype%":sd,"%Atomics%":typeof Atomics>"u"?Lt:Atomics,"%BigInt%":typeof BigInt>"u"?Lt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Lt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Lt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Lt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Lt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Lt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Lt:FinalizationRegistry,"%Function%":N$,"%GeneratorFunction%":sd,"%Int8Array%":typeof Int8Array>"u"?Lt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Lt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Lt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Jl&&hn?hn(hn([][Symbol.iterator]())):Lt,"%JSON%":typeof JSON=="object"?JSON:Lt,"%Map%":typeof Map>"u"?Lt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Jl||!hn?Lt:hn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Lt:Promise,"%Proxy%":typeof Proxy>"u"?Lt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Lt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Lt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Jl||!hn?Lt:hn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Lt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Jl&&hn?hn(""[Symbol.iterator]()):Lt,"%Symbol%":Jl?Symbol:Lt,"%SyntaxError%":lp,"%ThrowTypeError%":Zse,"%TypedArray%":Qse,"%TypeError%":Wd,"%Uint8Array%":typeof Uint8Array>"u"?Lt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Lt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Lt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Lt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Lt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Lt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Lt:WeakSet};if(hn)try{null.error}catch(t){var Xse=hn(hn(t));zu["%Error.prototype%"]=Xse}var eae=function t(e){var r;if(e==="%AsyncFunction%")r=a8("async function () {}");else if(e==="%GeneratorFunction%")r=a8("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=a8("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&hn&&(r=hn(i.prototype))}return zu[e]=r,r},fT={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},kb=JS,n6=Jse,tae=kb.call(Function.call,Array.prototype.concat),rae=kb.call(Function.apply,Array.prototype.splice),cT=kb.call(Function.call,String.prototype.replace),i6=kb.call(Function.call,String.prototype.slice),nae=kb.call(Function.call,RegExp.prototype.exec),iae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oae=/\\(\\)?/g,sae=function(e){var r=i6(e,0,1),n=i6(e,-1);if(r==="%"&&n!=="%")throw new lp("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new lp("invalid intrinsic syntax, expected opening `%`");var i=[];return cT(e,iae,function(o,s,f,d){i[i.length]=f?cT(d,oae,"$1"):s||o}),i},aae=function(e,r){var n=e,i;if(n6(fT,n)&&(i=fT[n],n="%"+i[0]+"%"),n6(zu,n)){var o=zu[n];if(o===sd&&(o=eae(n)),typeof o>"u"&&!r)throw new Wd("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new lp("intrinsic "+e+" does not exist!")},D0=function(e,r){if(typeof e!="string"||e.length===0)throw new Wd("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Wd('"allowMissing" argument must be a boolean');if(nae(/^%?[^%]*%?$/,e)===null)throw new lp("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=sae(e),i=n.length>0?n[0]:"",o=aae("%"+i+"%",r),s=o.name,f=o.value,d=!1,p=o.alias;p&&(i=p[0],rae(n,tae([0,1],p)));for(var b=1,v=!0;b=n.length){var P=Uu(f,A);v=!!P,v&&"get"in P&&!("originalValue"in P.get)?f=P.get:f=f[A]}else v=n6(f,A),f=f[A];v&&!d&&(zu[s]=f)}}return f},L$={exports:{}};(function(t){var e=JS,r=D0,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),o=r("%Reflect.apply%",!0)||e.call(i,n),s=r("%Object.getOwnPropertyDescriptor%",!0),f=r("%Object.defineProperty%",!0),d=r("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}t.exports=function(v){var A=o(e,i,arguments);if(s&&f){var _=s(A,"length");_.configurable&&f(A,"length",{value:1+d(0,v.length-(arguments.length-1))})}return A};var p=function(){return o(e,n,arguments)};f?f(t.exports,"apply",{value:p}):t.exports.apply=p})(L$);var fae=L$.exports,D$=D0,F$=fae,cae=F$(D$("String.prototype.indexOf")),uae=function(e,r){var n=D$(e,!!r);return typeof n=="function"&&cae(e,".prototype.")>-1?F$(n):n},lae=WS(),dae=uae,s7=dae("Object.prototype.toString"),vw=function(e){return lae&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:s7(e)==="[object Arguments]"},$$=function(e){return vw(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&s7(e)!=="[object Array]"&&s7(e.callee)==="[object Function]"},hae=function(){return vw(arguments)}();vw.isLegacyArguments=$$;var pae=hae?vw:$$,mae=Object.prototype.toString,gae=Function.prototype.toString,bae=/^\s*(?:function)?\*/,U$=WS(),c8=Object.getPrototypeOf,yae=function(){if(!U$)return!1;try{return Function("return function*() {}")()}catch{}},u8,vae=function(e){if(typeof e!="function")return!1;if(bae.test(gae.call(e)))return!0;if(!U$){var r=mae.call(e);return r==="[object GeneratorFunction]"}if(!c8)return!1;if(typeof u8>"u"){var n=yae();u8=n?c8(n):!1}return c8(e)===u8},z$=Function.prototype.toString,Id=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,a7,zv;if(typeof Id=="function"&&typeof Object.defineProperty=="function")try{a7=Object.defineProperty({},"length",{get:function(){throw zv}}),zv={},Id(function(){throw 42},null,a7)}catch(t){t!==zv&&(Id=null)}else Id=null;var wae=/^\s*class\b/,f7=function(e){try{var r=z$.call(e);return wae.test(r)}catch{return!1}},l8=function(e){try{return f7(e)?!1:(z$.call(e),!0)}catch{return!1}},jv=Object.prototype.toString,xae="[object Object]",Eae="[object Function]",Aae="[object GeneratorFunction]",Sae="[object HTMLAllCollection]",Mae="[object HTML document.all class]",_ae="[object HTMLCollection]",Pae=typeof Symbol=="function"&&!!Symbol.toStringTag,Cae=!(0 in[,]),c7=function(){return!1};if(typeof document=="object"){var Iae=document.all;jv.call(Iae)===jv.call(document.all)&&(c7=function(e){if((Cae||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=jv.call(e);return(r===Sae||r===Mae||r===_ae||r===xae)&&e("")==null}catch{}return!1})}var Tae=Id?function(e){if(c7(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Id(e,null,a7)}catch(r){if(r!==zv)return!1}return!f7(e)&&l8(e)}:function(e){if(c7(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Pae)return l8(e);if(f7(e))return!1;var r=jv.call(e);return r!==Eae&&r!==Aae&&!/^\[object HTML/.test(r)?!1:l8(e)},Rae=Tae,kae=Object.prototype.toString,j$=Object.prototype.hasOwnProperty,Bae=function(e,r,n){for(var i=0,o=e.length;i=3&&(i=n),kae.call(e)==="[object Array]"?Bae(e,r,i):typeof e=="string"?Oae(e,r,i):Nae(e,r,i)},Dae=Lae,d8=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],Fae=typeof globalThis>"u"?et:globalThis,$ae=function(){for(var e=[],r=0;r3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Zl("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Zl("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Zl("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Zl("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,d=!!lT&&lT(e,r);if(Nm)Nm(e,r,{configurable:s===null&&d?d.configurable:!s,enumerable:i===null&&d?d.enumerable:!i,value:n,writable:o===null&&d?d.writable:!o});else if(f||!i&&!o&&!s)e[r]=n;else throw new Qae("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},G$=D0,dT=Xae,efe=q$(),hT=ZS,pT=G$("%TypeError%"),tfe=G$("%Math.floor%"),rfe=function(e,r){if(typeof e!="function")throw new pT("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||tfe(r)!==r)throw new pT("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&hT){var s=hT(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!n)&&(efe?dT(e,"length",r,!0,!0):dT(e,"length",r)),e};(function(t){var e=Wae,r=D0,n=rfe,i=r("%TypeError%"),o=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),f=r("%Reflect.apply%",!0)||e.call(s,o),d=r("%Object.defineProperty%",!0),p=r("%Math.max%");if(d)try{d({},"a",{value:1})}catch{d=null}t.exports=function(A){if(typeof A!="function")throw new i("a function is required");var _=f(e,s,arguments);return n(_,1+p(0,A.length-(arguments.length-1)),!0)};var b=function(){return f(e,o,arguments)};d?d(t.exports,"apply",{value:b}):t.exports.apply=b})(H$);var V$=H$.exports,K$=D0,W$=V$,nfe=W$(K$("String.prototype.indexOf")),ife=function(e,r){var n=K$(e,!!r);return typeof n=="function"&&nfe(e,".prototype.")>-1?W$(n):n},o6=Dae,ofe=$ae,mT=V$,QS=ife,qv=ZS,sfe=QS("Object.prototype.toString"),J$=WS(),gT=typeof globalThis>"u"?et:globalThis,d7=ofe(),XS=QS("String.prototype.slice"),h8=Object.getPrototypeOf,afe=QS("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n-1?r:r!=="Object"?!1:cfe(e)}return qv?ffe(e):null},ufe=Z$,lfe=function(e){return!!ufe(e)};(function(t){var e=pae,r=vae,n=Z$,i=lfe;function o(oe){return oe.call.bind(oe)}var s=typeof BigInt<"u",f=typeof Symbol<"u",d=o(Object.prototype.toString),p=o(Number.prototype.valueOf),b=o(String.prototype.valueOf),v=o(Boolean.prototype.valueOf);if(s)var A=o(BigInt.prototype.valueOf);if(f)var _=o(Symbol.prototype.valueOf);function S(oe,Xe){if(typeof oe!="object")return!1;try{return Xe(oe),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=i;function P(oe){return typeof Promise<"u"&&oe instanceof Promise||oe!==null&&typeof oe=="object"&&typeof oe.then=="function"&&typeof oe.catch=="function"}t.isPromise=P;function I(oe){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(oe):i(oe)||B(oe)}t.isArrayBufferView=I;function C(oe){return n(oe)==="Uint8Array"}t.isUint8Array=C;function T(oe){return n(oe)==="Uint8ClampedArray"}t.isUint8ClampedArray=T;function k(oe){return n(oe)==="Uint16Array"}t.isUint16Array=k;function O(oe){return n(oe)==="Uint32Array"}t.isUint32Array=O;function D(oe){return n(oe)==="Int8Array"}t.isInt8Array=D;function U(oe){return n(oe)==="Int16Array"}t.isInt16Array=U;function V(oe){return n(oe)==="Int32Array"}t.isInt32Array=V;function Y(oe){return n(oe)==="Float32Array"}t.isFloat32Array=Y;function W(oe){return n(oe)==="Float64Array"}t.isFloat64Array=W;function ie(oe){return n(oe)==="BigInt64Array"}t.isBigInt64Array=ie;function x(oe){return n(oe)==="BigUint64Array"}t.isBigUint64Array=x;function a(oe){return d(oe)==="[object Map]"}a.working=typeof Map<"u"&&a(new Map);function u(oe){return typeof Map>"u"?!1:a.working?a(oe):oe instanceof Map}t.isMap=u;function l(oe){return d(oe)==="[object Set]"}l.working=typeof Set<"u"&&l(new Set);function h(oe){return typeof Set>"u"?!1:l.working?l(oe):oe instanceof Set}t.isSet=h;function m(oe){return d(oe)==="[object WeakMap]"}m.working=typeof WeakMap<"u"&&m(new WeakMap);function w(oe){return typeof WeakMap>"u"?!1:m.working?m(oe):oe instanceof WeakMap}t.isWeakMap=w;function E(oe){return d(oe)==="[object WeakSet]"}E.working=typeof WeakSet<"u"&&E(new WeakSet);function y(oe){return E(oe)}t.isWeakSet=y;function c(oe){return d(oe)==="[object ArrayBuffer]"}c.working=typeof ArrayBuffer<"u"&&c(new ArrayBuffer);function g(oe){return typeof ArrayBuffer>"u"?!1:c.working?c(oe):oe instanceof ArrayBuffer}t.isArrayBuffer=g;function M(oe){return d(oe)==="[object DataView]"}M.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&M(new DataView(new ArrayBuffer(1),0,1));function B(oe){return typeof DataView>"u"?!1:M.working?M(oe):oe instanceof DataView}t.isDataView=B;var L=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function R(oe){return d(oe)==="[object SharedArrayBuffer]"}function F(oe){return typeof L>"u"?!1:(typeof R.working>"u"&&(R.working=R(new L)),R.working?R(oe):oe instanceof L)}t.isSharedArrayBuffer=F;function z(oe){return d(oe)==="[object AsyncFunction]"}t.isAsyncFunction=z;function K(oe){return d(oe)==="[object Map Iterator]"}t.isMapIterator=K;function q(oe){return d(oe)==="[object Set Iterator]"}t.isSetIterator=q;function Q(oe){return d(oe)==="[object Generator]"}t.isGeneratorObject=Q;function G(oe){return d(oe)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=G;function H(oe){return S(oe,p)}t.isNumberObject=H;function ee(oe){return S(oe,b)}t.isStringObject=ee;function ue(oe){return S(oe,v)}t.isBooleanObject=ue;function fe(oe){return s&&S(oe,A)}t.isBigIntObject=fe;function he(oe){return f&&S(oe,_)}t.isSymbolObject=he;function He(oe){return H(oe)||ee(oe)||ue(oe)||fe(oe)||he(oe)}t.isBoxedPrimitive=He;function be(oe){return typeof Uint8Array<"u"&&(g(oe)||F(oe))}t.isAnyArrayBuffer=be,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(oe){Object.defineProperty(t,oe,{enumerable:!1,value:function(){throw new Error(oe+" is not supported in userland")}})})})(B$);var dfe=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"};(function(t){var e=Object.getOwnPropertyDescriptors||function(B){for(var L=Object.keys(B),R={},F=0;F=F)return q;switch(q){case"%s":return String(R[L++]);case"%d":return Number(R[L++]);case"%j":try{return JSON.stringify(R[L++])}catch{return"[Circular]"}default:return q}}),K=R[L];L"u")return function(){return t.deprecate(M,B).apply(this,arguments)};var L=!1;function R(){if(!L){if(Je.process.throwDeprecation)throw new Error(B);Je.process.traceDeprecation?console.trace(B):console.error(B),L=!0}return M.apply(this,arguments)}return R};var n={},i=/^$/;if({}.NODE_DEBUG){var o={}.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}t.debuglog=function(M){if(M=M.toUpperCase(),!n[M])if(i.test(M)){var B=Je.process.pid;n[M]=function(){var L=t.format.apply(t,arguments);console.error("%s %d: %s",M,B,L)}}else n[M]=function(){};return n[M]};function s(M,B){var L={seen:[],stylize:d};return arguments.length>=3&&(L.depth=arguments[2]),arguments.length>=4&&(L.colors=arguments[3]),C(B)?L.showHidden=B:B&&t._extend(L,B),V(L.showHidden)&&(L.showHidden=!1),V(L.depth)&&(L.depth=2),V(L.colors)&&(L.colors=!1),V(L.customInspect)&&(L.customInspect=!0),L.colors&&(L.stylize=f),b(L,M,L.depth)}t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function f(M,B){var L=s.styles[B];return L?"\x1B["+s.colors[L][0]+"m"+M+"\x1B["+s.colors[L][1]+"m":M}function d(M,B){return M}function p(M){var B={};return M.forEach(function(L,R){B[L]=!0}),B}function b(M,B,L){if(M.customInspect&&B&&a(B.inspect)&&B.inspect!==t.inspect&&!(B.constructor&&B.constructor.prototype===B)){var R=B.inspect(L,M);return D(R)||(R=b(M,R,L)),R}var F=v(M,B);if(F)return F;var z=Object.keys(B),K=p(z);if(M.showHidden&&(z=Object.getOwnPropertyNames(B)),x(B)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return A(B);if(z.length===0){if(a(B)){var q=B.name?": "+B.name:"";return M.stylize("[Function"+q+"]","special")}if(Y(B))return M.stylize(RegExp.prototype.toString.call(B),"regexp");if(ie(B))return M.stylize(Date.prototype.toString.call(B),"date");if(x(B))return A(B)}var Q="",G=!1,H=["{","}"];if(I(B)&&(G=!0,H=["[","]"]),a(B)){var ee=B.name?": "+B.name:"";Q=" [Function"+ee+"]"}if(Y(B)&&(Q=" "+RegExp.prototype.toString.call(B)),ie(B)&&(Q=" "+Date.prototype.toUTCString.call(B)),x(B)&&(Q=" "+A(B)),z.length===0&&(!G||B.length==0))return H[0]+Q+H[1];if(L<0)return Y(B)?M.stylize(RegExp.prototype.toString.call(B),"regexp"):M.stylize("[Object]","special");M.seen.push(B);var ue;return G?ue=_(M,B,L,K,z):ue=z.map(function(fe){return S(M,B,L,K,fe,G)}),M.seen.pop(),P(ue,Q,H)}function v(M,B){if(V(B))return M.stylize("undefined","undefined");if(D(B)){var L="'"+JSON.stringify(B).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(L,"string")}if(O(B))return M.stylize(""+B,"number");if(C(B))return M.stylize(""+B,"boolean");if(T(B))return M.stylize("null","null")}function A(M){return"["+Error.prototype.toString.call(M)+"]"}function _(M,B,L,R,F){for(var z=[],K=0,q=B.length;K-1&&(z?q=q.split(` `).map(function(G){return" "+G}).join(` `).slice(2):q=` `+q.split(` `).map(function(G){return" "+G}).join(` -`))):q=M.stylize("[Circular]","special")),K(V)){if(z&&F.match(/^\d+$/))return q;V=JSON.stringify(""+F),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=M.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=M.stylize(V,"string"))}return V+": "+q}function P(M,k,L){var R=M.reduce(function(F,z){return z.indexOf(` -`)>=0,F+z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return R>60?L[0]+(k===""?"":k+` +`))):q=M.stylize("[Circular]","special")),V(K)){if(z&&F.match(/^\d+$/))return q;K=JSON.stringify(""+F),K.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(K=K.slice(1,-1),K=M.stylize(K,"name")):(K=K.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),K=M.stylize(K,"string"))}return K+": "+q}function P(M,B,L){var R=M.reduce(function(F,z){return z.indexOf(` +`)>=0,F+z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return R>60?L[0]+(B===""?"":B+` `)+" "+M.join(`, - `)+" "+L[1]:L[0]+k+" "+M.join(", ")+" "+L[1]}t.types=B$;function I(M){return Array.isArray(M)}t.isArray=I;function C(M){return typeof M=="boolean"}t.isBoolean=C;function T(M){return M===null}t.isNull=T;function O(M){return M==null}t.isNullOrUndefined=O;function B(M){return typeof M=="number"}t.isNumber=B;function D(M){return typeof M=="string"}t.isString=D;function U(M){return typeof M=="symbol"}t.isSymbol=U;function K(M){return M===void 0}t.isUndefined=K;function Y(M){return W(M)&&l(M)==="[object RegExp]"}t.isRegExp=Y,t.types.isRegExp=Y;function W(M){return typeof M=="object"&&M!==null}t.isObject=W;function ie(M){return W(M)&&l(M)==="[object Date]"}t.isDate=ie,t.types.isDate=ie;function x(M){return W(M)&&(l(M)==="[object Error]"||M instanceof Error)}t.isError=x,t.types.isNativeError=x;function a(M){return typeof M=="function"}t.isFunction=a;function u(M){return M===null||typeof M=="boolean"||typeof M=="number"||typeof M=="string"||typeof M=="symbol"||typeof M>"u"}t.isPrimitive=u,t.isBuffer=dfe;function l(M){return Object.prototype.toString.call(M)}function h(M){return M<10?"0"+M.toString(10):M.toString(10)}var m=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(){var M=new Date,k=[h(M.getHours()),h(M.getMinutes()),h(M.getSeconds())].join(":");return[M.getDate(),m[M.getMonth()],k].join(" ")}t.log=function(){console.log("%s - %s",w(),t.format.apply(t,arguments))},t.inherits=Rt,t._extend=function(M,k){if(!k||!W(k))return M;for(var L=Object.keys(k),R=L.length;R--;)M[L[R]]=k[L[R]];return M};function E(M,k){return Object.prototype.hasOwnProperty.call(M,k)}var y=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(k){if(typeof k!="function")throw new TypeError('The "original" argument must be of type Function');if(y&&k[y]){var L=k[y];if(typeof L!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(L,y,{value:L,enumerable:!1,writable:!1,configurable:!0}),L}function L(){for(var R,F,z=new Promise(function(Q,G){R=Q,F=G}),V=[],q=0;q0?this.tail.next=C:this.head=C,this.tail=C,++this.length}},{key:"unshift",value:function(I){var C={data:I,next:this.head};this.length===0&&(this.tail=C),this.head=C,++this.length}},{key:"shift",value:function(){if(this.length!==0){var I=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,I}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(I){if(this.length===0)return"";for(var C=this.head,T=""+C.data;C=C.next;)T+=I+C.data;return T}},{key:"concat",value:function(I){if(this.length===0)return p.alloc(0);for(var C=p.allocUnsafe(I>>>0),T=this.head,O=0;T;)_(T.data,C,O),O+=T.data.length,T=T.next;return C}},{key:"consume",value:function(I,C){var T;return IB.length?B.length:I;if(D===B.length?O+=B:O+=B.slice(0,I),I-=D,I===0){D===B.length?(++T,C.next?this.head=C.next:this.head=this.tail=null):(this.head=C,C.data=B.slice(D));break}++T}return this.length-=T,O}},{key:"_getBuffer",value:function(I){var C=p.allocUnsafe(I),T=this.head,O=1;for(T.data.copy(C),I-=T.data.length;T=T.next;){var B=T.data,D=I>B.length?B.length:I;if(B.copy(C,C.length-I,0,D),I-=D,I===0){D===B.length?(++O,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=B.slice(D));break}++O}return this.length-=O,C}},{key:A,value:function(I,C){return v(this,e(e({},C),{},{depth:0,customInspect:!1}))}}]),S}(),p8}function pfe(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Je.process.nextTick(h7,this,t)):Je.process.nextTick(h7,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?Je.process.nextTick(Gv,r):(r._writableState.errorEmitted=!0,Je.process.nextTick(yT,r,o)):Je.process.nextTick(yT,r,o):e?(Je.process.nextTick(Gv,r),e(o)):Je.process.nextTick(Gv,r)}),this)}function yT(t,e){h7(t,e),Gv(t)}function Gv(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function mfe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function h7(t,e){t.emit("error",e)}function gfe(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}var Y$={destroy:pfe,undestroy:mfe,errorOrDestroy:gfe},Ml={};function bfe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Q$={};function is(t,e,r){r||(r=Error);function n(o,s,f){return typeof e=="string"?e:e(o,s,f)}var i=function(o){bfe(s,o);function s(f,d,p){return o.call(this,n(f,d,p))||this}return s}(r);i.prototype.name=r.name,i.prototype.code=t,Q$[t]=i}function vT(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function yfe(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function vfe(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function wfe(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}is("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);is("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&yfe(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(vfe(t," argument"))i="The ".concat(t," ").concat(n," ").concat(vT(e,"type"));else{var o=wfe(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(o," ").concat(n," ").concat(vT(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);is("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");is("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});is("ERR_STREAM_PREMATURE_CLOSE","Premature close");is("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});is("ERR_MULTIPLE_CALLBACK","Callback called multiple times");is("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");is("ERR_STREAM_WRITE_AFTER_END","write after end");is("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);is("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);is("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Ml.codes=Q$;var xfe=Ml.codes.ERR_INVALID_OPT_VALUE;function Efe(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Afe(t,e,r,n){var i=Efe(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new xfe(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}var X$={getHighWaterMark:Afe},Sfe=Mfe;function Mfe(t,e){if(m8("noDeprecation"))return t;var r=!1;function n(){if(!r){if(m8("throwDeprecation"))throw new Error(e);m8("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function m8(t){try{if(!et.localStorage)return!1}catch{return!1}var e=et.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var g8,wT;function eM(){if(wT)return g8;wT=1,g8=Y;function t(F){var z=this;this.next=null,this.entry=null,this.finish=function(){R(z,F)}}var e;Y.WritableState=U;var r={deprecate:Sfe},n=k$,i=Rn.Buffer,o=(typeof et<"u"?et:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(F){return i.from(F)}function f(F){return i.isBuffer(F)||F instanceof o}var d=Y$,p=X$,b=p.getHighWaterMark,v=Ml.codes,A=v.ERR_INVALID_ARG_TYPE,_=v.ERR_METHOD_NOT_IMPLEMENTED,S=v.ERR_MULTIPLE_CALLBACK,P=v.ERR_STREAM_CANNOT_PIPE,I=v.ERR_STREAM_DESTROYED,C=v.ERR_STREAM_NULL_VALUES,T=v.ERR_STREAM_WRITE_AFTER_END,O=v.ERR_UNKNOWN_ENCODING,B=d.errorOrDestroy;Rt(Y,n);function D(){}function U(F,z,V){e=e||nl(),F=F||{},typeof V!="boolean"&&(V=z instanceof e),this.objectMode=!!F.objectMode,V&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=b(this,F,"writableHighWaterMark",V),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=F.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){m(z,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=F.emitClose!==!1,this.autoDestroy=!!F.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}U.prototype.getBuffer=function(){for(var z=this.bufferedRequest,V=[];z;)V.push(z),z=z.next;return V},function(){try{Object.defineProperty(U.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var K;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(K=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(z){return K.call(this,z)?!0:this!==Y?!1:z&&z._writableState instanceof U}})):K=function(z){return z instanceof this};function Y(F){e=e||nl();var z=this instanceof e;if(!z&&!K.call(Y,this))return new Y(F);this._writableState=new U(F,this,z),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),n.call(this)}Y.prototype.pipe=function(){B(this,new P)};function W(F,z){var V=new T;B(F,V),Je.process.nextTick(z,V)}function ie(F,z,V,q){var Q;return V===null?Q=new C:typeof V!="string"&&!z.objectMode&&(Q=new A("chunk",["string","Buffer"],V)),Q?(B(F,Q),Je.process.nextTick(q,Q),!1):!0}Y.prototype.write=function(F,z,V){var q=this._writableState,Q=!1,G=!q.objectMode&&f(F);return G&&!i.isBuffer(F)&&(F=s(F)),typeof z=="function"&&(V=z,z=null),G?z="buffer":z||(z=q.defaultEncoding),typeof V!="function"&&(V=D),q.ending?W(this,V):(G||ie(this,q,F,V))&&(q.pendingcb++,Q=a(this,q,G,F,z,V)),Q},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&y(this,F))},Y.prototype.setDefaultEncoding=function(z){if(typeof z=="string"&&(z=z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((z+"").toLowerCase())>-1))throw new O(z);return this._writableState.defaultEncoding=z,this},Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(F,z,V){return!F.objectMode&&F.decodeStrings!==!1&&typeof z=="string"&&(z=i.from(z,V)),z}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a(F,z,V,q,Q,G){if(!V){var H=x(z,q,Q);q!==H&&(V=!0,Q="buffer",q=H)}var ee=z.objectMode?1:q.length;z.length+=ee;var ue=z.length>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Cfe(t,e,r){var n=e.length-1;if(n=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function Ife(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function Tfe(t){var e=this.lastTotal-this.lastNeed,r=Ife(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Rfe(t,e){var r=Cfe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function kfe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function Bfe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Ofe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Nfe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Lfe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Dfe(t){return t.toString(this.encoding)}function Ffe(t){return t&&t.length?this.write(t):""}var AT=Ml.codes.ERR_STREAM_PREMATURE_CLOSE;function $fe(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i0)if(typeof H!="string"&&!he.objectMode&&Object.getPrototypeOf(H)!==n.prototype&&(H=o(H)),ue)he.endEmitted?D(G,new C):x(G,he,H,!0);else if(he.ended)D(G,new P);else{if(he.destroyed)return!1;he.reading=!1,he.decoder&&!ee?(H=he.decoder.write(H),he.objectMode||H.length!==0?x(G,he,H,!1):y(G,he)):x(G,he,H,!1)}else ue||(he.reading=!1,y(G,he))}return!he.ended&&(he.length=u?G=u:(G--,G|=G>>>1,G|=G>>>2,G|=G>>>4,G|=G>>>8,G|=G>>>16,G++),G}function h(G,H){return G<=0||H.length===0&&H.ended?0:H.objectMode?1:G!==G?H.flowing&&H.length?H.buffer.head.data.length:H.length:(G>H.highWaterMark&&(H.highWaterMark=l(G)),G<=H.length?G:H.ended?H.length:(H.needReadable=!0,0))}W.prototype.read=function(G){d("read",G),G=parseInt(G,10);var H=this._readableState,ee=G;if(G!==0&&(H.emittedReadable=!1),G===0&&H.needReadable&&((H.highWaterMark!==0?H.length>=H.highWaterMark:H.length>0)||H.ended))return d("read: emitReadable",H.length,H.ended),H.length===0&&H.ended?V(this):w(this),null;if(G=h(G,H),G===0&&H.ended)return H.length===0&&V(this),null;var ue=H.needReadable;d("need readable",ue),(H.length===0||H.length-G0?fe=z(G,H):fe=null,fe===null?(H.needReadable=H.length<=H.highWaterMark,G=0):(H.length-=G,H.awaitDrain=0),H.length===0&&(H.ended||(H.needReadable=!0),ee!==G&&H.ended&&V(this)),fe!==null&&this.emit("data",fe),fe};function m(G,H){if(d("onEofChunk"),!H.ended){if(H.decoder){var ee=H.decoder.end();ee&&ee.length&&(H.buffer.push(ee),H.length+=H.objectMode?1:ee.length)}H.ended=!0,H.sync?w(G):(H.needReadable=!1,H.emittedReadable||(H.emittedReadable=!0,E(G)))}}function w(G){var H=G._readableState;d("emitReadable",H.needReadable,H.emittedReadable),H.needReadable=!1,H.emittedReadable||(d("emitReadable",H.flowing),H.emittedReadable=!0,Je.process.nextTick(E,G))}function E(G){var H=G._readableState;d("emitReadable_",H.destroyed,H.length,H.ended),!H.destroyed&&(H.length||H.ended)&&(G.emit("readable"),H.emittedReadable=!1),H.needReadable=!H.flowing&&!H.ended&&H.length<=H.highWaterMark,F(G)}function y(G,H){H.readingMore||(H.readingMore=!0,Je.process.nextTick(c,G,H))}function c(G,H){for(;!H.reading&&!H.ended&&(H.length1&&Q(ue.pipes,G)!==-1)&&!Xe&&(d("false write response, pause",ue.awaitDrain),ue.awaitDrain++),ee.pause())}function it(j){d("onerror",j),lt(),G.removeListener("error",it),e(G,"error")===0&&D(G,j)}K(G,"error",it);function Pe(){G.removeListener("finish",Te),lt()}G.once("close",Pe);function Te(){d("onfinish"),G.removeListener("close",Pe),lt()}G.once("finish",Te);function lt(){d("unpipe"),ee.unpipe(G)}return G.emit("pipe",ee),ue.flowing||(d("pipe resume"),ee.resume()),G};function g(G){return function(){var ee=G._readableState;d("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&e(G,"data")&&(ee.flowing=!0,F(G))}}W.prototype.unpipe=function(G){var H=this._readableState,ee={hasUnpiped:!1};if(H.pipesCount===0)return this;if(H.pipesCount===1)return G&&G!==H.pipes?this:(G||(G=H.pipes),H.pipes=null,H.pipesCount=0,H.flowing=!1,G&&G.emit("unpipe",this,ee),this);if(!G){var ue=H.pipes,fe=H.pipesCount;H.pipes=null,H.pipesCount=0,H.flowing=!1;for(var he=0;he0,ue.flowing!==!1&&this.resume()):G==="readable"&&!ue.endEmitted&&!ue.readableListening&&(ue.readableListening=ue.needReadable=!0,ue.flowing=!1,ue.emittedReadable=!1,d("on readable",ue.length,ue.reading),ue.length?w(this):ue.reading||Je.process.nextTick(k,this)),ee},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(G,H){var ee=r.prototype.removeListener.call(this,G,H);return G==="readable"&&Je.process.nextTick(M,this),ee},W.prototype.removeAllListeners=function(G){var H=r.prototype.removeAllListeners.apply(this,arguments);return(G==="readable"||G===void 0)&&Je.process.nextTick(M,this),H};function M(G){var H=G._readableState;H.readableListening=G.listenerCount("readable")>0,H.resumeScheduled&&!H.paused?H.flowing=!0:G.listenerCount("data")>0&&G.resume()}function k(G){d("readable nexttick read 0"),G.read(0)}W.prototype.resume=function(){var G=this._readableState;return G.flowing||(d("resume"),G.flowing=!G.readableListening,L(this,G)),G.paused=!1,this};function L(G,H){H.resumeScheduled||(H.resumeScheduled=!0,Je.process.nextTick(R,G,H))}function R(G,H){d("resume",H.reading),H.reading||G.read(0),H.resumeScheduled=!1,G.emit("resume"),F(G),H.flowing&&!H.reading&&G.read(0)}W.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function F(G){var H=G._readableState;for(d("flow",H.flowing);H.flowing&&G.read()!==null;);}W.prototype.wrap=function(G){var H=this,ee=this._readableState,ue=!1;G.on("end",function(){if(d("wrapped end"),ee.decoder&&!ee.ended){var He=ee.decoder.end();He&&He.length&&H.push(He)}H.push(null)}),G.on("data",function(He){if(d("wrapped data"),ee.decoder&&(He=ee.decoder.write(He)),!(ee.objectMode&&He==null)&&!(!ee.objectMode&&(!He||!He.length))){var be=H.push(He);be||(ue=!0,G.pause())}});for(var fe in G)this[fe]===void 0&&typeof G[fe]=="function"&&(this[fe]=function(be){return function(){return G[be].apply(G,arguments)}}(fe));for(var he=0;he=H.length?(H.decoder?ee=H.buffer.join(""):H.buffer.length===1?ee=H.buffer.first():ee=H.buffer.concat(H.length),H.buffer.clear()):ee=H.buffer.consume(G,H.decoder),ee}function V(G){var H=G._readableState;d("endReadable",H.endEmitted),H.endEmitted||(H.ended=!0,Je.process.nextTick(q,H,G))}function q(G,H){if(d("endReadableNT",G.endEmitted,G.length),!G.endEmitted&&G.length===0&&(G.endEmitted=!0,H.readable=!1,H.emit("end"),G.autoDestroy)){var ee=H._writableState;(!ee||ee.autoDestroy&&ee.finished)&&H.destroy()}}typeof Symbol=="function"&&(W.from=function(G,H){return B===void 0&&(B=Hfe()),B(W,G,H)});function Q(G,H){for(var ee=0,ue=G.length;ee0;return ece(s,d,p,function(b){i||(i=b),b&&o.forEach(IT),!d&&(o.forEach(IT),n(i))})});return e.reduce(tce)}var iU=nce;(function(t,e){e=t.exports=rM(),e.Stream=e,e.Readable=e,e.Writable=eM(),e.Duplex=nl(),e.Transform=nM,e.PassThrough=tU,e.finished=ww,e.pipeline=iU})(o7,o7.exports);var oU=o7.exports,f6=Bt.Buffer,sU=oU.Transform,ice=Rt;function oce(t,e){if(!f6.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function F0(t){sU.call(this),this._block=f6.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}ice(F0,sU);F0.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)};F0.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};F0.prototype.update=function(t,e){if(oce(t,"Data"),this._finalized)throw new Error("Digest already called");f6.isBuffer(t)||(t=f6.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var i=this._blockOffset;i0;++o)this._length[o]+=s,s=this._length[o]/4294967296|0,s>0&&(this._length[o]-=4294967296*s);return this};F0.prototype._update=function(){throw new Error("_update is not implemented")};F0.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};F0.prototype._digest=function(){throw new Error("_digest is not implemented")};var aU=F0,sce=Rt,fU=aU,ace=Bt.Buffer,fce=new Array(16);function Aw(){fU.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}sce(Aw,fU);Aw.prototype._update=function(){for(var t=fce,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,n=this._b,i=this._c,o=this._d;r=Ln(r,n,i,o,t[0],3614090360,7),o=Ln(o,r,n,i,t[1],3905402710,12),i=Ln(i,o,r,n,t[2],606105819,17),n=Ln(n,i,o,r,t[3],3250441966,22),r=Ln(r,n,i,o,t[4],4118548399,7),o=Ln(o,r,n,i,t[5],1200080426,12),i=Ln(i,o,r,n,t[6],2821735955,17),n=Ln(n,i,o,r,t[7],4249261313,22),r=Ln(r,n,i,o,t[8],1770035416,7),o=Ln(o,r,n,i,t[9],2336552879,12),i=Ln(i,o,r,n,t[10],4294925233,17),n=Ln(n,i,o,r,t[11],2304563134,22),r=Ln(r,n,i,o,t[12],1804603682,7),o=Ln(o,r,n,i,t[13],4254626195,12),i=Ln(i,o,r,n,t[14],2792965006,17),n=Ln(n,i,o,r,t[15],1236535329,22),r=Dn(r,n,i,o,t[1],4129170786,5),o=Dn(o,r,n,i,t[6],3225465664,9),i=Dn(i,o,r,n,t[11],643717713,14),n=Dn(n,i,o,r,t[0],3921069994,20),r=Dn(r,n,i,o,t[5],3593408605,5),o=Dn(o,r,n,i,t[10],38016083,9),i=Dn(i,o,r,n,t[15],3634488961,14),n=Dn(n,i,o,r,t[4],3889429448,20),r=Dn(r,n,i,o,t[9],568446438,5),o=Dn(o,r,n,i,t[14],3275163606,9),i=Dn(i,o,r,n,t[3],4107603335,14),n=Dn(n,i,o,r,t[8],1163531501,20),r=Dn(r,n,i,o,t[13],2850285829,5),o=Dn(o,r,n,i,t[2],4243563512,9),i=Dn(i,o,r,n,t[7],1735328473,14),n=Dn(n,i,o,r,t[12],2368359562,20),r=Fn(r,n,i,o,t[5],4294588738,4),o=Fn(o,r,n,i,t[8],2272392833,11),i=Fn(i,o,r,n,t[11],1839030562,16),n=Fn(n,i,o,r,t[14],4259657740,23),r=Fn(r,n,i,o,t[1],2763975236,4),o=Fn(o,r,n,i,t[4],1272893353,11),i=Fn(i,o,r,n,t[7],4139469664,16),n=Fn(n,i,o,r,t[10],3200236656,23),r=Fn(r,n,i,o,t[13],681279174,4),o=Fn(o,r,n,i,t[0],3936430074,11),i=Fn(i,o,r,n,t[3],3572445317,16),n=Fn(n,i,o,r,t[6],76029189,23),r=Fn(r,n,i,o,t[9],3654602809,4),o=Fn(o,r,n,i,t[12],3873151461,11),i=Fn(i,o,r,n,t[15],530742520,16),n=Fn(n,i,o,r,t[2],3299628645,23),r=$n(r,n,i,o,t[0],4096336452,6),o=$n(o,r,n,i,t[7],1126891415,10),i=$n(i,o,r,n,t[14],2878612391,15),n=$n(n,i,o,r,t[5],4237533241,21),r=$n(r,n,i,o,t[12],1700485571,6),o=$n(o,r,n,i,t[3],2399980690,10),i=$n(i,o,r,n,t[10],4293915773,15),n=$n(n,i,o,r,t[1],2240044497,21),r=$n(r,n,i,o,t[8],1873313359,6),o=$n(o,r,n,i,t[15],4264355552,10),i=$n(i,o,r,n,t[6],2734768916,15),n=$n(n,i,o,r,t[13],1309151649,21),r=$n(r,n,i,o,t[4],4149444226,6),o=$n(o,r,n,i,t[11],3174756917,10),i=$n(i,o,r,n,t[2],718787259,15),n=$n(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0};Aw.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=ace.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function Sw(t,e){return t<>>32-e}function Ln(t,e,r,n,i,o,s){return Sw(t+(e&r|~e&n)+i+o|0,s)+e|0}function Dn(t,e,r,n,i,o,s){return Sw(t+(e&n|r&~n)+i+o|0,s)+e|0}function Fn(t,e,r,n,i,o,s){return Sw(t+(e^r^n)+i+o|0,s)+e|0}function $n(t,e,r,n,i,o,s){return Sw(t+(r^(e|~n))+i+o|0,s)+e|0}var iM=Aw,A8=Rn.Buffer,cce=Rt,cU=aU,uce=new Array(16),j1=[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],H1=[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],q1=[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],G1=[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],V1=[0,1518500249,1859775393,2400959708,2840853838],K1=[1352829926,1548603684,1836072691,2053994217,0];function Mw(){cU.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}cce(Mw,cU);Mw.prototype._update=function(){for(var t=uce,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,f=this._a|0,d=this._b|0,p=this._c|0,b=this._d|0,v=this._e|0,A=0;A<80;A+=1){var _,S;A<16?(_=TT(r,n,i,o,s,t[j1[A]],V1[0],q1[A]),S=OT(f,d,p,b,v,t[H1[A]],K1[0],G1[A])):A<32?(_=RT(r,n,i,o,s,t[j1[A]],V1[1],q1[A]),S=BT(f,d,p,b,v,t[H1[A]],K1[1],G1[A])):A<48?(_=kT(r,n,i,o,s,t[j1[A]],V1[2],q1[A]),S=kT(f,d,p,b,v,t[H1[A]],K1[2],G1[A])):A<64?(_=BT(r,n,i,o,s,t[j1[A]],V1[3],q1[A]),S=RT(f,d,p,b,v,t[H1[A]],K1[3],G1[A])):(_=OT(r,n,i,o,s,t[j1[A]],V1[4],q1[A]),S=TT(f,d,p,b,v,t[H1[A]],K1[4],G1[A])),r=s,s=o,o=il(i,10),i=n,n=_,f=v,v=b,b=il(p,10),p=d,d=S}var P=this._b+i+b|0;this._b=this._c+o+v|0,this._c=this._d+s+f|0,this._d=this._e+r+d|0,this._e=this._a+n+p|0,this._a=P};Mw.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=A8.alloc?A8.alloc(20):new A8(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};function il(t,e){return t<>>32-e}function TT(t,e,r,n,i,o,s,f){return il(t+(e^r^n)+o+s|0,f)+i|0}function RT(t,e,r,n,i,o,s,f){return il(t+(e&r|~e&n)+o+s|0,f)+i|0}function kT(t,e,r,n,i,o,s,f){return il(t+((e|~r)^n)+o+s|0,f)+i|0}function BT(t,e,r,n,i,o,s,f){return il(t+(e&n|r&~n)+o+s|0,f)+i|0}function OT(t,e,r,n,i,o,s,f){return il(t+(e^(r|~n))+o+s|0,f)+i|0}var oM=Mw,uU={exports:{}},lU=Bt.Buffer;function _w(t,e){this._block=lU.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}_w.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=lU.from(t,e));for(var r=this._block,n=this._blockSize,i=t.length,o=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o};_w.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var o1=_w,lce=Rt,dU=o1,dce=Bt.Buffer,hce=[1518500249,1859775393,-1894007588,-899497514],pce=new Array(80);function Ob(){this.init(),this._w=pce,dU.call(this,64,56)}lce(Ob,dU);Ob.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function mce(t){return t<<5|t>>>27}function gce(t){return t<<30|t>>>2}function bce(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Ob.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,f=0;f<16;++f)e[f]=t.readInt32BE(f*4);for(;f<80;++f)e[f]=e[f-3]^e[f-8]^e[f-14]^e[f-16];for(var d=0;d<80;++d){var p=~~(d/20),b=mce(r)+bce(p,n,i,o)+s+e[d]+hce[p]|0;s=o,o=i,i=gce(n),n=r,r=b}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0};Ob.prototype._hash=function(){var t=dce.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var yce=Ob,vce=Rt,hU=o1,wce=Bt.Buffer,xce=[1518500249,1859775393,-1894007588,-899497514],Ece=new Array(80);function Nb(){this.init(),this._w=Ece,hU.call(this,64,56)}vce(Nb,hU);Nb.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Ace(t){return t<<1|t>>>31}function Sce(t){return t<<5|t>>>27}function Mce(t){return t<<30|t>>>2}function _ce(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Nb.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,f=0;f<16;++f)e[f]=t.readInt32BE(f*4);for(;f<80;++f)e[f]=Ace(e[f-3]^e[f-8]^e[f-14]^e[f-16]);for(var d=0;d<80;++d){var p=~~(d/20),b=Sce(r)+_ce(p,n,i,o)+s+e[d]+xce[p]|0;s=o,o=i,i=Mce(n),n=r,r=b}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0};Nb.prototype._hash=function(){var t=wce.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var Pce=Nb,Cce=Rt,pU=o1,Ice=Bt.Buffer,Tce=[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],Rce=new Array(64);function Lb(){this.init(),this._w=Rce,pU.call(this,64,56)}Cce(Lb,pU);Lb.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function kce(t,e,r){return r^t&(e^r)}function Bce(t,e,r){return t&e|r&(t|e)}function Oce(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Nce(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Lce(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function Dce(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Lb.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,f=this._f|0,d=this._g|0,p=this._h|0,b=0;b<16;++b)e[b]=t.readInt32BE(b*4);for(;b<64;++b)e[b]=Dce(e[b-2])+e[b-7]+Lce(e[b-15])+e[b-16]|0;for(var v=0;v<64;++v){var A=p+Nce(s)+kce(s,f,d)+Tce[v]+e[v]|0,_=Oce(r)+Bce(r,n,i)|0;p=d,d=f,f=s,s=o+A|0,o=i,i=n,n=r,r=A+_|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=f+this._f|0,this._g=d+this._g|0,this._h=p+this._h|0};Lb.prototype._hash=function(){var t=Ice.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var mU=Lb,Fce=Rt,$ce=mU,Uce=o1,zce=Bt.Buffer,jce=new Array(64);function Pw(){this.init(),this._w=jce,Uce.call(this,64,56)}Fce(Pw,$ce);Pw.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Pw.prototype._hash=function(){var t=zce.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var Hce=Pw,qce=Rt,gU=o1,Gce=Bt.Buffer,NT=[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],Vce=new Array(160);function Db(){this.init(),this._w=Vce,gU.call(this,128,112)}qce(Db,gU);Db.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function LT(t,e,r){return r^t&(e^r)}function DT(t,e,r){return t&e|r&(t|e)}function FT(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function $T(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function Kce(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function Wce(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function Jce(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function Zce(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function ln(t,e){return t>>>0>>0?1:0}Db.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,o=this._dh|0,s=this._eh|0,f=this._fh|0,d=this._gh|0,p=this._hh|0,b=this._al|0,v=this._bl|0,A=this._cl|0,_=this._dl|0,S=this._el|0,P=this._fl|0,I=this._gl|0,C=this._hl|0,T=0;T<32;T+=2)e[T]=t.readInt32BE(T*4),e[T+1]=t.readInt32BE(T*4+4);for(;T<160;T+=2){var O=e[T-30],B=e[T-15*2+1],D=Kce(O,B),U=Wce(B,O);O=e[T-2*2],B=e[T-2*2+1];var K=Jce(O,B),Y=Zce(B,O),W=e[T-7*2],ie=e[T-7*2+1],x=e[T-16*2],a=e[T-16*2+1],u=U+ie|0,l=D+W+ln(u,U)|0;u=u+Y|0,l=l+K+ln(u,Y)|0,u=u+a|0,l=l+x+ln(u,a)|0,e[T]=l,e[T+1]=u}for(var h=0;h<160;h+=2){l=e[h],u=e[h+1];var m=DT(r,n,i),w=DT(b,v,A),E=FT(r,b),y=FT(b,r),c=$T(s,S),g=$T(S,s),M=NT[h],k=NT[h+1],L=LT(s,f,d),R=LT(S,P,I),F=C+g|0,z=p+c+ln(F,C)|0;F=F+R|0,z=z+L+ln(F,R)|0,F=F+k|0,z=z+M+ln(F,k)|0,F=F+u|0,z=z+l+ln(F,u)|0;var V=y+w|0,q=E+m+ln(V,y)|0;p=d,C=I,d=f,I=P,f=s,P=S,S=_+F|0,s=o+z+ln(S,_)|0,o=i,_=A,i=n,A=v,n=r,v=b,b=F+V|0,r=z+q+ln(b,F)|0}this._al=this._al+b|0,this._bl=this._bl+v|0,this._cl=this._cl+A|0,this._dl=this._dl+_|0,this._el=this._el+S|0,this._fl=this._fl+P|0,this._gl=this._gl+I|0,this._hl=this._hl+C|0,this._ah=this._ah+r+ln(this._al,b)|0,this._bh=this._bh+n+ln(this._bl,v)|0,this._ch=this._ch+i+ln(this._cl,A)|0,this._dh=this._dh+o+ln(this._dl,_)|0,this._eh=this._eh+s+ln(this._el,S)|0,this._fh=this._fh+f+ln(this._fl,P)|0,this._gh=this._gh+d+ln(this._gl,I)|0,this._hh=this._hh+p+ln(this._hl,C)|0};Db.prototype._hash=function(){var t=Gce.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var bU=Db,Yce=Rt,Qce=bU,Xce=o1,e0e=Bt.Buffer,t0e=new Array(160);function Cw(){this.init(),this._w=t0e,Xce.call(this,128,112)}Yce(Cw,Qce);Cw.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Cw.prototype._hash=function(){var t=e0e.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var r0e=Cw,_l=uU.exports=function(e){e=e.toLowerCase();var r=_l[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};_l.sha=yce;_l.sha1=Pce;_l.sha224=Hce;_l.sha256=mU;_l.sha384=r0e;_l.sha512=bU;var sM=uU.exports,n0e=Ko,aM=yw.EventEmitter,i0e=Rt;i0e(Ko,aM);Ko.Readable=rM();Ko.Writable=eM();Ko.Duplex=nl();Ko.Transform=nM;Ko.PassThrough=tU;Ko.finished=ww;Ko.pipeline=iU;Ko.Stream=Ko;function Ko(){aM.call(this)}Ko.prototype.pipe=function(t,e){var r=this;function n(b){t.writable&&t.write(b)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",s),r.on("close",f));var o=!1;function s(){o||(o=!0,t.end())}function f(){o||(o=!0,typeof t.destroy=="function"&&t.destroy())}function d(b){if(p(),aM.listenerCount(this,"error")===0)throw b}r.on("error",d),t.on("error",d);function p(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",s),r.removeListener("close",f),r.removeListener("error",d),t.removeListener("error",d),r.removeListener("end",p),r.removeListener("close",p),t.removeListener("close",p)}return r.on("end",p),r.on("close",p),t.on("close",p),t.emit("pipe",r),t};var yU=Bt.Buffer,vU=n0e.Transform,o0e=a6.StringDecoder,s0e=Rt;function na(t){vU.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}s0e(na,vU);na.prototype.update=function(t,e,r){typeof t=="string"&&(t=yU.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};na.prototype.setAutoPadding=function(){};na.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};na.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};na.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};na.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(i){n=i}finally{r(n)}};na.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};na.prototype._finalOrDigest=function(t){var e=this.__final()||yU.alloc(0);return t&&(e=this._toString(e,t,!0)),e};na.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o0e(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n};var $0=na,a0e=Rt,f0e=iM,c0e=oM,u0e=sM,wU=$0;function Iw(t){wU.call(this,"digest"),this._hash=t}a0e(Iw,wU);Iw.prototype._update=function(t){this._hash.update(t)};Iw.prototype._final=function(){return this._hash.digest()};var Fb=function(e){return e=e.toLowerCase(),e==="md5"?new f0e:e==="rmd160"||e==="ripemd160"?new c0e:new Iw(u0e(e))},l0e=Rt,fu=Bt.Buffer,xU=$0,d0e=fu.alloc(128),Yl=64;function Tw(t,e){xU.call(this,"digest"),typeof e=="string"&&(e=fu.from(e)),this._alg=t,this._key=e,e.length>Yl?e=t(e):e.lengthr){var n=t==="rmd160"?new p7:m7(t);e=n.update(e).digest()}else e.lengthR0e||e!==e)throw new TypeError("Bad key length")},Vv;if(et.process&&et.process.browser)Vv="utf-8";else if(et.process&&et.process.version){var k0e=parseInt(Je.process.version.split(".")[0].slice(1),10);Vv=k0e>=6?"utf-8":"binary"}else Vv="utf-8";var PU=Vv,S8=Bt.Buffer,CU=function(t,e,r){if(S8.isBuffer(t))return t;if(typeof t=="string")return S8.from(t,e);if(ArrayBuffer.isView(t))return S8.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")},B0e=EU,O0e=oM,N0e=sM,cu=Bt.Buffer,L0e=_U,UT=PU,zT=CU,D0e=cu.alloc(128),Kv={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function IU(t,e,r){var n=F0e(t),i=t==="sha512"||t==="sha384"?128:64;e.length>i?e=n(e):e.length>>0};mo.writeUInt32BE=function(e,r,n){e[0+n]=r>>>24,e[1+n]=r>>>16&255,e[2+n]=r>>>8&255,e[3+n]=r&255};mo.ip=function(e,r,n,i){for(var o=0,s=0,f=6;f>=0;f-=2){for(var d=0;d<=24;d+=8)o<<=1,o|=r>>>d+f&1;for(var d=0;d<=24;d+=8)o<<=1,o|=e>>>d+f&1}for(var f=6;f>=0;f-=2){for(var d=1;d<=25;d+=8)s<<=1,s|=r>>>d+f&1;for(var d=1;d<=25;d+=8)s<<=1,s|=e>>>d+f&1}n[i+0]=o>>>0,n[i+1]=s>>>0};mo.rip=function(e,r,n,i){for(var o=0,s=0,f=0;f<4;f++)for(var d=24;d>=0;d-=8)o<<=1,o|=r>>>d+f&1,o<<=1,o|=e>>>d+f&1;for(var f=4;f<8;f++)for(var d=24;d>=0;d-=8)s<<=1,s|=r>>>d+f&1,s<<=1,s|=e>>>d+f&1;n[i+0]=o>>>0,n[i+1]=s>>>0};mo.pc1=function(e,r,n,i){for(var o=0,s=0,f=7;f>=5;f--){for(var d=0;d<=24;d+=8)o<<=1,o|=r>>d+f&1;for(var d=0;d<=24;d+=8)o<<=1,o|=e>>d+f&1}for(var d=0;d<=24;d+=8)o<<=1,o|=r>>d+f&1;for(var f=1;f<=3;f++){for(var d=0;d<=24;d+=8)s<<=1,s|=r>>d+f&1;for(var d=0;d<=24;d+=8)s<<=1,s|=e>>d+f&1}for(var d=0;d<=24;d+=8)s<<=1,s|=e>>d+f&1;n[i+0]=o>>>0,n[i+1]=s>>>0};mo.r28shl=function(e,r){return e<>>28-r};var Ky=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];mo.pc2=function(e,r,n,i){for(var o=0,s=0,f=Ky.length>>>1,d=0;d>>Ky[d]&1;for(var d=f;d>>Ky[d]&1;n[i+0]=o>>>0,n[i+1]=s>>>0};mo.expand=function(e,r,n){var i=0,o=0;i=(e&1)<<5|e>>>27;for(var s=23;s>=15;s-=4)i<<=6,i|=e>>>s&63;for(var s=11;s>=3;s-=4)o|=e>>>s&63,o<<=6;o|=(e&31)<<1|e>>>31,r[n+0]=i>>>0,r[n+1]=o>>>0};var GT=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];mo.substitute=function(e,r){for(var n=0,i=0;i<4;i++){var o=e>>>18-i*6&63,s=GT[i*64+o];n<<=4,n|=s}for(var i=0;i<4;i++){var o=r>>>18-i*6&63,s=GT[4*64+i*64+o];n<<=4,n|=s}return n>>>0};var VT=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];mo.permute=function(e){for(var r=0,n=0;n>>VT[n]&1;return r>>>0};mo.padSplit=function(e,r,n){for(var i=e.toString(2);i.length0;i--)r+=this._buffer(e,r),n+=this._flushBuffer(o,n);return r+=this._buffer(e,r),o};ss.prototype.final=function(e){var r;e&&(r=this.update(e));var n;return this.type==="encrypt"?n=this._finalEncrypt():n=this._finalDecrypt(),r?r.concat(n):n};ss.prototype._pad=function(e,r){if(r===0)return!1;for(;r>>1];n=on.r28shl(n,s),i=on.r28shl(i,s),on.pc2(n,i,e.keys,o)}};Fa.prototype._update=function(e,r,n,i){var o=this._desState,s=on.readUInt32BE(e,r),f=on.readUInt32BE(e,r+4);on.ip(s,f,o.tmp,0),s=o.tmp[0],f=o.tmp[1],this.type==="encrypt"?this._encrypt(o,s,f,o.tmp,0):this._decrypt(o,s,f,o.tmp,0),s=o.tmp[0],f=o.tmp[1],on.writeUInt32BE(n,s,i),on.writeUInt32BE(n,f,i+4)};Fa.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var n=e.length-r,i=r;i>>0,s=_}on.rip(f,s,i,o)};Fa.prototype._decrypt=function(e,r,n,i,o){for(var s=n,f=r,d=e.keys.length-2;d>=0;d-=2){var p=e.keys[d],b=e.keys[d+1];on.expand(s,e.tmp,0),p^=e.tmp[0],b^=e.tmp[1];var v=on.substitute(p,b),A=on.permute(v),_=s;s=(f^A)>>>0,f=_}on.rip(s,f,i,o)};var DU={},J0e=os,Z0e=Rt,c6={};function Y0e(t){J0e.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e>i%8,t._prev=fue(t._prev,r?f:d);return s}function fue(t,e){var r=t.length,n=-1,i=Wv.allocUnsafe(t.length);for(t=Wv.concat([t,Wv.from([e])]);++n>7;return i}HU.encrypt=function(t,e,r){for(var n=e.length,i=Wv.allocUnsafe(n),o=-1;++o>>24]^s[b>>>16&255]^f[v>>>8&255]^d[A&255]^e[C++],S=o[b>>>24]^s[v>>>16&255]^f[A>>>8&255]^d[p&255]^e[C++],P=o[v>>>24]^s[A>>>16&255]^f[p>>>8&255]^d[b&255]^e[C++],I=o[A>>>24]^s[p>>>16&255]^f[b>>>8&255]^d[v&255]^e[C++],p=_,b=S,v=P,A=I;return _=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[v>>>8&255]<<8|n[A&255])^e[C++],S=(n[b>>>24]<<24|n[v>>>16&255]<<16|n[A>>>8&255]<<8|n[p&255])^e[C++],P=(n[v>>>24]<<24|n[A>>>16&255]<<16|n[p>>>8&255]<<8|n[b&255])^e[C++],I=(n[A>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[v&255])^e[C++],_=_>>>0,S=S>>>0,P=P>>>0,I=I>>>0,[_,S,P,I]}var vue=[0,1,2,4,8,16,32,64,128,27,54],Yr=function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,f=0,d=0;d<256;++d){var p=f^f<<1^f<<2^f<<3^f<<4;p=p>>>8^p&255^99,r[s]=p,n[p]=s;var b=t[s],v=t[b],A=t[v],_=t[p]*257^p*16843008;i[0][s]=_<<24|_>>>8,i[1][s]=_<<16|_>>>16,i[2][s]=_<<8|_>>>24,i[3][s]=_,_=A*16843009^v*65537^b*257^s*16843008,o[0][p]=_<<24|_>>>8,o[1][p]=_<<16|_>>>16,o[2][p]=_<<8|_>>>24,o[3][p]=_,s===0?s=f=1:(s=b^t[t[t[A^b]]],f^=t[t[f]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function Wo(t){this._key=hM(t),this._reset()}Wo.blockSize=4*4;Wo.keySize=256/8;Wo.prototype.blockSize=Wo.blockSize;Wo.prototype.keySize=Wo.keySize;Wo.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=(r+1)*4,i=[],o=0;o>>24,s=Yr.SBOX[s>>>24]<<24|Yr.SBOX[s>>>16&255]<<16|Yr.SBOX[s>>>8&255]<<8|Yr.SBOX[s&255],s^=vue[o/e|0]<<24):e>6&&o%e===4&&(s=Yr.SBOX[s>>>24]<<24|Yr.SBOX[s>>>16&255]<<16|Yr.SBOX[s>>>8&255]<<8|Yr.SBOX[s&255]),i[o]=i[o-e]^s}for(var f=[],d=0;d>>24]]^Yr.INV_SUB_MIX[1][Yr.SBOX[b>>>16&255]]^Yr.INV_SUB_MIX[2][Yr.SBOX[b>>>8&255]]^Yr.INV_SUB_MIX[3][Yr.SBOX[b&255]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=f};Wo.prototype.encryptBlockRaw=function(t){return t=hM(t),KU(t,this._keySchedule,Yr.SUB_MIX,Yr.SBOX,this._nRounds)};Wo.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=u6.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};Wo.prototype.decryptBlock=function(t){t=hM(t);var e=t[1];t[1]=t[3],t[3]=e;var r=KU(t,this._invKeySchedule,Yr.INV_SUB_MIX,Yr.INV_SBOX,this._nRounds),n=u6.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n};Wo.prototype.scrub=function(){P8(this._keySchedule),P8(this._invKeySchedule),P8(this._key)};Ub.AES=Wo;var dp=Bt.Buffer,wue=dp.alloc(16,0);function xue(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function WU(t){var e=dp.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function zb(t){this.h=t,this.state=dp.alloc(16,0),this.cache=dp.allocUnsafe(0)}zb.prototype.ghash=function(t){for(var e=-1;++e0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,i&&(t[0]=t[0]^225<<24)}this.state=WU(e)};zb.prototype.update=function(t){this.cache=dp.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};zb.prototype.final=function(t,e){return this.cache.length&&this.ghash(dp.concat([this.cache,wue],16)),this.ghash(WU([0,t,0,e])),this.state};var Eue=zb,Aue=Ub,Mi=Bt.Buffer,JU=$0,Sue=Rt,ZU=Eue,Mue=$b,_ue=GU;function Pue(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i0||n>0;){var d=new Rue;d.update(f),d.update(t),e&&d.update(e),f=d.digest();var p=0;if(i>0){var b=o.length-i;p=Math.min(i,f.length),f.copy(o,b,0,p),i-=p}if(p0){var v=s.length-n,A=Math.min(n,f.length-p);f.copy(s,v,p,p+A),n-=A}}return f.fill(0),{key:o,iv:s}}var Ow=kue,ez=dM,Bue=YU,Vf=Bt.Buffer,Oue=XU,tz=$0,Nue=Ub,Lue=Ow,Due=Rt;function jb(t,e,r){tz.call(this),this._cache=new Nw,this._cipher=new Nue.AES(e),this._prev=Vf.from(r),this._mode=t,this._autopadding=!0}Due(jb,tz);jb.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return Vf.concat(n)};var Fue=Vf.alloc(16,16);jb.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(Fue))throw this._cipher.scrub(),new Error("data not multiple of block length")};jb.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Nw(){this.cache=Vf.allocUnsafe(0)}Nw.prototype.add=function(t){this.cache=Vf.concat([this.cache,t])};Nw.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null};Nw.prototype.flush=function(){for(var t=16-this.cache.length,e=Vf.allocUnsafe(t),r=-1;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null};Lw.prototype.flush=function(){if(this.cache.length)return this.cache};function Gue(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var k=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=k+l:l=b[c-k.length]+k+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,k=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=k;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,k=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,V=h[2]|0,q=V&8191,Q=V>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(k,ne),c=Math.imul(k,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(k,ve)|0,c=c+Math.imul(k,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(k,ke)|0,c=c+Math.imul(k,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(k,re)|0,c=c+Math.imul(k,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(k,de)|0,c=c+Math.imul(k,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(k,pe)|0,c=c+Math.imul(k,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(k,Me)|0,c=c+Math.imul(k,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(k,xe)|0,c=c+Math.imul(k,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(k,Re)|0,c=c+Math.imul(k,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(k,Ce)|0,c=c+Math.imul(k,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;k--){var L=(h.words[m.length+k]|0)*67108864+(h.words[m.length+k-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,k);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,k),h.isZero()||(h.negative^=1);c&&(c.words[k]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,k=1;!(u.words[0]&k)&&M<26;++M,k<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var O={k256:null,p224:null,p192:null,p25519:null};function B(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},B.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},B.prototype.split=function(a,u){a.iushrn(this.n,0,u)},B.prototype.imulK=function(a){return a.imul(this.k)};function D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,B),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(O[a])return O[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new K;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return O[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),k=this.pow(a,h),L=m;k.cmp(w)!==0;){for(var R=k,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var k=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),k===0&&E===0){y=0;continue}E<<=1,E|=k,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(gM);var hz=gM.exports,bM={exports:{}};bM.exports;(function(t){(function(e,r){function n(x,a){if(!x)throw new Error(a||"Assertion failed")}function i(x,a){x.super_=a;var u=function(){};u.prototype=a.prototype,x.prototype=new u,x.prototype.constructor=x}function o(x,a,u){if(o.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&((a==="le"||a==="be")&&(u=a,a=10),this._init(x||0,a||10,u||"be"))}typeof e=="object"?e.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Rn.Buffer}catch{}o.isBN=function(a){return a instanceof o?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===o.wordSize&&Array.isArray(a.words)},o.max=function(a,u){return a.cmp(u)>0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var k=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=k+l:l=b[c-k.length]+k+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,k=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=k;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,k=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,V=h[2]|0,q=V&8191,Q=V>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(k,ne),c=Math.imul(k,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(k,ve)|0,c=c+Math.imul(k,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(k,ke)|0,c=c+Math.imul(k,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(k,re)|0,c=c+Math.imul(k,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(k,de)|0,c=c+Math.imul(k,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(k,pe)|0,c=c+Math.imul(k,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(k,Me)|0,c=c+Math.imul(k,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(k,xe)|0,c=c+Math.imul(k,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(k,Re)|0,c=c+Math.imul(k,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(k,Ce)|0,c=c+Math.imul(k,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;k--){var L=(h.words[m.length+k]|0)*67108864+(h.words[m.length+k-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,k);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,k),h.isZero()||(h.negative^=1);c&&(c.words[k]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,k=1;!(u.words[0]&k)&&M<26;++M,k<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var O={k256:null,p224:null,p192:null,p25519:null};function B(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},B.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},B.prototype.split=function(a,u){a.iushrn(this.n,0,u)},B.prototype.imulK=function(a){return a.imul(this.k)};function D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,B),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(O[a])return O[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new K;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return O[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),k=this.pow(a,h),L=m;k.cmp(w)!==0;){for(var R=k,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var k=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),k===0&&E===0){y=0;continue}E<<=1,E|=k,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(bM);var Que=bM.exports,Wy={exports:{}},ZT;function yM(){if(ZT)return Wy.exports;ZT=1;var t;Wy.exports=function(i){return t||(t=new e(null)),t.generate(i)};function e(n){this.rand=n}if(Wy.exports.Rand=e,e.prototype.generate=function(i){return this._rand(i)},e.prototype._rand=function(i){if(this.rand.getBytes)return this.rand.getBytes(i);for(var o=new Uint8Array(i),s=0;s=0);return f},r.prototype._randrange=function(i,o){var s=o.sub(i);return i.add(this._randbelow(s))},r.prototype.test=function(i,o,s){var f=i.bitLength(),d=t.mont(i),p=new t(1).toRed(d);o||(o=Math.max(1,f/48|0));for(var b=i.subn(1),v=0;!b.testn(v);v++);for(var A=i.shrn(v),_=b.toRed(d),S=!0;o>0;o--){var P=this._randrange(new t(2),b);s&&s(P);var I=P.toRed(d).redPow(A);if(!(I.cmp(p)===0||I.cmp(_)===0)){for(var C=1;C0;o--){var _=this._randrange(new t(2),p),S=i.gcd(_);if(S.cmpn(1)!==0)return S;var P=_.toRed(f).redPow(v);if(!(P.cmp(d)===0||P.cmp(A)===0)){for(var I=1;IC;)O.ishrn(1);if(O.isEven()&&O.iadd(o),O.testn(1)||O.iadd(s),T.cmp(s)){if(!T.cmp(f))for(;O.mod(d).cmp(p);)O.iadd(v)}else for(;O.mod(r).cmp(b);)O.iadd(v);if(B=O.shrn(1),S(B)&&S(O)&&P(B)&&P(O)&&i.test(B)&&i.test(O))return O}}return T8}const Xue={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},ele={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},tle={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},rle={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},nle={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},ile={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},ole={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},sle={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},ale={modp1:Xue,modp2:ele,modp5:tle,modp14:rle,modp15:nle,modp16:ile,modp17:ole,modp18:sle};var R8,XT;function fle(){if(XT)return R8;XT=1;var t=hz,e=pz(),r=new e,n=new t(24),i=new t(11),o=new t(10),s=new t(3),f=new t(7),d=mz(),p=i1;R8=S;function b(I,C){return C=C||"utf8",Je.Buffer.isBuffer(I)||(I=new Je.Buffer(I,C)),this._pub=new t(I),this}function v(I,C){return C=C||"utf8",Je.Buffer.isBuffer(I)||(I=new Je.Buffer(I,C)),this._priv=new t(I),this}var A={};function _(I,C){var T=C.toString("hex"),O=[T,I.toString(16)].join("_");if(O in A)return A[O];var B=0;if(I.isEven()||!d.simpleSieve||!d.fermatTest(I)||!r.test(I))return B+=1,T==="02"||T==="05"?B+=8:B+=4,A[O]=B,B;r.test(I.shrn(1))||(B+=2);var D;switch(T){case"02":I.mod(n).cmp(i)&&(B+=8);break;case"05":D=I.mod(o),D.cmp(s)&&D.cmp(f)&&(B+=8);break;default:B+=4}return A[O]=B,B}function S(I,C,T){this.setGenerator(C),this.__prime=new t(I),this._prime=t.mont(this.__prime),this._primeLen=I.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,T?(this.setPublicKey=b,this.setPrivateKey=v):this._primeCode=8}Object.defineProperty(S.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=_(this.__prime,this.__gen)),this._primeCode}}),S.prototype.generateKeys=function(){return this._priv||(this._priv=new t(p(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},S.prototype.computeSecret=function(I){I=new t(I),I=I.toRed(this._prime);var C=I.redPow(this._priv).fromRed(),T=new Je.Buffer(C.toArray()),O=this.getPrime();if(T.length0?l:h},o.min=function(l,h){return l.cmp(h)<0?l:h},o.prototype._init=function(l,h,m){if(typeof l=="number")return this._initNumber(l,h,m);if(typeof l=="object")return this._initArray(l,h,m);h==="hex"&&(h=16),n(h===(h|0)&&h>=2&&h<=36),l=l.toString().replace(/\s+/g,"");var w=0;l[0]==="-"&&(w++,this.negative=1),w=0;w-=3)y=l[w]|l[w-1]<<8|l[w-2]<<16,this.words[E]|=y<>>26-c&67108863,c+=24,c>=26&&(c-=26,E++);else if(m==="le")for(w=0,E=0;w>>26-c&67108863,c+=24,c>=26&&(c-=26,E++);return this._strip()};function f(u,l){var h=u.charCodeAt(l);if(h>=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;n(!1,"Invalid character in "+u)}function d(u,l,h){var m=f(u,h);return h-1>=l&&(m|=f(u,h-1)<<4),m}o.prototype._parseHex=function(l,h,m){this.length=Math.ceil((l.length-h)/6),this.words=new Array(this.length);for(var w=0;w=h;w-=2)c=d(l,h,w)<=18?(E-=18,y+=1,this.words[y]|=c>>>26):E+=8;else{var g=l.length-h;for(w=g%2===0?h+1:h;w=18?(E-=18,y+=1,this.words[y]|=c>>>26):E+=8}this._strip()};function p(u,l,h,m){for(var w=0,E=0,y=Math.min(u.length,h),c=l;c=49?E=g-49+10:g>=17?E=g-17+10:E=g,n(g>=0&&E1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=v}catch{o.prototype.inspect=v}else o.prototype.inspect=v;function v(){return(this.red?""}var A=["","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"],_=[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],S=[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];o.prototype.toString=function(l,h){l=l||10,h=h|0||1;var m;if(l===16||l==="hex"){m="";for(var w=0,E=0,y=0;y>>24-w&16777215,w+=2,w>=26&&(w-=26,y--),E!==0||y!==this.length-1?m=A[6-g.length]+g+m:m=g+m}for(E!==0&&(m=E.toString(16)+m);m.length%h!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(l===(l|0)&&l>=2&&l<=36){var M=_[l],k=S[l];m="";var L=this.clone();for(L.negative=0;!L.isZero();){var R=L.modrn(k).toString(l);L=L.idivn(k),L.isZero()?m=R+m:m=A[M-R.length]+R+m}for(this.isZero()&&(m="0"+m);m.length%h!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(l,h){return this.toArrayLike(s,l,h)}),o.prototype.toArray=function(l,h){return this.toArrayLike(Array,l,h)};var P=function(l,h){return l.allocUnsafe?l.allocUnsafe(h):new l(h)};o.prototype.toArrayLike=function(l,h,m){this._strip();var w=this.byteLength(),E=m||Math.max(1,w);n(w<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var y=P(l,E),c=h==="le"?"LE":"BE";return this["_toArrayLike"+c](y,w),y},o.prototype._toArrayLikeLE=function(l,h){for(var m=0,w=0,E=0,y=0;E>8&255),m>16&255),y===6?(m>24&255),w=0,y=0):(w=c>>>24,y+=2)}if(m=0&&(l[m--]=c>>8&255),m>=0&&(l[m--]=c>>16&255),y===6?(m>=0&&(l[m--]=c>>24&255),w=0,y=0):(w=c>>>24,y+=2)}if(m>=0)for(l[m--]=w;m>=0;)l[m--]=0},Math.clz32?o.prototype._countBits=function(l){return 32-Math.clz32(l)}:o.prototype._countBits=function(l){var h=l,m=0;return h>=4096&&(m+=13,h>>>=13),h>=64&&(m+=7,h>>>=7),h>=8&&(m+=4,h>>>=4),h>=2&&(m+=2,h>>>=2),m+h},o.prototype._zeroBits=function(l){if(l===0)return 26;var h=l,m=0;return h&8191||(m+=13,h>>>=13),h&127||(m+=7,h>>>=7),h&15||(m+=4,h>>>=4),h&3||(m+=2,h>>>=2),h&1||m++,m},o.prototype.bitLength=function(){var l=this.words[this.length-1],h=this._countBits(l);return(this.length-1)*26+h};function I(u){for(var l=new Array(u.bitLength()),h=0;h>>w&1}return l}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,h=0;hl.length?this.clone().ior(l):l.clone().ior(this)},o.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},o.prototype.iuand=function(l){var h;this.length>l.length?h=l:h=this;for(var m=0;ml.length?this.clone().iand(l):l.clone().iand(this)},o.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},o.prototype.iuxor=function(l){var h,m;this.length>l.length?(h=this,m=l):(h=l,m=this);for(var w=0;wl.length?this.clone().ixor(l):l.clone().ixor(this)},o.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},o.prototype.inotn=function(l){n(typeof l=="number"&&l>=0);var h=Math.ceil(l/26)|0,m=l%26;this._expand(h),m>0&&h--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-m),this._strip()},o.prototype.notn=function(l){return this.clone().inotn(l)},o.prototype.setn=function(l,h){n(typeof l=="number"&&l>=0);var m=l/26|0,w=l%26;return this._expand(m+1),h?this.words[m]=this.words[m]|1<l.length?(m=this,w=l):(m=l,w=this);for(var E=0,y=0;y>>26;for(;E!==0&&y>>26;if(this.length=m.length,E!==0)this.words[this.length]=E,this.length++;else if(m!==this)for(;yl.length?this.clone().iadd(l):l.clone().iadd(this)},o.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var h=this.iadd(l);return l.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var m=this.cmp(l);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,E;m>0?(w=this,E=l):(w=l,E=this);for(var y=0,c=0;c>26,this.words[c]=h&67108863;for(;y!==0&&c>26,this.words[c]=h&67108863;if(y===0&&c>>26,L=g&67108863,R=Math.min(M,l.length-1),F=Math.max(0,M-u.length+1);F<=R;F++){var z=M-F|0;w=u.words[z]|0,E=l.words[F]|0,y=w*E+L,k+=y/67108864|0,L=y&67108863}h.words[M]=L|0,g=k|0}return g!==0?h.words[M]=g|0:h.length--,h._strip()}var T=function(l,h,m){var w=l.words,E=h.words,y=m.words,c=0,g,M,k,L=w[0]|0,R=L&8191,F=L>>>13,z=w[1]|0,V=z&8191,q=z>>>13,Q=w[2]|0,G=Q&8191,H=Q>>>13,ee=w[3]|0,ue=ee&8191,fe=ee>>>13,he=w[4]|0,He=he&8191,be=he>>>13,oe=w[5]|0,Xe=oe&8191,Ee=oe>>>13,ye=w[6]|0,it=ye&8191,Pe=ye>>>13,Te=w[7]|0,lt=Te&8191,j=Te>>>13,N=w[8]|0,$=N&8191,J=N>>>13,te=w[9]|0,me=te&8191,ne=te>>>13,we=E[0]|0,tt=we&8191,ve=we>>>13,Ie=E[1]|0,Qe=Ie&8191,ke=Ie>>>13,$e=E[2]|0,le=$e&8191,re=$e>>>13,ae=E[3]|0,Ue=ae&8191,de=ae>>>13,Ae=E[4]|0,We=Ae&8191,pe=Ae>>>13,ge=E[5]|0,Ze=ge&8191,Me=ge>>>13,Se=E[6]|0,rt=Se&8191,xe=Se>>>13,Be=E[7]|0,gt=Be&8191,Re=Be>>>13,De=E[8]|0,wt=De&8191,Ce=De>>>13,Le=E[9]|0,bt=Le&8191,yt=Le>>>13;m.negative=l.negative^h.negative,m.length=19,g=Math.imul(R,tt),M=Math.imul(R,ve),M=M+Math.imul(F,tt)|0,k=Math.imul(F,ve);var Ot=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,g=Math.imul(V,tt),M=Math.imul(V,ve),M=M+Math.imul(q,tt)|0,k=Math.imul(q,ve),g=g+Math.imul(R,Qe)|0,M=M+Math.imul(R,ke)|0,M=M+Math.imul(F,Qe)|0,k=k+Math.imul(F,ke)|0;var kt=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(kt>>>26)|0,kt&=67108863,g=Math.imul(G,tt),M=Math.imul(G,ve),M=M+Math.imul(H,tt)|0,k=Math.imul(H,ve),g=g+Math.imul(V,Qe)|0,M=M+Math.imul(V,ke)|0,M=M+Math.imul(q,Qe)|0,k=k+Math.imul(q,ke)|0,g=g+Math.imul(R,le)|0,M=M+Math.imul(R,re)|0,M=M+Math.imul(F,le)|0,k=k+Math.imul(F,re)|0;var ct=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(ct>>>26)|0,ct&=67108863,g=Math.imul(ue,tt),M=Math.imul(ue,ve),M=M+Math.imul(fe,tt)|0,k=Math.imul(fe,ve),g=g+Math.imul(G,Qe)|0,M=M+Math.imul(G,ke)|0,M=M+Math.imul(H,Qe)|0,k=k+Math.imul(H,ke)|0,g=g+Math.imul(V,le)|0,M=M+Math.imul(V,re)|0,M=M+Math.imul(q,le)|0,k=k+Math.imul(q,re)|0,g=g+Math.imul(R,Ue)|0,M=M+Math.imul(R,de)|0,M=M+Math.imul(F,Ue)|0,k=k+Math.imul(F,de)|0;var St=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(St>>>26)|0,St&=67108863,g=Math.imul(He,tt),M=Math.imul(He,ve),M=M+Math.imul(be,tt)|0,k=Math.imul(be,ve),g=g+Math.imul(ue,Qe)|0,M=M+Math.imul(ue,ke)|0,M=M+Math.imul(fe,Qe)|0,k=k+Math.imul(fe,ke)|0,g=g+Math.imul(G,le)|0,M=M+Math.imul(G,re)|0,M=M+Math.imul(H,le)|0,k=k+Math.imul(H,re)|0,g=g+Math.imul(V,Ue)|0,M=M+Math.imul(V,de)|0,M=M+Math.imul(q,Ue)|0,k=k+Math.imul(q,de)|0,g=g+Math.imul(R,We)|0,M=M+Math.imul(R,pe)|0,M=M+Math.imul(F,We)|0,k=k+Math.imul(F,pe)|0;var vt=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(vt>>>26)|0,vt&=67108863,g=Math.imul(Xe,tt),M=Math.imul(Xe,ve),M=M+Math.imul(Ee,tt)|0,k=Math.imul(Ee,ve),g=g+Math.imul(He,Qe)|0,M=M+Math.imul(He,ke)|0,M=M+Math.imul(be,Qe)|0,k=k+Math.imul(be,ke)|0,g=g+Math.imul(ue,le)|0,M=M+Math.imul(ue,re)|0,M=M+Math.imul(fe,le)|0,k=k+Math.imul(fe,re)|0,g=g+Math.imul(G,Ue)|0,M=M+Math.imul(G,de)|0,M=M+Math.imul(H,Ue)|0,k=k+Math.imul(H,de)|0,g=g+Math.imul(V,We)|0,M=M+Math.imul(V,pe)|0,M=M+Math.imul(q,We)|0,k=k+Math.imul(q,pe)|0,g=g+Math.imul(R,Ze)|0,M=M+Math.imul(R,Me)|0,M=M+Math.imul(F,Ze)|0,k=k+Math.imul(F,Me)|0;var zt=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(zt>>>26)|0,zt&=67108863,g=Math.imul(it,tt),M=Math.imul(it,ve),M=M+Math.imul(Pe,tt)|0,k=Math.imul(Pe,ve),g=g+Math.imul(Xe,Qe)|0,M=M+Math.imul(Xe,ke)|0,M=M+Math.imul(Ee,Qe)|0,k=k+Math.imul(Ee,ke)|0,g=g+Math.imul(He,le)|0,M=M+Math.imul(He,re)|0,M=M+Math.imul(be,le)|0,k=k+Math.imul(be,re)|0,g=g+Math.imul(ue,Ue)|0,M=M+Math.imul(ue,de)|0,M=M+Math.imul(fe,Ue)|0,k=k+Math.imul(fe,de)|0,g=g+Math.imul(G,We)|0,M=M+Math.imul(G,pe)|0,M=M+Math.imul(H,We)|0,k=k+Math.imul(H,pe)|0,g=g+Math.imul(V,Ze)|0,M=M+Math.imul(V,Me)|0,M=M+Math.imul(q,Ze)|0,k=k+Math.imul(q,Me)|0,g=g+Math.imul(R,rt)|0,M=M+Math.imul(R,xe)|0,M=M+Math.imul(F,rt)|0,k=k+Math.imul(F,xe)|0;var Yt=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,g=Math.imul(lt,tt),M=Math.imul(lt,ve),M=M+Math.imul(j,tt)|0,k=Math.imul(j,ve),g=g+Math.imul(it,Qe)|0,M=M+Math.imul(it,ke)|0,M=M+Math.imul(Pe,Qe)|0,k=k+Math.imul(Pe,ke)|0,g=g+Math.imul(Xe,le)|0,M=M+Math.imul(Xe,re)|0,M=M+Math.imul(Ee,le)|0,k=k+Math.imul(Ee,re)|0,g=g+Math.imul(He,Ue)|0,M=M+Math.imul(He,de)|0,M=M+Math.imul(be,Ue)|0,k=k+Math.imul(be,de)|0,g=g+Math.imul(ue,We)|0,M=M+Math.imul(ue,pe)|0,M=M+Math.imul(fe,We)|0,k=k+Math.imul(fe,pe)|0,g=g+Math.imul(G,Ze)|0,M=M+Math.imul(G,Me)|0,M=M+Math.imul(H,Ze)|0,k=k+Math.imul(H,Me)|0,g=g+Math.imul(V,rt)|0,M=M+Math.imul(V,xe)|0,M=M+Math.imul(q,rt)|0,k=k+Math.imul(q,xe)|0,g=g+Math.imul(R,gt)|0,M=M+Math.imul(R,Re)|0,M=M+Math.imul(F,gt)|0,k=k+Math.imul(F,Re)|0;var Xt=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,g=Math.imul($,tt),M=Math.imul($,ve),M=M+Math.imul(J,tt)|0,k=Math.imul(J,ve),g=g+Math.imul(lt,Qe)|0,M=M+Math.imul(lt,ke)|0,M=M+Math.imul(j,Qe)|0,k=k+Math.imul(j,ke)|0,g=g+Math.imul(it,le)|0,M=M+Math.imul(it,re)|0,M=M+Math.imul(Pe,le)|0,k=k+Math.imul(Pe,re)|0,g=g+Math.imul(Xe,Ue)|0,M=M+Math.imul(Xe,de)|0,M=M+Math.imul(Ee,Ue)|0,k=k+Math.imul(Ee,de)|0,g=g+Math.imul(He,We)|0,M=M+Math.imul(He,pe)|0,M=M+Math.imul(be,We)|0,k=k+Math.imul(be,pe)|0,g=g+Math.imul(ue,Ze)|0,M=M+Math.imul(ue,Me)|0,M=M+Math.imul(fe,Ze)|0,k=k+Math.imul(fe,Me)|0,g=g+Math.imul(G,rt)|0,M=M+Math.imul(G,xe)|0,M=M+Math.imul(H,rt)|0,k=k+Math.imul(H,xe)|0,g=g+Math.imul(V,gt)|0,M=M+Math.imul(V,Re)|0,M=M+Math.imul(q,gt)|0,k=k+Math.imul(q,Re)|0,g=g+Math.imul(R,wt)|0,M=M+Math.imul(R,Ce)|0,M=M+Math.imul(F,wt)|0,k=k+Math.imul(F,Ce)|0;var or=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(or>>>26)|0,or&=67108863,g=Math.imul(me,tt),M=Math.imul(me,ve),M=M+Math.imul(ne,tt)|0,k=Math.imul(ne,ve),g=g+Math.imul($,Qe)|0,M=M+Math.imul($,ke)|0,M=M+Math.imul(J,Qe)|0,k=k+Math.imul(J,ke)|0,g=g+Math.imul(lt,le)|0,M=M+Math.imul(lt,re)|0,M=M+Math.imul(j,le)|0,k=k+Math.imul(j,re)|0,g=g+Math.imul(it,Ue)|0,M=M+Math.imul(it,de)|0,M=M+Math.imul(Pe,Ue)|0,k=k+Math.imul(Pe,de)|0,g=g+Math.imul(Xe,We)|0,M=M+Math.imul(Xe,pe)|0,M=M+Math.imul(Ee,We)|0,k=k+Math.imul(Ee,pe)|0,g=g+Math.imul(He,Ze)|0,M=M+Math.imul(He,Me)|0,M=M+Math.imul(be,Ze)|0,k=k+Math.imul(be,Me)|0,g=g+Math.imul(ue,rt)|0,M=M+Math.imul(ue,xe)|0,M=M+Math.imul(fe,rt)|0,k=k+Math.imul(fe,xe)|0,g=g+Math.imul(G,gt)|0,M=M+Math.imul(G,Re)|0,M=M+Math.imul(H,gt)|0,k=k+Math.imul(H,Re)|0,g=g+Math.imul(V,wt)|0,M=M+Math.imul(V,Ce)|0,M=M+Math.imul(q,wt)|0,k=k+Math.imul(q,Ce)|0,g=g+Math.imul(R,bt)|0,M=M+Math.imul(R,yt)|0,M=M+Math.imul(F,bt)|0,k=k+Math.imul(F,yt)|0;var sr=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(sr>>>26)|0,sr&=67108863,g=Math.imul(me,Qe),M=Math.imul(me,ke),M=M+Math.imul(ne,Qe)|0,k=Math.imul(ne,ke),g=g+Math.imul($,le)|0,M=M+Math.imul($,re)|0,M=M+Math.imul(J,le)|0,k=k+Math.imul(J,re)|0,g=g+Math.imul(lt,Ue)|0,M=M+Math.imul(lt,de)|0,M=M+Math.imul(j,Ue)|0,k=k+Math.imul(j,de)|0,g=g+Math.imul(it,We)|0,M=M+Math.imul(it,pe)|0,M=M+Math.imul(Pe,We)|0,k=k+Math.imul(Pe,pe)|0,g=g+Math.imul(Xe,Ze)|0,M=M+Math.imul(Xe,Me)|0,M=M+Math.imul(Ee,Ze)|0,k=k+Math.imul(Ee,Me)|0,g=g+Math.imul(He,rt)|0,M=M+Math.imul(He,xe)|0,M=M+Math.imul(be,rt)|0,k=k+Math.imul(be,xe)|0,g=g+Math.imul(ue,gt)|0,M=M+Math.imul(ue,Re)|0,M=M+Math.imul(fe,gt)|0,k=k+Math.imul(fe,Re)|0,g=g+Math.imul(G,wt)|0,M=M+Math.imul(G,Ce)|0,M=M+Math.imul(H,wt)|0,k=k+Math.imul(H,Ce)|0,g=g+Math.imul(V,bt)|0,M=M+Math.imul(V,yt)|0,M=M+Math.imul(q,bt)|0,k=k+Math.imul(q,yt)|0;var ar=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(ar>>>26)|0,ar&=67108863,g=Math.imul(me,le),M=Math.imul(me,re),M=M+Math.imul(ne,le)|0,k=Math.imul(ne,re),g=g+Math.imul($,Ue)|0,M=M+Math.imul($,de)|0,M=M+Math.imul(J,Ue)|0,k=k+Math.imul(J,de)|0,g=g+Math.imul(lt,We)|0,M=M+Math.imul(lt,pe)|0,M=M+Math.imul(j,We)|0,k=k+Math.imul(j,pe)|0,g=g+Math.imul(it,Ze)|0,M=M+Math.imul(it,Me)|0,M=M+Math.imul(Pe,Ze)|0,k=k+Math.imul(Pe,Me)|0,g=g+Math.imul(Xe,rt)|0,M=M+Math.imul(Xe,xe)|0,M=M+Math.imul(Ee,rt)|0,k=k+Math.imul(Ee,xe)|0,g=g+Math.imul(He,gt)|0,M=M+Math.imul(He,Re)|0,M=M+Math.imul(be,gt)|0,k=k+Math.imul(be,Re)|0,g=g+Math.imul(ue,wt)|0,M=M+Math.imul(ue,Ce)|0,M=M+Math.imul(fe,wt)|0,k=k+Math.imul(fe,Ce)|0,g=g+Math.imul(G,bt)|0,M=M+Math.imul(G,yt)|0,M=M+Math.imul(H,bt)|0,k=k+Math.imul(H,yt)|0;var fr=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(fr>>>26)|0,fr&=67108863,g=Math.imul(me,Ue),M=Math.imul(me,de),M=M+Math.imul(ne,Ue)|0,k=Math.imul(ne,de),g=g+Math.imul($,We)|0,M=M+Math.imul($,pe)|0,M=M+Math.imul(J,We)|0,k=k+Math.imul(J,pe)|0,g=g+Math.imul(lt,Ze)|0,M=M+Math.imul(lt,Me)|0,M=M+Math.imul(j,Ze)|0,k=k+Math.imul(j,Me)|0,g=g+Math.imul(it,rt)|0,M=M+Math.imul(it,xe)|0,M=M+Math.imul(Pe,rt)|0,k=k+Math.imul(Pe,xe)|0,g=g+Math.imul(Xe,gt)|0,M=M+Math.imul(Xe,Re)|0,M=M+Math.imul(Ee,gt)|0,k=k+Math.imul(Ee,Re)|0,g=g+Math.imul(He,wt)|0,M=M+Math.imul(He,Ce)|0,M=M+Math.imul(be,wt)|0,k=k+Math.imul(be,Ce)|0,g=g+Math.imul(ue,bt)|0,M=M+Math.imul(ue,yt)|0,M=M+Math.imul(fe,bt)|0,k=k+Math.imul(fe,yt)|0;var cr=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(cr>>>26)|0,cr&=67108863,g=Math.imul(me,We),M=Math.imul(me,pe),M=M+Math.imul(ne,We)|0,k=Math.imul(ne,pe),g=g+Math.imul($,Ze)|0,M=M+Math.imul($,Me)|0,M=M+Math.imul(J,Ze)|0,k=k+Math.imul(J,Me)|0,g=g+Math.imul(lt,rt)|0,M=M+Math.imul(lt,xe)|0,M=M+Math.imul(j,rt)|0,k=k+Math.imul(j,xe)|0,g=g+Math.imul(it,gt)|0,M=M+Math.imul(it,Re)|0,M=M+Math.imul(Pe,gt)|0,k=k+Math.imul(Pe,Re)|0,g=g+Math.imul(Xe,wt)|0,M=M+Math.imul(Xe,Ce)|0,M=M+Math.imul(Ee,wt)|0,k=k+Math.imul(Ee,Ce)|0,g=g+Math.imul(He,bt)|0,M=M+Math.imul(He,yt)|0,M=M+Math.imul(be,bt)|0,k=k+Math.imul(be,yt)|0;var ur=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(ur>>>26)|0,ur&=67108863,g=Math.imul(me,Ze),M=Math.imul(me,Me),M=M+Math.imul(ne,Ze)|0,k=Math.imul(ne,Me),g=g+Math.imul($,rt)|0,M=M+Math.imul($,xe)|0,M=M+Math.imul(J,rt)|0,k=k+Math.imul(J,xe)|0,g=g+Math.imul(lt,gt)|0,M=M+Math.imul(lt,Re)|0,M=M+Math.imul(j,gt)|0,k=k+Math.imul(j,Re)|0,g=g+Math.imul(it,wt)|0,M=M+Math.imul(it,Ce)|0,M=M+Math.imul(Pe,wt)|0,k=k+Math.imul(Pe,Ce)|0,g=g+Math.imul(Xe,bt)|0,M=M+Math.imul(Xe,yt)|0,M=M+Math.imul(Ee,bt)|0,k=k+Math.imul(Ee,yt)|0;var lr=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(lr>>>26)|0,lr&=67108863,g=Math.imul(me,rt),M=Math.imul(me,xe),M=M+Math.imul(ne,rt)|0,k=Math.imul(ne,xe),g=g+Math.imul($,gt)|0,M=M+Math.imul($,Re)|0,M=M+Math.imul(J,gt)|0,k=k+Math.imul(J,Re)|0,g=g+Math.imul(lt,wt)|0,M=M+Math.imul(lt,Ce)|0,M=M+Math.imul(j,wt)|0,k=k+Math.imul(j,Ce)|0,g=g+Math.imul(it,bt)|0,M=M+Math.imul(it,yt)|0,M=M+Math.imul(Pe,bt)|0,k=k+Math.imul(Pe,yt)|0;var dr=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(dr>>>26)|0,dr&=67108863,g=Math.imul(me,gt),M=Math.imul(me,Re),M=M+Math.imul(ne,gt)|0,k=Math.imul(ne,Re),g=g+Math.imul($,wt)|0,M=M+Math.imul($,Ce)|0,M=M+Math.imul(J,wt)|0,k=k+Math.imul(J,Ce)|0,g=g+Math.imul(lt,bt)|0,M=M+Math.imul(lt,yt)|0,M=M+Math.imul(j,bt)|0,k=k+Math.imul(j,yt)|0;var hr=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(hr>>>26)|0,hr&=67108863,g=Math.imul(me,wt),M=Math.imul(me,Ce),M=M+Math.imul(ne,wt)|0,k=Math.imul(ne,Ce),g=g+Math.imul($,bt)|0,M=M+Math.imul($,yt)|0,M=M+Math.imul(J,bt)|0,k=k+Math.imul(J,yt)|0;var s3=(c+g|0)+((M&8191)<<13)|0;c=(k+(M>>>13)|0)+(s3>>>26)|0,s3&=67108863,g=Math.imul(me,bt),M=Math.imul(me,yt),M=M+Math.imul(ne,bt)|0,k=Math.imul(ne,yt);var a3=(c+g|0)+((M&8191)<<13)|0;return c=(k+(M>>>13)|0)+(a3>>>26)|0,a3&=67108863,y[0]=Ot,y[1]=kt,y[2]=ct,y[3]=St,y[4]=vt,y[5]=zt,y[6]=Yt,y[7]=Xt,y[8]=or,y[9]=sr,y[10]=ar,y[11]=fr,y[12]=cr,y[13]=ur,y[14]=lr,y[15]=dr,y[16]=hr,y[17]=s3,y[18]=a3,c!==0&&(y[19]=c,m.length++),m};Math.imul||(T=C);function O(u,l,h){h.negative=l.negative^u.negative,h.length=u.length+l.length;for(var m=0,w=0,E=0;E>>26)|0,w+=y>>>26,y&=67108863}h.words[E]=c,m=y,y=w}return m!==0?h.words[E]=m:h.length--,h._strip()}function B(u,l,h){return O(u,l,h)}o.prototype.mulTo=function(l,h){var m,w=this.length+l.length;return this.length===10&&l.length===10?m=T(this,l,h):w<63?m=C(this,l,h):w<1024?m=O(this,l,h):m=B(this,l,h),m},o.prototype.mul=function(l){var h=new o(null);return h.words=new Array(this.length+l.length),this.mulTo(l,h)},o.prototype.mulf=function(l){var h=new o(null);return h.words=new Array(this.length+l.length),B(this,l,h)},o.prototype.imul=function(l){return this.clone().mulTo(l,this)},o.prototype.imuln=function(l){var h=l<0;h&&(l=-l),n(typeof l=="number"),n(l<67108864);for(var m=0,w=0;w>=26,m+=E/67108864|0,m+=y>>>26,this.words[w]=y&67108863}return m!==0&&(this.words[w]=m,this.length++),h?this.ineg():this},o.prototype.muln=function(l){return this.clone().imuln(l)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(l){var h=I(l);if(h.length===0)return new o(1);for(var m=this,w=0;w=0);var h=l%26,m=(l-h)/26,w=67108863>>>26-h<<26-h,E;if(h!==0){var y=0;for(E=0;E>>26-h}y&&(this.words[E]=y,this.length++)}if(m!==0){for(E=this.length-1;E>=0;E--)this.words[E+m]=this.words[E];for(E=0;E=0);var w;h?w=(h-h%26)/26:w=0;var E=l%26,y=Math.min((l-E)/26,this.length),c=67108863^67108863>>>E<y)for(this.length-=y,M=0;M=0&&(k!==0||M>=w);M--){var L=this.words[M]|0;this.words[M]=k<<26-E|L>>>E,k=L&c}return g&&k!==0&&(g.words[g.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(l,h,m){return n(this.negative===0),this.iushrn(l,h,m)},o.prototype.shln=function(l){return this.clone().ishln(l)},o.prototype.ushln=function(l){return this.clone().iushln(l)},o.prototype.shrn=function(l){return this.clone().ishrn(l)},o.prototype.ushrn=function(l){return this.clone().iushrn(l)},o.prototype.testn=function(l){n(typeof l=="number"&&l>=0);var h=l%26,m=(l-h)/26,w=1<=0);var h=l%26,m=(l-h)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(h!==0&&m++,this.length=Math.min(m,this.length),h!==0){var w=67108863^67108863>>>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},o.prototype.isubn=function(l){if(n(typeof l=="number"),n(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(g/67108864|0),this.words[E+m]=y&67108863}for(;E>26,this.words[E+m]=y&67108863;if(c===0)return this._strip();for(n(c===-1),c=0,E=0;E>26,this.words[E]=y&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(l,h){var m=this.length-l.length,w=this.clone(),E=l,y=E.words[E.length-1]|0,c=this._countBits(y);m=26-c,m!==0&&(E=E.ushln(m),w.iushln(m),y=E.words[E.length-1]|0);var g=w.length-E.length,M;if(h!=="mod"){M=new o(null),M.length=g+1,M.words=new Array(M.length);for(var k=0;k=0;R--){var F=(w.words[E.length+R]|0)*67108864+(w.words[E.length+R-1]|0);for(F=Math.min(F/y|0,67108863),w._ishlnsubmul(E,F,R);w.negative!==0;)F--,w.negative=0,w._ishlnsubmul(E,1,R),w.isZero()||(w.negative^=1);M&&(M.words[R]=F)}return M&&M._strip(),w._strip(),h!=="div"&&m!==0&&w.iushrn(m),{div:M||null,mod:w}},o.prototype.divmod=function(l,h,m){if(n(!l.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var w,E,y;return this.negative!==0&&l.negative===0?(y=this.neg().divmod(l,h),h!=="mod"&&(w=y.div.neg()),h!=="div"&&(E=y.mod.neg(),m&&E.negative!==0&&E.iadd(l)),{div:w,mod:E}):this.negative===0&&l.negative!==0?(y=this.divmod(l.neg(),h),h!=="mod"&&(w=y.div.neg()),{div:w,mod:y.mod}):this.negative&l.negative?(y=this.neg().divmod(l.neg(),h),h!=="div"&&(E=y.mod.neg(),m&&E.negative!==0&&E.isub(l)),{div:y.div,mod:E}):l.length>this.length||this.cmp(l)<0?{div:new o(0),mod:this}:l.length===1?h==="div"?{div:this.divn(l.words[0]),mod:null}:h==="mod"?{div:null,mod:new o(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new o(this.modrn(l.words[0]))}:this._wordDiv(l,h)},o.prototype.div=function(l){return this.divmod(l,"div",!1).div},o.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},o.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},o.prototype.divRound=function(l){var h=this.divmod(l);if(h.mod.isZero())return h.div;var m=h.div.negative!==0?h.mod.isub(l):h.mod,w=l.ushrn(1),E=l.andln(1),y=m.cmp(w);return y<0||E===1&&y===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},o.prototype.modrn=function(l){var h=l<0;h&&(l=-l),n(l<=67108863);for(var m=(1<<26)%l,w=0,E=this.length-1;E>=0;E--)w=(m*w+(this.words[E]|0))%l;return h?-w:w},o.prototype.modn=function(l){return this.modrn(l)},o.prototype.idivn=function(l){var h=l<0;h&&(l=-l),n(l<=67108863);for(var m=0,w=this.length-1;w>=0;w--){var E=(this.words[w]|0)+m*67108864;this.words[w]=E/l|0,m=E%l}return this._strip(),h?this.ineg():this},o.prototype.divn=function(l){return this.clone().idivn(l)},o.prototype.egcd=function(l){n(l.negative===0),n(!l.isZero());var h=this,m=l.clone();h.negative!==0?h=h.umod(l):h=h.clone();for(var w=new o(1),E=new o(0),y=new o(0),c=new o(1),g=0;h.isEven()&&m.isEven();)h.iushrn(1),m.iushrn(1),++g;for(var M=m.clone(),k=h.clone();!h.isZero();){for(var L=0,R=1;!(h.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(h.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(M),E.isub(k)),w.iushrn(1),E.iushrn(1);for(var F=0,z=1;!(m.words[0]&z)&&F<26;++F,z<<=1);if(F>0)for(m.iushrn(F);F-- >0;)(y.isOdd()||c.isOdd())&&(y.iadd(M),c.isub(k)),y.iushrn(1),c.iushrn(1);h.cmp(m)>=0?(h.isub(m),w.isub(y),E.isub(c)):(m.isub(h),y.isub(w),c.isub(E))}return{a:y,b:c,gcd:m.iushln(g)}},o.prototype._invmp=function(l){n(l.negative===0),n(!l.isZero());var h=this,m=l.clone();h.negative!==0?h=h.umod(l):h=h.clone();for(var w=new o(1),E=new o(0),y=m.clone();h.cmpn(1)>0&&m.cmpn(1)>0;){for(var c=0,g=1;!(h.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(h.iushrn(c);c-- >0;)w.isOdd()&&w.iadd(y),w.iushrn(1);for(var M=0,k=1;!(m.words[0]&k)&&M<26;++M,k<<=1);if(M>0)for(m.iushrn(M);M-- >0;)E.isOdd()&&E.iadd(y),E.iushrn(1);h.cmp(m)>=0?(h.isub(m),w.isub(E)):(m.isub(h),E.isub(w))}var L;return h.cmpn(1)===0?L=w:L=E,L.cmpn(0)<0&&L.iadd(l),L},o.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var h=this.clone(),m=l.clone();h.negative=0,m.negative=0;for(var w=0;h.isEven()&&m.isEven();w++)h.iushrn(1),m.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;m.isEven();)m.iushrn(1);var E=h.cmp(m);if(E<0){var y=h;h=m,m=y}else if(E===0||m.cmpn(1)===0)break;h.isub(m)}while(!0);return m.iushln(w)},o.prototype.invm=function(l){return this.egcd(l).a.umod(l)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(l){return this.words[0]&l},o.prototype.bincn=function(l){n(typeof l=="number");var h=l%26,m=(l-h)/26,w=1<>>26,c&=67108863,this.words[y]=c}return E!==0&&(this.words[y]=E,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(l){var h=l<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this._strip();var m;if(this.length>1)m=1;else{h&&(l=-l),n(l<=67108863,"Number is too big");var w=this.words[0]|0;m=w===l?0:wl.length)return 1;if(this.length=0;m--){var w=this.words[m]|0,E=l.words[m]|0;if(w!==E){wE&&(h=1);break}}return h},o.prototype.gtn=function(l){return this.cmpn(l)===1},o.prototype.gt=function(l){return this.cmp(l)===1},o.prototype.gten=function(l){return this.cmpn(l)>=0},o.prototype.gte=function(l){return this.cmp(l)>=0},o.prototype.ltn=function(l){return this.cmpn(l)===-1},o.prototype.lt=function(l){return this.cmp(l)===-1},o.prototype.lten=function(l){return this.cmpn(l)<=0},o.prototype.lte=function(l){return this.cmp(l)<=0},o.prototype.eqn=function(l){return this.cmpn(l)===0},o.prototype.eq=function(l){return this.cmp(l)===0},o.red=function(l){return new x(l)},o.prototype.toRed=function(l){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(l){return this.red=l,this},o.prototype.forceRed=function(l){return n(!this.red,"Already a number in reduction context"),this._forceRed(l)},o.prototype.redAdd=function(l){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},o.prototype.redIAdd=function(l){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},o.prototype.redSub=function(l){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},o.prototype.redISub=function(l){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},o.prototype.redShl=function(l){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},o.prototype.redMul=function(l){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},o.prototype.redIMul=function(l){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(l){return n(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var D={k256:null,p224:null,p192:null,p25519:null};function U(u,l){this.name=u,this.p=new o(l,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}U.prototype._tmp=function(){var l=new o(null);return l.words=new Array(Math.ceil(this.n/13)),l},U.prototype.ireduce=function(l){var h=l,m;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),m=h.bitLength();while(m>this.n);var w=m0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},U.prototype.split=function(l,h){l.iushrn(this.n,0,h)},U.prototype.imulK=function(l){return l.imul(this.k)};function K(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(K,U),K.prototype.split=function(l,h){for(var m=4194303,w=Math.min(l.length,9),E=0;E>>22,y=c}y>>>=22,l.words[E-10]=y,y===0&&l.length>10?l.length-=10:l.length-=9},K.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var h=0,m=0;m>>=26,l.words[m]=E,h=w}return h!==0&&(l.words[l.length++]=h),l},o._prime=function(l){if(D[l])return D[l];var h;if(l==="k256")h=new K;else if(l==="p224")h=new Y;else if(l==="p192")h=new W;else if(l==="p25519")h=new ie;else throw new Error("Unknown prime "+l);return D[l]=h,h};function x(u){if(typeof u=="string"){var l=o._prime(u);this.m=l.p,this.prime=l}else n(u.gtn(1),"modulus must be greater than 1"),this.m=u,this.prime=null}x.prototype._verify1=function(l){n(l.negative===0,"red works only with positives"),n(l.red,"red works only with red numbers")},x.prototype._verify2=function(l,h){n((l.negative|h.negative)===0,"red works only with positives"),n(l.red&&l.red===h.red,"red works only with red numbers")},x.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(b(l,l.umod(this.m)._forceRed(this)),l)},x.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},x.prototype.add=function(l,h){this._verify2(l,h);var m=l.add(h);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},x.prototype.iadd=function(l,h){this._verify2(l,h);var m=l.iadd(h);return m.cmp(this.m)>=0&&m.isub(this.m),m},x.prototype.sub=function(l,h){this._verify2(l,h);var m=l.sub(h);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},x.prototype.isub=function(l,h){this._verify2(l,h);var m=l.isub(h);return m.cmpn(0)<0&&m.iadd(this.m),m},x.prototype.shl=function(l,h){return this._verify1(l),this.imod(l.ushln(h))},x.prototype.imul=function(l,h){return this._verify2(l,h),this.imod(l.imul(h))},x.prototype.mul=function(l,h){return this._verify2(l,h),this.imod(l.mul(h))},x.prototype.isqr=function(l){return this.imul(l,l.clone())},x.prototype.sqr=function(l){return this.mul(l,l)},x.prototype.sqrt=function(l){if(l.isZero())return l.clone();var h=this.m.andln(3);if(n(h%2===1),h===3){var m=this.m.add(new o(1)).iushrn(2);return this.pow(l,m)}for(var w=this.m.subn(1),E=0;!w.isZero()&&w.andln(1)===0;)E++,w.iushrn(1);n(!w.isZero());var y=new o(1).toRed(this),c=y.redNeg(),g=this.m.subn(1).iushrn(1),M=this.m.bitLength();for(M=new o(2*M*M).toRed(this);this.pow(M,g).cmp(c)!==0;)M.redIAdd(c);for(var k=this.pow(M,w),L=this.pow(l,w.addn(1).iushrn(1)),R=this.pow(l,w),F=E;R.cmp(y)!==0;){for(var z=R,V=0;z.cmp(y)!==0;V++)z=z.redSqr();n(V=0;E--){for(var k=h.words[E],L=M-1;L>=0;L--){var R=k>>L&1;if(y!==w[0]&&(y=this.sqr(y)),R===0&&c===0){g=0;continue}c<<=1,c|=R,g++,!(g!==m&&(E!==0||L!==0))&&(y=this.mul(y,w[c]),g=0,c=0)}M=26}return y},x.prototype.convertTo=function(l){var h=l.umod(this.m);return h===l?h.clone():h},x.prototype.convertFrom=function(l){var h=l.clone();return h.red=null,h},o.mont=function(l){return new a(l)};function a(u){x.call(this,u),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(a,x),a.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},a.prototype.convertFrom=function(l){var h=this.imod(l.mul(this.rinv));return h.red=null,h},a.prototype.imul=function(l,h){if(l.isZero()||h.isZero())return l.words[0]=0,l.length=1,l;var m=l.imul(h),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=m.isub(w).iushrn(this.shift),y=E;return E.cmp(this.m)>=0?y=E.isub(this.m):E.cmpn(0)<0&&(y=E.iadd(this.m)),y._forceRed(this)},a.prototype.mul=function(l,h){if(l.isZero()||h.isZero())return new o(0)._forceRed(this);var m=l.mul(h),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=m.isub(w).iushrn(this.shift),y=E;return E.cmp(this.m)>=0?y=E.isub(this.m):E.cmpn(0)<0&&(y=E.iadd(this.m)),y._forceRed(this)},a.prototype.invm=function(l){var h=this.imod(l._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(t,et)})(vM);var Dw=vM.exports;const _t=es(Dw);var Jd=Dw,ule=i1;function lle(t){var e=gz(t),r=e.toRed(Jd.mont(t.modulus)).redPow(new Jd(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function gz(t){var e=t.modulus.byteLength(),r;do r=new Jd(ule(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function bz(t,e){var r=lle(e),n=e.modulus.byteLength(),i=new Jd(t).mul(r.blinder).umod(e.modulus),o=i.toRed(Jd.mont(e.prime1)),s=i.toRed(Jd.mont(e.prime2)),f=e.coefficient,d=e.prime1,p=e.prime2,b=o.redPow(e.exponent1).fromRed(),v=s.redPow(e.exponent2).fromRed(),A=b.isub(v).imul(f).umod(d).imul(p);return v.iadd(A).imul(r.unblinder).umod(e.modulus).toArrayLike(Je.Buffer,"be",n)}bz.getr=gz;var wM=bz,k8={};const dle="elliptic",hle="6.5.4",ple="EC cryptography",mle="lib/elliptic.js",gle=["lib"],ble={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/"},yle={type:"git",url:"git@github.com:indutny/elliptic"},vle=["EC","Elliptic","curve","Cryptography"],wle="Fedor Indutny ",xle="MIT",Ele={url:"https://github.com/indutny/elliptic/issues"},Ale="https://github.com/indutny/elliptic",Sle={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"},Mle={"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"},_le={name:dle,version:hle,description:ple,main:mle,files:gle,scripts:ble,repository:yle,keywords:vle,author:wle,license:xle,bugs:Ele,homepage:Ale,devDependencies:Sle,dependencies:Mle};var go={},xM={exports:{}};xM.exports;(function(t){(function(e,r){function n(x,a){if(!x)throw new Error(a||"Assertion failed")}function i(x,a){x.super_=a;var u=function(){};u.prototype=a.prototype,x.prototype=new u,x.prototype.constructor=x}function o(x,a,u){if(o.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&((a==="le"||a==="be")&&(u=a,a=10),this._init(x||0,a||10,u||"be"))}typeof e=="object"?e.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Rn.Buffer}catch{}o.isBN=function(a){return a instanceof o?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===o.wordSize&&Array.isArray(a.words)},o.max=function(a,u){return a.cmp(u)>0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var k=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=k+l:l=b[c-k.length]+k+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,k=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=k;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,k=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,V=h[2]|0,q=V&8191,Q=V>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(k,ne),c=Math.imul(k,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(k,ve)|0,c=c+Math.imul(k,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(k,ke)|0,c=c+Math.imul(k,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(k,re)|0,c=c+Math.imul(k,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(k,de)|0,c=c+Math.imul(k,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(k,pe)|0,c=c+Math.imul(k,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(k,Me)|0,c=c+Math.imul(k,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(k,xe)|0,c=c+Math.imul(k,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(k,Re)|0,c=c+Math.imul(k,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(k,Ce)|0,c=c+Math.imul(k,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;k--){var L=(h.words[m.length+k]|0)*67108864+(h.words[m.length+k-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,k);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,k),h.isZero()||(h.negative^=1);c&&(c.words[k]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,k=1;!(u.words[0]&k)&&M<26;++M,k<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var O={k256:null,p224:null,p192:null,p25519:null};function B(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},B.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},B.prototype.split=function(a,u){a.iushrn(this.n,0,u)},B.prototype.imulK=function(a){return a.imul(this.k)};function D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,B),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(O[a])return O[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new K;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return O[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),k=this.pow(a,h),L=m;k.cmp(w)!==0;){for(var R=k,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var k=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),k===0&&E===0){y=0;continue}E<<=1,E|=k,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(xM);var nc=xM.exports,EM={};(function(t){var e=t;function r(o,s){if(Array.isArray(o))return o.slice();if(!o)return[];var f=[];if(typeof o!="string"){for(var d=0;d>8,v=p&255;b?f.push(b,v):f.push(v)}return f}e.toArray=r;function n(o){return o.length===1?"0"+o:o}e.zero2=n;function i(o){for(var s="",f=0;f(S>>1)-1?C=(S>>1)-T:C=T,P.isubn(C)):C=0,_[I]=C,P.iushrn(1)}return _}e.getNAF=o;function s(b,v){var A=[[],[]];b=b.clone(),v=v.clone();for(var _=0,S=0,P;b.cmpn(-_)>0||v.cmpn(-S)>0;){var I=b.andln(3)+_&3,C=v.andln(3)+S&3;I===3&&(I=-1),C===3&&(C=-1);var T;I&1?(P=b.andln(7)+_&7,(P===3||P===5)&&C===2?T=-I:T=I):T=0,A[0].push(T);var O;C&1?(P=v.andln(7)+S&7,(P===3||P===5)&&I===2?O=-C:O=C):O=0,A[1].push(O),2*_===T+1&&(_=1-_),2*S===O+1&&(S=1-S),b.iushrn(1),v.iushrn(1)}return A}e.getJSF=s;function f(b,v,A){var _="_"+v;b.prototype[v]=function(){return this[_]!==void 0?this[_]:this[_]=A.call(this)}}e.cachedProperty=f;function d(b){return typeof b=="string"?e.toArray(b,"hex"):b}e.parseBytes=d;function p(b){return new r(b,"hex","le")}e.intFromLE=p})(go);var AM={},J0=nc,qb=go,l6=qb.getNAF,Ple=qb.getJSF,d6=qb.assert;function U0(t,e){this.type=t,this.p=new J0(e.p,16),this.red=e.prime?J0.red(e.prime):J0.mont(this.p),this.zero=new J0(0).toRed(this.red),this.one=new J0(1).toRed(this.red),this.two=new J0(2).toRed(this.red),this.n=e.n&&new J0(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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Fw=U0;U0.prototype.point=function(){throw new Error("Not implemented")};U0.prototype.validate=function(){throw new Error("Not implemented")};U0.prototype._fixedNafMul=function(e,r){d6(e.precomputed);var n=e._getDoubles(),i=l6(r,1,this._bitLength),o=(1<=f;p--)d=(d<<1)+i[p];s.push(d)}for(var b=this.jpoint(null,null,null),v=this.jpoint(null,null,null),A=o;A>0;A--){for(f=0;f=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,f=f.dblp(p),d<0)break;var b=s[d];d6(b!==0),e.type==="affine"?b>0?f=f.mixedAdd(o[b-1>>1]):f=f.mixedAdd(o[-b-1>>1].neg()):b>0?f=f.add(o[b-1>>1]):f=f.add(o[-b-1>>1].neg())}return e.type==="affine"?f.toP():f};U0.prototype._wnafMulAdd=function(e,r,n,i,o){var s=this._wnafT1,f=this._wnafT2,d=this._wnafT3,p=0,b,v,A;for(b=0;b=1;b-=2){var S=b-1,P=b;if(s[S]!==1||s[P]!==1){d[S]=l6(n[S],s[S],this._bitLength),d[P]=l6(n[P],s[P],this._bitLength),p=Math.max(d[S].length,p),p=Math.max(d[P].length,p);continue}var I=[r[S],null,null,r[P]];r[S].y.cmp(r[P].y)===0?(I[1]=r[S].add(r[P]),I[2]=r[S].toJ().mixedAdd(r[P].neg())):r[S].y.cmp(r[P].y.redNeg())===0?(I[1]=r[S].toJ().mixedAdd(r[P]),I[2]=r[S].add(r[P].neg())):(I[1]=r[S].toJ().mixedAdd(r[P]),I[2]=r[S].toJ().mixedAdd(r[P].neg()));var C=[-3,-1,-5,-7,0,7,5,1,3],T=Ple(n[S],n[P]);for(p=Math.max(T[0].length,p),d[S]=new Array(p),d[P]=new Array(p),v=0;v=0;b--){for(var K=0;b>=0;){var Y=!0;for(v=0;v=0&&K++,D=D.dblp(K),b<0)break;for(v=0;v0?A=f[v][W-1>>1]:W<0&&(A=f[v][-W-1>>1].neg()),A.type==="affine"?D=D.mixedAdd(A):D=D.add(A))}}for(b=0;b=Math.ceil((e.bitLength()+1)/r.step):!1};as.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(_=p,S=b),v.negative&&(v=v.neg(),A=A.neg()),_.negative&&(_=_.neg(),S=S.neg()),[{a:v,b:A},{a:_,b:S}]};fs.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],o=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),f=o.mul(n.a),d=s.mul(i.a),p=o.mul(n.b),b=s.mul(i.b),v=e.sub(f).sub(d),A=p.add(b).neg();return{k1:v,k2:A}};fs.prototype.pointFromX=function(e,r){e=new $r(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)};fs.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};fs.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s":""};xn.prototype.isInfinity=function(){return this.inf};xn.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 r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};xn.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 r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),f=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,f)};xn.prototype.getX=function(){return this.x.fromRed()};xn.prototype.getY=function(){return this.y.fromRed()};xn.prototype.mul=function(e){return e=new $r(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)};xn.prototype.mulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};xn.prototype.jmulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};xn.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)};xn.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};xn.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 kn(t,e,r,n){a1.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new $r(0)):(this.x=new $r(e,16),this.y=new $r(r,16),this.z=new $r(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}SM(kn,a1.BasePoint);fs.prototype.jpoint=function(e,r,n){return new kn(this,e,r,n)};kn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};kn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};kn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),o=e.x.redMul(n),s=this.y.redMul(r.redMul(e.z)),f=e.y.redMul(n.redMul(this.z)),d=i.redSub(o),p=s.redSub(f);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var b=d.redSqr(),v=b.redMul(d),A=i.redMul(b),_=p.redSqr().redIAdd(v).redISub(A).redISub(A),S=p.redMul(A.redISub(_)).redISub(s.redMul(v)),P=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,S,P)};kn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),o=this.y,s=e.y.redMul(r).redMul(this.z),f=n.redSub(i),d=o.redSub(s);if(f.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=f.redSqr(),b=p.redMul(f),v=n.redMul(p),A=d.redSqr().redIAdd(b).redISub(v).redISub(v),_=d.redMul(v.redISub(A)).redISub(o.redMul(b)),S=this.z.redMul(f);return this.curve.jpoint(A,_,S)};kn.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};kn.prototype.inspect=function(){return this.isInfinity()?"":""};kn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Td=nc,yz=Rt,$w=Fw,Rle=go;function f1(t){$w.call(this,"mont",t),this.a=new Td(t.a,16).toRed(this.red),this.b=new Td(t.b,16).toRed(this.red),this.i4=new Td(4).toRed(this.red).redInvm(),this.two=new Td(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}yz(f1,$w);var kle=f1;f1.prototype.validate=function(e){var r=e.normalize().x,n=r.redSqr(),i=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),o=i.redSqrt();return o.redSqr().cmp(i)===0};function wn(t,e,r){$w.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Td(e,16),this.z=new Td(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}yz(wn,$w.BasePoint);f1.prototype.decodePoint=function(e,r){return this.point(Rle.toArray(e,r),1)};f1.prototype.point=function(e,r){return new wn(this,e,r)};f1.prototype.pointFromJSON=function(e){return wn.fromJSON(this,e)};wn.prototype.precompute=function(){};wn.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};wn.fromJSON=function(e,r){return new wn(e,r[0],r[1]||e.one)};wn.prototype.inspect=function(){return this.isInfinity()?"":""};wn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};wn.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),n=this.x.redSub(this.z),i=n.redSqr(),o=r.redSub(i),s=r.redMul(i),f=o.redMul(i.redAdd(this.curve.a24.redMul(o)));return this.curve.point(s,f)};wn.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};wn.prototype.diffAdd=function(e,r){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),o=e.x.redAdd(e.z),s=e.x.redSub(e.z),f=s.redMul(n),d=o.redMul(i),p=r.z.redMul(f.redAdd(d).redSqr()),b=r.x.redMul(f.redISub(d).redSqr());return this.curve.point(p,b)};wn.prototype.mul=function(e){for(var r=e.clone(),n=this,i=this.curve.point(null,null),o=this,s=[];r.cmpn(0)!==0;r.iushrn(1))s.push(r.andln(1));for(var f=s.length-1;f>=0;f--)s[f]===0?(n=n.diffAdd(i,o),i=i.dbl()):(i=n.diffAdd(i,o),n=n.dbl());return i};wn.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};wn.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};wn.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};wn.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};wn.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Ble=go,Pf=nc,vz=Rt,Uw=Fw,Ole=Ble.assert;function qa(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,Uw.call(this,"edwards",t),this.a=new Pf(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Pf(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Pf(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Ole(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}vz(qa,Uw);var Nle=qa;qa.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};qa.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};qa.prototype.jpoint=function(e,r,n,i){return this.point(e,r,n,i)};qa.prototype.pointFromX=function(e,r){e=new Pf(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),s=i.redMul(o.redInvm()),f=s.redSqrt();if(f.redSqr().redSub(s).cmp(this.zero)!==0)throw new Error("invalid point");var d=f.fromRed().isOdd();return(r&&!d||!r&&d)&&(f=f.redNeg()),this.point(e,f)};qa.prototype.pointFromY=function(e,r){e=new Pf(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(o.redInvm());if(s.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var f=s.redSqrt();if(f.redSqr().redSub(s).cmp(this.zero)!==0)throw new Error("invalid point");return f.fromRed().isOdd()!==r&&(f=f.redNeg()),this.point(f,e)};qa.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),i=r.redMul(this.a).redAdd(n),o=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return i.cmp(o)===0};function br(t,e,r,n,i){Uw.BasePoint.call(this,t,"projective"),e===null&&r===null&&n===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 Pf(e,16),this.y=new Pf(r,16),this.z=n?new Pf(n,16):this.curve.one,this.t=i&&new Pf(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}vz(br,Uw.BasePoint);qa.prototype.pointFromJSON=function(e){return br.fromJSON(this,e)};qa.prototype.point=function(e,r,n,i){return new br(this,e,r,n,i)};br.fromJSON=function(e,r){return new br(e,r[0],r[1],r[2])};br.prototype.inspect=function(){return this.isInfinity()?"":""};br.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};br.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),o=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),s=i.redAdd(r),f=s.redSub(n),d=i.redSub(r),p=o.redMul(f),b=s.redMul(d),v=o.redMul(d),A=f.redMul(s);return this.curve.point(p,b,A,v)};br.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),i,o,s,f,d,p;if(this.curve.twisted){f=this.curve._mulA(r);var b=f.redAdd(n);this.zOne?(i=e.redSub(r).redSub(n).redMul(b.redSub(this.curve.two)),o=b.redMul(f.redSub(n)),s=b.redSqr().redSub(b).redSub(b)):(d=this.z.redSqr(),p=b.redSub(d).redISub(d),i=e.redSub(r).redISub(n).redMul(p),o=b.redMul(f.redSub(n)),s=b.redMul(p))}else f=r.redAdd(n),d=this.curve._mulC(this.z).redSqr(),p=f.redSub(d).redSub(d),i=this.curve._mulC(e.redISub(f)).redMul(p),o=this.curve._mulC(f).redMul(r.redISub(n)),s=f.redMul(p);return this.curve.point(i,o,s)};br.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};br.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),o=this.z.redMul(e.z.redAdd(e.z)),s=n.redSub(r),f=o.redSub(i),d=o.redAdd(i),p=n.redAdd(r),b=s.redMul(f),v=d.redMul(p),A=s.redMul(p),_=f.redMul(d);return this.curve.point(b,v,_,A)};br.prototype._projAdd=function(e){var r=this.z.redMul(e.z),n=r.redSqr(),i=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(i).redMul(o),f=n.redSub(s),d=n.redAdd(s),p=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(o),b=r.redMul(f).redMul(p),v,A;return this.curve.twisted?(v=r.redMul(d).redMul(o.redSub(this.curve._mulA(i))),A=f.redMul(d)):(v=r.redMul(d).redMul(o.redSub(i)),A=this.curve._mulC(f).redMul(d)),this.curve.point(b,v,A)};br.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};br.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};br.prototype.mulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)};br.prototype.jmulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)};br.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};br.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};br.prototype.getX=function(){return this.normalize(),this.x.fromRed()};br.prototype.getY=function(){return this.normalize(),this.y.fromRed()};br.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};br.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),this.x.cmp(r)===0)return!0}};br.prototype.toP=br.prototype.normalize;br.prototype.mixedAdd=br.prototype.add;(function(t){var e=t;e.base=Fw,e.short=Tle,e.mont=kle,e.edwards=Nle})(AM);var zw={},Gb={},Ut={},Lle=os,Dle=Rt;Ut.inherits=Dle;function Fle(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function $le(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=o&63|128):Fle(t,i)?(o=65536+((o&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=o&63|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=o&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Ut.htonl=wz;function zle(t,e){for(var r="",n=0;n>>0}return o}Ut.join32=jle;function Hle(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=o&255)}return r}Ut.split32=Hle;function qle(t,e){return t>>>e|t<<32-e}Ut.rotr32=qle;function Gle(t,e){return t<>>32-e}Ut.rotl32=Gle;function Vle(t,e){return t+e>>>0}Ut.sum32=Vle;function Kle(t,e,r){return t+e+r>>>0}Ut.sum32_3=Kle;function Wle(t,e,r,n){return t+e+r+n>>>0}Ut.sum32_4=Wle;function Jle(t,e,r,n,i){return t+e+r+n+i>>>0}Ut.sum32_5=Jle;function Zle(t,e,r,n){var i=t[e],o=t[e+1],s=n+o>>>0,f=(s>>0,t[e+1]=s}Ut.sum64=Zle;function Yle(t,e,r,n){var i=e+n>>>0,o=(i>>0}Ut.sum64_hi=Yle;function Qle(t,e,r,n){var i=e+n;return i>>>0}Ut.sum64_lo=Qle;function Xle(t,e,r,n,i,o,s,f){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Ut.sum64_4_hi=Xle;function ede(t,e,r,n,i,o,s,f){var d=e+n+o+f;return d>>>0}Ut.sum64_4_lo=ede;function tde(t,e,r,n,i,o,s,f,d,p){var b=0,v=e;v=v+n>>>0,b+=v>>0,b+=v>>0,b+=v>>0,b+=v>>0}Ut.sum64_5_hi=tde;function rde(t,e,r,n,i,o,s,f,d,p){var b=e+n+o+f+p;return b>>>0}Ut.sum64_5_lo=rde;function nde(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Ut.rotr64_hi=nde;function ide(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ut.rotr64_lo=ide;function ode(t,e,r){return t>>>r}Ut.shr64_hi=ode;function sde(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ut.shr64_lo=sde;var c1={},tR=Ut,ade=os;function jw(){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}c1.BlockHash=jw;jw.prototype.update=function(e,r){if(e=tR.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=tR.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=e&255}else for(i[o++]=e&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,s=8;s>>3}Ga.g0_256=dde;function hde(t){return ka(t,17)^ka(t,19)^t>>>10}Ga.g1_256=hde;var pp=Ut,pde=c1,mde=Ga,B8=pp.rotl32,J1=pp.sum32,gde=pp.sum32_5,bde=mde.ft_1,_z=pde.BlockHash,yde=[1518500249,1859775393,2400959708,3395469782];function $a(){if(!(this instanceof $a))return new $a;_z.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}pp.inherits($a,_z);var vde=$a;$a.blockSize=512;$a.outSize=160;$a.hmacStrength=80;$a.padLength=64;$a.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),she(e.length<=this.blockSize);for(var r=e.length;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var uhe=v0;v0.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};v0.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=ju.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var h6=nc,MM=go,phe=MM.assert;function Hw(t,e){if(t instanceof Hw)return t;this._importDER(t,e)||(phe(t.r&&t.s,"Signature without r or s"),this.r=new h6(t.r,16),this.s=new h6(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var mhe=Hw;function ghe(){this.place=0}function D8(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return i<=127?!1:(e.place=s,i)}function sR(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Hw.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=sR(r),n=sR(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];F8(i,r.length),i=i.concat(r),i.push(2),F8(i,n.length);var o=i.concat(n),s=[48];return F8(s,o.length),s=s.concat(o),MM.encode(s,e)};var $8,aR;function bhe(){if(aR)return $8;aR=1;var t=nc,e=uhe,r=go,n=zw,i=yM(),o=r.assert,s=hhe,f=mhe;function d(p){if(!(this instanceof d))return new d(p);typeof p=="string"&&(o(Object.prototype.hasOwnProperty.call(n,p),"Unknown curve "+p),p=n[p]),p instanceof n.PresetCurve&&(p={curve:p}),this.curve=p.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=p.curve.g,this.g.precompute(p.curve.n.bitLength()+1),this.hash=p.hash||p.curve.hash}return $8=d,d.prototype.keyPair=function(b){return new s(this,b)},d.prototype.keyFromPrivate=function(b,v){return s.fromPrivate(this,b,v)},d.prototype.keyFromPublic=function(b,v){return s.fromPublic(this,b,v)},d.prototype.genKeyPair=function(b){b||(b={});for(var v=new e({hash:this.hash,pers:b.pers,persEnc:b.persEnc||"utf8",entropy:b.entropy||i(this.hash.hmacStrength),entropyEnc:b.entropy&&b.entropyEnc||"utf8",nonce:this.n.toArray()}),A=this.n.byteLength(),_=this.n.sub(new t(2));;){var S=new t(v.generate(A));if(!(S.cmp(_)>0))return S.iaddn(1),this.keyFromPrivate(S)}},d.prototype._truncateToN=function(b,v){var A=b.byteLength()*8-this.n.bitLength();return A>0&&(b=b.ushrn(A)),!v&&b.cmp(this.n)>=0?b.sub(this.n):b},d.prototype.sign=function(b,v,A,_){typeof A=="object"&&(_=A,A=null),_||(_={}),v=this.keyFromPrivate(v,A),b=this._truncateToN(new t(b,16));for(var S=this.n.byteLength(),P=v.getPrivate().toArray("be",S),I=b.toArray("be",S),C=new e({hash:this.hash,entropy:P,nonce:I,pers:_.pers,persEnc:_.persEnc||"utf8"}),T=this.n.sub(new t(1)),O=0;;O++){var B=_.k?_.k(O):new t(C.generate(this.n.byteLength()));if(B=this._truncateToN(B,!0),!(B.cmpn(1)<=0||B.cmp(T)>=0)){var D=this.g.mul(B);if(!D.isInfinity()){var U=D.getX(),K=U.umod(this.n);if(K.cmpn(0)!==0){var Y=B.invm(this.n).mul(K.mul(v.getPrivate()).iadd(b));if(Y=Y.umod(this.n),Y.cmpn(0)!==0){var W=(D.getY().isOdd()?1:0)|(U.cmp(K)!==0?2:0);return _.canonical&&Y.cmp(this.nh)>0&&(Y=this.n.sub(Y),W^=1),new f({r:K,s:Y,recoveryParam:W})}}}}}},d.prototype.verify=function(b,v,A,_){b=this._truncateToN(new t(b,16)),A=this.keyFromPublic(A,_),v=new f(v,"hex");var S=v.r,P=v.s;if(S.cmpn(1)<0||S.cmp(this.n)>=0||P.cmpn(1)<0||P.cmp(this.n)>=0)return!1;var I=P.invm(this.n),C=I.mul(b).umod(this.n),T=I.mul(S).umod(this.n),O;return this.curve._maxwellTrick?(O=this.g.jmulAdd(C,A.getPublic(),T),O.isInfinity()?!1:O.eqXToP(S)):(O=this.g.mulAdd(C,A.getPublic(),T),O.isInfinity()?!1:O.getX().umod(this.n).cmp(S)===0)},d.prototype.recoverPubKey=function(p,b,v,A){o((3&v)===v,"The recovery param is more than two bits"),b=new f(b,A);var _=this.n,S=new t(p),P=b.r,I=b.s,C=v&1,T=v>>1;if(P.cmp(this.curve.p.umod(this.curve.n))>=0&&T)throw new Error("Unable to find sencond key candinate");T?P=this.curve.pointFromX(P.add(this.curve.n),C):P=this.curve.pointFromX(P,C);var O=b.r.invm(_),B=_.sub(S).mul(O).umod(_),D=I.mul(O).umod(_);return this.g.mulAdd(B,P,D)},d.prototype.getKeyRecoveryParam=function(p,b,v,A){if(b=new f(b,A),b.recoveryParam!==null)return b.recoveryParam;for(var _=0;_<4;_++){var S;try{S=this.recoverPubKey(p,b,_)}catch{continue}if(S.eq(v))return _}throw new Error("Unable to find valid recovery factor")},$8}var Vb=go,Fz=Vb.assert,fR=Vb.parseBytes,d1=Vb.cachedProperty;function vn(t,e){this.eddsa=t,this._secret=fR(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=fR(e.pub)}vn.fromPublic=function(e,r){return r instanceof vn?r:new vn(e,{pub:r})};vn.fromSecret=function(e,r){return r instanceof vn?r:new vn(e,{secret:r})};vn.prototype.secret=function(){return this._secret};d1(vn,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});d1(vn,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});d1(vn,"privBytes",function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,i=r.slice(0,e.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i});d1(vn,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});d1(vn,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});d1(vn,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});vn.prototype.sign=function(e){return Fz(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};vn.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};vn.prototype.getSecret=function(e){return Fz(this._secret,"KeyPair is public only"),Vb.encode(this.secret(),e)};vn.prototype.getPublic=function(e){return Vb.encode(this.pubBytes(),e)};var yhe=vn,vhe=nc,qw=go,whe=qw.assert,Gw=qw.cachedProperty,xhe=qw.parseBytes;function Cl(t,e){this.eddsa=t,typeof e!="object"&&(e=xhe(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),whe(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof vhe&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Gw(Cl,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Gw(Cl,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Gw(Cl,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Gw(Cl,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Cl.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Cl.prototype.toHex=function(){return qw.encode(this.toBytes(),"hex").toUpperCase()};var Ehe=Cl,Ahe=Gb,She=zw,bp=go,Mhe=bp.assert,$z=bp.parseBytes,Uz=yhe,cR=Ehe;function Di(t){if(Mhe(t==="ed25519","only tested with ed25519 so far"),!(this instanceof Di))return new Di(t);t=She[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=Ahe.sha512}var _he=Di;Di.prototype.sign=function(e,r){e=$z(e);var n=this.keyFromSecret(r),i=this.hashInt(n.messagePrefix(),e),o=this.g.mul(i),s=this.encodePoint(o),f=this.hashInt(s,n.pubBytes(),e).mul(n.priv()),d=i.add(f).umod(this.curve.n);return this.makeSignature({R:o,S:d,Rencoded:s})};Di.prototype.verify=function(e,r,n){e=$z(e),r=this.makeSignature(r);var i=this.keyFromPublic(n),o=this.hashInt(r.Rencoded(),i.pubBytes(),e),s=this.g.mul(r.S()),f=r.R().add(i.pub().mul(o));return f.eq(s)};Di.prototype.hashInt=function(){for(var e=this.hash(),r=0;r0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var k=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=k+l:l=b[c-k.length]+k+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,k=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=k;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,k=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,V=h[2]|0,q=V&8191,Q=V>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(k,ne),c=Math.imul(k,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(k,ve)|0,c=c+Math.imul(k,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(k,ke)|0,c=c+Math.imul(k,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(k,re)|0,c=c+Math.imul(k,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(k,de)|0,c=c+Math.imul(k,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(k,pe)|0,c=c+Math.imul(k,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(k,Me)|0,c=c+Math.imul(k,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(k,xe)|0,c=c+Math.imul(k,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(k,Re)|0,c=c+Math.imul(k,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(k,Ce)|0,c=c+Math.imul(k,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;k--){var L=(h.words[m.length+k]|0)*67108864+(h.words[m.length+k-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,k);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,k),h.isZero()||(h.negative^=1);c&&(c.words[k]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,k=1;!(u.words[0]&k)&&M<26;++M,k<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var O={k256:null,p224:null,p192:null,p25519:null};function B(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},B.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},B.prototype.split=function(a,u){a.iushrn(this.n,0,u)},B.prototype.imulK=function(a){return a.imul(this.k)};function D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,B),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(O[a])return O[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new K;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return O[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),k=this.pow(a,h),L=m;k.cmp(w)!==0;){for(var R=k,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var k=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),k===0&&E===0){y=0;continue}E<<=1,E|=k,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(CM);var zz=CM.exports,jz={},IM={},Zv=Rn,Zd=Zv.Buffer,Oo={},No;for(No in Zv)Zv.hasOwnProperty(No)&&(No==="SlowBuffer"||No==="Buffer"||(Oo[No]=Zv[No]));var Yd=Oo.Buffer={};for(No in Zd)Zd.hasOwnProperty(No)&&(No==="allocUnsafe"||No==="allocUnsafeSlow"||(Yd[No]=Zd[No]));Oo.Buffer.prototype=Zd.prototype;(!Yd.from||Yd.from===Uint8Array.from)&&(Yd.from=function(t,e,r){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return Zd(t,e,r)});Yd.alloc||(Yd.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=Zd(t);return!e||e.length===0?n.fill(0):typeof r=="string"?n.fill(e,r):n.fill(e),n});if(!Oo.kStringMaxLength)try{Oo.kStringMaxLength=Je.process.binding("buffer").kStringMaxLength}catch{}Oo.constants||(Oo.constants={MAX_LENGTH:Oo.kMaxLength},Oo.kStringMaxLength&&(Oo.constants.MAX_STRING_LENGTH=Oo.kStringMaxLength));var TM=Oo,Vw={};const Phe=Rt;function cs(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}Vw.Reporter=cs;cs.prototype.isError=function(e){return e instanceof yp};cs.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};cs.prototype.restore=function(e){const r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};cs.prototype.enterKey=function(e){return this._reporterState.path.push(e)};cs.prototype.exitKey=function(e){const r=this._reporterState;r.path=r.path.slice(0,e-1)};cs.prototype.leaveKey=function(e,r,n){const i=this._reporterState;this.exitKey(e),i.obj!==null&&(i.obj[r]=n)};cs.prototype.path=function(){return this._reporterState.path.join("/")};cs.prototype.enterObject=function(){const e=this._reporterState,r=e.obj;return e.obj={},r};cs.prototype.leaveObject=function(e){const r=this._reporterState,n=r.obj;return r.obj=e,n};cs.prototype.error=function(e){let r;const n=this._reporterState,i=e instanceof yp;if(i?r=e:r=new yp(n.path.map(function(o){return"["+JSON.stringify(o)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw r;return i||n.errors.push(r),r};cs.prototype.wrapResult=function(e){const r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function yp(t,e){this.path=t,this.rethrow(e)}Phe(yp,Error);yp.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,yp),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this};var al={};const Che=Rt,Kw=Vw.Reporter,vp=TM.Buffer;function Jo(t,e){if(Kw.call(this,e),!vp.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}Che(Jo,Kw);al.DecoderBuffer=Jo;Jo.isDecoderBuffer=function(e){return e instanceof Jo?!0:typeof e=="object"&&vp.isBuffer(e.base)&&e.constructor.name==="DecoderBuffer"&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.save=="function"&&typeof e.restore=="function"&&typeof e.isEmpty=="function"&&typeof e.readUInt8=="function"&&typeof e.skip=="function"&&typeof e.raw=="function"};Jo.prototype.save=function(){return{offset:this.offset,reporter:Kw.prototype.save.call(this)}};Jo.prototype.restore=function(e){const r=new Jo(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,Kw.prototype.restore.call(this,e.reporter),r};Jo.prototype.isEmpty=function(){return this.offset===this.length};Jo.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Jo.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");const n=new Jo(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n};Jo.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function wp(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return wp.isEncoderBuffer(r)||(r=new wp(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=vp.byteLength(t);else if(vp.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}al.EncoderBuffer=wp;wp.isEncoderBuffer=function(e){return e instanceof wp?!0:typeof e=="object"&&e.constructor.name==="EncoderBuffer"&&typeof e.length=="number"&&typeof e.join=="function"};wp.prototype.join=function(e,r){return e||(e=vp.alloc(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,r),r+=n.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):vp.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e};const Ihe=Vw.Reporter,The=al.EncoderBuffer,Rhe=al.DecoderBuffer,hi=os,Hz=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],khe=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Hz),Bhe=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function ir(t,e,r){const n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}var RM=ir;const Ohe=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];ir.prototype.clone=function(){const e=this._baseState,r={};Ohe.forEach(function(i){r[i]=e[i]});const n=new this.constructor(r.parent);return n._baseState=r,n};ir.prototype._wrap=function(){const e=this._baseState;khe.forEach(function(r){this[r]=function(){const i=new this.constructor(this);return e.children.push(i),i[r].apply(i,arguments)}},this)};ir.prototype._init=function(e){const r=this._baseState;hi(r.parent===null),e.call(this),r.children=r.children.filter(function(n){return n._baseState.parent===this},this),hi.equal(r.children.length,1,"Root node can have only one child")};ir.prototype._useArgs=function(e){const r=this._baseState,n=e.filter(function(i){return i instanceof this.constructor},this);e=e.filter(function(i){return!(i instanceof this.constructor)},this),n.length!==0&&(hi(r.children===null),r.children=n,n.forEach(function(i){i._baseState.parent=this},this)),e.length!==0&&(hi(r.args===null),r.args=e,r.reverseArgs=e.map(function(i){if(typeof i!="object"||i.constructor!==Object)return i;const o={};return Object.keys(i).forEach(function(s){s==(s|0)&&(s|=0);const f=i[s];o[f]=s}),o}))};Bhe.forEach(function(t){ir.prototype[t]=function(){const r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});Hz.forEach(function(t){ir.prototype[t]=function(){const r=this._baseState,n=Array.prototype.slice.call(arguments);return hi(r.tag===null),r.tag=t,this._useArgs(n),this}});ir.prototype.use=function(e){hi(e);const r=this._baseState;return hi(r.use===null),r.use=e,this};ir.prototype.optional=function(){const e=this._baseState;return e.optional=!0,this};ir.prototype.def=function(e){const r=this._baseState;return hi(r.default===null),r.default=e,r.optional=!0,this};ir.prototype.explicit=function(e){const r=this._baseState;return hi(r.explicit===null&&r.implicit===null),r.explicit=e,this};ir.prototype.implicit=function(e){const r=this._baseState;return hi(r.explicit===null&&r.implicit===null),r.implicit=e,this};ir.prototype.obj=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};ir.prototype.key=function(e){const r=this._baseState;return hi(r.key===null),r.key=e,this};ir.prototype.any=function(){const e=this._baseState;return e.any=!0,this};ir.prototype.choice=function(e){const r=this._baseState;return hi(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(n){return e[n]})),this};ir.prototype.contains=function(e){const r=this._baseState;return hi(r.use===null),r.contains=e,this};ir.prototype._decode=function(e,r){const n=this._baseState;if(n.parent===null)return e.wrapResult(n.children[0]._decode(e,r));let i=n.default,o=!0,s=null;if(n.key!==null&&(s=e.enterKey(n.key)),n.optional){let d=null;if(n.explicit!==null?d=n.explicit:n.implicit!==null?d=n.implicit:n.tag!==null&&(d=n.tag),d===null&&!n.any){const p=e.save();try{n.choice===null?this._decodeGeneric(n.tag,e,r):this._decodeChoice(e,r),o=!0}catch{o=!1}e.restore(p)}else if(o=this._peekTag(e,d,n.any),e.isError(o))return o}let f;if(n.obj&&o&&(f=e.enterObject()),o){if(n.explicit!==null){const p=this._decodeTag(e,n.explicit);if(e.isError(p))return p;e=p}const d=e.offset;if(n.use===null&&n.choice===null){let p;n.any&&(p=e.save());const b=this._decodeTag(e,n.implicit!==null?n.implicit:n.tag,n.any);if(e.isError(b))return b;n.any?i=e.raw(p):e=b}if(r&&r.track&&n.tag!==null&&r.track(e.path(),d,e.length,"tagged"),r&&r.track&&n.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),n.any||(n.choice===null?i=this._decodeGeneric(n.tag,e,r):i=this._decodeChoice(e,r)),e.isError(i))return i;if(!n.any&&n.choice===null&&n.children!==null&&n.children.forEach(function(b){b._decode(e,r)}),n.contains&&(n.tag==="octstr"||n.tag==="bitstr")){const p=new Rhe(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(p,r)}}return n.obj&&o&&(i=e.leaveObject(f)),n.key!==null&&(i!==null||o===!0)?e.leaveKey(s,n.key,i):s!==null&&e.exitKey(s),i};ir.prototype._decodeGeneric=function(e,r,n){const i=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,i.args[0],n):/str$/.test(e)?this._decodeStr(r,e,n):e==="objid"&&i.args?this._decodeObjid(r,i.args[0],i.args[1],n):e==="objid"?this._decodeObjid(r,null,null,n):e==="gentime"||e==="utctime"?this._decodeTime(r,e,n):e==="null_"?this._decodeNull(r,n):e==="bool"?this._decodeBool(r,n):e==="objDesc"?this._decodeStr(r,e,n):e==="int"||e==="enum"?this._decodeInt(r,i.args&&i.args[0],n):i.use!==null?this._getUse(i.use,r._reporterState.obj)._decode(r,n):r.error("unknown tag: "+e)};ir.prototype._getUse=function(e,r){const n=this._baseState;return n.useDecoder=this._use(e,r),hi(n.useDecoder._baseState.parent===null),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder};ir.prototype._decodeChoice=function(e,r){const n=this._baseState;let i=null,o=!1;return Object.keys(n.choice).some(function(s){const f=e.save(),d=n.choice[s];try{const p=d._decode(e,r);if(e.isError(p))return!1;i={type:s,value:p},o=!0}catch{return e.restore(f),!1}return!0},this),o?i:e.error("Choice not matched")};ir.prototype._createEncoderBuffer=function(e){return new The(e,this.reporter)};ir.prototype._encode=function(e,r,n){const i=this._baseState;if(i.default!==null&&i.default===e)return;const o=this._encodeValue(e,r,n);if(o!==void 0&&!this._skipDefault(o,r,n))return o};ir.prototype._encodeValue=function(e,r,n){const i=this._baseState;if(i.parent===null)return i.children[0]._encode(e,r||new Ihe);let o=null;if(this.reporter=r,i.optional&&e===void 0)if(i.default!==null)e=i.default;else return;let s=null,f=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,r);else if(i.contains)s=this._getUse(i.contains,n)._encode(e,r),f=!0;else if(i.children)s=i.children.map(function(d){if(d._baseState.tag==="null_")return d._encode(null,r,e);if(d._baseState.key===null)return r.error("Child should have a key");const p=r.enterKey(d._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");const b=d._encode(e[d._baseState.key],r,e);return r.leaveKey(p),b},this).filter(function(d){return d}),s=this._createEncoderBuffer(s);else if(i.tag==="seqof"||i.tag==="setof"){if(!(i.args&&i.args.length===1))return r.error("Too many args for : "+i.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");const d=this.clone();d._baseState.implicit=null,s=this._createEncoderBuffer(e.map(function(p){const b=this._baseState;return this._getUse(b.args[0],e)._encode(p,r)},d))}else i.use!==null?o=this._getUse(i.use,n)._encode(e,r):(s=this._encodePrimitive(i.tag,e),f=!0);if(!i.any&&i.choice===null){const d=i.implicit!==null?i.implicit:i.tag,p=i.implicit===null?"universal":"context";d===null?i.use===null&&r.error("Tag could be omitted only for .use()"):i.use===null&&(o=this._encodeComposite(d,f,p,s))}return i.explicit!==null&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o};ir.prototype._encodeChoice=function(e,r){const n=this._baseState,i=n.choice[e.type];return i||hi(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,r)};ir.prototype._encodePrimitive=function(e,r){const n=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&n.args)return this._encodeObjid(r,n.reverseArgs[0],n.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,n.args&&n.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};ir.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};ir.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)};var Ww={};(function(t){function e(r){const n={};return Object.keys(r).forEach(function(i){(i|0)==i&&(i=i|0);const o=r[i];n[o]=i}),n}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)})(Ww);const Nhe=Rt,Ef=TM.Buffer,qz=RM,U8=Ww;function Gz(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new oa,this.tree._init(t.body)}var Vz=Gz;Gz.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function oa(t){qz.call(this,"der",t)}Nhe(oa,qz);oa.prototype._encodeComposite=function(e,r,n,i){const o=Lhe(e,r,n,this.reporter);if(i.length<128){const d=Ef.alloc(2);return d[0]=o,d[1]=i.length,this._createEncoderBuffer([d,i])}let s=1;for(let d=i.length;d>=256;d>>=8)s++;const f=Ef.alloc(1+1+s);f[0]=o,f[1]=128|s;for(let d=1+s,p=i.length;p>0;d--,p>>=8)f[d]=p&255;return this._createEncoderBuffer([f,i])};oa.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){const n=Ef.alloc(e.length*2);for(let i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}let i=0;for(let f=0;f=128;d>>=7)i++}const o=Ef.alloc(i);let s=o.length-1;for(let f=e.length-1;f>=0;f--){let d=e[f];for(o[s--]=d&127;(d>>=7)>0;)o[s--]=128|d&127}return this._createEncoderBuffer(o)};function vo(t){return t<10?"0"+t:t}oa.prototype._encodeTime=function(e,r){let n;const i=new Date(e);return r==="gentime"?n=[vo(i.getUTCFullYear()),vo(i.getUTCMonth()+1),vo(i.getUTCDate()),vo(i.getUTCHours()),vo(i.getUTCMinutes()),vo(i.getUTCSeconds()),"Z"].join(""):r==="utctime"?n=[vo(i.getUTCFullYear()%100),vo(i.getUTCMonth()+1),vo(i.getUTCDate()),vo(i.getUTCHours()),vo(i.getUTCMinutes()),vo(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(n,"octstr")};oa.prototype._encodeNull=function(){return this._createEncoderBuffer("")};oa.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!Ef.isBuffer(e)){const o=e.toArray();!e.sign&&o[0]&128&&o.unshift(0),e=Ef.from(o)}if(Ef.isBuffer(e)){let o=e.length;e.length===0&&o++;const s=Ef.alloc(o);return e.copy(s),e.length===0&&(s[0]=0),this._createEncoderBuffer(s)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let o=e;o>=256;o>>=8)n++;const i=new Array(n);for(let o=i.length-1;o>=0;o--)i[o]=e&255,e>>=8;return i[0]&128&&i.unshift(0),this._createEncoderBuffer(Ef.from(i))};oa.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};oa.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};oa.prototype._skipDefault=function(e,r,n){const i=this._baseState;let o;if(i.default===null)return!1;const s=e.join();if(i.defaultBuffer===void 0&&(i.defaultBuffer=this._encodeValue(i.default,r,n).join()),s.length!==i.defaultBuffer.length)return!1;for(o=0;o=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=U8.tagClassByName[r||"universal"]<<6,i)}const Dhe=Rt,kM=Vz;function BM(t){kM.call(this,t),this.enc="pem"}Dhe(BM,kM);var Fhe=BM;BM.prototype.encode=function(e,r){const i=kM.prototype.encode.call(this,e).toString("base64"),o=["-----BEGIN "+r.label+"-----"];for(let s=0;s>6],i=(r&32)===0;if((r&31)===31){let s=r;for(r=0;(s&128)===128;){if(s=t.readUInt8(e),t.isError(s))return s;r<<=7,r|=s&127}}else r&=31;const o=dR.tag[r];return{cls:n,primitive:i,tag:r,tagStr:o}}function Zz(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&n===128)return null;if(!(n&128))return n;const i=n&127;if(i>4)return t.error("length octect is too long");n=0;for(let o=0;o0&&O.ishrn(B),O}function S(C,T){C=_(C,T),C=C.mod(T);var O=t.from(C.toArray());if(O.length=0)throw new Error("invalid sig")}return z8=o,z8}var j8,bR;function xpe(){if(bR)return j8;bR=1;var t=Bt.Buffer,e=Fb,r=oU,n=Rt,i=vpe(),o=wpe(),s=MU;Object.keys(s).forEach(function(v){s[v].id=t.from(s[v].id,"hex"),s[v.toLowerCase()]=s[v]});function f(v){r.Writable.call(this);var A=s[v];if(!A)throw new Error("Unknown message digest");this._hashType=A.hash,this._hash=e(A.hash),this._tag=A.id,this._signType=A.sign}n(f,r.Writable),f.prototype._write=function(A,_,S){this._hash.update(A),S()},f.prototype.update=function(A,_){return this._hash.update(typeof A=="string"?t.from(A,_):A),this},f.prototype.sign=function(A,_){this.end();var S=this._hash.digest(),P=i(S,A,this._hashType,this._signType,this._tag);return _?P.toString(_):P};function d(v){r.Writable.call(this);var A=s[v];if(!A)throw new Error("Unknown message digest");this._hash=e(A.hash),this._tag=A.id,this._signType=A.sign}n(d,r.Writable),d.prototype._write=function(A,_,S){this._hash.update(A),S()},d.prototype.update=function(A,_){return this._hash.update(typeof A=="string"?t.from(A,_):A),this},d.prototype.verify=function(A,_,S){var P=typeof _=="string"?t.from(_,S):_;this.end();var I=this._hash.digest();return o(P,I,A,this._signType,this._tag)};function p(v){return new f(v)}function b(v){return new d(v)}return j8={Sign:p,Verify:b,createSign:p,createVerify:b},j8}var $M={exports:{}};$M.exports;(function(t){(function(e,r){function n(x,a){if(!x)throw new Error(a||"Assertion failed")}function i(x,a){x.super_=a;var u=function(){};u.prototype=a.prototype,x.prototype=new u,x.prototype.constructor=x}function o(x,a,u){if(o.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&((a==="le"||a==="be")&&(u=a,a=10),this._init(x||0,a||10,u||"be"))}typeof e=="object"?e.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Rn.Buffer}catch{}o.isBN=function(a){return a instanceof o?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===o.wordSize&&Array.isArray(a.words)},o.max=function(a,u){return a.cmp(u)>0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var k=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=k+l:l=b[c-k.length]+k+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,k=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=k;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,k=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,V=h[2]|0,q=V&8191,Q=V>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(k,ne),c=Math.imul(k,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(k,ve)|0,c=c+Math.imul(k,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(k,ke)|0,c=c+Math.imul(k,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(k,re)|0,c=c+Math.imul(k,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(k,de)|0,c=c+Math.imul(k,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(k,pe)|0,c=c+Math.imul(k,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(k,Me)|0,c=c+Math.imul(k,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(k,xe)|0,c=c+Math.imul(k,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(k,Re)|0,c=c+Math.imul(k,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(k,Ce)|0,c=c+Math.imul(k,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;k--){var L=(h.words[m.length+k]|0)*67108864+(h.words[m.length+k-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,k);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,k),h.isZero()||(h.negative^=1);c&&(c.words[k]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,k=1;!(u.words[0]&k)&&M<26;++M,k<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var O={k256:null,p224:null,p192:null,p25519:null};function B(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},B.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},B.prototype.split=function(a,u){a.iushrn(this.n,0,u)},B.prototype.imulK=function(a){return a.imul(this.k)};function D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,B),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(O[a])return O[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new K;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return O[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),k=this.pow(a,h),L=m;k.cmp(w)!==0;){for(var R=k,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var k=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),k===0&&E===0){y=0;continue}E<<=1,E|=k,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})($M);var Epe=$M.exports,H8,yR;function Ape(){if(yR)return H8;yR=1;var t=_M(),e=Epe;H8=function(s){return new n(s)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1;function n(o){this.curveType=r[o],this.curveType||(this.curveType={name:o}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}n.prototype.generateKeys=function(o,s){return this.keys=this.curve.genKeyPair(),this.getPublicKey(o,s)},n.prototype.computeSecret=function(o,s,f){s=s||"utf8",Je.Buffer.isBuffer(o)||(o=new Je.Buffer(o,s));var d=this.curve.keyFromPublic(o).getPublic(),p=d.mul(this.keys.getPrivate()).getX();return i(p,f,this.curveType.byteLength)},n.prototype.getPublicKey=function(o,s){var f=this.keys.getPublic(s==="compressed",!0);return s==="hybrid"&&(f[f.length-1]%2?f[0]=7:f[0]=6),i(f,o)},n.prototype.getPrivateKey=function(o){return i(this.keys.getPrivate(),o)},n.prototype.setPublicKey=function(o,s){return s=s||"utf8",Je.Buffer.isBuffer(o)||(o=new Je.Buffer(o,s)),this.keys._importPublic(o),this},n.prototype.setPrivateKey=function(o,s){s=s||"utf8",Je.Buffer.isBuffer(o)||(o=new Je.Buffer(o,s));var f=new e(o);return f=f.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(f),this};function i(o,s,f){Array.isArray(o)||(o=o.toArray());var d=new Je.Buffer(o);if(f&&d.length0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var k=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=k+l:l=b[c-k.length]+k+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,k=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=k;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,k=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,V=h[2]|0,q=V&8191,Q=V>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(k,ne),c=Math.imul(k,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(k,ve)|0,c=c+Math.imul(k,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(k,ke)|0,c=c+Math.imul(k,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(k,re)|0,c=c+Math.imul(k,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(k,de)|0,c=c+Math.imul(k,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(k,pe)|0,c=c+Math.imul(k,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(k,Me)|0,c=c+Math.imul(k,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(k,xe)|0,c=c+Math.imul(k,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(k,Re)|0,c=c+Math.imul(k,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(k,Ce)|0,c=c+Math.imul(k,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;k--){var L=(h.words[m.length+k]|0)*67108864+(h.words[m.length+k-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,k);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,k),h.isZero()||(h.negative^=1);c&&(c.words[k]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,k=1;!(u.words[0]&k)&&M<26;++M,k<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var O={k256:null,p224:null,p192:null,p25519:null};function B(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},B.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},B.prototype.split=function(a,u){a.iushrn(this.n,0,u)},B.prototype.imulK=function(a){return a.imul(this.k)};function D(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,B),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(O[a])return O[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new K;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return O[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),k=this.pow(a,h),L=m;k.cmp(w)!==0;){for(var R=k,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var k=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),k===0&&E===0){y=0;continue}E<<=1,E|=k,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(UM);var zM=UM.exports,vR=zM,_pe=Bt.Buffer;function Ppe(t,e){return _pe.from(t.toRed(vR.mont(e.modulus)).redPow(new vR(e.publicExponent)).fromRed().toArray())}var oj=Ppe,Cpe=Jw,S7=i1,Ipe=Fb,wR=nj,xR=ij,jM=zM,Tpe=oj,Rpe=wM,Ts=Bt.Buffer,kpe=function(e,r,n){var i;e.padding?i=e.padding:n?i=1:i=4;var o=Cpe(e),s;if(i===4)s=Bpe(o,r);else if(i===1)s=Ope(o,r,n);else if(i===3){if(s=new jM(r),s.cmp(o.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return n?Rpe(s,o):Tpe(s,o)};function Bpe(t,e){var r=t.modulus.byteLength(),n=e.length,i=Ipe("sha1").update(Ts.alloc(0)).digest(),o=i.length,s=2*o;if(n>r-s-2)throw new Error("message too long");var f=Ts.alloc(r-n-s-2),d=r-o-1,p=S7(o),b=xR(Ts.concat([i,f,Ts.alloc(1,1),e],d),wR(p,d)),v=xR(p,wR(b,o));return new jM(Ts.concat([Ts.alloc(1),v,b],r))}function Ope(t,e,r){var n=e.length,i=t.modulus.byteLength();if(n>i-11)throw new Error("message too long");var o;return r?o=Ts.alloc(i-n-3,255):o=Npe(i-n-3),new jM(Ts.concat([Ts.from([0,r?1:2]),o,Ts.alloc(1),e],i))}function Npe(t){for(var e=Ts.allocUnsafe(t),r=0,n=S7(t*2),i=0,o;rs||new SR(r).cmp(o.modulus)>=0)throw new Error("decryption error");var f;n?f=$pe(new SR(r),o):f=Dpe(r,o);var d=yg.alloc(s-f.length);if(f=yg.concat([d,f],s),i===4)return zpe(o,f);if(i===1)return jpe(o,f,n);if(i===3)return f;throw new Error("unknown padding")};function zpe(t,e){var r=t.modulus.byteLength(),n=Fpe("sha1").update(yg.alloc(0)).digest(),i=n.length;if(e[0]!==0)throw new Error("decryption error");var o=e.slice(1,i+1),s=e.slice(i+1),f=AR(o,ER(s,i)),d=AR(s,ER(f,r-i-1));if(Hpe(n,d.slice(0,i)))throw new Error("decryption error");for(var p=i;d[p]===0;)p++;if(d[p++]!==1)throw new Error("decryption error");return d.slice(p)}function jpe(t,e,r){for(var n=e.slice(0,2),i=2,o=0;e[i++]!==0;)if(i>=e.length){o++;break}var s=e.slice(2,i-1);if((n.toString("hex")!=="0002"&&!r||n.toString("hex")!=="0001"&&r)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return e.slice(i)}function Hpe(t,e){t=yg.from(t),e=yg.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++icj||t<0)throw new TypeError("offset must be a uint32");if(t>fj||t>e)throw new RangeError("offset out of range")}function lj(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>cj||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>fj)throw new RangeError("buffer too small")}M7&&M7.getRandomValues||!Je.process.browser?(gm.randomFill=qpe,gm.randomFillSync=Gpe):(gm.randomFill=MR,gm.randomFillSync=MR);function qpe(t,e,r,n){if(!aj.isBuffer(t)&&!(t instanceof et.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")n=e,e=0,r=t.length;else if(typeof r=="function")n=r,r=t.length-e;else if(typeof n!="function")throw new TypeError('"cb" argument must be a function');return uj(e,t.length),lj(r,e,t.length),dj(t,e,r,n)}function dj(t,e,r,n){if(Je.process.browser){var i=t.buffer,o=new Uint8Array(i,e,r);if(M7.getRandomValues(o),n){Je.process.nextTick(function(){n(null,t)});return}return t}if(n){_R(r,function(f,d){if(f)return n(f);d.copy(t,e),n(null,t)});return}var s=_R(r);return s.copy(t,e),t}function Gpe(t,e,r){if(typeof e>"u"&&(e=0),!aj.isBuffer(t)&&!(t instanceof et.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return uj(e,t.length),r===void 0&&(r=t.length-e),lj(r,e,t.length),dj(t,e,r)}var PR;function hj(){if(PR)return Ct;PR=1,Ct.randomBytes=Ct.rng=Ct.pseudoRandomBytes=Ct.prng=i1,Ct.createHash=Ct.Hash=Fb,Ct.createHmac=Ct.Hmac=SU;var t=T0e,e=Object.keys(t),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Ct.getHashes=function(){return r};var n=Rw;Ct.pbkdf2=n.pbkdf2,Ct.pbkdf2Sync=n.pbkdf2Sync;var i=Js;Ct.Cipher=i.Cipher,Ct.createCipher=i.createCipher,Ct.Cipheriv=i.Cipheriv,Ct.createCipheriv=i.createCipheriv,Ct.Decipher=i.Decipher,Ct.createDecipher=i.createDecipher,Ct.Decipheriv=i.Decipheriv,Ct.createDecipheriv=i.createDecipheriv,Ct.getCiphers=i.getCiphers,Ct.listCiphers=i.listCiphers;var o=cle();Ct.DiffieHellmanGroup=o.DiffieHellmanGroup,Ct.createDiffieHellmanGroup=o.createDiffieHellmanGroup,Ct.getDiffieHellman=o.getDiffieHellman,Ct.createDiffieHellman=o.createDiffieHellman,Ct.DiffieHellman=o.DiffieHellman;var s=xpe();Ct.createSign=s.createSign,Ct.Sign=s.Sign,Ct.createVerify=s.createVerify,Ct.Verify=s.Verify,Ct.createECDH=Ape();var f=rj;Ct.publicEncrypt=f.publicEncrypt,Ct.privateEncrypt=f.privateEncrypt,Ct.publicDecrypt=f.publicDecrypt,Ct.privateDecrypt=f.privateDecrypt;var d=gm;return Ct.randomFill=d.randomFill,Ct.randomFillSync=d.randomFillSync,Ct.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` -`))},Ct.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},Ct}var pj=hj();const Vpe=es(pj),Kpe=BE({__proto__:null,default:Vpe},[pj]);/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */const Gt=BigInt(0),xr=BigInt(1),Zc=BigInt(2),Lm=BigInt(3),CR=BigInt(8),Jr=Object.freeze({a:Gt,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:xr,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),IR=(t,e)=>(t+e/Zc)/e,Yy={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(t){const{n:e}=Jr,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-xr*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),f=IR(o*t,e),d=IR(-n*t,e);let p=st(t-f*r-d*i,e),b=st(-f*n-d*o,e);const v=p>s,A=b>s;if(v&&(p=e-p),A&&(b=e-b),p>s||b>s)throw new Error("splitScalarEndo: Endomorphism failed, k="+t);return{k1neg:v,k1:p,k2neg:A,k2:b}}},Ls=32,xp=32,Wpe=32,p6=Ls+1,m6=2*Ls+1;function TR(t){const{a:e,b:r}=Jr,n=st(t*t),i=st(n*t);return st(i+e*t+r)}const Qy=Jr.a===Gt;class mj extends Error{constructor(e){super(e)}}function RR(t){if(!(t instanceof Jt))throw new TypeError("JacobianPoint expected")}class Jt{constructor(e,r,n){this.x=e,this.y=r,this.z=n}static fromAffine(e){if(!(e instanceof Fr))throw new TypeError("JacobianPoint#fromAffine: expected Point");return e.equals(Fr.ZERO)?Jt.ZERO:new Jt(e.x,e.y,xr)}static toAffineBatch(e){const r=Xpe(e.map(n=>n.z));return e.map((n,i)=>n.toAffine(r[i]))}static normalizeZ(e){return Jt.toAffineBatch(e).map(Jt.fromAffine)}equals(e){RR(e);const{x:r,y:n,z:i}=this,{x:o,y:s,z:f}=e,d=st(i*i),p=st(f*f),b=st(r*p),v=st(o*d),A=st(st(n*f)*p),_=st(st(s*i)*d);return b===v&&A===_}negate(){return new Jt(this.x,st(-this.y),this.z)}double(){const{x:e,y:r,z:n}=this,i=st(e*e),o=st(r*r),s=st(o*o),f=e+o,d=st(Zc*(st(f*f)-i-s)),p=st(Lm*i),b=st(p*p),v=st(b-Zc*d),A=st(p*(d-v)-CR*s),_=st(Zc*r*n);return new Jt(v,A,_)}add(e){RR(e);const{x:r,y:n,z:i}=this,{x:o,y:s,z:f}=e;if(o===Gt||s===Gt)return this;if(r===Gt||n===Gt)return e;const d=st(i*i),p=st(f*f),b=st(r*p),v=st(o*d),A=st(st(n*f)*p),_=st(st(s*i)*d),S=st(v-b),P=st(_-A);if(S===Gt)return P===Gt?this.double():Jt.ZERO;const I=st(S*S),C=st(S*I),T=st(b*I),O=st(P*P-C-Zc*T),B=st(P*(T-O)-A*C),D=st(i*f*S);return new Jt(O,B,D)}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){const r=Jt.ZERO;if(typeof e=="bigint"&&e===Gt)return r;let n=OR(e);if(n===xr)return this;if(!Qy){let v=r,A=this;for(;n>Gt;)n&xr&&(v=v.add(A)),A=A.double(),n>>=xr;return v}let{k1neg:i,k1:o,k2neg:s,k2:f}=Yy.splitScalar(n),d=r,p=r,b=this;for(;o>Gt||f>Gt;)o&xr&&(d=d.add(b)),f&xr&&(p=p.add(b)),b=b.double(),o>>=xr,f>>=xr;return i&&(d=d.negate()),s&&(p=p.negate()),p=new Jt(st(p.x*Yy.beta),p.y,p.z),d.add(p)}precomputeWindow(e){const r=Qy?128/e+1:256/e+1,n=[];let i=this,o=i;for(let s=0;s>=v,S>d&&(S-=b,e+=xr);const P=_,I=_+Math.abs(S)-1,C=A%2!==0,T=S<0;S===0?s=s.add(Xy(C,i[P])):o=o.add(Xy(T,i[I]))}return{p:o,f:s}}multiply(e,r){let n=OR(e),i,o;if(Qy){const{k1neg:s,k1:f,k2neg:d,k2:p}=Yy.splitScalar(n);let{p:b,f:v}=this.wNAF(f,r),{p:A,f:_}=this.wNAF(p,r);b=Xy(s,b),A=Xy(d,A),A=new Jt(st(A.x*Yy.beta),A.y,A.z),i=b.add(A),o=v.add(_)}else{const{p:s,f}=this.wNAF(n,r);i=s,o=f}return Jt.normalizeZ([i,o])[0]}toAffine(e){const{x:r,y:n,z:i}=this,o=this.equals(Jt.ZERO);e==null&&(e=o?CR:Kb(i));const s=e,f=st(s*s),d=st(f*s),p=st(r*f),b=st(n*d),v=st(i*s);if(o)return Fr.ZERO;if(v!==xr)throw new Error("invZ was invalid");return new Fr(p,b)}}Jt.BASE=new Jt(Jr.Gx,Jr.Gy,xr);Jt.ZERO=new Jt(Gt,xr,Gt);function Xy(t,e){const r=e.negate();return t?r:e}const _7=new WeakMap;let Fr=class xc{constructor(e,r){this.x=e,this.y=r}_setWindowSize(e){this._WINDOW_SIZE=e,_7.delete(this)}hasEvenY(){return this.y%Zc===Gt}static fromCompressedHex(e){const r=e.length===32,n=c0(r?e:e.subarray(1));if(!q8(n))throw new Error("Point is not on curve");const i=TR(n);let o=Qpe(i);const s=(o&xr)===xr;r?s&&(o=st(-o)):(e[0]&1)===1!==s&&(o=st(-o));const f=new xc(n,o);return f.assertValidity(),f}static fromUncompressedHex(e){const r=c0(e.subarray(1,Ls+1)),n=c0(e.subarray(Ls+1,Ls*2+1)),i=new xc(r,n);return i.assertValidity(),i}static fromHex(e){const r=vg(e),n=r.length,i=r[0];if(n===Ls)return this.fromCompressedHex(r);if(n===p6&&(i===2||i===3))return this.fromCompressedHex(r);if(n===m6&&i===4)return this.fromUncompressedHex(r);throw new Error(`Point.fromHex: received invalid point. Expected 32-${p6} compressed bytes or ${m6} uncompressed bytes, not ${n}`)}static fromPrivateKey(e){return xc.BASE.multiply(xg(e))}static fromSignature(e,r,n){const{r:i,s:o}=i1e(r);if(![0,1,2,3].includes(n))throw new Error("Cannot recover: invalid recovery bit");const s=gj(vg(e)),{n:f}=Jr,d=n===2||n===3?i+f:i,p=Kb(d,f),b=st(-s*p,f),v=st(o*p,f),A=n&1?"03":"02",_=xc.fromHex(A+Xd(d)),S=xc.BASE.multiplyAndAddUnsafe(_,b,v);if(!S)throw new Error("Cannot recover signature: point at infinify");return S.assertValidity(),S}toRawBytes(e=!1){return Hu(this.toHex(e))}toHex(e=!1){const r=Xd(this.x);return e?`${this.hasEvenY()?"02":"03"}${r}`:`04${r}${Xd(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const e="Point is not on elliptic curve",{x:r,y:n}=this;if(!q8(r)||!q8(n))throw new Error(e);const i=st(n*n),o=TR(r);if(st(i-o)!==Gt)throw new Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new xc(this.x,st(-this.y))}double(){return Jt.fromAffine(this).double().toAffine()}add(e){return Jt.fromAffine(this).add(Jt.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return Jt.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,r,n){const i=Jt.fromAffine(this),o=r===Gt||r===xr||this!==xc.BASE?i.multiplyUnsafe(r):i.multiply(r),s=Jt.fromAffine(e).multiplyUnsafe(n),f=o.add(s);return f.equals(Jt.ZERO)?void 0:f.toAffine()}};Fr.BASE=new Fr(Jr.Gx,Jr.Gy);Fr.ZERO=new Fr(Gt,Gt);function kR(t){return Number.parseInt(t[0],16)>=8?"00"+t:t}function BR(t){if(t.length<2||t[0]!==2)throw new Error(`Invalid signature integer tag: ${Ep(t)}`);const e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)throw new Error("Invalid signature integer: wrong length");if(r[0]===0&&r[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:c0(r),left:t.subarray(e+2)}}function Jpe(t){if(t.length<2||t[0]!=48)throw new Error(`Invalid signature tag: ${Ep(t)}`);if(t[1]!==t.length-2)throw new Error("Invalid signature: incorrect length");const{data:e,left:r}=BR(t.subarray(2)),{data:n,left:i}=BR(r);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${Ep(i)}`);return{r:e,s:n}}let Qd=class Yv{constructor(e,r){this.r=e,this.s=r,this.assertValidity()}static fromCompact(e){const r=e instanceof Uint8Array,n="Signature.fromCompact";if(typeof e!="string"&&!r)throw new TypeError(`${n}: Expected string or Uint8Array`);const i=r?Ep(e):e;if(i.length!==128)throw new Error(`${n}: Expected 64-byte hex`);return new Yv(g6(i.slice(0,64)),g6(i.slice(64,128)))}static fromDER(e){const r=e instanceof Uint8Array;if(typeof e!="string"&&!r)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:n,s:i}=Jpe(r?e:Hu(e));return new Yv(n,i)}static fromHex(e){return this.fromDER(e)}assertValidity(){const{r:e,s:r}=this;if(!wg(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!wg(r))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const e=Jr.n>>xr;return this.s>e}normalizeS(){return this.hasHighS()?new Yv(this.r,st(-this.s,Jr.n)):this}toDERRawBytes(){return Hu(this.toDERHex())}toDERHex(){const e=kR(Y1(this.s)),r=kR(Y1(this.r)),n=e.length/2,i=r.length/2,o=Y1(n),s=Y1(i);return`30${Y1(i+n+4)}02${s}${r}02${o}${e}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return Hu(this.toCompactHex())}toCompactHex(){return Xd(this.r)+Xd(this.s)}};function Rc(...t){if(!t.every(n=>n instanceof Uint8Array))throw new Error("Uint8Array list expected");if(t.length===1)return t[0];const e=t.reduce((n,i)=>n+i.length,0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0"));function Ep(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");let e="";for(let r=0;r0)return BigInt(t);if(typeof t=="bigint"&&wg(t))return t;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function st(t,e=Jr.P){const r=t%e;return r>=Gt?r:e+r}function wo(t,e){const{P:r}=Jr;let n=t;for(;e-- >Gt;)n*=n,n%=r;return n}function Qpe(t){const{P:e}=Jr,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),f=BigInt(88),d=t*t*t%e,p=d*d*t%e,b=wo(p,Lm)*p%e,v=wo(b,Lm)*p%e,A=wo(v,Zc)*d%e,_=wo(A,n)*A%e,S=wo(_,i)*_%e,P=wo(S,s)*S%e,I=wo(P,f)*P%e,C=wo(I,s)*S%e,T=wo(C,Lm)*p%e,O=wo(T,o)*_%e,B=wo(O,r)*d%e,D=wo(B,Zc);if(D*D%e!==t)throw new Error("Cannot find square root");return D}function Kb(t,e=Jr.P){if(t===Gt||e<=Gt)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=st(t,e),n=e,i=Gt,o=xr;for(;r!==Gt;){const f=n/r,d=n%r,p=i-o*f;n=r,r=d,i=o,o=p}if(n!==xr)throw new Error("invert: does not exist");return st(i,e)}function Xpe(t,e=Jr.P){const r=new Array(t.length),n=t.reduce((o,s,f)=>s===Gt?o:(r[f]=o,st(o*s,e)),xr),i=Kb(n,e);return t.reduceRight((o,s,f)=>s===Gt?o:(r[f]=st(o*r[f],e),st(o*s,e)),i),r}function e1e(t){const e=t.length*8-xp*8,r=c0(t);return e>0?r>>BigInt(e):r}function gj(t,e=!1){const r=e1e(t);if(e)return r;const{n}=Jr;return r>=n?r-n:r}let eh,Dm;class t1e{constructor(e,r){if(this.hashLen=e,this.qByteLen=r,typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof r!="number"||r<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(e).fill(1),this.k=new Uint8Array(e).fill(0),this.counter=0}hmac(...e){return Yc.hmacSha256(this.k,...e)}hmacSync(...e){return Dm(this.k,...e)}checkSync(){if(typeof Dm!="function")throw new mj("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(e=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),e),this.v=await this.hmac(this.v),e.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),e),this.v=await this.hmac(this.v))}reseedSync(e=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),e.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}async generate(){this.incr();let e=0;const r=[];for(;e0)e=BigInt(t);else if(typeof t=="string"){if(t.length!==2*xp)throw new Error("Expected 32 bytes of private key");e=g6(t)}else if(t instanceof Uint8Array){if(t.length!==xp)throw new Error("Expected 32 bytes of private key");e=c0(t)}else throw new TypeError("Expected valid private key");if(!wg(e))throw new Error("Expected private key: 0 < key < n");return e}function n1e(t){return t instanceof Fr?(t.assertValidity(),t):Fr.fromHex(t)}function i1e(t){if(t instanceof Qd)return t.assertValidity(),t;try{return Qd.fromDER(t)}catch{return Qd.fromCompact(t)}}function o1e(t,e=!1){return Fr.fromPrivateKey(t).toRawBytes(e)}function s1e(t,e,r,n=!1){return Fr.fromSignature(t,e,r).toRawBytes(n)}function NR(t){const e=t instanceof Uint8Array,r=typeof t=="string",n=(e||r)&&t.length;return e?n===p6||n===m6:r?n===p6*2||n===m6*2:t instanceof Fr}function a1e(t,e,r=!1){if(NR(t))throw new TypeError("getSharedSecret: first arg must be private key");if(!NR(e))throw new TypeError("getSharedSecret: second arg must be public key");const n=n1e(e);return n.assertValidity(),n.multiply(xg(t)).toRawBytes(r)}function bj(t){const e=t.length>Ls?t.slice(0,Ls):t;return c0(e)}function f1e(t){const e=bj(t),r=st(e,Jr.n);return yj(r{t=vg(t);const e=xp+8;if(t.length1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const r=st(c0(t),Jr.n-xr)+xr;return P7(r)},randomBytes:(t=32)=>{if(ji.web)return ji.web.getRandomValues(new Uint8Array(t));if(ji.node){const{randomBytes:e}=ji.node;return Uint8Array.from(e(t))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>Yc.hashToPrivateKey(Yc.randomBytes(xp+8)),precompute(t=8,e=Fr.BASE){const r=e===Fr.BASE?e:new Fr(e.x,e.y);return r._setWindowSize(t),r.multiply(Lm),r},sha256:async(...t)=>{if(ji.web){const e=await ji.web.subtle.digest("SHA-256",Rc(...t));return new Uint8Array(e)}else if(ji.node){const{createHash:e}=ji.node,r=e("sha256");return t.forEach(n=>r.update(n)),Uint8Array.from(r.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(t,...e)=>{if(ji.web){const r=await ji.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=Rc(...e),i=await ji.web.subtle.sign("HMAC",r,n);return new Uint8Array(i)}else if(ji.node){const{createHmac:r}=ji.node,n=r("sha256",t);return e.forEach(i=>n.update(i)),Uint8Array.from(n.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(t,...e)=>{let r=ev[t];if(r===void 0){const n=await Yc.sha256(Uint8Array.from(t,i=>i.charCodeAt(0)));r=Rc(n,n),ev[t]=r}return Yc.sha256(r,...e)},taggedHashSync:(t,...e)=>{if(typeof eh!="function")throw new mj("sha256Sync is undefined, you need to set it");let r=ev[t];if(r===void 0){const n=eh(Uint8Array.from(t,i=>i.charCodeAt(0)));r=Rc(n,n),ev[t]=r}return eh(r,...e)},_JacobianPoint:Jt};Object.defineProperties(Yc,{sha256Sync:{configurable:!1,get(){return eh},set(t){eh||(eh=t)}},hmacSha256Sync:{configurable:!1,get(){return Dm},set(t){Dm||(Dm=t)}}});const b6="0x0000000000000000000000000000000000000000",LR="0x0000000000000000000000000000000000000000000000000000000000000000",DR=BigInt(0),FR=BigInt(1),$R=BigInt(2),UR=BigInt(27),zR=BigInt(28),tv=BigInt(35),Ql={};function jR(t){return rl(oo(t),32)}var mh,gh,bh,Eu,Zi;let Jf=(Zi=class{constructor(e,r,n,i){Ne(this,mh,void 0);Ne(this,gh,void 0);Ne(this,bh,void 0);Ne(this,Eu,void 0);Cb(e,Ql,"Signature"),ce(this,mh,r),ce(this,gh,n),ce(this,bh,i),ce(this,Eu,null)}get r(){return X(this,mh)}set r(e){_e(Gd(e)===32,"invalid r","value",e),ce(this,mh,dt(e))}get s(){return X(this,gh)}set s(e){_e(Gd(e)===32,"invalid s","value",e);const r=dt(e);_e(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),ce(this,gh,r)}get v(){return X(this,bh)}set v(e){const r=Tt(e,"value");_e(r===27||r===28,"invalid v","v",e),ce(this,bh,r)}get networkV(){return X(this,Eu)}get legacyChainId(){const e=this.networkV;return e==null?null:Zi.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=qt(this.s);return this.yParity&&(e[0]|=128),dt(e)}get compactSerialized(){return en([this.r,this.yParityAndS])}get serialized(){return en([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Zi(Ql,this.r,this.s,this.v);return this.networkV&&ce(e,Eu,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=pt(e,"v");return r==UR||r==zR?DR:(_e(r>=tv,"invalid EIP-155 v","v",e),(r-tv)/$R)}static getChainIdV(e,r){return pt(e)*$R+BigInt(35+r-27)}static getNormalizedV(e){const r=pt(e);return r===DR||r===UR?27:r===FR||r===zR?28:(_e(r>=tv,"invalid v","v",e),r&FR?27:28)}static from(e){function r(p,b){_e(p,b,"signature",e)}if(e==null)return new Zi(Ql,LR,LR,27);if(typeof e=="string"){const p=qt(e,"signature");if(p.length===64){const b=dt(p.slice(0,32)),v=p.slice(32,64),A=v[0]&128?28:27;return v[0]&=127,new Zi(Ql,b,dt(v),A)}if(p.length===65){const b=dt(p.slice(0,32)),v=p.slice(32,64);r((v[0]&128)===0,"non-canonical s");const A=Zi.getNormalizedV(p[64]);return new Zi(Ql,b,dt(v),A)}r(!1,"invalid raw signature length")}if(e instanceof Zi)return e.clone();const n=e.r;r(n!=null,"missing r");const i=jR(n),o=function(p,b){if(p!=null)return jR(p);if(b!=null){r(Tr(b,32),"invalid yParityAndS");const v=qt(b);return v[0]&=127,dt(v)}r(!1,"missing s")}(e.s,e.yParityAndS);r((qt(o)[0]&128)==0,"non-canonical s");const{networkV:s,v:f}=function(p,b,v){if(p!=null){const A=pt(p);return{networkV:A>=tv?A:void 0,v:Zi.getNormalizedV(A)}}if(b!=null)return r(Tr(b,32),"invalid yParityAndS"),{v:qt(b)[0]&128?28:27};if(v!=null){switch(Tt(v,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),d=new Zi(Ql,i,o,f);return s&&ce(d,Eu,s),r(e.yParity==null||Tt(e.yParity,"sig.yParity")===d.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===d.yParityAndS,"yParityAndS mismatch"),d}},mh=new WeakMap,gh=new WeakMap,bh=new WeakMap,Eu=new WeakMap,Zi);Yc.hmacSha256Sync=function(t,...e){return qt(Rb("sha256",t,en(e)))};var hf,Af;let HM=(Af=class{constructor(e){Ne(this,hf,void 0);_e(Gd(e)===32,"invalid private key","privateKey","[REDACTED]"),ce(this,hf,dt(e))}get privateKey(){return X(this,hf)}get publicKey(){return Af.computePublicKey(X(this,hf))}get compressedPublicKey(){return Af.computePublicKey(X(this,hf),!0)}sign(e){_e(Gd(e)===32,"invalid digest length","digest",e);const[r,n]=l1e(Ii(e),Ii(X(this,hf)),{recovered:!0,canonical:!0}),i=Qd.fromHex(r);return Jf.from({r:y0("0x"+i.r.toString(16),32),s:y0("0x"+i.s.toString(16),32),v:n?28:27})}computeSharedSecret(e){const r=Af.computePublicKey(e);return dt(a1e(Ii(X(this,hf)),qt(r)))}static computePublicKey(e,r){let n=qt(e,"key");if(n.length===32){const o=o1e(n,!!r);return dt(o)}if(n.length===64){const o=new Uint8Array(65);o[0]=4,o.set(n,1),n=o}const i=Fr.fromHex(n);return dt(i.toRawBytes(r))}static recoverPublicKey(e,r){_e(Gd(e)===32,"invalid digest length","digest",e);const n=Jf.from(r),i=Qd.fromCompact(Ii(en([n.r,n.s]))).toDERRawBytes(),o=s1e(Ii(e),i,n.yParity);return _e(o!=null,"invalid signature for digest","signature",r),dt(o)}static addPoints(e,r,n){const i=Fr.fromHex(Af.computePublicKey(e).substring(2)),o=Fr.fromHex(Af.computePublicKey(r).substring(2));return"0x"+i.add(o).toHex(!!n)}},hf=new WeakMap,Af);const d1e=BigInt(0),h1e=BigInt(36);function HR(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=qt(Ir(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const qM={};for(let t=0;t<10;t++)qM[String(t)]=String(t);for(let t=0;t<26;t++)qM[String.fromCharCode(65+t)]=String(10+t);const qR=15;function p1e(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>qM[n]).join("");for(;e.length>=qR;){let n=e.substring(0,qR);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}const m1e=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function g1e(t){t=t.toLowerCase();let e=d1e;for(let r=0;re.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return X(this,Au)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return X(this,Au)===!0?-1:X(this,Au)===!1?this.value.length:null}static from(e,r){return new nf(tf,e,r)}static uint8(e){return ot(e,8)}static uint16(e){return ot(e,16)}static uint24(e){return ot(e,24)}static uint32(e){return ot(e,32)}static uint40(e){return ot(e,40)}static uint48(e){return ot(e,48)}static uint56(e){return ot(e,56)}static uint64(e){return ot(e,64)}static uint72(e){return ot(e,72)}static uint80(e){return ot(e,80)}static uint88(e){return ot(e,88)}static uint96(e){return ot(e,96)}static uint104(e){return ot(e,104)}static uint112(e){return ot(e,112)}static uint120(e){return ot(e,120)}static uint128(e){return ot(e,128)}static uint136(e){return ot(e,136)}static uint144(e){return ot(e,144)}static uint152(e){return ot(e,152)}static uint160(e){return ot(e,160)}static uint168(e){return ot(e,168)}static uint176(e){return ot(e,176)}static uint184(e){return ot(e,184)}static uint192(e){return ot(e,192)}static uint200(e){return ot(e,200)}static uint208(e){return ot(e,208)}static uint216(e){return ot(e,216)}static uint224(e){return ot(e,224)}static uint232(e){return ot(e,232)}static uint240(e){return ot(e,240)}static uint248(e){return ot(e,248)}static uint256(e){return ot(e,256)}static uint(e){return ot(e,256)}static int8(e){return ot(e,-8)}static int16(e){return ot(e,-16)}static int24(e){return ot(e,-24)}static int32(e){return ot(e,-32)}static int40(e){return ot(e,-40)}static int48(e){return ot(e,-48)}static int56(e){return ot(e,-56)}static int64(e){return ot(e,-64)}static int72(e){return ot(e,-72)}static int80(e){return ot(e,-80)}static int88(e){return ot(e,-88)}static int96(e){return ot(e,-96)}static int104(e){return ot(e,-104)}static int112(e){return ot(e,-112)}static int120(e){return ot(e,-120)}static int128(e){return ot(e,-128)}static int136(e){return ot(e,-136)}static int144(e){return ot(e,-144)}static int152(e){return ot(e,-152)}static int160(e){return ot(e,-160)}static int168(e){return ot(e,-168)}static int176(e){return ot(e,-176)}static int184(e){return ot(e,-184)}static int192(e){return ot(e,-192)}static int200(e){return ot(e,-200)}static int208(e){return ot(e,-208)}static int216(e){return ot(e,-216)}static int224(e){return ot(e,-224)}static int232(e){return ot(e,-232)}static int240(e){return ot(e,-240)}static int248(e){return ot(e,-248)}static int256(e){return ot(e,-256)}static int(e){return ot(e,-256)}static bytes1(e){return Wt(e,1)}static bytes2(e){return Wt(e,2)}static bytes3(e){return Wt(e,3)}static bytes4(e){return Wt(e,4)}static bytes5(e){return Wt(e,5)}static bytes6(e){return Wt(e,6)}static bytes7(e){return Wt(e,7)}static bytes8(e){return Wt(e,8)}static bytes9(e){return Wt(e,9)}static bytes10(e){return Wt(e,10)}static bytes11(e){return Wt(e,11)}static bytes12(e){return Wt(e,12)}static bytes13(e){return Wt(e,13)}static bytes14(e){return Wt(e,14)}static bytes15(e){return Wt(e,15)}static bytes16(e){return Wt(e,16)}static bytes17(e){return Wt(e,17)}static bytes18(e){return Wt(e,18)}static bytes19(e){return Wt(e,19)}static bytes20(e){return Wt(e,20)}static bytes21(e){return Wt(e,21)}static bytes22(e){return Wt(e,22)}static bytes23(e){return Wt(e,23)}static bytes24(e){return Wt(e,24)}static bytes25(e){return Wt(e,25)}static bytes26(e){return Wt(e,26)}static bytes27(e){return Wt(e,27)}static bytes28(e){return Wt(e,28)}static bytes29(e){return Wt(e,29)}static bytes30(e){return Wt(e,30)}static bytes31(e){return Wt(e,31)}static bytes32(e){return Wt(e,32)}static address(e){return new nf(tf,"address",e)}static bool(e){return new nf(tf,"bool",!!e)}static bytes(e){return new nf(tf,"bytes",e)}static string(e){return new nf(tf,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new nf(tf,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===GR}static dereference(e,r){if(nf.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Au=new WeakMap;let Yn=nf;class y1e extends rc{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=Yn.dereference(r,"string");try{n=Zt(n)}catch(i){return this._throwError(i.message,r)}return e.writeValue(n)}decode(e){return Zt(y0(e.readValue(),20))}}class v1e extends rc{constructor(r){super(r.name,r.type,"_",r.dynamic);Oe(this,"coder");this.coder=r}defaultValue(){return this.coder.defaultValue()}encode(r,n){return this.coder.encode(r,n)}decode(r){return this.coder.decode(r)}}function wj(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let d={};n=e.map(p=>{const b=p.localName;return Ge(b,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:p},value:r}),Ge(!d[b],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:p},value:r}),d[b]=!0,r[b]})}else _e(!1,"invalid tuple value","tuple",r);_e(e.length===n.length,"types/value length mismatch","tuple",r);let i=new Q9,o=new Q9,s=[];e.forEach((d,p)=>{let b=n[p];if(d.dynamic){let v=o.length;d.encode(o,b);let A=i.writeUpdatableValue();s.push(_=>{A(_+v)})}else d.encode(i,b)}),s.forEach(d=>{d(i.length)});let f=t.appendWriter(i);return f+=t.appendWriter(o),f}function xj(t,e){let r=[],n=[],i=t.subReader(0);return e.forEach(o=>{let s=null;if(o.dynamic){let f=t.readIndex(),d=i.subReader(f);try{s=o.decode(d)}catch(p){if($o(p,"BUFFER_OVERRUN"))throw p;s=p,s.baseType=o.name,s.name=o.localName,s.type=o.type}}else try{s=o.decode(t)}catch(f){if($o(f,"BUFFER_OVERRUN"))throw f;s=f,s.baseType=o.name,s.name=o.localName,s.type=o.type}if(s==null)throw new Error("investigate");r.push(s),n.push(o.localName||null)}),e6.fromItems(r,n)}class w1e extends rc{constructor(r,n,i){const o=r.type+"["+(n>=0?n:"")+"]",s=n===-1||r.dynamic;super("array",o,i,s);Oe(this,"coder");Oe(this,"length");xt(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let i=0;is||i<-(s+P1e))&&this._throwError("value out-of-bounds",n),i=YF(i,8*si)}else(i<_1e||i>au(o,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(i)}decode(r){let n=au(r.readValue(),this.size*8);return this.signed&&(n=Q2(n,this.size*8)),n}}class T1e extends Ej{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Bf(Yn.dereference(r,"string")))}decode(e){return HS(super.decode(e))}}class rv extends rc{constructor(r,n){let i=!1;const o=[];r.forEach(f=>{f.dynamic&&(i=!0),o.push(f.type)});const s="tuple("+o.join(",")+")";super("tuple",s,n,i);Oe(this,"coders");xt(this,{coders:Object.freeze(r.slice())})}defaultValue(){const r=[];this.coders.forEach(i=>{r.push(i.defaultValue())});const n=this.coders.reduce((i,o)=>{const s=o.localName;return s&&(i[s]||(i[s]=0),i[s]++),i},{});return this.coders.forEach((i,o)=>{let s=i.localName;!s||n[s]!==1||(s==="length"&&(s="_length"),r[s]==null&&(r[s]=r[o]))}),Object.freeze(r)}encode(r,n){const i=Yn.dereference(n,"tuple");return wj(r,this.coders,i)}decode(r){return xj(r,this.coders)}}function fl(t){return Ir(Bf(t))}function R1e(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,o=[0,1];for(let D=1;D>--d&1}const v=31,A=2**v,_=A>>>1,S=_>>1,P=A-1;let I=0;for(let D=0;D1;){let ie=U+K>>>1;D>>1|b(),Y=Y<<1^_,W=(W^_)<<1|_|1;T=Y,O=1+W-Y}let B=n-4;return C.map(D=>{switch(D-B){case 3:return B+65792+(t[f++]<<16|t[f++]<<8|t[f++]);case 2:return B+256+(t[f++]<<8|t[f++]);case 1:return B+t[f++];default:return D-1}})}function k1e(t){let e=0;return()=>t[e++]}function Aj(t){return k1e(R1e(B1e(t)))}function B1e(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,o)=>e[i.charCodeAt(0)]=o);let r=t.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,s=0,f=0;i=8&&(n[o++]=f>>(s-=8));return n}function O1e(t){return t&1?~t>>1:t>>1}function N1e(t,e){let r=Array(t);for(let n=0,i=0;n{let e=w0(t);if(e.length)return e})}function Mj(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(L1e(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(D1e(r,t))}return e.flat()}function Eg(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function _j(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;in[s].push(o));return n}function L1e(t,e){let r=1+e(),n=e(),i=Eg(e);return _j(i.length,1+t,e).flatMap((s,f)=>{let[d,...p]=s;return Array(i[f]).fill().map((b,v)=>{let A=v*n;return[d+v*r,p.map(_=>_+A)]})})}function D1e(t,e){let r=1+e();return _j(r,1+t,e).map(i=>[i[0],i.slice(1)])}var lo=Aj("AEgSbwjEDVYByQKaAQsBOQDpATQAngDUAHsAoABoANQAagCNAEQAhABMAHIAOwA9ACsANgAmAGIAHgAvACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGAAeABMAFwAXAA0ADgAWAA8AFAAVBFsF1QEXE0o3xAXUALIArkABaACmAgPGAK6AMDAwMAE/qAYK7P4HQAblMgVYBVkAPSw5Afa3EgfJwgAPA8meNALGCjACjqIChtk/j2+KAsXMAoPzASDgCgDyrgFCAi6OCkCQAOQA4woWABjVuskNDD6eBBx4AP4COhi+D+wKBirqBgSCaA0cBy4ArABqku+mnIAAXAaUJAbqABwAPAyUFvyp/Mo8INAIvCoDshQ8APcubKQAon4ZABgEJtgXAR4AuhnOBPsKIE04CZgJiR8cVlpM5INDABQADQAWAA9sVQAiAA8ASO8W2T30OVnKluYvChEeX05ZPe0AFAANABYAD2wgXUCYAMPsABwAOgzGFryp/AHauQVcBeMC0KACxLEKTR2kZhR0Gm5M9gC8DmgC4gAMLjSKF8qSAoF8ARMcAL4OaALiAAwuAUlQJpJMCwMt/AUpCthqGK4B2EQAciwSeAIyFiIDKCi6OGwAOuIB9iYAyA7MtgEcZIIAsgYABgCK1EoFHNZsGACoKNIBogAAAAAAKy4DnABoAQoaPu43dQQZGACrAcgCIgDgLBJ0OvRQsTOiKDVJBfsoBVoFWbC5BWo7XkITO1hCmHuUZmCh+QwUA8YIJvJ4JASkTAJUVAJ2HKwoAZCkpjZcA0YYBIRiCgDSBqxAMCQHKgI6XgBsAWIgcgCEHhoAlgFKuAAoahgBsMYDOC4iRFQBcFoGZgJmAPJKGAMqAgYASkIArABeAHQALLYGCPTwGo6AAAAKIgAqALQcSAHSAdwIDDKXeYHpAAsAEgA1AD4AOTR3etTBEGAQXQJNCkxtOxUMAq0PpwvmERYM0irM09kANKoH7ANUB+wDVANUB+wH7ANUB+wDVANUA1QDVBwL8BvUwRBgD0kEbgWPBYwE1wiEJkoRggcpCNNUDnQfHEgDRgD9IyZJHTuUMwwlQ0wNTQQH/TZDbKh9OQNIMaxU9pCjA8wyUDltAh5yEqEAKw90HTW2Tn96SHGhCkxPr7WASWNOaAK/Oqk/+QoiCZRvvHdPBj4QGCeiEPQMMAGyATgN6kvVBO4GOATGH3oZFg/KlZkIoi3aDOom4C6egFcj8iqABepL8TzaC0pRZQ9WC2IJ4DpggUsDHgEKIogK2g02CGoQ8ArGaA3iEUIHNgPSSZcAogb+Cw4dMhWyJg1iqQsGOXQG+BrzC4wmrBMmevkF0BoeBkoBJhr8AMwu5IWtWi5cGU9cBgALIiPEFKVQHQ0iQLR4RRoYBxIlpgKOQ21KhFEzHpAh8zw6DWMuEFF5B/I8AhlMC348m0aoRQsRzz6KPUUiRkwpBDJ8LCwniAnMD4IMtnxvAVYJHgmuDG4TLhEUN8IINgcWKpchJxIIHkaSYJcE9JwD8BPOAwgFPAk+BxADshwqEysVJgUKgSHUAvA20i6wAoxWfQEUBcgPIh/cEE1H3Q7mCJgCYgOAJegAKhUeABQimAhAYABcj9VTAi7ICMRqaSNxA2QU5F4RcAeODlQHpBwwFbwc3nDFXgiGBSigrAlYAXIJlgFcBOAIBjVYjJ0gPmdQi1UYmCBeQTxd+QIuDGIVnES6h3UCiA9oEhgBMgFwBzYM/gJ0EeoRaBCSCOiGATWyM/U6IgRMIYAgDgokA0xsywskJvYM9WYBoBJfAwk0OnfrZ6hgsyEX+gcWMsJBXSHuC49PygyZGr4YP1QrGeEHvAPwGvAn50FUBfwDoAAQOkoz6wS6C2YIiAk8AEYOoBQH1BhnCm6MzQEuiAG0lgNUjoACbIwGNAcIAGQIhAV24gAaAqQIoAACAMwDVAA2AqoHmgAWAII+AToDJCwBHuICjAOQCC7IAZIsAfAmBBjADBIA9DRuRwLDrgKAZ2afBdpVAosCRjIBSiIEAktETgOsbt4A2ABIBhDcRAESqEfIF+BAAdxsKADEAPgAAjIHAj4BygHwagC0AVwLLgmfsLIBSuYmAIAAEmgB1AKGANoAMgB87gFQAEoFVvYF0AJMRgEOLhUoVF4BuAMcATABCgB2BsiKosYEHARqB9ACEBgV3gLvKweyAyLcE8pCwgK921IAMhMKNQqkCqNgWF0wAy5vPU0ACx+lPsQ/SwVOO1A7VTtQO1U7UDtVO1A7VTtQO1UDlLzfvN8KaV9CYegMow3RRMU6RhPYYE5gLxPFLbQUvhXLJVMZOhq5JwIl4VUGDwEt0GYtCCk0che5ADwpZYM+Y4MeLQpIHORTjlT1LRgArkufM6wNqRsSRD0FRHXqYicWCwofAmR+AmI/WEqsWDcdAqH0AmiVAmYGAp+BOBgIAmY4AmYjBGsEfAN/EAN+jzkDOXQUOX86ICACbBoCMjM4BwJtxAJtq+yHMGRCKAFkANsA3gBHAgeVDIoA+wi/AAqyAncsAnafPAJ5SEACeLcaWdhFq0bwAnw8AnrFAn0GAnztR/1IemAhACgSSVVKWBIUSskC0P4C0MlLJAOITAOH40TCkS8C8p5dAAMDq0vLTCoiAMxNSU2sAos8AorVvhgEGkBkArQCjjQCjlk9lH4CjtYCjll1UbFTMgdS0VSCApP4ApMJAOYAGVUbVaxVzQMsGCmSgzLeeGNFODYCl5wC769YHqUAViIClowClnmZAKZZqVoGfkoAOAKWsgKWS1xBXM4CmcgCmWFcx10EFgKcmDm/OpoCnBMCn5gCnrWHABoMLicMAp3uAp6PALI6YTFh7AKe0AKgawGmAp6cHAKeS6JjxWQkIigCJ6wCJnsCoPgCoEnUAqYsAqXLAqf8AHoCp+9oeWiuAABGahlqzgKs4AKsqwKtZAKs/wJXGgJV2QKx3tQDH0tslAKyugoCsuUUbN1tYG1FXAMlygK2WTg8bo0DKUICuFsCuUQSArkndHAzcN4CvRYDLa8DMg4CvoVx/wMzbgK+F3Mfc0wCw8gCwwFzf3RIMkJ03QM8pAM8lwM9vALFeQLGRALGDYYCyGZOAshBAslMAskrAmSaAt3PeHZeeKt5IkvNAxigZv8CYfEZ8JUhewhej164DgLPaALPaSxIUM/wEJwAw6oCz3ABJucDTg9+SAIC3CQC24cC0kwDUlkDU1wA/gNViYCGPMgT6l1CcoLLg4oC2sQC2duEDYRGpzkDhqIALANkC4ZuVvYAUgLfYgLetXB0AuIs7REB8y0kAfSYAfLPhALr8ALpbXYC6vYC6uEA9kQBtgLuhgLrmZanlwAC7jwDhd2YdnDdcZ4C8wAAZgOOE5mQAvcQA5FrA5KEAveVAvnWAvhjmhmaqLg0mxsDnYAC/vcBGAA2nxmfsAMFigOmZwOm1gDOwgMGZ6GFogIGAwxGAQwBHAdqBl62ZAIAuARovA6IHrAKABRyNgAgAzASSgOGfAFgJB4AjOwAHgDmoAScjgi0BhygwgCoBRK86h4+PxZ5BWk4P0EsQiJCtV9yEl+9AJbGBTMAkE0am7o7J2AzErrQDjAYxxiKyfcFWAVZBVgFWQVkBVkFWAVZBVgFWQVYBVkFWAVZRxYI2IZoAwMDCmVe6iwEygOyBjC8vAC8BKi8AOhBKhazBUc+aj5xQkBCt192OF/pAFgSM6wAjP/MbMv9puhGez4nJAUsFyg3Nn5u32vB8hnDLGoBbNdvMRgFYAVrycLJuQjQSlwBAQEKfV5+jL8AND+CAAQW0gbmriQGAIzEDAMCDgDlZh4+JSBLQrJCvUI5JF8oYDcoOSQJwj4KRT9EPnk+gj5xPnICikK9SkM8X8xPUGtOCy1sVTBrDG8gX+E0OxwJaJwKYyQsPR4nQqxCvSzMAsv9X8oPIC8KCQoAACN+nt9rOy5LGMmsya0JZsLMzQphQWAP5hCkEgCTjh5GQiYbqm06zjkKND9EPnFCQBwICx5NSG1cLS5a4rwTCn7uHixCQBxeCUsKDzRVREM4BTtEnC0KghwuQkAb9glUIyQZMTIBBo9i8F8KcmTKYAxgLiRvAERgGjoDHB9gtAcDbBFmT2BOEgIAZOhgFmCWYH5gtGBMYJJpFhgGtg/cVqq8WwtDF6wBvCzOwgMgFgEdBB8BegJtMDGWU4EBiwq5SBsA5SR0jwvLDqdN6wGcAoidUAVBYAD4AD4LATUXWHsMpg0lILuwSABQDTUAFhO4NVUC0wxLZhEcANlPBnYECx9bADIAtwKbKAsWcKwzOaAaAVwBhwn9A9ruEAarBksGugAey1aqWwq7YhOKCy1ADrwBvAEjA0hbKSkpIR8gIi0TJwciDY4AVQJvWJFKlgJvIA9ySAHUdRDPUiEaqrFN6wcSBU1gAPgAPgsBewAHJW0LiAymOTEuyLBXDgwAYL0MAGRKaFAiIhzAADIAtwKbKC08D88CkRh8ULxYyXRzjtilnA72mhU+G+0S2hIHDxwByAk7EJQGESwNNwwAPAC0zwEDAKUA4gCbizAAFQBcG8cvbXcrDsIRAzwlRNTiHR8MG34CfATCC6vxbQA4Oi4Opzkuz6IdB7wKABA7Ls8SGgB9rNsdD7wbSBzOoncfAT4qYB0C7KAJBE3z5R9mDL0M+wg9Cj8ABcELPgJMDbwIvQ09CT0KvS7PoisOvAaYAhwPjBriBBwLvBY8AKELPBC8BRihe90AO2wMPQACpwm9BRzR9QYFB2/LBnwAB7wSXBISvQECAOsCAAB1FVwHFswV/HAXvBg8AC68AuyovAAevAJWISuAAAG8AALkFT0VvCvso7zJqDwEAp8nTAACXADn3hm8CaVcD7/FAPUafAiiBQv/cQDfvKe8GNwavKOMeXMG/KmchAASvAcbDAADlABtvAcAC7ynPAIaPLsIopzLDvwHwak8AOF8L7dtvwNJAAPsABW8AAb8AAm8AGmMABq8AA68Axi8jmoV/AABXAAObAAuTB8ABrwAF7wIIgANSwC6vCcAA7wADpwq7ACyWwAcHAAbvAAB7AqiAAXHCxYV3AAHnABCvAEDAGm8AAt8AB28AAi8CaIABcsAbqAZ1gCSCCIABcsAATwAB9wAHZwIIgAGmwAJfAAbLABtHADmvIEACFwACDwAFLwAaPwJIgAGywDjjAAJPAuiDsX7YAAHPABunUBJAEgACrwFAAM8AAmuAzgABxwAGXwAAgym/AAKHAAKPAAJ/KfsBrwACRwAAwwAEDwBABQ8ABFsAA+MAA3sAA28ABkMBxYcABU8AG6cFrQBvAC7ABM8BABpLAsA4UwAAjwABFMAF3wFHAAG0QAYvB8BfClTADpGALAJBw4McwApK3EBpQYIXwJtJA0ACghwTG1gK4oggRVjLjcDogq1AALZABcC/ARvAXdzSFMVIgNQAhY/AS0GBHRHvnxTe0EAKgAyAvwAVAvcAHyRLQEsAHfmDhIzRwJLAFgGAAJRAQiLzQB5PAQhpgBbANcWAJZpOCCMAM5ssgDQ1RcJw3Z0HBlXHgrSAYmRrCNUVE5JEz3DivoAgB04QSos4RKYUABzASosMSlDGhADMVYE+MbvAExm3QBrAnICQBF7Osh4LzXWBhETIAUVCK6v/xPNACYAAQIbAIYAiQCONgDjALQA1QCdPQC7AKsApgChAOcAnwDTAJwA4AEBAPwAwAB6AFsAywDNAPwA1wDrAIkAogEqAOMA2ADVBAIIKzTT09PTtb/bzM/NQjEWAUsBVS5GAVMBYgFhAVQBRUpCRGcMAUwUBgkEMzcMBwAgDSQmKCs3OTk8PDw9Pg0/HVBQUFBSUlFSKFNUVlVVHFxgYF9hYCNlZ29ucXFxcXFxc3Nzc3Nzc3Nzc3N1dXZ1dFsAPesAQgCTAHEAKwBf8QCHAFAAUAAwAm/oAIT+8fEAXQCM6wCYAEgAWwBd+PipAH4AfgBiAE8AqgAdAK8AfAI5AjwA9QDgAPcA9wDhAPgA4gDiAOEA3wAoAnQBSgE5ATcBTQE3ATcBNwEyATEBMQExARUBURAAKgkBAEwYCxcEFhcPAIcAjwCfAEoAYxkCKgBvAGgAkAMOAyArAxpCP0gqAIoCSADAAlACnQC5Ao8CjwKPAo8CjwKPAoQCjwKPAo8CjwKPAo8CjgKOApECmQKQAo8CjwKNAo0CjQKNAosCjgJuAc0CkAKYAo8CjwKOF3oMAPcGA5gCWgIzGAFNETYC2xILLBQBRzgUTpIBdKU9AWJaAP4DOkgA/wCSKh4ZkGsAKmEAagAvAIoDlcyM8K+FWwa7LA/DEgKe1nUrCwQkWwGzAN5/gYB/gX+Cg4N/hIeFf4aJh4GIg4mDin+Lf4x/jYuOf49/kIORf5J/k3+Uf5WElomXg5h/AIMloQCEBDwEOQQ7BD4EPARCBD8EOgRABEIEQQQ9BD8EQgCkA4gAylIA0AINAPdbAPcBGgD3APUA9QD2APXVhSRmvwD3APUA9QD2APUdAIpbAPcAigEaAPcAigLtAPcAitWFJGa/HQD4WwEaAPcA9wD1APUA9gD1APgA9QD1APYA9dWFJGa/HQCKWwEaAPcAigD3AIoC7QD3AIrVhSRmvx0CRAE3AksBOgJMwgOfAu0Dn9WFJGa/HQCKWwEaA58AigOfAIoC7QOfAIrVhSRmvx0EMQCKBDIAigeOMm4hLQCKAT9vBCQA/gDHWwMAVVv/FDMDAIoDPtkASgMAigMAl2dBtv/TrfLzakaPh3aztmIuZQrR3ER2n5Yo+qNR2jK/aP/V04UK1njIJXLgkab9PjOxyJDVbIN3R/FZLoZVl2kYFQIZ7V6LpRqGDt9OdDohnJKp5yX/HLj0voPpLrneDaN11t5W3sSM4ALscgSw8fyWLVkKa/cNcQmjYOgTLZUgOLi2F05g4TR0RfgZ4PBdntxdV3qvdxQt8DeaMMgjJMgwUxYN3tUNpUNx21AvwADDAIa0+raTWaoBXmShAl5AThpMi282o+WzOKMlxjHj7a+DI6AM6VI9w+xyh3Eyg/1XvPmbqjeg2MGXugHt8wW03DQMRTd5iqqOhjLvyOCcKtViGwAHVLyl86KqvxVX7MxSW8HLq6KCrLpB8SspAOHO9IuOwCh9poLoMEha9CHCxlRAXJNDobducWjqhFHqCkzjTM2V9CHslwq4iU19IxqhIFZMve15lDTiMVZIPdADXGxTqzSTv0dDWyk1ht430yvaYCy9qY0MQ3cC5c1uw4mHcTGkMHTAGC99TkNXFAiLQgw9ZWhwKJjGCe+J5FIaMpYhhyUnEgfrF3zEtzn40DdgCIJUJfZ0mo3eXsDwneJ8AYCr7Vx2eHFnt2H6ZEyAHs9JoQ4Lzh5zBoGOGwAz37NOPuqSNmZf51hBEovtpm2T1wI79OBWDyvCFYkONqAKGVYgIL0F+uxTcMLSPtFbiNDbBPFgip8MGDmLLHbSyGXdCMO6f7teiW9EEmorZ+75KzanZwvUySgjoUQBTfHlOIerJs6Y9wLlgDw18AB1ne0tZRNgGjcrqHbtubSUooEpy4hWpDzTSrmvqw0H9AoXQLolMt9eOM+l9RitBB1OBnrdC1XL4yLFyXqZSgZhv7FnnDEXLUeffb4nVDqYTLY6X7gHVaK4ZZlepja2Oe6OhLDI/Ve5SQTCmJdH3HJeb14cw99XsBQAlDy5s5kil2sGezZA3tFok2IsNja7QuFgM30Hff3NGSsSVFYZLOcTBOvlPx8vLhjJrSI7xrNMA/BOzpBIJrdR1+v+zw4RZ7ry6aq4/tFfvPQxQCPDsXlcRvIZYl+E5g3kJ+zLMZon0yElBvEOQTh6SaAdIO6BwdqJqfvgU+e8Y65FQhdiHkZMVt9/39N2jGd26J6cNjq8cQIyp6RonRPgVn2fl89uRDcQ27GacaN0MPrcNyRlbUWelKfDfyrNVVGBG5sjd3jXzTx06ywyzuWn5jbvEfPPCTbpClkgEu9oPLKICxU5HuDe3jA1XnvU85IYYhaEtOU1YVWYhEFsa4/TQj3rHdsU2da2eVbF8YjSI0m619/8bLMZu3xildwqM7zf1cjn4Whx0PSYXcY5bR7wEQfGC7CTOXwZdmsdTO8q3uGm7Rh/RfCWwpzBHCAaVfjxgibL5vUeL0pH6bzDmI9yCXKC/okkmbc28OJvI87L/bjFzpq0DHepw4kT1Od+fL7cyuFaRgfaUWB2++TCFvz11J0leEtrGkpccfX9z2LY39sph4PBHCjNOOkd0ybUm+ZzS8GkFbqMpq8uiX2yHpa0jllTLfGTDBMYR6FT5FWLLDPMkYxt1Q0eyMvxJWztDjy0m6VvZPvamrFXjHmPpU6WxrZqH6WW//I37RwvqPQhPz8I3RPuXAk1C94ZprQWm9iGM/KgiGDO6SV9sjp+Jmk4TBajMNJ5zzWZ1k1jrteQQBp9C2dOvmbIeeEME8y573Q8TgGe+ZCzutM45gYLBzYm2LNvgq2kebAbMpHRDSyh6dQ27GbsAAdCqQVVXWC1C+zpwBM2Lr4eqtobmmu1vJEDlIQR1iN8CUWpztq50z7FFQBn3SKViX6wSqzVQCoYvAjByjeSa+h1PRnYWvBinTDB9cHt4eqDsPS4jcD3FwXJKT0RQsl8EvslI2SFaz2OtmYLFV8FwgvWroZ3fKmh7btewX9tfL2upXsrsqpLJzpzNGyNlnuZyetg7DIOxQTMBR7dqlrTlZ6FWi1g4j1NSjA2j1Yd7fzTH6k9LxCyUCneAKYCU581bnvKih6KJTeTeCX4Zhme/QIz7w2o+AdSgtLAkdrLS9nfweYEqrMLsrGGSWXtgWamAWp6+x6GM/Z8jNw3BqPNQ39hrzYLECn3tPvh/LqKbRSCiDGauDKBBj/kGbpnM1Bb/my8hv4NWStclkwjfl57y4oNDgw1JAG9VOti3QVVoSziMEsSdfEjaCPIDb7SgpLXykQsM+nbqbt97I0mIlzWv0uqFobLMAq8Rd9pszUBKxFhBPwOjf//gVOz2r7URJ2OnpviCXv9iz3a4X/YLBYbXoYwxBv/Kq0a5s4utQHzoTerJ7PmFW/no/ZAsid/hRIV82tD+Qabh5F1ssIM8Ri3chu0PuPD3sSJRMjDoxLAbwUbroiPAz/V52e8s3DIixxlO7OrvhMj3qfzA0kKxzwicr5wJmZwJxTXgrwYsqhRvpgC2Nfdyd+TYYxJSZgk+gk2g9KyHSlwQVAyPtWWgvVGyVBqsU2LpDlLNosSAtolC1uBKt5pQZLhAxTjeGCWIC/HVpagc5rRwkgpCHKEsjA8d+scp8aiMewwQBhp5dYTV5t/Nvl+HbDMu8F3S0psPyZb1bSnqlHPFUnMQeQqSqwDBT23fJO9gO3aVaa1icrXU0PKwlMM5K+iL3ATcVq2fFWKk0irCTF4LDVDG4gUpkyplq6efcZS+WDR1woApjD18x+2JQR9oOXzuA7uy4b+/91WsJd/tSd1QcAH8PVPXApieA37B7YXPhDPH1azP3PKR+HfHmOoDYLeuKsIi/ssSsdYs62qJo14Hw1P2N/6zpr8F3FTWmJ4ysAVcl84Iv/tl///Z8FaAWbBQbyMNDZjrZ2JwdRjtd1jOeNumSodFtr4/Zf45iRJf/8HSW+KIB/+GlKu8Rv1BPLr/4duoL+kFPRqrstEr41gfJupoJRf4hcYDWX93FOcfEBiIivxtjtV8g7mvOReiamYWKE7vfPbv3v2L9Kwq3cIDFGLyhyfOGuf/9vA5muH6Pjg7B4SUj2ydDXra9fSBI+DrsNHA6l51wfHssJb+11TfNk7B8OleUe3Y+ZmHboMFHdv7FFP2cfISFyeAQR0sk/Xv62HBTdW4HmnGSLFk/cqyWVVFJkdIIa+4hos3JRHcqLoRKM5h2Qtk1RZtzISMtlXTfTqIc77YsCCgQD0r61jtxskCctwJOtjE/pL8wC4LBD4AZFjh2wzzFCrT/PNqW0/DeBbkfMfzVm9yy06WiF+1mTdNNEAytVtohBKg3brWd2VQa+aF+cQ0mW5CvbwOlWCT07liX226PjiVLwFCRs/Ax2/u+ZNPjrNFIWIPf5GjHyUKp60OeXe9F01f7IaPf/SDTvyDAf7LSWWejtiZcsqtWZjrdn6A2MqBwnSeKhrZOlUMmgMionmiCIvXqKZfmhGZ1MwD3uMF4n9KJcfWLA3cL5pq48tm5NDYNh3SS/TKUtmFSlQR89MR4+kxcqJgpGbhm9gXneDELkyqAN5nitmIzTscKeJRXqd64RiaOALR2d295NWwbjHRNG2AU5oR9OS2oJg/5CY6BFPc1JvD2Mxdhp2/MZdI8dLePxiP4KRIp8VXmqfg+jqd/RNG7GNuq1U2SiI4735Bdc0MVFx6mH5UOWEa5HuhYykd6t4M1gYLVS8m1B+9bUqi5DziQq7qT8d94cxB6AB4WqMCOF/zPPtRSZUUaMSsvHOWxGASufywTX8ogy6HgUf9p+Z30wUEosl8qgmwm6o2AV6nO9HKQjRHpN6SUegI5pvR61RLnUJ1lqCtmfcsRQutEizVpAaPXN7xMp5UQ5OSZK6tniCK9CpyMd7LjR6+MxfoMEDPpWdf2p2m5N3KO4QMxf+V7vGdYjemQczQ+m2MGIkFNYDMf0Yop2eSx81sP36WHUczqEhKysp2iJSYAvfgJjinKwToPvRKb+HBi+7cJ96S5ngfLOXaHAFRLkulo4TnXTFO51gX0TCCo4ZUHdbpdgkMEwUZAPjh6M+hA8DzycbtxAgH3uD6i0nN1aTiIuQ4BYCE9dEHHwAmINU+4YEWx4EC3OZwFGfYZMPLScVlb+BAAJeARUh+gdWA3/gRqCrf1jecgqeFf1MdzrrP4SVlGm5mMihSP+zYYksAB7O+SBPwNQqSNMiLnkviY/klwgcRmvqtCqeWeA0gjuir4CMZqmw/ntP6M+l0pdN8/P9xI53aP7x/zavJbbKOz8VzO/nXxIr1tjparMnqd6iWdByHKw4lF4p/u57Yv07WeZPDnRl7wgmDVZZ44fQsjdYO/gmXQ+940PRGst8UMQApFC4OOV22e4N+lVOPyFLAOj4t8R3PFw/FjbSWy0ELuAFReNkee8ORcBOT2NPDcs7OfpUmzvn/F9Czk9o9naMyVYy/j8I5qVFmQDFcptBp65J/+sJA3w/j6y/eqUkKxTsf0CZjtNdRSBEmJ2tmfgmJbqpcsSagk+Ul9qdyV+NnqFBIJZFCB1XwPvWGDBOjVUmpWGHsWA5uDuMgLUNKZ4vlq5qfzY1LnRhCc/mh5/EX+hzuGdDy5aYYx4BAdwTTeZHcZpl3X0YyuxZFWNE6wFNppYs3LcFJePOyfKZ8KYb7dmRyvDOcORLPH0sytC6mH1US3JVj6paYM1GEr+CUmyHRnabHPqLlh6Kl0/BWd3ebziDfvpRQpPoR7N+LkUeYWtQ6Rn5v5+NtNeBPs2+DKDlzEVR5aYbTVPrZekJsZ9UC9qtVcP99thVIt1GREnN8zXP8mBfzS+wKYym8fcW6KqrE702Zco+hFQAEIR7qimo7dd7wO8B7R+QZPTuCWm1UAwblDTyURSbd85P4Pz+wBpQyGPeEpsEvxxIZkKsyfSOUcfE3UqzMFwZKYijb7sOkzpou+tC4bPXey5GI1GUAg9c3vLwIwAhcdPHRsYvpAfzkZHWY20vWxxJO0lvKfj6sG2g/pJ1vd/X2EBZkyEjLN4nUZOpOO7MewyHCrxQK8d5aF7rCeQlFX+XksK6l6z971BPuJqwdjj68ULOj9ZTDdOLopMdOLL0PFSS792SXE/EC9EDnIXZGYhr52aQb+9b2zEdBSnpkxAdBUkwJDqGCpZk/HkRidjdp0zKv/Cm52EenmfeKX6HkLUJgMbTTxxIZkIeL/6xuAaAAHbA7mONVduTHNX/UJj1nJEaI7f3HlUyiqKn7VfBE+bdb4HWln1HPJx001Ulq1tOxFf8WZEARvq5Da1+pE7fPVxLntGACz3nkoLsKcPdUqdCwwiyWkmXTd5+bv3j7HaReRt3ESn783Ew3SWsvkEjKtbocNksbrLmV+GVZn1+Uneo35MT1/4r8fngQX5/ptORfgmWfF6KSB/ssJmUSijXxQqUpzkANEkSkYgYj560OOjJr6uqckFuO15TRNgABEwNDjus1V3q2huLPYERMCLXUNmJJpbMrUQsSO7Qnxta55TvPWL6gWmMOvFknqETzqzFVO8SVkovEdYatypLGmDy9VWfgAc0KyIChiOhbd7UlbAeVLPZyEDp4POXKBwN/KP5pT6Cyqs6yaI00vXMn1ubk9OWT9Q/O2t/C25qlnO/zO0xcBzpMBCAB8vsdsh3U8fnPX1XlPEWfaYJxKVaTUgfCESWl4CCkIyjE6iQ5JFcwU6S4/IH0/Agacp8d5Gzq2+GzPnJ7+sqk40mfFQpKrDbAKwLlr3ONEati2k/ycLMSUu7V/7BBkDlNyXoN9tvqXCbbMc4SSQXgC/DBUY9QjtrCtQ+susEomCq8xcNJNNMWCH31GtlTw2BdCXkJBjT+/QNWlBWwQ5SWCh1LdQ99QVii/DyTxjSR6rmdap3l3L3aiplQpPYlrzNm9er88fXd2+ao+YdUNjtqmxiVxmyYPzJxl67OokDcTezEGqldkGgPbRdXA+fGcuZVkembZByo7J1dMnkGNjwwCny+FNcVcWvWYL9mg8oF7jACVWI3bA64EXpdM8bSIEVIAs5JJH+LHXgnCsgcMGPZyAAVBncvbLiexzg9YozcytjPXVlAbQAC7Tc4S0C8QN4LlAGjj4pQAVWrwkaDoUYGxxvkCWKRRHkdzJB5zpREleBDL1oDKEvAqmkDibVC4kTqF89YO6laUjgtJPebBfzr16tg4t10GmN1sJ5vezk2sUOq8blCn5mPZyT3ltaDcddKupQjqusNM9wtFVD0ABzv17fZDn7GPT1nkCtdcgYejcK1qOcTGtPxnCX1rErEjVWCnEJv5HaOAUjgpiKQjUKkQi64D5g2COgwas8FcgIl0Pw95H9dWxE3QG0VbMNffh6BPlAojLDf4es2/5Xfq7hw5NGcON2g8Qsy2UQm94KddKyy3kdJxWgpNaEc15xcylbLC3vnT26u8qS90qc2MU8LdOJc5VPF5KnSpXIhnj1eJJ/jszjZ01oR6JDFJRoeTPO/wh4IPFbdG9KljuSzeuI92p8JF/bpgDE8wG86/W2EBKgPrmzdLijxssQn8mM44ky/KLGOJcrSwXIpZa/Z3v7W6HCRk7ewds99LTsUW1LbeJytw8Q/BFZVZyfO9BUHOCe2suuEkO8DU4fLX0IQSQ2TdOkKXDtPf3sNV9tYhYFueuPRhfQlEEy+aYM/MCz7diDNmFSswYYlZZPmKr2Q5AxLsSVEqqBtn6hVl1BCFOFExnqnIsmyY/NA8jXnDaNzr7Zv3hu+I1Mf/PJjk0gALN2G8ABzdf9FNvWHvZHhv6xIoDCXf964MxG92vGZtx/LYU5PeZqgly8tT5tGeQGeJzMMsJc5p+a5Rn2PtEhiRzo/5Owjy1n0Lzx3ev8GHQmeWb8vagG6O5Qk5nrZuQTiKODI4UqL0LLAusS2Ve7j1Ivdxquu1BR9Rc4QkOiUPwQXJv6du2E8i5pDhVoQpUhyMWGUT2O2YODIhjAfI71gxep5r5zAY7GBUZpy51hAw0pcCCrhOmU8Wp6ujQTdZQsCjtq6SHX8QAMNiPCIIkoxhHEZPgsBcOlP4aErJZPhF7qvx6gHrn8hEwPwYbx8YmT/n7lbcmTip1v8kgsrIjFTAlvLY4Nuil0KDmgz3svYs0ZJ3O3Is/vSx4xpxF1e2VAtZE8dJxGYEIhCSuPvCjP54l/NSNDnwlKvAW8mG+AQkgp7a87Igh26uKMFGD0PoPHTSvoWxiHuk+su8XkQiHIjeYKl/RdcOHpxhQH3zHCNE3aARm83Bl6zGxU/vMltlVPQhubcqhW4RYkl6uXk5JdP/QpzaKFpw2M8zvysv2qj7xaQECuu2akM0Cssj/uB9+wDR7uA6XOnLNaoczalHoMj33eiiu+DRaFsUmlmUZuh9bjDY4INMNSSAivSh03uJvny4Gj+D+neudoa7iJi7c4VFlZ/J5gUR82308zSNAt/ZroBXDWw0fV3eVPAn3aX0mtJabF6RsUZmL+Ehn+wn51/4QipMjD+6y64t7bjL6bjENan2prQ4h7++hBJ9NXvX8CUocJqMC937IasLzm5K0qwXeFMAimMHkEIQIQI2LrQ9sLBfXuyp66zWvlsh74GPv7Xpabj993pRNNDuFud5oIcn/92isbADXdpRPbjmbCNOrwRbxGZx2XmYNGMiV5kjF4IKyxCBvKier9U4uVoheCdmk83rp5G0PihAm2fAtczI4b9BWqX+nrZTrJX5kSwQddi93NQrXG+Cl3eBGNkM77VBsMpEolhXex1MVvMkZN9fG59GGbciH11FEXaY1MxrArovaSjE/lUUqBg2cZBNmiWbvzCHCPJ4RVGFK2dTbObM1m+gJyEX53fa7u3+TZpm74mNEzWbkVL4vjNwfL9uzRCu1cgbrNx5Yv5dDruNrIOgwIk+UZWwJfdbu/WHul6PMmRflVCIzd7B37Pgm/Up/NuCiQW7RXyafevN3AL6ycciCc4ZPlTRzEu+aURGlUBOJbUEsheX7PPyrrhdUt5JAG12EEEZpY/N3Vhbl5uLAfT0CbC2XmpnryFkxZmBTs5prvEeuf0bn73i3O82WTiQtJWEPLsBXnQmdnKhB06NbbhLtlTZYJMxDMJpFeajSNRDB2v61BMUHqXggUwRJ19m6p5zl51v11q34T74lTXdJURuV6+bg2D6qpfGnLy7KGLuLZngobM4pIouz4+n0/UzFKxDgLM4h+fUwKZozQ9UGrHjcif51Ruonz7oIVZ56xWtZS8z7u5zay6J2LD4gCYh2RXoBRLDKsUlZ80R8kmoxlJiL8aZCy2wCAonnucFxCLT1HKoMhbPKt34D97EXPPh0joO93iJVF1Uruew61Qoy3ZUVNX9uIJDt9AQWKLLo+mSzmTibyLHq0D6hhzpvgUgI6ekyVEL3FD+Fi5R3A8MRHPXspN1VyKkfRlC+OGiNgPC4NREZpFETgVmdXrQ2TxChuS3aY+Ndc7CiYv5+CmzfiqeZrWIQJW/C4RvjbGUoJFf1K6ZdR2xL/bG4kVq1+I4jQWX+26YUijpp+lpN7o5c6ZodXJCF56UkFGsqz44sIg8jrdWvbjRCxi2Bk0iyM3a7ecAV93zB6h1Ei38c0s6+8nrbkopArccGP8vntQe1bFeEh2nJIFOHX/k3/UHb5PtKGpnzbkmnRETMX+9X/QduLZWw/feklW/kH/JnzToJe9Kgu9Hct1UGbH5BPCLo4OOtQnZonW0xnyCcdtKyPQ/sbLiSTYJdSx4sJqWLMnfn6fIqPB3WAgk00J+fCOkomPHqtS67pf0mFmKoItYZUlJu6BihSZ8qve8+/X+LX1MhQXF95AshfUleCtmdn6l6QFXzLg2sgLn1oyVFuZecv7fzsIHzoRlAGp0gwYDOn1S4qabWvB5xUaE+Svw4KmjWtxdnuQbI32dw87D4N95u8qQRJTSQg0wLxOLkxSrPMLEn1UIhNKjAa9VLs3WLaXGrtCIt8bKY2AQP/ZdyRU6zT/E8qP2ltyBE2CCZPgWgEYDoJJO4n92y61ylNaSFXKohJhLjkfvYWm592539sIpmBNLlDo1bExFBfmHJJ0lFEiC/fj8v42OoMC9Mo3whIoWvyHfq6Uacqq55mzFf/EGC+NP/gHjhd6urc6R0hES27VXux7UY8CGKPohplWIZtTrFSaPWslCWy78E22Pw8fvReSUZx/txqLtHrFqg1DY/Eus6Iq1heZdrdcqE0/c971Bz1HW/XNXHsXpUIbI4kHdOfCc6T5zHZzvzQJB0ggMFL6IGPAilU9bj/ASdPk6fNvNtZqPuwEDhMBtBnhCexo6D6VAGIOPvJPPV523Y8R8a9vCqZbswSZKzOT1291BsUbmUWehtbb1fdRX9hiJKXvwr1QX6GjnZMgyMvnwOo2Dr24amr7FqEAbVeJAjRNOceM2EQ1Mna9fInqPJ5mh5X8CzT1aDOv08An0blz0fF5Gq4mS2cwq5glwIOlY5nznE8X4j/UdZ3FJsVIXte1JH0A7iibuPfazStM5O/Vo3KXIpXBeGORV0M9XDXFvsYZUHGvFCUubWzTw248EHE0cpQM2zNg6rjavreq3NHCAWsoZ7wvVy7l5gvtKRmIj1MnvfWEm0yFnGcuOq192350a5WefpfKCcX3Sn+AgHU+qnpstNtddbdVebagJU390lq9ko4aI9rqdaWXYG8tv5O/ZQHSqDRYHC6zfH10l5z++opso7aOSaIczlQ13iAzXvLdEu0V7kwNUZ1c8Y8aq7SeIEe5p902FlNkW8DnwHyueHchbK8vVFJfmr9mz7P8nUSccl1ULaoWMRSI1ls32kvlK0h46h3J25Yd9AzfcJbp9qYF/SEt3H5j69mMdcsNxZcAzT/A89ov3tglTX54y/EwjMfuoDoxPwLJDm5I7q6F9Kp469yNy1zSxz0N4HbRRBj9xFFuogvBspv7DXUNIsGxTINEQfmctb42XImWAODgARNo7dfcTqFKq6aTfivmvunLmzP9f8yLsJvXD3JbcPcDGNriMAcjzeDTNr65t8YB5tsnFDFLa0Uwmd2OvUdkLMX9TsAUYUfooSv47sw5J88j7CpahRjjO3/UhOXjTS39W5YZAel2KTbQd1h7INOw9P23GW7GDAe4agIUFHP48MZr7ubq0efFmmtwYMyk7D0r1oeG/CGOODgb9Ur+JMHxkwzPbtCX2ZnENQuI0RN5SyTIZuoY4XS9Rd/tPe3vNAZGSHM/YYwqs9xkkENx0O+eC2YVW1cwOJ3ckE890nbQeHLKlW15L0P0W2VliyYrfNr0nrIYddoRyGaCtj4OYd2MT7ebApqZOAQIaSHJM4mphhfjNjtnjg6YRyx9qM2FT3xOiYIMqXPFWdzhSgFF8ItocqVV09CmIoO8k6U/oJB7++wSX/YksxfPXHyjSgAGZOj1aKEq9fSvXBqtp2wu8/FxEf5AxapAD06pPGuLVUYLdgEzHR8wqRGYEwiUO9MyYbgswstuLYhwYFpSVKOdzAihZ9LuHtD598EGhINU9xc9xhL+QgTLAstmPIvvm2xyRw/WTUPXkP3ZHu6GyPmj5xFH9/QGpkglKXRVUBgVmLOJx8uZO2AstxQYocZH2JhORlxawj66BAXUEs7K/gPxINIRAFyK3WLuyq9oBTF9wEbnmCot82WjIg7CPNwYK3KrZMrKAz5yFszg4wCVLJVnIL8+OYA0xRDH8cHQjQUiQ2i1mr/be32k/3Xej9sdf3iuGvZHyLFSJvPSqz/wltnxumTJYKZsrWXtx/Rmu39jjV9lFaJttfFn57/No2h/unsJmMHbrnZ8csxkp5HQ4xR1s0HH+t3Iz82a3iQWTUDGq/+l2W3TUYLE8zNdL8Y+5oXaIH/Y2UUcX67cXeN4WvENZjz4+8q7vjhowOI3rSjFhGZ6KzwmU7+5nFV+kGWAZ5z2UWvzq0TK0pk1hPwAN4jbw//1CApRvIaIjhSGhioY6TUmsToek9cF9XjJdHvLPcyyCV3lbR5Jiz/ts46ay2F820VjTXvllElwrGzKcNSyvQlWDXdwrUINXmHorAM3fE19ngLZmgeUaCJLsSITf2VcfAOuWwX7mTPdP8Zb/04KqRniufCpwnDUk7sP0RX6cud/sanFMagnzKInSRVey0YzlVSOtA/AjrofmSH6RYbJQ8b4NDeTkIGc6247+Mnbez/qhJ9GAv9fGNFercPnnrf285Qgs+UqThLRgflcAKFuqWhLzZaR4QqvSwa3xe0LPkqj9xJWub195r7NrrR0e78FR+0mRBNMPsraqZctAUVAJfYKehTDV1MGGQSeDsOK9J3sbUuKRIS/WilX/64CBms9jCZocBlsBSZaIAjWm/SUZ8daWL2a/cJFyUOFqE3Epc2RWbtjNyPwOGpWtzu32kUooUqsJud7IV4E8rstUBXM7tGEtBx99x60g1duhyvxeKJSl8s5E34HTMmADT0836aEdg5Dv9rVyCz8i2REOmiz6wtIVFN0HsjAoN37SrY0bV1Ms8CRUILhvZvvRaDzoVCaSI0u8EPuTe4b7OPowgRGODl22UBBmHSTUY8e4DyL+Bc7bngo+2T8HtNvzyATSL5iJZgFPKpmUyZv54vVL90+/RQGATUmNKnrIvcJMYON9fl83naW5sf6hRkbbTC9RUEE6XADwjgA46wWfUQ+QWZl0J4PVTWAln/YfAz/SV3q3J9+yCYDleruoN5uoc/wT2f4YONGTb6zTGq3V+3JqzmCOjwebKln+fExVLN7sqtqfMnsKVXWbb2Ai5m3D/fCTgX7oKYzTZvj+m28XnDqPbXuP4MyWdmPezcesdrh7rCzA7BWdObiuyDEKjjzBbQ0qnuwjliz+b+j7aPMKlkXyIznV3tGzAfYwIbzGGt098oh4eq3ruDjdgHtjxfFCjHrjjRbHajoz/YOY4raojPFQ910GIlBV7hq47UDgpyajBxQUmD8NctiLV1rTSLAEsQDLTeRKcmPBMVMFF0SPBBhZ5oXoxtD3lMhuAQXmA+57OcciczVW9e9zwSIAHS+FJmvfXMJGF1dMBsIUMaPjvgaVqUc3p32qVCMQYFEiRLzlVSOGMCmv/HJIxAHe3mL/XnoZ1IkWLeRZfgyByjnDbbeRK5KL7bYHSVJZ9UFq+yCiNKeRUaYjgbC3hVUvfJAhy/QNl/JqLKVvGMk9ZcfyGidNeo/VTxK9vUpodzfQI9Z2eAre4nmrkzgxKSnT5IJ1D69oHuUS5hp7pK9IAWuNrAOtOH0mAuwCrY8mXAtVXUeaNK3OXr6PRvmWg4VQqFSy+a1GZfFYgdsJELG8N0kvqmzvwZ02Plf5fH9QTy6br0oY/IDsEA+GBf9pEVWCIuBCjsup3LDSDqI+5+0IKSUFr7A96A2f0FbcU9fqljdqvsd8sG55KcKloHIFZem2Wb6pCLXybnVSB0sjCXzdS8IKvE");const VR=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),KR=4;function F1e(t){return t.toString(16).toUpperCase().padStart(2,"0")}function Pj(t){return`{${F1e(t)}}`}function $1e(t){let e=[];for(let r=0,n=t.length;r>24&255}function Cj(t){return t&16777215}const U1e=new Map(Sj(GM).flatMap((t,e)=>t.map(r=>[r,e+1<<24]))),z1e=new Set(w0(GM)),Ij=new Map,C7=new Map;for(let[t,e]of Mj(GM)){if(!z1e.has(t)&&e.length==2){let[r,n]=e,i=C7.get(r);i||(i=new Map,C7.set(r,i)),i.set(n,t)}Ij.set(t,e.reverse())}const Sg=44032,y6=4352,v6=4449,w6=4519,Tj=19,Rj=21,Ap=28,x6=Rj*Ap,j1e=Tj*x6,H1e=Sg+j1e,q1e=y6+Tj,G1e=v6+Rj,V1e=w6+Ap;function kj(t){return t>=Sg&&t=y6&&t=v6&&ew6&&e0&&i(w6+p)}else{let s=Ij.get(o);s?r.push(...s):i(o)}if(!r.length)break;o=r.pop()}if(n&&e.length>1){let o=bm(e[0]);for(let s=1;s0&&i>=s)s==0?(e.push(n,...r),r.length=0,n=f):r.push(f),i=s;else{let d=K1e(n,f);d>=0?n=d:i==0&&s==0?(e.push(n),n=f):(r.push(f),i=s)}}return n>=0&&e.push(n,...r),e}function Oj(t){return Bj(t).map(Cj)}function J1e(t){return W1e(Bj(t))}const I7=65039,Nj=".",Lj=1,WR=45;function h1(){return new Set(w0(lo))}const Z1e=new Map(Mj(lo)),Y1e=h1(),E6=h1(),JR=new Set(w0(lo).map(function(t){return this[t]},[...E6])),Q1e=h1();h1();const X1e=Sj(lo);function ZR(){return new Set([w0(lo).map(t=>X1e[t]),w0(lo)].flat(2))}const eme=lo(),Mg=Eg(t=>{let e=Eg(lo).map(r=>r+96);if(e.length){let r=t>=eme;e[0]-=32,e=Ag(e),r&&(e=`Restricted[${e}]`);let n=ZR(),i=ZR(),o=[...n,...i].sort((f,d)=>f-d),s=!lo();return{N:e,P:n,M:s,R:r,V:new Set(o)}}}),YR=h1(),_g=new Map;[...YR,...h1()].sort((t,e)=>t-e).map((t,e,r)=>{let n=lo(),i=r[e]=n?r[e-n]:{V:[],M:new Map};i.V.push(t),YR.has(t)||_g.set(t,i)});for(let{V:t,M:e}of new Set(_g.values())){let r=[];for(let i of t){let o=Mg.filter(f=>f.V.has(i)),s=r.find(({G:f})=>o.some(d=>f.has(d)));s||(s={G:new Set,V:[]},r.push(s)),s.V.push(i),o.forEach(f=>s.G.add(f))}let n=r.flatMap(({G:i})=>[...i]);for(let{G:i,V:o}of r){let s=new Set(n.filter(f=>!i.has(f)));for(let f of o)e.set(f,s)}}let Pg=new Set,Dj=new Set;for(let t of Mg)for(let e of t.V)(Pg.has(e)?Dj:Pg).add(e);for(let t of Pg)!_g.has(t)&&!Dj.has(t)&&_g.set(t,Lj);const tme=new Set([...Pg,...Oj(Pg)]),rme=w0(lo),nme=Fj([]);function Fj(t){let e=Eg(()=>{let f=w0(lo).map(d=>rme[d]);if(f.length)return Fj(f)}).sort((f,d)=>d.Q.size-f.Q.size),r=lo(),n=r%3;r=r/3|0;let i=r&1;r>>=1;let o=r&1,s=r&2;return{B:e,V:n,F:i,S:o,C:s,Q:new Set(t)}}class ime extends Array{get is_emoji(){return!0}}function Zw(t,e=Pj){let r=[];ame(t[0])&&r.push("◌");let n=0,i=t.length;for(let o=0;o=4&&t[2]==WR&&t[3]==WR)throw new Error("invalid label extension")}function QR(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function sme(t){let e=t[0],r=VR.get(e);if(r)throw Fm(`leading ${r}`);let n=t.length,i=-1;for(let o=1;o{let i=$1e(n),o={input:i,offset:r};r+=i.length+1;let s;try{let f=o.tokens=pme(i,J1e),d=f.length,p;if(d){let b=f[0],v=d>1||b.is_emoji;if(!v&&b.every(A=>A<128))s=b,QR(s),ome(s),p="ASCII";else if(v&&(o.emoji=!0,b=f.flatMap(A=>A.is_emoji?[]:A)),s=f.flatMap(A=>!e&&A.is_emoji?mme(A):A),QR(s),!b.length)p="Emoji";else{if(E6.has(s[0]))throw Fm("leading combining mark");for(let S=1;Ss.has(f)):[...s],!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(o=>i.V.has(o)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function lme(t){let e=Mg;for(let r of t){let n=e.filter(i=>i.V.has(r));if(!n.length)throw e===Mg?Uj(r):zj(e[0],r);if(e=n,n.length==1)break}return e}function dme(t){return t.map(({input:e,error:r,output:n})=>{if(r){let i=r.message;throw new Error(t.length==1?i:`Invalid label ${KM(Zw(e))}: ${i}`)}return Ag(n)}).join(Nj)}function Uj(t){return new Error(`disallowed character: ${VM(t)}`)}function zj(t,e){let r=VM(e),n=Mg.find(i=>i.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function Fm(t){return new Error(`illegal placement: ${t}`)}function hme(t,e){let{V:r,M:n}=t;for(let i of e)if(!r.has(i))throw zj(t,i);if(n){let i=Oj(e);for(let o=1,s=i.length;oKR)throw new Error(`non-spacing marks: too many ${KM(Zw(i.slice(o-1,f)))} (${f-o}/${KR})`);o=f}}}function pme(t,e){let r=[],n=[];for(t=t.slice().reverse();t.length;){let i=gme(t);if(i)n.length&&(r.push(e(n)),n=[]),r.push(i);else{let o=t.pop();if(tme.has(o))n.push(o);else{let s=Z1e.get(o);if(s)n.push(...s);else if(!Y1e.has(o))throw Uj(o)}}}return n.length&&r.push(e(n)),r}function mme(t){return t.filter(e=>e!=I7)}function gme(t,e){let r=nme,n,i,o=[],s=t.length;for(e&&(e.length=0);s;){let f=t[--s];if(r=r.B.find(d=>d.Q.has(f)),!r)break;if(r.S)i=f;else if(r.C&&f===i)break;o.push(f),r.F&&(o.push(I7),s>0&&t[s-1]==I7&&s--),r.V&&(n=bme(o,r),e&&e.push(...t.slice(s).reverse()),t.length=s)}return n}function bme(t,e){let r=ime.from(t);return e.V==2&&r.splice(1,1),r}const jj=new Uint8Array(32);jj.fill(0);function XR(t){return _e(t.length!==0,"invalid ENS name; empty component","comp",t),t}function Hj(t){const e=Bf(yme(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}function V8(t,e){return{address:Zt(t),storageKeys:e.map((r,n)=>(_e(Tr(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function Il(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(_e(r.length===2,"invalid slot set",`value[${n}]`,r),V8(r[0],r[1])):(_e(r!=null&&typeof r=="object","invalid address-slot set","value",t),V8(r.address,r.storageKeys)));_e(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,o)=>(i[o]=!0,i),{});return V8(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function wme(t){let e;return typeof t=="string"?e=HM.computePublicKey(t,!1):e=t.publicKey,Zt(Ir("0x"+e.substring(4)).substring(26))}function xme(t,e){return wme(HM.recoverPublicKey(t,e))}const Pi=BigInt(0),Eme=BigInt(2),Ame=BigInt(27),Sme=BigInt(28),Mme=BigInt(35),_me=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function WM(t){return t==="0x"?null:Zt(t)}function qj(t,e){try{return Il(t)}catch(r){_e(!1,r.message,e,t)}}function Yw(t,e){return t==="0x"?0:Tt(t,e)}function oi(t,e){if(t==="0x")return Pi;const r=pt(t,e);return _e(r<=_me,"value exceeds uint size",e,r),r}function Mn(t,e){const r=pt(t,"value"),n=oo(r);return _e(n.length<=32,"value too large",`tx.${e}`,r),n}function Gj(t){return Il(t).map(e=>[e.address,e.storageKeys])}function Pme(t){const e=qS(t);_e(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const r={type:0,nonce:Yw(e[0],"nonce"),gasPrice:oi(e[1],"gasPrice"),gasLimit:oi(e[2],"gasLimit"),to:WM(e[3]),value:oi(e[4],"value"),data:dt(e[5]),chainId:Pi};if(e.length===6)return r;const n=oi(e[6],"v"),i=oi(e[7],"r"),o=oi(e[8],"s");if(i===Pi&&o===Pi)r.chainId=n;else{let s=(n-Mme)/Eme;s=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),Ge(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),Ge(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):r?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(i.push(0),i.push(1),i.push(2)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}clone(){return Cc.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Cc;if(typeof e=="string"){const n=qt(e);if(n[0]>=127)return Cc.from(Pme(n));switch(n[0]){case 1:return Cc.from(Ime(n));case 2:return Cc.from(Cme(n))}Ge(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Cc;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=Jf.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.hash!=null&&(_e(r.isSigned(),"unsigned transaction cannot define hash","tx",e),_e(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(_e(r.isSigned(),"unsigned transaction cannot define from","tx",e),_e(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};pf=new WeakMap,yh=new WeakMap,vh=new WeakMap,wh=new WeakMap,xh=new WeakMap,Eh=new WeakMap,Ah=new WeakMap,Sh=new WeakMap,Mh=new WeakMap,_h=new WeakMap,Ph=new WeakMap,Ch=new WeakMap;let A6=Cc;const Kj=new Uint8Array(32);Kj.fill(0);const Tme=BigInt(-1),Wj=BigInt(0),Jj=BigInt(1),Rme=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function kme(t){const e=qt(t),r=e.length%32;return r?en([e,Kj.slice(r)]):dt(e)}const Bme=y0(Jj,32),Ome=y0(Wj,32),nk={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},K8=["name","version","chainId","verifyingContract","salt"];function ik(t){return function(e){return _e(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const Nme={name:ik("name"),version:ik("version"),chainId:function(t){const e=pt(t,"domain.chainId");return _e(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):Pd(e)},verifyingContract:function(t){try{return Zt(t).toLowerCase()}catch{}_e(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=qt(t,"domain.salt");return _e(e.length===32,'invalid domain value "salt"',"domain.salt",t),dt(e)}};function W8(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");_e(n%8===0&&n!==0&&n<=256&&(e[2]==null||e[2]===String(n)),"invalid numeric width","type",t);const i=au(Rme,r?n-1:n),o=r?(i+Jj)*Tme:Wj;return function(s){const f=pt(s,"value");return _e(f>=o&&f<=i,`value out-of-bounds for ${t}`,"value",f),y0(r?YF(f,256):f,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return _e(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const i=qt(n);return _e(i.length===r,`invalid length for ${t}`,"value",n),kme(n)}}}switch(t){case"address":return function(e){return rl(Zt(e),32)};case"bool":return function(e){return e?Bme:Ome};case"bytes":return function(e){return Ir(e)};case"string":return function(e){return fl(e)}}return null}function ok(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}var Yg,mf,Ih,l5,Zj,Si;let sk=(Si=class{constructor(e){Ne(this,l5);Oe(this,"primaryType");Ne(this,Yg,void 0);Ne(this,mf,void 0);Ne(this,Ih,void 0);ce(this,Yg,JSON.stringify(e)),ce(this,mf,new Map),ce(this,Ih,new Map);const r=new Map,n=new Map,i=new Map;Object.keys(e).forEach(f=>{r.set(f,new Set),n.set(f,[]),i.set(f,new Set)});for(const f in e){const d=new Set;for(const p of e[f]){_e(!d.has(p.name),`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(f)}`,"types",e),d.add(p.name);const b=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;_e(b!==f,`circular type reference to ${JSON.stringify(b)}`,"types",e),!W8(b)&&(_e(n.has(b),`unknown type ${JSON.stringify(b)}`,"types",e),n.get(b).push(f),r.get(f).add(b))}}const o=Array.from(n.keys()).filter(f=>n.get(f).length===0);_e(o.length!==0,"missing primary type","types",e),_e(o.length===1,`ambiguous primary types or unused types: ${o.map(f=>JSON.stringify(f)).join(", ")}`,"types",e),xt(this,{primaryType:o[0]});function s(f,d){_e(!d.has(f),`circular type reference to ${JSON.stringify(f)}`,"types",e),d.add(f);for(const p of r.get(f))if(n.has(p)){s(p,d);for(const b of d)i.get(b).add(p)}d.delete(f)}s(this.primaryType,new Set);for(const[f,d]of i){const p=Array.from(d);p.sort(),X(this,mf).set(f,ok(f,e[f])+p.map(b=>ok(b,e[b])).join(""))}}get types(){return JSON.parse(X(this,Yg))}getEncoder(e){let r=X(this,Ih).get(e);return r||(r=Ke(this,l5,Zj).call(this,e),X(this,Ih).set(e,r)),r}encodeType(e){const r=X(this,mf).get(e);return _e(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Ir(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(W8(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i)return _e(!i[3]||parseInt(i[3])===r.length,`array length mismatch; expected length ${parseInt(i[3])}`,"value",r),r.map(s=>this._visit(i[1],s,n));const o=this.types[e];if(o)return o.reduce((s,{name:f,type:d})=>(s[f]=this._visit(d,r[f],n),s),{});_e(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Si(e)}static getPrimaryType(e){return Si.from(e).primaryType}static hashStruct(e,r,n){return Si.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const i=nk[n];_e(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>K8.indexOf(n.name)-K8.indexOf(i.name)),Si.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return en(["0x1901",Si.hashDomain(e),Si.from(r).hash(n)])}static hash(e,r,n){return Ir(Si.encode(e,r,n))}static async resolveNames(e,r,n,i){e=Object.assign({},e);for(const f in e)e[f]==null&&delete e[f];const o={};e.verifyingContract&&!Tr(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=Si.from(r);s.visit(n,(f,d)=>(f==="address"&&!Tr(d,20)&&(o[d]="0x"),d));for(const f in o)o[f]=await i(f);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),n=s.visit(n,(f,d)=>f==="address"&&o[d]?o[d]:d),{domain:e,value:n}}static getPayload(e,r,n){Si.hashDomain(e);const i={},o=[];K8.forEach(d=>{const p=e[d];p!=null&&(i[d]=Nme[d](p),o.push({name:d,type:nk[d]}))});const s=Si.from(r),f=Object.assign({},r);return _e(f.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),f.EIP712Domain=o,s.encode(n),{types:f,domain:i,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return dt(qt(p));if(d.match(/^u?int/))return pt(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return _e(typeof p=="string","invalid string","value",p),p}_e(!1,"unsupported type","type",d)})}}},Yg=new WeakMap,mf=new WeakMap,Ih=new WeakMap,l5=new WeakSet,Zj=function(e){{const i=W8(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],o=this.getEncoder(i);return s=>{_e(!r[3]||parseInt(r[3])===s.length,`array length mismatch; expected length ${parseInt(r[3])}`,"value",s);let f=s.map(o);return X(this,mf).has(i)&&(f=f.map(Ir)),Ir(en(f))}}const n=this.types[e];if(n){const i=fl(X(this,mf).get(e));return o=>{const s=n.map(({name:f,type:d})=>{const p=this.getEncoder(d)(o[f]);return X(this,mf).has(d)?Ir(p):p});return s.unshift(i),en(s)}}_e(!1,`unknown type: ${e}`,"type",e)},Si);function ai(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const Lme="external public payable",Dme=ai(Lme.split(" ")),Yj="constant external internal payable private public pure view",Fme=ai(Yj.split(" ")),Qj="constructor error event fallback function receive struct",Xj=ai(Qj.split(" ")),eH="calldata memory storage payable indexed",$me=ai(eH.split(" ")),Ume="tuple returns",zme=[Qj,eH,Ume,Yj].join(" "),jme=ai(zme.split(" ")),Hme={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},qme=new RegExp("^(\\s*)"),Gme=new RegExp("^([0-9]+)"),Vme=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),tH=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),rH=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var An,Ms,Qg,R7;const d5=class d5{constructor(e){Ne(this,Qg);Ne(this,An,void 0);Ne(this,Ms,void 0);ce(this,An,0),ce(this,Ms,e.slice())}get offset(){return X(this,An)}get length(){return X(this,Ms).length-X(this,An)}clone(){return new d5(X(this,Ms))}reset(){ce(this,An,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=Ke(this,Qg,R7).call(this,X(this,An)+1,e.match+1);return ce(this,An,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;X(this,An)=X(this,Ms).length)throw new Error("out-of-bounds");return X(this,Ms)[X(this,An)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return C1(this,An)._++,e}toString(){const e=[];for(let r=X(this,An);r`}};An=new WeakMap,Ms=new WeakMap,Qg=new WeakSet,R7=function(e=0,r=0){return new d5(X(this,Ms).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let Ys=d5;function z0(t){const e=[],r=s=>{const f=o0&&e[e.length-1].type==="NUMBER"){const v=e.pop().text;b=v+b,e[e.length-1].value=Tt(v)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=b}continue}if(f=s.match(Vme),f){if(d.text=f[1],o+=d.text.length,jme.has(d.text)){d.type="KEYWORD";continue}if(d.text.match(rH)){d.type="TYPE";continue}d.type="ID";continue}if(f=s.match(Gme),f){d.text=f[1],d.type="NUMBER",o+=d.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(s[0])} at position ${o}`)}return new Ys(e.map(s=>Object.freeze(s)))}function ak(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function Qw(t,e){if(e.peekKeyword(Xj)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function Zf(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function nH(t){let e=Zf(t,Fme);return ak(e,ai("constant payable nonpayable".split(" "))),ak(e,ai("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function Nf(t,e){return t.popParams().map(r=>In.from(r,e))}function iH(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return pt(t.pop().text);throw new Error("invalid gas")}return null}function cl(t){if(t.length)throw new Error(`unexpected tokens: ${t.toString()}`)}const Kme=new RegExp(/^(.*)\[([0-9]*)\]$/);function fk(t){const e=t.match(rH);if(_e(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);_e(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);_e(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const Cr={},Fi=Symbol.for("_ethers_internal"),ck="_ParamTypeInternal",uk="_ErrorInternal",lk="_EventInternal",dk="_ConstructorInternal",hk="_FallbackInternal",pk="_FunctionInternal",mk="_StructInternal";var Th,Qv;const So=class So{constructor(e,r,n,i,o,s,f,d){Ne(this,Th);Oe(this,"name");Oe(this,"type");Oe(this,"baseType");Oe(this,"indexed");Oe(this,"components");Oe(this,"arrayLength");Oe(this,"arrayChildren");if(Cb(e,Cr,"ParamType"),Object.defineProperty(this,Fi,{value:ck}),s&&(s=Object.freeze(s.slice())),i==="array"){if(f==null||d==null)throw new Error("")}else if(f!=null||d!=null)throw new Error("");if(i==="tuple"){if(s==null)throw new Error("")}else if(s!=null)throw new Error("");xt(this,{name:r,type:n,baseType:i,indexed:o,components:s,arrayLength:f,arrayChildren:d})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const o=JSON.parse(this.arrayChildren.format("json"));return o.name=n,o.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(o)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(o=>JSON.parse(o.format(e)))),JSON.stringify(i)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?(e!=="sighash"&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")"):r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,o)=>n.components[o].walk(i,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],i=[e];return Ke(this,Th,Qv).call(this,n,e,r,o=>{i[0]=o}),n.length&&await Promise.all(n),i[0]}static from(e,r){if(So.isParamType(e))return e;if(typeof e=="string")try{return So.from(z0(e),r)}catch{_e(!1,"invalid param type","obj",e)}else if(e instanceof Ys){let f="",d="",p=null;Zf(e,ai(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(d="tuple",p=e.popParams().map(P=>So.from(P)),f=`tuple(${p.map(P=>P.format()).join(",")})`):(f=fk(e.popType("TYPE")),d=f);let b=null,v=null;for(;e.length&&e.peekType("BRACKET");){const P=e.pop();b=new So(Cr,"",f,d,null,p,v,b),v=P.value,f+=P.text,d="array",p=null}let A=null;if(Zf(e,$me).has("indexed")){if(!r)throw new Error("");A=!0}const S=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new So(Cr,S,f,d,A,p,v,b)}const n=e.name;_e(!n||typeof n=="string"&&n.match(tH),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(_e(r,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let o=e.type,s=o.match(Kme);if(s){const f=parseInt(s[2]||"-1"),d=So.from({type:s[1],components:e.components});return new So(Cr,n||"",o,"array",i,null,f,d)}if(o==="tuple"||o.startsWith("tuple(")||o.startsWith("(")){const f=e.components!=null?e.components.map(p=>So.from(p)):null;return new So(Cr,n||"",o,"tuple",i,f,null,null)}return o=fk(e.type),new So(Cr,n||"",o,o,i,null,null,null)}static isParamType(e){return e&&e[Fi]===ck}};Th=new WeakSet,Qv=function(e,r,n,i){if(this.isArray()){if(!Array.isArray(r))throw new Error("invalid array value");if(this.arrayLength!==-1&&r.length!==this.arrayLength)throw new Error("array is wrong length");const s=this.arrayChildren,f=r.slice();f.forEach((d,p)=>{var b;Ke(b=s,Th,Qv).call(b,e,d,n,v=>{f[p]=v})}),i(f);return}if(this.isTuple()){const s=this.components;let f;if(Array.isArray(r))f=r.slice();else{if(r==null||typeof r!="object")throw new Error("invalid tuple value");f=s.map(d=>{if(!d.name)throw new Error("cannot use object value with unnamed components");if(!(d.name in r))throw new Error(`missing value for component ${d.name}`);return r[d.name]})}if(f.length!==this.components.length)throw new Error("array is wrong length");f.forEach((d,p)=>{var b;Ke(b=s[p],Th,Qv).call(b,e,d,n,v=>{f[p]=v})}),i(f);return}const o=n(this.type,r);o.then?e.push(async function(){i(await o)}()):i(o)};let In=So;class ul{constructor(e,r,n){Oe(this,"type");Oe(this,"inputs");Cb(e,Cr,"Fragment"),n=Object.freeze(n.slice()),xt(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{ul.from(JSON.parse(e))}catch{}return ul.from(z0(e))}if(e instanceof Ys)switch(e.peekKeyword(Xj)){case"constructor":return Cf.from(e);case"error":return Ci.from(e);case"event":return Ma.from(e);case"fallback":case"receive":return sf.from(e);case"function":return _a.from(e);case"struct":return qu.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Cf.from(e);case"error":return Ci.from(e);case"event":return Ma.from(e);case"fallback":case"receive":return sf.from(e);case"function":return _a.from(e);case"struct":return qu.from(e)}Ge(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}_e(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Cf.isFragment(e)}static isError(e){return Ci.isFragment(e)}static isEvent(e){return Ma.isFragment(e)}static isFunction(e){return _a.isFragment(e)}static isStruct(e){return qu.isFragment(e)}}class Xw extends ul{constructor(r,n,i,o){super(r,n,o);Oe(this,"name");_e(typeof i=="string"&&i.match(tH),"invalid identifier","name",i),o=Object.freeze(o.slice()),xt(this,{name:i})}}function Cg(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class Ci extends Xw{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,Fi,{value:uk})}get selector(){return fl(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+Cg(e,this.inputs)),r.join(" ")}static from(e){if(Ci.isFragment(e))return e;if(typeof e=="string")return Ci.from(z0(e));if(e instanceof Ys){const r=Qw("error",e),n=Nf(e);return cl(e),new Ci(Cr,r,n)}return new Ci(Cr,e.name,e.inputs?e.inputs.map(In.from):[])}static isFragment(e){return e&&e[Fi]===uk}}class Ma extends Xw{constructor(r,n,i,o){super(r,"event",n,i);Oe(this,"anonymous");Object.defineProperty(this,Fi,{value:lk}),xt(this,{anonymous:o})}get topicHash(){return fl(this.format("sighash"))}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(r)))});const n=[];return r!=="sighash"&&n.push("event"),n.push(this.name+Cg(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(o=>In.from(o)),new Ma(Cr,r,n,!1).topicHash}static from(r){if(Ma.isFragment(r))return r;if(typeof r=="string")try{return Ma.from(z0(r))}catch{_e(!1,"invalid event fragment","obj",r)}else if(r instanceof Ys){const n=Qw("event",r),i=Nf(r,!0),o=!!Zf(r,ai(["anonymous"])).has("anonymous");return cl(r),new Ma(Cr,n,i,o)}return new Ma(Cr,r.name,r.inputs?r.inputs.map(n=>In.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[Fi]===lk}}class Cf extends ul{constructor(r,n,i,o,s){super(r,n,i);Oe(this,"payable");Oe(this,"gas");Object.defineProperty(this,Fi,{value:dk}),xt(this,{payable:o,gas:s})}format(r){if(Ge(r!=null&&r!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),r==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(r)))});const n=[`constructor${Cg(r,this.inputs)}`];return n.push(this.payable?"payable":"nonpayable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(Cf.isFragment(r))return r;if(typeof r=="string")try{return Cf.from(z0(r))}catch{_e(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof Ys){Zf(r,ai(["constructor"]));const n=Nf(r),i=!!Zf(r,Dme).has("payable"),o=iH(r);return cl(r),new Cf(Cr,"constructor",n,i,o)}return new Cf(Cr,"constructor",r.inputs?r.inputs.map(In.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[Fi]===dk}}class sf extends ul{constructor(r,n,i){super(r,"fallback",n);Oe(this,"payable");Object.defineProperty(this,Fi,{value:hk}),xt(this,{payable:i})}format(r){const n=this.inputs.length===0?"receive":"fallback";if(r==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:i})}return`${n}()${this.payable?" payable":""}`}static from(r){if(sf.isFragment(r))return r;if(typeof r=="string")try{return sf.from(z0(r))}catch{_e(!1,"invalid fallback fragment","obj",r)}else if(r instanceof Ys){const n=r.toString(),i=r.peekKeyword(ai(["fallback","receive"]));if(_e(i,"type must be fallback or receive","obj",n),r.popKeyword(ai(["fallback","receive"]))==="receive"){const d=Nf(r);return _e(d.length===0,"receive cannot have arguments","obj.inputs",d),Zf(r,ai(["payable"])),cl(r),new sf(Cr,[],!0)}let s=Nf(r);s.length?_e(s.length===1&&s[0].type==="bytes","invalid fallback inputs","obj.inputs",s.map(d=>d.format("minimal")).join(", ")):s=[In.from("bytes")];const f=nH(r);if(_e(f==="nonpayable"||f==="payable","fallback cannot be constants","obj.stateMutability",f),Zf(r,ai(["returns"])).has("returns")){const d=Nf(r);_e(d.length===1&&d[0].type==="bytes","invalid fallback outputs","obj.outputs",d.map(p=>p.format("minimal")).join(", "))}return cl(r),new sf(Cr,s,f==="payable")}if(r.type==="receive")return new sf(Cr,[],!0);if(r.type==="fallback"){const n=[In.from("bytes")],i=r.stateMutability==="payable";return new sf(Cr,n,i)}_e(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[Fi]===hk}}class _a extends Xw{constructor(r,n,i,o,s,f){super(r,"function",n,o);Oe(this,"constant");Oe(this,"outputs");Oe(this,"stateMutability");Oe(this,"payable");Oe(this,"gas");Object.defineProperty(this,Fi,{value:pk}),s=Object.freeze(s.slice()),xt(this,{constant:i==="view"||i==="pure",gas:f,outputs:s,payable:i==="payable",stateMutability:i})}get selector(){return fl(this.format("sighash")).substring(0,10)}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(r))),outputs:this.outputs.map(i=>JSON.parse(i.format(r)))});const n=[];return r!=="sighash"&&n.push("function"),n.push(this.name+Cg(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(Cg(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(o=>In.from(o)),new _a(Cr,r,"view",n,[],null).selector}static from(r){if(_a.isFragment(r))return r;if(typeof r=="string")try{return _a.from(z0(r))}catch{_e(!1,"invalid function fragment","obj",r)}else if(r instanceof Ys){const i=Qw("function",r),o=Nf(r),s=nH(r);let f=[];Zf(r,ai(["returns"])).has("returns")&&(f=Nf(r));const d=iH(r);return cl(r),new _a(Cr,i,s,o,f,d)}let n=r.stateMutability;return n==null&&(n="payable",typeof r.constant=="boolean"?(n="view",r.constant||(n="payable",typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable"))):typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable")),new _a(Cr,r.name,n,r.inputs?r.inputs.map(In.from):[],r.outputs?r.outputs.map(In.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[Fi]===pk}}class qu extends Xw{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,Fi,{value:mk})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return qu.from(z0(e))}catch{_e(!1,"invalid struct fragment","obj",e)}else if(e instanceof Ys){const r=Qw("struct",e),n=Nf(e);return cl(e),new qu(Cr,r,n)}return new qu(Cr,e.name,e.inputs?e.inputs.map(In.from):[])}static isFragment(e){return e&&e[Fi]===mk}}const fa=new Map;fa.set(0,"GENERIC_PANIC");fa.set(1,"ASSERT_FALSE");fa.set(17,"OVERFLOW");fa.set(18,"DIVIDE_BY_ZERO");fa.set(33,"ENUM_RANGE_ERROR");fa.set(34,"BAD_STORAGE_DATA");fa.set(49,"STACK_UNDERFLOW");fa.set(50,"ARRAY_RANGE_ERROR");fa.set(65,"OUT_OF_MEMORY");fa.set(81,"UNINITIALIZED_FUNCTION_CALL");const Wme=new RegExp(/^bytes([0-9]*)$/),Jme=new RegExp(/^(u?int)([0-9]*)$/);let J8=null;function Zme(t,e,r,n){let i="missing revert data",o=null;const s=null;let f=null;if(r){i="execution reverted";const p=qt(r);if(r=dt(r),p.length===0)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(p.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(dt(p.slice(0,4))==="0x08c379a0")try{o=n.decode(["string"],p.slice(4))[0],f={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(dt(p.slice(0,4))==="0x4e487b71")try{const b=Number(n.decode(["uint256"],p.slice(4))[0]);f={signature:"Panic(uint256)",name:"Panic",args:[b]},o=`Panic due to ${fa.get(b)||"UNKNOWN"}(${b})`,i+=`: ${o}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const d={to:e.to?Zt(e.to):null,data:e.data||"0x"};return e.from&&(d.from=Zt(e.from)),rn(i,"CALL_EXCEPTION",{action:t,data:r,reason:o,transaction:d,invocation:s,revert:f})}var Nc,ad;const h5=class h5{constructor(){Ne(this,Nc)}getDefaultValue(e){const r=e.map(i=>Ke(this,Nc,ad).call(this,In.from(i)));return new rv(r,"_").defaultValue()}encode(e,r){WF(r.length,e.length,"types/values length mismatch");const n=e.map(s=>Ke(this,Nc,ad).call(this,In.from(s))),i=new rv(n,"_"),o=new Q9;return i.encode(o,r),o.data}decode(e,r,n){const i=e.map(s=>Ke(this,Nc,ad).call(this,In.from(s)));return new rv(i,"_").decode(new X9(r,n))}static defaultAbiCoder(){return J8==null&&(J8=new h5),J8}static getBuiltinCallException(e,r,n){return Zme(e,r,n,h5.defaultAbiCoder())}};Nc=new WeakSet,ad=function(e){if(e.isArray())return new w1e(Ke(this,Nc,ad).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new rv(e.components.map(n=>Ke(this,Nc,ad).call(this,n)),e.name);switch(e.baseType){case"address":return new y1e(e.name);case"bool":return new x1e(e.name);case"string":return new T1e(e.name);case"bytes":return new E1e(e.name);case"":return new M1e(e.name)}let r=e.type.match(Jme);if(r){let n=parseInt(r[2]||"256");return _e(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new I1e(n/8,r[1]==="int",e.name)}if(r=e.type.match(Wme),r){let n=parseInt(r[1]);return _e(n!==0&&n<=32,"invalid bytes length","param",e),new A1e(n,e.name)}_e(!1,"invalid type","type",e.type)};let Ig=h5;class Yme{constructor(e,r,n){Oe(this,"fragment");Oe(this,"name");Oe(this,"signature");Oe(this,"topic");Oe(this,"args");const i=e.name,o=e.format();xt(this,{fragment:e,name:i,signature:o,topic:r,args:n})}}class Qme{constructor(e,r,n,i){Oe(this,"fragment");Oe(this,"name");Oe(this,"args");Oe(this,"signature");Oe(this,"selector");Oe(this,"value");const o=e.name,s=e.format();xt(this,{fragment:e,name:o,args:n,signature:s,selector:r,value:i})}}class Xme{constructor(e,r,n){Oe(this,"fragment");Oe(this,"name");Oe(this,"args");Oe(this,"signature");Oe(this,"selector");const i=e.name,o=e.format();xt(this,{fragment:e,name:i,args:n,signature:o,selector:r})}}class gk{constructor(e){Oe(this,"hash");Oe(this,"_isIndexed");xt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const bk={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},yk={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&bk[t.toString()]&&(e=bk[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var ga,ba,ya,jn,Rh,Xv,kh,e2;const Od=class Od{constructor(e){Ne(this,Rh);Ne(this,kh);Oe(this,"fragments");Oe(this,"deploy");Oe(this,"fallback");Oe(this,"receive");Ne(this,ga,void 0);Ne(this,ba,void 0);Ne(this,ya,void 0);Ne(this,jn,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ce(this,ya,new Map),ce(this,ga,new Map),ce(this,ba,new Map);const n=[];for(const s of r)try{n.push(ul.from(s))}catch(f){console.log("EE",f)}xt(this,{fragments:Object.freeze(n)});let i=null,o=!1;ce(this,jn,this.getAbiCoder()),this.fragments.forEach((s,f)=>{let d;switch(s.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}xt(this,{deploy:s});return;case"fallback":s.inputs.length===0?o=!0:(_e(!i||s.payable!==i.payable,"conflicting fallback fragments",`fragments[${f}]`,s),i=s,o=i.payable);return;case"function":d=X(this,ya);break;case"event":d=X(this,ba);break;case"error":d=X(this,ga);break;default:return}const p=s.format();d.has(p)||d.set(p,s)}),this.deploy||xt(this,{deploy:Cf.from("constructor()")}),xt(this,{fallback:i,receive:o})}format(e){const r=e?"minimal":"full";return this.fragments.map(i=>i.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return Ig.defaultAbiCoder()}getFunctionName(e){const r=Ke(this,Rh,Xv).call(this,e,null,!1);return _e(r,"no matching function","key",e),r.name}hasFunction(e){return!!Ke(this,Rh,Xv).call(this,e,null,!1)}getFunction(e,r){return Ke(this,Rh,Xv).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(X(this,ya).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;nn.localeCompare(i));for(let n=0;n1){const o=i.map(s=>JSON.stringify(s.format())).join(", ");_e(!1,`ambiguous error description (i.e. ${o})`,"name",e)}return i[0]}if(e=Ci.from(e).format(),e==="Error(string)")return Ci.from("error Error(string)");if(e==="Panic(uint256)")return Ci.from("error Panic(uint256)");const n=X(this,ga).get(e);return n||null}forEachError(e){const r=Array.from(X(this,ga).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;no.type==="string"?fl(s):o.type==="bytes"?Ir(dt(s)):(o.type==="bool"&&typeof s=="boolean"?s=s?"0x01":"0x00":o.type.match(/^u?int/)?s=y0(s):o.type.match(/^bytes/)?s=ioe(s,32):o.type==="address"&&X(this,jn).encode(["address"],[s]),rl(dt(s),32));for(r.forEach((o,s)=>{const f=e.inputs[s];if(!f.indexed){_e(o==null,"cannot filter non-indexed parameters; must be null","contract."+f.name,o);return}o==null?n.push(null):f.baseType==="array"||f.baseType==="tuple"?_e(!1,"filtering with tuples or arrays not supported","contract."+f.name,o):Array.isArray(o)?n.push(o.map(d=>i(f,d))):n.push(i(f,o))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const s=this.getEvent(e);_e(s,"unknown event","eventFragment",e),e=s}const n=[],i=[],o=[];return e.anonymous||n.push(e.topicHash),_e(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((s,f)=>{const d=r[f];if(s.indexed)if(s.type==="string")n.push(fl(d));else if(s.type==="bytes")n.push(Ir(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(X(this,jn).encode([s.type],[d]))}else i.push(s),o.push(d)}),{data:X(this,jn).encode(i,o),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const _=this.getEvent(e);_e(_,"unknown event","eventFragment",e),e=_}if(n!=null&&!e.anonymous){const _=e.topicHash;_e(Tr(n[0],32)&&n[0].toLowerCase()===_,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],o=[],s=[];e.inputs.forEach((_,S)=>{_.indexed?_.type==="string"||_.type==="bytes"||_.baseType==="tuple"||_.baseType==="array"?(i.push(In.from({type:"bytes32",name:_.name})),s.push(!0)):(i.push(_),s.push(!1)):(o.push(_),s.push(!1))});const f=n!=null?X(this,jn).decode(i,en(n)):null,d=X(this,jn).decode(o,r,!0),p=[],b=[];let v=0,A=0;return e.inputs.forEach((_,S)=>{let P=null;if(_.indexed)if(f==null)P=new gk(null);else if(s[S])P=new gk(f[A++]);else try{P=f[A++]}catch(I){P=I}else try{P=d[v++]}catch(I){P=I}p.push(P),b.push(_.name||null)}),e6.fromItems(p,b)}parseTransaction(e){const r=qt(e.data,"tx.data"),n=pt(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(dt(r.slice(0,4)));if(!i)return null;const o=X(this,jn).decode(i.inputs,r.slice(4));return new Qme(i,i.selector,o,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new Yme(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=dt(e),n=this.getError(Br(r,0,4));if(!n)return null;const i=X(this,jn).decode(n.inputs,Br(r,4));return new Xme(n,n.selector,i)}static from(e){return e instanceof Od?e:typeof e=="string"?new Od(JSON.parse(e)):typeof e.format=="function"?new Od(e.format("json")):new Od(e)}};ga=new WeakMap,ba=new WeakMap,ya=new WeakMap,jn=new WeakMap,Rh=new WeakSet,Xv=function(e,r,n){if(Tr(e)){const o=e.toLowerCase();for(const s of X(this,ya).values())if(o===s.selector)return s;return null}if(e.indexOf("(")===-1){const o=[];for(const[s,f]of X(this,ya))s.split("(")[0]===e&&o.push(f);if(r){const s=r.length>0?r[r.length-1]:null;let f=r.length,d=!0;Yn.isTyped(s)&&s.type==="overrides"&&(d=!1,f--);for(let p=o.length-1;p>=0;p--){const b=o[p].inputs.length;b!==f&&(!d||b!==f-1)&&o.splice(p,1)}for(let p=o.length-1;p>=0;p--){const b=o[p].inputs;for(let v=0;v=b.length){if(r[v].type==="overrides")continue;o.splice(p,1);break}if(r[v].type!==b[v].baseType){o.splice(p,1);break}}}}if(o.length===1&&r&&r.length!==o[0].inputs.length){const s=r[r.length-1];(s==null||Array.isArray(s)||typeof s!="object")&&o.splice(0,1)}if(o.length===0)return null;if(o.length>1&&n){const s=o.map(f=>JSON.stringify(f.format())).join(", ");_e(!1,`ambiguous function description (i.e. matches ${s})`,"key",e)}return o[0]}const i=X(this,ya).get(_a.from(e).format());return i||null},kh=new WeakSet,e2=function(e,r,n){if(Tr(e)){const o=e.toLowerCase();for(const s of X(this,ba).values())if(o===s.topicHash)return s;return null}if(e.indexOf("(")===-1){const o=[];for(const[s,f]of X(this,ba))s.split("(")[0]===e&&o.push(f);if(r){for(let s=o.length-1;s>=0;s--)o[s].inputs.length=0;s--){const f=o[s].inputs;for(let d=0;d1&&n){const s=o.map(f=>JSON.stringify(f.format())).join(", ");_e(!1,`ambiguous event description (i.e. matches ${s})`,"key",e)}return o[0]}const i=X(this,ba).get(Ma.from(e).format());return i||null};let k7=Od;const oH=BigInt(0);function $m(t){return t??null}function Wn(t){return t==null?null:t.toString()}class vk{constructor(e,r,n){Oe(this,"gasPrice");Oe(this,"maxFeePerGas");Oe(this,"maxPriorityFeePerGas");xt(this,{gasPrice:$m(e),maxFeePerGas:$m(r),maxPriorityFeePerGas:$m(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Wn(e),maxFeePerGas:Wn(r),maxPriorityFeePerGas:Wn(n)}}}function S6(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=dt(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=pt(t[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=Tt(t[i],`request.${i}`));return t.accessList&&(e.accessList=Il(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),e}var gf;class ege{constructor(e,r){Oe(this,"provider");Oe(this,"number");Oe(this,"hash");Oe(this,"timestamp");Oe(this,"parentHash");Oe(this,"nonce");Oe(this,"difficulty");Oe(this,"gasLimit");Oe(this,"gasUsed");Oe(this,"miner");Oe(this,"extraData");Oe(this,"baseFeePerGas");Ne(this,gf,void 0);ce(this,gf,e.transactions.map(n=>typeof n!="string"?new Tg(n,r):n)),xt(this,{provider:r,hash:$m(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,miner:e.miner,extraData:e.extraData,baseFeePerGas:$m(e.baseFeePerGas)})}get transactions(){return X(this,gf).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=X(this,gf).slice();return e.length===0?[]:(Ge(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:i,gasUsed:o,hash:s,miner:f,nonce:d,number:p,parentHash:b,timestamp:v,transactions:A}=this;return{_type:"Block",baseFeePerGas:Wn(e),difficulty:Wn(r),extraData:n,gasLimit:Wn(i),gasUsed:Wn(o),hash:s,miner:f,nonce:d,number:p,parentHash:b,timestamp:v,transactions:A}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>enew Wb(i,r))));let n=oH;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),xt(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,gasPrice:n,type:e.type,status:e.status,root:e.root})}get logs(){return X(this,Xg)}toJSON(){const{to:e,from:r,contractAddress:n,hash:i,index:o,blockHash:s,blockNumber:f,logsBloom:d,logs:p,status:b,root:v}=this;return{_type:"TransactionReceipt",blockHash:s,blockNumber:f,contractAddress:n,cumulativeGasUsed:Wn(this.cumulativeGasUsed),from:r,gasPrice:Wn(this.gasPrice),gasUsed:Wn(this.gasUsed),hash:i,index:o,logs:p,logsBloom:d,root:v,status:b,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(f)return null;const{blockNumber:A,nonce:_}=await ni({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(_{if(A==null||A.status!==0)return A;Ge(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:A.to,from:A.from,data:""},receipt:A})},b=await this.provider.getTransactionReceipt(this.hash);if(n===0)return p(b);if(b){if(await b.confirmations()>=n)return p(b)}else if(await d(),n===0)return null;return await new Promise((A,_)=>{const S=[],P=()=>{S.forEach(C=>C())};if(S.push(()=>{f=!0}),i>0){const C=setTimeout(()=>{P(),_(rn("wait for transaction timeout","TIMEOUT"))},i);S.push(()=>{clearTimeout(C)})}const I=async C=>{if(await C.confirmations()>=n){P();try{A(p(C))}catch(T){_(T)}}};if(S.push(()=>{this.provider.off(this.hash,I)}),this.provider.on(this.hash,I),o>=0){const C=async()=>{try{await d()}catch(T){if($o(T,"TRANSACTION_REPLACED")){P(),_(T);return}}f||this.provider.once("block",C)};S.push(()=>{this.provider.off("block",C)}),this.provider.once("block",C)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}removedEvent(){return Ge(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),fH(this)}reorderedEvent(e){return Ge(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Ge(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),aH(this,e)}replaceableTransaction(e){_e(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new LP(this,this.provider);return ce(r,Lc,e),r}};Lc=new WeakMap;let Tg=LP;function tge(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function aH(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function fH(t){return{orphan:"drop-transaction",tx:t}}function rge(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class JM extends Wb{constructor(r,n,i){super(r,r.provider);Oe(this,"interface");Oe(this,"fragment");Oe(this,"args");const o=n.decodeEventLog(i,r.data,r.topics);xt(this,{args:o,fragment:i,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class cH extends Wb{constructor(r,n){super(r,r.provider);Oe(this,"error");xt(this,{error:n})}}var Bh;class nge extends sH{constructor(r,n,i){super(i,n);Ne(this,Bh,void 0);ce(this,Bh,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?X(this,Bh).getEvent(r.topics[0]):null;if(n)try{return new JM(r,X(this,Bh),n)}catch(i){return new cH(r,i)}return r})}}Bh=new WeakMap;var eb;class ZM extends Tg{constructor(r,n,i){super(i,n);Ne(this,eb,void 0);ce(this,eb,r)}async wait(r){const n=await super.wait(r);return n==null?null:new nge(X(this,eb),this.provider,n)}}eb=new WeakMap;class uH extends QF{constructor(r,n,i,o){super(r,n,i);Oe(this,"log");xt(this,{log:o})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class ige extends uH{constructor(e,r,n,i,o){super(e,r,n,new JM(o,e.interface,i));const s=e.interface.decodeEventLog(i,this.log.data,this.log.topics);xt(this,{args:s,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const wk=BigInt(0);function lH(t){return t&&typeof t.call=="function"}function dH(t){return t&&typeof t.estimateGas=="function"}function YM(t){return t&&typeof t.resolveName=="function"}function hH(t){return t&&typeof t.sendTransaction=="function"}var tb;class oge{constructor(e,r,n){Ne(this,tb,void 0);Oe(this,"fragment");if(xt(this,{fragment:r}),r.inputs.lengthn[d]==null?null:f.walkAsync(n[d],(b,v)=>b==="address"?Array.isArray(v)?Promise.all(v.map(A=>Ri(A,o))):Ri(v,o):v)));return e.interface.encodeFilterTopics(r,s)}())}getTopicFilter(){return X(this,tb)}}tb=new WeakMap;function ll(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function uu(t){return t==null?null:t.provider||null}async function pH(t,e){const r=Yn.dereference(t,"overrides");_e(typeof r=="object","invalid overrides parameter","overrides",t);const n=S6(r);return _e(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),_e(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=await Ri(n.from)),n}async function sge(t,e,r){const n=ll(t,"resolveName"),i=YM(n)?n:null;return await Promise.all(e.map((o,s)=>o.walkAsync(r[s],(f,d)=>(d=Yn.dereference(d,f),f==="address"?Ri(d,i):d))))}function age(t){const e=async function(s){const f=await pH(s,["data"]);f.to=await t.getAddress();const d=t.interface,p=pt(f.value||wk,"overrides.value")===wk,b=(f.data||"0x")==="0x";d.fallback&&!d.fallback.payable&&d.receive&&!b&&!p&&_e(!1,"cannot send data to receive or send value to non-payable fallback","overrides",s),_e(d.fallback||b,"cannot send data to receive-only contract","overrides.data",f.data);const v=d.receive||d.fallback&&d.fallback.payable;return _e(v||p,"cannot send value to non-payable fallback","overrides.value",f.value),_e(d.fallback||b,"cannot send data to receive-only contract","overrides.data",f.data),f},r=async function(s){const f=ll(t.runner,"call");Ge(lH(f),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const d=await e(s);try{return await f.call(d)}catch(p){throw jS(p)&&p.data?t.interface.makeError(p.data,d):p}},n=async function(s){const f=t.runner;Ge(hH(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const d=await f.sendTransaction(await e(s)),p=uu(t.runner);return new ZM(t.interface,p,d)},i=async function(s){const f=ll(t.runner,"estimateGas");return Ge(dH(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await e(s))},o=async s=>await n(s);return xt(o,{_contract:t,estimateGas:i,populateTransaction:e,send:n,staticCall:r}),o}function fge(t,e){const r=function(...p){const b=t.interface.getFunction(e,p);return Ge(b,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:p}}),b},n=async function(...p){const b=r(...p);let v={};if(b.inputs.length+1===p.length&&(v=await pH(p.pop())),b.inputs.length!==p.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const A=await sge(t.runner,b.inputs,p);return Object.assign({},v,await ni({to:t.getAddress(),data:t.interface.encodeFunctionData(b,A)}))},i=async function(...p){const b=await f(...p);return b.length===1?b[0]:b},o=async function(...p){const b=t.runner;Ge(hH(b),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const v=await b.sendTransaction(await n(...p)),A=uu(t.runner);return new ZM(t.interface,A,v)},s=async function(...p){const b=ll(t.runner,"estimateGas");return Ge(dH(b),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await b.estimateGas(await n(...p))},f=async function(...p){const b=ll(t.runner,"call");Ge(lH(b),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const v=await n(...p);let A="0x";try{A=await b.call(v)}catch(S){throw jS(S)&&S.data?t.interface.makeError(S.data,v):S}const _=r(...p);return t.interface.decodeFunctionResult(_,A)},d=async(...p)=>r(...p).constant?await i(...p):await o(...p);return xt(d,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:s,populateTransaction:n,send:o,staticCall:i,staticCallResult:f}),Object.defineProperty(d,"fragment",{configurable:!1,enumerable:!0,get:()=>{const p=t.interface.getFunction(e);return Ge(p,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),p}}),d}function cge(t,e){const r=function(...i){const o=t.interface.getEvent(e,i);return Ge(o,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),o},n=function(...i){return new oge(t,r(...i),i)};return xt(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return Ge(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const M6=Symbol.for("_ethersInternal_contract"),mH=new WeakMap;function uge(t,e){mH.set(t[M6],e)}function Gi(t){return mH.get(t[M6])}function lge(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function QM(t,e){let r,n=null;if(Array.isArray(e)){const o=function(s){if(Tr(s,32))return s;const f=t.interface.getEvent(s);return _e(f,"unknown fragment","name",s),f.topicHash};r=e.map(s=>s==null?null:Array.isArray(s)?s.map(o):o(s))}else e==="*"?r=[null]:typeof e=="string"?Tr(e,32)?r=[e]:(n=t.interface.getEvent(e),_e(n,"unknown fragment","event",e),r=[n.topicHash]):lge(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):_e(!1,"unknown event name","event",e);r=r.map(o=>{if(o==null)return null;if(Array.isArray(o)){const s=Array.from(new Set(o.map(f=>f.toLowerCase())).values());return s.length===1?s[0]:(s.sort(),s)}return o.toLowerCase()});const i=r.map(o=>o==null?"null":Array.isArray(o)?o.join("|"):o).join("&");return{fragment:n,tag:i,topics:r}}async function ym(t,e){const{subs:r}=Gi(t);return r.get((await QM(t,e)).tag)||null}async function xk(t,e,r){const n=uu(t.runner);Ge(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:o,topics:s}=await QM(t,r),{addr:f,subs:d}=Gi(t);let p=d.get(o);if(!p){const v={address:f||t,topics:s},A=I=>{let C=i;if(C==null)try{C=t.interface.getEvent(I.topics[0])}catch{}if(C){const T=C,O=i?t.interface.decodeEventLog(i,I.data,I.topics):[];O7(t,r,O,B=>new ige(t,B,r,T,I))}else O7(t,r,[],T=>new uH(t,T,r,I))};let _=[];p={tag:o,listeners:[],start:()=>{_.length||_.push(n.on(v,A))},stop:async()=>{if(_.length==0)return;let I=_;_=[],await Promise.all(I),n.off(v,A)}},d.set(o,p)}return p}let B7=Promise.resolve();async function dge(t,e,r,n){await B7;const i=await ym(t,e);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter(({listener:s,once:f})=>{const d=Array.from(r);n&&d.push(n(f?null:s));try{s.call(t,...d)}catch{}return!f}),i.listeners.length===0&&(i.stop(),Gi(t).subs.delete(i.tag)),o>0}async function O7(t,e,r,n){try{await B7}catch{}const i=dge(t,e,r,n);return B7=i,await i}const nv=["then"];var _Se;const Vm=class Vm{constructor(e,r,n,i){Oe(this,"target");Oe(this,"interface");Oe(this,"runner");Oe(this,"filters");Oe(this,_Se);Oe(this,"fallback");_e(typeof e=="string"||vj(e),"invalid value for Contract target","target",e),n==null&&(n=null);const o=k7.from(r);xt(this,{target:e,runner:n,interface:o}),Object.defineProperty(this,M6,{value:{}});let s,f=null,d=null;if(i){const v=uu(n);d=new ZM(this.interface,v,i)}let p=new Map;if(typeof e=="string")if(Tr(e))f=e,s=Promise.resolve(e);else{const v=ll(n,"resolveName");if(!YM(v))throw rn("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});s=v.resolveName(e).then(A=>{if(A==null)throw rn("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Gi(this).addr=A,A})}else s=e.getAddress().then(v=>{if(v==null)throw new Error("TODO");return Gi(this).addr=v,v});uge(this,{addrPromise:s,addr:f,deployTx:d,subs:p});const b=new Proxy({},{get:(v,A,_)=>{if(typeof A=="symbol"||nv.indexOf(A)>=0)return Reflect.get(v,A,_);try{return this.getEvent(A)}catch(S){if(!$o(S,"INVALID_ARGUMENT")||S.argument!=="key")throw S}},has:(v,A)=>nv.indexOf(A)>=0?Reflect.has(v,A):Reflect.has(v,A)||this.interface.hasEvent(String(A))});return xt(this,{filters:b}),xt(this,{fallback:o.receive||o.fallback?age(this):null}),new Proxy(this,{get:(v,A,_)=>{if(typeof A=="symbol"||A in v||nv.indexOf(A)>=0)return Reflect.get(v,A,_);try{return v.getFunction(A)}catch(S){if(!$o(S,"INVALID_ARGUMENT")||S.argument!=="key")throw S}},has:(v,A)=>typeof A=="symbol"||A in v||nv.indexOf(A)>=0?Reflect.has(v,A):v.interface.hasFunction(A)})}connect(e){return new Vm(this.target,this.interface,e)}attach(e){return new Vm(e,this.interface,this.runner)}async getAddress(){return await Gi(this).addrPromise}async getDeployedCode(){const e=uu(this.runner);Ge(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=uu(this.runner);return Ge(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,o)=>{const s=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",s)}catch(f){o(f)}};s()})}deploymentTransaction(){return Gi(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),fge(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),cge(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:i,addrPromise:o}=Gi(this),s=i||await o,{fragment:f,topics:d}=await QM(this,e),p={address:s,topics:d,fromBlock:r,toBlock:n},b=uu(this.runner);return Ge(b,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await b.getLogs(p)).map(v=>{let A=f;if(A==null)try{A=this.interface.getEvent(v.topics[0])}catch{}if(A)try{return new JM(v,this.interface,A)}catch(_){return new cH(v,_)}return new Wb(v,b)})}async on(e,r){const n=await xk(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await xk(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await O7(this,e,r,null)}async listenerCount(e){if(e){const i=await ym(this,e);return i?i.listeners.length:0}const{subs:r}=Gi(this);let n=0;for(const{listeners:i}of r.values())n+=i.length;return n}async listeners(e){if(e){const i=await ym(this,e);return i?i.listeners.map(({listener:o})=>o):[]}const{subs:r}=Gi(this);let n=[];for(const{listeners:i}of r.values())n=n.concat(i.map(({listener:o})=>o));return n}async off(e,r){const n=await ym(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:o})=>o).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(r==null||n.listeners.length===0)&&(n.stop(),Gi(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await ym(this,e);if(!r)return this;r.stop(),Gi(this).subs.delete(r.tag)}else{const{subs:r}=Gi(this);for(const{tag:n,stop:i}of r.values())i(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends Vm{constructor(i,o=null){super(i,e,o)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};_Se=M6;let N7=Vm;function hge(){return N7}class Na extends hge(){}function Z8(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):_e(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class pge{constructor(e){Oe(this,"name");xt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const gH=new RegExp("^(ipfs)://(.*)$","i"),Ek=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),gH,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Dc,Su,Fc,fd,p5,bH;const Nd=class Nd{constructor(e,r,n){Ne(this,Fc);Oe(this,"provider");Oe(this,"address");Oe(this,"name");Ne(this,Dc,void 0);Ne(this,Su,void 0);xt(this,{provider:e,address:r,name:n}),ce(this,Dc,null),ce(this,Su,new Na(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return X(this,Dc)==null&&ce(this,Dc,(async()=>{try{return await X(this,Su).supportsInterface("0x9061b923")}catch(e){if($o(e,"CALL_EXCEPTION"))return!1;throw ce(this,Dc,null),e}})()),await X(this,Dc)}async getAddress(e){if(e==null&&(e=60),e===60)try{const o=await Ke(this,Fc,fd).call(this,"addr(bytes32)");return o==null||o===b6?null:o}catch(o){if($o(o,"CALL_EXCEPTION"))return null;throw o}if(e>=0&&e<2147483648){let o=e+2147483648;const s=await Ke(this,Fc,fd).call(this,"addr(bytes32,uint)",[o]);if(Tr(s,20))return Zt(s)}let r=null;for(const o of this.provider.plugins)if(o instanceof pge&&o.supportsCoinType(e)){r=o;break}if(r==null)return null;const n=await Ke(this,Fc,fd).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await r.decodeAddress(e,n);if(i!=null)return i;Ge(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await Ke(this,Fc,fd).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await Ke(this,Fc,fd).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const i=r[1]==="e3010170"?"ipfs":"ipns",o=parseInt(r[4],16);if(r[5].length===o*2)return`${i}://${aoe("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;Ge(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n{if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>t(r))}}function Jb(t,e){return r=>{const n={};for(const i in t){let o=i;if(e&&i in e&&!(o in r)){for(const s of e[i])if(s in r){o=s;break}}try{const s=t[i](r[o]);s!==void 0&&(n[i]=s)}catch(s){const f=s instanceof Error?s.message:"not-an-error";Ge(!1,`invalid value for value.${i} (${f})`,"BAD_DATA",{value:r})}}return n}}function mge(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}_e(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Sp(t){return _e(Tr(t,!0),"invalid data","value",t),t}function Uo(t){return _e(Tr(t,32),"invalid hash","value",t),t}const gge=Jb({address:Zt,blockHash:Uo,blockNumber:Tt,data:Sp,index:Tt,removed:_r(mge,!1),topics:XM(Uo),transactionHash:Uo,transactionIndex:Tt},{index:["logIndex"]});function bge(t){return gge(t)}const yge=Jb({hash:_r(Uo),parentHash:Uo,number:Tt,timestamp:Tt,nonce:_r(Sp),difficulty:pt,gasLimit:pt,gasUsed:pt,miner:_r(Zt),extraData:Sp,baseFeePerGas:_r(pt)});function vge(t){const e=yge(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:yH(r)),e}const wge=Jb({transactionIndex:Tt,blockNumber:Tt,transactionHash:Uo,address:Zt,topics:XM(Uo),data:Sp,index:Tt,blockHash:Uo},{index:["logIndex"]});function xge(t){return wge(t)}const Ege=Jb({to:_r(Zt,null),from:_r(Zt,null),contractAddress:_r(Zt,null),index:Tt,root:_r(dt),gasUsed:pt,logsBloom:_r(Sp),blockHash:Uo,hash:Uo,logs:XM(xge),blockNumber:Tt,cumulativeGasUsed:pt,effectiveGasPrice:_r(pt),status:_r(Tt),type:_r(Tt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Age(t){return Ege(t)}function yH(t){t.to&&pt(t.to)===Ak&&(t.to="0x0000000000000000000000000000000000000000");const e=Jb({hash:Uo,type:r=>r==="0x"||r==null?0:Tt(r),accessList:_r(Il,null),blockHash:_r(Uo,null),blockNumber:_r(Tt,null),transactionIndex:_r(Tt,null),from:Zt,gasPrice:_r(pt),maxPriorityFeePerGas:_r(pt),maxFeePerGas:_r(pt),gasLimit:pt,to:_r(Zt,null),value:pt,nonce:Tt,data:Sp,creates:_r(Zt,null),chainId:_r(pt,null)},{data:["input"],gasLimit:["gas"]})(t);if(e.to==null&&e.creates==null&&(e.creates=b1e(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Jf.from(t.signature):e.signature=Jf.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&pt(e.blockHash)===Ak&&(e.blockHash=null),e}const Sge="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Zb{constructor(e){Oe(this,"name");xt(this,{name:e})}clone(){return new Zb(this.name)}}class ex extends Zb{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);Oe(this,"effectiveBlock");Oe(this,"txBase");Oe(this,"txCreate");Oe(this,"txDataZero");Oe(this,"txDataNonzero");Oe(this,"txAccessListStorageKey");Oe(this,"txAccessListAddress");const i={effectiveBlock:r};function o(s,f){let d=(n||{})[s];d==null&&(d=f),_e(typeof d=="number",`invalud value for ${s}`,"costs",n),i[s]=d}o("txBase",21e3),o("txCreate",32e3),o("txDataZero",4),o("txDataNonzero",16),o("txAccessListStorageKey",1900),o("txAccessListAddress",2400),xt(this,i)}clone(){return new ex(this.effectiveBlock,this)}}class tx extends Zb{constructor(r,n){super("org.ethers.plugins.network.Ens");Oe(this,"address");Oe(this,"targetNetwork");xt(this,{address:r||Sge,targetNetwork:n??1})}clone(){return new tx(this.address,this.targetNetwork)}}var rb,nb;class vH extends Zb{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Ne(this,rb,void 0);Ne(this,nb,void 0);ce(this,rb,r),ce(this,nb,n)}get url(){return X(this,rb)}get processFunc(){return X(this,nb)}clone(){return this}}rb=new WeakMap,nb=new WeakMap;const Y8=new Map;var Oh,Nh,$c;const Ld=class Ld{constructor(e,r){Ne(this,Oh,void 0);Ne(this,Nh,void 0);Ne(this,$c,void 0);ce(this,Oh,e),ce(this,Nh,pt(r)),ce(this,$c,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return X(this,Oh)}set name(e){ce(this,Oh,e)}get chainId(){return X(this,Nh)}set chainId(e){ce(this,Nh,pt(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===pt(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===pt(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===pt(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(X(this,$c).values())}attachPlugin(e){if(X(this,$c).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return X(this,$c).set(e.name,e.clone()),this}getPlugin(e){return X(this,$c).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new Ld(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new ex;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let i=2;i9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function Mk(t){return new vH(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[o,s]=await Promise.all([n.send(),e()]);i=o;const f=i.bodyJson.standard;return{gasPrice:s.gasPrice,maxFeePerGas:Sk(f.maxFee,9),maxPriorityFeePerGas:Sk(f.maxPriorityFee,9)}}catch(o){Ge(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:o})}})}function Mge(t){return new vH("data:",async(e,r,n)=>{const i=await e();if(i.maxFeePerGas==null||i.maxPriorityFeePerGas==null)return i;const o=i.maxFeePerGas-i.maxPriorityFeePerGas;return{gasPrice:i.gasPrice,maxFeePerGas:o+t,maxPriorityFeePerGas:t}})}let _k=!1;function _ge(){if(_k)return;_k=!0;function t(e,r,n){const i=function(){const o=new If(e,r);return n.ensNetwork!=null&&o.attachPlugin(new tx(null,n.ensNetwork)),o.attachPlugin(new ex),(n.plugins||[]).forEach(s=>{o.attachPlugin(s)}),o};If.register(e,i),If.register(r,i),n.altNames&&n.altNames.forEach(o=>{If.register(o,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("matic",137,{ensNetwork:1,plugins:[Mk("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Mk("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[Mge(BigInt("1000000"))]}),t("optimism-goerli",420,{}),t("xdai",100,{ensNetwork:1})}function L7(t){return JSON.parse(JSON.stringify(t))}var bf,Po,Uc,va,Lh,t2;class Pge{constructor(e){Ne(this,Lh);Ne(this,bf,void 0);Ne(this,Po,void 0);Ne(this,Uc,void 0);Ne(this,va,void 0);ce(this,bf,e),ce(this,Po,null),ce(this,Uc,4e3),ce(this,va,-2)}get pollingInterval(){return X(this,Uc)}set pollingInterval(e){ce(this,Uc,e)}start(){X(this,Po)||(ce(this,Po,X(this,bf)._setTimeout(Ke(this,Lh,t2).bind(this),X(this,Uc))),Ke(this,Lh,t2).call(this))}stop(){X(this,Po)&&(X(this,bf)._clearTimeout(X(this,Po)),ce(this,Po,null))}pause(e){this.stop(),e&&ce(this,va,-2)}resume(){this.start()}}bf=new WeakMap,Po=new WeakMap,Uc=new WeakMap,va=new WeakMap,Lh=new WeakSet,t2=async function(){try{const e=await X(this,bf).getBlockNumber();if(X(this,va)===-2){ce(this,va,e);return}if(e!==X(this,va)){for(let r=X(this,va)+1;r<=e;r++){if(X(this,Po)==null)return;await X(this,bf).emit("block",r)}ce(this,va,e)}}catch{}X(this,Po)!=null&&ce(this,Po,X(this,bf)._setTimeout(Ke(this,Lh,t2).bind(this),X(this,Uc)))};var Mu,_u,zc;class wH{constructor(e){Ne(this,Mu,void 0);Ne(this,_u,void 0);Ne(this,zc,void 0);ce(this,Mu,e),ce(this,zc,!1),ce(this,_u,r=>{this._poll(r,X(this,Mu))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){X(this,zc)||(ce(this,zc,!0),X(this,_u).call(this,-2),X(this,Mu).on("block",X(this,_u)))}stop(){X(this,zc)&&(ce(this,zc,!1),X(this,Mu).off("block",X(this,_u)))}pause(e){this.stop()}resume(){this.start()}}Mu=new WeakMap,_u=new WeakMap,zc=new WeakMap;var m5;class Cge extends wH{constructor(r,n){super(r);Ne(this,m5,void 0);ce(this,m5,L7(n))}async _poll(r,n){throw new Error("@TODO")}}m5=new WeakMap;var Dh;class Ige extends wH{constructor(r,n){super(r);Ne(this,Dh,void 0);ce(this,Dh,n)}async _poll(r,n){const i=await n.getTransactionReceipt(X(this,Dh));i&&n.emit(X(this,Dh),i)}}Dh=new WeakMap;var yf,Fh,$h,jc,Co,g5,xH;class e_{constructor(e,r){Ne(this,g5);Ne(this,yf,void 0);Ne(this,Fh,void 0);Ne(this,$h,void 0);Ne(this,jc,void 0);Ne(this,Co,void 0);ce(this,yf,e),ce(this,Fh,L7(r)),ce(this,$h,Ke(this,g5,xH).bind(this)),ce(this,jc,!1),ce(this,Co,-2)}start(){X(this,jc)||(ce(this,jc,!0),X(this,Co)===-2&&X(this,yf).getBlockNumber().then(e=>{ce(this,Co,e)}),X(this,yf).on("block",X(this,$h)))}stop(){X(this,jc)&&(ce(this,jc,!1),X(this,yf).off("block",X(this,$h)))}pause(e){this.stop(),e&&ce(this,Co,-2)}resume(){this.start()}}yf=new WeakMap,Fh=new WeakMap,$h=new WeakMap,jc=new WeakMap,Co=new WeakMap,g5=new WeakSet,xH=async function(e){if(X(this,Co)===-2)return;const r=L7(X(this,Fh));r.fromBlock=X(this,Co)+1,r.toBlock=e;const n=await X(this,yf).getLogs(r);if(n.length===0){X(this,Co){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((o,s)=>(o[s]=n[s],o),{})}return n})}class EH{constructor(e){Oe(this,"name");xt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function kge(t){return JSON.parse(JSON.stringify(t))}function D7(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function Q8(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"pending":case"debug":case"error":case"network":return{type:t,tag:t}}if(Tr(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:r2("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:r2("orphan",r),filter:kge(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(i=>i==null?null:Array.isArray(i)?D7(i.map(o=>o.toLowerCase())):i.toLowerCase())};if(r.address){const i=[],o=[],s=f=>{Tr(f)?i.push(f):o.push((async()=>{i.push(await Ri(f,e))})())};Array.isArray(r.address)?r.address.forEach(s):s(r.address),o.length&&await Promise.all(o),n.address=D7(i.map(f=>f.toLowerCase()))}return{filter:n,tag:r2("event",n),type:"event"}}_e(!1,"unknown ProviderEvent","event",t)}function X8(){return new Date().getTime()}const Bge={cacheTimeout:250,pollingInterval:4e3};var Hn,Hc,qn,Uh,Ji,Pu,qc,vf,ib,Io,zh,jh,Ei,Ao,ob,F7,sb,$7,Cu,vm,ab,U7,Iu,wm,Hh,n2;class Oge{constructor(e,r){Ne(this,Ei);Ne(this,ob);Ne(this,sb);Ne(this,Cu);Ne(this,ab);Ne(this,Iu);Ne(this,Hh);Ne(this,Hn,void 0);Ne(this,Hc,void 0);Ne(this,qn,void 0);Ne(this,Uh,void 0);Ne(this,Ji,void 0);Ne(this,Pu,void 0);Ne(this,qc,void 0);Ne(this,vf,void 0);Ne(this,ib,void 0);Ne(this,Io,void 0);Ne(this,zh,void 0);Ne(this,jh,void 0);if(ce(this,jh,Object.assign({},Bge,r||{})),e==="any")ce(this,Pu,!0),ce(this,Ji,null);else if(e){const n=If.from(e);ce(this,Pu,!1),ce(this,Ji,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else ce(this,Pu,!1),ce(this,Ji,null);ce(this,vf,-1),ce(this,qc,new Map),ce(this,Hn,new Map),ce(this,Hc,new Map),ce(this,qn,null),ce(this,Uh,!1),ce(this,ib,1),ce(this,Io,new Map),ce(this,zh,!1)}get pollingInterval(){return X(this,jh).pollingInterval}get provider(){return this}get plugins(){return Array.from(X(this,Hc).values())}attachPlugin(e){if(X(this,Hc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return X(this,Hc).set(e.name,e.connect(this)),this}getPlugin(e){return X(this,Hc).get(e)||null}get disableCcipRead(){return X(this,zh)}set disableCcipRead(e){ce(this,zh,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),o=r.toLowerCase(),s=[];for(let f=0;f=500,`response not found during CCIP fetch: ${v}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:d,errorMessage:v}}),s.push(v)}Ge(!1,`error encountered during CCIP fetch: ${s.map(f=>JSON.stringify(f)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:s}})}_wrapBlock(e,r){return new ege(vge(e),this)}_wrapLog(e,r){return new Wb(bge(e),this)}_wrapTransactionReceipt(e,r){return new sH(Age(e),this)}_wrapTransactionResponse(e,r){return new Tg(yH(e),this)}_detectNetwork(){Ge(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){Ge(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Tt(await Ke(this,Ei,Ao).call(this,{method:"getBlockNumber"}),"%response");return X(this,vf)>=0&&ce(this,vf,e),e}_getAddress(e){return Ri(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(Tr(e))return Tr(e,32)?e:Pd(e);if(typeof e=="bigint"&&(e=Tt(e,"blockTag")),typeof e=="number")return e>=0?Pd(e):X(this,vf)>=0?Pd(X(this,vf)+e):this.getBlockNumber().then(r=>Pd(r+e));_e(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(d=>d==null?null:Array.isArray(d)?D7(d.map(p=>p.toLowerCase())):d.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(d,p,b)=>{let v;switch(d.length){case 0:break;case 1:v=d[0];break;default:d.sort(),v=d}if(n&&(p!=null||b!=null))throw new Error("invalid filter");const A={};return v&&(A.address=v),r.length&&(A.topics=r),p&&(A.fromBlock=p),b&&(A.toBlock=b),n&&(A.blockHash=n),A};let o=[];if(e.address)if(Array.isArray(e.address))for(const d of e.address)o.push(this._getAddress(d));else o.push(this._getAddress(e.address));let s;"fromBlock"in e&&(s=this._getBlockTag(e.fromBlock));let f;return"toBlock"in e&&(f=this._getBlockTag(e.toBlock)),o.filter(d=>typeof d!="string").length||s!=null&&typeof s!="string"||f!=null&&typeof f!="string"?Promise.all([Promise.all(o),s,f]).then(d=>i(d[0],d[1],d[2])):i(o,s,f)}_getTransactionRequest(e){const r=S6(e),n=[];if(["to","from"].forEach(i=>{if(r[i]==null)return;const o=Ri(r[i]);iv(o)?n.push(async function(){r[i]=await o}()):r[i]=o}),r.blockTag!=null){const i=this._getBlockTag(r.blockTag);iv(i)?n.push(async function(){r.blockTag=await i}()):r.blockTag=i}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(X(this,Ji)==null){const i=this._detectNetwork().then(o=>(this.emit("network",o,null),o),o=>{throw X(this,Ji)===i&&ce(this,Ji,null),o});return ce(this,Ji,i),(await i).clone()}const e=X(this,Ji),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(X(this,Pu)?(this.emit("network",n,r),X(this,Ji)===e&&ce(this,Ji,Promise.resolve(n))):Ge(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:i,gasPrice:o}=await ni({_block:Ke(this,ab,U7).call(this,"latest",!1),gasPrice:(async()=>{try{const p=await Ke(this,Ei,Ao).call(this,{method:"getGasPrice"});return pt(p,"%response")}catch{}return null})()});let s=null,f=null;const d=this._wrapBlock(i,e);return d&&d.baseFeePerGas&&(f=BigInt("1000000000"),s=d.baseFeePerGas*Tge+f),new vk(o,s,f)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new qf(n.url),o=await n.processFunc(r,this,i);return new vk(o.gasPrice,o.maxFeePerGas,o.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return iv(r)&&(r=await r),pt(await Ke(this,Ei,Ao).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await ni({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await Ke(this,sb,$7).call(this,Ke(this,ob,F7).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return pt(await Ke(this,Cu,vm).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return Tt(await Ke(this,Cu,vm).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return dt(await Ke(this,Cu,vm).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const i=pt(r,"position");return dt(await Ke(this,Cu,vm).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:i}=await ni({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),o=A6.from(e);if(o.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(o,i).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:i}=await ni({network:this.getNetwork(),params:Ke(this,ab,U7).call(this,e,!!r)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:r,params:n}=await ni({network:this.getNetwork(),params:Ke(this,Ei,Ao).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await ni({network:this.getNetwork(),params:Ke(this,Ei,Ao).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await Ke(this,Ei,Ao).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await ni({network:this.getNetwork(),result:Ke(this,Ei,Ao).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:dt(r)}async getLogs(e){let r=this._getFilter(e);iv(r)&&(r=await r);const{network:n,params:i}=await ni({network:this.getNetwork(),params:Ke(this,Ei,Ao).call(this,{method:"getLogs",filter:r})});return i.map(o=>this._wrapLog(o,n))}_getProvider(e){Ge(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await _6.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=Zt(e);const r=T7(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await _6.getEnsAddress(this),o=await new Na(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(o==null||o===b6)return null;const f=await new Na(o,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(f)!==e?null:f}catch(n){if($o(n,"BAD_DATA")&&n.value==="0x"||$o(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const i=r??1;return i===0?this.getTransactionReceipt(e):new Promise(async(o,s)=>{let f=null;const d=async p=>{try{const b=await this.getTransactionReceipt(e);if(b!=null&&p-b.blockNumber+1>=i){o(b),f&&(clearTimeout(f),f=null);return}}catch(b){console.log("EEE",b)}this.once("block",d)};n!=null&&(f=setTimeout(()=>{f!=null&&(f=null,this.off("block",d),s(rn("timeout","TIMEOUT",{reason:"timeout"})))},n)),d(await this.getBlockNumber())})}async waitForBlock(e){Ge(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=X(this,Io).get(e);r&&(r.timer&&clearTimeout(r.timer),X(this,Io).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=C1(this,ib)._++,i=()=>{X(this,Io).delete(n),e()};if(this.paused)X(this,Io).set(n,{timer:null,func:i,time:r});else{const o=setTimeout(i,r);X(this,Io).set(n,{timer:o,func:i,time:X8()})}return n}_forEachSubscriber(e){for(const r of X(this,Hn).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new EH(e.type);case"block":{const r=new Pge(this);return r.pollingInterval=this.pollingInterval,r}case"event":return new e_(this,e.filter);case"transaction":return new Ige(this,e.hash);case"orphan":return new Cge(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of X(this,Hn).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),X(this,qn)!=null&&r.pause(X(this,qn));break}}async on(e,r){const n=await Ke(this,Hh,n2).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,X(this,qn)!=null&&n.subscriber.pause(X(this,qn))),this}async once(e,r){const n=await Ke(this,Hh,n2).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,X(this,qn)!=null&&n.subscriber.pause(X(this,qn))),this}async emit(e,...r){const n=await Ke(this,Iu,wm).call(this,e,r);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:o,once:s})=>{const f=new QF(this,s?null:o,e);try{o.call(this,...r,f)}catch{}return!s}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),X(this,Hn).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await Ke(this,Iu,wm).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of X(this,Hn).values())r+=n.length;return r}async listeners(e){if(e){const n=await Ke(this,Iu,wm).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let r=[];for(const{listeners:n}of X(this,Hn).values())r=r.concat(n.map(({listener:i})=>i));return r}async off(e,r){const n=await Ke(this,Iu,wm).call(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:o})=>o).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),X(this,Hn).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:i}=await Ke(this,Hh,n2).call(this,e);n&&i.stop(),X(this,Hn).delete(r)}else for(const[r,{started:n,subscriber:i}]of X(this,Hn))n&&i.stop(),X(this,Hn).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return X(this,Uh)}destroy(){this.removeAllListeners();for(const e of X(this,Io).keys())this._clearTimeout(e);ce(this,Uh,!0)}get paused(){return X(this,qn)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(ce(this,vf,-1),X(this,qn)!=null){if(X(this,qn)==!!e)return;Ge(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),ce(this,qn,!!e);for(const r of X(this,Io).values())r.timer&&clearTimeout(r.timer),r.time=X8()-r.time}resume(){if(X(this,qn)!=null){this._forEachSubscriber(e=>e.resume()),ce(this,qn,null);for(const e of X(this,Io).values()){let r=e.time;r<0&&(r=0),e.time=X8(),setTimeout(e.func,r)}}}}Hn=new WeakMap,Hc=new WeakMap,qn=new WeakMap,Uh=new WeakMap,Ji=new WeakMap,Pu=new WeakMap,qc=new WeakMap,vf=new WeakMap,ib=new WeakMap,Io=new WeakMap,zh=new WeakMap,jh=new WeakMap,Ei=new WeakSet,Ao=async function(e){const r=X(this,jh).cacheTimeout;if(r<0)return await this._perform(e);const n=r2(e.method,e);let i=X(this,qc).get(n);return i||(i=this._perform(e),X(this,qc).set(n,i),setTimeout(()=>{X(this,qc).get(n)===i&&X(this,qc).delete(n)},r)),await i},ob=new WeakSet,F7=async function(e,r,n){Ge(n=0&&r==="latest"&&i.to!=null&&Br(o.data,0,4)==="0x556f1830"){const s=o.data,f=await Ri(i.to,this);let d;try{d=$ge(Br(o.data,4))}catch(v){Ge(!1,v.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:s}})}Ge(d.sender.toLowerCase()===f.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:s,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:d.errorArgs}});const p=await this.ccipReadFetch(i,d.calldata,d.urls);Ge(p!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:o.data,errorArgs:d.errorArgs}});const b={to:f,data:en([d.selector,Fge([p,d.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:b});try{const v=await Ke(this,ob,F7).call(this,b,r,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},b),result:v}),v}catch(v){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},b),error:v}),v}}throw o}},sb=new WeakSet,$7=async function(e){const{value:r}=await ni({network:this.getNetwork(),value:e});return r},Cu=new WeakSet,vm=async function(e,r,n){let i=this._getAddress(r),o=this._getBlockTag(n);return(typeof i!="string"||typeof o!="string")&&([i,o]=await Promise.all([i,o])),await Ke(this,sb,$7).call(this,Ke(this,Ei,Ao).call(this,Object.assign(e,{address:i,blockTag:o})))},ab=new WeakSet,U7=async function(e,r){if(Tr(e,32))return await Ke(this,Ei,Ao).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await Ke(this,Ei,Ao).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},Iu=new WeakSet,wm=async function(e,r){let n=await Q8(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await Q8({orphan:"drop-log",log:r[0]},this)),X(this,Hn).get(n.tag)||null},Hh=new WeakSet,n2=async function(e){const r=await Q8(e,this),n=r.tag;let i=X(this,Hn).get(n);return i||(i={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},X(this,Hn).set(n,i)),i};function Nge(t,e){try{const r=z7(t,e);if(r)return HS(r)}catch{}return null}function z7(t,e){if(t==="0x")return null;try{const r=Tt(Br(t,e,e+32)),n=Tt(Br(t,r,r+32));return Br(t,r+32,r+32+n)}catch{}return null}function Pk(t){const e=oo(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function Lge(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const Dge=new Uint8Array([]);function Fge(t){const e=[];let r=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=Br(t,0,32);Ge(Br(r,0,12)===Br(Ck,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=Br(r,12);try{const n=[],i=Tt(Br(t,32,64)),o=Tt(Br(t,i,i+32)),s=Br(t,i+32);for(let f=0;fe[n]),e}function Xl(t,e){if(t.provider)return t.provider;Ge(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function Ik(t,e){let r=S6(e);if(r.to!=null&&(r.to=Ri(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),Ri(n,t)]).then(([i,o])=>(_e(i.toLowerCase()===o.toLowerCase(),"transaction from mismatch","tx.from",o),i))}else r.from=t.getAddress();return await ni(r)}class Uge{constructor(e){Oe(this,"provider");xt(this,{provider:e||null})}async getNonce(e){return Xl(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await Ik(this,e)}async populateTransaction(e){const r=Xl(this,"populateTransaction"),n=await Ik(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const s=pt(n.chainId);_e(s===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const o=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||o)?_e(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&o&&_e(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const s=await r.getFeeData();Ge(s.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=s.gasPrice)}else{const s=await r.getFeeData();if(n.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const f=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=f,n.maxPriorityFeePerGas=f}else n.maxFeePerGas==null&&(n.maxFeePerGas=s.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(Ge(!o,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=s.gasPrice),n.type=0):Ge(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else n.type===2&&(n.maxFeePerGas==null&&(n.maxFeePerGas=s.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return await ni(n)}async estimateGas(e){return Xl(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Xl(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Xl(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=Xl(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=A6.from(n);return await r.broadcastTransaction(await this.signTransaction(i))}}function zge(t){return JSON.parse(JSON.stringify(t))}var Ai,wa,Tu,Gc,Ru,qh,fb,j7,cb,H7;class AH{constructor(e){Ne(this,fb);Ne(this,cb);Ne(this,Ai,void 0);Ne(this,wa,void 0);Ne(this,Tu,void 0);Ne(this,Gc,void 0);Ne(this,Ru,void 0);Ne(this,qh,void 0);ce(this,Ai,e),ce(this,wa,null),ce(this,Tu,Ke(this,fb,j7).bind(this)),ce(this,Gc,!1),ce(this,Ru,null),ce(this,qh,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){X(this,Gc)||(ce(this,Gc,!0),Ke(this,fb,j7).call(this,-2))}stop(){X(this,Gc)&&(ce(this,Gc,!1),ce(this,qh,!0),Ke(this,cb,H7).call(this),X(this,Ai).off("block",X(this,Tu)))}pause(e){e&&Ke(this,cb,H7).call(this),X(this,Ai).off("block",X(this,Tu))}resume(){this.start()}}Ai=new WeakMap,wa=new WeakMap,Tu=new WeakMap,Gc=new WeakMap,Ru=new WeakMap,qh=new WeakMap,fb=new WeakSet,j7=async function(e){try{X(this,wa)==null&&ce(this,wa,this._subscribe(X(this,Ai)));let r=null;try{r=await X(this,wa)}catch(o){if(!$o(o,"UNSUPPORTED_OPERATION")||o.operation!=="eth_newFilter")throw o}if(r==null){ce(this,wa,null),X(this,Ai)._recoverSubscriber(this,this._recover(X(this,Ai)));return}const n=await X(this,Ai).getNetwork();if(X(this,Ru)||ce(this,Ru,n),X(this,Ru).chainId!==n.chainId)throw new Error("chaid changed");if(X(this,qh))return;const i=await X(this,Ai).send("eth_getFilterChanges",[r]);await this._emitResults(X(this,Ai),i)}catch(r){console.log("@TODO",r)}X(this,Ai).once("block",X(this,Tu))},cb=new WeakSet,H7=function(){const e=X(this,wa);e&&(ce(this,wa,null),e.then(r=>{X(this,Ai).send("eth_uninstallFilter",[r])}))};var ku;class jge extends AH{constructor(r,n){super(r);Ne(this,ku,void 0);ce(this,ku,zge(n))}_recover(r){return new e_(r,X(this,ku))}async _subscribe(r){return await r.send("eth_newFilter",[X(this,ku)])}async _emitResults(r,n){for(const i of n)r.emit(X(this,ku),r._wrapLog(i,r._network))}}ku=new WeakMap;class Hge extends AH{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const qge="bigint,boolean,function,number,string,symbol".split(/,/g);function i2(t){if(t==null||qge.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(i2);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function Gge(t){return new Promise(e=>{setTimeout(e,t)})}function ed(t){return t&&t.toLowerCase()}function Tk(t){return t&&typeof t.pollingInterval=="number"}const Vge={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class e4 extends Uge{constructor(r,n){super(r);Oe(this,"address");n=Zt(n),xt(this,{address:n})}connect(r){Ge(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(r){return await this.populateCall(r)}async sendUncheckedTransaction(r){const n=i2(r),i=[];if(n.from){const s=n.from;i.push((async()=>{const f=await Ri(s,this.provider);_e(f!=null&&f.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=f})())}else n.from=this.address;if(n.gasLimit==null&&i.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const s=n.to;i.push((async()=>{n.to=await Ri(s,this.provider)})())}i.length&&await Promise.all(i);const o=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[o])}async sendTransaction(r){const n=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(r);return await new Promise((o,s)=>{const f=[1e3,100],d=async()=>{const p=await this.provider.getTransaction(i);if(p!=null){o(p.replaceableTransaction(n));return}this.provider._setTimeout(()=>{d()},f.pop()||4e3)};d()})}async signTransaction(r){const n=i2(r);if(n.from){const o=await Ri(n.from,this.provider);_e(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=o}else n.from=this.address;const i=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[i])}async signMessage(r){const n=typeof r=="string"?Bf(r):r;return await this.provider.send("personal_sign",[dt(n),this.address.toLowerCase()])}async signTypedData(r,n,i){const o=i2(i),s=await sk.resolveNames(r,n,o,async f=>{const d=await Ri(f);return _e(d!=null,"TypedData does not support null address","value",f),d});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(sk.getPayload(s.domain,n,s.value))])}async unlock(r){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),r,null])}async _legacySignMessage(r){const n=typeof r=="string"?Bf(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),dt(n)])}}var Bu,Gh,wf,xa,_s,xf,ub,q7;class Kge extends Oge{constructor(r,n){super(r,n);Ne(this,ub);Ne(this,Bu,void 0);Ne(this,Gh,void 0);Ne(this,wf,void 0);Ne(this,xa,void 0);Ne(this,_s,void 0);Ne(this,xf,void 0);ce(this,Gh,1),ce(this,Bu,Object.assign({},Vge,n||{})),ce(this,wf,[]),ce(this,xa,null),ce(this,xf,null);{let o=null;const s=new Promise(f=>{o=f});ce(this,_s,{promise:s,resolve:o})}const i=this._getOption("staticNetwork");i&&(_e(r==null||i.matches(r),"staticNetwork MUST match network object","options",n),ce(this,xf,i))}_getOption(r){return X(this,Bu)[r]}get _network(){return Ge(X(this,xf),"network is not available yet","NETWORK_ERROR"),X(this,xf)}async _perform(r){if(r.method==="call"||r.method==="estimateGas"){let i=r.transaction;if(i&&i.type!=null&&pt(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=await this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(r=Object.assign({},r,{transaction:Object.assign({},i,{type:void 0})}))}}const n=this.getRpcRequest(r);return n!=null?await this.send(n.method,n.args):super._perform(r)}async _detectNetwork(){const r=this._getOption("staticNetwork");if(r)return r;if(this.ready)return If.from(pt(await this.send("eth_chainId",[])));const n={id:C1(this,Gh)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let i;try{i=(await this._send(n))[0]}catch(o){throw this.emit("debug",{action:"receiveRpcError",error:o}),o}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return If.from(pt(i.result));throw this.getRpcError(n,i)}_start(){X(this,_s)==null||X(this,_s).resolve==null||(X(this,_s).resolve(),ce(this,_s,null),(async()=>{for(;X(this,xf)==null&&!this.destroyed;)try{ce(this,xf,await this._detectNetwork())}catch(r){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",rn("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:r}})),await Gge(1e3)}Ke(this,ub,q7).call(this)})())}async _waitUntilReady(){if(X(this,_s)!=null)return await X(this,_s).promise}_getSubscriber(r){return r.type==="pending"?new Hge(this):r.type==="event"?this._getOption("polling")?new e_(this,r.filter):new jge(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new EH("orphan"):super._getSubscriber(r)}get ready(){return X(this,_s)==null}getRpcTransaction(r){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(r[i]==null)return;let o=i;i==="gasLimit"&&(o="gas"),n[o]=Pd(pt(r[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{r[i]!=null&&(n[i]=dt(r[i]))}),r.accessList&&(n.accessList=Il(r.accessList)),n}getRpcRequest(r){switch(r.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getBalance":return{method:"eth_getBalance",args:[ed(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[ed(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[ed(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[ed(r.address),"0x"+r.position.toString(16),r.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[r.signedTransaction]};case"getBlock":if("blockTag"in r)return{method:"eth_getBlockByNumber",args:[r.blockTag,!!r.includeTransactions]};if("blockHash"in r)return{method:"eth_getBlockByHash",args:[r.blockHash,!!r.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[r.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[r.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(r.transaction),r.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(r.transaction)]};case"getLogs":return r.filter&&r.filter.address!=null&&(Array.isArray(r.filter.address)?r.filter.address=r.filter.address.map(ed):r.filter.address=ed(r.filter.address)),{method:"eth_getLogs",args:[r.filter]}}return null}getRpcError(r,n){const{method:i}=r,{error:o}=n;if(i==="eth_estimateGas"&&o.message){const d=o.message;if(!d.match(/revert/i)&&d.match(/insufficient funds/i))return rn("insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.params[0],info:{payload:r,error:o}})}if(i==="eth_call"||i==="eth_estimateGas"){const d=G7(o),p=Ig.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",r.params[0],d?d.data:null);return p.info={error:o,payload:r},p}const s=JSON.stringify(Wge(o));if(typeof o.message=="string"&&o.message.match(/user denied|ethers-user-denied/i))return rn("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:r,error:o}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const d=r.params[0];if(s.match(/insufficient funds|base fee exceeds gas limit/i))return rn("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:d,info:{error:o}});if(s.match(/nonce/i)&&s.match(/too low/i))return rn("nonce has already been used","NONCE_EXPIRED",{transaction:d,info:{error:o}});if(s.match(/replacement transaction/i)&&s.match(/underpriced/i))return rn("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:d,info:{error:o}});if(s.match(/only replay-protected/i))return rn("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:d,info:{error:o}}})}let f=!!s.match(/the method .* does not exist/i);return f||o&&o.details&&o.details.startsWith("Unauthorized method:")&&(f=!0),f?rn("unsupported operation","UNSUPPORTED_OPERATION",{operation:r.method,info:{error:o,payload:r}}):rn("could not coalesce error","UNKNOWN_ERROR",{error:o,payload:r})}send(r,n){if(this.destroyed)return Promise.reject(rn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r}));const i=C1(this,Gh)._++,o=new Promise((s,f)=>{X(this,wf).push({resolve:s,reject:f,payload:{method:r,params:n,id:i,jsonrpc:"2.0"}})});return Ke(this,ub,q7).call(this),o}async getSigner(r){r==null&&(r=0);const n=this.send("eth_accounts",[]);if(typeof r=="number"){const o=await n;if(r>=o.length)throw new Error("no such account");return new e4(this,o[r])}const{accounts:i}=await ni({network:this.getNetwork(),accounts:n});r=Zt(r);for(const o of i)if(Zt(o)===r)return new e4(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new e4(this,n))}destroy(){X(this,xa)&&(clearTimeout(X(this,xa)),ce(this,xa,null));for(const{payload:r,reject:n}of X(this,wf))n(rn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));ce(this,wf,[]),super.destroy()}}Bu=new WeakMap,Gh=new WeakMap,wf=new WeakMap,xa=new WeakMap,_s=new WeakMap,xf=new WeakMap,ub=new WeakSet,q7=function(){if(X(this,xa))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");ce(this,xa,setTimeout(()=>{ce(this,xa,null);const n=X(this,wf);for(ce(this,wf,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==X(this,Bu).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(s=>s.payload)).length>X(this,Bu).batchMaxSize){n.unshift(i.pop());break}(async()=>{const o=i.length===1?i[0].payload:i.map(s=>s.payload);this.emit("debug",{action:"sendRpcPayload",payload:o});try{const s=await this._send(o);this.emit("debug",{action:"receiveRpcResult",result:s});for(const{resolve:f,reject:d,payload:p}of i){if(this.destroyed){d(rn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:p.method}));continue}const b=s.filter(v=>v.id===p.id)[0];if(b==null){const v=rn("missing response for request","BAD_DATA",{value:s,info:{payload:p}});this.emit("error",v),d(v);continue}if("error"in b){d(this.getRpcError(p,b));continue}f(b.result)}}catch(s){this.emit("debug",{action:"receiveRpcError",error:s});for(const{reject:f}of i)f(s)}})()}},r))};var Vc;class SH extends Kge{constructor(r,n){super(r,n);Ne(this,Vc,void 0);ce(this,Vc,4e3)}_getSubscriber(r){const n=super._getSubscriber(r);return Tk(n)&&(n.pollingInterval=X(this,Vc)),n}get pollingInterval(){return X(this,Vc)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");ce(this,Vc,r),this._forEachSubscriber(n=>{Tk(n)&&(n.pollingInterval=X(this,Vc))})}}Vc=new WeakMap;var Vh;class MH extends SH{constructor(r,n,i){r==null&&(r="http://localhost:8545");super(n,i);Ne(this,Vh,void 0);typeof r=="string"?ce(this,Vh,new qf(r)):ce(this,Vh,r.clone())}_getConnection(){return X(this,Vh).clone()}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){const n=this._getConnection();n.body=JSON.stringify(r),n.setHeader("content-type","application/json");const i=await n.send();i.assertOk();let o=i.bodyJson;return Array.isArray(o)||(o=[o]),o}}Vh=new WeakMap;function G7(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&Tr(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=G7(t[e]);if(r)return r}return null}if(typeof t=="string")try{return G7(JSON.parse(t))}catch{}return null}function V7(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)V7(t[r],e);if(typeof t=="string")try{return V7(JSON.parse(t),e)}catch{}}}function Wge(t){const e=[];return V7(t,e),e}var Kh;class Jge extends SH{constructor(r,n){super(n,{batchMaxCount:1});Ne(this,Kh,void 0);ce(this,Kh,async(i,o)=>{const s={method:i,params:o};this.emit("debug",{action:"sendEip1193Request",payload:s});try{const f=await r.request(s);return this.emit("debug",{action:"receiveEip1193Result",result:f}),f}catch(f){const d=new Error(f.message);throw d.code=f.code,d.data=f.data,d.payload=s,this.emit("debug",{action:"receiveEip1193Error",error:d}),d}})}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){_e(!Array.isArray(r),"EIP-1193 does not support batch request","payload",r);try{const n=await X(this,Kh).call(this,r.method,r.params||[]);return[{id:r.id,result:n}]}catch(n){return[{id:r.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(r,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(r,n)}async hasSigner(r){r==null&&(r=0);const n=await this.send("eth_accounts",[]);return typeof r=="number"?n.length>r:(r=r.toLowerCase(),n.filter(i=>i.toLowerCase()===r).length!==0)}async getSigner(r){if(r==null&&(r=0),!await this.hasSigner(r))try{await X(this,Kh).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(r)}}Kh=new WeakMap;var _H={},P6={},PH={},Yb={},Qb={};const Zge="@safe-global/safe-apps-sdk",Yge="8.0.0",Qge="SDK developed to integrate third-party apps with Safe app.",Xge="dist/src/index.js",ebe="dist/src/index.d.ts",tbe=["dist/**/*","src/**/*","CHANGELOG.md","README.md"],rbe=["Safe","sdk","apps"],nbe={test:"jest","format-dist":`sed -i 's/"files":/"_files":/' dist/package.json`,build:"yarn rimraf dist && tsc && yarn format-dist"},ibe="Safe (https://safe.global)",obe="MIT",sbe={"@safe-global/safe-gateway-typescript-sdk":"^3.5.3",viem:"^1.0.0"},abe={rimraf:"^3.0.2"},fbe={type:"git",url:"git+https://github.com/safe-global/safe-apps-sdk.git"},cbe={url:"https://github.com/safe-global/safe-apps-sdk/issues"},ube="https://github.com/safe-global/safe-apps-sdk#readme",lbe={access:"public"},dbe={name:Zge,version:Yge,description:Qge,main:Xge,typings:ebe,_files:tbe,keywords:rbe,scripts:nbe,author:ibe,license:obe,dependencies:sbe,devDependencies:abe,repository:fbe,bugs:cbe,homepage:ube,publishConfig:lbe};var hbe=et&&et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qb,"__esModule",{value:!0});Qb.getSDKVersion=void 0;const pbe=hbe(dbe),mbe=()=>pbe.default.version.split("-")[0];Qb.getSDKVersion=mbe;var rx={};Object.defineProperty(rx,"__esModule",{value:!0});rx.generateRequestId=void 0;const gbe=t=>t.toString(16).padStart(2,"0"),bbe=t=>{const e=new Uint8Array((t||40)/2);return window.crypto.getRandomValues(e),Array.from(e,gbe).join("")},ybe=()=>typeof window<"u"?bbe(10):new Date().getTime().toString(36);rx.generateRequestId=ybe;Object.defineProperty(Yb,"__esModule",{value:!0});Yb.MessageFormatter=void 0;const vbe=Qb,wbe=rx;class nx{}Yb.MessageFormatter=nx;nx.makeRequest=(t,e)=>({id:(0,wbe.generateRequestId)(),method:t,params:e,env:{sdkVersion:(0,vbe.getSDKVersion)()}});nx.makeResponse=(t,e,r)=>({id:t,success:!0,version:r,data:e});nx.makeErrorResponse=(t,e,r)=>({id:t,success:!1,error:e,version:r});var Tl={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RestrictedMethods=t.Methods=void 0,function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"}(t.Methods||(t.Methods={})),function(e){e.requestAddressBook="requestAddressBook"}(t.RestrictedMethods||(t.RestrictedMethods={}))})(Tl);(function(t){var e=et&&et.__createBinding||(Object.create?function(o,s,f,d){d===void 0&&(d=f);var p=Object.getOwnPropertyDescriptor(s,f);(!p||("get"in p?!s.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return s[f]}}),Object.defineProperty(o,d,p)}:function(o,s,f,d){d===void 0&&(d=f),o[d]=s[f]}),r=et&&et.__exportStar||function(o,s){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(s,f)&&e(s,o,f)};Object.defineProperty(t,"__esModule",{value:!0});const n=Yb;class i{constructor(s=null,f=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:d,data:p,source:b})=>{const v=!p,A=!this.isServer&&b===window.parent,S=(typeof p.version<"u"&&parseInt(p.version.split(".")[0]))>=1;let P=!0;return Array.isArray(this.allowedOrigins)&&(P=this.allowedOrigins.find(I=>I.test(d))!==void 0),!v&&A&&S&&P},this.logIncomingMessage=d=>{console.info(`Safe Apps SDK v1: A message was received from origin ${d.origin}. `,d.data)},this.onParentMessage=d=>{this.isValidMessage(d)&&(this.debugMode&&this.logIncomingMessage(d),this.handleIncomingMessage(d.data))},this.handleIncomingMessage=d=>{const{id:p}=d,b=this.callbacks.get(p);b&&(b(d),this.callbacks.delete(p))},this.send=(d,p)=>{const b=n.MessageFormatter.makeRequest(d,p);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(b,"*"),new Promise((v,A)=>{this.callbacks.set(b.id,_=>{if(!_.success){A(new Error(_.error));return}v(_)})})},this.allowedOrigins=s,this.debugMode=f,this.isServer||window.addEventListener("message",this.onParentMessage)}}t.default=i,r(Tl,t)})(PH);var ix={},ox={},sx={};Object.defineProperty(sx,"__esModule",{value:!0});sx.isObjectEIP712TypedData=void 0;const xbe=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;sx.isObjectEIP712TypedData=xbe;var CH={};Object.defineProperty(CH,"__esModule",{value:!0});var IH={},TH={},Mp={},u0={},K7={exports:{}};(function(t,e){var r=typeof self<"u"?self:et,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(s){var f={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function d(l){return l&&DataView.prototype.isPrototypeOf(l)}if(f.arrayBuffer)var p=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(l){return l&&p.indexOf(Object.prototype.toString.call(l))>-1};function v(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(l))throw new TypeError("Invalid character in header field name");return l.toLowerCase()}function A(l){return typeof l!="string"&&(l=String(l)),l}function _(l){var h={next:function(){var m=l.shift();return{done:m===void 0,value:m}}};return f.iterable&&(h[Symbol.iterator]=function(){return h}),h}function S(l){this.map={},l instanceof S?l.forEach(function(h,m){this.append(m,h)},this):Array.isArray(l)?l.forEach(function(h){this.append(h[0],h[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(h){this.append(h,l[h])},this)}S.prototype.append=function(l,h){l=v(l),h=A(h);var m=this.map[l];this.map[l]=m?m+", "+h:h},S.prototype.delete=function(l){delete this.map[v(l)]},S.prototype.get=function(l){return l=v(l),this.has(l)?this.map[l]:null},S.prototype.has=function(l){return this.map.hasOwnProperty(v(l))},S.prototype.set=function(l,h){this.map[v(l)]=A(h)},S.prototype.forEach=function(l,h){for(var m in this.map)this.map.hasOwnProperty(m)&&l.call(h,this.map[m],m,this)},S.prototype.keys=function(){var l=[];return this.forEach(function(h,m){l.push(m)}),_(l)},S.prototype.values=function(){var l=[];return this.forEach(function(h){l.push(h)}),_(l)},S.prototype.entries=function(){var l=[];return this.forEach(function(h,m){l.push([m,h])}),_(l)},f.iterable&&(S.prototype[Symbol.iterator]=S.prototype.entries);function P(l){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}function I(l){return new Promise(function(h,m){l.onload=function(){h(l.result)},l.onerror=function(){m(l.error)}})}function C(l){var h=new FileReader,m=I(h);return h.readAsArrayBuffer(l),m}function T(l){var h=new FileReader,m=I(h);return h.readAsText(l),m}function O(l){for(var h=new Uint8Array(l),m=new Array(h.length),w=0;w-1?h:l}function Y(l,h){h=h||{};var m=h.body;if(l instanceof Y){if(l.bodyUsed)throw new TypeError("Already read");this.url=l.url,this.credentials=l.credentials,h.headers||(this.headers=new S(l.headers)),this.method=l.method,this.mode=l.mode,this.signal=l.signal,!m&&l._bodyInit!=null&&(m=l._bodyInit,l.bodyUsed=!0)}else this.url=String(l);if(this.credentials=h.credentials||this.credentials||"same-origin",(h.headers||!this.headers)&&(this.headers=new S(h.headers)),this.method=K(h.method||this.method||"GET"),this.mode=h.mode||this.mode||null,this.signal=h.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&m)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(m)}Y.prototype.clone=function(){return new Y(this,{body:this._bodyInit})};function W(l){var h=new FormData;return l.trim().split("&").forEach(function(m){if(m){var w=m.split("="),E=w.shift().replace(/\+/g," "),y=w.join("=").replace(/\+/g," ");h.append(decodeURIComponent(E),decodeURIComponent(y))}}),h}function ie(l){var h=new S,m=l.replace(/\r?\n[\t ]+/g," ");return m.split(/\r?\n/).forEach(function(w){var E=w.split(":"),y=E.shift().trim();if(y){var c=E.join(":").trim();h.append(y,c)}}),h}D.call(Y.prototype);function x(l,h){h||(h={}),this.type="default",this.status=h.status===void 0?200:h.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in h?h.statusText:"OK",this.headers=new S(h.headers),this.url=h.url||"",this._initBody(l)}D.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new S(this.headers),url:this.url})},x.error=function(){var l=new x(null,{status:0,statusText:""});return l.type="error",l};var a=[301,302,303,307,308];x.redirect=function(l,h){if(a.indexOf(h)===-1)throw new RangeError("Invalid status code");return new x(null,{status:h,headers:{location:l}})},s.DOMException=o.DOMException;try{new s.DOMException}catch{s.DOMException=function(h,m){this.message=h,this.name=m;var w=Error(h);this.stack=w.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function u(l,h){return new Promise(function(m,w){var E=new Y(l,h);if(E.signal&&E.signal.aborted)return w(new s.DOMException("Aborted","AbortError"));var y=new XMLHttpRequest;function c(){y.abort()}y.onload=function(){var g={status:y.status,statusText:y.statusText,headers:ie(y.getAllResponseHeaders()||"")};g.url="responseURL"in y?y.responseURL:g.headers.get("X-Request-URL");var M="response"in y?y.response:y.responseText;m(new x(M,g))},y.onerror=function(){w(new TypeError("Network request failed"))},y.ontimeout=function(){w(new TypeError("Network request failed"))},y.onabort=function(){w(new s.DOMException("Aborted","AbortError"))},y.open(E.method,E.url,!0),E.credentials==="include"?y.withCredentials=!0:E.credentials==="omit"&&(y.withCredentials=!1),"responseType"in y&&f.blob&&(y.responseType="blob"),E.headers.forEach(function(g,M){y.setRequestHeader(M,g)}),E.signal&&(E.signal.addEventListener("abort",c),y.onreadystatechange=function(){y.readyState===4&&E.signal.removeEventListener("abort",c)}),y.send(typeof E._bodyInit>"u"?null:E._bodyInit)})}return u.polyfill=!0,o.fetch||(o.fetch=u,o.Headers=S,o.Request=Y,o.Response=x),s.Headers=S,s.Request=Y,s.Response=x,s.fetch=u,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(K7,K7.exports);var Ebe=K7.exports,Abe=et&&et.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})},Sbe=et&&et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(u0,"__esModule",{value:!0});u0.fetchData=u0.stringifyQuery=u0.insertParams=void 0;const Mbe=Sbe(Ebe),_be=t=>typeof t=="object"&&t!==null&&"code"in t&&"message"in t;function Pbe(t,e,r){return t.replace(new RegExp(`\\{${e}\\}`,"g"),r)}function Cbe(t,e){return e?Object.keys(e).reduce((r,n)=>Pbe(r,n,String(e[n])),t):t}u0.insertParams=Cbe;function Ibe(t){if(!t)return"";const e=new URLSearchParams;Object.keys(t).forEach(n=>{t[n]!=null&&e.append(n,String(t[n]))});const r=e.toString();return r?`?${r}`:""}u0.stringifyQuery=Ibe;function Tbe(t,e){return Abe(this,void 0,void 0,function*(){let r;e!=null&&(r={method:"POST",body:typeof e=="string"?e:JSON.stringify(e),headers:{"Content-Type":"application/json"}});const n=yield(0,Mbe.default)(t,r);let i;try{i=yield n.json()}catch{if(n.headers&&n.headers.get("content-length")!=="0")throw new Error(`Invalid response content: ${n.statusText}`)}if(!n.ok){const o=_be(i)?`${i.code}: ${i.message}`:n.statusText;throw new Error(o)}return i})}u0.fetchData=Tbe;Object.defineProperty(Mp,"__esModule",{value:!0});Mp.getEndpoint=Mp.postEndpoint=void 0;const Rg=u0;function RH(t,e,r,n){const i=(0,Rg.insertParams)(e,r),o=(0,Rg.stringifyQuery)(n);return`${t}${i}${o}`}function Rbe(t,e,r){const n=RH(t,e,r==null?void 0:r.path,r==null?void 0:r.query);return(0,Rg.fetchData)(n,r==null?void 0:r.body)}Mp.postEndpoint=Rbe;function kbe(t,e,r,n){if(n)return(0,Rg.fetchData)(n);const i=RH(t,e,r==null?void 0:r.path,r==null?void 0:r.query);return(0,Rg.fetchData)(i)}Mp.getEndpoint=kbe;var ax={};Object.defineProperty(ax,"__esModule",{value:!0});ax.DEFAULT_BASE_URL=void 0;ax.DEFAULT_BASE_URL="https://safe-client.safe.global";var kH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationVersionState=void 0,function(e){e.UP_TO_DATE="UP_TO_DATE",e.OUTDATED="OUTDATED",e.UNKNOWN="UNKNOWN"}(t.ImplementationVersionState||(t.ImplementationVersionState={}))})(kH);var BH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppSocialPlatforms=t.SafeAppFeatures=t.SafeAppAccessPolicyTypes=void 0,function(e){e.NoRestrictions="NO_RESTRICTIONS",e.DomainAllowlist="DOMAIN_ALLOWLIST"}(t.SafeAppAccessPolicyTypes||(t.SafeAppAccessPolicyTypes={})),function(e){e.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(t.SafeAppFeatures||(t.SafeAppFeatures={})),function(e){e.TWITTER="TWITTER",e.GITHUB="GITHUB",e.DISCORD="DISCORD"}(t.SafeAppSocialPlatforms||(t.SafeAppSocialPlatforms={}))})(BH);var OH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LabelValue=t.DetailedExecutionInfoType=t.TransactionListItemType=t.ConflictType=t.TransactionInfoType=t.SettingsInfoType=t.TransactionTokenType=t.TransferDirection=t.TransactionStatus=t.Operation=void 0,function(e){e[e.CALL=0]="CALL",e[e.DELEGATE=1]="DELEGATE"}(t.Operation||(t.Operation={})),function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS"}(t.TransactionStatus||(t.TransactionStatus={})),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(t.TransferDirection||(t.TransferDirection={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(t.TransactionTokenType||(t.TransactionTokenType={})),function(e){e.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",e.ADD_OWNER="ADD_OWNER",e.REMOVE_OWNER="REMOVE_OWNER",e.SWAP_OWNER="SWAP_OWNER",e.CHANGE_THRESHOLD="CHANGE_THRESHOLD",e.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",e.ENABLE_MODULE="ENABLE_MODULE",e.DISABLE_MODULE="DISABLE_MODULE",e.SET_GUARD="SET_GUARD",e.DELETE_GUARD="DELETE_GUARD"}(t.SettingsInfoType||(t.SettingsInfoType={})),function(e){e.TRANSFER="Transfer",e.SETTINGS_CHANGE="SettingsChange",e.CUSTOM="Custom",e.CREATION="Creation"}(t.TransactionInfoType||(t.TransactionInfoType={})),function(e){e.NONE="None",e.HAS_NEXT="HasNext",e.END="End"}(t.ConflictType||(t.ConflictType={})),function(e){e.TRANSACTION="TRANSACTION",e.LABEL="LABEL",e.CONFLICT_HEADER="CONFLICT_HEADER",e.DATE_LABEL="DATE_LABEL"}(t.TransactionListItemType||(t.TransactionListItemType={})),function(e){e.MULTISIG="MULTISIG",e.MODULE="MODULE"}(t.DetailedExecutionInfoType||(t.DetailedExecutionInfoType={})),function(e){e.Queued="Queued",e.Next="Next"}(t.LabelValue||(t.LabelValue={}))})(OH);var NH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.FEATURES=t.GAS_PRICE_TYPE=t.RPC_AUTHENTICATION=void 0,function(e){e.API_KEY_PATH="API_KEY_PATH",e.NO_AUTHENTICATION="NO_AUTHENTICATION",e.UNKNOWN="UNKNOWN"}(t.RPC_AUTHENTICATION||(t.RPC_AUTHENTICATION={})),function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.UNKNOWN="UNKNOWN"}(t.GAS_PRICE_TYPE||(t.GAS_PRICE_TYPE={})),function(e){e.ERC721="ERC721",e.SAFE_APPS="SAFE_APPS",e.CONTRACT_INTERACTION="CONTRACT_INTERACTION",e.DOMAIN_LOOKUP="DOMAIN_LOOKUP",e.SPENDING_LIMIT="SPENDING_LIMIT",e.EIP1559="EIP1559",e.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",e.TX_SIMULATION="TX_SIMULATION",e.EIP1271="EIP1271"}(t.FEATURES||(t.FEATURES={}))})(NH);var LH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenType=void 0,function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_TOKEN="NATIVE_TOKEN"}(t.TokenType||(t.TokenType={}))})(LH);var DH={};Object.defineProperty(DH,"__esModule",{value:!0});var FH={};Object.defineProperty(FH,"__esModule",{value:!0});var $H={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SafeMessageStatus=t.SafeMessageListItemType=void 0,function(e){e.DATE_LABEL="DATE_LABEL",e.MESSAGE="MESSAGE"}(t.SafeMessageListItemType||(t.SafeMessageListItemType={})),function(e){e.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",e.CONFIRMED="CONFIRMED"}(t.SafeMessageStatus||(t.SafeMessageStatus={}))})($H);(function(t){var e=et&&et.__createBinding||(Object.create?function(l,h,m,w){w===void 0&&(w=m);var E=Object.getOwnPropertyDescriptor(h,m);(!E||("get"in E?!h.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(l,w,E)}:function(l,h,m,w){w===void 0&&(w=m),l[w]=h[m]}),r=et&&et.__exportStar||function(l,h){for(var m in l)m!=="default"&&!Object.prototype.hasOwnProperty.call(h,m)&&e(h,l,m)};Object.defineProperty(t,"__esModule",{value:!0}),t.confirmSafeMessage=t.proposeSafeMessage=t.getSafeMessage=t.getSafeMessages=t.getDecodedData=t.getMasterCopies=t.getSafeApps=t.getChainConfig=t.getChainsConfig=t.proposeTransaction=t.postSafeGasEstimation=t.getTransactionDetails=t.getTransactionQueue=t.getTransactionHistory=t.getCollectiblesPage=t.getCollectibles=t.getOwnedSafes=t.getFiatCurrencies=t.getBalances=t.getMultisigTransactions=t.getModuleTransactions=t.getIncomingTransfers=t.getSafeInfo=t.setBaseUrl=void 0;const n=Mp,i=ax;r(kH,t),r(BH,t),r(OH,t),r(NH,t),r(LH,t),r(DH,t),r(FH,t),r($H,t);let o=i.DEFAULT_BASE_URL;const s=l=>{o=l};t.setBaseUrl=s;function f(l,h){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:l,address:h}})}t.getSafeInfo=f;function d(l,h,m,w){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:l,address:h},query:m},w)}t.getIncomingTransfers=d;function p(l,h,m,w){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:l,address:h},query:m},w)}t.getModuleTransactions=p;function b(l,h,m,w){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:l,address:h},query:m},w)}t.getMultisigTransactions=b;function v(l,h,m="usd",w={}){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:l,address:h,currency:m},query:w})}t.getBalances=v;function A(){return(0,n.getEndpoint)(o,"/v1/balances/supported-fiat-codes")}t.getFiatCurrencies=A;function _(l,h){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:l,address:h}})}t.getOwnedSafes=_;function S(l,h,m={}){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:l,address:h},query:m})}t.getCollectibles=S;function P(l,h,m={},w){return(0,n.getEndpoint)(o,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:l,address:h},query:m},w)}t.getCollectiblesPage=P;function I(l,h,m){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:l,safe_address:h},query:{}},m)}t.getTransactionHistory=I;function C(l,h,m,w){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:l,safe_address:h},query:{trusted:w}},m)}t.getTransactionQueue=C;function T(l,h){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:l,transactionId:h}})}t.getTransactionDetails=T;function O(l,h,m){return(0,n.postEndpoint)(o,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:l,safe_address:h},body:m})}t.postSafeGasEstimation=O;function B(l,h,m){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:l,safe_address:h},body:m})}t.proposeTransaction=B;function D(l){return(0,n.getEndpoint)(o,"/v1/chains",{query:l})}t.getChainsConfig=D;function U(l){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}",{path:{chainId:l}})}t.getChainConfig=U;function K(l,h={}){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safe-apps",{path:{chainId:l},query:h})}t.getSafeApps=K;function Y(l){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:l}})}t.getMasterCopies=Y;function W(l,h){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/data-decoder",{path:{chainId:l},body:{data:h}})}t.getDecodedData=W;function ie(l,h,m){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:l,safe_address:h},query:{}},m)}t.getSafeMessages=ie;function x(l,h){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:l,message_hash:h}})}t.getSafeMessage=x;function a(l,h,m){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:l,safe_address:h},body:m})}t.proposeSafeMessage=a;function u(l,h,m){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:l,message_hash:h},body:m})}t.confirmSafeMessage=u})(TH);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TransferDirection=t.TransactionStatus=t.TokenType=t.Operation=void 0;var e=TH;Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return e.Operation}}),Object.defineProperty(t,"TokenType",{enumerable:!0,get:function(){return e.TokenType}}),Object.defineProperty(t,"TransactionStatus",{enumerable:!0,get:function(){return e.TransactionStatus}}),Object.defineProperty(t,"TransferDirection",{enumerable:!0,get:function(){return e.TransferDirection}})})(IH);var UH={};Object.defineProperty(UH,"__esModule",{value:!0});(function(t){var e=et&&et.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var f=Object.getOwnPropertyDescriptor(i,o);(!f||("get"in f?!i.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,f)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=et&&et.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(sx,t),r(CH,t),r(IH,t),r(UH,t)})(ox);Object.defineProperty(ix,"__esModule",{value:!0});ix.TXs=void 0;const ov=Tl,Bbe=ox;class Obe{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(ov.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const r={message:e};return(await this.communicator.send(ov.Methods.signMessage,r)).data}async signTypedMessage(e){if(!(0,Bbe.isObjectEIP712TypedData)(e))throw new Error("Invalid typed data");return(await this.communicator.send(ov.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:r}){if(!e||!e.length)throw new Error("No transactions were passed");const n={txs:e,params:r};return(await this.communicator.send(ov.Methods.sendTransactions,n)).data}}ix.TXs=Obe;var fx={},Xb={};Object.defineProperty(Xb,"__esModule",{value:!0});Xb.RPC_CALLS=void 0;Xb.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"};Object.defineProperty(fx,"__esModule",{value:!0});fx.Eth=void 0;const Hi=Xb,Nbe=Tl,Za={defaultBlockParam:(t="latest")=>t,returnFullTxObjectParam:(t=!1)=>t,blockNumberToHex:t=>Number.isInteger(t)?`0x${t.toString(16)}`:t};class Lbe{constructor(e){this.communicator=e,this.call=this.buildRequest({call:Hi.RPC_CALLS.eth_call,formatters:[null,Za.defaultBlockParam]}),this.getBalance=this.buildRequest({call:Hi.RPC_CALLS.eth_getBalance,formatters:[null,Za.defaultBlockParam]}),this.getCode=this.buildRequest({call:Hi.RPC_CALLS.eth_getCode,formatters:[null,Za.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:Hi.RPC_CALLS.eth_getStorageAt,formatters:[null,Za.blockNumberToHex,Za.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:Hi.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:Hi.RPC_CALLS.eth_getBlockByHash,formatters:[null,Za.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:Hi.RPC_CALLS.eth_getBlockByNumber,formatters:[Za.blockNumberToHex,Za.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:Hi.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:Hi.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:Hi.RPC_CALLS.eth_getTransactionCount,formatters:[null,Za.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:Hi.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=r=>this.buildRequest({call:Hi.RPC_CALLS.eth_estimateGas})([r]),this.setSafeSettings=this.buildRequest({call:Hi.RPC_CALLS.safe_setSettings})}buildRequest(e){const{call:r,formatters:n}=e;return async i=>{n&&Array.isArray(i)&&n.forEach((f,d)=>{f&&(i[d]=f(i[d]))});const o={call:r,params:i||[]};return(await this.communicator.send(Nbe.Methods.rpcCall,o)).data}}}fx.Eth=Lbe;var cx={};const Dbe="0.9.8";let yi=class W7 extends Error{constructor(e,r={}){var s;const n=r.cause instanceof W7?r.cause.details:(s=r.cause)!=null&&s.message?r.cause.message:r.details,i=r.cause instanceof W7&&r.cause.docsPath||r.docsPath,o=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${Dbe}`].join(` -`);super(o),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}};function j0(t,e){const r=t.exec(e);return r==null?void 0:r.groups}const zH=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,jH=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,HH=/^\(.+?\).*?$/,Rk=/^tuple(?(\[(\d*)\])*)$/;function J7(t){let e=t.type;if(Rk.test(t.type)&&"components"in t){e="(";const r=t.components.length;for(let i=0;i[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function $be(t){return qH.test(t)}function Ube(t){return j0(qH,t)}const GH=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function zbe(t){return GH.test(t)}function jbe(t){return j0(GH,t)}const VH=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;function Hbe(t){return VH.test(t)}function qbe(t){return j0(VH,t)}const KH=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;function ey(t){return KH.test(t)}function Gbe(t){return j0(KH,t)}const WH=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;function Vbe(t){return WH.test(t)}function Kbe(t){return j0(WH,t)}const Wbe=/^fallback\(\)$/;function Jbe(t){return Wbe.test(t)}const Zbe=/^receive\(\) external payable$/;function Ybe(t){return Zbe.test(t)}const C6=new Set(["memory","indexed","storage","calldata"]),Qbe=new Set(["indexed"]),Z7=new Set(["calldata","memory","storage"]);class JH extends yi{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class ZH extends yi{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class Xbe extends yi{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class YH extends yi{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}class QH extends yi{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class XH extends yi{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class eq extends yi{constructor({param:e,name:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class tq extends yi{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class rq extends yi{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class nq extends yi{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class Rd extends yi{constructor({signature:e,type:r}){super(`Invalid ${r} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class iq extends yi{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class oq extends yi{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class sq extends yi{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class aq extends yi{constructor({current:e,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function eye(t,e){return e?`${e}:${t}`:t}const t4=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Y7(t,e={}){if(Hbe(t)){const r=qbe(t);if(!r)throw new Rd({signature:t,type:"function"});const n=ro(r.parameters),i=[],o=n.length;for(let f=0;f[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,rye=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,nye=/^u?int$/;function ks(t,e){var v,A;const r=eye(t,e==null?void 0:e.type);if(t4.has(r))return t4.get(r);const n=HH.test(t),i=j0(n?rye:tye,t);if(!i)throw new XH({param:t});if(i.name&&oye(i.name))throw new eq({param:t,name:i.name});const o=i.name?{name:i.name}:{},s=i.modifier==="indexed"?{indexed:!0}:{},f=(e==null?void 0:e.structs)??{};let d,p={};if(n){d="tuple";const _=ro(i.type),S=[],P=_.length;for(let I=0;I[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function cq(t,e,r=new Set){const n=[],i=t.length;for(let o=0;o{var i;return((i=t[e.name||r])==null?void 0:i.call(t,n))??e(t,n)}}function Qs(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new wq(t.type);return`${t.name}(${lx(t.inputs,{includeName:e})})`}function lx(t,{includeName:e=!1}={}){return t?t.map(r=>dye(r,{includeName:e})).join(e?", ":","):""}function dye(t,{includeName:e}){return t.type.startsWith("tuple")?`(${lx(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}function jt(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function Wr(t){return jt(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const hye="1.19.12",pye=t=>t,p1=t=>t,mye=()=>`viem@${hye}`;class qe extends Error{constructor(e,r={}){var o;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:mye()});const n=r.cause instanceof qe?r.cause.details:(o=r.cause)!=null&&o.message?r.cause.message:r.details,i=r.cause instanceof qe&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` + `)+" "+L[1]:L[0]+B+" "+M.join(", ")+" "+L[1]}t.types=B$;function I(M){return Array.isArray(M)}t.isArray=I;function C(M){return typeof M=="boolean"}t.isBoolean=C;function T(M){return M===null}t.isNull=T;function k(M){return M==null}t.isNullOrUndefined=k;function O(M){return typeof M=="number"}t.isNumber=O;function D(M){return typeof M=="string"}t.isString=D;function U(M){return typeof M=="symbol"}t.isSymbol=U;function V(M){return M===void 0}t.isUndefined=V;function Y(M){return W(M)&&l(M)==="[object RegExp]"}t.isRegExp=Y,t.types.isRegExp=Y;function W(M){return typeof M=="object"&&M!==null}t.isObject=W;function ie(M){return W(M)&&l(M)==="[object Date]"}t.isDate=ie,t.types.isDate=ie;function x(M){return W(M)&&(l(M)==="[object Error]"||M instanceof Error)}t.isError=x,t.types.isNativeError=x;function a(M){return typeof M=="function"}t.isFunction=a;function u(M){return M===null||typeof M=="boolean"||typeof M=="number"||typeof M=="string"||typeof M=="symbol"||typeof M>"u"}t.isPrimitive=u,t.isBuffer=dfe;function l(M){return Object.prototype.toString.call(M)}function h(M){return M<10?"0"+M.toString(10):M.toString(10)}var m=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(){var M=new Date,B=[h(M.getHours()),h(M.getMinutes()),h(M.getSeconds())].join(":");return[M.getDate(),m[M.getMonth()],B].join(" ")}t.log=function(){console.log("%s - %s",w(),t.format.apply(t,arguments))},t.inherits=Rt,t._extend=function(M,B){if(!B||!W(B))return M;for(var L=Object.keys(B),R=L.length;R--;)M[L[R]]=B[L[R]];return M};function E(M,B){return Object.prototype.hasOwnProperty.call(M,B)}var y=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');if(y&&B[y]){var L=B[y];if(typeof L!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(L,y,{value:L,enumerable:!1,writable:!1,configurable:!0}),L}function L(){for(var R,F,z=new Promise(function(Q,G){R=Q,F=G}),K=[],q=0;q0?this.tail.next=C:this.head=C,this.tail=C,++this.length}},{key:"unshift",value:function(I){var C={data:I,next:this.head};this.length===0&&(this.tail=C),this.head=C,++this.length}},{key:"shift",value:function(){if(this.length!==0){var I=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,I}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(I){if(this.length===0)return"";for(var C=this.head,T=""+C.data;C=C.next;)T+=I+C.data;return T}},{key:"concat",value:function(I){if(this.length===0)return p.alloc(0);for(var C=p.allocUnsafe(I>>>0),T=this.head,k=0;T;)_(T.data,C,k),k+=T.data.length,T=T.next;return C}},{key:"consume",value:function(I,C){var T;return IO.length?O.length:I;if(D===O.length?k+=O:k+=O.slice(0,I),I-=D,I===0){D===O.length?(++T,C.next?this.head=C.next:this.head=this.tail=null):(this.head=C,C.data=O.slice(D));break}++T}return this.length-=T,k}},{key:"_getBuffer",value:function(I){var C=p.allocUnsafe(I),T=this.head,k=1;for(T.data.copy(C),I-=T.data.length;T=T.next;){var O=T.data,D=I>O.length?O.length:I;if(O.copy(C,C.length-I,0,D),I-=D,I===0){D===O.length?(++k,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=O.slice(D));break}++k}return this.length-=k,C}},{key:A,value:function(I,C){return v(this,e(e({},C),{},{depth:0,customInspect:!1}))}}]),S}(),p8}function pfe(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Je.process.nextTick(h7,this,t)):Je.process.nextTick(h7,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?Je.process.nextTick(Gv,r):(r._writableState.errorEmitted=!0,Je.process.nextTick(yT,r,o)):Je.process.nextTick(yT,r,o):e?(Je.process.nextTick(Gv,r),e(o)):Je.process.nextTick(Gv,r)}),this)}function yT(t,e){h7(t,e),Gv(t)}function Gv(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function mfe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function h7(t,e){t.emit("error",e)}function gfe(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}var Y$={destroy:pfe,undestroy:mfe,errorOrDestroy:gfe},Ml={};function bfe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Q$={};function is(t,e,r){r||(r=Error);function n(o,s,f){return typeof e=="string"?e:e(o,s,f)}var i=function(o){bfe(s,o);function s(f,d,p){return o.call(this,n(f,d,p))||this}return s}(r);i.prototype.name=r.name,i.prototype.code=t,Q$[t]=i}function vT(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function yfe(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function vfe(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function wfe(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}is("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);is("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&yfe(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(vfe(t," argument"))i="The ".concat(t," ").concat(n," ").concat(vT(e,"type"));else{var o=wfe(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(o," ").concat(n," ").concat(vT(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);is("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");is("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});is("ERR_STREAM_PREMATURE_CLOSE","Premature close");is("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});is("ERR_MULTIPLE_CALLBACK","Callback called multiple times");is("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");is("ERR_STREAM_WRITE_AFTER_END","write after end");is("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);is("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);is("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Ml.codes=Q$;var xfe=Ml.codes.ERR_INVALID_OPT_VALUE;function Efe(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Afe(t,e,r,n){var i=Efe(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new xfe(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}var X$={getHighWaterMark:Afe},Sfe=Mfe;function Mfe(t,e){if(m8("noDeprecation"))return t;var r=!1;function n(){if(!r){if(m8("throwDeprecation"))throw new Error(e);m8("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function m8(t){try{if(!et.localStorage)return!1}catch{return!1}var e=et.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var g8,wT;function eM(){if(wT)return g8;wT=1,g8=Y;function t(F){var z=this;this.next=null,this.entry=null,this.finish=function(){R(z,F)}}var e;Y.WritableState=U;var r={deprecate:Sfe},n=k$,i=Rn.Buffer,o=(typeof et<"u"?et:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(F){return i.from(F)}function f(F){return i.isBuffer(F)||F instanceof o}var d=Y$,p=X$,b=p.getHighWaterMark,v=Ml.codes,A=v.ERR_INVALID_ARG_TYPE,_=v.ERR_METHOD_NOT_IMPLEMENTED,S=v.ERR_MULTIPLE_CALLBACK,P=v.ERR_STREAM_CANNOT_PIPE,I=v.ERR_STREAM_DESTROYED,C=v.ERR_STREAM_NULL_VALUES,T=v.ERR_STREAM_WRITE_AFTER_END,k=v.ERR_UNKNOWN_ENCODING,O=d.errorOrDestroy;Rt(Y,n);function D(){}function U(F,z,K){e=e||nl(),F=F||{},typeof K!="boolean"&&(K=z instanceof e),this.objectMode=!!F.objectMode,K&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=b(this,F,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=F.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){m(z,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=F.emitClose!==!1,this.autoDestroy=!!F.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}U.prototype.getBuffer=function(){for(var z=this.bufferedRequest,K=[];z;)K.push(z),z=z.next;return K},function(){try{Object.defineProperty(U.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var V;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(V=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(z){return V.call(this,z)?!0:this!==Y?!1:z&&z._writableState instanceof U}})):V=function(z){return z instanceof this};function Y(F){e=e||nl();var z=this instanceof e;if(!z&&!V.call(Y,this))return new Y(F);this._writableState=new U(F,this,z),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),n.call(this)}Y.prototype.pipe=function(){O(this,new P)};function W(F,z){var K=new T;O(F,K),Je.process.nextTick(z,K)}function ie(F,z,K,q){var Q;return K===null?Q=new C:typeof K!="string"&&!z.objectMode&&(Q=new A("chunk",["string","Buffer"],K)),Q?(O(F,Q),Je.process.nextTick(q,Q),!1):!0}Y.prototype.write=function(F,z,K){var q=this._writableState,Q=!1,G=!q.objectMode&&f(F);return G&&!i.isBuffer(F)&&(F=s(F)),typeof z=="function"&&(K=z,z=null),G?z="buffer":z||(z=q.defaultEncoding),typeof K!="function"&&(K=D),q.ending?W(this,K):(G||ie(this,q,F,K))&&(q.pendingcb++,Q=a(this,q,G,F,z,K)),Q},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&y(this,F))},Y.prototype.setDefaultEncoding=function(z){if(typeof z=="string"&&(z=z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((z+"").toLowerCase())>-1))throw new k(z);return this._writableState.defaultEncoding=z,this},Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(F,z,K){return!F.objectMode&&F.decodeStrings!==!1&&typeof z=="string"&&(z=i.from(z,K)),z}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a(F,z,K,q,Q,G){if(!K){var H=x(z,q,Q);q!==H&&(K=!0,Q="buffer",q=H)}var ee=z.objectMode?1:q.length;z.length+=ee;var ue=z.length>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Cfe(t,e,r){var n=e.length-1;if(n=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function Ife(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function Tfe(t){var e=this.lastTotal-this.lastNeed,r=Ife(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Rfe(t,e){var r=Cfe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function kfe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function Bfe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Ofe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Nfe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Lfe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Dfe(t){return t.toString(this.encoding)}function Ffe(t){return t&&t.length?this.write(t):""}var AT=Ml.codes.ERR_STREAM_PREMATURE_CLOSE;function $fe(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i0)if(typeof H!="string"&&!he.objectMode&&Object.getPrototypeOf(H)!==n.prototype&&(H=o(H)),ue)he.endEmitted?D(G,new C):x(G,he,H,!0);else if(he.ended)D(G,new P);else{if(he.destroyed)return!1;he.reading=!1,he.decoder&&!ee?(H=he.decoder.write(H),he.objectMode||H.length!==0?x(G,he,H,!1):y(G,he)):x(G,he,H,!1)}else ue||(he.reading=!1,y(G,he))}return!he.ended&&(he.length=u?G=u:(G--,G|=G>>>1,G|=G>>>2,G|=G>>>4,G|=G>>>8,G|=G>>>16,G++),G}function h(G,H){return G<=0||H.length===0&&H.ended?0:H.objectMode?1:G!==G?H.flowing&&H.length?H.buffer.head.data.length:H.length:(G>H.highWaterMark&&(H.highWaterMark=l(G)),G<=H.length?G:H.ended?H.length:(H.needReadable=!0,0))}W.prototype.read=function(G){d("read",G),G=parseInt(G,10);var H=this._readableState,ee=G;if(G!==0&&(H.emittedReadable=!1),G===0&&H.needReadable&&((H.highWaterMark!==0?H.length>=H.highWaterMark:H.length>0)||H.ended))return d("read: emitReadable",H.length,H.ended),H.length===0&&H.ended?K(this):w(this),null;if(G=h(G,H),G===0&&H.ended)return H.length===0&&K(this),null;var ue=H.needReadable;d("need readable",ue),(H.length===0||H.length-G0?fe=z(G,H):fe=null,fe===null?(H.needReadable=H.length<=H.highWaterMark,G=0):(H.length-=G,H.awaitDrain=0),H.length===0&&(H.ended||(H.needReadable=!0),ee!==G&&H.ended&&K(this)),fe!==null&&this.emit("data",fe),fe};function m(G,H){if(d("onEofChunk"),!H.ended){if(H.decoder){var ee=H.decoder.end();ee&&ee.length&&(H.buffer.push(ee),H.length+=H.objectMode?1:ee.length)}H.ended=!0,H.sync?w(G):(H.needReadable=!1,H.emittedReadable||(H.emittedReadable=!0,E(G)))}}function w(G){var H=G._readableState;d("emitReadable",H.needReadable,H.emittedReadable),H.needReadable=!1,H.emittedReadable||(d("emitReadable",H.flowing),H.emittedReadable=!0,Je.process.nextTick(E,G))}function E(G){var H=G._readableState;d("emitReadable_",H.destroyed,H.length,H.ended),!H.destroyed&&(H.length||H.ended)&&(G.emit("readable"),H.emittedReadable=!1),H.needReadable=!H.flowing&&!H.ended&&H.length<=H.highWaterMark,F(G)}function y(G,H){H.readingMore||(H.readingMore=!0,Je.process.nextTick(c,G,H))}function c(G,H){for(;!H.reading&&!H.ended&&(H.length1&&Q(ue.pipes,G)!==-1)&&!Xe&&(d("false write response, pause",ue.awaitDrain),ue.awaitDrain++),ee.pause())}function it(j){d("onerror",j),lt(),G.removeListener("error",it),e(G,"error")===0&&D(G,j)}V(G,"error",it);function Pe(){G.removeListener("finish",Te),lt()}G.once("close",Pe);function Te(){d("onfinish"),G.removeListener("close",Pe),lt()}G.once("finish",Te);function lt(){d("unpipe"),ee.unpipe(G)}return G.emit("pipe",ee),ue.flowing||(d("pipe resume"),ee.resume()),G};function g(G){return function(){var ee=G._readableState;d("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&e(G,"data")&&(ee.flowing=!0,F(G))}}W.prototype.unpipe=function(G){var H=this._readableState,ee={hasUnpiped:!1};if(H.pipesCount===0)return this;if(H.pipesCount===1)return G&&G!==H.pipes?this:(G||(G=H.pipes),H.pipes=null,H.pipesCount=0,H.flowing=!1,G&&G.emit("unpipe",this,ee),this);if(!G){var ue=H.pipes,fe=H.pipesCount;H.pipes=null,H.pipesCount=0,H.flowing=!1;for(var he=0;he0,ue.flowing!==!1&&this.resume()):G==="readable"&&!ue.endEmitted&&!ue.readableListening&&(ue.readableListening=ue.needReadable=!0,ue.flowing=!1,ue.emittedReadable=!1,d("on readable",ue.length,ue.reading),ue.length?w(this):ue.reading||Je.process.nextTick(B,this)),ee},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(G,H){var ee=r.prototype.removeListener.call(this,G,H);return G==="readable"&&Je.process.nextTick(M,this),ee},W.prototype.removeAllListeners=function(G){var H=r.prototype.removeAllListeners.apply(this,arguments);return(G==="readable"||G===void 0)&&Je.process.nextTick(M,this),H};function M(G){var H=G._readableState;H.readableListening=G.listenerCount("readable")>0,H.resumeScheduled&&!H.paused?H.flowing=!0:G.listenerCount("data")>0&&G.resume()}function B(G){d("readable nexttick read 0"),G.read(0)}W.prototype.resume=function(){var G=this._readableState;return G.flowing||(d("resume"),G.flowing=!G.readableListening,L(this,G)),G.paused=!1,this};function L(G,H){H.resumeScheduled||(H.resumeScheduled=!0,Je.process.nextTick(R,G,H))}function R(G,H){d("resume",H.reading),H.reading||G.read(0),H.resumeScheduled=!1,G.emit("resume"),F(G),H.flowing&&!H.reading&&G.read(0)}W.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function F(G){var H=G._readableState;for(d("flow",H.flowing);H.flowing&&G.read()!==null;);}W.prototype.wrap=function(G){var H=this,ee=this._readableState,ue=!1;G.on("end",function(){if(d("wrapped end"),ee.decoder&&!ee.ended){var He=ee.decoder.end();He&&He.length&&H.push(He)}H.push(null)}),G.on("data",function(He){if(d("wrapped data"),ee.decoder&&(He=ee.decoder.write(He)),!(ee.objectMode&&He==null)&&!(!ee.objectMode&&(!He||!He.length))){var be=H.push(He);be||(ue=!0,G.pause())}});for(var fe in G)this[fe]===void 0&&typeof G[fe]=="function"&&(this[fe]=function(be){return function(){return G[be].apply(G,arguments)}}(fe));for(var he=0;he=H.length?(H.decoder?ee=H.buffer.join(""):H.buffer.length===1?ee=H.buffer.first():ee=H.buffer.concat(H.length),H.buffer.clear()):ee=H.buffer.consume(G,H.decoder),ee}function K(G){var H=G._readableState;d("endReadable",H.endEmitted),H.endEmitted||(H.ended=!0,Je.process.nextTick(q,H,G))}function q(G,H){if(d("endReadableNT",G.endEmitted,G.length),!G.endEmitted&&G.length===0&&(G.endEmitted=!0,H.readable=!1,H.emit("end"),G.autoDestroy)){var ee=H._writableState;(!ee||ee.autoDestroy&&ee.finished)&&H.destroy()}}typeof Symbol=="function"&&(W.from=function(G,H){return O===void 0&&(O=Hfe()),O(W,G,H)});function Q(G,H){for(var ee=0,ue=G.length;ee0;return ece(s,d,p,function(b){i||(i=b),b&&o.forEach(IT),!d&&(o.forEach(IT),n(i))})});return e.reduce(tce)}var iU=nce;(function(t,e){e=t.exports=rM(),e.Stream=e,e.Readable=e,e.Writable=eM(),e.Duplex=nl(),e.Transform=nM,e.PassThrough=tU,e.finished=ww,e.pipeline=iU})(o7,o7.exports);var oU=o7.exports,f6=Bt.Buffer,sU=oU.Transform,ice=Rt;function oce(t,e){if(!f6.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function F0(t){sU.call(this),this._block=f6.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}ice(F0,sU);F0.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)};F0.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};F0.prototype.update=function(t,e){if(oce(t,"Data"),this._finalized)throw new Error("Digest already called");f6.isBuffer(t)||(t=f6.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var i=this._blockOffset;i0;++o)this._length[o]+=s,s=this._length[o]/4294967296|0,s>0&&(this._length[o]-=4294967296*s);return this};F0.prototype._update=function(){throw new Error("_update is not implemented")};F0.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};F0.prototype._digest=function(){throw new Error("_digest is not implemented")};var aU=F0,sce=Rt,fU=aU,ace=Bt.Buffer,fce=new Array(16);function Aw(){fU.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}sce(Aw,fU);Aw.prototype._update=function(){for(var t=fce,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,n=this._b,i=this._c,o=this._d;r=Ln(r,n,i,o,t[0],3614090360,7),o=Ln(o,r,n,i,t[1],3905402710,12),i=Ln(i,o,r,n,t[2],606105819,17),n=Ln(n,i,o,r,t[3],3250441966,22),r=Ln(r,n,i,o,t[4],4118548399,7),o=Ln(o,r,n,i,t[5],1200080426,12),i=Ln(i,o,r,n,t[6],2821735955,17),n=Ln(n,i,o,r,t[7],4249261313,22),r=Ln(r,n,i,o,t[8],1770035416,7),o=Ln(o,r,n,i,t[9],2336552879,12),i=Ln(i,o,r,n,t[10],4294925233,17),n=Ln(n,i,o,r,t[11],2304563134,22),r=Ln(r,n,i,o,t[12],1804603682,7),o=Ln(o,r,n,i,t[13],4254626195,12),i=Ln(i,o,r,n,t[14],2792965006,17),n=Ln(n,i,o,r,t[15],1236535329,22),r=Dn(r,n,i,o,t[1],4129170786,5),o=Dn(o,r,n,i,t[6],3225465664,9),i=Dn(i,o,r,n,t[11],643717713,14),n=Dn(n,i,o,r,t[0],3921069994,20),r=Dn(r,n,i,o,t[5],3593408605,5),o=Dn(o,r,n,i,t[10],38016083,9),i=Dn(i,o,r,n,t[15],3634488961,14),n=Dn(n,i,o,r,t[4],3889429448,20),r=Dn(r,n,i,o,t[9],568446438,5),o=Dn(o,r,n,i,t[14],3275163606,9),i=Dn(i,o,r,n,t[3],4107603335,14),n=Dn(n,i,o,r,t[8],1163531501,20),r=Dn(r,n,i,o,t[13],2850285829,5),o=Dn(o,r,n,i,t[2],4243563512,9),i=Dn(i,o,r,n,t[7],1735328473,14),n=Dn(n,i,o,r,t[12],2368359562,20),r=Fn(r,n,i,o,t[5],4294588738,4),o=Fn(o,r,n,i,t[8],2272392833,11),i=Fn(i,o,r,n,t[11],1839030562,16),n=Fn(n,i,o,r,t[14],4259657740,23),r=Fn(r,n,i,o,t[1],2763975236,4),o=Fn(o,r,n,i,t[4],1272893353,11),i=Fn(i,o,r,n,t[7],4139469664,16),n=Fn(n,i,o,r,t[10],3200236656,23),r=Fn(r,n,i,o,t[13],681279174,4),o=Fn(o,r,n,i,t[0],3936430074,11),i=Fn(i,o,r,n,t[3],3572445317,16),n=Fn(n,i,o,r,t[6],76029189,23),r=Fn(r,n,i,o,t[9],3654602809,4),o=Fn(o,r,n,i,t[12],3873151461,11),i=Fn(i,o,r,n,t[15],530742520,16),n=Fn(n,i,o,r,t[2],3299628645,23),r=$n(r,n,i,o,t[0],4096336452,6),o=$n(o,r,n,i,t[7],1126891415,10),i=$n(i,o,r,n,t[14],2878612391,15),n=$n(n,i,o,r,t[5],4237533241,21),r=$n(r,n,i,o,t[12],1700485571,6),o=$n(o,r,n,i,t[3],2399980690,10),i=$n(i,o,r,n,t[10],4293915773,15),n=$n(n,i,o,r,t[1],2240044497,21),r=$n(r,n,i,o,t[8],1873313359,6),o=$n(o,r,n,i,t[15],4264355552,10),i=$n(i,o,r,n,t[6],2734768916,15),n=$n(n,i,o,r,t[13],1309151649,21),r=$n(r,n,i,o,t[4],4149444226,6),o=$n(o,r,n,i,t[11],3174756917,10),i=$n(i,o,r,n,t[2],718787259,15),n=$n(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0};Aw.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=ace.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function Sw(t,e){return t<>>32-e}function Ln(t,e,r,n,i,o,s){return Sw(t+(e&r|~e&n)+i+o|0,s)+e|0}function Dn(t,e,r,n,i,o,s){return Sw(t+(e&n|r&~n)+i+o|0,s)+e|0}function Fn(t,e,r,n,i,o,s){return Sw(t+(e^r^n)+i+o|0,s)+e|0}function $n(t,e,r,n,i,o,s){return Sw(t+(r^(e|~n))+i+o|0,s)+e|0}var iM=Aw,A8=Rn.Buffer,cce=Rt,cU=aU,uce=new Array(16),H1=[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],q1=[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],G1=[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],V1=[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],K1=[0,1518500249,1859775393,2400959708,2840853838],W1=[1352829926,1548603684,1836072691,2053994217,0];function Mw(){cU.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}cce(Mw,cU);Mw.prototype._update=function(){for(var t=uce,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,f=this._a|0,d=this._b|0,p=this._c|0,b=this._d|0,v=this._e|0,A=0;A<80;A+=1){var _,S;A<16?(_=TT(r,n,i,o,s,t[H1[A]],K1[0],G1[A]),S=OT(f,d,p,b,v,t[q1[A]],W1[0],V1[A])):A<32?(_=RT(r,n,i,o,s,t[H1[A]],K1[1],G1[A]),S=BT(f,d,p,b,v,t[q1[A]],W1[1],V1[A])):A<48?(_=kT(r,n,i,o,s,t[H1[A]],K1[2],G1[A]),S=kT(f,d,p,b,v,t[q1[A]],W1[2],V1[A])):A<64?(_=BT(r,n,i,o,s,t[H1[A]],K1[3],G1[A]),S=RT(f,d,p,b,v,t[q1[A]],W1[3],V1[A])):(_=OT(r,n,i,o,s,t[H1[A]],K1[4],G1[A]),S=TT(f,d,p,b,v,t[q1[A]],W1[4],V1[A])),r=s,s=o,o=il(i,10),i=n,n=_,f=v,v=b,b=il(p,10),p=d,d=S}var P=this._b+i+b|0;this._b=this._c+o+v|0,this._c=this._d+s+f|0,this._d=this._e+r+d|0,this._e=this._a+n+p|0,this._a=P};Mw.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=A8.alloc?A8.alloc(20):new A8(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};function il(t,e){return t<>>32-e}function TT(t,e,r,n,i,o,s,f){return il(t+(e^r^n)+o+s|0,f)+i|0}function RT(t,e,r,n,i,o,s,f){return il(t+(e&r|~e&n)+o+s|0,f)+i|0}function kT(t,e,r,n,i,o,s,f){return il(t+((e|~r)^n)+o+s|0,f)+i|0}function BT(t,e,r,n,i,o,s,f){return il(t+(e&n|r&~n)+o+s|0,f)+i|0}function OT(t,e,r,n,i,o,s,f){return il(t+(e^(r|~n))+o+s|0,f)+i|0}var oM=Mw,uU={exports:{}},lU=Bt.Buffer;function _w(t,e){this._block=lU.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}_w.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=lU.from(t,e));for(var r=this._block,n=this._blockSize,i=t.length,o=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o};_w.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var s1=_w,lce=Rt,dU=s1,dce=Bt.Buffer,hce=[1518500249,1859775393,-1894007588,-899497514],pce=new Array(80);function Ob(){this.init(),this._w=pce,dU.call(this,64,56)}lce(Ob,dU);Ob.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function mce(t){return t<<5|t>>>27}function gce(t){return t<<30|t>>>2}function bce(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Ob.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,f=0;f<16;++f)e[f]=t.readInt32BE(f*4);for(;f<80;++f)e[f]=e[f-3]^e[f-8]^e[f-14]^e[f-16];for(var d=0;d<80;++d){var p=~~(d/20),b=mce(r)+bce(p,n,i,o)+s+e[d]+hce[p]|0;s=o,o=i,i=gce(n),n=r,r=b}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0};Ob.prototype._hash=function(){var t=dce.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var yce=Ob,vce=Rt,hU=s1,wce=Bt.Buffer,xce=[1518500249,1859775393,-1894007588,-899497514],Ece=new Array(80);function Nb(){this.init(),this._w=Ece,hU.call(this,64,56)}vce(Nb,hU);Nb.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Ace(t){return t<<1|t>>>31}function Sce(t){return t<<5|t>>>27}function Mce(t){return t<<30|t>>>2}function _ce(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Nb.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,f=0;f<16;++f)e[f]=t.readInt32BE(f*4);for(;f<80;++f)e[f]=Ace(e[f-3]^e[f-8]^e[f-14]^e[f-16]);for(var d=0;d<80;++d){var p=~~(d/20),b=Sce(r)+_ce(p,n,i,o)+s+e[d]+xce[p]|0;s=o,o=i,i=Mce(n),n=r,r=b}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0};Nb.prototype._hash=function(){var t=wce.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var Pce=Nb,Cce=Rt,pU=s1,Ice=Bt.Buffer,Tce=[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],Rce=new Array(64);function Lb(){this.init(),this._w=Rce,pU.call(this,64,56)}Cce(Lb,pU);Lb.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function kce(t,e,r){return r^t&(e^r)}function Bce(t,e,r){return t&e|r&(t|e)}function Oce(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Nce(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Lce(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function Dce(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Lb.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,f=this._f|0,d=this._g|0,p=this._h|0,b=0;b<16;++b)e[b]=t.readInt32BE(b*4);for(;b<64;++b)e[b]=Dce(e[b-2])+e[b-7]+Lce(e[b-15])+e[b-16]|0;for(var v=0;v<64;++v){var A=p+Nce(s)+kce(s,f,d)+Tce[v]+e[v]|0,_=Oce(r)+Bce(r,n,i)|0;p=d,d=f,f=s,s=o+A|0,o=i,i=n,n=r,r=A+_|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=f+this._f|0,this._g=d+this._g|0,this._h=p+this._h|0};Lb.prototype._hash=function(){var t=Ice.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var mU=Lb,Fce=Rt,$ce=mU,Uce=s1,zce=Bt.Buffer,jce=new Array(64);function Pw(){this.init(),this._w=jce,Uce.call(this,64,56)}Fce(Pw,$ce);Pw.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Pw.prototype._hash=function(){var t=zce.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var Hce=Pw,qce=Rt,gU=s1,Gce=Bt.Buffer,NT=[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],Vce=new Array(160);function Db(){this.init(),this._w=Vce,gU.call(this,128,112)}qce(Db,gU);Db.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function LT(t,e,r){return r^t&(e^r)}function DT(t,e,r){return t&e|r&(t|e)}function FT(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function $T(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function Kce(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function Wce(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function Jce(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function Zce(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function ln(t,e){return t>>>0>>0?1:0}Db.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,o=this._dh|0,s=this._eh|0,f=this._fh|0,d=this._gh|0,p=this._hh|0,b=this._al|0,v=this._bl|0,A=this._cl|0,_=this._dl|0,S=this._el|0,P=this._fl|0,I=this._gl|0,C=this._hl|0,T=0;T<32;T+=2)e[T]=t.readInt32BE(T*4),e[T+1]=t.readInt32BE(T*4+4);for(;T<160;T+=2){var k=e[T-30],O=e[T-15*2+1],D=Kce(k,O),U=Wce(O,k);k=e[T-2*2],O=e[T-2*2+1];var V=Jce(k,O),Y=Zce(O,k),W=e[T-7*2],ie=e[T-7*2+1],x=e[T-16*2],a=e[T-16*2+1],u=U+ie|0,l=D+W+ln(u,U)|0;u=u+Y|0,l=l+V+ln(u,Y)|0,u=u+a|0,l=l+x+ln(u,a)|0,e[T]=l,e[T+1]=u}for(var h=0;h<160;h+=2){l=e[h],u=e[h+1];var m=DT(r,n,i),w=DT(b,v,A),E=FT(r,b),y=FT(b,r),c=$T(s,S),g=$T(S,s),M=NT[h],B=NT[h+1],L=LT(s,f,d),R=LT(S,P,I),F=C+g|0,z=p+c+ln(F,C)|0;F=F+R|0,z=z+L+ln(F,R)|0,F=F+B|0,z=z+M+ln(F,B)|0,F=F+u|0,z=z+l+ln(F,u)|0;var K=y+w|0,q=E+m+ln(K,y)|0;p=d,C=I,d=f,I=P,f=s,P=S,S=_+F|0,s=o+z+ln(S,_)|0,o=i,_=A,i=n,A=v,n=r,v=b,b=F+K|0,r=z+q+ln(b,F)|0}this._al=this._al+b|0,this._bl=this._bl+v|0,this._cl=this._cl+A|0,this._dl=this._dl+_|0,this._el=this._el+S|0,this._fl=this._fl+P|0,this._gl=this._gl+I|0,this._hl=this._hl+C|0,this._ah=this._ah+r+ln(this._al,b)|0,this._bh=this._bh+n+ln(this._bl,v)|0,this._ch=this._ch+i+ln(this._cl,A)|0,this._dh=this._dh+o+ln(this._dl,_)|0,this._eh=this._eh+s+ln(this._el,S)|0,this._fh=this._fh+f+ln(this._fl,P)|0,this._gh=this._gh+d+ln(this._gl,I)|0,this._hh=this._hh+p+ln(this._hl,C)|0};Db.prototype._hash=function(){var t=Gce.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var bU=Db,Yce=Rt,Qce=bU,Xce=s1,e0e=Bt.Buffer,t0e=new Array(160);function Cw(){this.init(),this._w=t0e,Xce.call(this,128,112)}Yce(Cw,Qce);Cw.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Cw.prototype._hash=function(){var t=e0e.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var r0e=Cw,_l=uU.exports=function(e){e=e.toLowerCase();var r=_l[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};_l.sha=yce;_l.sha1=Pce;_l.sha224=Hce;_l.sha256=mU;_l.sha384=r0e;_l.sha512=bU;var sM=uU.exports,n0e=Ko,aM=yw.EventEmitter,i0e=Rt;i0e(Ko,aM);Ko.Readable=rM();Ko.Writable=eM();Ko.Duplex=nl();Ko.Transform=nM;Ko.PassThrough=tU;Ko.finished=ww;Ko.pipeline=iU;Ko.Stream=Ko;function Ko(){aM.call(this)}Ko.prototype.pipe=function(t,e){var r=this;function n(b){t.writable&&t.write(b)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",s),r.on("close",f));var o=!1;function s(){o||(o=!0,t.end())}function f(){o||(o=!0,typeof t.destroy=="function"&&t.destroy())}function d(b){if(p(),aM.listenerCount(this,"error")===0)throw b}r.on("error",d),t.on("error",d);function p(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",s),r.removeListener("close",f),r.removeListener("error",d),t.removeListener("error",d),r.removeListener("end",p),r.removeListener("close",p),t.removeListener("close",p)}return r.on("end",p),r.on("close",p),t.on("close",p),t.emit("pipe",r),t};var yU=Bt.Buffer,vU=n0e.Transform,o0e=a6.StringDecoder,s0e=Rt;function na(t){vU.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}s0e(na,vU);na.prototype.update=function(t,e,r){typeof t=="string"&&(t=yU.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};na.prototype.setAutoPadding=function(){};na.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};na.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};na.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};na.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(i){n=i}finally{r(n)}};na.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};na.prototype._finalOrDigest=function(t){var e=this.__final()||yU.alloc(0);return t&&(e=this._toString(e,t,!0)),e};na.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o0e(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n};var $0=na,a0e=Rt,f0e=iM,c0e=oM,u0e=sM,wU=$0;function Iw(t){wU.call(this,"digest"),this._hash=t}a0e(Iw,wU);Iw.prototype._update=function(t){this._hash.update(t)};Iw.prototype._final=function(){return this._hash.digest()};var Fb=function(e){return e=e.toLowerCase(),e==="md5"?new f0e:e==="rmd160"||e==="ripemd160"?new c0e:new Iw(u0e(e))},l0e=Rt,fu=Bt.Buffer,xU=$0,d0e=fu.alloc(128),Yl=64;function Tw(t,e){xU.call(this,"digest"),typeof e=="string"&&(e=fu.from(e)),this._alg=t,this._key=e,e.length>Yl?e=t(e):e.lengthr){var n=t==="rmd160"?new p7:m7(t);e=n.update(e).digest()}else e.lengthR0e||e!==e)throw new TypeError("Bad key length")},Vv;if(et.process&&et.process.browser)Vv="utf-8";else if(et.process&&et.process.version){var k0e=parseInt(Je.process.version.split(".")[0].slice(1),10);Vv=k0e>=6?"utf-8":"binary"}else Vv="utf-8";var PU=Vv,S8=Bt.Buffer,CU=function(t,e,r){if(S8.isBuffer(t))return t;if(typeof t=="string")return S8.from(t,e);if(ArrayBuffer.isView(t))return S8.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")},B0e=EU,O0e=oM,N0e=sM,cu=Bt.Buffer,L0e=_U,UT=PU,zT=CU,D0e=cu.alloc(128),Kv={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function IU(t,e,r){var n=F0e(t),i=t==="sha512"||t==="sha384"?128:64;e.length>i?e=n(e):e.length>>0};mo.writeUInt32BE=function(e,r,n){e[0+n]=r>>>24,e[1+n]=r>>>16&255,e[2+n]=r>>>8&255,e[3+n]=r&255};mo.ip=function(e,r,n,i){for(var o=0,s=0,f=6;f>=0;f-=2){for(var d=0;d<=24;d+=8)o<<=1,o|=r>>>d+f&1;for(var d=0;d<=24;d+=8)o<<=1,o|=e>>>d+f&1}for(var f=6;f>=0;f-=2){for(var d=1;d<=25;d+=8)s<<=1,s|=r>>>d+f&1;for(var d=1;d<=25;d+=8)s<<=1,s|=e>>>d+f&1}n[i+0]=o>>>0,n[i+1]=s>>>0};mo.rip=function(e,r,n,i){for(var o=0,s=0,f=0;f<4;f++)for(var d=24;d>=0;d-=8)o<<=1,o|=r>>>d+f&1,o<<=1,o|=e>>>d+f&1;for(var f=4;f<8;f++)for(var d=24;d>=0;d-=8)s<<=1,s|=r>>>d+f&1,s<<=1,s|=e>>>d+f&1;n[i+0]=o>>>0,n[i+1]=s>>>0};mo.pc1=function(e,r,n,i){for(var o=0,s=0,f=7;f>=5;f--){for(var d=0;d<=24;d+=8)o<<=1,o|=r>>d+f&1;for(var d=0;d<=24;d+=8)o<<=1,o|=e>>d+f&1}for(var d=0;d<=24;d+=8)o<<=1,o|=r>>d+f&1;for(var f=1;f<=3;f++){for(var d=0;d<=24;d+=8)s<<=1,s|=r>>d+f&1;for(var d=0;d<=24;d+=8)s<<=1,s|=e>>d+f&1}for(var d=0;d<=24;d+=8)s<<=1,s|=e>>d+f&1;n[i+0]=o>>>0,n[i+1]=s>>>0};mo.r28shl=function(e,r){return e<>>28-r};var Ky=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];mo.pc2=function(e,r,n,i){for(var o=0,s=0,f=Ky.length>>>1,d=0;d>>Ky[d]&1;for(var d=f;d>>Ky[d]&1;n[i+0]=o>>>0,n[i+1]=s>>>0};mo.expand=function(e,r,n){var i=0,o=0;i=(e&1)<<5|e>>>27;for(var s=23;s>=15;s-=4)i<<=6,i|=e>>>s&63;for(var s=11;s>=3;s-=4)o|=e>>>s&63,o<<=6;o|=(e&31)<<1|e>>>31,r[n+0]=i>>>0,r[n+1]=o>>>0};var GT=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];mo.substitute=function(e,r){for(var n=0,i=0;i<4;i++){var o=e>>>18-i*6&63,s=GT[i*64+o];n<<=4,n|=s}for(var i=0;i<4;i++){var o=r>>>18-i*6&63,s=GT[4*64+i*64+o];n<<=4,n|=s}return n>>>0};var VT=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];mo.permute=function(e){for(var r=0,n=0;n>>VT[n]&1;return r>>>0};mo.padSplit=function(e,r,n){for(var i=e.toString(2);i.length0;i--)r+=this._buffer(e,r),n+=this._flushBuffer(o,n);return r+=this._buffer(e,r),o};ss.prototype.final=function(e){var r;e&&(r=this.update(e));var n;return this.type==="encrypt"?n=this._finalEncrypt():n=this._finalDecrypt(),r?r.concat(n):n};ss.prototype._pad=function(e,r){if(r===0)return!1;for(;r>>1];n=on.r28shl(n,s),i=on.r28shl(i,s),on.pc2(n,i,e.keys,o)}};Fa.prototype._update=function(e,r,n,i){var o=this._desState,s=on.readUInt32BE(e,r),f=on.readUInt32BE(e,r+4);on.ip(s,f,o.tmp,0),s=o.tmp[0],f=o.tmp[1],this.type==="encrypt"?this._encrypt(o,s,f,o.tmp,0):this._decrypt(o,s,f,o.tmp,0),s=o.tmp[0],f=o.tmp[1],on.writeUInt32BE(n,s,i),on.writeUInt32BE(n,f,i+4)};Fa.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var n=e.length-r,i=r;i>>0,s=_}on.rip(f,s,i,o)};Fa.prototype._decrypt=function(e,r,n,i,o){for(var s=n,f=r,d=e.keys.length-2;d>=0;d-=2){var p=e.keys[d],b=e.keys[d+1];on.expand(s,e.tmp,0),p^=e.tmp[0],b^=e.tmp[1];var v=on.substitute(p,b),A=on.permute(v),_=s;s=(f^A)>>>0,f=_}on.rip(s,f,i,o)};var DU={},J0e=os,Z0e=Rt,c6={};function Y0e(t){J0e.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e>i%8,t._prev=fue(t._prev,r?f:d);return s}function fue(t,e){var r=t.length,n=-1,i=Wv.allocUnsafe(t.length);for(t=Wv.concat([t,Wv.from([e])]);++n>7;return i}HU.encrypt=function(t,e,r){for(var n=e.length,i=Wv.allocUnsafe(n),o=-1;++o>>24]^s[b>>>16&255]^f[v>>>8&255]^d[A&255]^e[C++],S=o[b>>>24]^s[v>>>16&255]^f[A>>>8&255]^d[p&255]^e[C++],P=o[v>>>24]^s[A>>>16&255]^f[p>>>8&255]^d[b&255]^e[C++],I=o[A>>>24]^s[p>>>16&255]^f[b>>>8&255]^d[v&255]^e[C++],p=_,b=S,v=P,A=I;return _=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[v>>>8&255]<<8|n[A&255])^e[C++],S=(n[b>>>24]<<24|n[v>>>16&255]<<16|n[A>>>8&255]<<8|n[p&255])^e[C++],P=(n[v>>>24]<<24|n[A>>>16&255]<<16|n[p>>>8&255]<<8|n[b&255])^e[C++],I=(n[A>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[v&255])^e[C++],_=_>>>0,S=S>>>0,P=P>>>0,I=I>>>0,[_,S,P,I]}var vue=[0,1,2,4,8,16,32,64,128,27,54],Yr=function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,f=0,d=0;d<256;++d){var p=f^f<<1^f<<2^f<<3^f<<4;p=p>>>8^p&255^99,r[s]=p,n[p]=s;var b=t[s],v=t[b],A=t[v],_=t[p]*257^p*16843008;i[0][s]=_<<24|_>>>8,i[1][s]=_<<16|_>>>16,i[2][s]=_<<8|_>>>24,i[3][s]=_,_=A*16843009^v*65537^b*257^s*16843008,o[0][p]=_<<24|_>>>8,o[1][p]=_<<16|_>>>16,o[2][p]=_<<8|_>>>24,o[3][p]=_,s===0?s=f=1:(s=b^t[t[t[A^b]]],f^=t[t[f]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function Wo(t){this._key=hM(t),this._reset()}Wo.blockSize=4*4;Wo.keySize=256/8;Wo.prototype.blockSize=Wo.blockSize;Wo.prototype.keySize=Wo.keySize;Wo.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=(r+1)*4,i=[],o=0;o>>24,s=Yr.SBOX[s>>>24]<<24|Yr.SBOX[s>>>16&255]<<16|Yr.SBOX[s>>>8&255]<<8|Yr.SBOX[s&255],s^=vue[o/e|0]<<24):e>6&&o%e===4&&(s=Yr.SBOX[s>>>24]<<24|Yr.SBOX[s>>>16&255]<<16|Yr.SBOX[s>>>8&255]<<8|Yr.SBOX[s&255]),i[o]=i[o-e]^s}for(var f=[],d=0;d>>24]]^Yr.INV_SUB_MIX[1][Yr.SBOX[b>>>16&255]]^Yr.INV_SUB_MIX[2][Yr.SBOX[b>>>8&255]]^Yr.INV_SUB_MIX[3][Yr.SBOX[b&255]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=f};Wo.prototype.encryptBlockRaw=function(t){return t=hM(t),KU(t,this._keySchedule,Yr.SUB_MIX,Yr.SBOX,this._nRounds)};Wo.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=u6.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};Wo.prototype.decryptBlock=function(t){t=hM(t);var e=t[1];t[1]=t[3],t[3]=e;var r=KU(t,this._invKeySchedule,Yr.INV_SUB_MIX,Yr.INV_SBOX,this._nRounds),n=u6.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n};Wo.prototype.scrub=function(){P8(this._keySchedule),P8(this._invKeySchedule),P8(this._key)};Ub.AES=Wo;var dp=Bt.Buffer,wue=dp.alloc(16,0);function xue(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function WU(t){var e=dp.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function zb(t){this.h=t,this.state=dp.alloc(16,0),this.cache=dp.allocUnsafe(0)}zb.prototype.ghash=function(t){for(var e=-1;++e0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,i&&(t[0]=t[0]^225<<24)}this.state=WU(e)};zb.prototype.update=function(t){this.cache=dp.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};zb.prototype.final=function(t,e){return this.cache.length&&this.ghash(dp.concat([this.cache,wue],16)),this.ghash(WU([0,t,0,e])),this.state};var Eue=zb,Aue=Ub,Mi=Bt.Buffer,JU=$0,Sue=Rt,ZU=Eue,Mue=$b,_ue=GU;function Pue(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i0||n>0;){var d=new Rue;d.update(f),d.update(t),e&&d.update(e),f=d.digest();var p=0;if(i>0){var b=o.length-i;p=Math.min(i,f.length),f.copy(o,b,0,p),i-=p}if(p0){var v=s.length-n,A=Math.min(n,f.length-p);f.copy(s,v,p,p+A),n-=A}}return f.fill(0),{key:o,iv:s}}var Ow=kue,ez=dM,Bue=YU,Vf=Bt.Buffer,Oue=XU,tz=$0,Nue=Ub,Lue=Ow,Due=Rt;function jb(t,e,r){tz.call(this),this._cache=new Nw,this._cipher=new Nue.AES(e),this._prev=Vf.from(r),this._mode=t,this._autopadding=!0}Due(jb,tz);jb.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return Vf.concat(n)};var Fue=Vf.alloc(16,16);jb.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(Fue))throw this._cipher.scrub(),new Error("data not multiple of block length")};jb.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Nw(){this.cache=Vf.allocUnsafe(0)}Nw.prototype.add=function(t){this.cache=Vf.concat([this.cache,t])};Nw.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null};Nw.prototype.flush=function(){for(var t=16-this.cache.length,e=Vf.allocUnsafe(t),r=-1;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null};Lw.prototype.flush=function(){if(this.cache.length)return this.cache};function Gue(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var B=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=B+l:l=b[c-B.length]+B+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,B=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=B;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,B=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,K=h[2]|0,q=K&8191,Q=K>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(B,ne),c=Math.imul(B,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(B,ve)|0,c=c+Math.imul(B,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(B,ke)|0,c=c+Math.imul(B,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(B,re)|0,c=c+Math.imul(B,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(B,de)|0,c=c+Math.imul(B,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(B,pe)|0,c=c+Math.imul(B,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(B,Me)|0,c=c+Math.imul(B,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(B,xe)|0,c=c+Math.imul(B,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(B,Re)|0,c=c+Math.imul(B,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(B,Ce)|0,c=c+Math.imul(B,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;B--){var L=(h.words[m.length+B]|0)*67108864+(h.words[m.length+B-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,B);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,B),h.isZero()||(h.negative^=1);c&&(c.words[B]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,B=1;!(u.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var k={k256:null,p224:null,p192:null,p25519:null};function O(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},O.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},O.prototype.split=function(a,u){a.iushrn(this.n,0,u)},O.prototype.imulK=function(a){return a.imul(this.k)};function D(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,O),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(k[a])return k[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new V;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return k[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),B=this.pow(a,h),L=m;B.cmp(w)!==0;){for(var R=B,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var B=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),B===0&&E===0){y=0;continue}E<<=1,E|=B,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(gM);var hz=gM.exports,bM={exports:{}};bM.exports;(function(t){(function(e,r){function n(x,a){if(!x)throw new Error(a||"Assertion failed")}function i(x,a){x.super_=a;var u=function(){};u.prototype=a.prototype,x.prototype=new u,x.prototype.constructor=x}function o(x,a,u){if(o.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&((a==="le"||a==="be")&&(u=a,a=10),this._init(x||0,a||10,u||"be"))}typeof e=="object"?e.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Rn.Buffer}catch{}o.isBN=function(a){return a instanceof o?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===o.wordSize&&Array.isArray(a.words)},o.max=function(a,u){return a.cmp(u)>0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var B=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=B+l:l=b[c-B.length]+B+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,B=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=B;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,B=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,K=h[2]|0,q=K&8191,Q=K>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(B,ne),c=Math.imul(B,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(B,ve)|0,c=c+Math.imul(B,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(B,ke)|0,c=c+Math.imul(B,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(B,re)|0,c=c+Math.imul(B,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(B,de)|0,c=c+Math.imul(B,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(B,pe)|0,c=c+Math.imul(B,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(B,Me)|0,c=c+Math.imul(B,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(B,xe)|0,c=c+Math.imul(B,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(B,Re)|0,c=c+Math.imul(B,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(B,Ce)|0,c=c+Math.imul(B,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;B--){var L=(h.words[m.length+B]|0)*67108864+(h.words[m.length+B-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,B);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,B),h.isZero()||(h.negative^=1);c&&(c.words[B]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,B=1;!(u.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var k={k256:null,p224:null,p192:null,p25519:null};function O(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},O.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},O.prototype.split=function(a,u){a.iushrn(this.n,0,u)},O.prototype.imulK=function(a){return a.imul(this.k)};function D(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,O),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(k[a])return k[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new V;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return k[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),B=this.pow(a,h),L=m;B.cmp(w)!==0;){for(var R=B,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var B=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),B===0&&E===0){y=0;continue}E<<=1,E|=B,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(bM);var Que=bM.exports,Wy={exports:{}},ZT;function yM(){if(ZT)return Wy.exports;ZT=1;var t;Wy.exports=function(i){return t||(t=new e(null)),t.generate(i)};function e(n){this.rand=n}if(Wy.exports.Rand=e,e.prototype.generate=function(i){return this._rand(i)},e.prototype._rand=function(i){if(this.rand.getBytes)return this.rand.getBytes(i);for(var o=new Uint8Array(i),s=0;s=0);return f},r.prototype._randrange=function(i,o){var s=o.sub(i);return i.add(this._randbelow(s))},r.prototype.test=function(i,o,s){var f=i.bitLength(),d=t.mont(i),p=new t(1).toRed(d);o||(o=Math.max(1,f/48|0));for(var b=i.subn(1),v=0;!b.testn(v);v++);for(var A=i.shrn(v),_=b.toRed(d),S=!0;o>0;o--){var P=this._randrange(new t(2),b);s&&s(P);var I=P.toRed(d).redPow(A);if(!(I.cmp(p)===0||I.cmp(_)===0)){for(var C=1;C0;o--){var _=this._randrange(new t(2),p),S=i.gcd(_);if(S.cmpn(1)!==0)return S;var P=_.toRed(f).redPow(v);if(!(P.cmp(d)===0||P.cmp(A)===0)){for(var I=1;IC;)k.ishrn(1);if(k.isEven()&&k.iadd(o),k.testn(1)||k.iadd(s),T.cmp(s)){if(!T.cmp(f))for(;k.mod(d).cmp(p);)k.iadd(v)}else for(;k.mod(r).cmp(b);)k.iadd(v);if(O=k.shrn(1),S(O)&&S(k)&&P(O)&&P(k)&&i.test(O)&&i.test(k))return k}}return T8}const Xue={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},ele={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},tle={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},rle={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},nle={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},ile={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},ole={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},sle={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},ale={modp1:Xue,modp2:ele,modp5:tle,modp14:rle,modp15:nle,modp16:ile,modp17:ole,modp18:sle};var R8,XT;function fle(){if(XT)return R8;XT=1;var t=hz,e=pz(),r=new e,n=new t(24),i=new t(11),o=new t(10),s=new t(3),f=new t(7),d=mz(),p=o1;R8=S;function b(I,C){return C=C||"utf8",Je.Buffer.isBuffer(I)||(I=new Je.Buffer(I,C)),this._pub=new t(I),this}function v(I,C){return C=C||"utf8",Je.Buffer.isBuffer(I)||(I=new Je.Buffer(I,C)),this._priv=new t(I),this}var A={};function _(I,C){var T=C.toString("hex"),k=[T,I.toString(16)].join("_");if(k in A)return A[k];var O=0;if(I.isEven()||!d.simpleSieve||!d.fermatTest(I)||!r.test(I))return O+=1,T==="02"||T==="05"?O+=8:O+=4,A[k]=O,O;r.test(I.shrn(1))||(O+=2);var D;switch(T){case"02":I.mod(n).cmp(i)&&(O+=8);break;case"05":D=I.mod(o),D.cmp(s)&&D.cmp(f)&&(O+=8);break;default:O+=4}return A[k]=O,O}function S(I,C,T){this.setGenerator(C),this.__prime=new t(I),this._prime=t.mont(this.__prime),this._primeLen=I.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,T?(this.setPublicKey=b,this.setPrivateKey=v):this._primeCode=8}Object.defineProperty(S.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=_(this.__prime,this.__gen)),this._primeCode}}),S.prototype.generateKeys=function(){return this._priv||(this._priv=new t(p(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},S.prototype.computeSecret=function(I){I=new t(I),I=I.toRed(this._prime);var C=I.redPow(this._priv).fromRed(),T=new Je.Buffer(C.toArray()),k=this.getPrime();if(T.length0?l:h},o.min=function(l,h){return l.cmp(h)<0?l:h},o.prototype._init=function(l,h,m){if(typeof l=="number")return this._initNumber(l,h,m);if(typeof l=="object")return this._initArray(l,h,m);h==="hex"&&(h=16),n(h===(h|0)&&h>=2&&h<=36),l=l.toString().replace(/\s+/g,"");var w=0;l[0]==="-"&&(w++,this.negative=1),w=0;w-=3)y=l[w]|l[w-1]<<8|l[w-2]<<16,this.words[E]|=y<>>26-c&67108863,c+=24,c>=26&&(c-=26,E++);else if(m==="le")for(w=0,E=0;w>>26-c&67108863,c+=24,c>=26&&(c-=26,E++);return this._strip()};function f(u,l){var h=u.charCodeAt(l);if(h>=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;n(!1,"Invalid character in "+u)}function d(u,l,h){var m=f(u,h);return h-1>=l&&(m|=f(u,h-1)<<4),m}o.prototype._parseHex=function(l,h,m){this.length=Math.ceil((l.length-h)/6),this.words=new Array(this.length);for(var w=0;w=h;w-=2)c=d(l,h,w)<=18?(E-=18,y+=1,this.words[y]|=c>>>26):E+=8;else{var g=l.length-h;for(w=g%2===0?h+1:h;w=18?(E-=18,y+=1,this.words[y]|=c>>>26):E+=8}this._strip()};function p(u,l,h,m){for(var w=0,E=0,y=Math.min(u.length,h),c=l;c=49?E=g-49+10:g>=17?E=g-17+10:E=g,n(g>=0&&E1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=v}catch{o.prototype.inspect=v}else o.prototype.inspect=v;function v(){return(this.red?""}var A=["","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"],_=[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],S=[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];o.prototype.toString=function(l,h){l=l||10,h=h|0||1;var m;if(l===16||l==="hex"){m="";for(var w=0,E=0,y=0;y>>24-w&16777215,w+=2,w>=26&&(w-=26,y--),E!==0||y!==this.length-1?m=A[6-g.length]+g+m:m=g+m}for(E!==0&&(m=E.toString(16)+m);m.length%h!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(l===(l|0)&&l>=2&&l<=36){var M=_[l],B=S[l];m="";var L=this.clone();for(L.negative=0;!L.isZero();){var R=L.modrn(B).toString(l);L=L.idivn(B),L.isZero()?m=R+m:m=A[M-R.length]+R+m}for(this.isZero()&&(m="0"+m);m.length%h!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(l,h){return this.toArrayLike(s,l,h)}),o.prototype.toArray=function(l,h){return this.toArrayLike(Array,l,h)};var P=function(l,h){return l.allocUnsafe?l.allocUnsafe(h):new l(h)};o.prototype.toArrayLike=function(l,h,m){this._strip();var w=this.byteLength(),E=m||Math.max(1,w);n(w<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var y=P(l,E),c=h==="le"?"LE":"BE";return this["_toArrayLike"+c](y,w),y},o.prototype._toArrayLikeLE=function(l,h){for(var m=0,w=0,E=0,y=0;E>8&255),m>16&255),y===6?(m>24&255),w=0,y=0):(w=c>>>24,y+=2)}if(m=0&&(l[m--]=c>>8&255),m>=0&&(l[m--]=c>>16&255),y===6?(m>=0&&(l[m--]=c>>24&255),w=0,y=0):(w=c>>>24,y+=2)}if(m>=0)for(l[m--]=w;m>=0;)l[m--]=0},Math.clz32?o.prototype._countBits=function(l){return 32-Math.clz32(l)}:o.prototype._countBits=function(l){var h=l,m=0;return h>=4096&&(m+=13,h>>>=13),h>=64&&(m+=7,h>>>=7),h>=8&&(m+=4,h>>>=4),h>=2&&(m+=2,h>>>=2),m+h},o.prototype._zeroBits=function(l){if(l===0)return 26;var h=l,m=0;return h&8191||(m+=13,h>>>=13),h&127||(m+=7,h>>>=7),h&15||(m+=4,h>>>=4),h&3||(m+=2,h>>>=2),h&1||m++,m},o.prototype.bitLength=function(){var l=this.words[this.length-1],h=this._countBits(l);return(this.length-1)*26+h};function I(u){for(var l=new Array(u.bitLength()),h=0;h>>w&1}return l}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,h=0;hl.length?this.clone().ior(l):l.clone().ior(this)},o.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},o.prototype.iuand=function(l){var h;this.length>l.length?h=l:h=this;for(var m=0;ml.length?this.clone().iand(l):l.clone().iand(this)},o.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},o.prototype.iuxor=function(l){var h,m;this.length>l.length?(h=this,m=l):(h=l,m=this);for(var w=0;wl.length?this.clone().ixor(l):l.clone().ixor(this)},o.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},o.prototype.inotn=function(l){n(typeof l=="number"&&l>=0);var h=Math.ceil(l/26)|0,m=l%26;this._expand(h),m>0&&h--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-m),this._strip()},o.prototype.notn=function(l){return this.clone().inotn(l)},o.prototype.setn=function(l,h){n(typeof l=="number"&&l>=0);var m=l/26|0,w=l%26;return this._expand(m+1),h?this.words[m]=this.words[m]|1<l.length?(m=this,w=l):(m=l,w=this);for(var E=0,y=0;y>>26;for(;E!==0&&y>>26;if(this.length=m.length,E!==0)this.words[this.length]=E,this.length++;else if(m!==this)for(;yl.length?this.clone().iadd(l):l.clone().iadd(this)},o.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var h=this.iadd(l);return l.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var m=this.cmp(l);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,E;m>0?(w=this,E=l):(w=l,E=this);for(var y=0,c=0;c>26,this.words[c]=h&67108863;for(;y!==0&&c>26,this.words[c]=h&67108863;if(y===0&&c>>26,L=g&67108863,R=Math.min(M,l.length-1),F=Math.max(0,M-u.length+1);F<=R;F++){var z=M-F|0;w=u.words[z]|0,E=l.words[F]|0,y=w*E+L,B+=y/67108864|0,L=y&67108863}h.words[M]=L|0,g=B|0}return g!==0?h.words[M]=g|0:h.length--,h._strip()}var T=function(l,h,m){var w=l.words,E=h.words,y=m.words,c=0,g,M,B,L=w[0]|0,R=L&8191,F=L>>>13,z=w[1]|0,K=z&8191,q=z>>>13,Q=w[2]|0,G=Q&8191,H=Q>>>13,ee=w[3]|0,ue=ee&8191,fe=ee>>>13,he=w[4]|0,He=he&8191,be=he>>>13,oe=w[5]|0,Xe=oe&8191,Ee=oe>>>13,ye=w[6]|0,it=ye&8191,Pe=ye>>>13,Te=w[7]|0,lt=Te&8191,j=Te>>>13,N=w[8]|0,$=N&8191,J=N>>>13,te=w[9]|0,me=te&8191,ne=te>>>13,we=E[0]|0,tt=we&8191,ve=we>>>13,Ie=E[1]|0,Qe=Ie&8191,ke=Ie>>>13,$e=E[2]|0,le=$e&8191,re=$e>>>13,ae=E[3]|0,Ue=ae&8191,de=ae>>>13,Ae=E[4]|0,We=Ae&8191,pe=Ae>>>13,ge=E[5]|0,Ze=ge&8191,Me=ge>>>13,Se=E[6]|0,rt=Se&8191,xe=Se>>>13,Be=E[7]|0,gt=Be&8191,Re=Be>>>13,De=E[8]|0,wt=De&8191,Ce=De>>>13,Le=E[9]|0,bt=Le&8191,yt=Le>>>13;m.negative=l.negative^h.negative,m.length=19,g=Math.imul(R,tt),M=Math.imul(R,ve),M=M+Math.imul(F,tt)|0,B=Math.imul(F,ve);var Ot=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,g=Math.imul(K,tt),M=Math.imul(K,ve),M=M+Math.imul(q,tt)|0,B=Math.imul(q,ve),g=g+Math.imul(R,Qe)|0,M=M+Math.imul(R,ke)|0,M=M+Math.imul(F,Qe)|0,B=B+Math.imul(F,ke)|0;var kt=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(kt>>>26)|0,kt&=67108863,g=Math.imul(G,tt),M=Math.imul(G,ve),M=M+Math.imul(H,tt)|0,B=Math.imul(H,ve),g=g+Math.imul(K,Qe)|0,M=M+Math.imul(K,ke)|0,M=M+Math.imul(q,Qe)|0,B=B+Math.imul(q,ke)|0,g=g+Math.imul(R,le)|0,M=M+Math.imul(R,re)|0,M=M+Math.imul(F,le)|0,B=B+Math.imul(F,re)|0;var ct=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(ct>>>26)|0,ct&=67108863,g=Math.imul(ue,tt),M=Math.imul(ue,ve),M=M+Math.imul(fe,tt)|0,B=Math.imul(fe,ve),g=g+Math.imul(G,Qe)|0,M=M+Math.imul(G,ke)|0,M=M+Math.imul(H,Qe)|0,B=B+Math.imul(H,ke)|0,g=g+Math.imul(K,le)|0,M=M+Math.imul(K,re)|0,M=M+Math.imul(q,le)|0,B=B+Math.imul(q,re)|0,g=g+Math.imul(R,Ue)|0,M=M+Math.imul(R,de)|0,M=M+Math.imul(F,Ue)|0,B=B+Math.imul(F,de)|0;var St=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(St>>>26)|0,St&=67108863,g=Math.imul(He,tt),M=Math.imul(He,ve),M=M+Math.imul(be,tt)|0,B=Math.imul(be,ve),g=g+Math.imul(ue,Qe)|0,M=M+Math.imul(ue,ke)|0,M=M+Math.imul(fe,Qe)|0,B=B+Math.imul(fe,ke)|0,g=g+Math.imul(G,le)|0,M=M+Math.imul(G,re)|0,M=M+Math.imul(H,le)|0,B=B+Math.imul(H,re)|0,g=g+Math.imul(K,Ue)|0,M=M+Math.imul(K,de)|0,M=M+Math.imul(q,Ue)|0,B=B+Math.imul(q,de)|0,g=g+Math.imul(R,We)|0,M=M+Math.imul(R,pe)|0,M=M+Math.imul(F,We)|0,B=B+Math.imul(F,pe)|0;var vt=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(vt>>>26)|0,vt&=67108863,g=Math.imul(Xe,tt),M=Math.imul(Xe,ve),M=M+Math.imul(Ee,tt)|0,B=Math.imul(Ee,ve),g=g+Math.imul(He,Qe)|0,M=M+Math.imul(He,ke)|0,M=M+Math.imul(be,Qe)|0,B=B+Math.imul(be,ke)|0,g=g+Math.imul(ue,le)|0,M=M+Math.imul(ue,re)|0,M=M+Math.imul(fe,le)|0,B=B+Math.imul(fe,re)|0,g=g+Math.imul(G,Ue)|0,M=M+Math.imul(G,de)|0,M=M+Math.imul(H,Ue)|0,B=B+Math.imul(H,de)|0,g=g+Math.imul(K,We)|0,M=M+Math.imul(K,pe)|0,M=M+Math.imul(q,We)|0,B=B+Math.imul(q,pe)|0,g=g+Math.imul(R,Ze)|0,M=M+Math.imul(R,Me)|0,M=M+Math.imul(F,Ze)|0,B=B+Math.imul(F,Me)|0;var zt=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(zt>>>26)|0,zt&=67108863,g=Math.imul(it,tt),M=Math.imul(it,ve),M=M+Math.imul(Pe,tt)|0,B=Math.imul(Pe,ve),g=g+Math.imul(Xe,Qe)|0,M=M+Math.imul(Xe,ke)|0,M=M+Math.imul(Ee,Qe)|0,B=B+Math.imul(Ee,ke)|0,g=g+Math.imul(He,le)|0,M=M+Math.imul(He,re)|0,M=M+Math.imul(be,le)|0,B=B+Math.imul(be,re)|0,g=g+Math.imul(ue,Ue)|0,M=M+Math.imul(ue,de)|0,M=M+Math.imul(fe,Ue)|0,B=B+Math.imul(fe,de)|0,g=g+Math.imul(G,We)|0,M=M+Math.imul(G,pe)|0,M=M+Math.imul(H,We)|0,B=B+Math.imul(H,pe)|0,g=g+Math.imul(K,Ze)|0,M=M+Math.imul(K,Me)|0,M=M+Math.imul(q,Ze)|0,B=B+Math.imul(q,Me)|0,g=g+Math.imul(R,rt)|0,M=M+Math.imul(R,xe)|0,M=M+Math.imul(F,rt)|0,B=B+Math.imul(F,xe)|0;var Yt=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,g=Math.imul(lt,tt),M=Math.imul(lt,ve),M=M+Math.imul(j,tt)|0,B=Math.imul(j,ve),g=g+Math.imul(it,Qe)|0,M=M+Math.imul(it,ke)|0,M=M+Math.imul(Pe,Qe)|0,B=B+Math.imul(Pe,ke)|0,g=g+Math.imul(Xe,le)|0,M=M+Math.imul(Xe,re)|0,M=M+Math.imul(Ee,le)|0,B=B+Math.imul(Ee,re)|0,g=g+Math.imul(He,Ue)|0,M=M+Math.imul(He,de)|0,M=M+Math.imul(be,Ue)|0,B=B+Math.imul(be,de)|0,g=g+Math.imul(ue,We)|0,M=M+Math.imul(ue,pe)|0,M=M+Math.imul(fe,We)|0,B=B+Math.imul(fe,pe)|0,g=g+Math.imul(G,Ze)|0,M=M+Math.imul(G,Me)|0,M=M+Math.imul(H,Ze)|0,B=B+Math.imul(H,Me)|0,g=g+Math.imul(K,rt)|0,M=M+Math.imul(K,xe)|0,M=M+Math.imul(q,rt)|0,B=B+Math.imul(q,xe)|0,g=g+Math.imul(R,gt)|0,M=M+Math.imul(R,Re)|0,M=M+Math.imul(F,gt)|0,B=B+Math.imul(F,Re)|0;var Xt=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,g=Math.imul($,tt),M=Math.imul($,ve),M=M+Math.imul(J,tt)|0,B=Math.imul(J,ve),g=g+Math.imul(lt,Qe)|0,M=M+Math.imul(lt,ke)|0,M=M+Math.imul(j,Qe)|0,B=B+Math.imul(j,ke)|0,g=g+Math.imul(it,le)|0,M=M+Math.imul(it,re)|0,M=M+Math.imul(Pe,le)|0,B=B+Math.imul(Pe,re)|0,g=g+Math.imul(Xe,Ue)|0,M=M+Math.imul(Xe,de)|0,M=M+Math.imul(Ee,Ue)|0,B=B+Math.imul(Ee,de)|0,g=g+Math.imul(He,We)|0,M=M+Math.imul(He,pe)|0,M=M+Math.imul(be,We)|0,B=B+Math.imul(be,pe)|0,g=g+Math.imul(ue,Ze)|0,M=M+Math.imul(ue,Me)|0,M=M+Math.imul(fe,Ze)|0,B=B+Math.imul(fe,Me)|0,g=g+Math.imul(G,rt)|0,M=M+Math.imul(G,xe)|0,M=M+Math.imul(H,rt)|0,B=B+Math.imul(H,xe)|0,g=g+Math.imul(K,gt)|0,M=M+Math.imul(K,Re)|0,M=M+Math.imul(q,gt)|0,B=B+Math.imul(q,Re)|0,g=g+Math.imul(R,wt)|0,M=M+Math.imul(R,Ce)|0,M=M+Math.imul(F,wt)|0,B=B+Math.imul(F,Ce)|0;var or=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(or>>>26)|0,or&=67108863,g=Math.imul(me,tt),M=Math.imul(me,ve),M=M+Math.imul(ne,tt)|0,B=Math.imul(ne,ve),g=g+Math.imul($,Qe)|0,M=M+Math.imul($,ke)|0,M=M+Math.imul(J,Qe)|0,B=B+Math.imul(J,ke)|0,g=g+Math.imul(lt,le)|0,M=M+Math.imul(lt,re)|0,M=M+Math.imul(j,le)|0,B=B+Math.imul(j,re)|0,g=g+Math.imul(it,Ue)|0,M=M+Math.imul(it,de)|0,M=M+Math.imul(Pe,Ue)|0,B=B+Math.imul(Pe,de)|0,g=g+Math.imul(Xe,We)|0,M=M+Math.imul(Xe,pe)|0,M=M+Math.imul(Ee,We)|0,B=B+Math.imul(Ee,pe)|0,g=g+Math.imul(He,Ze)|0,M=M+Math.imul(He,Me)|0,M=M+Math.imul(be,Ze)|0,B=B+Math.imul(be,Me)|0,g=g+Math.imul(ue,rt)|0,M=M+Math.imul(ue,xe)|0,M=M+Math.imul(fe,rt)|0,B=B+Math.imul(fe,xe)|0,g=g+Math.imul(G,gt)|0,M=M+Math.imul(G,Re)|0,M=M+Math.imul(H,gt)|0,B=B+Math.imul(H,Re)|0,g=g+Math.imul(K,wt)|0,M=M+Math.imul(K,Ce)|0,M=M+Math.imul(q,wt)|0,B=B+Math.imul(q,Ce)|0,g=g+Math.imul(R,bt)|0,M=M+Math.imul(R,yt)|0,M=M+Math.imul(F,bt)|0,B=B+Math.imul(F,yt)|0;var sr=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(sr>>>26)|0,sr&=67108863,g=Math.imul(me,Qe),M=Math.imul(me,ke),M=M+Math.imul(ne,Qe)|0,B=Math.imul(ne,ke),g=g+Math.imul($,le)|0,M=M+Math.imul($,re)|0,M=M+Math.imul(J,le)|0,B=B+Math.imul(J,re)|0,g=g+Math.imul(lt,Ue)|0,M=M+Math.imul(lt,de)|0,M=M+Math.imul(j,Ue)|0,B=B+Math.imul(j,de)|0,g=g+Math.imul(it,We)|0,M=M+Math.imul(it,pe)|0,M=M+Math.imul(Pe,We)|0,B=B+Math.imul(Pe,pe)|0,g=g+Math.imul(Xe,Ze)|0,M=M+Math.imul(Xe,Me)|0,M=M+Math.imul(Ee,Ze)|0,B=B+Math.imul(Ee,Me)|0,g=g+Math.imul(He,rt)|0,M=M+Math.imul(He,xe)|0,M=M+Math.imul(be,rt)|0,B=B+Math.imul(be,xe)|0,g=g+Math.imul(ue,gt)|0,M=M+Math.imul(ue,Re)|0,M=M+Math.imul(fe,gt)|0,B=B+Math.imul(fe,Re)|0,g=g+Math.imul(G,wt)|0,M=M+Math.imul(G,Ce)|0,M=M+Math.imul(H,wt)|0,B=B+Math.imul(H,Ce)|0,g=g+Math.imul(K,bt)|0,M=M+Math.imul(K,yt)|0,M=M+Math.imul(q,bt)|0,B=B+Math.imul(q,yt)|0;var ar=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(ar>>>26)|0,ar&=67108863,g=Math.imul(me,le),M=Math.imul(me,re),M=M+Math.imul(ne,le)|0,B=Math.imul(ne,re),g=g+Math.imul($,Ue)|0,M=M+Math.imul($,de)|0,M=M+Math.imul(J,Ue)|0,B=B+Math.imul(J,de)|0,g=g+Math.imul(lt,We)|0,M=M+Math.imul(lt,pe)|0,M=M+Math.imul(j,We)|0,B=B+Math.imul(j,pe)|0,g=g+Math.imul(it,Ze)|0,M=M+Math.imul(it,Me)|0,M=M+Math.imul(Pe,Ze)|0,B=B+Math.imul(Pe,Me)|0,g=g+Math.imul(Xe,rt)|0,M=M+Math.imul(Xe,xe)|0,M=M+Math.imul(Ee,rt)|0,B=B+Math.imul(Ee,xe)|0,g=g+Math.imul(He,gt)|0,M=M+Math.imul(He,Re)|0,M=M+Math.imul(be,gt)|0,B=B+Math.imul(be,Re)|0,g=g+Math.imul(ue,wt)|0,M=M+Math.imul(ue,Ce)|0,M=M+Math.imul(fe,wt)|0,B=B+Math.imul(fe,Ce)|0,g=g+Math.imul(G,bt)|0,M=M+Math.imul(G,yt)|0,M=M+Math.imul(H,bt)|0,B=B+Math.imul(H,yt)|0;var fr=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(fr>>>26)|0,fr&=67108863,g=Math.imul(me,Ue),M=Math.imul(me,de),M=M+Math.imul(ne,Ue)|0,B=Math.imul(ne,de),g=g+Math.imul($,We)|0,M=M+Math.imul($,pe)|0,M=M+Math.imul(J,We)|0,B=B+Math.imul(J,pe)|0,g=g+Math.imul(lt,Ze)|0,M=M+Math.imul(lt,Me)|0,M=M+Math.imul(j,Ze)|0,B=B+Math.imul(j,Me)|0,g=g+Math.imul(it,rt)|0,M=M+Math.imul(it,xe)|0,M=M+Math.imul(Pe,rt)|0,B=B+Math.imul(Pe,xe)|0,g=g+Math.imul(Xe,gt)|0,M=M+Math.imul(Xe,Re)|0,M=M+Math.imul(Ee,gt)|0,B=B+Math.imul(Ee,Re)|0,g=g+Math.imul(He,wt)|0,M=M+Math.imul(He,Ce)|0,M=M+Math.imul(be,wt)|0,B=B+Math.imul(be,Ce)|0,g=g+Math.imul(ue,bt)|0,M=M+Math.imul(ue,yt)|0,M=M+Math.imul(fe,bt)|0,B=B+Math.imul(fe,yt)|0;var cr=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(cr>>>26)|0,cr&=67108863,g=Math.imul(me,We),M=Math.imul(me,pe),M=M+Math.imul(ne,We)|0,B=Math.imul(ne,pe),g=g+Math.imul($,Ze)|0,M=M+Math.imul($,Me)|0,M=M+Math.imul(J,Ze)|0,B=B+Math.imul(J,Me)|0,g=g+Math.imul(lt,rt)|0,M=M+Math.imul(lt,xe)|0,M=M+Math.imul(j,rt)|0,B=B+Math.imul(j,xe)|0,g=g+Math.imul(it,gt)|0,M=M+Math.imul(it,Re)|0,M=M+Math.imul(Pe,gt)|0,B=B+Math.imul(Pe,Re)|0,g=g+Math.imul(Xe,wt)|0,M=M+Math.imul(Xe,Ce)|0,M=M+Math.imul(Ee,wt)|0,B=B+Math.imul(Ee,Ce)|0,g=g+Math.imul(He,bt)|0,M=M+Math.imul(He,yt)|0,M=M+Math.imul(be,bt)|0,B=B+Math.imul(be,yt)|0;var ur=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(ur>>>26)|0,ur&=67108863,g=Math.imul(me,Ze),M=Math.imul(me,Me),M=M+Math.imul(ne,Ze)|0,B=Math.imul(ne,Me),g=g+Math.imul($,rt)|0,M=M+Math.imul($,xe)|0,M=M+Math.imul(J,rt)|0,B=B+Math.imul(J,xe)|0,g=g+Math.imul(lt,gt)|0,M=M+Math.imul(lt,Re)|0,M=M+Math.imul(j,gt)|0,B=B+Math.imul(j,Re)|0,g=g+Math.imul(it,wt)|0,M=M+Math.imul(it,Ce)|0,M=M+Math.imul(Pe,wt)|0,B=B+Math.imul(Pe,Ce)|0,g=g+Math.imul(Xe,bt)|0,M=M+Math.imul(Xe,yt)|0,M=M+Math.imul(Ee,bt)|0,B=B+Math.imul(Ee,yt)|0;var lr=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(lr>>>26)|0,lr&=67108863,g=Math.imul(me,rt),M=Math.imul(me,xe),M=M+Math.imul(ne,rt)|0,B=Math.imul(ne,xe),g=g+Math.imul($,gt)|0,M=M+Math.imul($,Re)|0,M=M+Math.imul(J,gt)|0,B=B+Math.imul(J,Re)|0,g=g+Math.imul(lt,wt)|0,M=M+Math.imul(lt,Ce)|0,M=M+Math.imul(j,wt)|0,B=B+Math.imul(j,Ce)|0,g=g+Math.imul(it,bt)|0,M=M+Math.imul(it,yt)|0,M=M+Math.imul(Pe,bt)|0,B=B+Math.imul(Pe,yt)|0;var dr=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(dr>>>26)|0,dr&=67108863,g=Math.imul(me,gt),M=Math.imul(me,Re),M=M+Math.imul(ne,gt)|0,B=Math.imul(ne,Re),g=g+Math.imul($,wt)|0,M=M+Math.imul($,Ce)|0,M=M+Math.imul(J,wt)|0,B=B+Math.imul(J,Ce)|0,g=g+Math.imul(lt,bt)|0,M=M+Math.imul(lt,yt)|0,M=M+Math.imul(j,bt)|0,B=B+Math.imul(j,yt)|0;var hr=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(hr>>>26)|0,hr&=67108863,g=Math.imul(me,wt),M=Math.imul(me,Ce),M=M+Math.imul(ne,wt)|0,B=Math.imul(ne,Ce),g=g+Math.imul($,bt)|0,M=M+Math.imul($,yt)|0,M=M+Math.imul(J,bt)|0,B=B+Math.imul(J,yt)|0;var s3=(c+g|0)+((M&8191)<<13)|0;c=(B+(M>>>13)|0)+(s3>>>26)|0,s3&=67108863,g=Math.imul(me,bt),M=Math.imul(me,yt),M=M+Math.imul(ne,bt)|0,B=Math.imul(ne,yt);var a3=(c+g|0)+((M&8191)<<13)|0;return c=(B+(M>>>13)|0)+(a3>>>26)|0,a3&=67108863,y[0]=Ot,y[1]=kt,y[2]=ct,y[3]=St,y[4]=vt,y[5]=zt,y[6]=Yt,y[7]=Xt,y[8]=or,y[9]=sr,y[10]=ar,y[11]=fr,y[12]=cr,y[13]=ur,y[14]=lr,y[15]=dr,y[16]=hr,y[17]=s3,y[18]=a3,c!==0&&(y[19]=c,m.length++),m};Math.imul||(T=C);function k(u,l,h){h.negative=l.negative^u.negative,h.length=u.length+l.length;for(var m=0,w=0,E=0;E>>26)|0,w+=y>>>26,y&=67108863}h.words[E]=c,m=y,y=w}return m!==0?h.words[E]=m:h.length--,h._strip()}function O(u,l,h){return k(u,l,h)}o.prototype.mulTo=function(l,h){var m,w=this.length+l.length;return this.length===10&&l.length===10?m=T(this,l,h):w<63?m=C(this,l,h):w<1024?m=k(this,l,h):m=O(this,l,h),m},o.prototype.mul=function(l){var h=new o(null);return h.words=new Array(this.length+l.length),this.mulTo(l,h)},o.prototype.mulf=function(l){var h=new o(null);return h.words=new Array(this.length+l.length),O(this,l,h)},o.prototype.imul=function(l){return this.clone().mulTo(l,this)},o.prototype.imuln=function(l){var h=l<0;h&&(l=-l),n(typeof l=="number"),n(l<67108864);for(var m=0,w=0;w>=26,m+=E/67108864|0,m+=y>>>26,this.words[w]=y&67108863}return m!==0&&(this.words[w]=m,this.length++),h?this.ineg():this},o.prototype.muln=function(l){return this.clone().imuln(l)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(l){var h=I(l);if(h.length===0)return new o(1);for(var m=this,w=0;w=0);var h=l%26,m=(l-h)/26,w=67108863>>>26-h<<26-h,E;if(h!==0){var y=0;for(E=0;E>>26-h}y&&(this.words[E]=y,this.length++)}if(m!==0){for(E=this.length-1;E>=0;E--)this.words[E+m]=this.words[E];for(E=0;E=0);var w;h?w=(h-h%26)/26:w=0;var E=l%26,y=Math.min((l-E)/26,this.length),c=67108863^67108863>>>E<y)for(this.length-=y,M=0;M=0&&(B!==0||M>=w);M--){var L=this.words[M]|0;this.words[M]=B<<26-E|L>>>E,B=L&c}return g&&B!==0&&(g.words[g.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(l,h,m){return n(this.negative===0),this.iushrn(l,h,m)},o.prototype.shln=function(l){return this.clone().ishln(l)},o.prototype.ushln=function(l){return this.clone().iushln(l)},o.prototype.shrn=function(l){return this.clone().ishrn(l)},o.prototype.ushrn=function(l){return this.clone().iushrn(l)},o.prototype.testn=function(l){n(typeof l=="number"&&l>=0);var h=l%26,m=(l-h)/26,w=1<=0);var h=l%26,m=(l-h)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(h!==0&&m++,this.length=Math.min(m,this.length),h!==0){var w=67108863^67108863>>>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},o.prototype.isubn=function(l){if(n(typeof l=="number"),n(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(g/67108864|0),this.words[E+m]=y&67108863}for(;E>26,this.words[E+m]=y&67108863;if(c===0)return this._strip();for(n(c===-1),c=0,E=0;E>26,this.words[E]=y&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(l,h){var m=this.length-l.length,w=this.clone(),E=l,y=E.words[E.length-1]|0,c=this._countBits(y);m=26-c,m!==0&&(E=E.ushln(m),w.iushln(m),y=E.words[E.length-1]|0);var g=w.length-E.length,M;if(h!=="mod"){M=new o(null),M.length=g+1,M.words=new Array(M.length);for(var B=0;B=0;R--){var F=(w.words[E.length+R]|0)*67108864+(w.words[E.length+R-1]|0);for(F=Math.min(F/y|0,67108863),w._ishlnsubmul(E,F,R);w.negative!==0;)F--,w.negative=0,w._ishlnsubmul(E,1,R),w.isZero()||(w.negative^=1);M&&(M.words[R]=F)}return M&&M._strip(),w._strip(),h!=="div"&&m!==0&&w.iushrn(m),{div:M||null,mod:w}},o.prototype.divmod=function(l,h,m){if(n(!l.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var w,E,y;return this.negative!==0&&l.negative===0?(y=this.neg().divmod(l,h),h!=="mod"&&(w=y.div.neg()),h!=="div"&&(E=y.mod.neg(),m&&E.negative!==0&&E.iadd(l)),{div:w,mod:E}):this.negative===0&&l.negative!==0?(y=this.divmod(l.neg(),h),h!=="mod"&&(w=y.div.neg()),{div:w,mod:y.mod}):this.negative&l.negative?(y=this.neg().divmod(l.neg(),h),h!=="div"&&(E=y.mod.neg(),m&&E.negative!==0&&E.isub(l)),{div:y.div,mod:E}):l.length>this.length||this.cmp(l)<0?{div:new o(0),mod:this}:l.length===1?h==="div"?{div:this.divn(l.words[0]),mod:null}:h==="mod"?{div:null,mod:new o(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new o(this.modrn(l.words[0]))}:this._wordDiv(l,h)},o.prototype.div=function(l){return this.divmod(l,"div",!1).div},o.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},o.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},o.prototype.divRound=function(l){var h=this.divmod(l);if(h.mod.isZero())return h.div;var m=h.div.negative!==0?h.mod.isub(l):h.mod,w=l.ushrn(1),E=l.andln(1),y=m.cmp(w);return y<0||E===1&&y===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},o.prototype.modrn=function(l){var h=l<0;h&&(l=-l),n(l<=67108863);for(var m=(1<<26)%l,w=0,E=this.length-1;E>=0;E--)w=(m*w+(this.words[E]|0))%l;return h?-w:w},o.prototype.modn=function(l){return this.modrn(l)},o.prototype.idivn=function(l){var h=l<0;h&&(l=-l),n(l<=67108863);for(var m=0,w=this.length-1;w>=0;w--){var E=(this.words[w]|0)+m*67108864;this.words[w]=E/l|0,m=E%l}return this._strip(),h?this.ineg():this},o.prototype.divn=function(l){return this.clone().idivn(l)},o.prototype.egcd=function(l){n(l.negative===0),n(!l.isZero());var h=this,m=l.clone();h.negative!==0?h=h.umod(l):h=h.clone();for(var w=new o(1),E=new o(0),y=new o(0),c=new o(1),g=0;h.isEven()&&m.isEven();)h.iushrn(1),m.iushrn(1),++g;for(var M=m.clone(),B=h.clone();!h.isZero();){for(var L=0,R=1;!(h.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(h.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(M),E.isub(B)),w.iushrn(1),E.iushrn(1);for(var F=0,z=1;!(m.words[0]&z)&&F<26;++F,z<<=1);if(F>0)for(m.iushrn(F);F-- >0;)(y.isOdd()||c.isOdd())&&(y.iadd(M),c.isub(B)),y.iushrn(1),c.iushrn(1);h.cmp(m)>=0?(h.isub(m),w.isub(y),E.isub(c)):(m.isub(h),y.isub(w),c.isub(E))}return{a:y,b:c,gcd:m.iushln(g)}},o.prototype._invmp=function(l){n(l.negative===0),n(!l.isZero());var h=this,m=l.clone();h.negative!==0?h=h.umod(l):h=h.clone();for(var w=new o(1),E=new o(0),y=m.clone();h.cmpn(1)>0&&m.cmpn(1)>0;){for(var c=0,g=1;!(h.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(h.iushrn(c);c-- >0;)w.isOdd()&&w.iadd(y),w.iushrn(1);for(var M=0,B=1;!(m.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(m.iushrn(M);M-- >0;)E.isOdd()&&E.iadd(y),E.iushrn(1);h.cmp(m)>=0?(h.isub(m),w.isub(E)):(m.isub(h),E.isub(w))}var L;return h.cmpn(1)===0?L=w:L=E,L.cmpn(0)<0&&L.iadd(l),L},o.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var h=this.clone(),m=l.clone();h.negative=0,m.negative=0;for(var w=0;h.isEven()&&m.isEven();w++)h.iushrn(1),m.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;m.isEven();)m.iushrn(1);var E=h.cmp(m);if(E<0){var y=h;h=m,m=y}else if(E===0||m.cmpn(1)===0)break;h.isub(m)}while(!0);return m.iushln(w)},o.prototype.invm=function(l){return this.egcd(l).a.umod(l)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(l){return this.words[0]&l},o.prototype.bincn=function(l){n(typeof l=="number");var h=l%26,m=(l-h)/26,w=1<>>26,c&=67108863,this.words[y]=c}return E!==0&&(this.words[y]=E,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(l){var h=l<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this._strip();var m;if(this.length>1)m=1;else{h&&(l=-l),n(l<=67108863,"Number is too big");var w=this.words[0]|0;m=w===l?0:wl.length)return 1;if(this.length=0;m--){var w=this.words[m]|0,E=l.words[m]|0;if(w!==E){wE&&(h=1);break}}return h},o.prototype.gtn=function(l){return this.cmpn(l)===1},o.prototype.gt=function(l){return this.cmp(l)===1},o.prototype.gten=function(l){return this.cmpn(l)>=0},o.prototype.gte=function(l){return this.cmp(l)>=0},o.prototype.ltn=function(l){return this.cmpn(l)===-1},o.prototype.lt=function(l){return this.cmp(l)===-1},o.prototype.lten=function(l){return this.cmpn(l)<=0},o.prototype.lte=function(l){return this.cmp(l)<=0},o.prototype.eqn=function(l){return this.cmpn(l)===0},o.prototype.eq=function(l){return this.cmp(l)===0},o.red=function(l){return new x(l)},o.prototype.toRed=function(l){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(l){return this.red=l,this},o.prototype.forceRed=function(l){return n(!this.red,"Already a number in reduction context"),this._forceRed(l)},o.prototype.redAdd=function(l){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},o.prototype.redIAdd=function(l){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},o.prototype.redSub=function(l){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},o.prototype.redISub=function(l){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},o.prototype.redShl=function(l){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},o.prototype.redMul=function(l){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},o.prototype.redIMul=function(l){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(l){return n(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var D={k256:null,p224:null,p192:null,p25519:null};function U(u,l){this.name=u,this.p=new o(l,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}U.prototype._tmp=function(){var l=new o(null);return l.words=new Array(Math.ceil(this.n/13)),l},U.prototype.ireduce=function(l){var h=l,m;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),m=h.bitLength();while(m>this.n);var w=m0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},U.prototype.split=function(l,h){l.iushrn(this.n,0,h)},U.prototype.imulK=function(l){return l.imul(this.k)};function V(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(V,U),V.prototype.split=function(l,h){for(var m=4194303,w=Math.min(l.length,9),E=0;E>>22,y=c}y>>>=22,l.words[E-10]=y,y===0&&l.length>10?l.length-=10:l.length-=9},V.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var h=0,m=0;m>>=26,l.words[m]=E,h=w}return h!==0&&(l.words[l.length++]=h),l},o._prime=function(l){if(D[l])return D[l];var h;if(l==="k256")h=new V;else if(l==="p224")h=new Y;else if(l==="p192")h=new W;else if(l==="p25519")h=new ie;else throw new Error("Unknown prime "+l);return D[l]=h,h};function x(u){if(typeof u=="string"){var l=o._prime(u);this.m=l.p,this.prime=l}else n(u.gtn(1),"modulus must be greater than 1"),this.m=u,this.prime=null}x.prototype._verify1=function(l){n(l.negative===0,"red works only with positives"),n(l.red,"red works only with red numbers")},x.prototype._verify2=function(l,h){n((l.negative|h.negative)===0,"red works only with positives"),n(l.red&&l.red===h.red,"red works only with red numbers")},x.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(b(l,l.umod(this.m)._forceRed(this)),l)},x.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},x.prototype.add=function(l,h){this._verify2(l,h);var m=l.add(h);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},x.prototype.iadd=function(l,h){this._verify2(l,h);var m=l.iadd(h);return m.cmp(this.m)>=0&&m.isub(this.m),m},x.prototype.sub=function(l,h){this._verify2(l,h);var m=l.sub(h);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},x.prototype.isub=function(l,h){this._verify2(l,h);var m=l.isub(h);return m.cmpn(0)<0&&m.iadd(this.m),m},x.prototype.shl=function(l,h){return this._verify1(l),this.imod(l.ushln(h))},x.prototype.imul=function(l,h){return this._verify2(l,h),this.imod(l.imul(h))},x.prototype.mul=function(l,h){return this._verify2(l,h),this.imod(l.mul(h))},x.prototype.isqr=function(l){return this.imul(l,l.clone())},x.prototype.sqr=function(l){return this.mul(l,l)},x.prototype.sqrt=function(l){if(l.isZero())return l.clone();var h=this.m.andln(3);if(n(h%2===1),h===3){var m=this.m.add(new o(1)).iushrn(2);return this.pow(l,m)}for(var w=this.m.subn(1),E=0;!w.isZero()&&w.andln(1)===0;)E++,w.iushrn(1);n(!w.isZero());var y=new o(1).toRed(this),c=y.redNeg(),g=this.m.subn(1).iushrn(1),M=this.m.bitLength();for(M=new o(2*M*M).toRed(this);this.pow(M,g).cmp(c)!==0;)M.redIAdd(c);for(var B=this.pow(M,w),L=this.pow(l,w.addn(1).iushrn(1)),R=this.pow(l,w),F=E;R.cmp(y)!==0;){for(var z=R,K=0;z.cmp(y)!==0;K++)z=z.redSqr();n(K=0;E--){for(var B=h.words[E],L=M-1;L>=0;L--){var R=B>>L&1;if(y!==w[0]&&(y=this.sqr(y)),R===0&&c===0){g=0;continue}c<<=1,c|=R,g++,!(g!==m&&(E!==0||L!==0))&&(y=this.mul(y,w[c]),g=0,c=0)}M=26}return y},x.prototype.convertTo=function(l){var h=l.umod(this.m);return h===l?h.clone():h},x.prototype.convertFrom=function(l){var h=l.clone();return h.red=null,h},o.mont=function(l){return new a(l)};function a(u){x.call(this,u),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(a,x),a.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},a.prototype.convertFrom=function(l){var h=this.imod(l.mul(this.rinv));return h.red=null,h},a.prototype.imul=function(l,h){if(l.isZero()||h.isZero())return l.words[0]=0,l.length=1,l;var m=l.imul(h),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=m.isub(w).iushrn(this.shift),y=E;return E.cmp(this.m)>=0?y=E.isub(this.m):E.cmpn(0)<0&&(y=E.iadd(this.m)),y._forceRed(this)},a.prototype.mul=function(l,h){if(l.isZero()||h.isZero())return new o(0)._forceRed(this);var m=l.mul(h),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=m.isub(w).iushrn(this.shift),y=E;return E.cmp(this.m)>=0?y=E.isub(this.m):E.cmpn(0)<0&&(y=E.iadd(this.m)),y._forceRed(this)},a.prototype.invm=function(l){var h=this.imod(l._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(t,et)})(vM);var Dw=vM.exports;const _t=es(Dw);var Jd=Dw,ule=o1;function lle(t){var e=gz(t),r=e.toRed(Jd.mont(t.modulus)).redPow(new Jd(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function gz(t){var e=t.modulus.byteLength(),r;do r=new Jd(ule(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function bz(t,e){var r=lle(e),n=e.modulus.byteLength(),i=new Jd(t).mul(r.blinder).umod(e.modulus),o=i.toRed(Jd.mont(e.prime1)),s=i.toRed(Jd.mont(e.prime2)),f=e.coefficient,d=e.prime1,p=e.prime2,b=o.redPow(e.exponent1).fromRed(),v=s.redPow(e.exponent2).fromRed(),A=b.isub(v).imul(f).umod(d).imul(p);return v.iadd(A).imul(r.unblinder).umod(e.modulus).toArrayLike(Je.Buffer,"be",n)}bz.getr=gz;var wM=bz,k8={};const dle="elliptic",hle="6.5.4",ple="EC cryptography",mle="lib/elliptic.js",gle=["lib"],ble={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/"},yle={type:"git",url:"git@github.com:indutny/elliptic"},vle=["EC","Elliptic","curve","Cryptography"],wle="Fedor Indutny ",xle="MIT",Ele={url:"https://github.com/indutny/elliptic/issues"},Ale="https://github.com/indutny/elliptic",Sle={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"},Mle={"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"},_le={name:dle,version:hle,description:ple,main:mle,files:gle,scripts:ble,repository:yle,keywords:vle,author:wle,license:xle,bugs:Ele,homepage:Ale,devDependencies:Sle,dependencies:Mle};var go={},xM={exports:{}};xM.exports;(function(t){(function(e,r){function n(x,a){if(!x)throw new Error(a||"Assertion failed")}function i(x,a){x.super_=a;var u=function(){};u.prototype=a.prototype,x.prototype=new u,x.prototype.constructor=x}function o(x,a,u){if(o.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&((a==="le"||a==="be")&&(u=a,a=10),this._init(x||0,a||10,u||"be"))}typeof e=="object"?e.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Rn.Buffer}catch{}o.isBN=function(a){return a instanceof o?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===o.wordSize&&Array.isArray(a.words)},o.max=function(a,u){return a.cmp(u)>0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var B=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=B+l:l=b[c-B.length]+B+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,B=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=B;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,B=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,K=h[2]|0,q=K&8191,Q=K>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(B,ne),c=Math.imul(B,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(B,ve)|0,c=c+Math.imul(B,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(B,ke)|0,c=c+Math.imul(B,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(B,re)|0,c=c+Math.imul(B,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(B,de)|0,c=c+Math.imul(B,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(B,pe)|0,c=c+Math.imul(B,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(B,Me)|0,c=c+Math.imul(B,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(B,xe)|0,c=c+Math.imul(B,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(B,Re)|0,c=c+Math.imul(B,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(B,Ce)|0,c=c+Math.imul(B,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;B--){var L=(h.words[m.length+B]|0)*67108864+(h.words[m.length+B-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,B);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,B),h.isZero()||(h.negative^=1);c&&(c.words[B]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,B=1;!(u.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var k={k256:null,p224:null,p192:null,p25519:null};function O(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},O.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},O.prototype.split=function(a,u){a.iushrn(this.n,0,u)},O.prototype.imulK=function(a){return a.imul(this.k)};function D(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,O),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(k[a])return k[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new V;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return k[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),B=this.pow(a,h),L=m;B.cmp(w)!==0;){for(var R=B,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var B=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),B===0&&E===0){y=0;continue}E<<=1,E|=B,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(xM);var nc=xM.exports,EM={};(function(t){var e=t;function r(o,s){if(Array.isArray(o))return o.slice();if(!o)return[];var f=[];if(typeof o!="string"){for(var d=0;d>8,v=p&255;b?f.push(b,v):f.push(v)}return f}e.toArray=r;function n(o){return o.length===1?"0"+o:o}e.zero2=n;function i(o){for(var s="",f=0;f(S>>1)-1?C=(S>>1)-T:C=T,P.isubn(C)):C=0,_[I]=C,P.iushrn(1)}return _}e.getNAF=o;function s(b,v){var A=[[],[]];b=b.clone(),v=v.clone();for(var _=0,S=0,P;b.cmpn(-_)>0||v.cmpn(-S)>0;){var I=b.andln(3)+_&3,C=v.andln(3)+S&3;I===3&&(I=-1),C===3&&(C=-1);var T;I&1?(P=b.andln(7)+_&7,(P===3||P===5)&&C===2?T=-I:T=I):T=0,A[0].push(T);var k;C&1?(P=v.andln(7)+S&7,(P===3||P===5)&&I===2?k=-C:k=C):k=0,A[1].push(k),2*_===T+1&&(_=1-_),2*S===k+1&&(S=1-S),b.iushrn(1),v.iushrn(1)}return A}e.getJSF=s;function f(b,v,A){var _="_"+v;b.prototype[v]=function(){return this[_]!==void 0?this[_]:this[_]=A.call(this)}}e.cachedProperty=f;function d(b){return typeof b=="string"?e.toArray(b,"hex"):b}e.parseBytes=d;function p(b){return new r(b,"hex","le")}e.intFromLE=p})(go);var AM={},J0=nc,qb=go,l6=qb.getNAF,Ple=qb.getJSF,d6=qb.assert;function U0(t,e){this.type=t,this.p=new J0(e.p,16),this.red=e.prime?J0.red(e.prime):J0.mont(this.p),this.zero=new J0(0).toRed(this.red),this.one=new J0(1).toRed(this.red),this.two=new J0(2).toRed(this.red),this.n=e.n&&new J0(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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Fw=U0;U0.prototype.point=function(){throw new Error("Not implemented")};U0.prototype.validate=function(){throw new Error("Not implemented")};U0.prototype._fixedNafMul=function(e,r){d6(e.precomputed);var n=e._getDoubles(),i=l6(r,1,this._bitLength),o=(1<=f;p--)d=(d<<1)+i[p];s.push(d)}for(var b=this.jpoint(null,null,null),v=this.jpoint(null,null,null),A=o;A>0;A--){for(f=0;f=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,f=f.dblp(p),d<0)break;var b=s[d];d6(b!==0),e.type==="affine"?b>0?f=f.mixedAdd(o[b-1>>1]):f=f.mixedAdd(o[-b-1>>1].neg()):b>0?f=f.add(o[b-1>>1]):f=f.add(o[-b-1>>1].neg())}return e.type==="affine"?f.toP():f};U0.prototype._wnafMulAdd=function(e,r,n,i,o){var s=this._wnafT1,f=this._wnafT2,d=this._wnafT3,p=0,b,v,A;for(b=0;b=1;b-=2){var S=b-1,P=b;if(s[S]!==1||s[P]!==1){d[S]=l6(n[S],s[S],this._bitLength),d[P]=l6(n[P],s[P],this._bitLength),p=Math.max(d[S].length,p),p=Math.max(d[P].length,p);continue}var I=[r[S],null,null,r[P]];r[S].y.cmp(r[P].y)===0?(I[1]=r[S].add(r[P]),I[2]=r[S].toJ().mixedAdd(r[P].neg())):r[S].y.cmp(r[P].y.redNeg())===0?(I[1]=r[S].toJ().mixedAdd(r[P]),I[2]=r[S].add(r[P].neg())):(I[1]=r[S].toJ().mixedAdd(r[P]),I[2]=r[S].toJ().mixedAdd(r[P].neg()));var C=[-3,-1,-5,-7,0,7,5,1,3],T=Ple(n[S],n[P]);for(p=Math.max(T[0].length,p),d[S]=new Array(p),d[P]=new Array(p),v=0;v=0;b--){for(var V=0;b>=0;){var Y=!0;for(v=0;v=0&&V++,D=D.dblp(V),b<0)break;for(v=0;v0?A=f[v][W-1>>1]:W<0&&(A=f[v][-W-1>>1].neg()),A.type==="affine"?D=D.mixedAdd(A):D=D.add(A))}}for(b=0;b=Math.ceil((e.bitLength()+1)/r.step):!1};as.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(_=p,S=b),v.negative&&(v=v.neg(),A=A.neg()),_.negative&&(_=_.neg(),S=S.neg()),[{a:v,b:A},{a:_,b:S}]};fs.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],o=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),f=o.mul(n.a),d=s.mul(i.a),p=o.mul(n.b),b=s.mul(i.b),v=e.sub(f).sub(d),A=p.add(b).neg();return{k1:v,k2:A}};fs.prototype.pointFromX=function(e,r){e=new $r(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)};fs.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};fs.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s":""};xn.prototype.isInfinity=function(){return this.inf};xn.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 r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};xn.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 r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),f=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,f)};xn.prototype.getX=function(){return this.x.fromRed()};xn.prototype.getY=function(){return this.y.fromRed()};xn.prototype.mul=function(e){return e=new $r(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)};xn.prototype.mulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};xn.prototype.jmulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};xn.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)};xn.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};xn.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 kn(t,e,r,n){f1.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new $r(0)):(this.x=new $r(e,16),this.y=new $r(r,16),this.z=new $r(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}SM(kn,f1.BasePoint);fs.prototype.jpoint=function(e,r,n){return new kn(this,e,r,n)};kn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};kn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};kn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),o=e.x.redMul(n),s=this.y.redMul(r.redMul(e.z)),f=e.y.redMul(n.redMul(this.z)),d=i.redSub(o),p=s.redSub(f);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var b=d.redSqr(),v=b.redMul(d),A=i.redMul(b),_=p.redSqr().redIAdd(v).redISub(A).redISub(A),S=p.redMul(A.redISub(_)).redISub(s.redMul(v)),P=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,S,P)};kn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),o=this.y,s=e.y.redMul(r).redMul(this.z),f=n.redSub(i),d=o.redSub(s);if(f.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=f.redSqr(),b=p.redMul(f),v=n.redMul(p),A=d.redSqr().redIAdd(b).redISub(v).redISub(v),_=d.redMul(v.redISub(A)).redISub(o.redMul(b)),S=this.z.redMul(f);return this.curve.jpoint(A,_,S)};kn.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};kn.prototype.inspect=function(){return this.isInfinity()?"":""};kn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Td=nc,yz=Rt,$w=Fw,Rle=go;function c1(t){$w.call(this,"mont",t),this.a=new Td(t.a,16).toRed(this.red),this.b=new Td(t.b,16).toRed(this.red),this.i4=new Td(4).toRed(this.red).redInvm(),this.two=new Td(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}yz(c1,$w);var kle=c1;c1.prototype.validate=function(e){var r=e.normalize().x,n=r.redSqr(),i=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),o=i.redSqrt();return o.redSqr().cmp(i)===0};function wn(t,e,r){$w.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Td(e,16),this.z=new Td(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}yz(wn,$w.BasePoint);c1.prototype.decodePoint=function(e,r){return this.point(Rle.toArray(e,r),1)};c1.prototype.point=function(e,r){return new wn(this,e,r)};c1.prototype.pointFromJSON=function(e){return wn.fromJSON(this,e)};wn.prototype.precompute=function(){};wn.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};wn.fromJSON=function(e,r){return new wn(e,r[0],r[1]||e.one)};wn.prototype.inspect=function(){return this.isInfinity()?"":""};wn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};wn.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),n=this.x.redSub(this.z),i=n.redSqr(),o=r.redSub(i),s=r.redMul(i),f=o.redMul(i.redAdd(this.curve.a24.redMul(o)));return this.curve.point(s,f)};wn.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};wn.prototype.diffAdd=function(e,r){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),o=e.x.redAdd(e.z),s=e.x.redSub(e.z),f=s.redMul(n),d=o.redMul(i),p=r.z.redMul(f.redAdd(d).redSqr()),b=r.x.redMul(f.redISub(d).redSqr());return this.curve.point(p,b)};wn.prototype.mul=function(e){for(var r=e.clone(),n=this,i=this.curve.point(null,null),o=this,s=[];r.cmpn(0)!==0;r.iushrn(1))s.push(r.andln(1));for(var f=s.length-1;f>=0;f--)s[f]===0?(n=n.diffAdd(i,o),i=i.dbl()):(i=n.diffAdd(i,o),n=n.dbl());return i};wn.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};wn.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};wn.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};wn.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};wn.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Ble=go,Pf=nc,vz=Rt,Uw=Fw,Ole=Ble.assert;function qa(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,Uw.call(this,"edwards",t),this.a=new Pf(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Pf(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Pf(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Ole(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}vz(qa,Uw);var Nle=qa;qa.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};qa.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};qa.prototype.jpoint=function(e,r,n,i){return this.point(e,r,n,i)};qa.prototype.pointFromX=function(e,r){e=new Pf(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),s=i.redMul(o.redInvm()),f=s.redSqrt();if(f.redSqr().redSub(s).cmp(this.zero)!==0)throw new Error("invalid point");var d=f.fromRed().isOdd();return(r&&!d||!r&&d)&&(f=f.redNeg()),this.point(e,f)};qa.prototype.pointFromY=function(e,r){e=new Pf(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(o.redInvm());if(s.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var f=s.redSqrt();if(f.redSqr().redSub(s).cmp(this.zero)!==0)throw new Error("invalid point");return f.fromRed().isOdd()!==r&&(f=f.redNeg()),this.point(f,e)};qa.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),i=r.redMul(this.a).redAdd(n),o=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return i.cmp(o)===0};function br(t,e,r,n,i){Uw.BasePoint.call(this,t,"projective"),e===null&&r===null&&n===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 Pf(e,16),this.y=new Pf(r,16),this.z=n?new Pf(n,16):this.curve.one,this.t=i&&new Pf(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}vz(br,Uw.BasePoint);qa.prototype.pointFromJSON=function(e){return br.fromJSON(this,e)};qa.prototype.point=function(e,r,n,i){return new br(this,e,r,n,i)};br.fromJSON=function(e,r){return new br(e,r[0],r[1],r[2])};br.prototype.inspect=function(){return this.isInfinity()?"":""};br.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};br.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),o=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),s=i.redAdd(r),f=s.redSub(n),d=i.redSub(r),p=o.redMul(f),b=s.redMul(d),v=o.redMul(d),A=f.redMul(s);return this.curve.point(p,b,A,v)};br.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),i,o,s,f,d,p;if(this.curve.twisted){f=this.curve._mulA(r);var b=f.redAdd(n);this.zOne?(i=e.redSub(r).redSub(n).redMul(b.redSub(this.curve.two)),o=b.redMul(f.redSub(n)),s=b.redSqr().redSub(b).redSub(b)):(d=this.z.redSqr(),p=b.redSub(d).redISub(d),i=e.redSub(r).redISub(n).redMul(p),o=b.redMul(f.redSub(n)),s=b.redMul(p))}else f=r.redAdd(n),d=this.curve._mulC(this.z).redSqr(),p=f.redSub(d).redSub(d),i=this.curve._mulC(e.redISub(f)).redMul(p),o=this.curve._mulC(f).redMul(r.redISub(n)),s=f.redMul(p);return this.curve.point(i,o,s)};br.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};br.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),o=this.z.redMul(e.z.redAdd(e.z)),s=n.redSub(r),f=o.redSub(i),d=o.redAdd(i),p=n.redAdd(r),b=s.redMul(f),v=d.redMul(p),A=s.redMul(p),_=f.redMul(d);return this.curve.point(b,v,_,A)};br.prototype._projAdd=function(e){var r=this.z.redMul(e.z),n=r.redSqr(),i=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(i).redMul(o),f=n.redSub(s),d=n.redAdd(s),p=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(o),b=r.redMul(f).redMul(p),v,A;return this.curve.twisted?(v=r.redMul(d).redMul(o.redSub(this.curve._mulA(i))),A=f.redMul(d)):(v=r.redMul(d).redMul(o.redSub(i)),A=this.curve._mulC(f).redMul(d)),this.curve.point(b,v,A)};br.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};br.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};br.prototype.mulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)};br.prototype.jmulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)};br.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};br.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};br.prototype.getX=function(){return this.normalize(),this.x.fromRed()};br.prototype.getY=function(){return this.normalize(),this.y.fromRed()};br.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};br.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),this.x.cmp(r)===0)return!0}};br.prototype.toP=br.prototype.normalize;br.prototype.mixedAdd=br.prototype.add;(function(t){var e=t;e.base=Fw,e.short=Tle,e.mont=kle,e.edwards=Nle})(AM);var zw={},Gb={},Ut={},Lle=os,Dle=Rt;Ut.inherits=Dle;function Fle(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function $le(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=o&63|128):Fle(t,i)?(o=65536+((o&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=o&63|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=o&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Ut.htonl=wz;function zle(t,e){for(var r="",n=0;n>>0}return o}Ut.join32=jle;function Hle(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=o&255)}return r}Ut.split32=Hle;function qle(t,e){return t>>>e|t<<32-e}Ut.rotr32=qle;function Gle(t,e){return t<>>32-e}Ut.rotl32=Gle;function Vle(t,e){return t+e>>>0}Ut.sum32=Vle;function Kle(t,e,r){return t+e+r>>>0}Ut.sum32_3=Kle;function Wle(t,e,r,n){return t+e+r+n>>>0}Ut.sum32_4=Wle;function Jle(t,e,r,n,i){return t+e+r+n+i>>>0}Ut.sum32_5=Jle;function Zle(t,e,r,n){var i=t[e],o=t[e+1],s=n+o>>>0,f=(s>>0,t[e+1]=s}Ut.sum64=Zle;function Yle(t,e,r,n){var i=e+n>>>0,o=(i>>0}Ut.sum64_hi=Yle;function Qle(t,e,r,n){var i=e+n;return i>>>0}Ut.sum64_lo=Qle;function Xle(t,e,r,n,i,o,s,f){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0}Ut.sum64_4_hi=Xle;function ede(t,e,r,n,i,o,s,f){var d=e+n+o+f;return d>>>0}Ut.sum64_4_lo=ede;function tde(t,e,r,n,i,o,s,f,d,p){var b=0,v=e;v=v+n>>>0,b+=v>>0,b+=v>>0,b+=v>>0,b+=v>>0}Ut.sum64_5_hi=tde;function rde(t,e,r,n,i,o,s,f,d,p){var b=e+n+o+f+p;return b>>>0}Ut.sum64_5_lo=rde;function nde(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Ut.rotr64_hi=nde;function ide(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ut.rotr64_lo=ide;function ode(t,e,r){return t>>>r}Ut.shr64_hi=ode;function sde(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ut.shr64_lo=sde;var u1={},tR=Ut,ade=os;function jw(){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}u1.BlockHash=jw;jw.prototype.update=function(e,r){if(e=tR.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=tR.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=e&255}else for(i[o++]=e&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,s=8;s>>3}Ga.g0_256=dde;function hde(t){return ka(t,17)^ka(t,19)^t>>>10}Ga.g1_256=hde;var pp=Ut,pde=u1,mde=Ga,B8=pp.rotl32,Z1=pp.sum32,gde=pp.sum32_5,bde=mde.ft_1,_z=pde.BlockHash,yde=[1518500249,1859775393,2400959708,3395469782];function $a(){if(!(this instanceof $a))return new $a;_z.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}pp.inherits($a,_z);var vde=$a;$a.blockSize=512;$a.outSize=160;$a.hmacStrength=80;$a.padLength=64;$a.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),she(e.length<=this.blockSize);for(var r=e.length;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var uhe=v0;v0.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};v0.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=ju.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var h6=nc,MM=go,phe=MM.assert;function Hw(t,e){if(t instanceof Hw)return t;this._importDER(t,e)||(phe(t.r&&t.s,"Signature without r or s"),this.r=new h6(t.r,16),this.s=new h6(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var mhe=Hw;function ghe(){this.place=0}function D8(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return i<=127?!1:(e.place=s,i)}function sR(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Hw.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=sR(r),n=sR(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];F8(i,r.length),i=i.concat(r),i.push(2),F8(i,n.length);var o=i.concat(n),s=[48];return F8(s,o.length),s=s.concat(o),MM.encode(s,e)};var $8,aR;function bhe(){if(aR)return $8;aR=1;var t=nc,e=uhe,r=go,n=zw,i=yM(),o=r.assert,s=hhe,f=mhe;function d(p){if(!(this instanceof d))return new d(p);typeof p=="string"&&(o(Object.prototype.hasOwnProperty.call(n,p),"Unknown curve "+p),p=n[p]),p instanceof n.PresetCurve&&(p={curve:p}),this.curve=p.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=p.curve.g,this.g.precompute(p.curve.n.bitLength()+1),this.hash=p.hash||p.curve.hash}return $8=d,d.prototype.keyPair=function(b){return new s(this,b)},d.prototype.keyFromPrivate=function(b,v){return s.fromPrivate(this,b,v)},d.prototype.keyFromPublic=function(b,v){return s.fromPublic(this,b,v)},d.prototype.genKeyPair=function(b){b||(b={});for(var v=new e({hash:this.hash,pers:b.pers,persEnc:b.persEnc||"utf8",entropy:b.entropy||i(this.hash.hmacStrength),entropyEnc:b.entropy&&b.entropyEnc||"utf8",nonce:this.n.toArray()}),A=this.n.byteLength(),_=this.n.sub(new t(2));;){var S=new t(v.generate(A));if(!(S.cmp(_)>0))return S.iaddn(1),this.keyFromPrivate(S)}},d.prototype._truncateToN=function(b,v){var A=b.byteLength()*8-this.n.bitLength();return A>0&&(b=b.ushrn(A)),!v&&b.cmp(this.n)>=0?b.sub(this.n):b},d.prototype.sign=function(b,v,A,_){typeof A=="object"&&(_=A,A=null),_||(_={}),v=this.keyFromPrivate(v,A),b=this._truncateToN(new t(b,16));for(var S=this.n.byteLength(),P=v.getPrivate().toArray("be",S),I=b.toArray("be",S),C=new e({hash:this.hash,entropy:P,nonce:I,pers:_.pers,persEnc:_.persEnc||"utf8"}),T=this.n.sub(new t(1)),k=0;;k++){var O=_.k?_.k(k):new t(C.generate(this.n.byteLength()));if(O=this._truncateToN(O,!0),!(O.cmpn(1)<=0||O.cmp(T)>=0)){var D=this.g.mul(O);if(!D.isInfinity()){var U=D.getX(),V=U.umod(this.n);if(V.cmpn(0)!==0){var Y=O.invm(this.n).mul(V.mul(v.getPrivate()).iadd(b));if(Y=Y.umod(this.n),Y.cmpn(0)!==0){var W=(D.getY().isOdd()?1:0)|(U.cmp(V)!==0?2:0);return _.canonical&&Y.cmp(this.nh)>0&&(Y=this.n.sub(Y),W^=1),new f({r:V,s:Y,recoveryParam:W})}}}}}},d.prototype.verify=function(b,v,A,_){b=this._truncateToN(new t(b,16)),A=this.keyFromPublic(A,_),v=new f(v,"hex");var S=v.r,P=v.s;if(S.cmpn(1)<0||S.cmp(this.n)>=0||P.cmpn(1)<0||P.cmp(this.n)>=0)return!1;var I=P.invm(this.n),C=I.mul(b).umod(this.n),T=I.mul(S).umod(this.n),k;return this.curve._maxwellTrick?(k=this.g.jmulAdd(C,A.getPublic(),T),k.isInfinity()?!1:k.eqXToP(S)):(k=this.g.mulAdd(C,A.getPublic(),T),k.isInfinity()?!1:k.getX().umod(this.n).cmp(S)===0)},d.prototype.recoverPubKey=function(p,b,v,A){o((3&v)===v,"The recovery param is more than two bits"),b=new f(b,A);var _=this.n,S=new t(p),P=b.r,I=b.s,C=v&1,T=v>>1;if(P.cmp(this.curve.p.umod(this.curve.n))>=0&&T)throw new Error("Unable to find sencond key candinate");T?P=this.curve.pointFromX(P.add(this.curve.n),C):P=this.curve.pointFromX(P,C);var k=b.r.invm(_),O=_.sub(S).mul(k).umod(_),D=I.mul(k).umod(_);return this.g.mulAdd(O,P,D)},d.prototype.getKeyRecoveryParam=function(p,b,v,A){if(b=new f(b,A),b.recoveryParam!==null)return b.recoveryParam;for(var _=0;_<4;_++){var S;try{S=this.recoverPubKey(p,b,_)}catch{continue}if(S.eq(v))return _}throw new Error("Unable to find valid recovery factor")},$8}var Vb=go,Fz=Vb.assert,fR=Vb.parseBytes,h1=Vb.cachedProperty;function vn(t,e){this.eddsa=t,this._secret=fR(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=fR(e.pub)}vn.fromPublic=function(e,r){return r instanceof vn?r:new vn(e,{pub:r})};vn.fromSecret=function(e,r){return r instanceof vn?r:new vn(e,{secret:r})};vn.prototype.secret=function(){return this._secret};h1(vn,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});h1(vn,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});h1(vn,"privBytes",function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,i=r.slice(0,e.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i});h1(vn,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});h1(vn,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});h1(vn,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});vn.prototype.sign=function(e){return Fz(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};vn.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};vn.prototype.getSecret=function(e){return Fz(this._secret,"KeyPair is public only"),Vb.encode(this.secret(),e)};vn.prototype.getPublic=function(e){return Vb.encode(this.pubBytes(),e)};var yhe=vn,vhe=nc,qw=go,whe=qw.assert,Gw=qw.cachedProperty,xhe=qw.parseBytes;function Cl(t,e){this.eddsa=t,typeof e!="object"&&(e=xhe(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),whe(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof vhe&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Gw(Cl,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Gw(Cl,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Gw(Cl,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Gw(Cl,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Cl.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Cl.prototype.toHex=function(){return qw.encode(this.toBytes(),"hex").toUpperCase()};var Ehe=Cl,Ahe=Gb,She=zw,bp=go,Mhe=bp.assert,$z=bp.parseBytes,Uz=yhe,cR=Ehe;function Di(t){if(Mhe(t==="ed25519","only tested with ed25519 so far"),!(this instanceof Di))return new Di(t);t=She[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=Ahe.sha512}var _he=Di;Di.prototype.sign=function(e,r){e=$z(e);var n=this.keyFromSecret(r),i=this.hashInt(n.messagePrefix(),e),o=this.g.mul(i),s=this.encodePoint(o),f=this.hashInt(s,n.pubBytes(),e).mul(n.priv()),d=i.add(f).umod(this.curve.n);return this.makeSignature({R:o,S:d,Rencoded:s})};Di.prototype.verify=function(e,r,n){e=$z(e),r=this.makeSignature(r);var i=this.keyFromPublic(n),o=this.hashInt(r.Rencoded(),i.pubBytes(),e),s=this.g.mul(r.S()),f=r.R().add(i.pub().mul(o));return f.eq(s)};Di.prototype.hashInt=function(){for(var e=this.hash(),r=0;r0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var B=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=B+l:l=b[c-B.length]+B+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,B=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=B;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,B=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,K=h[2]|0,q=K&8191,Q=K>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(B,ne),c=Math.imul(B,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(B,ve)|0,c=c+Math.imul(B,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(B,ke)|0,c=c+Math.imul(B,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(B,re)|0,c=c+Math.imul(B,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(B,de)|0,c=c+Math.imul(B,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(B,pe)|0,c=c+Math.imul(B,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(B,Me)|0,c=c+Math.imul(B,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(B,xe)|0,c=c+Math.imul(B,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(B,Re)|0,c=c+Math.imul(B,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(B,Ce)|0,c=c+Math.imul(B,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;B--){var L=(h.words[m.length+B]|0)*67108864+(h.words[m.length+B-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,B);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,B),h.isZero()||(h.negative^=1);c&&(c.words[B]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,B=1;!(u.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var k={k256:null,p224:null,p192:null,p25519:null};function O(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},O.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},O.prototype.split=function(a,u){a.iushrn(this.n,0,u)},O.prototype.imulK=function(a){return a.imul(this.k)};function D(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,O),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(k[a])return k[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new V;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return k[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),B=this.pow(a,h),L=m;B.cmp(w)!==0;){for(var R=B,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var B=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),B===0&&E===0){y=0;continue}E<<=1,E|=B,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(CM);var zz=CM.exports,jz={},IM={},Zv=Rn,Zd=Zv.Buffer,Oo={},No;for(No in Zv)Zv.hasOwnProperty(No)&&(No==="SlowBuffer"||No==="Buffer"||(Oo[No]=Zv[No]));var Yd=Oo.Buffer={};for(No in Zd)Zd.hasOwnProperty(No)&&(No==="allocUnsafe"||No==="allocUnsafeSlow"||(Yd[No]=Zd[No]));Oo.Buffer.prototype=Zd.prototype;(!Yd.from||Yd.from===Uint8Array.from)&&(Yd.from=function(t,e,r){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return Zd(t,e,r)});Yd.alloc||(Yd.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=Zd(t);return!e||e.length===0?n.fill(0):typeof r=="string"?n.fill(e,r):n.fill(e),n});if(!Oo.kStringMaxLength)try{Oo.kStringMaxLength=Je.process.binding("buffer").kStringMaxLength}catch{}Oo.constants||(Oo.constants={MAX_LENGTH:Oo.kMaxLength},Oo.kStringMaxLength&&(Oo.constants.MAX_STRING_LENGTH=Oo.kStringMaxLength));var TM=Oo,Vw={};const Phe=Rt;function cs(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}Vw.Reporter=cs;cs.prototype.isError=function(e){return e instanceof yp};cs.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};cs.prototype.restore=function(e){const r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};cs.prototype.enterKey=function(e){return this._reporterState.path.push(e)};cs.prototype.exitKey=function(e){const r=this._reporterState;r.path=r.path.slice(0,e-1)};cs.prototype.leaveKey=function(e,r,n){const i=this._reporterState;this.exitKey(e),i.obj!==null&&(i.obj[r]=n)};cs.prototype.path=function(){return this._reporterState.path.join("/")};cs.prototype.enterObject=function(){const e=this._reporterState,r=e.obj;return e.obj={},r};cs.prototype.leaveObject=function(e){const r=this._reporterState,n=r.obj;return r.obj=e,n};cs.prototype.error=function(e){let r;const n=this._reporterState,i=e instanceof yp;if(i?r=e:r=new yp(n.path.map(function(o){return"["+JSON.stringify(o)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw r;return i||n.errors.push(r),r};cs.prototype.wrapResult=function(e){const r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function yp(t,e){this.path=t,this.rethrow(e)}Phe(yp,Error);yp.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,yp),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this};var al={};const Che=Rt,Kw=Vw.Reporter,vp=TM.Buffer;function Jo(t,e){if(Kw.call(this,e),!vp.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}Che(Jo,Kw);al.DecoderBuffer=Jo;Jo.isDecoderBuffer=function(e){return e instanceof Jo?!0:typeof e=="object"&&vp.isBuffer(e.base)&&e.constructor.name==="DecoderBuffer"&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.save=="function"&&typeof e.restore=="function"&&typeof e.isEmpty=="function"&&typeof e.readUInt8=="function"&&typeof e.skip=="function"&&typeof e.raw=="function"};Jo.prototype.save=function(){return{offset:this.offset,reporter:Kw.prototype.save.call(this)}};Jo.prototype.restore=function(e){const r=new Jo(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,Kw.prototype.restore.call(this,e.reporter),r};Jo.prototype.isEmpty=function(){return this.offset===this.length};Jo.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Jo.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");const n=new Jo(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n};Jo.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function wp(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return wp.isEncoderBuffer(r)||(r=new wp(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=vp.byteLength(t);else if(vp.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}al.EncoderBuffer=wp;wp.isEncoderBuffer=function(e){return e instanceof wp?!0:typeof e=="object"&&e.constructor.name==="EncoderBuffer"&&typeof e.length=="number"&&typeof e.join=="function"};wp.prototype.join=function(e,r){return e||(e=vp.alloc(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,r),r+=n.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):vp.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e};const Ihe=Vw.Reporter,The=al.EncoderBuffer,Rhe=al.DecoderBuffer,hi=os,Hz=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],khe=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Hz),Bhe=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function ir(t,e,r){const n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}var RM=ir;const Ohe=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];ir.prototype.clone=function(){const e=this._baseState,r={};Ohe.forEach(function(i){r[i]=e[i]});const n=new this.constructor(r.parent);return n._baseState=r,n};ir.prototype._wrap=function(){const e=this._baseState;khe.forEach(function(r){this[r]=function(){const i=new this.constructor(this);return e.children.push(i),i[r].apply(i,arguments)}},this)};ir.prototype._init=function(e){const r=this._baseState;hi(r.parent===null),e.call(this),r.children=r.children.filter(function(n){return n._baseState.parent===this},this),hi.equal(r.children.length,1,"Root node can have only one child")};ir.prototype._useArgs=function(e){const r=this._baseState,n=e.filter(function(i){return i instanceof this.constructor},this);e=e.filter(function(i){return!(i instanceof this.constructor)},this),n.length!==0&&(hi(r.children===null),r.children=n,n.forEach(function(i){i._baseState.parent=this},this)),e.length!==0&&(hi(r.args===null),r.args=e,r.reverseArgs=e.map(function(i){if(typeof i!="object"||i.constructor!==Object)return i;const o={};return Object.keys(i).forEach(function(s){s==(s|0)&&(s|=0);const f=i[s];o[f]=s}),o}))};Bhe.forEach(function(t){ir.prototype[t]=function(){const r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});Hz.forEach(function(t){ir.prototype[t]=function(){const r=this._baseState,n=Array.prototype.slice.call(arguments);return hi(r.tag===null),r.tag=t,this._useArgs(n),this}});ir.prototype.use=function(e){hi(e);const r=this._baseState;return hi(r.use===null),r.use=e,this};ir.prototype.optional=function(){const e=this._baseState;return e.optional=!0,this};ir.prototype.def=function(e){const r=this._baseState;return hi(r.default===null),r.default=e,r.optional=!0,this};ir.prototype.explicit=function(e){const r=this._baseState;return hi(r.explicit===null&&r.implicit===null),r.explicit=e,this};ir.prototype.implicit=function(e){const r=this._baseState;return hi(r.explicit===null&&r.implicit===null),r.implicit=e,this};ir.prototype.obj=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};ir.prototype.key=function(e){const r=this._baseState;return hi(r.key===null),r.key=e,this};ir.prototype.any=function(){const e=this._baseState;return e.any=!0,this};ir.prototype.choice=function(e){const r=this._baseState;return hi(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(n){return e[n]})),this};ir.prototype.contains=function(e){const r=this._baseState;return hi(r.use===null),r.contains=e,this};ir.prototype._decode=function(e,r){const n=this._baseState;if(n.parent===null)return e.wrapResult(n.children[0]._decode(e,r));let i=n.default,o=!0,s=null;if(n.key!==null&&(s=e.enterKey(n.key)),n.optional){let d=null;if(n.explicit!==null?d=n.explicit:n.implicit!==null?d=n.implicit:n.tag!==null&&(d=n.tag),d===null&&!n.any){const p=e.save();try{n.choice===null?this._decodeGeneric(n.tag,e,r):this._decodeChoice(e,r),o=!0}catch{o=!1}e.restore(p)}else if(o=this._peekTag(e,d,n.any),e.isError(o))return o}let f;if(n.obj&&o&&(f=e.enterObject()),o){if(n.explicit!==null){const p=this._decodeTag(e,n.explicit);if(e.isError(p))return p;e=p}const d=e.offset;if(n.use===null&&n.choice===null){let p;n.any&&(p=e.save());const b=this._decodeTag(e,n.implicit!==null?n.implicit:n.tag,n.any);if(e.isError(b))return b;n.any?i=e.raw(p):e=b}if(r&&r.track&&n.tag!==null&&r.track(e.path(),d,e.length,"tagged"),r&&r.track&&n.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),n.any||(n.choice===null?i=this._decodeGeneric(n.tag,e,r):i=this._decodeChoice(e,r)),e.isError(i))return i;if(!n.any&&n.choice===null&&n.children!==null&&n.children.forEach(function(b){b._decode(e,r)}),n.contains&&(n.tag==="octstr"||n.tag==="bitstr")){const p=new Rhe(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(p,r)}}return n.obj&&o&&(i=e.leaveObject(f)),n.key!==null&&(i!==null||o===!0)?e.leaveKey(s,n.key,i):s!==null&&e.exitKey(s),i};ir.prototype._decodeGeneric=function(e,r,n){const i=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,i.args[0],n):/str$/.test(e)?this._decodeStr(r,e,n):e==="objid"&&i.args?this._decodeObjid(r,i.args[0],i.args[1],n):e==="objid"?this._decodeObjid(r,null,null,n):e==="gentime"||e==="utctime"?this._decodeTime(r,e,n):e==="null_"?this._decodeNull(r,n):e==="bool"?this._decodeBool(r,n):e==="objDesc"?this._decodeStr(r,e,n):e==="int"||e==="enum"?this._decodeInt(r,i.args&&i.args[0],n):i.use!==null?this._getUse(i.use,r._reporterState.obj)._decode(r,n):r.error("unknown tag: "+e)};ir.prototype._getUse=function(e,r){const n=this._baseState;return n.useDecoder=this._use(e,r),hi(n.useDecoder._baseState.parent===null),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder};ir.prototype._decodeChoice=function(e,r){const n=this._baseState;let i=null,o=!1;return Object.keys(n.choice).some(function(s){const f=e.save(),d=n.choice[s];try{const p=d._decode(e,r);if(e.isError(p))return!1;i={type:s,value:p},o=!0}catch{return e.restore(f),!1}return!0},this),o?i:e.error("Choice not matched")};ir.prototype._createEncoderBuffer=function(e){return new The(e,this.reporter)};ir.prototype._encode=function(e,r,n){const i=this._baseState;if(i.default!==null&&i.default===e)return;const o=this._encodeValue(e,r,n);if(o!==void 0&&!this._skipDefault(o,r,n))return o};ir.prototype._encodeValue=function(e,r,n){const i=this._baseState;if(i.parent===null)return i.children[0]._encode(e,r||new Ihe);let o=null;if(this.reporter=r,i.optional&&e===void 0)if(i.default!==null)e=i.default;else return;let s=null,f=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,r);else if(i.contains)s=this._getUse(i.contains,n)._encode(e,r),f=!0;else if(i.children)s=i.children.map(function(d){if(d._baseState.tag==="null_")return d._encode(null,r,e);if(d._baseState.key===null)return r.error("Child should have a key");const p=r.enterKey(d._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");const b=d._encode(e[d._baseState.key],r,e);return r.leaveKey(p),b},this).filter(function(d){return d}),s=this._createEncoderBuffer(s);else if(i.tag==="seqof"||i.tag==="setof"){if(!(i.args&&i.args.length===1))return r.error("Too many args for : "+i.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");const d=this.clone();d._baseState.implicit=null,s=this._createEncoderBuffer(e.map(function(p){const b=this._baseState;return this._getUse(b.args[0],e)._encode(p,r)},d))}else i.use!==null?o=this._getUse(i.use,n)._encode(e,r):(s=this._encodePrimitive(i.tag,e),f=!0);if(!i.any&&i.choice===null){const d=i.implicit!==null?i.implicit:i.tag,p=i.implicit===null?"universal":"context";d===null?i.use===null&&r.error("Tag could be omitted only for .use()"):i.use===null&&(o=this._encodeComposite(d,f,p,s))}return i.explicit!==null&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o};ir.prototype._encodeChoice=function(e,r){const n=this._baseState,i=n.choice[e.type];return i||hi(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,r)};ir.prototype._encodePrimitive=function(e,r){const n=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&n.args)return this._encodeObjid(r,n.reverseArgs[0],n.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,n.args&&n.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};ir.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};ir.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)};var Ww={};(function(t){function e(r){const n={};return Object.keys(r).forEach(function(i){(i|0)==i&&(i=i|0);const o=r[i];n[o]=i}),n}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)})(Ww);const Nhe=Rt,Ef=TM.Buffer,qz=RM,U8=Ww;function Gz(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new oa,this.tree._init(t.body)}var Vz=Gz;Gz.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function oa(t){qz.call(this,"der",t)}Nhe(oa,qz);oa.prototype._encodeComposite=function(e,r,n,i){const o=Lhe(e,r,n,this.reporter);if(i.length<128){const d=Ef.alloc(2);return d[0]=o,d[1]=i.length,this._createEncoderBuffer([d,i])}let s=1;for(let d=i.length;d>=256;d>>=8)s++;const f=Ef.alloc(1+1+s);f[0]=o,f[1]=128|s;for(let d=1+s,p=i.length;p>0;d--,p>>=8)f[d]=p&255;return this._createEncoderBuffer([f,i])};oa.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){const n=Ef.alloc(e.length*2);for(let i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}let i=0;for(let f=0;f=128;d>>=7)i++}const o=Ef.alloc(i);let s=o.length-1;for(let f=e.length-1;f>=0;f--){let d=e[f];for(o[s--]=d&127;(d>>=7)>0;)o[s--]=128|d&127}return this._createEncoderBuffer(o)};function vo(t){return t<10?"0"+t:t}oa.prototype._encodeTime=function(e,r){let n;const i=new Date(e);return r==="gentime"?n=[vo(i.getUTCFullYear()),vo(i.getUTCMonth()+1),vo(i.getUTCDate()),vo(i.getUTCHours()),vo(i.getUTCMinutes()),vo(i.getUTCSeconds()),"Z"].join(""):r==="utctime"?n=[vo(i.getUTCFullYear()%100),vo(i.getUTCMonth()+1),vo(i.getUTCDate()),vo(i.getUTCHours()),vo(i.getUTCMinutes()),vo(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(n,"octstr")};oa.prototype._encodeNull=function(){return this._createEncoderBuffer("")};oa.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!Ef.isBuffer(e)){const o=e.toArray();!e.sign&&o[0]&128&&o.unshift(0),e=Ef.from(o)}if(Ef.isBuffer(e)){let o=e.length;e.length===0&&o++;const s=Ef.alloc(o);return e.copy(s),e.length===0&&(s[0]=0),this._createEncoderBuffer(s)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let o=e;o>=256;o>>=8)n++;const i=new Array(n);for(let o=i.length-1;o>=0;o--)i[o]=e&255,e>>=8;return i[0]&128&&i.unshift(0),this._createEncoderBuffer(Ef.from(i))};oa.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};oa.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};oa.prototype._skipDefault=function(e,r,n){const i=this._baseState;let o;if(i.default===null)return!1;const s=e.join();if(i.defaultBuffer===void 0&&(i.defaultBuffer=this._encodeValue(i.default,r,n).join()),s.length!==i.defaultBuffer.length)return!1;for(o=0;o=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=U8.tagClassByName[r||"universal"]<<6,i)}const Dhe=Rt,kM=Vz;function BM(t){kM.call(this,t),this.enc="pem"}Dhe(BM,kM);var Fhe=BM;BM.prototype.encode=function(e,r){const i=kM.prototype.encode.call(this,e).toString("base64"),o=["-----BEGIN "+r.label+"-----"];for(let s=0;s>6],i=(r&32)===0;if((r&31)===31){let s=r;for(r=0;(s&128)===128;){if(s=t.readUInt8(e),t.isError(s))return s;r<<=7,r|=s&127}}else r&=31;const o=dR.tag[r];return{cls:n,primitive:i,tag:r,tagStr:o}}function Zz(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&n===128)return null;if(!(n&128))return n;const i=n&127;if(i>4)return t.error("length octect is too long");n=0;for(let o=0;o0&&k.ishrn(O),k}function S(C,T){C=_(C,T),C=C.mod(T);var k=t.from(C.toArray());if(k.length=0)throw new Error("invalid sig")}return z8=o,z8}var j8,bR;function xpe(){if(bR)return j8;bR=1;var t=Bt.Buffer,e=Fb,r=oU,n=Rt,i=vpe(),o=wpe(),s=MU;Object.keys(s).forEach(function(v){s[v].id=t.from(s[v].id,"hex"),s[v.toLowerCase()]=s[v]});function f(v){r.Writable.call(this);var A=s[v];if(!A)throw new Error("Unknown message digest");this._hashType=A.hash,this._hash=e(A.hash),this._tag=A.id,this._signType=A.sign}n(f,r.Writable),f.prototype._write=function(A,_,S){this._hash.update(A),S()},f.prototype.update=function(A,_){return this._hash.update(typeof A=="string"?t.from(A,_):A),this},f.prototype.sign=function(A,_){this.end();var S=this._hash.digest(),P=i(S,A,this._hashType,this._signType,this._tag);return _?P.toString(_):P};function d(v){r.Writable.call(this);var A=s[v];if(!A)throw new Error("Unknown message digest");this._hash=e(A.hash),this._tag=A.id,this._signType=A.sign}n(d,r.Writable),d.prototype._write=function(A,_,S){this._hash.update(A),S()},d.prototype.update=function(A,_){return this._hash.update(typeof A=="string"?t.from(A,_):A),this},d.prototype.verify=function(A,_,S){var P=typeof _=="string"?t.from(_,S):_;this.end();var I=this._hash.digest();return o(P,I,A,this._signType,this._tag)};function p(v){return new f(v)}function b(v){return new d(v)}return j8={Sign:p,Verify:b,createSign:p,createVerify:b},j8}var $M={exports:{}};$M.exports;(function(t){(function(e,r){function n(x,a){if(!x)throw new Error(a||"Assertion failed")}function i(x,a){x.super_=a;var u=function(){};u.prototype=a.prototype,x.prototype=new u,x.prototype.constructor=x}function o(x,a,u){if(o.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&((a==="le"||a==="be")&&(u=a,a=10),this._init(x||0,a||10,u||"be"))}typeof e=="object"?e.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Rn.Buffer}catch{}o.isBN=function(a){return a instanceof o?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===o.wordSize&&Array.isArray(a.words)},o.max=function(a,u){return a.cmp(u)>0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var B=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=B+l:l=b[c-B.length]+B+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,B=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=B;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,B=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,K=h[2]|0,q=K&8191,Q=K>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(B,ne),c=Math.imul(B,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(B,ve)|0,c=c+Math.imul(B,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(B,ke)|0,c=c+Math.imul(B,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(B,re)|0,c=c+Math.imul(B,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(B,de)|0,c=c+Math.imul(B,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(B,pe)|0,c=c+Math.imul(B,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(B,Me)|0,c=c+Math.imul(B,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(B,xe)|0,c=c+Math.imul(B,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(B,Re)|0,c=c+Math.imul(B,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(B,Ce)|0,c=c+Math.imul(B,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;B--){var L=(h.words[m.length+B]|0)*67108864+(h.words[m.length+B-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,B);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,B),h.isZero()||(h.negative^=1);c&&(c.words[B]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,B=1;!(u.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var k={k256:null,p224:null,p192:null,p25519:null};function O(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},O.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},O.prototype.split=function(a,u){a.iushrn(this.n,0,u)},O.prototype.imulK=function(a){return a.imul(this.k)};function D(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,O),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(k[a])return k[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new V;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return k[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),B=this.pow(a,h),L=m;B.cmp(w)!==0;){for(var R=B,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var B=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),B===0&&E===0){y=0;continue}E<<=1,E|=B,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})($M);var Epe=$M.exports,H8,yR;function Ape(){if(yR)return H8;yR=1;var t=_M(),e=Epe;H8=function(s){return new n(s)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1;function n(o){this.curveType=r[o],this.curveType||(this.curveType={name:o}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}n.prototype.generateKeys=function(o,s){return this.keys=this.curve.genKeyPair(),this.getPublicKey(o,s)},n.prototype.computeSecret=function(o,s,f){s=s||"utf8",Je.Buffer.isBuffer(o)||(o=new Je.Buffer(o,s));var d=this.curve.keyFromPublic(o).getPublic(),p=d.mul(this.keys.getPrivate()).getX();return i(p,f,this.curveType.byteLength)},n.prototype.getPublicKey=function(o,s){var f=this.keys.getPublic(s==="compressed",!0);return s==="hybrid"&&(f[f.length-1]%2?f[0]=7:f[0]=6),i(f,o)},n.prototype.getPrivateKey=function(o){return i(this.keys.getPrivate(),o)},n.prototype.setPublicKey=function(o,s){return s=s||"utf8",Je.Buffer.isBuffer(o)||(o=new Je.Buffer(o,s)),this.keys._importPublic(o),this},n.prototype.setPrivateKey=function(o,s){s=s||"utf8",Je.Buffer.isBuffer(o)||(o=new Je.Buffer(o,s));var f=new e(o);return f=f.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(f),this};function i(o,s,f){Array.isArray(o)||(o=o.toArray());var d=new Je.Buffer(o);if(f&&d.length0?a:u},o.min=function(a,u){return a.cmp(u)<0?a:u},o.prototype._init=function(a,u,l){if(typeof a=="number")return this._initNumber(a,u,l);if(typeof a=="object")return this._initArray(a,u,l);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),a=a.toString().replace(/\s+/g,"");var h=0;a[0]==="-"&&(h++,this.negative=1),h=0;h-=3)w=a[h]|a[h-1]<<8|a[h-2]<<16,this.words[m]|=w<>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);else if(l==="le")for(h=0,m=0;h>>26-E&67108863,E+=24,E>=26&&(E-=26,m++);return this.strip()};function f(x,a){var u=x.charCodeAt(a);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function d(x,a,u){var l=f(x,u);return u-1>=a&&(l|=f(x,u-1)<<4),l}o.prototype._parseHex=function(a,u,l){this.length=Math.ceil((a.length-u)/6),this.words=new Array(this.length);for(var h=0;h=u;h-=2)E=d(a,u,h)<=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8;else{var y=a.length-u;for(h=y%2===0?u+1:u;h=18?(m-=18,w+=1,this.words[w]|=E>>>26):m+=8}this.strip()};function p(x,a,u,l){for(var h=0,m=Math.min(x.length,u),w=a;w=49?h+=E-49+10:E>=17?h+=E-17+10:h+=E}return h}o.prototype._parseBase=function(a,u,l){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=u)h++;h--,m=m/u|0;for(var w=a.length-l,E=w%h,y=Math.min(w,w-E)+l,c=0,g=l;g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var b=["","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"],v=[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],A=[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];o.prototype.toString=function(a,u){a=a||10,u=u|0||1;var l;if(a===16||a==="hex"){l="";for(var h=0,m=0,w=0;w>>24-h&16777215,m!==0||w!==this.length-1?l=b[6-y.length]+y+l:l=y+l,h+=2,h>=26&&(h-=26,w--)}for(m!==0&&(l=m.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(a===(a|0)&&a>=2&&a<=36){var c=v[a],g=A[a];l="";var M=this.clone();for(M.negative=0;!M.isZero();){var B=M.modn(g).toString(a);M=M.idivn(g),M.isZero()?l=B+l:l=b[c-B.length]+B+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(a,u){return n(typeof s<"u"),this.toArrayLike(s,a,u)},o.prototype.toArray=function(a,u){return this.toArrayLike(Array,a,u)},o.prototype.toArrayLike=function(a,u,l){var h=this.byteLength(),m=l||Math.max(1,h);n(h<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new a(m),y,c,g=this.clone();if(w){for(c=0;!g.isZero();c++)y=g.andln(255),g.iushrn(8),E[c]=y;for(;c=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},o.prototype._zeroBits=function(a){if(a===0)return 26;var u=a,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},o.prototype.bitLength=function(){var a=this.words[this.length-1],u=this._countBits(a);return(this.length-1)*26+u};function _(x){for(var a=new Array(x.bitLength()),u=0;u>>h}return a}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,u=0;ua.length?this.clone().ior(a):a.clone().ior(this)},o.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},o.prototype.iuand=function(a){var u;this.length>a.length?u=a:u=this;for(var l=0;la.length?this.clone().iand(a):a.clone().iand(this)},o.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},o.prototype.iuxor=function(a){var u,l;this.length>a.length?(u=this,l=a):(u=a,l=this);for(var h=0;ha.length?this.clone().ixor(a):a.clone().ixor(this)},o.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},o.prototype.inotn=function(a){n(typeof a=="number"&&a>=0);var u=Math.ceil(a/26)|0,l=a%26;this._expand(u),l>0&&u--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-l),this.strip()},o.prototype.notn=function(a){return this.clone().inotn(a)},o.prototype.setn=function(a,u){n(typeof a=="number"&&a>=0);var l=a/26|0,h=a%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<a.length?(l=this,h=a):(l=a,h=this);for(var m=0,w=0;w>>26;for(;m!==0&&w>>26;if(this.length=l.length,m!==0)this.words[this.length]=m,this.length++;else if(l!==this)for(;wa.length?this.clone().iadd(a):a.clone().iadd(this)},o.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var u=this.iadd(a);return a.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var l=this.cmp(a);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,m;l>0?(h=this,m=a):(h=a,m=this);for(var w=0,E=0;E>26,this.words[E]=u&67108863;for(;w!==0&&E>26,this.words[E]=u&67108863;if(w===0&&E>>26,M=y&67108863,B=Math.min(c,a.length-1),L=Math.max(0,c-x.length+1);L<=B;L++){var R=c-L|0;h=x.words[R]|0,m=a.words[L]|0,w=h*m+M,g+=w/67108864|0,M=w&67108863}u.words[c]=M|0,y=g|0}return y!==0?u.words[c]=y|0:u.length--,u.strip()}var P=function(a,u,l){var h=a.words,m=u.words,w=l.words,E=0,y,c,g,M=h[0]|0,B=M&8191,L=M>>>13,R=h[1]|0,F=R&8191,z=R>>>13,K=h[2]|0,q=K&8191,Q=K>>>13,G=h[3]|0,H=G&8191,ee=G>>>13,ue=h[4]|0,fe=ue&8191,he=ue>>>13,He=h[5]|0,be=He&8191,oe=He>>>13,Xe=h[6]|0,Ee=Xe&8191,ye=Xe>>>13,it=h[7]|0,Pe=it&8191,Te=it>>>13,lt=h[8]|0,j=lt&8191,N=lt>>>13,$=h[9]|0,J=$&8191,te=$>>>13,me=m[0]|0,ne=me&8191,we=me>>>13,tt=m[1]|0,ve=tt&8191,Ie=tt>>>13,Qe=m[2]|0,ke=Qe&8191,$e=Qe>>>13,le=m[3]|0,re=le&8191,ae=le>>>13,Ue=m[4]|0,de=Ue&8191,Ae=Ue>>>13,We=m[5]|0,pe=We&8191,ge=We>>>13,Ze=m[6]|0,Me=Ze&8191,Se=Ze>>>13,rt=m[7]|0,xe=rt&8191,Be=rt>>>13,gt=m[8]|0,Re=gt&8191,De=gt>>>13,wt=m[9]|0,Ce=wt&8191,Le=wt>>>13;l.negative=a.negative^u.negative,l.length=19,y=Math.imul(B,ne),c=Math.imul(B,we),c=c+Math.imul(L,ne)|0,g=Math.imul(L,we);var bt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(bt>>>26)|0,bt&=67108863,y=Math.imul(F,ne),c=Math.imul(F,we),c=c+Math.imul(z,ne)|0,g=Math.imul(z,we),y=y+Math.imul(B,ve)|0,c=c+Math.imul(B,Ie)|0,c=c+Math.imul(L,ve)|0,g=g+Math.imul(L,Ie)|0;var yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(yt>>>26)|0,yt&=67108863,y=Math.imul(q,ne),c=Math.imul(q,we),c=c+Math.imul(Q,ne)|0,g=Math.imul(Q,we),y=y+Math.imul(F,ve)|0,c=c+Math.imul(F,Ie)|0,c=c+Math.imul(z,ve)|0,g=g+Math.imul(z,Ie)|0,y=y+Math.imul(B,ke)|0,c=c+Math.imul(B,$e)|0,c=c+Math.imul(L,ke)|0,g=g+Math.imul(L,$e)|0;var Ot=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,y=Math.imul(H,ne),c=Math.imul(H,we),c=c+Math.imul(ee,ne)|0,g=Math.imul(ee,we),y=y+Math.imul(q,ve)|0,c=c+Math.imul(q,Ie)|0,c=c+Math.imul(Q,ve)|0,g=g+Math.imul(Q,Ie)|0,y=y+Math.imul(F,ke)|0,c=c+Math.imul(F,$e)|0,c=c+Math.imul(z,ke)|0,g=g+Math.imul(z,$e)|0,y=y+Math.imul(B,re)|0,c=c+Math.imul(B,ae)|0,c=c+Math.imul(L,re)|0,g=g+Math.imul(L,ae)|0;var kt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(kt>>>26)|0,kt&=67108863,y=Math.imul(fe,ne),c=Math.imul(fe,we),c=c+Math.imul(he,ne)|0,g=Math.imul(he,we),y=y+Math.imul(H,ve)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(ee,ve)|0,g=g+Math.imul(ee,Ie)|0,y=y+Math.imul(q,ke)|0,c=c+Math.imul(q,$e)|0,c=c+Math.imul(Q,ke)|0,g=g+Math.imul(Q,$e)|0,y=y+Math.imul(F,re)|0,c=c+Math.imul(F,ae)|0,c=c+Math.imul(z,re)|0,g=g+Math.imul(z,ae)|0,y=y+Math.imul(B,de)|0,c=c+Math.imul(B,Ae)|0,c=c+Math.imul(L,de)|0,g=g+Math.imul(L,Ae)|0;var ct=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(be,ne),c=Math.imul(be,we),c=c+Math.imul(oe,ne)|0,g=Math.imul(oe,we),y=y+Math.imul(fe,ve)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(he,ve)|0,g=g+Math.imul(he,Ie)|0,y=y+Math.imul(H,ke)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(ee,ke)|0,g=g+Math.imul(ee,$e)|0,y=y+Math.imul(q,re)|0,c=c+Math.imul(q,ae)|0,c=c+Math.imul(Q,re)|0,g=g+Math.imul(Q,ae)|0,y=y+Math.imul(F,de)|0,c=c+Math.imul(F,Ae)|0,c=c+Math.imul(z,de)|0,g=g+Math.imul(z,Ae)|0,y=y+Math.imul(B,pe)|0,c=c+Math.imul(B,ge)|0,c=c+Math.imul(L,pe)|0,g=g+Math.imul(L,ge)|0;var St=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(St>>>26)|0,St&=67108863,y=Math.imul(Ee,ne),c=Math.imul(Ee,we),c=c+Math.imul(ye,ne)|0,g=Math.imul(ye,we),y=y+Math.imul(be,ve)|0,c=c+Math.imul(be,Ie)|0,c=c+Math.imul(oe,ve)|0,g=g+Math.imul(oe,Ie)|0,y=y+Math.imul(fe,ke)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(he,ke)|0,g=g+Math.imul(he,$e)|0,y=y+Math.imul(H,re)|0,c=c+Math.imul(H,ae)|0,c=c+Math.imul(ee,re)|0,g=g+Math.imul(ee,ae)|0,y=y+Math.imul(q,de)|0,c=c+Math.imul(q,Ae)|0,c=c+Math.imul(Q,de)|0,g=g+Math.imul(Q,Ae)|0,y=y+Math.imul(F,pe)|0,c=c+Math.imul(F,ge)|0,c=c+Math.imul(z,pe)|0,g=g+Math.imul(z,ge)|0,y=y+Math.imul(B,Me)|0,c=c+Math.imul(B,Se)|0,c=c+Math.imul(L,Me)|0,g=g+Math.imul(L,Se)|0;var vt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Pe,ne),c=Math.imul(Pe,we),c=c+Math.imul(Te,ne)|0,g=Math.imul(Te,we),y=y+Math.imul(Ee,ve)|0,c=c+Math.imul(Ee,Ie)|0,c=c+Math.imul(ye,ve)|0,g=g+Math.imul(ye,Ie)|0,y=y+Math.imul(be,ke)|0,c=c+Math.imul(be,$e)|0,c=c+Math.imul(oe,ke)|0,g=g+Math.imul(oe,$e)|0,y=y+Math.imul(fe,re)|0,c=c+Math.imul(fe,ae)|0,c=c+Math.imul(he,re)|0,g=g+Math.imul(he,ae)|0,y=y+Math.imul(H,de)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(ee,de)|0,g=g+Math.imul(ee,Ae)|0,y=y+Math.imul(q,pe)|0,c=c+Math.imul(q,ge)|0,c=c+Math.imul(Q,pe)|0,g=g+Math.imul(Q,ge)|0,y=y+Math.imul(F,Me)|0,c=c+Math.imul(F,Se)|0,c=c+Math.imul(z,Me)|0,g=g+Math.imul(z,Se)|0,y=y+Math.imul(B,xe)|0,c=c+Math.imul(B,Be)|0,c=c+Math.imul(L,xe)|0,g=g+Math.imul(L,Be)|0;var zt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,y=Math.imul(j,ne),c=Math.imul(j,we),c=c+Math.imul(N,ne)|0,g=Math.imul(N,we),y=y+Math.imul(Pe,ve)|0,c=c+Math.imul(Pe,Ie)|0,c=c+Math.imul(Te,ve)|0,g=g+Math.imul(Te,Ie)|0,y=y+Math.imul(Ee,ke)|0,c=c+Math.imul(Ee,$e)|0,c=c+Math.imul(ye,ke)|0,g=g+Math.imul(ye,$e)|0,y=y+Math.imul(be,re)|0,c=c+Math.imul(be,ae)|0,c=c+Math.imul(oe,re)|0,g=g+Math.imul(oe,ae)|0,y=y+Math.imul(fe,de)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(he,de)|0,g=g+Math.imul(he,Ae)|0,y=y+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,c=c+Math.imul(ee,pe)|0,g=g+Math.imul(ee,ge)|0,y=y+Math.imul(q,Me)|0,c=c+Math.imul(q,Se)|0,c=c+Math.imul(Q,Me)|0,g=g+Math.imul(Q,Se)|0,y=y+Math.imul(F,xe)|0,c=c+Math.imul(F,Be)|0,c=c+Math.imul(z,xe)|0,g=g+Math.imul(z,Be)|0,y=y+Math.imul(B,Re)|0,c=c+Math.imul(B,De)|0,c=c+Math.imul(L,Re)|0,g=g+Math.imul(L,De)|0;var Yt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,y=Math.imul(J,ne),c=Math.imul(J,we),c=c+Math.imul(te,ne)|0,g=Math.imul(te,we),y=y+Math.imul(j,ve)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(N,ve)|0,g=g+Math.imul(N,Ie)|0,y=y+Math.imul(Pe,ke)|0,c=c+Math.imul(Pe,$e)|0,c=c+Math.imul(Te,ke)|0,g=g+Math.imul(Te,$e)|0,y=y+Math.imul(Ee,re)|0,c=c+Math.imul(Ee,ae)|0,c=c+Math.imul(ye,re)|0,g=g+Math.imul(ye,ae)|0,y=y+Math.imul(be,de)|0,c=c+Math.imul(be,Ae)|0,c=c+Math.imul(oe,de)|0,g=g+Math.imul(oe,Ae)|0,y=y+Math.imul(fe,pe)|0,c=c+Math.imul(fe,ge)|0,c=c+Math.imul(he,pe)|0,g=g+Math.imul(he,ge)|0,y=y+Math.imul(H,Me)|0,c=c+Math.imul(H,Se)|0,c=c+Math.imul(ee,Me)|0,g=g+Math.imul(ee,Se)|0,y=y+Math.imul(q,xe)|0,c=c+Math.imul(q,Be)|0,c=c+Math.imul(Q,xe)|0,g=g+Math.imul(Q,Be)|0,y=y+Math.imul(F,Re)|0,c=c+Math.imul(F,De)|0,c=c+Math.imul(z,Re)|0,g=g+Math.imul(z,De)|0,y=y+Math.imul(B,Ce)|0,c=c+Math.imul(B,Le)|0,c=c+Math.imul(L,Ce)|0,g=g+Math.imul(L,Le)|0;var Xt=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(J,ve),c=Math.imul(J,Ie),c=c+Math.imul(te,ve)|0,g=Math.imul(te,Ie),y=y+Math.imul(j,ke)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(N,ke)|0,g=g+Math.imul(N,$e)|0,y=y+Math.imul(Pe,re)|0,c=c+Math.imul(Pe,ae)|0,c=c+Math.imul(Te,re)|0,g=g+Math.imul(Te,ae)|0,y=y+Math.imul(Ee,de)|0,c=c+Math.imul(Ee,Ae)|0,c=c+Math.imul(ye,de)|0,g=g+Math.imul(ye,Ae)|0,y=y+Math.imul(be,pe)|0,c=c+Math.imul(be,ge)|0,c=c+Math.imul(oe,pe)|0,g=g+Math.imul(oe,ge)|0,y=y+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Se)|0,c=c+Math.imul(he,Me)|0,g=g+Math.imul(he,Se)|0,y=y+Math.imul(H,xe)|0,c=c+Math.imul(H,Be)|0,c=c+Math.imul(ee,xe)|0,g=g+Math.imul(ee,Be)|0,y=y+Math.imul(q,Re)|0,c=c+Math.imul(q,De)|0,c=c+Math.imul(Q,Re)|0,g=g+Math.imul(Q,De)|0,y=y+Math.imul(F,Ce)|0,c=c+Math.imul(F,Le)|0,c=c+Math.imul(z,Ce)|0,g=g+Math.imul(z,Le)|0;var or=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(or>>>26)|0,or&=67108863,y=Math.imul(J,ke),c=Math.imul(J,$e),c=c+Math.imul(te,ke)|0,g=Math.imul(te,$e),y=y+Math.imul(j,re)|0,c=c+Math.imul(j,ae)|0,c=c+Math.imul(N,re)|0,g=g+Math.imul(N,ae)|0,y=y+Math.imul(Pe,de)|0,c=c+Math.imul(Pe,Ae)|0,c=c+Math.imul(Te,de)|0,g=g+Math.imul(Te,Ae)|0,y=y+Math.imul(Ee,pe)|0,c=c+Math.imul(Ee,ge)|0,c=c+Math.imul(ye,pe)|0,g=g+Math.imul(ye,ge)|0,y=y+Math.imul(be,Me)|0,c=c+Math.imul(be,Se)|0,c=c+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Se)|0,y=y+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(he,xe)|0,g=g+Math.imul(he,Be)|0,y=y+Math.imul(H,Re)|0,c=c+Math.imul(H,De)|0,c=c+Math.imul(ee,Re)|0,g=g+Math.imul(ee,De)|0,y=y+Math.imul(q,Ce)|0,c=c+Math.imul(q,Le)|0,c=c+Math.imul(Q,Ce)|0,g=g+Math.imul(Q,Le)|0;var sr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(sr>>>26)|0,sr&=67108863,y=Math.imul(J,re),c=Math.imul(J,ae),c=c+Math.imul(te,re)|0,g=Math.imul(te,ae),y=y+Math.imul(j,de)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(N,de)|0,g=g+Math.imul(N,Ae)|0,y=y+Math.imul(Pe,pe)|0,c=c+Math.imul(Pe,ge)|0,c=c+Math.imul(Te,pe)|0,g=g+Math.imul(Te,ge)|0,y=y+Math.imul(Ee,Me)|0,c=c+Math.imul(Ee,Se)|0,c=c+Math.imul(ye,Me)|0,g=g+Math.imul(ye,Se)|0,y=y+Math.imul(be,xe)|0,c=c+Math.imul(be,Be)|0,c=c+Math.imul(oe,xe)|0,g=g+Math.imul(oe,Be)|0,y=y+Math.imul(fe,Re)|0,c=c+Math.imul(fe,De)|0,c=c+Math.imul(he,Re)|0,g=g+Math.imul(he,De)|0,y=y+Math.imul(H,Ce)|0,c=c+Math.imul(H,Le)|0,c=c+Math.imul(ee,Ce)|0,g=g+Math.imul(ee,Le)|0;var ar=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ar>>>26)|0,ar&=67108863,y=Math.imul(J,de),c=Math.imul(J,Ae),c=c+Math.imul(te,de)|0,g=Math.imul(te,Ae),y=y+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,c=c+Math.imul(N,pe)|0,g=g+Math.imul(N,ge)|0,y=y+Math.imul(Pe,Me)|0,c=c+Math.imul(Pe,Se)|0,c=c+Math.imul(Te,Me)|0,g=g+Math.imul(Te,Se)|0,y=y+Math.imul(Ee,xe)|0,c=c+Math.imul(Ee,Be)|0,c=c+Math.imul(ye,xe)|0,g=g+Math.imul(ye,Be)|0,y=y+Math.imul(be,Re)|0,c=c+Math.imul(be,De)|0,c=c+Math.imul(oe,Re)|0,g=g+Math.imul(oe,De)|0,y=y+Math.imul(fe,Ce)|0,c=c+Math.imul(fe,Le)|0,c=c+Math.imul(he,Ce)|0,g=g+Math.imul(he,Le)|0;var fr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(fr>>>26)|0,fr&=67108863,y=Math.imul(J,pe),c=Math.imul(J,ge),c=c+Math.imul(te,pe)|0,g=Math.imul(te,ge),y=y+Math.imul(j,Me)|0,c=c+Math.imul(j,Se)|0,c=c+Math.imul(N,Me)|0,g=g+Math.imul(N,Se)|0,y=y+Math.imul(Pe,xe)|0,c=c+Math.imul(Pe,Be)|0,c=c+Math.imul(Te,xe)|0,g=g+Math.imul(Te,Be)|0,y=y+Math.imul(Ee,Re)|0,c=c+Math.imul(Ee,De)|0,c=c+Math.imul(ye,Re)|0,g=g+Math.imul(ye,De)|0,y=y+Math.imul(be,Ce)|0,c=c+Math.imul(be,Le)|0,c=c+Math.imul(oe,Ce)|0,g=g+Math.imul(oe,Le)|0;var cr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(cr>>>26)|0,cr&=67108863,y=Math.imul(J,Me),c=Math.imul(J,Se),c=c+Math.imul(te,Me)|0,g=Math.imul(te,Se),y=y+Math.imul(j,xe)|0,c=c+Math.imul(j,Be)|0,c=c+Math.imul(N,xe)|0,g=g+Math.imul(N,Be)|0,y=y+Math.imul(Pe,Re)|0,c=c+Math.imul(Pe,De)|0,c=c+Math.imul(Te,Re)|0,g=g+Math.imul(Te,De)|0,y=y+Math.imul(Ee,Ce)|0,c=c+Math.imul(Ee,Le)|0,c=c+Math.imul(ye,Ce)|0,g=g+Math.imul(ye,Le)|0;var ur=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(ur>>>26)|0,ur&=67108863,y=Math.imul(J,xe),c=Math.imul(J,Be),c=c+Math.imul(te,xe)|0,g=Math.imul(te,Be),y=y+Math.imul(j,Re)|0,c=c+Math.imul(j,De)|0,c=c+Math.imul(N,Re)|0,g=g+Math.imul(N,De)|0,y=y+Math.imul(Pe,Ce)|0,c=c+Math.imul(Pe,Le)|0,c=c+Math.imul(Te,Ce)|0,g=g+Math.imul(Te,Le)|0;var lr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(lr>>>26)|0,lr&=67108863,y=Math.imul(J,Re),c=Math.imul(J,De),c=c+Math.imul(te,Re)|0,g=Math.imul(te,De),y=y+Math.imul(j,Ce)|0,c=c+Math.imul(j,Le)|0,c=c+Math.imul(N,Ce)|0,g=g+Math.imul(N,Le)|0;var dr=(E+y|0)+((c&8191)<<13)|0;E=(g+(c>>>13)|0)+(dr>>>26)|0,dr&=67108863,y=Math.imul(J,Ce),c=Math.imul(J,Le),c=c+Math.imul(te,Ce)|0,g=Math.imul(te,Le);var hr=(E+y|0)+((c&8191)<<13)|0;return E=(g+(c>>>13)|0)+(hr>>>26)|0,hr&=67108863,w[0]=bt,w[1]=yt,w[2]=Ot,w[3]=kt,w[4]=ct,w[5]=St,w[6]=vt,w[7]=zt,w[8]=Yt,w[9]=Xt,w[10]=or,w[11]=sr,w[12]=ar,w[13]=fr,w[14]=cr,w[15]=ur,w[16]=lr,w[17]=dr,w[18]=hr,E!==0&&(w[19]=E,l.length++),l};Math.imul||(P=S);function I(x,a,u){u.negative=a.negative^x.negative,u.length=x.length+a.length;for(var l=0,h=0,m=0;m>>26)|0,h+=w>>>26,w&=67108863}u.words[m]=E,l=w,w=h}return l!==0?u.words[m]=l:u.length--,u.strip()}function C(x,a,u){var l=new T;return l.mulp(x,a,u)}o.prototype.mulTo=function(a,u){var l,h=this.length+a.length;return this.length===10&&a.length===10?l=P(this,a,u):h<63?l=S(this,a,u):h<1024?l=I(this,a,u):l=C(this,a,u),l};function T(x,a){this.x=x,this.y=a}T.prototype.makeRBT=function(a){for(var u=new Array(a),l=o.prototype._countBits(a)-1,h=0;h>=1;return h},T.prototype.permute=function(a,u,l,h,m,w){for(var E=0;E>>1)m++;return 1<>>13,l[2*w+1]=m&8191,m=m>>>13;for(w=2*u;w>=26,u+=h/67108864|0,u+=m>>>26,this.words[l]=m&67108863}return u!==0&&(this.words[l]=u,this.length++),this},o.prototype.muln=function(a){return this.clone().imuln(a)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(a){var u=_(a);if(u.length===0)return new o(1);for(var l=this,h=0;h=0);var u=a%26,l=(a-u)/26,h=67108863>>>26-u<<26-u,m;if(u!==0){var w=0;for(m=0;m>>26-u}w&&(this.words[m]=w,this.length++)}if(l!==0){for(m=this.length-1;m>=0;m--)this.words[m+l]=this.words[m];for(m=0;m=0);var h;u?h=(u-u%26)/26:h=0;var m=a%26,w=Math.min((a-m)/26,this.length),E=67108863^67108863>>>m<w)for(this.length-=w,c=0;c=0&&(g!==0||c>=h);c--){var M=this.words[c]|0;this.words[c]=g<<26-m|M>>>m,g=M&E}return y&&g!==0&&(y.words[y.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(a,u,l){return n(this.negative===0),this.iushrn(a,u,l)},o.prototype.shln=function(a){return this.clone().ishln(a)},o.prototype.ushln=function(a){return this.clone().iushln(a)},o.prototype.shrn=function(a){return this.clone().ishrn(a)},o.prototype.ushrn=function(a){return this.clone().iushrn(a)},o.prototype.testn=function(a){n(typeof a=="number"&&a>=0);var u=a%26,l=(a-u)/26,h=1<=0);var u=a%26,l=(a-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var h=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},o.prototype.isubn=function(a){if(n(typeof a=="number"),n(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(y/67108864|0),this.words[m+l]=w&67108863}for(;m>26,this.words[m+l]=w&67108863;if(E===0)return this.strip();for(n(E===-1),E=0,m=0;m>26,this.words[m]=w&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(a,u){var l=this.length-a.length,h=this.clone(),m=a,w=m.words[m.length-1]|0,E=this._countBits(w);l=26-E,l!==0&&(m=m.ushln(l),h.iushln(l),w=m.words[m.length-1]|0);var y=h.length-m.length,c;if(u!=="mod"){c=new o(null),c.length=y+1,c.words=new Array(c.length);for(var g=0;g=0;B--){var L=(h.words[m.length+B]|0)*67108864+(h.words[m.length+B-1]|0);for(L=Math.min(L/w|0,67108863),h._ishlnsubmul(m,L,B);h.negative!==0;)L--,h.negative=0,h._ishlnsubmul(m,1,B),h.isZero()||(h.negative^=1);c&&(c.words[B]=L)}return c&&c.strip(),h.strip(),u!=="div"&&l!==0&&h.iushrn(l),{div:c||null,mod:h}},o.prototype.divmod=function(a,u,l){if(n(!a.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var h,m,w;return this.negative!==0&&a.negative===0?(w=this.neg().divmod(a,u),u!=="mod"&&(h=w.div.neg()),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.iadd(a)),{div:h,mod:m}):this.negative===0&&a.negative!==0?(w=this.divmod(a.neg(),u),u!=="mod"&&(h=w.div.neg()),{div:h,mod:w.mod}):this.negative&a.negative?(w=this.neg().divmod(a.neg(),u),u!=="div"&&(m=w.mod.neg(),l&&m.negative!==0&&m.isub(a)),{div:w.div,mod:m}):a.length>this.length||this.cmp(a)<0?{div:new o(0),mod:this}:a.length===1?u==="div"?{div:this.divn(a.words[0]),mod:null}:u==="mod"?{div:null,mod:new o(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new o(this.modn(a.words[0]))}:this._wordDiv(a,u)},o.prototype.div=function(a){return this.divmod(a,"div",!1).div},o.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},o.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},o.prototype.divRound=function(a){var u=this.divmod(a);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(a):u.mod,h=a.ushrn(1),m=a.andln(1),w=l.cmp(h);return w<0||m===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},o.prototype.modn=function(a){n(a<=67108863);for(var u=(1<<26)%a,l=0,h=this.length-1;h>=0;h--)l=(u*l+(this.words[h]|0))%a;return l},o.prototype.idivn=function(a){n(a<=67108863);for(var u=0,l=this.length-1;l>=0;l--){var h=(this.words[l]|0)+u*67108864;this.words[l]=h/a|0,u=h%a}return this.strip()},o.prototype.divn=function(a){return this.clone().idivn(a)},o.prototype.egcd=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=new o(0),E=new o(1),y=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++y;for(var c=l.clone(),g=u.clone();!u.isZero();){for(var M=0,B=1;!(u.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(u.iushrn(M);M-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(c),m.isub(g)),h.iushrn(1),m.iushrn(1);for(var L=0,R=1;!(l.words[0]&R)&&L<26;++L,R<<=1);if(L>0)for(l.iushrn(L);L-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(g)),w.iushrn(1),E.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(w),m.isub(E)):(l.isub(u),w.isub(h),E.isub(m))}return{a:w,b:E,gcd:l.iushln(y)}},o.prototype._invmp=function(a){n(a.negative===0),n(!a.isZero());var u=this,l=a.clone();u.negative!==0?u=u.umod(a):u=u.clone();for(var h=new o(1),m=new o(0),w=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var E=0,y=1;!(u.words[0]&y)&&E<26;++E,y<<=1);if(E>0)for(u.iushrn(E);E-- >0;)h.isOdd()&&h.iadd(w),h.iushrn(1);for(var c=0,g=1;!(l.words[0]&g)&&c<26;++c,g<<=1);if(c>0)for(l.iushrn(c);c-- >0;)m.isOdd()&&m.iadd(w),m.iushrn(1);u.cmp(l)>=0?(u.isub(l),h.isub(m)):(l.isub(u),m.isub(h))}var M;return u.cmpn(1)===0?M=h:M=m,M.cmpn(0)<0&&M.iadd(a),M},o.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var u=this.clone(),l=a.clone();u.negative=0,l.negative=0;for(var h=0;u.isEven()&&l.isEven();h++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var m=u.cmp(l);if(m<0){var w=u;u=l,l=w}else if(m===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(h)},o.prototype.invm=function(a){return this.egcd(a).a.umod(a)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(a){return this.words[0]&a},o.prototype.bincn=function(a){n(typeof a=="number");var u=a%26,l=(a-u)/26,h=1<>>26,E&=67108863,this.words[w]=E}return m!==0&&(this.words[w]=m,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(a){var u=a<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var l;if(this.length>1)l=1;else{u&&(a=-a),n(a<=67108863,"Number is too big");var h=this.words[0]|0;l=h===a?0:ha.length)return 1;if(this.length=0;l--){var h=this.words[l]|0,m=a.words[l]|0;if(h!==m){hm&&(u=1);break}}return u},o.prototype.gtn=function(a){return this.cmpn(a)===1},o.prototype.gt=function(a){return this.cmp(a)===1},o.prototype.gten=function(a){return this.cmpn(a)>=0},o.prototype.gte=function(a){return this.cmp(a)>=0},o.prototype.ltn=function(a){return this.cmpn(a)===-1},o.prototype.lt=function(a){return this.cmp(a)===-1},o.prototype.lten=function(a){return this.cmpn(a)<=0},o.prototype.lte=function(a){return this.cmp(a)<=0},o.prototype.eqn=function(a){return this.cmpn(a)===0},o.prototype.eq=function(a){return this.cmp(a)===0},o.red=function(a){return new W(a)},o.prototype.toRed=function(a){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(a){return this.red=a,this},o.prototype.forceRed=function(a){return n(!this.red,"Already a number in reduction context"),this._forceRed(a)},o.prototype.redAdd=function(a){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},o.prototype.redIAdd=function(a){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},o.prototype.redSub=function(a){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},o.prototype.redISub=function(a){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},o.prototype.redShl=function(a){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},o.prototype.redMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},o.prototype.redIMul=function(a){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(a){return n(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var k={k256:null,p224:null,p192:null,p25519:null};function O(x,a){this.name=x,this.p=new o(a,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var a=new o(null);return a.words=new Array(Math.ceil(this.n/13)),a},O.prototype.ireduce=function(a){var u=a,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var h=l0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},O.prototype.split=function(a,u){a.iushrn(this.n,0,u)},O.prototype.imulK=function(a){return a.imul(this.k)};function D(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(D,O),D.prototype.split=function(a,u){for(var l=4194303,h=Math.min(a.length,9),m=0;m>>22,w=E}w>>>=22,a.words[m-10]=w,w===0&&a.length>10?a.length-=10:a.length-=9},D.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var u=0,l=0;l>>=26,a.words[l]=m,u=h}return u!==0&&(a.words[a.length++]=u),a},o._prime=function(a){if(k[a])return k[a];var u;if(a==="k256")u=new D;else if(a==="p224")u=new U;else if(a==="p192")u=new V;else if(a==="p25519")u=new Y;else throw new Error("Unknown prime "+a);return k[a]=u,u};function W(x){if(typeof x=="string"){var a=o._prime(x);this.m=a.p,this.prime=a}else n(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}W.prototype._verify1=function(a){n(a.negative===0,"red works only with positives"),n(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,u){n((a.negative|u.negative)===0,"red works only with positives"),n(a.red&&a.red===u.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,u){this._verify2(a,u);var l=a.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},W.prototype.iadd=function(a,u){this._verify2(a,u);var l=a.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},W.prototype.sub=function(a,u){this._verify2(a,u);var l=a.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},W.prototype.isub=function(a,u){this._verify2(a,u);var l=a.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},W.prototype.shl=function(a,u){return this._verify1(a),this.imod(a.ushln(u))},W.prototype.imul=function(a,u){return this._verify2(a,u),this.imod(a.imul(u))},W.prototype.mul=function(a,u){return this._verify2(a,u),this.imod(a.mul(u))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var l=this.m.add(new o(1)).iushrn(2);return this.pow(a,l)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);n(!h.isZero());var w=new o(1).toRed(this),E=w.redNeg(),y=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,y).cmp(E)!==0;)c.redIAdd(E);for(var g=this.pow(c,h),M=this.pow(a,h.addn(1).iushrn(1)),B=this.pow(a,h),L=m;B.cmp(w)!==0;){for(var R=B,F=0;R.cmp(w)!==0;F++)R=R.redSqr();n(F=0;m--){for(var g=u.words[m],M=c-1;M>=0;M--){var B=g>>M&1;if(w!==h[0]&&(w=this.sqr(w)),B===0&&E===0){y=0;continue}E<<=1,E|=B,y++,!(y!==l&&(m!==0||M!==0))&&(w=this.mul(w,h[E]),y=0,E=0)}c=26}return w},W.prototype.convertTo=function(a){var u=a.umod(this.m);return u===a?u.clone():u},W.prototype.convertFrom=function(a){var u=a.clone();return u.red=null,u},o.mont=function(a){return new ie(a)};function ie(x){W.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,W),ie.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},ie.prototype.convertFrom=function(a){var u=this.imod(a.mul(this.rinv));return u.red=null,u},ie.prototype.imul=function(a,u){if(a.isZero()||u.isZero())return a.words[0]=0,a.length=1,a;var l=a.imul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.mul=function(a,u){if(a.isZero()||u.isZero())return new o(0)._forceRed(this);var l=a.mul(u),h=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=l.isub(h).iushrn(this.shift),w=m;return m.cmp(this.m)>=0?w=m.isub(this.m):m.cmpn(0)<0&&(w=m.iadd(this.m)),w._forceRed(this)},ie.prototype.invm=function(a){var u=this.imod(a._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,et)})(UM);var zM=UM.exports,vR=zM,_pe=Bt.Buffer;function Ppe(t,e){return _pe.from(t.toRed(vR.mont(e.modulus)).redPow(new vR(e.publicExponent)).fromRed().toArray())}var oj=Ppe,Cpe=Jw,S7=o1,Ipe=Fb,wR=nj,xR=ij,jM=zM,Tpe=oj,Rpe=wM,Ts=Bt.Buffer,kpe=function(e,r,n){var i;e.padding?i=e.padding:n?i=1:i=4;var o=Cpe(e),s;if(i===4)s=Bpe(o,r);else if(i===1)s=Ope(o,r,n);else if(i===3){if(s=new jM(r),s.cmp(o.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return n?Rpe(s,o):Tpe(s,o)};function Bpe(t,e){var r=t.modulus.byteLength(),n=e.length,i=Ipe("sha1").update(Ts.alloc(0)).digest(),o=i.length,s=2*o;if(n>r-s-2)throw new Error("message too long");var f=Ts.alloc(r-n-s-2),d=r-o-1,p=S7(o),b=xR(Ts.concat([i,f,Ts.alloc(1,1),e],d),wR(p,d)),v=xR(p,wR(b,o));return new jM(Ts.concat([Ts.alloc(1),v,b],r))}function Ope(t,e,r){var n=e.length,i=t.modulus.byteLength();if(n>i-11)throw new Error("message too long");var o;return r?o=Ts.alloc(i-n-3,255):o=Npe(i-n-3),new jM(Ts.concat([Ts.from([0,r?1:2]),o,Ts.alloc(1),e],i))}function Npe(t){for(var e=Ts.allocUnsafe(t),r=0,n=S7(t*2),i=0,o;rs||new SR(r).cmp(o.modulus)>=0)throw new Error("decryption error");var f;n?f=$pe(new SR(r),o):f=Dpe(r,o);var d=vg.alloc(s-f.length);if(f=vg.concat([d,f],s),i===4)return zpe(o,f);if(i===1)return jpe(o,f,n);if(i===3)return f;throw new Error("unknown padding")};function zpe(t,e){var r=t.modulus.byteLength(),n=Fpe("sha1").update(vg.alloc(0)).digest(),i=n.length;if(e[0]!==0)throw new Error("decryption error");var o=e.slice(1,i+1),s=e.slice(i+1),f=AR(o,ER(s,i)),d=AR(s,ER(f,r-i-1));if(Hpe(n,d.slice(0,i)))throw new Error("decryption error");for(var p=i;d[p]===0;)p++;if(d[p++]!==1)throw new Error("decryption error");return d.slice(p)}function jpe(t,e,r){for(var n=e.slice(0,2),i=2,o=0;e[i++]!==0;)if(i>=e.length){o++;break}var s=e.slice(2,i-1);if((n.toString("hex")!=="0002"&&!r||n.toString("hex")!=="0001"&&r)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return e.slice(i)}function Hpe(t,e){t=vg.from(t),e=vg.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++icj||t<0)throw new TypeError("offset must be a uint32");if(t>fj||t>e)throw new RangeError("offset out of range")}function lj(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>cj||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>fj)throw new RangeError("buffer too small")}M7&&M7.getRandomValues||!Je.process.browser?(bm.randomFill=qpe,bm.randomFillSync=Gpe):(bm.randomFill=MR,bm.randomFillSync=MR);function qpe(t,e,r,n){if(!aj.isBuffer(t)&&!(t instanceof et.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")n=e,e=0,r=t.length;else if(typeof r=="function")n=r,r=t.length-e;else if(typeof n!="function")throw new TypeError('"cb" argument must be a function');return uj(e,t.length),lj(r,e,t.length),dj(t,e,r,n)}function dj(t,e,r,n){if(Je.process.browser){var i=t.buffer,o=new Uint8Array(i,e,r);if(M7.getRandomValues(o),n){Je.process.nextTick(function(){n(null,t)});return}return t}if(n){_R(r,function(f,d){if(f)return n(f);d.copy(t,e),n(null,t)});return}var s=_R(r);return s.copy(t,e),t}function Gpe(t,e,r){if(typeof e>"u"&&(e=0),!aj.isBuffer(t)&&!(t instanceof et.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return uj(e,t.length),r===void 0&&(r=t.length-e),lj(r,e,t.length),dj(t,e,r)}var PR;function hj(){if(PR)return Ct;PR=1,Ct.randomBytes=Ct.rng=Ct.pseudoRandomBytes=Ct.prng=o1,Ct.createHash=Ct.Hash=Fb,Ct.createHmac=Ct.Hmac=SU;var t=T0e,e=Object.keys(t),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Ct.getHashes=function(){return r};var n=Rw;Ct.pbkdf2=n.pbkdf2,Ct.pbkdf2Sync=n.pbkdf2Sync;var i=Js;Ct.Cipher=i.Cipher,Ct.createCipher=i.createCipher,Ct.Cipheriv=i.Cipheriv,Ct.createCipheriv=i.createCipheriv,Ct.Decipher=i.Decipher,Ct.createDecipher=i.createDecipher,Ct.Decipheriv=i.Decipheriv,Ct.createDecipheriv=i.createDecipheriv,Ct.getCiphers=i.getCiphers,Ct.listCiphers=i.listCiphers;var o=cle();Ct.DiffieHellmanGroup=o.DiffieHellmanGroup,Ct.createDiffieHellmanGroup=o.createDiffieHellmanGroup,Ct.getDiffieHellman=o.getDiffieHellman,Ct.createDiffieHellman=o.createDiffieHellman,Ct.DiffieHellman=o.DiffieHellman;var s=xpe();Ct.createSign=s.createSign,Ct.Sign=s.Sign,Ct.createVerify=s.createVerify,Ct.Verify=s.Verify,Ct.createECDH=Ape();var f=rj;Ct.publicEncrypt=f.publicEncrypt,Ct.privateEncrypt=f.privateEncrypt,Ct.publicDecrypt=f.publicDecrypt,Ct.privateDecrypt=f.privateDecrypt;var d=bm;return Ct.randomFill=d.randomFill,Ct.randomFillSync=d.randomFillSync,Ct.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` +`))},Ct.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},Ct}var pj=hj();const Vpe=es(pj),Kpe=BE({__proto__:null,default:Vpe},[pj]);/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */const Gt=BigInt(0),xr=BigInt(1),Zc=BigInt(2),Dm=BigInt(3),CR=BigInt(8),Jr=Object.freeze({a:Gt,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:xr,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),IR=(t,e)=>(t+e/Zc)/e,Yy={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(t){const{n:e}=Jr,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-xr*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),f=IR(o*t,e),d=IR(-n*t,e);let p=st(t-f*r-d*i,e),b=st(-f*n-d*o,e);const v=p>s,A=b>s;if(v&&(p=e-p),A&&(b=e-b),p>s||b>s)throw new Error("splitScalarEndo: Endomorphism failed, k="+t);return{k1neg:v,k1:p,k2neg:A,k2:b}}},Ls=32,xp=32,Wpe=32,p6=Ls+1,m6=2*Ls+1;function TR(t){const{a:e,b:r}=Jr,n=st(t*t),i=st(n*t);return st(i+e*t+r)}const Qy=Jr.a===Gt;class mj extends Error{constructor(e){super(e)}}function RR(t){if(!(t instanceof Jt))throw new TypeError("JacobianPoint expected")}class Jt{constructor(e,r,n){this.x=e,this.y=r,this.z=n}static fromAffine(e){if(!(e instanceof Fr))throw new TypeError("JacobianPoint#fromAffine: expected Point");return e.equals(Fr.ZERO)?Jt.ZERO:new Jt(e.x,e.y,xr)}static toAffineBatch(e){const r=Xpe(e.map(n=>n.z));return e.map((n,i)=>n.toAffine(r[i]))}static normalizeZ(e){return Jt.toAffineBatch(e).map(Jt.fromAffine)}equals(e){RR(e);const{x:r,y:n,z:i}=this,{x:o,y:s,z:f}=e,d=st(i*i),p=st(f*f),b=st(r*p),v=st(o*d),A=st(st(n*f)*p),_=st(st(s*i)*d);return b===v&&A===_}negate(){return new Jt(this.x,st(-this.y),this.z)}double(){const{x:e,y:r,z:n}=this,i=st(e*e),o=st(r*r),s=st(o*o),f=e+o,d=st(Zc*(st(f*f)-i-s)),p=st(Dm*i),b=st(p*p),v=st(b-Zc*d),A=st(p*(d-v)-CR*s),_=st(Zc*r*n);return new Jt(v,A,_)}add(e){RR(e);const{x:r,y:n,z:i}=this,{x:o,y:s,z:f}=e;if(o===Gt||s===Gt)return this;if(r===Gt||n===Gt)return e;const d=st(i*i),p=st(f*f),b=st(r*p),v=st(o*d),A=st(st(n*f)*p),_=st(st(s*i)*d),S=st(v-b),P=st(_-A);if(S===Gt)return P===Gt?this.double():Jt.ZERO;const I=st(S*S),C=st(S*I),T=st(b*I),k=st(P*P-C-Zc*T),O=st(P*(T-k)-A*C),D=st(i*f*S);return new Jt(k,O,D)}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){const r=Jt.ZERO;if(typeof e=="bigint"&&e===Gt)return r;let n=OR(e);if(n===xr)return this;if(!Qy){let v=r,A=this;for(;n>Gt;)n&xr&&(v=v.add(A)),A=A.double(),n>>=xr;return v}let{k1neg:i,k1:o,k2neg:s,k2:f}=Yy.splitScalar(n),d=r,p=r,b=this;for(;o>Gt||f>Gt;)o&xr&&(d=d.add(b)),f&xr&&(p=p.add(b)),b=b.double(),o>>=xr,f>>=xr;return i&&(d=d.negate()),s&&(p=p.negate()),p=new Jt(st(p.x*Yy.beta),p.y,p.z),d.add(p)}precomputeWindow(e){const r=Qy?128/e+1:256/e+1,n=[];let i=this,o=i;for(let s=0;s>=v,S>d&&(S-=b,e+=xr);const P=_,I=_+Math.abs(S)-1,C=A%2!==0,T=S<0;S===0?s=s.add(Xy(C,i[P])):o=o.add(Xy(T,i[I]))}return{p:o,f:s}}multiply(e,r){let n=OR(e),i,o;if(Qy){const{k1neg:s,k1:f,k2neg:d,k2:p}=Yy.splitScalar(n);let{p:b,f:v}=this.wNAF(f,r),{p:A,f:_}=this.wNAF(p,r);b=Xy(s,b),A=Xy(d,A),A=new Jt(st(A.x*Yy.beta),A.y,A.z),i=b.add(A),o=v.add(_)}else{const{p:s,f}=this.wNAF(n,r);i=s,o=f}return Jt.normalizeZ([i,o])[0]}toAffine(e){const{x:r,y:n,z:i}=this,o=this.equals(Jt.ZERO);e==null&&(e=o?CR:Kb(i));const s=e,f=st(s*s),d=st(f*s),p=st(r*f),b=st(n*d),v=st(i*s);if(o)return Fr.ZERO;if(v!==xr)throw new Error("invZ was invalid");return new Fr(p,b)}}Jt.BASE=new Jt(Jr.Gx,Jr.Gy,xr);Jt.ZERO=new Jt(Gt,xr,Gt);function Xy(t,e){const r=e.negate();return t?r:e}const _7=new WeakMap;let Fr=class xc{constructor(e,r){this.x=e,this.y=r}_setWindowSize(e){this._WINDOW_SIZE=e,_7.delete(this)}hasEvenY(){return this.y%Zc===Gt}static fromCompressedHex(e){const r=e.length===32,n=c0(r?e:e.subarray(1));if(!q8(n))throw new Error("Point is not on curve");const i=TR(n);let o=Qpe(i);const s=(o&xr)===xr;r?s&&(o=st(-o)):(e[0]&1)===1!==s&&(o=st(-o));const f=new xc(n,o);return f.assertValidity(),f}static fromUncompressedHex(e){const r=c0(e.subarray(1,Ls+1)),n=c0(e.subarray(Ls+1,Ls*2+1)),i=new xc(r,n);return i.assertValidity(),i}static fromHex(e){const r=wg(e),n=r.length,i=r[0];if(n===Ls)return this.fromCompressedHex(r);if(n===p6&&(i===2||i===3))return this.fromCompressedHex(r);if(n===m6&&i===4)return this.fromUncompressedHex(r);throw new Error(`Point.fromHex: received invalid point. Expected 32-${p6} compressed bytes or ${m6} uncompressed bytes, not ${n}`)}static fromPrivateKey(e){return xc.BASE.multiply(Eg(e))}static fromSignature(e,r,n){const{r:i,s:o}=i1e(r);if(![0,1,2,3].includes(n))throw new Error("Cannot recover: invalid recovery bit");const s=gj(wg(e)),{n:f}=Jr,d=n===2||n===3?i+f:i,p=Kb(d,f),b=st(-s*p,f),v=st(o*p,f),A=n&1?"03":"02",_=xc.fromHex(A+Xd(d)),S=xc.BASE.multiplyAndAddUnsafe(_,b,v);if(!S)throw new Error("Cannot recover signature: point at infinify");return S.assertValidity(),S}toRawBytes(e=!1){return Hu(this.toHex(e))}toHex(e=!1){const r=Xd(this.x);return e?`${this.hasEvenY()?"02":"03"}${r}`:`04${r}${Xd(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const e="Point is not on elliptic curve",{x:r,y:n}=this;if(!q8(r)||!q8(n))throw new Error(e);const i=st(n*n),o=TR(r);if(st(i-o)!==Gt)throw new Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new xc(this.x,st(-this.y))}double(){return Jt.fromAffine(this).double().toAffine()}add(e){return Jt.fromAffine(this).add(Jt.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return Jt.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,r,n){const i=Jt.fromAffine(this),o=r===Gt||r===xr||this!==xc.BASE?i.multiplyUnsafe(r):i.multiply(r),s=Jt.fromAffine(e).multiplyUnsafe(n),f=o.add(s);return f.equals(Jt.ZERO)?void 0:f.toAffine()}};Fr.BASE=new Fr(Jr.Gx,Jr.Gy);Fr.ZERO=new Fr(Gt,Gt);function kR(t){return Number.parseInt(t[0],16)>=8?"00"+t:t}function BR(t){if(t.length<2||t[0]!==2)throw new Error(`Invalid signature integer tag: ${Ep(t)}`);const e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)throw new Error("Invalid signature integer: wrong length");if(r[0]===0&&r[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:c0(r),left:t.subarray(e+2)}}function Jpe(t){if(t.length<2||t[0]!=48)throw new Error(`Invalid signature tag: ${Ep(t)}`);if(t[1]!==t.length-2)throw new Error("Invalid signature: incorrect length");const{data:e,left:r}=BR(t.subarray(2)),{data:n,left:i}=BR(r);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${Ep(i)}`);return{r:e,s:n}}let Qd=class Yv{constructor(e,r){this.r=e,this.s=r,this.assertValidity()}static fromCompact(e){const r=e instanceof Uint8Array,n="Signature.fromCompact";if(typeof e!="string"&&!r)throw new TypeError(`${n}: Expected string or Uint8Array`);const i=r?Ep(e):e;if(i.length!==128)throw new Error(`${n}: Expected 64-byte hex`);return new Yv(g6(i.slice(0,64)),g6(i.slice(64,128)))}static fromDER(e){const r=e instanceof Uint8Array;if(typeof e!="string"&&!r)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:n,s:i}=Jpe(r?e:Hu(e));return new Yv(n,i)}static fromHex(e){return this.fromDER(e)}assertValidity(){const{r:e,s:r}=this;if(!xg(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!xg(r))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const e=Jr.n>>xr;return this.s>e}normalizeS(){return this.hasHighS()?new Yv(this.r,st(-this.s,Jr.n)):this}toDERRawBytes(){return Hu(this.toDERHex())}toDERHex(){const e=kR(Q1(this.s)),r=kR(Q1(this.r)),n=e.length/2,i=r.length/2,o=Q1(n),s=Q1(i);return`30${Q1(i+n+4)}02${s}${r}02${o}${e}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return Hu(this.toCompactHex())}toCompactHex(){return Xd(this.r)+Xd(this.s)}};function Rc(...t){if(!t.every(n=>n instanceof Uint8Array))throw new Error("Uint8Array list expected");if(t.length===1)return t[0];const e=t.reduce((n,i)=>n+i.length,0),r=new Uint8Array(e);for(let n=0,i=0;ne.toString(16).padStart(2,"0"));function Ep(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");let e="";for(let r=0;r0)return BigInt(t);if(typeof t=="bigint"&&xg(t))return t;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function st(t,e=Jr.P){const r=t%e;return r>=Gt?r:e+r}function wo(t,e){const{P:r}=Jr;let n=t;for(;e-- >Gt;)n*=n,n%=r;return n}function Qpe(t){const{P:e}=Jr,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),f=BigInt(88),d=t*t*t%e,p=d*d*t%e,b=wo(p,Dm)*p%e,v=wo(b,Dm)*p%e,A=wo(v,Zc)*d%e,_=wo(A,n)*A%e,S=wo(_,i)*_%e,P=wo(S,s)*S%e,I=wo(P,f)*P%e,C=wo(I,s)*S%e,T=wo(C,Dm)*p%e,k=wo(T,o)*_%e,O=wo(k,r)*d%e,D=wo(O,Zc);if(D*D%e!==t)throw new Error("Cannot find square root");return D}function Kb(t,e=Jr.P){if(t===Gt||e<=Gt)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=st(t,e),n=e,i=Gt,o=xr;for(;r!==Gt;){const f=n/r,d=n%r,p=i-o*f;n=r,r=d,i=o,o=p}if(n!==xr)throw new Error("invert: does not exist");return st(i,e)}function Xpe(t,e=Jr.P){const r=new Array(t.length),n=t.reduce((o,s,f)=>s===Gt?o:(r[f]=o,st(o*s,e)),xr),i=Kb(n,e);return t.reduceRight((o,s,f)=>s===Gt?o:(r[f]=st(o*r[f],e),st(o*s,e)),i),r}function e1e(t){const e=t.length*8-xp*8,r=c0(t);return e>0?r>>BigInt(e):r}function gj(t,e=!1){const r=e1e(t);if(e)return r;const{n}=Jr;return r>=n?r-n:r}let eh,Fm;class t1e{constructor(e,r){if(this.hashLen=e,this.qByteLen=r,typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof r!="number"||r<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(e).fill(1),this.k=new Uint8Array(e).fill(0),this.counter=0}hmac(...e){return Yc.hmacSha256(this.k,...e)}hmacSync(...e){return Fm(this.k,...e)}checkSync(){if(typeof Fm!="function")throw new mj("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(e=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),e),this.v=await this.hmac(this.v),e.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),e),this.v=await this.hmac(this.v))}reseedSync(e=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),e.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}async generate(){this.incr();let e=0;const r=[];for(;e0)e=BigInt(t);else if(typeof t=="string"){if(t.length!==2*xp)throw new Error("Expected 32 bytes of private key");e=g6(t)}else if(t instanceof Uint8Array){if(t.length!==xp)throw new Error("Expected 32 bytes of private key");e=c0(t)}else throw new TypeError("Expected valid private key");if(!xg(e))throw new Error("Expected private key: 0 < key < n");return e}function n1e(t){return t instanceof Fr?(t.assertValidity(),t):Fr.fromHex(t)}function i1e(t){if(t instanceof Qd)return t.assertValidity(),t;try{return Qd.fromDER(t)}catch{return Qd.fromCompact(t)}}function o1e(t,e=!1){return Fr.fromPrivateKey(t).toRawBytes(e)}function s1e(t,e,r,n=!1){return Fr.fromSignature(t,e,r).toRawBytes(n)}function NR(t){const e=t instanceof Uint8Array,r=typeof t=="string",n=(e||r)&&t.length;return e?n===p6||n===m6:r?n===p6*2||n===m6*2:t instanceof Fr}function a1e(t,e,r=!1){if(NR(t))throw new TypeError("getSharedSecret: first arg must be private key");if(!NR(e))throw new TypeError("getSharedSecret: second arg must be public key");const n=n1e(e);return n.assertValidity(),n.multiply(Eg(t)).toRawBytes(r)}function bj(t){const e=t.length>Ls?t.slice(0,Ls):t;return c0(e)}function f1e(t){const e=bj(t),r=st(e,Jr.n);return yj(r{t=wg(t);const e=xp+8;if(t.length1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const r=st(c0(t),Jr.n-xr)+xr;return P7(r)},randomBytes:(t=32)=>{if(ji.web)return ji.web.getRandomValues(new Uint8Array(t));if(ji.node){const{randomBytes:e}=ji.node;return Uint8Array.from(e(t))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>Yc.hashToPrivateKey(Yc.randomBytes(xp+8)),precompute(t=8,e=Fr.BASE){const r=e===Fr.BASE?e:new Fr(e.x,e.y);return r._setWindowSize(t),r.multiply(Dm),r},sha256:async(...t)=>{if(ji.web){const e=await ji.web.subtle.digest("SHA-256",Rc(...t));return new Uint8Array(e)}else if(ji.node){const{createHash:e}=ji.node,r=e("sha256");return t.forEach(n=>r.update(n)),Uint8Array.from(r.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(t,...e)=>{if(ji.web){const r=await ji.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=Rc(...e),i=await ji.web.subtle.sign("HMAC",r,n);return new Uint8Array(i)}else if(ji.node){const{createHmac:r}=ji.node,n=r("sha256",t);return e.forEach(i=>n.update(i)),Uint8Array.from(n.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(t,...e)=>{let r=ev[t];if(r===void 0){const n=await Yc.sha256(Uint8Array.from(t,i=>i.charCodeAt(0)));r=Rc(n,n),ev[t]=r}return Yc.sha256(r,...e)},taggedHashSync:(t,...e)=>{if(typeof eh!="function")throw new mj("sha256Sync is undefined, you need to set it");let r=ev[t];if(r===void 0){const n=eh(Uint8Array.from(t,i=>i.charCodeAt(0)));r=Rc(n,n),ev[t]=r}return eh(r,...e)},_JacobianPoint:Jt};Object.defineProperties(Yc,{sha256Sync:{configurable:!1,get(){return eh},set(t){eh||(eh=t)}},hmacSha256Sync:{configurable:!1,get(){return Fm},set(t){Fm||(Fm=t)}}});const b6="0x0000000000000000000000000000000000000000",LR="0x0000000000000000000000000000000000000000000000000000000000000000",DR=BigInt(0),FR=BigInt(1),$R=BigInt(2),UR=BigInt(27),zR=BigInt(28),tv=BigInt(35),Ql={};function jR(t){return rl(oo(t),32)}var mh,gh,bh,Eu,Zi;let Jf=(Zi=class{constructor(e,r,n,i){Ne(this,mh,void 0);Ne(this,gh,void 0);Ne(this,bh,void 0);Ne(this,Eu,void 0);Cb(e,Ql,"Signature"),ce(this,mh,r),ce(this,gh,n),ce(this,bh,i),ce(this,Eu,null)}get r(){return X(this,mh)}set r(e){_e(Gd(e)===32,"invalid r","value",e),ce(this,mh,dt(e))}get s(){return X(this,gh)}set s(e){_e(Gd(e)===32,"invalid s","value",e);const r=dt(e);_e(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),ce(this,gh,r)}get v(){return X(this,bh)}set v(e){const r=Tt(e,"value");_e(r===27||r===28,"invalid v","v",e),ce(this,bh,r)}get networkV(){return X(this,Eu)}get legacyChainId(){const e=this.networkV;return e==null?null:Zi.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=qt(this.s);return this.yParity&&(e[0]|=128),dt(e)}get compactSerialized(){return en([this.r,this.yParityAndS])}get serialized(){return en([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Zi(Ql,this.r,this.s,this.v);return this.networkV&&ce(e,Eu,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=pt(e,"v");return r==UR||r==zR?DR:(_e(r>=tv,"invalid EIP-155 v","v",e),(r-tv)/$R)}static getChainIdV(e,r){return pt(e)*$R+BigInt(35+r-27)}static getNormalizedV(e){const r=pt(e);return r===DR||r===UR?27:r===FR||r===zR?28:(_e(r>=tv,"invalid v","v",e),r&FR?27:28)}static from(e){function r(p,b){_e(p,b,"signature",e)}if(e==null)return new Zi(Ql,LR,LR,27);if(typeof e=="string"){const p=qt(e,"signature");if(p.length===64){const b=dt(p.slice(0,32)),v=p.slice(32,64),A=v[0]&128?28:27;return v[0]&=127,new Zi(Ql,b,dt(v),A)}if(p.length===65){const b=dt(p.slice(0,32)),v=p.slice(32,64);r((v[0]&128)===0,"non-canonical s");const A=Zi.getNormalizedV(p[64]);return new Zi(Ql,b,dt(v),A)}r(!1,"invalid raw signature length")}if(e instanceof Zi)return e.clone();const n=e.r;r(n!=null,"missing r");const i=jR(n),o=function(p,b){if(p!=null)return jR(p);if(b!=null){r(Tr(b,32),"invalid yParityAndS");const v=qt(b);return v[0]&=127,dt(v)}r(!1,"missing s")}(e.s,e.yParityAndS);r((qt(o)[0]&128)==0,"non-canonical s");const{networkV:s,v:f}=function(p,b,v){if(p!=null){const A=pt(p);return{networkV:A>=tv?A:void 0,v:Zi.getNormalizedV(A)}}if(b!=null)return r(Tr(b,32),"invalid yParityAndS"),{v:qt(b)[0]&128?28:27};if(v!=null){switch(Tt(v,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),d=new Zi(Ql,i,o,f);return s&&ce(d,Eu,s),r(e.yParity==null||Tt(e.yParity,"sig.yParity")===d.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===d.yParityAndS,"yParityAndS mismatch"),d}},mh=new WeakMap,gh=new WeakMap,bh=new WeakMap,Eu=new WeakMap,Zi);Yc.hmacSha256Sync=function(t,...e){return qt(Rb("sha256",t,en(e)))};var hf,Af;let HM=(Af=class{constructor(e){Ne(this,hf,void 0);_e(Gd(e)===32,"invalid private key","privateKey","[REDACTED]"),ce(this,hf,dt(e))}get privateKey(){return X(this,hf)}get publicKey(){return Af.computePublicKey(X(this,hf))}get compressedPublicKey(){return Af.computePublicKey(X(this,hf),!0)}sign(e){_e(Gd(e)===32,"invalid digest length","digest",e);const[r,n]=l1e(Ii(e),Ii(X(this,hf)),{recovered:!0,canonical:!0}),i=Qd.fromHex(r);return Jf.from({r:y0("0x"+i.r.toString(16),32),s:y0("0x"+i.s.toString(16),32),v:n?28:27})}computeSharedSecret(e){const r=Af.computePublicKey(e);return dt(a1e(Ii(X(this,hf)),qt(r)))}static computePublicKey(e,r){let n=qt(e,"key");if(n.length===32){const o=o1e(n,!!r);return dt(o)}if(n.length===64){const o=new Uint8Array(65);o[0]=4,o.set(n,1),n=o}const i=Fr.fromHex(n);return dt(i.toRawBytes(r))}static recoverPublicKey(e,r){_e(Gd(e)===32,"invalid digest length","digest",e);const n=Jf.from(r),i=Qd.fromCompact(Ii(en([n.r,n.s]))).toDERRawBytes(),o=s1e(Ii(e),i,n.yParity);return _e(o!=null,"invalid signature for digest","signature",r),dt(o)}static addPoints(e,r,n){const i=Fr.fromHex(Af.computePublicKey(e).substring(2)),o=Fr.fromHex(Af.computePublicKey(r).substring(2));return"0x"+i.add(o).toHex(!!n)}},hf=new WeakMap,Af);const d1e=BigInt(0),h1e=BigInt(36);function HR(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=qt(Ir(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const qM={};for(let t=0;t<10;t++)qM[String(t)]=String(t);for(let t=0;t<26;t++)qM[String.fromCharCode(65+t)]=String(10+t);const qR=15;function p1e(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>qM[n]).join("");for(;e.length>=qR;){let n=e.substring(0,qR);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}const m1e=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function g1e(t){t=t.toLowerCase();let e=d1e;for(let r=0;re.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return X(this,Au)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return X(this,Au)===!0?-1:X(this,Au)===!1?this.value.length:null}static from(e,r){return new nf(tf,e,r)}static uint8(e){return ot(e,8)}static uint16(e){return ot(e,16)}static uint24(e){return ot(e,24)}static uint32(e){return ot(e,32)}static uint40(e){return ot(e,40)}static uint48(e){return ot(e,48)}static uint56(e){return ot(e,56)}static uint64(e){return ot(e,64)}static uint72(e){return ot(e,72)}static uint80(e){return ot(e,80)}static uint88(e){return ot(e,88)}static uint96(e){return ot(e,96)}static uint104(e){return ot(e,104)}static uint112(e){return ot(e,112)}static uint120(e){return ot(e,120)}static uint128(e){return ot(e,128)}static uint136(e){return ot(e,136)}static uint144(e){return ot(e,144)}static uint152(e){return ot(e,152)}static uint160(e){return ot(e,160)}static uint168(e){return ot(e,168)}static uint176(e){return ot(e,176)}static uint184(e){return ot(e,184)}static uint192(e){return ot(e,192)}static uint200(e){return ot(e,200)}static uint208(e){return ot(e,208)}static uint216(e){return ot(e,216)}static uint224(e){return ot(e,224)}static uint232(e){return ot(e,232)}static uint240(e){return ot(e,240)}static uint248(e){return ot(e,248)}static uint256(e){return ot(e,256)}static uint(e){return ot(e,256)}static int8(e){return ot(e,-8)}static int16(e){return ot(e,-16)}static int24(e){return ot(e,-24)}static int32(e){return ot(e,-32)}static int40(e){return ot(e,-40)}static int48(e){return ot(e,-48)}static int56(e){return ot(e,-56)}static int64(e){return ot(e,-64)}static int72(e){return ot(e,-72)}static int80(e){return ot(e,-80)}static int88(e){return ot(e,-88)}static int96(e){return ot(e,-96)}static int104(e){return ot(e,-104)}static int112(e){return ot(e,-112)}static int120(e){return ot(e,-120)}static int128(e){return ot(e,-128)}static int136(e){return ot(e,-136)}static int144(e){return ot(e,-144)}static int152(e){return ot(e,-152)}static int160(e){return ot(e,-160)}static int168(e){return ot(e,-168)}static int176(e){return ot(e,-176)}static int184(e){return ot(e,-184)}static int192(e){return ot(e,-192)}static int200(e){return ot(e,-200)}static int208(e){return ot(e,-208)}static int216(e){return ot(e,-216)}static int224(e){return ot(e,-224)}static int232(e){return ot(e,-232)}static int240(e){return ot(e,-240)}static int248(e){return ot(e,-248)}static int256(e){return ot(e,-256)}static int(e){return ot(e,-256)}static bytes1(e){return Wt(e,1)}static bytes2(e){return Wt(e,2)}static bytes3(e){return Wt(e,3)}static bytes4(e){return Wt(e,4)}static bytes5(e){return Wt(e,5)}static bytes6(e){return Wt(e,6)}static bytes7(e){return Wt(e,7)}static bytes8(e){return Wt(e,8)}static bytes9(e){return Wt(e,9)}static bytes10(e){return Wt(e,10)}static bytes11(e){return Wt(e,11)}static bytes12(e){return Wt(e,12)}static bytes13(e){return Wt(e,13)}static bytes14(e){return Wt(e,14)}static bytes15(e){return Wt(e,15)}static bytes16(e){return Wt(e,16)}static bytes17(e){return Wt(e,17)}static bytes18(e){return Wt(e,18)}static bytes19(e){return Wt(e,19)}static bytes20(e){return Wt(e,20)}static bytes21(e){return Wt(e,21)}static bytes22(e){return Wt(e,22)}static bytes23(e){return Wt(e,23)}static bytes24(e){return Wt(e,24)}static bytes25(e){return Wt(e,25)}static bytes26(e){return Wt(e,26)}static bytes27(e){return Wt(e,27)}static bytes28(e){return Wt(e,28)}static bytes29(e){return Wt(e,29)}static bytes30(e){return Wt(e,30)}static bytes31(e){return Wt(e,31)}static bytes32(e){return Wt(e,32)}static address(e){return new nf(tf,"address",e)}static bool(e){return new nf(tf,"bool",!!e)}static bytes(e){return new nf(tf,"bytes",e)}static string(e){return new nf(tf,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new nf(tf,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===GR}static dereference(e,r){if(nf.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Au=new WeakMap;let Yn=nf;class y1e extends rc{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=Yn.dereference(r,"string");try{n=Zt(n)}catch(i){return this._throwError(i.message,r)}return e.writeValue(n)}decode(e){return Zt(y0(e.readValue(),20))}}class v1e extends rc{constructor(r){super(r.name,r.type,"_",r.dynamic);Oe(this,"coder");this.coder=r}defaultValue(){return this.coder.defaultValue()}encode(r,n){return this.coder.encode(r,n)}decode(r){return this.coder.decode(r)}}function wj(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let d={};n=e.map(p=>{const b=p.localName;return Ge(b,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:p},value:r}),Ge(!d[b],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:p},value:r}),d[b]=!0,r[b]})}else _e(!1,"invalid tuple value","tuple",r);_e(e.length===n.length,"types/value length mismatch","tuple",r);let i=new Q9,o=new Q9,s=[];e.forEach((d,p)=>{let b=n[p];if(d.dynamic){let v=o.length;d.encode(o,b);let A=i.writeUpdatableValue();s.push(_=>{A(_+v)})}else d.encode(i,b)}),s.forEach(d=>{d(i.length)});let f=t.appendWriter(i);return f+=t.appendWriter(o),f}function xj(t,e){let r=[],n=[],i=t.subReader(0);return e.forEach(o=>{let s=null;if(o.dynamic){let f=t.readIndex(),d=i.subReader(f);try{s=o.decode(d)}catch(p){if($o(p,"BUFFER_OVERRUN"))throw p;s=p,s.baseType=o.name,s.name=o.localName,s.type=o.type}}else try{s=o.decode(t)}catch(f){if($o(f,"BUFFER_OVERRUN"))throw f;s=f,s.baseType=o.name,s.name=o.localName,s.type=o.type}if(s==null)throw new Error("investigate");r.push(s),n.push(o.localName||null)}),e6.fromItems(r,n)}class w1e extends rc{constructor(r,n,i){const o=r.type+"["+(n>=0?n:"")+"]",s=n===-1||r.dynamic;super("array",o,i,s);Oe(this,"coder");Oe(this,"length");xt(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let i=0;is||i<-(s+P1e))&&this._throwError("value out-of-bounds",n),i=YF(i,8*si)}else(i<_1e||i>au(o,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(i)}decode(r){let n=au(r.readValue(),this.size*8);return this.signed&&(n=Q2(n,this.size*8)),n}}class T1e extends Ej{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Bf(Yn.dereference(r,"string")))}decode(e){return HS(super.decode(e))}}class rv extends rc{constructor(r,n){let i=!1;const o=[];r.forEach(f=>{f.dynamic&&(i=!0),o.push(f.type)});const s="tuple("+o.join(",")+")";super("tuple",s,n,i);Oe(this,"coders");xt(this,{coders:Object.freeze(r.slice())})}defaultValue(){const r=[];this.coders.forEach(i=>{r.push(i.defaultValue())});const n=this.coders.reduce((i,o)=>{const s=o.localName;return s&&(i[s]||(i[s]=0),i[s]++),i},{});return this.coders.forEach((i,o)=>{let s=i.localName;!s||n[s]!==1||(s==="length"&&(s="_length"),r[s]==null&&(r[s]=r[o]))}),Object.freeze(r)}encode(r,n){const i=Yn.dereference(n,"tuple");return wj(r,this.coders,i)}decode(r){return xj(r,this.coders)}}function fl(t){return Ir(Bf(t))}function R1e(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,o=[0,1];for(let D=1;D>--d&1}const v=31,A=2**v,_=A>>>1,S=_>>1,P=A-1;let I=0;for(let D=0;D1;){let ie=U+V>>>1;D>>1|b(),Y=Y<<1^_,W=(W^_)<<1|_|1;T=Y,k=1+W-Y}let O=n-4;return C.map(D=>{switch(D-O){case 3:return O+65792+(t[f++]<<16|t[f++]<<8|t[f++]);case 2:return O+256+(t[f++]<<8|t[f++]);case 1:return O+t[f++];default:return D-1}})}function k1e(t){let e=0;return()=>t[e++]}function Aj(t){return k1e(R1e(B1e(t)))}function B1e(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,o)=>e[i.charCodeAt(0)]=o);let r=t.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,s=0,f=0;i=8&&(n[o++]=f>>(s-=8));return n}function O1e(t){return t&1?~t>>1:t>>1}function N1e(t,e){let r=Array(t);for(let n=0,i=0;n{let e=w0(t);if(e.length)return e})}function Mj(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(L1e(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(D1e(r,t))}return e.flat()}function Ag(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function _j(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;in[s].push(o));return n}function L1e(t,e){let r=1+e(),n=e(),i=Ag(e);return _j(i.length,1+t,e).flatMap((s,f)=>{let[d,...p]=s;return Array(i[f]).fill().map((b,v)=>{let A=v*n;return[d+v*r,p.map(_=>_+A)]})})}function D1e(t,e){let r=1+e();return _j(r,1+t,e).map(i=>[i[0],i.slice(1)])}var lo=Aj("AEgSbwjEDVYByQKaAQsBOQDpATQAngDUAHsAoABoANQAagCNAEQAhABMAHIAOwA9ACsANgAmAGIAHgAvACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGAAeABMAFwAXAA0ADgAWAA8AFAAVBFsF1QEXE0o3xAXUALIArkABaACmAgPGAK6AMDAwMAE/qAYK7P4HQAblMgVYBVkAPSw5Afa3EgfJwgAPA8meNALGCjACjqIChtk/j2+KAsXMAoPzASDgCgDyrgFCAi6OCkCQAOQA4woWABjVuskNDD6eBBx4AP4COhi+D+wKBirqBgSCaA0cBy4ArABqku+mnIAAXAaUJAbqABwAPAyUFvyp/Mo8INAIvCoDshQ8APcubKQAon4ZABgEJtgXAR4AuhnOBPsKIE04CZgJiR8cVlpM5INDABQADQAWAA9sVQAiAA8ASO8W2T30OVnKluYvChEeX05ZPe0AFAANABYAD2wgXUCYAMPsABwAOgzGFryp/AHauQVcBeMC0KACxLEKTR2kZhR0Gm5M9gC8DmgC4gAMLjSKF8qSAoF8ARMcAL4OaALiAAwuAUlQJpJMCwMt/AUpCthqGK4B2EQAciwSeAIyFiIDKCi6OGwAOuIB9iYAyA7MtgEcZIIAsgYABgCK1EoFHNZsGACoKNIBogAAAAAAKy4DnABoAQoaPu43dQQZGACrAcgCIgDgLBJ0OvRQsTOiKDVJBfsoBVoFWbC5BWo7XkITO1hCmHuUZmCh+QwUA8YIJvJ4JASkTAJUVAJ2HKwoAZCkpjZcA0YYBIRiCgDSBqxAMCQHKgI6XgBsAWIgcgCEHhoAlgFKuAAoahgBsMYDOC4iRFQBcFoGZgJmAPJKGAMqAgYASkIArABeAHQALLYGCPTwGo6AAAAKIgAqALQcSAHSAdwIDDKXeYHpAAsAEgA1AD4AOTR3etTBEGAQXQJNCkxtOxUMAq0PpwvmERYM0irM09kANKoH7ANUB+wDVANUB+wH7ANUB+wDVANUA1QDVBwL8BvUwRBgD0kEbgWPBYwE1wiEJkoRggcpCNNUDnQfHEgDRgD9IyZJHTuUMwwlQ0wNTQQH/TZDbKh9OQNIMaxU9pCjA8wyUDltAh5yEqEAKw90HTW2Tn96SHGhCkxPr7WASWNOaAK/Oqk/+QoiCZRvvHdPBj4QGCeiEPQMMAGyATgN6kvVBO4GOATGH3oZFg/KlZkIoi3aDOom4C6egFcj8iqABepL8TzaC0pRZQ9WC2IJ4DpggUsDHgEKIogK2g02CGoQ8ArGaA3iEUIHNgPSSZcAogb+Cw4dMhWyJg1iqQsGOXQG+BrzC4wmrBMmevkF0BoeBkoBJhr8AMwu5IWtWi5cGU9cBgALIiPEFKVQHQ0iQLR4RRoYBxIlpgKOQ21KhFEzHpAh8zw6DWMuEFF5B/I8AhlMC348m0aoRQsRzz6KPUUiRkwpBDJ8LCwniAnMD4IMtnxvAVYJHgmuDG4TLhEUN8IINgcWKpchJxIIHkaSYJcE9JwD8BPOAwgFPAk+BxADshwqEysVJgUKgSHUAvA20i6wAoxWfQEUBcgPIh/cEE1H3Q7mCJgCYgOAJegAKhUeABQimAhAYABcj9VTAi7ICMRqaSNxA2QU5F4RcAeODlQHpBwwFbwc3nDFXgiGBSigrAlYAXIJlgFcBOAIBjVYjJ0gPmdQi1UYmCBeQTxd+QIuDGIVnES6h3UCiA9oEhgBMgFwBzYM/gJ0EeoRaBCSCOiGATWyM/U6IgRMIYAgDgokA0xsywskJvYM9WYBoBJfAwk0OnfrZ6hgsyEX+gcWMsJBXSHuC49PygyZGr4YP1QrGeEHvAPwGvAn50FUBfwDoAAQOkoz6wS6C2YIiAk8AEYOoBQH1BhnCm6MzQEuiAG0lgNUjoACbIwGNAcIAGQIhAV24gAaAqQIoAACAMwDVAA2AqoHmgAWAII+AToDJCwBHuICjAOQCC7IAZIsAfAmBBjADBIA9DRuRwLDrgKAZ2afBdpVAosCRjIBSiIEAktETgOsbt4A2ABIBhDcRAESqEfIF+BAAdxsKADEAPgAAjIHAj4BygHwagC0AVwLLgmfsLIBSuYmAIAAEmgB1AKGANoAMgB87gFQAEoFVvYF0AJMRgEOLhUoVF4BuAMcATABCgB2BsiKosYEHARqB9ACEBgV3gLvKweyAyLcE8pCwgK921IAMhMKNQqkCqNgWF0wAy5vPU0ACx+lPsQ/SwVOO1A7VTtQO1U7UDtVO1A7VTtQO1UDlLzfvN8KaV9CYegMow3RRMU6RhPYYE5gLxPFLbQUvhXLJVMZOhq5JwIl4VUGDwEt0GYtCCk0che5ADwpZYM+Y4MeLQpIHORTjlT1LRgArkufM6wNqRsSRD0FRHXqYicWCwofAmR+AmI/WEqsWDcdAqH0AmiVAmYGAp+BOBgIAmY4AmYjBGsEfAN/EAN+jzkDOXQUOX86ICACbBoCMjM4BwJtxAJtq+yHMGRCKAFkANsA3gBHAgeVDIoA+wi/AAqyAncsAnafPAJ5SEACeLcaWdhFq0bwAnw8AnrFAn0GAnztR/1IemAhACgSSVVKWBIUSskC0P4C0MlLJAOITAOH40TCkS8C8p5dAAMDq0vLTCoiAMxNSU2sAos8AorVvhgEGkBkArQCjjQCjlk9lH4CjtYCjll1UbFTMgdS0VSCApP4ApMJAOYAGVUbVaxVzQMsGCmSgzLeeGNFODYCl5wC769YHqUAViIClowClnmZAKZZqVoGfkoAOAKWsgKWS1xBXM4CmcgCmWFcx10EFgKcmDm/OpoCnBMCn5gCnrWHABoMLicMAp3uAp6PALI6YTFh7AKe0AKgawGmAp6cHAKeS6JjxWQkIigCJ6wCJnsCoPgCoEnUAqYsAqXLAqf8AHoCp+9oeWiuAABGahlqzgKs4AKsqwKtZAKs/wJXGgJV2QKx3tQDH0tslAKyugoCsuUUbN1tYG1FXAMlygK2WTg8bo0DKUICuFsCuUQSArkndHAzcN4CvRYDLa8DMg4CvoVx/wMzbgK+F3Mfc0wCw8gCwwFzf3RIMkJ03QM8pAM8lwM9vALFeQLGRALGDYYCyGZOAshBAslMAskrAmSaAt3PeHZeeKt5IkvNAxigZv8CYfEZ8JUhewhej164DgLPaALPaSxIUM/wEJwAw6oCz3ABJucDTg9+SAIC3CQC24cC0kwDUlkDU1wA/gNViYCGPMgT6l1CcoLLg4oC2sQC2duEDYRGpzkDhqIALANkC4ZuVvYAUgLfYgLetXB0AuIs7REB8y0kAfSYAfLPhALr8ALpbXYC6vYC6uEA9kQBtgLuhgLrmZanlwAC7jwDhd2YdnDdcZ4C8wAAZgOOE5mQAvcQA5FrA5KEAveVAvnWAvhjmhmaqLg0mxsDnYAC/vcBGAA2nxmfsAMFigOmZwOm1gDOwgMGZ6GFogIGAwxGAQwBHAdqBl62ZAIAuARovA6IHrAKABRyNgAgAzASSgOGfAFgJB4AjOwAHgDmoAScjgi0BhygwgCoBRK86h4+PxZ5BWk4P0EsQiJCtV9yEl+9AJbGBTMAkE0am7o7J2AzErrQDjAYxxiKyfcFWAVZBVgFWQVkBVkFWAVZBVgFWQVYBVkFWAVZRxYI2IZoAwMDCmVe6iwEygOyBjC8vAC8BKi8AOhBKhazBUc+aj5xQkBCt192OF/pAFgSM6wAjP/MbMv9puhGez4nJAUsFyg3Nn5u32vB8hnDLGoBbNdvMRgFYAVrycLJuQjQSlwBAQEKfV5+jL8AND+CAAQW0gbmriQGAIzEDAMCDgDlZh4+JSBLQrJCvUI5JF8oYDcoOSQJwj4KRT9EPnk+gj5xPnICikK9SkM8X8xPUGtOCy1sVTBrDG8gX+E0OxwJaJwKYyQsPR4nQqxCvSzMAsv9X8oPIC8KCQoAACN+nt9rOy5LGMmsya0JZsLMzQphQWAP5hCkEgCTjh5GQiYbqm06zjkKND9EPnFCQBwICx5NSG1cLS5a4rwTCn7uHixCQBxeCUsKDzRVREM4BTtEnC0KghwuQkAb9glUIyQZMTIBBo9i8F8KcmTKYAxgLiRvAERgGjoDHB9gtAcDbBFmT2BOEgIAZOhgFmCWYH5gtGBMYJJpFhgGtg/cVqq8WwtDF6wBvCzOwgMgFgEdBB8BegJtMDGWU4EBiwq5SBsA5SR0jwvLDqdN6wGcAoidUAVBYAD4AD4LATUXWHsMpg0lILuwSABQDTUAFhO4NVUC0wxLZhEcANlPBnYECx9bADIAtwKbKAsWcKwzOaAaAVwBhwn9A9ruEAarBksGugAey1aqWwq7YhOKCy1ADrwBvAEjA0hbKSkpIR8gIi0TJwciDY4AVQJvWJFKlgJvIA9ySAHUdRDPUiEaqrFN6wcSBU1gAPgAPgsBewAHJW0LiAymOTEuyLBXDgwAYL0MAGRKaFAiIhzAADIAtwKbKC08D88CkRh8ULxYyXRzjtilnA72mhU+G+0S2hIHDxwByAk7EJQGESwNNwwAPAC0zwEDAKUA4gCbizAAFQBcG8cvbXcrDsIRAzwlRNTiHR8MG34CfATCC6vxbQA4Oi4Opzkuz6IdB7wKABA7Ls8SGgB9rNsdD7wbSBzOoncfAT4qYB0C7KAJBE3z5R9mDL0M+wg9Cj8ABcELPgJMDbwIvQ09CT0KvS7PoisOvAaYAhwPjBriBBwLvBY8AKELPBC8BRihe90AO2wMPQACpwm9BRzR9QYFB2/LBnwAB7wSXBISvQECAOsCAAB1FVwHFswV/HAXvBg8AC68AuyovAAevAJWISuAAAG8AALkFT0VvCvso7zJqDwEAp8nTAACXADn3hm8CaVcD7/FAPUafAiiBQv/cQDfvKe8GNwavKOMeXMG/KmchAASvAcbDAADlABtvAcAC7ynPAIaPLsIopzLDvwHwak8AOF8L7dtvwNJAAPsABW8AAb8AAm8AGmMABq8AA68Axi8jmoV/AABXAAObAAuTB8ABrwAF7wIIgANSwC6vCcAA7wADpwq7ACyWwAcHAAbvAAB7AqiAAXHCxYV3AAHnABCvAEDAGm8AAt8AB28AAi8CaIABcsAbqAZ1gCSCCIABcsAATwAB9wAHZwIIgAGmwAJfAAbLABtHADmvIEACFwACDwAFLwAaPwJIgAGywDjjAAJPAuiDsX7YAAHPABunUBJAEgACrwFAAM8AAmuAzgABxwAGXwAAgym/AAKHAAKPAAJ/KfsBrwACRwAAwwAEDwBABQ8ABFsAA+MAA3sAA28ABkMBxYcABU8AG6cFrQBvAC7ABM8BABpLAsA4UwAAjwABFMAF3wFHAAG0QAYvB8BfClTADpGALAJBw4McwApK3EBpQYIXwJtJA0ACghwTG1gK4oggRVjLjcDogq1AALZABcC/ARvAXdzSFMVIgNQAhY/AS0GBHRHvnxTe0EAKgAyAvwAVAvcAHyRLQEsAHfmDhIzRwJLAFgGAAJRAQiLzQB5PAQhpgBbANcWAJZpOCCMAM5ssgDQ1RcJw3Z0HBlXHgrSAYmRrCNUVE5JEz3DivoAgB04QSos4RKYUABzASosMSlDGhADMVYE+MbvAExm3QBrAnICQBF7Osh4LzXWBhETIAUVCK6v/xPNACYAAQIbAIYAiQCONgDjALQA1QCdPQC7AKsApgChAOcAnwDTAJwA4AEBAPwAwAB6AFsAywDNAPwA1wDrAIkAogEqAOMA2ADVBAIIKzTT09PTtb/bzM/NQjEWAUsBVS5GAVMBYgFhAVQBRUpCRGcMAUwUBgkEMzcMBwAgDSQmKCs3OTk8PDw9Pg0/HVBQUFBSUlFSKFNUVlVVHFxgYF9hYCNlZ29ucXFxcXFxc3Nzc3Nzc3Nzc3N1dXZ1dFsAPesAQgCTAHEAKwBf8QCHAFAAUAAwAm/oAIT+8fEAXQCM6wCYAEgAWwBd+PipAH4AfgBiAE8AqgAdAK8AfAI5AjwA9QDgAPcA9wDhAPgA4gDiAOEA3wAoAnQBSgE5ATcBTQE3ATcBNwEyATEBMQExARUBURAAKgkBAEwYCxcEFhcPAIcAjwCfAEoAYxkCKgBvAGgAkAMOAyArAxpCP0gqAIoCSADAAlACnQC5Ao8CjwKPAo8CjwKPAoQCjwKPAo8CjwKPAo8CjgKOApECmQKQAo8CjwKNAo0CjQKNAosCjgJuAc0CkAKYAo8CjwKOF3oMAPcGA5gCWgIzGAFNETYC2xILLBQBRzgUTpIBdKU9AWJaAP4DOkgA/wCSKh4ZkGsAKmEAagAvAIoDlcyM8K+FWwa7LA/DEgKe1nUrCwQkWwGzAN5/gYB/gX+Cg4N/hIeFf4aJh4GIg4mDin+Lf4x/jYuOf49/kIORf5J/k3+Uf5WElomXg5h/AIMloQCEBDwEOQQ7BD4EPARCBD8EOgRABEIEQQQ9BD8EQgCkA4gAylIA0AINAPdbAPcBGgD3APUA9QD2APXVhSRmvwD3APUA9QD2APUdAIpbAPcAigEaAPcAigLtAPcAitWFJGa/HQD4WwEaAPcA9wD1APUA9gD1APgA9QD1APYA9dWFJGa/HQCKWwEaAPcAigD3AIoC7QD3AIrVhSRmvx0CRAE3AksBOgJMwgOfAu0Dn9WFJGa/HQCKWwEaA58AigOfAIoC7QOfAIrVhSRmvx0EMQCKBDIAigeOMm4hLQCKAT9vBCQA/gDHWwMAVVv/FDMDAIoDPtkASgMAigMAl2dBtv/TrfLzakaPh3aztmIuZQrR3ER2n5Yo+qNR2jK/aP/V04UK1njIJXLgkab9PjOxyJDVbIN3R/FZLoZVl2kYFQIZ7V6LpRqGDt9OdDohnJKp5yX/HLj0voPpLrneDaN11t5W3sSM4ALscgSw8fyWLVkKa/cNcQmjYOgTLZUgOLi2F05g4TR0RfgZ4PBdntxdV3qvdxQt8DeaMMgjJMgwUxYN3tUNpUNx21AvwADDAIa0+raTWaoBXmShAl5AThpMi282o+WzOKMlxjHj7a+DI6AM6VI9w+xyh3Eyg/1XvPmbqjeg2MGXugHt8wW03DQMRTd5iqqOhjLvyOCcKtViGwAHVLyl86KqvxVX7MxSW8HLq6KCrLpB8SspAOHO9IuOwCh9poLoMEha9CHCxlRAXJNDobducWjqhFHqCkzjTM2V9CHslwq4iU19IxqhIFZMve15lDTiMVZIPdADXGxTqzSTv0dDWyk1ht430yvaYCy9qY0MQ3cC5c1uw4mHcTGkMHTAGC99TkNXFAiLQgw9ZWhwKJjGCe+J5FIaMpYhhyUnEgfrF3zEtzn40DdgCIJUJfZ0mo3eXsDwneJ8AYCr7Vx2eHFnt2H6ZEyAHs9JoQ4Lzh5zBoGOGwAz37NOPuqSNmZf51hBEovtpm2T1wI79OBWDyvCFYkONqAKGVYgIL0F+uxTcMLSPtFbiNDbBPFgip8MGDmLLHbSyGXdCMO6f7teiW9EEmorZ+75KzanZwvUySgjoUQBTfHlOIerJs6Y9wLlgDw18AB1ne0tZRNgGjcrqHbtubSUooEpy4hWpDzTSrmvqw0H9AoXQLolMt9eOM+l9RitBB1OBnrdC1XL4yLFyXqZSgZhv7FnnDEXLUeffb4nVDqYTLY6X7gHVaK4ZZlepja2Oe6OhLDI/Ve5SQTCmJdH3HJeb14cw99XsBQAlDy5s5kil2sGezZA3tFok2IsNja7QuFgM30Hff3NGSsSVFYZLOcTBOvlPx8vLhjJrSI7xrNMA/BOzpBIJrdR1+v+zw4RZ7ry6aq4/tFfvPQxQCPDsXlcRvIZYl+E5g3kJ+zLMZon0yElBvEOQTh6SaAdIO6BwdqJqfvgU+e8Y65FQhdiHkZMVt9/39N2jGd26J6cNjq8cQIyp6RonRPgVn2fl89uRDcQ27GacaN0MPrcNyRlbUWelKfDfyrNVVGBG5sjd3jXzTx06ywyzuWn5jbvEfPPCTbpClkgEu9oPLKICxU5HuDe3jA1XnvU85IYYhaEtOU1YVWYhEFsa4/TQj3rHdsU2da2eVbF8YjSI0m619/8bLMZu3xildwqM7zf1cjn4Whx0PSYXcY5bR7wEQfGC7CTOXwZdmsdTO8q3uGm7Rh/RfCWwpzBHCAaVfjxgibL5vUeL0pH6bzDmI9yCXKC/okkmbc28OJvI87L/bjFzpq0DHepw4kT1Od+fL7cyuFaRgfaUWB2++TCFvz11J0leEtrGkpccfX9z2LY39sph4PBHCjNOOkd0ybUm+ZzS8GkFbqMpq8uiX2yHpa0jllTLfGTDBMYR6FT5FWLLDPMkYxt1Q0eyMvxJWztDjy0m6VvZPvamrFXjHmPpU6WxrZqH6WW//I37RwvqPQhPz8I3RPuXAk1C94ZprQWm9iGM/KgiGDO6SV9sjp+Jmk4TBajMNJ5zzWZ1k1jrteQQBp9C2dOvmbIeeEME8y573Q8TgGe+ZCzutM45gYLBzYm2LNvgq2kebAbMpHRDSyh6dQ27GbsAAdCqQVVXWC1C+zpwBM2Lr4eqtobmmu1vJEDlIQR1iN8CUWpztq50z7FFQBn3SKViX6wSqzVQCoYvAjByjeSa+h1PRnYWvBinTDB9cHt4eqDsPS4jcD3FwXJKT0RQsl8EvslI2SFaz2OtmYLFV8FwgvWroZ3fKmh7btewX9tfL2upXsrsqpLJzpzNGyNlnuZyetg7DIOxQTMBR7dqlrTlZ6FWi1g4j1NSjA2j1Yd7fzTH6k9LxCyUCneAKYCU581bnvKih6KJTeTeCX4Zhme/QIz7w2o+AdSgtLAkdrLS9nfweYEqrMLsrGGSWXtgWamAWp6+x6GM/Z8jNw3BqPNQ39hrzYLECn3tPvh/LqKbRSCiDGauDKBBj/kGbpnM1Bb/my8hv4NWStclkwjfl57y4oNDgw1JAG9VOti3QVVoSziMEsSdfEjaCPIDb7SgpLXykQsM+nbqbt97I0mIlzWv0uqFobLMAq8Rd9pszUBKxFhBPwOjf//gVOz2r7URJ2OnpviCXv9iz3a4X/YLBYbXoYwxBv/Kq0a5s4utQHzoTerJ7PmFW/no/ZAsid/hRIV82tD+Qabh5F1ssIM8Ri3chu0PuPD3sSJRMjDoxLAbwUbroiPAz/V52e8s3DIixxlO7OrvhMj3qfzA0kKxzwicr5wJmZwJxTXgrwYsqhRvpgC2Nfdyd+TYYxJSZgk+gk2g9KyHSlwQVAyPtWWgvVGyVBqsU2LpDlLNosSAtolC1uBKt5pQZLhAxTjeGCWIC/HVpagc5rRwkgpCHKEsjA8d+scp8aiMewwQBhp5dYTV5t/Nvl+HbDMu8F3S0psPyZb1bSnqlHPFUnMQeQqSqwDBT23fJO9gO3aVaa1icrXU0PKwlMM5K+iL3ATcVq2fFWKk0irCTF4LDVDG4gUpkyplq6efcZS+WDR1woApjD18x+2JQR9oOXzuA7uy4b+/91WsJd/tSd1QcAH8PVPXApieA37B7YXPhDPH1azP3PKR+HfHmOoDYLeuKsIi/ssSsdYs62qJo14Hw1P2N/6zpr8F3FTWmJ4ysAVcl84Iv/tl///Z8FaAWbBQbyMNDZjrZ2JwdRjtd1jOeNumSodFtr4/Zf45iRJf/8HSW+KIB/+GlKu8Rv1BPLr/4duoL+kFPRqrstEr41gfJupoJRf4hcYDWX93FOcfEBiIivxtjtV8g7mvOReiamYWKE7vfPbv3v2L9Kwq3cIDFGLyhyfOGuf/9vA5muH6Pjg7B4SUj2ydDXra9fSBI+DrsNHA6l51wfHssJb+11TfNk7B8OleUe3Y+ZmHboMFHdv7FFP2cfISFyeAQR0sk/Xv62HBTdW4HmnGSLFk/cqyWVVFJkdIIa+4hos3JRHcqLoRKM5h2Qtk1RZtzISMtlXTfTqIc77YsCCgQD0r61jtxskCctwJOtjE/pL8wC4LBD4AZFjh2wzzFCrT/PNqW0/DeBbkfMfzVm9yy06WiF+1mTdNNEAytVtohBKg3brWd2VQa+aF+cQ0mW5CvbwOlWCT07liX226PjiVLwFCRs/Ax2/u+ZNPjrNFIWIPf5GjHyUKp60OeXe9F01f7IaPf/SDTvyDAf7LSWWejtiZcsqtWZjrdn6A2MqBwnSeKhrZOlUMmgMionmiCIvXqKZfmhGZ1MwD3uMF4n9KJcfWLA3cL5pq48tm5NDYNh3SS/TKUtmFSlQR89MR4+kxcqJgpGbhm9gXneDELkyqAN5nitmIzTscKeJRXqd64RiaOALR2d295NWwbjHRNG2AU5oR9OS2oJg/5CY6BFPc1JvD2Mxdhp2/MZdI8dLePxiP4KRIp8VXmqfg+jqd/RNG7GNuq1U2SiI4735Bdc0MVFx6mH5UOWEa5HuhYykd6t4M1gYLVS8m1B+9bUqi5DziQq7qT8d94cxB6AB4WqMCOF/zPPtRSZUUaMSsvHOWxGASufywTX8ogy6HgUf9p+Z30wUEosl8qgmwm6o2AV6nO9HKQjRHpN6SUegI5pvR61RLnUJ1lqCtmfcsRQutEizVpAaPXN7xMp5UQ5OSZK6tniCK9CpyMd7LjR6+MxfoMEDPpWdf2p2m5N3KO4QMxf+V7vGdYjemQczQ+m2MGIkFNYDMf0Yop2eSx81sP36WHUczqEhKysp2iJSYAvfgJjinKwToPvRKb+HBi+7cJ96S5ngfLOXaHAFRLkulo4TnXTFO51gX0TCCo4ZUHdbpdgkMEwUZAPjh6M+hA8DzycbtxAgH3uD6i0nN1aTiIuQ4BYCE9dEHHwAmINU+4YEWx4EC3OZwFGfYZMPLScVlb+BAAJeARUh+gdWA3/gRqCrf1jecgqeFf1MdzrrP4SVlGm5mMihSP+zYYksAB7O+SBPwNQqSNMiLnkviY/klwgcRmvqtCqeWeA0gjuir4CMZqmw/ntP6M+l0pdN8/P9xI53aP7x/zavJbbKOz8VzO/nXxIr1tjparMnqd6iWdByHKw4lF4p/u57Yv07WeZPDnRl7wgmDVZZ44fQsjdYO/gmXQ+940PRGst8UMQApFC4OOV22e4N+lVOPyFLAOj4t8R3PFw/FjbSWy0ELuAFReNkee8ORcBOT2NPDcs7OfpUmzvn/F9Czk9o9naMyVYy/j8I5qVFmQDFcptBp65J/+sJA3w/j6y/eqUkKxTsf0CZjtNdRSBEmJ2tmfgmJbqpcsSagk+Ul9qdyV+NnqFBIJZFCB1XwPvWGDBOjVUmpWGHsWA5uDuMgLUNKZ4vlq5qfzY1LnRhCc/mh5/EX+hzuGdDy5aYYx4BAdwTTeZHcZpl3X0YyuxZFWNE6wFNppYs3LcFJePOyfKZ8KYb7dmRyvDOcORLPH0sytC6mH1US3JVj6paYM1GEr+CUmyHRnabHPqLlh6Kl0/BWd3ebziDfvpRQpPoR7N+LkUeYWtQ6Rn5v5+NtNeBPs2+DKDlzEVR5aYbTVPrZekJsZ9UC9qtVcP99thVIt1GREnN8zXP8mBfzS+wKYym8fcW6KqrE702Zco+hFQAEIR7qimo7dd7wO8B7R+QZPTuCWm1UAwblDTyURSbd85P4Pz+wBpQyGPeEpsEvxxIZkKsyfSOUcfE3UqzMFwZKYijb7sOkzpou+tC4bPXey5GI1GUAg9c3vLwIwAhcdPHRsYvpAfzkZHWY20vWxxJO0lvKfj6sG2g/pJ1vd/X2EBZkyEjLN4nUZOpOO7MewyHCrxQK8d5aF7rCeQlFX+XksK6l6z971BPuJqwdjj68ULOj9ZTDdOLopMdOLL0PFSS792SXE/EC9EDnIXZGYhr52aQb+9b2zEdBSnpkxAdBUkwJDqGCpZk/HkRidjdp0zKv/Cm52EenmfeKX6HkLUJgMbTTxxIZkIeL/6xuAaAAHbA7mONVduTHNX/UJj1nJEaI7f3HlUyiqKn7VfBE+bdb4HWln1HPJx001Ulq1tOxFf8WZEARvq5Da1+pE7fPVxLntGACz3nkoLsKcPdUqdCwwiyWkmXTd5+bv3j7HaReRt3ESn783Ew3SWsvkEjKtbocNksbrLmV+GVZn1+Uneo35MT1/4r8fngQX5/ptORfgmWfF6KSB/ssJmUSijXxQqUpzkANEkSkYgYj560OOjJr6uqckFuO15TRNgABEwNDjus1V3q2huLPYERMCLXUNmJJpbMrUQsSO7Qnxta55TvPWL6gWmMOvFknqETzqzFVO8SVkovEdYatypLGmDy9VWfgAc0KyIChiOhbd7UlbAeVLPZyEDp4POXKBwN/KP5pT6Cyqs6yaI00vXMn1ubk9OWT9Q/O2t/C25qlnO/zO0xcBzpMBCAB8vsdsh3U8fnPX1XlPEWfaYJxKVaTUgfCESWl4CCkIyjE6iQ5JFcwU6S4/IH0/Agacp8d5Gzq2+GzPnJ7+sqk40mfFQpKrDbAKwLlr3ONEati2k/ycLMSUu7V/7BBkDlNyXoN9tvqXCbbMc4SSQXgC/DBUY9QjtrCtQ+susEomCq8xcNJNNMWCH31GtlTw2BdCXkJBjT+/QNWlBWwQ5SWCh1LdQ99QVii/DyTxjSR6rmdap3l3L3aiplQpPYlrzNm9er88fXd2+ao+YdUNjtqmxiVxmyYPzJxl67OokDcTezEGqldkGgPbRdXA+fGcuZVkembZByo7J1dMnkGNjwwCny+FNcVcWvWYL9mg8oF7jACVWI3bA64EXpdM8bSIEVIAs5JJH+LHXgnCsgcMGPZyAAVBncvbLiexzg9YozcytjPXVlAbQAC7Tc4S0C8QN4LlAGjj4pQAVWrwkaDoUYGxxvkCWKRRHkdzJB5zpREleBDL1oDKEvAqmkDibVC4kTqF89YO6laUjgtJPebBfzr16tg4t10GmN1sJ5vezk2sUOq8blCn5mPZyT3ltaDcddKupQjqusNM9wtFVD0ABzv17fZDn7GPT1nkCtdcgYejcK1qOcTGtPxnCX1rErEjVWCnEJv5HaOAUjgpiKQjUKkQi64D5g2COgwas8FcgIl0Pw95H9dWxE3QG0VbMNffh6BPlAojLDf4es2/5Xfq7hw5NGcON2g8Qsy2UQm94KddKyy3kdJxWgpNaEc15xcylbLC3vnT26u8qS90qc2MU8LdOJc5VPF5KnSpXIhnj1eJJ/jszjZ01oR6JDFJRoeTPO/wh4IPFbdG9KljuSzeuI92p8JF/bpgDE8wG86/W2EBKgPrmzdLijxssQn8mM44ky/KLGOJcrSwXIpZa/Z3v7W6HCRk7ewds99LTsUW1LbeJytw8Q/BFZVZyfO9BUHOCe2suuEkO8DU4fLX0IQSQ2TdOkKXDtPf3sNV9tYhYFueuPRhfQlEEy+aYM/MCz7diDNmFSswYYlZZPmKr2Q5AxLsSVEqqBtn6hVl1BCFOFExnqnIsmyY/NA8jXnDaNzr7Zv3hu+I1Mf/PJjk0gALN2G8ABzdf9FNvWHvZHhv6xIoDCXf964MxG92vGZtx/LYU5PeZqgly8tT5tGeQGeJzMMsJc5p+a5Rn2PtEhiRzo/5Owjy1n0Lzx3ev8GHQmeWb8vagG6O5Qk5nrZuQTiKODI4UqL0LLAusS2Ve7j1Ivdxquu1BR9Rc4QkOiUPwQXJv6du2E8i5pDhVoQpUhyMWGUT2O2YODIhjAfI71gxep5r5zAY7GBUZpy51hAw0pcCCrhOmU8Wp6ujQTdZQsCjtq6SHX8QAMNiPCIIkoxhHEZPgsBcOlP4aErJZPhF7qvx6gHrn8hEwPwYbx8YmT/n7lbcmTip1v8kgsrIjFTAlvLY4Nuil0KDmgz3svYs0ZJ3O3Is/vSx4xpxF1e2VAtZE8dJxGYEIhCSuPvCjP54l/NSNDnwlKvAW8mG+AQkgp7a87Igh26uKMFGD0PoPHTSvoWxiHuk+su8XkQiHIjeYKl/RdcOHpxhQH3zHCNE3aARm83Bl6zGxU/vMltlVPQhubcqhW4RYkl6uXk5JdP/QpzaKFpw2M8zvysv2qj7xaQECuu2akM0Cssj/uB9+wDR7uA6XOnLNaoczalHoMj33eiiu+DRaFsUmlmUZuh9bjDY4INMNSSAivSh03uJvny4Gj+D+neudoa7iJi7c4VFlZ/J5gUR82308zSNAt/ZroBXDWw0fV3eVPAn3aX0mtJabF6RsUZmL+Ehn+wn51/4QipMjD+6y64t7bjL6bjENan2prQ4h7++hBJ9NXvX8CUocJqMC937IasLzm5K0qwXeFMAimMHkEIQIQI2LrQ9sLBfXuyp66zWvlsh74GPv7Xpabj993pRNNDuFud5oIcn/92isbADXdpRPbjmbCNOrwRbxGZx2XmYNGMiV5kjF4IKyxCBvKier9U4uVoheCdmk83rp5G0PihAm2fAtczI4b9BWqX+nrZTrJX5kSwQddi93NQrXG+Cl3eBGNkM77VBsMpEolhXex1MVvMkZN9fG59GGbciH11FEXaY1MxrArovaSjE/lUUqBg2cZBNmiWbvzCHCPJ4RVGFK2dTbObM1m+gJyEX53fa7u3+TZpm74mNEzWbkVL4vjNwfL9uzRCu1cgbrNx5Yv5dDruNrIOgwIk+UZWwJfdbu/WHul6PMmRflVCIzd7B37Pgm/Up/NuCiQW7RXyafevN3AL6ycciCc4ZPlTRzEu+aURGlUBOJbUEsheX7PPyrrhdUt5JAG12EEEZpY/N3Vhbl5uLAfT0CbC2XmpnryFkxZmBTs5prvEeuf0bn73i3O82WTiQtJWEPLsBXnQmdnKhB06NbbhLtlTZYJMxDMJpFeajSNRDB2v61BMUHqXggUwRJ19m6p5zl51v11q34T74lTXdJURuV6+bg2D6qpfGnLy7KGLuLZngobM4pIouz4+n0/UzFKxDgLM4h+fUwKZozQ9UGrHjcif51Ruonz7oIVZ56xWtZS8z7u5zay6J2LD4gCYh2RXoBRLDKsUlZ80R8kmoxlJiL8aZCy2wCAonnucFxCLT1HKoMhbPKt34D97EXPPh0joO93iJVF1Uruew61Qoy3ZUVNX9uIJDt9AQWKLLo+mSzmTibyLHq0D6hhzpvgUgI6ekyVEL3FD+Fi5R3A8MRHPXspN1VyKkfRlC+OGiNgPC4NREZpFETgVmdXrQ2TxChuS3aY+Ndc7CiYv5+CmzfiqeZrWIQJW/C4RvjbGUoJFf1K6ZdR2xL/bG4kVq1+I4jQWX+26YUijpp+lpN7o5c6ZodXJCF56UkFGsqz44sIg8jrdWvbjRCxi2Bk0iyM3a7ecAV93zB6h1Ei38c0s6+8nrbkopArccGP8vntQe1bFeEh2nJIFOHX/k3/UHb5PtKGpnzbkmnRETMX+9X/QduLZWw/feklW/kH/JnzToJe9Kgu9Hct1UGbH5BPCLo4OOtQnZonW0xnyCcdtKyPQ/sbLiSTYJdSx4sJqWLMnfn6fIqPB3WAgk00J+fCOkomPHqtS67pf0mFmKoItYZUlJu6BihSZ8qve8+/X+LX1MhQXF95AshfUleCtmdn6l6QFXzLg2sgLn1oyVFuZecv7fzsIHzoRlAGp0gwYDOn1S4qabWvB5xUaE+Svw4KmjWtxdnuQbI32dw87D4N95u8qQRJTSQg0wLxOLkxSrPMLEn1UIhNKjAa9VLs3WLaXGrtCIt8bKY2AQP/ZdyRU6zT/E8qP2ltyBE2CCZPgWgEYDoJJO4n92y61ylNaSFXKohJhLjkfvYWm592539sIpmBNLlDo1bExFBfmHJJ0lFEiC/fj8v42OoMC9Mo3whIoWvyHfq6Uacqq55mzFf/EGC+NP/gHjhd6urc6R0hES27VXux7UY8CGKPohplWIZtTrFSaPWslCWy78E22Pw8fvReSUZx/txqLtHrFqg1DY/Eus6Iq1heZdrdcqE0/c971Bz1HW/XNXHsXpUIbI4kHdOfCc6T5zHZzvzQJB0ggMFL6IGPAilU9bj/ASdPk6fNvNtZqPuwEDhMBtBnhCexo6D6VAGIOPvJPPV523Y8R8a9vCqZbswSZKzOT1291BsUbmUWehtbb1fdRX9hiJKXvwr1QX6GjnZMgyMvnwOo2Dr24amr7FqEAbVeJAjRNOceM2EQ1Mna9fInqPJ5mh5X8CzT1aDOv08An0blz0fF5Gq4mS2cwq5glwIOlY5nznE8X4j/UdZ3FJsVIXte1JH0A7iibuPfazStM5O/Vo3KXIpXBeGORV0M9XDXFvsYZUHGvFCUubWzTw248EHE0cpQM2zNg6rjavreq3NHCAWsoZ7wvVy7l5gvtKRmIj1MnvfWEm0yFnGcuOq192350a5WefpfKCcX3Sn+AgHU+qnpstNtddbdVebagJU390lq9ko4aI9rqdaWXYG8tv5O/ZQHSqDRYHC6zfH10l5z++opso7aOSaIczlQ13iAzXvLdEu0V7kwNUZ1c8Y8aq7SeIEe5p902FlNkW8DnwHyueHchbK8vVFJfmr9mz7P8nUSccl1ULaoWMRSI1ls32kvlK0h46h3J25Yd9AzfcJbp9qYF/SEt3H5j69mMdcsNxZcAzT/A89ov3tglTX54y/EwjMfuoDoxPwLJDm5I7q6F9Kp469yNy1zSxz0N4HbRRBj9xFFuogvBspv7DXUNIsGxTINEQfmctb42XImWAODgARNo7dfcTqFKq6aTfivmvunLmzP9f8yLsJvXD3JbcPcDGNriMAcjzeDTNr65t8YB5tsnFDFLa0Uwmd2OvUdkLMX9TsAUYUfooSv47sw5J88j7CpahRjjO3/UhOXjTS39W5YZAel2KTbQd1h7INOw9P23GW7GDAe4agIUFHP48MZr7ubq0efFmmtwYMyk7D0r1oeG/CGOODgb9Ur+JMHxkwzPbtCX2ZnENQuI0RN5SyTIZuoY4XS9Rd/tPe3vNAZGSHM/YYwqs9xkkENx0O+eC2YVW1cwOJ3ckE890nbQeHLKlW15L0P0W2VliyYrfNr0nrIYddoRyGaCtj4OYd2MT7ebApqZOAQIaSHJM4mphhfjNjtnjg6YRyx9qM2FT3xOiYIMqXPFWdzhSgFF8ItocqVV09CmIoO8k6U/oJB7++wSX/YksxfPXHyjSgAGZOj1aKEq9fSvXBqtp2wu8/FxEf5AxapAD06pPGuLVUYLdgEzHR8wqRGYEwiUO9MyYbgswstuLYhwYFpSVKOdzAihZ9LuHtD598EGhINU9xc9xhL+QgTLAstmPIvvm2xyRw/WTUPXkP3ZHu6GyPmj5xFH9/QGpkglKXRVUBgVmLOJx8uZO2AstxQYocZH2JhORlxawj66BAXUEs7K/gPxINIRAFyK3WLuyq9oBTF9wEbnmCot82WjIg7CPNwYK3KrZMrKAz5yFszg4wCVLJVnIL8+OYA0xRDH8cHQjQUiQ2i1mr/be32k/3Xej9sdf3iuGvZHyLFSJvPSqz/wltnxumTJYKZsrWXtx/Rmu39jjV9lFaJttfFn57/No2h/unsJmMHbrnZ8csxkp5HQ4xR1s0HH+t3Iz82a3iQWTUDGq/+l2W3TUYLE8zNdL8Y+5oXaIH/Y2UUcX67cXeN4WvENZjz4+8q7vjhowOI3rSjFhGZ6KzwmU7+5nFV+kGWAZ5z2UWvzq0TK0pk1hPwAN4jbw//1CApRvIaIjhSGhioY6TUmsToek9cF9XjJdHvLPcyyCV3lbR5Jiz/ts46ay2F820VjTXvllElwrGzKcNSyvQlWDXdwrUINXmHorAM3fE19ngLZmgeUaCJLsSITf2VcfAOuWwX7mTPdP8Zb/04KqRniufCpwnDUk7sP0RX6cud/sanFMagnzKInSRVey0YzlVSOtA/AjrofmSH6RYbJQ8b4NDeTkIGc6247+Mnbez/qhJ9GAv9fGNFercPnnrf285Qgs+UqThLRgflcAKFuqWhLzZaR4QqvSwa3xe0LPkqj9xJWub195r7NrrR0e78FR+0mRBNMPsraqZctAUVAJfYKehTDV1MGGQSeDsOK9J3sbUuKRIS/WilX/64CBms9jCZocBlsBSZaIAjWm/SUZ8daWL2a/cJFyUOFqE3Epc2RWbtjNyPwOGpWtzu32kUooUqsJud7IV4E8rstUBXM7tGEtBx99x60g1duhyvxeKJSl8s5E34HTMmADT0836aEdg5Dv9rVyCz8i2REOmiz6wtIVFN0HsjAoN37SrY0bV1Ms8CRUILhvZvvRaDzoVCaSI0u8EPuTe4b7OPowgRGODl22UBBmHSTUY8e4DyL+Bc7bngo+2T8HtNvzyATSL5iJZgFPKpmUyZv54vVL90+/RQGATUmNKnrIvcJMYON9fl83naW5sf6hRkbbTC9RUEE6XADwjgA46wWfUQ+QWZl0J4PVTWAln/YfAz/SV3q3J9+yCYDleruoN5uoc/wT2f4YONGTb6zTGq3V+3JqzmCOjwebKln+fExVLN7sqtqfMnsKVXWbb2Ai5m3D/fCTgX7oKYzTZvj+m28XnDqPbXuP4MyWdmPezcesdrh7rCzA7BWdObiuyDEKjjzBbQ0qnuwjliz+b+j7aPMKlkXyIznV3tGzAfYwIbzGGt098oh4eq3ruDjdgHtjxfFCjHrjjRbHajoz/YOY4raojPFQ910GIlBV7hq47UDgpyajBxQUmD8NctiLV1rTSLAEsQDLTeRKcmPBMVMFF0SPBBhZ5oXoxtD3lMhuAQXmA+57OcciczVW9e9zwSIAHS+FJmvfXMJGF1dMBsIUMaPjvgaVqUc3p32qVCMQYFEiRLzlVSOGMCmv/HJIxAHe3mL/XnoZ1IkWLeRZfgyByjnDbbeRK5KL7bYHSVJZ9UFq+yCiNKeRUaYjgbC3hVUvfJAhy/QNl/JqLKVvGMk9ZcfyGidNeo/VTxK9vUpodzfQI9Z2eAre4nmrkzgxKSnT5IJ1D69oHuUS5hp7pK9IAWuNrAOtOH0mAuwCrY8mXAtVXUeaNK3OXr6PRvmWg4VQqFSy+a1GZfFYgdsJELG8N0kvqmzvwZ02Plf5fH9QTy6br0oY/IDsEA+GBf9pEVWCIuBCjsup3LDSDqI+5+0IKSUFr7A96A2f0FbcU9fqljdqvsd8sG55KcKloHIFZem2Wb6pCLXybnVSB0sjCXzdS8IKvE");const VR=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),KR=4;function F1e(t){return t.toString(16).toUpperCase().padStart(2,"0")}function Pj(t){return`{${F1e(t)}}`}function $1e(t){let e=[];for(let r=0,n=t.length;r>24&255}function Cj(t){return t&16777215}const U1e=new Map(Sj(GM).flatMap((t,e)=>t.map(r=>[r,e+1<<24]))),z1e=new Set(w0(GM)),Ij=new Map,C7=new Map;for(let[t,e]of Mj(GM)){if(!z1e.has(t)&&e.length==2){let[r,n]=e,i=C7.get(r);i||(i=new Map,C7.set(r,i)),i.set(n,t)}Ij.set(t,e.reverse())}const Mg=44032,y6=4352,v6=4449,w6=4519,Tj=19,Rj=21,Ap=28,x6=Rj*Ap,j1e=Tj*x6,H1e=Mg+j1e,q1e=y6+Tj,G1e=v6+Rj,V1e=w6+Ap;function kj(t){return t>=Mg&&t=y6&&t=v6&&ew6&&e0&&i(w6+p)}else{let s=Ij.get(o);s?r.push(...s):i(o)}if(!r.length)break;o=r.pop()}if(n&&e.length>1){let o=ym(e[0]);for(let s=1;s0&&i>=s)s==0?(e.push(n,...r),r.length=0,n=f):r.push(f),i=s;else{let d=K1e(n,f);d>=0?n=d:i==0&&s==0?(e.push(n),n=f):(r.push(f),i=s)}}return n>=0&&e.push(n,...r),e}function Oj(t){return Bj(t).map(Cj)}function J1e(t){return W1e(Bj(t))}const I7=65039,Nj=".",Lj=1,WR=45;function p1(){return new Set(w0(lo))}const Z1e=new Map(Mj(lo)),Y1e=p1(),E6=p1(),JR=new Set(w0(lo).map(function(t){return this[t]},[...E6])),Q1e=p1();p1();const X1e=Sj(lo);function ZR(){return new Set([w0(lo).map(t=>X1e[t]),w0(lo)].flat(2))}const eme=lo(),_g=Ag(t=>{let e=Ag(lo).map(r=>r+96);if(e.length){let r=t>=eme;e[0]-=32,e=Sg(e),r&&(e=`Restricted[${e}]`);let n=ZR(),i=ZR(),o=[...n,...i].sort((f,d)=>f-d),s=!lo();return{N:e,P:n,M:s,R:r,V:new Set(o)}}}),YR=p1(),Pg=new Map;[...YR,...p1()].sort((t,e)=>t-e).map((t,e,r)=>{let n=lo(),i=r[e]=n?r[e-n]:{V:[],M:new Map};i.V.push(t),YR.has(t)||Pg.set(t,i)});for(let{V:t,M:e}of new Set(Pg.values())){let r=[];for(let i of t){let o=_g.filter(f=>f.V.has(i)),s=r.find(({G:f})=>o.some(d=>f.has(d)));s||(s={G:new Set,V:[]},r.push(s)),s.V.push(i),o.forEach(f=>s.G.add(f))}let n=r.flatMap(({G:i})=>[...i]);for(let{G:i,V:o}of r){let s=new Set(n.filter(f=>!i.has(f)));for(let f of o)e.set(f,s)}}let Cg=new Set,Dj=new Set;for(let t of _g)for(let e of t.V)(Cg.has(e)?Dj:Cg).add(e);for(let t of Cg)!Pg.has(t)&&!Dj.has(t)&&Pg.set(t,Lj);const tme=new Set([...Cg,...Oj(Cg)]),rme=w0(lo),nme=Fj([]);function Fj(t){let e=Ag(()=>{let f=w0(lo).map(d=>rme[d]);if(f.length)return Fj(f)}).sort((f,d)=>d.Q.size-f.Q.size),r=lo(),n=r%3;r=r/3|0;let i=r&1;r>>=1;let o=r&1,s=r&2;return{B:e,V:n,F:i,S:o,C:s,Q:new Set(t)}}class ime extends Array{get is_emoji(){return!0}}function Zw(t,e=Pj){let r=[];ame(t[0])&&r.push("◌");let n=0,i=t.length;for(let o=0;o=4&&t[2]==WR&&t[3]==WR)throw new Error("invalid label extension")}function QR(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function sme(t){let e=t[0],r=VR.get(e);if(r)throw $m(`leading ${r}`);let n=t.length,i=-1;for(let o=1;o{let i=$1e(n),o={input:i,offset:r};r+=i.length+1;let s;try{let f=o.tokens=pme(i,J1e),d=f.length,p;if(d){let b=f[0],v=d>1||b.is_emoji;if(!v&&b.every(A=>A<128))s=b,QR(s),ome(s),p="ASCII";else if(v&&(o.emoji=!0,b=f.flatMap(A=>A.is_emoji?[]:A)),s=f.flatMap(A=>!e&&A.is_emoji?mme(A):A),QR(s),!b.length)p="Emoji";else{if(E6.has(s[0]))throw $m("leading combining mark");for(let S=1;Ss.has(f)):[...s],!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(o=>i.V.has(o)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function lme(t){let e=_g;for(let r of t){let n=e.filter(i=>i.V.has(r));if(!n.length)throw e===_g?Uj(r):zj(e[0],r);if(e=n,n.length==1)break}return e}function dme(t){return t.map(({input:e,error:r,output:n})=>{if(r){let i=r.message;throw new Error(t.length==1?i:`Invalid label ${KM(Zw(e))}: ${i}`)}return Sg(n)}).join(Nj)}function Uj(t){return new Error(`disallowed character: ${VM(t)}`)}function zj(t,e){let r=VM(e),n=_g.find(i=>i.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function $m(t){return new Error(`illegal placement: ${t}`)}function hme(t,e){let{V:r,M:n}=t;for(let i of e)if(!r.has(i))throw zj(t,i);if(n){let i=Oj(e);for(let o=1,s=i.length;oKR)throw new Error(`non-spacing marks: too many ${KM(Zw(i.slice(o-1,f)))} (${f-o}/${KR})`);o=f}}}function pme(t,e){let r=[],n=[];for(t=t.slice().reverse();t.length;){let i=gme(t);if(i)n.length&&(r.push(e(n)),n=[]),r.push(i);else{let o=t.pop();if(tme.has(o))n.push(o);else{let s=Z1e.get(o);if(s)n.push(...s);else if(!Y1e.has(o))throw Uj(o)}}}return n.length&&r.push(e(n)),r}function mme(t){return t.filter(e=>e!=I7)}function gme(t,e){let r=nme,n,i,o=[],s=t.length;for(e&&(e.length=0);s;){let f=t[--s];if(r=r.B.find(d=>d.Q.has(f)),!r)break;if(r.S)i=f;else if(r.C&&f===i)break;o.push(f),r.F&&(o.push(I7),s>0&&t[s-1]==I7&&s--),r.V&&(n=bme(o,r),e&&e.push(...t.slice(s).reverse()),t.length=s)}return n}function bme(t,e){let r=ime.from(t);return e.V==2&&r.splice(1,1),r}const jj=new Uint8Array(32);jj.fill(0);function XR(t){return _e(t.length!==0,"invalid ENS name; empty component","comp",t),t}function Hj(t){const e=Bf(yme(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}function V8(t,e){return{address:Zt(t),storageKeys:e.map((r,n)=>(_e(Tr(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function Il(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(_e(r.length===2,"invalid slot set",`value[${n}]`,r),V8(r[0],r[1])):(_e(r!=null&&typeof r=="object","invalid address-slot set","value",t),V8(r.address,r.storageKeys)));_e(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,o)=>(i[o]=!0,i),{});return V8(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function wme(t){let e;return typeof t=="string"?e=HM.computePublicKey(t,!1):e=t.publicKey,Zt(Ir("0x"+e.substring(4)).substring(26))}function xme(t,e){return wme(HM.recoverPublicKey(t,e))}const Pi=BigInt(0),Eme=BigInt(2),Ame=BigInt(27),Sme=BigInt(28),Mme=BigInt(35),_me=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function WM(t){return t==="0x"?null:Zt(t)}function qj(t,e){try{return Il(t)}catch(r){_e(!1,r.message,e,t)}}function Yw(t,e){return t==="0x"?0:Tt(t,e)}function oi(t,e){if(t==="0x")return Pi;const r=pt(t,e);return _e(r<=_me,"value exceeds uint size",e,r),r}function Mn(t,e){const r=pt(t,"value"),n=oo(r);return _e(n.length<=32,"value too large",`tx.${e}`,r),n}function Gj(t){return Il(t).map(e=>[e.address,e.storageKeys])}function Pme(t){const e=qS(t);_e(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const r={type:0,nonce:Yw(e[0],"nonce"),gasPrice:oi(e[1],"gasPrice"),gasLimit:oi(e[2],"gasLimit"),to:WM(e[3]),value:oi(e[4],"value"),data:dt(e[5]),chainId:Pi};if(e.length===6)return r;const n=oi(e[6],"v"),i=oi(e[7],"r"),o=oi(e[8],"s");if(i===Pi&&o===Pi)r.chainId=n;else{let s=(n-Mme)/Eme;s=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),Ge(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),Ge(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):r?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(i.push(0),i.push(1),i.push(2)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}clone(){return Cc.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Cc;if(typeof e=="string"){const n=qt(e);if(n[0]>=127)return Cc.from(Pme(n));switch(n[0]){case 1:return Cc.from(Ime(n));case 2:return Cc.from(Cme(n))}Ge(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Cc;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=Jf.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.hash!=null&&(_e(r.isSigned(),"unsigned transaction cannot define hash","tx",e),_e(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(_e(r.isSigned(),"unsigned transaction cannot define from","tx",e),_e(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};pf=new WeakMap,yh=new WeakMap,vh=new WeakMap,wh=new WeakMap,xh=new WeakMap,Eh=new WeakMap,Ah=new WeakMap,Sh=new WeakMap,Mh=new WeakMap,_h=new WeakMap,Ph=new WeakMap,Ch=new WeakMap;let A6=Cc;const Kj=new Uint8Array(32);Kj.fill(0);const Tme=BigInt(-1),Wj=BigInt(0),Jj=BigInt(1),Rme=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function kme(t){const e=qt(t),r=e.length%32;return r?en([e,Kj.slice(r)]):dt(e)}const Bme=y0(Jj,32),Ome=y0(Wj,32),nk={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},K8=["name","version","chainId","verifyingContract","salt"];function ik(t){return function(e){return _e(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const Nme={name:ik("name"),version:ik("version"),chainId:function(t){const e=pt(t,"domain.chainId");return _e(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):Pd(e)},verifyingContract:function(t){try{return Zt(t).toLowerCase()}catch{}_e(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=qt(t,"domain.salt");return _e(e.length===32,'invalid domain value "salt"',"domain.salt",t),dt(e)}};function W8(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");_e(n%8===0&&n!==0&&n<=256&&(e[2]==null||e[2]===String(n)),"invalid numeric width","type",t);const i=au(Rme,r?n-1:n),o=r?(i+Jj)*Tme:Wj;return function(s){const f=pt(s,"value");return _e(f>=o&&f<=i,`value out-of-bounds for ${t}`,"value",f),y0(r?YF(f,256):f,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return _e(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const i=qt(n);return _e(i.length===r,`invalid length for ${t}`,"value",n),kme(n)}}}switch(t){case"address":return function(e){return rl(Zt(e),32)};case"bool":return function(e){return e?Bme:Ome};case"bytes":return function(e){return Ir(e)};case"string":return function(e){return fl(e)}}return null}function ok(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}var Qg,mf,Ih,l5,Zj,Si;let sk=(Si=class{constructor(e){Ne(this,l5);Oe(this,"primaryType");Ne(this,Qg,void 0);Ne(this,mf,void 0);Ne(this,Ih,void 0);ce(this,Qg,JSON.stringify(e)),ce(this,mf,new Map),ce(this,Ih,new Map);const r=new Map,n=new Map,i=new Map;Object.keys(e).forEach(f=>{r.set(f,new Set),n.set(f,[]),i.set(f,new Set)});for(const f in e){const d=new Set;for(const p of e[f]){_e(!d.has(p.name),`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(f)}`,"types",e),d.add(p.name);const b=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;_e(b!==f,`circular type reference to ${JSON.stringify(b)}`,"types",e),!W8(b)&&(_e(n.has(b),`unknown type ${JSON.stringify(b)}`,"types",e),n.get(b).push(f),r.get(f).add(b))}}const o=Array.from(n.keys()).filter(f=>n.get(f).length===0);_e(o.length!==0,"missing primary type","types",e),_e(o.length===1,`ambiguous primary types or unused types: ${o.map(f=>JSON.stringify(f)).join(", ")}`,"types",e),xt(this,{primaryType:o[0]});function s(f,d){_e(!d.has(f),`circular type reference to ${JSON.stringify(f)}`,"types",e),d.add(f);for(const p of r.get(f))if(n.has(p)){s(p,d);for(const b of d)i.get(b).add(p)}d.delete(f)}s(this.primaryType,new Set);for(const[f,d]of i){const p=Array.from(d);p.sort(),X(this,mf).set(f,ok(f,e[f])+p.map(b=>ok(b,e[b])).join(""))}}get types(){return JSON.parse(X(this,Qg))}getEncoder(e){let r=X(this,Ih).get(e);return r||(r=Ke(this,l5,Zj).call(this,e),X(this,Ih).set(e,r)),r}encodeType(e){const r=X(this,mf).get(e);return _e(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Ir(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(W8(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i)return _e(!i[3]||parseInt(i[3])===r.length,`array length mismatch; expected length ${parseInt(i[3])}`,"value",r),r.map(s=>this._visit(i[1],s,n));const o=this.types[e];if(o)return o.reduce((s,{name:f,type:d})=>(s[f]=this._visit(d,r[f],n),s),{});_e(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Si(e)}static getPrimaryType(e){return Si.from(e).primaryType}static hashStruct(e,r,n){return Si.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const i=nk[n];_e(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>K8.indexOf(n.name)-K8.indexOf(i.name)),Si.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return en(["0x1901",Si.hashDomain(e),Si.from(r).hash(n)])}static hash(e,r,n){return Ir(Si.encode(e,r,n))}static async resolveNames(e,r,n,i){e=Object.assign({},e);for(const f in e)e[f]==null&&delete e[f];const o={};e.verifyingContract&&!Tr(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=Si.from(r);s.visit(n,(f,d)=>(f==="address"&&!Tr(d,20)&&(o[d]="0x"),d));for(const f in o)o[f]=await i(f);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),n=s.visit(n,(f,d)=>f==="address"&&o[d]?o[d]:d),{domain:e,value:n}}static getPayload(e,r,n){Si.hashDomain(e);const i={},o=[];K8.forEach(d=>{const p=e[d];p!=null&&(i[d]=Nme[d](p),o.push({name:d,type:nk[d]}))});const s=Si.from(r),f=Object.assign({},r);return _e(f.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),f.EIP712Domain=o,s.encode(n),{types:f,domain:i,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return dt(qt(p));if(d.match(/^u?int/))return pt(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return _e(typeof p=="string","invalid string","value",p),p}_e(!1,"unsupported type","type",d)})}}},Qg=new WeakMap,mf=new WeakMap,Ih=new WeakMap,l5=new WeakSet,Zj=function(e){{const i=W8(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],o=this.getEncoder(i);return s=>{_e(!r[3]||parseInt(r[3])===s.length,`array length mismatch; expected length ${parseInt(r[3])}`,"value",s);let f=s.map(o);return X(this,mf).has(i)&&(f=f.map(Ir)),Ir(en(f))}}const n=this.types[e];if(n){const i=fl(X(this,mf).get(e));return o=>{const s=n.map(({name:f,type:d})=>{const p=this.getEncoder(d)(o[f]);return X(this,mf).has(d)?Ir(p):p});return s.unshift(i),en(s)}}_e(!1,`unknown type: ${e}`,"type",e)},Si);function ai(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const Lme="external public payable",Dme=ai(Lme.split(" ")),Yj="constant external internal payable private public pure view",Fme=ai(Yj.split(" ")),Qj="constructor error event fallback function receive struct",Xj=ai(Qj.split(" ")),eH="calldata memory storage payable indexed",$me=ai(eH.split(" ")),Ume="tuple returns",zme=[Qj,eH,Ume,Yj].join(" "),jme=ai(zme.split(" ")),Hme={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},qme=new RegExp("^(\\s*)"),Gme=new RegExp("^([0-9]+)"),Vme=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),tH=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),rH=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var An,Ms,Xg,R7;const d5=class d5{constructor(e){Ne(this,Xg);Ne(this,An,void 0);Ne(this,Ms,void 0);ce(this,An,0),ce(this,Ms,e.slice())}get offset(){return X(this,An)}get length(){return X(this,Ms).length-X(this,An)}clone(){return new d5(X(this,Ms))}reset(){ce(this,An,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=Ke(this,Xg,R7).call(this,X(this,An)+1,e.match+1);return ce(this,An,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;X(this,An)=X(this,Ms).length)throw new Error("out-of-bounds");return X(this,Ms)[X(this,An)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return I1(this,An)._++,e}toString(){const e=[];for(let r=X(this,An);r`}};An=new WeakMap,Ms=new WeakMap,Xg=new WeakSet,R7=function(e=0,r=0){return new d5(X(this,Ms).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let Ys=d5;function z0(t){const e=[],r=s=>{const f=o0&&e[e.length-1].type==="NUMBER"){const v=e.pop().text;b=v+b,e[e.length-1].value=Tt(v)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=b}continue}if(f=s.match(Vme),f){if(d.text=f[1],o+=d.text.length,jme.has(d.text)){d.type="KEYWORD";continue}if(d.text.match(rH)){d.type="TYPE";continue}d.type="ID";continue}if(f=s.match(Gme),f){d.text=f[1],d.type="NUMBER",o+=d.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(s[0])} at position ${o}`)}return new Ys(e.map(s=>Object.freeze(s)))}function ak(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function Qw(t,e){if(e.peekKeyword(Xj)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function Zf(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function nH(t){let e=Zf(t,Fme);return ak(e,ai("constant payable nonpayable".split(" "))),ak(e,ai("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function Nf(t,e){return t.popParams().map(r=>In.from(r,e))}function iH(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return pt(t.pop().text);throw new Error("invalid gas")}return null}function cl(t){if(t.length)throw new Error(`unexpected tokens: ${t.toString()}`)}const Kme=new RegExp(/^(.*)\[([0-9]*)\]$/);function fk(t){const e=t.match(rH);if(_e(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);_e(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);_e(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const Cr={},Fi=Symbol.for("_ethers_internal"),ck="_ParamTypeInternal",uk="_ErrorInternal",lk="_EventInternal",dk="_ConstructorInternal",hk="_FallbackInternal",pk="_FunctionInternal",mk="_StructInternal";var Th,Qv;const So=class So{constructor(e,r,n,i,o,s,f,d){Ne(this,Th);Oe(this,"name");Oe(this,"type");Oe(this,"baseType");Oe(this,"indexed");Oe(this,"components");Oe(this,"arrayLength");Oe(this,"arrayChildren");if(Cb(e,Cr,"ParamType"),Object.defineProperty(this,Fi,{value:ck}),s&&(s=Object.freeze(s.slice())),i==="array"){if(f==null||d==null)throw new Error("")}else if(f!=null||d!=null)throw new Error("");if(i==="tuple"){if(s==null)throw new Error("")}else if(s!=null)throw new Error("");xt(this,{name:r,type:n,baseType:i,indexed:o,components:s,arrayLength:f,arrayChildren:d})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const o=JSON.parse(this.arrayChildren.format("json"));return o.name=n,o.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(o)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(o=>JSON.parse(o.format(e)))),JSON.stringify(i)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?(e!=="sighash"&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")"):r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,o)=>n.components[o].walk(i,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],i=[e];return Ke(this,Th,Qv).call(this,n,e,r,o=>{i[0]=o}),n.length&&await Promise.all(n),i[0]}static from(e,r){if(So.isParamType(e))return e;if(typeof e=="string")try{return So.from(z0(e),r)}catch{_e(!1,"invalid param type","obj",e)}else if(e instanceof Ys){let f="",d="",p=null;Zf(e,ai(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(d="tuple",p=e.popParams().map(P=>So.from(P)),f=`tuple(${p.map(P=>P.format()).join(",")})`):(f=fk(e.popType("TYPE")),d=f);let b=null,v=null;for(;e.length&&e.peekType("BRACKET");){const P=e.pop();b=new So(Cr,"",f,d,null,p,v,b),v=P.value,f+=P.text,d="array",p=null}let A=null;if(Zf(e,$me).has("indexed")){if(!r)throw new Error("");A=!0}const S=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new So(Cr,S,f,d,A,p,v,b)}const n=e.name;_e(!n||typeof n=="string"&&n.match(tH),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(_e(r,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let o=e.type,s=o.match(Kme);if(s){const f=parseInt(s[2]||"-1"),d=So.from({type:s[1],components:e.components});return new So(Cr,n||"",o,"array",i,null,f,d)}if(o==="tuple"||o.startsWith("tuple(")||o.startsWith("(")){const f=e.components!=null?e.components.map(p=>So.from(p)):null;return new So(Cr,n||"",o,"tuple",i,f,null,null)}return o=fk(e.type),new So(Cr,n||"",o,o,i,null,null,null)}static isParamType(e){return e&&e[Fi]===ck}};Th=new WeakSet,Qv=function(e,r,n,i){if(this.isArray()){if(!Array.isArray(r))throw new Error("invalid array value");if(this.arrayLength!==-1&&r.length!==this.arrayLength)throw new Error("array is wrong length");const s=this.arrayChildren,f=r.slice();f.forEach((d,p)=>{var b;Ke(b=s,Th,Qv).call(b,e,d,n,v=>{f[p]=v})}),i(f);return}if(this.isTuple()){const s=this.components;let f;if(Array.isArray(r))f=r.slice();else{if(r==null||typeof r!="object")throw new Error("invalid tuple value");f=s.map(d=>{if(!d.name)throw new Error("cannot use object value with unnamed components");if(!(d.name in r))throw new Error(`missing value for component ${d.name}`);return r[d.name]})}if(f.length!==this.components.length)throw new Error("array is wrong length");f.forEach((d,p)=>{var b;Ke(b=s[p],Th,Qv).call(b,e,d,n,v=>{f[p]=v})}),i(f);return}const o=n(this.type,r);o.then?e.push(async function(){i(await o)}()):i(o)};let In=So;class ul{constructor(e,r,n){Oe(this,"type");Oe(this,"inputs");Cb(e,Cr,"Fragment"),n=Object.freeze(n.slice()),xt(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{ul.from(JSON.parse(e))}catch{}return ul.from(z0(e))}if(e instanceof Ys)switch(e.peekKeyword(Xj)){case"constructor":return Cf.from(e);case"error":return Ci.from(e);case"event":return Ma.from(e);case"fallback":case"receive":return sf.from(e);case"function":return _a.from(e);case"struct":return qu.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Cf.from(e);case"error":return Ci.from(e);case"event":return Ma.from(e);case"fallback":case"receive":return sf.from(e);case"function":return _a.from(e);case"struct":return qu.from(e)}Ge(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}_e(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Cf.isFragment(e)}static isError(e){return Ci.isFragment(e)}static isEvent(e){return Ma.isFragment(e)}static isFunction(e){return _a.isFragment(e)}static isStruct(e){return qu.isFragment(e)}}class Xw extends ul{constructor(r,n,i,o){super(r,n,o);Oe(this,"name");_e(typeof i=="string"&&i.match(tH),"invalid identifier","name",i),o=Object.freeze(o.slice()),xt(this,{name:i})}}function Ig(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class Ci extends Xw{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,Fi,{value:uk})}get selector(){return fl(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+Ig(e,this.inputs)),r.join(" ")}static from(e){if(Ci.isFragment(e))return e;if(typeof e=="string")return Ci.from(z0(e));if(e instanceof Ys){const r=Qw("error",e),n=Nf(e);return cl(e),new Ci(Cr,r,n)}return new Ci(Cr,e.name,e.inputs?e.inputs.map(In.from):[])}static isFragment(e){return e&&e[Fi]===uk}}class Ma extends Xw{constructor(r,n,i,o){super(r,"event",n,i);Oe(this,"anonymous");Object.defineProperty(this,Fi,{value:lk}),xt(this,{anonymous:o})}get topicHash(){return fl(this.format("sighash"))}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(r)))});const n=[];return r!=="sighash"&&n.push("event"),n.push(this.name+Ig(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(o=>In.from(o)),new Ma(Cr,r,n,!1).topicHash}static from(r){if(Ma.isFragment(r))return r;if(typeof r=="string")try{return Ma.from(z0(r))}catch{_e(!1,"invalid event fragment","obj",r)}else if(r instanceof Ys){const n=Qw("event",r),i=Nf(r,!0),o=!!Zf(r,ai(["anonymous"])).has("anonymous");return cl(r),new Ma(Cr,n,i,o)}return new Ma(Cr,r.name,r.inputs?r.inputs.map(n=>In.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[Fi]===lk}}class Cf extends ul{constructor(r,n,i,o,s){super(r,n,i);Oe(this,"payable");Oe(this,"gas");Object.defineProperty(this,Fi,{value:dk}),xt(this,{payable:o,gas:s})}format(r){if(Ge(r!=null&&r!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),r==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(r)))});const n=[`constructor${Ig(r,this.inputs)}`];return n.push(this.payable?"payable":"nonpayable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(Cf.isFragment(r))return r;if(typeof r=="string")try{return Cf.from(z0(r))}catch{_e(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof Ys){Zf(r,ai(["constructor"]));const n=Nf(r),i=!!Zf(r,Dme).has("payable"),o=iH(r);return cl(r),new Cf(Cr,"constructor",n,i,o)}return new Cf(Cr,"constructor",r.inputs?r.inputs.map(In.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[Fi]===dk}}class sf extends ul{constructor(r,n,i){super(r,"fallback",n);Oe(this,"payable");Object.defineProperty(this,Fi,{value:hk}),xt(this,{payable:i})}format(r){const n=this.inputs.length===0?"receive":"fallback";if(r==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:i})}return`${n}()${this.payable?" payable":""}`}static from(r){if(sf.isFragment(r))return r;if(typeof r=="string")try{return sf.from(z0(r))}catch{_e(!1,"invalid fallback fragment","obj",r)}else if(r instanceof Ys){const n=r.toString(),i=r.peekKeyword(ai(["fallback","receive"]));if(_e(i,"type must be fallback or receive","obj",n),r.popKeyword(ai(["fallback","receive"]))==="receive"){const d=Nf(r);return _e(d.length===0,"receive cannot have arguments","obj.inputs",d),Zf(r,ai(["payable"])),cl(r),new sf(Cr,[],!0)}let s=Nf(r);s.length?_e(s.length===1&&s[0].type==="bytes","invalid fallback inputs","obj.inputs",s.map(d=>d.format("minimal")).join(", ")):s=[In.from("bytes")];const f=nH(r);if(_e(f==="nonpayable"||f==="payable","fallback cannot be constants","obj.stateMutability",f),Zf(r,ai(["returns"])).has("returns")){const d=Nf(r);_e(d.length===1&&d[0].type==="bytes","invalid fallback outputs","obj.outputs",d.map(p=>p.format("minimal")).join(", "))}return cl(r),new sf(Cr,s,f==="payable")}if(r.type==="receive")return new sf(Cr,[],!0);if(r.type==="fallback"){const n=[In.from("bytes")],i=r.stateMutability==="payable";return new sf(Cr,n,i)}_e(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[Fi]===hk}}class _a extends Xw{constructor(r,n,i,o,s,f){super(r,"function",n,o);Oe(this,"constant");Oe(this,"outputs");Oe(this,"stateMutability");Oe(this,"payable");Oe(this,"gas");Object.defineProperty(this,Fi,{value:pk}),s=Object.freeze(s.slice()),xt(this,{constant:i==="view"||i==="pure",gas:f,outputs:s,payable:i==="payable",stateMutability:i})}get selector(){return fl(this.format("sighash")).substring(0,10)}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(r))),outputs:this.outputs.map(i=>JSON.parse(i.format(r)))});const n=[];return r!=="sighash"&&n.push("function"),n.push(this.name+Ig(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(Ig(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(o=>In.from(o)),new _a(Cr,r,"view",n,[],null).selector}static from(r){if(_a.isFragment(r))return r;if(typeof r=="string")try{return _a.from(z0(r))}catch{_e(!1,"invalid function fragment","obj",r)}else if(r instanceof Ys){const i=Qw("function",r),o=Nf(r),s=nH(r);let f=[];Zf(r,ai(["returns"])).has("returns")&&(f=Nf(r));const d=iH(r);return cl(r),new _a(Cr,i,s,o,f,d)}let n=r.stateMutability;return n==null&&(n="payable",typeof r.constant=="boolean"?(n="view",r.constant||(n="payable",typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable"))):typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable")),new _a(Cr,r.name,n,r.inputs?r.inputs.map(In.from):[],r.outputs?r.outputs.map(In.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[Fi]===pk}}class qu extends Xw{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,Fi,{value:mk})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return qu.from(z0(e))}catch{_e(!1,"invalid struct fragment","obj",e)}else if(e instanceof Ys){const r=Qw("struct",e),n=Nf(e);return cl(e),new qu(Cr,r,n)}return new qu(Cr,e.name,e.inputs?e.inputs.map(In.from):[])}static isFragment(e){return e&&e[Fi]===mk}}const fa=new Map;fa.set(0,"GENERIC_PANIC");fa.set(1,"ASSERT_FALSE");fa.set(17,"OVERFLOW");fa.set(18,"DIVIDE_BY_ZERO");fa.set(33,"ENUM_RANGE_ERROR");fa.set(34,"BAD_STORAGE_DATA");fa.set(49,"STACK_UNDERFLOW");fa.set(50,"ARRAY_RANGE_ERROR");fa.set(65,"OUT_OF_MEMORY");fa.set(81,"UNINITIALIZED_FUNCTION_CALL");const Wme=new RegExp(/^bytes([0-9]*)$/),Jme=new RegExp(/^(u?int)([0-9]*)$/);let J8=null;function Zme(t,e,r,n){let i="missing revert data",o=null;const s=null;let f=null;if(r){i="execution reverted";const p=qt(r);if(r=dt(r),p.length===0)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(p.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(dt(p.slice(0,4))==="0x08c379a0")try{o=n.decode(["string"],p.slice(4))[0],f={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(dt(p.slice(0,4))==="0x4e487b71")try{const b=Number(n.decode(["uint256"],p.slice(4))[0]);f={signature:"Panic(uint256)",name:"Panic",args:[b]},o=`Panic due to ${fa.get(b)||"UNKNOWN"}(${b})`,i+=`: ${o}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const d={to:e.to?Zt(e.to):null,data:e.data||"0x"};return e.from&&(d.from=Zt(e.from)),rn(i,"CALL_EXCEPTION",{action:t,data:r,reason:o,transaction:d,invocation:s,revert:f})}var Nc,ad;const h5=class h5{constructor(){Ne(this,Nc)}getDefaultValue(e){const r=e.map(i=>Ke(this,Nc,ad).call(this,In.from(i)));return new rv(r,"_").defaultValue()}encode(e,r){WF(r.length,e.length,"types/values length mismatch");const n=e.map(s=>Ke(this,Nc,ad).call(this,In.from(s))),i=new rv(n,"_"),o=new Q9;return i.encode(o,r),o.data}decode(e,r,n){const i=e.map(s=>Ke(this,Nc,ad).call(this,In.from(s)));return new rv(i,"_").decode(new X9(r,n))}static defaultAbiCoder(){return J8==null&&(J8=new h5),J8}static getBuiltinCallException(e,r,n){return Zme(e,r,n,h5.defaultAbiCoder())}};Nc=new WeakSet,ad=function(e){if(e.isArray())return new w1e(Ke(this,Nc,ad).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new rv(e.components.map(n=>Ke(this,Nc,ad).call(this,n)),e.name);switch(e.baseType){case"address":return new y1e(e.name);case"bool":return new x1e(e.name);case"string":return new T1e(e.name);case"bytes":return new E1e(e.name);case"":return new M1e(e.name)}let r=e.type.match(Jme);if(r){let n=parseInt(r[2]||"256");return _e(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new I1e(n/8,r[1]==="int",e.name)}if(r=e.type.match(Wme),r){let n=parseInt(r[1]);return _e(n!==0&&n<=32,"invalid bytes length","param",e),new A1e(n,e.name)}_e(!1,"invalid type","type",e.type)};let Tg=h5;class Yme{constructor(e,r,n){Oe(this,"fragment");Oe(this,"name");Oe(this,"signature");Oe(this,"topic");Oe(this,"args");const i=e.name,o=e.format();xt(this,{fragment:e,name:i,signature:o,topic:r,args:n})}}class Qme{constructor(e,r,n,i){Oe(this,"fragment");Oe(this,"name");Oe(this,"args");Oe(this,"signature");Oe(this,"selector");Oe(this,"value");const o=e.name,s=e.format();xt(this,{fragment:e,name:o,args:n,signature:s,selector:r,value:i})}}class Xme{constructor(e,r,n){Oe(this,"fragment");Oe(this,"name");Oe(this,"args");Oe(this,"signature");Oe(this,"selector");const i=e.name,o=e.format();xt(this,{fragment:e,name:i,args:n,signature:o,selector:r})}}class gk{constructor(e){Oe(this,"hash");Oe(this,"_isIndexed");xt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const bk={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},yk={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&bk[t.toString()]&&(e=bk[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var ga,ba,ya,jn,Rh,Xv,kh,e2;const Od=class Od{constructor(e){Ne(this,Rh);Ne(this,kh);Oe(this,"fragments");Oe(this,"deploy");Oe(this,"fallback");Oe(this,"receive");Ne(this,ga,void 0);Ne(this,ba,void 0);Ne(this,ya,void 0);Ne(this,jn,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ce(this,ya,new Map),ce(this,ga,new Map),ce(this,ba,new Map);const n=[];for(const s of r)try{n.push(ul.from(s))}catch(f){console.log("EE",f)}xt(this,{fragments:Object.freeze(n)});let i=null,o=!1;ce(this,jn,this.getAbiCoder()),this.fragments.forEach((s,f)=>{let d;switch(s.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}xt(this,{deploy:s});return;case"fallback":s.inputs.length===0?o=!0:(_e(!i||s.payable!==i.payable,"conflicting fallback fragments",`fragments[${f}]`,s),i=s,o=i.payable);return;case"function":d=X(this,ya);break;case"event":d=X(this,ba);break;case"error":d=X(this,ga);break;default:return}const p=s.format();d.has(p)||d.set(p,s)}),this.deploy||xt(this,{deploy:Cf.from("constructor()")}),xt(this,{fallback:i,receive:o})}format(e){const r=e?"minimal":"full";return this.fragments.map(i=>i.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return Tg.defaultAbiCoder()}getFunctionName(e){const r=Ke(this,Rh,Xv).call(this,e,null,!1);return _e(r,"no matching function","key",e),r.name}hasFunction(e){return!!Ke(this,Rh,Xv).call(this,e,null,!1)}getFunction(e,r){return Ke(this,Rh,Xv).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(X(this,ya).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;nn.localeCompare(i));for(let n=0;n1){const o=i.map(s=>JSON.stringify(s.format())).join(", ");_e(!1,`ambiguous error description (i.e. ${o})`,"name",e)}return i[0]}if(e=Ci.from(e).format(),e==="Error(string)")return Ci.from("error Error(string)");if(e==="Panic(uint256)")return Ci.from("error Panic(uint256)");const n=X(this,ga).get(e);return n||null}forEachError(e){const r=Array.from(X(this,ga).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;no.type==="string"?fl(s):o.type==="bytes"?Ir(dt(s)):(o.type==="bool"&&typeof s=="boolean"?s=s?"0x01":"0x00":o.type.match(/^u?int/)?s=y0(s):o.type.match(/^bytes/)?s=ioe(s,32):o.type==="address"&&X(this,jn).encode(["address"],[s]),rl(dt(s),32));for(r.forEach((o,s)=>{const f=e.inputs[s];if(!f.indexed){_e(o==null,"cannot filter non-indexed parameters; must be null","contract."+f.name,o);return}o==null?n.push(null):f.baseType==="array"||f.baseType==="tuple"?_e(!1,"filtering with tuples or arrays not supported","contract."+f.name,o):Array.isArray(o)?n.push(o.map(d=>i(f,d))):n.push(i(f,o))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const s=this.getEvent(e);_e(s,"unknown event","eventFragment",e),e=s}const n=[],i=[],o=[];return e.anonymous||n.push(e.topicHash),_e(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((s,f)=>{const d=r[f];if(s.indexed)if(s.type==="string")n.push(fl(d));else if(s.type==="bytes")n.push(Ir(d));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(X(this,jn).encode([s.type],[d]))}else i.push(s),o.push(d)}),{data:X(this,jn).encode(i,o),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const _=this.getEvent(e);_e(_,"unknown event","eventFragment",e),e=_}if(n!=null&&!e.anonymous){const _=e.topicHash;_e(Tr(n[0],32)&&n[0].toLowerCase()===_,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],o=[],s=[];e.inputs.forEach((_,S)=>{_.indexed?_.type==="string"||_.type==="bytes"||_.baseType==="tuple"||_.baseType==="array"?(i.push(In.from({type:"bytes32",name:_.name})),s.push(!0)):(i.push(_),s.push(!1)):(o.push(_),s.push(!1))});const f=n!=null?X(this,jn).decode(i,en(n)):null,d=X(this,jn).decode(o,r,!0),p=[],b=[];let v=0,A=0;return e.inputs.forEach((_,S)=>{let P=null;if(_.indexed)if(f==null)P=new gk(null);else if(s[S])P=new gk(f[A++]);else try{P=f[A++]}catch(I){P=I}else try{P=d[v++]}catch(I){P=I}p.push(P),b.push(_.name||null)}),e6.fromItems(p,b)}parseTransaction(e){const r=qt(e.data,"tx.data"),n=pt(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(dt(r.slice(0,4)));if(!i)return null;const o=X(this,jn).decode(i.inputs,r.slice(4));return new Qme(i,i.selector,o,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new Yme(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=dt(e),n=this.getError(Br(r,0,4));if(!n)return null;const i=X(this,jn).decode(n.inputs,Br(r,4));return new Xme(n,n.selector,i)}static from(e){return e instanceof Od?e:typeof e=="string"?new Od(JSON.parse(e)):typeof e.format=="function"?new Od(e.format("json")):new Od(e)}};ga=new WeakMap,ba=new WeakMap,ya=new WeakMap,jn=new WeakMap,Rh=new WeakSet,Xv=function(e,r,n){if(Tr(e)){const o=e.toLowerCase();for(const s of X(this,ya).values())if(o===s.selector)return s;return null}if(e.indexOf("(")===-1){const o=[];for(const[s,f]of X(this,ya))s.split("(")[0]===e&&o.push(f);if(r){const s=r.length>0?r[r.length-1]:null;let f=r.length,d=!0;Yn.isTyped(s)&&s.type==="overrides"&&(d=!1,f--);for(let p=o.length-1;p>=0;p--){const b=o[p].inputs.length;b!==f&&(!d||b!==f-1)&&o.splice(p,1)}for(let p=o.length-1;p>=0;p--){const b=o[p].inputs;for(let v=0;v=b.length){if(r[v].type==="overrides")continue;o.splice(p,1);break}if(r[v].type!==b[v].baseType){o.splice(p,1);break}}}}if(o.length===1&&r&&r.length!==o[0].inputs.length){const s=r[r.length-1];(s==null||Array.isArray(s)||typeof s!="object")&&o.splice(0,1)}if(o.length===0)return null;if(o.length>1&&n){const s=o.map(f=>JSON.stringify(f.format())).join(", ");_e(!1,`ambiguous function description (i.e. matches ${s})`,"key",e)}return o[0]}const i=X(this,ya).get(_a.from(e).format());return i||null},kh=new WeakSet,e2=function(e,r,n){if(Tr(e)){const o=e.toLowerCase();for(const s of X(this,ba).values())if(o===s.topicHash)return s;return null}if(e.indexOf("(")===-1){const o=[];for(const[s,f]of X(this,ba))s.split("(")[0]===e&&o.push(f);if(r){for(let s=o.length-1;s>=0;s--)o[s].inputs.length=0;s--){const f=o[s].inputs;for(let d=0;d1&&n){const s=o.map(f=>JSON.stringify(f.format())).join(", ");_e(!1,`ambiguous event description (i.e. matches ${s})`,"key",e)}return o[0]}const i=X(this,ba).get(Ma.from(e).format());return i||null};let k7=Od;const oH=BigInt(0);function Um(t){return t??null}function Wn(t){return t==null?null:t.toString()}class vk{constructor(e,r,n){Oe(this,"gasPrice");Oe(this,"maxFeePerGas");Oe(this,"maxPriorityFeePerGas");xt(this,{gasPrice:Um(e),maxFeePerGas:Um(r),maxPriorityFeePerGas:Um(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Wn(e),maxFeePerGas:Wn(r),maxPriorityFeePerGas:Wn(n)}}}function S6(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=dt(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=pt(t[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=Tt(t[i],`request.${i}`));return t.accessList&&(e.accessList=Il(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),e}var gf;class ege{constructor(e,r){Oe(this,"provider");Oe(this,"number");Oe(this,"hash");Oe(this,"timestamp");Oe(this,"parentHash");Oe(this,"nonce");Oe(this,"difficulty");Oe(this,"gasLimit");Oe(this,"gasUsed");Oe(this,"miner");Oe(this,"extraData");Oe(this,"baseFeePerGas");Ne(this,gf,void 0);ce(this,gf,e.transactions.map(n=>typeof n!="string"?new Rg(n,r):n)),xt(this,{provider:r,hash:Um(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,miner:e.miner,extraData:e.extraData,baseFeePerGas:Um(e.baseFeePerGas)})}get transactions(){return X(this,gf).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=X(this,gf).slice();return e.length===0?[]:(Ge(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:i,gasUsed:o,hash:s,miner:f,nonce:d,number:p,parentHash:b,timestamp:v,transactions:A}=this;return{_type:"Block",baseFeePerGas:Wn(e),difficulty:Wn(r),extraData:n,gasLimit:Wn(i),gasUsed:Wn(o),hash:s,miner:f,nonce:d,number:p,parentHash:b,timestamp:v,transactions:A}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>enew Wb(i,r))));let n=oH;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),xt(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,gasPrice:n,type:e.type,status:e.status,root:e.root})}get logs(){return X(this,eb)}toJSON(){const{to:e,from:r,contractAddress:n,hash:i,index:o,blockHash:s,blockNumber:f,logsBloom:d,logs:p,status:b,root:v}=this;return{_type:"TransactionReceipt",blockHash:s,blockNumber:f,contractAddress:n,cumulativeGasUsed:Wn(this.cumulativeGasUsed),from:r,gasPrice:Wn(this.gasPrice),gasUsed:Wn(this.gasUsed),hash:i,index:o,logs:p,logsBloom:d,root:v,status:b,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(f)return null;const{blockNumber:A,nonce:_}=await ni({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(_{if(A==null||A.status!==0)return A;Ge(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:A.to,from:A.from,data:""},receipt:A})},b=await this.provider.getTransactionReceipt(this.hash);if(n===0)return p(b);if(b){if(await b.confirmations()>=n)return p(b)}else if(await d(),n===0)return null;return await new Promise((A,_)=>{const S=[],P=()=>{S.forEach(C=>C())};if(S.push(()=>{f=!0}),i>0){const C=setTimeout(()=>{P(),_(rn("wait for transaction timeout","TIMEOUT"))},i);S.push(()=>{clearTimeout(C)})}const I=async C=>{if(await C.confirmations()>=n){P();try{A(p(C))}catch(T){_(T)}}};if(S.push(()=>{this.provider.off(this.hash,I)}),this.provider.on(this.hash,I),o>=0){const C=async()=>{try{await d()}catch(T){if($o(T,"TRANSACTION_REPLACED")){P(),_(T);return}}f||this.provider.once("block",C)};S.push(()=>{this.provider.off("block",C)}),this.provider.once("block",C)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}removedEvent(){return Ge(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),fH(this)}reorderedEvent(e){return Ge(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Ge(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),aH(this,e)}replaceableTransaction(e){_e(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new LP(this,this.provider);return ce(r,Lc,e),r}};Lc=new WeakMap;let Rg=LP;function tge(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function aH(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function fH(t){return{orphan:"drop-transaction",tx:t}}function rge(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class JM extends Wb{constructor(r,n,i){super(r,r.provider);Oe(this,"interface");Oe(this,"fragment");Oe(this,"args");const o=n.decodeEventLog(i,r.data,r.topics);xt(this,{args:o,fragment:i,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class cH extends Wb{constructor(r,n){super(r,r.provider);Oe(this,"error");xt(this,{error:n})}}var Bh;class nge extends sH{constructor(r,n,i){super(i,n);Ne(this,Bh,void 0);ce(this,Bh,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?X(this,Bh).getEvent(r.topics[0]):null;if(n)try{return new JM(r,X(this,Bh),n)}catch(i){return new cH(r,i)}return r})}}Bh=new WeakMap;var tb;class ZM extends Rg{constructor(r,n,i){super(i,n);Ne(this,tb,void 0);ce(this,tb,r)}async wait(r){const n=await super.wait(r);return n==null?null:new nge(X(this,tb),this.provider,n)}}tb=new WeakMap;class uH extends QF{constructor(r,n,i,o){super(r,n,i);Oe(this,"log");xt(this,{log:o})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class ige extends uH{constructor(e,r,n,i,o){super(e,r,n,new JM(o,e.interface,i));const s=e.interface.decodeEventLog(i,this.log.data,this.log.topics);xt(this,{args:s,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const wk=BigInt(0);function lH(t){return t&&typeof t.call=="function"}function dH(t){return t&&typeof t.estimateGas=="function"}function YM(t){return t&&typeof t.resolveName=="function"}function hH(t){return t&&typeof t.sendTransaction=="function"}var rb;class oge{constructor(e,r,n){Ne(this,rb,void 0);Oe(this,"fragment");if(xt(this,{fragment:r}),r.inputs.lengthn[d]==null?null:f.walkAsync(n[d],(b,v)=>b==="address"?Array.isArray(v)?Promise.all(v.map(A=>Ri(A,o))):Ri(v,o):v)));return e.interface.encodeFilterTopics(r,s)}())}getTopicFilter(){return X(this,rb)}}rb=new WeakMap;function ll(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function uu(t){return t==null?null:t.provider||null}async function pH(t,e){const r=Yn.dereference(t,"overrides");_e(typeof r=="object","invalid overrides parameter","overrides",t);const n=S6(r);return _e(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),_e(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=await Ri(n.from)),n}async function sge(t,e,r){const n=ll(t,"resolveName"),i=YM(n)?n:null;return await Promise.all(e.map((o,s)=>o.walkAsync(r[s],(f,d)=>(d=Yn.dereference(d,f),f==="address"?Ri(d,i):d))))}function age(t){const e=async function(s){const f=await pH(s,["data"]);f.to=await t.getAddress();const d=t.interface,p=pt(f.value||wk,"overrides.value")===wk,b=(f.data||"0x")==="0x";d.fallback&&!d.fallback.payable&&d.receive&&!b&&!p&&_e(!1,"cannot send data to receive or send value to non-payable fallback","overrides",s),_e(d.fallback||b,"cannot send data to receive-only contract","overrides.data",f.data);const v=d.receive||d.fallback&&d.fallback.payable;return _e(v||p,"cannot send value to non-payable fallback","overrides.value",f.value),_e(d.fallback||b,"cannot send data to receive-only contract","overrides.data",f.data),f},r=async function(s){const f=ll(t.runner,"call");Ge(lH(f),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const d=await e(s);try{return await f.call(d)}catch(p){throw jS(p)&&p.data?t.interface.makeError(p.data,d):p}},n=async function(s){const f=t.runner;Ge(hH(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const d=await f.sendTransaction(await e(s)),p=uu(t.runner);return new ZM(t.interface,p,d)},i=async function(s){const f=ll(t.runner,"estimateGas");return Ge(dH(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await e(s))},o=async s=>await n(s);return xt(o,{_contract:t,estimateGas:i,populateTransaction:e,send:n,staticCall:r}),o}function fge(t,e){const r=function(...p){const b=t.interface.getFunction(e,p);return Ge(b,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:p}}),b},n=async function(...p){const b=r(...p);let v={};if(b.inputs.length+1===p.length&&(v=await pH(p.pop())),b.inputs.length!==p.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const A=await sge(t.runner,b.inputs,p);return Object.assign({},v,await ni({to:t.getAddress(),data:t.interface.encodeFunctionData(b,A)}))},i=async function(...p){const b=await f(...p);return b.length===1?b[0]:b},o=async function(...p){const b=t.runner;Ge(hH(b),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const v=await b.sendTransaction(await n(...p)),A=uu(t.runner);return new ZM(t.interface,A,v)},s=async function(...p){const b=ll(t.runner,"estimateGas");return Ge(dH(b),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await b.estimateGas(await n(...p))},f=async function(...p){const b=ll(t.runner,"call");Ge(lH(b),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const v=await n(...p);let A="0x";try{A=await b.call(v)}catch(S){throw jS(S)&&S.data?t.interface.makeError(S.data,v):S}const _=r(...p);return t.interface.decodeFunctionResult(_,A)},d=async(...p)=>r(...p).constant?await i(...p):await o(...p);return xt(d,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:s,populateTransaction:n,send:o,staticCall:i,staticCallResult:f}),Object.defineProperty(d,"fragment",{configurable:!1,enumerable:!0,get:()=>{const p=t.interface.getFunction(e);return Ge(p,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),p}}),d}function cge(t,e){const r=function(...i){const o=t.interface.getEvent(e,i);return Ge(o,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),o},n=function(...i){return new oge(t,r(...i),i)};return xt(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return Ge(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const M6=Symbol.for("_ethersInternal_contract"),mH=new WeakMap;function uge(t,e){mH.set(t[M6],e)}function Gi(t){return mH.get(t[M6])}function lge(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function QM(t,e){let r,n=null;if(Array.isArray(e)){const o=function(s){if(Tr(s,32))return s;const f=t.interface.getEvent(s);return _e(f,"unknown fragment","name",s),f.topicHash};r=e.map(s=>s==null?null:Array.isArray(s)?s.map(o):o(s))}else e==="*"?r=[null]:typeof e=="string"?Tr(e,32)?r=[e]:(n=t.interface.getEvent(e),_e(n,"unknown fragment","event",e),r=[n.topicHash]):lge(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):_e(!1,"unknown event name","event",e);r=r.map(o=>{if(o==null)return null;if(Array.isArray(o)){const s=Array.from(new Set(o.map(f=>f.toLowerCase())).values());return s.length===1?s[0]:(s.sort(),s)}return o.toLowerCase()});const i=r.map(o=>o==null?"null":Array.isArray(o)?o.join("|"):o).join("&");return{fragment:n,tag:i,topics:r}}async function vm(t,e){const{subs:r}=Gi(t);return r.get((await QM(t,e)).tag)||null}async function xk(t,e,r){const n=uu(t.runner);Ge(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:o,topics:s}=await QM(t,r),{addr:f,subs:d}=Gi(t);let p=d.get(o);if(!p){const v={address:f||t,topics:s},A=I=>{let C=i;if(C==null)try{C=t.interface.getEvent(I.topics[0])}catch{}if(C){const T=C,k=i?t.interface.decodeEventLog(i,I.data,I.topics):[];O7(t,r,k,O=>new ige(t,O,r,T,I))}else O7(t,r,[],T=>new uH(t,T,r,I))};let _=[];p={tag:o,listeners:[],start:()=>{_.length||_.push(n.on(v,A))},stop:async()=>{if(_.length==0)return;let I=_;_=[],await Promise.all(I),n.off(v,A)}},d.set(o,p)}return p}let B7=Promise.resolve();async function dge(t,e,r,n){await B7;const i=await vm(t,e);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter(({listener:s,once:f})=>{const d=Array.from(r);n&&d.push(n(f?null:s));try{s.call(t,...d)}catch{}return!f}),i.listeners.length===0&&(i.stop(),Gi(t).subs.delete(i.tag)),o>0}async function O7(t,e,r,n){try{await B7}catch{}const i=dge(t,e,r,n);return B7=i,await i}const nv=["then"];var PSe;const Km=class Km{constructor(e,r,n,i){Oe(this,"target");Oe(this,"interface");Oe(this,"runner");Oe(this,"filters");Oe(this,PSe);Oe(this,"fallback");_e(typeof e=="string"||vj(e),"invalid value for Contract target","target",e),n==null&&(n=null);const o=k7.from(r);xt(this,{target:e,runner:n,interface:o}),Object.defineProperty(this,M6,{value:{}});let s,f=null,d=null;if(i){const v=uu(n);d=new ZM(this.interface,v,i)}let p=new Map;if(typeof e=="string")if(Tr(e))f=e,s=Promise.resolve(e);else{const v=ll(n,"resolveName");if(!YM(v))throw rn("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});s=v.resolveName(e).then(A=>{if(A==null)throw rn("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Gi(this).addr=A,A})}else s=e.getAddress().then(v=>{if(v==null)throw new Error("TODO");return Gi(this).addr=v,v});uge(this,{addrPromise:s,addr:f,deployTx:d,subs:p});const b=new Proxy({},{get:(v,A,_)=>{if(typeof A=="symbol"||nv.indexOf(A)>=0)return Reflect.get(v,A,_);try{return this.getEvent(A)}catch(S){if(!$o(S,"INVALID_ARGUMENT")||S.argument!=="key")throw S}},has:(v,A)=>nv.indexOf(A)>=0?Reflect.has(v,A):Reflect.has(v,A)||this.interface.hasEvent(String(A))});return xt(this,{filters:b}),xt(this,{fallback:o.receive||o.fallback?age(this):null}),new Proxy(this,{get:(v,A,_)=>{if(typeof A=="symbol"||A in v||nv.indexOf(A)>=0)return Reflect.get(v,A,_);try{return v.getFunction(A)}catch(S){if(!$o(S,"INVALID_ARGUMENT")||S.argument!=="key")throw S}},has:(v,A)=>typeof A=="symbol"||A in v||nv.indexOf(A)>=0?Reflect.has(v,A):v.interface.hasFunction(A)})}connect(e){return new Km(this.target,this.interface,e)}attach(e){return new Km(e,this.interface,this.runner)}async getAddress(){return await Gi(this).addrPromise}async getDeployedCode(){const e=uu(this.runner);Ge(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=uu(this.runner);return Ge(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,o)=>{const s=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",s)}catch(f){o(f)}};s()})}deploymentTransaction(){return Gi(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),fge(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),cge(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:i,addrPromise:o}=Gi(this),s=i||await o,{fragment:f,topics:d}=await QM(this,e),p={address:s,topics:d,fromBlock:r,toBlock:n},b=uu(this.runner);return Ge(b,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await b.getLogs(p)).map(v=>{let A=f;if(A==null)try{A=this.interface.getEvent(v.topics[0])}catch{}if(A)try{return new JM(v,this.interface,A)}catch(_){return new cH(v,_)}return new Wb(v,b)})}async on(e,r){const n=await xk(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await xk(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await O7(this,e,r,null)}async listenerCount(e){if(e){const i=await vm(this,e);return i?i.listeners.length:0}const{subs:r}=Gi(this);let n=0;for(const{listeners:i}of r.values())n+=i.length;return n}async listeners(e){if(e){const i=await vm(this,e);return i?i.listeners.map(({listener:o})=>o):[]}const{subs:r}=Gi(this);let n=[];for(const{listeners:i}of r.values())n=n.concat(i.map(({listener:o})=>o));return n}async off(e,r){const n=await vm(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:o})=>o).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(r==null||n.listeners.length===0)&&(n.stop(),Gi(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await vm(this,e);if(!r)return this;r.stop(),Gi(this).subs.delete(r.tag)}else{const{subs:r}=Gi(this);for(const{tag:n,stop:i}of r.values())i(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends Km{constructor(i,o=null){super(i,e,o)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};PSe=M6;let N7=Km;function hge(){return N7}class Na extends hge(){}function Z8(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):_e(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class pge{constructor(e){Oe(this,"name");xt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const gH=new RegExp("^(ipfs)://(.*)$","i"),Ek=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),gH,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Dc,Su,Fc,fd,p5,bH;const Nd=class Nd{constructor(e,r,n){Ne(this,Fc);Oe(this,"provider");Oe(this,"address");Oe(this,"name");Ne(this,Dc,void 0);Ne(this,Su,void 0);xt(this,{provider:e,address:r,name:n}),ce(this,Dc,null),ce(this,Su,new Na(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return X(this,Dc)==null&&ce(this,Dc,(async()=>{try{return await X(this,Su).supportsInterface("0x9061b923")}catch(e){if($o(e,"CALL_EXCEPTION"))return!1;throw ce(this,Dc,null),e}})()),await X(this,Dc)}async getAddress(e){if(e==null&&(e=60),e===60)try{const o=await Ke(this,Fc,fd).call(this,"addr(bytes32)");return o==null||o===b6?null:o}catch(o){if($o(o,"CALL_EXCEPTION"))return null;throw o}if(e>=0&&e<2147483648){let o=e+2147483648;const s=await Ke(this,Fc,fd).call(this,"addr(bytes32,uint)",[o]);if(Tr(s,20))return Zt(s)}let r=null;for(const o of this.provider.plugins)if(o instanceof pge&&o.supportsCoinType(e)){r=o;break}if(r==null)return null;const n=await Ke(this,Fc,fd).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await r.decodeAddress(e,n);if(i!=null)return i;Ge(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await Ke(this,Fc,fd).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await Ke(this,Fc,fd).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const i=r[1]==="e3010170"?"ipfs":"ipns",o=parseInt(r[4],16);if(r[5].length===o*2)return`${i}://${aoe("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;Ge(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n{if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>t(r))}}function Jb(t,e){return r=>{const n={};for(const i in t){let o=i;if(e&&i in e&&!(o in r)){for(const s of e[i])if(s in r){o=s;break}}try{const s=t[i](r[o]);s!==void 0&&(n[i]=s)}catch(s){const f=s instanceof Error?s.message:"not-an-error";Ge(!1,`invalid value for value.${i} (${f})`,"BAD_DATA",{value:r})}}return n}}function mge(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}_e(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Sp(t){return _e(Tr(t,!0),"invalid data","value",t),t}function Uo(t){return _e(Tr(t,32),"invalid hash","value",t),t}const gge=Jb({address:Zt,blockHash:Uo,blockNumber:Tt,data:Sp,index:Tt,removed:_r(mge,!1),topics:XM(Uo),transactionHash:Uo,transactionIndex:Tt},{index:["logIndex"]});function bge(t){return gge(t)}const yge=Jb({hash:_r(Uo),parentHash:Uo,number:Tt,timestamp:Tt,nonce:_r(Sp),difficulty:pt,gasLimit:pt,gasUsed:pt,miner:_r(Zt),extraData:Sp,baseFeePerGas:_r(pt)});function vge(t){const e=yge(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:yH(r)),e}const wge=Jb({transactionIndex:Tt,blockNumber:Tt,transactionHash:Uo,address:Zt,topics:XM(Uo),data:Sp,index:Tt,blockHash:Uo},{index:["logIndex"]});function xge(t){return wge(t)}const Ege=Jb({to:_r(Zt,null),from:_r(Zt,null),contractAddress:_r(Zt,null),index:Tt,root:_r(dt),gasUsed:pt,logsBloom:_r(Sp),blockHash:Uo,hash:Uo,logs:XM(xge),blockNumber:Tt,cumulativeGasUsed:pt,effectiveGasPrice:_r(pt),status:_r(Tt),type:_r(Tt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Age(t){return Ege(t)}function yH(t){t.to&&pt(t.to)===Ak&&(t.to="0x0000000000000000000000000000000000000000");const e=Jb({hash:Uo,type:r=>r==="0x"||r==null?0:Tt(r),accessList:_r(Il,null),blockHash:_r(Uo,null),blockNumber:_r(Tt,null),transactionIndex:_r(Tt,null),from:Zt,gasPrice:_r(pt),maxPriorityFeePerGas:_r(pt),maxFeePerGas:_r(pt),gasLimit:pt,to:_r(Zt,null),value:pt,nonce:Tt,data:Sp,creates:_r(Zt,null),chainId:_r(pt,null)},{data:["input"],gasLimit:["gas"]})(t);if(e.to==null&&e.creates==null&&(e.creates=b1e(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Jf.from(t.signature):e.signature=Jf.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&pt(e.blockHash)===Ak&&(e.blockHash=null),e}const Sge="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Zb{constructor(e){Oe(this,"name");xt(this,{name:e})}clone(){return new Zb(this.name)}}class ex extends Zb{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);Oe(this,"effectiveBlock");Oe(this,"txBase");Oe(this,"txCreate");Oe(this,"txDataZero");Oe(this,"txDataNonzero");Oe(this,"txAccessListStorageKey");Oe(this,"txAccessListAddress");const i={effectiveBlock:r};function o(s,f){let d=(n||{})[s];d==null&&(d=f),_e(typeof d=="number",`invalud value for ${s}`,"costs",n),i[s]=d}o("txBase",21e3),o("txCreate",32e3),o("txDataZero",4),o("txDataNonzero",16),o("txAccessListStorageKey",1900),o("txAccessListAddress",2400),xt(this,i)}clone(){return new ex(this.effectiveBlock,this)}}class tx extends Zb{constructor(r,n){super("org.ethers.plugins.network.Ens");Oe(this,"address");Oe(this,"targetNetwork");xt(this,{address:r||Sge,targetNetwork:n??1})}clone(){return new tx(this.address,this.targetNetwork)}}var nb,ib;class vH extends Zb{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Ne(this,nb,void 0);Ne(this,ib,void 0);ce(this,nb,r),ce(this,ib,n)}get url(){return X(this,nb)}get processFunc(){return X(this,ib)}clone(){return this}}nb=new WeakMap,ib=new WeakMap;const Y8=new Map;var Oh,Nh,$c;const Ld=class Ld{constructor(e,r){Ne(this,Oh,void 0);Ne(this,Nh,void 0);Ne(this,$c,void 0);ce(this,Oh,e),ce(this,Nh,pt(r)),ce(this,$c,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return X(this,Oh)}set name(e){ce(this,Oh,e)}get chainId(){return X(this,Nh)}set chainId(e){ce(this,Nh,pt(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===pt(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===pt(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===pt(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(X(this,$c).values())}attachPlugin(e){if(X(this,$c).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return X(this,$c).set(e.name,e.clone()),this}getPlugin(e){return X(this,$c).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new Ld(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new ex;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let i=2;i9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function Mk(t){return new vH(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[o,s]=await Promise.all([n.send(),e()]);i=o;const f=i.bodyJson.standard;return{gasPrice:s.gasPrice,maxFeePerGas:Sk(f.maxFee,9),maxPriorityFeePerGas:Sk(f.maxPriorityFee,9)}}catch(o){Ge(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:o})}})}function Mge(t){return new vH("data:",async(e,r,n)=>{const i=await e();if(i.maxFeePerGas==null||i.maxPriorityFeePerGas==null)return i;const o=i.maxFeePerGas-i.maxPriorityFeePerGas;return{gasPrice:i.gasPrice,maxFeePerGas:o+t,maxPriorityFeePerGas:t}})}let _k=!1;function _ge(){if(_k)return;_k=!0;function t(e,r,n){const i=function(){const o=new If(e,r);return n.ensNetwork!=null&&o.attachPlugin(new tx(null,n.ensNetwork)),o.attachPlugin(new ex),(n.plugins||[]).forEach(s=>{o.attachPlugin(s)}),o};If.register(e,i),If.register(r,i),n.altNames&&n.altNames.forEach(o=>{If.register(o,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("matic",137,{ensNetwork:1,plugins:[Mk("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Mk("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[Mge(BigInt("1000000"))]}),t("optimism-goerli",420,{}),t("xdai",100,{ensNetwork:1})}function L7(t){return JSON.parse(JSON.stringify(t))}var bf,Po,Uc,va,Lh,t2;class Pge{constructor(e){Ne(this,Lh);Ne(this,bf,void 0);Ne(this,Po,void 0);Ne(this,Uc,void 0);Ne(this,va,void 0);ce(this,bf,e),ce(this,Po,null),ce(this,Uc,4e3),ce(this,va,-2)}get pollingInterval(){return X(this,Uc)}set pollingInterval(e){ce(this,Uc,e)}start(){X(this,Po)||(ce(this,Po,X(this,bf)._setTimeout(Ke(this,Lh,t2).bind(this),X(this,Uc))),Ke(this,Lh,t2).call(this))}stop(){X(this,Po)&&(X(this,bf)._clearTimeout(X(this,Po)),ce(this,Po,null))}pause(e){this.stop(),e&&ce(this,va,-2)}resume(){this.start()}}bf=new WeakMap,Po=new WeakMap,Uc=new WeakMap,va=new WeakMap,Lh=new WeakSet,t2=async function(){try{const e=await X(this,bf).getBlockNumber();if(X(this,va)===-2){ce(this,va,e);return}if(e!==X(this,va)){for(let r=X(this,va)+1;r<=e;r++){if(X(this,Po)==null)return;await X(this,bf).emit("block",r)}ce(this,va,e)}}catch{}X(this,Po)!=null&&ce(this,Po,X(this,bf)._setTimeout(Ke(this,Lh,t2).bind(this),X(this,Uc)))};var Mu,_u,zc;class wH{constructor(e){Ne(this,Mu,void 0);Ne(this,_u,void 0);Ne(this,zc,void 0);ce(this,Mu,e),ce(this,zc,!1),ce(this,_u,r=>{this._poll(r,X(this,Mu))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){X(this,zc)||(ce(this,zc,!0),X(this,_u).call(this,-2),X(this,Mu).on("block",X(this,_u)))}stop(){X(this,zc)&&(ce(this,zc,!1),X(this,Mu).off("block",X(this,_u)))}pause(e){this.stop()}resume(){this.start()}}Mu=new WeakMap,_u=new WeakMap,zc=new WeakMap;var m5;class Cge extends wH{constructor(r,n){super(r);Ne(this,m5,void 0);ce(this,m5,L7(n))}async _poll(r,n){throw new Error("@TODO")}}m5=new WeakMap;var Dh;class Ige extends wH{constructor(r,n){super(r);Ne(this,Dh,void 0);ce(this,Dh,n)}async _poll(r,n){const i=await n.getTransactionReceipt(X(this,Dh));i&&n.emit(X(this,Dh),i)}}Dh=new WeakMap;var yf,Fh,$h,jc,Co,g5,xH;class e_{constructor(e,r){Ne(this,g5);Ne(this,yf,void 0);Ne(this,Fh,void 0);Ne(this,$h,void 0);Ne(this,jc,void 0);Ne(this,Co,void 0);ce(this,yf,e),ce(this,Fh,L7(r)),ce(this,$h,Ke(this,g5,xH).bind(this)),ce(this,jc,!1),ce(this,Co,-2)}start(){X(this,jc)||(ce(this,jc,!0),X(this,Co)===-2&&X(this,yf).getBlockNumber().then(e=>{ce(this,Co,e)}),X(this,yf).on("block",X(this,$h)))}stop(){X(this,jc)&&(ce(this,jc,!1),X(this,yf).off("block",X(this,$h)))}pause(e){this.stop(),e&&ce(this,Co,-2)}resume(){this.start()}}yf=new WeakMap,Fh=new WeakMap,$h=new WeakMap,jc=new WeakMap,Co=new WeakMap,g5=new WeakSet,xH=async function(e){if(X(this,Co)===-2)return;const r=L7(X(this,Fh));r.fromBlock=X(this,Co)+1,r.toBlock=e;const n=await X(this,yf).getLogs(r);if(n.length===0){X(this,Co){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((o,s)=>(o[s]=n[s],o),{})}return n})}class EH{constructor(e){Oe(this,"name");xt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function kge(t){return JSON.parse(JSON.stringify(t))}function D7(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function Q8(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"pending":case"debug":case"error":case"network":return{type:t,tag:t}}if(Tr(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:r2("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:r2("orphan",r),filter:kge(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(i=>i==null?null:Array.isArray(i)?D7(i.map(o=>o.toLowerCase())):i.toLowerCase())};if(r.address){const i=[],o=[],s=f=>{Tr(f)?i.push(f):o.push((async()=>{i.push(await Ri(f,e))})())};Array.isArray(r.address)?r.address.forEach(s):s(r.address),o.length&&await Promise.all(o),n.address=D7(i.map(f=>f.toLowerCase()))}return{filter:n,tag:r2("event",n),type:"event"}}_e(!1,"unknown ProviderEvent","event",t)}function X8(){return new Date().getTime()}const Bge={cacheTimeout:250,pollingInterval:4e3};var Hn,Hc,qn,Uh,Ji,Pu,qc,vf,ob,Io,zh,jh,Ei,Ao,sb,F7,ab,$7,Cu,wm,fb,U7,Iu,xm,Hh,n2;class Oge{constructor(e,r){Ne(this,Ei);Ne(this,sb);Ne(this,ab);Ne(this,Cu);Ne(this,fb);Ne(this,Iu);Ne(this,Hh);Ne(this,Hn,void 0);Ne(this,Hc,void 0);Ne(this,qn,void 0);Ne(this,Uh,void 0);Ne(this,Ji,void 0);Ne(this,Pu,void 0);Ne(this,qc,void 0);Ne(this,vf,void 0);Ne(this,ob,void 0);Ne(this,Io,void 0);Ne(this,zh,void 0);Ne(this,jh,void 0);if(ce(this,jh,Object.assign({},Bge,r||{})),e==="any")ce(this,Pu,!0),ce(this,Ji,null);else if(e){const n=If.from(e);ce(this,Pu,!1),ce(this,Ji,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else ce(this,Pu,!1),ce(this,Ji,null);ce(this,vf,-1),ce(this,qc,new Map),ce(this,Hn,new Map),ce(this,Hc,new Map),ce(this,qn,null),ce(this,Uh,!1),ce(this,ob,1),ce(this,Io,new Map),ce(this,zh,!1)}get pollingInterval(){return X(this,jh).pollingInterval}get provider(){return this}get plugins(){return Array.from(X(this,Hc).values())}attachPlugin(e){if(X(this,Hc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return X(this,Hc).set(e.name,e.connect(this)),this}getPlugin(e){return X(this,Hc).get(e)||null}get disableCcipRead(){return X(this,zh)}set disableCcipRead(e){ce(this,zh,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),o=r.toLowerCase(),s=[];for(let f=0;f=500,`response not found during CCIP fetch: ${v}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:d,errorMessage:v}}),s.push(v)}Ge(!1,`error encountered during CCIP fetch: ${s.map(f=>JSON.stringify(f)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:s}})}_wrapBlock(e,r){return new ege(vge(e),this)}_wrapLog(e,r){return new Wb(bge(e),this)}_wrapTransactionReceipt(e,r){return new sH(Age(e),this)}_wrapTransactionResponse(e,r){return new Rg(yH(e),this)}_detectNetwork(){Ge(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){Ge(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Tt(await Ke(this,Ei,Ao).call(this,{method:"getBlockNumber"}),"%response");return X(this,vf)>=0&&ce(this,vf,e),e}_getAddress(e){return Ri(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(Tr(e))return Tr(e,32)?e:Pd(e);if(typeof e=="bigint"&&(e=Tt(e,"blockTag")),typeof e=="number")return e>=0?Pd(e):X(this,vf)>=0?Pd(X(this,vf)+e):this.getBlockNumber().then(r=>Pd(r+e));_e(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(d=>d==null?null:Array.isArray(d)?D7(d.map(p=>p.toLowerCase())):d.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(d,p,b)=>{let v;switch(d.length){case 0:break;case 1:v=d[0];break;default:d.sort(),v=d}if(n&&(p!=null||b!=null))throw new Error("invalid filter");const A={};return v&&(A.address=v),r.length&&(A.topics=r),p&&(A.fromBlock=p),b&&(A.toBlock=b),n&&(A.blockHash=n),A};let o=[];if(e.address)if(Array.isArray(e.address))for(const d of e.address)o.push(this._getAddress(d));else o.push(this._getAddress(e.address));let s;"fromBlock"in e&&(s=this._getBlockTag(e.fromBlock));let f;return"toBlock"in e&&(f=this._getBlockTag(e.toBlock)),o.filter(d=>typeof d!="string").length||s!=null&&typeof s!="string"||f!=null&&typeof f!="string"?Promise.all([Promise.all(o),s,f]).then(d=>i(d[0],d[1],d[2])):i(o,s,f)}_getTransactionRequest(e){const r=S6(e),n=[];if(["to","from"].forEach(i=>{if(r[i]==null)return;const o=Ri(r[i]);iv(o)?n.push(async function(){r[i]=await o}()):r[i]=o}),r.blockTag!=null){const i=this._getBlockTag(r.blockTag);iv(i)?n.push(async function(){r.blockTag=await i}()):r.blockTag=i}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(X(this,Ji)==null){const i=this._detectNetwork().then(o=>(this.emit("network",o,null),o),o=>{throw X(this,Ji)===i&&ce(this,Ji,null),o});return ce(this,Ji,i),(await i).clone()}const e=X(this,Ji),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(X(this,Pu)?(this.emit("network",n,r),X(this,Ji)===e&&ce(this,Ji,Promise.resolve(n))):Ge(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:i,gasPrice:o}=await ni({_block:Ke(this,fb,U7).call(this,"latest",!1),gasPrice:(async()=>{try{const p=await Ke(this,Ei,Ao).call(this,{method:"getGasPrice"});return pt(p,"%response")}catch{}return null})()});let s=null,f=null;const d=this._wrapBlock(i,e);return d&&d.baseFeePerGas&&(f=BigInt("1000000000"),s=d.baseFeePerGas*Tge+f),new vk(o,s,f)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new qf(n.url),o=await n.processFunc(r,this,i);return new vk(o.gasPrice,o.maxFeePerGas,o.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return iv(r)&&(r=await r),pt(await Ke(this,Ei,Ao).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await ni({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await Ke(this,ab,$7).call(this,Ke(this,sb,F7).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return pt(await Ke(this,Cu,wm).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return Tt(await Ke(this,Cu,wm).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return dt(await Ke(this,Cu,wm).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const i=pt(r,"position");return dt(await Ke(this,Cu,wm).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:i}=await ni({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),o=A6.from(e);if(o.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(o,i).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:i}=await ni({network:this.getNetwork(),params:Ke(this,fb,U7).call(this,e,!!r)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:r,params:n}=await ni({network:this.getNetwork(),params:Ke(this,Ei,Ao).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await ni({network:this.getNetwork(),params:Ke(this,Ei,Ao).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await Ke(this,Ei,Ao).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await ni({network:this.getNetwork(),result:Ke(this,Ei,Ao).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:dt(r)}async getLogs(e){let r=this._getFilter(e);iv(r)&&(r=await r);const{network:n,params:i}=await ni({network:this.getNetwork(),params:Ke(this,Ei,Ao).call(this,{method:"getLogs",filter:r})});return i.map(o=>this._wrapLog(o,n))}_getProvider(e){Ge(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await _6.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=Zt(e);const r=T7(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await _6.getEnsAddress(this),o=await new Na(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(o==null||o===b6)return null;const f=await new Na(o,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(f)!==e?null:f}catch(n){if($o(n,"BAD_DATA")&&n.value==="0x"||$o(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const i=r??1;return i===0?this.getTransactionReceipt(e):new Promise(async(o,s)=>{let f=null;const d=async p=>{try{const b=await this.getTransactionReceipt(e);if(b!=null&&p-b.blockNumber+1>=i){o(b),f&&(clearTimeout(f),f=null);return}}catch(b){console.log("EEE",b)}this.once("block",d)};n!=null&&(f=setTimeout(()=>{f!=null&&(f=null,this.off("block",d),s(rn("timeout","TIMEOUT",{reason:"timeout"})))},n)),d(await this.getBlockNumber())})}async waitForBlock(e){Ge(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=X(this,Io).get(e);r&&(r.timer&&clearTimeout(r.timer),X(this,Io).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=I1(this,ob)._++,i=()=>{X(this,Io).delete(n),e()};if(this.paused)X(this,Io).set(n,{timer:null,func:i,time:r});else{const o=setTimeout(i,r);X(this,Io).set(n,{timer:o,func:i,time:X8()})}return n}_forEachSubscriber(e){for(const r of X(this,Hn).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new EH(e.type);case"block":{const r=new Pge(this);return r.pollingInterval=this.pollingInterval,r}case"event":return new e_(this,e.filter);case"transaction":return new Ige(this,e.hash);case"orphan":return new Cge(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of X(this,Hn).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),X(this,qn)!=null&&r.pause(X(this,qn));break}}async on(e,r){const n=await Ke(this,Hh,n2).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,X(this,qn)!=null&&n.subscriber.pause(X(this,qn))),this}async once(e,r){const n=await Ke(this,Hh,n2).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,X(this,qn)!=null&&n.subscriber.pause(X(this,qn))),this}async emit(e,...r){const n=await Ke(this,Iu,xm).call(this,e,r);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:o,once:s})=>{const f=new QF(this,s?null:o,e);try{o.call(this,...r,f)}catch{}return!s}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),X(this,Hn).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await Ke(this,Iu,xm).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of X(this,Hn).values())r+=n.length;return r}async listeners(e){if(e){const n=await Ke(this,Iu,xm).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let r=[];for(const{listeners:n}of X(this,Hn).values())r=r.concat(n.map(({listener:i})=>i));return r}async off(e,r){const n=await Ke(this,Iu,xm).call(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:o})=>o).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),X(this,Hn).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:i}=await Ke(this,Hh,n2).call(this,e);n&&i.stop(),X(this,Hn).delete(r)}else for(const[r,{started:n,subscriber:i}]of X(this,Hn))n&&i.stop(),X(this,Hn).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return X(this,Uh)}destroy(){this.removeAllListeners();for(const e of X(this,Io).keys())this._clearTimeout(e);ce(this,Uh,!0)}get paused(){return X(this,qn)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(ce(this,vf,-1),X(this,qn)!=null){if(X(this,qn)==!!e)return;Ge(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),ce(this,qn,!!e);for(const r of X(this,Io).values())r.timer&&clearTimeout(r.timer),r.time=X8()-r.time}resume(){if(X(this,qn)!=null){this._forEachSubscriber(e=>e.resume()),ce(this,qn,null);for(const e of X(this,Io).values()){let r=e.time;r<0&&(r=0),e.time=X8(),setTimeout(e.func,r)}}}}Hn=new WeakMap,Hc=new WeakMap,qn=new WeakMap,Uh=new WeakMap,Ji=new WeakMap,Pu=new WeakMap,qc=new WeakMap,vf=new WeakMap,ob=new WeakMap,Io=new WeakMap,zh=new WeakMap,jh=new WeakMap,Ei=new WeakSet,Ao=async function(e){const r=X(this,jh).cacheTimeout;if(r<0)return await this._perform(e);const n=r2(e.method,e);let i=X(this,qc).get(n);return i||(i=this._perform(e),X(this,qc).set(n,i),setTimeout(()=>{X(this,qc).get(n)===i&&X(this,qc).delete(n)},r)),await i},sb=new WeakSet,F7=async function(e,r,n){Ge(n=0&&r==="latest"&&i.to!=null&&Br(o.data,0,4)==="0x556f1830"){const s=o.data,f=await Ri(i.to,this);let d;try{d=$ge(Br(o.data,4))}catch(v){Ge(!1,v.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:s}})}Ge(d.sender.toLowerCase()===f.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:s,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:d.errorArgs}});const p=await this.ccipReadFetch(i,d.calldata,d.urls);Ge(p!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:o.data,errorArgs:d.errorArgs}});const b={to:f,data:en([d.selector,Fge([p,d.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:b});try{const v=await Ke(this,sb,F7).call(this,b,r,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},b),result:v}),v}catch(v){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},b),error:v}),v}}throw o}},ab=new WeakSet,$7=async function(e){const{value:r}=await ni({network:this.getNetwork(),value:e});return r},Cu=new WeakSet,wm=async function(e,r,n){let i=this._getAddress(r),o=this._getBlockTag(n);return(typeof i!="string"||typeof o!="string")&&([i,o]=await Promise.all([i,o])),await Ke(this,ab,$7).call(this,Ke(this,Ei,Ao).call(this,Object.assign(e,{address:i,blockTag:o})))},fb=new WeakSet,U7=async function(e,r){if(Tr(e,32))return await Ke(this,Ei,Ao).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await Ke(this,Ei,Ao).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},Iu=new WeakSet,xm=async function(e,r){let n=await Q8(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await Q8({orphan:"drop-log",log:r[0]},this)),X(this,Hn).get(n.tag)||null},Hh=new WeakSet,n2=async function(e){const r=await Q8(e,this),n=r.tag;let i=X(this,Hn).get(n);return i||(i={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},X(this,Hn).set(n,i)),i};function Nge(t,e){try{const r=z7(t,e);if(r)return HS(r)}catch{}return null}function z7(t,e){if(t==="0x")return null;try{const r=Tt(Br(t,e,e+32)),n=Tt(Br(t,r,r+32));return Br(t,r+32,r+32+n)}catch{}return null}function Pk(t){const e=oo(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function Lge(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const Dge=new Uint8Array([]);function Fge(t){const e=[];let r=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=Br(t,0,32);Ge(Br(r,0,12)===Br(Ck,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=Br(r,12);try{const n=[],i=Tt(Br(t,32,64)),o=Tt(Br(t,i,i+32)),s=Br(t,i+32);for(let f=0;fe[n]),e}function Xl(t,e){if(t.provider)return t.provider;Ge(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function Ik(t,e){let r=S6(e);if(r.to!=null&&(r.to=Ri(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),Ri(n,t)]).then(([i,o])=>(_e(i.toLowerCase()===o.toLowerCase(),"transaction from mismatch","tx.from",o),i))}else r.from=t.getAddress();return await ni(r)}class Uge{constructor(e){Oe(this,"provider");xt(this,{provider:e||null})}async getNonce(e){return Xl(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await Ik(this,e)}async populateTransaction(e){const r=Xl(this,"populateTransaction"),n=await Ik(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const s=pt(n.chainId);_e(s===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const o=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||o)?_e(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&o&&_e(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const s=await r.getFeeData();Ge(s.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=s.gasPrice)}else{const s=await r.getFeeData();if(n.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const f=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=f,n.maxPriorityFeePerGas=f}else n.maxFeePerGas==null&&(n.maxFeePerGas=s.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(Ge(!o,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=s.gasPrice),n.type=0):Ge(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else n.type===2&&(n.maxFeePerGas==null&&(n.maxFeePerGas=s.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return await ni(n)}async estimateGas(e){return Xl(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Xl(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Xl(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=Xl(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=A6.from(n);return await r.broadcastTransaction(await this.signTransaction(i))}}function zge(t){return JSON.parse(JSON.stringify(t))}var Ai,wa,Tu,Gc,Ru,qh,cb,j7,ub,H7;class AH{constructor(e){Ne(this,cb);Ne(this,ub);Ne(this,Ai,void 0);Ne(this,wa,void 0);Ne(this,Tu,void 0);Ne(this,Gc,void 0);Ne(this,Ru,void 0);Ne(this,qh,void 0);ce(this,Ai,e),ce(this,wa,null),ce(this,Tu,Ke(this,cb,j7).bind(this)),ce(this,Gc,!1),ce(this,Ru,null),ce(this,qh,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){X(this,Gc)||(ce(this,Gc,!0),Ke(this,cb,j7).call(this,-2))}stop(){X(this,Gc)&&(ce(this,Gc,!1),ce(this,qh,!0),Ke(this,ub,H7).call(this),X(this,Ai).off("block",X(this,Tu)))}pause(e){e&&Ke(this,ub,H7).call(this),X(this,Ai).off("block",X(this,Tu))}resume(){this.start()}}Ai=new WeakMap,wa=new WeakMap,Tu=new WeakMap,Gc=new WeakMap,Ru=new WeakMap,qh=new WeakMap,cb=new WeakSet,j7=async function(e){try{X(this,wa)==null&&ce(this,wa,this._subscribe(X(this,Ai)));let r=null;try{r=await X(this,wa)}catch(o){if(!$o(o,"UNSUPPORTED_OPERATION")||o.operation!=="eth_newFilter")throw o}if(r==null){ce(this,wa,null),X(this,Ai)._recoverSubscriber(this,this._recover(X(this,Ai)));return}const n=await X(this,Ai).getNetwork();if(X(this,Ru)||ce(this,Ru,n),X(this,Ru).chainId!==n.chainId)throw new Error("chaid changed");if(X(this,qh))return;const i=await X(this,Ai).send("eth_getFilterChanges",[r]);await this._emitResults(X(this,Ai),i)}catch(r){console.log("@TODO",r)}X(this,Ai).once("block",X(this,Tu))},ub=new WeakSet,H7=function(){const e=X(this,wa);e&&(ce(this,wa,null),e.then(r=>{X(this,Ai).send("eth_uninstallFilter",[r])}))};var ku;class jge extends AH{constructor(r,n){super(r);Ne(this,ku,void 0);ce(this,ku,zge(n))}_recover(r){return new e_(r,X(this,ku))}async _subscribe(r){return await r.send("eth_newFilter",[X(this,ku)])}async _emitResults(r,n){for(const i of n)r.emit(X(this,ku),r._wrapLog(i,r._network))}}ku=new WeakMap;class Hge extends AH{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const qge="bigint,boolean,function,number,string,symbol".split(/,/g);function i2(t){if(t==null||qge.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(i2);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function Gge(t){return new Promise(e=>{setTimeout(e,t)})}function ed(t){return t&&t.toLowerCase()}function Tk(t){return t&&typeof t.pollingInterval=="number"}const Vge={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class e4 extends Uge{constructor(r,n){super(r);Oe(this,"address");n=Zt(n),xt(this,{address:n})}connect(r){Ge(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(r){return await this.populateCall(r)}async sendUncheckedTransaction(r){const n=i2(r),i=[];if(n.from){const s=n.from;i.push((async()=>{const f=await Ri(s,this.provider);_e(f!=null&&f.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=f})())}else n.from=this.address;if(n.gasLimit==null&&i.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const s=n.to;i.push((async()=>{n.to=await Ri(s,this.provider)})())}i.length&&await Promise.all(i);const o=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[o])}async sendTransaction(r){const n=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(r);return await new Promise((o,s)=>{const f=[1e3,100],d=async()=>{const p=await this.provider.getTransaction(i);if(p!=null){o(p.replaceableTransaction(n));return}this.provider._setTimeout(()=>{d()},f.pop()||4e3)};d()})}async signTransaction(r){const n=i2(r);if(n.from){const o=await Ri(n.from,this.provider);_e(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=o}else n.from=this.address;const i=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[i])}async signMessage(r){const n=typeof r=="string"?Bf(r):r;return await this.provider.send("personal_sign",[dt(n),this.address.toLowerCase()])}async signTypedData(r,n,i){const o=i2(i),s=await sk.resolveNames(r,n,o,async f=>{const d=await Ri(f);return _e(d!=null,"TypedData does not support null address","value",f),d});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(sk.getPayload(s.domain,n,s.value))])}async unlock(r){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),r,null])}async _legacySignMessage(r){const n=typeof r=="string"?Bf(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),dt(n)])}}var Bu,Gh,wf,xa,_s,xf,lb,q7;class Kge extends Oge{constructor(r,n){super(r,n);Ne(this,lb);Ne(this,Bu,void 0);Ne(this,Gh,void 0);Ne(this,wf,void 0);Ne(this,xa,void 0);Ne(this,_s,void 0);Ne(this,xf,void 0);ce(this,Gh,1),ce(this,Bu,Object.assign({},Vge,n||{})),ce(this,wf,[]),ce(this,xa,null),ce(this,xf,null);{let o=null;const s=new Promise(f=>{o=f});ce(this,_s,{promise:s,resolve:o})}const i=this._getOption("staticNetwork");i&&(_e(r==null||i.matches(r),"staticNetwork MUST match network object","options",n),ce(this,xf,i))}_getOption(r){return X(this,Bu)[r]}get _network(){return Ge(X(this,xf),"network is not available yet","NETWORK_ERROR"),X(this,xf)}async _perform(r){if(r.method==="call"||r.method==="estimateGas"){let i=r.transaction;if(i&&i.type!=null&&pt(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=await this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(r=Object.assign({},r,{transaction:Object.assign({},i,{type:void 0})}))}}const n=this.getRpcRequest(r);return n!=null?await this.send(n.method,n.args):super._perform(r)}async _detectNetwork(){const r=this._getOption("staticNetwork");if(r)return r;if(this.ready)return If.from(pt(await this.send("eth_chainId",[])));const n={id:I1(this,Gh)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let i;try{i=(await this._send(n))[0]}catch(o){throw this.emit("debug",{action:"receiveRpcError",error:o}),o}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return If.from(pt(i.result));throw this.getRpcError(n,i)}_start(){X(this,_s)==null||X(this,_s).resolve==null||(X(this,_s).resolve(),ce(this,_s,null),(async()=>{for(;X(this,xf)==null&&!this.destroyed;)try{ce(this,xf,await this._detectNetwork())}catch(r){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",rn("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:r}})),await Gge(1e3)}Ke(this,lb,q7).call(this)})())}async _waitUntilReady(){if(X(this,_s)!=null)return await X(this,_s).promise}_getSubscriber(r){return r.type==="pending"?new Hge(this):r.type==="event"?this._getOption("polling")?new e_(this,r.filter):new jge(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new EH("orphan"):super._getSubscriber(r)}get ready(){return X(this,_s)==null}getRpcTransaction(r){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(r[i]==null)return;let o=i;i==="gasLimit"&&(o="gas"),n[o]=Pd(pt(r[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{r[i]!=null&&(n[i]=dt(r[i]))}),r.accessList&&(n.accessList=Il(r.accessList)),n}getRpcRequest(r){switch(r.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getBalance":return{method:"eth_getBalance",args:[ed(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[ed(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[ed(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[ed(r.address),"0x"+r.position.toString(16),r.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[r.signedTransaction]};case"getBlock":if("blockTag"in r)return{method:"eth_getBlockByNumber",args:[r.blockTag,!!r.includeTransactions]};if("blockHash"in r)return{method:"eth_getBlockByHash",args:[r.blockHash,!!r.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[r.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[r.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(r.transaction),r.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(r.transaction)]};case"getLogs":return r.filter&&r.filter.address!=null&&(Array.isArray(r.filter.address)?r.filter.address=r.filter.address.map(ed):r.filter.address=ed(r.filter.address)),{method:"eth_getLogs",args:[r.filter]}}return null}getRpcError(r,n){const{method:i}=r,{error:o}=n;if(i==="eth_estimateGas"&&o.message){const d=o.message;if(!d.match(/revert/i)&&d.match(/insufficient funds/i))return rn("insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.params[0],info:{payload:r,error:o}})}if(i==="eth_call"||i==="eth_estimateGas"){const d=G7(o),p=Tg.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",r.params[0],d?d.data:null);return p.info={error:o,payload:r},p}const s=JSON.stringify(Wge(o));if(typeof o.message=="string"&&o.message.match(/user denied|ethers-user-denied/i))return rn("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:r,error:o}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const d=r.params[0];if(s.match(/insufficient funds|base fee exceeds gas limit/i))return rn("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:d,info:{error:o}});if(s.match(/nonce/i)&&s.match(/too low/i))return rn("nonce has already been used","NONCE_EXPIRED",{transaction:d,info:{error:o}});if(s.match(/replacement transaction/i)&&s.match(/underpriced/i))return rn("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:d,info:{error:o}});if(s.match(/only replay-protected/i))return rn("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:d,info:{error:o}}})}let f=!!s.match(/the method .* does not exist/i);return f||o&&o.details&&o.details.startsWith("Unauthorized method:")&&(f=!0),f?rn("unsupported operation","UNSUPPORTED_OPERATION",{operation:r.method,info:{error:o,payload:r}}):rn("could not coalesce error","UNKNOWN_ERROR",{error:o,payload:r})}send(r,n){if(this.destroyed)return Promise.reject(rn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r}));const i=I1(this,Gh)._++,o=new Promise((s,f)=>{X(this,wf).push({resolve:s,reject:f,payload:{method:r,params:n,id:i,jsonrpc:"2.0"}})});return Ke(this,lb,q7).call(this),o}async getSigner(r){r==null&&(r=0);const n=this.send("eth_accounts",[]);if(typeof r=="number"){const o=await n;if(r>=o.length)throw new Error("no such account");return new e4(this,o[r])}const{accounts:i}=await ni({network:this.getNetwork(),accounts:n});r=Zt(r);for(const o of i)if(Zt(o)===r)return new e4(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new e4(this,n))}destroy(){X(this,xa)&&(clearTimeout(X(this,xa)),ce(this,xa,null));for(const{payload:r,reject:n}of X(this,wf))n(rn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));ce(this,wf,[]),super.destroy()}}Bu=new WeakMap,Gh=new WeakMap,wf=new WeakMap,xa=new WeakMap,_s=new WeakMap,xf=new WeakMap,lb=new WeakSet,q7=function(){if(X(this,xa))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");ce(this,xa,setTimeout(()=>{ce(this,xa,null);const n=X(this,wf);for(ce(this,wf,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==X(this,Bu).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(s=>s.payload)).length>X(this,Bu).batchMaxSize){n.unshift(i.pop());break}(async()=>{const o=i.length===1?i[0].payload:i.map(s=>s.payload);this.emit("debug",{action:"sendRpcPayload",payload:o});try{const s=await this._send(o);this.emit("debug",{action:"receiveRpcResult",result:s});for(const{resolve:f,reject:d,payload:p}of i){if(this.destroyed){d(rn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:p.method}));continue}const b=s.filter(v=>v.id===p.id)[0];if(b==null){const v=rn("missing response for request","BAD_DATA",{value:s,info:{payload:p}});this.emit("error",v),d(v);continue}if("error"in b){d(this.getRpcError(p,b));continue}f(b.result)}}catch(s){this.emit("debug",{action:"receiveRpcError",error:s});for(const{reject:f}of i)f(s)}})()}},r))};var Vc;class SH extends Kge{constructor(r,n){super(r,n);Ne(this,Vc,void 0);ce(this,Vc,4e3)}_getSubscriber(r){const n=super._getSubscriber(r);return Tk(n)&&(n.pollingInterval=X(this,Vc)),n}get pollingInterval(){return X(this,Vc)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");ce(this,Vc,r),this._forEachSubscriber(n=>{Tk(n)&&(n.pollingInterval=X(this,Vc))})}}Vc=new WeakMap;var Vh;class MH extends SH{constructor(r,n,i){r==null&&(r="http://localhost:8545");super(n,i);Ne(this,Vh,void 0);typeof r=="string"?ce(this,Vh,new qf(r)):ce(this,Vh,r.clone())}_getConnection(){return X(this,Vh).clone()}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){const n=this._getConnection();n.body=JSON.stringify(r),n.setHeader("content-type","application/json");const i=await n.send();i.assertOk();let o=i.bodyJson;return Array.isArray(o)||(o=[o]),o}}Vh=new WeakMap;function G7(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&Tr(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=G7(t[e]);if(r)return r}return null}if(typeof t=="string")try{return G7(JSON.parse(t))}catch{}return null}function V7(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)V7(t[r],e);if(typeof t=="string")try{return V7(JSON.parse(t),e)}catch{}}}function Wge(t){const e=[];return V7(t,e),e}var Kh;class Jge extends SH{constructor(r,n){super(n,{batchMaxCount:1});Ne(this,Kh,void 0);ce(this,Kh,async(i,o)=>{const s={method:i,params:o};this.emit("debug",{action:"sendEip1193Request",payload:s});try{const f=await r.request(s);return this.emit("debug",{action:"receiveEip1193Result",result:f}),f}catch(f){const d=new Error(f.message);throw d.code=f.code,d.data=f.data,d.payload=s,this.emit("debug",{action:"receiveEip1193Error",error:d}),d}})}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){_e(!Array.isArray(r),"EIP-1193 does not support batch request","payload",r);try{const n=await X(this,Kh).call(this,r.method,r.params||[]);return[{id:r.id,result:n}]}catch(n){return[{id:r.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(r,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(r,n)}async hasSigner(r){r==null&&(r=0);const n=await this.send("eth_accounts",[]);return typeof r=="number"?n.length>r:(r=r.toLowerCase(),n.filter(i=>i.toLowerCase()===r).length!==0)}async getSigner(r){if(r==null&&(r=0),!await this.hasSigner(r))try{await X(this,Kh).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(r)}}Kh=new WeakMap;var _H={},P6={},PH={},Yb={},Qb={};const Zge="@safe-global/safe-apps-sdk",Yge="8.0.0",Qge="SDK developed to integrate third-party apps with Safe app.",Xge="dist/src/index.js",ebe="dist/src/index.d.ts",tbe=["dist/**/*","src/**/*","CHANGELOG.md","README.md"],rbe=["Safe","sdk","apps"],nbe={test:"jest","format-dist":`sed -i 's/"files":/"_files":/' dist/package.json`,build:"yarn rimraf dist && tsc && yarn format-dist"},ibe="Safe (https://safe.global)",obe="MIT",sbe={"@safe-global/safe-gateway-typescript-sdk":"^3.5.3",viem:"^1.0.0"},abe={rimraf:"^3.0.2"},fbe={type:"git",url:"git+https://github.com/safe-global/safe-apps-sdk.git"},cbe={url:"https://github.com/safe-global/safe-apps-sdk/issues"},ube="https://github.com/safe-global/safe-apps-sdk#readme",lbe={access:"public"},dbe={name:Zge,version:Yge,description:Qge,main:Xge,typings:ebe,_files:tbe,keywords:rbe,scripts:nbe,author:ibe,license:obe,dependencies:sbe,devDependencies:abe,repository:fbe,bugs:cbe,homepage:ube,publishConfig:lbe};var hbe=et&&et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qb,"__esModule",{value:!0});Qb.getSDKVersion=void 0;const pbe=hbe(dbe),mbe=()=>pbe.default.version.split("-")[0];Qb.getSDKVersion=mbe;var rx={};Object.defineProperty(rx,"__esModule",{value:!0});rx.generateRequestId=void 0;const gbe=t=>t.toString(16).padStart(2,"0"),bbe=t=>{const e=new Uint8Array((t||40)/2);return window.crypto.getRandomValues(e),Array.from(e,gbe).join("")},ybe=()=>typeof window<"u"?bbe(10):new Date().getTime().toString(36);rx.generateRequestId=ybe;Object.defineProperty(Yb,"__esModule",{value:!0});Yb.MessageFormatter=void 0;const vbe=Qb,wbe=rx;class nx{}Yb.MessageFormatter=nx;nx.makeRequest=(t,e)=>({id:(0,wbe.generateRequestId)(),method:t,params:e,env:{sdkVersion:(0,vbe.getSDKVersion)()}});nx.makeResponse=(t,e,r)=>({id:t,success:!0,version:r,data:e});nx.makeErrorResponse=(t,e,r)=>({id:t,success:!1,error:e,version:r});var Tl={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RestrictedMethods=t.Methods=void 0,function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"}(t.Methods||(t.Methods={})),function(e){e.requestAddressBook="requestAddressBook"}(t.RestrictedMethods||(t.RestrictedMethods={}))})(Tl);(function(t){var e=et&&et.__createBinding||(Object.create?function(o,s,f,d){d===void 0&&(d=f);var p=Object.getOwnPropertyDescriptor(s,f);(!p||("get"in p?!s.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return s[f]}}),Object.defineProperty(o,d,p)}:function(o,s,f,d){d===void 0&&(d=f),o[d]=s[f]}),r=et&&et.__exportStar||function(o,s){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(s,f)&&e(s,o,f)};Object.defineProperty(t,"__esModule",{value:!0});const n=Yb;class i{constructor(s=null,f=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:d,data:p,source:b})=>{const v=!p,A=!this.isServer&&b===window.parent,S=(typeof p.version<"u"&&parseInt(p.version.split(".")[0]))>=1;let P=!0;return Array.isArray(this.allowedOrigins)&&(P=this.allowedOrigins.find(I=>I.test(d))!==void 0),!v&&A&&S&&P},this.logIncomingMessage=d=>{console.info(`Safe Apps SDK v1: A message was received from origin ${d.origin}. `,d.data)},this.onParentMessage=d=>{this.isValidMessage(d)&&(this.debugMode&&this.logIncomingMessage(d),this.handleIncomingMessage(d.data))},this.handleIncomingMessage=d=>{const{id:p}=d,b=this.callbacks.get(p);b&&(b(d),this.callbacks.delete(p))},this.send=(d,p)=>{const b=n.MessageFormatter.makeRequest(d,p);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(b,"*"),new Promise((v,A)=>{this.callbacks.set(b.id,_=>{if(!_.success){A(new Error(_.error));return}v(_)})})},this.allowedOrigins=s,this.debugMode=f,this.isServer||window.addEventListener("message",this.onParentMessage)}}t.default=i,r(Tl,t)})(PH);var ix={},ox={},sx={};Object.defineProperty(sx,"__esModule",{value:!0});sx.isObjectEIP712TypedData=void 0;const xbe=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;sx.isObjectEIP712TypedData=xbe;var CH={};Object.defineProperty(CH,"__esModule",{value:!0});var IH={},TH={},Mp={},u0={},K7={exports:{}};(function(t,e){var r=typeof self<"u"?self:et,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(s){var f={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function d(l){return l&&DataView.prototype.isPrototypeOf(l)}if(f.arrayBuffer)var p=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(l){return l&&p.indexOf(Object.prototype.toString.call(l))>-1};function v(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(l))throw new TypeError("Invalid character in header field name");return l.toLowerCase()}function A(l){return typeof l!="string"&&(l=String(l)),l}function _(l){var h={next:function(){var m=l.shift();return{done:m===void 0,value:m}}};return f.iterable&&(h[Symbol.iterator]=function(){return h}),h}function S(l){this.map={},l instanceof S?l.forEach(function(h,m){this.append(m,h)},this):Array.isArray(l)?l.forEach(function(h){this.append(h[0],h[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(h){this.append(h,l[h])},this)}S.prototype.append=function(l,h){l=v(l),h=A(h);var m=this.map[l];this.map[l]=m?m+", "+h:h},S.prototype.delete=function(l){delete this.map[v(l)]},S.prototype.get=function(l){return l=v(l),this.has(l)?this.map[l]:null},S.prototype.has=function(l){return this.map.hasOwnProperty(v(l))},S.prototype.set=function(l,h){this.map[v(l)]=A(h)},S.prototype.forEach=function(l,h){for(var m in this.map)this.map.hasOwnProperty(m)&&l.call(h,this.map[m],m,this)},S.prototype.keys=function(){var l=[];return this.forEach(function(h,m){l.push(m)}),_(l)},S.prototype.values=function(){var l=[];return this.forEach(function(h){l.push(h)}),_(l)},S.prototype.entries=function(){var l=[];return this.forEach(function(h,m){l.push([m,h])}),_(l)},f.iterable&&(S.prototype[Symbol.iterator]=S.prototype.entries);function P(l){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}function I(l){return new Promise(function(h,m){l.onload=function(){h(l.result)},l.onerror=function(){m(l.error)}})}function C(l){var h=new FileReader,m=I(h);return h.readAsArrayBuffer(l),m}function T(l){var h=new FileReader,m=I(h);return h.readAsText(l),m}function k(l){for(var h=new Uint8Array(l),m=new Array(h.length),w=0;w-1?h:l}function Y(l,h){h=h||{};var m=h.body;if(l instanceof Y){if(l.bodyUsed)throw new TypeError("Already read");this.url=l.url,this.credentials=l.credentials,h.headers||(this.headers=new S(l.headers)),this.method=l.method,this.mode=l.mode,this.signal=l.signal,!m&&l._bodyInit!=null&&(m=l._bodyInit,l.bodyUsed=!0)}else this.url=String(l);if(this.credentials=h.credentials||this.credentials||"same-origin",(h.headers||!this.headers)&&(this.headers=new S(h.headers)),this.method=V(h.method||this.method||"GET"),this.mode=h.mode||this.mode||null,this.signal=h.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&m)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(m)}Y.prototype.clone=function(){return new Y(this,{body:this._bodyInit})};function W(l){var h=new FormData;return l.trim().split("&").forEach(function(m){if(m){var w=m.split("="),E=w.shift().replace(/\+/g," "),y=w.join("=").replace(/\+/g," ");h.append(decodeURIComponent(E),decodeURIComponent(y))}}),h}function ie(l){var h=new S,m=l.replace(/\r?\n[\t ]+/g," ");return m.split(/\r?\n/).forEach(function(w){var E=w.split(":"),y=E.shift().trim();if(y){var c=E.join(":").trim();h.append(y,c)}}),h}D.call(Y.prototype);function x(l,h){h||(h={}),this.type="default",this.status=h.status===void 0?200:h.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in h?h.statusText:"OK",this.headers=new S(h.headers),this.url=h.url||"",this._initBody(l)}D.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new S(this.headers),url:this.url})},x.error=function(){var l=new x(null,{status:0,statusText:""});return l.type="error",l};var a=[301,302,303,307,308];x.redirect=function(l,h){if(a.indexOf(h)===-1)throw new RangeError("Invalid status code");return new x(null,{status:h,headers:{location:l}})},s.DOMException=o.DOMException;try{new s.DOMException}catch{s.DOMException=function(h,m){this.message=h,this.name=m;var w=Error(h);this.stack=w.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function u(l,h){return new Promise(function(m,w){var E=new Y(l,h);if(E.signal&&E.signal.aborted)return w(new s.DOMException("Aborted","AbortError"));var y=new XMLHttpRequest;function c(){y.abort()}y.onload=function(){var g={status:y.status,statusText:y.statusText,headers:ie(y.getAllResponseHeaders()||"")};g.url="responseURL"in y?y.responseURL:g.headers.get("X-Request-URL");var M="response"in y?y.response:y.responseText;m(new x(M,g))},y.onerror=function(){w(new TypeError("Network request failed"))},y.ontimeout=function(){w(new TypeError("Network request failed"))},y.onabort=function(){w(new s.DOMException("Aborted","AbortError"))},y.open(E.method,E.url,!0),E.credentials==="include"?y.withCredentials=!0:E.credentials==="omit"&&(y.withCredentials=!1),"responseType"in y&&f.blob&&(y.responseType="blob"),E.headers.forEach(function(g,M){y.setRequestHeader(M,g)}),E.signal&&(E.signal.addEventListener("abort",c),y.onreadystatechange=function(){y.readyState===4&&E.signal.removeEventListener("abort",c)}),y.send(typeof E._bodyInit>"u"?null:E._bodyInit)})}return u.polyfill=!0,o.fetch||(o.fetch=u,o.Headers=S,o.Request=Y,o.Response=x),s.Headers=S,s.Request=Y,s.Response=x,s.fetch=u,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(K7,K7.exports);var Ebe=K7.exports,Abe=et&&et.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})},Sbe=et&&et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(u0,"__esModule",{value:!0});u0.fetchData=u0.stringifyQuery=u0.insertParams=void 0;const Mbe=Sbe(Ebe),_be=t=>typeof t=="object"&&t!==null&&"code"in t&&"message"in t;function Pbe(t,e,r){return t.replace(new RegExp(`\\{${e}\\}`,"g"),r)}function Cbe(t,e){return e?Object.keys(e).reduce((r,n)=>Pbe(r,n,String(e[n])),t):t}u0.insertParams=Cbe;function Ibe(t){if(!t)return"";const e=new URLSearchParams;Object.keys(t).forEach(n=>{t[n]!=null&&e.append(n,String(t[n]))});const r=e.toString();return r?`?${r}`:""}u0.stringifyQuery=Ibe;function Tbe(t,e){return Abe(this,void 0,void 0,function*(){let r;e!=null&&(r={method:"POST",body:typeof e=="string"?e:JSON.stringify(e),headers:{"Content-Type":"application/json"}});const n=yield(0,Mbe.default)(t,r);let i;try{i=yield n.json()}catch{if(n.headers&&n.headers.get("content-length")!=="0")throw new Error(`Invalid response content: ${n.statusText}`)}if(!n.ok){const o=_be(i)?`${i.code}: ${i.message}`:n.statusText;throw new Error(o)}return i})}u0.fetchData=Tbe;Object.defineProperty(Mp,"__esModule",{value:!0});Mp.getEndpoint=Mp.postEndpoint=void 0;const kg=u0;function RH(t,e,r,n){const i=(0,kg.insertParams)(e,r),o=(0,kg.stringifyQuery)(n);return`${t}${i}${o}`}function Rbe(t,e,r){const n=RH(t,e,r==null?void 0:r.path,r==null?void 0:r.query);return(0,kg.fetchData)(n,r==null?void 0:r.body)}Mp.postEndpoint=Rbe;function kbe(t,e,r,n){if(n)return(0,kg.fetchData)(n);const i=RH(t,e,r==null?void 0:r.path,r==null?void 0:r.query);return(0,kg.fetchData)(i)}Mp.getEndpoint=kbe;var ax={};Object.defineProperty(ax,"__esModule",{value:!0});ax.DEFAULT_BASE_URL=void 0;ax.DEFAULT_BASE_URL="https://safe-client.safe.global";var kH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationVersionState=void 0,function(e){e.UP_TO_DATE="UP_TO_DATE",e.OUTDATED="OUTDATED",e.UNKNOWN="UNKNOWN"}(t.ImplementationVersionState||(t.ImplementationVersionState={}))})(kH);var BH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppSocialPlatforms=t.SafeAppFeatures=t.SafeAppAccessPolicyTypes=void 0,function(e){e.NoRestrictions="NO_RESTRICTIONS",e.DomainAllowlist="DOMAIN_ALLOWLIST"}(t.SafeAppAccessPolicyTypes||(t.SafeAppAccessPolicyTypes={})),function(e){e.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(t.SafeAppFeatures||(t.SafeAppFeatures={})),function(e){e.TWITTER="TWITTER",e.GITHUB="GITHUB",e.DISCORD="DISCORD"}(t.SafeAppSocialPlatforms||(t.SafeAppSocialPlatforms={}))})(BH);var OH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LabelValue=t.DetailedExecutionInfoType=t.TransactionListItemType=t.ConflictType=t.TransactionInfoType=t.SettingsInfoType=t.TransactionTokenType=t.TransferDirection=t.TransactionStatus=t.Operation=void 0,function(e){e[e.CALL=0]="CALL",e[e.DELEGATE=1]="DELEGATE"}(t.Operation||(t.Operation={})),function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS"}(t.TransactionStatus||(t.TransactionStatus={})),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(t.TransferDirection||(t.TransferDirection={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(t.TransactionTokenType||(t.TransactionTokenType={})),function(e){e.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",e.ADD_OWNER="ADD_OWNER",e.REMOVE_OWNER="REMOVE_OWNER",e.SWAP_OWNER="SWAP_OWNER",e.CHANGE_THRESHOLD="CHANGE_THRESHOLD",e.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",e.ENABLE_MODULE="ENABLE_MODULE",e.DISABLE_MODULE="DISABLE_MODULE",e.SET_GUARD="SET_GUARD",e.DELETE_GUARD="DELETE_GUARD"}(t.SettingsInfoType||(t.SettingsInfoType={})),function(e){e.TRANSFER="Transfer",e.SETTINGS_CHANGE="SettingsChange",e.CUSTOM="Custom",e.CREATION="Creation"}(t.TransactionInfoType||(t.TransactionInfoType={})),function(e){e.NONE="None",e.HAS_NEXT="HasNext",e.END="End"}(t.ConflictType||(t.ConflictType={})),function(e){e.TRANSACTION="TRANSACTION",e.LABEL="LABEL",e.CONFLICT_HEADER="CONFLICT_HEADER",e.DATE_LABEL="DATE_LABEL"}(t.TransactionListItemType||(t.TransactionListItemType={})),function(e){e.MULTISIG="MULTISIG",e.MODULE="MODULE"}(t.DetailedExecutionInfoType||(t.DetailedExecutionInfoType={})),function(e){e.Queued="Queued",e.Next="Next"}(t.LabelValue||(t.LabelValue={}))})(OH);var NH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.FEATURES=t.GAS_PRICE_TYPE=t.RPC_AUTHENTICATION=void 0,function(e){e.API_KEY_PATH="API_KEY_PATH",e.NO_AUTHENTICATION="NO_AUTHENTICATION",e.UNKNOWN="UNKNOWN"}(t.RPC_AUTHENTICATION||(t.RPC_AUTHENTICATION={})),function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.UNKNOWN="UNKNOWN"}(t.GAS_PRICE_TYPE||(t.GAS_PRICE_TYPE={})),function(e){e.ERC721="ERC721",e.SAFE_APPS="SAFE_APPS",e.CONTRACT_INTERACTION="CONTRACT_INTERACTION",e.DOMAIN_LOOKUP="DOMAIN_LOOKUP",e.SPENDING_LIMIT="SPENDING_LIMIT",e.EIP1559="EIP1559",e.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",e.TX_SIMULATION="TX_SIMULATION",e.EIP1271="EIP1271"}(t.FEATURES||(t.FEATURES={}))})(NH);var LH={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenType=void 0,function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_TOKEN="NATIVE_TOKEN"}(t.TokenType||(t.TokenType={}))})(LH);var DH={};Object.defineProperty(DH,"__esModule",{value:!0});var FH={};Object.defineProperty(FH,"__esModule",{value:!0});var $H={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SafeMessageStatus=t.SafeMessageListItemType=void 0,function(e){e.DATE_LABEL="DATE_LABEL",e.MESSAGE="MESSAGE"}(t.SafeMessageListItemType||(t.SafeMessageListItemType={})),function(e){e.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",e.CONFIRMED="CONFIRMED"}(t.SafeMessageStatus||(t.SafeMessageStatus={}))})($H);(function(t){var e=et&&et.__createBinding||(Object.create?function(l,h,m,w){w===void 0&&(w=m);var E=Object.getOwnPropertyDescriptor(h,m);(!E||("get"in E?!h.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(l,w,E)}:function(l,h,m,w){w===void 0&&(w=m),l[w]=h[m]}),r=et&&et.__exportStar||function(l,h){for(var m in l)m!=="default"&&!Object.prototype.hasOwnProperty.call(h,m)&&e(h,l,m)};Object.defineProperty(t,"__esModule",{value:!0}),t.confirmSafeMessage=t.proposeSafeMessage=t.getSafeMessage=t.getSafeMessages=t.getDecodedData=t.getMasterCopies=t.getSafeApps=t.getChainConfig=t.getChainsConfig=t.proposeTransaction=t.postSafeGasEstimation=t.getTransactionDetails=t.getTransactionQueue=t.getTransactionHistory=t.getCollectiblesPage=t.getCollectibles=t.getOwnedSafes=t.getFiatCurrencies=t.getBalances=t.getMultisigTransactions=t.getModuleTransactions=t.getIncomingTransfers=t.getSafeInfo=t.setBaseUrl=void 0;const n=Mp,i=ax;r(kH,t),r(BH,t),r(OH,t),r(NH,t),r(LH,t),r(DH,t),r(FH,t),r($H,t);let o=i.DEFAULT_BASE_URL;const s=l=>{o=l};t.setBaseUrl=s;function f(l,h){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:l,address:h}})}t.getSafeInfo=f;function d(l,h,m,w){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:l,address:h},query:m},w)}t.getIncomingTransfers=d;function p(l,h,m,w){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:l,address:h},query:m},w)}t.getModuleTransactions=p;function b(l,h,m,w){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:l,address:h},query:m},w)}t.getMultisigTransactions=b;function v(l,h,m="usd",w={}){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:l,address:h,currency:m},query:w})}t.getBalances=v;function A(){return(0,n.getEndpoint)(o,"/v1/balances/supported-fiat-codes")}t.getFiatCurrencies=A;function _(l,h){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:l,address:h}})}t.getOwnedSafes=_;function S(l,h,m={}){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:l,address:h},query:m})}t.getCollectibles=S;function P(l,h,m={},w){return(0,n.getEndpoint)(o,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:l,address:h},query:m},w)}t.getCollectiblesPage=P;function I(l,h,m){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:l,safe_address:h},query:{}},m)}t.getTransactionHistory=I;function C(l,h,m,w){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:l,safe_address:h},query:{trusted:w}},m)}t.getTransactionQueue=C;function T(l,h){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:l,transactionId:h}})}t.getTransactionDetails=T;function k(l,h,m){return(0,n.postEndpoint)(o,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:l,safe_address:h},body:m})}t.postSafeGasEstimation=k;function O(l,h,m){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:l,safe_address:h},body:m})}t.proposeTransaction=O;function D(l){return(0,n.getEndpoint)(o,"/v1/chains",{query:l})}t.getChainsConfig=D;function U(l){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}",{path:{chainId:l}})}t.getChainConfig=U;function V(l,h={}){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safe-apps",{path:{chainId:l},query:h})}t.getSafeApps=V;function Y(l){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:l}})}t.getMasterCopies=Y;function W(l,h){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/data-decoder",{path:{chainId:l},body:{data:h}})}t.getDecodedData=W;function ie(l,h,m){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:l,safe_address:h},query:{}},m)}t.getSafeMessages=ie;function x(l,h){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:l,message_hash:h}})}t.getSafeMessage=x;function a(l,h,m){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:l,safe_address:h},body:m})}t.proposeSafeMessage=a;function u(l,h,m){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:l,message_hash:h},body:m})}t.confirmSafeMessage=u})(TH);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TransferDirection=t.TransactionStatus=t.TokenType=t.Operation=void 0;var e=TH;Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return e.Operation}}),Object.defineProperty(t,"TokenType",{enumerable:!0,get:function(){return e.TokenType}}),Object.defineProperty(t,"TransactionStatus",{enumerable:!0,get:function(){return e.TransactionStatus}}),Object.defineProperty(t,"TransferDirection",{enumerable:!0,get:function(){return e.TransferDirection}})})(IH);var UH={};Object.defineProperty(UH,"__esModule",{value:!0});(function(t){var e=et&&et.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var f=Object.getOwnPropertyDescriptor(i,o);(!f||("get"in f?!i.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,f)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=et&&et.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(sx,t),r(CH,t),r(IH,t),r(UH,t)})(ox);Object.defineProperty(ix,"__esModule",{value:!0});ix.TXs=void 0;const ov=Tl,Bbe=ox;class Obe{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(ov.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const r={message:e};return(await this.communicator.send(ov.Methods.signMessage,r)).data}async signTypedMessage(e){if(!(0,Bbe.isObjectEIP712TypedData)(e))throw new Error("Invalid typed data");return(await this.communicator.send(ov.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:r}){if(!e||!e.length)throw new Error("No transactions were passed");const n={txs:e,params:r};return(await this.communicator.send(ov.Methods.sendTransactions,n)).data}}ix.TXs=Obe;var fx={},Xb={};Object.defineProperty(Xb,"__esModule",{value:!0});Xb.RPC_CALLS=void 0;Xb.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"};Object.defineProperty(fx,"__esModule",{value:!0});fx.Eth=void 0;const Hi=Xb,Nbe=Tl,Za={defaultBlockParam:(t="latest")=>t,returnFullTxObjectParam:(t=!1)=>t,blockNumberToHex:t=>Number.isInteger(t)?`0x${t.toString(16)}`:t};class Lbe{constructor(e){this.communicator=e,this.call=this.buildRequest({call:Hi.RPC_CALLS.eth_call,formatters:[null,Za.defaultBlockParam]}),this.getBalance=this.buildRequest({call:Hi.RPC_CALLS.eth_getBalance,formatters:[null,Za.defaultBlockParam]}),this.getCode=this.buildRequest({call:Hi.RPC_CALLS.eth_getCode,formatters:[null,Za.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:Hi.RPC_CALLS.eth_getStorageAt,formatters:[null,Za.blockNumberToHex,Za.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:Hi.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:Hi.RPC_CALLS.eth_getBlockByHash,formatters:[null,Za.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:Hi.RPC_CALLS.eth_getBlockByNumber,formatters:[Za.blockNumberToHex,Za.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:Hi.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:Hi.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:Hi.RPC_CALLS.eth_getTransactionCount,formatters:[null,Za.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:Hi.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=r=>this.buildRequest({call:Hi.RPC_CALLS.eth_estimateGas})([r]),this.setSafeSettings=this.buildRequest({call:Hi.RPC_CALLS.safe_setSettings})}buildRequest(e){const{call:r,formatters:n}=e;return async i=>{n&&Array.isArray(i)&&n.forEach((f,d)=>{f&&(i[d]=f(i[d]))});const o={call:r,params:i||[]};return(await this.communicator.send(Nbe.Methods.rpcCall,o)).data}}}fx.Eth=Lbe;var cx={};const Dbe="0.9.8";let yi=class W7 extends Error{constructor(e,r={}){var s;const n=r.cause instanceof W7?r.cause.details:(s=r.cause)!=null&&s.message?r.cause.message:r.details,i=r.cause instanceof W7&&r.cause.docsPath||r.docsPath,o=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${Dbe}`].join(` +`);super(o),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}};function j0(t,e){const r=t.exec(e);return r==null?void 0:r.groups}const zH=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,jH=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,HH=/^\(.+?\).*?$/,Rk=/^tuple(?(\[(\d*)\])*)$/;function J7(t){let e=t.type;if(Rk.test(t.type)&&"components"in t){e="(";const r=t.components.length;for(let i=0;i[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function $be(t){return qH.test(t)}function Ube(t){return j0(qH,t)}const GH=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function zbe(t){return GH.test(t)}function jbe(t){return j0(GH,t)}const VH=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;function Hbe(t){return VH.test(t)}function qbe(t){return j0(VH,t)}const KH=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;function ey(t){return KH.test(t)}function Gbe(t){return j0(KH,t)}const WH=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;function Vbe(t){return WH.test(t)}function Kbe(t){return j0(WH,t)}const Wbe=/^fallback\(\)$/;function Jbe(t){return Wbe.test(t)}const Zbe=/^receive\(\) external payable$/;function Ybe(t){return Zbe.test(t)}const C6=new Set(["memory","indexed","storage","calldata"]),Qbe=new Set(["indexed"]),Z7=new Set(["calldata","memory","storage"]);class JH extends yi{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class ZH extends yi{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class Xbe extends yi{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class YH extends yi{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}class QH extends yi{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class XH extends yi{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class eq extends yi{constructor({param:e,name:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class tq extends yi{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class rq extends yi{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class nq extends yi{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class Rd extends yi{constructor({signature:e,type:r}){super(`Invalid ${r} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class iq extends yi{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class oq extends yi{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class sq extends yi{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class aq extends yi{constructor({current:e,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function eye(t,e){return e?`${e}:${t}`:t}const t4=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Y7(t,e={}){if(Hbe(t)){const r=qbe(t);if(!r)throw new Rd({signature:t,type:"function"});const n=ro(r.parameters),i=[],o=n.length;for(let f=0;f[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,rye=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,nye=/^u?int$/;function ks(t,e){var v,A;const r=eye(t,e==null?void 0:e.type);if(t4.has(r))return t4.get(r);const n=HH.test(t),i=j0(n?rye:tye,t);if(!i)throw new XH({param:t});if(i.name&&oye(i.name))throw new eq({param:t,name:i.name});const o=i.name?{name:i.name}:{},s=i.modifier==="indexed"?{indexed:!0}:{},f=(e==null?void 0:e.structs)??{};let d,p={};if(n){d="tuple";const _=ro(i.type),S=[],P=_.length;for(let I=0;I[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function cq(t,e,r=new Set){const n=[],i=t.length;for(let o=0;o{var i;return((i=t[e.name||r])==null?void 0:i.call(t,n))??e(t,n)}}function Qs(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new wq(t.type);return`${t.name}(${lx(t.inputs,{includeName:e})})`}function lx(t,{includeName:e=!1}={}){return t?t.map(r=>dye(r,{includeName:e})).join(e?", ":","):""}function dye(t,{includeName:e}){return t.type.startsWith("tuple")?`(${lx(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}function jt(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function Wr(t){return jt(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const hye="1.19.12",pye=t=>t,m1=t=>t,mye=()=>`viem@${hye}`;class qe extends Error{constructor(e,r={}){var o;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:mye()});const n=r.cause instanceof qe?r.cause.details:(o=r.cause)!=null&&o.message?r.cause.message:r.details,i=r.cause instanceof qe&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` `),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return uq(this,e)}}function uq(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?uq(t.cause,e):e?null:t}class t_ extends qe{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` -`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class kg extends qe{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class Bg extends qe{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` `),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class gye extends qe{constructor({data:e,size:r}){super([`Data size of ${r} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(` `),{metaMessages:[`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeInvalidError"})}}class dx extends qe{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` `),{metaMessages:[`Params: (${lx(r,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}}class ty extends qe{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class lq extends qe{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(` @@ -144,18 +144,18 @@ use chrome, FireFox or Internet Explorer 11`)}var sj=Bt,_R=i1,aj=sj.Buffer,fj=sj `),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class yq extends qe{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` `),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class vq extends qe{constructor(e){super([`Value "${e}" is not a valid array.`].join(` `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class wq extends qe{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}class xq extends qe{constructor(e){super(`Type "${e}" is not supported for packed encoding.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedPackedAbiType"})}}class Eq extends qe{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}class s_ extends qe{constructor({offset:e,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class a_ extends qe{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}function zs(t,{dir:e,size:r=32}={}){return typeof t=="string"?js(t,{dir:e,size:r}):Aq(t,{dir:e,size:r})}function js(t,{dir:e,size:r=32}={}){if(r===null)return t;const n=t.replace("0x","");if(n.length>r*2)throw new a_({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function Aq(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new a_({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;ie)throw new Cq({givenSize:Wr(t),maxSize:e})}function xye(t,e){const r=typeof e=="string"?{to:e}:e,n=r.to;return n==="number"?rr(t,r):n==="bigint"?Sr(t,r):n==="string"?c_(t,r):n==="boolean"?f_(t,r):ic(t,r)}function Sr(t,e={}){const{signed:r}=e;e.size&&us(t,{size:e.size});const n=BigInt(t);if(!r)return n;const i=(t.length-2)/2,o=(1n<e.toString(16).padStart(2,"0"));function Ft(t,e={}){return typeof t=="number"||typeof t=="bigint"?ht(t,e):typeof t=="string"?ry(t,e):typeof t=="boolean"?hx(t,e):$i(t,e)}function hx(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(us(r,{size:e.size}),zs(r,{size:e.size})):r}function $i(t,e={}){let r="";for(let i=0;io||i=Ya.zero&&t<=Ya.nine)return t-Ya.zero;if(t>=Ya.A&&t<=Ya.F)return t-(Ya.A-10);if(t>=Ya.a&&t<=Ya.f)return t-(Ya.a-10)}function ic(t,e={}){let r=t;e.size&&(us(r,{size:e.size}),r=zs(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,o=new Uint8Array(i);for(let s=0,f=0;s{const e=(()=>typeof t=="string"?t:Fbe(t))();return Mye(e)},Rq=t=>u_(t);function I6(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function l_(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function _ye(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");I6(t.outputLen),I6(t.blockLen)}function _p(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function kq(t,e){l_(t);const r=e.outputLen;if(t.length>Bk&sv)}:{h:Number(t>>Bk&sv)|0,l:Number(t&sv)|0}}function Cye(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;it<>>32-r,Tye=(t,e,r)=>e<>>32-r,Rye=(t,e,r)=>e<>>64-r,kye=(t,e,r)=>t<>>64-r,r4=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Bq=t=>t instanceof Uint8Array,Bye=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),n4=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),la=(t,e)=>t<<32-e|t>>>e,Oye=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Oye)throw new Error("Non little-endian hardware is not supported");function Nye(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function px(t){if(typeof t=="string"&&(t=Nye(t)),!Bq(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function Lye(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!Bq(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class d_{clone(){return this._cloneInto()}}function Oq(t){const e=n=>t().update(px(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Nq(t=32){if(r4&&typeof r4.getRandomValues=="function")return r4.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}const[Lq,Dq,Fq]=[[],[],[]],Dye=BigInt(0),X1=BigInt(1),Fye=BigInt(2),$ye=BigInt(7),Uye=BigInt(256),zye=BigInt(113);for(let t=0,e=X1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],Lq.push(2*(5*n+r)),Dq.push((t+1)*(t+2)/2%64);let i=Dye;for(let o=0;o<7;o++)e=(e<>$ye)*zye)%Uye,e&Fye&&(i^=X1<<(X1<r>32?Rye(t,e,r):Iye(t,e,r),Nk=(t,e,r)=>r>32?kye(t,e,r):Tye(t,e,r);function qye(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let s=0;s<10;s++)r[s]=t[s]^t[s+10]^t[s+20]^t[s+30]^t[s+40];for(let s=0;s<10;s+=2){const f=(s+8)%10,d=(s+2)%10,p=r[d],b=r[d+1],v=Ok(p,b,1)^r[f],A=Nk(p,b,1)^r[f+1];for(let _=0;_<50;_+=10)t[s+_]^=v,t[s+_+1]^=A}let i=t[2],o=t[3];for(let s=0;s<24;s++){const f=Dq[s],d=Ok(i,o,f),p=Nk(i,o,f),b=Lq[s];i=t[b],o=t[b+1],t[b]=d,t[b+1]=p}for(let s=0;s<50;s+=10){for(let f=0;f<10;f++)r[f]=t[s+f];for(let f=0;f<10;f++)t[s+f]^=~r[(f+2)%10]&r[(f+4)%10]}t[0]^=jye[n],t[1]^=Hye[n]}r.fill(0)}class h_ extends d_{constructor(e,r,n,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,I6(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Bye(this.state)}keccak(){qye(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){_p(this);const{blockLen:r,state:n}=this;e=px(e);const i=e.length;for(let o=0;o=n&&this.keccak();const s=Math.min(n-this.posOut,o-i);e.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return I6(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(kq(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return e||(e=new h_(r,n,i,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=i,e.enableXOF=s,e.destroyed=this.destroyed,e}}const Gye=(t,e,r)=>Oq(()=>new h_(e,t,r)),Vye=Gye(1,136,256/8);function Ur(t,e){const r=e||"hex",n=Vye(jt(t,{strict:!1})?Jn(t):t);return r==="bytes"?n:Ft(n)}const Kye=t=>Ur(Jn(t)),mx=t=>Kye(Rq(t));class ei extends qe{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const Wye=/^0x[a-fA-F0-9]{40}$/;function tn(t){return Wye.test(t)}function Zo(t){return typeof t[0]=="string"?Va(t):$q(t)}function $q(t){let e=0;for(const i of t)e+=i.length;const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function Va(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}function Ar(t,e,r,{strict:n}={}){return jt(t,{strict:!1})?p_(t,e,r,{strict:n}):jq(t,e,r,{strict:n})}function Uq(t,e){if(typeof e=="number"&&e>0&&e>Wr(t)-1)throw new s_({offset:e,position:"start",size:Wr(t)})}function zq(t,e,r){if(typeof e=="number"&&typeof r=="number"&&Wr(t)!==r-e)throw new s_({offset:r,position:"end",size:Wr(t)})}function jq(t,e,r,{strict:n}={}){Uq(t,e);const i=t.slice(e,r);return n&&zq(i,e,r),i}function p_(t,e,r,{strict:n}={}){Uq(t,e);const i=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&zq(i,e,r),i}function oc(t,e){if(t.length!==e.length)throw new r_({expectedLength:t.length,givenLength:e.length});const r=Jye({params:t,values:e}),n=g_(r);return n.length===0?"0x":n}function Jye({params:t,values:e}){const r=[];for(let n=0;n0?Zo([f,s]):f}}if(i)return{dynamic:!0,encoded:s}}return{dynamic:!1,encoded:Zo(o.map(({encoded:s})=>s))}}function Qye(t,{param:e}){const[,r]=e.type.split("bytes"),n=Wr(t);if(!r){let i=t;return n%32!==0&&(i=js(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:Zo([js(ht(n,{size:32})),i])}}if(n!==parseInt(r))throw new dq({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:js(t,{dir:"right"})}}function Xye(t){return{dynamic:!1,encoded:js(hx(t))}}function eve(t,{signed:e}){return{dynamic:!1,encoded:ht(t,{size:32,signed:e})}}function tve(t){const e=ry(t),r=Math.ceil(Wr(e)/32),n=[];for(let i=0;ii))}}function gx(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const nve=t=>Ur(Jn(t)),m1=t=>Ar(nve(u_(t)),0,4);function H0({abi:t,args:e=[],name:r}){const n=jt(r,{strict:!1}),i=t.filter(s=>n?s.type==="function"?m1(s)===r:s.type==="event"?mx(s)===r:!1:"name"in s&&s.name===r);if(i.length===0)return;if(i.length===1)return i[0];let o;for(const s of i){if(!("inputs"in s))continue;if(!e||e.length===0){if(!s.inputs||s.inputs.length===0)return s;continue}if(!s.inputs||s.inputs.length===0||s.inputs.length!==e.length)continue;if(e.every((d,p)=>{const b="inputs"in s&&s.inputs[p];return b?eE(d,b):!1})){if(o&&"inputs"in o&&o.inputs){const d=Hq(s.inputs,o.inputs,e);if(d)throw new bye({abiItem:s,type:d[0]},{abiItem:o,type:d[1]})}o=s}}return o||i[0]}function eE(t,e){const r=typeof t,n=e.type;switch(n){case"address":return tn(t);case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((i,o)=>eE(Object.values(t)[o],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(i=>eE(i,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Hq(t,e,r){for(const n in t){const i=t[n],o=e[n];if(i.type==="tuple"&&o.type==="tuple"&&"components"in i&&"components"in o)return Hq(i.components,o.components,r[n]);const s=[i.type,o.type];if((()=>s.includes("address")&&s.includes("bytes20")?!0:s.includes("address")&&s.includes("string")||s.includes("address")&&s.includes("bytes")?tn(r[n]):!1)())return s}}function g1({abi:t,eventName:e,args:r}){var f;let n=t[0];if(e&&(n=H0({abi:t,args:r,name:e}),!n))throw new X7(e,{docsPath:"/docs/contract/encodeEventTopics"});if(n.type!=="event")throw new X7(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const i=Qs(n),o=mx(i);let s=[];if(r&&"inputs"in n){const d=(f=n.inputs)==null?void 0:f.filter(b=>"indexed"in b&&b.indexed),p=Array.isArray(r)?r:Object.values(r).length>0?(d==null?void 0:d.map(b=>r[b.name]))??[]:[];p.length>0&&(s=(d==null?void 0:d.map((b,v)=>Array.isArray(p[v])?p[v].map((A,_)=>Lk({param:b,value:p[v][_]})):p[v]?Lk({param:b,value:p[v]}):null))??[])}return[o,...s]}function Lk({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return Ur(Jn(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new Eq(t.type);return oc([t],[e])}function bx(t,{method:e}){var n,i;const r={};return t.transport.type==="fallback"&&((i=(n=t.transport).onResponse)==null||i.call(n,({method:o,response:s,status:f,transport:d})=>{f==="success"&&e===o&&(r[s]=d.request)})),o=>r[o]||t.request}async function b_(t,{address:e,abi:r,args:n,eventName:i,fromBlock:o,strict:s,toBlock:f}){const d=bx(t,{method:"eth_newFilter"}),p=i?g1({abi:r,args:n,eventName:i}):void 0,b=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof o=="bigint"?ht(o):o,toBlock:typeof f=="bigint"?ht(f):f,topics:p}]});return{abi:r,args:n,eventName:i,id:b,request:d(b),strict:s,type:"event"}}function ls(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}function pi({abi:t,args:e,functionName:r}){let n=t[0];if(r&&(n=H0({abi:t,args:e,name:r}),!n))throw new dl(r,{docsPath:"/docs/contract/encodeFunctionData"});if(n.type!=="function")throw new dl(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const i=Qs(n),o=m1(i),s="inputs"in n&&n.inputs?oc(n.inputs,e??[]):void 0;return Va([o,s??"0x"])}const qq={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},ive={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},ove={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function ny(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=Ur(La(r),"bytes"),i=(e?r.substring(`${e}0x`.length):r).split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());return`0x${i.join("")}`}function E0(t,e){if(!tn(t))throw new ei({address:t});return ny(t,e)}function kl(t,e){if(e==="0x"&&t.length>0)throw new ty;if(Wr(e)&&Wr(e)<32)throw new dx({data:e,params:t,size:Wr(e)});return sve({data:e,params:t})}function sve({data:t,params:e}){const r=[];let n=0;for(let i=0;i=Wr(t))throw new dx({data:t,params:e,size:Wr(t)});const o=e[i],{consumed:s,value:f}=th({data:t,param:o,position:n});r.push(f),n+=s}return r}function th({data:t,param:e,position:r}){const n=gx(e.type);if(n){const[o,s]=n;return fve(t,{length:o,param:{...e,type:s},position:r})}if(e.type==="tuple")return hve(t,{param:e,position:r});if(e.type==="string")return dve(t,{position:r});if(e.type.startsWith("bytes"))return uve(t,{param:e,position:r});const i=Ar(t,r,r+32,{strict:!0});if(e.type.startsWith("uint")||e.type.startsWith("int"))return lve(i,{param:e});if(e.type==="address")return ave(i);if(e.type==="bool")return cve(i);throw new yq(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function ave(t){return{consumed:32,value:ny(Ar(t,-20))}}function fve(t,{param:e,length:r,position:n}){if(!r){const s=rr(Ar(t,n,n+32,{strict:!0})),f=rr(Ar(t,s,s+32,{strict:!0}));let d=0;const p=[];for(let b=0;b48?Sr(t,{signed:r}):rr(t,{signed:r})}}function dve(t,{position:e}){const r=rr(Ar(t,e,e+32,{strict:!0})),n=rr(Ar(t,r,r+32,{strict:!0}));return n===0?{consumed:32,value:""}:{consumed:32,value:c_(Ni(Ar(t,r+32,r+32+n,{strict:!0})))}}function hve(t,{param:e,position:r}){const n=e.components.length===0||e.components.some(({name:s})=>!s),i=n?[]:{};let o=0;if(T6(e)){const s=rr(Ar(t,r,r+32,{strict:!0}));for(let f=0;fo.type==="error"&&r===m1(Qs(o)));if(!i)throw new n_(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:i,args:"inputs"in i&&i.inputs&&i.inputs.length>0?kl(i.inputs,Ar(e,4)):void 0,errorName:i.name}}const fn=(t,e,r)=>JSON.stringify(t,(n,i)=>{const o=typeof i=="bigint"?i.toString():i;return typeof e=="function"?e(n,o):o},r);function Gq({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((i,o)=>`${n&&i.name?`${i.name}: `:""}${typeof e[o]=="object"?fn(e[o]):e[o]}`).join(", ")})`}const v_={gwei:9,wei:18},w_={ether:-9,wei:9},pve={ether:-18,gwei:-9};function x_(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[i,o]=[r.slice(0,r.length-e),r.slice(r.length-e)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}function b1(t,e="wei"){return x_(t,v_[e])}function ci(t,e="wei"){return x_(t,w_[e])}function iy(t){const e=Object.entries(t).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),r=e.reduce((n,[i])=>Math.max(n,i.length),0);return e.map(([n,i])=>` ${`${n}:`.padEnd(r+1)} ${i}`).join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}class xq extends qe{constructor(e){super(`Type "${e}" is not supported for packed encoding.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedPackedAbiType"})}}class Eq extends qe{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}class s_ extends qe{constructor({offset:e,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class a_ extends qe{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}function zs(t,{dir:e,size:r=32}={}){return typeof t=="string"?js(t,{dir:e,size:r}):Aq(t,{dir:e,size:r})}function js(t,{dir:e,size:r=32}={}){if(r===null)return t;const n=t.replace("0x","");if(n.length>r*2)throw new a_({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function Aq(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new a_({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;ie)throw new Cq({givenSize:Wr(t),maxSize:e})}function xye(t,e){const r=typeof e=="string"?{to:e}:e,n=r.to;return n==="number"?rr(t,r):n==="bigint"?Sr(t,r):n==="string"?c_(t,r):n==="boolean"?f_(t,r):ic(t,r)}function Sr(t,e={}){const{signed:r}=e;e.size&&us(t,{size:e.size});const n=BigInt(t);if(!r)return n;const i=(t.length-2)/2,o=(1n<e.toString(16).padStart(2,"0"));function Ft(t,e={}){return typeof t=="number"||typeof t=="bigint"?ht(t,e):typeof t=="string"?ry(t,e):typeof t=="boolean"?hx(t,e):$i(t,e)}function hx(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(us(r,{size:e.size}),zs(r,{size:e.size})):r}function $i(t,e={}){let r="";for(let i=0;io||i=Ya.zero&&t<=Ya.nine)return t-Ya.zero;if(t>=Ya.A&&t<=Ya.F)return t-(Ya.A-10);if(t>=Ya.a&&t<=Ya.f)return t-(Ya.a-10)}function ic(t,e={}){let r=t;e.size&&(us(r,{size:e.size}),r=zs(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,o=new Uint8Array(i);for(let s=0,f=0;s{const e=(()=>typeof t=="string"?t:Fbe(t))();return Mye(e)},Rq=t=>u_(t);function I6(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function l_(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function _ye(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");I6(t.outputLen),I6(t.blockLen)}function _p(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function kq(t,e){l_(t);const r=e.outputLen;if(t.length>Bk&sv)}:{h:Number(t>>Bk&sv)|0,l:Number(t&sv)|0}}function Cye(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;it<>>32-r,Tye=(t,e,r)=>e<>>32-r,Rye=(t,e,r)=>e<>>64-r,kye=(t,e,r)=>t<>>64-r,r4=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Bq=t=>t instanceof Uint8Array,Bye=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),n4=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),la=(t,e)=>t<<32-e|t>>>e,Oye=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Oye)throw new Error("Non little-endian hardware is not supported");function Nye(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function px(t){if(typeof t=="string"&&(t=Nye(t)),!Bq(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function Lye(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!Bq(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class d_{clone(){return this._cloneInto()}}function Oq(t){const e=n=>t().update(px(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Nq(t=32){if(r4&&typeof r4.getRandomValues=="function")return r4.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}const[Lq,Dq,Fq]=[[],[],[]],Dye=BigInt(0),em=BigInt(1),Fye=BigInt(2),$ye=BigInt(7),Uye=BigInt(256),zye=BigInt(113);for(let t=0,e=em,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],Lq.push(2*(5*n+r)),Dq.push((t+1)*(t+2)/2%64);let i=Dye;for(let o=0;o<7;o++)e=(e<>$ye)*zye)%Uye,e&Fye&&(i^=em<<(em<r>32?Rye(t,e,r):Iye(t,e,r),Nk=(t,e,r)=>r>32?kye(t,e,r):Tye(t,e,r);function qye(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let s=0;s<10;s++)r[s]=t[s]^t[s+10]^t[s+20]^t[s+30]^t[s+40];for(let s=0;s<10;s+=2){const f=(s+8)%10,d=(s+2)%10,p=r[d],b=r[d+1],v=Ok(p,b,1)^r[f],A=Nk(p,b,1)^r[f+1];for(let _=0;_<50;_+=10)t[s+_]^=v,t[s+_+1]^=A}let i=t[2],o=t[3];for(let s=0;s<24;s++){const f=Dq[s],d=Ok(i,o,f),p=Nk(i,o,f),b=Lq[s];i=t[b],o=t[b+1],t[b]=d,t[b+1]=p}for(let s=0;s<50;s+=10){for(let f=0;f<10;f++)r[f]=t[s+f];for(let f=0;f<10;f++)t[s+f]^=~r[(f+2)%10]&r[(f+4)%10]}t[0]^=jye[n],t[1]^=Hye[n]}r.fill(0)}class h_ extends d_{constructor(e,r,n,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,I6(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Bye(this.state)}keccak(){qye(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){_p(this);const{blockLen:r,state:n}=this;e=px(e);const i=e.length;for(let o=0;o=n&&this.keccak();const s=Math.min(n-this.posOut,o-i);e.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return I6(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(kq(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return e||(e=new h_(r,n,i,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=i,e.enableXOF=s,e.destroyed=this.destroyed,e}}const Gye=(t,e,r)=>Oq(()=>new h_(e,t,r)),Vye=Gye(1,136,256/8);function Ur(t,e){const r=e||"hex",n=Vye(jt(t,{strict:!1})?Jn(t):t);return r==="bytes"?n:Ft(n)}const Kye=t=>Ur(Jn(t)),mx=t=>Kye(Rq(t));class ei extends qe{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const Wye=/^0x[a-fA-F0-9]{40}$/;function tn(t){return Wye.test(t)}function Zo(t){return typeof t[0]=="string"?Va(t):$q(t)}function $q(t){let e=0;for(const i of t)e+=i.length;const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function Va(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}function Ar(t,e,r,{strict:n}={}){return jt(t,{strict:!1})?p_(t,e,r,{strict:n}):jq(t,e,r,{strict:n})}function Uq(t,e){if(typeof e=="number"&&e>0&&e>Wr(t)-1)throw new s_({offset:e,position:"start",size:Wr(t)})}function zq(t,e,r){if(typeof e=="number"&&typeof r=="number"&&Wr(t)!==r-e)throw new s_({offset:r,position:"end",size:Wr(t)})}function jq(t,e,r,{strict:n}={}){Uq(t,e);const i=t.slice(e,r);return n&&zq(i,e,r),i}function p_(t,e,r,{strict:n}={}){Uq(t,e);const i=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&zq(i,e,r),i}function oc(t,e){if(t.length!==e.length)throw new r_({expectedLength:t.length,givenLength:e.length});const r=Jye({params:t,values:e}),n=g_(r);return n.length===0?"0x":n}function Jye({params:t,values:e}){const r=[];for(let n=0;n0?Zo([f,s]):f}}if(i)return{dynamic:!0,encoded:s}}return{dynamic:!1,encoded:Zo(o.map(({encoded:s})=>s))}}function Qye(t,{param:e}){const[,r]=e.type.split("bytes"),n=Wr(t);if(!r){let i=t;return n%32!==0&&(i=js(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:Zo([js(ht(n,{size:32})),i])}}if(n!==parseInt(r))throw new dq({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:js(t,{dir:"right"})}}function Xye(t){return{dynamic:!1,encoded:js(hx(t))}}function eve(t,{signed:e}){return{dynamic:!1,encoded:ht(t,{size:32,signed:e})}}function tve(t){const e=ry(t),r=Math.ceil(Wr(e)/32),n=[];for(let i=0;ii))}}function gx(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const nve=t=>Ur(Jn(t)),g1=t=>Ar(nve(u_(t)),0,4);function H0({abi:t,args:e=[],name:r}){const n=jt(r,{strict:!1}),i=t.filter(s=>n?s.type==="function"?g1(s)===r:s.type==="event"?mx(s)===r:!1:"name"in s&&s.name===r);if(i.length===0)return;if(i.length===1)return i[0];let o;for(const s of i){if(!("inputs"in s))continue;if(!e||e.length===0){if(!s.inputs||s.inputs.length===0)return s;continue}if(!s.inputs||s.inputs.length===0||s.inputs.length!==e.length)continue;if(e.every((d,p)=>{const b="inputs"in s&&s.inputs[p];return b?eE(d,b):!1})){if(o&&"inputs"in o&&o.inputs){const d=Hq(s.inputs,o.inputs,e);if(d)throw new bye({abiItem:s,type:d[0]},{abiItem:o,type:d[1]})}o=s}}return o||i[0]}function eE(t,e){const r=typeof t,n=e.type;switch(n){case"address":return tn(t);case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((i,o)=>eE(Object.values(t)[o],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(i=>eE(i,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Hq(t,e,r){for(const n in t){const i=t[n],o=e[n];if(i.type==="tuple"&&o.type==="tuple"&&"components"in i&&"components"in o)return Hq(i.components,o.components,r[n]);const s=[i.type,o.type];if((()=>s.includes("address")&&s.includes("bytes20")?!0:s.includes("address")&&s.includes("string")||s.includes("address")&&s.includes("bytes")?tn(r[n]):!1)())return s}}function b1({abi:t,eventName:e,args:r}){var f;let n=t[0];if(e&&(n=H0({abi:t,args:r,name:e}),!n))throw new X7(e,{docsPath:"/docs/contract/encodeEventTopics"});if(n.type!=="event")throw new X7(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const i=Qs(n),o=mx(i);let s=[];if(r&&"inputs"in n){const d=(f=n.inputs)==null?void 0:f.filter(b=>"indexed"in b&&b.indexed),p=Array.isArray(r)?r:Object.values(r).length>0?(d==null?void 0:d.map(b=>r[b.name]))??[]:[];p.length>0&&(s=(d==null?void 0:d.map((b,v)=>Array.isArray(p[v])?p[v].map((A,_)=>Lk({param:b,value:p[v][_]})):p[v]?Lk({param:b,value:p[v]}):null))??[])}return[o,...s]}function Lk({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return Ur(Jn(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new Eq(t.type);return oc([t],[e])}function bx(t,{method:e}){var n,i;const r={};return t.transport.type==="fallback"&&((i=(n=t.transport).onResponse)==null||i.call(n,({method:o,response:s,status:f,transport:d})=>{f==="success"&&e===o&&(r[s]=d.request)})),o=>r[o]||t.request}async function b_(t,{address:e,abi:r,args:n,eventName:i,fromBlock:o,strict:s,toBlock:f}){const d=bx(t,{method:"eth_newFilter"}),p=i?b1({abi:r,args:n,eventName:i}):void 0,b=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof o=="bigint"?ht(o):o,toBlock:typeof f=="bigint"?ht(f):f,topics:p}]});return{abi:r,args:n,eventName:i,id:b,request:d(b),strict:s,type:"event"}}function ls(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}function pi({abi:t,args:e,functionName:r}){let n=t[0];if(r&&(n=H0({abi:t,args:e,name:r}),!n))throw new dl(r,{docsPath:"/docs/contract/encodeFunctionData"});if(n.type!=="function")throw new dl(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const i=Qs(n),o=g1(i),s="inputs"in n&&n.inputs?oc(n.inputs,e??[]):void 0;return Va([o,s??"0x"])}const qq={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},ive={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},ove={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function ny(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=Ur(La(r),"bytes"),i=(e?r.substring(`${e}0x`.length):r).split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());return`0x${i.join("")}`}function E0(t,e){if(!tn(t))throw new ei({address:t});return ny(t,e)}function kl(t,e){if(e==="0x"&&t.length>0)throw new ty;if(Wr(e)&&Wr(e)<32)throw new dx({data:e,params:t,size:Wr(e)});return sve({data:e,params:t})}function sve({data:t,params:e}){const r=[];let n=0;for(let i=0;i=Wr(t))throw new dx({data:t,params:e,size:Wr(t)});const o=e[i],{consumed:s,value:f}=th({data:t,param:o,position:n});r.push(f),n+=s}return r}function th({data:t,param:e,position:r}){const n=gx(e.type);if(n){const[o,s]=n;return fve(t,{length:o,param:{...e,type:s},position:r})}if(e.type==="tuple")return hve(t,{param:e,position:r});if(e.type==="string")return dve(t,{position:r});if(e.type.startsWith("bytes"))return uve(t,{param:e,position:r});const i=Ar(t,r,r+32,{strict:!0});if(e.type.startsWith("uint")||e.type.startsWith("int"))return lve(i,{param:e});if(e.type==="address")return ave(i);if(e.type==="bool")return cve(i);throw new yq(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function ave(t){return{consumed:32,value:ny(Ar(t,-20))}}function fve(t,{param:e,length:r,position:n}){if(!r){const s=rr(Ar(t,n,n+32,{strict:!0})),f=rr(Ar(t,s,s+32,{strict:!0}));let d=0;const p=[];for(let b=0;b48?Sr(t,{signed:r}):rr(t,{signed:r})}}function dve(t,{position:e}){const r=rr(Ar(t,e,e+32,{strict:!0})),n=rr(Ar(t,r,r+32,{strict:!0}));return n===0?{consumed:32,value:""}:{consumed:32,value:c_(Ni(Ar(t,r+32,r+32+n,{strict:!0})))}}function hve(t,{param:e,position:r}){const n=e.components.length===0||e.components.some(({name:s})=>!s),i=n?[]:{};let o=0;if(T6(e)){const s=rr(Ar(t,r,r+32,{strict:!0}));for(let f=0;fo.type==="error"&&r===g1(Qs(o)));if(!i)throw new n_(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:i,args:"inputs"in i&&i.inputs&&i.inputs.length>0?kl(i.inputs,Ar(e,4)):void 0,errorName:i.name}}const fn=(t,e,r)=>JSON.stringify(t,(n,i)=>{const o=typeof i=="bigint"?i.toString():i;return typeof e=="function"?e(n,o):o},r);function Gq({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((i,o)=>`${n&&i.name?`${i.name}: `:""}${typeof e[o]=="object"?fn(e[o]):e[o]}`).join(", ")})`}const v_={gwei:9,wei:18},w_={ether:-9,wei:9},pve={ether:-18,gwei:-9};function x_(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[i,o]=[r.slice(0,r.length-e),r.slice(r.length-e)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}function y1(t,e="wei"){return x_(t,v_[e])}function ci(t,e="wei"){return x_(t,w_[e])}function iy(t){const e=Object.entries(t).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),r=e.reduce((n,[i])=>Math.max(n,i.length),0);return e.map(([n,i])=>` ${`${n}:`.padEnd(r+1)} ${i}`).join(` `)}class Vq extends qe{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class E_ extends qe{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class Kq extends qe{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",iy(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class Wq extends qe{constructor({serializedType:e}){super(`Serialized transaction type "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=e}}class yx extends qe{constructor({attributes:e,serializedTransaction:r,type:n}){const i=Object.entries(e).map(([o,s])=>typeof s>"u"?o:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${n}" was provided.`,{metaMessages:[`Serialized Transaction: "${r}"`,i.length>0?`Missing Attributes: ${i.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=r,this.type=n}}class Jq extends qe{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}class Zq extends qe{constructor(e,{account:r,docsPath:n,chain:i,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A}){var S;const _=iy({chain:i&&`${i==null?void 0:i.name} (id: ${i==null?void 0:i.id})`,from:r==null?void 0:r.address,to:v,value:typeof A<"u"&&`${b1(A)} ${((S=i==null?void 0:i.nativeCurrency)==null?void 0:S.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof f<"u"&&`${ci(f)} gwei`,maxFeePerGas:typeof d<"u"&&`${ci(d)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${ci(p)} gwei`,nonce:b});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",_].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class A_ extends qe{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:i,index:o}){let s="Transaction";n&&o!==void 0&&(s=`Transaction at block time "${n}" at index "${o}"`),e&&o!==void 0&&(s=`Transaction at block hash "${e}" at index "${o}"`),r&&o!==void 0&&(s=`Transaction at block number "${r}" at index "${o}"`),i&&(s=`Transaction with hash "${i}"`),super(`${s} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class S_ extends qe{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class Yq extends qe{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}class M_ extends qe{constructor(e,{account:r,docsPath:n,chain:i,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A}){var P;const _=r?ls(r):void 0,S=iy({from:_==null?void 0:_.address,to:v,value:typeof A<"u"&&`${b1(A)} ${((P=i==null?void 0:i.nativeCurrency)==null?void 0:P.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof f<"u"&&`${ci(f)} gwei`,maxFeePerGas:typeof d<"u"&&`${ci(d)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${ci(p)} gwei`,nonce:b});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",S].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class Qq extends qe{constructor(e,{abi:r,args:n,contractAddress:i,docsPath:o,functionName:s,sender:f}){const d=H0({abi:r,args:n,name:s}),p=d?Gq({abiItem:d,args:n,includeFunctionName:!1,includeName:!1}):void 0,b=d?Qs(d,{includeName:!0}):void 0,v=iy({address:i&&pye(i),function:b,args:p&&p!=="()"&&`${[...Array((s==null?void 0:s.length)??0).keys()].map(()=>" ").join("")}${p}`,sender:f});super(e.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",v].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=i,this.functionName=s,this.sender=f}}class R6 extends qe{constructor({abi:e,data:r,functionName:n,message:i}){let o,s,f,d;if(r&&r!=="0x")try{s=y_({abi:e,data:r});const{abiItem:b,errorName:v,args:A}=s;if(v==="Error")d=A[0];else if(v==="Panic"){const[_]=A;d=qq[_]}else{const _=b?Qs(b,{includeName:!0}):void 0,S=b&&A?Gq({abiItem:b,args:A,includeFunctionName:!1,includeName:!1}):void 0;f=[_?`Error: ${_}`:"",S&&S!=="()"?` ${[...Array((v==null?void 0:v.length)??0).keys()].map(()=>" ").join("")}${S}`:""]}}catch(b){o=b}else i&&(d=i);let p;o instanceof n_&&(p=o.signature,f=[`Unable to decode signature "${p}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${p}.`]),super(d&&d!=="execution reverted"||p?[`The contract function "${n}" reverted with the following ${p?"signature":"reason"}:`,d||p].join(` -`):`The contract function "${n}" reverted.`,{cause:o,metaMessages:f}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=s,this.reason=d,this.signature=p}}class Xq extends qe{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class vx extends qe{constructor({data:e,message:r}){super(r||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}class l0 extends qe{constructor({body:e,details:r,headers:n,status:i,url:o}){super("HTTP request failed.",{details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${p1(o)}`,e&&`Request body: ${fn(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=i,this.url=o}}class eG extends qe{constructor({body:e,details:r,url:n}){super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${p1(n)}`,`Request body: ${fn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class wx extends qe{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${p1(n)}`,`Request body: ${fn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}}class k6 extends qe{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${p1(r)}`,`Request body: ${fn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const mve=-1;class vi extends qe{constructor(e,{code:r,docsPath:n,metaMessages:i,shortMessage:o}){super(o,{cause:e,docsPath:n,metaMessages:i||(e==null?void 0:e.metaMessages)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof wx?e.code:r??mve}}class Bl extends vi{constructor(e,r){super(e,r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class Pp extends vi{constructor(e){super(e,{code:Pp.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(Pp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Cp extends vi{constructor(e){super(e,{code:Cp.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(Cp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Ip extends vi{constructor(e){super(e,{code:Ip.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(Ip,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Tp extends vi{constructor(e){super(e,{code:Tp.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class E_ extends qe{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class Kq extends qe{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",iy(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class Wq extends qe{constructor({serializedType:e}){super(`Serialized transaction type "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=e}}class yx extends qe{constructor({attributes:e,serializedTransaction:r,type:n}){const i=Object.entries(e).map(([o,s])=>typeof s>"u"?o:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${n}" was provided.`,{metaMessages:[`Serialized Transaction: "${r}"`,i.length>0?`Missing Attributes: ${i.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=r,this.type=n}}class Jq extends qe{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}class Zq extends qe{constructor(e,{account:r,docsPath:n,chain:i,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A}){var S;const _=iy({chain:i&&`${i==null?void 0:i.name} (id: ${i==null?void 0:i.id})`,from:r==null?void 0:r.address,to:v,value:typeof A<"u"&&`${y1(A)} ${((S=i==null?void 0:i.nativeCurrency)==null?void 0:S.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof f<"u"&&`${ci(f)} gwei`,maxFeePerGas:typeof d<"u"&&`${ci(d)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${ci(p)} gwei`,nonce:b});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",_].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class A_ extends qe{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:i,index:o}){let s="Transaction";n&&o!==void 0&&(s=`Transaction at block time "${n}" at index "${o}"`),e&&o!==void 0&&(s=`Transaction at block hash "${e}" at index "${o}"`),r&&o!==void 0&&(s=`Transaction at block number "${r}" at index "${o}"`),i&&(s=`Transaction with hash "${i}"`),super(`${s} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class S_ extends qe{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class Yq extends qe{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}class M_ extends qe{constructor(e,{account:r,docsPath:n,chain:i,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A}){var P;const _=r?ls(r):void 0,S=iy({from:_==null?void 0:_.address,to:v,value:typeof A<"u"&&`${y1(A)} ${((P=i==null?void 0:i.nativeCurrency)==null?void 0:P.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof f<"u"&&`${ci(f)} gwei`,maxFeePerGas:typeof d<"u"&&`${ci(d)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${ci(p)} gwei`,nonce:b});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",S].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class Qq extends qe{constructor(e,{abi:r,args:n,contractAddress:i,docsPath:o,functionName:s,sender:f}){const d=H0({abi:r,args:n,name:s}),p=d?Gq({abiItem:d,args:n,includeFunctionName:!1,includeName:!1}):void 0,b=d?Qs(d,{includeName:!0}):void 0,v=iy({address:i&&pye(i),function:b,args:p&&p!=="()"&&`${[...Array((s==null?void 0:s.length)??0).keys()].map(()=>" ").join("")}${p}`,sender:f});super(e.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",v].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=i,this.functionName=s,this.sender=f}}class R6 extends qe{constructor({abi:e,data:r,functionName:n,message:i}){let o,s,f,d;if(r&&r!=="0x")try{s=y_({abi:e,data:r});const{abiItem:b,errorName:v,args:A}=s;if(v==="Error")d=A[0];else if(v==="Panic"){const[_]=A;d=qq[_]}else{const _=b?Qs(b,{includeName:!0}):void 0,S=b&&A?Gq({abiItem:b,args:A,includeFunctionName:!1,includeName:!1}):void 0;f=[_?`Error: ${_}`:"",S&&S!=="()"?` ${[...Array((v==null?void 0:v.length)??0).keys()].map(()=>" ").join("")}${S}`:""]}}catch(b){o=b}else i&&(d=i);let p;o instanceof n_&&(p=o.signature,f=[`Unable to decode signature "${p}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${p}.`]),super(d&&d!=="execution reverted"||p?[`The contract function "${n}" reverted with the following ${p?"signature":"reason"}:`,d||p].join(` +`):`The contract function "${n}" reverted.`,{cause:o,metaMessages:f}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=s,this.reason=d,this.signature=p}}class Xq extends qe{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class vx extends qe{constructor({data:e,message:r}){super(r||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}class l0 extends qe{constructor({body:e,details:r,headers:n,status:i,url:o}){super("HTTP request failed.",{details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${m1(o)}`,e&&`Request body: ${fn(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=i,this.url=o}}class eG extends qe{constructor({body:e,details:r,url:n}){super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${m1(n)}`,`Request body: ${fn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class wx extends qe{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${m1(n)}`,`Request body: ${fn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}}class k6 extends qe{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${m1(r)}`,`Request body: ${fn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const mve=-1;class vi extends qe{constructor(e,{code:r,docsPath:n,metaMessages:i,shortMessage:o}){super(o,{cause:e,docsPath:n,metaMessages:i||(e==null?void 0:e.metaMessages)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof wx?e.code:r??mve}}class Bl extends vi{constructor(e,r){super(e,r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class Pp extends vi{constructor(e){super(e,{code:Pp.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(Pp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Cp extends vi{constructor(e){super(e,{code:Cp.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(Cp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Ip extends vi{constructor(e){super(e,{code:Ip.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(Ip,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Tp extends vi{constructor(e){super(e,{code:Tp.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` `)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(Tp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class hl extends vi{constructor(e){super(e,{code:hl.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(hl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class A0 extends vi{constructor(e){super(e,{code:A0.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` -`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(A0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Rp extends vi{constructor(e){super(e,{code:Rp.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Rp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class kp extends vi{constructor(e){super(e,{code:kp.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(kp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Bp extends vi{constructor(e){super(e,{code:Bp.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(Bp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Op extends vi{constructor(e){super(e,{code:Op.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(Op,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Np extends vi{constructor(e){super(e,{code:Np.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(Np,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Lp extends vi{constructor(e){super(e,{code:Lp.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(Lp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Gu extends Bl{constructor(e){super(e,{code:Gu.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(Gu,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Dp extends Bl{constructor(e){super(e,{code:Dp.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(Dp,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Fp extends Bl{constructor(e){super(e,{code:Fp.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(Fp,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class $p extends Bl{constructor(e){super(e,{code:$p.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty($p,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Up extends Bl{constructor(e){super(e,{code:Up.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(Up,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class zp extends Bl{constructor(e){super(e,{code:zp.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(zp,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class tG extends vi{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}const gve=3;function jp(t,{abi:e,address:r,args:n,docsPath:i,functionName:o,sender:s}){const{code:f,data:d,message:p,shortMessage:b}=t instanceof vx?t:t instanceof qe?t.walk(A=>"data"in A)||t.walk():{},v=(()=>t instanceof ty?new Xq({functionName:o}):[gve,hl.code].includes(f)&&(d||p||b)?new R6({abi:e,data:typeof d=="object"?d.data:d,functionName:o,message:b??p}):t)();return new Qq(v,{abi:e,args:n,contractAddress:r,docsPath:i,functionName:o,sender:s})}class y1 extends qe{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` -`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class rG extends qe{constructor(e,{account:r,docsPath:n,chain:i,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A}){var S;const _=iy({from:r==null?void 0:r.address,to:v,value:typeof A<"u"&&`${b1(A)} ${((S=i==null?void 0:i.nativeCurrency)==null?void 0:S.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof f<"u"&&`${ci(f)} gwei`,maxFeePerGas:typeof d<"u"&&`${ci(d)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${ci(p)} gwei`,nonce:b});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",_].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}class lu extends qe{constructor({cause:e,message:r}={}){var i;const n=(i=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(lu,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(lu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class S0 extends qe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ci(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(S0,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class B6 extends qe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ci(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(B6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class O6 extends qe{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(O6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class N6 extends qe{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(A0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Rp extends vi{constructor(e){super(e,{code:Rp.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Rp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class kp extends vi{constructor(e){super(e,{code:kp.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(kp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Bp extends vi{constructor(e){super(e,{code:Bp.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(Bp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Op extends vi{constructor(e){super(e,{code:Op.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(Op,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Np extends vi{constructor(e){super(e,{code:Np.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(Np,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Lp extends vi{constructor(e){super(e,{code:Lp.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(Lp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Gu extends Bl{constructor(e){super(e,{code:Gu.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(Gu,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Dp extends Bl{constructor(e){super(e,{code:Dp.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(Dp,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Fp extends Bl{constructor(e){super(e,{code:Fp.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(Fp,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class $p extends Bl{constructor(e){super(e,{code:$p.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty($p,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Up extends Bl{constructor(e){super(e,{code:Up.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(Up,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class zp extends Bl{constructor(e){super(e,{code:zp.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(zp,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class tG extends vi{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}const gve=3;function jp(t,{abi:e,address:r,args:n,docsPath:i,functionName:o,sender:s}){const{code:f,data:d,message:p,shortMessage:b}=t instanceof vx?t:t instanceof qe?t.walk(A=>"data"in A)||t.walk():{},v=(()=>t instanceof ty?new Xq({functionName:o}):[gve,hl.code].includes(f)&&(d||p||b)?new R6({abi:e,data:typeof d=="object"?d.data:d,functionName:o,message:b??p}):t)();return new Qq(v,{abi:e,args:n,contractAddress:r,docsPath:i,functionName:o,sender:s})}class v1 extends qe{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` +`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class rG extends qe{constructor(e,{account:r,docsPath:n,chain:i,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A}){var S;const _=iy({from:r==null?void 0:r.address,to:v,value:typeof A<"u"&&`${y1(A)} ${((S=i==null?void 0:i.nativeCurrency)==null?void 0:S.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof f<"u"&&`${ci(f)} gwei`,maxFeePerGas:typeof d<"u"&&`${ci(d)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${ci(p)} gwei`,nonce:b});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",_].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}class lu extends qe{constructor({cause:e,message:r}={}){var i;const n=(i=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(lu,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(lu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class S0 extends qe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ci(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(S0,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class B6 extends qe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ci(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(B6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class O6 extends qe{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(O6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class N6 extends qe{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` `),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(N6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class L6 extends qe{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(L6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class D6 extends qe{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` `),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(D6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class F6 extends qe{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(F6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class $6 extends qe{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty($6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class U6 extends qe{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(U6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Hp extends qe{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${ci(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ci(n)} gwei`:""}).`].join(` -`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(Hp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class oy extends qe{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}function __(t,e){const r=(t.details||"").toLowerCase(),n=t.walk(i=>i.code===lu.code);return n instanceof qe?new lu({cause:t,message:n.details}):lu.nodeMessage.test(r)?new lu({cause:t,message:t.details}):S0.nodeMessage.test(r)?new S0({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):B6.nodeMessage.test(r)?new B6({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):O6.nodeMessage.test(r)?new O6({cause:t,nonce:e==null?void 0:e.nonce}):N6.nodeMessage.test(r)?new N6({cause:t,nonce:e==null?void 0:e.nonce}):L6.nodeMessage.test(r)?new L6({cause:t,nonce:e==null?void 0:e.nonce}):D6.nodeMessage.test(r)?new D6({cause:t}):F6.nodeMessage.test(r)?new F6({cause:t,gas:e==null?void 0:e.gas}):$6.nodeMessage.test(r)?new $6({cause:t,gas:e==null?void 0:e.gas}):U6.nodeMessage.test(r)?new U6({cause:t}):Hp.nodeMessage.test(r)?new Hp({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new oy({cause:t})}function bve(t,{docsPath:e,...r}){const n=(()=>{const i=__(t,r);return i instanceof oy?t:i})();return new rG(n,{docsPath:e,...r})}function xx(t,{format:e}){if(!e)return{};const r={};function n(o){const s=Object.keys(o);for(const f of s)f in t&&(r[f]=t[f]),o[f]&&typeof o[f]=="object"&&!Array.isArray(o[f])&&n(o[f])}const i=e(t||{});return n(i),r}function Ex(t,e){return({exclude:r,format:n})=>({exclude:r,format:i=>{const o=e(i);if(r)for(const s of r)delete o[s];return{...o,...n(i)}},type:t})}const nG={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function Ol(t){return{...t,gas:typeof t.gas<"u"?ht(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?ht(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?ht(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?ht(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?ht(t.nonce):void 0,type:typeof t.type<"u"?nG[t.type]:void 0,value:typeof t.value<"u"?ht(t.value):void 0}}const yve=Ex("transactionRequest",Ol);function v1(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:i,to:o}=t,s=e?ls(e):void 0;if(s&&!tn(s.address))throw new ei({address:s.address});if(o&&!tn(o))throw new ei({address:o});if(typeof r<"u"&&(typeof n<"u"||typeof i<"u"))throw new Vq;if(n&&n>2n**256n-1n)throw new S0({maxFeePerGas:n});if(i&&n&&i>n)throw new Hp({maxFeePerGas:n,maxPriorityFeePerGas:i})}class iG extends qe{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class Ax extends qe{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class oG extends qe{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ci(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class P_ extends qe{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}const C_={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function Sx(t){const e={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,chainId:t.chainId?rr(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?rr(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?C_[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return e.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof e.v=="bigint"){if(e.v===0n||e.v===27n)return 0;if(e.v===1n||e.v===28n)return 1;if(e.v>=35n)return e.v%2n===0n?1:0}})(),e.type==="legacy"&&(delete e.accessList,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas,delete e.yParity),e.type==="eip2930"&&(delete e.maxFeePerGas,delete e.maxPriorityFeePerGas),e}const vve=Ex("transaction",Sx);function Mx(t){var r;const e=(r=t.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:Sx(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,difficulty:t.difficulty?BigInt(t.difficulty):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}const wve=Ex("block",Mx);async function M0(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:i}={}){var b,v,A;const o=n??"latest",s=i??!1,f=r!==void 0?ht(r):void 0;let d=null;if(e?d=await t.request({method:"eth_getBlockByHash",params:[e,s]}):d=await t.request({method:"eth_getBlockByNumber",params:[f||o,s]}),!d)throw new P_({blockHash:e,blockNumber:r});return(((A=(v=(b=t.chain)==null?void 0:b.formatters)==null?void 0:v.block)==null?void 0:A.format)||Mx)(d)}async function I_(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function xve(t,e){return sG(t,e)}async function sG(t,e){var o,s,f;const{block:r,chain:n=t.chain,request:i}=e||{};if(typeof((o=n==null?void 0:n.fees)==null?void 0:o.defaultPriorityFee)=="function"){const d=r||await mt(t,M0,"getBlock")({});return n.fees.defaultPriorityFee({block:d,client:t,request:i})}if(typeof((s=n==null?void 0:n.fees)==null?void 0:s.defaultPriorityFee)<"u")return(f=n==null?void 0:n.fees)==null?void 0:f.defaultPriorityFee;try{const d=await t.request({method:"eth_maxPriorityFeePerGas"});return Sr(d)}catch{const[d,p]=await Promise.all([r?Promise.resolve(r):mt(t,M0,"getBlock")({}),mt(t,I_,"getGasPrice")({})]);if(typeof d.baseFeePerGas!="bigint")throw new Ax;const b=p-d.baseFeePerGas;return b<0n?0n:b}}async function aG(t,e){return tE(t,e)}async function tE(t,e){var A,_;const{block:r,chain:n=t.chain,request:i,type:o="eip1559"}=e||{},s=await(async()=>{var S,P;return typeof((S=n==null?void 0:n.fees)==null?void 0:S.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:i}):((P=n==null?void 0:n.fees)==null?void 0:P.baseFeeMultiplier)??1.2})();if(s<1)throw new iG;const d=10**(((A=s.toString().split(".")[1])==null?void 0:A.length)??0),p=S=>S*BigInt(Math.ceil(s*d))/BigInt(d),b=r||await mt(t,M0,"getBlock")({});if(typeof((_=n==null?void 0:n.fees)==null?void 0:_.estimateFeesPerGas)=="function")return n.fees.estimateFeesPerGas({block:r,client:t,multiply:p,request:i,type:o});if(o==="eip1559"){if(typeof b.baseFeePerGas!="bigint")throw new Ax;const S=i!=null&&i.maxPriorityFeePerGas?i.maxPriorityFeePerGas:await sG(t,{block:b,chain:n,request:i}),P=p(b.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??P+S,maxPriorityFeePerGas:S}}return{gasPrice:(i==null?void 0:i.gasPrice)??p(await mt(t,I_,"getGasPrice")({}))}}async function fG(t,{address:e,blockTag:r="latest",blockNumber:n}){const i=await t.request({method:"eth_getTransactionCount",params:[e,n?ht(n):r]});return rr(i)}function T_(t){if(t.type)return t.type;if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new Kq({transaction:t})}async function _x(t,e){const{account:r=t.account,chain:n,gas:i,nonce:o,type:s}=e;if(!r)throw new y1;const f=ls(r),d=await mt(t,M0,"getBlock")({blockTag:"latest"}),p={...e,from:f.address};if(typeof o>"u"&&(p.nonce=await mt(t,fG,"getTransactionCount")({address:f.address,blockTag:"pending"})),typeof s>"u")try{p.type=T_(p)}catch{p.type=typeof d.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(p.type==="eip1559"){const{maxFeePerGas:b,maxPriorityFeePerGas:v}=await tE(t,{block:d,chain:n,request:p});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(p.gas=await mt(t,R_,"estimateGas")({...p,account:{address:f.address,type:"json-rpc"}})),v1(p),p}async function R_(t,e){var i,o,s;const r=e.account??t.account;if(!r)throw new y1({docsPath:"/docs/actions/public/estimateGas"});const n=ls(r);try{const{accessList:f,blockNumber:d,blockTag:p,data:b,gas:v,gasPrice:A,maxFeePerGas:_,maxPriorityFeePerGas:S,nonce:P,to:I,value:C,...T}=n.type==="local"?await _x(t,e):e,B=(d?ht(d):void 0)||p;v1(e);const D=(s=(o=(i=t.chain)==null?void 0:i.formatters)==null?void 0:o.transactionRequest)==null?void 0:s.format,K=(D||Ol)({...xx(T,{format:D}),from:n.address,accessList:f,data:b,gas:v,gasPrice:A,maxFeePerGas:_,maxPriorityFeePerGas:S,nonce:P,to:I,value:C}),Y=await t.request({method:"eth_estimateGas",params:B?[K,B]:[K]});return BigInt(Y)}catch(f){throw bve(f,{...e,account:n,chain:t.chain})}}async function cG(t,{abi:e,address:r,args:n,functionName:i,...o}){const s=pi({abi:e,args:n,functionName:i});try{return await mt(t,R_,"estimateGas")({data:s,to:r,...o})}catch(f){const d=o.account?ls(o.account):void 0;throw jp(f,{abi:e,address:r,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:d==null?void 0:d.address})}}const Dk="/docs/contract/decodeEventLog";function w1({abi:t,data:e,strict:r,topics:n}){const i=r??!0,[o,...s]=n;if(!o)throw new pq({docsPath:Dk});const f=t.find(S=>S.type==="event"&&o===mx(Qs(S)));if(!(f&&"name"in f)||f.type!=="event")throw new mq(o,{docsPath:Dk});const{name:d,inputs:p}=f,b=p==null?void 0:p.some(S=>!("name"in S&&S.name));let v=b?[]:{};const A=p.filter(S=>"indexed"in S&&S.indexed);for(let S=0;S!("indexed"in S&&S.indexed));if(_.length>0){if(e&&e!=="0x")try{const S=kl(_,e);if(S)if(b)v=[...v,...S];else for(let P=0;P<_.length;P++)v[_[P].name]=S[P]}catch(S){if(i)throw S instanceof dx?new x0({abiItem:f,data:S.data,params:S.params,size:S.size}):S}else if(i)throw new x0({abiItem:f,data:"0x",params:_,size:0})}return{eventName:d,args:Object.values(v).length>0?v:void 0}}function Eve({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(kl([t],e)||[])[0]}function Yo(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}async function k_(t,{address:e,blockHash:r,fromBlock:n,toBlock:i,event:o,events:s,args:f,strict:d}={}){const p=d??!1,b=s??(o?[o]:void 0);let v=[];b&&(v=[b.flatMap(_=>g1({abi:[_],eventName:_.name,args:f}))],o&&(v=v[0]));let A;return r?A=await t.request({method:"eth_getLogs",params:[{address:e,topics:v,blockHash:r}]}):A=await t.request({method:"eth_getLogs",params:[{address:e,topics:v,fromBlock:typeof n=="bigint"?ht(n):n,toBlock:typeof i=="bigint"?ht(i):i}]}),A.map(_=>{var S;try{const{eventName:P,args:I}=b?w1({abi:b,data:_.data,topics:_.topics,strict:p}):{eventName:void 0,args:void 0};return Yo(_,{args:I,eventName:P})}catch(P){let I,C;if(P instanceof x0||P instanceof Rl){if(p)return;I=P.abiItem.name,C=(S=P.abiItem.inputs)==null?void 0:S.some(T=>!("name"in T&&T.name))}return Yo(_,{args:C?[]:{},eventName:I})}}).filter(Boolean)}async function B_(t,{abi:e,address:r,args:n,blockHash:i,eventName:o,fromBlock:s,toBlock:f,strict:d}){const p=o?H0({abi:e,name:o}):void 0,b=p?void 0:e.filter(v=>v.type==="event");return mt(t,k_,"getLogs")({address:r,args:n,blockHash:i,event:p,events:b,fromBlock:s,toBlock:f,strict:d})}const i4="/docs/contract/decodeFunctionResult";function Nl({abi:t,args:e,functionName:r,data:n}){let i=t[0];if(r&&(i=H0({abi:t,args:e,name:r}),!i))throw new dl(r,{docsPath:i4});if(i.type!=="function")throw new dl(void 0,{docsPath:i4});if(!i.outputs)throw new i_(i.name,{docsPath:i4});const o=kl(i.outputs,n);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}const Ave="modulepreload",Sve=function(t){return"/"+t},Fk={},z6=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(o=>{if(o=Sve(o),o in Fk)return;Fk[o]=!0;const s=o.endsWith(".css"),f=s?'[rel="stylesheet"]':"";if(!!n)for(let b=i.length-1;b>=0;b--){const v=i[b];if(v.href===o&&(!s||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${f}`))return;const p=document.createElement("link");if(p.rel=s?"stylesheet":Ave,s||(p.as="script",p.crossOrigin=""),p.href=o,document.head.appendChild(p),s)return new Promise((b,v)=>{p.addEventListener("load",b),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})},j6=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],uG=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],lG=[...uG,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],Mve=[...uG,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],$k=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],Uk=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],_ve=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],Pve="0x82ad56cb";class H6 extends qe{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class dG extends qe{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class hG extends qe{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class O_ extends qe{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}class Px extends qe{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}function Ll({blockNumber:t,chain:e,contract:r}){var i;const n=(i=e==null?void 0:e.contracts)==null?void 0:i[r];if(!n)throw new H6({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new H6({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}function Cve(t,{docsPath:e,...r}){const n=(()=>{const i=__(t,r);return i instanceof oy?t:i})();return new M_(n,{docsPath:e,...r})}const o4=new Map;function N_({fn:t,id:e,shouldSplitBatch:r,wait:n=0,sort:i}){const o=async()=>{const b=d();s();const v=b.map(({args:A})=>A);v.length!==0&&t(v).then(A=>{var _;i&&Array.isArray(A)&&A.sort(i);for(let S=0;S{var _;for(let S=0;So4.delete(e),f=()=>d().map(({args:b})=>b),d=()=>o4.get(e)||[],p=b=>o4.set(e,[...d(),b]);return{flush:s,async schedule(b){const v={},A=new Promise((P,I)=>{v.resolve=P,v.reject=I});return(r==null?void 0:r([...f(),b]))&&o(),d().length>0?(p({args:b,pendingPromise:v}),A):(p({args:b,pendingPromise:v}),setTimeout(o,n),A)}}}async function sy(t,e){var C,T,O,B;const{account:r=t.account,batch:n=!!((C=t.batch)!=null&&C.multicall),blockNumber:i,blockTag:o="latest",accessList:s,data:f,gas:d,gasPrice:p,maxFeePerGas:b,maxPriorityFeePerGas:v,nonce:A,to:_,value:S,...P}=e,I=r?ls(r):void 0;try{v1(e);const U=(i?ht(i):void 0)||o,K=(B=(O=(T=t.chain)==null?void 0:T.formatters)==null?void 0:O.transactionRequest)==null?void 0:B.format,W=(K||Ol)({...xx(P,{format:K}),from:I==null?void 0:I.address,accessList:s,data:f,gas:d,gasPrice:p,maxFeePerGas:b,maxPriorityFeePerGas:v,nonce:A,to:_,value:S});if(n&&Ive({request:W}))try{return await Tve(t,{...W,blockNumber:i,blockTag:o})}catch(x){if(!(x instanceof O_)&&!(x instanceof H6))throw x}const ie=await t.request({method:"eth_call",params:U?[W,U]:[W]});return ie==="0x"?{data:void 0}:{data:ie}}catch(D){const U=Rve(D),{offchainLookup:K,offchainLookupSignature:Y}=await z6(()=>Promise.resolve().then(()=>E2e),void 0);if((U==null?void 0:U.slice(0,10))===Y&&_)return{data:await K(t,{data:U,to:_})};throw Cve(D,{...e,account:I,chain:t.chain})}}function Ive({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(Pve)||!r||Object.values(n).filter(i=>typeof i<"u").length>0)}async function Tve(t,e){var P;const{batchSize:r=1024,wait:n=0}=typeof((P=t.batch)==null?void 0:P.multicall)=="object"?t.batch.multicall:{},{blockNumber:i,blockTag:o="latest",data:s,multicallAddress:f,to:d}=e;let p=f;if(!p){if(!t.chain)throw new O_;p=Ll({blockNumber:i,chain:t.chain,contract:"multicall3"})}const v=(i?ht(i):void 0)||o,{schedule:A}=N_({id:`${t.uid}.${v}`,wait:n,shouldSplitBatch(I){return I.reduce((T,{data:O})=>T+(O.length-2),0)>r*2},fn:async I=>{const C=I.map(B=>({allowFailure:!0,callData:B.data,target:B.to})),T=pi({abi:j6,args:[C],functionName:"aggregate3"}),O=await t.request({method:"eth_call",params:[{data:T,to:p},v]});return Nl({abi:j6,args:[C],functionName:"aggregate3",data:O||"0x"})}}),[{returnData:_,success:S}]=await A({data:s,to:d});if(!S)throw new vx({data:_});return _==="0x"?{data:void 0}:{data:_}}function Rve(t){if(!(t instanceof qe))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}async function Xs(t,{abi:e,address:r,args:n,functionName:i,...o}){const s=pi({abi:e,args:n,functionName:i});try{const{data:f}=await mt(t,sy,"call")({data:s,to:r,...o});return Nl({abi:e,args:n,functionName:i,data:f||"0x"})}catch(f){throw jp(f,{abi:e,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}async function pG(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:o,...s}){const f=s.account?ls(s.account):void 0,d=pi({abi:e,args:n,functionName:o});try{const{data:p}=await mt(t,sy,"call")({batch:!1,data:`${d}${i?i.replace("0x",""):""}`,to:r,...s});return{result:Nl({abi:e,args:n,functionName:o,data:p||"0x"}),request:{abi:e,address:r,args:n,dataSuffix:i,functionName:o,...s}}}catch(p){throw jp(p,{abi:e,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:o,sender:f==null?void 0:f.address})}}const s4=new Map,zk=new Map;let kve=0;function x1(t,e,r){const n=++kve,i=()=>s4.get(t)||[],o=()=>{const b=i();s4.set(t,b.filter(v=>v.id!==n))},s=()=>{const b=zk.get(t);i().length===1&&b&&b(),o()},f=i();if(s4.set(t,[...f,{id:n,fns:e}]),f&&f.length>0)return s;const d={};for(const b in e)d[b]=(...v)=>{var _,S;const A=i();if(A.length!==0)for(const P of A)(S=(_=P.fns)[b])==null||S.call(_,...v)};const p=r(d);return typeof p=="function"&&zk.set(t,p),s}async function q6(t){return new Promise(e=>setTimeout(e,t))}function ay(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let i=!0;const o=()=>i=!1;return(async()=>{let f;e&&(f=await t({unpoll:o}));const d=await(r==null?void 0:r(f))??n;await q6(d);const p=async()=>{i&&(await t({unpoll:o}),await q6(n),p())};p()})(),o}const Bve=new Map,Ove=new Map;function Nve(t){const e=(i,o)=>({clear:()=>o.delete(i),get:()=>o.get(i),set:s=>o.set(i,s)}),r=e(t,Bve),n=e(t,Ove);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function Lve(t,{cacheKey:e,cacheTime:r=1/0}){const n=Nve(e),i=n.response.get();if(i&&r>0&&new Date().getTime()-i.created.getTime()`blockNumber.${t}`;async function fy(t,{cacheTime:e=t.cacheTime,maxAge:r}={}){const n=await Lve(()=>t.request({method:"eth_blockNumber"}),{cacheKey:Dve(t.uid),cacheTime:r??e});return BigInt(n)}async function Cx(t,{filter:e}){const r="strict"in e&&e.strict;return(await e.request({method:"eth_getFilterChanges",params:[e.id]})).map(i=>{var o;if(typeof i=="string")return i;try{const{eventName:s,args:f}="abi"in e&&e.abi?w1({abi:e.abi,data:i.data,topics:i.topics,strict:r}):{eventName:void 0,args:void 0};return Yo(i,{args:f,eventName:s})}catch(s){let f,d;if(s instanceof x0||s instanceof Rl){if("strict"in e&&e.strict)return;f=s.abiItem.name,d=(o=s.abiItem.inputs)==null?void 0:o.some(p=>!("name"in p&&p.name))}return Yo(i,{args:d?[]:{},eventName:f})}}).filter(Boolean)}async function Ix(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function mG(t,{abi:e,address:r,args:n,batch:i=!0,eventName:o,onError:s,onLogs:f,poll:d,pollingInterval:p=t.pollingInterval,strict:b}){return(typeof d<"u"?d:t.transport.type!=="webSocket")?(()=>{const S=fn(["watchContractEvent",r,n,i,t.uid,o,p]),P=b??!1;return x1(S,{onLogs:f,onError:s},I=>{let C,T,O=!1;const B=ay(async()=>{var D;if(!O){try{T=await mt(t,b_,"createContractEventFilter")({abi:e,address:r,args:n,eventName:o,strict:P})}catch{}O=!0;return}try{let U;if(T)U=await mt(t,Cx,"getFilterChanges")({filter:T});else{const K=await mt(t,fy,"getBlockNumber")({});C&&C!==K?U=await mt(t,B_,"getContractEvents")({abi:e,address:r,args:n,eventName:o,fromBlock:C+1n,toBlock:K,strict:P}):U=[],C=K}if(U.length===0)return;if(i)I.onLogs(U);else for(const K of U)I.onLogs([K])}catch(U){T&&U instanceof A0&&(O=!1),(D=I.onError)==null||D.call(I,U)}},{emitOnBegin:!0,interval:p});return async()=>{T&&await mt(t,Ix,"uninstallFilter")({filter:T}),B()}})})():(()=>{let S=!0,P=()=>S=!1;return(async()=>{try{const I=o?g1({abi:e,eventName:o,args:n}):[],{unsubscribe:C}=await t.transport.subscribe({params:["logs",{address:r,topics:I}],onData(T){var B;if(!S)return;const O=T.result;try{const{eventName:D,args:U}=w1({abi:e,data:O.data,topics:O.topics,strict:b}),K=Yo(O,{args:U,eventName:D});f([K])}catch(D){let U,K;if(D instanceof x0||D instanceof Rl){if(b)return;U=D.abiItem.name,K=(B=D.abiItem.inputs)==null?void 0:B.some(W=>!("name"in W&&W.name))}const Y=Yo(O,{args:K?[]:{},eventName:U});f([Y])}},onError(T){s==null||s(T)}});P=C,S||P()}catch(I){s==null||s(I)}})(),P})()}function L_({chain:t,currentChainId:e}){if(!t)throw new hG;if(e!==t.id)throw new dG({chain:t,currentChainId:e})}function Fve(t,{docsPath:e,...r}){const n=(()=>{const i=__(t,r);return i instanceof oy?t:i})();return new Zq(n,{docsPath:e,...r})}async function qp(t){const e=await t.request({method:"eth_chainId"});return rr(e)}async function D_(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]})}async function F_(t,e){var P,I,C,T;const{account:r=t.account,chain:n=t.chain,accessList:i,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A,..._}=e;if(!r)throw new y1({docsPath:"/docs/actions/wallet/sendTransaction"});const S=ls(r);try{v1(e);let O;if(n!==null&&(O=await mt(t,qp,"getChainId")({}),L_({currentChainId:O,chain:n})),S.type==="local"){const K=await mt(t,_x,"prepareTransactionRequest")({account:S,accessList:i,chain:n,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A,..._});O||(O=await mt(t,qp,"getChainId")({}));const Y=(P=n==null?void 0:n.serializers)==null?void 0:P.transaction,W=await S.signTransaction({...K,chainId:O},{serializer:Y});return await mt(t,D_,"sendRawTransaction")({serializedTransaction:W})}const B=(T=(C=(I=t.chain)==null?void 0:I.formatters)==null?void 0:C.transactionRequest)==null?void 0:T.format,U=(B||Ol)({...xx(_,{format:B}),accessList:i,data:o,from:S.address,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A});return await t.request({method:"eth_sendTransaction",params:[U]})}catch(O){throw Fve(O,{...e,account:S,chain:e.chain||void 0})}}async function gG(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:o,...s}){const f=pi({abi:e,args:n,functionName:o});return await mt(t,F_,"sendTransaction")({data:`${f}${i?i.replace("0x",""):""}`,to:r,...s})}function $ve({abi:t,address:e,publicClient:r,walletClient:n}){const i=r!=null,o=n!=null,s={};let f=!1,d=!1,p=!1;for(const b of t)if(b.type==="function"?b.stateMutability==="view"||b.stateMutability==="pure"?f=!0:d=!0:b.type==="event"&&(p=!0),f&&d&&p)break;return i&&(f&&(s.read=new Proxy({},{get(b,v){return(...A)=>{const{args:_,options:S}=av(A);return mt(r,Xs,"readContract")({abi:t,address:e,functionName:v,args:_,...S})}}})),d&&(s.simulate=new Proxy({},{get(b,v){return(...A)=>{const{args:_,options:S}=av(A);return mt(r,pG,"simulateContract")({abi:t,address:e,functionName:v,args:_,...S})}}})),p&&(s.createEventFilter=new Proxy({},{get(b,v){return(...A)=>{const _=t.find(I=>I.type==="event"&&I.name===v),{args:S,options:P}=a4(A,_);return mt(r,b_,"createContractEventFilter")({abi:t,address:e,eventName:v,args:S,...P})}}}),s.getEvents=new Proxy({},{get(b,v){return(...A)=>{const _=t.find(I=>I.type==="event"&&I.name===v),{args:S,options:P}=a4(A,_);return mt(r,B_,"getContractEvents")({abi:t,address:e,eventName:v,args:S,...P})}}}),s.watchEvent=new Proxy({},{get(b,v){return(...A)=>{const _=t.find(I=>I.type==="event"&&I.name===v),{args:S,options:P}=a4(A,_);return mt(r,mG,"watchContractEvent")({abi:t,address:e,eventName:v,args:S,...P})}}}))),o&&d&&(s.write=new Proxy({},{get(b,v){return(...A)=>{const{args:_,options:S}=av(A);return mt(n,gG,"writeContract")({abi:t,address:e,functionName:v,args:_,...S})}}})),(i||o)&&d&&(s.estimateGas=new Proxy({},{get(b,v){return(...A)=>{const{args:_,options:S}=av(A);return mt(r??n,cG,"estimateContractGas")({abi:t,address:e,functionName:v,args:_,...S,account:S.account??n.account})}}})),s.address=e,s.abi=t,s}function av(t){const e=t.length&&Array.isArray(t[0]),r=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:r,options:n}}function a4(t,e){let r=!1;Array.isArray(t[0])?r=!0:t.length===1?r=e.inputs.some(o=>o.indexed):t.length===2&&(r=!0);const n=r?t[0]:void 0,i=(r?t[1]:t[0])??{};return{args:n,options:i}}async function Uve(t,{chain:e}){const{id:r,name:n,nativeCurrency:i,rpcUrls:o,blockExplorers:s}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:ht(r),chainName:n,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:s?Object.values(s).map(({url:f})=>f):void 0}]})}function zve(t){const e=Ur(`0x${t.substring(4)}`).substring(26);return ny(`0x${e}`)}const rE=256;let fv=rE,cv;function jve(t=11){if(!cv||fv+t>rE*2){cv="",fv=0;for(let e=0;e{const C=I(P);for(const O in _)delete C[O];const T={...P,...C};return Object.assign(T,{extend:S(T)})}}return Object.assign(_,{extend:S(_)})}function nE(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,o)=>{const s=async({count:f=0}={})=>{const d=async({error:p})=>{const b=typeof e=="function"?e({count:f,error:p}):e;b&&await q6(b),s({count:f+1})};try{const p=await t();i(p)}catch(p){if(f"code"in t?t.code!==-1&&t.code!==-32004&&t.code!==-32005&&t.code!==-32042&&t.code!==-32603:t instanceof l0&&t.status?t.status!==403&&t.status!==408&&t.status!==413&&t.status!==429&&t.status!==500&&t.status!==502&&t.status!==503&&t.status!==504:!1;function Hve(t,{retryDelay:e=150,retryCount:r=3}={}){return async n=>nE(async()=>{try{return await t(n)}catch(i){const o=i;switch(o.code){case Pp.code:throw new Pp(o);case Cp.code:throw new Cp(o);case Ip.code:throw new Ip(o);case Tp.code:throw new Tp(o);case hl.code:throw new hl(o);case A0.code:throw new A0(o);case Rp.code:throw new Rp(o);case kp.code:throw new kp(o);case Bp.code:throw new Bp(o);case Op.code:throw new Op(o);case Np.code:throw new Np(o);case Lp.code:throw new Lp(o);case Gu.code:throw new Gu(o);case Dp.code:throw new Dp(o);case Fp.code:throw new Fp(o);case $p.code:throw new $p(o);case Up.code:throw new Up(o);case zp.code:throw new zp(o);case 5e3:throw new Gu(o);default:throw i instanceof qe?i:new tG(o)}}},{delay:({count:i,error:o})=>{var s;if(o&&o instanceof l0){const f=(s=o==null?void 0:o.headers)==null?void 0:s.get("Retry-After");if(f!=null&&f.match(/\d/))return parseInt(f)*1e3}return~~(1<!bG(i)})}function cy({key:t,name:e,request:r,retryCount:n=3,retryDelay:i=150,timeout:o,type:s},f){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:i,timeout:o,type:s},request:Hve(r,{retryCount:n,retryDelay:i}),value:f}}function qve(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:i}=e;return({retryCount:o})=>cy({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??o,retryDelay:i,type:"custom"})}function Gve(t,e={}){const{key:r="fallback",name:n="Fallback",rank:i=!1,retryCount:o,retryDelay:s}=e;return({chain:f,pollingInterval:d=4e3,timeout:p})=>{let b=t,v=()=>{};const A=cy({key:r,name:n,async request({method:_,params:S}){const P=async(I=0)=>{const C=b[I]({chain:f,retryCount:0,timeout:p});try{const T=await C.request({method:_,params:S});return v({method:_,params:S,response:T,transport:C,status:"success"}),T}catch(T){if(v({error:T,method:_,params:S,transport:C,status:"error"}),bG(T)||I===b.length-1)throw T;return P(I+1)}};return P()},retryCount:o,retryDelay:s,type:"fallback"},{onResponse:_=>v=_,transports:b.map(_=>_({chain:f,retryCount:0}))});if(i){const _=typeof i=="object"?i:{};Vve({chain:f,interval:_.interval??d,onTransports:S=>b=S,sampleCount:_.sampleCount,timeout:_.timeout,transports:b,weights:_.weights})}return A}}function Vve({chain:t,interval:e=4e3,onTransports:r,sampleCount:n=10,timeout:i=1e3,transports:o,weights:s={}}){const{stability:f=.7,latency:d=.3}=s,p=[],b=async()=>{const v=await Promise.all(o.map(async S=>{const P=S({chain:t,retryCount:0,timeout:i}),I=Date.now();let C,T;try{await P.request({method:"net_listening"}),T=1}catch{T=0}finally{C=Date.now()}return{latency:C-I,success:T}}));p.push(v),p.length>n&&p.shift();const A=Math.max(...p.map(S=>Math.max(...S.map(({latency:P})=>P)))),_=o.map((S,P)=>{const I=p.map(D=>D[P].latency),T=1-I.reduce((D,U)=>D+U,0)/I.length/A,O=p.map(D=>D[P].success),B=O.reduce((D,U)=>D+U,0)/O.length;return B===0?[0,P]:[d*T+f*B,P]}).sort((S,P)=>P[0]-S[0]);r(_.map(([,S])=>o[S])),await q6(e),b()};b()}class $_ extends qe{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}function Kve(){if(typeof WebSocket<"u")return WebSocket;if(typeof Je.global.WebSocket<"u")return Je.global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const jk=Kve();function yG(t,{errorInstance:e=new Error("timed out"),timeout:r,signal:n}){return new Promise((i,o)=>{(async()=>{let s;try{const f=new AbortController;r>0&&(s=setTimeout(()=>{n?f.abort():o(e)},r)),i(await t({signal:f==null?void 0:f.signal}))}catch(f){f.name==="AbortError"&&o(e),o(f)}finally{clearTimeout(s)}})()})}let iE=0;async function Wve(t,{body:e,fetchOptions:r={},timeout:n=1e4}){var f;const{headers:i,method:o,signal:s}=r;try{const d=await yG(async({signal:b})=>await fetch(t,{...r,body:Array.isArray(e)?fn(e.map(A=>({jsonrpc:"2.0",id:A.id??iE++,...A}))):fn({jsonrpc:"2.0",id:e.id??iE++,...e}),headers:{...i,"Content-Type":"application/json"},method:o||"POST",signal:s||(n>0?b:void 0)}),{errorInstance:new k6({body:e,url:t}),timeout:n,signal:!0});let p;if((f=d.headers.get("Content-Type"))!=null&&f.startsWith("application/json")?p=await d.json():p=await d.text(),!d.ok)throw new l0({body:e,details:fn(p.error)||d.statusText,headers:d.headers,status:d.status,url:t});return p}catch(d){throw d instanceof l0||d instanceof k6?d:new l0({body:e,details:d.message,url:t})}}const f4=new Map;async function c4(t){let e=f4.get(t);if(e)return e;const{schedule:r}=N_({id:t,fn:async()=>{const o=new jk(t),s=new Map,f=new Map,d=({data:b})=>{const v=JSON.parse(b),A=v.method==="eth_subscription",_=A?v.params.subscription:v.id,S=A?f:s,P=S.get(_);P&&P({data:b}),A||S.delete(_)},p=()=>{f4.delete(t),o.removeEventListener("close",p),o.removeEventListener("message",d)};return o.addEventListener("close",p),o.addEventListener("message",d),o.readyState===jk.CONNECTING&&await new Promise((b,v)=>{o&&(o.onopen=b,o.onerror=v)}),e=Object.assign(o,{requests:s,subscriptions:f}),f4.set(t,e),[e]}}),[n,[i]]=await r();return i}function Jve(t,{body:e,onResponse:r}){if(t.readyState===t.CLOSED||t.readyState===t.CLOSING)throw new eG({body:e,url:t.url,details:"Socket is closed."});const n=iE++,i=({data:o})=>{var f;const s=JSON.parse(o);typeof s.id=="number"&&n!==s.id||(r==null||r(s),e.method==="eth_subscribe"&&typeof s.result=="string"&&t.subscriptions.set(s.result,i),e.method==="eth_unsubscribe"&&t.subscriptions.delete((f=e.params)==null?void 0:f[0]))};return t.requests.set(n,i),t.send(JSON.stringify({jsonrpc:"2.0",...e,id:n})),t}async function Zve(t,{body:e,timeout:r=1e4}){return yG(()=>new Promise(n=>rh.webSocket(t,{body:e,onResponse:n})),{errorInstance:new k6({body:e,url:t.url}),timeout:r})}const rh={http:Wve,webSocket:Jve,webSocketAsync:Zve};function du(t,e={}){const{batch:r,fetchOptions:n,key:i="http",name:o="HTTP JSON-RPC",retryDelay:s}=e;return({chain:f,retryCount:d,timeout:p})=>{const{batchSize:b=1e3,wait:v=0}=typeof r=="object"?r:{},A=e.retryCount??d,_=p??e.timeout??1e4,S=t||(f==null?void 0:f.rpcUrls.default.http[0]);if(!S)throw new $_;return cy({key:i,name:o,async request({method:P,params:I}){const C={method:P,params:I},{schedule:T}=N_({id:`${t}`,wait:v,shouldSplitBatch(U){return U.length>b},fn:U=>rh.http(S,{body:U,fetchOptions:n,timeout:_}),sort:(U,K)=>U.id-K.id}),O=async U=>r?T(U):[await rh.http(S,{body:U,fetchOptions:n,timeout:_})],[{error:B,result:D}]=await O(C);if(B)throw new wx({body:C,error:B,url:S});return D},retryCount:A,retryDelay:s,timeout:_,type:"http"},{fetchOptions:n,url:t})}}function U_(t,e){var n,i,o;if(!(t instanceof qe))return!1;const r=t.walk(s=>s instanceof R6);return r instanceof R6?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((i=r.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||(o=r.reason)!=null&&o.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===qq[50]):!1}function vG(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return jt(e)?e:null}function Um(t){let e=new Uint8Array(32).fill(0);if(!t)return $i(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const i=vG(r[n]),o=i?Jn(i):Ur(La(r[n]),"bytes");e=Ur(Zo([e,o]),"bytes")}return $i(e)}function Yve(t){return`[${t.slice(2)}]`}function wG(t){const e=new Uint8Array(32).fill(0);return t?vG(t)||Ur(La(t)):$i(e)}function Tx(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(La(e).byteLength+2);let n=0;const i=e.split(".");for(let o=0;o255&&(s=La(Yve(wG(i[o])))),r[n]=s.length,r.set(s,n+1),n+=s.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Qve(t,{blockNumber:e,blockTag:r,coinType:n,name:i,universalResolverAddress:o}){let s=o;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=Ll({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const f=pi({abi:Uk,functionName:"addr",...n!=null?{args:[Um(i),BigInt(n)]}:{args:[Um(i)]}}),d=await mt(t,Xs,"readContract")({address:s,abi:lG,functionName:"resolve",args:[Ft(Tx(i)),f],blockNumber:e,blockTag:r});if(d[0]==="0x")return null;const p=Nl({abi:Uk,args:n!=null?[Um(i),BigInt(n)]:void 0,functionName:"addr",data:d[0]});return p==="0x"||Ni(p)==="0x00"?null:p}catch(f){if(U_(f,"resolve"))return null;throw f}}class Xve extends qe{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class cd extends qe{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class Rx extends qe{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class xG extends qe{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const e2e=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,t2e=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,r2e=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,n2e=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function i2e(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function Hk(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function EG({uri:t,gatewayUrls:e}){const r=r2e.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=Hk(e==null?void 0:e.ipfs,"https://ipfs.io"),i=Hk(e==null?void 0:e.arweave,"https://arweave.net"),o=t.match(e2e),{protocol:s,subpath:f,target:d,subtarget:p=""}=(o==null?void 0:o.groups)||{},b=s==="ipns:/"||f==="ipns/",v=s==="ipfs:/"||f==="ipfs/"||t2e.test(t);if(t.startsWith("http")&&!b&&!v){let _=t;return e!=null&&e.arweave&&(_=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:_,isOnChain:!1,isEncoded:!1}}if((b||v)&&d)return{uri:`${n}/${b?"ipns":"ipfs"}/${d}${p}`,isOnChain:!1,isEncoded:!1};if(s==="ar:/"&&d)return{uri:`${i}/${d}${p||""}`,isOnChain:!1,isEncoded:!1};let A=t.replace(n2e,"");if(A.startsWith("i.json());return await z_({gatewayUrls:t,uri:AG(r)})}catch{throw new Rx({uri:e})}}async function z_({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=EG({uri:e,gatewayUrls:t});if(n||await i2e(r))return r;throw new Rx({uri:e})}function s2e(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,i]=e.split("/"),[o,s]=r.split(":"),[f,d]=n.split(":");if(!o||o.toLowerCase()!=="eip155")throw new cd({reason:"Only EIP-155 supported"});if(!s)throw new cd({reason:"Chain ID not found"});if(!d)throw new cd({reason:"Contract address not found"});if(!i)throw new cd({reason:"Token ID not found"});if(!f)throw new cd({reason:"ERC namespace not found"});return{chainID:parseInt(s),namespace:f.toLowerCase(),contractAddress:d,tokenID:i}}async function a2e(t,{nft:e}){if(e.namespace==="erc721")return Xs(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return Xs(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new xG({namespace:e.namespace})}async function f2e(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?c2e(t,{gatewayUrls:e,record:r}):z_({uri:r,gatewayUrls:e})}async function c2e(t,{gatewayUrls:e,record:r}){const n=s2e(r),i=await a2e(t,{nft:n}),{uri:o,isOnChain:s,isEncoded:f}=EG({uri:i,gatewayUrls:e});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){const p=f?atob(o.replace("data:application/json;base64,","")):o,b=JSON.parse(p);return z_({uri:AG(b),gatewayUrls:e})}let d=n.tokenID;return n.namespace==="erc1155"&&(d=d.replace("0x","").padStart(64,"0")),o2e({gatewayUrls:e,uri:o.replace(/(?:0x)?{id}/,d)})}async function SG(t,{blockNumber:e,blockTag:r,name:n,key:i,universalResolverAddress:o}){let s=o;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=Ll({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const f=await mt(t,Xs,"readContract")({address:s,abi:lG,functionName:"resolve",args:[Ft(Tx(n)),pi({abi:$k,functionName:"text",args:[Um(n),i]})],blockNumber:e,blockTag:r});if(f[0]==="0x")return null;const d=Nl({abi:$k,functionName:"text",data:f[0]});return d===""?null:d}catch(f){if(U_(f,"resolve"))return null;throw f}}async function u2e(t,{blockNumber:e,blockTag:r,gatewayUrls:n,name:i,universalResolverAddress:o}){const s=await mt(t,SG,"getEnsText")({blockNumber:e,blockTag:r,key:"avatar",name:i,universalResolverAddress:o});if(!s)return null;try{return await f2e(t,{record:s,gatewayUrls:n})}catch{return null}}async function l2e(t,{address:e,blockNumber:r,blockTag:n,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ll({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const s=`${e.toLowerCase().substring(2)}.addr.reverse`;try{const[f,d]=await mt(t,Xs,"readContract")({address:o,abi:Mve,functionName:"reverse",args:[Ft(Tx(s))],blockNumber:r,blockTag:n});return e.toLowerCase()!==d.toLowerCase()?null:f}catch(f){if(U_(f,"reverse"))return null;throw f}}async function d2e(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ll({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[s]=await mt(t,Xs,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Ft(Tx(n))],blockNumber:e,blockTag:r});return s}async function h2e(t){const e=bx(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}async function MG(t,{address:e,args:r,event:n,events:i,fromBlock:o,strict:s,toBlock:f}={}){const d=i??(n?[n]:void 0),p=bx(t,{method:"eth_newFilter"});let b=[];d&&(b=[d.flatMap(A=>g1({abi:[A],eventName:A.name,args:r}))],n&&(b=b[0]));const v=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof o=="bigint"?ht(o):o,toBlock:typeof f=="bigint"?ht(f):f,...b.length?{topics:b}:{}}]});return{abi:d,args:r,eventName:n?n.name:void 0,fromBlock:o,id:v,request:p(v),strict:s,toBlock:f,type:"event"}}async function _G(t){const e=bx(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function p2e(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r?ht(r):void 0,o=await t.request({method:"eth_getBalance",params:[e,i||n]});return BigInt(o)}async function m2e(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const i=r!==void 0?ht(r):void 0;let o;return e?o=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):o=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[i||n]}),rr(o)}async function PG(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r!==void 0?ht(r):void 0,o=await t.request({method:"eth_getCode",params:[e,i||n]});if(o!=="0x")return o}function g2e(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(r=>r.map(n=>BigInt(n)))}}async function b2e(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){const o=r?ht(r):void 0,s=await t.request({method:"eth_feeHistory",params:[ht(e),o||n,i]});return g2e(s)}async function y2e(t,{filter:e}){const r=e.strict??!1;return(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(i=>{var o;try{const{eventName:s,args:f}="abi"in e&&e.abi?w1({abi:e.abi,data:i.data,topics:i.topics,strict:r}):{eventName:void 0,args:void 0};return Yo(i,{args:f,eventName:s})}catch(s){let f,d;if(s instanceof x0||s instanceof Rl){if("strict"in e&&e.strict)return;f=s.abiItem.name,d=(o=s.abiItem.inputs)==null?void 0:o.some(p=>!("name"in p&&p.name))}return Yo(i,{args:d?[]:{},eventName:f})}}).filter(Boolean)}class v2e extends qe{constructor({callbackSelector:e,cause:r,data:n,extraData:i,sender:o,urls:s}){var f;super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],(f=r.metaMessages)!=null&&f.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(d=>` ${p1(d)}`)],` Sender: ${o}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w2e extends qe{constructor({result:e,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${p1(r)}`,`Response: ${fn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class x2e extends qe{constructor({sender:e,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function kx(t,e){if(!tn(t))throw new ei({address:t});if(!tn(e))throw new ei({address:e});return t.toLowerCase()===e.toLowerCase()}const CG="0x556f1830",j_={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function IG(t,{blockNumber:e,blockTag:r,data:n,to:i}){const{args:o}=y_({data:n,abi:[j_]}),[s,f,d,p,b]=o;try{if(!kx(i,s))throw new x2e({sender:s,to:i});const v=await H_({data:d,sender:s,urls:f}),{data:A}=await sy(t,{blockNumber:e,blockTag:r,data:Zo([p,oc([{type:"bytes"},{type:"bytes"}],[v,b])]),to:i});return A}catch(v){throw new v2e({callbackSelector:p,cause:v,data:n,extraData:b,sender:s,urls:f})}}async function H_({data:t,sender:e,urls:r}){var i;let n=new Error("An unknown error occurred.");for(let o=0;or.id===e)}const S2e=/^(.*)\[([0-9]*)\]$/,RG=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,kG=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function E1({domain:t,message:e,primaryType:r,types:n}){const i=typeof t>"u"?{}:t,o={EIP712Domain:uy({domain:i}),...n};Bx({domain:i,message:e,primaryType:r,types:o});const s=["0x1901"];return i&&s.push(q_({domain:i,types:o})),r!=="EIP712Domain"&&s.push(BG({data:e,primaryType:r,types:o})),Ur(Zo(s))}function q_({domain:t,types:e}){return BG({data:t,primaryType:"EIP712Domain",types:e})}function BG({data:t,primaryType:e,types:r}){const n=OG({data:t,primaryType:e,types:r});return Ur(n)}function OG({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],i=[M2e({primaryType:e,types:r})];for(const o of r[e]){const[s,f]=LG({types:r,name:o.name,type:o.type,value:t[o.name]});n.push(s),i.push(f)}return oc(n,i)}function M2e({primaryType:t,types:e}){const r=Ft(_2e({primaryType:t,types:e}));return Ur(r)}function _2e({primaryType:t,types:e}){let r="";const n=NG({primaryType:t,types:e});n.delete(t);const i=[t,...Array.from(n).sort()];for(const o of i)r+=`${o}(${e[o].map(({name:s,type:f})=>`${f} ${s}`).join(",")})`;return r}function NG({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),i=n==null?void 0:n[0];if(r.has(i)||e[i]===void 0)return r;r.add(i);for(const o of e[i])NG({primaryType:o.type,types:e},r);return r}function LG({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},Ur(OG({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},Ur(n)];if(r==="string")return[{type:"bytes32"},Ur(Ft(n))];if(r.lastIndexOf("]")===r.length-1){const i=r.slice(0,r.lastIndexOf("[")),o=n.map(s=>LG({name:e,type:i,types:t,value:s}));return[{type:"bytes32"},Ur(oc(o.map(([s])=>s),o.map(([,s])=>s)))]}return[{type:r},n]}function Bx({domain:t,message:e,primaryType:r,types:n}){const i=n,o=(s,f)=>{for(const d of s){const{name:p,type:b}=d,v=b,A=f[p],_=v.match(kG);if(_&&(typeof A=="number"||typeof A=="bigint")){const[I,C,T]=_;ht(A,{signed:C==="int",size:parseInt(T)/8})}if(v==="address"&&typeof A=="string"&&!tn(A))throw new ei({address:A});const S=v.match(RG);if(S){const[I,C]=S;if(C&&Wr(A)!==parseInt(C))throw new o_({expectedSize:parseInt(C),givenSize:Wr(A)})}const P=i[v];P&&o(P,A)}};if(i.EIP712Domain&&t&&o(i.EIP712Domain,t),r!=="EIP712Domain"){const s=i[r];o(s,e)}}function uy({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},typeof(t==null?void 0:t.chainId)=="number"&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function P2e({domain:t}){return q_({domain:t,types:{EIP712Domain:uy({domain:t})}})}function C2e({abi:t,data:e}){const r=Ar(e,0,4),n=t.find(i=>i.type==="function"&&r===m1(Qs(i)));if(!n)throw new gq(r,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:n.name,args:"inputs"in n&&n.inputs&&n.inputs.length>0?kl(n.inputs,Ar(e,4)):void 0}}const u4="/docs/contract/encodeDeployData";function G_({abi:t,args:e,bytecode:r}){if(!e||e.length===0)return r;const n=t.find(o=>"type"in o&&o.type==="constructor");if(!n)throw new t_({docsPath:u4});if(!("inputs"in n))throw new kg({docsPath:u4});if(!n.inputs||n.inputs.length===0)throw new kg({docsPath:u4});const i=oc(n.inputs,e);return Va([r,i])}const l4="/docs/contract/encodeErrorResult";function I2e({abi:t,errorName:e,args:r}){let n=t[0];if(e&&(n=H0({abi:t,args:r,name:e}),!n))throw new Q7(e,{docsPath:l4});if(n.type!=="error")throw new Q7(void 0,{docsPath:l4});const i=Qs(n),o=m1(i);let s="0x";if(r&&r.length>0){if(!n.inputs)throw new hq(n.name,{docsPath:l4});s=oc(n.inputs,r)}return Va([o,s])}const T2e="/docs/contract/encodeFunctionResult";function R2e({abi:t,functionName:e,result:r}){let n=t[0];if(e&&(n=H0({abi:t,name:e}),!n))throw new dl(e,{docsPath:"/docs/contract/encodeFunctionResult"});if(n.type!=="function")throw new dl(void 0,{docsPath:"/docs/contract/encodeFunctionResult"});if(!n.outputs)throw new i_(n.name,{docsPath:T2e});let i=Array.isArray(r)?r:[r];return n.outputs.length===0&&!i[0]&&(i=[]),oc(n.outputs,i)}function zm(t,e){if(t.length!==e.length)throw new r_({expectedLength:t.length,givenLength:e.length});const r=[];for(let n=0;nthis.bytes.length-1)throw new k2e({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new qk({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},incrementPosition(t){if(t<0)throw new qk({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const r=e??this.position;return this.assertPosition(r+t-1),this.bytes.subarray(r,r+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){const t=this.inspectByte();return this.position++,t},readBytes(t){const e=this.inspectBytes(t);return this.position+=t,e},readUint8(){const t=this.inspectUint8();return this.position+=1,t},readUint16(){const t=this.inspectUint16();return this.position+=2,t},readUint24(){const t=this.inspectUint24();return this.position+=3,t},readUint32(){const t=this.inspectUint32();return this.position+=4,t},setPosition(t){this.assertPosition(t),this.position=t}};function FG(t){const e=Object.create(B2e);return e.bytes=t,e.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),e}function Fl(t,e="hex"){const r=$G(t),n=FG(new Uint8Array(r.length));return r.encode(n),e==="hex"?$i(n.bytes):n.bytes}function O2e(t,e="bytes"){return Fl(t,e)}function N2e(t,e="hex"){return Fl(t,e)}function $G(t){return Array.isArray(t)?L2e(t.map(e=>$G(e))):D2e(t)}function L2e(t){const e=t.reduce((i,o)=>i+o.length,0),r=UG(e);return{length:(()=>e<=55?1+e:1+r+e)(),encode(i){e<=55?i.pushByte(192+e):(i.pushByte(192+55+r),r===1?i.pushUint8(e):r===2?i.pushUint16(e):r===3?i.pushUint24(e):i.pushUint32(e));for(const{encode:o}of t)o(i)}}}function D2e(t){const e=typeof t=="string"?ic(t):t,r=UG(e.length);return{length:(()=>e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+r+e.length)(),encode(i){e.length===1&&e[0]<128?i.pushBytes(e):e.length<=55?(i.pushByte(128+e.length),i.pushBytes(e)):(i.pushByte(128+55+r),r===1?i.pushUint8(e.length):r===2?i.pushUint16(e.length):r===3?i.pushUint24(e.length):i.pushUint32(e.length),i.pushBytes(e))}}}function UG(t){if(t<2**8)return 1;if(t<2**16)return 2;if(t<2**24)return 3;if(t<2**32)return 4;throw new qe("Length is too large.")}function zG(t){return t.opcode==="CREATE2"?HG(t):jG(t)}function jG(t){const e=Jn(E0(t.from));let r=Jn(t.nonce);return r[0]===0&&(r=new Uint8Array([])),E0(`0x${Ur(Fl([e,r],"bytes")).slice(26)}`)}function HG(t){const e=Jn(E0(t.from)),r=zs(oE(t.salt)?t.salt:Jn(t.salt),{size:32}),n=(()=>"bytecodeHash"in t?oE(t.bytecodeHash)?t.bytecodeHash:Jn(t.bytecodeHash):Ur(t.bytecode,"bytes"))();return E0(Ar(Ur(Zo([Jn("0xff"),e,r,n])),12))}const F2e={"0x0":"reverted","0x1":"success"};function V_(t){return{...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(e=>Yo(e)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?rr(t.transactionIndex):null,status:t.status?F2e[t.status]:null,type:t.type?C_[t.type]||t.type:null}}const $2e=Ex("transactionReceipt",V_);function U2e(t,e){const r=typeof e=="string"?{to:e}:e,n=r.to;return n==="number"?GG(t,r):n==="bigint"?sE(t,r):n==="boolean"?qG(t,r):n==="string"?VG(t,r):$i(t,r)}function sE(t,e={}){typeof e.size<"u"&&us(t,{size:e.size});const r=$i(t,e);return Sr(r)}function qG(t,e={}){let r=t;if(typeof e.size<"u"&&(us(r,{size:e.size}),r=Ni(r)),r.length>1||r[0]>1)throw new Mq(r);return!!r[0]}function GG(t,e={}){typeof e.size<"u"&&us(t,{size:e.size});const r=$i(t,e);return rr(r)}function VG(t,e={}){let r=t;return typeof e.size<"u"&&(us(r,{size:e.size}),r=Ni(r,{dir:"right"})),new TextDecoder().decode(r)}function K_(t,e="hex"){const r=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Pq(t);return ic(t)}return t})(),n=FG(r);return KG(n,e)}function KG(t,e="hex"){if(t.bytes.length===0)return e==="hex"?$i(t.bytes):t.bytes;const r=t.readByte();if(r<128&&t.decrementPosition(1),r<192){const i=Gk(t,r,128),o=t.readBytes(i);return e==="hex"?$i(o):o}const n=Gk(t,r,192);return z2e(t,n,e)}function Gk(t,e,r){if(r===128&&e<128)return 1;if(e<=r+55)return e-r;if(e===r+55+1)return t.readUint8();if(e===r+55+2)return t.readUint16();if(e===r+55+3)return t.readUint24();if(e===r+55+4)return t.readUint32();throw new qe("Invalid RLP prefix")}function z2e(t,e,r){const n=t.position,i=[];for(;t.position-nPromise.resolve().then(()=>zxe),void 0);return`0x${o.Signature.fromCompact(r.substring(2,130)).addRecoveryBit(i-27).recoverPublicKey(n.substring(2)).toHex(!1)}`}async function W_({hash:t,signature:e}){return zve(await JG({hash:t,signature:e}))}const ZG=`Ethereum Signed Message: -`;function ly(t,e){const r=(()=>typeof t=="string"?La(t):t.raw instanceof Uint8Array?t.raw:Jn(t.raw))(),n=La(`${ZG}${r.length}`);return Ur(Zo([n,r]),e)}async function YG({message:t,signature:e}){return W_({hash:ly(t),signature:e})}async function QG({domain:t,message:e,primaryType:r,signature:n,types:i}){return W_({hash:E1({domain:t,message:e,primaryType:r,types:i}),signature:n})}async function j2e({address:t,message:e,signature:r}){return kx(E0(t),await YG({message:e,signature:r}))}async function H2e({address:t,domain:e,message:r,primaryType:n,signature:i,types:o}){return kx(E0(t),await QG({domain:e,message:r,primaryType:n,signature:i,types:o}))}function XG(t){const e=p_(t,0,1);if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&rr(e)>=192)return"legacy";throw new Wq({serializedType:e})}function J_(t){const{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=t;if(e<=0)throw new Px({chainId:e});if(o&&!tn(o))throw new ei({address:o});if(n)throw new qe("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(i&&i>2n**256n-1n)throw new S0({maxFeePerGas:i});if(r&&i&&r>i)throw new Hp({maxFeePerGas:i,maxPriorityFeePerGas:r})}function Z_(t){const{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=t;if(e<=0)throw new Px({chainId:e});if(o&&!tn(o))throw new ei({address:o});if(r||i)throw new qe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>2n**256n-1n)throw new S0({maxFeePerGas:n})}function Y_(t){const{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o,accessList:s}=t;if(o&&!tn(o))throw new ei({address:o});if(typeof e<"u"&&e<=0)throw new Px({chainId:e});if(r||i)throw new qe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>2n**256n-1n)throw new S0({maxFeePerGas:n});if(s)throw new qe("`accessList` is not a valid Legacy Transaction attribute.")}function q2e(t){const e=XG(t);return e==="eip1559"?G2e(t):e==="eip2930"?V2e(t):K2e(t)}function G2e(t){const e=eV(t),[r,n,i,o,s,f,d,p,b,v,A,_]=e;if(!(e.length===9||e.length===12))throw new yx({attributes:{chainId:r,nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:o,gas:s,to:f,value:d,data:p,accessList:b,...e.length>9?{v,r:A,s:_}:{}},serializedTransaction:t,type:"eip1559"});const S={chainId:rr(r),type:"eip1559"};return jt(f)&&f!=="0x"&&(S.to=f),jt(s)&&s!=="0x"&&(S.gas=Sr(s)),jt(p)&&p!=="0x"&&(S.data=p),jt(n)&&n!=="0x"&&(S.nonce=rr(n)),jt(d)&&d!=="0x"&&(S.value=Sr(d)),jt(o)&&o!=="0x"&&(S.maxFeePerGas=Sr(o)),jt(i)&&i!=="0x"&&(S.maxPriorityFeePerGas=Sr(i)),b.length!==0&&b!=="0x"&&(S.accessList=tV(b)),J_(S),{...e.length===12?rV(e):void 0,...S}}function V2e(t){const e=eV(t),[r,n,i,o,s,f,d,p,b,v,A]=e;if(!(e.length===8||e.length===11))throw new yx({attributes:{chainId:r,nonce:n,gasPrice:i,gas:o,to:s,value:f,data:d,accessList:p,...e.length>8?{v:b,r:v,s:A}:{}},serializedTransaction:t,type:"eip2930"});const _={chainId:rr(r),type:"eip2930"};return jt(s)&&s!=="0x"&&(_.to=s),jt(o)&&o!=="0x"&&(_.gas=Sr(o)),jt(d)&&d!=="0x"&&(_.data=d),jt(n)&&n!=="0x"&&(_.nonce=rr(n)),jt(f)&&f!=="0x"&&(_.value=Sr(f)),jt(i)&&i!=="0x"&&(_.gasPrice=Sr(i)),p.length!==0&&p!=="0x"&&(_.accessList=tV(p)),Z_(_),{...e.length===11?rV(e):void 0,..._}}function K2e(t){const e=K_(t,"hex"),[r,n,i,o,s,f,d,p,b]=e;if(!(e.length===6||e.length===9))throw new yx({attributes:{nonce:r,gasPrice:n,gas:i,to:o,value:s,data:f,...e.length>6?{v:d,r:p,s:b}:{}},serializedTransaction:t,type:"legacy"});const v={type:"legacy"};if(jt(o)&&o!=="0x"&&(v.to=o),jt(i)&&i!=="0x"&&(v.gas=Sr(i)),jt(f)&&f!=="0x"&&(v.data=f),jt(r)&&r!=="0x"&&(v.nonce=rr(r)),jt(s)&&s!=="0x"&&(v.value=Sr(s)),jt(n)&&n!=="0x"&&(v.gasPrice=Sr(n)),Y_(v),e.length===6)return v;const A=jt(d)&&d!=="0x"?Sr(d):0n;if(b==="0x"&&p==="0x")return A>0&&(v.chainId=Number(A)),v;const _=A,S=Number((_-35n)/2n);if(S>0)v.chainId=S;else if(_!==27n&&_!==28n)throw new E_({v:_});return v.v=_,v.s=b,v.r=p,v}function eV(t){return K_(`0x${t.slice(4)}`,"hex")}function tV(t){const e=[];for(let r=0;rWG(o)?o:Ni(o))})}return e}function rV(t){const e=t.slice(-3),r=e[0]==="0x"||Sr(e[0])===0n?27n:28n;return{r:js(e[1],{size:32}),s:js(e[2],{size:32}),v:r,yParity:r===27n?0:1}}function Q_(t){if(!t||t.length===0)return[];const e=[];for(let r=0;re.v===0n?"0x":e.v===1n?Ft(1):e.v===27n?"0x":Ft(1))();A.push(_,Ni(e.r),Ni(e.s))}return Va(["0x02",Fl(A)])}function J2e(t,e){const{chainId:r,gas:n,data:i,nonce:o,to:s,value:f,accessList:d,gasPrice:p}=t;Z_(t);const b=Q_(d),v=[Ft(r),o?Ft(o):"0x",p?Ft(p):"0x",n?Ft(n):"0x",s??"0x",f?Ft(f):"0x",i??"0x",b];if(e){const A=(()=>e.v===0n?"0x":e.v===1n?Ft(1):e.v===27n?"0x":Ft(1))();v.push(A,Ni(e.r),Ni(e.s))}return Va(["0x01",Fl(v)])}function Z2e(t,e){const{chainId:r=0,gas:n,data:i,nonce:o,to:s,value:f,gasPrice:d}=t;Y_(t);let p=[o?Ft(o):"0x",d?Ft(d):"0x",n?Ft(n):"0x",s??"0x",f?Ft(f):"0x",i??"0x"];if(e){const b=(()=>{if(r>0)return BigInt(r*2)+BigInt(35n+e.v-27n);if(e.v>=35n)return(e.v-35n)/2n>0?e.v:27n+(e.v===35n?0n:1n);const v=27n+(e.v===27n?0n:1n);if(e.v!==v)throw new E_({v:e.v});return v})();p=[...p,Ft(b),e.r,e.s]}else r>0&&(p=[...p,Ft(r),"0x","0x"]);return Fl(p)}function X_(t,e){let[r,n="0"]=t.split(".");const i=r.startsWith("-");if(i&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>e){const[o,s,f]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],d=Math.round(+`${s}.${f}`);d>9?n=`${BigInt(o)+BigInt(1)}0`.padStart(o.length+1,"0"):n=`${o}${d}`,n.length>e&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${i?"-":""}${r}${n}`)}function Y2e(t,e="wei"){return X_(t,v_[e])}function Q2e(t,e="wei"){return X_(t,w_[e])}function X2e(t){return t.map(e=>({...e,value:BigInt(e.value)}))}function e6e(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?rr(t.nonce):void 0,storageProof:t.storageProof?X2e(t.storageProof):void 0}}async function t6e(t,{address:e,blockNumber:r,blockTag:n,storageKeys:i}){const o=n??"latest",s=r!==void 0?ht(r):void 0,f=await t.request({method:"eth_getProof",params:[e,i,s||o]});return e6e(f)}async function r6e(t,{address:e,blockNumber:r,blockTag:n="latest",slot:i}){const o=r!==void 0?ht(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,i,o||n]})}async function eP(t,{blockHash:e,blockNumber:r,blockTag:n,hash:i,index:o}){var b,v,A;const s=n||"latest",f=r!==void 0?ht(r):void 0;let d=null;if(i?d=await t.request({method:"eth_getTransactionByHash",params:[i]}):e?d=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,ht(o)]}):(f||s)&&(d=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[f||s,ht(o)]})),!d)throw new A_({blockHash:e,blockNumber:r,blockTag:s,hash:i,index:o});return(((A=(v=(b=t.chain)==null?void 0:b.formatters)==null?void 0:v.transaction)==null?void 0:A.format)||Sx)(d)}async function n6e(t,{hash:e,transactionReceipt:r}){const[n,i]=await Promise.all([mt(t,fy,"getBlockNumber")({}),e?mt(t,eP,"getBlockNumber")({hash:e}):void 0]),o=(r==null?void 0:r.blockNumber)||(i==null?void 0:i.blockNumber);return o?n-o+1n:0n}async function aE(t,{hash:e}){var i,o,s;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new S_({hash:e});return(((s=(o=(i=t.chain)==null?void 0:i.formatters)==null?void 0:o.transactionReceipt)==null?void 0:s.format)||V_)(r)}async function i6e(t,e){var P;const{allowFailure:r=!0,batchSize:n,blockNumber:i,blockTag:o,contracts:s,multicallAddress:f}=e,d=n??(typeof((P=t.batch)==null?void 0:P.multicall)=="object"&&t.batch.multicall.batchSize||1024);let p=f;if(!p){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");p=Ll({blockNumber:i,chain:t.chain,contract:"multicall3"})}const b=[[]];let v=0,A=0;for(let I=0;I0&&A>d&&b[v].length>0&&(v++,A=(D.length-2)/2,b[v]=[]),b[v]=[...b[v],{allowFailure:!0,callData:D,target:T}]}catch(D){const U=jp(D,{abi:C,address:T,args:O,docsPath:"/docs/contract/multicall",functionName:B});if(!r)throw U;b[v]=[...b[v],{allowFailure:!0,callData:"0x",target:T}]}}const _=await Promise.allSettled(b.map(I=>mt(t,Xs,"readContract")({abi:j6,address:p,args:[I],blockNumber:i,blockTag:o,functionName:"aggregate3"}))),S=[];for(let I=0;I<_.length;I++){const C=_[I];if(C.status==="rejected"){if(!r)throw C.reason;for(let O=0;Ot instanceof Uint8Array,a6e=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Gp(t){if(!Nx(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rn+i.length,0));let r=0;return t.forEach(n=>{if(!Nx(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function sV(t,e){if(t.length!==e.length)return!1;for(let r=0;riV;t>>=Ox,e+=1);return e}function u6e(t,e){return t>>BigInt(e)&Ox}const l6e=(t,e,r)=>t|(r?Ox:iV)<(s6e<new Uint8Array(t),Vk=t=>Uint8Array.from(t);function aV(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=d4(t),i=d4(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},f=(...v)=>r(i,n,...v),d=(v=d4())=>{i=f(Vk([0]),v),n=f(),v.length!==0&&(i=f(Vk([1]),v),n=f())},p=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let v=0;const A=[];for(;v{s(),d(v);let _;for(;!(_=A(p()));)d();return s(),_}}const d6e={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function A1(t,e,r={}){const n=(i,o,s)=>{const f=d6e[o];if(typeof f!="function")throw new Error(`Invalid validator "${o}", expected function`);const d=t[i];if(!(s&&d===void 0)&&!f(d,t))throw new Error(`Invalid param ${String(i)}=${d} (${typeof d}), expected ${o}`)};for(const[i,o]of Object.entries(e))n(i,o,!1);for(const[i,o]of Object.entries(r))n(i,o,!0);return t}const h6e=Object.freeze(Object.defineProperty({__proto__:null,bitGet:u6e,bitLen:c6e,bitMask:iP,bitSet:l6e,bytesToHex:Gp,bytesToNumberBE:ui,bytesToNumberLE:rP,concatBytes:to,createHmacDrbg:aV,ensureBytes:Gn,equalBytes:sV,hexToBytes:Vp,hexToNumber:tP,numberToBytesBE:_0,numberToBytesLE:nP,numberToHexUnpadded:oV,numberToVarBytesBE:f6e,utf8ToBytes:Lx,validateObject:A1},Symbol.toStringTag,{value:"Module"}));function p6e(t,e){const r=jt(t)?Jn(t):t,n=jt(e)?Jn(e):e;return sV(r,n)}async function fV(t,{address:e,hash:r,signature:n,...i}){const o=jt(n)?n:Ft(n);try{const{data:s}=await mt(t,sy,"call")({data:G_({abi:_ve,args:[e,r,o],bytecode:o6e}),...i});return p6e(s??"0x0","0x1")}catch(s){if(s instanceof M_)return!1;throw s}}async function m6e(t,{address:e,message:r,signature:n,...i}){const o=ly(r);return fV(t,{address:e,hash:o,signature:n,...i})}async function g6e(t,{address:e,signature:r,message:n,primaryType:i,types:o,domain:s,...f}){const d=E1({message:n,primaryType:i,types:o,domain:s});return fV(t,{address:e,hash:d,signature:r,...f})}function cV(t,{emitOnBegin:e=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:o,pollingInterval:s=t.pollingInterval}){const f=typeof o<"u"?o:t.transport.type!=="webSocket";let d;return f?(()=>{const v=fn(["watchBlockNumber",t.uid,e,r,s]);return x1(v,{onBlockNumber:n,onError:i},A=>ay(async()=>{var _;try{const S=await mt(t,fy,"getBlockNumber")({cacheTime:0});if(d){if(S===d)return;if(S-d>1&&r)for(let P=d+1n;Pd)&&(A.onBlockNumber(S,d),d=S)}catch(S){(_=A.onError)==null||_.call(A,S)}},{emitOnBegin:e,interval:s}))})():(()=>{let v=!0,A=()=>v=!1;return(async()=>{try{const{unsubscribe:_}=await t.transport.subscribe({params:["newHeads"],onData(S){var I;if(!v)return;const P=Sr((I=S.result)==null?void 0:I.number);n(P,d),d=P},onError(S){i==null||i(S)}});A=_,v||A()}catch(_){i==null||i(_)}})(),A})()}async function b6e(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:i=t.pollingInterval,timeout:o}){const s=fn(["waitForTransactionReceipt",t.uid,r]);let f,d,p,b=!1;return new Promise((v,A)=>{o&&setTimeout(()=>A(new Yq({hash:r})),o);const _=x1(s,{onReplaced:n,resolve:v,reject:A},S=>{const P=mt(t,cV,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(I){if(b)return;let C=I;const T=O=>{P(),O(),_()};try{if(p){if(e>1&&(!p.blockNumber||C-p.blockNumber+1nS.resolve(p));return}if(f||(b=!0,await nE(async()=>{f=await mt(t,eP,"getTransaction")({hash:r}),f.blockNumber&&(C=f.blockNumber)},{delay:({count:O})=>~~(1<1&&(!p.blockNumber||C-p.blockNumber+1nS.resolve(p))}catch(O){if(f&&(O instanceof A_||O instanceof S_))try{d=f,b=!0;const B=await nE(()=>mt(t,M0,"getBlock")({blockNumber:C,includeTransactions:!0}),{delay:({count:K})=>~~(1<K instanceof P_});b=!1;const D=B.transactions.find(({from:K,nonce:Y})=>K===d.from&&Y===d.nonce);if(!D||(p=await mt(t,aE,"getTransactionReceipt")({hash:D.hash}),e>1&&(!p.blockNumber||C-p.blockNumber+1n{var K;(K=S.onReplaced)==null||K.call(S,{reason:U,replacedTransaction:d,transaction:D,transactionReceipt:p}),S.resolve(p)})}catch(B){T(()=>S.reject(B))}else T(()=>S.reject(O))}}})})})}function y6e(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:o,includeTransactions:s,poll:f,pollingInterval:d=t.pollingInterval}){const p=typeof f<"u"?f:t.transport.type!=="webSocket",b=s??!1;let v;return p?(()=>{const S=fn(["watchBlocks",t.uid,r,n,b,d]);return x1(S,{onBlock:i,onError:o},P=>ay(async()=>{var I;try{const C=await mt(t,M0,"getBlock")({blockTag:e,includeTransactions:b});if(C.number&&(v!=null&&v.number)){if(C.number===v.number)return;if(C.number-v.number>1&&r)for(let T=(v==null?void 0:v.number)+1n;Tv.number)&&(P.onBlock(C,v),v=C)}catch(C){(I=P.onError)==null||I.call(P,C)}},{emitOnBegin:n,interval:d}))})():(()=>{let S=!0,P=()=>S=!1;return(async()=>{try{const{unsubscribe:I}=await t.transport.subscribe({params:["newHeads"],onData(C){var B,D,U;if(!S)return;const O=(((U=(D=(B=t.chain)==null?void 0:B.formatters)==null?void 0:D.block)==null?void 0:U.format)||Mx)(C.result);i(O,v),v=O},onError(C){o==null||o(C)}});P=I,S||P()}catch(I){o==null||o(I)}})(),P})()}function v6e(t,{address:e,args:r,batch:n=!0,event:i,events:o,onError:s,onLogs:f,poll:d,pollingInterval:p=t.pollingInterval,strict:b}){const v=typeof d<"u"?d:t.transport.type!=="webSocket",A=b??!1;return v?(()=>{const P=fn(["watchEvent",e,r,n,t.uid,i,p]);return x1(P,{onLogs:f,onError:s},I=>{let C,T,O=!1;const B=ay(async()=>{var D;if(!O){try{T=await mt(t,MG,"createEventFilter")({address:e,args:r,event:i,events:o,strict:A})}catch{}O=!0;return}try{let U;if(T)U=await mt(t,Cx,"getFilterChanges")({filter:T});else{const K=await mt(t,fy,"getBlockNumber")({});C&&C!==K?U=await mt(t,k_,"getLogs")({address:e,args:r,event:i,events:o,fromBlock:C+1n,toBlock:K}):U=[],C=K}if(U.length===0)return;if(n)I.onLogs(U);else for(const K of U)I.onLogs([K])}catch(U){T&&U instanceof A0&&(O=!1),(D=I.onError)==null||D.call(I,U)}},{emitOnBegin:!0,interval:p});return async()=>{T&&await mt(t,Ix,"uninstallFilter")({filter:T}),B()}})})():(()=>{let P=!0,I=()=>P=!1;return(async()=>{try{const C=o??(i?[i]:void 0);let T=[];C&&(T=[C.flatMap(B=>g1({abi:[B],eventName:B.name,args:r}))],i&&(T=T[0]));const{unsubscribe:O}=await t.transport.subscribe({params:["logs",{address:e,topics:T}],onData(B){var U;if(!P)return;const D=B.result;try{const{eventName:K,args:Y}=w1({abi:C,data:D.data,topics:D.topics,strict:A}),W=Yo(D,{args:Y,eventName:K});f([W])}catch(K){let Y,W;if(K instanceof x0||K instanceof Rl){if(b)return;Y=K.abiItem.name,W=(U=K.abiItem.inputs)==null?void 0:U.some(x=>!("name"in x&&x.name))}const ie=Yo(D,{args:W?[]:{},eventName:Y});f([ie])}},onError(B){s==null||s(B)}});I=O,P||I()}catch(C){s==null||s(C)}})(),I})()}function w6e(t,{batch:e=!0,onError:r,onTransactions:n,poll:i,pollingInterval:o=t.pollingInterval}){return(typeof i<"u"?i:t.transport.type!=="webSocket")?(()=>{const p=fn(["watchPendingTransactions",t.uid,e,o]);return x1(p,{onTransactions:n,onError:r},b=>{let v;const A=ay(async()=>{var _;try{if(!v)try{v=await mt(t,_G,"createPendingTransactionFilter")({});return}catch(P){throw A(),P}const S=await mt(t,Cx,"getFilterChanges")({filter:v});if(S.length===0)return;if(e)b.onTransactions(S);else for(const P of S)b.onTransactions([P])}catch(S){(_=b.onError)==null||_.call(b,S)}},{emitOnBegin:!0,interval:o});return async()=>{v&&await mt(t,Ix,"uninstallFilter")({filter:v}),A()}})})():(()=>{let p=!0,b=()=>p=!1;return(async()=>{try{const{unsubscribe:v}=await t.transport.subscribe({params:["newPendingTransactions"],onData(A){if(!p)return;const _=A.result;n([_])},onError(A){r==null||r(A)}});b=v,p||b()}catch(v){r==null||r(v)}})(),b})()}function uV(t){return{call:e=>sy(t,e),createBlockFilter:()=>h2e(t),createContractEventFilter:e=>b_(t,e),createEventFilter:e=>MG(t,e),createPendingTransactionFilter:()=>_G(t),estimateContractGas:e=>cG(t,e),estimateGas:e=>R_(t,e),getBalance:e=>p2e(t,e),getBlock:e=>M0(t,e),getBlockNumber:e=>fy(t,e),getBlockTransactionCount:e=>m2e(t,e),getBytecode:e=>PG(t,e),getChainId:()=>qp(t),getContractEvents:e=>B_(t,e),getEnsAddress:e=>Qve(t,e),getEnsAvatar:e=>u2e(t,e),getEnsName:e=>l2e(t,e),getEnsResolver:e=>d2e(t,e),getEnsText:e=>SG(t,e),getFeeHistory:e=>b2e(t,e),estimateFeesPerGas:e=>aG(t,e),getFilterChanges:e=>Cx(t,e),getFilterLogs:e=>y2e(t,e),getGasPrice:()=>I_(t),getLogs:e=>k_(t,e),getProof:e=>t6e(t,e),estimateMaxPriorityFeePerGas:e=>xve(t,e),getStorageAt:e=>r6e(t,e),getTransaction:e=>eP(t,e),getTransactionConfirmations:e=>n6e(t,e),getTransactionCount:e=>fG(t,e),getTransactionReceipt:e=>aE(t,e),multicall:e=>i6e(t,e),prepareTransactionRequest:e=>_x(t,e),readContract:e=>Xs(t,e),sendRawTransaction:e=>D_(t,e),simulateContract:e=>pG(t,e),verifyMessage:e=>m6e(t,e),verifyTypedData:e=>g6e(t,e),uninstallFilter:e=>Ix(t,e),waitForTransactionReceipt:e=>b6e(t,e),watchBlocks:e=>y6e(t,e),watchBlockNumber:e=>cV(t,e),watchContractEvent:e=>mG(t,e),watchEvent:e=>v6e(t,e),watchPendingTransactions:e=>w6e(t,e)}}function oP(t){const{key:e="public",name:r="Public Client"}=t;return Dl({...t,key:e,name:r,type:"publicClient"}).extend(uV)}async function x6e(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function E6e(t){return t.request({method:`${t.mode}_dumpState`})}async function A6e(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function S6e(t){return await t.request({method:"txpool_content"})}async function M6e(t){const{pending:e,queued:r}=await t.request({method:"txpool_status"});return{pending:rr(e),queued:rr(r)}}async function _6e(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function P6e(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[ht(e)]})}async function C6e(t){return await t.request({method:"txpool_inspect"})}async function I6e(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function T6e(t,{blocks:e,interval:r}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:ht(e)}]}):await t.request({method:`${t.mode}_mine`,params:[ht(e),ht(r||0)]})}async function R6e(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function k6e(t,{blockNumber:e,jsonRpcUrl:r}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:r}}]})}async function B6e(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function O6e(t,e){var C,T,O;const{accessList:r,data:n,from:i,gas:o,gasPrice:s,maxFeePerGas:f,maxPriorityFeePerGas:d,nonce:p,to:b,value:v,...A}=e,_=(O=(T=(C=t.chain)==null?void 0:C.formatters)==null?void 0:T.transactionRequest)==null?void 0:O.format,P=(_||Ol)({...xx(A,{format:_}),accessList:r,data:n,from:i,gas:o,gasPrice:s,maxFeePerGas:f,maxPriorityFeePerGas:d,nonce:p,to:b,value:v});return await t.request({method:"eth_sendUnsignedTransaction",params:[P]})}async function N6e(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function L6e(t,{address:e,value:r}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,ht(r)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,ht(r)]})}async function D6e(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[ht(e)]})}async function F6e(t,{interval:e}){const r=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[r]})}async function $6e(t,{address:e,bytecode:r}){await t.request({method:`${t.mode}_setCode`,params:[e,r]})}async function U6e(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function z6e(t,{interval:e}){const r=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:"evm_setIntervalMining",params:[r]})}async function j6e(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function H6e(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[ht(e)]})}async function q6e(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[ht(e)]})}async function G6e(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[ht(e)]})}async function V6e(t,{address:e,nonce:r}){await t.request({method:`${t.mode}_setNonce`,params:[e,ht(r)]})}async function K6e(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function W6e(t,{address:e,index:r,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof r=="number"?ht(r):r,n]})}async function J6e(t){return await t.request({method:"evm_snapshot"})}async function Z6e(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function lV({mode:t}){return e=>{const r=e.extend(()=>({mode:t}));return{dropTransaction:n=>x6e(r,n),dumpState:()=>E6e(r),getAutomine:()=>A6e(r),getTxpoolContent:()=>S6e(r),getTxpoolStatus:()=>M6e(r),impersonateAccount:n=>_6e(r,n),increaseTime:n=>P6e(r,n),inspectTxpool:()=>C6e(r),loadState:n=>I6e(r,n),mine:n=>T6e(r,n),removeBlockTimestampInterval:()=>R6e(r),reset:n=>k6e(r,n),revert:n=>B6e(r,n),sendUnsignedTransaction:n=>O6e(r,n),setAutomine:n=>N6e(r,n),setBalance:n=>L6e(r,n),setBlockGasLimit:n=>D6e(r,n),setBlockTimestampInterval:n=>F6e(r,n),setCode:n=>$6e(r,n),setCoinbase:n=>U6e(r,n),setIntervalMining:n=>z6e(r,n),setLoggingEnabled:n=>j6e(r,n),setMinGasPrice:n=>H6e(r,n),setNextBlockBaseFeePerGas:n=>q6e(r,n),setNextBlockTimestamp:n=>G6e(r,n),setNonce:n=>V6e(r,n),setRpcUrl:n=>K6e(r,n),setStorageAt:n=>W6e(r,n),snapshot:()=>J6e(r),stopImpersonatingAccount:n=>Z6e(r,n)}}}function Y6e(t){const{key:e="test",name:r="Test Client",mode:n}=t;return Dl({...t,key:e,name:r,type:"testClient"}).extend(o=>({mode:n,...lV({mode:n})(o)}))}function Q6e(t,{abi:e,args:r,bytecode:n,...i}){const o=G_({abi:e,args:r,bytecode:n});return F_(t,{...i,data:o})}async function X6e(t){var r;return((r=t.account)==null?void 0:r.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"})).map(n=>ny(n))}async function e5e(t){return await t.request({method:"wallet_getPermissions"})}async function t5e(t){return(await t.request({method:"eth_requestAccounts"})).map(r=>E0(r))}async function r5e(t,e){return t.request({method:"wallet_requestPermissions",params:[e]})}async function dV(t,{account:e=t.account,message:r}){if(!e)throw new y1({docsPath:"/docs/actions/wallet/signMessage"});const n=ls(e);if(n.type==="local")return n.signMessage({message:r});const i=(()=>typeof r=="string"?ry(r):r.raw instanceof Uint8Array?Ft(r.raw):r.raw)();return t.request({method:"personal_sign",params:[i,n.address]})}async function n5e(t,e){var p,b,v,A;const{account:r=t.account,chain:n=t.chain,...i}=e;if(!r)throw new y1({docsPath:"/docs/actions/wallet/signTransaction"});const o=ls(r);v1({account:o,...e});const s=await mt(t,qp,"getChainId")({});n!==null&&L_({currentChainId:s,chain:n});const f=(n==null?void 0:n.formatters)||((p=t.chain)==null?void 0:p.formatters),d=((b=f==null?void 0:f.transactionRequest)==null?void 0:b.format)||Ol;return o.type==="local"?o.signTransaction({...i,chainId:s},{serializer:(A=(v=t.chain)==null?void 0:v.serializers)==null?void 0:A.transaction}):await t.request({method:"eth_signTransaction",params:[{...d(i),chainId:ht(s),from:o.address}]})}async function fE(t,{account:e=t.account,domain:r,message:n,primaryType:i,types:o}){if(!e)throw new y1({docsPath:"/docs/actions/wallet/signTypedData"});const s=ls(e),f={EIP712Domain:uy({domain:r}),...o};if(Bx({domain:r,message:n,primaryType:i,types:f}),s.type==="local")return s.signTypedData({domain:r,primaryType:i,types:f,message:n});const d=fn({domain:r??{},primaryType:i,types:f,message:n},(p,b)=>jt(b)?b.toLowerCase():b);return t.request({method:"eth_signTypedData_v4",params:[s.address,d]})}async function i5e(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:ht(e)}]})}async function o5e(t,e){return await t.request({method:"wallet_watchAsset",params:e})}function hV(t){return{addChain:e=>Uve(t,e),deployContract:e=>Q6e(t,e),getAddresses:()=>X6e(t),getChainId:()=>qp(t),getPermissions:()=>e5e(t),prepareTransactionRequest:e=>_x(t,e),requestAddresses:()=>t5e(t),requestPermissions:e=>r5e(t,e),sendRawTransaction:e=>D_(t,e),sendTransaction:e=>F_(t,e),signMessage:e=>dV(t,e),signTransaction:e=>n5e(t,e),signTypedData:e=>fE(t,e),switchChain:e=>i5e(t,e),watchAsset:e=>o5e(t,e),writeContract:e=>gG(t,e)}}function pV(t){const{key:e="wallet",name:r="Wallet Client",transport:n}=t;return Dl({...t,key:e,name:r,transport:o=>n({...o,retryCount:0}),type:"walletClient"}).extend(hV)}function s5e(t,e={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:i}=e;return({chain:o,retryCount:s,timeout:f})=>{var v;const d=e.retryCount??s,p=f??e.timeout??1e4,b=t||((v=o==null?void 0:o.rpcUrls.default.webSocket)==null?void 0:v[0]);if(!b)throw new $_;return cy({key:r,name:n,async request({method:A,params:_}){const S={method:A,params:_},P=await c4(b),{error:I,result:C}=await rh.webSocketAsync(P,{body:S,timeout:p});if(I)throw new wx({body:S,error:I,url:b});return C},retryCount:d,retryDelay:i,timeout:p,type:"webSocket"},{getSocket(){return c4(b)},async subscribe({params:A,onData:_,onError:S}){const P=await c4(b),{result:I}=await new Promise((C,T)=>rh.webSocket(P,{body:{method:"eth_subscribe",params:A},onResponse(O){if(O.error){T(O.error),S==null||S(O.error);return}if(typeof O.id=="number"){C(O);return}O.method==="eth_subscription"&&_(O.params)}}));return{subscriptionId:I,async unsubscribe(){return new Promise(C=>rh.webSocket(P,{body:{method:"eth_unsubscribe",params:[I]},onResponse:C}))}}}})}}const cE="0x0000000000000000000000000000000000000000",a5e=2n**(8n-1n)-1n,f5e=2n**(16n-1n)-1n,c5e=2n**(24n-1n)-1n,u5e=2n**(32n-1n)-1n,l5e=2n**(40n-1n)-1n,d5e=2n**(48n-1n)-1n,h5e=2n**(56n-1n)-1n,p5e=2n**(64n-1n)-1n,m5e=2n**(72n-1n)-1n,g5e=2n**(80n-1n)-1n,b5e=2n**(88n-1n)-1n,y5e=2n**(96n-1n)-1n,v5e=2n**(104n-1n)-1n,w5e=2n**(112n-1n)-1n,x5e=2n**(120n-1n)-1n,E5e=2n**(128n-1n)-1n,A5e=2n**(136n-1n)-1n,S5e=2n**(144n-1n)-1n,M5e=2n**(152n-1n)-1n,_5e=2n**(160n-1n)-1n,P5e=2n**(168n-1n)-1n,C5e=2n**(176n-1n)-1n,I5e=2n**(184n-1n)-1n,T5e=2n**(192n-1n)-1n,R5e=2n**(200n-1n)-1n,k5e=2n**(208n-1n)-1n,B5e=2n**(216n-1n)-1n,O5e=2n**(224n-1n)-1n,N5e=2n**(232n-1n)-1n,L5e=2n**(240n-1n)-1n,D5e=2n**(248n-1n)-1n,F5e=2n**(256n-1n)-1n,$5e=-(2n**(8n-1n)),U5e=-(2n**(16n-1n)),z5e=-(2n**(24n-1n)),j5e=-(2n**(32n-1n)),H5e=-(2n**(40n-1n)),q5e=-(2n**(48n-1n)),G5e=-(2n**(56n-1n)),V5e=-(2n**(64n-1n)),K5e=-(2n**(72n-1n)),W5e=-(2n**(80n-1n)),J5e=-(2n**(88n-1n)),Z5e=-(2n**(96n-1n)),Y5e=-(2n**(104n-1n)),Q5e=-(2n**(112n-1n)),X5e=-(2n**(120n-1n)),ewe=-(2n**(128n-1n)),twe=-(2n**(136n-1n)),rwe=-(2n**(144n-1n)),nwe=-(2n**(152n-1n)),iwe=-(2n**(160n-1n)),owe=-(2n**(168n-1n)),swe=-(2n**(176n-1n)),awe=-(2n**(184n-1n)),fwe=-(2n**(192n-1n)),cwe=-(2n**(200n-1n)),uwe=-(2n**(208n-1n)),lwe=-(2n**(216n-1n)),dwe=-(2n**(224n-1n)),hwe=-(2n**(232n-1n)),pwe=-(2n**(240n-1n)),mwe=-(2n**(248n-1n)),gwe=-(2n**(256n-1n)),bwe=2n**8n-1n,ywe=2n**16n-1n,vwe=2n**24n-1n,wwe=2n**32n-1n,xwe=2n**40n-1n,Ewe=2n**48n-1n,Awe=2n**56n-1n,Swe=2n**64n-1n,Mwe=2n**72n-1n,_we=2n**80n-1n,Pwe=2n**88n-1n,Cwe=2n**96n-1n,Iwe=2n**104n-1n,Twe=2n**112n-1n,Rwe=2n**120n-1n,kwe=2n**128n-1n,Bwe=2n**136n-1n,Owe=2n**144n-1n,Nwe=2n**152n-1n,Lwe=2n**160n-1n,Dwe=2n**168n-1n,Fwe=2n**176n-1n,$we=2n**184n-1n,Uwe=2n**192n-1n,zwe=2n**200n-1n,jwe=2n**208n-1n,Hwe=2n**216n-1n,qwe=2n**224n-1n,Gwe=2n**232n-1n,Vwe=2n**240n-1n,Kwe=2n**248n-1n,Wwe=2n**256n-1n,Jwe="0x0000000000000000000000000000000000000000000000000000000000000000",h4="/docs/contract/decodeDeployData";function Zwe({abi:t,bytecode:e,data:r}){if(r===e)return{bytecode:e};const n=t.find(o=>"type"in o&&o.type==="constructor");if(!n)throw new t_({docsPath:h4});if(!("inputs"in n))throw new kg({docsPath:h4});if(!n.inputs||n.inputs.length===0)throw new kg({docsPath:h4});return{args:kl(n.inputs,`0x${r.replace(e,"")}`),bytecode:e}}function Ywe({r:t,yParityAndS:e}){const r=ic(e),n=r[0]&128?28n:27n,i=r;return n===28n&&(i[0]&=127),{r:t,s:$i(i),v:n}}function Qwe(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),f=Number(r&o),d=n?4:0,p=n?0:4;t.setUint32(e+d,s,n),t.setUint32(e+p,f,n)}class Xwe extends d_{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=n4(this.buffer)}update(e){_p(this);const{view:r,buffer:n,blockLen:i}=this;e=px(e);const o=e.length;for(let s=0;si-s&&(this.process(n,0),s=0);for(let v=s;vb.length)throw new Error("_sha2: outputLen bigger than state");for(let v=0;vt&e^~t&r,txe=(t,e,r)=>t&e^t&r^e&r,rxe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),pc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),mc=new Uint32Array(64);class nxe extends Xwe{constructor(){super(64,32,8,!1),this.A=pc[0]|0,this.B=pc[1]|0,this.C=pc[2]|0,this.D=pc[3]|0,this.E=pc[4]|0,this.F=pc[5]|0,this.G=pc[6]|0,this.H=pc[7]|0}get(){const{A:e,B:r,C:n,D:i,E:o,F:s,G:f,H:d}=this;return[e,r,n,i,o,s,f,d]}set(e,r,n,i,o,s,f,d){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=f|0,this.H=d|0}process(e,r){for(let v=0;v<16;v++,r+=4)mc[v]=e.getUint32(r,!1);for(let v=16;v<64;v++){const A=mc[v-15],_=mc[v-2],S=la(A,7)^la(A,18)^A>>>3,P=la(_,17)^la(_,19)^_>>>10;mc[v]=P+mc[v-7]+S+mc[v-16]|0}let{A:n,B:i,C:o,D:s,E:f,F:d,G:p,H:b}=this;for(let v=0;v<64;v++){const A=la(f,6)^la(f,11)^la(f,25),_=b+A+exe(f,d,p)+rxe[v]+mc[v]|0,P=(la(n,2)^la(n,13)^la(n,22))+txe(n,i,o)|0;b=p,p=d,d=f,f=s+_|0,s=o,o=i,i=n,n=_+P|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,f=f+this.E|0,d=d+this.F|0,p=p+this.G|0,b=b+this.H|0,this.set(n,i,o,s,f,d,p,b)}roundClean(){mc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Bg=Oq(()=>new nxe);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const bn=BigInt(0),Kr=BigInt(1),tu=BigInt(2),ixe=BigInt(3),uE=BigInt(4),Kk=BigInt(5),Wk=BigInt(8);BigInt(9);BigInt(16);function gn(t,e){const r=t%e;return r>=bn?r:e+r}function oxe(t,e,r){if(r<=bn||e 0");if(r===Kr)return bn;let n=Kr;for(;e>bn;)e&Kr&&(n=n*t%r),t=t*t%r,e>>=Kr;return n}function xo(t,e,r){let n=t;for(;e-- >bn;)n*=n,n%=r;return n}function lE(t,e){if(t===bn||e<=bn)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=gn(t,e),n=e,i=bn,o=Kr;for(;r!==bn;){const f=n/r,d=n%r,p=i-o*f;n=r,r=d,i=o,o=p}if(n!==Kr)throw new Error("invert: does not exist");return gn(i,e)}function sxe(t){const e=(t-Kr)/tu;let r,n,i;for(r=t-Kr,n=0;r%tu===bn;r/=tu,n++);for(i=tu;i(n[i]="function",n),e);return A1(t,r)}function cxe(t,e,r){if(r 0");if(r===bn)return t.ONE;if(r===Kr)return e;let n=t.ONE,i=e;for(;r>bn;)r&Kr&&(n=t.mul(n,i)),i=t.sqr(i),r>>=Kr;return n}function uxe(t,e){const r=new Array(e.length),n=e.reduce((o,s,f)=>t.is0(s)?o:(r[f]=o,t.mul(o,s)),t.ONE),i=t.inv(n);return e.reduceRight((o,s,f)=>t.is0(s)?o:(r[f]=t.mul(o,r[f]),t.mul(o,s)),i),r}function gV(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function lxe(t,e,r=!1,n={}){if(t<=bn)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:o}=gV(t,e);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=axe(t),f=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:iP(i),ZERO:bn,ONE:Kr,create:d=>gn(d,t),isValid:d=>{if(typeof d!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof d}`);return bn<=d&&dd===bn,isOdd:d=>(d&Kr)===Kr,neg:d=>gn(-d,t),eql:(d,p)=>d===p,sqr:d=>gn(d*d,t),add:(d,p)=>gn(d+p,t),sub:(d,p)=>gn(d-p,t),mul:(d,p)=>gn(d*p,t),pow:(d,p)=>cxe(f,d,p),div:(d,p)=>gn(d*lE(p,t),t),sqrN:d=>d*d,addN:(d,p)=>d+p,subN:(d,p)=>d-p,mulN:(d,p)=>d*p,inv:d=>lE(d,t),sqrt:n.sqrt||(d=>s(f,d)),invertBatch:d=>uxe(f,d),cmov:(d,p,b)=>b?p:d,toBytes:d=>r?nP(d,o):_0(d,o),fromBytes:d=>{if(d.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${d.length}`);return r?rP(d):ui(d)}});return Object.freeze(f)}function bV(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function yV(t){const e=bV(t);return e+Math.ceil(e/2)}function dxe(t,e,r=!1){const n=t.length,i=bV(e),o=yV(e);if(n<16||n1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const s=r?ui(t):rP(t),f=gn(s,e-Kr)+Kr;return r?nP(f,i):_0(f,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hxe=BigInt(0),p4=BigInt(1);function pxe(t,e){const r=(i,o)=>{const s=o.negate();return i?s:o},n=i=>{const o=Math.ceil(e/i)+1,s=2**(i-1);return{windows:o,windowSize:s}};return{constTimeNegate:r,unsafeLadder(i,o){let s=t.ZERO,f=i;for(;o>hxe;)o&p4&&(s=s.add(f)),f=f.double(),o>>=p4;return s},precomputeWindow(i,o){const{windows:s,windowSize:f}=n(o),d=[];let p=i,b=p;for(let v=0;v>=_,I>d&&(I-=A,s+=p4);const C=P,T=P+Math.abs(I)-1,O=S%2!==0,B=I<0;I===0?b=b.add(r(O,o[C])):p=p.add(r(B,o[T]))}return{p,f:b}},wNAFCached(i,o,s,f){const d=i._WINDOW_SIZE||1;let p=o.get(i);return p||(p=this.precomputeWindow(i,d),d!==1&&o.set(i,f(p))),this.wNAF(d,p,s)}}}function vV(t){return mV(t.Fp),A1(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...gV(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mxe(t){const e=vV(t);A1(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:gxe,hexToBytes:bxe}=h6e,hu={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=hu;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:gxe(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=hu,r=typeof t=="string"?bxe(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:o}=hu._parseInt(r.subarray(2)),{d:s,l:f}=hu._parseInt(o);if(f.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(t){const e=p=>Number.parseInt(p[0],16)&8?"00"+p:p,r=p=>{const b=p.toString(16);return b.length&1?`0${b}`:b},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,f=r(o),d=r(s);return`30${r(s+o+4)}02${d}${i}02${f}${n}`}},Bs=BigInt(0),Or=BigInt(1),gc=BigInt(2),G6=BigInt(3),Jk=BigInt(4);function yxe(t){const e=mxe(t),{Fp:r}=e,n=e.toBytes||((S,P,I)=>{const C=P.toAffine();return to(Uint8Array.from([4]),r.toBytes(C.x),r.toBytes(C.y))}),i=e.fromBytes||(S=>{const P=S.subarray(1),I=r.fromBytes(P.subarray(0,r.BYTES)),C=r.fromBytes(P.subarray(r.BYTES,2*r.BYTES));return{x:I,y:C}});function o(S){const{a:P,b:I}=e,C=r.sqr(S),T=r.mul(C,S);return r.add(r.add(T,r.mul(S,P)),I)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error("bad generator point: equation left != right");function s(S){return typeof S=="bigint"&&Bsr.eql(O,r.ZERO);return T(I)&&T(C)?v.ZERO:new v(I,C,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(P){const I=r.invertBatch(P.map(C=>C.pz));return P.map((C,T)=>C.toAffine(I[T])).map(v.fromAffine)}static fromHex(P){const I=v.fromAffine(i(Gn("pointHex",P)));return I.assertValidity(),I}static fromPrivateKey(P){return v.BASE.multiply(d(P))}_setWindowSize(P){this._WINDOW_SIZE=P,p.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:P,y:I}=this.toAffine();if(!r.isValid(P)||!r.isValid(I))throw new Error("bad point: x or y not FE");const C=r.sqr(I),T=o(P);if(!r.eql(C,T))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:P}=this.toAffine();if(r.isOdd)return!r.isOdd(P);throw new Error("Field doesn't support isOdd")}equals(P){b(P);const{px:I,py:C,pz:T}=this,{px:O,py:B,pz:D}=P,U=r.eql(r.mul(I,D),r.mul(O,T)),K=r.eql(r.mul(C,D),r.mul(B,T));return U&&K}negate(){return new v(this.px,r.neg(this.py),this.pz)}double(){const{a:P,b:I}=e,C=r.mul(I,G6),{px:T,py:O,pz:B}=this;let D=r.ZERO,U=r.ZERO,K=r.ZERO,Y=r.mul(T,T),W=r.mul(O,O),ie=r.mul(B,B),x=r.mul(T,O);return x=r.add(x,x),K=r.mul(T,B),K=r.add(K,K),D=r.mul(P,K),U=r.mul(C,ie),U=r.add(D,U),D=r.sub(W,U),U=r.add(W,U),U=r.mul(D,U),D=r.mul(x,D),K=r.mul(C,K),ie=r.mul(P,ie),x=r.sub(Y,ie),x=r.mul(P,x),x=r.add(x,K),K=r.add(Y,Y),Y=r.add(K,Y),Y=r.add(Y,ie),Y=r.mul(Y,x),U=r.add(U,Y),ie=r.mul(O,B),ie=r.add(ie,ie),Y=r.mul(ie,x),D=r.sub(D,Y),K=r.mul(ie,W),K=r.add(K,K),K=r.add(K,K),new v(D,U,K)}add(P){b(P);const{px:I,py:C,pz:T}=this,{px:O,py:B,pz:D}=P;let U=r.ZERO,K=r.ZERO,Y=r.ZERO;const W=e.a,ie=r.mul(e.b,G6);let x=r.mul(I,O),a=r.mul(C,B),u=r.mul(T,D),l=r.add(I,C),h=r.add(O,B);l=r.mul(l,h),h=r.add(x,a),l=r.sub(l,h),h=r.add(I,T);let m=r.add(O,D);return h=r.mul(h,m),m=r.add(x,u),h=r.sub(h,m),m=r.add(C,T),U=r.add(B,D),m=r.mul(m,U),U=r.add(a,u),m=r.sub(m,U),Y=r.mul(W,h),U=r.mul(ie,u),Y=r.add(U,Y),U=r.sub(a,Y),Y=r.add(a,Y),K=r.mul(U,Y),a=r.add(x,x),a=r.add(a,x),u=r.mul(W,u),h=r.mul(ie,h),a=r.add(a,u),u=r.sub(x,u),u=r.mul(W,u),h=r.add(h,u),x=r.mul(a,h),K=r.add(K,x),x=r.mul(m,h),U=r.mul(l,U),U=r.sub(U,x),x=r.mul(l,a),Y=r.mul(m,Y),Y=r.add(Y,x),new v(U,K,Y)}subtract(P){return this.add(P.negate())}is0(){return this.equals(v.ZERO)}wNAF(P){return _.wNAFCached(this,p,P,I=>{const C=r.invertBatch(I.map(T=>T.pz));return I.map((T,O)=>T.toAffine(C[O])).map(v.fromAffine)})}multiplyUnsafe(P){const I=v.ZERO;if(P===Bs)return I;if(f(P),P===Or)return this;const{endo:C}=e;if(!C)return _.unsafeLadder(this,P);let{k1neg:T,k1:O,k2neg:B,k2:D}=C.splitScalar(P),U=I,K=I,Y=this;for(;O>Bs||D>Bs;)O&Or&&(U=U.add(Y)),D&Or&&(K=K.add(Y)),Y=Y.double(),O>>=Or,D>>=Or;return T&&(U=U.negate()),B&&(K=K.negate()),K=new v(r.mul(K.px,C.beta),K.py,K.pz),U.add(K)}multiply(P){f(P);let I=P,C,T;const{endo:O}=e;if(O){const{k1neg:B,k1:D,k2neg:U,k2:K}=O.splitScalar(I);let{p:Y,f:W}=this.wNAF(D),{p:ie,f:x}=this.wNAF(K);Y=_.constTimeNegate(B,Y),ie=_.constTimeNegate(U,ie),ie=new v(r.mul(ie.px,O.beta),ie.py,ie.pz),C=Y.add(ie),T=W.add(x)}else{const{p:B,f:D}=this.wNAF(I);C=B,T=D}return v.normalizeZ([C,T])[0]}multiplyAndAddUnsafe(P,I,C){const T=v.BASE,O=(D,U)=>U===Bs||U===Or||!D.equals(T)?D.multiplyUnsafe(U):D.multiply(U),B=O(this,I).add(O(P,C));return B.is0()?void 0:B}toAffine(P){const{px:I,py:C,pz:T}=this,O=this.is0();P==null&&(P=O?r.ONE:r.inv(T));const B=r.mul(I,P),D=r.mul(C,P),U=r.mul(T,P);if(O)return{x:r.ZERO,y:r.ZERO};if(!r.eql(U,r.ONE))throw new Error("invZ was invalid");return{x:B,y:D}}isTorsionFree(){const{h:P,isTorsionFree:I}=e;if(P===Or)return!0;if(I)return I(v,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:P,clearCofactor:I}=e;return P===Or?this:I?I(v,this):this.multiplyUnsafe(e.h)}toRawBytes(P=!0){return this.assertValidity(),n(v,this,P)}toHex(P=!0){return Gp(this.toRawBytes(P))}}v.BASE=new v(e.Gx,e.Gy,r.ONE),v.ZERO=new v(r.ZERO,r.ONE,r.ZERO);const A=e.nBitLength,_=pxe(v,e.endo?Math.ceil(A/2):A);return{CURVE:e,ProjectivePoint:v,normPrivateKeyToScalar:d,weierstrassEquation:o,isWithinCurveOrder:s}}function vxe(t){const e=vV(t);return A1(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function wxe(t){const e=vxe(t),{Fp:r,n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(h){return BsGp(_0(h,e.nByteLength));function S(h){const m=n>>Or;return h>m}function P(h){return S(h)?f(-h):h}const I=(h,m,w)=>ui(h.slice(m,w));class C{constructor(m,w,E){this.r=m,this.s=w,this.recovery=E,this.assertValidity()}static fromCompact(m){const w=e.nByteLength;return m=Gn("compactSignature",m,w*2),new C(I(m,0,w),I(m,w,2*w))}static fromDER(m){const{r:w,s:E}=hu.toSig(Gn("DER",m));return new C(w,E)}assertValidity(){if(!A(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!A(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(m){return new C(this.r,this.s,m)}recoverPublicKey(m){const{r:w,s:E,recovery:y}=this,c=K(Gn("msgHash",m));if(y==null||![0,1,2,3].includes(y))throw new Error("recovery id invalid");const g=y===2||y===3?w+e.n:w;if(g>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const M=y&1?"03":"02",k=p.fromHex(M+_(g)),L=d(g),R=f(-c*L),F=f(E*L),z=p.BASE.multiplyAndAddUnsafe(k,R,F);if(!z)throw new Error("point at infinify");return z.assertValidity(),z}hasHighS(){return S(this.s)}normalizeS(){return this.hasHighS()?new C(this.r,f(-this.s),this.recovery):this}toDERRawBytes(){return Vp(this.toDERHex())}toDERHex(){return hu.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Vp(this.toCompactHex())}toCompactHex(){return _(this.r)+_(this.s)}}const T={isValidPrivateKey(h){try{return b(h),!0}catch{return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{const h=yV(e.n);return dxe(e.randomBytes(h),e.n)},precompute(h=8,m=p.BASE){return m._setWindowSize(h),m.multiply(BigInt(3)),m}};function O(h,m=!0){return p.fromPrivateKey(h).toRawBytes(m)}function B(h){const m=h instanceof Uint8Array,w=typeof h=="string",E=(m||w)&&h.length;return m?E===i||E===o:w?E===2*i||E===2*o:h instanceof p}function D(h,m,w=!0){if(B(h))throw new Error("first arg must be private key");if(!B(m))throw new Error("second arg must be public key");return p.fromHex(m).multiply(b(h)).toRawBytes(w)}const U=e.bits2int||function(h){const m=ui(h),w=h.length*8-e.nBitLength;return w>0?m>>BigInt(w):m},K=e.bits2int_modN||function(h){return f(U(h))},Y=iP(e.nBitLength);function W(h){if(typeof h!="bigint")throw new Error("bigint expected");if(!(Bs<=h&&hq in w))throw new Error("sign() legacy options not supported");const{hash:E,randomBytes:y}=e;let{lowS:c,prehash:g,extraEntropy:M}=w;c==null&&(c=!0),h=Gn("msgHash",h),g&&(h=Gn("prehashed msgHash",E(h)));const k=K(h),L=b(m),R=[W(L),W(k)];if(M!=null){const q=M===!0?y(r.BYTES):M;R.push(Gn("extraEntropy",q))}const F=to(...R),z=k;function V(q){const Q=U(q);if(!A(Q))return;const G=d(Q),H=p.BASE.multiply(Q).toAffine(),ee=f(H.x);if(ee===Bs)return;const ue=f(G*f(z+ee*L));if(ue===Bs)return;let fe=(H.x===ee?0:2)|Number(H.y&Or),he=ue;return c&&S(ue)&&(he=P(ue),fe^=1),new C(ee,he,fe)}return{seed:F,k2sig:V}}const x={lowS:e.lowS,prehash:!1},a={lowS:e.lowS,prehash:!1};function u(h,m,w=x){const{seed:E,k2sig:y}=ie(h,m,w),c=e;return aV(c.hash.outputLen,c.nByteLength,c.hmac)(E,y)}p.BASE._setWindowSize(8);function l(h,m,w,E=a){var H;const y=h;if(m=Gn("msgHash",m),w=Gn("publicKey",w),"strict"in E)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:g}=E;let M,k;try{if(typeof y=="string"||y instanceof Uint8Array)try{M=C.fromDER(y)}catch(ee){if(!(ee instanceof hu.Err))throw ee;M=C.fromCompact(y)}else if(typeof y=="object"&&typeof y.r=="bigint"&&typeof y.s=="bigint"){const{r:ee,s:ue}=y;M=new C(ee,ue)}else throw new Error("PARSE");k=p.fromHex(w)}catch(ee){if(ee.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&M.hasHighS())return!1;g&&(m=e.hash(m));const{r:L,s:R}=M,F=K(m),z=d(R),V=f(F*z),q=f(L*z),Q=(H=p.BASE.multiplyAndAddUnsafe(k,V,q))==null?void 0:H.toAffine();return Q?f(Q.x)===L:!1}return{CURVE:e,getPublicKey:O,getSharedSecret:D,sign:u,verify:l,ProjectivePoint:p,Signature:C,utils:T}}function xxe(t,e){const r=t.ORDER;let n=Bs;for(let S=r-Or;S%gc===Bs;S/=gc)n+=Or;const i=n,o=gc<{let I=v,C=t.pow(P,p),T=t.sqr(C);T=t.mul(T,P);let O=t.mul(S,T);O=t.pow(O,d),O=t.mul(O,C),C=t.mul(O,P),T=t.mul(O,S);let B=t.mul(T,C);O=t.pow(B,b);let D=t.eql(O,t.ONE);C=t.mul(T,A),O=t.mul(B,I),T=t.cmov(C,T,D),B=t.cmov(O,B,D);for(let U=i;U>Or;U--){let K=U-gc;K=gc<{let T=t.sqr(C);const O=t.mul(I,C);T=t.mul(T,O);let B=t.pow(T,S);B=t.mul(B,O);const D=t.mul(B,P),U=t.mul(t.sqr(B),C),K=t.eql(U,I);let Y=t.cmov(D,B,K);return{isValid:K,value:Y}}}return _}function Exe(t,e){if(mV(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=xxe(t,e.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,f,d,p,b,v;i=t.sqr(n),i=t.mul(i,e.Z),o=t.sqr(i),o=t.add(o,i),s=t.add(o,t.ONE),s=t.mul(s,e.B),f=t.cmov(e.Z,t.neg(o),!t.eql(o,t.ZERO)),f=t.mul(f,e.A),o=t.sqr(s),p=t.sqr(f),d=t.mul(p,e.A),o=t.add(o,d),o=t.mul(o,s),p=t.mul(p,f),d=t.mul(p,e.B),o=t.add(o,d),b=t.mul(i,s);const{isValid:A,value:_}=r(o,p);v=t.mul(i,n),v=t.mul(v,_),b=t.cmov(b,s,A),v=t.cmov(v,_,A);const S=t.isOdd(n)===t.isOdd(v);return v=t.cmov(t.neg(v),v,S),b=t.div(b,f),{x:b,y:v}}}function Axe(t){if(t instanceof Uint8Array)return t;if(typeof t=="string")return Lx(t);throw new Error("DST must be Uint8Array or string")}const Sxe=ui;function _c(t,e){if(t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=t&255,t>>>=8;return new Uint8Array(r)}function Mxe(t,e){const r=new Uint8Array(t.length);for(let n=0;n255&&(e=n(to(Lx("H2C-OVERSIZE-DST-"),e)));const{outputLen:i,blockLen:o}=n,s=Math.ceil(r/i);if(s>255)throw new Error("Invalid xmd length");const f=to(e,_c(e.length,1)),d=_c(0,o),p=_c(r,2),b=new Array(s),v=n(to(d,t,p,_c(0,1),f));b[0]=n(to(v,_c(1,1),f));for(let _=1;_<=s;_++){const S=[Mxe(v,b[_-1]),_c(_+1,1),f];b[_]=n(to(...S))}return to(...b).slice(0,r)}function Pxe(t,e,r,n,i){if(Og(t),Og(e),sP(r),e.length>255){const o=Math.ceil(2*n/8);e=i.create({dkLen:o}).update(Lx("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(t).update(_c(r,2)).update(e).update(_c(e.length,1)).digest()}function Zk(t,e,r){A1(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:n,k:i,m:o,hash:s,expand:f,DST:d}=r;Og(t),sP(e);const p=Axe(d),b=n.toString(2).length,v=Math.ceil((b+i)/8),A=e*o*v;let _;if(f==="xmd")_=_xe(t,p,A,s);else if(f==="xof")_=Pxe(t,p,A,i,s);else if(f==="_internal_pass")_=t;else throw new Error('expand must be "xmd" or "xof"');const S=new Array(e);for(let P=0;PArray.from(n).reverse());return(n,i)=>{const[o,s,f,d]=r.map(p=>p.reduce((b,v)=>t.add(t.mul(b,n),v)));return n=t.div(o,s),i=t.mul(i,t.div(f,d)),{x:n,y:i}}}function Ixe(t,e,r){if(typeof e!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=Zk(n,2,{...r,DST:r.DST,...i}),s=t.fromAffine(e(o[0])),f=t.fromAffine(e(o[1])),d=s.add(f).clearCofactor();return d.assertValidity(),d},encodeToCurve(n,i){const o=Zk(n,1,{...r,DST:r.encodeDST,...i}),s=t.fromAffine(e(o[0])).clearCofactor();return s.assertValidity(),s}}}class wV extends d_{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,_ye(e);const n=px(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let s=0;snew wV(t,e).update(r).digest();xV.create=(t,e)=>new wV(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Txe(t){return{hash:t,hmac:(e,...r)=>xV(t,e,Lye(...r)),randomBytes:Nq}}function Rxe(t,e){const r=n=>wxe({...t,...Txe(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dx=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),V6=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),EV=BigInt(1),K6=BigInt(2),Yk=(t,e)=>(t+e/K6)/e;function AV(t){const e=Dx,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),f=BigInt(44),d=BigInt(88),p=t*t*t%e,b=p*p*t%e,v=xo(b,r,e)*b%e,A=xo(v,r,e)*b%e,_=xo(A,K6,e)*p%e,S=xo(_,i,e)*_%e,P=xo(S,o,e)*S%e,I=xo(P,f,e)*P%e,C=xo(I,d,e)*I%e,T=xo(C,f,e)*P%e,O=xo(T,r,e)*b%e,B=xo(O,s,e)*S%e,D=xo(B,n,e)*p%e,U=xo(D,K6,e);if(!P0.eql(P0.sqr(U),t))throw new Error("Cannot find square root");return U}const P0=lxe(Dx,void 0,void 0,{sqrt:AV}),sc=Rxe({a:BigInt(0),b:BigInt(7),Fp:P0,n:V6,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=V6,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-EV*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),f=Yk(o*t,e),d=Yk(-n*t,e);let p=gn(t-f*r-d*i,e),b=gn(-f*n-d*o,e);const v=p>s,A=b>s;if(v&&(p=e-p),A&&(b=e-b),p>s||b>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:v,k1:p,k2neg:A,k2:b}}}},Bg),Fx=BigInt(0),SV=t=>typeof t=="bigint"&&Fxtypeof t=="bigint"&&Fxi.charCodeAt(0)));r=to(n,n),Qk[t]=r}return Bg(to(r,...e))}const aP=t=>t.toRawBytes(!0).slice(1),dE=t=>_0(t,32),m4=t=>gn(t,Dx),Ng=t=>gn(t,V6),fP=sc.ProjectivePoint,Bxe=(t,e,r)=>fP.BASE.multiplyAndAddUnsafe(t,e,r);function hE(t){let e=sc.utils.normPrivateKeyToScalar(t),r=fP.fromPrivateKey(e);return{scalar:r.hasEvenY()?e:Ng(-e),bytes:aP(r)}}function MV(t){if(!SV(t))throw new Error("bad x: need 0 < x < p");const e=m4(t*t),r=m4(e*t+BigInt(7));let n=AV(r);n%K6!==Fx&&(n=m4(-n));const i=new fP(t,n,EV);return i.assertValidity(),i}function _V(...t){return Ng(ui(W6("BIP0340/challenge",...t)))}function Oxe(t){return hE(t).bytes}function Nxe(t,e,r=Nq(32)){const n=Gn("message",t),{bytes:i,scalar:o}=hE(e),s=Gn("auxRand",r,32),f=dE(o^ui(W6("BIP0340/aux",s))),d=W6("BIP0340/nonce",f,i,n),p=Ng(ui(d));if(p===Fx)throw new Error("sign failed: k is zero");const{bytes:b,scalar:v}=hE(p),A=_V(b,i,n),_=new Uint8Array(64);if(_.set(b,0),_.set(dE(Ng(v+A*o)),32),!PV(_,n,i))throw new Error("sign: Invalid signature produced");return _}function PV(t,e,r){const n=Gn("signature",t,64),i=Gn("message",e),o=Gn("publicKey",r,32);try{const s=MV(ui(o)),f=ui(n.subarray(0,32));if(!SV(f))return!1;const d=ui(n.subarray(32,64));if(!kxe(d))return!1;const p=_V(dE(f),aP(s),i),b=Bxe(s,d,Ng(-p));return!(!b||!b.hasEvenY()||b.toAffine().x!==f)}catch{return!1}}const Lxe=(()=>({getPublicKey:Oxe,sign:Nxe,verify:PV,utils:{randomPrivateKey:sc.utils.randomPrivateKey,lift_x:MV,pointToBytes:aP,numberToBytesBE:_0,bytesToNumberBE:ui,taggedHash:W6,mod:gn}}))(),Dxe=(()=>Cxe(P0,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(e=>BigInt(e)))))(),Fxe=(()=>Exe(P0,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:P0.create(BigInt("-11"))}))(),CV=(()=>Ixe(sc.ProjectivePoint,t=>{const{x:e,y:r}=Fxe(P0.create(t[0]));return Dxe(e,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:P0.ORDER,m:1,k:128,expand:"xmd",hash:Bg}))(),$xe=(()=>CV.hashToCurve)(),Uxe=(()=>CV.encodeToCurve)(),zxe=Object.freeze(Object.defineProperty({__proto__:null,encodeToCurve:Uxe,hashToCurve:$xe,schnorr:Lxe,secp256k1:sc},Symbol.toStringTag,{value:"Module"}));function jxe(t){const{r:e,s:r}=sc.Signature.fromCompact(t.slice(2,130));return{r:ht(e,{size:32}),yParityAndS:ht(r,{size:32})}}function Hxe(t){const{r:e,s:r}=sc.Signature.fromCompact(t.slice(2,130)),n=BigInt(`0x${t.slice(130)}`);return{r:ht(e,{size:32}),s:ht(r,{size:32}),v:n}}function qxe(t){const{r:e,s:r,v:n}=t,i=n-27n;let o=r;if(i===1n){const s=ic(r);s[0]|=128,o=$i(s)}return{r:e,yParityAndS:o}}function Gxe({r:t,yParityAndS:e}){return`0x${new sc.Signature(Sr(t),Sr(e)).toCompactHex()}`}function IV({r:t,s:e,v:r}){return`0x${new sc.Signature(Sr(t),Sr(e)).toCompactHex()}${Ft(r).slice(2)}`}const Vxe=Object.freeze(Object.defineProperty({__proto__:null,AbiConstructorNotFoundError:t_,AbiConstructorParamsNotFoundError:kg,AbiDecodingDataSizeInvalidError:gye,AbiDecodingDataSizeTooSmallError:dx,AbiDecodingZeroDataError:ty,AbiEncodingArrayLengthMismatchError:lq,AbiEncodingBytesSizeMismatchError:dq,AbiEncodingLengthMismatchError:r_,AbiErrorInputsNotFoundError:hq,AbiErrorNotFoundError:Q7,AbiErrorSignatureNotFoundError:n_,AbiEventNotFoundError:X7,AbiEventSignatureEmptyTopicsError:pq,AbiEventSignatureNotFoundError:mq,AbiFunctionNotFoundError:dl,AbiFunctionOutputsNotFoundError:i_,AbiFunctionSignatureNotFoundError:gq,BaseError:qe,BaseFeeScalarError:iG,BlockNotFoundError:P_,BytesSizeMismatchError:o_,CallExecutionError:M_,ChainDisconnectedError:Up,ChainDoesNotSupportContract:H6,ChainMismatchError:dG,ChainNotFoundError:hG,CircularReferenceError:sq,ClientChainNotConfiguredError:O_,ContractFunctionExecutionError:Qq,ContractFunctionRevertedError:R6,ContractFunctionZeroDataError:Xq,DataLengthTooLongError:yye,DataLengthTooShortError:vye,DecodeLogDataMismatch:x0,DecodeLogTopicsMismatch:Rl,Eip1559FeesNotSupportedError:Ax,EnsAvatarInvalidNftUriError:cd,EnsAvatarUnsupportedNamespaceError:xG,EnsAvatarUriResolutionError:Rx,EstimateGasExecutionError:rG,ExecutionRevertedError:lu,FeeCapTooHighError:S0,FeeCapTooLowError:B6,FeeConflictError:Vq,FilterTypeNotSupportedError:Eq,HttpRequestError:l0,InsufficientFundsError:D6,IntegerOutOfRangeError:Sq,InternalRpcError:hl,IntrinsicGasTooHighError:F6,IntrinsicGasTooLowError:$6,InvalidAbiDecodingTypeError:yq,InvalidAbiEncodingTypeError:bq,InvalidAbiItemError:JH,InvalidAbiParameterError:YH,InvalidAbiParametersError:QH,InvalidAbiTypeParameterError:nq,InvalidAddressError:ei,InvalidArrayError:vq,InvalidBytesBooleanError:Mq,InvalidChainIdError:Px,InvalidDefinitionTypeError:wq,InvalidFunctionModifierError:rq,InvalidHexBooleanError:_q,InvalidHexValueError:Pq,InvalidInputRpcError:A0,InvalidLegacyVError:E_,InvalidModifierError:tq,InvalidParameterError:XH,InvalidParamsRpcError:Tp,InvalidParenthesisError:aq,InvalidRequestRpcError:Cp,InvalidSerializableTransactionError:Kq,InvalidSerializedTransactionError:yx,InvalidSerializedTransactionTypeError:Wq,InvalidSignatureError:Rd,InvalidStorageKeySizeError:Jq,InvalidStructSignatureError:oq,JsonRpcVersionUnsupportedError:Lp,LimitExceededRpcError:Np,MaxFeePerGasTooLowError:oG,MethodNotFoundRpcError:Ip,MethodNotSupportedRpcError:Op,NonceMaxValueError:L6,NonceTooHighError:O6,NonceTooLowError:N6,OffsetOutOfBoundsError:wye,ParseRpcError:Pp,ProviderDisconnectedError:$p,ProviderRpcError:Bl,RawContractError:vx,ResourceNotFoundRpcError:Rp,ResourceUnavailableRpcError:kp,RpcError:vi,RpcRequestError:wx,SizeExceedsPaddingSizeError:a_,SizeOverflowError:Cq,SliceOffsetOutOfBoundsError:s_,SolidityProtectedKeywordError:eq,SwitchChainError:zp,TimeoutError:k6,TipAboveFeeCapError:Hp,TransactionExecutionError:Zq,TransactionNotFoundError:A_,TransactionReceiptNotFoundError:S_,TransactionRejectedRpcError:Bp,TransactionTypeNotSupportedError:U6,UnauthorizedProviderError:Dp,UnknownNodeError:oy,UnknownRpcError:tG,UnknownSignatureError:iq,UnknownTypeError:ZH,UnsupportedPackedAbiType:xq,UnsupportedProviderMethodError:Fp,UrlRequiredError:$_,UserRejectedRequestError:Gu,WaitForTransactionReceiptTimeoutError:Yq,WebSocketRequestError:eG,assertCurrentChain:L_,assertRequest:v1,assertTransactionEIP1559:J_,assertTransactionEIP2930:Z_,assertTransactionLegacy:Y_,boolToBytes:Iq,boolToHex:hx,bytesToBigInt:sE,bytesToBigint:sE,bytesToBool:qG,bytesToHex:$i,bytesToNumber:GG,bytesToRlp:O2e,bytesToString:VG,ccipFetch:H_,checksumAddress:ny,compactSignatureToHex:Gxe,compactSignatureToSignature:Ywe,concat:Zo,concatBytes:$q,concatHex:Va,createClient:Dl,createPublicClient:oP,createTestClient:Y6e,createTransport:cy,createWalletClient:pV,custom:qve,decodeAbiParameters:kl,decodeDeployData:Zwe,decodeErrorResult:y_,decodeEventLog:w1,decodeFunctionData:C2e,decodeFunctionResult:Nl,defineBlock:wve,defineChain:TG,defineTransaction:vve,defineTransactionReceipt:$2e,defineTransactionRequest:yve,domainSeparator:P2e,encodeAbiParameters:oc,encodeDeployData:G_,encodeErrorResult:I2e,encodeEventTopics:g1,encodeFunctionData:pi,encodeFunctionResult:R2e,encodePacked:zm,etherUnits:v_,extractChain:A2e,fallback:Gve,formatBlock:Mx,formatEther:b1,formatGwei:ci,formatLog:Yo,formatTransaction:Sx,formatTransactionReceipt:V_,formatTransactionRequest:Ol,formatUnits:x_,fromBytes:U2e,fromHex:xye,fromRlp:K_,getAbiItem:H0,getAddress:E0,getChainContractAddress:Ll,getContract:$ve,getContractAddress:zG,getContractError:jp,getCreate2Address:HG,getCreateAddress:jG,getEventSelector:mx,getEventSignature:Rq,getFunctionSelector:m1,getFunctionSignature:u_,getSerializedTransactionType:XG,getTransactionType:T_,getTypesForEIP712Domain:uy,gweiUnits:w_,hashDomain:q_,hashMessage:ly,hashTypedData:E1,hexToBigInt:Sr,hexToBool:f_,hexToBytes:ic,hexToCompactSignature:jxe,hexToNumber:rr,hexToRlp:N2e,hexToSignature:Hxe,hexToString:c_,http:du,isAddress:tn,isAddressEqual:kx,isBytes:oE,isHash:WG,isHex:jt,keccak256:Ur,labelhash:wG,maxInt104:v5e,maxInt112:w5e,maxInt120:x5e,maxInt128:E5e,maxInt136:A5e,maxInt144:S5e,maxInt152:M5e,maxInt16:f5e,maxInt160:_5e,maxInt168:P5e,maxInt176:C5e,maxInt184:I5e,maxInt192:T5e,maxInt200:R5e,maxInt208:k5e,maxInt216:B5e,maxInt224:O5e,maxInt232:N5e,maxInt24:c5e,maxInt240:L5e,maxInt248:D5e,maxInt256:F5e,maxInt32:u5e,maxInt40:l5e,maxInt48:d5e,maxInt56:h5e,maxInt64:p5e,maxInt72:m5e,maxInt8:a5e,maxInt80:g5e,maxInt88:b5e,maxInt96:y5e,maxUint104:Iwe,maxUint112:Twe,maxUint120:Rwe,maxUint128:kwe,maxUint136:Bwe,maxUint144:Owe,maxUint152:Nwe,maxUint16:ywe,maxUint160:Lwe,maxUint168:Dwe,maxUint176:Fwe,maxUint184:$we,maxUint192:Uwe,maxUint200:zwe,maxUint208:jwe,maxUint216:Hwe,maxUint224:qwe,maxUint232:Gwe,maxUint24:vwe,maxUint240:Vwe,maxUint248:Kwe,maxUint256:Wwe,maxUint32:wwe,maxUint40:xwe,maxUint48:Ewe,maxUint56:Awe,maxUint64:Swe,maxUint72:Mwe,maxUint8:bwe,maxUint80:_we,maxUint88:Pwe,maxUint96:Cwe,minInt104:Y5e,minInt112:Q5e,minInt120:X5e,minInt128:ewe,minInt136:twe,minInt144:rwe,minInt152:nwe,minInt16:U5e,minInt160:iwe,minInt168:owe,minInt176:swe,minInt184:awe,minInt192:fwe,minInt200:cwe,minInt208:uwe,minInt216:lwe,minInt224:dwe,minInt232:hwe,minInt24:z5e,minInt240:pwe,minInt248:mwe,minInt256:gwe,minInt32:j5e,minInt40:H5e,minInt48:q5e,minInt56:G5e,minInt64:V5e,minInt72:K5e,minInt8:$5e,minInt80:W5e,minInt88:J5e,minInt96:Z5e,multicall3Abi:j6,namehash:Um,numberToBytes:Tq,numberToHex:ht,offchainLookup:IG,offchainLookupAbiItem:j_,offchainLookupSignature:CG,pad:zs,padBytes:Aq,padHex:js,parseAbi:fye,parseAbiItem:cye,parseAbiParameter:uye,parseAbiParameters:lye,parseEther:Y2e,parseGwei:Q2e,parseTransaction:q2e,parseUnits:X_,presignMessagePrefix:ZG,publicActions:uV,recoverAddress:W_,recoverMessageAddress:YG,recoverPublicKey:JG,recoverTypedDataAddress:QG,rpcTransactionType:nG,serializeAccessList:Q_,serializeTransaction:nV,signatureToCompactSignature:qxe,signatureToHex:IV,size:Wr,slice:Ar,sliceBytes:jq,sliceHex:p_,stringToBytes:La,stringToHex:ry,stringify:fn,testActions:lV,toBytes:Jn,toHex:Ft,toRlp:Fl,transactionType:C_,trim:Ni,validateTypedData:Bx,verifyMessage:j2e,verifyTypedData:H2e,walletActions:hV,webSocket:s5e,weiUnits:pve,zeroAddress:cE,zeroHash:Jwe},Symbol.toStringTag,{value:"Module"})),Kxe=mW(Vxe);var Kp={};Object.defineProperty(Kp,"__esModule",{value:!0});Kp.MAGIC_VALUE_BYTES=Kp.MAGIC_VALUE=void 0;const Wxe="0x1626ba7e";Kp.MAGIC_VALUE=Wxe;const Jxe="0x20c13b0b";Kp.MAGIC_VALUE_BYTES=Jxe;var cP={},dy={},pl={};Object.defineProperty(pl,"__esModule",{value:!0});pl.PermissionsError=pl.PERMISSIONS_REQUEST_REJECTED=void 0;pl.PERMISSIONS_REQUEST_REJECTED=4001;class uP extends Error{constructor(e,r,n){super(e),this.code=r,this.data=n,Object.setPrototypeOf(this,uP.prototype)}}pl.PermissionsError=uP;Object.defineProperty(dy,"__esModule",{value:!0});dy.Wallet=void 0;const g4=Tl,uv=pl;let Zxe=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(g4.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new uv.PermissionsError("Permissions request is invalid",uv.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(g4.Methods.wallet_requestPermissions,e)).data}catch{throw new uv.PermissionsError("Permissions rejected",uv.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every(r=>typeof r=="object"?Object.keys(r).every(n=>!!Object.values(g4.RestrictedMethods).includes(n)):!1)}};dy.Wallet=Zxe;Object.defineProperty(cP,"__esModule",{value:!0});const Yxe=dy,Xk=pl,eB=(t,e)=>e.some(r=>r.parentCapability===t),Qxe=()=>(t,e,r)=>{const n=r.value;return r.value=async function(){const i=new Yxe.Wallet(this.communicator);let o=await i.getPermissions();if(eB(e,o)||(o=await i.requestPermissions([{[e]:{}}])),!eB(e,o))throw new Xk.PermissionsError("Permissions rejected",Xk.PERMISSIONS_REQUEST_REJECTED);return n.apply(this)},r};cP.default=Qxe;var Xxe=et&&et.__decorate||function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var f=t.length-1;f>=0;f--)(s=t[f])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},e3e=et&&et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cx,"__esModule",{value:!0});cx.Safe=void 0;const lv=Kxe,tB=Kp,bc=Tl,rB=Xb,t3e=ox,r3e=e3e(cP);class TV{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(bc.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(bc.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(bc.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,r="0x"){const n=await this.getInfo(),i=(0,lv.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,r]}),o={call:rB.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:i},"latest"]};try{return(await this.communicator.send(bc.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===tB.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(e,r="0x"){const n=await this.getInfo(),i=(0,lv.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,r]}),o={call:rB.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:i},"latest"]};try{return(await this.communicator.send(bc.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===tB.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(e){return(0,lv.hashMessage)(e)}calculateTypedMessageHash(e){const r=typeof e.domain.chainId=="object"?e.domain.chainId.toNumber():Number(e.domain.chainId);let n=e.primaryType;if(!n){const i=Object.values(e.types),o=Object.keys(e.types).filter(s=>i.every(f=>f.every(({type:d})=>d.replace("[","").replace("]","")!==s)));if(o.length===0||o.length>1)throw new Error("Please specify primaryType");n=o[0]}return(0,lv.hashTypedData)({message:e.message,domain:Object.assign(Object.assign({},e.domain),{chainId:r,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt}),types:e.types,primaryType:n})}async getOffChainSignature(e){return(await this.communicator.send(bc.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,r="0x"){let n;if(typeof e=="string"&&(n=async()=>{const i=this.calculateMessageHash(e);return await this.isMessageHashSigned(i,r)}),(0,t3e.isObjectEIP712TypedData)(e)&&(n=async()=>{const i=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(i,r)}),n)return await n();throw new Error("Invalid message type")}async isMessageHashSigned(e,r="0x"){const n=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const i of n)if(await i(e,r))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(bc.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(bc.Methods.requestAddressBook,void 0)).data}}Xxe([(0,r3e.default)()],TV.prototype,"requestAddressBook",null);cx.Safe=TV;var n3e=et&&et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(P6,"__esModule",{value:!0});const i3e=n3e(PH),o3e=ix,s3e=fx,a3e=cx,f3e=dy;let c3e=class{constructor(e={}){const{allowedDomains:r=null,debug:n=!1}=e;this.communicator=new i3e.default(r,n),this.eth=new s3e.Eth(this.communicator),this.txs=new o3e.TXs(this.communicator),this.safe=new a3e.Safe(this.communicator),this.wallet=new f3e.Wallet(this.communicator)}};P6.default=c3e;(function(t){var e=et&&et.__createBinding||(Object.create?function(s,f,d,p){p===void 0&&(p=d);var b=Object.getOwnPropertyDescriptor(f,d);(!b||("get"in b?!f.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(s,p,b)}:function(s,f,d,p){p===void 0&&(p=d),s[p]=f[d]}),r=et&&et.__exportStar||function(s,f){for(var d in s)d!=="default"&&!Object.prototype.hasOwnProperty.call(f,d)&&e(f,s,d)},n=et&&et.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const i=n(P6);t.default=i.default,r(P6,t),r(ox,t),r(Tl,t),r(Yb,t);var o=Qb;Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return o.getSDKVersion}})})(_H);const u3e=es(_H);var RV={},$x={},Ux={};Object.defineProperty(Ux,"__esModule",{value:!0});Ux.getLowerCase=void 0;function l3e(t){return t&&t.toLowerCase()}Ux.getLowerCase=l3e;Object.defineProperty($x,"__esModule",{value:!0});$x.SafeAppProvider=void 0;const d3e=yw,dv=Ux;class h3e extends d3e.EventEmitter{constructor(e,r){super(),this.submittedTxs=new Map,this.safe=e,this.sdk=r}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(e){const{method:r,params:n=[]}=e;switch(r){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{const[d,p]=n;if(this.safe.safeAddress.toLowerCase()!==p.toLowerCase())throw new Error("The address or message hash is invalid");const b=await this.sdk.txs.signMessage(d);return("signature"in b?b.signature:void 0)||"0x"}case"eth_sign":{const[d,p]=n;if(this.safe.safeAddress.toLowerCase()!==d.toLowerCase()||!p.startsWith("0x"))throw new Error("The address or message hash is invalid");const b=await this.sdk.txs.signMessage(p);return("signature"in b?b.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[d,p]=n,b=typeof p=="string"?JSON.parse(p):p;if(this.safe.safeAddress.toLowerCase()!==d.toLowerCase())throw new Error("The address is invalid");const v=await this.sdk.txs.signTypedMessage(b);return("signature"in v?v.signature:void 0)||"0x"}case"eth_sendTransaction":const i=Object.assign({value:"0",data:"0x"},n[0]);typeof i.gas=="string"&&i.gas.startsWith("0x")&&(i.gas=parseInt(i.gas,16));const o=await this.sdk.txs.send({txs:[i],params:{safeTxGas:i.gas}});return this.submittedTxs.set(o.safeTxHash,{from:this.safe.safeAddress,hash:o.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:i.data,value:i.value,to:i.to,blockHash:null,blockNumber:null,transactionIndex:null}),o.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,dv.getLowerCase)(n[0]),n[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,dv.getLowerCase)(n[0]),n[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,dv.getLowerCase)(n[0]),n[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,dv.getLowerCase)(n[0]),n[1],n[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([n[0],n[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([n[0],n[1]]);case"eth_getTransactionByHash":let f=n[0];try{f=(await this.sdk.txs.getBySafeTxHash(f)).txHash||f}catch{}return this.submittedTxs.has(f)?this.submittedTxs.get(f):this.sdk.eth.getTransactionByHash([f]).then(d=>(d&&(d.hash=n[0]),d));case"eth_getTransactionReceipt":{let d=n[0];try{d=(await this.sdk.txs.getBySafeTxHash(d)).txHash||d}catch{}return this.sdk.eth.getTransactionReceipt([d]).then(p=>(p&&(p.transactionHash=n[0]),p))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(n[0]);case"eth_call":return this.sdk.eth.call([n[0],n[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([n[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(n[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([n[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,r){e||r("Undefined request"),this.request(e).then(n=>r(null,{jsonrpc:"2.0",id:e.id,result:n})).catch(n=>r(n,null))}}$x.SafeAppProvider=h3e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppProvider=void 0;var e=$x;Object.defineProperty(t,"SafeAppProvider",{enumerable:!0,get:function(){return e.SafeAppProvider}})})(RV);const lP=new u3e,p3e=t=>new Promise((e,r)=>setTimeout(r,t));let hv;const zx=async()=>(hv!=null||(hv=await lP.safe.getInfo()),hv),kV=async()=>{try{const t=await Promise.race([p3e(300),zx()]);return console.log(t),t!=null}catch{return!1}},m3e=async()=>{const t=await zx();if(!t.chainId)throw Error("Unsupported chain");return new Jge(new RV.SafeAppProvider(t,lP))},g3e=async t=>(await lP.txs.send({txs:t})).safeTxHash,b3e=84531,S1=async()=>{var t;return await kV()?(console.log("Use SafeAppsProvider"),await m3e()):(console.log("Use JsonRpcProvider"),new MH((t=co.getNetworkById(b3e))==null?void 0:t.url))},jx=async t=>{var e,r;return console.log("Use JsonRpcProvider"),console.log((e=co.getNetworkById(parseInt(t)))==null?void 0:e.url),new MH((r=co.getNetworkById(parseInt(t)))==null?void 0:r.url)},y3e="_nav_dgwpp_1",v3e="_wrapper_dgwpp_20",w3e="_maincontainer_dgwpp_31",x3e="_network_dgwpp_42",E3e="_buttonContainer_dgwpp_49",A3e="_container_dgwpp_59",S3e="_mode_dgwpp_66",M3e="_root_dgwpp_76",_3e="_icon_dgwpp_83",P3e="_iconLight_dgwpp_90",C3e="_iconDark_dgwpp_95",td={nav:y3e,wrapper:v3e,maincontainer:w3e,network:x3e,buttonContainer:E3e,container:A3e,mode:S3e,root:M3e,icon:_3e,iconLight:P3e,iconDark:C3e},I3e=t=>{const{colorScheme:e,toggleColorScheme:r}=FQ(),[n,i]=Z.useState(""),[o,s]=Z.useState(84531),f=e==="dark";return Z.useEffect(()=>{(async()=>{var b,v;const d=await S1(),{chainId:p}=await d.getNetwork();s(p),i(`${(b=co.getNetworkById(parseInt(p)))==null?void 0:b.name} ${(v=co.getNetworkById(parseInt(p)))==null?void 0:v.type}`)})()},[]),ze.jsx(Ws.Header,{children:ze.jsx("nav",{className:td.nav,children:ze.jsx("div",{className:td.wrapper,children:ze.jsxs(km,{position:"apart",className:td.maincontainer,children:[ze.jsx(km,{className:td.container,children:ze.jsx(kS,{onClick:()=>{navigate($u.home)},style:{cursor:"pointer",width:"170px"},src:f?Kie:Vie,alt:"Logo"})}),ze.jsx(km,{className:td.mode,children:ze.jsx("div",{className:td.container,children:f?ze.jsx(Gie,{size:24,stroke:1.5,onClick:()=>r(),style:{cursor:"pointer"}}):ze.jsx(Hie,{size:24,stroke:1.5,style:{cursor:"pointer"},onClick:()=>r()})})})]})})})})},T3e=t=>{const{children:e}=t,[r,n]=Z.useState(!1);return ze.jsxs(Ws,{header:{height:60},padding:"md",styles:{main:{backgroundColor:"light-dark( 'red', 'blue')"}},children:[ze.jsx(I3e,{setOpened:n,opened:r}),ze.jsxs(Ws.Main,{children:[" ",ze.jsx(Nie,{children:e})]})]})};/** +`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(Hp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class oy extends qe{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}function __(t,e){const r=(t.details||"").toLowerCase(),n=t.walk(i=>i.code===lu.code);return n instanceof qe?new lu({cause:t,message:n.details}):lu.nodeMessage.test(r)?new lu({cause:t,message:t.details}):S0.nodeMessage.test(r)?new S0({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):B6.nodeMessage.test(r)?new B6({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):O6.nodeMessage.test(r)?new O6({cause:t,nonce:e==null?void 0:e.nonce}):N6.nodeMessage.test(r)?new N6({cause:t,nonce:e==null?void 0:e.nonce}):L6.nodeMessage.test(r)?new L6({cause:t,nonce:e==null?void 0:e.nonce}):D6.nodeMessage.test(r)?new D6({cause:t}):F6.nodeMessage.test(r)?new F6({cause:t,gas:e==null?void 0:e.gas}):$6.nodeMessage.test(r)?new $6({cause:t,gas:e==null?void 0:e.gas}):U6.nodeMessage.test(r)?new U6({cause:t}):Hp.nodeMessage.test(r)?new Hp({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new oy({cause:t})}function bve(t,{docsPath:e,...r}){const n=(()=>{const i=__(t,r);return i instanceof oy?t:i})();return new rG(n,{docsPath:e,...r})}function xx(t,{format:e}){if(!e)return{};const r={};function n(o){const s=Object.keys(o);for(const f of s)f in t&&(r[f]=t[f]),o[f]&&typeof o[f]=="object"&&!Array.isArray(o[f])&&n(o[f])}const i=e(t||{});return n(i),r}function Ex(t,e){return({exclude:r,format:n})=>({exclude:r,format:i=>{const o=e(i);if(r)for(const s of r)delete o[s];return{...o,...n(i)}},type:t})}const nG={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function Ol(t){return{...t,gas:typeof t.gas<"u"?ht(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?ht(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?ht(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?ht(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?ht(t.nonce):void 0,type:typeof t.type<"u"?nG[t.type]:void 0,value:typeof t.value<"u"?ht(t.value):void 0}}const yve=Ex("transactionRequest",Ol);function w1(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:i,to:o}=t,s=e?ls(e):void 0;if(s&&!tn(s.address))throw new ei({address:s.address});if(o&&!tn(o))throw new ei({address:o});if(typeof r<"u"&&(typeof n<"u"||typeof i<"u"))throw new Vq;if(n&&n>2n**256n-1n)throw new S0({maxFeePerGas:n});if(i&&n&&i>n)throw new Hp({maxFeePerGas:n,maxPriorityFeePerGas:i})}class iG extends qe{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class Ax extends qe{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class oG extends qe{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ci(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class P_ extends qe{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}const C_={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function Sx(t){const e={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,chainId:t.chainId?rr(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?rr(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?C_[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return e.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof e.v=="bigint"){if(e.v===0n||e.v===27n)return 0;if(e.v===1n||e.v===28n)return 1;if(e.v>=35n)return e.v%2n===0n?1:0}})(),e.type==="legacy"&&(delete e.accessList,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas,delete e.yParity),e.type==="eip2930"&&(delete e.maxFeePerGas,delete e.maxPriorityFeePerGas),e}const vve=Ex("transaction",Sx);function Mx(t){var r;const e=(r=t.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:Sx(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,difficulty:t.difficulty?BigInt(t.difficulty):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}const wve=Ex("block",Mx);async function M0(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:i}={}){var b,v,A;const o=n??"latest",s=i??!1,f=r!==void 0?ht(r):void 0;let d=null;if(e?d=await t.request({method:"eth_getBlockByHash",params:[e,s]}):d=await t.request({method:"eth_getBlockByNumber",params:[f||o,s]}),!d)throw new P_({blockHash:e,blockNumber:r});return(((A=(v=(b=t.chain)==null?void 0:b.formatters)==null?void 0:v.block)==null?void 0:A.format)||Mx)(d)}async function I_(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function xve(t,e){return sG(t,e)}async function sG(t,e){var o,s,f;const{block:r,chain:n=t.chain,request:i}=e||{};if(typeof((o=n==null?void 0:n.fees)==null?void 0:o.defaultPriorityFee)=="function"){const d=r||await mt(t,M0,"getBlock")({});return n.fees.defaultPriorityFee({block:d,client:t,request:i})}if(typeof((s=n==null?void 0:n.fees)==null?void 0:s.defaultPriorityFee)<"u")return(f=n==null?void 0:n.fees)==null?void 0:f.defaultPriorityFee;try{const d=await t.request({method:"eth_maxPriorityFeePerGas"});return Sr(d)}catch{const[d,p]=await Promise.all([r?Promise.resolve(r):mt(t,M0,"getBlock")({}),mt(t,I_,"getGasPrice")({})]);if(typeof d.baseFeePerGas!="bigint")throw new Ax;const b=p-d.baseFeePerGas;return b<0n?0n:b}}async function aG(t,e){return tE(t,e)}async function tE(t,e){var A,_;const{block:r,chain:n=t.chain,request:i,type:o="eip1559"}=e||{},s=await(async()=>{var S,P;return typeof((S=n==null?void 0:n.fees)==null?void 0:S.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:i}):((P=n==null?void 0:n.fees)==null?void 0:P.baseFeeMultiplier)??1.2})();if(s<1)throw new iG;const d=10**(((A=s.toString().split(".")[1])==null?void 0:A.length)??0),p=S=>S*BigInt(Math.ceil(s*d))/BigInt(d),b=r||await mt(t,M0,"getBlock")({});if(typeof((_=n==null?void 0:n.fees)==null?void 0:_.estimateFeesPerGas)=="function")return n.fees.estimateFeesPerGas({block:r,client:t,multiply:p,request:i,type:o});if(o==="eip1559"){if(typeof b.baseFeePerGas!="bigint")throw new Ax;const S=i!=null&&i.maxPriorityFeePerGas?i.maxPriorityFeePerGas:await sG(t,{block:b,chain:n,request:i}),P=p(b.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??P+S,maxPriorityFeePerGas:S}}return{gasPrice:(i==null?void 0:i.gasPrice)??p(await mt(t,I_,"getGasPrice")({}))}}async function fG(t,{address:e,blockTag:r="latest",blockNumber:n}){const i=await t.request({method:"eth_getTransactionCount",params:[e,n?ht(n):r]});return rr(i)}function T_(t){if(t.type)return t.type;if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new Kq({transaction:t})}async function _x(t,e){const{account:r=t.account,chain:n,gas:i,nonce:o,type:s}=e;if(!r)throw new v1;const f=ls(r),d=await mt(t,M0,"getBlock")({blockTag:"latest"}),p={...e,from:f.address};if(typeof o>"u"&&(p.nonce=await mt(t,fG,"getTransactionCount")({address:f.address,blockTag:"pending"})),typeof s>"u")try{p.type=T_(p)}catch{p.type=typeof d.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(p.type==="eip1559"){const{maxFeePerGas:b,maxPriorityFeePerGas:v}=await tE(t,{block:d,chain:n,request:p});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(p.gas=await mt(t,R_,"estimateGas")({...p,account:{address:f.address,type:"json-rpc"}})),w1(p),p}async function R_(t,e){var i,o,s;const r=e.account??t.account;if(!r)throw new v1({docsPath:"/docs/actions/public/estimateGas"});const n=ls(r);try{const{accessList:f,blockNumber:d,blockTag:p,data:b,gas:v,gasPrice:A,maxFeePerGas:_,maxPriorityFeePerGas:S,nonce:P,to:I,value:C,...T}=n.type==="local"?await _x(t,e):e,O=(d?ht(d):void 0)||p;w1(e);const D=(s=(o=(i=t.chain)==null?void 0:i.formatters)==null?void 0:o.transactionRequest)==null?void 0:s.format,V=(D||Ol)({...xx(T,{format:D}),from:n.address,accessList:f,data:b,gas:v,gasPrice:A,maxFeePerGas:_,maxPriorityFeePerGas:S,nonce:P,to:I,value:C}),Y=await t.request({method:"eth_estimateGas",params:O?[V,O]:[V]});return BigInt(Y)}catch(f){throw bve(f,{...e,account:n,chain:t.chain})}}async function cG(t,{abi:e,address:r,args:n,functionName:i,...o}){const s=pi({abi:e,args:n,functionName:i});try{return await mt(t,R_,"estimateGas")({data:s,to:r,...o})}catch(f){const d=o.account?ls(o.account):void 0;throw jp(f,{abi:e,address:r,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:d==null?void 0:d.address})}}const Dk="/docs/contract/decodeEventLog";function x1({abi:t,data:e,strict:r,topics:n}){const i=r??!0,[o,...s]=n;if(!o)throw new pq({docsPath:Dk});const f=t.find(S=>S.type==="event"&&o===mx(Qs(S)));if(!(f&&"name"in f)||f.type!=="event")throw new mq(o,{docsPath:Dk});const{name:d,inputs:p}=f,b=p==null?void 0:p.some(S=>!("name"in S&&S.name));let v=b?[]:{};const A=p.filter(S=>"indexed"in S&&S.indexed);for(let S=0;S!("indexed"in S&&S.indexed));if(_.length>0){if(e&&e!=="0x")try{const S=kl(_,e);if(S)if(b)v=[...v,...S];else for(let P=0;P<_.length;P++)v[_[P].name]=S[P]}catch(S){if(i)throw S instanceof dx?new x0({abiItem:f,data:S.data,params:S.params,size:S.size}):S}else if(i)throw new x0({abiItem:f,data:"0x",params:_,size:0})}return{eventName:d,args:Object.values(v).length>0?v:void 0}}function Eve({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(kl([t],e)||[])[0]}function Yo(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}async function k_(t,{address:e,blockHash:r,fromBlock:n,toBlock:i,event:o,events:s,args:f,strict:d}={}){const p=d??!1,b=s??(o?[o]:void 0);let v=[];b&&(v=[b.flatMap(_=>b1({abi:[_],eventName:_.name,args:f}))],o&&(v=v[0]));let A;return r?A=await t.request({method:"eth_getLogs",params:[{address:e,topics:v,blockHash:r}]}):A=await t.request({method:"eth_getLogs",params:[{address:e,topics:v,fromBlock:typeof n=="bigint"?ht(n):n,toBlock:typeof i=="bigint"?ht(i):i}]}),A.map(_=>{var S;try{const{eventName:P,args:I}=b?x1({abi:b,data:_.data,topics:_.topics,strict:p}):{eventName:void 0,args:void 0};return Yo(_,{args:I,eventName:P})}catch(P){let I,C;if(P instanceof x0||P instanceof Rl){if(p)return;I=P.abiItem.name,C=(S=P.abiItem.inputs)==null?void 0:S.some(T=>!("name"in T&&T.name))}return Yo(_,{args:C?[]:{},eventName:I})}}).filter(Boolean)}async function B_(t,{abi:e,address:r,args:n,blockHash:i,eventName:o,fromBlock:s,toBlock:f,strict:d}){const p=o?H0({abi:e,name:o}):void 0,b=p?void 0:e.filter(v=>v.type==="event");return mt(t,k_,"getLogs")({address:r,args:n,blockHash:i,event:p,events:b,fromBlock:s,toBlock:f,strict:d})}const i4="/docs/contract/decodeFunctionResult";function Nl({abi:t,args:e,functionName:r,data:n}){let i=t[0];if(r&&(i=H0({abi:t,args:e,name:r}),!i))throw new dl(r,{docsPath:i4});if(i.type!=="function")throw new dl(void 0,{docsPath:i4});if(!i.outputs)throw new i_(i.name,{docsPath:i4});const o=kl(i.outputs,n);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}const Ave="modulepreload",Sve=function(t){return"/"+t},Fk={},z6=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(o=>{if(o=Sve(o),o in Fk)return;Fk[o]=!0;const s=o.endsWith(".css"),f=s?'[rel="stylesheet"]':"";if(!!n)for(let b=i.length-1;b>=0;b--){const v=i[b];if(v.href===o&&(!s||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${f}`))return;const p=document.createElement("link");if(p.rel=s?"stylesheet":Ave,s||(p.as="script",p.crossOrigin=""),p.href=o,document.head.appendChild(p),s)return new Promise((b,v)=>{p.addEventListener("load",b),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})},j6=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],uG=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],lG=[...uG,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],Mve=[...uG,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],$k=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],Uk=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],_ve=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],Pve="0x82ad56cb";class H6 extends qe{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class dG extends qe{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class hG extends qe{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class O_ extends qe{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}class Px extends qe{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}function Ll({blockNumber:t,chain:e,contract:r}){var i;const n=(i=e==null?void 0:e.contracts)==null?void 0:i[r];if(!n)throw new H6({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new H6({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}function Cve(t,{docsPath:e,...r}){const n=(()=>{const i=__(t,r);return i instanceof oy?t:i})();return new M_(n,{docsPath:e,...r})}const o4=new Map;function N_({fn:t,id:e,shouldSplitBatch:r,wait:n=0,sort:i}){const o=async()=>{const b=d();s();const v=b.map(({args:A})=>A);v.length!==0&&t(v).then(A=>{var _;i&&Array.isArray(A)&&A.sort(i);for(let S=0;S{var _;for(let S=0;So4.delete(e),f=()=>d().map(({args:b})=>b),d=()=>o4.get(e)||[],p=b=>o4.set(e,[...d(),b]);return{flush:s,async schedule(b){const v={},A=new Promise((P,I)=>{v.resolve=P,v.reject=I});return(r==null?void 0:r([...f(),b]))&&o(),d().length>0?(p({args:b,pendingPromise:v}),A):(p({args:b,pendingPromise:v}),setTimeout(o,n),A)}}}async function sy(t,e){var C,T,k,O;const{account:r=t.account,batch:n=!!((C=t.batch)!=null&&C.multicall),blockNumber:i,blockTag:o="latest",accessList:s,data:f,gas:d,gasPrice:p,maxFeePerGas:b,maxPriorityFeePerGas:v,nonce:A,to:_,value:S,...P}=e,I=r?ls(r):void 0;try{w1(e);const U=(i?ht(i):void 0)||o,V=(O=(k=(T=t.chain)==null?void 0:T.formatters)==null?void 0:k.transactionRequest)==null?void 0:O.format,W=(V||Ol)({...xx(P,{format:V}),from:I==null?void 0:I.address,accessList:s,data:f,gas:d,gasPrice:p,maxFeePerGas:b,maxPriorityFeePerGas:v,nonce:A,to:_,value:S});if(n&&Ive({request:W}))try{return await Tve(t,{...W,blockNumber:i,blockTag:o})}catch(x){if(!(x instanceof O_)&&!(x instanceof H6))throw x}const ie=await t.request({method:"eth_call",params:U?[W,U]:[W]});return ie==="0x"?{data:void 0}:{data:ie}}catch(D){const U=Rve(D),{offchainLookup:V,offchainLookupSignature:Y}=await z6(()=>Promise.resolve().then(()=>E2e),void 0);if((U==null?void 0:U.slice(0,10))===Y&&_)return{data:await V(t,{data:U,to:_})};throw Cve(D,{...e,account:I,chain:t.chain})}}function Ive({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(Pve)||!r||Object.values(n).filter(i=>typeof i<"u").length>0)}async function Tve(t,e){var P;const{batchSize:r=1024,wait:n=0}=typeof((P=t.batch)==null?void 0:P.multicall)=="object"?t.batch.multicall:{},{blockNumber:i,blockTag:o="latest",data:s,multicallAddress:f,to:d}=e;let p=f;if(!p){if(!t.chain)throw new O_;p=Ll({blockNumber:i,chain:t.chain,contract:"multicall3"})}const v=(i?ht(i):void 0)||o,{schedule:A}=N_({id:`${t.uid}.${v}`,wait:n,shouldSplitBatch(I){return I.reduce((T,{data:k})=>T+(k.length-2),0)>r*2},fn:async I=>{const C=I.map(O=>({allowFailure:!0,callData:O.data,target:O.to})),T=pi({abi:j6,args:[C],functionName:"aggregate3"}),k=await t.request({method:"eth_call",params:[{data:T,to:p},v]});return Nl({abi:j6,args:[C],functionName:"aggregate3",data:k||"0x"})}}),[{returnData:_,success:S}]=await A({data:s,to:d});if(!S)throw new vx({data:_});return _==="0x"?{data:void 0}:{data:_}}function Rve(t){if(!(t instanceof qe))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}async function Xs(t,{abi:e,address:r,args:n,functionName:i,...o}){const s=pi({abi:e,args:n,functionName:i});try{const{data:f}=await mt(t,sy,"call")({data:s,to:r,...o});return Nl({abi:e,args:n,functionName:i,data:f||"0x"})}catch(f){throw jp(f,{abi:e,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}async function pG(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:o,...s}){const f=s.account?ls(s.account):void 0,d=pi({abi:e,args:n,functionName:o});try{const{data:p}=await mt(t,sy,"call")({batch:!1,data:`${d}${i?i.replace("0x",""):""}`,to:r,...s});return{result:Nl({abi:e,args:n,functionName:o,data:p||"0x"}),request:{abi:e,address:r,args:n,dataSuffix:i,functionName:o,...s}}}catch(p){throw jp(p,{abi:e,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:o,sender:f==null?void 0:f.address})}}const s4=new Map,zk=new Map;let kve=0;function E1(t,e,r){const n=++kve,i=()=>s4.get(t)||[],o=()=>{const b=i();s4.set(t,b.filter(v=>v.id!==n))},s=()=>{const b=zk.get(t);i().length===1&&b&&b(),o()},f=i();if(s4.set(t,[...f,{id:n,fns:e}]),f&&f.length>0)return s;const d={};for(const b in e)d[b]=(...v)=>{var _,S;const A=i();if(A.length!==0)for(const P of A)(S=(_=P.fns)[b])==null||S.call(_,...v)};const p=r(d);return typeof p=="function"&&zk.set(t,p),s}async function q6(t){return new Promise(e=>setTimeout(e,t))}function ay(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let i=!0;const o=()=>i=!1;return(async()=>{let f;e&&(f=await t({unpoll:o}));const d=await(r==null?void 0:r(f))??n;await q6(d);const p=async()=>{i&&(await t({unpoll:o}),await q6(n),p())};p()})(),o}const Bve=new Map,Ove=new Map;function Nve(t){const e=(i,o)=>({clear:()=>o.delete(i),get:()=>o.get(i),set:s=>o.set(i,s)}),r=e(t,Bve),n=e(t,Ove);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function Lve(t,{cacheKey:e,cacheTime:r=1/0}){const n=Nve(e),i=n.response.get();if(i&&r>0&&new Date().getTime()-i.created.getTime()`blockNumber.${t}`;async function fy(t,{cacheTime:e=t.cacheTime,maxAge:r}={}){const n=await Lve(()=>t.request({method:"eth_blockNumber"}),{cacheKey:Dve(t.uid),cacheTime:r??e});return BigInt(n)}async function Cx(t,{filter:e}){const r="strict"in e&&e.strict;return(await e.request({method:"eth_getFilterChanges",params:[e.id]})).map(i=>{var o;if(typeof i=="string")return i;try{const{eventName:s,args:f}="abi"in e&&e.abi?x1({abi:e.abi,data:i.data,topics:i.topics,strict:r}):{eventName:void 0,args:void 0};return Yo(i,{args:f,eventName:s})}catch(s){let f,d;if(s instanceof x0||s instanceof Rl){if("strict"in e&&e.strict)return;f=s.abiItem.name,d=(o=s.abiItem.inputs)==null?void 0:o.some(p=>!("name"in p&&p.name))}return Yo(i,{args:d?[]:{},eventName:f})}}).filter(Boolean)}async function Ix(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function mG(t,{abi:e,address:r,args:n,batch:i=!0,eventName:o,onError:s,onLogs:f,poll:d,pollingInterval:p=t.pollingInterval,strict:b}){return(typeof d<"u"?d:t.transport.type!=="webSocket")?(()=>{const S=fn(["watchContractEvent",r,n,i,t.uid,o,p]),P=b??!1;return E1(S,{onLogs:f,onError:s},I=>{let C,T,k=!1;const O=ay(async()=>{var D;if(!k){try{T=await mt(t,b_,"createContractEventFilter")({abi:e,address:r,args:n,eventName:o,strict:P})}catch{}k=!0;return}try{let U;if(T)U=await mt(t,Cx,"getFilterChanges")({filter:T});else{const V=await mt(t,fy,"getBlockNumber")({});C&&C!==V?U=await mt(t,B_,"getContractEvents")({abi:e,address:r,args:n,eventName:o,fromBlock:C+1n,toBlock:V,strict:P}):U=[],C=V}if(U.length===0)return;if(i)I.onLogs(U);else for(const V of U)I.onLogs([V])}catch(U){T&&U instanceof A0&&(k=!1),(D=I.onError)==null||D.call(I,U)}},{emitOnBegin:!0,interval:p});return async()=>{T&&await mt(t,Ix,"uninstallFilter")({filter:T}),O()}})})():(()=>{let S=!0,P=()=>S=!1;return(async()=>{try{const I=o?b1({abi:e,eventName:o,args:n}):[],{unsubscribe:C}=await t.transport.subscribe({params:["logs",{address:r,topics:I}],onData(T){var O;if(!S)return;const k=T.result;try{const{eventName:D,args:U}=x1({abi:e,data:k.data,topics:k.topics,strict:b}),V=Yo(k,{args:U,eventName:D});f([V])}catch(D){let U,V;if(D instanceof x0||D instanceof Rl){if(b)return;U=D.abiItem.name,V=(O=D.abiItem.inputs)==null?void 0:O.some(W=>!("name"in W&&W.name))}const Y=Yo(k,{args:V?[]:{},eventName:U});f([Y])}},onError(T){s==null||s(T)}});P=C,S||P()}catch(I){s==null||s(I)}})(),P})()}function L_({chain:t,currentChainId:e}){if(!t)throw new hG;if(e!==t.id)throw new dG({chain:t,currentChainId:e})}function Fve(t,{docsPath:e,...r}){const n=(()=>{const i=__(t,r);return i instanceof oy?t:i})();return new Zq(n,{docsPath:e,...r})}async function qp(t){const e=await t.request({method:"eth_chainId"});return rr(e)}async function D_(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]})}async function F_(t,e){var P,I,C,T;const{account:r=t.account,chain:n=t.chain,accessList:i,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A,..._}=e;if(!r)throw new v1({docsPath:"/docs/actions/wallet/sendTransaction"});const S=ls(r);try{w1(e);let k;if(n!==null&&(k=await mt(t,qp,"getChainId")({}),L_({currentChainId:k,chain:n})),S.type==="local"){const V=await mt(t,_x,"prepareTransactionRequest")({account:S,accessList:i,chain:n,data:o,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A,..._});k||(k=await mt(t,qp,"getChainId")({}));const Y=(P=n==null?void 0:n.serializers)==null?void 0:P.transaction,W=await S.signTransaction({...V,chainId:k},{serializer:Y});return await mt(t,D_,"sendRawTransaction")({serializedTransaction:W})}const O=(T=(C=(I=t.chain)==null?void 0:I.formatters)==null?void 0:C.transactionRequest)==null?void 0:T.format,U=(O||Ol)({...xx(_,{format:O}),accessList:i,data:o,from:S.address,gas:s,gasPrice:f,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:b,to:v,value:A});return await t.request({method:"eth_sendTransaction",params:[U]})}catch(k){throw Fve(k,{...e,account:S,chain:e.chain||void 0})}}async function gG(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:o,...s}){const f=pi({abi:e,args:n,functionName:o});return await mt(t,F_,"sendTransaction")({data:`${f}${i?i.replace("0x",""):""}`,to:r,...s})}function $ve({abi:t,address:e,publicClient:r,walletClient:n}){const i=r!=null,o=n!=null,s={};let f=!1,d=!1,p=!1;for(const b of t)if(b.type==="function"?b.stateMutability==="view"||b.stateMutability==="pure"?f=!0:d=!0:b.type==="event"&&(p=!0),f&&d&&p)break;return i&&(f&&(s.read=new Proxy({},{get(b,v){return(...A)=>{const{args:_,options:S}=av(A);return mt(r,Xs,"readContract")({abi:t,address:e,functionName:v,args:_,...S})}}})),d&&(s.simulate=new Proxy({},{get(b,v){return(...A)=>{const{args:_,options:S}=av(A);return mt(r,pG,"simulateContract")({abi:t,address:e,functionName:v,args:_,...S})}}})),p&&(s.createEventFilter=new Proxy({},{get(b,v){return(...A)=>{const _=t.find(I=>I.type==="event"&&I.name===v),{args:S,options:P}=a4(A,_);return mt(r,b_,"createContractEventFilter")({abi:t,address:e,eventName:v,args:S,...P})}}}),s.getEvents=new Proxy({},{get(b,v){return(...A)=>{const _=t.find(I=>I.type==="event"&&I.name===v),{args:S,options:P}=a4(A,_);return mt(r,B_,"getContractEvents")({abi:t,address:e,eventName:v,args:S,...P})}}}),s.watchEvent=new Proxy({},{get(b,v){return(...A)=>{const _=t.find(I=>I.type==="event"&&I.name===v),{args:S,options:P}=a4(A,_);return mt(r,mG,"watchContractEvent")({abi:t,address:e,eventName:v,args:S,...P})}}}))),o&&d&&(s.write=new Proxy({},{get(b,v){return(...A)=>{const{args:_,options:S}=av(A);return mt(n,gG,"writeContract")({abi:t,address:e,functionName:v,args:_,...S})}}})),(i||o)&&d&&(s.estimateGas=new Proxy({},{get(b,v){return(...A)=>{const{args:_,options:S}=av(A);return mt(r??n,cG,"estimateContractGas")({abi:t,address:e,functionName:v,args:_,...S,account:S.account??n.account})}}})),s.address=e,s.abi=t,s}function av(t){const e=t.length&&Array.isArray(t[0]),r=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:r,options:n}}function a4(t,e){let r=!1;Array.isArray(t[0])?r=!0:t.length===1?r=e.inputs.some(o=>o.indexed):t.length===2&&(r=!0);const n=r?t[0]:void 0,i=(r?t[1]:t[0])??{};return{args:n,options:i}}async function Uve(t,{chain:e}){const{id:r,name:n,nativeCurrency:i,rpcUrls:o,blockExplorers:s}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:ht(r),chainName:n,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:s?Object.values(s).map(({url:f})=>f):void 0}]})}function zve(t){const e=Ur(`0x${t.substring(4)}`).substring(26);return ny(`0x${e}`)}const rE=256;let fv=rE,cv;function jve(t=11){if(!cv||fv+t>rE*2){cv="",fv=0;for(let e=0;e{const C=I(P);for(const k in _)delete C[k];const T={...P,...C};return Object.assign(T,{extend:S(T)})}}return Object.assign(_,{extend:S(_)})}function nE(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,o)=>{const s=async({count:f=0}={})=>{const d=async({error:p})=>{const b=typeof e=="function"?e({count:f,error:p}):e;b&&await q6(b),s({count:f+1})};try{const p=await t();i(p)}catch(p){if(f"code"in t?t.code!==-1&&t.code!==-32004&&t.code!==-32005&&t.code!==-32042&&t.code!==-32603:t instanceof l0&&t.status?t.status!==403&&t.status!==408&&t.status!==413&&t.status!==429&&t.status!==500&&t.status!==502&&t.status!==503&&t.status!==504:!1;function Hve(t,{retryDelay:e=150,retryCount:r=3}={}){return async n=>nE(async()=>{try{return await t(n)}catch(i){const o=i;switch(o.code){case Pp.code:throw new Pp(o);case Cp.code:throw new Cp(o);case Ip.code:throw new Ip(o);case Tp.code:throw new Tp(o);case hl.code:throw new hl(o);case A0.code:throw new A0(o);case Rp.code:throw new Rp(o);case kp.code:throw new kp(o);case Bp.code:throw new Bp(o);case Op.code:throw new Op(o);case Np.code:throw new Np(o);case Lp.code:throw new Lp(o);case Gu.code:throw new Gu(o);case Dp.code:throw new Dp(o);case Fp.code:throw new Fp(o);case $p.code:throw new $p(o);case Up.code:throw new Up(o);case zp.code:throw new zp(o);case 5e3:throw new Gu(o);default:throw i instanceof qe?i:new tG(o)}}},{delay:({count:i,error:o})=>{var s;if(o&&o instanceof l0){const f=(s=o==null?void 0:o.headers)==null?void 0:s.get("Retry-After");if(f!=null&&f.match(/\d/))return parseInt(f)*1e3}return~~(1<!bG(i)})}function cy({key:t,name:e,request:r,retryCount:n=3,retryDelay:i=150,timeout:o,type:s},f){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:i,timeout:o,type:s},request:Hve(r,{retryCount:n,retryDelay:i}),value:f}}function qve(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:i}=e;return({retryCount:o})=>cy({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??o,retryDelay:i,type:"custom"})}function Gve(t,e={}){const{key:r="fallback",name:n="Fallback",rank:i=!1,retryCount:o,retryDelay:s}=e;return({chain:f,pollingInterval:d=4e3,timeout:p})=>{let b=t,v=()=>{};const A=cy({key:r,name:n,async request({method:_,params:S}){const P=async(I=0)=>{const C=b[I]({chain:f,retryCount:0,timeout:p});try{const T=await C.request({method:_,params:S});return v({method:_,params:S,response:T,transport:C,status:"success"}),T}catch(T){if(v({error:T,method:_,params:S,transport:C,status:"error"}),bG(T)||I===b.length-1)throw T;return P(I+1)}};return P()},retryCount:o,retryDelay:s,type:"fallback"},{onResponse:_=>v=_,transports:b.map(_=>_({chain:f,retryCount:0}))});if(i){const _=typeof i=="object"?i:{};Vve({chain:f,interval:_.interval??d,onTransports:S=>b=S,sampleCount:_.sampleCount,timeout:_.timeout,transports:b,weights:_.weights})}return A}}function Vve({chain:t,interval:e=4e3,onTransports:r,sampleCount:n=10,timeout:i=1e3,transports:o,weights:s={}}){const{stability:f=.7,latency:d=.3}=s,p=[],b=async()=>{const v=await Promise.all(o.map(async S=>{const P=S({chain:t,retryCount:0,timeout:i}),I=Date.now();let C,T;try{await P.request({method:"net_listening"}),T=1}catch{T=0}finally{C=Date.now()}return{latency:C-I,success:T}}));p.push(v),p.length>n&&p.shift();const A=Math.max(...p.map(S=>Math.max(...S.map(({latency:P})=>P)))),_=o.map((S,P)=>{const I=p.map(D=>D[P].latency),T=1-I.reduce((D,U)=>D+U,0)/I.length/A,k=p.map(D=>D[P].success),O=k.reduce((D,U)=>D+U,0)/k.length;return O===0?[0,P]:[d*T+f*O,P]}).sort((S,P)=>P[0]-S[0]);r(_.map(([,S])=>o[S])),await q6(e),b()};b()}class $_ extends qe{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}function Kve(){if(typeof WebSocket<"u")return WebSocket;if(typeof Je.global.WebSocket<"u")return Je.global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const jk=Kve();function yG(t,{errorInstance:e=new Error("timed out"),timeout:r,signal:n}){return new Promise((i,o)=>{(async()=>{let s;try{const f=new AbortController;r>0&&(s=setTimeout(()=>{n?f.abort():o(e)},r)),i(await t({signal:f==null?void 0:f.signal}))}catch(f){f.name==="AbortError"&&o(e),o(f)}finally{clearTimeout(s)}})()})}let iE=0;async function Wve(t,{body:e,fetchOptions:r={},timeout:n=1e4}){var f;const{headers:i,method:o,signal:s}=r;try{const d=await yG(async({signal:b})=>await fetch(t,{...r,body:Array.isArray(e)?fn(e.map(A=>({jsonrpc:"2.0",id:A.id??iE++,...A}))):fn({jsonrpc:"2.0",id:e.id??iE++,...e}),headers:{...i,"Content-Type":"application/json"},method:o||"POST",signal:s||(n>0?b:void 0)}),{errorInstance:new k6({body:e,url:t}),timeout:n,signal:!0});let p;if((f=d.headers.get("Content-Type"))!=null&&f.startsWith("application/json")?p=await d.json():p=await d.text(),!d.ok)throw new l0({body:e,details:fn(p.error)||d.statusText,headers:d.headers,status:d.status,url:t});return p}catch(d){throw d instanceof l0||d instanceof k6?d:new l0({body:e,details:d.message,url:t})}}const f4=new Map;async function c4(t){let e=f4.get(t);if(e)return e;const{schedule:r}=N_({id:t,fn:async()=>{const o=new jk(t),s=new Map,f=new Map,d=({data:b})=>{const v=JSON.parse(b),A=v.method==="eth_subscription",_=A?v.params.subscription:v.id,S=A?f:s,P=S.get(_);P&&P({data:b}),A||S.delete(_)},p=()=>{f4.delete(t),o.removeEventListener("close",p),o.removeEventListener("message",d)};return o.addEventListener("close",p),o.addEventListener("message",d),o.readyState===jk.CONNECTING&&await new Promise((b,v)=>{o&&(o.onopen=b,o.onerror=v)}),e=Object.assign(o,{requests:s,subscriptions:f}),f4.set(t,e),[e]}}),[n,[i]]=await r();return i}function Jve(t,{body:e,onResponse:r}){if(t.readyState===t.CLOSED||t.readyState===t.CLOSING)throw new eG({body:e,url:t.url,details:"Socket is closed."});const n=iE++,i=({data:o})=>{var f;const s=JSON.parse(o);typeof s.id=="number"&&n!==s.id||(r==null||r(s),e.method==="eth_subscribe"&&typeof s.result=="string"&&t.subscriptions.set(s.result,i),e.method==="eth_unsubscribe"&&t.subscriptions.delete((f=e.params)==null?void 0:f[0]))};return t.requests.set(n,i),t.send(JSON.stringify({jsonrpc:"2.0",...e,id:n})),t}async function Zve(t,{body:e,timeout:r=1e4}){return yG(()=>new Promise(n=>rh.webSocket(t,{body:e,onResponse:n})),{errorInstance:new k6({body:e,url:t.url}),timeout:r})}const rh={http:Wve,webSocket:Jve,webSocketAsync:Zve};function du(t,e={}){const{batch:r,fetchOptions:n,key:i="http",name:o="HTTP JSON-RPC",retryDelay:s}=e;return({chain:f,retryCount:d,timeout:p})=>{const{batchSize:b=1e3,wait:v=0}=typeof r=="object"?r:{},A=e.retryCount??d,_=p??e.timeout??1e4,S=t||(f==null?void 0:f.rpcUrls.default.http[0]);if(!S)throw new $_;return cy({key:i,name:o,async request({method:P,params:I}){const C={method:P,params:I},{schedule:T}=N_({id:`${t}`,wait:v,shouldSplitBatch(U){return U.length>b},fn:U=>rh.http(S,{body:U,fetchOptions:n,timeout:_}),sort:(U,V)=>U.id-V.id}),k=async U=>r?T(U):[await rh.http(S,{body:U,fetchOptions:n,timeout:_})],[{error:O,result:D}]=await k(C);if(O)throw new wx({body:C,error:O,url:S});return D},retryCount:A,retryDelay:s,timeout:_,type:"http"},{fetchOptions:n,url:t})}}function U_(t,e){var n,i,o;if(!(t instanceof qe))return!1;const r=t.walk(s=>s instanceof R6);return r instanceof R6?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((i=r.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||(o=r.reason)!=null&&o.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===qq[50]):!1}function vG(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return jt(e)?e:null}function zm(t){let e=new Uint8Array(32).fill(0);if(!t)return $i(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const i=vG(r[n]),o=i?Jn(i):Ur(La(r[n]),"bytes");e=Ur(Zo([e,o]),"bytes")}return $i(e)}function Yve(t){return`[${t.slice(2)}]`}function wG(t){const e=new Uint8Array(32).fill(0);return t?vG(t)||Ur(La(t)):$i(e)}function Tx(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(La(e).byteLength+2);let n=0;const i=e.split(".");for(let o=0;o255&&(s=La(Yve(wG(i[o])))),r[n]=s.length,r.set(s,n+1),n+=s.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Qve(t,{blockNumber:e,blockTag:r,coinType:n,name:i,universalResolverAddress:o}){let s=o;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=Ll({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const f=pi({abi:Uk,functionName:"addr",...n!=null?{args:[zm(i),BigInt(n)]}:{args:[zm(i)]}}),d=await mt(t,Xs,"readContract")({address:s,abi:lG,functionName:"resolve",args:[Ft(Tx(i)),f],blockNumber:e,blockTag:r});if(d[0]==="0x")return null;const p=Nl({abi:Uk,args:n!=null?[zm(i),BigInt(n)]:void 0,functionName:"addr",data:d[0]});return p==="0x"||Ni(p)==="0x00"?null:p}catch(f){if(U_(f,"resolve"))return null;throw f}}class Xve extends qe{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class cd extends qe{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class Rx extends qe{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class xG extends qe{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const e2e=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,t2e=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,r2e=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,n2e=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function i2e(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function Hk(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function EG({uri:t,gatewayUrls:e}){const r=r2e.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=Hk(e==null?void 0:e.ipfs,"https://ipfs.io"),i=Hk(e==null?void 0:e.arweave,"https://arweave.net"),o=t.match(e2e),{protocol:s,subpath:f,target:d,subtarget:p=""}=(o==null?void 0:o.groups)||{},b=s==="ipns:/"||f==="ipns/",v=s==="ipfs:/"||f==="ipfs/"||t2e.test(t);if(t.startsWith("http")&&!b&&!v){let _=t;return e!=null&&e.arweave&&(_=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:_,isOnChain:!1,isEncoded:!1}}if((b||v)&&d)return{uri:`${n}/${b?"ipns":"ipfs"}/${d}${p}`,isOnChain:!1,isEncoded:!1};if(s==="ar:/"&&d)return{uri:`${i}/${d}${p||""}`,isOnChain:!1,isEncoded:!1};let A=t.replace(n2e,"");if(A.startsWith("i.json());return await z_({gatewayUrls:t,uri:AG(r)})}catch{throw new Rx({uri:e})}}async function z_({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=EG({uri:e,gatewayUrls:t});if(n||await i2e(r))return r;throw new Rx({uri:e})}function s2e(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,i]=e.split("/"),[o,s]=r.split(":"),[f,d]=n.split(":");if(!o||o.toLowerCase()!=="eip155")throw new cd({reason:"Only EIP-155 supported"});if(!s)throw new cd({reason:"Chain ID not found"});if(!d)throw new cd({reason:"Contract address not found"});if(!i)throw new cd({reason:"Token ID not found"});if(!f)throw new cd({reason:"ERC namespace not found"});return{chainID:parseInt(s),namespace:f.toLowerCase(),contractAddress:d,tokenID:i}}async function a2e(t,{nft:e}){if(e.namespace==="erc721")return Xs(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return Xs(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new xG({namespace:e.namespace})}async function f2e(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?c2e(t,{gatewayUrls:e,record:r}):z_({uri:r,gatewayUrls:e})}async function c2e(t,{gatewayUrls:e,record:r}){const n=s2e(r),i=await a2e(t,{nft:n}),{uri:o,isOnChain:s,isEncoded:f}=EG({uri:i,gatewayUrls:e});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){const p=f?atob(o.replace("data:application/json;base64,","")):o,b=JSON.parse(p);return z_({uri:AG(b),gatewayUrls:e})}let d=n.tokenID;return n.namespace==="erc1155"&&(d=d.replace("0x","").padStart(64,"0")),o2e({gatewayUrls:e,uri:o.replace(/(?:0x)?{id}/,d)})}async function SG(t,{blockNumber:e,blockTag:r,name:n,key:i,universalResolverAddress:o}){let s=o;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=Ll({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const f=await mt(t,Xs,"readContract")({address:s,abi:lG,functionName:"resolve",args:[Ft(Tx(n)),pi({abi:$k,functionName:"text",args:[zm(n),i]})],blockNumber:e,blockTag:r});if(f[0]==="0x")return null;const d=Nl({abi:$k,functionName:"text",data:f[0]});return d===""?null:d}catch(f){if(U_(f,"resolve"))return null;throw f}}async function u2e(t,{blockNumber:e,blockTag:r,gatewayUrls:n,name:i,universalResolverAddress:o}){const s=await mt(t,SG,"getEnsText")({blockNumber:e,blockTag:r,key:"avatar",name:i,universalResolverAddress:o});if(!s)return null;try{return await f2e(t,{record:s,gatewayUrls:n})}catch{return null}}async function l2e(t,{address:e,blockNumber:r,blockTag:n,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ll({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const s=`${e.toLowerCase().substring(2)}.addr.reverse`;try{const[f,d]=await mt(t,Xs,"readContract")({address:o,abi:Mve,functionName:"reverse",args:[Ft(Tx(s))],blockNumber:r,blockTag:n});return e.toLowerCase()!==d.toLowerCase()?null:f}catch(f){if(U_(f,"reverse"))return null;throw f}}async function d2e(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ll({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[s]=await mt(t,Xs,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Ft(Tx(n))],blockNumber:e,blockTag:r});return s}async function h2e(t){const e=bx(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}async function MG(t,{address:e,args:r,event:n,events:i,fromBlock:o,strict:s,toBlock:f}={}){const d=i??(n?[n]:void 0),p=bx(t,{method:"eth_newFilter"});let b=[];d&&(b=[d.flatMap(A=>b1({abi:[A],eventName:A.name,args:r}))],n&&(b=b[0]));const v=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof o=="bigint"?ht(o):o,toBlock:typeof f=="bigint"?ht(f):f,...b.length?{topics:b}:{}}]});return{abi:d,args:r,eventName:n?n.name:void 0,fromBlock:o,id:v,request:p(v),strict:s,toBlock:f,type:"event"}}async function _G(t){const e=bx(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function p2e(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r?ht(r):void 0,o=await t.request({method:"eth_getBalance",params:[e,i||n]});return BigInt(o)}async function m2e(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const i=r!==void 0?ht(r):void 0;let o;return e?o=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):o=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[i||n]}),rr(o)}async function PG(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r!==void 0?ht(r):void 0,o=await t.request({method:"eth_getCode",params:[e,i||n]});if(o!=="0x")return o}function g2e(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(r=>r.map(n=>BigInt(n)))}}async function b2e(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){const o=r?ht(r):void 0,s=await t.request({method:"eth_feeHistory",params:[ht(e),o||n,i]});return g2e(s)}async function y2e(t,{filter:e}){const r=e.strict??!1;return(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(i=>{var o;try{const{eventName:s,args:f}="abi"in e&&e.abi?x1({abi:e.abi,data:i.data,topics:i.topics,strict:r}):{eventName:void 0,args:void 0};return Yo(i,{args:f,eventName:s})}catch(s){let f,d;if(s instanceof x0||s instanceof Rl){if("strict"in e&&e.strict)return;f=s.abiItem.name,d=(o=s.abiItem.inputs)==null?void 0:o.some(p=>!("name"in p&&p.name))}return Yo(i,{args:d?[]:{},eventName:f})}}).filter(Boolean)}class v2e extends qe{constructor({callbackSelector:e,cause:r,data:n,extraData:i,sender:o,urls:s}){var f;super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],(f=r.metaMessages)!=null&&f.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(d=>` ${m1(d)}`)],` Sender: ${o}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w2e extends qe{constructor({result:e,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${m1(r)}`,`Response: ${fn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class x2e extends qe{constructor({sender:e,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function kx(t,e){if(!tn(t))throw new ei({address:t});if(!tn(e))throw new ei({address:e});return t.toLowerCase()===e.toLowerCase()}const CG="0x556f1830",j_={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function IG(t,{blockNumber:e,blockTag:r,data:n,to:i}){const{args:o}=y_({data:n,abi:[j_]}),[s,f,d,p,b]=o;try{if(!kx(i,s))throw new x2e({sender:s,to:i});const v=await H_({data:d,sender:s,urls:f}),{data:A}=await sy(t,{blockNumber:e,blockTag:r,data:Zo([p,oc([{type:"bytes"},{type:"bytes"}],[v,b])]),to:i});return A}catch(v){throw new v2e({callbackSelector:p,cause:v,data:n,extraData:b,sender:s,urls:f})}}async function H_({data:t,sender:e,urls:r}){var i;let n=new Error("An unknown error occurred.");for(let o=0;or.id===e)}const S2e=/^(.*)\[([0-9]*)\]$/,RG=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,kG=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function A1({domain:t,message:e,primaryType:r,types:n}){const i=typeof t>"u"?{}:t,o={EIP712Domain:uy({domain:i}),...n};Bx({domain:i,message:e,primaryType:r,types:o});const s=["0x1901"];return i&&s.push(q_({domain:i,types:o})),r!=="EIP712Domain"&&s.push(BG({data:e,primaryType:r,types:o})),Ur(Zo(s))}function q_({domain:t,types:e}){return BG({data:t,primaryType:"EIP712Domain",types:e})}function BG({data:t,primaryType:e,types:r}){const n=OG({data:t,primaryType:e,types:r});return Ur(n)}function OG({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],i=[M2e({primaryType:e,types:r})];for(const o of r[e]){const[s,f]=LG({types:r,name:o.name,type:o.type,value:t[o.name]});n.push(s),i.push(f)}return oc(n,i)}function M2e({primaryType:t,types:e}){const r=Ft(_2e({primaryType:t,types:e}));return Ur(r)}function _2e({primaryType:t,types:e}){let r="";const n=NG({primaryType:t,types:e});n.delete(t);const i=[t,...Array.from(n).sort()];for(const o of i)r+=`${o}(${e[o].map(({name:s,type:f})=>`${f} ${s}`).join(",")})`;return r}function NG({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),i=n==null?void 0:n[0];if(r.has(i)||e[i]===void 0)return r;r.add(i);for(const o of e[i])NG({primaryType:o.type,types:e},r);return r}function LG({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},Ur(OG({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},Ur(n)];if(r==="string")return[{type:"bytes32"},Ur(Ft(n))];if(r.lastIndexOf("]")===r.length-1){const i=r.slice(0,r.lastIndexOf("[")),o=n.map(s=>LG({name:e,type:i,types:t,value:s}));return[{type:"bytes32"},Ur(oc(o.map(([s])=>s),o.map(([,s])=>s)))]}return[{type:r},n]}function Bx({domain:t,message:e,primaryType:r,types:n}){const i=n,o=(s,f)=>{for(const d of s){const{name:p,type:b}=d,v=b,A=f[p],_=v.match(kG);if(_&&(typeof A=="number"||typeof A=="bigint")){const[I,C,T]=_;ht(A,{signed:C==="int",size:parseInt(T)/8})}if(v==="address"&&typeof A=="string"&&!tn(A))throw new ei({address:A});const S=v.match(RG);if(S){const[I,C]=S;if(C&&Wr(A)!==parseInt(C))throw new o_({expectedSize:parseInt(C),givenSize:Wr(A)})}const P=i[v];P&&o(P,A)}};if(i.EIP712Domain&&t&&o(i.EIP712Domain,t),r!=="EIP712Domain"){const s=i[r];o(s,e)}}function uy({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},typeof(t==null?void 0:t.chainId)=="number"&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function P2e({domain:t}){return q_({domain:t,types:{EIP712Domain:uy({domain:t})}})}function C2e({abi:t,data:e}){const r=Ar(e,0,4),n=t.find(i=>i.type==="function"&&r===g1(Qs(i)));if(!n)throw new gq(r,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:n.name,args:"inputs"in n&&n.inputs&&n.inputs.length>0?kl(n.inputs,Ar(e,4)):void 0}}const u4="/docs/contract/encodeDeployData";function G_({abi:t,args:e,bytecode:r}){if(!e||e.length===0)return r;const n=t.find(o=>"type"in o&&o.type==="constructor");if(!n)throw new t_({docsPath:u4});if(!("inputs"in n))throw new Bg({docsPath:u4});if(!n.inputs||n.inputs.length===0)throw new Bg({docsPath:u4});const i=oc(n.inputs,e);return Va([r,i])}const l4="/docs/contract/encodeErrorResult";function I2e({abi:t,errorName:e,args:r}){let n=t[0];if(e&&(n=H0({abi:t,args:r,name:e}),!n))throw new Q7(e,{docsPath:l4});if(n.type!=="error")throw new Q7(void 0,{docsPath:l4});const i=Qs(n),o=g1(i);let s="0x";if(r&&r.length>0){if(!n.inputs)throw new hq(n.name,{docsPath:l4});s=oc(n.inputs,r)}return Va([o,s])}const T2e="/docs/contract/encodeFunctionResult";function R2e({abi:t,functionName:e,result:r}){let n=t[0];if(e&&(n=H0({abi:t,name:e}),!n))throw new dl(e,{docsPath:"/docs/contract/encodeFunctionResult"});if(n.type!=="function")throw new dl(void 0,{docsPath:"/docs/contract/encodeFunctionResult"});if(!n.outputs)throw new i_(n.name,{docsPath:T2e});let i=Array.isArray(r)?r:[r];return n.outputs.length===0&&!i[0]&&(i=[]),oc(n.outputs,i)}function jm(t,e){if(t.length!==e.length)throw new r_({expectedLength:t.length,givenLength:e.length});const r=[];for(let n=0;nthis.bytes.length-1)throw new k2e({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new qk({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},incrementPosition(t){if(t<0)throw new qk({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const r=e??this.position;return this.assertPosition(r+t-1),this.bytes.subarray(r,r+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){const t=this.inspectByte();return this.position++,t},readBytes(t){const e=this.inspectBytes(t);return this.position+=t,e},readUint8(){const t=this.inspectUint8();return this.position+=1,t},readUint16(){const t=this.inspectUint16();return this.position+=2,t},readUint24(){const t=this.inspectUint24();return this.position+=3,t},readUint32(){const t=this.inspectUint32();return this.position+=4,t},setPosition(t){this.assertPosition(t),this.position=t}};function FG(t){const e=Object.create(B2e);return e.bytes=t,e.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),e}function Fl(t,e="hex"){const r=$G(t),n=FG(new Uint8Array(r.length));return r.encode(n),e==="hex"?$i(n.bytes):n.bytes}function O2e(t,e="bytes"){return Fl(t,e)}function N2e(t,e="hex"){return Fl(t,e)}function $G(t){return Array.isArray(t)?L2e(t.map(e=>$G(e))):D2e(t)}function L2e(t){const e=t.reduce((i,o)=>i+o.length,0),r=UG(e);return{length:(()=>e<=55?1+e:1+r+e)(),encode(i){e<=55?i.pushByte(192+e):(i.pushByte(192+55+r),r===1?i.pushUint8(e):r===2?i.pushUint16(e):r===3?i.pushUint24(e):i.pushUint32(e));for(const{encode:o}of t)o(i)}}}function D2e(t){const e=typeof t=="string"?ic(t):t,r=UG(e.length);return{length:(()=>e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+r+e.length)(),encode(i){e.length===1&&e[0]<128?i.pushBytes(e):e.length<=55?(i.pushByte(128+e.length),i.pushBytes(e)):(i.pushByte(128+55+r),r===1?i.pushUint8(e.length):r===2?i.pushUint16(e.length):r===3?i.pushUint24(e.length):i.pushUint32(e.length),i.pushBytes(e))}}}function UG(t){if(t<2**8)return 1;if(t<2**16)return 2;if(t<2**24)return 3;if(t<2**32)return 4;throw new qe("Length is too large.")}function zG(t){return t.opcode==="CREATE2"?HG(t):jG(t)}function jG(t){const e=Jn(E0(t.from));let r=Jn(t.nonce);return r[0]===0&&(r=new Uint8Array([])),E0(`0x${Ur(Fl([e,r],"bytes")).slice(26)}`)}function HG(t){const e=Jn(E0(t.from)),r=zs(oE(t.salt)?t.salt:Jn(t.salt),{size:32}),n=(()=>"bytecodeHash"in t?oE(t.bytecodeHash)?t.bytecodeHash:Jn(t.bytecodeHash):Ur(t.bytecode,"bytes"))();return E0(Ar(Ur(Zo([Jn("0xff"),e,r,n])),12))}const F2e={"0x0":"reverted","0x1":"success"};function V_(t){return{...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(e=>Yo(e)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?rr(t.transactionIndex):null,status:t.status?F2e[t.status]:null,type:t.type?C_[t.type]||t.type:null}}const $2e=Ex("transactionReceipt",V_);function U2e(t,e){const r=typeof e=="string"?{to:e}:e,n=r.to;return n==="number"?GG(t,r):n==="bigint"?sE(t,r):n==="boolean"?qG(t,r):n==="string"?VG(t,r):$i(t,r)}function sE(t,e={}){typeof e.size<"u"&&us(t,{size:e.size});const r=$i(t,e);return Sr(r)}function qG(t,e={}){let r=t;if(typeof e.size<"u"&&(us(r,{size:e.size}),r=Ni(r)),r.length>1||r[0]>1)throw new Mq(r);return!!r[0]}function GG(t,e={}){typeof e.size<"u"&&us(t,{size:e.size});const r=$i(t,e);return rr(r)}function VG(t,e={}){let r=t;return typeof e.size<"u"&&(us(r,{size:e.size}),r=Ni(r,{dir:"right"})),new TextDecoder().decode(r)}function K_(t,e="hex"){const r=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Pq(t);return ic(t)}return t})(),n=FG(r);return KG(n,e)}function KG(t,e="hex"){if(t.bytes.length===0)return e==="hex"?$i(t.bytes):t.bytes;const r=t.readByte();if(r<128&&t.decrementPosition(1),r<192){const i=Gk(t,r,128),o=t.readBytes(i);return e==="hex"?$i(o):o}const n=Gk(t,r,192);return z2e(t,n,e)}function Gk(t,e,r){if(r===128&&e<128)return 1;if(e<=r+55)return e-r;if(e===r+55+1)return t.readUint8();if(e===r+55+2)return t.readUint16();if(e===r+55+3)return t.readUint24();if(e===r+55+4)return t.readUint32();throw new qe("Invalid RLP prefix")}function z2e(t,e,r){const n=t.position,i=[];for(;t.position-nPromise.resolve().then(()=>zxe),void 0);return`0x${o.Signature.fromCompact(r.substring(2,130)).addRecoveryBit(i-27).recoverPublicKey(n.substring(2)).toHex(!1)}`}async function W_({hash:t,signature:e}){return zve(await JG({hash:t,signature:e}))}const ZG=`Ethereum Signed Message: +`;function ly(t,e){const r=(()=>typeof t=="string"?La(t):t.raw instanceof Uint8Array?t.raw:Jn(t.raw))(),n=La(`${ZG}${r.length}`);return Ur(Zo([n,r]),e)}async function YG({message:t,signature:e}){return W_({hash:ly(t),signature:e})}async function QG({domain:t,message:e,primaryType:r,signature:n,types:i}){return W_({hash:A1({domain:t,message:e,primaryType:r,types:i}),signature:n})}async function j2e({address:t,message:e,signature:r}){return kx(E0(t),await YG({message:e,signature:r}))}async function H2e({address:t,domain:e,message:r,primaryType:n,signature:i,types:o}){return kx(E0(t),await QG({domain:e,message:r,primaryType:n,signature:i,types:o}))}function XG(t){const e=p_(t,0,1);if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&rr(e)>=192)return"legacy";throw new Wq({serializedType:e})}function J_(t){const{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=t;if(e<=0)throw new Px({chainId:e});if(o&&!tn(o))throw new ei({address:o});if(n)throw new qe("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(i&&i>2n**256n-1n)throw new S0({maxFeePerGas:i});if(r&&i&&r>i)throw new Hp({maxFeePerGas:i,maxPriorityFeePerGas:r})}function Z_(t){const{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=t;if(e<=0)throw new Px({chainId:e});if(o&&!tn(o))throw new ei({address:o});if(r||i)throw new qe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>2n**256n-1n)throw new S0({maxFeePerGas:n})}function Y_(t){const{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o,accessList:s}=t;if(o&&!tn(o))throw new ei({address:o});if(typeof e<"u"&&e<=0)throw new Px({chainId:e});if(r||i)throw new qe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>2n**256n-1n)throw new S0({maxFeePerGas:n});if(s)throw new qe("`accessList` is not a valid Legacy Transaction attribute.")}function q2e(t){const e=XG(t);return e==="eip1559"?G2e(t):e==="eip2930"?V2e(t):K2e(t)}function G2e(t){const e=eV(t),[r,n,i,o,s,f,d,p,b,v,A,_]=e;if(!(e.length===9||e.length===12))throw new yx({attributes:{chainId:r,nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:o,gas:s,to:f,value:d,data:p,accessList:b,...e.length>9?{v,r:A,s:_}:{}},serializedTransaction:t,type:"eip1559"});const S={chainId:rr(r),type:"eip1559"};return jt(f)&&f!=="0x"&&(S.to=f),jt(s)&&s!=="0x"&&(S.gas=Sr(s)),jt(p)&&p!=="0x"&&(S.data=p),jt(n)&&n!=="0x"&&(S.nonce=rr(n)),jt(d)&&d!=="0x"&&(S.value=Sr(d)),jt(o)&&o!=="0x"&&(S.maxFeePerGas=Sr(o)),jt(i)&&i!=="0x"&&(S.maxPriorityFeePerGas=Sr(i)),b.length!==0&&b!=="0x"&&(S.accessList=tV(b)),J_(S),{...e.length===12?rV(e):void 0,...S}}function V2e(t){const e=eV(t),[r,n,i,o,s,f,d,p,b,v,A]=e;if(!(e.length===8||e.length===11))throw new yx({attributes:{chainId:r,nonce:n,gasPrice:i,gas:o,to:s,value:f,data:d,accessList:p,...e.length>8?{v:b,r:v,s:A}:{}},serializedTransaction:t,type:"eip2930"});const _={chainId:rr(r),type:"eip2930"};return jt(s)&&s!=="0x"&&(_.to=s),jt(o)&&o!=="0x"&&(_.gas=Sr(o)),jt(d)&&d!=="0x"&&(_.data=d),jt(n)&&n!=="0x"&&(_.nonce=rr(n)),jt(f)&&f!=="0x"&&(_.value=Sr(f)),jt(i)&&i!=="0x"&&(_.gasPrice=Sr(i)),p.length!==0&&p!=="0x"&&(_.accessList=tV(p)),Z_(_),{...e.length===11?rV(e):void 0,..._}}function K2e(t){const e=K_(t,"hex"),[r,n,i,o,s,f,d,p,b]=e;if(!(e.length===6||e.length===9))throw new yx({attributes:{nonce:r,gasPrice:n,gas:i,to:o,value:s,data:f,...e.length>6?{v:d,r:p,s:b}:{}},serializedTransaction:t,type:"legacy"});const v={type:"legacy"};if(jt(o)&&o!=="0x"&&(v.to=o),jt(i)&&i!=="0x"&&(v.gas=Sr(i)),jt(f)&&f!=="0x"&&(v.data=f),jt(r)&&r!=="0x"&&(v.nonce=rr(r)),jt(s)&&s!=="0x"&&(v.value=Sr(s)),jt(n)&&n!=="0x"&&(v.gasPrice=Sr(n)),Y_(v),e.length===6)return v;const A=jt(d)&&d!=="0x"?Sr(d):0n;if(b==="0x"&&p==="0x")return A>0&&(v.chainId=Number(A)),v;const _=A,S=Number((_-35n)/2n);if(S>0)v.chainId=S;else if(_!==27n&&_!==28n)throw new E_({v:_});return v.v=_,v.s=b,v.r=p,v}function eV(t){return K_(`0x${t.slice(4)}`,"hex")}function tV(t){const e=[];for(let r=0;rWG(o)?o:Ni(o))})}return e}function rV(t){const e=t.slice(-3),r=e[0]==="0x"||Sr(e[0])===0n?27n:28n;return{r:js(e[1],{size:32}),s:js(e[2],{size:32}),v:r,yParity:r===27n?0:1}}function Q_(t){if(!t||t.length===0)return[];const e=[];for(let r=0;re.v===0n?"0x":e.v===1n?Ft(1):e.v===27n?"0x":Ft(1))();A.push(_,Ni(e.r),Ni(e.s))}return Va(["0x02",Fl(A)])}function J2e(t,e){const{chainId:r,gas:n,data:i,nonce:o,to:s,value:f,accessList:d,gasPrice:p}=t;Z_(t);const b=Q_(d),v=[Ft(r),o?Ft(o):"0x",p?Ft(p):"0x",n?Ft(n):"0x",s??"0x",f?Ft(f):"0x",i??"0x",b];if(e){const A=(()=>e.v===0n?"0x":e.v===1n?Ft(1):e.v===27n?"0x":Ft(1))();v.push(A,Ni(e.r),Ni(e.s))}return Va(["0x01",Fl(v)])}function Z2e(t,e){const{chainId:r=0,gas:n,data:i,nonce:o,to:s,value:f,gasPrice:d}=t;Y_(t);let p=[o?Ft(o):"0x",d?Ft(d):"0x",n?Ft(n):"0x",s??"0x",f?Ft(f):"0x",i??"0x"];if(e){const b=(()=>{if(r>0)return BigInt(r*2)+BigInt(35n+e.v-27n);if(e.v>=35n)return(e.v-35n)/2n>0?e.v:27n+(e.v===35n?0n:1n);const v=27n+(e.v===27n?0n:1n);if(e.v!==v)throw new E_({v:e.v});return v})();p=[...p,Ft(b),e.r,e.s]}else r>0&&(p=[...p,Ft(r),"0x","0x"]);return Fl(p)}function X_(t,e){let[r,n="0"]=t.split(".");const i=r.startsWith("-");if(i&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>e){const[o,s,f]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],d=Math.round(+`${s}.${f}`);d>9?n=`${BigInt(o)+BigInt(1)}0`.padStart(o.length+1,"0"):n=`${o}${d}`,n.length>e&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${i?"-":""}${r}${n}`)}function Y2e(t,e="wei"){return X_(t,v_[e])}function Q2e(t,e="wei"){return X_(t,w_[e])}function X2e(t){return t.map(e=>({...e,value:BigInt(e.value)}))}function e6e(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?rr(t.nonce):void 0,storageProof:t.storageProof?X2e(t.storageProof):void 0}}async function t6e(t,{address:e,blockNumber:r,blockTag:n,storageKeys:i}){const o=n??"latest",s=r!==void 0?ht(r):void 0,f=await t.request({method:"eth_getProof",params:[e,i,s||o]});return e6e(f)}async function r6e(t,{address:e,blockNumber:r,blockTag:n="latest",slot:i}){const o=r!==void 0?ht(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,i,o||n]})}async function eP(t,{blockHash:e,blockNumber:r,blockTag:n,hash:i,index:o}){var b,v,A;const s=n||"latest",f=r!==void 0?ht(r):void 0;let d=null;if(i?d=await t.request({method:"eth_getTransactionByHash",params:[i]}):e?d=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,ht(o)]}):(f||s)&&(d=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[f||s,ht(o)]})),!d)throw new A_({blockHash:e,blockNumber:r,blockTag:s,hash:i,index:o});return(((A=(v=(b=t.chain)==null?void 0:b.formatters)==null?void 0:v.transaction)==null?void 0:A.format)||Sx)(d)}async function n6e(t,{hash:e,transactionReceipt:r}){const[n,i]=await Promise.all([mt(t,fy,"getBlockNumber")({}),e?mt(t,eP,"getBlockNumber")({hash:e}):void 0]),o=(r==null?void 0:r.blockNumber)||(i==null?void 0:i.blockNumber);return o?n-o+1n:0n}async function aE(t,{hash:e}){var i,o,s;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new S_({hash:e});return(((s=(o=(i=t.chain)==null?void 0:i.formatters)==null?void 0:o.transactionReceipt)==null?void 0:s.format)||V_)(r)}async function i6e(t,e){var P;const{allowFailure:r=!0,batchSize:n,blockNumber:i,blockTag:o,contracts:s,multicallAddress:f}=e,d=n??(typeof((P=t.batch)==null?void 0:P.multicall)=="object"&&t.batch.multicall.batchSize||1024);let p=f;if(!p){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");p=Ll({blockNumber:i,chain:t.chain,contract:"multicall3"})}const b=[[]];let v=0,A=0;for(let I=0;I0&&A>d&&b[v].length>0&&(v++,A=(D.length-2)/2,b[v]=[]),b[v]=[...b[v],{allowFailure:!0,callData:D,target:T}]}catch(D){const U=jp(D,{abi:C,address:T,args:k,docsPath:"/docs/contract/multicall",functionName:O});if(!r)throw U;b[v]=[...b[v],{allowFailure:!0,callData:"0x",target:T}]}}const _=await Promise.allSettled(b.map(I=>mt(t,Xs,"readContract")({abi:j6,address:p,args:[I],blockNumber:i,blockTag:o,functionName:"aggregate3"}))),S=[];for(let I=0;I<_.length;I++){const C=_[I];if(C.status==="rejected"){if(!r)throw C.reason;for(let k=0;kt instanceof Uint8Array,a6e=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Gp(t){if(!Nx(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rn+i.length,0));let r=0;return t.forEach(n=>{if(!Nx(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function sV(t,e){if(t.length!==e.length)return!1;for(let r=0;riV;t>>=Ox,e+=1);return e}function u6e(t,e){return t>>BigInt(e)&Ox}const l6e=(t,e,r)=>t|(r?Ox:iV)<(s6e<new Uint8Array(t),Vk=t=>Uint8Array.from(t);function aV(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=d4(t),i=d4(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},f=(...v)=>r(i,n,...v),d=(v=d4())=>{i=f(Vk([0]),v),n=f(),v.length!==0&&(i=f(Vk([1]),v),n=f())},p=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let v=0;const A=[];for(;v{s(),d(v);let _;for(;!(_=A(p()));)d();return s(),_}}const d6e={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function S1(t,e,r={}){const n=(i,o,s)=>{const f=d6e[o];if(typeof f!="function")throw new Error(`Invalid validator "${o}", expected function`);const d=t[i];if(!(s&&d===void 0)&&!f(d,t))throw new Error(`Invalid param ${String(i)}=${d} (${typeof d}), expected ${o}`)};for(const[i,o]of Object.entries(e))n(i,o,!1);for(const[i,o]of Object.entries(r))n(i,o,!0);return t}const h6e=Object.freeze(Object.defineProperty({__proto__:null,bitGet:u6e,bitLen:c6e,bitMask:iP,bitSet:l6e,bytesToHex:Gp,bytesToNumberBE:ui,bytesToNumberLE:rP,concatBytes:to,createHmacDrbg:aV,ensureBytes:Gn,equalBytes:sV,hexToBytes:Vp,hexToNumber:tP,numberToBytesBE:_0,numberToBytesLE:nP,numberToHexUnpadded:oV,numberToVarBytesBE:f6e,utf8ToBytes:Lx,validateObject:S1},Symbol.toStringTag,{value:"Module"}));function p6e(t,e){const r=jt(t)?Jn(t):t,n=jt(e)?Jn(e):e;return sV(r,n)}async function fV(t,{address:e,hash:r,signature:n,...i}){const o=jt(n)?n:Ft(n);try{const{data:s}=await mt(t,sy,"call")({data:G_({abi:_ve,args:[e,r,o],bytecode:o6e}),...i});return p6e(s??"0x0","0x1")}catch(s){if(s instanceof M_)return!1;throw s}}async function m6e(t,{address:e,message:r,signature:n,...i}){const o=ly(r);return fV(t,{address:e,hash:o,signature:n,...i})}async function g6e(t,{address:e,signature:r,message:n,primaryType:i,types:o,domain:s,...f}){const d=A1({message:n,primaryType:i,types:o,domain:s});return fV(t,{address:e,hash:d,signature:r,...f})}function cV(t,{emitOnBegin:e=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:o,pollingInterval:s=t.pollingInterval}){const f=typeof o<"u"?o:t.transport.type!=="webSocket";let d;return f?(()=>{const v=fn(["watchBlockNumber",t.uid,e,r,s]);return E1(v,{onBlockNumber:n,onError:i},A=>ay(async()=>{var _;try{const S=await mt(t,fy,"getBlockNumber")({cacheTime:0});if(d){if(S===d)return;if(S-d>1&&r)for(let P=d+1n;Pd)&&(A.onBlockNumber(S,d),d=S)}catch(S){(_=A.onError)==null||_.call(A,S)}},{emitOnBegin:e,interval:s}))})():(()=>{let v=!0,A=()=>v=!1;return(async()=>{try{const{unsubscribe:_}=await t.transport.subscribe({params:["newHeads"],onData(S){var I;if(!v)return;const P=Sr((I=S.result)==null?void 0:I.number);n(P,d),d=P},onError(S){i==null||i(S)}});A=_,v||A()}catch(_){i==null||i(_)}})(),A})()}async function b6e(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:i=t.pollingInterval,timeout:o}){const s=fn(["waitForTransactionReceipt",t.uid,r]);let f,d,p,b=!1;return new Promise((v,A)=>{o&&setTimeout(()=>A(new Yq({hash:r})),o);const _=E1(s,{onReplaced:n,resolve:v,reject:A},S=>{const P=mt(t,cV,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(I){if(b)return;let C=I;const T=k=>{P(),k(),_()};try{if(p){if(e>1&&(!p.blockNumber||C-p.blockNumber+1nS.resolve(p));return}if(f||(b=!0,await nE(async()=>{f=await mt(t,eP,"getTransaction")({hash:r}),f.blockNumber&&(C=f.blockNumber)},{delay:({count:k})=>~~(1<1&&(!p.blockNumber||C-p.blockNumber+1nS.resolve(p))}catch(k){if(f&&(k instanceof A_||k instanceof S_))try{d=f,b=!0;const O=await nE(()=>mt(t,M0,"getBlock")({blockNumber:C,includeTransactions:!0}),{delay:({count:V})=>~~(1<V instanceof P_});b=!1;const D=O.transactions.find(({from:V,nonce:Y})=>V===d.from&&Y===d.nonce);if(!D||(p=await mt(t,aE,"getTransactionReceipt")({hash:D.hash}),e>1&&(!p.blockNumber||C-p.blockNumber+1n{var V;(V=S.onReplaced)==null||V.call(S,{reason:U,replacedTransaction:d,transaction:D,transactionReceipt:p}),S.resolve(p)})}catch(O){T(()=>S.reject(O))}else T(()=>S.reject(k))}}})})})}function y6e(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:o,includeTransactions:s,poll:f,pollingInterval:d=t.pollingInterval}){const p=typeof f<"u"?f:t.transport.type!=="webSocket",b=s??!1;let v;return p?(()=>{const S=fn(["watchBlocks",t.uid,r,n,b,d]);return E1(S,{onBlock:i,onError:o},P=>ay(async()=>{var I;try{const C=await mt(t,M0,"getBlock")({blockTag:e,includeTransactions:b});if(C.number&&(v!=null&&v.number)){if(C.number===v.number)return;if(C.number-v.number>1&&r)for(let T=(v==null?void 0:v.number)+1n;Tv.number)&&(P.onBlock(C,v),v=C)}catch(C){(I=P.onError)==null||I.call(P,C)}},{emitOnBegin:n,interval:d}))})():(()=>{let S=!0,P=()=>S=!1;return(async()=>{try{const{unsubscribe:I}=await t.transport.subscribe({params:["newHeads"],onData(C){var O,D,U;if(!S)return;const k=(((U=(D=(O=t.chain)==null?void 0:O.formatters)==null?void 0:D.block)==null?void 0:U.format)||Mx)(C.result);i(k,v),v=k},onError(C){o==null||o(C)}});P=I,S||P()}catch(I){o==null||o(I)}})(),P})()}function v6e(t,{address:e,args:r,batch:n=!0,event:i,events:o,onError:s,onLogs:f,poll:d,pollingInterval:p=t.pollingInterval,strict:b}){const v=typeof d<"u"?d:t.transport.type!=="webSocket",A=b??!1;return v?(()=>{const P=fn(["watchEvent",e,r,n,t.uid,i,p]);return E1(P,{onLogs:f,onError:s},I=>{let C,T,k=!1;const O=ay(async()=>{var D;if(!k){try{T=await mt(t,MG,"createEventFilter")({address:e,args:r,event:i,events:o,strict:A})}catch{}k=!0;return}try{let U;if(T)U=await mt(t,Cx,"getFilterChanges")({filter:T});else{const V=await mt(t,fy,"getBlockNumber")({});C&&C!==V?U=await mt(t,k_,"getLogs")({address:e,args:r,event:i,events:o,fromBlock:C+1n,toBlock:V}):U=[],C=V}if(U.length===0)return;if(n)I.onLogs(U);else for(const V of U)I.onLogs([V])}catch(U){T&&U instanceof A0&&(k=!1),(D=I.onError)==null||D.call(I,U)}},{emitOnBegin:!0,interval:p});return async()=>{T&&await mt(t,Ix,"uninstallFilter")({filter:T}),O()}})})():(()=>{let P=!0,I=()=>P=!1;return(async()=>{try{const C=o??(i?[i]:void 0);let T=[];C&&(T=[C.flatMap(O=>b1({abi:[O],eventName:O.name,args:r}))],i&&(T=T[0]));const{unsubscribe:k}=await t.transport.subscribe({params:["logs",{address:e,topics:T}],onData(O){var U;if(!P)return;const D=O.result;try{const{eventName:V,args:Y}=x1({abi:C,data:D.data,topics:D.topics,strict:A}),W=Yo(D,{args:Y,eventName:V});f([W])}catch(V){let Y,W;if(V instanceof x0||V instanceof Rl){if(b)return;Y=V.abiItem.name,W=(U=V.abiItem.inputs)==null?void 0:U.some(x=>!("name"in x&&x.name))}const ie=Yo(D,{args:W?[]:{},eventName:Y});f([ie])}},onError(O){s==null||s(O)}});I=k,P||I()}catch(C){s==null||s(C)}})(),I})()}function w6e(t,{batch:e=!0,onError:r,onTransactions:n,poll:i,pollingInterval:o=t.pollingInterval}){return(typeof i<"u"?i:t.transport.type!=="webSocket")?(()=>{const p=fn(["watchPendingTransactions",t.uid,e,o]);return E1(p,{onTransactions:n,onError:r},b=>{let v;const A=ay(async()=>{var _;try{if(!v)try{v=await mt(t,_G,"createPendingTransactionFilter")({});return}catch(P){throw A(),P}const S=await mt(t,Cx,"getFilterChanges")({filter:v});if(S.length===0)return;if(e)b.onTransactions(S);else for(const P of S)b.onTransactions([P])}catch(S){(_=b.onError)==null||_.call(b,S)}},{emitOnBegin:!0,interval:o});return async()=>{v&&await mt(t,Ix,"uninstallFilter")({filter:v}),A()}})})():(()=>{let p=!0,b=()=>p=!1;return(async()=>{try{const{unsubscribe:v}=await t.transport.subscribe({params:["newPendingTransactions"],onData(A){if(!p)return;const _=A.result;n([_])},onError(A){r==null||r(A)}});b=v,p||b()}catch(v){r==null||r(v)}})(),b})()}function uV(t){return{call:e=>sy(t,e),createBlockFilter:()=>h2e(t),createContractEventFilter:e=>b_(t,e),createEventFilter:e=>MG(t,e),createPendingTransactionFilter:()=>_G(t),estimateContractGas:e=>cG(t,e),estimateGas:e=>R_(t,e),getBalance:e=>p2e(t,e),getBlock:e=>M0(t,e),getBlockNumber:e=>fy(t,e),getBlockTransactionCount:e=>m2e(t,e),getBytecode:e=>PG(t,e),getChainId:()=>qp(t),getContractEvents:e=>B_(t,e),getEnsAddress:e=>Qve(t,e),getEnsAvatar:e=>u2e(t,e),getEnsName:e=>l2e(t,e),getEnsResolver:e=>d2e(t,e),getEnsText:e=>SG(t,e),getFeeHistory:e=>b2e(t,e),estimateFeesPerGas:e=>aG(t,e),getFilterChanges:e=>Cx(t,e),getFilterLogs:e=>y2e(t,e),getGasPrice:()=>I_(t),getLogs:e=>k_(t,e),getProof:e=>t6e(t,e),estimateMaxPriorityFeePerGas:e=>xve(t,e),getStorageAt:e=>r6e(t,e),getTransaction:e=>eP(t,e),getTransactionConfirmations:e=>n6e(t,e),getTransactionCount:e=>fG(t,e),getTransactionReceipt:e=>aE(t,e),multicall:e=>i6e(t,e),prepareTransactionRequest:e=>_x(t,e),readContract:e=>Xs(t,e),sendRawTransaction:e=>D_(t,e),simulateContract:e=>pG(t,e),verifyMessage:e=>m6e(t,e),verifyTypedData:e=>g6e(t,e),uninstallFilter:e=>Ix(t,e),waitForTransactionReceipt:e=>b6e(t,e),watchBlocks:e=>y6e(t,e),watchBlockNumber:e=>cV(t,e),watchContractEvent:e=>mG(t,e),watchEvent:e=>v6e(t,e),watchPendingTransactions:e=>w6e(t,e)}}function oP(t){const{key:e="public",name:r="Public Client"}=t;return Dl({...t,key:e,name:r,type:"publicClient"}).extend(uV)}async function x6e(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function E6e(t){return t.request({method:`${t.mode}_dumpState`})}async function A6e(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function S6e(t){return await t.request({method:"txpool_content"})}async function M6e(t){const{pending:e,queued:r}=await t.request({method:"txpool_status"});return{pending:rr(e),queued:rr(r)}}async function _6e(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function P6e(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[ht(e)]})}async function C6e(t){return await t.request({method:"txpool_inspect"})}async function I6e(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function T6e(t,{blocks:e,interval:r}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:ht(e)}]}):await t.request({method:`${t.mode}_mine`,params:[ht(e),ht(r||0)]})}async function R6e(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function k6e(t,{blockNumber:e,jsonRpcUrl:r}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:r}}]})}async function B6e(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function O6e(t,e){var C,T,k;const{accessList:r,data:n,from:i,gas:o,gasPrice:s,maxFeePerGas:f,maxPriorityFeePerGas:d,nonce:p,to:b,value:v,...A}=e,_=(k=(T=(C=t.chain)==null?void 0:C.formatters)==null?void 0:T.transactionRequest)==null?void 0:k.format,P=(_||Ol)({...xx(A,{format:_}),accessList:r,data:n,from:i,gas:o,gasPrice:s,maxFeePerGas:f,maxPriorityFeePerGas:d,nonce:p,to:b,value:v});return await t.request({method:"eth_sendUnsignedTransaction",params:[P]})}async function N6e(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function L6e(t,{address:e,value:r}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,ht(r)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,ht(r)]})}async function D6e(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[ht(e)]})}async function F6e(t,{interval:e}){const r=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[r]})}async function $6e(t,{address:e,bytecode:r}){await t.request({method:`${t.mode}_setCode`,params:[e,r]})}async function U6e(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function z6e(t,{interval:e}){const r=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:"evm_setIntervalMining",params:[r]})}async function j6e(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function H6e(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[ht(e)]})}async function q6e(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[ht(e)]})}async function G6e(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[ht(e)]})}async function V6e(t,{address:e,nonce:r}){await t.request({method:`${t.mode}_setNonce`,params:[e,ht(r)]})}async function K6e(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function W6e(t,{address:e,index:r,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof r=="number"?ht(r):r,n]})}async function J6e(t){return await t.request({method:"evm_snapshot"})}async function Z6e(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function lV({mode:t}){return e=>{const r=e.extend(()=>({mode:t}));return{dropTransaction:n=>x6e(r,n),dumpState:()=>E6e(r),getAutomine:()=>A6e(r),getTxpoolContent:()=>S6e(r),getTxpoolStatus:()=>M6e(r),impersonateAccount:n=>_6e(r,n),increaseTime:n=>P6e(r,n),inspectTxpool:()=>C6e(r),loadState:n=>I6e(r,n),mine:n=>T6e(r,n),removeBlockTimestampInterval:()=>R6e(r),reset:n=>k6e(r,n),revert:n=>B6e(r,n),sendUnsignedTransaction:n=>O6e(r,n),setAutomine:n=>N6e(r,n),setBalance:n=>L6e(r,n),setBlockGasLimit:n=>D6e(r,n),setBlockTimestampInterval:n=>F6e(r,n),setCode:n=>$6e(r,n),setCoinbase:n=>U6e(r,n),setIntervalMining:n=>z6e(r,n),setLoggingEnabled:n=>j6e(r,n),setMinGasPrice:n=>H6e(r,n),setNextBlockBaseFeePerGas:n=>q6e(r,n),setNextBlockTimestamp:n=>G6e(r,n),setNonce:n=>V6e(r,n),setRpcUrl:n=>K6e(r,n),setStorageAt:n=>W6e(r,n),snapshot:()=>J6e(r),stopImpersonatingAccount:n=>Z6e(r,n)}}}function Y6e(t){const{key:e="test",name:r="Test Client",mode:n}=t;return Dl({...t,key:e,name:r,type:"testClient"}).extend(o=>({mode:n,...lV({mode:n})(o)}))}function Q6e(t,{abi:e,args:r,bytecode:n,...i}){const o=G_({abi:e,args:r,bytecode:n});return F_(t,{...i,data:o})}async function X6e(t){var r;return((r=t.account)==null?void 0:r.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"})).map(n=>ny(n))}async function e5e(t){return await t.request({method:"wallet_getPermissions"})}async function t5e(t){return(await t.request({method:"eth_requestAccounts"})).map(r=>E0(r))}async function r5e(t,e){return t.request({method:"wallet_requestPermissions",params:[e]})}async function dV(t,{account:e=t.account,message:r}){if(!e)throw new v1({docsPath:"/docs/actions/wallet/signMessage"});const n=ls(e);if(n.type==="local")return n.signMessage({message:r});const i=(()=>typeof r=="string"?ry(r):r.raw instanceof Uint8Array?Ft(r.raw):r.raw)();return t.request({method:"personal_sign",params:[i,n.address]})}async function n5e(t,e){var p,b,v,A;const{account:r=t.account,chain:n=t.chain,...i}=e;if(!r)throw new v1({docsPath:"/docs/actions/wallet/signTransaction"});const o=ls(r);w1({account:o,...e});const s=await mt(t,qp,"getChainId")({});n!==null&&L_({currentChainId:s,chain:n});const f=(n==null?void 0:n.formatters)||((p=t.chain)==null?void 0:p.formatters),d=((b=f==null?void 0:f.transactionRequest)==null?void 0:b.format)||Ol;return o.type==="local"?o.signTransaction({...i,chainId:s},{serializer:(A=(v=t.chain)==null?void 0:v.serializers)==null?void 0:A.transaction}):await t.request({method:"eth_signTransaction",params:[{...d(i),chainId:ht(s),from:o.address}]})}async function fE(t,{account:e=t.account,domain:r,message:n,primaryType:i,types:o}){if(!e)throw new v1({docsPath:"/docs/actions/wallet/signTypedData"});const s=ls(e),f={EIP712Domain:uy({domain:r}),...o};if(Bx({domain:r,message:n,primaryType:i,types:f}),s.type==="local")return s.signTypedData({domain:r,primaryType:i,types:f,message:n});const d=fn({domain:r??{},primaryType:i,types:f,message:n},(p,b)=>jt(b)?b.toLowerCase():b);return t.request({method:"eth_signTypedData_v4",params:[s.address,d]})}async function i5e(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:ht(e)}]})}async function o5e(t,e){return await t.request({method:"wallet_watchAsset",params:e})}function hV(t){return{addChain:e=>Uve(t,e),deployContract:e=>Q6e(t,e),getAddresses:()=>X6e(t),getChainId:()=>qp(t),getPermissions:()=>e5e(t),prepareTransactionRequest:e=>_x(t,e),requestAddresses:()=>t5e(t),requestPermissions:e=>r5e(t,e),sendRawTransaction:e=>D_(t,e),sendTransaction:e=>F_(t,e),signMessage:e=>dV(t,e),signTransaction:e=>n5e(t,e),signTypedData:e=>fE(t,e),switchChain:e=>i5e(t,e),watchAsset:e=>o5e(t,e),writeContract:e=>gG(t,e)}}function pV(t){const{key:e="wallet",name:r="Wallet Client",transport:n}=t;return Dl({...t,key:e,name:r,transport:o=>n({...o,retryCount:0}),type:"walletClient"}).extend(hV)}function s5e(t,e={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:i}=e;return({chain:o,retryCount:s,timeout:f})=>{var v;const d=e.retryCount??s,p=f??e.timeout??1e4,b=t||((v=o==null?void 0:o.rpcUrls.default.webSocket)==null?void 0:v[0]);if(!b)throw new $_;return cy({key:r,name:n,async request({method:A,params:_}){const S={method:A,params:_},P=await c4(b),{error:I,result:C}=await rh.webSocketAsync(P,{body:S,timeout:p});if(I)throw new wx({body:S,error:I,url:b});return C},retryCount:d,retryDelay:i,timeout:p,type:"webSocket"},{getSocket(){return c4(b)},async subscribe({params:A,onData:_,onError:S}){const P=await c4(b),{result:I}=await new Promise((C,T)=>rh.webSocket(P,{body:{method:"eth_subscribe",params:A},onResponse(k){if(k.error){T(k.error),S==null||S(k.error);return}if(typeof k.id=="number"){C(k);return}k.method==="eth_subscription"&&_(k.params)}}));return{subscriptionId:I,async unsubscribe(){return new Promise(C=>rh.webSocket(P,{body:{method:"eth_unsubscribe",params:[I]},onResponse:C}))}}}})}}const cE="0x0000000000000000000000000000000000000000",a5e=2n**(8n-1n)-1n,f5e=2n**(16n-1n)-1n,c5e=2n**(24n-1n)-1n,u5e=2n**(32n-1n)-1n,l5e=2n**(40n-1n)-1n,d5e=2n**(48n-1n)-1n,h5e=2n**(56n-1n)-1n,p5e=2n**(64n-1n)-1n,m5e=2n**(72n-1n)-1n,g5e=2n**(80n-1n)-1n,b5e=2n**(88n-1n)-1n,y5e=2n**(96n-1n)-1n,v5e=2n**(104n-1n)-1n,w5e=2n**(112n-1n)-1n,x5e=2n**(120n-1n)-1n,E5e=2n**(128n-1n)-1n,A5e=2n**(136n-1n)-1n,S5e=2n**(144n-1n)-1n,M5e=2n**(152n-1n)-1n,_5e=2n**(160n-1n)-1n,P5e=2n**(168n-1n)-1n,C5e=2n**(176n-1n)-1n,I5e=2n**(184n-1n)-1n,T5e=2n**(192n-1n)-1n,R5e=2n**(200n-1n)-1n,k5e=2n**(208n-1n)-1n,B5e=2n**(216n-1n)-1n,O5e=2n**(224n-1n)-1n,N5e=2n**(232n-1n)-1n,L5e=2n**(240n-1n)-1n,D5e=2n**(248n-1n)-1n,F5e=2n**(256n-1n)-1n,$5e=-(2n**(8n-1n)),U5e=-(2n**(16n-1n)),z5e=-(2n**(24n-1n)),j5e=-(2n**(32n-1n)),H5e=-(2n**(40n-1n)),q5e=-(2n**(48n-1n)),G5e=-(2n**(56n-1n)),V5e=-(2n**(64n-1n)),K5e=-(2n**(72n-1n)),W5e=-(2n**(80n-1n)),J5e=-(2n**(88n-1n)),Z5e=-(2n**(96n-1n)),Y5e=-(2n**(104n-1n)),Q5e=-(2n**(112n-1n)),X5e=-(2n**(120n-1n)),ewe=-(2n**(128n-1n)),twe=-(2n**(136n-1n)),rwe=-(2n**(144n-1n)),nwe=-(2n**(152n-1n)),iwe=-(2n**(160n-1n)),owe=-(2n**(168n-1n)),swe=-(2n**(176n-1n)),awe=-(2n**(184n-1n)),fwe=-(2n**(192n-1n)),cwe=-(2n**(200n-1n)),uwe=-(2n**(208n-1n)),lwe=-(2n**(216n-1n)),dwe=-(2n**(224n-1n)),hwe=-(2n**(232n-1n)),pwe=-(2n**(240n-1n)),mwe=-(2n**(248n-1n)),gwe=-(2n**(256n-1n)),bwe=2n**8n-1n,ywe=2n**16n-1n,vwe=2n**24n-1n,wwe=2n**32n-1n,xwe=2n**40n-1n,Ewe=2n**48n-1n,Awe=2n**56n-1n,Swe=2n**64n-1n,Mwe=2n**72n-1n,_we=2n**80n-1n,Pwe=2n**88n-1n,Cwe=2n**96n-1n,Iwe=2n**104n-1n,Twe=2n**112n-1n,Rwe=2n**120n-1n,kwe=2n**128n-1n,Bwe=2n**136n-1n,Owe=2n**144n-1n,Nwe=2n**152n-1n,Lwe=2n**160n-1n,Dwe=2n**168n-1n,Fwe=2n**176n-1n,$we=2n**184n-1n,Uwe=2n**192n-1n,zwe=2n**200n-1n,jwe=2n**208n-1n,Hwe=2n**216n-1n,qwe=2n**224n-1n,Gwe=2n**232n-1n,Vwe=2n**240n-1n,Kwe=2n**248n-1n,Wwe=2n**256n-1n,Jwe="0x0000000000000000000000000000000000000000000000000000000000000000",h4="/docs/contract/decodeDeployData";function Zwe({abi:t,bytecode:e,data:r}){if(r===e)return{bytecode:e};const n=t.find(o=>"type"in o&&o.type==="constructor");if(!n)throw new t_({docsPath:h4});if(!("inputs"in n))throw new Bg({docsPath:h4});if(!n.inputs||n.inputs.length===0)throw new Bg({docsPath:h4});return{args:kl(n.inputs,`0x${r.replace(e,"")}`),bytecode:e}}function Ywe({r:t,yParityAndS:e}){const r=ic(e),n=r[0]&128?28n:27n,i=r;return n===28n&&(i[0]&=127),{r:t,s:$i(i),v:n}}function Qwe(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),f=Number(r&o),d=n?4:0,p=n?0:4;t.setUint32(e+d,s,n),t.setUint32(e+p,f,n)}class Xwe extends d_{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=n4(this.buffer)}update(e){_p(this);const{view:r,buffer:n,blockLen:i}=this;e=px(e);const o=e.length;for(let s=0;si-s&&(this.process(n,0),s=0);for(let v=s;vb.length)throw new Error("_sha2: outputLen bigger than state");for(let v=0;vt&e^~t&r,txe=(t,e,r)=>t&e^t&r^e&r,rxe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),pc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),mc=new Uint32Array(64);class nxe extends Xwe{constructor(){super(64,32,8,!1),this.A=pc[0]|0,this.B=pc[1]|0,this.C=pc[2]|0,this.D=pc[3]|0,this.E=pc[4]|0,this.F=pc[5]|0,this.G=pc[6]|0,this.H=pc[7]|0}get(){const{A:e,B:r,C:n,D:i,E:o,F:s,G:f,H:d}=this;return[e,r,n,i,o,s,f,d]}set(e,r,n,i,o,s,f,d){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=f|0,this.H=d|0}process(e,r){for(let v=0;v<16;v++,r+=4)mc[v]=e.getUint32(r,!1);for(let v=16;v<64;v++){const A=mc[v-15],_=mc[v-2],S=la(A,7)^la(A,18)^A>>>3,P=la(_,17)^la(_,19)^_>>>10;mc[v]=P+mc[v-7]+S+mc[v-16]|0}let{A:n,B:i,C:o,D:s,E:f,F:d,G:p,H:b}=this;for(let v=0;v<64;v++){const A=la(f,6)^la(f,11)^la(f,25),_=b+A+exe(f,d,p)+rxe[v]+mc[v]|0,P=(la(n,2)^la(n,13)^la(n,22))+txe(n,i,o)|0;b=p,p=d,d=f,f=s+_|0,s=o,o=i,i=n,n=_+P|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,f=f+this.E|0,d=d+this.F|0,p=p+this.G|0,b=b+this.H|0,this.set(n,i,o,s,f,d,p,b)}roundClean(){mc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Og=Oq(()=>new nxe);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const bn=BigInt(0),Kr=BigInt(1),tu=BigInt(2),ixe=BigInt(3),uE=BigInt(4),Kk=BigInt(5),Wk=BigInt(8);BigInt(9);BigInt(16);function gn(t,e){const r=t%e;return r>=bn?r:e+r}function oxe(t,e,r){if(r<=bn||e 0");if(r===Kr)return bn;let n=Kr;for(;e>bn;)e&Kr&&(n=n*t%r),t=t*t%r,e>>=Kr;return n}function xo(t,e,r){let n=t;for(;e-- >bn;)n*=n,n%=r;return n}function lE(t,e){if(t===bn||e<=bn)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=gn(t,e),n=e,i=bn,o=Kr;for(;r!==bn;){const f=n/r,d=n%r,p=i-o*f;n=r,r=d,i=o,o=p}if(n!==Kr)throw new Error("invert: does not exist");return gn(i,e)}function sxe(t){const e=(t-Kr)/tu;let r,n,i;for(r=t-Kr,n=0;r%tu===bn;r/=tu,n++);for(i=tu;i(n[i]="function",n),e);return S1(t,r)}function cxe(t,e,r){if(r 0");if(r===bn)return t.ONE;if(r===Kr)return e;let n=t.ONE,i=e;for(;r>bn;)r&Kr&&(n=t.mul(n,i)),i=t.sqr(i),r>>=Kr;return n}function uxe(t,e){const r=new Array(e.length),n=e.reduce((o,s,f)=>t.is0(s)?o:(r[f]=o,t.mul(o,s)),t.ONE),i=t.inv(n);return e.reduceRight((o,s,f)=>t.is0(s)?o:(r[f]=t.mul(o,r[f]),t.mul(o,s)),i),r}function gV(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function lxe(t,e,r=!1,n={}){if(t<=bn)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:o}=gV(t,e);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=axe(t),f=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:iP(i),ZERO:bn,ONE:Kr,create:d=>gn(d,t),isValid:d=>{if(typeof d!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof d}`);return bn<=d&&dd===bn,isOdd:d=>(d&Kr)===Kr,neg:d=>gn(-d,t),eql:(d,p)=>d===p,sqr:d=>gn(d*d,t),add:(d,p)=>gn(d+p,t),sub:(d,p)=>gn(d-p,t),mul:(d,p)=>gn(d*p,t),pow:(d,p)=>cxe(f,d,p),div:(d,p)=>gn(d*lE(p,t),t),sqrN:d=>d*d,addN:(d,p)=>d+p,subN:(d,p)=>d-p,mulN:(d,p)=>d*p,inv:d=>lE(d,t),sqrt:n.sqrt||(d=>s(f,d)),invertBatch:d=>uxe(f,d),cmov:(d,p,b)=>b?p:d,toBytes:d=>r?nP(d,o):_0(d,o),fromBytes:d=>{if(d.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${d.length}`);return r?rP(d):ui(d)}});return Object.freeze(f)}function bV(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function yV(t){const e=bV(t);return e+Math.ceil(e/2)}function dxe(t,e,r=!1){const n=t.length,i=bV(e),o=yV(e);if(n<16||n1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const s=r?ui(t):rP(t),f=gn(s,e-Kr)+Kr;return r?nP(f,i):_0(f,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hxe=BigInt(0),p4=BigInt(1);function pxe(t,e){const r=(i,o)=>{const s=o.negate();return i?s:o},n=i=>{const o=Math.ceil(e/i)+1,s=2**(i-1);return{windows:o,windowSize:s}};return{constTimeNegate:r,unsafeLadder(i,o){let s=t.ZERO,f=i;for(;o>hxe;)o&p4&&(s=s.add(f)),f=f.double(),o>>=p4;return s},precomputeWindow(i,o){const{windows:s,windowSize:f}=n(o),d=[];let p=i,b=p;for(let v=0;v>=_,I>d&&(I-=A,s+=p4);const C=P,T=P+Math.abs(I)-1,k=S%2!==0,O=I<0;I===0?b=b.add(r(k,o[C])):p=p.add(r(O,o[T]))}return{p,f:b}},wNAFCached(i,o,s,f){const d=i._WINDOW_SIZE||1;let p=o.get(i);return p||(p=this.precomputeWindow(i,d),d!==1&&o.set(i,f(p))),this.wNAF(d,p,s)}}}function vV(t){return mV(t.Fp),S1(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...gV(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mxe(t){const e=vV(t);S1(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:gxe,hexToBytes:bxe}=h6e,hu={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=hu;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:gxe(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=hu,r=typeof t=="string"?bxe(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:o}=hu._parseInt(r.subarray(2)),{d:s,l:f}=hu._parseInt(o);if(f.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(t){const e=p=>Number.parseInt(p[0],16)&8?"00"+p:p,r=p=>{const b=p.toString(16);return b.length&1?`0${b}`:b},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,f=r(o),d=r(s);return`30${r(s+o+4)}02${d}${i}02${f}${n}`}},Bs=BigInt(0),Or=BigInt(1),gc=BigInt(2),G6=BigInt(3),Jk=BigInt(4);function yxe(t){const e=mxe(t),{Fp:r}=e,n=e.toBytes||((S,P,I)=>{const C=P.toAffine();return to(Uint8Array.from([4]),r.toBytes(C.x),r.toBytes(C.y))}),i=e.fromBytes||(S=>{const P=S.subarray(1),I=r.fromBytes(P.subarray(0,r.BYTES)),C=r.fromBytes(P.subarray(r.BYTES,2*r.BYTES));return{x:I,y:C}});function o(S){const{a:P,b:I}=e,C=r.sqr(S),T=r.mul(C,S);return r.add(r.add(T,r.mul(S,P)),I)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error("bad generator point: equation left != right");function s(S){return typeof S=="bigint"&&Bsr.eql(k,r.ZERO);return T(I)&&T(C)?v.ZERO:new v(I,C,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(P){const I=r.invertBatch(P.map(C=>C.pz));return P.map((C,T)=>C.toAffine(I[T])).map(v.fromAffine)}static fromHex(P){const I=v.fromAffine(i(Gn("pointHex",P)));return I.assertValidity(),I}static fromPrivateKey(P){return v.BASE.multiply(d(P))}_setWindowSize(P){this._WINDOW_SIZE=P,p.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:P,y:I}=this.toAffine();if(!r.isValid(P)||!r.isValid(I))throw new Error("bad point: x or y not FE");const C=r.sqr(I),T=o(P);if(!r.eql(C,T))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:P}=this.toAffine();if(r.isOdd)return!r.isOdd(P);throw new Error("Field doesn't support isOdd")}equals(P){b(P);const{px:I,py:C,pz:T}=this,{px:k,py:O,pz:D}=P,U=r.eql(r.mul(I,D),r.mul(k,T)),V=r.eql(r.mul(C,D),r.mul(O,T));return U&&V}negate(){return new v(this.px,r.neg(this.py),this.pz)}double(){const{a:P,b:I}=e,C=r.mul(I,G6),{px:T,py:k,pz:O}=this;let D=r.ZERO,U=r.ZERO,V=r.ZERO,Y=r.mul(T,T),W=r.mul(k,k),ie=r.mul(O,O),x=r.mul(T,k);return x=r.add(x,x),V=r.mul(T,O),V=r.add(V,V),D=r.mul(P,V),U=r.mul(C,ie),U=r.add(D,U),D=r.sub(W,U),U=r.add(W,U),U=r.mul(D,U),D=r.mul(x,D),V=r.mul(C,V),ie=r.mul(P,ie),x=r.sub(Y,ie),x=r.mul(P,x),x=r.add(x,V),V=r.add(Y,Y),Y=r.add(V,Y),Y=r.add(Y,ie),Y=r.mul(Y,x),U=r.add(U,Y),ie=r.mul(k,O),ie=r.add(ie,ie),Y=r.mul(ie,x),D=r.sub(D,Y),V=r.mul(ie,W),V=r.add(V,V),V=r.add(V,V),new v(D,U,V)}add(P){b(P);const{px:I,py:C,pz:T}=this,{px:k,py:O,pz:D}=P;let U=r.ZERO,V=r.ZERO,Y=r.ZERO;const W=e.a,ie=r.mul(e.b,G6);let x=r.mul(I,k),a=r.mul(C,O),u=r.mul(T,D),l=r.add(I,C),h=r.add(k,O);l=r.mul(l,h),h=r.add(x,a),l=r.sub(l,h),h=r.add(I,T);let m=r.add(k,D);return h=r.mul(h,m),m=r.add(x,u),h=r.sub(h,m),m=r.add(C,T),U=r.add(O,D),m=r.mul(m,U),U=r.add(a,u),m=r.sub(m,U),Y=r.mul(W,h),U=r.mul(ie,u),Y=r.add(U,Y),U=r.sub(a,Y),Y=r.add(a,Y),V=r.mul(U,Y),a=r.add(x,x),a=r.add(a,x),u=r.mul(W,u),h=r.mul(ie,h),a=r.add(a,u),u=r.sub(x,u),u=r.mul(W,u),h=r.add(h,u),x=r.mul(a,h),V=r.add(V,x),x=r.mul(m,h),U=r.mul(l,U),U=r.sub(U,x),x=r.mul(l,a),Y=r.mul(m,Y),Y=r.add(Y,x),new v(U,V,Y)}subtract(P){return this.add(P.negate())}is0(){return this.equals(v.ZERO)}wNAF(P){return _.wNAFCached(this,p,P,I=>{const C=r.invertBatch(I.map(T=>T.pz));return I.map((T,k)=>T.toAffine(C[k])).map(v.fromAffine)})}multiplyUnsafe(P){const I=v.ZERO;if(P===Bs)return I;if(f(P),P===Or)return this;const{endo:C}=e;if(!C)return _.unsafeLadder(this,P);let{k1neg:T,k1:k,k2neg:O,k2:D}=C.splitScalar(P),U=I,V=I,Y=this;for(;k>Bs||D>Bs;)k&Or&&(U=U.add(Y)),D&Or&&(V=V.add(Y)),Y=Y.double(),k>>=Or,D>>=Or;return T&&(U=U.negate()),O&&(V=V.negate()),V=new v(r.mul(V.px,C.beta),V.py,V.pz),U.add(V)}multiply(P){f(P);let I=P,C,T;const{endo:k}=e;if(k){const{k1neg:O,k1:D,k2neg:U,k2:V}=k.splitScalar(I);let{p:Y,f:W}=this.wNAF(D),{p:ie,f:x}=this.wNAF(V);Y=_.constTimeNegate(O,Y),ie=_.constTimeNegate(U,ie),ie=new v(r.mul(ie.px,k.beta),ie.py,ie.pz),C=Y.add(ie),T=W.add(x)}else{const{p:O,f:D}=this.wNAF(I);C=O,T=D}return v.normalizeZ([C,T])[0]}multiplyAndAddUnsafe(P,I,C){const T=v.BASE,k=(D,U)=>U===Bs||U===Or||!D.equals(T)?D.multiplyUnsafe(U):D.multiply(U),O=k(this,I).add(k(P,C));return O.is0()?void 0:O}toAffine(P){const{px:I,py:C,pz:T}=this,k=this.is0();P==null&&(P=k?r.ONE:r.inv(T));const O=r.mul(I,P),D=r.mul(C,P),U=r.mul(T,P);if(k)return{x:r.ZERO,y:r.ZERO};if(!r.eql(U,r.ONE))throw new Error("invZ was invalid");return{x:O,y:D}}isTorsionFree(){const{h:P,isTorsionFree:I}=e;if(P===Or)return!0;if(I)return I(v,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:P,clearCofactor:I}=e;return P===Or?this:I?I(v,this):this.multiplyUnsafe(e.h)}toRawBytes(P=!0){return this.assertValidity(),n(v,this,P)}toHex(P=!0){return Gp(this.toRawBytes(P))}}v.BASE=new v(e.Gx,e.Gy,r.ONE),v.ZERO=new v(r.ZERO,r.ONE,r.ZERO);const A=e.nBitLength,_=pxe(v,e.endo?Math.ceil(A/2):A);return{CURVE:e,ProjectivePoint:v,normPrivateKeyToScalar:d,weierstrassEquation:o,isWithinCurveOrder:s}}function vxe(t){const e=vV(t);return S1(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function wxe(t){const e=vxe(t),{Fp:r,n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(h){return BsGp(_0(h,e.nByteLength));function S(h){const m=n>>Or;return h>m}function P(h){return S(h)?f(-h):h}const I=(h,m,w)=>ui(h.slice(m,w));class C{constructor(m,w,E){this.r=m,this.s=w,this.recovery=E,this.assertValidity()}static fromCompact(m){const w=e.nByteLength;return m=Gn("compactSignature",m,w*2),new C(I(m,0,w),I(m,w,2*w))}static fromDER(m){const{r:w,s:E}=hu.toSig(Gn("DER",m));return new C(w,E)}assertValidity(){if(!A(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!A(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(m){return new C(this.r,this.s,m)}recoverPublicKey(m){const{r:w,s:E,recovery:y}=this,c=V(Gn("msgHash",m));if(y==null||![0,1,2,3].includes(y))throw new Error("recovery id invalid");const g=y===2||y===3?w+e.n:w;if(g>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const M=y&1?"03":"02",B=p.fromHex(M+_(g)),L=d(g),R=f(-c*L),F=f(E*L),z=p.BASE.multiplyAndAddUnsafe(B,R,F);if(!z)throw new Error("point at infinify");return z.assertValidity(),z}hasHighS(){return S(this.s)}normalizeS(){return this.hasHighS()?new C(this.r,f(-this.s),this.recovery):this}toDERRawBytes(){return Vp(this.toDERHex())}toDERHex(){return hu.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Vp(this.toCompactHex())}toCompactHex(){return _(this.r)+_(this.s)}}const T={isValidPrivateKey(h){try{return b(h),!0}catch{return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{const h=yV(e.n);return dxe(e.randomBytes(h),e.n)},precompute(h=8,m=p.BASE){return m._setWindowSize(h),m.multiply(BigInt(3)),m}};function k(h,m=!0){return p.fromPrivateKey(h).toRawBytes(m)}function O(h){const m=h instanceof Uint8Array,w=typeof h=="string",E=(m||w)&&h.length;return m?E===i||E===o:w?E===2*i||E===2*o:h instanceof p}function D(h,m,w=!0){if(O(h))throw new Error("first arg must be private key");if(!O(m))throw new Error("second arg must be public key");return p.fromHex(m).multiply(b(h)).toRawBytes(w)}const U=e.bits2int||function(h){const m=ui(h),w=h.length*8-e.nBitLength;return w>0?m>>BigInt(w):m},V=e.bits2int_modN||function(h){return f(U(h))},Y=iP(e.nBitLength);function W(h){if(typeof h!="bigint")throw new Error("bigint expected");if(!(Bs<=h&&hq in w))throw new Error("sign() legacy options not supported");const{hash:E,randomBytes:y}=e;let{lowS:c,prehash:g,extraEntropy:M}=w;c==null&&(c=!0),h=Gn("msgHash",h),g&&(h=Gn("prehashed msgHash",E(h)));const B=V(h),L=b(m),R=[W(L),W(B)];if(M!=null){const q=M===!0?y(r.BYTES):M;R.push(Gn("extraEntropy",q))}const F=to(...R),z=B;function K(q){const Q=U(q);if(!A(Q))return;const G=d(Q),H=p.BASE.multiply(Q).toAffine(),ee=f(H.x);if(ee===Bs)return;const ue=f(G*f(z+ee*L));if(ue===Bs)return;let fe=(H.x===ee?0:2)|Number(H.y&Or),he=ue;return c&&S(ue)&&(he=P(ue),fe^=1),new C(ee,he,fe)}return{seed:F,k2sig:K}}const x={lowS:e.lowS,prehash:!1},a={lowS:e.lowS,prehash:!1};function u(h,m,w=x){const{seed:E,k2sig:y}=ie(h,m,w),c=e;return aV(c.hash.outputLen,c.nByteLength,c.hmac)(E,y)}p.BASE._setWindowSize(8);function l(h,m,w,E=a){var H;const y=h;if(m=Gn("msgHash",m),w=Gn("publicKey",w),"strict"in E)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:g}=E;let M,B;try{if(typeof y=="string"||y instanceof Uint8Array)try{M=C.fromDER(y)}catch(ee){if(!(ee instanceof hu.Err))throw ee;M=C.fromCompact(y)}else if(typeof y=="object"&&typeof y.r=="bigint"&&typeof y.s=="bigint"){const{r:ee,s:ue}=y;M=new C(ee,ue)}else throw new Error("PARSE");B=p.fromHex(w)}catch(ee){if(ee.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&M.hasHighS())return!1;g&&(m=e.hash(m));const{r:L,s:R}=M,F=V(m),z=d(R),K=f(F*z),q=f(L*z),Q=(H=p.BASE.multiplyAndAddUnsafe(B,K,q))==null?void 0:H.toAffine();return Q?f(Q.x)===L:!1}return{CURVE:e,getPublicKey:k,getSharedSecret:D,sign:u,verify:l,ProjectivePoint:p,Signature:C,utils:T}}function xxe(t,e){const r=t.ORDER;let n=Bs;for(let S=r-Or;S%gc===Bs;S/=gc)n+=Or;const i=n,o=gc<{let I=v,C=t.pow(P,p),T=t.sqr(C);T=t.mul(T,P);let k=t.mul(S,T);k=t.pow(k,d),k=t.mul(k,C),C=t.mul(k,P),T=t.mul(k,S);let O=t.mul(T,C);k=t.pow(O,b);let D=t.eql(k,t.ONE);C=t.mul(T,A),k=t.mul(O,I),T=t.cmov(C,T,D),O=t.cmov(k,O,D);for(let U=i;U>Or;U--){let V=U-gc;V=gc<{let T=t.sqr(C);const k=t.mul(I,C);T=t.mul(T,k);let O=t.pow(T,S);O=t.mul(O,k);const D=t.mul(O,P),U=t.mul(t.sqr(O),C),V=t.eql(U,I);let Y=t.cmov(D,O,V);return{isValid:V,value:Y}}}return _}function Exe(t,e){if(mV(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=xxe(t,e.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,f,d,p,b,v;i=t.sqr(n),i=t.mul(i,e.Z),o=t.sqr(i),o=t.add(o,i),s=t.add(o,t.ONE),s=t.mul(s,e.B),f=t.cmov(e.Z,t.neg(o),!t.eql(o,t.ZERO)),f=t.mul(f,e.A),o=t.sqr(s),p=t.sqr(f),d=t.mul(p,e.A),o=t.add(o,d),o=t.mul(o,s),p=t.mul(p,f),d=t.mul(p,e.B),o=t.add(o,d),b=t.mul(i,s);const{isValid:A,value:_}=r(o,p);v=t.mul(i,n),v=t.mul(v,_),b=t.cmov(b,s,A),v=t.cmov(v,_,A);const S=t.isOdd(n)===t.isOdd(v);return v=t.cmov(t.neg(v),v,S),b=t.div(b,f),{x:b,y:v}}}function Axe(t){if(t instanceof Uint8Array)return t;if(typeof t=="string")return Lx(t);throw new Error("DST must be Uint8Array or string")}const Sxe=ui;function _c(t,e){if(t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=t&255,t>>>=8;return new Uint8Array(r)}function Mxe(t,e){const r=new Uint8Array(t.length);for(let n=0;n255&&(e=n(to(Lx("H2C-OVERSIZE-DST-"),e)));const{outputLen:i,blockLen:o}=n,s=Math.ceil(r/i);if(s>255)throw new Error("Invalid xmd length");const f=to(e,_c(e.length,1)),d=_c(0,o),p=_c(r,2),b=new Array(s),v=n(to(d,t,p,_c(0,1),f));b[0]=n(to(v,_c(1,1),f));for(let _=1;_<=s;_++){const S=[Mxe(v,b[_-1]),_c(_+1,1),f];b[_]=n(to(...S))}return to(...b).slice(0,r)}function Pxe(t,e,r,n,i){if(Ng(t),Ng(e),sP(r),e.length>255){const o=Math.ceil(2*n/8);e=i.create({dkLen:o}).update(Lx("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(t).update(_c(r,2)).update(e).update(_c(e.length,1)).digest()}function Zk(t,e,r){S1(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:n,k:i,m:o,hash:s,expand:f,DST:d}=r;Ng(t),sP(e);const p=Axe(d),b=n.toString(2).length,v=Math.ceil((b+i)/8),A=e*o*v;let _;if(f==="xmd")_=_xe(t,p,A,s);else if(f==="xof")_=Pxe(t,p,A,i,s);else if(f==="_internal_pass")_=t;else throw new Error('expand must be "xmd" or "xof"');const S=new Array(e);for(let P=0;PArray.from(n).reverse());return(n,i)=>{const[o,s,f,d]=r.map(p=>p.reduce((b,v)=>t.add(t.mul(b,n),v)));return n=t.div(o,s),i=t.mul(i,t.div(f,d)),{x:n,y:i}}}function Ixe(t,e,r){if(typeof e!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=Zk(n,2,{...r,DST:r.DST,...i}),s=t.fromAffine(e(o[0])),f=t.fromAffine(e(o[1])),d=s.add(f).clearCofactor();return d.assertValidity(),d},encodeToCurve(n,i){const o=Zk(n,1,{...r,DST:r.encodeDST,...i}),s=t.fromAffine(e(o[0])).clearCofactor();return s.assertValidity(),s}}}class wV extends d_{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,_ye(e);const n=px(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let s=0;snew wV(t,e).update(r).digest();xV.create=(t,e)=>new wV(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Txe(t){return{hash:t,hmac:(e,...r)=>xV(t,e,Lye(...r)),randomBytes:Nq}}function Rxe(t,e){const r=n=>wxe({...t,...Txe(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dx=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),V6=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),EV=BigInt(1),K6=BigInt(2),Yk=(t,e)=>(t+e/K6)/e;function AV(t){const e=Dx,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),f=BigInt(44),d=BigInt(88),p=t*t*t%e,b=p*p*t%e,v=xo(b,r,e)*b%e,A=xo(v,r,e)*b%e,_=xo(A,K6,e)*p%e,S=xo(_,i,e)*_%e,P=xo(S,o,e)*S%e,I=xo(P,f,e)*P%e,C=xo(I,d,e)*I%e,T=xo(C,f,e)*P%e,k=xo(T,r,e)*b%e,O=xo(k,s,e)*S%e,D=xo(O,n,e)*p%e,U=xo(D,K6,e);if(!P0.eql(P0.sqr(U),t))throw new Error("Cannot find square root");return U}const P0=lxe(Dx,void 0,void 0,{sqrt:AV}),sc=Rxe({a:BigInt(0),b:BigInt(7),Fp:P0,n:V6,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=V6,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-EV*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),f=Yk(o*t,e),d=Yk(-n*t,e);let p=gn(t-f*r-d*i,e),b=gn(-f*n-d*o,e);const v=p>s,A=b>s;if(v&&(p=e-p),A&&(b=e-b),p>s||b>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:v,k1:p,k2neg:A,k2:b}}}},Og),Fx=BigInt(0),SV=t=>typeof t=="bigint"&&Fxtypeof t=="bigint"&&Fxi.charCodeAt(0)));r=to(n,n),Qk[t]=r}return Og(to(r,...e))}const aP=t=>t.toRawBytes(!0).slice(1),dE=t=>_0(t,32),m4=t=>gn(t,Dx),Lg=t=>gn(t,V6),fP=sc.ProjectivePoint,Bxe=(t,e,r)=>fP.BASE.multiplyAndAddUnsafe(t,e,r);function hE(t){let e=sc.utils.normPrivateKeyToScalar(t),r=fP.fromPrivateKey(e);return{scalar:r.hasEvenY()?e:Lg(-e),bytes:aP(r)}}function MV(t){if(!SV(t))throw new Error("bad x: need 0 < x < p");const e=m4(t*t),r=m4(e*t+BigInt(7));let n=AV(r);n%K6!==Fx&&(n=m4(-n));const i=new fP(t,n,EV);return i.assertValidity(),i}function _V(...t){return Lg(ui(W6("BIP0340/challenge",...t)))}function Oxe(t){return hE(t).bytes}function Nxe(t,e,r=Nq(32)){const n=Gn("message",t),{bytes:i,scalar:o}=hE(e),s=Gn("auxRand",r,32),f=dE(o^ui(W6("BIP0340/aux",s))),d=W6("BIP0340/nonce",f,i,n),p=Lg(ui(d));if(p===Fx)throw new Error("sign failed: k is zero");const{bytes:b,scalar:v}=hE(p),A=_V(b,i,n),_=new Uint8Array(64);if(_.set(b,0),_.set(dE(Lg(v+A*o)),32),!PV(_,n,i))throw new Error("sign: Invalid signature produced");return _}function PV(t,e,r){const n=Gn("signature",t,64),i=Gn("message",e),o=Gn("publicKey",r,32);try{const s=MV(ui(o)),f=ui(n.subarray(0,32));if(!SV(f))return!1;const d=ui(n.subarray(32,64));if(!kxe(d))return!1;const p=_V(dE(f),aP(s),i),b=Bxe(s,d,Lg(-p));return!(!b||!b.hasEvenY()||b.toAffine().x!==f)}catch{return!1}}const Lxe=(()=>({getPublicKey:Oxe,sign:Nxe,verify:PV,utils:{randomPrivateKey:sc.utils.randomPrivateKey,lift_x:MV,pointToBytes:aP,numberToBytesBE:_0,bytesToNumberBE:ui,taggedHash:W6,mod:gn}}))(),Dxe=(()=>Cxe(P0,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(e=>BigInt(e)))))(),Fxe=(()=>Exe(P0,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:P0.create(BigInt("-11"))}))(),CV=(()=>Ixe(sc.ProjectivePoint,t=>{const{x:e,y:r}=Fxe(P0.create(t[0]));return Dxe(e,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:P0.ORDER,m:1,k:128,expand:"xmd",hash:Og}))(),$xe=(()=>CV.hashToCurve)(),Uxe=(()=>CV.encodeToCurve)(),zxe=Object.freeze(Object.defineProperty({__proto__:null,encodeToCurve:Uxe,hashToCurve:$xe,schnorr:Lxe,secp256k1:sc},Symbol.toStringTag,{value:"Module"}));function jxe(t){const{r:e,s:r}=sc.Signature.fromCompact(t.slice(2,130));return{r:ht(e,{size:32}),yParityAndS:ht(r,{size:32})}}function Hxe(t){const{r:e,s:r}=sc.Signature.fromCompact(t.slice(2,130)),n=BigInt(`0x${t.slice(130)}`);return{r:ht(e,{size:32}),s:ht(r,{size:32}),v:n}}function qxe(t){const{r:e,s:r,v:n}=t,i=n-27n;let o=r;if(i===1n){const s=ic(r);s[0]|=128,o=$i(s)}return{r:e,yParityAndS:o}}function Gxe({r:t,yParityAndS:e}){return`0x${new sc.Signature(Sr(t),Sr(e)).toCompactHex()}`}function IV({r:t,s:e,v:r}){return`0x${new sc.Signature(Sr(t),Sr(e)).toCompactHex()}${Ft(r).slice(2)}`}const Vxe=Object.freeze(Object.defineProperty({__proto__:null,AbiConstructorNotFoundError:t_,AbiConstructorParamsNotFoundError:Bg,AbiDecodingDataSizeInvalidError:gye,AbiDecodingDataSizeTooSmallError:dx,AbiDecodingZeroDataError:ty,AbiEncodingArrayLengthMismatchError:lq,AbiEncodingBytesSizeMismatchError:dq,AbiEncodingLengthMismatchError:r_,AbiErrorInputsNotFoundError:hq,AbiErrorNotFoundError:Q7,AbiErrorSignatureNotFoundError:n_,AbiEventNotFoundError:X7,AbiEventSignatureEmptyTopicsError:pq,AbiEventSignatureNotFoundError:mq,AbiFunctionNotFoundError:dl,AbiFunctionOutputsNotFoundError:i_,AbiFunctionSignatureNotFoundError:gq,BaseError:qe,BaseFeeScalarError:iG,BlockNotFoundError:P_,BytesSizeMismatchError:o_,CallExecutionError:M_,ChainDisconnectedError:Up,ChainDoesNotSupportContract:H6,ChainMismatchError:dG,ChainNotFoundError:hG,CircularReferenceError:sq,ClientChainNotConfiguredError:O_,ContractFunctionExecutionError:Qq,ContractFunctionRevertedError:R6,ContractFunctionZeroDataError:Xq,DataLengthTooLongError:yye,DataLengthTooShortError:vye,DecodeLogDataMismatch:x0,DecodeLogTopicsMismatch:Rl,Eip1559FeesNotSupportedError:Ax,EnsAvatarInvalidNftUriError:cd,EnsAvatarUnsupportedNamespaceError:xG,EnsAvatarUriResolutionError:Rx,EstimateGasExecutionError:rG,ExecutionRevertedError:lu,FeeCapTooHighError:S0,FeeCapTooLowError:B6,FeeConflictError:Vq,FilterTypeNotSupportedError:Eq,HttpRequestError:l0,InsufficientFundsError:D6,IntegerOutOfRangeError:Sq,InternalRpcError:hl,IntrinsicGasTooHighError:F6,IntrinsicGasTooLowError:$6,InvalidAbiDecodingTypeError:yq,InvalidAbiEncodingTypeError:bq,InvalidAbiItemError:JH,InvalidAbiParameterError:YH,InvalidAbiParametersError:QH,InvalidAbiTypeParameterError:nq,InvalidAddressError:ei,InvalidArrayError:vq,InvalidBytesBooleanError:Mq,InvalidChainIdError:Px,InvalidDefinitionTypeError:wq,InvalidFunctionModifierError:rq,InvalidHexBooleanError:_q,InvalidHexValueError:Pq,InvalidInputRpcError:A0,InvalidLegacyVError:E_,InvalidModifierError:tq,InvalidParameterError:XH,InvalidParamsRpcError:Tp,InvalidParenthesisError:aq,InvalidRequestRpcError:Cp,InvalidSerializableTransactionError:Kq,InvalidSerializedTransactionError:yx,InvalidSerializedTransactionTypeError:Wq,InvalidSignatureError:Rd,InvalidStorageKeySizeError:Jq,InvalidStructSignatureError:oq,JsonRpcVersionUnsupportedError:Lp,LimitExceededRpcError:Np,MaxFeePerGasTooLowError:oG,MethodNotFoundRpcError:Ip,MethodNotSupportedRpcError:Op,NonceMaxValueError:L6,NonceTooHighError:O6,NonceTooLowError:N6,OffsetOutOfBoundsError:wye,ParseRpcError:Pp,ProviderDisconnectedError:$p,ProviderRpcError:Bl,RawContractError:vx,ResourceNotFoundRpcError:Rp,ResourceUnavailableRpcError:kp,RpcError:vi,RpcRequestError:wx,SizeExceedsPaddingSizeError:a_,SizeOverflowError:Cq,SliceOffsetOutOfBoundsError:s_,SolidityProtectedKeywordError:eq,SwitchChainError:zp,TimeoutError:k6,TipAboveFeeCapError:Hp,TransactionExecutionError:Zq,TransactionNotFoundError:A_,TransactionReceiptNotFoundError:S_,TransactionRejectedRpcError:Bp,TransactionTypeNotSupportedError:U6,UnauthorizedProviderError:Dp,UnknownNodeError:oy,UnknownRpcError:tG,UnknownSignatureError:iq,UnknownTypeError:ZH,UnsupportedPackedAbiType:xq,UnsupportedProviderMethodError:Fp,UrlRequiredError:$_,UserRejectedRequestError:Gu,WaitForTransactionReceiptTimeoutError:Yq,WebSocketRequestError:eG,assertCurrentChain:L_,assertRequest:w1,assertTransactionEIP1559:J_,assertTransactionEIP2930:Z_,assertTransactionLegacy:Y_,boolToBytes:Iq,boolToHex:hx,bytesToBigInt:sE,bytesToBigint:sE,bytesToBool:qG,bytesToHex:$i,bytesToNumber:GG,bytesToRlp:O2e,bytesToString:VG,ccipFetch:H_,checksumAddress:ny,compactSignatureToHex:Gxe,compactSignatureToSignature:Ywe,concat:Zo,concatBytes:$q,concatHex:Va,createClient:Dl,createPublicClient:oP,createTestClient:Y6e,createTransport:cy,createWalletClient:pV,custom:qve,decodeAbiParameters:kl,decodeDeployData:Zwe,decodeErrorResult:y_,decodeEventLog:x1,decodeFunctionData:C2e,decodeFunctionResult:Nl,defineBlock:wve,defineChain:TG,defineTransaction:vve,defineTransactionReceipt:$2e,defineTransactionRequest:yve,domainSeparator:P2e,encodeAbiParameters:oc,encodeDeployData:G_,encodeErrorResult:I2e,encodeEventTopics:b1,encodeFunctionData:pi,encodeFunctionResult:R2e,encodePacked:jm,etherUnits:v_,extractChain:A2e,fallback:Gve,formatBlock:Mx,formatEther:y1,formatGwei:ci,formatLog:Yo,formatTransaction:Sx,formatTransactionReceipt:V_,formatTransactionRequest:Ol,formatUnits:x_,fromBytes:U2e,fromHex:xye,fromRlp:K_,getAbiItem:H0,getAddress:E0,getChainContractAddress:Ll,getContract:$ve,getContractAddress:zG,getContractError:jp,getCreate2Address:HG,getCreateAddress:jG,getEventSelector:mx,getEventSignature:Rq,getFunctionSelector:g1,getFunctionSignature:u_,getSerializedTransactionType:XG,getTransactionType:T_,getTypesForEIP712Domain:uy,gweiUnits:w_,hashDomain:q_,hashMessage:ly,hashTypedData:A1,hexToBigInt:Sr,hexToBool:f_,hexToBytes:ic,hexToCompactSignature:jxe,hexToNumber:rr,hexToRlp:N2e,hexToSignature:Hxe,hexToString:c_,http:du,isAddress:tn,isAddressEqual:kx,isBytes:oE,isHash:WG,isHex:jt,keccak256:Ur,labelhash:wG,maxInt104:v5e,maxInt112:w5e,maxInt120:x5e,maxInt128:E5e,maxInt136:A5e,maxInt144:S5e,maxInt152:M5e,maxInt16:f5e,maxInt160:_5e,maxInt168:P5e,maxInt176:C5e,maxInt184:I5e,maxInt192:T5e,maxInt200:R5e,maxInt208:k5e,maxInt216:B5e,maxInt224:O5e,maxInt232:N5e,maxInt24:c5e,maxInt240:L5e,maxInt248:D5e,maxInt256:F5e,maxInt32:u5e,maxInt40:l5e,maxInt48:d5e,maxInt56:h5e,maxInt64:p5e,maxInt72:m5e,maxInt8:a5e,maxInt80:g5e,maxInt88:b5e,maxInt96:y5e,maxUint104:Iwe,maxUint112:Twe,maxUint120:Rwe,maxUint128:kwe,maxUint136:Bwe,maxUint144:Owe,maxUint152:Nwe,maxUint16:ywe,maxUint160:Lwe,maxUint168:Dwe,maxUint176:Fwe,maxUint184:$we,maxUint192:Uwe,maxUint200:zwe,maxUint208:jwe,maxUint216:Hwe,maxUint224:qwe,maxUint232:Gwe,maxUint24:vwe,maxUint240:Vwe,maxUint248:Kwe,maxUint256:Wwe,maxUint32:wwe,maxUint40:xwe,maxUint48:Ewe,maxUint56:Awe,maxUint64:Swe,maxUint72:Mwe,maxUint8:bwe,maxUint80:_we,maxUint88:Pwe,maxUint96:Cwe,minInt104:Y5e,minInt112:Q5e,minInt120:X5e,minInt128:ewe,minInt136:twe,minInt144:rwe,minInt152:nwe,minInt16:U5e,minInt160:iwe,minInt168:owe,minInt176:swe,minInt184:awe,minInt192:fwe,minInt200:cwe,minInt208:uwe,minInt216:lwe,minInt224:dwe,minInt232:hwe,minInt24:z5e,minInt240:pwe,minInt248:mwe,minInt256:gwe,minInt32:j5e,minInt40:H5e,minInt48:q5e,minInt56:G5e,minInt64:V5e,minInt72:K5e,minInt8:$5e,minInt80:W5e,minInt88:J5e,minInt96:Z5e,multicall3Abi:j6,namehash:zm,numberToBytes:Tq,numberToHex:ht,offchainLookup:IG,offchainLookupAbiItem:j_,offchainLookupSignature:CG,pad:zs,padBytes:Aq,padHex:js,parseAbi:fye,parseAbiItem:cye,parseAbiParameter:uye,parseAbiParameters:lye,parseEther:Y2e,parseGwei:Q2e,parseTransaction:q2e,parseUnits:X_,presignMessagePrefix:ZG,publicActions:uV,recoverAddress:W_,recoverMessageAddress:YG,recoverPublicKey:JG,recoverTypedDataAddress:QG,rpcTransactionType:nG,serializeAccessList:Q_,serializeTransaction:nV,signatureToCompactSignature:qxe,signatureToHex:IV,size:Wr,slice:Ar,sliceBytes:jq,sliceHex:p_,stringToBytes:La,stringToHex:ry,stringify:fn,testActions:lV,toBytes:Jn,toHex:Ft,toRlp:Fl,transactionType:C_,trim:Ni,validateTypedData:Bx,verifyMessage:j2e,verifyTypedData:H2e,walletActions:hV,webSocket:s5e,weiUnits:pve,zeroAddress:cE,zeroHash:Jwe},Symbol.toStringTag,{value:"Module"})),Kxe=mW(Vxe);var Kp={};Object.defineProperty(Kp,"__esModule",{value:!0});Kp.MAGIC_VALUE_BYTES=Kp.MAGIC_VALUE=void 0;const Wxe="0x1626ba7e";Kp.MAGIC_VALUE=Wxe;const Jxe="0x20c13b0b";Kp.MAGIC_VALUE_BYTES=Jxe;var cP={},dy={},pl={};Object.defineProperty(pl,"__esModule",{value:!0});pl.PermissionsError=pl.PERMISSIONS_REQUEST_REJECTED=void 0;pl.PERMISSIONS_REQUEST_REJECTED=4001;class uP extends Error{constructor(e,r,n){super(e),this.code=r,this.data=n,Object.setPrototypeOf(this,uP.prototype)}}pl.PermissionsError=uP;Object.defineProperty(dy,"__esModule",{value:!0});dy.Wallet=void 0;const g4=Tl,uv=pl;let Zxe=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(g4.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new uv.PermissionsError("Permissions request is invalid",uv.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(g4.Methods.wallet_requestPermissions,e)).data}catch{throw new uv.PermissionsError("Permissions rejected",uv.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every(r=>typeof r=="object"?Object.keys(r).every(n=>!!Object.values(g4.RestrictedMethods).includes(n)):!1)}};dy.Wallet=Zxe;Object.defineProperty(cP,"__esModule",{value:!0});const Yxe=dy,Xk=pl,eB=(t,e)=>e.some(r=>r.parentCapability===t),Qxe=()=>(t,e,r)=>{const n=r.value;return r.value=async function(){const i=new Yxe.Wallet(this.communicator);let o=await i.getPermissions();if(eB(e,o)||(o=await i.requestPermissions([{[e]:{}}])),!eB(e,o))throw new Xk.PermissionsError("Permissions rejected",Xk.PERMISSIONS_REQUEST_REJECTED);return n.apply(this)},r};cP.default=Qxe;var Xxe=et&&et.__decorate||function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var f=t.length-1;f>=0;f--)(s=t[f])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},e3e=et&&et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cx,"__esModule",{value:!0});cx.Safe=void 0;const lv=Kxe,tB=Kp,bc=Tl,rB=Xb,t3e=ox,r3e=e3e(cP);class TV{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(bc.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(bc.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(bc.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,r="0x"){const n=await this.getInfo(),i=(0,lv.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,r]}),o={call:rB.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:i},"latest"]};try{return(await this.communicator.send(bc.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===tB.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(e,r="0x"){const n=await this.getInfo(),i=(0,lv.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,r]}),o={call:rB.RPC_CALLS.eth_call,params:[{to:n.safeAddress,data:i},"latest"]};try{return(await this.communicator.send(bc.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===tB.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(e){return(0,lv.hashMessage)(e)}calculateTypedMessageHash(e){const r=typeof e.domain.chainId=="object"?e.domain.chainId.toNumber():Number(e.domain.chainId);let n=e.primaryType;if(!n){const i=Object.values(e.types),o=Object.keys(e.types).filter(s=>i.every(f=>f.every(({type:d})=>d.replace("[","").replace("]","")!==s)));if(o.length===0||o.length>1)throw new Error("Please specify primaryType");n=o[0]}return(0,lv.hashTypedData)({message:e.message,domain:Object.assign(Object.assign({},e.domain),{chainId:r,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt}),types:e.types,primaryType:n})}async getOffChainSignature(e){return(await this.communicator.send(bc.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,r="0x"){let n;if(typeof e=="string"&&(n=async()=>{const i=this.calculateMessageHash(e);return await this.isMessageHashSigned(i,r)}),(0,t3e.isObjectEIP712TypedData)(e)&&(n=async()=>{const i=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(i,r)}),n)return await n();throw new Error("Invalid message type")}async isMessageHashSigned(e,r="0x"){const n=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const i of n)if(await i(e,r))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(bc.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(bc.Methods.requestAddressBook,void 0)).data}}Xxe([(0,r3e.default)()],TV.prototype,"requestAddressBook",null);cx.Safe=TV;var n3e=et&&et.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(P6,"__esModule",{value:!0});const i3e=n3e(PH),o3e=ix,s3e=fx,a3e=cx,f3e=dy;let c3e=class{constructor(e={}){const{allowedDomains:r=null,debug:n=!1}=e;this.communicator=new i3e.default(r,n),this.eth=new s3e.Eth(this.communicator),this.txs=new o3e.TXs(this.communicator),this.safe=new a3e.Safe(this.communicator),this.wallet=new f3e.Wallet(this.communicator)}};P6.default=c3e;(function(t){var e=et&&et.__createBinding||(Object.create?function(s,f,d,p){p===void 0&&(p=d);var b=Object.getOwnPropertyDescriptor(f,d);(!b||("get"in b?!f.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(s,p,b)}:function(s,f,d,p){p===void 0&&(p=d),s[p]=f[d]}),r=et&&et.__exportStar||function(s,f){for(var d in s)d!=="default"&&!Object.prototype.hasOwnProperty.call(f,d)&&e(f,s,d)},n=et&&et.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const i=n(P6);t.default=i.default,r(P6,t),r(ox,t),r(Tl,t),r(Yb,t);var o=Qb;Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return o.getSDKVersion}})})(_H);const u3e=es(_H);var RV={},$x={},Ux={};Object.defineProperty(Ux,"__esModule",{value:!0});Ux.getLowerCase=void 0;function l3e(t){return t&&t.toLowerCase()}Ux.getLowerCase=l3e;Object.defineProperty($x,"__esModule",{value:!0});$x.SafeAppProvider=void 0;const d3e=yw,dv=Ux;class h3e extends d3e.EventEmitter{constructor(e,r){super(),this.submittedTxs=new Map,this.safe=e,this.sdk=r}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(e){const{method:r,params:n=[]}=e;switch(r){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{const[d,p]=n;if(this.safe.safeAddress.toLowerCase()!==p.toLowerCase())throw new Error("The address or message hash is invalid");const b=await this.sdk.txs.signMessage(d);return("signature"in b?b.signature:void 0)||"0x"}case"eth_sign":{const[d,p]=n;if(this.safe.safeAddress.toLowerCase()!==d.toLowerCase()||!p.startsWith("0x"))throw new Error("The address or message hash is invalid");const b=await this.sdk.txs.signMessage(p);return("signature"in b?b.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[d,p]=n,b=typeof p=="string"?JSON.parse(p):p;if(this.safe.safeAddress.toLowerCase()!==d.toLowerCase())throw new Error("The address is invalid");const v=await this.sdk.txs.signTypedMessage(b);return("signature"in v?v.signature:void 0)||"0x"}case"eth_sendTransaction":const i=Object.assign({value:"0",data:"0x"},n[0]);typeof i.gas=="string"&&i.gas.startsWith("0x")&&(i.gas=parseInt(i.gas,16));const o=await this.sdk.txs.send({txs:[i],params:{safeTxGas:i.gas}});return this.submittedTxs.set(o.safeTxHash,{from:this.safe.safeAddress,hash:o.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:i.data,value:i.value,to:i.to,blockHash:null,blockNumber:null,transactionIndex:null}),o.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,dv.getLowerCase)(n[0]),n[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,dv.getLowerCase)(n[0]),n[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,dv.getLowerCase)(n[0]),n[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,dv.getLowerCase)(n[0]),n[1],n[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([n[0],n[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([n[0],n[1]]);case"eth_getTransactionByHash":let f=n[0];try{f=(await this.sdk.txs.getBySafeTxHash(f)).txHash||f}catch{}return this.submittedTxs.has(f)?this.submittedTxs.get(f):this.sdk.eth.getTransactionByHash([f]).then(d=>(d&&(d.hash=n[0]),d));case"eth_getTransactionReceipt":{let d=n[0];try{d=(await this.sdk.txs.getBySafeTxHash(d)).txHash||d}catch{}return this.sdk.eth.getTransactionReceipt([d]).then(p=>(p&&(p.transactionHash=n[0]),p))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(n[0]);case"eth_call":return this.sdk.eth.call([n[0],n[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([n[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(n[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([n[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,r){e||r("Undefined request"),this.request(e).then(n=>r(null,{jsonrpc:"2.0",id:e.id,result:n})).catch(n=>r(n,null))}}$x.SafeAppProvider=h3e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppProvider=void 0;var e=$x;Object.defineProperty(t,"SafeAppProvider",{enumerable:!0,get:function(){return e.SafeAppProvider}})})(RV);const lP=new u3e,p3e=t=>new Promise((e,r)=>setTimeout(r,t));let hv;const zx=async()=>(hv!=null||(hv=await lP.safe.getInfo()),hv),kV=async()=>{try{const t=await Promise.race([p3e(300),zx()]);return console.log(t),t!=null}catch{return!1}},m3e=async()=>{const t=await zx();if(!t.chainId)throw Error("Unsupported chain");return new Jge(new RV.SafeAppProvider(t,lP))},g3e=async t=>(await lP.txs.send({txs:t})).safeTxHash,b3e=84531,M1=async()=>{var t;return await kV()?(console.log("Use SafeAppsProvider"),await m3e()):(console.log("Use JsonRpcProvider"),new MH((t=co.getNetworkById(b3e))==null?void 0:t.url))},jx=async t=>{var e,r;return console.log("Use JsonRpcProvider"),console.log((e=co.getNetworkById(parseInt(t)))==null?void 0:e.url),new MH((r=co.getNetworkById(parseInt(t)))==null?void 0:r.url)},y3e="_nav_e4u95_1",v3e="_wrapper_e4u95_20",w3e="_maincontainer_e4u95_31",x3e="_network_e4u95_42",E3e="_buttonContainer_e4u95_49",A3e="_container_e4u95_59",S3e="_mode_e4u95_66",M3e="_root_e4u95_76",_3e="_icon_e4u95_83",P3e="_iconLight_e4u95_90",C3e="_iconDark_e4u95_95",td={nav:y3e,wrapper:v3e,maincontainer:w3e,network:x3e,buttonContainer:E3e,container:A3e,mode:S3e,root:M3e,icon:_3e,iconLight:P3e,iconDark:C3e},I3e=t=>{const{colorScheme:e,toggleColorScheme:r}=FQ(),[n,i]=Z.useState(""),[o,s]=Z.useState(84531),f=e==="dark";return Z.useEffect(()=>{(async()=>{var b,v;const d=await M1(),{chainId:p}=await d.getNetwork();s(p),i(`${(b=co.getNetworkById(parseInt(p)))==null?void 0:b.name} ${(v=co.getNetworkById(parseInt(p)))==null?void 0:v.type}`)})()},[]),ze.jsx(Ws.Header,{children:ze.jsx("nav",{className:td.nav,children:ze.jsx("div",{className:td.wrapper,children:ze.jsxs(Bm,{position:"apart",className:td.maincontainer,children:[ze.jsx(Bm,{className:td.container,children:ze.jsx(kS,{onClick:()=>{navigate($u.home)},style:{cursor:"pointer",width:"170px"},src:f?Kie:Vie,alt:"Logo"})}),ze.jsx(Bm,{className:td.mode,children:ze.jsx("div",{className:td.container,children:f?ze.jsx(Gie,{size:24,stroke:1.5,onClick:()=>r(),style:{cursor:"pointer"}}):ze.jsx(Hie,{size:24,stroke:1.5,style:{cursor:"pointer"},onClick:()=>r()})})})]})})})})},T3e=t=>{const{children:e}=t,[r,n]=Z.useState(!1);return ze.jsxs(Ws,{header:{height:60},padding:"md",styles:{main:{backgroundColor:"light-dark( 'red', 'blue')"}},children:[ze.jsx(I3e,{setOpened:n,opened:r}),ze.jsxs(Ws.Main,{children:[" ",ze.jsx(Nie,{children:e})]})]})};/** * @remix-run/router v1.13.1 * * Copyright (c) Remix Software Inc. @@ -164,8 +164,8 @@ use chrome, FireFox or Internet Explorer 11`)}var sj=Bt,_R=i1,aj=sj.Buffer,fj=sj * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Lr(){return Lr=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function C0(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function k3e(){return Math.random().toString(36).substr(2,8)}function iB(t,e){return{usr:t.state,key:t.key,idx:e}}function Lg(t,e,r,n){return r===void 0&&(r=null),Lr({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ka(e):e,{state:r,key:e&&e.key||n||k3e()})}function hy(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ka(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function B3e(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,s=i.history,f=jr.Pop,d=null,p=b();p==null&&(p=0,s.replaceState(Lr({},s.state,{idx:p}),""));function b(){return(s.state||{idx:null}).idx}function v(){f=jr.Pop;let I=b(),C=I==null?null:I-p;p=I,d&&d({action:f,location:P.location,delta:C})}function A(I,C){f=jr.Push;let T=Lg(P.location,I,C);r&&r(T,I),p=b()+1;let O=iB(T,p),B=P.createHref(T);try{s.pushState(O,"",B)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;i.location.assign(B)}o&&d&&d({action:f,location:P.location,delta:1})}function _(I,C){f=jr.Replace;let T=Lg(P.location,I,C);r&&r(T,I),p=b();let O=iB(T,p),B=P.createHref(T);s.replaceState(O,"",B),o&&d&&d({action:f,location:P.location,delta:0})}function S(I){let C=i.location.origin!=="null"?i.location.origin:i.location.href,T=typeof I=="string"?I:hy(I);return Dt(C,"No window.location.(origin|href) available to create URL for href: "+T),new URL(T,C)}let P={get action(){return f},get location(){return t(i,s)},listen(I){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(nB,v),d=I,()=>{i.removeEventListener(nB,v),d=null}},createHref(I){return e(i,I)},createURL:S,encodeLocation(I){let C=S(I);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:A,replace:_,go(I){return s.go(I)}};return P}var Hr;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Hr||(Hr={}));const O3e=new Set(["lazy","caseSensitive","path","id","index","children"]);function N3e(t){return t.index===!0}function pE(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((i,o)=>{let s=[...r,o],f=typeof i.id=="string"?i.id:s.join("-");if(Dt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Dt(!n[f],'Found a route id collision on id "'+f+`". Route id's must be globally unique within Data Router usages`),N3e(i)){let d=Lr({},i,e(i),{id:f});return n[f]=d,d}else{let d=Lr({},i,e(i),{id:f,children:void 0});return n[f]=d,i.children&&(d.children=pE(i.children,e,s,n)),d}})}function kd(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Ka(e):e,i=py(n.pathname||"/",r);if(i==null)return null;let o=BV(t);D3e(o);let s=null;for(let f=0;s==null&&f{let d={relativePath:f===void 0?o.path||"":f,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};d.relativePath.startsWith("/")&&(Dt(d.relativePath.startsWith(n),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(n.length));let p=d0([n,d.relativePath]),b=r.concat(d);o.children&&o.children.length>0&&(Dt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),BV(o.children,e,b,p)),!(o.path==null&&!o.index)&&e.push({path:p,score:q3e(p,o.index),routesMeta:b})};return t.forEach((o,s)=>{var f;if(o.path===""||!((f=o.path)!=null&&f.includes("?")))i(o,s);else for(let d of OV(o.path))i(o,s,d)}),e}function OV(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let s=OV(n.join("/")),f=[];return f.push(...s.map(d=>d===""?o:[o,d].join("/"))),i&&f.push(...s),f.map(d=>t.startsWith("/")&&d===""?"/":d)}function D3e(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:G3e(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const F3e=/^:\w+$/,$3e=3,U3e=2,z3e=1,j3e=10,H3e=-2,oB=t=>t==="*";function q3e(t,e){let r=t.split("/"),n=r.length;return r.some(oB)&&(n+=H3e),e&&(n+=U3e),r.filter(i=>!oB(i)).reduce((i,o)=>i+(F3e.test(o)?$3e:o===""?z3e:j3e),n)}function G3e(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function V3e(t,e){let{routesMeta:r}=t,n={},i="/",o=[];for(let s=0;s{let{paramName:A,isOptional:_}=b;if(A==="*"){let P=f[v]||"";s=o.slice(0,o.length-P.length).replace(/(.)\/+$/,"$1")}const S=f[v];return _&&!S?p[A]=void 0:p[A]=Z3e(S||"",A),p},{}),pathname:o,pathnameBase:s,pattern:t}}function W3e(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),C0(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(s,f,d)=>(n.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function J3e(t){try{return decodeURI(t)}catch(e){return C0(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Z3e(t,e){try{return decodeURIComponent(t)}catch(r){return C0(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function py(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Y3e(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ka(t):t;return{pathname:r?r.startsWith("/")?r:Q3e(r,e):e,search:e8e(n),hash:t8e(i)}}function Q3e(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function b4(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function dP(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function NV(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Ka(t):(i=Lr({},t),Dt(!i.pathname||!i.pathname.includes("?"),b4("?","pathname","search",i)),Dt(!i.pathname||!i.pathname.includes("#"),b4("#","pathname","hash",i)),Dt(!i.search||!i.search.includes("#"),b4("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,f;if(s==null)f=r;else if(n){let v=e[e.length-1].replace(/^\//,"").split("/");if(s.startsWith("..")){let A=s.split("/");for(;A[0]==="..";)A.shift(),v.pop();i.pathname=A.join("/")}f="/"+v.join("/")}else{let v=e.length-1;if(s.startsWith("..")){let A=s.split("/");for(;A[0]==="..";)A.shift(),v-=1;i.pathname=A.join("/")}f=v>=0?e[v]:"/"}let d=Y3e(i,f),p=s&&s!=="/"&&s.endsWith("/"),b=(o||s===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(p||b)&&(d.pathname+="/"),d}const d0=t=>t.join("/").replace(/\/\/+/g,"/"),X3e=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),e8e=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,t8e=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class hP{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function LV(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const DV=["post","put","patch","delete"],r8e=new Set(DV),n8e=["get",...DV],i8e=new Set(n8e),o8e=new Set([301,302,303,307,308]),s8e=new Set([307,308]),y4={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},a8e={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},em={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},FV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,f8e=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),$V="remix-router-transitions";function c8e(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!r;Dt(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let le=t.detectErrorBoundary;i=re=>({hasErrorBoundary:le(re)})}else i=f8e;let o={},s=pE(t.routes,i,void 0,o),f,d=t.basename||"/",p=Lr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_prependBasename:!1},t.future),b=null,v=new Set,A=null,_=null,S=null,P=t.hydrationData!=null,I=kd(s,t.history.location,d),C=null;if(I==null){let le=To(404,{pathname:t.history.location.pathname}),{matches:re,route:ae}=hB(s);I=re,C={[ae.id]:le}}let T=!I.some(le=>le.route.lazy)&&(!I.some(le=>le.route.loader)||t.hydrationData!=null),O,B={historyAction:t.history.action,location:t.history.location,matches:I,initialized:T,navigation:y4,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||C,fetchers:new Map,blockers:new Map},D=jr.Pop,U=!1,K,Y=!1,W=new Map,ie=null,x=!1,a=!1,u=[],l=[],h=new Map,m=0,w=-1,E=new Map,y=new Set,c=new Map,g=new Map,M=new Set,k=new Map,L=new Map,R=!1;function F(){if(b=t.history.listen(le=>{let{action:re,location:ae,delta:Ue}=le;if(R){R=!1;return}C0(L.size===0||Ue!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let de=we({currentLocation:B.location,nextLocation:ae,historyAction:re});if(de&&Ue!=null){R=!0,t.history.go(Ue*-1),ne(de,{state:"blocked",location:ae,proceed(){ne(de,{state:"proceeding",proceed:void 0,reset:void 0,location:ae}),t.history.go(Ue)},reset(){let Ae=new Map(B.blockers);Ae.set(de,em),q({blockers:Ae})}});return}return ee(re,ae)}),r){w8e(e,W);let le=()=>x8e(e,W);e.addEventListener("pagehide",le),ie=()=>e.removeEventListener("pagehide",le)}return B.initialized||ee(jr.Pop,B.location),O}function z(){b&&b(),ie&&ie(),v.clear(),K&&K.abort(),B.fetchers.forEach((le,re)=>Te(re)),B.blockers.forEach((le,re)=>me(re))}function V(le){return v.add(le),()=>v.delete(le)}function q(le,re){re===void 0&&(re={}),B=Lr({},B,le);let ae=[],Ue=[];p.v7_fetcherPersist&&B.fetchers.forEach((de,Ae)=>{de.state==="idle"&&(M.has(Ae)?Ue.push(Ae):ae.push(Ae))}),[...v].forEach(de=>de(B,{deletedFetchers:Ue,unstable_viewTransitionOpts:re.viewTransitionOpts,unstable_flushSync:re.flushSync===!0})),p.v7_fetcherPersist&&(ae.forEach(de=>B.fetchers.delete(de)),Ue.forEach(de=>Te(de)))}function Q(le,re,ae){var Ue,de;let{flushSync:Ae}=ae===void 0?{}:ae,We=B.actionData!=null&&B.navigation.formMethod!=null&&Cs(B.navigation.formMethod)&&B.navigation.state==="loading"&&((Ue=le.state)==null?void 0:Ue._isRedirect)!==!0,pe;re.actionData?Object.keys(re.actionData).length>0?pe=re.actionData:pe=null:We?pe=B.actionData:pe=null;let ge=re.loaderData?dB(B.loaderData,re.loaderData,re.matches||[],re.errors):B.loaderData,Ze=B.blockers;Ze.size>0&&(Ze=new Map(Ze),Ze.forEach((rt,xe)=>Ze.set(xe,em)));let Me=U===!0||B.navigation.formMethod!=null&&Cs(B.navigation.formMethod)&&((de=le.state)==null?void 0:de._isRedirect)!==!0;f&&(s=f,f=void 0),x||D===jr.Pop||(D===jr.Push?t.history.push(le,le.state):D===jr.Replace&&t.history.replace(le,le.state));let Se;if(D===jr.Pop){let rt=W.get(B.location.pathname);rt&&rt.has(le.pathname)?Se={currentLocation:B.location,nextLocation:le}:W.has(le.pathname)&&(Se={currentLocation:le,nextLocation:B.location})}else if(Y){let rt=W.get(B.location.pathname);rt?rt.add(le.pathname):(rt=new Set([le.pathname]),W.set(B.location.pathname,rt)),Se={currentLocation:B.location,nextLocation:le}}q(Lr({},re,{actionData:pe,loaderData:ge,historyAction:D,location:le,initialized:!0,navigation:y4,revalidation:"idle",restoreScrollPosition:ke(le,re.matches||B.matches),preventScrollReset:Me,blockers:Ze}),{viewTransitionOpts:Se,flushSync:Ae===!0}),D=jr.Pop,U=!1,Y=!1,x=!1,a=!1,u=[],l=[]}async function G(le,re){if(typeof le=="number"){t.history.go(le);return}let ae=mE(B.location,B.matches,d,p.v7_prependBasename,le,re==null?void 0:re.fromRouteId,re==null?void 0:re.relative),{path:Ue,submission:de,error:Ae}=sB(p.v7_normalizeFormMethod,!1,ae,re),We=B.location,pe=Lg(B.location,Ue,re&&re.state);pe=Lr({},pe,t.history.encodeLocation(pe));let ge=re&&re.replace!=null?re.replace:void 0,Ze=jr.Push;ge===!0?Ze=jr.Replace:ge===!1||de!=null&&Cs(de.formMethod)&&de.formAction===B.location.pathname+B.location.search&&(Ze=jr.Replace);let Me=re&&"preventScrollReset"in re?re.preventScrollReset===!0:void 0,Se=(re&&re.unstable_flushSync)===!0,rt=we({currentLocation:We,nextLocation:pe,historyAction:Ze});if(rt){ne(rt,{state:"blocked",location:pe,proceed(){ne(rt,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),G(le,re)},reset(){let xe=new Map(B.blockers);xe.set(rt,em),q({blockers:xe})}});return}return await ee(Ze,pe,{submission:de,pendingError:Ae,preventScrollReset:Me,replace:re&&re.replace,enableViewTransition:re&&re.unstable_viewTransition,flushSync:Se})}function H(){if(Ee(),q({revalidation:"loading"}),B.navigation.state!=="submitting"){if(B.navigation.state==="idle"){ee(B.historyAction,B.location,{startUninterruptedRevalidation:!0});return}ee(D||B.historyAction,B.navigation.location,{overrideNavigation:B.navigation})}}async function ee(le,re,ae){K&&K.abort(),K=null,D=le,x=(ae&&ae.startUninterruptedRevalidation)===!0,Qe(B.location,B.matches),U=(ae&&ae.preventScrollReset)===!0,Y=(ae&&ae.enableViewTransition)===!0;let Ue=f||s,de=ae&&ae.overrideNavigation,Ae=kd(Ue,re,d),We=(ae&&ae.flushSync)===!0;if(!Ae){let xe=To(404,{pathname:re.pathname}),{matches:Be,route:gt}=hB(Ue);tt(),Q(re,{matches:Be,loaderData:{},errors:{[gt.id]:xe}},{flushSync:We});return}if(B.initialized&&!a&&p8e(B.location,re)&&!(ae&&ae.submission&&Cs(ae.submission.formMethod))){Q(re,{matches:Ae},{flushSync:We});return}K=new AbortController;let pe=rm(t.history,re,K.signal,ae&&ae.submission),ge,Ze;if(ae&&ae.pendingError)Ze={[jm(Ae).route.id]:ae.pendingError};else if(ae&&ae.submission&&Cs(ae.submission.formMethod)){let xe=await ue(pe,re,ae.submission,Ae,{replace:ae.replace,flushSync:We});if(xe.shortCircuited)return;ge=xe.pendingActionData,Ze=xe.pendingActionError,de=v4(re,ae.submission),We=!1,pe=new Request(pe.url,{signal:pe.signal})}let{shortCircuited:Me,loaderData:Se,errors:rt}=await fe(pe,re,Ae,de,ae&&ae.submission,ae&&ae.fetcherSubmission,ae&&ae.replace,We,ge,Ze);Me||(K=null,Q(re,Lr({matches:Ae},ge?{actionData:ge}:{},{loaderData:Se,errors:rt})))}async function ue(le,re,ae,Ue,de){de===void 0&&(de={}),Ee();let Ae=y8e(re,ae);q({navigation:Ae},{flushSync:de.flushSync===!0});let We,pe=bE(Ue,re);if(!pe.route.action&&!pe.route.lazy)We={type:Hr.error,error:To(405,{method:le.method,pathname:re.pathname,routeId:pe.route.id})};else if(We=await tm("action",le,pe,Ue,o,i,d),le.signal.aborted)return{shortCircuited:!0};if(nh(We)){let ge;return de&&de.replace!=null?ge=de.replace:ge=We.location===B.location.pathname+B.location.search,await oe(B,We,{submission:ae,replace:ge}),{shortCircuited:!0}}if(Hm(We)){let ge=jm(Ue,pe.route.id);return(de&&de.replace)!==!0&&(D=jr.Push),{pendingActionData:{},pendingActionError:{[ge.route.id]:We.error}}}if(pu(We))throw To(400,{type:"defer-action"});return{pendingActionData:{[pe.route.id]:We.data}}}async function fe(le,re,ae,Ue,de,Ae,We,pe,ge,Ze){let Me=Ue||v4(re,de),Se=de||Ae||gB(Me),rt=f||s,[xe,Be]=aB(t.history,B,ae,Se,re,a,u,l,M,c,y,rt,d,ge,Ze);if(tt(ct=>!(ae&&ae.some(St=>St.route.id===ct))||xe&&xe.some(St=>St.route.id===ct)),w=++m,xe.length===0&&Be.length===0){let ct=$();return Q(re,Lr({matches:ae,loaderData:{},errors:Ze||null},ge?{actionData:ge}:{},ct?{fetchers:new Map(B.fetchers)}:{}),{flushSync:pe}),{shortCircuited:!0}}if(!x){Be.forEach(St=>{let vt=B.fetchers.get(St.key),zt=nm(void 0,vt?vt.data:void 0);B.fetchers.set(St.key,zt)});let ct=ge||B.actionData;q(Lr({navigation:Me},ct?Object.keys(ct).length===0?{actionData:null}:{actionData:ct}:{},Be.length>0?{fetchers:new Map(B.fetchers)}:{}),{flushSync:pe})}Be.forEach(ct=>{h.has(ct.key)&&j(ct.key),ct.controller&&h.set(ct.key,ct.controller)});let gt=()=>Be.forEach(ct=>j(ct.key));K&&K.signal.addEventListener("abort",gt);let{results:Re,loaderResults:De,fetcherResults:wt}=await Xe(B.matches,ae,xe,Be,le);if(le.signal.aborted)return{shortCircuited:!0};K&&K.signal.removeEventListener("abort",gt),Be.forEach(ct=>h.delete(ct.key));let Ce=pB(Re);if(Ce){if(Ce.idx>=xe.length){let ct=Be[Ce.idx-xe.length].key;y.add(ct)}return await oe(B,Ce.result,{replace:We}),{shortCircuited:!0}}let{loaderData:Le,errors:bt}=lB(B,ae,xe,De,Ze,Be,wt,k);k.forEach((ct,St)=>{ct.subscribe(vt=>{(vt||ct.done)&&k.delete(St)})});let yt=$(),Ot=J(w),kt=yt||Ot||Be.length>0;return Lr({loaderData:Le,errors:bt},kt?{fetchers:new Map(B.fetchers)}:{})}function he(le,re,ae,Ue){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");h.has(le)&&j(le);let de=(Ue&&Ue.unstable_flushSync)===!0,Ae=f||s,We=mE(B.location,B.matches,d,p.v7_prependBasename,ae,re,Ue==null?void 0:Ue.relative),pe=kd(Ae,We,d);if(!pe){it(le,re,To(404,{pathname:We}),{flushSync:de});return}let{path:ge,submission:Ze,error:Me}=sB(p.v7_normalizeFormMethod,!0,We,Ue);if(Me){it(le,re,Me,{flushSync:de});return}let Se=bE(pe,ge);if(U=(Ue&&Ue.preventScrollReset)===!0,Ze&&Cs(Ze.formMethod)){He(le,re,ge,Se,pe,de,Ze);return}c.set(le,{routeId:re,path:ge}),be(le,re,ge,Se,pe,de,Ze)}async function He(le,re,ae,Ue,de,Ae,We){if(Ee(),c.delete(le),!Ue.route.action&&!Ue.route.lazy){let vt=To(405,{method:We.formMethod,pathname:ae,routeId:re});it(le,re,vt,{flushSync:Ae});return}let pe=B.fetchers.get(le);ye(le,v8e(We,pe),{flushSync:Ae});let ge=new AbortController,Ze=rm(t.history,ae,ge.signal,We);h.set(le,ge);let Me=m,Se=await tm("action",Ze,Ue,de,o,i,d);if(Ze.signal.aborted){h.get(le)===ge&&h.delete(le);return}if(M.has(le)){ye(le,Ec(void 0));return}if(nh(Se))if(h.delete(le),w>Me){ye(le,Ec(void 0));return}else return y.add(le),ye(le,nm(We)),oe(B,Se,{fetcherSubmission:We});if(Hm(Se)){it(le,re,Se.error);return}if(pu(Se))throw To(400,{type:"defer-action"});let rt=B.navigation.location||B.location,xe=rm(t.history,rt,ge.signal),Be=f||s,gt=B.navigation.state!=="idle"?kd(Be,B.navigation.location,d):B.matches;Dt(gt,"Didn't find any matches after fetcher action");let Re=++m;E.set(le,Re);let De=nm(We,Se.data);B.fetchers.set(le,De);let[wt,Ce]=aB(t.history,B,gt,We,rt,a,u,l,M,c,y,Be,d,{[Ue.route.id]:Se.data},void 0);Ce.filter(vt=>vt.key!==le).forEach(vt=>{let zt=vt.key,Yt=B.fetchers.get(zt),Xt=nm(void 0,Yt?Yt.data:void 0);B.fetchers.set(zt,Xt),h.has(zt)&&j(zt),vt.controller&&h.set(zt,vt.controller)}),q({fetchers:new Map(B.fetchers)});let Le=()=>Ce.forEach(vt=>j(vt.key));ge.signal.addEventListener("abort",Le);let{results:bt,loaderResults:yt,fetcherResults:Ot}=await Xe(B.matches,gt,wt,Ce,xe);if(ge.signal.aborted)return;ge.signal.removeEventListener("abort",Le),E.delete(le),h.delete(le),Ce.forEach(vt=>h.delete(vt.key));let kt=pB(bt);if(kt){if(kt.idx>=wt.length){let vt=Ce[kt.idx-wt.length].key;y.add(vt)}return oe(B,kt.result)}let{loaderData:ct,errors:St}=lB(B,B.matches,wt,yt,void 0,Ce,Ot,k);if(B.fetchers.has(le)){let vt=Ec(Se.data);B.fetchers.set(le,vt)}J(Re),B.navigation.state==="loading"&&Re>w?(Dt(D,"Expected pending action"),K&&K.abort(),Q(B.navigation.location,{matches:gt,loaderData:ct,errors:St,fetchers:new Map(B.fetchers)})):(q({errors:St,loaderData:dB(B.loaderData,ct,gt,St),fetchers:new Map(B.fetchers)}),a=!1)}async function be(le,re,ae,Ue,de,Ae,We){let pe=B.fetchers.get(le);ye(le,nm(We,pe?pe.data:void 0),{flushSync:Ae});let ge=new AbortController,Ze=rm(t.history,ae,ge.signal);h.set(le,ge);let Me=m,Se=await tm("loader",Ze,Ue,de,o,i,d);if(pu(Se)&&(Se=await jV(Se,Ze.signal,!0)||Se),h.get(le)===ge&&h.delete(le),!Ze.signal.aborted){if(M.has(le)){ye(le,Ec(void 0));return}if(nh(Se))if(w>Me){ye(le,Ec(void 0));return}else{y.add(le),await oe(B,Se);return}if(Hm(Se)){it(le,re,Se.error);return}Dt(!pu(Se),"Unhandled fetcher deferred data"),ye(le,Ec(Se.data))}}async function oe(le,re,ae){let{submission:Ue,fetcherSubmission:de,replace:Ae}=ae===void 0?{}:ae;re.revalidate&&(a=!0);let We=Lg(le.location,re.location,{_isRedirect:!0});if(Dt(We,"Expected a location on the redirect navigation"),r){let rt=!1;if(re.reloadDocument)rt=!0;else if(FV.test(re.location)){const xe=t.history.createURL(re.location);rt=xe.origin!==e.location.origin||py(xe.pathname,d)==null}if(rt){Ae?e.location.replace(re.location):e.location.assign(re.location);return}}K=null;let pe=Ae===!0?jr.Replace:jr.Push,{formMethod:ge,formAction:Ze,formEncType:Me}=le.navigation;!Ue&&!de&&ge&&Ze&&Me&&(Ue=gB(le.navigation));let Se=Ue||de;if(s8e.has(re.status)&&Se&&Cs(Se.formMethod))await ee(pe,We,{submission:Lr({},Se,{formAction:re.location}),preventScrollReset:U});else{let rt=v4(We,Ue);await ee(pe,We,{overrideNavigation:rt,fetcherSubmission:de,preventScrollReset:U})}}async function Xe(le,re,ae,Ue,de){let Ae=await Promise.all([...ae.map(ge=>tm("loader",de,ge,re,o,i,d)),...Ue.map(ge=>ge.matches&&ge.match&&ge.controller?tm("loader",rm(t.history,ge.path,ge.controller.signal),ge.match,ge.matches,o,i,d):{type:Hr.error,error:To(404,{pathname:ge.path})})]),We=Ae.slice(0,ae.length),pe=Ae.slice(ae.length);return await Promise.all([mB(le,ae,We,We.map(()=>de.signal),!1,B.loaderData),mB(le,Ue.map(ge=>ge.match),pe,Ue.map(ge=>ge.controller?ge.controller.signal:null),!0)]),{results:Ae,loaderResults:We,fetcherResults:pe}}function Ee(){a=!0,u.push(...tt()),c.forEach((le,re)=>{h.has(re)&&(l.push(re),j(re))})}function ye(le,re,ae){ae===void 0&&(ae={}),B.fetchers.set(le,re),q({fetchers:new Map(B.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function it(le,re,ae,Ue){Ue===void 0&&(Ue={});let de=jm(B.matches,re);Te(le),q({errors:{[de.route.id]:ae},fetchers:new Map(B.fetchers)},{flushSync:(Ue&&Ue.flushSync)===!0})}function Pe(le){return p.v7_fetcherPersist&&(g.set(le,(g.get(le)||0)+1),M.has(le)&&M.delete(le)),B.fetchers.get(le)||a8e}function Te(le){let re=B.fetchers.get(le);h.has(le)&&!(re&&re.state==="loading"&&E.has(le))&&j(le),c.delete(le),E.delete(le),y.delete(le),M.delete(le),B.fetchers.delete(le)}function lt(le){if(p.v7_fetcherPersist){let re=(g.get(le)||0)-1;re<=0?(g.delete(le),M.add(le)):g.set(le,re)}else Te(le);q({fetchers:new Map(B.fetchers)})}function j(le){let re=h.get(le);Dt(re,"Expected fetch controller: "+le),re.abort(),h.delete(le)}function N(le){for(let re of le){let ae=Pe(re),Ue=Ec(ae.data);B.fetchers.set(re,Ue)}}function $(){let le=[],re=!1;for(let ae of y){let Ue=B.fetchers.get(ae);Dt(Ue,"Expected fetcher: "+ae),Ue.state==="loading"&&(y.delete(ae),le.push(ae),re=!0)}return N(le),re}function J(le){let re=[];for(let[ae,Ue]of E)if(Ue0}function te(le,re){let ae=B.blockers.get(le)||em;return L.get(le)!==re&&L.set(le,re),ae}function me(le){B.blockers.delete(le),L.delete(le)}function ne(le,re){let ae=B.blockers.get(le)||em;Dt(ae.state==="unblocked"&&re.state==="blocked"||ae.state==="blocked"&&re.state==="blocked"||ae.state==="blocked"&&re.state==="proceeding"||ae.state==="blocked"&&re.state==="unblocked"||ae.state==="proceeding"&&re.state==="unblocked","Invalid blocker state transition: "+ae.state+" -> "+re.state);let Ue=new Map(B.blockers);Ue.set(le,re),q({blockers:Ue})}function we(le){let{currentLocation:re,nextLocation:ae,historyAction:Ue}=le;if(L.size===0)return;L.size>1&&C0(!1,"A router only supports one blocker at a time");let de=Array.from(L.entries()),[Ae,We]=de[de.length-1],pe=B.blockers.get(Ae);if(!(pe&&pe.state==="proceeding")&&We({currentLocation:re,nextLocation:ae,historyAction:Ue}))return Ae}function tt(le){let re=[];return k.forEach((ae,Ue)=>{(!le||le(Ue))&&(ae.cancel(),re.push(Ue),k.delete(Ue))}),re}function ve(le,re,ae){if(A=le,S=re,_=ae||null,!P&&B.navigation===y4){P=!0;let Ue=ke(B.location,B.matches);Ue!=null&&q({restoreScrollPosition:Ue})}return()=>{A=null,S=null,_=null}}function Ie(le,re){return _&&_(le,re.map(Ue=>L3e(Ue,B.loaderData)))||le.key}function Qe(le,re){if(A&&S){let ae=Ie(le,re);A[ae]=S()}}function ke(le,re){if(A){let ae=Ie(le,re),Ue=A[ae];if(typeof Ue=="number")return Ue}return null}function $e(le){o={},f=pE(le,i,void 0,o)}return O={get basename(){return d},get state(){return B},get routes(){return s},get window(){return e},initialize:F,subscribe:V,enableScrollRestoration:ve,navigate:G,fetch:he,revalidate:H,createHref:le=>t.history.createHref(le),encodeLocation:le=>t.history.encodeLocation(le),getFetcher:Pe,deleteFetcher:lt,dispose:z,getBlocker:te,deleteBlocker:me,_internalFetchControllers:h,_internalActiveDeferreds:k,_internalSetRoutes:$e},O}function u8e(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function mE(t,e,r,n,i,o,s){let f,d;if(o){f=[];for(let b of e)if(f.push(b),b.route.id===o){d=b;break}}else f=e,d=e[e.length-1];let p=NV(i||".",dP(f).map(b=>b.pathnameBase),py(t.pathname,r)||t.pathname,s==="path");return i==null&&(p.search=t.search,p.hash=t.hash),(i==null||i===""||i===".")&&d&&d.route.index&&!pP(p.search)&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(p.pathname=p.pathname==="/"?r:d0([r,p.pathname])),hy(p)}function sB(t,e,r,n){if(!n||!u8e(n))return{path:r};if(n.formMethod&&!b8e(n.formMethod))return{path:r,error:To(405,{method:n.formMethod})};let i=()=>({path:r,error:To(400,{type:"invalid-body"})}),o=n.formMethod||"get",s=t?o.toUpperCase():o.toLowerCase(),f=zV(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Cs(s))return i();let A=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((_,S)=>{let[P,I]=S;return""+_+P+"="+I+` -`},""):String(n.body);return{path:r,submission:{formMethod:s,formAction:f,formEncType:n.formEncType,formData:void 0,json:void 0,text:A}}}else if(n.formEncType==="application/json"){if(!Cs(s))return i();try{let A=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:s,formAction:f,formEncType:n.formEncType,formData:void 0,json:A,text:void 0}}}catch{return i()}}}Dt(typeof FormData=="function","FormData is not available in this environment");let d,p;if(n.formData)d=gE(n.formData),p=n.formData;else if(n.body instanceof FormData)d=gE(n.body),p=n.body;else if(n.body instanceof URLSearchParams)d=n.body,p=uB(d);else if(n.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(n.body),p=uB(d)}catch{return i()}let b={formMethod:s,formAction:f,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Cs(b.formMethod))return{path:r,submission:b};let v=Ka(r);return e&&v.search&&pP(v.search)&&d.append("index",""),v.search="?"+d,{path:hy(v),submission:b}}function l8e(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function aB(t,e,r,n,i,o,s,f,d,p,b,v,A,_,S){let P=S?Object.values(S)[0]:_?Object.values(_)[0]:void 0,I=t.createURL(e.location),C=t.createURL(i),T=S?Object.keys(S)[0]:void 0,B=l8e(r,T).filter((U,K)=>{if(U.route.lazy)return!0;if(U.route.loader==null)return!1;if(d8e(e.loaderData,e.matches[K],U)||s.some(ie=>ie===U.route.id))return!0;let Y=e.matches[K],W=U;return fB(U,Lr({currentUrl:I,currentParams:Y.params,nextUrl:C,nextParams:W.params},n,{actionResult:P,defaultShouldRevalidate:o||I.pathname+I.search===C.pathname+C.search||I.search!==C.search||UV(Y,W)}))}),D=[];return p.forEach((U,K)=>{if(!r.some(a=>a.route.id===U.routeId)||d.has(K))return;let Y=kd(v,U.path,A);if(!Y){D.push({key:K,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let W=e.fetchers.get(K),ie=bE(Y,U.path),x=!1;b.has(K)?x=!1:f.includes(K)?x=!0:W&&W.state!=="idle"&&W.data===void 0?x=o:x=fB(ie,Lr({currentUrl:I,currentParams:e.matches[e.matches.length-1].params,nextUrl:C,nextParams:r[r.length-1].params},n,{actionResult:P,defaultShouldRevalidate:o})),x&&D.push({key:K,routeId:U.routeId,path:U.path,matches:Y,match:ie,controller:new AbortController})}),[B,D]}function d8e(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function UV(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function fB(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function cB(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let i=r[t.id];Dt(i,"No route found in manifest");let o={};for(let s in n){let d=i[s]!==void 0&&s!=="hasErrorBoundary";C0(!d,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!d&&!O3e.has(s)&&(o[s]=n[s])}Object.assign(i,o),Object.assign(i,Lr({},e(i),{lazy:void 0}))}async function tm(t,e,r,n,i,o,s,f){f===void 0&&(f={});let d,p,b,v=S=>{let P,I=new Promise((C,T)=>P=T);return b=()=>P(),e.signal.addEventListener("abort",b),Promise.race([S({request:e,params:r.params,context:f.requestContext}),I])};try{let S=r.route[t];if(r.route.lazy)if(S){let P,I=await Promise.all([v(S).catch(C=>{P=C}),cB(r.route,o,i)]);if(P)throw P;p=I[0]}else if(await cB(r.route,o,i),S=r.route[t],S)p=await v(S);else if(t==="action"){let P=new URL(e.url),I=P.pathname+P.search;throw To(405,{method:e.method,pathname:I,routeId:r.route.id})}else return{type:Hr.data,data:void 0};else if(S)p=await v(S);else{let P=new URL(e.url),I=P.pathname+P.search;throw To(404,{pathname:I})}Dt(p!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(S){d=Hr.error,p=S}finally{b&&e.signal.removeEventListener("abort",b)}if(g8e(p)){let S=p.status;if(o8e.has(S)){let C=p.headers.get("Location");if(Dt(C,"Redirects returned/thrown from loaders/actions must have a Location header"),!FV.test(C))C=mE(new URL(e.url),n.slice(0,n.indexOf(r)+1),s,!0,C);else if(!f.isStaticRequest){let T=new URL(e.url),O=C.startsWith("//")?new URL(T.protocol+C):new URL(C),B=py(O.pathname,s)!=null;O.origin===T.origin&&B&&(C=O.pathname+O.search+O.hash)}if(f.isStaticRequest)throw p.headers.set("Location",C),p;return{type:Hr.redirect,status:S,location:C,revalidate:p.headers.get("X-Remix-Revalidate")!==null,reloadDocument:p.headers.get("X-Remix-Reload-Document")!==null}}if(f.isRouteRequest)throw{type:d===Hr.error?Hr.error:Hr.data,response:p};let P,I=p.headers.get("Content-Type");return I&&/\bapplication\/json\b/.test(I)?P=await p.json():P=await p.text(),d===Hr.error?{type:d,error:new hP(S,p.statusText,P),headers:p.headers}:{type:Hr.data,data:P,statusCode:p.status,headers:p.headers}}if(d===Hr.error)return{type:d,error:p};if(m8e(p)){var A,_;return{type:Hr.deferred,deferredData:p,statusCode:(A=p.init)==null?void 0:A.status,headers:((_=p.init)==null?void 0:_.headers)&&new Headers(p.init.headers)}}return{type:Hr.data,data:p}}function rm(t,e,r,n){let i=t.createURL(zV(e)).toString(),o={signal:r};if(n&&Cs(n.formMethod)){let{formMethod:s,formEncType:f}=n;o.method=s.toUpperCase(),f==="application/json"?(o.headers=new Headers({"Content-Type":f}),o.body=JSON.stringify(n.json)):f==="text/plain"?o.body=n.text:f==="application/x-www-form-urlencoded"&&n.formData?o.body=gE(n.formData):o.body=n.formData}return new Request(i,o)}function gE(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function uB(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function h8e(t,e,r,n,i){let o={},s=null,f,d=!1,p={};return r.forEach((b,v)=>{let A=e[v].route.id;if(Dt(!nh(b),"Cannot handle redirect results in processLoaderData"),Hm(b)){let _=jm(t,A),S=b.error;n&&(S=Object.values(n)[0],n=void 0),s=s||{},s[_.route.id]==null&&(s[_.route.id]=S),o[A]=void 0,d||(d=!0,f=LV(b.error)?b.error.status:500),b.headers&&(p[A]=b.headers)}else pu(b)?(i.set(A,b.deferredData),o[A]=b.deferredData.data):o[A]=b.data,b.statusCode!=null&&b.statusCode!==200&&!d&&(f=b.statusCode),b.headers&&(p[A]=b.headers)}),n&&(s=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:s,statusCode:f||200,loaderHeaders:p}}function lB(t,e,r,n,i,o,s,f){let{loaderData:d,errors:p}=h8e(e,r,n,i,f);for(let b=0;bn.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function hB(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function To(t,e){let{pathname:r,routeId:n,method:i,type:o}=e===void 0?{}:e,s="Unknown Server Error",f="Unknown @remix-run/router error";return t===400?(s="Bad Request",i&&r&&n?f="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?f="defer() is not supported in actions":o==="invalid-body"&&(f="Unable to encode submission body")):t===403?(s="Forbidden",f='Route "'+n+'" does not match URL "'+r+'"'):t===404?(s="Not Found",f='No route matches URL "'+r+'"'):t===405&&(s="Method Not Allowed",i&&r&&n?f="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(f='Invalid request method "'+i.toUpperCase()+'"')),new hP(t||500,s,new Error(f),!0)}function pB(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(nh(r))return{result:r,idx:e}}}function zV(t){let e=typeof t=="string"?Ka(t):t;return hy(Lr({},e,{hash:""}))}function p8e(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function pu(t){return t.type===Hr.deferred}function Hm(t){return t.type===Hr.error}function nh(t){return(t&&t.type)===Hr.redirect}function m8e(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function g8e(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function b8e(t){return i8e.has(t.toLowerCase())}function Cs(t){return r8e.has(t.toLowerCase())}async function mB(t,e,r,n,i,o){for(let s=0;sv.route.id===d.route.id),b=p!=null&&!UV(p,d)&&(o&&o[d.route.id])!==void 0;if(pu(f)&&(i||b)){let v=n[s];Dt(v,"Expected an AbortSignal for revalidating fetcher deferred result"),await jV(f,v,i).then(A=>{A&&(r[s]=A||r[s])})}}}async function jV(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:Hr.data,data:t.deferredData.unwrappedData}}catch(i){return{type:Hr.error,error:i}}return{type:Hr.data,data:t.deferredData.data}}}function pP(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function bE(t,e){let r=typeof e=="string"?Ka(e).search:e.search;if(t[t.length-1].route.index&&pP(r||""))return t[t.length-1];let n=dP(t);return n[n.length-1]}function gB(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:o,json:s}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:s,text:void 0}}}function v4(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function y8e(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function nm(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function v8e(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ec(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function w8e(t,e){try{let r=t.sessionStorage.getItem($V);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function x8e(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem($V,JSON.stringify(r))}catch(n){C0(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + */function Lr(){return Lr=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function C0(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function k3e(){return Math.random().toString(36).substr(2,8)}function iB(t,e){return{usr:t.state,key:t.key,idx:e}}function Dg(t,e,r,n){return r===void 0&&(r=null),Lr({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ka(e):e,{state:r,key:e&&e.key||n||k3e()})}function hy(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ka(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function B3e(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,s=i.history,f=jr.Pop,d=null,p=b();p==null&&(p=0,s.replaceState(Lr({},s.state,{idx:p}),""));function b(){return(s.state||{idx:null}).idx}function v(){f=jr.Pop;let I=b(),C=I==null?null:I-p;p=I,d&&d({action:f,location:P.location,delta:C})}function A(I,C){f=jr.Push;let T=Dg(P.location,I,C);r&&r(T,I),p=b()+1;let k=iB(T,p),O=P.createHref(T);try{s.pushState(k,"",O)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;i.location.assign(O)}o&&d&&d({action:f,location:P.location,delta:1})}function _(I,C){f=jr.Replace;let T=Dg(P.location,I,C);r&&r(T,I),p=b();let k=iB(T,p),O=P.createHref(T);s.replaceState(k,"",O),o&&d&&d({action:f,location:P.location,delta:0})}function S(I){let C=i.location.origin!=="null"?i.location.origin:i.location.href,T=typeof I=="string"?I:hy(I);return Dt(C,"No window.location.(origin|href) available to create URL for href: "+T),new URL(T,C)}let P={get action(){return f},get location(){return t(i,s)},listen(I){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(nB,v),d=I,()=>{i.removeEventListener(nB,v),d=null}},createHref(I){return e(i,I)},createURL:S,encodeLocation(I){let C=S(I);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:A,replace:_,go(I){return s.go(I)}};return P}var Hr;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Hr||(Hr={}));const O3e=new Set(["lazy","caseSensitive","path","id","index","children"]);function N3e(t){return t.index===!0}function pE(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((i,o)=>{let s=[...r,o],f=typeof i.id=="string"?i.id:s.join("-");if(Dt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Dt(!n[f],'Found a route id collision on id "'+f+`". Route id's must be globally unique within Data Router usages`),N3e(i)){let d=Lr({},i,e(i),{id:f});return n[f]=d,d}else{let d=Lr({},i,e(i),{id:f,children:void 0});return n[f]=d,i.children&&(d.children=pE(i.children,e,s,n)),d}})}function kd(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Ka(e):e,i=py(n.pathname||"/",r);if(i==null)return null;let o=BV(t);D3e(o);let s=null;for(let f=0;s==null&&f{let d={relativePath:f===void 0?o.path||"":f,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};d.relativePath.startsWith("/")&&(Dt(d.relativePath.startsWith(n),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(n.length));let p=d0([n,d.relativePath]),b=r.concat(d);o.children&&o.children.length>0&&(Dt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),BV(o.children,e,b,p)),!(o.path==null&&!o.index)&&e.push({path:p,score:q3e(p,o.index),routesMeta:b})};return t.forEach((o,s)=>{var f;if(o.path===""||!((f=o.path)!=null&&f.includes("?")))i(o,s);else for(let d of OV(o.path))i(o,s,d)}),e}function OV(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let s=OV(n.join("/")),f=[];return f.push(...s.map(d=>d===""?o:[o,d].join("/"))),i&&f.push(...s),f.map(d=>t.startsWith("/")&&d===""?"/":d)}function D3e(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:G3e(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const F3e=/^:\w+$/,$3e=3,U3e=2,z3e=1,j3e=10,H3e=-2,oB=t=>t==="*";function q3e(t,e){let r=t.split("/"),n=r.length;return r.some(oB)&&(n+=H3e),e&&(n+=U3e),r.filter(i=>!oB(i)).reduce((i,o)=>i+(F3e.test(o)?$3e:o===""?z3e:j3e),n)}function G3e(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function V3e(t,e){let{routesMeta:r}=t,n={},i="/",o=[];for(let s=0;s{let{paramName:A,isOptional:_}=b;if(A==="*"){let P=f[v]||"";s=o.slice(0,o.length-P.length).replace(/(.)\/+$/,"$1")}const S=f[v];return _&&!S?p[A]=void 0:p[A]=Z3e(S||"",A),p},{}),pathname:o,pathnameBase:s,pattern:t}}function W3e(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),C0(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(s,f,d)=>(n.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function J3e(t){try{return decodeURI(t)}catch(e){return C0(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Z3e(t,e){try{return decodeURIComponent(t)}catch(r){return C0(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function py(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Y3e(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ka(t):t;return{pathname:r?r.startsWith("/")?r:Q3e(r,e):e,search:e8e(n),hash:t8e(i)}}function Q3e(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function b4(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function dP(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function NV(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Ka(t):(i=Lr({},t),Dt(!i.pathname||!i.pathname.includes("?"),b4("?","pathname","search",i)),Dt(!i.pathname||!i.pathname.includes("#"),b4("#","pathname","hash",i)),Dt(!i.search||!i.search.includes("#"),b4("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,f;if(s==null)f=r;else if(n){let v=e[e.length-1].replace(/^\//,"").split("/");if(s.startsWith("..")){let A=s.split("/");for(;A[0]==="..";)A.shift(),v.pop();i.pathname=A.join("/")}f="/"+v.join("/")}else{let v=e.length-1;if(s.startsWith("..")){let A=s.split("/");for(;A[0]==="..";)A.shift(),v-=1;i.pathname=A.join("/")}f=v>=0?e[v]:"/"}let d=Y3e(i,f),p=s&&s!=="/"&&s.endsWith("/"),b=(o||s===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(p||b)&&(d.pathname+="/"),d}const d0=t=>t.join("/").replace(/\/\/+/g,"/"),X3e=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),e8e=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,t8e=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class hP{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function LV(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const DV=["post","put","patch","delete"],r8e=new Set(DV),n8e=["get",...DV],i8e=new Set(n8e),o8e=new Set([301,302,303,307,308]),s8e=new Set([307,308]),y4={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},a8e={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tm={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},FV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,f8e=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),$V="remix-router-transitions";function c8e(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!r;Dt(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let le=t.detectErrorBoundary;i=re=>({hasErrorBoundary:le(re)})}else i=f8e;let o={},s=pE(t.routes,i,void 0,o),f,d=t.basename||"/",p=Lr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_prependBasename:!1},t.future),b=null,v=new Set,A=null,_=null,S=null,P=t.hydrationData!=null,I=kd(s,t.history.location,d),C=null;if(I==null){let le=To(404,{pathname:t.history.location.pathname}),{matches:re,route:ae}=hB(s);I=re,C={[ae.id]:le}}let T=!I.some(le=>le.route.lazy)&&(!I.some(le=>le.route.loader)||t.hydrationData!=null),k,O={historyAction:t.history.action,location:t.history.location,matches:I,initialized:T,navigation:y4,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||C,fetchers:new Map,blockers:new Map},D=jr.Pop,U=!1,V,Y=!1,W=new Map,ie=null,x=!1,a=!1,u=[],l=[],h=new Map,m=0,w=-1,E=new Map,y=new Set,c=new Map,g=new Map,M=new Set,B=new Map,L=new Map,R=!1;function F(){if(b=t.history.listen(le=>{let{action:re,location:ae,delta:Ue}=le;if(R){R=!1;return}C0(L.size===0||Ue!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let de=we({currentLocation:O.location,nextLocation:ae,historyAction:re});if(de&&Ue!=null){R=!0,t.history.go(Ue*-1),ne(de,{state:"blocked",location:ae,proceed(){ne(de,{state:"proceeding",proceed:void 0,reset:void 0,location:ae}),t.history.go(Ue)},reset(){let Ae=new Map(O.blockers);Ae.set(de,tm),q({blockers:Ae})}});return}return ee(re,ae)}),r){w8e(e,W);let le=()=>x8e(e,W);e.addEventListener("pagehide",le),ie=()=>e.removeEventListener("pagehide",le)}return O.initialized||ee(jr.Pop,O.location),k}function z(){b&&b(),ie&&ie(),v.clear(),V&&V.abort(),O.fetchers.forEach((le,re)=>Te(re)),O.blockers.forEach((le,re)=>me(re))}function K(le){return v.add(le),()=>v.delete(le)}function q(le,re){re===void 0&&(re={}),O=Lr({},O,le);let ae=[],Ue=[];p.v7_fetcherPersist&&O.fetchers.forEach((de,Ae)=>{de.state==="idle"&&(M.has(Ae)?Ue.push(Ae):ae.push(Ae))}),[...v].forEach(de=>de(O,{deletedFetchers:Ue,unstable_viewTransitionOpts:re.viewTransitionOpts,unstable_flushSync:re.flushSync===!0})),p.v7_fetcherPersist&&(ae.forEach(de=>O.fetchers.delete(de)),Ue.forEach(de=>Te(de)))}function Q(le,re,ae){var Ue,de;let{flushSync:Ae}=ae===void 0?{}:ae,We=O.actionData!=null&&O.navigation.formMethod!=null&&Cs(O.navigation.formMethod)&&O.navigation.state==="loading"&&((Ue=le.state)==null?void 0:Ue._isRedirect)!==!0,pe;re.actionData?Object.keys(re.actionData).length>0?pe=re.actionData:pe=null:We?pe=O.actionData:pe=null;let ge=re.loaderData?dB(O.loaderData,re.loaderData,re.matches||[],re.errors):O.loaderData,Ze=O.blockers;Ze.size>0&&(Ze=new Map(Ze),Ze.forEach((rt,xe)=>Ze.set(xe,tm)));let Me=U===!0||O.navigation.formMethod!=null&&Cs(O.navigation.formMethod)&&((de=le.state)==null?void 0:de._isRedirect)!==!0;f&&(s=f,f=void 0),x||D===jr.Pop||(D===jr.Push?t.history.push(le,le.state):D===jr.Replace&&t.history.replace(le,le.state));let Se;if(D===jr.Pop){let rt=W.get(O.location.pathname);rt&&rt.has(le.pathname)?Se={currentLocation:O.location,nextLocation:le}:W.has(le.pathname)&&(Se={currentLocation:le,nextLocation:O.location})}else if(Y){let rt=W.get(O.location.pathname);rt?rt.add(le.pathname):(rt=new Set([le.pathname]),W.set(O.location.pathname,rt)),Se={currentLocation:O.location,nextLocation:le}}q(Lr({},re,{actionData:pe,loaderData:ge,historyAction:D,location:le,initialized:!0,navigation:y4,revalidation:"idle",restoreScrollPosition:ke(le,re.matches||O.matches),preventScrollReset:Me,blockers:Ze}),{viewTransitionOpts:Se,flushSync:Ae===!0}),D=jr.Pop,U=!1,Y=!1,x=!1,a=!1,u=[],l=[]}async function G(le,re){if(typeof le=="number"){t.history.go(le);return}let ae=mE(O.location,O.matches,d,p.v7_prependBasename,le,re==null?void 0:re.fromRouteId,re==null?void 0:re.relative),{path:Ue,submission:de,error:Ae}=sB(p.v7_normalizeFormMethod,!1,ae,re),We=O.location,pe=Dg(O.location,Ue,re&&re.state);pe=Lr({},pe,t.history.encodeLocation(pe));let ge=re&&re.replace!=null?re.replace:void 0,Ze=jr.Push;ge===!0?Ze=jr.Replace:ge===!1||de!=null&&Cs(de.formMethod)&&de.formAction===O.location.pathname+O.location.search&&(Ze=jr.Replace);let Me=re&&"preventScrollReset"in re?re.preventScrollReset===!0:void 0,Se=(re&&re.unstable_flushSync)===!0,rt=we({currentLocation:We,nextLocation:pe,historyAction:Ze});if(rt){ne(rt,{state:"blocked",location:pe,proceed(){ne(rt,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),G(le,re)},reset(){let xe=new Map(O.blockers);xe.set(rt,tm),q({blockers:xe})}});return}return await ee(Ze,pe,{submission:de,pendingError:Ae,preventScrollReset:Me,replace:re&&re.replace,enableViewTransition:re&&re.unstable_viewTransition,flushSync:Se})}function H(){if(Ee(),q({revalidation:"loading"}),O.navigation.state!=="submitting"){if(O.navigation.state==="idle"){ee(O.historyAction,O.location,{startUninterruptedRevalidation:!0});return}ee(D||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation})}}async function ee(le,re,ae){V&&V.abort(),V=null,D=le,x=(ae&&ae.startUninterruptedRevalidation)===!0,Qe(O.location,O.matches),U=(ae&&ae.preventScrollReset)===!0,Y=(ae&&ae.enableViewTransition)===!0;let Ue=f||s,de=ae&&ae.overrideNavigation,Ae=kd(Ue,re,d),We=(ae&&ae.flushSync)===!0;if(!Ae){let xe=To(404,{pathname:re.pathname}),{matches:Be,route:gt}=hB(Ue);tt(),Q(re,{matches:Be,loaderData:{},errors:{[gt.id]:xe}},{flushSync:We});return}if(O.initialized&&!a&&p8e(O.location,re)&&!(ae&&ae.submission&&Cs(ae.submission.formMethod))){Q(re,{matches:Ae},{flushSync:We});return}V=new AbortController;let pe=nm(t.history,re,V.signal,ae&&ae.submission),ge,Ze;if(ae&&ae.pendingError)Ze={[Hm(Ae).route.id]:ae.pendingError};else if(ae&&ae.submission&&Cs(ae.submission.formMethod)){let xe=await ue(pe,re,ae.submission,Ae,{replace:ae.replace,flushSync:We});if(xe.shortCircuited)return;ge=xe.pendingActionData,Ze=xe.pendingActionError,de=v4(re,ae.submission),We=!1,pe=new Request(pe.url,{signal:pe.signal})}let{shortCircuited:Me,loaderData:Se,errors:rt}=await fe(pe,re,Ae,de,ae&&ae.submission,ae&&ae.fetcherSubmission,ae&&ae.replace,We,ge,Ze);Me||(V=null,Q(re,Lr({matches:Ae},ge?{actionData:ge}:{},{loaderData:Se,errors:rt})))}async function ue(le,re,ae,Ue,de){de===void 0&&(de={}),Ee();let Ae=y8e(re,ae);q({navigation:Ae},{flushSync:de.flushSync===!0});let We,pe=bE(Ue,re);if(!pe.route.action&&!pe.route.lazy)We={type:Hr.error,error:To(405,{method:le.method,pathname:re.pathname,routeId:pe.route.id})};else if(We=await rm("action",le,pe,Ue,o,i,d),le.signal.aborted)return{shortCircuited:!0};if(nh(We)){let ge;return de&&de.replace!=null?ge=de.replace:ge=We.location===O.location.pathname+O.location.search,await oe(O,We,{submission:ae,replace:ge}),{shortCircuited:!0}}if(qm(We)){let ge=Hm(Ue,pe.route.id);return(de&&de.replace)!==!0&&(D=jr.Push),{pendingActionData:{},pendingActionError:{[ge.route.id]:We.error}}}if(pu(We))throw To(400,{type:"defer-action"});return{pendingActionData:{[pe.route.id]:We.data}}}async function fe(le,re,ae,Ue,de,Ae,We,pe,ge,Ze){let Me=Ue||v4(re,de),Se=de||Ae||gB(Me),rt=f||s,[xe,Be]=aB(t.history,O,ae,Se,re,a,u,l,M,c,y,rt,d,ge,Ze);if(tt(ct=>!(ae&&ae.some(St=>St.route.id===ct))||xe&&xe.some(St=>St.route.id===ct)),w=++m,xe.length===0&&Be.length===0){let ct=$();return Q(re,Lr({matches:ae,loaderData:{},errors:Ze||null},ge?{actionData:ge}:{},ct?{fetchers:new Map(O.fetchers)}:{}),{flushSync:pe}),{shortCircuited:!0}}if(!x){Be.forEach(St=>{let vt=O.fetchers.get(St.key),zt=im(void 0,vt?vt.data:void 0);O.fetchers.set(St.key,zt)});let ct=ge||O.actionData;q(Lr({navigation:Me},ct?Object.keys(ct).length===0?{actionData:null}:{actionData:ct}:{},Be.length>0?{fetchers:new Map(O.fetchers)}:{}),{flushSync:pe})}Be.forEach(ct=>{h.has(ct.key)&&j(ct.key),ct.controller&&h.set(ct.key,ct.controller)});let gt=()=>Be.forEach(ct=>j(ct.key));V&&V.signal.addEventListener("abort",gt);let{results:Re,loaderResults:De,fetcherResults:wt}=await Xe(O.matches,ae,xe,Be,le);if(le.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",gt),Be.forEach(ct=>h.delete(ct.key));let Ce=pB(Re);if(Ce){if(Ce.idx>=xe.length){let ct=Be[Ce.idx-xe.length].key;y.add(ct)}return await oe(O,Ce.result,{replace:We}),{shortCircuited:!0}}let{loaderData:Le,errors:bt}=lB(O,ae,xe,De,Ze,Be,wt,B);B.forEach((ct,St)=>{ct.subscribe(vt=>{(vt||ct.done)&&B.delete(St)})});let yt=$(),Ot=J(w),kt=yt||Ot||Be.length>0;return Lr({loaderData:Le,errors:bt},kt?{fetchers:new Map(O.fetchers)}:{})}function he(le,re,ae,Ue){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");h.has(le)&&j(le);let de=(Ue&&Ue.unstable_flushSync)===!0,Ae=f||s,We=mE(O.location,O.matches,d,p.v7_prependBasename,ae,re,Ue==null?void 0:Ue.relative),pe=kd(Ae,We,d);if(!pe){it(le,re,To(404,{pathname:We}),{flushSync:de});return}let{path:ge,submission:Ze,error:Me}=sB(p.v7_normalizeFormMethod,!0,We,Ue);if(Me){it(le,re,Me,{flushSync:de});return}let Se=bE(pe,ge);if(U=(Ue&&Ue.preventScrollReset)===!0,Ze&&Cs(Ze.formMethod)){He(le,re,ge,Se,pe,de,Ze);return}c.set(le,{routeId:re,path:ge}),be(le,re,ge,Se,pe,de,Ze)}async function He(le,re,ae,Ue,de,Ae,We){if(Ee(),c.delete(le),!Ue.route.action&&!Ue.route.lazy){let vt=To(405,{method:We.formMethod,pathname:ae,routeId:re});it(le,re,vt,{flushSync:Ae});return}let pe=O.fetchers.get(le);ye(le,v8e(We,pe),{flushSync:Ae});let ge=new AbortController,Ze=nm(t.history,ae,ge.signal,We);h.set(le,ge);let Me=m,Se=await rm("action",Ze,Ue,de,o,i,d);if(Ze.signal.aborted){h.get(le)===ge&&h.delete(le);return}if(M.has(le)){ye(le,Ec(void 0));return}if(nh(Se))if(h.delete(le),w>Me){ye(le,Ec(void 0));return}else return y.add(le),ye(le,im(We)),oe(O,Se,{fetcherSubmission:We});if(qm(Se)){it(le,re,Se.error);return}if(pu(Se))throw To(400,{type:"defer-action"});let rt=O.navigation.location||O.location,xe=nm(t.history,rt,ge.signal),Be=f||s,gt=O.navigation.state!=="idle"?kd(Be,O.navigation.location,d):O.matches;Dt(gt,"Didn't find any matches after fetcher action");let Re=++m;E.set(le,Re);let De=im(We,Se.data);O.fetchers.set(le,De);let[wt,Ce]=aB(t.history,O,gt,We,rt,a,u,l,M,c,y,Be,d,{[Ue.route.id]:Se.data},void 0);Ce.filter(vt=>vt.key!==le).forEach(vt=>{let zt=vt.key,Yt=O.fetchers.get(zt),Xt=im(void 0,Yt?Yt.data:void 0);O.fetchers.set(zt,Xt),h.has(zt)&&j(zt),vt.controller&&h.set(zt,vt.controller)}),q({fetchers:new Map(O.fetchers)});let Le=()=>Ce.forEach(vt=>j(vt.key));ge.signal.addEventListener("abort",Le);let{results:bt,loaderResults:yt,fetcherResults:Ot}=await Xe(O.matches,gt,wt,Ce,xe);if(ge.signal.aborted)return;ge.signal.removeEventListener("abort",Le),E.delete(le),h.delete(le),Ce.forEach(vt=>h.delete(vt.key));let kt=pB(bt);if(kt){if(kt.idx>=wt.length){let vt=Ce[kt.idx-wt.length].key;y.add(vt)}return oe(O,kt.result)}let{loaderData:ct,errors:St}=lB(O,O.matches,wt,yt,void 0,Ce,Ot,B);if(O.fetchers.has(le)){let vt=Ec(Se.data);O.fetchers.set(le,vt)}J(Re),O.navigation.state==="loading"&&Re>w?(Dt(D,"Expected pending action"),V&&V.abort(),Q(O.navigation.location,{matches:gt,loaderData:ct,errors:St,fetchers:new Map(O.fetchers)})):(q({errors:St,loaderData:dB(O.loaderData,ct,gt,St),fetchers:new Map(O.fetchers)}),a=!1)}async function be(le,re,ae,Ue,de,Ae,We){let pe=O.fetchers.get(le);ye(le,im(We,pe?pe.data:void 0),{flushSync:Ae});let ge=new AbortController,Ze=nm(t.history,ae,ge.signal);h.set(le,ge);let Me=m,Se=await rm("loader",Ze,Ue,de,o,i,d);if(pu(Se)&&(Se=await jV(Se,Ze.signal,!0)||Se),h.get(le)===ge&&h.delete(le),!Ze.signal.aborted){if(M.has(le)){ye(le,Ec(void 0));return}if(nh(Se))if(w>Me){ye(le,Ec(void 0));return}else{y.add(le),await oe(O,Se);return}if(qm(Se)){it(le,re,Se.error);return}Dt(!pu(Se),"Unhandled fetcher deferred data"),ye(le,Ec(Se.data))}}async function oe(le,re,ae){let{submission:Ue,fetcherSubmission:de,replace:Ae}=ae===void 0?{}:ae;re.revalidate&&(a=!0);let We=Dg(le.location,re.location,{_isRedirect:!0});if(Dt(We,"Expected a location on the redirect navigation"),r){let rt=!1;if(re.reloadDocument)rt=!0;else if(FV.test(re.location)){const xe=t.history.createURL(re.location);rt=xe.origin!==e.location.origin||py(xe.pathname,d)==null}if(rt){Ae?e.location.replace(re.location):e.location.assign(re.location);return}}V=null;let pe=Ae===!0?jr.Replace:jr.Push,{formMethod:ge,formAction:Ze,formEncType:Me}=le.navigation;!Ue&&!de&&ge&&Ze&&Me&&(Ue=gB(le.navigation));let Se=Ue||de;if(s8e.has(re.status)&&Se&&Cs(Se.formMethod))await ee(pe,We,{submission:Lr({},Se,{formAction:re.location}),preventScrollReset:U});else{let rt=v4(We,Ue);await ee(pe,We,{overrideNavigation:rt,fetcherSubmission:de,preventScrollReset:U})}}async function Xe(le,re,ae,Ue,de){let Ae=await Promise.all([...ae.map(ge=>rm("loader",de,ge,re,o,i,d)),...Ue.map(ge=>ge.matches&&ge.match&&ge.controller?rm("loader",nm(t.history,ge.path,ge.controller.signal),ge.match,ge.matches,o,i,d):{type:Hr.error,error:To(404,{pathname:ge.path})})]),We=Ae.slice(0,ae.length),pe=Ae.slice(ae.length);return await Promise.all([mB(le,ae,We,We.map(()=>de.signal),!1,O.loaderData),mB(le,Ue.map(ge=>ge.match),pe,Ue.map(ge=>ge.controller?ge.controller.signal:null),!0)]),{results:Ae,loaderResults:We,fetcherResults:pe}}function Ee(){a=!0,u.push(...tt()),c.forEach((le,re)=>{h.has(re)&&(l.push(re),j(re))})}function ye(le,re,ae){ae===void 0&&(ae={}),O.fetchers.set(le,re),q({fetchers:new Map(O.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function it(le,re,ae,Ue){Ue===void 0&&(Ue={});let de=Hm(O.matches,re);Te(le),q({errors:{[de.route.id]:ae},fetchers:new Map(O.fetchers)},{flushSync:(Ue&&Ue.flushSync)===!0})}function Pe(le){return p.v7_fetcherPersist&&(g.set(le,(g.get(le)||0)+1),M.has(le)&&M.delete(le)),O.fetchers.get(le)||a8e}function Te(le){let re=O.fetchers.get(le);h.has(le)&&!(re&&re.state==="loading"&&E.has(le))&&j(le),c.delete(le),E.delete(le),y.delete(le),M.delete(le),O.fetchers.delete(le)}function lt(le){if(p.v7_fetcherPersist){let re=(g.get(le)||0)-1;re<=0?(g.delete(le),M.add(le)):g.set(le,re)}else Te(le);q({fetchers:new Map(O.fetchers)})}function j(le){let re=h.get(le);Dt(re,"Expected fetch controller: "+le),re.abort(),h.delete(le)}function N(le){for(let re of le){let ae=Pe(re),Ue=Ec(ae.data);O.fetchers.set(re,Ue)}}function $(){let le=[],re=!1;for(let ae of y){let Ue=O.fetchers.get(ae);Dt(Ue,"Expected fetcher: "+ae),Ue.state==="loading"&&(y.delete(ae),le.push(ae),re=!0)}return N(le),re}function J(le){let re=[];for(let[ae,Ue]of E)if(Ue0}function te(le,re){let ae=O.blockers.get(le)||tm;return L.get(le)!==re&&L.set(le,re),ae}function me(le){O.blockers.delete(le),L.delete(le)}function ne(le,re){let ae=O.blockers.get(le)||tm;Dt(ae.state==="unblocked"&&re.state==="blocked"||ae.state==="blocked"&&re.state==="blocked"||ae.state==="blocked"&&re.state==="proceeding"||ae.state==="blocked"&&re.state==="unblocked"||ae.state==="proceeding"&&re.state==="unblocked","Invalid blocker state transition: "+ae.state+" -> "+re.state);let Ue=new Map(O.blockers);Ue.set(le,re),q({blockers:Ue})}function we(le){let{currentLocation:re,nextLocation:ae,historyAction:Ue}=le;if(L.size===0)return;L.size>1&&C0(!1,"A router only supports one blocker at a time");let de=Array.from(L.entries()),[Ae,We]=de[de.length-1],pe=O.blockers.get(Ae);if(!(pe&&pe.state==="proceeding")&&We({currentLocation:re,nextLocation:ae,historyAction:Ue}))return Ae}function tt(le){let re=[];return B.forEach((ae,Ue)=>{(!le||le(Ue))&&(ae.cancel(),re.push(Ue),B.delete(Ue))}),re}function ve(le,re,ae){if(A=le,S=re,_=ae||null,!P&&O.navigation===y4){P=!0;let Ue=ke(O.location,O.matches);Ue!=null&&q({restoreScrollPosition:Ue})}return()=>{A=null,S=null,_=null}}function Ie(le,re){return _&&_(le,re.map(Ue=>L3e(Ue,O.loaderData)))||le.key}function Qe(le,re){if(A&&S){let ae=Ie(le,re);A[ae]=S()}}function ke(le,re){if(A){let ae=Ie(le,re),Ue=A[ae];if(typeof Ue=="number")return Ue}return null}function $e(le){o={},f=pE(le,i,void 0,o)}return k={get basename(){return d},get state(){return O},get routes(){return s},get window(){return e},initialize:F,subscribe:K,enableScrollRestoration:ve,navigate:G,fetch:he,revalidate:H,createHref:le=>t.history.createHref(le),encodeLocation:le=>t.history.encodeLocation(le),getFetcher:Pe,deleteFetcher:lt,dispose:z,getBlocker:te,deleteBlocker:me,_internalFetchControllers:h,_internalActiveDeferreds:B,_internalSetRoutes:$e},k}function u8e(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function mE(t,e,r,n,i,o,s){let f,d;if(o){f=[];for(let b of e)if(f.push(b),b.route.id===o){d=b;break}}else f=e,d=e[e.length-1];let p=NV(i||".",dP(f).map(b=>b.pathnameBase),py(t.pathname,r)||t.pathname,s==="path");return i==null&&(p.search=t.search,p.hash=t.hash),(i==null||i===""||i===".")&&d&&d.route.index&&!pP(p.search)&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(p.pathname=p.pathname==="/"?r:d0([r,p.pathname])),hy(p)}function sB(t,e,r,n){if(!n||!u8e(n))return{path:r};if(n.formMethod&&!b8e(n.formMethod))return{path:r,error:To(405,{method:n.formMethod})};let i=()=>({path:r,error:To(400,{type:"invalid-body"})}),o=n.formMethod||"get",s=t?o.toUpperCase():o.toLowerCase(),f=zV(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Cs(s))return i();let A=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((_,S)=>{let[P,I]=S;return""+_+P+"="+I+` +`},""):String(n.body);return{path:r,submission:{formMethod:s,formAction:f,formEncType:n.formEncType,formData:void 0,json:void 0,text:A}}}else if(n.formEncType==="application/json"){if(!Cs(s))return i();try{let A=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:s,formAction:f,formEncType:n.formEncType,formData:void 0,json:A,text:void 0}}}catch{return i()}}}Dt(typeof FormData=="function","FormData is not available in this environment");let d,p;if(n.formData)d=gE(n.formData),p=n.formData;else if(n.body instanceof FormData)d=gE(n.body),p=n.body;else if(n.body instanceof URLSearchParams)d=n.body,p=uB(d);else if(n.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(n.body),p=uB(d)}catch{return i()}let b={formMethod:s,formAction:f,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Cs(b.formMethod))return{path:r,submission:b};let v=Ka(r);return e&&v.search&&pP(v.search)&&d.append("index",""),v.search="?"+d,{path:hy(v),submission:b}}function l8e(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function aB(t,e,r,n,i,o,s,f,d,p,b,v,A,_,S){let P=S?Object.values(S)[0]:_?Object.values(_)[0]:void 0,I=t.createURL(e.location),C=t.createURL(i),T=S?Object.keys(S)[0]:void 0,O=l8e(r,T).filter((U,V)=>{if(U.route.lazy)return!0;if(U.route.loader==null)return!1;if(d8e(e.loaderData,e.matches[V],U)||s.some(ie=>ie===U.route.id))return!0;let Y=e.matches[V],W=U;return fB(U,Lr({currentUrl:I,currentParams:Y.params,nextUrl:C,nextParams:W.params},n,{actionResult:P,defaultShouldRevalidate:o||I.pathname+I.search===C.pathname+C.search||I.search!==C.search||UV(Y,W)}))}),D=[];return p.forEach((U,V)=>{if(!r.some(a=>a.route.id===U.routeId)||d.has(V))return;let Y=kd(v,U.path,A);if(!Y){D.push({key:V,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let W=e.fetchers.get(V),ie=bE(Y,U.path),x=!1;b.has(V)?x=!1:f.includes(V)?x=!0:W&&W.state!=="idle"&&W.data===void 0?x=o:x=fB(ie,Lr({currentUrl:I,currentParams:e.matches[e.matches.length-1].params,nextUrl:C,nextParams:r[r.length-1].params},n,{actionResult:P,defaultShouldRevalidate:o})),x&&D.push({key:V,routeId:U.routeId,path:U.path,matches:Y,match:ie,controller:new AbortController})}),[O,D]}function d8e(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function UV(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function fB(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function cB(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let i=r[t.id];Dt(i,"No route found in manifest");let o={};for(let s in n){let d=i[s]!==void 0&&s!=="hasErrorBoundary";C0(!d,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!d&&!O3e.has(s)&&(o[s]=n[s])}Object.assign(i,o),Object.assign(i,Lr({},e(i),{lazy:void 0}))}async function rm(t,e,r,n,i,o,s,f){f===void 0&&(f={});let d,p,b,v=S=>{let P,I=new Promise((C,T)=>P=T);return b=()=>P(),e.signal.addEventListener("abort",b),Promise.race([S({request:e,params:r.params,context:f.requestContext}),I])};try{let S=r.route[t];if(r.route.lazy)if(S){let P,I=await Promise.all([v(S).catch(C=>{P=C}),cB(r.route,o,i)]);if(P)throw P;p=I[0]}else if(await cB(r.route,o,i),S=r.route[t],S)p=await v(S);else if(t==="action"){let P=new URL(e.url),I=P.pathname+P.search;throw To(405,{method:e.method,pathname:I,routeId:r.route.id})}else return{type:Hr.data,data:void 0};else if(S)p=await v(S);else{let P=new URL(e.url),I=P.pathname+P.search;throw To(404,{pathname:I})}Dt(p!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(S){d=Hr.error,p=S}finally{b&&e.signal.removeEventListener("abort",b)}if(g8e(p)){let S=p.status;if(o8e.has(S)){let C=p.headers.get("Location");if(Dt(C,"Redirects returned/thrown from loaders/actions must have a Location header"),!FV.test(C))C=mE(new URL(e.url),n.slice(0,n.indexOf(r)+1),s,!0,C);else if(!f.isStaticRequest){let T=new URL(e.url),k=C.startsWith("//")?new URL(T.protocol+C):new URL(C),O=py(k.pathname,s)!=null;k.origin===T.origin&&O&&(C=k.pathname+k.search+k.hash)}if(f.isStaticRequest)throw p.headers.set("Location",C),p;return{type:Hr.redirect,status:S,location:C,revalidate:p.headers.get("X-Remix-Revalidate")!==null,reloadDocument:p.headers.get("X-Remix-Reload-Document")!==null}}if(f.isRouteRequest)throw{type:d===Hr.error?Hr.error:Hr.data,response:p};let P,I=p.headers.get("Content-Type");return I&&/\bapplication\/json\b/.test(I)?P=await p.json():P=await p.text(),d===Hr.error?{type:d,error:new hP(S,p.statusText,P),headers:p.headers}:{type:Hr.data,data:P,statusCode:p.status,headers:p.headers}}if(d===Hr.error)return{type:d,error:p};if(m8e(p)){var A,_;return{type:Hr.deferred,deferredData:p,statusCode:(A=p.init)==null?void 0:A.status,headers:((_=p.init)==null?void 0:_.headers)&&new Headers(p.init.headers)}}return{type:Hr.data,data:p}}function nm(t,e,r,n){let i=t.createURL(zV(e)).toString(),o={signal:r};if(n&&Cs(n.formMethod)){let{formMethod:s,formEncType:f}=n;o.method=s.toUpperCase(),f==="application/json"?(o.headers=new Headers({"Content-Type":f}),o.body=JSON.stringify(n.json)):f==="text/plain"?o.body=n.text:f==="application/x-www-form-urlencoded"&&n.formData?o.body=gE(n.formData):o.body=n.formData}return new Request(i,o)}function gE(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function uB(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function h8e(t,e,r,n,i){let o={},s=null,f,d=!1,p={};return r.forEach((b,v)=>{let A=e[v].route.id;if(Dt(!nh(b),"Cannot handle redirect results in processLoaderData"),qm(b)){let _=Hm(t,A),S=b.error;n&&(S=Object.values(n)[0],n=void 0),s=s||{},s[_.route.id]==null&&(s[_.route.id]=S),o[A]=void 0,d||(d=!0,f=LV(b.error)?b.error.status:500),b.headers&&(p[A]=b.headers)}else pu(b)?(i.set(A,b.deferredData),o[A]=b.deferredData.data):o[A]=b.data,b.statusCode!=null&&b.statusCode!==200&&!d&&(f=b.statusCode),b.headers&&(p[A]=b.headers)}),n&&(s=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:s,statusCode:f||200,loaderHeaders:p}}function lB(t,e,r,n,i,o,s,f){let{loaderData:d,errors:p}=h8e(e,r,n,i,f);for(let b=0;bn.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function hB(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function To(t,e){let{pathname:r,routeId:n,method:i,type:o}=e===void 0?{}:e,s="Unknown Server Error",f="Unknown @remix-run/router error";return t===400?(s="Bad Request",i&&r&&n?f="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?f="defer() is not supported in actions":o==="invalid-body"&&(f="Unable to encode submission body")):t===403?(s="Forbidden",f='Route "'+n+'" does not match URL "'+r+'"'):t===404?(s="Not Found",f='No route matches URL "'+r+'"'):t===405&&(s="Method Not Allowed",i&&r&&n?f="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(f='Invalid request method "'+i.toUpperCase()+'"')),new hP(t||500,s,new Error(f),!0)}function pB(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(nh(r))return{result:r,idx:e}}}function zV(t){let e=typeof t=="string"?Ka(t):t;return hy(Lr({},e,{hash:""}))}function p8e(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function pu(t){return t.type===Hr.deferred}function qm(t){return t.type===Hr.error}function nh(t){return(t&&t.type)===Hr.redirect}function m8e(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function g8e(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function b8e(t){return i8e.has(t.toLowerCase())}function Cs(t){return r8e.has(t.toLowerCase())}async function mB(t,e,r,n,i,o){for(let s=0;sv.route.id===d.route.id),b=p!=null&&!UV(p,d)&&(o&&o[d.route.id])!==void 0;if(pu(f)&&(i||b)){let v=n[s];Dt(v,"Expected an AbortSignal for revalidating fetcher deferred result"),await jV(f,v,i).then(A=>{A&&(r[s]=A||r[s])})}}}async function jV(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:Hr.data,data:t.deferredData.unwrappedData}}catch(i){return{type:Hr.error,error:i}}return{type:Hr.data,data:t.deferredData.data}}}function pP(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function bE(t,e){let r=typeof e=="string"?Ka(e).search:e.search;if(t[t.length-1].route.index&&pP(r||""))return t[t.length-1];let n=dP(t);return n[n.length-1]}function gB(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:o,json:s}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:s,text:void 0}}}function v4(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function y8e(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function im(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function v8e(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ec(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function w8e(t,e){try{let r=t.sessionStorage.getItem($V);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function x8e(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem($V,JSON.stringify(r))}catch(n){C0(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** * React Router v6.20.1 * * Copyright (c) Remix Software Inc. @@ -174,7 +174,7 @@ use chrome, FireFox or Internet Explorer 11`)}var sj=Bt,_R=i1,aj=sj.Buffer,fj=sj * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function J6(){return J6=Object.assign?Object.assign.bind():function(t){for(var e=1;ed.pathnameBase)),s=Z.useRef(!1);return VV(()=>{s.current=!0}),Z.useCallback(function(d,p){if(p===void 0&&(p={}),!s.current)return;if(typeof d=="number"){r.go(d);return}let b=NV(d,JSON.parse(o),i,p.relative==="path");t==null&&e!=="/"&&(b.pathname=b.pathname==="/"?e:d0([e,b.pathname])),(p.replace?r.replace:r.push)(b,p.state,p)},[e,r,o,i,t])}function S8e(t,e,r){Vx()||Dt(!1);let{navigator:n}=Z.useContext(qx),{matches:i}=Z.useContext(M1),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let f=o?o.pathnameBase:"/";o&&o.route;let d=GV(),p;if(e){var b;let P=typeof e=="string"?Ka(e):e;f==="/"||(b=P.pathname)!=null&&b.startsWith(f)||Dt(!1),p=P}else p=d;let v=p.pathname||"/",A=f==="/"?v:v.slice(f.length)||"/",_=kd(t,{pathname:A}),S=I8e(_&&_.map(P=>Object.assign({},P,{params:Object.assign({},s,P.params),pathname:d0([f,n.encodeLocation?n.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?f:d0([f,n.encodeLocation?n.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),i,r);return e&&S?Z.createElement(Gx.Provider,{value:{location:J6({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:jr.Pop}},S):S}function M8e(){let t=B8e(),e=LV(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return Z.createElement(Z.Fragment,null,Z.createElement("h2",null,"Unexpected Application Error!"),Z.createElement("h3",{style:{fontStyle:"italic"}},e),r?Z.createElement("pre",{style:i},r):null,o)}const _8e=Z.createElement(M8e,null);class P8e extends Z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?Z.createElement(M1.Provider,{value:this.props.routeContext},Z.createElement(qV.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function C8e(t){let{routeContext:e,match:r,children:n}=t,i=Z.useContext(Hx);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),Z.createElement(M1.Provider,{value:e},n)}function I8e(t,e,r){var n;if(e===void 0&&(e=[]),r===void 0&&(r=null),t==null){var i;if((i=r)!=null&&i.errors)t=r.matches;else return null}let o=t,s=(n=r)==null?void 0:n.errors;if(s!=null){let f=o.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id]));f>=0||Dt(!1),o=o.slice(0,Math.min(o.length,f+1))}return o.reduceRight((f,d,p)=>{let b=d.route.id?s==null?void 0:s[d.route.id]:null,v=null;r&&(v=d.route.errorElement||_8e);let A=e.concat(o.slice(0,p+1)),_=()=>{let S;return b?S=v:d.route.Component?S=Z.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=f,Z.createElement(C8e,{match:d,routeContext:{outlet:f,matches:A,isDataRoute:r!=null},children:S})};return r&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?Z.createElement(P8e,{location:r.location,revalidation:r.revalidation,component:v,error:b,children:_(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):_()},null)}var KV=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(KV||{}),Z6=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Z6||{});function T8e(t){let e=Z.useContext(Hx);return e||Dt(!1),e}function R8e(t){let e=Z.useContext(HV);return e||Dt(!1),e}function k8e(t){let e=Z.useContext(M1);return e||Dt(!1),e}function WV(t){let e=k8e(),r=e.matches[e.matches.length-1];return r.route.id||Dt(!1),r.route.id}function B8e(){var t;let e=Z.useContext(qV),r=R8e(Z6.UseRouteError),n=WV(Z6.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}function O8e(){let{router:t}=T8e(KV.UseNavigateStable),e=WV(Z6.UseNavigateStable),r=Z.useRef(!1);return VV(()=>{r.current=!0}),Z.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,J6({fromRouteId:e},o)))},[t,e])}function N8e(t){let{basename:e="/",children:r=null,location:n,navigationType:i=jr.Pop,navigator:o,static:s=!1}=t;Vx()&&Dt(!1);let f=e.replace(/^\/*/,"/"),d=Z.useMemo(()=>({basename:f,navigator:o,static:s}),[f,o,s]);typeof n=="string"&&(n=Ka(n));let{pathname:p="/",search:b="",hash:v="",state:A=null,key:_="default"}=n,S=Z.useMemo(()=>{let P=py(p,f);return P==null?null:{location:{pathname:P,search:b,hash:v,state:A,key:_},navigationType:i}},[f,p,b,v,A,_,i]);return S==null?null:Z.createElement(qx.Provider,{value:d},Z.createElement(Gx.Provider,{children:r,value:S}))}new Promise(()=>{});function L8e(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:Z.createElement(t.Component),Component:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:Z.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + */function J6(){return J6=Object.assign?Object.assign.bind():function(t){for(var e=1;ed.pathnameBase)),s=Z.useRef(!1);return VV(()=>{s.current=!0}),Z.useCallback(function(d,p){if(p===void 0&&(p={}),!s.current)return;if(typeof d=="number"){r.go(d);return}let b=NV(d,JSON.parse(o),i,p.relative==="path");t==null&&e!=="/"&&(b.pathname=b.pathname==="/"?e:d0([e,b.pathname])),(p.replace?r.replace:r.push)(b,p.state,p)},[e,r,o,i,t])}function S8e(t,e,r){Vx()||Dt(!1);let{navigator:n}=Z.useContext(qx),{matches:i}=Z.useContext(_1),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let f=o?o.pathnameBase:"/";o&&o.route;let d=GV(),p;if(e){var b;let P=typeof e=="string"?Ka(e):e;f==="/"||(b=P.pathname)!=null&&b.startsWith(f)||Dt(!1),p=P}else p=d;let v=p.pathname||"/",A=f==="/"?v:v.slice(f.length)||"/",_=kd(t,{pathname:A}),S=I8e(_&&_.map(P=>Object.assign({},P,{params:Object.assign({},s,P.params),pathname:d0([f,n.encodeLocation?n.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?f:d0([f,n.encodeLocation?n.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),i,r);return e&&S?Z.createElement(Gx.Provider,{value:{location:J6({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:jr.Pop}},S):S}function M8e(){let t=B8e(),e=LV(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return Z.createElement(Z.Fragment,null,Z.createElement("h2",null,"Unexpected Application Error!"),Z.createElement("h3",{style:{fontStyle:"italic"}},e),r?Z.createElement("pre",{style:i},r):null,o)}const _8e=Z.createElement(M8e,null);class P8e extends Z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?Z.createElement(_1.Provider,{value:this.props.routeContext},Z.createElement(qV.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function C8e(t){let{routeContext:e,match:r,children:n}=t,i=Z.useContext(Hx);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),Z.createElement(_1.Provider,{value:e},n)}function I8e(t,e,r){var n;if(e===void 0&&(e=[]),r===void 0&&(r=null),t==null){var i;if((i=r)!=null&&i.errors)t=r.matches;else return null}let o=t,s=(n=r)==null?void 0:n.errors;if(s!=null){let f=o.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id]));f>=0||Dt(!1),o=o.slice(0,Math.min(o.length,f+1))}return o.reduceRight((f,d,p)=>{let b=d.route.id?s==null?void 0:s[d.route.id]:null,v=null;r&&(v=d.route.errorElement||_8e);let A=e.concat(o.slice(0,p+1)),_=()=>{let S;return b?S=v:d.route.Component?S=Z.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=f,Z.createElement(C8e,{match:d,routeContext:{outlet:f,matches:A,isDataRoute:r!=null},children:S})};return r&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?Z.createElement(P8e,{location:r.location,revalidation:r.revalidation,component:v,error:b,children:_(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):_()},null)}var KV=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(KV||{}),Z6=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Z6||{});function T8e(t){let e=Z.useContext(Hx);return e||Dt(!1),e}function R8e(t){let e=Z.useContext(HV);return e||Dt(!1),e}function k8e(t){let e=Z.useContext(_1);return e||Dt(!1),e}function WV(t){let e=k8e(),r=e.matches[e.matches.length-1];return r.route.id||Dt(!1),r.route.id}function B8e(){var t;let e=Z.useContext(qV),r=R8e(Z6.UseRouteError),n=WV(Z6.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}function O8e(){let{router:t}=T8e(KV.UseNavigateStable),e=WV(Z6.UseNavigateStable),r=Z.useRef(!1);return VV(()=>{r.current=!0}),Z.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,J6({fromRouteId:e},o)))},[t,e])}function N8e(t){let{basename:e="/",children:r=null,location:n,navigationType:i=jr.Pop,navigator:o,static:s=!1}=t;Vx()&&Dt(!1);let f=e.replace(/^\/*/,"/"),d=Z.useMemo(()=>({basename:f,navigator:o,static:s}),[f,o,s]);typeof n=="string"&&(n=Ka(n));let{pathname:p="/",search:b="",hash:v="",state:A=null,key:_="default"}=n,S=Z.useMemo(()=>{let P=py(p,f);return P==null?null:{location:{pathname:P,search:b,hash:v,state:A,key:_},navigationType:i}},[f,p,b,v,A,_,i]);return S==null?null:Z.createElement(qx.Provider,{value:d},Z.createElement(Gx.Provider,{children:r,value:S}))}new Promise(()=>{});function L8e(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:Z.createElement(t.Component),Component:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:Z.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** * React Router DOM v6.20.1 * * Copyright (c) Remix Software Inc. @@ -183,12 +183,12 @@ use chrome, FireFox or Internet Explorer 11`)}var sj=Bt,_R=i1,aj=sj.Buffer,fj=sj * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Y6(){return Y6=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function V8e(t){let{fallbackElement:e,router:r,future:n}=t,[i,o]=Z.useState(r.state),[s,f]=Z.useState(),[d,p]=Z.useState({isTransitioning:!1}),[b,v]=Z.useState(),[A,_]=Z.useState(),[S,P]=Z.useState(),I=Z.useRef(new Map),{v7_startTransition:C}=n||{},T=Z.useCallback(K=>{C?q8e(K):K()},[C]),O=Z.useCallback((K,Y)=>{let{deletedFetchers:W,unstable_flushSync:ie,unstable_viewTransitionOpts:x}=Y;W.forEach(u=>I.current.delete(u)),K.fetchers.forEach((u,l)=>{u.data!==void 0&&I.current.set(l,u.data)});let a=r.window==null||typeof r.window.document.startViewTransition!="function";if(!x||a){ie?im(()=>o(K)):T(()=>o(K));return}if(ie){im(()=>{A&&(b&&b.resolve(),A.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:x.currentLocation,nextLocation:x.nextLocation})});let u=r.window.document.startViewTransition(()=>{im(()=>o(K))});u.finished.finally(()=>{im(()=>{v(void 0),_(void 0),f(void 0),p({isTransitioning:!1})})}),im(()=>_(u));return}A?(b&&b.resolve(),A.skipTransition(),P({state:K,currentLocation:x.currentLocation,nextLocation:x.nextLocation})):(f(K),p({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}))},[r.window,A,b,I,T]);Z.useLayoutEffect(()=>r.subscribe(O),[r,O]),Z.useEffect(()=>{d.isTransitioning&&!d.flushSync&&v(new G8e)},[d]),Z.useEffect(()=>{if(b&&s&&r.window){let K=s,Y=b.promise,W=r.window.document.startViewTransition(async()=>{T(()=>o(K)),await Y});W.finished.finally(()=>{v(void 0),_(void 0),f(void 0),p({isTransitioning:!1})}),_(W)}},[T,s,b,r.window]),Z.useEffect(()=>{b&&s&&i.location.key===s.location.key&&b.resolve()},[b,A,i.location,s]),Z.useEffect(()=>{!d.isTransitioning&&S&&(f(S.state),p({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),P(void 0))},[d.isTransitioning,S]);let B=Z.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:K=>r.navigate(K),push:(K,Y,W)=>r.navigate(K,{state:Y,preventScrollReset:W==null?void 0:W.preventScrollReset}),replace:(K,Y,W)=>r.navigate(K,{replace:!0,state:Y,preventScrollReset:W==null?void 0:W.preventScrollReset})}),[r]),D=r.basename||"/",U=Z.useMemo(()=>({router:r,navigator:B,static:!1,basename:D}),[r,B,D]);return Z.createElement(Z.Fragment,null,Z.createElement(Hx.Provider,{value:U},Z.createElement(HV.Provider,{value:i},Z.createElement(z8e.Provider,{value:I.current},Z.createElement(U8e.Provider,{value:d},Z.createElement(N8e,{basename:D,location:i.location,navigationType:i.historyAction,navigator:B},i.initialized?Z.createElement(K8e,{routes:r.routes,state:i}):e))))),null)}function K8e(t){let{routes:e,state:r}=t;return S8e(e,void 0,r)}var vB;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(vB||(vB={}));var wB;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(wB||(wB={}));const W8e="_homeContainer_65xox_47",J8e="_formContainer_65xox_57",Z8e="_heading_65xox_61",Y8e="_subHeading_65xox_73",Q8e="_inputContainer_65xox_78",X8e="_selectGroup_65xox_89",e4e="_btn_65xox_95",t4e="_helperText_65xox_113",r4e="_successContainer_65xox_117",n4e="_copyContainer_65xox_127",i4e="_goBack_65xox_133",o4e="_input_65xox_78",Un={homeContainer:W8e,formContainer:J8e,heading:Z8e,subHeading:Y8e,inputContainer:Q8e,selectGroup:X8e,btn:e4e,helperText:t4e,successContainer:r4e,copyContainer:n4e,goBack:i4e,input:o4e},s4e="logger/5.7.0";let xB=!1,EB=!1;const o2={debug:1,default:2,info:2,warning:3,error:4,off:5};let AB=o2.default,w4=null;function a4e(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const SB=a4e();var yE;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(yE||(yE={}));var ws;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(ws||(ws={}));const MB="0123456789abcdef";class ut{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();o2[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(AB>o2[n])&&console.log.apply(console,r)}debug(...e){this._log(ut.levels.DEBUG,e)}info(...e){this._log(ut.levels.INFO,e)}warn(...e){this._log(ut.levels.WARNING,e)}makeError(e,r,n){if(EB)return this.makeError("censored error",r,{});r||(r=ut.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(d=>{const p=n[d];try{if(p instanceof Uint8Array){let b="";for(let v=0;v>4],b+=MB[p[v]&15];i.push(d+"=Uint8Array(0x"+b+")")}else i.push(d+"="+JSON.stringify(p))}catch{i.push(d+"="+JSON.stringify(n[d].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const o=e;let s="";switch(r){case ws.NUMERIC_FAULT:{s="NUMERIC_FAULT";const d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case ws.CALL_EXCEPTION:case ws.INSUFFICIENT_FUNDS:case ws.MISSING_NEW:case ws.NONCE_EXPIRED:case ws.REPLACEMENT_UNDERPRICED:case ws.TRANSACTION_REPLACED:case ws.UNPREDICTABLE_GAS_LIMIT:s=r;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const f=new Error(e);return f.reason=o,f.code=r,Object.keys(n).forEach(function(d){f[d]=n[d]}),f}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,ut.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){SB&&this.throwError("platform missing String.prototype.normalize",ut.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:SB})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,ut.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,ut.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,ut.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",ut.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",ut.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",ut.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return w4||(w4=new ut(s4e)),w4}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",ut.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),xB){if(!e)return;this.globalLogger().throwError("error censorship permanent",ut.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}EB=!!e,xB=!!r}static setLogLevel(e){const r=o2[e.toLowerCase()];if(r==null){ut.globalLogger().warn("invalid log level - "+e);return}AB=r}static from(e){return new ut(e)}}ut.errors=ws;ut.levels=yE;const f4e="bytes/5.7.0",qr=new ut(f4e);function JV(t){return!!t.toHexString}function ih(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return ih(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function mP(t){return li(t)&&!(t.length%2)||Kx(t)}function _B(t){return typeof t=="number"&&t==t&&t%1===0}function Kx(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!_B(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function nt(t,e){if(e||(e={}),typeof t=="number"){qr.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ih(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),JV(t)&&(t=t.toHexString()),li(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":qr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;int(i)),r=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(r);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),ih(n)}function h0(t){let e=nt(t);if(e.length===0)return e;let r=0;for(;re&&qr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),ih(r)}function li(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const x4="0123456789abcdef";function At(t,e){if(e||(e={}),typeof t=="number"){qr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=x4[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),JV(t))return t.toHexString();if(li(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":qr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Kx(t)){let r="0x";for(let n=0;n>4]+x4[i&15]}return r}return qr.throwArgumentError("invalid hexlify value","value",t)}function ZV(t){if(typeof t!="string")t=At(t);else if(!li(t)||t.length%2)return null;return(t.length-2)/2}function Dg(t,e,r){return typeof t!="string"?t=At(t):(!li(t)||t.length%2)&&qr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function oh(t){let e="0x";return t.forEach(r=>{e+=At(r).substring(2)}),e}function zo(t,e){for(typeof t!="string"?t=At(t):li(t)||qr.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&qr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function my(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(mP(t)){let r=nt(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=At(r.slice(0,32)),e.s=At(r.slice(32,64))):r.length===65?(e.r=At(r.slice(0,32)),e.s=At(r.slice(32,64)),e.v=r[64]):qr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:qr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=At(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=s2(nt(e._vs),32);e._vs=At(i);const o=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=o:e.recoveryParam!==o&&qr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const s=At(i);e.s==null?e.s=s:e.s!==s&&qr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?qr.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&qr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!li(e.r)?qr.throwArgumentError("signature missing or invalid r","signature",t):e.r=zo(e.r,32),e.s==null||!li(e.s)?qr.throwArgumentError("signature missing or invalid s","signature",t):e.s=zo(e.s,32);const r=nt(e.s);r[0]>=128&&qr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=At(r);e._vs&&(li(e._vs)||qr.throwArgumentError("signature invalid _vs","signature",t),e._vs=zo(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&qr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function PB(t){return t=my(t),At(ja([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const c4e="bignumber/5.7.0";var Q6=_t.BN;const rf=new ut(c4e),E4={},CB=9007199254740991;let IB=!1;class pr{constructor(e,r){e!==E4&&rf.throwError("cannot call constructor directly; use BigNumber.from",ut.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return wi(Nt(this).fromTwos(e))}toTwos(e){return wi(Nt(this).toTwos(e))}abs(){return this._hex[0]==="-"?pr.from(this._hex.substring(1)):this}add(e){return wi(Nt(this).add(Nt(e)))}sub(e){return wi(Nt(this).sub(Nt(e)))}div(e){return pr.from(e).isZero()&&Eo("division-by-zero","div"),wi(Nt(this).div(Nt(e)))}mul(e){return wi(Nt(this).mul(Nt(e)))}mod(e){const r=Nt(e);return r.isNeg()&&Eo("division-by-zero","mod"),wi(Nt(this).umod(r))}pow(e){const r=Nt(e);return r.isNeg()&&Eo("negative-power","pow"),wi(Nt(this).pow(r))}and(e){const r=Nt(e);return(this.isNegative()||r.isNeg())&&Eo("unbound-bitwise-result","and"),wi(Nt(this).and(r))}or(e){const r=Nt(e);return(this.isNegative()||r.isNeg())&&Eo("unbound-bitwise-result","or"),wi(Nt(this).or(r))}xor(e){const r=Nt(e);return(this.isNegative()||r.isNeg())&&Eo("unbound-bitwise-result","xor"),wi(Nt(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Eo("negative-width","mask"),wi(Nt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Eo("negative-width","shl"),wi(Nt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Eo("negative-width","shr"),wi(Nt(this).shrn(e))}eq(e){return Nt(this).eq(Nt(e))}lt(e){return Nt(this).lt(Nt(e))}lte(e){return Nt(this).lte(Nt(e))}gt(e){return Nt(this).gt(Nt(e))}gte(e){return Nt(this).gte(Nt(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Nt(this).isZero()}toNumber(){try{return Nt(this).toNumber()}catch{Eo("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return rf.throwError("this platform does not support BigInt",ut.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?IB||(IB=!0,rf.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?rf.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ut.errors.UNEXPECTED_ARGUMENT,{}):rf.throwError("BigNumber.toString does not accept parameters",ut.errors.UNEXPECTED_ARGUMENT,{})),Nt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof pr)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new pr(E4,Fg(e)):e.match(/^-?[0-9]+$/)?new pr(E4,Fg(new Q6(e))):rf.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Eo("underflow","BigNumber.from",e),(e>=CB||e<=-CB)&&Eo("overflow","BigNumber.from",e),pr.from(String(e));const r=e;if(typeof r=="bigint")return pr.from(r.toString());if(Kx(r))return pr.from(At(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return pr.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(li(n)||n[0]==="-"&&li(n.substring(1))))return pr.from(n)}return rf.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Fg(t){if(typeof t!="string")return Fg(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&rf.throwArgumentError("invalid hex","value",t),t=Fg(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function wi(t){return pr.from(Fg(t))}function Nt(t){const e=pr.from(t).toHexString();return e[0]==="-"?new Q6("-"+e.substring(3),16):new Q6(e.substring(2),16)}function Eo(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),rf.throwError(t,ut.errors.NUMERIC_FAULT,n)}function u4e(t){return new Q6(t,36).toString(16)}const l4e="properties/5.7.0";var d4e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const X6=new ut(l4e);function Pt(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Bd(t){return d4e(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(o=>({key:n,value:o}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function h4e(t,e){(!t||typeof t!="object")&&X6.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||X6.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function vE(t){const e={};for(const r in t)e[r]=t[r];return e}const p4e={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function YV(t){if(t==null||p4e[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;re5(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&Pt(e,r,e5(n))}return e}return X6.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function e5(t){return m4e(t)}class QV{constructor(e){for(const r in e)this[r]=e5(e[r])}}var XV={exports:{}};(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",s=!i.JS_SHA3_NO_NODE_JS&&typeof Je.process=="object"&&Je.process.versions&&Je.process.versions.node;s?i=et:o&&(i=self);var f=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,d=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),b=[31,7936,2031616,520093696],v=[4,1024,262144,67108864],A=[1,256,65536,16777216],_=[6,1536,393216,100663296],S=[0,8,16,24],P=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],I=[224,256,384,512],C=[128,256],T=["hex","buffer","arrayBuffer","array","digest"],O={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(R){return Object.prototype.toString.call(R)==="[object Array]"}),d&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(R){return typeof R=="object"&&R.buffer&&R.buffer.constructor===ArrayBuffer});for(var B=function(R,F,z){return function(V){return new M(R,F,R).update(V)[z]()}},D=function(R,F,z){return function(V,q){return new M(R,F,q).update(V)[z]()}},U=function(R,F,z){return function(V,q,Q,G){return l["cshake"+R].update(V,q,Q,G)[z]()}},K=function(R,F,z){return function(V,q,Q,G){return l["kmac"+R].update(V,q,Q,G)[z]()}},Y=function(R,F,z,V){for(var q=0;q>5,this.byteCount=this.blockCount<<2,this.outputBlocks=z>>5,this.extraBytes=(z&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}M.prototype.update=function(R){if(this.finalized)throw new Error(r);var F,z=typeof R;if(z!=="string"){if(z==="object"){if(R===null)throw new Error(e);if(d&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!d||!ArrayBuffer.isView(R)))throw new Error(e)}else throw new Error(e);F=!0}for(var V=this.blocks,q=this.byteCount,Q=R.length,G=this.blockCount,H=0,ee=this.s,ue,fe;H>2]|=R[H]<>2]|=fe<>2]|=(192|fe>>6)<>2]|=(128|fe&63)<=57344?(V[ue>>2]|=(224|fe>>12)<>2]|=(128|fe>>6&63)<>2]|=(128|fe&63)<>2]|=(240|fe>>18)<>2]|=(128|fe>>12&63)<>2]|=(128|fe>>6&63)<>2]|=(128|fe&63)<=q){for(this.start=ue-q,this.block=V[G],ue=0;ue>8,z=R&255;z>0;)q.unshift(z),R=R>>8,z=R&255,++V;return F?q.push(V):q.unshift(V),this.update(q),q.length},M.prototype.encodeString=function(R){var F,z=typeof R;if(z!=="string"){if(z==="object"){if(R===null)throw new Error(e);if(d&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!d||!ArrayBuffer.isView(R)))throw new Error(e)}else throw new Error(e);F=!0}var V=0,q=R.length;if(F)V=q;else for(var Q=0;Q=57344?V+=3:(G=65536+((G&1023)<<10|R.charCodeAt(++Q)&1023),V+=4)}return V+=this.encode(V*8),this.update(R),V},M.prototype.bytepad=function(R,F){for(var z=this.encode(F),V=0;V>2]|=this.padding[F&3],this.lastByteIndex===this.byteCount)for(R[0]=R[z],F=1;F>4&15]+p[H&15]+p[H>>12&15]+p[H>>8&15]+p[H>>20&15]+p[H>>16&15]+p[H>>28&15]+p[H>>24&15];Q%R===0&&(L(F),q=0)}return V&&(H=F[q],G+=p[H>>4&15]+p[H&15],V>1&&(G+=p[H>>12&15]+p[H>>8&15]),V>2&&(G+=p[H>>20&15]+p[H>>16&15])),G},M.prototype.arrayBuffer=function(){this.finalize();var R=this.blockCount,F=this.s,z=this.outputBlocks,V=this.extraBytes,q=0,Q=0,G=this.outputBits>>3,H;V?H=new ArrayBuffer(z+1<<2):H=new ArrayBuffer(G);for(var ee=new Uint32Array(H);Q>8&255,G[H+2]=ee>>16&255,G[H+3]=ee>>24&255;Q%R===0&&L(F)}return V&&(H=Q<<2,ee=F[q],G[H]=ee&255,V>1&&(G[H+1]=ee>>8&255),V>2&&(G[H+2]=ee>>16&255)),G};function k(R,F,z){M.call(this,R,F,z)}k.prototype=new M,k.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var L=function(R){var F,z,V,q,Q,G,H,ee,ue,fe,he,He,be,oe,Xe,Ee,ye,it,Pe,Te,lt,j,N,$,J,te,me,ne,we,tt,ve,Ie,Qe,ke,$e,le,re,ae,Ue,de,Ae,We,pe,ge,Ze,Me,Se,rt,xe,Be,gt,Re,De,wt,Ce,Le,bt,yt,Ot,kt,ct,St,vt;for(V=0;V<48;V+=2)q=R[0]^R[10]^R[20]^R[30]^R[40],Q=R[1]^R[11]^R[21]^R[31]^R[41],G=R[2]^R[12]^R[22]^R[32]^R[42],H=R[3]^R[13]^R[23]^R[33]^R[43],ee=R[4]^R[14]^R[24]^R[34]^R[44],ue=R[5]^R[15]^R[25]^R[35]^R[45],fe=R[6]^R[16]^R[26]^R[36]^R[46],he=R[7]^R[17]^R[27]^R[37]^R[47],He=R[8]^R[18]^R[28]^R[38]^R[48],be=R[9]^R[19]^R[29]^R[39]^R[49],F=He^(G<<1|H>>>31),z=be^(H<<1|G>>>31),R[0]^=F,R[1]^=z,R[10]^=F,R[11]^=z,R[20]^=F,R[21]^=z,R[30]^=F,R[31]^=z,R[40]^=F,R[41]^=z,F=q^(ee<<1|ue>>>31),z=Q^(ue<<1|ee>>>31),R[2]^=F,R[3]^=z,R[12]^=F,R[13]^=z,R[22]^=F,R[23]^=z,R[32]^=F,R[33]^=z,R[42]^=F,R[43]^=z,F=G^(fe<<1|he>>>31),z=H^(he<<1|fe>>>31),R[4]^=F,R[5]^=z,R[14]^=F,R[15]^=z,R[24]^=F,R[25]^=z,R[34]^=F,R[35]^=z,R[44]^=F,R[45]^=z,F=ee^(He<<1|be>>>31),z=ue^(be<<1|He>>>31),R[6]^=F,R[7]^=z,R[16]^=F,R[17]^=z,R[26]^=F,R[27]^=z,R[36]^=F,R[37]^=z,R[46]^=F,R[47]^=z,F=fe^(q<<1|Q>>>31),z=he^(Q<<1|q>>>31),R[8]^=F,R[9]^=z,R[18]^=F,R[19]^=z,R[28]^=F,R[29]^=z,R[38]^=F,R[39]^=z,R[48]^=F,R[49]^=z,oe=R[0],Xe=R[1],Me=R[11]<<4|R[10]>>>28,Se=R[10]<<4|R[11]>>>28,ne=R[20]<<3|R[21]>>>29,we=R[21]<<3|R[20]>>>29,kt=R[31]<<9|R[30]>>>23,ct=R[30]<<9|R[31]>>>23,We=R[40]<<18|R[41]>>>14,pe=R[41]<<18|R[40]>>>14,ke=R[2]<<1|R[3]>>>31,$e=R[3]<<1|R[2]>>>31,Ee=R[13]<<12|R[12]>>>20,ye=R[12]<<12|R[13]>>>20,rt=R[22]<<10|R[23]>>>22,xe=R[23]<<10|R[22]>>>22,tt=R[33]<<13|R[32]>>>19,ve=R[32]<<13|R[33]>>>19,St=R[42]<<2|R[43]>>>30,vt=R[43]<<2|R[42]>>>30,wt=R[5]<<30|R[4]>>>2,Ce=R[4]<<30|R[5]>>>2,le=R[14]<<6|R[15]>>>26,re=R[15]<<6|R[14]>>>26,it=R[25]<<11|R[24]>>>21,Pe=R[24]<<11|R[25]>>>21,Be=R[34]<<15|R[35]>>>17,gt=R[35]<<15|R[34]>>>17,Ie=R[45]<<29|R[44]>>>3,Qe=R[44]<<29|R[45]>>>3,$=R[6]<<28|R[7]>>>4,J=R[7]<<28|R[6]>>>4,Le=R[17]<<23|R[16]>>>9,bt=R[16]<<23|R[17]>>>9,ae=R[26]<<25|R[27]>>>7,Ue=R[27]<<25|R[26]>>>7,Te=R[36]<<21|R[37]>>>11,lt=R[37]<<21|R[36]>>>11,Re=R[47]<<24|R[46]>>>8,De=R[46]<<24|R[47]>>>8,ge=R[8]<<27|R[9]>>>5,Ze=R[9]<<27|R[8]>>>5,te=R[18]<<20|R[19]>>>12,me=R[19]<<20|R[18]>>>12,yt=R[29]<<7|R[28]>>>25,Ot=R[28]<<7|R[29]>>>25,de=R[38]<<8|R[39]>>>24,Ae=R[39]<<8|R[38]>>>24,j=R[48]<<14|R[49]>>>18,N=R[49]<<14|R[48]>>>18,R[0]=oe^~Ee&it,R[1]=Xe^~ye&Pe,R[10]=$^~te&ne,R[11]=J^~me&we,R[20]=ke^~le&ae,R[21]=$e^~re&Ue,R[30]=ge^~Me&rt,R[31]=Ze^~Se&xe,R[40]=wt^~Le&yt,R[41]=Ce^~bt&Ot,R[2]=Ee^~it&Te,R[3]=ye^~Pe<,R[12]=te^~ne&tt,R[13]=me^~we&ve,R[22]=le^~ae&de,R[23]=re^~Ue&Ae,R[32]=Me^~rt&Be,R[33]=Se^~xe>,R[42]=Le^~yt&kt,R[43]=bt^~Ot&ct,R[4]=it^~Te&j,R[5]=Pe^~lt&N,R[14]=ne^~tt&Ie,R[15]=we^~ve&Qe,R[24]=ae^~de&We,R[25]=Ue^~Ae&pe,R[34]=rt^~Be&Re,R[35]=xe^~gt&De,R[44]=yt^~kt&St,R[45]=Ot^~ct&vt,R[6]=Te^~j&oe,R[7]=lt^~N&Xe,R[16]=tt^~Ie&$,R[17]=ve^~Qe&J,R[26]=de^~We&ke,R[27]=Ae^~pe&$e,R[36]=Be^~Re&ge,R[37]=gt^~De&Ze,R[46]=kt^~St&wt,R[47]=ct^~vt&Ce,R[8]=j^~oe&Ee,R[9]=N^~Xe&ye,R[18]=Ie^~$&te,R[19]=Qe^~J&me,R[28]=We^~ke&le,R[29]=pe^~$e&re,R[38]=Re^~ge&Me,R[39]=De^~Ze&Se,R[48]=St^~wt&Le,R[49]=vt^~Ce&bt,R[0]^=P[V],R[1]^=P[V+1]};if(f)t.exports=l;else for(m=0;m>=8;return e}function eK(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(o){n=n.concat(eK(o))}),n.length<=55)return n.unshift(192+n.length),n;const i=TB(n.length);return i.unshift(247+i.length),i.concat(n)}mP(t)||v4e.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call(nt(t));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=TB(e.length);return r.unshift(183+r.length),r.concat(e)}function t5(t){return At(eK(t))}const w4e="address/5.7.0",xm=new ut(w4e);function RB(t){li(t,20)||xm.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=nt(_n(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const x4e=9007199254740991;function E4e(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const gP={};for(let t=0;t<10;t++)gP[String(t)]=String(t);for(let t=0;t<26;t++)gP[String.fromCharCode(65+t)]=String(10+t);const kB=Math.floor(E4e(x4e));function A4e(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>gP[n]).join("");for(;e.length>=kB;){let n=e.substring(0,kB);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function ea(t){let e=null;if(typeof t!="string"&&xm.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=RB(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&xm.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==A4e(t)&&xm.throwArgumentError("bad icap checksum","address",t),e=u4e(t.substring(4));e.length<40;)e="0"+e;e=RB("0x"+e)}else xm.throwArgumentError("invalid address","address",t);return e}const S4e="strings/5.7.0",M4e=new ut(S4e);var ml;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(ml||(ml={}));var BB;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(BB||(BB={}));function Hs(t,e=ml.current){e!=ml.current&&(M4e.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const o=t.charCodeAt(n);if(n>=t.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const s=65536+((i&1023)<<10)+(o&1023);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return nt(r)}function bP(t){return _n(Hs(t))}const _4e="hash/5.7.0",P4e=`Ethereum Signed Message: -`;function tK(t){return typeof t=="string"&&(t=Hs(t)),_n(ja([Hs(P4e),Hs(String(t.length)),t]))}var C4e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const Mr=new ut(_4e),rK=new Uint8Array(32);rK.fill(0);const I4e=pr.from(-1),nK=pr.from(0),iK=pr.from(1),T4e=pr.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function R4e(t){const e=nt(t),r=e.length%32;return r?oh([e,rK.slice(r)]):At(e)}const k4e=zo(iK.toHexString(),32),B4e=zo(nK.toHexString(),32),OB={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},A4=["name","version","chainId","verifyingContract","salt"];function NB(t){return function(e){return typeof e!="string"&&Mr.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const O4e={name:NB("name"),version:NB("version"),chainId:function(t){try{return pr.from(t).toString()}catch{}return Mr.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return ea(t).toLowerCase()}catch{}return Mr.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=nt(t);if(e.length!==32)throw new Error("bad length");return At(e)}catch{}return Mr.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function S4(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&Mr.throwArgumentError("invalid numeric width","type",t);const i=T4e.mask(r?n-1:n),o=r?i.add(iK).mul(I4e):nK;return function(s){const f=pr.from(s);return(f.lt(o)||f.gt(i))&&Mr.throwArgumentError(`value out-of-bounds for ${t}`,"value",s),zo(f.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&Mr.throwArgumentError("invalid bytes width","type",t),function(n){return nt(n).length!==r&&Mr.throwArgumentError(`invalid length for ${t}`,"value",n),R4e(n)}}}switch(t){case"address":return function(e){return zo(ea(e),32)};case"bool":return function(e){return e?k4e:B4e};case"bytes":return function(e){return _n(e)};case"string":return function(e){return bP(e)}}return null}function LB(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Vi{constructor(e){Pt(this,"types",Object.freeze(e5(e))),Pt(this,"_encoderCache",{}),Pt(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(f=>{r[f]={},n[f]=[],i[f]={}});for(const f in e){const d={};e[f].forEach(p=>{d[p.name]&&Mr.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(f)}`,"types",e),d[p.name]=!0;const b=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];b===f&&Mr.throwArgumentError(`circular type reference to ${JSON.stringify(b)}`,"types",e),!S4(b)&&(n[b]||Mr.throwArgumentError(`unknown type ${JSON.stringify(b)}`,"types",e),n[b].push(f),r[f][b]=!0)})}const o=Object.keys(n).filter(f=>n[f].length===0);o.length===0?Mr.throwArgumentError("missing primary type","types",e):o.length>1&&Mr.throwArgumentError(`ambiguous primary types or unused types: ${o.map(f=>JSON.stringify(f)).join(", ")}`,"types",e),Pt(this,"primaryType",o[0]);function s(f,d){d[f]&&Mr.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),d[f]=!0,Object.keys(r[f]).forEach(p=>{n[p]&&(s(p,d),Object.keys(d).forEach(b=>{i[b][p]=!0}))}),delete d[f]}s(this.primaryType,{});for(const f in i){const d=Object.keys(i[f]);d.sort(),this._types[f]=LB(f,e[f])+d.map(p=>LB(p,e[p])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=S4(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],o=this.getEncoder(i),s=parseInt(r[3]);return f=>{s>=0&&f.length!==s&&Mr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",f);let d=f.map(o);return this._types[i]&&(d=d.map(_n)),_n(oh(d))}}const n=this.types[e];if(n){const i=bP(this._types[e]);return o=>{const s=n.map(({name:f,type:d})=>{const p=this.getEncoder(d)(o[f]);return this._types[d]?_n(p):p});return s.unshift(i),oh(s)}}return Mr.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Mr.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return _n(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(S4(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const s=i[1],f=parseInt(i[3]);return f>=0&&r.length!==f&&Mr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(d=>this._visit(s,d,n))}const o=this.types[e];return o?o.reduce((s,{name:f,type:d})=>(s[f]=this._visit(d,r[f],n),s),{}):Mr.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Vi(e)}static getPrimaryType(e){return Vi.from(e).primaryType}static hashStruct(e,r,n){return Vi.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=OB[n];i||Mr.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>A4.indexOf(n.name)-A4.indexOf(i.name)),Vi.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return oh(["0x1901",Vi.hashDomain(e),Vi.from(r).hash(n)])}static hash(e,r,n){return _n(Vi.encode(e,r,n))}static resolveNames(e,r,n,i){return C4e(this,void 0,void 0,function*(){e=vE(e);const o={};e.verifyingContract&&!li(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=Vi.from(r);s.visit(n,(f,d)=>(f==="address"&&!li(d,20)&&(o[d]="0x"),d));for(const f in o)o[f]=yield i(f);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),n=s.visit(n,(f,d)=>f==="address"&&o[d]?o[d]:d),{domain:e,value:n}})}static getPayload(e,r,n){Vi.hashDomain(e);const i={},o=[];A4.forEach(d=>{const p=e[d];p!=null&&(i[d]=O4e[d](p),o.push({name:d,type:OB[d]}))});const s=Vi.from(r),f=vE(r);return f.EIP712Domain?Mr.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):f.EIP712Domain=o,s.encode(n),{types:f,domain:i,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return At(nt(p));if(d.match(/^u?int/))return pr.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&Mr.throwArgumentError("invalid string","value",p),p}return Mr.throwArgumentError("unsupported type","type",d)})}}}const N4e="abstract-provider/5.7.0";var L4e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const D4e=new ut(N4e);class yP{constructor(){D4e.checkAbstract(new.target,yP),Pt(this,"_isProvider",!0)}getFeeData(){return L4e(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield Bd({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)});let n=null,i=null,o=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,o=pr.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const F4e="abstract-signer/5.7.0";var gs=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const bs=new ut(F4e),$4e=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],U4e=[ut.errors.INSUFFICIENT_FUNDS,ut.errors.NONCE_EXPIRED,ut.errors.REPLACEMENT_UNDERPRICED];class vP{constructor(){bs.checkAbstract(new.target,vP),Pt(this,"_isSigner",!0)}getBalance(e){return gs(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return gs(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return gs(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield Bd(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return gs(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield Bd(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return gs(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return gs(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return gs(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return gs(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return gs(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)$4e.indexOf(n)===-1&&bs.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=vE(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&bs.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return gs(this,void 0,void 0,function*(){const r=yield Bd(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>gs(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&bs.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?bs.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&bs.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const o=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=o,r.maxPriorityFeePerGas=o}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&bs.throwError("network does not support EIP-1559",ut.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):bs.throwError("failed to get consistent fee data",ut.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(U4e.indexOf(i.code)>=0)throw i;return bs.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ut.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&bs.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Bd(r)})}_checkProvider(e){this.provider||bs.throwError("missing provider",ut.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}function _1(t,e,r){return r={path:e,exports:{},require:function(n,i){return z4e(n,i??r.path)}},t(r,r.exports),r.exports}function z4e(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var wP=oK;function oK(t,e){if(!t)throw new Error(e||"Assertion failed")}oK.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var Ds=_1(function(t,e){var r=e;function n(s,f){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,A=b&255;v?d.push(v,A):d.push(A)}return d}r.toArray=n;function i(s){return s.length===1?"0"+s:s}r.zero2=i;function o(s){for(var f="",d=0;d(A>>1)-1?P=(A>>1)-I:P=I,_.isubn(P)):P=0,v[S]=P,_.iushrn(1)}return v}r.getNAF=n;function i(d,p){var b=[[],[]];d=d.clone(),p=p.clone();for(var v=0,A=0,_;d.cmpn(-v)>0||p.cmpn(-A)>0;){var S=d.andln(3)+v&3,P=p.andln(3)+A&3;S===3&&(S=-1),P===3&&(P=-1);var I;S&1?(_=d.andln(7)+v&7,(_===3||_===5)&&P===2?I=-S:I=S):I=0,b[0].push(I);var C;P&1?(_=p.andln(7)+A&7,(_===3||_===5)&&S===2?C=-P:C=P):C=0,b[1].push(C),2*v===I+1&&(v=1-v),2*A===C+1&&(A=1-A),d.iushrn(1),p.iushrn(1)}return b}r.getJSF=i;function o(d,p,b){var v="_"+p;d.prototype[p]=function(){return this[v]!==void 0?this[v]:this[v]=b.call(this)}}r.cachedProperty=o;function s(d){return typeof d=="string"?r.toArray(d,"hex"):d}r.parseBytes=s;function f(d){return new _t(d,"hex","le")}r.intFromLE=f}),r5=yo.getNAF,j4e=yo.getJSF,n5=yo.assert;function q0(t,e){this.type=t,this.p=new _t(e.p,16),this.red=e.prime?_t.red(e.prime):_t.mont(this.p),this.zero=new _t(0).toRed(this.red),this.one=new _t(1).toRed(this.red),this.two=new _t(2).toRed(this.red),this.n=e.n&&new _t(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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var $l=q0;q0.prototype.point=function(){throw new Error("Not implemented")};q0.prototype.validate=function(){throw new Error("Not implemented")};q0.prototype._fixedNafMul=function(e,r){n5(e.precomputed);var n=e._getDoubles(),i=r5(r,1,this._bitLength),o=(1<=f;p--)d=(d<<1)+i[p];s.push(d)}for(var b=this.jpoint(null,null,null),v=this.jpoint(null,null,null),A=o;A>0;A--){for(f=0;f=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,f=f.dblp(p),d<0)break;var b=s[d];n5(b!==0),e.type==="affine"?b>0?f=f.mixedAdd(o[b-1>>1]):f=f.mixedAdd(o[-b-1>>1].neg()):b>0?f=f.add(o[b-1>>1]):f=f.add(o[-b-1>>1].neg())}return e.type==="affine"?f.toP():f};q0.prototype._wnafMulAdd=function(e,r,n,i,o){var s=this._wnafT1,f=this._wnafT2,d=this._wnafT3,p=0,b,v,A;for(b=0;b=1;b-=2){var S=b-1,P=b;if(s[S]!==1||s[P]!==1){d[S]=r5(n[S],s[S],this._bitLength),d[P]=r5(n[P],s[P],this._bitLength),p=Math.max(d[S].length,p),p=Math.max(d[P].length,p);continue}var I=[r[S],null,null,r[P]];r[S].y.cmp(r[P].y)===0?(I[1]=r[S].add(r[P]),I[2]=r[S].toJ().mixedAdd(r[P].neg())):r[S].y.cmp(r[P].y.redNeg())===0?(I[1]=r[S].toJ().mixedAdd(r[P]),I[2]=r[S].add(r[P].neg())):(I[1]=r[S].toJ().mixedAdd(r[P]),I[2]=r[S].toJ().mixedAdd(r[P].neg()));var C=[-3,-1,-5,-7,0,7,5,1,3],T=j4e(n[S],n[P]);for(p=Math.max(T[0].length,p),d[S]=new Array(p),d[P]=new Array(p),v=0;v=0;b--){for(var K=0;b>=0;){var Y=!0;for(v=0;v=0&&K++,D=D.dblp(K),b<0)break;for(v=0;v0?A=f[v][W-1>>1]:W<0&&(A=f[v][-W-1>>1].neg()),A.type==="affine"?D=D.mixedAdd(A):D=D.add(A))}}for(b=0;b=Math.ceil((e.bitLength()+1)/r.step):!1};ds.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(_=p,S=b),v.negative&&(v=v.neg(),A=A.neg()),_.negative&&(_=_.neg(),S=S.neg()),[{a:v,b:A},{a:_,b:S}]};hs.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],o=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),f=o.mul(n.a),d=s.mul(i.a),p=o.mul(n.b),b=s.mul(i.b),v=e.sub(f).sub(d),A=p.add(b).neg();return{k1:v,k2:A}};hs.prototype.pointFromX=function(e,r){e=new _t(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)};hs.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};hs.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s":""};En.prototype.isInfinity=function(){return this.inf};En.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 r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};En.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 r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),f=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,f)};En.prototype.getX=function(){return this.x.fromRed()};En.prototype.getY=function(){return this.y.fromRed()};En.prototype.mul=function(e){return e=new _t(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)};En.prototype.mulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};En.prototype.jmulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};En.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)};En.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};En.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 Bn(t,e,r,n){$l.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new _t(0)):(this.x=new _t(e,16),this.y=new _t(r,16),this.z=new _t(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}xP(Bn,$l.BasePoint);hs.prototype.jpoint=function(e,r,n){return new Bn(this,e,r,n)};Bn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};Bn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Bn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),o=e.x.redMul(n),s=this.y.redMul(r.redMul(e.z)),f=e.y.redMul(n.redMul(this.z)),d=i.redSub(o),p=s.redSub(f);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var b=d.redSqr(),v=b.redMul(d),A=i.redMul(b),_=p.redSqr().redIAdd(v).redISub(A).redISub(A),S=p.redMul(A.redISub(_)).redISub(s.redMul(v)),P=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,S,P)};Bn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),o=this.y,s=e.y.redMul(r).redMul(this.z),f=n.redSub(i),d=o.redSub(s);if(f.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=f.redSqr(),b=p.redMul(f),v=n.redMul(p),A=d.redSqr().redIAdd(b).redISub(v).redISub(v),_=d.redMul(v.redISub(A)).redISub(o.redMul(b)),S=this.z.redMul(f);return this.curve.jpoint(A,_,S)};Bn.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};Bn.prototype.inspect=function(){return this.isInfinity()?"":""};Bn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var a2=_1(function(t,e){var r=e;r.base=$l,r.short=q4e,r.mont=null,r.edwards=null}),f2=_1(function(t,e){var r=e,n=yo.assert;function i(f){f.type==="short"?this.curve=new a2.short(f):f.type==="edwards"?this.curve=new a2.edwards(f):this.curve=new a2.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function o(f,d){Object.defineProperty(r,f,{configurable:!0,enumerable:!0,get:function(){var p=new i(d);return Object.defineProperty(r,f,{configurable:!0,enumerable:!0,value:p}),p}})}o("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:Qi.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("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:Qi.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("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:Qi.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("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:Qi.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"]}),o("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:Qi.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"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Qi.sha256,gRed:!1,g:["9"]}),o("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:Qi.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}o("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:Qi.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function I0(t){if(!(this instanceof I0))return new I0(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Ds.toArray(t.entropy,t.entropyEnc||"hex"),r=Ds.toArray(t.nonce,t.nonceEnc||"hex"),n=Ds.toArray(t.pers,t.persEnc||"hex");wP(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var sK=I0;I0.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};I0.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Ds.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var G4e=yo.assert;function Wx(t,e){if(t instanceof Wx)return t;this._importDER(t,e)||(G4e(t.r&&t.s,"Signature without r or s"),this.r=new _t(t.r,16),this.s=new _t(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Jx=Wx;function V4e(){this.place=0}function M4(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return i<=127?!1:(e.place=s,i)}function DB(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Wx.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=DB(r),n=DB(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];_4(i,r.length),i=i.concat(r),i.push(2),_4(i,n.length);var o=i.concat(n),s=[48];return _4(s,o.length),s=s.concat(o),yo.encode(s,e)};var K4e=function(){throw new Error("unsupported")},aK=yo.assert;function Qo(t){if(!(this instanceof Qo))return new Qo(t);typeof t=="string"&&(aK(Object.prototype.hasOwnProperty.call(f2,t),"Unknown curve "+t),t=f2[t]),t instanceof f2.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var W4e=Qo;Qo.prototype.keyPair=function(e){return new EP(this,e)};Qo.prototype.keyFromPrivate=function(e,r){return EP.fromPrivate(this,e,r)};Qo.prototype.keyFromPublic=function(e,r){return EP.fromPublic(this,e,r)};Qo.prototype.genKeyPair=function(e){e||(e={});for(var r=new sK({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||K4e(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new _t(2));;){var o=new _t(r.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};Qo.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Qo.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new _t(e,16));for(var o=this.n.byteLength(),s=r.getPrivate().toArray("be",o),f=e.toArray("be",o),d=new sK({hash:this.hash,entropy:s,nonce:f,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new _t(1)),b=0;;b++){var v=i.k?i.k(b):new _t(d.generate(this.n.byteLength()));if(v=this._truncateToN(v,!0),!(v.cmpn(1)<=0||v.cmp(p)>=0)){var A=this.g.mul(v);if(!A.isInfinity()){var _=A.getX(),S=_.umod(this.n);if(S.cmpn(0)!==0){var P=v.invm(this.n).mul(S.mul(r.getPrivate()).iadd(e));if(P=P.umod(this.n),P.cmpn(0)!==0){var I=(A.getY().isOdd()?1:0)|(_.cmp(S)!==0?2:0);return i.canonical&&P.cmp(this.nh)>0&&(P=this.n.sub(P),I^=1),new Jx({r:S,s:P,recoveryParam:I})}}}}}};Qo.prototype.verify=function(e,r,n,i){e=this._truncateToN(new _t(e,16)),n=this.keyFromPublic(n,i),r=new Jx(r,"hex");var o=r.r,s=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var f=s.invm(this.n),d=f.mul(e).umod(this.n),p=f.mul(o).umod(this.n),b;return this.curve._maxwellTrick?(b=this.g.jmulAdd(d,n.getPublic(),p),b.isInfinity()?!1:b.eqXToP(o)):(b=this.g.mulAdd(d,n.getPublic(),p),b.isInfinity()?!1:b.getX().umod(this.n).cmp(o)===0)};Qo.prototype.recoverPubKey=function(t,e,r,n){aK((3&r)===r,"The recovery param is more than two bits"),e=new Jx(e,n);var i=this.n,o=new _t(t),s=e.r,f=e.s,d=r&1,p=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var b=e.r.invm(i),v=i.sub(o).mul(b).umod(i),A=f.mul(b).umod(i);return this.g.mulAdd(v,s,A)};Qo.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Jx(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch{continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var J4e=_1(function(t,e){var r=e;r.version="6.5.4",r.utils=yo,r.rand=function(){throw new Error("unsupported")},r.curve=a2,r.curves=f2,r.ec=W4e,r.eddsa=null}),Z4e=J4e.ec;const Y4e="signing-key/5.7.0",xE=new ut(Y4e);let P4=null;function af(){return P4||(P4=new Z4e("secp256k1")),P4}class sh{constructor(e){Pt(this,"curve","secp256k1"),Pt(this,"privateKey",At(e)),ZV(this.privateKey)!==32&&xE.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=af().keyFromPrivate(nt(this.privateKey));Pt(this,"publicKey","0x"+r.getPublic(!1,"hex")),Pt(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),Pt(this,"_isSigningKey",!0)}_addPoint(e){const r=af().keyFromPublic(nt(this.publicKey)),n=af().keyFromPublic(nt(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=af().keyFromPrivate(nt(this.privateKey)),n=nt(e);n.length!==32&&xE.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return my({recoveryParam:i.recoveryParam,r:zo("0x"+i.r.toString(16),32),s:zo("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=af().keyFromPrivate(nt(this.privateKey)),n=af().keyFromPublic(nt(fK(e)));return zo("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function fK(t,e){const r=nt(t);if(r.length===32){const n=new sh(r);return e?"0x"+af().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?At(r):"0x"+af().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+af().keyFromPublic(r).getPublic(!0,"hex"):At(r)}return xE.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Q4e="transactions/5.7.0",Os=new ut(Q4e);var FB;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(FB||(FB={}));const X4e=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],e9e={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function ah(t){const e=fK(t);return ea(Dg(_n(Dg(e,1)),12))}function Xi(t,e){const r=h0(pr.from(t).toHexString());return r.length>32&&Os.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function C4(t,e){return{address:ea(t),storageKeys:(e||[]).map((r,n)=>(ZV(r)!==32&&Os.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function t9e(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Os.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),C4(r[0],r[1])):C4(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,o)=>(i[o]=!0,i),{});return C4(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function cK(t){return t9e(t).map(e=>[e.address,e.storageKeys])}function r9e(t,e){if(t.gasPrice!=null){const n=pr.from(t.gasPrice),i=pr.from(t.maxFeePerGas||0);n.eq(i)||Os.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[Xi(t.chainId||0,"chainId"),Xi(t.nonce||0,"nonce"),Xi(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Xi(t.maxFeePerGas||0,"maxFeePerGas"),Xi(t.gasLimit||0,"gasLimit"),t.to!=null?ea(t.to):"0x",Xi(t.value||0,"value"),t.data||"0x",cK(t.accessList||[])];if(e){const n=my(e);r.push(Xi(n.recoveryParam,"recoveryParam")),r.push(h0(n.r)),r.push(h0(n.s))}return oh(["0x02",t5(r)])}function n9e(t,e){const r=[Xi(t.chainId||0,"chainId"),Xi(t.nonce||0,"nonce"),Xi(t.gasPrice||0,"gasPrice"),Xi(t.gasLimit||0,"gasLimit"),t.to!=null?ea(t.to):"0x",Xi(t.value||0,"value"),t.data||"0x",cK(t.accessList||[])];if(e){const n=my(e);r.push(Xi(n.recoveryParam,"recoveryParam")),r.push(h0(n.r)),r.push(h0(n.s))}return oh(["0x01",t5(r)])}function i9e(t,e){h4e(t,e9e);const r=[];X4e.forEach(function(s){let f=t[s.name]||[];const d={};s.numeric&&(d.hexPad="left"),f=nt(At(f,d)),s.length&&f.length!==s.length&&f.length>0&&Os.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,f),s.maxLength&&(f=h0(f),f.length>s.maxLength&&Os.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,f)),r.push(At(f))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Os.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!mP(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(At(n)),r.push("0x"),r.push("0x")),!e)return t5(r);const i=my(e);let o=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),o+=n*2+8,i.v>28&&i.v!==o&&Os.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==o&&Os.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(At(o)),r.push(h0(nt(i.r))),r.push(h0(nt(i.s))),t5(r)}function $B(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Os.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),i9e(t,e);switch(t.type){case 1:return n9e(t,e);case 2:return r9e(t,e)}return Os.throwError(`unsupported transaction type: ${t.type}`,ut.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}class uK{constructor(e){Pt(this,"alphabet",e),Pt(this,"base",e.length),Pt(this,"_alphabetMap",{}),Pt(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let o=0;r[o]===0&&o=0;--o)i+=this.alphabet[n[o]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;o>0;)r.push(o&255),o>>=8}for(let n=0;e[n]===this._leader&&n>24&255,d[e.length+1]=v>>16&255,d[e.length+2]=v>>8&255,d[e.length+3]=v&255;let A=nt(i5(i,t,d));o||(o=A.length,b=new Uint8Array(o),s=Math.ceil(n/o),p=n-(s-1)*o),b.set(A);for(let P=1;P{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function V8e(t){let{fallbackElement:e,router:r,future:n}=t,[i,o]=Z.useState(r.state),[s,f]=Z.useState(),[d,p]=Z.useState({isTransitioning:!1}),[b,v]=Z.useState(),[A,_]=Z.useState(),[S,P]=Z.useState(),I=Z.useRef(new Map),{v7_startTransition:C}=n||{},T=Z.useCallback(V=>{C?q8e(V):V()},[C]),k=Z.useCallback((V,Y)=>{let{deletedFetchers:W,unstable_flushSync:ie,unstable_viewTransitionOpts:x}=Y;W.forEach(u=>I.current.delete(u)),V.fetchers.forEach((u,l)=>{u.data!==void 0&&I.current.set(l,u.data)});let a=r.window==null||typeof r.window.document.startViewTransition!="function";if(!x||a){ie?om(()=>o(V)):T(()=>o(V));return}if(ie){om(()=>{A&&(b&&b.resolve(),A.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:x.currentLocation,nextLocation:x.nextLocation})});let u=r.window.document.startViewTransition(()=>{om(()=>o(V))});u.finished.finally(()=>{om(()=>{v(void 0),_(void 0),f(void 0),p({isTransitioning:!1})})}),om(()=>_(u));return}A?(b&&b.resolve(),A.skipTransition(),P({state:V,currentLocation:x.currentLocation,nextLocation:x.nextLocation})):(f(V),p({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}))},[r.window,A,b,I,T]);Z.useLayoutEffect(()=>r.subscribe(k),[r,k]),Z.useEffect(()=>{d.isTransitioning&&!d.flushSync&&v(new G8e)},[d]),Z.useEffect(()=>{if(b&&s&&r.window){let V=s,Y=b.promise,W=r.window.document.startViewTransition(async()=>{T(()=>o(V)),await Y});W.finished.finally(()=>{v(void 0),_(void 0),f(void 0),p({isTransitioning:!1})}),_(W)}},[T,s,b,r.window]),Z.useEffect(()=>{b&&s&&i.location.key===s.location.key&&b.resolve()},[b,A,i.location,s]),Z.useEffect(()=>{!d.isTransitioning&&S&&(f(S.state),p({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),P(void 0))},[d.isTransitioning,S]);let O=Z.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:V=>r.navigate(V),push:(V,Y,W)=>r.navigate(V,{state:Y,preventScrollReset:W==null?void 0:W.preventScrollReset}),replace:(V,Y,W)=>r.navigate(V,{replace:!0,state:Y,preventScrollReset:W==null?void 0:W.preventScrollReset})}),[r]),D=r.basename||"/",U=Z.useMemo(()=>({router:r,navigator:O,static:!1,basename:D}),[r,O,D]);return Z.createElement(Z.Fragment,null,Z.createElement(Hx.Provider,{value:U},Z.createElement(HV.Provider,{value:i},Z.createElement(z8e.Provider,{value:I.current},Z.createElement(U8e.Provider,{value:d},Z.createElement(N8e,{basename:D,location:i.location,navigationType:i.historyAction,navigator:O},i.initialized?Z.createElement(K8e,{routes:r.routes,state:i}):e))))),null)}function K8e(t){let{routes:e,state:r}=t;return S8e(e,void 0,r)}var vB;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(vB||(vB={}));var wB;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(wB||(wB={}));const W8e="_homeContainer_65xox_47",J8e="_formContainer_65xox_57",Z8e="_heading_65xox_61",Y8e="_subHeading_65xox_73",Q8e="_inputContainer_65xox_78",X8e="_selectGroup_65xox_89",e4e="_btn_65xox_95",t4e="_helperText_65xox_113",r4e="_successContainer_65xox_117",n4e="_copyContainer_65xox_127",i4e="_goBack_65xox_133",o4e="_input_65xox_78",Un={homeContainer:W8e,formContainer:J8e,heading:Z8e,subHeading:Y8e,inputContainer:Q8e,selectGroup:X8e,btn:e4e,helperText:t4e,successContainer:r4e,copyContainer:n4e,goBack:i4e,input:o4e},s4e="logger/5.7.0";let xB=!1,EB=!1;const o2={debug:1,default:2,info:2,warning:3,error:4,off:5};let AB=o2.default,w4=null;function a4e(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const SB=a4e();var yE;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(yE||(yE={}));var ws;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(ws||(ws={}));const MB="0123456789abcdef";class ut{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();o2[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(AB>o2[n])&&console.log.apply(console,r)}debug(...e){this._log(ut.levels.DEBUG,e)}info(...e){this._log(ut.levels.INFO,e)}warn(...e){this._log(ut.levels.WARNING,e)}makeError(e,r,n){if(EB)return this.makeError("censored error",r,{});r||(r=ut.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(d=>{const p=n[d];try{if(p instanceof Uint8Array){let b="";for(let v=0;v>4],b+=MB[p[v]&15];i.push(d+"=Uint8Array(0x"+b+")")}else i.push(d+"="+JSON.stringify(p))}catch{i.push(d+"="+JSON.stringify(n[d].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const o=e;let s="";switch(r){case ws.NUMERIC_FAULT:{s="NUMERIC_FAULT";const d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":s+="-"+d;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case ws.CALL_EXCEPTION:case ws.INSUFFICIENT_FUNDS:case ws.MISSING_NEW:case ws.NONCE_EXPIRED:case ws.REPLACEMENT_UNDERPRICED:case ws.TRANSACTION_REPLACED:case ws.UNPREDICTABLE_GAS_LIMIT:s=r;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const f=new Error(e);return f.reason=o,f.code=r,Object.keys(n).forEach(function(d){f[d]=n[d]}),f}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,ut.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){SB&&this.throwError("platform missing String.prototype.normalize",ut.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:SB})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,ut.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,ut.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,ut.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",ut.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",ut.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",ut.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return w4||(w4=new ut(s4e)),w4}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",ut.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),xB){if(!e)return;this.globalLogger().throwError("error censorship permanent",ut.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}EB=!!e,xB=!!r}static setLogLevel(e){const r=o2[e.toLowerCase()];if(r==null){ut.globalLogger().warn("invalid log level - "+e);return}AB=r}static from(e){return new ut(e)}}ut.errors=ws;ut.levels=yE;const f4e="bytes/5.7.0",qr=new ut(f4e);function JV(t){return!!t.toHexString}function ih(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return ih(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function mP(t){return li(t)&&!(t.length%2)||Kx(t)}function _B(t){return typeof t=="number"&&t==t&&t%1===0}function Kx(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!_B(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function nt(t,e){if(e||(e={}),typeof t=="number"){qr.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ih(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),JV(t)&&(t=t.toHexString()),li(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":qr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;int(i)),r=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(r);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),ih(n)}function h0(t){let e=nt(t);if(e.length===0)return e;let r=0;for(;re&&qr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),ih(r)}function li(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const x4="0123456789abcdef";function At(t,e){if(e||(e={}),typeof t=="number"){qr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=x4[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),JV(t))return t.toHexString();if(li(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":qr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Kx(t)){let r="0x";for(let n=0;n>4]+x4[i&15]}return r}return qr.throwArgumentError("invalid hexlify value","value",t)}function ZV(t){if(typeof t!="string")t=At(t);else if(!li(t)||t.length%2)return null;return(t.length-2)/2}function Fg(t,e,r){return typeof t!="string"?t=At(t):(!li(t)||t.length%2)&&qr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function oh(t){let e="0x";return t.forEach(r=>{e+=At(r).substring(2)}),e}function zo(t,e){for(typeof t!="string"?t=At(t):li(t)||qr.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&qr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function my(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(mP(t)){let r=nt(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=At(r.slice(0,32)),e.s=At(r.slice(32,64))):r.length===65?(e.r=At(r.slice(0,32)),e.s=At(r.slice(32,64)),e.v=r[64]):qr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:qr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=At(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=s2(nt(e._vs),32);e._vs=At(i);const o=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=o:e.recoveryParam!==o&&qr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const s=At(i);e.s==null?e.s=s:e.s!==s&&qr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?qr.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&qr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!li(e.r)?qr.throwArgumentError("signature missing or invalid r","signature",t):e.r=zo(e.r,32),e.s==null||!li(e.s)?qr.throwArgumentError("signature missing or invalid s","signature",t):e.s=zo(e.s,32);const r=nt(e.s);r[0]>=128&&qr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=At(r);e._vs&&(li(e._vs)||qr.throwArgumentError("signature invalid _vs","signature",t),e._vs=zo(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&qr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function PB(t){return t=my(t),At(ja([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const c4e="bignumber/5.7.0";var Q6=_t.BN;const rf=new ut(c4e),E4={},CB=9007199254740991;let IB=!1;class pr{constructor(e,r){e!==E4&&rf.throwError("cannot call constructor directly; use BigNumber.from",ut.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return wi(Nt(this).fromTwos(e))}toTwos(e){return wi(Nt(this).toTwos(e))}abs(){return this._hex[0]==="-"?pr.from(this._hex.substring(1)):this}add(e){return wi(Nt(this).add(Nt(e)))}sub(e){return wi(Nt(this).sub(Nt(e)))}div(e){return pr.from(e).isZero()&&Eo("division-by-zero","div"),wi(Nt(this).div(Nt(e)))}mul(e){return wi(Nt(this).mul(Nt(e)))}mod(e){const r=Nt(e);return r.isNeg()&&Eo("division-by-zero","mod"),wi(Nt(this).umod(r))}pow(e){const r=Nt(e);return r.isNeg()&&Eo("negative-power","pow"),wi(Nt(this).pow(r))}and(e){const r=Nt(e);return(this.isNegative()||r.isNeg())&&Eo("unbound-bitwise-result","and"),wi(Nt(this).and(r))}or(e){const r=Nt(e);return(this.isNegative()||r.isNeg())&&Eo("unbound-bitwise-result","or"),wi(Nt(this).or(r))}xor(e){const r=Nt(e);return(this.isNegative()||r.isNeg())&&Eo("unbound-bitwise-result","xor"),wi(Nt(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Eo("negative-width","mask"),wi(Nt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Eo("negative-width","shl"),wi(Nt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Eo("negative-width","shr"),wi(Nt(this).shrn(e))}eq(e){return Nt(this).eq(Nt(e))}lt(e){return Nt(this).lt(Nt(e))}lte(e){return Nt(this).lte(Nt(e))}gt(e){return Nt(this).gt(Nt(e))}gte(e){return Nt(this).gte(Nt(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Nt(this).isZero()}toNumber(){try{return Nt(this).toNumber()}catch{Eo("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return rf.throwError("this platform does not support BigInt",ut.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?IB||(IB=!0,rf.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?rf.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ut.errors.UNEXPECTED_ARGUMENT,{}):rf.throwError("BigNumber.toString does not accept parameters",ut.errors.UNEXPECTED_ARGUMENT,{})),Nt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof pr)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new pr(E4,$g(e)):e.match(/^-?[0-9]+$/)?new pr(E4,$g(new Q6(e))):rf.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Eo("underflow","BigNumber.from",e),(e>=CB||e<=-CB)&&Eo("overflow","BigNumber.from",e),pr.from(String(e));const r=e;if(typeof r=="bigint")return pr.from(r.toString());if(Kx(r))return pr.from(At(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return pr.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(li(n)||n[0]==="-"&&li(n.substring(1))))return pr.from(n)}return rf.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function $g(t){if(typeof t!="string")return $g(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&rf.throwArgumentError("invalid hex","value",t),t=$g(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function wi(t){return pr.from($g(t))}function Nt(t){const e=pr.from(t).toHexString();return e[0]==="-"?new Q6("-"+e.substring(3),16):new Q6(e.substring(2),16)}function Eo(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),rf.throwError(t,ut.errors.NUMERIC_FAULT,n)}function u4e(t){return new Q6(t,36).toString(16)}const l4e="properties/5.7.0";var d4e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const X6=new ut(l4e);function Pt(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Bd(t){return d4e(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(o=>({key:n,value:o}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function h4e(t,e){(!t||typeof t!="object")&&X6.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||X6.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function vE(t){const e={};for(const r in t)e[r]=t[r];return e}const p4e={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function YV(t){if(t==null||p4e[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;re5(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&Pt(e,r,e5(n))}return e}return X6.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function e5(t){return m4e(t)}class QV{constructor(e){for(const r in e)this[r]=e5(e[r])}}var XV={exports:{}};(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",s=!i.JS_SHA3_NO_NODE_JS&&typeof Je.process=="object"&&Je.process.versions&&Je.process.versions.node;s?i=et:o&&(i=self);var f=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,d=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),b=[31,7936,2031616,520093696],v=[4,1024,262144,67108864],A=[1,256,65536,16777216],_=[6,1536,393216,100663296],S=[0,8,16,24],P=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],I=[224,256,384,512],C=[128,256],T=["hex","buffer","arrayBuffer","array","digest"],k={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(R){return Object.prototype.toString.call(R)==="[object Array]"}),d&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(R){return typeof R=="object"&&R.buffer&&R.buffer.constructor===ArrayBuffer});for(var O=function(R,F,z){return function(K){return new M(R,F,R).update(K)[z]()}},D=function(R,F,z){return function(K,q){return new M(R,F,q).update(K)[z]()}},U=function(R,F,z){return function(K,q,Q,G){return l["cshake"+R].update(K,q,Q,G)[z]()}},V=function(R,F,z){return function(K,q,Q,G){return l["kmac"+R].update(K,q,Q,G)[z]()}},Y=function(R,F,z,K){for(var q=0;q>5,this.byteCount=this.blockCount<<2,this.outputBlocks=z>>5,this.extraBytes=(z&31)>>3;for(var K=0;K<50;++K)this.s[K]=0}M.prototype.update=function(R){if(this.finalized)throw new Error(r);var F,z=typeof R;if(z!=="string"){if(z==="object"){if(R===null)throw new Error(e);if(d&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!d||!ArrayBuffer.isView(R)))throw new Error(e)}else throw new Error(e);F=!0}for(var K=this.blocks,q=this.byteCount,Q=R.length,G=this.blockCount,H=0,ee=this.s,ue,fe;H>2]|=R[H]<>2]|=fe<>2]|=(192|fe>>6)<>2]|=(128|fe&63)<=57344?(K[ue>>2]|=(224|fe>>12)<>2]|=(128|fe>>6&63)<>2]|=(128|fe&63)<>2]|=(240|fe>>18)<>2]|=(128|fe>>12&63)<>2]|=(128|fe>>6&63)<>2]|=(128|fe&63)<=q){for(this.start=ue-q,this.block=K[G],ue=0;ue>8,z=R&255;z>0;)q.unshift(z),R=R>>8,z=R&255,++K;return F?q.push(K):q.unshift(K),this.update(q),q.length},M.prototype.encodeString=function(R){var F,z=typeof R;if(z!=="string"){if(z==="object"){if(R===null)throw new Error(e);if(d&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!d||!ArrayBuffer.isView(R)))throw new Error(e)}else throw new Error(e);F=!0}var K=0,q=R.length;if(F)K=q;else for(var Q=0;Q=57344?K+=3:(G=65536+((G&1023)<<10|R.charCodeAt(++Q)&1023),K+=4)}return K+=this.encode(K*8),this.update(R),K},M.prototype.bytepad=function(R,F){for(var z=this.encode(F),K=0;K>2]|=this.padding[F&3],this.lastByteIndex===this.byteCount)for(R[0]=R[z],F=1;F>4&15]+p[H&15]+p[H>>12&15]+p[H>>8&15]+p[H>>20&15]+p[H>>16&15]+p[H>>28&15]+p[H>>24&15];Q%R===0&&(L(F),q=0)}return K&&(H=F[q],G+=p[H>>4&15]+p[H&15],K>1&&(G+=p[H>>12&15]+p[H>>8&15]),K>2&&(G+=p[H>>20&15]+p[H>>16&15])),G},M.prototype.arrayBuffer=function(){this.finalize();var R=this.blockCount,F=this.s,z=this.outputBlocks,K=this.extraBytes,q=0,Q=0,G=this.outputBits>>3,H;K?H=new ArrayBuffer(z+1<<2):H=new ArrayBuffer(G);for(var ee=new Uint32Array(H);Q>8&255,G[H+2]=ee>>16&255,G[H+3]=ee>>24&255;Q%R===0&&L(F)}return K&&(H=Q<<2,ee=F[q],G[H]=ee&255,K>1&&(G[H+1]=ee>>8&255),K>2&&(G[H+2]=ee>>16&255)),G};function B(R,F,z){M.call(this,R,F,z)}B.prototype=new M,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var L=function(R){var F,z,K,q,Q,G,H,ee,ue,fe,he,He,be,oe,Xe,Ee,ye,it,Pe,Te,lt,j,N,$,J,te,me,ne,we,tt,ve,Ie,Qe,ke,$e,le,re,ae,Ue,de,Ae,We,pe,ge,Ze,Me,Se,rt,xe,Be,gt,Re,De,wt,Ce,Le,bt,yt,Ot,kt,ct,St,vt;for(K=0;K<48;K+=2)q=R[0]^R[10]^R[20]^R[30]^R[40],Q=R[1]^R[11]^R[21]^R[31]^R[41],G=R[2]^R[12]^R[22]^R[32]^R[42],H=R[3]^R[13]^R[23]^R[33]^R[43],ee=R[4]^R[14]^R[24]^R[34]^R[44],ue=R[5]^R[15]^R[25]^R[35]^R[45],fe=R[6]^R[16]^R[26]^R[36]^R[46],he=R[7]^R[17]^R[27]^R[37]^R[47],He=R[8]^R[18]^R[28]^R[38]^R[48],be=R[9]^R[19]^R[29]^R[39]^R[49],F=He^(G<<1|H>>>31),z=be^(H<<1|G>>>31),R[0]^=F,R[1]^=z,R[10]^=F,R[11]^=z,R[20]^=F,R[21]^=z,R[30]^=F,R[31]^=z,R[40]^=F,R[41]^=z,F=q^(ee<<1|ue>>>31),z=Q^(ue<<1|ee>>>31),R[2]^=F,R[3]^=z,R[12]^=F,R[13]^=z,R[22]^=F,R[23]^=z,R[32]^=F,R[33]^=z,R[42]^=F,R[43]^=z,F=G^(fe<<1|he>>>31),z=H^(he<<1|fe>>>31),R[4]^=F,R[5]^=z,R[14]^=F,R[15]^=z,R[24]^=F,R[25]^=z,R[34]^=F,R[35]^=z,R[44]^=F,R[45]^=z,F=ee^(He<<1|be>>>31),z=ue^(be<<1|He>>>31),R[6]^=F,R[7]^=z,R[16]^=F,R[17]^=z,R[26]^=F,R[27]^=z,R[36]^=F,R[37]^=z,R[46]^=F,R[47]^=z,F=fe^(q<<1|Q>>>31),z=he^(Q<<1|q>>>31),R[8]^=F,R[9]^=z,R[18]^=F,R[19]^=z,R[28]^=F,R[29]^=z,R[38]^=F,R[39]^=z,R[48]^=F,R[49]^=z,oe=R[0],Xe=R[1],Me=R[11]<<4|R[10]>>>28,Se=R[10]<<4|R[11]>>>28,ne=R[20]<<3|R[21]>>>29,we=R[21]<<3|R[20]>>>29,kt=R[31]<<9|R[30]>>>23,ct=R[30]<<9|R[31]>>>23,We=R[40]<<18|R[41]>>>14,pe=R[41]<<18|R[40]>>>14,ke=R[2]<<1|R[3]>>>31,$e=R[3]<<1|R[2]>>>31,Ee=R[13]<<12|R[12]>>>20,ye=R[12]<<12|R[13]>>>20,rt=R[22]<<10|R[23]>>>22,xe=R[23]<<10|R[22]>>>22,tt=R[33]<<13|R[32]>>>19,ve=R[32]<<13|R[33]>>>19,St=R[42]<<2|R[43]>>>30,vt=R[43]<<2|R[42]>>>30,wt=R[5]<<30|R[4]>>>2,Ce=R[4]<<30|R[5]>>>2,le=R[14]<<6|R[15]>>>26,re=R[15]<<6|R[14]>>>26,it=R[25]<<11|R[24]>>>21,Pe=R[24]<<11|R[25]>>>21,Be=R[34]<<15|R[35]>>>17,gt=R[35]<<15|R[34]>>>17,Ie=R[45]<<29|R[44]>>>3,Qe=R[44]<<29|R[45]>>>3,$=R[6]<<28|R[7]>>>4,J=R[7]<<28|R[6]>>>4,Le=R[17]<<23|R[16]>>>9,bt=R[16]<<23|R[17]>>>9,ae=R[26]<<25|R[27]>>>7,Ue=R[27]<<25|R[26]>>>7,Te=R[36]<<21|R[37]>>>11,lt=R[37]<<21|R[36]>>>11,Re=R[47]<<24|R[46]>>>8,De=R[46]<<24|R[47]>>>8,ge=R[8]<<27|R[9]>>>5,Ze=R[9]<<27|R[8]>>>5,te=R[18]<<20|R[19]>>>12,me=R[19]<<20|R[18]>>>12,yt=R[29]<<7|R[28]>>>25,Ot=R[28]<<7|R[29]>>>25,de=R[38]<<8|R[39]>>>24,Ae=R[39]<<8|R[38]>>>24,j=R[48]<<14|R[49]>>>18,N=R[49]<<14|R[48]>>>18,R[0]=oe^~Ee&it,R[1]=Xe^~ye&Pe,R[10]=$^~te&ne,R[11]=J^~me&we,R[20]=ke^~le&ae,R[21]=$e^~re&Ue,R[30]=ge^~Me&rt,R[31]=Ze^~Se&xe,R[40]=wt^~Le&yt,R[41]=Ce^~bt&Ot,R[2]=Ee^~it&Te,R[3]=ye^~Pe<,R[12]=te^~ne&tt,R[13]=me^~we&ve,R[22]=le^~ae&de,R[23]=re^~Ue&Ae,R[32]=Me^~rt&Be,R[33]=Se^~xe>,R[42]=Le^~yt&kt,R[43]=bt^~Ot&ct,R[4]=it^~Te&j,R[5]=Pe^~lt&N,R[14]=ne^~tt&Ie,R[15]=we^~ve&Qe,R[24]=ae^~de&We,R[25]=Ue^~Ae&pe,R[34]=rt^~Be&Re,R[35]=xe^~gt&De,R[44]=yt^~kt&St,R[45]=Ot^~ct&vt,R[6]=Te^~j&oe,R[7]=lt^~N&Xe,R[16]=tt^~Ie&$,R[17]=ve^~Qe&J,R[26]=de^~We&ke,R[27]=Ae^~pe&$e,R[36]=Be^~Re&ge,R[37]=gt^~De&Ze,R[46]=kt^~St&wt,R[47]=ct^~vt&Ce,R[8]=j^~oe&Ee,R[9]=N^~Xe&ye,R[18]=Ie^~$&te,R[19]=Qe^~J&me,R[28]=We^~ke&le,R[29]=pe^~$e&re,R[38]=Re^~ge&Me,R[39]=De^~Ze&Se,R[48]=St^~wt&Le,R[49]=vt^~Ce&bt,R[0]^=P[K],R[1]^=P[K+1]};if(f)t.exports=l;else for(m=0;m>=8;return e}function eK(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(o){n=n.concat(eK(o))}),n.length<=55)return n.unshift(192+n.length),n;const i=TB(n.length);return i.unshift(247+i.length),i.concat(n)}mP(t)||v4e.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call(nt(t));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=TB(e.length);return r.unshift(183+r.length),r.concat(e)}function t5(t){return At(eK(t))}const w4e="address/5.7.0",Em=new ut(w4e);function RB(t){li(t,20)||Em.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=nt(_n(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const x4e=9007199254740991;function E4e(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const gP={};for(let t=0;t<10;t++)gP[String(t)]=String(t);for(let t=0;t<26;t++)gP[String.fromCharCode(65+t)]=String(10+t);const kB=Math.floor(E4e(x4e));function A4e(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>gP[n]).join("");for(;e.length>=kB;){let n=e.substring(0,kB);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function ea(t){let e=null;if(typeof t!="string"&&Em.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=RB(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Em.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==A4e(t)&&Em.throwArgumentError("bad icap checksum","address",t),e=u4e(t.substring(4));e.length<40;)e="0"+e;e=RB("0x"+e)}else Em.throwArgumentError("invalid address","address",t);return e}const S4e="strings/5.7.0",M4e=new ut(S4e);var ml;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(ml||(ml={}));var BB;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(BB||(BB={}));function Hs(t,e=ml.current){e!=ml.current&&(M4e.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const o=t.charCodeAt(n);if(n>=t.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const s=65536+((i&1023)<<10)+(o&1023);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return nt(r)}function bP(t){return _n(Hs(t))}const _4e="hash/5.7.0",P4e=`Ethereum Signed Message: +`;function tK(t){return typeof t=="string"&&(t=Hs(t)),_n(ja([Hs(P4e),Hs(String(t.length)),t]))}var C4e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const Mr=new ut(_4e),rK=new Uint8Array(32);rK.fill(0);const I4e=pr.from(-1),nK=pr.from(0),iK=pr.from(1),T4e=pr.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function R4e(t){const e=nt(t),r=e.length%32;return r?oh([e,rK.slice(r)]):At(e)}const k4e=zo(iK.toHexString(),32),B4e=zo(nK.toHexString(),32),OB={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},A4=["name","version","chainId","verifyingContract","salt"];function NB(t){return function(e){return typeof e!="string"&&Mr.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const O4e={name:NB("name"),version:NB("version"),chainId:function(t){try{return pr.from(t).toString()}catch{}return Mr.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return ea(t).toLowerCase()}catch{}return Mr.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=nt(t);if(e.length!==32)throw new Error("bad length");return At(e)}catch{}return Mr.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function S4(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&Mr.throwArgumentError("invalid numeric width","type",t);const i=T4e.mask(r?n-1:n),o=r?i.add(iK).mul(I4e):nK;return function(s){const f=pr.from(s);return(f.lt(o)||f.gt(i))&&Mr.throwArgumentError(`value out-of-bounds for ${t}`,"value",s),zo(f.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&Mr.throwArgumentError("invalid bytes width","type",t),function(n){return nt(n).length!==r&&Mr.throwArgumentError(`invalid length for ${t}`,"value",n),R4e(n)}}}switch(t){case"address":return function(e){return zo(ea(e),32)};case"bool":return function(e){return e?k4e:B4e};case"bytes":return function(e){return _n(e)};case"string":return function(e){return bP(e)}}return null}function LB(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Vi{constructor(e){Pt(this,"types",Object.freeze(e5(e))),Pt(this,"_encoderCache",{}),Pt(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(f=>{r[f]={},n[f]=[],i[f]={}});for(const f in e){const d={};e[f].forEach(p=>{d[p.name]&&Mr.throwArgumentError(`duplicate variable name ${JSON.stringify(p.name)} in ${JSON.stringify(f)}`,"types",e),d[p.name]=!0;const b=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];b===f&&Mr.throwArgumentError(`circular type reference to ${JSON.stringify(b)}`,"types",e),!S4(b)&&(n[b]||Mr.throwArgumentError(`unknown type ${JSON.stringify(b)}`,"types",e),n[b].push(f),r[f][b]=!0)})}const o=Object.keys(n).filter(f=>n[f].length===0);o.length===0?Mr.throwArgumentError("missing primary type","types",e):o.length>1&&Mr.throwArgumentError(`ambiguous primary types or unused types: ${o.map(f=>JSON.stringify(f)).join(", ")}`,"types",e),Pt(this,"primaryType",o[0]);function s(f,d){d[f]&&Mr.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),d[f]=!0,Object.keys(r[f]).forEach(p=>{n[p]&&(s(p,d),Object.keys(d).forEach(b=>{i[b][p]=!0}))}),delete d[f]}s(this.primaryType,{});for(const f in i){const d=Object.keys(i[f]);d.sort(),this._types[f]=LB(f,e[f])+d.map(p=>LB(p,e[p])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=S4(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],o=this.getEncoder(i),s=parseInt(r[3]);return f=>{s>=0&&f.length!==s&&Mr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",f);let d=f.map(o);return this._types[i]&&(d=d.map(_n)),_n(oh(d))}}const n=this.types[e];if(n){const i=bP(this._types[e]);return o=>{const s=n.map(({name:f,type:d})=>{const p=this.getEncoder(d)(o[f]);return this._types[d]?_n(p):p});return s.unshift(i),oh(s)}}return Mr.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Mr.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return _n(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(S4(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const s=i[1],f=parseInt(i[3]);return f>=0&&r.length!==f&&Mr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(d=>this._visit(s,d,n))}const o=this.types[e];return o?o.reduce((s,{name:f,type:d})=>(s[f]=this._visit(d,r[f],n),s),{}):Mr.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Vi(e)}static getPrimaryType(e){return Vi.from(e).primaryType}static hashStruct(e,r,n){return Vi.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=OB[n];i||Mr.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>A4.indexOf(n.name)-A4.indexOf(i.name)),Vi.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return oh(["0x1901",Vi.hashDomain(e),Vi.from(r).hash(n)])}static hash(e,r,n){return _n(Vi.encode(e,r,n))}static resolveNames(e,r,n,i){return C4e(this,void 0,void 0,function*(){e=vE(e);const o={};e.verifyingContract&&!li(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=Vi.from(r);s.visit(n,(f,d)=>(f==="address"&&!li(d,20)&&(o[d]="0x"),d));for(const f in o)o[f]=yield i(f);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),n=s.visit(n,(f,d)=>f==="address"&&o[d]?o[d]:d),{domain:e,value:n}})}static getPayload(e,r,n){Vi.hashDomain(e);const i={},o=[];A4.forEach(d=>{const p=e[d];p!=null&&(i[d]=O4e[d](p),o.push({name:d,type:OB[d]}))});const s=Vi.from(r),f=vE(r);return f.EIP712Domain?Mr.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):f.EIP712Domain=o,s.encode(n),{types:f,domain:i,primaryType:s.primaryType,message:s.visit(n,(d,p)=>{if(d.match(/^bytes(\d*)/))return At(nt(p));if(d.match(/^u?int/))return pr.from(p).toString();switch(d){case"address":return p.toLowerCase();case"bool":return!!p;case"string":return typeof p!="string"&&Mr.throwArgumentError("invalid string","value",p),p}return Mr.throwArgumentError("unsupported type","type",d)})}}}const N4e="abstract-provider/5.7.0";var L4e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const D4e=new ut(N4e);class yP{constructor(){D4e.checkAbstract(new.target,yP),Pt(this,"_isProvider",!0)}getFeeData(){return L4e(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield Bd({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)});let n=null,i=null,o=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,o=pr.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const F4e="abstract-signer/5.7.0";var gs=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const bs=new ut(F4e),$4e=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],U4e=[ut.errors.INSUFFICIENT_FUNDS,ut.errors.NONCE_EXPIRED,ut.errors.REPLACEMENT_UNDERPRICED];class vP{constructor(){bs.checkAbstract(new.target,vP),Pt(this,"_isSigner",!0)}getBalance(e){return gs(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return gs(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return gs(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield Bd(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return gs(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield Bd(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return gs(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return gs(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return gs(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return gs(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return gs(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)$4e.indexOf(n)===-1&&bs.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=vE(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&bs.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return gs(this,void 0,void 0,function*(){const r=yield Bd(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>gs(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&bs.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?bs.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&bs.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const o=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=o,r.maxPriorityFeePerGas=o}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&bs.throwError("network does not support EIP-1559",ut.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):bs.throwError("failed to get consistent fee data",ut.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(U4e.indexOf(i.code)>=0)throw i;return bs.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ut.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&bs.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Bd(r)})}_checkProvider(e){this.provider||bs.throwError("missing provider",ut.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}function P1(t,e,r){return r={path:e,exports:{},require:function(n,i){return z4e(n,i??r.path)}},t(r,r.exports),r.exports}function z4e(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var wP=oK;function oK(t,e){if(!t)throw new Error(e||"Assertion failed")}oK.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var Ds=P1(function(t,e){var r=e;function n(s,f){if(Array.isArray(s))return s.slice();if(!s)return[];var d=[];if(typeof s!="string"){for(var p=0;p>8,A=b&255;v?d.push(v,A):d.push(A)}return d}r.toArray=n;function i(s){return s.length===1?"0"+s:s}r.zero2=i;function o(s){for(var f="",d=0;d(A>>1)-1?P=(A>>1)-I:P=I,_.isubn(P)):P=0,v[S]=P,_.iushrn(1)}return v}r.getNAF=n;function i(d,p){var b=[[],[]];d=d.clone(),p=p.clone();for(var v=0,A=0,_;d.cmpn(-v)>0||p.cmpn(-A)>0;){var S=d.andln(3)+v&3,P=p.andln(3)+A&3;S===3&&(S=-1),P===3&&(P=-1);var I;S&1?(_=d.andln(7)+v&7,(_===3||_===5)&&P===2?I=-S:I=S):I=0,b[0].push(I);var C;P&1?(_=p.andln(7)+A&7,(_===3||_===5)&&S===2?C=-P:C=P):C=0,b[1].push(C),2*v===I+1&&(v=1-v),2*A===C+1&&(A=1-A),d.iushrn(1),p.iushrn(1)}return b}r.getJSF=i;function o(d,p,b){var v="_"+p;d.prototype[p]=function(){return this[v]!==void 0?this[v]:this[v]=b.call(this)}}r.cachedProperty=o;function s(d){return typeof d=="string"?r.toArray(d,"hex"):d}r.parseBytes=s;function f(d){return new _t(d,"hex","le")}r.intFromLE=f}),r5=yo.getNAF,j4e=yo.getJSF,n5=yo.assert;function q0(t,e){this.type=t,this.p=new _t(e.p,16),this.red=e.prime?_t.red(e.prime):_t.mont(this.p),this.zero=new _t(0).toRed(this.red),this.one=new _t(1).toRed(this.red),this.two=new _t(2).toRed(this.red),this.n=e.n&&new _t(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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var $l=q0;q0.prototype.point=function(){throw new Error("Not implemented")};q0.prototype.validate=function(){throw new Error("Not implemented")};q0.prototype._fixedNafMul=function(e,r){n5(e.precomputed);var n=e._getDoubles(),i=r5(r,1,this._bitLength),o=(1<=f;p--)d=(d<<1)+i[p];s.push(d)}for(var b=this.jpoint(null,null,null),v=this.jpoint(null,null,null),A=o;A>0;A--){for(f=0;f=0;d--){for(var p=0;d>=0&&s[d]===0;d--)p++;if(d>=0&&p++,f=f.dblp(p),d<0)break;var b=s[d];n5(b!==0),e.type==="affine"?b>0?f=f.mixedAdd(o[b-1>>1]):f=f.mixedAdd(o[-b-1>>1].neg()):b>0?f=f.add(o[b-1>>1]):f=f.add(o[-b-1>>1].neg())}return e.type==="affine"?f.toP():f};q0.prototype._wnafMulAdd=function(e,r,n,i,o){var s=this._wnafT1,f=this._wnafT2,d=this._wnafT3,p=0,b,v,A;for(b=0;b=1;b-=2){var S=b-1,P=b;if(s[S]!==1||s[P]!==1){d[S]=r5(n[S],s[S],this._bitLength),d[P]=r5(n[P],s[P],this._bitLength),p=Math.max(d[S].length,p),p=Math.max(d[P].length,p);continue}var I=[r[S],null,null,r[P]];r[S].y.cmp(r[P].y)===0?(I[1]=r[S].add(r[P]),I[2]=r[S].toJ().mixedAdd(r[P].neg())):r[S].y.cmp(r[P].y.redNeg())===0?(I[1]=r[S].toJ().mixedAdd(r[P]),I[2]=r[S].add(r[P].neg())):(I[1]=r[S].toJ().mixedAdd(r[P]),I[2]=r[S].toJ().mixedAdd(r[P].neg()));var C=[-3,-1,-5,-7,0,7,5,1,3],T=j4e(n[S],n[P]);for(p=Math.max(T[0].length,p),d[S]=new Array(p),d[P]=new Array(p),v=0;v=0;b--){for(var V=0;b>=0;){var Y=!0;for(v=0;v=0&&V++,D=D.dblp(V),b<0)break;for(v=0;v0?A=f[v][W-1>>1]:W<0&&(A=f[v][-W-1>>1].neg()),A.type==="affine"?D=D.mixedAdd(A):D=D.add(A))}}for(b=0;b=Math.ceil((e.bitLength()+1)/r.step):!1};ds.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(_=p,S=b),v.negative&&(v=v.neg(),A=A.neg()),_.negative&&(_=_.neg(),S=S.neg()),[{a:v,b:A},{a:_,b:S}]};hs.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],o=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),f=o.mul(n.a),d=s.mul(i.a),p=o.mul(n.b),b=s.mul(i.b),v=e.sub(f).sub(d),A=p.add(b).neg();return{k1:v,k2:A}};hs.prototype.pointFromX=function(e,r){e=new _t(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)};hs.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};hs.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s":""};En.prototype.isInfinity=function(){return this.inf};En.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 r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};En.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 r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),f=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,f)};En.prototype.getX=function(){return this.x.fromRed()};En.prototype.getY=function(){return this.y.fromRed()};En.prototype.mul=function(e){return e=new _t(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)};En.prototype.mulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};En.prototype.jmulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};En.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)};En.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};En.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 Bn(t,e,r,n){$l.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new _t(0)):(this.x=new _t(e,16),this.y=new _t(r,16),this.z=new _t(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}xP(Bn,$l.BasePoint);hs.prototype.jpoint=function(e,r,n){return new Bn(this,e,r,n)};Bn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};Bn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Bn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),o=e.x.redMul(n),s=this.y.redMul(r.redMul(e.z)),f=e.y.redMul(n.redMul(this.z)),d=i.redSub(o),p=s.redSub(f);if(d.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var b=d.redSqr(),v=b.redMul(d),A=i.redMul(b),_=p.redSqr().redIAdd(v).redISub(A).redISub(A),S=p.redMul(A.redISub(_)).redISub(s.redMul(v)),P=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(_,S,P)};Bn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),o=this.y,s=e.y.redMul(r).redMul(this.z),f=n.redSub(i),d=o.redSub(s);if(f.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=f.redSqr(),b=p.redMul(f),v=n.redMul(p),A=d.redSqr().redIAdd(b).redISub(v).redISub(v),_=d.redMul(v.redISub(A)).redISub(o.redMul(b)),S=this.z.redMul(f);return this.curve.jpoint(A,_,S)};Bn.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};Bn.prototype.inspect=function(){return this.isInfinity()?"":""};Bn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var a2=P1(function(t,e){var r=e;r.base=$l,r.short=q4e,r.mont=null,r.edwards=null}),f2=P1(function(t,e){var r=e,n=yo.assert;function i(f){f.type==="short"?this.curve=new a2.short(f):f.type==="edwards"?this.curve=new a2.edwards(f):this.curve=new a2.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function o(f,d){Object.defineProperty(r,f,{configurable:!0,enumerable:!0,get:function(){var p=new i(d);return Object.defineProperty(r,f,{configurable:!0,enumerable:!0,value:p}),p}})}o("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:Qi.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("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:Qi.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("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:Qi.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("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:Qi.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"]}),o("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:Qi.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"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Qi.sha256,gRed:!1,g:["9"]}),o("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:Qi.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}o("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:Qi.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function I0(t){if(!(this instanceof I0))return new I0(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Ds.toArray(t.entropy,t.entropyEnc||"hex"),r=Ds.toArray(t.nonce,t.nonceEnc||"hex"),n=Ds.toArray(t.pers,t.persEnc||"hex");wP(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var sK=I0;I0.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};I0.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Ds.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var G4e=yo.assert;function Wx(t,e){if(t instanceof Wx)return t;this._importDER(t,e)||(G4e(t.r&&t.s,"Signature without r or s"),this.r=new _t(t.r,16),this.s=new _t(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Jx=Wx;function V4e(){this.place=0}function M4(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return i<=127?!1:(e.place=s,i)}function DB(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Wx.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=DB(r),n=DB(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];_4(i,r.length),i=i.concat(r),i.push(2),_4(i,n.length);var o=i.concat(n),s=[48];return _4(s,o.length),s=s.concat(o),yo.encode(s,e)};var K4e=function(){throw new Error("unsupported")},aK=yo.assert;function Qo(t){if(!(this instanceof Qo))return new Qo(t);typeof t=="string"&&(aK(Object.prototype.hasOwnProperty.call(f2,t),"Unknown curve "+t),t=f2[t]),t instanceof f2.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var W4e=Qo;Qo.prototype.keyPair=function(e){return new EP(this,e)};Qo.prototype.keyFromPrivate=function(e,r){return EP.fromPrivate(this,e,r)};Qo.prototype.keyFromPublic=function(e,r){return EP.fromPublic(this,e,r)};Qo.prototype.genKeyPair=function(e){e||(e={});for(var r=new sK({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||K4e(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new _t(2));;){var o=new _t(r.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};Qo.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Qo.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new _t(e,16));for(var o=this.n.byteLength(),s=r.getPrivate().toArray("be",o),f=e.toArray("be",o),d=new sK({hash:this.hash,entropy:s,nonce:f,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new _t(1)),b=0;;b++){var v=i.k?i.k(b):new _t(d.generate(this.n.byteLength()));if(v=this._truncateToN(v,!0),!(v.cmpn(1)<=0||v.cmp(p)>=0)){var A=this.g.mul(v);if(!A.isInfinity()){var _=A.getX(),S=_.umod(this.n);if(S.cmpn(0)!==0){var P=v.invm(this.n).mul(S.mul(r.getPrivate()).iadd(e));if(P=P.umod(this.n),P.cmpn(0)!==0){var I=(A.getY().isOdd()?1:0)|(_.cmp(S)!==0?2:0);return i.canonical&&P.cmp(this.nh)>0&&(P=this.n.sub(P),I^=1),new Jx({r:S,s:P,recoveryParam:I})}}}}}};Qo.prototype.verify=function(e,r,n,i){e=this._truncateToN(new _t(e,16)),n=this.keyFromPublic(n,i),r=new Jx(r,"hex");var o=r.r,s=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var f=s.invm(this.n),d=f.mul(e).umod(this.n),p=f.mul(o).umod(this.n),b;return this.curve._maxwellTrick?(b=this.g.jmulAdd(d,n.getPublic(),p),b.isInfinity()?!1:b.eqXToP(o)):(b=this.g.mulAdd(d,n.getPublic(),p),b.isInfinity()?!1:b.getX().umod(this.n).cmp(o)===0)};Qo.prototype.recoverPubKey=function(t,e,r,n){aK((3&r)===r,"The recovery param is more than two bits"),e=new Jx(e,n);var i=this.n,o=new _t(t),s=e.r,f=e.s,d=r&1,p=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?s=this.curve.pointFromX(s.add(this.curve.n),d):s=this.curve.pointFromX(s,d);var b=e.r.invm(i),v=i.sub(o).mul(b).umod(i),A=f.mul(b).umod(i);return this.g.mulAdd(v,s,A)};Qo.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Jx(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch{continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var J4e=P1(function(t,e){var r=e;r.version="6.5.4",r.utils=yo,r.rand=function(){throw new Error("unsupported")},r.curve=a2,r.curves=f2,r.ec=W4e,r.eddsa=null}),Z4e=J4e.ec;const Y4e="signing-key/5.7.0",xE=new ut(Y4e);let P4=null;function af(){return P4||(P4=new Z4e("secp256k1")),P4}class sh{constructor(e){Pt(this,"curve","secp256k1"),Pt(this,"privateKey",At(e)),ZV(this.privateKey)!==32&&xE.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=af().keyFromPrivate(nt(this.privateKey));Pt(this,"publicKey","0x"+r.getPublic(!1,"hex")),Pt(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),Pt(this,"_isSigningKey",!0)}_addPoint(e){const r=af().keyFromPublic(nt(this.publicKey)),n=af().keyFromPublic(nt(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=af().keyFromPrivate(nt(this.privateKey)),n=nt(e);n.length!==32&&xE.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return my({recoveryParam:i.recoveryParam,r:zo("0x"+i.r.toString(16),32),s:zo("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=af().keyFromPrivate(nt(this.privateKey)),n=af().keyFromPublic(nt(fK(e)));return zo("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function fK(t,e){const r=nt(t);if(r.length===32){const n=new sh(r);return e?"0x"+af().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?At(r):"0x"+af().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+af().keyFromPublic(r).getPublic(!0,"hex"):At(r)}return xE.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Q4e="transactions/5.7.0",Os=new ut(Q4e);var FB;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(FB||(FB={}));const X4e=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],e9e={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function ah(t){const e=fK(t);return ea(Fg(_n(Fg(e,1)),12))}function Xi(t,e){const r=h0(pr.from(t).toHexString());return r.length>32&&Os.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function C4(t,e){return{address:ea(t),storageKeys:(e||[]).map((r,n)=>(ZV(r)!==32&&Os.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function t9e(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Os.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),C4(r[0],r[1])):C4(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,o)=>(i[o]=!0,i),{});return C4(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function cK(t){return t9e(t).map(e=>[e.address,e.storageKeys])}function r9e(t,e){if(t.gasPrice!=null){const n=pr.from(t.gasPrice),i=pr.from(t.maxFeePerGas||0);n.eq(i)||Os.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[Xi(t.chainId||0,"chainId"),Xi(t.nonce||0,"nonce"),Xi(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Xi(t.maxFeePerGas||0,"maxFeePerGas"),Xi(t.gasLimit||0,"gasLimit"),t.to!=null?ea(t.to):"0x",Xi(t.value||0,"value"),t.data||"0x",cK(t.accessList||[])];if(e){const n=my(e);r.push(Xi(n.recoveryParam,"recoveryParam")),r.push(h0(n.r)),r.push(h0(n.s))}return oh(["0x02",t5(r)])}function n9e(t,e){const r=[Xi(t.chainId||0,"chainId"),Xi(t.nonce||0,"nonce"),Xi(t.gasPrice||0,"gasPrice"),Xi(t.gasLimit||0,"gasLimit"),t.to!=null?ea(t.to):"0x",Xi(t.value||0,"value"),t.data||"0x",cK(t.accessList||[])];if(e){const n=my(e);r.push(Xi(n.recoveryParam,"recoveryParam")),r.push(h0(n.r)),r.push(h0(n.s))}return oh(["0x01",t5(r)])}function i9e(t,e){h4e(t,e9e);const r=[];X4e.forEach(function(s){let f=t[s.name]||[];const d={};s.numeric&&(d.hexPad="left"),f=nt(At(f,d)),s.length&&f.length!==s.length&&f.length>0&&Os.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,f),s.maxLength&&(f=h0(f),f.length>s.maxLength&&Os.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,f)),r.push(At(f))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Os.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!mP(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(At(n)),r.push("0x"),r.push("0x")),!e)return t5(r);const i=my(e);let o=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),o+=n*2+8,i.v>28&&i.v!==o&&Os.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==o&&Os.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(At(o)),r.push(h0(nt(i.r))),r.push(h0(nt(i.s))),t5(r)}function $B(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Os.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),i9e(t,e);switch(t.type){case 1:return n9e(t,e);case 2:return r9e(t,e)}return Os.throwError(`unsupported transaction type: ${t.type}`,ut.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}class uK{constructor(e){Pt(this,"alphabet",e),Pt(this,"base",e.length),Pt(this,"_alphabetMap",{}),Pt(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let o=0;r[o]===0&&o=0;--o)i+=this.alphabet[n[o]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;o>0;)r.push(o&255),o>>=8}for(let n=0;e[n]===this._leader&&n>24&255,d[e.length+1]=v>>16&255,d[e.length+2]=v>>8&255,d[e.length+3]=v&255;let A=nt(i5(i,t,d));o||(o=A.length,b=new Uint8Array(o),s=Math.ceil(n/o),p=n-(s-1)*o),b.set(A);for(let P=1;P=256)throw new Error("Depth too large!");return jB(ja([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",At(this.depth),this.parentFingerprint,zo(At(this.index),4),this.chainCode,this.privateKey!=null?ja(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ro(rd,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~om));const n=new Uint8Array(37);if(e&om){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(nt(this.privateKey),1),r&&(r+="'")}else n.set(nt(this.publicKey));for(let v=24;v>=0;v-=8)n[33+(v>>3)]=e>>24-v&255;const i=nt(i5($g.sha512,this.chainCode,n)),o=i.slice(0,32),s=i.slice(32);let f=null,d=null;this.privateKey?f=pv(pr.from(o).add(this.privateKey).mod(h9e)):d=new sh(At(o))._addPoint(this.publicKey);let p=r;const b=this.mnemonic;return b&&(p=Object.freeze({phrase:b.phrase,path:r,locale:b.locale||"en"})),new Ro(rd,f,d,this.fingerprint,pv(s),e,this.depth+1,p)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=om)throw new Error("invalid path index - "+o);n=n._derive(om+s)}else if(o.match(/^[0-9]+$/)){const s=parseInt(o);if(s>=om)throw new Error("invalid path index - "+o);n=n._derive(s)}else throw new Error("invalid path component - "+o)}return n}static _fromSeed(e,r){const n=nt(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=nt(i5($g.sha512,p9e,n));return new Ro(rd,pv(i.slice(0,32)),null,"0x00000000",pv(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=SP(n),e=MP(pK(e,n),n),Ro._fromSeed(g9e(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ro._fromSeed(e,null)}static fromExtendedKey(e){const r=lK.decode(e);(r.length!==82||jB(r.slice(0,78))!==e)&&o5.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=At(r.slice(5,9)),o=parseInt(At(r.slice(9,13)).substring(2),16),s=At(r.slice(13,45)),f=r.slice(45,78);switch(At(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ro(rd,null,At(f),i,s,o,n,null);case"0x0488ade4":case"0x04358394 ":if(f[0]!==0)break;return new Ro(rd,At(f.slice(1)),null,i,s,o,n,null)}return o5.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function g9e(t,e){e||(e="");const r=Hs("mnemonic"+e,ml.NFKD);return AP(Hs(t,ml.NFKD),r,2048,64,"sha512")}function pK(t,e){e=SP(e),o5.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=nt(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let p=0;p>3]|=1<<7-i%8),i++}const o=32*r.length/3,s=r.length/3,f=hK(s);if((nt(Ug(n.slice(0,o/8)))[0]&f)!==(n[n.length-1]&f))throw new Error("invalid checksum");return At(n.slice(0,o/8))}function MP(t,e){if(e=SP(e),t=nt(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let s=0;s8?(r[r.length-1]<<=8,r[r.length-1]|=t[s],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[s]>>8-n,r.push(t[s]&m9e(8-n)),n+=3);const i=t.length/4,o=nt(Ug(t))[0]&hK(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,e.join(r.map(s=>e.getWord(s)))}const b9e="random/5.7.0",EE=new ut(b9e);function y9e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Je.global<"u")return Je.global;throw new Error("unable to locate global object")}const HB=y9e();let c2=HB.crypto||HB.msCrypto;(!c2||!c2.getRandomValues)&&(EE.warn("WARNING: Missing strong random number source"),c2={getRandomValues:function(t){return EE.throwError("no secure random source avaialble",ut.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Em(t){(t<=0||t>1024||t%1||t!=t)&&EE.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return c2.getRandomValues(e),nt(e)}var mK={exports:{}};(function(t,e){(function(r){function n(g){return parseInt(g)===g}function i(g){if(!n(g.length))return!1;for(var M=0;M255)return!1;return!0}function o(g,M){if(g.buffer&&ArrayBuffer.isView(g)&&g.name==="Uint8Array")return M&&(g.slice?g=g.slice():g=Array.prototype.slice.call(g)),g;if(Array.isArray(g)){if(!i(g))throw new Error("Array contains invalid value: "+g);return new Uint8Array(g)}if(n(g.length)&&i(g))return new Uint8Array(g);throw new Error("unsupported array-like object")}function s(g){return new Uint8Array(g)}function f(g,M,k,L,R){(L!=null||R!=null)&&(g.slice?g=g.slice(L,R):g=Array.prototype.slice.call(g,L,R)),M.set(g,k)}var d=function(){function g(k){var L=[],R=0;for(k=encodeURI(k);R191&&F<224?(L.push(String.fromCharCode((F&31)<<6|k[R+1]&63)),R+=2):(L.push(String.fromCharCode((F&15)<<12|(k[R+1]&63)<<6|k[R+2]&63)),R+=3)}return L.join("")}return{toBytes:g,fromBytes:M}}(),p=function(){function g(L){for(var R=[],F=0;F>4]+M[z&15])}return R.join("")}return{toBytes:g,fromBytes:k}}(),b={16:10,24:12,32:14},v=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],A=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],_=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],S=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],P=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],I=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],C=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],T=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],O=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],B=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],D=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],U=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],K=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Y=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],W=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function ie(g){for(var M=[],k=0;k>2,this._Ke[F][M%4]=R[M],this._Kd[g-F][M%4]=R[M];for(var z=0,V=L,q;V>16&255]<<24^A[q>>8&255]<<16^A[q&255]<<8^A[q>>24&255]^v[z]<<24,z+=1,L!=8)for(var M=1;M>8&255]<<8^A[q>>16&255]<<16^A[q>>24&255]<<24;for(var M=L/2+1;M>2,G=V%4,this._Ke[Q][G]=R[M],this._Kd[g-Q][G]=R[M++],V++}for(var Q=1;Q>24&255]^K[q>>16&255]^Y[q>>8&255]^W[q&255]},x.prototype.encrypt=function(g){if(g.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var M=this._Ke.length-1,k=[0,0,0,0],L=ie(g),R=0;R<4;R++)L[R]^=this._Ke[0][R];for(var F=1;F>24&255]^P[L[(R+1)%4]>>16&255]^I[L[(R+2)%4]>>8&255]^C[L[(R+3)%4]&255]^this._Ke[F][R];L=k.slice()}for(var z=s(16),V,R=0;R<4;R++)V=this._Ke[M][R],z[4*R]=(A[L[R]>>24&255]^V>>24)&255,z[4*R+1]=(A[L[(R+1)%4]>>16&255]^V>>16)&255,z[4*R+2]=(A[L[(R+2)%4]>>8&255]^V>>8)&255,z[4*R+3]=(A[L[(R+3)%4]&255]^V)&255;return z},x.prototype.decrypt=function(g){if(g.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var M=this._Kd.length-1,k=[0,0,0,0],L=ie(g),R=0;R<4;R++)L[R]^=this._Kd[0][R];for(var F=1;F>24&255]^O[L[(R+3)%4]>>16&255]^B[L[(R+2)%4]>>8&255]^D[L[(R+1)%4]&255]^this._Kd[F][R];L=k.slice()}for(var z=s(16),V,R=0;R<4;R++)V=this._Kd[M][R],z[4*R]=(_[L[R]>>24&255]^V>>24)&255,z[4*R+1]=(_[L[(R+3)%4]>>16&255]^V>>16)&255,z[4*R+2]=(_[L[(R+2)%4]>>8&255]^V>>8)&255,z[4*R+3]=(_[L[(R+1)%4]&255]^V)&255;return z};var a=function(g){if(!(this instanceof a))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(g)};a.prototype.encrypt=function(g){if(g=o(g),g.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var M=s(g.length),k=s(16),L=0;L=0;--M)this._counter[M]=g%256,g=g>>8},m.prototype.setBytes=function(g){if(g=o(g,!0),g.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=g},m.prototype.increment=function(){for(var g=15;g>=0;g--)if(this._counter[g]===255)this._counter[g]=0;else{this._counter[g]++;break}};var w=function(g,M){if(!(this instanceof w))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",M instanceof m||(M=new m(M)),this._counter=M,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(g)};w.prototype.encrypt=function(g){for(var M=o(g,!0),k=0;k16)throw new Error("PKCS#7 padding byte out of range");for(var k=g.length-M,L=0;L=64;){let c=C,g=T,M=O,k=B,L=D,R=U,F=K,z=Y,V,q,Q,G,H;for(q=0;q<16;q++)Q=E+q*4,W[q]=(w[Q]&255)<<24|(w[Q+1]&255)<<16|(w[Q+2]&255)<<8|w[Q+3]&255;for(q=16;q<64;q++)V=W[q-2],G=(V>>>17|V<<32-17)^(V>>>19|V<<32-19)^V>>>10,V=W[q-15],H=(V>>>7|V<<32-7)^(V>>>18|V<<32-18)^V>>>3,W[q]=(G+W[q-7]|0)+(H+W[q-16]|0)|0;for(q=0;q<64;q++)G=(((L>>>6|L<<32-6)^(L>>>11|L<<32-11)^(L>>>25|L<<32-25))+(L&R^~L&F)|0)+(z+(I[q]+W[q]|0)|0)|0,H=((c>>>2|c<<32-2)^(c>>>13|c<<32-13)^(c>>>22|c<<32-22))+(c&g^c&M^g&M)|0,z=F,F=R,R=L,L=k+G|0,k=M,M=g,g=c,c=G+H|0;C=C+c|0,T=T+g|0,O=O+M|0,B=B+k|0,D=D+L|0,U=U+R|0,K=K+F|0,Y=Y+z|0,E+=64,y-=64}}ie(P);let x,a=P.length%64,u=P.length/536870912|0,l=P.length<<3,h=a<56?56:120,m=P.slice(P.length-a,P.length);for(m.push(128),x=a+1;x>>24&255),m.push(u>>>16&255),m.push(u>>>8&255),m.push(u>>>0&255),m.push(l>>>24&255),m.push(l>>>16&255),m.push(l>>>8&255),m.push(l>>>0&255),ie(m),[C>>>24&255,C>>>16&255,C>>>8&255,C>>>0&255,T>>>24&255,T>>>16&255,T>>>8&255,T>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,B>>>24&255,B>>>16&255,B>>>8&255,B>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,K>>>24&255,K>>>16&255,K>>>8&255,K>>>0&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y>>>0&255]}function o(P,I,C){P=P.length<=64?P:i(P);const T=64+I.length+4,O=new Array(T),B=new Array(64);let D,U=[];for(D=0;D<64;D++)O[D]=54;for(D=0;D=T-4;Y--){if(O[Y]++,O[Y]<=255)return;O[Y]=0}}for(;C>=32;)K(),U=U.concat(i(B.concat(i(O)))),C-=32;return C>0&&(K(),U=U.concat(i(B.concat(i(O))).slice(0,C))),U}function s(P,I,C,T,O){let B;for(b(P,(2*C-1)*16,O,0,16),B=0;B<2*C;B++)p(P,B*16,O,16),d(O,T),b(O,0,P,I+B*16,16);for(B=0;B>>32-I}function d(P,I){b(P,0,I,0,16);for(let C=8;C>0;C-=2)I[4]^=f(I[0]+I[12],7),I[8]^=f(I[4]+I[0],9),I[12]^=f(I[8]+I[4],13),I[0]^=f(I[12]+I[8],18),I[9]^=f(I[5]+I[1],7),I[13]^=f(I[9]+I[5],9),I[1]^=f(I[13]+I[9],13),I[5]^=f(I[1]+I[13],18),I[14]^=f(I[10]+I[6],7),I[2]^=f(I[14]+I[10],9),I[6]^=f(I[2]+I[14],13),I[10]^=f(I[6]+I[2],18),I[3]^=f(I[15]+I[11],7),I[7]^=f(I[3]+I[15],9),I[11]^=f(I[7]+I[3],13),I[15]^=f(I[11]+I[7],18),I[1]^=f(I[0]+I[3],7),I[2]^=f(I[1]+I[0],9),I[3]^=f(I[2]+I[1],13),I[0]^=f(I[3]+I[2],18),I[6]^=f(I[5]+I[4],7),I[7]^=f(I[6]+I[5],9),I[4]^=f(I[7]+I[6],13),I[5]^=f(I[4]+I[7],18),I[11]^=f(I[10]+I[9],7),I[8]^=f(I[11]+I[10],9),I[9]^=f(I[8]+I[11],13),I[10]^=f(I[9]+I[8],18),I[12]^=f(I[15]+I[14],7),I[13]^=f(I[12]+I[15],9),I[14]^=f(I[13]+I[12],13),I[15]^=f(I[14]+I[13],18);for(let C=0;C<16;++C)P[C]+=I[C]}function p(P,I,C,T){for(let O=0;O=256)return!1}return!0}function A(P,I){if(typeof P!="number"||P%1)throw new Error("invalid "+I);return P}function _(P,I,C,T,O,B,D){if(C=A(C,"N"),T=A(T,"r"),O=A(O,"p"),B=A(B,"dkLen"),C===0||C&C-1)throw new Error("N must be power of 2");if(C>2147483647/128/T)throw new Error("N too large");if(T>2147483647/128/O)throw new Error("r too large");if(!v(P))throw new Error("password must be an array or buffer");if(P=Array.prototype.slice.call(P),!v(I))throw new Error("salt must be an array or buffer");I=Array.prototype.slice.call(I);let U=o(P,I,O*128*T);const K=new Uint32Array(O*32*T);for(let L=0;Lg&&(L=g);for(let F=0;Fg&&(L=g);for(let F=0;F>0&255),U.push(K[F]>>8&255),U.push(K[F]>>16&255),U.push(K[F]>>24&255);const R=o(P,U,B);return D&&D(null,1,R),R}D&&M(k)};if(!D)for(;;){const L=k();if(L!=null)return L}k()}const S={scrypt:function(P,I,C,T,O,B,D){return new Promise(function(U,K){let Y=0;D&&D(0),_(P,I,C,T,O,B,function(W,ie,x){if(W)K(W);else if(x)D&&Y!==1&&D(1),U(new Uint8Array(x));else if(D&&ie!==Y)return Y=ie,D(ie)})})},syncScrypt:function(P,I,C,T,O,B){return new Uint8Array(_(P,I,C,T,O,B))}};t.exports=S})()})(wK);var A9e=wK.exports;const PP=es(A9e);var S9e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const AE=new ut(gK);function qB(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class M9e extends QV{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function _9e(t,e,r){if(Gr(t,"crypto/cipher")==="aes-128-ctr"){const i=Vu(Gr(t,"crypto/cipherparams/iv")),o=new Ca.Counter(i),s=new Ca.ModeOfOperation.ctr(e,o);return nt(s.decrypt(r))}return null}function xK(t,e){const r=Vu(Gr(t,"crypto/ciphertext"));if(At(_n(ja([e.slice(16,32),r]))).substring(2)!==Gr(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=_9e(t,e.slice(0,16),r);i||AE.throwError("unsupported cipher",ut.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=e.slice(32,64),s=ah(i);if(t.address){let d=t.address.toLowerCase();if(d.substring(0,2)!=="0x"&&(d="0x"+d),ea(d)!==s)throw new Error("address mismatch")}const f={_isKeystoreAccount:!0,address:s,privateKey:At(i)};if(Gr(t,"x-ethers/version")==="0.1"){const d=Vu(Gr(t,"x-ethers/mnemonicCiphertext")),p=Vu(Gr(t,"x-ethers/mnemonicCounter")),b=new Ca.Counter(p),v=new Ca.ModeOfOperation.ctr(o,b),A=Gr(t,"x-ethers/path")||zg,_=Gr(t,"x-ethers/locale")||"en",S=nt(v.decrypt(d));try{const P=MP(S,_),I=Ro.fromMnemonic(P,null,_).derivePath(A);if(I.privateKey!=f.privateKey)throw new Error("mnemonic mismatch");f.mnemonic=I.mnemonic}catch(P){if(P.code!==ut.errors.INVALID_ARGUMENT||P.argument!=="wordlist")throw P}}return new M9e(f)}function EK(t,e,r,n,i){return nt(AP(t,e,r,n,i))}function P9e(t,e,r,n,i){return Promise.resolve(EK(t,e,r,n,i))}function AK(t,e,r,n,i){const o=_P(e),s=Gr(t,"crypto/kdf");if(s&&typeof s=="string"){const f=function(d,p){return AE.throwArgumentError("invalid key-derivation function parameters",d,p)};if(s.toLowerCase()==="scrypt"){const d=Vu(Gr(t,"crypto/kdfparams/salt")),p=parseInt(Gr(t,"crypto/kdfparams/n")),b=parseInt(Gr(t,"crypto/kdfparams/r")),v=parseInt(Gr(t,"crypto/kdfparams/p"));(!p||!b||!v)&&f("kdf",s),p&p-1&&f("N",p);const A=parseInt(Gr(t,"crypto/kdfparams/dklen"));return A!==32&&f("dklen",A),n(o,d,p,b,v,64,i)}else if(s.toLowerCase()==="pbkdf2"){const d=Vu(Gr(t,"crypto/kdfparams/salt"));let p=null;const b=Gr(t,"crypto/kdfparams/prf");b==="hmac-sha256"?p="sha256":b==="hmac-sha512"?p="sha512":f("prf",b);const v=parseInt(Gr(t,"crypto/kdfparams/c")),A=parseInt(Gr(t,"crypto/kdfparams/dklen"));return A!==32&&f("dklen",A),r(o,d,v,A,p)}}return AE.throwArgumentError("unsupported key-derivation function","kdf",s)}function C9e(t,e){const r=JSON.parse(t),n=AK(r,e,EK,PP.syncScrypt);return xK(r,n)}function I9e(t,e,r){return S9e(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield AK(n,e,P9e,PP.scrypt,r);return xK(n,i)})}function T9e(t,e,r,n){try{if(ea(t.address)!==ah(t.privateKey))throw new Error("address/privateKey mismatch");if(qB(t)){const I=t.mnemonic;if(Ro.fromMnemonic(I.phrase,null,I.locale).derivePath(I.path||zg).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(I){return Promise.reject(I)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=nt(t.privateKey),o=_P(e);let s=null,f=null,d=null;if(qB(t)){const I=t.mnemonic;s=nt(pK(I.phrase,I.locale||"en")),f=I.path||zg,d=I.locale||"en"}let p=r.client;p||(p="ethers.js");let b=null;r.salt?b=nt(r.salt):b=Em(32);let v=null;if(r.iv){if(v=nt(r.iv),v.length!==16)throw new Error("invalid iv")}else v=Em(16);let A=null;if(r.uuid){if(A=nt(r.uuid),A.length!==16)throw new Error("invalid uuid")}else A=Em(16);let _=1<<17,S=8,P=1;return r.scrypt&&(r.scrypt.N&&(_=r.scrypt.N),r.scrypt.r&&(S=r.scrypt.r),r.scrypt.p&&(P=r.scrypt.p)),PP.scrypt(o,b,_,S,P,64,n).then(I=>{I=nt(I);const C=I.slice(0,16),T=I.slice(16,32),O=I.slice(32,64),B=new Ca.Counter(v),D=new Ca.ModeOfOperation.ctr(C,B),U=nt(D.encrypt(i)),K=_n(ja([T,U])),Y={address:t.address.substring(2).toLowerCase(),id:w9e(A),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:At(v).substring(2)},ciphertext:At(U).substring(2),kdf:"scrypt",kdfparams:{salt:At(b).substring(2),n:_,dklen:32,p:P,r:S},mac:K.substring(2)}};if(s){const W=Em(16),ie=new Ca.Counter(W),x=new Ca.ModeOfOperation.ctr(O,ie),a=nt(x.encrypt(s)),u=new Date,l=u.getUTCFullYear()+"-"+sm(u.getUTCMonth()+1,2)+"-"+sm(u.getUTCDate(),2)+"T"+sm(u.getUTCHours(),2)+"-"+sm(u.getUTCMinutes(),2)+"-"+sm(u.getUTCSeconds(),2)+".0Z";Y["x-ethers"]={client:p,gethFilename:"UTC--"+l+"--"+Y.address,mnemonicCounter:At(W).substring(2),mnemonicCiphertext:At(a).substring(2),path:f,locale:d,version:"0.1"}}return JSON.stringify(Y)})}function R9e(t,e,r){if(yK(t)){r&&r(0);const n=bK(t,e);return r&&r(1),Promise.resolve(n)}return vK(t)?I9e(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function k9e(t,e){if(yK(t))return bK(t,e);if(vK(t))return C9e(t,e);throw new Error("invalid JSON wallet")}const B9e="wallet/5.7.0";var GB=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const nd=new ut(B9e);function O9e(t){return t!=null&&li(t.privateKey,32)&&t.address!=null}function N9e(t){const e=t.mnemonic;return e&&e.phrase}class kc extends vP{constructor(e,r){if(super(),O9e(e)){const n=new sh(e.privateKey);if(Pt(this,"_signingKey",()=>n),Pt(this,"address",ah(this.publicKey)),this.address!==ea(e.address)&&nd.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),N9e(e)){const i=e.mnemonic;Pt(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||zg,locale:i.locale||"en"}));const o=this.mnemonic,s=Ro.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path);ah(s.privateKey)!==this.address&&nd.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else Pt(this,"_mnemonic",()=>null)}else{if(sh.isSigningKey(e))e.curve!=="secp256k1"&&nd.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),Pt(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new sh(e);Pt(this,"_signingKey",()=>n)}Pt(this,"_mnemonic",()=>null),Pt(this,"address",ah(this.publicKey))}r&&!yP.isProvider(r)&&nd.throwArgumentError("invalid provider","provider",r),Pt(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new kc(this,e)}signTransaction(e){return Bd(e).then(r=>{r.from!=null&&(ea(r.from)!==this.address&&nd.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(_n($B(r)));return $B(r,n)})}signMessage(e){return GB(this,void 0,void 0,function*(){return PB(this._signingKey().signDigest(tK(e)))})}_signTypedData(e,r,n){return GB(this,void 0,void 0,function*(){const i=yield Vi.resolveNames(e,r,n,o=>(this.provider==null&&nd.throwError("cannot resolve ENS names without a provider",ut.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:o}),this.provider.resolveName(o)));return PB(this._signingKey().signDigest(Vi.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),T9e(this,e,r,n)}static createRandom(e){let r=Em(16);e||(e={}),e.extraEntropy&&(r=nt(Dg(_n(ja([r,e.extraEntropy])),0,16)));const n=MP(r,e.locale);return kc.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return R9e(e,r,n).then(i=>new kc(i))}static fromEncryptedJsonSync(e,r){return new kc(k9e(e,r))}static fromMnemonic(e,r,n){return r||(r=zg),new kc(Ro.fromMnemonic(e,null,n).derivePath(r))}}const L9e="solidity/5.7.0",D9e=new RegExp("^bytes([0-9]+)$"),F9e=new RegExp("^(u?int)([0-9]*)$"),$9e=new RegExp("^(.*)\\[([0-9]*)\\]$"),U9e="0000000000000000000000000000000000000000000000000000000000000000",ud=new ut(L9e);function SK(t,e,r){switch(t){case"address":return r?s2(e,32):nt(e);case"string":return Hs(e);case"bytes":return nt(e);case"bool":return e=e?"0x01":"0x00",r?s2(e,32):nt(e)}let n=t.match(F9e);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&ud.throwArgumentError("invalid number type","type",t),r&&(i=256),e=pr.from(e).toTwos(i),s2(e,i/8)}if(n=t.match(D9e),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&ud.throwArgumentError("invalid bytes type","type",t),nt(e).byteLength!==i&&ud.throwArgumentError(`invalid value for ${t}`,"value",e),r?nt((e+U9e).substring(0,66)):e}if(n=t.match($9e),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&ud.throwArgumentError(`invalid array length for ${t}`,"value",e);const s=[];return e.forEach(function(f){s.push(SK(i,f,!0))}),ja(s)}return ud.throwArgumentError("invalid type","type",t)}function z9e(t,e){t.length!=e.length&&ud.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(SK(n,e[i]))}),At(ja(r))}function MK(t,e){return _n(z9e(t,e))}const j9e=["function isModuleEnabled(address module) public view returns (bool)","function nonce() public view returns (uint256)","function enableModule(address module) public","function setGuard(address module) public","function execTransaction(address to,uint256 value,bytes calldata data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address payable refundReceiver,bytes memory signatures) public payable returns (bool success)"],_K=async t=>{const e=await S1();return new Na(t,j9e,e)},H9e=async(t,e)=>await(await _K(t)).isModuleEnabled(e),q9e=async(t,e)=>{const r=await _K(t);return{to:t,value:"0",data:(await r.enableModule.populateTransaction(e)).data}},G9e="hh-sol-artifact-1",V9e="Safe2LinkModule",K9e="contracts/Safe2LinkModule.sol",W9e=[{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"_index",type:"uint256"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"},{indexed:!0,internalType:"address",name:"_senderAddress",type:"address"}],name:"LinkEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"message",type:"string"}],name:"MessageEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"_index",type:"uint256"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"},{indexed:!0,internalType:"address",name:"_recipientAddress",type:"address"}],name:"WithdrawEvent",type:"event"},{inputs:[],name:"NAME",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_index",type:"uint256"},{internalType:"address",name:"_recipientAddress",type:"address"},{internalType:"bytes32",name:"_recipientAddressHash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"claimLink",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_pubKey20",type:"address"}],name:"createLink",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getAllLinks",outputs:[{components:[{internalType:"address",name:"pubKey20",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"bool",name:"claimed",type:"bool"},{internalType:"uint40",name:"timestamp",type:"uint40"},{internalType:"address",name:"account",type:"address"}],internalType:"struct Safe2LinkModule.Link[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_index",type:"uint256"}],name:"getLink",outputs:[{components:[{internalType:"address",name:"pubKey20",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"bool",name:"claimed",type:"bool"},{internalType:"uint40",name:"timestamp",type:"uint40"},{internalType:"address",name:"account",type:"address"}],internalType:"struct Safe2LinkModule.Link",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLinkCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"messageHash",type:"bytes32"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"getSigner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"links",outputs:[{internalType:"address",name:"pubKey20",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"bool",name:"claimed",type:"bool"},{internalType:"uint40",name:"timestamp",type:"uint40"},{internalType:"address",name:"account",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"tokens",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],J9e="0x608060405234801561001057600080fd5b506122fd806100206000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3f4df7e11610066578063a3f4df7e14610186578063ef51b79d146101a4578063f56e81fa146101c2578063f7b2ec0d146101f2578063ffa1ad74146102225761009e565b806326091678146100a3578063393b6df3146100d357806348d9cb941461010357806355c3d97a14610121578063881d8a4014610151575b600080fd5b6100bd60048036038101906100b8919061152f565b610240565b6040516100ca91906115cd565b60405180910390f35b6100ed60048036038101906100e891906115e8565b6105fb565b6040516100fa91906116dd565b60405180910390f35b61010b610787565b6040516101189190611822565b60405180910390f35b61013b60048036038101906101369190611844565b610936565b60405161014891906118a6565b60405180910390f35b61016b600480360381019061016691906115e8565b610b7f565b60405161017d969594939291906118df565b60405180910390f35b61018e610c49565b60405161019b91906119bf565b60405180910390f35b6101ac610c82565b6040516101b991906118a6565b60405180910390f35b6101dc60048036038101906101d791906119e1565b610c8f565b6040516101e99190611a34565b60405180910390f35b61020c60048036038101906102079190611a4f565b610cea565b6040516102199190611a34565b60405180910390f35b61022a610d03565b60405161023791906119bf565b60405180910390f35b60006001805490508510610289576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161028090611af7565b60405180910390fd5b60006001868154811061029f5761029e611b17565b5b90600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600015158160600151151514610455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044c90611b92565b60405180910390fd5b610484856040516020016104699190611bfa565b60405160208183030381529060405280519060200120610d3c565b84146104c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104bc90611c61565b60405180910390fd5b60006104d18585610cea565b9050816000015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053c90611ccd565b60405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff16877fa62bf33e3860a18b08244c1b59b8aa4920be374252eb534e0ab47d5f7a18ca18846020015160405161059091906118a6565b60405180910390a360018088815481106105ad576105ac611b17565b5b906000526020600020906004020160020160146101000a81548160ff0219169083151502179055506105ed8260a001518360400151888560200151610d72565b600192505050949350505050565b61060361128a565b6001828154811061061757610616611b17565b5b90600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b60606001805480602002602001604051908101604052809291908181526020016000905b8282101561092d57838290600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050815260200190600101906107ab565b50505050905090565b600060016040518060c001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff1681526020016000151581526020014264ffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160020160146101000a81548160ff02191690831515021790555060808201518160020160156101000a81548164ffffffffff021916908364ffffffffff16021790555060a08201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050503373ffffffffffffffffffffffffffffffffffffffff1660018080549050610b2e9190611d1c565b7fd0b52dbf7f8c29477b6ae9116c857532274475062b33c1f29e0c92f745c1ffbf85604051610b5d91906118a6565b60405180910390a360018080549050610b769190611d1c565b90509392505050565b60018181548110610b8f57600080fd5b90600052602060002090600402016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160149054906101000a900460ff16908060020160159054906101000a900464ffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905086565b6040518060400160405280601081526020017f53616665324c696e6b204d6f64756c650000000000000000000000000000000081525081565b6000600180549050905090565b60006020528260005260406000206020528160005260406000208181548110610cb757600080fd5b90600052602060002001600092509250509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080610cf78484610fca565b90508091505092915050565b6040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b60007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005281601c52603c6000209050919050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610e6b578373ffffffffffffffffffffffffffffffffffffffff1663468721a7838360006040518463ffffffff1660e01b8152600401610de493929190611e5d565b6020604051808303816000875af1158015610e03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e279190611ed3565b610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d90611f4c565b60405180910390fd5b610fc4565b60008282604051602401610e80929190611f8d565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff1660e01b8152600401610f409493929190612035565b6020604051808303816000875af1158015610f5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f839190611ed3565b610fc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb9906120cd565b60405180910390fd5b505b50505050565b6000806000610fd98585610ff1565b91509150610fe681611042565b819250505092915050565b60008060418351036110325760008060006020860151925060408601519150606086015160001a9050611026878285856111a8565b9450945050505061103b565b60006002915091505b9250929050565b6000600481111561105657611055611de6565b5b81600481111561106957611068611de6565b5b03156111a5576001600481111561108357611082611de6565b5b81600481111561109657611095611de6565b5b036110d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cd90612139565b60405180910390fd5b600260048111156110ea576110e9611de6565b5b8160048111156110fd576110fc611de6565b5b0361113d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611134906121a5565b60405180910390fd5b6003600481111561115157611150611de6565b5b81600481111561116457611163611de6565b5b036111a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119b90612237565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156111e3576000600391509150611281565b6000600187878787604051600081526020016040526040516112089493929190612282565b6020604051602081039080840390855afa15801561122a573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361127857600060019250925050611281565b80600092509250505b94509492505050565b6040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600015158152602001600064ffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b6113328161131f565b811461133d57600080fd5b50565b60008135905061134f81611329565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061138082611355565b9050919050565b61139081611375565b811461139b57600080fd5b50565b6000813590506113ad81611387565b92915050565b6000819050919050565b6113c6816113b3565b81146113d157600080fd5b50565b6000813590506113e3816113bd565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61143c826113f3565b810181811067ffffffffffffffff8211171561145b5761145a611404565b5b80604052505050565b600061146e61130b565b905061147a8282611433565b919050565b600067ffffffffffffffff82111561149a57611499611404565b5b6114a3826113f3565b9050602081019050919050565b82818337600083830152505050565b60006114d26114cd8461147f565b611464565b9050828152602081018484840111156114ee576114ed6113ee565b5b6114f98482856114b0565b509392505050565b600082601f830112611516576115156113e9565b5b81356115268482602086016114bf565b91505092915050565b6000806000806080858703121561154957611548611315565b5b600061155787828801611340565b94505060206115688782880161139e565b9350506040611579878288016113d4565b925050606085013567ffffffffffffffff81111561159a5761159961131a565b5b6115a687828801611501565b91505092959194509250565b60008115159050919050565b6115c7816115b2565b82525050565b60006020820190506115e260008301846115be565b92915050565b6000602082840312156115fe576115fd611315565b5b600061160c84828501611340565b91505092915050565b61161e81611375565b82525050565b61162d8161131f565b82525050565b61163c816115b2565b82525050565b600064ffffffffff82169050919050565b61165c81611642565b82525050565b60c0820160008201516116786000850182611615565b50602082015161168b6020850182611624565b50604082015161169e6040850182611615565b5060608201516116b16060850182611633565b5060808201516116c46080850182611653565b5060a08201516116d760a0850182611615565b50505050565b600060c0820190506116f26000830184611662565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60c08201600082015161173a6000850182611615565b50602082015161174d6020850182611624565b5060408201516117606040850182611615565b5060608201516117736060850182611633565b5060808201516117866080850182611653565b5060a082015161179960a0850182611615565b50505050565b60006117ab8383611724565b60c08301905092915050565b6000602082019050919050565b60006117cf826116f8565b6117d98185611703565b93506117e483611714565b8060005b838110156118155781516117fc888261179f565b9750611807836117b7565b9250506001810190506117e8565b5085935050505092915050565b6000602082019050818103600083015261183c81846117c4565b905092915050565b60008060006060848603121561185d5761185c611315565b5b600061186b8682870161139e565b935050602061187c86828701611340565b925050604061188d8682870161139e565b9150509250925092565b6118a08161131f565b82525050565b60006020820190506118bb6000830184611897565b92915050565b6118ca81611375565b82525050565b6118d981611642565b82525050565b600060c0820190506118f460008301896118c1565b6119016020830188611897565b61190e60408301876118c1565b61191b60608301866115be565b61192860808301856118d0565b61193560a08301846118c1565b979650505050505050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561197a57808201518184015260208101905061195f565b60008484015250505050565b600061199182611940565b61199b818561194b565b93506119ab81856020860161195c565b6119b4816113f3565b840191505092915050565b600060208201905081810360008301526119d98184611986565b905092915050565b6000806000606084860312156119fa576119f9611315565b5b6000611a088682870161139e565b9350506020611a198682870161139e565b9250506040611a2a86828701611340565b9150509250925092565b6000602082019050611a4960008301846118c1565b92915050565b60008060408385031215611a6657611a65611315565b5b6000611a74858286016113d4565b925050602083013567ffffffffffffffff811115611a9557611a9461131a565b5b611aa185828601611501565b9150509250929050565b7f4c494e4b20494e44455820444f4553204e4f5420455849535400000000000000600082015250565b6000611ae160198361194b565b9150611aec82611aab565b602082019050919050565b60006020820190508181036000830152611b1081611ad4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4c494e4b20414c52454144592057495448445241574e00000000000000000000600082015250565b6000611b7c60168361194b565b9150611b8782611b46565b602082019050919050565b60006020820190508181036000830152611bab81611b6f565b9050919050565b60008160601b9050919050565b6000611bca82611bb2565b9050919050565b6000611bdc82611bbf565b9050919050565b611bf4611bef82611375565b611bd1565b82525050565b6000611c068284611be3565b60148201915081905092915050565b7f48415348455320444f204e4f54204d4154434800000000000000000000000000600082015250565b6000611c4b60138361194b565b9150611c5682611c15565b602082019050919050565b60006020820190508181036000830152611c7a81611c3e565b9050919050565b7f57524f4e47205349474e41545552450000000000000000000000000000000000600082015250565b6000611cb7600f8361194b565b9150611cc282611c81565b602082019050919050565b60006020820190508181036000830152611ce681611caa565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611d278261131f565b9150611d328361131f565b9250828203905081811115611d4a57611d49611ced565b5b92915050565b6000819050919050565b6000611d75611d70611d6b84611355565b611d50565b611355565b9050919050565b6000611d8782611d5a565b9050919050565b6000611d9982611d7c565b9050919050565b611da981611d8e565b82525050565b600082825260208201905092915050565b50565b6000611dd0600083611daf565b9150611ddb82611dc0565b600082019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110611e2657611e25611de6565b5b50565b6000819050611e3782611e15565b919050565b6000611e4782611e29565b9050919050565b611e5781611e3c565b82525050565b6000608082019050611e726000830186611da0565b611e7f6020830185611897565b8181036040830152611e9081611dc3565b9050611e9f6060830184611e4e565b949350505050565b611eb0816115b2565b8114611ebb57600080fd5b50565b600081519050611ecd81611ea7565b92915050565b600060208284031215611ee957611ee8611315565b5b6000611ef784828501611ebe565b91505092915050565b7f436f756c64206e6f742065786563757465206574686572207472616e73666572600082015250565b6000611f3660208361194b565b9150611f4182611f00565b602082019050919050565b60006020820190508181036000830152611f6581611f29565b9050919050565b6000611f7782611355565b9050919050565b611f8781611f6c565b82525050565b6000604082019050611fa26000830185611f7e565b611faf6020830184611897565b9392505050565b6000819050919050565b6000611fdb611fd6611fd184611fb6565b611d50565b61131f565b9050919050565b611feb81611fc0565b82525050565b600081519050919050565b600061200782611ff1565b6120118185611daf565b935061202181856020860161195c565b61202a816113f3565b840191505092915050565b600060808201905061204a60008301876118c1565b6120576020830186611fe2565b81810360408301526120698185611ffc565b90506120786060830184611e4e565b95945050505050565b7f436f756c64206e6f74206578656375746520746f6b656e207472616e73666572600082015250565b60006120b760208361194b565b91506120c282612081565b602082019050919050565b600060208201905081810360008301526120e6816120aa565b9050919050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061212360188361194b565b915061212e826120ed565b602082019050919050565b6000602082019050818103600083015261215281612116565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061218f601f8361194b565b915061219a82612159565b602082019050919050565b600060208201905081810360008301526121be81612182565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061222160228361194b565b915061222c826121c5565b604082019050919050565b6000602082019050818103600083015261225081612214565b9050919050565b612260816113b3565b82525050565b600060ff82169050919050565b61227c81612266565b82525050565b60006080820190506122976000830187612257565b6122a46020830186612273565b6122b16040830185612257565b6122be6060830184612257565b9594505050505056fea2646970667358221220d4cfcae48dcd9cb39e8e8efbdf1eeec788e79274901739cdd0ee4771a47cfb8064736f6c63430008130033",Z9e="0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3f4df7e11610066578063a3f4df7e14610186578063ef51b79d146101a4578063f56e81fa146101c2578063f7b2ec0d146101f2578063ffa1ad74146102225761009e565b806326091678146100a3578063393b6df3146100d357806348d9cb941461010357806355c3d97a14610121578063881d8a4014610151575b600080fd5b6100bd60048036038101906100b8919061152f565b610240565b6040516100ca91906115cd565b60405180910390f35b6100ed60048036038101906100e891906115e8565b6105fb565b6040516100fa91906116dd565b60405180910390f35b61010b610787565b6040516101189190611822565b60405180910390f35b61013b60048036038101906101369190611844565b610936565b60405161014891906118a6565b60405180910390f35b61016b600480360381019061016691906115e8565b610b7f565b60405161017d969594939291906118df565b60405180910390f35b61018e610c49565b60405161019b91906119bf565b60405180910390f35b6101ac610c82565b6040516101b991906118a6565b60405180910390f35b6101dc60048036038101906101d791906119e1565b610c8f565b6040516101e99190611a34565b60405180910390f35b61020c60048036038101906102079190611a4f565b610cea565b6040516102199190611a34565b60405180910390f35b61022a610d03565b60405161023791906119bf565b60405180910390f35b60006001805490508510610289576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161028090611af7565b60405180910390fd5b60006001868154811061029f5761029e611b17565b5b90600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600015158160600151151514610455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044c90611b92565b60405180910390fd5b610484856040516020016104699190611bfa565b60405160208183030381529060405280519060200120610d3c565b84146104c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104bc90611c61565b60405180910390fd5b60006104d18585610cea565b9050816000015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053c90611ccd565b60405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff16877fa62bf33e3860a18b08244c1b59b8aa4920be374252eb534e0ab47d5f7a18ca18846020015160405161059091906118a6565b60405180910390a360018088815481106105ad576105ac611b17565b5b906000526020600020906004020160020160146101000a81548160ff0219169083151502179055506105ed8260a001518360400151888560200151610d72565b600192505050949350505050565b61060361128a565b6001828154811061061757610616611b17565b5b90600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b60606001805480602002602001604051908101604052809291908181526020016000905b8282101561092d57838290600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050815260200190600101906107ab565b50505050905090565b600060016040518060c001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff1681526020016000151581526020014264ffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160020160146101000a81548160ff02191690831515021790555060808201518160020160156101000a81548164ffffffffff021916908364ffffffffff16021790555060a08201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050503373ffffffffffffffffffffffffffffffffffffffff1660018080549050610b2e9190611d1c565b7fd0b52dbf7f8c29477b6ae9116c857532274475062b33c1f29e0c92f745c1ffbf85604051610b5d91906118a6565b60405180910390a360018080549050610b769190611d1c565b90509392505050565b60018181548110610b8f57600080fd5b90600052602060002090600402016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160149054906101000a900460ff16908060020160159054906101000a900464ffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905086565b6040518060400160405280601081526020017f53616665324c696e6b204d6f64756c650000000000000000000000000000000081525081565b6000600180549050905090565b60006020528260005260406000206020528160005260406000208181548110610cb757600080fd5b90600052602060002001600092509250509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080610cf78484610fca565b90508091505092915050565b6040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b60007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005281601c52603c6000209050919050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610e6b578373ffffffffffffffffffffffffffffffffffffffff1663468721a7838360006040518463ffffffff1660e01b8152600401610de493929190611e5d565b6020604051808303816000875af1158015610e03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e279190611ed3565b610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d90611f4c565b60405180910390fd5b610fc4565b60008282604051602401610e80929190611f8d565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff1660e01b8152600401610f409493929190612035565b6020604051808303816000875af1158015610f5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f839190611ed3565b610fc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb9906120cd565b60405180910390fd5b505b50505050565b6000806000610fd98585610ff1565b91509150610fe681611042565b819250505092915050565b60008060418351036110325760008060006020860151925060408601519150606086015160001a9050611026878285856111a8565b9450945050505061103b565b60006002915091505b9250929050565b6000600481111561105657611055611de6565b5b81600481111561106957611068611de6565b5b03156111a5576001600481111561108357611082611de6565b5b81600481111561109657611095611de6565b5b036110d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cd90612139565b60405180910390fd5b600260048111156110ea576110e9611de6565b5b8160048111156110fd576110fc611de6565b5b0361113d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611134906121a5565b60405180910390fd5b6003600481111561115157611150611de6565b5b81600481111561116457611163611de6565b5b036111a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119b90612237565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156111e3576000600391509150611281565b6000600187878787604051600081526020016040526040516112089493929190612282565b6020604051602081039080840390855afa15801561122a573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361127857600060019250925050611281565b80600092509250505b94509492505050565b6040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600015158152602001600064ffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b6113328161131f565b811461133d57600080fd5b50565b60008135905061134f81611329565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061138082611355565b9050919050565b61139081611375565b811461139b57600080fd5b50565b6000813590506113ad81611387565b92915050565b6000819050919050565b6113c6816113b3565b81146113d157600080fd5b50565b6000813590506113e3816113bd565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61143c826113f3565b810181811067ffffffffffffffff8211171561145b5761145a611404565b5b80604052505050565b600061146e61130b565b905061147a8282611433565b919050565b600067ffffffffffffffff82111561149a57611499611404565b5b6114a3826113f3565b9050602081019050919050565b82818337600083830152505050565b60006114d26114cd8461147f565b611464565b9050828152602081018484840111156114ee576114ed6113ee565b5b6114f98482856114b0565b509392505050565b600082601f830112611516576115156113e9565b5b81356115268482602086016114bf565b91505092915050565b6000806000806080858703121561154957611548611315565b5b600061155787828801611340565b94505060206115688782880161139e565b9350506040611579878288016113d4565b925050606085013567ffffffffffffffff81111561159a5761159961131a565b5b6115a687828801611501565b91505092959194509250565b60008115159050919050565b6115c7816115b2565b82525050565b60006020820190506115e260008301846115be565b92915050565b6000602082840312156115fe576115fd611315565b5b600061160c84828501611340565b91505092915050565b61161e81611375565b82525050565b61162d8161131f565b82525050565b61163c816115b2565b82525050565b600064ffffffffff82169050919050565b61165c81611642565b82525050565b60c0820160008201516116786000850182611615565b50602082015161168b6020850182611624565b50604082015161169e6040850182611615565b5060608201516116b16060850182611633565b5060808201516116c46080850182611653565b5060a08201516116d760a0850182611615565b50505050565b600060c0820190506116f26000830184611662565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60c08201600082015161173a6000850182611615565b50602082015161174d6020850182611624565b5060408201516117606040850182611615565b5060608201516117736060850182611633565b5060808201516117866080850182611653565b5060a082015161179960a0850182611615565b50505050565b60006117ab8383611724565b60c08301905092915050565b6000602082019050919050565b60006117cf826116f8565b6117d98185611703565b93506117e483611714565b8060005b838110156118155781516117fc888261179f565b9750611807836117b7565b9250506001810190506117e8565b5085935050505092915050565b6000602082019050818103600083015261183c81846117c4565b905092915050565b60008060006060848603121561185d5761185c611315565b5b600061186b8682870161139e565b935050602061187c86828701611340565b925050604061188d8682870161139e565b9150509250925092565b6118a08161131f565b82525050565b60006020820190506118bb6000830184611897565b92915050565b6118ca81611375565b82525050565b6118d981611642565b82525050565b600060c0820190506118f460008301896118c1565b6119016020830188611897565b61190e60408301876118c1565b61191b60608301866115be565b61192860808301856118d0565b61193560a08301846118c1565b979650505050505050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561197a57808201518184015260208101905061195f565b60008484015250505050565b600061199182611940565b61199b818561194b565b93506119ab81856020860161195c565b6119b4816113f3565b840191505092915050565b600060208201905081810360008301526119d98184611986565b905092915050565b6000806000606084860312156119fa576119f9611315565b5b6000611a088682870161139e565b9350506020611a198682870161139e565b9250506040611a2a86828701611340565b9150509250925092565b6000602082019050611a4960008301846118c1565b92915050565b60008060408385031215611a6657611a65611315565b5b6000611a74858286016113d4565b925050602083013567ffffffffffffffff811115611a9557611a9461131a565b5b611aa185828601611501565b9150509250929050565b7f4c494e4b20494e44455820444f4553204e4f5420455849535400000000000000600082015250565b6000611ae160198361194b565b9150611aec82611aab565b602082019050919050565b60006020820190508181036000830152611b1081611ad4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4c494e4b20414c52454144592057495448445241574e00000000000000000000600082015250565b6000611b7c60168361194b565b9150611b8782611b46565b602082019050919050565b60006020820190508181036000830152611bab81611b6f565b9050919050565b60008160601b9050919050565b6000611bca82611bb2565b9050919050565b6000611bdc82611bbf565b9050919050565b611bf4611bef82611375565b611bd1565b82525050565b6000611c068284611be3565b60148201915081905092915050565b7f48415348455320444f204e4f54204d4154434800000000000000000000000000600082015250565b6000611c4b60138361194b565b9150611c5682611c15565b602082019050919050565b60006020820190508181036000830152611c7a81611c3e565b9050919050565b7f57524f4e47205349474e41545552450000000000000000000000000000000000600082015250565b6000611cb7600f8361194b565b9150611cc282611c81565b602082019050919050565b60006020820190508181036000830152611ce681611caa565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611d278261131f565b9150611d328361131f565b9250828203905081811115611d4a57611d49611ced565b5b92915050565b6000819050919050565b6000611d75611d70611d6b84611355565b611d50565b611355565b9050919050565b6000611d8782611d5a565b9050919050565b6000611d9982611d7c565b9050919050565b611da981611d8e565b82525050565b600082825260208201905092915050565b50565b6000611dd0600083611daf565b9150611ddb82611dc0565b600082019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110611e2657611e25611de6565b5b50565b6000819050611e3782611e15565b919050565b6000611e4782611e29565b9050919050565b611e5781611e3c565b82525050565b6000608082019050611e726000830186611da0565b611e7f6020830185611897565b8181036040830152611e9081611dc3565b9050611e9f6060830184611e4e565b949350505050565b611eb0816115b2565b8114611ebb57600080fd5b50565b600081519050611ecd81611ea7565b92915050565b600060208284031215611ee957611ee8611315565b5b6000611ef784828501611ebe565b91505092915050565b7f436f756c64206e6f742065786563757465206574686572207472616e73666572600082015250565b6000611f3660208361194b565b9150611f4182611f00565b602082019050919050565b60006020820190508181036000830152611f6581611f29565b9050919050565b6000611f7782611355565b9050919050565b611f8781611f6c565b82525050565b6000604082019050611fa26000830185611f7e565b611faf6020830184611897565b9392505050565b6000819050919050565b6000611fdb611fd6611fd184611fb6565b611d50565b61131f565b9050919050565b611feb81611fc0565b82525050565b600081519050919050565b600061200782611ff1565b6120118185611daf565b935061202181856020860161195c565b61202a816113f3565b840191505092915050565b600060808201905061204a60008301876118c1565b6120576020830186611fe2565b81810360408301526120698185611ffc565b90506120786060830184611e4e565b95945050505050565b7f436f756c64206e6f74206578656375746520746f6b656e207472616e73666572600082015250565b60006120b760208361194b565b91506120c282612081565b602082019050919050565b600060208201905081810360008301526120e6816120aa565b9050919050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061212360188361194b565b915061212e826120ed565b602082019050919050565b6000602082019050818103600083015261215281612116565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061218f601f8361194b565b915061219a82612159565b602082019050919050565b600060208201905081810360008301526121be81612182565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061222160228361194b565b915061222c826121c5565b604082019050919050565b6000602082019050818103600083015261225081612214565b9050919050565b612260816113b3565b82525050565b600060ff82169050919050565b61227c81612266565b82525050565b60006080820190506122976000830187612257565b6122a46020830186612273565b6122b16040830185612257565b6122be6060830184612257565b9594505050505056fea2646970667358221220d4cfcae48dcd9cb39e8e8efbdf1eeec788e79274901739cdd0ee4771a47cfb8064736f6c63430008130033",Y9e={},Q9e={},Zx={_format:G9e,contractName:V9e,sourceName:K9e,abi:W9e,bytecode:J9e,deployedBytecode:Z9e,linkReferences:Y9e,deployedLinkReferences:Q9e},PK=TG({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0});function Xo(t,e,r=e.name){return n=>{var i;return((i=t[r])==null?void 0:i.call(t,n))??e(t,n)}}const X9e=async t=>Number(await t.request({method:"eth_chainId",params:[]})),e7e={"0x0":"reverted","0x1":"success"};function jg(t){if(typeof t!="function")return t==null||typeof t=="string"||typeof t=="boolean"?t:typeof t=="bigint"?Ft(t):t._isBigNumber!=null||typeof t!="object"?Ft(t).replace(/^0x0/,"0x"):Array.isArray(t)?t.map(e=>jg(e)):Object.keys(t).reduce((e,r)=>(e[r]=jg(t[r]),e),{})}const CK=async(t,e)=>{const{userOperation:r,entryPoint:n}=e,i=await t.request({method:"eth_estimateUserOperationGas",params:[jg(r),n]});return{preVerificationGas:BigInt(i.preVerificationGas||0),verificationGasLimit:BigInt(i.verificationGasLimit||0),callGasLimit:BigInt(i.callGasLimit||0)}},t7e=async(t,{hash:e})=>{const r=[e],n=await t.request({method:"eth_getUserOperationByHash",params:r});if(!n)return null;const{userOperation:i,entryPoint:o,transactionHash:s,blockHash:f,blockNumber:d}=n;return{userOperation:{...i,nonce:BigInt(i.nonce),callGasLimit:BigInt(i.callGasLimit),verificationGasLimit:BigInt(i.verificationGasLimit),preVerificationGas:BigInt(i.preVerificationGas),maxFeePerGas:BigInt(i.maxFeePerGas),maxPriorityFeePerGas:BigInt(i.maxPriorityFeePerGas)},entryPoint:o,transactionHash:s,blockHash:f,blockNumber:BigInt(d)}},IK=async(t,{hash:e})=>{const r=[e],n=await t.request({method:"eth_getUserOperationReceipt",params:r});return n?{userOpHash:n.userOpHash,sender:n.sender,nonce:BigInt(n.nonce),actualGasUsed:BigInt(n.actualGasUsed),actualGasCost:BigInt(n.actualGasCost),success:n.success,receipt:{transactionHash:n.receipt.transactionHash,transactionIndex:BigInt(n.receipt.transactionIndex),blockHash:n.receipt.blockHash,blockNumber:BigInt(n.receipt.blockNumber),from:n.receipt.from,to:n.receipt.to,cumulativeGasUsed:BigInt(n.receipt.cumulativeGasUsed),status:e7e[n.receipt.status],gasUsed:BigInt(n.receipt.gasUsed),contractAddress:n.receipt.contractAddress,logsBloom:n.receipt.logsBloom,effectiveGasPrice:BigInt(n.receipt.effectiveGasPrice)},logs:n.logs.map(o=>({data:o.data,blockNumber:BigInt(o.blockNumber),blockHash:o.blockHash,transactionHash:o.transactionHash,logIndex:BigInt(o.logIndex),transactionIndex:BigInt(o.transactionIndex),address:o.address,topics:o.topics}))}:null},TK=async(t,e)=>{const{userOperation:r,entryPoint:n}=e;return t.request({method:"eth_sendUserOperation",params:[jg(r),n]})},r7e=async t=>t.request({method:"eth_supportedEntryPoints",params:[]}),I4=new Map,VB=new Map;let n7e=0;function i7e(t,e,r){const n=++n7e,i=()=>I4.get(t)||[],o=()=>{const b=i();I4.set(t,b.filter(v=>v.id!==n))},s=()=>{const b=VB.get(t);i().length===1&&b&&b(),o()},f=i();if(I4.set(t,[...f,{id:n,fns:e}]),f&&f.length>0)return s;const d={};for(const b in e)d[b]=(...v)=>{var _,S;const A=i();if(A.length!==0)for(const P of A)(S=(_=P.fns)[b])==null||S.call(_,...v)};const p=r(d);return typeof p=="function"&&VB.set(t,p),s}class o7e extends qe{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForUserOperationReceiptTimeoutError"})}}const Yx=(t,{hash:e,pollingInterval:r=t.pollingInterval,timeout:n})=>{const i=fn(["waitForUserOperationReceipt",t.uid,e]);let o;return new Promise((s,f)=>{n&&setTimeout(()=>f(new o7e({hash:e})),n);const d=i7e(i,{resolve:s,reject:f},async p=>{const b=setInterval(async()=>{const v=_=>{clearInterval(b),_(),d()},A=await Xo(t,IK)({hash:e});if(A!==null&&(o=A),o){v(()=>p.resolve(o));return}},r)})})},s7e=async(t,{sender:e,entryPoint:r,key:n=BigInt(0)})=>await Xo(t,Xs)({address:r,abi:[{inputs:[{name:"sender",type:"address"},{name:"key",type:"uint192"}],name:"getNonce",outputs:[{name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"getNonce",args:[e,n]}),a7e=t=>({sendUserOperation:async e=>TK(t,e),estimateUserOperationGas:e=>CK(t,e),supportedEntryPoints:()=>r7e(t),chainId:()=>X9e(t),getUserOperationByHash:e=>t7e(t,e),getUserOperationReceipt:e=>IK(t,e),waitForUserOperationReceipt:e=>Yx(t,e)});class KB extends qe{constructor({docsPath:e}={}){super(["A smart account cannot sign or send transaction, it can only sign message or userOperation.","Please send user operation instead."].join(` +`)}static register(e,r){r||(r=e.locale)}}const u9e="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let Gm=null;function UB(t){if(Gm==null&&(Gm=u9e.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),gy.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Gm=null,new Error("BIP39 Wordlist for en (English) FAILED")}class l9e extends gy{constructor(){super("en")}getWord(e){return UB(this),Gm[e]}getWordIndex(e){return UB(this),Gm.indexOf(e)}}const dK=new l9e;gy.register(dK);const zB={en:dK},d9e="hdnode/5.7.0",o5=new ut(d9e),h9e=pr.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),p9e=Hs("Bitcoin seed"),sm=2147483648;function hK(t){return(1<=256)throw new Error("Depth too large!");return jB(ja([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",At(this.depth),this.parentFingerprint,zo(At(this.index),4),this.chainCode,this.privateKey!=null?ja(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ro(rd,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~sm));const n=new Uint8Array(37);if(e&sm){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(nt(this.privateKey),1),r&&(r+="'")}else n.set(nt(this.publicKey));for(let v=24;v>=0;v-=8)n[33+(v>>3)]=e>>24-v&255;const i=nt(i5(Ug.sha512,this.chainCode,n)),o=i.slice(0,32),s=i.slice(32);let f=null,d=null;this.privateKey?f=pv(pr.from(o).add(this.privateKey).mod(h9e)):d=new sh(At(o))._addPoint(this.publicKey);let p=r;const b=this.mnemonic;return b&&(p=Object.freeze({phrase:b.phrase,path:r,locale:b.locale||"en"})),new Ro(rd,f,d,this.fingerprint,pv(s),e,this.depth+1,p)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=sm)throw new Error("invalid path index - "+o);n=n._derive(sm+s)}else if(o.match(/^[0-9]+$/)){const s=parseInt(o);if(s>=sm)throw new Error("invalid path index - "+o);n=n._derive(s)}else throw new Error("invalid path component - "+o)}return n}static _fromSeed(e,r){const n=nt(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=nt(i5(Ug.sha512,p9e,n));return new Ro(rd,pv(i.slice(0,32)),null,"0x00000000",pv(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=SP(n),e=MP(pK(e,n),n),Ro._fromSeed(g9e(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ro._fromSeed(e,null)}static fromExtendedKey(e){const r=lK.decode(e);(r.length!==82||jB(r.slice(0,78))!==e)&&o5.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=At(r.slice(5,9)),o=parseInt(At(r.slice(9,13)).substring(2),16),s=At(r.slice(13,45)),f=r.slice(45,78);switch(At(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ro(rd,null,At(f),i,s,o,n,null);case"0x0488ade4":case"0x04358394 ":if(f[0]!==0)break;return new Ro(rd,At(f.slice(1)),null,i,s,o,n,null)}return o5.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function g9e(t,e){e||(e="");const r=Hs("mnemonic"+e,ml.NFKD);return AP(Hs(t,ml.NFKD),r,2048,64,"sha512")}function pK(t,e){e=SP(e),o5.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=nt(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let p=0;p>3]|=1<<7-i%8),i++}const o=32*r.length/3,s=r.length/3,f=hK(s);if((nt(zg(n.slice(0,o/8)))[0]&f)!==(n[n.length-1]&f))throw new Error("invalid checksum");return At(n.slice(0,o/8))}function MP(t,e){if(e=SP(e),t=nt(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let s=0;s8?(r[r.length-1]<<=8,r[r.length-1]|=t[s],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[s]>>8-n,r.push(t[s]&m9e(8-n)),n+=3);const i=t.length/4,o=nt(zg(t))[0]&hK(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,e.join(r.map(s=>e.getWord(s)))}const b9e="random/5.7.0",EE=new ut(b9e);function y9e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Je.global<"u")return Je.global;throw new Error("unable to locate global object")}const HB=y9e();let c2=HB.crypto||HB.msCrypto;(!c2||!c2.getRandomValues)&&(EE.warn("WARNING: Missing strong random number source"),c2={getRandomValues:function(t){return EE.throwError("no secure random source avaialble",ut.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Am(t){(t<=0||t>1024||t%1||t!=t)&&EE.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return c2.getRandomValues(e),nt(e)}var mK={exports:{}};(function(t,e){(function(r){function n(g){return parseInt(g)===g}function i(g){if(!n(g.length))return!1;for(var M=0;M255)return!1;return!0}function o(g,M){if(g.buffer&&ArrayBuffer.isView(g)&&g.name==="Uint8Array")return M&&(g.slice?g=g.slice():g=Array.prototype.slice.call(g)),g;if(Array.isArray(g)){if(!i(g))throw new Error("Array contains invalid value: "+g);return new Uint8Array(g)}if(n(g.length)&&i(g))return new Uint8Array(g);throw new Error("unsupported array-like object")}function s(g){return new Uint8Array(g)}function f(g,M,B,L,R){(L!=null||R!=null)&&(g.slice?g=g.slice(L,R):g=Array.prototype.slice.call(g,L,R)),M.set(g,B)}var d=function(){function g(B){var L=[],R=0;for(B=encodeURI(B);R191&&F<224?(L.push(String.fromCharCode((F&31)<<6|B[R+1]&63)),R+=2):(L.push(String.fromCharCode((F&15)<<12|(B[R+1]&63)<<6|B[R+2]&63)),R+=3)}return L.join("")}return{toBytes:g,fromBytes:M}}(),p=function(){function g(L){for(var R=[],F=0;F>4]+M[z&15])}return R.join("")}return{toBytes:g,fromBytes:B}}(),b={16:10,24:12,32:14},v=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],A=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],_=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],S=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],P=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],I=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],C=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],T=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],k=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],O=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],D=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],U=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],V=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Y=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],W=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function ie(g){for(var M=[],B=0;B>2,this._Ke[F][M%4]=R[M],this._Kd[g-F][M%4]=R[M];for(var z=0,K=L,q;K>16&255]<<24^A[q>>8&255]<<16^A[q&255]<<8^A[q>>24&255]^v[z]<<24,z+=1,L!=8)for(var M=1;M>8&255]<<8^A[q>>16&255]<<16^A[q>>24&255]<<24;for(var M=L/2+1;M>2,G=K%4,this._Ke[Q][G]=R[M],this._Kd[g-Q][G]=R[M++],K++}for(var Q=1;Q>24&255]^V[q>>16&255]^Y[q>>8&255]^W[q&255]},x.prototype.encrypt=function(g){if(g.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var M=this._Ke.length-1,B=[0,0,0,0],L=ie(g),R=0;R<4;R++)L[R]^=this._Ke[0][R];for(var F=1;F>24&255]^P[L[(R+1)%4]>>16&255]^I[L[(R+2)%4]>>8&255]^C[L[(R+3)%4]&255]^this._Ke[F][R];L=B.slice()}for(var z=s(16),K,R=0;R<4;R++)K=this._Ke[M][R],z[4*R]=(A[L[R]>>24&255]^K>>24)&255,z[4*R+1]=(A[L[(R+1)%4]>>16&255]^K>>16)&255,z[4*R+2]=(A[L[(R+2)%4]>>8&255]^K>>8)&255,z[4*R+3]=(A[L[(R+3)%4]&255]^K)&255;return z},x.prototype.decrypt=function(g){if(g.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var M=this._Kd.length-1,B=[0,0,0,0],L=ie(g),R=0;R<4;R++)L[R]^=this._Kd[0][R];for(var F=1;F>24&255]^k[L[(R+3)%4]>>16&255]^O[L[(R+2)%4]>>8&255]^D[L[(R+1)%4]&255]^this._Kd[F][R];L=B.slice()}for(var z=s(16),K,R=0;R<4;R++)K=this._Kd[M][R],z[4*R]=(_[L[R]>>24&255]^K>>24)&255,z[4*R+1]=(_[L[(R+3)%4]>>16&255]^K>>16)&255,z[4*R+2]=(_[L[(R+2)%4]>>8&255]^K>>8)&255,z[4*R+3]=(_[L[(R+1)%4]&255]^K)&255;return z};var a=function(g){if(!(this instanceof a))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(g)};a.prototype.encrypt=function(g){if(g=o(g),g.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var M=s(g.length),B=s(16),L=0;L=0;--M)this._counter[M]=g%256,g=g>>8},m.prototype.setBytes=function(g){if(g=o(g,!0),g.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=g},m.prototype.increment=function(){for(var g=15;g>=0;g--)if(this._counter[g]===255)this._counter[g]=0;else{this._counter[g]++;break}};var w=function(g,M){if(!(this instanceof w))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",M instanceof m||(M=new m(M)),this._counter=M,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(g)};w.prototype.encrypt=function(g){for(var M=o(g,!0),B=0;B16)throw new Error("PKCS#7 padding byte out of range");for(var B=g.length-M,L=0;L=64;){let c=C,g=T,M=k,B=O,L=D,R=U,F=V,z=Y,K,q,Q,G,H;for(q=0;q<16;q++)Q=E+q*4,W[q]=(w[Q]&255)<<24|(w[Q+1]&255)<<16|(w[Q+2]&255)<<8|w[Q+3]&255;for(q=16;q<64;q++)K=W[q-2],G=(K>>>17|K<<32-17)^(K>>>19|K<<32-19)^K>>>10,K=W[q-15],H=(K>>>7|K<<32-7)^(K>>>18|K<<32-18)^K>>>3,W[q]=(G+W[q-7]|0)+(H+W[q-16]|0)|0;for(q=0;q<64;q++)G=(((L>>>6|L<<32-6)^(L>>>11|L<<32-11)^(L>>>25|L<<32-25))+(L&R^~L&F)|0)+(z+(I[q]+W[q]|0)|0)|0,H=((c>>>2|c<<32-2)^(c>>>13|c<<32-13)^(c>>>22|c<<32-22))+(c&g^c&M^g&M)|0,z=F,F=R,R=L,L=B+G|0,B=M,M=g,g=c,c=G+H|0;C=C+c|0,T=T+g|0,k=k+M|0,O=O+B|0,D=D+L|0,U=U+R|0,V=V+F|0,Y=Y+z|0,E+=64,y-=64}}ie(P);let x,a=P.length%64,u=P.length/536870912|0,l=P.length<<3,h=a<56?56:120,m=P.slice(P.length-a,P.length);for(m.push(128),x=a+1;x>>24&255),m.push(u>>>16&255),m.push(u>>>8&255),m.push(u>>>0&255),m.push(l>>>24&255),m.push(l>>>16&255),m.push(l>>>8&255),m.push(l>>>0&255),ie(m),[C>>>24&255,C>>>16&255,C>>>8&255,C>>>0&255,T>>>24&255,T>>>16&255,T>>>8&255,T>>>0&255,k>>>24&255,k>>>16&255,k>>>8&255,k>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,V>>>24&255,V>>>16&255,V>>>8&255,V>>>0&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y>>>0&255]}function o(P,I,C){P=P.length<=64?P:i(P);const T=64+I.length+4,k=new Array(T),O=new Array(64);let D,U=[];for(D=0;D<64;D++)k[D]=54;for(D=0;D=T-4;Y--){if(k[Y]++,k[Y]<=255)return;k[Y]=0}}for(;C>=32;)V(),U=U.concat(i(O.concat(i(k)))),C-=32;return C>0&&(V(),U=U.concat(i(O.concat(i(k))).slice(0,C))),U}function s(P,I,C,T,k){let O;for(b(P,(2*C-1)*16,k,0,16),O=0;O<2*C;O++)p(P,O*16,k,16),d(k,T),b(k,0,P,I+O*16,16);for(O=0;O>>32-I}function d(P,I){b(P,0,I,0,16);for(let C=8;C>0;C-=2)I[4]^=f(I[0]+I[12],7),I[8]^=f(I[4]+I[0],9),I[12]^=f(I[8]+I[4],13),I[0]^=f(I[12]+I[8],18),I[9]^=f(I[5]+I[1],7),I[13]^=f(I[9]+I[5],9),I[1]^=f(I[13]+I[9],13),I[5]^=f(I[1]+I[13],18),I[14]^=f(I[10]+I[6],7),I[2]^=f(I[14]+I[10],9),I[6]^=f(I[2]+I[14],13),I[10]^=f(I[6]+I[2],18),I[3]^=f(I[15]+I[11],7),I[7]^=f(I[3]+I[15],9),I[11]^=f(I[7]+I[3],13),I[15]^=f(I[11]+I[7],18),I[1]^=f(I[0]+I[3],7),I[2]^=f(I[1]+I[0],9),I[3]^=f(I[2]+I[1],13),I[0]^=f(I[3]+I[2],18),I[6]^=f(I[5]+I[4],7),I[7]^=f(I[6]+I[5],9),I[4]^=f(I[7]+I[6],13),I[5]^=f(I[4]+I[7],18),I[11]^=f(I[10]+I[9],7),I[8]^=f(I[11]+I[10],9),I[9]^=f(I[8]+I[11],13),I[10]^=f(I[9]+I[8],18),I[12]^=f(I[15]+I[14],7),I[13]^=f(I[12]+I[15],9),I[14]^=f(I[13]+I[12],13),I[15]^=f(I[14]+I[13],18);for(let C=0;C<16;++C)P[C]+=I[C]}function p(P,I,C,T){for(let k=0;k=256)return!1}return!0}function A(P,I){if(typeof P!="number"||P%1)throw new Error("invalid "+I);return P}function _(P,I,C,T,k,O,D){if(C=A(C,"N"),T=A(T,"r"),k=A(k,"p"),O=A(O,"dkLen"),C===0||C&C-1)throw new Error("N must be power of 2");if(C>2147483647/128/T)throw new Error("N too large");if(T>2147483647/128/k)throw new Error("r too large");if(!v(P))throw new Error("password must be an array or buffer");if(P=Array.prototype.slice.call(P),!v(I))throw new Error("salt must be an array or buffer");I=Array.prototype.slice.call(I);let U=o(P,I,k*128*T);const V=new Uint32Array(k*32*T);for(let L=0;Lg&&(L=g);for(let F=0;Fg&&(L=g);for(let F=0;F>0&255),U.push(V[F]>>8&255),U.push(V[F]>>16&255),U.push(V[F]>>24&255);const R=o(P,U,O);return D&&D(null,1,R),R}D&&M(B)};if(!D)for(;;){const L=B();if(L!=null)return L}B()}const S={scrypt:function(P,I,C,T,k,O,D){return new Promise(function(U,V){let Y=0;D&&D(0),_(P,I,C,T,k,O,function(W,ie,x){if(W)V(W);else if(x)D&&Y!==1&&D(1),U(new Uint8Array(x));else if(D&&ie!==Y)return Y=ie,D(ie)})})},syncScrypt:function(P,I,C,T,k,O){return new Uint8Array(_(P,I,C,T,k,O))}};t.exports=S})()})(wK);var A9e=wK.exports;const PP=es(A9e);var S9e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const AE=new ut(gK);function qB(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class M9e extends QV{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function _9e(t,e,r){if(Gr(t,"crypto/cipher")==="aes-128-ctr"){const i=Vu(Gr(t,"crypto/cipherparams/iv")),o=new Ca.Counter(i),s=new Ca.ModeOfOperation.ctr(e,o);return nt(s.decrypt(r))}return null}function xK(t,e){const r=Vu(Gr(t,"crypto/ciphertext"));if(At(_n(ja([e.slice(16,32),r]))).substring(2)!==Gr(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=_9e(t,e.slice(0,16),r);i||AE.throwError("unsupported cipher",ut.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=e.slice(32,64),s=ah(i);if(t.address){let d=t.address.toLowerCase();if(d.substring(0,2)!=="0x"&&(d="0x"+d),ea(d)!==s)throw new Error("address mismatch")}const f={_isKeystoreAccount:!0,address:s,privateKey:At(i)};if(Gr(t,"x-ethers/version")==="0.1"){const d=Vu(Gr(t,"x-ethers/mnemonicCiphertext")),p=Vu(Gr(t,"x-ethers/mnemonicCounter")),b=new Ca.Counter(p),v=new Ca.ModeOfOperation.ctr(o,b),A=Gr(t,"x-ethers/path")||jg,_=Gr(t,"x-ethers/locale")||"en",S=nt(v.decrypt(d));try{const P=MP(S,_),I=Ro.fromMnemonic(P,null,_).derivePath(A);if(I.privateKey!=f.privateKey)throw new Error("mnemonic mismatch");f.mnemonic=I.mnemonic}catch(P){if(P.code!==ut.errors.INVALID_ARGUMENT||P.argument!=="wordlist")throw P}}return new M9e(f)}function EK(t,e,r,n,i){return nt(AP(t,e,r,n,i))}function P9e(t,e,r,n,i){return Promise.resolve(EK(t,e,r,n,i))}function AK(t,e,r,n,i){const o=_P(e),s=Gr(t,"crypto/kdf");if(s&&typeof s=="string"){const f=function(d,p){return AE.throwArgumentError("invalid key-derivation function parameters",d,p)};if(s.toLowerCase()==="scrypt"){const d=Vu(Gr(t,"crypto/kdfparams/salt")),p=parseInt(Gr(t,"crypto/kdfparams/n")),b=parseInt(Gr(t,"crypto/kdfparams/r")),v=parseInt(Gr(t,"crypto/kdfparams/p"));(!p||!b||!v)&&f("kdf",s),p&p-1&&f("N",p);const A=parseInt(Gr(t,"crypto/kdfparams/dklen"));return A!==32&&f("dklen",A),n(o,d,p,b,v,64,i)}else if(s.toLowerCase()==="pbkdf2"){const d=Vu(Gr(t,"crypto/kdfparams/salt"));let p=null;const b=Gr(t,"crypto/kdfparams/prf");b==="hmac-sha256"?p="sha256":b==="hmac-sha512"?p="sha512":f("prf",b);const v=parseInt(Gr(t,"crypto/kdfparams/c")),A=parseInt(Gr(t,"crypto/kdfparams/dklen"));return A!==32&&f("dklen",A),r(o,d,v,A,p)}}return AE.throwArgumentError("unsupported key-derivation function","kdf",s)}function C9e(t,e){const r=JSON.parse(t),n=AK(r,e,EK,PP.syncScrypt);return xK(r,n)}function I9e(t,e,r){return S9e(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield AK(n,e,P9e,PP.scrypt,r);return xK(n,i)})}function T9e(t,e,r,n){try{if(ea(t.address)!==ah(t.privateKey))throw new Error("address/privateKey mismatch");if(qB(t)){const I=t.mnemonic;if(Ro.fromMnemonic(I.phrase,null,I.locale).derivePath(I.path||jg).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(I){return Promise.reject(I)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=nt(t.privateKey),o=_P(e);let s=null,f=null,d=null;if(qB(t)){const I=t.mnemonic;s=nt(pK(I.phrase,I.locale||"en")),f=I.path||jg,d=I.locale||"en"}let p=r.client;p||(p="ethers.js");let b=null;r.salt?b=nt(r.salt):b=Am(32);let v=null;if(r.iv){if(v=nt(r.iv),v.length!==16)throw new Error("invalid iv")}else v=Am(16);let A=null;if(r.uuid){if(A=nt(r.uuid),A.length!==16)throw new Error("invalid uuid")}else A=Am(16);let _=1<<17,S=8,P=1;return r.scrypt&&(r.scrypt.N&&(_=r.scrypt.N),r.scrypt.r&&(S=r.scrypt.r),r.scrypt.p&&(P=r.scrypt.p)),PP.scrypt(o,b,_,S,P,64,n).then(I=>{I=nt(I);const C=I.slice(0,16),T=I.slice(16,32),k=I.slice(32,64),O=new Ca.Counter(v),D=new Ca.ModeOfOperation.ctr(C,O),U=nt(D.encrypt(i)),V=_n(ja([T,U])),Y={address:t.address.substring(2).toLowerCase(),id:w9e(A),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:At(v).substring(2)},ciphertext:At(U).substring(2),kdf:"scrypt",kdfparams:{salt:At(b).substring(2),n:_,dklen:32,p:P,r:S},mac:V.substring(2)}};if(s){const W=Am(16),ie=new Ca.Counter(W),x=new Ca.ModeOfOperation.ctr(k,ie),a=nt(x.encrypt(s)),u=new Date,l=u.getUTCFullYear()+"-"+am(u.getUTCMonth()+1,2)+"-"+am(u.getUTCDate(),2)+"T"+am(u.getUTCHours(),2)+"-"+am(u.getUTCMinutes(),2)+"-"+am(u.getUTCSeconds(),2)+".0Z";Y["x-ethers"]={client:p,gethFilename:"UTC--"+l+"--"+Y.address,mnemonicCounter:At(W).substring(2),mnemonicCiphertext:At(a).substring(2),path:f,locale:d,version:"0.1"}}return JSON.stringify(Y)})}function R9e(t,e,r){if(yK(t)){r&&r(0);const n=bK(t,e);return r&&r(1),Promise.resolve(n)}return vK(t)?I9e(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function k9e(t,e){if(yK(t))return bK(t,e);if(vK(t))return C9e(t,e);throw new Error("invalid JSON wallet")}const B9e="wallet/5.7.0";var GB=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function f(b){try{p(n.next(b))}catch(v){s(v)}}function d(b){try{p(n.throw(b))}catch(v){s(v)}}function p(b){b.done?o(b.value):i(b.value).then(f,d)}p((n=n.apply(t,e||[])).next())})};const nd=new ut(B9e);function O9e(t){return t!=null&&li(t.privateKey,32)&&t.address!=null}function N9e(t){const e=t.mnemonic;return e&&e.phrase}class kc extends vP{constructor(e,r){if(super(),O9e(e)){const n=new sh(e.privateKey);if(Pt(this,"_signingKey",()=>n),Pt(this,"address",ah(this.publicKey)),this.address!==ea(e.address)&&nd.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),N9e(e)){const i=e.mnemonic;Pt(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||jg,locale:i.locale||"en"}));const o=this.mnemonic,s=Ro.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path);ah(s.privateKey)!==this.address&&nd.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else Pt(this,"_mnemonic",()=>null)}else{if(sh.isSigningKey(e))e.curve!=="secp256k1"&&nd.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),Pt(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new sh(e);Pt(this,"_signingKey",()=>n)}Pt(this,"_mnemonic",()=>null),Pt(this,"address",ah(this.publicKey))}r&&!yP.isProvider(r)&&nd.throwArgumentError("invalid provider","provider",r),Pt(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new kc(this,e)}signTransaction(e){return Bd(e).then(r=>{r.from!=null&&(ea(r.from)!==this.address&&nd.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(_n($B(r)));return $B(r,n)})}signMessage(e){return GB(this,void 0,void 0,function*(){return PB(this._signingKey().signDigest(tK(e)))})}_signTypedData(e,r,n){return GB(this,void 0,void 0,function*(){const i=yield Vi.resolveNames(e,r,n,o=>(this.provider==null&&nd.throwError("cannot resolve ENS names without a provider",ut.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:o}),this.provider.resolveName(o)));return PB(this._signingKey().signDigest(Vi.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),T9e(this,e,r,n)}static createRandom(e){let r=Am(16);e||(e={}),e.extraEntropy&&(r=nt(Fg(_n(ja([r,e.extraEntropy])),0,16)));const n=MP(r,e.locale);return kc.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return R9e(e,r,n).then(i=>new kc(i))}static fromEncryptedJsonSync(e,r){return new kc(k9e(e,r))}static fromMnemonic(e,r,n){return r||(r=jg),new kc(Ro.fromMnemonic(e,null,n).derivePath(r))}}const L9e="solidity/5.7.0",D9e=new RegExp("^bytes([0-9]+)$"),F9e=new RegExp("^(u?int)([0-9]*)$"),$9e=new RegExp("^(.*)\\[([0-9]*)\\]$"),U9e="0000000000000000000000000000000000000000000000000000000000000000",ud=new ut(L9e);function SK(t,e,r){switch(t){case"address":return r?s2(e,32):nt(e);case"string":return Hs(e);case"bytes":return nt(e);case"bool":return e=e?"0x01":"0x00",r?s2(e,32):nt(e)}let n=t.match(F9e);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&ud.throwArgumentError("invalid number type","type",t),r&&(i=256),e=pr.from(e).toTwos(i),s2(e,i/8)}if(n=t.match(D9e),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&ud.throwArgumentError("invalid bytes type","type",t),nt(e).byteLength!==i&&ud.throwArgumentError(`invalid value for ${t}`,"value",e),r?nt((e+U9e).substring(0,66)):e}if(n=t.match($9e),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&ud.throwArgumentError(`invalid array length for ${t}`,"value",e);const s=[];return e.forEach(function(f){s.push(SK(i,f,!0))}),ja(s)}return ud.throwArgumentError("invalid type","type",t)}function z9e(t,e){t.length!=e.length&&ud.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(SK(n,e[i]))}),At(ja(r))}function MK(t,e){return _n(z9e(t,e))}const j9e=["function isModuleEnabled(address module) public view returns (bool)","function nonce() public view returns (uint256)","function enableModule(address module) public","function setGuard(address module) public","function execTransaction(address to,uint256 value,bytes calldata data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address payable refundReceiver,bytes memory signatures) public payable returns (bool success)"],_K=async t=>{const e=await M1();return new Na(t,j9e,e)},H9e=async(t,e)=>await(await _K(t)).isModuleEnabled(e),q9e=async(t,e)=>{const r=await _K(t);return{to:t,value:"0",data:(await r.enableModule.populateTransaction(e)).data}},G9e="hh-sol-artifact-1",V9e="Safe2LinkModule",K9e="contracts/Safe2LinkModule.sol",W9e=[{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"_index",type:"uint256"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"},{indexed:!0,internalType:"address",name:"_senderAddress",type:"address"}],name:"LinkEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"message",type:"string"}],name:"MessageEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"_index",type:"uint256"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"},{indexed:!0,internalType:"address",name:"_recipientAddress",type:"address"}],name:"WithdrawEvent",type:"event"},{inputs:[],name:"NAME",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_index",type:"uint256"},{internalType:"address",name:"_recipientAddress",type:"address"},{internalType:"bytes32",name:"_recipientAddressHash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"claimLink",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_tokenAddress",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_pubKey20",type:"address"}],name:"createLink",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getAllLinks",outputs:[{components:[{internalType:"address",name:"pubKey20",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"bool",name:"claimed",type:"bool"},{internalType:"uint40",name:"timestamp",type:"uint40"},{internalType:"address",name:"account",type:"address"}],internalType:"struct Safe2LinkModule.Link[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_index",type:"uint256"}],name:"getLink",outputs:[{components:[{internalType:"address",name:"pubKey20",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"bool",name:"claimed",type:"bool"},{internalType:"uint40",name:"timestamp",type:"uint40"},{internalType:"address",name:"account",type:"address"}],internalType:"struct Safe2LinkModule.Link",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLinkCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"messageHash",type:"bytes32"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"getSigner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"links",outputs:[{internalType:"address",name:"pubKey20",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"},{internalType:"bool",name:"claimed",type:"bool"},{internalType:"uint40",name:"timestamp",type:"uint40"},{internalType:"address",name:"account",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"tokens",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],J9e="0x608060405234801561001057600080fd5b506122fd806100206000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3f4df7e11610066578063a3f4df7e14610186578063ef51b79d146101a4578063f56e81fa146101c2578063f7b2ec0d146101f2578063ffa1ad74146102225761009e565b806326091678146100a3578063393b6df3146100d357806348d9cb941461010357806355c3d97a14610121578063881d8a4014610151575b600080fd5b6100bd60048036038101906100b8919061152f565b610240565b6040516100ca91906115cd565b60405180910390f35b6100ed60048036038101906100e891906115e8565b6105fb565b6040516100fa91906116dd565b60405180910390f35b61010b610787565b6040516101189190611822565b60405180910390f35b61013b60048036038101906101369190611844565b610936565b60405161014891906118a6565b60405180910390f35b61016b600480360381019061016691906115e8565b610b7f565b60405161017d969594939291906118df565b60405180910390f35b61018e610c49565b60405161019b91906119bf565b60405180910390f35b6101ac610c82565b6040516101b991906118a6565b60405180910390f35b6101dc60048036038101906101d791906119e1565b610c8f565b6040516101e99190611a34565b60405180910390f35b61020c60048036038101906102079190611a4f565b610cea565b6040516102199190611a34565b60405180910390f35b61022a610d03565b60405161023791906119bf565b60405180910390f35b60006001805490508510610289576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161028090611af7565b60405180910390fd5b60006001868154811061029f5761029e611b17565b5b90600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600015158160600151151514610455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044c90611b92565b60405180910390fd5b610484856040516020016104699190611bfa565b60405160208183030381529060405280519060200120610d3c565b84146104c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104bc90611c61565b60405180910390fd5b60006104d18585610cea565b9050816000015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053c90611ccd565b60405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff16877fa62bf33e3860a18b08244c1b59b8aa4920be374252eb534e0ab47d5f7a18ca18846020015160405161059091906118a6565b60405180910390a360018088815481106105ad576105ac611b17565b5b906000526020600020906004020160020160146101000a81548160ff0219169083151502179055506105ed8260a001518360400151888560200151610d72565b600192505050949350505050565b61060361128a565b6001828154811061061757610616611b17565b5b90600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b60606001805480602002602001604051908101604052809291908181526020016000905b8282101561092d57838290600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050815260200190600101906107ab565b50505050905090565b600060016040518060c001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff1681526020016000151581526020014264ffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160020160146101000a81548160ff02191690831515021790555060808201518160020160156101000a81548164ffffffffff021916908364ffffffffff16021790555060a08201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050503373ffffffffffffffffffffffffffffffffffffffff1660018080549050610b2e9190611d1c565b7fd0b52dbf7f8c29477b6ae9116c857532274475062b33c1f29e0c92f745c1ffbf85604051610b5d91906118a6565b60405180910390a360018080549050610b769190611d1c565b90509392505050565b60018181548110610b8f57600080fd5b90600052602060002090600402016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160149054906101000a900460ff16908060020160159054906101000a900464ffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905086565b6040518060400160405280601081526020017f53616665324c696e6b204d6f64756c650000000000000000000000000000000081525081565b6000600180549050905090565b60006020528260005260406000206020528160005260406000208181548110610cb757600080fd5b90600052602060002001600092509250509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080610cf78484610fca565b90508091505092915050565b6040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b60007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005281601c52603c6000209050919050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610e6b578373ffffffffffffffffffffffffffffffffffffffff1663468721a7838360006040518463ffffffff1660e01b8152600401610de493929190611e5d565b6020604051808303816000875af1158015610e03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e279190611ed3565b610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d90611f4c565b60405180910390fd5b610fc4565b60008282604051602401610e80929190611f8d565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff1660e01b8152600401610f409493929190612035565b6020604051808303816000875af1158015610f5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f839190611ed3565b610fc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb9906120cd565b60405180910390fd5b505b50505050565b6000806000610fd98585610ff1565b91509150610fe681611042565b819250505092915050565b60008060418351036110325760008060006020860151925060408601519150606086015160001a9050611026878285856111a8565b9450945050505061103b565b60006002915091505b9250929050565b6000600481111561105657611055611de6565b5b81600481111561106957611068611de6565b5b03156111a5576001600481111561108357611082611de6565b5b81600481111561109657611095611de6565b5b036110d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cd90612139565b60405180910390fd5b600260048111156110ea576110e9611de6565b5b8160048111156110fd576110fc611de6565b5b0361113d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611134906121a5565b60405180910390fd5b6003600481111561115157611150611de6565b5b81600481111561116457611163611de6565b5b036111a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119b90612237565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156111e3576000600391509150611281565b6000600187878787604051600081526020016040526040516112089493929190612282565b6020604051602081039080840390855afa15801561122a573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361127857600060019250925050611281565b80600092509250505b94509492505050565b6040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600015158152602001600064ffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b6113328161131f565b811461133d57600080fd5b50565b60008135905061134f81611329565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061138082611355565b9050919050565b61139081611375565b811461139b57600080fd5b50565b6000813590506113ad81611387565b92915050565b6000819050919050565b6113c6816113b3565b81146113d157600080fd5b50565b6000813590506113e3816113bd565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61143c826113f3565b810181811067ffffffffffffffff8211171561145b5761145a611404565b5b80604052505050565b600061146e61130b565b905061147a8282611433565b919050565b600067ffffffffffffffff82111561149a57611499611404565b5b6114a3826113f3565b9050602081019050919050565b82818337600083830152505050565b60006114d26114cd8461147f565b611464565b9050828152602081018484840111156114ee576114ed6113ee565b5b6114f98482856114b0565b509392505050565b600082601f830112611516576115156113e9565b5b81356115268482602086016114bf565b91505092915050565b6000806000806080858703121561154957611548611315565b5b600061155787828801611340565b94505060206115688782880161139e565b9350506040611579878288016113d4565b925050606085013567ffffffffffffffff81111561159a5761159961131a565b5b6115a687828801611501565b91505092959194509250565b60008115159050919050565b6115c7816115b2565b82525050565b60006020820190506115e260008301846115be565b92915050565b6000602082840312156115fe576115fd611315565b5b600061160c84828501611340565b91505092915050565b61161e81611375565b82525050565b61162d8161131f565b82525050565b61163c816115b2565b82525050565b600064ffffffffff82169050919050565b61165c81611642565b82525050565b60c0820160008201516116786000850182611615565b50602082015161168b6020850182611624565b50604082015161169e6040850182611615565b5060608201516116b16060850182611633565b5060808201516116c46080850182611653565b5060a08201516116d760a0850182611615565b50505050565b600060c0820190506116f26000830184611662565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60c08201600082015161173a6000850182611615565b50602082015161174d6020850182611624565b5060408201516117606040850182611615565b5060608201516117736060850182611633565b5060808201516117866080850182611653565b5060a082015161179960a0850182611615565b50505050565b60006117ab8383611724565b60c08301905092915050565b6000602082019050919050565b60006117cf826116f8565b6117d98185611703565b93506117e483611714565b8060005b838110156118155781516117fc888261179f565b9750611807836117b7565b9250506001810190506117e8565b5085935050505092915050565b6000602082019050818103600083015261183c81846117c4565b905092915050565b60008060006060848603121561185d5761185c611315565b5b600061186b8682870161139e565b935050602061187c86828701611340565b925050604061188d8682870161139e565b9150509250925092565b6118a08161131f565b82525050565b60006020820190506118bb6000830184611897565b92915050565b6118ca81611375565b82525050565b6118d981611642565b82525050565b600060c0820190506118f460008301896118c1565b6119016020830188611897565b61190e60408301876118c1565b61191b60608301866115be565b61192860808301856118d0565b61193560a08301846118c1565b979650505050505050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561197a57808201518184015260208101905061195f565b60008484015250505050565b600061199182611940565b61199b818561194b565b93506119ab81856020860161195c565b6119b4816113f3565b840191505092915050565b600060208201905081810360008301526119d98184611986565b905092915050565b6000806000606084860312156119fa576119f9611315565b5b6000611a088682870161139e565b9350506020611a198682870161139e565b9250506040611a2a86828701611340565b9150509250925092565b6000602082019050611a4960008301846118c1565b92915050565b60008060408385031215611a6657611a65611315565b5b6000611a74858286016113d4565b925050602083013567ffffffffffffffff811115611a9557611a9461131a565b5b611aa185828601611501565b9150509250929050565b7f4c494e4b20494e44455820444f4553204e4f5420455849535400000000000000600082015250565b6000611ae160198361194b565b9150611aec82611aab565b602082019050919050565b60006020820190508181036000830152611b1081611ad4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4c494e4b20414c52454144592057495448445241574e00000000000000000000600082015250565b6000611b7c60168361194b565b9150611b8782611b46565b602082019050919050565b60006020820190508181036000830152611bab81611b6f565b9050919050565b60008160601b9050919050565b6000611bca82611bb2565b9050919050565b6000611bdc82611bbf565b9050919050565b611bf4611bef82611375565b611bd1565b82525050565b6000611c068284611be3565b60148201915081905092915050565b7f48415348455320444f204e4f54204d4154434800000000000000000000000000600082015250565b6000611c4b60138361194b565b9150611c5682611c15565b602082019050919050565b60006020820190508181036000830152611c7a81611c3e565b9050919050565b7f57524f4e47205349474e41545552450000000000000000000000000000000000600082015250565b6000611cb7600f8361194b565b9150611cc282611c81565b602082019050919050565b60006020820190508181036000830152611ce681611caa565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611d278261131f565b9150611d328361131f565b9250828203905081811115611d4a57611d49611ced565b5b92915050565b6000819050919050565b6000611d75611d70611d6b84611355565b611d50565b611355565b9050919050565b6000611d8782611d5a565b9050919050565b6000611d9982611d7c565b9050919050565b611da981611d8e565b82525050565b600082825260208201905092915050565b50565b6000611dd0600083611daf565b9150611ddb82611dc0565b600082019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110611e2657611e25611de6565b5b50565b6000819050611e3782611e15565b919050565b6000611e4782611e29565b9050919050565b611e5781611e3c565b82525050565b6000608082019050611e726000830186611da0565b611e7f6020830185611897565b8181036040830152611e9081611dc3565b9050611e9f6060830184611e4e565b949350505050565b611eb0816115b2565b8114611ebb57600080fd5b50565b600081519050611ecd81611ea7565b92915050565b600060208284031215611ee957611ee8611315565b5b6000611ef784828501611ebe565b91505092915050565b7f436f756c64206e6f742065786563757465206574686572207472616e73666572600082015250565b6000611f3660208361194b565b9150611f4182611f00565b602082019050919050565b60006020820190508181036000830152611f6581611f29565b9050919050565b6000611f7782611355565b9050919050565b611f8781611f6c565b82525050565b6000604082019050611fa26000830185611f7e565b611faf6020830184611897565b9392505050565b6000819050919050565b6000611fdb611fd6611fd184611fb6565b611d50565b61131f565b9050919050565b611feb81611fc0565b82525050565b600081519050919050565b600061200782611ff1565b6120118185611daf565b935061202181856020860161195c565b61202a816113f3565b840191505092915050565b600060808201905061204a60008301876118c1565b6120576020830186611fe2565b81810360408301526120698185611ffc565b90506120786060830184611e4e565b95945050505050565b7f436f756c64206e6f74206578656375746520746f6b656e207472616e73666572600082015250565b60006120b760208361194b565b91506120c282612081565b602082019050919050565b600060208201905081810360008301526120e6816120aa565b9050919050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061212360188361194b565b915061212e826120ed565b602082019050919050565b6000602082019050818103600083015261215281612116565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061218f601f8361194b565b915061219a82612159565b602082019050919050565b600060208201905081810360008301526121be81612182565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061222160228361194b565b915061222c826121c5565b604082019050919050565b6000602082019050818103600083015261225081612214565b9050919050565b612260816113b3565b82525050565b600060ff82169050919050565b61227c81612266565b82525050565b60006080820190506122976000830187612257565b6122a46020830186612273565b6122b16040830185612257565b6122be6060830184612257565b9594505050505056fea2646970667358221220d4cfcae48dcd9cb39e8e8efbdf1eeec788e79274901739cdd0ee4771a47cfb8064736f6c63430008130033",Z9e="0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a3f4df7e11610066578063a3f4df7e14610186578063ef51b79d146101a4578063f56e81fa146101c2578063f7b2ec0d146101f2578063ffa1ad74146102225761009e565b806326091678146100a3578063393b6df3146100d357806348d9cb941461010357806355c3d97a14610121578063881d8a4014610151575b600080fd5b6100bd60048036038101906100b8919061152f565b610240565b6040516100ca91906115cd565b60405180910390f35b6100ed60048036038101906100e891906115e8565b6105fb565b6040516100fa91906116dd565b60405180910390f35b61010b610787565b6040516101189190611822565b60405180910390f35b61013b60048036038101906101369190611844565b610936565b60405161014891906118a6565b60405180910390f35b61016b600480360381019061016691906115e8565b610b7f565b60405161017d969594939291906118df565b60405180910390f35b61018e610c49565b60405161019b91906119bf565b60405180910390f35b6101ac610c82565b6040516101b991906118a6565b60405180910390f35b6101dc60048036038101906101d791906119e1565b610c8f565b6040516101e99190611a34565b60405180910390f35b61020c60048036038101906102079190611a4f565b610cea565b6040516102199190611a34565b60405180910390f35b61022a610d03565b60405161023791906119bf565b60405180910390f35b60006001805490508510610289576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161028090611af7565b60405180910390fd5b60006001868154811061029f5761029e611b17565b5b90600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600015158160600151151514610455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044c90611b92565b60405180910390fd5b610484856040516020016104699190611bfa565b60405160208183030381529060405280519060200120610d3c565b84146104c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104bc90611c61565b60405180910390fd5b60006104d18585610cea565b9050816000015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053c90611ccd565b60405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff16877fa62bf33e3860a18b08244c1b59b8aa4920be374252eb534e0ab47d5f7a18ca18846020015160405161059091906118a6565b60405180910390a360018088815481106105ad576105ac611b17565b5b906000526020600020906004020160020160146101000a81548160ff0219169083151502179055506105ed8260a001518360400151888560200151610d72565b600192505050949350505050565b61060361128a565b6001828154811061061757610616611b17565b5b90600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b60606001805480602002602001604051908101604052809291908181526020016000905b8282101561092d57838290600052602060002090600402016040518060c00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160149054906101000a900460ff161515151581526020016002820160159054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050815260200190600101906107ab565b50505050905090565b600060016040518060c001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff1681526020016000151581526020014264ffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160020160146101000a81548160ff02191690831515021790555060808201518160020160156101000a81548164ffffffffff021916908364ffffffffff16021790555060a08201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050503373ffffffffffffffffffffffffffffffffffffffff1660018080549050610b2e9190611d1c565b7fd0b52dbf7f8c29477b6ae9116c857532274475062b33c1f29e0c92f745c1ffbf85604051610b5d91906118a6565b60405180910390a360018080549050610b769190611d1c565b90509392505050565b60018181548110610b8f57600080fd5b90600052602060002090600402016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160149054906101000a900460ff16908060020160159054906101000a900464ffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905086565b6040518060400160405280601081526020017f53616665324c696e6b204d6f64756c650000000000000000000000000000000081525081565b6000600180549050905090565b60006020528260005260406000206020528160005260406000208181548110610cb757600080fd5b90600052602060002001600092509250509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080610cf78484610fca565b90508091505092915050565b6040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b60007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005281601c52603c6000209050919050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610e6b578373ffffffffffffffffffffffffffffffffffffffff1663468721a7838360006040518463ffffffff1660e01b8152600401610de493929190611e5d565b6020604051808303816000875af1158015610e03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e279190611ed3565b610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d90611f4c565b60405180910390fd5b610fc4565b60008282604051602401610e80929190611f8d565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff1660e01b8152600401610f409493929190612035565b6020604051808303816000875af1158015610f5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f839190611ed3565b610fc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb9906120cd565b60405180910390fd5b505b50505050565b6000806000610fd98585610ff1565b91509150610fe681611042565b819250505092915050565b60008060418351036110325760008060006020860151925060408601519150606086015160001a9050611026878285856111a8565b9450945050505061103b565b60006002915091505b9250929050565b6000600481111561105657611055611de6565b5b81600481111561106957611068611de6565b5b03156111a5576001600481111561108357611082611de6565b5b81600481111561109657611095611de6565b5b036110d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cd90612139565b60405180910390fd5b600260048111156110ea576110e9611de6565b5b8160048111156110fd576110fc611de6565b5b0361113d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611134906121a5565b60405180910390fd5b6003600481111561115157611150611de6565b5b81600481111561116457611163611de6565b5b036111a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119b90612237565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156111e3576000600391509150611281565b6000600187878787604051600081526020016040526040516112089493929190612282565b6020604051602081039080840390855afa15801561122a573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361127857600060019250925050611281565b80600092509250505b94509492505050565b6040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600015158152602001600064ffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b6113328161131f565b811461133d57600080fd5b50565b60008135905061134f81611329565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061138082611355565b9050919050565b61139081611375565b811461139b57600080fd5b50565b6000813590506113ad81611387565b92915050565b6000819050919050565b6113c6816113b3565b81146113d157600080fd5b50565b6000813590506113e3816113bd565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61143c826113f3565b810181811067ffffffffffffffff8211171561145b5761145a611404565b5b80604052505050565b600061146e61130b565b905061147a8282611433565b919050565b600067ffffffffffffffff82111561149a57611499611404565b5b6114a3826113f3565b9050602081019050919050565b82818337600083830152505050565b60006114d26114cd8461147f565b611464565b9050828152602081018484840111156114ee576114ed6113ee565b5b6114f98482856114b0565b509392505050565b600082601f830112611516576115156113e9565b5b81356115268482602086016114bf565b91505092915050565b6000806000806080858703121561154957611548611315565b5b600061155787828801611340565b94505060206115688782880161139e565b9350506040611579878288016113d4565b925050606085013567ffffffffffffffff81111561159a5761159961131a565b5b6115a687828801611501565b91505092959194509250565b60008115159050919050565b6115c7816115b2565b82525050565b60006020820190506115e260008301846115be565b92915050565b6000602082840312156115fe576115fd611315565b5b600061160c84828501611340565b91505092915050565b61161e81611375565b82525050565b61162d8161131f565b82525050565b61163c816115b2565b82525050565b600064ffffffffff82169050919050565b61165c81611642565b82525050565b60c0820160008201516116786000850182611615565b50602082015161168b6020850182611624565b50604082015161169e6040850182611615565b5060608201516116b16060850182611633565b5060808201516116c46080850182611653565b5060a08201516116d760a0850182611615565b50505050565b600060c0820190506116f26000830184611662565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60c08201600082015161173a6000850182611615565b50602082015161174d6020850182611624565b5060408201516117606040850182611615565b5060608201516117736060850182611633565b5060808201516117866080850182611653565b5060a082015161179960a0850182611615565b50505050565b60006117ab8383611724565b60c08301905092915050565b6000602082019050919050565b60006117cf826116f8565b6117d98185611703565b93506117e483611714565b8060005b838110156118155781516117fc888261179f565b9750611807836117b7565b9250506001810190506117e8565b5085935050505092915050565b6000602082019050818103600083015261183c81846117c4565b905092915050565b60008060006060848603121561185d5761185c611315565b5b600061186b8682870161139e565b935050602061187c86828701611340565b925050604061188d8682870161139e565b9150509250925092565b6118a08161131f565b82525050565b60006020820190506118bb6000830184611897565b92915050565b6118ca81611375565b82525050565b6118d981611642565b82525050565b600060c0820190506118f460008301896118c1565b6119016020830188611897565b61190e60408301876118c1565b61191b60608301866115be565b61192860808301856118d0565b61193560a08301846118c1565b979650505050505050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561197a57808201518184015260208101905061195f565b60008484015250505050565b600061199182611940565b61199b818561194b565b93506119ab81856020860161195c565b6119b4816113f3565b840191505092915050565b600060208201905081810360008301526119d98184611986565b905092915050565b6000806000606084860312156119fa576119f9611315565b5b6000611a088682870161139e565b9350506020611a198682870161139e565b9250506040611a2a86828701611340565b9150509250925092565b6000602082019050611a4960008301846118c1565b92915050565b60008060408385031215611a6657611a65611315565b5b6000611a74858286016113d4565b925050602083013567ffffffffffffffff811115611a9557611a9461131a565b5b611aa185828601611501565b9150509250929050565b7f4c494e4b20494e44455820444f4553204e4f5420455849535400000000000000600082015250565b6000611ae160198361194b565b9150611aec82611aab565b602082019050919050565b60006020820190508181036000830152611b1081611ad4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4c494e4b20414c52454144592057495448445241574e00000000000000000000600082015250565b6000611b7c60168361194b565b9150611b8782611b46565b602082019050919050565b60006020820190508181036000830152611bab81611b6f565b9050919050565b60008160601b9050919050565b6000611bca82611bb2565b9050919050565b6000611bdc82611bbf565b9050919050565b611bf4611bef82611375565b611bd1565b82525050565b6000611c068284611be3565b60148201915081905092915050565b7f48415348455320444f204e4f54204d4154434800000000000000000000000000600082015250565b6000611c4b60138361194b565b9150611c5682611c15565b602082019050919050565b60006020820190508181036000830152611c7a81611c3e565b9050919050565b7f57524f4e47205349474e41545552450000000000000000000000000000000000600082015250565b6000611cb7600f8361194b565b9150611cc282611c81565b602082019050919050565b60006020820190508181036000830152611ce681611caa565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611d278261131f565b9150611d328361131f565b9250828203905081811115611d4a57611d49611ced565b5b92915050565b6000819050919050565b6000611d75611d70611d6b84611355565b611d50565b611355565b9050919050565b6000611d8782611d5a565b9050919050565b6000611d9982611d7c565b9050919050565b611da981611d8e565b82525050565b600082825260208201905092915050565b50565b6000611dd0600083611daf565b9150611ddb82611dc0565b600082019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110611e2657611e25611de6565b5b50565b6000819050611e3782611e15565b919050565b6000611e4782611e29565b9050919050565b611e5781611e3c565b82525050565b6000608082019050611e726000830186611da0565b611e7f6020830185611897565b8181036040830152611e9081611dc3565b9050611e9f6060830184611e4e565b949350505050565b611eb0816115b2565b8114611ebb57600080fd5b50565b600081519050611ecd81611ea7565b92915050565b600060208284031215611ee957611ee8611315565b5b6000611ef784828501611ebe565b91505092915050565b7f436f756c64206e6f742065786563757465206574686572207472616e73666572600082015250565b6000611f3660208361194b565b9150611f4182611f00565b602082019050919050565b60006020820190508181036000830152611f6581611f29565b9050919050565b6000611f7782611355565b9050919050565b611f8781611f6c565b82525050565b6000604082019050611fa26000830185611f7e565b611faf6020830184611897565b9392505050565b6000819050919050565b6000611fdb611fd6611fd184611fb6565b611d50565b61131f565b9050919050565b611feb81611fc0565b82525050565b600081519050919050565b600061200782611ff1565b6120118185611daf565b935061202181856020860161195c565b61202a816113f3565b840191505092915050565b600060808201905061204a60008301876118c1565b6120576020830186611fe2565b81810360408301526120698185611ffc565b90506120786060830184611e4e565b95945050505050565b7f436f756c64206e6f74206578656375746520746f6b656e207472616e73666572600082015250565b60006120b760208361194b565b91506120c282612081565b602082019050919050565b600060208201905081810360008301526120e6816120aa565b9050919050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061212360188361194b565b915061212e826120ed565b602082019050919050565b6000602082019050818103600083015261215281612116565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061218f601f8361194b565b915061219a82612159565b602082019050919050565b600060208201905081810360008301526121be81612182565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061222160228361194b565b915061222c826121c5565b604082019050919050565b6000602082019050818103600083015261225081612214565b9050919050565b612260816113b3565b82525050565b600060ff82169050919050565b61227c81612266565b82525050565b60006080820190506122976000830187612257565b6122a46020830186612273565b6122b16040830185612257565b6122be6060830184612257565b9594505050505056fea2646970667358221220d4cfcae48dcd9cb39e8e8efbdf1eeec788e79274901739cdd0ee4771a47cfb8064736f6c63430008130033",Y9e={},Q9e={},Zx={_format:G9e,contractName:V9e,sourceName:K9e,abi:W9e,bytecode:J9e,deployedBytecode:Z9e,linkReferences:Y9e,deployedLinkReferences:Q9e},PK=TG({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0});function Xo(t,e,r=e.name){return n=>{var i;return((i=t[r])==null?void 0:i.call(t,n))??e(t,n)}}const X9e=async t=>Number(await t.request({method:"eth_chainId",params:[]})),e7e={"0x0":"reverted","0x1":"success"};function Hg(t){if(typeof t!="function")return t==null||typeof t=="string"||typeof t=="boolean"?t:typeof t=="bigint"?Ft(t):t._isBigNumber!=null||typeof t!="object"?Ft(t).replace(/^0x0/,"0x"):Array.isArray(t)?t.map(e=>Hg(e)):Object.keys(t).reduce((e,r)=>(e[r]=Hg(t[r]),e),{})}const CK=async(t,e)=>{const{userOperation:r,entryPoint:n}=e,i=await t.request({method:"eth_estimateUserOperationGas",params:[Hg(r),n]});return{preVerificationGas:BigInt(i.preVerificationGas||0),verificationGasLimit:BigInt(i.verificationGasLimit||0),callGasLimit:BigInt(i.callGasLimit||0)}},t7e=async(t,{hash:e})=>{const r=[e],n=await t.request({method:"eth_getUserOperationByHash",params:r});if(!n)return null;const{userOperation:i,entryPoint:o,transactionHash:s,blockHash:f,blockNumber:d}=n;return{userOperation:{...i,nonce:BigInt(i.nonce),callGasLimit:BigInt(i.callGasLimit),verificationGasLimit:BigInt(i.verificationGasLimit),preVerificationGas:BigInt(i.preVerificationGas),maxFeePerGas:BigInt(i.maxFeePerGas),maxPriorityFeePerGas:BigInt(i.maxPriorityFeePerGas)},entryPoint:o,transactionHash:s,blockHash:f,blockNumber:BigInt(d)}},IK=async(t,{hash:e})=>{const r=[e],n=await t.request({method:"eth_getUserOperationReceipt",params:r});return n?{userOpHash:n.userOpHash,sender:n.sender,nonce:BigInt(n.nonce),actualGasUsed:BigInt(n.actualGasUsed),actualGasCost:BigInt(n.actualGasCost),success:n.success,receipt:{transactionHash:n.receipt.transactionHash,transactionIndex:BigInt(n.receipt.transactionIndex),blockHash:n.receipt.blockHash,blockNumber:BigInt(n.receipt.blockNumber),from:n.receipt.from,to:n.receipt.to,cumulativeGasUsed:BigInt(n.receipt.cumulativeGasUsed),status:e7e[n.receipt.status],gasUsed:BigInt(n.receipt.gasUsed),contractAddress:n.receipt.contractAddress,logsBloom:n.receipt.logsBloom,effectiveGasPrice:BigInt(n.receipt.effectiveGasPrice)},logs:n.logs.map(o=>({data:o.data,blockNumber:BigInt(o.blockNumber),blockHash:o.blockHash,transactionHash:o.transactionHash,logIndex:BigInt(o.logIndex),transactionIndex:BigInt(o.transactionIndex),address:o.address,topics:o.topics}))}:null},TK=async(t,e)=>{const{userOperation:r,entryPoint:n}=e;return t.request({method:"eth_sendUserOperation",params:[Hg(r),n]})},r7e=async t=>t.request({method:"eth_supportedEntryPoints",params:[]}),I4=new Map,VB=new Map;let n7e=0;function i7e(t,e,r){const n=++n7e,i=()=>I4.get(t)||[],o=()=>{const b=i();I4.set(t,b.filter(v=>v.id!==n))},s=()=>{const b=VB.get(t);i().length===1&&b&&b(),o()},f=i();if(I4.set(t,[...f,{id:n,fns:e}]),f&&f.length>0)return s;const d={};for(const b in e)d[b]=(...v)=>{var _,S;const A=i();if(A.length!==0)for(const P of A)(S=(_=P.fns)[b])==null||S.call(_,...v)};const p=r(d);return typeof p=="function"&&VB.set(t,p),s}class o7e extends qe{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForUserOperationReceiptTimeoutError"})}}const Yx=(t,{hash:e,pollingInterval:r=t.pollingInterval,timeout:n})=>{const i=fn(["waitForUserOperationReceipt",t.uid,e]);let o;return new Promise((s,f)=>{n&&setTimeout(()=>f(new o7e({hash:e})),n);const d=i7e(i,{resolve:s,reject:f},async p=>{const b=setInterval(async()=>{const v=_=>{clearInterval(b),_(),d()},A=await Xo(t,IK)({hash:e});if(A!==null&&(o=A),o){v(()=>p.resolve(o));return}},r)})})},s7e=async(t,{sender:e,entryPoint:r,key:n=BigInt(0)})=>await Xo(t,Xs)({address:r,abi:[{inputs:[{name:"sender",type:"address"},{name:"key",type:"uint192"}],name:"getNonce",outputs:[{name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"getNonce",args:[e,n]}),a7e=t=>({sendUserOperation:async e=>TK(t,e),estimateUserOperationGas:e=>CK(t,e),supportedEntryPoints:()=>r7e(t),chainId:()=>X9e(t),getUserOperationByHash:e=>t7e(t,e),getUserOperationReceipt:e=>IK(t,e),waitForUserOperationReceipt:e=>Yx(t,e)});class KB extends qe{constructor({docsPath:e}={}){super(["A smart account cannot sign or send transaction, it can only sign message or userOperation.","Please send user operation instead."].join(` `),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignTransactionNotSupportedBySmartAccount"})}}class Ul extends qe{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` -`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountOrClientNotFoundError"})}}function zl(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}async function RK(t,e){const{account:r=t.account,userOperation:n,sponsorUserOperation:i}=e;if(!r)throw new Ul;const o=zl(r),[s,f,d,p,b,v]=await Promise.all([n.sender||o.address,n.nonce||o.getNonce(),n.initCode||o.getInitCode(),n.signature||o.getDummySignature(),n.callData,!n.maxFeePerGas||!n.maxPriorityFeePerGas?aG(o.client):void 0]),A={sender:s,nonce:f,initCode:d,signature:p,callData:b,paymasterAndData:"0x",maxFeePerGas:n.maxFeePerGas||(v==null?void 0:v.maxFeePerGas)||0n,maxPriorityFeePerGas:n.maxPriorityFeePerGas||(v==null?void 0:v.maxPriorityFeePerGas)||0n,callGasLimit:n.callGasLimit||0n,verificationGasLimit:n.verificationGasLimit||0n,preVerificationGas:n.preVerificationGas||0n};if(i){const{callGasLimit:_,verificationGasLimit:S,preVerificationGas:P,paymasterAndData:I}=await i({userOperation:A,entryPoint:o.entryPoint});A.paymasterAndData=I,A.callGasLimit=A.callGasLimit||_,A.verificationGasLimit=A.verificationGasLimit||S,A.preVerificationGas=A.preVerificationGas||P}else if(!A.callGasLimit||!A.verificationGasLimit||!A.preVerificationGas){const _=await Xo(t,CK)({userOperation:{...A},entryPoint:o.entryPoint});A.callGasLimit=A.callGasLimit||_.callGasLimit,A.verificationGasLimit=A.verificationGasLimit||_.verificationGasLimit,A.preVerificationGas=A.preVerificationGas||_.preVerificationGas}return A}async function CP(t,e){const{account:r=t.account}=e;if(!r)throw new Ul;const n=zl(r),i=await Xo(t,RK)(e);return i.signature=await n.signUserOperation(i),await Xo(t,TK,"sendUserOperation")({userOperation:i,entryPoint:n.entryPoint})}async function f7e(t,{abi:e,args:r,bytecode:n,sponsorUserOperation:i,...o}){const{account:s=t.account}=o;if(!s)throw new Ul({docsPath:"/docs/actions/wallet/sendTransaction"});const f=zl(s),d=await Xo(t,CP)({userOperation:{sender:f.address,paymasterAndData:"0x",maxFeePerGas:o.maxFeePerGas||0n,maxPriorityFeePerGas:o.maxPriorityFeePerGas||0n,callData:await f.encodeDeployCallData({abi:e,args:r,bytecode:n})},account:f,sponsorUserOperation:i}),p=await Xo(t,Yx)({hash:d});return p==null?void 0:p.receipt.transactionHash}async function kK(t,e){const{account:r=t.account,data:n,maxFeePerGas:i,maxPriorityFeePerGas:o,to:s,value:f,nonce:d,sponsorUserOperation:p}=e;if(!r)throw new Ul({docsPath:"/docs/actions/wallet/sendTransaction"});const b=zl(r);if(!s)throw new Error("Missing to address");if(b.type!=="local")throw new Error("RPC account type not supported");const v=await b.encodeCallData({to:s,value:f||0n,data:n||"0x"}),A=await Xo(t,CP)({userOperation:{sender:b.address,paymasterAndData:"0x",maxFeePerGas:i||0n,maxPriorityFeePerGas:o||0n,callData:v,nonce:d?BigInt(d):void 0},account:b,sponsorUserOperation:p}),_=await Xo(t,Yx)({hash:A});return _==null?void 0:_.receipt.transactionHash}async function c7e(t,{account:e=t.account,message:r}){if(!e)throw new Ul({docsPath:"/docs/actions/wallet/signMessage"});const n=zl(e);if(n.type==="local")return n.signMessage({message:r});throw new Error("Sign message is not supported by this account")}async function u7e(t,{account:e=t.account,domain:r,message:n,primaryType:i,types:o}){if(!e)throw new Ul({docsPath:"/docs/actions/wallet/signMessage"});const s=zl(e),f={EIP712Domain:uy({domain:r}),...o};if(Bx({domain:r,message:n,primaryType:i,types:f}),s.type==="local")return s.signTypedData({domain:r,primaryType:i,types:f,message:n});throw new Error("Sign type message is not supported by this account")}async function l7e(t,e){const{account:r=t.account,transactions:n,sponsorUserOperation:i,maxFeePerGas:o,maxPriorityFeePerGas:s,nonce:f}=e;if(!r)throw new Ul({docsPath:"/docs/actions/wallet/sendTransaction"});const d=zl(r);if(d.type!=="local")throw new Error("RPC account type not supported");const p=await d.encodeCallData(n.map(({to:A,value:_,data:S})=>{if(!A)throw new Error("Missing to address");return{to:A,value:_||0n,data:S||"0x"}})),b=await Xo(t,CP)({userOperation:{sender:d.address,paymasterAndData:"0x",maxFeePerGas:o||0n,maxPriorityFeePerGas:s||0n,callData:p,nonce:f},account:d,sponsorUserOperation:i}),v=await Xo(t,Yx)({hash:b});return v==null?void 0:v.receipt.transactionHash}async function d7e(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:o,...s}){const f=pi({abi:e,args:n,functionName:o});return await Xo(t,kK)({data:`${f}${i?i.replace("0x",""):""}`,to:r,...s})}const h7e=({sponsorUserOperation:t})=>e=>({prepareUserOperationRequest:r=>RK(e,r),deployContract:r=>f7e(e,{...r,sponsorUserOperation:t}),sendTransaction:r=>kK(e,{...r,sponsorUserOperation:t}),sendTransactions:r=>l7e(e,{...r,sponsorUserOperation:t}),signMessage:r=>c7e(e,r),signTypedData:r=>u7e(e,r),writeContract:r=>d7e(e,{...r,sponsorUserOperation:t})}),p7e=t=>{const{key:e="Account",name:r="Smart Account Client",transport:n}=t;return Dl({...t,key:e,name:r,transport:o=>n({...o,retryCount:0}),type:"smartAccountClient"}).extend(h7e({sponsorUserOperation:t.sponsorUserOperation}))},m7e=async t=>{const e=await t.request({method:"pimlico_getUserOperationGasPrice",params:[]});return{slow:{maxFeePerGas:BigInt(e.slow.maxFeePerGas),maxPriorityFeePerGas:BigInt(e.slow.maxPriorityFeePerGas)},standard:{maxFeePerGas:BigInt(e.standard.maxFeePerGas),maxPriorityFeePerGas:BigInt(e.standard.maxPriorityFeePerGas)},fast:{maxFeePerGas:BigInt(e.fast.maxFeePerGas),maxPriorityFeePerGas:BigInt(e.fast.maxPriorityFeePerGas)}}},g7e=async(t,{hash:e})=>t.request({method:"pimlico_getUserOperationStatus",params:[e]}),b7e=async(t,e)=>{const r=await t.request({method:"pm_sponsorUserOperation",params:[jg(e.userOperation),e.entryPoint]});return{paymasterAndData:r.paymasterAndData,preVerificationGas:BigInt(r.preVerificationGas),verificationGasLimit:BigInt(r.verificationGasLimit),callGasLimit:BigInt(r.callGasLimit)}},y7e=t=>({getUserOperationGasPrice:async()=>m7e(t),getUserOperationStatus:async e=>g7e(t,e)}),v7e=t=>({sponsorUserOperation:async e=>b7e(t,e)}),w7e=t=>{const{key:e="public",name:r="Pimlico Bundler Client"}=t;return Dl({...t,key:e,name:r,type:"pimlicoBundlerClient"}).extend(a7e).extend(y7e)},x7e=t=>{const{key:e="public",name:r="Pimlico Paymaster Client"}=t;return Dl({...t,key:e,name:r,type:"pimlicoPaymasterClient"}).extend(v7e)};function BK(t){if(typeof t=="string"){if(!tn(t))throw new ei({address:t});return{address:t,type:"json-rpc"}}if(!tn(t.address))throw new ei({address:t.address});return{address:t.address,signMessage:t.signMessage,signTransaction:t.signTransaction,signTypedData:t.signTypedData,source:"custom",type:"local"}}const E7e={SafeOp:[{type:"address",name:"safe"},{type:"bytes",name:"callData"},{type:"uint256",name:"nonce"},{type:"uint256",name:"preVerificationGas"},{type:"uint256",name:"verificationGasLimit"},{type:"uint256",name:"callGasLimit"},{type:"uint256",name:"maxFeePerGas"},{type:"uint256",name:"maxPriorityFeePerGas"},{type:"address",name:"entryPoint"}]},id={"1.4.1":{ADD_MODULES_LIB_ADDRESS:"0x191EFDC03615B575922289DC339F4c70aC5C30Af",SAFE_4337_MODULE_ADDRESS:"0x39E54Bb2b3Aa444b4B39DEe15De3b7809c36Fc38",SAFE_PROXY_FACTORY_ADDRESS:"0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67",SAFE_SINGLETON_ADDRESS:"0x41675C099F32341bf84BFc5382aF534df5C7461a",MULTI_SEND_ADDRESS:"0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526",MULTI_SEND_CALL_ONLY_ADDRESS:"0x9641d764fc13c8B624c04430C7356C1C7C8102e2"}},WB=(t,e)=>{const r=[0,1,27,28],n=27;let i=parseInt(e.slice(-2),16);if(!r.includes(i))throw new Error("Invalid signature");return t==="eth_sign"&&(i{const e=t;return typeof e=="string"||e.raw?ly(e):E1(t)},A7e=t=>zm(["uint8","address","uint256","uint256","bytes"],[t.operation,t.to,t.value,BigInt(t.data.slice(2).length/2),t.data]).slice(2),OK=t=>{const e=`0x${t.map(r=>A7e(r)).join("")}`;return pi({abi:[{inputs:[{internalType:"bytes",name:"transactions",type:"bytes"}],name:"multiSend",outputs:[],stateMutability:"payable",type:"function"}],functionName:"multiSend",args:[e]})},NK=async({owner:t,addModuleLibAddress:e,safe4337ModuleAddress:r,multiSendAddress:n,setupTransactions:i=[],safeModules:o=[]})=>{const s=OK([{to:e,data:pi({abi:[{inputs:[{internalType:"address[]",name:"modules",type:"address[]"}],name:"enableModules",outputs:[],stateMutability:"nonpayable",type:"function"}],functionName:"enableModules",args:[[r,...o]]}),value:0n,operation:1},...i.map(f=>({...f,operation:0}))]);return pi({abi:[{inputs:[{internalType:"address[]",name:"_owners",type:"address[]"},{internalType:"uint256",name:"_threshold",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"address",name:"fallbackHandler",type:"address"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint256",name:"payment",type:"uint256"},{internalType:"address payable",name:"paymentReceiver",type:"address"}],name:"setup",outputs:[],stateMutability:"nonpayable",type:"function"}],functionName:"setup",args:[[t],1n,n,s,r,cE,0n,cE]})},S7e=async({owner:t,addModuleLibAddress:e,safe4337ModuleAddress:r,safeProxyFactoryAddress:n,safeSingletonAddress:i,multiSendAddress:o,saltNonce:s=0n,setupTransactions:f=[],safeModules:d=[]})=>{if(!t)throw new Error("Owner account not found");const p=await NK({owner:t,addModuleLibAddress:e,safe4337ModuleAddress:r,multiSendAddress:o,setupTransactions:f,safeModules:d}),b=pi({abi:[{inputs:[{internalType:"address",name:"_singleton",type:"address"},{internalType:"bytes",name:"initializer",type:"bytes"},{internalType:"uint256",name:"saltNonce",type:"uint256"}],name:"createProxyWithNonce",outputs:[{internalType:"contract SafeProxy",name:"proxy",type:"address"}],stateMutability:"nonpayable",type:"function"}],functionName:"createProxyWithNonce",args:[i,p,s]});return Va([n,b])},M7e=async({client:t,owner:e,addModuleLibAddress:r,safe4337ModuleAddress:n,safeProxyFactoryAddress:i,safeSingletonAddress:o,multiSendAddress:s,setupTransactions:f=[],safeModules:d=[],saltNonce:p=0n})=>{const b=await Xs(t,{abi:[{inputs:[],name:"proxyCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"pure",type:"function"}],address:i,functionName:"proxyCreationCode"}),v=zm(["bytes","uint256"],[b,Sr(o)]),A=await NK({owner:e,addModuleLibAddress:r,safe4337ModuleAddress:n,multiSendAddress:s,setupTransactions:f,safeModules:d}),_=Ur(zm(["bytes32","uint256"],[Ur(zm(["bytes"],[A])),p]));return zG({from:i,salt:_,bytecode:v,opcode:"CREATE2"})},_7e=(t,{addModuleLibAddress:e,safe4337ModuleAddress:r,safeProxyFactoryAddress:n,safeSingletonAddress:i,multiSendAddress:o,multiSendCallOnlyAddress:s})=>{const f=e??id[t].ADD_MODULES_LIB_ADDRESS,d=r??id[t].SAFE_4337_MODULE_ADDRESS,p=n??id[t].SAFE_PROXY_FACTORY_ADDRESS,b=i??id[t].SAFE_SINGLETON_ADDRESS,v=o??id[t].MULTI_SEND_ADDRESS,A=s??id[t].MULTI_SEND_CALL_ONLY_ADDRESS;return{addModuleLibAddress:f,safe4337ModuleAddress:d,safeProxyFactoryAddress:p,safeSingletonAddress:b,multiSendAddress:v,multiSendCallOnlyAddress:A}};async function P7e(t,{signer:e,safeVersion:r,entryPoint:n,addModuleLibAddress:i,safe4337ModuleAddress:o,safeProxyFactoryAddress:s,safeSingletonAddress:f,multiSendAddress:d,multiSendCallOnlyAddress:p,saltNonce:b=0n,safeModules:v=[],setupTransactions:A=[]}){const _=await qp(t),S=e.type==="local"?{...e,signTransaction:(K,Y)=>{throw new KB}}:e,{addModuleLibAddress:P,safe4337ModuleAddress:I,safeProxyFactoryAddress:C,safeSingletonAddress:T,multiSendAddress:O,multiSendCallOnlyAddress:B}=_7e(r,{addModuleLibAddress:i,safe4337ModuleAddress:o,safeProxyFactoryAddress:s,safeSingletonAddress:f,multiSendAddress:d,multiSendCallOnlyAddress:p}),D=await M7e({client:t,owner:S.address,addModuleLibAddress:P,safe4337ModuleAddress:I,safeProxyFactoryAddress:C,safeSingletonAddress:T,multiSendAddress:O,saltNonce:b,setupTransactions:A,safeModules:v});if(!D)throw new Error("Account address not found");return{...BK({address:D,async signMessage({message:K}){const Y=E1({domain:{chainId:_,verifyingContract:D},types:{SafeMessage:[{name:"message",type:"bytes"}]},primaryType:"SafeMessage",message:{message:JB(K)}});return WB("eth_sign",await dV(t,{account:S,message:{raw:Jn(Y)}}))},async signTransaction(K,Y){throw new KB},async signTypedData(K){return WB("eth_signTypedData",await fE(t,{account:S,domain:{chainId:_,verifyingContract:D},types:{SafeMessage:[{name:"message",type:"bytes"}]},primaryType:"SafeMessage",message:{message:JB(K)}}))}}),client:t,publicKey:D,entryPoint:n,source:"SafeSmartAccount",async getNonce(){return s7e(t,{sender:D,entryPoint:n})},async signUserOperation(K){const Y=[{signer:S.address,data:await fE(t,{account:S,domain:{chainId:_,verifyingContract:I},types:E7e,primaryType:"SafeOp",message:{safe:D,callData:K.callData,nonce:K.nonce,preVerificationGas:K.preVerificationGas,verificationGasLimit:K.verificationGasLimit,callGasLimit:K.callGasLimit,maxFeePerGas:K.maxFeePerGas,maxPriorityFeePerGas:K.maxPriorityFeePerGas,entryPoint:n}})}];Y.sort((ie,x)=>ie.signer.toLowerCase().localeCompare(x.signer.toLowerCase()));let W="0x";for(const ie of Y)W+=ie.data.slice(2);return W},async getInitCode(){const K=await PG(t,{address:D});return((K==null?void 0:K.length)??0)>2?"0x":S7e({owner:S.address,addModuleLibAddress:P,safe4337ModuleAddress:I,safeProxyFactoryAddress:C,safeSingletonAddress:T,multiSendAddress:O,saltNonce:b,setupTransactions:A,safeModules:v})},async encodeDeployCallData(K){throw new Error("Safe account doesn't support account deployment")},async encodeCallData(K){let Y,W,ie;if(Array.isArray(K)){const x=K;Y=B,W=0n,ie=OK(x.map(a=>({...a,operation:0})))}else{const x=K;Y=x.to,ie=x.data,W=x.value}return pi({abi:[{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint8",name:"operation",type:"uint8"}],name:"executeUserOp",outputs:[],stateMutability:"nonpayable",type:"function"}],functionName:"executeUserOp",args:[Y,W,ie,0]})},async getDummySignature(){return"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"}}}/** +`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountOrClientNotFoundError"})}}function zl(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}async function RK(t,e){const{account:r=t.account,userOperation:n,sponsorUserOperation:i}=e;if(!r)throw new Ul;const o=zl(r),[s,f,d,p,b,v]=await Promise.all([n.sender||o.address,n.nonce||o.getNonce(),n.initCode||o.getInitCode(),n.signature||o.getDummySignature(),n.callData,!n.maxFeePerGas||!n.maxPriorityFeePerGas?aG(o.client):void 0]),A={sender:s,nonce:f,initCode:d,signature:p,callData:b,paymasterAndData:"0x",maxFeePerGas:n.maxFeePerGas||(v==null?void 0:v.maxFeePerGas)||0n,maxPriorityFeePerGas:n.maxPriorityFeePerGas||(v==null?void 0:v.maxPriorityFeePerGas)||0n,callGasLimit:n.callGasLimit||0n,verificationGasLimit:n.verificationGasLimit||0n,preVerificationGas:n.preVerificationGas||0n};if(i){const{callGasLimit:_,verificationGasLimit:S,preVerificationGas:P,paymasterAndData:I}=await i({userOperation:A,entryPoint:o.entryPoint});A.paymasterAndData=I,A.callGasLimit=A.callGasLimit||_,A.verificationGasLimit=A.verificationGasLimit||S,A.preVerificationGas=A.preVerificationGas||P}else if(!A.callGasLimit||!A.verificationGasLimit||!A.preVerificationGas){const _=await Xo(t,CK)({userOperation:{...A},entryPoint:o.entryPoint});A.callGasLimit=A.callGasLimit||_.callGasLimit,A.verificationGasLimit=A.verificationGasLimit||_.verificationGasLimit,A.preVerificationGas=A.preVerificationGas||_.preVerificationGas}return A}async function CP(t,e){const{account:r=t.account}=e;if(!r)throw new Ul;const n=zl(r),i=await Xo(t,RK)(e);return i.signature=await n.signUserOperation(i),await Xo(t,TK,"sendUserOperation")({userOperation:i,entryPoint:n.entryPoint})}async function f7e(t,{abi:e,args:r,bytecode:n,sponsorUserOperation:i,...o}){const{account:s=t.account}=o;if(!s)throw new Ul({docsPath:"/docs/actions/wallet/sendTransaction"});const f=zl(s),d=await Xo(t,CP)({userOperation:{sender:f.address,paymasterAndData:"0x",maxFeePerGas:o.maxFeePerGas||0n,maxPriorityFeePerGas:o.maxPriorityFeePerGas||0n,callData:await f.encodeDeployCallData({abi:e,args:r,bytecode:n})},account:f,sponsorUserOperation:i}),p=await Xo(t,Yx)({hash:d});return p==null?void 0:p.receipt.transactionHash}async function kK(t,e){const{account:r=t.account,data:n,maxFeePerGas:i,maxPriorityFeePerGas:o,to:s,value:f,nonce:d,sponsorUserOperation:p}=e;if(!r)throw new Ul({docsPath:"/docs/actions/wallet/sendTransaction"});const b=zl(r);if(!s)throw new Error("Missing to address");if(b.type!=="local")throw new Error("RPC account type not supported");const v=await b.encodeCallData({to:s,value:f||0n,data:n||"0x"}),A=await Xo(t,CP)({userOperation:{sender:b.address,paymasterAndData:"0x",maxFeePerGas:i||0n,maxPriorityFeePerGas:o||0n,callData:v,nonce:d?BigInt(d):void 0},account:b,sponsorUserOperation:p}),_=await Xo(t,Yx)({hash:A});return _==null?void 0:_.receipt.transactionHash}async function c7e(t,{account:e=t.account,message:r}){if(!e)throw new Ul({docsPath:"/docs/actions/wallet/signMessage"});const n=zl(e);if(n.type==="local")return n.signMessage({message:r});throw new Error("Sign message is not supported by this account")}async function u7e(t,{account:e=t.account,domain:r,message:n,primaryType:i,types:o}){if(!e)throw new Ul({docsPath:"/docs/actions/wallet/signMessage"});const s=zl(e),f={EIP712Domain:uy({domain:r}),...o};if(Bx({domain:r,message:n,primaryType:i,types:f}),s.type==="local")return s.signTypedData({domain:r,primaryType:i,types:f,message:n});throw new Error("Sign type message is not supported by this account")}async function l7e(t,e){const{account:r=t.account,transactions:n,sponsorUserOperation:i,maxFeePerGas:o,maxPriorityFeePerGas:s,nonce:f}=e;if(!r)throw new Ul({docsPath:"/docs/actions/wallet/sendTransaction"});const d=zl(r);if(d.type!=="local")throw new Error("RPC account type not supported");const p=await d.encodeCallData(n.map(({to:A,value:_,data:S})=>{if(!A)throw new Error("Missing to address");return{to:A,value:_||0n,data:S||"0x"}})),b=await Xo(t,CP)({userOperation:{sender:d.address,paymasterAndData:"0x",maxFeePerGas:o||0n,maxPriorityFeePerGas:s||0n,callData:p,nonce:f},account:d,sponsorUserOperation:i}),v=await Xo(t,Yx)({hash:b});return v==null?void 0:v.receipt.transactionHash}async function d7e(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:o,...s}){const f=pi({abi:e,args:n,functionName:o});return await Xo(t,kK)({data:`${f}${i?i.replace("0x",""):""}`,to:r,...s})}const h7e=({sponsorUserOperation:t})=>e=>({prepareUserOperationRequest:r=>RK(e,r),deployContract:r=>f7e(e,{...r,sponsorUserOperation:t}),sendTransaction:r=>kK(e,{...r,sponsorUserOperation:t}),sendTransactions:r=>l7e(e,{...r,sponsorUserOperation:t}),signMessage:r=>c7e(e,r),signTypedData:r=>u7e(e,r),writeContract:r=>d7e(e,{...r,sponsorUserOperation:t})}),p7e=t=>{const{key:e="Account",name:r="Smart Account Client",transport:n}=t;return Dl({...t,key:e,name:r,transport:o=>n({...o,retryCount:0}),type:"smartAccountClient"}).extend(h7e({sponsorUserOperation:t.sponsorUserOperation}))},m7e=async t=>{const e=await t.request({method:"pimlico_getUserOperationGasPrice",params:[]});return{slow:{maxFeePerGas:BigInt(e.slow.maxFeePerGas),maxPriorityFeePerGas:BigInt(e.slow.maxPriorityFeePerGas)},standard:{maxFeePerGas:BigInt(e.standard.maxFeePerGas),maxPriorityFeePerGas:BigInt(e.standard.maxPriorityFeePerGas)},fast:{maxFeePerGas:BigInt(e.fast.maxFeePerGas),maxPriorityFeePerGas:BigInt(e.fast.maxPriorityFeePerGas)}}},g7e=async(t,{hash:e})=>t.request({method:"pimlico_getUserOperationStatus",params:[e]}),b7e=async(t,e)=>{const r=await t.request({method:"pm_sponsorUserOperation",params:[Hg(e.userOperation),e.entryPoint]});return{paymasterAndData:r.paymasterAndData,preVerificationGas:BigInt(r.preVerificationGas),verificationGasLimit:BigInt(r.verificationGasLimit),callGasLimit:BigInt(r.callGasLimit)}},y7e=t=>({getUserOperationGasPrice:async()=>m7e(t),getUserOperationStatus:async e=>g7e(t,e)}),v7e=t=>({sponsorUserOperation:async e=>b7e(t,e)}),w7e=t=>{const{key:e="public",name:r="Pimlico Bundler Client"}=t;return Dl({...t,key:e,name:r,type:"pimlicoBundlerClient"}).extend(a7e).extend(y7e)},x7e=t=>{const{key:e="public",name:r="Pimlico Paymaster Client"}=t;return Dl({...t,key:e,name:r,type:"pimlicoPaymasterClient"}).extend(v7e)};function BK(t){if(typeof t=="string"){if(!tn(t))throw new ei({address:t});return{address:t,type:"json-rpc"}}if(!tn(t.address))throw new ei({address:t.address});return{address:t.address,signMessage:t.signMessage,signTransaction:t.signTransaction,signTypedData:t.signTypedData,source:"custom",type:"local"}}const E7e={SafeOp:[{type:"address",name:"safe"},{type:"bytes",name:"callData"},{type:"uint256",name:"nonce"},{type:"uint256",name:"preVerificationGas"},{type:"uint256",name:"verificationGasLimit"},{type:"uint256",name:"callGasLimit"},{type:"uint256",name:"maxFeePerGas"},{type:"uint256",name:"maxPriorityFeePerGas"},{type:"address",name:"entryPoint"}]},id={"1.4.1":{ADD_MODULES_LIB_ADDRESS:"0x191EFDC03615B575922289DC339F4c70aC5C30Af",SAFE_4337_MODULE_ADDRESS:"0x39E54Bb2b3Aa444b4B39DEe15De3b7809c36Fc38",SAFE_PROXY_FACTORY_ADDRESS:"0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67",SAFE_SINGLETON_ADDRESS:"0x41675C099F32341bf84BFc5382aF534df5C7461a",MULTI_SEND_ADDRESS:"0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526",MULTI_SEND_CALL_ONLY_ADDRESS:"0x9641d764fc13c8B624c04430C7356C1C7C8102e2"}},WB=(t,e)=>{const r=[0,1,27,28],n=27;let i=parseInt(e.slice(-2),16);if(!r.includes(i))throw new Error("Invalid signature");return t==="eth_sign"&&(i{const e=t;return typeof e=="string"||e.raw?ly(e):A1(t)},A7e=t=>jm(["uint8","address","uint256","uint256","bytes"],[t.operation,t.to,t.value,BigInt(t.data.slice(2).length/2),t.data]).slice(2),OK=t=>{const e=`0x${t.map(r=>A7e(r)).join("")}`;return pi({abi:[{inputs:[{internalType:"bytes",name:"transactions",type:"bytes"}],name:"multiSend",outputs:[],stateMutability:"payable",type:"function"}],functionName:"multiSend",args:[e]})},NK=async({owner:t,addModuleLibAddress:e,safe4337ModuleAddress:r,multiSendAddress:n,setupTransactions:i=[],safeModules:o=[]})=>{const s=OK([{to:e,data:pi({abi:[{inputs:[{internalType:"address[]",name:"modules",type:"address[]"}],name:"enableModules",outputs:[],stateMutability:"nonpayable",type:"function"}],functionName:"enableModules",args:[[r,...o]]}),value:0n,operation:1},...i.map(f=>({...f,operation:0}))]);return pi({abi:[{inputs:[{internalType:"address[]",name:"_owners",type:"address[]"},{internalType:"uint256",name:"_threshold",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"address",name:"fallbackHandler",type:"address"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint256",name:"payment",type:"uint256"},{internalType:"address payable",name:"paymentReceiver",type:"address"}],name:"setup",outputs:[],stateMutability:"nonpayable",type:"function"}],functionName:"setup",args:[[t],1n,n,s,r,cE,0n,cE]})},S7e=async({owner:t,addModuleLibAddress:e,safe4337ModuleAddress:r,safeProxyFactoryAddress:n,safeSingletonAddress:i,multiSendAddress:o,saltNonce:s=0n,setupTransactions:f=[],safeModules:d=[]})=>{if(!t)throw new Error("Owner account not found");const p=await NK({owner:t,addModuleLibAddress:e,safe4337ModuleAddress:r,multiSendAddress:o,setupTransactions:f,safeModules:d}),b=pi({abi:[{inputs:[{internalType:"address",name:"_singleton",type:"address"},{internalType:"bytes",name:"initializer",type:"bytes"},{internalType:"uint256",name:"saltNonce",type:"uint256"}],name:"createProxyWithNonce",outputs:[{internalType:"contract SafeProxy",name:"proxy",type:"address"}],stateMutability:"nonpayable",type:"function"}],functionName:"createProxyWithNonce",args:[i,p,s]});return Va([n,b])},M7e=async({client:t,owner:e,addModuleLibAddress:r,safe4337ModuleAddress:n,safeProxyFactoryAddress:i,safeSingletonAddress:o,multiSendAddress:s,setupTransactions:f=[],safeModules:d=[],saltNonce:p=0n})=>{const b=await Xs(t,{abi:[{inputs:[],name:"proxyCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"pure",type:"function"}],address:i,functionName:"proxyCreationCode"}),v=jm(["bytes","uint256"],[b,Sr(o)]),A=await NK({owner:e,addModuleLibAddress:r,safe4337ModuleAddress:n,multiSendAddress:s,setupTransactions:f,safeModules:d}),_=Ur(jm(["bytes32","uint256"],[Ur(jm(["bytes"],[A])),p]));return zG({from:i,salt:_,bytecode:v,opcode:"CREATE2"})},_7e=(t,{addModuleLibAddress:e,safe4337ModuleAddress:r,safeProxyFactoryAddress:n,safeSingletonAddress:i,multiSendAddress:o,multiSendCallOnlyAddress:s})=>{const f=e??id[t].ADD_MODULES_LIB_ADDRESS,d=r??id[t].SAFE_4337_MODULE_ADDRESS,p=n??id[t].SAFE_PROXY_FACTORY_ADDRESS,b=i??id[t].SAFE_SINGLETON_ADDRESS,v=o??id[t].MULTI_SEND_ADDRESS,A=s??id[t].MULTI_SEND_CALL_ONLY_ADDRESS;return{addModuleLibAddress:f,safe4337ModuleAddress:d,safeProxyFactoryAddress:p,safeSingletonAddress:b,multiSendAddress:v,multiSendCallOnlyAddress:A}};async function P7e(t,{signer:e,safeVersion:r,entryPoint:n,addModuleLibAddress:i,safe4337ModuleAddress:o,safeProxyFactoryAddress:s,safeSingletonAddress:f,multiSendAddress:d,multiSendCallOnlyAddress:p,saltNonce:b=0n,safeModules:v=[],setupTransactions:A=[]}){const _=await qp(t),S=e.type==="local"?{...e,signTransaction:(V,Y)=>{throw new KB}}:e,{addModuleLibAddress:P,safe4337ModuleAddress:I,safeProxyFactoryAddress:C,safeSingletonAddress:T,multiSendAddress:k,multiSendCallOnlyAddress:O}=_7e(r,{addModuleLibAddress:i,safe4337ModuleAddress:o,safeProxyFactoryAddress:s,safeSingletonAddress:f,multiSendAddress:d,multiSendCallOnlyAddress:p}),D=await M7e({client:t,owner:S.address,addModuleLibAddress:P,safe4337ModuleAddress:I,safeProxyFactoryAddress:C,safeSingletonAddress:T,multiSendAddress:k,saltNonce:b,setupTransactions:A,safeModules:v});if(!D)throw new Error("Account address not found");return{...BK({address:D,async signMessage({message:V}){const Y=A1({domain:{chainId:_,verifyingContract:D},types:{SafeMessage:[{name:"message",type:"bytes"}]},primaryType:"SafeMessage",message:{message:JB(V)}});return WB("eth_sign",await dV(t,{account:S,message:{raw:Jn(Y)}}))},async signTransaction(V,Y){throw new KB},async signTypedData(V){return WB("eth_signTypedData",await fE(t,{account:S,domain:{chainId:_,verifyingContract:D},types:{SafeMessage:[{name:"message",type:"bytes"}]},primaryType:"SafeMessage",message:{message:JB(V)}}))}}),client:t,publicKey:D,entryPoint:n,source:"SafeSmartAccount",async getNonce(){return s7e(t,{sender:D,entryPoint:n})},async signUserOperation(V){const Y=[{signer:S.address,data:await fE(t,{account:S,domain:{chainId:_,verifyingContract:I},types:E7e,primaryType:"SafeOp",message:{safe:D,callData:V.callData,nonce:V.nonce,preVerificationGas:V.preVerificationGas,verificationGasLimit:V.verificationGasLimit,callGasLimit:V.callGasLimit,maxFeePerGas:V.maxFeePerGas,maxPriorityFeePerGas:V.maxPriorityFeePerGas,entryPoint:n}})}];Y.sort((ie,x)=>ie.signer.toLowerCase().localeCompare(x.signer.toLowerCase()));let W="0x";for(const ie of Y)W+=ie.data.slice(2);return W},async getInitCode(){const V=await PG(t,{address:D});return((V==null?void 0:V.length)??0)>2?"0x":S7e({owner:S.address,addModuleLibAddress:P,safe4337ModuleAddress:I,safeProxyFactoryAddress:C,safeSingletonAddress:T,multiSendAddress:k,saltNonce:b,setupTransactions:A,safeModules:v})},async encodeDeployCallData(V){throw new Error("Safe account doesn't support account deployment")},async encodeCallData(V){let Y,W,ie;if(Array.isArray(V)){const x=V;Y=O,W=0n,ie=OK(x.map(a=>({...a,operation:0})))}else{const x=V;Y=x.to,ie=x.data,W=x.value}return pi({abi:[{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint8",name:"operation",type:"uint8"}],name:"executeUserOp",outputs:[],stateMutability:"nonpayable",type:"function"}],functionName:"executeUserOp",args:[Y,W,ie,0]})},async getDummySignature(){return"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"}}}/** * Code modified from https://github.com/google/tink/blob/6f74b99a2bfe6677e3670799116a57268fd067fa/javascript/subtle/bytes.ts * * @license @@ -200,8 +200,8 @@ use chrome, FireFox or Internet Explorer 11`)}var sj=Bt,_R=i1,aj=sj.Buffer,fj=sj * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 - */function LK(){return BigInt("115792089210356248762697446949407573530086143415290314195533631308867097853951")}function R7e(){return BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b")}function k7e(t){return BigInt("0x"+I7e(t))}function YB(t){let e=t.toString(16);return e=e.length%2===0?e:"0"+e,C7e(e)}function SE(t,e){const r=BigInt(1)<>BigInt(2),i=B7e(r,n,e);if(i*i%e!==r)throw new Error("could not find a modular square root");return i}throw new Error("unsupported modulus value")}function N7e(t,e){const r=LK(),n=r-BigInt(3),i=R7e(),o=((t*t+n)*t+i)%r;let s=O7e(o,r);return e!==SE(s,0)&&(s=(r-s)%r),s}function L7e(t){const e=D7e();if(t.length!==1+e)throw new Error("compressed point has wrong length");if(t[0]!==2&&t[0]!==3)throw new Error("invalid format");const r=t[0]===3,n=k7e(t.subarray(1,t.length)),i=LK();if(n=i)throw new Error("x is out of range");const o=N7e(n,r);return{kty:"EC",crv:"P-256",x:ZB(YB(n),!0),y:ZB(YB(o),!0),ext:!0}}function D7e(){return 32}function DK(t){const e=btoa(t);return F7e(e)}function F7e(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function FSe(t){return t.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}function $Se(t){const{uncompressedPrivateKeyHex:e,compressedPublicKeyHex:r}=t,n=L7e(FK(r));return n.d=$7e(e),n}function FK(t){if(t.length===0||t.length%2!==0||/[^a-fA-F0-9]/u.test(t))throw new Error(`Invalid hex string: ${JSON.stringify(t)}`);return Uint8Array.from(t.match(/.{2}/g).map(e=>parseInt(e,16)))}function $7e(t){const e=FK(t);return DK(e.reduce((r,n)=>r+String.fromCharCode(n),""))}const U7e="X-Stamp",z7e=async t=>{var e;return typeof((e=globalThis==null?void 0:globalThis.crypto)==null?void 0:e.subtle)<"u"?(await z6(()=>import("./webcrypto-83eb6fa6.js"),[]).then(n=>n.signWithApiKey))(t):(await z6(()=>import("./nodecrypto-b53e1cbd.js"),[]).then(n=>n.signWithApiKey))(t)};class $K{constructor(e){this.apiPublicKey=e.apiPublicKey,this.apiPrivateKey=e.apiPrivateKey}async stamp(e){const r=await z7e({publicKey:this.apiPublicKey,privateKey:this.apiPrivateKey,content:e}),n={publicKey:this.apiPublicKey,scheme:"SIGNATURE_SCHEME_TK_API_P256",signature:r};return{stampHeaderName:U7e,stampHeaderValue:DK(JSON.stringify(n))}}}var ME={exports:{}};(function(t,e){var r=typeof self<"u"?self:et,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(s){var f={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function d(l){return l&&DataView.prototype.isPrototypeOf(l)}if(f.arrayBuffer)var p=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(l){return l&&p.indexOf(Object.prototype.toString.call(l))>-1};function v(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(l))throw new TypeError("Invalid character in header field name");return l.toLowerCase()}function A(l){return typeof l!="string"&&(l=String(l)),l}function _(l){var h={next:function(){var m=l.shift();return{done:m===void 0,value:m}}};return f.iterable&&(h[Symbol.iterator]=function(){return h}),h}function S(l){this.map={},l instanceof S?l.forEach(function(h,m){this.append(m,h)},this):Array.isArray(l)?l.forEach(function(h){this.append(h[0],h[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(h){this.append(h,l[h])},this)}S.prototype.append=function(l,h){l=v(l),h=A(h);var m=this.map[l];this.map[l]=m?m+", "+h:h},S.prototype.delete=function(l){delete this.map[v(l)]},S.prototype.get=function(l){return l=v(l),this.has(l)?this.map[l]:null},S.prototype.has=function(l){return this.map.hasOwnProperty(v(l))},S.prototype.set=function(l,h){this.map[v(l)]=A(h)},S.prototype.forEach=function(l,h){for(var m in this.map)this.map.hasOwnProperty(m)&&l.call(h,this.map[m],m,this)},S.prototype.keys=function(){var l=[];return this.forEach(function(h,m){l.push(m)}),_(l)},S.prototype.values=function(){var l=[];return this.forEach(function(h){l.push(h)}),_(l)},S.prototype.entries=function(){var l=[];return this.forEach(function(h,m){l.push([m,h])}),_(l)},f.iterable&&(S.prototype[Symbol.iterator]=S.prototype.entries);function P(l){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}function I(l){return new Promise(function(h,m){l.onload=function(){h(l.result)},l.onerror=function(){m(l.error)}})}function C(l){var h=new FileReader,m=I(h);return h.readAsArrayBuffer(l),m}function T(l){var h=new FileReader,m=I(h);return h.readAsText(l),m}function O(l){for(var h=new Uint8Array(l),m=new Array(h.length),w=0;w-1?h:l}function Y(l,h){h=h||{};var m=h.body;if(l instanceof Y){if(l.bodyUsed)throw new TypeError("Already read");this.url=l.url,this.credentials=l.credentials,h.headers||(this.headers=new S(l.headers)),this.method=l.method,this.mode=l.mode,this.signal=l.signal,!m&&l._bodyInit!=null&&(m=l._bodyInit,l.bodyUsed=!0)}else this.url=String(l);if(this.credentials=h.credentials||this.credentials||"same-origin",(h.headers||!this.headers)&&(this.headers=new S(h.headers)),this.method=K(h.method||this.method||"GET"),this.mode=h.mode||this.mode||null,this.signal=h.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&m)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(m)}Y.prototype.clone=function(){return new Y(this,{body:this._bodyInit})};function W(l){var h=new FormData;return l.trim().split("&").forEach(function(m){if(m){var w=m.split("="),E=w.shift().replace(/\+/g," "),y=w.join("=").replace(/\+/g," ");h.append(decodeURIComponent(E),decodeURIComponent(y))}}),h}function ie(l){var h=new S,m=l.replace(/\r?\n[\t ]+/g," ");return m.split(/\r?\n/).forEach(function(w){var E=w.split(":"),y=E.shift().trim();if(y){var c=E.join(":").trim();h.append(y,c)}}),h}D.call(Y.prototype);function x(l,h){h||(h={}),this.type="default",this.status=h.status===void 0?200:h.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in h?h.statusText:"OK",this.headers=new S(h.headers),this.url=h.url||"",this._initBody(l)}D.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new S(this.headers),url:this.url})},x.error=function(){var l=new x(null,{status:0,statusText:""});return l.type="error",l};var a=[301,302,303,307,308];x.redirect=function(l,h){if(a.indexOf(h)===-1)throw new RangeError("Invalid status code");return new x(null,{status:h,headers:{location:l}})},s.DOMException=o.DOMException;try{new s.DOMException}catch{s.DOMException=function(h,m){this.message=h,this.name=m;var w=Error(h);this.stack=w.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function u(l,h){return new Promise(function(m,w){var E=new Y(l,h);if(E.signal&&E.signal.aborted)return w(new s.DOMException("Aborted","AbortError"));var y=new XMLHttpRequest;function c(){y.abort()}y.onload=function(){var g={status:y.status,statusText:y.statusText,headers:ie(y.getAllResponseHeaders()||"")};g.url="responseURL"in y?y.responseURL:g.headers.get("X-Request-URL");var M="response"in y?y.response:y.responseText;m(new x(M,g))},y.onerror=function(){w(new TypeError("Network request failed"))},y.ontimeout=function(){w(new TypeError("Network request failed"))},y.onabort=function(){w(new s.DOMException("Aborted","AbortError"))},y.open(E.method,E.url,!0),E.credentials==="include"?y.withCredentials=!0:E.credentials==="omit"&&(y.withCredentials=!1),"responseType"in y&&f.blob&&(y.responseType="blob"),E.headers.forEach(function(g,M){y.setRequestHeader(M,g)}),E.signal&&(E.signal.addEventListener("abort",c),y.onreadystatechange=function(){y.readyState===4&&E.signal.removeEventListener("abort",c)}),y.send(typeof E._bodyInit>"u"?null:E._bodyInit)})}return u.polyfill=!0,o.fetch||(o.fetch=u,o.Headers=S,o.Request=Y,o.Response=x),s.Headers=S,s.Request=Y,s.Response=x,s.fetch=u,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(ME,ME.exports);var j7e=ME.exports;const H7e=j7e.fetch;function q7e(t){const e=new Uint8Array(t);let r="";for(const o of e)r+=String.fromCharCode(o);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const Qc="copy",u2="convert";function _E(t,e,r){if(e===Qc)return r;if(e===u2)return t(r);if(e instanceof Array)return r.map(n=>_E(t,e[0],n));if(e instanceof Object){const n={};for(const[i,o]of Object.entries(e)){if(o.derive){const s=o.derive(r);s!==void 0&&(r[i]=s)}if(!(i in r)){if(o.required)throw new Error(`Missing key: ${i}`);continue}if(r[i]==null){n[i]=null;continue}n[i]=_E(t,o.schema,r[i])}return n}}function QB(t,e){return{required:!0,schema:t,derive:e}}function od(t){return{required:!0,schema:t}}function l2(t){return{required:!1,schema:t}}const G7e={appid:l2(Qc),appidExclude:l2(Qc),credProps:l2(Qc)},V7e={type:od(Qc),id:od(Qc),rawId:od(u2),authenticatorAttachment:l2(Qc),response:od({clientDataJSON:od(u2),attestationObject:od(u2),transports:QB(Qc,t=>{var e;return((e=t.getTransports)==null?void 0:e.call(t))||[]})}),clientExtensionResults:QB(G7e,t=>t.getClientExtensionResults())};function K7e(t){return _E(q7e,V7e,t)}async function W7e(t){const e=await navigator.credentials.create(t);return e.toJSON=()=>K7e(e),e}function J7e(t){switch(t){case"internal":return"AUTHENTICATOR_TRANSPORT_INTERNAL";case"usb":return"AUTHENTICATOR_TRANSPORT_USB";case"nfc":return"AUTHENTICATOR_TRANSPORT_NFC";case"ble":return"AUTHENTICATOR_TRANSPORT_BLE";case"hybrid":return"AUTHENTICATOR_TRANSPORT_HYBRID";default:throw new Error("unsupported transport format")}}function Z7e(t){return{credentialId:t.rawId,attestationObject:t.response.attestationObject,clientDataJson:t.response.clientDataJSON,transports:t.response.transports.map(J7e)}}async function Y7e(t){if(!Q7e())throw new Error("webauthn is not supported by this browser");const r=await W7e(t);return Z7e(r.toJSON())}function Q7e(){return!!window.PublicKeyCredential}class X7e extends Error{constructor(e){let r=`Turnkey error ${e.code}: ${e.message}`;e.details!=null&&(r+=` (Details: ${JSON.stringify(e.details)})`),super(r),this.name="TurnkeyRequestError",this.details=e.details??null,this.code=e.code}}class Qx{constructor(e,r){if(this.getActivity=async n=>this.request("/public/v1/query/get_activity",n),this.stampGetActivity=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_activity",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getAuthenticator=async n=>this.request("/public/v1/query/get_authenticator",n),this.stampGetAuthenticator=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_authenticator",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getAuthenticators=async n=>this.request("/public/v1/query/get_authenticators",n),this.stampGetAuthenticators=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_authenticators",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getOrganization=async n=>this.request("/public/v1/query/get_organization",n),this.stampGetOrganization=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_organization",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getPolicy=async n=>this.request("/public/v1/query/get_policy",n),this.stampGetPolicy=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_policy",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getPrivateKey=async n=>this.request("/public/v1/query/get_private_key",n),this.stampGetPrivateKey=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_private_key",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getUser=async n=>this.request("/public/v1/query/get_user",n),this.stampGetUser=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_user",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getWallet=async n=>this.request("/public/v1/query/get_wallet",n),this.stampGetWallet=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_wallet",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getActivities=async n=>this.request("/public/v1/query/list_activities",n),this.stampGetActivities=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_activities",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getPolicies=async n=>this.request("/public/v1/query/list_policies",n),this.stampGetPolicies=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_policies",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.listPrivateKeyTags=async n=>this.request("/public/v1/query/list_private_key_tags",n),this.stampListPrivateKeyTags=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_private_key_tags",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getPrivateKeys=async n=>this.request("/public/v1/query/list_private_keys",n),this.stampGetPrivateKeys=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_private_keys",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.listUserTags=async n=>this.request("/public/v1/query/list_user_tags",n),this.stampListUserTags=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_user_tags",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getUsers=async n=>this.request("/public/v1/query/list_users",n),this.stampGetUsers=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_users",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getWalletAccounts=async n=>this.request("/public/v1/query/list_wallet_accounts",n),this.stampGetWalletAccounts=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_wallet_accounts",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getWallets=async n=>this.request("/public/v1/query/list_wallets",n),this.stampGetWallets=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_wallets",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getWhoami=async n=>this.request("/public/v1/query/whoami",n),this.stampGetWhoami=async n=>{const i=this.config.baseUrl+"/public/v1/query/whoami",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.approveActivity=async n=>this.request("/public/v1/submit/approve_activity",n),this.stampApproveActivity=async n=>{const i=this.config.baseUrl+"/public/v1/submit/approve_activity",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createApiKeys=async n=>this.request("/public/v1/submit/create_api_keys",n),this.stampCreateApiKeys=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_api_keys",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createApiOnlyUsers=async n=>this.request("/public/v1/submit/create_api_only_users",n),this.stampCreateApiOnlyUsers=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_api_only_users",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createAuthenticators=async n=>this.request("/public/v1/submit/create_authenticators",n),this.stampCreateAuthenticators=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_authenticators",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createInvitations=async n=>this.request("/public/v1/submit/create_invitations",n),this.stampCreateInvitations=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_invitations",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createPolicy=async n=>this.request("/public/v1/submit/create_policy",n),this.stampCreatePolicy=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_policy",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createPrivateKeyTag=async n=>this.request("/public/v1/submit/create_private_key_tag",n),this.stampCreatePrivateKeyTag=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_private_key_tag",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createPrivateKeys=async n=>this.request("/public/v1/submit/create_private_keys",n),this.stampCreatePrivateKeys=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_private_keys",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createSubOrganization=async n=>this.request("/public/v1/submit/create_sub_organization",n),this.stampCreateSubOrganization=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_sub_organization",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createUserTag=async n=>this.request("/public/v1/submit/create_user_tag",n),this.stampCreateUserTag=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_user_tag",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createUsers=async n=>this.request("/public/v1/submit/create_users",n),this.stampCreateUsers=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_users",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createWallet=async n=>this.request("/public/v1/submit/create_wallet",n),this.stampCreateWallet=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_wallet",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createWalletAccounts=async n=>this.request("/public/v1/submit/create_wallet_accounts",n),this.stampCreateWalletAccounts=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_wallet_accounts",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.deleteApiKeys=async n=>this.request("/public/v1/submit/delete_api_keys",n),this.stampDeleteApiKeys=async n=>{const i=this.config.baseUrl+"/public/v1/submit/delete_api_keys",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.deleteAuthenticators=async n=>this.request("/public/v1/submit/delete_authenticators",n),this.stampDeleteAuthenticators=async n=>{const i=this.config.baseUrl+"/public/v1/submit/delete_authenticators",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.deleteInvitation=async n=>this.request("/public/v1/submit/delete_invitation",n),this.stampDeleteInvitation=async n=>{const i=this.config.baseUrl+"/public/v1/submit/delete_invitation",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.deletePolicy=async n=>this.request("/public/v1/submit/delete_policy",n),this.stampDeletePolicy=async n=>{const i=this.config.baseUrl+"/public/v1/submit/delete_policy",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.emailAuth=async n=>this.request("/public/v1/submit/email_auth",n),this.stampEmailAuth=async n=>{const i=this.config.baseUrl+"/public/v1/submit/email_auth",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.exportPrivateKey=async n=>this.request("/public/v1/submit/export_private_key",n),this.stampExportPrivateKey=async n=>{const i=this.config.baseUrl+"/public/v1/submit/export_private_key",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.exportWallet=async n=>this.request("/public/v1/submit/export_wallet",n),this.stampExportWallet=async n=>{const i=this.config.baseUrl+"/public/v1/submit/export_wallet",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.initUserEmailRecovery=async n=>this.request("/public/v1/submit/init_user_email_recovery",n),this.stampInitUserEmailRecovery=async n=>{const i=this.config.baseUrl+"/public/v1/submit/init_user_email_recovery",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.recoverUser=async n=>this.request("/public/v1/submit/recover_user",n),this.stampRecoverUser=async n=>{const i=this.config.baseUrl+"/public/v1/submit/recover_user",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.rejectActivity=async n=>this.request("/public/v1/submit/reject_activity",n),this.stampRejectActivity=async n=>{const i=this.config.baseUrl+"/public/v1/submit/reject_activity",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.removeOrganizationFeature=async n=>this.request("/public/v1/submit/remove_organization_feature",n),this.stampRemoveOrganizationFeature=async n=>{const i=this.config.baseUrl+"/public/v1/submit/remove_organization_feature",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.setOrganizationFeature=async n=>this.request("/public/v1/submit/set_organization_feature",n),this.stampSetOrganizationFeature=async n=>{const i=this.config.baseUrl+"/public/v1/submit/set_organization_feature",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.signRawPayload=async n=>this.request("/public/v1/submit/sign_raw_payload",n),this.stampSignRawPayload=async n=>{const i=this.config.baseUrl+"/public/v1/submit/sign_raw_payload",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.signTransaction=async n=>this.request("/public/v1/submit/sign_transaction",n),this.stampSignTransaction=async n=>{const i=this.config.baseUrl+"/public/v1/submit/sign_transaction",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updatePolicy=async n=>this.request("/public/v1/submit/update_policy",n),this.stampUpdatePolicy=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_policy",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updatePrivateKeyTag=async n=>this.request("/public/v1/submit/update_private_key_tag",n),this.stampUpdatePrivateKeyTag=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_private_key_tag",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updateRootQuorum=async n=>this.request("/public/v1/submit/update_root_quorum",n),this.stampUpdateRootQuorum=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_root_quorum",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updateUser=async n=>this.request("/public/v1/submit/update_user",n),this.stampUpdateUser=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_user",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updateUserTag=async n=>this.request("/public/v1/submit/update_user_tag",n),this.stampUpdateUserTag=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_user_tag",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},!e.baseUrl)throw new Error("Missing base URL. Please verify env vars.");this.config=e,this.stamper=r}async request(e,r){const n=this.config.baseUrl+e,i=JSON.stringify(r),o=await this.stamper.stamp(i),s=await H7e(n,{method:"POST",headers:{[o.stampHeaderName]:o.stampHeaderValue},body:i,redirect:"follow"});if(!s.ok){let d;try{d=await s.json()}catch{throw new Error(`${s.status} ${s.statusText}`)}throw new X7e(d)}return await s.json()}}class qs extends Error{constructor(e){const{message:r,cause:n,activityId:i,activityStatus:o,activityType:s}=e;super(r),this.name="TurnkeyActivityError",this.activityId=i??null,this.activityStatus=o??null,this.activityType=s??null,this.cause=n??null}}const eEe=500;function tEe(t){const{client:e,requestFn:r,refreshIntervalMs:n=eEe}=t;return async i=>{let s=(await r(i)).activity;for(;;){switch(s.status){case"ACTIVITY_STATUS_COMPLETED":return s;case"ACTIVITY_STATUS_CREATED":break;case"ACTIVITY_STATUS_PENDING":break;case"ACTIVITY_STATUS_CONSENSUS_NEEDED":throw new qs({message:`Consensus needed for activity ${s.id}`,activityId:s.id,activityStatus:s.status,activityType:s.type});case"ACTIVITY_STATUS_FAILED":throw new qs({message:`Activity ${s.id} failed`,activityId:s.id,activityStatus:s.status,activityType:s.type});case"ACTIVITY_STATUS_REJECTED":throw new qs({message:`Activity ${s.id} was rejected`,activityId:s.id,activityStatus:s.status,activityType:s.type});default:nEe(s.status)}await rEe(n),s=(await e.getActivity({activityId:s.id,organizationId:s.organizationId})).activity}}}function rEe(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function nEe(t,e){throw new Error(e??`Unexpected case: ${JSON.stringify(t)}`)}async function iEe(t){var o;const{client:e,organizationId:r,signWith:n}=t;let{ethereumAddress:i}=t;if(!n)throw new qs({message:"Missing signWith parameter"});if(tn(n))i=n;else if(!i&&(i=(o=(await e.getPrivateKey({privateKeyId:n,organizationId:r})).privateKey.addresses.find(f=>f.format==="ADDRESS_FORMAT_ETHEREUM"))==null?void 0:o.address,typeof i!="string"||!i))throw new qs({message:`Unable to find Ethereum address for key ${n} under organization ${r}`});return BK({address:i,signMessage:function({message:s}){return oEe(e,s,r,n)},signTransaction:function(s,f){const d=f!=null&&f.serializer?f.serializer:nV;return sEe(e,s,d,r,n)},signTypedData:function(s){return aEe(e,s,r,n)}})}async function oEe(t,e,r,n){const i=ly(e);return`${await UK(t,i,r,n)}`}async function sEe(t,e,r,n,i){const s=r(e).replace(/^0x/,"");return await fEe(t,s,n,i)}async function aEe(t,e,r,n){const i=E1(e);return await UK(t,i,r,n)}async function fEe(t,e,r,n){let i;try{i=await cEe(t,e,r,n)}catch(o){throw o instanceof qs?o:new qs({message:`Failed to sign transaction: ${o.message}`,cause:o})}return`0x${i}`}async function cEe(t,e,r,n){var d,p;const{activity:i}=await t.signTransaction({type:"ACTIVITY_TYPE_SIGN_TRANSACTION_V2",organizationId:r,parameters:{signWith:n,type:"TRANSACTION_TYPE_ETHEREUM",unsignedTransaction:e},timestampMs:String(Date.now())}),{id:o,status:s,type:f}=i;if(i.status==="ACTIVITY_STATUS_COMPLETED")return PE((p=(d=i==null?void 0:i.result)==null?void 0:d.signTransactionResult)==null?void 0:p.signedTransaction);throw new qs({message:`Invalid activity status: ${i.status}`,activityId:o,activityStatus:s,activityType:f})}async function UK(t,e,r,n){let i;try{i=await uEe(t,e,r,n)}catch(o){throw o instanceof qs?o:new qs({message:`Failed to sign: ${o.message}`,cause:o})}return i}async function uEe(t,e,r,n){var d;const{activity:i}=await t.signRawPayload({type:"ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",organizationId:r,parameters:{signWith:n,payload:e,encoding:"PAYLOAD_ENCODING_HEXADECIMAL",hashFunction:"HASH_FUNCTION_NO_OP"},timestampMs:String(Date.now())}),{id:o,status:s,type:f}=i;if(i.status==="ACTIVITY_STATUS_COMPLETED"){let p=PE((d=i==null?void 0:i.result)==null?void 0:d.signRawPayloadResult),b=IV({r:`0x${p.r}`,s:`0x${p.s}`,v:p.v==="00"?27n:28n});return PE(b)}throw new qs({message:`Invalid activity status: ${i.status}`,activityId:o,activityStatus:s,activityType:f})}function PE(t){if(t==null)throw new Error(`Got unexpected ${JSON.stringify(t)}`);return t}function lEe(t){const e=new Uint8Array(t);let r="";for(const o of e)r+=String.fromCharCode(o);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const Ku="copy",ld="convert";function CE(t,e,r){if(e===Ku)return r;if(e===ld)return t(r);if(e instanceof Array)return r.map(n=>CE(t,e[0],n));if(e instanceof Object){const n={};for(const[i,o]of Object.entries(e)){if(o.derive){const s=o.derive(r);s!==void 0&&(r[i]=s)}if(!(i in r)){if(o.required)throw new Error(`Missing key: ${i}`);continue}if(r[i]==null){n[i]=null;continue}n[i]=CE(t,o.schema,r[i])}return n}}function dEe(t,e){return{required:!0,schema:t,derive:e}}function yc(t){return{required:!0,schema:t}}function d2(t){return{required:!1,schema:t}}const hEe={appid:d2(Ku),appidExclude:d2(Ku),credProps:d2(Ku)},pEe={type:yc(Ku),id:yc(Ku),rawId:yc(ld),authenticatorAttachment:d2(Ku),response:yc({clientDataJSON:yc(ld),authenticatorData:yc(ld),signature:yc(ld),userHandle:yc(ld)}),clientExtensionResults:dEe(hEe,t=>t.getClientExtensionResults())};function mEe(t){return CE(lEe,pEe,t)}async function gEe(t){const e=await navigator.credentials.get(t);return e.toJSON=()=>mEe(e),e}let s5;typeof(globalThis==null?void 0:globalThis.Buffer)<"u"?s5=globalThis.Buffer:s5=Rn.Buffer;const bEe="X-Stamp-Webauthn",yEe=5*60*1e3,vEe="preferred";class zK{constructor(e){this.rpId=e.rpId,this.timeout=e.timeout||yEe,this.userVerification=e.userVerification||vEe,this.allowCredentials=e.allowCredentials||[]}async stamp(e){const r=wEe(e),n={publicKey:{rpId:this.rpId,challenge:r,allowCredentials:this.allowCredentials,timeout:this.timeout,userVerification:this.userVerification}},o=(await gEe(n)).toJSON(),s={authenticatorData:o.response.authenticatorData,clientDataJson:o.response.clientDataJSON,credentialId:o.id,signature:o.response.signature};return{stampHeaderName:bEe,stampHeaderValue:JSON.stringify(s)}}}function wEe(t){const e=new TextEncoder().encode(t),r=Bg(e),n=s5.from(r).toString("hex"),i=s5.from(n,"utf8");return new Uint8Array(i)}function XB(t,e){if(t==null)throw new Error(e??`Unexpected ${JSON.stringify(t)}`);return t}const xEe=new zK({rpId:{}.NEXT_PUBLIC_RPID}),jK=new Qx({baseUrl:"https://api.turnkey.com"},xEe),Xx=t=>{var e,r;return console.log(t),console.log((e=co.getNetworkById(t))==null?void 0:e.url),oP({transport:du((r=co.getNetworkById(t))==null?void 0:r.url)})},eO=()=>{const t=new Uint8Array(32);return crypto.getRandomValues(t),t.buffer},EEe=t=>Je.Buffer.from(t).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),AEe=async(t,e,r,n)=>{var p;oP({transport:du((p=co.getNetworkById(parseInt(t)))==null?void 0:p.url)});const i=w7e({transport:du("https://api.pimlico.io/v1/goerli/rpc?apikey=b2f7a42a-e993-46df-8fa7-b7f8bec44b81")}),o=x7e({transport:du("https://api.pimlico.io/v2/goerli/rpc?apikey=b2f7a42a-e993-46df-8fa7-b7f8bec44b81")}),s=p7e({account:n,chain:PK,transport:du("https://api.pimlico.io/v1/goerli/rpc?apikey=b2f7a42a-e993-46df-8fa7-b7f8bec44b81"),sponsorUserOperation:o.sponsorUserOperation});console.log(s);const f=await i.getUserOperationGasPrice(),d=await s.sendTransaction({to:e,data:r,maxFeePerGas:f.fast.maxFeePerGas,maxPriorityFeePerGas:f.fast.maxPriorityFeePerGas});console.log(d)},a5=async(t,e)=>{console.log(e),console.log(t);const r=await iEe({client:jK,organizationId:e.subOrgId,signWith:e.address,ethereumAddress:e.address}),n=pV({account:r,chain:PK,transport:du()});return await P7e(Xx(t),{signer:n.account,entryPoint:"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",safeVersion:"1.4.1",safe4337ModuleAddress:"0x39E54Bb2b3Aa444b4B39DEe15De3b7809c36Fc38"})},T0="0xaB83F7041C82D5a915E608D887073B6C52a28459",SEe=async()=>{const e=(await(await S1()).getNetwork()).chainId.toString(),r=await jx(e);return await new Na(T0,Zx.abi,r).getLinkCount()},MEe=async(t,e)=>{const r=await jx(t);return await new Na(T0,Zx.abi,r).getLink(e)};function _Ee(t){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let r="";for(let n=0;n{const i=(await(await S1()).getNetwork()).chainId.toString(),o=await jx(i);await zx();const s=new Na(T0,Zx.abi,o);return{to:T0,value:"0",data:(await s.createLink.populateTransaction(e,Ioe(r),t)).data}},tO=async(t,e,r,n)=>{const i=await jx(t),{address:o,privateKey:s}=HK(r),f=PEe(n.address),d=nt(f),p=CEe(d),b=IEe(n.address,s),A=await new Na(T0,Zx.abi,i).claimLink.populateTransaction(e,n.address,p,b);return await AEe(t,T0,A.data,n)},REe=async(t,e)=>{if(!await kV())throw Error("Not connected to a Safe");const r=await zx(),n=[],i=_Ee(18),{address:o,privateKey:s}=HK(i);await H9e(r.safeAddress,T0)||n.push(await q9e(r.safeAddress,T0)),n.push(await TEe(o,t,e));const d=(await(await S1()).getNetwork()).chainId.toString(),p=await SEe();if(n.length!=0)return await g3e(n),{i:Number(p),p:i,c:d}};var qK={exports:{}};(function(t,e){(function(r,n){t.exports=n(Z)})(typeof self<"u"?self:et,function(r){return function(n){var i={};function o(s){if(i[s])return i[s].exports;var f=i[s]={i:s,l:!1,exports:{}};return n[s].call(f.exports,f,f.exports,o),f.l=!0,f.exports}return o.m=n,o.c=i,o.d=function(s,f,d){o.o(s,f)||Object.defineProperty(s,f,{enumerable:!0,get:d})},o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},o.t=function(s,f){if(1&f&&(s=o(s)),8&f||4&f&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(o.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&f&&typeof s!="string")for(var p in s)o.d(d,p,(function(b){return s[b]}).bind(null,p));return d},o.n=function(s){var f=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(f,"a",f),f},o.o=function(s,f){return Object.prototype.hasOwnProperty.call(s,f)},o.p="",o(o.s=2)}([function(n,i){n.exports=r},function(n,i,o){var s={linear:function(f,d,p,b){return(p-d)*f/b+d},easeInQuad:function(f,d,p,b){return(p-d)*(f/=b)*f+d},easeOutQuad:function(f,d,p,b){return-(p-d)*(f/=b)*(f-2)+d},easeInOutQuad:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?v/2*f*f+d:-v/2*(--f*(f-2)-1)+d},easeInCubic:function(f,d,p,b){return(p-d)*(f/=b)*f*f+d},easeOutCubic:function(f,d,p,b){return(p-d)*((f=f/b-1)*f*f+1)+d},easeInOutCubic:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?v/2*f*f*f+d:v/2*((f-=2)*f*f+2)+d},easeInQuart:function(f,d,p,b){return(p-d)*(f/=b)*f*f*f+d},easeOutQuart:function(f,d,p,b){return-(p-d)*((f=f/b-1)*f*f*f-1)+d},easeInOutQuart:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?v/2*f*f*f*f+d:-v/2*((f-=2)*f*f*f-2)+d},easeInQuint:function(f,d,p,b){return(p-d)*(f/=b)*f*f*f*f+d},easeOutQuint:function(f,d,p,b){return(p-d)*((f=f/b-1)*f*f*f*f+1)+d},easeInOutQuint:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?v/2*f*f*f*f*f+d:v/2*((f-=2)*f*f*f*f+2)+d},easeInSine:function(f,d,p,b){var v=p-d;return-v*Math.cos(f/b*(Math.PI/2))+v+d},easeOutSine:function(f,d,p,b){return(p-d)*Math.sin(f/b*(Math.PI/2))+d},easeInOutSine:function(f,d,p,b){return-(p-d)/2*(Math.cos(Math.PI*f/b)-1)+d},easeInExpo:function(f,d,p,b){return f==0?d:(p-d)*Math.pow(2,10*(f/b-1))+d},easeOutExpo:function(f,d,p,b){var v=p-d;return f==b?d+v:v*(1-Math.pow(2,-10*f/b))+d},easeInOutExpo:function(f,d,p,b){var v=p-d;return f===0?d:f===b?d+v:(f/=b/2)<1?v/2*Math.pow(2,10*(f-1))+d:v/2*(2-Math.pow(2,-10*--f))+d},easeInCirc:function(f,d,p,b){return-(p-d)*(Math.sqrt(1-(f/=b)*f)-1)+d},easeOutCirc:function(f,d,p,b){return(p-d)*Math.sqrt(1-(f=f/b-1)*f)+d},easeInOutCirc:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?-v/2*(Math.sqrt(1-f*f)-1)+d:v/2*(Math.sqrt(1-(f-=2)*f)+1)+d},easeInElastic:function(f,d,p,b){var v,A,_,S=p-d;return _=1.70158,f===0?d:(f/=b)==1?d+S:((A=0)||(A=.3*b),(v=S)=1&&this.rotationDirection===f.Positive?this.rotationDirection=f.Negative:this.rotateY<=-1&&this.rotationDirection===f.Negative&&(this.rotationDirection=f.Positive);var He=.1*this.rotationDirection;if(this.rotateY+=He,this.angle+=this.angularSpin,this.context.save(),this.context.translate(this.x,this.y),this.context.rotate(this.angle),this.context.scale(1,this.rotateY),this.context.rotate(this.angle),this.context.beginPath(),this.context.fillStyle=this.color,this.context.strokeStyle=this.color,this.context.globalAlpha=fe,this.context.lineCap="round",this.context.lineWidth=2,he&&typeof he=="function")he.call(this,this.context);else switch(this.shape){case s.Circle:this.context.beginPath(),this.context.arc(0,0,this.radius,0,2*Math.PI),this.context.fill();break;case s.Square:this.context.fillRect(-this.w/2,-this.h/2,this.w,this.h);break;case s.Strip:this.context.fillRect(-this.w/6,-this.h/2,this.w/3,this.h)}this.context.closePath(),this.context.restore()}}])&&_(q.prototype,Q),V}();function I(V,q,Q){return q in V?Object.defineProperty(V,q,{value:Q,enumerable:!0,configurable:!0,writable:!0}):V[q]=Q,V}var C=function V(q,Q){var G=this;(function(ee,ue){if(!(ee instanceof ue))throw new TypeError("Cannot call a class as a function")})(this,V),I(this,"canvas",void 0),I(this,"context",void 0),I(this,"getOptions",void 0),I(this,"x",0),I(this,"y",0),I(this,"w",0),I(this,"h",0),I(this,"lastNumberOfPieces",0),I(this,"tweenInitTime",Date.now()),I(this,"particles",[]),I(this,"particlesGenerated",0),I(this,"removeParticleAt",function(ee){G.particles.splice(ee,1)}),I(this,"getParticle",function(){var ee=A(G.x,G.w+G.x),ue=A(G.y,G.h+G.y);return new P(G.context,G.getOptions,ee,ue)}),I(this,"animate",function(){var ee=G.canvas,ue=G.context,fe=G.particlesGenerated,he=G.lastNumberOfPieces,He=G.getOptions(),be=He.run,oe=He.recycle,Xe=He.numberOfPieces,Ee=He.debug,ye=He.tweenFunction,it=He.tweenDuration;if(!be)return!1;var Pe=G.particles.length,Te=oe?Pe:fe,lt=Date.now();if(Teit?it:Math.max(0,lt-j),Te,Xe,it),$=Math.round(N-Te),J=0;J<$;J++)G.particles.push(G.getParticle());G.particlesGenerated+=$}return Ee&&(ue.font="12px sans-serif",ue.fillStyle="#333",ue.textAlign="right",ue.fillText("Particles: ".concat(Pe),ee.width-10,ee.height-20)),G.particles.forEach(function(te,me){te.update(),(te.y>ee.height||te.y<-100||te.x>ee.width+100||te.x<-100)&&(oe&&Te<=Xe?G.particles[me]=G.getParticle():G.removeParticleAt(me))}),Pe>0||Te0&&He.call(ee,ee),ee._options.run=!1)}),D(this,"reset",function(){ee.generator&&ee.generator.particlesGenerated>0&&(ee.generator.particlesGenerated=0,ee.generator.particles=[],ee.generator.lastNumberOfPieces=0)}),D(this,"stop",function(){ee.options={run:!1},ee.rafId&&(cancelAnimationFrame(ee.rafId),ee.rafId=void 0)}),this.canvas=G;var ue=this.canvas.getContext("2d");if(!ue)throw new Error("Could not get canvas context");this.context=ue,this.generator=new C(this.canvas,function(){return ee.options}),this.options=H,this.update()}var q,Q;return q=V,(Q=[{key:"options",get:function(){return this._options},set:function(G){var H=this._options&&this._options.run,ee=this._options&&this._options.recycle;this.setOptionsWithDefaults(G),this.generator&&(Object.assign(this.generator,this.options.confettiSource),typeof G.recycle=="boolean"&&G.recycle&&ee===!1&&(this.generator.lastNumberOfPieces=this.generator.particles.length)),typeof G.run=="boolean"&&G.run&&H===!1&&this.update()}}])&&B(q.prototype,Q),V}();function Y(V){return function(q){if(Array.isArray(q))return h(q)}(V)||function(q){if(typeof Symbol<"u"&&Symbol.iterator in Object(q))return Array.from(q)}(V)||l(V)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W(V){return(W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q})(V)}function ie(){return(ie=Object.assign||function(V){for(var q=1;q"u"||!(Symbol.iterator in Object(Q)))){var H=[],ee=!0,ue=!1,fe=void 0;try{for(var he,He=Q[Symbol.iterator]();!(ee=(he=He.next()).done)&&(H.push(he.value),!G||H.length!==G);ee=!0);}catch(be){ue=!0,fe=be}finally{try{ee||He.return==null||He.return()}finally{if(ue)throw fe}}return H}}(V,q)||l(V,q)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function l(V,q){if(V){if(typeof V=="string")return h(V,q);var Q=Object.prototype.toString.call(V).slice(8,-1);return Q==="Object"&&V.constructor&&(Q=V.constructor.name),Q==="Map"||Q==="Set"?Array.from(V):Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q)?h(V,q):void 0}}function h(V,q){(q==null||q>V.length)&&(q=V.length);for(var Q=0,G=new Array(q);Q"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var Q,G=M(V);if(q){var H=M(this).constructor;Q=Reflect.construct(G,arguments,H)}else Q=G.apply(this,arguments);return c(this,Q)}}function c(V,q){return!q||W(q)!=="object"&&typeof q!="function"?g(V):q}function g(V){if(V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V}function M(V){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(q){return q.__proto__||Object.getPrototypeOf(q)})(V)}function k(V,q,Q){return q in V?Object.defineProperty(V,q,{value:Q,enumerable:!0,configurable:!0,writable:!0}):V[q]=Q,V}var L=p.a.createRef(),R=function(V){(function(ee,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");ee.prototype=Object.create(ue&&ue.prototype,{constructor:{value:ee,writable:!0,configurable:!0}}),ue&&E(ee,ue)})(H,V);var q,Q,G=y(H);function H(ee){var ue;m(this,H);for(var fe=arguments.length,he=new Array(fe>1?fe-1:0),He=1;He{var P;_(!0);try{const I=await REe(b6,t),C=(P=new URLSearchParams(I))==null?void 0:P.toString(),T=`${window.location.href}#/claim?${C}`;console.log("url",T),v(T),p(!1),_(!1),v(T)}catch{_(!1)}p(!0)};return Z.useEffect(()=>{(async()=>{var C,T;const I=(await(await S1()).getNetwork()).chainId;f(Number(I)),o(`${(C=co.getNetworkById(Number(I)))==null?void 0:C.name} ${(T=co.getNetworkById(Number(I)))==null?void 0:T.type}`)})()},[]),ze.jsx(ze.Fragment,{children:b.length>0?ze.jsxs(ze.Fragment,{children:[ze.jsx(GK,{width:2e3,height:1200}),ze.jsx("div",{className:Un.successContainer,children:ze.jsxs("div",{className:Un.formContainer,children:[ze.jsx("h1",{className:Un.heading,children:"Yay!!!"}),ze.jsx("p",{className:Un.subheading,style:{textAlign:"center"},children:"Share this link with Anyone, so that they can claim the funds"}),ze.jsxs("div",{className:Un.copyContainer,children:[ze.jsx(an,{className:Un.input,value:b,placeholder:b}),ze.jsx(RS,{value:b,children:({copied:P,copy:I})=>ze.jsx(io,{className:Un.btn,color:P?"green":"teal",onClick:I,children:P?"Copied Link":"Copy Link"})})]}),ze.jsx("div",{className:Un.goBack,children:ze.jsx(io,{variant:"primary",onClick:()=>v(""),children:"Create new Link"})})]})})]}):ze.jsxs(ze.Fragment,{children:[ze.jsx("div",{children:ze.jsxs("h1",{className:Un.heading,children:["Send crypto effortlessly",ze.jsx("br",{})," with a Link"]})}),ze.jsx("div",{className:Un.homeContainer,children:ze.jsxs("div",{className:Un.formContainer,children:[ze.jsxs("div",{className:Un.inputContainer,children:[ze.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"20px",marginBottom:"20px",alignItems:"center"},children:[ze.jsx(NS,{placeholder:"ETH",data:["USDT","Matic","ETH","FIL"],defaultValue:"ETH",value:r,onChange:n}),ze.jsx(IS,{pl:0,color:"gray",variant:"light",leftSection:ze.jsx(Y5,{alt:"Avatar for badge",size:24,mr:5,src:LEe(s)}),size:"lg",className:Un.network,children:i})]}),ze.jsx(an.Wrapper,{label:"Enter Value",children:ze.jsx(an,{type:"number",value:t,onChange:P=>{var I;return e((I=P==null?void 0:P.target)==null?void 0:I.value)},placeholder:"enter the value",className:Un.input})})]}),ze.jsx(io,{type:"button",fullWidth:!0,color:"green",className:Un.btn,onClick:S,loading:A,children:A?"Creating Link ...":"Create Link"}),ze.jsx("p",{className:Un.subheading,children:"Just select the amount and asset to create a payment link. No need to transfer anythign anywhere 🔗"})]})})]})})}const FEe="_homeContainer_pcvo1_3",$Ee="_formContainer_pcvo1_13",UEe="_heading_pcvo1_21",zEe="_subHeading_pcvo1_31",jEe="_loader_pcvo1_36",HEe="_btn_pcvo1_42",qEe="_input_pcvo1_57",GEe="_inputContainer_pcvo1_62",qi={homeContainer:FEe,formContainer:$Ee,heading:UEe,subHeading:zEe,loader:jEe,btn:HEe,input:qEe,inputContainer:GEe};function VK(t,e){return function(){return t.apply(e,arguments)}}const{toString:VEe}=Object.prototype,{getPrototypeOf:IP}=Object,e3=(t=>e=>{const r=VEe.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Wa=t=>(t=t.toLowerCase(),e=>e3(e)===t),t3=t=>e=>typeof e===t,{isArray:P1}=Array,Hg=t3("undefined");function KEe(t){return t!==null&&!Hg(t)&&t.constructor!==null&&!Hg(t.constructor)&&jo(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const KK=Wa("ArrayBuffer");function WEe(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&KK(t.buffer),e}const JEe=t3("string"),jo=t3("function"),WK=t3("number"),r3=t=>t!==null&&typeof t=="object",ZEe=t=>t===!0||t===!1,h2=t=>{if(e3(t)!=="object")return!1;const e=IP(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},YEe=Wa("Date"),QEe=Wa("File"),XEe=Wa("Blob"),eAe=Wa("FileList"),tAe=t=>r3(t)&&jo(t.pipe),rAe=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||jo(t.append)&&((e=e3(t))==="formdata"||e==="object"&&jo(t.toString)&&t.toString()==="[object FormData]"))},nAe=Wa("URLSearchParams"),iAe=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function by(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),P1(t))for(n=0,i=t.length;n0;)if(i=r[n],e===i.toLowerCase())return i;return null}const ZK=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Je.global)(),YK=t=>!Hg(t)&&t!==ZK;function IE(){const{caseless:t}=YK(this)&&this||{},e={},r=(n,i)=>{const o=t&&JK(e,i)||i;h2(e[o])&&h2(n)?e[o]=IE(e[o],n):h2(n)?e[o]=IE({},n):P1(n)?e[o]=n.slice():e[o]=n};for(let n=0,i=arguments.length;n(by(e,(i,o)=>{r&&jo(i)?t[o]=VK(i,r):t[o]=i},{allOwnKeys:n}),t),sAe=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),aAe=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},fAe=(t,e,r,n)=>{let i,o,s;const f={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!n||n(s,t,e))&&!f[s]&&(e[s]=t[s],f[s]=!0);t=r!==!1&&IP(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},cAe=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},uAe=t=>{if(!t)return null;if(P1(t))return t;let e=t.length;if(!WK(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},lAe=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&IP(Uint8Array)),dAe=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},hAe=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},pAe=Wa("HTMLFormElement"),mAe=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),rO=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),gAe=Wa("RegExp"),QK=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};by(r,(i,o)=>{e(i,o,t)!==!1&&(n[o]=i)}),Object.defineProperties(t,n)},bAe=t=>{QK(t,(e,r)=>{if(jo(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(jo(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},yAe=(t,e)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return P1(t)?n(t):n(String(t).split(e)),r},vAe=()=>{},wAe=(t,e)=>(t=+t,Number.isFinite(t)?t:e),T4="abcdefghijklmnopqrstuvwxyz",nO="0123456789",XK={DIGIT:nO,ALPHA:T4,ALPHA_DIGIT:T4+T4.toUpperCase()+nO},xAe=(t=16,e=XK.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function EAe(t){return!!(t&&jo(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const AAe=t=>{const e=new Array(10),r=(n,i)=>{if(r3(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const o=P1(n)?[]:{};return by(n,(s,f)=>{const d=r(s,i+1);!Hg(d)&&(o[f]=d)}),e[i]=void 0,o}}return n};return r(t,0)},SAe=Wa("AsyncFunction"),MAe=t=>t&&(r3(t)||jo(t))&&jo(t.then)&&jo(t.catch),je={isArray:P1,isArrayBuffer:KK,isBuffer:KEe,isFormData:rAe,isArrayBufferView:WEe,isString:JEe,isNumber:WK,isBoolean:ZEe,isObject:r3,isPlainObject:h2,isUndefined:Hg,isDate:YEe,isFile:QEe,isBlob:XEe,isRegExp:gAe,isFunction:jo,isStream:tAe,isURLSearchParams:nAe,isTypedArray:lAe,isFileList:eAe,forEach:by,merge:IE,extend:oAe,trim:iAe,stripBOM:sAe,inherits:aAe,toFlatObject:fAe,kindOf:e3,kindOfTest:Wa,endsWith:cAe,toArray:uAe,forEachEntry:dAe,matchAll:hAe,isHTMLForm:pAe,hasOwnProperty:rO,hasOwnProp:rO,reduceDescriptors:QK,freezeMethods:bAe,toObjectSet:yAe,toCamelCase:mAe,noop:vAe,toFiniteNumber:wAe,findKey:JK,global:ZK,isContextDefined:YK,ALPHABET:XK,generateString:xAe,isSpecCompliantForm:EAe,toJSONObject:AAe,isAsyncFn:SAe,isThenable:MAe};function Vt(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}je.inherits(Vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const eW=Vt.prototype,tW={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{tW[t]={value:t}});Object.defineProperties(Vt,tW);Object.defineProperty(eW,"isAxiosError",{value:!0});Vt.from=(t,e,r,n,i,o)=>{const s=Object.create(eW);return je.toFlatObject(t,s,function(d){return d!==Error.prototype},f=>f!=="isAxiosError"),Vt.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const _Ae=null;function TE(t){return je.isPlainObject(t)||je.isArray(t)}function rW(t){return je.endsWith(t,"[]")?t.slice(0,-2):t}function iO(t,e,r){return t?t.concat(e).map(function(i,o){return i=rW(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function PAe(t){return je.isArray(t)&&!t.some(TE)}const CAe=je.toFlatObject(je,{},null,function(e){return/^is[A-Z]/.test(e)});function n3(t,e,r){if(!je.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=je.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,I){return!je.isUndefined(I[P])});const n=r.metaTokens,i=r.visitor||b,o=r.dots,s=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&je.isSpecCompliantForm(e);if(!je.isFunction(i))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(je.isDate(S))return S.toISOString();if(!d&&je.isBlob(S))throw new Vt("Blob is not supported. Use a Buffer instead.");return je.isArrayBuffer(S)||je.isTypedArray(S)?d&&typeof Blob=="function"?new Blob([S]):Je.Buffer.from(S):S}function b(S,P,I){let C=S;if(S&&!I&&typeof S=="object"){if(je.endsWith(P,"{}"))P=n?P:P.slice(0,-2),S=JSON.stringify(S);else if(je.isArray(S)&&PAe(S)||(je.isFileList(S)||je.endsWith(P,"[]"))&&(C=je.toArray(S)))return P=rW(P),C.forEach(function(O,B){!(je.isUndefined(O)||O===null)&&e.append(s===!0?iO([P],B,o):s===null?P:P+"[]",p(O))}),!1}return TE(S)?!0:(e.append(iO(I,P,o),p(S)),!1)}const v=[],A=Object.assign(CAe,{defaultVisitor:b,convertValue:p,isVisitable:TE});function _(S,P){if(!je.isUndefined(S)){if(v.indexOf(S)!==-1)throw Error("Circular reference detected in "+P.join("."));v.push(S),je.forEach(S,function(C,T){(!(je.isUndefined(C)||C===null)&&i.call(e,C,je.isString(T)?T.trim():T,P,A))===!0&&_(C,P?P.concat(T):[T])}),v.pop()}}if(!je.isObject(t))throw new TypeError("data must be an object");return _(t),e}function oO(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function TP(t,e){this._pairs=[],t&&n3(t,this,e)}const nW=TP.prototype;nW.append=function(e,r){this._pairs.push([e,r])};nW.toString=function(e){const r=e?function(n){return e.call(this,n,oO)}:oO;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function IAe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function iW(t,e,r){if(!e)return t;const n=r&&r.encode||IAe,i=r&&r.serialize;let o;if(i?o=i(e,r):o=je.isURLSearchParams(e)?e.toString():new TP(e,r).toString(n),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class TAe{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){je.forEach(this.handlers,function(n){n!==null&&e(n)})}}const sO=TAe,oW={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RAe=typeof URLSearchParams<"u"?URLSearchParams:TP,kAe=typeof FormData<"u"?FormData:null,BAe=typeof Blob<"u"?Blob:null,OAe=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),NAe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Ia={isBrowser:!0,classes:{URLSearchParams:RAe,FormData:kAe,Blob:BAe},isStandardBrowserEnv:OAe,isStandardBrowserWebWorkerEnv:NAe,protocols:["http","https","file","blob","url","data"]};function LAe(t,e){return n3(t,new Ia.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return Ia.isNode&&je.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function DAe(t){return je.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function FAe(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n=r.length;return s=!s&&je.isArray(i)?i.length:s,d?(je.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!f):((!i[s]||!je.isObject(i[s]))&&(i[s]=[]),e(r,n,i[s],o)&&je.isArray(i[s])&&(i[s]=FAe(i[s])),!f)}if(je.isFormData(t)&&je.isFunction(t.entries)){const r={};return je.forEachEntry(t,(n,i)=>{e(DAe(n),i,r,0)}),r}return null}const $Ae={"Content-Type":void 0};function UAe(t,e,r){if(je.isString(t))try{return(e||JSON.parse)(t),je.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const i3={transitional:oW,adapter:["xhr","http"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=je.isObject(e);if(o&&je.isHTMLForm(e)&&(e=new FormData(e)),je.isFormData(e))return i&&i?JSON.stringify(sW(e)):e;if(je.isArrayBuffer(e)||je.isBuffer(e)||je.isStream(e)||je.isFile(e)||je.isBlob(e))return e;if(je.isArrayBufferView(e))return e.buffer;if(je.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let f;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return LAe(e,this.formSerializer).toString();if((f=je.isFileList(e))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return n3(f?{"files[]":e}:e,d&&new d,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),UAe(e)):e}],transformResponse:[function(e){const r=this.transitional||i3.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(e&&je.isString(e)&&(n&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(f){if(s)throw f.name==="SyntaxError"?Vt.from(f,Vt.ERR_BAD_RESPONSE,this,null,this.response):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ia.classes.FormData,Blob:Ia.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};je.forEach(["delete","get","head"],function(e){i3.headers[e]={}});je.forEach(["post","put","patch"],function(e){i3.headers[e]=je.merge($Ae)});const RP=i3,zAe=je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jAe=t=>{const e={};let r,n,i;return t&&t.split(` -`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||e[r]&&zAe[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},aO=Symbol("internals");function am(t){return t&&String(t).trim().toLowerCase()}function p2(t){return t===!1||t==null?t:je.isArray(t)?t.map(p2):String(t)}function HAe(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const qAe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function R4(t,e,r,n,i){if(je.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!je.isString(e)){if(je.isString(n))return e.indexOf(n)!==-1;if(je.isRegExp(n))return n.test(e)}}function GAe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function VAe(t,e){const r=je.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,o,s){return this[n].call(this,e,i,o,s)},configurable:!0})})}class o3{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function o(f,d,p){const b=am(d);if(!b)throw new Error("header name must be a non-empty string");const v=je.findKey(i,b);(!v||i[v]===void 0||p===!0||p===void 0&&i[v]!==!1)&&(i[v||d]=p2(f))}const s=(f,d)=>je.forEach(f,(p,b)=>o(p,b,d));return je.isPlainObject(e)||e instanceof this.constructor?s(e,r):je.isString(e)&&(e=e.trim())&&!qAe(e)?s(jAe(e),r):e!=null&&o(r,e,n),this}get(e,r){if(e=am(e),e){const n=je.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return HAe(i);if(je.isFunction(r))return r.call(this,i,n);if(je.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=am(e),e){const n=je.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||R4(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function o(s){if(s=am(s),s){const f=je.findKey(n,s);f&&(!r||R4(n,n[f],f,r))&&(delete n[f],i=!0)}}return je.isArray(e)?e.forEach(o):o(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!e||R4(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const r=this,n={};return je.forEach(this,(i,o)=>{const s=je.findKey(n,o);if(s){r[s]=p2(i),delete r[o];return}const f=e?GAe(o):String(o).trim();f!==o&&delete r[o],r[f]=p2(i),n[f]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return je.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&je.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[aO]=this[aO]={accessors:{}}).accessors,i=this.prototype;function o(s){const f=am(s);n[f]||(VAe(i,s),n[f]=!0)}return je.isArray(e)?e.forEach(o):o(e),this}}o3.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);je.freezeMethods(o3.prototype);je.freezeMethods(o3);const Lf=o3;function k4(t,e){const r=this||RP,n=e||r,i=Lf.from(n.headers);let o=n.data;return je.forEach(t,function(f){o=f.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function aW(t){return!!(t&&t.__CANCEL__)}function yy(t,e,r){Vt.call(this,t??"canceled",Vt.ERR_CANCELED,e,r),this.name="CanceledError"}je.inherits(yy,Vt,{__CANCEL__:!0});function KAe(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Vt("Request failed with status code "+r.status,[Vt.ERR_BAD_REQUEST,Vt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const WAe=Ia.isStandardBrowserEnv?function(){return{write:function(r,n,i,o,s,f){const d=[];d.push(r+"="+encodeURIComponent(n)),je.isNumber(i)&&d.push("expires="+new Date(i).toGMTString()),je.isString(o)&&d.push("path="+o),je.isString(s)&&d.push("domain="+s),f===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function JAe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ZAe(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function fW(t,e){return t&&!JAe(e)?ZAe(t,e):e}const YAe=Ia.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function i(o){let s=o;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(s){const f=je.isString(s)?i(s):s;return f.protocol===n.protocol&&f.host===n.host}}():function(){return function(){return!0}}();function QAe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function XAe(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(d){const p=Date.now(),b=n[o];s||(s=p),r[i]=d,n[i]=p;let v=o,A=0;for(;v!==i;)A+=r[v++],v=v%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),p-s{const o=i.loaded,s=i.lengthComputable?i.total:void 0,f=o-r,d=n(f),p=o<=s;r=o;const b={loaded:o,total:s,progress:s?o/s:void 0,bytes:f,rate:d||void 0,estimated:d&&s&&p?(s-o)/d:void 0,event:i};b[e?"download":"upload"]=!0,t(b)}}const eSe=typeof XMLHttpRequest<"u",tSe=eSe&&function(t){return new Promise(function(r,n){let i=t.data;const o=Lf.from(t.headers).normalize(),s=t.responseType;let f;function d(){t.cancelToken&&t.cancelToken.unsubscribe(f),t.signal&&t.signal.removeEventListener("abort",f)}je.isFormData(i)&&(Ia.isStandardBrowserEnv||Ia.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let p=new XMLHttpRequest;if(t.auth){const _=t.auth.username||"",S=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(_+":"+S))}const b=fW(t.baseURL,t.url);p.open(t.method.toUpperCase(),iW(b,t.params,t.paramsSerializer),!0),p.timeout=t.timeout;function v(){if(!p)return;const _=Lf.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:_,config:t,request:p};KAe(function(C){r(C),d()},function(C){n(C),d()},P),p=null}if("onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(n(new Vt("Request aborted",Vt.ECONNABORTED,t,p)),p=null)},p.onerror=function(){n(new Vt("Network Error",Vt.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let S=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const P=t.transitional||oW;t.timeoutErrorMessage&&(S=t.timeoutErrorMessage),n(new Vt(S,P.clarifyTimeoutError?Vt.ETIMEDOUT:Vt.ECONNABORTED,t,p)),p=null},Ia.isStandardBrowserEnv){const _=(t.withCredentials||YAe(b))&&t.xsrfCookieName&&WAe.read(t.xsrfCookieName);_&&o.set(t.xsrfHeaderName,_)}i===void 0&&o.setContentType(null),"setRequestHeader"in p&&je.forEach(o.toJSON(),function(S,P){p.setRequestHeader(P,S)}),je.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),s&&s!=="json"&&(p.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&p.addEventListener("progress",fO(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",fO(t.onUploadProgress)),(t.cancelToken||t.signal)&&(f=_=>{p&&(n(!_||_.type?new yy(null,t,p):_),p.abort(),p=null)},t.cancelToken&&t.cancelToken.subscribe(f),t.signal&&(t.signal.aborted?f():t.signal.addEventListener("abort",f)));const A=QAe(b);if(A&&Ia.protocols.indexOf(A)===-1){n(new Vt("Unsupported protocol "+A+":",Vt.ERR_BAD_REQUEST,t));return}p.send(i||null)})},m2={http:_Ae,xhr:tSe};je.forEach(m2,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const rSe={getAdapter:t=>{t=je.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let i=0;it instanceof Lf?t.toJSON():t;function Wp(t,e){e=e||{};const r={};function n(p,b,v){return je.isPlainObject(p)&&je.isPlainObject(b)?je.merge.call({caseless:v},p,b):je.isPlainObject(b)?je.merge({},b):je.isArray(b)?b.slice():b}function i(p,b,v){if(je.isUndefined(b)){if(!je.isUndefined(p))return n(void 0,p,v)}else return n(p,b,v)}function o(p,b){if(!je.isUndefined(b))return n(void 0,b)}function s(p,b){if(je.isUndefined(b)){if(!je.isUndefined(p))return n(void 0,p)}else return n(void 0,b)}function f(p,b,v){if(v in e)return n(p,b);if(v in t)return n(void 0,p)}const d={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:f,headers:(p,b)=>i(uO(p),uO(b),!0)};return je.forEach(Object.keys(Object.assign({},t,e)),function(b){const v=d[b]||i,A=v(t[b],e[b],b);je.isUndefined(A)&&v!==f||(r[b]=A)}),r}const cW="1.4.0",kP={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{kP[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const lO={};kP.transitional=function(e,r,n){function i(o,s){return"[Axios v"+cW+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,f)=>{if(e===!1)throw new Vt(i(s," has been removed"+(r?" in "+r:"")),Vt.ERR_DEPRECATED);return r&&!lO[s]&&(lO[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,s,f):!0}};function nSe(t,e,r){if(typeof t!="object")throw new Vt("options must be an object",Vt.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const f=t[o],d=f===void 0||s(f,o,t);if(d!==!0)throw new Vt("option "+o+" must be "+d,Vt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Vt("Unknown option "+o,Vt.ERR_BAD_OPTION)}}const RE={assertOptions:nSe,validators:kP},vc=RE.validators;class f5{constructor(e){this.defaults=e,this.interceptors={request:new sO,response:new sO}}request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Wp(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&RE.assertOptions(n,{silentJSONParsing:vc.transitional(vc.boolean),forcedJSONParsing:vc.transitional(vc.boolean),clarifyTimeoutError:vc.transitional(vc.boolean)},!1),i!=null&&(je.isFunction(i)?r.paramsSerializer={serialize:i}:RE.assertOptions(i,{encode:vc.function,serialize:vc.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s;s=o&&je.merge(o.common,o[r.method]),s&&je.forEach(["delete","get","head","post","put","patch","common"],S=>{delete o[S]}),r.headers=Lf.concat(s,o);const f=[];let d=!0;this.interceptors.request.forEach(function(P){typeof P.runWhen=="function"&&P.runWhen(r)===!1||(d=d&&P.synchronous,f.unshift(P.fulfilled,P.rejected))});const p=[];this.interceptors.response.forEach(function(P){p.push(P.fulfilled,P.rejected)});let b,v=0,A;if(!d){const S=[cO.bind(this),void 0];for(S.unshift.apply(S,f),S.push.apply(S,p),A=S.length,b=Promise.resolve(r);v{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(f=>{n.subscribe(f),o=f}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},e(function(o,s,f){n.reason||(n.reason=new yy(o,s,f),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new BP(function(i){e=i}),cancel:e}}}const iSe=BP;function oSe(t){return function(r){return t.apply(null,r)}}function sSe(t){return je.isObject(t)&&t.isAxiosError===!0}const kE={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(kE).forEach(([t,e])=>{kE[e]=t});const aSe=kE;function uW(t){const e=new g2(t),r=VK(g2.prototype.request,e);return je.extend(r,g2.prototype,e,{allOwnKeys:!0}),je.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return uW(Wp(t,i))},r}const un=uW(RP);un.Axios=g2;un.CanceledError=yy;un.CancelToken=iSe;un.isCancel=aW;un.VERSION=cW;un.toFormData=n3;un.AxiosError=Vt;un.Cancel=un.CanceledError;un.all=function(e){return Promise.all(e)};un.spread=oSe;un.isAxiosError=sSe;un.mergeConfig=Wp;un.AxiosHeaders=Lf;un.formToJSON=t=>sW(je.isHTMLForm(t)?new FormData(t):t);un.HttpStatusCode=aSe;un.default=un;const fSe=un,cSe="m/44'/60'/0'/0/0";async function lW(){try{const t=await jK.stampGetWhoami({organizationId:"be67a3da-0512-40f8-a025-cb518d83c655"}),r=(await fSe.post(t.url,t.body,{headers:{[t.stamp.stampHeaderName]:t.stamp.stampHeaderValue}})).data.organizationId,n=new $K({apiPublicKey:"0301cb31eadda1532da75c9dbfee121a2f91ea6e3e4f7f7470fa5ae44e8ce3d468",apiPrivateKey:"779dab5bd0e62af43716e370d31f9a5c1b4284bd8068f9239ab28c80fdb74d42"}),i=new Qx({baseUrl:"https://api.turnkey.com"},n),o=await i.getWallets({organizationId:r}),s=await i.getWalletAccounts({organizationId:r,walletId:o.wallets[0].walletId}),f=s.accounts[0].walletId,d=s.accounts[0].address,p=await Xx(5).getBalance({address:d});return{id:f,address:d,subOrgId:r,balance:b1(p)}}catch(t){console.error(t)}}async function dW(t){var r,n;const e=t;try{const i=eO(),o=eO(),s=await Y7e({publicKey:{rp:{id:{}.NEXT_PUBLIC_RPID,name:"Turnkey Viem Passkey Demo"},challenge:i,pubKeyCredParams:[{type:"public-key",alg:-7},{type:"public-key",alg:-257}],user:{id:o,name:e.split(" ").join("-"),displayName:e},authenticatorSelection:{requireResidentKey:!0}}}),f=new Qx({baseUrl:"https://api.turnkey.com"},new $K({apiPublicKey:"0301cb31eadda1532da75c9dbfee121a2f91ea6e3e4f7f7470fa5ae44e8ce3d468",apiPrivateKey:"779dab5bd0e62af43716e370d31f9a5c1b4284bd8068f9239ab28c80fdb74d42"})),d=tEe({client:f,requestFn:f.createSubOrganization}),p="Default ETH Wallet",b=await d({type:"ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4",timestampMs:String(Date.now()),organizationId:"be67a3da-0512-40f8-a025-cb518d83c655",parameters:{subOrganizationName:e,rootQuorumThreshold:1,rootUsers:[{userName:"New user",apiKeys:[],authenticators:[{authenticatorName:"Passkey",challenge:EEe(i),attestation:s}]}],wallet:{walletName:p,accounts:[{curve:"CURVE_SECP256K1",pathFormat:"PATH_FORMAT_BIP32",path:cSe,addressFormat:"ADDRESS_FORMAT_ETHEREUM"}]}}}),v=XB((r=b.result.createSubOrganizationResultV4)==null?void 0:r.subOrganizationId),A=XB((n=b.result.createSubOrganizationResultV4)==null?void 0:n.wallet),_=A.walletId,S=A.addresses[0],I=await Xx(5).getBalance({address:S});return{id:_,address:S,subOrgId:v,balance:b1(I)}}catch(i){console.error(i)}}const uSe=new zK({rpId:{}.NEXT_PUBLIC_RPID});new Qx({baseUrl:"https://api.turnkey.com"},uSe);function lSe(){const[t,{open:e,close:r}]=NA(!1),n=E8e(),[i,o]=Z.useState(),[s,f]=Z.useState({}),[d,p]=Z.useState(""),[b,v]=Z.useState(""),{confirming:A,setConfirming:_,setConfirmed:S,setClaimDetails:P}=LS(C=>C);function I(C){const T=C.split("?")[1];if(!T)return null;const O=new URLSearchParams(T),B={};for(const[D,U]of O.entries())B[D]=U;return B}return Z.useEffect(()=>{(async()=>{var D,U;const C=I(window.location.href);o(C);const{claimed:T,amount:O,tokenAddress:B}=await MEe(C.c,C.i);f({claimed:T,amount:O,token:B,chainId:C.c}),v(`${(D=co.getNetworkById(Number(C.c)))==null?void 0:D.name} ${(U=co.getNetworkById(Number(C.c)))==null?void 0:U.type}`)})()},[]),ze.jsxs(ze.Fragment,{children:[ze.jsxs(ra,{opened:t,onClose:r,title:"Claim via Safe Account",centered:!0,children:[ze.jsx(BS,{visible:A,zIndex:1e3,overlayProps:{radius:"sm",blur:2},loaderProps:{color:"green",children:ze.jsxs(wb,{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"inherit",padding:"20px"},children:[ze.jsx("p",{className:qi.loader,children:"Confirming the claim transaction."}),ze.jsx("p",{className:qi.subHeading,children:" Buckle up! Our digital hamsters are on their morning jog—this'll be quicker than a cat video. 🏃‍♂️💨"}),ze.jsx(Al,{color:"green",type:"dots",size:"xl"})," "]})}}),ze.jsxs("div",{className:qi.formContainer,children:[ze.jsx("div",{children:ze.jsx("h1",{className:qi.heading,children:"Use your PassKey to Claim Crypto"})}),ze.jsx("p",{className:qi.subHeading,children:"This will claim the funds to a new Safe Account (with 4337 module) created via passkey."}),ze.jsxs("div",{className:qi.inputContainer,children:[ze.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"20px",marginBottom:"20px",alignItems:"center"},children:[ze.jsx(an.Wrapper,{children:ze.jsx(an,{type:"text",value:d,onChange:C=>p(C.currentTarget.value),placeholder:"Wallet Name",className:qi.input})}),ze.jsx(io,{type:"button",fullWidth:!0,color:"green",style:{marginLeft:"20px"},className:qi.btn,onClick:async()=>{const C=await a5(parseInt(i.c),await dW(d));await tO(i.c,i.i,i.p,C),P({account:C,amount:s.amount}),n($u.account)},loading:!1,children:"Create & Claim"})]}),ze.jsx(X5,{my:"xs",label:"OR",labelPosition:"center"}),ze.jsx("div",{style:{display:"flex",marginTop:"20px",marginBottom:"20px",alignItems:"center",justifyContent:"center"},children:ze.jsx(io,{type:"button",fullWidth:!0,color:"green",className:qi.btn,onClick:async()=>{const C=await a5(parseInt(i.c),await lW());_(!0),await tO(i.c,i.i,i.p,C),P({account:C,amount:s.amount,chainId:i.c}),_(!1),n($u.account)},loading:!1,children:"Login & Claim"})})]})]})]}),ze.jsx("div",{className:qi.homeContainer,children:ze.jsxs("div",{className:qi.formContainer,children:[ze.jsx("div",{children:ze.jsxs("h1",{className:qi.heading,children:["You have ",s.amount?Z9(s.amount):0," ",s.token?"ETH":""," to claim.."]})}),ze.jsx(io,{color:"teal",type:"button",className:qi.btn,onClick:async()=>{e()},children:"Claim"})]})}),ze.jsx(GK,{width:2e3,height:1200})]})}const dSe="_accountContainer_ymy3i_3",hSe="_formContainer_ymy3i_13",pSe="_avatarContainer_ymy3i_22",mSe="_balance_ymy3i_30",gSe="_avatar_ymy3i_22",bSe="_heading_ymy3i_43",ySe="_btn_ymy3i_54",vSe="_actionsContainer_ymy3i_69",wSe="_actions_ymy3i_69",zn={accountContainer:dSe,formContainer:hSe,avatarContainer:pSe,balance:mSe,avatar:gSe,heading:bSe,btn:ySe,actionsContainer:vSe,actions:wSe},xSe=()=>{var A,_,S,P,I;const{claimDetails:t,setClaimDetails:e}=LS(C=>C),[r,n]=Z.useState(0),[i,{open:o,close:s}]=NA(!1),[f,d]=Z.useState(""),[p,b]=Z.useState(!1);Z.useEffect(()=>{(async()=>{var T;t.account||o();const C=await Xx(5).getBalance({address:(T=t==null?void 0:t.account)==null?void 0:T.address});n(C)})()},[t.account]);function v(C){const T=C.slice(0,7),O=C.slice(-5);return`${T}...${O}`}return ze.jsxs(ze.Fragment,{children:[ze.jsx(ra,{opened:i,onClose:s,title:"Claim via Safe Account",centered:!0,children:ze.jsxs("div",{className:zn.formContainer,children:[ze.jsx("div",{children:ze.jsx("h1",{className:zn.heading,children:"Use your PassKey to Spin Up an Account"})}),ze.jsx("p",{className:zn.subHeading,children:"This will create a new Safe Account (with 4337 module) created via passkey."}),ze.jsxs("div",{className:zn.inputContainer,children:[ze.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"20px",marginBottom:"20px",alignItems:"center"},children:[ze.jsx(an.Wrapper,{children:ze.jsx(an,{type:"text",value:f,onChange:C=>d(C.currentTarget.value),placeholder:"Wallet Name",className:zn.input})}),ze.jsx(io,{type:"button",fullWidth:!0,color:"green",style:{marginLeft:"20px"},className:zn.btn,onClick:async()=>{const C=await a5(5,await dW(f));e({account:C,amount:0,chainId:t.chainId}),s()},children:"Create & Claim"})]}),ze.jsx(X5,{my:"xs",label:"OR",labelPosition:"center"}),ze.jsx("div",{style:{display:"flex",marginTop:"20px",marginBottom:"20px",alignItems:"center",justifyContent:"center"},children:ze.jsx(io,{type:"button",fullWidth:!0,color:"green",className:zn.btn,onClick:async()=>{b(!0);const C=await a5(5,await lW());e({account:C,amount:0,chainId:t.chainId}),s()},loading:p,children:"Login & Claim"})})]})]})}),ze.jsx("div",{className:zn.accountContainer,children:ze.jsxs("div",{className:zn.formContainer,children:[!!t.amount&&ze.jsxs(cS,{variant:"light",color:"green",radius:"md",title:"",icon:ze.jsx(zie,{}),children:["Successfully claimed ",Z9(t.amount?t.amount:0)," ETH from the link 🎉"]}),ze.jsxs("div",{className:zn.avatarContainer,children:[ze.jsx("img",{className:zn.avatar,src:"https://pbs.twimg.com/profile_images/1643941027898613760/gyhYEOCE_400x400.jpg",alt:"avatar",height:100,width:100}),ze.jsxs("div",{className:zn.actions,children:[ze.jsxs(lS,{href:`${(A=co.getNetworkById(parseInt(t.chainId)))==null?void 0:A.blockExplorer}/address/${(_=t.account)==null?void 0:_.address}`,target:"_blank",underline:"hover",children:[" ",ze.jsxs("p",{children:[" ",v((S=t.account)!=null&&S.address?(P=t.account)==null?void 0:P.address:"0x000000000000000000000000")]})]}),ze.jsx(RS,{value:(I=t.account)==null?void 0:I.address,timeout:1e3,children:({copied:C,copy:T})=>ze.jsx(Mb,{label:C?"Copied":"Copy",withArrow:!0,position:"right",children:ze.jsx(q5,{color:C?"teal":"gray",variant:"subtle",onClick:T,children:C?ze.jsx(Die,{style:{width:Fe(16)}}):ze.jsx($ie,{style:{width:Fe(16)}})})})})]}),ze.jsxs("p",{className:zn.balance,children:[" ",Z9(r)," ETH "]})]}),ze.jsx("div",{className:zn.actionsContainer,children:ze.jsxs("div",{className:zn.actions,children:[ze.jsx(io,{style:{width:"110px"},className:zn.btn,color:"teal",children:"Send"}),ze.jsx(io,{style:{width:"110px"},children:"Withdraw"})]})})]})})]})},ESe=D8e([{path:$u.home,element:ze.jsx(DEe,{})},{path:$u.account,element:ze.jsx(xSe,{})},{path:$u.claim,element:ze.jsx(lSe,{})}]);function ASe(){return ze.jsx(V8e,{router:ESe})}const SSe={fontFamily:"Inter, sans-serif"};function MSe(){return ze.jsx(tD,{theme:SSe,children:ze.jsx(T3e,{children:ze.jsx(ASe,{})})})}L4.createRoot(document.getElementById("root")).render(ze.jsx(MSe,{}));export{pj as a,$Se as c,Je as d,FSe as u}; + */function LK(){return BigInt("115792089210356248762697446949407573530086143415290314195533631308867097853951")}function R7e(){return BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b")}function k7e(t){return BigInt("0x"+I7e(t))}function YB(t){let e=t.toString(16);return e=e.length%2===0?e:"0"+e,C7e(e)}function SE(t,e){const r=BigInt(1)<>BigInt(2),i=B7e(r,n,e);if(i*i%e!==r)throw new Error("could not find a modular square root");return i}throw new Error("unsupported modulus value")}function N7e(t,e){const r=LK(),n=r-BigInt(3),i=R7e(),o=((t*t+n)*t+i)%r;let s=O7e(o,r);return e!==SE(s,0)&&(s=(r-s)%r),s}function L7e(t){const e=D7e();if(t.length!==1+e)throw new Error("compressed point has wrong length");if(t[0]!==2&&t[0]!==3)throw new Error("invalid format");const r=t[0]===3,n=k7e(t.subarray(1,t.length)),i=LK();if(n=i)throw new Error("x is out of range");const o=N7e(n,r);return{kty:"EC",crv:"P-256",x:ZB(YB(n),!0),y:ZB(YB(o),!0),ext:!0}}function D7e(){return 32}function DK(t){const e=btoa(t);return F7e(e)}function F7e(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $Se(t){return t.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}function USe(t){const{uncompressedPrivateKeyHex:e,compressedPublicKeyHex:r}=t,n=L7e(FK(r));return n.d=$7e(e),n}function FK(t){if(t.length===0||t.length%2!==0||/[^a-fA-F0-9]/u.test(t))throw new Error(`Invalid hex string: ${JSON.stringify(t)}`);return Uint8Array.from(t.match(/.{2}/g).map(e=>parseInt(e,16)))}function $7e(t){const e=FK(t);return DK(e.reduce((r,n)=>r+String.fromCharCode(n),""))}const U7e="X-Stamp",z7e=async t=>{var e;return typeof((e=globalThis==null?void 0:globalThis.crypto)==null?void 0:e.subtle)<"u"?(await z6(()=>import("./webcrypto-f8fc69c2.js"),[]).then(n=>n.signWithApiKey))(t):(await z6(()=>import("./nodecrypto-de819dc3.js"),[]).then(n=>n.signWithApiKey))(t)};class $K{constructor(e){this.apiPublicKey=e.apiPublicKey,this.apiPrivateKey=e.apiPrivateKey}async stamp(e){const r=await z7e({publicKey:this.apiPublicKey,privateKey:this.apiPrivateKey,content:e}),n={publicKey:this.apiPublicKey,scheme:"SIGNATURE_SCHEME_TK_API_P256",signature:r};return{stampHeaderName:U7e,stampHeaderValue:DK(JSON.stringify(n))}}}var ME={exports:{}};(function(t,e){var r=typeof self<"u"?self:et,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(s){var f={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function d(l){return l&&DataView.prototype.isPrototypeOf(l)}if(f.arrayBuffer)var p=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(l){return l&&p.indexOf(Object.prototype.toString.call(l))>-1};function v(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(l))throw new TypeError("Invalid character in header field name");return l.toLowerCase()}function A(l){return typeof l!="string"&&(l=String(l)),l}function _(l){var h={next:function(){var m=l.shift();return{done:m===void 0,value:m}}};return f.iterable&&(h[Symbol.iterator]=function(){return h}),h}function S(l){this.map={},l instanceof S?l.forEach(function(h,m){this.append(m,h)},this):Array.isArray(l)?l.forEach(function(h){this.append(h[0],h[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(h){this.append(h,l[h])},this)}S.prototype.append=function(l,h){l=v(l),h=A(h);var m=this.map[l];this.map[l]=m?m+", "+h:h},S.prototype.delete=function(l){delete this.map[v(l)]},S.prototype.get=function(l){return l=v(l),this.has(l)?this.map[l]:null},S.prototype.has=function(l){return this.map.hasOwnProperty(v(l))},S.prototype.set=function(l,h){this.map[v(l)]=A(h)},S.prototype.forEach=function(l,h){for(var m in this.map)this.map.hasOwnProperty(m)&&l.call(h,this.map[m],m,this)},S.prototype.keys=function(){var l=[];return this.forEach(function(h,m){l.push(m)}),_(l)},S.prototype.values=function(){var l=[];return this.forEach(function(h){l.push(h)}),_(l)},S.prototype.entries=function(){var l=[];return this.forEach(function(h,m){l.push([m,h])}),_(l)},f.iterable&&(S.prototype[Symbol.iterator]=S.prototype.entries);function P(l){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}function I(l){return new Promise(function(h,m){l.onload=function(){h(l.result)},l.onerror=function(){m(l.error)}})}function C(l){var h=new FileReader,m=I(h);return h.readAsArrayBuffer(l),m}function T(l){var h=new FileReader,m=I(h);return h.readAsText(l),m}function k(l){for(var h=new Uint8Array(l),m=new Array(h.length),w=0;w-1?h:l}function Y(l,h){h=h||{};var m=h.body;if(l instanceof Y){if(l.bodyUsed)throw new TypeError("Already read");this.url=l.url,this.credentials=l.credentials,h.headers||(this.headers=new S(l.headers)),this.method=l.method,this.mode=l.mode,this.signal=l.signal,!m&&l._bodyInit!=null&&(m=l._bodyInit,l.bodyUsed=!0)}else this.url=String(l);if(this.credentials=h.credentials||this.credentials||"same-origin",(h.headers||!this.headers)&&(this.headers=new S(h.headers)),this.method=V(h.method||this.method||"GET"),this.mode=h.mode||this.mode||null,this.signal=h.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&m)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(m)}Y.prototype.clone=function(){return new Y(this,{body:this._bodyInit})};function W(l){var h=new FormData;return l.trim().split("&").forEach(function(m){if(m){var w=m.split("="),E=w.shift().replace(/\+/g," "),y=w.join("=").replace(/\+/g," ");h.append(decodeURIComponent(E),decodeURIComponent(y))}}),h}function ie(l){var h=new S,m=l.replace(/\r?\n[\t ]+/g," ");return m.split(/\r?\n/).forEach(function(w){var E=w.split(":"),y=E.shift().trim();if(y){var c=E.join(":").trim();h.append(y,c)}}),h}D.call(Y.prototype);function x(l,h){h||(h={}),this.type="default",this.status=h.status===void 0?200:h.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in h?h.statusText:"OK",this.headers=new S(h.headers),this.url=h.url||"",this._initBody(l)}D.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new S(this.headers),url:this.url})},x.error=function(){var l=new x(null,{status:0,statusText:""});return l.type="error",l};var a=[301,302,303,307,308];x.redirect=function(l,h){if(a.indexOf(h)===-1)throw new RangeError("Invalid status code");return new x(null,{status:h,headers:{location:l}})},s.DOMException=o.DOMException;try{new s.DOMException}catch{s.DOMException=function(h,m){this.message=h,this.name=m;var w=Error(h);this.stack=w.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function u(l,h){return new Promise(function(m,w){var E=new Y(l,h);if(E.signal&&E.signal.aborted)return w(new s.DOMException("Aborted","AbortError"));var y=new XMLHttpRequest;function c(){y.abort()}y.onload=function(){var g={status:y.status,statusText:y.statusText,headers:ie(y.getAllResponseHeaders()||"")};g.url="responseURL"in y?y.responseURL:g.headers.get("X-Request-URL");var M="response"in y?y.response:y.responseText;m(new x(M,g))},y.onerror=function(){w(new TypeError("Network request failed"))},y.ontimeout=function(){w(new TypeError("Network request failed"))},y.onabort=function(){w(new s.DOMException("Aborted","AbortError"))},y.open(E.method,E.url,!0),E.credentials==="include"?y.withCredentials=!0:E.credentials==="omit"&&(y.withCredentials=!1),"responseType"in y&&f.blob&&(y.responseType="blob"),E.headers.forEach(function(g,M){y.setRequestHeader(M,g)}),E.signal&&(E.signal.addEventListener("abort",c),y.onreadystatechange=function(){y.readyState===4&&E.signal.removeEventListener("abort",c)}),y.send(typeof E._bodyInit>"u"?null:E._bodyInit)})}return u.polyfill=!0,o.fetch||(o.fetch=u,o.Headers=S,o.Request=Y,o.Response=x),s.Headers=S,s.Request=Y,s.Response=x,s.fetch=u,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(ME,ME.exports);var j7e=ME.exports;const H7e=j7e.fetch;function q7e(t){const e=new Uint8Array(t);let r="";for(const o of e)r+=String.fromCharCode(o);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const Qc="copy",u2="convert";function _E(t,e,r){if(e===Qc)return r;if(e===u2)return t(r);if(e instanceof Array)return r.map(n=>_E(t,e[0],n));if(e instanceof Object){const n={};for(const[i,o]of Object.entries(e)){if(o.derive){const s=o.derive(r);s!==void 0&&(r[i]=s)}if(!(i in r)){if(o.required)throw new Error(`Missing key: ${i}`);continue}if(r[i]==null){n[i]=null;continue}n[i]=_E(t,o.schema,r[i])}return n}}function QB(t,e){return{required:!0,schema:t,derive:e}}function od(t){return{required:!0,schema:t}}function l2(t){return{required:!1,schema:t}}const G7e={appid:l2(Qc),appidExclude:l2(Qc),credProps:l2(Qc)},V7e={type:od(Qc),id:od(Qc),rawId:od(u2),authenticatorAttachment:l2(Qc),response:od({clientDataJSON:od(u2),attestationObject:od(u2),transports:QB(Qc,t=>{var e;return((e=t.getTransports)==null?void 0:e.call(t))||[]})}),clientExtensionResults:QB(G7e,t=>t.getClientExtensionResults())};function K7e(t){return _E(q7e,V7e,t)}async function W7e(t){const e=await navigator.credentials.create(t);return e.toJSON=()=>K7e(e),e}function J7e(t){switch(t){case"internal":return"AUTHENTICATOR_TRANSPORT_INTERNAL";case"usb":return"AUTHENTICATOR_TRANSPORT_USB";case"nfc":return"AUTHENTICATOR_TRANSPORT_NFC";case"ble":return"AUTHENTICATOR_TRANSPORT_BLE";case"hybrid":return"AUTHENTICATOR_TRANSPORT_HYBRID";default:throw new Error("unsupported transport format")}}function Z7e(t){return{credentialId:t.rawId,attestationObject:t.response.attestationObject,clientDataJson:t.response.clientDataJSON,transports:t.response.transports.map(J7e)}}async function Y7e(t){if(!Q7e())throw new Error("webauthn is not supported by this browser");const r=await W7e(t);return Z7e(r.toJSON())}function Q7e(){return!!window.PublicKeyCredential}class X7e extends Error{constructor(e){let r=`Turnkey error ${e.code}: ${e.message}`;e.details!=null&&(r+=` (Details: ${JSON.stringify(e.details)})`),super(r),this.name="TurnkeyRequestError",this.details=e.details??null,this.code=e.code}}class Qx{constructor(e,r){if(this.getActivity=async n=>this.request("/public/v1/query/get_activity",n),this.stampGetActivity=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_activity",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getAuthenticator=async n=>this.request("/public/v1/query/get_authenticator",n),this.stampGetAuthenticator=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_authenticator",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getAuthenticators=async n=>this.request("/public/v1/query/get_authenticators",n),this.stampGetAuthenticators=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_authenticators",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getOrganization=async n=>this.request("/public/v1/query/get_organization",n),this.stampGetOrganization=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_organization",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getPolicy=async n=>this.request("/public/v1/query/get_policy",n),this.stampGetPolicy=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_policy",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getPrivateKey=async n=>this.request("/public/v1/query/get_private_key",n),this.stampGetPrivateKey=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_private_key",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getUser=async n=>this.request("/public/v1/query/get_user",n),this.stampGetUser=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_user",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getWallet=async n=>this.request("/public/v1/query/get_wallet",n),this.stampGetWallet=async n=>{const i=this.config.baseUrl+"/public/v1/query/get_wallet",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getActivities=async n=>this.request("/public/v1/query/list_activities",n),this.stampGetActivities=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_activities",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getPolicies=async n=>this.request("/public/v1/query/list_policies",n),this.stampGetPolicies=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_policies",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.listPrivateKeyTags=async n=>this.request("/public/v1/query/list_private_key_tags",n),this.stampListPrivateKeyTags=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_private_key_tags",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getPrivateKeys=async n=>this.request("/public/v1/query/list_private_keys",n),this.stampGetPrivateKeys=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_private_keys",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.listUserTags=async n=>this.request("/public/v1/query/list_user_tags",n),this.stampListUserTags=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_user_tags",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getUsers=async n=>this.request("/public/v1/query/list_users",n),this.stampGetUsers=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_users",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getWalletAccounts=async n=>this.request("/public/v1/query/list_wallet_accounts",n),this.stampGetWalletAccounts=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_wallet_accounts",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getWallets=async n=>this.request("/public/v1/query/list_wallets",n),this.stampGetWallets=async n=>{const i=this.config.baseUrl+"/public/v1/query/list_wallets",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.getWhoami=async n=>this.request("/public/v1/query/whoami",n),this.stampGetWhoami=async n=>{const i=this.config.baseUrl+"/public/v1/query/whoami",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.approveActivity=async n=>this.request("/public/v1/submit/approve_activity",n),this.stampApproveActivity=async n=>{const i=this.config.baseUrl+"/public/v1/submit/approve_activity",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createApiKeys=async n=>this.request("/public/v1/submit/create_api_keys",n),this.stampCreateApiKeys=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_api_keys",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createApiOnlyUsers=async n=>this.request("/public/v1/submit/create_api_only_users",n),this.stampCreateApiOnlyUsers=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_api_only_users",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createAuthenticators=async n=>this.request("/public/v1/submit/create_authenticators",n),this.stampCreateAuthenticators=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_authenticators",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createInvitations=async n=>this.request("/public/v1/submit/create_invitations",n),this.stampCreateInvitations=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_invitations",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createPolicy=async n=>this.request("/public/v1/submit/create_policy",n),this.stampCreatePolicy=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_policy",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createPrivateKeyTag=async n=>this.request("/public/v1/submit/create_private_key_tag",n),this.stampCreatePrivateKeyTag=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_private_key_tag",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createPrivateKeys=async n=>this.request("/public/v1/submit/create_private_keys",n),this.stampCreatePrivateKeys=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_private_keys",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createSubOrganization=async n=>this.request("/public/v1/submit/create_sub_organization",n),this.stampCreateSubOrganization=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_sub_organization",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createUserTag=async n=>this.request("/public/v1/submit/create_user_tag",n),this.stampCreateUserTag=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_user_tag",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createUsers=async n=>this.request("/public/v1/submit/create_users",n),this.stampCreateUsers=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_users",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createWallet=async n=>this.request("/public/v1/submit/create_wallet",n),this.stampCreateWallet=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_wallet",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.createWalletAccounts=async n=>this.request("/public/v1/submit/create_wallet_accounts",n),this.stampCreateWalletAccounts=async n=>{const i=this.config.baseUrl+"/public/v1/submit/create_wallet_accounts",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.deleteApiKeys=async n=>this.request("/public/v1/submit/delete_api_keys",n),this.stampDeleteApiKeys=async n=>{const i=this.config.baseUrl+"/public/v1/submit/delete_api_keys",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.deleteAuthenticators=async n=>this.request("/public/v1/submit/delete_authenticators",n),this.stampDeleteAuthenticators=async n=>{const i=this.config.baseUrl+"/public/v1/submit/delete_authenticators",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.deleteInvitation=async n=>this.request("/public/v1/submit/delete_invitation",n),this.stampDeleteInvitation=async n=>{const i=this.config.baseUrl+"/public/v1/submit/delete_invitation",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.deletePolicy=async n=>this.request("/public/v1/submit/delete_policy",n),this.stampDeletePolicy=async n=>{const i=this.config.baseUrl+"/public/v1/submit/delete_policy",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.emailAuth=async n=>this.request("/public/v1/submit/email_auth",n),this.stampEmailAuth=async n=>{const i=this.config.baseUrl+"/public/v1/submit/email_auth",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.exportPrivateKey=async n=>this.request("/public/v1/submit/export_private_key",n),this.stampExportPrivateKey=async n=>{const i=this.config.baseUrl+"/public/v1/submit/export_private_key",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.exportWallet=async n=>this.request("/public/v1/submit/export_wallet",n),this.stampExportWallet=async n=>{const i=this.config.baseUrl+"/public/v1/submit/export_wallet",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.initUserEmailRecovery=async n=>this.request("/public/v1/submit/init_user_email_recovery",n),this.stampInitUserEmailRecovery=async n=>{const i=this.config.baseUrl+"/public/v1/submit/init_user_email_recovery",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.recoverUser=async n=>this.request("/public/v1/submit/recover_user",n),this.stampRecoverUser=async n=>{const i=this.config.baseUrl+"/public/v1/submit/recover_user",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.rejectActivity=async n=>this.request("/public/v1/submit/reject_activity",n),this.stampRejectActivity=async n=>{const i=this.config.baseUrl+"/public/v1/submit/reject_activity",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.removeOrganizationFeature=async n=>this.request("/public/v1/submit/remove_organization_feature",n),this.stampRemoveOrganizationFeature=async n=>{const i=this.config.baseUrl+"/public/v1/submit/remove_organization_feature",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.setOrganizationFeature=async n=>this.request("/public/v1/submit/set_organization_feature",n),this.stampSetOrganizationFeature=async n=>{const i=this.config.baseUrl+"/public/v1/submit/set_organization_feature",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.signRawPayload=async n=>this.request("/public/v1/submit/sign_raw_payload",n),this.stampSignRawPayload=async n=>{const i=this.config.baseUrl+"/public/v1/submit/sign_raw_payload",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.signTransaction=async n=>this.request("/public/v1/submit/sign_transaction",n),this.stampSignTransaction=async n=>{const i=this.config.baseUrl+"/public/v1/submit/sign_transaction",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updatePolicy=async n=>this.request("/public/v1/submit/update_policy",n),this.stampUpdatePolicy=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_policy",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updatePrivateKeyTag=async n=>this.request("/public/v1/submit/update_private_key_tag",n),this.stampUpdatePrivateKeyTag=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_private_key_tag",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updateRootQuorum=async n=>this.request("/public/v1/submit/update_root_quorum",n),this.stampUpdateRootQuorum=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_root_quorum",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updateUser=async n=>this.request("/public/v1/submit/update_user",n),this.stampUpdateUser=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_user",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},this.updateUserTag=async n=>this.request("/public/v1/submit/update_user_tag",n),this.stampUpdateUserTag=async n=>{const i=this.config.baseUrl+"/public/v1/submit/update_user_tag",o=JSON.stringify(n),s=await this.stamper.stamp(o);return{body:o,stamp:s,url:i}},!e.baseUrl)throw new Error("Missing base URL. Please verify env vars.");this.config=e,this.stamper=r}async request(e,r){const n=this.config.baseUrl+e,i=JSON.stringify(r),o=await this.stamper.stamp(i),s=await H7e(n,{method:"POST",headers:{[o.stampHeaderName]:o.stampHeaderValue},body:i,redirect:"follow"});if(!s.ok){let d;try{d=await s.json()}catch{throw new Error(`${s.status} ${s.statusText}`)}throw new X7e(d)}return await s.json()}}class qs extends Error{constructor(e){const{message:r,cause:n,activityId:i,activityStatus:o,activityType:s}=e;super(r),this.name="TurnkeyActivityError",this.activityId=i??null,this.activityStatus=o??null,this.activityType=s??null,this.cause=n??null}}const eEe=500;function tEe(t){const{client:e,requestFn:r,refreshIntervalMs:n=eEe}=t;return async i=>{let s=(await r(i)).activity;for(;;){switch(s.status){case"ACTIVITY_STATUS_COMPLETED":return s;case"ACTIVITY_STATUS_CREATED":break;case"ACTIVITY_STATUS_PENDING":break;case"ACTIVITY_STATUS_CONSENSUS_NEEDED":throw new qs({message:`Consensus needed for activity ${s.id}`,activityId:s.id,activityStatus:s.status,activityType:s.type});case"ACTIVITY_STATUS_FAILED":throw new qs({message:`Activity ${s.id} failed`,activityId:s.id,activityStatus:s.status,activityType:s.type});case"ACTIVITY_STATUS_REJECTED":throw new qs({message:`Activity ${s.id} was rejected`,activityId:s.id,activityStatus:s.status,activityType:s.type});default:nEe(s.status)}await rEe(n),s=(await e.getActivity({activityId:s.id,organizationId:s.organizationId})).activity}}}function rEe(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function nEe(t,e){throw new Error(e??`Unexpected case: ${JSON.stringify(t)}`)}async function iEe(t){var o;const{client:e,organizationId:r,signWith:n}=t;let{ethereumAddress:i}=t;if(!n)throw new qs({message:"Missing signWith parameter"});if(tn(n))i=n;else if(!i&&(i=(o=(await e.getPrivateKey({privateKeyId:n,organizationId:r})).privateKey.addresses.find(f=>f.format==="ADDRESS_FORMAT_ETHEREUM"))==null?void 0:o.address,typeof i!="string"||!i))throw new qs({message:`Unable to find Ethereum address for key ${n} under organization ${r}`});return BK({address:i,signMessage:function({message:s}){return oEe(e,s,r,n)},signTransaction:function(s,f){const d=f!=null&&f.serializer?f.serializer:nV;return sEe(e,s,d,r,n)},signTypedData:function(s){return aEe(e,s,r,n)}})}async function oEe(t,e,r,n){const i=ly(e);return`${await UK(t,i,r,n)}`}async function sEe(t,e,r,n,i){const s=r(e).replace(/^0x/,"");return await fEe(t,s,n,i)}async function aEe(t,e,r,n){const i=A1(e);return await UK(t,i,r,n)}async function fEe(t,e,r,n){let i;try{i=await cEe(t,e,r,n)}catch(o){throw o instanceof qs?o:new qs({message:`Failed to sign transaction: ${o.message}`,cause:o})}return`0x${i}`}async function cEe(t,e,r,n){var d,p;const{activity:i}=await t.signTransaction({type:"ACTIVITY_TYPE_SIGN_TRANSACTION_V2",organizationId:r,parameters:{signWith:n,type:"TRANSACTION_TYPE_ETHEREUM",unsignedTransaction:e},timestampMs:String(Date.now())}),{id:o,status:s,type:f}=i;if(i.status==="ACTIVITY_STATUS_COMPLETED")return PE((p=(d=i==null?void 0:i.result)==null?void 0:d.signTransactionResult)==null?void 0:p.signedTransaction);throw new qs({message:`Invalid activity status: ${i.status}`,activityId:o,activityStatus:s,activityType:f})}async function UK(t,e,r,n){let i;try{i=await uEe(t,e,r,n)}catch(o){throw o instanceof qs?o:new qs({message:`Failed to sign: ${o.message}`,cause:o})}return i}async function uEe(t,e,r,n){var d;const{activity:i}=await t.signRawPayload({type:"ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",organizationId:r,parameters:{signWith:n,payload:e,encoding:"PAYLOAD_ENCODING_HEXADECIMAL",hashFunction:"HASH_FUNCTION_NO_OP"},timestampMs:String(Date.now())}),{id:o,status:s,type:f}=i;if(i.status==="ACTIVITY_STATUS_COMPLETED"){let p=PE((d=i==null?void 0:i.result)==null?void 0:d.signRawPayloadResult),b=IV({r:`0x${p.r}`,s:`0x${p.s}`,v:p.v==="00"?27n:28n});return PE(b)}throw new qs({message:`Invalid activity status: ${i.status}`,activityId:o,activityStatus:s,activityType:f})}function PE(t){if(t==null)throw new Error(`Got unexpected ${JSON.stringify(t)}`);return t}function lEe(t){const e=new Uint8Array(t);let r="";for(const o of e)r+=String.fromCharCode(o);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const Ku="copy",ld="convert";function CE(t,e,r){if(e===Ku)return r;if(e===ld)return t(r);if(e instanceof Array)return r.map(n=>CE(t,e[0],n));if(e instanceof Object){const n={};for(const[i,o]of Object.entries(e)){if(o.derive){const s=o.derive(r);s!==void 0&&(r[i]=s)}if(!(i in r)){if(o.required)throw new Error(`Missing key: ${i}`);continue}if(r[i]==null){n[i]=null;continue}n[i]=CE(t,o.schema,r[i])}return n}}function dEe(t,e){return{required:!0,schema:t,derive:e}}function yc(t){return{required:!0,schema:t}}function d2(t){return{required:!1,schema:t}}const hEe={appid:d2(Ku),appidExclude:d2(Ku),credProps:d2(Ku)},pEe={type:yc(Ku),id:yc(Ku),rawId:yc(ld),authenticatorAttachment:d2(Ku),response:yc({clientDataJSON:yc(ld),authenticatorData:yc(ld),signature:yc(ld),userHandle:yc(ld)}),clientExtensionResults:dEe(hEe,t=>t.getClientExtensionResults())};function mEe(t){return CE(lEe,pEe,t)}async function gEe(t){const e=await navigator.credentials.get(t);return e.toJSON=()=>mEe(e),e}let s5;typeof(globalThis==null?void 0:globalThis.Buffer)<"u"?s5=globalThis.Buffer:s5=Rn.Buffer;const bEe="X-Stamp-Webauthn",yEe=5*60*1e3,vEe="preferred";class zK{constructor(e){this.rpId=e.rpId,this.timeout=e.timeout||yEe,this.userVerification=e.userVerification||vEe,this.allowCredentials=e.allowCredentials||[]}async stamp(e){const r=wEe(e),n={publicKey:{rpId:this.rpId,challenge:r,allowCredentials:this.allowCredentials,timeout:this.timeout,userVerification:this.userVerification}},o=(await gEe(n)).toJSON(),s={authenticatorData:o.response.authenticatorData,clientDataJson:o.response.clientDataJSON,credentialId:o.id,signature:o.response.signature};return{stampHeaderName:bEe,stampHeaderValue:JSON.stringify(s)}}}function wEe(t){const e=new TextEncoder().encode(t),r=Og(e),n=s5.from(r).toString("hex"),i=s5.from(n,"utf8");return new Uint8Array(i)}function XB(t,e){if(t==null)throw new Error(e??`Unexpected ${JSON.stringify(t)}`);return t}const xEe=new zK({rpId:{}.NEXT_PUBLIC_RPID}),jK=new Qx({baseUrl:"https://api.turnkey.com"},xEe),Xx=t=>{var e,r;return console.log(t),console.log((e=co.getNetworkById(t))==null?void 0:e.url),oP({transport:du((r=co.getNetworkById(t))==null?void 0:r.url)})},eO=()=>{const t=new Uint8Array(32);return crypto.getRandomValues(t),t.buffer},EEe=t=>Je.Buffer.from(t).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),AEe=async(t,e,r,n)=>{var p;oP({transport:du((p=co.getNetworkById(parseInt(t)))==null?void 0:p.url)});const i=w7e({transport:du("https://api.pimlico.io/v1/goerli/rpc?apikey=b2f7a42a-e993-46df-8fa7-b7f8bec44b81")}),o=x7e({transport:du("https://api.pimlico.io/v2/goerli/rpc?apikey=b2f7a42a-e993-46df-8fa7-b7f8bec44b81")}),s=p7e({account:n,chain:PK,transport:du("https://api.pimlico.io/v1/goerli/rpc?apikey=b2f7a42a-e993-46df-8fa7-b7f8bec44b81"),sponsorUserOperation:o.sponsorUserOperation});console.log(s);const f=await i.getUserOperationGasPrice(),d=await s.sendTransaction({to:e,data:r,maxFeePerGas:f.fast.maxFeePerGas,maxPriorityFeePerGas:f.fast.maxPriorityFeePerGas});console.log(d)},a5=async(t,e)=>{console.log(e),console.log(t);const r=await iEe({client:jK,organizationId:e.subOrgId,signWith:e.address,ethereumAddress:e.address}),n=pV({account:r,chain:PK,transport:du()});return await P7e(Xx(t),{signer:n.account,entryPoint:"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",safeVersion:"1.4.1",safe4337ModuleAddress:"0x39E54Bb2b3Aa444b4B39DEe15De3b7809c36Fc38"})},T0="0xaB83F7041C82D5a915E608D887073B6C52a28459",SEe=async()=>{const e=(await(await M1()).getNetwork()).chainId.toString(),r=await jx(e);return await new Na(T0,Zx.abi,r).getLinkCount()},MEe=async(t,e)=>{const r=await jx(t);return await new Na(T0,Zx.abi,r).getLink(e)};function _Ee(t){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let r="";for(let n=0;n{const i=(await(await M1()).getNetwork()).chainId.toString(),o=await jx(i);await zx();const s=new Na(T0,Zx.abi,o);return{to:T0,value:"0",data:(await s.createLink.populateTransaction(e,Ioe(r),t)).data}},tO=async(t,e,r,n)=>{const i=await jx(t),{address:o,privateKey:s}=HK(r),f=PEe(n.address),d=nt(f),p=CEe(d),b=IEe(n.address,s),A=await new Na(T0,Zx.abi,i).claimLink.populateTransaction(e,n.address,p,b);return await AEe(t,T0,A.data,n)},REe=async(t,e)=>{if(!await kV())throw Error("Not connected to a Safe");const r=await zx(),n=[],i=_Ee(18),{address:o,privateKey:s}=HK(i);await H9e(r.safeAddress,T0)||n.push(await q9e(r.safeAddress,T0)),n.push(await TEe(o,t,e));const d=(await(await M1()).getNetwork()).chainId.toString(),p=await SEe();if(n.length!=0)return await g3e(n),{i:Number(p),p:i,c:d}};var qK={exports:{}};(function(t,e){(function(r,n){t.exports=n(Z)})(typeof self<"u"?self:et,function(r){return function(n){var i={};function o(s){if(i[s])return i[s].exports;var f=i[s]={i:s,l:!1,exports:{}};return n[s].call(f.exports,f,f.exports,o),f.l=!0,f.exports}return o.m=n,o.c=i,o.d=function(s,f,d){o.o(s,f)||Object.defineProperty(s,f,{enumerable:!0,get:d})},o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},o.t=function(s,f){if(1&f&&(s=o(s)),8&f||4&f&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(o.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&f&&typeof s!="string")for(var p in s)o.d(d,p,(function(b){return s[b]}).bind(null,p));return d},o.n=function(s){var f=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(f,"a",f),f},o.o=function(s,f){return Object.prototype.hasOwnProperty.call(s,f)},o.p="",o(o.s=2)}([function(n,i){n.exports=r},function(n,i,o){var s={linear:function(f,d,p,b){return(p-d)*f/b+d},easeInQuad:function(f,d,p,b){return(p-d)*(f/=b)*f+d},easeOutQuad:function(f,d,p,b){return-(p-d)*(f/=b)*(f-2)+d},easeInOutQuad:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?v/2*f*f+d:-v/2*(--f*(f-2)-1)+d},easeInCubic:function(f,d,p,b){return(p-d)*(f/=b)*f*f+d},easeOutCubic:function(f,d,p,b){return(p-d)*((f=f/b-1)*f*f+1)+d},easeInOutCubic:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?v/2*f*f*f+d:v/2*((f-=2)*f*f+2)+d},easeInQuart:function(f,d,p,b){return(p-d)*(f/=b)*f*f*f+d},easeOutQuart:function(f,d,p,b){return-(p-d)*((f=f/b-1)*f*f*f-1)+d},easeInOutQuart:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?v/2*f*f*f*f+d:-v/2*((f-=2)*f*f*f-2)+d},easeInQuint:function(f,d,p,b){return(p-d)*(f/=b)*f*f*f*f+d},easeOutQuint:function(f,d,p,b){return(p-d)*((f=f/b-1)*f*f*f*f+1)+d},easeInOutQuint:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?v/2*f*f*f*f*f+d:v/2*((f-=2)*f*f*f*f+2)+d},easeInSine:function(f,d,p,b){var v=p-d;return-v*Math.cos(f/b*(Math.PI/2))+v+d},easeOutSine:function(f,d,p,b){return(p-d)*Math.sin(f/b*(Math.PI/2))+d},easeInOutSine:function(f,d,p,b){return-(p-d)/2*(Math.cos(Math.PI*f/b)-1)+d},easeInExpo:function(f,d,p,b){return f==0?d:(p-d)*Math.pow(2,10*(f/b-1))+d},easeOutExpo:function(f,d,p,b){var v=p-d;return f==b?d+v:v*(1-Math.pow(2,-10*f/b))+d},easeInOutExpo:function(f,d,p,b){var v=p-d;return f===0?d:f===b?d+v:(f/=b/2)<1?v/2*Math.pow(2,10*(f-1))+d:v/2*(2-Math.pow(2,-10*--f))+d},easeInCirc:function(f,d,p,b){return-(p-d)*(Math.sqrt(1-(f/=b)*f)-1)+d},easeOutCirc:function(f,d,p,b){return(p-d)*Math.sqrt(1-(f=f/b-1)*f)+d},easeInOutCirc:function(f,d,p,b){var v=p-d;return(f/=b/2)<1?-v/2*(Math.sqrt(1-f*f)-1)+d:v/2*(Math.sqrt(1-(f-=2)*f)+1)+d},easeInElastic:function(f,d,p,b){var v,A,_,S=p-d;return _=1.70158,f===0?d:(f/=b)==1?d+S:((A=0)||(A=.3*b),(v=S)=1&&this.rotationDirection===f.Positive?this.rotationDirection=f.Negative:this.rotateY<=-1&&this.rotationDirection===f.Negative&&(this.rotationDirection=f.Positive);var He=.1*this.rotationDirection;if(this.rotateY+=He,this.angle+=this.angularSpin,this.context.save(),this.context.translate(this.x,this.y),this.context.rotate(this.angle),this.context.scale(1,this.rotateY),this.context.rotate(this.angle),this.context.beginPath(),this.context.fillStyle=this.color,this.context.strokeStyle=this.color,this.context.globalAlpha=fe,this.context.lineCap="round",this.context.lineWidth=2,he&&typeof he=="function")he.call(this,this.context);else switch(this.shape){case s.Circle:this.context.beginPath(),this.context.arc(0,0,this.radius,0,2*Math.PI),this.context.fill();break;case s.Square:this.context.fillRect(-this.w/2,-this.h/2,this.w,this.h);break;case s.Strip:this.context.fillRect(-this.w/6,-this.h/2,this.w/3,this.h)}this.context.closePath(),this.context.restore()}}])&&_(q.prototype,Q),K}();function I(K,q,Q){return q in K?Object.defineProperty(K,q,{value:Q,enumerable:!0,configurable:!0,writable:!0}):K[q]=Q,K}var C=function K(q,Q){var G=this;(function(ee,ue){if(!(ee instanceof ue))throw new TypeError("Cannot call a class as a function")})(this,K),I(this,"canvas",void 0),I(this,"context",void 0),I(this,"getOptions",void 0),I(this,"x",0),I(this,"y",0),I(this,"w",0),I(this,"h",0),I(this,"lastNumberOfPieces",0),I(this,"tweenInitTime",Date.now()),I(this,"particles",[]),I(this,"particlesGenerated",0),I(this,"removeParticleAt",function(ee){G.particles.splice(ee,1)}),I(this,"getParticle",function(){var ee=A(G.x,G.w+G.x),ue=A(G.y,G.h+G.y);return new P(G.context,G.getOptions,ee,ue)}),I(this,"animate",function(){var ee=G.canvas,ue=G.context,fe=G.particlesGenerated,he=G.lastNumberOfPieces,He=G.getOptions(),be=He.run,oe=He.recycle,Xe=He.numberOfPieces,Ee=He.debug,ye=He.tweenFunction,it=He.tweenDuration;if(!be)return!1;var Pe=G.particles.length,Te=oe?Pe:fe,lt=Date.now();if(Teit?it:Math.max(0,lt-j),Te,Xe,it),$=Math.round(N-Te),J=0;J<$;J++)G.particles.push(G.getParticle());G.particlesGenerated+=$}return Ee&&(ue.font="12px sans-serif",ue.fillStyle="#333",ue.textAlign="right",ue.fillText("Particles: ".concat(Pe),ee.width-10,ee.height-20)),G.particles.forEach(function(te,me){te.update(),(te.y>ee.height||te.y<-100||te.x>ee.width+100||te.x<-100)&&(oe&&Te<=Xe?G.particles[me]=G.getParticle():G.removeParticleAt(me))}),Pe>0||Te0&&He.call(ee,ee),ee._options.run=!1)}),D(this,"reset",function(){ee.generator&&ee.generator.particlesGenerated>0&&(ee.generator.particlesGenerated=0,ee.generator.particles=[],ee.generator.lastNumberOfPieces=0)}),D(this,"stop",function(){ee.options={run:!1},ee.rafId&&(cancelAnimationFrame(ee.rafId),ee.rafId=void 0)}),this.canvas=G;var ue=this.canvas.getContext("2d");if(!ue)throw new Error("Could not get canvas context");this.context=ue,this.generator=new C(this.canvas,function(){return ee.options}),this.options=H,this.update()}var q,Q;return q=K,(Q=[{key:"options",get:function(){return this._options},set:function(G){var H=this._options&&this._options.run,ee=this._options&&this._options.recycle;this.setOptionsWithDefaults(G),this.generator&&(Object.assign(this.generator,this.options.confettiSource),typeof G.recycle=="boolean"&&G.recycle&&ee===!1&&(this.generator.lastNumberOfPieces=this.generator.particles.length)),typeof G.run=="boolean"&&G.run&&H===!1&&this.update()}}])&&O(q.prototype,Q),K}();function Y(K){return function(q){if(Array.isArray(q))return h(q)}(K)||function(q){if(typeof Symbol<"u"&&Symbol.iterator in Object(q))return Array.from(q)}(K)||l(K)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W(K){return(W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q})(K)}function ie(){return(ie=Object.assign||function(K){for(var q=1;q"u"||!(Symbol.iterator in Object(Q)))){var H=[],ee=!0,ue=!1,fe=void 0;try{for(var he,He=Q[Symbol.iterator]();!(ee=(he=He.next()).done)&&(H.push(he.value),!G||H.length!==G);ee=!0);}catch(be){ue=!0,fe=be}finally{try{ee||He.return==null||He.return()}finally{if(ue)throw fe}}return H}}(K,q)||l(K,q)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function l(K,q){if(K){if(typeof K=="string")return h(K,q);var Q=Object.prototype.toString.call(K).slice(8,-1);return Q==="Object"&&K.constructor&&(Q=K.constructor.name),Q==="Map"||Q==="Set"?Array.from(K):Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q)?h(K,q):void 0}}function h(K,q){(q==null||q>K.length)&&(q=K.length);for(var Q=0,G=new Array(q);Q"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var Q,G=M(K);if(q){var H=M(this).constructor;Q=Reflect.construct(G,arguments,H)}else Q=G.apply(this,arguments);return c(this,Q)}}function c(K,q){return!q||W(q)!=="object"&&typeof q!="function"?g(K):q}function g(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}function M(K){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(q){return q.__proto__||Object.getPrototypeOf(q)})(K)}function B(K,q,Q){return q in K?Object.defineProperty(K,q,{value:Q,enumerable:!0,configurable:!0,writable:!0}):K[q]=Q,K}var L=p.a.createRef(),R=function(K){(function(ee,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");ee.prototype=Object.create(ue&&ue.prototype,{constructor:{value:ee,writable:!0,configurable:!0}}),ue&&E(ee,ue)})(H,K);var q,Q,G=y(H);function H(ee){var ue;m(this,H);for(var fe=arguments.length,he=new Array(fe>1?fe-1:0),He=1;He{var P;_(!0);try{const I=await REe(b6,t),C=(P=new URLSearchParams(I))==null?void 0:P.toString(),T=`${window.location.href}#/claim?${C}`;console.log("url",T),v(T),p(!1),_(!1),v(T)}catch{_(!1)}p(!0)};return Z.useEffect(()=>{(async()=>{var C,T;const I=(await(await M1()).getNetwork()).chainId;f(Number(I)),o(`${(C=co.getNetworkById(Number(I)))==null?void 0:C.name} ${(T=co.getNetworkById(Number(I)))==null?void 0:T.type}`)})()},[]),ze.jsx(ze.Fragment,{children:b.length>0?ze.jsxs(ze.Fragment,{children:[ze.jsx(GK,{width:2e3,height:1200}),ze.jsx("div",{className:Un.successContainer,children:ze.jsxs("div",{className:Un.formContainer,children:[ze.jsx("h1",{className:Un.heading,children:"Yay!!!"}),ze.jsx("p",{className:Un.subheading,style:{textAlign:"center"},children:"Share this link with Anyone, so that they can claim the funds"}),ze.jsxs("div",{className:Un.copyContainer,children:[ze.jsx(an,{className:Un.input,value:b,placeholder:b}),ze.jsx(RS,{value:b,children:({copied:P,copy:I})=>ze.jsx(io,{className:Un.btn,color:P?"green":"teal",onClick:I,children:P?"Copied Link":"Copy Link"})})]}),ze.jsx("div",{className:Un.goBack,children:ze.jsx(io,{variant:"primary",onClick:()=>v(""),children:"Create new Link"})})]})})]}):ze.jsxs(ze.Fragment,{children:[ze.jsx("div",{children:ze.jsxs("h1",{className:Un.heading,children:["Send crypto effortlessly",ze.jsx("br",{})," with a Link"]})}),ze.jsx("div",{className:Un.homeContainer,children:ze.jsxs("div",{className:Un.formContainer,children:[ze.jsxs("div",{className:Un.inputContainer,children:[ze.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"20px",marginBottom:"20px",alignItems:"center"},children:[ze.jsx(NS,{placeholder:"ETH",data:["USDT","Matic","ETH","FIL"],defaultValue:"ETH",value:r,onChange:n}),ze.jsx(IS,{pl:0,color:"gray",variant:"light",leftSection:ze.jsx(Y5,{alt:"Avatar for badge",size:24,mr:5,src:LEe(s)}),size:"lg",className:Un.network,children:i})]}),ze.jsx(an.Wrapper,{label:"Enter Value",children:ze.jsx(an,{type:"number",value:t,onChange:P=>{var I;return e((I=P==null?void 0:P.target)==null?void 0:I.value)},placeholder:"enter the value",className:Un.input})})]}),ze.jsx(io,{type:"button",fullWidth:!0,color:"green",className:Un.btn,onClick:S,loading:A,children:A?"Creating Link ...":"Create Link"}),ze.jsx("p",{className:Un.subheading,children:"Just select the amount and asset to create a payment link. No need to transfer anythign anywhere 🔗"})]})})]})})}const FEe="_homeContainer_pcvo1_3",$Ee="_formContainer_pcvo1_13",UEe="_heading_pcvo1_21",zEe="_subHeading_pcvo1_31",jEe="_loader_pcvo1_36",HEe="_btn_pcvo1_42",qEe="_input_pcvo1_57",GEe="_inputContainer_pcvo1_62",qi={homeContainer:FEe,formContainer:$Ee,heading:UEe,subHeading:zEe,loader:jEe,btn:HEe,input:qEe,inputContainer:GEe};function VK(t,e){return function(){return t.apply(e,arguments)}}const{toString:VEe}=Object.prototype,{getPrototypeOf:IP}=Object,e3=(t=>e=>{const r=VEe.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Wa=t=>(t=t.toLowerCase(),e=>e3(e)===t),t3=t=>e=>typeof e===t,{isArray:C1}=Array,qg=t3("undefined");function KEe(t){return t!==null&&!qg(t)&&t.constructor!==null&&!qg(t.constructor)&&jo(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const KK=Wa("ArrayBuffer");function WEe(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&KK(t.buffer),e}const JEe=t3("string"),jo=t3("function"),WK=t3("number"),r3=t=>t!==null&&typeof t=="object",ZEe=t=>t===!0||t===!1,h2=t=>{if(e3(t)!=="object")return!1;const e=IP(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},YEe=Wa("Date"),QEe=Wa("File"),XEe=Wa("Blob"),eAe=Wa("FileList"),tAe=t=>r3(t)&&jo(t.pipe),rAe=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||jo(t.append)&&((e=e3(t))==="formdata"||e==="object"&&jo(t.toString)&&t.toString()==="[object FormData]"))},nAe=Wa("URLSearchParams"),iAe=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function by(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),C1(t))for(n=0,i=t.length;n0;)if(i=r[n],e===i.toLowerCase())return i;return null}const ZK=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Je.global)(),YK=t=>!qg(t)&&t!==ZK;function IE(){const{caseless:t}=YK(this)&&this||{},e={},r=(n,i)=>{const o=t&&JK(e,i)||i;h2(e[o])&&h2(n)?e[o]=IE(e[o],n):h2(n)?e[o]=IE({},n):C1(n)?e[o]=n.slice():e[o]=n};for(let n=0,i=arguments.length;n(by(e,(i,o)=>{r&&jo(i)?t[o]=VK(i,r):t[o]=i},{allOwnKeys:n}),t),sAe=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),aAe=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},fAe=(t,e,r,n)=>{let i,o,s;const f={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!n||n(s,t,e))&&!f[s]&&(e[s]=t[s],f[s]=!0);t=r!==!1&&IP(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},cAe=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},uAe=t=>{if(!t)return null;if(C1(t))return t;let e=t.length;if(!WK(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},lAe=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&IP(Uint8Array)),dAe=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},hAe=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},pAe=Wa("HTMLFormElement"),mAe=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),rO=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),gAe=Wa("RegExp"),QK=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};by(r,(i,o)=>{e(i,o,t)!==!1&&(n[o]=i)}),Object.defineProperties(t,n)},bAe=t=>{QK(t,(e,r)=>{if(jo(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(jo(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},yAe=(t,e)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return C1(t)?n(t):n(String(t).split(e)),r},vAe=()=>{},wAe=(t,e)=>(t=+t,Number.isFinite(t)?t:e),T4="abcdefghijklmnopqrstuvwxyz",nO="0123456789",XK={DIGIT:nO,ALPHA:T4,ALPHA_DIGIT:T4+T4.toUpperCase()+nO},xAe=(t=16,e=XK.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function EAe(t){return!!(t&&jo(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const AAe=t=>{const e=new Array(10),r=(n,i)=>{if(r3(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const o=C1(n)?[]:{};return by(n,(s,f)=>{const d=r(s,i+1);!qg(d)&&(o[f]=d)}),e[i]=void 0,o}}return n};return r(t,0)},SAe=Wa("AsyncFunction"),MAe=t=>t&&(r3(t)||jo(t))&&jo(t.then)&&jo(t.catch),je={isArray:C1,isArrayBuffer:KK,isBuffer:KEe,isFormData:rAe,isArrayBufferView:WEe,isString:JEe,isNumber:WK,isBoolean:ZEe,isObject:r3,isPlainObject:h2,isUndefined:qg,isDate:YEe,isFile:QEe,isBlob:XEe,isRegExp:gAe,isFunction:jo,isStream:tAe,isURLSearchParams:nAe,isTypedArray:lAe,isFileList:eAe,forEach:by,merge:IE,extend:oAe,trim:iAe,stripBOM:sAe,inherits:aAe,toFlatObject:fAe,kindOf:e3,kindOfTest:Wa,endsWith:cAe,toArray:uAe,forEachEntry:dAe,matchAll:hAe,isHTMLForm:pAe,hasOwnProperty:rO,hasOwnProp:rO,reduceDescriptors:QK,freezeMethods:bAe,toObjectSet:yAe,toCamelCase:mAe,noop:vAe,toFiniteNumber:wAe,findKey:JK,global:ZK,isContextDefined:YK,ALPHABET:XK,generateString:xAe,isSpecCompliantForm:EAe,toJSONObject:AAe,isAsyncFn:SAe,isThenable:MAe};function Vt(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}je.inherits(Vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const eW=Vt.prototype,tW={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{tW[t]={value:t}});Object.defineProperties(Vt,tW);Object.defineProperty(eW,"isAxiosError",{value:!0});Vt.from=(t,e,r,n,i,o)=>{const s=Object.create(eW);return je.toFlatObject(t,s,function(d){return d!==Error.prototype},f=>f!=="isAxiosError"),Vt.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const _Ae=null;function TE(t){return je.isPlainObject(t)||je.isArray(t)}function rW(t){return je.endsWith(t,"[]")?t.slice(0,-2):t}function iO(t,e,r){return t?t.concat(e).map(function(i,o){return i=rW(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function PAe(t){return je.isArray(t)&&!t.some(TE)}const CAe=je.toFlatObject(je,{},null,function(e){return/^is[A-Z]/.test(e)});function n3(t,e,r){if(!je.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=je.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,I){return!je.isUndefined(I[P])});const n=r.metaTokens,i=r.visitor||b,o=r.dots,s=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&je.isSpecCompliantForm(e);if(!je.isFunction(i))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(je.isDate(S))return S.toISOString();if(!d&&je.isBlob(S))throw new Vt("Blob is not supported. Use a Buffer instead.");return je.isArrayBuffer(S)||je.isTypedArray(S)?d&&typeof Blob=="function"?new Blob([S]):Je.Buffer.from(S):S}function b(S,P,I){let C=S;if(S&&!I&&typeof S=="object"){if(je.endsWith(P,"{}"))P=n?P:P.slice(0,-2),S=JSON.stringify(S);else if(je.isArray(S)&&PAe(S)||(je.isFileList(S)||je.endsWith(P,"[]"))&&(C=je.toArray(S)))return P=rW(P),C.forEach(function(k,O){!(je.isUndefined(k)||k===null)&&e.append(s===!0?iO([P],O,o):s===null?P:P+"[]",p(k))}),!1}return TE(S)?!0:(e.append(iO(I,P,o),p(S)),!1)}const v=[],A=Object.assign(CAe,{defaultVisitor:b,convertValue:p,isVisitable:TE});function _(S,P){if(!je.isUndefined(S)){if(v.indexOf(S)!==-1)throw Error("Circular reference detected in "+P.join("."));v.push(S),je.forEach(S,function(C,T){(!(je.isUndefined(C)||C===null)&&i.call(e,C,je.isString(T)?T.trim():T,P,A))===!0&&_(C,P?P.concat(T):[T])}),v.pop()}}if(!je.isObject(t))throw new TypeError("data must be an object");return _(t),e}function oO(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function TP(t,e){this._pairs=[],t&&n3(t,this,e)}const nW=TP.prototype;nW.append=function(e,r){this._pairs.push([e,r])};nW.toString=function(e){const r=e?function(n){return e.call(this,n,oO)}:oO;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function IAe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function iW(t,e,r){if(!e)return t;const n=r&&r.encode||IAe,i=r&&r.serialize;let o;if(i?o=i(e,r):o=je.isURLSearchParams(e)?e.toString():new TP(e,r).toString(n),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class TAe{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){je.forEach(this.handlers,function(n){n!==null&&e(n)})}}const sO=TAe,oW={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RAe=typeof URLSearchParams<"u"?URLSearchParams:TP,kAe=typeof FormData<"u"?FormData:null,BAe=typeof Blob<"u"?Blob:null,OAe=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),NAe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Ia={isBrowser:!0,classes:{URLSearchParams:RAe,FormData:kAe,Blob:BAe},isStandardBrowserEnv:OAe,isStandardBrowserWebWorkerEnv:NAe,protocols:["http","https","file","blob","url","data"]};function LAe(t,e){return n3(t,new Ia.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return Ia.isNode&&je.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function DAe(t){return je.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function FAe(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n=r.length;return s=!s&&je.isArray(i)?i.length:s,d?(je.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!f):((!i[s]||!je.isObject(i[s]))&&(i[s]=[]),e(r,n,i[s],o)&&je.isArray(i[s])&&(i[s]=FAe(i[s])),!f)}if(je.isFormData(t)&&je.isFunction(t.entries)){const r={};return je.forEachEntry(t,(n,i)=>{e(DAe(n),i,r,0)}),r}return null}const $Ae={"Content-Type":void 0};function UAe(t,e,r){if(je.isString(t))try{return(e||JSON.parse)(t),je.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const i3={transitional:oW,adapter:["xhr","http"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=je.isObject(e);if(o&&je.isHTMLForm(e)&&(e=new FormData(e)),je.isFormData(e))return i&&i?JSON.stringify(sW(e)):e;if(je.isArrayBuffer(e)||je.isBuffer(e)||je.isStream(e)||je.isFile(e)||je.isBlob(e))return e;if(je.isArrayBufferView(e))return e.buffer;if(je.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let f;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return LAe(e,this.formSerializer).toString();if((f=je.isFileList(e))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return n3(f?{"files[]":e}:e,d&&new d,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),UAe(e)):e}],transformResponse:[function(e){const r=this.transitional||i3.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(e&&je.isString(e)&&(n&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(f){if(s)throw f.name==="SyntaxError"?Vt.from(f,Vt.ERR_BAD_RESPONSE,this,null,this.response):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ia.classes.FormData,Blob:Ia.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};je.forEach(["delete","get","head"],function(e){i3.headers[e]={}});je.forEach(["post","put","patch"],function(e){i3.headers[e]=je.merge($Ae)});const RP=i3,zAe=je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jAe=t=>{const e={};let r,n,i;return t&&t.split(` +`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||e[r]&&zAe[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},aO=Symbol("internals");function fm(t){return t&&String(t).trim().toLowerCase()}function p2(t){return t===!1||t==null?t:je.isArray(t)?t.map(p2):String(t)}function HAe(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const qAe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function R4(t,e,r,n,i){if(je.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!je.isString(e)){if(je.isString(n))return e.indexOf(n)!==-1;if(je.isRegExp(n))return n.test(e)}}function GAe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function VAe(t,e){const r=je.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,o,s){return this[n].call(this,e,i,o,s)},configurable:!0})})}class o3{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function o(f,d,p){const b=fm(d);if(!b)throw new Error("header name must be a non-empty string");const v=je.findKey(i,b);(!v||i[v]===void 0||p===!0||p===void 0&&i[v]!==!1)&&(i[v||d]=p2(f))}const s=(f,d)=>je.forEach(f,(p,b)=>o(p,b,d));return je.isPlainObject(e)||e instanceof this.constructor?s(e,r):je.isString(e)&&(e=e.trim())&&!qAe(e)?s(jAe(e),r):e!=null&&o(r,e,n),this}get(e,r){if(e=fm(e),e){const n=je.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return HAe(i);if(je.isFunction(r))return r.call(this,i,n);if(je.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=fm(e),e){const n=je.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||R4(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function o(s){if(s=fm(s),s){const f=je.findKey(n,s);f&&(!r||R4(n,n[f],f,r))&&(delete n[f],i=!0)}}return je.isArray(e)?e.forEach(o):o(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!e||R4(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const r=this,n={};return je.forEach(this,(i,o)=>{const s=je.findKey(n,o);if(s){r[s]=p2(i),delete r[o];return}const f=e?GAe(o):String(o).trim();f!==o&&delete r[o],r[f]=p2(i),n[f]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return je.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&je.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[aO]=this[aO]={accessors:{}}).accessors,i=this.prototype;function o(s){const f=fm(s);n[f]||(VAe(i,s),n[f]=!0)}return je.isArray(e)?e.forEach(o):o(e),this}}o3.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);je.freezeMethods(o3.prototype);je.freezeMethods(o3);const Lf=o3;function k4(t,e){const r=this||RP,n=e||r,i=Lf.from(n.headers);let o=n.data;return je.forEach(t,function(f){o=f.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function aW(t){return!!(t&&t.__CANCEL__)}function yy(t,e,r){Vt.call(this,t??"canceled",Vt.ERR_CANCELED,e,r),this.name="CanceledError"}je.inherits(yy,Vt,{__CANCEL__:!0});function KAe(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Vt("Request failed with status code "+r.status,[Vt.ERR_BAD_REQUEST,Vt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const WAe=Ia.isStandardBrowserEnv?function(){return{write:function(r,n,i,o,s,f){const d=[];d.push(r+"="+encodeURIComponent(n)),je.isNumber(i)&&d.push("expires="+new Date(i).toGMTString()),je.isString(o)&&d.push("path="+o),je.isString(s)&&d.push("domain="+s),f===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function JAe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ZAe(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function fW(t,e){return t&&!JAe(e)?ZAe(t,e):e}const YAe=Ia.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function i(o){let s=o;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(s){const f=je.isString(s)?i(s):s;return f.protocol===n.protocol&&f.host===n.host}}():function(){return function(){return!0}}();function QAe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function XAe(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(d){const p=Date.now(),b=n[o];s||(s=p),r[i]=d,n[i]=p;let v=o,A=0;for(;v!==i;)A+=r[v++],v=v%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),p-s{const o=i.loaded,s=i.lengthComputable?i.total:void 0,f=o-r,d=n(f),p=o<=s;r=o;const b={loaded:o,total:s,progress:s?o/s:void 0,bytes:f,rate:d||void 0,estimated:d&&s&&p?(s-o)/d:void 0,event:i};b[e?"download":"upload"]=!0,t(b)}}const eSe=typeof XMLHttpRequest<"u",tSe=eSe&&function(t){return new Promise(function(r,n){let i=t.data;const o=Lf.from(t.headers).normalize(),s=t.responseType;let f;function d(){t.cancelToken&&t.cancelToken.unsubscribe(f),t.signal&&t.signal.removeEventListener("abort",f)}je.isFormData(i)&&(Ia.isStandardBrowserEnv||Ia.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let p=new XMLHttpRequest;if(t.auth){const _=t.auth.username||"",S=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(_+":"+S))}const b=fW(t.baseURL,t.url);p.open(t.method.toUpperCase(),iW(b,t.params,t.paramsSerializer),!0),p.timeout=t.timeout;function v(){if(!p)return;const _=Lf.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:_,config:t,request:p};KAe(function(C){r(C),d()},function(C){n(C),d()},P),p=null}if("onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(n(new Vt("Request aborted",Vt.ECONNABORTED,t,p)),p=null)},p.onerror=function(){n(new Vt("Network Error",Vt.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let S=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const P=t.transitional||oW;t.timeoutErrorMessage&&(S=t.timeoutErrorMessage),n(new Vt(S,P.clarifyTimeoutError?Vt.ETIMEDOUT:Vt.ECONNABORTED,t,p)),p=null},Ia.isStandardBrowserEnv){const _=(t.withCredentials||YAe(b))&&t.xsrfCookieName&&WAe.read(t.xsrfCookieName);_&&o.set(t.xsrfHeaderName,_)}i===void 0&&o.setContentType(null),"setRequestHeader"in p&&je.forEach(o.toJSON(),function(S,P){p.setRequestHeader(P,S)}),je.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),s&&s!=="json"&&(p.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&p.addEventListener("progress",fO(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",fO(t.onUploadProgress)),(t.cancelToken||t.signal)&&(f=_=>{p&&(n(!_||_.type?new yy(null,t,p):_),p.abort(),p=null)},t.cancelToken&&t.cancelToken.subscribe(f),t.signal&&(t.signal.aborted?f():t.signal.addEventListener("abort",f)));const A=QAe(b);if(A&&Ia.protocols.indexOf(A)===-1){n(new Vt("Unsupported protocol "+A+":",Vt.ERR_BAD_REQUEST,t));return}p.send(i||null)})},m2={http:_Ae,xhr:tSe};je.forEach(m2,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const rSe={getAdapter:t=>{t=je.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let i=0;it instanceof Lf?t.toJSON():t;function Wp(t,e){e=e||{};const r={};function n(p,b,v){return je.isPlainObject(p)&&je.isPlainObject(b)?je.merge.call({caseless:v},p,b):je.isPlainObject(b)?je.merge({},b):je.isArray(b)?b.slice():b}function i(p,b,v){if(je.isUndefined(b)){if(!je.isUndefined(p))return n(void 0,p,v)}else return n(p,b,v)}function o(p,b){if(!je.isUndefined(b))return n(void 0,b)}function s(p,b){if(je.isUndefined(b)){if(!je.isUndefined(p))return n(void 0,p)}else return n(void 0,b)}function f(p,b,v){if(v in e)return n(p,b);if(v in t)return n(void 0,p)}const d={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:f,headers:(p,b)=>i(uO(p),uO(b),!0)};return je.forEach(Object.keys(Object.assign({},t,e)),function(b){const v=d[b]||i,A=v(t[b],e[b],b);je.isUndefined(A)&&v!==f||(r[b]=A)}),r}const cW="1.4.0",kP={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{kP[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const lO={};kP.transitional=function(e,r,n){function i(o,s){return"[Axios v"+cW+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,f)=>{if(e===!1)throw new Vt(i(s," has been removed"+(r?" in "+r:"")),Vt.ERR_DEPRECATED);return r&&!lO[s]&&(lO[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,s,f):!0}};function nSe(t,e,r){if(typeof t!="object")throw new Vt("options must be an object",Vt.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const f=t[o],d=f===void 0||s(f,o,t);if(d!==!0)throw new Vt("option "+o+" must be "+d,Vt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Vt("Unknown option "+o,Vt.ERR_BAD_OPTION)}}const RE={assertOptions:nSe,validators:kP},vc=RE.validators;class f5{constructor(e){this.defaults=e,this.interceptors={request:new sO,response:new sO}}request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Wp(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&RE.assertOptions(n,{silentJSONParsing:vc.transitional(vc.boolean),forcedJSONParsing:vc.transitional(vc.boolean),clarifyTimeoutError:vc.transitional(vc.boolean)},!1),i!=null&&(je.isFunction(i)?r.paramsSerializer={serialize:i}:RE.assertOptions(i,{encode:vc.function,serialize:vc.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s;s=o&&je.merge(o.common,o[r.method]),s&&je.forEach(["delete","get","head","post","put","patch","common"],S=>{delete o[S]}),r.headers=Lf.concat(s,o);const f=[];let d=!0;this.interceptors.request.forEach(function(P){typeof P.runWhen=="function"&&P.runWhen(r)===!1||(d=d&&P.synchronous,f.unshift(P.fulfilled,P.rejected))});const p=[];this.interceptors.response.forEach(function(P){p.push(P.fulfilled,P.rejected)});let b,v=0,A;if(!d){const S=[cO.bind(this),void 0];for(S.unshift.apply(S,f),S.push.apply(S,p),A=S.length,b=Promise.resolve(r);v{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(f=>{n.subscribe(f),o=f}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},e(function(o,s,f){n.reason||(n.reason=new yy(o,s,f),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new BP(function(i){e=i}),cancel:e}}}const iSe=BP;function oSe(t){return function(r){return t.apply(null,r)}}function sSe(t){return je.isObject(t)&&t.isAxiosError===!0}const kE={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(kE).forEach(([t,e])=>{kE[e]=t});const aSe=kE;function uW(t){const e=new g2(t),r=VK(g2.prototype.request,e);return je.extend(r,g2.prototype,e,{allOwnKeys:!0}),je.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return uW(Wp(t,i))},r}const un=uW(RP);un.Axios=g2;un.CanceledError=yy;un.CancelToken=iSe;un.isCancel=aW;un.VERSION=cW;un.toFormData=n3;un.AxiosError=Vt;un.Cancel=un.CanceledError;un.all=function(e){return Promise.all(e)};un.spread=oSe;un.isAxiosError=sSe;un.mergeConfig=Wp;un.AxiosHeaders=Lf;un.formToJSON=t=>sW(je.isHTMLForm(t)?new FormData(t):t);un.HttpStatusCode=aSe;un.default=un;const fSe=un,cSe="m/44'/60'/0'/0/0";async function lW(){try{const t=await jK.stampGetWhoami({organizationId:"be67a3da-0512-40f8-a025-cb518d83c655"}),r=(await fSe.post(t.url,t.body,{headers:{[t.stamp.stampHeaderName]:t.stamp.stampHeaderValue}})).data.organizationId,n=new $K({apiPublicKey:"0301cb31eadda1532da75c9dbfee121a2f91ea6e3e4f7f7470fa5ae44e8ce3d468",apiPrivateKey:"779dab5bd0e62af43716e370d31f9a5c1b4284bd8068f9239ab28c80fdb74d42"}),i=new Qx({baseUrl:"https://api.turnkey.com"},n),o=await i.getWallets({organizationId:r}),s=await i.getWalletAccounts({organizationId:r,walletId:o.wallets[0].walletId}),f=s.accounts[0].walletId,d=s.accounts[0].address,p=await Xx(5).getBalance({address:d});return{id:f,address:d,subOrgId:r,balance:y1(p)}}catch(t){console.error(t)}}async function dW(t){var r,n;const e=t;try{const i=eO(),o=eO(),s=await Y7e({publicKey:{rp:{id:{}.NEXT_PUBLIC_RPID,name:"Turnkey Viem Passkey Demo"},challenge:i,pubKeyCredParams:[{type:"public-key",alg:-7},{type:"public-key",alg:-257}],user:{id:o,name:e.split(" ").join("-"),displayName:e},authenticatorSelection:{requireResidentKey:!0}}}),f=new Qx({baseUrl:"https://api.turnkey.com"},new $K({apiPublicKey:"0301cb31eadda1532da75c9dbfee121a2f91ea6e3e4f7f7470fa5ae44e8ce3d468",apiPrivateKey:"779dab5bd0e62af43716e370d31f9a5c1b4284bd8068f9239ab28c80fdb74d42"})),d=tEe({client:f,requestFn:f.createSubOrganization}),p="Default ETH Wallet",b=await d({type:"ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4",timestampMs:String(Date.now()),organizationId:"be67a3da-0512-40f8-a025-cb518d83c655",parameters:{subOrganizationName:e,rootQuorumThreshold:1,rootUsers:[{userName:"New user",apiKeys:[],authenticators:[{authenticatorName:"Passkey",challenge:EEe(i),attestation:s}]}],wallet:{walletName:p,accounts:[{curve:"CURVE_SECP256K1",pathFormat:"PATH_FORMAT_BIP32",path:cSe,addressFormat:"ADDRESS_FORMAT_ETHEREUM"}]}}}),v=XB((r=b.result.createSubOrganizationResultV4)==null?void 0:r.subOrganizationId),A=XB((n=b.result.createSubOrganizationResultV4)==null?void 0:n.wallet),_=A.walletId,S=A.addresses[0],I=await Xx(5).getBalance({address:S});return{id:_,address:S,subOrgId:v,balance:y1(I)}}catch(i){console.error(i)}}const uSe=new zK({rpId:{}.NEXT_PUBLIC_RPID});new Qx({baseUrl:"https://api.turnkey.com"},uSe);function lSe(){const[t,{open:e,close:r}]=NA(!1),n=E8e(),[i,o]=Z.useState(),[s,f]=Z.useState({}),[d,p]=Z.useState(""),[b,v]=Z.useState(""),[A,_]=Z.useState(""),{confirming:S,setConfirming:P,setConfirmed:I,setClaimDetails:C}=LS(k=>k);function T(k){const O=k.split("?")[1];if(!O)return null;const D=new URLSearchParams(O),U={};for(const[V,Y]of D.entries())U[V]=Y;return U}return Z.useEffect(()=>{(async()=>{var V,Y;const k=T(window.location.href);o(k);const{claimed:O,amount:D,tokenAddress:U}=await MEe(k.c,k.i);f({claimed:O,amount:D,token:U,chainId:k.c}),v(`${(V=co.getNetworkById(Number(k.c)))==null?void 0:V.name} ${(Y=co.getNetworkById(Number(k.c)))==null?void 0:Y.type}`)})()},[]),ze.jsxs(ze.Fragment,{children:[ze.jsxs(ra,{opened:t,onClose:r,title:"Claim via Safe Account",centered:!0,children:[ze.jsx(BS,{visible:S,zIndex:1e3,overlayProps:{radius:"sm",blur:2},loaderProps:{color:"green",children:ze.jsxs(Xp,{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"inherit",padding:"20px"},children:[ze.jsxs("p",{className:qi.loader,children:[A,"."]}),ze.jsx("p",{className:qi.subHeading,children:" Buckle up! Our digital hamsters are on their morning jog—this'll be quicker than a cat video. 🏃‍♂️💨"}),ze.jsx(Al,{color:"green",type:"dots",size:"xl"})," "]})}}),ze.jsxs("div",{className:qi.formContainer,children:[ze.jsx("div",{children:ze.jsx("h1",{className:qi.heading,children:"Use your PassKey to Claim Crypto"})}),ze.jsx("p",{className:qi.subHeading,children:"This will claim the funds to a new Safe Account (with 4337 module) created via passkey."}),ze.jsxs("div",{className:qi.inputContainer,children:[ze.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"20px",marginBottom:"20px",alignItems:"center"},children:[ze.jsx(an.Wrapper,{children:ze.jsx(an,{type:"text",value:d,onChange:k=>p(k.currentTarget.value),placeholder:"Wallet Name",className:qi.input})}),ze.jsx(io,{type:"button",fullWidth:!0,color:"green",style:{marginLeft:"20px"},className:qi.btn,onClick:async()=>{try{P(!0),_("Authenticating you ...");const k=await dW(d),O=await a5(parseInt(i.c),k);_("Confirming the claim transaction");const D=await tO(i.c,i.i,i.p,O);C({account:O,amount:s.amount,chainId:i.c}),P(!1),n($u.account)}catch{P(!1)}},loading:!1,children:"Create & Claim"})]}),ze.jsx(X5,{my:"xs",label:"OR",labelPosition:"center"}),ze.jsx("div",{style:{display:"flex",marginTop:"20px",marginBottom:"20px",alignItems:"center",justifyContent:"center"},children:ze.jsx(io,{type:"button",fullWidth:!0,color:"green",className:qi.btn,onClick:async()=>{P(!0),_("Authenticating you ...");const k=await lW();_("Confirming the claim transaction");const O=await a5(parseInt(i.c),k);P(!0),await tO(i.c,i.i,i.p,O),C({account:O,amount:s.amount,chainId:i.c}),P(!1),n($u.account)},loading:!1,children:"Login & Claim"})})]})]})]}),ze.jsx("div",{className:qi.homeContainer,children:ze.jsxs("div",{className:qi.formContainer,children:[ze.jsx("div",{children:ze.jsxs("h1",{className:qi.heading,children:["You have ",s.amount?Z9(s.amount):0," ",s.token?"ETH":""," to claim.."]})}),ze.jsx(io,{color:"teal",type:"button",className:qi.btn,onClick:async()=>{e()},children:"Claim"})]})})]})}const dSe="_accountContainer_1gsks_3",hSe="_formContainer_1gsks_15",pSe="_avatarContainer_1gsks_24",mSe="_balance_1gsks_32",gSe="_avatar_1gsks_24",bSe="_heading_1gsks_45",ySe="_btn_1gsks_56",vSe="_actionsContainer_1gsks_71",wSe="_balanceContainer_1gsks_79",xSe="_actions_1gsks_71",zn={accountContainer:dSe,formContainer:hSe,avatarContainer:pSe,balance:mSe,avatar:gSe,heading:bSe,btn:ySe,actionsContainer:vSe,balanceContainer:wSe,actions:xSe},ESe=()=>{var S,P,I,C,T;const{claimDetails:t,setClaimDetails:e}=LS(k=>k),[r,n]=Z.useState(0),[i,{open:o,close:s}]=NA(!1),[f,d]=Z.useState(""),[p,b]=Z.useState(!1),[v,A]=Z.useState({width:window.innerWidth,height:window.innerHeight});Z.useEffect(()=>{(async()=>{var O;t.account||o();const k=await Xx(5).getBalance({address:(O=t==null?void 0:t.account)==null?void 0:O.address});n(k),window.addEventListener("resize",()=>A({width:window.innerWidth,height:window.innerHeight}))})()},[t.account]);function _(k){const O=k.slice(0,7),D=k.slice(-5);return`${O}...${D}`}return ze.jsxs(ze.Fragment,{children:[ze.jsx(ra,{opened:i,onClose:s,title:"Authenticate your Account",centered:!0,children:ze.jsxs("div",{className:zn.formContainer,children:[ze.jsx("div",{children:ze.jsx("h1",{className:zn.heading,children:"Use your PassKey to Spin Up an Account"})}),ze.jsx("p",{className:zn.subHeading,children:"This will create a new Safe Account (with 4337 module) created via passkey."}),ze.jsxs("div",{className:zn.inputContainer,children:[ze.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"20px",marginBottom:"20px",alignItems:"center"},children:[ze.jsx(an.Wrapper,{children:ze.jsx(an,{type:"text",value:f,onChange:k=>d(k.currentTarget.value),placeholder:"Wallet Name",className:zn.input})}),ze.jsx(io,{type:"button",fullWidth:!0,color:"green",style:{marginLeft:"20px"},className:zn.btn,onClick:async()=>{const k=await a5(5,await dW(f));e({account:k,amount:0,chainId:t.chainId}),s()},children:"Create Account"})]}),ze.jsx(X5,{my:"xs",label:"OR",labelPosition:"center"}),ze.jsx("div",{style:{display:"flex",marginTop:"20px",marginBottom:"20px",alignItems:"center",justifyContent:"center"},children:ze.jsx(io,{type:"button",fullWidth:!0,color:"green",className:zn.btn,onClick:async()=>{b(!0);const k=await a5(5,await lW());e({account:k,amount:0,chainId:t.chainId}),s()},loading:p,children:"Login"})})]})]})}),ze.jsx(Xp,{className:zn.accountContainer,shadow:"xl",withBorder:!0,radius:"md",p:"xl",children:ze.jsxs("div",{className:zn.formContainer,children:[!!t.amount&&ze.jsxs(cS,{variant:"light",color:"green",radius:"md",title:"",icon:ze.jsx(zie,{}),children:["Successfully claimed ",Z9(t.amount?t.amount:0)," ETH from the link 🎉"]}),ze.jsxs("div",{className:zn.avatarContainer,children:[ze.jsx("img",{className:zn.avatar,src:"https://pbs.twimg.com/profile_images/1643941027898613760/gyhYEOCE_400x400.jpg",alt:"avatar",height:100,width:100}),ze.jsxs("div",{className:zn.balanceContainer,children:[ze.jsxs(lS,{href:`${(S=co.getNetworkById(parseInt(t.chainId)))==null?void 0:S.blockExplorer}/address/${(P=t.account)==null?void 0:P.address}`,target:"_blank",underline:"hover",children:[" ",ze.jsxs("p",{children:[" ",_((I=t.account)!=null&&I.address?(C=t.account)==null?void 0:C.address:"0x000000000000000000000000")]})]}),ze.jsx(RS,{value:(T=t.account)==null?void 0:T.address,timeout:1e3,children:({copied:k,copy:O})=>ze.jsx(Mb,{label:k?"Copied":"Copy",withArrow:!0,position:"right",children:ze.jsx(q5,{color:k?"teal":"gray",variant:"subtle",onClick:O,children:k?ze.jsx(Die,{style:{width:Fe(16)}}):ze.jsx($ie,{style:{width:Fe(16)}})})})})]}),ze.jsxs("p",{className:zn.balance,children:[" ",Z9(r)," ETH "]})]}),ze.jsx("div",{className:zn.actionsContainer,children:ze.jsxs("div",{className:zn.actions,children:[ze.jsx(io,{size:"lg",radius:"md",style:{width:"110px"},className:zn.btn,color:"teal",children:"Send"}),ze.jsx(io,{size:"lg",radius:"md",color:"#49494f",disabled:!0,variant:"filled",style:{},children:"Swap"})]})})]})}),t.amount&&ze.jsx(GK,{width:v.width,height:v.height})]})},ASe=D8e([{path:$u.home,element:ze.jsx(DEe,{})},{path:$u.account,element:ze.jsx(ESe,{})},{path:$u.claim,element:ze.jsx(lSe,{})}]);function SSe(){return ze.jsx(V8e,{router:ASe})}const MSe={fontFamily:"Inter, sans-serif"};function _Se(){return ze.jsx(tD,{theme:MSe,children:ze.jsx(T3e,{children:ze.jsx(SSe,{})})})}L4.createRoot(document.getElementById("root")).render(ze.jsx(_Se,{}));export{pj as a,USe as c,Je as d,$Se as u}; diff --git a/assets/index-b5be2b39.css b/assets/index-ab9dd86d.css similarity index 97% rename from assets/index-b5be2b39.css rename to assets/index-ab9dd86d.css index 4423027d..e2069673 100644 --- a/assets/index-b5be2b39.css +++ b/assets/index-ab9dd86d.css @@ -1 +1 @@ -body,html{height:100%}*,:after,:before{box-sizing:border-box}button,input,select,textarea{font:inherit}button,select{text-transform:none}body{-webkit-font-smoothing:var(--mantine-webkit-font-smoothing);-moz-osx-font-smoothing:var(--mantine-moz-font-smoothing);background-color:var(--mantine-color-body);color:var(--mantine-color-text);font-family:var(--mantine-font-family);font-size:var(--mantine-font-size-md);line-height:var(--mantine-line-height);margin:0}@media screen and (max-device-width:500px){body{-webkit-text-size-adjust:100%}}@media (prefers-reduced-motion:reduce){[data-respect-reduced-motion] [data-reduce-motion]{animation:none;transition:none}}[data-mantine-color-scheme=dark] .mantine-dark-hidden,[data-mantine-color-scheme=light] .mantine-light-hidden{display:none}.mantine-focus-auto:focus-visible{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.mantine-focus-always:focus{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.mantine-focus-never:focus{outline:none}.mantine-active:active{transform:translateY(calc(.0625rem*var(--mantine-scale)))}[dir=rtl] .mantine-rotate-rtl{transform:rotate(180deg)}:root{--mantine-z-index-app:100;--mantine-z-index-modal:200;--mantine-z-index-popover:300;--mantine-z-index-overlay:400;--mantine-z-index-max:9999;--mantine-scale:1;--mantine-cursor-type:default;--mantine-webkit-font-smoothing:antialiased;--mantine-color-scheme:light dark;--mantine-moz-font-smoothing:grayscale;--mantine-color-white:#fff;--mantine-color-black:#000;--mantine-line-height:1.55;--mantine-font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;--mantine-font-family-monospace:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;--mantine-font-family-headings:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;--mantine-heading-font-weight:700;--mantine-radius-default:calc(.25rem*var(--mantine-scale));--mantine-primary-color-filled:var(--mantine-color-blue-filled);--mantine-primary-color-filled-hover:var(--mantine-color-blue-filled-hover);--mantine-primary-color-light:var(--mantine-color-blue-light);--mantine-primary-color-light-hover:var(--mantine-color-blue-light-hover);--mantine-primary-color-light-color:var(--mantine-color-blue-light-color);--mantine-breakpoint-xs:36em;--mantine-breakpoint-sm:48em;--mantine-breakpoint-md:62em;--mantine-breakpoint-lg:75em;--mantine-breakpoint-xl:88em;--mantine-spacing-xs:calc(.625rem*var(--mantine-scale));--mantine-spacing-sm:calc(.75rem*var(--mantine-scale));--mantine-spacing-md:calc(1rem*var(--mantine-scale));--mantine-spacing-lg:calc(1.25rem*var(--mantine-scale));--mantine-spacing-xl:calc(2rem*var(--mantine-scale));--mantine-font-size-xs:calc(.75rem*var(--mantine-scale));--mantine-font-size-sm:calc(.875rem*var(--mantine-scale));--mantine-font-size-md:calc(1rem*var(--mantine-scale));--mantine-font-size-lg:calc(1.125rem*var(--mantine-scale));--mantine-font-size-xl:calc(1.25rem*var(--mantine-scale));--mantine-line-height-xs:1.4;--mantine-line-height-sm:1.45;--mantine-line-height-md:1.55;--mantine-line-height-lg:1.6;--mantine-line-height-xl:1.65;--mantine-shadow-xs:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),0 calc(.0625rem*var(--mantine-scale)) calc(.125rem*var(--mantine-scale)) rgba(0,0,0,.1);--mantine-shadow-sm:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),rgba(0,0,0,.05) 0 calc(.625rem*var(--mantine-scale)) calc(.9375rem*var(--mantine-scale)) calc(-.3125rem*var(--mantine-scale)),rgba(0,0,0,.04) 0 calc(.4375rem*var(--mantine-scale)) calc(.4375rem*var(--mantine-scale)) calc(-.3125rem*var(--mantine-scale));--mantine-shadow-md:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),rgba(0,0,0,.05) 0 calc(1.25rem*var(--mantine-scale)) calc(1.5625rem*var(--mantine-scale)) calc(-.3125rem*var(--mantine-scale)),rgba(0,0,0,.04) 0 calc(.625rem*var(--mantine-scale)) calc(.625rem*var(--mantine-scale)) calc(-.3125rem*var(--mantine-scale));--mantine-shadow-lg:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),rgba(0,0,0,.05) 0 calc(1.75rem*var(--mantine-scale)) calc(1.4375rem*var(--mantine-scale)) calc(-.4375rem*var(--mantine-scale)),rgba(0,0,0,.04) 0 calc(.75rem*var(--mantine-scale)) calc(.75rem*var(--mantine-scale)) calc(-.4375rem*var(--mantine-scale));--mantine-shadow-xl:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),rgba(0,0,0,.05) 0 calc(2.25rem*var(--mantine-scale)) calc(1.75rem*var(--mantine-scale)) calc(-.4375rem*var(--mantine-scale)),rgba(0,0,0,.04) 0 calc(1.0625rem*var(--mantine-scale)) calc(1.0625rem*var(--mantine-scale)) calc(-.4375rem*var(--mantine-scale));--mantine-radius-xs:calc(.125rem*var(--mantine-scale));--mantine-radius-sm:calc(.25rem*var(--mantine-scale));--mantine-radius-md:calc(.5rem*var(--mantine-scale));--mantine-radius-lg:calc(1rem*var(--mantine-scale));--mantine-radius-xl:calc(2rem*var(--mantine-scale));--mantine-color-dark-0:#c9c9c9;--mantine-color-dark-1:#b8b8b8;--mantine-color-dark-2:#828282;--mantine-color-dark-3:#696969;--mantine-color-dark-4:#4a4a4a;--mantine-color-dark-5:#404040;--mantine-color-dark-6:#383838;--mantine-color-dark-7:#2e2e2e;--mantine-color-dark-8:#242424;--mantine-color-dark-9:#212121;--mantine-color-gray-0:#f8f9fa;--mantine-color-gray-1:#f1f3f5;--mantine-color-gray-2:#e9ecef;--mantine-color-gray-3:#dee2e6;--mantine-color-gray-4:#ced4da;--mantine-color-gray-5:#adb5bd;--mantine-color-gray-6:#868e96;--mantine-color-gray-7:#495057;--mantine-color-gray-8:#343a40;--mantine-color-gray-9:#212529;--mantine-color-red-0:#fff5f5;--mantine-color-red-1:#ffe3e3;--mantine-color-red-2:#ffc9c9;--mantine-color-red-3:#ffa8a8;--mantine-color-red-4:#ff8787;--mantine-color-red-5:#ff6b6b;--mantine-color-red-6:#fa5252;--mantine-color-red-7:#f03e3e;--mantine-color-red-8:#e03131;--mantine-color-red-9:#c92a2a;--mantine-color-pink-0:#fff0f6;--mantine-color-pink-1:#ffdeeb;--mantine-color-pink-2:#fcc2d7;--mantine-color-pink-3:#faa2c1;--mantine-color-pink-4:#f783ac;--mantine-color-pink-5:#f06595;--mantine-color-pink-6:#e64980;--mantine-color-pink-7:#d6336c;--mantine-color-pink-8:#c2255c;--mantine-color-pink-9:#a61e4d;--mantine-color-grape-0:#f8f0fc;--mantine-color-grape-1:#f3d9fa;--mantine-color-grape-2:#eebefa;--mantine-color-grape-3:#e599f7;--mantine-color-grape-4:#da77f2;--mantine-color-grape-5:#cc5de8;--mantine-color-grape-6:#be4bdb;--mantine-color-grape-7:#ae3ec9;--mantine-color-grape-8:#9c36b5;--mantine-color-grape-9:#862e9c;--mantine-color-violet-0:#f3f0ff;--mantine-color-violet-1:#e5dbff;--mantine-color-violet-2:#d0bfff;--mantine-color-violet-3:#b197fc;--mantine-color-violet-4:#9775fa;--mantine-color-violet-5:#845ef7;--mantine-color-violet-6:#7950f2;--mantine-color-violet-7:#7048e8;--mantine-color-violet-8:#6741d9;--mantine-color-violet-9:#5f3dc4;--mantine-color-indigo-0:#edf2ff;--mantine-color-indigo-1:#dbe4ff;--mantine-color-indigo-2:#bac8ff;--mantine-color-indigo-3:#91a7ff;--mantine-color-indigo-4:#748ffc;--mantine-color-indigo-5:#5c7cfa;--mantine-color-indigo-6:#4c6ef5;--mantine-color-indigo-7:#4263eb;--mantine-color-indigo-8:#3b5bdb;--mantine-color-indigo-9:#364fc7;--mantine-color-blue-0:#e7f5ff;--mantine-color-blue-1:#d0ebff;--mantine-color-blue-2:#a5d8ff;--mantine-color-blue-3:#74c0fc;--mantine-color-blue-4:#4dabf7;--mantine-color-blue-5:#339af0;--mantine-color-blue-6:#228be6;--mantine-color-blue-7:#1c7ed6;--mantine-color-blue-8:#1971c2;--mantine-color-blue-9:#1864ab;--mantine-color-cyan-0:#e3fafc;--mantine-color-cyan-1:#c5f6fa;--mantine-color-cyan-2:#99e9f2;--mantine-color-cyan-3:#66d9e8;--mantine-color-cyan-4:#3bc9db;--mantine-color-cyan-5:#22b8cf;--mantine-color-cyan-6:#15aabf;--mantine-color-cyan-7:#1098ad;--mantine-color-cyan-8:#0c8599;--mantine-color-cyan-9:#0b7285;--mantine-color-teal-0:#e6fcf5;--mantine-color-teal-1:#c3fae8;--mantine-color-teal-2:#96f2d7;--mantine-color-teal-3:#63e6be;--mantine-color-teal-4:#38d9a9;--mantine-color-teal-5:#20c997;--mantine-color-teal-6:#12b886;--mantine-color-teal-7:#0ca678;--mantine-color-teal-8:#099268;--mantine-color-teal-9:#087f5b;--mantine-color-green-0:#ebfbee;--mantine-color-green-1:#d3f9d8;--mantine-color-green-2:#b2f2bb;--mantine-color-green-3:#8ce99a;--mantine-color-green-4:#69db7c;--mantine-color-green-5:#51cf66;--mantine-color-green-6:#40c057;--mantine-color-green-7:#37b24d;--mantine-color-green-8:#2f9e44;--mantine-color-green-9:#2b8a3e;--mantine-color-lime-0:#f4fce3;--mantine-color-lime-1:#e9fac8;--mantine-color-lime-2:#d8f5a2;--mantine-color-lime-3:#c0eb75;--mantine-color-lime-4:#a9e34b;--mantine-color-lime-5:#94d82d;--mantine-color-lime-6:#82c91e;--mantine-color-lime-7:#74b816;--mantine-color-lime-8:#66a80f;--mantine-color-lime-9:#5c940d;--mantine-color-yellow-0:#fff9db;--mantine-color-yellow-1:#fff3bf;--mantine-color-yellow-2:#ffec99;--mantine-color-yellow-3:#ffe066;--mantine-color-yellow-4:#ffd43b;--mantine-color-yellow-5:#fcc419;--mantine-color-yellow-6:#fab005;--mantine-color-yellow-7:#f59f00;--mantine-color-yellow-8:#f08c00;--mantine-color-yellow-9:#e67700;--mantine-color-orange-0:#fff4e6;--mantine-color-orange-1:#ffe8cc;--mantine-color-orange-2:#ffd8a8;--mantine-color-orange-3:#ffc078;--mantine-color-orange-4:#ffa94d;--mantine-color-orange-5:#ff922b;--mantine-color-orange-6:#fd7e14;--mantine-color-orange-7:#f76707;--mantine-color-orange-8:#e8590c;--mantine-color-orange-9:#d9480f;--mantine-h1-font-size:calc(2.125rem*var(--mantine-scale));--mantine-h1-line-height:1.3;--mantine-h1-font-weight:700;--mantine-h2-font-size:calc(1.625rem*var(--mantine-scale));--mantine-h2-line-height:1.35;--mantine-h2-font-weight:700;--mantine-h3-font-size:calc(1.375rem*var(--mantine-scale));--mantine-h3-line-height:1.4;--mantine-h3-font-weight:700;--mantine-h4-font-size:calc(1.125rem*var(--mantine-scale));--mantine-h4-line-height:1.45;--mantine-h4-font-weight:700;--mantine-h5-font-size:calc(1rem*var(--mantine-scale));--mantine-h5-line-height:1.5;--mantine-h5-font-weight:700;--mantine-h6-font-size:calc(.875rem*var(--mantine-scale));--mantine-h6-line-height:1.5;--mantine-h6-font-weight:700;color-scheme:var(--mantine-color-scheme)}:root[data-mantine-color-scheme=dark]{--mantine-color-scheme:dark;--mantine-color-bright:var(--mantine-color-white);--mantine-color-text:var(--mantine-color-dark-0);--mantine-color-body:var(--mantine-color-dark-7);--mantine-color-error:var(--mantine-color-red-8);--mantine-color-placeholder:var(--mantine-color-dark-3);--mantine-color-anchor:var(--mantine-color-blue-4);--mantine-color-default:var(--mantine-color-dark-6);--mantine-color-default-hover:var(--mantine-color-dark-5);--mantine-color-default-color:var(--mantine-color-white);--mantine-color-default-border:var(--mantine-color-dark-4);--mantine-color-dimmed:var(--mantine-color-dark-2);--mantine-color-dark-text:var(--mantine-color-dark-4);--mantine-color-dark-filled:var(--mantine-color-dark-8);--mantine-color-dark-filled-hover:var(--mantine-color-dark-7);--mantine-color-dark-light:rgba(36,36,36,.15);--mantine-color-dark-light-hover:rgba(36,36,36,.2);--mantine-color-dark-light-color:#656b73;--mantine-color-dark-outline:var(--mantine-color-dark-4);--mantine-color-dark-outline-hover:rgba(36,36,36,.05);--mantine-color-gray-text:var(--mantine-color-gray-4);--mantine-color-gray-filled:#343a40;--mantine-color-gray-filled-hover:#212529;--mantine-color-gray-light:hsla(210,7%,56%,.15);--mantine-color-gray-light-hover:hsla(210,7%,56%,.2);--mantine-color-gray-light-color:#dee2e6;--mantine-color-gray-outline:#ced4da;--mantine-color-gray-outline-hover:rgba(206,212,218,.05);--mantine-color-red-text:var(--mantine-color-red-4);--mantine-color-red-filled:#e03131;--mantine-color-red-filled-hover:#c92a2a;--mantine-color-red-light:rgba(250,82,82,.15);--mantine-color-red-light-hover:rgba(250,82,82,.2);--mantine-color-red-light-color:#ffa8a8;--mantine-color-red-outline:#ff8787;--mantine-color-red-outline-hover:hsla(0,100%,76%,.05);--mantine-color-pink-text:var(--mantine-color-pink-4);--mantine-color-pink-filled:#c2255c;--mantine-color-pink-filled-hover:#a61e4d;--mantine-color-pink-light:rgba(230,73,128,.15);--mantine-color-pink-light-hover:rgba(230,73,128,.2);--mantine-color-pink-light-color:#faa2c1;--mantine-color-pink-outline:#f783ac;--mantine-color-pink-outline-hover:rgba(247,131,172,.05);--mantine-color-grape-text:var(--mantine-color-grape-4);--mantine-color-grape-filled:#9c36b5;--mantine-color-grape-filled-hover:#862e9c;--mantine-color-grape-light:rgba(190,75,219,.15);--mantine-color-grape-light-hover:rgba(190,75,219,.2);--mantine-color-grape-light-color:#e599f7;--mantine-color-grape-outline:#da77f2;--mantine-color-grape-outline-hover:rgba(218,119,242,.05);--mantine-color-violet-text:var(--mantine-color-violet-4);--mantine-color-violet-filled:#6741d9;--mantine-color-violet-filled-hover:#5f3dc4;--mantine-color-violet-light:rgba(121,80,242,.15);--mantine-color-violet-light-hover:rgba(121,80,242,.2);--mantine-color-violet-light-color:#b197fc;--mantine-color-violet-outline:#9775fa;--mantine-color-violet-outline-hover:rgba(151,117,250,.05);--mantine-color-indigo-text:var(--mantine-color-indigo-4);--mantine-color-indigo-filled:#3b5bdb;--mantine-color-indigo-filled-hover:#364fc7;--mantine-color-indigo-light:rgba(76,110,245,.15);--mantine-color-indigo-light-hover:rgba(76,110,245,.2);--mantine-color-indigo-light-color:#91a7ff;--mantine-color-indigo-outline:#748ffc;--mantine-color-indigo-outline-hover:rgba(116,143,252,.05);--mantine-color-blue-text:var(--mantine-color-blue-4);--mantine-color-blue-filled:#1971c2;--mantine-color-blue-filled-hover:#1864ab;--mantine-color-blue-light:rgba(34,139,230,.15);--mantine-color-blue-light-hover:rgba(34,139,230,.2);--mantine-color-blue-light-color:#74c0fc;--mantine-color-blue-outline:#4dabf7;--mantine-color-blue-outline-hover:rgba(77,171,247,.05);--mantine-color-cyan-text:var(--mantine-color-cyan-4);--mantine-color-cyan-filled:#0c8599;--mantine-color-cyan-filled-hover:#0b7285;--mantine-color-cyan-light:rgba(21,170,191,.15);--mantine-color-cyan-light-hover:rgba(21,170,191,.2);--mantine-color-cyan-light-color:#66d9e8;--mantine-color-cyan-outline:#3bc9db;--mantine-color-cyan-outline-hover:rgba(59,201,219,.05);--mantine-color-teal-text:var(--mantine-color-teal-4);--mantine-color-teal-filled:#099268;--mantine-color-teal-filled-hover:#087f5b;--mantine-color-teal-light:rgba(18,184,134,.15);--mantine-color-teal-light-hover:rgba(18,184,134,.2);--mantine-color-teal-light-color:#63e6be;--mantine-color-teal-outline:#38d9a9;--mantine-color-teal-outline-hover:rgba(56,217,169,.05);--mantine-color-green-text:var(--mantine-color-green-4);--mantine-color-green-filled:#2f9e44;--mantine-color-green-filled-hover:#2b8a3e;--mantine-color-green-light:rgba(64,192,87,.15);--mantine-color-green-light-hover:rgba(64,192,87,.2);--mantine-color-green-light-color:#8ce99a;--mantine-color-green-outline:#69db7c;--mantine-color-green-outline-hover:rgba(105,219,124,.05);--mantine-color-lime-text:var(--mantine-color-lime-4);--mantine-color-lime-filled:#66a80f;--mantine-color-lime-filled-hover:#5c940d;--mantine-color-lime-light:rgba(130,201,30,.15);--mantine-color-lime-light-hover:rgba(130,201,30,.2);--mantine-color-lime-light-color:#c0eb75;--mantine-color-lime-outline:#a9e34b;--mantine-color-lime-outline-hover:rgba(169,227,75,.05);--mantine-color-yellow-text:var(--mantine-color-yellow-4);--mantine-color-yellow-filled:#f08c00;--mantine-color-yellow-filled-hover:#e67700;--mantine-color-yellow-light:rgba(250,176,5,.15);--mantine-color-yellow-light-hover:rgba(250,176,5,.2);--mantine-color-yellow-light-color:#ffe066;--mantine-color-yellow-outline:#ffd43b;--mantine-color-yellow-outline-hover:rgba(255,212,59,.05);--mantine-color-orange-text:var(--mantine-color-orange-4);--mantine-color-orange-filled:#e8590c;--mantine-color-orange-filled-hover:#d9480f;--mantine-color-orange-light:rgba(253,126,20,.15);--mantine-color-orange-light-hover:rgba(253,126,20,.2);--mantine-color-orange-light-color:#ffc078;--mantine-color-orange-outline:#ffa94d;--mantine-color-orange-outline-hover:rgba(255,169,77,.05)}:root[data-mantine-color-scheme=light]{--mantine-color-scheme:light;--mantine-color-bright:var(--mantine-color-black);--mantine-color-text:#000;--mantine-color-body:#fff;--mantine-color-error:var(--mantine-color-red-6);--mantine-color-placeholder:var(--mantine-color-gray-5);--mantine-color-anchor:var(--mantine-primary-color-filled);--mantine-color-default:var(--mantine-color-white);--mantine-color-default-hover:var(--mantine-color-gray-0);--mantine-color-default-color:var(--mantine-color-gray-9);--mantine-color-default-border:var(--mantine-color-gray-4);--mantine-color-dimmed:var(--mantine-color-gray-6);--mantine-color-dark-text:var(--mantine-color-dark-filled);--mantine-color-dark-filled:var(--mantine-color-dark-6);--mantine-color-dark-filled-hover:var(--mantine-color-dark-7);--mantine-color-dark-light:rgba(56,56,56,.1);--mantine-color-dark-light-hover:rgba(56,56,56,.12);--mantine-color-dark-light-color:var(--mantine-color-dark-6);--mantine-color-dark-outline:var(--mantine-color-dark-6);--mantine-color-dark-outline-hover:rgba(56,56,56,.05);--mantine-color-gray-text:var(--mantine-color-gray-filled);--mantine-color-gray-filled:#868e96;--mantine-color-gray-filled-hover:#495057;--mantine-color-gray-light:hsla(210,7%,56%,.1);--mantine-color-gray-light-hover:hsla(210,7%,56%,.12);--mantine-color-gray-light-color:#868e96;--mantine-color-gray-outline:#868e96;--mantine-color-gray-outline-hover:hsla(210,7%,56%,.05);--mantine-color-red-text:var(--mantine-color-red-filled);--mantine-color-red-filled:#fa5252;--mantine-color-red-filled-hover:#f03e3e;--mantine-color-red-light:rgba(250,82,82,.1);--mantine-color-red-light-hover:rgba(250,82,82,.12);--mantine-color-red-light-color:#fa5252;--mantine-color-red-outline:#fa5252;--mantine-color-red-outline-hover:rgba(250,82,82,.05);--mantine-color-pink-text:var(--mantine-color-pink-filled);--mantine-color-pink-filled:#e64980;--mantine-color-pink-filled-hover:#d6336c;--mantine-color-pink-light:rgba(230,73,128,.1);--mantine-color-pink-light-hover:rgba(230,73,128,.12);--mantine-color-pink-light-color:#e64980;--mantine-color-pink-outline:#e64980;--mantine-color-pink-outline-hover:rgba(230,73,128,.05);--mantine-color-grape-text:var(--mantine-color-grape-filled);--mantine-color-grape-filled:#be4bdb;--mantine-color-grape-filled-hover:#ae3ec9;--mantine-color-grape-light:rgba(190,75,219,.1);--mantine-color-grape-light-hover:rgba(190,75,219,.12);--mantine-color-grape-light-color:#be4bdb;--mantine-color-grape-outline:#be4bdb;--mantine-color-grape-outline-hover:rgba(190,75,219,.05);--mantine-color-violet-text:var(--mantine-color-violet-filled);--mantine-color-violet-filled:#7950f2;--mantine-color-violet-filled-hover:#7048e8;--mantine-color-violet-light:rgba(121,80,242,.1);--mantine-color-violet-light-hover:rgba(121,80,242,.12);--mantine-color-violet-light-color:#7950f2;--mantine-color-violet-outline:#7950f2;--mantine-color-violet-outline-hover:rgba(121,80,242,.05);--mantine-color-indigo-text:var(--mantine-color-indigo-filled);--mantine-color-indigo-filled:#4c6ef5;--mantine-color-indigo-filled-hover:#4263eb;--mantine-color-indigo-light:rgba(76,110,245,.1);--mantine-color-indigo-light-hover:rgba(76,110,245,.12);--mantine-color-indigo-light-color:#4c6ef5;--mantine-color-indigo-outline:#4c6ef5;--mantine-color-indigo-outline-hover:rgba(76,110,245,.05);--mantine-color-blue-text:var(--mantine-color-blue-filled);--mantine-color-blue-filled:#228be6;--mantine-color-blue-filled-hover:#1c7ed6;--mantine-color-blue-light:rgba(34,139,230,.1);--mantine-color-blue-light-hover:rgba(34,139,230,.12);--mantine-color-blue-light-color:#228be6;--mantine-color-blue-outline:#228be6;--mantine-color-blue-outline-hover:rgba(34,139,230,.05);--mantine-color-cyan-text:var(--mantine-color-cyan-filled);--mantine-color-cyan-filled:#15aabf;--mantine-color-cyan-filled-hover:#1098ad;--mantine-color-cyan-light:rgba(21,170,191,.1);--mantine-color-cyan-light-hover:rgba(21,170,191,.12);--mantine-color-cyan-light-color:#15aabf;--mantine-color-cyan-outline:#15aabf;--mantine-color-cyan-outline-hover:rgba(21,170,191,.05);--mantine-color-teal-text:var(--mantine-color-teal-filled);--mantine-color-teal-filled:#12b886;--mantine-color-teal-filled-hover:#0ca678;--mantine-color-teal-light:rgba(18,184,134,.1);--mantine-color-teal-light-hover:rgba(18,184,134,.12);--mantine-color-teal-light-color:#12b886;--mantine-color-teal-outline:#12b886;--mantine-color-teal-outline-hover:rgba(18,184,134,.05);--mantine-color-green-text:var(--mantine-color-green-filled);--mantine-color-green-filled:#40c057;--mantine-color-green-filled-hover:#37b24d;--mantine-color-green-light:rgba(64,192,87,.1);--mantine-color-green-light-hover:rgba(64,192,87,.12);--mantine-color-green-light-color:#40c057;--mantine-color-green-outline:#40c057;--mantine-color-green-outline-hover:rgba(64,192,87,.05);--mantine-color-lime-text:var(--mantine-color-lime-filled);--mantine-color-lime-filled:#82c91e;--mantine-color-lime-filled-hover:#74b816;--mantine-color-lime-light:rgba(130,201,30,.1);--mantine-color-lime-light-hover:rgba(130,201,30,.12);--mantine-color-lime-light-color:#82c91e;--mantine-color-lime-outline:#82c91e;--mantine-color-lime-outline-hover:rgba(130,201,30,.05);--mantine-color-yellow-text:var(--mantine-color-yellow-filled);--mantine-color-yellow-filled:#fab005;--mantine-color-yellow-filled-hover:#f59f00;--mantine-color-yellow-light:rgba(250,176,5,.1);--mantine-color-yellow-light-hover:rgba(250,176,5,.12);--mantine-color-yellow-light-color:#fab005;--mantine-color-yellow-outline:#fab005;--mantine-color-yellow-outline-hover:rgba(250,176,5,.05);--mantine-color-orange-text:var(--mantine-color-orange-filled);--mantine-color-orange-filled:#fd7e14;--mantine-color-orange-filled-hover:#f76707;--mantine-color-orange-light:rgba(253,126,20,.1);--mantine-color-orange-light-hover:rgba(253,126,20,.12);--mantine-color-orange-light-color:#fd7e14;--mantine-color-orange-outline:#fd7e14;--mantine-color-orange-outline-hover:rgba(253,126,20,.05)}.m-d57069b5{--scrollarea-scrollbar-size:calc(.75rem*var(--mantine-scale));overflow:hidden;position:relative}.m-c0783ff9{-ms-overflow-style:none;-webkit-overflow-scrolling:touch;height:100%;padding-bottom:var(--_viewport-padding-bottom,0);padding-left:var(--_viewport-padding-left,0);padding-right:var(--_viewport-padding-right,0);scrollbar-width:none;width:100%}.m-c0783ff9::-webkit-scrollbar{display:none}.m-c0783ff9[data-offset-scrollbars=xy],.m-c0783ff9[data-offset-scrollbars=y]{--_viewport-padding-right:var(--scrollarea-scrollbar-size);--_viewport-padding-left:unset}[dir=rtl] .m-c0783ff9[data-offset-scrollbars=xy],[dir=rtl] .m-c0783ff9[data-offset-scrollbars=y]{--_viewport-padding-right:unset;--_viewport-padding-left:var(--scrollarea-scrollbar-size)}.m-c0783ff9[data-offset-scrollbars=x],.m-c0783ff9[data-offset-scrollbars=xy]{--_viewport-padding-bottom:var(--scrollarea-scrollbar-size)}.m-f8f631dd{display:table;min-width:100%}.m-c44ba933{background-color:var(--_scrollbar-bg,transparent);box-sizing:border-box;display:var(--_scrollbar-display,flex);flex-direction:var(--_scrollbar-direction,row);height:var(--_scrollbar-height);padding:calc(var(--scrollarea-scrollbar-size)/5);touch-action:none;transition:background-color .15s ease,opacity .15s ease;-webkit-user-select:none;user-select:none;width:var(--_scrollbar-width)}.m-c44ba933>.m-d8b5e363{background-color:var(--_thumb-bg)}@media (hover:hover){[data-mantine-color-scheme=light] .m-c44ba933:hover{--_scrollbar-bg:var(--mantine-color-gray-0);--_thumb-bg:rgba(0,0,0,.5)}[data-mantine-color-scheme=dark] .m-c44ba933:hover{--_scrollbar-bg:var(--mantine-color-dark-8);--_thumb-bg:hsla(0,0%,100%,.5)}}@media (hover:none){[data-mantine-color-scheme=light] .m-c44ba933:active{--_scrollbar-bg:var(--mantine-color-gray-0);--_thumb-bg:rgba(0,0,0,.5)}[data-mantine-color-scheme=dark] .m-c44ba933:active{--_scrollbar-bg:var(--mantine-color-dark-8);--_thumb-bg:hsla(0,0%,100%,.5)}}.m-c44ba933[data-hidden],.m-c44ba933[data-state=hidden]{--_scrollbar-display:none}.m-c44ba933[data-orientation=vertical]{--_scrollbar-width:var(--scrollarea-scrollbar-size);bottom:var(--sa-corner-width);right:0;top:0}[dir=rtl] .m-c44ba933[data-orientation=vertical]{left:0;right:unset}.m-c44ba933[data-orientation=horizontal]{--_scrollbar-height:var(--scrollarea-scrollbar-size);--_scrollbar-direction:column;bottom:0;left:0;right:var(--sa-corner-height)}[dir=rtl] .m-c44ba933[data-orientation=horizontal]{left:var(--sa-corner-height);right:0}.m-d8b5e363{background-color:var(--_thumb-bg);border-radius:var(--scrollarea-scrollbar-size);flex:1;overflow:hidden;position:relative;transition:background-color .15s ease}.m-d8b5e363:before{content:'""';height:100%;left:50%;min-height:calc(2.75rem*var(--mantine-scale));min-width:calc(2.75rem*var(--mantine-scale));position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}[data-mantine-color-scheme=light] .m-d8b5e363{--_thumb-bg:rgba(0,0,0,.4)}[data-mantine-color-scheme=dark] .m-d8b5e363{--_thumb-bg:hsla(0,0%,100%,.4)}.m-21657268{background-color:var(--_corner-bg);bottom:0;display:var(--_corner-display,block);opacity:var(--_corner-opacity,0);position:absolute;right:0;transition:opacity .15s ease}[dir=rtl] .m-21657268{bottom:0;left:0;right:unset}[data-mantine-color-scheme=light] .m-21657268{--_corner-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-21657268{--_corner-bg:var(--mantine-color-dark-8)}.m-21657268[data-hovered]{--_corner-opacity:1}.m-21657268[data-hidden]{--_corner-display:none}.m-87cf2631{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;color:inherit;cursor:pointer;font-size:var(--mantine-font-size-md);padding:0;text-align:left;text-decoration:none;touch-action:manipulation}[dir=rtl] .m-87cf2631{text-align:right}.m-515a97f8{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.m-1b7284a3{-webkit-tap-highlight-color:transparent;background-color:var(--mantine-color-body);border:var(--_paper-border,none);border-radius:var(--paper-radius,var(--mantine-radius-default));box-shadow:var(--paper-shadow,none);display:block;outline:0;text-decoration:none;touch-action:manipulation}[data-mantine-color-scheme=light] .m-1b7284a3[data-with-border]{--_paper-border:calc(.0625rem*var(--mantine-scale)) solid var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-1b7284a3[data-with-border]{--_paper-border:calc(.0625rem*var(--mantine-scale)) solid var(--mantine-color-dark-4)}.m-1b7284a3:not([data-with-border]){--_paper-border:none!important}.m-38a85659{background-color:var(--_popover-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_popover-bd);border-radius:var(--popover-radius,var(--mantine-radius-default));box-shadow:var(--popover-shadow,none);padding:var(--mantine-spacing-sm) var(--mantine-spacing-md);position:absolute}.m-38a85659:focus{outline:none}[data-mantine-color-scheme=light] .m-38a85659{--_popover-bg:var(--mantine-color-white);--_popover-bd:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-38a85659{--_popover-bg:var(--mantine-color-dark-6);--_popover-bd:var(--mantine-color-dark-4)}.m-a31dc6c1{background-color:inherit;border:calc(.0625rem*var(--mantine-scale)) solid var(--_popover-bd);z-index:1}.m-5ae2e3c{--loader-size-xs:calc(1.125rem*var(--mantine-scale));--loader-size-sm:calc(1.375rem*var(--mantine-scale));--loader-size-md:calc(2.25rem*var(--mantine-scale));--loader-size-lg:calc(2.75rem*var(--mantine-scale));--loader-size-xl:calc(3.625rem*var(--mantine-scale));--loader-size:var(--loader-size-md);--loader-color:var(--mantine-primary-color-filled)}@keyframes m-5d2b3b9d{0%{opacity:0;transform:scale(.6)}50%,to{transform:scale(1)}}.m-7a2bd4cd{display:flex;gap:calc(var(--loader-size)/5);height:var(--loader-size);position:relative;width:var(--loader-size)}.m-870bb79{animation:m-5d2b3b9d 1.2s cubic-bezier(0,.5,.5,1) infinite;background:var(--loader-color);border-radius:calc(.125rem*var(--mantine-scale));flex:1}.m-870bb79:first-of-type{animation-delay:-.24s}.m-870bb79:nth-of-type(2){animation-delay:-.12s}.m-870bb79:nth-of-type(3){animation-delay:0}@keyframes m-aac34a1{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.6)}}.m-4e3f22d7{align-items:center;display:flex;gap:calc(var(--loader-size)/10);height:var(--loader-size);justify-content:center;position:relative;width:var(--loader-size)}.m-870c4af{animation:m-aac34a1 .8s linear infinite;background:var(--loader-color);border-radius:50%;height:calc(var(--loader-size)/3 - var(--loader-size)/15);width:calc(var(--loader-size)/3 - var(--loader-size)/15)}.m-870c4af:nth-child(2){animation-delay:.4s}@keyframes m-f8e89c4b{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.m-b34414df{display:inline-block}.m-b34414df,.m-b34414df:after{height:var(--loader-size);width:var(--loader-size)}.m-b34414df:after{animation:m-f8e89c4b 1.2s linear infinite;border-color:var(--loader-color) var(--loader-color) var(--loader-color) transparent;border-radius:calc(625rem*var(--mantine-scale));border-style:solid;border-width:calc(var(--loader-size)/8);content:"";display:block}.m-8d3f4000{--ai-size-xs:calc(1.125rem*var(--mantine-scale));--ai-size-sm:calc(1.375rem*var(--mantine-scale));--ai-size-md:calc(1.75rem*var(--mantine-scale));--ai-size-lg:calc(2.125rem*var(--mantine-scale));--ai-size-xl:calc(2.75rem*var(--mantine-scale));--ai-size-input-xs:calc(1.875rem*var(--mantine-scale));--ai-size-input-sm:calc(2.25rem*var(--mantine-scale));--ai-size-input-md:calc(2.625rem*var(--mantine-scale));--ai-size-input-lg:calc(3.125rem*var(--mantine-scale));--ai-size-input-xl:calc(3.75rem*var(--mantine-scale));--ai-size:var(--ai-size-md);--ai-color:var(--mantine-color-white);align-items:center;background:var(--_ai-bg,var(--ai-bg,var(--mantine-primary-color-filled)));border:var(--ai-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--ai-radius,var(--mantine-radius-default));color:var(--_ai-color,var(--ai-color,var(--mantine-color-white)));cursor:var(--_ai-cursor,pointer);display:inline-flex;height:var(--ai-size);justify-content:center;line-height:1;min-height:var(--ai-size);min-width:var(--ai-size);position:relative;-webkit-user-select:none;user-select:none;width:var(--ai-size)}@media (hover:hover){.m-8d3f4000:hover:not([data-loading]):not(:disabled):not([data-disabled]){--_ai-bg:var(--ai-hover,var(--mantine-primary-color-filled-hover));--_ai-color:var(--ai-hover-color)}}@media (hover:none){.m-8d3f4000:active:not([data-loading]):not(:disabled):not([data-disabled]){--_ai-bg:var(--ai-hover,var(--mantine-primary-color-filled-hover));--_ai-color:var(--ai-hover-color)}}[data-mantine-color-scheme=light] .m-8d3f4000{--_ai-loading-overlay-bg:hsla(0,0%,100%,.35);--_ai-disabled-bg:var(--mantine-color-gray-1);--_ai-disabled-color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-8d3f4000{--_ai-loading-overlay-bg:rgba(0,0,0,.35);--_ai-disabled-bg:var(--mantine-color-dark-6);--_ai-disabled-color:var(--mantine-color-dark-3)}.m-8d3f4000[data-loading]{--_ai-cursor:not-allowed}.m-8d3f4000[data-loading]:before{background-color:var(--_ai-loading-overlay-bg);border-radius:var(--ai-radius,var(--mantine-radius-default));content:"";inset:calc(-.0625rem*var(--mantine-scale));position:absolute}.m-8d3f4000:disabled:not([data-loading]),.m-8d3f4000[data-disabled]:not([data-loading]){--_ai-cursor:not-allowed;--_ai-bg:var(--_ai-disabled-bg);--_ai-color:var(--_ai-disabled-color);--ai-bd:calc(.0625rem*var(--mantine-scale)) solid transparent!important}.m-8d3f4000:disabled:not([data-loading]):active,.m-8d3f4000[data-disabled]:not([data-loading]):active{transform:none}.m-302b9fb1{z-index:1}.m-1a0f1b21{--ai-border-width:calc(.0625rem*var(--mantine-scale));display:flex}.m-1a0f1b21[data-orientation=horizontal]{flex-direction:row}.m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):first-child{border-bottom-right-radius:0;border-right-width:calc(var(--ai-border-width)/2);border-top-right-radius:0}.m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):last-child{border-bottom-left-radius:0;border-left-width:calc(var(--ai-border-width)/2);border-top-left-radius:0}.m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):not(:first-child):not(:last-child){border-left-width:calc(var(--ai-border-width)/2);border-radius:0;border-right-width:calc(var(--ai-border-width)/2)}[dir=rtl] .m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):first-child{border:var(--ai-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--ai-radius,var(--mantine-radius-default));border-bottom-left-radius:0;border-left-width:calc(var(--ai-border-width)/2);border-top-left-radius:0}[dir=rtl] .m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):last-child{border:var(--ai-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--ai-radius,var(--mantine-radius-default));border-bottom-right-radius:0;border-right-width:calc(var(--ai-border-width)/2);border-top-right-radius:0}.m-1a0f1b21[data-orientation=vertical]{flex-direction:column}.m-1a0f1b21[data-orientation=vertical] .m-8d3f4000:not(:only-child):first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:calc(var(--ai-border-width)/2)}.m-1a0f1b21[data-orientation=vertical] .m-8d3f4000:not(:only-child):last-child{border-top-left-radius:0;border-top-right-radius:0;border-top-width:calc(var(--ai-border-width)/2)}.m-1a0f1b21[data-orientation=vertical] .m-8d3f4000:not(:only-child):not(:first-child):not(:last-child){border-bottom-width:calc(var(--ai-border-width)/2);border-radius:0;border-top-width:calc(var(--ai-border-width)/2)}.m-86a44da5{--cb-size-xs:calc(1.125rem*var(--mantine-scale));--cb-size-sm:calc(1.375rem*var(--mantine-scale));--cb-size-md:calc(1.75rem*var(--mantine-scale));--cb-size-lg:calc(2.125rem*var(--mantine-scale));--cb-size-xl:calc(2.75rem*var(--mantine-scale));--cb-size:var(--cb-size-md);--cb-icon-size:70%;align-items:center;border-radius:var(--cb-radius,var(--mantine-radius-default));color:var(--_cb-color);display:inline-flex;height:var(--cb-size);justify-content:center;line-height:1;min-height:var(--cb-size);min-width:var(--cb-size);position:relative;-webkit-user-select:none;user-select:none;width:var(--cb-size)}[data-mantine-color-scheme=light] .m-86a44da5{--_cb-color:var(--mantine-color-gray-7)}[data-mantine-color-scheme=dark] .m-86a44da5{--_cb-color:var(--mantine-color-dark-1)}.m-220c80f2{background-color:var(--_cb-bg)}@media (hover:hover){[data-mantine-color-scheme=light] .m-220c80f2:hover{--_cb-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-220c80f2:hover{--_cb-bg:var(--mantine-color-dark-6)}}@media (hover:none){[data-mantine-color-scheme=light] .m-220c80f2:active{--_cb-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-220c80f2:active{--_cb-bg:var(--mantine-color-dark-6)}}.m-4081bf90{align-items:var(--group-align,center);display:flex;flex-direction:row;flex-wrap:var(--group-wrap,wrap);gap:var(--group-gap,var(--mantine-spacing-md));justify-content:var(--group-justify,flex-start)}.m-4081bf90[data-grow]>*{flex-grow:1;max-width:var(--group-child-width)}.m-9814e45f{backdrop-filter:var(--overlay-filter);-webkit-backdrop-filter:var(--overlay-filter);background:var(--overlay-bg,rgba(0,0,0,.6));border-radius:var(--overlay-radius,0);top:0;right:0;bottom:0;left:0;position:var(--_overlay-position,absolute);z-index:var(--overlay-z-index)}.m-9814e45f[data-fixed]{--_overlay-position:fixed}.m-9814e45f[data-center]{align-items:center;display:flex;justify-content:center}.m-615af6c9{font-size:var(--mantine-font-size-md);font-weight:400;line-height:1;margin:0;padding:0}.m-b5489c3c{align-items:center;background-color:var(--mantine-color-body);display:flex;justify-content:space-between;padding:var(--mb-padding,var(--mantine-spacing-md));padding-left:var(--_pl,var(--mb-padding,var(--mantine-spacing-md)));padding-right:var(--_pr,calc(var(--mb-padding, var(--mantine-spacing-md)) - .3125rem*var(--mantine-scale)));position:sticky;top:0;z-index:1000}[dir=rtl] .m-b5489c3c{--_pr:var(--mb-padding,var(--mantine-spacing-md));--_pl:calc(var(--mb-padding, var(--mantine-spacing-md)) - .3125rem*var(--mantine-scale))}.m-60c222c7{bottom:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--mb-z-index)}.m-fd1ab0aa{box-shadow:var(--mb-shadow,var(--mantine-shadow-xl));pointer-events:all}.m-606cb269{margin-left:var(--_close-ml,auto);margin-right:var(--_close-mr,0)}[dir=rtl] .m-606cb269{--_close-ml:0;--_close-mr:auto}.m-5df29311{padding:var(--mb-padding,var(--mantine-spacing-md));padding-top:var(--_pt,var(--mb-padding,var(--mantine-spacing-md)))}.m-5df29311:not(:only-child){--_pt:0}.m-6c018570{--input-height-xs:calc(1.875rem*var(--mantine-scale));--input-height-sm:calc(2.25rem*var(--mantine-scale));--input-height-md:calc(2.625rem*var(--mantine-scale));--input-height-lg:calc(3.125rem*var(--mantine-scale));--input-height-xl:calc(3.75rem*var(--mantine-scale));--input-padding-y-xs:calc(.3125rem*var(--mantine-scale));--input-padding-y-sm:calc(.375rem*var(--mantine-scale));--input-padding-y-md:calc(.5rem*var(--mantine-scale));--input-padding-y-lg:calc(.625rem*var(--mantine-scale));--input-padding-y-xl:calc(.8125rem*var(--mantine-scale));--_input-height:var(--input-height,var(--input-height-sm));--_input-radius:var(--input-radius,var(--mantine-radius-default));--_input-cursor:text;--_input-text-align:left;--_input-line-height:calc(var(--_input-height) - .125rem*var(--mantine-scale));--_input-padding:calc(var(--_input-height)/3);--_input-padding-left:var(--_input-padding);--_input-padding-right:var(--_input-padding);--_input-placeholder-color:var(--mantine-color-placeholder);--_input-color:var(--mantine-color-text);--_input-left-section-size:var( --input-left-section-width,calc(var(--_input-height) - .125rem*var(--mantine-scale)) );--_input-right-section-size:var( --input-right-section-width,calc(var(--_input-height) - .125rem*var(--mantine-scale)) );--_input-size:var(--_input-height);--_section-y:calc(.0625rem*var(--mantine-scale));--_left-section-left:calc(.0625rem*var(--mantine-scale));--_left-section-right:unset;--_left-section-border-radius:var(--_input-radius) 0 0 var(--_input-radius);--_right-section-left:unset;--_right-section-right:calc(.0625rem*var(--mantine-scale));--_right-section-border-radius:0 var(--_input-radius) var(--_input-radius) 0;margin-bottom:var(--input-margin-bottom,0);margin-top:var(--input-margin-top,0);position:relative}.m-6c018570[data-variant=unstyled]{--input-padding:0;--input-padding-y:0;--_input-padding-left:0;--_input-padding-right:0}.m-6c018570[data-pointer]{--_input-cursor:pointer}.m-6c018570[data-multiline]{--input-padding-y-xs:calc(.28125rem*var(--mantine-scale));--input-padding-y-sm:calc(.34375rem*var(--mantine-scale));--input-padding-y-md:calc(.4375rem*var(--mantine-scale));--input-padding-y-lg:calc(.59375rem*var(--mantine-scale));--input-padding-y-xl:calc(.8125rem*var(--mantine-scale));--_input-size:auto;--_input-line-height:var(--mantine-line-height);--input-padding-y:var(--input-padding-y-sm)}.m-6c018570[data-with-left-section]{--_input-padding-left:var(--_input-left-section-size)}[dir=rtl] .m-6c018570[data-with-left-section]{--_input-padding-right:var(--_input-left-section-size)}[dir=rtl] .m-6c018570[data-with-left-section]:not([data-with-right-section]){--_input-padding-left:var(--_input-padding)}.m-6c018570[data-with-right-section]{--_input-padding-right:var(--_input-right-section-size)}[dir=rtl] .m-6c018570[data-with-right-section]{--_input-padding-left:var(--_input-right-section-size)}[dir=rtl] .m-6c018570[data-with-right-section]:not([data-with-left-section]){--_input-padding-right:var(--_input-padding)}[data-mantine-color-scheme=light] .m-6c018570{--_input-disabled-bg:var(--mantine-color-gray-1);--_input-disabled-color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=light] .m-6c018570[data-variant=default]{--_input-bd:var(--mantine-color-gray-4);--_input-bg:var(--mantine-color-white);--_input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=light] .m-6c018570[data-variant=filled]{--_input-bd:transparent;--_input-bg:var(--mantine-color-gray-1);--_input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=light] .m-6c018570[data-variant=unstyled]{--_input-bd:transparent;--_input-bg:transparent;--_input-bd-focus:transparent}[data-mantine-color-scheme=dark] .m-6c018570{--_input-disabled-bg:var(--mantine-color-dark-6);--_input-disabled-color:var(--mantine-color-dark-2)}[data-mantine-color-scheme=dark] .m-6c018570[data-variant=default]{--_input-bd:var(--mantine-color-dark-4);--_input-bg:var(--mantine-color-dark-6);--_input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=dark] .m-6c018570[data-variant=filled]{--_input-bd:transparent;--_input-bg:var(--mantine-color-dark-5);--_input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=dark] .m-6c018570[data-variant=unstyled]{--_input-bd:transparent;--_input-bg:transparent;--_input-bd-focus:transparent}[data-mantine-color-scheme] .m-6c018570[data-error]:not([data-variant=unstyled]){--_input-bd:var(--mantine-color-error)}[data-mantine-color-scheme] .m-6c018570[data-error]{--_input-color:var(--mantine-color-error);--_input-placeholder-color:var(--mantine-color-error);--_input-section-color:var(--mantine-color-error)}[dir=rtl] .m-6c018570{--_input-text-align:right;--_left-section-left:unset;--_left-section-right:calc(.0625rem*var(--mantine-scale));--_left-section-border-radius:0 var(--_input-radius) var(--_input-radius) 0;--_right-section-left:calc(.0625rem*var(--mantine-scale));--_right-section-right:unset;--_right-section-border-radius:var(--_input-radius) 0 0 var(--_input-radius)}.m-8fb7ebe7{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--_input-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_input-bd);border-radius:var(--_input-radius);color:var(--_input-color);cursor:var(--_input-cursor);display:block;font-family:var(--_input-font-family,var(--mantine-font-family));font-size:var(--_input-fz,var(--input-fz,var(--mantine-font-size-sm)));height:var(--_input-size);line-height:var(--_input-line-height);min-height:var(--_input-height);overflow:var(--_input-overflow);padding:var(--input-padding-y,0) var(--_input-padding-right) var(--input-padding-y,0) var(--_input-padding-left);resize:none;text-align:var(--_input-text-align);transition:border-color .1s ease;width:100%}.m-8fb7ebe7[data-no-overflow]{--_input-overflow:hidden}.m-8fb7ebe7[data-monospace]{--_input-font-family:var(--mantine-font-family-monospace);--_input-fz:calc(var(--input-fz, var(--mantine-font-size-sm)) - .125rem*var(--mantine-scale))}.m-8fb7ebe7:focus,.m-8fb7ebe7:focus-within{--_input-bd:var(--_input-bd-focus);outline:none}[data-error] .m-8fb7ebe7:focus,[data-error] .m-8fb7ebe7:focus-within{--_input-bd:var(--mantine-color-error)}.m-8fb7ebe7::placeholder{color:var(--_input-placeholder-color);opacity:1}.m-8fb7ebe7::-webkit-inner-spin-button,.m-8fb7ebe7::-webkit-outer-spin-button,.m-8fb7ebe7::-webkit-search-cancel-button,.m-8fb7ebe7::-webkit-search-decoration,.m-8fb7ebe7::-webkit-search-results-button,.m-8fb7ebe7::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}.m-8fb7ebe7[type=number]{-moz-appearance:textfield}.m-8fb7ebe7:disabled,.m-8fb7ebe7[data-disabled]{background-color:var(--_input-disabled-bg);color:var(--_input-disabled-color);cursor:not-allowed;opacity:.6}.m-8fb7ebe7:has(input:disabled){background-color:var(--_input-disabled-bg);color:var(--_input-disabled-color);cursor:not-allowed;opacity:.6}.m-82577fc2{align-items:center;border-radius:var(--_section-border-radius);bottom:var(--_section-y);color:var(--mantine-color-dimmed);display:flex;justify-content:center;left:var(--_section-left);pointer-events:var(--_section-pointer-events);position:absolute;right:var(--_section-right);top:var(--_section-y);width:var(--_section-size);z-index:1}.m-82577fc2[data-position=right]{--_section-pointer-events:var(--input-right-section-pointer-events);--_section-left:var(--_right-section-left);--_section-right:var(--_right-section-right);--_section-size:var(--_input-right-section-size);--_section-border-radius:var(--_right-section-border-radius)}.m-82577fc2[data-position=left]{--_section-pointer-events:var(--input-left-section-pointer-events);--_section-left:var(--_left-section-left);--_section-right:var(--_left-section-right);--_section-size:var(--_input-left-section-size);--_section-border-radius:var(--_left-section-border-radius)}.m-88bacfd0{color:var(--_input-placeholder-color,var(--mantine-color-placeholder))}[data-error] .m-88bacfd0{--_input-placeholder-color:var(--_input-color,var(--mantine-color-placeholder))}.m-46b77525{line-height:var(--mantine-line-height)}.m-8fdc1311{-webkit-tap-highlight-color:transparent;cursor:default;display:inline-block;font-size:var(--input-label-size,var(--mantine-font-size-sm));font-weight:500;word-break:break-word}.m-78a94662{color:var(--input-asterisk-color,var(--mantine-color-error))}.m-8f816625,.m-fe47ce59{word-wrap:break-word;display:block;line-height:1.2;margin:0;padding:0}.m-8f816625{color:var(--mantine-color-error);font-size:var(--input-error-size,calc(var(--mantine-font-size-sm) - .125rem*var(--mantine-scale)))}.m-fe47ce59{color:var(--mantine-color-dimmed);font-size:var(--input-description-size,calc(var(--mantine-font-size-sm) - .125rem*var(--mantine-scale)))}.m-8bffd616{display:flex}.m-9bdbb667{--_accordion-radius:var(--accordion-radius,var(--mantine-radius-default))}.m-df78851f{word-break:break-word}.m-4ba554d4{padding:var(--mantine-spacing-md);padding-top:calc(var(--mantine-spacing-xs)/2)}.m-8fa820a0{margin:0;padding:0}.m-4ba585b8{align-items:center;background-color:var(--_control-background-color,transparent);color:var(--_control-color);cursor:var(--_control-cursor,pointer);display:flex;flex-direction:var(--_control-flex-direction,row-reverse);opacity:var(--_control-opacity,1);padding-left:var(--_control-padding-left,var(--mantine-spacing-md));padding-right:var(--_control-padding-right,var(--mantine-spacing-md));text-align:left;width:100%}.m-4ba585b8[data-chevron-position=left]{--_control-flex-direction:row;--_control-padding-left:0}[dir=rtl] .m-4ba585b8[data-chevron-position=left]{--_control-padding-left:var(--mantine-spacing-md)}[data-mantine-color-scheme=light] .m-4ba585b8{--_control-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-4ba585b8{--_control-color:var(--mantine-color-dark-0)}.m-4ba585b8:disabled,.m-4ba585b8[data-disabled]{--_control-opacity:.4;--_control-cursor:not-allowed}@media (hover:hover){[data-mantine-color-scheme=light] .m-4271d21b:not(:disabled,[data-disabled]):hover,[data-mantine-color-scheme=light] .m-6939a5e9:not(:disabled,[data-disabled]):hover{--_control-background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-4271d21b:not(:disabled,[data-disabled]):hover,[data-mantine-color-scheme=dark] .m-6939a5e9:not(:disabled,[data-disabled]):hover{--_control-background-color:var(--mantine-color-dark-6)}}@media (hover:none){[data-mantine-color-scheme=light] .m-4271d21b:not(:disabled,[data-disabled]):active,[data-mantine-color-scheme=light] .m-6939a5e9:not(:disabled,[data-disabled]):active{--_control-background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-4271d21b:not(:disabled,[data-disabled]):active,[data-mantine-color-scheme=dark] .m-6939a5e9:not(:disabled,[data-disabled]):active{--_control-background-color:var(--mantine-color-dark-6)}}.m-df3ffa0f{color:inherit;flex:1;font-weight:400;overflow:hidden;padding-bottom:var(--mantine-spacing-sm);padding-top:var(--mantine-spacing-sm);text-overflow:ellipsis}[dir=rtl] .m-df3ffa0f{text-align:right}.m-3f35ae96{align-items:center;display:flex;justify-content:flex-start;margin-left:var(--_chevron-margin-left);margin-right:var(--_chevron-margin-right);min-width:var(--accordion-chevron-size,calc(.9375rem*var(--mantine-scale)));transform:var(--_chevron-transform,rotate(0deg));transition:transform var(--accordion-transition-duration,.2s) ease;width:var(--accordion-chevron-size,calc(.9375rem*var(--mantine-scale)))}.m-3f35ae96[data-rotate]{--_chevron-transform:rotate(180deg)}.m-3f35ae96[data-position=left]{--_chevron-margin-right:var(--mantine-spacing-md);--_chevron-margin-left:var(--mantine-spacing-md)}.m-3f35ae96[data-position=right]{--_chevron-margin-left:0}[dir=rtl] .m-3f35ae96[data-position=left]{--_chevron-margin-right:0;--_chevron-margin-left:var(--mantine-spacing-md)}[dir=rtl] .m-3f35ae96[data-position=right]{--_chevron-margin-right:var(--mantine-spacing-md);--_chevron-margin-left:0}.m-9bd771fe{align-items:center;display:flex;justify-content:center;margin-left:var(--_icon-margin-left,0);margin-right:var(--_icon-margin-right,var(--mantine-spacing-sm))}.m-9bd771fe[data-chevron-position=left]{--_icon-margin-right:0;--_icon-margin-left:var(--mantine-spacing-lg)}[dir=rtl] .m-9bd771fe[data-chevron-position=left]{--_icon-margin-right:var(--mantine-spacing-lg);--_icon-margin-left:0}[dir=rtl] .m-9bd771fe[data-chevron-position=right]{--_icon-margin-right:0;--_icon-margin-left:var(--mantine-spacing-sm)}.m-9bd7b098{background-color:var(--_item-bg)}[data-mantine-color-scheme=light] .m-9bd7b098{--_item-border-color:var(--mantine-color-gray-3);--_item-filled-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-9bd7b098{--_item-border-color:var(--mantine-color-dark-4);--_item-filled-color:var(--mantine-color-dark-6)}.m-fe19b709{border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_item-border-color)}.m-1f921b3b{border:calc(.0625rem*var(--mantine-scale)) solid var(--_item-border-color);transition:background-color .15s ease}.m-1f921b3b[data-active]{--_item-bg:var(--_item-filled-color)}.m-1f921b3b:first-of-type,.m-1f921b3b:first-of-type>[data-accordion-control]{border-top-left-radius:var(--_accordion-radius);border-top-right-radius:var(--_accordion-radius)}.m-1f921b3b:last-of-type,.m-1f921b3b:last-of-type>[data-accordion-control]{border-bottom-left-radius:var(--_accordion-radius);border-bottom-right-radius:var(--_accordion-radius)}.m-1f921b3b+.m-1f921b3b{border-top:0}.m-2cdf939a{border-radius:var(--_accordion-radius)}.m-2cdf939a[data-active],.m-9f59b069{--_item-bg:var(--_item-filled-color)}.m-9f59b069{border:calc(.0625rem*var(--mantine-scale)) solid var(--__item-border-color,transparent);border-radius:var(--_accordion-radius);transition:background-color .15s ease}.m-9f59b069[data-active]{--__item-border-color:var(--_item-border-color)}[data-mantine-color-scheme=light] .m-9f59b069[data-active]{--_item-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-9f59b069[data-active]{--_item-bg:var(--mantine-color-dark-7)}.m-9f59b069+.m-9f59b069{margin-top:var(--mantine-spacing-md)}.m-7f854edf{bottom:var(--affix-bottom);left:var(--affix-left);position:fixed;right:var(--affix-right);top:var(--affix-top);z-index:var(--affix-z-index)}.m-66836ed3{background-color:var(--alert-bg,var(--mantine-primary-color-light));border:var(--alert-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--alert-radius,var(--mantine-radius-default));color:var(--alert-color,var(--mantine-primary-color-light-color));overflow:hidden;padding:var(--mantine-spacing-md) var(--mantine-spacing-md);position:relative}.m-12b2e6d5{--_message-color:var(--alert-color,var(--mantine-primary-color-light-color))}.m-cffd1856{--_message-color:var(--mantine-color-black)}.m-667c2793,.m-a5d60502{display:flex}.m-667c2793{flex:1;flex-direction:column;gap:var(--mantine-spacing-xs)}.m-6a03f287{align-items:center;display:flex;font-size:var(--mantine-font-size-sm);font-weight:700;justify-content:space-between}.m-6a03f287[data-with-close-button]{padding-right:var(--mantine-spacing-md)}[dir=rtl] .m-6a03f287[data-with-close-button]{padding-left:var(--mantine-spacing-md);padding-right:0}.m-698f4f23{display:block;overflow:hidden;text-overflow:ellipsis}.m-667f2a6a{align-items:center;display:flex;height:calc(1.25rem*var(--mantine-scale));justify-content:flex-start;line-height:1;margin-right:var(--mantine-spacing-md);margin-top:calc(.0625rem*var(--mantine-scale));width:calc(1.25rem*var(--mantine-scale))}[dir=rtl] .m-667f2a6a{margin-left:var(--mantine-spacing-md);margin-right:0}.m-7fa78076{color:var(--_message-color,var(--__message-color));font-size:var(--mantine-font-size-sm);overflow:hidden;text-overflow:ellipsis}[data-mantine-color-scheme=light] .m-7fa78076{--__message-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-7fa78076{--__message-color:var(--mantine-color-white)}.m-87f54839{color:var(--alert-color,var(--mantine-primary-color-light-color));height:calc(1.25rem*var(--mantine-scale));margin-top:calc(var(--mantine-spacing-sm)*-.5);width:calc(1.25rem*var(--mantine-scale))}.m-b6d8b162{-webkit-tap-highlight-color:transparent;color:var(--text-color);font-size:var(--text-fz,var(--mantine-font-size-md));font-weight:400;line-height:var(--_text-line-height,var(--text-lh,var(--mantine-line-height-md)));margin:0;padding:0;text-decoration:none}.m-b6d8b162[data-truncate]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-b6d8b162[data-truncate=start]{direction:rtl;text-align:right}[dir=rtl] .m-b6d8b162[data-truncate=start]{direction:ltr;text-align:left}.m-b6d8b162[data-variant=gradient]{-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text;background-image:var(--text-gradient)}.m-b6d8b162[data-line-clamp]{-webkit-line-clamp:var(--text-line-clamp);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.m-b6d8b162[data-inherit]{font-size:inherit;font-weight:inherit;line-height:inherit}.m-b6d8b162[data-inline]{--_text-line-height:1}.m-849cf0da{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;color:var(--mantine-color-anchor);cursor:pointer;display:inline;margin:0;padding:0;text-decoration:var(--_text-decoration,none)}@media (hover:hover){.m-849cf0da[data-underline=hover]:hover{--_text-decoration:underline}}@media (hover:none){.m-849cf0da[data-underline=hover]:active{--_text-decoration:underline}}.m-849cf0da[data-underline=always]{--_text-decoration:underline}.m-89ab340[data-resizing]{--app-shell-transition-duration:0ms!important}.m-89ab340[data-disabled]{--app-shell-header-offset:0px!important;--app-shell-navbar-offset:0px!important}[data-mantine-color-scheme=light] .m-89ab340{--_app-shell-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-89ab340{--_app-shell-border-color:var(--mantine-color-dark-4)}.m-3840c879,.m-3b16f56b,.m-45252eee,.m-8983817,.m-9cdde9a{transition-duration:var(--app-shell-transition-duration);transition-timing-function:var(--app-shell-transition-timing-function)}.m-45252eee,.m-9cdde9a{background-color:var(--mantine-color-body);display:flex;flex-direction:column;height:var( --_section-height,calc(100dvh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px)) );position:fixed;top:var(--_section-top,var(--app-shell-header-offset,0));transition-property:transform,top,height}[data-layout=alt] .m-45252eee,[data-layout=alt] .m-9cdde9a{--_section-top:0px;--_section-height:100dvh}.m-45252eee{border-left:var(--_navbar-border-left);border-right:var(--_navbar-border-right);left:var(--_navbar-left,0);right:var(--_navbar-right);transform:var(--_navbar-transform,var(--app-shell-navbar-transform));transition-property:transform,top,height;width:var(--app-shell-navbar-width);z-index:var(--app-shell-navbar-z-index)}.m-45252eee[data-with-border]{--_navbar-border-right:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}[dir=rtl] .m-45252eee[data-with-border]{--_navbar-border-right:none;--_navbar-border-left:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}[dir=rtl] .m-45252eee{--_navbar-left:auto;--_navbar-right:0px;--_navbar-transform:var(--app-shell-navbar-transform-rtl)}.m-9cdde9a{border-left:var(--_aside-border-left);border-right:var(--_aside-border-right);left:var(--_aside-left);right:var(--_aside-right,0);transform:var(--_aside-transform,var(--app-shell-aside-transform));width:var(--app-shell-aside-width);z-index:var(--app-shell-aside-z-index)}.m-9cdde9a[data-with-border]{--_aside-border-left:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}[dir=rtl] .m-9cdde9a[data-with-border]{--_aside-border-left:none;--_aside-border-right:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}[dir=rtl] .m-9cdde9a{--_aside-left:0px;--_aside-right:auto;--_aside-transform:var(--app-shell-aside-transform-rtl)}.m-8983817{min-height:100dvh;padding:calc(var(--app-shell-header-offset, 0px) + var(--app-shell-padding)) var( --_main-padding-right,calc(var(--app-shell-aside-offset, 0px) + var(--app-shell-padding)) ) calc(var(--app-shell-footer-offset, 0px) + var(--app-shell-padding)) var( --_main-padding-left,calc(var(--app-shell-navbar-offset, 0px) + var(--app-shell-padding)) );transition-property:padding}[dir=rtl] .m-8983817{--_main-padding-left:calc(var(--app-shell-aside-offset, 0px) + var(--app-shell-padding));--_main-padding-right:calc(var(--app-shell-navbar-offset, 0px) + var(--app-shell-padding))}.m-3840c879,.m-3b16f56b{background-color:var(--mantine-color-body);left:var(--_section-left,0);position:fixed;right:var(--_section-right,0);transition-property:transform,left,right}[data-layout=alt] .m-3840c879,[data-layout=alt] .m-3b16f56b{--_section-left:var(--app-shell-navbar-offset,0px)}[dir=rtl] [data-layout=alt] .m-3840c879,[dir=rtl] [data-layout=alt] .m-3b16f56b{--_section-right:var(--app-shell-navbar-offset,0px);--_section-left:0px}.m-3b16f56b{background-color:var(--mantine-color-body);border-bottom:var(--_header-border-bottom);height:var(--app-shell-header-height);top:0;transform:var(--app-shell-header-transform);z-index:var(--app-shell-header-z-index)}.m-3b16f56b[data-with-border]{--_header-border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}.m-3840c879{border-top:var(--_footer-border-top);bottom:0;height:var(--app-shell-footer-height);transform:var(--app-shell-footer-transform);z-index:var(--app-shell-footer-z-index)}.m-3840c879[data-with-border]{--_footer-border-top:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}.m-6dcfc7c7{flex-grow:var(--_section-grow,0)}.m-6dcfc7c7[data-grow]{--_section-grow:1}.m-71ac47fc{max-width:100%;position:relative}.m-71ac47fc:before{content:"";display:block;height:0;padding-bottom:calc((1/var(--ar-ratio, 1))*100%)}.m-71ac47fc:after{clear:both;content:"";display:table}.m-71ac47fc>:not(style){align-items:center;display:flex;height:100%;top:0;right:0;bottom:0;left:0;justify-content:center;position:absolute;width:100%}.m-71ac47fc>img,.m-71ac47fc>video{object-fit:cover}.m-88b62a41{--_combobox-padding:var(--combobox-padding,calc(.25rem*var(--mantine-scale)));padding:var(--_combobox-padding)}.m-88b62a41[data-hidden]{display:none}.m-88b62a41,.m-b2821a6e{--combobox-option-padding-xs:calc(.25rem*var(--mantine-scale)) calc(.5rem*var(--mantine-scale));--combobox-option-padding-sm:calc(.375rem*var(--mantine-scale)) calc(.625rem*var(--mantine-scale));--combobox-option-padding-md:calc(.5rem*var(--mantine-scale)) calc(.75rem*var(--mantine-scale));--combobox-option-padding-lg:calc(.625rem*var(--mantine-scale)) calc(1rem*var(--mantine-scale));--combobox-option-padding-xl:calc(.875rem*var(--mantine-scale)) calc(1.25rem*var(--mantine-scale));--_combobox-option-padding:var(--combobox-option-padding,var(--combobox-option-padding-sm))}.m-92253aa5{background-color:var(--_option-bg,transparent);border-radius:var(--mantine-radius-default);color:var(--_option-color,inherit);cursor:var(--_option-cursor,pointer);font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));opacity:var(--_option-opacity,1);padding:var(--_combobox-option-padding);word-break:break-word}.m-92253aa5[data-combobox-selected]{--_option-bg:var(--mantine-primary-color-filled);--_option-color:var(--mantine-color-white)}.m-92253aa5[data-combobox-disabled]{--_option-cursor:not-allowed;--_option-opacity:.35}@media (hover:hover){[data-mantine-color-scheme=light] .m-92253aa5:hover:not([data-combobox-selected],[data-combobox-disabled]){--_option-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-92253aa5:hover:not([data-combobox-selected],[data-combobox-disabled]){--_option-bg:var(--mantine-color-dark-7)}}@media (hover:none){[data-mantine-color-scheme=light] .m-92253aa5:active:not([data-combobox-selected],[data-combobox-disabled]){--_option-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-92253aa5:active:not([data-combobox-selected],[data-combobox-disabled]){--_option-bg:var(--mantine-color-dark-7)}}.m-985517d8{background-color:var(--_search_background);border-bottom-left-radius:0;border-bottom-right-radius:0;border-left-width:0;border-right-width:0;border-top-width:0;margin:calc(var(--_combobox-padding)*-1) calc(var(--_combobox-padding)*-1) var(--_combobox-padding);position:relative;width:calc(100% + var(--_combobox-padding)*2);z-index:1000}.m-985517d8,.m-985517d8:focus{border-color:var(--_search-border-color)}[data-mantine-color-scheme=light] .m-985517d8{--_search-border-color:var(--mantine-color-gray-2);--_search_background:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-985517d8{--_search-border-color:var(--mantine-color-dark-4);--_search_background:var(--mantine-color-dark-7)}.m-2530cd1d{color:var(--mantine-color-dimmed);text-align:center}.m-2530cd1d,.m-82b967cb,.m-858f94bd{font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));padding:var(--_combobox-option-padding)}.m-82b967cb,.m-858f94bd{border:0 solid var(--_footer-border-color);margin-left:calc(var(--_combobox-padding)*-1);margin-right:calc(var(--_combobox-padding)*-1)}[data-mantine-color-scheme=light] .m-82b967cb,[data-mantine-color-scheme=light] .m-858f94bd{--_footer-border-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-82b967cb,[data-mantine-color-scheme=dark] .m-858f94bd{--_footer-border-color:var(--mantine-color-dark-4)}.m-82b967cb{border-top-width:calc(.0625rem*var(--mantine-scale));margin-bottom:calc(var(--_combobox-padding)*-1);margin-top:var(--_combobox-padding)}.m-858f94bd{border-bottom-width:calc(.0625rem*var(--mantine-scale));margin-bottom:var(--_combobox-padding);margin-top:calc(var(--_combobox-padding)*-1)}.m-254f3e4f:has(.m-2bb2e9e5:only-child){display:none}.m-2bb2e9e5{align-items:center;color:var(--mantine-color-dimmed);display:flex;font-size:calc(var(--combobox-option-fz, var(--mantine-font-size-sm))*.85);font-weight:500;padding:var(--_combobox-option-padding);position:relative}.m-2bb2e9e5:after{background-color:var(--_divider-bg);content:"";flex:1;height:calc(.0625rem*var(--mantine-scale));left:0;margin-left:var(--mantine-spacing-xs);right:0}[data-mantine-color-scheme=light] .m-2bb2e9e5:after{--_divider-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-2bb2e9e5:after{--_divider-bg:var(--mantine-color-dark-4)}[dir=rtl] .m-2bb2e9e5:after{margin-left:unset;margin-right:var(--mantine-spacing-xs)}.m-2bb2e9e5:only-child{display:none}.m-2943220b{--combobox-chevron-size-xs:calc(.875rem*var(--mantine-scale));--combobox-chevron-size-sm:calc(1.125rem*var(--mantine-scale));--combobox-chevron-size-md:calc(1.25rem*var(--mantine-scale));--combobox-chevron-size-lg:calc(1.5rem*var(--mantine-scale));--combobox-chevron-size-xl:calc(1.75rem*var(--mantine-scale));--combobox-chevron-size:var(--combobox-chevron-size-sm);color:var(--_color);height:var(--combobox-chevron-size);width:var(--combobox-chevron-size)}[data-mantine-color-scheme=light] .m-2943220b{--_color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .m-2943220b{--_color:var(--mantine-color-dark-3)}.m-2943220b[data-error]{--_color:var(--mantine-color-error)}.m-71d052f9{margin-right:calc(var(--_combobox-padding)*-1)}[dir=rtl] .m-71d052f9{margin-left:calc(var(--_combobox-padding)*-1);margin-right:0}.m-390b5f4{align-items:center;display:flex;flex-direction:var(--_flex-direction,row);gap:calc(.5rem*var(--mantine-scale))}.m-390b5f4[data-reverse]{justify-content:space-between}.m-8ee53fc2{height:.8em;min-width:.8em;opacity:.4;width:.8em}[data-combobox-selected] .m-8ee53fc2{opacity:1}.m-5f75b09e{--label-lh-xs:calc(1rem*var(--mantine-scale));--label-lh-sm:calc(1.25rem*var(--mantine-scale));--label-lh-md:calc(1.5rem*var(--mantine-scale));--label-lh-lg:calc(1.875rem*var(--mantine-scale));--label-lh-xl:calc(2.25rem*var(--mantine-scale));--label-lh:var(--label-lh-sm)}.m-5f75b09e[data-label-position=left]{--_label-order:1;--_offset-right:var(--mantine-spacing-sm);--_offset-left:0}[dir=rtl] .m-5f75b09e[data-label-position=left]{--_offset-right:0;--_offset-left:var(--mantine-spacing-sm)}.m-5f75b09e[data-label-position=right]{--_label-order:2;--_offset-right:0;--_offset-left:var(--mantine-spacing-sm)}[dir=rtl] .m-5f75b09e[data-label-position=right]{--_offset-right:var(--mantine-spacing-sm);--_offset-left:0}.m-5f6e695e{display:flex}.m-d3ea56bb{-webkit-tap-highlight-color:transparent;display:inline-flex;flex-direction:column;font-size:var(--label-fz,var(--mantine-font-size-sm));line-height:var(--label-lh);order:var(--_label-order)}.m-8ee546b8,.m-d3ea56bb{cursor:var(--mantine-cursor-type)}.m-8ee546b8{color:var(--_label-color,inherit);padding-left:var(--_offset-left);padding-right:var(--_offset-right)}[data-mantine-color-scheme=light] .m-8ee546b8[data-disabled],[data-mantine-color-scheme=light] fieldset:disabled .m-8ee546b8{--_label-color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-8ee546b8[data-disabled],[data-mantine-color-scheme=dark] fieldset:disabled .m-8ee546b8{--_label-color:var(--mantine-color-dark-3)}.m-328f68c0,.m-8e8a99cc{margin-top:calc(var(--mantine-spacing-xs)/2);padding-left:var(--_offset-left);padding-right:var(--_offset-right)}.m-bf2d988c{--checkbox-size-xs:calc(1rem*var(--mantine-scale));--checkbox-size-sm:calc(1.25rem*var(--mantine-scale));--checkbox-size-md:calc(1.5rem*var(--mantine-scale));--checkbox-size-lg:calc(1.875rem*var(--mantine-scale));--checkbox-size-xl:calc(2.25rem*var(--mantine-scale));--checkbox-size:var(--checkbox-size-sm);--checkbox-color:var(--mantine-primary-color-filled);--checkbox-icon-color:var(--mantine-color-white)}.m-26062bec{height:var(--checkbox-size);order:var(--_checkbox-inner-order,1);position:relative;width:var(--checkbox-size)}.m-26062bec[data-label-position=left]{--_checkbox-inner-order:2}.m-26063560{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--_checkbox-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_checkbox-bd-color);border-radius:var(--checkbox-radius,var(--mantine-radius-default));cursor:var(--_checkbox-cursor,var(--mantine-cursor-type));display:block;height:var(--checkbox-size);margin:0;padding:0;transition:border-color .1s ease,background-color .1s ease;width:var(--checkbox-size)}[data-mantine-color-scheme=light] .m-26063560{--_checkbox-bg:var(--mantine-color-white);--_checkbox-bd-color:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-26063560{--_checkbox-bg:var(--mantine-color-dark-6);--_checkbox-bd-color:var(--mantine-color-dark-4)}.m-26063560[data-error]{--_checkbox-bd-color:var(--mantine-color-error)}[data-mantine-color-scheme] .m-26063560:checked,[data-mantine-color-scheme] .m-26063560[data-indeterminate]{--_checkbox-bg:var(--checkbox-color);--_checkbox-bd-color:var(--checkbox-color)}[data-mantine-color-scheme] .m-26063560:checked+.m-bf295423,[data-mantine-color-scheme] .m-26063560[data-indeterminate]+.m-bf295423{--_checkbox-icon-opacity:1;--_checkbox-icon-transform:none}.m-26063560:disabled{--_checkbox-cursor:not-allowed}[data-mantine-color-scheme=light] .m-26063560:disabled{--_checkbox-bg:var(--mantine-color-gray-2);--_checkbox-bd-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-26063560:disabled{--_checkbox-bg:var(--mantine-color-dark-6);--_checkbox-bd-color:var(--mantine-color-dark-6)}[data-mantine-color-scheme=light] .m-26063560:disabled+.m-bf295423{--_checkbox-icon-color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-26063560:disabled+.m-bf295423{--_checkbox-icon-color:var(--mantine-color-dark-3)}.m-215c4542+.m-bf295423{--_checkbox-icon-color:var(--checkbox-color)}[data-mantine-color-scheme] .m-215c4542:checked:not(:disabled),[data-mantine-color-scheme] .m-215c4542[data-indeterminate]{--_checkbox-bg:transparent;--_checkbox-bd-color:var(--checkbox-color)}[data-mantine-color-scheme] .m-215c4542:checked:not(:disabled)+.m-bf295423,[data-mantine-color-scheme] .m-215c4542[data-indeterminate]+.m-bf295423{--_checkbox-icon-color:var(--checkbox-color);--_checkbox-icon-opacity:1;--_checkbox-icon-transform:none}.m-bf295423{bottom:0;color:var(--_checkbox-icon-color,var(--checkbox-icon-color));left:0;margin:auto;opacity:var(--_checkbox-icon-opacity,0);pointer-events:none;position:absolute;right:0;top:0;transform:var(--_checkbox-icon-transform,translateY(calc(.3125rem*var(--mantine-scale))) scale(.5));transition:transform .1s ease,opacity .1s ease;width:60%}.m-f85678b6{--avatar-size-xs:calc(1rem*var(--mantine-scale));--avatar-size-sm:calc(1.625rem*var(--mantine-scale));--avatar-size-md:calc(2.375rem*var(--mantine-scale));--avatar-size-lg:calc(3.5rem*var(--mantine-scale));--avatar-size-xl:calc(5.25rem*var(--mantine-scale));--_avatar-size:var(--avatar-size,var(--avatar-size-md));-webkit-tap-highlight-color:transparent;background-color:var(--_avatar-bg);border:var(--_avatar-border,none);border-radius:var(--avatar-radius,calc(62.5rem*var(--mantine-scale)));display:block;height:var(--_avatar-size);margin-left:var(--_avatar-ml,unset);margin-right:var(--_avatar-mr,unset);min-width:var(--_avatar-size);overflow:hidden;padding:0;position:relative;text-decoration:none;-webkit-user-select:none;user-select:none;width:var(--_avatar-size)}.m-f85678b6[data-within-group]{--_avatar-ml:calc(var(--ag-spacing, var(--mantine-spacing-sm))*-1);--_avatar-border:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-body);--_avatar-bg:var(--mantine-color-body)}[dir=rtl] .m-f85678b6[data-within-group]{--_avatar-mr:calc(var(--ag-spacing, var(--mantine-spacing-sm))*-1);--_avatar-ml:unset}.m-11f8ac07{display:block;height:100%;object-fit:cover;width:100%}.m-104cd71f{align-items:center;background:var(--avatar-bg,var(--mantine-color-gray-light));border:var(--avatar-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--avatar-radius);color:var(--avatar-color,var(--mantine-color-gray-light-color));display:flex;font-size:calc(var(--_avatar-size)/2.5);font-weight:700;height:100%;justify-content:center;-webkit-user-select:none;user-select:none;width:100%}.m-104cd71f>[data-avatar-placeholder-icon]{height:70%;width:70%}.m-11def92b{display:flex;padding-left:var(--ag-spacing,var(--mantine-spacing-sm))}[dir=rtl] .m-11def92b{padding-left:0;padding-right:var(--ag-spacing,var(--mantine-spacing-sm))}.m-2ce0de02{background-position:50%;background-size:cover;border:0;border-radius:var(--bi-radius,0);display:block;text-decoration:none;width:100%}.m-347db0ec{--badge-height-xs:calc(1rem*var(--mantine-scale));--badge-height-sm:calc(1.125rem*var(--mantine-scale));--badge-height-md:calc(1.25rem*var(--mantine-scale));--badge-height-lg:calc(1.625rem*var(--mantine-scale));--badge-height-xl:calc(2rem*var(--mantine-scale));--badge-fz-xs:calc(.5625rem*var(--mantine-scale));--badge-fz-sm:calc(.625rem*var(--mantine-scale));--badge-fz-md:calc(.6875rem*var(--mantine-scale));--badge-fz-lg:calc(.8125rem*var(--mantine-scale));--badge-fz-xl:calc(1rem*var(--mantine-scale));--badge-padding-x-xs:calc(.375rem*var(--mantine-scale));--badge-padding-x-sm:calc(.5rem*var(--mantine-scale));--badge-padding-x-md:calc(.625rem*var(--mantine-scale));--badge-padding-x-lg:calc(.75rem*var(--mantine-scale));--badge-padding-x-xl:calc(1rem*var(--mantine-scale));--badge-height:var(--badge-height-md);--badge-fz:var(--badge-fz-md);--badge-padding-x:var(--badge-padding-x-md);-webkit-tap-highlight-color:transparent;align-items:center;background:var(--badge-bg,var(--mantine-primary-color-filled));border:var(--badge-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--badge-radius,calc(625rem*var(--mantine-scale)));color:var(--badge-color,var(--mantine-color-white));cursor:inherit;display:var(--_badge-display,inline-flex);font-size:var(--badge-fz);font-weight:700;height:var(--badge-height);justify-content:center;letter-spacing:calc(.01563rem*var(--mantine-scale));line-height:calc(var(--badge-height) - .125rem*var(--mantine-scale));overflow:hidden;padding:0 var(--badge-padding-x);text-decoration:none;text-overflow:ellipsis;text-transform:uppercase;width:var(--_badge-width,fit-content)}.m-347db0ec[data-block]{--_badge-display:flex;--_badge-width:100%}.m-fbd81e3d{--badge-dot-size:calc(var(--badge-height)/3.4);background-color:var(--_badge-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_badge-border-color);color:var(--_badge-color)}[data-mantine-color-scheme=light] .m-fbd81e3d{--_badge-bg:var(--mantine-color-white);--_badge-border-color:var(--mantine-color-gray-4);--_badge-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-fbd81e3d{--_badge-bg:var(--mantine-color-dark-5);--_badge-border-color:var(--mantine-color-dark-5);--_badge-color:var(--mantine-color-white)}.m-fbd81e3d:before{background-color:var(--badge-dot-color);border-radius:var(--badge-dot-size);content:"";display:block;height:var(--badge-dot-size);margin-right:var(--badge-dot-size);width:var(--badge-dot-size)}[dir=rtl] .m-fbd81e3d:before{margin-left:var(--badge-dot-size);margin-right:0}.m-5add502a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-91fdda9b{--_section-margin:calc(var(--mantine-spacing-xs)/2);align-items:center;display:inline-flex;justify-content:center}.m-91fdda9b[data-position=left]{margin-left:var(--_left-section-ml,0);margin-right:var(--_left-section-mr,var(--_section-margin))}[dir=rtl] .m-91fdda9b[data-position=left]{--_left-section-ml:var(--_section-margin);--_left-section-mr:0}.m-91fdda9b[data-position=right]{margin-left:var(--_right-section-ml,var(--_section-margin));margin-right:var(--_right-section-mr,0)}[dir=rtl] .m-91fdda9b[data-position=right]{--_right-section-mr:var(--_section-margin);--_right-section-ml:0}.m-ddec01c0{--_bq-border:calc(.1875rem*var(--mantine-scale)) solid var(--bq-bd);background-color:var(--_bq-bg);border-bottom-left-radius:var(--_bq-radius-left,0);border-bottom-right-radius:var(--_bq-radius-right,var(--bq-radius));border-left:var(--_bq-border-left,var(--_bq-border));border-right:var(--_bq-border-right,0);border-top-left-radius:var(--_bq-radius-left,0);border-top-right-radius:var(--_bq-radius-right,var(--bq-radius));margin:0;padding:var(--mantine-spacing-xl) calc(2.375rem*var(--mantine-scale));position:relative}[dir=rtl] .m-ddec01c0{--_bq-radius-left:var(--bq-radius);--_bq-radius-right:0;--_bq-border-left:0;--_bq-border-right:var(--_bq-border)}[data-mantine-color-scheme=light] .m-ddec01c0{--_bq-bg:var(--bq-bg-light)}[data-mantine-color-scheme=dark] .m-ddec01c0{--_bq-bg:var(--bq-bg-dark)}.m-dde7bd57{align-items:center;background-color:var(--mantine-color-body);border-radius:var(--bq-icon-size);color:var(--bq-bd);display:flex;height:var(--bq-icon-size);justify-content:center;left:var(--_bq-icon-left,calc(var(--bq-icon-size)/-2));position:absolute;right:var(--_bq-icon-right,0);top:calc(var(--bq-icon-size)/-2);width:var(--bq-icon-size)}[dir=rtl] .m-dde7bd57{--_bq-icon-left:0;--_bq-icon-right:calc(var(--bq-icon-size)/-2)}.m-dde51a35{display:block;font-size:85%;margin-top:var(--mantine-spacing-md);opacity:.6}.m-8b3717df{align-items:center;display:flex}.m-f678d540{-webkit-tap-highlight-color:transparent;line-height:1;white-space:nowrap}.m-3b8f2208{align-items:center;color:var(--_separator-color);display:flex;justify-content:center;line-height:1;margin-left:var(--bc-separator-margin,var(--mantine-spacing-xs));margin-right:var(--bc-separator-margin,var(--mantine-spacing-xs))}[data-mantine-color-scheme=light] .m-3b8f2208{--_separator-color:var(--mantine-color-gray-7)}[data-mantine-color-scheme=dark] .m-3b8f2208{--_separator-color:var(--mantine-color-dark-2)}.m-fea6bf1a{--burger-size-xs:calc(.75rem*var(--mantine-scale));--burger-size-sm:calc(1.125rem*var(--mantine-scale));--burger-size-md:calc(1.5rem*var(--mantine-scale));--burger-size-lg:calc(2.125rem*var(--mantine-scale));--burger-size-xl:calc(2.625rem*var(--mantine-scale));--burger-size:var(--burger-size-md);--_burger-color:var(--burger-color,var(--__burger-color));cursor:pointer;height:calc(var(--burger-size) + var(--mantine-spacing-xs));padding:calc(var(--mantine-spacing-xs)/2);width:calc(var(--burger-size) + var(--mantine-spacing-xs))}[data-mantine-color-scheme=light] .m-fea6bf1a{--__burger-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-fea6bf1a{--__burger-color:var(--mantine-color-white)}.m-d4fb9cad{position:relative;-webkit-user-select:none;user-select:none}.m-d4fb9cad,.m-d4fb9cad:after,.m-d4fb9cad:before{background-color:var(--_burger-color);display:block;height:calc(var(--burger-size)/12);outline:calc(.0625rem*var(--mantine-scale)) solid transparent;transition-duration:var(--burger-transition-duration,.3s);transition-property:background-color,transform;transition-timing-function:var(--burger-transition-timing-function,ease);width:var(--burger-size)}.m-d4fb9cad:after,.m-d4fb9cad:before{content:"";left:0;position:absolute}.m-d4fb9cad:before{top:calc(var(--burger-size)/-3)}.m-d4fb9cad:after{top:calc(var(--burger-size)/3)}.m-d4fb9cad[data-opened]{background-color:transparent}.m-d4fb9cad[data-opened]:before{transform:translateY(calc(var(--burger-size)/3)) rotate(45deg)}.m-d4fb9cad[data-opened]:after{transform:translateY(calc(var(--burger-size)/-3)) rotate(-45deg)}.m-77c9d27d{--button-height-xs:calc(1.875rem*var(--mantine-scale));--button-height-sm:calc(2.25rem*var(--mantine-scale));--button-height-md:calc(2.625rem*var(--mantine-scale));--button-height-lg:calc(3.125rem*var(--mantine-scale));--button-height-xl:calc(3.75rem*var(--mantine-scale));--button-height-compact-xs:calc(1.375rem*var(--mantine-scale));--button-height-compact-sm:calc(1.625rem*var(--mantine-scale));--button-height-compact-md:calc(1.875rem*var(--mantine-scale));--button-height-compact-lg:calc(2.125rem*var(--mantine-scale));--button-height-compact-xl:calc(2.5rem*var(--mantine-scale));--button-padding-x-xs:calc(.875rem*var(--mantine-scale));--button-padding-x-sm:calc(1.125rem*var(--mantine-scale));--button-padding-x-md:calc(1.375rem*var(--mantine-scale));--button-padding-x-lg:calc(1.625rem*var(--mantine-scale));--button-padding-x-xl:calc(2rem*var(--mantine-scale));--button-padding-x-compact-xs:calc(.4375rem*var(--mantine-scale));--button-padding-x-compact-sm:calc(.5rem*var(--mantine-scale));--button-padding-x-compact-md:calc(.625rem*var(--mantine-scale));--button-padding-x-compact-lg:calc(.75rem*var(--mantine-scale));--button-padding-x-compact-xl:calc(.875rem*var(--mantine-scale));--button-height:var(--button-height-sm);--button-padding-x:var(--button-padding-x-sm);--button-color:var(--mantine-color-white);background:var(--_button-bg,var(--button-bg,var(--mantine-primary-color-filled)));border:var(--_button-bd,var(--button-bd,calc(.0625rem*var(--mantine-scale)) solid transparent));border-radius:var(--button-radius,var(--mantine-radius-default));color:var(--_button-color,var(--button-color,var(--mantine-color-white)));cursor:var(--_button-cursor,pointer);display:var(--_button-display,inline-block);font-size:var(--button-fz,var(--mantine-font-size-sm));font-weight:600;height:var(--button-height,var(--button-height-sm));line-height:1;overflow:hidden;padding-left:var(--_button-padding-left,var(--button-padding-x,var(--button-padding-x-sm)));padding-right:var(--_button-padding-right,var(--button-padding-x,var(--button-padding-x-sm)));position:relative;text-align:center;-webkit-user-select:none;user-select:none;width:var(--_button-width,auto)}.m-77c9d27d[data-block]{--_button-display:block;--_button-width:100%}.m-77c9d27d[data-with-left-section]{--_button-padding-left:calc(var(--button-padding-x)/1.5)}[dir=rtl] .m-77c9d27d[data-with-left-section]{--_button-padding-left:var(--button-padding-x)}.m-77c9d27d[data-with-right-section],[dir=rtl] .m-77c9d27d[data-with-left-section]{--_button-padding-right:calc(var(--button-padding-x)/1.5)}[dir=rtl] .m-77c9d27d[data-with-right-section]{--_button-padding-right:var(--button-padding-x);--_button-padding-left:calc(var(--button-padding-x)/1.5)}.m-77c9d27d:disabled:not([data-loading]),.m-77c9d27d[data-disabled]:not([data-loading]){--_button-cursor:not-allowed;--_button-bg:var(--_disabled-bg);--_button-color:var(--_disabled-color);--_button-bd:calc(.0625rem*var(--mantine-scale)) solid transparent;transform:none}.m-77c9d27d:before{background-color:var(--_button-loading-overlay-bg);border-radius:var(--button-radius,var(--mantine-radius-default));content:"";filter:blur(12px);inset:calc(-.0625rem*var(--mantine-scale));opacity:0;pointer-events:none;position:absolute;transform:translateY(-100%);transition:transform .15s ease,opacity .1s ease}.m-77c9d27d[data-loading]{--_button-cursor:not-allowed;transform:none}.m-77c9d27d[data-loading]:before{opacity:1;transform:translateY(0)}.m-77c9d27d[data-loading] .m-80f1301b{opacity:0;transform:translateY(100%)}.m-77c9d27d[data-loading] .m-a25b86ee{opacity:1;transform:translate(-50%,-50%)}@media (hover:hover){.m-77c9d27d:hover:not([data-loading]):not(:disabled):not([data-disabled]){--_button-bg:var(--button-hover,var(--mantine-primary-color-filled-hover));--_button-color:var(--button-hover-color)}}@media (hover:none){.m-77c9d27d:active:not([data-loading]):not(:disabled):not([data-disabled]){--_button-bg:var(--button-hover,var(--mantine-primary-color-filled-hover));--_button-color:var(--button-hover-color)}}[data-mantine-color-scheme=light] .m-77c9d27d{--_disabled-color:var(--mantine-color-gray-5);--_disabled-bg:var(--mantine-color-gray-1);--_button-loading-overlay-bg:hsla(0,0%,100%,.15)}[data-mantine-color-scheme=dark] .m-77c9d27d{--_disabled-color:var(--mantine-color-dark-3);--_disabled-bg:var(--mantine-color-dark-6);--_button-loading-overlay-bg:rgba(0,0,0,.15)}.m-80f1301b{justify-content:var(--button-justify,center);overflow:visible;transition:transform .15s ease,opacity .1s ease}.m-80f1301b,.m-811560b9{align-items:center;display:flex;height:100%}.m-811560b9{opacity:var(--_button-label-opacity,1);overflow:hidden;white-space:nowrap}.m-811560b9[data-loading]{--_button-label-opacity:.2}.m-a74036a{align-items:center;display:flex;margin-left:var(--_button-section-margin-left);margin-right:var(--_button-section-margin-right)}.m-a74036a[data-position=left]{--_button-section-margin-right:var(--mantine-spacing-xs)}[dir=rtl] .m-a74036a[data-position=left]{--_button-section-margin-right:0}.m-a74036a[data-position=right],[dir=rtl] .m-a74036a[data-position=left]{--_button-section-margin-left:var(--mantine-spacing-xs)}[dir=rtl] .m-a74036a[data-position=right]{--_button-section-margin-left:0;--_button-section-margin-right:var(--mantine-spacing-xs)}.m-a25b86ee{left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-200%);transition:transform .15s ease,opacity .1s ease}.m-80d6d844{--button-border-width:calc(.0625rem*var(--mantine-scale));display:flex}.m-80d6d844[data-orientation=horizontal]{flex-direction:row}.m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):first-child{border-bottom-right-radius:0;border-right-width:calc(var(--button-border-width)/2);border-top-right-radius:0}.m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):last-child{border-bottom-left-radius:0;border-left-width:calc(var(--button-border-width)/2);border-top-left-radius:0}.m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):not(:first-child):not(:last-child){border-left-width:calc(var(--button-border-width)/2);border-radius:0;border-right-width:calc(var(--button-border-width)/2)}[dir=rtl] .m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):first-child{border:var(--_button-bd,var(--button-bd,calc(.0625rem*var(--mantine-scale)) solid transparent));border-radius:var(--button-radius,var(--mantine-radius-default));border-bottom-left-radius:0;border-left-width:calc(var(--button-border-width)/2);border-top-left-radius:0}[dir=rtl] .m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):last-child{border:var(--_button-bd,var(--button-bd,calc(.0625rem*var(--mantine-scale)) solid transparent));border-radius:var(--button-radius,var(--mantine-radius-default));border-bottom-right-radius:0;border-right-width:calc(var(--button-border-width)/2);border-top-right-radius:0}.m-80d6d844[data-orientation=vertical]{flex-direction:column}.m-80d6d844[data-orientation=vertical] .m-77c9d27d:not(:only-child):first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:calc(var(--button-border-width)/2)}.m-80d6d844[data-orientation=vertical] .m-77c9d27d:not(:only-child):last-child{border-top-left-radius:0;border-top-right-radius:0;border-top-width:calc(var(--button-border-width)/2)}.m-80d6d844[data-orientation=vertical] .m-77c9d27d:not(:only-child):not(:first-child):not(:last-child){border-bottom-width:calc(var(--button-border-width)/2);border-radius:0;border-top-width:calc(var(--button-border-width)/2)}.m-e615b15f{--card-padding:var(--mantine-spacing-md);background-color:var(--_card-bg);color:var(--mantine-color-text);display:flex;flex-direction:column;overflow:hidden;padding:var(--card-padding);position:relative}[data-mantine-color-scheme=light] .m-e615b15f{--_card-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-e615b15f{--_card-bg:var(--mantine-color-dark-6)}.m-599a2148{border-bottom:var(--_card-section-border-bottom,unset);border-top:var(--_card-section-border-top,unset);display:block;margin:var(--_card-section-mt,0) calc(var(--card-padding)*-1) var(--_card-section-mb,0);padding-left:var(--_card-section-padding,0);padding-right:var(--_card-section-padding,0)}.m-599a2148[data-first-section]{--_card-section-mt:calc(var(--card-padding)*-1);--_card-section-border-top:none!important}.m-599a2148[data-last-section]{--_card-section-mb:calc(var(--card-padding)*-1);--_card-section-border-bottom:none!important}.m-599a2148[data-inherit-padding]{--_card-section-padding:var(--card-padding)}.m-599a2148[data-with-border]{--_card-section-border-top:calc(.0625rem*var(--mantine-scale)) solid var(--_card-section-border-color);--_card-section-border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_card-section-border-color)}.m-599a2148+.m-599a2148{--_card-section-border-top:none!important}[data-mantine-color-scheme=light] .m-599a2148{--_card-section-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-599a2148{--_card-section-border-color:var(--mantine-color-dark-4)}.m-4451eb3a{align-items:center;display:var(--_center-display,flex);justify-content:center}.m-4451eb3a[data-inline]{--_center-display:inline-flex}.m-f59ffda3{--chip-size-xs:calc(1.4375rem*var(--mantine-scale));--chip-size-sm:calc(1.75rem*var(--mantine-scale));--chip-size-md:calc(2rem*var(--mantine-scale));--chip-size-lg:calc(2.25rem*var(--mantine-scale));--chip-size-xl:calc(2.5rem*var(--mantine-scale));--chip-icon-size-xs:calc(.625rem*var(--mantine-scale));--chip-icon-size-sm:calc(.75rem*var(--mantine-scale));--chip-icon-size-md:calc(.875rem*var(--mantine-scale));--chip-icon-size-lg:calc(1rem*var(--mantine-scale));--chip-icon-size-xl:calc(1.125rem*var(--mantine-scale));--chip-padding-xs:calc(1rem*var(--mantine-scale));--chip-padding-sm:calc(1.25rem*var(--mantine-scale));--chip-padding-md:calc(1.5rem*var(--mantine-scale));--chip-padding-lg:calc(1.75rem*var(--mantine-scale));--chip-padding-xl:calc(2rem*var(--mantine-scale));--chip-checked-padding-xs:calc(.46875rem*var(--mantine-scale));--chip-checked-padding-sm:calc(.625rem*var(--mantine-scale));--chip-checked-padding-md:calc(.73125rem*var(--mantine-scale));--chip-checked-padding-lg:calc(.84375rem*var(--mantine-scale));--chip-checked-padding-xl:calc(.78125rem*var(--mantine-scale));--chip-spacing-xs:calc(.625rem*var(--mantine-scale));--chip-spacing-sm:calc(.75rem*var(--mantine-scale));--chip-spacing-md:calc(1rem*var(--mantine-scale));--chip-spacing-lg:calc(1.25rem*var(--mantine-scale));--chip-spacing-xl:calc(1.375rem*var(--mantine-scale));--chip-size:var(--chip-size-sm);--chip-icon-size:var(--chip-icon-size-sm);--chip-padding:var(--chip-padding-sm);--chip-spacing:var(--chip-spacing-sm);--chip-checked-padding:var(--chip-checked-padding-sm);--chip-bg:var(--mantine-primary-color-filled);--chip-hover:var(--mantine-primary-color-filled-hover);--chip-color:var(--mantine-color-white);--chip-bd:calc(.0625rem*var(--mantine-scale)) solid transparent}.m-be049a53{-webkit-tap-highlight-color:transparent;align-items:center;background-color:var(--_chip-bg);border:calc(.0625rem*var(--mantine-scale)) solid transparent;border-radius:var(--chip-radius,calc(62.5rem*var(--mantine-scale)));color:var(--_chip-color,var(--mantine-color-text));cursor:var(--_chip-cursor,pointer);display:inline-flex;font-size:var(--chip-fz,var(--mantine-font-size-sm));height:var(--chip-size);line-height:calc(var(--chip-size) - .125rem*var(--mantine-scale));padding-left:var(--_chip-padding,var(--chip-padding));padding-right:var(--_chip-padding,var(--chip-padding));-webkit-user-select:none;user-select:none;white-space:nowrap}.m-be049a53[data-checked]{--_chip-padding:var(--chip-checked-padding)}[data-mantine-color-scheme=light] .m-be049a53[data-disabled]{--_chip-bg:var(--mantine-color-gray-2);--_chip-color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-be049a53[data-disabled]{--_chip-bg:var(--mantine-color-dark-6);--_chip-color:var(--mantine-color-dark-3)}.m-be049a53[data-disabled]{--_chip-cursor:not-allowed}.m-3904c1af:not([data-disabled]){background-color:var(--_chip-bg);border:var(--_chip-bd)}@media (hover:hover){[data-mantine-color-scheme=light] .m-3904c1af:not([data-disabled]):hover{--_chip-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-3904c1af:not([data-disabled]):hover{--_chip-bg:var(--mantine-color-dark-5)}}@media (hover:none){[data-mantine-color-scheme=light] .m-3904c1af:not([data-disabled]):active{--_chip-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-3904c1af:not([data-disabled]):active{--_chip-bg:var(--mantine-color-dark-5)}}[data-mantine-color-scheme=light] .m-3904c1af:not([data-disabled]){--_chip-bg:var(--mantine-color-white);--_chip-bd:calc(.0625rem*var(--mantine-scale)) solid var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-3904c1af:not([data-disabled]){--_chip-bg:var(--mantine-color-dark-6);--_chip-bd:calc(.0625rem*var(--mantine-scale)) solid var(--mantine-color-dark-4)}[data-mantine-color-scheme] .m-3904c1af:not([data-disabled])[data-checked]{--_chip-bd:var(--chip-bd);--_chip-icon-color:var(--chip-color)}@media (hover:hover){[data-mantine-color-scheme] .m-3904c1af:not([data-disabled])[data-checked]:hover{--_chip-bg:var(--chip-hover)}}@media (hover:none){[data-mantine-color-scheme] .m-3904c1af:not([data-disabled])[data-checked]:active{--_chip-bg:var(--chip-hover)}}.m-f7e165c3:not([data-disabled]),.m-fa109255:not([data-disabled]){background-color:var(--_chip-bg);border:calc(.0625rem*var(--mantine-scale)) solid transparent;color:var(--_chip-color,var(--mantine-color-text))}@media (hover:hover){[data-mantine-color-scheme=light] .m-f7e165c3:not([data-disabled]):hover,[data-mantine-color-scheme=light] .m-fa109255:not([data-disabled]):hover{--_chip-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-f7e165c3:not([data-disabled]):hover,[data-mantine-color-scheme=dark] .m-fa109255:not([data-disabled]):hover{--_chip-bg:var(--mantine-color-dark-4)}}@media (hover:none){[data-mantine-color-scheme=light] .m-f7e165c3:not([data-disabled]):active,[data-mantine-color-scheme=light] .m-fa109255:not([data-disabled]):active{--_chip-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-f7e165c3:not([data-disabled]):active,[data-mantine-color-scheme=dark] .m-fa109255:not([data-disabled]):active{--_chip-bg:var(--mantine-color-dark-4)}}[data-mantine-color-scheme=light] .m-f7e165c3:not([data-disabled]),[data-mantine-color-scheme=light] .m-fa109255:not([data-disabled]){--_chip-bg:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m-f7e165c3:not([data-disabled]),[data-mantine-color-scheme=dark] .m-fa109255:not([data-disabled]){--_chip-bg:var(--mantine-color-dark-5)}[data-mantine-color-scheme] .m-f7e165c3:not([data-disabled])[data-checked],[data-mantine-color-scheme] .m-fa109255:not([data-disabled])[data-checked]{--_chip-icon-color:var(--chip-color);--_chip-color:var(--chip-color);--_chip-bg:var(--chip-bg)}@media (hover:hover){[data-mantine-color-scheme] .m-f7e165c3:not([data-disabled])[data-checked]:hover,[data-mantine-color-scheme] .m-fa109255:not([data-disabled])[data-checked]:hover{--_chip-bg:var(--chip-hover)}}@media (hover:none){[data-mantine-color-scheme] .m-f7e165c3:not([data-disabled])[data-checked]:active,[data-mantine-color-scheme] .m-fa109255:not([data-disabled])[data-checked]:active{--_chip-bg:var(--chip-hover)}}.m-9ac86df9{align-items:center;display:flex;max-width:calc(var(--chip-icon-size) + var(--chip-spacing)/1.5);overflow:hidden;width:calc(var(--chip-icon-size) + var(--chip-spacing)/1.5)}.m-9ac86df9,.m-d6d72580{height:var(--chip-icon-size)}.m-d6d72580{color:var(--_chip-icon-color,inherit);display:block;width:var(--chip-icon-size)}.m-bde07329{height:0;margin:0;opacity:0;padding:0;width:0}.m-bde07329:focus-visible+.m-be049a53{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.m-b183c0a2{background-color:var(--_code-bg);border-radius:var(--mantine-radius-sm);color:var(--_code-color);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);line-height:var(--mantine-line-height);margin:0;overflow:auto;padding:var(--_code-padding,calc(.125rem*var(--mantine-scale)) calc(var(--mantine-spacing-xs)/2))}[data-mantine-color-scheme=light] .m-b183c0a2{--_code-bg:var(--code-bg,var(--mantine-color-gray-1));--_code-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-b183c0a2{--_code-bg:var(--code-bg,var(--mantine-color-dark-5));--_code-color:var(--mantine-color-white)}.m-b183c0a2[data-block]{--_code-padding:var(--mantine-spacing-xs)}.m-fee9c77{--cp-width-xs:calc(11.25rem*var(--mantine-scale));--cp-width-sm:calc(12.5rem*var(--mantine-scale));--cp-width-md:calc(15rem*var(--mantine-scale));--cp-width-lg:calc(17.5rem*var(--mantine-scale));--cp-width-xl:calc(20rem*var(--mantine-scale));--cp-preview-size-xs:calc(1.625rem*var(--mantine-scale));--cp-preview-size-sm:calc(2.125rem*var(--mantine-scale));--cp-preview-size-md:calc(2.625rem*var(--mantine-scale));--cp-preview-size-lg:calc(3.125rem*var(--mantine-scale));--cp-preview-size-xl:calc(3.375rem*var(--mantine-scale));--cp-thumb-size-xs:calc(.5rem*var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem*var(--mantine-scale));--cp-thumb-size-md:calc(1rem*var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem*var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem*var(--mantine-scale));--cp-saturation-height-xs:calc(6.25rem*var(--mantine-scale));--cp-saturation-height-sm:calc(6.875rem*var(--mantine-scale));--cp-saturation-height-md:calc(7.5rem*var(--mantine-scale));--cp-saturation-height-lg:calc(8.75rem*var(--mantine-scale));--cp-saturation-height-xl:calc(10rem*var(--mantine-scale));--cp-preview-size:var(--cp-preview-size-sm);--cp-thumb-size:var(--cp-thumb-size-sm);--cp-saturation-height:var(--cp-saturation-height-sm);--cp-width:var(--cp-width-sm);--cp-body-spacing:var(--mantine-spacing-sm);padding:calc(.0625rem*var(--mantine-scale));width:var(--_cp-width,var(--cp-width))}.m-fee9c77[data-full-width]{--_cp-width:100%}.m-9dddfbac{height:var(--cp-preview-size);width:var(--cp-preview-size)}.m-bffecc3e{display:flex;padding-top:calc(var(--cp-body-spacing)/2)}.m-3283bb96{flex:1}.m-3283bb96:not(:only-child){margin-right:var(--mantine-spacing-xs)}.m-40d572ba{border:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-white);border-radius:var(--_cp-thumb-size);box-shadow:0 0 calc(.0625rem*var(--mantine-scale)) #0009;height:var(--_cp-thumb-size);left:calc(var(--_thumb-x-offset) - var(--_cp-thumb-size)/2);outline:var(--_outline);overflow:hidden;position:absolute;top:calc(var(--_thumb-y-offset) - var(--_cp-thumb-size)/2);width:var(--_cp-thumb-size)}.m-d8ee6fd8{cursor:pointer;flex:0 0 calc(var(--cp-swatch-size) - .25rem*var(--mantine-scale));height:unset!important;margin:calc(.125rem*var(--mantine-scale));min-height:0!important;min-width:0!important;padding-bottom:calc(var(--cp-swatch-size) - .25rem*var(--mantine-scale));width:unset!important}.m-5711e686{display:flex;flex-wrap:wrap;margin-left:calc(-.125rem*var(--mantine-scale));margin-right:calc(-.125rem*var(--mantine-scale));margin-top:calc(.3125rem*var(--mantine-scale))}.m-202a296e{--cp-thumb-size-xs:calc(.5rem*var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem*var(--mantine-scale));--cp-thumb-size-md:calc(1rem*var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem*var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem*var(--mantine-scale));--_cp-thumb-size:var(--cp-thumb-size,calc(.75rem*var(--mantine-scale)));-webkit-tap-highlight-color:transparent;border-radius:var(--mantine-radius-sm);height:var(--cp-saturation-height);margin:calc(var(--cp-thumb-size)/2);position:relative}.m-202a296e[data-focus-ring=auto]:focus:focus-visible .m-40d572ba{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-202a296e[data-focus-ring=always]:focus .m-40d572ba{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-11b3db02{border-radius:var(--mantine-radius-sm);inset:calc(var(--cp-thumb-size)*-1/2 - .0625rem*var(--mantine-scale));position:absolute}.m-d856d47d{--cp-thumb-size-xs:calc(.5rem*var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem*var(--mantine-scale));--cp-thumb-size-md:calc(1rem*var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem*var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem*var(--mantine-scale));--_cp-thumb-size:var(--cp-thumb-size,calc(.75rem*var(--mantine-scale)));height:calc(var(--_cp-thumb-size) + .125rem*var(--mantine-scale));margin-left:calc(var(--_cp-thumb-size)/2);margin-right:calc(var(--_cp-thumb-size)/2);outline:none;position:relative}.m-d856d47d+.m-d856d47d{margin-top:calc(.375rem*var(--mantine-scale))}.m-d856d47d[data-focus-ring=auto]:focus:focus-visible .m-40d572ba{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-d856d47d[data-focus-ring=always]:focus .m-40d572ba{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}[data-mantine-color-scheme=light] .m-d856d47d{--_slider-checkers:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-d856d47d{--_slider-checkers:var(--mantine-color-dark-4)}.m-8f327113{border-radius:10000rem;bottom:0;left:calc(var(--_cp-thumb-size)*-1/2 - .0625rem*var(--mantine-scale));position:absolute;right:calc(var(--_cp-thumb-size)*-1/2 - .0625rem*var(--mantine-scale));top:0}.m-de3d2490{--cs-size:calc(1.75rem*var(--mantine-scale));--cs-radius:calc(62.5rem*var(--mantine-scale));-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:var(--cs-radius);color:inherit;display:block;height:var(--cs-size);line-height:1;min-height:var(--cs-size);min-width:var(--cs-size);position:relative;text-decoration:none;width:var(--cs-size)}[data-mantine-color-scheme=light] .m-de3d2490{--_alpha-overlay-color:var(--mantine-color-gray-3);--_alpha-overlay-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-de3d2490{--_alpha-overlay-color:var(--mantine-color-dark-4);--_alpha-overlay-bg:var(--mantine-color-dark-7)}.m-862f3d1b,.m-98ae7f22{border-radius:var(--cs-radius);top:0;right:0;bottom:0;left:0;position:absolute}.m-98ae7f22{box-shadow:#0000001a 0 0 0 calc(.0625rem*var(--mantine-scale)) inset,#00000026 0 0 calc(.25rem*var(--mantine-scale)) inset;z-index:1}.m-95709ac0{background-image:linear-gradient(45deg,var(--_alpha-overlay-color) 25%,transparent 25%),linear-gradient(-45deg,var(--_alpha-overlay-color) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--_alpha-overlay-color) 75%),linear-gradient(-45deg,var(--_alpha-overlay-bg) 75%,var(--_alpha-overlay-color) 75%);background-position:0 0,0 calc(.25rem*var(--mantine-scale)),calc(.25rem*var(--mantine-scale)) calc(-.25rem*var(--mantine-scale)),calc(-.25rem*var(--mantine-scale)) 0;background-size:calc(.5rem*var(--mantine-scale)) calc(.5rem*var(--mantine-scale))}.m-93e74e3,.m-95709ac0{border-radius:var(--cs-radius);top:0;right:0;bottom:0;left:0;position:absolute}.m-93e74e3{align-items:center;display:flex;justify-content:center;z-index:2}.m-b077c2bc{--ci-eye-dropper-icon-size-xs:calc(.875rem*var(--mantine-scale));--ci-eye-dropper-icon-size-sm:calc(1rem*var(--mantine-scale));--ci-eye-dropper-icon-size-md:calc(1.125rem*var(--mantine-scale));--ci-eye-dropper-icon-size-lg:calc(1.25rem*var(--mantine-scale));--ci-eye-dropper-icon-size-xl:calc(1.375rem*var(--mantine-scale));--ci-eye-dropper-icon-size:var(--ci-eye-dropper-icon-size-sm)}.m-c5ccdcab{--ci-preview-size-xs:calc(1rem*var(--mantine-scale));--ci-preview-size-sm:calc(1.125rem*var(--mantine-scale));--ci-preview-size-md:calc(1.375rem*var(--mantine-scale));--ci-preview-size-lg:calc(1.75rem*var(--mantine-scale));--ci-preview-size-xl:calc(2.25rem*var(--mantine-scale));--ci-preview-size:var(--ci-preview-size-sm)}.m-5ece2cd7{padding:calc(.5rem*var(--mantine-scale))}.m-7485cace{--container-size-xs:calc(33.75rem*var(--mantine-scale));--container-size-sm:calc(45rem*var(--mantine-scale));--container-size-md:calc(60rem*var(--mantine-scale));--container-size-lg:calc(71.25rem*var(--mantine-scale));--container-size-xl:calc(82.5rem*var(--mantine-scale));--container-size:var(--container-size-md);margin-left:auto;margin-right:auto;max-width:var(--container-size);padding-left:var(--mantine-spacing-md);padding-right:var(--mantine-spacing-md)}.m-7485cace[data-fluid]{--container-size:100%}.m-e2125a27{--dialog-size-xs:calc(10rem*var(--mantine-scale));--dialog-size-sm:calc(12.5rem*var(--mantine-scale));--dialog-size-md:calc(21.25rem*var(--mantine-scale));--dialog-size-lg:calc(25rem*var(--mantine-scale));--dialog-size-xl:calc(31.25rem*var(--mantine-scale));--dialog-size:var(--dialog-size-md);max-width:calc(100vw - var(--mantine-spacing-xl)*2);min-height:calc(3.125rem*var(--mantine-scale));position:relative;width:var(--dialog-size)}.m-5abab665{left:var(--_close-button-left,auto);position:absolute;right:var(--_close-button-right,calc(var(--mantine-spacing-md)/2));top:calc(var(--mantine-spacing-md)/2)}[dir=rtl] .m-5abab665{--_close-button-right:auto;--_close-button-left:calc(var(--mantine-spacing-md)/2)}.m-3eebeb36{--divider-size-xs:calc(.0625rem*var(--mantine-scale));--divider-size-sm:calc(.125rem*var(--mantine-scale));--divider-size-md:calc(.1875rem*var(--mantine-scale));--divider-size-lg:calc(.25rem*var(--mantine-scale));--divider-size-xl:calc(.3125rem*var(--mantine-scale));--divider-size:var(--divider-size-xs)}[data-mantine-color-scheme=light] .m-3eebeb36{--_divider-color:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-3eebeb36{--_divider-color:var(--mantine-color-dark-3)}.m-3eebeb36[data-orientation=horizontal]{border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color,var(--_divider-color))}.m-3eebeb36[data-orientation=vertical]{align-self:stretch;border-left:var(--divider-size) var(--divider-border-style,solid) var(--divider-color,var(--_divider-color));height:auto}.m-3eebeb36[data-with-label]{border:0}.m-9e365f20{align-items:center;color:var(--divider-color,var(--mantine-color-dimmed));display:flex;font-size:var(--mantine-font-size-xs);white-space:nowrap}.m-9e365f20[data-position=left]:before,.m-9e365f20[data-position=right]:after{display:none}.m-9e365f20:before{border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color,var(--_divider-color));content:"";flex:1;height:calc(.0625rem*var(--mantine-scale));margin-right:var(--mantine-spacing-xs)}[dir=rtl] .m-9e365f20:before{margin-left:var(--mantine-spacing-xs);margin-right:0}.m-9e365f20:after{border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color,var(--_divider-color));content:"";flex:1;height:calc(.0625rem*var(--mantine-scale));margin-left:var(--mantine-spacing-xs)}[dir=rtl] .m-9e365f20:after{margin-left:0;margin-right:var(--mantine-spacing-xs)}.m-f11b401e{--drawer-size-xs:calc(20rem*var(--mantine-scale));--drawer-size-sm:calc(23.75rem*var(--mantine-scale));--drawer-size-md:calc(27.5rem*var(--mantine-scale));--drawer-size-lg:calc(38.75rem*var(--mantine-scale));--drawer-size-xl:calc(48.75rem*var(--mantine-scale));--drawer-size:var(--drawer-size-md);--drawer-offset:0rem}.m-5a7c2c9{z-index:1000}.m-b8a05bbd{flex:var(--drawer-flex,0 0 var(--drawer-size));height:var(--drawer-height,calc(100% - var(--drawer-offset)*2));margin:var(--drawer-offset);max-height:100%;max-width:100%;overflow-y:auto}.m-31cd769a{align-items:var(--drawer-align,flex-start);display:flex;justify-content:var(--drawer-justify,flex-start)}.m-e9408a47{border-radius:var(--fieldset-radius,var(--mantine-radius-default));min-inline-size:auto;padding:var(--mantine-spacing-lg);padding-top:var(--mantine-spacing-xs)}.m-84c9523a{background-color:var(--_bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_bd)}[data-mantine-color-scheme=light] .m-84c9523a{--_bd:var(--mantine-color-gray-3);--_bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-84c9523a{--_bd:var(--mantine-color-dark-4);--_bg:var(--mantine-color-dark-7)}.m-ef274e49{background-color:var(--_bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_bd)}[data-mantine-color-scheme=light] .m-ef274e49{--_bd:var(--mantine-color-gray-3);--_bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-ef274e49{--_bd:var(--mantine-color-dark-4);--_bg:var(--mantine-color-dark-6)}.m-eda993d3{border:0;border-radius:0;padding:0}.m-90794832{font-size:var(--mantine-font-size-sm)}.m-74ca27fe{margin-bottom:var(--mantine-spacing-sm);padding:0}.m-410352e9{overflow:var(--grid-overflow,hidden)}.m-dee7bd2f{align-items:var(--grid-align);display:flex;flex-wrap:wrap;justify-content:var(--grid-justify);margin:calc(var(--grid-gutter)/-2);width:calc(100% + var(--grid-gutter))}.m-96bdd299{flex-basis:var(--col-flex-basis);flex-grow:var(--col-flex-grow,0);flex-shrink:0;margin-left:var(--_col-ml,var(--col-offset,0));margin-right:var(--_col-mr,0);max-width:var(--col-max-width);order:var(--col-order);padding:calc(var(--grid-gutter)/2);width:var(--col-width)}[dir=rtl] .m-96bdd299{--_col-ml:0;--_col-mr:var(--col-offset,0)}.m-bcb3f3c2{background-color:var(--_mark-bg);color:var(--mantine-color-black)}[data-mantine-color-scheme=light] .m-bcb3f3c2{--_mark-bg:var(--mark-bg-light)}[data-mantine-color-scheme=dark] .m-bcb3f3c2{--_mark-bg:var(--mark-bg-dark)}.m-9e117634{border-radius:var(--image-radius,0);display:block;flex:0;object-fit:var(--image-object-fit,cover);width:100%}@keyframes m-885901b1{0%{box-shadow:0 0 calc(.03125rem*var(--mantine-scale)) 0 var(--indicator-color);opacity:.6}to{box-shadow:0 0 calc(.03125rem*var(--mantine-scale)) calc(.275rem*var(--mantine-scale)) var(--indicator-color);opacity:0}}.m-e5262200{--indicator-size:calc(.625rem*var(--mantine-scale));--indicator-color:var(--mantine-primary-color-filled);display:var(--_indicator-display,block);position:relative}.m-e5262200[data-inline]{--_indicator-display:inline-block}.m-760d1fb1{align-items:center;border:var(--_indicator-border);border-radius:var(--indicator-radius,calc(62.5rem*var(--mantine-scale)));bottom:var(--indicator-bottom);color:var(--mantine-color-white);display:flex;font-size:var(--mantine-font-size-xs);height:var(--indicator-size);justify-content:center;left:var(--indicator-left);min-width:var(--indicator-size);padding-left:var(--_indicator-padding,0);padding-right:var(--_indicator-padding,0);right:var(--indicator-right);top:var(--indicator-top);transform:translate(var(--indicator-translate-x),var(--indicator-translate-y));white-space:nowrap;z-index:var(--indicator-z-index,200)}.m-760d1fb1,.m-760d1fb1:before{background-color:var(--indicator-color);position:absolute}.m-760d1fb1:before{border-radius:var(--indicator-radius,calc(62.5rem*var(--mantine-scale)));content:"";top:0;right:0;bottom:0;left:0;z-index:-1}.m-760d1fb1[data-with-label]{--_indicator-padding:calc(var(--mantine-spacing-xs)/2)}.m-760d1fb1[data-with-border]{--_indicator-border:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-body)}.m-760d1fb1[data-processing]:before{animation:m-885901b1 1s linear infinite}.m-dc6f14e2{--kbd-fz-xs:calc(.625rem*var(--mantine-scale));--kbd-fz-sm:calc(.75rem*var(--mantine-scale));--kbd-fz-md:calc(.875rem*var(--mantine-scale));--kbd-fz-lg:calc(1rem*var(--mantine-scale));--kbd-fz-xl:calc(1.25rem*var(--mantine-scale));--kbd-fz:var(--kbd-fz-sm);--kbd-padding-xs:calc(.125rem*var(--mantine-scale)) calc(.25rem*var(--mantine-scale));--kbd-padding-sm:calc(.1875rem*var(--mantine-scale)) calc(.3125rem*var(--mantine-scale));--kbd-padding-md:calc(.25rem*var(--mantine-scale)) calc(.4375rem*var(--mantine-scale));--kbd-padding-lg:calc(.3125rem*var(--mantine-scale)) calc(.5625rem*var(--mantine-scale));--kbd-padding-xl:calc(.5rem*var(--mantine-scale)) calc(.875rem*var(--mantine-scale));--kbd-padding:var(--kbd-padding-sm);background-color:var(--_kbd-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_kbd-border-color);border-bottom-width:calc(.1875rem*var(--mantine-scale));border-radius:var(--mantine-radius-sm);color:var(--_kbd-color);font-family:var(--mantine-font-family-monospace);font-size:var(--kbd-fz);font-weight:700;line-height:var(--mantine-line-height);padding:var(--kbd-padding);unicode-bidi:embed}[data-mantine-color-scheme=light] .m-dc6f14e2{--_kbd-border-color:var(--mantine-color-gray-3);--_kbd-color:var(--mantine-color-gray-7);--_kbd-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-dc6f14e2{--_kbd-border-color:var(--mantine-color-dark-3);--_kbd-color:var(--mantine-color-dark-0);--_kbd-bg:var(--mantine-color-dark-5)}.m-abbac491{font-size:var(--list-fz,var(--mantine-fz-md));line-height:var(--list-lh,var(--mantine-line-height-md));list-style-position:inside;margin:0;padding:0;padding-left:var(--_list-pl,0);padding-right:var(--_list-pr,0)}.m-abbac491[data-with-padding]{--_list-pl:var(--mantine-spacing-md)}[dir=rtl] .m-abbac491[data-with-padding]{--_list-pl:0;--_list-pr:var(--mantine-spacing-md)}.m-abb6bec2{line-height:var(--_item-lh,var(--list-lh));list-style:var(--_item-list-style);margin-top:var(--_item-mt,0);white-space:nowrap}.m-abb6bec2[data-with-icon]{--_item-list-style:none}.m-abb6bec2[data-with-icon] .m-75cd9f71{--_item-wrapper-direction:row;--_item-wrapper-align:center}.m-abb6bec2:not(:first-of-type){--_item-mt:var(--list-spacing,0)}.m-abb6bec2[data-centered]{--_item-lh:1}.m-75cd9f71{align-items:var(--_item-wrapper-align,flex-start);display:inline-flex;flex-direction:var(--_item-wrapper-direction,column);white-space:normal}.m-60f83e5b{display:inline-block;margin-left:var(--_item-icon-ml,0);margin-right:var(--_item-icon-mr,var(--mantine-spacing-sm));vertical-align:middle}[dir=rtl] .m-60f83e5b{--_item-icon-mr:0;--_item-icon-ml:var(--mantine-spacing-sm)}.m-6e45937b{align-items:center;display:flex;top:0;right:0;bottom:0;left:0;justify-content:center;overflow:hidden;position:absolute;z-index:var(--lo-z-index)}.m-e8eb006c{position:relative;z-index:calc(var(--lo-z-index) + 1)}.m-df587f17{z-index:var(--lo-z-index)}[data-mantine-color-scheme=dark] .m-df587f17[data-light],[data-mantine-color-scheme=light] .m-df587f17[data-dark]{display:none}.m-dc9b7c9f{padding:calc(.25rem*var(--mantine-scale))}.m-9bfac126{color:var(--mantine-color-dimmed);cursor:default;font-size:var(--mantine-font-size-xs);font-weight:500;padding:calc(var(--mantine-spacing-xs)/2) var(--mantine-spacing-sm)}.m-efdf90cb{border-top:calc(.0625rem*var(--mantine-scale)) solid var(--_divider-color);margin-bottom:calc(.25rem*var(--mantine-scale));margin-top:calc(.25rem*var(--mantine-scale))}[data-mantine-color-scheme=light] .m-efdf90cb{--_divider-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-efdf90cb{--_divider-color:var(--mantine-color-dark-4)}.m-99ac2aa1{align-items:center;background-color:var(--_item-bg,transparent);border-radius:var(--popover-radius,var(--mantine-radius-default));color:var(--menu-item-color,var(--mantine-color-text));display:flex;font-size:var(--mantine-font-size-sm);opacity:var(--_item-opacity,1);padding:calc(var(--mantine-spacing-xs)/1.5) var(--mantine-spacing-sm);pointer-events:var(--_item-pointer-events,auto);-webkit-user-select:none;user-select:none;width:100%}.m-99ac2aa1:disabled,.m-99ac2aa1[data-disabled]{--menu-item-color:var(--mantine-color-dimmed)!important;--_item-opacity:.6;--_item-pointer-events:none}.m-99ac2aa1[data-hovered]{--_item-bg:var(--menu-item-hover,var(--_item-bg-hover))}[data-mantine-color-scheme=light] .m-99ac2aa1[data-hovered]{--_item-bg-hover:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m-99ac2aa1[data-hovered]{--_item-bg-hover:var(--mantine-color-dark-4)}.m-5476e0d3{flex:1}[dir=rtl] .m-5476e0d3{text-align:right}.m-8b75e504{align-items:center;display:flex;justify-content:center;margin-left:var(--_section-ml);margin-right:var(--_section-mr)}.m-8b75e504[data-position=left]{--_section-ml:0;--_section-mr:var(--mantine-spacing-xs)}.m-8b75e504[data-position=right],[dir=rtl] .m-8b75e504[data-position=left]{--_section-ml:var(--mantine-spacing-xs);--_section-mr:0}[dir=rtl] .m-8b75e504[data-position=right]{--_section-ml:0;--_section-mr:var(--mantine-spacing-xs)}.m-9df02822{--modal-size-xs:calc(20rem*var(--mantine-scale));--modal-size-sm:calc(23.75rem*var(--mantine-scale));--modal-size-md:calc(27.5rem*var(--mantine-scale));--modal-size-lg:calc(38.75rem*var(--mantine-scale));--modal-size-xl:calc(48.75rem*var(--mantine-scale));--modal-size:var(--modal-size-md);--modal-y-offset:5dvh;--modal-x-offset:5vw}.m-9df02822[data-full-screen]{--modal-border-radius:0!important}.m-9df02822[data-full-screen] .m-54c44539{--_content-flex:0 0 100%;--_content-max-height:auto;--_content-height:100dvh}.m-9df02822[data-full-screen] .m-1f958f16{--_inner-y-offset:0;--_inner-x-offset:0}.m-9df02822[data-centered] .m-1f958f16{--_inner-align:center}.m-d0e2b9cd{border-top-left-radius:var(--modal-radius,var(--mantine-radius-default));border-top-right-radius:var(--modal-radius,var(--mantine-radius-default))}.m-54c44539{flex:var(--_content-flex,0 0 var(--modal-size));height:var(--_content-height,auto);max-height:var(--_content-max-height,calc(100dvh - var(--modal-y-offset)*2));max-width:100%;overflow-y:auto}.m-1f958f16{align-items:var(--_inner-align,flex-start);display:flex;justify-content:center;padding:var(--_inner-y-offset,var(--modal-y-offset)) var(--_inner-x-offset,var(--modal-x-offset))}.m-45c4369d{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;color:inherit;flex:1;font-size:inherit;height:1.6em;min-width:calc(6.25rem*var(--mantine-scale));padding:0}.m-45c4369d::placeholder{color:var(--_input-placeholder-color);opacity:1}.m-45c4369d[data-type=auto],.m-45c4369d[data-type=hidden]{height:calc(.0625rem*var(--mantine-scale));left:0;opacity:0;pointer-events:none;position:absolute;top:0;width:calc(.0625rem*var(--mantine-scale))}.m-45c4369d:focus{outline:none}.m-45c4369d[data-type=auto]:focus{height:1.6em;opacity:1;position:static;visibility:visible}.m-45c4369d[data-pointer]:not([data-disabled],:disabled){cursor:pointer}.m-45c4369d:disabled,.m-45c4369d[data-disabled]{cursor:not-allowed}.m-7cda1cd6{--pill-fz-xs:calc(.625rem*var(--mantine-scale));--pill-fz-sm:calc(.75rem*var(--mantine-scale));--pill-fz-md:calc(.875rem*var(--mantine-scale));--pill-fz-lg:calc(1rem*var(--mantine-scale));--pill-fz-xl:calc(1.125rem*var(--mantine-scale));--pill-height-xs:calc(1.125rem*var(--mantine-scale));--pill-height-sm:calc(1.375rem*var(--mantine-scale));--pill-height-md:calc(1.5625rem*var(--mantine-scale));--pill-height-lg:calc(1.75rem*var(--mantine-scale));--pill-height-xl:calc(2rem*var(--mantine-scale));--pill-fz:var(--pill-fz-sm);--pill-height:var(--pill-height-sm);align-items:center;background-color:var(--_pill-bg);border-radius:var(--pill-radius,calc(62.5rem*var(--mantine-scale)));color:var(--_pill-color);display:inline-flex;flex:0;font-size:var(--pill-fz);height:var(--pill-height);line-height:1;max-width:100%;padding-left:.8em;padding-right:var(--_pill-padding-right,.8em);user-select:none;-webkit-user-select:none;white-space:nowrap}[data-mantine-color-scheme=dark] .m-7cda1cd6{--_pill-bg:var(--mantine-color-dark-7);--_pill-color:var(--mantine-color-dark-0)}[data-mantine-color-scheme=light] .m-7cda1cd6{--_pill-color:var(--mantine-color-black)}[dir=rtl] .m-7cda1cd6{padding-left:var(--_pill-padding-right,.8em);padding-right:.8em}.m-7cda1cd6[data-with-remove]{--_pill-padding-right:0}.m-7cda1cd6:has(button:disabled),.m-7cda1cd6[data-disabled]{--_pill-cursor:not-allowed}[data-mantine-color-scheme=light] .m-44da308b{--_pill-bg:var(--mantine-color-gray-1)}[data-mantine-color-scheme=light] .m-44da308b:has(button:disabled),[data-mantine-color-scheme=light] .m-44da308b[data-disabled]{--_pill-bg:var(--mantine-color-gray-3)}[data-mantine-color-scheme=light] .m-e3a01f8{--_pill-bg:var(--mantine-color-white)}[data-mantine-color-scheme=light] .m-e3a01f8:has(button:disabled),[data-mantine-color-scheme=light] .m-e3a01f8[data-disabled]{--_pill-bg:var(--mantine-color-gray-3)}.m-1e0e6180{cursor:var(--_pill-cursor,default);height:100%;line-height:var(--pill-height);overflow:hidden;text-overflow:ellipsis}.m-ae386778{border-radius:0;color:inherit;flex:0;font-size:inherit;height:100%;min-height:unset;min-width:2em;padding-left:.1em;padding-right:.3em;width:unset}.m-7cda1cd6[data-disabled]>.m-ae386778,.m-ae386778:disabled{background-color:transparent;cursor:not-allowed;min-width:.8em;padding:0;width:.8em}.m-7cda1cd6[data-disabled]>.m-ae386778>svg,.m-ae386778:disabled>svg{display:none}.m-ae386778>svg{pointer-events:none}.m-1dcfd90b{--pg-gap-xs:calc(.375rem*var(--mantine-scale));--pg-gap-sm:calc(.5rem*var(--mantine-scale));--pg-gap-md:calc(.625rem*var(--mantine-scale));--pg-gap-lg:calc(.75rem*var(--mantine-scale));--pg-gap-xl:calc(.75rem*var(--mantine-scale));--pg-gap:var(--pg-gap-sm);flex-wrap:wrap;gap:var(--pg-gap)}.m-1dcfd90b,.m-f0824112{align-items:center;display:flex}.m-f0824112{--nl-bg:var(--mantine-primary-color-light);--nl-hover:var(--mantine-primary-color-light-hover);--nl-color:var(--mantine-primary-color-light-color);background:var(--_nav-link-bg);color:var(--_nav-link-color);opacity:var(--_nav-link-opacity,1);padding:calc(.5rem*var(--mantine-scale)) var(--mantine-spacing-sm);pointer-events:var(--_nav-link-pointer-events,auto);-webkit-user-select:none;user-select:none;width:100%}@media (hover:hover){[data-mantine-color-scheme=light] .m-f0824112:hover{--_nav-link-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-f0824112:hover{--_nav-link-bg:var(--mantine-color-dark-6)}}@media (hover:none){[data-mantine-color-scheme=light] .m-f0824112:active{--_nav-link-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-f0824112:active{--_nav-link-bg:var(--mantine-color-dark-6)}}.m-f0824112[data-disabled]{--_nav-link-opacity:.4;--_nav-link-pointer-events:none}.m-f0824112[data-active]{--_nav-link-bg:var(--nl-bg);--_nav-link-color:var(--nl-color)}@media (hover:hover){.m-f0824112[data-active]:hover{--_nav-link-bg:var(--nl-hover)}}@media (hover:none){.m-f0824112[data-active]:active{--_nav-link-bg:var(--nl-hover)}}.m-f0824112[data-active] .m-57492dcc{--_description-opacity:.9;--_description-color:var(--nl-color)}.m-690090b5{align-items:center;display:flex;justify-content:center;margin-left:var(--_section-ml);margin-right:var(--_section-mr);transform:var(--_section-transform,none);transition:transform .15s ease}.m-690090b5>svg{display:block}.m-690090b5[data-position=left]{--_section-ml:0;--_section-mr:var(--mantine-spacing-sm)}.m-690090b5[data-position=right],[dir=rtl] .m-690090b5[data-position=left]{--_section-ml:var(--mantine-spacing-sm);--_section-mr:0}[dir=rtl] .m-690090b5[data-position=right]{--_section-ml:0;--_section-mr:var(--mantine-spacing-sm)}.m-690090b5[data-rotate]{--_section-transform:rotate(90deg)}.m-1f6ac4c4{font-size:var(--mantine-font-size-sm)}.m-f07af9d2{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:var(--_body-white-space,auto)}.m-f07af9d2[data-no-wrap]{--_body-white-space:nowrap}.m-57492dcc{color:var(--_description-color,var(--mantine-color-dimmed));display:block;font-size:var(--mantine-font-size-xs);opacity:var(--_description-opacity,1);overflow:hidden;text-overflow:ellipsis;white-space:var(--_body-white-space,auto)}.m-e17b862f{padding-left:var(--_children-pl,var(--nl-offset,var(--mantine-spacing-lg)));padding-right:var(--_children-pr,0)}[dir=rtl] .m-e17b862f{--_children-pl:0;--_children-pr:var(--nl-offset,var(--mantine-spacing-lg))}.m-1fd8a00b{transform:rotate(-90deg)}.m-a513464{align-items:center;background-color:var(--_bg);border:var(--_border,none);box-shadow:var(--mantine-shadow-lg);box-sizing:border-box;display:flex;overflow:hidden;padding:var(--mantine-spacing-xs) var(--_root-padding-right,var(--mantine-spacing-xs)) var(--mantine-spacing-xs) var(--_root-padding-left,calc(1.375rem*var(--mantine-scale)));position:relative}.m-a513464,.m-a513464:before{border-radius:var(--notification-radius,var(--mantine-radius-default))}.m-a513464:before{background-color:var(--notification-color,var(--mantine-primary-color-filled));bottom:var(--notification-radius,var(--mantine-radius-default));content:"";display:block;left:calc(.25rem*var(--mantine-scale));position:absolute;top:var(--notification-radius,var(--mantine-radius-default));width:calc(.375rem*var(--mantine-scale))}[dir=rtl] .m-a513464:before{left:auto;right:calc(.25rem*var(--mantine-scale))}.m-a513464[data-with-icon]{--_root-padding-left:var(--mantine-spacing-xs)}.m-a513464[data-with-icon]:before{display:none}[dir=rtl] .m-a513464[data-with-icon]{--_root-padding-right:var(--mantine-spacing-xs)}.m-a513464[data-with-border]{--_border:calc(.0625rem*var(--mantine-scale)) solid var(--_border-color)}[dir=rtl] .m-a513464{--_root-padding-right:calc(1.375rem*var(--mantine-scale));--_root-padding-left:var(--mantine-spacing-xs)}[data-mantine-color-scheme=light] .m-a513464{--_border-color:var(--mantine-color-gray-3);--_bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-a513464{--_border-color:var(--mantine-color-dark-4);--_bg:var(--mantine-color-dark-6)}.m-a4ceffb{align-items:center;background-color:var(--notification-color,var(--mantine-primary-color-filled));border-radius:calc(1.75rem*var(--mantine-scale));box-sizing:border-box;color:var(--mantine-color-white);display:flex;height:calc(1.75rem*var(--mantine-scale));justify-content:center;margin-left:var(--_icon-margin-left,0);margin-right:var(--_icon-margin-right,var(--mantine-spacing-md));width:calc(1.75rem*var(--mantine-scale))}[dir=rtl] .m-a4ceffb{--_icon-margin-right:0;--_icon-margin-left:var(--mantine-spacing-md)}.m-b0920b15{margin-left:var(--_icon-margin-left,0);margin-right:var(--_icon-margin-right,var(--mantine-spacing-md))}[dir=rtl] .m-b0920b15{--_icon-margin-right:0;--_icon-margin-left:var(--mantine-spacing-md)}.m-a49ed24{flex:1;margin-left:var(--_body-margin-left,0);margin-right:var(--_body-margin-right,var(--mantine-spacing-xs));overflow:hidden}[dir=rtl] .m-a49ed24{--_body-margin-right:0;--_body-margin-left:var(--mantine-spacing-xs)}.m-3feedf16{color:var(--_title-color);font-size:var(--mantine-font-size-sm);font-weight:500;line-height:var(--mantine-line-height-sm);margin-bottom:calc(.125rem*var(--mantine-scale));overflow:hidden;text-overflow:ellipsis}[data-mantine-color-scheme=light] .m-3feedf16{--_title-color:var(--mantine-color-gray-9)}[data-mantine-color-scheme=dark] .m-3feedf16{--_title-color:var(--mantine-color-white)}.m-3d733a3a{color:var(--_description-color);font-size:var(--mantine-font-size-sm);line-height:var(--mantine-line-height-sm);overflow:hidden;text-overflow:ellipsis}[data-mantine-color-scheme=light] .m-3d733a3a[data-with-title]{--_description-color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .m-3d733a3a[data-with-title]{--_description-color:var(--mantine-color-dark-2)}[data-mantine-color-scheme=light] .m-3d733a3a{--_description-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-3d733a3a{--_description-color:var(--mantine-color-dark-0)}.m-919a4d88:hover{background-color:var(--_close-button-hover-bg)}[data-mantine-color-scheme=light] .m-919a4d88:hover{--_close-button-hover-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-919a4d88:hover{--_close-button-hover-bg:var(--mantine-color-dark-8)}.m-e2f5cd4e{--ni-right-section-width-xs:calc(1.0625rem*var(--mantine-scale));--ni-right-section-width-sm:calc(1.5rem*var(--mantine-scale));--ni-right-section-width-md:calc(1.6875rem*var(--mantine-scale));--ni-right-section-width-lg:calc(1.9375rem*var(--mantine-scale));--ni-right-section-width-xl:calc(2.125rem*var(--mantine-scale))}.m-95e17d22{--ni-chevron-size-xs:calc(.625rem*var(--mantine-scale));--ni-chevron-size-sm:calc(.875rem*var(--mantine-scale));--ni-chevron-size-md:calc(1rem*var(--mantine-scale));--ni-chevron-size-lg:calc(1.125rem*var(--mantine-scale));--ni-chevron-size-xl:calc(1.25rem*var(--mantine-scale));--ni-chevron-size:var(--ni-chevron-size-sm);display:flex;flex-direction:column;height:calc(var(--_input-height) - .125rem*var(--mantine-scale));margin-left:var(--_controls-ml,auto);margin-right:var(--_controls-mr,0);max-width:calc(var(--ni-chevron-size)*1.7);width:100%}[dir=rtl] .m-95e17d22{--_controls-ml:0;--_controls-mr:auto}.m-80b4b171{--_control-bd:calc(.0625rem*var(--mantine-scale)) solid var(--_input-bd);--_control-radius:calc(var(--_input-radius) - .0625rem*var(--mantine-scale));align-items:center;background-color:var(--_control-bg,transparent);border-left:var(--_control-bdl,var(--_control-bd));border-right:var(--_control-bdr,none);color:var(--mantine-color-text);display:flex;flex:0 0 50%;height:calc(var(--_input-height)/2 - .0625rem*var(--mantine-scale));justify-content:center;opacity:var(--_control-opacity,1);padding:0;pointer-events:var(--_control-pointer-events,auto);width:100%}.m-80b4b171:disabled{--_control-pointer-events:none;--_control-opacity:.4}[dir=rtl] .m-80b4b171{--_control-bdl:none;--_control-bdr:var(--_control-bd)}@media (hover:hover){[data-mantine-color-scheme=light] .m-80b4b171:hover{--_control-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-80b4b171:hover{--_control-bg:var(--mantine-color-dark-4)}}@media (hover:none){[data-mantine-color-scheme=light] .m-80b4b171:active{--_control-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-80b4b171:active{--_control-bg:var(--mantine-color-dark-4)}}.m-80b4b171:first-of-type{border-bottom:calc(.03125rem*var(--mantine-scale)) solid var(--_input-bd);border-radius:0 var(--_control-radius) 0 0}[dir=rtl] .m-80b4b171:first-of-type{border-radius:var(--_control-radius) 0 0 0}.m-80b4b171:last-of-type{border-radius:0 0 var(--_control-radius) 0;border-top:calc(.03125rem*var(--mantine-scale)) solid var(--_input-bd)}[dir=rtl] .m-80b4b171:last-of-type{border-radius:0 0 0 var(--_control-radius)}.m-4addd315{--pagination-control-size-xs:calc(1.375rem*var(--mantine-scale));--pagination-control-size-sm:calc(1.625rem*var(--mantine-scale));--pagination-control-size-md:calc(2rem*var(--mantine-scale));--pagination-control-size-lg:calc(2.375rem*var(--mantine-scale));--pagination-control-size-xl:calc(2.75rem*var(--mantine-scale));--pagination-control-size:var(--pagination-control-size-md);--pagination-control-fz:var(--mantine-font-size-md);--pagination-active-bg:var(--mantine-primary-color-filled)}.m-326d024a{align-items:center;background-color:var(--_control-bg-color);border:calc(.0625rem*var(--mantine-scale)) solid var(--_control-border-color);border-radius:var(--pagination-control-radius,var(--mantine-radius-default));color:var(--_control-color,var(--mantine-color-text));cursor:var(--_control-cursor,pointer);display:flex;font-size:var(--pagination-control-fz);height:var(--pagination-control-size);justify-content:center;line-height:1;min-width:var(--pagination-control-size);opacity:var(--_control-opacity,1);padding:var(--_control-padding,0)}.m-326d024a[data-with-padding]{--_control-padding:calc(var(--pagination-control-size)/4)}.m-326d024a:disabled,.m-326d024a[data-disabled]{--_control-cursor:not-allowed;--_control-opacity:.4}.m-326d024a[data-active]{--_control-bg-color:var(--pagination-active-bg)!important;--_control-border-color:var(--pagination-active-bg)!important;--_control-color:var(--mantine-color-white)}[data-mantine-color-scheme=light] .m-326d024a{--_control-border-color:var(--mantine-color-gray-4);--_control-bg-color:var(--mantine-color-white);--_control-bg-hover:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-326d024a{--_control-border-color:var(--mantine-color-dark-4);--_control-bg-color:var(--mantine-color-dark-6);--_control-bg-hover:var(--mantine-color-dark-5)}@media (hover:hover){.m-326d024a:hover:not(:disabled,[data-disabled]){--_control-bg-color:var(--_control-bg-hover)}}@media (hover:none){.m-326d024a:active:not(:disabled,[data-disabled]){--_control-bg-color:var(--_control-bg-hover)}}[dir=rtl] .m-326d024a>svg{transform:rotate(180deg)}.m-4ad7767d{align-items:center;display:flex;height:var(--pagination-control-size);justify-content:center;min-width:var(--pagination-control-size);pointer-events:none}.m-f61ca620{--psi-button-size-xs:calc(1.375rem*var(--mantine-scale));--psi-button-size-sm:calc(1.625rem*var(--mantine-scale));--psi-button-size-md:calc(1.75rem*var(--mantine-scale));--psi-button-size-lg:calc(2rem*var(--mantine-scale));--psi-button-size-xl:calc(2.5rem*var(--mantine-scale));--psi-icon-size-xs:calc(.75rem*var(--mantine-scale));--psi-icon-size-sm:calc(.9375rem*var(--mantine-scale));--psi-icon-size-md:calc(1.0625rem*var(--mantine-scale));--psi-icon-size-lg:calc(1.1875rem*var(--mantine-scale));--psi-icon-size-xl:calc(1.3125rem*var(--mantine-scale));--psi-button-size:var(--psi-button-size-sm);--psi-icon-size:var(--psi-icon-size-sm)}.m-ccf8da4c{overflow:hidden;position:relative}.m-f2d85dd2{background-color:transparent;border:0;color:inherit;font-family:var(--mantine-font-family);font-size:inherit;height:100%;top:0;right:0;bottom:0;left:0;line-height:var(--mantine-line-height);outline:0;padding-left:var(--_input-padding-left);padding-right:var(--_input-padding-right);position:absolute;width:100%}.m-ccf8da4c[data-disabled] .m-f2d85dd2,.m-f2d85dd2:disabled{cursor:not-allowed}.m-f2d85dd2::placeholder{color:var(--_input-placeholder-color);opacity:1}.m-b1072d44{height:var(--psi-button-size);min-height:var(--psi-button-size);min-width:var(--psi-button-size);width:var(--psi-button-size)}.m-b1072d44:disabled{display:none}.m-f1cb205a{--pin-input-size-xs:calc(1.875rem*var(--mantine-scale));--pin-input-size-sm:calc(2.25rem*var(--mantine-scale));--pin-input-size-md:calc(2.625rem*var(--mantine-scale));--pin-input-size-lg:calc(3.125rem*var(--mantine-scale));--pin-input-size-xl:calc(3.75rem*var(--mantine-scale));--pin-input-size:var(--pin-input-size-sm)}.m-cb288ead{height:var(--pin-input-size);width:var(--pin-input-size)}@keyframes m-81a374bd{0%{background-position:0 0}to{background-position:calc(2.5rem*var(--mantine-scale)) 0}}.m-db6d6462{--progress-radius:var(--mantine-radius-default);--progress-size-xs:calc(.1875rem*var(--mantine-scale));--progress-size-sm:calc(.3125rem*var(--mantine-scale));--progress-size-md:calc(.5rem*var(--mantine-scale));--progress-size-lg:calc(.75rem*var(--mantine-scale));--progress-size-xl:calc(1rem*var(--mantine-scale));--progress-size:var(--progress-size-md);background-color:var(--_track-bg);border-radius:var(--progress-radius);display:flex;height:var(--progress-size);overflow:hidden;position:relative}[data-mantine-color-scheme=light] .m-db6d6462{--_track-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-db6d6462{--_track-bg:var(--mantine-color-dark-4)}.m-2242eb65{align-items:center;animation:var(--_section-animation);background-color:var(--progress-section-color);background-image:var(--_section-gradient);background-size:calc(1.25rem*var(--mantine-scale)) calc(1.25rem*var(--mantine-scale));border-radius:var(--_section-radius);display:flex;height:100%;justify-content:center;overflow:hidden;width:var(--progress-section-width)}.m-2242eb65[data-striped]{--_section-gradient:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.m-2242eb65[data-animated]{--_section-animation:m-81a374bd 1s linear infinite}.m-2242eb65:last-of-type{--_section-radius:0 var(--progress-radius) var(--progress-radius) 0}.m-2242eb65:first-of-type,[dir=rtl] .m-2242eb65:last-of-type{--_section-radius:var(--progress-radius) 0 0 var(--progress-radius)}[dir=rtl] .m-2242eb65:first-of-type{--_section-radius:0 var(--progress-radius) var(--progress-radius) 0}.m-91e40b74{color:var(--mantine-color-white);font-size:min(calc(var(--progress-size)*.65),calc(1.125rem*var(--mantine-scale)));font-weight:700;line-height:1;overflow:hidden;padding-left:calc(.25rem*var(--mantine-scale));padding-right:calc(.25rem*var(--mantine-scale));text-overflow:ellipsis;-webkit-user-select:none;user-select:none;white-space:nowrap}.m-f3f1af94{--radio-size-xs:calc(1rem*var(--mantine-scale));--radio-size-sm:calc(1.25rem*var(--mantine-scale));--radio-size-md:calc(1.5rem*var(--mantine-scale));--radio-size-lg:calc(1.875rem*var(--mantine-scale));--radio-size-xl:calc(2.25rem*var(--mantine-scale));--radio-size:var(--radio-size-sm);--radio-icon-size-xs:calc(.375rem*var(--mantine-scale));--radio-icon-size-sm:calc(.5rem*var(--mantine-scale));--radio-icon-size-md:calc(.625rem*var(--mantine-scale));--radio-icon-size-lg:calc(.875rem*var(--mantine-scale));--radio-icon-size-xl:calc(1rem*var(--mantine-scale));--radio-icon-size:var(--radio-icon-size-sm);--radio-icon-color:var(--mantine-color-white)}.m-89c4f5e4{height:var(--radio-size);order:var(--_radio-order,1);position:relative;width:var(--radio-size)}.m-89c4f5e4[data-label-position=left]{--_radio-order:2}.m-f3ed6b2b{color:var(--_radio-icon-color,var(--radio-icon-color));height:var(--radio-icon-size);left:calc(50% - var(--radio-icon-size)/2);opacity:var(--_radio-icon-opacity,0);pointer-events:none;position:absolute;top:calc(50% - var(--radio-icon-size)/2);transform:var(--_radio-icon-transform,scale(.2) translateY(calc(.625rem*var(--mantine-scale))));transition:opacity .1s ease,transform .2s ease;width:var(--radio-icon-size)}.m-8a3dbb89{-webkit-tap-highlight-color:transparent;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--_radio-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_radio-bd-color);border-radius:var(--radio-radius,var(--radio-size));cursor:var(--_cursor,var(--mantine-cursor-type));display:flex;height:var(--radio-size);justify-content:center;margin:0;position:relative;transition-duration:.1s;transition-property:background-color,border-color;transition-timing-function:ease;width:var(--radio-size)}[data-mantine-color-scheme=light] .m-8a3dbb89{--_radio-bg:var(--mantine-color-white);--_radio-bd-color:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-8a3dbb89{--_radio-bg:var(--mantine-color-dark-6);--_radio-bd-color:var(--mantine-color-dark-4)}.m-8a3dbb89:checked{--_radio-bg:var(--radio-color,var(--mantine-primary-color-filled));--_radio-bd-color:var(--radio-color,var(--mantine-primary-color-filled))}.m-8a3dbb89:checked+.m-f3ed6b2b{--_radio-icon-opacity:1;--_radio-icon-transform:scale(1)}.m-8a3dbb89:disabled{--_cursor:not-allowed}[data-mantine-color-scheme=light] .m-8a3dbb89:disabled{--_radio-bg:var(--mantine-color-gray-1);--_radio-bd-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=light] .m-8a3dbb89:disabled+.m-f3ed6b2b{--_radio-icon-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-8a3dbb89:disabled{--_radio-bg:var(--mantine-color-dark-5);--_radio-bd-color:var(--mantine-color-dark-4)}[data-mantine-color-scheme=dark] .m-8a3dbb89:disabled+.m-f3ed6b2b{--_radio-icon-color:var(--mantine-color-dark-7)}.m-8a3dbb89[data-error]{--_radio-bd-color:var(--mantine-color-error)}.m-1bfe9d39+.m-f3ed6b2b{--_radio-icon-color:var(--radio-color)}[data-mantine-color-scheme] .m-1bfe9d39:checked:not(:disabled){--_radio-bg:transparent;--_radio-bd-color:var(--radio-color)}[data-mantine-color-scheme] .m-1bfe9d39:checked:not(:disabled)+.m-f3ed6b2b{--_radio-icon-color:var(--radio-color);--_radio-icon-opacity:1;--_radio-icon-transform:none}.m-f8d312f2{--rating-size-xs:calc(.875rem*var(--mantine-scale));--rating-size-sm:calc(1.125rem*var(--mantine-scale));--rating-size-md:calc(1.25rem*var(--mantine-scale));--rating-size-lg:calc(1.75rem*var(--mantine-scale));--rating-size-xl:calc(2rem*var(--mantine-scale));display:flex;pointer-events:var(--_pointer-events);width:max-content}.m-f8d312f2:has(input:disabled){--_pointer-events:none}.m-61734bb7{position:relative;transform:var(--_transform);transition:transform .1s ease;z-index:var(--_z-index)}.m-61734bb7[data-active]{--_z-index:1;--_transform:scale(1.1)}.m-5662a89a{stroke:var(--_star-color);fill:var(--_star-color);display:block;height:var(--rating-size);width:var(--rating-size)}[data-mantine-color-scheme=light] .m-5662a89a{--_star-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-5662a89a{--_star-color:var(--mantine-color-dark-3)}[data-mantine-color-scheme] .m-5662a89a[data-filled]{--_star-color:var(--rating-color)}.m-211007ba{-webkit-tap-highlight-color:transparent;height:0;opacity:0;overflow:hidden;position:absolute;white-space:nowrap;width:0}.m-211007ba:focus-visible+label{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.m-21342ee4{-webkit-tap-highlight-color:transparent;cursor:pointer;display:block;left:0;position:absolute;top:0;z-index:var(--rating-item-z-index,0)}.m-21342ee4[data-read-only]{cursor:default}.m-21342ee4:last-of-type{position:relative}.m-fae05d6a{clip-path:var(--rating-symbol-clip-path)}.m-b32e4812{position:relative}.m-b32e4812,.m-d43b5134{height:var(--rp-size);min-height:var(--rp-size);min-width:var(--rp-size);width:var(--rp-size)}.m-d43b5134{transform:rotate(-90deg)}.m-b1ca1fbf{stroke:var(--curve-color,var(--_curve-root-color))}[data-mantine-color-scheme=light] .m-b1ca1fbf{--_curve-root-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-b1ca1fbf{--_curve-root-color:var(--mantine-color-dark-4)}.m-b23f9dc4{left:var(--rp-label-offset);position:absolute;right:var(--rp-label-offset);top:50%;transform:translateY(-50%)}.m-1b3c8819{background-color:var(--_tooltip-bg);border-radius:var(--tooltip-radius,var(--mantine-radius-default));color:var(--tooltip-color,var(--_tooltip-color));font-size:var(--mantine-font-size-sm);padding:calc(var(--mantine-spacing-xs)/2) var(--mantine-spacing-xs);pointer-events:none;position:absolute;white-space:var(--_tooltip-white-space,nowrap)}[data-mantine-color-scheme=light] .m-1b3c8819{--_tooltip-bg:var(--tooltip-bg,var(--mantine-color-gray-9));--_tooltip-color:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-1b3c8819{--_tooltip-bg:var(--tooltip-bg,var(--mantine-color-gray-2));--_tooltip-color:var(--mantine-color-black)}.m-1b3c8819[data-multiline]{--_tooltip-white-space:normal}.m-f898399f{background-color:inherit;border:0;z-index:1}.m-cf365364{--sc-padding-xs:calc(.1875rem*var(--mantine-scale)) calc(.375rem*var(--mantine-scale));--sc-padding-sm:calc(.3125rem*var(--mantine-scale)) calc(.625rem*var(--mantine-scale));--sc-padding-md:calc(.4375rem*var(--mantine-scale)) calc(.875rem*var(--mantine-scale));--sc-padding-lg:calc(.5625rem*var(--mantine-scale)) calc(1rem*var(--mantine-scale));--sc-padding-xl:calc(.75rem*var(--mantine-scale)) calc(1.25rem*var(--mantine-scale));--sc-transition-duration:.2s;--sc-padding:var(--sc-padding-sm);--sc-transition-timing-function:ease;--sc-font-size:var(--mantine-font-size-sm);background-color:var(--_bg);border-radius:var(--sc-radius,var(--mantine-radius-default));display:var(--_display,inline-flex);flex-direction:var(--_flex-direction,row);overflow:hidden;padding:4px;position:relative;width:var(--_width,auto)}.m-cf365364[data-full-width]{--_display:flex}.m-cf365364[data-orientation=vertical]{--_display:flex;--_flex-direction:column;--_width:max-content}.m-cf365364[data-orientation=vertical][data-full-width]{--_width:auto}[data-mantine-color-scheme=light] .m-cf365364{--_bg:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m-cf365364{--_bg:var(--mantine-color-dark-8)}.m-9e182ccd{background-color:var(--_bg);border-radius:var(--sc-radius,var(--mantine-radius-default));box-shadow:var(--_box-shadow);display:block;height:var(--sc-indicator-height);position:absolute;transform:var(--sc-indicator-transform);transition:transform var(--sc-transition-duration) var(--sc-transition-timing-function),width var(--sc-transition-duration) var(--sc-transition-timing-function);width:var(--sc-indicator-width);z-index:1}[data-mantine-color-scheme=light] .m-9e182ccd{--_box-shadow:var(--sc-shadow,none);--_bg:var(--sc-color,var(--mantine-color-white))}[data-mantine-color-scheme=dark] .m-9e182ccd{--_box-shadow:none;--_bg:var(--sc-color,var(--mantine-color-dark-5))}.m-1738fcb2{-webkit-tap-highlight-color:transparent;border-radius:var(--sc-radius,var(--mantine-radius-default));color:var(--_color);cursor:var(--_cursor,pointer);display:block;font-size:var(--sc-font-size);font-weight:500;outline:var(--_outline,none);overflow:hidden;padding:var(--sc-padding);text-align:center;text-overflow:ellipsis;transition:color var(--sc-transition-duration) var(--sc-transition-timing-function);-webkit-user-select:none;user-select:none;white-space:nowrap}.m-1738fcb2[data-disabled],fieldset:disabled .m-1738fcb2{--_cursor:not-allowed}[data-mantine-color-scheme=light] .m-1738fcb2[data-disabled],[data-mantine-color-scheme=light] fieldset:disabled .m-1738fcb2{--_color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-1738fcb2[data-disabled],[data-mantine-color-scheme=dark] fieldset:disabled .m-1738fcb2{--_color:var(--mantine-color-dark-3)}[data-mantine-color-scheme=light] .m-1738fcb2[data-active]{--_color:var(--sc-label-color,var(--mantine-color-black))}[data-mantine-color-scheme=dark] .m-1738fcb2[data-active]{--_color:var(--sc-label-color,var(--mantine-color-white))}@media (hover:hover){[data-mantine-color-scheme=light] .m-1738fcb2:not([data-disabled]):not([data-active]):hover{--_color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-1738fcb2:not([data-disabled]):not([data-active]):hover{--_color:var(--mantine-color-white)}}@media (hover:none){[data-mantine-color-scheme=light] .m-1738fcb2:not([data-disabled]):not([data-active]):active{--_color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-1738fcb2:not([data-disabled]):not([data-active]):active{--_color:var(--mantine-color-white)}}@media (hover:hover){[data-mantine-color-scheme=light] fieldset:disabled .m-1738fcb2:hover{--_color:var(--mantine-color-gray-5)!important}[data-mantine-color-scheme=dark] fieldset:disabled .m-1738fcb2:hover{--_color:var(--mantine-color-dark-3)!important}}@media (hover:none){[data-mantine-color-scheme=light] fieldset:disabled .m-1738fcb2:active{--_color:var(--mantine-color-gray-5)!important}[data-mantine-color-scheme=dark] fieldset:disabled .m-1738fcb2:active{--_color:var(--mantine-color-dark-3)!important}}[data-mantine-color-scheme=light] .m-1738fcb2{--_color:var(--mantine-color-gray-7)}[data-mantine-color-scheme=dark] .m-1738fcb2{--_color:var(--mantine-color-dark-1)}.m-1714d588{height:0;opacity:0;overflow:hidden;position:absolute;white-space:nowrap;width:0}.m-1714d588[data-focus-ring=auto]:focus:focus-visible+.m-1738fcb2{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-1714d588[data-focus-ring=always]:focus+.m-1738fcb2{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-69686b9b{flex:1;position:relative;transition:border-color var(--sc-transition-duration) var(--sc-transition-timing-function);z-index:2}.m-69686b9b:before{background-color:var(--_separator-color);bottom:0;content:"";left:0;position:absolute;top:0;transition:background-color var(--sc-transition-duration) var(--sc-transition-timing-function);width:calc(.0625rem*var(--mantine-scale))}[dir=rtl] .m-69686b9b:before{left:auto;right:0}.m-69686b9b[data-orientation=vertical]:before{bottom:auto;height:calc(.0625rem*var(--mantine-scale));left:0;right:0;top:0;width:auto}[data-mantine-color-scheme=light] .m-69686b9b{--_separator-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-69686b9b{--_separator-color:var(--mantine-color-dark-4)}.m-69686b9b:first-of-type:before,[data-mantine-color-scheme] .m-69686b9b[data-active]+.m-69686b9b:before,[data-mantine-color-scheme] .m-69686b9b[data-active]:before{--_separator-color:transparent}.m-2415a157{display:grid;gap:var(--sg-spacing-y) var(--sg-spacing-x);grid-template-columns:repeat(var(--sg-cols),minmax(0,1fr))}@keyframes m-299c329c{0%,to{opacity:.4}50%{opacity:1}}.m-18320242{border-radius:var(--skeleton-radius,var(--mantine-radius-default));height:var(--skeleton-height,auto);position:relative;transform:translateZ(0);-webkit-transform:translateZ(0);width:var(--skeleton-width,100%)}.m-18320242[data-animate]:after{animation:m-299c329c 1.5s linear infinite}.m-18320242[data-visible]{overflow:hidden}.m-18320242[data-visible]:before{background-color:var(--mantine-color-body);content:"";top:0;right:0;bottom:0;left:0;position:absolute;z-index:10}.m-18320242[data-visible]:after{content:"";top:0;right:0;bottom:0;left:0;position:absolute;z-index:11}[data-mantine-color-scheme=light] .m-18320242[data-visible]:after{background-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-18320242[data-visible]:after{background-color:var(--mantine-color-dark-4)}.m-dd36362e{--slider-size-xs:calc(.25rem*var(--mantine-scale));--slider-size-sm:calc(.375rem*var(--mantine-scale));--slider-size-md:calc(.5rem*var(--mantine-scale));--slider-size-lg:calc(.625rem*var(--mantine-scale));--slider-size-xl:calc(.75rem*var(--mantine-scale));--slider-size:var(--slider-size-md);--slider-radius:calc(62.5rem*var(--mantine-scale));--slider-color:var(--mantine-primary-color-filled);-webkit-tap-highlight-color:transparent;align-items:center;display:flex;flex-direction:column;height:calc(var(--slider-size)*2);outline:none;padding-left:var(--slider-size);padding-right:var(--slider-size);position:relative;touch-action:none}[data-mantine-color-scheme=light] .m-dd36362e{--slider-track-bg:var(--mantine-color-gray-2);--slider-track-disabled-bg:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-dd36362e{--slider-track-bg:var(--mantine-color-dark-4);--slider-track-disabled-bg:var(--mantine-color-dark-3)}.m-c9357328{background-color:var(--_label-bg);border-radius:var(--mantine-radius-sm);color:var(--mantine-color-white);font-size:var(--mantine-font-size-xs);padding:calc(var(--mantine-spacing-xs)/2);pointer-events:none;position:absolute;top:calc(-2.25rem*var(--mantine-scale));touch-action:none;-webkit-user-select:none;user-select:none;white-space:nowrap}[data-mantine-color-scheme=light] .m-c9357328{--_label-bg:var(--mantine-color-gray-9)}[data-mantine-color-scheme=dark] .m-c9357328{--_label-bg:var(--mantine-color-dark-4)}.m-c9a9a60a{align-items:center;background-color:var(--_thumb-bg);border:calc(.25rem*var(--mantine-scale)) solid var(--_thumb-bd);border-radius:var(--slider-radius);box-shadow:var(--_thumb-box-shadow,none);color:var(--_thumb-bd);cursor:pointer;display:var(--_thumb-display,flex);height:var(--slider-thumb-size);justify-content:center;left:var(--slider-thumb-offset);outline-offset:calc(.125rem*var(--mantine-scale));position:absolute;top:50%;touch-action:none;transform:var(--_thumb-transform,translate(-50%,-50%));transition:box-shadow .1s ease,transform .1s ease;-webkit-user-select:none;user-select:none;width:var(--slider-thumb-size);z-index:3}[dir=rtl] .m-c9a9a60a{left:auto;right:calc(var(--slider-thumb-offset) - var(--slider-thumb-size))}.m-c9a9a60a[data-disabled],fieldset:disabled .m-c9a9a60a{--_thumb-display:none}.m-c9a9a60a[data-dragging]{--_thumb-transform:translate(-50%,-50%) scale(1.05);--_thumb-box-shadow:var(--mantine-shadow-sm)}[data-mantine-color-scheme=light] .m-c9a9a60a{--_thumb-bd:var(--slider-color);--_thumb-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-c9a9a60a{--_thumb-bd:var(--mantine-color-white);--_thumb-bg:var(--slider-color)}.m-a8645c2{align-items:center;cursor:var(--_track-cursor,pointer);display:flex;height:calc(var(--slider-size)*2);width:100%}.m-a8645c2[data-disabled],fieldset:disabled .m-a8645c2{--_track-cursor:not-allowed}.m-c9ade57f{height:var(--slider-size);position:relative;width:100%}.m-c9ade57f[data-inverted]:not([data-disabled]){--_track-bg:var(--slider-color)}.m-c9ade57f[data-inverted][data-disabled],fieldset:disabled .m-c9ade57f[data-inverted]{--_track-bg:var(--slider-track-disabled-bg)}.m-c9ade57f:before{background-color:var(--_track-bg,var(--slider-track-bg));content:"";left:calc(var(--slider-size)*-1);right:calc(var(--slider-size)*-1);z-index:0}.m-38aeed47,.m-c9ade57f:before{border-radius:var(--slider-radius);bottom:0;position:absolute;top:0}.m-38aeed47{background-color:var(--_bar-bg,var(--slider-color));left:var(--slider-bar-offset);width:var(--slider-bar-width);z-index:1}[dir=rtl] .m-38aeed47{left:auto;right:var(--slider-bar-offset)}.m-38aeed47[data-inverted]{--_bar-bg:var(--slider-track-bg)}.m-38aeed47[data-disabled]:not([data-inverted]),fieldset:disabled .m-38aeed47:not([data-inverted]){--_bar-bg:var(--_bar-disabled-bg)}[data-mantine-color-scheme=light] .m-38aeed47{--_bar-disabled-bg:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-38aeed47{--_bar-disabled-bg:var(--mantine-color-dark-3)}.m-b7b0423a{height:0;left:calc(var(--mark-offset) - var(--slider-size)/2);pointer-events:none;position:absolute;top:0;z-index:2}[dir=rtl] .m-b7b0423a{left:unset;right:calc(var(--mark-offset) - var(--slider-size)/2)}.m-dd33bc19{background-color:var(--_mark-bg,var(--mantine-color-white));border:calc(.125rem*var(--mantine-scale)) solid var(--_mark-bd);border-radius:calc(62.5rem*var(--mantine-scale));height:var(--slider-size);pointer-events:none;transform:translate((calc(var(--slider-size)/-2)));width:var(--slider-size)}[data-mantine-color-scheme] .m-dd33bc19[data-filled]{--_mark-bd:var(--slider-color)}[data-mantine-color-scheme=light] .m-dd33bc19[data-filled][data-disabled]{--_mark-bd:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-dd33bc19[data-filled][data-disabled]{--_mark-bd:var(--mantine-color-dark-3)}[data-mantine-color-scheme=light] .m-dd33bc19{--_mark-bd:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-dd33bc19{--_mark-bd:var(--mantine-color-dark-4)}.m-68c77a5b{color:var(--_mark-label-color);cursor:pointer;font-size:var(--mantine-font-size-sm);transform:translate(calc(-50% + var(--slider-size)/2),calc(var(--mantine-spacing-xs)/2));-webkit-user-select:none;user-select:none;white-space:nowrap}[data-mantine-color-scheme=light] .m-68c77a5b{--_mark-label-color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .m-68c77a5b{--_mark-label-color:var(--mantine-color-dark-2)}.m-559cce2d{margin-bottom:var(--_spoiler-margin-bottom);position:relative}.m-559cce2d[data-has-spoiler]{--_spoiler-margin-bottom:calc(1.5rem*var(--mantine-scale))}.m-b912df4e{display:flex;flex-direction:column;overflow:hidden;transition:max-height var(--spoiler-transition-duration,.2s) ease}.m-b9131032{height:calc(1.5rem*var(--mantine-scale));left:0;position:absolute;top:100%}.m-6d731127{align-items:var(--stack-align,stretch);display:flex;flex-direction:column;gap:var(--stack-gap,var(--mantine-spacing-md));justify-content:var(--stack-justify,flex-start)}.m-cbb4ea7e{--stepper-icon-size-xs:calc(2.125rem*var(--mantine-scale));--stepper-icon-size-sm:calc(2.25rem*var(--mantine-scale));--stepper-icon-size-md:calc(2.625rem*var(--mantine-scale));--stepper-icon-size-lg:calc(3rem*var(--mantine-scale));--stepper-icon-size-xl:calc(3.25rem*var(--mantine-scale));--stepper-icon-size:var(--stepper-icon-size-md);--stepper-color:var(--mantine-primary-color-filled);--stepper-content-padding:var(--mantine-spacing-md);--stepper-spacing:var(--mantine-spacing-md);--stepper-radius:calc(62.5rem*var(--mantine-scale));--stepper-fz:var(--mantine-font-size-md)}.m-aaf89d0b{align-items:var(--_steps-align-items,center);display:flex;flex-direction:var(--_steps-direction);flex-wrap:var(--_steps-wrap,nowrap);gap:var(--_steps-gap)}.m-aaf89d0b[data-wrap]{--_steps-wrap:wrap;--_steps-gap:var(--mantine-spacing-md) 0}.m-aaf89d0b[data-orientation=vertical]{--_steps-direction:column}.m-aaf89d0b[data-orientation=vertical][data-icon-position=left]{--_steps-align-items:flex-start}.m-aaf89d0b[data-orientation=vertical][data-icon-position=right]{--_steps-align-items:flex-end}.m-aaf89d0b[data-orientation=horizontal]{--_steps-direction:row}.m-2a371ac9{--_separator-offset:calc(var(--stepper-icon-size)/2 - .0625rem*var(--mantine-scale));background-color:var(--_separator-bg);flex:1;height:var(--_separator-height);margin:var(--_separator-mt) var(--_separator-mr) var(--_separator-mb) var(--_separator-ml);transition:background-color .15s ease;width:var(--_separator-width)}[data-mantine-color-scheme=light] .m-2a371ac9{--_separator-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-2a371ac9{--_separator-bg:var(--mantine-color-dark-2)}.m-2a371ac9[data-active]{--_separator-bg:var(--stepper-color)}.m-2a371ac9[data-orientation=horizontal]{--_separator-height:calc(.125rem*var(--mantine-scale));--_separator-ml:var(--mantine-spacing-md);--_separator-mr:var(--mantine-spacing-md);--_separator-mt:0;--_separator-mb:0}.m-2a371ac9[data-orientation=vertical]{--_separator-width:calc(.125rem*var(--mantine-scale));--_separator-mt:calc(var(--mantine-spacing-xs)/2);--_separator-mb:calc(var(--mantine-spacing-xs) - .125rem*var(--mantine-scale))}.m-2a371ac9[data-orientation=vertical][data-icon-position=left]{--_separator-ml:var(--_separator-offset);--_separator-mr:0}.m-2a371ac9[data-orientation=vertical][data-icon-position=right],[dir=rtl] .m-2a371ac9[data-orientation=vertical][data-icon-position=left]{--_separator-ml:0;--_separator-mr:var(--_separator-offset)}[dir=rtl] .m-2a371ac9[data-orientation=vertical][data-icon-position=right]{--_separator-ml:var(--_separator-offset);--_separator-mr:0}.m-78da155d{padding-top:var(--stepper-content-padding)}.m-cbb57068{--_step-color:var(--step-color,var(--stepper-color));cursor:var(--_step-cursor,default);display:flex;flex-direction:var(--_step-direction)}.m-cbb57068[data-allow-click]{--_step-cursor:pointer}.m-cbb57068[data-icon-position=left]{--_step-direction:row}.m-cbb57068[data-icon-position=right]{--_step-direction:row-reverse}.m-f56b1e2c{align-items:center;flex-direction:var(--_step-direction)}.m-833edb7e{--_separator-spacing:calc(var(--mantine-spacing-xs)/2);justify-content:flex-start;margin-top:var(--_step-mt,var(--_separator-spacing));min-height:calc(var(--stepper-icon-size) + var(--mantine-spacing-xl) + var(--_separator-spacing));overflow:hidden}.m-833edb7e:first-of-type{--_step-mt:0}.m-833edb7e:last-of-type .m-6496b3f3{display:none}.m-818e70b{position:relative}.m-6496b3f3{border-left:calc(.125rem*var(--mantine-scale)) solid var(--_separator-border-color);height:100vh;left:calc(var(--stepper-icon-size)/2);position:absolute;top:calc(var(--stepper-icon-size) + var(--_separator-spacing))}[data-mantine-color-scheme=light] .m-6496b3f3{--_separator-border-color:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m-6496b3f3{--_separator-border-color:var(--mantine-color-dark-5)}[data-mantine-color-scheme] .m-6496b3f3[data-active]{--_separator-border-color:var(--stepper-color)}.m-1959ad01{align-items:center;background-color:var(--_step-icon-bg);border:calc(.125rem*var(--mantine-scale)) solid var(--_step-icon-border-color);border-radius:var(--stepper-radius);color:var(--_step-icon-color);display:flex;font-size:var(--stepper-fz);font-weight:700;height:var(--stepper-icon-size);justify-content:center;min-height:var(--stepper-icon-size);min-width:var(--stepper-icon-size);position:relative;transition:background-color .15s ease,border-color .15s ease;width:var(--stepper-icon-size)}[data-mantine-color-scheme=light] .m-1959ad01{--_step-icon-bg:var(--mantine-color-gray-1);--_step-icon-border-color:var(--mantine-color-gray-1);--_step-icon-color:var(--mantine-color-gray-7)}[data-mantine-color-scheme=dark] .m-1959ad01{--_step-icon-bg:var(--mantine-color-dark-5);--_step-icon-border-color:var(--mantine-color-dark-5);--_step-icon-color:var(--mantine-color-dark-1)}[data-mantine-color-scheme] .m-1959ad01[data-progress]{--_step-icon-border-color:var(--_step-color)}[data-mantine-color-scheme] .m-1959ad01[data-completed]{--_step-icon-color:var(--mantine-color-white);--_step-icon-bg:var(--_step-color);--_step-icon-border-color:var(--_step-color)}.m-a79331dc{align-items:center;color:var(--mantine-color-white);display:flex;top:0;right:0;bottom:0;left:0;justify-content:center;position:absolute}.m-1956aa2a{display:flex;flex-direction:column;margin-left:var(--_step-body-ml);margin-right:var(--_step-body-mr);margin-top:var(--_step-body-mt);text-align:var(--_step-body-ta)}.m-1956aa2a[data-icon-position=left]{--_step-body-ta:left;--_step-body-ml:var(--mantine-spacing-sm)}[dir=rtl] .m-1956aa2a[data-icon-position=left]{--_step-body-ta:right;--_step-body-ml:0;--_step-body-mr:var(--mantine-spacing-sm)}.m-1956aa2a[data-icon-position=right]{--_step-body-ta:right;--_step-body-mr:var(--mantine-spacing-sm)}[dir=rtl] .m-1956aa2a[data-icon-position=right]{--_step-body-ta:left;--_step-body-ml:var(--mantine-spacing-sm);--_step-body-mr:0}.m-12051f6c{font-size:var(--stepper-fz);font-weight:500;line-height:1}.m-164eea74{color:var(--mantine-color-dimmed);font-size:calc(var(--stepper-fz) - .125rem*var(--mantine-scale));line-height:1;margin-bottom:calc(var(--stepper-spacing)/3);margin-top:calc(var(--stepper-spacing)/3)}.m-5f93f3bb{--switch-height-xs:calc(1rem*var(--mantine-scale));--switch-height-sm:calc(1.25rem*var(--mantine-scale));--switch-height-md:calc(1.5rem*var(--mantine-scale));--switch-height-lg:calc(1.875rem*var(--mantine-scale));--switch-height-xl:calc(2.25rem*var(--mantine-scale));--switch-width-xs:calc(2rem*var(--mantine-scale));--switch-width-sm:calc(2.375rem*var(--mantine-scale));--switch-width-md:calc(2.875rem*var(--mantine-scale));--switch-width-lg:calc(3.5rem*var(--mantine-scale));--switch-width-xl:calc(4.5rem*var(--mantine-scale));--switch-thumb-size-xs:calc(.75rem*var(--mantine-scale));--switch-thumb-size-sm:calc(.875rem*var(--mantine-scale));--switch-thumb-size-md:calc(1.125rem*var(--mantine-scale));--switch-thumb-size-lg:calc(1.375rem*var(--mantine-scale));--switch-thumb-size-xl:calc(1.75rem*var(--mantine-scale));--switch-label-font-size-xs:calc(.3125rem*var(--mantine-scale));--switch-label-font-size-sm:calc(.375rem*var(--mantine-scale));--switch-label-font-size-md:calc(.4375rem*var(--mantine-scale));--switch-label-font-size-lg:calc(.5625rem*var(--mantine-scale));--switch-label-font-size-xl:calc(.6875rem*var(--mantine-scale));--switch-track-label-padding-xs:calc(.0625rem*var(--mantine-scale));--switch-track-label-padding-sm:calc(.125rem*var(--mantine-scale));--switch-track-label-padding-md:calc(.125rem*var(--mantine-scale));--switch-track-label-padding-lg:calc(.1875rem*var(--mantine-scale));--switch-track-label-padding-xl:calc(.1875rem*var(--mantine-scale));--switch-height:var(--switch-height-sm);--switch-width:var(--switch-width-sm);--switch-thumb-size:var(--switch-thumb-size-sm);--switch-label-font-size:var(--switch-label-font-size-sm);--switch-track-label-padding:var(--switch-track-label-padding-sm);--switch-radius:calc(62.5rem*var(--mantine-scale));--switch-color:var(--mantine-primary-color-filled);position:relative}.m-926b4011{height:0;opacity:0;padding:0;position:absolute;white-space:nowrap;width:0}.m-926b4011,.m-9307d992{margin:0;overflow:hidden}.m-9307d992{-webkit-tap-highlight-color:transparent;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--_switch-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_switch-bd);border-radius:var(--switch-radius);color:var(--_switch-color);cursor:var(--_switch-cursor,var(--mantine-cursor-type));display:flex;font-size:var(--switch-label-font-size);font-weight:600;height:var(--switch-height);line-height:0;min-width:var(--switch-width);order:var(--_switch-order,1);position:relative;transition:background-color .15s ease,border-color .15s ease;-webkit-user-select:none;user-select:none;z-index:0}.m-926b4011:focus-visible+.m-9307d992{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.m-926b4011:checked+.m-9307d992{--_switch-bg:var(--switch-color);--_switch-bd:var(--switch-color);--_switch-color:var(--mantine-color-white)}.m-926b4011:disabled+.m-9307d992,.m-926b4011[data-disabled]+.m-9307d992{--_switch-bg:var(--_switch-disabled-color);--_switch-bd:var(--_switch-disabled-color);--_switch-cursor:not-allowed}[data-mantine-color-scheme=light] .m-9307d992{--_switch-bg:var(--mantine-color-gray-2);--_switch-bd:var(--mantine-color-gray-3);--_switch-color:var(--mantine-color-gray-6);--_switch-disabled-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-9307d992{--_switch-bg:var(--mantine-color-dark-6);--_switch-bd:var(--mantine-color-dark-4);--_switch-color:var(--mantine-color-dark-1);--_switch-disabled-color:var(--mantine-color-dark-4)}.m-9307d992[data-error]{--_switch-bd:var(--mantine-color-error)}.m-9307d992[data-label-position=left]{--_switch-order:2}.m-93039a1d{background-color:var(--_switch-thumb-bg,var(--mantine-color-white));border:calc(.0625rem*var(--mantine-scale)) solid var(--_switch-thumb-bd);border-radius:var(--switch-radius);display:flex;height:var(--switch-thumb-size);left:var(--_switch-thumb-left,var(--switch-track-label-padding));position:absolute;transition:left .15s ease;width:var(--switch-thumb-size);z-index:1}[dir=rtl] .m-93039a1d{left:unset;right:var(--_switch-thumb-left,var(--switch-track-label-padding));transition:right .15s ease}.m-93039a1d>*{margin:auto}.m-926b4011:checked+*>.m-93039a1d{--_switch-thumb-left:calc(100% - var(--switch-thumb-size) - var(--switch-track-label-padding));--_switch-thumb-bd:var(--mantine-color-white)}.m-926b4011:disabled+*>.m-93039a1d,.m-926b4011[data-disabled]+*>.m-93039a1d{--_switch-thumb-bd:var(--_switch-thumb-bg-disabled);--_switch-thumb-bg:var(--_switch-thumb-bg-disabled)}[data-mantine-color-scheme=light] .m-93039a1d{--_switch-thumb-bd:var(--mantine-color-gray-3);--_switch-thumb-bg-disabled:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-93039a1d{--_switch-thumb-bd:var(--mantine-color-white);--_switch-thumb-bg-disabled:var(--mantine-color-dark-3)}.m-8277e082{display:grid;height:100%;margin:0 0 0 calc(var(--switch-thumb-size) + var(--switch-track-label-padding));min-width:calc(var(--switch-width) - var(--switch-thumb-size));padding-inline:var(--switch-track-label-padding);place-content:center;transition:margin .15s ease}.m-926b4011:checked+*>.m-8277e082,[dir=rtl] .m-8277e082{margin:0 calc(var(--switch-thumb-size) + var(--switch-track-label-padding)) 0 0}[dir=rtl] .m-926b4011:checked+*>.m-8277e082{margin:0 0 0 calc(var(--switch-thumb-size) + var(--switch-track-label-padding))}.m-b23fa0ef{border:var(--_table-border,none);border-collapse:collapse;caption-side:var(--table-caption-side,bottom);font-size:var(--mantine-font-size-sm);line-height:var(--mantine-line-height);table-layout:var(--table-layout,auto);width:100%}[data-mantine-color-scheme=light] .m-b23fa0ef{--_table-hover-color:var(--table-highlight-on-hover-color,var(--mantine-color-gray-1));--_table-striped-color:var(--table-striped-color,var(--mantine-color-gray-0));--_table-border-color:var(--table-border-color,var(--mantine-color-gray-3))}[data-mantine-color-scheme=dark] .m-b23fa0ef{--_table-hover-color:var(--table-highlight-on-hover-color,var(--mantine-color-dark-5));--_table-striped-color:var(--table-striped-color,var(--mantine-color-dark-6));--_table-border-color:var(--table-border-color,var(--mantine-color-dark-4))}.m-b23fa0ef[data-with-table-border]{--_table-border:calc(.0625rem*var(--mantine-scale)) solid var(--_table-border-color)}.m-4e7aa4f3{text-align:var(--_th-text-align,left)}[dir=rtl] .m-4e7aa4f3{--_th-text-align:right}.m-4e7aa4fd{background-color:var(--_tr-bg,transparent);border-bottom:var(--_tr-border-bottom,none)}@media (hover:hover){[data-mantine-color-scheme] .m-4e7aa4fd:hover[data-hover]{--_tr-bg:var(--_tr-hover-bg)!important}}@media (hover:none){[data-mantine-color-scheme] .m-4e7aa4fd:active[data-hover]{--_tr-bg:var(--_tr-hover-bg)!important}}.m-4e7aa4fd[data-with-row-border]{--_tr-border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_table-border-color)}.m-4e7aa4ef,.m-4e7aa4f3{--_border-right:none;--_border-left:none;border-left:var(--_border-left);border-right:var(--_border-right);padding:var(--table-vertical-spacing) var(--table-horizontal-spacing,var(--mantine-spacing-xs))}.m-4e7aa4ef[data-with-column-border]:not(:last-child),.m-4e7aa4f3[data-with-column-border]:not(:last-child){--_border-right:calc(.0625rem*var(--mantine-scale)) solid var(--_table-border-color)}[dir=rtl] .m-4e7aa4ef[data-with-column-border]:not(:last-child),[dir=rtl] .m-4e7aa4f3[data-with-column-border]:not(:last-child){--_border-left:calc(.0625rem*var(--mantine-scale)) solid var(--_table-border-color);--_border-right:none}.m-b2404537>.m-4e7aa4fd:last-of-type[data-with-row-border]{--_tr-border-bottom:none}.m-b2404537>.m-4e7aa4fd[data-striped=even]:nth-of-type(2n),.m-b2404537>.m-4e7aa4fd[data-striped=odd]:nth-of-type(odd){--_tr-bg:var(--_table-striped-color)}.m-b2404537>.m-4e7aa4fd[data-hover]{--_tr-hover-bg:var(--_table-hover-color)}.m-b242d975{background-color:var(--_thead-bg,transparent);position:var(--_thead-position,static);top:var(--table-sticky-header-offset,0)}.m-b242d975[data-sticky]{--_thead-position:sticky;--_thead-bg:var(--mantine-color-body)}.m-9e5a3ac7{color:var(--mantine-color-dimmed);margin-bottom:var(--_margin-bottom,0);margin-top:var(--_margin-top,0)}.m-9e5a3ac7[data-side=top]{--_margin-bottom:var(--mantine-spacing-xs)}.m-9e5a3ac7[data-side=bottom]{--_margin-top:var(--mantine-spacing-xs)}.m-a100c15{overflow-x:var(--table-overflow)}.m-62259741{min-width:var(--table-min-width)}.m-89d60db1{--_tab-justify:flex-start;--_list-direction:row;--_panel-grow:unset;--_tabs-display:block;--_tabs-flex-direction:row;--_list-border-width:0;--_list-border-size:0 0 var(--_list-border-width) 0;--_list-gap:unset;--_list-line-bottom:0;--_list-line-top:unset;--_list-line-left:0;--_list-line-right:0;--_tab-radius:var(--tabs-radius) var(--tabs-radius) 0 0;--_tab-border-width:0 0 var(--_list-border-width) 0;display:var(--_tabs-display);flex-direction:var(--_tabs-flex-direction)}.m-89d60db1[data-inverted]{--_list-line-bottom:unset;--_list-line-top:0;--_tab-radius:0 0 var(--tabs-radius) var(--tabs-radius);--_tab-border-width:var(--_list-border-width) 0 0 0}.m-89d60db1[data-inverted] .m-576c9d4:before{bottom:unset;top:0}.m-89d60db1[data-orientation=vertical]{--_list-line-left:unset;--_list-line-right:0;--_list-line-top:0;--_list-line-bottom:0;--_list-border-size:0 var(--_list-border-width) 0 0;--_tab-border-width:0 var(--_list-border-width) 0 0;--_tab-radius:var(--tabs-radius) 0 0 var(--tabs-radius);--_list-direction:column;--_panel-grow:1;--_tabs-display:flex}[dir=rtl] .m-89d60db1[data-orientation=vertical]{--_list-line-left:0;--_list-line-right:unset;--_list-border-size:0 0 0 var(--_list-border-width);--_tab-border-width:0 0 0 var(--_list-border-width);--_tab-radius:0 var(--tabs-radius) var(--tabs-radius) 0}.m-89d60db1[data-orientation=vertical][data-placement=right]{--_tabs-flex-direction:row-reverse;--_list-line-left:0;--_list-line-right:unset;--_list-border-size:0 0 0 var(--_list-border-width);--_tab-border-width:0 0 0 var(--_list-border-width);--_tab-radius:0 var(--tabs-radius) var(--tabs-radius) 0}[dir=rtl] .m-89d60db1[data-orientation=vertical][data-placement=right]{--_list-line-left:unset;--_list-line-right:0;--_list-border-size:0 var(--_list-border-width) 0 0;--_tab-border-width:0 var(--_list-border-width) 0 0;--_tab-radius:var(--tabs-radius) 0 0 var(--tabs-radius)}[data-mantine-color-scheme=light] .m-89d60db1{--_tab-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-89d60db1{--_tab-border-color:var(--mantine-color-dark-4)}.m-89d60db1[data-orientation=horizontal]{--_tab-justify:center}.m-89d60db1[data-variant=default]{--_list-border-width:calc(.125rem*var(--mantine-scale))}[data-mantine-color-scheme=light] .m-89d60db1[data-variant=default]{--_tab-hover-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-89d60db1[data-variant=default]{--_tab-hover-color:var(--mantine-color-dark-6)}.m-89d60db1[data-variant=outline]{--_list-border-width:calc(.0625rem*var(--mantine-scale))}.m-89d60db1[data-variant=pills]{--_list-gap:calc(var(--mantine-spacing-sm)/2)}[data-mantine-color-scheme=light] .m-89d60db1[data-variant=pills]{--_tab-hover-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-89d60db1[data-variant=pills]{--_tab-hover-color:var(--mantine-color-dark-6)}.m-89d33d6d{--_tab-grow:unset;display:flex;flex-direction:var(--_list-direction);flex-wrap:wrap;gap:var(--_list-gap);justify-content:var(--tabs-justify,flex-start)}.m-89d33d6d[data-grow]{--_tab-grow:1}.m-b0c91715{flex-grow:var(--_panel-grow)}.m-4ec4dce6{align-items:center;display:flex;flex-grow:var(--_tab-grow);font-size:var(--mantine-font-size-sm);justify-content:var(--_tab-justify);line-height:1;padding:var(--mantine-spacing-xs) var(--mantine-spacing-md);position:relative;-webkit-user-select:none;user-select:none;white-space:nowrap;z-index:0}.m-4ec4dce6:disabled,.m-4ec4dce6[data-disabled]{cursor:not-allowed;opacity:.5}.m-4ec4dce6:focus{z-index:1}.m-fc420b1f{align-items:center;display:flex;justify-content:center;margin-left:var(--_tab-section-margin-left,0);margin-right:var(--_tab-section-margin-right,0)}.m-fc420b1f[data-position=left]:not(:only-child){--_tab-section-margin-right:var(--mantine-spacing-xs)}[dir=rtl] .m-fc420b1f[data-position=left]:not(:only-child){--_tab-section-margin-right:0rem;--_tab-section-margin-left:var(--mantine-spacing-xs)}.m-fc420b1f[data-position=right]:not(:only-child){--_tab-section-margin-left:var(--mantine-spacing-xs)}[dir=rtl] .m-fc420b1f[data-position=right]:not(:only-child){--_tab-section-margin-left:0rem;--_tab-section-margin-right:var(--mantine-spacing-xs)}.m-576c9d4{position:relative}.m-576c9d4:before{border-color:var(--_tab-border-color);border-style:solid;border-width:var(--_list-border-size);bottom:var(--_list-line-bottom);content:"";left:var(--_list-line-left);position:absolute;right:var(--_list-line-right);top:var(--_list-line-top)}.m-539e827b{--__tab-border-color:transparent;--_tab-bg:transparent;background-color:var(--_tab-bg);border-color:var(--__tab-border-color);border-radius:var(--_tab-radius);border-style:solid;border-width:var(--_tab-border-width)}.m-539e827b[data-active]{--__tab-border-color:var(--tabs-color)}@media (hover:hover){.m-539e827b:hover{--_tab-bg:var(--_tab-hover-color)}.m-539e827b:hover:not([data-active]){--__tab-border-color:var(--_tab-border-color)}}@media (hover:none){.m-539e827b:active{--_tab-bg:var(--_tab-hover-color)}.m-539e827b:active:not([data-active]){--__tab-border-color:var(--_tab-border-color)}}@media (hover:hover){.m-539e827b:disabled:hover,.m-539e827b[data-disabled]:hover{--_tab-bg:transparent}}@media (hover:none){.m-539e827b:disabled:active,.m-539e827b[data-disabled]:active{--_tab-bg:transparent}}.m-6772fbd5{position:relative}.m-6772fbd5:before{border-color:var(--_tab-border-color);border-style:solid;border-width:var(--_list-border-size);bottom:var(--_list-line-bottom);content:"";left:var(--_list-line-left);position:absolute;right:var(--_list-line-right);top:var(--_list-line-top)}.m-b59ab47c{--_tab-border-bottom-color:transparent;--_tab-border-top-color:transparent;--_tab-border-right-color:transparent;--_tab-border-left-color:transparent;border-color:transparent;border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_tab-border-bottom-color);border-left:calc(.0625rem*var(--mantine-scale)) solid var(--_tab-border-left-color);border-radius:var(--_tab-radius);border-right:calc(.0625rem*var(--mantine-scale)) solid var(--_tab-border-right-color);border-top:calc(.0625rem*var(--mantine-scale)) solid var(--_tab-border-top-color)}.m-b59ab47c[data-active]{--_tab-border-top-color:var(--_tab-border-color);--_tab-border-left-color:var(--_tab-border-color);--_tab-border-right-color:var(--_tab-border-color);--_tab-border-bottom-color:var(--mantine-color-body)}.m-b59ab47c[data-active][data-inverted]{--_tab-border-bottom-color:var(--_tab-border-color);--_tab-border-top-color:var(--mantine-color-body)}.m-b59ab47c[data-active][data-orientation=vertical][data-placement=left]{--_tab-border-right-color:var(--mantine-color-body);--_tab-border-left-color:var(--_tab-border-color);--_tab-border-bottom-color:var(--_tab-border-color)}[dir=rtl] .m-b59ab47c[data-active][data-orientation=vertical][data-placement=left]{--_tab-border-right-color:var(--_tab-border-color);--_tab-border-left-color:var(--mantine-color-body)}.m-b59ab47c[data-active][data-orientation=vertical][data-placement=right]{--_tab-border-left-color:var(--mantine-color-body);--_tab-border-right-color:var(--_tab-border-color);--_tab-border-bottom-color:var(--_tab-border-color)}[dir=rtl] .m-b59ab47c[data-active][data-orientation=vertical][data-placement=right]{--_tab-border-left-color:var(--_tab-border-color);--_tab-border-right-color:var(--mantine-color-body)}.m-c3381914{--_tab-bg:transparent;--_tab-color:inherit;background-color:var(--_tab-bg);border-radius:var(--tabs-radius);color:var(--_tab-color)}@media (hover:hover){.m-c3381914:not([data-disabled]):hover{--_tab-bg:var(--_tab-hover-color)}}@media (hover:none){.m-c3381914:not([data-disabled]):active{--_tab-bg:var(--_tab-hover-color)}}.m-c3381914[data-active][data-active]{--_tab-bg:var(--tabs-color);--_tab-color:var(--mantine-color-white)}@media (hover:hover){.m-c3381914[data-active][data-active]:hover{--_tab-bg:var(--tabs-color)}}@media (hover:none){.m-c3381914[data-active][data-active]:active{--_tab-bg:var(--tabs-color)}}.m-7341320d{--ti-size-xs:calc(1.125rem*var(--mantine-scale));--ti-size-sm:calc(1.375rem*var(--mantine-scale));--ti-size-md:calc(1.75rem*var(--mantine-scale));--ti-size-lg:calc(2.125rem*var(--mantine-scale));--ti-size-xl:calc(2.75rem*var(--mantine-scale));--ti-size:var(--ti-size-md);align-items:center;background:var(--ti-bg,var(--mantine-primary-color-filled));border:var(--ti-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--ti-radius,var(--mantine-radius-default));color:var(--ti-color,var(--mantine-color-white));display:inline-flex;height:var(--ti-size);justify-content:center;line-height:1;min-height:var(--ti-size);min-width:var(--ti-size);position:relative;-webkit-user-select:none;user-select:none;width:var(--ti-size)}.m-43657ece{--offset:calc(var(--tl-bullet-size)/2 + var(--tl-line-width)/2);--tl-bullet-size:calc(1.25rem*var(--mantine-scale));--tl-line-width:calc(.25rem*var(--mantine-scale));--tl-radius:calc(62.5rem*var(--mantine-scale));--tl-color:var(--mantine-primary-color-filled);padding-left:var(--_tl-pl,0);padding-right:var(--_tl-pr,0)}.m-43657ece[data-align=left]{--_tl-pl:var(--offset)}[dir=rtl] .m-43657ece[data-align=left]{--_tl-pl:0;--_tl-pr:var(--offset)}.m-43657ece[data-align=right]{--_tl-pr:var(--offset)}[dir=rtl] .m-43657ece[data-align=right]{--_tl-pl:var(--offset);--_tl-pr:0}.m-2ebe8099{font-weight:500;line-height:1;margin-bottom:calc(var(--mantine-spacing-xs)/2)}.m-436178ff{--item-border:var(--tl-line-width) var(--tli-border-style,solid) var(--_item-border-color);color:var(--mantine-color-text);margin-top:var(--_item-mt);padding-left:var(--_item-pl,0);padding-right:var(--_item-pr,0);position:relative;text-align:var(--_item-ta)}.m-436178ff:before{border-left:var(--_line-border-left,var(--item-border));border-right:var(--_line-border-right,0);bottom:calc(var(--mantine-spacing-xl)*-1);content:"";display:var(--_line-display,none);left:var(--_line-left,0);pointer-events:none;position:absolute;right:var(--_line-right,0);top:0}[dir=rtl] .m-436178ff:before{--_line-border-left:0;--_line-border-right:var(--item-border)}.m-43657ece[data-align=left] .m-436178ff:before{--_line-left:calc(var(--tl-line-width)*-1);--_line-right:auto}.m-43657ece[data-align=right] .m-436178ff:before,[dir=rtl] .m-43657ece[data-align=left] .m-436178ff:before{--_line-left:auto;--_line-right:calc(var(--tl-line-width)*-1)}[dir=rtl] .m-43657ece[data-align=right] .m-436178ff:before{--_line-left:calc(var(--tl-line-width)*-1);--_line-right:auto}.m-43657ece[data-align=left] .m-436178ff{--_item-pl:var(--offset);--_item-ta:left}[dir=rtl] .m-43657ece[data-align=left] .m-436178ff{--_item-pl:0;--_item-pr:var(--offset)}.m-43657ece[data-align=right] .m-436178ff{--_item-pr:var(--offset);--_item-ta:right}[dir=rtl] .m-43657ece[data-align=right] .m-436178ff{--_item-pl:var(--offset);--_item-pr:0}[data-mantine-color-scheme=light] .m-436178ff{--_item-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-436178ff{--_item-border-color:var(--mantine-color-dark-4)}[data-mantine-color-scheme] .m-436178ff[data-line-active]:before{border-color:var(--tli-color,var(--tl-color))}.m-436178ff:not(:last-of-type){--_line-display:block}.m-436178ff:not(:first-of-type){--_item-mt:var(--mantine-spacing-xl)}.m-8affcee1{align-items:center;background-color:var(--_bullet-bg-color,var(--mantine-color-body));border:var(--_bullet-border-width,var(--tl-line-width)) solid var(--_bullet-border-color);border-radius:var(--tli-radius,var(--tl-radius));color:var(--_bullet-color,var(--mantine-color-text));display:flex;height:var(--tl-bullet-size);justify-content:center;left:var(--_bullet-left,0);position:absolute;right:var(--_bullet-right,0);top:0;width:var(--tl-bullet-size)}[data-mantine-color-scheme=light] .m-8affcee1{--_bullet-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-8affcee1{--_bullet-border-color:var(--mantine-color-dark-4)}.m-43657ece[data-align=left] .m-8affcee1{--_bullet-left:calc(var(--tl-bullet-size)/2*-1 + var(--tl-line-width)/2*-1);--_bullet-right:auto}.m-43657ece[data-align=right] .m-8affcee1,[dir=rtl] .m-43657ece[data-align=left] .m-8affcee1{--_bullet-left:auto;--_bullet-right:calc(var(--tl-bullet-size)/2*-1 + var(--tl-line-width)/2*-1)}[dir=rtl] .m-43657ece[data-align=right] .m-8affcee1{--_bullet-left:calc(var(--tl-bullet-size)/2*-1 + var(--tl-line-width)/2*-1);--_bullet-right:auto}.m-8affcee1[data-with-child]{--_bullet-border-width:var(--tl-line-width)}[data-mantine-color-scheme=light] .m-8affcee1[data-with-child]{--_bullet-bg-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-8affcee1[data-with-child]{--_bullet-bg-color:var(--mantine-color-dark-4)}.m-8affcee1[data-active]{--_bullet-border-color:var(--tli-color,var(--tl-color));--_bullet-bg-color:var(--mantine-color-white);--_bullet-color:var(--mantine-color-white)}.m-8affcee1[data-active][data-with-child]{--_bullet-bg-color:var(--tli-color,var(--tl-color));--_bullet-color:var(--mantine-color-white)}.m-540e8f41{padding-left:var(--_body-pl,0);padding-right:var(--_body-pr,0);text-align:var(--_body-ta)}.m-43657ece[data-align=left] .m-540e8f41{--_body-pl:var(--offset);--_body-ta:left}[dir=rtl] .m-43657ece[data-align=left] .m-540e8f41{--_body-pl:0;--_body-pr:var(--offset);--_body-ta:right}.m-43657ece[data-align=right] .m-540e8f41{--_body-pr:var(--offset);--_body-ta:right}[dir=rtl] .m-43657ece[data-align=right] .m-540e8f41{--_body-pl:var(--offset);--_body-pr:0;--_body-ta:left}.m-8a5d1357{font-family:var(--mantine-font-family-headings);font-size:var(--title-fz);font-weight:var(--title-fw);line-height:var(--title-lh);margin:0}.m-d6493fad h1,.m-d6493fad h2,.m-d6493fad h3,.m-d6493fad h4,.m-d6493fad h5,.m-d6493fad h6{margin-bottom:var(--mantine-spacing-xs);margin-top:calc(var(--mantine-spacing-xl)*1.55)}.m-d6493fad h1{font-size:var(--mantine-h1-font-size);font-weight:var(--mantine-h1-font-weight);line-height:var(--mantine-h1-line-height)}.m-d6493fad h2{font-size:var(--mantine-h2-font-size);font-weight:var(--mantine-h2-font-weight);line-height:var(--mantine-h2-line-height)}.m-d6493fad h3{font-size:var(--mantine-h3-font-size);font-weight:var(--mantine-h3-font-weight);line-height:var(--mantine-h3-line-height)}.m-d6493fad h4{font-size:var(--mantine-h4-font-size);font-weight:var(--mantine-h4-font-weight);line-height:var(--mantine-h4-line-height)}.m-d6493fad h5{font-size:var(--mantine-h5-font-size);font-weight:var(--mantine-h5-font-weight);line-height:var(--mantine-h5-line-height)}.m-d6493fad h6{font-size:var(--mantine-h6-font-size);font-weight:var(--mantine-h6-font-weight);line-height:var(--mantine-h6-line-height)}.m-d6493fad img{margin-bottom:var(--mantine-spacing-xs);max-width:100%}.m-d6493fad p{margin-bottom:var(--mantine-spacing-lg);margin-top:0}[data-mantine-color-scheme=light] .m-d6493fad mark{background-color:var(--mantine-color-yellow-2);color:inherit}[data-mantine-color-scheme=dark] .m-d6493fad mark{background-color:var(--mantine-color-yellow-5);color:var(--mantine-color-black)}.m-d6493fad a{color:var(--mantine-color-anchor);text-decoration:none}@media (hover:hover){.m-d6493fad a:hover{text-decoration:underline}}@media (hover:none){.m-d6493fad a:active{text-decoration:underline}}.m-d6493fad hr{border:0;border-top:calc(.0625rem*var(--mantine-scale)) solid;margin-bottom:var(--mantine-spacing-md);margin-top:var(--mantine-spacing-md)}[data-mantine-color-scheme=light] .m-d6493fad hr{border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-d6493fad hr{border-color:var(--mantine-color-dark-3)}.m-d6493fad pre{border-radius:var(--mantine-radius-sm);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);line-height:var(--mantine-line-height);margin:0;margin-bottom:var(--mantine-spacing-md);margin-top:var(--mantine-spacing-md);overflow-x:auto;padding:var(--mantine-spacing-xs)}[data-mantine-color-scheme=light] .m-d6493fad pre{background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-d6493fad pre{background-color:var(--mantine-color-dark-8)}.m-d6493fad pre code{background-color:transparent;border:0;border-radius:0;color:inherit;padding:0}.m-d6493fad kbd{--kbd-fz:calc(.75rem*var(--mantine-scale));--kbd-padding:calc(.1875rem*var(--mantine-scale)) calc(.3125rem*var(--mantine-scale));background-color:var(--_kbd-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_kbd-border-color);border-bottom-width:calc(.1875rem*var(--mantine-scale));border-radius:var(--mantine-radius-sm);color:var(--_kbd-color);font-family:var(--mantine-font-family-monospace);font-size:var(--kbd-fz);font-weight:700;line-height:var(--mantine-line-height);padding:var(--kbd-padding)}[data-mantine-color-scheme=light] .m-d6493fad kbd{--_kbd-border-color:var(--mantine-color-gray-3);--_kbd-color:var(--mantine-color-gray-7);--_kbd-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-d6493fad kbd{--_kbd-border-color:var(--mantine-color-dark-3);--_kbd-color:var(--mantine-color-dark-0);--_kbd-bg:var(--mantine-color-dark-5)}.m-d6493fad code{border-radius:var(--mantine-radius-sm);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);line-height:var(--mantine-line-height);padding:calc(.0625rem*var(--mantine-scale)) calc(.3125rem*var(--mantine-scale))}[data-mantine-color-scheme=light] .m-d6493fad code{background-color:var(--mantine-color-gray-0);color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-d6493fad code{background-color:var(--mantine-color-dark-5);color:var(--mantine-color-white)}.m-d6493fad,.m-d6493fad ol,.m-d6493fad ul{margin-bottom:var(--mantine-spacing-md);padding-left:calc(2.375rem*var(--mantine-scale))}.m-d6493fad li,.m-d6493fad ol li,.m-d6493fad ul li{margin-bottom:var(--mantine-spacing-xs)}.m-d6493fad table{border-collapse:collapse;caption-side:bottom;margin-bottom:var(--mantine-spacing-md);width:100%}.m-d6493fad table caption{color:var(--mantine-color-gray-6);font-size:var(--mantine-font-size-sm);margin-top:var(--mantine-spacing-xs)}.m-d6493fad table th{color:var(--mantine-color-gray-7);font-size:var(--mantine-font-size-sm);font-weight:700;padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm);text-align:left}.m-d6493fad table thead th{border-bottom:calc(.0625rem*var(--mantine-scale)) solid;border-color:var(--mantine-color-gray-3)}.m-d6493fad table tfoot th{border-top:calc(.0625rem*var(--mantine-scale)) solid;border-color:var(--mantine-color-gray-3)}.m-d6493fad table td{border-bottom:calc(.0625rem*var(--mantine-scale)) solid;border-color:var(--mantine-color-gray-3);font-size:var(--mantine-font-size-sm);padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm)}.m-d6493fad table tr:last-of-type td{border-bottom:0}.m-d6493fad blockquote{border-radius:var(--mantine-radius-sm);font-size:var(--mantine-font-size-lg);line-height:var(--mantine-line-height);margin:var(--mantine-spacing-md) 0;padding:var(--mantine-spacing-md) var(--mantine-spacing-lg)}[data-mantine-color-scheme=light] .m-d6493fad blockquote{background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-d6493fad blockquote{background-color:var(--mantine-color-dark-8)}._nav_dgwpp_1{height:64px;margin-top:20px}@media (max-width: 900px):{._nav_dgwpp_1{max-width:100%;min-width:100%;width:100%}}._nav_dgwpp_1{gap:2rem;align-items:"center"}._wrapper_dgwpp_20{max-width:900px;border-radius:8px;margin:10px auto 0}._maincontainer_dgwpp_31{display:flex;align-items:center;justify-content:space-between;flex-direction:row}@media (max-width: 500px){._network_dgwpp_42{visibility:hidden}}._buttonContainer_dgwpp_49{width:30px;height:30px;padding:2px;border-radius:4px,}._container_dgwpp_59{display:flex;align-items:center;justify-content:center;flex-direction:row}._mode_dgwpp_66{display:"flex";align-items:"center";justify-content:"center";flex-direction:"row"}@media (max-width: 500px){._mode_dgwpp_66{visibility:hidden}}._root_dgwpp_76{position:"relative"}._icon_dgwpp_83{pointer-events:"none";position:"absolute";z-index:1;top:3}._iconLight_dgwpp_90{left:4}._iconDark_dgwpp_95{right:4}._homeContainer_65xox_47{max-width:450px;margin:80px auto 0;border-radius:4px;border:1px solid #4a4a4a;box-shadow:0 1px 2px #1018280d}._formContainer_65xox_57{padding:20px}._heading_65xox_61{font-size:40px;background:#00ff00;background:-webkit-linear-gradient(to left,#6fa56f 0%,#00ffff 100%);background:-moz-linear-gradient(to left,#6b9c6b 0%,#00ffff 100%);background:linear-gradient(to left,#00ff00 0%,#00ffff 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;text-align:center;font-weight:750}._subHeading_65xox_73{font-size:16px;text-align:center}._inputContainer_65xox_78{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}._selectGroup_65xox_89{display:flex;align-items:center;justify-content:center}._btn_65xox_95{background-image:linear-gradient(to right,#1d976c 0%,#93f9b9 51%,#1d976c 100%);transition:.5s;background-size:200% auto;color:#fff}._btn_65xox_95:hover{background-position:right center;color:#fff;text-decoration:none}._helperText_65xox_113{font-size:16px}._successContainer_65xox_117{width:600px;margin:80px auto 0;border-radius:4px;border:1px solid #4a4a4a;box-shadow:0 1px 2px #1018280d}._copyContainer_65xox_127{display:flex;align-items:center;gap:20px}._goBack_65xox_133{margin-top:20px}._input_65xox_78{width:400px;cursor:pointer}@media screen and (max-width: 600px){._successContainer_65xox_117{width:100%}._copyContainer_65xox_127{flex-direction:column}._input_65xox_78{width:100%;cursor:pointer}._btn_65xox_95{width:100%}}._homeContainer_pcvo1_3{max-width:500px;margin:80px auto 0;border-radius:4px;border:1px solid #4a4a4a;background-color:#fff d}._formContainer_pcvo1_13{padding:20px;display:flex;align-items:center;justify-content:center;flex-direction:column}._heading_pcvo1_21{text-align:center;background:#00FF00;background:-webkit-linear-gradient(to left,#00FF00 0%,#00FFFF 100%);background:-moz-linear-gradient(to left,#00FF00 0%,#00FFFF 100%);background:linear-gradient(to left,#00FF00 0%,#00FFFF 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}._subHeading_pcvo1_31{font-size:15px;text-align:center}._loader_pcvo1_36{font-size:16px;text-align:center;font-weight:600}._btn_pcvo1_42{background-image:linear-gradient(to right,#1d976c 0%,#93f9b9 51%,#1d976c 100%);transition:.5s;background-size:200% auto;color:#fff;width:50%}._btn_pcvo1_42:hover{background-position:right center;color:#fff;text-decoration:none}._input_pcvo1_57{width:100%;cursor:pointer}._inputContainer_pcvo1_62{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}._accountContainer_ymy3i_3{max-width:600px;margin:80px auto 0;border-radius:4px;border:1px solid #4a4a4a;background-color:#fff d}._formContainer_ymy3i_13{padding:20px;display:flex;align-items:center;justify-content:center;flex-direction:column}._avatarContainer_ymy3i_22{display:flex;align-items:center;justify-content:center;flex-direction:column}._balance_ymy3i_30{font-size:20px;font-weight:700}._avatar_ymy3i_22{height:60px;width:60px;margin-top:20px;margin-bottom:20px;border-radius:50%}._heading_ymy3i_43{text-align:center;background:#00FF00;background:-webkit-linear-gradient(to left,#00FF00 0%,#00FFFF 100%);background:-moz-linear-gradient(to left,#00FF00 0%,#00FFFF 100%);background:linear-gradient(to left,#00FF00 0%,#00FFFF 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}._btn_ymy3i_54{background-image:linear-gradient(to right,#1d976c 0%,#93f9b9 51%,#1d976c 100%);transition:.5s;background-size:200% auto;color:#fff}._btn_ymy3i_54:hover{background-position:right center;color:#fff;text-decoration:none}._actionsContainer_ymy3i_69{display:flex;align-items:center;justify-content:center;flex-direction:column}._actions_ymy3i_69{margin-top:20px;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:20px;margin-bottom:20px} +body,html{height:100%}*,:after,:before{box-sizing:border-box}button,input,select,textarea{font:inherit}button,select{text-transform:none}body{-webkit-font-smoothing:var(--mantine-webkit-font-smoothing);-moz-osx-font-smoothing:var(--mantine-moz-font-smoothing);background-color:var(--mantine-color-body);color:var(--mantine-color-text);font-family:var(--mantine-font-family);font-size:var(--mantine-font-size-md);line-height:var(--mantine-line-height);margin:0}@media screen and (max-device-width:500px){body{-webkit-text-size-adjust:100%}}@media (prefers-reduced-motion:reduce){[data-respect-reduced-motion] [data-reduce-motion]{animation:none;transition:none}}[data-mantine-color-scheme=dark] .mantine-dark-hidden,[data-mantine-color-scheme=light] .mantine-light-hidden{display:none}.mantine-focus-auto:focus-visible{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.mantine-focus-always:focus{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.mantine-focus-never:focus{outline:none}.mantine-active:active{transform:translateY(calc(.0625rem*var(--mantine-scale)))}[dir=rtl] .mantine-rotate-rtl{transform:rotate(180deg)}:root{--mantine-z-index-app:100;--mantine-z-index-modal:200;--mantine-z-index-popover:300;--mantine-z-index-overlay:400;--mantine-z-index-max:9999;--mantine-scale:1;--mantine-cursor-type:default;--mantine-webkit-font-smoothing:antialiased;--mantine-color-scheme:light dark;--mantine-moz-font-smoothing:grayscale;--mantine-color-white:#fff;--mantine-color-black:#000;--mantine-line-height:1.55;--mantine-font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;--mantine-font-family-monospace:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;--mantine-font-family-headings:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;--mantine-heading-font-weight:700;--mantine-radius-default:calc(.25rem*var(--mantine-scale));--mantine-primary-color-filled:var(--mantine-color-blue-filled);--mantine-primary-color-filled-hover:var(--mantine-color-blue-filled-hover);--mantine-primary-color-light:var(--mantine-color-blue-light);--mantine-primary-color-light-hover:var(--mantine-color-blue-light-hover);--mantine-primary-color-light-color:var(--mantine-color-blue-light-color);--mantine-breakpoint-xs:36em;--mantine-breakpoint-sm:48em;--mantine-breakpoint-md:62em;--mantine-breakpoint-lg:75em;--mantine-breakpoint-xl:88em;--mantine-spacing-xs:calc(.625rem*var(--mantine-scale));--mantine-spacing-sm:calc(.75rem*var(--mantine-scale));--mantine-spacing-md:calc(1rem*var(--mantine-scale));--mantine-spacing-lg:calc(1.25rem*var(--mantine-scale));--mantine-spacing-xl:calc(2rem*var(--mantine-scale));--mantine-font-size-xs:calc(.75rem*var(--mantine-scale));--mantine-font-size-sm:calc(.875rem*var(--mantine-scale));--mantine-font-size-md:calc(1rem*var(--mantine-scale));--mantine-font-size-lg:calc(1.125rem*var(--mantine-scale));--mantine-font-size-xl:calc(1.25rem*var(--mantine-scale));--mantine-line-height-xs:1.4;--mantine-line-height-sm:1.45;--mantine-line-height-md:1.55;--mantine-line-height-lg:1.6;--mantine-line-height-xl:1.65;--mantine-shadow-xs:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),0 calc(.0625rem*var(--mantine-scale)) calc(.125rem*var(--mantine-scale)) rgba(0,0,0,.1);--mantine-shadow-sm:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),rgba(0,0,0,.05) 0 calc(.625rem*var(--mantine-scale)) calc(.9375rem*var(--mantine-scale)) calc(-.3125rem*var(--mantine-scale)),rgba(0,0,0,.04) 0 calc(.4375rem*var(--mantine-scale)) calc(.4375rem*var(--mantine-scale)) calc(-.3125rem*var(--mantine-scale));--mantine-shadow-md:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),rgba(0,0,0,.05) 0 calc(1.25rem*var(--mantine-scale)) calc(1.5625rem*var(--mantine-scale)) calc(-.3125rem*var(--mantine-scale)),rgba(0,0,0,.04) 0 calc(.625rem*var(--mantine-scale)) calc(.625rem*var(--mantine-scale)) calc(-.3125rem*var(--mantine-scale));--mantine-shadow-lg:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),rgba(0,0,0,.05) 0 calc(1.75rem*var(--mantine-scale)) calc(1.4375rem*var(--mantine-scale)) calc(-.4375rem*var(--mantine-scale)),rgba(0,0,0,.04) 0 calc(.75rem*var(--mantine-scale)) calc(.75rem*var(--mantine-scale)) calc(-.4375rem*var(--mantine-scale));--mantine-shadow-xl:0 calc(.0625rem*var(--mantine-scale)) calc(.1875rem*var(--mantine-scale)) rgba(0,0,0,.05),rgba(0,0,0,.05) 0 calc(2.25rem*var(--mantine-scale)) calc(1.75rem*var(--mantine-scale)) calc(-.4375rem*var(--mantine-scale)),rgba(0,0,0,.04) 0 calc(1.0625rem*var(--mantine-scale)) calc(1.0625rem*var(--mantine-scale)) calc(-.4375rem*var(--mantine-scale));--mantine-radius-xs:calc(.125rem*var(--mantine-scale));--mantine-radius-sm:calc(.25rem*var(--mantine-scale));--mantine-radius-md:calc(.5rem*var(--mantine-scale));--mantine-radius-lg:calc(1rem*var(--mantine-scale));--mantine-radius-xl:calc(2rem*var(--mantine-scale));--mantine-color-dark-0:#c9c9c9;--mantine-color-dark-1:#b8b8b8;--mantine-color-dark-2:#828282;--mantine-color-dark-3:#696969;--mantine-color-dark-4:#4a4a4a;--mantine-color-dark-5:#404040;--mantine-color-dark-6:#383838;--mantine-color-dark-7:#2e2e2e;--mantine-color-dark-8:#242424;--mantine-color-dark-9:#212121;--mantine-color-gray-0:#f8f9fa;--mantine-color-gray-1:#f1f3f5;--mantine-color-gray-2:#e9ecef;--mantine-color-gray-3:#dee2e6;--mantine-color-gray-4:#ced4da;--mantine-color-gray-5:#adb5bd;--mantine-color-gray-6:#868e96;--mantine-color-gray-7:#495057;--mantine-color-gray-8:#343a40;--mantine-color-gray-9:#212529;--mantine-color-red-0:#fff5f5;--mantine-color-red-1:#ffe3e3;--mantine-color-red-2:#ffc9c9;--mantine-color-red-3:#ffa8a8;--mantine-color-red-4:#ff8787;--mantine-color-red-5:#ff6b6b;--mantine-color-red-6:#fa5252;--mantine-color-red-7:#f03e3e;--mantine-color-red-8:#e03131;--mantine-color-red-9:#c92a2a;--mantine-color-pink-0:#fff0f6;--mantine-color-pink-1:#ffdeeb;--mantine-color-pink-2:#fcc2d7;--mantine-color-pink-3:#faa2c1;--mantine-color-pink-4:#f783ac;--mantine-color-pink-5:#f06595;--mantine-color-pink-6:#e64980;--mantine-color-pink-7:#d6336c;--mantine-color-pink-8:#c2255c;--mantine-color-pink-9:#a61e4d;--mantine-color-grape-0:#f8f0fc;--mantine-color-grape-1:#f3d9fa;--mantine-color-grape-2:#eebefa;--mantine-color-grape-3:#e599f7;--mantine-color-grape-4:#da77f2;--mantine-color-grape-5:#cc5de8;--mantine-color-grape-6:#be4bdb;--mantine-color-grape-7:#ae3ec9;--mantine-color-grape-8:#9c36b5;--mantine-color-grape-9:#862e9c;--mantine-color-violet-0:#f3f0ff;--mantine-color-violet-1:#e5dbff;--mantine-color-violet-2:#d0bfff;--mantine-color-violet-3:#b197fc;--mantine-color-violet-4:#9775fa;--mantine-color-violet-5:#845ef7;--mantine-color-violet-6:#7950f2;--mantine-color-violet-7:#7048e8;--mantine-color-violet-8:#6741d9;--mantine-color-violet-9:#5f3dc4;--mantine-color-indigo-0:#edf2ff;--mantine-color-indigo-1:#dbe4ff;--mantine-color-indigo-2:#bac8ff;--mantine-color-indigo-3:#91a7ff;--mantine-color-indigo-4:#748ffc;--mantine-color-indigo-5:#5c7cfa;--mantine-color-indigo-6:#4c6ef5;--mantine-color-indigo-7:#4263eb;--mantine-color-indigo-8:#3b5bdb;--mantine-color-indigo-9:#364fc7;--mantine-color-blue-0:#e7f5ff;--mantine-color-blue-1:#d0ebff;--mantine-color-blue-2:#a5d8ff;--mantine-color-blue-3:#74c0fc;--mantine-color-blue-4:#4dabf7;--mantine-color-blue-5:#339af0;--mantine-color-blue-6:#228be6;--mantine-color-blue-7:#1c7ed6;--mantine-color-blue-8:#1971c2;--mantine-color-blue-9:#1864ab;--mantine-color-cyan-0:#e3fafc;--mantine-color-cyan-1:#c5f6fa;--mantine-color-cyan-2:#99e9f2;--mantine-color-cyan-3:#66d9e8;--mantine-color-cyan-4:#3bc9db;--mantine-color-cyan-5:#22b8cf;--mantine-color-cyan-6:#15aabf;--mantine-color-cyan-7:#1098ad;--mantine-color-cyan-8:#0c8599;--mantine-color-cyan-9:#0b7285;--mantine-color-teal-0:#e6fcf5;--mantine-color-teal-1:#c3fae8;--mantine-color-teal-2:#96f2d7;--mantine-color-teal-3:#63e6be;--mantine-color-teal-4:#38d9a9;--mantine-color-teal-5:#20c997;--mantine-color-teal-6:#12b886;--mantine-color-teal-7:#0ca678;--mantine-color-teal-8:#099268;--mantine-color-teal-9:#087f5b;--mantine-color-green-0:#ebfbee;--mantine-color-green-1:#d3f9d8;--mantine-color-green-2:#b2f2bb;--mantine-color-green-3:#8ce99a;--mantine-color-green-4:#69db7c;--mantine-color-green-5:#51cf66;--mantine-color-green-6:#40c057;--mantine-color-green-7:#37b24d;--mantine-color-green-8:#2f9e44;--mantine-color-green-9:#2b8a3e;--mantine-color-lime-0:#f4fce3;--mantine-color-lime-1:#e9fac8;--mantine-color-lime-2:#d8f5a2;--mantine-color-lime-3:#c0eb75;--mantine-color-lime-4:#a9e34b;--mantine-color-lime-5:#94d82d;--mantine-color-lime-6:#82c91e;--mantine-color-lime-7:#74b816;--mantine-color-lime-8:#66a80f;--mantine-color-lime-9:#5c940d;--mantine-color-yellow-0:#fff9db;--mantine-color-yellow-1:#fff3bf;--mantine-color-yellow-2:#ffec99;--mantine-color-yellow-3:#ffe066;--mantine-color-yellow-4:#ffd43b;--mantine-color-yellow-5:#fcc419;--mantine-color-yellow-6:#fab005;--mantine-color-yellow-7:#f59f00;--mantine-color-yellow-8:#f08c00;--mantine-color-yellow-9:#e67700;--mantine-color-orange-0:#fff4e6;--mantine-color-orange-1:#ffe8cc;--mantine-color-orange-2:#ffd8a8;--mantine-color-orange-3:#ffc078;--mantine-color-orange-4:#ffa94d;--mantine-color-orange-5:#ff922b;--mantine-color-orange-6:#fd7e14;--mantine-color-orange-7:#f76707;--mantine-color-orange-8:#e8590c;--mantine-color-orange-9:#d9480f;--mantine-h1-font-size:calc(2.125rem*var(--mantine-scale));--mantine-h1-line-height:1.3;--mantine-h1-font-weight:700;--mantine-h2-font-size:calc(1.625rem*var(--mantine-scale));--mantine-h2-line-height:1.35;--mantine-h2-font-weight:700;--mantine-h3-font-size:calc(1.375rem*var(--mantine-scale));--mantine-h3-line-height:1.4;--mantine-h3-font-weight:700;--mantine-h4-font-size:calc(1.125rem*var(--mantine-scale));--mantine-h4-line-height:1.45;--mantine-h4-font-weight:700;--mantine-h5-font-size:calc(1rem*var(--mantine-scale));--mantine-h5-line-height:1.5;--mantine-h5-font-weight:700;--mantine-h6-font-size:calc(.875rem*var(--mantine-scale));--mantine-h6-line-height:1.5;--mantine-h6-font-weight:700;color-scheme:var(--mantine-color-scheme)}:root[data-mantine-color-scheme=dark]{--mantine-color-scheme:dark;--mantine-color-bright:var(--mantine-color-white);--mantine-color-text:var(--mantine-color-dark-0);--mantine-color-body:var(--mantine-color-dark-7);--mantine-color-error:var(--mantine-color-red-8);--mantine-color-placeholder:var(--mantine-color-dark-3);--mantine-color-anchor:var(--mantine-color-blue-4);--mantine-color-default:var(--mantine-color-dark-6);--mantine-color-default-hover:var(--mantine-color-dark-5);--mantine-color-default-color:var(--mantine-color-white);--mantine-color-default-border:var(--mantine-color-dark-4);--mantine-color-dimmed:var(--mantine-color-dark-2);--mantine-color-dark-text:var(--mantine-color-dark-4);--mantine-color-dark-filled:var(--mantine-color-dark-8);--mantine-color-dark-filled-hover:var(--mantine-color-dark-7);--mantine-color-dark-light:rgba(36,36,36,.15);--mantine-color-dark-light-hover:rgba(36,36,36,.2);--mantine-color-dark-light-color:#656b73;--mantine-color-dark-outline:var(--mantine-color-dark-4);--mantine-color-dark-outline-hover:rgba(36,36,36,.05);--mantine-color-gray-text:var(--mantine-color-gray-4);--mantine-color-gray-filled:#343a40;--mantine-color-gray-filled-hover:#212529;--mantine-color-gray-light:hsla(210,7%,56%,.15);--mantine-color-gray-light-hover:hsla(210,7%,56%,.2);--mantine-color-gray-light-color:#dee2e6;--mantine-color-gray-outline:#ced4da;--mantine-color-gray-outline-hover:rgba(206,212,218,.05);--mantine-color-red-text:var(--mantine-color-red-4);--mantine-color-red-filled:#e03131;--mantine-color-red-filled-hover:#c92a2a;--mantine-color-red-light:rgba(250,82,82,.15);--mantine-color-red-light-hover:rgba(250,82,82,.2);--mantine-color-red-light-color:#ffa8a8;--mantine-color-red-outline:#ff8787;--mantine-color-red-outline-hover:hsla(0,100%,76%,.05);--mantine-color-pink-text:var(--mantine-color-pink-4);--mantine-color-pink-filled:#c2255c;--mantine-color-pink-filled-hover:#a61e4d;--mantine-color-pink-light:rgba(230,73,128,.15);--mantine-color-pink-light-hover:rgba(230,73,128,.2);--mantine-color-pink-light-color:#faa2c1;--mantine-color-pink-outline:#f783ac;--mantine-color-pink-outline-hover:rgba(247,131,172,.05);--mantine-color-grape-text:var(--mantine-color-grape-4);--mantine-color-grape-filled:#9c36b5;--mantine-color-grape-filled-hover:#862e9c;--mantine-color-grape-light:rgba(190,75,219,.15);--mantine-color-grape-light-hover:rgba(190,75,219,.2);--mantine-color-grape-light-color:#e599f7;--mantine-color-grape-outline:#da77f2;--mantine-color-grape-outline-hover:rgba(218,119,242,.05);--mantine-color-violet-text:var(--mantine-color-violet-4);--mantine-color-violet-filled:#6741d9;--mantine-color-violet-filled-hover:#5f3dc4;--mantine-color-violet-light:rgba(121,80,242,.15);--mantine-color-violet-light-hover:rgba(121,80,242,.2);--mantine-color-violet-light-color:#b197fc;--mantine-color-violet-outline:#9775fa;--mantine-color-violet-outline-hover:rgba(151,117,250,.05);--mantine-color-indigo-text:var(--mantine-color-indigo-4);--mantine-color-indigo-filled:#3b5bdb;--mantine-color-indigo-filled-hover:#364fc7;--mantine-color-indigo-light:rgba(76,110,245,.15);--mantine-color-indigo-light-hover:rgba(76,110,245,.2);--mantine-color-indigo-light-color:#91a7ff;--mantine-color-indigo-outline:#748ffc;--mantine-color-indigo-outline-hover:rgba(116,143,252,.05);--mantine-color-blue-text:var(--mantine-color-blue-4);--mantine-color-blue-filled:#1971c2;--mantine-color-blue-filled-hover:#1864ab;--mantine-color-blue-light:rgba(34,139,230,.15);--mantine-color-blue-light-hover:rgba(34,139,230,.2);--mantine-color-blue-light-color:#74c0fc;--mantine-color-blue-outline:#4dabf7;--mantine-color-blue-outline-hover:rgba(77,171,247,.05);--mantine-color-cyan-text:var(--mantine-color-cyan-4);--mantine-color-cyan-filled:#0c8599;--mantine-color-cyan-filled-hover:#0b7285;--mantine-color-cyan-light:rgba(21,170,191,.15);--mantine-color-cyan-light-hover:rgba(21,170,191,.2);--mantine-color-cyan-light-color:#66d9e8;--mantine-color-cyan-outline:#3bc9db;--mantine-color-cyan-outline-hover:rgba(59,201,219,.05);--mantine-color-teal-text:var(--mantine-color-teal-4);--mantine-color-teal-filled:#099268;--mantine-color-teal-filled-hover:#087f5b;--mantine-color-teal-light:rgba(18,184,134,.15);--mantine-color-teal-light-hover:rgba(18,184,134,.2);--mantine-color-teal-light-color:#63e6be;--mantine-color-teal-outline:#38d9a9;--mantine-color-teal-outline-hover:rgba(56,217,169,.05);--mantine-color-green-text:var(--mantine-color-green-4);--mantine-color-green-filled:#2f9e44;--mantine-color-green-filled-hover:#2b8a3e;--mantine-color-green-light:rgba(64,192,87,.15);--mantine-color-green-light-hover:rgba(64,192,87,.2);--mantine-color-green-light-color:#8ce99a;--mantine-color-green-outline:#69db7c;--mantine-color-green-outline-hover:rgba(105,219,124,.05);--mantine-color-lime-text:var(--mantine-color-lime-4);--mantine-color-lime-filled:#66a80f;--mantine-color-lime-filled-hover:#5c940d;--mantine-color-lime-light:rgba(130,201,30,.15);--mantine-color-lime-light-hover:rgba(130,201,30,.2);--mantine-color-lime-light-color:#c0eb75;--mantine-color-lime-outline:#a9e34b;--mantine-color-lime-outline-hover:rgba(169,227,75,.05);--mantine-color-yellow-text:var(--mantine-color-yellow-4);--mantine-color-yellow-filled:#f08c00;--mantine-color-yellow-filled-hover:#e67700;--mantine-color-yellow-light:rgba(250,176,5,.15);--mantine-color-yellow-light-hover:rgba(250,176,5,.2);--mantine-color-yellow-light-color:#ffe066;--mantine-color-yellow-outline:#ffd43b;--mantine-color-yellow-outline-hover:rgba(255,212,59,.05);--mantine-color-orange-text:var(--mantine-color-orange-4);--mantine-color-orange-filled:#e8590c;--mantine-color-orange-filled-hover:#d9480f;--mantine-color-orange-light:rgba(253,126,20,.15);--mantine-color-orange-light-hover:rgba(253,126,20,.2);--mantine-color-orange-light-color:#ffc078;--mantine-color-orange-outline:#ffa94d;--mantine-color-orange-outline-hover:rgba(255,169,77,.05)}:root[data-mantine-color-scheme=light]{--mantine-color-scheme:light;--mantine-color-bright:var(--mantine-color-black);--mantine-color-text:#000;--mantine-color-body:#fff;--mantine-color-error:var(--mantine-color-red-6);--mantine-color-placeholder:var(--mantine-color-gray-5);--mantine-color-anchor:var(--mantine-primary-color-filled);--mantine-color-default:var(--mantine-color-white);--mantine-color-default-hover:var(--mantine-color-gray-0);--mantine-color-default-color:var(--mantine-color-gray-9);--mantine-color-default-border:var(--mantine-color-gray-4);--mantine-color-dimmed:var(--mantine-color-gray-6);--mantine-color-dark-text:var(--mantine-color-dark-filled);--mantine-color-dark-filled:var(--mantine-color-dark-6);--mantine-color-dark-filled-hover:var(--mantine-color-dark-7);--mantine-color-dark-light:rgba(56,56,56,.1);--mantine-color-dark-light-hover:rgba(56,56,56,.12);--mantine-color-dark-light-color:var(--mantine-color-dark-6);--mantine-color-dark-outline:var(--mantine-color-dark-6);--mantine-color-dark-outline-hover:rgba(56,56,56,.05);--mantine-color-gray-text:var(--mantine-color-gray-filled);--mantine-color-gray-filled:#868e96;--mantine-color-gray-filled-hover:#495057;--mantine-color-gray-light:hsla(210,7%,56%,.1);--mantine-color-gray-light-hover:hsla(210,7%,56%,.12);--mantine-color-gray-light-color:#868e96;--mantine-color-gray-outline:#868e96;--mantine-color-gray-outline-hover:hsla(210,7%,56%,.05);--mantine-color-red-text:var(--mantine-color-red-filled);--mantine-color-red-filled:#fa5252;--mantine-color-red-filled-hover:#f03e3e;--mantine-color-red-light:rgba(250,82,82,.1);--mantine-color-red-light-hover:rgba(250,82,82,.12);--mantine-color-red-light-color:#fa5252;--mantine-color-red-outline:#fa5252;--mantine-color-red-outline-hover:rgba(250,82,82,.05);--mantine-color-pink-text:var(--mantine-color-pink-filled);--mantine-color-pink-filled:#e64980;--mantine-color-pink-filled-hover:#d6336c;--mantine-color-pink-light:rgba(230,73,128,.1);--mantine-color-pink-light-hover:rgba(230,73,128,.12);--mantine-color-pink-light-color:#e64980;--mantine-color-pink-outline:#e64980;--mantine-color-pink-outline-hover:rgba(230,73,128,.05);--mantine-color-grape-text:var(--mantine-color-grape-filled);--mantine-color-grape-filled:#be4bdb;--mantine-color-grape-filled-hover:#ae3ec9;--mantine-color-grape-light:rgba(190,75,219,.1);--mantine-color-grape-light-hover:rgba(190,75,219,.12);--mantine-color-grape-light-color:#be4bdb;--mantine-color-grape-outline:#be4bdb;--mantine-color-grape-outline-hover:rgba(190,75,219,.05);--mantine-color-violet-text:var(--mantine-color-violet-filled);--mantine-color-violet-filled:#7950f2;--mantine-color-violet-filled-hover:#7048e8;--mantine-color-violet-light:rgba(121,80,242,.1);--mantine-color-violet-light-hover:rgba(121,80,242,.12);--mantine-color-violet-light-color:#7950f2;--mantine-color-violet-outline:#7950f2;--mantine-color-violet-outline-hover:rgba(121,80,242,.05);--mantine-color-indigo-text:var(--mantine-color-indigo-filled);--mantine-color-indigo-filled:#4c6ef5;--mantine-color-indigo-filled-hover:#4263eb;--mantine-color-indigo-light:rgba(76,110,245,.1);--mantine-color-indigo-light-hover:rgba(76,110,245,.12);--mantine-color-indigo-light-color:#4c6ef5;--mantine-color-indigo-outline:#4c6ef5;--mantine-color-indigo-outline-hover:rgba(76,110,245,.05);--mantine-color-blue-text:var(--mantine-color-blue-filled);--mantine-color-blue-filled:#228be6;--mantine-color-blue-filled-hover:#1c7ed6;--mantine-color-blue-light:rgba(34,139,230,.1);--mantine-color-blue-light-hover:rgba(34,139,230,.12);--mantine-color-blue-light-color:#228be6;--mantine-color-blue-outline:#228be6;--mantine-color-blue-outline-hover:rgba(34,139,230,.05);--mantine-color-cyan-text:var(--mantine-color-cyan-filled);--mantine-color-cyan-filled:#15aabf;--mantine-color-cyan-filled-hover:#1098ad;--mantine-color-cyan-light:rgba(21,170,191,.1);--mantine-color-cyan-light-hover:rgba(21,170,191,.12);--mantine-color-cyan-light-color:#15aabf;--mantine-color-cyan-outline:#15aabf;--mantine-color-cyan-outline-hover:rgba(21,170,191,.05);--mantine-color-teal-text:var(--mantine-color-teal-filled);--mantine-color-teal-filled:#12b886;--mantine-color-teal-filled-hover:#0ca678;--mantine-color-teal-light:rgba(18,184,134,.1);--mantine-color-teal-light-hover:rgba(18,184,134,.12);--mantine-color-teal-light-color:#12b886;--mantine-color-teal-outline:#12b886;--mantine-color-teal-outline-hover:rgba(18,184,134,.05);--mantine-color-green-text:var(--mantine-color-green-filled);--mantine-color-green-filled:#40c057;--mantine-color-green-filled-hover:#37b24d;--mantine-color-green-light:rgba(64,192,87,.1);--mantine-color-green-light-hover:rgba(64,192,87,.12);--mantine-color-green-light-color:#40c057;--mantine-color-green-outline:#40c057;--mantine-color-green-outline-hover:rgba(64,192,87,.05);--mantine-color-lime-text:var(--mantine-color-lime-filled);--mantine-color-lime-filled:#82c91e;--mantine-color-lime-filled-hover:#74b816;--mantine-color-lime-light:rgba(130,201,30,.1);--mantine-color-lime-light-hover:rgba(130,201,30,.12);--mantine-color-lime-light-color:#82c91e;--mantine-color-lime-outline:#82c91e;--mantine-color-lime-outline-hover:rgba(130,201,30,.05);--mantine-color-yellow-text:var(--mantine-color-yellow-filled);--mantine-color-yellow-filled:#fab005;--mantine-color-yellow-filled-hover:#f59f00;--mantine-color-yellow-light:rgba(250,176,5,.1);--mantine-color-yellow-light-hover:rgba(250,176,5,.12);--mantine-color-yellow-light-color:#fab005;--mantine-color-yellow-outline:#fab005;--mantine-color-yellow-outline-hover:rgba(250,176,5,.05);--mantine-color-orange-text:var(--mantine-color-orange-filled);--mantine-color-orange-filled:#fd7e14;--mantine-color-orange-filled-hover:#f76707;--mantine-color-orange-light:rgba(253,126,20,.1);--mantine-color-orange-light-hover:rgba(253,126,20,.12);--mantine-color-orange-light-color:#fd7e14;--mantine-color-orange-outline:#fd7e14;--mantine-color-orange-outline-hover:rgba(253,126,20,.05)}.m-d57069b5{--scrollarea-scrollbar-size:calc(.75rem*var(--mantine-scale));overflow:hidden;position:relative}.m-c0783ff9{-ms-overflow-style:none;-webkit-overflow-scrolling:touch;height:100%;padding-bottom:var(--_viewport-padding-bottom,0);padding-left:var(--_viewport-padding-left,0);padding-right:var(--_viewport-padding-right,0);scrollbar-width:none;width:100%}.m-c0783ff9::-webkit-scrollbar{display:none}.m-c0783ff9[data-offset-scrollbars=xy],.m-c0783ff9[data-offset-scrollbars=y]{--_viewport-padding-right:var(--scrollarea-scrollbar-size);--_viewport-padding-left:unset}[dir=rtl] .m-c0783ff9[data-offset-scrollbars=xy],[dir=rtl] .m-c0783ff9[data-offset-scrollbars=y]{--_viewport-padding-right:unset;--_viewport-padding-left:var(--scrollarea-scrollbar-size)}.m-c0783ff9[data-offset-scrollbars=x],.m-c0783ff9[data-offset-scrollbars=xy]{--_viewport-padding-bottom:var(--scrollarea-scrollbar-size)}.m-f8f631dd{display:table;min-width:100%}.m-c44ba933{background-color:var(--_scrollbar-bg,transparent);box-sizing:border-box;display:var(--_scrollbar-display,flex);flex-direction:var(--_scrollbar-direction,row);height:var(--_scrollbar-height);padding:calc(var(--scrollarea-scrollbar-size)/5);touch-action:none;transition:background-color .15s ease,opacity .15s ease;-webkit-user-select:none;user-select:none;width:var(--_scrollbar-width)}.m-c44ba933>.m-d8b5e363{background-color:var(--_thumb-bg)}@media (hover:hover){[data-mantine-color-scheme=light] .m-c44ba933:hover{--_scrollbar-bg:var(--mantine-color-gray-0);--_thumb-bg:rgba(0,0,0,.5)}[data-mantine-color-scheme=dark] .m-c44ba933:hover{--_scrollbar-bg:var(--mantine-color-dark-8);--_thumb-bg:hsla(0,0%,100%,.5)}}@media (hover:none){[data-mantine-color-scheme=light] .m-c44ba933:active{--_scrollbar-bg:var(--mantine-color-gray-0);--_thumb-bg:rgba(0,0,0,.5)}[data-mantine-color-scheme=dark] .m-c44ba933:active{--_scrollbar-bg:var(--mantine-color-dark-8);--_thumb-bg:hsla(0,0%,100%,.5)}}.m-c44ba933[data-hidden],.m-c44ba933[data-state=hidden]{--_scrollbar-display:none}.m-c44ba933[data-orientation=vertical]{--_scrollbar-width:var(--scrollarea-scrollbar-size);bottom:var(--sa-corner-width);right:0;top:0}[dir=rtl] .m-c44ba933[data-orientation=vertical]{left:0;right:unset}.m-c44ba933[data-orientation=horizontal]{--_scrollbar-height:var(--scrollarea-scrollbar-size);--_scrollbar-direction:column;bottom:0;left:0;right:var(--sa-corner-height)}[dir=rtl] .m-c44ba933[data-orientation=horizontal]{left:var(--sa-corner-height);right:0}.m-d8b5e363{background-color:var(--_thumb-bg);border-radius:var(--scrollarea-scrollbar-size);flex:1;overflow:hidden;position:relative;transition:background-color .15s ease}.m-d8b5e363:before{content:'""';height:100%;left:50%;min-height:calc(2.75rem*var(--mantine-scale));min-width:calc(2.75rem*var(--mantine-scale));position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}[data-mantine-color-scheme=light] .m-d8b5e363{--_thumb-bg:rgba(0,0,0,.4)}[data-mantine-color-scheme=dark] .m-d8b5e363{--_thumb-bg:hsla(0,0%,100%,.4)}.m-21657268{background-color:var(--_corner-bg);bottom:0;display:var(--_corner-display,block);opacity:var(--_corner-opacity,0);position:absolute;right:0;transition:opacity .15s ease}[dir=rtl] .m-21657268{bottom:0;left:0;right:unset}[data-mantine-color-scheme=light] .m-21657268{--_corner-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-21657268{--_corner-bg:var(--mantine-color-dark-8)}.m-21657268[data-hovered]{--_corner-opacity:1}.m-21657268[data-hidden]{--_corner-display:none}.m-87cf2631{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;color:inherit;cursor:pointer;font-size:var(--mantine-font-size-md);padding:0;text-align:left;text-decoration:none;touch-action:manipulation}[dir=rtl] .m-87cf2631{text-align:right}.m-515a97f8{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.m-1b7284a3{-webkit-tap-highlight-color:transparent;background-color:var(--mantine-color-body);border:var(--_paper-border,none);border-radius:var(--paper-radius,var(--mantine-radius-default));box-shadow:var(--paper-shadow,none);display:block;outline:0;text-decoration:none;touch-action:manipulation}[data-mantine-color-scheme=light] .m-1b7284a3[data-with-border]{--_paper-border:calc(.0625rem*var(--mantine-scale)) solid var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-1b7284a3[data-with-border]{--_paper-border:calc(.0625rem*var(--mantine-scale)) solid var(--mantine-color-dark-4)}.m-1b7284a3:not([data-with-border]){--_paper-border:none!important}.m-38a85659{background-color:var(--_popover-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_popover-bd);border-radius:var(--popover-radius,var(--mantine-radius-default));box-shadow:var(--popover-shadow,none);padding:var(--mantine-spacing-sm) var(--mantine-spacing-md);position:absolute}.m-38a85659:focus{outline:none}[data-mantine-color-scheme=light] .m-38a85659{--_popover-bg:var(--mantine-color-white);--_popover-bd:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-38a85659{--_popover-bg:var(--mantine-color-dark-6);--_popover-bd:var(--mantine-color-dark-4)}.m-a31dc6c1{background-color:inherit;border:calc(.0625rem*var(--mantine-scale)) solid var(--_popover-bd);z-index:1}.m-5ae2e3c{--loader-size-xs:calc(1.125rem*var(--mantine-scale));--loader-size-sm:calc(1.375rem*var(--mantine-scale));--loader-size-md:calc(2.25rem*var(--mantine-scale));--loader-size-lg:calc(2.75rem*var(--mantine-scale));--loader-size-xl:calc(3.625rem*var(--mantine-scale));--loader-size:var(--loader-size-md);--loader-color:var(--mantine-primary-color-filled)}@keyframes m-5d2b3b9d{0%{opacity:0;transform:scale(.6)}50%,to{transform:scale(1)}}.m-7a2bd4cd{display:flex;gap:calc(var(--loader-size)/5);height:var(--loader-size);position:relative;width:var(--loader-size)}.m-870bb79{animation:m-5d2b3b9d 1.2s cubic-bezier(0,.5,.5,1) infinite;background:var(--loader-color);border-radius:calc(.125rem*var(--mantine-scale));flex:1}.m-870bb79:first-of-type{animation-delay:-.24s}.m-870bb79:nth-of-type(2){animation-delay:-.12s}.m-870bb79:nth-of-type(3){animation-delay:0}@keyframes m-aac34a1{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.6)}}.m-4e3f22d7{align-items:center;display:flex;gap:calc(var(--loader-size)/10);height:var(--loader-size);justify-content:center;position:relative;width:var(--loader-size)}.m-870c4af{animation:m-aac34a1 .8s linear infinite;background:var(--loader-color);border-radius:50%;height:calc(var(--loader-size)/3 - var(--loader-size)/15);width:calc(var(--loader-size)/3 - var(--loader-size)/15)}.m-870c4af:nth-child(2){animation-delay:.4s}@keyframes m-f8e89c4b{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.m-b34414df{display:inline-block}.m-b34414df,.m-b34414df:after{height:var(--loader-size);width:var(--loader-size)}.m-b34414df:after{animation:m-f8e89c4b 1.2s linear infinite;border-color:var(--loader-color) var(--loader-color) var(--loader-color) transparent;border-radius:calc(625rem*var(--mantine-scale));border-style:solid;border-width:calc(var(--loader-size)/8);content:"";display:block}.m-8d3f4000{--ai-size-xs:calc(1.125rem*var(--mantine-scale));--ai-size-sm:calc(1.375rem*var(--mantine-scale));--ai-size-md:calc(1.75rem*var(--mantine-scale));--ai-size-lg:calc(2.125rem*var(--mantine-scale));--ai-size-xl:calc(2.75rem*var(--mantine-scale));--ai-size-input-xs:calc(1.875rem*var(--mantine-scale));--ai-size-input-sm:calc(2.25rem*var(--mantine-scale));--ai-size-input-md:calc(2.625rem*var(--mantine-scale));--ai-size-input-lg:calc(3.125rem*var(--mantine-scale));--ai-size-input-xl:calc(3.75rem*var(--mantine-scale));--ai-size:var(--ai-size-md);--ai-color:var(--mantine-color-white);align-items:center;background:var(--_ai-bg,var(--ai-bg,var(--mantine-primary-color-filled)));border:var(--ai-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--ai-radius,var(--mantine-radius-default));color:var(--_ai-color,var(--ai-color,var(--mantine-color-white)));cursor:var(--_ai-cursor,pointer);display:inline-flex;height:var(--ai-size);justify-content:center;line-height:1;min-height:var(--ai-size);min-width:var(--ai-size);position:relative;-webkit-user-select:none;user-select:none;width:var(--ai-size)}@media (hover:hover){.m-8d3f4000:hover:not([data-loading]):not(:disabled):not([data-disabled]){--_ai-bg:var(--ai-hover,var(--mantine-primary-color-filled-hover));--_ai-color:var(--ai-hover-color)}}@media (hover:none){.m-8d3f4000:active:not([data-loading]):not(:disabled):not([data-disabled]){--_ai-bg:var(--ai-hover,var(--mantine-primary-color-filled-hover));--_ai-color:var(--ai-hover-color)}}[data-mantine-color-scheme=light] .m-8d3f4000{--_ai-loading-overlay-bg:hsla(0,0%,100%,.35);--_ai-disabled-bg:var(--mantine-color-gray-1);--_ai-disabled-color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-8d3f4000{--_ai-loading-overlay-bg:rgba(0,0,0,.35);--_ai-disabled-bg:var(--mantine-color-dark-6);--_ai-disabled-color:var(--mantine-color-dark-3)}.m-8d3f4000[data-loading]{--_ai-cursor:not-allowed}.m-8d3f4000[data-loading]:before{background-color:var(--_ai-loading-overlay-bg);border-radius:var(--ai-radius,var(--mantine-radius-default));content:"";inset:calc(-.0625rem*var(--mantine-scale));position:absolute}.m-8d3f4000:disabled:not([data-loading]),.m-8d3f4000[data-disabled]:not([data-loading]){--_ai-cursor:not-allowed;--_ai-bg:var(--_ai-disabled-bg);--_ai-color:var(--_ai-disabled-color);--ai-bd:calc(.0625rem*var(--mantine-scale)) solid transparent!important}.m-8d3f4000:disabled:not([data-loading]):active,.m-8d3f4000[data-disabled]:not([data-loading]):active{transform:none}.m-302b9fb1{z-index:1}.m-1a0f1b21{--ai-border-width:calc(.0625rem*var(--mantine-scale));display:flex}.m-1a0f1b21[data-orientation=horizontal]{flex-direction:row}.m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):first-child{border-bottom-right-radius:0;border-right-width:calc(var(--ai-border-width)/2);border-top-right-radius:0}.m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):last-child{border-bottom-left-radius:0;border-left-width:calc(var(--ai-border-width)/2);border-top-left-radius:0}.m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):not(:first-child):not(:last-child){border-left-width:calc(var(--ai-border-width)/2);border-radius:0;border-right-width:calc(var(--ai-border-width)/2)}[dir=rtl] .m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):first-child{border:var(--ai-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--ai-radius,var(--mantine-radius-default));border-bottom-left-radius:0;border-left-width:calc(var(--ai-border-width)/2);border-top-left-radius:0}[dir=rtl] .m-1a0f1b21[data-orientation=horizontal] .m-8d3f4000:not(:only-child):last-child{border:var(--ai-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--ai-radius,var(--mantine-radius-default));border-bottom-right-radius:0;border-right-width:calc(var(--ai-border-width)/2);border-top-right-radius:0}.m-1a0f1b21[data-orientation=vertical]{flex-direction:column}.m-1a0f1b21[data-orientation=vertical] .m-8d3f4000:not(:only-child):first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:calc(var(--ai-border-width)/2)}.m-1a0f1b21[data-orientation=vertical] .m-8d3f4000:not(:only-child):last-child{border-top-left-radius:0;border-top-right-radius:0;border-top-width:calc(var(--ai-border-width)/2)}.m-1a0f1b21[data-orientation=vertical] .m-8d3f4000:not(:only-child):not(:first-child):not(:last-child){border-bottom-width:calc(var(--ai-border-width)/2);border-radius:0;border-top-width:calc(var(--ai-border-width)/2)}.m-86a44da5{--cb-size-xs:calc(1.125rem*var(--mantine-scale));--cb-size-sm:calc(1.375rem*var(--mantine-scale));--cb-size-md:calc(1.75rem*var(--mantine-scale));--cb-size-lg:calc(2.125rem*var(--mantine-scale));--cb-size-xl:calc(2.75rem*var(--mantine-scale));--cb-size:var(--cb-size-md);--cb-icon-size:70%;align-items:center;border-radius:var(--cb-radius,var(--mantine-radius-default));color:var(--_cb-color);display:inline-flex;height:var(--cb-size);justify-content:center;line-height:1;min-height:var(--cb-size);min-width:var(--cb-size);position:relative;-webkit-user-select:none;user-select:none;width:var(--cb-size)}[data-mantine-color-scheme=light] .m-86a44da5{--_cb-color:var(--mantine-color-gray-7)}[data-mantine-color-scheme=dark] .m-86a44da5{--_cb-color:var(--mantine-color-dark-1)}.m-220c80f2{background-color:var(--_cb-bg)}@media (hover:hover){[data-mantine-color-scheme=light] .m-220c80f2:hover{--_cb-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-220c80f2:hover{--_cb-bg:var(--mantine-color-dark-6)}}@media (hover:none){[data-mantine-color-scheme=light] .m-220c80f2:active{--_cb-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-220c80f2:active{--_cb-bg:var(--mantine-color-dark-6)}}.m-4081bf90{align-items:var(--group-align,center);display:flex;flex-direction:row;flex-wrap:var(--group-wrap,wrap);gap:var(--group-gap,var(--mantine-spacing-md));justify-content:var(--group-justify,flex-start)}.m-4081bf90[data-grow]>*{flex-grow:1;max-width:var(--group-child-width)}.m-9814e45f{backdrop-filter:var(--overlay-filter);-webkit-backdrop-filter:var(--overlay-filter);background:var(--overlay-bg,rgba(0,0,0,.6));border-radius:var(--overlay-radius,0);top:0;right:0;bottom:0;left:0;position:var(--_overlay-position,absolute);z-index:var(--overlay-z-index)}.m-9814e45f[data-fixed]{--_overlay-position:fixed}.m-9814e45f[data-center]{align-items:center;display:flex;justify-content:center}.m-615af6c9{font-size:var(--mantine-font-size-md);font-weight:400;line-height:1;margin:0;padding:0}.m-b5489c3c{align-items:center;background-color:var(--mantine-color-body);display:flex;justify-content:space-between;padding:var(--mb-padding,var(--mantine-spacing-md));padding-left:var(--_pl,var(--mb-padding,var(--mantine-spacing-md)));padding-right:var(--_pr,calc(var(--mb-padding, var(--mantine-spacing-md)) - .3125rem*var(--mantine-scale)));position:sticky;top:0;z-index:1000}[dir=rtl] .m-b5489c3c{--_pr:var(--mb-padding,var(--mantine-spacing-md));--_pl:calc(var(--mb-padding, var(--mantine-spacing-md)) - .3125rem*var(--mantine-scale))}.m-60c222c7{bottom:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--mb-z-index)}.m-fd1ab0aa{box-shadow:var(--mb-shadow,var(--mantine-shadow-xl));pointer-events:all}.m-606cb269{margin-left:var(--_close-ml,auto);margin-right:var(--_close-mr,0)}[dir=rtl] .m-606cb269{--_close-ml:0;--_close-mr:auto}.m-5df29311{padding:var(--mb-padding,var(--mantine-spacing-md));padding-top:var(--_pt,var(--mb-padding,var(--mantine-spacing-md)))}.m-5df29311:not(:only-child){--_pt:0}.m-6c018570{--input-height-xs:calc(1.875rem*var(--mantine-scale));--input-height-sm:calc(2.25rem*var(--mantine-scale));--input-height-md:calc(2.625rem*var(--mantine-scale));--input-height-lg:calc(3.125rem*var(--mantine-scale));--input-height-xl:calc(3.75rem*var(--mantine-scale));--input-padding-y-xs:calc(.3125rem*var(--mantine-scale));--input-padding-y-sm:calc(.375rem*var(--mantine-scale));--input-padding-y-md:calc(.5rem*var(--mantine-scale));--input-padding-y-lg:calc(.625rem*var(--mantine-scale));--input-padding-y-xl:calc(.8125rem*var(--mantine-scale));--_input-height:var(--input-height,var(--input-height-sm));--_input-radius:var(--input-radius,var(--mantine-radius-default));--_input-cursor:text;--_input-text-align:left;--_input-line-height:calc(var(--_input-height) - .125rem*var(--mantine-scale));--_input-padding:calc(var(--_input-height)/3);--_input-padding-left:var(--_input-padding);--_input-padding-right:var(--_input-padding);--_input-placeholder-color:var(--mantine-color-placeholder);--_input-color:var(--mantine-color-text);--_input-left-section-size:var( --input-left-section-width,calc(var(--_input-height) - .125rem*var(--mantine-scale)) );--_input-right-section-size:var( --input-right-section-width,calc(var(--_input-height) - .125rem*var(--mantine-scale)) );--_input-size:var(--_input-height);--_section-y:calc(.0625rem*var(--mantine-scale));--_left-section-left:calc(.0625rem*var(--mantine-scale));--_left-section-right:unset;--_left-section-border-radius:var(--_input-radius) 0 0 var(--_input-radius);--_right-section-left:unset;--_right-section-right:calc(.0625rem*var(--mantine-scale));--_right-section-border-radius:0 var(--_input-radius) var(--_input-radius) 0;margin-bottom:var(--input-margin-bottom,0);margin-top:var(--input-margin-top,0);position:relative}.m-6c018570[data-variant=unstyled]{--input-padding:0;--input-padding-y:0;--_input-padding-left:0;--_input-padding-right:0}.m-6c018570[data-pointer]{--_input-cursor:pointer}.m-6c018570[data-multiline]{--input-padding-y-xs:calc(.28125rem*var(--mantine-scale));--input-padding-y-sm:calc(.34375rem*var(--mantine-scale));--input-padding-y-md:calc(.4375rem*var(--mantine-scale));--input-padding-y-lg:calc(.59375rem*var(--mantine-scale));--input-padding-y-xl:calc(.8125rem*var(--mantine-scale));--_input-size:auto;--_input-line-height:var(--mantine-line-height);--input-padding-y:var(--input-padding-y-sm)}.m-6c018570[data-with-left-section]{--_input-padding-left:var(--_input-left-section-size)}[dir=rtl] .m-6c018570[data-with-left-section]{--_input-padding-right:var(--_input-left-section-size)}[dir=rtl] .m-6c018570[data-with-left-section]:not([data-with-right-section]){--_input-padding-left:var(--_input-padding)}.m-6c018570[data-with-right-section]{--_input-padding-right:var(--_input-right-section-size)}[dir=rtl] .m-6c018570[data-with-right-section]{--_input-padding-left:var(--_input-right-section-size)}[dir=rtl] .m-6c018570[data-with-right-section]:not([data-with-left-section]){--_input-padding-right:var(--_input-padding)}[data-mantine-color-scheme=light] .m-6c018570{--_input-disabled-bg:var(--mantine-color-gray-1);--_input-disabled-color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=light] .m-6c018570[data-variant=default]{--_input-bd:var(--mantine-color-gray-4);--_input-bg:var(--mantine-color-white);--_input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=light] .m-6c018570[data-variant=filled]{--_input-bd:transparent;--_input-bg:var(--mantine-color-gray-1);--_input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=light] .m-6c018570[data-variant=unstyled]{--_input-bd:transparent;--_input-bg:transparent;--_input-bd-focus:transparent}[data-mantine-color-scheme=dark] .m-6c018570{--_input-disabled-bg:var(--mantine-color-dark-6);--_input-disabled-color:var(--mantine-color-dark-2)}[data-mantine-color-scheme=dark] .m-6c018570[data-variant=default]{--_input-bd:var(--mantine-color-dark-4);--_input-bg:var(--mantine-color-dark-6);--_input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=dark] .m-6c018570[data-variant=filled]{--_input-bd:transparent;--_input-bg:var(--mantine-color-dark-5);--_input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=dark] .m-6c018570[data-variant=unstyled]{--_input-bd:transparent;--_input-bg:transparent;--_input-bd-focus:transparent}[data-mantine-color-scheme] .m-6c018570[data-error]:not([data-variant=unstyled]){--_input-bd:var(--mantine-color-error)}[data-mantine-color-scheme] .m-6c018570[data-error]{--_input-color:var(--mantine-color-error);--_input-placeholder-color:var(--mantine-color-error);--_input-section-color:var(--mantine-color-error)}[dir=rtl] .m-6c018570{--_input-text-align:right;--_left-section-left:unset;--_left-section-right:calc(.0625rem*var(--mantine-scale));--_left-section-border-radius:0 var(--_input-radius) var(--_input-radius) 0;--_right-section-left:calc(.0625rem*var(--mantine-scale));--_right-section-right:unset;--_right-section-border-radius:var(--_input-radius) 0 0 var(--_input-radius)}.m-8fb7ebe7{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--_input-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_input-bd);border-radius:var(--_input-radius);color:var(--_input-color);cursor:var(--_input-cursor);display:block;font-family:var(--_input-font-family,var(--mantine-font-family));font-size:var(--_input-fz,var(--input-fz,var(--mantine-font-size-sm)));height:var(--_input-size);line-height:var(--_input-line-height);min-height:var(--_input-height);overflow:var(--_input-overflow);padding:var(--input-padding-y,0) var(--_input-padding-right) var(--input-padding-y,0) var(--_input-padding-left);resize:none;text-align:var(--_input-text-align);transition:border-color .1s ease;width:100%}.m-8fb7ebe7[data-no-overflow]{--_input-overflow:hidden}.m-8fb7ebe7[data-monospace]{--_input-font-family:var(--mantine-font-family-monospace);--_input-fz:calc(var(--input-fz, var(--mantine-font-size-sm)) - .125rem*var(--mantine-scale))}.m-8fb7ebe7:focus,.m-8fb7ebe7:focus-within{--_input-bd:var(--_input-bd-focus);outline:none}[data-error] .m-8fb7ebe7:focus,[data-error] .m-8fb7ebe7:focus-within{--_input-bd:var(--mantine-color-error)}.m-8fb7ebe7::placeholder{color:var(--_input-placeholder-color);opacity:1}.m-8fb7ebe7::-webkit-inner-spin-button,.m-8fb7ebe7::-webkit-outer-spin-button,.m-8fb7ebe7::-webkit-search-cancel-button,.m-8fb7ebe7::-webkit-search-decoration,.m-8fb7ebe7::-webkit-search-results-button,.m-8fb7ebe7::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}.m-8fb7ebe7[type=number]{-moz-appearance:textfield}.m-8fb7ebe7:disabled,.m-8fb7ebe7[data-disabled]{background-color:var(--_input-disabled-bg);color:var(--_input-disabled-color);cursor:not-allowed;opacity:.6}.m-8fb7ebe7:has(input:disabled){background-color:var(--_input-disabled-bg);color:var(--_input-disabled-color);cursor:not-allowed;opacity:.6}.m-82577fc2{align-items:center;border-radius:var(--_section-border-radius);bottom:var(--_section-y);color:var(--mantine-color-dimmed);display:flex;justify-content:center;left:var(--_section-left);pointer-events:var(--_section-pointer-events);position:absolute;right:var(--_section-right);top:var(--_section-y);width:var(--_section-size);z-index:1}.m-82577fc2[data-position=right]{--_section-pointer-events:var(--input-right-section-pointer-events);--_section-left:var(--_right-section-left);--_section-right:var(--_right-section-right);--_section-size:var(--_input-right-section-size);--_section-border-radius:var(--_right-section-border-radius)}.m-82577fc2[data-position=left]{--_section-pointer-events:var(--input-left-section-pointer-events);--_section-left:var(--_left-section-left);--_section-right:var(--_left-section-right);--_section-size:var(--_input-left-section-size);--_section-border-radius:var(--_left-section-border-radius)}.m-88bacfd0{color:var(--_input-placeholder-color,var(--mantine-color-placeholder))}[data-error] .m-88bacfd0{--_input-placeholder-color:var(--_input-color,var(--mantine-color-placeholder))}.m-46b77525{line-height:var(--mantine-line-height)}.m-8fdc1311{-webkit-tap-highlight-color:transparent;cursor:default;display:inline-block;font-size:var(--input-label-size,var(--mantine-font-size-sm));font-weight:500;word-break:break-word}.m-78a94662{color:var(--input-asterisk-color,var(--mantine-color-error))}.m-8f816625,.m-fe47ce59{word-wrap:break-word;display:block;line-height:1.2;margin:0;padding:0}.m-8f816625{color:var(--mantine-color-error);font-size:var(--input-error-size,calc(var(--mantine-font-size-sm) - .125rem*var(--mantine-scale)))}.m-fe47ce59{color:var(--mantine-color-dimmed);font-size:var(--input-description-size,calc(var(--mantine-font-size-sm) - .125rem*var(--mantine-scale)))}.m-8bffd616{display:flex}.m-9bdbb667{--_accordion-radius:var(--accordion-radius,var(--mantine-radius-default))}.m-df78851f{word-break:break-word}.m-4ba554d4{padding:var(--mantine-spacing-md);padding-top:calc(var(--mantine-spacing-xs)/2)}.m-8fa820a0{margin:0;padding:0}.m-4ba585b8{align-items:center;background-color:var(--_control-background-color,transparent);color:var(--_control-color);cursor:var(--_control-cursor,pointer);display:flex;flex-direction:var(--_control-flex-direction,row-reverse);opacity:var(--_control-opacity,1);padding-left:var(--_control-padding-left,var(--mantine-spacing-md));padding-right:var(--_control-padding-right,var(--mantine-spacing-md));text-align:left;width:100%}.m-4ba585b8[data-chevron-position=left]{--_control-flex-direction:row;--_control-padding-left:0}[dir=rtl] .m-4ba585b8[data-chevron-position=left]{--_control-padding-left:var(--mantine-spacing-md)}[data-mantine-color-scheme=light] .m-4ba585b8{--_control-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-4ba585b8{--_control-color:var(--mantine-color-dark-0)}.m-4ba585b8:disabled,.m-4ba585b8[data-disabled]{--_control-opacity:.4;--_control-cursor:not-allowed}@media (hover:hover){[data-mantine-color-scheme=light] .m-4271d21b:not(:disabled,[data-disabled]):hover,[data-mantine-color-scheme=light] .m-6939a5e9:not(:disabled,[data-disabled]):hover{--_control-background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-4271d21b:not(:disabled,[data-disabled]):hover,[data-mantine-color-scheme=dark] .m-6939a5e9:not(:disabled,[data-disabled]):hover{--_control-background-color:var(--mantine-color-dark-6)}}@media (hover:none){[data-mantine-color-scheme=light] .m-4271d21b:not(:disabled,[data-disabled]):active,[data-mantine-color-scheme=light] .m-6939a5e9:not(:disabled,[data-disabled]):active{--_control-background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-4271d21b:not(:disabled,[data-disabled]):active,[data-mantine-color-scheme=dark] .m-6939a5e9:not(:disabled,[data-disabled]):active{--_control-background-color:var(--mantine-color-dark-6)}}.m-df3ffa0f{color:inherit;flex:1;font-weight:400;overflow:hidden;padding-bottom:var(--mantine-spacing-sm);padding-top:var(--mantine-spacing-sm);text-overflow:ellipsis}[dir=rtl] .m-df3ffa0f{text-align:right}.m-3f35ae96{align-items:center;display:flex;justify-content:flex-start;margin-left:var(--_chevron-margin-left);margin-right:var(--_chevron-margin-right);min-width:var(--accordion-chevron-size,calc(.9375rem*var(--mantine-scale)));transform:var(--_chevron-transform,rotate(0deg));transition:transform var(--accordion-transition-duration,.2s) ease;width:var(--accordion-chevron-size,calc(.9375rem*var(--mantine-scale)))}.m-3f35ae96[data-rotate]{--_chevron-transform:rotate(180deg)}.m-3f35ae96[data-position=left]{--_chevron-margin-right:var(--mantine-spacing-md);--_chevron-margin-left:var(--mantine-spacing-md)}.m-3f35ae96[data-position=right]{--_chevron-margin-left:0}[dir=rtl] .m-3f35ae96[data-position=left]{--_chevron-margin-right:0;--_chevron-margin-left:var(--mantine-spacing-md)}[dir=rtl] .m-3f35ae96[data-position=right]{--_chevron-margin-right:var(--mantine-spacing-md);--_chevron-margin-left:0}.m-9bd771fe{align-items:center;display:flex;justify-content:center;margin-left:var(--_icon-margin-left,0);margin-right:var(--_icon-margin-right,var(--mantine-spacing-sm))}.m-9bd771fe[data-chevron-position=left]{--_icon-margin-right:0;--_icon-margin-left:var(--mantine-spacing-lg)}[dir=rtl] .m-9bd771fe[data-chevron-position=left]{--_icon-margin-right:var(--mantine-spacing-lg);--_icon-margin-left:0}[dir=rtl] .m-9bd771fe[data-chevron-position=right]{--_icon-margin-right:0;--_icon-margin-left:var(--mantine-spacing-sm)}.m-9bd7b098{background-color:var(--_item-bg)}[data-mantine-color-scheme=light] .m-9bd7b098{--_item-border-color:var(--mantine-color-gray-3);--_item-filled-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-9bd7b098{--_item-border-color:var(--mantine-color-dark-4);--_item-filled-color:var(--mantine-color-dark-6)}.m-fe19b709{border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_item-border-color)}.m-1f921b3b{border:calc(.0625rem*var(--mantine-scale)) solid var(--_item-border-color);transition:background-color .15s ease}.m-1f921b3b[data-active]{--_item-bg:var(--_item-filled-color)}.m-1f921b3b:first-of-type,.m-1f921b3b:first-of-type>[data-accordion-control]{border-top-left-radius:var(--_accordion-radius);border-top-right-radius:var(--_accordion-radius)}.m-1f921b3b:last-of-type,.m-1f921b3b:last-of-type>[data-accordion-control]{border-bottom-left-radius:var(--_accordion-radius);border-bottom-right-radius:var(--_accordion-radius)}.m-1f921b3b+.m-1f921b3b{border-top:0}.m-2cdf939a{border-radius:var(--_accordion-radius)}.m-2cdf939a[data-active],.m-9f59b069{--_item-bg:var(--_item-filled-color)}.m-9f59b069{border:calc(.0625rem*var(--mantine-scale)) solid var(--__item-border-color,transparent);border-radius:var(--_accordion-radius);transition:background-color .15s ease}.m-9f59b069[data-active]{--__item-border-color:var(--_item-border-color)}[data-mantine-color-scheme=light] .m-9f59b069[data-active]{--_item-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-9f59b069[data-active]{--_item-bg:var(--mantine-color-dark-7)}.m-9f59b069+.m-9f59b069{margin-top:var(--mantine-spacing-md)}.m-7f854edf{bottom:var(--affix-bottom);left:var(--affix-left);position:fixed;right:var(--affix-right);top:var(--affix-top);z-index:var(--affix-z-index)}.m-66836ed3{background-color:var(--alert-bg,var(--mantine-primary-color-light));border:var(--alert-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--alert-radius,var(--mantine-radius-default));color:var(--alert-color,var(--mantine-primary-color-light-color));overflow:hidden;padding:var(--mantine-spacing-md) var(--mantine-spacing-md);position:relative}.m-12b2e6d5{--_message-color:var(--alert-color,var(--mantine-primary-color-light-color))}.m-cffd1856{--_message-color:var(--mantine-color-black)}.m-667c2793,.m-a5d60502{display:flex}.m-667c2793{flex:1;flex-direction:column;gap:var(--mantine-spacing-xs)}.m-6a03f287{align-items:center;display:flex;font-size:var(--mantine-font-size-sm);font-weight:700;justify-content:space-between}.m-6a03f287[data-with-close-button]{padding-right:var(--mantine-spacing-md)}[dir=rtl] .m-6a03f287[data-with-close-button]{padding-left:var(--mantine-spacing-md);padding-right:0}.m-698f4f23{display:block;overflow:hidden;text-overflow:ellipsis}.m-667f2a6a{align-items:center;display:flex;height:calc(1.25rem*var(--mantine-scale));justify-content:flex-start;line-height:1;margin-right:var(--mantine-spacing-md);margin-top:calc(.0625rem*var(--mantine-scale));width:calc(1.25rem*var(--mantine-scale))}[dir=rtl] .m-667f2a6a{margin-left:var(--mantine-spacing-md);margin-right:0}.m-7fa78076{color:var(--_message-color,var(--__message-color));font-size:var(--mantine-font-size-sm);overflow:hidden;text-overflow:ellipsis}[data-mantine-color-scheme=light] .m-7fa78076{--__message-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-7fa78076{--__message-color:var(--mantine-color-white)}.m-87f54839{color:var(--alert-color,var(--mantine-primary-color-light-color));height:calc(1.25rem*var(--mantine-scale));margin-top:calc(var(--mantine-spacing-sm)*-.5);width:calc(1.25rem*var(--mantine-scale))}.m-b6d8b162{-webkit-tap-highlight-color:transparent;color:var(--text-color);font-size:var(--text-fz,var(--mantine-font-size-md));font-weight:400;line-height:var(--_text-line-height,var(--text-lh,var(--mantine-line-height-md)));margin:0;padding:0;text-decoration:none}.m-b6d8b162[data-truncate]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-b6d8b162[data-truncate=start]{direction:rtl;text-align:right}[dir=rtl] .m-b6d8b162[data-truncate=start]{direction:ltr;text-align:left}.m-b6d8b162[data-variant=gradient]{-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text;background-image:var(--text-gradient)}.m-b6d8b162[data-line-clamp]{-webkit-line-clamp:var(--text-line-clamp);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.m-b6d8b162[data-inherit]{font-size:inherit;font-weight:inherit;line-height:inherit}.m-b6d8b162[data-inline]{--_text-line-height:1}.m-849cf0da{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;color:var(--mantine-color-anchor);cursor:pointer;display:inline;margin:0;padding:0;text-decoration:var(--_text-decoration,none)}@media (hover:hover){.m-849cf0da[data-underline=hover]:hover{--_text-decoration:underline}}@media (hover:none){.m-849cf0da[data-underline=hover]:active{--_text-decoration:underline}}.m-849cf0da[data-underline=always]{--_text-decoration:underline}.m-89ab340[data-resizing]{--app-shell-transition-duration:0ms!important}.m-89ab340[data-disabled]{--app-shell-header-offset:0px!important;--app-shell-navbar-offset:0px!important}[data-mantine-color-scheme=light] .m-89ab340{--_app-shell-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-89ab340{--_app-shell-border-color:var(--mantine-color-dark-4)}.m-3840c879,.m-3b16f56b,.m-45252eee,.m-8983817,.m-9cdde9a{transition-duration:var(--app-shell-transition-duration);transition-timing-function:var(--app-shell-transition-timing-function)}.m-45252eee,.m-9cdde9a{background-color:var(--mantine-color-body);display:flex;flex-direction:column;height:var( --_section-height,calc(100dvh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px)) );position:fixed;top:var(--_section-top,var(--app-shell-header-offset,0));transition-property:transform,top,height}[data-layout=alt] .m-45252eee,[data-layout=alt] .m-9cdde9a{--_section-top:0px;--_section-height:100dvh}.m-45252eee{border-left:var(--_navbar-border-left);border-right:var(--_navbar-border-right);left:var(--_navbar-left,0);right:var(--_navbar-right);transform:var(--_navbar-transform,var(--app-shell-navbar-transform));transition-property:transform,top,height;width:var(--app-shell-navbar-width);z-index:var(--app-shell-navbar-z-index)}.m-45252eee[data-with-border]{--_navbar-border-right:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}[dir=rtl] .m-45252eee[data-with-border]{--_navbar-border-right:none;--_navbar-border-left:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}[dir=rtl] .m-45252eee{--_navbar-left:auto;--_navbar-right:0px;--_navbar-transform:var(--app-shell-navbar-transform-rtl)}.m-9cdde9a{border-left:var(--_aside-border-left);border-right:var(--_aside-border-right);left:var(--_aside-left);right:var(--_aside-right,0);transform:var(--_aside-transform,var(--app-shell-aside-transform));width:var(--app-shell-aside-width);z-index:var(--app-shell-aside-z-index)}.m-9cdde9a[data-with-border]{--_aside-border-left:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}[dir=rtl] .m-9cdde9a[data-with-border]{--_aside-border-left:none;--_aside-border-right:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}[dir=rtl] .m-9cdde9a{--_aside-left:0px;--_aside-right:auto;--_aside-transform:var(--app-shell-aside-transform-rtl)}.m-8983817{min-height:100dvh;padding:calc(var(--app-shell-header-offset, 0px) + var(--app-shell-padding)) var( --_main-padding-right,calc(var(--app-shell-aside-offset, 0px) + var(--app-shell-padding)) ) calc(var(--app-shell-footer-offset, 0px) + var(--app-shell-padding)) var( --_main-padding-left,calc(var(--app-shell-navbar-offset, 0px) + var(--app-shell-padding)) );transition-property:padding}[dir=rtl] .m-8983817{--_main-padding-left:calc(var(--app-shell-aside-offset, 0px) + var(--app-shell-padding));--_main-padding-right:calc(var(--app-shell-navbar-offset, 0px) + var(--app-shell-padding))}.m-3840c879,.m-3b16f56b{background-color:var(--mantine-color-body);left:var(--_section-left,0);position:fixed;right:var(--_section-right,0);transition-property:transform,left,right}[data-layout=alt] .m-3840c879,[data-layout=alt] .m-3b16f56b{--_section-left:var(--app-shell-navbar-offset,0px)}[dir=rtl] [data-layout=alt] .m-3840c879,[dir=rtl] [data-layout=alt] .m-3b16f56b{--_section-right:var(--app-shell-navbar-offset,0px);--_section-left:0px}.m-3b16f56b{background-color:var(--mantine-color-body);border-bottom:var(--_header-border-bottom);height:var(--app-shell-header-height);top:0;transform:var(--app-shell-header-transform);z-index:var(--app-shell-header-z-index)}.m-3b16f56b[data-with-border]{--_header-border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}.m-3840c879{border-top:var(--_footer-border-top);bottom:0;height:var(--app-shell-footer-height);transform:var(--app-shell-footer-transform);z-index:var(--app-shell-footer-z-index)}.m-3840c879[data-with-border]{--_footer-border-top:calc(.0625rem*var(--mantine-scale)) solid var(--_app-shell-border-color)}.m-6dcfc7c7{flex-grow:var(--_section-grow,0)}.m-6dcfc7c7[data-grow]{--_section-grow:1}.m-71ac47fc{max-width:100%;position:relative}.m-71ac47fc:before{content:"";display:block;height:0;padding-bottom:calc((1/var(--ar-ratio, 1))*100%)}.m-71ac47fc:after{clear:both;content:"";display:table}.m-71ac47fc>:not(style){align-items:center;display:flex;height:100%;top:0;right:0;bottom:0;left:0;justify-content:center;position:absolute;width:100%}.m-71ac47fc>img,.m-71ac47fc>video{object-fit:cover}.m-88b62a41{--_combobox-padding:var(--combobox-padding,calc(.25rem*var(--mantine-scale)));padding:var(--_combobox-padding)}.m-88b62a41[data-hidden]{display:none}.m-88b62a41,.m-b2821a6e{--combobox-option-padding-xs:calc(.25rem*var(--mantine-scale)) calc(.5rem*var(--mantine-scale));--combobox-option-padding-sm:calc(.375rem*var(--mantine-scale)) calc(.625rem*var(--mantine-scale));--combobox-option-padding-md:calc(.5rem*var(--mantine-scale)) calc(.75rem*var(--mantine-scale));--combobox-option-padding-lg:calc(.625rem*var(--mantine-scale)) calc(1rem*var(--mantine-scale));--combobox-option-padding-xl:calc(.875rem*var(--mantine-scale)) calc(1.25rem*var(--mantine-scale));--_combobox-option-padding:var(--combobox-option-padding,var(--combobox-option-padding-sm))}.m-92253aa5{background-color:var(--_option-bg,transparent);border-radius:var(--mantine-radius-default);color:var(--_option-color,inherit);cursor:var(--_option-cursor,pointer);font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));opacity:var(--_option-opacity,1);padding:var(--_combobox-option-padding);word-break:break-word}.m-92253aa5[data-combobox-selected]{--_option-bg:var(--mantine-primary-color-filled);--_option-color:var(--mantine-color-white)}.m-92253aa5[data-combobox-disabled]{--_option-cursor:not-allowed;--_option-opacity:.35}@media (hover:hover){[data-mantine-color-scheme=light] .m-92253aa5:hover:not([data-combobox-selected],[data-combobox-disabled]){--_option-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-92253aa5:hover:not([data-combobox-selected],[data-combobox-disabled]){--_option-bg:var(--mantine-color-dark-7)}}@media (hover:none){[data-mantine-color-scheme=light] .m-92253aa5:active:not([data-combobox-selected],[data-combobox-disabled]){--_option-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-92253aa5:active:not([data-combobox-selected],[data-combobox-disabled]){--_option-bg:var(--mantine-color-dark-7)}}.m-985517d8{background-color:var(--_search_background);border-bottom-left-radius:0;border-bottom-right-radius:0;border-left-width:0;border-right-width:0;border-top-width:0;margin:calc(var(--_combobox-padding)*-1) calc(var(--_combobox-padding)*-1) var(--_combobox-padding);position:relative;width:calc(100% + var(--_combobox-padding)*2);z-index:1000}.m-985517d8,.m-985517d8:focus{border-color:var(--_search-border-color)}[data-mantine-color-scheme=light] .m-985517d8{--_search-border-color:var(--mantine-color-gray-2);--_search_background:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-985517d8{--_search-border-color:var(--mantine-color-dark-4);--_search_background:var(--mantine-color-dark-7)}.m-2530cd1d{color:var(--mantine-color-dimmed);text-align:center}.m-2530cd1d,.m-82b967cb,.m-858f94bd{font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));padding:var(--_combobox-option-padding)}.m-82b967cb,.m-858f94bd{border:0 solid var(--_footer-border-color);margin-left:calc(var(--_combobox-padding)*-1);margin-right:calc(var(--_combobox-padding)*-1)}[data-mantine-color-scheme=light] .m-82b967cb,[data-mantine-color-scheme=light] .m-858f94bd{--_footer-border-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-82b967cb,[data-mantine-color-scheme=dark] .m-858f94bd{--_footer-border-color:var(--mantine-color-dark-4)}.m-82b967cb{border-top-width:calc(.0625rem*var(--mantine-scale));margin-bottom:calc(var(--_combobox-padding)*-1);margin-top:var(--_combobox-padding)}.m-858f94bd{border-bottom-width:calc(.0625rem*var(--mantine-scale));margin-bottom:var(--_combobox-padding);margin-top:calc(var(--_combobox-padding)*-1)}.m-254f3e4f:has(.m-2bb2e9e5:only-child){display:none}.m-2bb2e9e5{align-items:center;color:var(--mantine-color-dimmed);display:flex;font-size:calc(var(--combobox-option-fz, var(--mantine-font-size-sm))*.85);font-weight:500;padding:var(--_combobox-option-padding);position:relative}.m-2bb2e9e5:after{background-color:var(--_divider-bg);content:"";flex:1;height:calc(.0625rem*var(--mantine-scale));left:0;margin-left:var(--mantine-spacing-xs);right:0}[data-mantine-color-scheme=light] .m-2bb2e9e5:after{--_divider-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-2bb2e9e5:after{--_divider-bg:var(--mantine-color-dark-4)}[dir=rtl] .m-2bb2e9e5:after{margin-left:unset;margin-right:var(--mantine-spacing-xs)}.m-2bb2e9e5:only-child{display:none}.m-2943220b{--combobox-chevron-size-xs:calc(.875rem*var(--mantine-scale));--combobox-chevron-size-sm:calc(1.125rem*var(--mantine-scale));--combobox-chevron-size-md:calc(1.25rem*var(--mantine-scale));--combobox-chevron-size-lg:calc(1.5rem*var(--mantine-scale));--combobox-chevron-size-xl:calc(1.75rem*var(--mantine-scale));--combobox-chevron-size:var(--combobox-chevron-size-sm);color:var(--_color);height:var(--combobox-chevron-size);width:var(--combobox-chevron-size)}[data-mantine-color-scheme=light] .m-2943220b{--_color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .m-2943220b{--_color:var(--mantine-color-dark-3)}.m-2943220b[data-error]{--_color:var(--mantine-color-error)}.m-71d052f9{margin-right:calc(var(--_combobox-padding)*-1)}[dir=rtl] .m-71d052f9{margin-left:calc(var(--_combobox-padding)*-1);margin-right:0}.m-390b5f4{align-items:center;display:flex;flex-direction:var(--_flex-direction,row);gap:calc(.5rem*var(--mantine-scale))}.m-390b5f4[data-reverse]{justify-content:space-between}.m-8ee53fc2{height:.8em;min-width:.8em;opacity:.4;width:.8em}[data-combobox-selected] .m-8ee53fc2{opacity:1}.m-5f75b09e{--label-lh-xs:calc(1rem*var(--mantine-scale));--label-lh-sm:calc(1.25rem*var(--mantine-scale));--label-lh-md:calc(1.5rem*var(--mantine-scale));--label-lh-lg:calc(1.875rem*var(--mantine-scale));--label-lh-xl:calc(2.25rem*var(--mantine-scale));--label-lh:var(--label-lh-sm)}.m-5f75b09e[data-label-position=left]{--_label-order:1;--_offset-right:var(--mantine-spacing-sm);--_offset-left:0}[dir=rtl] .m-5f75b09e[data-label-position=left]{--_offset-right:0;--_offset-left:var(--mantine-spacing-sm)}.m-5f75b09e[data-label-position=right]{--_label-order:2;--_offset-right:0;--_offset-left:var(--mantine-spacing-sm)}[dir=rtl] .m-5f75b09e[data-label-position=right]{--_offset-right:var(--mantine-spacing-sm);--_offset-left:0}.m-5f6e695e{display:flex}.m-d3ea56bb{-webkit-tap-highlight-color:transparent;display:inline-flex;flex-direction:column;font-size:var(--label-fz,var(--mantine-font-size-sm));line-height:var(--label-lh);order:var(--_label-order)}.m-8ee546b8,.m-d3ea56bb{cursor:var(--mantine-cursor-type)}.m-8ee546b8{color:var(--_label-color,inherit);padding-left:var(--_offset-left);padding-right:var(--_offset-right)}[data-mantine-color-scheme=light] .m-8ee546b8[data-disabled],[data-mantine-color-scheme=light] fieldset:disabled .m-8ee546b8{--_label-color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-8ee546b8[data-disabled],[data-mantine-color-scheme=dark] fieldset:disabled .m-8ee546b8{--_label-color:var(--mantine-color-dark-3)}.m-328f68c0,.m-8e8a99cc{margin-top:calc(var(--mantine-spacing-xs)/2);padding-left:var(--_offset-left);padding-right:var(--_offset-right)}.m-bf2d988c{--checkbox-size-xs:calc(1rem*var(--mantine-scale));--checkbox-size-sm:calc(1.25rem*var(--mantine-scale));--checkbox-size-md:calc(1.5rem*var(--mantine-scale));--checkbox-size-lg:calc(1.875rem*var(--mantine-scale));--checkbox-size-xl:calc(2.25rem*var(--mantine-scale));--checkbox-size:var(--checkbox-size-sm);--checkbox-color:var(--mantine-primary-color-filled);--checkbox-icon-color:var(--mantine-color-white)}.m-26062bec{height:var(--checkbox-size);order:var(--_checkbox-inner-order,1);position:relative;width:var(--checkbox-size)}.m-26062bec[data-label-position=left]{--_checkbox-inner-order:2}.m-26063560{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--_checkbox-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_checkbox-bd-color);border-radius:var(--checkbox-radius,var(--mantine-radius-default));cursor:var(--_checkbox-cursor,var(--mantine-cursor-type));display:block;height:var(--checkbox-size);margin:0;padding:0;transition:border-color .1s ease,background-color .1s ease;width:var(--checkbox-size)}[data-mantine-color-scheme=light] .m-26063560{--_checkbox-bg:var(--mantine-color-white);--_checkbox-bd-color:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-26063560{--_checkbox-bg:var(--mantine-color-dark-6);--_checkbox-bd-color:var(--mantine-color-dark-4)}.m-26063560[data-error]{--_checkbox-bd-color:var(--mantine-color-error)}[data-mantine-color-scheme] .m-26063560:checked,[data-mantine-color-scheme] .m-26063560[data-indeterminate]{--_checkbox-bg:var(--checkbox-color);--_checkbox-bd-color:var(--checkbox-color)}[data-mantine-color-scheme] .m-26063560:checked+.m-bf295423,[data-mantine-color-scheme] .m-26063560[data-indeterminate]+.m-bf295423{--_checkbox-icon-opacity:1;--_checkbox-icon-transform:none}.m-26063560:disabled{--_checkbox-cursor:not-allowed}[data-mantine-color-scheme=light] .m-26063560:disabled{--_checkbox-bg:var(--mantine-color-gray-2);--_checkbox-bd-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-26063560:disabled{--_checkbox-bg:var(--mantine-color-dark-6);--_checkbox-bd-color:var(--mantine-color-dark-6)}[data-mantine-color-scheme=light] .m-26063560:disabled+.m-bf295423{--_checkbox-icon-color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-26063560:disabled+.m-bf295423{--_checkbox-icon-color:var(--mantine-color-dark-3)}.m-215c4542+.m-bf295423{--_checkbox-icon-color:var(--checkbox-color)}[data-mantine-color-scheme] .m-215c4542:checked:not(:disabled),[data-mantine-color-scheme] .m-215c4542[data-indeterminate]{--_checkbox-bg:transparent;--_checkbox-bd-color:var(--checkbox-color)}[data-mantine-color-scheme] .m-215c4542:checked:not(:disabled)+.m-bf295423,[data-mantine-color-scheme] .m-215c4542[data-indeterminate]+.m-bf295423{--_checkbox-icon-color:var(--checkbox-color);--_checkbox-icon-opacity:1;--_checkbox-icon-transform:none}.m-bf295423{bottom:0;color:var(--_checkbox-icon-color,var(--checkbox-icon-color));left:0;margin:auto;opacity:var(--_checkbox-icon-opacity,0);pointer-events:none;position:absolute;right:0;top:0;transform:var(--_checkbox-icon-transform,translateY(calc(.3125rem*var(--mantine-scale))) scale(.5));transition:transform .1s ease,opacity .1s ease;width:60%}.m-f85678b6{--avatar-size-xs:calc(1rem*var(--mantine-scale));--avatar-size-sm:calc(1.625rem*var(--mantine-scale));--avatar-size-md:calc(2.375rem*var(--mantine-scale));--avatar-size-lg:calc(3.5rem*var(--mantine-scale));--avatar-size-xl:calc(5.25rem*var(--mantine-scale));--_avatar-size:var(--avatar-size,var(--avatar-size-md));-webkit-tap-highlight-color:transparent;background-color:var(--_avatar-bg);border:var(--_avatar-border,none);border-radius:var(--avatar-radius,calc(62.5rem*var(--mantine-scale)));display:block;height:var(--_avatar-size);margin-left:var(--_avatar-ml,unset);margin-right:var(--_avatar-mr,unset);min-width:var(--_avatar-size);overflow:hidden;padding:0;position:relative;text-decoration:none;-webkit-user-select:none;user-select:none;width:var(--_avatar-size)}.m-f85678b6[data-within-group]{--_avatar-ml:calc(var(--ag-spacing, var(--mantine-spacing-sm))*-1);--_avatar-border:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-body);--_avatar-bg:var(--mantine-color-body)}[dir=rtl] .m-f85678b6[data-within-group]{--_avatar-mr:calc(var(--ag-spacing, var(--mantine-spacing-sm))*-1);--_avatar-ml:unset}.m-11f8ac07{display:block;height:100%;object-fit:cover;width:100%}.m-104cd71f{align-items:center;background:var(--avatar-bg,var(--mantine-color-gray-light));border:var(--avatar-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--avatar-radius);color:var(--avatar-color,var(--mantine-color-gray-light-color));display:flex;font-size:calc(var(--_avatar-size)/2.5);font-weight:700;height:100%;justify-content:center;-webkit-user-select:none;user-select:none;width:100%}.m-104cd71f>[data-avatar-placeholder-icon]{height:70%;width:70%}.m-11def92b{display:flex;padding-left:var(--ag-spacing,var(--mantine-spacing-sm))}[dir=rtl] .m-11def92b{padding-left:0;padding-right:var(--ag-spacing,var(--mantine-spacing-sm))}.m-2ce0de02{background-position:50%;background-size:cover;border:0;border-radius:var(--bi-radius,0);display:block;text-decoration:none;width:100%}.m-347db0ec{--badge-height-xs:calc(1rem*var(--mantine-scale));--badge-height-sm:calc(1.125rem*var(--mantine-scale));--badge-height-md:calc(1.25rem*var(--mantine-scale));--badge-height-lg:calc(1.625rem*var(--mantine-scale));--badge-height-xl:calc(2rem*var(--mantine-scale));--badge-fz-xs:calc(.5625rem*var(--mantine-scale));--badge-fz-sm:calc(.625rem*var(--mantine-scale));--badge-fz-md:calc(.6875rem*var(--mantine-scale));--badge-fz-lg:calc(.8125rem*var(--mantine-scale));--badge-fz-xl:calc(1rem*var(--mantine-scale));--badge-padding-x-xs:calc(.375rem*var(--mantine-scale));--badge-padding-x-sm:calc(.5rem*var(--mantine-scale));--badge-padding-x-md:calc(.625rem*var(--mantine-scale));--badge-padding-x-lg:calc(.75rem*var(--mantine-scale));--badge-padding-x-xl:calc(1rem*var(--mantine-scale));--badge-height:var(--badge-height-md);--badge-fz:var(--badge-fz-md);--badge-padding-x:var(--badge-padding-x-md);-webkit-tap-highlight-color:transparent;align-items:center;background:var(--badge-bg,var(--mantine-primary-color-filled));border:var(--badge-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--badge-radius,calc(625rem*var(--mantine-scale)));color:var(--badge-color,var(--mantine-color-white));cursor:inherit;display:var(--_badge-display,inline-flex);font-size:var(--badge-fz);font-weight:700;height:var(--badge-height);justify-content:center;letter-spacing:calc(.01563rem*var(--mantine-scale));line-height:calc(var(--badge-height) - .125rem*var(--mantine-scale));overflow:hidden;padding:0 var(--badge-padding-x);text-decoration:none;text-overflow:ellipsis;text-transform:uppercase;width:var(--_badge-width,fit-content)}.m-347db0ec[data-block]{--_badge-display:flex;--_badge-width:100%}.m-fbd81e3d{--badge-dot-size:calc(var(--badge-height)/3.4);background-color:var(--_badge-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_badge-border-color);color:var(--_badge-color)}[data-mantine-color-scheme=light] .m-fbd81e3d{--_badge-bg:var(--mantine-color-white);--_badge-border-color:var(--mantine-color-gray-4);--_badge-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-fbd81e3d{--_badge-bg:var(--mantine-color-dark-5);--_badge-border-color:var(--mantine-color-dark-5);--_badge-color:var(--mantine-color-white)}.m-fbd81e3d:before{background-color:var(--badge-dot-color);border-radius:var(--badge-dot-size);content:"";display:block;height:var(--badge-dot-size);margin-right:var(--badge-dot-size);width:var(--badge-dot-size)}[dir=rtl] .m-fbd81e3d:before{margin-left:var(--badge-dot-size);margin-right:0}.m-5add502a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-91fdda9b{--_section-margin:calc(var(--mantine-spacing-xs)/2);align-items:center;display:inline-flex;justify-content:center}.m-91fdda9b[data-position=left]{margin-left:var(--_left-section-ml,0);margin-right:var(--_left-section-mr,var(--_section-margin))}[dir=rtl] .m-91fdda9b[data-position=left]{--_left-section-ml:var(--_section-margin);--_left-section-mr:0}.m-91fdda9b[data-position=right]{margin-left:var(--_right-section-ml,var(--_section-margin));margin-right:var(--_right-section-mr,0)}[dir=rtl] .m-91fdda9b[data-position=right]{--_right-section-mr:var(--_section-margin);--_right-section-ml:0}.m-ddec01c0{--_bq-border:calc(.1875rem*var(--mantine-scale)) solid var(--bq-bd);background-color:var(--_bq-bg);border-bottom-left-radius:var(--_bq-radius-left,0);border-bottom-right-radius:var(--_bq-radius-right,var(--bq-radius));border-left:var(--_bq-border-left,var(--_bq-border));border-right:var(--_bq-border-right,0);border-top-left-radius:var(--_bq-radius-left,0);border-top-right-radius:var(--_bq-radius-right,var(--bq-radius));margin:0;padding:var(--mantine-spacing-xl) calc(2.375rem*var(--mantine-scale));position:relative}[dir=rtl] .m-ddec01c0{--_bq-radius-left:var(--bq-radius);--_bq-radius-right:0;--_bq-border-left:0;--_bq-border-right:var(--_bq-border)}[data-mantine-color-scheme=light] .m-ddec01c0{--_bq-bg:var(--bq-bg-light)}[data-mantine-color-scheme=dark] .m-ddec01c0{--_bq-bg:var(--bq-bg-dark)}.m-dde7bd57{align-items:center;background-color:var(--mantine-color-body);border-radius:var(--bq-icon-size);color:var(--bq-bd);display:flex;height:var(--bq-icon-size);justify-content:center;left:var(--_bq-icon-left,calc(var(--bq-icon-size)/-2));position:absolute;right:var(--_bq-icon-right,0);top:calc(var(--bq-icon-size)/-2);width:var(--bq-icon-size)}[dir=rtl] .m-dde7bd57{--_bq-icon-left:0;--_bq-icon-right:calc(var(--bq-icon-size)/-2)}.m-dde51a35{display:block;font-size:85%;margin-top:var(--mantine-spacing-md);opacity:.6}.m-8b3717df{align-items:center;display:flex}.m-f678d540{-webkit-tap-highlight-color:transparent;line-height:1;white-space:nowrap}.m-3b8f2208{align-items:center;color:var(--_separator-color);display:flex;justify-content:center;line-height:1;margin-left:var(--bc-separator-margin,var(--mantine-spacing-xs));margin-right:var(--bc-separator-margin,var(--mantine-spacing-xs))}[data-mantine-color-scheme=light] .m-3b8f2208{--_separator-color:var(--mantine-color-gray-7)}[data-mantine-color-scheme=dark] .m-3b8f2208{--_separator-color:var(--mantine-color-dark-2)}.m-fea6bf1a{--burger-size-xs:calc(.75rem*var(--mantine-scale));--burger-size-sm:calc(1.125rem*var(--mantine-scale));--burger-size-md:calc(1.5rem*var(--mantine-scale));--burger-size-lg:calc(2.125rem*var(--mantine-scale));--burger-size-xl:calc(2.625rem*var(--mantine-scale));--burger-size:var(--burger-size-md);--_burger-color:var(--burger-color,var(--__burger-color));cursor:pointer;height:calc(var(--burger-size) + var(--mantine-spacing-xs));padding:calc(var(--mantine-spacing-xs)/2);width:calc(var(--burger-size) + var(--mantine-spacing-xs))}[data-mantine-color-scheme=light] .m-fea6bf1a{--__burger-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-fea6bf1a{--__burger-color:var(--mantine-color-white)}.m-d4fb9cad{position:relative;-webkit-user-select:none;user-select:none}.m-d4fb9cad,.m-d4fb9cad:after,.m-d4fb9cad:before{background-color:var(--_burger-color);display:block;height:calc(var(--burger-size)/12);outline:calc(.0625rem*var(--mantine-scale)) solid transparent;transition-duration:var(--burger-transition-duration,.3s);transition-property:background-color,transform;transition-timing-function:var(--burger-transition-timing-function,ease);width:var(--burger-size)}.m-d4fb9cad:after,.m-d4fb9cad:before{content:"";left:0;position:absolute}.m-d4fb9cad:before{top:calc(var(--burger-size)/-3)}.m-d4fb9cad:after{top:calc(var(--burger-size)/3)}.m-d4fb9cad[data-opened]{background-color:transparent}.m-d4fb9cad[data-opened]:before{transform:translateY(calc(var(--burger-size)/3)) rotate(45deg)}.m-d4fb9cad[data-opened]:after{transform:translateY(calc(var(--burger-size)/-3)) rotate(-45deg)}.m-77c9d27d{--button-height-xs:calc(1.875rem*var(--mantine-scale));--button-height-sm:calc(2.25rem*var(--mantine-scale));--button-height-md:calc(2.625rem*var(--mantine-scale));--button-height-lg:calc(3.125rem*var(--mantine-scale));--button-height-xl:calc(3.75rem*var(--mantine-scale));--button-height-compact-xs:calc(1.375rem*var(--mantine-scale));--button-height-compact-sm:calc(1.625rem*var(--mantine-scale));--button-height-compact-md:calc(1.875rem*var(--mantine-scale));--button-height-compact-lg:calc(2.125rem*var(--mantine-scale));--button-height-compact-xl:calc(2.5rem*var(--mantine-scale));--button-padding-x-xs:calc(.875rem*var(--mantine-scale));--button-padding-x-sm:calc(1.125rem*var(--mantine-scale));--button-padding-x-md:calc(1.375rem*var(--mantine-scale));--button-padding-x-lg:calc(1.625rem*var(--mantine-scale));--button-padding-x-xl:calc(2rem*var(--mantine-scale));--button-padding-x-compact-xs:calc(.4375rem*var(--mantine-scale));--button-padding-x-compact-sm:calc(.5rem*var(--mantine-scale));--button-padding-x-compact-md:calc(.625rem*var(--mantine-scale));--button-padding-x-compact-lg:calc(.75rem*var(--mantine-scale));--button-padding-x-compact-xl:calc(.875rem*var(--mantine-scale));--button-height:var(--button-height-sm);--button-padding-x:var(--button-padding-x-sm);--button-color:var(--mantine-color-white);background:var(--_button-bg,var(--button-bg,var(--mantine-primary-color-filled)));border:var(--_button-bd,var(--button-bd,calc(.0625rem*var(--mantine-scale)) solid transparent));border-radius:var(--button-radius,var(--mantine-radius-default));color:var(--_button-color,var(--button-color,var(--mantine-color-white)));cursor:var(--_button-cursor,pointer);display:var(--_button-display,inline-block);font-size:var(--button-fz,var(--mantine-font-size-sm));font-weight:600;height:var(--button-height,var(--button-height-sm));line-height:1;overflow:hidden;padding-left:var(--_button-padding-left,var(--button-padding-x,var(--button-padding-x-sm)));padding-right:var(--_button-padding-right,var(--button-padding-x,var(--button-padding-x-sm)));position:relative;text-align:center;-webkit-user-select:none;user-select:none;width:var(--_button-width,auto)}.m-77c9d27d[data-block]{--_button-display:block;--_button-width:100%}.m-77c9d27d[data-with-left-section]{--_button-padding-left:calc(var(--button-padding-x)/1.5)}[dir=rtl] .m-77c9d27d[data-with-left-section]{--_button-padding-left:var(--button-padding-x)}.m-77c9d27d[data-with-right-section],[dir=rtl] .m-77c9d27d[data-with-left-section]{--_button-padding-right:calc(var(--button-padding-x)/1.5)}[dir=rtl] .m-77c9d27d[data-with-right-section]{--_button-padding-right:var(--button-padding-x);--_button-padding-left:calc(var(--button-padding-x)/1.5)}.m-77c9d27d:disabled:not([data-loading]),.m-77c9d27d[data-disabled]:not([data-loading]){--_button-cursor:not-allowed;--_button-bg:var(--_disabled-bg);--_button-color:var(--_disabled-color);--_button-bd:calc(.0625rem*var(--mantine-scale)) solid transparent;transform:none}.m-77c9d27d:before{background-color:var(--_button-loading-overlay-bg);border-radius:var(--button-radius,var(--mantine-radius-default));content:"";filter:blur(12px);inset:calc(-.0625rem*var(--mantine-scale));opacity:0;pointer-events:none;position:absolute;transform:translateY(-100%);transition:transform .15s ease,opacity .1s ease}.m-77c9d27d[data-loading]{--_button-cursor:not-allowed;transform:none}.m-77c9d27d[data-loading]:before{opacity:1;transform:translateY(0)}.m-77c9d27d[data-loading] .m-80f1301b{opacity:0;transform:translateY(100%)}.m-77c9d27d[data-loading] .m-a25b86ee{opacity:1;transform:translate(-50%,-50%)}@media (hover:hover){.m-77c9d27d:hover:not([data-loading]):not(:disabled):not([data-disabled]){--_button-bg:var(--button-hover,var(--mantine-primary-color-filled-hover));--_button-color:var(--button-hover-color)}}@media (hover:none){.m-77c9d27d:active:not([data-loading]):not(:disabled):not([data-disabled]){--_button-bg:var(--button-hover,var(--mantine-primary-color-filled-hover));--_button-color:var(--button-hover-color)}}[data-mantine-color-scheme=light] .m-77c9d27d{--_disabled-color:var(--mantine-color-gray-5);--_disabled-bg:var(--mantine-color-gray-1);--_button-loading-overlay-bg:hsla(0,0%,100%,.15)}[data-mantine-color-scheme=dark] .m-77c9d27d{--_disabled-color:var(--mantine-color-dark-3);--_disabled-bg:var(--mantine-color-dark-6);--_button-loading-overlay-bg:rgba(0,0,0,.15)}.m-80f1301b{justify-content:var(--button-justify,center);overflow:visible;transition:transform .15s ease,opacity .1s ease}.m-80f1301b,.m-811560b9{align-items:center;display:flex;height:100%}.m-811560b9{opacity:var(--_button-label-opacity,1);overflow:hidden;white-space:nowrap}.m-811560b9[data-loading]{--_button-label-opacity:.2}.m-a74036a{align-items:center;display:flex;margin-left:var(--_button-section-margin-left);margin-right:var(--_button-section-margin-right)}.m-a74036a[data-position=left]{--_button-section-margin-right:var(--mantine-spacing-xs)}[dir=rtl] .m-a74036a[data-position=left]{--_button-section-margin-right:0}.m-a74036a[data-position=right],[dir=rtl] .m-a74036a[data-position=left]{--_button-section-margin-left:var(--mantine-spacing-xs)}[dir=rtl] .m-a74036a[data-position=right]{--_button-section-margin-left:0;--_button-section-margin-right:var(--mantine-spacing-xs)}.m-a25b86ee{left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-200%);transition:transform .15s ease,opacity .1s ease}.m-80d6d844{--button-border-width:calc(.0625rem*var(--mantine-scale));display:flex}.m-80d6d844[data-orientation=horizontal]{flex-direction:row}.m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):first-child{border-bottom-right-radius:0;border-right-width:calc(var(--button-border-width)/2);border-top-right-radius:0}.m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):last-child{border-bottom-left-radius:0;border-left-width:calc(var(--button-border-width)/2);border-top-left-radius:0}.m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):not(:first-child):not(:last-child){border-left-width:calc(var(--button-border-width)/2);border-radius:0;border-right-width:calc(var(--button-border-width)/2)}[dir=rtl] .m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):first-child{border:var(--_button-bd,var(--button-bd,calc(.0625rem*var(--mantine-scale)) solid transparent));border-radius:var(--button-radius,var(--mantine-radius-default));border-bottom-left-radius:0;border-left-width:calc(var(--button-border-width)/2);border-top-left-radius:0}[dir=rtl] .m-80d6d844[data-orientation=horizontal] .m-77c9d27d:not(:only-child):last-child{border:var(--_button-bd,var(--button-bd,calc(.0625rem*var(--mantine-scale)) solid transparent));border-radius:var(--button-radius,var(--mantine-radius-default));border-bottom-right-radius:0;border-right-width:calc(var(--button-border-width)/2);border-top-right-radius:0}.m-80d6d844[data-orientation=vertical]{flex-direction:column}.m-80d6d844[data-orientation=vertical] .m-77c9d27d:not(:only-child):first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:calc(var(--button-border-width)/2)}.m-80d6d844[data-orientation=vertical] .m-77c9d27d:not(:only-child):last-child{border-top-left-radius:0;border-top-right-radius:0;border-top-width:calc(var(--button-border-width)/2)}.m-80d6d844[data-orientation=vertical] .m-77c9d27d:not(:only-child):not(:first-child):not(:last-child){border-bottom-width:calc(var(--button-border-width)/2);border-radius:0;border-top-width:calc(var(--button-border-width)/2)}.m-e615b15f{--card-padding:var(--mantine-spacing-md);background-color:var(--_card-bg);color:var(--mantine-color-text);display:flex;flex-direction:column;overflow:hidden;padding:var(--card-padding);position:relative}[data-mantine-color-scheme=light] .m-e615b15f{--_card-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-e615b15f{--_card-bg:var(--mantine-color-dark-6)}.m-599a2148{border-bottom:var(--_card-section-border-bottom,unset);border-top:var(--_card-section-border-top,unset);display:block;margin:var(--_card-section-mt,0) calc(var(--card-padding)*-1) var(--_card-section-mb,0);padding-left:var(--_card-section-padding,0);padding-right:var(--_card-section-padding,0)}.m-599a2148[data-first-section]{--_card-section-mt:calc(var(--card-padding)*-1);--_card-section-border-top:none!important}.m-599a2148[data-last-section]{--_card-section-mb:calc(var(--card-padding)*-1);--_card-section-border-bottom:none!important}.m-599a2148[data-inherit-padding]{--_card-section-padding:var(--card-padding)}.m-599a2148[data-with-border]{--_card-section-border-top:calc(.0625rem*var(--mantine-scale)) solid var(--_card-section-border-color);--_card-section-border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_card-section-border-color)}.m-599a2148+.m-599a2148{--_card-section-border-top:none!important}[data-mantine-color-scheme=light] .m-599a2148{--_card-section-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-599a2148{--_card-section-border-color:var(--mantine-color-dark-4)}.m-4451eb3a{align-items:center;display:var(--_center-display,flex);justify-content:center}.m-4451eb3a[data-inline]{--_center-display:inline-flex}.m-f59ffda3{--chip-size-xs:calc(1.4375rem*var(--mantine-scale));--chip-size-sm:calc(1.75rem*var(--mantine-scale));--chip-size-md:calc(2rem*var(--mantine-scale));--chip-size-lg:calc(2.25rem*var(--mantine-scale));--chip-size-xl:calc(2.5rem*var(--mantine-scale));--chip-icon-size-xs:calc(.625rem*var(--mantine-scale));--chip-icon-size-sm:calc(.75rem*var(--mantine-scale));--chip-icon-size-md:calc(.875rem*var(--mantine-scale));--chip-icon-size-lg:calc(1rem*var(--mantine-scale));--chip-icon-size-xl:calc(1.125rem*var(--mantine-scale));--chip-padding-xs:calc(1rem*var(--mantine-scale));--chip-padding-sm:calc(1.25rem*var(--mantine-scale));--chip-padding-md:calc(1.5rem*var(--mantine-scale));--chip-padding-lg:calc(1.75rem*var(--mantine-scale));--chip-padding-xl:calc(2rem*var(--mantine-scale));--chip-checked-padding-xs:calc(.46875rem*var(--mantine-scale));--chip-checked-padding-sm:calc(.625rem*var(--mantine-scale));--chip-checked-padding-md:calc(.73125rem*var(--mantine-scale));--chip-checked-padding-lg:calc(.84375rem*var(--mantine-scale));--chip-checked-padding-xl:calc(.78125rem*var(--mantine-scale));--chip-spacing-xs:calc(.625rem*var(--mantine-scale));--chip-spacing-sm:calc(.75rem*var(--mantine-scale));--chip-spacing-md:calc(1rem*var(--mantine-scale));--chip-spacing-lg:calc(1.25rem*var(--mantine-scale));--chip-spacing-xl:calc(1.375rem*var(--mantine-scale));--chip-size:var(--chip-size-sm);--chip-icon-size:var(--chip-icon-size-sm);--chip-padding:var(--chip-padding-sm);--chip-spacing:var(--chip-spacing-sm);--chip-checked-padding:var(--chip-checked-padding-sm);--chip-bg:var(--mantine-primary-color-filled);--chip-hover:var(--mantine-primary-color-filled-hover);--chip-color:var(--mantine-color-white);--chip-bd:calc(.0625rem*var(--mantine-scale)) solid transparent}.m-be049a53{-webkit-tap-highlight-color:transparent;align-items:center;background-color:var(--_chip-bg);border:calc(.0625rem*var(--mantine-scale)) solid transparent;border-radius:var(--chip-radius,calc(62.5rem*var(--mantine-scale)));color:var(--_chip-color,var(--mantine-color-text));cursor:var(--_chip-cursor,pointer);display:inline-flex;font-size:var(--chip-fz,var(--mantine-font-size-sm));height:var(--chip-size);line-height:calc(var(--chip-size) - .125rem*var(--mantine-scale));padding-left:var(--_chip-padding,var(--chip-padding));padding-right:var(--_chip-padding,var(--chip-padding));-webkit-user-select:none;user-select:none;white-space:nowrap}.m-be049a53[data-checked]{--_chip-padding:var(--chip-checked-padding)}[data-mantine-color-scheme=light] .m-be049a53[data-disabled]{--_chip-bg:var(--mantine-color-gray-2);--_chip-color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-be049a53[data-disabled]{--_chip-bg:var(--mantine-color-dark-6);--_chip-color:var(--mantine-color-dark-3)}.m-be049a53[data-disabled]{--_chip-cursor:not-allowed}.m-3904c1af:not([data-disabled]){background-color:var(--_chip-bg);border:var(--_chip-bd)}@media (hover:hover){[data-mantine-color-scheme=light] .m-3904c1af:not([data-disabled]):hover{--_chip-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-3904c1af:not([data-disabled]):hover{--_chip-bg:var(--mantine-color-dark-5)}}@media (hover:none){[data-mantine-color-scheme=light] .m-3904c1af:not([data-disabled]):active{--_chip-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-3904c1af:not([data-disabled]):active{--_chip-bg:var(--mantine-color-dark-5)}}[data-mantine-color-scheme=light] .m-3904c1af:not([data-disabled]){--_chip-bg:var(--mantine-color-white);--_chip-bd:calc(.0625rem*var(--mantine-scale)) solid var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-3904c1af:not([data-disabled]){--_chip-bg:var(--mantine-color-dark-6);--_chip-bd:calc(.0625rem*var(--mantine-scale)) solid var(--mantine-color-dark-4)}[data-mantine-color-scheme] .m-3904c1af:not([data-disabled])[data-checked]{--_chip-bd:var(--chip-bd);--_chip-icon-color:var(--chip-color)}@media (hover:hover){[data-mantine-color-scheme] .m-3904c1af:not([data-disabled])[data-checked]:hover{--_chip-bg:var(--chip-hover)}}@media (hover:none){[data-mantine-color-scheme] .m-3904c1af:not([data-disabled])[data-checked]:active{--_chip-bg:var(--chip-hover)}}.m-f7e165c3:not([data-disabled]),.m-fa109255:not([data-disabled]){background-color:var(--_chip-bg);border:calc(.0625rem*var(--mantine-scale)) solid transparent;color:var(--_chip-color,var(--mantine-color-text))}@media (hover:hover){[data-mantine-color-scheme=light] .m-f7e165c3:not([data-disabled]):hover,[data-mantine-color-scheme=light] .m-fa109255:not([data-disabled]):hover{--_chip-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-f7e165c3:not([data-disabled]):hover,[data-mantine-color-scheme=dark] .m-fa109255:not([data-disabled]):hover{--_chip-bg:var(--mantine-color-dark-4)}}@media (hover:none){[data-mantine-color-scheme=light] .m-f7e165c3:not([data-disabled]):active,[data-mantine-color-scheme=light] .m-fa109255:not([data-disabled]):active{--_chip-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-f7e165c3:not([data-disabled]):active,[data-mantine-color-scheme=dark] .m-fa109255:not([data-disabled]):active{--_chip-bg:var(--mantine-color-dark-4)}}[data-mantine-color-scheme=light] .m-f7e165c3:not([data-disabled]),[data-mantine-color-scheme=light] .m-fa109255:not([data-disabled]){--_chip-bg:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m-f7e165c3:not([data-disabled]),[data-mantine-color-scheme=dark] .m-fa109255:not([data-disabled]){--_chip-bg:var(--mantine-color-dark-5)}[data-mantine-color-scheme] .m-f7e165c3:not([data-disabled])[data-checked],[data-mantine-color-scheme] .m-fa109255:not([data-disabled])[data-checked]{--_chip-icon-color:var(--chip-color);--_chip-color:var(--chip-color);--_chip-bg:var(--chip-bg)}@media (hover:hover){[data-mantine-color-scheme] .m-f7e165c3:not([data-disabled])[data-checked]:hover,[data-mantine-color-scheme] .m-fa109255:not([data-disabled])[data-checked]:hover{--_chip-bg:var(--chip-hover)}}@media (hover:none){[data-mantine-color-scheme] .m-f7e165c3:not([data-disabled])[data-checked]:active,[data-mantine-color-scheme] .m-fa109255:not([data-disabled])[data-checked]:active{--_chip-bg:var(--chip-hover)}}.m-9ac86df9{align-items:center;display:flex;max-width:calc(var(--chip-icon-size) + var(--chip-spacing)/1.5);overflow:hidden;width:calc(var(--chip-icon-size) + var(--chip-spacing)/1.5)}.m-9ac86df9,.m-d6d72580{height:var(--chip-icon-size)}.m-d6d72580{color:var(--_chip-icon-color,inherit);display:block;width:var(--chip-icon-size)}.m-bde07329{height:0;margin:0;opacity:0;padding:0;width:0}.m-bde07329:focus-visible+.m-be049a53{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.m-b183c0a2{background-color:var(--_code-bg);border-radius:var(--mantine-radius-sm);color:var(--_code-color);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);line-height:var(--mantine-line-height);margin:0;overflow:auto;padding:var(--_code-padding,calc(.125rem*var(--mantine-scale)) calc(var(--mantine-spacing-xs)/2))}[data-mantine-color-scheme=light] .m-b183c0a2{--_code-bg:var(--code-bg,var(--mantine-color-gray-1));--_code-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-b183c0a2{--_code-bg:var(--code-bg,var(--mantine-color-dark-5));--_code-color:var(--mantine-color-white)}.m-b183c0a2[data-block]{--_code-padding:var(--mantine-spacing-xs)}.m-fee9c77{--cp-width-xs:calc(11.25rem*var(--mantine-scale));--cp-width-sm:calc(12.5rem*var(--mantine-scale));--cp-width-md:calc(15rem*var(--mantine-scale));--cp-width-lg:calc(17.5rem*var(--mantine-scale));--cp-width-xl:calc(20rem*var(--mantine-scale));--cp-preview-size-xs:calc(1.625rem*var(--mantine-scale));--cp-preview-size-sm:calc(2.125rem*var(--mantine-scale));--cp-preview-size-md:calc(2.625rem*var(--mantine-scale));--cp-preview-size-lg:calc(3.125rem*var(--mantine-scale));--cp-preview-size-xl:calc(3.375rem*var(--mantine-scale));--cp-thumb-size-xs:calc(.5rem*var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem*var(--mantine-scale));--cp-thumb-size-md:calc(1rem*var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem*var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem*var(--mantine-scale));--cp-saturation-height-xs:calc(6.25rem*var(--mantine-scale));--cp-saturation-height-sm:calc(6.875rem*var(--mantine-scale));--cp-saturation-height-md:calc(7.5rem*var(--mantine-scale));--cp-saturation-height-lg:calc(8.75rem*var(--mantine-scale));--cp-saturation-height-xl:calc(10rem*var(--mantine-scale));--cp-preview-size:var(--cp-preview-size-sm);--cp-thumb-size:var(--cp-thumb-size-sm);--cp-saturation-height:var(--cp-saturation-height-sm);--cp-width:var(--cp-width-sm);--cp-body-spacing:var(--mantine-spacing-sm);padding:calc(.0625rem*var(--mantine-scale));width:var(--_cp-width,var(--cp-width))}.m-fee9c77[data-full-width]{--_cp-width:100%}.m-9dddfbac{height:var(--cp-preview-size);width:var(--cp-preview-size)}.m-bffecc3e{display:flex;padding-top:calc(var(--cp-body-spacing)/2)}.m-3283bb96{flex:1}.m-3283bb96:not(:only-child){margin-right:var(--mantine-spacing-xs)}.m-40d572ba{border:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-white);border-radius:var(--_cp-thumb-size);box-shadow:0 0 calc(.0625rem*var(--mantine-scale)) #0009;height:var(--_cp-thumb-size);left:calc(var(--_thumb-x-offset) - var(--_cp-thumb-size)/2);outline:var(--_outline);overflow:hidden;position:absolute;top:calc(var(--_thumb-y-offset) - var(--_cp-thumb-size)/2);width:var(--_cp-thumb-size)}.m-d8ee6fd8{cursor:pointer;flex:0 0 calc(var(--cp-swatch-size) - .25rem*var(--mantine-scale));height:unset!important;margin:calc(.125rem*var(--mantine-scale));min-height:0!important;min-width:0!important;padding-bottom:calc(var(--cp-swatch-size) - .25rem*var(--mantine-scale));width:unset!important}.m-5711e686{display:flex;flex-wrap:wrap;margin-left:calc(-.125rem*var(--mantine-scale));margin-right:calc(-.125rem*var(--mantine-scale));margin-top:calc(.3125rem*var(--mantine-scale))}.m-202a296e{--cp-thumb-size-xs:calc(.5rem*var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem*var(--mantine-scale));--cp-thumb-size-md:calc(1rem*var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem*var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem*var(--mantine-scale));--_cp-thumb-size:var(--cp-thumb-size,calc(.75rem*var(--mantine-scale)));-webkit-tap-highlight-color:transparent;border-radius:var(--mantine-radius-sm);height:var(--cp-saturation-height);margin:calc(var(--cp-thumb-size)/2);position:relative}.m-202a296e[data-focus-ring=auto]:focus:focus-visible .m-40d572ba{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-202a296e[data-focus-ring=always]:focus .m-40d572ba{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-11b3db02{border-radius:var(--mantine-radius-sm);inset:calc(var(--cp-thumb-size)*-1/2 - .0625rem*var(--mantine-scale));position:absolute}.m-d856d47d{--cp-thumb-size-xs:calc(.5rem*var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem*var(--mantine-scale));--cp-thumb-size-md:calc(1rem*var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem*var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem*var(--mantine-scale));--_cp-thumb-size:var(--cp-thumb-size,calc(.75rem*var(--mantine-scale)));height:calc(var(--_cp-thumb-size) + .125rem*var(--mantine-scale));margin-left:calc(var(--_cp-thumb-size)/2);margin-right:calc(var(--_cp-thumb-size)/2);outline:none;position:relative}.m-d856d47d+.m-d856d47d{margin-top:calc(.375rem*var(--mantine-scale))}.m-d856d47d[data-focus-ring=auto]:focus:focus-visible .m-40d572ba{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-d856d47d[data-focus-ring=always]:focus .m-40d572ba{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}[data-mantine-color-scheme=light] .m-d856d47d{--_slider-checkers:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-d856d47d{--_slider-checkers:var(--mantine-color-dark-4)}.m-8f327113{border-radius:10000rem;bottom:0;left:calc(var(--_cp-thumb-size)*-1/2 - .0625rem*var(--mantine-scale));position:absolute;right:calc(var(--_cp-thumb-size)*-1/2 - .0625rem*var(--mantine-scale));top:0}.m-de3d2490{--cs-size:calc(1.75rem*var(--mantine-scale));--cs-radius:calc(62.5rem*var(--mantine-scale));-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:var(--cs-radius);color:inherit;display:block;height:var(--cs-size);line-height:1;min-height:var(--cs-size);min-width:var(--cs-size);position:relative;text-decoration:none;width:var(--cs-size)}[data-mantine-color-scheme=light] .m-de3d2490{--_alpha-overlay-color:var(--mantine-color-gray-3);--_alpha-overlay-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-de3d2490{--_alpha-overlay-color:var(--mantine-color-dark-4);--_alpha-overlay-bg:var(--mantine-color-dark-7)}.m-862f3d1b,.m-98ae7f22{border-radius:var(--cs-radius);top:0;right:0;bottom:0;left:0;position:absolute}.m-98ae7f22{box-shadow:#0000001a 0 0 0 calc(.0625rem*var(--mantine-scale)) inset,#00000026 0 0 calc(.25rem*var(--mantine-scale)) inset;z-index:1}.m-95709ac0{background-image:linear-gradient(45deg,var(--_alpha-overlay-color) 25%,transparent 25%),linear-gradient(-45deg,var(--_alpha-overlay-color) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--_alpha-overlay-color) 75%),linear-gradient(-45deg,var(--_alpha-overlay-bg) 75%,var(--_alpha-overlay-color) 75%);background-position:0 0,0 calc(.25rem*var(--mantine-scale)),calc(.25rem*var(--mantine-scale)) calc(-.25rem*var(--mantine-scale)),calc(-.25rem*var(--mantine-scale)) 0;background-size:calc(.5rem*var(--mantine-scale)) calc(.5rem*var(--mantine-scale))}.m-93e74e3,.m-95709ac0{border-radius:var(--cs-radius);top:0;right:0;bottom:0;left:0;position:absolute}.m-93e74e3{align-items:center;display:flex;justify-content:center;z-index:2}.m-b077c2bc{--ci-eye-dropper-icon-size-xs:calc(.875rem*var(--mantine-scale));--ci-eye-dropper-icon-size-sm:calc(1rem*var(--mantine-scale));--ci-eye-dropper-icon-size-md:calc(1.125rem*var(--mantine-scale));--ci-eye-dropper-icon-size-lg:calc(1.25rem*var(--mantine-scale));--ci-eye-dropper-icon-size-xl:calc(1.375rem*var(--mantine-scale));--ci-eye-dropper-icon-size:var(--ci-eye-dropper-icon-size-sm)}.m-c5ccdcab{--ci-preview-size-xs:calc(1rem*var(--mantine-scale));--ci-preview-size-sm:calc(1.125rem*var(--mantine-scale));--ci-preview-size-md:calc(1.375rem*var(--mantine-scale));--ci-preview-size-lg:calc(1.75rem*var(--mantine-scale));--ci-preview-size-xl:calc(2.25rem*var(--mantine-scale));--ci-preview-size:var(--ci-preview-size-sm)}.m-5ece2cd7{padding:calc(.5rem*var(--mantine-scale))}.m-7485cace{--container-size-xs:calc(33.75rem*var(--mantine-scale));--container-size-sm:calc(45rem*var(--mantine-scale));--container-size-md:calc(60rem*var(--mantine-scale));--container-size-lg:calc(71.25rem*var(--mantine-scale));--container-size-xl:calc(82.5rem*var(--mantine-scale));--container-size:var(--container-size-md);margin-left:auto;margin-right:auto;max-width:var(--container-size);padding-left:var(--mantine-spacing-md);padding-right:var(--mantine-spacing-md)}.m-7485cace[data-fluid]{--container-size:100%}.m-e2125a27{--dialog-size-xs:calc(10rem*var(--mantine-scale));--dialog-size-sm:calc(12.5rem*var(--mantine-scale));--dialog-size-md:calc(21.25rem*var(--mantine-scale));--dialog-size-lg:calc(25rem*var(--mantine-scale));--dialog-size-xl:calc(31.25rem*var(--mantine-scale));--dialog-size:var(--dialog-size-md);max-width:calc(100vw - var(--mantine-spacing-xl)*2);min-height:calc(3.125rem*var(--mantine-scale));position:relative;width:var(--dialog-size)}.m-5abab665{left:var(--_close-button-left,auto);position:absolute;right:var(--_close-button-right,calc(var(--mantine-spacing-md)/2));top:calc(var(--mantine-spacing-md)/2)}[dir=rtl] .m-5abab665{--_close-button-right:auto;--_close-button-left:calc(var(--mantine-spacing-md)/2)}.m-3eebeb36{--divider-size-xs:calc(.0625rem*var(--mantine-scale));--divider-size-sm:calc(.125rem*var(--mantine-scale));--divider-size-md:calc(.1875rem*var(--mantine-scale));--divider-size-lg:calc(.25rem*var(--mantine-scale));--divider-size-xl:calc(.3125rem*var(--mantine-scale));--divider-size:var(--divider-size-xs)}[data-mantine-color-scheme=light] .m-3eebeb36{--_divider-color:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-3eebeb36{--_divider-color:var(--mantine-color-dark-3)}.m-3eebeb36[data-orientation=horizontal]{border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color,var(--_divider-color))}.m-3eebeb36[data-orientation=vertical]{align-self:stretch;border-left:var(--divider-size) var(--divider-border-style,solid) var(--divider-color,var(--_divider-color));height:auto}.m-3eebeb36[data-with-label]{border:0}.m-9e365f20{align-items:center;color:var(--divider-color,var(--mantine-color-dimmed));display:flex;font-size:var(--mantine-font-size-xs);white-space:nowrap}.m-9e365f20[data-position=left]:before,.m-9e365f20[data-position=right]:after{display:none}.m-9e365f20:before{border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color,var(--_divider-color));content:"";flex:1;height:calc(.0625rem*var(--mantine-scale));margin-right:var(--mantine-spacing-xs)}[dir=rtl] .m-9e365f20:before{margin-left:var(--mantine-spacing-xs);margin-right:0}.m-9e365f20:after{border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color,var(--_divider-color));content:"";flex:1;height:calc(.0625rem*var(--mantine-scale));margin-left:var(--mantine-spacing-xs)}[dir=rtl] .m-9e365f20:after{margin-left:0;margin-right:var(--mantine-spacing-xs)}.m-f11b401e{--drawer-size-xs:calc(20rem*var(--mantine-scale));--drawer-size-sm:calc(23.75rem*var(--mantine-scale));--drawer-size-md:calc(27.5rem*var(--mantine-scale));--drawer-size-lg:calc(38.75rem*var(--mantine-scale));--drawer-size-xl:calc(48.75rem*var(--mantine-scale));--drawer-size:var(--drawer-size-md);--drawer-offset:0rem}.m-5a7c2c9{z-index:1000}.m-b8a05bbd{flex:var(--drawer-flex,0 0 var(--drawer-size));height:var(--drawer-height,calc(100% - var(--drawer-offset)*2));margin:var(--drawer-offset);max-height:100%;max-width:100%;overflow-y:auto}.m-31cd769a{align-items:var(--drawer-align,flex-start);display:flex;justify-content:var(--drawer-justify,flex-start)}.m-e9408a47{border-radius:var(--fieldset-radius,var(--mantine-radius-default));min-inline-size:auto;padding:var(--mantine-spacing-lg);padding-top:var(--mantine-spacing-xs)}.m-84c9523a{background-color:var(--_bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_bd)}[data-mantine-color-scheme=light] .m-84c9523a{--_bd:var(--mantine-color-gray-3);--_bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-84c9523a{--_bd:var(--mantine-color-dark-4);--_bg:var(--mantine-color-dark-7)}.m-ef274e49{background-color:var(--_bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_bd)}[data-mantine-color-scheme=light] .m-ef274e49{--_bd:var(--mantine-color-gray-3);--_bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-ef274e49{--_bd:var(--mantine-color-dark-4);--_bg:var(--mantine-color-dark-6)}.m-eda993d3{border:0;border-radius:0;padding:0}.m-90794832{font-size:var(--mantine-font-size-sm)}.m-74ca27fe{margin-bottom:var(--mantine-spacing-sm);padding:0}.m-410352e9{overflow:var(--grid-overflow,hidden)}.m-dee7bd2f{align-items:var(--grid-align);display:flex;flex-wrap:wrap;justify-content:var(--grid-justify);margin:calc(var(--grid-gutter)/-2);width:calc(100% + var(--grid-gutter))}.m-96bdd299{flex-basis:var(--col-flex-basis);flex-grow:var(--col-flex-grow,0);flex-shrink:0;margin-left:var(--_col-ml,var(--col-offset,0));margin-right:var(--_col-mr,0);max-width:var(--col-max-width);order:var(--col-order);padding:calc(var(--grid-gutter)/2);width:var(--col-width)}[dir=rtl] .m-96bdd299{--_col-ml:0;--_col-mr:var(--col-offset,0)}.m-bcb3f3c2{background-color:var(--_mark-bg);color:var(--mantine-color-black)}[data-mantine-color-scheme=light] .m-bcb3f3c2{--_mark-bg:var(--mark-bg-light)}[data-mantine-color-scheme=dark] .m-bcb3f3c2{--_mark-bg:var(--mark-bg-dark)}.m-9e117634{border-radius:var(--image-radius,0);display:block;flex:0;object-fit:var(--image-object-fit,cover);width:100%}@keyframes m-885901b1{0%{box-shadow:0 0 calc(.03125rem*var(--mantine-scale)) 0 var(--indicator-color);opacity:.6}to{box-shadow:0 0 calc(.03125rem*var(--mantine-scale)) calc(.275rem*var(--mantine-scale)) var(--indicator-color);opacity:0}}.m-e5262200{--indicator-size:calc(.625rem*var(--mantine-scale));--indicator-color:var(--mantine-primary-color-filled);display:var(--_indicator-display,block);position:relative}.m-e5262200[data-inline]{--_indicator-display:inline-block}.m-760d1fb1{align-items:center;border:var(--_indicator-border);border-radius:var(--indicator-radius,calc(62.5rem*var(--mantine-scale)));bottom:var(--indicator-bottom);color:var(--mantine-color-white);display:flex;font-size:var(--mantine-font-size-xs);height:var(--indicator-size);justify-content:center;left:var(--indicator-left);min-width:var(--indicator-size);padding-left:var(--_indicator-padding,0);padding-right:var(--_indicator-padding,0);right:var(--indicator-right);top:var(--indicator-top);transform:translate(var(--indicator-translate-x),var(--indicator-translate-y));white-space:nowrap;z-index:var(--indicator-z-index,200)}.m-760d1fb1,.m-760d1fb1:before{background-color:var(--indicator-color);position:absolute}.m-760d1fb1:before{border-radius:var(--indicator-radius,calc(62.5rem*var(--mantine-scale)));content:"";top:0;right:0;bottom:0;left:0;z-index:-1}.m-760d1fb1[data-with-label]{--_indicator-padding:calc(var(--mantine-spacing-xs)/2)}.m-760d1fb1[data-with-border]{--_indicator-border:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-body)}.m-760d1fb1[data-processing]:before{animation:m-885901b1 1s linear infinite}.m-dc6f14e2{--kbd-fz-xs:calc(.625rem*var(--mantine-scale));--kbd-fz-sm:calc(.75rem*var(--mantine-scale));--kbd-fz-md:calc(.875rem*var(--mantine-scale));--kbd-fz-lg:calc(1rem*var(--mantine-scale));--kbd-fz-xl:calc(1.25rem*var(--mantine-scale));--kbd-fz:var(--kbd-fz-sm);--kbd-padding-xs:calc(.125rem*var(--mantine-scale)) calc(.25rem*var(--mantine-scale));--kbd-padding-sm:calc(.1875rem*var(--mantine-scale)) calc(.3125rem*var(--mantine-scale));--kbd-padding-md:calc(.25rem*var(--mantine-scale)) calc(.4375rem*var(--mantine-scale));--kbd-padding-lg:calc(.3125rem*var(--mantine-scale)) calc(.5625rem*var(--mantine-scale));--kbd-padding-xl:calc(.5rem*var(--mantine-scale)) calc(.875rem*var(--mantine-scale));--kbd-padding:var(--kbd-padding-sm);background-color:var(--_kbd-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_kbd-border-color);border-bottom-width:calc(.1875rem*var(--mantine-scale));border-radius:var(--mantine-radius-sm);color:var(--_kbd-color);font-family:var(--mantine-font-family-monospace);font-size:var(--kbd-fz);font-weight:700;line-height:var(--mantine-line-height);padding:var(--kbd-padding);unicode-bidi:embed}[data-mantine-color-scheme=light] .m-dc6f14e2{--_kbd-border-color:var(--mantine-color-gray-3);--_kbd-color:var(--mantine-color-gray-7);--_kbd-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-dc6f14e2{--_kbd-border-color:var(--mantine-color-dark-3);--_kbd-color:var(--mantine-color-dark-0);--_kbd-bg:var(--mantine-color-dark-5)}.m-abbac491{font-size:var(--list-fz,var(--mantine-fz-md));line-height:var(--list-lh,var(--mantine-line-height-md));list-style-position:inside;margin:0;padding:0;padding-left:var(--_list-pl,0);padding-right:var(--_list-pr,0)}.m-abbac491[data-with-padding]{--_list-pl:var(--mantine-spacing-md)}[dir=rtl] .m-abbac491[data-with-padding]{--_list-pl:0;--_list-pr:var(--mantine-spacing-md)}.m-abb6bec2{line-height:var(--_item-lh,var(--list-lh));list-style:var(--_item-list-style);margin-top:var(--_item-mt,0);white-space:nowrap}.m-abb6bec2[data-with-icon]{--_item-list-style:none}.m-abb6bec2[data-with-icon] .m-75cd9f71{--_item-wrapper-direction:row;--_item-wrapper-align:center}.m-abb6bec2:not(:first-of-type){--_item-mt:var(--list-spacing,0)}.m-abb6bec2[data-centered]{--_item-lh:1}.m-75cd9f71{align-items:var(--_item-wrapper-align,flex-start);display:inline-flex;flex-direction:var(--_item-wrapper-direction,column);white-space:normal}.m-60f83e5b{display:inline-block;margin-left:var(--_item-icon-ml,0);margin-right:var(--_item-icon-mr,var(--mantine-spacing-sm));vertical-align:middle}[dir=rtl] .m-60f83e5b{--_item-icon-mr:0;--_item-icon-ml:var(--mantine-spacing-sm)}.m-6e45937b{align-items:center;display:flex;top:0;right:0;bottom:0;left:0;justify-content:center;overflow:hidden;position:absolute;z-index:var(--lo-z-index)}.m-e8eb006c{position:relative;z-index:calc(var(--lo-z-index) + 1)}.m-df587f17{z-index:var(--lo-z-index)}[data-mantine-color-scheme=dark] .m-df587f17[data-light],[data-mantine-color-scheme=light] .m-df587f17[data-dark]{display:none}.m-dc9b7c9f{padding:calc(.25rem*var(--mantine-scale))}.m-9bfac126{color:var(--mantine-color-dimmed);cursor:default;font-size:var(--mantine-font-size-xs);font-weight:500;padding:calc(var(--mantine-spacing-xs)/2) var(--mantine-spacing-sm)}.m-efdf90cb{border-top:calc(.0625rem*var(--mantine-scale)) solid var(--_divider-color);margin-bottom:calc(.25rem*var(--mantine-scale));margin-top:calc(.25rem*var(--mantine-scale))}[data-mantine-color-scheme=light] .m-efdf90cb{--_divider-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-efdf90cb{--_divider-color:var(--mantine-color-dark-4)}.m-99ac2aa1{align-items:center;background-color:var(--_item-bg,transparent);border-radius:var(--popover-radius,var(--mantine-radius-default));color:var(--menu-item-color,var(--mantine-color-text));display:flex;font-size:var(--mantine-font-size-sm);opacity:var(--_item-opacity,1);padding:calc(var(--mantine-spacing-xs)/1.5) var(--mantine-spacing-sm);pointer-events:var(--_item-pointer-events,auto);-webkit-user-select:none;user-select:none;width:100%}.m-99ac2aa1:disabled,.m-99ac2aa1[data-disabled]{--menu-item-color:var(--mantine-color-dimmed)!important;--_item-opacity:.6;--_item-pointer-events:none}.m-99ac2aa1[data-hovered]{--_item-bg:var(--menu-item-hover,var(--_item-bg-hover))}[data-mantine-color-scheme=light] .m-99ac2aa1[data-hovered]{--_item-bg-hover:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m-99ac2aa1[data-hovered]{--_item-bg-hover:var(--mantine-color-dark-4)}.m-5476e0d3{flex:1}[dir=rtl] .m-5476e0d3{text-align:right}.m-8b75e504{align-items:center;display:flex;justify-content:center;margin-left:var(--_section-ml);margin-right:var(--_section-mr)}.m-8b75e504[data-position=left]{--_section-ml:0;--_section-mr:var(--mantine-spacing-xs)}.m-8b75e504[data-position=right],[dir=rtl] .m-8b75e504[data-position=left]{--_section-ml:var(--mantine-spacing-xs);--_section-mr:0}[dir=rtl] .m-8b75e504[data-position=right]{--_section-ml:0;--_section-mr:var(--mantine-spacing-xs)}.m-9df02822{--modal-size-xs:calc(20rem*var(--mantine-scale));--modal-size-sm:calc(23.75rem*var(--mantine-scale));--modal-size-md:calc(27.5rem*var(--mantine-scale));--modal-size-lg:calc(38.75rem*var(--mantine-scale));--modal-size-xl:calc(48.75rem*var(--mantine-scale));--modal-size:var(--modal-size-md);--modal-y-offset:5dvh;--modal-x-offset:5vw}.m-9df02822[data-full-screen]{--modal-border-radius:0!important}.m-9df02822[data-full-screen] .m-54c44539{--_content-flex:0 0 100%;--_content-max-height:auto;--_content-height:100dvh}.m-9df02822[data-full-screen] .m-1f958f16{--_inner-y-offset:0;--_inner-x-offset:0}.m-9df02822[data-centered] .m-1f958f16{--_inner-align:center}.m-d0e2b9cd{border-top-left-radius:var(--modal-radius,var(--mantine-radius-default));border-top-right-radius:var(--modal-radius,var(--mantine-radius-default))}.m-54c44539{flex:var(--_content-flex,0 0 var(--modal-size));height:var(--_content-height,auto);max-height:var(--_content-max-height,calc(100dvh - var(--modal-y-offset)*2));max-width:100%;overflow-y:auto}.m-1f958f16{align-items:var(--_inner-align,flex-start);display:flex;justify-content:center;padding:var(--_inner-y-offset,var(--modal-y-offset)) var(--_inner-x-offset,var(--modal-x-offset))}.m-45c4369d{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;color:inherit;flex:1;font-size:inherit;height:1.6em;min-width:calc(6.25rem*var(--mantine-scale));padding:0}.m-45c4369d::placeholder{color:var(--_input-placeholder-color);opacity:1}.m-45c4369d[data-type=auto],.m-45c4369d[data-type=hidden]{height:calc(.0625rem*var(--mantine-scale));left:0;opacity:0;pointer-events:none;position:absolute;top:0;width:calc(.0625rem*var(--mantine-scale))}.m-45c4369d:focus{outline:none}.m-45c4369d[data-type=auto]:focus{height:1.6em;opacity:1;position:static;visibility:visible}.m-45c4369d[data-pointer]:not([data-disabled],:disabled){cursor:pointer}.m-45c4369d:disabled,.m-45c4369d[data-disabled]{cursor:not-allowed}.m-7cda1cd6{--pill-fz-xs:calc(.625rem*var(--mantine-scale));--pill-fz-sm:calc(.75rem*var(--mantine-scale));--pill-fz-md:calc(.875rem*var(--mantine-scale));--pill-fz-lg:calc(1rem*var(--mantine-scale));--pill-fz-xl:calc(1.125rem*var(--mantine-scale));--pill-height-xs:calc(1.125rem*var(--mantine-scale));--pill-height-sm:calc(1.375rem*var(--mantine-scale));--pill-height-md:calc(1.5625rem*var(--mantine-scale));--pill-height-lg:calc(1.75rem*var(--mantine-scale));--pill-height-xl:calc(2rem*var(--mantine-scale));--pill-fz:var(--pill-fz-sm);--pill-height:var(--pill-height-sm);align-items:center;background-color:var(--_pill-bg);border-radius:var(--pill-radius,calc(62.5rem*var(--mantine-scale)));color:var(--_pill-color);display:inline-flex;flex:0;font-size:var(--pill-fz);height:var(--pill-height);line-height:1;max-width:100%;padding-left:.8em;padding-right:var(--_pill-padding-right,.8em);user-select:none;-webkit-user-select:none;white-space:nowrap}[data-mantine-color-scheme=dark] .m-7cda1cd6{--_pill-bg:var(--mantine-color-dark-7);--_pill-color:var(--mantine-color-dark-0)}[data-mantine-color-scheme=light] .m-7cda1cd6{--_pill-color:var(--mantine-color-black)}[dir=rtl] .m-7cda1cd6{padding-left:var(--_pill-padding-right,.8em);padding-right:.8em}.m-7cda1cd6[data-with-remove]{--_pill-padding-right:0}.m-7cda1cd6:has(button:disabled),.m-7cda1cd6[data-disabled]{--_pill-cursor:not-allowed}[data-mantine-color-scheme=light] .m-44da308b{--_pill-bg:var(--mantine-color-gray-1)}[data-mantine-color-scheme=light] .m-44da308b:has(button:disabled),[data-mantine-color-scheme=light] .m-44da308b[data-disabled]{--_pill-bg:var(--mantine-color-gray-3)}[data-mantine-color-scheme=light] .m-e3a01f8{--_pill-bg:var(--mantine-color-white)}[data-mantine-color-scheme=light] .m-e3a01f8:has(button:disabled),[data-mantine-color-scheme=light] .m-e3a01f8[data-disabled]{--_pill-bg:var(--mantine-color-gray-3)}.m-1e0e6180{cursor:var(--_pill-cursor,default);height:100%;line-height:var(--pill-height);overflow:hidden;text-overflow:ellipsis}.m-ae386778{border-radius:0;color:inherit;flex:0;font-size:inherit;height:100%;min-height:unset;min-width:2em;padding-left:.1em;padding-right:.3em;width:unset}.m-7cda1cd6[data-disabled]>.m-ae386778,.m-ae386778:disabled{background-color:transparent;cursor:not-allowed;min-width:.8em;padding:0;width:.8em}.m-7cda1cd6[data-disabled]>.m-ae386778>svg,.m-ae386778:disabled>svg{display:none}.m-ae386778>svg{pointer-events:none}.m-1dcfd90b{--pg-gap-xs:calc(.375rem*var(--mantine-scale));--pg-gap-sm:calc(.5rem*var(--mantine-scale));--pg-gap-md:calc(.625rem*var(--mantine-scale));--pg-gap-lg:calc(.75rem*var(--mantine-scale));--pg-gap-xl:calc(.75rem*var(--mantine-scale));--pg-gap:var(--pg-gap-sm);flex-wrap:wrap;gap:var(--pg-gap)}.m-1dcfd90b,.m-f0824112{align-items:center;display:flex}.m-f0824112{--nl-bg:var(--mantine-primary-color-light);--nl-hover:var(--mantine-primary-color-light-hover);--nl-color:var(--mantine-primary-color-light-color);background:var(--_nav-link-bg);color:var(--_nav-link-color);opacity:var(--_nav-link-opacity,1);padding:calc(.5rem*var(--mantine-scale)) var(--mantine-spacing-sm);pointer-events:var(--_nav-link-pointer-events,auto);-webkit-user-select:none;user-select:none;width:100%}@media (hover:hover){[data-mantine-color-scheme=light] .m-f0824112:hover{--_nav-link-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-f0824112:hover{--_nav-link-bg:var(--mantine-color-dark-6)}}@media (hover:none){[data-mantine-color-scheme=light] .m-f0824112:active{--_nav-link-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-f0824112:active{--_nav-link-bg:var(--mantine-color-dark-6)}}.m-f0824112[data-disabled]{--_nav-link-opacity:.4;--_nav-link-pointer-events:none}.m-f0824112[data-active]{--_nav-link-bg:var(--nl-bg);--_nav-link-color:var(--nl-color)}@media (hover:hover){.m-f0824112[data-active]:hover{--_nav-link-bg:var(--nl-hover)}}@media (hover:none){.m-f0824112[data-active]:active{--_nav-link-bg:var(--nl-hover)}}.m-f0824112[data-active] .m-57492dcc{--_description-opacity:.9;--_description-color:var(--nl-color)}.m-690090b5{align-items:center;display:flex;justify-content:center;margin-left:var(--_section-ml);margin-right:var(--_section-mr);transform:var(--_section-transform,none);transition:transform .15s ease}.m-690090b5>svg{display:block}.m-690090b5[data-position=left]{--_section-ml:0;--_section-mr:var(--mantine-spacing-sm)}.m-690090b5[data-position=right],[dir=rtl] .m-690090b5[data-position=left]{--_section-ml:var(--mantine-spacing-sm);--_section-mr:0}[dir=rtl] .m-690090b5[data-position=right]{--_section-ml:0;--_section-mr:var(--mantine-spacing-sm)}.m-690090b5[data-rotate]{--_section-transform:rotate(90deg)}.m-1f6ac4c4{font-size:var(--mantine-font-size-sm)}.m-f07af9d2{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:var(--_body-white-space,auto)}.m-f07af9d2[data-no-wrap]{--_body-white-space:nowrap}.m-57492dcc{color:var(--_description-color,var(--mantine-color-dimmed));display:block;font-size:var(--mantine-font-size-xs);opacity:var(--_description-opacity,1);overflow:hidden;text-overflow:ellipsis;white-space:var(--_body-white-space,auto)}.m-e17b862f{padding-left:var(--_children-pl,var(--nl-offset,var(--mantine-spacing-lg)));padding-right:var(--_children-pr,0)}[dir=rtl] .m-e17b862f{--_children-pl:0;--_children-pr:var(--nl-offset,var(--mantine-spacing-lg))}.m-1fd8a00b{transform:rotate(-90deg)}.m-a513464{align-items:center;background-color:var(--_bg);border:var(--_border,none);box-shadow:var(--mantine-shadow-lg);box-sizing:border-box;display:flex;overflow:hidden;padding:var(--mantine-spacing-xs) var(--_root-padding-right,var(--mantine-spacing-xs)) var(--mantine-spacing-xs) var(--_root-padding-left,calc(1.375rem*var(--mantine-scale)));position:relative}.m-a513464,.m-a513464:before{border-radius:var(--notification-radius,var(--mantine-radius-default))}.m-a513464:before{background-color:var(--notification-color,var(--mantine-primary-color-filled));bottom:var(--notification-radius,var(--mantine-radius-default));content:"";display:block;left:calc(.25rem*var(--mantine-scale));position:absolute;top:var(--notification-radius,var(--mantine-radius-default));width:calc(.375rem*var(--mantine-scale))}[dir=rtl] .m-a513464:before{left:auto;right:calc(.25rem*var(--mantine-scale))}.m-a513464[data-with-icon]{--_root-padding-left:var(--mantine-spacing-xs)}.m-a513464[data-with-icon]:before{display:none}[dir=rtl] .m-a513464[data-with-icon]{--_root-padding-right:var(--mantine-spacing-xs)}.m-a513464[data-with-border]{--_border:calc(.0625rem*var(--mantine-scale)) solid var(--_border-color)}[dir=rtl] .m-a513464{--_root-padding-right:calc(1.375rem*var(--mantine-scale));--_root-padding-left:var(--mantine-spacing-xs)}[data-mantine-color-scheme=light] .m-a513464{--_border-color:var(--mantine-color-gray-3);--_bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-a513464{--_border-color:var(--mantine-color-dark-4);--_bg:var(--mantine-color-dark-6)}.m-a4ceffb{align-items:center;background-color:var(--notification-color,var(--mantine-primary-color-filled));border-radius:calc(1.75rem*var(--mantine-scale));box-sizing:border-box;color:var(--mantine-color-white);display:flex;height:calc(1.75rem*var(--mantine-scale));justify-content:center;margin-left:var(--_icon-margin-left,0);margin-right:var(--_icon-margin-right,var(--mantine-spacing-md));width:calc(1.75rem*var(--mantine-scale))}[dir=rtl] .m-a4ceffb{--_icon-margin-right:0;--_icon-margin-left:var(--mantine-spacing-md)}.m-b0920b15{margin-left:var(--_icon-margin-left,0);margin-right:var(--_icon-margin-right,var(--mantine-spacing-md))}[dir=rtl] .m-b0920b15{--_icon-margin-right:0;--_icon-margin-left:var(--mantine-spacing-md)}.m-a49ed24{flex:1;margin-left:var(--_body-margin-left,0);margin-right:var(--_body-margin-right,var(--mantine-spacing-xs));overflow:hidden}[dir=rtl] .m-a49ed24{--_body-margin-right:0;--_body-margin-left:var(--mantine-spacing-xs)}.m-3feedf16{color:var(--_title-color);font-size:var(--mantine-font-size-sm);font-weight:500;line-height:var(--mantine-line-height-sm);margin-bottom:calc(.125rem*var(--mantine-scale));overflow:hidden;text-overflow:ellipsis}[data-mantine-color-scheme=light] .m-3feedf16{--_title-color:var(--mantine-color-gray-9)}[data-mantine-color-scheme=dark] .m-3feedf16{--_title-color:var(--mantine-color-white)}.m-3d733a3a{color:var(--_description-color);font-size:var(--mantine-font-size-sm);line-height:var(--mantine-line-height-sm);overflow:hidden;text-overflow:ellipsis}[data-mantine-color-scheme=light] .m-3d733a3a[data-with-title]{--_description-color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .m-3d733a3a[data-with-title]{--_description-color:var(--mantine-color-dark-2)}[data-mantine-color-scheme=light] .m-3d733a3a{--_description-color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-3d733a3a{--_description-color:var(--mantine-color-dark-0)}.m-919a4d88:hover{background-color:var(--_close-button-hover-bg)}[data-mantine-color-scheme=light] .m-919a4d88:hover{--_close-button-hover-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-919a4d88:hover{--_close-button-hover-bg:var(--mantine-color-dark-8)}.m-e2f5cd4e{--ni-right-section-width-xs:calc(1.0625rem*var(--mantine-scale));--ni-right-section-width-sm:calc(1.5rem*var(--mantine-scale));--ni-right-section-width-md:calc(1.6875rem*var(--mantine-scale));--ni-right-section-width-lg:calc(1.9375rem*var(--mantine-scale));--ni-right-section-width-xl:calc(2.125rem*var(--mantine-scale))}.m-95e17d22{--ni-chevron-size-xs:calc(.625rem*var(--mantine-scale));--ni-chevron-size-sm:calc(.875rem*var(--mantine-scale));--ni-chevron-size-md:calc(1rem*var(--mantine-scale));--ni-chevron-size-lg:calc(1.125rem*var(--mantine-scale));--ni-chevron-size-xl:calc(1.25rem*var(--mantine-scale));--ni-chevron-size:var(--ni-chevron-size-sm);display:flex;flex-direction:column;height:calc(var(--_input-height) - .125rem*var(--mantine-scale));margin-left:var(--_controls-ml,auto);margin-right:var(--_controls-mr,0);max-width:calc(var(--ni-chevron-size)*1.7);width:100%}[dir=rtl] .m-95e17d22{--_controls-ml:0;--_controls-mr:auto}.m-80b4b171{--_control-bd:calc(.0625rem*var(--mantine-scale)) solid var(--_input-bd);--_control-radius:calc(var(--_input-radius) - .0625rem*var(--mantine-scale));align-items:center;background-color:var(--_control-bg,transparent);border-left:var(--_control-bdl,var(--_control-bd));border-right:var(--_control-bdr,none);color:var(--mantine-color-text);display:flex;flex:0 0 50%;height:calc(var(--_input-height)/2 - .0625rem*var(--mantine-scale));justify-content:center;opacity:var(--_control-opacity,1);padding:0;pointer-events:var(--_control-pointer-events,auto);width:100%}.m-80b4b171:disabled{--_control-pointer-events:none;--_control-opacity:.4}[dir=rtl] .m-80b4b171{--_control-bdl:none;--_control-bdr:var(--_control-bd)}@media (hover:hover){[data-mantine-color-scheme=light] .m-80b4b171:hover{--_control-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-80b4b171:hover{--_control-bg:var(--mantine-color-dark-4)}}@media (hover:none){[data-mantine-color-scheme=light] .m-80b4b171:active{--_control-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-80b4b171:active{--_control-bg:var(--mantine-color-dark-4)}}.m-80b4b171:first-of-type{border-bottom:calc(.03125rem*var(--mantine-scale)) solid var(--_input-bd);border-radius:0 var(--_control-radius) 0 0}[dir=rtl] .m-80b4b171:first-of-type{border-radius:var(--_control-radius) 0 0 0}.m-80b4b171:last-of-type{border-radius:0 0 var(--_control-radius) 0;border-top:calc(.03125rem*var(--mantine-scale)) solid var(--_input-bd)}[dir=rtl] .m-80b4b171:last-of-type{border-radius:0 0 0 var(--_control-radius)}.m-4addd315{--pagination-control-size-xs:calc(1.375rem*var(--mantine-scale));--pagination-control-size-sm:calc(1.625rem*var(--mantine-scale));--pagination-control-size-md:calc(2rem*var(--mantine-scale));--pagination-control-size-lg:calc(2.375rem*var(--mantine-scale));--pagination-control-size-xl:calc(2.75rem*var(--mantine-scale));--pagination-control-size:var(--pagination-control-size-md);--pagination-control-fz:var(--mantine-font-size-md);--pagination-active-bg:var(--mantine-primary-color-filled)}.m-326d024a{align-items:center;background-color:var(--_control-bg-color);border:calc(.0625rem*var(--mantine-scale)) solid var(--_control-border-color);border-radius:var(--pagination-control-radius,var(--mantine-radius-default));color:var(--_control-color,var(--mantine-color-text));cursor:var(--_control-cursor,pointer);display:flex;font-size:var(--pagination-control-fz);height:var(--pagination-control-size);justify-content:center;line-height:1;min-width:var(--pagination-control-size);opacity:var(--_control-opacity,1);padding:var(--_control-padding,0)}.m-326d024a[data-with-padding]{--_control-padding:calc(var(--pagination-control-size)/4)}.m-326d024a:disabled,.m-326d024a[data-disabled]{--_control-cursor:not-allowed;--_control-opacity:.4}.m-326d024a[data-active]{--_control-bg-color:var(--pagination-active-bg)!important;--_control-border-color:var(--pagination-active-bg)!important;--_control-color:var(--mantine-color-white)}[data-mantine-color-scheme=light] .m-326d024a{--_control-border-color:var(--mantine-color-gray-4);--_control-bg-color:var(--mantine-color-white);--_control-bg-hover:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-326d024a{--_control-border-color:var(--mantine-color-dark-4);--_control-bg-color:var(--mantine-color-dark-6);--_control-bg-hover:var(--mantine-color-dark-5)}@media (hover:hover){.m-326d024a:hover:not(:disabled,[data-disabled]){--_control-bg-color:var(--_control-bg-hover)}}@media (hover:none){.m-326d024a:active:not(:disabled,[data-disabled]){--_control-bg-color:var(--_control-bg-hover)}}[dir=rtl] .m-326d024a>svg{transform:rotate(180deg)}.m-4ad7767d{align-items:center;display:flex;height:var(--pagination-control-size);justify-content:center;min-width:var(--pagination-control-size);pointer-events:none}.m-f61ca620{--psi-button-size-xs:calc(1.375rem*var(--mantine-scale));--psi-button-size-sm:calc(1.625rem*var(--mantine-scale));--psi-button-size-md:calc(1.75rem*var(--mantine-scale));--psi-button-size-lg:calc(2rem*var(--mantine-scale));--psi-button-size-xl:calc(2.5rem*var(--mantine-scale));--psi-icon-size-xs:calc(.75rem*var(--mantine-scale));--psi-icon-size-sm:calc(.9375rem*var(--mantine-scale));--psi-icon-size-md:calc(1.0625rem*var(--mantine-scale));--psi-icon-size-lg:calc(1.1875rem*var(--mantine-scale));--psi-icon-size-xl:calc(1.3125rem*var(--mantine-scale));--psi-button-size:var(--psi-button-size-sm);--psi-icon-size:var(--psi-icon-size-sm)}.m-ccf8da4c{overflow:hidden;position:relative}.m-f2d85dd2{background-color:transparent;border:0;color:inherit;font-family:var(--mantine-font-family);font-size:inherit;height:100%;top:0;right:0;bottom:0;left:0;line-height:var(--mantine-line-height);outline:0;padding-left:var(--_input-padding-left);padding-right:var(--_input-padding-right);position:absolute;width:100%}.m-ccf8da4c[data-disabled] .m-f2d85dd2,.m-f2d85dd2:disabled{cursor:not-allowed}.m-f2d85dd2::placeholder{color:var(--_input-placeholder-color);opacity:1}.m-b1072d44{height:var(--psi-button-size);min-height:var(--psi-button-size);min-width:var(--psi-button-size);width:var(--psi-button-size)}.m-b1072d44:disabled{display:none}.m-f1cb205a{--pin-input-size-xs:calc(1.875rem*var(--mantine-scale));--pin-input-size-sm:calc(2.25rem*var(--mantine-scale));--pin-input-size-md:calc(2.625rem*var(--mantine-scale));--pin-input-size-lg:calc(3.125rem*var(--mantine-scale));--pin-input-size-xl:calc(3.75rem*var(--mantine-scale));--pin-input-size:var(--pin-input-size-sm)}.m-cb288ead{height:var(--pin-input-size);width:var(--pin-input-size)}@keyframes m-81a374bd{0%{background-position:0 0}to{background-position:calc(2.5rem*var(--mantine-scale)) 0}}.m-db6d6462{--progress-radius:var(--mantine-radius-default);--progress-size-xs:calc(.1875rem*var(--mantine-scale));--progress-size-sm:calc(.3125rem*var(--mantine-scale));--progress-size-md:calc(.5rem*var(--mantine-scale));--progress-size-lg:calc(.75rem*var(--mantine-scale));--progress-size-xl:calc(1rem*var(--mantine-scale));--progress-size:var(--progress-size-md);background-color:var(--_track-bg);border-radius:var(--progress-radius);display:flex;height:var(--progress-size);overflow:hidden;position:relative}[data-mantine-color-scheme=light] .m-db6d6462{--_track-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-db6d6462{--_track-bg:var(--mantine-color-dark-4)}.m-2242eb65{align-items:center;animation:var(--_section-animation);background-color:var(--progress-section-color);background-image:var(--_section-gradient);background-size:calc(1.25rem*var(--mantine-scale)) calc(1.25rem*var(--mantine-scale));border-radius:var(--_section-radius);display:flex;height:100%;justify-content:center;overflow:hidden;width:var(--progress-section-width)}.m-2242eb65[data-striped]{--_section-gradient:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.m-2242eb65[data-animated]{--_section-animation:m-81a374bd 1s linear infinite}.m-2242eb65:last-of-type{--_section-radius:0 var(--progress-radius) var(--progress-radius) 0}.m-2242eb65:first-of-type,[dir=rtl] .m-2242eb65:last-of-type{--_section-radius:var(--progress-radius) 0 0 var(--progress-radius)}[dir=rtl] .m-2242eb65:first-of-type{--_section-radius:0 var(--progress-radius) var(--progress-radius) 0}.m-91e40b74{color:var(--mantine-color-white);font-size:min(calc(var(--progress-size)*.65),calc(1.125rem*var(--mantine-scale)));font-weight:700;line-height:1;overflow:hidden;padding-left:calc(.25rem*var(--mantine-scale));padding-right:calc(.25rem*var(--mantine-scale));text-overflow:ellipsis;-webkit-user-select:none;user-select:none;white-space:nowrap}.m-f3f1af94{--radio-size-xs:calc(1rem*var(--mantine-scale));--radio-size-sm:calc(1.25rem*var(--mantine-scale));--radio-size-md:calc(1.5rem*var(--mantine-scale));--radio-size-lg:calc(1.875rem*var(--mantine-scale));--radio-size-xl:calc(2.25rem*var(--mantine-scale));--radio-size:var(--radio-size-sm);--radio-icon-size-xs:calc(.375rem*var(--mantine-scale));--radio-icon-size-sm:calc(.5rem*var(--mantine-scale));--radio-icon-size-md:calc(.625rem*var(--mantine-scale));--radio-icon-size-lg:calc(.875rem*var(--mantine-scale));--radio-icon-size-xl:calc(1rem*var(--mantine-scale));--radio-icon-size:var(--radio-icon-size-sm);--radio-icon-color:var(--mantine-color-white)}.m-89c4f5e4{height:var(--radio-size);order:var(--_radio-order,1);position:relative;width:var(--radio-size)}.m-89c4f5e4[data-label-position=left]{--_radio-order:2}.m-f3ed6b2b{color:var(--_radio-icon-color,var(--radio-icon-color));height:var(--radio-icon-size);left:calc(50% - var(--radio-icon-size)/2);opacity:var(--_radio-icon-opacity,0);pointer-events:none;position:absolute;top:calc(50% - var(--radio-icon-size)/2);transform:var(--_radio-icon-transform,scale(.2) translateY(calc(.625rem*var(--mantine-scale))));transition:opacity .1s ease,transform .2s ease;width:var(--radio-icon-size)}.m-8a3dbb89{-webkit-tap-highlight-color:transparent;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--_radio-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_radio-bd-color);border-radius:var(--radio-radius,var(--radio-size));cursor:var(--_cursor,var(--mantine-cursor-type));display:flex;height:var(--radio-size);justify-content:center;margin:0;position:relative;transition-duration:.1s;transition-property:background-color,border-color;transition-timing-function:ease;width:var(--radio-size)}[data-mantine-color-scheme=light] .m-8a3dbb89{--_radio-bg:var(--mantine-color-white);--_radio-bd-color:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-8a3dbb89{--_radio-bg:var(--mantine-color-dark-6);--_radio-bd-color:var(--mantine-color-dark-4)}.m-8a3dbb89:checked{--_radio-bg:var(--radio-color,var(--mantine-primary-color-filled));--_radio-bd-color:var(--radio-color,var(--mantine-primary-color-filled))}.m-8a3dbb89:checked+.m-f3ed6b2b{--_radio-icon-opacity:1;--_radio-icon-transform:scale(1)}.m-8a3dbb89:disabled{--_cursor:not-allowed}[data-mantine-color-scheme=light] .m-8a3dbb89:disabled{--_radio-bg:var(--mantine-color-gray-1);--_radio-bd-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=light] .m-8a3dbb89:disabled+.m-f3ed6b2b{--_radio-icon-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-8a3dbb89:disabled{--_radio-bg:var(--mantine-color-dark-5);--_radio-bd-color:var(--mantine-color-dark-4)}[data-mantine-color-scheme=dark] .m-8a3dbb89:disabled+.m-f3ed6b2b{--_radio-icon-color:var(--mantine-color-dark-7)}.m-8a3dbb89[data-error]{--_radio-bd-color:var(--mantine-color-error)}.m-1bfe9d39+.m-f3ed6b2b{--_radio-icon-color:var(--radio-color)}[data-mantine-color-scheme] .m-1bfe9d39:checked:not(:disabled){--_radio-bg:transparent;--_radio-bd-color:var(--radio-color)}[data-mantine-color-scheme] .m-1bfe9d39:checked:not(:disabled)+.m-f3ed6b2b{--_radio-icon-color:var(--radio-color);--_radio-icon-opacity:1;--_radio-icon-transform:none}.m-f8d312f2{--rating-size-xs:calc(.875rem*var(--mantine-scale));--rating-size-sm:calc(1.125rem*var(--mantine-scale));--rating-size-md:calc(1.25rem*var(--mantine-scale));--rating-size-lg:calc(1.75rem*var(--mantine-scale));--rating-size-xl:calc(2rem*var(--mantine-scale));display:flex;pointer-events:var(--_pointer-events);width:max-content}.m-f8d312f2:has(input:disabled){--_pointer-events:none}.m-61734bb7{position:relative;transform:var(--_transform);transition:transform .1s ease;z-index:var(--_z-index)}.m-61734bb7[data-active]{--_z-index:1;--_transform:scale(1.1)}.m-5662a89a{stroke:var(--_star-color);fill:var(--_star-color);display:block;height:var(--rating-size);width:var(--rating-size)}[data-mantine-color-scheme=light] .m-5662a89a{--_star-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-5662a89a{--_star-color:var(--mantine-color-dark-3)}[data-mantine-color-scheme] .m-5662a89a[data-filled]{--_star-color:var(--rating-color)}.m-211007ba{-webkit-tap-highlight-color:transparent;height:0;opacity:0;overflow:hidden;position:absolute;white-space:nowrap;width:0}.m-211007ba:focus-visible+label{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.m-21342ee4{-webkit-tap-highlight-color:transparent;cursor:pointer;display:block;left:0;position:absolute;top:0;z-index:var(--rating-item-z-index,0)}.m-21342ee4[data-read-only]{cursor:default}.m-21342ee4:last-of-type{position:relative}.m-fae05d6a{clip-path:var(--rating-symbol-clip-path)}.m-b32e4812{position:relative}.m-b32e4812,.m-d43b5134{height:var(--rp-size);min-height:var(--rp-size);min-width:var(--rp-size);width:var(--rp-size)}.m-d43b5134{transform:rotate(-90deg)}.m-b1ca1fbf{stroke:var(--curve-color,var(--_curve-root-color))}[data-mantine-color-scheme=light] .m-b1ca1fbf{--_curve-root-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-b1ca1fbf{--_curve-root-color:var(--mantine-color-dark-4)}.m-b23f9dc4{left:var(--rp-label-offset);position:absolute;right:var(--rp-label-offset);top:50%;transform:translateY(-50%)}.m-1b3c8819{background-color:var(--_tooltip-bg);border-radius:var(--tooltip-radius,var(--mantine-radius-default));color:var(--tooltip-color,var(--_tooltip-color));font-size:var(--mantine-font-size-sm);padding:calc(var(--mantine-spacing-xs)/2) var(--mantine-spacing-xs);pointer-events:none;position:absolute;white-space:var(--_tooltip-white-space,nowrap)}[data-mantine-color-scheme=light] .m-1b3c8819{--_tooltip-bg:var(--tooltip-bg,var(--mantine-color-gray-9));--_tooltip-color:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-1b3c8819{--_tooltip-bg:var(--tooltip-bg,var(--mantine-color-gray-2));--_tooltip-color:var(--mantine-color-black)}.m-1b3c8819[data-multiline]{--_tooltip-white-space:normal}.m-f898399f{background-color:inherit;border:0;z-index:1}.m-cf365364{--sc-padding-xs:calc(.1875rem*var(--mantine-scale)) calc(.375rem*var(--mantine-scale));--sc-padding-sm:calc(.3125rem*var(--mantine-scale)) calc(.625rem*var(--mantine-scale));--sc-padding-md:calc(.4375rem*var(--mantine-scale)) calc(.875rem*var(--mantine-scale));--sc-padding-lg:calc(.5625rem*var(--mantine-scale)) calc(1rem*var(--mantine-scale));--sc-padding-xl:calc(.75rem*var(--mantine-scale)) calc(1.25rem*var(--mantine-scale));--sc-transition-duration:.2s;--sc-padding:var(--sc-padding-sm);--sc-transition-timing-function:ease;--sc-font-size:var(--mantine-font-size-sm);background-color:var(--_bg);border-radius:var(--sc-radius,var(--mantine-radius-default));display:var(--_display,inline-flex);flex-direction:var(--_flex-direction,row);overflow:hidden;padding:4px;position:relative;width:var(--_width,auto)}.m-cf365364[data-full-width]{--_display:flex}.m-cf365364[data-orientation=vertical]{--_display:flex;--_flex-direction:column;--_width:max-content}.m-cf365364[data-orientation=vertical][data-full-width]{--_width:auto}[data-mantine-color-scheme=light] .m-cf365364{--_bg:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m-cf365364{--_bg:var(--mantine-color-dark-8)}.m-9e182ccd{background-color:var(--_bg);border-radius:var(--sc-radius,var(--mantine-radius-default));box-shadow:var(--_box-shadow);display:block;height:var(--sc-indicator-height);position:absolute;transform:var(--sc-indicator-transform);transition:transform var(--sc-transition-duration) var(--sc-transition-timing-function),width var(--sc-transition-duration) var(--sc-transition-timing-function);width:var(--sc-indicator-width);z-index:1}[data-mantine-color-scheme=light] .m-9e182ccd{--_box-shadow:var(--sc-shadow,none);--_bg:var(--sc-color,var(--mantine-color-white))}[data-mantine-color-scheme=dark] .m-9e182ccd{--_box-shadow:none;--_bg:var(--sc-color,var(--mantine-color-dark-5))}.m-1738fcb2{-webkit-tap-highlight-color:transparent;border-radius:var(--sc-radius,var(--mantine-radius-default));color:var(--_color);cursor:var(--_cursor,pointer);display:block;font-size:var(--sc-font-size);font-weight:500;outline:var(--_outline,none);overflow:hidden;padding:var(--sc-padding);text-align:center;text-overflow:ellipsis;transition:color var(--sc-transition-duration) var(--sc-transition-timing-function);-webkit-user-select:none;user-select:none;white-space:nowrap}.m-1738fcb2[data-disabled],fieldset:disabled .m-1738fcb2{--_cursor:not-allowed}[data-mantine-color-scheme=light] .m-1738fcb2[data-disabled],[data-mantine-color-scheme=light] fieldset:disabled .m-1738fcb2{--_color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m-1738fcb2[data-disabled],[data-mantine-color-scheme=dark] fieldset:disabled .m-1738fcb2{--_color:var(--mantine-color-dark-3)}[data-mantine-color-scheme=light] .m-1738fcb2[data-active]{--_color:var(--sc-label-color,var(--mantine-color-black))}[data-mantine-color-scheme=dark] .m-1738fcb2[data-active]{--_color:var(--sc-label-color,var(--mantine-color-white))}@media (hover:hover){[data-mantine-color-scheme=light] .m-1738fcb2:not([data-disabled]):not([data-active]):hover{--_color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-1738fcb2:not([data-disabled]):not([data-active]):hover{--_color:var(--mantine-color-white)}}@media (hover:none){[data-mantine-color-scheme=light] .m-1738fcb2:not([data-disabled]):not([data-active]):active{--_color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-1738fcb2:not([data-disabled]):not([data-active]):active{--_color:var(--mantine-color-white)}}@media (hover:hover){[data-mantine-color-scheme=light] fieldset:disabled .m-1738fcb2:hover{--_color:var(--mantine-color-gray-5)!important}[data-mantine-color-scheme=dark] fieldset:disabled .m-1738fcb2:hover{--_color:var(--mantine-color-dark-3)!important}}@media (hover:none){[data-mantine-color-scheme=light] fieldset:disabled .m-1738fcb2:active{--_color:var(--mantine-color-gray-5)!important}[data-mantine-color-scheme=dark] fieldset:disabled .m-1738fcb2:active{--_color:var(--mantine-color-dark-3)!important}}[data-mantine-color-scheme=light] .m-1738fcb2{--_color:var(--mantine-color-gray-7)}[data-mantine-color-scheme=dark] .m-1738fcb2{--_color:var(--mantine-color-dark-1)}.m-1714d588{height:0;opacity:0;overflow:hidden;position:absolute;white-space:nowrap;width:0}.m-1714d588[data-focus-ring=auto]:focus:focus-visible+.m-1738fcb2{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-1714d588[data-focus-ring=always]:focus+.m-1738fcb2{--_outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-color-blue-filled)}.m-69686b9b{flex:1;position:relative;transition:border-color var(--sc-transition-duration) var(--sc-transition-timing-function);z-index:2}.m-69686b9b:before{background-color:var(--_separator-color);bottom:0;content:"";left:0;position:absolute;top:0;transition:background-color var(--sc-transition-duration) var(--sc-transition-timing-function);width:calc(.0625rem*var(--mantine-scale))}[dir=rtl] .m-69686b9b:before{left:auto;right:0}.m-69686b9b[data-orientation=vertical]:before{bottom:auto;height:calc(.0625rem*var(--mantine-scale));left:0;right:0;top:0;width:auto}[data-mantine-color-scheme=light] .m-69686b9b{--_separator-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-69686b9b{--_separator-color:var(--mantine-color-dark-4)}.m-69686b9b:first-of-type:before,[data-mantine-color-scheme] .m-69686b9b[data-active]+.m-69686b9b:before,[data-mantine-color-scheme] .m-69686b9b[data-active]:before{--_separator-color:transparent}.m-2415a157{display:grid;gap:var(--sg-spacing-y) var(--sg-spacing-x);grid-template-columns:repeat(var(--sg-cols),minmax(0,1fr))}@keyframes m-299c329c{0%,to{opacity:.4}50%{opacity:1}}.m-18320242{border-radius:var(--skeleton-radius,var(--mantine-radius-default));height:var(--skeleton-height,auto);position:relative;transform:translateZ(0);-webkit-transform:translateZ(0);width:var(--skeleton-width,100%)}.m-18320242[data-animate]:after{animation:m-299c329c 1.5s linear infinite}.m-18320242[data-visible]{overflow:hidden}.m-18320242[data-visible]:before{background-color:var(--mantine-color-body);content:"";top:0;right:0;bottom:0;left:0;position:absolute;z-index:10}.m-18320242[data-visible]:after{content:"";top:0;right:0;bottom:0;left:0;position:absolute;z-index:11}[data-mantine-color-scheme=light] .m-18320242[data-visible]:after{background-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-18320242[data-visible]:after{background-color:var(--mantine-color-dark-4)}.m-dd36362e{--slider-size-xs:calc(.25rem*var(--mantine-scale));--slider-size-sm:calc(.375rem*var(--mantine-scale));--slider-size-md:calc(.5rem*var(--mantine-scale));--slider-size-lg:calc(.625rem*var(--mantine-scale));--slider-size-xl:calc(.75rem*var(--mantine-scale));--slider-size:var(--slider-size-md);--slider-radius:calc(62.5rem*var(--mantine-scale));--slider-color:var(--mantine-primary-color-filled);-webkit-tap-highlight-color:transparent;align-items:center;display:flex;flex-direction:column;height:calc(var(--slider-size)*2);outline:none;padding-left:var(--slider-size);padding-right:var(--slider-size);position:relative;touch-action:none}[data-mantine-color-scheme=light] .m-dd36362e{--slider-track-bg:var(--mantine-color-gray-2);--slider-track-disabled-bg:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-dd36362e{--slider-track-bg:var(--mantine-color-dark-4);--slider-track-disabled-bg:var(--mantine-color-dark-3)}.m-c9357328{background-color:var(--_label-bg);border-radius:var(--mantine-radius-sm);color:var(--mantine-color-white);font-size:var(--mantine-font-size-xs);padding:calc(var(--mantine-spacing-xs)/2);pointer-events:none;position:absolute;top:calc(-2.25rem*var(--mantine-scale));touch-action:none;-webkit-user-select:none;user-select:none;white-space:nowrap}[data-mantine-color-scheme=light] .m-c9357328{--_label-bg:var(--mantine-color-gray-9)}[data-mantine-color-scheme=dark] .m-c9357328{--_label-bg:var(--mantine-color-dark-4)}.m-c9a9a60a{align-items:center;background-color:var(--_thumb-bg);border:calc(.25rem*var(--mantine-scale)) solid var(--_thumb-bd);border-radius:var(--slider-radius);box-shadow:var(--_thumb-box-shadow,none);color:var(--_thumb-bd);cursor:pointer;display:var(--_thumb-display,flex);height:var(--slider-thumb-size);justify-content:center;left:var(--slider-thumb-offset);outline-offset:calc(.125rem*var(--mantine-scale));position:absolute;top:50%;touch-action:none;transform:var(--_thumb-transform,translate(-50%,-50%));transition:box-shadow .1s ease,transform .1s ease;-webkit-user-select:none;user-select:none;width:var(--slider-thumb-size);z-index:3}[dir=rtl] .m-c9a9a60a{left:auto;right:calc(var(--slider-thumb-offset) - var(--slider-thumb-size))}.m-c9a9a60a[data-disabled],fieldset:disabled .m-c9a9a60a{--_thumb-display:none}.m-c9a9a60a[data-dragging]{--_thumb-transform:translate(-50%,-50%) scale(1.05);--_thumb-box-shadow:var(--mantine-shadow-sm)}[data-mantine-color-scheme=light] .m-c9a9a60a{--_thumb-bd:var(--slider-color);--_thumb-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m-c9a9a60a{--_thumb-bd:var(--mantine-color-white);--_thumb-bg:var(--slider-color)}.m-a8645c2{align-items:center;cursor:var(--_track-cursor,pointer);display:flex;height:calc(var(--slider-size)*2);width:100%}.m-a8645c2[data-disabled],fieldset:disabled .m-a8645c2{--_track-cursor:not-allowed}.m-c9ade57f{height:var(--slider-size);position:relative;width:100%}.m-c9ade57f[data-inverted]:not([data-disabled]){--_track-bg:var(--slider-color)}.m-c9ade57f[data-inverted][data-disabled],fieldset:disabled .m-c9ade57f[data-inverted]{--_track-bg:var(--slider-track-disabled-bg)}.m-c9ade57f:before{background-color:var(--_track-bg,var(--slider-track-bg));content:"";left:calc(var(--slider-size)*-1);right:calc(var(--slider-size)*-1);z-index:0}.m-38aeed47,.m-c9ade57f:before{border-radius:var(--slider-radius);bottom:0;position:absolute;top:0}.m-38aeed47{background-color:var(--_bar-bg,var(--slider-color));left:var(--slider-bar-offset);width:var(--slider-bar-width);z-index:1}[dir=rtl] .m-38aeed47{left:auto;right:var(--slider-bar-offset)}.m-38aeed47[data-inverted]{--_bar-bg:var(--slider-track-bg)}.m-38aeed47[data-disabled]:not([data-inverted]),fieldset:disabled .m-38aeed47:not([data-inverted]){--_bar-bg:var(--_bar-disabled-bg)}[data-mantine-color-scheme=light] .m-38aeed47{--_bar-disabled-bg:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-38aeed47{--_bar-disabled-bg:var(--mantine-color-dark-3)}.m-b7b0423a{height:0;left:calc(var(--mark-offset) - var(--slider-size)/2);pointer-events:none;position:absolute;top:0;z-index:2}[dir=rtl] .m-b7b0423a{left:unset;right:calc(var(--mark-offset) - var(--slider-size)/2)}.m-dd33bc19{background-color:var(--_mark-bg,var(--mantine-color-white));border:calc(.125rem*var(--mantine-scale)) solid var(--_mark-bd);border-radius:calc(62.5rem*var(--mantine-scale));height:var(--slider-size);pointer-events:none;transform:translate((calc(var(--slider-size)/-2)));width:var(--slider-size)}[data-mantine-color-scheme] .m-dd33bc19[data-filled]{--_mark-bd:var(--slider-color)}[data-mantine-color-scheme=light] .m-dd33bc19[data-filled][data-disabled]{--_mark-bd:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .m-dd33bc19[data-filled][data-disabled]{--_mark-bd:var(--mantine-color-dark-3)}[data-mantine-color-scheme=light] .m-dd33bc19{--_mark-bd:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-dd33bc19{--_mark-bd:var(--mantine-color-dark-4)}.m-68c77a5b{color:var(--_mark-label-color);cursor:pointer;font-size:var(--mantine-font-size-sm);transform:translate(calc(-50% + var(--slider-size)/2),calc(var(--mantine-spacing-xs)/2));-webkit-user-select:none;user-select:none;white-space:nowrap}[data-mantine-color-scheme=light] .m-68c77a5b{--_mark-label-color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .m-68c77a5b{--_mark-label-color:var(--mantine-color-dark-2)}.m-559cce2d{margin-bottom:var(--_spoiler-margin-bottom);position:relative}.m-559cce2d[data-has-spoiler]{--_spoiler-margin-bottom:calc(1.5rem*var(--mantine-scale))}.m-b912df4e{display:flex;flex-direction:column;overflow:hidden;transition:max-height var(--spoiler-transition-duration,.2s) ease}.m-b9131032{height:calc(1.5rem*var(--mantine-scale));left:0;position:absolute;top:100%}.m-6d731127{align-items:var(--stack-align,stretch);display:flex;flex-direction:column;gap:var(--stack-gap,var(--mantine-spacing-md));justify-content:var(--stack-justify,flex-start)}.m-cbb4ea7e{--stepper-icon-size-xs:calc(2.125rem*var(--mantine-scale));--stepper-icon-size-sm:calc(2.25rem*var(--mantine-scale));--stepper-icon-size-md:calc(2.625rem*var(--mantine-scale));--stepper-icon-size-lg:calc(3rem*var(--mantine-scale));--stepper-icon-size-xl:calc(3.25rem*var(--mantine-scale));--stepper-icon-size:var(--stepper-icon-size-md);--stepper-color:var(--mantine-primary-color-filled);--stepper-content-padding:var(--mantine-spacing-md);--stepper-spacing:var(--mantine-spacing-md);--stepper-radius:calc(62.5rem*var(--mantine-scale));--stepper-fz:var(--mantine-font-size-md)}.m-aaf89d0b{align-items:var(--_steps-align-items,center);display:flex;flex-direction:var(--_steps-direction);flex-wrap:var(--_steps-wrap,nowrap);gap:var(--_steps-gap)}.m-aaf89d0b[data-wrap]{--_steps-wrap:wrap;--_steps-gap:var(--mantine-spacing-md) 0}.m-aaf89d0b[data-orientation=vertical]{--_steps-direction:column}.m-aaf89d0b[data-orientation=vertical][data-icon-position=left]{--_steps-align-items:flex-start}.m-aaf89d0b[data-orientation=vertical][data-icon-position=right]{--_steps-align-items:flex-end}.m-aaf89d0b[data-orientation=horizontal]{--_steps-direction:row}.m-2a371ac9{--_separator-offset:calc(var(--stepper-icon-size)/2 - .0625rem*var(--mantine-scale));background-color:var(--_separator-bg);flex:1;height:var(--_separator-height);margin:var(--_separator-mt) var(--_separator-mr) var(--_separator-mb) var(--_separator-ml);transition:background-color .15s ease;width:var(--_separator-width)}[data-mantine-color-scheme=light] .m-2a371ac9{--_separator-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-2a371ac9{--_separator-bg:var(--mantine-color-dark-2)}.m-2a371ac9[data-active]{--_separator-bg:var(--stepper-color)}.m-2a371ac9[data-orientation=horizontal]{--_separator-height:calc(.125rem*var(--mantine-scale));--_separator-ml:var(--mantine-spacing-md);--_separator-mr:var(--mantine-spacing-md);--_separator-mt:0;--_separator-mb:0}.m-2a371ac9[data-orientation=vertical]{--_separator-width:calc(.125rem*var(--mantine-scale));--_separator-mt:calc(var(--mantine-spacing-xs)/2);--_separator-mb:calc(var(--mantine-spacing-xs) - .125rem*var(--mantine-scale))}.m-2a371ac9[data-orientation=vertical][data-icon-position=left]{--_separator-ml:var(--_separator-offset);--_separator-mr:0}.m-2a371ac9[data-orientation=vertical][data-icon-position=right],[dir=rtl] .m-2a371ac9[data-orientation=vertical][data-icon-position=left]{--_separator-ml:0;--_separator-mr:var(--_separator-offset)}[dir=rtl] .m-2a371ac9[data-orientation=vertical][data-icon-position=right]{--_separator-ml:var(--_separator-offset);--_separator-mr:0}.m-78da155d{padding-top:var(--stepper-content-padding)}.m-cbb57068{--_step-color:var(--step-color,var(--stepper-color));cursor:var(--_step-cursor,default);display:flex;flex-direction:var(--_step-direction)}.m-cbb57068[data-allow-click]{--_step-cursor:pointer}.m-cbb57068[data-icon-position=left]{--_step-direction:row}.m-cbb57068[data-icon-position=right]{--_step-direction:row-reverse}.m-f56b1e2c{align-items:center;flex-direction:var(--_step-direction)}.m-833edb7e{--_separator-spacing:calc(var(--mantine-spacing-xs)/2);justify-content:flex-start;margin-top:var(--_step-mt,var(--_separator-spacing));min-height:calc(var(--stepper-icon-size) + var(--mantine-spacing-xl) + var(--_separator-spacing));overflow:hidden}.m-833edb7e:first-of-type{--_step-mt:0}.m-833edb7e:last-of-type .m-6496b3f3{display:none}.m-818e70b{position:relative}.m-6496b3f3{border-left:calc(.125rem*var(--mantine-scale)) solid var(--_separator-border-color);height:100vh;left:calc(var(--stepper-icon-size)/2);position:absolute;top:calc(var(--stepper-icon-size) + var(--_separator-spacing))}[data-mantine-color-scheme=light] .m-6496b3f3{--_separator-border-color:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m-6496b3f3{--_separator-border-color:var(--mantine-color-dark-5)}[data-mantine-color-scheme] .m-6496b3f3[data-active]{--_separator-border-color:var(--stepper-color)}.m-1959ad01{align-items:center;background-color:var(--_step-icon-bg);border:calc(.125rem*var(--mantine-scale)) solid var(--_step-icon-border-color);border-radius:var(--stepper-radius);color:var(--_step-icon-color);display:flex;font-size:var(--stepper-fz);font-weight:700;height:var(--stepper-icon-size);justify-content:center;min-height:var(--stepper-icon-size);min-width:var(--stepper-icon-size);position:relative;transition:background-color .15s ease,border-color .15s ease;width:var(--stepper-icon-size)}[data-mantine-color-scheme=light] .m-1959ad01{--_step-icon-bg:var(--mantine-color-gray-1);--_step-icon-border-color:var(--mantine-color-gray-1);--_step-icon-color:var(--mantine-color-gray-7)}[data-mantine-color-scheme=dark] .m-1959ad01{--_step-icon-bg:var(--mantine-color-dark-5);--_step-icon-border-color:var(--mantine-color-dark-5);--_step-icon-color:var(--mantine-color-dark-1)}[data-mantine-color-scheme] .m-1959ad01[data-progress]{--_step-icon-border-color:var(--_step-color)}[data-mantine-color-scheme] .m-1959ad01[data-completed]{--_step-icon-color:var(--mantine-color-white);--_step-icon-bg:var(--_step-color);--_step-icon-border-color:var(--_step-color)}.m-a79331dc{align-items:center;color:var(--mantine-color-white);display:flex;top:0;right:0;bottom:0;left:0;justify-content:center;position:absolute}.m-1956aa2a{display:flex;flex-direction:column;margin-left:var(--_step-body-ml);margin-right:var(--_step-body-mr);margin-top:var(--_step-body-mt);text-align:var(--_step-body-ta)}.m-1956aa2a[data-icon-position=left]{--_step-body-ta:left;--_step-body-ml:var(--mantine-spacing-sm)}[dir=rtl] .m-1956aa2a[data-icon-position=left]{--_step-body-ta:right;--_step-body-ml:0;--_step-body-mr:var(--mantine-spacing-sm)}.m-1956aa2a[data-icon-position=right]{--_step-body-ta:right;--_step-body-mr:var(--mantine-spacing-sm)}[dir=rtl] .m-1956aa2a[data-icon-position=right]{--_step-body-ta:left;--_step-body-ml:var(--mantine-spacing-sm);--_step-body-mr:0}.m-12051f6c{font-size:var(--stepper-fz);font-weight:500;line-height:1}.m-164eea74{color:var(--mantine-color-dimmed);font-size:calc(var(--stepper-fz) - .125rem*var(--mantine-scale));line-height:1;margin-bottom:calc(var(--stepper-spacing)/3);margin-top:calc(var(--stepper-spacing)/3)}.m-5f93f3bb{--switch-height-xs:calc(1rem*var(--mantine-scale));--switch-height-sm:calc(1.25rem*var(--mantine-scale));--switch-height-md:calc(1.5rem*var(--mantine-scale));--switch-height-lg:calc(1.875rem*var(--mantine-scale));--switch-height-xl:calc(2.25rem*var(--mantine-scale));--switch-width-xs:calc(2rem*var(--mantine-scale));--switch-width-sm:calc(2.375rem*var(--mantine-scale));--switch-width-md:calc(2.875rem*var(--mantine-scale));--switch-width-lg:calc(3.5rem*var(--mantine-scale));--switch-width-xl:calc(4.5rem*var(--mantine-scale));--switch-thumb-size-xs:calc(.75rem*var(--mantine-scale));--switch-thumb-size-sm:calc(.875rem*var(--mantine-scale));--switch-thumb-size-md:calc(1.125rem*var(--mantine-scale));--switch-thumb-size-lg:calc(1.375rem*var(--mantine-scale));--switch-thumb-size-xl:calc(1.75rem*var(--mantine-scale));--switch-label-font-size-xs:calc(.3125rem*var(--mantine-scale));--switch-label-font-size-sm:calc(.375rem*var(--mantine-scale));--switch-label-font-size-md:calc(.4375rem*var(--mantine-scale));--switch-label-font-size-lg:calc(.5625rem*var(--mantine-scale));--switch-label-font-size-xl:calc(.6875rem*var(--mantine-scale));--switch-track-label-padding-xs:calc(.0625rem*var(--mantine-scale));--switch-track-label-padding-sm:calc(.125rem*var(--mantine-scale));--switch-track-label-padding-md:calc(.125rem*var(--mantine-scale));--switch-track-label-padding-lg:calc(.1875rem*var(--mantine-scale));--switch-track-label-padding-xl:calc(.1875rem*var(--mantine-scale));--switch-height:var(--switch-height-sm);--switch-width:var(--switch-width-sm);--switch-thumb-size:var(--switch-thumb-size-sm);--switch-label-font-size:var(--switch-label-font-size-sm);--switch-track-label-padding:var(--switch-track-label-padding-sm);--switch-radius:calc(62.5rem*var(--mantine-scale));--switch-color:var(--mantine-primary-color-filled);position:relative}.m-926b4011{height:0;opacity:0;padding:0;position:absolute;white-space:nowrap;width:0}.m-926b4011,.m-9307d992{margin:0;overflow:hidden}.m-9307d992{-webkit-tap-highlight-color:transparent;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--_switch-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_switch-bd);border-radius:var(--switch-radius);color:var(--_switch-color);cursor:var(--_switch-cursor,var(--mantine-cursor-type));display:flex;font-size:var(--switch-label-font-size);font-weight:600;height:var(--switch-height);line-height:0;min-width:var(--switch-width);order:var(--_switch-order,1);position:relative;transition:background-color .15s ease,border-color .15s ease;-webkit-user-select:none;user-select:none;z-index:0}.m-926b4011:focus-visible+.m-9307d992{outline:calc(.125rem*var(--mantine-scale)) solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem*var(--mantine-scale))}.m-926b4011:checked+.m-9307d992{--_switch-bg:var(--switch-color);--_switch-bd:var(--switch-color);--_switch-color:var(--mantine-color-white)}.m-926b4011:disabled+.m-9307d992,.m-926b4011[data-disabled]+.m-9307d992{--_switch-bg:var(--_switch-disabled-color);--_switch-bd:var(--_switch-disabled-color);--_switch-cursor:not-allowed}[data-mantine-color-scheme=light] .m-9307d992{--_switch-bg:var(--mantine-color-gray-2);--_switch-bd:var(--mantine-color-gray-3);--_switch-color:var(--mantine-color-gray-6);--_switch-disabled-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m-9307d992{--_switch-bg:var(--mantine-color-dark-6);--_switch-bd:var(--mantine-color-dark-4);--_switch-color:var(--mantine-color-dark-1);--_switch-disabled-color:var(--mantine-color-dark-4)}.m-9307d992[data-error]{--_switch-bd:var(--mantine-color-error)}.m-9307d992[data-label-position=left]{--_switch-order:2}.m-93039a1d{background-color:var(--_switch-thumb-bg,var(--mantine-color-white));border:calc(.0625rem*var(--mantine-scale)) solid var(--_switch-thumb-bd);border-radius:var(--switch-radius);display:flex;height:var(--switch-thumb-size);left:var(--_switch-thumb-left,var(--switch-track-label-padding));position:absolute;transition:left .15s ease;width:var(--switch-thumb-size);z-index:1}[dir=rtl] .m-93039a1d{left:unset;right:var(--_switch-thumb-left,var(--switch-track-label-padding));transition:right .15s ease}.m-93039a1d>*{margin:auto}.m-926b4011:checked+*>.m-93039a1d{--_switch-thumb-left:calc(100% - var(--switch-thumb-size) - var(--switch-track-label-padding));--_switch-thumb-bd:var(--mantine-color-white)}.m-926b4011:disabled+*>.m-93039a1d,.m-926b4011[data-disabled]+*>.m-93039a1d{--_switch-thumb-bd:var(--_switch-thumb-bg-disabled);--_switch-thumb-bg:var(--_switch-thumb-bg-disabled)}[data-mantine-color-scheme=light] .m-93039a1d{--_switch-thumb-bd:var(--mantine-color-gray-3);--_switch-thumb-bg-disabled:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-93039a1d{--_switch-thumb-bd:var(--mantine-color-white);--_switch-thumb-bg-disabled:var(--mantine-color-dark-3)}.m-8277e082{display:grid;height:100%;margin:0 0 0 calc(var(--switch-thumb-size) + var(--switch-track-label-padding));min-width:calc(var(--switch-width) - var(--switch-thumb-size));padding-inline:var(--switch-track-label-padding);place-content:center;transition:margin .15s ease}.m-926b4011:checked+*>.m-8277e082,[dir=rtl] .m-8277e082{margin:0 calc(var(--switch-thumb-size) + var(--switch-track-label-padding)) 0 0}[dir=rtl] .m-926b4011:checked+*>.m-8277e082{margin:0 0 0 calc(var(--switch-thumb-size) + var(--switch-track-label-padding))}.m-b23fa0ef{border:var(--_table-border,none);border-collapse:collapse;caption-side:var(--table-caption-side,bottom);font-size:var(--mantine-font-size-sm);line-height:var(--mantine-line-height);table-layout:var(--table-layout,auto);width:100%}[data-mantine-color-scheme=light] .m-b23fa0ef{--_table-hover-color:var(--table-highlight-on-hover-color,var(--mantine-color-gray-1));--_table-striped-color:var(--table-striped-color,var(--mantine-color-gray-0));--_table-border-color:var(--table-border-color,var(--mantine-color-gray-3))}[data-mantine-color-scheme=dark] .m-b23fa0ef{--_table-hover-color:var(--table-highlight-on-hover-color,var(--mantine-color-dark-5));--_table-striped-color:var(--table-striped-color,var(--mantine-color-dark-6));--_table-border-color:var(--table-border-color,var(--mantine-color-dark-4))}.m-b23fa0ef[data-with-table-border]{--_table-border:calc(.0625rem*var(--mantine-scale)) solid var(--_table-border-color)}.m-4e7aa4f3{text-align:var(--_th-text-align,left)}[dir=rtl] .m-4e7aa4f3{--_th-text-align:right}.m-4e7aa4fd{background-color:var(--_tr-bg,transparent);border-bottom:var(--_tr-border-bottom,none)}@media (hover:hover){[data-mantine-color-scheme] .m-4e7aa4fd:hover[data-hover]{--_tr-bg:var(--_tr-hover-bg)!important}}@media (hover:none){[data-mantine-color-scheme] .m-4e7aa4fd:active[data-hover]{--_tr-bg:var(--_tr-hover-bg)!important}}.m-4e7aa4fd[data-with-row-border]{--_tr-border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_table-border-color)}.m-4e7aa4ef,.m-4e7aa4f3{--_border-right:none;--_border-left:none;border-left:var(--_border-left);border-right:var(--_border-right);padding:var(--table-vertical-spacing) var(--table-horizontal-spacing,var(--mantine-spacing-xs))}.m-4e7aa4ef[data-with-column-border]:not(:last-child),.m-4e7aa4f3[data-with-column-border]:not(:last-child){--_border-right:calc(.0625rem*var(--mantine-scale)) solid var(--_table-border-color)}[dir=rtl] .m-4e7aa4ef[data-with-column-border]:not(:last-child),[dir=rtl] .m-4e7aa4f3[data-with-column-border]:not(:last-child){--_border-left:calc(.0625rem*var(--mantine-scale)) solid var(--_table-border-color);--_border-right:none}.m-b2404537>.m-4e7aa4fd:last-of-type[data-with-row-border]{--_tr-border-bottom:none}.m-b2404537>.m-4e7aa4fd[data-striped=even]:nth-of-type(2n),.m-b2404537>.m-4e7aa4fd[data-striped=odd]:nth-of-type(odd){--_tr-bg:var(--_table-striped-color)}.m-b2404537>.m-4e7aa4fd[data-hover]{--_tr-hover-bg:var(--_table-hover-color)}.m-b242d975{background-color:var(--_thead-bg,transparent);position:var(--_thead-position,static);top:var(--table-sticky-header-offset,0)}.m-b242d975[data-sticky]{--_thead-position:sticky;--_thead-bg:var(--mantine-color-body)}.m-9e5a3ac7{color:var(--mantine-color-dimmed);margin-bottom:var(--_margin-bottom,0);margin-top:var(--_margin-top,0)}.m-9e5a3ac7[data-side=top]{--_margin-bottom:var(--mantine-spacing-xs)}.m-9e5a3ac7[data-side=bottom]{--_margin-top:var(--mantine-spacing-xs)}.m-a100c15{overflow-x:var(--table-overflow)}.m-62259741{min-width:var(--table-min-width)}.m-89d60db1{--_tab-justify:flex-start;--_list-direction:row;--_panel-grow:unset;--_tabs-display:block;--_tabs-flex-direction:row;--_list-border-width:0;--_list-border-size:0 0 var(--_list-border-width) 0;--_list-gap:unset;--_list-line-bottom:0;--_list-line-top:unset;--_list-line-left:0;--_list-line-right:0;--_tab-radius:var(--tabs-radius) var(--tabs-radius) 0 0;--_tab-border-width:0 0 var(--_list-border-width) 0;display:var(--_tabs-display);flex-direction:var(--_tabs-flex-direction)}.m-89d60db1[data-inverted]{--_list-line-bottom:unset;--_list-line-top:0;--_tab-radius:0 0 var(--tabs-radius) var(--tabs-radius);--_tab-border-width:var(--_list-border-width) 0 0 0}.m-89d60db1[data-inverted] .m-576c9d4:before{bottom:unset;top:0}.m-89d60db1[data-orientation=vertical]{--_list-line-left:unset;--_list-line-right:0;--_list-line-top:0;--_list-line-bottom:0;--_list-border-size:0 var(--_list-border-width) 0 0;--_tab-border-width:0 var(--_list-border-width) 0 0;--_tab-radius:var(--tabs-radius) 0 0 var(--tabs-radius);--_list-direction:column;--_panel-grow:1;--_tabs-display:flex}[dir=rtl] .m-89d60db1[data-orientation=vertical]{--_list-line-left:0;--_list-line-right:unset;--_list-border-size:0 0 0 var(--_list-border-width);--_tab-border-width:0 0 0 var(--_list-border-width);--_tab-radius:0 var(--tabs-radius) var(--tabs-radius) 0}.m-89d60db1[data-orientation=vertical][data-placement=right]{--_tabs-flex-direction:row-reverse;--_list-line-left:0;--_list-line-right:unset;--_list-border-size:0 0 0 var(--_list-border-width);--_tab-border-width:0 0 0 var(--_list-border-width);--_tab-radius:0 var(--tabs-radius) var(--tabs-radius) 0}[dir=rtl] .m-89d60db1[data-orientation=vertical][data-placement=right]{--_list-line-left:unset;--_list-line-right:0;--_list-border-size:0 var(--_list-border-width) 0 0;--_tab-border-width:0 var(--_list-border-width) 0 0;--_tab-radius:var(--tabs-radius) 0 0 var(--tabs-radius)}[data-mantine-color-scheme=light] .m-89d60db1{--_tab-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-89d60db1{--_tab-border-color:var(--mantine-color-dark-4)}.m-89d60db1[data-orientation=horizontal]{--_tab-justify:center}.m-89d60db1[data-variant=default]{--_list-border-width:calc(.125rem*var(--mantine-scale))}[data-mantine-color-scheme=light] .m-89d60db1[data-variant=default]{--_tab-hover-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-89d60db1[data-variant=default]{--_tab-hover-color:var(--mantine-color-dark-6)}.m-89d60db1[data-variant=outline]{--_list-border-width:calc(.0625rem*var(--mantine-scale))}.m-89d60db1[data-variant=pills]{--_list-gap:calc(var(--mantine-spacing-sm)/2)}[data-mantine-color-scheme=light] .m-89d60db1[data-variant=pills]{--_tab-hover-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-89d60db1[data-variant=pills]{--_tab-hover-color:var(--mantine-color-dark-6)}.m-89d33d6d{--_tab-grow:unset;display:flex;flex-direction:var(--_list-direction);flex-wrap:wrap;gap:var(--_list-gap);justify-content:var(--tabs-justify,flex-start)}.m-89d33d6d[data-grow]{--_tab-grow:1}.m-b0c91715{flex-grow:var(--_panel-grow)}.m-4ec4dce6{align-items:center;display:flex;flex-grow:var(--_tab-grow);font-size:var(--mantine-font-size-sm);justify-content:var(--_tab-justify);line-height:1;padding:var(--mantine-spacing-xs) var(--mantine-spacing-md);position:relative;-webkit-user-select:none;user-select:none;white-space:nowrap;z-index:0}.m-4ec4dce6:disabled,.m-4ec4dce6[data-disabled]{cursor:not-allowed;opacity:.5}.m-4ec4dce6:focus{z-index:1}.m-fc420b1f{align-items:center;display:flex;justify-content:center;margin-left:var(--_tab-section-margin-left,0);margin-right:var(--_tab-section-margin-right,0)}.m-fc420b1f[data-position=left]:not(:only-child){--_tab-section-margin-right:var(--mantine-spacing-xs)}[dir=rtl] .m-fc420b1f[data-position=left]:not(:only-child){--_tab-section-margin-right:0rem;--_tab-section-margin-left:var(--mantine-spacing-xs)}.m-fc420b1f[data-position=right]:not(:only-child){--_tab-section-margin-left:var(--mantine-spacing-xs)}[dir=rtl] .m-fc420b1f[data-position=right]:not(:only-child){--_tab-section-margin-left:0rem;--_tab-section-margin-right:var(--mantine-spacing-xs)}.m-576c9d4{position:relative}.m-576c9d4:before{border-color:var(--_tab-border-color);border-style:solid;border-width:var(--_list-border-size);bottom:var(--_list-line-bottom);content:"";left:var(--_list-line-left);position:absolute;right:var(--_list-line-right);top:var(--_list-line-top)}.m-539e827b{--__tab-border-color:transparent;--_tab-bg:transparent;background-color:var(--_tab-bg);border-color:var(--__tab-border-color);border-radius:var(--_tab-radius);border-style:solid;border-width:var(--_tab-border-width)}.m-539e827b[data-active]{--__tab-border-color:var(--tabs-color)}@media (hover:hover){.m-539e827b:hover{--_tab-bg:var(--_tab-hover-color)}.m-539e827b:hover:not([data-active]){--__tab-border-color:var(--_tab-border-color)}}@media (hover:none){.m-539e827b:active{--_tab-bg:var(--_tab-hover-color)}.m-539e827b:active:not([data-active]){--__tab-border-color:var(--_tab-border-color)}}@media (hover:hover){.m-539e827b:disabled:hover,.m-539e827b[data-disabled]:hover{--_tab-bg:transparent}}@media (hover:none){.m-539e827b:disabled:active,.m-539e827b[data-disabled]:active{--_tab-bg:transparent}}.m-6772fbd5{position:relative}.m-6772fbd5:before{border-color:var(--_tab-border-color);border-style:solid;border-width:var(--_list-border-size);bottom:var(--_list-line-bottom);content:"";left:var(--_list-line-left);position:absolute;right:var(--_list-line-right);top:var(--_list-line-top)}.m-b59ab47c{--_tab-border-bottom-color:transparent;--_tab-border-top-color:transparent;--_tab-border-right-color:transparent;--_tab-border-left-color:transparent;border-color:transparent;border-bottom:calc(.0625rem*var(--mantine-scale)) solid var(--_tab-border-bottom-color);border-left:calc(.0625rem*var(--mantine-scale)) solid var(--_tab-border-left-color);border-radius:var(--_tab-radius);border-right:calc(.0625rem*var(--mantine-scale)) solid var(--_tab-border-right-color);border-top:calc(.0625rem*var(--mantine-scale)) solid var(--_tab-border-top-color)}.m-b59ab47c[data-active]{--_tab-border-top-color:var(--_tab-border-color);--_tab-border-left-color:var(--_tab-border-color);--_tab-border-right-color:var(--_tab-border-color);--_tab-border-bottom-color:var(--mantine-color-body)}.m-b59ab47c[data-active][data-inverted]{--_tab-border-bottom-color:var(--_tab-border-color);--_tab-border-top-color:var(--mantine-color-body)}.m-b59ab47c[data-active][data-orientation=vertical][data-placement=left]{--_tab-border-right-color:var(--mantine-color-body);--_tab-border-left-color:var(--_tab-border-color);--_tab-border-bottom-color:var(--_tab-border-color)}[dir=rtl] .m-b59ab47c[data-active][data-orientation=vertical][data-placement=left]{--_tab-border-right-color:var(--_tab-border-color);--_tab-border-left-color:var(--mantine-color-body)}.m-b59ab47c[data-active][data-orientation=vertical][data-placement=right]{--_tab-border-left-color:var(--mantine-color-body);--_tab-border-right-color:var(--_tab-border-color);--_tab-border-bottom-color:var(--_tab-border-color)}[dir=rtl] .m-b59ab47c[data-active][data-orientation=vertical][data-placement=right]{--_tab-border-left-color:var(--_tab-border-color);--_tab-border-right-color:var(--mantine-color-body)}.m-c3381914{--_tab-bg:transparent;--_tab-color:inherit;background-color:var(--_tab-bg);border-radius:var(--tabs-radius);color:var(--_tab-color)}@media (hover:hover){.m-c3381914:not([data-disabled]):hover{--_tab-bg:var(--_tab-hover-color)}}@media (hover:none){.m-c3381914:not([data-disabled]):active{--_tab-bg:var(--_tab-hover-color)}}.m-c3381914[data-active][data-active]{--_tab-bg:var(--tabs-color);--_tab-color:var(--mantine-color-white)}@media (hover:hover){.m-c3381914[data-active][data-active]:hover{--_tab-bg:var(--tabs-color)}}@media (hover:none){.m-c3381914[data-active][data-active]:active{--_tab-bg:var(--tabs-color)}}.m-7341320d{--ti-size-xs:calc(1.125rem*var(--mantine-scale));--ti-size-sm:calc(1.375rem*var(--mantine-scale));--ti-size-md:calc(1.75rem*var(--mantine-scale));--ti-size-lg:calc(2.125rem*var(--mantine-scale));--ti-size-xl:calc(2.75rem*var(--mantine-scale));--ti-size:var(--ti-size-md);align-items:center;background:var(--ti-bg,var(--mantine-primary-color-filled));border:var(--ti-bd,calc(.0625rem*var(--mantine-scale)) solid transparent);border-radius:var(--ti-radius,var(--mantine-radius-default));color:var(--ti-color,var(--mantine-color-white));display:inline-flex;height:var(--ti-size);justify-content:center;line-height:1;min-height:var(--ti-size);min-width:var(--ti-size);position:relative;-webkit-user-select:none;user-select:none;width:var(--ti-size)}.m-43657ece{--offset:calc(var(--tl-bullet-size)/2 + var(--tl-line-width)/2);--tl-bullet-size:calc(1.25rem*var(--mantine-scale));--tl-line-width:calc(.25rem*var(--mantine-scale));--tl-radius:calc(62.5rem*var(--mantine-scale));--tl-color:var(--mantine-primary-color-filled);padding-left:var(--_tl-pl,0);padding-right:var(--_tl-pr,0)}.m-43657ece[data-align=left]{--_tl-pl:var(--offset)}[dir=rtl] .m-43657ece[data-align=left]{--_tl-pl:0;--_tl-pr:var(--offset)}.m-43657ece[data-align=right]{--_tl-pr:var(--offset)}[dir=rtl] .m-43657ece[data-align=right]{--_tl-pl:var(--offset);--_tl-pr:0}.m-2ebe8099{font-weight:500;line-height:1;margin-bottom:calc(var(--mantine-spacing-xs)/2)}.m-436178ff{--item-border:var(--tl-line-width) var(--tli-border-style,solid) var(--_item-border-color);color:var(--mantine-color-text);margin-top:var(--_item-mt);padding-left:var(--_item-pl,0);padding-right:var(--_item-pr,0);position:relative;text-align:var(--_item-ta)}.m-436178ff:before{border-left:var(--_line-border-left,var(--item-border));border-right:var(--_line-border-right,0);bottom:calc(var(--mantine-spacing-xl)*-1);content:"";display:var(--_line-display,none);left:var(--_line-left,0);pointer-events:none;position:absolute;right:var(--_line-right,0);top:0}[dir=rtl] .m-436178ff:before{--_line-border-left:0;--_line-border-right:var(--item-border)}.m-43657ece[data-align=left] .m-436178ff:before{--_line-left:calc(var(--tl-line-width)*-1);--_line-right:auto}.m-43657ece[data-align=right] .m-436178ff:before,[dir=rtl] .m-43657ece[data-align=left] .m-436178ff:before{--_line-left:auto;--_line-right:calc(var(--tl-line-width)*-1)}[dir=rtl] .m-43657ece[data-align=right] .m-436178ff:before{--_line-left:calc(var(--tl-line-width)*-1);--_line-right:auto}.m-43657ece[data-align=left] .m-436178ff{--_item-pl:var(--offset);--_item-ta:left}[dir=rtl] .m-43657ece[data-align=left] .m-436178ff{--_item-pl:0;--_item-pr:var(--offset)}.m-43657ece[data-align=right] .m-436178ff{--_item-pr:var(--offset);--_item-ta:right}[dir=rtl] .m-43657ece[data-align=right] .m-436178ff{--_item-pl:var(--offset);--_item-pr:0}[data-mantine-color-scheme=light] .m-436178ff{--_item-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-436178ff{--_item-border-color:var(--mantine-color-dark-4)}[data-mantine-color-scheme] .m-436178ff[data-line-active]:before{border-color:var(--tli-color,var(--tl-color))}.m-436178ff:not(:last-of-type){--_line-display:block}.m-436178ff:not(:first-of-type){--_item-mt:var(--mantine-spacing-xl)}.m-8affcee1{align-items:center;background-color:var(--_bullet-bg-color,var(--mantine-color-body));border:var(--_bullet-border-width,var(--tl-line-width)) solid var(--_bullet-border-color);border-radius:var(--tli-radius,var(--tl-radius));color:var(--_bullet-color,var(--mantine-color-text));display:flex;height:var(--tl-bullet-size);justify-content:center;left:var(--_bullet-left,0);position:absolute;right:var(--_bullet-right,0);top:0;width:var(--tl-bullet-size)}[data-mantine-color-scheme=light] .m-8affcee1{--_bullet-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-8affcee1{--_bullet-border-color:var(--mantine-color-dark-4)}.m-43657ece[data-align=left] .m-8affcee1{--_bullet-left:calc(var(--tl-bullet-size)/2*-1 + var(--tl-line-width)/2*-1);--_bullet-right:auto}.m-43657ece[data-align=right] .m-8affcee1,[dir=rtl] .m-43657ece[data-align=left] .m-8affcee1{--_bullet-left:auto;--_bullet-right:calc(var(--tl-bullet-size)/2*-1 + var(--tl-line-width)/2*-1)}[dir=rtl] .m-43657ece[data-align=right] .m-8affcee1{--_bullet-left:calc(var(--tl-bullet-size)/2*-1 + var(--tl-line-width)/2*-1);--_bullet-right:auto}.m-8affcee1[data-with-child]{--_bullet-border-width:var(--tl-line-width)}[data-mantine-color-scheme=light] .m-8affcee1[data-with-child]{--_bullet-bg-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-8affcee1[data-with-child]{--_bullet-bg-color:var(--mantine-color-dark-4)}.m-8affcee1[data-active]{--_bullet-border-color:var(--tli-color,var(--tl-color));--_bullet-bg-color:var(--mantine-color-white);--_bullet-color:var(--mantine-color-white)}.m-8affcee1[data-active][data-with-child]{--_bullet-bg-color:var(--tli-color,var(--tl-color));--_bullet-color:var(--mantine-color-white)}.m-540e8f41{padding-left:var(--_body-pl,0);padding-right:var(--_body-pr,0);text-align:var(--_body-ta)}.m-43657ece[data-align=left] .m-540e8f41{--_body-pl:var(--offset);--_body-ta:left}[dir=rtl] .m-43657ece[data-align=left] .m-540e8f41{--_body-pl:0;--_body-pr:var(--offset);--_body-ta:right}.m-43657ece[data-align=right] .m-540e8f41{--_body-pr:var(--offset);--_body-ta:right}[dir=rtl] .m-43657ece[data-align=right] .m-540e8f41{--_body-pl:var(--offset);--_body-pr:0;--_body-ta:left}.m-8a5d1357{font-family:var(--mantine-font-family-headings);font-size:var(--title-fz);font-weight:var(--title-fw);line-height:var(--title-lh);margin:0}.m-d6493fad h1,.m-d6493fad h2,.m-d6493fad h3,.m-d6493fad h4,.m-d6493fad h5,.m-d6493fad h6{margin-bottom:var(--mantine-spacing-xs);margin-top:calc(var(--mantine-spacing-xl)*1.55)}.m-d6493fad h1{font-size:var(--mantine-h1-font-size);font-weight:var(--mantine-h1-font-weight);line-height:var(--mantine-h1-line-height)}.m-d6493fad h2{font-size:var(--mantine-h2-font-size);font-weight:var(--mantine-h2-font-weight);line-height:var(--mantine-h2-line-height)}.m-d6493fad h3{font-size:var(--mantine-h3-font-size);font-weight:var(--mantine-h3-font-weight);line-height:var(--mantine-h3-line-height)}.m-d6493fad h4{font-size:var(--mantine-h4-font-size);font-weight:var(--mantine-h4-font-weight);line-height:var(--mantine-h4-line-height)}.m-d6493fad h5{font-size:var(--mantine-h5-font-size);font-weight:var(--mantine-h5-font-weight);line-height:var(--mantine-h5-line-height)}.m-d6493fad h6{font-size:var(--mantine-h6-font-size);font-weight:var(--mantine-h6-font-weight);line-height:var(--mantine-h6-line-height)}.m-d6493fad img{margin-bottom:var(--mantine-spacing-xs);max-width:100%}.m-d6493fad p{margin-bottom:var(--mantine-spacing-lg);margin-top:0}[data-mantine-color-scheme=light] .m-d6493fad mark{background-color:var(--mantine-color-yellow-2);color:inherit}[data-mantine-color-scheme=dark] .m-d6493fad mark{background-color:var(--mantine-color-yellow-5);color:var(--mantine-color-black)}.m-d6493fad a{color:var(--mantine-color-anchor);text-decoration:none}@media (hover:hover){.m-d6493fad a:hover{text-decoration:underline}}@media (hover:none){.m-d6493fad a:active{text-decoration:underline}}.m-d6493fad hr{border:0;border-top:calc(.0625rem*var(--mantine-scale)) solid;margin-bottom:var(--mantine-spacing-md);margin-top:var(--mantine-spacing-md)}[data-mantine-color-scheme=light] .m-d6493fad hr{border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m-d6493fad hr{border-color:var(--mantine-color-dark-3)}.m-d6493fad pre{border-radius:var(--mantine-radius-sm);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);line-height:var(--mantine-line-height);margin:0;margin-bottom:var(--mantine-spacing-md);margin-top:var(--mantine-spacing-md);overflow-x:auto;padding:var(--mantine-spacing-xs)}[data-mantine-color-scheme=light] .m-d6493fad pre{background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-d6493fad pre{background-color:var(--mantine-color-dark-8)}.m-d6493fad pre code{background-color:transparent;border:0;border-radius:0;color:inherit;padding:0}.m-d6493fad kbd{--kbd-fz:calc(.75rem*var(--mantine-scale));--kbd-padding:calc(.1875rem*var(--mantine-scale)) calc(.3125rem*var(--mantine-scale));background-color:var(--_kbd-bg);border:calc(.0625rem*var(--mantine-scale)) solid var(--_kbd-border-color);border-bottom-width:calc(.1875rem*var(--mantine-scale));border-radius:var(--mantine-radius-sm);color:var(--_kbd-color);font-family:var(--mantine-font-family-monospace);font-size:var(--kbd-fz);font-weight:700;line-height:var(--mantine-line-height);padding:var(--kbd-padding)}[data-mantine-color-scheme=light] .m-d6493fad kbd{--_kbd-border-color:var(--mantine-color-gray-3);--_kbd-color:var(--mantine-color-gray-7);--_kbd-bg:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-d6493fad kbd{--_kbd-border-color:var(--mantine-color-dark-3);--_kbd-color:var(--mantine-color-dark-0);--_kbd-bg:var(--mantine-color-dark-5)}.m-d6493fad code{border-radius:var(--mantine-radius-sm);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);line-height:var(--mantine-line-height);padding:calc(.0625rem*var(--mantine-scale)) calc(.3125rem*var(--mantine-scale))}[data-mantine-color-scheme=light] .m-d6493fad code{background-color:var(--mantine-color-gray-0);color:var(--mantine-color-black)}[data-mantine-color-scheme=dark] .m-d6493fad code{background-color:var(--mantine-color-dark-5);color:var(--mantine-color-white)}.m-d6493fad,.m-d6493fad ol,.m-d6493fad ul{margin-bottom:var(--mantine-spacing-md);padding-left:calc(2.375rem*var(--mantine-scale))}.m-d6493fad li,.m-d6493fad ol li,.m-d6493fad ul li{margin-bottom:var(--mantine-spacing-xs)}.m-d6493fad table{border-collapse:collapse;caption-side:bottom;margin-bottom:var(--mantine-spacing-md);width:100%}.m-d6493fad table caption{color:var(--mantine-color-gray-6);font-size:var(--mantine-font-size-sm);margin-top:var(--mantine-spacing-xs)}.m-d6493fad table th{color:var(--mantine-color-gray-7);font-size:var(--mantine-font-size-sm);font-weight:700;padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm);text-align:left}.m-d6493fad table thead th{border-bottom:calc(.0625rem*var(--mantine-scale)) solid;border-color:var(--mantine-color-gray-3)}.m-d6493fad table tfoot th{border-top:calc(.0625rem*var(--mantine-scale)) solid;border-color:var(--mantine-color-gray-3)}.m-d6493fad table td{border-bottom:calc(.0625rem*var(--mantine-scale)) solid;border-color:var(--mantine-color-gray-3);font-size:var(--mantine-font-size-sm);padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm)}.m-d6493fad table tr:last-of-type td{border-bottom:0}.m-d6493fad blockquote{border-radius:var(--mantine-radius-sm);font-size:var(--mantine-font-size-lg);line-height:var(--mantine-line-height);margin:var(--mantine-spacing-md) 0;padding:var(--mantine-spacing-md) var(--mantine-spacing-lg)}[data-mantine-color-scheme=light] .m-d6493fad blockquote{background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m-d6493fad blockquote{background-color:var(--mantine-color-dark-8)}._nav_e4u95_1{height:64px;margin-top:20px}@media (max-width: 900px):{._nav_e4u95_1{max-width:100%;min-width:100%;width:100%}}._nav_e4u95_1{gap:2rem;align-items:"center"}._wrapper_e4u95_20{max-width:900px;border-radius:8px;margin:10px auto 0}._maincontainer_e4u95_31{display:flex;align-items:center;justify-content:space-between;flex-direction:row}@media (max-width: 500px){._network_e4u95_42{visibility:hidden}}._buttonContainer_e4u95_49{width:30px;height:30px;padding:2px;border-radius:4px,}._container_e4u95_59{display:flex;align-items:center;justify-content:center;flex-direction:row}._mode_e4u95_66{display:"flex";align-items:"center";justify-content:"center";flex-direction:"row"}._root_e4u95_76{position:"relative"}._icon_e4u95_83{pointer-events:"none";position:"absolute";z-index:1;top:3}._iconLight_e4u95_90{left:4}._iconDark_e4u95_95{right:4}._homeContainer_65xox_47{max-width:450px;margin:80px auto 0;border-radius:4px;border:1px solid #4a4a4a;box-shadow:0 1px 2px #1018280d}._formContainer_65xox_57{padding:20px}._heading_65xox_61{font-size:40px;background:#00ff00;background:-webkit-linear-gradient(to left,#6fa56f 0%,#00ffff 100%);background:-moz-linear-gradient(to left,#6b9c6b 0%,#00ffff 100%);background:linear-gradient(to left,#00ff00 0%,#00ffff 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;text-align:center;font-weight:750}._subHeading_65xox_73{font-size:16px;text-align:center}._inputContainer_65xox_78{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}._selectGroup_65xox_89{display:flex;align-items:center;justify-content:center}._btn_65xox_95{background-image:linear-gradient(to right,#1d976c 0%,#93f9b9 51%,#1d976c 100%);transition:.5s;background-size:200% auto;color:#fff}._btn_65xox_95:hover{background-position:right center;color:#fff;text-decoration:none}._helperText_65xox_113{font-size:16px}._successContainer_65xox_117{width:600px;margin:80px auto 0;border-radius:4px;border:1px solid #4a4a4a;box-shadow:0 1px 2px #1018280d}._copyContainer_65xox_127{display:flex;align-items:center;gap:20px}._goBack_65xox_133{margin-top:20px}._input_65xox_78{width:400px;cursor:pointer}@media screen and (max-width: 600px){._successContainer_65xox_117{width:100%}._copyContainer_65xox_127{flex-direction:column}._input_65xox_78{width:100%;cursor:pointer}._btn_65xox_95{width:100%}}._homeContainer_pcvo1_3{max-width:500px;margin:80px auto 0;border-radius:4px;border:1px solid #4a4a4a;background-color:#fff d}._formContainer_pcvo1_13{padding:20px;display:flex;align-items:center;justify-content:center;flex-direction:column}._heading_pcvo1_21{text-align:center;background:#00FF00;background:-webkit-linear-gradient(to left,#00FF00 0%,#00FFFF 100%);background:-moz-linear-gradient(to left,#00FF00 0%,#00FFFF 100%);background:linear-gradient(to left,#00FF00 0%,#00FFFF 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}._subHeading_pcvo1_31{font-size:15px;text-align:center}._loader_pcvo1_36{font-size:16px;text-align:center;font-weight:600}._btn_pcvo1_42{background-image:linear-gradient(to right,#1d976c 0%,#93f9b9 51%,#1d976c 100%);transition:.5s;background-size:200% auto;color:#fff;width:50%}._btn_pcvo1_42:hover{background-position:right center;color:#fff;text-decoration:none}._input_pcvo1_57{width:100%;cursor:pointer}._inputContainer_pcvo1_62{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}._accountContainer_1gsks_3{max-width:600px;margin:80px auto 0;border-radius:8px;background-color:#fff d}._formContainer_1gsks_15{padding:20px;display:flex;align-items:center;justify-content:center;flex-direction:column}._avatarContainer_1gsks_24{display:flex;align-items:center;justify-content:center;flex-direction:column}._balance_1gsks_32{font-size:30px;font-weight:700}._avatar_1gsks_24{height:60px;width:60px;margin-top:20px;margin-bottom:20px;border-radius:50%}._heading_1gsks_45{text-align:center;background:#00FF00;background:-webkit-linear-gradient(to left,#00FF00 0%,#00FFFF 100%);background:-moz-linear-gradient(to left,#00FF00 0%,#00FFFF 100%);background:linear-gradient(to left,#00FF00 0%,#00FFFF 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}._btn_1gsks_56{background-image:linear-gradient(to right,#1d976c 0%,#93f9b9 51%,#1d976c 100%);transition:.5s;background-size:200% auto;color:#fff}._btn_1gsks_56:hover{background-position:right center;color:#fff;text-decoration:none}._actionsContainer_1gsks_71{display:flex;align-items:center;justify-content:center;flex-direction:column}._balanceContainer_1gsks_79{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:5px}._actions_1gsks_71{margin-top:20px;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:20px;margin-bottom:20px} diff --git a/assets/nodecrypto-b53e1cbd.js b/assets/nodecrypto-de819dc3.js similarity index 80% rename from assets/nodecrypto-b53e1cbd.js rename to assets/nodecrypto-de819dc3.js index 75c98f2e..493db337 100644 --- a/assets/nodecrypto-b53e1cbd.js +++ b/assets/nodecrypto-de819dc3.js @@ -1 +1 @@ -import{a as r,c as n,d as y}from"./index-3dee7f48.js";const p=async t=>{const{content:s,publicKey:i,privateKey:o}=t,c=r.createPrivateKey({key:n({uncompressedPrivateKeyHex:o,compressedPublicKeyHex:i}),format:"jwk"}),e=r.createSign("SHA256");return e.write(y.Buffer.from(s)),e.end(),e.sign(c,"hex")};export{p as signWithApiKey}; +import{a as r,c as n,d as y}from"./index-0f097d8c.js";const p=async t=>{const{content:s,publicKey:i,privateKey:o}=t,c=r.createPrivateKey({key:n({uncompressedPrivateKeyHex:o,compressedPublicKeyHex:i}),format:"jwk"}),e=r.createSign("SHA256");return e.write(y.Buffer.from(s)),e.end(),e.sign(c,"hex")};export{p as signWithApiKey}; diff --git a/assets/webcrypto-83eb6fa6.js b/assets/webcrypto-f8fc69c2.js similarity index 94% rename from assets/webcrypto-83eb6fa6.js rename to assets/webcrypto-f8fc69c2.js index b5738d9c..e91e3419 100644 --- a/assets/webcrypto-83eb6fa6.js +++ b/assets/webcrypto-f8fc69c2.js @@ -1 +1 @@ -import{c,u as i}from"./index-3dee7f48.js";const y=async n=>{const{content:e,publicKey:s,privateKey:t}=n,o=await g({uncompressedPrivateKeyHex:t,compressedPublicKeyHex:s});return await l({key:o,content:e})};async function g(n){const{uncompressedPrivateKeyHex:e,compressedPublicKeyHex:s}=n,t=c({uncompressedPrivateKeyHex:e,compressedPublicKeyHex:s});return await crypto.subtle.importKey("jwk",t,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"])}async function l(n){const{key:e,content:s}=n,t=await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},e,new TextEncoder().encode(s)),o=u(new Uint8Array(t));return i(o)}function u(n){if(n.length%2!=0||n.length==0||n.length>132)throw new Error("Invalid IEEE P1363 signature encoding. Length: "+n.length);const e=a(n.subarray(0,n.length/2)),s=a(n.subarray(n.length/2,n.length));let t=0;const o=1+1+e.length+1+1+s.length;let r;return o>=128?(r=new Uint8Array(o+3),r[t++]=48,r[t++]=128+1,r[t++]=o):(r=new Uint8Array(o+2),r[t++]=48,r[t++]=o),r[t++]=2,r[t++]=e.length,r.set(e,t),t+=e.length,r[t++]=2,r[t++]=s.length,r.set(s,t),r}function a(n){let e=0;for(;e{const{content:e,publicKey:s,privateKey:t}=n,o=await g({uncompressedPrivateKeyHex:t,compressedPublicKeyHex:s});return await l({key:o,content:e})};async function g(n){const{uncompressedPrivateKeyHex:e,compressedPublicKeyHex:s}=n,t=c({uncompressedPrivateKeyHex:e,compressedPublicKeyHex:s});return await crypto.subtle.importKey("jwk",t,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"])}async function l(n){const{key:e,content:s}=n,t=await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},e,new TextEncoder().encode(s)),o=u(new Uint8Array(t));return i(o)}function u(n){if(n.length%2!=0||n.length==0||n.length>132)throw new Error("Invalid IEEE P1363 signature encoding. Length: "+n.length);const e=a(n.subarray(0,n.length/2)),s=a(n.subarray(n.length/2,n.length));let t=0;const o=1+1+e.length+1+1+s.length;let r;return o>=128?(r=new Uint8Array(o+3),r[t++]=48,r[t++]=128+1,r[t++]=o):(r=new Uint8Array(o+2),r[t++]=48,r[t++]=o),r[t++]=2,r[t++]=e.length,r.set(e,t),t+=e.length,r[t++]=2,r[t++]=s.length,r.set(s,t),r}function a(n){let e=0;for(;e - - + +