@nowramp/form 0.1.84 → 0.1.85

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.
package/dist/index.js CHANGED
@@ -8,14 +8,14 @@
8
8
  }`;
9
9
  document.head.appendChild(s);
10
10
  })();
11
- import { jsx as e, jsxs as l, Fragment as ae } from "react/jsx-runtime";
12
- import be, { useState as w, useRef as M, useCallback as O, useEffect as X, useMemo as V, useReducer as xa, useContext as va, createContext as ba } from "react";
13
- import { RampApi as rt } from "@nowramp/sdk";
11
+ import { jsx as e, jsxs as i, Fragment as ae } from "react/jsx-runtime";
12
+ import Ce, { useState as A, useRef as M, useCallback as B, useEffect as Z, useMemo as j, useReducer as xa, useContext as va, createContext as ba } from "react";
13
+ import { RampApi as ot } from "@nowramp/sdk";
14
14
  import { createPortal as Pt } from "react-dom";
15
15
  function Sa(t, a, n) {
16
- const [r, o] = w(null), [d, u] = w(!0), [i, c] = w(null), m = M(null);
17
- (!m.current || m.current !== t) && (m.current = new rt({ apiKey: "", ...t }));
18
- const h = O(async () => {
16
+ const [r, o] = A(null), [d, u] = A(!0), [l, c] = A(null), m = M(null);
17
+ (!m.current || m.current !== t) && (m.current = new ot({ apiKey: "", ...t }));
18
+ const p = B(async () => {
19
19
  if (!t.projectId) {
20
20
  c(new Error("projectId is required")), u(!1);
21
21
  return;
@@ -24,75 +24,75 @@ function Sa(t, a, n) {
24
24
  try {
25
25
  const f = {};
26
26
  a && (f.orderType = a), n && (f.country = n);
27
- const p = await m.current.getSupported(f);
28
- o(p);
27
+ const C = await m.current.getSupported(f);
28
+ o(C);
29
29
  } catch (f) {
30
30
  c(f instanceof Error ? f : new Error("Failed to fetch config"));
31
31
  } finally {
32
32
  u(!1);
33
33
  }
34
34
  }, [t.projectId, a, n]);
35
- return X(() => {
36
- h();
37
- }, [h]), { config: r, loading: d, error: i, refetch: h };
35
+ return Z(() => {
36
+ p();
37
+ }, [p]), { config: r, loading: d, error: l, refetch: p };
38
38
  }
39
39
  function Na(t, a) {
40
- const [n, r] = w(null), [o, d] = w(!1), [u, i] = w(null), c = M(null), m = M(""), h = `${t.apiUrl}|${t.projectId}`;
41
- (!c.current || m.current !== h) && (c.current = new rt({ apiKey: "", ...t }), m.current = h);
40
+ const [n, r] = A(null), [o, d] = A(!1), [u, l] = A(null), c = M(null), m = M(""), p = `${t.apiUrl}|${t.projectId}`;
41
+ (!c.current || m.current !== p) && (c.current = new ot({ apiKey: "", ...t }), m.current = p);
42
42
  const f = M(0);
43
- X(() => {
44
- const v = ++f.current;
43
+ Z(() => {
44
+ const S = ++f.current;
45
45
  if (!a || !t.projectId) {
46
46
  r(null), d(!1);
47
47
  return;
48
48
  }
49
- d(!0), i(null), c.current.getQuotes(a).then(
50
- (C) => {
51
- f.current === v && (r(C), d(!1));
49
+ d(!0), l(null), c.current.getQuotes(a).then(
50
+ (k) => {
51
+ f.current === S && (r(k), d(!1));
52
52
  },
53
- (C) => {
54
- f.current === v && (i(C instanceof Error ? C : new Error("Failed to fetch quotes")), r(null), d(!1));
53
+ (k) => {
54
+ f.current === S && (l(k instanceof Error ? k : new Error("Failed to fetch quotes")), r(null), d(!1));
55
55
  }
56
56
  );
57
57
  }, [t.projectId, a == null ? void 0 : a.fiatCurrency, a == null ? void 0 : a.fiatAmount, a == null ? void 0 : a.cryptoAmount, a == null ? void 0 : a.cryptoCurrency, a == null ? void 0 : a.network, a == null ? void 0 : a.paymentMethodId, a == null ? void 0 : a.country, a == null ? void 0 : a.orderType]);
58
- const p = O(async () => {
58
+ const C = B(async () => {
59
59
  if (!(!a || !t.projectId)) {
60
- d(!0), i(null);
60
+ d(!0), l(null);
61
61
  try {
62
- const v = await c.current.getQuotes(a);
63
- r(v);
64
- } catch (v) {
65
- i(v instanceof Error ? v : new Error("Failed to fetch quotes"));
62
+ const S = await c.current.getQuotes(a);
63
+ r(S);
64
+ } catch (S) {
65
+ l(S instanceof Error ? S : new Error("Failed to fetch quotes"));
66
66
  } finally {
67
67
  d(!1);
68
68
  }
69
69
  }
70
70
  }, [t.projectId, a]);
71
- return { quotes: n, loading: o, error: u, refetch: p };
71
+ return { quotes: n, loading: o, error: u, refetch: C };
72
72
  }
73
73
  function wa(t) {
74
- const [a, n] = w(null), [r, o] = w(!1), [d, u] = w(null), i = M(null), c = M(""), m = `${t.apiUrl}|${t.projectId}`;
75
- (!i.current || c.current !== m) && (i.current = new rt({ apiKey: "", ...t }), c.current = m);
76
- const h = O(async (p) => {
74
+ const [a, n] = A(null), [r, o] = A(!1), [d, u] = A(null), l = M(null), c = M(""), m = `${t.apiUrl}|${t.projectId}`;
75
+ (!l.current || c.current !== m) && (l.current = new ot({ apiKey: "", ...t }), c.current = m);
76
+ const p = B(async (C) => {
77
77
  o(!0), u(null);
78
78
  try {
79
- const v = await i.current.createCheckoutIntent(p);
80
- return n(v), v;
81
- } catch (v) {
82
- const C = v instanceof Error ? v : new Error("Failed to create checkout intent");
83
- throw u(C), C;
79
+ const S = await l.current.createCheckoutIntent(C);
80
+ return n(S), S;
81
+ } catch (S) {
82
+ const k = S instanceof Error ? S : new Error("Failed to create checkout intent");
83
+ throw u(k), k;
84
84
  } finally {
85
85
  o(!1);
86
86
  }
87
- }, []), f = O(() => {
87
+ }, []), f = B(() => {
88
88
  n(null), u(null);
89
89
  }, []);
90
- return { order: a, loading: r, error: d, createOrder: h, reset: f };
90
+ return { order: a, loading: r, error: d, createOrder: p, reset: f };
91
91
  }
92
92
  function Ea(t, a, n) {
93
- const [r, o] = w(null), [d, u] = w(!1), [i, c] = w(null), m = M(null);
94
- m.current || (m.current = new rt({ apiKey: "", projectId: "", ...t }));
95
- const h = O(async () => {
93
+ const [r, o] = A(null), [d, u] = A(!1), [l, c] = A(null), m = M(null);
94
+ m.current || (m.current = new ot({ apiKey: "", projectId: "", ...t }));
95
+ const p = B(async () => {
96
96
  if (a) {
97
97
  u(!0), c(null);
98
98
  try {
@@ -105,22 +105,22 @@ function Ea(t, a, n) {
105
105
  }
106
106
  }
107
107
  }, [a]);
108
- return X(() => {
108
+ return Z(() => {
109
109
  if (!a) return;
110
110
  const f = (n == null ? void 0 : n.initialDelay) ?? 0;
111
111
  if (f > 0) {
112
- const p = setTimeout(h, f);
113
- return () => clearTimeout(p);
112
+ const C = setTimeout(p, f);
113
+ return () => clearTimeout(C);
114
114
  }
115
- h();
116
- }, [h, a, n == null ? void 0 : n.initialDelay]), X(() => {
115
+ p();
116
+ }, [p, a, n == null ? void 0 : n.initialDelay]), Z(() => {
117
117
  if (!a || !(n != null && n.pollInterval) || !r || ["completed", "failed", "cancelled", "expired", "refunded"].includes(r.status))
118
118
  return;
119
- const p = setInterval(h, n.pollInterval);
120
- return () => clearInterval(p);
121
- }, [a, n == null ? void 0 : n.pollInterval, r == null ? void 0 : r.status, h]), { status: r, loading: d, error: i, refetch: h };
119
+ const C = setInterval(p, n.pollInterval);
120
+ return () => clearInterval(C);
121
+ }, [a, n == null ? void 0 : n.pollInterval, r == null ? void 0 : r.status, p]), { status: r, loading: d, error: l, refetch: p };
122
122
  }
123
- const at = [
123
+ const nt = [
124
124
  { code: "ad", name: "Andorra", defaultFiat: "EUR" },
125
125
  { code: "ae", name: "United Arab Emirates", defaultFiat: "AED" },
126
126
  { code: "af", name: "Afghanistan", defaultFiat: "USD" },
@@ -313,21 +313,21 @@ const at = [
313
313
  { code: "zm", name: "Zambia", defaultFiat: "USD" },
314
314
  { code: "zw", name: "Zimbabwe", defaultFiat: "USD" }
315
315
  ], yt = Object.fromEntries(
316
- at.map((t) => [t.code, t])
316
+ nt.map((t) => [t.code, t])
317
317
  );
318
318
  function mt(t, a) {
319
319
  if (!t) return "USD";
320
320
  const n = yt[t.toLowerCase()], r = (n == null ? void 0 : n.defaultFiat) || "USD";
321
321
  return !a || a.length === 0 || a.includes(r) ? r : a.includes("USD") ? "USD" : a[0] || "USD";
322
322
  }
323
- const ot = !0;
324
- function Ct(t, a, n = ot) {
323
+ const it = !0;
324
+ function Ct(t, a, n = it) {
325
325
  return t === void 0 || a === void 0 ? n : t.length === 0 || a.length === 0 ? !1 : t.some((r) => a.includes(r));
326
326
  }
327
- function Aa(t, a, n = ot) {
327
+ function Aa(t, a, n = it) {
328
328
  return t.filter((r) => Ct(r.providers, a, n));
329
329
  }
330
- function Ra(t, a, n = ot) {
330
+ function Ra(t, a, n = it) {
331
331
  const r = [];
332
332
  for (const o of t) {
333
333
  const d = o.networks.filter(
@@ -339,7 +339,7 @@ function Ra(t, a, n = ot) {
339
339
  }
340
340
  return r;
341
341
  }
342
- function ka(t, a, n, r = ot) {
342
+ function ka(t, a, n, r = it) {
343
343
  return n ? t.filter(
344
344
  (o) => o.supportedFiats.includes(n) && Ct(o.providers, a, r)
345
345
  ) : [];
@@ -349,23 +349,23 @@ function Ta(t, a, n) {
349
349
  let o = !1;
350
350
  if (!n.cryptoLocked && !n.networkLocked) {
351
351
  if (!(t.cryptoCurrency && a.availableCryptos.some(
352
- (i) => i.code === t.cryptoCurrency && i.networks.some((c) => c.id === t.network)
352
+ (l) => l.code === t.cryptoCurrency && l.networks.some((c) => c.id === t.network)
353
353
  )) && a.availableCryptos.length > 0) {
354
- const i = a.availableCryptos[0], c = i.networks.find((m) => m.isDefault) || i.networks[0];
355
- i.code !== t.cryptoCurrency && (r.cryptoCurrency = i.code, o = !0), c && c.id !== t.network && (r.network = c.id, o = !0);
354
+ const l = a.availableCryptos[0], c = l.networks.find((m) => m.isDefault) || l.networks[0];
355
+ l.code !== t.cryptoCurrency && (r.cryptoCurrency = l.code, o = !0), c && c.id !== t.network && (r.network = c.id, o = !0);
356
356
  }
357
357
  } else if (!n.cryptoLocked && n.networkLocked) {
358
358
  if (!(t.cryptoCurrency && a.availableCryptos.some(
359
- (i) => i.code === t.cryptoCurrency && i.networks.some((c) => c.id === t.network)
359
+ (l) => l.code === t.cryptoCurrency && l.networks.some((c) => c.id === t.network)
360
360
  ))) {
361
- const i = a.availableCryptos.find(
361
+ const l = a.availableCryptos.find(
362
362
  (c) => c.networks.some((m) => m.id === t.network)
363
363
  );
364
- i && i.code !== t.cryptoCurrency && (r.cryptoCurrency = i.code, o = !0);
364
+ l && l.code !== t.cryptoCurrency && (r.cryptoCurrency = l.code, o = !0);
365
365
  }
366
366
  } else if (n.cryptoLocked && !n.networkLocked) {
367
367
  const u = a.availableCryptos.find(
368
- (i) => i.code === t.cryptoCurrency
368
+ (l) => l.code === t.cryptoCurrency
369
369
  );
370
370
  if (u && !u.networks.some(
371
371
  (c) => c.id === t.network
@@ -374,28 +374,28 @@ function Ta(t, a, n) {
374
374
  c.id !== t.network && (r.network = c.id, o = !0);
375
375
  }
376
376
  }
377
- if (!n.fiatLocked && !(t.fiatCurrency && a.availableFiats.some((i) => i.code === t.fiatCurrency)) && a.availableFiats.length > 0) {
377
+ if (!n.fiatLocked && !(t.fiatCurrency && a.availableFiats.some((l) => l.code === t.fiatCurrency)) && a.availableFiats.length > 0) {
378
378
  const c = a.availableFiats.find((m) => m.code === "USD") || a.availableFiats[0];
379
379
  c.code !== t.fiatCurrency && (r.fiatCurrency = c.code, o = !0);
380
380
  }
381
381
  if (!(t.paymentMethodId && a.availablePaymentMethods.some(
382
382
  (u) => u.id === t.paymentMethodId
383
383
  )) && a.availablePaymentMethods.length > 0) {
384
- const i = a.availablePaymentMethods.find(
384
+ const l = a.availablePaymentMethods.find(
385
385
  (c) => c.id.includes("card") || c.id.includes("debit")
386
386
  ) || a.availablePaymentMethods[0];
387
- i.id !== t.paymentMethodId && (r.paymentMethodId = i.id, o = !0);
387
+ l.id !== t.paymentMethodId && (r.paymentMethodId = l.id, o = !0);
388
388
  }
389
389
  return o ? r : null;
390
390
  }
391
391
  function La(t, a, n, r) {
392
392
  var o, d, u;
393
393
  if (n.cryptoLocked) {
394
- const i = (o = t.cryptos) == null ? void 0 : o.find(
394
+ const l = (o = t.cryptos) == null ? void 0 : o.find(
395
395
  (m) => m.code === a.cryptoCurrency
396
396
  );
397
- if (!i) return !0;
398
- const c = (d = i.networks) == null ? void 0 : d.find((m) => m.id === a.network);
397
+ if (!l) return !0;
398
+ const c = (d = l.networks) == null ? void 0 : d.find((m) => m.id === a.network);
399
399
  if (!c || c.providers !== void 0 && c.providers.length === 0 || c.providers !== void 0 && (r.availableFiats.length === 0 || r.availablePaymentMethods.length === 0))
400
400
  return !0;
401
401
  }
@@ -404,8 +404,8 @@ function La(t, a, n, r) {
404
404
  ))
405
405
  return !0;
406
406
  if (n.fiatLocked) {
407
- const i = (u = t.fiats) == null ? void 0 : u.find((c) => c.code === a.fiatCurrency);
408
- if (!i || i.providers !== void 0 && i.providers.length === 0 || i.providers !== void 0 && r.availableCryptos.length === 0)
407
+ const l = (u = t.fiats) == null ? void 0 : u.find((c) => c.code === a.fiatCurrency);
408
+ if (!l || l.providers !== void 0 && l.providers.length === 0 || l.providers !== void 0 && r.availableCryptos.length === 0)
409
409
  return !0;
410
410
  }
411
411
  return !1;
@@ -433,7 +433,7 @@ function Da(t) {
433
433
  const a = t.toLowerCase();
434
434
  return /amount|out of range for|minimum|maximum/.test(a) ? 1 : /currency|pair|network|chain/.test(a) ? 2 : /country|region|location/.test(a) ? 3 : /does not support|unsupported/.test(a) ? 4 : 5;
435
435
  }
436
- const Qt = {
436
+ const Ia = ["completed", "failed", "cancelled", "expired", "refunded"], Qt = {
437
437
  step: "amount",
438
438
  flowType: "buy",
439
439
  fiatCurrency: "USD",
@@ -453,7 +453,7 @@ const Qt = {
453
453
  errorMessage: null
454
454
  };
455
455
  function Ma(t, a) {
456
- var n, r, o, d, u, i, c, m;
456
+ var n, r, o, d, u, l, c, m;
457
457
  switch (a.type) {
458
458
  case "SET_STEP":
459
459
  return { ...t, step: a.step, errorMessage: null };
@@ -465,7 +465,7 @@ function Ma(t, a) {
465
465
  cryptoAmount: "",
466
466
  fiatCurrency: (r = (n = a.fieldLocks) == null ? void 0 : n.sourceCurrency) != null && r.locked ? t.fiatCurrency : "",
467
467
  cryptoCurrency: (d = (o = a.fieldLocks) == null ? void 0 : o.destinationCurrency) != null && d.locked ? t.cryptoCurrency : "",
468
- network: (i = (u = a.fieldLocks) == null ? void 0 : u.network) != null && i.locked || (m = (c = a.fieldLocks) == null ? void 0 : c.destinationCurrency) != null && m.locked ? t.network : "",
468
+ network: (l = (u = a.fieldLocks) == null ? void 0 : u.network) != null && l.locked || (m = (c = a.fieldLocks) == null ? void 0 : c.destinationCurrency) != null && m.locked ? t.network : "",
469
469
  paymentMethodId: "",
470
470
  selectedQuote: null,
471
471
  selectedProvider: null,
@@ -514,256 +514,257 @@ function Ma(t, a) {
514
514
  }
515
515
  }
516
516
  const zt = ba(null);
517
- function Ia({
518
- projectId: t,
519
- apiUrl: a = "https://api.nowramp.com",
520
- assetBaseUrl: n = "",
521
- flowType: r = "buy",
522
- customerId: o = "",
523
- brandId: d,
524
- defaultFiatCurrency: u = "USD",
525
- defaultCryptoCurrency: i = "BTC",
526
- defaultNetwork: c = "",
527
- defaultFiatAmount: m = "",
528
- defaultCryptoAmount: h = "",
529
- defaultWalletAddress: f = "",
530
- defaultGateway: p,
531
- defaultCountry: v,
532
- fieldLocks: C,
533
- partnerMetadata: E,
534
- statusPollInterval: L = 5e3,
535
- onComplete: K,
536
- onError: ee,
537
- children: Z
538
- }) {
539
- const Y = V(() => ({ apiUrl: a, projectId: t }), [a, t]), te = c || (i ? i.toLowerCase() : ""), $ = r === "sell", le = $ ? !!h : !!m, U = ($ ? !!(le && i && te) : !!(le && i && te && f)) && p ? "confirm" : "amount", Q = m || (r === "buy" ? "250" : ""), [s, S] = xa(Ma, {
517
+ function Ba(t) {
518
+ const a = M(t.defaultFiatCurrency !== void 0), {
519
+ projectId: n,
520
+ apiUrl: r = "https://api.nowramp.com",
521
+ assetBaseUrl: o = "",
522
+ flowType: d = "buy",
523
+ customerId: u = "",
524
+ brandId: l,
525
+ defaultFiatCurrency: c = "USD",
526
+ defaultCryptoCurrency: m = "BTC",
527
+ defaultNetwork: p = "",
528
+ defaultFiatAmount: f = "",
529
+ defaultCryptoAmount: C = "",
530
+ defaultWalletAddress: S = "",
531
+ defaultGateway: k,
532
+ defaultCountry: w,
533
+ fieldLocks: y,
534
+ partnerMetadata: O,
535
+ statusPollInterval: le = 5e3,
536
+ onComplete: G,
537
+ onError: z,
538
+ children: ce
539
+ } = t, _ = j(() => ({ apiUrl: r, projectId: n }), [r, n]), ne = p || (m ? m.toLowerCase() : ""), g = d === "sell", T = g ? !!C : !!f, xe = (g ? !!(T && m && ne) : !!(T && m && ne && S)) && k ? "confirm" : "amount", F = f || (d === "buy" ? "250" : ""), [s, L] = xa(Ma, {
540
540
  ...Qt,
541
- step: U,
542
- flowType: r,
543
- fiatCurrency: u,
544
- cryptoCurrency: i,
545
- network: te,
546
- fiatAmount: Kt(Q, 2),
547
- cryptoAmount: Kt(h, 6),
548
- walletAddress: f,
549
- customerId: o,
541
+ step: xe,
542
+ flowType: d,
543
+ fiatCurrency: c,
544
+ cryptoCurrency: m,
545
+ network: ne,
546
+ fiatAmount: Kt(F, 2),
547
+ cryptoAmount: Kt(C, 6),
548
+ walletAddress: S,
549
+ customerId: u,
550
550
  // If defaultCountry is provided, set it immediately with 'manual' source to skip auto-detection
551
- ...v ? { country: v.toLowerCase(), countrySource: "manual" } : {}
552
- }), H = s.flowType === "sell", {
553
- config: g,
554
- loading: ce,
555
- error: Ce
556
- } = Sa(Y, s.flowType, s.country || void 0), se = M(!1);
557
- be.useEffect(() => {
558
- var T;
559
- if (se.current || !(g != null && g.detectedCountry) || s.country) return;
560
- se.current = !0;
561
- const y = g.detectedCountry.toLowerCase();
562
- S({ type: "SET_COUNTRY_AUTO", country: y });
563
- const A = (T = g.fiats) == null ? void 0 : T.map((R) => R.code), k = mt(y, A);
564
- k !== s.fiatCurrency && S({ type: "SET_FIAT_CURRENCY", currency: k });
565
- }, [g, s.country, s.fiatCurrency]);
566
- const ge = M(!1);
567
- be.useEffect(() => {
568
- var k;
569
- if (ge.current || !v || !((k = g == null ? void 0 : g.fiats) != null && k.length)) return;
570
- ge.current = !0;
571
- const y = g.fiats.map((T) => T.code), A = mt(v, y);
572
- A !== s.fiatCurrency && S({ type: "SET_FIAT_CURRENCY", currency: A });
573
- }, [v, g, s.fiatCurrency]);
574
- const D = M(s.country);
575
- be.useEffect(() => {
576
- var k;
577
- if (s.country === D.current || (D.current = s.country, s.countrySource === "manual" && (me.current = !1), s.countrySource !== "manual") || !((k = g == null ? void 0 : g.fiats) != null && k.length)) return;
578
- const y = g.fiats.map((T) => T.code), A = mt(s.country, y);
579
- A !== s.fiatCurrency && S({ type: "SET_FIAT_CURRENCY", currency: A });
580
- }, [s.country, s.countrySource, g, s.fiatCurrency]);
581
- const Ne = M(s.fiatCurrency);
582
- be.useEffect(() => {
583
- var T;
584
- if (s.fiatCurrency === Ne.current || (Ne.current = s.fiatCurrency, H || !((T = g == null ? void 0 : g.fiats) != null && T.length) || !s.fiatAmount)) return;
585
- const y = g.fiats.find((R) => R.code === s.fiatCurrency);
586
- if (!(y != null && y.minAmount)) return;
587
- const A = parseFloat(s.fiatAmount), k = parseFloat(y.minAmount);
588
- !isNaN(A) && !isNaN(k) && A < k && S({ type: "SET_FIAT_AMOUNT", amount: String(Math.ceil(k)) });
589
- }, [s.fiatCurrency, s.fiatAmount, g, H]);
590
- const { availableFiats: I, availableCryptos: oe, availablePaymentMethods: de } = V(() => {
591
- var k, T, R;
592
- if (!g)
551
+ ...w ? { country: w.toLowerCase(), countrySource: "manual" } : {}
552
+ }), W = s.flowType === "sell", {
553
+ config: b,
554
+ loading: ee,
555
+ error: ue
556
+ } = Sa(_, s.flowType, s.country || void 0), I = M(!1);
557
+ Ce.useEffect(() => {
558
+ var R, D;
559
+ if (I.current || !(b != null && b.detectedCountry) || s.country) return;
560
+ I.current = !0;
561
+ const h = b.detectedCountry.toLowerCase();
562
+ L({ type: "SET_COUNTRY_AUTO", country: h });
563
+ const v = (R = b.fiats) == null ? void 0 : R.map((U) => U.code), N = mt(h, v);
564
+ N !== s.fiatCurrency && !((D = y == null ? void 0 : y.sourceCurrency) != null && D.locked) && !a.current && L({ type: "SET_FIAT_CURRENCY", currency: N });
565
+ }, [b, s.country, s.fiatCurrency, y]);
566
+ const ve = M(!1);
567
+ Ce.useEffect(() => {
568
+ var N, R;
569
+ if (ve.current || !w || !((N = b == null ? void 0 : b.fiats) != null && N.length)) return;
570
+ ve.current = !0;
571
+ const h = b.fiats.map((D) => D.code), v = mt(w, h);
572
+ v !== s.fiatCurrency && !((R = y == null ? void 0 : y.sourceCurrency) != null && R.locked) && !a.current && L({ type: "SET_FIAT_CURRENCY", currency: v });
573
+ }, [w, b, s.fiatCurrency, y]);
574
+ const Y = M(s.country);
575
+ Ce.useEffect(() => {
576
+ var N, R;
577
+ if (s.country === Y.current || (Y.current = s.country, s.countrySource === "manual" && (Ne.current = !1), s.countrySource !== "manual") || !((N = b == null ? void 0 : b.fiats) != null && N.length)) return;
578
+ const h = b.fiats.map((D) => D.code), v = mt(s.country, h);
579
+ v !== s.fiatCurrency && !((R = y == null ? void 0 : y.sourceCurrency) != null && R.locked) && L({ type: "SET_FIAT_CURRENCY", currency: v });
580
+ }, [s.country, s.countrySource, b, s.fiatCurrency, y]);
581
+ const ke = M(s.fiatCurrency);
582
+ Ce.useEffect(() => {
583
+ var R;
584
+ if (s.fiatCurrency === ke.current || (ke.current = s.fiatCurrency, W || !((R = b == null ? void 0 : b.fiats) != null && R.length) || !s.fiatAmount)) return;
585
+ const h = b.fiats.find((D) => D.code === s.fiatCurrency);
586
+ if (!(h != null && h.minAmount)) return;
587
+ const v = parseFloat(s.fiatAmount), N = parseFloat(h.minAmount);
588
+ !isNaN(v) && !isNaN(N) && v < N && L({ type: "SET_FIAT_AMOUNT", amount: String(Math.ceil(N)) });
589
+ }, [s.fiatCurrency, s.fiatAmount, b, W]);
590
+ const { availableFiats: se, availableCryptos: Q, availablePaymentMethods: te } = j(() => {
591
+ var N, R, D;
592
+ if (!b)
593
593
  return { availableFiats: [], availableCryptos: [], availablePaymentMethods: [] };
594
- let y;
594
+ let h;
595
595
  if (s.cryptoCurrency && s.network) {
596
- const F = (k = g.cryptos) == null ? void 0 : k.find((Ee) => Ee.code === s.cryptoCurrency), j = (T = F == null ? void 0 : F.networks) == null ? void 0 : T.find((Ee) => Ee.id === s.network);
597
- !F || !j ? y = [] : y = j.providers;
596
+ const U = (N = b.cryptos) == null ? void 0 : N.find((fe) => fe.code === s.cryptoCurrency), J = (R = U == null ? void 0 : U.networks) == null ? void 0 : R.find((fe) => fe.id === s.network);
597
+ !U || !J ? h = [] : h = J.providers;
598
598
  }
599
- let A;
599
+ let v;
600
600
  if (s.fiatCurrency) {
601
- const F = (R = g.fiats) == null ? void 0 : R.find((j) => j.code === s.fiatCurrency);
602
- F ? A = F.providers : A = [];
601
+ const U = (D = b.fiats) == null ? void 0 : D.find((J) => J.code === s.fiatCurrency);
602
+ U ? v = U.providers : v = [];
603
603
  }
604
604
  return {
605
- availableFiats: Aa(g.fiats ?? [], y),
606
- availableCryptos: Ra(g.cryptos ?? [], A),
605
+ availableFiats: Aa(b.fiats ?? [], h),
606
+ availableCryptos: Ra(b.cryptos ?? [], v),
607
607
  availablePaymentMethods: ka(
608
- g.paymentMethods ?? [],
609
- y,
608
+ b.paymentMethods ?? [],
609
+ h,
610
610
  s.fiatCurrency
611
611
  )
612
612
  };
613
- }, [g, s.cryptoCurrency, s.network, s.fiatCurrency]), ue = V(() => {
614
- var y, A, k;
615
- return ce || !g ? !1 : La(
616
- g,
613
+ }, [b, s.cryptoCurrency, s.network, s.fiatCurrency]), de = j(() => {
614
+ var h, v, N;
615
+ return ee || !b ? !1 : La(
616
+ b,
617
617
  { cryptoCurrency: s.cryptoCurrency, network: s.network, fiatCurrency: s.fiatCurrency },
618
618
  {
619
- cryptoLocked: !!((y = C == null ? void 0 : C.destinationCurrency) != null && y.locked),
620
- networkLocked: !!((A = C == null ? void 0 : C.network) != null && A.locked),
621
- fiatLocked: !!((k = C == null ? void 0 : C.sourceCurrency) != null && k.locked)
619
+ cryptoLocked: !!((h = y == null ? void 0 : y.destinationCurrency) != null && h.locked),
620
+ networkLocked: !!((v = y == null ? void 0 : y.network) != null && v.locked),
621
+ fiatLocked: !!((N = y == null ? void 0 : y.sourceCurrency) != null && N.locked)
622
622
  },
623
- { availableFiats: I, availableCryptos: oe, availablePaymentMethods: de }
623
+ { availableFiats: se, availableCryptos: Q, availablePaymentMethods: te }
624
624
  );
625
625
  }, [
626
- ce,
627
- g,
628
- C,
626
+ ee,
627
+ b,
628
+ y,
629
629
  s.cryptoCurrency,
630
630
  s.network,
631
631
  s.fiatCurrency,
632
- I,
633
- oe,
634
- de
632
+ se,
633
+ Q,
634
+ te
635
635
  ]);
636
- be.useEffect(() => {
637
- var A, k, T;
638
- if (ce || I.length === 0 && oe.length === 0) return;
639
- const y = Ta(
636
+ Ce.useEffect(() => {
637
+ var v, N, R;
638
+ if (ee || se.length === 0 && Q.length === 0) return;
639
+ const h = Ta(
640
640
  {
641
641
  cryptoCurrency: s.cryptoCurrency,
642
642
  network: s.network,
643
643
  fiatCurrency: s.fiatCurrency,
644
644
  paymentMethodId: s.paymentMethodId
645
645
  },
646
- { availableFiats: I, availableCryptos: oe, availablePaymentMethods: de },
646
+ { availableFiats: se, availableCryptos: Q, availablePaymentMethods: te },
647
647
  {
648
- cryptoLocked: !!((A = C == null ? void 0 : C.destinationCurrency) != null && A.locked),
649
- networkLocked: !!((k = C == null ? void 0 : C.network) != null && k.locked),
650
- fiatLocked: !!((T = C == null ? void 0 : C.sourceCurrency) != null && T.locked)
648
+ cryptoLocked: !!((v = y == null ? void 0 : y.destinationCurrency) != null && v.locked),
649
+ networkLocked: !!((N = y == null ? void 0 : y.network) != null && N.locked),
650
+ fiatLocked: !!((R = y == null ? void 0 : y.sourceCurrency) != null && R.locked)
651
651
  }
652
652
  );
653
- y && (y.cryptoCurrency !== void 0 && S({ type: "SET_CRYPTO_CURRENCY", currency: y.cryptoCurrency }), y.network !== void 0 && S({ type: "SET_NETWORK", network: y.network }), y.fiatCurrency !== void 0 && S({ type: "SET_FIAT_CURRENCY", currency: y.fiatCurrency }), y.paymentMethodId !== void 0 && S({ type: "SET_PAYMENT_METHOD", methodId: y.paymentMethodId }));
653
+ h && (h.cryptoCurrency !== void 0 && L({ type: "SET_CRYPTO_CURRENCY", currency: h.cryptoCurrency }), h.network !== void 0 && L({ type: "SET_NETWORK", network: h.network }), h.fiatCurrency !== void 0 && L({ type: "SET_FIAT_CURRENCY", currency: h.fiatCurrency }), h.paymentMethodId !== void 0 && L({ type: "SET_PAYMENT_METHOD", methodId: h.paymentMethodId }));
654
654
  }, [
655
- ce,
656
- I,
657
- oe,
658
- de,
655
+ ee,
656
+ se,
657
+ Q,
658
+ te,
659
659
  s.cryptoCurrency,
660
660
  s.network,
661
661
  s.fiatCurrency,
662
662
  s.paymentMethodId,
663
- C,
664
- S
663
+ y,
664
+ L
665
665
  ]);
666
- const z = V(() => {
667
- if (H) {
666
+ const ye = j(() => {
667
+ if (W) {
668
668
  if (!s.cryptoAmount) return null;
669
- const R = parseFloat(s.cryptoAmount);
670
- return isNaN(R) || R <= 0 ? "Enter a valid amount" : null;
669
+ const D = parseFloat(s.cryptoAmount);
670
+ return isNaN(D) || D <= 0 ? "Enter a valid amount" : null;
671
671
  }
672
- if (!g || !s.fiatAmount) return null;
673
- const y = parseFloat(s.fiatAmount);
674
- if (isNaN(y)) return null;
675
- const A = g.fiats.find((R) => R.code === s.fiatCurrency);
676
- if (!A) return null;
677
- const k = parseFloat(A.minAmount), T = parseFloat(A.maxAmount);
678
- return !isNaN(k) && y < k ? `Minimum amount is ${A.minAmount} ${s.fiatCurrency}` : !isNaN(T) && y > T ? `Maximum amount is ${A.maxAmount} ${s.fiatCurrency}` : null;
679
- }, [g, s.fiatAmount, s.fiatCurrency, s.cryptoAmount, H]), J = V(() => {
680
- const y = H ? !!s.cryptoAmount : !!s.fiatAmount;
681
- return !g || !y || !s.fiatCurrency || !s.cryptoCurrency || !s.network || z || g.detectedCountry && s.countrySource === "" && !v ? null : {
672
+ if (!b || !s.fiatAmount) return null;
673
+ const h = parseFloat(s.fiatAmount);
674
+ if (isNaN(h)) return null;
675
+ const v = b.fiats.find((D) => D.code === s.fiatCurrency);
676
+ if (!v) return null;
677
+ const N = parseFloat(v.minAmount), R = parseFloat(v.maxAmount);
678
+ return !isNaN(N) && h < N ? `Minimum amount is ${v.minAmount} ${s.fiatCurrency}` : !isNaN(R) && h > R ? `Maximum amount is ${v.maxAmount} ${s.fiatCurrency}` : null;
679
+ }, [b, s.fiatAmount, s.fiatCurrency, s.cryptoAmount, W]), re = j(() => {
680
+ const h = W ? !!s.cryptoAmount : !!s.fiatAmount;
681
+ return !b || !h || !s.fiatCurrency || !s.cryptoCurrency || !s.network || ye || b.detectedCountry && s.countrySource === "" && !w ? null : {
682
682
  fiatCurrency: s.fiatCurrency,
683
- ...H ? { cryptoAmount: s.cryptoAmount } : { fiatAmount: s.fiatAmount },
683
+ ...W ? { cryptoAmount: s.cryptoAmount } : { fiatAmount: s.fiatAmount },
684
684
  cryptoCurrency: s.cryptoCurrency,
685
685
  network: s.network,
686
686
  paymentMethodId: s.paymentMethodId || void 0,
687
687
  country: s.country || void 0,
688
688
  orderType: s.flowType
689
689
  };
690
- }, [g, s.fiatCurrency, s.fiatAmount, s.cryptoAmount, s.cryptoCurrency, s.network, s.paymentMethodId, s.country, s.countrySource, z, H, s.flowType, v]), {
691
- quotes: W,
692
- loading: ne,
693
- error: Te,
694
- refetch: We
695
- } = Na(Y, J), Oe = Ua(ne, W, J), me = M(!1);
696
- be.useEffect(() => {
697
- me.current || s.countrySource === "auto" && (ne || !J || Te || !W || W.bestQuote || s.fiatCurrency !== "USD" && (me.current = !0, S({ type: "SET_FIAT_CURRENCY", currency: "USD" }), S({ type: "SET_FIAT_AMOUNT", amount: "250" })));
698
- }, [W, ne, Te, J, s.countrySource, s.fiatCurrency]);
690
+ }, [b, s.fiatCurrency, s.fiatAmount, s.cryptoAmount, s.cryptoCurrency, s.network, s.paymentMethodId, s.country, s.countrySource, ye, W, s.flowType, w]), {
691
+ quotes: $,
692
+ loading: be,
693
+ error: Oe,
694
+ refetch: Se
695
+ } = Na(_, re), H = Ua(be, $, re), Ne = M(!1);
696
+ Ce.useEffect(() => {
697
+ var h;
698
+ Ne.current || s.countrySource === "auto" && ((h = y == null ? void 0 : y.sourceCurrency) != null && h.locked || a.current || be || !re || Oe || !$ || $.bestQuote || s.fiatCurrency !== "USD" && (Ne.current = !0, L({ type: "SET_FIAT_CURRENCY", currency: "USD" }), L({ type: "SET_FIAT_AMOUNT", amount: "250" })));
699
+ }, [$, be, Oe, re, s.countrySource, s.fiatCurrency]);
699
700
  const {
700
- order: B,
701
- loading: He,
702
- error: Le,
703
- createOrder: Pe
704
- } = wa(Y), Xe = 15e3, {
705
- status: ie,
706
- loading: Ye
701
+ order: we,
702
+ loading: $e,
703
+ error: Te,
704
+ createOrder: Xe
705
+ } = wa(_), Ye = 15e3, {
706
+ status: P,
707
+ loading: Ze
707
708
  } = Ea(
708
- { apiUrl: a },
709
- (B == null ? void 0 : B.orderId) ?? null,
710
- { pollInterval: L, initialDelay: Xe }
711
- );
712
- be.useEffect(() => {
713
- (ie == null ? void 0 : ie.status) === "completed" && K && K(ie);
714
- }, [ie == null ? void 0 : ie.status, K]), be.useEffect(() => {
715
- const y = Ce || Le;
716
- y && ee && ee(y);
717
- }, [Ce, Le, ee]);
718
- const fe = p || (g == null ? void 0 : g.defaultGateway) || null, Ze = V(() => {
719
- if (!Oe || !(W != null && W.unavailableGateways)) return null;
720
- const y = W.preferredGatewayId || fe;
721
- return Fa(W.unavailableGateways, y);
722
- }, [Oe, W, fe]), Qe = M(fe);
723
- Qe.current = fe;
724
- const xe = M(W);
725
- xe.current = W;
726
- const we = M(d);
727
- we.current = d;
728
- const it = O(async () => {
729
- var A, k, T;
730
- const y = ((A = s.selectedQuote) == null ? void 0 : A.gatewayId) || ((T = (k = xe.current) == null ? void 0 : k.bestQuote) == null ? void 0 : T.gatewayId) || Qe.current;
731
- if (!y || !s.walletAddress) {
732
- const R = [!y && "gateway", !s.walletAddress && "walletAddress"].filter(Boolean).join(", ");
733
- S({ type: "SET_ERROR", message: `Missing required fields: ${R}` });
709
+ { apiUrl: r },
710
+ (we == null ? void 0 : we.orderId) ?? null,
711
+ { pollInterval: le, initialDelay: Ye }
712
+ ), Qe = M(null);
713
+ Ce.useEffect(() => {
714
+ !(P != null && P.status) || !G || Ia.includes(P.status) && Qe.current !== P.orderId && (Qe.current = P.orderId, G(P));
715
+ }, [P == null ? void 0 : P.status, P == null ? void 0 : P.orderId, G]), Ce.useEffect(() => {
716
+ const h = ue || Te;
717
+ h && z && z(h);
718
+ }, [ue, Te, z]);
719
+ const oe = k || (b == null ? void 0 : b.defaultGateway) || null, He = j(() => {
720
+ if (!H || !($ != null && $.unavailableGateways)) return null;
721
+ const h = $.preferredGatewayId || oe;
722
+ return Fa($.unavailableGateways, h);
723
+ }, [H, $, oe]), ze = M(oe);
724
+ ze.current = oe;
725
+ const Je = M($);
726
+ Je.current = $;
727
+ const Le = M(l);
728
+ Le.current = l;
729
+ const me = B(async () => {
730
+ var v, N, R;
731
+ const h = ((v = s.selectedQuote) == null ? void 0 : v.gatewayId) || ((R = (N = Je.current) == null ? void 0 : N.bestQuote) == null ? void 0 : R.gatewayId) || ze.current;
732
+ if (!h || !s.walletAddress) {
733
+ const D = [!h && "gateway", !s.walletAddress && "walletAddress"].filter(Boolean).join(", ");
734
+ L({ type: "SET_ERROR", message: `Missing required fields: ${D}` });
734
735
  return;
735
736
  }
736
737
  try {
737
- await Pe({
738
- gateway: y,
738
+ await Xe({
739
+ gateway: h,
739
740
  customerId: s.customerId || void 0,
740
741
  fiatCurrency: s.fiatCurrency,
741
- ...H ? { cryptoAmount: s.cryptoAmount } : { fiatAmount: s.fiatAmount },
742
+ ...W ? { cryptoAmount: s.cryptoAmount } : { fiatAmount: s.fiatAmount },
742
743
  cryptoCurrency: s.cryptoCurrency,
743
744
  network: s.network,
744
745
  walletAddress: s.walletAddress,
745
746
  paymentMethodId: s.paymentMethodId || void 0,
746
747
  email: s.email || void 0,
747
748
  orderType: s.flowType,
748
- ...we.current ? { metadata: { brand: we.current } } : {},
749
- ...E && Object.keys(E).length > 0 ? { partnerMetadata: E } : {}
750
- }), S({ type: "SET_STEP", step: "checkout" });
751
- } catch (R) {
752
- const F = R instanceof Error ? R.message : "Failed to create order";
753
- /wallet|address/i.test(F) ? S({ type: "SET_WALLET_ERROR", message: F.replace(/^Failed to create checkout intent:\s*/i, "") }) : S({ type: "SET_ERROR", message: F });
749
+ ...Le.current ? { metadata: { brand: Le.current } } : {},
750
+ ...O && Object.keys(O).length > 0 ? { partnerMetadata: O } : {}
751
+ }), L({ type: "SET_STEP", step: "checkout" });
752
+ } catch (D) {
753
+ const U = D instanceof Error ? D.message : "Failed to create order";
754
+ /wallet|address/i.test(U) ? L({ type: "SET_WALLET_ERROR", message: U.replace(/^Failed to create checkout intent:\s*/i, "") }) : L({ type: "SET_ERROR", message: U });
754
755
  }
755
- }, [s, Pe, H, E]), lt = O((y) => {
756
- S({ type: "SET_STEP", step: y });
757
- }, []), ze = O(() => {
758
- const y = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], A = y.indexOf(s.step);
759
- A > 0 && S({ type: "SET_STEP", step: y[A - 1] });
760
- }, [s.step, H]), he = V(() => {
761
- const y = H ? !!s.cryptoAmount : !!s.fiatAmount;
756
+ }, [s, Xe, W, O]), Ue = B((h) => {
757
+ L({ type: "SET_STEP", step: h });
758
+ }, []), lt = B(() => {
759
+ const h = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], v = h.indexOf(s.step);
760
+ v > 0 && L({ type: "SET_STEP", step: h[v - 1] });
761
+ }, [s.step, W]), Pe = j(() => {
762
+ const h = W ? !!s.cryptoAmount : !!s.fiatAmount;
762
763
  switch (s.step) {
763
764
  case "confirm":
764
- return !!(y && s.cryptoCurrency && s.network && s.walletAddress && !z);
765
+ return !!(h && s.cryptoCurrency && s.network && s.walletAddress && !ye);
765
766
  case "amount":
766
- return !!(y && s.cryptoCurrency && s.network && !z);
767
+ return !!(h && s.cryptoCurrency && s.network && !ye);
767
768
  case "quotes":
768
769
  return !!s.selectedQuote;
769
770
  case "wallet":
@@ -771,40 +772,40 @@ function Ia({
771
772
  default:
772
773
  return !1;
773
774
  }
774
- }, [s, z, H]), Ue = {
775
- apiConfig: Y,
776
- assetBaseUrl: n,
777
- config: g,
778
- configLoading: ce,
779
- configError: Ce,
775
+ }, [s, ye, W]), Ke = {
776
+ apiConfig: _,
777
+ assetBaseUrl: o,
778
+ config: b,
779
+ configLoading: ee,
780
+ configError: ue,
780
781
  state: s,
781
- dispatch: S,
782
- quotes: W,
783
- quotesLoading: ne,
784
- quotesError: Te,
785
- fetchQuotes: We,
786
- order: B,
787
- orderLoading: He,
788
- orderError: Le,
789
- createOrder: it,
790
- orderStatus: ie,
791
- orderStatusLoading: Ye,
792
- fieldLocks: C || null,
793
- defaultGateway: fe,
794
- availableFiats: I,
795
- availableCryptos: oe,
796
- availablePaymentMethods: de,
797
- selectionUnsupported: ue,
798
- quotesEmpty: Oe,
799
- bestUnavailableReason: Ze,
800
- amountError: z,
801
- goToStep: lt,
802
- goBack: ze,
803
- canProceed: he
782
+ dispatch: L,
783
+ quotes: $,
784
+ quotesLoading: be,
785
+ quotesError: Oe,
786
+ fetchQuotes: Se,
787
+ order: we,
788
+ orderLoading: $e,
789
+ orderError: Te,
790
+ createOrder: me,
791
+ orderStatus: P,
792
+ orderStatusLoading: Ze,
793
+ fieldLocks: y || null,
794
+ defaultGateway: oe,
795
+ availableFiats: se,
796
+ availableCryptos: Q,
797
+ availablePaymentMethods: te,
798
+ selectionUnsupported: de,
799
+ quotesEmpty: H,
800
+ bestUnavailableReason: He,
801
+ amountError: ye,
802
+ goToStep: Ue,
803
+ goBack: lt,
804
+ canProceed: Pe
804
805
  };
805
- return /* @__PURE__ */ e(zt.Provider, { value: Ue, children: Z });
806
+ return /* @__PURE__ */ e(zt.Provider, { value: Ke, children: ce });
806
807
  }
807
- function Ie() {
808
+ function Me() {
808
809
  const t = va(zt);
809
810
  if (!t)
810
811
  throw new Error("useRamp must be used within a RampProvider");
@@ -1165,9 +1166,9 @@ const Ve = {
1165
1166
  { code: "ZCHF", name: "Frankencoin", chains: ["ETH"], popular: !1 },
1166
1167
  { code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
1167
1168
  { code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
1168
- ], Ba = Object.fromEntries(
1169
+ ], Oa = Object.fromEntries(
1169
1170
  Jt.map((t) => [t.code, t.name])
1170
- ), Oa = {
1171
+ ), Ha = {
1171
1172
  AED: "ae",
1172
1173
  ALL: "al",
1173
1174
  ARS: "ar",
@@ -1205,15 +1206,15 @@ const Ve = {
1205
1206
  function qt(t, a = "") {
1206
1207
  return `${a}/crypto-icons/${t.toLowerCase()}.svg`;
1207
1208
  }
1208
- function Ha(t, a = "") {
1209
- const n = Oa[t] || "us";
1209
+ function Pa(t, a = "") {
1210
+ const n = Ha[t] || "us";
1210
1211
  return `${a}/flags/${n}.svg`;
1211
1212
  }
1212
- function nt(t) {
1213
+ function rt(t) {
1213
1214
  return Ve[t] || Ve[t.toLowerCase()] || Ve[t.toUpperCase()] || Ve[t.toUpperCase().replace(/-/g, "_")] || Ve[t.toLowerCase().replace(/-/g, "_")];
1214
1215
  }
1215
1216
  function ft(t, a = "") {
1216
- const n = nt(t);
1217
+ const n = rt(t);
1217
1218
  return n ? `${a}/crypto-icons/${n.icon}.svg` : `${a}/crypto-icons/${t.toLowerCase()}.svg`;
1218
1219
  }
1219
1220
  const _t = [
@@ -1245,7 +1246,7 @@ const _t = [
1245
1246
  XRP: { USD: 0.4081, EUR: 0.4432, GBP: 0.5153, JPY: 273e-5, CAD: 0.2948, AUD: 0.2614, BRL: 0.0707, CHF: 0.463, MXN: 0.01992, INR: 486e-5, ARS: 35e-5, ALL: 433e-5 },
1246
1247
  DOGE: { USD: 3.896, EUR: 4.232, GBP: 4.92, JPY: 0.02607, CAD: 2.815, AUD: 2.496, BRL: 0.675, CHF: 4.421, MXN: 0.1902, INR: 0.04641, ARS: 3345e-6, ALL: 0.04134 },
1247
1248
  ADA: { USD: 1.333, EUR: 1.448, GBP: 1.683, JPY: 892e-5, CAD: 0.963, AUD: 0.854, BRL: 0.2309, CHF: 1.512, MXN: 0.0651, INR: 0.01588, ARS: 1145e-6, ALL: 0.01414 }
1248
- }, Pa = /* @__PURE__ */ new Set([
1249
+ }, Ka = /* @__PURE__ */ new Set([
1249
1250
  "USDC",
1250
1251
  "USDT",
1251
1252
  "DAI",
@@ -1273,16 +1274,16 @@ const _t = [
1273
1274
  "ZCHF"
1274
1275
  ]);
1275
1276
  function ea(t) {
1276
- return Pa.has(t.toUpperCase());
1277
+ return Ka.has(t.toUpperCase());
1277
1278
  }
1278
- function Ln(t, a) {
1279
+ function Un(t, a) {
1279
1280
  var n, r;
1280
1281
  return ((n = jt[t]) == null ? void 0 : n[a]) ?? ((r = jt.USDC) == null ? void 0 : r[a]) ?? 1;
1281
1282
  }
1282
- function Ka(t) {
1283
+ function _a(t) {
1283
1284
  return parseFloat(t.replace(/,/g, "")) || 0;
1284
1285
  }
1285
- function ht(t) {
1286
+ function pt(t) {
1286
1287
  if (t === 0) return "0";
1287
1288
  if (t >= 1e3) return t.toLocaleString("en-US", { maximumFractionDigits: 2 });
1288
1289
  if (t >= 1) return t.toFixed(2);
@@ -1290,7 +1291,7 @@ function ht(t) {
1290
1291
  const a = t.toPrecision(4);
1291
1292
  return parseFloat(a).toString();
1292
1293
  }
1293
- const ye = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), Gt = 10, $t = 1e-4, _a = (() => {
1294
+ const he = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), Gt = 10, Wt = 1e-4, Va = (() => {
1294
1295
  const t = [];
1295
1296
  for (const a of Jt)
1296
1297
  for (const n of a.chains)
@@ -1304,23 +1305,23 @@ function ta({
1304
1305
  className: r = "",
1305
1306
  background: o
1306
1307
  }) {
1307
- const [d, u] = w(!1), [i, c] = w(!1), m = M(t);
1308
+ const [d, u] = A(!1), [l, c] = A(!1), m = M(t);
1308
1309
  m.current !== t && (m.current = t, u(!1), c(!1));
1309
- const h = O(() => u(!0), []), f = O(() => c(!0), []);
1310
- return /* @__PURE__ */ l(
1310
+ const p = B(() => u(!0), []), f = B(() => c(!0), []);
1311
+ return /* @__PURE__ */ i(
1311
1312
  "div",
1312
1313
  {
1313
1314
  className: `relative rounded-full shrink-0 ${r}`,
1314
1315
  style: { width: n, height: n, background: o },
1315
1316
  children: [
1316
- !d && !i && /* @__PURE__ */ e(
1317
+ !d && !l && /* @__PURE__ */ e(
1317
1318
  "div",
1318
1319
  {
1319
1320
  className: "absolute inset-0 rounded-full animate-pulse",
1320
1321
  style: { background: "var(--t-pill-bg, #333)" }
1321
1322
  }
1322
1323
  ),
1323
- i ? /* @__PURE__ */ e(
1324
+ l ? /* @__PURE__ */ e(
1324
1325
  "div",
1325
1326
  {
1326
1327
  className: "absolute inset-0 rounded-full flex items-center justify-center font-bold",
@@ -1338,7 +1339,7 @@ function ta({
1338
1339
  alt: a,
1339
1340
  width: n,
1340
1341
  height: n,
1341
- onLoad: h,
1342
+ onLoad: p,
1342
1343
  onError: f,
1343
1344
  className: `rounded-full ${d ? "opacity-100" : "opacity-0"}`,
1344
1345
  style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
@@ -1348,7 +1349,7 @@ function ta({
1348
1349
  }
1349
1350
  );
1350
1351
  }
1351
- function Wt({ ticker: t, size: a = 32, baseUrl: n = "" }) {
1352
+ function $t({ ticker: t, size: a = 32, baseUrl: n = "" }) {
1352
1353
  return /* @__PURE__ */ e(
1353
1354
  ta,
1354
1355
  {
@@ -1359,29 +1360,29 @@ function Wt({ ticker: t, size: a = 32, baseUrl: n = "" }) {
1359
1360
  }
1360
1361
  );
1361
1362
  }
1362
- function pt({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
1363
+ function ht({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
1363
1364
  return /* @__PURE__ */ e(
1364
1365
  ta,
1365
1366
  {
1366
- src: Ha(t, n),
1367
+ src: Pa(t, n),
1367
1368
  alt: t,
1368
1369
  size: a
1369
1370
  }
1370
1371
  );
1371
1372
  }
1372
1373
  function gt({ size: t = 32, color: a = "#888" }) {
1373
- return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 32 32", fill: "none", children: [
1374
+ return /* @__PURE__ */ i("svg", { width: t, height: t, viewBox: "0 0 32 32", fill: "none", children: [
1374
1375
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "16", fill: a }),
1375
1376
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "8", stroke: "white", strokeWidth: "1.5", fill: "none" })
1376
1377
  ] });
1377
1378
  }
1378
- function Va({ size: t = 24 }) {
1379
+ function ja({ size: t = 24 }) {
1379
1380
  return /* @__PURE__ */ e(
1380
1381
  "div",
1381
1382
  {
1382
1383
  className: "rounded-full flex items-center justify-center shrink-0",
1383
1384
  style: { width: t, height: t, background: "var(--t-card-icon-bg)" },
1384
- children: /* @__PURE__ */ l("svg", { width: t * 0.6, height: t * 0.58, viewBox: "0 0 25 24", fill: "none", children: [
1385
+ children: /* @__PURE__ */ i("svg", { width: t * 0.6, height: t * 0.58, viewBox: "0 0 25 24", fill: "none", children: [
1385
1386
  /* @__PURE__ */ e("path", { d: "M23.292 7.5H1.70801L12.5 0.592773L23.292 7.5Z", stroke: "var(--t-card-icon-stroke)", strokeWidth: "1" }),
1386
1387
  /* @__PURE__ */ e("rect", { x: "3", y: "10", width: "1.5", height: "11", fill: "var(--t-card-icon-stroke)" }),
1387
1388
  /* @__PURE__ */ e("rect", { x: "9", y: "10", width: "1.5", height: "11", fill: "var(--t-card-icon-stroke)" }),
@@ -1392,7 +1393,7 @@ function Va({ size: t = 24 }) {
1392
1393
  }
1393
1394
  );
1394
1395
  }
1395
- function ja({ size: t = 32 }) {
1396
+ function Ga({ size: t = 32 }) {
1396
1397
  return /* @__PURE__ */ e(
1397
1398
  "div",
1398
1399
  {
@@ -1402,7 +1403,7 @@ function ja({ size: t = 32 }) {
1402
1403
  }
1403
1404
  );
1404
1405
  }
1405
- function Ga({ size: t = 32 }) {
1406
+ function Wa({ size: t = 32 }) {
1406
1407
  return /* @__PURE__ */ e(
1407
1408
  "div",
1408
1409
  {
@@ -1424,7 +1425,7 @@ function $a({ size: t = 32 }) {
1424
1425
  {
1425
1426
  className: "flex items-center justify-center shrink-0",
1426
1427
  style: { width: t, height: t, background: "#3C4043", borderRadius: t * 0.2 },
1427
- children: /* @__PURE__ */ l("svg", { width: t * 0.72, height: t * 0.296, viewBox: "0 0 51 21", fill: "none", children: [
1428
+ children: /* @__PURE__ */ i("svg", { width: t * 0.72, height: t * 0.296, viewBox: "0 0 51 21", fill: "none", children: [
1428
1429
  /* @__PURE__ */ e("path", { d: "M50.9156 5.87122L44.6406 20.2837H42.6992L45.0289 15.2416L40.9009 5.87122H42.9451L45.929 13.0573H45.9689L48.8714 5.87122H50.9156Z", fill: "white" }),
1429
1430
  /* @__PURE__ */ e("path", { d: "M39.3906 6.65832C38.5866 5.91563 37.4895 5.54547 36.0995 5.54547C34.314 5.54547 32.9657 6.19816 32.0513 7.50532L33.7084 8.54664C34.3211 7.66089 35.1512 7.21951 36.2011 7.21951C36.8967 7.21951 37.5008 7.44661 38.0194 7.9023C38.538 8.35948 38.7964 8.91352 38.7964 9.5665V9.99507C38.0751 9.58796 37.1536 9.38381 36.0366 9.38381C34.7297 9.38381 33.6839 9.68959 32.8998 10.3023C32.1172 10.9151 31.7256 11.738 31.7256 12.7706C31.7256 13.8033 32.0969 14.5675 32.8396 15.2216C33.5808 15.8758 34.5065 16.2016 35.6092 16.2016C36.9033 16.2016 37.9389 15.6302 38.7147 14.4876H38.7976V15.8761H40.5944V9.70955C40.5944 8.4167 40.1944 7.39982 39.3903 6.65862L39.3906 6.65832ZM37.8665 13.6501C37.2451 14.2343 36.5424 14.5272 35.7511 14.5272C35.1926 14.5272 34.7068 14.3645 34.2913 14.0387C33.8741 13.7103 33.6673 13.3032 33.6673 12.8132C33.6673 12.2675 33.923 11.8134 34.4344 11.4462C34.9443 11.079 35.5815 10.8948 36.3442 10.8948C37.3926 10.8948 38.211 11.1249 38.7967 11.5889C38.7967 12.3775 38.4867 13.0645 37.8668 13.6501H37.8665Z", fill: "white" }),
1430
1431
  /* @__PURE__ */ e("path", { d: "M30.4166 2.52282C29.5296 1.67999 28.4552 1.25739 27.1883 1.25739H22.2017V15.8758H24.0813V9.95362H27.188C28.4678 9.95362 29.5448 9.53936 30.4163 8.70815C31.3175 7.87962 31.7661 6.84397 31.7661 5.60565C31.7661 4.36733 31.3175 3.36744 30.4163 2.52312L30.4166 2.52282ZM29.0895 7.40248C28.598 7.90525 27.9781 8.15798 27.2297 8.15798H24.0816V3.05272H27.2297C27.9781 3.05272 28.5983 3.31141 29.0895 3.82849C29.5937 4.33276 29.845 4.92554 29.845 5.60535C29.845 6.28516 29.5934 6.8994 29.0895 7.40218V7.40248Z", fill: "white" }),
@@ -1433,7 +1434,7 @@ function $a({ size: t = 32 }) {
1433
1434
  }
1434
1435
  );
1435
1436
  }
1436
- function Wa({ size: t = 32 }) {
1437
+ function Xa({ size: t = 32 }) {
1437
1438
  return /* @__PURE__ */ e(
1438
1439
  "div",
1439
1440
  {
@@ -1443,13 +1444,13 @@ function Wa({ size: t = 32 }) {
1443
1444
  }
1444
1445
  );
1445
1446
  }
1446
- function Xa({ size: t = 32 }) {
1447
+ function Ya({ size: t = 32 }) {
1447
1448
  return /* @__PURE__ */ e(
1448
1449
  "div",
1449
1450
  {
1450
1451
  className: "flex items-center justify-center shrink-0",
1451
1452
  style: { width: t, height: t, background: "#1A1F71", borderRadius: t * 0.2 },
1452
- children: /* @__PURE__ */ l("svg", { width: t * 0.72, height: t * 0.234, viewBox: "0 0 43 14", fill: "none", children: [
1453
+ children: /* @__PURE__ */ i("svg", { width: t * 0.72, height: t * 0.234, viewBox: "0 0 43 14", fill: "none", children: [
1453
1454
  /* @__PURE__ */ e("path", { d: "M18.3629 13.5165H14.9302L17.0772 0.240662H20.5097L18.3629 13.5165Z", fill: "white" }),
1454
1455
  /* @__PURE__ */ e("path", { d: "M30.806 0.565203C30.1289 0.296586 29.055 0 27.7271 0C24.3372 0 21.95 1.80767 21.9354 4.3921C21.9072 6.29889 23.6445 7.35796 24.9439 7.99375C26.2719 8.64342 26.7234 9.06747 26.7234 9.64656C26.7099 10.5359 25.6502 10.9459 24.6619 10.9459C23.2914 10.9459 22.5571 10.7345 21.4412 10.2397L20.9891 10.0276L20.5088 13.0077C21.3139 13.3745 22.7972 13.7 24.3372 13.7143C27.939 13.7143 30.2839 11.9346 30.3117 9.18047C30.3254 7.66919 29.4081 6.51119 27.4303 5.56493C26.2297 4.95749 25.4944 4.54791 25.4944 3.92639C25.5085 3.36137 26.1163 2.78265 27.4716 2.78265C28.5876 2.75431 29.4075 3.02255 30.0286 3.29098L30.3391 3.43195L30.806 0.565203Z", fill: "white" }),
1455
1456
  /* @__PURE__ */ e("path", { d: "M35.3681 8.81332C35.6508 8.05064 36.7386 5.09886 36.7386 5.09886C36.7243 5.1272 37.0207 4.3221 37.1902 3.82785L37.4301 4.97178C37.4301 4.97178 38.0802 8.14956 38.2213 8.81332C37.6848 8.81332 36.0461 8.81332 35.3681 8.81332ZM39.6053 0.240662H36.9501C36.1313 0.240662 35.5092 0.480559 35.156 1.34216L30.0571 13.5163H33.659C33.659 13.5163 34.2519 11.8777 34.3794 11.5248C34.7745 11.5248 38.2784 11.5248 38.7867 11.5248C38.8853 11.9909 39.1963 13.5163 39.1963 13.5163H42.3747L39.6053 0.240662Z", fill: "white" }),
@@ -1459,14 +1460,14 @@ function Xa({ size: t = 32 }) {
1459
1460
  }
1460
1461
  );
1461
1462
  }
1462
- function Ya({ size: t = 32 }) {
1463
+ function Za({ size: t = 32 }) {
1463
1464
  const a = t * 0.8;
1464
1465
  return /* @__PURE__ */ e(
1465
1466
  "div",
1466
1467
  {
1467
1468
  className: "flex items-center justify-center shrink-0",
1468
1469
  style: { width: t, height: t },
1469
- children: /* @__PURE__ */ l("svg", { width: a, height: a * 0.625, viewBox: "0 0 48 30", fill: "none", children: [
1470
+ children: /* @__PURE__ */ i("svg", { width: a, height: a * 0.625, viewBox: "0 0 48 30", fill: "none", children: [
1470
1471
  /* @__PURE__ */ e("circle", { cx: "18", cy: "15", r: "14", fill: "#EB001B" }),
1471
1472
  /* @__PURE__ */ e("circle", { cx: "30", cy: "15", r: "14", fill: "#F79E1B" }),
1472
1473
  /* @__PURE__ */ e("path", { d: "M24 2.35A14 14 0 0 1 24 27.65A14 14 0 0 1 24 2.35Z", fill: "#FF5F00" })
@@ -1474,9 +1475,9 @@ function Ya({ size: t = 32 }) {
1474
1475
  }
1475
1476
  );
1476
1477
  }
1477
- function Za({ size: t = 32 }) {
1478
+ function Qa({ size: t = 32 }) {
1478
1479
  const a = t * 0.56, n = a * 0.65, r = Math.max(2, a * 0.1), o = a * 0.2;
1479
- return /* @__PURE__ */ l("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
1480
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
1480
1481
  /* @__PURE__ */ e(
1481
1482
  "div",
1482
1483
  {
@@ -1491,7 +1492,7 @@ function Za({ size: t = 32 }) {
1491
1492
  alignItems: "center",
1492
1493
  justifyContent: "center"
1493
1494
  },
1494
- children: /* @__PURE__ */ l("svg", { width: a * 0.7, height: n * 0.35, viewBox: "0 0 43 14", fill: "none", children: [
1495
+ children: /* @__PURE__ */ i("svg", { width: a * 0.7, height: n * 0.35, viewBox: "0 0 43 14", fill: "none", children: [
1495
1496
  /* @__PURE__ */ e("path", { d: "M18.3629 13.5165H14.9302L17.0772 0.240662H20.5097L18.3629 13.5165Z", fill: "white" }),
1496
1497
  /* @__PURE__ */ e("path", { d: "M12.0629 0.240662L8.70119 9.29349L8.33383 7.45747C7.71232 5.33894 5.76311 3.03721 3.58789 1.89272L6.66713 13.5024H10.2971L15.6927 0.240662H12.0629Z", fill: "white" }),
1497
1498
  /* @__PURE__ */ e("path", { d: "M5.57939 0.240662H0.0565013L0 0.508903C4.3082 1.61059 7.16143 4.26616 8.3337 7.45803L7.13309 1.35661C6.93542 0.508715 6.32798 0.268631 5.57939 0.240662Z", fill: "white" }),
@@ -1516,7 +1517,7 @@ function Za({ size: t = 32 }) {
1516
1517
  justifyContent: "center",
1517
1518
  overflow: "hidden"
1518
1519
  },
1519
- children: /* @__PURE__ */ l("svg", { width: n * 0.85, height: n * 0.6, viewBox: "0 0 48 30", fill: "none", children: [
1520
+ children: /* @__PURE__ */ i("svg", { width: n * 0.85, height: n * 0.6, viewBox: "0 0 48 30", fill: "none", children: [
1520
1521
  /* @__PURE__ */ e("circle", { cx: "18", cy: "15", r: "14", fill: "#EB001B" }),
1521
1522
  /* @__PURE__ */ e("circle", { cx: "30", cy: "15", r: "14", fill: "#F79E1B" }),
1522
1523
  /* @__PURE__ */ e("path", { d: "M24 2.35A14 14 0 0 1 24 27.65A14 14 0 0 1 24 2.35Z", fill: "#FF5F00" })
@@ -1525,7 +1526,7 @@ function Za({ size: t = 32 }) {
1525
1526
  )
1526
1527
  ] });
1527
1528
  }
1528
- function Un({ size: t = 18 }) {
1529
+ function Fn({ size: t = 18 }) {
1529
1530
  return /* @__PURE__ */ e(
1530
1531
  "div",
1531
1532
  {
@@ -1541,7 +1542,7 @@ function Ge() {
1541
1542
  function Xt() {
1542
1543
  return /* @__PURE__ */ e("svg", { width: "8", height: "14", viewBox: "0 0 8 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M1 1L7 7L1 13", stroke: "var(--t-icon-stroke)", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
1543
1544
  }
1544
- function Qa({ onClick: t }) {
1545
+ function za({ onClick: t }) {
1545
1546
  return /* @__PURE__ */ e("button", { onClick: t, className: "hover:opacity-70 transition-opacity", children: /* @__PURE__ */ e("svg", { width: "24", height: "16", viewBox: "0 0 24 16", fill: "none", children: /* @__PURE__ */ e(
1546
1547
  "path",
1547
1548
  {
@@ -1550,42 +1551,42 @@ function Qa({ onClick: t }) {
1550
1551
  }
1551
1552
  ) }) });
1552
1553
  }
1553
- function za({ size: t = 40 }) {
1554
+ function Ja({ size: t = 40 }) {
1554
1555
  return /* @__PURE__ */ e(
1555
1556
  "div",
1556
1557
  {
1557
1558
  className: "rounded-full flex items-center justify-center shrink-0",
1558
1559
  style: { width: t, height: t, background: "var(--t-surface)" },
1559
- children: /* @__PURE__ */ l("svg", { width: t * 0.5, height: t * 0.5, viewBox: "0 0 20 20", fill: "none", children: [
1560
+ children: /* @__PURE__ */ i("svg", { width: t * 0.5, height: t * 0.5, viewBox: "0 0 20 20", fill: "none", children: [
1560
1561
  /* @__PURE__ */ e("circle", { cx: "10", cy: "10", r: "7.5", stroke: "var(--t-text)", strokeWidth: "1.5" }),
1561
1562
  /* @__PURE__ */ e("path", { d: "M10 2.5A7.5 7.5 0 0 1 10 17.5", fill: "var(--t-text)" })
1562
1563
  ] })
1563
1564
  }
1564
1565
  );
1565
1566
  }
1566
- function Ja(t, a = 32) {
1567
+ function qa(t, a = 32) {
1567
1568
  switch (t) {
1568
1569
  case "revolut":
1569
- return /* @__PURE__ */ e(ja, { size: a });
1570
- case "applepay":
1571
1570
  return /* @__PURE__ */ e(Ga, { size: a });
1571
+ case "applepay":
1572
+ return /* @__PURE__ */ e(Wa, { size: a });
1572
1573
  case "card":
1573
- return /* @__PURE__ */ e(Za, { size: a });
1574
+ return /* @__PURE__ */ e(Qa, { size: a });
1574
1575
  case "googlepay":
1575
1576
  return /* @__PURE__ */ e($a, { size: a });
1576
1577
  case "paypal":
1577
- return /* @__PURE__ */ e(Wa, { size: a });
1578
+ return /* @__PURE__ */ e(Xa, { size: a });
1578
1579
  case "bank":
1579
- return /* @__PURE__ */ e(Va, { size: a });
1580
+ return /* @__PURE__ */ e(ja, { size: a });
1580
1581
  case "visa":
1581
- return /* @__PURE__ */ e(Xa, { size: a });
1582
- case "mastercard":
1583
1582
  return /* @__PURE__ */ e(Ya, { size: a });
1583
+ case "mastercard":
1584
+ return /* @__PURE__ */ e(Za, { size: a });
1584
1585
  default:
1585
1586
  return /* @__PURE__ */ e(gt, { size: a });
1586
1587
  }
1587
1588
  }
1588
- const qa = {
1589
+ const en = {
1589
1590
  "debit-credit-card": "card",
1590
1591
  "bank-transfer": "bank",
1591
1592
  "ach-bank-transfer": "bank",
@@ -1596,7 +1597,7 @@ const qa = {
1596
1597
  "google-pay": "googlepay",
1597
1598
  paypal: "paypal",
1598
1599
  revolut: "revolut"
1599
- }, en = {
1600
+ }, tn = {
1600
1601
  "debit-credit-card": "Card",
1601
1602
  "bank-transfer": "Bank Transfer",
1602
1603
  "ach-bank-transfer": "ACH",
@@ -1607,19 +1608,19 @@ const qa = {
1607
1608
  revolut: "Revolut"
1608
1609
  };
1609
1610
  function aa(t, a) {
1610
- return en[t] || a;
1611
+ return tn[t] || a;
1611
1612
  }
1612
1613
  function na(t, a, n = 24) {
1613
- const r = qa[t];
1614
- return r ? Ja(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(gt, { size: n });
1614
+ const r = en[t];
1615
+ return r ? qa(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(gt, { size: n });
1615
1616
  }
1616
- function tn({
1617
+ function an({
1617
1618
  methods: t,
1618
1619
  selectedId: a,
1619
1620
  onOpenModal: n,
1620
1621
  fiatCurrency: r
1621
1622
  }) {
1622
- const o = V(
1623
+ const o = j(
1623
1624
  () => t.filter((u) => u.supportedFiats.includes(r)),
1624
1625
  [t, r]
1625
1626
  ), d = o.find((u) => u.id === a) || o[0];
@@ -1632,12 +1633,12 @@ function tn({
1632
1633
  borderBottomLeftRadius: 5,
1633
1634
  borderBottomRightRadius: 5
1634
1635
  },
1635
- children: /* @__PURE__ */ l("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: [
1636
+ children: /* @__PURE__ */ i("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: [
1636
1637
  "No payment methods available for ",
1637
1638
  r
1638
1639
  ] })
1639
1640
  }
1640
- ) : /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ l(
1641
+ ) : /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ i(
1641
1642
  "div",
1642
1643
  {
1643
1644
  role: "button",
@@ -1656,7 +1657,7 @@ function tn({
1656
1657
  },
1657
1658
  children: [
1658
1659
  /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Payment method" }),
1659
- /* @__PURE__ */ l("span", { className: "flex items-center gap-2", children: [
1660
+ /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
1660
1661
  /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: d && na(d.id, d.icon, 20) }),
1661
1662
  /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: d ? aa(d.id, d.name) : "Select" }),
1662
1663
  /* @__PURE__ */ e(Ge, {})
@@ -1665,29 +1666,29 @@ function tn({
1665
1666
  }
1666
1667
  ) });
1667
1668
  }
1668
- function an({
1669
+ function nn({
1669
1670
  className: t = "",
1670
1671
  autoRedirect: a = !1,
1671
1672
  redirectDelay: n = 3e3
1672
1673
  }) {
1673
- var p;
1674
- const { order: r, orderStatus: o, goToStep: d, goBack: u } = Ie(), [i, c] = w(!1), [m, h] = w(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1675
- if (X(() => {
1674
+ var C;
1675
+ const { order: r, orderStatus: o, goToStep: d, goBack: u } = Me(), [l, c] = A(!1), [m, p] = A(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1676
+ if (Z(() => {
1676
1677
  if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !f) {
1677
- h(Math.ceil(n / 1e3));
1678
- const v = setTimeout(() => {
1678
+ p(Math.ceil(n / 1e3));
1679
+ const S = setTimeout(() => {
1679
1680
  window.location.href = r.checkout.url;
1680
- }, n), C = setInterval(() => {
1681
- h((E) => E && E > 1 ? E - 1 : null);
1681
+ }, n), k = setInterval(() => {
1682
+ p((w) => w && w > 1 ? w - 1 : null);
1682
1683
  }, 1e3);
1683
1684
  return () => {
1684
- clearTimeout(v), clearInterval(C);
1685
+ clearTimeout(S), clearInterval(k);
1685
1686
  };
1686
1687
  }
1687
- }, [r, a, n, f]), X(() => {
1688
+ }, [r, a, n, f]), Z(() => {
1688
1689
  o && (o.status === "completed" ? d("complete") : ["failed", "cancelled", "expired"].includes(o.status) && d("error"));
1689
1690
  }, [o == null ? void 0 : o.status, d]), !r)
1690
- return /* @__PURE__ */ l(
1691
+ return /* @__PURE__ */ i(
1691
1692
  "div",
1692
1693
  {
1693
1694
  className: `flex flex-col items-center justify-center p-8 ${t}`,
@@ -1714,7 +1715,7 @@ function an({
1714
1715
  }
1715
1716
  );
1716
1717
  if (f)
1717
- return /* @__PURE__ */ l(
1718
+ return /* @__PURE__ */ i(
1718
1719
  "div",
1719
1720
  {
1720
1721
  className: `flex flex-col items-center justify-center p-8 text-center ${t}`,
@@ -1740,9 +1741,9 @@ function an({
1740
1741
  }
1741
1742
  );
1742
1743
  if (r.checkout.method === "iframe") {
1743
- const v = r.checkout.url, C = ((p = r.checkout.allowedFeatures) == null ? void 0 : p.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1744
+ const S = r.checkout.url, k = ((C = r.checkout.allowedFeatures) == null ? void 0 : C.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1744
1745
  return Pt(
1745
- /* @__PURE__ */ l(
1746
+ /* @__PURE__ */ i(
1746
1747
  "div",
1747
1748
  {
1748
1749
  style: {
@@ -1766,7 +1767,7 @@ function an({
1766
1767
  background: "#111",
1767
1768
  flexShrink: 0
1768
1769
  },
1769
- children: /* @__PURE__ */ l(
1770
+ children: /* @__PURE__ */ i(
1770
1771
  "button",
1771
1772
  {
1772
1773
  onClick: u,
@@ -1791,8 +1792,8 @@ function an({
1791
1792
  )
1792
1793
  }
1793
1794
  ),
1794
- /* @__PURE__ */ l("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1795
- !i && /* @__PURE__ */ l(
1795
+ /* @__PURE__ */ i("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1796
+ !l && /* @__PURE__ */ i(
1796
1797
  "div",
1797
1798
  {
1798
1799
  style: {
@@ -1812,14 +1813,14 @@ function an({
1812
1813
  /* @__PURE__ */ e(
1813
1814
  "iframe",
1814
1815
  {
1815
- src: v,
1816
+ src: S,
1816
1817
  style: {
1817
- display: i ? "block" : "none",
1818
+ display: l ? "block" : "none",
1818
1819
  width: "100%",
1819
1820
  height: "100%",
1820
1821
  border: "none"
1821
1822
  },
1822
- allow: C,
1823
+ allow: k,
1823
1824
  onLoad: () => c(!0),
1824
1825
  title: "Provider Checkout"
1825
1826
  }
@@ -1832,7 +1833,7 @@ function an({
1832
1833
  );
1833
1834
  }
1834
1835
  if (r.checkout.method === "redirect")
1835
- return /* @__PURE__ */ l(
1836
+ return /* @__PURE__ */ i(
1836
1837
  "div",
1837
1838
  {
1838
1839
  className: `flex flex-col items-center justify-center p-8 text-center ${t}`,
@@ -1840,17 +1841,17 @@ function an({
1840
1841
  children: [
1841
1842
  /* @__PURE__ */ e("div", { className: "text-[48px] mb-4", children: "🔗" }),
1842
1843
  /* @__PURE__ */ e("h3", { className: "text-[18px] font-semibold mb-2", children: "Complete Payment" }),
1843
- /* @__PURE__ */ l("p", { className: "text-[14px] mb-4", style: { color: "var(--t-text-secondary)" }, children: [
1844
+ /* @__PURE__ */ i("p", { className: "text-[14px] mb-4", style: { color: "var(--t-text-secondary)" }, children: [
1844
1845
  "You'll be redirected to ",
1845
1846
  r.gateway,
1846
1847
  " to complete your payment."
1847
1848
  ] }),
1848
- m !== null && /* @__PURE__ */ l("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: [
1849
+ m !== null && /* @__PURE__ */ i("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: [
1849
1850
  "Redirecting in ",
1850
1851
  m,
1851
1852
  "..."
1852
1853
  ] }),
1853
- /* @__PURE__ */ l(
1854
+ /* @__PURE__ */ i(
1854
1855
  "a",
1855
1856
  {
1856
1857
  href: r.checkout.url,
@@ -1888,9 +1889,9 @@ function an({
1888
1889
  }
1889
1890
  );
1890
1891
  if (r.checkout.method === "widget" && r.widgetConfig) {
1891
- const v = nn(r.checkout.url, r.widgetConfig);
1892
+ const S = rn(r.checkout.url, r.widgetConfig);
1892
1893
  return Pt(
1893
- /* @__PURE__ */ l(
1894
+ /* @__PURE__ */ i(
1894
1895
  "div",
1895
1896
  {
1896
1897
  style: {
@@ -1914,7 +1915,7 @@ function an({
1914
1915
  background: "#111",
1915
1916
  flexShrink: 0
1916
1917
  },
1917
- children: /* @__PURE__ */ l(
1918
+ children: /* @__PURE__ */ i(
1918
1919
  "button",
1919
1920
  {
1920
1921
  onClick: u,
@@ -1939,8 +1940,8 @@ function an({
1939
1940
  )
1940
1941
  }
1941
1942
  ),
1942
- /* @__PURE__ */ l("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1943
- !i && /* @__PURE__ */ l(
1943
+ /* @__PURE__ */ i("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1944
+ !l && /* @__PURE__ */ i(
1944
1945
  "div",
1945
1946
  {
1946
1947
  style: {
@@ -1960,9 +1961,9 @@ function an({
1960
1961
  /* @__PURE__ */ e(
1961
1962
  "iframe",
1962
1963
  {
1963
- src: v,
1964
+ src: S,
1964
1965
  style: {
1965
- display: i ? "block" : "none",
1966
+ display: l ? "block" : "none",
1966
1967
  width: "100%",
1967
1968
  height: "100%",
1968
1969
  border: "none"
@@ -1979,7 +1980,7 @@ function an({
1979
1980
  document.body
1980
1981
  );
1981
1982
  }
1982
- return /* @__PURE__ */ l(
1983
+ return /* @__PURE__ */ i(
1983
1984
  "div",
1984
1985
  {
1985
1986
  className: `flex flex-col items-center justify-center p-8 ${t}`,
@@ -2006,15 +2007,15 @@ function an({
2006
2007
  }
2007
2008
  );
2008
2009
  }
2009
- function nn(t, a) {
2010
+ function rn(t, a) {
2010
2011
  const n = new URL("/en/partner/widget", t);
2011
2012
  for (const [r, o] of Object.entries(a))
2012
2013
  o != null && o !== "" && n.searchParams.set(r, String(o));
2013
2014
  return n.toString();
2014
2015
  }
2015
- function rn({ className: t = "" }) {
2016
- const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Ie();
2017
- X(() => {
2016
+ function on({ className: t = "" }) {
2017
+ const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Me();
2018
+ Z(() => {
2018
2019
  a && (a.status === "completed" ? r("complete") : ["failed", "cancelled", "expired", "refunded"].includes(a.status) && r("error"));
2019
2020
  }, [a == null ? void 0 : a.status, r]);
2020
2021
  const o = () => {
@@ -2028,30 +2029,30 @@ function rn({ className: t = "" }) {
2028
2029
  return "Processing...";
2029
2030
  }
2030
2031
  };
2031
- return /* @__PURE__ */ l("div", { className: `flex flex-col items-center justify-center px-8 py-12 text-center ${t}`, children: [
2032
+ return /* @__PURE__ */ i("div", { className: `flex flex-col items-center justify-center px-8 py-12 text-center ${t}`, children: [
2032
2033
  /* @__PURE__ */ e("div", { className: "mb-6", children: /* @__PURE__ */ e("div", { className: "nramp-spinner-large nramp-spinner" }) }),
2033
2034
  /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-3", style: { color: "var(--t-text)" }, children: o() }),
2034
2035
  n && /* @__PURE__ */ e("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: "Checking status..." }),
2035
- a && /* @__PURE__ */ l("div", { className: "w-full mt-6 text-left", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2036
- /* @__PURE__ */ e(Me, { label: "Order ID", value: a.orderId, mono: !0 }),
2037
- /* @__PURE__ */ e(Me, { label: "Provider", value: a.gateway }),
2036
+ a && /* @__PURE__ */ i("div", { className: "w-full mt-6 text-left", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2037
+ /* @__PURE__ */ e(Ie, { label: "Order ID", value: a.orderId, mono: !0 }),
2038
+ /* @__PURE__ */ e(Ie, { label: "Provider", value: a.gateway }),
2038
2039
  /* @__PURE__ */ e(
2039
- Me,
2040
+ Ie,
2040
2041
  {
2041
2042
  label: "Amount",
2042
2043
  value: `${a.fiatAmount} ${a.fiatCurrency}`
2043
2044
  }
2044
2045
  ),
2045
2046
  /* @__PURE__ */ e(
2046
- Me,
2047
+ Ie,
2047
2048
  {
2048
2049
  label: "Receiving",
2049
2050
  value: `${a.cryptoAmount || "..."} ${a.cryptoCurrency}`
2050
2051
  }
2051
2052
  ),
2052
- /* @__PURE__ */ e(Me, { label: "Network", value: a.network }),
2053
+ /* @__PURE__ */ e(Ie, { label: "Network", value: a.network }),
2053
2054
  /* @__PURE__ */ e(
2054
- Me,
2055
+ Ie,
2055
2056
  {
2056
2057
  label: "To Address",
2057
2058
  value: `${a.walletAddress.slice(0, 10)}...${a.walletAddress.slice(-8)}`,
@@ -2059,14 +2060,14 @@ function rn({ className: t = "" }) {
2059
2060
  }
2060
2061
  )
2061
2062
  ] }),
2062
- /* @__PURE__ */ l("div", { className: "mt-6", children: [
2063
+ /* @__PURE__ */ i("div", { className: "mt-6", children: [
2063
2064
  /* @__PURE__ */ e("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "This usually takes a few minutes." }),
2064
2065
  /* @__PURE__ */ e("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: "You can safely close this page - we'll send you an email when complete." })
2065
2066
  ] })
2066
2067
  ] });
2067
2068
  }
2068
- function Me({ label: t, value: a, mono: n }) {
2069
- return /* @__PURE__ */ l(
2069
+ function Ie({ label: t, value: a, mono: n }) {
2070
+ return /* @__PURE__ */ i(
2070
2071
  "div",
2071
2072
  {
2072
2073
  className: "flex justify-between items-center py-2",
@@ -2085,13 +2086,13 @@ function Me({ label: t, value: a, mono: n }) {
2085
2086
  }
2086
2087
  );
2087
2088
  }
2088
- function on({
2089
+ function ln({
2089
2090
  className: t = "",
2090
2091
  explorerUrl: a,
2091
2092
  onDone: n,
2092
2093
  doneButtonText: r = "Done"
2093
2094
  }) {
2094
- const { orderStatus: o, state: d, dispatch: u } = Ie(), i = d.flowType === "sell", c = () => {
2095
+ const { orderStatus: o, state: d, dispatch: u } = Me(), l = d.flowType === "sell", c = () => {
2095
2096
  if (!(o != null && o.transactionHash)) return null;
2096
2097
  if (!a) {
2097
2098
  const f = {
@@ -2110,8 +2111,8 @@ function on({
2110
2111
  return a.replace("{txHash}", o.transactionHash);
2111
2112
  }, m = () => {
2112
2113
  n ? n() : u({ type: "RESET" });
2113
- }, h = c();
2114
- return /* @__PURE__ */ l("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
2114
+ }, p = c();
2115
+ return /* @__PURE__ */ i("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
2115
2116
  /* @__PURE__ */ e(
2116
2117
  "div",
2117
2118
  {
@@ -2120,27 +2121,27 @@ function on({
2120
2121
  children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" }) })
2121
2122
  }
2122
2123
  ),
2123
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: i ? "Sale Complete!" : "Purchase Complete!" }),
2124
- /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: i ? `Your ${(o == null ? void 0 : o.fiatCurrency) || d.fiatCurrency} payout is being processed.` : `Your ${(o == null ? void 0 : o.cryptoCurrency) || d.cryptoCurrency} has been sent to your wallet.` }),
2125
- o && /* @__PURE__ */ l("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2124
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: l ? "Sale Complete!" : "Purchase Complete!" }),
2125
+ /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: l ? `Your ${(o == null ? void 0 : o.fiatCurrency) || d.fiatCurrency} payout is being processed.` : `Your ${(o == null ? void 0 : o.cryptoCurrency) || d.cryptoCurrency} has been sent to your wallet.` }),
2126
+ o && /* @__PURE__ */ i("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2126
2127
  /* @__PURE__ */ e(
2127
- Se,
2128
+ ge,
2128
2129
  {
2129
- label: i ? "Amount Sold" : "Amount Received",
2130
+ label: l ? "Amount Sold" : "Amount Received",
2130
2131
  value: `${o.cryptoAmount} ${o.cryptoCurrency}`,
2131
2132
  highlight: !0
2132
2133
  }
2133
2134
  ),
2134
2135
  /* @__PURE__ */ e(
2135
- Se,
2136
+ ge,
2136
2137
  {
2137
- label: i ? "Payout Amount" : "Amount Paid",
2138
+ label: l ? "Payout Amount" : "Amount Paid",
2138
2139
  value: `${o.fiatAmount} ${o.fiatCurrency}`
2139
2140
  }
2140
2141
  ),
2141
- /* @__PURE__ */ e(Se, { label: "Network", value: o.network }),
2142
+ /* @__PURE__ */ e(ge, { label: "Network", value: o.network }),
2142
2143
  /* @__PURE__ */ e(
2143
- Se,
2144
+ ge,
2144
2145
  {
2145
2146
  label: "Wallet",
2146
2147
  value: `${o.walletAddress.slice(0, 10)}...${o.walletAddress.slice(-8)}`,
@@ -2148,28 +2149,28 @@ function on({
2148
2149
  }
2149
2150
  ),
2150
2151
  o.transactionHash && /* @__PURE__ */ e(
2151
- Se,
2152
+ ge,
2152
2153
  {
2153
2154
  label: "Transaction",
2154
2155
  value: `${o.transactionHash.slice(0, 10)}...${o.transactionHash.slice(-8)}`,
2155
2156
  mono: !0
2156
2157
  }
2157
2158
  ),
2158
- /* @__PURE__ */ e(Se, { label: "Provider", value: o.gateway }),
2159
- /* @__PURE__ */ e(Se, { label: "Order ID", value: o.orderId, mono: !0 }),
2159
+ /* @__PURE__ */ e(ge, { label: "Provider", value: o.gateway }),
2160
+ /* @__PURE__ */ e(ge, { label: "Order ID", value: o.orderId, mono: !0 }),
2160
2161
  o.completedAt && /* @__PURE__ */ e(
2161
- Se,
2162
+ ge,
2162
2163
  {
2163
2164
  label: "Completed",
2164
2165
  value: new Date(o.completedAt).toLocaleString()
2165
2166
  }
2166
2167
  )
2167
2168
  ] }),
2168
- /* @__PURE__ */ l("div", { className: "w-full flex flex-col gap-2", children: [
2169
- h && /* @__PURE__ */ e(
2169
+ /* @__PURE__ */ i("div", { className: "w-full flex flex-col gap-2", children: [
2170
+ p && /* @__PURE__ */ e(
2170
2171
  "a",
2171
2172
  {
2172
- href: h,
2173
+ href: p,
2173
2174
  target: "_blank",
2174
2175
  rel: "noopener noreferrer",
2175
2176
  className: "w-full font-semibold text-[14px] flex items-center justify-center transition-all",
@@ -2189,8 +2190,8 @@ function on({
2189
2190
  ] })
2190
2191
  ] });
2191
2192
  }
2192
- function Se({ label: t, value: a, mono: n, highlight: r }) {
2193
- return /* @__PURE__ */ l(
2193
+ function ge({ label: t, value: a, mono: n, highlight: r }) {
2194
+ return /* @__PURE__ */ i(
2194
2195
  "div",
2195
2196
  {
2196
2197
  className: "flex justify-between items-center py-2",
@@ -2209,14 +2210,16 @@ function Se({ label: t, value: a, mono: n, highlight: r }) {
2209
2210
  }
2210
2211
  );
2211
2212
  }
2212
- function ln({
2213
+ function cn({
2213
2214
  className: t = "",
2214
2215
  onRetry: a,
2215
- supportEmail: n = "support@nowramp.com"
2216
+ onDone: n,
2217
+ doneButtonText: r,
2218
+ supportEmail: o = "support@nowramp.com"
2216
2219
  }) {
2217
- const { state: r, orderStatus: o, dispatch: d, goToStep: u } = Ie(), i = r.flowType === "sell", c = () => {
2218
- if (o)
2219
- switch (o.status) {
2220
+ const { state: d, orderStatus: u, dispatch: l, goToStep: c } = Me(), m = d.flowType === "sell", p = () => {
2221
+ if (u)
2222
+ switch (u.status) {
2220
2223
  case "failed":
2221
2224
  return "Payment Failed";
2222
2225
  case "cancelled":
@@ -2229,28 +2232,28 @@ function ln({
2229
2232
  return "Something Went Wrong";
2230
2233
  }
2231
2234
  return "Something Went Wrong";
2232
- }, m = () => {
2233
- if (r.errorMessage) return r.errorMessage;
2234
- if (o)
2235
- switch (o.status) {
2235
+ }, f = () => {
2236
+ if (d.errorMessage) return d.errorMessage;
2237
+ if (u)
2238
+ switch (u.status) {
2236
2239
  case "failed":
2237
- return i ? "Your sale could not be processed. Please try again." : "Your payment could not be processed. Please try again or use a different payment method.";
2240
+ return m ? "Your sale could not be processed. Please try again." : "Your payment could not be processed. Please try again or use a different payment method.";
2238
2241
  case "cancelled":
2239
- return i ? "Your sale was cancelled. No crypto was transferred." : "Your order was cancelled. No payment was processed.";
2242
+ return m ? "Your sale was cancelled. No crypto was transferred." : "Your order was cancelled. No payment was processed.";
2240
2243
  case "expired":
2241
- return i ? "Your order has expired. Please start a new sale." : "Your order has expired. Please start a new purchase.";
2244
+ return m ? "Your order has expired. Please start a new sale." : "Your order has expired. Please start a new purchase.";
2242
2245
  case "refunded":
2243
- return i ? "Your crypto has been returned. The funds should appear in your wallet shortly." : "Your payment has been refunded. The funds should appear in your account within 5-10 business days.";
2246
+ return m ? "Your crypto has been returned. The funds should appear in your wallet shortly." : "Your payment has been refunded. The funds should appear in your account within 5-10 business days.";
2244
2247
  default:
2245
2248
  return "An unexpected error occurred. Please try again.";
2246
2249
  }
2247
2250
  return "An unexpected error occurred. Please try again.";
2248
- }, h = () => {
2249
- d({ type: "CLEAR_ERROR" }), a ? a() : (d({ type: "RESET" }), u("amount"));
2250
- }, f = () => {
2251
- d({ type: "RESET" }), u("amount");
2251
+ }, C = () => {
2252
+ l({ type: "CLEAR_ERROR" }), a ? a() : (l({ type: "RESET" }), c("amount"));
2253
+ }, S = () => {
2254
+ l({ type: "RESET" }), c("amount");
2252
2255
  };
2253
- return /* @__PURE__ */ l("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
2256
+ return /* @__PURE__ */ i("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
2254
2257
  /* @__PURE__ */ e(
2255
2258
  "div",
2256
2259
  {
@@ -2259,19 +2262,19 @@ function ln({
2259
2262
  children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }) })
2260
2263
  }
2261
2264
  ),
2262
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: c() }),
2263
- /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: m() }),
2264
- o && /* @__PURE__ */ e("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: /* @__PURE__ */ l("div", { className: "flex justify-between items-center py-2", children: [
2265
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: p() }),
2266
+ /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: f() }),
2267
+ u && /* @__PURE__ */ e("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: /* @__PURE__ */ i("div", { className: "flex justify-between items-center py-2", children: [
2265
2268
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "Order ID" }),
2266
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium font-mono", style: { color: "var(--t-text)" }, children: o.orderId })
2269
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium font-mono", style: { color: "var(--t-text)" }, children: u.orderId })
2267
2270
  ] }) }),
2268
- /* @__PURE__ */ l("div", { className: "w-full flex flex-col gap-2", children: [
2271
+ /* @__PURE__ */ i("div", { className: "w-full flex flex-col gap-2", children: [
2269
2272
  /* @__PURE__ */ e(
2270
2273
  "button",
2271
2274
  {
2272
2275
  className: "w-full font-semibold text-[16px] transition-all",
2273
2276
  style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)" },
2274
- onClick: h,
2277
+ onClick: C,
2275
2278
  children: "Try Again"
2276
2279
  }
2277
2280
  ),
@@ -2280,28 +2283,44 @@ function ln({
2280
2283
  {
2281
2284
  className: "w-full font-semibold text-[14px] transition-all",
2282
2285
  style: { height: 48, borderRadius: 5, background: "var(--t-surface)", color: "var(--t-text)" },
2283
- onClick: f,
2286
+ onClick: S,
2284
2287
  children: "Start Over"
2285
2288
  }
2289
+ ),
2290
+ n && /* @__PURE__ */ e(
2291
+ "button",
2292
+ {
2293
+ className: "w-full font-semibold text-[14px] transition-all mt-1",
2294
+ style: {
2295
+ height: 48,
2296
+ borderRadius: 5,
2297
+ background: "transparent",
2298
+ color: "var(--t-text-secondary)",
2299
+ border: "1px solid var(--t-divider)"
2300
+ },
2301
+ onClick: n,
2302
+ "aria-label": r || "Return to merchant",
2303
+ children: r || "Return"
2304
+ }
2286
2305
  )
2287
2306
  ] }),
2288
- /* @__PURE__ */ l("div", { className: "mt-6", children: [
2289
- /* @__PURE__ */ l("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: [
2307
+ /* @__PURE__ */ i("div", { className: "mt-6", children: [
2308
+ /* @__PURE__ */ i("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: [
2290
2309
  "Need help? Contact",
2291
2310
  " ",
2292
2311
  /* @__PURE__ */ e(
2293
2312
  "a",
2294
2313
  {
2295
- href: `mailto:${n}`,
2314
+ href: `mailto:${o}`,
2296
2315
  className: "underline",
2297
2316
  style: { color: "var(--t-accent)" },
2298
- children: n
2317
+ children: o
2299
2318
  }
2300
2319
  )
2301
2320
  ] }),
2302
- o && /* @__PURE__ */ l("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: [
2321
+ u && /* @__PURE__ */ i("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: [
2303
2322
  "Reference: ",
2304
- o.orderId
2323
+ u.orderId
2305
2324
  ] })
2306
2325
  ] })
2307
2326
  ] });
@@ -2309,55 +2328,55 @@ function ln({
2309
2328
  function Yt(t) {
2310
2329
  return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
2311
2330
  }
2312
- function cn({ className: t = "", stablecoinParity: a, partnerName: n }) {
2313
- var te;
2331
+ function sn({ className: t = "", stablecoinParity: a, partnerName: n }) {
2332
+ var ce;
2314
2333
  const {
2315
2334
  config: r,
2316
2335
  configLoading: o,
2317
2336
  state: d,
2318
2337
  defaultGateway: u,
2319
- quotes: i,
2338
+ quotes: l,
2320
2339
  fetchQuotes: c,
2321
2340
  createOrder: m,
2322
- orderLoading: h
2323
- } = Ie(), f = d.flowType === "sell", [p, v] = w(null), C = r == null ? void 0 : r.gateways.find(($) => $.id === u), E = (te = i == null ? void 0 : i.bestQuote) != null && te.exchangeRate ? parseFloat(i.bestQuote.exchangeRate) : null, L = parseFloat(d.fiatAmount) || 0, K = !!(a && n && !f && ea(d.cryptoCurrency) && E), ee = K && d.cryptoCurrency.toUpperCase().includes(d.fiatCurrency.toUpperCase()), Z = K && L > 0 ? ht(ee ? L : L / E) : null, Y = async () => {
2324
- v(null);
2341
+ orderLoading: p
2342
+ } = Me(), f = d.flowType === "sell", [C, S] = A(null), k = r == null ? void 0 : r.gateways.find((_) => _.id === u), w = (ce = l == null ? void 0 : l.bestQuote) != null && ce.exchangeRate ? parseFloat(l.bestQuote.exchangeRate) : null, y = parseFloat(d.fiatAmount) || 0, O = !!(a && n && !f && ea(d.cryptoCurrency) && w), le = O && d.cryptoCurrency.toUpperCase().includes(d.fiatCurrency.toUpperCase()), G = O && y > 0 ? pt(le ? y : y / w) : null, z = async () => {
2343
+ S(null);
2325
2344
  try {
2326
2345
  c(), await m();
2327
- } catch ($) {
2328
- const le = $ instanceof Error ? $.message : "Failed to create order";
2329
- v(le);
2346
+ } catch (_) {
2347
+ const ne = _ instanceof Error ? _.message : "Failed to create order";
2348
+ S(ne);
2330
2349
  }
2331
2350
  };
2332
- return o ? /* @__PURE__ */ l("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
2351
+ return o ? /* @__PURE__ */ i("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
2333
2352
  /* @__PURE__ */ e("div", { className: "nramp-spinner" }),
2334
2353
  /* @__PURE__ */ e("p", { className: "text-[14px] mt-4", style: { color: "var(--t-text-secondary)" }, children: "Loading..." })
2335
- ] }) : /* @__PURE__ */ l("div", { className: `flex flex-col items-center px-8 py-12 ${t}`, children: [
2354
+ ] }) : /* @__PURE__ */ i("div", { className: `flex flex-col items-center px-8 py-12 ${t}`, children: [
2336
2355
  /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children: f ? "Confirm Sale" : "Confirm Purchase" }),
2337
- /* @__PURE__ */ l("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2338
- C && /* @__PURE__ */ l("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2356
+ /* @__PURE__ */ i("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2357
+ k && /* @__PURE__ */ i("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2339
2358
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "Provider" }),
2340
- /* @__PURE__ */ l("span", { className: "flex items-center gap-2", children: [
2341
- C.logo && /* @__PURE__ */ e("img", { src: C.logo, alt: C.name, width: 20, height: 20, style: { borderRadius: 4 } }),
2342
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: C.name })
2359
+ /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
2360
+ k.logo && /* @__PURE__ */ e("img", { src: k.logo, alt: k.name, width: 20, height: 20, style: { borderRadius: 4 } }),
2361
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: k.name })
2343
2362
  ] })
2344
2363
  ] }),
2345
- f ? /* @__PURE__ */ l(ae, { children: [
2346
- /* @__PURE__ */ e(ke, { label: "You sell", value: `${d.cryptoAmount} ${d.cryptoCurrency}`, highlight: !0 }),
2347
- /* @__PURE__ */ e(ke, { label: "You receive", value: `${d.fiatCurrency} payout` })
2348
- ] }) : /* @__PURE__ */ l(ae, { children: [
2349
- /* @__PURE__ */ e(ke, { label: "You pay", value: `${d.fiatAmount} ${d.fiatCurrency}`, highlight: !0 }),
2364
+ f ? /* @__PURE__ */ i(ae, { children: [
2365
+ /* @__PURE__ */ e(Re, { label: "You sell", value: `${d.cryptoAmount} ${d.cryptoCurrency}`, highlight: !0 }),
2366
+ /* @__PURE__ */ e(Re, { label: "You receive", value: `${d.fiatCurrency} payout` })
2367
+ ] }) : /* @__PURE__ */ i(ae, { children: [
2368
+ /* @__PURE__ */ e(Re, { label: "You pay", value: `${d.fiatAmount} ${d.fiatCurrency}`, highlight: !0 }),
2350
2369
  /* @__PURE__ */ e(
2351
- ke,
2370
+ Re,
2352
2371
  {
2353
2372
  label: "You receive",
2354
- value: Z ? `${Z} ${d.cryptoCurrency}` : `${d.cryptoCurrency} on ${d.network}`
2373
+ value: G ? `${G} ${d.cryptoCurrency}` : `${d.cryptoCurrency} on ${d.network}`
2355
2374
  }
2356
2375
  ),
2357
- /* @__PURE__ */ e(ke, { label: "Wallet", value: Yt(d.walletAddress), mono: !0 }),
2358
- K && Z && /* @__PURE__ */ l("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
2376
+ /* @__PURE__ */ e(Re, { label: "Wallet", value: Yt(d.walletAddress), mono: !0 }),
2377
+ O && G && /* @__PURE__ */ i("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
2359
2378
  "Charged amount from provider may differ. The rest up to ",
2360
- Z,
2379
+ G,
2361
2380
  " ",
2362
2381
  d.cryptoCurrency,
2363
2382
  " will be credited to your ",
@@ -2365,18 +2384,18 @@ function cn({ className: t = "", stablecoinParity: a, partnerName: n }) {
2365
2384
  " account."
2366
2385
  ] })
2367
2386
  ] }),
2368
- /* @__PURE__ */ e(ke, { label: "Network", value: d.network }),
2369
- f && d.walletAddress && /* @__PURE__ */ e(ke, { label: "Refund address", value: Yt(d.walletAddress), mono: !0 })
2387
+ /* @__PURE__ */ e(Re, { label: "Network", value: d.network }),
2388
+ f && d.walletAddress && /* @__PURE__ */ e(Re, { label: "Refund address", value: Yt(d.walletAddress), mono: !0 })
2370
2389
  ] }),
2371
- p && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: p }),
2390
+ C && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: C }),
2372
2391
  /* @__PURE__ */ e(
2373
2392
  "button",
2374
2393
  {
2375
2394
  className: "w-full font-semibold text-[16px] transition-all flex items-center justify-center gap-2",
2376
- style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: h ? 0.7 : 1 },
2377
- disabled: h,
2378
- onClick: Y,
2379
- children: h ? /* @__PURE__ */ l(ae, { children: [
2395
+ style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: p ? 0.7 : 1 },
2396
+ disabled: p,
2397
+ onClick: z,
2398
+ children: p ? /* @__PURE__ */ i(ae, { children: [
2380
2399
  /* @__PURE__ */ e("span", { className: "nramp-spinner-inline" }),
2381
2400
  "Processing..."
2382
2401
  ] }) : f ? "Confirm & Sell" : "Confirm & Pay"
@@ -2384,8 +2403,8 @@ function cn({ className: t = "", stablecoinParity: a, partnerName: n }) {
2384
2403
  )
2385
2404
  ] });
2386
2405
  }
2387
- function ke({ label: t, value: a, mono: n, highlight: r }) {
2388
- return /* @__PURE__ */ l("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2406
+ function Re({ label: t, value: a, mono: n, highlight: r }) {
2407
+ return /* @__PURE__ */ i("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2389
2408
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: t }),
2390
2409
  /* @__PURE__ */ e(
2391
2410
  "span",
@@ -2402,8 +2421,8 @@ function je({
2402
2421
  onClose: a,
2403
2422
  children: n
2404
2423
  }) {
2405
- const [r, o] = w(!1), [d, u] = w(!1);
2406
- X(() => {
2424
+ const [r, o] = A(!1), [d, u] = A(!1);
2425
+ Z(() => {
2407
2426
  if (t)
2408
2427
  o(!0), requestAnimationFrame(() => requestAnimationFrame(() => u(!0)));
2409
2428
  else if (r) {
@@ -2412,16 +2431,16 @@ function je({
2412
2431
  return () => clearTimeout(c);
2413
2432
  }
2414
2433
  }, [t]);
2415
- const i = O(() => {
2434
+ const l = B(() => {
2416
2435
  u(!1), setTimeout(() => a(), 250);
2417
2436
  }, [a]);
2418
- return X(() => {
2437
+ return Z(() => {
2419
2438
  if (!t) return;
2420
2439
  const c = (m) => {
2421
- m.key === "Escape" && i();
2440
+ m.key === "Escape" && l();
2422
2441
  };
2423
2442
  return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
2424
- }, [t, i]), r ? /* @__PURE__ */ e(
2443
+ }, [t, l]), r ? /* @__PURE__ */ e(
2425
2444
  "div",
2426
2445
  {
2427
2446
  className: "absolute inset-0 z-20 transition-opacity duration-250",
@@ -2431,57 +2450,57 @@ function je({
2431
2450
  {
2432
2451
  className: "absolute inset-0 flex flex-col transition-transform duration-250 ease-out",
2433
2452
  style: { background: "var(--t-modal-bg)", transform: d ? "translateY(0)" : "translateY(24px)" },
2434
- children: typeof n == "function" ? n(i) : n
2453
+ children: typeof n == "function" ? n(l) : n
2435
2454
  }
2436
2455
  )
2437
2456
  }
2438
2457
  ) : null;
2439
2458
  }
2440
- function sn({ char: t, height: a = 38 }) {
2459
+ function dn({ char: t, height: a = 38 }) {
2441
2460
  const n = "0123456789", r = n.indexOf(t);
2442
2461
  return r === -1 ? /* @__PURE__ */ e("span", { children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: a, lineHeight: `${a}px` }, children: /* @__PURE__ */ e("span", { className: "digit-slot-inner block", style: { transform: `translateY(-${r * a}px)` }, children: n.split("").map((o) => /* @__PURE__ */ e("span", { className: "block", style: { height: a, lineHeight: `${a}px` }, children: o }, o)) }) });
2443
2462
  }
2444
- function dn({
2463
+ function un({
2445
2464
  value: t,
2446
2465
  height: a = 38,
2447
2466
  className: n = "",
2448
2467
  style: r = {}
2449
2468
  }) {
2450
- return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", ...r }, children: t.split("").map((o, d) => /* @__PURE__ */ e(sn, { char: o, height: a }, d)) });
2469
+ return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", ...r }, children: t.split("").map((o, d) => /* @__PURE__ */ e(dn, { char: o, height: a }, d)) });
2451
2470
  }
2452
- function _({
2471
+ function V({
2453
2472
  w: t,
2454
2473
  h: a,
2455
2474
  className: n = ""
2456
2475
  }) {
2457
2476
  return /* @__PURE__ */ e("div", { className: `skeleton ${n}`, style: { width: t, height: a } });
2458
2477
  }
2459
- function un() {
2460
- return /* @__PURE__ */ l("div", { className: "flex-1 px-5 flex flex-col", children: [
2461
- /* @__PURE__ */ l("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
2462
- /* @__PURE__ */ e(_, { w: 70, h: 14, className: "mb-3" }),
2463
- /* @__PURE__ */ l("div", { className: "flex justify-between items-center", children: [
2464
- /* @__PURE__ */ e(_, { w: 120, h: 32 }),
2465
- /* @__PURE__ */ e(_, { w: 75, h: 32 })
2478
+ function mn() {
2479
+ return /* @__PURE__ */ i("div", { className: "flex-1 px-5 flex flex-col", children: [
2480
+ /* @__PURE__ */ i("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
2481
+ /* @__PURE__ */ e(V, { w: 70, h: 14, className: "mb-3" }),
2482
+ /* @__PURE__ */ i("div", { className: "flex justify-between items-center", children: [
2483
+ /* @__PURE__ */ e(V, { w: 120, h: 32 }),
2484
+ /* @__PURE__ */ e(V, { w: 75, h: 32 })
2466
2485
  ] })
2467
2486
  ] }),
2468
- /* @__PURE__ */ l("div", { className: "px-[18px] pt-[12px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5, marginTop: 4 }, children: [
2469
- /* @__PURE__ */ e(_, { w: 50, h: 14, className: "mb-3" }),
2470
- /* @__PURE__ */ l("div", { className: "flex justify-between items-center", children: [
2471
- /* @__PURE__ */ e(_, { w: 180, h: 32 }),
2472
- /* @__PURE__ */ e(_, { w: 85, h: 32 })
2487
+ /* @__PURE__ */ i("div", { className: "px-[18px] pt-[12px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5, marginTop: 4 }, children: [
2488
+ /* @__PURE__ */ e(V, { w: 50, h: 14, className: "mb-3" }),
2489
+ /* @__PURE__ */ i("div", { className: "flex justify-between items-center", children: [
2490
+ /* @__PURE__ */ e(V, { w: 180, h: 32 }),
2491
+ /* @__PURE__ */ e(V, { w: 85, h: 32 })
2473
2492
  ] })
2474
2493
  ] }),
2475
- /* @__PURE__ */ l("div", { className: "flex justify-between mt-3 px-[2px]", children: [
2476
- /* @__PURE__ */ e(_, { w: 140, h: 12 }),
2477
- /* @__PURE__ */ e(_, { w: 90, h: 12 })
2494
+ /* @__PURE__ */ i("div", { className: "flex justify-between mt-3 px-[2px]", children: [
2495
+ /* @__PURE__ */ e(V, { w: 140, h: 12 }),
2496
+ /* @__PURE__ */ e(V, { w: 90, h: 12 })
2478
2497
  ] }),
2479
- /* @__PURE__ */ l("div", { className: "mt-8", children: [
2480
- /* @__PURE__ */ e(_, { w: 65, h: 14, className: "mb-2.5" }),
2481
- /* @__PURE__ */ e(_, { w: "100%", h: 47 })
2498
+ /* @__PURE__ */ i("div", { className: "mt-8", children: [
2499
+ /* @__PURE__ */ e(V, { w: 65, h: 14, className: "mb-2.5" }),
2500
+ /* @__PURE__ */ e(V, { w: "100%", h: 47 })
2482
2501
  ] }),
2483
2502
  /* @__PURE__ */ e("div", { className: "flex-1" }),
2484
- /* @__PURE__ */ e(_, { w: "100%", h: 60, className: "mb-2" }),
2503
+ /* @__PURE__ */ e(V, { w: "100%", h: 60, className: "mb-2" }),
2485
2504
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
2486
2505
  ] });
2487
2506
  }
@@ -2498,13 +2517,13 @@ function Be({ onClick: t }) {
2498
2517
  }
2499
2518
  );
2500
2519
  }
2501
- function $e({
2520
+ function We({
2502
2521
  value: t,
2503
2522
  onChange: a,
2504
2523
  placeholder: n = ""
2505
2524
  }) {
2506
- const [r, o] = w(!1);
2507
- return /* @__PURE__ */ l("div", { className: "relative mx-5 mb-5", children: [
2525
+ const [r, o] = A(!1);
2526
+ return /* @__PURE__ */ i("div", { className: "relative mx-5 mb-5", children: [
2508
2527
  /* @__PURE__ */ e(
2509
2528
  "input",
2510
2529
  {
@@ -2529,37 +2548,37 @@ function $e({
2529
2548
  )
2530
2549
  ] });
2531
2550
  }
2532
- function mn({
2551
+ function fn({
2533
2552
  onClose: t,
2534
2553
  onSelect: a,
2535
2554
  currencies: n,
2536
2555
  assetBaseUrl: r = "",
2537
2556
  selectedCode: o
2538
2557
  }) {
2539
- const [d, u] = w(""), i = V(() => {
2558
+ const [d, u] = A(""), l = j(() => {
2540
2559
  if (!n || n.length === 0) return _t;
2541
- const m = new Map(_t.map((h) => [h.code, h.name]));
2542
- return n.map((h) => ({
2543
- code: h.code,
2544
- name: h.name || m.get(h.code) || h.code
2560
+ const m = new Map(_t.map((p) => [p.code, p.name]));
2561
+ return n.map((p) => ({
2562
+ code: p.code,
2563
+ name: p.name || m.get(p.code) || p.code
2545
2564
  }));
2546
- }, [n]), c = V(() => {
2565
+ }, [n]), c = j(() => {
2547
2566
  const m = d.trim().toLowerCase();
2548
2567
  if (!m) {
2549
2568
  if (o) {
2550
- const h = i.find((f) => f.code === o);
2551
- if (h) {
2552
- const f = i.filter((p) => p.code !== o);
2553
- return [h, ...f];
2569
+ const p = l.find((f) => f.code === o);
2570
+ if (p) {
2571
+ const f = l.filter((C) => C.code !== o);
2572
+ return [p, ...f];
2554
2573
  }
2555
2574
  }
2556
- return i;
2575
+ return l;
2557
2576
  }
2558
- return i.filter(
2559
- (h) => h.code.toLowerCase().includes(m) || h.name.toLowerCase().includes(m)
2577
+ return l.filter(
2578
+ (p) => p.code.toLowerCase().includes(m) || p.name.toLowerCase().includes(m)
2560
2579
  );
2561
- }, [i, d, o]);
2562
- return /* @__PURE__ */ l(ae, { children: [
2580
+ }, [l, d, o]);
2581
+ return /* @__PURE__ */ i(ae, { children: [
2563
2582
  /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Be, { onClick: t }) }),
2564
2583
  /* @__PURE__ */ e(
2565
2584
  "h2",
@@ -2575,24 +2594,24 @@ function mn({
2575
2594
  children: "Select fiat currency"
2576
2595
  }
2577
2596
  ),
2578
- /* @__PURE__ */ e($e, { value: d, onChange: u }),
2579
- /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2580
- c.map((m, h) => {
2581
- const f = m.name !== m.code ? m.name : "", p = o === m.code;
2582
- return /* @__PURE__ */ l("div", { children: [
2583
- /* @__PURE__ */ l(
2597
+ /* @__PURE__ */ e(We, { value: d, onChange: u }),
2598
+ /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2599
+ c.map((m, p) => {
2600
+ const f = m.name !== m.code ? m.name : "", C = o === m.code;
2601
+ return /* @__PURE__ */ i("div", { children: [
2602
+ /* @__PURE__ */ i(
2584
2603
  "button",
2585
2604
  {
2586
2605
  onClick: () => a(m.code),
2587
2606
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
2588
2607
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
2589
2608
  children: [
2590
- /* @__PURE__ */ e(pt, { currencyCode: m.code, size: 32, baseUrl: r }),
2591
- /* @__PURE__ */ l("div", { className: "text-left flex-1 flex items-center gap-2", children: [
2609
+ /* @__PURE__ */ e(ht, { currencyCode: m.code, size: 32, baseUrl: r }),
2610
+ /* @__PURE__ */ i("div", { className: "text-left flex-1 flex items-center gap-2", children: [
2592
2611
  /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: m.code }),
2593
2612
  f && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: f })
2594
2613
  ] }),
2595
- p && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0", children: /* @__PURE__ */ e(
2614
+ C && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0", children: /* @__PURE__ */ e(
2596
2615
  "path",
2597
2616
  {
2598
2617
  d: "M13.5 4.5L6 12L2.5 8.5",
@@ -2605,7 +2624,7 @@ function mn({
2605
2624
  ]
2606
2625
  }
2607
2626
  ),
2608
- h < c.length - 1 && /* @__PURE__ */ e(
2627
+ p < c.length - 1 && /* @__PURE__ */ e(
2609
2628
  "div",
2610
2629
  {
2611
2630
  style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" }
@@ -2618,18 +2637,18 @@ function mn({
2618
2637
  ] });
2619
2638
  }
2620
2639
  function Zt({ src: t, alt: a, size: n, className: r, style: o }) {
2621
- const [d, u] = w(!1), [i, c] = w(!1), m = M(t);
2640
+ const [d, u] = A(!1), [l, c] = A(!1), m = M(t);
2622
2641
  m.current !== t && (m.current = t, u(!1), c(!1));
2623
- const h = O(() => u(!0), []), f = O(() => c(!0), []);
2624
- return /* @__PURE__ */ l("div", { className: r, style: { ...o, width: n, height: n, position: "relative" }, children: [
2625
- !d && !i && /* @__PURE__ */ e(
2642
+ const p = B(() => u(!0), []), f = B(() => c(!0), []);
2643
+ return /* @__PURE__ */ i("div", { className: r, style: { ...o, width: n, height: n, position: "relative" }, children: [
2644
+ !d && !l && /* @__PURE__ */ e(
2626
2645
  "div",
2627
2646
  {
2628
2647
  className: "absolute inset-0 rounded-full animate-pulse",
2629
2648
  style: { background: "var(--t-pill-bg, #333)" }
2630
2649
  }
2631
2650
  ),
2632
- i ? /* @__PURE__ */ e(
2651
+ l ? /* @__PURE__ */ e(
2633
2652
  "div",
2634
2653
  {
2635
2654
  className: "absolute inset-0 rounded-full flex items-center justify-center text-[10px] font-bold",
@@ -2643,7 +2662,7 @@ function Zt({ src: t, alt: a, size: n, className: r, style: o }) {
2643
2662
  alt: a,
2644
2663
  width: n,
2645
2664
  height: n,
2646
- onLoad: h,
2665
+ onLoad: p,
2647
2666
  onError: f,
2648
2667
  className: `rounded-full ${d ? "opacity-100" : "opacity-0"}`,
2649
2668
  style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
@@ -2651,50 +2670,50 @@ function Zt({ src: t, alt: a, size: n, className: r, style: o }) {
2651
2670
  )
2652
2671
  ] });
2653
2672
  }
2654
- function fn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: d }) {
2655
- const [u, i] = w(""), c = V(() => {
2656
- if (!n || n.length === 0) return _a;
2673
+ function pn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: d }) {
2674
+ const [u, l] = A(""), c = j(() => {
2675
+ if (!n || n.length === 0) return Va;
2657
2676
  const f = [];
2658
- for (const p of n) {
2659
- const v = p.networks || [], C = p.name || Ba[p.code] || p.code;
2660
- if (v.length === 0)
2661
- f.push({ code: p.code, name: C, chain: p.code, popular: !1 });
2677
+ for (const C of n) {
2678
+ const S = C.networks || [], k = C.name || Oa[C.code] || C.code;
2679
+ if (S.length === 0)
2680
+ f.push({ code: C.code, name: k, chain: C.code, popular: !1 });
2662
2681
  else
2663
- for (const E of v) {
2664
- const L = E.code || E.id || E.name || p.code;
2682
+ for (const w of S) {
2683
+ const y = w.code || w.id || w.name || C.code;
2665
2684
  f.push({
2666
- code: p.code,
2667
- name: C,
2668
- chain: L,
2669
- chainName: E.name,
2685
+ code: C.code,
2686
+ name: k,
2687
+ chain: y,
2688
+ chainName: w.name,
2670
2689
  popular: !1
2671
2690
  });
2672
2691
  }
2673
2692
  }
2674
2693
  return f;
2675
- }, [n]), m = O((f, p) => o === f && d === p, [o, d]), h = V(() => {
2676
- var C;
2694
+ }, [n]), m = B((f, C) => o === f && d === C, [o, d]), p = j(() => {
2695
+ var k;
2677
2696
  const f = u.trim().toLowerCase();
2678
2697
  if (!f) {
2679
2698
  if (o && d) {
2680
- const E = c.find((L) => L.code === o && L.chain === d);
2681
- if (E) {
2682
- const L = c.filter((K) => !(K.code === o && K.chain === d));
2683
- return [E, ...L];
2699
+ const w = c.find((y) => y.code === o && y.chain === d);
2700
+ if (w) {
2701
+ const y = c.filter((O) => !(O.code === o && O.chain === d));
2702
+ return [w, ...y];
2684
2703
  }
2685
2704
  }
2686
2705
  return c;
2687
2706
  }
2688
- const p = f.split(/\s+/), v = [];
2689
- for (const E of c) {
2690
- const L = nt(E.chain), K = L ? L.name.toLowerCase() : "", ee = ((C = L == null ? void 0 : L.shortName) == null ? void 0 : C.toLowerCase()) || "", Z = E.chain.toLowerCase(), Y = E.code.toLowerCase(), te = E.name.toLowerCase(), $ = [Y, te, K, ee, Z];
2691
- if (!p.every((U) => $.some((Q) => Q.includes(U)))) continue;
2692
- let b = 0;
2693
- Y === f ? b += 100 : Y.startsWith(p[0]) && (b += 50), E.popular && (b += 10), p.length > 1 && (K.includes(p[1]) || ee.includes(p[1]) || Z.includes(p[1])) && (b += 25), v.push({ item: E, score: b });
2707
+ const C = f.split(/\s+/), S = [];
2708
+ for (const w of c) {
2709
+ const y = rt(w.chain), O = y ? y.name.toLowerCase() : "", le = ((k = y == null ? void 0 : y.shortName) == null ? void 0 : k.toLowerCase()) || "", G = w.chain.toLowerCase(), z = w.code.toLowerCase(), ce = w.name.toLowerCase(), _ = [z, ce, O, le, G];
2710
+ if (!C.every((T) => _.some((q) => q.includes(T)))) continue;
2711
+ let g = 0;
2712
+ z === f ? g += 100 : z.startsWith(C[0]) && (g += 50), w.popular && (g += 10), C.length > 1 && (O.includes(C[1]) || le.includes(C[1]) || G.includes(C[1])) && (g += 25), S.push({ item: w, score: g });
2694
2713
  }
2695
- return v.sort((E, L) => L.score - E.score), v.map((E) => E.item);
2714
+ return S.sort((w, y) => y.score - w.score), S.map((w) => w.item);
2696
2715
  }, [c, u, o, d]);
2697
- return /* @__PURE__ */ l(ae, { children: [
2716
+ return /* @__PURE__ */ i(ae, { children: [
2698
2717
  /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Be, { onClick: t }) }),
2699
2718
  /* @__PURE__ */ e(
2700
2719
  "h2",
@@ -2704,19 +2723,19 @@ function fn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2704
2723
  children: "Select crypto currency"
2705
2724
  }
2706
2725
  ),
2707
- /* @__PURE__ */ e($e, { value: u, onChange: i }),
2708
- /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2709
- h.map((f, p) => {
2710
- const v = nt(f.chain), C = (v == null ? void 0 : v.name) || f.chainName || f.chain, E = f.name !== f.code ? f.name : "", L = m(f.code, f.chain);
2711
- return /* @__PURE__ */ l("div", { children: [
2712
- /* @__PURE__ */ l(
2726
+ /* @__PURE__ */ e(We, { value: u, onChange: l }),
2727
+ /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2728
+ p.map((f, C) => {
2729
+ const S = rt(f.chain), k = (S == null ? void 0 : S.name) || f.chainName || f.chain, w = f.name !== f.code ? f.name : "", y = m(f.code, f.chain);
2730
+ return /* @__PURE__ */ i("div", { children: [
2731
+ /* @__PURE__ */ i(
2713
2732
  "button",
2714
2733
  {
2715
2734
  onClick: () => a(f.code, f.chain),
2716
2735
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
2717
2736
  style: { gap: 14, padding: "18px 8px", margin: "0 -8px" },
2718
2737
  children: [
2719
- /* @__PURE__ */ l("div", { className: "relative shrink-0", style: { width: 40, height: 40 }, children: [
2738
+ /* @__PURE__ */ i("div", { className: "relative shrink-0", style: { width: 40, height: 40 }, children: [
2720
2739
  /* @__PURE__ */ e(
2721
2740
  "div",
2722
2741
  {
@@ -2754,7 +2773,7 @@ function fn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2754
2773
  }
2755
2774
  )
2756
2775
  ] }),
2757
- /* @__PURE__ */ e("div", { className: "text-left flex-1 min-w-0", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
2776
+ /* @__PURE__ */ e("div", { className: "text-left flex-1 min-w-0", children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
2758
2777
  /* @__PURE__ */ e(
2759
2778
  "span",
2760
2779
  {
@@ -2763,18 +2782,18 @@ function fn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2763
2782
  children: f.code
2764
2783
  }
2765
2784
  ),
2766
- E && /* @__PURE__ */ e(
2785
+ w && /* @__PURE__ */ e(
2767
2786
  "span",
2768
2787
  {
2769
2788
  className: "text-[13px]",
2770
2789
  style: { color: "var(--t-text-secondary)" },
2771
- children: E
2790
+ children: w
2772
2791
  }
2773
2792
  )
2774
2793
  ] }) }),
2775
- /* @__PURE__ */ l("div", { className: "flex items-center gap-2 shrink-0", children: [
2776
- /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: C }),
2777
- L && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
2794
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2 shrink-0", children: [
2795
+ /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: k }),
2796
+ y && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
2778
2797
  "path",
2779
2798
  {
2780
2799
  d: "M13.5 4.5L6 12L2.5 8.5",
@@ -2788,10 +2807,10 @@ function fn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2788
2807
  ]
2789
2808
  }
2790
2809
  ),
2791
- p < h.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
2810
+ C < p.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
2792
2811
  ] }, `${f.code}-${f.chain}`);
2793
2812
  }),
2794
- h.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No currencies found" })
2813
+ p.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No currencies found" })
2795
2814
  ] })
2796
2815
  ] });
2797
2816
  }
@@ -2801,23 +2820,23 @@ function hn({
2801
2820
  onSelect: n,
2802
2821
  onClose: r
2803
2822
  }) {
2804
- const [o, d] = w(""), u = V(() => {
2805
- const i = o.trim().toLowerCase();
2806
- if (!i) {
2823
+ const [o, d] = A(""), u = j(() => {
2824
+ const l = o.trim().toLowerCase();
2825
+ if (!l) {
2807
2826
  if (a) {
2808
2827
  const c = t.find((m) => m.id === a);
2809
2828
  if (c) {
2810
- const m = t.filter((h) => h.id !== a);
2829
+ const m = t.filter((p) => p.id !== a);
2811
2830
  return [c, ...m];
2812
2831
  }
2813
2832
  }
2814
2833
  return t;
2815
2834
  }
2816
2835
  return t.filter(
2817
- (c) => c.id.toLowerCase().includes(i) || c.name.toLowerCase().includes(i) || c.description && c.description.toLowerCase().includes(i)
2836
+ (c) => c.id.toLowerCase().includes(l) || c.name.toLowerCase().includes(l) || c.description && c.description.toLowerCase().includes(l)
2818
2837
  );
2819
2838
  }, [t, o, a]);
2820
- return /* @__PURE__ */ l(ae, { children: [
2839
+ return /* @__PURE__ */ i(ae, { children: [
2821
2840
  /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Be, { onClick: r }) }),
2822
2841
  /* @__PURE__ */ e(
2823
2842
  "h2",
@@ -2827,41 +2846,41 @@ function hn({
2827
2846
  children: "Choose payment method"
2828
2847
  }
2829
2848
  ),
2830
- /* @__PURE__ */ e($e, { value: o, onChange: d }),
2831
- /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2832
- u.map((i, c) => {
2833
- const m = i.id === a, h = aa(i.id, i.name);
2834
- return /* @__PURE__ */ l("div", { children: [
2835
- /* @__PURE__ */ l(
2849
+ /* @__PURE__ */ e(We, { value: o, onChange: d }),
2850
+ /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2851
+ u.map((l, c) => {
2852
+ const m = l.id === a, p = aa(l.id, l.name);
2853
+ return /* @__PURE__ */ i("div", { children: [
2854
+ /* @__PURE__ */ i(
2836
2855
  "button",
2837
2856
  {
2838
- onClick: () => n(i.id),
2839
- className: `flex w-full transition-colors rounded-lg hover-item ${i.description ? "items-start" : "items-center"}`,
2857
+ onClick: () => n(l.id),
2858
+ className: `flex w-full transition-colors rounded-lg hover-item ${l.description ? "items-start" : "items-center"}`,
2840
2859
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
2841
2860
  children: [
2842
2861
  /* @__PURE__ */ e(
2843
2862
  "span",
2844
2863
  {
2845
- className: `flex items-center justify-center shrink-0 ${i.description ? "mt-0.5" : ""}`,
2864
+ className: `flex items-center justify-center shrink-0 ${l.description ? "mt-0.5" : ""}`,
2846
2865
  style: { width: 32, height: 32 },
2847
- children: na(i.id, i.icon, 32)
2866
+ children: na(l.id, l.icon, 32)
2848
2867
  }
2849
2868
  ),
2850
- /* @__PURE__ */ l("div", { className: "text-left flex-1", children: [
2869
+ /* @__PURE__ */ i("div", { className: "text-left flex-1", children: [
2851
2870
  /* @__PURE__ */ e(
2852
2871
  "div",
2853
2872
  {
2854
2873
  className: "font-semibold text-[15px] leading-tight",
2855
2874
  style: { color: "var(--t-text)" },
2856
- children: h
2875
+ children: p
2857
2876
  }
2858
2877
  ),
2859
- i.description && /* @__PURE__ */ e(
2878
+ l.description && /* @__PURE__ */ e(
2860
2879
  "div",
2861
2880
  {
2862
2881
  className: "text-[13px] leading-snug mt-1",
2863
2882
  style: { color: "var(--t-text-secondary)" },
2864
- children: i.description
2883
+ children: l.description
2865
2884
  }
2866
2885
  )
2867
2886
  ] }),
@@ -2879,13 +2898,13 @@ function hn({
2879
2898
  }
2880
2899
  ),
2881
2900
  c < u.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
2882
- ] }, i.id);
2901
+ ] }, l.id);
2883
2902
  }),
2884
2903
  u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No payment methods found" })
2885
2904
  ] })
2886
2905
  ] });
2887
2906
  }
2888
- function pn({
2907
+ function yn({
2889
2908
  checked: t,
2890
2909
  onChange: a,
2891
2910
  accentColor: n = "var(--t-accent)"
@@ -2915,11 +2934,11 @@ function pn({
2915
2934
  }
2916
2935
  );
2917
2936
  }
2918
- const yn = [
2937
+ const Cn = [
2919
2938
  { label: "Privacy policy", href: "https://nowramp.com/privacy-policy" },
2920
2939
  { label: "Terms of use", href: "https://nowramp.com/terms-and-conditions" }
2921
2940
  ];
2922
- function Cn({
2941
+ function gn({
2923
2942
  onClose: t,
2924
2943
  darkMode: a,
2925
2944
  onToggleDarkMode: n,
@@ -2927,24 +2946,24 @@ function Cn({
2927
2946
  onSelectSkin: o,
2928
2947
  showThemeToggle: d = !0,
2929
2948
  country: u,
2930
- countryName: i,
2949
+ countryName: l,
2931
2950
  onLocationPress: c,
2932
2951
  assetBaseUrl: m = ""
2933
2952
  }) {
2934
- const [h, f] = w(!1);
2935
- return /* @__PURE__ */ l(ae, { children: [
2953
+ const [p, f] = A(!1);
2954
+ return /* @__PURE__ */ i(ae, { children: [
2936
2955
  /* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(Be, { onClick: t }) }),
2937
- /* @__PURE__ */ l("div", { className: "px-5 flex-1 pt-6 overflow-y-auto custom-scroll", children: [
2938
- c && /* @__PURE__ */ l(ae, { children: [
2939
- /* @__PURE__ */ e("div", { style: { borderTop: "1px solid var(--t-divider)" }, children: /* @__PURE__ */ l(
2956
+ /* @__PURE__ */ i("div", { className: "px-5 flex-1 pt-6 overflow-y-auto custom-scroll", children: [
2957
+ c && /* @__PURE__ */ i(ae, { children: [
2958
+ /* @__PURE__ */ e("div", { style: { borderTop: "1px solid var(--t-divider)" }, children: /* @__PURE__ */ i(
2940
2959
  "button",
2941
2960
  {
2942
2961
  onClick: c,
2943
2962
  className: "flex items-center justify-between w-full py-5 transition-colors",
2944
2963
  style: { color: "inherit", background: "none", border: "none", cursor: "pointer", padding: "20px 0" },
2945
2964
  children: [
2946
- /* @__PURE__ */ l("div", { className: "flex items-center gap-3.5", children: [
2947
- u && !h ? /* @__PURE__ */ e(
2965
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-3.5", children: [
2966
+ u && !p ? /* @__PURE__ */ e(
2948
2967
  "img",
2949
2968
  {
2950
2969
  src: `${m}/flags/${u.toLowerCase()}.svg`,
@@ -2954,8 +2973,8 @@ function Cn({
2954
2973
  style: { width: 40, height: 40, borderRadius: "50%", objectFit: "cover" },
2955
2974
  onError: () => f(!0)
2956
2975
  }
2957
- ) : /* @__PURE__ */ e(gn, { size: 40 }),
2958
- /* @__PURE__ */ l("div", { className: "text-left", children: [
2976
+ ) : /* @__PURE__ */ e(xn, { size: 40 }),
2977
+ /* @__PURE__ */ i("div", { className: "text-left", children: [
2959
2978
  /* @__PURE__ */ e(
2960
2979
  "span",
2961
2980
  {
@@ -2964,12 +2983,12 @@ function Cn({
2964
2983
  children: "Location"
2965
2984
  }
2966
2985
  ),
2967
- i && /* @__PURE__ */ e(
2986
+ l && /* @__PURE__ */ e(
2968
2987
  "span",
2969
2988
  {
2970
2989
  className: "text-[13px]",
2971
2990
  style: { color: "var(--t-text-secondary)" },
2972
- children: i
2991
+ children: l
2973
2992
  }
2974
2993
  )
2975
2994
  ] })
@@ -2980,10 +2999,10 @@ function Cn({
2980
2999
  ) }),
2981
3000
  /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
2982
3001
  ] }),
2983
- d && /* @__PURE__ */ l(ae, { children: [
2984
- /* @__PURE__ */ e("div", { style: { borderTop: c ? "none" : "1px solid var(--t-divider)" }, children: /* @__PURE__ */ l("div", { className: "flex items-center justify-between w-full py-5", children: [
2985
- /* @__PURE__ */ l("div", { className: "flex items-center gap-3.5", children: [
2986
- /* @__PURE__ */ e(za, { size: 40 }),
3002
+ d && /* @__PURE__ */ i(ae, { children: [
3003
+ /* @__PURE__ */ e("div", { style: { borderTop: c ? "none" : "1px solid var(--t-divider)" }, children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between w-full py-5", children: [
3004
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-3.5", children: [
3005
+ /* @__PURE__ */ e(Ja, { size: 40 }),
2987
3006
  /* @__PURE__ */ e(
2988
3007
  "span",
2989
3008
  {
@@ -2993,15 +3012,15 @@ function Cn({
2993
3012
  }
2994
3013
  )
2995
3014
  ] }),
2996
- /* @__PURE__ */ e(pn, { checked: a, onChange: n, accentColor: "#4CD964" })
3015
+ /* @__PURE__ */ e(yn, { checked: a, onChange: n, accentColor: "#4CD964" })
2997
3016
  ] }) }),
2998
3017
  /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
2999
3018
  ] }),
3000
- yn.map((p) => /* @__PURE__ */ l("div", { children: [
3001
- /* @__PURE__ */ l(
3019
+ Cn.map((C) => /* @__PURE__ */ i("div", { children: [
3020
+ /* @__PURE__ */ i(
3002
3021
  "a",
3003
3022
  {
3004
- href: p.href,
3023
+ href: C.href,
3005
3024
  target: "_blank",
3006
3025
  rel: "noopener noreferrer",
3007
3026
  className: "flex items-center justify-between w-full py-5 transition-colors",
@@ -3012,7 +3031,7 @@ function Cn({
3012
3031
  {
3013
3032
  className: "font-medium text-[15px]",
3014
3033
  style: { color: "var(--t-text)" },
3015
- children: p.label
3034
+ children: C.label
3016
3035
  }
3017
3036
  ),
3018
3037
  /* @__PURE__ */ e(Xt, {})
@@ -3020,41 +3039,41 @@ function Cn({
3020
3039
  }
3021
3040
  ),
3022
3041
  /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
3023
- ] }, p.label))
3042
+ ] }, C.label))
3024
3043
  ] })
3025
3044
  ] });
3026
3045
  }
3027
- function gn({ size: t = 40 }) {
3028
- return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 40 40", fill: "none", children: [
3046
+ function xn({ size: t = 40 }) {
3047
+ return /* @__PURE__ */ i("svg", { width: t, height: t, viewBox: "0 0 40 40", fill: "none", children: [
3029
3048
  /* @__PURE__ */ e("circle", { cx: "20", cy: "20", r: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
3030
3049
  /* @__PURE__ */ e("ellipse", { cx: "20", cy: "20", rx: "9", ry: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
3031
3050
  /* @__PURE__ */ e("line", { x1: "2", y1: "20", x2: "38", y2: "20", stroke: "var(--t-text-secondary)", strokeWidth: "1.5" }),
3032
3051
  /* @__PURE__ */ e("path", { d: "M5 12h30M5 28h30", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" })
3033
3052
  ] });
3034
3053
  }
3035
- function xn({
3054
+ function vn({
3036
3055
  onClose: t,
3037
3056
  onSelect: a,
3038
3057
  assetBaseUrl: n = "",
3039
3058
  selectedCode: r
3040
3059
  }) {
3041
- const [o, d] = w(""), u = V(() => {
3042
- const i = o.trim().toLowerCase();
3043
- if (!i) {
3060
+ const [o, d] = A(""), u = j(() => {
3061
+ const l = o.trim().toLowerCase();
3062
+ if (!l) {
3044
3063
  if (r) {
3045
3064
  const c = r.toLowerCase(), m = yt[c];
3046
3065
  if (m) {
3047
- const h = at.filter((f) => f.code !== c);
3048
- return [m, ...h];
3066
+ const p = nt.filter((f) => f.code !== c);
3067
+ return [m, ...p];
3049
3068
  }
3050
3069
  }
3051
- return at;
3070
+ return nt;
3052
3071
  }
3053
- return at.filter(
3054
- (c) => c.name.toLowerCase().includes(i) || c.code.includes(i) || c.defaultFiat.toLowerCase().includes(i)
3072
+ return nt.filter(
3073
+ (c) => c.name.toLowerCase().includes(l) || c.code.includes(l) || c.defaultFiat.toLowerCase().includes(l)
3055
3074
  );
3056
3075
  }, [o, r]);
3057
- return /* @__PURE__ */ l(ae, { children: [
3076
+ return /* @__PURE__ */ i(ae, { children: [
3058
3077
  /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Be, { onClick: t }) }),
3059
3078
  /* @__PURE__ */ e(
3060
3079
  "h2",
@@ -3070,22 +3089,22 @@ function xn({
3070
3089
  children: "Select your country"
3071
3090
  }
3072
3091
  ),
3073
- /* @__PURE__ */ e($e, { value: o, onChange: d }),
3074
- /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
3075
- u.map((i, c) => {
3076
- const m = (r == null ? void 0 : r.toLowerCase()) === i.code;
3077
- return /* @__PURE__ */ l("div", { children: [
3078
- /* @__PURE__ */ l(
3092
+ /* @__PURE__ */ e(We, { value: o, onChange: d }),
3093
+ /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
3094
+ u.map((l, c) => {
3095
+ const m = (r == null ? void 0 : r.toLowerCase()) === l.code;
3096
+ return /* @__PURE__ */ i("div", { children: [
3097
+ /* @__PURE__ */ i(
3079
3098
  "button",
3080
3099
  {
3081
- onClick: () => a(i.code),
3100
+ onClick: () => a(l.code),
3082
3101
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
3083
3102
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
3084
3103
  children: [
3085
- /* @__PURE__ */ e(vn, { code: i.code, size: 32, baseUrl: n }),
3086
- /* @__PURE__ */ l("div", { className: "text-left flex-1", children: [
3087
- /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: i.name }),
3088
- /* @__PURE__ */ e("span", { className: "text-[13px] ml-2", style: { color: "var(--t-text-secondary)" }, children: i.defaultFiat })
3104
+ /* @__PURE__ */ e(bn, { code: l.code, size: 32, baseUrl: n }),
3105
+ /* @__PURE__ */ i("div", { className: "text-left flex-1", children: [
3106
+ /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: l.name }),
3107
+ /* @__PURE__ */ e("span", { className: "text-[13px] ml-2", style: { color: "var(--t-text-secondary)" }, children: l.defaultFiat })
3089
3108
  ] }),
3090
3109
  m && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0", children: /* @__PURE__ */ e(
3091
3110
  "path",
@@ -3106,14 +3125,14 @@ function xn({
3106
3125
  style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" }
3107
3126
  }
3108
3127
  )
3109
- ] }, i.code);
3128
+ ] }, l.code);
3110
3129
  }),
3111
3130
  u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No countries found" })
3112
3131
  ] })
3113
3132
  ] });
3114
3133
  }
3115
- function vn({ code: t, size: a = 32, baseUrl: n = "" }) {
3116
- const [r, o] = w(!1);
3134
+ function bn({ code: t, size: a = 32, baseUrl: n = "" }) {
3135
+ const [r, o] = A(!1);
3117
3136
  return r ? /* @__PURE__ */ e(
3118
3137
  "div",
3119
3138
  {
@@ -3142,7 +3161,7 @@ function vn({ code: t, size: a = 32, baseUrl: n = "" }) {
3142
3161
  }
3143
3162
  );
3144
3163
  }
3145
- function bn({
3164
+ function Sn({
3146
3165
  className: t = "",
3147
3166
  theme: a = "dark",
3148
3167
  skinId: n = "mono",
@@ -3150,173 +3169,173 @@ function bn({
3150
3169
  bgColor: o,
3151
3170
  bgImage: d,
3152
3171
  borderColor: u,
3153
- borderRadius: i,
3172
+ borderRadius: l,
3154
3173
  surfaceColor: c,
3155
3174
  inputBgColor: m,
3156
- textColor: h,
3175
+ textColor: p,
3157
3176
  textSecondaryColor: f,
3158
- textMutedColor: p,
3159
- successColor: v,
3160
- showFlowToggle: C = !0,
3161
- showSettings: E = !0,
3162
- showThemeToggle: L = !0,
3163
- autoRedirect: K = !1,
3164
- explorerUrl: ee,
3165
- doneButtonText: Z = "Done",
3166
- supportEmail: Y,
3167
- stablecoinParity: te,
3168
- partnerName: $,
3169
- onDone: le
3177
+ textMutedColor: C,
3178
+ successColor: S,
3179
+ showFlowToggle: k = !0,
3180
+ showSettings: w = !0,
3181
+ showThemeToggle: y = !0,
3182
+ autoRedirect: O = !1,
3183
+ explorerUrl: le,
3184
+ doneButtonText: G = "Done",
3185
+ supportEmail: z,
3186
+ stablecoinParity: ce,
3187
+ partnerName: _,
3188
+ onDone: ne
3170
3189
  }) {
3171
- var Lt, Ut, Ft, Dt, Mt, It, Bt, Ot, Ht;
3190
+ var Lt, Ut, Ft, Dt, It, Mt, Bt, Ot, Ht;
3172
3191
  const {
3173
- state: b,
3174
- dispatch: U,
3175
- config: Q,
3176
- configLoading: s,
3177
- quotes: S,
3178
- quotesLoading: H,
3179
- quotesError: g,
3180
- fetchQuotes: ce,
3181
- createOrder: Ce,
3182
- orderLoading: se,
3183
- amountError: ge,
3184
- fieldLocks: D,
3185
- apiConfig: Ne,
3186
- assetBaseUrl: I,
3187
- availableFiats: oe,
3188
- availableCryptos: de,
3189
- availablePaymentMethods: ue,
3190
- selectionUnsupported: z,
3191
- quotesEmpty: J,
3192
- bestUnavailableReason: W
3193
- } = Ie(), [ne, Te] = w(a === "dark"), [We, Oe] = w(n), [me, B] = w(null), [He, Le] = w(!1), [Pe, Xe] = w(!1), [ie, Ye] = w(!1), [fe, Ze] = w(!1), [Qe, xe] = w(null), [we, it] = w(!0), [lt, ze] = w(!1), [he, Ue] = w(!1), y = M(null), A = M(), k = M(b.flowType);
3194
- X(() => {
3195
- Te(a === "dark");
3196
- }, [a]), X(() => {
3197
- const x = setTimeout(() => it(!1), s ? 0 : 800);
3192
+ state: g,
3193
+ dispatch: T,
3194
+ config: q,
3195
+ configLoading: xe,
3196
+ quotes: F,
3197
+ quotesLoading: s,
3198
+ quotesError: L,
3199
+ fetchQuotes: W,
3200
+ createOrder: b,
3201
+ orderLoading: ee,
3202
+ amountError: ue,
3203
+ fieldLocks: I,
3204
+ apiConfig: ve,
3205
+ assetBaseUrl: Y,
3206
+ availableFiats: ke,
3207
+ availableCryptos: se,
3208
+ availablePaymentMethods: Q,
3209
+ selectionUnsupported: te,
3210
+ quotesEmpty: de,
3211
+ bestUnavailableReason: ye
3212
+ } = Me(), [re, $] = A(a === "dark"), [be, Oe] = A(n), [Se, H] = A(null), [Ne, we] = A(!1), [$e, Te] = A(!1), [Xe, Ye] = A(!1), [P, Ze] = A(!1), [Qe, oe] = A(null), [He, ze] = A(!0), [Je, Le] = A(!1), [me, Ue] = A(!1), lt = M(null), Pe = M(), Ke = M(g.flowType);
3213
+ Z(() => {
3214
+ $(a === "dark");
3215
+ }, [a]), Z(() => {
3216
+ const x = setTimeout(() => ze(!1), xe ? 0 : 800);
3198
3217
  return () => clearTimeout(x);
3199
- }, [s]), X(() => {
3200
- if (k.current !== b.flowType && !we) {
3201
- k.current = b.flowType, ze(!0), Le(!1), Xe(!1);
3202
- const x = setTimeout(() => ze(!1), 350);
3218
+ }, [xe]), Z(() => {
3219
+ if (Ke.current !== g.flowType && !He) {
3220
+ Ke.current = g.flowType, Le(!0), we(!1), Te(!1);
3221
+ const x = setTimeout(() => Le(!1), 350);
3203
3222
  return () => clearTimeout(x);
3204
3223
  }
3205
- k.current = b.flowType;
3206
- }, [b.flowType, we]);
3207
- const T = b.flowType, R = T === "buy", F = b.cryptoCurrency || "BTC", j = b.fiatCurrency || "USD", Ee = R ? b.fiatAmount : b.cryptoAmount, q = Ka(Ee), ve = (Lt = S == null ? void 0 : S.bestQuote) != null && Lt.exchangeRate ? parseFloat(S.bestQuote.exchangeRate) : null, Ke = M(null);
3208
- ve && F && j && (Ke.current = { rate: ve, crypto: F, fiat: j }), X(() => {
3209
- (J || g) && (Ke.current = null);
3210
- }, [J, g]);
3211
- const xt = V(() => {
3212
- if (S != null && S.bestQuote) {
3213
- const x = R ? S.bestQuote.cryptoAmount : S.bestQuote.fiatAmount;
3224
+ Ke.current = g.flowType;
3225
+ }, [g.flowType, He]);
3226
+ const h = g.flowType, v = h === "buy", N = g.cryptoCurrency || "BTC", R = g.fiatCurrency || "USD", D = v ? g.fiatAmount : g.cryptoAmount, U = _a(D), J = (Lt = F == null ? void 0 : F.bestQuote) != null && Lt.exchangeRate ? parseFloat(F.bestQuote.exchangeRate) : null, fe = M(null);
3227
+ J && N && R && (fe.current = { rate: J, crypto: N, fiat: R }), Z(() => {
3228
+ (de || L) && (fe.current = null);
3229
+ }, [de, L]);
3230
+ const xt = j(() => {
3231
+ if (F != null && F.bestQuote) {
3232
+ const x = v ? F.bestQuote.cryptoAmount : F.bestQuote.fiatAmount;
3214
3233
  if (x) return x;
3215
3234
  }
3216
3235
  return "0";
3217
- }, [S, R]), _e = !!(te && $ && R && ea(F) && ve), ra = _e && F.toUpperCase().includes(j.toUpperCase()), vt = _e && q > 0 ? ht(ra ? q : q / ve) : null, oa = _e && vt ? vt : xt, ia = V(() => {
3218
- var G, Re, De;
3219
- const x = ve || ((G = Ke.current) == null ? void 0 : G.rate), N = ve ? F : (Re = Ke.current) == null ? void 0 : Re.crypto, P = ve ? j : (De = Ke.current) == null ? void 0 : De.fiat;
3220
- return !x || !N || !P ? "" : `1 ${N} ≈ ${x.toFixed(2)} ${P}`;
3221
- }, [F, j, ve]);
3222
- X(() => {
3223
- const x = b.walletAddress.trim(), N = b.network;
3236
+ }, [F, v]), _e = !!(ce && _ && v && ea(N) && J), ra = _e && N.toUpperCase().includes(R.toUpperCase()), vt = _e && U > 0 ? pt(ra ? U : U / J) : null, oa = _e && vt ? vt : xt, ia = j(() => {
3237
+ var X, Ae, De;
3238
+ const x = J || ((X = fe.current) == null ? void 0 : X.rate), E = J ? N : (Ae = fe.current) == null ? void 0 : Ae.crypto, K = J ? R : (De = fe.current) == null ? void 0 : De.fiat;
3239
+ return !x || !E || !K ? "" : `1 ${E} ≈ ${x.toFixed(2)} ${K}`;
3240
+ }, [N, R, J]);
3241
+ Z(() => {
3242
+ const x = g.walletAddress.trim(), E = g.network;
3224
3243
  if (!x || x.length < 10) {
3225
- xe(null), U({ type: "SET_WALLET_ERROR", message: "" });
3244
+ oe(null), T({ type: "SET_WALLET_ERROR", message: "" });
3226
3245
  return;
3227
3246
  }
3228
- Ze(!0), xe(null);
3229
- const P = new AbortController();
3230
- return clearTimeout(A.current), A.current = setTimeout(async () => {
3231
- var G, Re, De;
3247
+ Ze(!0), oe(null);
3248
+ const K = new AbortController();
3249
+ return clearTimeout(Pe.current), Pe.current = setTimeout(async () => {
3250
+ var X, Ae, De;
3232
3251
  try {
3233
- const dt = await (await fetch(`${Ne.apiUrl}/public/validate/address`, {
3252
+ const dt = await (await fetch(`${ve.apiUrl}/public/validate/address`, {
3234
3253
  method: "POST",
3235
3254
  headers: { "Content-Type": "application/json" },
3236
- body: JSON.stringify({ address: x, ...N ? { network: N } : {} }),
3237
- signal: P.signal
3238
- })).json(), ut = ((G = dt.data) == null ? void 0 : G.attributes) || dt.data || dt;
3255
+ body: JSON.stringify({ address: x, ...E ? { network: E } : {} }),
3256
+ signal: K.signal
3257
+ })).json(), ut = ((X = dt.data) == null ? void 0 : X.attributes) || dt.data || dt;
3239
3258
  if (ut.isValid)
3240
- xe(!0), U({ type: "SET_WALLET_ERROR", message: "" });
3259
+ oe(!0), T({ type: "SET_WALLET_ERROR", message: "" });
3241
3260
  else {
3242
- xe(!1);
3243
- const ga = ((Re = ut.errors) == null ? void 0 : Re[0]) || ((De = ut.details) == null ? void 0 : De.formatMessage) || "Invalid wallet address";
3244
- U({ type: "SET_WALLET_ERROR", message: ga });
3261
+ oe(!1);
3262
+ const ga = ((Ae = ut.errors) == null ? void 0 : Ae[0]) || ((De = ut.details) == null ? void 0 : De.formatMessage) || "Invalid wallet address";
3263
+ T({ type: "SET_WALLET_ERROR", message: ga });
3245
3264
  }
3246
3265
  } catch (st) {
3247
3266
  if (st instanceof DOMException && st.name === "AbortError") return;
3248
- xe(null);
3267
+ oe(null);
3249
3268
  } finally {
3250
- P.signal.aborted || Ze(!1);
3269
+ K.signal.aborted || Ze(!1);
3251
3270
  }
3252
3271
  }, 500), () => {
3253
- clearTimeout(A.current), P.abort();
3272
+ clearTimeout(Pe.current), K.abort();
3254
3273
  };
3255
- }, [b.walletAddress, b.network, Ne.apiUrl]);
3256
- const bt = !Ee || q === 0, St = q > 0 && (R ? q < Gt : q < $t), Nt = !!ge || St || He && bt, la = q > 0 && !ge && !St, ct = b.walletAddress.trim().length >= 10 && Qe !== !1 && !fe, Je = la && ct && !!b.cryptoCurrency && !!b.network, ca = (x) => {
3257
- let N = x.target.value.replace(/[^0-9.,]/g, "");
3258
- const P = R ? 2 : 6, G = N.indexOf(".");
3259
- G !== -1 && N.length - G - 1 > P && (N = N.slice(0, G + P + 1)), U(R ? { type: "SET_FIAT_AMOUNT", amount: N } : { type: "SET_CRYPTO_AMOUNT", amount: N });
3274
+ }, [g.walletAddress, g.network, ve.apiUrl]);
3275
+ const bt = !D || U === 0, St = U > 0 && (v ? U < Gt : U < Wt), Nt = !!ue || St || Ne && bt, la = U > 0 && !ue && !St, ct = g.walletAddress.trim().length >= 10 && Qe !== !1 && !P, qe = la && ct && !!g.cryptoCurrency && !!g.network, ca = (x) => {
3276
+ let E = x.target.value.replace(/[^0-9.,]/g, "");
3277
+ const K = v ? 2 : 6, X = E.indexOf(".");
3278
+ X !== -1 && E.length - X - 1 > K && (E = E.slice(0, X + K + 1)), T(v ? { type: "SET_FIAT_AMOUNT", amount: E } : { type: "SET_CRYPTO_AMOUNT", amount: E });
3260
3279
  }, wt = (x) => {
3261
- x !== T && U({ type: "SET_FLOW_TYPE", flowType: x, fieldLocks: D });
3262
- }, sa = O(
3280
+ x !== h && T({ type: "SET_FLOW_TYPE", flowType: x, fieldLocks: I });
3281
+ }, sa = B(
3263
3282
  (x) => {
3264
- U({ type: "SET_FIAT_CURRENCY", currency: x });
3283
+ T({ type: "SET_FIAT_CURRENCY", currency: x });
3265
3284
  },
3266
- [U]
3267
- ), da = O(
3268
- (x, N) => {
3269
- U({ type: "SET_CRYPTO_CURRENCY", currency: x }), U({ type: "SET_CRYPTO_CHAIN", chain: N });
3285
+ [T]
3286
+ ), da = B(
3287
+ (x, E) => {
3288
+ T({ type: "SET_CRYPTO_CURRENCY", currency: x }), T({ type: "SET_CRYPTO_CHAIN", chain: E });
3270
3289
  },
3271
- [U]
3272
- ), ua = O(
3290
+ [T]
3291
+ ), ua = B(
3273
3292
  (x) => {
3274
- U({ type: "SET_PAYMENT_METHOD", methodId: x });
3293
+ T({ type: "SET_PAYMENT_METHOD", methodId: x });
3275
3294
  },
3276
- [U]
3277
- ), ma = O(
3295
+ [T]
3296
+ ), ma = B(
3278
3297
  (x) => {
3279
- U({ type: "SET_COUNTRY", country: x }), B(null);
3298
+ T({ type: "SET_COUNTRY", country: x }), H(null);
3280
3299
  },
3281
- [U]
3282
- ), fa = O(() => {
3283
- B(null), setTimeout(() => B("country"), 280);
3284
- }, []), ha = b.country ? (Ut = yt[b.country.toLowerCase()]) == null ? void 0 : Ut.name : void 0, pa = () => {
3285
- Je && (Ue(!0), ce());
3300
+ [T]
3301
+ ), fa = B(() => {
3302
+ H(null), setTimeout(() => H("country"), 280);
3303
+ }, []), pa = g.country ? (Ut = yt[g.country.toLowerCase()]) == null ? void 0 : Ut.name : void 0, ha = () => {
3304
+ qe && (Ue(!0), W());
3286
3305
  };
3287
- X(() => {
3306
+ Z(() => {
3288
3307
  var x;
3289
- if (!(!he || H)) {
3290
- if (S != null && S.bestQuote)
3291
- Ue(!1), U({ type: "SELECT_QUOTE", quote: S.bestQuote }), Ce().catch(() => {
3308
+ if (!(!me || s)) {
3309
+ if (F != null && F.bestQuote)
3310
+ Ue(!1), T({ type: "SELECT_QUOTE", quote: F.bestQuote }), b().catch(() => {
3292
3311
  });
3293
- else if (g)
3294
- Ue(!1), U({ type: "SET_ERROR", message: g.message || "No quotes available" });
3295
- else if (S && !S.bestQuote) {
3312
+ else if (L)
3313
+ Ue(!1), T({ type: "SET_ERROR", message: L.message || "No quotes available" });
3314
+ else if (F && !F.bestQuote) {
3296
3315
  Ue(!1);
3297
- const N = (x = S.unavailableGateways) == null ? void 0 : x.map((G) => G.reason).filter(Boolean), P = N != null && N.length ? `No providers available: ${N.join("; ")}` : "No providers available for this currency/network combination";
3298
- U({ type: "SET_ERROR", message: P });
3316
+ const E = (x = F.unavailableGateways) == null ? void 0 : x.map((X) => X.reason).filter(Boolean), K = E != null && E.length ? `No providers available: ${E.join("; ")}` : "No providers available for this currency/network combination";
3317
+ T({ type: "SET_ERROR", message: K });
3299
3318
  }
3300
3319
  }
3301
- }, [he, S, H, g, U, Ce]);
3302
- const Et = ne ? "theme-dark" : "theme-light", qe = Vt.find((x) => x.id === We) || Vt[0], ya = qe.accent === null, Ca = r ? ye(r) : !1, At = (x) => {
3303
- const N = x.replace("#", ""), P = parseInt(N.substring(0, 2), 16), G = parseInt(N.substring(2, 4), 16), Re = parseInt(N.substring(4, 6), 16);
3304
- return (0.299 * P + 0.587 * G + 0.114 * Re) / 255 > 0.5 ? "#000000" : "#ffffff";
3320
+ }, [me, F, s, L, T, b]);
3321
+ const Et = re ? "theme-dark" : "theme-light", et = Vt.find((x) => x.id === be) || Vt[0], ya = et.accent === null, Ca = r ? he(r) : !1, At = (x) => {
3322
+ const E = x.replace("#", ""), K = parseInt(E.substring(0, 2), 16), X = parseInt(E.substring(2, 4), 16), Ae = parseInt(E.substring(4, 6), 16);
3323
+ return (0.299 * K + 0.587 * X + 0.114 * Ae) / 255 > 0.5 ? "#000000" : "#ffffff";
3305
3324
  }, Rt = Ca ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": At(r) } : ya ? {
3306
- "--t-accent": ne ? "#ffffff" : "#111111",
3307
- "--t-cta-bg": ne ? "#ffffff" : "#111111",
3308
- "--t-cta-text": ne ? "#000000" : "#ffffff"
3325
+ "--t-accent": re ? "#ffffff" : "#111111",
3326
+ "--t-cta-bg": re ? "#ffffff" : "#111111",
3327
+ "--t-cta-text": re ? "#000000" : "#ffffff"
3309
3328
  } : {
3310
- "--t-accent": qe.accent,
3311
- "--t-cta-bg": qe.accent,
3312
- "--t-cta-text": At(qe.accent)
3313
- }, re = {};
3314
- c && ye(c) && (re["--t-surface"] = c, re["--t-modal-bg"] = c), m && ye(m) && (re["--t-pill-bg"] = m, re["--t-close-bg"] = m), h && ye(h) && (re["--t-text"] = h), f && ye(f) && (re["--t-text-secondary"] = f), p && ye(p) && (re["--t-text-muted"] = p, re["--t-text-tertiary"] = p), v && ye(v) && (re["--t-success"] = v);
3315
- const Ae = {};
3316
- o && ye(o) ? Ae.backgroundColor = o : Ae.backgroundColor = "var(--t-bg)", d && (d.startsWith("https://") || d.startsWith("data:image/")) && (Ae.backgroundImage = `url(${d})`, Ae.backgroundSize = "cover", Ae.backgroundPosition = "center");
3317
- const et = ne ? "#ffffff" : "#111111", tt = {};
3318
- u && ye(u) && (tt.border = `1px solid ${u}`), i && (tt.borderRadius = i);
3319
- const kt = b.step === "checkout" ? /* @__PURE__ */ e(an, { autoRedirect: K }) : b.step === "processing" ? /* @__PURE__ */ e(rn, {}) : b.step === "complete" ? /* @__PURE__ */ e(on, { explorerUrl: ee, doneButtonText: Z, onDone: le }) : b.step === "error" ? /* @__PURE__ */ e(ln, { supportEmail: Y }) : b.step === "confirm" ? /* @__PURE__ */ e(cn, { stablecoinParity: _e, partnerName: $ }) : null;
3329
+ "--t-accent": et.accent,
3330
+ "--t-cta-bg": et.accent,
3331
+ "--t-cta-text": At(et.accent)
3332
+ }, ie = {};
3333
+ c && he(c) && (ie["--t-surface"] = c, ie["--t-modal-bg"] = c), m && he(m) && (ie["--t-pill-bg"] = m, ie["--t-close-bg"] = m), p && he(p) && (ie["--t-text"] = p), f && he(f) && (ie["--t-text-secondary"] = f), C && he(C) && (ie["--t-text-muted"] = C, ie["--t-text-tertiary"] = C), S && he(S) && (ie["--t-success"] = S);
3334
+ const Ee = {};
3335
+ o && he(o) ? Ee.backgroundColor = o : Ee.backgroundColor = "var(--t-bg)", d && (d.startsWith("https://") || d.startsWith("data:image/")) && (Ee.backgroundImage = `url(${d})`, Ee.backgroundSize = "cover", Ee.backgroundPosition = "center");
3336
+ const tt = re ? "#ffffff" : "#111111", at = {};
3337
+ u && he(u) && (at.border = `1px solid ${u}`), l && (at.borderRadius = l);
3338
+ const kt = g.step === "checkout" ? /* @__PURE__ */ e(nn, { autoRedirect: O }) : g.step === "processing" ? /* @__PURE__ */ e(on, {}) : g.step === "complete" ? /* @__PURE__ */ e(ln, { explorerUrl: le, doneButtonText: G, onDone: ne }) : g.step === "error" ? /* @__PURE__ */ e(cn, { supportEmail: z, onDone: ne, doneButtonText: G }) : g.step === "confirm" ? /* @__PURE__ */ e(sn, { stablecoinParity: _e, partnerName: _ }) : null;
3320
3339
  if (kt)
3321
3340
  return /* @__PURE__ */ e(
3322
3341
  "div",
@@ -3324,36 +3343,36 @@ function bn({
3324
3343
  className: `${Et} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3325
3344
  style: {
3326
3345
  fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
3327
- ...Ae,
3346
+ ...Ee,
3328
3347
  ...Rt,
3329
- ...re,
3330
- ...tt
3348
+ ...ie,
3349
+ ...at
3331
3350
  },
3332
3351
  children: kt
3333
3352
  }
3334
3353
  );
3335
- const pe = b.network, Fe = pe ? nt(pe) : null, Tt = (Fe == null ? void 0 : Fe.shortName) || (Fe == null ? void 0 : Fe.name) || pe;
3336
- return /* @__PURE__ */ l(
3354
+ const pe = g.network, Fe = pe ? rt(pe) : null, Tt = (Fe == null ? void 0 : Fe.shortName) || (Fe == null ? void 0 : Fe.name) || pe;
3355
+ return /* @__PURE__ */ i(
3337
3356
  "div",
3338
3357
  {
3339
3358
  className: `${Et} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3340
3359
  style: {
3341
3360
  fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
3342
- ...Ae,
3361
+ ...Ee,
3343
3362
  ...Rt,
3344
- ...re,
3345
- ...tt
3363
+ ...ie,
3364
+ ...at
3346
3365
  },
3347
3366
  children: [
3348
- E && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${C ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(Qa, { onClick: () => B("settings") }) }),
3349
- C ? /* @__PURE__ */ l("div", { className: "flex flex-col items-center pt-3 pb-5", children: [
3350
- /* @__PURE__ */ l("div", { className: "flex", style: { width: 165 }, children: [
3367
+ w && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${k ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(za, { onClick: () => H("settings") }) }),
3368
+ k ? /* @__PURE__ */ i("div", { className: "flex flex-col items-center pt-3 pb-5", children: [
3369
+ /* @__PURE__ */ i("div", { className: "flex", style: { width: 165 }, children: [
3351
3370
  /* @__PURE__ */ e(
3352
3371
  "button",
3353
3372
  {
3354
3373
  onClick: () => wt("buy"),
3355
3374
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
3356
- style: { color: T === "buy" ? "var(--t-text)" : "var(--t-text-secondary)" },
3375
+ style: { color: h === "buy" ? "var(--t-text)" : "var(--t-text-secondary)" },
3357
3376
  children: "Buy"
3358
3377
  }
3359
3378
  ),
@@ -3362,12 +3381,12 @@ function bn({
3362
3381
  {
3363
3382
  onClick: () => wt("sell"),
3364
3383
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
3365
- style: { color: T === "sell" ? "var(--t-text)" : "var(--t-text-secondary)" },
3384
+ style: { color: h === "sell" ? "var(--t-text)" : "var(--t-text-secondary)" },
3366
3385
  children: "Sell"
3367
3386
  }
3368
3387
  )
3369
3388
  ] }),
3370
- /* @__PURE__ */ l("div", { className: "relative", style: { width: 165, height: 1 }, children: [
3389
+ /* @__PURE__ */ i("div", { className: "relative", style: { width: 165, height: 1 }, children: [
3371
3390
  /* @__PURE__ */ e("div", { className: "absolute inset-0", style: { background: "var(--t-divider)" } }),
3372
3391
  /* @__PURE__ */ e(
3373
3392
  "div",
@@ -3375,46 +3394,46 @@ function bn({
3375
3394
  className: "absolute top-0 h-full transition-all duration-300 ease-in-out",
3376
3395
  style: {
3377
3396
  width: "50%",
3378
- left: T === "buy" ? "0%" : "50%",
3397
+ left: h === "buy" ? "0%" : "50%",
3379
3398
  background: "var(--t-accent)"
3380
3399
  }
3381
3400
  }
3382
3401
  )
3383
3402
  ] })
3384
3403
  ] }) : null,
3385
- we || lt || s ? /* @__PURE__ */ e(un, {}) : /* @__PURE__ */ l("div", { className: "flex-1 overflow-hidden px-5 flex flex-col tab-fade-in", children: [
3386
- /* @__PURE__ */ l(
3404
+ He || Je || xe ? /* @__PURE__ */ e(mn, {}) : /* @__PURE__ */ i("div", { className: "flex-1 overflow-hidden px-5 flex flex-col tab-fade-in", children: [
3405
+ /* @__PURE__ */ i(
3387
3406
  "div",
3388
3407
  {
3389
3408
  className: "px-[18px] pt-[14px] pb-[18px]",
3390
3409
  style: {
3391
3410
  background: "var(--t-surface)",
3392
3411
  borderRadius: 5,
3393
- border: He && Nt ? "1px solid #EF4444" : "1px solid transparent",
3412
+ border: Ne && Nt ? "1px solid #EF4444" : "1px solid transparent",
3394
3413
  minHeight: 102
3395
3414
  },
3396
3415
  children: [
3397
3416
  /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: "You spend" }),
3398
- /* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
3417
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
3399
3418
  /* @__PURE__ */ e(
3400
3419
  "input",
3401
3420
  {
3402
- ref: y,
3421
+ ref: lt,
3403
3422
  type: "text",
3404
- value: Ee,
3423
+ value: D,
3405
3424
  onChange: ca,
3406
- onBlur: () => Le(!0),
3407
- placeholder: R ? "250" : "0.01",
3425
+ onBlur: () => we(!0),
3426
+ placeholder: v ? "250" : "0.01",
3408
3427
  className: "bg-transparent outline-none w-0 flex-1 mr-3",
3409
3428
  style: { color: "var(--t-text)", fontSize: 24, fontWeight: 600, lineHeight: "32px", padding: 0, border: "none", borderRadius: 0, backgroundColor: "transparent", height: "auto", width: 0 },
3410
3429
  inputMode: "decimal",
3411
- disabled: !!((Ft = D == null ? void 0 : D.sourceAmount) != null && Ft.locked)
3430
+ disabled: !!((Ft = I == null ? void 0 : I.sourceAmount) != null && Ft.locked)
3412
3431
  }
3413
3432
  ),
3414
- R ? /* @__PURE__ */ l(
3433
+ v ? /* @__PURE__ */ i(
3415
3434
  "button",
3416
3435
  {
3417
- onClick: () => B("fiat"),
3436
+ onClick: () => H("fiat"),
3418
3437
  className: "flex items-center gap-1.5 shrink-0 transition-colors",
3419
3438
  style: {
3420
3439
  background: "var(--t-pill-bg)",
@@ -3423,18 +3442,18 @@ function bn({
3423
3442
  paddingLeft: 10,
3424
3443
  paddingRight: 10
3425
3444
  },
3426
- disabled: !!((Dt = D == null ? void 0 : D.sourceCurrency) != null && Dt.locked),
3445
+ disabled: !!((Dt = I == null ? void 0 : I.sourceCurrency) != null && Dt.locked),
3427
3446
  children: [
3428
- /* @__PURE__ */ e(pt, { currencyCode: j, size: 16, baseUrl: I }),
3429
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: et }, children: j }),
3447
+ /* @__PURE__ */ e(ht, { currencyCode: R, size: 16, baseUrl: Y }),
3448
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: tt }, children: R }),
3430
3449
  /* @__PURE__ */ e(Ge, {})
3431
3450
  ]
3432
3451
  }
3433
- ) : /* @__PURE__ */ l("div", { className: "flex flex-col items-end shrink-0", children: [
3434
- /* @__PURE__ */ l(
3452
+ ) : /* @__PURE__ */ i("div", { className: "flex flex-col items-end shrink-0", children: [
3453
+ /* @__PURE__ */ i(
3435
3454
  "button",
3436
3455
  {
3437
- onClick: () => B("crypto"),
3456
+ onClick: () => H("crypto"),
3438
3457
  className: "flex items-center gap-1.5 transition-colors",
3439
3458
  style: {
3440
3459
  background: "var(--t-pill-bg)",
@@ -3443,19 +3462,19 @@ function bn({
3443
3462
  paddingLeft: 10,
3444
3463
  paddingRight: 10
3445
3464
  },
3446
- disabled: !!((Mt = D == null ? void 0 : D.destinationCurrency) != null && Mt.locked),
3465
+ disabled: !!((It = I == null ? void 0 : I.destinationCurrency) != null && It.locked),
3447
3466
  children: [
3448
- /* @__PURE__ */ e(Wt, { ticker: F, size: 16, baseUrl: I }),
3449
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: et }, children: F }),
3467
+ /* @__PURE__ */ e($t, { ticker: N, size: 16, baseUrl: Y }),
3468
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: tt }, children: N }),
3450
3469
  /* @__PURE__ */ e(Ge, {})
3451
3470
  ]
3452
3471
  }
3453
3472
  ),
3454
- pe && /* @__PURE__ */ l("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3473
+ pe && /* @__PURE__ */ i("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3455
3474
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
3456
3475
  "img",
3457
3476
  {
3458
- src: ft(pe, I),
3477
+ src: ft(pe, Y),
3459
3478
  alt: pe,
3460
3479
  width: 14,
3461
3480
  height: 14,
@@ -3470,8 +3489,8 @@ function bn({
3470
3489
  ]
3471
3490
  }
3472
3491
  ),
3473
- He && Nt && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: ge || (bt ? "Amount should be more than 0" : R ? `Minimum amount is ${Gt} ${j}` : `Minimum amount is ${$t} ${F}`) }),
3474
- /* @__PURE__ */ l(
3492
+ Ne && Nt && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: ue || (bt ? "Amount should be more than 0" : v ? `Minimum amount is ${Gt} ${R}` : `Minimum amount is ${Wt} ${N}`) }),
3493
+ /* @__PURE__ */ i(
3475
3494
  "div",
3476
3495
  {
3477
3496
  className: "px-[18px] pt-[12px] pb-[14px]",
@@ -3486,21 +3505,21 @@ function bn({
3486
3505
  },
3487
3506
  children: [
3488
3507
  /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
3489
- /* @__PURE__ */ l("div", { className: "flex items-start justify-between", children: [
3490
- H && !he ? /* @__PURE__ */ e(_, { w: 180, h: 32 }) : /* @__PURE__ */ e(
3491
- dn,
3508
+ /* @__PURE__ */ i("div", { className: "flex items-start justify-between", children: [
3509
+ s && !me ? /* @__PURE__ */ e(V, { w: 180, h: 32 }) : /* @__PURE__ */ e(
3510
+ un,
3492
3511
  {
3493
- value: q > 0 ? oa : "0",
3512
+ value: U > 0 ? oa : "0",
3494
3513
  height: 32,
3495
3514
  className: "font-semibold",
3496
- style: { color: q > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
3515
+ style: { color: U > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
3497
3516
  }
3498
3517
  ),
3499
- R ? /* @__PURE__ */ l("div", { className: "flex flex-col items-end shrink-0", children: [
3500
- /* @__PURE__ */ l(
3518
+ v ? /* @__PURE__ */ i("div", { className: "flex flex-col items-end shrink-0", children: [
3519
+ /* @__PURE__ */ i(
3501
3520
  "button",
3502
3521
  {
3503
- onClick: () => B("crypto"),
3522
+ onClick: () => H("crypto"),
3504
3523
  className: "flex items-center gap-1.5 transition-colors",
3505
3524
  style: {
3506
3525
  background: "var(--t-pill-bg)",
@@ -3509,19 +3528,19 @@ function bn({
3509
3528
  paddingLeft: 10,
3510
3529
  paddingRight: 10
3511
3530
  },
3512
- disabled: !!((It = D == null ? void 0 : D.destinationCurrency) != null && It.locked),
3531
+ disabled: !!((Mt = I == null ? void 0 : I.destinationCurrency) != null && Mt.locked),
3513
3532
  children: [
3514
- /* @__PURE__ */ e(Wt, { ticker: F, size: 16, baseUrl: I }),
3515
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: et }, children: F }),
3533
+ /* @__PURE__ */ e($t, { ticker: N, size: 16, baseUrl: Y }),
3534
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: tt }, children: N }),
3516
3535
  /* @__PURE__ */ e(Ge, {})
3517
3536
  ]
3518
3537
  }
3519
3538
  ),
3520
- pe && /* @__PURE__ */ l("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3539
+ pe && /* @__PURE__ */ i("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3521
3540
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
3522
3541
  "img",
3523
3542
  {
3524
- src: ft(pe, I),
3543
+ src: ft(pe, Y),
3525
3544
  alt: pe,
3526
3545
  width: 14,
3527
3546
  height: 14,
@@ -3531,10 +3550,10 @@ function bn({
3531
3550
  ) }),
3532
3551
  /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: Tt })
3533
3552
  ] })
3534
- ] }) : /* @__PURE__ */ l(
3553
+ ] }) : /* @__PURE__ */ i(
3535
3554
  "button",
3536
3555
  {
3537
- onClick: () => B("fiat"),
3556
+ onClick: () => H("fiat"),
3538
3557
  className: "flex items-center gap-1.5 shrink-0 transition-colors",
3539
3558
  style: {
3540
3559
  background: "var(--t-pill-bg)",
@@ -3543,10 +3562,10 @@ function bn({
3543
3562
  paddingLeft: 10,
3544
3563
  paddingRight: 10
3545
3564
  },
3546
- disabled: !!((Bt = D == null ? void 0 : D.sourceCurrency) != null && Bt.locked),
3565
+ disabled: !!((Bt = I == null ? void 0 : I.sourceCurrency) != null && Bt.locked),
3547
3566
  children: [
3548
- /* @__PURE__ */ e(pt, { currencyCode: j, size: 16, baseUrl: I }),
3549
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: et }, children: j }),
3567
+ /* @__PURE__ */ e(ht, { currencyCode: R, size: 16, baseUrl: Y }),
3568
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: tt }, children: R }),
3550
3569
  /* @__PURE__ */ e(Ge, {})
3551
3570
  ]
3552
3571
  }
@@ -3555,35 +3574,35 @@ function bn({
3555
3574
  ]
3556
3575
  }
3557
3576
  ),
3558
- J && q > 0 && /* @__PURE__ */ e(
3577
+ de && U > 0 && /* @__PURE__ */ e(
3559
3578
  "div",
3560
3579
  {
3561
3580
  className: "px-[18px] py-[10px] mt-[2px]",
3562
3581
  style: { background: "var(--t-surface)", fontSize: 12, color: "#EF4444", lineHeight: "16px" },
3563
- children: W || "No providers available for this combination"
3582
+ children: ye || "No providers available for this combination"
3564
3583
  }
3565
3584
  ),
3566
- _e && q > 0 && (S == null ? void 0 : S.bestQuote) && /* @__PURE__ */ l(
3585
+ _e && U > 0 && (F == null ? void 0 : F.bestQuote) && /* @__PURE__ */ i(
3567
3586
  "div",
3568
3587
  {
3569
3588
  className: "flex items-start gap-2 mt-[2px] px-[14px] py-[10px]",
3570
3589
  style: { background: "var(--t-surface)", fontSize: 12, color: "var(--t-text-secondary)", lineHeight: "16px" },
3571
3590
  children: [
3572
- /* @__PURE__ */ l("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0, marginTop: 1 }, children: [
3591
+ /* @__PURE__ */ i("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0, marginTop: 1 }, children: [
3573
3592
  /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.5" }),
3574
3593
  /* @__PURE__ */ e("path", { d: "M8 7v4M8 5.5v-.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
3575
3594
  ] }),
3576
- /* @__PURE__ */ l("span", { children: [
3595
+ /* @__PURE__ */ i("span", { children: [
3577
3596
  "You will be charged for ",
3578
3597
  xt,
3579
3598
  " ",
3580
- F,
3599
+ N,
3581
3600
  ", the rest up to ",
3582
- ht(q),
3601
+ pt(U),
3583
3602
  " ",
3584
- j,
3603
+ R,
3585
3604
  " will be credited to your ",
3586
- $,
3605
+ _,
3587
3606
  " account"
3588
3607
  ] })
3589
3608
  ]
@@ -3595,18 +3614,18 @@ function bn({
3595
3614
  className: "flex items-center justify-between mt-[2px] px-[18px] pt-[12px] pb-[14px]",
3596
3615
  style: {
3597
3616
  background: "var(--t-surface)",
3598
- ...!ue.length && !((Ot = Q == null ? void 0 : Q.paymentMethods) != null && Ot.length) ? { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 } : {}
3617
+ ...!Q.length && !((Ot = q == null ? void 0 : q.paymentMethods) != null && Ot.length) ? { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 } : {}
3599
3618
  },
3600
- children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: v ? "var(--t-success)" : "var(--t-text-secondary)" }, children: ia || " " })
3619
+ children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: S ? "var(--t-success)" : "var(--t-text-secondary)" }, children: ia || " " })
3601
3620
  }
3602
3621
  ),
3603
- (ue.length > 0 || (Q == null ? void 0 : Q.paymentMethods) && Q.paymentMethods.length > 0) && /* @__PURE__ */ e("div", { className: "mt-[2px]", children: ue.length > 0 ? /* @__PURE__ */ e(
3604
- tn,
3622
+ (Q.length > 0 || (q == null ? void 0 : q.paymentMethods) && q.paymentMethods.length > 0) && /* @__PURE__ */ e("div", { className: "mt-[2px]", children: Q.length > 0 ? /* @__PURE__ */ e(
3623
+ an,
3605
3624
  {
3606
- methods: ue,
3607
- selectedId: b.paymentMethodId,
3608
- onOpenModal: () => B("payment"),
3609
- fiatCurrency: b.fiatCurrency
3625
+ methods: Q,
3626
+ selectedId: g.paymentMethodId,
3627
+ onOpenModal: () => H("payment"),
3628
+ fiatCurrency: g.fiatCurrency
3610
3629
  }
3611
3630
  ) : /* @__PURE__ */ e(
3612
3631
  "div",
@@ -3620,24 +3639,24 @@ function bn({
3620
3639
  children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: "No payment methods for this pair" })
3621
3640
  }
3622
3641
  ) }),
3623
- /* @__PURE__ */ l("div", { className: "mt-8", children: [
3624
- /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: R ? "Receiving wallet address" : "Sending wallet address" }),
3642
+ /* @__PURE__ */ i("div", { className: "mt-8", children: [
3643
+ /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: v ? "Receiving wallet address" : "Sending wallet address" }),
3625
3644
  /* @__PURE__ */ e(
3626
3645
  "input",
3627
3646
  {
3628
3647
  type: "text",
3629
- value: b.walletAddress,
3630
- onChange: (x) => U({ type: "SET_WALLET_ADDRESS", address: x.target.value }),
3648
+ value: g.walletAddress,
3649
+ onChange: (x) => T({ type: "SET_WALLET_ADDRESS", address: x.target.value }),
3631
3650
  onFocus: () => Ye(!0),
3632
3651
  onBlur: () => {
3633
- Ye(!1), Xe(!0);
3652
+ Ye(!1), Te(!0);
3634
3653
  },
3635
- placeholder: R ? "Enter your receiving address" : "Enter your sending address",
3654
+ placeholder: v ? "Enter your receiving address" : "Enter your sending address",
3636
3655
  spellCheck: !1,
3637
3656
  autoComplete: "off",
3638
3657
  className: "w-full bg-transparent text-[13px] outline-none transition-colors",
3639
3658
  style: {
3640
- border: b.walletError || Pe && !ct ? "1px solid #EF4444" : ie ? "1px solid var(--t-border-focus)" : "1px solid var(--t-border)",
3659
+ border: g.walletError || $e && !ct ? "1px solid #EF4444" : Xe ? "1px solid var(--t-border-focus)" : "1px solid var(--t-border)",
3641
3660
  outline: "none",
3642
3661
  boxShadow: "none",
3643
3662
  borderRadius: 3.5,
@@ -3647,112 +3666,112 @@ function bn({
3647
3666
  fontSize: 13,
3648
3667
  backgroundColor: "transparent"
3649
3668
  },
3650
- disabled: !!((Ht = D == null ? void 0 : D.destinationAddress) != null && Ht.locked)
3669
+ disabled: !!((Ht = I == null ? void 0 : I.destinationAddress) != null && Ht.locked)
3651
3670
  }
3652
3671
  ),
3653
- b.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: b.walletError }) : Pe && !ct && !fe ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : fe && b.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
3672
+ g.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: g.walletError }) : $e && !ct && !P ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : P && g.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
3654
3673
  ] }),
3655
3674
  /* @__PURE__ */ e("div", { className: "flex-1", style: { minHeight: 16 } }),
3656
- z && /* @__PURE__ */ l("div", { className: "text-[12px] text-center mb-2", style: { color: "#EF4444" }, children: [
3675
+ te && /* @__PURE__ */ i("div", { className: "text-[12px] text-center mb-2", style: { color: "#EF4444" }, children: [
3657
3676
  "This currency is not available for ",
3658
- R ? "buy" : "sell",
3677
+ v ? "buy" : "sell",
3659
3678
  " orders"
3660
3679
  ] }),
3661
3680
  /* @__PURE__ */ e(
3662
3681
  "button",
3663
3682
  {
3664
- disabled: !Je || se || he || z || J,
3665
- onClick: pa,
3683
+ disabled: !qe || ee || me || te || de,
3684
+ onClick: ha,
3666
3685
  className: "w-full font-semibold text-[16px] transition-all",
3667
3686
  style: {
3668
3687
  height: 60,
3669
3688
  borderRadius: 5,
3670
3689
  background: "var(--t-cta-bg)",
3671
3690
  color: "var(--t-cta-text)",
3672
- opacity: Je && !se && !he && !z && !J ? 1 : 0.4,
3673
- cursor: Je && !se && !he && !z && !J ? "pointer" : "not-allowed"
3691
+ opacity: qe && !ee && !me && !te && !de ? 1 : 0.4,
3692
+ cursor: qe && !ee && !me && !te && !de ? "pointer" : "not-allowed"
3674
3693
  },
3675
- children: he ? "Getting best price..." : se ? "Processing..." : R ? `Buy ${F}` : `Sell ${F}`
3694
+ children: me ? "Getting best price..." : ee ? "Processing..." : v ? `Buy ${N}` : `Sell ${N}`
3676
3695
  }
3677
3696
  ),
3678
3697
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
3679
- ] }, T),
3680
- /* @__PURE__ */ e(je, { isOpen: me === "fiat", onClose: () => B(null), children: (x) => /* @__PURE__ */ e(
3681
- mn,
3698
+ ] }, h),
3699
+ /* @__PURE__ */ e(je, { isOpen: Se === "fiat", onClose: () => H(null), children: (x) => /* @__PURE__ */ e(
3700
+ fn,
3682
3701
  {
3683
3702
  onClose: x,
3684
- onSelect: (N) => {
3685
- sa(N), x();
3703
+ onSelect: (E) => {
3704
+ sa(E), x();
3686
3705
  },
3687
- currencies: oe.map((N) => ({ code: N.code, name: N.code })),
3688
- assetBaseUrl: I,
3689
- selectedCode: b.fiatCurrency
3706
+ currencies: ke.map((E) => ({ code: E.code, name: E.code })),
3707
+ assetBaseUrl: Y,
3708
+ selectedCode: g.fiatCurrency
3690
3709
  }
3691
3710
  ) }),
3692
- /* @__PURE__ */ e(je, { isOpen: me === "crypto", onClose: () => B(null), children: (x) => /* @__PURE__ */ e(
3693
- fn,
3711
+ /* @__PURE__ */ e(je, { isOpen: Se === "crypto", onClose: () => H(null), children: (x) => /* @__PURE__ */ e(
3712
+ pn,
3694
3713
  {
3695
3714
  onClose: x,
3696
- onSelect: (N, P) => {
3697
- da(N, P), x();
3715
+ onSelect: (E, K) => {
3716
+ da(E, K), x();
3698
3717
  },
3699
- cryptos: de.map((N) => {
3700
- var P;
3718
+ cryptos: se.map((E) => {
3719
+ var K;
3701
3720
  return {
3702
- code: N.code,
3703
- name: N.code,
3704
- networks: (P = N.networks) == null ? void 0 : P.map((G) => ({ code: G.id, name: G.name }))
3721
+ code: E.code,
3722
+ name: E.code,
3723
+ networks: (K = E.networks) == null ? void 0 : K.map((X) => ({ code: X.id, name: X.name }))
3705
3724
  };
3706
3725
  }),
3707
- assetBaseUrl: I,
3708
- selectedCode: b.cryptoCurrency,
3709
- selectedChain: b.network
3726
+ assetBaseUrl: Y,
3727
+ selectedCode: g.cryptoCurrency,
3728
+ selectedChain: g.network
3710
3729
  }
3711
3730
  ) }),
3712
- /* @__PURE__ */ e(je, { isOpen: me === "payment", onClose: () => B(null), children: (x) => /* @__PURE__ */ e(
3731
+ /* @__PURE__ */ e(je, { isOpen: Se === "payment", onClose: () => H(null), children: (x) => /* @__PURE__ */ e(
3713
3732
  hn,
3714
3733
  {
3715
- methods: ue,
3716
- selectedId: b.paymentMethodId,
3717
- onSelect: (N) => {
3718
- ua(N), x();
3734
+ methods: Q,
3735
+ selectedId: g.paymentMethodId,
3736
+ onSelect: (E) => {
3737
+ ua(E), x();
3719
3738
  },
3720
3739
  onClose: x
3721
3740
  }
3722
3741
  ) }),
3723
- /* @__PURE__ */ e(je, { isOpen: me === "settings", onClose: () => B(null), children: (x) => /* @__PURE__ */ e(
3724
- Cn,
3742
+ /* @__PURE__ */ e(je, { isOpen: Se === "settings", onClose: () => H(null), children: (x) => /* @__PURE__ */ e(
3743
+ gn,
3725
3744
  {
3726
3745
  onClose: x,
3727
- darkMode: ne,
3728
- onToggleDarkMode: Te,
3729
- skinId: We,
3730
- onSelectSkin: (N) => {
3731
- Oe(N);
3746
+ darkMode: re,
3747
+ onToggleDarkMode: $,
3748
+ skinId: be,
3749
+ onSelectSkin: (E) => {
3750
+ Oe(E);
3732
3751
  },
3733
- showThemeToggle: L,
3734
- country: b.country,
3735
- countryName: ha,
3752
+ showThemeToggle: y,
3753
+ country: g.country,
3754
+ countryName: pa,
3736
3755
  onLocationPress: fa,
3737
- assetBaseUrl: I
3756
+ assetBaseUrl: Y
3738
3757
  }
3739
3758
  ) }),
3740
- /* @__PURE__ */ e(je, { isOpen: me === "country", onClose: () => B(null), children: (x) => /* @__PURE__ */ e(
3741
- xn,
3759
+ /* @__PURE__ */ e(je, { isOpen: Se === "country", onClose: () => H(null), children: (x) => /* @__PURE__ */ e(
3760
+ vn,
3742
3761
  {
3743
3762
  onClose: x,
3744
- onSelect: (N) => {
3745
- ma(N), x();
3763
+ onSelect: (E) => {
3764
+ ma(E), x();
3746
3765
  },
3747
- assetBaseUrl: I,
3748
- selectedCode: b.country
3766
+ assetBaseUrl: Y,
3767
+ selectedCode: g.country
3749
3768
  }
3750
3769
  ) })
3751
3770
  ]
3752
3771
  }
3753
3772
  );
3754
3773
  }
3755
- function Sn({
3774
+ function Nn({
3756
3775
  projectId: t,
3757
3776
  apiUrl: a,
3758
3777
  assetBaseUrl: n,
@@ -3760,45 +3779,45 @@ function Sn({
3760
3779
  customerId: o,
3761
3780
  brandId: d,
3762
3781
  defaultFiatCurrency: u,
3763
- defaultCryptoCurrency: i,
3782
+ defaultCryptoCurrency: l,
3764
3783
  defaultNetwork: c,
3765
3784
  defaultFiatAmount: m,
3766
- defaultCryptoAmount: h,
3785
+ defaultCryptoAmount: p,
3767
3786
  defaultWalletAddress: f,
3768
- defaultGateway: p,
3769
- defaultCountry: v,
3770
- fieldLocks: C,
3771
- partnerMetadata: E,
3772
- statusPollInterval: L,
3773
- onComplete: K,
3774
- onError: ee,
3775
- className: Z,
3776
- theme: Y,
3777
- skinId: te,
3778
- accentColor: $,
3779
- bgColor: le,
3780
- bgImage: b,
3781
- borderColor: U,
3782
- borderRadius: Q,
3783
- surfaceColor: s,
3784
- inputBgColor: S,
3785
- textColor: H,
3786
- textSecondaryColor: g,
3787
- textMutedColor: ce,
3788
- successColor: Ce,
3789
- showFlowToggle: se,
3790
- showSettings: ge,
3791
- showThemeToggle: D,
3792
- autoRedirect: Ne,
3793
- explorerUrl: I,
3794
- doneButtonText: oe,
3795
- supportEmail: de,
3796
- stablecoinParity: ue,
3797
- partnerName: z,
3798
- onDone: J
3787
+ defaultGateway: C,
3788
+ defaultCountry: S,
3789
+ fieldLocks: k,
3790
+ partnerMetadata: w,
3791
+ statusPollInterval: y,
3792
+ onComplete: O,
3793
+ onError: le,
3794
+ className: G,
3795
+ theme: z,
3796
+ skinId: ce,
3797
+ accentColor: _,
3798
+ bgColor: ne,
3799
+ bgImage: g,
3800
+ borderColor: T,
3801
+ borderRadius: q,
3802
+ surfaceColor: xe,
3803
+ inputBgColor: F,
3804
+ textColor: s,
3805
+ textSecondaryColor: L,
3806
+ textMutedColor: W,
3807
+ successColor: b,
3808
+ showFlowToggle: ee,
3809
+ showSettings: ue,
3810
+ showThemeToggle: I,
3811
+ autoRedirect: ve,
3812
+ explorerUrl: Y,
3813
+ doneButtonText: ke,
3814
+ supportEmail: se,
3815
+ stablecoinParity: Q,
3816
+ partnerName: te,
3817
+ onDone: de
3799
3818
  }) {
3800
3819
  return /* @__PURE__ */ e(
3801
- Ia,
3820
+ Ba,
3802
3821
  {
3803
3822
  projectId: t,
3804
3823
  apiUrl: a,
@@ -3807,58 +3826,58 @@ function Sn({
3807
3826
  customerId: o,
3808
3827
  brandId: d,
3809
3828
  defaultFiatCurrency: u,
3810
- defaultCryptoCurrency: i,
3829
+ defaultCryptoCurrency: l,
3811
3830
  defaultNetwork: c,
3812
3831
  defaultFiatAmount: m,
3813
- defaultCryptoAmount: h,
3832
+ defaultCryptoAmount: p,
3814
3833
  defaultWalletAddress: f,
3815
- defaultGateway: p,
3816
- defaultCountry: v,
3817
- fieldLocks: C,
3818
- partnerMetadata: E,
3819
- statusPollInterval: L,
3820
- onComplete: K,
3821
- onError: ee,
3834
+ defaultGateway: C,
3835
+ defaultCountry: S,
3836
+ fieldLocks: k,
3837
+ partnerMetadata: w,
3838
+ statusPollInterval: y,
3839
+ onComplete: O,
3840
+ onError: le,
3822
3841
  children: /* @__PURE__ */ e(
3823
- bn,
3842
+ Sn,
3824
3843
  {
3825
- className: Z,
3826
- theme: Y,
3827
- skinId: te,
3828
- accentColor: $,
3829
- bgColor: le,
3830
- bgImage: b,
3831
- borderColor: U,
3832
- borderRadius: Q,
3833
- surfaceColor: s,
3834
- inputBgColor: S,
3835
- textColor: H,
3836
- textSecondaryColor: g,
3837
- textMutedColor: ce,
3838
- successColor: Ce,
3839
- showFlowToggle: se,
3840
- showSettings: ge,
3841
- showThemeToggle: D,
3842
- autoRedirect: Ne,
3843
- explorerUrl: I,
3844
- doneButtonText: oe,
3845
- supportEmail: de,
3846
- stablecoinParity: ue,
3847
- partnerName: z,
3848
- onDone: J
3844
+ className: G,
3845
+ theme: z,
3846
+ skinId: ce,
3847
+ accentColor: _,
3848
+ bgColor: ne,
3849
+ bgImage: g,
3850
+ borderColor: T,
3851
+ borderRadius: q,
3852
+ surfaceColor: xe,
3853
+ inputBgColor: F,
3854
+ textColor: s,
3855
+ textSecondaryColor: L,
3856
+ textMutedColor: W,
3857
+ successColor: b,
3858
+ showFlowToggle: ee,
3859
+ showSettings: ue,
3860
+ showThemeToggle: I,
3861
+ autoRedirect: ve,
3862
+ explorerUrl: Y,
3863
+ doneButtonText: ke,
3864
+ supportEmail: se,
3865
+ stablecoinParity: Q,
3866
+ partnerName: te,
3867
+ onDone: de
3849
3868
  }
3850
3869
  )
3851
3870
  }
3852
3871
  );
3853
3872
  }
3854
- function Fn({
3873
+ function Dn({
3855
3874
  submitButtonText: t,
3856
3875
  rateRefreshInterval: a,
3857
3876
  ...n
3858
3877
  }) {
3859
- return /* @__PURE__ */ e(Sn, { ...n });
3878
+ return /* @__PURE__ */ e(Nn, { ...n });
3860
3879
  }
3861
- function Dn({
3880
+ function In({
3862
3881
  skin: t,
3863
3882
  active: a,
3864
3883
  onClick: n,
@@ -3866,14 +3885,14 @@ function Dn({
3866
3885
  dimmed: o
3867
3886
  }) {
3868
3887
  const d = t.accent === null, u = 32;
3869
- return /* @__PURE__ */ l(
3888
+ return /* @__PURE__ */ i(
3870
3889
  "button",
3871
3890
  {
3872
3891
  onClick: n,
3873
3892
  className: "relative shrink-0",
3874
3893
  style: { width: u, height: u, opacity: o ? 0.4 : 1, transition: "opacity 0.2s" },
3875
3894
  children: [
3876
- d ? /* @__PURE__ */ l("svg", { width: u, height: u, viewBox: "0 0 32 32", children: [
3895
+ d ? /* @__PURE__ */ i("svg", { width: u, height: u, viewBox: "0 0 32 32", children: [
3877
3896
  /* @__PURE__ */ e("clipPath", { id: "mono-left", children: /* @__PURE__ */ e("rect", { x: "0", y: "0", width: "16", height: "32" }) }),
3878
3897
  /* @__PURE__ */ e("clipPath", { id: "mono-right", children: /* @__PURE__ */ e("rect", { x: "16", y: "0", width: "16", height: "32" }) }),
3879
3898
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "#111111", clipPath: "url(#mono-left)" }),
@@ -3891,13 +3910,13 @@ function Dn({
3891
3910
  }
3892
3911
  );
3893
3912
  }
3894
- function Nn({ quote: t }) {
3895
- return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Best price" }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Recommended" }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ l("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
3913
+ function wn({ quote: t }) {
3914
+ return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Best price" }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Recommended" }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ i("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
3896
3915
  "#",
3897
3916
  t.rank
3898
3917
  ] }) : null;
3899
3918
  }
3900
- function wn({ quote: t }) {
3919
+ function En({ quote: t }) {
3901
3920
  return t.gatewayLogo ? /* @__PURE__ */ e(
3902
3921
  "img",
3903
3922
  {
@@ -3910,8 +3929,8 @@ function wn({ quote: t }) {
3910
3929
  }
3911
3930
  ) : /* @__PURE__ */ e(gt, { size: 36 });
3912
3931
  }
3913
- function En() {
3914
- return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ l(
3932
+ function An() {
3933
+ return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ i(
3915
3934
  "div",
3916
3935
  {
3917
3936
  className: "w-full flex items-center gap-3.5",
@@ -3923,14 +3942,14 @@ function En() {
3923
3942
  background: "var(--t-surface)"
3924
3943
  },
3925
3944
  children: [
3926
- /* @__PURE__ */ e(_, { w: 36, h: 36, className: "rounded-full shrink-0" }),
3927
- /* @__PURE__ */ l("div", { className: "flex-1", children: [
3928
- /* @__PURE__ */ e(_, { w: 90, h: 14, className: "mb-1.5" }),
3929
- /* @__PURE__ */ e(_, { w: 60, h: 12 })
3945
+ /* @__PURE__ */ e(V, { w: 36, h: 36, className: "rounded-full shrink-0" }),
3946
+ /* @__PURE__ */ i("div", { className: "flex-1", children: [
3947
+ /* @__PURE__ */ e(V, { w: 90, h: 14, className: "mb-1.5" }),
3948
+ /* @__PURE__ */ e(V, { w: 60, h: 12 })
3930
3949
  ] }),
3931
- /* @__PURE__ */ l("div", { className: "text-right", children: [
3932
- /* @__PURE__ */ e(_, { w: 40, h: 10, className: "mb-1.5" }),
3933
- /* @__PURE__ */ e(_, { w: 80, h: 14 })
3950
+ /* @__PURE__ */ i("div", { className: "text-right", children: [
3951
+ /* @__PURE__ */ e(V, { w: 40, h: 10, className: "mb-1.5" }),
3952
+ /* @__PURE__ */ e(V, { w: 80, h: 14 })
3934
3953
  ] })
3935
3954
  ]
3936
3955
  },
@@ -3944,12 +3963,12 @@ function Mn({
3944
3963
  quotesLoading: r,
3945
3964
  cryptoCurrency: o
3946
3965
  }) {
3947
- const [d, u] = w(""), i = V(() => {
3966
+ const [d, u] = A(""), l = j(() => {
3948
3967
  if (!(n != null && n.quotes)) return [];
3949
3968
  const c = d.trim().toLowerCase();
3950
3969
  return c ? n.quotes.filter((m) => m.gatewayName.toLowerCase().includes(c)) : n.quotes;
3951
3970
  }, [n, d]);
3952
- return /* @__PURE__ */ l(ae, { children: [
3971
+ return /* @__PURE__ */ i(ae, { children: [
3953
3972
  /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Be, { onClick: t }) }),
3954
3973
  /* @__PURE__ */ e(
3955
3974
  "h2",
@@ -3959,35 +3978,35 @@ function Mn({
3959
3978
  children: "Choose Ramp"
3960
3979
  }
3961
3980
  ),
3962
- /* @__PURE__ */ e($e, { value: d, onChange: u }),
3963
- /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
3964
- r ? /* @__PURE__ */ e(En, {}) : i.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : i.map((c, m) => {
3965
- const h = m === 0, f = parseFloat(c.cryptoAmount), p = f >= 1 ? f.toFixed(4) : f.toPrecision(6);
3966
- return /* @__PURE__ */ l(
3981
+ /* @__PURE__ */ e(We, { value: d, onChange: u }),
3982
+ /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
3983
+ r ? /* @__PURE__ */ e(An, {}) : l.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : l.map((c, m) => {
3984
+ const p = m === 0, f = parseFloat(c.cryptoAmount), C = f >= 1 ? f.toFixed(4) : f.toPrecision(6);
3985
+ return /* @__PURE__ */ i(
3967
3986
  "button",
3968
3987
  {
3969
3988
  onClick: () => a(c),
3970
3989
  className: "w-full flex items-center gap-3.5 transition-colors",
3971
3990
  style: {
3972
- borderRadius: h ? 4.5 : 5,
3973
- height: h ? 63 : 64,
3991
+ borderRadius: p ? 4.5 : 5,
3992
+ height: p ? 63 : 64,
3974
3993
  paddingLeft: 16,
3975
3994
  paddingRight: 16,
3976
- border: h ? "1px solid var(--t-border)" : "1px solid transparent",
3977
- background: h ? "transparent" : "var(--t-surface)"
3995
+ border: p ? "1px solid var(--t-border)" : "1px solid transparent",
3996
+ background: p ? "transparent" : "var(--t-surface)"
3978
3997
  },
3979
3998
  children: [
3980
- /* @__PURE__ */ e(wn, { quote: c }),
3981
- /* @__PURE__ */ l("div", { className: "text-left flex-1 min-w-0", children: [
3999
+ /* @__PURE__ */ e(En, { quote: c }),
4000
+ /* @__PURE__ */ i("div", { className: "text-left flex-1 min-w-0", children: [
3982
4001
  /* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: c.gatewayName }),
3983
- /* @__PURE__ */ e(Nn, { quote: c })
4002
+ /* @__PURE__ */ e(wn, { quote: c })
3984
4003
  ] }),
3985
- /* @__PURE__ */ l("div", { className: "text-right shrink-0", children: [
4004
+ /* @__PURE__ */ i("div", { className: "text-right shrink-0", children: [
3986
4005
  /* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
3987
- /* @__PURE__ */ l("div", { className: "font-medium text-[14px]", style: { color: "var(--t-text)" }, children: [
4006
+ /* @__PURE__ */ i("div", { className: "font-medium text-[14px]", style: { color: "var(--t-text)" }, children: [
3988
4007
  o,
3989
4008
  " ",
3990
- p
4009
+ C
3991
4010
  ] })
3992
4011
  ] })
3993
4012
  ]
@@ -3995,7 +4014,7 @@ function Mn({
3995
4014
  c.gatewayId
3996
4015
  );
3997
4016
  }),
3998
- !r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((c) => /* @__PURE__ */ l(
4017
+ !r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((c) => /* @__PURE__ */ i(
3999
4018
  "div",
4000
4019
  {
4001
4020
  className: "flex items-center justify-between py-2 text-[12px]",
@@ -4011,64 +4030,64 @@ function Mn({
4011
4030
  ] });
4012
4031
  }
4013
4032
  export {
4014
- sn as AnimatedDigit,
4015
- dn as AnimatedNumber,
4016
- Ga as ApplePayIcon,
4033
+ dn as AnimatedDigit,
4034
+ un as AnimatedNumber,
4035
+ Wa as ApplePayIcon,
4017
4036
  Ve as BLOCKCHAINS,
4018
- Va as BankIcon,
4019
- at as COUNTRIES,
4037
+ ja as BankIcon,
4038
+ nt as COUNTRIES,
4020
4039
  yt as COUNTRY_MAP,
4021
- _a as CRYPTO_CHAIN_COMBOS,
4040
+ Va as CRYPTO_CHAIN_COMBOS,
4022
4041
  Jt as CRYPTO_CURRENCIES,
4023
- Za as CardIcon,
4024
- Fn as CheckoutForm,
4025
- an as CheckoutStep,
4042
+ Qa as CardIcon,
4043
+ Dn as CheckoutForm,
4044
+ nn as CheckoutStep,
4026
4045
  Ge as ChevronDown,
4027
4046
  Xt as ChevronRight,
4028
4047
  Mn as ChooseRampModal,
4029
4048
  Be as CloseButton,
4030
- Un as CoinifyIcon,
4031
- on as CompleteStep,
4032
- cn as ConfirmStep,
4033
- xn as CountryPickerModal,
4034
- fn as CryptoCurrencyModal,
4035
- Wt as CryptoIcon,
4036
- za as DarkModeIcon,
4037
- ln as ErrorStep,
4049
+ Fn as CoinifyIcon,
4050
+ ln as CompleteStep,
4051
+ sn as ConfirmStep,
4052
+ vn as CountryPickerModal,
4053
+ pn as CryptoCurrencyModal,
4054
+ $t as CryptoIcon,
4055
+ Ja as DarkModeIcon,
4056
+ cn as ErrorStep,
4038
4057
  _t as FIAT_CURRENCIES,
4039
- Oa as FIAT_TO_COUNTRY,
4040
- mn as FiatCurrencyModal,
4041
- pt as FiatFlag,
4042
- un as FormSkeleton,
4058
+ Ha as FIAT_TO_COUNTRY,
4059
+ fn as FiatCurrencyModal,
4060
+ ht as FiatFlag,
4061
+ mn as FormSkeleton,
4043
4062
  gt as GenericCoinIcon,
4044
4063
  $a as GooglePayIcon,
4045
4064
  jt as MOCK_RATES,
4046
- Qa as MenuIcon,
4065
+ za as MenuIcon,
4047
4066
  je as Modal,
4048
- Wa as PayPalIcon,
4049
- tn as PaymentMethodSelector,
4050
- rn as ProcessingStep,
4051
- Sn as RampForm,
4052
- Ia as RampProvider,
4053
- ja as RevolutIcon,
4067
+ Xa as PayPalIcon,
4068
+ an as PaymentMethodSelector,
4069
+ on as ProcessingStep,
4070
+ Nn as RampForm,
4071
+ Ba as RampProvider,
4072
+ Ga as RevolutIcon,
4054
4073
  Vt as SKINS,
4055
- $e as SearchInput,
4056
- Cn as SettingsScreen,
4057
- _ as Skeleton,
4058
- Dn as SkinSwatch,
4059
- pn as ToggleSwitch,
4060
- ht as formatOutput,
4074
+ We as SearchInput,
4075
+ gn as SettingsScreen,
4076
+ V as Skeleton,
4077
+ In as SkinSwatch,
4078
+ yn as ToggleSwitch,
4079
+ pt as formatOutput,
4061
4080
  ft as getChainIconUrl,
4062
4081
  qt as getCryptoIconUrl,
4063
4082
  mt as getDefaultFiatForCountry,
4064
- Ha as getFiatFlagUrl,
4065
- Ln as getMockRate,
4066
- Ja as getPaymentIcon,
4083
+ Pa as getFiatFlagUrl,
4084
+ Un as getMockRate,
4085
+ qa as getPaymentIcon,
4067
4086
  ea as isStablecoin,
4068
- Ka as parseAmount,
4087
+ _a as parseAmount,
4069
4088
  wa as useCheckoutIntent,
4070
4089
  Na as useQuotes,
4071
- Ie as useRamp,
4090
+ Me as useRamp,
4072
4091
  Sa as useRampConfig,
4073
4092
  Ea as useTransaction
4074
4093
  };