@a.annzzz/directdeposit-widget
Version:
A plug-and-play React component for connecting a Web3 wallet and displaying deposit schedule information.
791 lines • 948 kB
JavaScript
var rg = Object.defineProperty;
var ff = (e) => {
throw TypeError(e);
};
var ag = (e, t, n) => t in e ? rg(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var V = (e, t, n) => ag(e, typeof t != "symbol" ? t + "" : t, n), ko = (e, t, n) => t.has(e) || ff("Cannot " + n);
var O = (e, t, n) => (ko(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ce = (e, t, n) => t.has(e) ? ff("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Q = (e, t, n, r) => (ko(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), Ge = (e, t, n) => (ko(e, t, "access private method"), n);
var _s = (e, t, n, r) => ({
set _(a) {
Q(e, t, a, n);
},
get _() {
return O(e, t, r);
}
});
import * as Z from "react";
import I, { useState as Re, useRef as wn, useLayoutEffect as ji, useEffect as Pt, useSyncExternalStore as sg, isValidElement as Vi, cloneElement as gs, createRef as qn, Component as Be, useCallback as ig, createElement as og, useMemo as my } from "react";
import { WagmiProvider as cg, useWalletClient as ug, usePublicClient as lg, useSwitchChain as dg, useAccount as fg, useDisconnect as pg } from "wagmi";
import { getDefaultConfig as yg, RainbowKitProvider as mg, lightTheme as hg, ConnectButton as bg } from "@rainbow-me/rainbowkit";
import { concat as We, ContractFunctionRevertedError as pf, RpcRequestError as yf, InvalidInputRpcError as mf, UnknownRpcError as hf, decodeErrorResult as Mo, RawContractError as gg, BaseError as Yi, zeroAddress as ke, isHex as Xa, hexToSignature as vg, signatureToHex as wg, concatHex as at, pad as Oe, createWalletClient as xg, custom as Eg, encodeFunctionData as Me, decodeFunctionResult as Tg, publicActions as Pg, toFunctionSelector as Za, getAbiItem as ou, toHex as _e, hexToBigInt as Hr, encodeAbiParameters as Yt, parseAbiParameters as cu, maxUint192 as Dg, maxUint16 as Ig, parseAbi as tt, encodeDeployData as hy, keccak256 as ni, stringToHex as Cg, domainSeparator as Sg, isAddressEqual as $o, createNonceManager as Ag, getTypesForEIP712Domain as Jl, validateTypedData as ed, hashTypedData as Og, hashMessage as _g, createClient as td, ChainNotFoundError as by, numberToHex as kg, slice as Mg, getAddress as K, createPublicClient as $g, http as qa, maxUint256 as Rg, parseUnits as Fg } from "viem";
import * as Lg from "react-dom";
import Ng from "react-dom";
var ks = { exports: {} }, Aa = {};
/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var bf;
function Bg() {
if (bf) return Aa;
bf = 1;
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
function n(r, a, s) {
var i = null;
if (s !== void 0 && (i = "" + s), a.key !== void 0 && (i = "" + a.key), "key" in a) {
s = {};
for (var o in a)
o !== "key" && (s[o] = a[o]);
} else s = a;
return a = s.ref, {
$$typeof: e,
type: r,
key: i,
ref: a !== void 0 ? a : null,
props: s
};
}
return Aa.Fragment = t, Aa.jsx = n, Aa.jsxs = n, Aa;
}
var Oa = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var gf;
function Ug() {
return gf || (gf = 1, process.env.NODE_ENV !== "production" && (function() {
function e(T) {
if (T == null) return null;
if (typeof T == "function")
return T.$$typeof === L ? null : T.displayName || T.name || null;
if (typeof T == "string") return T;
switch (T) {
case m:
return "Fragment";
case v:
return "Profiler";
case h:
return "StrictMode";
case P:
return "Suspense";
case D:
return "SuspenseList";
case C:
return "Activity";
}
if (typeof T == "object")
switch (typeof T.tag == "number" && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), T.$$typeof) {
case y:
return "Portal";
case g:
return (T.displayName || "Context") + ".Provider";
case w:
return (T._context.displayName || "Context") + ".Consumer";
case b:
var F = T.render;
return T = T.displayName, T || (T = F.displayName || F.name || "", T = T !== "" ? "ForwardRef(" + T + ")" : "ForwardRef"), T;
case E:
return F = T.displayName || null, F !== null ? F : e(T.type) || "Memo";
case x:
F = T._payload, T = T._init;
try {
return e(T(F));
} catch {
}
}
return null;
}
function t(T) {
return "" + T;
}
function n(T) {
try {
t(T);
var F = !1;
} catch {
F = !0;
}
if (F) {
F = console;
var G = F.error, q = typeof Symbol == "function" && Symbol.toStringTag && T[Symbol.toStringTag] || T.constructor.name || "Object";
return G.call(
F,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
q
), t(T);
}
}
function r(T) {
if (T === m) return "<>";
if (typeof T == "object" && T !== null && T.$$typeof === x)
return "<...>";
try {
var F = e(T);
return F ? "<" + F + ">" : "<...>";
} catch {
return "<...>";
}
}
function a() {
var T = H.A;
return T === null ? null : T.getOwner();
}
function s() {
return Error("react-stack-top-frame");
}
function i(T) {
if (U.call(T, "key")) {
var F = Object.getOwnPropertyDescriptor(T, "key").get;
if (F && F.isReactWarning) return !1;
}
return T.key !== void 0;
}
function o(T, F) {
function G() {
S || (S = !0, console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
F
));
}
G.isReactWarning = !0, Object.defineProperty(T, "key", {
get: G,
configurable: !0
});
}
function c() {
var T = e(this.type);
return R[T] || (R[T] = !0, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
)), T = this.props.ref, T !== void 0 ? T : null;
}
function u(T, F, G, q, oe, X, me, On) {
return G = X.ref, T = {
$$typeof: f,
type: T,
key: F,
props: X,
_owner: oe
}, (G !== void 0 ? G : null) !== null ? Object.defineProperty(T, "ref", {
enumerable: !1,
get: c
}) : Object.defineProperty(T, "ref", { enumerable: !1, value: null }), T._store = {}, Object.defineProperty(T._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
}), Object.defineProperty(T, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
}), Object.defineProperty(T, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: me
}), Object.defineProperty(T, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: On
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
}
function l(T, F, G, q, oe, X, me, On) {
var xe = F.children;
if (xe !== void 0)
if (q)
if (j(xe)) {
for (q = 0; q < xe.length; q++)
d(xe[q]);
Object.freeze && Object.freeze(xe);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else d(xe);
if (U.call(F, "key")) {
xe = e(T);
var et = Object.keys(F).filter(function(J) {
return J !== "key";
});
q = 0 < et.length ? "{key: someKey, " + et.join(": ..., ") + ": ...}" : "{key: someKey}", A[xe + q] || (et = 0 < et.length ? "{" + et.join(": ..., ") + ": ...}" : "{}", console.error(
`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,
q,
xe,
et,
xe
), A[xe + q] = !0);
}
if (xe = null, G !== void 0 && (n(G), xe = "" + G), i(F) && (n(F.key), xe = "" + F.key), "key" in F) {
G = {};
for (var sr in F)
sr !== "key" && (G[sr] = F[sr]);
} else G = F;
return xe && o(
G,
typeof T == "function" ? T.displayName || T.name || "Unknown" : T
), u(
T,
xe,
X,
oe,
a(),
G,
me,
On
);
}
function d(T) {
typeof T == "object" && T !== null && T.$$typeof === f && T._store && (T._store.validated = 1);
}
var p = I, f = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), g = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), C = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), H = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, j = Array.isArray, k = console.createTask ? console.createTask : function() {
return null;
};
p = {
react_stack_bottom_frame: function(T) {
return T();
}
};
var S, R = {}, $ = p.react_stack_bottom_frame.bind(
p,
s
)(), M = k(r(s)), A = {};
Oa.Fragment = m, Oa.jsx = function(T, F, G, q, oe) {
var X = 1e4 > H.recentlyCreatedOwnerStacks++;
return l(
T,
F,
G,
!1,
q,
oe,
X ? Error("react-stack-top-frame") : $,
X ? k(r(T)) : M
);
}, Oa.jsxs = function(T, F, G, q, oe) {
var X = 1e4 > H.recentlyCreatedOwnerStacks++;
return l(
T,
F,
G,
!0,
q,
oe,
X ? Error("react-stack-top-frame") : $,
X ? k(r(T)) : M
);
};
})()), Oa;
}
var vf;
function Gg() {
return vf || (vf = 1, process.env.NODE_ENV === "production" ? ks.exports = Bg() : ks.exports = Ug()), ks.exports;
}
var Y = Gg();
function gy(e) {
var t, n, r = "";
if (typeof e == "string" || typeof e == "number") r += e;
else if (typeof e == "object") if (Array.isArray(e)) {
var a = e.length;
for (t = 0; t < a; t++) e[t] && (n = gy(e[t])) && (r && (r += " "), r += n);
} else for (n in e) e[n] && (r && (r += " "), r += n);
return r;
}
function ge() {
for (var e, t, n = 0, r = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = gy(e)) && (r && (r += " "), r += t);
return r;
}
function zg(e) {
if (typeof document > "u") return;
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
n.type = "text/css", t.firstChild ? t.insertBefore(n, t.firstChild) : t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
}
zg(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
`);
var vs = (e) => typeof e == "number" && !isNaN(e), Tr = (e) => typeof e == "string", xn = (e) => typeof e == "function", Hg = (e) => Tr(e) || vs(e), uu = (e) => Tr(e) || xn(e) ? e : null, jg = (e, t) => e === !1 || vs(e) && e > 0 ? e : t, lu = (e) => Vi(e) || Tr(e) || xn(e) || vs(e);
function Vg(e, t, n = 300) {
let { scrollHeight: r, style: a } = e;
requestAnimationFrame(() => {
a.minHeight = "initial", a.height = r + "px", a.transition = `all ${n}ms`, requestAnimationFrame(() => {
a.height = "0", a.padding = "0", a.margin = "0", setTimeout(t, n);
});
});
}
function Yg({ enter: e, exit: t, appendPosition: n = !1, collapse: r = !0, collapseDuration: a = 300 }) {
return function({ children: s, position: i, preventExitTransition: o, done: c, nodeRef: u, isIn: l, playToast: d }) {
let p = n ? `${e}--${i}` : e, f = n ? `${t}--${i}` : t, y = wn(0);
return ji(() => {
let m = u.current, h = p.split(" "), v = (w) => {
w.target === u.current && (d(), m.removeEventListener("animationend", v), m.removeEventListener("animationcancel", v), y.current === 0 && w.type !== "animationcancel" && m.classList.remove(...h));
};
m.classList.add(...h), m.addEventListener("animationend", v), m.addEventListener("animationcancel", v);
}, []), Pt(() => {
let m = u.current, h = () => {
m.removeEventListener("animationend", h), r ? Vg(m, c, a) : c();
};
l || (o ? h() : (y.current = 1, m.className += ` ${f}`, m.addEventListener("animationend", h)));
}, [l]), I.createElement(I.Fragment, null, s);
};
}
function wf(e, t) {
return { content: vy(e.content, e.props), containerId: e.props.containerId, id: e.props.toastId, theme: e.props.theme, type: e.props.type, data: e.props.data || {}, isLoading: e.props.isLoading, icon: e.props.icon, reason: e.removalReason, status: t };
}
function vy(e, t, n = !1) {
return Vi(e) && !Tr(e.type) ? gs(e, { closeToast: t.closeToast, toastProps: t, data: t.data, isPaused: n }) : xn(e) ? e({ closeToast: t.closeToast, toastProps: t, data: t.data, isPaused: n }) : e;
}
function Wg({ closeToast: e, theme: t, ariaLabel: n = "close" }) {
return I.createElement("button", { className: `Toastify__close-button Toastify__close-button--${t}`, type: "button", onClick: (r) => {
r.stopPropagation(), e(!0);
}, "aria-label": n }, I.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, I.createElement("path", { fillRule: "evenodd", d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z" })));
}
function qg({ delay: e, isRunning: t, closeToast: n, type: r = "default", hide: a, className: s, controlledProgress: i, progress: o, rtl: c, isIn: u, theme: l }) {
let d = a || i && o === 0, p = { animationDuration: `${e}ms`, animationPlayState: t ? "running" : "paused" };
i && (p.transform = `scaleX(${o})`);
let f = ge("Toastify__progress-bar", i ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${l}`, `Toastify__progress-bar--${r}`, { "Toastify__progress-bar--rtl": c }), y = xn(s) ? s({ rtl: c, type: r, defaultClassName: f }) : ge(f, s), m = { [i && o >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: i && o < 1 ? null : () => {
u && n();
} };
return I.createElement("div", { className: "Toastify__progress-bar--wrp", "data-hidden": d }, I.createElement("div", { className: `Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${r}` }), I.createElement("div", { role: "progressbar", "aria-hidden": d ? "true" : "false", "aria-label": "notification timer", className: y, style: p, ...m }));
}
var Kg = 1, wy = () => `${Kg++}`;
function Qg(e, t, n) {
let r = 1, a = 0, s = [], i = [], o = t, c = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set(), l = (w) => (u.add(w), () => u.delete(w)), d = () => {
i = Array.from(c.values()), u.forEach((w) => w());
}, p = ({ containerId: w, toastId: g, updateId: b }) => {
let P = w ? w !== e : e !== 1, D = c.has(g) && b == null;
return P || D;
}, f = (w, g) => {
c.forEach((b) => {
var P;
(g == null || g === b.props.toastId) && ((P = b.toggle) == null || P.call(b, w));
});
}, y = (w) => {
var g, b;
(b = (g = w.props) == null ? void 0 : g.onClose) == null || b.call(g, w.removalReason), w.isActive = !1;
}, m = (w) => {
if (w == null) c.forEach(y);
else {
let g = c.get(w);
g && y(g);
}
d();
}, h = () => {
a -= s.length, s = [];
}, v = (w) => {
var g, b;
let { toastId: P, updateId: D } = w.props, E = D == null;
w.staleId && c.delete(w.staleId), w.isActive = !0, c.set(P, w), d(), n(wf(w, E ? "added" : "updated")), E && ((b = (g = w.props).onOpen) == null || b.call(g));
};
return { id: e, props: o, observe: l, toggle: f, removeToast: m, toasts: c, clearQueue: h, buildToast: (w, g) => {
if (p(g)) return;
let { toastId: b, updateId: P, data: D, staleId: E, delay: x } = g, C = P == null;
C && a++;
let L = { ...o, style: o.toastStyle, key: r++, ...Object.fromEntries(Object.entries(g).filter(([U, j]) => j != null)), toastId: b, updateId: P, data: D, isIn: !1, className: uu(g.className || o.toastClassName), progressClassName: uu(g.progressClassName || o.progressClassName), autoClose: g.isLoading ? !1 : jg(g.autoClose, o.autoClose), closeToast(U) {
c.get(b).removalReason = U, m(b);
}, deleteToast() {
let U = c.get(b);
if (U != null) {
if (n(wf(U, "removed")), c.delete(b), a--, a < 0 && (a = 0), s.length > 0) {
v(s.shift());
return;
}
d();
}
} };
L.closeButton = o.closeButton, g.closeButton === !1 || lu(g.closeButton) ? L.closeButton = g.closeButton : g.closeButton === !0 && (L.closeButton = lu(o.closeButton) ? o.closeButton : !0);
let H = { content: w, props: L, staleId: E };
o.limit && o.limit > 0 && a > o.limit && C ? s.push(H) : vs(x) ? setTimeout(() => {
v(H);
}, x) : v(H);
}, setProps(w) {
o = w;
}, setToggle: (w, g) => {
let b = c.get(w);
b && (b.toggle = g);
}, isToastActive: (w) => {
var g;
return (g = c.get(w)) == null ? void 0 : g.isActive;
}, getSnapshot: () => i };
}
var Qe = /* @__PURE__ */ new Map(), Ja = [], du = /* @__PURE__ */ new Set(), Xg = (e) => du.forEach((t) => t(e)), xy = () => Qe.size > 0;
function Zg() {
Ja.forEach((e) => Ty(e.content, e.options)), Ja = [];
}
var Jg = (e, { containerId: t }) => {
var n;
return (n = Qe.get(t || 1)) == null ? void 0 : n.toasts.get(e);
};
function Ey(e, t) {
var n;
if (t) return !!((n = Qe.get(t)) != null && n.isToastActive(e));
let r = !1;
return Qe.forEach((a) => {
a.isToastActive(e) && (r = !0);
}), r;
}
function e1(e) {
if (!xy()) {
Ja = Ja.filter((t) => e != null && t.options.toastId !== e);
return;
}
if (e == null || Hg(e)) Qe.forEach((t) => {
t.removeToast(e);
});
else if (e && ("containerId" in e || "id" in e)) {
let t = Qe.get(e.containerId);
t ? t.removeToast(e.id) : Qe.forEach((n) => {
n.removeToast(e.id);
});
}
}
var t1 = (e = {}) => {
Qe.forEach((t) => {
t.props.limit && (!e.containerId || t.id === e.containerId) && t.clearQueue();
});
};
function Ty(e, t) {
lu(e) && (xy() || Ja.push({ content: e, options: t }), Qe.forEach((n) => {
n.buildToast(e, t);
}));
}
function n1(e) {
var t;
(t = Qe.get(e.containerId || 1)) == null || t.setToggle(e.id, e.fn);
}
function Py(e, t) {
Qe.forEach((n) => {
(t == null || !(t != null && t.containerId) || (t == null ? void 0 : t.containerId) === n.id) && n.toggle(e, t == null ? void 0 : t.id);
});
}
function r1(e) {
let t = e.containerId || 1;
return { subscribe(n) {
let r = Qg(t, e, Xg);
Qe.set(t, r);
let a = r.observe(n);
return Zg(), () => {
a(), Qe.delete(t);
};
}, setProps(n) {
var r;
(r = Qe.get(t)) == null || r.setProps(n);
}, getSnapshot() {
var n;
return (n = Qe.get(t)) == null ? void 0 : n.getSnapshot();
} };
}
function a1(e) {
return du.add(e), () => {
du.delete(e);
};
}
function s1(e) {
return e && (Tr(e.toastId) || vs(e.toastId)) ? e.toastId : wy();
}
function ws(e, t) {
return Ty(e, t), t.toastId;
}
function Wi(e, t) {
return { ...t, type: t && t.type || e, toastId: s1(t) };
}
function qi(e) {
return (t, n) => ws(t, Wi(e, n));
}
function fe(e, t) {
return ws(e, Wi("default", t));
}
fe.loading = (e, t) => ws(e, Wi("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...t }));
function i1(e, { pending: t, error: n, success: r }, a) {
let s;
t && (s = Tr(t) ? fe.loading(t, a) : fe.loading(t.render, { ...a, ...t }));
let i = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, o = (u, l, d) => {
if (l == null) {
fe.dismiss(s);
return;
}
let p = { type: u, ...i, ...a, data: d }, f = Tr(l) ? { render: l } : l;
return s ? fe.update(s, { ...p, ...f }) : fe(f.render, { ...p, ...f }), d;
}, c = xn(e) ? e() : e;
return c.then((u) => o("success", r, u)).catch((u) => o("error", n, u)), c;
}
fe.promise = i1;
fe.success = qi("success");
fe.info = qi("info");
fe.error = qi("error");
fe.warning = qi("warning");
fe.warn = fe.warning;
fe.dark = (e, t) => ws(e, Wi("default", { theme: "dark", ...t }));
function o1(e) {
e1(e);
}
fe.dismiss = o1;
fe.clearWaitingQueue = t1;
fe.isActive = Ey;
fe.update = (e, t = {}) => {
let n = Jg(e, t);
if (n) {
let { props: r, content: a } = n, s = { delay: 100, ...r, ...t, toastId: t.toastId || e, updateId: wy() };
s.toastId !== e && (s.staleId = e);
let i = s.render || a;
delete s.render, ws(i, s);
}
};
fe.done = (e) => {
fe.update(e, { progress: 1 });
};
fe.onChange = a1;
fe.play = (e) => Py(!0, e);
fe.pause = (e) => Py(!1, e);
function c1(e) {
var t;
let { subscribe: n, getSnapshot: r, setProps: a } = wn(r1(e)).current;
a(e);
let s = (t = sg(n, r, r)) == null ? void 0 : t.slice();
function i(o) {
if (!s) return [];
let c = /* @__PURE__ */ new Map();
return e.newestOnTop && s.reverse(), s.forEach((u) => {
let { position: l } = u.props;
c.has(l) || c.set(l, []), c.get(l).push(u);
}), Array.from(c, (u) => o(u[0], u[1]));
}
return { getToastToRender: i, isToastActive: Ey, count: s == null ? void 0 : s.length };
}
function u1(e) {
let [t, n] = Re(!1), [r, a] = Re(!1), s = wn(null), i = wn({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, didMove: !1 }).current, { autoClose: o, pauseOnHover: c, closeToast: u, onClick: l, closeOnClick: d } = e;
n1({ id: e.toastId, containerId: e.containerId, fn: n }), Pt(() => {
if (e.pauseOnFocusLoss) return p(), () => {
f();
};
}, [e.pauseOnFocusLoss]);
function p() {
document.hasFocus() || v(), window.addEventListener("focus", h), window.addEventListener("blur", v);
}
function f() {
window.removeEventListener("focus", h), window.removeEventListener("blur", v);
}
function y(E) {
if (e.draggable === !0 || e.draggable === E.pointerType) {
w();
let x = s.current;
i.canCloseOnClick = !0, i.canDrag = !0, x.style.transition = "none", e.draggableDirection === "x" ? (i.start = E.clientX, i.removalDistance = x.offsetWidth * (e.draggablePercent / 100)) : (i.start = E.clientY, i.removalDistance = x.offsetHeight * (e.draggablePercent === 80 ? e.draggablePercent * 1.5 : e.draggablePercent) / 100);
}
}
function m(E) {
let { top: x, bottom: C, left: L, right: H } = s.current.getBoundingClientRect();
E.nativeEvent.type !== "touchend" && e.pauseOnHover && E.clientX >= L && E.clientX <= H && E.clientY >= x && E.clientY <= C ? v() : h();
}
function h() {
n(!0);
}
function v() {
n(!1);
}
function w() {
i.didMove = !1, document.addEventListener("pointermove", b), document.addEventListener("pointerup", P);
}
function g() {
document.removeEventListener("pointermove", b), document.removeEventListener("pointerup", P);
}
function b(E) {
let x = s.current;
if (i.canDrag && x) {
i.didMove = !0, t && v(), e.draggableDirection === "x" ? i.delta = E.clientX - i.start : i.delta = E.clientY - i.start, i.start !== E.clientX && (i.canCloseOnClick = !1);
let C = e.draggableDirection === "x" ? `${i.delta}px, var(--y)` : `0, calc(${i.delta}px + var(--y))`;
x.style.transform = `translate3d(${C},0)`, x.style.opacity = `${1 - Math.abs(i.delta / i.removalDistance)}`;
}
}
function P() {
g();
let E = s.current;
if (i.canDrag && i.didMove && E) {
if (i.canDrag = !1, Math.abs(i.delta) > i.removalDistance) {
a(!0), e.closeToast(!0), e.collapseAll();
return;
}
E.style.transition = "transform 0.2s, opacity 0.2s", E.style.removeProperty("transform"), E.style.removeProperty("opacity");
}
}
let D = { onPointerDown: y, onPointerUp: m };
return o && c && (D.onMouseEnter = v, e.stacked || (D.onMouseLeave = h)), d && (D.onClick = (E) => {
l && l(E), i.canCloseOnClick && u(!0);
}), { playToast: h, pauseToast: v, isRunning: t, preventExitTransition: r, toastRef: s, eventHandlers: D };
}
var l1 = typeof window < "u" ? ji : Pt, Ki = ({ theme: e, type: t, isLoading: n, ...r }) => I.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: e === "colored" ? "currentColor" : `var(--toastify-icon-color-${t})`, ...r });
function d1(e) {
return I.createElement(Ki, { ...e }, I.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
}
function f1(e) {
return I.createElement(Ki, { ...e }, I.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
}
function p1(e) {
return I.createElement(Ki, { ...e }, I.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
}
function y1(e) {
return I.createElement(Ki, { ...e }, I.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
}
function m1() {
return I.createElement("div", { className: "Toastify__spinner" });
}
var fu = { info: f1, warning: d1, success: p1, error: y1, spinner: m1 }, h1 = (e) => e in fu;
function b1({ theme: e, type: t, isLoading: n, icon: r }) {
let a = null, s = { theme: e, type: t };
return r === !1 || (xn(r) ? a = r({ ...s, isLoading: n }) : Vi(r) ? a = gs(r, s) : n ? a = fu.spinner() : h1(t) && (a = fu[t](s))), a;
}
var g1 = (e) => {
let { isRunning: t, preventExitTransition: n, toastRef: r, eventHandlers: a, playToast: s } = u1(e), { closeButton: i, children: o, autoClose: c, onClick: u, type: l, hideProgressBar: d, closeToast: p, transition: f, position: y, className: m, style: h, progressClassName: v, updateId: w, role: g, progress: b, rtl: P, toastId: D, deleteToast: E, isIn: x, isLoading: C, closeOnClick: L, theme: H, ariaLabel: U } = e, j = ge("Toastify__toast", `Toastify__toast-theme--${H}`, `Toastify__toast--${l}`, { "Toastify__toast--rtl": P }, { "Toastify__toast--close-on-click": L }), k = xn(m) ? m({ rtl: P, position: y, type: l, defaultClassName: j }) : ge(j, m), S = b1(e), R = !!b || !c, $ = { closeToast: p, type: l, theme: H }, M = null;
return i === !1 || (xn(i) ? M = i($) : Vi(i) ? M = gs(i, $) : M = Wg($)), I.createElement(f, { isIn: x, done: E, position: y, preventExitTransition: n, nodeRef: r, playToast: s }, I.createElement("div", { id: D, tabIndex: 0, onClick: u, "data-in": x, className: k, ...a, style: h, ref: r, ...x && { role: g, "aria-label": U } }, S != null && I.createElement("div", { className: ge("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !C }) }, S), vy(o, e, !t), M, !e.customProgressBar && I.createElement(qg, { ...w && !R ? { key: `p-${w}` } : {}, rtl: P, theme: H, delay: c, isRunning: t, isIn: x, closeToast: p, hide: d, type: l, className: v, controlledProgress: R, progress: b || 0 })));
}, v1 = (e, t = !1) => ({ enter: `Toastify--animate Toastify__${e}-enter`, exit: `Toastify--animate Toastify__${e}-exit`, appendPosition: t }), w1 = Yg(v1("bounce", !0)), x1 = { position: "top-right", transition: w1, autoClose: 5e3, closeButton: !0, pauseOnHover: !0, pauseOnFocusLoss: !0, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light", "aria-label": "Notifications Alt+T", hotKeys: (e) => e.altKey && e.code === "KeyT" };
function E1(e) {
let t = { ...x1, ...e }, n = e.stacked, [r, a] = Re(!0), s = wn(null), { getToastToRender: i, isToastActive: o, count: c } = c1(t), { className: u, style: l, rtl: d, containerId: p, hotKeys: f } = t;
function y(h) {
let v = ge("Toastify__toast-container", `Toastify__toast-container--${h}`, { "Toastify__toast-container--rtl": d });
return xn(u) ? u({ position: h, rtl: d, defaultClassName: v }) : ge(v, uu(u));
}
function m() {
n && (a(!0), fe.play());
}
return l1(() => {
var h;
if (n) {
let v = s.current.querySelectorAll('[data-in="true"]'), w = 12, g = (h = t.position) == null ? void 0 : h.includes("top"), b = 0, P = 0;
Array.from(v).reverse().forEach((D, E) => {
let x = D;
x.classList.add("Toastify__toast--stacked"), E > 0 && (x.dataset.collapsed = `${r}`), x.dataset.pos || (x.dataset.pos = g ? "top" : "bot");
let C = b * (r ? 0.2 : 1) + (r ? 0 : w * E);
x.style.setProperty("--y", `${g ? C : C * -1}px`), x.style.setProperty("--g", `${w}`), x.style.setProperty("--s", `${1 - (r ? P : 0)}`), b += x.offsetHeight, P += 0.025;
});
}
}, [r, c, n]), Pt(() => {
function h(v) {
var w;
let g = s.current;
f(v) && ((w = g.querySelector('[tabIndex="0"]')) == null || w.focus(), a(!1), fe.pause()), v.key === "Escape" && (document.activeElement === g || g != null && g.contains(document.activeElement)) && (a(!0), fe.play());
}
return document.addEventListener("keydown", h), () => {
document.removeEventListener("keydown", h);
};
}, [f]), I.createElement("section", { ref: s, className: "Toastify", id: p, onMouseEnter: () => {
n && (a(!1), fe.pause());
}, onMouseLeave: m, "aria-live": "polite", "aria-atomic": "false", "aria-relevant": "additions text", "aria-label": t["aria-label"] }, i((h, v) => {
let w = v.length ? { ...l } : { ...l, pointerEvents: "none" };
return I.createElement("div", { tabIndex: -1, className: y(h), "data-stacked": n, style: w, key: `c-${h}` }, v.map(({ content: g, props: b }) => I.createElement(g1, { ...b, stacked: n, collapseAll: m, isIn: o(b.toastId, b.containerId), key: `t-${b.key}` }, g)));
}));
}
function St(e) {
return {
formatters: void 0,
fees: void 0,
serializers: void 0,
...e
};
}
const Dy = "2.37.8";
let _a = {
getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: n }) => t ? `${e ?? "https://viem.sh"}${t}${n ? `#${n}` : ""}` : void 0,
version: `viem@${Dy}`
}, _ = class pu extends Error {
constructor(t, n = {}) {
var o;
const r = (() => {
var c;
return n.cause instanceof pu ? n.cause.details : (c = n.cause) != null && c.message ? n.cause.message : n.details;
})(), a = n.cause instanceof pu && n.cause.docsPath || n.docsPath, s = (o = _a.getDocsUrl) == null ? void 0 : o.call(_a, { ...n, docsPath: a }), i = [
t || "An error occurred.",
"",
...n.metaMessages ? [...n.metaMessages, ""] : [],
...s ? [`Docs: ${s}`] : [],
...r ? [`Details: ${r}`] : [],
..._a.version ? [`Version: ${_a.version}`] : []
].join(`
`);
super(i, n.cause ? { cause: n.cause } : void 0), Object.defineProperty(this, "details", {
enumerable: !0,
configurable: !0,
writable: !0,
value: void 0
}), Object.defineProperty(this, "docsPath", {
enumerable: !0,
configurable: !0,
writable: !0,
value: void 0
}), Object.defineProperty(this, "metaMessages", {
enumerable: !0,
configurable: !0,
writable: !0,
value: void 0
}), Object.defineProperty(this, "shortMessage", {
enumerable: !0,
configurable: !0,
writable: !0,
value: void 0
}), Object.defineProperty(this, "version", {
enumerable: !0,
configurable: !0,
writable: !0,
value: void 0
}), Object.defineProperty(this, "name", {
enumerable: !0,
configurable: !0,
writable: !0,
value: "BaseError"
}), this.details = r, this.docsPath = a, this.metaMessages = n.metaMessages, this.name = n.name ?? this.name, this.shortMessage = t, this.version = Dy;
}
walk(t) {
return Iy(this, t);
}
};
function Iy(e, t) {
return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? Iy(e.cause, t) : t ? null : e;
}
let Cy = class extends _ {
constructor({ max: t, min: n, signed: r, size: a, value: s }) {
super(`Number "${s}" is not in safe ${a ? `${a * 8}-bit ${r ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${n} to ${t})` : `(above ${n})`}`, { name: "IntegerOutOfRangeError" });
}
}, T1 = class extends _ {
constructor(t) {
super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
name: "InvalidBytesBooleanError"
});
}
}, P1 = class extends _ {
constructor({ givenSize: t, maxSize: n }) {
super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
}
};
function Kn(e, { strict: t = !0 } = {}) {
return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
}
function Pe(e) {
return Kn(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
}
function Pr(e, { dir: t = "left" } = {}) {
let n = typeof e == "string" ? e.replace("0x", "") : e, r = 0;
for (let a = 0; a < n.length - 1 && n[t === "left" ? a : n.length - a - 1].toString() === "0"; a++)
r++;
return n = t === "left" ? n.slice(r) : n.slice(0, n.length - r), typeof e == "string" ? (n.length === 1 && t === "right" && (n = `${n}0`), `0x${n.length % 2 === 1 ? `0${n}` : n}`) : n;
}
let Sy = class extends _ {
constructor({ offset: t, position: n, size: r }) {
super(`Slice ${n === "start" ? "starting" : "ending"} at offset "${t}" is out-of-bounds (size: ${r}).`, { name: "SliceOffsetOutOfBoundsError" });
}
}, Ay = class extends _ {
constructor({ size: t, targetSize: n, type: r }) {
super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}