@nowramp/form 0.2.0-beta.7 → 0.2.0-beta.9

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,13 +8,13 @@
8
8
  }`;
9
9
  document.head.appendChild(s);
10
10
  })();
11
- import { jsx as e, jsxs as l, Fragment as X } from "react/jsx-runtime";
12
- import Ce, { useState as b, useRef as M, useCallback as P, useEffect as H, useMemo as _, useReducer as Ja, useContext as ya, createContext as ga } from "react";
11
+ import { jsx as e, jsxs as l, Fragment as Y } from "react/jsx-runtime";
12
+ import Ce, { useState as b, useRef as M, useCallback as P, useEffect as H, useMemo as _, useReducer as qa, useContext as ga, createContext as xa } from "react";
13
13
  import { RampApi as ft } from "@nowramp/sdk";
14
14
  import { createPortal as ia } from "react-dom";
15
- function qa(t, a, n) {
16
- const [r, o] = b(null), [s, u] = b(!0), [i, d] = b(null), c = M(null);
17
- (!c.current || c.current !== t) && (c.current = new ft({ apiKey: "", ...t }));
15
+ function en(t, a, n) {
16
+ const [r, o] = b(null), [s, u] = b(!0), [c, d] = b(null), i = M(null);
17
+ (!i.current || i.current !== t) && (i.current = new ft({ apiKey: "", ...t }));
18
18
  const h = P(async () => {
19
19
  if (!t.projectId) {
20
20
  d(new Error("projectId is required")), u(!1);
@@ -24,7 +24,7 @@ function qa(t, a, n) {
24
24
  try {
25
25
  const p = {};
26
26
  a && (p.orderType = a), n && (p.country = n);
27
- const f = await c.current.getSupported(p);
27
+ const f = await i.current.getSupported(p);
28
28
  o(f);
29
29
  } catch (p) {
30
30
  d(p instanceof Error ? p : new Error("Failed to fetch config"));
@@ -34,11 +34,11 @@ function qa(t, a, n) {
34
34
  }, [t.projectId, a, n]);
35
35
  return H(() => {
36
36
  h();
37
- }, [h]), { config: r, loading: s, error: i, refetch: h };
37
+ }, [h]), { config: r, loading: s, error: c, refetch: h };
38
38
  }
39
- function en(t, a) {
40
- const [n, r] = b(null), [o, s] = b(!1), [u, i] = b(null), d = M(null), c = M(""), h = `${t.apiUrl}|${t.projectId}`;
41
- (!d.current || c.current !== h) && (d.current = new ft({ apiKey: "", ...t }), c.current = h);
39
+ function tn(t, a) {
40
+ const [n, r] = b(null), [o, s] = b(!1), [u, c] = b(null), d = M(null), i = M(""), h = `${t.apiUrl}|${t.projectId}`;
41
+ (!d.current || i.current !== h) && (d.current = new ft({ apiKey: "", ...t }), i.current = h);
42
42
  const p = M(0);
43
43
  H(() => {
44
44
  const g = ++p.current;
@@ -46,23 +46,23 @@ function en(t, a) {
46
46
  r(null), s(!1);
47
47
  return;
48
48
  }
49
- s(!0), i(null), d.current.getQuotes(a).then(
49
+ s(!0), c(null), d.current.getQuotes(a).then(
50
50
  (k) => {
51
51
  p.current === g && (r(k), s(!1));
52
52
  },
53
53
  (k) => {
54
- p.current === g && (i(k instanceof Error ? k : new Error("Failed to fetch quotes")), r(null), s(!1));
54
+ p.current === g && (c(k instanceof Error ? k : new Error("Failed to fetch quotes")), r(null), s(!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
58
  const f = P(async () => {
59
59
  if (!(!a || !t.projectId)) {
60
- s(!0), i(null);
60
+ s(!0), c(null);
61
61
  try {
62
62
  const g = await d.current.getQuotes(a);
63
63
  r(g);
64
64
  } catch (g) {
65
- i(g instanceof Error ? g : new Error("Failed to fetch quotes"));
65
+ c(g instanceof Error ? g : new Error("Failed to fetch quotes"));
66
66
  } finally {
67
67
  s(!1);
68
68
  }
@@ -70,13 +70,13 @@ function en(t, a) {
70
70
  }, [t.projectId, a]);
71
71
  return { quotes: n, loading: o, error: u, refetch: f };
72
72
  }
73
- function tn(t) {
74
- const [a, n] = b(null), [r, o] = b(!1), [s, u] = b(null), i = M(null), d = M(""), c = `${t.apiUrl}|${t.projectId}`;
75
- (!i.current || d.current !== c) && (i.current = new ft({ apiKey: "", ...t }), d.current = c);
73
+ function an(t) {
74
+ const [a, n] = b(null), [r, o] = b(!1), [s, u] = b(null), c = M(null), d = M(""), i = `${t.apiUrl}|${t.projectId}`;
75
+ (!c.current || d.current !== i) && (c.current = new ft({ apiKey: "", ...t }), d.current = i);
76
76
  const h = P(async (f) => {
77
77
  o(!0), u(null);
78
78
  try {
79
- const g = await i.current.createCheckoutIntent(f);
79
+ const g = await c.current.createCheckoutIntent(f);
80
80
  return n(g), g;
81
81
  } catch (g) {
82
82
  const k = g instanceof Error ? g : new Error("Failed to create checkout intent");
@@ -89,14 +89,14 @@ function tn(t) {
89
89
  }, []);
90
90
  return { order: a, loading: r, error: s, createOrder: h, reset: p };
91
91
  }
92
- function an(t, a, n) {
93
- const [r, o] = b(null), [s, u] = b(!1), [i, d] = b(null), c = M(null);
94
- c.current || (c.current = new ft({ apiKey: "", projectId: "", ...t }));
92
+ function nn(t, a, n) {
93
+ const [r, o] = b(null), [s, u] = b(!1), [c, d] = b(null), i = M(null);
94
+ i.current || (i.current = new ft({ apiKey: "", projectId: "", ...t }));
95
95
  const h = P(async () => {
96
96
  if (a) {
97
97
  u(!0), d(null);
98
98
  try {
99
- const p = await c.current.getTransaction(a);
99
+ const p = await i.current.getTransaction(a);
100
100
  o(p);
101
101
  } catch (p) {
102
102
  d(p instanceof Error ? p : new Error("Failed to fetch status"));
@@ -118,7 +118,7 @@ function an(t, a, n) {
118
118
  return;
119
119
  const f = setInterval(h, n.pollInterval);
120
120
  return () => clearInterval(f);
121
- }, [a, n == null ? void 0 : n.pollInterval, r == null ? void 0 : r.status, h]), { status: r, loading: s, error: i, refetch: h };
121
+ }, [a, n == null ? void 0 : n.pollInterval, r == null ? void 0 : r.status, h]), { status: r, loading: s, error: c, refetch: h };
122
122
  }
123
123
  const pt = [
124
124
  { code: "ad", name: "Andorra", defaultFiat: "EUR" },
@@ -324,10 +324,10 @@ const yt = !0;
324
324
  function Ht(t, a, n = yt) {
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 nn(t, a, n = yt) {
327
+ function rn(t, a, n = yt) {
328
328
  return t.filter((r) => Ht(r.providers, a, n));
329
329
  }
330
- function rn(t, a, n = yt) {
330
+ function on(t, a, n = yt) {
331
331
  const r = [];
332
332
  for (const o of t) {
333
333
  const s = o.networks.filter(
@@ -339,73 +339,73 @@ function rn(t, a, n = yt) {
339
339
  }
340
340
  return r;
341
341
  }
342
- function on(t, a, n, r = yt) {
342
+ function ln(t, a, n, r = yt) {
343
343
  return n ? t.filter(
344
344
  (o) => o.supportedFiats.includes(n) && Ht(o.providers, a, r)
345
345
  ) : [];
346
346
  }
347
- function ln(t, a, n) {
347
+ function cn(t, a, n) {
348
348
  const r = {};
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((d) => d.id === t.network)
352
+ (c) => c.code === t.cryptoCurrency && c.networks.some((d) => d.id === t.network)
353
353
  )) && a.availableCryptos.length > 0) {
354
- const i = a.availableCryptos[0], d = i.networks.find((c) => c.isDefault) || i.networks[0];
355
- i.code !== t.cryptoCurrency && (r.cryptoCurrency = i.code, o = !0), d && d.id !== t.network && (r.network = d.id, o = !0);
354
+ const d = a.availableCryptos.find((h) => h.code === "BTC") || a.availableCryptos[0], i = d.networks.find((h) => h.isDefault) || d.networks[0];
355
+ d.code !== t.cryptoCurrency && (r.cryptoCurrency = d.code, o = !0), i && i.id !== t.network && (r.network = i.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((d) => d.id === t.network)
359
+ (c) => c.code === t.cryptoCurrency && c.networks.some((d) => d.id === t.network)
360
360
  ))) {
361
- const i = a.availableCryptos.find(
362
- (d) => d.networks.some((c) => c.id === t.network)
361
+ const c = a.availableCryptos.find(
362
+ (d) => d.networks.some((i) => i.id === t.network)
363
363
  );
364
- i && i.code !== t.cryptoCurrency && (r.cryptoCurrency = i.code, o = !0);
364
+ c && c.code !== t.cryptoCurrency && (r.cryptoCurrency = c.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
+ (c) => c.code === t.cryptoCurrency
369
369
  );
370
370
  if (u && !u.networks.some(
371
371
  (d) => d.id === t.network
372
372
  ) && u.networks.length > 0) {
373
- const d = u.networks.find((c) => c.isDefault) || u.networks[0];
373
+ const d = u.networks.find((i) => i.isDefault) || u.networks[0];
374
374
  d.id !== t.network && (r.network = d.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) {
378
- const d = a.availableFiats.find((c) => c.code === "USD") || a.availableFiats[0];
377
+ if (!n.fiatLocked && !(t.fiatCurrency && a.availableFiats.some((c) => c.code === t.fiatCurrency)) && a.availableFiats.length > 0) {
378
+ const d = a.availableFiats.find((i) => i.code === "USD") || a.availableFiats[0];
379
379
  d.code !== t.fiatCurrency && (r.fiatCurrency = d.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 c = a.availablePaymentMethods.find(
385
385
  (d) => d.id.includes("card") || d.id.includes("debit")
386
386
  ) || a.availablePaymentMethods[0];
387
- i.id !== t.paymentMethodId && (r.paymentMethodId = i.id, o = !0);
387
+ c.id !== t.paymentMethodId && (r.paymentMethodId = c.id, o = !0);
388
388
  }
389
389
  return o ? r : null;
390
390
  }
391
- function cn(t, a, n, r) {
391
+ function sn(t, a, n, r) {
392
392
  var o, s, u;
393
393
  if (n.cryptoLocked) {
394
- const i = (o = t.cryptos) == null ? void 0 : o.find(
395
- (c) => c.code === a.cryptoCurrency
394
+ const c = (o = t.cryptos) == null ? void 0 : o.find(
395
+ (i) => i.code === a.cryptoCurrency
396
396
  );
397
- if (!i) return !0;
398
- const d = (s = i.networks) == null ? void 0 : s.find((c) => c.id === a.network);
397
+ if (!c) return !0;
398
+ const d = (s = c.networks) == null ? void 0 : s.find((i) => i.id === a.network);
399
399
  if (!d || d.providers !== void 0 && d.providers.length === 0 || d.providers !== void 0 && (r.availableFiats.length === 0 || r.availablePaymentMethods.length === 0))
400
400
  return !0;
401
401
  }
402
402
  if (n.networkLocked && !n.cryptoLocked && !r.availableCryptos.some(
403
- (d) => d.networks.some((c) => c.id === a.network)
403
+ (d) => d.networks.some((i) => i.id === a.network)
404
404
  ))
405
405
  return !0;
406
406
  if (n.fiatLocked) {
407
- const i = (u = t.fiats) == null ? void 0 : u.find((d) => d.code === a.fiatCurrency);
408
- if (!i || i.providers !== void 0 && i.providers.length === 0 || i.providers !== void 0 && r.availableCryptos.length === 0)
407
+ const c = (u = t.fiats) == null ? void 0 : u.find((d) => d.code === a.fiatCurrency);
408
+ if (!c || c.providers !== void 0 && c.providers.length === 0 || c.providers !== void 0 && r.availableCryptos.length === 0)
409
409
  return !0;
410
410
  }
411
411
  return !1;
@@ -417,23 +417,23 @@ function la(t, a) {
417
417
  let r = t;
418
418
  return r.length - n - 1 > a && (r = r.slice(0, n + a + 1)), r = r.replace(/0+$/, "").replace(/\.$/, ""), r;
419
419
  }
420
- function sn(t, a, n) {
420
+ function dn(t, a, n) {
421
421
  return !t && !!a && !a.bestQuote && !!n;
422
422
  }
423
- function dn(t, a) {
423
+ function un(t, a) {
424
424
  if (!t.length) return null;
425
425
  if (a) {
426
426
  const r = t.find((o) => o.gatewayId === a);
427
427
  if (r != null && r.reason) return r.reason;
428
428
  }
429
- const n = t.map((r, o) => ({ reason: r.reason, score: r.reason ? un(r.reason) : 99, idx: o })).filter((r) => r.reason);
429
+ const n = t.map((r, o) => ({ reason: r.reason, score: r.reason ? mn(r.reason) : 99, idx: o })).filter((r) => r.reason);
430
430
  return n.length ? (n.sort((r, o) => r.score - o.score || r.idx - o.idx), n[0].reason) : null;
431
431
  }
432
- function un(t) {
432
+ function mn(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 mn = ["completed", "failed", "cancelled", "expired", "refunded"], xa = {
436
+ const pn = ["completed", "failed", "cancelled", "expired", "refunded"], va = {
437
437
  step: "amount",
438
438
  flowType: "buy",
439
439
  fiatCurrency: "USD",
@@ -452,8 +452,8 @@ const mn = ["completed", "failed", "cancelled", "expired", "refunded"], xa = {
452
452
  countrySource: "",
453
453
  errorMessage: null
454
454
  };
455
- function pn(t, a) {
456
- var n, r, o, s, u, i, d, c;
455
+ function hn(t, a) {
456
+ var n, r, o, s, u, c, d, i;
457
457
  switch (a.type) {
458
458
  case "SET_STEP":
459
459
  return { ...t, step: a.step, errorMessage: null };
@@ -465,7 +465,7 @@ function pn(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: (s = (o = a.fieldLocks) == null ? void 0 : o.destinationCurrency) != null && s.locked ? t.cryptoCurrency : "",
468
- network: (i = (u = a.fieldLocks) == null ? void 0 : u.network) != null && i.locked || (c = (d = a.fieldLocks) == null ? void 0 : d.destinationCurrency) != null && c.locked ? t.network : "",
468
+ network: (c = (u = a.fieldLocks) == null ? void 0 : u.network) != null && c.locked || (i = (d = a.fieldLocks) == null ? void 0 : d.destinationCurrency) != null && i.locked ? t.network : "",
469
469
  paymentMethodId: "",
470
470
  selectedQuote: null,
471
471
  selectedProvider: null,
@@ -508,22 +508,22 @@ function pn(t, a) {
508
508
  case "CLEAR_ERROR":
509
509
  return { ...t, errorMessage: null };
510
510
  case "RESET":
511
- return xa;
511
+ return va;
512
512
  default:
513
513
  return t;
514
514
  }
515
515
  }
516
- const va = ga(null);
517
- function hn(t) {
516
+ const Ca = xa(null);
517
+ function fn(t) {
518
518
  const a = M(t.defaultFiatCurrency !== void 0), {
519
519
  projectId: n,
520
520
  apiUrl: r = "https://api.nowramp.com",
521
521
  assetBaseUrl: o = "",
522
522
  flowType: s = "buy",
523
523
  customerId: u = "",
524
- brandId: i,
524
+ brandId: c,
525
525
  defaultFiatCurrency: d = "USD",
526
- defaultCryptoCurrency: c = "BTC",
526
+ defaultCryptoCurrency: i = "BTC",
527
527
  defaultNetwork: h = "",
528
528
  defaultFiatAmount: p = "",
529
529
  defaultCryptoAmount: f = "",
@@ -533,15 +533,15 @@ function hn(t) {
533
533
  fieldLocks: y,
534
534
  partnerMetadata: E,
535
535
  statusPollInterval: V = 5e3,
536
- onComplete: Y,
536
+ onComplete: X,
537
537
  onError: z,
538
538
  children: ie
539
- } = t, J = _(() => ({ apiUrl: r, projectId: n }), [r, n]), ee = h || (c ? c.toLowerCase() : ""), ge = s === "sell", te = ge ? !!f : !!p, S = (ge ? !!(te && c && ee) : !!(te && c && ee && g)) && k ? "confirm" : "amount", D = p || (s === "buy" ? "250" : ""), [m, I] = Ja(pn, {
540
- ...xa,
539
+ } = t, J = _(() => ({ apiUrl: r, projectId: n }), [r, n]), ee = h || (i === "BTC" ? "bitcoin" : i ? i.toLowerCase() : ""), ge = s === "sell", te = ge ? !!f : !!p, S = (ge ? !!(te && i && ee) : !!(te && i && ee && g)) && k ? "confirm" : "amount", D = p || (s === "buy" ? "250" : ""), [m, I] = qa(hn, {
540
+ ...va,
541
541
  step: S,
542
542
  flowType: s,
543
543
  fiatCurrency: d,
544
- cryptoCurrency: c,
544
+ cryptoCurrency: i,
545
545
  network: ee,
546
546
  fiatAmount: la(D, 2),
547
547
  cryptoAmount: la(f, 6),
@@ -553,7 +553,7 @@ function hn(t) {
553
553
  config: w,
554
554
  loading: ae,
555
555
  error: me
556
- } = qa(J, m.flowType, m.country || void 0), ke = M(!1);
556
+ } = en(J, m.flowType, m.country || void 0), ke = M(!1);
557
557
  Ce.useEffect(() => {
558
558
  var F, U;
559
559
  if (ke.current || !(w != null && w.detectedCountry) || m.country) return;
@@ -602,9 +602,9 @@ function hn(t) {
602
602
  Z ? A = Z.providers : A = [];
603
603
  }
604
604
  return {
605
- availableFiats: nn(w.fiats ?? [], v),
606
- availableCryptos: rn(w.cryptos ?? [], A),
607
- availablePaymentMethods: on(
605
+ availableFiats: rn(w.fiats ?? [], v),
606
+ availableCryptos: on(w.cryptos ?? [], A),
607
+ availablePaymentMethods: ln(
608
608
  w.paymentMethods ?? [],
609
609
  v,
610
610
  m.fiatCurrency
@@ -612,7 +612,7 @@ function hn(t) {
612
612
  };
613
613
  }, [w, m.cryptoCurrency, m.network, m.fiatCurrency]), $e = _(() => {
614
614
  var v, A, T;
615
- return ae || !w ? !1 : cn(
615
+ return ae || !w ? !1 : sn(
616
616
  w,
617
617
  { cryptoCurrency: m.cryptoCurrency, network: m.network, fiatCurrency: m.fiatCurrency },
618
618
  {
@@ -636,7 +636,7 @@ function hn(t) {
636
636
  Ce.useEffect(() => {
637
637
  var A, T, F;
638
638
  if (ae || ce.length === 0 && q.length === 0) return;
639
- const v = ln(
639
+ const v = cn(
640
640
  {
641
641
  cryptoCurrency: m.cryptoCurrency,
642
642
  network: m.network,
@@ -692,7 +692,7 @@ function hn(t) {
692
692
  loading: He,
693
693
  error: Qe,
694
694
  refetch: gt
695
- } = en(J, he), se = sn(He, j, he), Pe = M(!1);
695
+ } = tn(J, he), se = dn(He, j, he), Pe = M(!1);
696
696
  Ce.useEffect(() => {
697
697
  var v;
698
698
  Pe.current || m.countrySource === "auto" && ((v = y == null ? void 0 : y.sourceCurrency) != null && v.locked || a.current || He || !he || Qe || !j || j.bestQuote || m.fiatCurrency !== "USD" && (Pe.current = !0, I({ type: "SET_FIAT_CURRENCY", currency: "USD" }), I({ type: "SET_FIAT_AMOUNT", amount: "250" })));
@@ -702,30 +702,30 @@ function hn(t) {
702
702
  loading: xt,
703
703
  error: ue,
704
704
  createOrder: W
705
- } = tn(J), it = 15e3, {
705
+ } = an(J), it = 15e3, {
706
706
  status: G,
707
707
  loading: vt
708
- } = an(
708
+ } = nn(
709
709
  { apiUrl: r },
710
710
  (Ee == null ? void 0 : Ee.orderId) ?? null,
711
711
  { pollInterval: V, initialDelay: it }
712
712
  ), ze = M(null);
713
713
  Ce.useEffect(() => {
714
- !(G != null && G.status) || !Y || mn.includes(G.status) && ze.current !== G.orderId && (ze.current = G.orderId, Y(G));
715
- }, [G == null ? void 0 : G.status, G == null ? void 0 : G.orderId, Y]), Ce.useEffect(() => {
714
+ !(G != null && G.status) || !X || pn.includes(G.status) && ze.current !== G.orderId && (ze.current = G.orderId, X(G));
715
+ }, [G == null ? void 0 : G.status, G == null ? void 0 : G.orderId, X]), Ce.useEffect(() => {
716
716
  const v = me || ue;
717
717
  v && z && z(v);
718
718
  }, [me, ue, z]);
719
719
  const Re = k || (w == null ? void 0 : w.defaultGateway) || null, lt = _(() => {
720
720
  if (!se || !(j != null && j.unavailableGateways)) return null;
721
721
  const v = j.preferredGatewayId || Re;
722
- return dn(j.unavailableGateways, v);
722
+ return un(j.unavailableGateways, v);
723
723
  }, [se, j, Re]), Oe = M(Re);
724
724
  Oe.current = Re;
725
725
  const Je = M(j);
726
726
  Je.current = j;
727
- const qe = M(i);
728
- qe.current = i;
727
+ const qe = M(c);
728
+ qe.current = c;
729
729
  const Ae = P(async () => {
730
730
  var A, T, F;
731
731
  const v = ((A = m.selectedQuote) == null ? void 0 : A.gatewayId) || ((F = (T = Je.current) == null ? void 0 : T.bestQuote) == null ? void 0 : F.gatewayId) || Oe.current;
@@ -803,10 +803,10 @@ function hn(t) {
803
803
  goBack: Ct,
804
804
  canProceed: bt
805
805
  };
806
- return /* @__PURE__ */ e(va.Provider, { value: ct, children: ie });
806
+ return /* @__PURE__ */ e(Ca.Provider, { value: ct, children: ie });
807
807
  }
808
- function Xe() {
809
- const t = ya(va);
808
+ function Ye() {
809
+ const t = ga(Ca);
810
810
  if (!t)
811
811
  throw new Error("useRamp must be used within a RampProvider");
812
812
  return t;
@@ -1040,7 +1040,7 @@ const ot = {
1040
1040
  { code: "gu", name: "ગુજરાતી", english: "Gujarati" },
1041
1041
  { code: "kn", name: "ಕನ್ನಡ", english: "Kannada" },
1042
1042
  { code: "ml", name: "മലയാളം", english: "Malayalam" }
1043
- ], Ca = ga(null), ca = {
1043
+ ], ba = xa(null), ca = {
1044
1044
  en: () => Promise.resolve({ default: ot }),
1045
1045
  es: () => import("./es-BZoxhEOy.mjs"),
1046
1046
  fr: () => import("./fr-BpkdqjbM.mjs"),
@@ -1086,13 +1086,13 @@ const ot = {
1086
1086
  kn: () => import("./kn-BCDT2d-H.mjs"),
1087
1087
  ml: () => import("./ml-CFfGYcpH.mjs")
1088
1088
  }, Ie = { en: ot };
1089
- function ba(t, a) {
1089
+ function Sa(t, a) {
1090
1090
  return a ? t.replace(/\{(\w+)\}/g, (n, r) => {
1091
1091
  const o = a[r];
1092
1092
  return o !== void 0 ? String(o) : `{${r}}`;
1093
1093
  }) : t;
1094
1094
  }
1095
- function fn({
1095
+ function yn({
1096
1096
  defaultLocale: t = "en",
1097
1097
  children: a
1098
1098
  }) {
@@ -1101,47 +1101,47 @@ function fn({
1101
1101
  if (r(t), Ie[t])
1102
1102
  s(Ie[t]);
1103
1103
  else {
1104
- const c = ca[t];
1105
- c && c().then((h) => {
1104
+ const i = ca[t];
1105
+ i && i().then((h) => {
1106
1106
  Ie[t] = h.default, s(h.default);
1107
1107
  });
1108
1108
  }
1109
1109
  }, [t]);
1110
- const u = P((c) => {
1111
- if (r(c), Ie[c]) {
1112
- s(Ie[c]);
1110
+ const u = P((i) => {
1111
+ if (r(i), Ie[i]) {
1112
+ s(Ie[i]);
1113
1113
  return;
1114
1114
  }
1115
- const h = ca[c];
1115
+ const h = ca[i];
1116
1116
  h && h().then((p) => {
1117
- Ie[c] = p.default, s(p.default);
1117
+ Ie[i] = p.default, s(p.default);
1118
1118
  });
1119
- }, []), i = P(
1120
- (c, h) => {
1121
- const p = o[c] || ot[c] || c;
1122
- return ba(p, h);
1119
+ }, []), c = P(
1120
+ (i, h) => {
1121
+ const p = o[i] || ot[i] || i;
1122
+ return Sa(p, h);
1123
1123
  },
1124
1124
  [o]
1125
1125
  ), d = _(
1126
- () => ({ locale: n, setLocale: u, t: i, languages: Ze }),
1127
- [n, u, i]
1126
+ () => ({ locale: n, setLocale: u, t: c, languages: Ze }),
1127
+ [n, u, c]
1128
1128
  );
1129
- return /* @__PURE__ */ e(Ca.Provider, { value: d, children: a });
1129
+ return /* @__PURE__ */ e(ba.Provider, { value: d, children: a });
1130
1130
  }
1131
1131
  function Pt() {
1132
- const t = ya(Ca);
1132
+ const t = ga(ba);
1133
1133
  return t || {
1134
1134
  locale: "en",
1135
1135
  setLocale: () => {
1136
1136
  },
1137
- t: (a, n) => ba(ot[a] || a, n),
1137
+ t: (a, n) => Sa(ot[a] || a, n),
1138
1138
  languages: Ze
1139
1139
  };
1140
1140
  }
1141
1141
  function O() {
1142
1142
  return Pt().t;
1143
1143
  }
1144
- function yn({
1144
+ function gn({
1145
1145
  gatewayName: t,
1146
1146
  checkoutUrl: a,
1147
1147
  onCancel: n,
@@ -1229,13 +1229,13 @@ function Se({ size: t = 48 }) {
1229
1229
  }
1230
1230
  );
1231
1231
  }
1232
- function gn({
1232
+ function xn({
1233
1233
  className: t = "",
1234
1234
  autoRedirect: a = !1,
1235
1235
  redirectDelay: n = 3e3
1236
1236
  }) {
1237
1237
  var g;
1238
- const { order: r, orderStatus: o, goToStep: s, goBack: u } = Xe(), i = O(), [d, c] = b(!1), [h, p] = b(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1238
+ const { order: r, orderStatus: o, goToStep: s, goBack: u } = Ye(), c = O(), [d, i] = b(!1), [h, p] = b(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1239
1239
  if (H(() => {
1240
1240
  if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !f) {
1241
1241
  p(Math.ceil(n / 1e3));
@@ -1257,7 +1257,7 @@ function gn({
1257
1257
  className: `flex flex-col items-center justify-center p-8 ${t}`,
1258
1258
  style: { color: "var(--t-text)" },
1259
1259
  children: [
1260
- /* @__PURE__ */ e("p", { className: "text-[15px] mb-4", children: i("checkout.noOrder") }),
1260
+ /* @__PURE__ */ e("p", { className: "text-[15px] mb-4", children: c("checkout.noOrder") }),
1261
1261
  /* @__PURE__ */ e(
1262
1262
  "button",
1263
1263
  {
@@ -1271,7 +1271,7 @@ function gn({
1271
1271
  paddingRight: 24
1272
1272
  },
1273
1273
  onClick: u,
1274
- children: i("checkout.goBack")
1274
+ children: c("checkout.goBack")
1275
1275
  }
1276
1276
  )
1277
1277
  ]
@@ -1284,8 +1284,8 @@ function gn({
1284
1284
  className: `flex flex-col items-center justify-center p-8 text-center ${t}`,
1285
1285
  style: { color: "var(--t-text)" },
1286
1286
  children: [
1287
- /* @__PURE__ */ e("h3", { className: "text-[18px] font-semibold mb-2", children: i("checkout.expired") }),
1288
- /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: i("checkout.expiredDesc") }),
1287
+ /* @__PURE__ */ e("h3", { className: "text-[18px] font-semibold mb-2", children: c("checkout.expired") }),
1288
+ /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: c("checkout.expiredDesc") }),
1289
1289
  /* @__PURE__ */ e(
1290
1290
  "button",
1291
1291
  {
@@ -1297,7 +1297,7 @@ function gn({
1297
1297
  color: "var(--t-cta-text)"
1298
1298
  },
1299
1299
  onClick: u,
1300
- children: i("checkout.startOver")
1300
+ children: c("checkout.startOver")
1301
1301
  }
1302
1302
  )
1303
1303
  ]
@@ -1349,7 +1349,7 @@ function gn({
1349
1349
  },
1350
1350
  children: [
1351
1351
  /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1352
- i("checkout.cancel")
1352
+ c("checkout.cancel")
1353
1353
  ]
1354
1354
  }
1355
1355
  )
@@ -1369,7 +1369,7 @@ function gn({
1369
1369
  },
1370
1370
  children: [
1371
1371
  /* @__PURE__ */ e(Se, { size: 32 }),
1372
- /* @__PURE__ */ e("p", { style: { color: "#888", fontSize: 14, marginTop: 16 }, children: i("checkout.loading") })
1372
+ /* @__PURE__ */ e("p", { style: { color: "#888", fontSize: 14, marginTop: 16 }, children: c("checkout.loading") })
1373
1373
  ]
1374
1374
  }
1375
1375
  ),
@@ -1384,8 +1384,8 @@ function gn({
1384
1384
  border: "none"
1385
1385
  },
1386
1386
  allow: N,
1387
- onLoad: () => c(!0),
1388
- title: i("checkout.iframeTitle")
1387
+ onLoad: () => i(!0),
1388
+ title: c("checkout.iframeTitle")
1389
1389
  }
1390
1390
  )
1391
1391
  ] })
@@ -1397,7 +1397,7 @@ function gn({
1397
1397
  }
1398
1398
  if (r.checkout.method === "redirect")
1399
1399
  return /* @__PURE__ */ e(
1400
- yn,
1400
+ gn,
1401
1401
  {
1402
1402
  gatewayName: r.gateway,
1403
1403
  checkoutUrl: r.checkout.url,
@@ -1406,7 +1406,7 @@ function gn({
1406
1406
  }
1407
1407
  );
1408
1408
  if (r.checkout.method === "widget" && r.widgetConfig) {
1409
- const k = xn(r.checkout.url, r.widgetConfig);
1409
+ const k = vn(r.checkout.url, r.widgetConfig);
1410
1410
  return ia(
1411
1411
  /* @__PURE__ */ l(
1412
1412
  "div",
@@ -1451,7 +1451,7 @@ function gn({
1451
1451
  },
1452
1452
  children: [
1453
1453
  /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1454
- i("checkout.cancel")
1454
+ c("checkout.cancel")
1455
1455
  ]
1456
1456
  }
1457
1457
  )
@@ -1471,7 +1471,7 @@ function gn({
1471
1471
  },
1472
1472
  children: [
1473
1473
  /* @__PURE__ */ e(Se, { size: 32 }),
1474
- /* @__PURE__ */ e("p", { style: { color: "#888", fontSize: 14, marginTop: 16 }, children: i("checkout.loading") })
1474
+ /* @__PURE__ */ e("p", { style: { color: "#888", fontSize: 14, marginTop: 16 }, children: c("checkout.loading") })
1475
1475
  ]
1476
1476
  }
1477
1477
  ),
@@ -1486,8 +1486,8 @@ function gn({
1486
1486
  border: "none"
1487
1487
  },
1488
1488
  allow: "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share",
1489
- onLoad: () => c(!0),
1490
- title: i("checkout.widgetTitle")
1489
+ onLoad: () => i(!0),
1490
+ title: c("checkout.widgetTitle")
1491
1491
  }
1492
1492
  )
1493
1493
  ] })
@@ -1503,7 +1503,7 @@ function gn({
1503
1503
  className: `flex flex-col items-center justify-center p-8 ${t}`,
1504
1504
  style: { color: "var(--t-text)" },
1505
1505
  children: [
1506
- /* @__PURE__ */ e("p", { className: "text-[15px] mb-4", children: i("checkout.unknownMethod") }),
1506
+ /* @__PURE__ */ e("p", { className: "text-[15px] mb-4", children: c("checkout.unknownMethod") }),
1507
1507
  /* @__PURE__ */ e(
1508
1508
  "button",
1509
1509
  {
@@ -1517,21 +1517,21 @@ function gn({
1517
1517
  paddingRight: 24
1518
1518
  },
1519
1519
  onClick: u,
1520
- children: i("checkout.goBack")
1520
+ children: c("checkout.goBack")
1521
1521
  }
1522
1522
  )
1523
1523
  ]
1524
1524
  }
1525
1525
  );
1526
1526
  }
1527
- function xn(t, a) {
1527
+ function vn(t, a) {
1528
1528
  const n = new URL("/en/partner/widget", t);
1529
1529
  for (const [r, o] of Object.entries(a))
1530
1530
  o != null && o !== "" && n.searchParams.set(r, String(o));
1531
1531
  return n.toString();
1532
1532
  }
1533
- function vn({ className: t = "" }) {
1534
- const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Xe(), o = O();
1533
+ function Cn({ className: t = "" }) {
1534
+ const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Ye(), o = O();
1535
1535
  H(() => {
1536
1536
  a && (a.status === "completed" ? r("complete") : ["failed", "cancelled", "expired", "refunded"].includes(a.status) && r("error"));
1537
1537
  }, [a == null ? void 0 : a.status, r]);
@@ -1603,13 +1603,13 @@ function We({ label: t, value: a, mono: n }) {
1603
1603
  }
1604
1604
  );
1605
1605
  }
1606
- function Cn({
1606
+ function bn({
1607
1607
  className: t = "",
1608
1608
  explorerUrl: a,
1609
1609
  onDone: n,
1610
1610
  doneButtonText: r
1611
1611
  }) {
1612
- const { orderStatus: o, state: s, dispatch: u } = Xe(), i = O(), d = s.flowType === "sell", c = () => {
1612
+ const { orderStatus: o, state: s, dispatch: u } = Ye(), c = O(), d = s.flowType === "sell", i = () => {
1613
1613
  if (!(o != null && o.transactionHash)) return null;
1614
1614
  if (!a) {
1615
1615
  const f = {
@@ -1628,7 +1628,7 @@ function Cn({
1628
1628
  return a.replace("{txHash}", o.transactionHash);
1629
1629
  }, h = () => {
1630
1630
  n ? n() : u({ type: "RESET" });
1631
- }, p = c();
1631
+ }, p = i();
1632
1632
  return /* @__PURE__ */ l("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
1633
1633
  /* @__PURE__ */ e(
1634
1634
  "div",
@@ -1638,13 +1638,13 @@ function Cn({
1638
1638
  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" }) })
1639
1639
  }
1640
1640
  ),
1641
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: i(d ? "complete.sellTitle" : "complete.buyTitle") }),
1642
- /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: d ? i("complete.sellDesc", { fiat: (o == null ? void 0 : o.fiatCurrency) || s.fiatCurrency }) : i("complete.buyDesc", { crypto: (o == null ? void 0 : o.cryptoCurrency) || s.cryptoCurrency }) }),
1641
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: c(d ? "complete.sellTitle" : "complete.buyTitle") }),
1642
+ /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: d ? c("complete.sellDesc", { fiat: (o == null ? void 0 : o.fiatCurrency) || s.fiatCurrency }) : c("complete.buyDesc", { crypto: (o == null ? void 0 : o.cryptoCurrency) || s.cryptoCurrency }) }),
1643
1643
  o && /* @__PURE__ */ l("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: "var(--t-card-radius, 20px)", padding: 16 }, children: [
1644
1644
  /* @__PURE__ */ e(
1645
1645
  be,
1646
1646
  {
1647
- label: i(d ? "complete.amountSell" : "complete.amountBuy"),
1647
+ label: c(d ? "complete.amountSell" : "complete.amountBuy"),
1648
1648
  value: `${o.cryptoAmount} ${o.cryptoCurrency}`,
1649
1649
  highlight: !0
1650
1650
  }
@@ -1652,15 +1652,15 @@ function Cn({
1652
1652
  /* @__PURE__ */ e(
1653
1653
  be,
1654
1654
  {
1655
- label: i(d ? "complete.paidSell" : "complete.paidBuy"),
1655
+ label: c(d ? "complete.paidSell" : "complete.paidBuy"),
1656
1656
  value: `${o.fiatAmount} ${o.fiatCurrency}`
1657
1657
  }
1658
1658
  ),
1659
- /* @__PURE__ */ e(be, { label: i("complete.network"), value: o.network }),
1659
+ /* @__PURE__ */ e(be, { label: c("complete.network"), value: o.network }),
1660
1660
  /* @__PURE__ */ e(
1661
1661
  be,
1662
1662
  {
1663
- label: i("complete.wallet"),
1663
+ label: c("complete.wallet"),
1664
1664
  value: `${o.walletAddress.slice(0, 10)}...${o.walletAddress.slice(-8)}`,
1665
1665
  mono: !0
1666
1666
  }
@@ -1668,17 +1668,17 @@ function Cn({
1668
1668
  o.transactionHash && /* @__PURE__ */ e(
1669
1669
  be,
1670
1670
  {
1671
- label: i("complete.transaction"),
1671
+ label: c("complete.transaction"),
1672
1672
  value: `${o.transactionHash.slice(0, 10)}...${o.transactionHash.slice(-8)}`,
1673
1673
  mono: !0
1674
1674
  }
1675
1675
  ),
1676
- /* @__PURE__ */ e(be, { label: i("complete.provider"), value: o.gateway }),
1677
- /* @__PURE__ */ e(be, { label: i("complete.orderId"), value: o.orderId, mono: !0 }),
1676
+ /* @__PURE__ */ e(be, { label: c("complete.provider"), value: o.gateway }),
1677
+ /* @__PURE__ */ e(be, { label: c("complete.orderId"), value: o.orderId, mono: !0 }),
1678
1678
  o.completedAt && /* @__PURE__ */ e(
1679
1679
  be,
1680
1680
  {
1681
- label: i("complete.completed"),
1681
+ label: c("complete.completed"),
1682
1682
  value: new Date(o.completedAt).toLocaleString()
1683
1683
  }
1684
1684
  )
@@ -1692,7 +1692,7 @@ function Cn({
1692
1692
  rel: "noopener noreferrer",
1693
1693
  className: "w-full font-semibold text-[14px] flex items-center justify-center transition-all",
1694
1694
  style: { height: 48, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-surface)", color: "var(--t-text)", textDecoration: "none" },
1695
- children: i("complete.viewExplorer")
1695
+ children: c("complete.viewExplorer")
1696
1696
  }
1697
1697
  ),
1698
1698
  /* @__PURE__ */ e(
@@ -1701,7 +1701,7 @@ function Cn({
1701
1701
  className: "w-full font-semibold text-[16px] transition-all",
1702
1702
  style: { height: 60, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-cta-bg)", color: "var(--t-cta-text)" },
1703
1703
  onClick: h,
1704
- children: r || i("complete.done")
1704
+ children: r || c("complete.done")
1705
1705
  }
1706
1706
  )
1707
1707
  ] })
@@ -1727,48 +1727,48 @@ function be({ label: t, value: a, mono: n, highlight: r }) {
1727
1727
  }
1728
1728
  );
1729
1729
  }
1730
- function bn({
1730
+ function Sn({
1731
1731
  className: t = "",
1732
1732
  onRetry: a,
1733
1733
  onDone: n,
1734
1734
  doneButtonText: r,
1735
1735
  supportEmail: o = "support@nowramp.com"
1736
1736
  }) {
1737
- const { state: s, orderStatus: u, dispatch: i, goToStep: d } = Xe(), c = O(), h = s.flowType === "sell", p = () => {
1737
+ const { state: s, orderStatus: u, dispatch: c, goToStep: d } = Ye(), i = O(), h = s.flowType === "sell", p = () => {
1738
1738
  if (u)
1739
1739
  switch (u.status) {
1740
1740
  case "failed":
1741
- return c("errorStep.failed");
1741
+ return i("errorStep.failed");
1742
1742
  case "cancelled":
1743
- return c("errorStep.cancelled");
1743
+ return i("errorStep.cancelled");
1744
1744
  case "expired":
1745
- return c("errorStep.expired");
1745
+ return i("errorStep.expired");
1746
1746
  case "refunded":
1747
- return c("errorStep.refunded");
1747
+ return i("errorStep.refunded");
1748
1748
  default:
1749
- return c("errorStep.unknown");
1749
+ return i("errorStep.unknown");
1750
1750
  }
1751
- return c("errorStep.unknown");
1751
+ return i("errorStep.unknown");
1752
1752
  }, f = () => {
1753
1753
  if (s.errorMessage) return s.errorMessage;
1754
1754
  if (u)
1755
1755
  switch (u.status) {
1756
1756
  case "failed":
1757
- return c(h ? "errorStep.failedSell" : "errorStep.failedBuy");
1757
+ return i(h ? "errorStep.failedSell" : "errorStep.failedBuy");
1758
1758
  case "cancelled":
1759
- return c(h ? "errorStep.cancelledSell" : "errorStep.cancelledBuy");
1759
+ return i(h ? "errorStep.cancelledSell" : "errorStep.cancelledBuy");
1760
1760
  case "expired":
1761
- return c(h ? "errorStep.expiredSell" : "errorStep.expiredBuy");
1761
+ return i(h ? "errorStep.expiredSell" : "errorStep.expiredBuy");
1762
1762
  case "refunded":
1763
- return c(h ? "errorStep.refundedSell" : "errorStep.refundedBuy");
1763
+ return i(h ? "errorStep.refundedSell" : "errorStep.refundedBuy");
1764
1764
  default:
1765
- return c("errorStep.genericDesc");
1765
+ return i("errorStep.genericDesc");
1766
1766
  }
1767
- return c("errorStep.genericDesc");
1767
+ return i("errorStep.genericDesc");
1768
1768
  }, g = () => {
1769
- i({ type: "CLEAR_ERROR" }), a ? a() : (i({ type: "RESET" }), d("amount"));
1769
+ c({ type: "CLEAR_ERROR" }), a ? a() : (c({ type: "RESET" }), d("amount"));
1770
1770
  }, k = () => {
1771
- i({ type: "RESET" }), d("amount");
1771
+ c({ type: "RESET" }), d("amount");
1772
1772
  };
1773
1773
  return /* @__PURE__ */ l("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
1774
1774
  /* @__PURE__ */ e(
@@ -1782,7 +1782,7 @@ function bn({
1782
1782
  /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: p() }),
1783
1783
  /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: f() }),
1784
1784
  u && /* @__PURE__ */ e("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: "var(--t-card-radius, 20px)", padding: 16 }, children: /* @__PURE__ */ l("div", { className: "flex justify-between items-center py-2", children: [
1785
- /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: c("errorStep.orderId") }),
1785
+ /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: i("errorStep.orderId") }),
1786
1786
  /* @__PURE__ */ e("span", { className: "text-[13px] font-medium font-mono", style: { color: "var(--t-text)" }, children: u.orderId })
1787
1787
  ] }) }),
1788
1788
  /* @__PURE__ */ l("div", { className: "w-full flex flex-col gap-2", children: [
@@ -1792,7 +1792,7 @@ function bn({
1792
1792
  className: "w-full font-semibold text-[16px] transition-all",
1793
1793
  style: { height: 60, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-cta-bg)", color: "var(--t-cta-text)" },
1794
1794
  onClick: g,
1795
- children: c("errorStep.tryAgain")
1795
+ children: i("errorStep.tryAgain")
1796
1796
  }
1797
1797
  ),
1798
1798
  /* @__PURE__ */ e(
@@ -1801,7 +1801,7 @@ function bn({
1801
1801
  className: "w-full font-semibold text-[14px] transition-all",
1802
1802
  style: { height: 48, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-surface)", color: "var(--t-text)" },
1803
1803
  onClick: k,
1804
- children: c("errorStep.startOver")
1804
+ children: i("errorStep.startOver")
1805
1805
  }
1806
1806
  ),
1807
1807
  n && /* @__PURE__ */ e(
@@ -1816,14 +1816,14 @@ function bn({
1816
1816
  border: "1px solid var(--t-divider)"
1817
1817
  },
1818
1818
  onClick: n,
1819
- "aria-label": r || c("errorStep.returnToMerchant"),
1820
- children: r || c("errorStep.return")
1819
+ "aria-label": r || i("errorStep.returnToMerchant"),
1820
+ children: r || i("errorStep.return")
1821
1821
  }
1822
1822
  )
1823
1823
  ] }),
1824
1824
  /* @__PURE__ */ l("div", { className: "mt-6", children: [
1825
1825
  /* @__PURE__ */ l("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: [
1826
- c("errorStep.needHelp"),
1826
+ i("errorStep.needHelp"),
1827
1827
  " ",
1828
1828
  /* @__PURE__ */ e(
1829
1829
  "a",
@@ -1835,7 +1835,7 @@ function bn({
1835
1835
  }
1836
1836
  )
1837
1837
  ] }),
1838
- u && /* @__PURE__ */ e("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: c("errorStep.reference", { orderId: u.orderId }) })
1838
+ u && /* @__PURE__ */ e("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: i("errorStep.reference", { orderId: u.orderId }) })
1839
1839
  ] })
1840
1840
  ] });
1841
1841
  }
@@ -2001,7 +2001,7 @@ const rt = {
2001
2001
  OKC: { name: "OKX Chain", icon: "eth" },
2002
2002
  UNI_CHAIN: { name: "UNI", icon: "uni" },
2003
2003
  ZEC: { name: "ZCash", icon: "zec" }
2004
- }, Sa = [
2004
+ }, wa = [
2005
2005
  // --- Popular / Top coins ---
2006
2006
  { code: "BTC", name: "Bitcoin", chains: ["BTC", "LN"], popular: !0 },
2007
2007
  { code: "ETH", name: "Ethereum", chains: ["ETH", "ARB", "BASE", "BSC", "OPTIMISM", "LINEA", "ZKSYNC", "LRC", "STARK", "APE", "ECLIPSE", "FUEL", "INK", "SOPHON", "UNICHAIN", "WLD"], popular: !0 },
@@ -2194,9 +2194,9 @@ const rt = {
2194
2194
  { code: "ZCHF", name: "Frankencoin", chains: ["ETH"], popular: !1 },
2195
2195
  { code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
2196
2196
  { code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
2197
- ], Sn = Object.fromEntries(
2198
- Sa.map((t) => [t.code, t.name])
2199
- ), wn = {
2197
+ ], wn = Object.fromEntries(
2198
+ wa.map((t) => [t.code, t.name])
2199
+ ), kn = {
2200
2200
  AED: "ae",
2201
2201
  ALL: "al",
2202
2202
  ARS: "ar",
@@ -2231,11 +2231,11 @@ const rt = {
2231
2231
  VND: "vn",
2232
2232
  ZAR: "za"
2233
2233
  };
2234
- function wa(t, a = "") {
2234
+ function ka(t, a = "") {
2235
2235
  return `${a}/crypto-icons/${t.toLowerCase()}.svg`;
2236
2236
  }
2237
- function kn(t, a = "") {
2238
- const n = wn[t] || "us";
2237
+ function Nn(t, a = "") {
2238
+ const n = kn[t] || "us";
2239
2239
  return `${a}/flags/${n}.svg`;
2240
2240
  }
2241
2241
  function ht(t) {
@@ -2274,7 +2274,7 @@ const sa = [
2274
2274
  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 },
2275
2275
  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 },
2276
2276
  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 }
2277
- }, Nn = /* @__PURE__ */ new Set([
2277
+ }, En = /* @__PURE__ */ new Set([
2278
2278
  "USDC",
2279
2279
  "USDT",
2280
2280
  "DAI",
@@ -2301,14 +2301,14 @@ const sa = [
2301
2301
  "EURR",
2302
2302
  "ZCHF"
2303
2303
  ]);
2304
- function ka(t) {
2305
- return Nn.has(t.toUpperCase());
2304
+ function Na(t) {
2305
+ return En.has(t.toUpperCase());
2306
2306
  }
2307
- function kr(t, a) {
2307
+ function Nr(t, a) {
2308
2308
  var n, r;
2309
2309
  return ((n = ua[t]) == null ? void 0 : n[a]) ?? ((r = ua.USDC) == null ? void 0 : r[a]) ?? 1;
2310
2310
  }
2311
- function En(t) {
2311
+ function Rn(t) {
2312
2312
  return parseFloat(t.replace(/,/g, "")) || 0;
2313
2313
  }
2314
2314
  function It(t) {
@@ -2319,9 +2319,9 @@ function It(t) {
2319
2319
  const a = t.toPrecision(4);
2320
2320
  return parseFloat(a).toString();
2321
2321
  }
2322
- const ye = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ma = 10, pa = 1e-4, Rn = (() => {
2322
+ const ye = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ma = 10, pa = 1e-4, An = (() => {
2323
2323
  const t = [];
2324
- for (const a of Sa)
2324
+ for (const a of wa)
2325
2325
  for (const n of a.chains)
2326
2326
  t.push({ code: a.code, name: a.name, chain: n, popular: a.popular });
2327
2327
  return t;
@@ -2329,21 +2329,21 @@ const ye = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ma = 10, pa = 1e-4, Rn = (
2329
2329
  function ha(t) {
2330
2330
  return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
2331
2331
  }
2332
- function An({ className: t = "", stablecoinParity: a, partnerName: n }) {
2332
+ function Tn({ className: t = "", stablecoinParity: a, partnerName: n }) {
2333
2333
  var J;
2334
2334
  const {
2335
2335
  config: r,
2336
2336
  configLoading: o,
2337
2337
  state: s,
2338
2338
  defaultGateway: u,
2339
- quotes: i,
2339
+ quotes: c,
2340
2340
  fetchQuotes: d,
2341
- createOrder: c,
2341
+ createOrder: i,
2342
2342
  orderLoading: h
2343
- } = Xe(), p = O(), f = s.flowType === "sell", [g, k] = b(null), N = r == null ? void 0 : r.gateways.find((ee) => ee.id === u), y = (J = i == null ? void 0 : i.bestQuote) != null && J.exchangeRate ? parseFloat(i.bestQuote.exchangeRate) : null, E = parseFloat(s.fiatAmount) || 0, V = !!(a && n && !f && ka(s.cryptoCurrency) && y), Y = V && s.cryptoCurrency.toUpperCase().includes(s.fiatCurrency.toUpperCase()), z = V && E > 0 ? It(Y ? E : E / y) : null, ie = async () => {
2343
+ } = Ye(), p = O(), f = s.flowType === "sell", [g, k] = b(null), N = r == null ? void 0 : r.gateways.find((ee) => ee.id === u), y = (J = c == null ? void 0 : c.bestQuote) != null && J.exchangeRate ? parseFloat(c.bestQuote.exchangeRate) : null, E = parseFloat(s.fiatAmount) || 0, V = !!(a && n && !f && Na(s.cryptoCurrency) && y), X = V && s.cryptoCurrency.toUpperCase().includes(s.fiatCurrency.toUpperCase()), z = V && E > 0 ? It(X ? E : E / y) : null, ie = async () => {
2344
2344
  k(null);
2345
2345
  try {
2346
- d(), await c();
2346
+ d(), await i();
2347
2347
  } catch (ee) {
2348
2348
  const ge = ee instanceof Error ? ee.message : p("error.createOrderFailed");
2349
2349
  k(ge);
@@ -2362,10 +2362,10 @@ function An({ className: t = "", stablecoinParity: a, partnerName: n }) {
2362
2362
  /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: N.name })
2363
2363
  ] })
2364
2364
  ] }),
2365
- f ? /* @__PURE__ */ l(X, { children: [
2365
+ f ? /* @__PURE__ */ l(Y, { children: [
2366
2366
  /* @__PURE__ */ e(Me, { label: p("confirm.youSell"), value: `${s.cryptoAmount} ${s.cryptoCurrency}`, highlight: !0 }),
2367
2367
  /* @__PURE__ */ e(Me, { label: p("confirm.youReceive"), value: p("confirm.payout", { currency: s.fiatCurrency }) })
2368
- ] }) : /* @__PURE__ */ l(X, { children: [
2368
+ ] }) : /* @__PURE__ */ l(Y, { children: [
2369
2369
  /* @__PURE__ */ e(Me, { label: p("confirm.youPay"), value: `${s.fiatAmount} ${s.fiatCurrency}`, highlight: !0 }),
2370
2370
  /* @__PURE__ */ e(
2371
2371
  Me,
@@ -2388,7 +2388,7 @@ function An({ className: t = "", stablecoinParity: a, partnerName: n }) {
2388
2388
  style: { height: 60, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: h ? 0.7 : 1 },
2389
2389
  disabled: h,
2390
2390
  onClick: ie,
2391
- children: h ? /* @__PURE__ */ l(X, { children: [
2391
+ children: h ? /* @__PURE__ */ l(Y, { children: [
2392
2392
  /* @__PURE__ */ e(Se, { size: 18 }),
2393
2393
  p("confirm.processing")
2394
2394
  ] }) : p(f ? "confirm.confirmSell" : "confirm.confirmPay")
@@ -2424,16 +2424,16 @@ function Ge({
2424
2424
  return () => clearTimeout(d);
2425
2425
  }
2426
2426
  }, [t]);
2427
- const i = P(() => {
2427
+ const c = P(() => {
2428
2428
  u(!1), setTimeout(() => a(), 250);
2429
2429
  }, [a]);
2430
2430
  return H(() => {
2431
2431
  if (!t) return;
2432
- const d = (c) => {
2433
- c.key === "Escape" && i();
2432
+ const d = (i) => {
2433
+ i.key === "Escape" && c();
2434
2434
  };
2435
2435
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2436
- }, [t, i]), r ? /* @__PURE__ */ e(
2436
+ }, [t, c]), r ? /* @__PURE__ */ e(
2437
2437
  "div",
2438
2438
  {
2439
2439
  className: "absolute inset-0 z-20 transition-opacity duration-250",
@@ -2443,7 +2443,7 @@ function Ge({
2443
2443
  {
2444
2444
  className: "absolute inset-0 flex flex-col transition-transform duration-250 ease-out",
2445
2445
  style: { background: "var(--t-modal-bg)", borderRadius: "var(--t-container-radius)", transform: s ? "translateY(0)" : "translateY(24px)" },
2446
- children: typeof n == "function" ? n(i) : n
2446
+ children: typeof n == "function" ? n(c) : n
2447
2447
  }
2448
2448
  )
2449
2449
  }
@@ -2456,7 +2456,7 @@ function Q({
2456
2456
  }) {
2457
2457
  return /* @__PURE__ */ e("div", { className: `skeleton ${n}`, style: { width: t, height: a } });
2458
2458
  }
2459
- function Tn() {
2459
+ function Ln() {
2460
2460
  const t = O();
2461
2461
  return /* @__PURE__ */ l("div", { className: "flex-1 px-5 flex flex-col", children: [
2462
2462
  /* @__PURE__ */ l("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
@@ -2486,15 +2486,15 @@ function Tn() {
2486
2486
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: t("skeleton.poweredBy") }) })
2487
2487
  ] });
2488
2488
  }
2489
- function Na({
2489
+ function Ea({
2490
2490
  src: t,
2491
2491
  alt: a,
2492
2492
  size: n,
2493
2493
  className: r = "",
2494
2494
  background: o
2495
2495
  }) {
2496
- const [s, u] = b(!1), [i, d] = b(!1), c = M(t);
2497
- c.current !== t && (c.current = t, u(!1), d(!1));
2496
+ const [s, u] = b(!1), [c, d] = b(!1), i = M(t);
2497
+ i.current !== t && (i.current = t, u(!1), d(!1));
2498
2498
  const h = P(() => u(!0), []), p = P(() => d(!0), []);
2499
2499
  return /* @__PURE__ */ l(
2500
2500
  "div",
@@ -2502,14 +2502,14 @@ function Na({
2502
2502
  className: `relative rounded-full shrink-0 ${r}`,
2503
2503
  style: { width: n, height: n, background: o },
2504
2504
  children: [
2505
- !s && !i && /* @__PURE__ */ e(
2505
+ !s && !c && /* @__PURE__ */ e(
2506
2506
  "div",
2507
2507
  {
2508
2508
  className: "absolute inset-0 rounded-full animate-pulse",
2509
2509
  style: { background: "var(--t-pill-bg, #333)" }
2510
2510
  }
2511
2511
  ),
2512
- i ? /* @__PURE__ */ e(
2512
+ c ? /* @__PURE__ */ e(
2513
2513
  "div",
2514
2514
  {
2515
2515
  className: "absolute inset-0 rounded-full flex items-center justify-center font-bold",
@@ -2537,11 +2537,11 @@ function Na({
2537
2537
  }
2538
2538
  );
2539
2539
  }
2540
- function Ea({ ticker: t, size: a = 32, baseUrl: n = "" }) {
2540
+ function Ra({ ticker: t, size: a = 32, baseUrl: n = "" }) {
2541
2541
  return /* @__PURE__ */ e(
2542
- Na,
2542
+ Ea,
2543
2543
  {
2544
- src: wa(t, n),
2544
+ src: ka(t, n),
2545
2545
  alt: t,
2546
2546
  size: a,
2547
2547
  background: "#ffffff"
@@ -2550,9 +2550,9 @@ function Ea({ ticker: t, size: a = 32, baseUrl: n = "" }) {
2550
2550
  }
2551
2551
  function Ot({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
2552
2552
  return /* @__PURE__ */ e(
2553
- Na,
2553
+ Ea,
2554
2554
  {
2555
- src: kn(t, n),
2555
+ src: Nn(t, n),
2556
2556
  alt: t,
2557
2557
  size: a
2558
2558
  }
@@ -2564,7 +2564,7 @@ function Kt({ size: t = 32, color: a = "#888" }) {
2564
2564
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "8", stroke: "white", strokeWidth: "1.5", fill: "none" })
2565
2565
  ] });
2566
2566
  }
2567
- function Nr({ size: t = 24 }) {
2567
+ function Er({ size: t = 24 }) {
2568
2568
  return /* @__PURE__ */ e(
2569
2569
  "div",
2570
2570
  {
@@ -2581,7 +2581,7 @@ function Nr({ size: t = 24 }) {
2581
2581
  }
2582
2582
  );
2583
2583
  }
2584
- function Ln({ size: t = 32 }) {
2584
+ function Fn({ size: t = 32 }) {
2585
2585
  return /* @__PURE__ */ e(
2586
2586
  "div",
2587
2587
  {
@@ -2591,7 +2591,7 @@ function Ln({ size: t = 32 }) {
2591
2591
  }
2592
2592
  );
2593
2593
  }
2594
- function Er({ size: t = 32 }) {
2594
+ function Rr({ size: t = 32 }) {
2595
2595
  return /* @__PURE__ */ e(
2596
2596
  "div",
2597
2597
  {
@@ -2607,7 +2607,7 @@ function Er({ size: t = 32 }) {
2607
2607
  }
2608
2608
  );
2609
2609
  }
2610
- function Rr({ size: t = 32 }) {
2610
+ function Ar({ size: t = 32 }) {
2611
2611
  return /* @__PURE__ */ e(
2612
2612
  "div",
2613
2613
  {
@@ -2622,7 +2622,7 @@ function Rr({ size: t = 32 }) {
2622
2622
  }
2623
2623
  );
2624
2624
  }
2625
- function Fn({ size: t = 32 }) {
2625
+ function Un({ size: t = 32 }) {
2626
2626
  return /* @__PURE__ */ e(
2627
2627
  "div",
2628
2628
  {
@@ -2632,7 +2632,7 @@ function Fn({ size: t = 32 }) {
2632
2632
  }
2633
2633
  );
2634
2634
  }
2635
- function Un({ size: t = 32 }) {
2635
+ function In({ size: t = 32 }) {
2636
2636
  return /* @__PURE__ */ e(
2637
2637
  "div",
2638
2638
  {
@@ -2648,7 +2648,7 @@ function Un({ size: t = 32 }) {
2648
2648
  }
2649
2649
  );
2650
2650
  }
2651
- function In({ size: t = 32 }) {
2651
+ function Mn({ size: t = 32 }) {
2652
2652
  const a = t * 0.8;
2653
2653
  return /* @__PURE__ */ e(
2654
2654
  "div",
@@ -2663,7 +2663,7 @@ function In({ size: t = 32 }) {
2663
2663
  }
2664
2664
  );
2665
2665
  }
2666
- function Ar({ size: t = 32 }) {
2666
+ function Tr({ size: t = 32 }) {
2667
2667
  const a = t * 0.56, n = a * 0.65, r = Math.max(2, a * 0.1), o = a * 0.2;
2668
2668
  return /* @__PURE__ */ l("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
2669
2669
  /* @__PURE__ */ e(
@@ -2714,7 +2714,7 @@ function Ar({ size: t = 32 }) {
2714
2714
  )
2715
2715
  ] });
2716
2716
  }
2717
- function Tr({ size: t = 18 }) {
2717
+ function Lr({ size: t = 18 }) {
2718
2718
  return /* @__PURE__ */ e(
2719
2719
  "div",
2720
2720
  {
@@ -2727,10 +2727,10 @@ function Tr({ size: t = 18 }) {
2727
2727
  function De() {
2728
2728
  return /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 4.5L6 7.5L9 4.5", stroke: "var(--t-text-secondary)", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
2729
2729
  }
2730
- function Mn() {
2730
+ function Dn() {
2731
2731
  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" }) });
2732
2732
  }
2733
- function Lr({ onClick: t }) {
2733
+ function Fr({ onClick: t }) {
2734
2734
  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(
2735
2735
  "path",
2736
2736
  {
@@ -2739,7 +2739,7 @@ function Lr({ onClick: t }) {
2739
2739
  }
2740
2740
  ) }) });
2741
2741
  }
2742
- function Fr({ size: t = 40 }) {
2742
+ function Ur({ size: t = 40 }) {
2743
2743
  return /* @__PURE__ */ e(
2744
2744
  "div",
2745
2745
  {
@@ -2752,7 +2752,7 @@ function Fr({ size: t = 40 }) {
2752
2752
  }
2753
2753
  );
2754
2754
  }
2755
- function Dn({ size: t = 20 }) {
2755
+ function Bn({ size: t = 20 }) {
2756
2756
  const a = t * 0.6;
2757
2757
  return /* @__PURE__ */ e(
2758
2758
  "div",
@@ -2770,7 +2770,7 @@ function Dn({ size: t = 20 }) {
2770
2770
  }
2771
2771
  );
2772
2772
  }
2773
- function Bn({ size: t = 20 }) {
2773
+ function Hn({ size: t = 20 }) {
2774
2774
  const a = t * 0.6;
2775
2775
  return /* @__PURE__ */ e(
2776
2776
  "div",
@@ -2785,7 +2785,7 @@ function Bn({ size: t = 20 }) {
2785
2785
  }
2786
2786
  );
2787
2787
  }
2788
- function Hn({ size: t = 20 }) {
2788
+ function Pn({ size: t = 20 }) {
2789
2789
  return /* @__PURE__ */ e(
2790
2790
  "div",
2791
2791
  {
@@ -2798,7 +2798,7 @@ function Hn({ size: t = 20 }) {
2798
2798
  }
2799
2799
  );
2800
2800
  }
2801
- function Pn({ size: t = 20 }) {
2801
+ function On({ size: t = 20 }) {
2802
2802
  return /* @__PURE__ */ e(
2803
2803
  "div",
2804
2804
  {
@@ -2813,7 +2813,7 @@ function Pn({ size: t = 20 }) {
2813
2813
  }
2814
2814
  );
2815
2815
  }
2816
- function Ur({ size: t = 24 }) {
2816
+ function Ir({ size: t = 24 }) {
2817
2817
  const a = t * 1.15;
2818
2818
  return /* @__PURE__ */ l("svg", { width: a, height: t, viewBox: "0 0 48 32", fill: "none", preserveAspectRatio: "xMidYMid meet", children: [
2819
2819
  /* @__PURE__ */ e("path", { d: "M0 0H5.76C11.0619 0 15.36 4.47715 15.36 10V32H0V0Z", fill: "var(--t-text)" }),
@@ -2847,7 +2847,7 @@ function Mt({ size: t = 12 }) {
2847
2847
  }
2848
2848
  );
2849
2849
  }
2850
- function On({ onClick: t }) {
2850
+ function Kn({ onClick: t }) {
2851
2851
  return /* @__PURE__ */ e(
2852
2852
  "button",
2853
2853
  {
@@ -2862,45 +2862,45 @@ function On({ onClick: t }) {
2862
2862
  }
2863
2863
  );
2864
2864
  }
2865
- function Ir({ size: t = 16 }) {
2865
+ function Mr({ size: t = 16 }) {
2866
2866
  return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", children: [
2867
2867
  /* @__PURE__ */ e("circle", { cx: "7", cy: "7", r: "5.25", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" }),
2868
2868
  /* @__PURE__ */ e("path", { d: "M11 11l3.5 3.5", stroke: "var(--t-text-secondary)", strokeWidth: "1.2", strokeLinecap: "round" })
2869
2869
  ] });
2870
2870
  }
2871
- function Mr({ size: t = 12 }) {
2871
+ function Dr({ size: t = 12 }) {
2872
2872
  return /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M6 10V2M6 2L2.5 5.5M6 2l3.5 3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
2873
2873
  }
2874
- function Kn({ size: t = 14 }) {
2874
+ function _n({ size: t = 14 }) {
2875
2875
  return /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M11.5 3.5L5.5 10.5L2.5 7.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
2876
2876
  }
2877
2877
  function Dt({ size: t = 12 }) {
2878
2878
  return /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M2 2l8 8M10 2l-8 8", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" }) });
2879
2879
  }
2880
- function _n(t, a = 32, n) {
2880
+ function Vn(t, a = 32, n) {
2881
2881
  switch (t) {
2882
2882
  case "bank":
2883
- return /* @__PURE__ */ e(Dn, { size: a });
2884
- case "card":
2885
2883
  return /* @__PURE__ */ e(Bn, { size: a });
2886
- case "applepay":
2884
+ case "card":
2887
2885
  return /* @__PURE__ */ e(Hn, { size: a });
2888
- case "googlepay":
2886
+ case "applepay":
2889
2887
  return /* @__PURE__ */ e(Pn, { size: a });
2888
+ case "googlepay":
2889
+ return /* @__PURE__ */ e(On, { size: a });
2890
2890
  case "revolut":
2891
- return /* @__PURE__ */ e(Ln, { size: a });
2892
- case "paypal":
2893
2891
  return /* @__PURE__ */ e(Fn, { size: a });
2894
- case "visa":
2892
+ case "paypal":
2895
2893
  return /* @__PURE__ */ e(Un, { size: a });
2896
- case "mastercard":
2894
+ case "visa":
2897
2895
  return /* @__PURE__ */ e(In, { size: a });
2896
+ case "mastercard":
2897
+ return /* @__PURE__ */ e(Mn, { size: a });
2898
2898
  default:
2899
2899
  return /* @__PURE__ */ e(Kt, { size: a });
2900
2900
  }
2901
2901
  }
2902
- function Vn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
2903
- const [s, u] = b(!1), [i, d] = b(!1), c = P(() => {
2902
+ function jn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
2903
+ const [s, u] = b(!1), [c, d] = b(!1), i = P(() => {
2904
2904
  d(!0), setTimeout(() => {
2905
2905
  u(!1), d(!1), o();
2906
2906
  }, 200);
@@ -2909,20 +2909,20 @@ function Vn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
2909
2909
  r && (u(!0), d(!1));
2910
2910
  }, [r]), H(() => {
2911
2911
  if (!r || !s) return;
2912
- const p = setTimeout(c, 5e3);
2912
+ const p = setTimeout(i, 5e3);
2913
2913
  return () => clearTimeout(p);
2914
- }, [r, s, c]), s ? /* @__PURE__ */ e(
2914
+ }, [r, s, i]), s ? /* @__PURE__ */ e(
2915
2915
  "div",
2916
2916
  {
2917
2917
  className: "absolute top-0 left-0 right-0 z-[25] px-3 pt-3",
2918
- style: { animation: i ? "slideUpToastOut 0.2s ease-in forwards" : "slideDownToast 0.3s ease-out both" },
2918
+ style: { animation: c ? "slideUpToastOut 0.2s ease-in forwards" : "slideDownToast 0.3s ease-out both" },
2919
2919
  children: /* @__PURE__ */ l(
2920
2920
  "div",
2921
2921
  {
2922
2922
  className: "flex items-start gap-2.5 rounded-2xl px-4 py-3",
2923
2923
  style: { background: t === "success" ? "var(--t-toast-success-bg)" : "var(--t-toast-error-bg)", color: "#ffffff" },
2924
2924
  children: [
2925
- /* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: t === "success" ? /* @__PURE__ */ e(Kn, { size: 14 }) : /* @__PURE__ */ e(Dt, { size: 12 }) }),
2925
+ /* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: t === "success" ? /* @__PURE__ */ e(_n, { size: 14 }) : /* @__PURE__ */ e(Dt, { size: 12 }) }),
2926
2926
  /* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: [
2927
2927
  /* @__PURE__ */ e("div", { className: "text-[13px] font-medium leading-tight", children: a }),
2928
2928
  n && /* @__PURE__ */ e("div", { className: "text-[12px] leading-snug mt-0.5 opacity-90", children: n })
@@ -2930,7 +2930,7 @@ function Vn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
2930
2930
  /* @__PURE__ */ e(
2931
2931
  "button",
2932
2932
  {
2933
- onClick: c,
2933
+ onClick: i,
2934
2934
  className: "shrink-0 opacity-80 hover:opacity-100 transition-opacity mt-0.5",
2935
2935
  children: /* @__PURE__ */ e(Dt, { size: 10 })
2936
2936
  }
@@ -2949,7 +2949,7 @@ function we({ width: t = 46 }) {
2949
2949
  /* @__PURE__ */ e("path", { d: "M32.64 8C32.64 3.58172 36.0785 0 40.32 0C44.5615 0 48 3.58172 48 8C48 12.4183 44.5615 16 40.32 16C36.0785 16 32.64 12.4183 32.64 8Z", fill: "var(--t-text)" })
2950
2950
  ] });
2951
2951
  }
2952
- function jn() {
2952
+ function Wn() {
2953
2953
  return /* @__PURE__ */ e(
2954
2954
  "div",
2955
2955
  {
@@ -2959,8 +2959,8 @@ function jn() {
2959
2959
  }
2960
2960
  );
2961
2961
  }
2962
- function Wn({ isOpen: t, onClose: a, children: n }) {
2963
- return /* @__PURE__ */ l(X, { children: [
2962
+ function Gn({ isOpen: t, onClose: a, children: n }) {
2963
+ return /* @__PURE__ */ l(Y, { children: [
2964
2964
  /* @__PURE__ */ e(
2965
2965
  "div",
2966
2966
  {
@@ -2999,15 +2999,13 @@ function Be({ onClick: t }) {
2999
2999
  "button",
3000
3000
  {
3001
3001
  onClick: t,
3002
- className: "flex items-center justify-center transition-colors rounded-full shrink-0",
3003
- style: { width: 40, height: 40, backgroundColor: "var(--t-close-bg)" },
3004
- onMouseEnter: (a) => a.currentTarget.style.backgroundColor = "var(--t-close-hover)",
3005
- onMouseLeave: (a) => a.currentTarget.style.backgroundColor = "var(--t-close-bg)",
3006
- children: /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 3L11 11M11 3L3 11", stroke: "var(--t-icon-close)", strokeWidth: "1.5", strokeLinecap: "round" }) })
3002
+ className: "flex items-center justify-center shrink-0 opacity-60 hover:opacity-100 transition-opacity",
3003
+ style: { width: 40, height: 40 },
3004
+ children: /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 3L11 11M11 3L3 11", stroke: "var(--t-text)", strokeWidth: "1.5", strokeLinecap: "round" }) })
3007
3005
  }
3008
3006
  );
3009
3007
  }
3010
- function Ye({
3008
+ function Xe({
3011
3009
  value: t,
3012
3010
  onChange: a,
3013
3011
  placeholder: n = "",
@@ -3062,22 +3060,22 @@ function Ye({
3062
3060
  }
3063
3061
  );
3064
3062
  }
3065
- const Gn = ["USD", "EUR", "GBP"];
3066
- function Zn({
3063
+ const Zn = ["USD", "EUR", "GBP"];
3064
+ function Yn({
3067
3065
  onClose: t,
3068
3066
  onSelect: a,
3069
3067
  currencies: n,
3070
3068
  assetBaseUrl: r = "",
3071
3069
  selectedCode: o
3072
3070
  }) {
3073
- const s = O(), [u, i] = b(""), d = _(() => {
3071
+ const s = O(), [u, c] = b(""), d = _(() => {
3074
3072
  if (!n || n.length === 0) return sa;
3075
3073
  const h = new Map(sa.map((p) => [p.code, p.name]));
3076
3074
  return n.map((p) => ({
3077
3075
  code: p.code,
3078
3076
  name: p.name || h.get(p.code) || p.code
3079
3077
  }));
3080
- }, [n]), c = _(() => {
3078
+ }, [n]), i = _(() => {
3081
3079
  const h = u.trim().toLowerCase();
3082
3080
  if (!h) {
3083
3081
  if (o) {
@@ -3093,15 +3091,15 @@ function Zn({
3093
3091
  (p) => p.code.toLowerCase().includes(h) || p.name.toLowerCase().includes(h)
3094
3092
  );
3095
3093
  }, [d, u, o]);
3096
- return /* @__PURE__ */ l(X, { children: [
3094
+ return /* @__PURE__ */ l(Y, { children: [
3097
3095
  /* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
3098
3096
  /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
3099
3097
  /* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: s("modal.selectFiat") }),
3100
3098
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) }),
3101
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: u, onChange: i, inline: !0 }) })
3099
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: u, onChange: c, inline: !0 }) })
3102
3100
  ] }),
3103
3101
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3104
- c.map((h) => {
3102
+ i.map((h) => {
3105
3103
  const p = o === h.code;
3106
3104
  return /* @__PURE__ */ l(
3107
3105
  "button",
@@ -3113,7 +3111,7 @@ function Zn({
3113
3111
  /* @__PURE__ */ e(Ot, { currencyCode: h.code, size: 32, baseUrl: r }),
3114
3112
  /* @__PURE__ */ l("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
3115
3113
  /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: h.code }),
3116
- Gn.includes(h.code) && /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { border: "1.5px solid var(--t-card-border)", borderRadius: 100, paddingLeft: 8, paddingRight: 8, color: "var(--t-text-secondary)", lineHeight: "20px", letterSpacing: "0.22px" }, children: s("modal.popular") }),
3114
+ Zn.includes(h.code) && /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { border: "1.5px solid var(--t-card-border)", borderRadius: 100, paddingLeft: 8, paddingRight: 8, color: "var(--t-text-secondary)", lineHeight: "20px", letterSpacing: "0.22px" }, children: s("modal.popular") }),
3117
3115
  p && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
3118
3116
  "path",
3119
3117
  {
@@ -3130,23 +3128,24 @@ function Zn({
3130
3128
  h.code
3131
3129
  );
3132
3130
  }),
3133
- c.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: s("modal.noCurrencies") })
3131
+ i.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: s("modal.noCurrencies") })
3134
3132
  ] })
3135
3133
  ] });
3136
3134
  }
3137
- function fa({ src: t, alt: a, size: n, className: r, style: o }) {
3138
- const [s, u] = b(!1), [i, d] = b(!1), c = M(t);
3139
- c.current !== t && (c.current = t, u(!1), d(!1));
3135
+ const fa = ["BTC", "ETH", "SOL"];
3136
+ function ya({ src: t, alt: a, size: n, className: r, style: o }) {
3137
+ const [s, u] = b(!1), [c, d] = b(!1), i = M(t);
3138
+ i.current !== t && (i.current = t, u(!1), d(!1));
3140
3139
  const h = P(() => u(!0), []), p = P(() => d(!0), []);
3141
3140
  return /* @__PURE__ */ l("div", { className: r, style: { ...o, width: n, height: n, position: "relative" }, children: [
3142
- !s && !i && /* @__PURE__ */ e(
3141
+ !s && !c && /* @__PURE__ */ e(
3143
3142
  "div",
3144
3143
  {
3145
3144
  className: "absolute inset-0 rounded-full animate-pulse",
3146
3145
  style: { background: "var(--t-pill-bg, #333)" }
3147
3146
  }
3148
3147
  ),
3149
- i ? /* @__PURE__ */ e(
3148
+ c ? /* @__PURE__ */ e(
3150
3149
  "div",
3151
3150
  {
3152
3151
  className: "absolute inset-0 rounded-full flex items-center justify-center text-[10px] font-bold",
@@ -3169,13 +3168,13 @@ function fa({ src: t, alt: a, size: n, className: r, style: o }) {
3169
3168
  ] });
3170
3169
  }
3171
3170
  function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: s }) {
3172
- const u = O(), [i, d] = b(""), c = _(() => {
3173
- if (!n || n.length === 0) return Rn;
3171
+ const u = O(), [c, d] = b(""), i = _(() => {
3172
+ if (!n || n.length === 0) return An;
3174
3173
  const f = [];
3175
3174
  for (const g of n) {
3176
- const k = g.networks || [], N = g.name || Sn[g.code] || g.code;
3175
+ const k = g.networks || [], N = g.name || wn[g.code] || g.code;
3177
3176
  if (k.length === 0)
3178
- f.push({ code: g.code, name: N, chain: g.code, popular: !1 });
3177
+ f.push({ code: g.code, name: N, chain: g.code, popular: fa.includes(g.code) });
3179
3178
  else
3180
3179
  for (const y of k) {
3181
3180
  const E = y.code || y.id || y.name || g.code;
@@ -3184,39 +3183,39 @@ function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
3184
3183
  name: N,
3185
3184
  chain: E,
3186
3185
  chainName: y.name,
3187
- popular: !1
3186
+ popular: fa.includes(g.code)
3188
3187
  });
3189
3188
  }
3190
3189
  }
3191
3190
  return f;
3192
3191
  }, [n]), h = P((f, g) => o === f && s === g, [o, s]), p = _(() => {
3193
3192
  var N;
3194
- const f = i.trim().toLowerCase();
3193
+ const f = c.trim().toLowerCase();
3195
3194
  if (!f) {
3196
3195
  if (o && s) {
3197
- const y = c.find((E) => E.code === o && E.chain === s);
3196
+ const y = i.find((E) => E.code === o && E.chain === s);
3198
3197
  if (y) {
3199
- const E = c.filter((V) => !(V.code === o && V.chain === s));
3198
+ const E = i.filter((V) => !(V.code === o && V.chain === s));
3200
3199
  return [y, ...E];
3201
3200
  }
3202
3201
  }
3203
- return c;
3202
+ return i;
3204
3203
  }
3205
3204
  const g = f.split(/\s+/), k = [];
3206
- for (const y of c) {
3207
- const E = ht(y.chain), V = E ? E.name.toLowerCase() : "", Y = ((N = E == null ? void 0 : E.shortName) == null ? void 0 : N.toLowerCase()) || "", z = y.chain.toLowerCase(), ie = y.code.toLowerCase(), J = y.name.toLowerCase(), ee = [ie, J, V, Y, z];
3205
+ for (const y of i) {
3206
+ const E = ht(y.chain), V = E ? E.name.toLowerCase() : "", X = ((N = E == null ? void 0 : E.shortName) == null ? void 0 : N.toLowerCase()) || "", z = y.chain.toLowerCase(), ie = y.code.toLowerCase(), J = y.name.toLowerCase(), ee = [ie, J, V, X, z];
3208
3207
  if (!g.every((L) => ee.some((S) => S.includes(L)))) continue;
3209
3208
  let te = 0;
3210
- ie === f ? te += 100 : ie.startsWith(g[0]) && (te += 50), y.popular && (te += 10), g.length > 1 && (V.includes(g[1]) || Y.includes(g[1]) || z.includes(g[1])) && (te += 25), k.push({ item: y, score: te });
3209
+ ie === f ? te += 100 : ie.startsWith(g[0]) && (te += 50), y.popular && (te += 10), g.length > 1 && (V.includes(g[1]) || X.includes(g[1]) || z.includes(g[1])) && (te += 25), k.push({ item: y, score: te });
3211
3210
  }
3212
3211
  return k.sort((y, E) => E.score - y.score), k.map((y) => y.item);
3213
- }, [c, i, o, s]);
3214
- return /* @__PURE__ */ l(X, { children: [
3212
+ }, [i, c, o, s]);
3213
+ return /* @__PURE__ */ l(Y, { children: [
3215
3214
  /* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
3216
3215
  /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
3217
3216
  /* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: u("modal.selectCrypto") }),
3218
3217
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) }),
3219
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: i, onChange: d, inline: !0 }) })
3218
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: c, onChange: d, inline: !0 }) })
3220
3219
  ] }),
3221
3220
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3222
3221
  p.map((f) => {
@@ -3235,9 +3234,9 @@ function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
3235
3234
  className: "absolute top-0 left-0",
3236
3235
  style: { background: "#ffffff", borderRadius: "50%" },
3237
3236
  children: /* @__PURE__ */ e(
3238
- fa,
3237
+ ya,
3239
3238
  {
3240
- src: wa(f.code, r),
3239
+ src: ka(f.code, r),
3241
3240
  alt: f.code,
3242
3241
  size: 32
3243
3242
  }
@@ -3256,7 +3255,7 @@ function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
3256
3255
  background: "#ffffff"
3257
3256
  },
3258
3257
  children: /* @__PURE__ */ e(
3259
- fa,
3258
+ ya,
3260
3259
  {
3261
3260
  src: Ut(f.chain, r),
3262
3261
  alt: f.chain,
@@ -3290,7 +3289,7 @@ function Xn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
3290
3289
  ] })
3291
3290
  ] });
3292
3291
  }
3293
- const Yn = {
3292
+ const $n = {
3294
3293
  "debit-credit-card": "card",
3295
3294
  "bank-transfer": "bank",
3296
3295
  "ach-bank-transfer": "bank",
@@ -3301,11 +3300,11 @@ const Yn = {
3301
3300
  "google-pay": "googlepay",
3302
3301
  paypal: "paypal",
3303
3302
  revolut: "revolut"
3304
- }, $n = {
3303
+ }, Qn = {
3305
3304
  "debit-credit-card": "payment.name.card",
3306
3305
  "bank-transfer": "payment.name.bankTransfer",
3307
3306
  "ach-bank-transfer": "payment.name.ach"
3308
- }, Qn = {
3307
+ }, zn = {
3309
3308
  "apple-pay": "Apple Pay",
3310
3309
  "google-pay": "Google Pay",
3311
3310
  "payid-bank-transfer": "PayID",
@@ -3313,9 +3312,9 @@ const Yn = {
3313
3312
  revolut: "Revolut"
3314
3313
  };
3315
3314
  function _t(t, a, n) {
3316
- const r = Qn[t];
3315
+ const r = zn[t];
3317
3316
  if (r) return r;
3318
- const o = $n[t];
3317
+ const o = Qn[t];
3319
3318
  return o && n ? n(o) : o && {
3320
3319
  "debit-credit-card": "Card",
3321
3320
  "bank-transfer": "Bank Transfer",
@@ -3323,19 +3322,19 @@ function _t(t, a, n) {
3323
3322
  }[t] || a;
3324
3323
  }
3325
3324
  function Vt(t, a, n = 24) {
3326
- const r = Yn[t];
3327
- return r ? _n(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(Kt, { size: n });
3325
+ const r = $n[t];
3326
+ return r ? Vn(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(Kt, { size: n });
3328
3327
  }
3329
- function Dr({
3328
+ function Br({
3330
3329
  methods: t,
3331
3330
  selectedId: a,
3332
3331
  onOpenModal: n,
3333
3332
  fiatCurrency: r
3334
3333
  }) {
3335
3334
  const o = O(), s = _(
3336
- () => t.filter((i) => i.supportedFiats.includes(r)),
3335
+ () => t.filter((c) => c.supportedFiats.includes(r)),
3337
3336
  [t, r]
3338
- ), u = s.find((i) => i.id === a) || s[0];
3337
+ ), u = s.find((c) => c.id === a) || s[0];
3339
3338
  return s.length === 0 ? /* @__PURE__ */ e(
3340
3339
  "div",
3341
3340
  {
@@ -3347,14 +3346,14 @@ function Dr({
3347
3346
  },
3348
3347
  children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: o("payment.unavailableFor", { currency: r }) })
3349
3348
  }
3350
- ) : /* @__PURE__ */ e(X, { children: /* @__PURE__ */ l(
3349
+ ) : /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ l(
3351
3350
  "div",
3352
3351
  {
3353
3352
  role: "button",
3354
3353
  tabIndex: 0,
3355
3354
  onClick: n,
3356
- onKeyDown: (i) => {
3357
- (i.key === "Enter" || i.key === " ") && n();
3355
+ onKeyDown: (c) => {
3356
+ (c.key === "Enter" || c.key === " ") && n();
3358
3357
  },
3359
3358
  className: "flex items-center justify-between w-full px-[18px] transition-colors",
3360
3359
  style: {
@@ -3375,42 +3374,42 @@ function Dr({
3375
3374
  }
3376
3375
  ) });
3377
3376
  }
3378
- function zn({
3377
+ function Jn({
3379
3378
  methods: t,
3380
3379
  selectedId: a,
3381
3380
  onSelect: n,
3382
3381
  onClose: r
3383
3382
  }) {
3384
- const o = O(), [s, u] = b(""), i = _(() => {
3385
- const d = s.trim().toLowerCase();
3386
- if (!d) {
3383
+ const o = O(), [s, u] = b(""), c = t.length > 0 ? t[0].id : "", d = _(() => {
3384
+ const i = s.trim().toLowerCase();
3385
+ if (!i) {
3387
3386
  if (a) {
3388
- const c = t.find((h) => h.id === a);
3389
- if (c) {
3390
- const h = t.filter((p) => p.id !== a);
3391
- return [c, ...h];
3387
+ const h = t.find((p) => p.id === a);
3388
+ if (h) {
3389
+ const p = t.filter((f) => f.id !== a);
3390
+ return [h, ...p];
3392
3391
  }
3393
3392
  }
3394
3393
  return t;
3395
3394
  }
3396
3395
  return t.filter(
3397
- (c) => c.id.toLowerCase().includes(d) || c.name.toLowerCase().includes(d) || c.description && c.description.toLowerCase().includes(d)
3396
+ (h) => h.id.toLowerCase().includes(i) || h.name.toLowerCase().includes(i) || h.description && h.description.toLowerCase().includes(i)
3398
3397
  );
3399
3398
  }, [t, s, a]);
3400
- return /* @__PURE__ */ l(X, { children: [
3399
+ return /* @__PURE__ */ l(Y, { children: [
3401
3400
  /* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
3402
3401
  /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
3403
3402
  /* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: o("modal.choosePayment") }),
3404
3403
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: r }) }),
3405
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: s, onChange: u, inline: !0 }) })
3404
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: s, onChange: u, inline: !0 }) })
3406
3405
  ] }),
3407
3406
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3408
- i.map((d, c) => {
3409
- const h = d.id === a, p = _t(d.id, d.name, o);
3407
+ d.map((i) => {
3408
+ const h = i.id === a, p = _t(i.id, i.name, o);
3410
3409
  return /* @__PURE__ */ l(
3411
3410
  "button",
3412
3411
  {
3413
- onClick: () => n(d.id),
3412
+ onClick: () => n(i.id),
3414
3413
  className: "flex items-center w-full card-press",
3415
3414
  style: { gap: 16 },
3416
3415
  children: [
@@ -3419,12 +3418,12 @@ function zn({
3419
3418
  {
3420
3419
  className: "flex items-center justify-center shrink-0",
3421
3420
  style: { width: 32, height: 32 },
3422
- children: Vt(d.id, d.icon, 32)
3421
+ children: Vt(i.id, i.icon, 32)
3423
3422
  }
3424
3423
  ),
3425
3424
  /* @__PURE__ */ l("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
3426
3425
  /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: p }),
3427
- c === 0 && /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { border: "1.5px solid var(--t-card-border)", borderRadius: 100, paddingLeft: 8, paddingRight: 8, color: "var(--t-text-secondary)", lineHeight: "20px", letterSpacing: "0.22px" }, children: o("modal.recommended") }),
3426
+ i.id === c && /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { border: "1.5px solid var(--t-card-border)", borderRadius: 100, paddingLeft: 8, paddingRight: 8, color: "var(--t-text-secondary)", lineHeight: "20px", letterSpacing: "0.22px" }, children: o("modal.recommended") }),
3428
3427
  h && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
3429
3428
  "path",
3430
3429
  {
@@ -3438,14 +3437,14 @@ function zn({
3438
3437
  ] })
3439
3438
  ]
3440
3439
  },
3441
- d.id
3440
+ i.id
3442
3441
  );
3443
3442
  }),
3444
- i.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: o("modal.noPaymentMethods") })
3443
+ d.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: o("modal.noPaymentMethods") })
3445
3444
  ] })
3446
3445
  ] });
3447
3446
  }
3448
- function Jn({
3447
+ function qn({
3449
3448
  checked: t,
3450
3449
  onChange: a,
3451
3450
  accentColor: n
@@ -3477,14 +3476,14 @@ function Jn({
3477
3476
  }
3478
3477
  );
3479
3478
  }
3480
- const qn = [
3479
+ const er = [
3481
3480
  { key: "settings.privacy", href: "https://nowramp.com/privacy-policy" },
3482
3481
  { key: "settings.terms", href: "https://nowramp.com/terms-and-conditions" }
3483
3482
  ], mt = {
3484
3483
  background: "var(--t-surface)",
3485
3484
  borderRadius: "var(--t-card-radius)"
3486
3485
  };
3487
- function er({
3486
+ function tr({
3488
3487
  onClose: t,
3489
3488
  darkMode: a,
3490
3489
  onToggleDarkMode: n,
@@ -3492,14 +3491,14 @@ function er({
3492
3491
  onSelectSkin: o,
3493
3492
  showThemeToggle: s = !0,
3494
3493
  country: u,
3495
- countryName: i,
3494
+ countryName: c,
3496
3495
  onLocationPress: d,
3497
- onLanguagePress: c,
3496
+ onLanguagePress: i,
3498
3497
  assetBaseUrl: h = ""
3499
3498
  }) {
3500
3499
  var y;
3501
3500
  const { t: p, locale: f, languages: g } = Pt(), [k, N] = b(!1);
3502
- return /* @__PURE__ */ l(X, { children: [
3501
+ return /* @__PURE__ */ l(Y, { children: [
3503
3502
  /* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 80, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
3504
3503
  /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
3505
3504
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) })
@@ -3510,7 +3509,7 @@ function er({
3510
3509
  {
3511
3510
  onClick: d,
3512
3511
  className: "w-full text-left transition-colors card-press",
3513
- style: { ...mt, color: "inherit", border: "none", cursor: "pointer", padding: "12px 16px" },
3512
+ style: { ...mt, backgroundColor: "var(--t-surface)", color: "inherit", border: "none", cursor: "pointer", padding: "12px 16px" },
3514
3513
  children: [
3515
3514
  /* @__PURE__ */ e("span", { className: "text-[13px] block mb-1.5", style: { color: "var(--t-text-secondary)" }, children: p("settings.location") }),
3516
3515
  /* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
@@ -3525,8 +3524,8 @@ function er({
3525
3524
  style: { width: 28, height: 28, borderRadius: "50%", objectFit: "cover" },
3526
3525
  onError: () => N(!0)
3527
3526
  }
3528
- ) : /* @__PURE__ */ e(tr, { size: 28 }),
3529
- /* @__PURE__ */ e("span", { className: "text-[15px] font-medium", style: { color: "var(--t-text)" }, children: i || u })
3527
+ ) : /* @__PURE__ */ e(ar, { size: 28 }),
3528
+ /* @__PURE__ */ e("span", { className: "text-[15px] font-medium", style: { color: "var(--t-text)" }, children: c || u })
3530
3529
  ] }),
3531
3530
  /* @__PURE__ */ e(De, {})
3532
3531
  ] })
@@ -3540,23 +3539,23 @@ function er({
3540
3539
  style: { ...mt, paddingTop: 14, paddingBottom: 14 },
3541
3540
  children: [
3542
3541
  /* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p("settings.darkMode") }),
3543
- /* @__PURE__ */ e(Jn, { checked: a, onChange: n })
3542
+ /* @__PURE__ */ e(qn, { checked: a, onChange: n })
3544
3543
  ]
3545
3544
  }
3546
3545
  ),
3547
- c && /* @__PURE__ */ l(
3546
+ i && /* @__PURE__ */ l(
3548
3547
  "button",
3549
3548
  {
3550
- onClick: c,
3551
- className: "flex items-center justify-between w-full px-4 transition-colors card-press",
3552
- style: { ...mt, color: "inherit", border: "none", cursor: "pointer", paddingTop: 14, paddingBottom: 14 },
3549
+ onClick: i,
3550
+ className: "flex items-center justify-between w-full transition-colors card-press",
3551
+ style: { ...mt, backgroundColor: "var(--t-surface)", color: "inherit", border: "none", cursor: "pointer", padding: "14px 16px", margin: 0, textAlign: "left" },
3553
3552
  children: [
3554
3553
  /* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p("settings.language") }),
3555
3554
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: ((y = g.find((E) => E.code === f)) == null ? void 0 : y.name) || f })
3556
3555
  ]
3557
3556
  }
3558
3557
  ),
3559
- qn.map((E) => /* @__PURE__ */ l(
3558
+ er.map((E) => /* @__PURE__ */ l(
3560
3559
  "a",
3561
3560
  {
3562
3561
  href: E.href,
@@ -3566,7 +3565,7 @@ function er({
3566
3565
  style: { ...mt, textDecoration: "none", color: "inherit", paddingTop: 14, paddingBottom: 14 },
3567
3566
  children: [
3568
3567
  /* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p(E.key) }),
3569
- /* @__PURE__ */ e(Mn, {})
3568
+ /* @__PURE__ */ e(Dn, {})
3570
3569
  ]
3571
3570
  },
3572
3571
  E.key
@@ -3574,7 +3573,7 @@ function er({
3574
3573
  ] })
3575
3574
  ] });
3576
3575
  }
3577
- function tr({ size: t = 28 }) {
3576
+ function ar({ size: t = 28 }) {
3578
3577
  return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 40 40", fill: "none", children: [
3579
3578
  /* @__PURE__ */ e("circle", { cx: "20", cy: "20", r: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
3580
3579
  /* @__PURE__ */ e("ellipse", { cx: "20", cy: "20", rx: "9", ry: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
@@ -3582,38 +3581,38 @@ function tr({ size: t = 28 }) {
3582
3581
  /* @__PURE__ */ e("path", { d: "M5 12h30M5 28h30", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" })
3583
3582
  ] });
3584
3583
  }
3585
- function ar({
3584
+ function nr({
3586
3585
  onClose: t,
3587
3586
  onSelect: a,
3588
3587
  assetBaseUrl: n = "",
3589
3588
  selectedCode: r
3590
3589
  }) {
3591
- const o = O(), [s, u] = b(""), i = _(() => {
3590
+ const o = O(), [s, u] = b(""), c = _(() => {
3592
3591
  const d = s.trim().toLowerCase();
3593
3592
  if (!d) {
3594
3593
  if (r) {
3595
- const c = r.toLowerCase(), h = Bt[c];
3594
+ const i = r.toLowerCase(), h = Bt[i];
3596
3595
  if (h) {
3597
- const p = pt.filter((f) => f.code !== c);
3596
+ const p = pt.filter((f) => f.code !== i);
3598
3597
  return [h, ...p];
3599
3598
  }
3600
3599
  }
3601
3600
  return pt;
3602
3601
  }
3603
3602
  return pt.filter(
3604
- (c) => c.name.toLowerCase().includes(d) || c.code.includes(d) || c.defaultFiat.toLowerCase().includes(d)
3603
+ (i) => i.name.toLowerCase().includes(d) || i.code.includes(d) || i.defaultFiat.toLowerCase().includes(d)
3605
3604
  );
3606
3605
  }, [s, r]);
3607
- return /* @__PURE__ */ l(X, { children: [
3606
+ return /* @__PURE__ */ l(Y, { children: [
3608
3607
  /* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
3609
3608
  /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
3610
3609
  /* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: o("modal.selectCountry") }),
3611
3610
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) }),
3612
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: s, onChange: u, inline: !0 }) })
3611
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: s, onChange: u, inline: !0 }) })
3613
3612
  ] }),
3614
3613
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3615
- i.map((d) => {
3616
- const c = (r == null ? void 0 : r.toLowerCase()) === d.code;
3614
+ c.map((d) => {
3615
+ const i = (r == null ? void 0 : r.toLowerCase()) === d.code;
3617
3616
  return /* @__PURE__ */ l(
3618
3617
  "button",
3619
3618
  {
@@ -3621,10 +3620,10 @@ function ar({
3621
3620
  className: "flex items-center w-full card-press",
3622
3621
  style: { gap: 16 },
3623
3622
  children: [
3624
- /* @__PURE__ */ e(nr, { code: d.code, size: 32, baseUrl: n }),
3623
+ /* @__PURE__ */ e(rr, { code: d.code, size: 32, baseUrl: n }),
3625
3624
  /* @__PURE__ */ l("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
3626
3625
  /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: d.name }),
3627
- c && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
3626
+ i && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
3628
3627
  "path",
3629
3628
  {
3630
3629
  d: "M13.5 4.5L6 12L2.5 8.5",
@@ -3640,11 +3639,11 @@ function ar({
3640
3639
  d.code
3641
3640
  );
3642
3641
  }),
3643
- i.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: o("modal.noCountries") })
3642
+ c.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: o("modal.noCountries") })
3644
3643
  ] })
3645
3644
  ] });
3646
3645
  }
3647
- function nr({ code: t, size: a = 32, baseUrl: n = "" }) {
3646
+ function rr({ code: t, size: a = 32, baseUrl: n = "" }) {
3648
3647
  const [r, o] = b(!1);
3649
3648
  return r ? /* @__PURE__ */ e(
3650
3649
  "div",
@@ -3674,46 +3673,46 @@ function nr({ code: t, size: a = 32, baseUrl: n = "" }) {
3674
3673
  }
3675
3674
  );
3676
3675
  }
3677
- function rr({
3676
+ function or({
3678
3677
  onClose: t,
3679
3678
  onSelect: a,
3680
3679
  selectedCode: n
3681
3680
  }) {
3682
3681
  const r = O(), [o, s] = b(""), u = _(() => {
3683
- const i = o.trim().toLowerCase();
3684
- if (!i) {
3682
+ const c = o.trim().toLowerCase();
3683
+ if (!c) {
3685
3684
  if (n) {
3686
- const d = Ze.find((c) => c.code === n);
3685
+ const d = Ze.find((i) => i.code === n);
3687
3686
  if (d) {
3688
- const c = Ze.filter((h) => h.code !== n);
3689
- return [d, ...c];
3687
+ const i = Ze.filter((h) => h.code !== n);
3688
+ return [d, ...i];
3690
3689
  }
3691
3690
  }
3692
3691
  return Ze;
3693
3692
  }
3694
3693
  return Ze.filter(
3695
- (d) => d.name.toLowerCase().includes(i) || d.english.toLowerCase().includes(i) || d.code.includes(i)
3694
+ (d) => d.name.toLowerCase().includes(c) || d.english.toLowerCase().includes(c) || d.code.includes(c)
3696
3695
  );
3697
3696
  }, [o, n]);
3698
- return /* @__PURE__ */ l(X, { children: [
3697
+ return /* @__PURE__ */ l(Y, { children: [
3699
3698
  /* @__PURE__ */ l("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
3700
3699
  /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(we, { width: 46 }) }),
3701
3700
  /* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: r("modal.selectLanguage") }),
3702
3701
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Be, { onClick: t }) }),
3703
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: o, onChange: s, inline: !0 }) })
3702
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Xe, { value: o, onChange: s, inline: !0 }) })
3704
3703
  ] }),
3705
3704
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3706
- u.map((i) => {
3707
- const d = n === i.code;
3705
+ u.map((c) => {
3706
+ const d = n === c.code;
3708
3707
  return /* @__PURE__ */ e(
3709
3708
  "button",
3710
3709
  {
3711
- onClick: () => a(i.code),
3710
+ onClick: () => a(c.code),
3712
3711
  className: "flex items-center w-full card-press",
3713
3712
  style: { gap: 16 },
3714
3713
  children: /* @__PURE__ */ l("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, paddingLeft: 4, gap: 10 }, children: [
3715
- /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: i.name }),
3716
- /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-muted)" }, children: i.english }),
3714
+ /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: c.name }),
3715
+ /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-muted)" }, children: c.english }),
3717
3716
  d && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
3718
3717
  "path",
3719
3718
  {
@@ -3726,14 +3725,14 @@ function rr({
3726
3725
  ) }) })
3727
3726
  ] })
3728
3727
  },
3729
- i.code
3728
+ c.code
3730
3729
  );
3731
3730
  }),
3732
3731
  u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: r("modal.noLanguages") })
3733
3732
  ] })
3734
3733
  ] });
3735
3734
  }
3736
- function or({
3735
+ function ir({
3737
3736
  tab: t,
3738
3737
  onTabSwitch: a,
3739
3738
  showFlowToggle: n,
@@ -3797,12 +3796,12 @@ function or({
3797
3796
  ]
3798
3797
  }
3799
3798
  ) : /* @__PURE__ */ e("div", {}),
3800
- /* @__PURE__ */ e("div", { style: { width: 40, display: "flex", alignItems: "center", justifyContent: "flex-end" }, children: r ? /* @__PURE__ */ e(On, { onClick: o }) : /* @__PURE__ */ e("div", { style: { width: 40 } }) })
3799
+ /* @__PURE__ */ e("div", { style: { width: 40, display: "flex", alignItems: "center", justifyContent: "flex-end" }, children: r ? /* @__PURE__ */ e(Kn, { onClick: o }) : /* @__PURE__ */ e("div", { style: { width: 40 } }) })
3801
3800
  ]
3802
3801
  }
3803
3802
  );
3804
3803
  }
3805
- function ir({
3804
+ function lr({
3806
3805
  amount: t,
3807
3806
  onAmountChange: a,
3808
3807
  currencyCode: n,
@@ -3810,9 +3809,9 @@ function ir({
3810
3809
  onOpenModal: o,
3811
3810
  assetBaseUrl: s,
3812
3811
  error: u,
3813
- fieldLocks: i,
3812
+ fieldLocks: c,
3814
3813
  onBlur: d,
3815
- inputRef: c,
3814
+ inputRef: i,
3816
3815
  chainCode: h,
3817
3816
  chainDisplay: p,
3818
3817
  getChainIconUrl: f,
@@ -3820,9 +3819,9 @@ function ir({
3820
3819
  focused: k,
3821
3820
  onFocus: N
3822
3821
  }) {
3823
- var E, V, Y;
3822
+ var E, V, X;
3824
3823
  const y = O();
3825
- return /* @__PURE__ */ l(X, { children: [
3824
+ return /* @__PURE__ */ l(Y, { children: [
3826
3825
  /* @__PURE__ */ l(
3827
3826
  "div",
3828
3827
  {
@@ -3838,7 +3837,7 @@ function ir({
3838
3837
  /* @__PURE__ */ e(
3839
3838
  "input",
3840
3839
  {
3841
- ref: c,
3840
+ ref: i,
3842
3841
  type: "text",
3843
3842
  value: t,
3844
3843
  onChange: a,
@@ -3859,7 +3858,7 @@ function ir({
3859
3858
  width: 0
3860
3859
  },
3861
3860
  inputMode: "decimal",
3862
- disabled: !!((E = i == null ? void 0 : i.sourceAmount) != null && E.locked)
3861
+ disabled: !!((E = c == null ? void 0 : c.sourceAmount) != null && E.locked)
3863
3862
  }
3864
3863
  ),
3865
3864
  r ? /* @__PURE__ */ l(
@@ -3878,7 +3877,7 @@ function ir({
3878
3877
  backdropFilter: "blur(4px)",
3879
3878
  WebkitBackdropFilter: "blur(4px)"
3880
3879
  },
3881
- disabled: !!((V = i == null ? void 0 : i.sourceCurrency) != null && V.locked),
3880
+ disabled: !!((V = c == null ? void 0 : c.sourceCurrency) != null && V.locked),
3882
3881
  children: [
3883
3882
  /* @__PURE__ */ e(Ot, { currencyCode: n, size: 24, baseUrl: s }),
3884
3883
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: n }),
@@ -3902,9 +3901,9 @@ function ir({
3902
3901
  backdropFilter: "blur(4px)",
3903
3902
  WebkitBackdropFilter: "blur(4px)"
3904
3903
  },
3905
- disabled: !!((Y = i == null ? void 0 : i.destinationCurrency) != null && Y.locked),
3904
+ disabled: !!((X = c == null ? void 0 : c.destinationCurrency) != null && X.locked),
3906
3905
  children: [
3907
- /* @__PURE__ */ e(Ea, { ticker: n, size: 24, baseUrl: s }),
3906
+ /* @__PURE__ */ e(Ra, { ticker: n, size: 24, baseUrl: s }),
3908
3907
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: n }),
3909
3908
  /* @__PURE__ */ e(De, {})
3910
3909
  ]
@@ -3932,19 +3931,19 @@ function ir({
3932
3931
  u && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 text-center", style: { color: "var(--t-error)" }, children: u })
3933
3932
  ] });
3934
3933
  }
3935
- function lr({ char: t, height: a = 38 }) {
3934
+ function cr({ char: t, height: a = 38 }) {
3936
3935
  const n = "0123456789", r = n.indexOf(t);
3937
3936
  return r === -1 ? /* @__PURE__ */ e("span", { style: { display: "inline-block", textAlign: "center" }, children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: a, lineHeight: `${a}px`, textAlign: "center" }, 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)) }) });
3938
3937
  }
3939
- function cr({
3938
+ function sr({
3940
3939
  value: t,
3941
3940
  height: a = 38,
3942
3941
  className: n = "",
3943
3942
  style: r = {}
3944
3943
  }) {
3945
- return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", fontVariantNumeric: "tabular-nums", ...r }, children: t.split("").map((o, s) => /* @__PURE__ */ e(lr, { char: o, height: a }, s)) });
3944
+ return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", fontVariantNumeric: "tabular-nums", ...r }, children: t.split("").map((o, s) => /* @__PURE__ */ e(cr, { char: o, height: a }, s)) });
3946
3945
  }
3947
- function sr({
3946
+ function dr({
3948
3947
  amount: t,
3949
3948
  currencyCode: a,
3950
3949
  chainCode: n,
@@ -3952,9 +3951,9 @@ function sr({
3952
3951
  isBuy: o,
3953
3952
  onOpenModal: s,
3954
3953
  displayRate: u,
3955
- assetBaseUrl: i,
3954
+ assetBaseUrl: c,
3956
3955
  quotesLoading: d,
3957
- onOpenRateBreakdown: c,
3956
+ onOpenRateBreakdown: i,
3958
3957
  fieldLocks: h,
3959
3958
  spendNumeric: p,
3960
3959
  getChainIconUrl: f,
@@ -3977,7 +3976,7 @@ function sr({
3977
3976
  /* @__PURE__ */ l("div", { className: "flex flex-col gap-[8px]", children: [
3978
3977
  /* @__PURE__ */ l("div", { className: "flex items-start justify-between", children: [
3979
3978
  /* @__PURE__ */ e("div", { className: k ? "rate-flash" : "", children: /* @__PURE__ */ e(
3980
- cr,
3979
+ sr,
3981
3980
  {
3982
3981
  value: p > 0 ? t : "0",
3983
3982
  height: 32,
@@ -4006,7 +4005,7 @@ function sr({
4006
4005
  },
4007
4006
  disabled: !!((y = h == null ? void 0 : h.destinationCurrency) != null && y.locked),
4008
4007
  children: [
4009
- /* @__PURE__ */ e(Ea, { ticker: a, size: 24, baseUrl: i }),
4008
+ /* @__PURE__ */ e(Ra, { ticker: a, size: 24, baseUrl: c }),
4010
4009
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: a }),
4011
4010
  /* @__PURE__ */ e(De, {})
4012
4011
  ]
@@ -4029,7 +4028,7 @@ function sr({
4029
4028
  },
4030
4029
  disabled: !!((E = h == null ? void 0 : h.sourceCurrency) != null && E.locked),
4031
4030
  children: [
4032
- /* @__PURE__ */ e(Ot, { currencyCode: a, size: 24, baseUrl: i }),
4031
+ /* @__PURE__ */ e(Ot, { currencyCode: a, size: 24, baseUrl: c }),
4033
4032
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: a }),
4034
4033
  /* @__PURE__ */ e(De, {})
4035
4034
  ]
@@ -4037,15 +4036,15 @@ function sr({
4037
4036
  )
4038
4037
  ] }),
4039
4038
  /* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
4040
- /* @__PURE__ */ e("div", { className: "flex items-center gap-[4px]", children: d && !g ? /* @__PURE__ */ l(X, { children: [
4039
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-[4px]", children: d && !g ? /* @__PURE__ */ l(Y, { children: [
4041
4040
  /* @__PURE__ */ e(Se, { size: 12 }),
4042
4041
  /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: N("receive.fetchingRate") })
4043
- ] }) : /* @__PURE__ */ l(X, { children: [
4042
+ ] }) : /* @__PURE__ */ l(Y, { children: [
4044
4043
  /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: u || " " }),
4045
4044
  u && /* @__PURE__ */ e(
4046
4045
  "button",
4047
4046
  {
4048
- onClick: c,
4047
+ onClick: i,
4049
4048
  className: "flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity",
4050
4049
  children: /* @__PURE__ */ e(Mt, { size: 12 })
4051
4050
  }
@@ -4055,7 +4054,7 @@ function sr({
4055
4054
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 12, height: 12, background: "#ffffff" }, children: /* @__PURE__ */ e(
4056
4055
  "img",
4057
4056
  {
4058
- src: f(n, i),
4057
+ src: f(n, c),
4059
4058
  alt: n,
4060
4059
  width: 12,
4061
4060
  height: 12,
@@ -4071,7 +4070,7 @@ function sr({
4071
4070
  }
4072
4071
  );
4073
4072
  }
4074
- function dr({
4073
+ function ur({
4075
4074
  selectedMethod: t,
4076
4075
  onOpenModal: a,
4077
4076
  getMethodIcon: n,
@@ -4095,7 +4094,7 @@ function dr({
4095
4094
  children: [
4096
4095
  /* @__PURE__ */ e("span", { className: "text-[13px] flex-1", style: { color: "var(--t-text-secondary)", letterSpacing: "0.13px", lineHeight: "20px" }, children: o("payment.label") }),
4097
4096
  /* @__PURE__ */ l("span", { className: "flex items-center gap-[6px]", children: [
4098
- t && /* @__PURE__ */ l(X, { children: [
4097
+ t && /* @__PURE__ */ l(Y, { children: [
4099
4098
  /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: n(t.id, t.icon, 20) }),
4100
4099
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "16px" }, children: r(t.id, t.name) })
4101
4100
  ] }),
@@ -4106,7 +4105,7 @@ function dr({
4106
4105
  }
4107
4106
  );
4108
4107
  }
4109
- function ur({
4108
+ function mr({
4110
4109
  address: t,
4111
4110
  onChange: a,
4112
4111
  placeholder: n,
@@ -4114,10 +4113,10 @@ function ur({
4114
4113
  validating: o,
4115
4114
  disabled: s,
4116
4115
  onFocus: u,
4117
- onBlur: i,
4116
+ onBlur: c,
4118
4117
  focused: d
4119
4118
  }) {
4120
- const c = O(), h = o && t.trim().length >= 10, [p, f] = b(!1), g = M(r);
4119
+ const i = O(), h = o && t.trim().length >= 10, [p, f] = b(!1), g = M(r);
4121
4120
  return H(() => {
4122
4121
  if (r && !g.current) {
4123
4122
  f(!0);
@@ -4135,7 +4134,7 @@ function ur({
4135
4134
  borderRadius: "var(--t-card-radius)"
4136
4135
  },
4137
4136
  children: [
4138
- /* @__PURE__ */ e("div", { className: "text-[13px]", style: { color: "var(--t-text-secondary)", letterSpacing: "0.13px", lineHeight: "20px" }, children: c("wallet.label") }),
4137
+ /* @__PURE__ */ e("div", { className: "text-[13px]", style: { color: "var(--t-text-secondary)", letterSpacing: "0.13px", lineHeight: "20px" }, children: i("wallet.label") }),
4139
4138
  /* @__PURE__ */ l("div", { className: "relative flex items-center", children: [
4140
4139
  /* @__PURE__ */ e(
4141
4140
  "input",
@@ -4144,7 +4143,7 @@ function ur({
4144
4143
  value: t,
4145
4144
  onChange: (k) => a(k.target.value),
4146
4145
  onFocus: u,
4147
- onBlur: i,
4146
+ onBlur: c,
4148
4147
  placeholder: n,
4149
4148
  spellCheck: !1,
4150
4149
  autoComplete: "off",
@@ -4188,7 +4187,7 @@ function ur({
4188
4187
  r && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 text-center", style: { color: "var(--t-error)" }, children: r })
4189
4188
  ] });
4190
4189
  }
4191
- function mr({ label: t, disabled: a, loading: n, onClick: r }) {
4190
+ function pr({ label: t, disabled: a, loading: n, onClick: r }) {
4192
4191
  return /* @__PURE__ */ e(
4193
4192
  "button",
4194
4193
  {
@@ -4219,14 +4218,14 @@ function mr({ label: t, disabled: a, loading: n, onClick: r }) {
4219
4218
  }
4220
4219
  );
4221
4220
  }
4222
- function pr() {
4221
+ function hr() {
4223
4222
  const t = O();
4224
4223
  return /* @__PURE__ */ l("div", { className: "text-center py-3", style: { height: 16, lineHeight: "16px" }, children: [
4225
4224
  /* @__PURE__ */ e("span", { style: { fontSize: 9, opacity: 0.5, color: "var(--t-text)", letterSpacing: "0.27px" }, children: t("footer.poweredBy") }),
4226
4225
  /* @__PURE__ */ e("span", { style: { fontSize: 9, opacity: 0.65, color: "var(--t-text)", letterSpacing: "0.27px" }, children: t("footer.brand") })
4227
4226
  ] });
4228
4227
  }
4229
- function hr({
4228
+ function fr({
4230
4229
  quote: t,
4231
4230
  isOpen: a,
4232
4231
  onClose: n,
@@ -4234,7 +4233,7 @@ function hr({
4234
4233
  quotesLoading: o
4235
4234
  }) {
4236
4235
  var g, k;
4237
- const s = O(), [u, i] = b(!1), [d, c] = b(!1);
4236
+ const s = O(), [u, c] = b(!1), [d, i] = b(!1);
4238
4237
  if (!a) return null;
4239
4238
  const h = (N) => String(N).padStart(2, "0"), p = (t == null ? void 0 : t.fiatCurrency) === "USD" ? "$" : (t == null ? void 0 : t.fiatCurrency) === "EUR" ? "€" : (t == null ? void 0 : t.fiatCurrency) === "GBP" ? "£" : t != null && t.fiatCurrency ? `${t.fiatCurrency} ` : "$", f = (N) => {
4240
4239
  const y = typeof N == "string" ? parseFloat(N) : N;
@@ -4242,7 +4241,7 @@ function hr({
4242
4241
  };
4243
4242
  return /* @__PURE__ */ l("div", { className: "px-5 py-5", children: [
4244
4243
  /* @__PURE__ */ l("div", { className: "flex items-center justify-between mb-3", children: [
4245
- /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: o ? /* @__PURE__ */ e(Se, { size: 16 }) : /* @__PURE__ */ l(X, { children: [
4244
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: o ? /* @__PURE__ */ e(Se, { size: 16 }) : /* @__PURE__ */ l(Y, { children: [
4246
4245
  /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: s("rate.updatesInLabel") }),
4247
4246
  /* @__PURE__ */ l(
4248
4247
  "span",
@@ -4258,7 +4257,7 @@ function hr({
4258
4257
  /* @__PURE__ */ e(
4259
4258
  "button",
4260
4259
  {
4261
- onClick: () => i((N) => !N),
4260
+ onClick: () => c((N) => !N),
4262
4261
  className: "flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity",
4263
4262
  "aria-label": s("rate.rateTooltip"),
4264
4263
  children: /* @__PURE__ */ e(Mt, { size: 12 })
@@ -4306,7 +4305,7 @@ function hr({
4306
4305
  /* @__PURE__ */ e(
4307
4306
  "button",
4308
4307
  {
4309
- onClick: () => c((N) => !N),
4308
+ onClick: () => i((N) => !N),
4310
4309
  className: "flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity",
4311
4310
  "aria-label": s("rate.networkFeeTooltip"),
4312
4311
  children: /* @__PURE__ */ e(Mt, { size: 12 })
@@ -4327,7 +4326,7 @@ function hr({
4327
4326
  ] }) : /* @__PURE__ */ e("div", { className: "text-[13px] py-4 text-center", style: { color: "var(--t-text-muted)" }, children: s("rate.noQuote") })
4328
4327
  ] });
4329
4328
  }
4330
- function fr({
4329
+ function yr({
4331
4330
  className: t = "",
4332
4331
  theme: a = "dark",
4333
4332
  skinId: n = "mono",
@@ -4335,9 +4334,9 @@ function fr({
4335
4334
  bgColor: o,
4336
4335
  bgImage: s,
4337
4336
  borderColor: u,
4338
- borderRadius: i,
4337
+ borderRadius: c,
4339
4338
  surfaceColor: d,
4340
- inputBgColor: c,
4339
+ inputBgColor: i,
4341
4340
  textColor: h,
4342
4341
  textSecondaryColor: p,
4343
4342
  textMutedColor: f,
@@ -4347,7 +4346,7 @@ function fr({
4347
4346
  showThemeToggle: y = !0,
4348
4347
  autoRedirect: E = !1,
4349
4348
  explorerUrl: V,
4350
- doneButtonText: Y,
4349
+ doneButtonText: X,
4351
4350
  supportEmail: z,
4352
4351
  stablecoinParity: ie,
4353
4352
  partnerName: J,
@@ -4377,7 +4376,7 @@ function fr({
4377
4376
  selectionUnsupported: he,
4378
4377
  quotesEmpty: j,
4379
4378
  bestUnavailableReason: He
4380
- } = Xe(), { locale: Qe, setLocale: gt } = Pt(), [se, Pe] = b(a === "dark"), [Ee, xt] = b(n), [ue, W] = b(null), [it, G] = b(!1), [vt, ze] = b(!1), [Re, lt] = b(!1), [Oe, Je] = b(!1), [qe, Ae] = b(null), [et, Ct] = b(!0), [bt, ct] = b(!1), [v, A] = b(!1), [T, F] = b(null), [U, Z] = b(!1), [Ke, Te] = b(30), [Ra, jt] = b(!1), [Aa, Wt] = b(!1), [Ta, Gt] = b(!1), La = M(null), St = M(), wt = M(S.flowType), Fa = ee ?? 640;
4379
+ } = Ye(), { locale: Qe, setLocale: gt } = Pt(), [se, Pe] = b(a === "dark"), [Ee, xt] = b(n), [ue, W] = b(null), [it, G] = b(!1), [vt, ze] = b(!1), [Re, lt] = b(!1), [Oe, Je] = b(!1), [qe, Ae] = b(null), [et, Ct] = b(!0), [bt, ct] = b(!1), [v, A] = b(!1), [T, F] = b(null), [U, Z] = b(!1), [Ke, Te] = b(30), [Aa, jt] = b(!1), [Ta, Wt] = b(!1), [La, Gt] = b(!1), Fa = M(null), St = M(), wt = M(S.flowType), Ua = ee ?? 640;
4381
4380
  H(() => {
4382
4381
  Pe(a === "dark");
4383
4382
  }, [a]), H(() => {
@@ -4391,7 +4390,7 @@ function fr({
4391
4390
  }
4392
4391
  wt.current = S.flowType;
4393
4392
  }, [S.flowType, et]);
4394
- const st = S.flowType, B = st === "buy", re = S.cryptoCurrency || "BTC", fe = S.fiatCurrency || "USD", kt = B ? S.fiatAmount : S.cryptoAmount, oe = En(kt), ve = (na = R == null ? void 0 : R.bestQuote) != null && na.exchangeRate ? parseFloat(R.bestQuote.exchangeRate) : null, tt = M(null);
4393
+ const st = S.flowType, B = st === "buy", re = S.cryptoCurrency || "BTC", fe = S.fiatCurrency || "USD", kt = B ? S.fiatAmount : S.cryptoAmount, oe = Rn(kt), ve = (na = R == null ? void 0 : R.bestQuote) != null && na.exchangeRate ? parseFloat(R.bestQuote.exchangeRate) : null, tt = M(null);
4395
4394
  ve && re && fe && (tt.current = { rate: ve, crypto: re, fiat: fe }), H(() => {
4396
4395
  (j || ae) && (tt.current = null);
4397
4396
  }, [j, ae]);
@@ -4410,7 +4409,7 @@ function fr({
4410
4409
  }
4411
4410
  Nt.current = Le;
4412
4411
  }, [Le]);
4413
- const at = !!(ie && J && B && ka(re) && ve), Ua = at && re.toUpperCase().includes(fe.toUpperCase()), Zt = at && oe > 0 ? It(Ua ? oe : oe / ve) : null, Ia = at && Zt ? Zt : Le, Ma = _(() => {
4412
+ const at = !!(ie && J && B && Na(re) && ve), Ia = at && re.toUpperCase().includes(fe.toUpperCase()), Zt = at && oe > 0 ? It(Ia ? oe : oe / ve) : null, Ma = at && Zt ? Zt : Le, Da = _(() => {
4414
4413
  var $, Ue, je;
4415
4414
  const x = ve || (($ = tt.current) == null ? void 0 : $.rate), C = ve ? re : (Ue = tt.current) == null ? void 0 : Ue.crypto, K = ve ? fe : (je = tt.current) == null ? void 0 : je.fiat;
4416
4415
  return !x || !C || !K ? "" : `1 ${C} ≈ ${x.toFixed(2)} ${K}`;
@@ -4436,8 +4435,8 @@ function fr({
4436
4435
  Ae(!0), D({ type: "SET_WALLET_ERROR", message: "" });
4437
4436
  else {
4438
4437
  Ae(!1);
4439
- const za = ((Ue = Lt.errors) == null ? void 0 : Ue[0]) || ((je = Lt.details) == null ? void 0 : je.formatMessage) || L("wallet.invalidServer");
4440
- D({ type: "SET_WALLET_ERROR", message: za });
4438
+ const Ja = ((Ue = Lt.errors) == null ? void 0 : Ue[0]) || ((je = Lt.details) == null ? void 0 : je.formatMessage) || L("wallet.invalidServer");
4439
+ D({ type: "SET_WALLET_ERROR", message: Ja });
4441
4440
  }
4442
4441
  } catch (At) {
4443
4442
  if (At instanceof DOMException && At.name === "AbortError") return;
@@ -4449,39 +4448,39 @@ function fr({
4449
4448
  clearTimeout(St.current), K.abort();
4450
4449
  };
4451
4450
  }, [S.walletAddress, S.network, ce.apiUrl]);
4452
- const Et = !kt || oe === 0, Xt = oe > 0 && (B ? oe < ma : oe < pa), Yt = !!xe || Xt || it && Et, Da = oe > 0 && !xe && !Xt, $t = S.walletAddress.trim().length >= 10 && qe !== !1 && !Oe, Qt = Da && $t && !!S.cryptoCurrency && !!S.network, Ba = (x) => {
4451
+ const Et = !kt || oe === 0, Yt = oe > 0 && (B ? oe < ma : oe < pa), Xt = !!xe || Yt || it && Et, Ba = oe > 0 && !xe && !Yt, $t = S.walletAddress.trim().length >= 10 && qe !== !1 && !Oe, Qt = Ba && $t && !!S.cryptoCurrency && !!S.network, Ha = (x) => {
4453
4452
  let C = x.target.value.replace(/[^0-9.,]/g, "");
4454
4453
  const K = B ? 2 : 6, $ = C.indexOf(".");
4455
4454
  $ !== -1 && C.length - $ - 1 > K && (C = C.slice(0, $ + K + 1)), D(B ? { type: "SET_FIAT_AMOUNT", amount: C } : { type: "SET_CRYPTO_AMOUNT", amount: C });
4456
- }, Ha = (x) => {
4455
+ }, Pa = (x) => {
4457
4456
  x !== st && D({ type: "SET_FLOW_TYPE", flowType: x, fieldLocks: le });
4458
- }, Pa = P(
4457
+ }, Oa = P(
4459
4458
  (x) => {
4460
4459
  D({ type: "SET_FIAT_CURRENCY", currency: x });
4461
4460
  },
4462
4461
  [D]
4463
- ), Oa = P(
4462
+ ), Ka = P(
4464
4463
  (x, C) => {
4465
4464
  D({ type: "SET_CRYPTO_CURRENCY", currency: x }), D({ type: "SET_CRYPTO_CHAIN", chain: C });
4466
4465
  },
4467
4466
  [D]
4468
- ), Ka = P(
4467
+ ), _a = P(
4469
4468
  (x) => {
4470
4469
  D({ type: "SET_PAYMENT_METHOD", methodId: x });
4471
4470
  },
4472
4471
  [D]
4473
- ), _a = P(
4472
+ ), Va = P(
4474
4473
  (x) => {
4475
4474
  D({ type: "SET_COUNTRY", country: x }), W(null);
4476
4475
  },
4477
4476
  [D]
4478
- ), Va = P(() => {
4477
+ ), ja = P(() => {
4479
4478
  W(null), setTimeout(() => W("country"), 280);
4480
- }, []), ja = P(() => {
4479
+ }, []), Wa = P(() => {
4481
4480
  W(null), setTimeout(() => W("language"), 280);
4482
- }, []), Wa = S.country ? (ra = Bt[S.country.toLowerCase()]) == null ? void 0 : ra.name : void 0, Ga = () => {
4481
+ }, []), Ga = S.country ? (ra = Bt[S.country.toLowerCase()]) == null ? void 0 : ra.name : void 0, Za = () => {
4483
4482
  if (!Qt) {
4484
- (Yt || Et) && (G(!0), Wt(!0), setTimeout(() => Wt(!1), 400));
4483
+ (Xt || Et) && (G(!0), Wt(!0), setTimeout(() => Wt(!1), 400));
4485
4484
  return;
4486
4485
  }
4487
4486
  A(!0), me();
@@ -4522,10 +4521,10 @@ function fr({
4522
4521
  }, [U, _e, me]), H(() => {
4523
4522
  U && _e && !w && Te(30);
4524
4523
  }, [w, U, _e]);
4525
- const Jt = se ? "theme-dark" : "theme-light", dt = da.find((x) => x.id === Ee) || da[0], Za = dt.accent === null, Xa = r ? ye(r) : !1, qt = (x) => {
4524
+ const Jt = se ? "theme-dark" : "theme-light", dt = da.find((x) => x.id === Ee) || da[0], Ya = dt.accent === null, Xa = r ? ye(r) : !1, qt = (x) => {
4526
4525
  const C = x.replace("#", ""), K = parseInt(C.substring(0, 2), 16), $ = parseInt(C.substring(2, 4), 16), Ue = parseInt(C.substring(4, 6), 16);
4527
4526
  return (0.299 * K + 0.587 * $ + 0.114 * Ue) / 255 > 0.5 ? "#000000" : "#ffffff";
4528
- }, ea = Xa ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": qt(r) } : Za ? {
4527
+ }, ea = Xa ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": qt(r) } : Ya ? {
4529
4528
  "--t-accent": se ? "#ffffff" : "#111111",
4530
4529
  "--t-cta-bg": se ? "#ffffff" : "#111111",
4531
4530
  "--t-cta-text": se ? "#000000" : "#ffffff"
@@ -4534,19 +4533,19 @@ function fr({
4534
4533
  "--t-cta-bg": dt.accent,
4535
4534
  "--t-cta-text": qt(dt.accent)
4536
4535
  }, de = {};
4537
- d && ye(d) && (de["--t-surface"] = d, de["--t-modal-bg"] = d), c && ye(c) && (de["--t-pill-bg"] = c, de["--t-close-bg"] = c), h && ye(h) && (de["--t-text"] = h), p && ye(p) && (de["--t-text-secondary"] = p), f && ye(f) && (de["--t-text-muted"] = f, de["--t-text-tertiary"] = f), g && ye(g) && (de["--t-success"] = g);
4536
+ d && ye(d) && (de["--t-surface"] = d, de["--t-modal-bg"] = d), i && ye(i) && (de["--t-pill-bg"] = i, de["--t-close-bg"] = i), h && ye(h) && (de["--t-text"] = h), p && ye(p) && (de["--t-text-secondary"] = p), f && ye(f) && (de["--t-text-muted"] = f, de["--t-text-tertiary"] = f), g && ye(g) && (de["--t-success"] = g);
4538
4537
  const Fe = {};
4539
4538
  o && ye(o) ? Fe.backgroundColor = o : Fe.backgroundColor = "var(--t-bg)", s && (s.startsWith("https://") || s.startsWith("data:image/")) && (Fe.backgroundImage = `url(${s})`, Fe.backgroundSize = "cover", Fe.backgroundPosition = "center");
4540
4539
  const ut = {};
4541
- u && ye(u) && (ut.border = `1px solid ${u}`), i && (ut.borderRadius = i);
4542
- const nt = S.network, Ve = nt ? ht(nt) : null, ta = (Ve == null ? void 0 : Ve.shortName) || (Ve == null ? void 0 : Ve.name) || nt, Ya = it && Yt ? xe || (Et ? L("error.amountZero") : B ? L("error.minAmountFiat", { min: String(ma), currency: fe }) : L("error.minAmountCrypto", { min: String(pa), currency: re })) : void 0, $a = S.walletError ? S.walletError : vt && !$t && !Oe ? L("wallet.invalid") : void 0, Rt = ne.filter((x) => x.supportedFiats.includes(S.fiatCurrency)), Qa = Rt.find((x) => x.id === S.paymentMethodId) || Rt[0], aa = S.step === "checkout" ? /* @__PURE__ */ e(gn, { autoRedirect: E }) : S.step === "processing" ? /* @__PURE__ */ e(vn, {}) : S.step === "complete" ? /* @__PURE__ */ e(Cn, { explorerUrl: V, doneButtonText: Y, onDone: te }) : S.step === "error" ? /* @__PURE__ */ e(bn, { supportEmail: z, onDone: te, doneButtonText: Y }) : S.step === "confirm" ? /* @__PURE__ */ e(An, { stablecoinParity: at, partnerName: J }) : null;
4540
+ u && ye(u) && (ut.border = `1px solid ${u}`), c && (ut.borderRadius = c);
4541
+ const nt = S.network, Ve = nt ? ht(nt) : null, ta = (Ve == null ? void 0 : Ve.shortName) || (Ve == null ? void 0 : Ve.name) || nt, $a = it && Xt ? xe || (Et ? L("error.amountZero") : B ? L("error.minAmountFiat", { min: String(ma), currency: fe }) : L("error.minAmountCrypto", { min: String(pa), currency: re })) : void 0, Qa = S.walletError ? S.walletError : vt && !$t && !Oe ? L("wallet.invalid") : void 0, Rt = ne.filter((x) => x.supportedFiats.includes(S.fiatCurrency)), za = Rt.find((x) => x.id === S.paymentMethodId) || Rt[0], aa = S.step === "checkout" ? /* @__PURE__ */ e(xn, { autoRedirect: E }) : S.step === "processing" ? /* @__PURE__ */ e(Cn, {}) : S.step === "complete" ? /* @__PURE__ */ e(bn, { explorerUrl: V, doneButtonText: X, onDone: te }) : S.step === "error" ? /* @__PURE__ */ e(Sn, { supportEmail: z, onDone: te, doneButtonText: X }) : S.step === "confirm" ? /* @__PURE__ */ e(Tn, { stablecoinParity: at, partnerName: J }) : null;
4543
4542
  return aa ? /* @__PURE__ */ e(
4544
4543
  "div",
4545
4544
  {
4546
4545
  className: `${Jt} relative w-full max-w-[390px] overflow-hidden flex flex-col select-none transition-colors duration-[400ms] ${t}`,
4547
4546
  style: {
4548
4547
  fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
4549
- height: Fa,
4548
+ height: Ua,
4550
4549
  borderRadius: "var(--t-container-radius)",
4551
4550
  ...Fe,
4552
4551
  ...ea,
@@ -4570,50 +4569,50 @@ function fr({
4570
4569
  },
4571
4570
  children: [
4572
4571
  /* @__PURE__ */ e(
4573
- or,
4572
+ ir,
4574
4573
  {
4575
4574
  tab: st,
4576
- onTabSwitch: Ha,
4575
+ onTabSwitch: Pa,
4577
4576
  showFlowToggle: k,
4578
4577
  showSettings: N,
4579
4578
  onOpenSettings: () => W("settings"),
4580
4579
  darkMode: se
4581
4580
  }
4582
4581
  ),
4583
- et || bt || I ? /* @__PURE__ */ e("div", { className: "pt-[80px] px-3 flex-1 flex flex-col", children: I ? /* @__PURE__ */ e(Tn, {}) : /* @__PURE__ */ e(jn, {}) }) : /* @__PURE__ */ l("div", { className: "flex-1 overflow-hidden pt-[80px] px-3 flex flex-col gap-1 tab-fade-in", children: [
4582
+ et || bt || I ? /* @__PURE__ */ e("div", { className: "pt-[80px] px-3 flex-1 flex flex-col", children: I ? /* @__PURE__ */ e(Ln, {}) : /* @__PURE__ */ e(Wn, {}) }) : /* @__PURE__ */ l("div", { className: "flex-1 overflow-hidden pt-[80px] px-3 flex flex-col gap-1 tab-fade-in", children: [
4584
4583
  /* @__PURE__ */ e(
4585
- ir,
4584
+ lr,
4586
4585
  {
4587
4586
  amount: kt,
4588
- onAmountChange: Ba,
4587
+ onAmountChange: Ha,
4589
4588
  currencyCode: B ? fe : re,
4590
4589
  isBuy: B,
4591
4590
  onOpenModal: () => W(B ? "fiat" : "crypto"),
4592
4591
  assetBaseUrl: q,
4593
- error: Ya,
4592
+ error: $a,
4594
4593
  fieldLocks: le,
4595
4594
  onFocus: () => Gt(!0),
4596
4595
  onBlur: () => {
4597
4596
  Gt(!1), G(!0);
4598
4597
  },
4599
- inputRef: La,
4598
+ inputRef: Fa,
4600
4599
  chainCode: B ? void 0 : nt,
4601
4600
  chainDisplay: B ? void 0 : ta,
4602
4601
  getChainIconUrl: B ? void 0 : Ut,
4603
- shaking: Aa,
4604
- focused: Ta
4602
+ shaking: Ta,
4603
+ focused: La
4605
4604
  }
4606
4605
  ),
4607
4606
  /* @__PURE__ */ e(
4608
- sr,
4607
+ dr,
4609
4608
  {
4610
- amount: Ia,
4609
+ amount: Ma,
4611
4610
  currencyCode: B ? re : fe,
4612
4611
  chainCode: B ? nt : void 0,
4613
4612
  chainDisplay: B ? ta : void 0,
4614
4613
  isBuy: B,
4615
4614
  onOpenModal: () => W(B ? "crypto" : "fiat"),
4616
- displayRate: Ma,
4615
+ displayRate: Da,
4617
4616
  assetBaseUrl: q,
4618
4617
  quotesLoading: w,
4619
4618
  onOpenRateBreakdown: () => Z(!0),
@@ -4621,7 +4620,7 @@ function fr({
4621
4620
  spendNumeric: oe,
4622
4621
  getChainIconUrl: B ? Ut : void 0,
4623
4622
  autoSelectPending: v,
4624
- rateFlash: Ra
4623
+ rateFlash: Aa
4625
4624
  }
4626
4625
  ),
4627
4626
  j && oe > 0 && /* @__PURE__ */ e(
@@ -4647,9 +4646,9 @@ function fr({
4647
4646
  }
4648
4647
  ),
4649
4648
  (ne.length > 0 || (m == null ? void 0 : m.paymentMethods) && m.paymentMethods.length > 0) && (Rt.length > 0 ? /* @__PURE__ */ e(
4650
- dr,
4649
+ ur,
4651
4650
  {
4652
- selectedMethod: Qa,
4651
+ selectedMethod: za,
4653
4652
  onOpenModal: () => W("payment"),
4654
4653
  darkMode: se,
4655
4654
  getMethodIcon: Vt,
@@ -4668,13 +4667,13 @@ function fr({
4668
4667
  }
4669
4668
  )),
4670
4669
  /* @__PURE__ */ e(
4671
- ur,
4670
+ mr,
4672
4671
  {
4673
4672
  address: S.walletAddress,
4674
4673
  onChange: (x) => D({ type: "SET_WALLET_ADDRESS", address: x }),
4675
4674
  placeholder: L(B ? "wallet.placeholderBuy" : "wallet.placeholderSell"),
4676
4675
  isBuy: B,
4677
- error: $a,
4676
+ error: Qa,
4678
4677
  validating: Oe,
4679
4678
  disabled: !!((oa = le == null ? void 0 : le.destinationAddress) != null && oa.locked),
4680
4679
  onFocus: () => lt(!0),
@@ -4688,19 +4687,19 @@ function fr({
4688
4687
  he && /* @__PURE__ */ e("div", { className: "text-[12px] text-center mb-2", style: { color: "var(--t-error)" }, children: L(B ? "error.currencyUnavailableBuy" : "error.currencyUnavailableSell") }),
4689
4688
  /* @__PURE__ */ l("div", { className: "flex flex-col gap-3 pb-3", children: [
4690
4689
  /* @__PURE__ */ e(
4691
- mr,
4690
+ pr,
4692
4691
  {
4693
4692
  label: B ? L("cta.buy", { crypto: re }) : L("cta.sell", { crypto: re }),
4694
4693
  disabled: !Qt || Ne || v || he || j,
4695
4694
  loading: Ne || v,
4696
- onClick: Ga
4695
+ onClick: Za
4697
4696
  }
4698
4697
  ),
4699
- /* @__PURE__ */ e(pr, {})
4698
+ /* @__PURE__ */ e(hr, {})
4700
4699
  ] })
4701
4700
  ] }, st),
4702
4701
  T && /* @__PURE__ */ e(
4703
- Vn,
4702
+ jn,
4704
4703
  {
4705
4704
  type: T.type,
4706
4705
  title: T.title,
@@ -4709,8 +4708,8 @@ function fr({
4709
4708
  onDismiss: () => F(null)
4710
4709
  }
4711
4710
  ),
4712
- /* @__PURE__ */ e(Wn, { isOpen: U, onClose: () => Z(!1), children: /* @__PURE__ */ e(
4713
- hr,
4711
+ /* @__PURE__ */ e(Gn, { isOpen: U, onClose: () => Z(!1), children: /* @__PURE__ */ e(
4712
+ fr,
4714
4713
  {
4715
4714
  quote: (R == null ? void 0 : R.bestQuote) || null,
4716
4715
  isOpen: U,
@@ -4720,11 +4719,11 @@ function fr({
4720
4719
  }
4721
4720
  ) }),
4722
4721
  /* @__PURE__ */ e(Ge, { isOpen: ue === "fiat", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
4723
- Zn,
4722
+ Yn,
4724
4723
  {
4725
4724
  onClose: x,
4726
4725
  onSelect: (C) => {
4727
- Pa(C), x();
4726
+ Oa(C), x();
4728
4727
  },
4729
4728
  currencies: pe.map((C) => ({ code: C.code, name: C.code })),
4730
4729
  assetBaseUrl: q,
@@ -4736,7 +4735,7 @@ function fr({
4736
4735
  {
4737
4736
  onClose: x,
4738
4737
  onSelect: (C, K) => {
4739
- Oa(C, K), x();
4738
+ Ka(C, K), x();
4740
4739
  },
4741
4740
  cryptos: $e.map((C) => {
4742
4741
  var K;
@@ -4752,18 +4751,18 @@ function fr({
4752
4751
  }
4753
4752
  ) }),
4754
4753
  /* @__PURE__ */ e(Ge, { isOpen: ue === "payment", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
4755
- zn,
4754
+ Jn,
4756
4755
  {
4757
4756
  methods: ne,
4758
4757
  selectedId: S.paymentMethodId,
4759
4758
  onSelect: (C) => {
4760
- Ka(C), x();
4759
+ _a(C), x();
4761
4760
  },
4762
4761
  onClose: x
4763
4762
  }
4764
4763
  ) }),
4765
4764
  /* @__PURE__ */ e(Ge, { isOpen: ue === "settings", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
4766
- er,
4765
+ tr,
4767
4766
  {
4768
4767
  onClose: x,
4769
4768
  darkMode: se,
@@ -4774,25 +4773,25 @@ function fr({
4774
4773
  },
4775
4774
  showThemeToggle: y,
4776
4775
  country: S.country,
4777
- countryName: Wa,
4778
- onLocationPress: Va,
4779
- onLanguagePress: ja,
4776
+ countryName: Ga,
4777
+ onLocationPress: ja,
4778
+ onLanguagePress: Wa,
4780
4779
  assetBaseUrl: q
4781
4780
  }
4782
4781
  ) }),
4783
4782
  /* @__PURE__ */ e(Ge, { isOpen: ue === "country", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
4784
- ar,
4783
+ nr,
4785
4784
  {
4786
4785
  onClose: x,
4787
4786
  onSelect: (C) => {
4788
- _a(C), x();
4787
+ Va(C), x();
4789
4788
  },
4790
4789
  assetBaseUrl: q,
4791
4790
  selectedCode: S.country
4792
4791
  }
4793
4792
  ) }),
4794
4793
  /* @__PURE__ */ e(Ge, { isOpen: ue === "language", onClose: () => W(null), children: (x) => /* @__PURE__ */ e(
4795
- rr,
4794
+ or,
4796
4795
  {
4797
4796
  onClose: x,
4798
4797
  onSelect: (C) => {
@@ -4805,7 +4804,7 @@ function fr({
4805
4804
  }
4806
4805
  );
4807
4806
  }
4808
- function yr({
4807
+ function gr({
4809
4808
  projectId: t,
4810
4809
  apiUrl: a,
4811
4810
  assetBaseUrl: n,
@@ -4813,9 +4812,9 @@ function yr({
4813
4812
  customerId: o,
4814
4813
  brandId: s,
4815
4814
  defaultFiatCurrency: u,
4816
- defaultCryptoCurrency: i,
4815
+ defaultCryptoCurrency: c,
4817
4816
  defaultNetwork: d,
4818
- defaultFiatAmount: c,
4817
+ defaultFiatAmount: i,
4819
4818
  defaultCryptoAmount: h,
4820
4819
  defaultWalletAddress: p,
4821
4820
  defaultGateway: f,
@@ -4825,7 +4824,7 @@ function yr({
4825
4824
  statusPollInterval: y,
4826
4825
  onComplete: E,
4827
4826
  onError: V,
4828
- className: Y,
4827
+ className: X,
4829
4828
  theme: z,
4830
4829
  skinId: ie,
4831
4830
  accentColor: J,
@@ -4853,7 +4852,7 @@ function yr({
4853
4852
  onDone: he
4854
4853
  }) {
4855
4854
  return /* @__PURE__ */ e(
4856
- hn,
4855
+ fn,
4857
4856
  {
4858
4857
  projectId: t,
4859
4858
  apiUrl: a,
@@ -4862,9 +4861,9 @@ function yr({
4862
4861
  customerId: o,
4863
4862
  brandId: s,
4864
4863
  defaultFiatCurrency: u,
4865
- defaultCryptoCurrency: i,
4864
+ defaultCryptoCurrency: c,
4866
4865
  defaultNetwork: d,
4867
- defaultFiatAmount: c,
4866
+ defaultFiatAmount: i,
4868
4867
  defaultCryptoAmount: h,
4869
4868
  defaultWalletAddress: p,
4870
4869
  defaultGateway: f,
@@ -4874,10 +4873,10 @@ function yr({
4874
4873
  statusPollInterval: y,
4875
4874
  onComplete: E,
4876
4875
  onError: V,
4877
- children: /* @__PURE__ */ e(fn, { defaultLocale: ne || "en", children: /* @__PURE__ */ e(
4878
- fr,
4876
+ children: /* @__PURE__ */ e(yn, { defaultLocale: ne || "en", children: /* @__PURE__ */ e(
4877
+ yr,
4879
4878
  {
4880
- className: Y,
4879
+ className: X,
4881
4880
  theme: z,
4882
4881
  skinId: ie,
4883
4882
  accentColor: J,
@@ -4907,14 +4906,14 @@ function yr({
4907
4906
  }
4908
4907
  );
4909
4908
  }
4910
- function Br({
4909
+ function Hr({
4911
4910
  submitButtonText: t,
4912
4911
  rateRefreshInterval: a,
4913
4912
  ...n
4914
4913
  }) {
4915
- return /* @__PURE__ */ e(yr, { ...n });
4914
+ return /* @__PURE__ */ e(gr, { ...n });
4916
4915
  }
4917
- function Hr({
4916
+ function Pr({
4918
4917
  skin: t,
4919
4918
  active: a,
4920
4919
  onClick: n,
@@ -4947,14 +4946,14 @@ function Hr({
4947
4946
  }
4948
4947
  );
4949
4948
  }
4950
- function gr({ quote: t }) {
4949
+ function xr({ quote: t }) {
4951
4950
  const a = O();
4952
4951
  return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: a("modal.bestPrice") }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: a("modal.recommended") }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ l("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
4953
4952
  "#",
4954
4953
  t.rank
4955
4954
  ] }) : null;
4956
4955
  }
4957
- function xr({ quote: t }) {
4956
+ function vr({ quote: t }) {
4958
4957
  return t.gatewayLogo ? /* @__PURE__ */ e(
4959
4958
  "img",
4960
4959
  {
@@ -4967,7 +4966,7 @@ function xr({ quote: t }) {
4967
4966
  }
4968
4967
  ) : /* @__PURE__ */ e(Kt, { size: 36 });
4969
4968
  }
4970
- function vr() {
4969
+ function Cr() {
4971
4970
  return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ l(
4972
4971
  "div",
4973
4972
  {
@@ -4994,19 +4993,19 @@ function vr() {
4994
4993
  t
4995
4994
  )) });
4996
4995
  }
4997
- function Pr({
4996
+ function Or({
4998
4997
  onClose: t,
4999
4998
  onSelect: a,
5000
4999
  quotes: n,
5001
5000
  quotesLoading: r,
5002
5001
  cryptoCurrency: o
5003
5002
  }) {
5004
- const s = O(), [u, i] = b(""), d = _(() => {
5003
+ const s = O(), [u, c] = b(""), d = _(() => {
5005
5004
  if (!(n != null && n.quotes)) return [];
5006
- const c = u.trim().toLowerCase();
5007
- return c ? n.quotes.filter((h) => h.gatewayName.toLowerCase().includes(c)) : n.quotes;
5005
+ const i = u.trim().toLowerCase();
5006
+ return i ? n.quotes.filter((h) => h.gatewayName.toLowerCase().includes(i)) : n.quotes;
5008
5007
  }, [n, u]);
5009
- return /* @__PURE__ */ l(X, { children: [
5008
+ return /* @__PURE__ */ l(Y, { children: [
5010
5009
  /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Be, { onClick: t }) }),
5011
5010
  /* @__PURE__ */ e(
5012
5011
  "h2",
@@ -5016,14 +5015,14 @@ function Pr({
5016
5015
  children: s("modal.chooseRamp")
5017
5016
  }
5018
5017
  ),
5019
- /* @__PURE__ */ e(Ye, { value: u, onChange: i }),
5018
+ /* @__PURE__ */ e(Xe, { value: u, onChange: c }),
5020
5019
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
5021
- r ? /* @__PURE__ */ e(vr, {}) : d.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? s("modal.noQuotes") : s("modal.noProvidersFound") }) : d.map((c, h) => {
5022
- const p = h === 0, f = parseFloat(c.cryptoAmount), g = f >= 1 ? f.toFixed(4) : f.toPrecision(6);
5020
+ r ? /* @__PURE__ */ e(Cr, {}) : d.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? s("modal.noQuotes") : s("modal.noProvidersFound") }) : d.map((i, h) => {
5021
+ const p = h === 0, f = parseFloat(i.cryptoAmount), g = f >= 1 ? f.toFixed(4) : f.toPrecision(6);
5023
5022
  return /* @__PURE__ */ l(
5024
5023
  "button",
5025
5024
  {
5026
- onClick: () => a(c),
5025
+ onClick: () => a(i),
5027
5026
  className: "w-full flex items-center gap-3.5 transition-colors",
5028
5027
  style: {
5029
5028
  borderRadius: p ? 4.5 : 5,
@@ -5034,10 +5033,10 @@ function Pr({
5034
5033
  background: p ? "transparent" : "var(--t-surface)"
5035
5034
  },
5036
5035
  children: [
5037
- /* @__PURE__ */ e(xr, { quote: c }),
5036
+ /* @__PURE__ */ e(vr, { quote: i }),
5038
5037
  /* @__PURE__ */ l("div", { className: "text-left flex-1 min-w-0", children: [
5039
- /* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: c.gatewayName }),
5040
- /* @__PURE__ */ e(gr, { quote: c })
5038
+ /* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: i.gatewayName }),
5039
+ /* @__PURE__ */ e(xr, { quote: i })
5041
5040
  ] }),
5042
5041
  /* @__PURE__ */ l("div", { className: "text-right shrink-0", children: [
5043
5042
  /* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children: s("receive.label") }),
@@ -5049,113 +5048,113 @@ function Pr({
5049
5048
  ] })
5050
5049
  ]
5051
5050
  },
5052
- c.gatewayId
5051
+ i.gatewayId
5053
5052
  );
5054
5053
  }),
5055
- !r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((c) => /* @__PURE__ */ l(
5054
+ !r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((i) => /* @__PURE__ */ l(
5056
5055
  "div",
5057
5056
  {
5058
5057
  className: "flex items-center justify-between py-2 text-[12px]",
5059
5058
  style: { color: "var(--t-text-muted)" },
5060
5059
  children: [
5061
- /* @__PURE__ */ e("span", { children: c.gatewayName }),
5062
- /* @__PURE__ */ e("span", { children: c.reason })
5060
+ /* @__PURE__ */ e("span", { children: i.gatewayName }),
5061
+ /* @__PURE__ */ e("span", { children: i.reason })
5063
5062
  ]
5064
5063
  },
5065
- c.gatewayId
5064
+ i.gatewayId
5066
5065
  )) })
5067
5066
  ] })
5068
5067
  ] });
5069
5068
  }
5070
5069
  export {
5071
- lr as AnimatedDigit,
5072
- cr as AnimatedNumber,
5073
- Er as ApplePayIcon,
5074
- Mr as ArrowUpIcon,
5070
+ cr as AnimatedDigit,
5071
+ sr as AnimatedNumber,
5072
+ Rr as ApplePayIcon,
5073
+ Dr as ArrowUpIcon,
5075
5074
  rt as BLOCKCHAINS,
5076
- Nr as BankIcon,
5077
- Wn as BottomSheet,
5075
+ Er as BankIcon,
5076
+ Gn as BottomSheet,
5078
5077
  pt as COUNTRIES,
5079
5078
  Bt as COUNTRY_MAP,
5080
- Rn as CRYPTO_CHAIN_COMBOS,
5081
- Sa as CRYPTO_CURRENCIES,
5082
- Ar as CardIcon,
5083
- Kn as CheckmarkIcon,
5084
- Br as CheckoutForm,
5085
- gn as CheckoutStep,
5079
+ An as CRYPTO_CHAIN_COMBOS,
5080
+ wa as CRYPTO_CURRENCIES,
5081
+ Tr as CardIcon,
5082
+ _n as CheckmarkIcon,
5083
+ Hr as CheckoutForm,
5084
+ xn as CheckoutStep,
5086
5085
  De as ChevronDown,
5087
- Mn as ChevronRight,
5088
- Pr as ChooseRampModal,
5086
+ Dn as ChevronRight,
5087
+ Or as ChooseRampModal,
5089
5088
  Be as CloseButton,
5090
- Tr as CoinifyIcon,
5091
- Cn as CompleteStep,
5092
- An as ConfirmStep,
5093
- ar as CountryPickerModal,
5089
+ Lr as CoinifyIcon,
5090
+ bn as CompleteStep,
5091
+ Tn as ConfirmStep,
5092
+ nr as CountryPickerModal,
5094
5093
  Xn as CryptoCurrencyModal,
5095
- Ea as CryptoIcon,
5096
- mr as CtaButton,
5097
- Fr as DarkModeIcon,
5098
- bn as ErrorStep,
5094
+ Ra as CryptoIcon,
5095
+ pr as CtaButton,
5096
+ Ur as DarkModeIcon,
5097
+ Sn as ErrorStep,
5099
5098
  sa as FIAT_CURRENCIES,
5100
- wn as FIAT_TO_COUNTRY,
5101
- Zn as FiatCurrencyModal,
5099
+ kn as FIAT_TO_COUNTRY,
5100
+ Yn as FiatCurrencyModal,
5102
5101
  Ot as FiatFlag,
5103
- pr as Footer,
5104
- Tn as FormSkeleton,
5102
+ hr as Footer,
5103
+ Ln as FormSkeleton,
5105
5104
  Kt as GenericCoinIcon,
5106
- Rr as GooglePayIcon,
5107
- or as HeaderBar,
5108
- fn as I18nProvider,
5105
+ Ar as GooglePayIcon,
5106
+ ir as HeaderBar,
5107
+ yn as I18nProvider,
5109
5108
  Mt as InfoIcon,
5110
5109
  Ze as LANGUAGES,
5111
- jn as LoadingScreen,
5110
+ Wn as LoadingScreen,
5112
5111
  ua as MOCK_RATES,
5113
- Lr as MenuIcon,
5112
+ Fr as MenuIcon,
5114
5113
  Ge as Modal,
5115
- On as MoreDotsIcon,
5114
+ Kn as MoreDotsIcon,
5116
5115
  we as NRLogo,
5117
- Ur as NRLogoIcon,
5118
- Fn as PayPalIcon,
5119
- Hn as PaymentAppleIcon,
5120
- Dn as PaymentBankIcon,
5121
- dr as PaymentCard,
5122
- Bn as PaymentCardsIcon,
5123
- Pn as PaymentGoogleIcon,
5124
- Dr as PaymentMethodSelector,
5125
- vn as ProcessingStep,
5126
- yr as RampForm,
5127
- hn as RampProvider,
5128
- hr as RateBreakdown,
5129
- sr as ReceiveCard,
5130
- yn as RedirectScreen,
5131
- Ln as RevolutIcon,
5116
+ Ir as NRLogoIcon,
5117
+ Un as PayPalIcon,
5118
+ Pn as PaymentAppleIcon,
5119
+ Bn as PaymentBankIcon,
5120
+ ur as PaymentCard,
5121
+ Hn as PaymentCardsIcon,
5122
+ On as PaymentGoogleIcon,
5123
+ Br as PaymentMethodSelector,
5124
+ Cn as ProcessingStep,
5125
+ gr as RampForm,
5126
+ fn as RampProvider,
5127
+ fr as RateBreakdown,
5128
+ dr as ReceiveCard,
5129
+ gn as RedirectScreen,
5130
+ Fn as RevolutIcon,
5132
5131
  da as SKINS,
5133
- Ir as SearchIcon,
5134
- Ye as SearchInput,
5135
- er as SettingsScreen,
5132
+ Mr as SearchIcon,
5133
+ Xe as SearchInput,
5134
+ tr as SettingsScreen,
5136
5135
  Q as Skeleton,
5137
- Hr as SkinSwatch,
5138
- ir as SpendCard,
5136
+ Pr as SkinSwatch,
5137
+ lr as SpendCard,
5139
5138
  Se as Spinner,
5140
- Vn as Toast,
5141
- Jn as ToggleSwitch,
5142
- ur as WalletCard,
5139
+ jn as Toast,
5140
+ qn as ToggleSwitch,
5141
+ mr as WalletCard,
5143
5142
  Dt as XIcon,
5144
5143
  It as formatOutput,
5145
5144
  Ut as getChainIconUrl,
5146
- wa as getCryptoIconUrl,
5145
+ ka as getCryptoIconUrl,
5147
5146
  Ft as getDefaultFiatForCountry,
5148
- kn as getFiatFlagUrl,
5149
- kr as getMockRate,
5150
- _n as getPaymentIcon,
5151
- ka as isStablecoin,
5152
- En as parseAmount,
5153
- tn as useCheckoutIntent,
5147
+ Nn as getFiatFlagUrl,
5148
+ Nr as getMockRate,
5149
+ Vn as getPaymentIcon,
5150
+ Na as isStablecoin,
5151
+ Rn as parseAmount,
5152
+ an as useCheckoutIntent,
5154
5153
  Pt as useI18n,
5155
- en as useQuotes,
5156
- Xe as useRamp,
5157
- qa as useRampConfig,
5154
+ tn as useQuotes,
5155
+ Ye as useRamp,
5156
+ en as useRampConfig,
5158
5157
  O as useT,
5159
- an as useTransaction
5158
+ nn as useTransaction
5160
5159
  };
5161
5160
  //# sourceMappingURL=index.js.map