@use-glyph/sdk-react 1.1.7 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { jsxs as q, jsx as l, Fragment as Re } from "react/jsx-runtime";
2
2
  import * as O from "react";
3
- import R, { createContext as ga, useContext as n1, useState as ee, useEffect as fe, memo as bt, forwardRef as yt, createElement as Io, useLayoutEffect as Is, useMemo as nt, useCallback as ge, useRef as Kn } from "react";
3
+ import R, { createContext as ga, useContext as n1, useState as ee, useEffect as fe, memo as bt, forwardRef as yt, createElement as Io, useLayoutEffect as Is, useMemo as nt, useCallback as xe, useRef as Kn } from "react";
4
4
  import { parseUnits as P6, isAddress as bi, checksumAddress as ho, createPublicClient as gn, http as C1, zeroAddress as wr, erc20Abi as mo, encodeFunctionData as K6, parseEther as k6, formatUnits as vo, ProviderRpcError as bo, getAddress as yi, SwitchChainError as j6, fromHex as Y6, isHex as G6, hexToNumber as J6, webSocket as D6, fallback as M6 } from "viem";
5
- import { injected as E6, useChainId as Lt, useSwitchChain as Q6, useChains as B6, useAccount as qa, deepEqual as I6, useDisconnect as As, useSignMessage as A6, useSendTransaction as _6, useAccountEffect as $6, useConnect as e0, createConfig as t0, WagmiProvider as r0, useConfig as n0, useReconnect as o0 } from "wagmi";
5
+ import { injected as E6, useChainId as Nt, useSwitchChain as Q6, useChains as B6, useAccount as qa, deepEqual as I6, useDisconnect as As, useSignMessage as A6, useSendTransaction as _6, useAccountEffect as $6, useConnect as e0, createConfig as t0, WagmiProvider as r0, useConfig as n0, useReconnect as o0 } from "wagmi";
6
6
  import * as _s from "react-dom";
7
7
  import $s from "react-dom";
8
8
  import { useQuery as a0, QueryClientProvider as e2, QueryClient as t2 } from "@tanstack/react-query";
@@ -4910,7 +4910,7 @@ const Ac = ({ className: e, overrideUrl: t, overrideAlt: r }) => {
4910
4910
  }
4911
4911
  }
4912
4912
  ) });
4913
- }, qt = bt(Ac), Pi = ({
4913
+ }, Lt = bt(Ac), Pi = ({
4914
4914
  showAvatar: e = !0,
4915
4915
  showBalance: t = !0,
4916
4916
  showUsername: r = !0
@@ -4938,7 +4938,7 @@ const Ac = ({ className: e, overrideUrl: t, overrideAlt: r }) => {
4938
4938
  i?.symbol || ""
4939
4939
  ] })
4940
4940
  ] }),
4941
- e && /* @__PURE__ */ l("div", { className: "gw-flex-shrink-0", children: /* @__PURE__ */ l(qt, { className: "gw-size-9" }) }),
4941
+ e && /* @__PURE__ */ l("div", { className: "gw-flex-shrink-0", children: /* @__PURE__ */ l(Lt, { className: "gw-size-9" }) }),
4942
4942
  r && /* @__PURE__ */ l("div", { className: "gw-px-2", children: n?.name || "" }),
4943
4943
  !t && !e && !r && /* @__PURE__ */ l(P1, { className: "gw-size-7" })
4944
4944
  ]
@@ -7054,9 +7054,9 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7054
7054
  document.body.style.pointerEvents = "auto";
7055
7055
  }), ae || (document.body.style.pointerEvents = "auto");
7056
7056
  }
7057
- }), [k, j] = R.useState(!1), [J, B] = R.useState(!1), [Q, A] = R.useState(!1), _ = R.useRef(null), I = R.useRef(null), M = R.useRef(null), $ = R.useRef(null), ne = R.useRef(null), re = R.useRef(!1), le = R.useRef(null), pe = R.useRef(0), Xe = R.useRef(!1), Oe = R.useRef(!T), qe = R.useRef(0), oe = R.useRef(null), l1 = R.useRef(((W = oe.current) == null ? void 0 : W.getBoundingClientRect().height) || 0), Nt = R.useRef(((F = oe.current) == null ? void 0 : F.getBoundingClientRect().width) || 0), rt = R.useRef(0), Pt = R.useCallback((ae) => {
7057
+ }), [k, j] = R.useState(!1), [J, B] = R.useState(!1), [Q, A] = R.useState(!1), _ = R.useRef(null), I = R.useRef(null), M = R.useRef(null), $ = R.useRef(null), ne = R.useRef(null), re = R.useRef(!1), le = R.useRef(null), pe = R.useRef(0), Xe = R.useRef(!1), Oe = R.useRef(!T), qe = R.useRef(0), oe = R.useRef(null), l1 = R.useRef(((W = oe.current) == null ? void 0 : W.getBoundingClientRect().height) || 0), Xt = R.useRef(((F = oe.current) == null ? void 0 : F.getBoundingClientRect().width) || 0), rt = R.useRef(0), Pt = R.useCallback((ae) => {
7058
7058
  a && ae === Be.length - 1 && (I.current = /* @__PURE__ */ new Date());
7059
- }, []), { activeSnapPoint: _e, activeSnapPointIndex: at, setActiveSnapPoint: Xt, onRelease: xe, snapPointsOffset: Be, onDrag: te, shouldFade: ce, getPercentageDragged: Ee } = f8({
7059
+ }, []), { activeSnapPoint: _e, activeSnapPointIndex: at, setActiveSnapPoint: xt, onRelease: we, snapPointsOffset: Be, onDrag: te, shouldFade: ce, getPercentageDragged: Ee } = f8({
7060
7060
  snapPoints: a,
7061
7061
  activeSnapPointProp: v,
7062
7062
  setActiveSnapPointProp: y,
@@ -7084,7 +7084,7 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7084
7084
  }
7085
7085
  function h(ae) {
7086
7086
  var Ne, Le;
7087
- !f && !a || oe.current && !oe.current.contains(ae.target) || (l1.current = ((Ne = oe.current) == null ? void 0 : Ne.getBoundingClientRect().height) || 0, Nt.current = ((Le = oe.current) == null ? void 0 : Le.getBoundingClientRect().width) || 0, B(!0), M.current = /* @__PURE__ */ new Date(), q3() && window.addEventListener("touchend", () => re.current = !1, {
7087
+ !f && !a || oe.current && !oe.current.contains(ae.target) || (l1.current = ((Ne = oe.current) == null ? void 0 : Ne.getBoundingClientRect().height) || 0, Xt.current = ((Le = oe.current) == null ? void 0 : Le.getBoundingClientRect().width) || 0, B(!0), M.current = /* @__PURE__ */ new Date(), q3() && window.addEventListener("touchend", () => re.current = !1, {
7088
7088
  once: !0
7089
7089
  }), ae.target.setPointerCapture(ae.pointerId), pe.current = Qe(V) ? ae.pageY : ae.pageX);
7090
7090
  }
@@ -7119,10 +7119,10 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7119
7119
  if (oe.current && J) {
7120
7120
  const Ne = V === "bottom" || V === "right" ? 1 : -1, Le = (pe.current - (Qe(V) ? ae.pageY : ae.pageX)) * Ne, me = Le > 0, Ze = a && !f && !me;
7121
7121
  if (Ze && at === 0) return;
7122
- const ie = Math.abs(Le), be = document.querySelector("[data-vaul-drawer-wrapper]"), Ue = V === "bottom" || V === "top" ? l1.current : Nt.current;
7122
+ const ie = Math.abs(Le), be = document.querySelector("[data-vaul-drawer-wrapper]"), Ue = V === "bottom" || V === "top" ? l1.current : Xt.current;
7123
7123
  let Se = ie / Ue;
7124
- const xt = Ee(ie, me);
7125
- if (xt !== null && (Se = xt), Ze && Se >= 1 || !re.current && !g(ae.target, me)) return;
7124
+ const wt = Ee(ie, me);
7125
+ if (wt !== null && (Se = wt), Ze && Se >= 1 || !re.current && !g(ae.target, me)) return;
7126
7126
  if (oe.current.classList.add(Co), re.current = !0, Ie(oe.current, {
7127
7127
  transition: "none"
7128
7128
  }), Ie(_.current, {
@@ -7171,7 +7171,7 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7171
7171
  let be = ie - Ze;
7172
7172
  const Ue = oe.current.getBoundingClientRect().height || 0, Se = Ue > ie * 0.8;
7173
7173
  rt.current || (rt.current = Ue);
7174
- const xt = oe.current.getBoundingClientRect().top;
7174
+ const wt = oe.current.getBoundingClientRect().top;
7175
7175
  if (Math.abs(qe.current - be) > 60 && (Xe.current = !Xe.current), a && a.length > 0 && Be && at) {
7176
7176
  const Te = Be[at] || 0;
7177
7177
  be += Te;
@@ -7179,7 +7179,7 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7179
7179
  if (qe.current = be, Ue > Ze || Xe.current) {
7180
7180
  const Te = oe.current.getBoundingClientRect().height;
7181
7181
  let Ke = Te;
7182
- Te > Ze && (Ke = Ze - (Se ? xt : oa)), b ? oe.current.style.height = `${Te - Math.max(be, 0)}px` : oe.current.style.height = `${Math.max(Ke, Ze - xt)}px`;
7182
+ Te > Ze && (Ke = Ze - (Se ? wt : oa)), b ? oe.current.style.height = `${Te - Math.max(be, 0)}px` : oe.current.style.height = `${Math.max(Ke, Ze - wt)}px`;
7183
7183
  } else Q9() || (oe.current.style.height = `${rt.current}px`);
7184
7184
  a && a.length > 0 && !Xe.current ? oe.current.style.bottom = "0px" : oe.current.style.bottom = `${Math.max(be, 0)}px`;
7185
7185
  }
@@ -7195,7 +7195,7 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7195
7195
  ]);
7196
7196
  function P(ae) {
7197
7197
  ue(), x?.(), ae || H(!1), setTimeout(() => {
7198
- a && Xt(a[0]);
7198
+ a && xt(a[0]);
7199
7199
  }, je.DURATION * 1e3);
7200
7200
  }
7201
7201
  function D() {
@@ -7234,7 +7234,7 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7234
7234
  if (Ze > 0.05 && (A(!0), setTimeout(() => {
7235
7235
  A(!1);
7236
7236
  }, 200)), a) {
7237
- xe({
7237
+ we({
7238
7238
  draggedDistance: me * (V === "bottom" || V === "right" ? 1 : -1),
7239
7239
  closeDrawer: P,
7240
7240
  velocity: Ze,
@@ -7253,8 +7253,8 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7253
7253
  var ie;
7254
7254
  const be = Math.min((ie = oe.current.getBoundingClientRect().height) != null ? ie : 0, window.innerHeight);
7255
7255
  var Ue;
7256
- const Se = Math.min((Ue = oe.current.getBoundingClientRect().width) != null ? Ue : 0, window.innerWidth), xt = V === "left" || V === "right";
7257
- if (Math.abs(Ne) >= (xt ? Se : be) * c) {
7256
+ const Se = Math.min((Ue = oe.current.getBoundingClientRect().width) != null ? Ue : 0, window.innerWidth), wt = V === "left" || V === "right";
7257
+ if (Math.abs(Ne) >= (wt ? Se : be) * c) {
7258
7258
  P(), o?.(ae, !1);
7259
7259
  return;
7260
7260
  }
@@ -7267,7 +7267,7 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7267
7267
  }), [
7268
7268
  C
7269
7269
  ]);
7270
- function we(ae) {
7270
+ function ge(ae) {
7271
7271
  const Ne = ae ? (window.innerWidth - V1) / window.innerWidth : 1, Le = ae ? -V1 : 0;
7272
7272
  le.current && window.clearTimeout(le.current), Ie(oe.current, {
7273
7273
  transition: `transform ${je.DURATION}s cubic-bezier(${je.EASE.join(",")})`,
@@ -7311,7 +7311,7 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7311
7311
  value: {
7312
7312
  activeSnapPoint: _e,
7313
7313
  snapPoints: a,
7314
- setActiveSnapPoint: Xt,
7314
+ setActiveSnapPoint: xt,
7315
7315
  drawerRef: oe,
7316
7316
  overlayRef: _,
7317
7317
  onOpenChange: t,
@@ -7326,7 +7326,7 @@ function v8({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7326
7326
  shouldFade: ce,
7327
7327
  closeDrawer: P,
7328
7328
  onNestedDrag: Fe,
7329
- onNestedOpenChange: we,
7329
+ onNestedOpenChange: ge,
7330
7330
  onNestedRelease: ye,
7331
7331
  keyboardIsOpen: Xe,
7332
7332
  modal: X,
@@ -9622,7 +9622,7 @@ function Cd(e) {
9622
9622
  }
9623
9623
  const zd = (e) => {
9624
9624
  var t, r, n, o, a, i, s, c, u;
9625
- const { invert: f, toast: d, unstyled: m, interacting: v, setHeights: y, visibleToasts: b, heights: X, index: x, toasts: L, expanded: w, removeToast: V, defaultRichColors: T, closeButton: U, style: z, cancelButtonStyle: K, actionButtonStyle: Z, className: E = "", descriptionClassName: G = "", duration: Y, position: W, gap: F, expandByDefault: C, classNames: H, icons: k, closeButtonAriaLabel: j = "Close toast" } = e, [J, B] = R.useState(null), [Q, A] = R.useState(null), [_, I] = R.useState(!1), [M, $] = R.useState(!1), [ne, re] = R.useState(!1), [le, pe] = R.useState(!1), [Xe, Oe] = R.useState(!1), [qe, oe] = R.useState(0), [l1, Nt] = R.useState(0), rt = R.useRef(d.duration || Y || vs), Pt = R.useRef(null), _e = R.useRef(null), at = x === 0, Xt = x + 1 <= b, xe = d.type, Be = d.dismissible !== !1, te = d.className || "", ce = d.descriptionClassName || "", Ee = R.useMemo(() => X.findIndex((ie) => ie.toastId === d.id) || 0, [
9625
+ const { invert: f, toast: d, unstyled: m, interacting: v, setHeights: y, visibleToasts: b, heights: X, index: x, toasts: L, expanded: w, removeToast: V, defaultRichColors: T, closeButton: U, style: z, cancelButtonStyle: K, actionButtonStyle: Z, className: E = "", descriptionClassName: G = "", duration: Y, position: W, gap: F, expandByDefault: C, classNames: H, icons: k, closeButtonAriaLabel: j = "Close toast" } = e, [J, B] = R.useState(null), [Q, A] = R.useState(null), [_, I] = R.useState(!1), [M, $] = R.useState(!1), [ne, re] = R.useState(!1), [le, pe] = R.useState(!1), [Xe, Oe] = R.useState(!1), [qe, oe] = R.useState(0), [l1, Xt] = R.useState(0), rt = R.useRef(d.duration || Y || vs), Pt = R.useRef(null), _e = R.useRef(null), at = x === 0, xt = x + 1 <= b, we = d.type, Be = d.dismissible !== !1, te = d.className || "", ce = d.descriptionClassName || "", Ee = R.useMemo(() => X.findIndex((ie) => ie.toastId === d.id) || 0, [
9626
9626
  X,
9627
9627
  d.id
9628
9628
  ]), N = R.useMemo(() => {
@@ -9637,7 +9637,7 @@ const zd = (e) => {
9637
9637
  ]), h = R.useRef(0), g = R.useRef(0), S = R.useRef(0), P = R.useRef(null), [D, ue] = W.split("-"), Ve = R.useMemo(() => X.reduce((ie, be, Ue) => Ue >= Ee ? ie : ie + be.height, 0), [
9638
9638
  X,
9639
9639
  Ee
9640
- ]), we = Nd(), Fe = d.invert || f, ye = xe === "loading";
9640
+ ]), ge = Nd(), Fe = d.invert || f, ye = we === "loading";
9641
9641
  g.current = R.useMemo(() => Ee * F + Ve, [
9642
9642
  Ee,
9643
9643
  Ve
@@ -9651,7 +9651,7 @@ const zd = (e) => {
9651
9651
  const ie = _e.current;
9652
9652
  if (ie) {
9653
9653
  const be = ie.getBoundingClientRect().height;
9654
- return Nt(be), y((Ue) => [
9654
+ return Xt(be), y((Ue) => [
9655
9655
  {
9656
9656
  toastId: d.id,
9657
9657
  height: be,
@@ -9668,7 +9668,7 @@ const zd = (e) => {
9668
9668
  const ie = _e.current, be = ie.style.height;
9669
9669
  ie.style.height = "auto";
9670
9670
  const Ue = ie.getBoundingClientRect().height;
9671
- ie.style.height = be, Nt(Ue), y((Se) => Se.find((Te) => Te.toastId === d.id) ? Se.map((Te) => Te.toastId === d.id ? {
9671
+ ie.style.height = be, Xt(Ue), y((Se) => Se.find((Te) => Te.toastId === d.id) ? Se.map((Te) => Te.toastId === d.id ? {
9672
9672
  ...Te,
9673
9673
  height: Ue
9674
9674
  } : Te) : [
@@ -9700,9 +9700,9 @@ const zd = (e) => {
9700
9700
  g
9701
9701
  ]);
9702
9702
  R.useEffect(() => {
9703
- if (d.promise && xe === "loading" || d.duration === 1 / 0 || d.type === "loading") return;
9703
+ if (d.promise && we === "loading" || d.duration === 1 / 0 || d.type === "loading") return;
9704
9704
  let ie;
9705
- return w || v || we ? (() => {
9705
+ return w || v || ge ? (() => {
9706
9706
  if (S.current < h.current) {
9707
9707
  const Se = (/* @__PURE__ */ new Date()).getTime() - h.current;
9708
9708
  rt.current = rt.current - Se;
@@ -9717,8 +9717,8 @@ const zd = (e) => {
9717
9717
  w,
9718
9718
  v,
9719
9719
  d,
9720
- xe,
9721
9720
  we,
9721
+ ge,
9722
9722
  ae
9723
9723
  ]), R.useEffect(() => {
9724
9724
  d.delete && (ae(), d.onDismiss == null || d.onDismiss.call(d, d));
@@ -9732,20 +9732,20 @@ const zd = (e) => {
9732
9732
  var be;
9733
9733
  return /* @__PURE__ */ R.createElement("div", {
9734
9734
  className: kt(H?.loader, d == null || (be = d.classNames) == null ? void 0 : be.loader, "sonner-loader"),
9735
- "data-visible": xe === "loading"
9735
+ "data-visible": we === "loading"
9736
9736
  }, k.loading);
9737
9737
  }
9738
9738
  return /* @__PURE__ */ R.createElement(pd, {
9739
9739
  className: kt(H?.loader, d == null || (ie = d.classNames) == null ? void 0 : ie.loader),
9740
- visible: xe === "loading"
9740
+ visible: we === "loading"
9741
9741
  });
9742
9742
  }
9743
- const Le = d.icon || k?.[xe] || dd(xe);
9743
+ const Le = d.icon || k?.[we] || dd(we);
9744
9744
  var me, Ze;
9745
9745
  return /* @__PURE__ */ R.createElement("li", {
9746
9746
  tabIndex: 0,
9747
9747
  ref: _e,
9748
- className: kt(E, te, H?.toast, d == null || (t = d.classNames) == null ? void 0 : t.toast, H?.default, H?.[xe], d == null || (r = d.classNames) == null ? void 0 : r[xe]),
9748
+ className: kt(E, te, H?.toast, d == null || (t = d.classNames) == null ? void 0 : t.toast, H?.default, H?.[we], d == null || (r = d.classNames) == null ? void 0 : r[we]),
9749
9749
  "data-sonner-toast": "",
9750
9750
  "data-rich-colors": (me = d.richColors) != null ? me : T,
9751
9751
  "data-styled": !(d.jsx || d.unstyled || m),
@@ -9753,14 +9753,14 @@ const zd = (e) => {
9753
9753
  "data-promise": !!d.promise,
9754
9754
  "data-swiped": Xe,
9755
9755
  "data-removed": M,
9756
- "data-visible": Xt,
9756
+ "data-visible": xt,
9757
9757
  "data-y-position": D,
9758
9758
  "data-x-position": ue,
9759
9759
  "data-index": x,
9760
9760
  "data-front": at,
9761
9761
  "data-swiping": ne,
9762
9762
  "data-dismissible": Be,
9763
- "data-type": xe,
9763
+ "data-type": we,
9764
9764
  "data-invert": Fe,
9765
9765
  "data-swipe-out": le,
9766
9766
  "data-swipe-direction": Q,
@@ -9788,9 +9788,9 @@ const zd = (e) => {
9788
9788
  var ie, be, Ue;
9789
9789
  if (le || !Be) return;
9790
9790
  P.current = null;
9791
- const Se = Number(((ie = _e.current) == null ? void 0 : ie.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), xt = Number(((be = _e.current) == null ? void 0 : be.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Te = (/* @__PURE__ */ new Date()).getTime() - ((Ue = Pt.current) == null ? void 0 : Ue.getTime()), Ke = J === "x" ? Se : xt, Et = Math.abs(Ke) / Te;
9791
+ const Se = Number(((ie = _e.current) == null ? void 0 : ie.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), wt = Number(((be = _e.current) == null ? void 0 : be.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Te = (/* @__PURE__ */ new Date()).getTime() - ((Ue = Pt.current) == null ? void 0 : Ue.getTime()), Ke = J === "x" ? Se : wt, Et = Math.abs(Ke) / Te;
9792
9792
  if (Math.abs(Ke) >= Ud || Et > 0.11) {
9793
- oe(g.current), d.onDismiss == null || d.onDismiss.call(d, d), A(J === "x" ? Se > 0 ? "right" : "left" : xt > 0 ? "down" : "up"), ae(), pe(!0);
9793
+ oe(g.current), d.onDismiss == null || d.onDismiss.call(d, d), A(J === "x" ? Se > 0 ? "right" : "left" : wt > 0 ? "down" : "up"), ae(), pe(!0);
9794
9794
  return;
9795
9795
  } else {
9796
9796
  var it, Vt;
@@ -9827,7 +9827,7 @@ const zd = (e) => {
9827
9827
  }
9828
9828
  (Math.abs(Vt.x) > 0 || Math.abs(Vt.y) > 0) && Oe(!0), (Ue = _e.current) == null || Ue.style.setProperty("--swipe-amount-x", `${Vt.x}px`), (Se = _e.current) == null || Se.style.setProperty("--swipe-amount-y", `${Vt.y}px`);
9829
9829
  }
9830
- }, N && !d.jsx && xe !== "loading" ? /* @__PURE__ */ R.createElement("button", {
9830
+ }, N && !d.jsx && we !== "loading" ? /* @__PURE__ */ R.createElement("button", {
9831
9831
  "aria-label": j,
9832
9832
  "data-disabled": ye,
9833
9833
  "data-close-button": !0,
@@ -9836,7 +9836,7 @@ const zd = (e) => {
9836
9836
  ae(), d.onDismiss == null || d.onDismiss.call(d, d);
9837
9837
  },
9838
9838
  className: kt(H?.closeButton, d == null || (n = d.classNames) == null ? void 0 : n.closeButton)
9839
- }, (Ze = k?.close) != null ? Ze : yd) : null, (xe || d.icon || d.promise) && d.icon !== null && (k?.[xe] !== null || d.icon) ? /* @__PURE__ */ R.createElement("div", {
9839
+ }, (Ze = k?.close) != null ? Ze : yd) : null, (we || d.icon || d.promise) && d.icon !== null && (k?.[we] !== null || d.icon) ? /* @__PURE__ */ R.createElement("div", {
9840
9840
  "data-icon": "",
9841
9841
  className: kt(H?.icon, d == null || (o = d.classNames) == null ? void 0 : o.icon)
9842
9842
  }, d.promise || d.type === "loading" && !d.icon ? d.icon || Ne() : null, d.type !== "loading" ? Le : null) : null, /* @__PURE__ */ R.createElement("div", {
@@ -10164,7 +10164,7 @@ function xr() {
10164
10164
  }
10165
10165
  let Zo = null;
10166
10166
  function jd() {
10167
- const { glyphApiFetch: e } = xr(), t = Lt(), r = ge(
10167
+ const { glyphApiFetch: e } = xr(), t = Nt(), r = xe(
10168
10168
  async (i) => {
10169
10169
  if (e && i?.id) {
10170
10170
  const s = await e(`/api/widget/onramp/quote/${i.id}/buy`, {
@@ -10176,7 +10176,7 @@ function jd() {
10176
10176
  return { url: null, ok: !1 };
10177
10177
  },
10178
10178
  [e]
10179
- ), n = ge(
10179
+ ), n = xe(
10180
10180
  async (i, s, c, u, f, d) => {
10181
10181
  if (d && Zo?.abort?.(), !e) return { quote: null, ok: !1, error: "Glyph API not ready" };
10182
10182
  Zo = new AbortController();
@@ -10189,7 +10189,7 @@ function jd() {
10189
10189
  return { quote: v.ok ? y : null, ok: v.ok, error: y.error };
10190
10190
  },
10191
10191
  [t, e]
10192
- ), o = ge(
10192
+ ), o = xe(
10193
10193
  async (i, s) => {
10194
10194
  if (!e) return { quote: null, ok: !1, error: "Glyph API not ready" };
10195
10195
  const c = await e(`/api/widget/onramp/quote/${i}`, {
@@ -10200,7 +10200,7 @@ function jd() {
10200
10200
  return { quote: c.ok ? u : null, ok: c.ok, error: u.error };
10201
10201
  },
10202
10202
  [e]
10203
- ), a = ge(
10203
+ ), a = xe(
10204
10204
  async (i) => {
10205
10205
  if (e && i?.id) {
10206
10206
  const s = await e(`/api/widget/onramp/quote/${i.id}/status`, {
@@ -10217,11 +10217,11 @@ function jd() {
10217
10217
  }
10218
10218
  const Yd = 720, Gd = 460, Jd = 10 * 1e3, Dd = "Region not supported";
10219
10219
  function Md() {
10220
- const { user: e, nativeSymbol: t, refreshBalances: r } = Pe(), n = Lt(), { getPaymentLink: o, createQuote: a, getQuoteStatus: i, refreshQuote: s } = jd(), [c, u] = ee(""), [f, d] = ee(""), [m, v] = ee(2), [y, b] = ee(999999), [X, x] = ee(null), [L, w] = ee("STARTED"), [V, T] = ee(!1), [U, z] = ee(!1), [K, Z] = ee(0), [E, G] = ee(null), [Y, W] = ee(null), [F, C] = ee(!1);
10220
+ const { user: e, nativeSymbol: t, refreshBalances: r } = Pe(), n = Nt(), { getPaymentLink: o, createQuote: a, getQuoteStatus: i, refreshQuote: s } = jd(), [c, u] = ee(""), [f, d] = ee(""), [m, v] = ee(2), [y, b] = ee(999999), [X, x] = ee(null), [L, w] = ee("STARTED"), [V, T] = ee(!1), [U, z] = ee(!1), [K, Z] = ee(0), [E, G] = ee(null), [Y, W] = ee(null), [F, C] = ee(!1);
10221
10221
  fe(() => {
10222
10222
  e && (d(e.currency ?? "USD"), v(e.minFundingAmount ?? 2), b(e.maxFundingAmount ?? 999999));
10223
10223
  }, [e]);
10224
- const H = ge(
10224
+ const H = xe(
10225
10225
  (I) => {
10226
10226
  const M = typeof I == "string" ? I : I(c);
10227
10227
  if (u(M), Number(M) < m) {
@@ -10260,7 +10260,7 @@ function Md() {
10260
10260
  T(!1);
10261
10261
  }),
10262
10262
  [f, e, a]
10263
- ), j = ge(
10263
+ ), j = xe(
10264
10264
  async (I, M) => {
10265
10265
  try {
10266
10266
  T(!0);
@@ -10298,7 +10298,7 @@ function Md() {
10298
10298
  return M($?.message || "Error initiating funding");
10299
10299
  }
10300
10300
  return I();
10301
- }, B = ge(
10301
+ }, B = xe(
10302
10302
  async (I) => {
10303
10303
  Z((M) => M + 1);
10304
10304
  try {
@@ -10424,7 +10424,7 @@ const _d = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10424
10424
  }
10425
10425
  );
10426
10426
  }, j1 = bt(_d), $d = ({ fullScreenHeader: e, onProfileClick: t }) => {
10427
- const { user: r, hasBalances: n } = Pe(), o = Lt(), { switchChain: a } = Q6(), i = B6(), [s, c] = ee([]), [u, f] = ee(!1), d = Kn(null), m = lr.get(o) || !1, v = Zi[o] || ws;
10427
+ const { user: r, hasBalances: n } = Pe(), o = Nt(), { switchChain: a } = Q6(), i = B6(), [s, c] = ee([]), [u, f] = ee(!1), d = Kn(null), m = lr.get(o) || !1, v = Zi[o] || ws;
10428
10428
  return fe(() => {
10429
10429
  c(i.slice().sort((y, b) => (y.id === o ? -1 : 1) - (b.id === o ? -1 : 1)));
10430
10430
  }, [i, o]), fe(() => {
@@ -10452,7 +10452,7 @@ const _d = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10452
10452
  ) : null })
10453
10453
  ] }) }) : /* @__PURE__ */ l(Re, { children: /* @__PURE__ */ q("div", { className: "gw-flex gw-items-center gw-space-x-4 gw-justify-between gw-w-full", children: [
10454
10454
  /* @__PURE__ */ q("div", { className: "gw-flex gw-items-center gw-space-x-4 gw-justify-between", children: [
10455
- /* @__PURE__ */ l("button", { onClick: t, disabled: !r?.hasProfile, children: /* @__PURE__ */ l(qt, { className: "gw-size-12" }) }),
10455
+ /* @__PURE__ */ l("button", { onClick: t, disabled: !r?.hasProfile, children: /* @__PURE__ */ l(Lt, { className: "gw-size-12" }) }),
10456
10456
  /* @__PURE__ */ q("div", { className: "gw-flex gw-flex-col", children: [
10457
10457
  /* @__PURE__ */ l("button", { onClick: t, disabled: !r?.hasProfile, children: /* @__PURE__ */ l("div", { className: "gw-mt-1.5 gw-typography-subtitle1 gw-text-left", children: r?.name }) }),
10458
10458
  /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
@@ -11206,7 +11206,7 @@ function zr(e) {
11206
11206
  ] });
11207
11207
  }
11208
11208
  function jr({ className: e }) {
11209
- const { nativeSymbol: t } = Pe(), r = Lt(), n = Kc[t] || zr, o = lr.get(r) || !1;
11209
+ const { nativeSymbol: t } = Pe(), r = Nt(), n = Kc[t] || zr, o = lr.get(r) || !1;
11210
11210
  return /* @__PURE__ */ l(n, { className: se("gw-size-6", e, o && b1) });
11211
11211
  }
11212
11212
  const T4 = ({ onBack: e, id: t, value: r }) => {
@@ -11245,7 +11245,7 @@ const T4 = ({ onBack: e, id: t, value: r }) => {
11245
11245
  /* @__PURE__ */ l(ft, { className: "gw-animate-pulse gw-delay-600 gw-w-4" })
11246
11246
  ] }),
11247
11247
  /* @__PURE__ */ q("div", { className: "gw-flex gw-items-center gw-space-x-3 gw-justify-between gw-relative gw-z-10", children: [
11248
- /* @__PURE__ */ l(qt, { className: "gw-size-8" }),
11248
+ /* @__PURE__ */ l(Lt, { className: "gw-size-8" }),
11249
11249
  /* @__PURE__ */ q("div", { className: "gw-flex gw-flex-col gw-typography-body2", children: [
11250
11250
  /* @__PURE__ */ l("div", { className: "", children: n?.name }),
11251
11251
  /* @__PURE__ */ l("div", { className: "gw-text-brand-gray-600", children: dt(n.evmWallet) })
@@ -11357,7 +11357,7 @@ successfully funded!` }),
11357
11357
  /* @__PURE__ */ l(ft, { className: "gw-w-3 -gw-rotate-90 gw-opacity-50" }),
11358
11358
  /* @__PURE__ */ l(ft, { className: "gw-w-3 -gw-ml-1 -gw-rotate-90" })
11359
11359
  ] }),
11360
- /* @__PURE__ */ l(qt, { className: "gw-size-6 gw-flex-shrink-0" }),
11360
+ /* @__PURE__ */ l(Lt, { className: "gw-size-6 gw-flex-shrink-0" }),
11361
11361
  /* @__PURE__ */ l("span", { className: "gw-break-all gw-typography-body2", children: dt(n.evmWallet) })
11362
11362
  ] }),
11363
11363
  /* @__PURE__ */ l(He, { variant: "tertiary", className: "gw-w-full", onClick: t, children: "View Transaction" })
@@ -11862,11 +11862,11 @@ const Y4 = (e) => /* @__PURE__ */ l("svg", { width: "23", height: "19", viewBox:
11862
11862
  ] });
11863
11863
  }, D4 = bt(J4);
11864
11864
  function M4(e = 10) {
11865
- const { glyphApiFetch: t } = xr(), r = Lt(), [n, o] = ee(0), [a, i] = ee(!0), [s, c] = ee(!1), [u, f] = ee([]), d = async (b = !1) => {
11865
+ const { glyphApiFetch: t } = xr(), r = Nt(), [n, o] = ee(0), [a, i] = ee(!0), [s, c] = ee(!1), [u, f] = ee([]), d = xe(async (b = !1) => {
11866
11866
  try {
11867
11867
  c(!0);
11868
11868
  const X = b ? 0 : n;
11869
- if (!t) return null;
11869
+ if (b && f([]), !t) return null;
11870
11870
  const x = await t(
11871
11871
  `/api/widget/activity?chainId=${r}&offset=${X}&size=${e}`
11872
11872
  );
@@ -11891,7 +11891,7 @@ function M4(e = 10) {
11891
11891
  } finally {
11892
11892
  c(!1);
11893
11893
  }
11894
- }, m = async () => !a || s ? !1 : (await d(), !0), v = async () => {
11894
+ }, [t, r, e, n, u]), m = async () => !a || s ? !1 : (await d(), !0), v = async () => {
11895
11895
  o(0), i(!0), await d(!0);
11896
11896
  }, y = (b, X) => {
11897
11897
  const x = {};
@@ -12385,13 +12385,13 @@ const Nf = hf, Xf = yt(({ className: e, ...t }, r) => /* @__PURE__ */ l(mf, { re
12385
12385
  }
12386
12386
  ));
12387
12387
  function gf({ expandFirst: e = !1 }) {
12388
- const { user: t, hasBalances: r } = Pe(), { transactionGroups: n, fetchTransactions: o, loadMore: a, hasMore: i, isLoading: s } = M4(), c = Kn(null), [u, f] = ee(""), d = n.reduce((v, y) => v + y.transactions.length, 0);
12388
+ const { user: t } = Pe(), r = Nt(), { transactionGroups: n, fetchTransactions: o, loadMore: a, hasMore: i, isLoading: s } = M4(), c = Kn(null), [u, f] = ee(""), d = n.reduce((v, y) => v + y.transactions.length, 0);
12389
12389
  fe(() => {
12390
12390
  o(!0);
12391
- }, []), fe(() => {
12391
+ }, [r]), fe(() => {
12392
12392
  e && f(u || n?.[0]?.transactions?.[0]?.id || "");
12393
12393
  }, [u, n, e]);
12394
- const m = ge(
12394
+ const m = xe(
12395
12395
  (v) => {
12396
12396
  const [y] = v;
12397
12397
  y.isIntersecting && i && !s && a();
@@ -12431,7 +12431,7 @@ function gf({ expandFirst: e = !1 }) {
12431
12431
  }
12432
12432
  )
12433
12433
  ] }),
12434
- /* @__PURE__ */ l("div", { className: "gw-grid gw-grid-cols-1 gw-mt-2 gw-overflow-auto gw-pr-4 gw-min-h-0", children: !r || s && d === 0 ? (
12434
+ /* @__PURE__ */ l("div", { className: "gw-grid gw-grid-cols-1 gw-mt-2 gw-overflow-auto gw-pr-4 gw-min-h-0", children: s && d === 0 ? (
12435
12435
  // initial loading state
12436
12436
  new Array(3).fill(null).map((v, y) => /* @__PURE__ */ q("div", { children: [
12437
12437
  /* @__PURE__ */ l(Q4, {}),
@@ -12652,7 +12652,7 @@ function jl() {
12652
12652
  return { balances: t, hasBalances: r, refreshBalances: n };
12653
12653
  }
12654
12654
  function Vf() {
12655
- const { balances: e, hasBalances: t } = jl(), r = Lt(), n = lr.get(r) || !1, o = e?.tokens || [], a = o.reduce((i, s) => i + +(s.amount || 0), 0);
12655
+ const { balances: e, hasBalances: t } = jl(), r = Nt(), n = lr.get(r) || !1, o = e?.tokens || [], a = o.reduce((i, s) => i + +(s.amount || 0), 0);
12656
12656
  return /* @__PURE__ */ q("div", { className: "gw-pl-4 gw-pt-4 gw-flex gw-flex-col gw-h-full", children: [
12657
12657
  /* @__PURE__ */ q("div", { className: "gw-flex gw-justify-between gw-items-center gw-w-full gw-pr-4", children: [
12658
12658
  /* @__PURE__ */ l("h6", { children: "Tokens" }),
@@ -12781,7 +12781,7 @@ const gs = ({ url: e, alt: t, title: r, className: n, ...o }) => {
12781
12781
  ) : /* @__PURE__ */ l(Ff, { style: { width: "100%", height: "100%" }, ...o }) });
12782
12782
  };
12783
12783
  function Uf() {
12784
- const { glyphUrl: e, balances: t, hasBalances: r } = Pe(), [n, o] = ee(void 0), a = t?.nfts || [], i = new URL("/nfts", e).toString();
12784
+ const { glyphUrl: e, balances: t, hasBalances: r } = Pe(), [n, o] = ee(""), a = t?.nfts || [], i = new URL("/nfts", e).toString();
12785
12785
  return /* @__PURE__ */ q("div", { className: "gw-pl-4 gw-pt-4 gw-flex gw-flex-col gw-h-full", children: [
12786
12786
  /* @__PURE__ */ l("div", { className: "gw-flex gw-mb-2 gw-flex-row gw-justify-between gw-items-center gw-w-full gw-flex-shrink-0", children: /* @__PURE__ */ l("h6", { children: "My NFTs" }) }),
12787
12787
  r && a?.length ? /* @__PURE__ */ q("div", { className: "gw-flex gw-flex-col gw-flex-1 gw-min-h-0", children: [
@@ -12957,7 +12957,7 @@ function Rf({ onBack: e }) {
12957
12957
  )
12958
12958
  ] }),
12959
12959
  /* @__PURE__ */ q("div", { className: "gw-relative gw-z-10 gw-flex gw-flex-col gw-items-center gw-justify-center -gw-translate-y-1/2 gw-top-4 gw-typography-h6-nr", children: [
12960
- /* @__PURE__ */ l(qt, { className: "gw-size-28 gw-border-popover gw-border-4" }),
12960
+ /* @__PURE__ */ l(Lt, { className: "gw-size-28 gw-border-popover gw-border-4" }),
12961
12961
  /* @__PURE__ */ l("div", { className: "gw-mt-4 gw-font-bold", children: t?.name })
12962
12962
  ] }),
12963
12963
  /* @__PURE__ */ l("div", { className: "gw-p-4 gw-flex-1 gw-flex gw-flex-col gw-justify-end gw-items-center gw-w-full", children: /* @__PURE__ */ q("div", { className: "gw-flex gw-flex-col gw-space-y-3 gw-w-full", children: [
@@ -14030,7 +14030,7 @@ const Qf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { cl
14030
14030
  /* @__PURE__ */ q("div", { children: [
14031
14031
  /* @__PURE__ */ l("div", { className: "gw-typography-body2 gw-text-brand-gray-500", children: "From" }),
14032
14032
  /* @__PURE__ */ l("div", { className: "gw-rounded-full gw-shadow-buttonMd gw-px-2.5 gw-py-2 gw-mt-3 gw-flex gw-items-center gw-space-x-4 gw-justify-between gw-w-full", children: /* @__PURE__ */ q("div", { className: "gw-flex gw-items-center gw-space-x-4 gw-justify-between", children: [
14033
- /* @__PURE__ */ l(qt, { className: "gw-size-11" }),
14033
+ /* @__PURE__ */ l(Lt, { className: "gw-size-11" }),
14034
14034
  /* @__PURE__ */ q("div", { className: "gw-flex gw-flex-col", children: [
14035
14035
  /* @__PURE__ */ l("div", { className: "gw-mt-1.5 gw-typography-subtitle1 gw-text-left", children: i?.name }),
14036
14036
  /* @__PURE__ */ l("div", { className: "gw-typography-body2 gw-text-brand-gray-500", children: dt(i?.evmWallet || "") })
@@ -14133,7 +14133,7 @@ Please try again.` }),
14133
14133
  tokenSymbol: a,
14134
14134
  TokenIcon: i
14135
14135
  }) => {
14136
- const { user: s } = Pe(), c = Lt(), u = lr.get(c) || !1;
14136
+ const { user: s } = Pe(), c = Nt(), u = lr.get(c) || !1;
14137
14137
  return /* @__PURE__ */ l(
14138
14138
  Wt,
14139
14139
  {
@@ -14155,7 +14155,7 @@ Please try again.` }),
14155
14155
  /* @__PURE__ */ l("div", { className: "gw-mt-4 gw-flex gw-justify-center gw-items-center", children: /* @__PURE__ */ q("div", { className: "gw-rounded-full gw-flex gw-flex-col gw-items-center gw-justify-center gw-p-10 gw-relative gw-size-64 gw-overflow-hidden gw-bg-white dark:gw-bg-black", children: [
14156
14156
  /* @__PURE__ */ l(Wl, { className: "gw-absolute gw-inset-0 gw-animate-spin gw-size-64 gw-z-0" }),
14157
14157
  /* @__PURE__ */ q("div", { className: "gw-flex gw-items-center gw-space-x-3 gw-justify-between gw-relative gw-z-10", children: [
14158
- /* @__PURE__ */ l(qt, { className: "gw-size-8" }),
14158
+ /* @__PURE__ */ l(Lt, { className: "gw-size-8" }),
14159
14159
  /* @__PURE__ */ q("div", { className: "gw-flex gw-flex-col gw-typography-body2", children: [
14160
14160
  /* @__PURE__ */ l("div", { className: "", children: "From" }),
14161
14161
  /* @__PURE__ */ l("div", { children: dt(s.evmWallet) })
@@ -14178,7 +14178,7 @@ Please try again.` }),
14178
14178
  ] }),
14179
14179
  /* @__PURE__ */ q("div", { className: "gw-flex gw-items-center gw-space-x-3 gw-justify-between gw-relative gw-z-10", children: [
14180
14180
  /* @__PURE__ */ l(
14181
- qt,
14181
+ Lt,
14182
14182
  {
14183
14183
  className: "gw-size-8",
14184
14184
  overrideAlt: "Recipient Wallet Address PFP",
@@ -14233,7 +14233,7 @@ Please try again.` }),
14233
14233
  sent to ${dt(r.receiver_address)}` }),
14234
14234
  /* @__PURE__ */ q("div", { className: "gw-my-10 gw-rounded-2xl gw-bg-brand-white dark:gw-bg-brand-black gw-drop-shadow-buttonLg gw-flex gw-p-4 gw-items-center gw-space-x-2 gw-w-full gw-justify-between", children: [
14235
14235
  /* @__PURE__ */ q("div", { className: "gw-flex gw-gap-2 gw-items-center", children: [
14236
- /* @__PURE__ */ l(qt, { className: "gw-size-6 gw-flex-shrink-0" }),
14236
+ /* @__PURE__ */ l(Lt, { className: "gw-size-6 gw-flex-shrink-0" }),
14237
14237
  /* @__PURE__ */ q("div", { className: "gw-flex gw-flex-col gw-typography-caption", children: [
14238
14238
  /* @__PURE__ */ l("span", { className: "gw-text-brand-gray-500", children: "From" }),
14239
14239
  /* @__PURE__ */ l("span", { className: "gw-break-all", children: o?.name || dt(o?.evmWallet || "") })
@@ -14245,7 +14245,7 @@ sent to ${dt(r.receiver_address)}` }),
14245
14245
  ] }),
14246
14246
  /* @__PURE__ */ q("div", { className: "gw-flex gw-gap-2 gw-items-center gw-min-w-24", children: [
14247
14247
  /* @__PURE__ */ l(
14248
- qt,
14248
+ Lt,
14249
14249
  {
14250
14250
  className: "gw-size-6 gw-flex-shrink-0",
14251
14251
  overrideAlt: "Recipient Wallet Address PFP",
@@ -14265,7 +14265,7 @@ sent to ${dt(r.receiver_address)}` }),
14265
14265
  );
14266
14266
  }, np = bt(rp), op = 6, ap = 10 * 1e3, ip = "Not enough balance";
14267
14267
  function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14268
- const { user: o, sendTransaction: a, refreshBalances: i, hasBalances: s, balances: c } = Pe(), { glyphApiFetch: u } = xr(), f = Lt(), { chain: d } = qa(), [m, v] = ee(""), [y, b] = ee(null), X = nt(() => gn({ chain: d, transport: C1() }), [d]), [x, L] = ee(st.ENTER_ADDRESS), [w, V] = ee(wr), T = nt(
14268
+ const { user: o, sendTransaction: a, refreshBalances: i, hasBalances: s, balances: c } = Pe(), { glyphApiFetch: u } = xr(), f = Nt(), { chain: d } = qa(), [m, v] = ee(""), [y, b] = ee(null), X = nt(() => gn({ chain: d, transport: C1() }), [d]), [x, L] = ee(st.ENTER_ADDRESS), [w, V] = ee(wr), T = nt(
14269
14269
  () => c?.tokens?.find((te) => te.address === wr),
14270
14270
  [c?.tokens]
14271
14271
  ), U = nt(
@@ -14278,7 +14278,7 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14278
14278
  };
14279
14279
  return document.addEventListener("mousedown", te), () => document.removeEventListener("mousedown", te);
14280
14280
  }, []);
14281
- const [Oe, qe] = ee(), [oe, l1] = ee(), [Nt, rt] = ee("PENDING"), Pt = G1("SendFundView"), _e = lr.get(f) || !1;
14281
+ const [Oe, qe] = ee(), [oe, l1] = ee(), [Xt, rt] = ee("PENDING"), Pt = G1("SendFundView"), _e = lr.get(f) || !1;
14282
14282
  fe(() => {
14283
14283
  if (!Number(U?.value || "0"))
14284
14284
  return H(!1), I("No tokens to send");
@@ -14362,7 +14362,7 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14362
14362
  }, [x]), fe(() => {
14363
14363
  if (!J) return A(0);
14364
14364
  }, [J]);
14365
- const at = ge(async () => {
14365
+ const at = xe(async () => {
14366
14366
  if (!u) return v1.error("Glyph API not ready");
14367
14367
  A((te) => te + 1);
14368
14368
  try {
@@ -14382,16 +14382,16 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14382
14382
  const te = setInterval(() => at(), Q ? ap : 0);
14383
14383
  return () => clearInterval(te);
14384
14384
  }, [J, Q, at]);
14385
- const Xt = nt(
14385
+ const xt = nt(
14386
14386
  () => ml(500, (te) => {
14387
14387
  F(null), E(Number(te));
14388
14388
  }),
14389
14389
  []
14390
14390
  );
14391
- fe(() => (x === st.END && Nt === "SUCCESS" && n(r1.SUCCESS), x === st.END && Nt === "FAILED" && n(r1.ERROR), () => {
14391
+ fe(() => (x === st.END && Xt === "SUCCESS" && n(r1.SUCCESS), x === st.END && Xt === "FAILED" && n(r1.ERROR), () => {
14392
14392
  n(void 0);
14393
- }), [n, Nt, x]);
14394
- const xe = Z > 0 && Z <= Number(U?.value || "0"), Be = U?.symbol && ea[U.symbol] || zr;
14393
+ }), [n, Xt, x]);
14394
+ const we = Z > 0 && Z <= Number(U?.value || "0"), Be = U?.symbol && ea[U.symbol] || zr;
14395
14395
  return /* @__PURE__ */ q(Re, { children: [
14396
14396
  x === st.ENTER_ADDRESS && /* @__PURE__ */ l(
14397
14397
  Af,
@@ -14427,7 +14427,7 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14427
14427
  children: [
14428
14428
  /* @__PURE__ */ q("div", { className: "gw-w-full", children: [
14429
14429
  /* @__PURE__ */ q("div", { className: "gw-flex gw-justify-between gw-items-center gw-w-full", children: [
14430
- /* @__PURE__ */ l("h6", { children: xe ? "Sending" : "Enter Amount" }),
14430
+ /* @__PURE__ */ l("h6", { children: we ? "Sending" : "Enter Amount" }),
14431
14431
  /* @__PURE__ */ q("div", { className: "gw-relative", ref: Xe, children: [
14432
14432
  /* @__PURE__ */ q(
14433
14433
  "button",
@@ -14528,7 +14528,7 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14528
14528
  $(!0);
14529
14529
  } else
14530
14530
  I(null), $(!1);
14531
- Xt(ce), K(ce), Y(!1);
14531
+ xt(ce), K(ce), Y(!1);
14532
14532
  },
14533
14533
  placeholder: "0",
14534
14534
  className: se(
@@ -14551,7 +14551,7 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14551
14551
  className: "gw-rounded-lg gw-py-1 gw-px-2 gw-h-auto gw-w-16",
14552
14552
  onClick: () => {
14553
14553
  const te = G ? "" : `${+(U?.value || 0) || ""}`;
14554
- K(te), Xt(te), Y((ce) => !ce);
14554
+ K(te), xt(te), Y((ce) => !ce);
14555
14555
  },
14556
14556
  children: /* @__PURE__ */ l("span", { className: "gw-typography-overline", children: G ? "Clear" : "Max" })
14557
14557
  }
@@ -14560,7 +14560,7 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14560
14560
  ] })
14561
14561
  }
14562
14562
  ),
14563
- xe ? /* @__PURE__ */ q("div", { className: "gw-typography-caption gw-mt-3 gw-w-full", children: [
14563
+ we ? /* @__PURE__ */ q("div", { className: "gw-typography-caption gw-mt-3 gw-w-full", children: [
14564
14564
  /* @__PURE__ */ q("div", { className: "gw-flex gw-justify-between gw-items-center gw-space-x-1", children: [
14565
14565
  /* @__PURE__ */ l("span", { children: "Transaction Time" }),
14566
14566
  C || !W ? /* @__PURE__ */ l($e, { className: "gw-w-20 gw-h-4" }) : /* @__PURE__ */ l("span", { className: "gw-text-brand-gray-500 gw-text-right", children: "<1 min" })
@@ -14580,7 +14580,7 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14580
14580
  footer: /* @__PURE__ */ q(Re, { children: [
14581
14581
  /* @__PURE__ */ q("div", { className: "gw-p-3 gw-rounded-2xl gw-bg-background gw-drop-shadow-buttonLg gw-flex gw-items-center gw-space-x-2 gw-w-full gw-justify-between", children: [
14582
14582
  /* @__PURE__ */ q("div", { className: "gw-flex gw-gap-2 gw-items-center", children: [
14583
- /* @__PURE__ */ l(qt, { className: "gw-size-6 gw-flex-shrink-0" }),
14583
+ /* @__PURE__ */ l(Lt, { className: "gw-size-6 gw-flex-shrink-0" }),
14584
14584
  /* @__PURE__ */ q("div", { className: "gw-flex gw-flex-col gw-typography-caption", children: [
14585
14585
  /* @__PURE__ */ l("span", { className: "gw-text-brand-gray-500", children: "From" }),
14586
14586
  /* @__PURE__ */ l("span", { className: "gw-break-all", children: o?.name || dt(o?.evmWallet || "") })
@@ -14592,7 +14592,7 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14592
14592
  ] }),
14593
14593
  /* @__PURE__ */ q("div", { className: "gw-flex gw-gap-2 gw-items-center gw-min-w-24", children: [
14594
14594
  /* @__PURE__ */ l(
14595
- qt,
14595
+ Lt,
14596
14596
  {
14597
14597
  className: "gw-size-6 gw-flex-shrink-0",
14598
14598
  overrideAlt: "Recipient Wallet Address PFP",
@@ -14693,7 +14693,7 @@ function sp({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14693
14693
  TokenIcon: Be
14694
14694
  }
14695
14695
  ),
14696
- x === st.END && (Nt === "SUCCESS" ? /* @__PURE__ */ l(
14696
+ x === st.END && (Xt === "SUCCESS" ? /* @__PURE__ */ l(
14697
14697
  np,
14698
14698
  {
14699
14699
  onEnd: () => i(!0).catch().finally(() => t()),
@@ -14852,7 +14852,7 @@ const Ls = bt(
14852
14852
  }, O1 = G1("GlyphData"), cp = ({ children: e }) => {
14853
14853
  const t = n1(Qr);
14854
14854
  if (!t) throw new Error("GlyphUserDataProvider must be used within GlyphProvider");
14855
- const { ready: r, authenticated: n } = t, { glyphApiFetch: o } = xr(), a = Lt(), i = Kn(a), [s, c] = ee(null), [u, f] = ee(!1), [d, m] = ee(0), [v, y] = ee(!1), {
14855
+ const { ready: r, authenticated: n } = t, { glyphApiFetch: o } = xr(), a = Nt(), i = Kn(a), [s, c] = ee(null), [u, f] = ee(!1), [d, m] = ee(0), [v, y] = ee(!1), {
14856
14856
  data: b,
14857
14857
  refetch: X,
14858
14858
  error: x
@@ -14886,7 +14886,7 @@ const Ls = bt(
14886
14886
  },
14887
14887
  retryDelay: (V) => Math.min(1e3 * 2 ** V, 3e4)
14888
14888
  // Exponential backoff
14889
- }), L = ge(
14889
+ }), L = xe(
14890
14890
  async (V = !1, T) => {
14891
14891
  if (!r || !n || !o || !b || u) return;
14892
14892
  const U = Date.now();
@@ -14914,7 +14914,7 @@ const Ls = bt(
14914
14914
  fe(() => {
14915
14915
  x && O1.error("Failed to load/refresh user data:", x);
14916
14916
  }, [x]);
14917
- const w = ge(
14917
+ const w = xe(
14918
14918
  async (V = !1) => {
14919
14919
  O1.debug(`Triggering user data refresh (force=${V})...`), await X();
14920
14920
  },
@@ -15030,7 +15030,7 @@ const Ls = bt(
15030
15030
  At.error("Error saving session token", F);
15031
15031
  }
15032
15032
  }, [w, b]);
15033
- const T = ge(
15033
+ const T = xe(
15034
15034
  async (F) => {
15035
15035
  try {
15036
15036
  return await fetch(
@@ -15041,7 +15041,7 @@ const Ls = bt(
15041
15041
  }
15042
15042
  },
15043
15043
  [t]
15044
- ), U = ge(
15044
+ ), U = xe(
15045
15045
  async (F, C, H) => {
15046
15046
  try {
15047
15047
  return await fetch(`${t || Nn}/api/widget/auth/verify/${F}`, {
@@ -15068,9 +15068,9 @@ const Ls = bt(
15068
15068
  });
15069
15069
  c(() => F);
15070
15070
  }, [b, u, t, w]);
15071
- const z = ge(async () => {
15071
+ const z = xe(async () => {
15072
15072
  await m();
15073
- }, [m]), K = ge(async () => {
15073
+ }, [m]), K = xe(async () => {
15074
15074
  if (At.log("authenticate"), !u) {
15075
15075
  At.error("no wallet connected.");
15076
15076
  return;
@@ -15092,16 +15092,16 @@ const Ls = bt(
15092
15092
  } finally {
15093
15093
  i(!1), r?.();
15094
15094
  }
15095
- }, [u, f, x, w, v, U]), Z = ge(async () => {
15095
+ }, [u, f, x, w, v, U]), Z = xe(async () => {
15096
15096
  V(null), X(null), i(!1), c(null), n?.();
15097
- }, []), E = ge(
15097
+ }, []), E = xe(
15098
15098
  async ({ message: F }) => {
15099
15099
  if (!u || !f)
15100
15100
  throw new Error("Wallet not connected");
15101
15101
  return v({ account: u, message: F });
15102
15102
  },
15103
15103
  [u, f, v]
15104
- ), G = ge(
15104
+ ), G = xe(
15105
15105
  async ({ transaction: F }) => {
15106
15106
  if (!u || !f) throw new Error("Wallet not connected");
15107
15107
  return y({ ...F, chainId: d || Mn.id });
@@ -15136,8 +15136,8 @@ const Ls = bt(
15136
15136
  children: e
15137
15137
  }
15138
15138
  );
15139
- }, wt = G1("PrivyStrategy"), fp = ({ children: e, glyphUrl: t, onLogin: r, onLogout: n, useStagingTenant: o }) => {
15140
- const [a, i] = ee(!0), [s, c] = ee(null), [u, f] = ee(null), [d, m] = ee(!1), v = Lt(), {
15139
+ }, gt = G1("PrivyStrategy"), fp = ({ children: e, glyphUrl: t, onLogin: r, onLogout: n, useStagingTenant: o }) => {
15140
+ const [a, i] = ee(!0), [s, c] = ee(null), [u, f] = ee(null), [d, m] = ee(!1), v = Nt(), {
15141
15141
  ready: y,
15142
15142
  authenticated: b,
15143
15143
  user: X,
@@ -15147,7 +15147,7 @@ const Ls = bt(
15147
15147
  signMessage: V,
15148
15148
  sendTransaction: T
15149
15149
  } = r2(), { signMessage: U, sendTransaction: z } = n2();
15150
- wt.debug(y, b, !!X);
15150
+ gt.debug(y, b, !!X);
15151
15151
  const { wallets: K } = i0();
15152
15152
  fe(() => {
15153
15153
  if (!y) {
@@ -15162,21 +15162,21 @@ const Ls = bt(
15162
15162
  const F = X.linkedAccounts?.find(
15163
15163
  (A) => A.type === "wallet" && A.chainType === "ethereum" && A.walletClientType === "privy"
15164
15164
  ), C = F && Dc(F.address);
15165
- C && wt.debug("Privy (main) EVM embedded wallet", F.address), wt.debug("finding cross-app accounts...");
15165
+ C && gt.debug("Privy (main) EVM embedded wallet", F.address), gt.debug("finding cross-app accounts...");
15166
15166
  const H = X.linkedAccounts?.filter?.((A) => A.type === "cross_app") || [], k = H.filter(
15167
15167
  (A) => A.providerApp?.id !== (o ? St : Ut)
15168
15168
  );
15169
- wt.debug("linked accounts - non-Glyph", { accounts: k });
15169
+ gt.debug("linked accounts - non-Glyph", { accounts: k });
15170
15170
  const j = k.map((A) => A.embeddedWallets[0].address);
15171
- j.length > 0 && (W = j[0], wt.log("using cross_app (non-Glyph) account"), j.length > 1 && wt.warn("too many cross_app accounts"));
15171
+ j.length > 0 && (W = j[0], gt.log("using cross_app (non-Glyph) account"), j.length > 1 && gt.warn("too many cross_app accounts"));
15172
15172
  const J = H.filter(
15173
15173
  (A) => A.providerApp?.id === (o ? St : Ut)
15174
15174
  );
15175
- wt.debug("linked accounts - Glyph", { accounts: J });
15175
+ gt.debug("linked accounts - Glyph", { accounts: J });
15176
15176
  const B = J.map((A) => A.embeddedWallets[0].address);
15177
- B.length > 0 && (W = B[0], wt.log("using cross_app (Glyph) account"), B.length > 1 && wt.warn("too many cross_app accounts")), W ? (m(!0), wt.log("using cross_app account", W)) : C && (W = F.address, wt.log("using Privy (main) EVM embedded wallet", W)), f(W ?? null), (async () => {
15177
+ B.length > 0 && (W = B[0], gt.log("using cross_app (Glyph) account"), B.length > 1 && gt.warn("too many cross_app accounts")), W ? (m(!0), gt.log("using cross_app account", W)) : C && (W = F.address, gt.log("using Privy (main) EVM embedded wallet", W)), f(W ?? null), (async () => {
15178
15178
  if (!W) {
15179
- wt.error("user has no wallet");
15179
+ gt.error("user has no wallet");
15180
15180
  return;
15181
15181
  }
15182
15182
  const A = Y2(
@@ -15198,17 +15198,17 @@ const Ls = bt(
15198
15198
  x,
15199
15199
  w
15200
15200
  ]);
15201
- const Z = ge(async () => {
15201
+ const Z = xe(async () => {
15202
15202
  await L(), r?.();
15203
- }, [r, L]), E = ge(async () => {
15203
+ }, [r, L]), E = xe(async () => {
15204
15204
  w(), n?.();
15205
- }, [n, w]), G = ge(
15205
+ }, [n, w]), G = xe(
15206
15206
  async ({ message: W }) => {
15207
15207
  if (!u) throw new Error("No wallet address found");
15208
15208
  return d ? U(W, { address: u }) : V({ message: W });
15209
15209
  },
15210
15210
  [u, d, U, V]
15211
- ), Y = ge(
15211
+ ), Y = xe(
15212
15212
  async ({ transaction: W }) => {
15213
15213
  if (!u) throw new Error("No wallet address found");
15214
15214
  const F = { ...W, chainId: v };
@@ -15255,8 +15255,8 @@ const Ls = bt(
15255
15255
  return /* @__PURE__ */ l(c, { glyphUrl: r?.trim?.(), ...o, children: /* @__PURE__ */ l(cp, { children: /* @__PURE__ */ l(up, { children: /* @__PURE__ */ l(q4, { children: e }) }) }) });
15256
15256
  };
15257
15257
  function im() {
15258
- const { user: e } = Pe(), t = Lt(), { glyphApiFetch: r } = xr(), [n, o] = ee(!1);
15259
- return { checkTokenGate: ge(async (i) => {
15258
+ const { user: e } = Pe(), t = Nt(), { glyphApiFetch: r } = xr(), [n, o] = ee(!1);
15259
+ return { checkTokenGate: xe(async (i) => {
15260
15260
  try {
15261
15261
  return e ? r ? (o(!0), await (await r("/api/widget/ownership_check", {
15262
15262
  method: "POST",
@@ -15272,8 +15272,8 @@ function im() {
15272
15272
  }, [t, e, r, o]), isTokenGateLoading: n };
15273
15273
  }
15274
15274
  function sm() {
15275
- const { user: e } = Pe(), t = Lt(), { glyphApiFetch: r } = xr(), [n, o] = ee(!1);
15276
- return { checkOwnership: ge(async (i) => {
15275
+ const { user: e } = Pe(), t = Nt(), { glyphApiFetch: r } = xr(), [n, o] = ee(!1);
15276
+ return { checkOwnership: xe(async (i) => {
15277
15277
  try {
15278
15278
  return e ? r ? (o(!0), await (await r("/api/widget/ownership_check", {
15279
15279
  method: "POST",
@@ -15298,7 +15298,7 @@ const lm = () => {
15298
15298
  }, hp = () => {
15299
15299
  const { connectAsync: e, connectors: t } = e0(), { disconnect: r } = As();
15300
15300
  return {
15301
- connect: ge(async () => {
15301
+ connect: xe(async () => {
15302
15302
  const o = t.find((a) => a.id === ht.id);
15303
15303
  if (!o)
15304
15304
  throw new Error("Glyph Wallet Connector not found");
@@ -15569,7 +15569,7 @@ function Ft(e, t) {
15569
15569
  const r = e % t;
15570
15570
  return r >= ut ? r : t + r;
15571
15571
  }
15572
- function gt(e, t, r) {
15572
+ function qt(e, t, r) {
15573
15573
  let n = e;
15574
15574
  for (; t-- > ut; )
15575
15575
  n *= n, n %= r;
@@ -16783,7 +16783,7 @@ const pi = {
16783
16783
  ]
16784
16784
  }, Ps = /* @__PURE__ */ BigInt(2);
16785
16785
  function Bp(e) {
16786
- const t = pi.p, r = BigInt(3), n = BigInt(6), o = BigInt(11), a = BigInt(22), i = BigInt(23), s = BigInt(44), c = BigInt(88), u = e * e * e % t, f = u * u * e % t, d = gt(f, r, t) * f % t, m = gt(d, r, t) * f % t, v = gt(m, Ps, t) * u % t, y = gt(v, o, t) * v % t, b = gt(y, a, t) * y % t, X = gt(b, s, t) * b % t, x = gt(X, c, t) * X % t, L = gt(x, s, t) * b % t, w = gt(L, r, t) * f % t, V = gt(w, i, t) * y % t, T = gt(V, n, t) * u % t, U = gt(T, Ps, t);
16786
+ const t = pi.p, r = BigInt(3), n = BigInt(6), o = BigInt(11), a = BigInt(22), i = BigInt(23), s = BigInt(44), c = BigInt(88), u = e * e * e % t, f = u * u * e % t, d = qt(f, r, t) * f % t, m = qt(d, r, t) * f % t, v = qt(m, Ps, t) * u % t, y = qt(v, o, t) * v % t, b = qt(y, a, t) * y % t, X = qt(b, s, t) * b % t, x = qt(X, c, t) * X % t, L = qt(x, s, t) * b % t, w = qt(L, r, t) * f % t, V = qt(w, i, t) * y % t, T = qt(V, n, t) * u % t, U = qt(T, Ps, t);
16787
16787
  if (!ba.eql(ba.sqr(U), e))
16788
16788
  throw new Error("Cannot find square root");
16789
16789
  return U;
@@ -17062,7 +17062,7 @@ function oh() {
17062
17062
  throw new TypeError(
17063
17063
  "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof N
17064
17064
  );
17065
- if (xe(N, ArrayBuffer) || N && xe(N.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (xe(N, SharedArrayBuffer) || N && xe(N.buffer, SharedArrayBuffer)))
17065
+ if (we(N, ArrayBuffer) || N && we(N.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (we(N, SharedArrayBuffer) || N && we(N.buffer, SharedArrayBuffer)))
17066
17066
  return b(N, p, h);
17067
17067
  if (typeof N == "number")
17068
17068
  throw new TypeError(
@@ -17117,7 +17117,7 @@ function oh() {
17117
17117
  return h;
17118
17118
  }
17119
17119
  function y(N) {
17120
- if (xe(N, Uint8Array)) {
17120
+ if (we(N, Uint8Array)) {
17121
17121
  const p = new Uint8Array(N);
17122
17122
  return b(p.buffer, p.byteOffset, p.byteLength);
17123
17123
  }
@@ -17152,7 +17152,7 @@ function oh() {
17152
17152
  s.isBuffer = function(p) {
17153
17153
  return p != null && p._isBuffer === !0 && p !== s.prototype;
17154
17154
  }, s.compare = function(p, h) {
17155
- if (xe(p, Uint8Array) && (p = s.from(p, p.offset, p.byteLength)), xe(h, Uint8Array) && (h = s.from(h, h.offset, h.byteLength)), !s.isBuffer(p) || !s.isBuffer(h))
17155
+ if (we(p, Uint8Array) && (p = s.from(p, p.offset, p.byteLength)), we(h, Uint8Array) && (h = s.from(h, h.offset, h.byteLength)), !s.isBuffer(p) || !s.isBuffer(h))
17156
17156
  throw new TypeError(
17157
17157
  'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
17158
17158
  );
@@ -17194,7 +17194,7 @@ function oh() {
17194
17194
  let P = 0;
17195
17195
  for (g = 0; g < p.length; ++g) {
17196
17196
  let D = p[g];
17197
- if (xe(D, Uint8Array))
17197
+ if (we(D, Uint8Array))
17198
17198
  P + D.length > S.length ? (s.isBuffer(D) || (D = s.from(D)), D.copy(S, P)) : Uint8Array.prototype.set.call(
17199
17199
  S,
17200
17200
  D,
@@ -17211,7 +17211,7 @@ function oh() {
17211
17211
  function w(N, p) {
17212
17212
  if (s.isBuffer(N))
17213
17213
  return N.length;
17214
- if (ArrayBuffer.isView(N) || xe(N, ArrayBuffer))
17214
+ if (ArrayBuffer.isView(N) || we(N, ArrayBuffer))
17215
17215
  return N.byteLength;
17216
17216
  if (typeof N != "string")
17217
17217
  throw new TypeError(
@@ -17310,7 +17310,7 @@ function oh() {
17310
17310
  const h = e.INSPECT_MAX_BYTES;
17311
17311
  return p = this.toString("hex", 0, h).replace(/(.{2})/g, "$1 ").trim(), this.length > h && (p += " ... "), "<Buffer " + p + ">";
17312
17312
  }, n && (s.prototype[n] = s.prototype.inspect), s.prototype.compare = function(p, h, g, S, P) {
17313
- if (xe(p, Uint8Array) && (p = s.from(p, p.offset, p.byteLength)), !s.isBuffer(p))
17313
+ if (we(p, Uint8Array) && (p = s.from(p, p.offset, p.byteLength)), !s.isBuffer(p))
17314
17314
  throw new TypeError(
17315
17315
  'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof p
17316
17316
  );
@@ -17324,10 +17324,10 @@ function oh() {
17324
17324
  return 1;
17325
17325
  if (h >>>= 0, g >>>= 0, S >>>= 0, P >>>= 0, this === p) return 0;
17326
17326
  let D = P - S, ue = g - h;
17327
- const Ve = Math.min(D, ue), we = this.slice(S, P), Fe = p.slice(h, g);
17327
+ const Ve = Math.min(D, ue), ge = this.slice(S, P), Fe = p.slice(h, g);
17328
17328
  for (let ye = 0; ye < Ve; ++ye)
17329
- if (we[ye] !== Fe[ye]) {
17330
- D = we[ye], ue = Fe[ye];
17329
+ if (ge[ye] !== Fe[ye]) {
17330
+ D = ge[ye], ue = Fe[ye];
17331
17331
  break;
17332
17332
  }
17333
17333
  return D < ue ? -1 : ue < D ? 1 : 0;
@@ -17356,23 +17356,23 @@ function oh() {
17356
17356
  function Ve(Fe, ye) {
17357
17357
  return P === 1 ? Fe[ye] : Fe.readUInt16BE(ye * P);
17358
17358
  }
17359
- let we;
17359
+ let ge;
17360
17360
  if (S) {
17361
17361
  let Fe = -1;
17362
- for (we = h; we < D; we++)
17363
- if (Ve(N, we) === Ve(p, Fe === -1 ? 0 : we - Fe)) {
17364
- if (Fe === -1 && (Fe = we), we - Fe + 1 === ue) return Fe * P;
17362
+ for (ge = h; ge < D; ge++)
17363
+ if (Ve(N, ge) === Ve(p, Fe === -1 ? 0 : ge - Fe)) {
17364
+ if (Fe === -1 && (Fe = ge), ge - Fe + 1 === ue) return Fe * P;
17365
17365
  } else
17366
- Fe !== -1 && (we -= we - Fe), Fe = -1;
17366
+ Fe !== -1 && (ge -= ge - Fe), Fe = -1;
17367
17367
  } else
17368
- for (h + ue > D && (h = D - ue), we = h; we >= 0; we--) {
17368
+ for (h + ue > D && (h = D - ue), ge = h; ge >= 0; ge--) {
17369
17369
  let Fe = !0;
17370
17370
  for (let ye = 0; ye < ue; ye++)
17371
- if (Ve(N, we + ye) !== Ve(p, ye)) {
17371
+ if (Ve(N, ge + ye) !== Ve(p, ye)) {
17372
17372
  Fe = !1;
17373
17373
  break;
17374
17374
  }
17375
- if (Fe) return we;
17375
+ if (Fe) return ge;
17376
17376
  }
17377
17377
  return -1;
17378
17378
  }
@@ -17398,16 +17398,16 @@ function oh() {
17398
17398
  return D;
17399
17399
  }
17400
17400
  function Z(N, p, h, g) {
17401
- return Xt(rt(p, N.length - h), N, h, g);
17401
+ return xt(rt(p, N.length - h), N, h, g);
17402
17402
  }
17403
17403
  function E(N, p, h, g) {
17404
- return Xt(Pt(p), N, h, g);
17404
+ return xt(Pt(p), N, h, g);
17405
17405
  }
17406
17406
  function G(N, p, h, g) {
17407
- return Xt(at(p), N, h, g);
17407
+ return xt(at(p), N, h, g);
17408
17408
  }
17409
17409
  function Y(N, p, h, g) {
17410
- return Xt(_e(p, N.length - h), N, h, g);
17410
+ return xt(_e(p, N.length - h), N, h, g);
17411
17411
  }
17412
17412
  s.prototype.write = function(p, h, g, S) {
17413
17413
  if (h === void 0)
@@ -17464,7 +17464,7 @@ function oh() {
17464
17464
  const P = N[S];
17465
17465
  let D = null, ue = P > 239 ? 4 : P > 223 ? 3 : P > 191 ? 2 : 1;
17466
17466
  if (S + ue <= h) {
17467
- let Ve, we, Fe, ye;
17467
+ let Ve, ge, Fe, ye;
17468
17468
  switch (ue) {
17469
17469
  case 1:
17470
17470
  P < 128 && (D = P);
@@ -17473,10 +17473,10 @@ function oh() {
17473
17473
  Ve = N[S + 1], (Ve & 192) === 128 && (ye = (P & 31) << 6 | Ve & 63, ye > 127 && (D = ye));
17474
17474
  break;
17475
17475
  case 3:
17476
- Ve = N[S + 1], we = N[S + 2], (Ve & 192) === 128 && (we & 192) === 128 && (ye = (P & 15) << 12 | (Ve & 63) << 6 | we & 63, ye > 2047 && (ye < 55296 || ye > 57343) && (D = ye));
17476
+ Ve = N[S + 1], ge = N[S + 2], (Ve & 192) === 128 && (ge & 192) === 128 && (ye = (P & 15) << 12 | (Ve & 63) << 6 | ge & 63, ye > 2047 && (ye < 55296 || ye > 57343) && (D = ye));
17477
17477
  break;
17478
17478
  case 4:
17479
- Ve = N[S + 1], we = N[S + 2], Fe = N[S + 3], (Ve & 192) === 128 && (we & 192) === 128 && (Fe & 192) === 128 && (ye = (P & 15) << 18 | (Ve & 63) << 12 | (we & 63) << 6 | Fe & 63, ye > 65535 && ye < 1114112 && (D = ye));
17479
+ Ve = N[S + 1], ge = N[S + 2], Fe = N[S + 3], (Ve & 192) === 128 && (ge & 192) === 128 && (Fe & 192) === 128 && (ye = (P & 15) << 18 | (Ve & 63) << 12 | (ge & 63) << 6 | Fe & 63, ye > 65535 && ye < 1114112 && (D = ye));
17480
17480
  }
17481
17481
  }
17482
17482
  D === null ? (D = 65533, ue = 1) : D > 65535 && (D -= 65536, g.push(D >>> 10 & 1023 | 55296), D = 56320 | D & 1023), g.push(D), S += ue;
@@ -17840,7 +17840,7 @@ function oh() {
17840
17840
  );
17841
17841
  }
17842
17842
  const l1 = /[^+/0-9A-Za-z-_]/g;
17843
- function Nt(N) {
17843
+ function Xt(N) {
17844
17844
  if (N = N.split("=")[0], N = N.trim().replace(l1, ""), N.length < 2) return "";
17845
17845
  for (; N.length % 4 !== 0; )
17846
17846
  N = N + "=";
@@ -17914,15 +17914,15 @@ function oh() {
17914
17914
  return P;
17915
17915
  }
17916
17916
  function at(N) {
17917
- return t.toByteArray(Nt(N));
17917
+ return t.toByteArray(Xt(N));
17918
17918
  }
17919
- function Xt(N, p, h, g) {
17919
+ function xt(N, p, h, g) {
17920
17920
  let S;
17921
17921
  for (S = 0; S < g && !(S + h >= p.length || S >= N.length); ++S)
17922
17922
  p[S + h] = N[S];
17923
17923
  return S;
17924
17924
  }
17925
- function xe(N, p) {
17925
+ function we(N, p) {
17926
17926
  return N instanceof p || N != null && N.constructor != null && N.constructor.name != null && N.constructor.name === p.name;
17927
17927
  }
17928
17928
  function Be(N) {
@@ -18805,7 +18805,7 @@ const Hh = new t2(), pm = ({
18805
18805
  smartAccount: K || void 0,
18806
18806
  signer: Z || void 0
18807
18807
  };
18808
- }, X = ge(
18808
+ }, X = xe(
18809
18809
  async (U) => {
18810
18810
  if (!u)
18811
18811
  return [];
@@ -18819,12 +18819,12 @@ const Hh = new t2(), pm = ({
18819
18819
  return K ? [K] : [];
18820
18820
  },
18821
18821
  [s, c, u, r, n]
18822
- ), x = nt(() => /* @__PURE__ */ new Map(), []), L = ge(
18822
+ ), x = nt(() => /* @__PURE__ */ new Map(), []), L = xe(
18823
18823
  (U) => {
18824
18824
  U !== f && (d(U), (x.get("chainChanged") || []).forEach((K) => K(U)));
18825
18825
  },
18826
18826
  [f, x]
18827
- ), w = ge(
18827
+ ), w = xe(
18828
18828
  async (U) => {
18829
18829
  const { method: z, params: K } = U;
18830
18830
  Es.debug("handleRequest", { method: z, params: K });
@@ -18906,7 +18906,7 @@ const Hh = new t2(), pm = ({
18906
18906
  const r = n0(), { reconnect: n } = o0(), { ready: o, provider: a } = Ph({
18907
18907
  chains: r.chains,
18908
18908
  useStagingTenant: t
18909
- }), [i, s] = ee(!1), [c, u] = ee(null), f = G1("InjectWagmiConnector"), d = ge(
18909
+ }), [i, s] = ee(!1), [c, u] = ee(null), f = G1("InjectWagmiConnector"), d = xe(
18910
18910
  async (m) => {
18911
18911
  try {
18912
18912
  await r.storage?.removeItem(`${ht.id}.disconnected`);