;
! function() {
    try {
        var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof global ? global : "undefined" != typeof window ? window : "undefined" != typeof self ? self : {},
            n = (new e.Error).stack;
        n && ((e._debugIds || (e._debugIds = {}))[n] = "bb670581-c276-40da-45f5-688d7f9b4a60")
    } catch (e) {}
}();
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["object" == typeof document ? document.currentScript : void 0, 947974, e => {
    "use strict";
    var t = e.i(621030);
    class r extends t.BaseError {
        constructor({
            max: e,
            min: t,
            signed: r,
            size: n,
            value: i
        }) {
            super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`, {
                name: "IntegerOutOfRangeError"
            })
        }
    }
    class n extends t.BaseError {
        constructor(e) {
            super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
                name: "InvalidBytesBooleanError"
            })
        }
    }
    class i extends t.BaseError {
        constructor(e) {
            super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, {
                name: "InvalidHexBooleanError"
            })
        }
    }
    class a extends t.BaseError {
        constructor(e) {
            super(`Hex value "${e}" is an odd length (${e.length}). It must be an even length.`, {
                name: "InvalidHexValueError"
            })
        }
    }
    class s extends t.BaseError {
        constructor({
            givenSize: e,
            maxSize: t
        }) {
            super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`, {
                name: "SizeOverflowError"
            })
        }
    }
    e.s(["IntegerOutOfRangeError", 0, r, "InvalidBytesBooleanError", 0, n, "InvalidHexBooleanError", 0, i, "InvalidHexValueError", 0, a, "SizeOverflowError", 0, s])
}, 605381, 299377, e => {
    "use strict";
    var t = e.i(621030);
    class r extends t.BaseError {
        constructor({
            offset: e,
            position: t,
            size: r
        }) {
            super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`, {
                name: "SliceOffsetOutOfBoundsError"
            })
        }
    }
    class n extends t.BaseError {
        constructor({
            size: e,
            targetSize: t,
            type: r
        }) {
            super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`, {
                name: "SizeExceedsPaddingSizeError"
            })
        }
    }
    class i extends t.BaseError {
        constructor({
            size: e,
            targetSize: t,
            type: r
        }) {
            super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${t} ${r} long, but is ${e} ${r} long.`, {
                name: "InvalidBytesLengthError"
            })
        }
    }

    function a(e, {
        dir: t,
        size: r = 32
    } = {}) {
        if (null === r) return e;
        let i = e.replace("0x", "");
        if (i.length > 2 * r) throw new n({
            size: Math.ceil(i.length / 2),
            targetSize: r,
            type: "hex"
        });
        return `0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`
    }

    function s(e, {
        dir: t,
        size: r = 32
    } = {}) {
        if (null === r) return e;
        if (e.length > r) throw new n({
            size: e.length,
            targetSize: r,
            type: "bytes"
        });
        let i = new Uint8Array(r);
        for (let n = 0; n < r; n++) {
            let a = "right" === t;
            i[a ? n : r - n - 1] = e[a ? n : e.length - n - 1]
        }
        return i
    }
    e.s(["InvalidBytesLengthError", 0, i, "SizeExceedsPaddingSizeError", 0, n, "SliceOffsetOutOfBoundsError", 0, r], 299377), e.s(["pad", 0, function(e, {
        dir: t,
        size: r = 32
    } = {}) {
        return "string" == typeof e ? a(e, {
            dir: t,
            size: r
        }) : s(e, {
            dir: t,
            size: r
        })
    }, "padBytes", 0, s, "padHex", 0, a], 605381)
}, 203375, 229315, e => {
    "use strict";

    function t(e, {
        strict: r = !0
    } = {}) {
        return !!e && "string" == typeof e && (r ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x"))
    }
    e.s(["isHex", 0, t], 229315), e.s(["size", 0, function(e) {
        return t(e, {
            strict: !1
        }) ? Math.ceil((e.length - 2) / 2) : e.length
    }], 203375)
}, 19472, e => {
    "use strict";
    e.s(["trim", 0, function(e, {
        dir: t = "left"
    } = {}) {
        let r = "string" == typeof e ? e.replace("0x", "") : e,
            n = 0;
        for (let e = 0; e < r.length - 1; e++)
            if ("0" === r["left" === t ? e : r.length - e - 1].toString()) n++;
            else break;
        return (r = "left" === t ? r.slice(n) : r.slice(0, r.length - n), "string" == typeof e) ? (1 === r.length && "right" === t && (r = `${r}0`), `0x${r.length%2==1?`0${r}`:r}`) : r
    }])
}, 318877, e => {
    "use strict";
    e.s(["boolToBytes", () => c, "hexToBytes", () => f, "numberToBytes", () => d, "stringToBytes", () => l, "toBytes", () => o]);
    var t = e.i(621030),
        r = e.i(229315),
        n = e.i(605381),
        i = e.i(637608),
        a = e.i(186897);
    let s = new TextEncoder;

    function o(e, t = {}) {
        return "number" == typeof e || "bigint" == typeof e ? d(e, t) : "boolean" == typeof e ? c(e, t) : (0, r.isHex)(e) ? f(e, t) : l(e, t)
    }

    function c(e, t = {}) {
        let r = new Uint8Array(1);
        return (r[0] = Number(e), "number" == typeof t.size) ? ((0, i.assertSize)(r, {
            size: t.size
        }), (0, n.pad)(r, {
            size: t.size
        })) : r
    }

    function u(e) {
        return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : void 0
    }

    function f(e, r = {}) {
        let a = e;
        r.size && ((0, i.assertSize)(a, {
            size: r.size
        }), a = (0, n.pad)(a, {
            dir: "right",
            size: r.size
        }));
        let s = a.slice(2);
        s.length % 2 && (s = `0${s}`);
        let o = s.length / 2,
            c = new Uint8Array(o);
        for (let e = 0, r = 0; e < o; e++) {
            let n = u(s.charCodeAt(r++)),
                i = u(s.charCodeAt(r++));
            if (void 0 === n || void 0 === i) throw new t.BaseError(`Invalid byte sequence ("${s[r-2]}${s[r-1]}" in "${s}").`);
            c[e] = 16 * n + i
        }
        return c
    }

    function d(e, t) {
        return f((0, a.numberToHex)(e, t))
    }

    function l(e, t = {}) {
        let r = s.encode(e);
        return "number" == typeof t.size ? ((0, i.assertSize)(r, {
            size: t.size
        }), (0, n.pad)(r, {
            dir: "right",
            size: t.size
        })) : r
    }
}, 637608, e => {
    "use strict";
    e.s(["assertSize", () => a, "fromHex", () => s, "hexToBigInt", () => o, "hexToBool", () => c, "hexToNumber", () => u, "hexToString", () => f]);
    var t = e.i(947974),
        r = e.i(203375),
        n = e.i(19472),
        i = e.i(318877);

    function a(e, {
        size: n
    }) {
        if ((0, r.size)(e) > n) throw new t.SizeOverflowError({
            givenSize: (0, r.size)(e),
            maxSize: n
        })
    }

    function s(e, t) {
        let r = "string" == typeof t ? {
                to: t
            } : t,
            n = r.to;
        return "number" === n ? u(e, r) : "bigint" === n ? o(e, r) : "string" === n ? f(e, r) : "boolean" === n ? c(e, r) : (0, i.hexToBytes)(e, r)
    }

    function o(e, t = {}) {
        let {
            signed: r
        } = t;
        t.size && a(e, {
            size: t.size
        });
        let n = BigInt(e);
        if (!r) return n;
        let i = (e.length - 2) / 2;
        return n <= (1 n << 8 n * BigInt(i) - 1 n) - 1 n ? n : n - BigInt(`0x${"f".padStart(2*i,"f")}`) - 1 n
    }

    function c(e, r = {}) {
        let i = e;
        if (r.size && (a(i, {
                size: r.size
            }), i = (0, n.trim)(i)), "0x00" === (0, n.trim)(i)) return !1;
        if ("0x01" === (0, n.trim)(i)) return !0;
        throw new t.InvalidHexBooleanError(i)
    }

    function u(e, r = {}) {
        let n = o(e, r),
            i = Number(n);
        if (!Number.isSafeInteger(i)) throw new t.IntegerOutOfRangeError({
            max: `${Number.MAX_SAFE_INTEGER}`,
            min: `${Number.MIN_SAFE_INTEGER}`,
            signed: r.signed,
            size: r.size,
            value: `${n}n`
        });
        return i
    }

    function f(e, t = {}) {
        let r = (0, i.hexToBytes)(e);
        return t.size && (a(r, {
            size: t.size
        }), r = (0, n.trim)(r, {
            dir: "right"
        })), new TextDecoder().decode(r)
    }
}, 186897, e => {
    "use strict";
    e.s(["boolToHex", () => s, "bytesToHex", () => o, "numberToHex", () => c, "stringToHex", () => f, "toHex", () => a]);
    var t = e.i(947974),
        r = e.i(605381),
        n = e.i(637608);
    let i = Array.from({
        length: 256
    }, (e, t) => t.toString(16).padStart(2, "0"));

    function a(e, t = {}) {
        return "number" == typeof e || "bigint" == typeof e ? c(e, t) : "string" == typeof e ? f(e, t) : "boolean" == typeof e ? s(e, t) : o(e, t)
    }

    function s(e, t = {}) {
        let i = `0x${Number(e)}`;
        return "number" == typeof t.size ? ((0, n.assertSize)(i, {
            size: t.size
        }), (0, r.pad)(i, {
            size: t.size
        })) : i
    }

    function o(e, t = {}) {
        let a = "";
        for (let t = 0; t < e.length; t++) a += i[e[t]];
        let s = `0x${a}`;
        return "number" == typeof t.size ? ((0, n.assertSize)(s, {
            size: t.size
        }), (0, r.pad)(s, {
            dir: "right",
            size: t.size
        })) : s
    }

    function c(e, n = {}) {
        let i, {
                signed: a,
                size: s
            } = n,
            o = BigInt(e);
        s ? i = a ? (1 n << 8 n * BigInt(s) - 1 n) - 1 n : 2 n ** (8 n * BigInt(s)) - 1 n : "number" == typeof e && (i = BigInt(Number.MAX_SAFE_INTEGER));
        let u = "bigint" == typeof i && a ? -i - 1 n : 0;
        if (i && o > i || o < u) {
            let r = "bigint" == typeof e ? "n" : "";
            throw new t.IntegerOutOfRangeError({
                max: i ? `${i}${r}` : void 0,
                min: `${u}${r}`,
                signed: a,
                size: s,
                value: `${e}${r}`
            })
        }
        let f = `0x${(a&&o<0?(1n<<BigInt(8*s))+BigInt(o):o).toString(16)}`;
        return s ? (0, r.pad)(f, {
            size: s
        }) : f
    }
    let u = new TextEncoder;

    function f(e, t = {}) {
        return o(u.encode(e), t)
    }
}, 108157, e => {
    "use strict";
    var t = e.i(621030);
    class r extends t.BaseError {
        constructor({
            address: e
        }) {
            super(`Address "${e}" is invalid.`, {
                metaMessages: ["- Address must be a hex value of 20 bytes (40 hex characters).", "- Address must match its checksum counterpart."],
                name: "InvalidAddressError"
            })
        }
    }
    e.s(["InvalidAddressError", 0, r])
}, 415013, e => {
    "use strict";
    var t = e.i(918196),
        r = e.i(229315),
        n = e.i(318877),
        i = e.i(186897);
    e.s(["keccak256", 0, function(e, a) {
        let s = (0, t.keccak_256)((0, r.isHex)(e, {
            strict: !1
        }) ? (0, n.toBytes)(e) : e);
        return "bytes" === (a || "hex") ? s : (0, i.toHex)(s)
    }])
}, 571333, e => {
    "use strict";
    e.s(["isAddress", () => a]);
    var t = e.i(979281),
        r = e.i(113967);
    let n = /^0x[a-fA-F0-9]{40}$/,
        i = new t.LruMap(8192);

    function a(e, t) {
        let {
            strict: a = !0
        } = t ? ? {}, s = `${e}.${a}`;
        if (i.has(s)) return i.get(s);
        let o = !!n.test(e) && (e.toLowerCase() === e || !a || (0, r.checksumAddress)(e) === e);
        return i.set(s, o), o
    }
}, 113967, e => {
    "use strict";
    e.s(["checksumAddress", () => o, "getAddress", () => c]);
    var t = e.i(108157),
        r = e.i(318877),
        n = e.i(415013),
        i = e.i(979281),
        a = e.i(571333);
    let s = new i.LruMap(8192);

    function o(e, t) {
        if (s.has(`${e}.${t}`)) return s.get(`${e}.${t}`);
        let i = t ? `${t}${e.toLowerCase()}` : e.substring(2).toLowerCase(),
            a = (0, n.keccak256)((0, r.stringToBytes)(i), "bytes"),
            o = (t ? i.substring(`${t}0x`.length) : i).split("");
        for (let e = 0; e < 40; e += 2) a[e >> 1] >> 4 >= 8 && o[e] && (o[e] = o[e].toUpperCase()), (15 & a[e >> 1]) >= 8 && o[e + 1] && (o[e + 1] = o[e + 1].toUpperCase());
        let c = `0x${o.join("")}`;
        return s.set(`${e}.${t}`, c), c
    }

    function c(e, r) {
        if (!(0, a.isAddress)(e, {
                strict: !1
            })) throw new t.InvalidAddressError({
            address: e
        });
        return o(e, r)
    }
}, 687e3, e => {
    "use strict";
    var t = e.i(108157),
        r = e.i(571333);
    e.s(["isAddressEqual", 0, function(e, n) {
        if (!(0, r.isAddress)(e, {
                strict: !1
            })) throw new t.InvalidAddressError({
            address: e
        });
        if (!(0, r.isAddress)(n, {
                strict: !1
            })) throw new t.InvalidAddressError({
            address: n
        });
        return e.toLowerCase() === n.toLowerCase()
    }])
}, 372387, e => {
    "use strict";
    e.s(["parseAccount", 0, function(e) {
        return "string" == typeof e ? {
            address: e,
            type: "json-rpc"
        } : e
    }])
}, 249618, 54541, e => {
    "use strict";
    var t = e.i(186897);

    function r(e, t) {
        return ({
            exclude: r,
            format: n
        }) => ({
            exclude: r,
            format: (e, i) => {
                let a = t(e, i);
                if (r)
                    for (let e of r) delete a[e];
                return { ...a,
                    ...n(e, i)
                }
            },
            type: e
        })
    }
    e.s(["defineFormatter", 0, r], 54541);
    let n = {
        legacy: "0x0",
        eip2930: "0x1",
        eip1559: "0x2",
        eip4844: "0x3",
        eip7702: "0x4"
    };

    function i(e, r) {
        let i = {};
        return void 0 !== e.authorizationList && (i.authorizationList = e.authorizationList.map(e => ({
            address: e.address,
            r: e.r ? (0, t.numberToHex)(BigInt(e.r)) : e.r,
            s: e.s ? (0, t.numberToHex)(BigInt(e.s)) : e.s,
            chainId: (0, t.numberToHex)(e.chainId),
            nonce: (0, t.numberToHex)(e.nonce),
            ...void 0 !== e.yParity ? {
                yParity: (0, t.numberToHex)(e.yParity)
            } : {},
            ...void 0 !== e.v && void 0 === e.yParity ? {
                v: (0, t.numberToHex)(e.v)
            } : {}
        }))), void 0 !== e.accessList && (i.accessList = e.accessList), void 0 !== e.blobVersionedHashes && (i.blobVersionedHashes = e.blobVersionedHashes), void 0 !== e.blobs && ("string" != typeof e.blobs[0] ? i.blobs = e.blobs.map(e => (0, t.bytesToHex)(e)) : i.blobs = e.blobs), void 0 !== e.data && (i.data = e.data), e.account && (i.from = e.account.address), void 0 !== e.from && (i.from = e.from), void 0 !== e.gas && (i.gas = (0, t.numberToHex)(e.gas)), void 0 !== e.gasPrice && (i.gasPrice = (0, t.numberToHex)(e.gasPrice)), void 0 !== e.maxFeePerBlobGas && (i.maxFeePerBlobGas = (0, t.numberToHex)(e.maxFeePerBlobGas)), void 0 !== e.maxFeePerGas && (i.maxFeePerGas = (0, t.numberToHex)(e.maxFeePerGas)), void 0 !== e.maxPriorityFeePerGas && (i.maxPriorityFeePerGas = (0, t.numberToHex)(e.maxPriorityFeePerGas)), void 0 !== e.nonce && (i.nonce = (0, t.numberToHex)(e.nonce)), void 0 !== e.to && (i.to = e.to), void 0 !== e.type && (i.type = n[e.type]), void 0 !== e.value && (i.value = (0, t.numberToHex)(e.value)), i
    }
    let a = r("transactionRequest", i);
    e.s(["defineTransactionRequest", 0, a, "formatTransactionRequest", 0, i, "rpcTransactionType", 0, n], 249618)
}, 306243, e => {
    "use strict";
    e.s(["maxInt104", 0, 2 n ** (104 n - 1 n) - 1 n, "maxInt112", 0, 2 n ** (112 n - 1 n) - 1 n, "maxInt120", 0, 2 n ** (120 n - 1 n) - 1 n, "maxInt128", 0, 2 n ** (128 n - 1 n) - 1 n, "maxInt136", 0, 2 n ** (136 n - 1 n) - 1 n, "maxInt144", 0, 2 n ** (144 n - 1 n) - 1 n, "maxInt152", 0, 2 n ** (152 n - 1 n) - 1 n, "maxInt16", 0, 2 n ** (16 n - 1 n) - 1 n, "maxInt160", 0, 2 n ** (160 n - 1 n) - 1 n, "maxInt168", 0, 2 n ** (168 n - 1 n) - 1 n, "maxInt176", 0, 2 n ** (176 n - 1 n) - 1 n, "maxInt184", 0, 2 n ** (184 n - 1 n) - 1 n, "maxInt192", 0, 2 n ** (192 n - 1 n) - 1 n, "maxInt200", 0, 2 n ** (200 n - 1 n) - 1 n, "maxInt208", 0, 2 n ** (208 n - 1 n) - 1 n, "maxInt216", 0, 2 n ** (216 n - 1 n) - 1 n, "maxInt224", 0, 2 n ** (224 n - 1 n) - 1 n, "maxInt232", 0, 2 n ** (232 n - 1 n) - 1 n, "maxInt24", 0, 2 n ** (24 n - 1 n) - 1 n, "maxInt240", 0, 2 n ** (240 n - 1 n) - 1 n, "maxInt248", 0, 2 n ** (248 n - 1 n) - 1 n, "maxInt256", 0, 2 n ** (256 n - 1 n) - 1 n, "maxInt32", 0, 2 n ** (32 n - 1 n) - 1 n, "maxInt40", 0, 2 n ** (40 n - 1 n) - 1 n, "maxInt48", 0, 2 n ** (48 n - 1 n) - 1 n, "maxInt56", 0, 2 n ** (56 n - 1 n) - 1 n, "maxInt64", 0, 2 n ** (64 n - 1 n) - 1 n, "maxInt72", 0, 2 n ** (72 n - 1 n) - 1 n, "maxInt8", 0, 2 n ** (8 n - 1 n) - 1 n, "maxInt80", 0, 2 n ** (80 n - 1 n) - 1 n, "maxInt88", 0, 2 n ** (88 n - 1 n) - 1 n, "maxInt96", 0, 2 n ** (96 n - 1 n) - 1 n, "maxUint104", 0, 2 n ** 104 n - 1 n, "maxUint112", 0, 2 n ** 112 n - 1 n, "maxUint120", 0, 2 n ** 120 n - 1 n, "maxUint128", 0, 2 n ** 128 n - 1 n, "maxUint136", 0, 2 n ** 136 n - 1 n, "maxUint144", 0, 2 n ** 144 n - 1 n, "maxUint152", 0, 2 n ** 152 n - 1 n, "maxUint16", 0, 2 n ** 16 n - 1 n, "maxUint160", 0, 2 n ** 160 n - 1 n, "maxUint168", 0, 2 n ** 168 n - 1 n, "maxUint176", 0, 2 n ** 176 n - 1 n, "maxUint184", 0, 2 n ** 184 n - 1 n, "maxUint192", 0, 2 n ** 192 n - 1 n, "maxUint200", 0, 2 n ** 200 n - 1 n, "maxUint208", 0, 2 n ** 208 n - 1 n, "maxUint216", 0, 2 n ** 216 n - 1 n, "maxUint224", 0, 2 n ** 224 n - 1 n, "maxUint232", 0, 2 n ** 232 n - 1 n, "maxUint24", 0, 2 n ** 24 n - 1 n, "maxUint240", 0, 2 n ** 240 n - 1 n, "maxUint248", 0, 2 n ** 248 n - 1 n, "maxUint256", 0, 2 n ** 256 n - 1 n, "maxUint32", 0, 2 n ** 32 n - 1 n, "maxUint40", 0, 2 n ** 40 n - 1 n, "maxUint48", 0, 2 n ** 48 n - 1 n, "maxUint56", 0, 2 n ** 56 n - 1 n, "maxUint64", 0, 2 n ** 64 n - 1 n, "maxUint72", 0, 2 n ** 72 n - 1 n, "maxUint8", 0, 2 n ** 8 n - 1 n, "maxUint80", 0, 2 n ** 80 n - 1 n, "maxUint88", 0, 2 n ** 88 n - 1 n, "maxUint96", 0, 2 n ** 96 n - 1 n, "minInt104", 0, -(2 n ** (104 n - 1 n)), "minInt112", 0, -(2 n ** (112 n - 1 n)), "minInt120", 0, -(2 n ** (120 n - 1 n)), "minInt128", 0, -(2 n ** (128 n - 1 n)), "minInt136", 0, -(2 n ** (136 n - 1 n)), "minInt144", 0, -(2 n ** (144 n - 1 n)), "minInt152", 0, -(2 n ** (152 n - 1 n)), "minInt16", 0, -(2 n ** (16 n - 1 n)), "minInt160", 0, -(2 n ** (160 n - 1 n)), "minInt168", 0, -(2 n ** (168 n - 1 n)), "minInt176", 0, -(2 n ** (176 n - 1 n)), "minInt184", 0, -(2 n ** (184 n - 1 n)), "minInt192", 0, -(2 n ** (192 n - 1 n)), "minInt200", 0, -(2 n ** (200 n - 1 n)), "minInt208", 0, -(2 n ** (208 n - 1 n)), "minInt216", 0, -(2 n ** (216 n - 1 n)), "minInt224", 0, -(2 n ** (224 n - 1 n)), "minInt232", 0, -(2 n ** (232 n - 1 n)), "minInt24", 0, -(2 n ** (24 n - 1 n)), "minInt240", 0, -(2 n ** (240 n - 1 n)), "minInt248", 0, -(2 n ** (248 n - 1 n)), "minInt256", 0, -(2 n ** (256 n - 1 n)), "minInt32", 0, -(2 n ** (32 n - 1 n)), "minInt40", 0, -(2 n ** (40 n - 1 n)), "minInt48", 0, -(2 n ** (48 n - 1 n)), "minInt56", 0, -(2 n ** (56 n - 1 n)), "minInt64", 0, -(2 n ** (64 n - 1 n)), "minInt72", 0, -(2 n ** (72 n - 1 n)), "minInt8", 0, -(2 n ** (8 n - 1 n)), "minInt80", 0, -(2 n ** (80 n - 1 n)), "minInt88", 0, -(2 n ** (88 n - 1 n)), "minInt96", 0, -(2 n ** (96 n - 1 n))])
}, 844268, e => {
    "use strict";

    function t(e) {
        let t = 0;
        for (let r of e) t += r.length;
        let r = new Uint8Array(t),
            n = 0;
        for (let t of e) r.set(t, n), n += t.length;
        return r
    }

    function r(e) {
        return `0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`
    }
    e.s(["concat", 0, function(e) {
        return "string" == typeof e[0] ? r(e) : t(e)
    }, "concatBytes", 0, t, "concatHex", 0, r])
}, 857302, 292279, e => {
    "use strict";
    var t = e.i(621030);
    class r extends t.BaseError {
        constructor({
            offset: e
        }) {
            super(`Offset \`${e}\` cannot be negative.`, {
                name: "NegativeOffsetError"
            })
        }
    }
    class n extends t.BaseError {
        constructor({
            length: e,
            position: t
        }) {
            super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`, {
                name: "PositionOutOfBoundsError"
            })
        }
    }
    class i extends t.BaseError {
        constructor({
            count: e,
            limit: t
        }) {
            super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`, {
                name: "RecursiveReadLimitExceededError"
            })
        }
    }
    e.s(["NegativeOffsetError", 0, r, "PositionOutOfBoundsError", 0, n, "RecursiveReadLimitExceededError", 0, i], 292279);
    let a = {
        bytes: new Uint8Array,
        dataView: new DataView(new ArrayBuffer(0)),
        position: 0,
        positionReadCount: new Map,
        recursiveReadCount: 0,
        recursiveReadLimit: 1 / 0,
        assertReadLimit() {
            if (this.recursiveReadCount >= this.recursiveReadLimit) throw new i({
                count: this.recursiveReadCount + 1,
                limit: this.recursiveReadLimit
            })
        },
        assertPosition(e) {
            if (e < 0 || e > this.bytes.length - 1) throw new n({
                length: this.bytes.length,
                position: e
            })
        },
        decrementPosition(e) {
            if (e < 0) throw new r({
                offset: e
            });
            let t = this.position - e;
            this.assertPosition(t), this.position = t
        },
        getReadCount(e) {
            return this.positionReadCount.get(e || this.position) || 0
        },
        incrementPosition(e) {
            if (e < 0) throw new r({
                offset: e
            });
            let t = this.position + e;
            this.assertPosition(t), this.position = t
        },
        inspectByte(e) {
            let t = e ? ? this.position;
            return this.assertPosition(t), this.bytes[t]
        },
        inspectBytes(e, t) {
            let r = t ? ? this.position;
            return this.assertPosition(r + e - 1), this.bytes.subarray(r, r + e)
        },
        inspectUint8(e) {
            let t = e ? ? this.position;
            return this.assertPosition(t), this.bytes[t]
        },
        inspectUint16(e) {
            let t = e ? ? this.position;
            return this.assertPosition(t + 1), this.dataView.getUint16(t)
        },
        inspectUint24(e) {
            let t = e ? ? this.position;
            return this.assertPosition(t + 2), (this.dataView.getUint16(t) << 8) + this.dataView.getUint8(t + 2)
        },
        inspectUint32(e) {
            let t = e ? ? this.position;
            return this.assertPosition(t + 3), this.dataView.getUint32(t)
        },
        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, 255 & e), this.position += 3
        },
        pushUint32(e) {
            this.assertPosition(this.position + 3), this.dataView.setUint32(this.position, e), this.position += 4
        },
        readByte() {
            this.assertReadLimit(), this._touch();
            let e = this.inspectByte();
            return this.position++, e
        },
        readBytes(e, t) {
            this.assertReadLimit(), this._touch();
            let r = this.inspectBytes(e);
            return this.position += t ? ? e, r
        },
        readUint8() {
            this.assertReadLimit(), this._touch();
            let e = this.inspectUint8();
            return this.position += 1, e
        },
        readUint16() {
            this.assertReadLimit(), this._touch();
            let e = this.inspectUint16();
            return this.position += 2, e
        },
        readUint24() {
            this.assertReadLimit(), this._touch();
            let e = this.inspectUint24();
            return this.position += 3, e
        },
        readUint32() {
            this.assertReadLimit(), this._touch();
            let e = this.inspectUint32();
            return this.position += 4, e
        },
        get remaining() {
            return this.bytes.length - this.position
        },
        setPosition(e) {
            let t = this.position;
            return this.assertPosition(e), this.position = e, () => this.position = t
        },
        _touch() {
            if (this.recursiveReadLimit === 1 / 0) return;
            let e = this.getReadCount();
            this.positionReadCount.set(this.position, e + 1), e > 0 && this.recursiveReadCount++
        }
    };
    e.s(["createCursor", 0, function(e, {
        recursiveReadLimit: t = 8192
    } = {}) {
        let r = Object.create(a);
        return r.bytes = e, r.dataView = new DataView(e.buffer ? ? e, e.byteOffset, e.byteLength), r.positionReadCount = new Map, r.recursiveReadLimit = t, r
    }], 857302)
}, 936404, e => {
    "use strict";
    var t = e.i(642615),
        r = e.i(882860);
    e.s(["formatEther", 0, function(e, n = "wei") {
        return (0, r.formatUnits)(e, t.etherUnits[n])
    }])
}, 484309, e => {
    "use strict";
    var t = e.i(936404),
        r = e.i(949853),
        n = e.i(621030);

    function i(e) {
        let t = Object.entries(e).map(([e, t]) => void 0 === t || !1 === t ? null : [e, t]).filter(Boolean),
            r = t.reduce((e, [t]) => Math.max(e, t.length), 0);
        return t.map(([e, t]) => `  ${`${e}:`.padEnd(r+1)}  ${t}`).join("\n")
    }
    class a extends n.BaseError {
        constructor() {
            super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.", {
                name: "FeeConflictError"
            })
        }
    }
    class s extends n.BaseError {
        constructor({
            v: e
        }) {
            super(`Invalid \`v\` value "${e}". Expected 27 or 28.`, {
                name: "InvalidLegacyVError"
            })
        }
    }
    class o extends n.BaseError {
        constructor({
            transaction: e
        }) {
            super("Cannot infer a transaction type from provided transaction.", {
                metaMessages: ["Provided Transaction:", "{", i(e), "}", "", "To infer the type, either provide:", "- a `type` to the Transaction, or", "- an EIP-1559 Transaction with `maxFeePerGas`, or", "- an EIP-2930 Transaction with `gasPrice` & `accessList`, or", "- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or", "- an EIP-7702 Transaction with `authorizationList`, or", "- a Legacy Transaction with `gasPrice`"],
                name: "InvalidSerializableTransactionError"
            })
        }
    }
    class c extends n.BaseError {
        constructor({
            serializedType: e
        }) {
            super(`Serialized transaction type "${e}" is invalid.`, {
                name: "InvalidSerializedTransactionType"
            }), Object.defineProperty(this, "serializedType", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.serializedType = e
        }
    }
    class u extends n.BaseError {
        constructor({
            attributes: e,
            serializedTransaction: t,
            type: r
        }) {
            const n = Object.entries(e).map(([e, t]) => void 0 === t ? e : void 0).filter(Boolean);
            super(`Invalid serialized transaction of type "${r}" was provided.`, {
                metaMessages: [`Serialized Transaction: "${t}"`, n.length > 0 ? `Missing Attributes: ${n.join(", ")}` : ""].filter(Boolean),
                name: "InvalidSerializedTransactionError"
            }), Object.defineProperty(this, "serializedTransaction", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "type", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.serializedTransaction = t, this.type = r
        }
    }
    class f extends n.BaseError {
        constructor({
            storageKey: e
        }) {
            super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`, {
                name: "InvalidStorageKeySizeError"
            })
        }
    }
    class d extends n.BaseError {
        constructor(e, {
            account: n,
            docsPath: a,
            chain: s,
            data: o,
            gas: c,
            gasPrice: u,
            maxFeePerGas: f,
            maxPriorityFeePerGas: d,
            nonce: l,
            to: b,
            value: p
        }) {
            const m = i({
                chain: s && `${s?.name} (id: ${s?.id})`,
                from: n ? .address,
                to: b,
                value: void 0 !== p && `${(0,t.formatEther)(p)} ${s?.nativeCurrency?.symbol||"ETH"}`,
                data: o,
                gas: c,
                gasPrice: void 0 !== u && `${(0,r.formatGwei)(u)} gwei`,
                maxFeePerGas: void 0 !== f && `${(0,r.formatGwei)(f)} gwei`,
                maxPriorityFeePerGas: void 0 !== d && `${(0,r.formatGwei)(d)} gwei`,
                nonce: l
            });
            super(e.shortMessage, {
                cause: e,
                docsPath: a,
                metaMessages: [...e.metaMessages ? [...e.metaMessages, " "] : [], "Request Arguments:", m].filter(Boolean),
                name: "TransactionExecutionError"
            }), Object.defineProperty(this, "cause", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.cause = e
        }
    }
    class l extends n.BaseError {
        constructor({
            blockHash: e,
            blockNumber: t,
            blockTag: r,
            hash: n,
            index: i
        }) {
            let a = "Transaction";
            r && void 0 !== i && (a = `Transaction at block time "${r}" at index "${i}"`), e && void 0 !== i && (a = `Transaction at block hash "${e}" at index "${i}"`), t && void 0 !== i && (a = `Transaction at block number "${t}" at index "${i}"`), n && (a = `Transaction with hash "${n}"`), super(`${a} could not be found.`, {
                name: "TransactionNotFoundError"
            })
        }
    }
    class b extends n.BaseError {
        constructor({
            hash: e
        }) {
            super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`, {
                name: "TransactionReceiptNotFoundError"
            })
        }
    }
    class p extends n.BaseError {
        constructor({
            receipt: e
        }) {
            super(`Transaction with hash "${e.transactionHash}" reverted.`, {
                metaMessages: ['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.', " ", "You can attempt to extract the revert reason by:", "- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract", "- using the `call` Action with raw `data`"],
                name: "TransactionReceiptRevertedError"
            }), Object.defineProperty(this, "receipt", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.receipt = e
        }
    }
    class m extends n.BaseError {
        constructor({
            hash: e
        }) {
            super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`, {
                name: "WaitForTransactionReceiptTimeoutError"
            })
        }
    }
    e.s(["FeeConflictError", 0, a, "InvalidLegacyVError", 0, s, "InvalidSerializableTransactionError", 0, o, "InvalidSerializedTransactionError", 0, u, "InvalidSerializedTransactionTypeError", 0, c, "InvalidStorageKeySizeError", 0, f, "TransactionExecutionError", 0, d, "TransactionNotFoundError", 0, l, "TransactionReceiptNotFoundError", 0, b, "TransactionReceiptRevertedError", 0, p, "WaitForTransactionReceiptTimeoutError", 0, m, "prettyPrint", 0, i])
}, 603641, e => {
    "use strict";
    var t = e.i(621030);
    class r extends t.BaseError {
        constructor({
            blockNumber: e,
            chain: t,
            contract: r
        }) {
            super(`Chain "${t.name}" does not support contract "${r.name}".`, {
                metaMessages: ["This could be due to any of the following:", ...e && r.blockCreated && r.blockCreated > e ? [`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`] : [`- The chain does not have the contract "${r.name}" configured.`]],
                name: "ChainDoesNotSupportContract"
            })
        }
    }
    class n extends t.BaseError {
        constructor({
            chain: e,
            currentChainId: t
        }) {
            super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`, {
                metaMessages: [`Current Chain ID:  ${t}`, `Expected Chain ID: ${e.id} – ${e.name}`],
                name: "ChainMismatchError"
            })
        }
    }
    class i extends t.BaseError {
        constructor() {
            super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.", {
                name: "ChainNotFoundError"
            })
        }
    }
    class a extends t.BaseError {
        constructor() {
            super("No chain was provided to the Client.", {
                name: "ClientChainNotConfiguredError"
            })
        }
    }
    class s extends t.BaseError {
        constructor({
            chainId: e
        }) {
            super("number" == typeof e ? `Chain ID "${e}" is invalid.` : "Chain ID is invalid.", {
                name: "InvalidChainIdError"
            })
        }
    }
    e.s(["ChainDoesNotSupportContract", 0, r, "ChainMismatchError", 0, n, "ChainNotFoundError", 0, i, "ClientChainNotConfiguredError", 0, a, "InvalidChainIdError", 0, s])
}, 394254, e => {
    "use strict";
    var t = e.i(299377),
        r = e.i(229315),
        n = e.i(203375);

    function i(e, r) {
        if ("number" == typeof r && r > 0 && r > (0, n.size)(e) - 1) throw new t.SliceOffsetOutOfBoundsError({
            offset: r,
            position: "start",
            size: (0, n.size)(e)
        })
    }

    function a(e, r, i) {
        if ("number" == typeof r && "number" == typeof i && (0, n.size)(e) !== i - r) throw new t.SliceOffsetOutOfBoundsError({
            offset: i,
            position: "end",
            size: (0, n.size)(e)
        })
    }

    function s(e, t, r, {
        strict: n
    } = {}) {
        i(e, t);
        let o = e.slice(t, r);
        return n && a(o, t, r), o
    }

    function o(e, t, r, {
        strict: n
    } = {}) {
        i(e, t);
        let s = `0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;
        return n && a(s, t, r), s
    }
    e.s(["slice", 0, function(e, t, n, {
        strict: i
    } = {}) {
        return (0, r.isHex)(e, {
            strict: !1
        }) ? o(e, t, n, {
            strict: i
        }) : s(e, t, n, {
            strict: i
        })
    }, "sliceBytes", 0, s, "sliceHex", 0, o])
}, 624297, 628584, e => {
    "use strict";

    function t(e, {
        includeName: n = !1
    } = {}) {
        if ("function" !== e.type && "event" !== e.type && "error" !== e.type) throw new T(e.type);
        return `${e.name}(${r(e.inputs,{includeName:n})})`
    }

    function r(e, {
        includeName: t = !1
    } = {}) {
        return e ? e.map(e => (function(e, {
            includeName: t
        }) {
            return e.type.startsWith("tuple") ? `(${r(e.components,{includeName:t})})${e.type.slice(5)}` : e.type + (t && e.name ? ` ${e.name}` : "")
        })(e, {
            includeName: t
        })).join(t ? ", " : ",") : ""
    }
    e.s(["AbiConstructorNotFoundError", () => a, "AbiConstructorParamsNotFoundError", () => s, "AbiDecodingDataSizeInvalidError", () => o, "AbiDecodingDataSizeTooSmallError", () => c, "AbiDecodingZeroDataError", () => u, "AbiEncodingArrayLengthMismatchError", () => f, "AbiEncodingBytesSizeMismatchError", () => d, "AbiEncodingLengthMismatchError", () => l, "AbiErrorInputsNotFoundError", () => b, "AbiErrorNotFoundError", () => p, "AbiErrorSignatureNotFoundError", () => m, "AbiEventNotFoundError", () => g, "AbiEventSignatureEmptyTopicsError", () => h, "AbiEventSignatureNotFoundError", () => y, "AbiFunctionNotFoundError", () => v, "AbiFunctionOutputsNotFoundError", () => x, "AbiFunctionSignatureNotFoundError", () => E, "AbiItemAmbiguityError", () => w, "BytesSizeMismatchError", () => $, "DecodeLogDataMismatch", () => I, "DecodeLogTopicsMismatch", () => A, "InvalidAbiDecodingTypeError", () => P, "InvalidAbiEncodingTypeError", () => B, "InvalidArrayError", () => S, "InvalidDefinitionTypeError", () => T, "UnsupportedPackedAbiType", () => z], 624297), e.s(["formatAbiItem", () => t, "formatAbiParams", () => r], 628584);
    var n = e.i(203375),
        i = e.i(621030);
    class a extends i.BaseError {
        constructor({
            docsPath: e
        }) {
            super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.", {
                docsPath: e,
                name: "AbiConstructorNotFoundError"
            })
        }
    }
    class s extends i.BaseError {
        constructor({
            docsPath: e
        }) {
            super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.", {
                docsPath: e,
                name: "AbiConstructorParamsNotFoundError"
            })
        }
    }
    class o extends i.BaseError {
        constructor({
            data: e,
            size: t
        }) {
            super(`Data size of ${t} bytes is invalid.
Size must be in increments of 32 bytes (size % 32 === 0).`, {
                metaMessages: [`Data: ${e} (${t} bytes)`],
                name: "AbiDecodingDataSizeInvalidError"
            })
        }
    }
    class c extends i.BaseError {
        constructor({
            data: e,
            params: t,
            size: n
        }) {
            super(`Data size of ${n} bytes is too small for given parameters.`, {
                metaMessages: [`Params: (${r(t,{includeName:!0})})`, `Data:   ${e} (${n} bytes)`],
                name: "AbiDecodingDataSizeTooSmallError"
            }), Object.defineProperty(this, "data", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "params", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "size", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.data = e, this.params = t, this.size = n
        }
    }
    class u extends i.BaseError {
        constructor({
            cause: e
        } = {}) {
            super('Cannot decode zero data ("0x") with ABI parameters.', {
                name: "AbiDecodingZeroDataError",
                cause: e
            })
        }
    }
    class f extends i.BaseError {
        constructor({
            expectedLength: e,
            givenLength: t,
            type: r
        }) {
            super(`ABI encoding array length mismatch for type ${r}.
Expected length: ${e}
Given length: ${t}`, {
                name: "AbiEncodingArrayLengthMismatchError"
            })
        }
    }
    class d extends i.BaseError {
        constructor({
            expectedSize: e,
            value: t
        }) {
            super(`Size of bytes "${t}" (bytes${(0,n.size)(t)}) does not match expected size (bytes${e}).`, {
                name: "AbiEncodingBytesSizeMismatchError"
            })
        }
    }
    class l extends i.BaseError {
        constructor({
            expectedLength: e,
            givenLength: t
        }) {
            super(`ABI encoding params/values length mismatch.
Expected length (params): ${e}
Given length (values): ${t}`, {
                name: "AbiEncodingLengthMismatchError"
            })
        }
    }
    class b extends i.BaseError {
        constructor(e, {
            docsPath: t
        }) {
            super(`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).
Cannot encode error result without knowing what the parameter types are.
Make sure you are using the correct ABI and that the inputs exist on it.`, {
                docsPath: t,
                name: "AbiErrorInputsNotFoundError"
            })
        }
    }
    class p extends i.BaseError {
        constructor(e, {
            docsPath: t
        } = {}) {
            super(`Error ${e?`"${e}" `:""}not found on ABI.
Make sure you are using the correct ABI and that the error exists on it.`, {
                docsPath: t,
                name: "AbiErrorNotFoundError"
            })
        }
    }
    class m extends i.BaseError {
        constructor(e, {
            docsPath: t,
            cause: r
        }) {
            super(`Encoded error signature "${e}" not found on ABI.
Make sure you are using the correct ABI and that the error exists on it.
You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${e}.`, {
                docsPath: t,
                name: "AbiErrorSignatureNotFoundError",
                cause: r
            }), Object.defineProperty(this, "signature", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.signature = e
        }
    }
    class h extends i.BaseError {
        constructor({
            docsPath: e
        }) {
            super("Cannot extract event signature from empty topics.", {
                docsPath: e,
                name: "AbiEventSignatureEmptyTopicsError"
            })
        }
    }
    class y extends i.BaseError {
        constructor(e, {
            docsPath: t
        }) {
            super(`Encoded event signature "${e}" not found on ABI.
Make sure you are using the correct ABI and that the event exists on it.
You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`, {
                docsPath: t,
                name: "AbiEventSignatureNotFoundError"
            })
        }
    }
    class g extends i.BaseError {
        constructor(e, {
            docsPath: t
        } = {}) {
            super(`Event ${e?`"${e}" `:""}not found on ABI.
Make sure you are using the correct ABI and that the event exists on it.`, {
                docsPath: t,
                name: "AbiEventNotFoundError"
            })
        }
    }
    class v extends i.BaseError {
        constructor(e, {
            docsPath: t
        } = {}) {
            super(`Function ${e?`"${e}" `:""}not found on ABI.
Make sure you are using the correct ABI and that the function exists on it.`, {
                docsPath: t,
                name: "AbiFunctionNotFoundError"
            })
        }
    }
    class x extends i.BaseError {
        constructor(e, {
            docsPath: t
        }) {
            super(`Function "${e}" does not contain any \`outputs\` on ABI.
Cannot decode function result without knowing what the parameter types are.
Make sure you are using the correct ABI and that the function exists on it.`, {
                docsPath: t,
                name: "AbiFunctionOutputsNotFoundError"
            })
        }
    }
    class E extends i.BaseError {
        constructor(e, {
            docsPath: t
        }) {
            super(`Encoded function signature "${e}" not found on ABI.
Make sure you are using the correct ABI and that the function exists on it.
You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`, {
                docsPath: t,
                name: "AbiFunctionSignatureNotFoundError"
            })
        }
    }
    class w extends i.BaseError {
        constructor(e, r) {
            super("Found ambiguous types in overloaded ABI items.", {
                metaMessages: [`\`${e.type}\` in \`${t(e.abiItem)}\`, and`, `\`${r.type}\` in \`${t(r.abiItem)}\``, "", "These types encode differently and cannot be distinguished at runtime.", "Remove one of the ambiguous items in the ABI."],
                name: "AbiItemAmbiguityError"
            })
        }
    }
    class $ extends i.BaseError {
        constructor({
            expectedSize: e,
            givenSize: t
        }) {
            super(`Expected bytes${e}, got bytes${t}.`, {
                name: "BytesSizeMismatchError"
            })
        }
    }
    class I extends i.BaseError {
        constructor({
            abiItem: e,
            data: t,
            params: n,
            size: i
        }) {
            super(`Data size of ${i} bytes is too small for non-indexed event parameters.`, {
                metaMessages: [`Params: (${r(n,{includeName:!0})})`, `Data:   ${t} (${i} bytes)`],
                name: "DecodeLogDataMismatch"
            }), Object.defineProperty(this, "abiItem", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "data", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "params", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "size", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.abiItem = e, this.data = t, this.params = n, this.size = i
        }
    }
    class A extends i.BaseError {
        constructor({
            abiItem: e,
            param: r
        }) {
            super(`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${t(e,{includeName:!0})}".`, {
                name: "DecodeLogTopicsMismatch"
            }), Object.defineProperty(this, "abiItem", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.abiItem = e
        }
    }
    class B extends i.BaseError {
        constructor(e, {
            docsPath: t
        }) {
            super(`Type "${e}" is not a valid encoding type.
Please provide a valid ABI type.`, {
                docsPath: t,
                name: "InvalidAbiEncodingType"
            })
        }
    }
    class P extends i.BaseError {
        constructor(e, {
            docsPath: t
        }) {
            super(`Type "${e}" is not a valid decoding type.
Please provide a valid ABI type.`, {
                docsPath: t,
                name: "InvalidAbiDecodingType"
            })
        }
    }
    class S extends i.BaseError {
        constructor(e) {
            super(`Value "${e}" is not a valid array.`, {
                name: "InvalidArrayError"
            })
        }
    }
    class T extends i.BaseError {
        constructor(e) {
            super(`"${e}" is not a valid definition type.
Valid types: "function", "event", "error"`, {
                name: "InvalidDefinitionTypeError"
            })
        }
    }
    class z extends i.BaseError {
        constructor(e) {
            super(`Type "${e}" is not supported for packed encoding.`, {
                name: "UnsupportedPackedAbiType"
            })
        }
    }
}, 694469, e => {
    "use strict";
    var t = e.i(947974),
        r = e.i(19472),
        n = e.i(637608),
        i = e.i(186897);

    function a(e, t = {}) {
        void 0 !== t.size && (0, n.assertSize)(e, {
            size: t.size
        });
        let r = (0, i.bytesToHex)(e, t);
        return (0, n.hexToBigInt)(r, t)
    }

    function s(e, i = {}) {
        let a = e;
        if (void 0 !== i.size && ((0, n.assertSize)(a, {
                size: i.size
            }), a = (0, r.trim)(a)), a.length > 1 || a[0] > 1) throw new t.InvalidBytesBooleanError(a);
        return !!a[0]
    }

    function o(e, t = {}) {
        void 0 !== t.size && (0, n.assertSize)(e, {
            size: t.size
        });
        let r = (0, i.bytesToHex)(e, t);
        return (0, n.hexToNumber)(r, t)
    }

    function c(e, t = {}) {
        let i = e;
        return void 0 !== t.size && ((0, n.assertSize)(i, {
            size: t.size
        }), i = (0, r.trim)(i, {
            dir: "right"
        })), new TextDecoder().decode(i)
    }
    e.s(["bytesToBigInt", 0, a, "bytesToBool", 0, s, "bytesToNumber", 0, o, "bytesToString", 0, c, "fromBytes", 0, function(e, t) {
        let r = "string" == typeof t ? {
                to: t
            } : t,
            n = r.to;
        return "number" === n ? o(e, r) : "bigint" === n ? a(e, r) : "boolean" === n ? s(e, r) : "string" === n ? c(e, r) : (0, i.bytesToHex)(e, r)
    }])
}, 198905, 124953, e => {
    "use strict";
    var t = e.i(624297),
        r = e.i(108157),
        n = e.i(621030),
        i = e.i(947974),
        a = e.i(571333),
        s = e.i(844268),
        o = e.i(605381),
        c = e.i(203375),
        u = e.i(394254),
        f = e.i(186897);
    let d = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
    e.s(["arrayRegex", 0, /^(.*)\[([0-9]*)\]$/, "bytesRegex", 0, /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, "integerRegex", 0, d], 124953);

    function l(e) {
        let t = 0;
        for (let r = 0; r < e.length; r++) {
            let {
                dynamic: n,
                encoded: i
            } = e[r];
            n ? t += 32 : t += (0, c.size)(i)
        }
        let r = [],
            n = [],
            i = 0;
        for (let a = 0; a < e.length; a++) {
            let {
                dynamic: s,
                encoded: o
            } = e[a];
            s ? (r.push((0, f.numberToHex)(t + i, {
                size: 32
            })), n.push(o), i += (0, c.size)(o)) : r.push(o)
        }
        return (0, s.concat)([...r, ...n])
    }

    function b(e) {
        let t = e.match(/^(.*)\[(\d+)?\]$/);
        return t ? [t[2] ? Number(t[2]) : null, t[1]] : void 0
    }
    e.s(["encodeAbiParameters", 0, function(e, p) {
        if (e.length !== p.length) throw new t.AbiEncodingLengthMismatchError({
            expectedLength: e.length,
            givenLength: p.length
        });
        let m = l(function({
            params: e,
            values: p
        }) {
            let m = [];
            for (let h = 0; h < e.length; h++) m.push(function e({
                param: p,
                value: m
            }) {
                let h = b(p.type);
                if (h) {
                    let [r, n] = h;
                    return function(r, {
                        length: n,
                        param: i
                    }) {
                        let a = null === n;
                        if (!Array.isArray(r)) throw new t.InvalidArrayError(r);
                        if (!a && r.length !== n) throw new t.AbiEncodingArrayLengthMismatchError({
                            expectedLength: n,
                            givenLength: r.length,
                            type: `${i.type}[${n}]`
                        });
                        let o = !1,
                            c = [];
                        for (let t = 0; t < r.length; t++) {
                            let n = e({
                                param: i,
                                value: r[t]
                            });
                            n.dynamic && (o = !0), c.push(n)
                        }
                        if (a || o) {
                            let e = l(c);
                            if (a) {
                                let t = (0, f.numberToHex)(c.length, {
                                    size: 32
                                });
                                return {
                                    dynamic: !0,
                                    encoded: c.length > 0 ? (0, s.concat)([t, e]) : t
                                }
                            }
                            if (o) return {
                                dynamic: !0,
                                encoded: e
                            }
                        }
                        return {
                            dynamic: !1,
                            encoded: (0, s.concat)(c.map(({
                                encoded: e
                            }) => e))
                        }
                    }(m, {
                        length: r,
                        param: { ...p,
                            type: n
                        }
                    })
                }
                if ("tuple" === p.type) return function(t, {
                    param: r
                }) {
                    let n = !1,
                        i = [];
                    for (let a = 0; a < r.components.length; a++) {
                        let s = r.components[a],
                            o = Array.isArray(t) ? a : s.name,
                            c = e({
                                param: s,
                                value: t[o]
                            });
                        i.push(c), c.dynamic && (n = !0)
                    }
                    return {
                        dynamic: n,
                        encoded: n ? l(i) : (0, s.concat)(i.map(({
                            encoded: e
                        }) => e))
                    }
                }(m, {
                    param: p
                });
                if ("address" === p.type) {
                    var y = m;
                    if (!(0, a.isAddress)(y)) throw new r.InvalidAddressError({
                        address: y
                    });
                    return {
                        dynamic: !1,
                        encoded: (0, o.padHex)(y.toLowerCase())
                    }
                }
                if ("bool" === p.type) {
                    var g = m;
                    if ("boolean" != typeof g) throw new n.BaseError(`Invalid boolean value: "${g}" (type: ${typeof g}). Expected: \`true\` or \`false\`.`);
                    return {
                        dynamic: !1,
                        encoded: (0, o.padHex)((0, f.boolToHex)(g))
                    }
                }
                if (p.type.startsWith("uint") || p.type.startsWith("int")) {
                    let e = p.type.startsWith("int"),
                        [, , t = "256"] = d.exec(p.type) ? ? [];
                    return function(e, {
                        signed: t,
                        size: r = 256
                    }) {
                        if ("number" == typeof r) {
                            let n = 2 n ** (BigInt(r) - (t ? 1 n : 0 n)) - 1 n,
                                a = t ? -n - 1 n : 0 n;
                            if (e > n || e < a) throw new i.IntegerOutOfRangeError({
                                max: n.toString(),
                                min: a.toString(),
                                signed: t,
                                size: r / 8,
                                value: e.toString()
                            })
                        }
                        return {
                            dynamic: !1,
                            encoded: (0, f.numberToHex)(e, {
                                size: 32,
                                signed: t
                            })
                        }
                    }(m, {
                        signed: e,
                        size: Number(t)
                    })
                }
                if (p.type.startsWith("bytes")) return function(e, {
                    param: r
                }) {
                    let [, n] = r.type.split("bytes"), i = (0, c.size)(e);
                    if (!n) {
                        let t = e;
                        return i % 32 != 0 && (t = (0, o.padHex)(t, {
                            dir: "right",
                            size: 32 * Math.ceil((e.length - 2) / 2 / 32)
                        })), {
                            dynamic: !0,
                            encoded: (0, s.concat)([(0, o.padHex)((0, f.numberToHex)(i, {
                                size: 32
                            })), t])
                        }
                    }
                    if (i !== Number.parseInt(n, 10)) throw new t.AbiEncodingBytesSizeMismatchError({
                        expectedSize: Number.parseInt(n, 10),
                        value: e
                    });
                    return {
                        dynamic: !1,
                        encoded: (0, o.padHex)(e, {
                            dir: "right"
                        })
                    }
                }(m, {
                    param: p
                });
                if ("string" === p.type) {
                    var v = m;
                    let e = (0, f.stringToHex)(v),
                        t = Math.ceil((0, c.size)(e) / 32),
                        r = [];
                    for (let n = 0; n < t; n++) r.push((0, o.padHex)((0, u.slice)(e, 32 * n, (n + 1) * 32), {
                        dir: "right"
                    }));
                    return {
                        dynamic: !0,
                        encoded: (0, s.concat)([(0, o.padHex)((0, f.numberToHex)((0, c.size)(e), {
                            size: 32
                        })), ...r])
                    }
                }
                throw new t.InvalidAbiEncodingTypeError(p.type, {
                    docsPath: "/docs/contract/encodeAbiParameters"
                })
            }({
                param: e[h],
                value: p[h]
            }));
            return m
        }({
            params: e,
            values: p
        }));
        return 0 === m.length ? "0x" : m
    }, "getArrayComponents", 0, b], 198905)
}, 930460, e => {
    "use strict";
    var t = e.i(624297),
        r = e.i(113967),
        n = e.i(857302),
        i = e.i(203375),
        a = e.i(394254),
        s = e.i(19472),
        o = e.i(694469),
        c = e.i(318877),
        u = e.i(186897),
        f = e.i(198905);

    function d(e) {
        let {
            type: t
        } = e;
        if ("string" === t || "bytes" === t || t.endsWith("[]")) return !0;
        if ("tuple" === t) return e.components ? .some(d);
        let r = (0, f.getArrayComponents)(e.type);
        return !!(r && d({ ...e,
            type: r[1]
        }))
    }
    e.s(["decodeAbiParameters", 0, function(e, l) {
        let b = "string" == typeof l ? (0, c.hexToBytes)(l) : l,
            p = (0, n.createCursor)(b);
        if (0 === (0, i.size)(b) && e.length > 0) throw new t.AbiDecodingZeroDataError;
        if ((0, i.size)(l) && 32 > (0, i.size)(l)) throw new t.AbiDecodingDataSizeTooSmallError({
            data: "string" == typeof l ? l : (0, u.bytesToHex)(l),
            params: e,
            size: (0, i.size)(l)
        });
        let m = 0,
            h = [];
        for (let n = 0; n < e.length; ++n) {
            let i = e[n];
            p.setPosition(m);
            let [c, l] = function e(n, i, {
                staticPosition: c
            }) {
                var l, b, p;
                let m = (0, f.getArrayComponents)(i.type);
                if (m) {
                    let [t, r] = m;
                    return function(t, r, {
                        length: n,
                        staticPosition: i
                    }) {
                        if (!n) {
                            let n = i + (0, o.bytesToNumber)(t.readBytes(32)),
                                a = n + 32;
                            t.setPosition(n);
                            let s = (0, o.bytesToNumber)(t.readBytes(32)),
                                c = d(r),
                                u = 0,
                                f = [];
                            for (let n = 0; n < s; ++n) {
                                t.setPosition(a + (c ? 32 * n : u));
                                let [i, s] = e(t, r, {
                                    staticPosition: a
                                });
                                u += s, f.push(i)
                            }
                            return t.setPosition(i + 32), [f, 32]
                        }
                        if (d(r)) {
                            let a = i + (0, o.bytesToNumber)(t.readBytes(32)),
                                s = [];
                            for (let i = 0; i < n; ++i) {
                                t.setPosition(a + 32 * i);
                                let [n] = e(t, r, {
                                    staticPosition: a
                                });
                                s.push(n)
                            }
                            return t.setPosition(i + 32), [s, 32]
                        }
                        let a = 0,
                            s = [];
                        for (let o = 0; o < n; ++o) {
                            let [n, o] = e(t, r, {
                                staticPosition: i + a
                            });
                            a += o, s.push(n)
                        }
                        return [s, a]
                    }(n, { ...i,
                        type: r
                    }, {
                        length: t,
                        staticPosition: c
                    })
                }
                if ("tuple" === i.type) return function(t, r, {
                    staticPosition: n
                }) {
                    let i = 0 === r.components.length || r.components.some(({
                            name: e
                        }) => !e),
                        a = i ? [] : {},
                        s = 0;
                    if (d(r)) {
                        let c = n + (0, o.bytesToNumber)(t.readBytes(32));
                        for (let n = 0; n < r.components.length; ++n) {
                            let o = r.components[n];
                            t.setPosition(c + s);
                            let [u, f] = e(t, o, {
                                staticPosition: c
                            });
                            s += f, a[i ? n : o ? .name] = u
                        }
                        return t.setPosition(n + 32), [a, 32]
                    }
                    for (let o = 0; o < r.components.length; ++o) {
                        let c = r.components[o],
                            [u, f] = e(t, c, {
                                staticPosition: n
                            });
                        a[i ? o : c ? .name] = u, s += f
                    }
                    return [a, s]
                }(n, i, {
                    staticPosition: c
                });
                if ("address" === i.type) {
                    let e;
                    return e = n.readBytes(32), [(0, r.checksumAddress)((0, u.bytesToHex)((0, a.sliceBytes)(e, -20))), 32]
                }
                if ("bool" === i.type) {
                    return l = n, [(0, o.bytesToBool)(l.readBytes(32), {
                        size: 32
                    }), 32]
                }
                if (i.type.startsWith("bytes")) return function(e, t, {
                    staticPosition: r
                }) {
                    let [n, i] = t.type.split("bytes");
                    if (!i) {
                        let t = (0, o.bytesToNumber)(e.readBytes(32));
                        e.setPosition(r + t);
                        let n = (0, o.bytesToNumber)(e.readBytes(32));
                        if (0 === n) return e.setPosition(r + 32), ["0x", 32];
                        let i = e.readBytes(n);
                        return e.setPosition(r + 32), [(0, u.bytesToHex)(i), 32]
                    }
                    return [(0, u.bytesToHex)(e.readBytes(Number.parseInt(i, 10), 32)), 32]
                }(n, i, {
                    staticPosition: c
                });
                if (i.type.startsWith("uint") || i.type.startsWith("int")) {
                    let e, t, r;
                    return b = n, e = (p = i).type.startsWith("int"), t = Number.parseInt(p.type.split("int")[1] || "256", 10), r = b.readBytes(32), [t > 48 ? (0, o.bytesToBigInt)(r, {
                        signed: e
                    }) : (0, o.bytesToNumber)(r, {
                        signed: e
                    }), 32]
                }
                if ("string" === i.type) return function(e, {
                    staticPosition: t
                }) {
                    let r = (0, o.bytesToNumber)(e.readBytes(32));
                    e.setPosition(t + r);
                    let n = (0, o.bytesToNumber)(e.readBytes(32));
                    if (0 === n) return e.setPosition(t + 32), ["", 32];
                    let i = e.readBytes(n, 32),
                        a = (0, o.bytesToString)((0, s.trim)(i));
                    return e.setPosition(t + 32), [a, 32]
                }(n, {
                    staticPosition: c
                });
                throw new t.InvalidAbiDecodingTypeError(i.type, {
                    docsPath: "/docs/contract/decodeAbiParameters"
                })
            }(p, i, {
                staticPosition: 0
            });
            m += l, h.push(c)
        }
        return h
    }])
}, 290810, e => {
    "use strict";
    var t = e.i(318877),
        r = e.i(415013);
    e.s(["hashSignature", 0, function(e) {
        return (0, r.keccak256)((0, t.toBytes)(e))
    }])
}, 461023, e => {
    "use strict";
    e.s(["bytesRegex", 0, /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, "execTyped", 0, function(e, t) {
        let r = e.exec(t);
        return r ? .groups
    }, "integerRegex", 0, /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/, "isTupleRegex", 0, /^\(.+?\).*?$/])
}, 758123, 630054, 231149, 19719, e => {
    "use strict";
    var t = e.i(290810),
        r = e.i(461023);
    let n = /^tuple(?<array>(\[(\d*)\])*)$/;

    function i(e) {
        let t = "",
            i = e.length;
        for (let a = 0; a < i; a++) t += function e(t) {
            let i = t.type;
            if (n.test(t.type) && "components" in t) {
                i = "(";
                let a = t.components.length;
                for (let r = 0; r < a; r++) i += e(t.components[r]), r < a - 1 && (i += ", ");
                let s = (0, r.execTyped)(n, t.type);
                return i += `)${s?.array||""}`, e({ ...t,
                    type: i
                })
            }
            return ("indexed" in t && t.indexed && (i = `${i} indexed`), t.name) ? `${i} ${t.name}` : i
        }(e[a]), a !== i - 1 && (t += ", ");
        return t
    }

    function a(e) {
        return "function" === e.type ? `function ${e.name}(${i(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${i(e.outputs)})`:""}` : "event" === e.type ? `event ${e.name}(${i(e.inputs)})` : "error" === e.type ? `error ${e.name}(${i(e.inputs)})` : "constructor" === e.type ? `constructor(${i(e.inputs)})${"payable"===e.stateMutability?" payable":""}` : "fallback" === e.type ? `fallback() external${"payable"===e.stateMutability?" payable":""}` : "receive() external payable"
    }
    e.s(["formatAbiParameters", 0, i], 630054), e.s(["formatAbiItem", 0, a], 231149);
    var s = e.i(621030);
    let o = e => (function(e) {
        let t = !0,
            r = "",
            n = 0,
            i = "",
            a = !1;
        for (let s = 0; s < e.length; s++) {
            let o = e[s];
            if (["(", ")", ","].includes(o) && (t = !0), "(" === o && n++, ")" === o && n--, t) {
                if (0 === n) {
                    if (" " === o && ["event", "function", ""].includes(i)) i = "";
                    else if (i += o, ")" === o) {
                        a = !0;
                        break
                    }
                    continue
                }
                if (" " === o) {
                    "," !== e[s - 1] && "," !== r && ",(" !== r && (r = "", t = !1);
                    continue
                }
                i += o, r += o
            }
        }
        if (!a) throw new s.BaseError("Unable to normalize signature.");
        return i
    })("string" == typeof e ? e : a(e));
    e.s(["toSignature", 0, o], 19719), e.s(["toSignatureHash", 0, function(e) {
        return (0, t.hashSignature)(o(e))
    }], 758123)
}, 65560, e => {
    "use strict";
    let t = e.i(758123).toSignatureHash;
    e.s(["toEventSelector", 0, t])
}, 960037, e => {
    "use strict";
    var t = e.i(394254),
        r = e.i(758123);
    e.s(["toFunctionSelector", 0, e => (0, t.slice)((0, r.toSignatureHash)(e), 0, 4)])
}, 692614, e => {
    "use strict";
    var t = e.i(624297),
        r = e.i(229315),
        n = e.i(571333),
        i = e.i(65560),
        a = e.i(960037);
    e.s(["getAbiItem", 0, function(e) {
        let s, {
                abi: o,
                args: c = [],
                name: u
            } = e,
            f = (0, r.isHex)(u, {
                strict: !1
            }),
            d = o.filter(e => f ? "function" === e.type ? (0, a.toFunctionSelector)(e) === u : "event" === e.type && (0, i.toEventSelector)(e) === u : "name" in e && e.name === u);
        if (0 !== d.length) {
            if (1 === d.length) return d[0];
            for (let e of d) {
                if ("inputs" in e) {
                    if (!c || 0 === c.length) {
                        if (!e.inputs || 0 === e.inputs.length) return e;
                        continue
                    }
                    if (e.inputs && 0 !== e.inputs.length && e.inputs.length === c.length && c.every((t, r) => {
                            let i = "inputs" in e && e.inputs[r];
                            return !!i && function e(t, r) {
                                let i = typeof t,
                                    a = r.type;
                                switch (a) {
                                    case "address":
                                        return (0, n.isAddress)(t, {
                                            strict: !1
                                        });
                                    case "bool":
                                        return "boolean" === i;
                                    case "function":
                                    case "string":
                                        return "string" === i;
                                    default:
                                        if ("tuple" === a && "components" in r) return Object.values(r.components).every((r, n) => "object" === i && e(Object.values(t)[n], r));
                                        if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(a)) return "number" === i || "bigint" === i;
                                        if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(a)) return "string" === i || t instanceof Uint8Array;
                                        if (/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(a)) return Array.isArray(t) && t.every(t => e(t, { ...r,
                                            type: a.replace(/(\[[0-9]{0,}\])$/, "")
                                        }));
                                        return !1
                                }
                            }(t, i)
                        })) {
                        if (s && "inputs" in s && s.inputs) {
                            let r = function e(t, r, i) {
                                for (let a in t) {
                                    let s = t[a],
                                        o = r[a];
                                    if ("tuple" === s.type && "tuple" === o.type && "components" in s && "components" in o) return e(s.components, o.components, i[a]);
                                    let c = [s.type, o.type];
                                    if (c.includes("address") && c.includes("bytes20") || (c.includes("address") && c.includes("string") || c.includes("address") && c.includes("bytes")) && (0, n.isAddress)(i[a], {
                                            strict: !1
                                        })) return c
                                }
                            }(e.inputs, s.inputs, c);
                            if (r) throw new t.AbiItemAmbiguityError({
                                abiItem: e,
                                type: r[0]
                            }, {
                                abiItem: s,
                                type: r[1]
                            })
                        }
                        s = e
                    }
                }
            }
            return s || d[0]
        }
    }])
}, 933619, e => {
    "use strict";
    var t = e.i(624297),
        r = e.i(930460),
        n = e.i(692614);
    let i = "/docs/contract/decodeFunctionResult";
    e.s(["decodeFunctionResult", 0, function(e) {
        let {
            abi: a,
            args: s,
            functionName: o,
            data: c
        } = e, u = a[0];
        if (o) {
            let e = (0, n.getAbiItem)({
                abi: a,
                args: s,
                name: o
            });
            if (!e) throw new t.AbiFunctionNotFoundError(o, {
                docsPath: i
            });
            u = e
        }
        if ("function" !== u.type) throw new t.AbiFunctionNotFoundError(void 0, {
            docsPath: i
        });
        if (!u.outputs) throw new t.AbiFunctionOutputsNotFoundError(u.name, {
            docsPath: i
        });
        let f = (0, r.decodeAbiParameters)(u.outputs, c);
        return f && f.length > 1 ? f : f && 1 === f.length ? f[0] : void 0
    }])
}, 56339, 640897, e => {
    "use strict";
    var t = e.i(844268),
        r = e.i(198905),
        n = e.i(624297),
        i = e.i(960037),
        a = e.i(628584),
        s = e.i(692614);
    let o = "/docs/contract/encodeFunctionData";

    function c(e) {
        let {
            abi: t,
            args: r,
            functionName: c
        } = e, u = t[0];
        if (c) {
            let e = (0, s.getAbiItem)({
                abi: t,
                args: r,
                name: c
            });
            if (!e) throw new n.AbiFunctionNotFoundError(c, {
                docsPath: o
            });
            u = e
        }
        if ("function" !== u.type) throw new n.AbiFunctionNotFoundError(void 0, {
            docsPath: o
        });
        return {
            abi: [u],
            functionName: (0, i.toFunctionSelector)((0, a.formatAbiItem)(u))
        }
    }
    e.s(["prepareEncodeFunctionData", 0, c], 640897), e.s(["encodeFunctionData", 0, function(e) {
        let {
            args: n
        } = e, {
            abi: i,
            functionName: a
        } = 1 === e.abi.length && e.functionName ? .startsWith("0x") ? e : c(e), s = i[0], o = "inputs" in s && s.inputs ? (0, r.encodeAbiParameters)(s.inputs, n ? ? []) : void 0;
        return (0, t.concatHex)([a, o ? ? "0x"])
    }], 56339)
}, 961304, e => {
    "use strict";
    var t = e.i(603641);
    e.s(["getChainContractAddress", 0, function({
        blockNumber: e,
        chain: r,
        contract: n
    }) {
        let i = r ? .contracts ? .[n];
        if (!i) throw new t.ChainDoesNotSupportContract({
            chain: r,
            contract: {
                name: n
            }
        });
        if (e && i.blockCreated && i.blockCreated > e) throw new t.ChainDoesNotSupportContract({
            blockNumber: e,
            chain: r,
            contract: {
                name: n,
                blockCreated: i.blockCreated
            }
        });
        return i.address
    }])
}, 433669, e => {
    "use strict";
    e.s(["panicReasons", 0, {
        1: "An `assert` condition failed.",
        17: "Arithmetic operation resulted in underflow or overflow.",
        18: "Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",
        33: "Attempted to convert to an invalid type.",
        34: "Attempted to access a storage byte array that is incorrectly encoded.",
        49: "Performed `.pop()` on an empty array",
        50: "Array index is out of bounds.",
        65: "Allocated too much memory or created an array which is too large.",
        81: "Attempted to call a zero-initialized variable of internal function type."
    }, "solidityError", 0, {
        inputs: [{
            name: "message",
            type: "string"
        }],
        name: "Error",
        type: "error"
    }, "solidityPanic", 0, {
        inputs: [{
            name: "reason",
            type: "uint256"
        }],
        name: "Panic",
        type: "error"
    }])
}, 209167, 37101, e => {
    "use strict";
    var t = e.i(433669),
        r = e.i(624297),
        n = e.i(394254),
        i = e.i(960037),
        a = e.i(930460),
        s = e.i(628584);
    e.s(["decodeErrorResult", 0, function(e) {
        let {
            abi: o,
            data: c,
            cause: u
        } = e, f = (0, n.slice)(c, 0, 4);
        if ("0x" === f) throw new r.AbiDecodingZeroDataError({
            cause: u
        });
        let d = [...o || [], t.solidityError, t.solidityPanic].find(e => "error" === e.type && f === (0, i.toFunctionSelector)((0, s.formatAbiItem)(e)));
        if (!d) throw new r.AbiErrorSignatureNotFoundError(f, {
            docsPath: "/docs/contract/decodeErrorResult",
            cause: u
        });
        return {
            abiItem: d,
            args: "inputs" in d && d.inputs && d.inputs.length > 0 ? (0, a.decodeAbiParameters)(d.inputs, (0, n.slice)(c, 4)) : void 0,
            errorName: d.name
        }
    }], 209167);
    var o = e.i(865692);
    e.s(["formatAbiItemWithArgs", 0, function({
        abiItem: e,
        args: t,
        includeFunctionName: r = !0,
        includeName: n = !1
    }) {
        if ("name" in e && "inputs" in e && e.inputs) return `${r?e.name:""}(${e.inputs.map((e,r)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,o.stringify)(t[r]):t[r]}`).join(", ")})`
    }], 37101)
}, 993817, e => {
    "use strict";
    var t = e.i(621030);
    class r extends t.BaseError {
        constructor({
            address: e
        }) {
            super(`State for account "${e}" is set multiple times.`, {
                name: "AccountStateConflictError"
            })
        }
    }
    class n extends t.BaseError {
        constructor() {
            super("state and stateDiff are set on the same account.", {
                name: "StateAssignmentConflictError"
            })
        }
    }

    function i(e) {
        return e.reduce((e, {
            slot: t,
            value: r
        }) => `${e}        ${t}: ${r}
`, "")
    }
    e.s(["AccountStateConflictError", 0, r, "StateAssignmentConflictError", 0, n, "prettyStateOverride", 0, function(e) {
        return e.reduce((e, {
            address: t,
            ...r
        }) => {
            let n = `${e}    ${t}:
`;
            return r.nonce && (n += `      nonce: ${r.nonce}
`), r.balance && (n += `      balance: ${r.balance}
`), r.code && (n += `      code: ${r.code}
`), r.state && (n += "      state:\n", n += i(r.state)), r.stateDiff && (n += "      stateDiff:\n", n += i(r.stateDiff)), n
        }, "  State Override:\n").slice(0, -1)
    }])
}, 285510, e => {
    "use strict";
    var t = e.i(372387),
        r = e.i(433669),
        n = e.i(209167),
        i = e.i(628584),
        a = e.i(37101),
        s = e.i(692614),
        o = e.i(936404),
        c = e.i(949853),
        u = e.i(624297),
        f = e.i(621030),
        d = e.i(993817),
        l = e.i(484309),
        b = e.i(416930);
    class p extends f.BaseError {
        constructor(e, {
            account: r,
            docsPath: n,
            chain: i,
            data: a,
            gas: s,
            gasPrice: u,
            maxFeePerGas: f,
            maxPriorityFeePerGas: b,
            nonce: p,
            to: m,
            value: h,
            stateOverride: y
        }) {
            const g = r ? (0, t.parseAccount)(r) : void 0;
            let v = (0, l.prettyPrint)({
                from: g ? .address,
                to: m,
                value: void 0 !== h && `${(0,o.formatEther)(h)} ${i?.nativeCurrency?.symbol||"ETH"}`,
                data: a,
                gas: s,
                gasPrice: void 0 !== u && `${(0,c.formatGwei)(u)} gwei`,
                maxFeePerGas: void 0 !== f && `${(0,c.formatGwei)(f)} gwei`,
                maxPriorityFeePerGas: void 0 !== b && `${(0,c.formatGwei)(b)} gwei`,
                nonce: p
            });
            y && (v += `
${(0,d.prettyStateOverride)(y)}`), super(e.shortMessage, {
                cause: e,
                docsPath: n,
                metaMessages: [...e.metaMessages ? [...e.metaMessages, " "] : [], "Raw Call Arguments:", v].filter(Boolean),
                name: "CallExecutionError"
            }), Object.defineProperty(this, "cause", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.cause = e
        }
    }
    class m extends f.BaseError {
        constructor(e, {
            abi: t,
            args: r,
            contractAddress: n,
            docsPath: o,
            functionName: c,
            sender: u
        }) {
            const f = (0, s.getAbiItem)({
                    abi: t,
                    args: r,
                    name: c
                }),
                d = f ? (0, a.formatAbiItemWithArgs)({
                    abiItem: f,
                    args: r,
                    includeFunctionName: !1,
                    includeName: !1
                }) : void 0,
                p = f ? (0, i.formatAbiItem)(f, {
                    includeName: !0
                }) : void 0,
                m = (0, l.prettyPrint)({
                    address: n && (0, b.getContractAddress)(n),
                    function: p,
                    args: d && "()" !== d && `${[...Array(c?.length??0).keys()].map(()=>" ").join("")}${d}`,
                    sender: u
                });
            super(e.shortMessage || `An unknown error occurred while executing the contract function "${c}".`, {
                cause: e,
                docsPath: o,
                metaMessages: [...e.metaMessages ? [...e.metaMessages, " "] : [], m && "Contract Call:", m].filter(Boolean),
                name: "ContractFunctionExecutionError"
            }), Object.defineProperty(this, "abi", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "args", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "cause", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "contractAddress", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "formattedArgs", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "functionName", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "sender", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.abi = t, this.args = r, this.cause = e, this.contractAddress = n, this.functionName = c, this.sender = u
        }
    }
    class h extends f.BaseError {
        constructor({
            abi: e,
            data: t,
            functionName: s,
            message: o,
            cause: c
        }) {
            let f, d, l, b, p;
            if (t && "0x" !== t) try {
                const {
                    abiItem: s,
                    errorName: o,
                    args: u
                } = d = (0, n.decodeErrorResult)({
                    abi: e,
                    data: t,
                    cause: c
                });
                if ("Error" === o) b = u[0];
                else if ("Panic" === o) {
                    const [e] = u;
                    b = r.panicReasons[e]
                } else {
                    const e = s ? (0, i.formatAbiItem)(s, {
                            includeName: !0
                        }) : void 0,
                        t = s && u ? (0, a.formatAbiItemWithArgs)({
                            abiItem: s,
                            args: u,
                            includeFunctionName: !1,
                            includeName: !1
                        }) : void 0;
                    l = [e ? `Error: ${e}` : "", t && "()" !== t ? `       ${[...Array(o?.length??0).keys()].map(()=>" ").join("")}${t}` : ""]
                }
            } catch (e) {
                f = e
            } else o && (b = o);
            f instanceof u.AbiErrorSignatureNotFoundError && (p = f.signature, l = [`Unable to decode signature "${p}" as it was not found on the provided ABI.`, "Make sure you are using the correct ABI and that the error exists on it.", `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${p}.`]), super(b && "execution reverted" !== b || p ? [`The contract function "${s}" reverted with the following ${p?"signature":"reason"}:`, b || p].join("\n") : `The contract function "${s}" reverted.`, {
                cause: f ? ? c,
                metaMessages: l,
                name: "ContractFunctionRevertedError"
            }), Object.defineProperty(this, "data", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "raw", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "reason", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "signature", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.data = d, this.raw = t, this.reason = b, this.signature = p
        }
    }
    class y extends f.BaseError {
        constructor({
            functionName: e,
            cause: t
        }) {
            super(`The contract function "${e}" returned no data ("0x").`, {
                metaMessages: ["This could be due to any of the following:", `  - The contract does not have the function "${e}",`, "  - The parameters passed to the contract function may be invalid, or", "  - The address is not a contract."],
                name: "ContractFunctionZeroDataError",
                cause: t
            })
        }
    }
    class g extends f.BaseError {
        constructor({
            factory: e
        }) {
            super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`, {
                metaMessages: ["Please ensure:", "- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).", "- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],
                name: "CounterfactualDeploymentFailedError"
            })
        }
    }
    class v extends f.BaseError {
        constructor({
            data: e,
            message: t
        }) {
            super(t || "", {
                name: "RawContractError"
            }), Object.defineProperty(this, "code", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: 3
            }), Object.defineProperty(this, "data", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), this.data = e
        }
    }
    e.s(["CallExecutionError", 0, p, "ContractFunctionExecutionError", 0, m, "ContractFunctionRevertedError", 0, h, "ContractFunctionZeroDataError", 0, y, "CounterfactualDeploymentFailedError", 0, g, "RawContractError", 0, v])
}, 464997, 501906, 542134, 23594, e => {
    "use strict";
    var t = e.i(866674),
        r = e.i(433669),
        n = e.i(624297),
        i = e.i(394254),
        a = e.i(960037),
        s = e.i(930460),
        o = e.i(628584);

    function c(e) {
        let {
            abi: t,
            data: r
        } = e, c = (0, i.slice)(r, 0, 4), u = t.find(e => "function" === e.type && c === (0, a.toFunctionSelector)((0, o.formatAbiItem)(e)));
        if (!u) throw new n.AbiFunctionSignatureNotFoundError(c, {
            docsPath: "/docs/contract/decodeFunctionData"
        });
        return {
            functionName: u.name,
            args: "inputs" in u && u.inputs && u.inputs.length > 0 ? (0, s.decodeAbiParameters)(u.inputs, (0, i.slice)(r, 4)) : void 0
        }
    }
    e.s(["decodeFunctionData", 0, c], 501906);
    var u = e.i(844268),
        f = e.i(198905),
        d = e.i(692614);
    let l = "/docs/contract/encodeErrorResult";

    function b(e) {
        let {
            abi: t,
            errorName: r,
            args: i
        } = e, s = t[0];
        if (r) {
            let e = (0, d.getAbiItem)({
                abi: t,
                args: i,
                name: r
            });
            if (!e) throw new n.AbiErrorNotFoundError(r, {
                docsPath: l
            });
            s = e
        }
        if ("error" !== s.type) throw new n.AbiErrorNotFoundError(void 0, {
            docsPath: l
        });
        let c = (0, o.formatAbiItem)(s),
            b = (0, a.toFunctionSelector)(c),
            p = "0x";
        if (i && i.length > 0) {
            if (!s.inputs) throw new n.AbiErrorInputsNotFoundError(s.name, {
                docsPath: l
            });
            p = (0, f.encodeAbiParameters)(s.inputs, i)
        }
        return (0, u.concatHex)([b, p])
    }
    e.s(["encodeErrorResult", 0, b], 542134);
    let p = "/docs/contract/encodeFunctionResult";

    function m(e) {
        let {
            abi: t,
            functionName: r,
            result: i
        } = e, a = t[0];
        if (r) {
            let e = (0, d.getAbiItem)({
                abi: t,
                name: r
            });
            if (!e) throw new n.AbiFunctionNotFoundError(r, {
                docsPath: p
            });
            a = e
        }
        if ("function" !== a.type) throw new n.AbiFunctionNotFoundError(void 0, {
            docsPath: p
        });
        if (!a.outputs) throw new n.AbiFunctionOutputsNotFoundError(a.name, {
            docsPath: p
        });
        let s = (() => {
            if (0 === a.outputs.length) return [];
            if (1 === a.outputs.length) return [i];
            if (Array.isArray(i)) return i;
            throw new n.InvalidArrayError(i)
        })();
        return (0, f.encodeAbiParameters)(a.outputs, s)
    }
    e.s(["encodeFunctionResult", 0, m], 23594);
    let h = "x-batch-gateway:true";
    async function y(e) {
        let {
            data: n,
            ccipRequest: i
        } = e, {
            args: [a]
        } = c({
            abi: t.batchGatewayAbi,
            data: n
        }), s = [], o = [];
        return await Promise.all(a.map(async (e, n) => {
            try {
                o[n] = e.urls.includes(h) ? await y({
                    data: e.data,
                    ccipRequest: i
                }) : await i(e), s[n] = !1
            } catch (e) {
                var a;
                s[n] = !0, o[n] = "HttpRequestError" === (a = e).name && a.status ? b({
                    abi: t.batchGatewayAbi,
                    errorName: "HttpError",
                    args: [a.status, a.shortMessage]
                }) : b({
                    abi: [r.solidityError],
                    errorName: "Error",
                    args: ["shortMessage" in a ? a.shortMessage : a.message]
                })
            }
        })), m({
            abi: t.batchGatewayAbi,
            functionName: "query",
            result: [s, o]
        })
    }
    e.s(["localBatchGatewayRequest", 0, y, "localBatchGatewayUrl", 0, h], 464997)
}, 118520, e => {
    "use strict";
    var t = e.i(461023);
    let r = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,
        n = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,
        i = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/,
        a = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/,
        s = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/,
        o = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/,
        c = /^receive\(\) external payable$/,
        u = new Set(["memory", "indexed", "storage", "calldata"]),
        f = new Set(["indexed"]),
        d = new Set(["calldata", "memory", "storage"]);
    e.s(["eventModifiers", 0, f, "execConstructorSignature", 0, function(e) {
        return (0, t.execTyped)(s, e)
    }, "execErrorSignature", 0, function(e) {
        return (0, t.execTyped)(r, e)
    }, "execEventSignature", 0, function(e) {
        return (0, t.execTyped)(n, e)
    }, "execFallbackSignature", 0, function(e) {
        return (0, t.execTyped)(o, e)
    }, "execFunctionSignature", 0, function(e) {
        return (0, t.execTyped)(i, e)
    }, "execStructSignature", 0, function(e) {
        return (0, t.execTyped)(a, e)
    }, "functionModifiers", 0, d, "isConstructorSignature", 0, function(e) {
        return s.test(e)
    }, "isErrorSignature", 0, function(e) {
        return r.test(e)
    }, "isEventSignature", 0, function(e) {
        return n.test(e)
    }, "isFallbackSignature", 0, function(e) {
        return o.test(e)
    }, "isFunctionSignature", 0, function(e) {
        return i.test(e)
    }, "isReceiveSignature", 0, function(e) {
        return c.test(e)
    }, "isStructSignature", 0, function(e) {
        return a.test(e)
    }, "modifiers", 0, u])
}, 629070, e => {
    "use strict";
    class t extends Error {
        constructor(e, r = {}) {
            const n = r.cause instanceof t ? r.cause.details : r.cause ? .message ? r.cause.message : r.details,
                i = r.cause instanceof t && r.cause.docsPath || r.docsPath;
            super([e || "An error occurred.", "", ...r.metaMessages ? [...r.metaMessages, ""] : [], ...i ? [`Docs: https://abitype.dev${i}`] : [], ...n ? [`Details: ${n}`] : [], "Version: abitype@1.2.3"].join("\n")), Object.defineProperty(this, "details", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "docsPath", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "metaMessages", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "shortMessage", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "AbiTypeError"
            }), r.cause && (this.cause = r.cause), this.details = n, this.docsPath = i, this.metaMessages = r.metaMessages, this.shortMessage = e
        }
    }
    e.s(["BaseError", 0, t], 629070)
}, 10928, 118274, e => {
    "use strict";
    var t = e.i(629070);
    class r extends t.BaseError {
        constructor({
            signature: e
        }) {
            super("Failed to parse ABI item.", {
                details: `parseAbiItem(${JSON.stringify(e,null,2)})`,
                docsPath: "/api/human#parseabiitem-1"
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidAbiItemError"
            })
        }
    }
    class n extends t.BaseError {
        constructor({
            type: e
        }) {
            super("Unknown type.", {
                metaMessages: [`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "UnknownTypeError"
            })
        }
    }
    class i extends t.BaseError {
        constructor({
            type: e
        }) {
            super("Unknown type.", {
                metaMessages: [`Type "${e}" is not a valid ABI type.`]
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "UnknownSolidityTypeError"
            })
        }
    }
    e.s(["InvalidAbiItemError", 0, r, "UnknownSolidityTypeError", 0, i, "UnknownTypeError", 0, n], 10928);
    var a = t;
    class s extends a.BaseError {
        constructor({
            param: e
        }) {
            super("Failed to parse ABI parameter.", {
                details: `parseAbiParameter(${JSON.stringify(e,null,2)})`,
                docsPath: "/api/human#parseabiparameter-1"
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidAbiParameterError"
            })
        }
    }
    class o extends a.BaseError {
        constructor({
            params: e
        }) {
            super("Failed to parse ABI parameters.", {
                details: `parseAbiParameters(${JSON.stringify(e,null,2)})`,
                docsPath: "/api/human#parseabiparameters-1"
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidAbiParametersError"
            })
        }
    }
    class c extends a.BaseError {
        constructor({
            param: e
        }) {
            super("Invalid ABI parameter.", {
                details: e
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidParameterError"
            })
        }
    }
    class u extends a.BaseError {
        constructor({
            param: e,
            name: t
        }) {
            super("Invalid ABI parameter.", {
                details: e,
                metaMessages: [`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "SolidityProtectedKeywordError"
            })
        }
    }
    class f extends a.BaseError {
        constructor({
            param: e,
            type: t,
            modifier: r
        }) {
            super("Invalid ABI parameter.", {
                details: e,
                metaMessages: [`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidModifierError"
            })
        }
    }
    class d extends a.BaseError {
        constructor({
            param: e,
            type: t,
            modifier: r
        }) {
            super("Invalid ABI parameter.", {
                details: e,
                metaMessages: [`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`, `Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidFunctionModifierError"
            })
        }
    }
    class l extends a.BaseError {
        constructor({
            abiParameter: e
        }) {
            super("Invalid ABI parameter.", {
                details: JSON.stringify(e, null, 2),
                metaMessages: ["ABI parameter type is invalid."]
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidAbiTypeParameterError"
            })
        }
    }
    e.s(["InvalidAbiParameterError", 0, s, "InvalidAbiParametersError", 0, o, "InvalidAbiTypeParameterError", 0, l, "InvalidFunctionModifierError", 0, d, "InvalidModifierError", 0, f, "InvalidParameterError", 0, c, "SolidityProtectedKeywordError", 0, u], 118274)
}, 924216, e => {
    "use strict";
    var t = e.i(629070);
    class r extends t.BaseError {
        constructor({
            signature: e,
            type: t
        }) {
            super(`Invalid ${t} signature.`, {
                details: e
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidSignatureError"
            })
        }
    }
    class n extends t.BaseError {
        constructor({
            signature: e
        }) {
            super("Unknown signature.", {
                details: e
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "UnknownSignatureError"
            })
        }
    }
    class i extends t.BaseError {
        constructor({
            signature: e
        }) {
            super("Invalid struct signature.", {
                details: e,
                metaMessages: ["No properties exist."]
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidStructSignatureError"
            })
        }
    }
    e.s(["InvalidSignatureError", 0, r, "InvalidStructSignatureError", 0, i, "UnknownSignatureError", 0, n])
}, 96206, e => {
    "use strict";
    var t = e.i(629070);
    class r extends t.BaseError {
        constructor({
            type: e
        }) {
            super("Circular reference detected.", {
                metaMessages: [`Struct "${e}" is a circular reference.`]
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "CircularReferenceError"
            })
        }
    }
    e.s(["CircularReferenceError", 0, r])
}, 950272, e => {
    "use strict";
    var t = e.i(629070);
    class r extends t.BaseError {
        constructor({
            current: e,
            depth: t
        }) {
            super("Unbalanced parentheses.", {
                metaMessages: [`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],
                details: `Depth "${t}"`
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "InvalidParenthesisError"
            })
        }
    }
    e.s(["InvalidParenthesisError", 0, r])
}, 504154, 495161, 692265, e => {
    "use strict";
    var t = e.i(118520),
        r = e.i(461023),
        n = e.i(10928),
        i = e.i(118274),
        a = e.i(924216),
        s = e.i(96206),
        o = e.i(950272);
    let c = new Map([
        ["address", {
            type: "address"
        }],
        ["bool", {
            type: "bool"
        }],
        ["bytes", {
            type: "bytes"
        }],
        ["bytes32", {
            type: "bytes32"
        }],
        ["int", {
            type: "int256"
        }],
        ["int256", {
            type: "int256"
        }],
        ["string", {
            type: "string"
        }],
        ["uint", {
            type: "uint256"
        }],
        ["uint8", {
            type: "uint8"
        }],
        ["uint16", {
            type: "uint16"
        }],
        ["uint24", {
            type: "uint24"
        }],
        ["uint32", {
            type: "uint32"
        }],
        ["uint64", {
            type: "uint64"
        }],
        ["uint96", {
            type: "uint96"
        }],
        ["uint112", {
            type: "uint112"
        }],
        ["uint160", {
            type: "uint160"
        }],
        ["uint192", {
            type: "uint192"
        }],
        ["uint256", {
            type: "uint256"
        }],
        ["address owner", {
            type: "address",
            name: "owner"
        }],
        ["address to", {
            type: "address",
            name: "to"
        }],
        ["bool approved", {
            type: "bool",
            name: "approved"
        }],
        ["bytes _data", {
            type: "bytes",
            name: "_data"
        }],
        ["bytes data", {
            type: "bytes",
            name: "data"
        }],
        ["bytes signature", {
            type: "bytes",
            name: "signature"
        }],
        ["bytes32 hash", {
            type: "bytes32",
            name: "hash"
        }],
        ["bytes32 r", {
            type: "bytes32",
            name: "r"
        }],
        ["bytes32 root", {
            type: "bytes32",
            name: "root"
        }],
        ["bytes32 s", {
            type: "bytes32",
            name: "s"
        }],
        ["string name", {
            type: "string",
            name: "name"
        }],
        ["string symbol", {
            type: "string",
            name: "symbol"
        }],
        ["string tokenURI", {
            type: "string",
            name: "tokenURI"
        }],
        ["uint tokenId", {
            type: "uint256",
            name: "tokenId"
        }],
        ["uint8 v", {
            type: "uint8",
            name: "v"
        }],
        ["uint256 balance", {
            type: "uint256",
            name: "balance"
        }],
        ["uint256 tokenId", {
            type: "uint256",
            name: "tokenId"
        }],
        ["uint256 value", {
            type: "uint256",
            name: "value"
        }],
        ["event:address indexed from", {
            type: "address",
            name: "from",
            indexed: !0
        }],
        ["event:address indexed to", {
            type: "address",
            name: "to",
            indexed: !0
        }],
        ["event:uint indexed tokenId", {
            type: "uint256",
            name: "tokenId",
            indexed: !0
        }],
        ["event:uint256 indexed tokenId", {
            type: "uint256",
            name: "tokenId",
            indexed: !0
        }]
    ]);

    function u(e, r = {}) {
        if ((0, t.isFunctionSignature)(e)) return function(e, r = {}) {
            let n = (0, t.execFunctionSignature)(e);
            if (!n) throw new a.InvalidSignatureError({
                signature: e,
                type: "function"
            });
            let i = p(n.parameters),
                s = [],
                o = i.length;
            for (let e = 0; e < o; e++) s.push(b(i[e], {
                modifiers: t.functionModifiers,
                structs: r,
                type: "function"
            }));
            let c = [];
            if (n.returns) {
                let e = p(n.returns),
                    i = e.length;
                for (let n = 0; n < i; n++) c.push(b(e[n], {
                    modifiers: t.functionModifiers,
                    structs: r,
                    type: "function"
                }))
            }
            return {
                name: n.name,
                type: "function",
                stateMutability: n.stateMutability ? ? "nonpayable",
                inputs: s,
                outputs: c
            }
        }(e, r);
        if ((0, t.isEventSignature)(e)) return function(e, r = {}) {
            let n = (0, t.execEventSignature)(e);
            if (!n) throw new a.InvalidSignatureError({
                signature: e,
                type: "event"
            });
            let i = p(n.parameters),
                s = [],
                o = i.length;
            for (let e = 0; e < o; e++) s.push(b(i[e], {
                modifiers: t.eventModifiers,
                structs: r,
                type: "event"
            }));
            return {
                name: n.name,
                type: "event",
                inputs: s
            }
        }(e, r);
        if ((0, t.isErrorSignature)(e)) return function(e, r = {}) {
            let n = (0, t.execErrorSignature)(e);
            if (!n) throw new a.InvalidSignatureError({
                signature: e,
                type: "error"
            });
            let i = p(n.parameters),
                s = [],
                o = i.length;
            for (let e = 0; e < o; e++) s.push(b(i[e], {
                structs: r,
                type: "error"
            }));
            return {
                name: n.name,
                type: "error",
                inputs: s
            }
        }(e, r);
        if ((0, t.isConstructorSignature)(e)) return function(e, r = {}) {
            let n = (0, t.execConstructorSignature)(e);
            if (!n) throw new a.InvalidSignatureError({
                signature: e,
                type: "constructor"
            });
            let i = p(n.parameters),
                s = [],
                o = i.length;
            for (let e = 0; e < o; e++) s.push(b(i[e], {
                structs: r,
                type: "constructor"
            }));
            return {
                type: "constructor",
                stateMutability: n.stateMutability ? ? "nonpayable",
                inputs: s
            }
        }(e, r);
        if ((0, t.isFallbackSignature)(e)) {
            var n = e;
            let r = (0, t.execFallbackSignature)(n);
            if (!r) throw new a.InvalidSignatureError({
                signature: n,
                type: "fallback"
            });
            return {
                type: "fallback",
                stateMutability: r.stateMutability ? ? "nonpayable"
            }
        }
        if ((0, t.isReceiveSignature)(e)) return {
            type: "receive",
            stateMutability: "payable"
        };
        throw new a.UnknownSignatureError({
            signature: e
        })
    }
    let f = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,
        d = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,
        l = /^u?int$/;

    function b(e, a) {
        var s, o;
        let u, y = function(e, t, r) {
            let n = "";
            if (r)
                for (let e of Object.entries(r)) {
                    if (!e) continue;
                    let t = "";
                    for (let r of e[1]) t += `[${r.type}${r.name?`:${r.name}`:""}]`;
                    n += `(${e[0]}{${t}})`
                }
            return t ? `${t}:${e}${n}` : `${e}${n}`
        }(e, a ? .type, a ? .structs);
        if (c.has(y)) return c.get(y);
        let g = r.isTupleRegex.test(e),
            v = (0, r.execTyped)(g ? d : f, e);
        if (!v) throw new i.InvalidParameterError({
            param: e
        });
        if (v.name && ("address" === (s = v.name) || "bool" === s || "function" === s || "string" === s || "tuple" === s || r.bytesRegex.test(s) || r.integerRegex.test(s) || h.test(s))) throw new i.SolidityProtectedKeywordError({
            param: e,
            name: v.name
        });
        let x = v.name ? {
                name: v.name
            } : {},
            E = "indexed" === v.modifier ? {
                indexed: !0
            } : {},
            w = a ? .structs ? ? {},
            $ = {};
        if (g) {
            u = "tuple";
            let e = p(v.type),
                t = [],
                r = e.length;
            for (let n = 0; n < r; n++) t.push(b(e[n], {
                structs: w
            }));
            $ = {
                components: t
            }
        } else if (v.type in w) u = "tuple", $ = {
            components: w[v.type]
        };
        else if (l.test(v.type)) u = `${v.type}256`;
        else if ("address payable" === v.type) u = "address";
        else if (u = v.type, a ? .type !== "struct" && !m(u)) throw new n.UnknownSolidityTypeError({
            type: u
        });
        if (v.modifier) {
            if (!a ? .modifiers ? .has ? .(v.modifier)) throw new i.InvalidModifierError({
                param: e,
                type: a ? .type,
                modifier: v.modifier
            });
            if (t.functionModifiers.has(v.modifier) && (o = u, !v.array && "bytes" !== o && "string" !== o && "tuple" !== o)) throw new i.InvalidFunctionModifierError({
                param: e,
                type: a ? .type,
                modifier: v.modifier
            })
        }
        let I = {
            type: `${u}${v.array??""}`,
            ...x,
            ...E,
            ...$
        };
        return c.set(y, I), I
    }

    function p(e, t = [], r = "", n = 0) {
        let i = e.trim().length;
        for (let a = 0; a < i; a++) {
            let i = e[a],
                s = e.slice(a + 1);
            switch (i) {
                case ",":
                    return 0 === n ? p(s, [...t, r.trim()]) : p(s, t, `${r}${i}`, n);
                case "(":
                    return p(s, t, `${r}${i}`, n + 1);
                case ")":
                    return p(s, t, `${r}${i}`, n - 1);
                default:
                    return p(s, t, `${r}${i}`, n)
            }
        }
        if ("" === r) return t;
        if (0 !== n) throw new o.InvalidParenthesisError({
            current: r,
            depth: n
        });
        return t.push(r.trim()), t
    }

    function m(e) {
        return "address" === e || "bool" === e || "function" === e || "string" === e || r.bytesRegex.test(e) || r.integerRegex.test(e)
    }
    let h = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;

    function y(e) {
        let o = {},
            c = e.length;
        for (let r = 0; r < c; r++) {
            let n = e[r];
            if (!(0, t.isStructSignature)(n)) continue;
            let i = (0, t.execStructSignature)(n);
            if (!i) throw new a.InvalidSignatureError({
                signature: n,
                type: "struct"
            });
            let s = i.properties.split(";"),
                c = [],
                u = s.length;
            for (let e = 0; e < u; e++) {
                let t = s[e].trim();
                if (!t) continue;
                let r = b(t, {
                    type: "struct"
                });
                c.push(r)
            }
            if (!c.length) throw new a.InvalidStructSignatureError({
                signature: n
            });
            o[i.name] = c
        }
        let u = {},
            f = Object.entries(o),
            d = f.length;
        for (let e = 0; e < d; e++) {
            let [t, a] = f[e];
            u[t] = function e(t = [], a = {}, o = new Set) {
                let c = [],
                    u = t.length;
                for (let f = 0; f < u; f++) {
                    let u = t[f];
                    if (r.isTupleRegex.test(u.type)) c.push(u);
                    else {
                        let t = (0, r.execTyped)(g, u.type);
                        if (!t ? .type) throw new i.InvalidAbiTypeParameterError({
                            abiParameter: u
                        });
                        let {
                            array: f,
                            type: d
                        } = t;
                        if (d in a) {
                            if (o.has(d)) throw new s.CircularReferenceError({
                                type: d
                            });
                            c.push({ ...u,
                                type: `tuple${f??""}`,
                                components: e(a[d], a, new Set([...o, d]))
                            })
                        } else if (m(d)) c.push(u);
                        else throw new n.UnknownTypeError({
                            type: d
                        })
                    }
                }
                return c
            }(a, o)
        }
        return u
    }
    e.s(["isSolidityType", 0, m, "parseAbiParameter", 0, b, "parseSignature", 0, u, "splitParameters", 0, p], 495161);
    let g = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
    e.s(["parseStructs", 0, y], 692265), e.s(["parseAbi", 0, function(e) {
        let r = y(e),
            n = [],
            i = e.length;
        for (let a = 0; a < i; a++) {
            let i = e[a];
            (0, t.isStructSignature)(i) || n.push(u(i, r))
        }
        return n
    }], 504154)
}, 49392, 670441, 226829, 525289, 971418, e => {
    "use strict";
    e.s(["IntegerOutOfRangeError", () => I, "InvalidLengthError", () => P, "SizeExceedsPaddingSizeError", () => z, "SizeOverflowError", () => S, "SliceOffsetOutOfBoundsError", () => T, "concat", () => f, "from", () => d, "fromBoolean", () => l, "fromBytes", () => b, "fromNumber", () => p, "fromString", () => m, "padLeft", () => h, "padRight", () => y, "size", () => v, "slice", () => g, "toBigInt", () => E, "toNumber", () => w, "trimLeft", () => x, "validate", () => $], 971418);
    class t extends Error {
        static setStaticOptions(e) {
            t.prototype.docsOrigin = e.docsOrigin, t.prototype.showVersion = e.showVersion, t.prototype.version = e.version
        }
        constructor(e, r = {}) {
            const n = (() => {
                    if (r.cause instanceof t) {
                        if (r.cause.details) return r.cause.details;
                        if (r.cause.shortMessage) return r.cause.shortMessage
                    }
                    return r.cause && "details" in r.cause && "string" == typeof r.cause.details ? r.cause.details : r.cause ? .message ? r.cause.message : r.details
                })(),
                i = r.cause instanceof t && r.cause.docsPath || r.docsPath,
                a = r.docsOrigin ? ? t.prototype.docsOrigin,
                s = `${a}${i??""}`,
                o = !!(r.version ? ? t.prototype.showVersion),
                c = r.version ? ? t.prototype.version;
            super([e || "An error occurred.", ...r.metaMessages ? ["", ...r.metaMessages] : [], ...n || i || o ? ["", n ? `Details: ${n}` : void 0, i ? `See: ${s}` : void 0, o ? `Version: ${c}` : void 0] : []].filter(e => "string" == typeof e).join("\n"), r.cause ? {
                cause: r.cause
            } : void 0), Object.defineProperty(this, "details", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "docs", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "docsOrigin", {
                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, "shortMessage", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "showVersion", {
                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, "cause", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: void 0
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "BaseError"
            }), this.cause = r.cause, this.details = n, this.docs = s, this.docsOrigin = a, this.docsPath = i, this.shortMessage = e, this.showVersion = o, this.version = c
        }
        walk(e) {
            return function e(t, r) {
                return r ? .(t) ? t : t && "object" == typeof t && "cause" in t && t.cause ? e(t.cause, r) : r ? null : t
            }(this, e)
        }
    }

    function r(e, t) {
        if (v(e) > t) throw new S({
            givenSize: v(e),
            maxSize: t
        })
    }

    function n(e, t) {
        if ("number" == typeof t && t > 0 && t > v(e) - 1) throw new T({
            offset: t,
            position: "start",
            size: v(e)
        })
    }

    function i(e, t, r) {
        if ("number" == typeof t && "number" == typeof r && v(e) !== r - t) throw new T({
            offset: r,
            position: "end",
            size: v(e)
        })
    }

    function a(e, t = {}) {
        let {
            dir: r,
            size: n = 32
        } = t;
        if (0 === n) return e;
        let i = e.replace("0x", "");
        if (i.length > 2 * n) throw new z({
            size: Math.ceil(i.length / 2),
            targetSize: n,
            type: "Hex"
        });
        return `0x${i["right"===r?"padEnd":"padStart"](2*n,"0")}`
    }

    function s(e, t = {}) {
        let {
            dir: r = "left"
        } = t, n = e.replace("0x", ""), i = 0;
        for (let e = 0; e < n.length - 1; e++)
            if ("0" === n["left" === r ? e : n.length - e - 1].toString()) i++;
            else break;
        return "0" === (n = "left" === r ? n.slice(i) : n.slice(0, n.length - i)) ? "0x" : "right" === r && n.length % 2 == 1 ? `0x${n}0` : `0x${n}`
    }

    function o(e, t, r) {
        return JSON.stringify(e, (e, r) => "function" == typeof t ? t(e, r) : "bigint" == typeof r ? r.toString() + "#__bigint" : r, r)
    }
    Object.defineProperty(t, "defaultStaticOptions", {
        enumerable: !0,
        configurable: !0,
        writable: !0,
        value: {
            docsOrigin: "https://oxlib.sh",
            showVersion: !1,
            version: "ox@0.1.1"
        }
    }), t.setStaticOptions(t.defaultStaticOptions), e.s(["BaseError", 0, t], 670441), e.s(["assertEndOffset", () => i, "assertSize", () => r, "assertStartOffset", () => n, "pad", () => a, "trim", () => s], 226829), e.s(["stringify", 0, o], 525289);
    let c = new TextEncoder,
        u = Array.from({
            length: 256
        }, (e, t) => t.toString(16).padStart(2, "0"));

    function f(...e) {
        return `0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`
    }

    function d(e) {
        return e instanceof Uint8Array ? b(e) : Array.isArray(e) ? b(new Uint8Array(e)) : e
    }

    function l(e, t = {}) {
        let n = `0x${Number(e)}`;
        return "number" == typeof t.size ? (r(n, t.size), h(n, t.size)) : n
    }

    function b(e, t = {}) {
        let n = "";
        for (let t = 0; t < e.length; t++) n += u[e[t]];
        let i = `0x${n}`;
        return "number" == typeof t.size ? (r(i, t.size), y(i, t.size)) : i
    }

    function p(e, t = {}) {
        let r, {
                signed: n,
                size: i
            } = t,
            a = BigInt(e);
        i ? r = n ? (1 n << 8 n * BigInt(i) - 1 n) - 1 n : 2 n ** (8 n * BigInt(i)) - 1 n : "number" == typeof e && (r = BigInt(Number.MAX_SAFE_INTEGER));
        let s = "bigint" == typeof r && n ? -r - 1 n : 0;
        if (r && a > r || a < s) {
            let t = "bigint" == typeof e ? "n" : "";
            throw new I({
                max: r ? `${r}${t}` : void 0,
                min: `${s}${t}`,
                signed: n,
                size: i,
                value: `${e}${t}`
            })
        }
        let o = (n && a < 0 ? BigInt.asUintN(8 * i, BigInt(a)) : a).toString(16),
            c = `0x${o}`;
        return i ? h(c, i) : c
    }

    function m(e, t = {}) {
        return b(c.encode(e), t)
    }

    function h(e, t) {
        return a(e, {
            dir: "left",
            size: t
        })
    }

    function y(e, t) {
        return a(e, {
            dir: "right",
            size: t
        })
    }

    function g(e, t, r, a = {}) {
        let {
            strict: s
        } = a;
        n(e, t);
        let o = `0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;
        return s && i(o, t, r), o
    }

    function v(e) {
        return Math.ceil((e.length - 2) / 2)
    }

    function x(e) {
        return s(e, {
            dir: "left"
        })
    }

    function E(e, t = {}) {
        let {
            signed: n
        } = t;
        t.size && r(e, t.size);
        let i = BigInt(e);
        if (!n) return i;
        let a = (1 n << 8 n * BigInt((e.length - 2) / 2)) - 1 n;
        return i <= a >> 1 n ? i : i - a - 1 n
    }

    function w(e, t = {}) {
        let {
            signed: r,
            size: n
        } = t;
        return r || n ? Number(E(e, t)) : Number(e)
    }

    function $(e, t = {}) {
        let {
            strict: r = !1
        } = t;
        try {
            return ! function(e, t = {}) {
                let {
                    strict: r = !1
                } = t;
                if (!e || "string" != typeof e) throw new A(e);
                if (r && !/^0x[0-9a-fA-F]*$/.test(e) || !e.startsWith("0x")) throw new B(e)
            }(e, {
                strict: r
            }), !0
        } catch {
            return !1
        }
    }
    class I extends t {
        constructor({
            max: e,
            min: t,
            signed: r,
            size: n,
            value: i
        }) {
            super(`Number \`${i}\` is not in safe${n?` ${8*n}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "Hex.IntegerOutOfRangeError"
            })
        }
    }
    class A extends t {
        constructor(e) {
            super(`Value \`${"object"==typeof e?o(e):e}\` of type \`${typeof e}\` is an invalid hex type.`, {
                metaMessages: ['Hex types must be represented as `"0x${string}"`.']
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "Hex.InvalidHexTypeError"
            })
        }
    }
    class B extends t {
        constructor(e) {
            super(`Value \`${e}\` is an invalid hex value.`, {
                metaMessages: ['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "Hex.InvalidHexValueError"
            })
        }
    }
    class P extends t {
        constructor(e) {
            super(`Hex value \`"${e}"\` is an odd length (${e.length-2} nibbles).`, {
                metaMessages: ["It must be an even length."]
            }), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "Hex.InvalidLengthError"
            })
        }
    }
    class S extends t {
        constructor({
            givenSize: e,
            maxSize: t
        }) {
            super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "Hex.SizeOverflowError"
            })
        }
    }
    class T extends t {
        constructor({
            offset: e,
            position: t,
            size: r
        }) {
            super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "Hex.SliceOffsetOutOfBoundsError"
            })
        }
    }
    class z extends t {
        constructor({
            size: e,
            targetSize: t,
            type: r
        }) {
            super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`), Object.defineProperty(this, "name", {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: "Hex.SizeExceedsPaddingSizeError"
            })
        }
    }

    function F(e) {
        return {
            address: e.address,
            amount: p(e.amount),
            index: p(e.index),
            validatorIndex: p(e.validatorIndex)
        }
    }
    e.s(["toRpc", 0, function(e) {
        return { ..."bigint" == typeof e.baseFeePerGas && {
                baseFeePerGas: p(e.baseFeePerGas)
            },
            ..."bigint" == typeof e.blobBaseFee && {
                blobBaseFee: p(e.blobBaseFee)
            },
            ..."string" == typeof e.feeRecipient && {
                feeRecipient: e.feeRecipient
            },
            ..."bigint" == typeof e.gasLimit && {
                gasLimit: p(e.gasLimit)
            },
            ..."bigint" == typeof e.number && {
                number: p(e.number)
            },
            ..."bigint" == typeof e.prevRandao && {
                prevRandao: p(e.prevRandao)
            },
            ..."bigint" == typeof e.time && {
                time: p(e.time)
            },
            ...e.withdrawals && {
                withdrawals: e.withdrawals.map(F)
            }
        }
    }], 49392)
}, 79489, 406954, e => {
    "use strict";
    e.s(["aggregate3Signature", 0, "0x82ad56cb"], 79489), e.s(["deploylessCallViaBytecodeBytecode", 0, "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe", "deploylessCallViaFactoryBytecode", 0, "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe", "erc6492SignatureValidatorByteCode", 0, "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572", "multicall3Bytecode", 0, " "], 406954)
}, 762485, e => {
    "use strict";
    var t = e.i(624297),
        r = e.i(844268),
        n = e.i(198905);
    let i = "/docs/contract/encodeDeployData";
    e.s(["encodeDeployData", 0, function(e) {
        let {
            abi: a,
            args: s,
            bytecode: o
        } = e;
        if (!s || 0 === s.length) return o;
        let c = a.find(e => "type" in e && "constructor" === e.type);
        if (!c) throw new t.AbiConstructorNotFoundError({
            docsPath: i
        });
        if (!("inputs" in c) || !c.inputs || 0 === c.inputs.length) throw new t.AbiConstructorParamsNotFoundError({
            docsPath: i
        });
        let u = (0, n.encodeAbiParameters)(c.inputs, s);
        return (0, r.concatHex)([o, u])
    }])
}, 501221, e => {
    "use strict";
    var t = e.i(621030),
        r = e.i(869076);
    e.s(["getNodeError", 0, function(e, n) {
        let i = (e.details || "").toLowerCase(),
            a = e instanceof t.BaseError ? e.walk(e => e ? .code === r.ExecutionRevertedError.code) : e;
        return a instanceof t.BaseError ? new r.ExecutionRevertedError({
            cause: e,
            message: a.details
        }) : r.ExecutionRevertedError.nodeMessage.test(i) ? new r.ExecutionRevertedError({
            cause: e,
            message: e.details
        }) : r.FeeCapTooHighError.nodeMessage.test(i) ? new r.FeeCapTooHighError({
            cause: e,
            maxFeePerGas: n ? .maxFeePerGas
        }) : r.FeeCapTooLowError.nodeMessage.test(i) ? new r.FeeCapTooLowError({
            cause: e,
            maxFeePerGas: n ? .maxFeePerGas
        }) : r.NonceTooHighError.nodeMessage.test(i) ? new r.NonceTooHighError({
            cause: e,
            nonce: n ? .nonce
        }) : r.NonceTooLowError.nodeMessage.test(i) ? new r.NonceTooLowError({
            cause: e,
            nonce: n ? .nonce
        }) : r.NonceMaxValueError.nodeMessage.test(i) ? new r.NonceMaxValueError({
            cause: e,
            nonce: n ? .nonce
        }) : r.InsufficientFundsError.nodeMessage.test(i) ? new r.InsufficientFundsError({
            cause: e
        }) : r.IntrinsicGasTooHighError.nodeMessage.test(i) ? new r.IntrinsicGasTooHighError({
            cause: e,
            gas: n ? .gas
        }) : r.IntrinsicGasTooLowError.nodeMessage.test(i) ? new r.IntrinsicGasTooLowError({
            cause: e,
            gas: n ? .gas
        }) : r.TransactionTypeNotSupportedError.nodeMessage.test(i) ? new r.TransactionTypeNotSupportedError({
            cause: e
        }) : r.TipAboveFeeCapError.nodeMessage.test(i) ? new r.TipAboveFeeCapError({
            cause: e,
            maxFeePerGas: n ? .maxFeePerGas,
            maxPriorityFeePerGas: n ? .maxPriorityFeePerGas
        }) : new r.UnknownNodeError({
            cause: e
        })
    }])
}, 111509, e => {
    "use strict";
    var t = e.i(285510),
        r = e.i(869076),
        n = e.i(501221);
    e.s(["getCallError", 0, function(e, {
        docsPath: i,
        ...a
    }) {
        let s, o = (s = (0, n.getNodeError)(e, a)) instanceof r.UnknownNodeError ? e : s;
        return new t.CallExecutionError(o, {
            docsPath: i,
            ...a
        })
    }])
}, 375137, e => {
    "use strict";
    e.s(["extract", 0, function(e, {
        format: t
    }) {
        if (!t) return {};
        let r = {};
        return ! function t(n) {
            for (let i of Object.keys(n)) i in e && (r[i] = e[i]), n[i] && "object" == typeof n[i] && !Array.isArray(n[i]) && t(n[i])
        }(t(e || {})), r
    }])
}, 525270, e => {
    "use strict";
    var t = e.i(108157),
        r = e.i(299377),
        n = e.i(993817),
        i = e.i(571333),
        a = e.i(186897);

    function s(e) {
        if (e && 0 !== e.length) return e.reduce((e, {
            slot: t,
            value: n
        }) => {
            if (66 !== t.length) throw new r.InvalidBytesLengthError({
                size: t.length,
                targetSize: 66,
                type: "hex"
            });
            if (66 !== n.length) throw new r.InvalidBytesLengthError({
                size: n.length,
                targetSize: 66,
                type: "hex"
            });
            return e[t] = n, e
        }, {})
    }
    e.s(["serializeStateOverride", 0, function(e) {
        if (!e) return;
        let r = {};
        for (let {
                address: o,
                ...c
            } of e) {
            if (!(0, i.isAddress)(o, {
                    strict: !1
                })) throw new t.InvalidAddressError({
                address: o
            });
            if (r[o]) throw new n.AccountStateConflictError({
                address: o
            });
            r[o] = function(e) {
                let {
                    balance: t,
                    nonce: r,
                    state: i,
                    stateDiff: o,
                    code: c
                } = e, u = {};
                if (void 0 !== c && (u.code = c), void 0 !== t && (u.balance = (0, a.numberToHex)(t)), void 0 !== r && (u.nonce = (0, a.numberToHex)(r)), void 0 !== i && (u.state = s(i)), void 0 !== o) {
                    if (u.state) throw new n.StateAssignmentConflictError;
                    u.stateDiff = s(o)
                }
                return u
            }(c)
        }
        return r
    }])
}, 830363, e => {
    "use strict";
    var t = e.i(372387),
        r = e.i(306243),
        n = e.i(108157),
        i = e.i(869076),
        a = e.i(571333);
    e.s(["assertRequest", 0, function(e) {
        let {
            account: s,
            maxFeePerGas: o,
            maxPriorityFeePerGas: c,
            to: u
        } = e, f = s ? (0, t.parseAccount)(s) : void 0;
        if (f && !(0, a.isAddress)(f.address)) throw new n.InvalidAddressError({
            address: f.address
        });
        if (u && !(0, a.isAddress)(u)) throw new n.InvalidAddressError({
            address: u
        });
        if (o && o > r.maxUint256) throw new i.FeeCapTooHighError({
            maxFeePerGas: o
        });
        if (c && o && c > o) throw new i.TipAboveFeeCapError({
            maxFeePerGas: o,
            maxPriorityFeePerGas: c
        })
    }])
}, 376436, e => {
    "use strict";
    var t = e.i(504154),
        r = e.i(49392),
        n = e.i(372387),
        i = e.i(866674),
        a = e.i(79489),
        s = e.i(406954),
        o = e.i(621030),
        c = e.i(603641),
        u = e.i(285510),
        f = e.i(933619),
        d = e.i(762485),
        l = e.i(56339),
        b = e.i(961304),
        p = e.i(186897),
        m = e.i(111509),
        h = e.i(375137),
        y = e.i(249618),
        g = e.i(175947),
        v = e.i(525270),
        x = e.i(830363);
    async function E(i, f) {
        let {
            account: l = i.account,
            authorizationList: b,
            batch: g = !!i.batch ? .multicall,
            blockNumber: E,
            blockTag: I = i.experimental_blockTag ? ? "latest",
            accessList: A,
            blobs: B,
            blockOverrides: P,
            code: S,
            data: T,
            factory: z,
            factoryData: F,
            gas: C,
            gasPrice: O,
            maxFeePerBlobGas: M,
            maxFeePerGas: N,
            maxPriorityFeePerGas: R,
            nonce: U,
            to: H,
            value: k,
            stateOverride: j,
            ...D
        } = f, L = l ? (0, n.parseAccount)(l) : void 0;
        if (S && (z || F)) throw new o.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
        if (S && H) throw new o.BaseError("Cannot provide both `code` & `to` as parameters.");
        let G = S && T,
            V = z && F && H && T,
            _ = G || V,
            Z = G ? $({
                code: S,
                data: T
            }) : V ? function(e) {
                let {
                    data: r,
                    factory: n,
                    factoryData: i,
                    to: a
                } = e;
                return (0, d.encodeDeployData)({
                    abi: (0, t.parseAbi)(["constructor(address, bytes, address, bytes)"]),
                    bytecode: s.deploylessCallViaFactoryBytecode,
                    args: [a, r, n, i]
                })
            }({
                data: T,
                factory: z,
                factoryData: F,
                to: H
            }) : T;
        try {
            let e;
            (0, x.assertRequest)(f);
            let t = ("bigint" == typeof E ? (0, p.numberToHex)(E) : void 0) || I,
                n = P ? r.toRpc(P) : void 0,
                s = (0, v.serializeStateOverride)(j),
                o = i.chain ? .formatters ? .transactionRequest ? .format,
                u = (o || y.formatTransactionRequest)({ ...(0, h.extract)(D, {
                        format: o
                    }),
                    accessList: A,
                    account: L,
                    authorizationList: b,
                    blobs: B,
                    data: Z,
                    gas: C,
                    gasPrice: O,
                    maxFeePerBlobGas: M,
                    maxFeePerGas: N,
                    maxPriorityFeePerGas: R,
                    nonce: U,
                    to: _ ? void 0 : H,
                    value: k
                }, "call");
            if (g && function({
                    request: e
                }) {
                    let {
                        data: t,
                        to: r,
                        ...n
                    } = e;
                    return !(!t || t.startsWith(a.aggregate3Signature)) && !!r && !(Object.values(n).filter(e => void 0 !== e).length > 0)
                }({
                    request: u
                }) && !s && !n) try {
                return await w(i, { ...u,
                    blockNumber: E,
                    blockTag: I
                })
            } catch (e) {
                if (!(e instanceof c.ClientChainNotConfiguredError) && !(e instanceof c.ChainDoesNotSupportContract)) throw e
            }
            let d = (e = [u, t], s && n ? [...e, s, n] : s ? [...e, s] : n ? [...e, {}, n] : e),
                l = await i.request({
                    method: "eth_call",
                    params: d
                });
            if ("0x" === l) return {
                data: void 0
            };
            return {
                data: l
            }
        } catch (a) {
            let t = function(e) {
                    if (!(e instanceof o.BaseError)) return;
                    let t = e.walk();
                    return "object" == typeof t ? .data ? t.data ? .data : t.data
                }(a),
                {
                    offchainLookup: r,
                    offchainLookupSignature: n
                } = await e.A(418177);
            if (!1 !== i.ccipRead && t ? .slice(0, 10) === n && H) return {
                data: await r(i, {
                    data: t,
                    to: H
                })
            };
            if (_ && t ? .slice(0, 10) === "0x101bb98d") throw new u.CounterfactualDeploymentFailedError({
                factory: z
            });
            throw (0, m.getCallError)(a, { ...f,
                account: L,
                chain: i.chain
            })
        }
    }
    async function w(e, t) {
        let {
            batchSize: r = 1024,
            deployless: n = !1,
            wait: a = 0
        } = "object" == typeof e.batch ? .multicall ? e.batch.multicall : {}, {
            blockNumber: o,
            blockTag: d = e.experimental_blockTag ? ? "latest",
            data: m,
            to: h
        } = t, y = (() => {
            if (n) return null;
            if (t.multicallAddress) return t.multicallAddress;
            if (e.chain) return (0, b.getChainContractAddress)({
                blockNumber: o,
                chain: e.chain,
                contract: "multicall3"
            });
            throw new c.ClientChainNotConfiguredError
        })(), v = ("bigint" == typeof o ? (0, p.numberToHex)(o) : void 0) || d, {
            schedule: x
        } = (0, g.createBatchScheduler)({
            id: `${e.uid}.${v}`,
            wait: a,
            shouldSplitBatch: e => e.reduce((e, {
                data: t
            }) => e + (t.length - 2), 0) > 2 * r,
            fn: async t => {
                let r = t.map(e => ({
                        allowFailure: !0,
                        callData: e.data,
                        target: e.to
                    })),
                    n = (0, l.encodeFunctionData)({
                        abi: i.multicall3Abi,
                        args: [r],
                        functionName: "aggregate3"
                    }),
                    a = await e.request({
                        method: "eth_call",
                        params: [{ ...null === y ? {
                                data: $({
                                    code: s.multicall3Bytecode,
                                    data: n
                                })
                            } : {
                                to: y,
                                data: n
                            }
                        }, v]
                    });
                return (0, f.decodeFunctionResult)({
                    abi: i.multicall3Abi,
                    args: [r],
                    functionName: "aggregate3",
                    data: a || "0x"
                })
            }
        }), [{
            returnData: E,
            success: w
        }] = await x({
            data: m,
            to: h
        });
        if (!w) throw new u.RawContractError({
            data: E
        });
        return "0x" === E ? {
            data: void 0
        } : {
            data: E
        }
    }

    function $(e) {
        let {
            code: r,
            data: n
        } = e;
        return (0, d.encodeDeployData)({
            abi: (0, t.parseAbi)(["constructor(bytes, bytes)"]),
            bytecode: s.deploylessCallViaBytecodeBytecode,
            args: [r, n]
        })
    }
    e.s(["call", 0, E])
}]);

//# debugId=bb670581-c276-40da-45f5-688d7f9b4a60