@paimaexample/explorer 0.3.43 → 0.3.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -273,7 +273,7 @@ Learn more: https://react.dev/warnings/version-mismatch`))})(),typeof Map=="func
273
273
  You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}od.createRoot=function(t,r){if(!F(t))throw Error("Target container is not a DOM element.");uR(t);var o=!1,s="",c=pT,d=hT,x=mT,T=null;return r!=null&&(r.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof r=="object"&&r!==null&&r.$$typeof===Pa&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
274
274
 
275
275
  let root = createRoot(domContainer);
276
- root.render(<App />);`),r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onUncaughtError!==void 0&&(c=r.onUncaughtError),r.onCaughtError!==void 0&&(d=r.onCaughtError),r.onRecoverableError!==void 0&&(x=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(T=r.unstable_transitionCallbacks)),r=WO(t,1,!1,null,null,o,s,c,d,x,T,null),t[qa]=r.current,L0(t),new rb(r)},od.hydrateRoot=function(t,r,o){if(!F(t))throw Error("Target container is not a DOM element.");uR(t),r===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var s=!1,c="",d=pT,x=hT,T=mT,z=null,Z=null;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onUncaughtError!==void 0&&(d=o.onUncaughtError),o.onCaughtError!==void 0&&(x=o.onCaughtError),o.onRecoverableError!==void 0&&(T=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(z=o.unstable_transitionCallbacks),o.formState!==void 0&&(Z=o.formState)),r=WO(t,1,!0,r,o??null,s,c,d,x,T,z,Z),r.context=eR(null),o=r.current,s=Qr(o),s=Me(s),c=Fa(s),c.callback=null,Na(o,c,s),o=s,r.current.lanes=o,ze(r,o),ao(r),t[qa]=r.current,L0(t),new Fh(r)},od.version="19.1.1",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),od}var tD;function D5(){return tD||(tD=1,FA.exports=N5()),FA.exports}var B5=D5(),U5=JM();function hd({isOpen:e,onClose:n,title:i,children:a,className:u,url:l}){je.useEffect(()=>{if(e){const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e]);const f=()=>{var h;l&&((h=globalThis==null?void 0:globalThis.open)==null||h.call(globalThis,l,"_blank","noopener,noreferrer"),n())};if(!e)return null;const p=ee.jsxDEV("div",{className:"modal-overlay",onClick:n,children:ee.jsxDEV("div",{className:`modal-content ${u}`,onClick:h=>h.stopPropagation(),children:[ee.jsxDEV("div",{className:"modal-header",children:[ee.jsxDEV("h2",{className:"modal-title",children:i},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:46,columnNumber:11},this),ee.jsxDEV("div",{className:"modal-header-actions",children:[l&&ee.jsxDEV("button",{className:"modal-open-new-window",onClick:f,"aria-label":"Open in new window",title:"Open in new window",type:"button",children:ee.jsxDEV("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee.jsxDEV("path",{d:"M18 13v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:67,columnNumber:19},this),ee.jsxDEV("polyline",{points:"15 3 21 3 21 9"},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:68,columnNumber:19},this),ee.jsxDEV("line",{x1:"10",y1:"14",x2:"21",y2:"3"},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:69,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:56,columnNumber:17},this)},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:49,columnNumber:15},this),ee.jsxDEV("button",{className:"modal-close",onClick:n,type:"button",children:"×"},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:73,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:47,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:45,columnNumber:9},this),ee.jsxDEV("div",{className:"modal-body",children:a},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:41,columnNumber:7},this)},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:40,columnNumber:5},this);return typeof document<"u"&&document.body?U5.createPortal(p,document.body):p}const Gl=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function M5(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Td(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Su(e,...n){if(!M5(e))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw new Error("Uint8Array expected of length "+n+", got length="+e.length)}function _5(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Td(e.outputLen),Td(e.blockLen)}function nc(e,n=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(n&&e.finished)throw new Error("Hash#digest() has already been called")}function WM(e,n){Su(e);const i=n.outputLen;if(e.length<i)throw new Error("digestInto() expects output buffer of length at least "+i)}function j5(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function rc(...e){for(let n=0;n<e.length;n++)e[n].fill(0)}function UA(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ao(e,n){return e<<32-n|e>>>n}const P5=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function L5(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function k5(e){for(let n=0;n<e.length;n++)e[n]=L5(e[n]);return e}const nD=P5?e=>e:k5;function $5(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function fg(e){return typeof e=="string"&&(e=$5(e)),Su(e),e}function q5(...e){let n=0;for(let a=0;a<e.length;a++){const u=e[a];Su(u),n+=u.length}const i=new Uint8Array(n);for(let a=0,u=0;a<e.length;a++){const l=e[a];i.set(l,u),u+=l.length}return i}let sS=class{};function e8(e){const n=a=>e().update(fg(a)).digest(),i=e();return n.outputLen=i.outputLen,n.blockLen=i.blockLen,n.create=()=>e(),n}function H5(e=32){if(Gl&&typeof Gl.getRandomValues=="function")return Gl.getRandomValues(new Uint8Array(e));if(Gl&&typeof Gl.randomBytes=="function")return Uint8Array.from(Gl.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const uS=BigInt(0),Sw=BigInt(1);function up(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function lS(e){if(!up(e))throw new Error("Uint8Array expected")}function Od(e,n){if(typeof n!="boolean")throw new Error(e+" boolean expected, got "+n)}function Om(e){const n=e.toString(16);return n.length&1?"0"+n:n}function t8(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?uS:BigInt("0x"+e)}const n8=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",z5=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function Rd(e){if(lS(e),n8)return e.toHex();let n="";for(let i=0;i<e.length;i++)n+=z5[e[i]];return n}const ia={_0:48,_9:57,A:65,F:70,a:97,f:102};function rD(e){if(e>=ia._0&&e<=ia._9)return e-ia._0;if(e>=ia.A&&e<=ia.F)return e-(ia.A-10);if(e>=ia.a&&e<=ia.f)return e-(ia.a-10)}function Xm(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(n8)return Uint8Array.fromHex(e);const n=e.length,i=n/2;if(n%2)throw new Error("hex string expected, got unpadded hex of length "+n);const a=new Uint8Array(i);for(let u=0,l=0;u<i;u++,l+=2){const f=rD(e.charCodeAt(l)),p=rD(e.charCodeAt(l+1));if(f===void 0||p===void 0){const h=e[l]+e[l+1];throw new Error('hex string expected, got non-hex character "'+h+'" at index '+l)}a[u]=f*16+p}return a}function wu(e){return t8(Rd(e))}function r8(e){return lS(e),t8(Rd(Uint8Array.from(e).reverse()))}function lp(e,n){return Xm(e.toString(16).padStart(n*2,"0"))}function i8(e,n){return lp(e,n).reverse()}function Oi(e,n,i){let a;if(typeof n=="string")try{a=Xm(n)}catch(l){throw new Error(e+" must be hex string or Uint8Array, cause: "+l)}else if(up(n))a=Uint8Array.from(n);else throw new Error(e+" must be hex string or Uint8Array");const u=a.length;if(typeof i=="number"&&u!==i)throw new Error(e+" of length "+i+" expected, got "+u);return a}function Zm(...e){let n=0;for(let a=0;a<e.length;a++){const u=e[a];lS(u),n+=u.length}const i=new Uint8Array(n);for(let a=0,u=0;a<e.length;a++){const l=e[a];i.set(l,u),u+=l.length}return i}const MA=e=>typeof e=="bigint"&&uS<=e;function cS(e,n,i){return MA(e)&&MA(n)&&MA(i)&&n<=e&&e<i}function Zl(e,n,i,a){if(!cS(n,i,a))throw new Error("expected valid "+e+": "+i+" <= n < "+a+", got "+n)}function V5(e){let n;for(n=0;e>uS;e>>=Sw,n+=1);return n}const dg=e=>(Sw<<BigInt(e))-Sw,_A=e=>new Uint8Array(e),iD=e=>Uint8Array.from(e);function G5(e,n,i){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof i!="function")throw new Error("hmacFn must be a function");let a=_A(e),u=_A(e),l=0;const f=()=>{a.fill(1),u.fill(0),l=0},p=(...A)=>i(u,a,...A),h=(A=_A(0))=>{u=p(iD([0]),A),a=p(),A.length!==0&&(u=p(iD([1]),A),a=p())},m=()=>{if(l++>=1e3)throw new Error("drbg: tried 1000 values");let A=0;const y=[];for(;A<n;){a=p();const I=a.slice();y.push(I),A+=a.length}return Zm(...y)};return(A,y)=>{f(),h(A);let I;for(;!(I=y(m()));)h();return f(),I}}const Q5={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||up(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,n)=>n.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function pg(e,n,i={}){const a=(u,l,f)=>{const p=Q5[l];if(typeof p!="function")throw new Error("invalid validator function");const h=e[u];if(!(f&&h===void 0)&&!p(h,e))throw new Error("param "+String(u)+" is invalid. Expected "+l+", got "+h)};for(const[u,l]of Object.entries(n))a(u,l,!1);for(const[u,l]of Object.entries(i))a(u,l,!0);return e}function oD(e){const n=new WeakMap;return(i,...a)=>{const u=n.get(i);if(u!==void 0)return u;const l=e(i,...a);return n.set(i,l),l}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ur=BigInt(0),vr=BigInt(1),vu=BigInt(2),Y5=BigInt(3),o8=BigInt(4),a8=BigInt(5),s8=BigInt(8);function Br(e,n){const i=e%n;return i>=Ur?i:n+i}function Ti(e,n,i){let a=e;for(;n-- >Ur;)a*=a,a%=i;return a}function Iw(e,n){if(e===Ur)throw new Error("invert: expected non-zero number");if(n<=Ur)throw new Error("invert: expected positive modulus, got "+n);let i=Br(e,n),a=n,u=Ur,l=vr;for(;i!==Ur;){const p=a/i,h=a%i,m=u-l*p;a=i,i=h,u=l,l=m}if(a!==vr)throw new Error("invert: does not exist");return Br(u,n)}function u8(e,n){const i=(e.ORDER+vr)/o8,a=e.pow(n,i);if(!e.eql(e.sqr(a),n))throw new Error("Cannot find square root");return a}function K5(e,n){const i=(e.ORDER-a8)/s8,a=e.mul(n,vu),u=e.pow(a,i),l=e.mul(n,u),f=e.mul(e.mul(l,vu),u),p=e.mul(l,e.sub(f,e.ONE));if(!e.eql(e.sqr(p),n))throw new Error("Cannot find square root");return p}function X5(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let n=e-vr,i=0;for(;n%vu===Ur;)n/=vu,i++;let a=vu;const u=fS(e);for(;aD(u,a)===1;)if(a++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(i===1)return u8;let l=u.pow(a,n);const f=(n+vr)/vu;return function(h,m){if(h.is0(m))return m;if(aD(h,m)!==1)throw new Error("Cannot find square root");let v=i,A=h.mul(h.ONE,l),y=h.pow(m,n),I=h.pow(m,f);for(;!h.eql(y,h.ONE);){if(h.is0(y))return h.ZERO;let R=1,U=h.sqr(y);for(;!h.eql(U,h.ONE);)if(R++,U=h.sqr(U),R===v)throw new Error("Cannot find square root");const F=vr<<BigInt(v-R-1),N=h.pow(A,F);v=R,A=h.sqr(N),y=h.mul(y,A),I=h.mul(I,N)}return I}}function Z5(e){return e%o8===Y5?u8:e%s8===a8?K5:X5(e)}const J5=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function W5(e){const n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},i=J5.reduce((a,u)=>(a[u]="function",a),n);return pg(e,i)}function e$(e,n,i){if(i<Ur)throw new Error("invalid exponent, negatives unsupported");if(i===Ur)return e.ONE;if(i===vr)return n;let a=e.ONE,u=n;for(;i>Ur;)i&vr&&(a=e.mul(a,u)),u=e.sqr(u),i>>=vr;return a}function l8(e,n,i=!1){const a=new Array(n.length).fill(i?e.ZERO:void 0),u=n.reduce((f,p,h)=>e.is0(p)?f:(a[h]=f,e.mul(f,p)),e.ONE),l=e.inv(u);return n.reduceRight((f,p,h)=>e.is0(p)?f:(a[h]=e.mul(f,a[h]),e.mul(f,p)),l),a}function aD(e,n){const i=(e.ORDER-vr)/vu,a=e.pow(n,i),u=e.eql(a,e.ONE),l=e.eql(a,e.ZERO),f=e.eql(a,e.neg(e.ONE));if(!u&&!l&&!f)throw new Error("invalid Legendre symbol result");return u?1:l?0:-1}function c8(e,n){n!==void 0&&Td(n);const i=n!==void 0?n:e.toString(2).length,a=Math.ceil(i/8);return{nBitLength:i,nByteLength:a}}function fS(e,n,i=!1,a={}){if(e<=Ur)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:u,nByteLength:l}=c8(e,n);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let f;const p=Object.freeze({ORDER:e,isLE:i,BITS:u,BYTES:l,MASK:dg(u),ZERO:Ur,ONE:vr,create:h=>Br(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return Ur<=h&&h<e},is0:h=>h===Ur,isOdd:h=>(h&vr)===vr,neg:h=>Br(-h,e),eql:(h,m)=>h===m,sqr:h=>Br(h*h,e),add:(h,m)=>Br(h+m,e),sub:(h,m)=>Br(h-m,e),mul:(h,m)=>Br(h*m,e),pow:(h,m)=>e$(p,h,m),div:(h,m)=>Br(h*Iw(m,e),e),sqrN:h=>h*h,addN:(h,m)=>h+m,subN:(h,m)=>h-m,mulN:(h,m)=>h*m,inv:h=>Iw(h,e),sqrt:a.sqrt||(h=>(f||(f=Z5(e)),f(p,h))),toBytes:h=>i?i8(h,l):lp(h,l),fromBytes:h=>{if(h.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+h.length);return i?r8(h):wu(h)},invertBatch:h=>l8(p,h),cmov:(h,m,v)=>v?m:h});return Object.freeze(p)}function f8(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const n=e.toString(2).length;return Math.ceil(n/8)}function d8(e){const n=f8(e);return n+Math.ceil(n/2)}function t$(e,n,i=!1){const a=e.length,u=f8(n),l=d8(n);if(a<16||a<l||a>1024)throw new Error("expected "+l+"-1024 bytes of input, got "+a);const f=i?r8(e):wu(e),p=Br(f,n-vr)+vr;return i?i8(p,u):lp(p,u)}function n$(e,n,i,a){if(typeof e.setBigUint64=="function")return e.setBigUint64(n,i,a);const u=BigInt(32),l=BigInt(4294967295),f=Number(i>>u&l),p=Number(i&l),h=a?4:0,m=a?0:4;e.setUint32(n+h,f,a),e.setUint32(n+m,p,a)}function r$(e,n,i){return e&n^~e&i}function i$(e,n,i){return e&n^e&i^n&i}class o$ extends sS{constructor(n,i,a,u){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=n,this.outputLen=i,this.padOffset=a,this.isLE=u,this.buffer=new Uint8Array(n),this.view=UA(this.buffer)}update(n){nc(this),n=fg(n),Su(n);const{view:i,buffer:a,blockLen:u}=this,l=n.length;for(let f=0;f<l;){const p=Math.min(u-this.pos,l-f);if(p===u){const h=UA(n);for(;u<=l-f;f+=u)this.process(h,f);continue}a.set(n.subarray(f,f+p),this.pos),this.pos+=p,f+=p,this.pos===u&&(this.process(i,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){nc(this),WM(n,this),this.finished=!0;const{buffer:i,view:a,blockLen:u,isLE:l}=this;let{pos:f}=this;i[f++]=128,rc(this.buffer.subarray(f)),this.padOffset>u-f&&(this.process(a,0),f=0);for(let A=f;A<u;A++)i[A]=0;n$(a,u-8,BigInt(this.length*8),l),this.process(a,0);const p=UA(n),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const m=h/4,v=this.get();if(m>v.length)throw new Error("_sha2: outputLen bigger than state");for(let A=0;A<m;A++)p.setUint32(4*A,v[A],l)}digest(){const{buffer:n,outputLen:i}=this;this.digestInto(n);const a=n.slice(0,i);return this.destroy(),a}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:i,buffer:a,length:u,finished:l,destroyed:f,pos:p}=this;return n.destroyed=f,n.finished=l,n.length=u,n.pos=p,u%i&&n.buffer.set(a),n}clone(){return this._cloneInto()}}const os=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Rm=BigInt(2**32-1),sD=BigInt(32);function a$(e,n=!1){return n?{h:Number(e&Rm),l:Number(e>>sD&Rm)}:{h:Number(e>>sD&Rm)|0,l:Number(e&Rm)|0}}function s$(e,n=!1){const i=e.length;let a=new Uint32Array(i),u=new Uint32Array(i);for(let l=0;l<i;l++){const{h:f,l:p}=a$(e[l],n);[a[l],u[l]]=[f,p]}return[a,u]}const u$=(e,n,i)=>e<<i|n>>>32-i,l$=(e,n,i)=>n<<i|e>>>32-i,c$=(e,n,i)=>n<<i-32|e>>>64-i,f$=(e,n,i)=>e<<i-32|n>>>64-i,d$=Uint32Array.from([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]),as=new Uint32Array(64);class p$ extends o${constructor(n=32){super(64,n,8,!1),this.A=os[0]|0,this.B=os[1]|0,this.C=os[2]|0,this.D=os[3]|0,this.E=os[4]|0,this.F=os[5]|0,this.G=os[6]|0,this.H=os[7]|0}get(){const{A:n,B:i,C:a,D:u,E:l,F:f,G:p,H:h}=this;return[n,i,a,u,l,f,p,h]}set(n,i,a,u,l,f,p,h){this.A=n|0,this.B=i|0,this.C=a|0,this.D=u|0,this.E=l|0,this.F=f|0,this.G=p|0,this.H=h|0}process(n,i){for(let A=0;A<16;A++,i+=4)as[A]=n.getUint32(i,!1);for(let A=16;A<64;A++){const y=as[A-15],I=as[A-2],R=Ao(y,7)^Ao(y,18)^y>>>3,U=Ao(I,17)^Ao(I,19)^I>>>10;as[A]=U+as[A-7]+R+as[A-16]|0}let{A:a,B:u,C:l,D:f,E:p,F:h,G:m,H:v}=this;for(let A=0;A<64;A++){const y=Ao(p,6)^Ao(p,11)^Ao(p,25),I=v+y+r$(p,h,m)+d$[A]+as[A]|0,U=(Ao(a,2)^Ao(a,13)^Ao(a,22))+i$(a,u,l)|0;v=m,m=h,h=p,p=f+I|0,f=l,l=u,u=a,a=I+U|0}a=a+this.A|0,u=u+this.B|0,l=l+this.C|0,f=f+this.D|0,p=p+this.E|0,h=h+this.F|0,m=m+this.G|0,v=v+this.H|0,this.set(a,u,l,f,p,h,m,v)}roundClean(){rc(as)}destroy(){this.set(0,0,0,0,0,0,0,0),rc(this.buffer)}}const p8=e8(()=>new p$);class h8 extends sS{constructor(n,i){super(),this.finished=!1,this.destroyed=!1,_5(n);const a=fg(i);if(this.iHash=n.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 u=this.blockLen,l=new Uint8Array(u);l.set(a.length>u?n.create().update(a).digest():a);for(let f=0;f<l.length;f++)l[f]^=54;this.iHash.update(l),this.oHash=n.create();for(let f=0;f<l.length;f++)l[f]^=106;this.oHash.update(l),rc(l)}update(n){return nc(this),this.iHash.update(n),this}digestInto(n){nc(this),Su(n,this.outputLen),this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||(n=Object.create(Object.getPrototypeOf(this),{}));const{oHash:i,iHash:a,finished:u,destroyed:l,blockLen:f,outputLen:p}=this;return n=n,n.finished=u,n.destroyed=l,n.blockLen=f,n.outputLen=p,n.oHash=i._cloneInto(n.oHash),n.iHash=a._cloneInto(n.iHash),n}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const m8=(e,n,i)=>new h8(e,n).update(i).digest();m8.create=(e,n)=>new h8(e,n);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const uD=BigInt(0),Cw=BigInt(1);function jA(e,n){const i=n.negate();return e?i:n}function g8(e,n){if(!Number.isSafeInteger(e)||e<=0||e>n)throw new Error("invalid window size, expected [1.."+n+"], got W="+e)}function PA(e,n){g8(e,n);const i=Math.ceil(n/e)+1,a=2**(e-1),u=2**e,l=dg(e),f=BigInt(e);return{windows:i,windowSize:a,mask:l,maxNumber:u,shiftBy:f}}function lD(e,n,i){const{windowSize:a,mask:u,maxNumber:l,shiftBy:f}=i;let p=Number(e&u),h=e>>f;p>a&&(p-=l,h+=Cw);const m=n*a,v=m+Math.abs(p)-1,A=p===0,y=p<0,I=n%2!==0;return{nextN:h,offset:v,isZero:A,isNeg:y,isNegF:I,offsetF:m}}function h$(e,n){if(!Array.isArray(e))throw new Error("array expected");e.forEach((i,a)=>{if(!(i instanceof n))throw new Error("invalid point at index "+a)})}function m$(e,n){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((i,a)=>{if(!n.isValid(i))throw new Error("invalid scalar at index "+a)})}const LA=new WeakMap,y8=new WeakMap;function kA(e){return y8.get(e)||1}function g$(e,n){return{constTimeNegate:jA,hasPrecomputes(i){return kA(i)!==1},unsafeLadder(i,a,u=e.ZERO){let l=i;for(;a>uD;)a&Cw&&(u=u.add(l)),l=l.double(),a>>=Cw;return u},precomputeWindow(i,a){const{windows:u,windowSize:l}=PA(a,n),f=[];let p=i,h=p;for(let m=0;m<u;m++){h=p,f.push(h);for(let v=1;v<l;v++)h=h.add(p),f.push(h);p=h.double()}return f},wNAF(i,a,u){let l=e.ZERO,f=e.BASE;const p=PA(i,n);for(let h=0;h<p.windows;h++){const{nextN:m,offset:v,isZero:A,isNeg:y,isNegF:I,offsetF:R}=lD(u,h,p);u=m,A?f=f.add(jA(I,a[R])):l=l.add(jA(y,a[v]))}return{p:l,f}},wNAFUnsafe(i,a,u,l=e.ZERO){const f=PA(i,n);for(let p=0;p<f.windows&&u!==uD;p++){const{nextN:h,offset:m,isZero:v,isNeg:A}=lD(u,p,f);if(u=h,!v){const y=a[m];l=l.add(A?y.negate():y)}}return l},getPrecomputes(i,a,u){let l=LA.get(a);return l||(l=this.precomputeWindow(a,i),i!==1&&LA.set(a,u(l))),l},wNAFCached(i,a,u){const l=kA(i);return this.wNAF(l,this.getPrecomputes(l,i,u),a)},wNAFCachedUnsafe(i,a,u,l){const f=kA(i);return f===1?this.unsafeLadder(i,a,l):this.wNAFUnsafe(f,this.getPrecomputes(f,i,u),a,l)},setWindowSize(i,a){g8(a,n),y8.set(i,a),LA.delete(i)}}}function y$(e,n,i,a){h$(i,e),m$(a,n);const u=i.length,l=a.length;if(u!==l)throw new Error("arrays of points and scalars must have equal length");const f=e.ZERO,p=V5(BigInt(u));let h=1;p>12?h=p-3:p>4?h=p-2:p>0&&(h=2);const m=dg(h),v=new Array(Number(m)+1).fill(f),A=Math.floor((n.BITS-1)/h)*h;let y=f;for(let I=A;I>=0;I-=h){v.fill(f);for(let U=0;U<l;U++){const F=a[U],N=Number(F>>BigInt(I)&m);v[N]=v[N].add(i[U])}let R=f;for(let U=v.length-1,F=f;U>0;U--)F=F.add(v[U]),R=R.add(F);if(y=y.add(R),I!==0)for(let U=0;U<h;U++)y=y.double()}return y}function b8(e){return W5(e.Fp),pg(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...c8(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function cD(e){e.lowS!==void 0&&Od("lowS",e.lowS),e.prehash!==void 0&&Od("prehash",e.prehash)}function b$(e){const n=b8(e);pg(n,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:i,Fp:a,a:u}=n;if(i){if(!a.eql(u,a.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof i!="object"||typeof i.beta!="bigint"||typeof i.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...n})}class A$ extends Error{constructor(n=""){super(n)}}const ua={Err:A$,_tlv:{encode:(e,n)=>{const{Err:i}=ua;if(e<0||e>256)throw new i("tlv.encode: wrong tag");if(n.length&1)throw new i("tlv.encode: unpadded data");const a=n.length/2,u=Om(a);if(u.length/2&128)throw new i("tlv.encode: long form length too big");const l=a>127?Om(u.length/2|128):"";return Om(e)+l+u+n},decode(e,n){const{Err:i}=ua;let a=0;if(e<0||e>256)throw new i("tlv.encode: wrong tag");if(n.length<2||n[a++]!==e)throw new i("tlv.decode: wrong tlv");const u=n[a++],l=!!(u&128);let f=0;if(!l)f=u;else{const h=u&127;if(!h)throw new i("tlv.decode(long): indefinite length not supported");if(h>4)throw new i("tlv.decode(long): byte length is too big");const m=n.subarray(a,a+h);if(m.length!==h)throw new i("tlv.decode: length bytes not complete");if(m[0]===0)throw new i("tlv.decode(long): zero leftmost byte");for(const v of m)f=f<<8|v;if(a+=h,f<128)throw new i("tlv.decode(long): not minimal encoding")}const p=n.subarray(a,a+f);if(p.length!==f)throw new i("tlv.decode: wrong value length");return{v:p,l:n.subarray(a+f)}}},_int:{encode(e){const{Err:n}=ua;if(e<fa)throw new n("integer: negative integers are not allowed");let i=Om(e);if(Number.parseInt(i[0],16)&8&&(i="00"+i),i.length&1)throw new n("unexpected DER parsing assertion: unpadded hex");return i},decode(e){const{Err:n}=ua;if(e[0]&128)throw new n("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new n("invalid signature integer: unnecessary leading zero");return wu(e)}},toSig(e){const{Err:n,_int:i,_tlv:a}=ua,u=Oi("signature",e),{v:l,l:f}=a.decode(48,u);if(f.length)throw new n("invalid signature: left bytes after parsing");const{v:p,l:h}=a.decode(2,l),{v:m,l:v}=a.decode(2,h);if(v.length)throw new n("invalid signature: left bytes after parsing");return{r:i.decode(p),s:i.decode(m)}},hexFromSig(e){const{_tlv:n,_int:i}=ua,a=n.encode(2,i.encode(e.r)),u=n.encode(2,i.encode(e.s)),l=a+u;return n.encode(48,l)}};function $A(e,n){return Rd(lp(e,n))}const fa=BigInt(0),Dn=BigInt(1);BigInt(2);const qA=BigInt(3),v$=BigInt(4);function x$(e){const n=b$(e),{Fp:i}=n,a=fS(n.n,n.nBitLength),u=n.toBytes||((M,H,k)=>{const X=H.toAffine();return Zm(Uint8Array.from([4]),i.toBytes(X.x),i.toBytes(X.y))}),l=n.fromBytes||(M=>{const H=M.subarray(1),k=i.fromBytes(H.subarray(0,i.BYTES)),X=i.fromBytes(H.subarray(i.BYTES,2*i.BYTES));return{x:k,y:X}});function f(M){const{a:H,b:k}=n,X=i.sqr(M),re=i.mul(X,M);return i.add(i.add(re,i.mul(M,H)),k)}function p(M,H){const k=i.sqr(H),X=f(M);return i.eql(k,X)}if(!p(n.Gx,n.Gy))throw new Error("bad curve params: generator point");const h=i.mul(i.pow(n.a,qA),v$),m=i.mul(i.sqr(n.b),BigInt(27));if(i.is0(i.add(h,m)))throw new Error("bad curve params: a or b");function v(M){return cS(M,Dn,n.n)}function A(M){const{allowedPrivateKeyLengths:H,nByteLength:k,wrapPrivateKey:X,n:re}=n;if(H&&typeof M!="bigint"){if(up(M)&&(M=Rd(M)),typeof M!="string"||!H.includes(M.length))throw new Error("invalid private key");M=M.padStart(k*2,"0")}let ie;try{ie=typeof M=="bigint"?M:wu(Oi("private key",M,k))}catch{throw new Error("invalid private key, expected hex or "+k+" bytes, got "+typeof M)}return X&&(ie=Br(ie,re)),Zl("private key",ie,Dn,re),ie}function y(M){if(!(M instanceof U))throw new Error("ProjectivePoint expected")}const I=oD((M,H)=>{const{px:k,py:X,pz:re}=M;if(i.eql(re,i.ONE))return{x:k,y:X};const ie=M.is0();H==null&&(H=ie?i.ONE:i.inv(re));const O=i.mul(k,H),P=i.mul(X,H),L=i.mul(re,H);if(ie)return{x:i.ZERO,y:i.ZERO};if(!i.eql(L,i.ONE))throw new Error("invZ was invalid");return{x:O,y:P}}),R=oD(M=>{if(M.is0()){if(n.allowInfinityPoint&&!i.is0(M.py))return;throw new Error("bad point: ZERO")}const{x:H,y:k}=M.toAffine();if(!i.isValid(H)||!i.isValid(k))throw new Error("bad point: x or y not FE");if(!p(H,k))throw new Error("bad point: equation left != right");if(!M.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class U{constructor(H,k,X){if(H==null||!i.isValid(H))throw new Error("x required");if(k==null||!i.isValid(k)||i.is0(k))throw new Error("y required");if(X==null||!i.isValid(X))throw new Error("z required");this.px=H,this.py=k,this.pz=X,Object.freeze(this)}static fromAffine(H){const{x:k,y:X}=H||{};if(!H||!i.isValid(k)||!i.isValid(X))throw new Error("invalid affine point");if(H instanceof U)throw new Error("projective point not allowed");const re=ie=>i.eql(ie,i.ZERO);return re(k)&&re(X)?U.ZERO:new U(k,X,i.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(H){const k=l8(i,H.map(X=>X.pz));return H.map((X,re)=>X.toAffine(k[re])).map(U.fromAffine)}static fromHex(H){const k=U.fromAffine(l(Oi("pointHex",H)));return k.assertValidity(),k}static fromPrivateKey(H){return U.BASE.multiply(A(H))}static msm(H,k){return y$(U,a,H,k)}_setWindowSize(H){B.setWindowSize(this,H)}assertValidity(){R(this)}hasEvenY(){const{y:H}=this.toAffine();if(i.isOdd)return!i.isOdd(H);throw new Error("Field doesn't support isOdd")}equals(H){y(H);const{px:k,py:X,pz:re}=this,{px:ie,py:O,pz:P}=H,L=i.eql(i.mul(k,P),i.mul(ie,re)),q=i.eql(i.mul(X,P),i.mul(O,re));return L&&q}negate(){return new U(this.px,i.neg(this.py),this.pz)}double(){const{a:H,b:k}=n,X=i.mul(k,qA),{px:re,py:ie,pz:O}=this;let P=i.ZERO,L=i.ZERO,q=i.ZERO,oe=i.mul(re,re),ge=i.mul(ie,ie),Ee=i.mul(O,O),D=i.mul(re,ie);return D=i.add(D,D),q=i.mul(re,O),q=i.add(q,q),P=i.mul(H,q),L=i.mul(X,Ee),L=i.add(P,L),P=i.sub(ge,L),L=i.add(ge,L),L=i.mul(P,L),P=i.mul(D,P),q=i.mul(X,q),Ee=i.mul(H,Ee),D=i.sub(oe,Ee),D=i.mul(H,D),D=i.add(D,q),q=i.add(oe,oe),oe=i.add(q,oe),oe=i.add(oe,Ee),oe=i.mul(oe,D),L=i.add(L,oe),Ee=i.mul(ie,O),Ee=i.add(Ee,Ee),oe=i.mul(Ee,D),P=i.sub(P,oe),q=i.mul(Ee,ge),q=i.add(q,q),q=i.add(q,q),new U(P,L,q)}add(H){y(H);const{px:k,py:X,pz:re}=this,{px:ie,py:O,pz:P}=H;let L=i.ZERO,q=i.ZERO,oe=i.ZERO;const ge=n.a,Ee=i.mul(n.b,qA);let D=i.mul(k,ie),fe=i.mul(X,O),be=i.mul(re,P),te=i.add(k,X),j=i.add(ie,O);te=i.mul(te,j),j=i.add(D,fe),te=i.sub(te,j),j=i.add(k,re);let ue=i.add(ie,P);return j=i.mul(j,ue),ue=i.add(D,be),j=i.sub(j,ue),ue=i.add(X,re),L=i.add(O,P),ue=i.mul(ue,L),L=i.add(fe,be),ue=i.sub(ue,L),oe=i.mul(ge,j),L=i.mul(Ee,be),oe=i.add(L,oe),L=i.sub(fe,oe),oe=i.add(fe,oe),q=i.mul(L,oe),fe=i.add(D,D),fe=i.add(fe,D),be=i.mul(ge,be),j=i.mul(Ee,j),fe=i.add(fe,be),be=i.sub(D,be),be=i.mul(ge,be),j=i.add(j,be),D=i.mul(fe,j),q=i.add(q,D),D=i.mul(ue,j),L=i.mul(te,L),L=i.sub(L,D),D=i.mul(te,fe),oe=i.mul(ue,oe),oe=i.add(oe,D),new U(L,q,oe)}subtract(H){return this.add(H.negate())}is0(){return this.equals(U.ZERO)}wNAF(H){return B.wNAFCached(this,H,U.normalizeZ)}multiplyUnsafe(H){const{endo:k,n:X}=n;Zl("scalar",H,fa,X);const re=U.ZERO;if(H===fa)return re;if(this.is0()||H===Dn)return this;if(!k||B.hasPrecomputes(this))return B.wNAFCachedUnsafe(this,H,U.normalizeZ);let{k1neg:ie,k1:O,k2neg:P,k2:L}=k.splitScalar(H),q=re,oe=re,ge=this;for(;O>fa||L>fa;)O&Dn&&(q=q.add(ge)),L&Dn&&(oe=oe.add(ge)),ge=ge.double(),O>>=Dn,L>>=Dn;return ie&&(q=q.negate()),P&&(oe=oe.negate()),oe=new U(i.mul(oe.px,k.beta),oe.py,oe.pz),q.add(oe)}multiply(H){const{endo:k,n:X}=n;Zl("scalar",H,Dn,X);let re,ie;if(k){const{k1neg:O,k1:P,k2neg:L,k2:q}=k.splitScalar(H);let{p:oe,f:ge}=this.wNAF(P),{p:Ee,f:D}=this.wNAF(q);oe=B.constTimeNegate(O,oe),Ee=B.constTimeNegate(L,Ee),Ee=new U(i.mul(Ee.px,k.beta),Ee.py,Ee.pz),re=oe.add(Ee),ie=ge.add(D)}else{const{p:O,f:P}=this.wNAF(H);re=O,ie=P}return U.normalizeZ([re,ie])[0]}multiplyAndAddUnsafe(H,k,X){const re=U.BASE,ie=(P,L)=>L===fa||L===Dn||!P.equals(re)?P.multiplyUnsafe(L):P.multiply(L),O=ie(this,k).add(ie(H,X));return O.is0()?void 0:O}toAffine(H){return I(this,H)}isTorsionFree(){const{h:H,isTorsionFree:k}=n;if(H===Dn)return!0;if(k)return k(U,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:H,clearCofactor:k}=n;return H===Dn?this:k?k(U,this):this.multiplyUnsafe(n.h)}toRawBytes(H=!0){return Od("isCompressed",H),this.assertValidity(),u(U,this,H)}toHex(H=!0){return Od("isCompressed",H),Rd(this.toRawBytes(H))}}U.BASE=new U(n.Gx,n.Gy,i.ONE),U.ZERO=new U(i.ZERO,i.ONE,i.ZERO);const{endo:F,nBitLength:N}=n,B=g$(U,F?Math.ceil(N/2):N);return{CURVE:n,ProjectivePoint:U,normPrivateKeyToScalar:A,weierstrassEquation:f,isWithinCurveOrder:v}}function E$(e){const n=b8(e);return pg(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function w$(e){const n=E$(e),{Fp:i,n:a,nByteLength:u,nBitLength:l}=n,f=i.BYTES+1,p=2*i.BYTES+1;function h(Ee){return Br(Ee,a)}function m(Ee){return Iw(Ee,a)}const{ProjectivePoint:v,normPrivateKeyToScalar:A,weierstrassEquation:y,isWithinCurveOrder:I}=x$({...n,toBytes(Ee,D,fe){const be=D.toAffine(),te=i.toBytes(be.x),j=Zm;return Od("isCompressed",fe),fe?j(Uint8Array.from([D.hasEvenY()?2:3]),te):j(Uint8Array.from([4]),te,i.toBytes(be.y))},fromBytes(Ee){const D=Ee.length,fe=Ee[0],be=Ee.subarray(1);if(D===f&&(fe===2||fe===3)){const te=wu(be);if(!cS(te,Dn,i.ORDER))throw new Error("Point is not on curve");const j=y(te);let ue;try{ue=i.sqrt(j)}catch(G){const Q=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+Q)}const me=(ue&Dn)===Dn;return(fe&1)===1!==me&&(ue=i.neg(ue)),{x:te,y:ue}}else if(D===p&&fe===4){const te=i.fromBytes(be.subarray(0,i.BYTES)),j=i.fromBytes(be.subarray(i.BYTES,2*i.BYTES));return{x:te,y:j}}else{const te=f,j=p;throw new Error("invalid Point, expected length of "+te+", or uncompressed "+j+", got "+D)}}});function R(Ee){const D=a>>Dn;return Ee>D}function U(Ee){return R(Ee)?h(-Ee):Ee}const F=(Ee,D,fe)=>wu(Ee.slice(D,fe));class N{constructor(D,fe,be){Zl("r",D,Dn,a),Zl("s",fe,Dn,a),this.r=D,this.s=fe,be!=null&&(this.recovery=be),Object.freeze(this)}static fromCompact(D){const fe=u;return D=Oi("compactSignature",D,fe*2),new N(F(D,0,fe),F(D,fe,2*fe))}static fromDER(D){const{r:fe,s:be}=ua.toSig(Oi("DER",D));return new N(fe,be)}assertValidity(){}addRecoveryBit(D){return new N(this.r,this.s,D)}recoverPublicKey(D){const{r:fe,s:be,recovery:te}=this,j=re(Oi("msgHash",D));if(te==null||![0,1,2,3].includes(te))throw new Error("recovery id invalid");const ue=te===2||te===3?fe+n.n:fe;if(ue>=i.ORDER)throw new Error("recovery id 2 or 3 invalid");const me=(te&1)===0?"02":"03",ne=v.fromHex(me+$A(ue,i.BYTES)),G=m(ue),Q=h(-j*G),J=h(be*G),ve=v.BASE.multiplyAndAddUnsafe(ne,Q,J);if(!ve)throw new Error("point at infinify");return ve.assertValidity(),ve}hasHighS(){return R(this.s)}normalizeS(){return this.hasHighS()?new N(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return Xm(this.toDERHex())}toDERHex(){return ua.hexFromSig(this)}toCompactRawBytes(){return Xm(this.toCompactHex())}toCompactHex(){const D=u;return $A(this.r,D)+$A(this.s,D)}}const B={isValidPrivateKey(Ee){try{return A(Ee),!0}catch{return!1}},normPrivateKeyToScalar:A,randomPrivateKey:()=>{const Ee=d8(n.n);return t$(n.randomBytes(Ee),n.n)},precompute(Ee=8,D=v.BASE){return D._setWindowSize(Ee),D.multiply(BigInt(3)),D}};function M(Ee,D=!0){return v.fromPrivateKey(Ee).toRawBytes(D)}function H(Ee){if(typeof Ee=="bigint")return!1;if(Ee instanceof v)return!0;const fe=Oi("key",Ee).length,be=i.BYTES,te=be+1,j=2*be+1;if(!(n.allowedPrivateKeyLengths||u===te))return fe===te||fe===j}function k(Ee,D,fe=!0){if(H(Ee)===!0)throw new Error("first arg must be private key");if(H(D)===!1)throw new Error("second arg must be public key");return v.fromHex(D).multiply(A(Ee)).toRawBytes(fe)}const X=n.bits2int||function(Ee){if(Ee.length>8192)throw new Error("input is too large");const D=wu(Ee),fe=Ee.length*8-l;return fe>0?D>>BigInt(fe):D},re=n.bits2int_modN||function(Ee){return h(X(Ee))},ie=dg(l);function O(Ee){return Zl("num < 2^"+l,Ee,fa,ie),lp(Ee,u)}function P(Ee,D,fe=L){if(["recovered","canonical"].some(V=>V in fe))throw new Error("sign() legacy options not supported");const{hash:be,randomBytes:te}=n;let{lowS:j,prehash:ue,extraEntropy:me}=fe;j==null&&(j=!0),Ee=Oi("msgHash",Ee),cD(fe),ue&&(Ee=Oi("prehashed msgHash",be(Ee)));const ne=re(Ee),G=A(D),Q=[O(G),O(ne)];if(me!=null&&me!==!1){const V=me===!0?te(i.BYTES):me;Q.push(Oi("extraEntropy",V))}const J=Zm(...Q),ve=ne;function Ae(V){const w=X(V);if(!I(w))return;const $=m(w),Y=v.BASE.multiply(w).toAffine(),W=h(Y.x);if(W===fa)return;const de=h($*h(ve+W*G));if(de===fa)return;let pe=(Y.x===W?0:2)|Number(Y.y&Dn),E=de;return j&&R(de)&&(E=U(de),pe^=1),new N(W,E,pe)}return{seed:J,k2sig:Ae}}const L={lowS:n.lowS,prehash:!1},q={lowS:n.lowS,prehash:!1};function oe(Ee,D,fe=L){const{seed:be,k2sig:te}=P(Ee,D,fe),j=n;return G5(j.hash.outputLen,j.nByteLength,j.hmac)(be,te)}v.BASE._setWindowSize(8);function ge(Ee,D,fe,be=q){var pe;const te=Ee;D=Oi("msgHash",D),fe=Oi("publicKey",fe);const{lowS:j,prehash:ue,format:me}=be;if(cD(be),"strict"in be)throw new Error("options.strict was renamed to lowS");if(me!==void 0&&me!=="compact"&&me!=="der")throw new Error("format must be compact or der");const ne=typeof te=="string"||up(te),G=!ne&&!me&&typeof te=="object"&&te!==null&&typeof te.r=="bigint"&&typeof te.s=="bigint";if(!ne&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Q,J;try{if(G&&(Q=new N(te.r,te.s)),ne){try{me!=="compact"&&(Q=N.fromDER(te))}catch(E){if(!(E instanceof ua.Err))throw E}!Q&&me!=="der"&&(Q=N.fromCompact(te))}J=v.fromHex(fe)}catch{return!1}if(!Q||j&&Q.hasHighS())return!1;ue&&(D=n.hash(D));const{r:ve,s:Ae}=Q,V=re(D),w=m(Ae),$=h(V*w),Y=h(ve*w),W=(pe=v.BASE.multiplyAndAddUnsafe(J,$,Y))==null?void 0:pe.toAffine();return W?h(W.x)===ve:!1}return{CURVE:n,getPublicKey:M,getSharedSecret:k,sign:oe,verify:ge,ProjectivePoint:v,Signature:N,utils:B}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function S$(e){return{hash:e,hmac:(n,...i)=>m8(e,n,q5(...i)),randomBytes:H5}}function I$(e,n){const i=a=>w$({...e,...S$(a)});return{...i(n),create:i}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const A8=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),fD=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),C$=BigInt(0),T$=BigInt(1),Tw=BigInt(2),dD=(e,n)=>(e+n/Tw)/n;function O$(e){const n=A8,i=BigInt(3),a=BigInt(6),u=BigInt(11),l=BigInt(22),f=BigInt(23),p=BigInt(44),h=BigInt(88),m=e*e*e%n,v=m*m*e%n,A=Ti(v,i,n)*v%n,y=Ti(A,i,n)*v%n,I=Ti(y,Tw,n)*m%n,R=Ti(I,u,n)*I%n,U=Ti(R,l,n)*R%n,F=Ti(U,p,n)*U%n,N=Ti(F,h,n)*F%n,B=Ti(N,p,n)*U%n,M=Ti(B,i,n)*v%n,H=Ti(M,f,n)*R%n,k=Ti(H,a,n)*m%n,X=Ti(k,Tw,n);if(!Ow.eql(Ow.sqr(X),e))throw new Error("Cannot find square root");return X}const Ow=fS(A8,void 0,void 0,{sqrt:O$}),cp=I$({a:C$,b:BigInt(7),Fp:Ow,n:fD,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const n=fD,i=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),a=-T$*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),u=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),l=i,f=BigInt("0x100000000000000000000000000000000"),p=dD(l*e,n),h=dD(-a*e,n);let m=Br(e-p*i-h*u,n),v=Br(-p*a-h*l,n);const A=m>f,y=v>f;if(A&&(m=n-m),y&&(v=n-v),m>f||v>f)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:A,k1:m,k2neg:y,k2:v}}}},p8),R$=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:cp},Symbol.toStringTag,{value:"Module"})),v8="2.37.4";let ad={getDocsUrl:({docsBaseUrl:e,docsPath:n="",docsSlug:i})=>n?`${e??"https://viem.sh"}${n}${i?`#${i}`:""}`:void 0,version:`viem@${v8}`};class $e extends Error{constructor(n,i={}){var p;const a=(()=>{var h;return i.cause instanceof $e?i.cause.details:(h=i.cause)!=null&&h.message?i.cause.message:i.details})(),u=i.cause instanceof $e&&i.cause.docsPath||i.docsPath,l=(p=ad.getDocsUrl)==null?void 0:p.call(ad,{...i,docsPath:u}),f=[n||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...l?[`Docs: ${l}`]:[],...a?[`Details: ${a}`]:[],...ad.version?[`Version: ${ad.version}`]:[]].join(`
276
+ root.render(<App />);`),r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onUncaughtError!==void 0&&(c=r.onUncaughtError),r.onCaughtError!==void 0&&(d=r.onCaughtError),r.onRecoverableError!==void 0&&(x=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(T=r.unstable_transitionCallbacks)),r=WO(t,1,!1,null,null,o,s,c,d,x,T,null),t[qa]=r.current,L0(t),new rb(r)},od.hydrateRoot=function(t,r,o){if(!F(t))throw Error("Target container is not a DOM element.");uR(t),r===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var s=!1,c="",d=pT,x=hT,T=mT,z=null,Z=null;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onUncaughtError!==void 0&&(d=o.onUncaughtError),o.onCaughtError!==void 0&&(x=o.onCaughtError),o.onRecoverableError!==void 0&&(T=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(z=o.unstable_transitionCallbacks),o.formState!==void 0&&(Z=o.formState)),r=WO(t,1,!0,r,o??null,s,c,d,x,T,z,Z),r.context=eR(null),o=r.current,s=Qr(o),s=Me(s),c=Fa(s),c.callback=null,Na(o,c,s),o=s,r.current.lanes=o,ze(r,o),ao(r),t[qa]=r.current,L0(t),new Fh(r)},od.version="19.1.1",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),od}var tD;function D5(){return tD||(tD=1,FA.exports=N5()),FA.exports}var B5=D5(),U5=JM();function hd({isOpen:e,onClose:n,title:i,children:a,className:u,url:l}){je.useEffect(()=>{if(e){const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e]);const f=()=>{var h;l&&((h=globalThis==null?void 0:globalThis.open)==null||h.call(globalThis,l,"_blank","noopener,noreferrer"),n())};if(!e)return null;const p=ee.jsxDEV("div",{className:"modal-overlay",onClick:n,children:ee.jsxDEV("div",{className:`modal-content ${u}`,onClick:h=>h.stopPropagation(),children:[ee.jsxDEV("div",{className:"modal-header",children:[ee.jsxDEV("h2",{className:"modal-title",children:i},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:46,columnNumber:11},this),ee.jsxDEV("div",{className:"modal-header-actions",children:[l&&ee.jsxDEV("button",{className:"modal-open-new-window",onClick:f,"aria-label":"Open in new window",title:"Open in new window",type:"button",children:ee.jsxDEV("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee.jsxDEV("path",{d:"M18 13v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:67,columnNumber:19},this),ee.jsxDEV("polyline",{points:"15 3 21 3 21 9"},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:68,columnNumber:19},this),ee.jsxDEV("line",{x1:"10",y1:"14",x2:"21",y2:"3"},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:69,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:56,columnNumber:17},this)},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:49,columnNumber:15},this),ee.jsxDEV("button",{className:"modal-close",onClick:n,type:"button",children:"×"},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:73,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:47,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:45,columnNumber:9},this),ee.jsxDEV("div",{className:"modal-body",children:a},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:41,columnNumber:7},this)},void 0,!1,{fileName:"/Users/edwardalvarado/paima-engine-6/packages/build-tools/explorer/client/src/components/Modal.tsx",lineNumber:40,columnNumber:5},this);return typeof document<"u"&&document.body?U5.createPortal(p,document.body):p}const Gl=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function M5(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Td(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Su(e,...n){if(!M5(e))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw new Error("Uint8Array expected of length "+n+", got length="+e.length)}function _5(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Td(e.outputLen),Td(e.blockLen)}function nc(e,n=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(n&&e.finished)throw new Error("Hash#digest() has already been called")}function WM(e,n){Su(e);const i=n.outputLen;if(e.length<i)throw new Error("digestInto() expects output buffer of length at least "+i)}function j5(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function rc(...e){for(let n=0;n<e.length;n++)e[n].fill(0)}function UA(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ao(e,n){return e<<32-n|e>>>n}const P5=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function L5(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function k5(e){for(let n=0;n<e.length;n++)e[n]=L5(e[n]);return e}const nD=P5?e=>e:k5;function $5(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function fg(e){return typeof e=="string"&&(e=$5(e)),Su(e),e}function q5(...e){let n=0;for(let a=0;a<e.length;a++){const u=e[a];Su(u),n+=u.length}const i=new Uint8Array(n);for(let a=0,u=0;a<e.length;a++){const l=e[a];i.set(l,u),u+=l.length}return i}let sS=class{};function e8(e){const n=a=>e().update(fg(a)).digest(),i=e();return n.outputLen=i.outputLen,n.blockLen=i.blockLen,n.create=()=>e(),n}function H5(e=32){if(Gl&&typeof Gl.getRandomValues=="function")return Gl.getRandomValues(new Uint8Array(e));if(Gl&&typeof Gl.randomBytes=="function")return Uint8Array.from(Gl.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const uS=BigInt(0),Sw=BigInt(1);function up(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function lS(e){if(!up(e))throw new Error("Uint8Array expected")}function Od(e,n){if(typeof n!="boolean")throw new Error(e+" boolean expected, got "+n)}function Om(e){const n=e.toString(16);return n.length&1?"0"+n:n}function t8(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?uS:BigInt("0x"+e)}const n8=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",z5=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function Rd(e){if(lS(e),n8)return e.toHex();let n="";for(let i=0;i<e.length;i++)n+=z5[e[i]];return n}const ia={_0:48,_9:57,A:65,F:70,a:97,f:102};function rD(e){if(e>=ia._0&&e<=ia._9)return e-ia._0;if(e>=ia.A&&e<=ia.F)return e-(ia.A-10);if(e>=ia.a&&e<=ia.f)return e-(ia.a-10)}function Xm(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(n8)return Uint8Array.fromHex(e);const n=e.length,i=n/2;if(n%2)throw new Error("hex string expected, got unpadded hex of length "+n);const a=new Uint8Array(i);for(let u=0,l=0;u<i;u++,l+=2){const f=rD(e.charCodeAt(l)),p=rD(e.charCodeAt(l+1));if(f===void 0||p===void 0){const h=e[l]+e[l+1];throw new Error('hex string expected, got non-hex character "'+h+'" at index '+l)}a[u]=f*16+p}return a}function wu(e){return t8(Rd(e))}function r8(e){return lS(e),t8(Rd(Uint8Array.from(e).reverse()))}function lp(e,n){return Xm(e.toString(16).padStart(n*2,"0"))}function i8(e,n){return lp(e,n).reverse()}function Oi(e,n,i){let a;if(typeof n=="string")try{a=Xm(n)}catch(l){throw new Error(e+" must be hex string or Uint8Array, cause: "+l)}else if(up(n))a=Uint8Array.from(n);else throw new Error(e+" must be hex string or Uint8Array");const u=a.length;if(typeof i=="number"&&u!==i)throw new Error(e+" of length "+i+" expected, got "+u);return a}function Zm(...e){let n=0;for(let a=0;a<e.length;a++){const u=e[a];lS(u),n+=u.length}const i=new Uint8Array(n);for(let a=0,u=0;a<e.length;a++){const l=e[a];i.set(l,u),u+=l.length}return i}const MA=e=>typeof e=="bigint"&&uS<=e;function cS(e,n,i){return MA(e)&&MA(n)&&MA(i)&&n<=e&&e<i}function Zl(e,n,i,a){if(!cS(n,i,a))throw new Error("expected valid "+e+": "+i+" <= n < "+a+", got "+n)}function V5(e){let n;for(n=0;e>uS;e>>=Sw,n+=1);return n}const dg=e=>(Sw<<BigInt(e))-Sw,_A=e=>new Uint8Array(e),iD=e=>Uint8Array.from(e);function G5(e,n,i){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof i!="function")throw new Error("hmacFn must be a function");let a=_A(e),u=_A(e),l=0;const f=()=>{a.fill(1),u.fill(0),l=0},p=(...A)=>i(u,a,...A),h=(A=_A(0))=>{u=p(iD([0]),A),a=p(),A.length!==0&&(u=p(iD([1]),A),a=p())},m=()=>{if(l++>=1e3)throw new Error("drbg: tried 1000 values");let A=0;const y=[];for(;A<n;){a=p();const I=a.slice();y.push(I),A+=a.length}return Zm(...y)};return(A,y)=>{f(),h(A);let I;for(;!(I=y(m()));)h();return f(),I}}const Q5={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||up(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,n)=>n.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function pg(e,n,i={}){const a=(u,l,f)=>{const p=Q5[l];if(typeof p!="function")throw new Error("invalid validator function");const h=e[u];if(!(f&&h===void 0)&&!p(h,e))throw new Error("param "+String(u)+" is invalid. Expected "+l+", got "+h)};for(const[u,l]of Object.entries(n))a(u,l,!1);for(const[u,l]of Object.entries(i))a(u,l,!0);return e}function oD(e){const n=new WeakMap;return(i,...a)=>{const u=n.get(i);if(u!==void 0)return u;const l=e(i,...a);return n.set(i,l),l}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ur=BigInt(0),vr=BigInt(1),vu=BigInt(2),Y5=BigInt(3),o8=BigInt(4),a8=BigInt(5),s8=BigInt(8);function Br(e,n){const i=e%n;return i>=Ur?i:n+i}function Ti(e,n,i){let a=e;for(;n-- >Ur;)a*=a,a%=i;return a}function Iw(e,n){if(e===Ur)throw new Error("invert: expected non-zero number");if(n<=Ur)throw new Error("invert: expected positive modulus, got "+n);let i=Br(e,n),a=n,u=Ur,l=vr;for(;i!==Ur;){const p=a/i,h=a%i,m=u-l*p;a=i,i=h,u=l,l=m}if(a!==vr)throw new Error("invert: does not exist");return Br(u,n)}function u8(e,n){const i=(e.ORDER+vr)/o8,a=e.pow(n,i);if(!e.eql(e.sqr(a),n))throw new Error("Cannot find square root");return a}function K5(e,n){const i=(e.ORDER-a8)/s8,a=e.mul(n,vu),u=e.pow(a,i),l=e.mul(n,u),f=e.mul(e.mul(l,vu),u),p=e.mul(l,e.sub(f,e.ONE));if(!e.eql(e.sqr(p),n))throw new Error("Cannot find square root");return p}function X5(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let n=e-vr,i=0;for(;n%vu===Ur;)n/=vu,i++;let a=vu;const u=fS(e);for(;aD(u,a)===1;)if(a++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(i===1)return u8;let l=u.pow(a,n);const f=(n+vr)/vu;return function(h,m){if(h.is0(m))return m;if(aD(h,m)!==1)throw new Error("Cannot find square root");let v=i,A=h.mul(h.ONE,l),y=h.pow(m,n),I=h.pow(m,f);for(;!h.eql(y,h.ONE);){if(h.is0(y))return h.ZERO;let R=1,U=h.sqr(y);for(;!h.eql(U,h.ONE);)if(R++,U=h.sqr(U),R===v)throw new Error("Cannot find square root");const F=vr<<BigInt(v-R-1),N=h.pow(A,F);v=R,A=h.sqr(N),y=h.mul(y,A),I=h.mul(I,N)}return I}}function Z5(e){return e%o8===Y5?u8:e%s8===a8?K5:X5(e)}const J5=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function W5(e){const n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},i=J5.reduce((a,u)=>(a[u]="function",a),n);return pg(e,i)}function e$(e,n,i){if(i<Ur)throw new Error("invalid exponent, negatives unsupported");if(i===Ur)return e.ONE;if(i===vr)return n;let a=e.ONE,u=n;for(;i>Ur;)i&vr&&(a=e.mul(a,u)),u=e.sqr(u),i>>=vr;return a}function l8(e,n,i=!1){const a=new Array(n.length).fill(i?e.ZERO:void 0),u=n.reduce((f,p,h)=>e.is0(p)?f:(a[h]=f,e.mul(f,p)),e.ONE),l=e.inv(u);return n.reduceRight((f,p,h)=>e.is0(p)?f:(a[h]=e.mul(f,a[h]),e.mul(f,p)),l),a}function aD(e,n){const i=(e.ORDER-vr)/vu,a=e.pow(n,i),u=e.eql(a,e.ONE),l=e.eql(a,e.ZERO),f=e.eql(a,e.neg(e.ONE));if(!u&&!l&&!f)throw new Error("invalid Legendre symbol result");return u?1:l?0:-1}function c8(e,n){n!==void 0&&Td(n);const i=n!==void 0?n:e.toString(2).length,a=Math.ceil(i/8);return{nBitLength:i,nByteLength:a}}function fS(e,n,i=!1,a={}){if(e<=Ur)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:u,nByteLength:l}=c8(e,n);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let f;const p=Object.freeze({ORDER:e,isLE:i,BITS:u,BYTES:l,MASK:dg(u),ZERO:Ur,ONE:vr,create:h=>Br(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return Ur<=h&&h<e},is0:h=>h===Ur,isOdd:h=>(h&vr)===vr,neg:h=>Br(-h,e),eql:(h,m)=>h===m,sqr:h=>Br(h*h,e),add:(h,m)=>Br(h+m,e),sub:(h,m)=>Br(h-m,e),mul:(h,m)=>Br(h*m,e),pow:(h,m)=>e$(p,h,m),div:(h,m)=>Br(h*Iw(m,e),e),sqrN:h=>h*h,addN:(h,m)=>h+m,subN:(h,m)=>h-m,mulN:(h,m)=>h*m,inv:h=>Iw(h,e),sqrt:a.sqrt||(h=>(f||(f=Z5(e)),f(p,h))),toBytes:h=>i?i8(h,l):lp(h,l),fromBytes:h=>{if(h.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+h.length);return i?r8(h):wu(h)},invertBatch:h=>l8(p,h),cmov:(h,m,v)=>v?m:h});return Object.freeze(p)}function f8(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const n=e.toString(2).length;return Math.ceil(n/8)}function d8(e){const n=f8(e);return n+Math.ceil(n/2)}function t$(e,n,i=!1){const a=e.length,u=f8(n),l=d8(n);if(a<16||a<l||a>1024)throw new Error("expected "+l+"-1024 bytes of input, got "+a);const f=i?r8(e):wu(e),p=Br(f,n-vr)+vr;return i?i8(p,u):lp(p,u)}function n$(e,n,i,a){if(typeof e.setBigUint64=="function")return e.setBigUint64(n,i,a);const u=BigInt(32),l=BigInt(4294967295),f=Number(i>>u&l),p=Number(i&l),h=a?4:0,m=a?0:4;e.setUint32(n+h,f,a),e.setUint32(n+m,p,a)}function r$(e,n,i){return e&n^~e&i}function i$(e,n,i){return e&n^e&i^n&i}class o$ extends sS{constructor(n,i,a,u){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=n,this.outputLen=i,this.padOffset=a,this.isLE=u,this.buffer=new Uint8Array(n),this.view=UA(this.buffer)}update(n){nc(this),n=fg(n),Su(n);const{view:i,buffer:a,blockLen:u}=this,l=n.length;for(let f=0;f<l;){const p=Math.min(u-this.pos,l-f);if(p===u){const h=UA(n);for(;u<=l-f;f+=u)this.process(h,f);continue}a.set(n.subarray(f,f+p),this.pos),this.pos+=p,f+=p,this.pos===u&&(this.process(i,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){nc(this),WM(n,this),this.finished=!0;const{buffer:i,view:a,blockLen:u,isLE:l}=this;let{pos:f}=this;i[f++]=128,rc(this.buffer.subarray(f)),this.padOffset>u-f&&(this.process(a,0),f=0);for(let A=f;A<u;A++)i[A]=0;n$(a,u-8,BigInt(this.length*8),l),this.process(a,0);const p=UA(n),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const m=h/4,v=this.get();if(m>v.length)throw new Error("_sha2: outputLen bigger than state");for(let A=0;A<m;A++)p.setUint32(4*A,v[A],l)}digest(){const{buffer:n,outputLen:i}=this;this.digestInto(n);const a=n.slice(0,i);return this.destroy(),a}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:i,buffer:a,length:u,finished:l,destroyed:f,pos:p}=this;return n.destroyed=f,n.finished=l,n.length=u,n.pos=p,u%i&&n.buffer.set(a),n}clone(){return this._cloneInto()}}const os=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Rm=BigInt(2**32-1),sD=BigInt(32);function a$(e,n=!1){return n?{h:Number(e&Rm),l:Number(e>>sD&Rm)}:{h:Number(e>>sD&Rm)|0,l:Number(e&Rm)|0}}function s$(e,n=!1){const i=e.length;let a=new Uint32Array(i),u=new Uint32Array(i);for(let l=0;l<i;l++){const{h:f,l:p}=a$(e[l],n);[a[l],u[l]]=[f,p]}return[a,u]}const u$=(e,n,i)=>e<<i|n>>>32-i,l$=(e,n,i)=>n<<i|e>>>32-i,c$=(e,n,i)=>n<<i-32|e>>>64-i,f$=(e,n,i)=>e<<i-32|n>>>64-i,d$=Uint32Array.from([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]),as=new Uint32Array(64);class p$ extends o${constructor(n=32){super(64,n,8,!1),this.A=os[0]|0,this.B=os[1]|0,this.C=os[2]|0,this.D=os[3]|0,this.E=os[4]|0,this.F=os[5]|0,this.G=os[6]|0,this.H=os[7]|0}get(){const{A:n,B:i,C:a,D:u,E:l,F:f,G:p,H:h}=this;return[n,i,a,u,l,f,p,h]}set(n,i,a,u,l,f,p,h){this.A=n|0,this.B=i|0,this.C=a|0,this.D=u|0,this.E=l|0,this.F=f|0,this.G=p|0,this.H=h|0}process(n,i){for(let A=0;A<16;A++,i+=4)as[A]=n.getUint32(i,!1);for(let A=16;A<64;A++){const y=as[A-15],I=as[A-2],R=Ao(y,7)^Ao(y,18)^y>>>3,U=Ao(I,17)^Ao(I,19)^I>>>10;as[A]=U+as[A-7]+R+as[A-16]|0}let{A:a,B:u,C:l,D:f,E:p,F:h,G:m,H:v}=this;for(let A=0;A<64;A++){const y=Ao(p,6)^Ao(p,11)^Ao(p,25),I=v+y+r$(p,h,m)+d$[A]+as[A]|0,U=(Ao(a,2)^Ao(a,13)^Ao(a,22))+i$(a,u,l)|0;v=m,m=h,h=p,p=f+I|0,f=l,l=u,u=a,a=I+U|0}a=a+this.A|0,u=u+this.B|0,l=l+this.C|0,f=f+this.D|0,p=p+this.E|0,h=h+this.F|0,m=m+this.G|0,v=v+this.H|0,this.set(a,u,l,f,p,h,m,v)}roundClean(){rc(as)}destroy(){this.set(0,0,0,0,0,0,0,0),rc(this.buffer)}}const p8=e8(()=>new p$);class h8 extends sS{constructor(n,i){super(),this.finished=!1,this.destroyed=!1,_5(n);const a=fg(i);if(this.iHash=n.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 u=this.blockLen,l=new Uint8Array(u);l.set(a.length>u?n.create().update(a).digest():a);for(let f=0;f<l.length;f++)l[f]^=54;this.iHash.update(l),this.oHash=n.create();for(let f=0;f<l.length;f++)l[f]^=106;this.oHash.update(l),rc(l)}update(n){return nc(this),this.iHash.update(n),this}digestInto(n){nc(this),Su(n,this.outputLen),this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||(n=Object.create(Object.getPrototypeOf(this),{}));const{oHash:i,iHash:a,finished:u,destroyed:l,blockLen:f,outputLen:p}=this;return n=n,n.finished=u,n.destroyed=l,n.blockLen=f,n.outputLen=p,n.oHash=i._cloneInto(n.oHash),n.iHash=a._cloneInto(n.iHash),n}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const m8=(e,n,i)=>new h8(e,n).update(i).digest();m8.create=(e,n)=>new h8(e,n);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const uD=BigInt(0),Cw=BigInt(1);function jA(e,n){const i=n.negate();return e?i:n}function g8(e,n){if(!Number.isSafeInteger(e)||e<=0||e>n)throw new Error("invalid window size, expected [1.."+n+"], got W="+e)}function PA(e,n){g8(e,n);const i=Math.ceil(n/e)+1,a=2**(e-1),u=2**e,l=dg(e),f=BigInt(e);return{windows:i,windowSize:a,mask:l,maxNumber:u,shiftBy:f}}function lD(e,n,i){const{windowSize:a,mask:u,maxNumber:l,shiftBy:f}=i;let p=Number(e&u),h=e>>f;p>a&&(p-=l,h+=Cw);const m=n*a,v=m+Math.abs(p)-1,A=p===0,y=p<0,I=n%2!==0;return{nextN:h,offset:v,isZero:A,isNeg:y,isNegF:I,offsetF:m}}function h$(e,n){if(!Array.isArray(e))throw new Error("array expected");e.forEach((i,a)=>{if(!(i instanceof n))throw new Error("invalid point at index "+a)})}function m$(e,n){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((i,a)=>{if(!n.isValid(i))throw new Error("invalid scalar at index "+a)})}const LA=new WeakMap,y8=new WeakMap;function kA(e){return y8.get(e)||1}function g$(e,n){return{constTimeNegate:jA,hasPrecomputes(i){return kA(i)!==1},unsafeLadder(i,a,u=e.ZERO){let l=i;for(;a>uD;)a&Cw&&(u=u.add(l)),l=l.double(),a>>=Cw;return u},precomputeWindow(i,a){const{windows:u,windowSize:l}=PA(a,n),f=[];let p=i,h=p;for(let m=0;m<u;m++){h=p,f.push(h);for(let v=1;v<l;v++)h=h.add(p),f.push(h);p=h.double()}return f},wNAF(i,a,u){let l=e.ZERO,f=e.BASE;const p=PA(i,n);for(let h=0;h<p.windows;h++){const{nextN:m,offset:v,isZero:A,isNeg:y,isNegF:I,offsetF:R}=lD(u,h,p);u=m,A?f=f.add(jA(I,a[R])):l=l.add(jA(y,a[v]))}return{p:l,f}},wNAFUnsafe(i,a,u,l=e.ZERO){const f=PA(i,n);for(let p=0;p<f.windows&&u!==uD;p++){const{nextN:h,offset:m,isZero:v,isNeg:A}=lD(u,p,f);if(u=h,!v){const y=a[m];l=l.add(A?y.negate():y)}}return l},getPrecomputes(i,a,u){let l=LA.get(a);return l||(l=this.precomputeWindow(a,i),i!==1&&LA.set(a,u(l))),l},wNAFCached(i,a,u){const l=kA(i);return this.wNAF(l,this.getPrecomputes(l,i,u),a)},wNAFCachedUnsafe(i,a,u,l){const f=kA(i);return f===1?this.unsafeLadder(i,a,l):this.wNAFUnsafe(f,this.getPrecomputes(f,i,u),a,l)},setWindowSize(i,a){g8(a,n),y8.set(i,a),LA.delete(i)}}}function y$(e,n,i,a){h$(i,e),m$(a,n);const u=i.length,l=a.length;if(u!==l)throw new Error("arrays of points and scalars must have equal length");const f=e.ZERO,p=V5(BigInt(u));let h=1;p>12?h=p-3:p>4?h=p-2:p>0&&(h=2);const m=dg(h),v=new Array(Number(m)+1).fill(f),A=Math.floor((n.BITS-1)/h)*h;let y=f;for(let I=A;I>=0;I-=h){v.fill(f);for(let U=0;U<l;U++){const F=a[U],N=Number(F>>BigInt(I)&m);v[N]=v[N].add(i[U])}let R=f;for(let U=v.length-1,F=f;U>0;U--)F=F.add(v[U]),R=R.add(F);if(y=y.add(R),I!==0)for(let U=0;U<h;U++)y=y.double()}return y}function b8(e){return W5(e.Fp),pg(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...c8(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function cD(e){e.lowS!==void 0&&Od("lowS",e.lowS),e.prehash!==void 0&&Od("prehash",e.prehash)}function b$(e){const n=b8(e);pg(n,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:i,Fp:a,a:u}=n;if(i){if(!a.eql(u,a.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof i!="object"||typeof i.beta!="bigint"||typeof i.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...n})}class A$ extends Error{constructor(n=""){super(n)}}const ua={Err:A$,_tlv:{encode:(e,n)=>{const{Err:i}=ua;if(e<0||e>256)throw new i("tlv.encode: wrong tag");if(n.length&1)throw new i("tlv.encode: unpadded data");const a=n.length/2,u=Om(a);if(u.length/2&128)throw new i("tlv.encode: long form length too big");const l=a>127?Om(u.length/2|128):"";return Om(e)+l+u+n},decode(e,n){const{Err:i}=ua;let a=0;if(e<0||e>256)throw new i("tlv.encode: wrong tag");if(n.length<2||n[a++]!==e)throw new i("tlv.decode: wrong tlv");const u=n[a++],l=!!(u&128);let f=0;if(!l)f=u;else{const h=u&127;if(!h)throw new i("tlv.decode(long): indefinite length not supported");if(h>4)throw new i("tlv.decode(long): byte length is too big");const m=n.subarray(a,a+h);if(m.length!==h)throw new i("tlv.decode: length bytes not complete");if(m[0]===0)throw new i("tlv.decode(long): zero leftmost byte");for(const v of m)f=f<<8|v;if(a+=h,f<128)throw new i("tlv.decode(long): not minimal encoding")}const p=n.subarray(a,a+f);if(p.length!==f)throw new i("tlv.decode: wrong value length");return{v:p,l:n.subarray(a+f)}}},_int:{encode(e){const{Err:n}=ua;if(e<fa)throw new n("integer: negative integers are not allowed");let i=Om(e);if(Number.parseInt(i[0],16)&8&&(i="00"+i),i.length&1)throw new n("unexpected DER parsing assertion: unpadded hex");return i},decode(e){const{Err:n}=ua;if(e[0]&128)throw new n("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new n("invalid signature integer: unnecessary leading zero");return wu(e)}},toSig(e){const{Err:n,_int:i,_tlv:a}=ua,u=Oi("signature",e),{v:l,l:f}=a.decode(48,u);if(f.length)throw new n("invalid signature: left bytes after parsing");const{v:p,l:h}=a.decode(2,l),{v:m,l:v}=a.decode(2,h);if(v.length)throw new n("invalid signature: left bytes after parsing");return{r:i.decode(p),s:i.decode(m)}},hexFromSig(e){const{_tlv:n,_int:i}=ua,a=n.encode(2,i.encode(e.r)),u=n.encode(2,i.encode(e.s)),l=a+u;return n.encode(48,l)}};function $A(e,n){return Rd(lp(e,n))}const fa=BigInt(0),Dn=BigInt(1);BigInt(2);const qA=BigInt(3),v$=BigInt(4);function x$(e){const n=b$(e),{Fp:i}=n,a=fS(n.n,n.nBitLength),u=n.toBytes||((M,H,k)=>{const X=H.toAffine();return Zm(Uint8Array.from([4]),i.toBytes(X.x),i.toBytes(X.y))}),l=n.fromBytes||(M=>{const H=M.subarray(1),k=i.fromBytes(H.subarray(0,i.BYTES)),X=i.fromBytes(H.subarray(i.BYTES,2*i.BYTES));return{x:k,y:X}});function f(M){const{a:H,b:k}=n,X=i.sqr(M),re=i.mul(X,M);return i.add(i.add(re,i.mul(M,H)),k)}function p(M,H){const k=i.sqr(H),X=f(M);return i.eql(k,X)}if(!p(n.Gx,n.Gy))throw new Error("bad curve params: generator point");const h=i.mul(i.pow(n.a,qA),v$),m=i.mul(i.sqr(n.b),BigInt(27));if(i.is0(i.add(h,m)))throw new Error("bad curve params: a or b");function v(M){return cS(M,Dn,n.n)}function A(M){const{allowedPrivateKeyLengths:H,nByteLength:k,wrapPrivateKey:X,n:re}=n;if(H&&typeof M!="bigint"){if(up(M)&&(M=Rd(M)),typeof M!="string"||!H.includes(M.length))throw new Error("invalid private key");M=M.padStart(k*2,"0")}let ie;try{ie=typeof M=="bigint"?M:wu(Oi("private key",M,k))}catch{throw new Error("invalid private key, expected hex or "+k+" bytes, got "+typeof M)}return X&&(ie=Br(ie,re)),Zl("private key",ie,Dn,re),ie}function y(M){if(!(M instanceof U))throw new Error("ProjectivePoint expected")}const I=oD((M,H)=>{const{px:k,py:X,pz:re}=M;if(i.eql(re,i.ONE))return{x:k,y:X};const ie=M.is0();H==null&&(H=ie?i.ONE:i.inv(re));const O=i.mul(k,H),P=i.mul(X,H),L=i.mul(re,H);if(ie)return{x:i.ZERO,y:i.ZERO};if(!i.eql(L,i.ONE))throw new Error("invZ was invalid");return{x:O,y:P}}),R=oD(M=>{if(M.is0()){if(n.allowInfinityPoint&&!i.is0(M.py))return;throw new Error("bad point: ZERO")}const{x:H,y:k}=M.toAffine();if(!i.isValid(H)||!i.isValid(k))throw new Error("bad point: x or y not FE");if(!p(H,k))throw new Error("bad point: equation left != right");if(!M.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class U{constructor(H,k,X){if(H==null||!i.isValid(H))throw new Error("x required");if(k==null||!i.isValid(k)||i.is0(k))throw new Error("y required");if(X==null||!i.isValid(X))throw new Error("z required");this.px=H,this.py=k,this.pz=X,Object.freeze(this)}static fromAffine(H){const{x:k,y:X}=H||{};if(!H||!i.isValid(k)||!i.isValid(X))throw new Error("invalid affine point");if(H instanceof U)throw new Error("projective point not allowed");const re=ie=>i.eql(ie,i.ZERO);return re(k)&&re(X)?U.ZERO:new U(k,X,i.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(H){const k=l8(i,H.map(X=>X.pz));return H.map((X,re)=>X.toAffine(k[re])).map(U.fromAffine)}static fromHex(H){const k=U.fromAffine(l(Oi("pointHex",H)));return k.assertValidity(),k}static fromPrivateKey(H){return U.BASE.multiply(A(H))}static msm(H,k){return y$(U,a,H,k)}_setWindowSize(H){B.setWindowSize(this,H)}assertValidity(){R(this)}hasEvenY(){const{y:H}=this.toAffine();if(i.isOdd)return!i.isOdd(H);throw new Error("Field doesn't support isOdd")}equals(H){y(H);const{px:k,py:X,pz:re}=this,{px:ie,py:O,pz:P}=H,L=i.eql(i.mul(k,P),i.mul(ie,re)),q=i.eql(i.mul(X,P),i.mul(O,re));return L&&q}negate(){return new U(this.px,i.neg(this.py),this.pz)}double(){const{a:H,b:k}=n,X=i.mul(k,qA),{px:re,py:ie,pz:O}=this;let P=i.ZERO,L=i.ZERO,q=i.ZERO,oe=i.mul(re,re),ge=i.mul(ie,ie),Ee=i.mul(O,O),D=i.mul(re,ie);return D=i.add(D,D),q=i.mul(re,O),q=i.add(q,q),P=i.mul(H,q),L=i.mul(X,Ee),L=i.add(P,L),P=i.sub(ge,L),L=i.add(ge,L),L=i.mul(P,L),P=i.mul(D,P),q=i.mul(X,q),Ee=i.mul(H,Ee),D=i.sub(oe,Ee),D=i.mul(H,D),D=i.add(D,q),q=i.add(oe,oe),oe=i.add(q,oe),oe=i.add(oe,Ee),oe=i.mul(oe,D),L=i.add(L,oe),Ee=i.mul(ie,O),Ee=i.add(Ee,Ee),oe=i.mul(Ee,D),P=i.sub(P,oe),q=i.mul(Ee,ge),q=i.add(q,q),q=i.add(q,q),new U(P,L,q)}add(H){y(H);const{px:k,py:X,pz:re}=this,{px:ie,py:O,pz:P}=H;let L=i.ZERO,q=i.ZERO,oe=i.ZERO;const ge=n.a,Ee=i.mul(n.b,qA);let D=i.mul(k,ie),fe=i.mul(X,O),be=i.mul(re,P),te=i.add(k,X),j=i.add(ie,O);te=i.mul(te,j),j=i.add(D,fe),te=i.sub(te,j),j=i.add(k,re);let ue=i.add(ie,P);return j=i.mul(j,ue),ue=i.add(D,be),j=i.sub(j,ue),ue=i.add(X,re),L=i.add(O,P),ue=i.mul(ue,L),L=i.add(fe,be),ue=i.sub(ue,L),oe=i.mul(ge,j),L=i.mul(Ee,be),oe=i.add(L,oe),L=i.sub(fe,oe),oe=i.add(fe,oe),q=i.mul(L,oe),fe=i.add(D,D),fe=i.add(fe,D),be=i.mul(ge,be),j=i.mul(Ee,j),fe=i.add(fe,be),be=i.sub(D,be),be=i.mul(ge,be),j=i.add(j,be),D=i.mul(fe,j),q=i.add(q,D),D=i.mul(ue,j),L=i.mul(te,L),L=i.sub(L,D),D=i.mul(te,fe),oe=i.mul(ue,oe),oe=i.add(oe,D),new U(L,q,oe)}subtract(H){return this.add(H.negate())}is0(){return this.equals(U.ZERO)}wNAF(H){return B.wNAFCached(this,H,U.normalizeZ)}multiplyUnsafe(H){const{endo:k,n:X}=n;Zl("scalar",H,fa,X);const re=U.ZERO;if(H===fa)return re;if(this.is0()||H===Dn)return this;if(!k||B.hasPrecomputes(this))return B.wNAFCachedUnsafe(this,H,U.normalizeZ);let{k1neg:ie,k1:O,k2neg:P,k2:L}=k.splitScalar(H),q=re,oe=re,ge=this;for(;O>fa||L>fa;)O&Dn&&(q=q.add(ge)),L&Dn&&(oe=oe.add(ge)),ge=ge.double(),O>>=Dn,L>>=Dn;return ie&&(q=q.negate()),P&&(oe=oe.negate()),oe=new U(i.mul(oe.px,k.beta),oe.py,oe.pz),q.add(oe)}multiply(H){const{endo:k,n:X}=n;Zl("scalar",H,Dn,X);let re,ie;if(k){const{k1neg:O,k1:P,k2neg:L,k2:q}=k.splitScalar(H);let{p:oe,f:ge}=this.wNAF(P),{p:Ee,f:D}=this.wNAF(q);oe=B.constTimeNegate(O,oe),Ee=B.constTimeNegate(L,Ee),Ee=new U(i.mul(Ee.px,k.beta),Ee.py,Ee.pz),re=oe.add(Ee),ie=ge.add(D)}else{const{p:O,f:P}=this.wNAF(H);re=O,ie=P}return U.normalizeZ([re,ie])[0]}multiplyAndAddUnsafe(H,k,X){const re=U.BASE,ie=(P,L)=>L===fa||L===Dn||!P.equals(re)?P.multiplyUnsafe(L):P.multiply(L),O=ie(this,k).add(ie(H,X));return O.is0()?void 0:O}toAffine(H){return I(this,H)}isTorsionFree(){const{h:H,isTorsionFree:k}=n;if(H===Dn)return!0;if(k)return k(U,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:H,clearCofactor:k}=n;return H===Dn?this:k?k(U,this):this.multiplyUnsafe(n.h)}toRawBytes(H=!0){return Od("isCompressed",H),this.assertValidity(),u(U,this,H)}toHex(H=!0){return Od("isCompressed",H),Rd(this.toRawBytes(H))}}U.BASE=new U(n.Gx,n.Gy,i.ONE),U.ZERO=new U(i.ZERO,i.ONE,i.ZERO);const{endo:F,nBitLength:N}=n,B=g$(U,F?Math.ceil(N/2):N);return{CURVE:n,ProjectivePoint:U,normPrivateKeyToScalar:A,weierstrassEquation:f,isWithinCurveOrder:v}}function E$(e){const n=b8(e);return pg(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function w$(e){const n=E$(e),{Fp:i,n:a,nByteLength:u,nBitLength:l}=n,f=i.BYTES+1,p=2*i.BYTES+1;function h(Ee){return Br(Ee,a)}function m(Ee){return Iw(Ee,a)}const{ProjectivePoint:v,normPrivateKeyToScalar:A,weierstrassEquation:y,isWithinCurveOrder:I}=x$({...n,toBytes(Ee,D,fe){const be=D.toAffine(),te=i.toBytes(be.x),j=Zm;return Od("isCompressed",fe),fe?j(Uint8Array.from([D.hasEvenY()?2:3]),te):j(Uint8Array.from([4]),te,i.toBytes(be.y))},fromBytes(Ee){const D=Ee.length,fe=Ee[0],be=Ee.subarray(1);if(D===f&&(fe===2||fe===3)){const te=wu(be);if(!cS(te,Dn,i.ORDER))throw new Error("Point is not on curve");const j=y(te);let ue;try{ue=i.sqrt(j)}catch(G){const Q=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+Q)}const me=(ue&Dn)===Dn;return(fe&1)===1!==me&&(ue=i.neg(ue)),{x:te,y:ue}}else if(D===p&&fe===4){const te=i.fromBytes(be.subarray(0,i.BYTES)),j=i.fromBytes(be.subarray(i.BYTES,2*i.BYTES));return{x:te,y:j}}else{const te=f,j=p;throw new Error("invalid Point, expected length of "+te+", or uncompressed "+j+", got "+D)}}});function R(Ee){const D=a>>Dn;return Ee>D}function U(Ee){return R(Ee)?h(-Ee):Ee}const F=(Ee,D,fe)=>wu(Ee.slice(D,fe));class N{constructor(D,fe,be){Zl("r",D,Dn,a),Zl("s",fe,Dn,a),this.r=D,this.s=fe,be!=null&&(this.recovery=be),Object.freeze(this)}static fromCompact(D){const fe=u;return D=Oi("compactSignature",D,fe*2),new N(F(D,0,fe),F(D,fe,2*fe))}static fromDER(D){const{r:fe,s:be}=ua.toSig(Oi("DER",D));return new N(fe,be)}assertValidity(){}addRecoveryBit(D){return new N(this.r,this.s,D)}recoverPublicKey(D){const{r:fe,s:be,recovery:te}=this,j=re(Oi("msgHash",D));if(te==null||![0,1,2,3].includes(te))throw new Error("recovery id invalid");const ue=te===2||te===3?fe+n.n:fe;if(ue>=i.ORDER)throw new Error("recovery id 2 or 3 invalid");const me=(te&1)===0?"02":"03",ne=v.fromHex(me+$A(ue,i.BYTES)),G=m(ue),Q=h(-j*G),J=h(be*G),ve=v.BASE.multiplyAndAddUnsafe(ne,Q,J);if(!ve)throw new Error("point at infinify");return ve.assertValidity(),ve}hasHighS(){return R(this.s)}normalizeS(){return this.hasHighS()?new N(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return Xm(this.toDERHex())}toDERHex(){return ua.hexFromSig(this)}toCompactRawBytes(){return Xm(this.toCompactHex())}toCompactHex(){const D=u;return $A(this.r,D)+$A(this.s,D)}}const B={isValidPrivateKey(Ee){try{return A(Ee),!0}catch{return!1}},normPrivateKeyToScalar:A,randomPrivateKey:()=>{const Ee=d8(n.n);return t$(n.randomBytes(Ee),n.n)},precompute(Ee=8,D=v.BASE){return D._setWindowSize(Ee),D.multiply(BigInt(3)),D}};function M(Ee,D=!0){return v.fromPrivateKey(Ee).toRawBytes(D)}function H(Ee){if(typeof Ee=="bigint")return!1;if(Ee instanceof v)return!0;const fe=Oi("key",Ee).length,be=i.BYTES,te=be+1,j=2*be+1;if(!(n.allowedPrivateKeyLengths||u===te))return fe===te||fe===j}function k(Ee,D,fe=!0){if(H(Ee)===!0)throw new Error("first arg must be private key");if(H(D)===!1)throw new Error("second arg must be public key");return v.fromHex(D).multiply(A(Ee)).toRawBytes(fe)}const X=n.bits2int||function(Ee){if(Ee.length>8192)throw new Error("input is too large");const D=wu(Ee),fe=Ee.length*8-l;return fe>0?D>>BigInt(fe):D},re=n.bits2int_modN||function(Ee){return h(X(Ee))},ie=dg(l);function O(Ee){return Zl("num < 2^"+l,Ee,fa,ie),lp(Ee,u)}function P(Ee,D,fe=L){if(["recovered","canonical"].some(V=>V in fe))throw new Error("sign() legacy options not supported");const{hash:be,randomBytes:te}=n;let{lowS:j,prehash:ue,extraEntropy:me}=fe;j==null&&(j=!0),Ee=Oi("msgHash",Ee),cD(fe),ue&&(Ee=Oi("prehashed msgHash",be(Ee)));const ne=re(Ee),G=A(D),Q=[O(G),O(ne)];if(me!=null&&me!==!1){const V=me===!0?te(i.BYTES):me;Q.push(Oi("extraEntropy",V))}const J=Zm(...Q),ve=ne;function Ae(V){const w=X(V);if(!I(w))return;const $=m(w),Y=v.BASE.multiply(w).toAffine(),W=h(Y.x);if(W===fa)return;const de=h($*h(ve+W*G));if(de===fa)return;let pe=(Y.x===W?0:2)|Number(Y.y&Dn),E=de;return j&&R(de)&&(E=U(de),pe^=1),new N(W,E,pe)}return{seed:J,k2sig:Ae}}const L={lowS:n.lowS,prehash:!1},q={lowS:n.lowS,prehash:!1};function oe(Ee,D,fe=L){const{seed:be,k2sig:te}=P(Ee,D,fe),j=n;return G5(j.hash.outputLen,j.nByteLength,j.hmac)(be,te)}v.BASE._setWindowSize(8);function ge(Ee,D,fe,be=q){var pe;const te=Ee;D=Oi("msgHash",D),fe=Oi("publicKey",fe);const{lowS:j,prehash:ue,format:me}=be;if(cD(be),"strict"in be)throw new Error("options.strict was renamed to lowS");if(me!==void 0&&me!=="compact"&&me!=="der")throw new Error("format must be compact or der");const ne=typeof te=="string"||up(te),G=!ne&&!me&&typeof te=="object"&&te!==null&&typeof te.r=="bigint"&&typeof te.s=="bigint";if(!ne&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Q,J;try{if(G&&(Q=new N(te.r,te.s)),ne){try{me!=="compact"&&(Q=N.fromDER(te))}catch(E){if(!(E instanceof ua.Err))throw E}!Q&&me!=="der"&&(Q=N.fromCompact(te))}J=v.fromHex(fe)}catch{return!1}if(!Q||j&&Q.hasHighS())return!1;ue&&(D=n.hash(D));const{r:ve,s:Ae}=Q,V=re(D),w=m(Ae),$=h(V*w),Y=h(ve*w),W=(pe=v.BASE.multiplyAndAddUnsafe(J,$,Y))==null?void 0:pe.toAffine();return W?h(W.x)===ve:!1}return{CURVE:n,getPublicKey:M,getSharedSecret:k,sign:oe,verify:ge,ProjectivePoint:v,Signature:N,utils:B}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function S$(e){return{hash:e,hmac:(n,...i)=>m8(e,n,q5(...i)),randomBytes:H5}}function I$(e,n){const i=a=>w$({...e,...S$(a)});return{...i(n),create:i}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const A8=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),fD=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),C$=BigInt(0),T$=BigInt(1),Tw=BigInt(2),dD=(e,n)=>(e+n/Tw)/n;function O$(e){const n=A8,i=BigInt(3),a=BigInt(6),u=BigInt(11),l=BigInt(22),f=BigInt(23),p=BigInt(44),h=BigInt(88),m=e*e*e%n,v=m*m*e%n,A=Ti(v,i,n)*v%n,y=Ti(A,i,n)*v%n,I=Ti(y,Tw,n)*m%n,R=Ti(I,u,n)*I%n,U=Ti(R,l,n)*R%n,F=Ti(U,p,n)*U%n,N=Ti(F,h,n)*F%n,B=Ti(N,p,n)*U%n,M=Ti(B,i,n)*v%n,H=Ti(M,f,n)*R%n,k=Ti(H,a,n)*m%n,X=Ti(k,Tw,n);if(!Ow.eql(Ow.sqr(X),e))throw new Error("Cannot find square root");return X}const Ow=fS(A8,void 0,void 0,{sqrt:O$}),cp=I$({a:C$,b:BigInt(7),Fp:Ow,n:fD,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const n=fD,i=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),a=-T$*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),u=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),l=i,f=BigInt("0x100000000000000000000000000000000"),p=dD(l*e,n),h=dD(-a*e,n);let m=Br(e-p*i-h*u,n),v=Br(-p*a-h*l,n);const A=m>f,y=v>f;if(A&&(m=n-m),y&&(v=n-v),m>f||v>f)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:A,k1:m,k2neg:y,k2:v}}}},p8),R$=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:cp},Symbol.toStringTag,{value:"Module"})),v8="2.37.5";let ad={getDocsUrl:({docsBaseUrl:e,docsPath:n="",docsSlug:i})=>n?`${e??"https://viem.sh"}${n}${i?`#${i}`:""}`:void 0,version:`viem@${v8}`};class $e extends Error{constructor(n,i={}){var p;const a=(()=>{var h;return i.cause instanceof $e?i.cause.details:(h=i.cause)!=null&&h.message?i.cause.message:i.details})(),u=i.cause instanceof $e&&i.cause.docsPath||i.docsPath,l=(p=ad.getDocsUrl)==null?void 0:p.call(ad,{...i,docsPath:u}),f=[n||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...l?[`Docs: ${l}`]:[],...a?[`Details: ${a}`]:[],...ad.version?[`Version: ${ad.version}`]:[]].join(`
277
277
  `);super(f,i.cause?{cause:i.cause}:void 0),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,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=a,this.docsPath=u,this.metaMessages=i.metaMessages,this.name=i.name??this.name,this.shortMessage=n,this.version=v8}walk(n){return x8(this,n)}}function x8(e,n){return n!=null&&n(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?x8(e.cause,n):n?null:e}class E8 extends $e{constructor({max:n,min:i,signed:a,size:u,value:l}){super(`Number "${l}" is not in safe ${u?`${u*8}-bit ${a?"signed":"unsigned"} `:""}integer range ${n?`(${i} to ${n})`:`(above ${i})`}`,{name:"IntegerOutOfRangeError"})}}class F$ extends $e{constructor(n){super(`Bytes value "${n}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class N$ extends $e{constructor({givenSize:n,maxSize:i}){super(`Size cannot exceed ${i} bytes. Given size: ${n} bytes.`,{name:"SizeOverflowError"})}}function ga(e,{strict:n=!0}={}){return!e||typeof e!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function an(e){return ga(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function ds(e,{dir:n="left"}={}){let i=typeof e=="string"?e.replace("0x",""):e,a=0;for(let u=0;u<i.length-1&&i[n==="left"?u:i.length-u-1].toString()==="0";u++)a++;return i=n==="left"?i.slice(a):i.slice(0,i.length-a),typeof e=="string"?(i.length===1&&n==="right"&&(i=`${i}0`),`0x${i.length%2===1?`0${i}`:i}`):i}class w8 extends $e{constructor({offset:n,position:i,size:a}){super(`Slice ${i==="start"?"starting":"ending"} at offset "${n}" is out-of-bounds (size: ${a}).`,{name:"SliceOffsetOutOfBoundsError"})}}class S8 extends $e{constructor({size:n,targetSize:i,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} size (${n}) exceeds padding size (${i}).`,{name:"SizeExceedsPaddingSizeError"})}}class pD extends $e{constructor({size:n,targetSize:i,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} is expected to be ${i} ${a} long, but is ${n} ${a} long.`,{name:"InvalidBytesLengthError"})}}function mc(e,{dir:n,size:i=32}={}){return typeof e=="string"?fs(e,{dir:n,size:i}):D$(e,{dir:n,size:i})}function fs(e,{dir:n,size:i=32}={}){if(i===null)return e;const a=e.replace("0x","");if(a.length>i*2)throw new S8({size:Math.ceil(a.length/2),targetSize:i,type:"hex"});return`0x${a[n==="right"?"padEnd":"padStart"](i*2,"0")}`}function D$(e,{dir:n,size:i=32}={}){if(i===null)return e;if(e.length>i)throw new S8({size:e.length,targetSize:i,type:"bytes"});const a=new Uint8Array(i);for(let u=0;u<i;u++){const l=n==="right";a[l?u:i-u-1]=e[l?u:e.length-u-1]}return a}const B$=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function wo(e,n={}){return typeof e=="number"||typeof e=="bigint"?Ke(e,n):typeof e=="string"?ic(e,n):typeof e=="boolean"?I8(e,n):lr(e,n)}function I8(e,n={}){const i=`0x${Number(e)}`;return typeof n.size=="number"?(To(i,{size:n.size}),mc(i,{size:n.size})):i}function lr(e,n={}){let i="";for(let u=0;u<e.length;u++)i+=B$[e[u]];const a=`0x${i}`;return typeof n.size=="number"?(To(a,{size:n.size}),mc(a,{dir:"right",size:n.size})):a}function Ke(e,n={}){const{signed:i,size:a}=n,u=BigInt(e);let l;a?i?l=(1n<<BigInt(a)*8n-1n)-1n:l=2n**(BigInt(a)*8n)-1n:typeof e=="number"&&(l=BigInt(Number.MAX_SAFE_INTEGER));const f=typeof l=="bigint"&&i?-l-1n:0;if(l&&u>l||u<f){const h=typeof e=="bigint"?"n":"";throw new E8({max:l?`${l}${h}`:void 0,min:`${f}${h}`,signed:i,size:a,value:`${e}${h}`})}const p=`0x${(i&&u<0?(1n<<BigInt(a*8))+BigInt(u):u).toString(16)}`;return a?mc(p,{size:a}):p}const U$=new TextEncoder;function ic(e,n={}){const i=U$.encode(e);return lr(i,n)}const M$=new TextEncoder;function dS(e,n={}){return typeof e=="number"||typeof e=="bigint"?j$(e,n):typeof e=="boolean"?_$(e,n):ga(e)?Gi(e,n):C8(e,n)}function _$(e,n={}){const i=new Uint8Array(1);return i[0]=Number(e),typeof n.size=="number"?(To(i,{size:n.size}),mc(i,{size:n.size})):i}const oa={zero:48,nine:57,A:65,F:70,a:97,f:102};function hD(e){if(e>=oa.zero&&e<=oa.nine)return e-oa.zero;if(e>=oa.A&&e<=oa.F)return e-(oa.A-10);if(e>=oa.a&&e<=oa.f)return e-(oa.a-10)}function Gi(e,n={}){let i=e;n.size&&(To(i,{size:n.size}),i=mc(i,{dir:"right",size:n.size}));let a=i.slice(2);a.length%2&&(a=`0${a}`);const u=a.length/2,l=new Uint8Array(u);for(let f=0,p=0;f<u;f++){const h=hD(a.charCodeAt(p++)),m=hD(a.charCodeAt(p++));if(h===void 0||m===void 0)throw new $e(`Invalid byte sequence ("${a[p-2]}${a[p-1]}" in "${a}").`);l[f]=h*16+m}return l}function j$(e,n){const i=Ke(e,n);return Gi(i)}function C8(e,n={}){const i=M$.encode(e);return typeof n.size=="number"?(To(i,{size:n.size}),mc(i,{dir:"right",size:n.size})):i}function To(e,{size:n}){if(an(e)>n)throw new N$({givenSize:an(e),maxSize:n})}function So(e,n={}){const{signed:i}=n;n.size&&To(e,{size:n.size});const a=BigInt(e);if(!i)return a;const u=(e.length-2)/2,l=(1n<<BigInt(u)*8n-1n)-1n;return a<=l?a:a-BigInt(`0x${"f".padStart(u*2,"f")}`)-1n}function ya(e,n={}){return Number(So(e,n))}async function T8(e,{address:n,blockTag:i="latest",blockNumber:a}){const u=await e.request({method:"eth_getTransactionCount",params:[n,typeof a=="bigint"?Ke(a):i]},{dedupe:!!a});return ya(u)}class hg extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const i=super.get(n);return super.has(n)&&i!==void 0&&(this.delete(n),super.set(n,i)),i}set(n,i){if(super.set(n,i),this.maxSize&&this.size>this.maxSize){const a=this.keys().next().value;a&&this.delete(a)}return this}}function P$({r:e,s:n,to:i="hex",v:a,yParity:u}){const l=(()=>{if(u===0||u===1)return u;if(a&&(a===27n||a===28n||a>=35n))return a%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),f=`0x${new cp.Signature(So(e),So(n)).toCompactHex()}${l===0?"1b":"1c"}`;return i==="hex"?f:Gi(f)}function O8(){return wo(cp.utils.randomPrivateKey())}class Er extends $e{constructor({address:n}){super(`Address "${n}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}const L$=BigInt(0),sd=BigInt(1),k$=BigInt(2),$$=BigInt(7),q$=BigInt(256),H$=BigInt(113),R8=[],F8=[],N8=[];for(let e=0,n=sd,i=1,a=0;e<24;e++){[i,a]=[a,(2*i+3*a)%5],R8.push(2*(5*a+i)),F8.push((e+1)*(e+2)/2%64);let u=L$;for(let l=0;l<7;l++)n=(n<<sd^(n>>$$)*H$)%q$,n&k$&&(u^=sd<<(sd<<BigInt(l))-sd);N8.push(u)}const D8=s$(N8,!0),z$=D8[0],V$=D8[1],mD=(e,n,i)=>i>32?c$(e,n,i):u$(e,n,i),gD=(e,n,i)=>i>32?f$(e,n,i):l$(e,n,i);function G$(e,n=24){const i=new Uint32Array(10);for(let a=24-n;a<24;a++){for(let f=0;f<10;f++)i[f]=e[f]^e[f+10]^e[f+20]^e[f+30]^e[f+40];for(let f=0;f<10;f+=2){const p=(f+8)%10,h=(f+2)%10,m=i[h],v=i[h+1],A=mD(m,v,1)^i[p],y=gD(m,v,1)^i[p+1];for(let I=0;I<50;I+=10)e[f+I]^=A,e[f+I+1]^=y}let u=e[2],l=e[3];for(let f=0;f<24;f++){const p=F8[f],h=mD(u,l,p),m=gD(u,l,p),v=R8[f];u=e[v],l=e[v+1],e[v]=h,e[v+1]=m}for(let f=0;f<50;f+=10){for(let p=0;p<10;p++)i[p]=e[f+p];for(let p=0;p<10;p++)e[f+p]^=~i[(p+2)%10]&i[(p+4)%10]}e[0]^=z$[a],e[1]^=V$[a]}rc(i)}class pS extends sS{constructor(n,i,a,u=!1,l=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=n,this.suffix=i,this.outputLen=a,this.enableXOF=u,this.rounds=l,Td(a),!(0<n&&n<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=j5(this.state)}clone(){return this._cloneInto()}keccak(){nD(this.state32),G$(this.state32,this.rounds),nD(this.state32),this.posOut=0,this.pos=0}update(n){nc(this),n=fg(n),Su(n);const{blockLen:i,state:a}=this,u=n.length;for(let l=0;l<u;){const f=Math.min(i-this.pos,u-l);for(let p=0;p<f;p++)a[this.pos++]^=n[l++];this.pos===i&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:i,pos:a,blockLen:u}=this;n[a]^=i,(i&128)!==0&&a===u-1&&this.keccak(),n[u-1]^=128,this.keccak()}writeInto(n){nc(this,!1),Su(n),this.finish();const i=this.state,{blockLen:a}=this;for(let u=0,l=n.length;u<l;){this.posOut>=a&&this.keccak();const f=Math.min(a-this.posOut,l-u);n.set(i.subarray(this.posOut,this.posOut+f),u),this.posOut+=f,u+=f}return n}xofInto(n){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(n)}xof(n){return Td(n),this.xofInto(new Uint8Array(n))}digestInto(n){if(WM(n,this),this.finished)throw new Error("digest() was already called");return this.writeInto(n),this.destroy(),n}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,rc(this.state)}_cloneInto(n){const{blockLen:i,suffix:a,outputLen:u,rounds:l,enableXOF:f}=this;return n||(n=new pS(i,a,u,f,l)),n.state32.set(this.state32),n.pos=this.pos,n.posOut=this.posOut,n.finished=this.finished,n.rounds=l,n.suffix=a,n.outputLen=u,n.enableXOF=f,n.destroyed=this.destroyed,n}}const Q$=(e,n,i)=>e8(()=>new pS(n,e,i)),Y$=Q$(1,136,256/8);function Wr(e,n){const i=n||"hex",a=Y$(ga(e,{strict:!1})?dS(e):e);return i==="bytes"?a:wo(a)}const HA=new hg(8192);function fp(e,n){if(HA.has(`${e}.${n}`))return HA.get(`${e}.${n}`);const i=e.substring(2).toLowerCase(),a=Wr(C8(i),"bytes"),u=i.split("");for(let f=0;f<40;f+=2)a[f>>1]>>4>=8&&u[f]&&(u[f]=u[f].toUpperCase()),(a[f>>1]&15)>=8&&u[f+1]&&(u[f+1]=u[f+1].toUpperCase());const l=`0x${u.join("")}`;return HA.set(`${e}.${n}`,l),l}function K$(e,n){if(!Mn(e,{strict:!1}))throw new Er({address:e});return fp(e,n)}const X$=/^0x[a-fA-F0-9]{40}$/,zA=new hg(8192);function Mn(e,n){const{strict:i=!0}=n??{},a=`${e}.${i}`;if(zA.has(a))return zA.get(a);const u=X$.test(e)?e.toLowerCase()===e?!0:i?fp(e)===e:!0:!1;return zA.set(a,u),u}function Z$(e){if(typeof e=="string"){if(!Mn(e,{strict:!1}))throw new Er({address:e});return{address:e,type:"json-rpc"}}if(!Mn(e.address,{strict:!1}))throw new Er({address:e.address});return{address:e.address,nonceManager:e.nonceManager,sign:e.sign,signAuthorization:e.signAuthorization,signMessage:e.signMessage,signTransaction:e.signTransaction,signTypedData:e.signTypedData,source:"custom",type:"local"}}function B8(e){const n=Wr(`0x${e.substring(4)}`).substring(26);return fp(`0x${n}`)}let VA=!1;async function dp({hash:e,privateKey:n,to:i="object"}){const{r:a,s:u,recovery:l}=cp.sign(e.slice(2),n.slice(2),{lowS:!0,extraEntropy:ga(VA,{strict:!1})?Gi(VA):VA}),f={r:Ke(a,{size:32}),s:Ke(u,{size:32}),v:l?28n:27n,yParity:l};return i==="bytes"||i==="hex"?P$({...f,to:i}):f}function Io(e){return typeof e[0]=="string"?ps(e):J$(e)}function J$(e){let n=0;for(const u of e)n+=u.length;const i=new Uint8Array(n);let a=0;for(const u of e)i.set(u,a),a+=u.length;return i}function ps(e){return`0x${e.reduce((n,i)=>n+i.replace("0x",""),"")}`}class yD extends $e{constructor({offset:n}){super(`Offset \`${n}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class W$ extends $e{constructor({length:n,position:i}){super(`Position \`${i}\` is out of bounds (\`0 < position < ${n}\`).`,{name:"PositionOutOfBoundsError"})}}class eq extends $e{constructor({count:n,limit:i}){super(`Recursive read limit of \`${i}\` exceeded (recursive read count: \`${n}\`).`,{name:"RecursiveReadLimitExceededError"})}}const tq={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new eq({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new W$({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new yD({offset:e});const n=this.position-e;this.assertPosition(n),this.position=n},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new yD({offset:e});const n=this.position+e;this.assertPosition(n),this.position=n},inspectByte(e){const n=e??this.position;return this.assertPosition(n),this.bytes[n]},inspectBytes(e,n){const i=n??this.position;return this.assertPosition(i+e-1),this.bytes.subarray(i,i+e)},inspectUint8(e){const n=e??this.position;return this.assertPosition(n),this.bytes[n]},inspectUint16(e){const n=e??this.position;return this.assertPosition(n+1),this.dataView.getUint16(n)},inspectUint24(e){const n=e??this.position;return this.assertPosition(n+2),(this.dataView.getUint16(n)<<8)+this.dataView.getUint8(n+2)},inspectUint32(e){const n=e??this.position;return this.assertPosition(n+3),this.dataView.getUint32(n)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,n){this.assertReadLimit(),this._touch();const i=this.inspectBytes(e);return this.position+=n??e,i},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const n=this.position;return this.assertPosition(e),this.position=e,()=>this.position=n},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function hS(e,{recursiveReadLimit:n=8192}={}){const i=Object.create(tq);return i.bytes=e,i.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),i.positionReadCount=new Map,i.recursiveReadLimit=n,i}function Iu(e,n="hex"){const i=U8(e),a=hS(new Uint8Array(i.length));return i.encode(a),n==="hex"?lr(a.bytes):a.bytes}function U8(e){return Array.isArray(e)?nq(e.map(n=>U8(n))):rq(e)}function nq(e){const n=e.reduce((u,l)=>u+l.length,0),i=M8(n);return{length:n<=55?1+n:1+i+n,encode(u){n<=55?u.pushByte(192+n):(u.pushByte(247+i),i===1?u.pushUint8(n):i===2?u.pushUint16(n):i===3?u.pushUint24(n):u.pushUint32(n));for(const{encode:l}of e)l(u)}}}function rq(e){const n=typeof e=="string"?Gi(e):e,i=M8(n.length);return{length:n.length===1&&n[0]<128?1:n.length<=55?1+n.length:1+i+n.length,encode(u){n.length===1&&n[0]<128?u.pushBytes(n):n.length<=55?(u.pushByte(128+n.length),u.pushBytes(n)):(u.pushByte(183+i),i===1?u.pushUint8(n.length):i===2?u.pushUint16(n.length):i===3?u.pushUint24(n.length):u.pushUint32(n.length),u.pushBytes(n))}}}function M8(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new $e("Length is too large.")}function _8(e){const{chainId:n,nonce:i,to:a}=e,u=e.contractAddress??e.address,l=Wr(ps(["0x05",Iu([n?Ke(n):"0x",u,i?Ke(i):"0x"])]));return a==="bytes"?Gi(l):l}async function iq(e){const{chainId:n,nonce:i,privateKey:a,to:u="object"}=e,l=e.contractAddress??e.address,f=await dp({hash:_8({address:l,chainId:n,nonce:i}),privateKey:a,to:u});return u==="object"?{address:l,chainId:n,nonce:i,...f}:f}const oq=`Ethereum Signed Message:
278
278
  `;function aq(e){const n=typeof e=="string"?ic(e):typeof e.raw=="string"?e.raw:lr(e.raw),i=ic(`${oq}${an(n)}`);return Io([i,n])}function sq(e,n){return Wr(aq(e),n)}async function uq({message:e,privateKey:n}){return await dp({hash:sq(e),privateKey:n,to:"hex"})}const lq={gwei:9,wei:18},cq={ether:-9,wei:9};function j8(e,n){let i=e.toString();const a=i.startsWith("-");a&&(i=i.slice(1)),i=i.padStart(n,"0");let[u,l]=[i.slice(0,i.length-n),i.slice(i.length-n)];return l=l.replace(/(0+)$/,""),`${a?"-":""}${u||"0"}${l?`.${l}`:""}`}function P8(e,n="wei"){return j8(e,lq[n])}function zi(e,n="wei"){return j8(e,cq[n])}function mg(e){const n=Object.entries(e).map(([a,u])=>u===void 0||u===!1?null:[a,u]).filter(Boolean),i=n.reduce((a,[u])=>Math.max(a,u.length),0);return n.map(([a,u])=>` ${`${a}:`.padEnd(i+1)} ${u}`).join(`
279
279
  `)}class fq extends $e{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
@@ -6,7 +6,7 @@
6
6
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
8
  <title>Paima Explorer</title>
9
- <script type="module" crossorigin src="/assets/index-B-P3QdR3.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-BWhKUMC2.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-foTsy3_g.css">
11
11
  </head>
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paimaexample/explorer",
3
- "version": "0.3.43",
3
+ "version": "0.3.44",
4
4
  "main": "client/dist/index.html",
5
5
  "bin": {
6
6
  "explorer": "cli.cjs"