@nowramp/form 0.2.4 → 0.2.6

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
@@ -9,107 +9,107 @@
9
9
  document.head.appendChild(s);
10
10
  })();
11
11
  import { jsx as e, jsxs as i, Fragment as G } from "react/jsx-runtime";
12
- import ke, { useState as w, useRef as M, useCallback as O, useEffect as U, useMemo as V, useReducer as an, useContext as ga, createContext as xa } from "react";
12
+ import ke, { useState as w, useRef as I, useCallback as P, useEffect as U, useMemo as j, useReducer as an, useContext as ga, createContext as xa } from "react";
13
13
  import { RampApi as gt } from "@nowramp/sdk";
14
14
  import { createPortal as oa } from "react-dom";
15
15
  function nn(t, a, n) {
16
- const [r, o] = w(null), [c, u] = w(!0), [l, d] = w(null), s = M(null);
16
+ const [r, o] = w(null), [l, d] = w(!0), [c, u] = w(null), s = I(null);
17
17
  (!s.current || s.current !== t) && (s.current = new gt({ apiKey: "", ...t }));
18
- const h = O(async () => {
18
+ const h = P(async () => {
19
19
  if (!t.projectId) {
20
- d(new Error("projectId is required")), u(!1);
20
+ u(new Error("projectId is required")), d(!1);
21
21
  return;
22
22
  }
23
- u(!0), d(null);
23
+ d(!0), u(null);
24
24
  try {
25
- const p = {};
26
- a && (p.orderType = a), n && (p.country = n);
27
- const f = await s.current.getSupported(p);
25
+ const m = {};
26
+ a && (m.orderType = a), n && (m.country = n);
27
+ const f = await s.current.getSupported(m);
28
28
  o(f);
29
- } catch (p) {
30
- d(p instanceof Error ? p : new Error("Failed to fetch config"));
29
+ } catch (m) {
30
+ u(m instanceof Error ? m : new Error("Failed to fetch config"));
31
31
  } finally {
32
- u(!1);
32
+ d(!1);
33
33
  }
34
34
  }, [t.projectId, a, n]);
35
35
  return U(() => {
36
36
  h();
37
- }, [h]), { config: r, loading: c, error: l, refetch: h };
37
+ }, [h]), { config: r, loading: l, error: c, refetch: h };
38
38
  }
39
39
  function rn(t, a) {
40
- const [n, r] = w(null), [o, c] = w(!1), [u, l] = w(null), d = M(null), s = M(""), h = `${t.apiUrl}|${t.projectId}`;
41
- (!d.current || s.current !== h) && (d.current = new gt({ apiKey: "", ...t }), s.current = h);
42
- const p = M(0);
40
+ const [n, r] = w(null), [o, l] = w(!1), [d, c] = w(null), u = I(null), s = I(""), h = `${t.apiUrl}|${t.projectId}`;
41
+ (!u.current || s.current !== h) && (u.current = new gt({ apiKey: "", ...t }), s.current = h);
42
+ const m = I(0);
43
43
  U(() => {
44
- const g = ++p.current;
44
+ const g = ++m.current;
45
45
  if (!a || !t.projectId) {
46
- r(null), c(!1);
46
+ r(null), l(!1);
47
47
  return;
48
48
  }
49
- c(!0), l(null), d.current.getQuotes(a).then(
49
+ l(!0), c(null), u.current.getQuotes(a).then(
50
50
  (k) => {
51
- p.current === g && (r(k), c(!1));
51
+ m.current === g && (r(k), l(!1));
52
52
  },
53
53
  (k) => {
54
- p.current === g && (l(k instanceof Error ? k : new Error("Failed to fetch quotes")), r(null), c(!1));
54
+ m.current === g && (c(k instanceof Error ? k : new Error("Failed to fetch quotes")), r(null), l(!1));
55
55
  }
56
56
  );
57
57
  }, [t.projectId, a == null ? void 0 : a.fiatCurrency, a == null ? void 0 : a.fiatAmount, a == null ? void 0 : a.cryptoAmount, a == null ? void 0 : a.cryptoCurrency, a == null ? void 0 : a.network, a == null ? void 0 : a.paymentMethodId, a == null ? void 0 : a.country, a == null ? void 0 : a.orderType]);
58
- const f = O(async () => {
58
+ const f = P(async () => {
59
59
  if (!(!a || !t.projectId)) {
60
- c(!0), l(null);
60
+ l(!0), c(null);
61
61
  try {
62
- const g = await d.current.getQuotes(a);
62
+ const g = await u.current.getQuotes(a);
63
63
  r(g);
64
64
  } catch (g) {
65
- l(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
- c(!1);
67
+ l(!1);
68
68
  }
69
69
  }
70
70
  }, [t.projectId, a]);
71
- return { quotes: n, loading: o, error: u, refetch: f };
71
+ return { quotes: n, loading: o, error: d, refetch: f };
72
72
  }
73
73
  function on(t) {
74
- const [a, n] = w(null), [r, o] = w(!1), [c, u] = w(null), l = M(null), d = M(""), s = `${t.apiUrl}|${t.projectId}`;
75
- (!l.current || d.current !== s) && (l.current = new gt({ apiKey: "", ...t }), d.current = s);
76
- const h = O(async (f) => {
77
- o(!0), u(null);
74
+ const [a, n] = w(null), [r, o] = w(!1), [l, d] = w(null), c = I(null), u = I(""), s = `${t.apiUrl}|${t.projectId}`;
75
+ (!c.current || u.current !== s) && (c.current = new gt({ apiKey: "", ...t }), u.current = s);
76
+ const h = P(async (f) => {
77
+ o(!0), d(null);
78
78
  try {
79
- const g = await l.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");
83
- throw u(k), k;
83
+ throw d(k), k;
84
84
  } finally {
85
85
  o(!1);
86
86
  }
87
- }, []), p = O(() => {
88
- n(null), u(null);
87
+ }, []), m = P(() => {
88
+ n(null), d(null);
89
89
  }, []);
90
- return { order: a, loading: r, error: c, createOrder: h, reset: p };
90
+ return { order: a, loading: r, error: l, createOrder: h, reset: m };
91
91
  }
92
92
  function ln(t, a, n) {
93
- const [r, o] = w(null), [c, u] = w(!1), [l, d] = w(null), s = M(null);
93
+ const [r, o] = w(null), [l, d] = w(!1), [c, u] = w(null), s = I(null);
94
94
  s.current || (s.current = new gt({ apiKey: "", projectId: "", ...t }));
95
- const h = O(async () => {
95
+ const h = P(async () => {
96
96
  if (a) {
97
- u(!0), d(null);
97
+ d(!0), u(null);
98
98
  try {
99
- const p = await s.current.getTransaction(a);
100
- o(p);
101
- } catch (p) {
102
- d(p instanceof Error ? p : new Error("Failed to fetch status"));
99
+ const m = await s.current.getTransaction(a);
100
+ o(m);
101
+ } catch (m) {
102
+ u(m instanceof Error ? m : new Error("Failed to fetch status"));
103
103
  } finally {
104
- u(!1);
104
+ d(!1);
105
105
  }
106
106
  }
107
107
  }, [a]);
108
108
  return U(() => {
109
109
  if (!a) return;
110
- const p = (n == null ? void 0 : n.initialDelay) ?? 0;
111
- if (p > 0) {
112
- const f = setTimeout(h, p);
110
+ const m = (n == null ? void 0 : n.initialDelay) ?? 0;
111
+ if (m > 0) {
112
+ const f = setTimeout(h, m);
113
113
  return () => clearTimeout(f);
114
114
  }
115
115
  h();
@@ -118,7 +118,7 @@ function ln(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: c, error: l, refetch: h };
121
+ }, [a, n == null ? void 0 : n.pollInterval, r == null ? void 0 : r.status, h]), { status: r, loading: l, error: c, refetch: h };
122
122
  }
123
123
  const ft = [
124
124
  { code: "ad", name: "Andorra", defaultFiat: "EUR" },
@@ -330,11 +330,11 @@ function cn(t, a, n = xt) {
330
330
  function sn(t, a, n = xt) {
331
331
  const r = [];
332
332
  for (const o of t) {
333
- const c = o.networks.filter(
334
- (u) => Kt(u.providers, a, n)
333
+ const l = o.networks.filter(
334
+ (d) => Kt(d.providers, a, n)
335
335
  );
336
- c.length > 0 && r.push(
337
- c.length === o.networks.length ? o : { ...o, networks: c }
336
+ l.length > 0 && r.push(
337
+ l.length === o.networks.length ? o : { ...o, networks: l }
338
338
  );
339
339
  }
340
340
  return r;
@@ -349,63 +349,63 @@ function un(t, a, n) {
349
349
  let o = !1;
350
350
  if (!n.cryptoLocked && !n.networkLocked) {
351
351
  if (!(t.cryptoCurrency && a.availableCryptos.some(
352
- (l) => l.code === t.cryptoCurrency && l.networks.some((d) => d.id === t.network)
352
+ (c) => c.code === t.cryptoCurrency && c.networks.some((u) => u.id === t.network)
353
353
  )) && a.availableCryptos.length > 0) {
354
- const d = a.availableCryptos.find((h) => h.code === "BTC") || a.availableCryptos[0], s = d.networks.find((h) => h.isDefault) || d.networks[0];
355
- d.code !== t.cryptoCurrency && (r.cryptoCurrency = d.code, o = !0), s && s.id !== t.network && (r.network = s.id, o = !0);
354
+ const u = a.availableCryptos.find((h) => h.code === "BTC") || a.availableCryptos[0], s = u.networks.find((h) => h.isDefault) || u.networks[0];
355
+ u.code !== t.cryptoCurrency && (r.cryptoCurrency = u.code, o = !0), s && s.id !== t.network && (r.network = s.id, o = !0);
356
356
  }
357
357
  } else if (!n.cryptoLocked && n.networkLocked) {
358
358
  if (!(t.cryptoCurrency && a.availableCryptos.some(
359
- (l) => l.code === t.cryptoCurrency && l.networks.some((d) => d.id === t.network)
359
+ (c) => c.code === t.cryptoCurrency && c.networks.some((u) => u.id === t.network)
360
360
  ))) {
361
- const l = a.availableCryptos.find(
362
- (d) => d.networks.some((s) => s.id === t.network)
361
+ const c = a.availableCryptos.find(
362
+ (u) => u.networks.some((s) => s.id === t.network)
363
363
  );
364
- l && l.code !== t.cryptoCurrency && (r.cryptoCurrency = l.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
- const u = a.availableCryptos.find(
368
- (l) => l.code === t.cryptoCurrency
367
+ const d = a.availableCryptos.find(
368
+ (c) => c.code === t.cryptoCurrency
369
369
  );
370
- if (u && !u.networks.some(
371
- (d) => d.id === t.network
372
- ) && u.networks.length > 0) {
373
- const d = u.networks.find((s) => s.isDefault) || u.networks[0];
374
- d.id !== t.network && (r.network = d.id, o = !0);
370
+ if (d && !d.networks.some(
371
+ (u) => u.id === t.network
372
+ ) && d.networks.length > 0) {
373
+ const u = d.networks.find((s) => s.isDefault) || d.networks[0];
374
+ u.id !== t.network && (r.network = u.id, o = !0);
375
375
  }
376
376
  }
377
- if (!n.fiatLocked && !(t.fiatCurrency && a.availableFiats.some((l) => l.code === t.fiatCurrency)) && a.availableFiats.length > 0) {
378
- const d = a.availableFiats.find((s) => s.code === "USD") || a.availableFiats[0];
379
- d.code !== t.fiatCurrency && (r.fiatCurrency = d.code, o = !0);
377
+ if (!n.fiatLocked && !(t.fiatCurrency && a.availableFiats.some((c) => c.code === t.fiatCurrency)) && a.availableFiats.length > 0) {
378
+ const u = a.availableFiats.find((s) => s.code === "USD") || a.availableFiats[0];
379
+ u.code !== t.fiatCurrency && (r.fiatCurrency = u.code, o = !0);
380
380
  }
381
381
  if (!(t.paymentMethodId && a.availablePaymentMethods.some(
382
- (u) => u.id === t.paymentMethodId
382
+ (d) => d.id === t.paymentMethodId
383
383
  )) && a.availablePaymentMethods.length > 0) {
384
- const l = a.availablePaymentMethods.find(
385
- (d) => d.id.includes("card") || d.id.includes("debit")
384
+ const c = a.availablePaymentMethods.find(
385
+ (u) => u.id.includes("card") || u.id.includes("debit")
386
386
  ) || a.availablePaymentMethods[0];
387
- l.id !== t.paymentMethodId && (r.paymentMethodId = l.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
391
  function mn(t, a, n, r) {
392
- var o, c, u;
392
+ var o, l, d;
393
393
  if (n.cryptoLocked) {
394
- const l = (o = t.cryptos) == null ? void 0 : o.find(
394
+ const c = (o = t.cryptos) == null ? void 0 : o.find(
395
395
  (s) => s.code === a.cryptoCurrency
396
396
  );
397
- if (!l) return !0;
398
- const d = (c = l.networks) == null ? void 0 : c.find((s) => s.id === a.network);
399
- if (!d || d.providers !== void 0 && d.providers.length === 0 || d.providers !== void 0 && (r.availableFiats.length === 0 || r.availablePaymentMethods.length === 0))
397
+ if (!c) return !0;
398
+ const u = (l = c.networks) == null ? void 0 : l.find((s) => s.id === a.network);
399
+ if (!u || u.providers !== void 0 && u.providers.length === 0 || u.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((s) => s.id === a.network)
403
+ (u) => u.networks.some((s) => s.id === a.network)
404
404
  ))
405
405
  return !0;
406
406
  if (n.fiatLocked) {
407
- const l = (u = t.fiats) == null ? void 0 : u.find((d) => d.code === a.fiatCurrency);
408
- if (!l || l.providers !== void 0 && l.providers.length === 0 || l.providers !== void 0 && r.availableCryptos.length === 0)
407
+ const c = (d = t.fiats) == null ? void 0 : d.find((u) => u.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;
@@ -453,7 +453,7 @@ const yn = ["completed", "failed", "cancelled", "expired", "refunded"], va = {
453
453
  errorMessage: null
454
454
  };
455
455
  function gn(t, a) {
456
- var n, r, o, c, u, l, d, s;
456
+ var n, r, o, l, d, c, u, s;
457
457
  switch (a.type) {
458
458
  case "SET_STEP":
459
459
  return { ...t, step: a.step, errorMessage: null };
@@ -464,8 +464,8 @@ function gn(t, a) {
464
464
  fiatAmount: "",
465
465
  cryptoAmount: "",
466
466
  fiatCurrency: (r = (n = a.fieldLocks) == null ? void 0 : n.sourceCurrency) != null && r.locked ? t.fiatCurrency : "",
467
- cryptoCurrency: (c = (o = a.fieldLocks) == null ? void 0 : o.destinationCurrency) != null && c.locked ? t.cryptoCurrency : "",
468
- network: (l = (u = a.fieldLocks) == null ? void 0 : u.network) != null && l.locked || (s = (d = a.fieldLocks) == null ? void 0 : d.destinationCurrency) != null && s.locked ? t.network : "",
467
+ cryptoCurrency: (l = (o = a.fieldLocks) == null ? void 0 : o.destinationCurrency) != null && l.locked ? t.cryptoCurrency : "",
468
+ network: (c = (d = a.fieldLocks) == null ? void 0 : d.network) != null && c.locked || (s = (u = a.fieldLocks) == null ? void 0 : u.destinationCurrency) != null && s.locked ? t.network : "",
469
469
  paymentMethodId: "",
470
470
  selectedQuote: null,
471
471
  selectedProvider: null,
@@ -521,109 +521,109 @@ function gn(t, a) {
521
521
  }
522
522
  const Ca = xa(null);
523
523
  function xn(t) {
524
- const a = M(t.defaultFiatCurrency !== void 0), {
524
+ const a = I(t.defaultFiatCurrency !== void 0), {
525
525
  projectId: n,
526
526
  apiUrl: r = "https://api.nowramp.com",
527
527
  assetBaseUrl: o = "",
528
- flowType: c = "buy",
529
- customerId: u = "",
530
- brandId: l,
531
- defaultFiatCurrency: d = "USD",
528
+ flowType: l = "buy",
529
+ customerId: d = "",
530
+ brandId: c,
531
+ defaultFiatCurrency: u = "USD",
532
532
  defaultCryptoCurrency: s = "BTC",
533
533
  defaultNetwork: h = "",
534
- defaultFiatAmount: p = "",
534
+ defaultFiatAmount: m = "",
535
535
  defaultCryptoAmount: f = "",
536
536
  defaultWalletAddress: g = "",
537
537
  defaultGateway: k,
538
- defaultCountry: R,
538
+ defaultCountry: A,
539
539
  fieldLocks: y,
540
540
  partnerMetadata: N,
541
541
  statusPollInterval: K = 5e3,
542
542
  onComplete: z,
543
543
  onError: J,
544
544
  children: ie
545
- } = t, q = V(() => ({ apiUrl: r, projectId: n }), [r, n]), te = h || (s === "BTC" ? "bitcoin" : s ? s.toLowerCase() : ""), be = c === "sell", ae = be ? !!f : !!p, C = (be ? !!(ae && s && te) : !!(ae && s && te && g)) && k ? "confirm" : "amount", F = p || (c === "buy" ? "250" : ""), [m, D] = an(gn, {
545
+ } = t, q = j(() => ({ apiUrl: r, projectId: n }), [r, n]), te = h || (s === "BTC" ? "bitcoin" : s ? s.toLowerCase() : ""), be = l === "sell", ae = be ? !!f : !!m, C = (be ? !!(ae && s && te) : !!(ae && s && te && g)) && k ? "confirm" : "amount", F = m || (l === "buy" ? "250" : ""), [p, D] = an(gn, {
546
546
  ...va,
547
547
  step: C,
548
- flowType: c,
549
- fiatCurrency: d,
548
+ flowType: l,
549
+ fiatCurrency: u,
550
550
  cryptoCurrency: s,
551
551
  network: te,
552
552
  fiatAmount: ia(F, 2),
553
553
  cryptoAmount: ia(f, 6),
554
554
  walletAddress: g,
555
- customerId: u,
555
+ customerId: d,
556
556
  // If defaultCountry is provided, set it immediately with 'manual' source to skip auto-detection
557
- ...R ? { country: R.toLowerCase(), countrySource: "manual" } : {}
558
- }), E = m.flowType === "sell", {
557
+ ...A ? { country: A.toLowerCase(), countrySource: "manual" } : {}
558
+ }), E = p.flowType === "sell", {
559
559
  config: b,
560
560
  loading: ne,
561
561
  error: pe
562
- } = nn(q, m.flowType, m.country || void 0), Se = M(!1);
562
+ } = nn(q, p.flowType, p.country || void 0), Se = I(!1);
563
563
  ke.useEffect(() => {
564
- var B, I;
565
- if (Se.current || !(b != null && b.detectedCountry) || m.country) return;
564
+ var B, M;
565
+ if (Se.current || !(b != null && b.detectedCountry) || p.country) return;
566
566
  Se.current = !0;
567
567
  const v = b.detectedCountry.toLowerCase();
568
568
  D({ type: "SET_COUNTRY_AUTO", country: v });
569
- const A = (B = b.fiats) == null ? void 0 : B.map((_) => _.code), T = Mt(v, A);
570
- T !== m.fiatCurrency && !((I = y == null ? void 0 : y.sourceCurrency) != null && I.locked) && !a.current && D({ type: "SET_FIAT_CURRENCY", currency: T });
571
- }, [b, m.country, m.fiatCurrency, y]);
572
- const Te = M(!1);
569
+ const R = (B = b.fiats) == null ? void 0 : B.map((_) => _.code), T = Mt(v, R);
570
+ T !== p.fiatCurrency && !((M = y == null ? void 0 : y.sourceCurrency) != null && M.locked) && !a.current && D({ type: "SET_FIAT_CURRENCY", currency: T });
571
+ }, [b, p.country, p.fiatCurrency, y]);
572
+ const Te = I(!1);
573
573
  ke.useEffect(() => {
574
574
  var T, B;
575
- if (Te.current || !R || !((T = b == null ? void 0 : b.fiats) != null && T.length)) return;
575
+ if (Te.current || !A || !((T = b == null ? void 0 : b.fiats) != null && T.length)) return;
576
576
  Te.current = !0;
577
- const v = b.fiats.map((I) => I.code), A = Mt(R, v);
578
- A !== m.fiatCurrency && !((B = y == null ? void 0 : y.sourceCurrency) != null && B.locked) && !a.current && D({ type: "SET_FIAT_CURRENCY", currency: A });
579
- }, [R, b, m.fiatCurrency, y]);
580
- const he = M(m.country);
577
+ const v = b.fiats.map((M) => M.code), R = Mt(A, v);
578
+ R !== p.fiatCurrency && !((B = y == null ? void 0 : y.sourceCurrency) != null && B.locked) && !a.current && D({ type: "SET_FIAT_CURRENCY", currency: R });
579
+ }, [A, b, p.fiatCurrency, y]);
580
+ const he = I(p.country);
581
581
  ke.useEffect(() => {
582
582
  var T, B;
583
- if (m.country === he.current || (he.current = m.country, m.countrySource === "manual" && (_e.current = !1), m.countrySource !== "manual") || !((T = b == null ? void 0 : b.fiats) != null && T.length)) return;
584
- const v = b.fiats.map((I) => I.code), A = Mt(m.country, v);
585
- A !== m.fiatCurrency && !((B = y == null ? void 0 : y.sourceCurrency) != null && B.locked) && D({ type: "SET_FIAT_CURRENCY", currency: A });
586
- }, [m.country, m.countrySource, b, m.fiatCurrency, y]);
587
- const le = M(m.fiatCurrency);
583
+ if (p.country === he.current || (he.current = p.country, p.countrySource === "manual" && (_e.current = !1), p.countrySource !== "manual") || !((T = b == null ? void 0 : b.fiats) != null && T.length)) return;
584
+ const v = b.fiats.map((M) => M.code), R = Mt(p.country, v);
585
+ R !== p.fiatCurrency && !((B = y == null ? void 0 : y.sourceCurrency) != null && B.locked) && D({ type: "SET_FIAT_CURRENCY", currency: R });
586
+ }, [p.country, p.countrySource, b, p.fiatCurrency, y]);
587
+ const le = I(p.fiatCurrency);
588
588
  ke.useEffect(() => {
589
589
  var B;
590
- if (m.fiatCurrency === le.current || (le.current = m.fiatCurrency, E || !((B = b == null ? void 0 : b.fiats) != null && B.length) || !m.fiatAmount)) return;
591
- const v = b.fiats.find((I) => I.code === m.fiatCurrency);
590
+ if (p.fiatCurrency === le.current || (le.current = p.fiatCurrency, E || !((B = b == null ? void 0 : b.fiats) != null && B.length) || !p.fiatAmount)) return;
591
+ const v = b.fiats.find((M) => M.code === p.fiatCurrency);
592
592
  if (!(v != null && v.minAmount)) return;
593
- const A = parseFloat(m.fiatAmount), T = parseFloat(v.minAmount);
594
- !isNaN(A) && !isNaN(T) && A < T && D({ type: "SET_FIAT_AMOUNT", amount: String(Math.ceil(T)) });
595
- }, [m.fiatCurrency, m.fiatAmount, b, E]);
596
- const { availableFiats: ce, availableCryptos: X, availablePaymentMethods: fe } = V(() => {
597
- var T, B, I;
593
+ const R = parseFloat(p.fiatAmount), T = parseFloat(v.minAmount);
594
+ !isNaN(R) && !isNaN(T) && R < T && D({ type: "SET_FIAT_AMOUNT", amount: String(Math.ceil(T)) });
595
+ }, [p.fiatCurrency, p.fiatAmount, b, E]);
596
+ const { availableFiats: ce, availableCryptos: X, availablePaymentMethods: fe } = j(() => {
597
+ var T, B, M;
598
598
  if (!b)
599
599
  return { availableFiats: [], availableCryptos: [], availablePaymentMethods: [] };
600
600
  let v;
601
- if (m.cryptoCurrency && m.network) {
602
- const _ = (T = b.cryptos) == null ? void 0 : T.find((ge) => ge.code === m.cryptoCurrency), ue = (B = _ == null ? void 0 : _.networks) == null ? void 0 : B.find((ge) => ge.id === m.network);
601
+ if (p.cryptoCurrency && p.network) {
602
+ const _ = (T = b.cryptos) == null ? void 0 : T.find((ge) => ge.code === p.cryptoCurrency), ue = (B = _ == null ? void 0 : _.networks) == null ? void 0 : B.find((ge) => ge.id === p.network);
603
603
  !_ || !ue ? v = [] : v = ue.providers;
604
604
  }
605
- let A;
606
- if (m.fiatCurrency) {
607
- const _ = (I = b.fiats) == null ? void 0 : I.find((ue) => ue.code === m.fiatCurrency);
608
- _ ? A = _.providers : A = [];
605
+ let R;
606
+ if (p.fiatCurrency) {
607
+ const _ = (M = b.fiats) == null ? void 0 : M.find((ue) => ue.code === p.fiatCurrency);
608
+ _ ? R = _.providers : R = [];
609
609
  }
610
610
  return {
611
611
  availableFiats: cn(b.fiats ?? [], v),
612
- availableCryptos: sn(b.cryptos ?? [], A),
612
+ availableCryptos: sn(b.cryptos ?? [], R),
613
613
  availablePaymentMethods: dn(
614
614
  b.paymentMethods ?? [],
615
615
  v,
616
- m.fiatCurrency
616
+ p.fiatCurrency
617
617
  )
618
618
  };
619
- }, [b, m.cryptoCurrency, m.network, m.fiatCurrency]), Qe = V(() => {
620
- var v, A, T;
619
+ }, [b, p.cryptoCurrency, p.network, p.fiatCurrency]), Qe = j(() => {
620
+ var v, R, T;
621
621
  return ne || !b ? !1 : mn(
622
622
  b,
623
- { cryptoCurrency: m.cryptoCurrency, network: m.network, fiatCurrency: m.fiatCurrency },
623
+ { cryptoCurrency: p.cryptoCurrency, network: p.network, fiatCurrency: p.fiatCurrency },
624
624
  {
625
625
  cryptoLocked: !!((v = y == null ? void 0 : y.destinationCurrency) != null && v.locked),
626
- networkLocked: !!((A = y == null ? void 0 : y.network) != null && A.locked),
626
+ networkLocked: !!((R = y == null ? void 0 : y.network) != null && R.locked),
627
627
  fiatLocked: !!((T = y == null ? void 0 : y.sourceCurrency) != null && T.locked)
628
628
  },
629
629
  { availableFiats: ce, availableCryptos: X, availablePaymentMethods: fe }
@@ -632,26 +632,26 @@ function xn(t) {
632
632
  ne,
633
633
  b,
634
634
  y,
635
- m.cryptoCurrency,
636
- m.network,
637
- m.fiatCurrency,
635
+ p.cryptoCurrency,
636
+ p.network,
637
+ p.fiatCurrency,
638
638
  ce,
639
639
  X,
640
640
  fe
641
641
  ]);
642
642
  ke.useEffect(() => {
643
- var A, T, B;
643
+ var R, T, B;
644
644
  if (ne || ce.length === 0 && X.length === 0) return;
645
645
  const v = un(
646
646
  {
647
- cryptoCurrency: m.cryptoCurrency,
648
- network: m.network,
649
- fiatCurrency: m.fiatCurrency,
650
- paymentMethodId: m.paymentMethodId
647
+ cryptoCurrency: p.cryptoCurrency,
648
+ network: p.network,
649
+ fiatCurrency: p.fiatCurrency,
650
+ paymentMethodId: p.paymentMethodId
651
651
  },
652
652
  { availableFiats: ce, availableCryptos: X, availablePaymentMethods: fe },
653
653
  {
654
- cryptoLocked: !!((A = y == null ? void 0 : y.destinationCurrency) != null && A.locked),
654
+ cryptoLocked: !!((R = y == null ? void 0 : y.destinationCurrency) != null && R.locked),
655
655
  networkLocked: !!((T = y == null ? void 0 : y.network) != null && T.locked),
656
656
  fiatLocked: !!((B = y == null ? void 0 : y.sourceCurrency) != null && B.locked)
657
657
  }
@@ -662,52 +662,52 @@ function xn(t) {
662
662
  ce,
663
663
  X,
664
664
  fe,
665
- m.cryptoCurrency,
666
- m.network,
667
- m.fiatCurrency,
668
- m.paymentMethodId,
665
+ p.cryptoCurrency,
666
+ p.network,
667
+ p.fiatCurrency,
668
+ p.paymentMethodId,
669
669
  y,
670
670
  D
671
671
  ]);
672
- const oe = V(() => {
672
+ const oe = j(() => {
673
673
  if (E) {
674
- if (!m.cryptoAmount) return null;
675
- const I = parseFloat(m.cryptoAmount);
676
- return isNaN(I) || I <= 0 ? "Enter a valid amount" : null;
674
+ if (!p.cryptoAmount) return null;
675
+ const M = parseFloat(p.cryptoAmount);
676
+ return isNaN(M) || M <= 0 ? "Enter a valid amount" : null;
677
677
  }
678
- if (!b || !m.fiatAmount) return null;
679
- const v = parseFloat(m.fiatAmount);
678
+ if (!b || !p.fiatAmount) return null;
679
+ const v = parseFloat(p.fiatAmount);
680
680
  if (isNaN(v)) return null;
681
- const A = b.fiats.find((I) => I.code === m.fiatCurrency);
682
- if (!A) return null;
683
- const T = parseFloat(A.minAmount), B = parseFloat(A.maxAmount);
684
- return !isNaN(T) && v < T ? `Minimum amount is ${A.minAmount} ${m.fiatCurrency}` : !isNaN(B) && v > B ? `Maximum amount is ${A.maxAmount} ${m.fiatCurrency}` : null;
685
- }, [b, m.fiatAmount, m.fiatCurrency, m.cryptoAmount, E]), ye = V(() => {
686
- const v = E ? !!m.cryptoAmount : !!m.fiatAmount;
687
- return !b || !v || !m.fiatCurrency || !m.cryptoCurrency || !m.network || oe || b.detectedCountry && m.countrySource === "" && !R ? null : {
688
- fiatCurrency: m.fiatCurrency,
689
- ...E ? { cryptoAmount: m.cryptoAmount } : { fiatAmount: m.fiatAmount },
690
- cryptoCurrency: m.cryptoCurrency,
691
- network: m.network,
692
- paymentMethodId: m.paymentMethodId || void 0,
693
- country: m.country || void 0,
694
- orderType: m.flowType
681
+ const R = b.fiats.find((M) => M.code === p.fiatCurrency);
682
+ if (!R) return null;
683
+ const T = parseFloat(R.minAmount), B = parseFloat(R.maxAmount);
684
+ return !isNaN(T) && v < T ? `Minimum amount is ${R.minAmount} ${p.fiatCurrency}` : !isNaN(B) && v > B ? `Maximum amount is ${R.maxAmount} ${p.fiatCurrency}` : null;
685
+ }, [b, p.fiatAmount, p.fiatCurrency, p.cryptoAmount, E]), ye = j(() => {
686
+ const v = E ? !!p.cryptoAmount : !!p.fiatAmount;
687
+ return !b || !v || !p.fiatCurrency || !p.cryptoCurrency || !p.network || oe || b.detectedCountry && p.countrySource === "" && !A ? null : {
688
+ fiatCurrency: p.fiatCurrency,
689
+ ...E ? { cryptoAmount: p.cryptoAmount } : { fiatAmount: p.fiatAmount },
690
+ cryptoCurrency: p.cryptoCurrency,
691
+ network: p.network,
692
+ paymentMethodId: p.paymentMethodId || void 0,
693
+ country: p.country || void 0,
694
+ orderType: p.flowType
695
695
  };
696
- }, [b, m.fiatCurrency, m.fiatAmount, m.cryptoAmount, m.cryptoCurrency, m.network, m.paymentMethodId, m.country, m.countrySource, oe, E, m.flowType, R]), {
696
+ }, [b, p.fiatCurrency, p.fiatAmount, p.cryptoAmount, p.cryptoCurrency, p.network, p.paymentMethodId, p.country, p.countrySource, oe, E, p.flowType, A]), {
697
697
  quotes: $,
698
698
  loading: Ke,
699
699
  error: ze,
700
700
  refetch: vt
701
- } = rn(q, ye), se = pn(Ke, $, ye), _e = M(!1);
701
+ } = rn(q, ye), se = pn(Ke, $, ye), _e = I(!1);
702
702
  ke.useEffect(() => {
703
703
  var v;
704
- _e.current || m.countrySource === "auto" && ((v = y == null ? void 0 : y.sourceCurrency) != null && v.locked || a.current || Ke || !ye || ze || !$ || $.bestQuote || m.fiatCurrency !== "USD" && (_e.current = !0, D({ type: "SET_FIAT_CURRENCY", currency: "USD" }), D({ type: "SET_FIAT_AMOUNT", amount: "250" })));
705
- }, [$, Ke, ze, ye, m.countrySource, m.fiatCurrency]);
704
+ _e.current || p.countrySource === "auto" && ((v = y == null ? void 0 : y.sourceCurrency) != null && v.locked || a.current || Ke || !ye || ze || !$ || $.bestQuote || p.fiatCurrency !== "USD" && (_e.current = !0, D({ type: "SET_FIAT_CURRENCY", currency: "USD" }), D({ type: "SET_FIAT_AMOUNT", amount: "250" })));
705
+ }, [$, Ke, ze, ye, p.countrySource, p.fiatCurrency]);
706
706
  const {
707
707
  order: Le,
708
708
  loading: Ct,
709
709
  error: de,
710
- createOrder: j
710
+ createOrder: V
711
711
  } = on(q), lt = 15e3, {
712
712
  status: Z,
713
713
  loading: bt
@@ -715,76 +715,76 @@ function xn(t) {
715
715
  { apiUrl: r },
716
716
  (Le == null ? void 0 : Le.orderId) ?? null,
717
717
  { pollInterval: K, initialDelay: lt }
718
- ), Je = M(null);
718
+ ), Je = I(null);
719
719
  ke.useEffect(() => {
720
720
  !(Z != null && Z.status) || !z || yn.includes(Z.status) && Je.current !== Z.orderId && (Je.current = Z.orderId, z(Z));
721
721
  }, [Z == null ? void 0 : Z.status, Z == null ? void 0 : Z.orderId, z]), ke.useEffect(() => {
722
722
  const v = pe || de;
723
723
  v && J && J(v);
724
724
  }, [pe, de, J]);
725
- const Fe = k || (b == null ? void 0 : b.defaultGateway) || null, ct = V(() => {
725
+ const Fe = k || (b == null ? void 0 : b.defaultGateway) || null, ct = j(() => {
726
726
  if (!se || !($ != null && $.unavailableGateways)) return null;
727
727
  const v = $.preferredGatewayId || Fe;
728
728
  return hn($.unavailableGateways, v);
729
- }, [se, $, Fe]), je = M(Fe);
729
+ }, [se, $, Fe]), je = I(Fe);
730
730
  je.current = Fe;
731
- const qe = M($);
731
+ const qe = I($);
732
732
  qe.current = $;
733
- const et = M(l);
734
- et.current = l;
735
- const Ue = O(async () => {
736
- var A, T, B;
737
- const v = ((A = m.selectedQuote) == null ? void 0 : A.gatewayId) || ((B = (T = qe.current) == null ? void 0 : T.bestQuote) == null ? void 0 : B.gatewayId) || je.current;
738
- if (!v || !m.walletAddress) {
739
- const I = [!v && "gateway", !m.walletAddress && "walletAddress"].filter(Boolean).join(", ");
740
- D({ type: "SET_ERROR", message: `Missing required fields: ${I}` });
733
+ const et = I(c);
734
+ et.current = c;
735
+ const Ue = P(async () => {
736
+ var R, T, B;
737
+ const v = ((R = p.selectedQuote) == null ? void 0 : R.gatewayId) || ((B = (T = qe.current) == null ? void 0 : T.bestQuote) == null ? void 0 : B.gatewayId) || je.current;
738
+ if (!v || !p.walletAddress) {
739
+ const M = [!v && "gateway", !p.walletAddress && "walletAddress"].filter(Boolean).join(", ");
740
+ D({ type: "SET_ERROR", message: `Missing required fields: ${M}` });
741
741
  return;
742
742
  }
743
743
  try {
744
- await j({
744
+ await V({
745
745
  gateway: v,
746
- customerId: m.customerId || void 0,
747
- fiatCurrency: m.fiatCurrency,
748
- ...E ? { cryptoAmount: m.cryptoAmount } : { fiatAmount: m.fiatAmount },
749
- cryptoCurrency: m.cryptoCurrency,
750
- network: m.network,
751
- walletAddress: m.walletAddress,
752
- paymentMethodId: m.paymentMethodId || void 0,
753
- email: m.email || void 0,
754
- orderType: m.flowType,
746
+ customerId: p.customerId || void 0,
747
+ fiatCurrency: p.fiatCurrency,
748
+ ...E ? { cryptoAmount: p.cryptoAmount } : { fiatAmount: p.fiatAmount },
749
+ cryptoCurrency: p.cryptoCurrency,
750
+ network: p.network,
751
+ walletAddress: p.walletAddress,
752
+ paymentMethodId: p.paymentMethodId || void 0,
753
+ email: p.email || void 0,
754
+ orderType: p.flowType,
755
755
  ...et.current ? { metadata: { brand: et.current } } : {},
756
756
  ...N && Object.keys(N).length > 0 ? { partnerMetadata: N } : {}
757
757
  }), D({ type: "SET_STEP", step: "checkout" });
758
- } catch (I) {
759
- const _ = I instanceof Error ? I.message : "Failed to create order";
758
+ } catch (M) {
759
+ const _ = M instanceof Error ? M.message : "Failed to create order";
760
760
  /wallet|address/i.test(_) ? D({ type: "SET_WALLET_ERROR", message: _.replace(/^Failed to create checkout intent:\s*/i, "") }) : D({ type: "SET_ERROR", message: _ });
761
761
  }
762
- }, [m, j, E, N]), tt = O((v) => {
762
+ }, [p, V, E, N]), tt = P((v) => {
763
763
  D({ type: "SET_STEP", step: v });
764
- }, []), St = O(() => {
765
- const v = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], A = v.indexOf(m.step);
766
- A > 0 && D({ type: "SET_STEP", step: v[A - 1] });
767
- }, [m.step, E]), wt = V(() => {
768
- const v = E ? !!m.cryptoAmount : !!m.fiatAmount;
769
- switch (m.step) {
764
+ }, []), St = P(() => {
765
+ const v = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], R = v.indexOf(p.step);
766
+ R > 0 && D({ type: "SET_STEP", step: v[R - 1] });
767
+ }, [p.step, E]), wt = j(() => {
768
+ const v = E ? !!p.cryptoAmount : !!p.fiatAmount;
769
+ switch (p.step) {
770
770
  case "confirm":
771
- return !!(v && m.cryptoCurrency && m.network && m.walletAddress && !oe);
771
+ return !!(v && p.cryptoCurrency && p.network && p.walletAddress && !oe);
772
772
  case "amount":
773
- return !!(v && m.cryptoCurrency && m.network && !oe);
773
+ return !!(v && p.cryptoCurrency && p.network && !oe);
774
774
  case "quotes":
775
- return !!m.selectedQuote;
775
+ return !!p.selectedQuote;
776
776
  case "wallet":
777
- return !!m.walletAddress;
777
+ return !!p.walletAddress;
778
778
  default:
779
779
  return !1;
780
780
  }
781
- }, [m, oe, E]), st = {
781
+ }, [p, oe, E]), st = {
782
782
  apiConfig: q,
783
783
  assetBaseUrl: o,
784
784
  config: b,
785
785
  configLoading: ne,
786
786
  configError: pe,
787
- state: m,
787
+ state: p,
788
788
  dispatch: D,
789
789
  quotes: $,
790
790
  quotesLoading: Ke,
@@ -1105,37 +1105,37 @@ function vn({
1105
1105
  defaultLocale: t = "en",
1106
1106
  children: a
1107
1107
  }) {
1108
- const [n, r] = w(t), [o, c] = w(Be[t] || it);
1108
+ const [n, r] = w(t), [o, l] = w(Be[t] || it);
1109
1109
  U(() => {
1110
1110
  if (r(t), Be[t])
1111
- c(Be[t]);
1111
+ l(Be[t]);
1112
1112
  else {
1113
1113
  const s = la[t];
1114
1114
  s && s().then((h) => {
1115
- Be[t] = h.default, c(h.default);
1115
+ Be[t] = h.default, l(h.default);
1116
1116
  });
1117
1117
  }
1118
1118
  }, [t]);
1119
- const u = O((s) => {
1119
+ const d = P((s) => {
1120
1120
  if (r(s), Be[s]) {
1121
- c(Be[s]);
1121
+ l(Be[s]);
1122
1122
  return;
1123
1123
  }
1124
1124
  const h = la[s];
1125
- h && h().then((p) => {
1126
- Be[s] = p.default, c(p.default);
1125
+ h && h().then((m) => {
1126
+ Be[s] = m.default, l(m.default);
1127
1127
  });
1128
- }, []), l = O(
1128
+ }, []), c = P(
1129
1129
  (s, h) => {
1130
- const p = o[s] || it[s] || s;
1131
- return Sa(p, h);
1130
+ const m = o[s] || it[s] || s;
1131
+ return Sa(m, h);
1132
1132
  },
1133
1133
  [o]
1134
- ), d = V(
1135
- () => ({ locale: n, setLocale: u, t: l, languages: Ze }),
1136
- [n, u, l]
1134
+ ), u = j(
1135
+ () => ({ locale: n, setLocale: d, t: c, languages: Ze }),
1136
+ [n, d, c]
1137
1137
  );
1138
- return /* @__PURE__ */ e(ba.Provider, { value: d, children: a });
1138
+ return /* @__PURE__ */ e(ba.Provider, { value: u, children: a });
1139
1139
  }
1140
1140
  function _t() {
1141
1141
  const t = ga(ba);
@@ -1147,7 +1147,7 @@ function _t() {
1147
1147
  languages: Ze
1148
1148
  };
1149
1149
  }
1150
- function P() {
1150
+ function O() {
1151
1151
  return _t().t;
1152
1152
  }
1153
1153
  function Cn({
@@ -1156,7 +1156,7 @@ function Cn({
1156
1156
  onCancel: n,
1157
1157
  redirectCountdown: r
1158
1158
  }) {
1159
- const o = P();
1159
+ const o = O();
1160
1160
  return /* @__PURE__ */ i(
1161
1161
  "div",
1162
1162
  {
@@ -1238,35 +1238,67 @@ function Ee({ size: t = 48 }) {
1238
1238
  }
1239
1239
  );
1240
1240
  }
1241
- function bn({
1241
+ const bn = {
1242
+ buildUrl(t, a) {
1243
+ const n = a.partner_id, r = n ? `/${n}/widget` : "/widget", o = new URL(r, t);
1244
+ for (const [l, d] of Object.entries(a))
1245
+ l === "origin" || l === "partner_id" || d == null || d === "" || typeof d == "object" || o.searchParams.set(l, String(d));
1246
+ return o.searchParams.set("widget_layout_mode", "Modal"), o.toString();
1247
+ },
1248
+ onLoad(t, a) {
1249
+ var n, r;
1250
+ (n = t.contentWindow) == null || n.postMessage(
1251
+ { type: "parent-hostname", data: { hostname: window.location.hostname } },
1252
+ a
1253
+ ), (r = t.contentWindow) == null || r.postMessage(
1254
+ { type: "allow-redirect", data: { redirectAllowed: !1 } },
1255
+ a
1256
+ );
1257
+ },
1258
+ iframeAllow: "camera *; microphone *; payment",
1259
+ iframeSandbox: "allow-scripts allow-forms allow-popups allow-same-origin"
1260
+ }, Sn = {
1261
+ wert: bn
1262
+ }, wn = {
1263
+ buildUrl(t, a) {
1264
+ const n = new URL(t);
1265
+ for (const [r, o] of Object.entries(a))
1266
+ o == null || o === "" || typeof o == "object" || n.searchParams.set(r, String(o));
1267
+ return n.toString();
1268
+ }
1269
+ };
1270
+ function kn(t) {
1271
+ return Sn[t] ?? wn;
1272
+ }
1273
+ function Nn({
1242
1274
  className: t = "",
1243
1275
  autoRedirect: a = !1,
1244
1276
  redirectDelay: n = 3e3
1245
1277
  }) {
1246
1278
  var g;
1247
- const { order: r, orderStatus: o, goToStep: c, goBack: u } = Xe(), l = P(), [d, s] = w(!1), [h, p] = w(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1279
+ const { order: r, orderStatus: o, goToStep: l, goBack: d } = Xe(), c = O(), [u, s] = w(!1), [h, m] = w(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1248
1280
  if (U(() => {
1249
1281
  if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !f) {
1250
- p(Math.ceil(n / 1e3));
1282
+ m(Math.ceil(n / 1e3));
1251
1283
  const k = setTimeout(() => {
1252
1284
  window.location.href = r.checkout.url;
1253
- }, n), R = setInterval(() => {
1254
- p((y) => y && y > 1 ? y - 1 : null);
1285
+ }, n), A = setInterval(() => {
1286
+ m((y) => y && y > 1 ? y - 1 : null);
1255
1287
  }, 1e3);
1256
1288
  return () => {
1257
- clearTimeout(k), clearInterval(R);
1289
+ clearTimeout(k), clearInterval(A);
1258
1290
  };
1259
1291
  }
1260
1292
  }, [r, a, n, f]), U(() => {
1261
- o && (o.status === "completed" ? c("complete") : ["failed", "cancelled", "expired"].includes(o.status) && c("error"));
1262
- }, [o == null ? void 0 : o.status, c]), !r)
1293
+ o && (o.status === "completed" ? l("complete") : ["failed", "cancelled", "expired"].includes(o.status) && l("error"));
1294
+ }, [o == null ? void 0 : o.status, l]), !r)
1263
1295
  return /* @__PURE__ */ i(
1264
1296
  "div",
1265
1297
  {
1266
1298
  className: `flex flex-col items-center justify-center p-8 ${t}`,
1267
1299
  style: { color: "var(--t-text)" },
1268
1300
  children: [
1269
- /* @__PURE__ */ e("p", { className: "text-[15px] mb-4", children: l("checkout.noOrder") }),
1301
+ /* @__PURE__ */ e("p", { className: "text-[15px] mb-4", children: c("checkout.noOrder") }),
1270
1302
  /* @__PURE__ */ e(
1271
1303
  "button",
1272
1304
  {
@@ -1279,8 +1311,8 @@ function bn({
1279
1311
  paddingLeft: 24,
1280
1312
  paddingRight: 24
1281
1313
  },
1282
- onClick: u,
1283
- children: l("checkout.goBack")
1314
+ onClick: d,
1315
+ children: c("checkout.goBack")
1284
1316
  }
1285
1317
  )
1286
1318
  ]
@@ -1293,8 +1325,8 @@ function bn({
1293
1325
  className: `flex flex-col items-center justify-center p-8 text-center ${t}`,
1294
1326
  style: { color: "var(--t-text)" },
1295
1327
  children: [
1296
- /* @__PURE__ */ e("h3", { className: "text-[18px] font-semibold mb-2", children: l("checkout.expired") }),
1297
- /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: l("checkout.expiredDesc") }),
1328
+ /* @__PURE__ */ e("h3", { className: "text-[18px] font-semibold mb-2", children: c("checkout.expired") }),
1329
+ /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: c("checkout.expiredDesc") }),
1298
1330
  /* @__PURE__ */ e(
1299
1331
  "button",
1300
1332
  {
@@ -1305,15 +1337,15 @@ function bn({
1305
1337
  background: "var(--t-cta-bg)",
1306
1338
  color: "var(--t-cta-text)"
1307
1339
  },
1308
- onClick: u,
1309
- children: l("checkout.startOver")
1340
+ onClick: d,
1341
+ children: c("checkout.startOver")
1310
1342
  }
1311
1343
  )
1312
1344
  ]
1313
1345
  }
1314
1346
  );
1315
1347
  if (r.checkout.method === "iframe") {
1316
- const k = r.checkout.url, R = ((g = r.checkout.allowedFeatures) == null ? void 0 : g.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1348
+ const k = r.checkout.url, A = ((g = r.checkout.allowedFeatures) == null ? void 0 : g.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1317
1349
  return oa(
1318
1350
  /* @__PURE__ */ i(
1319
1351
  "div",
@@ -1342,7 +1374,7 @@ function bn({
1342
1374
  children: /* @__PURE__ */ i(
1343
1375
  "button",
1344
1376
  {
1345
- onClick: u,
1377
+ onClick: d,
1346
1378
  style: {
1347
1379
  display: "flex",
1348
1380
  alignItems: "center",
@@ -1358,14 +1390,14 @@ function bn({
1358
1390
  },
1359
1391
  children: [
1360
1392
  /* @__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" }) }),
1361
- l("checkout.cancel")
1393
+ c("checkout.cancel")
1362
1394
  ]
1363
1395
  }
1364
1396
  )
1365
1397
  }
1366
1398
  ),
1367
1399
  /* @__PURE__ */ i("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1368
- !d && /* @__PURE__ */ i(
1400
+ !u && /* @__PURE__ */ i(
1369
1401
  "div",
1370
1402
  {
1371
1403
  style: {
@@ -1378,7 +1410,7 @@ function bn({
1378
1410
  },
1379
1411
  children: [
1380
1412
  /* @__PURE__ */ e(Ee, { size: 32 }),
1381
- /* @__PURE__ */ e("p", { style: { color: "#888", fontSize: 14, marginTop: 16 }, children: l("checkout.loading") })
1413
+ /* @__PURE__ */ e("p", { style: { color: "#888", fontSize: 14, marginTop: 16 }, children: c("checkout.loading") })
1382
1414
  ]
1383
1415
  }
1384
1416
  ),
@@ -1387,14 +1419,14 @@ function bn({
1387
1419
  {
1388
1420
  src: k,
1389
1421
  style: {
1390
- display: d ? "block" : "none",
1422
+ display: u ? "block" : "none",
1391
1423
  width: "100%",
1392
1424
  height: "100%",
1393
1425
  border: "none"
1394
1426
  },
1395
- allow: R,
1427
+ allow: A,
1396
1428
  onLoad: () => s(!0),
1397
- title: l("checkout.iframeTitle")
1429
+ title: c("checkout.iframeTitle")
1398
1430
  }
1399
1431
  )
1400
1432
  ] })
@@ -1404,115 +1436,33 @@ function bn({
1404
1436
  document.body
1405
1437
  );
1406
1438
  }
1407
- if (r.checkout.method === "redirect")
1408
- return /* @__PURE__ */ e(
1409
- Cn,
1439
+ return r.checkout.method === "redirect" ? /* @__PURE__ */ e(
1440
+ Cn,
1441
+ {
1442
+ gatewayName: r.gateway,
1443
+ checkoutUrl: r.checkout.url,
1444
+ onCancel: d,
1445
+ redirectCountdown: h
1446
+ }
1447
+ ) : r.checkout.method === "widget" && r.widgetConfig ? oa(
1448
+ /* @__PURE__ */ e(
1449
+ En,
1410
1450
  {
1411
- gatewayName: r.gateway,
1412
- checkoutUrl: r.checkout.url,
1413
- onCancel: u,
1414
- redirectCountdown: h
1451
+ order: r,
1452
+ iframeLoaded: u,
1453
+ onIframeLoad: () => s(!0),
1454
+ onBack: d,
1455
+ t: c
1415
1456
  }
1416
- );
1417
- if (r.checkout.method === "widget" && r.widgetConfig) {
1418
- const k = Sn(r.checkout.url, r.widgetConfig);
1419
- return oa(
1420
- /* @__PURE__ */ i(
1421
- "div",
1422
- {
1423
- style: {
1424
- position: "fixed",
1425
- inset: 0,
1426
- zIndex: 9999,
1427
- display: "flex",
1428
- flexDirection: "column",
1429
- background: "#000"
1430
- },
1431
- children: [
1432
- /* @__PURE__ */ e(
1433
- "div",
1434
- {
1435
- style: {
1436
- display: "flex",
1437
- alignItems: "center",
1438
- height: 48,
1439
- paddingLeft: 8,
1440
- paddingRight: 16,
1441
- background: "#111",
1442
- flexShrink: 0
1443
- },
1444
- children: /* @__PURE__ */ i(
1445
- "button",
1446
- {
1447
- onClick: u,
1448
- style: {
1449
- display: "flex",
1450
- alignItems: "center",
1451
- gap: 6,
1452
- background: "none",
1453
- border: "none",
1454
- color: "#fff",
1455
- fontSize: 14,
1456
- fontWeight: 500,
1457
- cursor: "pointer",
1458
- padding: "8px 12px",
1459
- borderRadius: 6
1460
- },
1461
- children: [
1462
- /* @__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" }) }),
1463
- l("checkout.cancel")
1464
- ]
1465
- }
1466
- )
1467
- }
1468
- ),
1469
- /* @__PURE__ */ i("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1470
- !d && /* @__PURE__ */ i(
1471
- "div",
1472
- {
1473
- style: {
1474
- position: "absolute",
1475
- inset: 0,
1476
- display: "flex",
1477
- flexDirection: "column",
1478
- alignItems: "center",
1479
- justifyContent: "center"
1480
- },
1481
- children: [
1482
- /* @__PURE__ */ e(Ee, { size: 32 }),
1483
- /* @__PURE__ */ e("p", { style: { color: "#888", fontSize: 14, marginTop: 16 }, children: l("checkout.loading") })
1484
- ]
1485
- }
1486
- ),
1487
- /* @__PURE__ */ e(
1488
- "iframe",
1489
- {
1490
- src: k,
1491
- style: {
1492
- display: d ? "block" : "none",
1493
- width: "100%",
1494
- height: "100%",
1495
- border: "none"
1496
- },
1497
- allow: "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share",
1498
- onLoad: () => s(!0),
1499
- title: l("checkout.widgetTitle")
1500
- }
1501
- )
1502
- ] })
1503
- ]
1504
- }
1505
- ),
1506
- document.body
1507
- );
1508
- }
1509
- return /* @__PURE__ */ i(
1457
+ ),
1458
+ document.body
1459
+ ) : /* @__PURE__ */ i(
1510
1460
  "div",
1511
1461
  {
1512
1462
  className: `flex flex-col items-center justify-center p-8 ${t}`,
1513
1463
  style: { color: "var(--t-text)" },
1514
1464
  children: [
1515
- /* @__PURE__ */ e("p", { className: "text-[15px] mb-4", children: l("checkout.unknownMethod") }),
1465
+ /* @__PURE__ */ e("p", { className: "text-[15px] mb-4", children: c("checkout.unknownMethod") }),
1516
1466
  /* @__PURE__ */ e(
1517
1467
  "button",
1518
1468
  {
@@ -1525,26 +1475,120 @@ function bn({
1525
1475
  paddingLeft: 24,
1526
1476
  paddingRight: 24
1527
1477
  },
1528
- onClick: u,
1529
- children: l("checkout.goBack")
1478
+ onClick: d,
1479
+ children: c("checkout.goBack")
1530
1480
  }
1531
1481
  )
1532
1482
  ]
1533
1483
  }
1534
1484
  );
1535
1485
  }
1536
- function Sn(t, a) {
1537
- const n = new URL("/en/partner/widget", t);
1538
- for (const [r, o] of Object.entries(a))
1539
- o != null && o !== "" && n.searchParams.set(r, String(o));
1540
- return n.toString();
1486
+ function En({
1487
+ order: t,
1488
+ iframeLoaded: a,
1489
+ onIframeLoad: n,
1490
+ onBack: r,
1491
+ t: o
1492
+ }) {
1493
+ var m;
1494
+ const l = I(null), d = j(() => kn(t.gateway), [t.gateway]), c = d.buildUrl(t.checkout.url, t.widgetConfig ?? {}), u = t.checkout.url, s = ((m = t.checkout.allowedFeatures) == null ? void 0 : m.join("; ")) || d.iframeAllow || "payment; camera; microphone", h = P(() => {
1495
+ n(), l.current && d.onLoad && d.onLoad(l.current, u);
1496
+ }, [n, d, u]);
1497
+ return /* @__PURE__ */ i(
1498
+ "div",
1499
+ {
1500
+ style: {
1501
+ position: "fixed",
1502
+ inset: 0,
1503
+ zIndex: 9999,
1504
+ display: "flex",
1505
+ flexDirection: "column",
1506
+ background: "#000"
1507
+ },
1508
+ children: [
1509
+ /* @__PURE__ */ e(
1510
+ "div",
1511
+ {
1512
+ style: {
1513
+ display: "flex",
1514
+ alignItems: "center",
1515
+ height: 48,
1516
+ paddingLeft: 8,
1517
+ paddingRight: 16,
1518
+ background: "#111",
1519
+ flexShrink: 0
1520
+ },
1521
+ children: /* @__PURE__ */ i(
1522
+ "button",
1523
+ {
1524
+ onClick: r,
1525
+ style: {
1526
+ display: "flex",
1527
+ alignItems: "center",
1528
+ gap: 6,
1529
+ background: "none",
1530
+ border: "none",
1531
+ color: "#fff",
1532
+ fontSize: 14,
1533
+ fontWeight: 500,
1534
+ cursor: "pointer",
1535
+ padding: "8px 12px",
1536
+ borderRadius: 6
1537
+ },
1538
+ children: [
1539
+ /* @__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" }) }),
1540
+ o("checkout.cancel")
1541
+ ]
1542
+ }
1543
+ )
1544
+ }
1545
+ ),
1546
+ /* @__PURE__ */ i("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1547
+ !a && /* @__PURE__ */ i(
1548
+ "div",
1549
+ {
1550
+ style: {
1551
+ position: "absolute",
1552
+ inset: 0,
1553
+ display: "flex",
1554
+ flexDirection: "column",
1555
+ alignItems: "center",
1556
+ justifyContent: "center"
1557
+ },
1558
+ children: [
1559
+ /* @__PURE__ */ e(Ee, { size: 32 }),
1560
+ /* @__PURE__ */ e("p", { style: { color: "#888", fontSize: 14, marginTop: 16 }, children: o("checkout.loading") })
1561
+ ]
1562
+ }
1563
+ ),
1564
+ /* @__PURE__ */ e(
1565
+ "iframe",
1566
+ {
1567
+ ref: l,
1568
+ src: c,
1569
+ style: {
1570
+ display: a ? "block" : "none",
1571
+ width: "100%",
1572
+ height: "100%",
1573
+ border: "none"
1574
+ },
1575
+ allow: s,
1576
+ sandbox: d.iframeSandbox,
1577
+ onLoad: h,
1578
+ title: o("checkout.widgetTitle")
1579
+ }
1580
+ )
1581
+ ] })
1582
+ ]
1583
+ }
1584
+ );
1541
1585
  }
1542
- function wn({ className: t = "" }) {
1543
- const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Xe(), o = P();
1586
+ function An({ className: t = "" }) {
1587
+ const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Xe(), o = O();
1544
1588
  U(() => {
1545
1589
  a && (a.status === "completed" ? r("complete") : ["failed", "cancelled", "expired", "refunded"].includes(a.status) && r("error"));
1546
1590
  }, [a == null ? void 0 : a.status, r]);
1547
- const c = () => {
1591
+ const l = () => {
1548
1592
  if (!a) return o("processing.default");
1549
1593
  switch (a.status) {
1550
1594
  case "pending":
@@ -1557,7 +1601,7 @@ function wn({ className: t = "" }) {
1557
1601
  };
1558
1602
  return /* @__PURE__ */ i("div", { className: `flex flex-col items-center justify-center px-8 py-12 text-center ${t}`, children: [
1559
1603
  /* @__PURE__ */ e("div", { className: "mb-6", style: { animation: "processingPulse 1500ms ease-in-out infinite" }, children: /* @__PURE__ */ e(Ee, { size: 64 }) }),
1560
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-3", style: { color: "var(--t-text)" }, children: c() }),
1604
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-3", style: { color: "var(--t-text)" }, children: l() }),
1561
1605
  n && /* @__PURE__ */ e("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: o("processing.checkingStatus") }),
1562
1606
  a && /* @__PURE__ */ i("div", { className: "w-full mt-6 text-left", style: { background: "var(--t-surface)", borderRadius: "var(--t-card-radius, 20px)", padding: 16 }, children: [
1563
1607
  /* @__PURE__ */ e($e, { label: o("processing.orderId"), value: a.orderId, mono: !0 }),
@@ -1612,13 +1656,13 @@ function $e({ label: t, value: a, mono: n }) {
1612
1656
  }
1613
1657
  );
1614
1658
  }
1615
- function kn({
1659
+ function Rn({
1616
1660
  className: t = "",
1617
1661
  explorerUrl: a,
1618
1662
  onDone: n,
1619
1663
  doneButtonText: r
1620
1664
  }) {
1621
- const { orderStatus: o, state: c, dispatch: u } = Xe(), l = P(), d = c.flowType === "sell", s = () => {
1665
+ const { orderStatus: o, state: l, dispatch: d } = Xe(), c = O(), u = l.flowType === "sell", s = () => {
1622
1666
  if (!(o != null && o.transactionHash)) return null;
1623
1667
  if (!a) {
1624
1668
  const f = {
@@ -1632,12 +1676,12 @@ function kn({
1632
1676
  avalanche: "https://snowtrace.io/tx/{txHash}",
1633
1677
  fantom: "https://ftmscan.com/tx/{txHash}"
1634
1678
  };
1635
- return (f[c.network] || f.ethereum).replace("{txHash}", o.transactionHash);
1679
+ return (f[l.network] || f.ethereum).replace("{txHash}", o.transactionHash);
1636
1680
  }
1637
1681
  return a.replace("{txHash}", o.transactionHash);
1638
1682
  }, h = () => {
1639
- n ? n() : u({ type: "RESET" });
1640
- }, p = s();
1683
+ n ? n() : d({ type: "RESET" });
1684
+ }, m = s();
1641
1685
  return /* @__PURE__ */ i("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
1642
1686
  /* @__PURE__ */ e(
1643
1687
  "div",
@@ -1655,13 +1699,13 @@ function kn({
1655
1699
  ) })
1656
1700
  }
1657
1701
  ),
1658
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: l(d ? "complete.sellTitle" : "complete.buyTitle") }),
1659
- /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: d ? l("complete.sellDesc", { fiat: (o == null ? void 0 : o.fiatCurrency) || c.fiatCurrency }) : l("complete.buyDesc", { crypto: (o == null ? void 0 : o.cryptoCurrency) || c.cryptoCurrency }) }),
1702
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: c(u ? "complete.sellTitle" : "complete.buyTitle") }),
1703
+ /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: u ? c("complete.sellDesc", { fiat: (o == null ? void 0 : o.fiatCurrency) || l.fiatCurrency }) : c("complete.buyDesc", { crypto: (o == null ? void 0 : o.cryptoCurrency) || l.cryptoCurrency }) }),
1660
1704
  o && /* @__PURE__ */ i("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: "var(--t-card-radius, 20px)", padding: 16 }, children: [
1661
1705
  /* @__PURE__ */ e(
1662
1706
  Ne,
1663
1707
  {
1664
- label: l(d ? "complete.amountSell" : "complete.amountBuy"),
1708
+ label: c(u ? "complete.amountSell" : "complete.amountBuy"),
1665
1709
  value: `${o.cryptoAmount} ${o.cryptoCurrency}`,
1666
1710
  highlight: !0
1667
1711
  }
@@ -1669,15 +1713,15 @@ function kn({
1669
1713
  /* @__PURE__ */ e(
1670
1714
  Ne,
1671
1715
  {
1672
- label: l(d ? "complete.paidSell" : "complete.paidBuy"),
1716
+ label: c(u ? "complete.paidSell" : "complete.paidBuy"),
1673
1717
  value: `${o.fiatAmount} ${o.fiatCurrency}`
1674
1718
  }
1675
1719
  ),
1676
- /* @__PURE__ */ e(Ne, { label: l("complete.network"), value: o.network }),
1720
+ /* @__PURE__ */ e(Ne, { label: c("complete.network"), value: o.network }),
1677
1721
  /* @__PURE__ */ e(
1678
1722
  Ne,
1679
1723
  {
1680
- label: l("complete.wallet"),
1724
+ label: c("complete.wallet"),
1681
1725
  value: `${o.walletAddress.slice(0, 10)}...${o.walletAddress.slice(-8)}`,
1682
1726
  mono: !0
1683
1727
  }
@@ -1685,31 +1729,31 @@ function kn({
1685
1729
  o.transactionHash && /* @__PURE__ */ e(
1686
1730
  Ne,
1687
1731
  {
1688
- label: l("complete.transaction"),
1732
+ label: c("complete.transaction"),
1689
1733
  value: `${o.transactionHash.slice(0, 10)}...${o.transactionHash.slice(-8)}`,
1690
1734
  mono: !0
1691
1735
  }
1692
1736
  ),
1693
- /* @__PURE__ */ e(Ne, { label: l("complete.provider"), value: o.gateway }),
1694
- /* @__PURE__ */ e(Ne, { label: l("complete.orderId"), value: o.orderId, mono: !0 }),
1737
+ /* @__PURE__ */ e(Ne, { label: c("complete.provider"), value: o.gateway }),
1738
+ /* @__PURE__ */ e(Ne, { label: c("complete.orderId"), value: o.orderId, mono: !0 }),
1695
1739
  o.completedAt && /* @__PURE__ */ e(
1696
1740
  Ne,
1697
1741
  {
1698
- label: l("complete.completed"),
1742
+ label: c("complete.completed"),
1699
1743
  value: new Date(o.completedAt).toLocaleString()
1700
1744
  }
1701
1745
  )
1702
1746
  ] }),
1703
1747
  /* @__PURE__ */ i("div", { className: "w-full flex flex-col gap-2", children: [
1704
- p && /* @__PURE__ */ e(
1748
+ m && /* @__PURE__ */ e(
1705
1749
  "a",
1706
1750
  {
1707
- href: p,
1751
+ href: m,
1708
1752
  target: "_blank",
1709
1753
  rel: "noopener noreferrer",
1710
1754
  className: "w-full font-semibold text-[14px] flex items-center justify-center transition-all",
1711
1755
  style: { height: 48, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-surface)", color: "var(--t-text)", textDecoration: "none" },
1712
- children: l("complete.viewExplorer")
1756
+ children: c("complete.viewExplorer")
1713
1757
  }
1714
1758
  ),
1715
1759
  /* @__PURE__ */ e(
@@ -1718,7 +1762,7 @@ function kn({
1718
1762
  className: "w-full font-semibold text-[16px] transition-all",
1719
1763
  style: { height: 60, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-cta-bg)", color: "var(--t-cta-text)" },
1720
1764
  onClick: h,
1721
- children: r || l("complete.done")
1765
+ children: r || c("complete.done")
1722
1766
  }
1723
1767
  )
1724
1768
  ] })
@@ -1744,16 +1788,16 @@ function Ne({ label: t, value: a, mono: n, highlight: r }) {
1744
1788
  }
1745
1789
  );
1746
1790
  }
1747
- function Nn({
1791
+ function Tn({
1748
1792
  className: t = "",
1749
1793
  onRetry: a,
1750
1794
  onDone: n,
1751
1795
  doneButtonText: r,
1752
1796
  supportEmail: o = "support@nowramp.com"
1753
1797
  }) {
1754
- const { state: c, orderStatus: u, dispatch: l, goToStep: d } = Xe(), s = P(), h = c.flowType === "sell", p = () => {
1755
- if (u)
1756
- switch (u.status) {
1798
+ const { state: l, orderStatus: d, dispatch: c, goToStep: u } = Xe(), s = O(), h = l.flowType === "sell", m = () => {
1799
+ if (d)
1800
+ switch (d.status) {
1757
1801
  case "failed":
1758
1802
  return s("errorStep.failed");
1759
1803
  case "cancelled":
@@ -1767,9 +1811,9 @@ function Nn({
1767
1811
  }
1768
1812
  return s("errorStep.unknown");
1769
1813
  }, f = () => {
1770
- if (c.errorMessage) return c.errorMessage;
1771
- if (u)
1772
- switch (u.status) {
1814
+ if (l.errorMessage) return l.errorMessage;
1815
+ if (d)
1816
+ switch (d.status) {
1773
1817
  case "failed":
1774
1818
  return s(h ? "errorStep.failedSell" : "errorStep.failedBuy");
1775
1819
  case "cancelled":
@@ -1783,9 +1827,9 @@ function Nn({
1783
1827
  }
1784
1828
  return s("errorStep.genericDesc");
1785
1829
  }, g = () => {
1786
- l({ type: "CLEAR_ERROR" }), a ? a() : (l({ type: "RESET" }), d("amount"));
1830
+ c({ type: "CLEAR_ERROR" }), a ? a() : (c({ type: "RESET" }), u("amount"));
1787
1831
  }, k = () => {
1788
- l({ type: "RESET" }), d("amount");
1832
+ c({ type: "RESET" }), u("amount");
1789
1833
  };
1790
1834
  return /* @__PURE__ */ i("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
1791
1835
  /* @__PURE__ */ e(
@@ -1796,11 +1840,11 @@ function Nn({
1796
1840
  children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }) })
1797
1841
  }
1798
1842
  ),
1799
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: p() }),
1843
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: m() }),
1800
1844
  /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: f() }),
1801
- 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__ */ i("div", { className: "flex justify-between items-center py-2", children: [
1845
+ d && /* @__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__ */ i("div", { className: "flex justify-between items-center py-2", children: [
1802
1846
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: s("errorStep.orderId") }),
1803
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium font-mono", style: { color: "var(--t-text)" }, children: u.orderId })
1847
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium font-mono", style: { color: "var(--t-text)" }, children: d.orderId })
1804
1848
  ] }) }),
1805
1849
  /* @__PURE__ */ i("div", { className: "w-full flex flex-col gap-2", children: [
1806
1850
  /* @__PURE__ */ e(
@@ -1852,7 +1896,7 @@ function Nn({
1852
1896
  }
1853
1897
  )
1854
1898
  ] }),
1855
- u && /* @__PURE__ */ e("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: s("errorStep.reference", { orderId: u.orderId }) })
1899
+ d && /* @__PURE__ */ e("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: s("errorStep.reference", { orderId: d.orderId }) })
1856
1900
  ] })
1857
1901
  ] });
1858
1902
  }
@@ -2211,9 +2255,9 @@ const ot = {
2211
2255
  { code: "ZCHF", name: "Frankencoin", chains: ["ETH"], popular: !1 },
2212
2256
  { code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
2213
2257
  { code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
2214
- ], En = Object.fromEntries(
2258
+ ], Ln = Object.fromEntries(
2215
2259
  wa.map((t) => [t.code, t.name])
2216
- ), Rn = {
2260
+ ), Fn = {
2217
2261
  AED: "ae",
2218
2262
  ALL: "al",
2219
2263
  ARS: "ar",
@@ -2251,8 +2295,8 @@ const ot = {
2251
2295
  function ka(t, a = "") {
2252
2296
  return `${a}/crypto-icons/${t.toLowerCase()}.svg`;
2253
2297
  }
2254
- function An(t, a = "") {
2255
- const n = Rn[t] || "us";
2298
+ function Un(t, a = "") {
2299
+ const n = Fn[t] || "us";
2256
2300
  return `${a}/flags/${n}.svg`;
2257
2301
  }
2258
2302
  function yt(t) {
@@ -2294,7 +2338,7 @@ const ca = [
2294
2338
  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 },
2295
2339
  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 },
2296
2340
  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 }
2297
- }, Tn = /* @__PURE__ */ new Set([
2341
+ }, In = /* @__PURE__ */ new Set([
2298
2342
  "USDC",
2299
2343
  "USDT",
2300
2344
  "DAI",
@@ -2322,13 +2366,13 @@ const ca = [
2322
2366
  "ZCHF"
2323
2367
  ]);
2324
2368
  function Ea(t) {
2325
- return Tn.has(t.toUpperCase());
2369
+ return In.has(t.toUpperCase());
2326
2370
  }
2327
- function Ir(t, a) {
2371
+ function Hr(t, a) {
2328
2372
  var n, r;
2329
2373
  return ((n = da[t]) == null ? void 0 : n[a]) ?? ((r = da.USDC) == null ? void 0 : r[a]) ?? 1;
2330
2374
  }
2331
- function Ln(t) {
2375
+ function Mn(t) {
2332
2376
  return parseFloat(t.replace(/,/g, "")) || 0;
2333
2377
  }
2334
2378
  function Bt(t) {
@@ -2339,7 +2383,7 @@ function Bt(t) {
2339
2383
  const a = t.toPrecision(4);
2340
2384
  return parseFloat(a).toString();
2341
2385
  }
2342
- const Ce = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ua = 10, ma = 1e-4, Fn = (() => {
2386
+ const Ce = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ua = 10, ma = 1e-4, Dn = (() => {
2343
2387
  const t = [];
2344
2388
  for (const a of wa)
2345
2389
  for (const n of a.chains)
@@ -2349,56 +2393,56 @@ const Ce = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ua = 10, ma = 1e-4, Fn = (
2349
2393
  function pa(t) {
2350
2394
  return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
2351
2395
  }
2352
- function Un({ className: t = "", stablecoinParity: a, partnerName: n }) {
2396
+ function Bn({ className: t = "", stablecoinParity: a, partnerName: n }) {
2353
2397
  var q;
2354
2398
  const {
2355
2399
  config: r,
2356
2400
  configLoading: o,
2357
- state: c,
2358
- defaultGateway: u,
2359
- quotes: l,
2360
- fetchQuotes: d,
2401
+ state: l,
2402
+ defaultGateway: d,
2403
+ quotes: c,
2404
+ fetchQuotes: u,
2361
2405
  createOrder: s,
2362
2406
  orderLoading: h
2363
- } = Xe(), p = P(), f = c.flowType === "sell", [g, k] = w(null), R = r == null ? void 0 : r.gateways.find((te) => te.id === u), y = (q = l == null ? void 0 : l.bestQuote) != null && q.exchangeRate ? parseFloat(l.bestQuote.exchangeRate) : null, N = parseFloat(c.fiatAmount) || 0, K = !!(a && n && !f && Ea(c.cryptoCurrency) && y), z = K && c.cryptoCurrency.toUpperCase().includes(c.fiatCurrency.toUpperCase()), J = K && N > 0 ? Bt(z ? N : N / y) : null, ie = async () => {
2407
+ } = Xe(), m = O(), f = l.flowType === "sell", [g, k] = w(null), A = r == null ? void 0 : r.gateways.find((te) => te.id === d), y = (q = c == null ? void 0 : c.bestQuote) != null && q.exchangeRate ? parseFloat(c.bestQuote.exchangeRate) : null, N = parseFloat(l.fiatAmount) || 0, K = !!(a && n && !f && Ea(l.cryptoCurrency) && y), z = K && l.cryptoCurrency.toUpperCase().includes(l.fiatCurrency.toUpperCase()), J = K && N > 0 ? Bt(z ? N : N / y) : null, ie = async () => {
2364
2408
  k(null);
2365
2409
  try {
2366
- d(), await s();
2410
+ u(), await s();
2367
2411
  } catch (te) {
2368
- const be = te instanceof Error ? te.message : p("error.createOrderFailed");
2412
+ const be = te instanceof Error ? te.message : m("error.createOrderFailed");
2369
2413
  k(be);
2370
2414
  }
2371
2415
  };
2372
2416
  return o ? /* @__PURE__ */ i("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
2373
2417
  /* @__PURE__ */ e(Ee, { size: 32 }),
2374
- /* @__PURE__ */ e("p", { className: "text-[14px] mt-4", style: { color: "var(--t-text-secondary)" }, children: p("confirm.loading") })
2418
+ /* @__PURE__ */ e("p", { className: "text-[14px] mt-4", style: { color: "var(--t-text-secondary)" }, children: m("confirm.loading") })
2375
2419
  ] }) : /* @__PURE__ */ i("div", { className: `flex flex-col items-center px-8 py-12 ${t}`, children: [
2376
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children: p(f ? "confirm.sellTitle" : "confirm.buyTitle") }),
2420
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children: m(f ? "confirm.sellTitle" : "confirm.buyTitle") }),
2377
2421
  /* @__PURE__ */ i("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: "var(--t-card-radius, 20px)", padding: 16 }, children: [
2378
- R && /* @__PURE__ */ i("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2379
- /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: p("confirm.provider") }),
2422
+ A && /* @__PURE__ */ i("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2423
+ /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: m("confirm.provider") }),
2380
2424
  /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
2381
- R.logo && /* @__PURE__ */ e("img", { src: R.logo, alt: R.name, width: 20, height: 20, style: { borderRadius: 4 } }),
2382
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: R.name })
2425
+ A.logo && /* @__PURE__ */ e("img", { src: A.logo, alt: A.name, width: 20, height: 20, style: { borderRadius: 4 } }),
2426
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: A.name })
2383
2427
  ] })
2384
2428
  ] }),
2385
2429
  f ? /* @__PURE__ */ i(G, { children: [
2386
- /* @__PURE__ */ e(He, { label: p("confirm.youSell"), value: `${c.cryptoAmount} ${c.cryptoCurrency}`, highlight: !0 }),
2387
- /* @__PURE__ */ e(He, { label: p("confirm.youReceive"), value: p("confirm.payout", { currency: c.fiatCurrency }) })
2430
+ /* @__PURE__ */ e(He, { label: m("confirm.youSell"), value: `${l.cryptoAmount} ${l.cryptoCurrency}`, highlight: !0 }),
2431
+ /* @__PURE__ */ e(He, { label: m("confirm.youReceive"), value: m("confirm.payout", { currency: l.fiatCurrency }) })
2388
2432
  ] }) : /* @__PURE__ */ i(G, { children: [
2389
- /* @__PURE__ */ e(He, { label: p("confirm.youPay"), value: `${c.fiatAmount} ${c.fiatCurrency}`, highlight: !0 }),
2433
+ /* @__PURE__ */ e(He, { label: m("confirm.youPay"), value: `${l.fiatAmount} ${l.fiatCurrency}`, highlight: !0 }),
2390
2434
  /* @__PURE__ */ e(
2391
2435
  He,
2392
2436
  {
2393
- label: p("confirm.youReceive"),
2394
- value: J ? `${J} ${c.cryptoCurrency}` : p("confirm.cryptoOnNetwork", { crypto: c.cryptoCurrency, network: c.network })
2437
+ label: m("confirm.youReceive"),
2438
+ value: J ? `${J} ${l.cryptoCurrency}` : m("confirm.cryptoOnNetwork", { crypto: l.cryptoCurrency, network: l.network })
2395
2439
  }
2396
2440
  ),
2397
- /* @__PURE__ */ e(He, { label: p("confirm.wallet"), value: pa(c.walletAddress), mono: !0 }),
2398
- K && J && /* @__PURE__ */ e("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: p("confirm.parityNote", { amount: J, crypto: c.cryptoCurrency, partner: n }) })
2441
+ /* @__PURE__ */ e(He, { label: m("confirm.wallet"), value: pa(l.walletAddress), mono: !0 }),
2442
+ K && J && /* @__PURE__ */ e("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: m("confirm.parityNote", { amount: J, crypto: l.cryptoCurrency, partner: n }) })
2399
2443
  ] }),
2400
- /* @__PURE__ */ e(He, { label: p("confirm.network"), value: c.network }),
2401
- f && c.walletAddress && /* @__PURE__ */ e(He, { label: p("confirm.refundAddress"), value: pa(c.walletAddress), mono: !0 })
2444
+ /* @__PURE__ */ e(He, { label: m("confirm.network"), value: l.network }),
2445
+ f && l.walletAddress && /* @__PURE__ */ e(He, { label: m("confirm.refundAddress"), value: pa(l.walletAddress), mono: !0 })
2402
2446
  ] }),
2403
2447
  g && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: g }),
2404
2448
  /* @__PURE__ */ e(
@@ -2410,8 +2454,8 @@ function Un({ className: t = "", stablecoinParity: a, partnerName: n }) {
2410
2454
  onClick: ie,
2411
2455
  children: h ? /* @__PURE__ */ i(G, { children: [
2412
2456
  /* @__PURE__ */ e(Ee, { size: 18 }),
2413
- p("confirm.processing")
2414
- ] }) : p(f ? "confirm.confirmSell" : "confirm.confirmPay")
2457
+ m("confirm.processing")
2458
+ ] }) : m(f ? "confirm.confirmSell" : "confirm.confirmPay")
2415
2459
  }
2416
2460
  )
2417
2461
  ] });
@@ -2435,36 +2479,36 @@ function Pe({
2435
2479
  children: n,
2436
2480
  variant: r = "bottom"
2437
2481
  }) {
2438
- const [o, c] = w(!1), [u, l] = w(!1);
2482
+ const [o, l] = w(!1), [d, c] = w(!1);
2439
2483
  U(() => {
2440
2484
  if (t)
2441
- c(!0), requestAnimationFrame(() => requestAnimationFrame(() => l(!0)));
2485
+ l(!0), requestAnimationFrame(() => requestAnimationFrame(() => c(!0)));
2442
2486
  else if (o) {
2443
- l(!1);
2444
- const p = setTimeout(() => c(!1), 250);
2445
- return () => clearTimeout(p);
2487
+ c(!1);
2488
+ const m = setTimeout(() => l(!1), 250);
2489
+ return () => clearTimeout(m);
2446
2490
  }
2447
2491
  }, [t]);
2448
- const d = O(() => {
2449
- l(!1), setTimeout(() => a(), 250);
2492
+ const u = P(() => {
2493
+ c(!1), setTimeout(() => a(), 250);
2450
2494
  }, [a]);
2451
2495
  return U(() => {
2452
2496
  if (!t) return;
2453
- const p = (f) => {
2454
- f.key === "Escape" && d();
2497
+ const m = (f) => {
2498
+ f.key === "Escape" && u();
2455
2499
  };
2456
- return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
2457
- }, [t, d]), o ? /* @__PURE__ */ e(
2500
+ return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
2501
+ }, [t, u]), o ? /* @__PURE__ */ e(
2458
2502
  "div",
2459
2503
  {
2460
2504
  className: "absolute inset-0 z-20 transition-opacity duration-250",
2461
- style: { opacity: u ? 1 : 0, backdropFilter: "blur(4px)", WebkitBackdropFilter: "blur(4px)" },
2505
+ style: { opacity: d ? 1 : 0, backdropFilter: "blur(4px)", WebkitBackdropFilter: "blur(4px)" },
2462
2506
  children: /* @__PURE__ */ e(
2463
2507
  "div",
2464
2508
  {
2465
2509
  className: "absolute inset-0 flex flex-col transition-transform duration-250 ease-out",
2466
- style: { background: "var(--t-modal-bg)", borderRadius: "var(--t-container-radius)", transform: u ? "translate(0)" : r === "right" ? "translateX(100%)" : "translateY(24px)" },
2467
- children: typeof n == "function" ? n(d) : n
2510
+ style: { background: "var(--t-modal-bg)", borderRadius: "var(--t-container-radius)", transform: d ? "translate(0)" : r === "right" ? "translateX(100%)" : "translateY(24px)" },
2511
+ children: typeof n == "function" ? n(u) : n
2468
2512
  }
2469
2513
  )
2470
2514
  }
@@ -2477,8 +2521,8 @@ function Q({
2477
2521
  }) {
2478
2522
  return /* @__PURE__ */ e("div", { className: `skeleton ${n}`, style: { width: t, height: a } });
2479
2523
  }
2480
- function In() {
2481
- const t = P();
2524
+ function Hn() {
2525
+ const t = O();
2482
2526
  return /* @__PURE__ */ i("div", { className: "flex-1 px-5 flex flex-col", children: [
2483
2527
  /* @__PURE__ */ i("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
2484
2528
  /* @__PURE__ */ e(Q, { w: 70, h: 14, className: "mb-3" }),
@@ -2507,30 +2551,30 @@ function In() {
2507
2551
  /* @__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") }) })
2508
2552
  ] });
2509
2553
  }
2510
- function Ra({
2554
+ function Aa({
2511
2555
  src: t,
2512
2556
  alt: a,
2513
2557
  size: n,
2514
2558
  className: r = "",
2515
2559
  background: o
2516
2560
  }) {
2517
- const [c, u] = w(!1), [l, d] = w(!1), s = M(t);
2518
- s.current !== t && (s.current = t, u(!1), d(!1));
2519
- const h = O(() => u(!0), []), p = O(() => d(!0), []);
2561
+ const [l, d] = w(!1), [c, u] = w(!1), s = I(t);
2562
+ s.current !== t && (s.current = t, d(!1), u(!1));
2563
+ const h = P(() => d(!0), []), m = P(() => u(!0), []);
2520
2564
  return /* @__PURE__ */ i(
2521
2565
  "div",
2522
2566
  {
2523
2567
  className: `relative rounded-full shrink-0 ${r}`,
2524
2568
  style: { width: n, height: n, background: o },
2525
2569
  children: [
2526
- !c && !l && /* @__PURE__ */ e(
2570
+ !l && !c && /* @__PURE__ */ e(
2527
2571
  "div",
2528
2572
  {
2529
2573
  className: "absolute inset-0 rounded-full animate-pulse",
2530
2574
  style: { background: "var(--t-pill-bg, #333)" }
2531
2575
  }
2532
2576
  ),
2533
- l ? /* @__PURE__ */ e(
2577
+ c ? /* @__PURE__ */ e(
2534
2578
  "div",
2535
2579
  {
2536
2580
  className: "absolute inset-0 rounded-full flex items-center justify-center font-bold",
@@ -2549,8 +2593,8 @@ function Ra({
2549
2593
  width: n,
2550
2594
  height: n,
2551
2595
  onLoad: h,
2552
- onError: p,
2553
- className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
2596
+ onError: m,
2597
+ className: `rounded-full ${l ? "opacity-100" : "opacity-0"}`,
2554
2598
  style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
2555
2599
  }
2556
2600
  )
@@ -2558,9 +2602,9 @@ function Ra({
2558
2602
  }
2559
2603
  );
2560
2604
  }
2561
- function Aa({ ticker: t, size: a = 32, baseUrl: n = "" }) {
2605
+ function Ra({ ticker: t, size: a = 32, baseUrl: n = "" }) {
2562
2606
  return /* @__PURE__ */ e(
2563
- Ra,
2607
+ Aa,
2564
2608
  {
2565
2609
  src: ka(t, n),
2566
2610
  alt: t,
@@ -2571,9 +2615,9 @@ function Aa({ ticker: t, size: a = 32, baseUrl: n = "" }) {
2571
2615
  }
2572
2616
  function jt({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
2573
2617
  return /* @__PURE__ */ e(
2574
- Ra,
2618
+ Aa,
2575
2619
  {
2576
- src: An(t, n),
2620
+ src: Un(t, n),
2577
2621
  alt: t,
2578
2622
  size: a
2579
2623
  }
@@ -2585,7 +2629,7 @@ function Ta({ size: t = 32, color: a = "#888" }) {
2585
2629
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "8", stroke: "white", strokeWidth: "1.5", fill: "none" })
2586
2630
  ] });
2587
2631
  }
2588
- function Mr({ size: t = 24 }) {
2632
+ function Pr({ size: t = 24 }) {
2589
2633
  return /* @__PURE__ */ e(
2590
2634
  "div",
2591
2635
  {
@@ -2602,7 +2646,7 @@ function Mr({ size: t = 24 }) {
2602
2646
  }
2603
2647
  );
2604
2648
  }
2605
- function Mn({ size: t = 32 }) {
2649
+ function Pn({ size: t = 32 }) {
2606
2650
  return /* @__PURE__ */ e(
2607
2651
  "div",
2608
2652
  {
@@ -2612,7 +2656,7 @@ function Mn({ size: t = 32 }) {
2612
2656
  }
2613
2657
  );
2614
2658
  }
2615
- function Dr({ size: t = 32 }) {
2659
+ function Or({ size: t = 32 }) {
2616
2660
  return /* @__PURE__ */ e(
2617
2661
  "div",
2618
2662
  {
@@ -2628,7 +2672,7 @@ function Dr({ size: t = 32 }) {
2628
2672
  }
2629
2673
  );
2630
2674
  }
2631
- function Br({ size: t = 32 }) {
2675
+ function Kr({ size: t = 32 }) {
2632
2676
  return /* @__PURE__ */ e(
2633
2677
  "div",
2634
2678
  {
@@ -2643,7 +2687,7 @@ function Br({ size: t = 32 }) {
2643
2687
  }
2644
2688
  );
2645
2689
  }
2646
- function Dn({ size: t = 32 }) {
2690
+ function On({ size: t = 32 }) {
2647
2691
  return /* @__PURE__ */ e(
2648
2692
  "div",
2649
2693
  {
@@ -2653,7 +2697,7 @@ function Dn({ size: t = 32 }) {
2653
2697
  }
2654
2698
  );
2655
2699
  }
2656
- function Bn({ size: t = 32 }) {
2700
+ function Kn({ size: t = 32 }) {
2657
2701
  return /* @__PURE__ */ e(
2658
2702
  "div",
2659
2703
  {
@@ -2669,7 +2713,7 @@ function Bn({ size: t = 32 }) {
2669
2713
  }
2670
2714
  );
2671
2715
  }
2672
- function Hn({ size: t = 32 }) {
2716
+ function _n({ size: t = 32 }) {
2673
2717
  const a = t * 0.8;
2674
2718
  return /* @__PURE__ */ e(
2675
2719
  "div",
@@ -2684,7 +2728,7 @@ function Hn({ size: t = 32 }) {
2684
2728
  }
2685
2729
  );
2686
2730
  }
2687
- function Hr({ size: t = 32 }) {
2731
+ function _r({ size: t = 32 }) {
2688
2732
  const a = t * 0.56, n = a * 0.65, r = Math.max(2, a * 0.1), o = a * 0.2;
2689
2733
  return /* @__PURE__ */ i("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
2690
2734
  /* @__PURE__ */ e(
@@ -2735,7 +2779,7 @@ function Hr({ size: t = 32 }) {
2735
2779
  )
2736
2780
  ] });
2737
2781
  }
2738
- function Pr({ size: t = 18 }) {
2782
+ function jr({ size: t = 18 }) {
2739
2783
  return /* @__PURE__ */ e(
2740
2784
  "div",
2741
2785
  {
@@ -2745,13 +2789,13 @@ function Pr({ size: t = 18 }) {
2745
2789
  }
2746
2790
  );
2747
2791
  }
2748
- function Re() {
2792
+ function Ae() {
2749
2793
  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" }) });
2750
2794
  }
2751
- function Pn() {
2795
+ function jn() {
2752
2796
  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" }) });
2753
2797
  }
2754
- function Or({ onClick: t }) {
2798
+ function Vr({ onClick: t }) {
2755
2799
  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(
2756
2800
  "path",
2757
2801
  {
@@ -2760,7 +2804,7 @@ function Or({ onClick: t }) {
2760
2804
  }
2761
2805
  ) }) });
2762
2806
  }
2763
- function Kr({ size: t = 40 }) {
2807
+ function Wr({ size: t = 40 }) {
2764
2808
  return /* @__PURE__ */ e(
2765
2809
  "div",
2766
2810
  {
@@ -2773,7 +2817,7 @@ function Kr({ size: t = 40 }) {
2773
2817
  }
2774
2818
  );
2775
2819
  }
2776
- function On({ size: t = 20 }) {
2820
+ function Vn({ size: t = 20 }) {
2777
2821
  const a = t * 0.6;
2778
2822
  return /* @__PURE__ */ e(
2779
2823
  "div",
@@ -2791,7 +2835,7 @@ function On({ size: t = 20 }) {
2791
2835
  }
2792
2836
  );
2793
2837
  }
2794
- function Kn({ size: t = 20 }) {
2838
+ function Wn({ size: t = 20 }) {
2795
2839
  const a = t * 0.6;
2796
2840
  return /* @__PURE__ */ e(
2797
2841
  "div",
@@ -2806,7 +2850,7 @@ function Kn({ size: t = 20 }) {
2806
2850
  }
2807
2851
  );
2808
2852
  }
2809
- function _n({ size: t = 20 }) {
2853
+ function Gn({ size: t = 20 }) {
2810
2854
  return /* @__PURE__ */ e(
2811
2855
  "div",
2812
2856
  {
@@ -2819,7 +2863,7 @@ function _n({ size: t = 20 }) {
2819
2863
  }
2820
2864
  );
2821
2865
  }
2822
- function jn({ size: t = 20 }) {
2866
+ function $n({ size: t = 20 }) {
2823
2867
  return /* @__PURE__ */ e(
2824
2868
  "div",
2825
2869
  {
@@ -2834,7 +2878,7 @@ function jn({ size: t = 20 }) {
2834
2878
  }
2835
2879
  );
2836
2880
  }
2837
- function _r({ size: t = 24 }) {
2881
+ function Gr({ size: t = 24 }) {
2838
2882
  const a = t * 1.15;
2839
2883
  return /* @__PURE__ */ i("svg", { width: a, height: t, viewBox: "0 0 48 32", fill: "none", preserveAspectRatio: "xMidYMid meet", children: [
2840
2884
  /* @__PURE__ */ e("path", { d: "M0 0H5.76C11.0619 0 15.36 4.47715 15.36 10V32H0V0Z", fill: "var(--t-text)" }),
@@ -2868,7 +2912,7 @@ function Ht({ size: t = 12 }) {
2868
2912
  }
2869
2913
  );
2870
2914
  }
2871
- function Vn({ onClick: t }) {
2915
+ function Zn({ onClick: t }) {
2872
2916
  return /* @__PURE__ */ e(
2873
2917
  "button",
2874
2918
  {
@@ -2883,67 +2927,67 @@ function Vn({ onClick: t }) {
2883
2927
  }
2884
2928
  );
2885
2929
  }
2886
- function jr({ size: t = 16 }) {
2930
+ function $r({ size: t = 16 }) {
2887
2931
  return /* @__PURE__ */ i("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", children: [
2888
2932
  /* @__PURE__ */ e("circle", { cx: "7", cy: "7", r: "5.25", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" }),
2889
2933
  /* @__PURE__ */ e("path", { d: "M11 11l3.5 3.5", stroke: "var(--t-text-secondary)", strokeWidth: "1.2", strokeLinecap: "round" })
2890
2934
  ] });
2891
2935
  }
2892
- function Vr({ size: t = 12 }) {
2936
+ function Zr({ size: t = 12 }) {
2893
2937
  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" }) });
2894
2938
  }
2895
- function Wn({ size: t = 14 }) {
2939
+ function Xn({ size: t = 14 }) {
2896
2940
  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" }) });
2897
2941
  }
2898
2942
  function Pt({ size: t = 12 }) {
2899
2943
  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" }) });
2900
2944
  }
2901
- function Gn(t, a = 32, n) {
2945
+ function Yn(t, a = 32, n) {
2902
2946
  switch (t) {
2903
2947
  case "bank":
2904
- return /* @__PURE__ */ e(On, { size: a });
2948
+ return /* @__PURE__ */ e(Vn, { size: a });
2905
2949
  case "card":
2906
- return /* @__PURE__ */ e(Kn, { size: a });
2950
+ return /* @__PURE__ */ e(Wn, { size: a });
2907
2951
  case "applepay":
2908
- return /* @__PURE__ */ e(_n, { size: a });
2952
+ return /* @__PURE__ */ e(Gn, { size: a });
2909
2953
  case "googlepay":
2910
- return /* @__PURE__ */ e(jn, { size: a });
2954
+ return /* @__PURE__ */ e($n, { size: a });
2911
2955
  case "revolut":
2912
- return /* @__PURE__ */ e(Mn, { size: a });
2956
+ return /* @__PURE__ */ e(Pn, { size: a });
2913
2957
  case "paypal":
2914
- return /* @__PURE__ */ e(Dn, { size: a });
2958
+ return /* @__PURE__ */ e(On, { size: a });
2915
2959
  case "visa":
2916
- return /* @__PURE__ */ e(Bn, { size: a });
2960
+ return /* @__PURE__ */ e(Kn, { size: a });
2917
2961
  case "mastercard":
2918
- return /* @__PURE__ */ e(Hn, { size: a });
2962
+ return /* @__PURE__ */ e(_n, { size: a });
2919
2963
  default:
2920
2964
  return /* @__PURE__ */ e(Ta, { size: a });
2921
2965
  }
2922
2966
  }
2923
- function $n({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
2924
- const [c, u] = w(!1), [l, d] = w(!1), s = O(() => {
2925
- d(!0), setTimeout(() => {
2926
- u(!1), d(!1), o();
2967
+ function Qn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
2968
+ const [l, d] = w(!1), [c, u] = w(!1), s = P(() => {
2969
+ u(!0), setTimeout(() => {
2970
+ d(!1), u(!1), o();
2927
2971
  }, 200);
2928
2972
  }, [o]);
2929
2973
  return U(() => {
2930
- r && (u(!0), d(!1));
2974
+ r && (d(!0), u(!1));
2931
2975
  }, [r]), U(() => {
2932
- if (!r || !c) return;
2933
- const p = setTimeout(s, 5e3);
2934
- return () => clearTimeout(p);
2935
- }, [r, c, s]), c ? /* @__PURE__ */ e(
2976
+ if (!r || !l) return;
2977
+ const m = setTimeout(s, 5e3);
2978
+ return () => clearTimeout(m);
2979
+ }, [r, l, s]), l ? /* @__PURE__ */ e(
2936
2980
  "div",
2937
2981
  {
2938
2982
  className: "absolute top-0 left-0 right-0 z-[25] px-3 pt-3",
2939
- style: { animation: l ? "slideUpToastOut 0.2s ease-in forwards" : "slideDownToast 0.3s ease-out both" },
2983
+ style: { animation: c ? "slideUpToastOut 0.2s ease-in forwards" : "slideDownToast 0.3s ease-out both" },
2940
2984
  children: /* @__PURE__ */ i(
2941
2985
  "div",
2942
2986
  {
2943
2987
  className: "flex items-start gap-2.5 rounded-2xl px-4 py-3",
2944
2988
  style: { background: t === "success" ? "var(--t-toast-success-bg)" : "var(--t-toast-error-bg)", color: "#ffffff" },
2945
2989
  children: [
2946
- /* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: t === "success" ? /* @__PURE__ */ e(Wn, { size: 14 }) : /* @__PURE__ */ e(Pt, { size: 12 }) }),
2990
+ /* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: t === "success" ? /* @__PURE__ */ e(Xn, { size: 14 }) : /* @__PURE__ */ e(Pt, { size: 12 }) }),
2947
2991
  /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
2948
2992
  /* @__PURE__ */ e("div", { className: "text-[13px] font-medium leading-tight", children: a }),
2949
2993
  n && /* @__PURE__ */ e("div", { className: "text-[12px] leading-snug mt-0.5 opacity-90", children: n })
@@ -2962,7 +3006,7 @@ function $n({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
2962
3006
  }
2963
3007
  ) : null;
2964
3008
  }
2965
- function Ae({ width: t = 46 }) {
3009
+ function Re({ width: t = 46 }) {
2966
3010
  const a = t * 0.8695652173913043;
2967
3011
  return /* @__PURE__ */ i("svg", { width: t, height: a, viewBox: "0 0 48 32", fill: "none", preserveAspectRatio: "xMidYMid meet", children: [
2968
3012
  /* @__PURE__ */ e("path", { d: "M0 0H5.76C11.0619 0 15.36 4.47715 15.36 10V32H0V0Z", fill: "var(--t-text)" }),
@@ -2970,17 +3014,17 @@ function Ae({ width: t = 46 }) {
2970
3014
  /* @__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)" })
2971
3015
  ] });
2972
3016
  }
2973
- function Zn() {
3017
+ function zn() {
2974
3018
  return /* @__PURE__ */ e(
2975
3019
  "div",
2976
3020
  {
2977
3021
  className: "flex-1 flex items-center justify-center",
2978
3022
  style: { animation: "fadeInScale 0.5s ease-out both" },
2979
- children: /* @__PURE__ */ e(Ae, { width: 90 })
3023
+ children: /* @__PURE__ */ e(Re, { width: 90 })
2980
3024
  }
2981
3025
  );
2982
3026
  }
2983
- function Xn({ isOpen: t, onClose: a, children: n }) {
3027
+ function Jn({ isOpen: t, onClose: a, children: n }) {
2984
3028
  return /* @__PURE__ */ i(G, { children: [
2985
3029
  /* @__PURE__ */ e(
2986
3030
  "div",
@@ -3081,58 +3125,58 @@ function Ye({
3081
3125
  }
3082
3126
  );
3083
3127
  }
3084
- const Yn = ["USD", "EUR", "GBP"];
3085
- function Qn({
3128
+ const qn = ["USD", "EUR", "GBP"];
3129
+ function er({
3086
3130
  onClose: t,
3087
3131
  onSelect: a,
3088
3132
  currencies: n,
3089
3133
  assetBaseUrl: r = "",
3090
3134
  selectedCode: o
3091
3135
  }) {
3092
- const c = P(), [u, l] = w(""), d = V(() => {
3136
+ const l = O(), [d, c] = w(""), u = j(() => {
3093
3137
  if (!n || n.length === 0) return ca;
3094
- const h = new Map(ca.map((p) => [p.code, p.name]));
3095
- return n.map((p) => ({
3096
- code: p.code,
3097
- name: p.name || h.get(p.code) || p.code
3138
+ const h = new Map(ca.map((m) => [m.code, m.name]));
3139
+ return n.map((m) => ({
3140
+ code: m.code,
3141
+ name: m.name || h.get(m.code) || m.code
3098
3142
  }));
3099
- }, [n]), s = V(() => {
3100
- const h = u.trim().toLowerCase();
3143
+ }, [n]), s = j(() => {
3144
+ const h = d.trim().toLowerCase();
3101
3145
  if (!h) {
3102
3146
  if (o) {
3103
- const p = d.find((f) => f.code === o);
3104
- if (p) {
3105
- const f = d.filter((g) => g.code !== o);
3106
- return [p, ...f];
3147
+ const m = u.find((f) => f.code === o);
3148
+ if (m) {
3149
+ const f = u.filter((g) => g.code !== o);
3150
+ return [m, ...f];
3107
3151
  }
3108
3152
  }
3109
- return d;
3153
+ return u;
3110
3154
  }
3111
- return d.filter(
3112
- (p) => p.code.toLowerCase().includes(h) || p.name.toLowerCase().includes(h)
3155
+ return u.filter(
3156
+ (m) => m.code.toLowerCase().includes(h) || m.name.toLowerCase().includes(h)
3113
3157
  );
3114
- }, [d, u, o]);
3158
+ }, [u, d, o]);
3115
3159
  return /* @__PURE__ */ i(G, { children: [
3116
3160
  /* @__PURE__ */ i("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: [
3117
- /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
3118
- /* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: c("modal.selectFiat") }),
3161
+ /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Re, { width: 46 }) }),
3162
+ /* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: l("modal.selectFiat") }),
3119
3163
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Oe, { onClick: t }) }),
3120
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: u, onChange: l, inline: !0 }) })
3164
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: d, onChange: c, inline: !0 }) })
3121
3165
  ] }),
3122
3166
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3123
- s.map((h, p) => {
3167
+ s.map((h, m) => {
3124
3168
  const f = o === h.code;
3125
3169
  return /* @__PURE__ */ i(
3126
3170
  "button",
3127
3171
  {
3128
3172
  onClick: () => a(h.code),
3129
3173
  className: "flex items-center w-full card-press hover-item modal-item-in",
3130
- style: { gap: 16, animationDelay: `${Math.min(p * 45, 350)}ms` },
3174
+ style: { gap: 16, animationDelay: `${Math.min(m * 45, 350)}ms` },
3131
3175
  children: [
3132
3176
  /* @__PURE__ */ e(jt, { currencyCode: h.code, size: 32, baseUrl: r }),
3133
3177
  /* @__PURE__ */ i("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
3134
3178
  /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: h.code }),
3135
- Yn.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: c("modal.popular") }),
3179
+ qn.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: l("modal.popular") }),
3136
3180
  f && /* @__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(
3137
3181
  "path",
3138
3182
  {
@@ -3149,24 +3193,24 @@ function Qn({
3149
3193
  h.code
3150
3194
  );
3151
3195
  }),
3152
- s.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: c("modal.noCurrencies") })
3196
+ s.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: l("modal.noCurrencies") })
3153
3197
  ] })
3154
3198
  ] });
3155
3199
  }
3156
3200
  const ha = ["BTC", "ETH", "SOL"];
3157
3201
  function fa({ src: t, alt: a, size: n, className: r, style: o }) {
3158
- const [c, u] = w(!1), [l, d] = w(!1), s = M(t);
3159
- s.current !== t && (s.current = t, u(!1), d(!1));
3160
- const h = O(() => u(!0), []), p = O(() => d(!0), []);
3202
+ const [l, d] = w(!1), [c, u] = w(!1), s = I(t);
3203
+ s.current !== t && (s.current = t, d(!1), u(!1));
3204
+ const h = P(() => d(!0), []), m = P(() => u(!0), []);
3161
3205
  return /* @__PURE__ */ i("div", { className: r, style: { ...o, width: n, height: n, position: "relative" }, children: [
3162
- !c && !l && /* @__PURE__ */ e(
3206
+ !l && !c && /* @__PURE__ */ e(
3163
3207
  "div",
3164
3208
  {
3165
3209
  className: "absolute inset-0 rounded-full animate-pulse",
3166
3210
  style: { background: "var(--t-pill-bg, #333)" }
3167
3211
  }
3168
3212
  ),
3169
- l ? /* @__PURE__ */ e(
3213
+ c ? /* @__PURE__ */ e(
3170
3214
  "div",
3171
3215
  {
3172
3216
  className: "absolute inset-0 rounded-full flex items-center justify-center text-[10px] font-bold",
@@ -3181,27 +3225,27 @@ function fa({ src: t, alt: a, size: n, className: r, style: o }) {
3181
3225
  width: n,
3182
3226
  height: n,
3183
3227
  onLoad: h,
3184
- onError: p,
3185
- className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
3228
+ onError: m,
3229
+ className: `rounded-full ${l ? "opacity-100" : "opacity-0"}`,
3186
3230
  style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
3187
3231
  }
3188
3232
  )
3189
3233
  ] });
3190
3234
  }
3191
- function zn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: c }) {
3192
- const u = P(), [l, d] = w(""), s = V(() => {
3193
- if (!n || n.length === 0) return Fn;
3235
+ function tr({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: l }) {
3236
+ const d = O(), [c, u] = w(""), s = j(() => {
3237
+ if (!n || n.length === 0) return Dn;
3194
3238
  const f = [];
3195
3239
  for (const g of n) {
3196
- const k = g.networks || [], R = g.name || En[g.code] || g.code;
3240
+ const k = g.networks || [], A = g.name || Ln[g.code] || g.code;
3197
3241
  if (k.length === 0)
3198
- f.push({ code: g.code, name: R, chain: g.code, popular: ha.includes(g.code) });
3242
+ f.push({ code: g.code, name: A, chain: g.code, popular: ha.includes(g.code) });
3199
3243
  else
3200
3244
  for (const y of k) {
3201
3245
  const N = y.code || y.id || y.name || g.code;
3202
3246
  f.push({
3203
3247
  code: g.code,
3204
- name: R,
3248
+ name: A,
3205
3249
  chain: N,
3206
3250
  chainName: y.name,
3207
3251
  popular: ha.includes(g.code)
@@ -3209,14 +3253,14 @@ function zn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
3209
3253
  }
3210
3254
  }
3211
3255
  return f;
3212
- }, [n]), h = O((f, g) => o === f && c === g, [o, c]), p = V(() => {
3213
- var R;
3214
- const f = l.trim().toLowerCase();
3256
+ }, [n]), h = P((f, g) => o === f && l === g, [o, l]), m = j(() => {
3257
+ var A;
3258
+ const f = c.trim().toLowerCase();
3215
3259
  if (!f) {
3216
- if (o && c) {
3217
- const y = s.find((N) => N.code === o && N.chain === c);
3260
+ if (o && l) {
3261
+ const y = s.find((N) => N.code === o && N.chain === l);
3218
3262
  if (y) {
3219
- const N = s.filter((K) => !(K.code === o && K.chain === c));
3263
+ const N = s.filter((K) => !(K.code === o && K.chain === l));
3220
3264
  return [y, ...N];
3221
3265
  }
3222
3266
  }
@@ -3224,23 +3268,23 @@ function zn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
3224
3268
  }
3225
3269
  const g = f.split(/\s+/), k = [];
3226
3270
  for (const y of s) {
3227
- const N = yt(y.chain), K = N ? N.name.toLowerCase() : "", z = ((R = N == null ? void 0 : N.shortName) == null ? void 0 : R.toLowerCase()) || "", J = y.chain.toLowerCase(), ie = y.code.toLowerCase(), q = y.name.toLowerCase(), te = [ie, q, K, z, J];
3271
+ const N = yt(y.chain), K = N ? N.name.toLowerCase() : "", z = ((A = N == null ? void 0 : N.shortName) == null ? void 0 : A.toLowerCase()) || "", J = y.chain.toLowerCase(), ie = y.code.toLowerCase(), q = y.name.toLowerCase(), te = [ie, q, K, z, J];
3228
3272
  if (!g.every((L) => te.some((C) => C.includes(L)))) continue;
3229
3273
  let ae = 0;
3230
3274
  ie === f ? ae += 100 : ie.startsWith(g[0]) && (ae += 50), y.popular && (ae += 10), g.length > 1 && (K.includes(g[1]) || z.includes(g[1]) || J.includes(g[1])) && (ae += 25), k.push({ item: y, score: ae });
3231
3275
  }
3232
3276
  return k.sort((y, N) => N.score - y.score), k.map((y) => y.item);
3233
- }, [s, l, o, c]);
3277
+ }, [s, c, o, l]);
3234
3278
  return /* @__PURE__ */ i(G, { children: [
3235
3279
  /* @__PURE__ */ i("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: [
3236
- /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
3237
- /* @__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") }),
3280
+ /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Re, { width: 46 }) }),
3281
+ /* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: d("modal.selectCrypto") }),
3238
3282
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Oe, { onClick: t }) }),
3239
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: l, onChange: d, inline: !0 }) })
3283
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: c, onChange: u, inline: !0 }) })
3240
3284
  ] }),
3241
3285
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3242
- p.map((f, g) => {
3243
- const k = yt(f.chain), R = (k == null ? void 0 : k.name) || f.chainName || f.chain, y = h(f.code, f.chain);
3286
+ m.map((f, g) => {
3287
+ const k = yt(f.chain), A = (k == null ? void 0 : k.name) || f.chainName || f.chain, y = h(f.code, f.chain);
3244
3288
  return /* @__PURE__ */ i(
3245
3289
  "button",
3246
3290
  {
@@ -3288,8 +3332,8 @@ function zn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
3288
3332
  ] }),
3289
3333
  /* @__PURE__ */ i("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
3290
3334
  /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: f.code }),
3291
- /* @__PURE__ */ e("span", { className: "text-[15px]", style: { color: "var(--t-text-secondary)" }, children: R }),
3292
- f.popular && /* @__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: u("modal.popular") }),
3335
+ /* @__PURE__ */ e("span", { className: "text-[15px]", style: { color: "var(--t-text-secondary)" }, children: A }),
3336
+ f.popular && /* @__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: d("modal.popular") }),
3293
3337
  y && /* @__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(
3294
3338
  "path",
3295
3339
  {
@@ -3306,11 +3350,11 @@ function zn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
3306
3350
  `${f.code}-${f.chain}`
3307
3351
  );
3308
3352
  }),
3309
- p.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: u("modal.noCurrencies") })
3353
+ m.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: d("modal.noCurrencies") })
3310
3354
  ] })
3311
3355
  ] });
3312
3356
  }
3313
- const Jn = {
3357
+ const ar = {
3314
3358
  "debit-credit-card": "card",
3315
3359
  "bank-transfer": "bank",
3316
3360
  "ach-bank-transfer": "bank",
@@ -3321,17 +3365,17 @@ const Jn = {
3321
3365
  "google-pay": "googlepay",
3322
3366
  paypal: "paypal",
3323
3367
  revolut: "revolut"
3324
- }, qn = {
3368
+ }, nr = {
3325
3369
  "debit-credit-card": "payment.name.card",
3326
3370
  "bank-transfer": "payment.name.bankTransfer",
3327
3371
  "ach-bank-transfer": "payment.name.ach"
3328
- }, er = {
3372
+ }, rr = {
3329
3373
  "apple-pay": "Apple Pay",
3330
3374
  "google-pay": "Google Pay",
3331
3375
  "payid-bank-transfer": "PayID",
3332
3376
  paypal: "PayPal",
3333
3377
  revolut: "Revolut"
3334
- }, tr = {
3378
+ }, or = {
3335
3379
  "sepa-bank-transfer": "SEPA",
3336
3380
  sepa: "SEPA",
3337
3381
  "bank-transfer": "Bank",
@@ -3339,33 +3383,33 @@ const Jn = {
3339
3383
  };
3340
3384
  function Vt(t, a, n, r = !1) {
3341
3385
  if (r) {
3342
- const u = tr[t];
3343
- if (u) return u;
3386
+ const d = or[t];
3387
+ if (d) return d;
3344
3388
  }
3345
- const o = er[t];
3389
+ const o = rr[t];
3346
3390
  if (o) return o;
3347
- const c = qn[t];
3348
- return c && n ? n(c) : c && {
3391
+ const l = nr[t];
3392
+ return l && n ? n(l) : l && {
3349
3393
  "debit-credit-card": "Card",
3350
3394
  "bank-transfer": "Bank Transfer",
3351
3395
  "ach-bank-transfer": "ACH"
3352
3396
  }[t] || a;
3353
3397
  }
3354
3398
  function Wt(t, a, n = 24) {
3355
- const r = Jn[t];
3356
- return r ? Gn(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(Ta, { size: n });
3399
+ const r = ar[t];
3400
+ return r ? Yn(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(Ta, { size: n });
3357
3401
  }
3358
- function Wr({
3402
+ function Xr({
3359
3403
  methods: t,
3360
3404
  selectedId: a,
3361
3405
  onOpenModal: n,
3362
3406
  fiatCurrency: r
3363
3407
  }) {
3364
- const o = P(), c = V(
3365
- () => t.filter((l) => l.supportedFiats.includes(r)),
3408
+ const o = O(), l = j(
3409
+ () => t.filter((c) => c.supportedFiats.includes(r)),
3366
3410
  [t, r]
3367
- ), u = c.find((l) => l.id === a) || c[0];
3368
- return c.length === 0 ? /* @__PURE__ */ e(
3411
+ ), d = l.find((c) => c.id === a) || l[0];
3412
+ return l.length === 0 ? /* @__PURE__ */ e(
3369
3413
  "div",
3370
3414
  {
3371
3415
  className: "flex items-center justify-between px-[18px] pt-[12px] pb-[14px]",
@@ -3382,8 +3426,8 @@ function Wr({
3382
3426
  role: "button",
3383
3427
  tabIndex: 0,
3384
3428
  onClick: n,
3385
- onKeyDown: (l) => {
3386
- (l.key === "Enter" || l.key === " ") && n();
3429
+ onKeyDown: (c) => {
3430
+ (c.key === "Enter" || c.key === " ") && n();
3387
3431
  },
3388
3432
  className: "flex items-center justify-between w-full px-[18px] transition-colors",
3389
3433
  style: {
@@ -3396,28 +3440,28 @@ function Wr({
3396
3440
  children: [
3397
3441
  /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: o("payment.label") }),
3398
3442
  /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
3399
- /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: u && Wt(u.id, u.icon, 20) }),
3400
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: u ? Vt(u.id, u.name, o) : o("payment.select") }),
3401
- /* @__PURE__ */ e(Re, {})
3443
+ /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: d && Wt(d.id, d.icon, 20) }),
3444
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: d ? Vt(d.id, d.name, o) : o("payment.select") }),
3445
+ /* @__PURE__ */ e(Ae, {})
3402
3446
  ] })
3403
3447
  ]
3404
3448
  }
3405
3449
  ) });
3406
3450
  }
3407
- function ar({
3451
+ function ir({
3408
3452
  methods: t,
3409
3453
  selectedId: a,
3410
3454
  onSelect: n,
3411
3455
  onClose: r
3412
3456
  }) {
3413
- const o = P(), [c, u] = w(""), l = t.length > 0 ? t[0].id : "", d = V(() => {
3414
- const s = c.trim().toLowerCase();
3457
+ const o = O(), [l, d] = w(""), c = t.length > 0 ? t[0].id : "", u = j(() => {
3458
+ const s = l.trim().toLowerCase();
3415
3459
  if (!s) {
3416
3460
  if (a) {
3417
- const h = t.find((p) => p.id === a);
3461
+ const h = t.find((m) => m.id === a);
3418
3462
  if (h) {
3419
- const p = t.filter((f) => f.id !== a);
3420
- return [h, ...p];
3463
+ const m = t.filter((f) => f.id !== a);
3464
+ return [h, ...m];
3421
3465
  }
3422
3466
  }
3423
3467
  return t;
@@ -3425,17 +3469,17 @@ function ar({
3425
3469
  return t.filter(
3426
3470
  (h) => h.id.toLowerCase().includes(s) || h.name.toLowerCase().includes(s) || h.description && h.description.toLowerCase().includes(s)
3427
3471
  );
3428
- }, [t, c, a]);
3472
+ }, [t, l, a]);
3429
3473
  return /* @__PURE__ */ i(G, { children: [
3430
3474
  /* @__PURE__ */ i("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: [
3431
- /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
3475
+ /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Re, { width: 46 }) }),
3432
3476
  /* @__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") }),
3433
3477
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Oe, { onClick: r }) }),
3434
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: c, onChange: u, inline: !0 }) })
3478
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: l, onChange: d, inline: !0 }) })
3435
3479
  ] }),
3436
3480
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3437
- d.map((s, h) => {
3438
- const p = s.id === a, f = Vt(s.id, s.name, o);
3481
+ u.map((s, h) => {
3482
+ const m = s.id === a, f = Vt(s.id, s.name, o);
3439
3483
  return /* @__PURE__ */ i(
3440
3484
  "button",
3441
3485
  {
@@ -3453,8 +3497,8 @@ function ar({
3453
3497
  ),
3454
3498
  /* @__PURE__ */ i("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
3455
3499
  /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: f }),
3456
- s.id === l && /* @__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") }),
3457
- 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(
3500
+ s.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") }),
3501
+ m && /* @__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(
3458
3502
  "path",
3459
3503
  {
3460
3504
  d: "M13.5 4.5L6 12L2.5 8.5",
@@ -3470,11 +3514,11 @@ function ar({
3470
3514
  s.id
3471
3515
  );
3472
3516
  }),
3473
- d.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: o("modal.noPaymentMethods") })
3517
+ u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: o("modal.noPaymentMethods") })
3474
3518
  ] })
3475
3519
  ] });
3476
3520
  }
3477
- function nr({
3521
+ function lr({
3478
3522
  checked: t,
3479
3523
  onChange: a,
3480
3524
  accentColor: n
@@ -3506,70 +3550,70 @@ function nr({
3506
3550
  }
3507
3551
  );
3508
3552
  }
3509
- const rr = [
3553
+ const cr = [
3510
3554
  { key: "settings.privacy", href: "https://nowramp.com/privacy-policy" },
3511
3555
  { key: "settings.terms", href: "https://nowramp.com/terms-and-conditions" }
3512
3556
  ], ht = {
3513
3557
  background: "var(--t-surface)",
3514
3558
  borderRadius: "var(--t-card-radius)"
3515
3559
  };
3516
- function or({
3560
+ function sr({
3517
3561
  onClose: t,
3518
3562
  darkMode: a,
3519
3563
  onToggleDarkMode: n,
3520
3564
  skinId: r,
3521
3565
  onSelectSkin: o,
3522
- showThemeToggle: c = !0,
3523
- country: u,
3524
- countryName: l,
3525
- onLocationPress: d,
3566
+ showThemeToggle: l = !0,
3567
+ country: d,
3568
+ countryName: c,
3569
+ onLocationPress: u,
3526
3570
  onLanguagePress: s,
3527
3571
  assetBaseUrl: h = ""
3528
3572
  }) {
3529
3573
  var y;
3530
- const { t: p, locale: f, languages: g } = _t(), [k, R] = w(!1);
3574
+ const { t: m, locale: f, languages: g } = _t(), [k, A] = w(!1);
3531
3575
  return /* @__PURE__ */ i(G, { children: [
3532
3576
  /* @__PURE__ */ i("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: [
3533
- /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
3577
+ /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Re, { width: 46 }) }),
3534
3578
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Oe, { onClick: t }) })
3535
3579
  ] }),
3536
3580
  /* @__PURE__ */ i("div", { className: "px-3 flex-1 pt-4 overflow-y-auto custom-scroll", style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
3537
- d && /* @__PURE__ */ i(
3581
+ u && /* @__PURE__ */ i(
3538
3582
  "button",
3539
3583
  {
3540
- onClick: d,
3584
+ onClick: u,
3541
3585
  className: "w-full text-left transition-colors card-press modal-item-in",
3542
3586
  style: { ...ht, backgroundColor: "var(--t-surface)", color: "inherit", border: "none", cursor: "pointer", padding: "12px 16px" },
3543
3587
  children: [
3544
- /* @__PURE__ */ e("span", { className: "text-[13px] block mb-1.5", style: { color: "var(--t-text-secondary)" }, children: p("settings.location") }),
3588
+ /* @__PURE__ */ e("span", { className: "text-[13px] block mb-1.5", style: { color: "var(--t-text-secondary)" }, children: m("settings.location") }),
3545
3589
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
3546
3590
  /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
3547
- u && !k ? /* @__PURE__ */ e(
3591
+ d && !k ? /* @__PURE__ */ e(
3548
3592
  "img",
3549
3593
  {
3550
- src: `${h}/flags/${u.toLowerCase()}.svg`,
3551
- alt: u,
3594
+ src: `${h}/flags/${d.toLowerCase()}.svg`,
3595
+ alt: d,
3552
3596
  width: 28,
3553
3597
  height: 28,
3554
3598
  style: { width: 28, height: 28, borderRadius: "50%", objectFit: "cover" },
3555
- onError: () => R(!0)
3599
+ onError: () => A(!0)
3556
3600
  }
3557
- ) : /* @__PURE__ */ e(ir, { size: 28 }),
3558
- /* @__PURE__ */ e("span", { className: "text-[15px] font-medium", style: { color: "var(--t-text)" }, children: l || u })
3601
+ ) : /* @__PURE__ */ e(dr, { size: 28 }),
3602
+ /* @__PURE__ */ e("span", { className: "text-[15px] font-medium", style: { color: "var(--t-text)" }, children: c || d })
3559
3603
  ] }),
3560
- /* @__PURE__ */ e(Re, {})
3604
+ /* @__PURE__ */ e(Ae, {})
3561
3605
  ] })
3562
3606
  ]
3563
3607
  }
3564
3608
  ),
3565
- c && /* @__PURE__ */ i(
3609
+ l && /* @__PURE__ */ i(
3566
3610
  "div",
3567
3611
  {
3568
3612
  className: "flex items-center justify-between w-full px-4 modal-item-in",
3569
3613
  style: { ...ht, paddingTop: 14, paddingBottom: 14, animationDelay: "60ms" },
3570
3614
  children: [
3571
- /* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p("settings.darkMode") }),
3572
- /* @__PURE__ */ e(nr, { checked: a, onChange: n })
3615
+ /* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: m("settings.darkMode") }),
3616
+ /* @__PURE__ */ e(lr, { checked: a, onChange: n })
3573
3617
  ]
3574
3618
  }
3575
3619
  ),
@@ -3580,12 +3624,12 @@ function or({
3580
3624
  className: "flex items-center justify-between w-full transition-colors card-press modal-item-in",
3581
3625
  style: { ...ht, backgroundColor: "var(--t-surface)", color: "inherit", border: "none", cursor: "pointer", padding: "14px 16px", margin: 0, textAlign: "left", animationDelay: "120ms" },
3582
3626
  children: [
3583
- /* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p("settings.language") }),
3627
+ /* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: m("settings.language") }),
3584
3628
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: ((y = g.find((N) => N.code === f)) == null ? void 0 : y.name) || f })
3585
3629
  ]
3586
3630
  }
3587
3631
  ),
3588
- rr.map((N, K) => /* @__PURE__ */ i(
3632
+ cr.map((N, K) => /* @__PURE__ */ i(
3589
3633
  "a",
3590
3634
  {
3591
3635
  href: N.href,
@@ -3594,8 +3638,8 @@ function or({
3594
3638
  className: "flex items-center justify-between w-full px-4 transition-colors card-press modal-item-in",
3595
3639
  style: { ...ht, textDecoration: "none", color: "inherit", paddingTop: 14, paddingBottom: 14, animationDelay: `${180 + K * 60}ms` },
3596
3640
  children: [
3597
- /* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p(N.key) }),
3598
- /* @__PURE__ */ e(Pn, {})
3641
+ /* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: m(N.key) }),
3642
+ /* @__PURE__ */ e(jn, {})
3599
3643
  ]
3600
3644
  },
3601
3645
  N.key
@@ -3603,7 +3647,7 @@ function or({
3603
3647
  ] })
3604
3648
  ] });
3605
3649
  }
3606
- function ir({ size: t = 28 }) {
3650
+ function dr({ size: t = 28 }) {
3607
3651
  return /* @__PURE__ */ i("svg", { width: t, height: t, viewBox: "0 0 40 40", fill: "none", children: [
3608
3652
  /* @__PURE__ */ e("circle", { cx: "20", cy: "20", r: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
3609
3653
  /* @__PURE__ */ e("ellipse", { cx: "20", cy: "20", rx: "9", ry: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
@@ -3611,48 +3655,48 @@ function ir({ size: t = 28 }) {
3611
3655
  /* @__PURE__ */ e("path", { d: "M5 12h30M5 28h30", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" })
3612
3656
  ] });
3613
3657
  }
3614
- function lr({
3658
+ function ur({
3615
3659
  onClose: t,
3616
3660
  onSelect: a,
3617
3661
  assetBaseUrl: n = "",
3618
3662
  selectedCode: r
3619
3663
  }) {
3620
- const o = P(), [c, u] = w(""), l = V(() => {
3621
- const d = c.trim().toLowerCase();
3622
- if (!d) {
3664
+ const o = O(), [l, d] = w(""), c = j(() => {
3665
+ const u = l.trim().toLowerCase();
3666
+ if (!u) {
3623
3667
  if (r) {
3624
3668
  const s = r.toLowerCase(), h = Ot[s];
3625
3669
  if (h) {
3626
- const p = ft.filter((f) => f.code !== s);
3627
- return [h, ...p];
3670
+ const m = ft.filter((f) => f.code !== s);
3671
+ return [h, ...m];
3628
3672
  }
3629
3673
  }
3630
3674
  return ft;
3631
3675
  }
3632
3676
  return ft.filter(
3633
- (s) => s.name.toLowerCase().includes(d) || s.code.includes(d) || s.defaultFiat.toLowerCase().includes(d)
3677
+ (s) => s.name.toLowerCase().includes(u) || s.code.includes(u) || s.defaultFiat.toLowerCase().includes(u)
3634
3678
  );
3635
- }, [c, r]);
3679
+ }, [l, r]);
3636
3680
  return /* @__PURE__ */ i(G, { children: [
3637
3681
  /* @__PURE__ */ i("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: [
3638
- /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
3682
+ /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Re, { width: 46 }) }),
3639
3683
  /* @__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") }),
3640
3684
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Oe, { onClick: t }) }),
3641
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: c, onChange: u, inline: !0 }) })
3685
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: l, onChange: d, inline: !0 }) })
3642
3686
  ] }),
3643
3687
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3644
- l.map((d, s) => {
3645
- const h = (r == null ? void 0 : r.toLowerCase()) === d.code;
3688
+ c.map((u, s) => {
3689
+ const h = (r == null ? void 0 : r.toLowerCase()) === u.code;
3646
3690
  return /* @__PURE__ */ i(
3647
3691
  "button",
3648
3692
  {
3649
- onClick: () => a(d.code),
3693
+ onClick: () => a(u.code),
3650
3694
  className: "flex items-center w-full card-press hover-item modal-item-in",
3651
3695
  style: { gap: 16, animationDelay: `${Math.min(s * 45, 350)}ms` },
3652
3696
  children: [
3653
- /* @__PURE__ */ e(cr, { code: d.code, size: 32, baseUrl: n }),
3697
+ /* @__PURE__ */ e(mr, { code: u.code, size: 32, baseUrl: n }),
3654
3698
  /* @__PURE__ */ i("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
3655
- /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: d.name }),
3699
+ /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: u.name }),
3656
3700
  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(
3657
3701
  "path",
3658
3702
  {
@@ -3666,14 +3710,14 @@ function lr({
3666
3710
  ] })
3667
3711
  ]
3668
3712
  },
3669
- d.code
3713
+ u.code
3670
3714
  );
3671
3715
  }),
3672
- l.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: o("modal.noCountries") })
3716
+ c.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: o("modal.noCountries") })
3673
3717
  ] })
3674
3718
  ] });
3675
3719
  }
3676
- function cr({ code: t, size: a = 32, baseUrl: n = "" }) {
3720
+ function mr({ code: t, size: a = 32, baseUrl: n = "" }) {
3677
3721
  const [r, o] = w(!1);
3678
3722
  return r ? /* @__PURE__ */ e(
3679
3723
  "div",
@@ -3703,46 +3747,46 @@ function cr({ code: t, size: a = 32, baseUrl: n = "" }) {
3703
3747
  }
3704
3748
  );
3705
3749
  }
3706
- function sr({
3750
+ function pr({
3707
3751
  onClose: t,
3708
3752
  onSelect: a,
3709
3753
  selectedCode: n
3710
3754
  }) {
3711
- const r = P(), [o, c] = w(""), u = V(() => {
3712
- const l = o.trim().toLowerCase();
3713
- if (!l) {
3755
+ const r = O(), [o, l] = w(""), d = j(() => {
3756
+ const c = o.trim().toLowerCase();
3757
+ if (!c) {
3714
3758
  if (n) {
3715
- const d = Ze.find((s) => s.code === n);
3716
- if (d) {
3759
+ const u = Ze.find((s) => s.code === n);
3760
+ if (u) {
3717
3761
  const s = Ze.filter((h) => h.code !== n);
3718
- return [d, ...s];
3762
+ return [u, ...s];
3719
3763
  }
3720
3764
  }
3721
3765
  return Ze;
3722
3766
  }
3723
3767
  return Ze.filter(
3724
- (d) => d.name.toLowerCase().includes(l) || d.english.toLowerCase().includes(l) || d.code.includes(l)
3768
+ (u) => u.name.toLowerCase().includes(c) || u.english.toLowerCase().includes(c) || u.code.includes(c)
3725
3769
  );
3726
3770
  }, [o, n]);
3727
3771
  return /* @__PURE__ */ i(G, { children: [
3728
3772
  /* @__PURE__ */ i("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: [
3729
- /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
3773
+ /* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Re, { width: 46 }) }),
3730
3774
  /* @__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") }),
3731
3775
  /* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Oe, { onClick: t }) }),
3732
- /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: o, onChange: c, inline: !0 }) })
3776
+ /* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: o, onChange: l, inline: !0 }) })
3733
3777
  ] }),
3734
3778
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
3735
- u.map((l, d) => {
3736
- const s = n === l.code;
3779
+ d.map((c, u) => {
3780
+ const s = n === c.code;
3737
3781
  return /* @__PURE__ */ e(
3738
3782
  "button",
3739
3783
  {
3740
- onClick: () => a(l.code),
3784
+ onClick: () => a(c.code),
3741
3785
  className: "flex items-center w-full card-press hover-item modal-item-in",
3742
- style: { gap: 16, animationDelay: `${Math.min(d * 45, 350)}ms` },
3786
+ style: { gap: 16, animationDelay: `${Math.min(u * 45, 350)}ms` },
3743
3787
  children: /* @__PURE__ */ i("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, paddingLeft: 4, gap: 10 }, children: [
3744
- /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: l.name }),
3745
- /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-muted)" }, children: l.english }),
3788
+ /* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: c.name }),
3789
+ /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-muted)" }, children: c.english }),
3746
3790
  s && /* @__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(
3747
3791
  "path",
3748
3792
  {
@@ -3755,21 +3799,21 @@ function sr({
3755
3799
  ) }) })
3756
3800
  ] })
3757
3801
  },
3758
- l.code
3802
+ c.code
3759
3803
  );
3760
3804
  }),
3761
- u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: r("modal.noLanguages") })
3805
+ d.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: r("modal.noLanguages") })
3762
3806
  ] })
3763
3807
  ] });
3764
3808
  }
3765
- function dr({
3809
+ function hr({
3766
3810
  tab: t,
3767
3811
  onTabSwitch: a,
3768
3812
  showFlowToggle: n,
3769
3813
  showSettings: r,
3770
3814
  onOpenSettings: o
3771
3815
  }) {
3772
- const c = P();
3816
+ const l = O();
3773
3817
  return /* @__PURE__ */ i(
3774
3818
  "div",
3775
3819
  {
@@ -3781,7 +3825,7 @@ function dr({
3781
3825
  WebkitBackdropFilter: "blur(var(--t-header-blur))"
3782
3826
  },
3783
3827
  children: [
3784
- /* @__PURE__ */ e("div", { style: { width: 46, display: "flex", alignItems: "center", justifyContent: "flex-start" }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
3828
+ /* @__PURE__ */ e("div", { style: { width: 46, display: "flex", alignItems: "center", justifyContent: "flex-start" }, children: /* @__PURE__ */ e(Re, { width: 46 }) }),
3785
3829
  n ? /* @__PURE__ */ i(
3786
3830
  "div",
3787
3831
  {
@@ -3823,7 +3867,7 @@ function dr({
3823
3867
  borderRadius: "var(--t-pill-radius)",
3824
3868
  color: t === "buy" ? "var(--t-tab-active-text)" : "var(--t-tab-inactive-text)"
3825
3869
  },
3826
- children: c("header.buy")
3870
+ children: l("header.buy")
3827
3871
  }
3828
3872
  ),
3829
3873
  /* @__PURE__ */ e(
@@ -3839,36 +3883,36 @@ function dr({
3839
3883
  borderRadius: "var(--t-pill-radius)",
3840
3884
  color: t === "sell" ? "var(--t-tab-active-text)" : "var(--t-tab-inactive-text)"
3841
3885
  },
3842
- children: c("header.sell")
3886
+ children: l("header.sell")
3843
3887
  }
3844
3888
  )
3845
3889
  ]
3846
3890
  }
3847
3891
  ) : /* @__PURE__ */ e("div", {}),
3848
- /* @__PURE__ */ e("div", { style: { width: 40, display: "flex", alignItems: "center", justifyContent: "flex-end" }, children: r ? /* @__PURE__ */ e(Vn, { onClick: o }) : /* @__PURE__ */ e("div", { style: { width: 40 } }) })
3892
+ /* @__PURE__ */ e("div", { style: { width: 40, display: "flex", alignItems: "center", justifyContent: "flex-end" }, children: r ? /* @__PURE__ */ e(Zn, { onClick: o }) : /* @__PURE__ */ e("div", { style: { width: 40 } }) })
3849
3893
  ]
3850
3894
  }
3851
3895
  );
3852
3896
  }
3853
- function ur({
3897
+ function fr({
3854
3898
  amount: t,
3855
3899
  onAmountChange: a,
3856
3900
  currencyCode: n,
3857
3901
  isBuy: r,
3858
3902
  onOpenModal: o,
3859
- assetBaseUrl: c,
3860
- error: u,
3861
- fieldLocks: l,
3862
- onBlur: d,
3903
+ assetBaseUrl: l,
3904
+ error: d,
3905
+ fieldLocks: c,
3906
+ onBlur: u,
3863
3907
  inputRef: s,
3864
3908
  chainCode: h,
3865
- chainDisplay: p,
3909
+ chainDisplay: m,
3866
3910
  getChainIconUrl: f,
3867
3911
  shaking: g,
3868
3912
  onFocus: k
3869
3913
  }) {
3870
3914
  var y, N, K;
3871
- const R = P();
3915
+ const A = O();
3872
3916
  return /* @__PURE__ */ i(G, { children: [
3873
3917
  /* @__PURE__ */ i(
3874
3918
  "div",
@@ -3877,10 +3921,10 @@ function ur({
3877
3921
  style: {
3878
3922
  background: "var(--t-surface)",
3879
3923
  borderRadius: "var(--t-card-radius)",
3880
- ...u ? { border: "1px solid var(--t-error)" } : {}
3924
+ ...d ? { border: "1px solid var(--t-error)" } : {}
3881
3925
  },
3882
3926
  children: [
3883
- /* @__PURE__ */ e("div", { className: "text-[16px]", style: { color: "var(--t-text-secondary)", lineHeight: "16px" }, children: R("spend.label") }),
3927
+ /* @__PURE__ */ e("div", { className: "text-[16px]", style: { color: "var(--t-text-secondary)", lineHeight: "16px" }, children: A("spend.label") }),
3884
3928
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
3885
3929
  /* @__PURE__ */ e(
3886
3930
  "input",
@@ -3890,8 +3934,8 @@ function ur({
3890
3934
  value: t,
3891
3935
  onChange: a,
3892
3936
  onFocus: k,
3893
- onBlur: d,
3894
- placeholder: R(r ? "spend.placeholderFiat" : "spend.placeholderCrypto"),
3937
+ onBlur: u,
3938
+ placeholder: A(r ? "spend.placeholderFiat" : "spend.placeholderCrypto"),
3895
3939
  className: "bg-transparent outline-none w-0 flex-1 mr-3",
3896
3940
  style: {
3897
3941
  color: "var(--t-text)",
@@ -3906,7 +3950,7 @@ function ur({
3906
3950
  width: 0
3907
3951
  },
3908
3952
  inputMode: "decimal",
3909
- disabled: !!((y = l == null ? void 0 : l.sourceAmount) != null && y.locked)
3953
+ disabled: !!((y = c == null ? void 0 : c.sourceAmount) != null && y.locked)
3910
3954
  }
3911
3955
  ),
3912
3956
  r ? /* @__PURE__ */ i(
@@ -3925,11 +3969,11 @@ function ur({
3925
3969
  backdropFilter: "blur(4px)",
3926
3970
  WebkitBackdropFilter: "blur(4px)"
3927
3971
  },
3928
- disabled: !!((N = l == null ? void 0 : l.sourceCurrency) != null && N.locked),
3972
+ disabled: !!((N = c == null ? void 0 : c.sourceCurrency) != null && N.locked),
3929
3973
  children: [
3930
- /* @__PURE__ */ e(jt, { currencyCode: n, size: 24, baseUrl: c }),
3974
+ /* @__PURE__ */ e(jt, { currencyCode: n, size: 24, baseUrl: l }),
3931
3975
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: n }),
3932
- /* @__PURE__ */ e(Re, {})
3976
+ /* @__PURE__ */ e(Ae, {})
3933
3977
  ]
3934
3978
  }
3935
3979
  ) : /* @__PURE__ */ i("div", { className: "flex flex-col items-end shrink-0", children: [
@@ -3949,11 +3993,11 @@ function ur({
3949
3993
  backdropFilter: "blur(4px)",
3950
3994
  WebkitBackdropFilter: "blur(4px)"
3951
3995
  },
3952
- disabled: !!((K = l == null ? void 0 : l.destinationCurrency) != null && K.locked),
3996
+ disabled: !!((K = c == null ? void 0 : c.destinationCurrency) != null && K.locked),
3953
3997
  children: [
3954
- /* @__PURE__ */ e(Aa, { ticker: n, size: 24, baseUrl: c }),
3998
+ /* @__PURE__ */ e(Ra, { ticker: n, size: 24, baseUrl: l }),
3955
3999
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: n }),
3956
- /* @__PURE__ */ e(Re, {})
4000
+ /* @__PURE__ */ e(Ae, {})
3957
4001
  ]
3958
4002
  }
3959
4003
  ),
@@ -3961,7 +4005,7 @@ function ur({
3961
4005
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
3962
4006
  "img",
3963
4007
  {
3964
- src: f(h, c),
4008
+ src: f(h, l),
3965
4009
  alt: h,
3966
4010
  width: 14,
3967
4011
  height: 14,
@@ -3969,47 +4013,47 @@ function ur({
3969
4013
  style: { width: 14, height: 14 }
3970
4014
  }
3971
4015
  ) }),
3972
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: p })
4016
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: m })
3973
4017
  ] })
3974
4018
  ] })
3975
4019
  ] })
3976
4020
  ]
3977
4021
  }
3978
4022
  ),
3979
- u && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 text-center", style: { color: "var(--t-error)" }, children: u })
4023
+ d && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 text-center", style: { color: "var(--t-error)" }, children: d })
3980
4024
  ] });
3981
4025
  }
3982
- function mr({ char: t, height: a = 38 }) {
4026
+ function yr({ char: t, height: a = 38 }) {
3983
4027
  const n = "0123456789", r = n.indexOf(t);
3984
4028
  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)) }) });
3985
4029
  }
3986
- function pr({
4030
+ function gr({
3987
4031
  value: t,
3988
4032
  height: a = 38,
3989
4033
  className: n = "",
3990
4034
  style: r = {}
3991
4035
  }) {
3992
- return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", fontVariantNumeric: "tabular-nums", ...r }, children: t.split("").map((o, c) => /* @__PURE__ */ e(mr, { char: o, height: a }, c)) });
4036
+ return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", fontVariantNumeric: "tabular-nums", ...r }, children: t.split("").map((o, l) => /* @__PURE__ */ e(yr, { char: o, height: a }, l)) });
3993
4037
  }
3994
- function hr({
4038
+ function xr({
3995
4039
  amount: t,
3996
4040
  currencyCode: a,
3997
4041
  chainCode: n,
3998
4042
  chainDisplay: r,
3999
4043
  isBuy: o,
4000
- onOpenModal: c,
4001
- displayRate: u,
4002
- assetBaseUrl: l,
4003
- quotesLoading: d,
4044
+ onOpenModal: l,
4045
+ displayRate: d,
4046
+ assetBaseUrl: c,
4047
+ quotesLoading: u,
4004
4048
  onOpenRateBreakdown: s,
4005
4049
  fieldLocks: h,
4006
- spendNumeric: p,
4050
+ spendNumeric: m,
4007
4051
  getChainIconUrl: f,
4008
4052
  autoSelectPending: g,
4009
4053
  rateFlash: k
4010
4054
  }) {
4011
4055
  var y, N;
4012
- const R = P();
4056
+ const A = O();
4013
4057
  return /* @__PURE__ */ e(
4014
4058
  "div",
4015
4059
  {
@@ -4020,17 +4064,17 @@ function hr({
4020
4064
  background: "transparent"
4021
4065
  },
4022
4066
  children: /* @__PURE__ */ i("div", { className: "flex flex-col gap-[20px]", children: [
4023
- /* @__PURE__ */ e("div", { className: "text-[16px]", style: { color: "var(--t-text-secondary)", lineHeight: "16px" }, children: R("receive.label") }),
4067
+ /* @__PURE__ */ e("div", { className: "text-[16px]", style: { color: "var(--t-text-secondary)", lineHeight: "16px" }, children: A("receive.label") }),
4024
4068
  /* @__PURE__ */ i("div", { className: "flex flex-col gap-[8px]", children: [
4025
4069
  /* @__PURE__ */ i("div", { className: "flex items-start justify-between", children: [
4026
4070
  /* @__PURE__ */ e("div", { className: k ? "rate-flash" : "", children: /* @__PURE__ */ e(
4027
- pr,
4071
+ gr,
4028
4072
  {
4029
- value: p > 0 ? t : "0",
4073
+ value: m > 0 ? t : "0",
4030
4074
  height: 32,
4031
4075
  className: "font-medium",
4032
4076
  style: {
4033
- color: p > 0 ? "var(--t-text)" : "var(--t-text-muted)",
4077
+ color: m > 0 ? "var(--t-text)" : "var(--t-text-muted)",
4034
4078
  fontSize: 24
4035
4079
  }
4036
4080
  }
@@ -4038,7 +4082,7 @@ function hr({
4038
4082
  o ? /* @__PURE__ */ e("div", { className: "flex flex-col items-end shrink-0", children: /* @__PURE__ */ i(
4039
4083
  "button",
4040
4084
  {
4041
- onClick: c,
4085
+ onClick: l,
4042
4086
  className: "flex items-center gap-[4px] transition-colors",
4043
4087
  style: {
4044
4088
  background: "var(--t-pill-solid-bg)",
@@ -4053,15 +4097,15 @@ function hr({
4053
4097
  },
4054
4098
  disabled: !!((y = h == null ? void 0 : h.destinationCurrency) != null && y.locked),
4055
4099
  children: [
4056
- /* @__PURE__ */ e(Aa, { ticker: a, size: 24, baseUrl: l }),
4100
+ /* @__PURE__ */ e(Ra, { ticker: a, size: 24, baseUrl: c }),
4057
4101
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: a }),
4058
- /* @__PURE__ */ e(Re, {})
4102
+ /* @__PURE__ */ e(Ae, {})
4059
4103
  ]
4060
4104
  }
4061
4105
  ) }) : /* @__PURE__ */ i(
4062
4106
  "button",
4063
4107
  {
4064
- onClick: c,
4108
+ onClick: l,
4065
4109
  className: "flex items-center gap-[4px] shrink-0 transition-colors",
4066
4110
  style: {
4067
4111
  background: "var(--t-pill-solid-bg)",
@@ -4076,20 +4120,20 @@ function hr({
4076
4120
  },
4077
4121
  disabled: !!((N = h == null ? void 0 : h.sourceCurrency) != null && N.locked),
4078
4122
  children: [
4079
- /* @__PURE__ */ e(jt, { currencyCode: a, size: 24, baseUrl: l }),
4123
+ /* @__PURE__ */ e(jt, { currencyCode: a, size: 24, baseUrl: c }),
4080
4124
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: a }),
4081
- /* @__PURE__ */ e(Re, {})
4125
+ /* @__PURE__ */ e(Ae, {})
4082
4126
  ]
4083
4127
  }
4084
4128
  )
4085
4129
  ] }),
4086
4130
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
4087
- /* @__PURE__ */ e("div", { className: "flex items-center gap-[4px]", children: d && !g ? /* @__PURE__ */ i(G, { children: [
4131
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-[4px]", children: u && !g ? /* @__PURE__ */ i(G, { children: [
4088
4132
  /* @__PURE__ */ e(Ee, { size: 12 }),
4089
- /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: R("receive.fetchingRate") })
4133
+ /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: A("receive.fetchingRate") })
4090
4134
  ] }) : /* @__PURE__ */ i(G, { children: [
4091
- /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: u || " " }),
4092
- u && /* @__PURE__ */ e(
4135
+ /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: d || " " }),
4136
+ d && /* @__PURE__ */ e(
4093
4137
  "button",
4094
4138
  {
4095
4139
  onClick: s,
@@ -4102,7 +4146,7 @@ function hr({
4102
4146
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 12, height: 12, background: "#ffffff" }, children: /* @__PURE__ */ e(
4103
4147
  "img",
4104
4148
  {
4105
- src: f(n, l),
4149
+ src: f(n, c),
4106
4150
  alt: n,
4107
4151
  width: 12,
4108
4152
  height: 12,
@@ -4118,21 +4162,21 @@ function hr({
4118
4162
  }
4119
4163
  );
4120
4164
  }
4121
- function fr({
4165
+ function vr({
4122
4166
  selectedMethod: t,
4123
4167
  onOpenModal: a,
4124
4168
  getMethodIcon: n,
4125
4169
  getMethodDisplayName: r
4126
4170
  }) {
4127
- const o = P();
4171
+ const o = O();
4128
4172
  return /* @__PURE__ */ i(
4129
4173
  "div",
4130
4174
  {
4131
4175
  role: "button",
4132
4176
  tabIndex: 0,
4133
4177
  onClick: a,
4134
- onKeyDown: (c) => {
4135
- (c.key === "Enter" || c.key === " ") && a();
4178
+ onKeyDown: (l) => {
4179
+ (l.key === "Enter" || l.key === " ") && a();
4136
4180
  },
4137
4181
  className: "flex items-center gap-[4px] p-4 transition-colors cursor-pointer card-press card-hover",
4138
4182
  style: {
@@ -4147,27 +4191,27 @@ function fr({
4147
4191
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "16px" }, children: r(t.id, t.name) })
4148
4192
  ] }),
4149
4193
  !t && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-muted)" }, children: o("payment.select") }),
4150
- /* @__PURE__ */ e(Re, {})
4194
+ /* @__PURE__ */ e(Ae, {})
4151
4195
  ] })
4152
4196
  ]
4153
4197
  }
4154
4198
  );
4155
4199
  }
4156
- function yr({
4200
+ function Cr({
4157
4201
  selectedQuote: t,
4158
4202
  quotesLoading: a,
4159
4203
  onOpenModal: n,
4160
4204
  assetBaseUrl: r = ""
4161
4205
  }) {
4162
- const o = P();
4206
+ const o = O();
4163
4207
  return /* @__PURE__ */ i(
4164
4208
  "div",
4165
4209
  {
4166
4210
  role: "button",
4167
4211
  tabIndex: 0,
4168
4212
  onClick: n,
4169
- onKeyDown: (c) => {
4170
- (c.key === "Enter" || c.key === " ") && n();
4213
+ onKeyDown: (l) => {
4214
+ (l.key === "Enter" || l.key === " ") && n();
4171
4215
  },
4172
4216
  className: "flex items-center gap-[4px] p-4 transition-colors cursor-pointer card-press card-hover",
4173
4217
  style: {
@@ -4189,35 +4233,35 @@ function yr({
4189
4233
  height: 20,
4190
4234
  className: "rounded-full",
4191
4235
  style: { width: 20, height: 20, objectFit: "cover" },
4192
- onError: (c) => {
4193
- t.gatewayLogo && c.target.src !== t.gatewayLogo && (c.target.src = t.gatewayLogo);
4236
+ onError: (l) => {
4237
+ t.gatewayLogo && l.target.src !== t.gatewayLogo && (l.target.src = t.gatewayLogo);
4194
4238
  }
4195
4239
  }
4196
4240
  ) }),
4197
4241
  /* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "16px" }, children: t.gatewayName })
4198
4242
  ] }),
4199
- /* @__PURE__ */ e(Re, {})
4243
+ /* @__PURE__ */ e(Ae, {})
4200
4244
  ] })
4201
4245
  ]
4202
4246
  }
4203
4247
  );
4204
4248
  }
4205
- function gr() {
4249
+ function br() {
4206
4250
  return /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0 }, children: /* @__PURE__ */ e("path", { d: "M8 1l2.12 4.3 4.74.69-3.43 3.34.81 4.72L8 11.77l-4.24 2.28.81-4.72L1.14 5.99l4.74-.69L8 1z", fill: "var(--t-success)" }) });
4207
4251
  }
4208
- function xr() {
4252
+ function Sr() {
4209
4253
  return /* @__PURE__ */ i("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0 }, children: [
4210
4254
  /* @__PURE__ */ e("path", { d: "M14 7.5a6 6 0 11-12 0 6 6 0 0112 0z", stroke: "var(--t-accent)", strokeWidth: "1.5" }),
4211
4255
  /* @__PURE__ */ e("path", { d: "M5.5 8l2 2 3.5-4", stroke: "var(--t-accent)", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
4212
4256
  ] });
4213
4257
  }
4214
- function vr({ quote: t }) {
4215
- const a = P();
4258
+ function wr({ quote: t }) {
4259
+ const a = O();
4216
4260
  return t.isBestRate ? /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
4217
- /* @__PURE__ */ e(gr, {}),
4261
+ /* @__PURE__ */ e(br, {}),
4218
4262
  /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-success)" }, children: a("modal.bestPrice") })
4219
4263
  ] }) : t.isRecommended ? /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
4220
- /* @__PURE__ */ e(xr, {}),
4264
+ /* @__PURE__ */ e(Sr, {}),
4221
4265
  /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-accent)" }, children: a("modal.recommended") })
4222
4266
  ] }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ i("div", { className: "text-[11px]", style: { color: "var(--t-text-muted)" }, children: [
4223
4267
  "#",
@@ -4241,7 +4285,7 @@ function ya({ gatewayId: t, gatewayLogo: a, assetBaseUrl: n = "" }) {
4241
4285
  }
4242
4286
  ) });
4243
4287
  }
4244
- function Cr({ pct: t }) {
4288
+ function kr({ pct: t }) {
4245
4289
  if (t === 0) return null;
4246
4290
  const a = t > 0 ? "var(--t-success)" : "var(--t-error)", n = t > 0 ? "+" : "";
4247
4291
  return /* @__PURE__ */ i("span", { className: "text-[11px] font-medium", style: { color: a }, children: [
@@ -4250,7 +4294,7 @@ function Cr({ pct: t }) {
4250
4294
  "%"
4251
4295
  ] });
4252
4296
  }
4253
- function br() {
4297
+ function Nr() {
4254
4298
  return /* @__PURE__ */ e("div", { className: "space-y-3", children: [0, 1, 2].map((t) => /* @__PURE__ */ i(
4255
4299
  "div",
4256
4300
  {
@@ -4278,20 +4322,20 @@ function br() {
4278
4322
  t
4279
4323
  )) });
4280
4324
  }
4281
- function Sr({
4325
+ function Er({
4282
4326
  onClose: t,
4283
4327
  onSelect: a,
4284
4328
  quotes: n,
4285
4329
  quotesLoading: r,
4286
4330
  cryptoCurrency: o,
4287
- selectedGatewayId: c,
4288
- assetBaseUrl: u = ""
4331
+ selectedGatewayId: l,
4332
+ assetBaseUrl: d = ""
4289
4333
  }) {
4290
- const l = P(), [d, s] = w(""), h = V(() => {
4334
+ const c = O(), [u, s] = w(""), h = j(() => {
4291
4335
  if (!(n != null && n.quotes)) return [];
4292
- const f = d.trim().toLowerCase();
4336
+ const f = u.trim().toLowerCase();
4293
4337
  return f ? n.quotes.filter((g) => g.gatewayName.toLowerCase().includes(f)) : n.quotes;
4294
- }, [n, d]), p = V(() => {
4338
+ }, [n, u]), m = j(() => {
4295
4339
  const f = h.find((g) => parseFloat(g.cryptoAmount) > 0);
4296
4340
  return f ? parseFloat(f.cryptoAmount) : 0;
4297
4341
  }, [h]);
@@ -4302,13 +4346,13 @@ function Sr({
4302
4346
  {
4303
4347
  className: "text-center text-[17px] font-medium mt-2 mb-6",
4304
4348
  style: { color: "var(--t-text)", fontSize: 17, fontWeight: 500, marginTop: 8, marginBottom: 24 },
4305
- children: l("modal.chooseRamp")
4349
+ children: c("modal.chooseRamp")
4306
4350
  }
4307
4351
  ),
4308
- /* @__PURE__ */ e(Ye, { value: d, onChange: s }),
4352
+ /* @__PURE__ */ e(Ye, { value: u, onChange: s }),
4309
4353
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-3", children: [
4310
- r ? /* @__PURE__ */ e(br, {}) : h.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? l("modal.noQuotes") : l("modal.noProvidersFound") }) : h.map((f, g) => {
4311
- const k = g === 0, R = c === f.gatewayId, y = parseFloat(f.cryptoAmount), N = y > 0, K = y >= 1 ? y.toFixed(4) : y.toPrecision(6), z = !k && p > 0 ? (y - p) / p * 100 : 0;
4354
+ r ? /* @__PURE__ */ e(Nr, {}) : h.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? c("modal.noQuotes") : c("modal.noProvidersFound") }) : h.map((f, g) => {
4355
+ const k = g === 0, A = l === f.gatewayId, y = parseFloat(f.cryptoAmount), N = y > 0, K = y >= 1 ? y.toFixed(4) : y.toPrecision(6), z = !k && m > 0 ? (y - m) / m * 100 : 0;
4312
4356
  return /* @__PURE__ */ i(
4313
4357
  "button",
4314
4358
  {
@@ -4317,26 +4361,26 @@ function Sr({
4317
4361
  style: {
4318
4362
  borderRadius: "var(--t-card-radius)",
4319
4363
  padding: "12px 16px",
4320
- border: R && N ? "1.5px solid var(--t-accent)" : "1.5px solid transparent",
4364
+ border: A && N ? "1.5px solid var(--t-accent)" : "1.5px solid transparent",
4321
4365
  background: "var(--t-surface)",
4322
4366
  opacity: N ? 1 : 0.45,
4323
4367
  cursor: N ? "pointer" : "default",
4324
4368
  animationDelay: `${Math.min(g * 45, 350)}ms`
4325
4369
  },
4326
4370
  children: [
4327
- /* @__PURE__ */ e(ya, { gatewayId: f.gatewayId, gatewayLogo: f.gatewayLogo, assetBaseUrl: u }),
4371
+ /* @__PURE__ */ e(ya, { gatewayId: f.gatewayId, gatewayLogo: f.gatewayLogo, assetBaseUrl: d }),
4328
4372
  /* @__PURE__ */ i("div", { className: "text-left flex-1 min-w-0", children: [
4329
4373
  /* @__PURE__ */ e("div", { className: "font-medium text-[14px] leading-[18px]", style: { color: "var(--t-text)" }, children: f.gatewayName }),
4330
- N && /* @__PURE__ */ e(vr, { quote: f })
4374
+ N && /* @__PURE__ */ e(wr, { quote: f })
4331
4375
  ] }),
4332
4376
  /* @__PURE__ */ e("div", { className: "text-right shrink-0", children: N ? /* @__PURE__ */ i(G, { children: [
4333
- /* @__PURE__ */ e("div", { className: "text-[11px] leading-[14px]", style: { color: "var(--t-text-secondary)" }, children: k ? l("receive.label") : /* @__PURE__ */ e(Cr, { pct: z }) }),
4377
+ /* @__PURE__ */ e("div", { className: "text-[11px] leading-[14px]", style: { color: "var(--t-text-secondary)" }, children: k ? c("receive.label") : /* @__PURE__ */ e(kr, { pct: z }) }),
4334
4378
  /* @__PURE__ */ i("div", { className: "font-medium text-[13px] leading-[18px]", style: { color: "var(--t-text)" }, children: [
4335
4379
  /* @__PURE__ */ e("span", { className: "text-[10px] font-normal", style: { color: "var(--t-text-secondary)" }, children: o }),
4336
4380
  " ",
4337
4381
  K
4338
4382
  ] })
4339
- ] }) : /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-muted)" }, children: l("rate.noQuote") }) })
4383
+ ] }) : /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-muted)" }, children: c("rate.noQuote") }) })
4340
4384
  ]
4341
4385
  },
4342
4386
  f.gatewayId
@@ -4354,7 +4398,7 @@ function Sr({
4354
4398
  animationDelay: `${Math.min((h.length + g) * 45, 500)}ms`
4355
4399
  },
4356
4400
  children: [
4357
- /* @__PURE__ */ e(ya, { gatewayId: f.gatewayId, assetBaseUrl: u }),
4401
+ /* @__PURE__ */ e(ya, { gatewayId: f.gatewayId, assetBaseUrl: d }),
4358
4402
  /* @__PURE__ */ e("div", { className: "text-left flex-1 min-w-0", children: /* @__PURE__ */ e("div", { className: "font-medium text-[14px] leading-[18px]", style: { color: "var(--t-text)" }, children: f.gatewayName }) }),
4359
4403
  /* @__PURE__ */ e("div", { className: "text-right shrink-0", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-muted)" }, children: f.reason }) })
4360
4404
  ]
@@ -4364,18 +4408,18 @@ function Sr({
4364
4408
  ] })
4365
4409
  ] });
4366
4410
  }
4367
- function wr({
4411
+ function Ar({
4368
4412
  address: t,
4369
4413
  onChange: a,
4370
4414
  placeholder: n,
4371
4415
  error: r,
4372
4416
  validating: o,
4373
- disabled: c,
4374
- onFocus: u,
4375
- onBlur: l,
4376
- focused: d
4417
+ disabled: l,
4418
+ onFocus: d,
4419
+ onBlur: c,
4420
+ focused: u
4377
4421
  }) {
4378
- const s = P(), h = o && t.trim().length >= 10, [p, f] = w(!1), g = M(r);
4422
+ const s = O(), h = o && t.trim().length >= 10, [m, f] = w(!1), g = I(r);
4379
4423
  return U(() => {
4380
4424
  if (r && !g.current) {
4381
4425
  f(!0);
@@ -4387,7 +4431,7 @@ function wr({
4387
4431
  /* @__PURE__ */ i(
4388
4432
  "div",
4389
4433
  {
4390
- className: `flex flex-col gap-[4px] p-4 card-hover${p ? " error-shake" : ""}`,
4434
+ className: `flex flex-col gap-[4px] p-4 card-hover${m ? " error-shake" : ""}`,
4391
4435
  style: {
4392
4436
  background: "var(--t-surface)",
4393
4437
  borderRadius: "var(--t-card-radius)"
@@ -4401,8 +4445,8 @@ function wr({
4401
4445
  type: "text",
4402
4446
  value: t,
4403
4447
  onChange: (k) => a(k.target.value),
4404
- onFocus: u,
4405
- onBlur: l,
4448
+ onFocus: d,
4449
+ onBlur: c,
4406
4450
  placeholder: n,
4407
4451
  spellCheck: !1,
4408
4452
  autoComplete: "off",
@@ -4417,11 +4461,11 @@ function wr({
4417
4461
  letterSpacing: "0.13px",
4418
4462
  backgroundColor: "transparent"
4419
4463
  },
4420
- disabled: c
4464
+ disabled: l
4421
4465
  }
4422
4466
  ),
4423
4467
  h && /* @__PURE__ */ e("div", { className: "absolute right-0 top-0 bottom-0 flex items-center", children: /* @__PURE__ */ e(Ee, { size: 14 }) }),
4424
- !t && d && !c && /* @__PURE__ */ e(
4468
+ !t && u && !l && /* @__PURE__ */ e(
4425
4469
  "div",
4426
4470
  {
4427
4471
  className: "absolute left-0 top-0 bottom-0 flex items-center",
@@ -4446,7 +4490,7 @@ function wr({
4446
4490
  r && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 text-center", style: { color: "var(--t-error)" }, children: r })
4447
4491
  ] });
4448
4492
  }
4449
- function kr({ label: t, disabled: a, loading: n, onClick: r }) {
4493
+ function Rr({ label: t, disabled: a, loading: n, onClick: r }) {
4450
4494
  return /* @__PURE__ */ e(
4451
4495
  "button",
4452
4496
  {
@@ -4477,14 +4521,14 @@ function kr({ label: t, disabled: a, loading: n, onClick: r }) {
4477
4521
  }
4478
4522
  );
4479
4523
  }
4480
- function Nr() {
4481
- const t = P();
4524
+ function Tr() {
4525
+ const t = O();
4482
4526
  return /* @__PURE__ */ i("div", { className: "text-center py-3", style: { height: 16, lineHeight: "16px" }, children: [
4483
4527
  /* @__PURE__ */ e("span", { style: { fontSize: 9, opacity: 0.5, color: "var(--t-text)", letterSpacing: "0.27px" }, children: t("footer.poweredBy") }),
4484
4528
  /* @__PURE__ */ e("span", { style: { fontSize: 9, opacity: 0.65, color: "var(--t-text)", letterSpacing: "0.27px" }, children: t("footer.brand") })
4485
4529
  ] });
4486
4530
  }
4487
- function Er({
4531
+ function Lr({
4488
4532
  quote: t,
4489
4533
  isOpen: a,
4490
4534
  onClose: n,
@@ -4492,16 +4536,16 @@ function Er({
4492
4536
  quotesLoading: o
4493
4537
  }) {
4494
4538
  var s, h;
4495
- const c = P();
4539
+ const l = O();
4496
4540
  if (!a) return null;
4497
- const u = (p) => String(p).padStart(2, "0"), l = (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} ` : "$", d = (p) => {
4498
- const f = typeof p == "string" ? parseFloat(p) : p;
4499
- return isNaN(f) ? `${l}0.00` : `${l}${f.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
4541
+ const d = (m) => String(m).padStart(2, "0"), c = (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} ` : "$", u = (m) => {
4542
+ const f = typeof m == "string" ? parseFloat(m) : m;
4543
+ return isNaN(f) ? `${c}0.00` : `${c}${f.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
4500
4544
  };
4501
4545
  return /* @__PURE__ */ i("div", { className: "px-5 py-5", children: [
4502
4546
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
4503
4547
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: o ? /* @__PURE__ */ e(Ee, { size: 16 }) : /* @__PURE__ */ i(G, { children: [
4504
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: c("rate.updatesInLabel") }),
4548
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: l("rate.updatesInLabel") }),
4505
4549
  /* @__PURE__ */ i(
4506
4550
  "span",
4507
4551
  {
@@ -4509,7 +4553,7 @@ function Er({
4509
4553
  style: { color: "var(--t-text)", border: "1px solid var(--t-border)" },
4510
4554
  children: [
4511
4555
  "00:",
4512
- u(r)
4556
+ d(r)
4513
4557
  ]
4514
4558
  }
4515
4559
  ),
@@ -4518,7 +4562,7 @@ function Er({
4518
4562
  "div",
4519
4563
  {
4520
4564
  className: "flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity cursor-help",
4521
- "aria-label": c("rate.rateTooltip"),
4565
+ "aria-label": l("rate.rateTooltip"),
4522
4566
  children: /* @__PURE__ */ e(Ht, { size: 12 })
4523
4567
  }
4524
4568
  ),
@@ -4527,7 +4571,7 @@ function Er({
4527
4571
  {
4528
4572
  className: "info-tooltip pointer-events-none absolute left-1/2 z-50 w-[200px] px-3 py-2 rounded-xl text-[11px] leading-snug font-medium opacity-0 group-hover:opacity-100 transition-opacity duration-200",
4529
4573
  style: { background: "var(--t-tooltip-bg)", color: "var(--t-tooltip-text)", top: "calc(100% + 8px)", transform: "translateX(-50%)" },
4530
- children: c("rate.rateTooltip")
4574
+ children: l("rate.rateTooltip")
4531
4575
  }
4532
4576
  )
4533
4577
  ] })
@@ -4543,23 +4587,23 @@ function Er({
4543
4587
  )
4544
4588
  ] }),
4545
4589
  t ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-4", children: [
4546
- t.exchangeRate && /* @__PURE__ */ e("div", { className: "text-[28px] font-semibold", style: { color: "var(--t-text)" }, children: d(t.exchangeRate) }),
4590
+ t.exchangeRate && /* @__PURE__ */ e("div", { className: "text-[28px] font-semibold", style: { color: "var(--t-text)" }, children: u(t.exchangeRate) }),
4547
4591
  ((s = t.fees) == null ? void 0 : s.processingFee) && /* @__PURE__ */ i("div", { children: [
4548
4592
  /* @__PURE__ */ i("span", { className: "text-[13px] block mb-0.5", style: { color: "var(--t-text-secondary)" }, children: [
4549
- c("rate.processingFee"),
4550
- t.fees.feePercentage ? ` ${c("rate.feeIncluded", { percentage: Math.round(parseFloat(String(t.fees.feePercentage)) * 100) / 100 })}` : ""
4593
+ l("rate.processingFee"),
4594
+ t.fees.feePercentage ? ` ${l("rate.feeIncluded", { percentage: Math.round(parseFloat(String(t.fees.feePercentage)) * 100) / 100 })}` : ""
4551
4595
  ] }),
4552
- /* @__PURE__ */ e("span", { className: "text-[15px] font-semibold", style: { color: "var(--t-text)" }, children: d(t.fees.processingFee) })
4596
+ /* @__PURE__ */ e("span", { className: "text-[15px] font-semibold", style: { color: "var(--t-text)" }, children: u(t.fees.processingFee) })
4553
4597
  ] }),
4554
4598
  ((h = t.fees) == null ? void 0 : h.networkFee) && /* @__PURE__ */ i("div", { children: [
4555
4599
  /* @__PURE__ */ i("span", { className: "flex items-center gap-1 text-[13px] mb-0.5", style: { color: "var(--t-text-secondary)" }, children: [
4556
- c("rate.networkFeeIncl"),
4600
+ l("rate.networkFeeIncl"),
4557
4601
  /* @__PURE__ */ i("div", { className: "relative group", children: [
4558
4602
  /* @__PURE__ */ e(
4559
4603
  "div",
4560
4604
  {
4561
4605
  className: "flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity cursor-help",
4562
- "aria-label": c("rate.networkFeeTooltip"),
4606
+ "aria-label": l("rate.networkFeeTooltip"),
4563
4607
  children: /* @__PURE__ */ e(Ht, { size: 12 })
4564
4608
  }
4565
4609
  ),
@@ -4568,13 +4612,13 @@ function Er({
4568
4612
  {
4569
4613
  className: "info-tooltip pointer-events-none absolute left-1/2 z-50 w-[220px] px-3 py-2 rounded-xl text-[11px] leading-snug font-medium opacity-0 group-hover:opacity-100 transition-opacity duration-200",
4570
4614
  style: { background: "var(--t-tooltip-bg)", color: "var(--t-tooltip-text)", bottom: "calc(100% + 8px)", transform: "translateX(-50%)" },
4571
- children: c("rate.networkFeeTooltip")
4615
+ children: l("rate.networkFeeTooltip")
4572
4616
  }
4573
4617
  )
4574
4618
  ] })
4575
4619
  ] }),
4576
4620
  /* @__PURE__ */ i("span", { className: "text-[15px] font-semibold", style: { color: "var(--t-text)" }, children: [
4577
- d(t.fees.networkFee),
4621
+ u(t.fees.networkFee),
4578
4622
  t.exchangeRate && /* @__PURE__ */ i("span", { className: "text-[13px] font-normal ml-1.5", style: { color: "var(--t-text-muted)" }, children: [
4579
4623
  "(",
4580
4624
  (parseFloat(t.fees.networkFee) / parseFloat(t.exchangeRate)).toFixed(8),
@@ -4584,26 +4628,26 @@ function Er({
4584
4628
  ] })
4585
4629
  ] })
4586
4630
  ] })
4587
- ] }) : /* @__PURE__ */ e("div", { className: "text-[13px] py-4 text-center", style: { color: "var(--t-text-muted)" }, children: c("rate.noQuote") })
4631
+ ] }) : /* @__PURE__ */ e("div", { className: "text-[13px] py-4 text-center", style: { color: "var(--t-text-muted)" }, children: l("rate.noQuote") })
4588
4632
  ] });
4589
4633
  }
4590
- function Rr({
4634
+ function Fr({
4591
4635
  className: t = "",
4592
4636
  theme: a = "dark",
4593
4637
  skinId: n = "mono",
4594
4638
  accentColor: r,
4595
4639
  bgColor: o,
4596
- bgImage: c,
4597
- borderColor: u,
4598
- borderRadius: l,
4599
- surfaceColor: d,
4640
+ bgImage: l,
4641
+ borderColor: d,
4642
+ borderRadius: c,
4643
+ surfaceColor: u,
4600
4644
  inputBgColor: s,
4601
4645
  textColor: h,
4602
- textSecondaryColor: p,
4646
+ textSecondaryColor: m,
4603
4647
  textMutedColor: f,
4604
4648
  successColor: g,
4605
4649
  showFlowToggle: k = !0,
4606
- showSettings: R = !0,
4650
+ showSettings: A = !0,
4607
4651
  showThemeToggle: y = !0,
4608
4652
  autoRedirect: N = !1,
4609
4653
  explorerUrl: K,
@@ -4616,10 +4660,10 @@ function Rr({
4616
4660
  onDone: ae
4617
4661
  }) {
4618
4662
  var na, ra;
4619
- const L = P(), {
4663
+ const L = O(), {
4620
4664
  state: C,
4621
4665
  dispatch: F,
4622
- config: m,
4666
+ config: p,
4623
4667
  configLoading: D,
4624
4668
  quotes: E,
4625
4669
  quotesLoading: b,
@@ -4637,7 +4681,7 @@ function Rr({
4637
4681
  selectionUnsupported: ye,
4638
4682
  quotesEmpty: $,
4639
4683
  bestUnavailableReason: Ke
4640
- } = Xe(), { locale: ze, setLocale: vt } = _t(), [se, _e] = w(a === "dark"), [Le, Ct] = w(n), [de, j] = w(null), [lt, Z] = w(!1), [bt, Je] = w(!1), [Fe, ct] = w(!1), [je, qe] = w(!1), [et, Ue] = w(null), [tt, St] = w(!0), [wt, st] = w(!1), [v, A] = w(!1), [T, B] = w(!1), [I, _] = w(null), [ue, ge] = w(!1), [La, kt] = w(30), [Fa, Gt] = w(!1), [Ua, $t] = w(!1), Ia = M(null), Nt = M(), Et = M(C.flowType), Ma = te ?? 640, Zt = M(E);
4684
+ } = Xe(), { locale: ze, setLocale: vt } = _t(), [se, _e] = w(a === "dark"), [Le, Ct] = w(n), [de, V] = w(null), [lt, Z] = w(!1), [bt, Je] = w(!1), [Fe, ct] = w(!1), [je, qe] = w(!1), [et, Ue] = w(null), [tt, St] = w(!0), [wt, st] = w(!1), [v, R] = w(!1), [T, B] = w(!1), [M, _] = w(null), [ue, ge] = w(!1), [La, kt] = w(30), [Fa, Gt] = w(!1), [Ua, $t] = w(!1), Ia = I(null), Nt = I(), Et = I(C.flowType), Ma = te ?? 640, Zt = I(E);
4641
4685
  U(() => {
4642
4686
  E && E !== Zt.current && B(!1), Zt.current = E;
4643
4687
  }, [E]), U(() => {
@@ -4657,28 +4701,28 @@ function Rr({
4657
4701
  }
4658
4702
  Et.current = C.flowType;
4659
4703
  }, [C.flowType, tt]);
4660
- const dt = C.flowType, H = dt === "buy", re = C.cryptoCurrency || "BTC", xe = C.fiatCurrency || "USD", Rt = H ? C.fiatAmount : C.cryptoAmount, ee = Ln(Rt), ve = C.selectedQuote || (E == null ? void 0 : E.bestQuote) || null, we = ve != null && ve.exchangeRate ? parseFloat(ve.exchangeRate) : null, at = M(null);
4704
+ const dt = C.flowType, H = dt === "buy", re = C.cryptoCurrency || "BTC", xe = C.fiatCurrency || "USD", At = H ? C.fiatAmount : C.cryptoAmount, ee = Mn(At), ve = C.selectedQuote || (E == null ? void 0 : E.bestQuote) || null, we = ve != null && ve.exchangeRate ? parseFloat(ve.exchangeRate) : null, at = I(null);
4661
4705
  we && re && xe && (at.current = { rate: we, crypto: re, fiat: xe }), U(() => {
4662
4706
  ($ || ne) && (at.current = null);
4663
4707
  }, [$, ne]), U(() => {
4664
4708
  ee || (ge(!1), C.selectedQuote && F({ type: "CLEAR_QUOTE" }));
4665
4709
  }, [ee, C.selectedQuote, F]);
4666
- const Ie = V(() => {
4710
+ const Ie = j(() => {
4667
4711
  if (ve) {
4668
4712
  const x = H ? ve.cryptoAmount : ve.fiatAmount;
4669
4713
  if (x) return x;
4670
4714
  }
4671
4715
  return "0";
4672
- }, [ve, H]), At = M(Ie);
4716
+ }, [ve, H]), Rt = I(Ie);
4673
4717
  U(() => {
4674
- if (Ie !== At.current && Ie !== "0" && At.current !== "0") {
4718
+ if (Ie !== Rt.current && Ie !== "0" && Rt.current !== "0") {
4675
4719
  Gt(!0);
4676
4720
  const x = setTimeout(() => Gt(!1), 500);
4677
4721
  return () => clearTimeout(x);
4678
4722
  }
4679
- At.current = Ie;
4723
+ Rt.current = Ie;
4680
4724
  }, [Ie]);
4681
- const nt = !!(ie && q && H && Ea(re) && we), Da = nt && re.toUpperCase().includes(xe.toUpperCase()), Xt = nt && ee > 0 ? Bt(Da ? ee : ee / we) : null, Ba = nt && Xt ? Xt : Ie, Ha = V(() => {
4725
+ const nt = !!(ie && q && H && Ea(re) && we), Da = nt && re.toUpperCase().includes(xe.toUpperCase()), Xt = nt && ee > 0 ? Bt(Da ? ee : ee / we) : null, Ba = nt && Xt ? Xt : Ie, Ha = j(() => {
4682
4726
  var Y, De, Ge;
4683
4727
  const x = we || ((Y = at.current) == null ? void 0 : Y.rate), S = we ? re : (De = at.current) == null ? void 0 : De.crypto, W = we ? xe : (Ge = at.current) == null ? void 0 : Ge.fiat;
4684
4728
  return !x || !S || !W ? "" : `1 ${S} ≈ ${x.toFixed(2)} ${W}`;
@@ -4717,36 +4761,36 @@ function Rr({
4717
4761
  clearTimeout(Nt.current), W.abort();
4718
4762
  };
4719
4763
  }, [C.walletAddress, C.network, ce.apiUrl]);
4720
- const ut = !Rt || ee === 0, Tt = ee > 0 && (H ? ee < ua : ee < ma), Pa = !!he || Tt || lt && ut, Oa = ee > 0 && !he && !Tt, Yt = C.walletAddress.trim().length >= 10 && et !== !1 && !je, Qt = Oa && (H ? Yt : !0) && !!C.cryptoCurrency && !!C.network, Ka = (x) => {
4764
+ const ut = !At || ee === 0, Tt = ee > 0 && (H ? ee < ua : ee < ma), Pa = !!he || Tt || lt && ut, Oa = ee > 0 && !he && !Tt, Yt = C.walletAddress.trim().length >= 10 && et !== !1 && !je, Qt = Oa && (H ? Yt : !0) && !!C.cryptoCurrency && !!C.network, Ka = (x) => {
4721
4765
  let S = x.target.value.replace(/[^0-9.,]/g, "");
4722
4766
  const W = H ? 2 : 6, Y = S.indexOf(".");
4723
4767
  Y !== -1 && S.length - Y - 1 > W && (S = S.slice(0, Y + W + 1)), F(H ? { type: "SET_FIAT_AMOUNT", amount: S } : { type: "SET_CRYPTO_AMOUNT", amount: S });
4724
4768
  }, _a = (x) => {
4725
4769
  x !== dt && F({ type: "SET_FLOW_TYPE", flowType: x, fieldLocks: le });
4726
- }, ja = O(
4770
+ }, ja = P(
4727
4771
  (x) => {
4728
4772
  F({ type: "SET_FIAT_CURRENCY", currency: x });
4729
4773
  },
4730
4774
  [F]
4731
- ), Va = O(
4775
+ ), Va = P(
4732
4776
  (x, S) => {
4733
4777
  F({ type: "SET_CRYPTO_CURRENCY", currency: x }), F({ type: "SET_CRYPTO_CHAIN", chain: S });
4734
4778
  },
4735
4779
  [F]
4736
- ), Wa = O(
4780
+ ), Wa = P(
4737
4781
  (x) => {
4738
4782
  F({ type: "SET_PAYMENT_METHOD", methodId: x });
4739
4783
  },
4740
4784
  [F]
4741
- ), Ga = O(
4785
+ ), Ga = P(
4742
4786
  (x) => {
4743
- F({ type: "SET_COUNTRY", country: x }), j(null);
4787
+ F({ type: "SET_COUNTRY", country: x }), V(null);
4744
4788
  },
4745
4789
  [F]
4746
- ), $a = O(() => {
4747
- j(null), setTimeout(() => j("country"), 280);
4748
- }, []), Za = O(() => {
4749
- j(null), setTimeout(() => j("language"), 280);
4790
+ ), $a = P(() => {
4791
+ V(null), setTimeout(() => V("country"), 280);
4792
+ }, []), Za = P(() => {
4793
+ V(null), setTimeout(() => V("language"), 280);
4750
4794
  }, []), Xa = C.country ? (na = Ot[C.country.toLowerCase()]) == null ? void 0 : na.name : void 0, Ya = () => {
4751
4795
  if (!Qt) {
4752
4796
  (Pa || ut) && (Z(!0), $t(!0), setTimeout(() => $t(!1), 400));
@@ -4758,27 +4802,27 @@ function Rr({
4758
4802
  });
4759
4803
  return;
4760
4804
  }
4761
- A(!0), pe();
4805
+ R(!0), pe();
4762
4806
  };
4763
4807
  U(() => {
4764
4808
  var x;
4765
4809
  if (!(!v || b)) {
4766
4810
  if (E != null && E.bestQuote)
4767
- A(!1), F({ type: "SELECT_QUOTE", quote: E.bestQuote }), Se().catch((S) => {
4811
+ R(!1), F({ type: "SELECT_QUOTE", quote: E.bestQuote }), Se().catch((S) => {
4768
4812
  _({ type: "error", title: L("toast.orderFailed"), desc: S instanceof Error ? S.message : L("toast.couldNotCreate") });
4769
4813
  });
4770
4814
  else if (ne) {
4771
- A(!1);
4815
+ R(!1);
4772
4816
  const S = ne.message || L("error.noProviders");
4773
4817
  F({ type: "SET_ERROR", message: S }), _({ type: "error", title: L("toast.quoteError"), desc: S });
4774
4818
  } else if (E && !E.bestQuote) {
4775
- A(!1);
4819
+ R(!1);
4776
4820
  const S = (x = E.unavailableGateways) == null ? void 0 : x.map((Y) => Y.reason).filter(Boolean), W = S != null && S.length ? `${L("error.noProviders")}: ${S.join("; ")}` : L("error.noProviders");
4777
4821
  F({ type: "SET_ERROR", message: W }), _({ type: "error", title: L("toast.noProviders"), desc: W });
4778
4822
  }
4779
4823
  }
4780
4824
  }, [v, E, b, ne, F, Se]);
4781
- const zt = M(C.step);
4825
+ const zt = I(C.step);
4782
4826
  U(() => {
4783
4827
  const x = zt.current;
4784
4828
  zt.current = C.step, x !== C.step && (C.step === "checkout" ? _({ type: "success", title: L("toast.orderCreated"), desc: L("toast.redirecting") }) : C.step === "error" && C.errorMessage && _({ type: "error", title: L("toast.somethingWrong"), desc: C.errorMessage }));
@@ -4808,12 +4852,12 @@ function Rr({
4808
4852
  "--t-cta-bg": mt.accent,
4809
4853
  "--t-cta-text": qt(mt.accent)
4810
4854
  }, me = {};
4811
- d && Ce(d) && (me["--t-surface"] = d, me["--t-modal-bg"] = d), s && Ce(s) && (me["--t-pill-bg"] = s, me["--t-close-bg"] = s), h && Ce(h) && (me["--t-text"] = h), p && Ce(p) && (me["--t-text-secondary"] = p), f && Ce(f) && (me["--t-text-muted"] = f, me["--t-text-tertiary"] = f), g && Ce(g) && (me["--t-success"] = g);
4855
+ u && Ce(u) && (me["--t-surface"] = u, me["--t-modal-bg"] = u), s && Ce(s) && (me["--t-pill-bg"] = s, me["--t-close-bg"] = s), h && Ce(h) && (me["--t-text"] = h), m && Ce(m) && (me["--t-text-secondary"] = m), f && Ce(f) && (me["--t-text-muted"] = f, me["--t-text-tertiary"] = f), g && Ce(g) && (me["--t-success"] = g);
4812
4856
  const Me = {};
4813
- o && Ce(o) ? Me.backgroundColor = o : Me.backgroundColor = "var(--t-bg)", c && (c.startsWith("https://") || c.startsWith("data:image/")) && (Me.backgroundImage = `url(${c})`, Me.backgroundSize = "cover", Me.backgroundPosition = "center");
4857
+ o && Ce(o) ? Me.backgroundColor = o : Me.backgroundColor = "var(--t-bg)", l && (l.startsWith("https://") || l.startsWith("data:image/")) && (Me.backgroundImage = `url(${l})`, Me.backgroundSize = "cover", Me.backgroundPosition = "center");
4814
4858
  const pt = {};
4815
- u && Ce(u) && (pt.border = `1px solid ${u}`), l && (pt.borderRadius = l);
4816
- const rt = C.network, We = rt ? yt(rt) : null, ta = (We == null ? void 0 : We.shortName) || (We == null ? void 0 : We.name) || rt, Ja = he || (lt && (Tt || ut) ? ut ? L("error.amountZero") : H ? L("error.minAmountFiat", { min: String(ua), currency: xe }) : L("error.minAmountCrypto", { min: String(ma), currency: re }) : void 0), qa = C.walletError ? C.walletError : bt && !Yt && !je ? L("wallet.invalid") : void 0, Lt = oe.filter((x) => x.supportedFiats.includes(C.fiatCurrency)), en = Lt.find((x) => x.id === C.paymentMethodId) || Lt[0], aa = C.step === "checkout" ? /* @__PURE__ */ e(bn, { autoRedirect: N }) : C.step === "processing" ? /* @__PURE__ */ e(wn, {}) : C.step === "complete" ? /* @__PURE__ */ e(kn, { explorerUrl: K, doneButtonText: z, onDone: ae }) : C.step === "error" ? /* @__PURE__ */ e(Nn, { supportEmail: J, onDone: ae, doneButtonText: z }) : C.step === "confirm" ? /* @__PURE__ */ e(Un, { stablecoinParity: nt, partnerName: q }) : null;
4859
+ d && Ce(d) && (pt.border = `1px solid ${d}`), c && (pt.borderRadius = c);
4860
+ const rt = C.network, We = rt ? yt(rt) : null, ta = (We == null ? void 0 : We.shortName) || (We == null ? void 0 : We.name) || rt, Ja = he || (lt && (Tt || ut) ? ut ? L("error.amountZero") : H ? L("error.minAmountFiat", { min: String(ua), currency: xe }) : L("error.minAmountCrypto", { min: String(ma), currency: re }) : void 0), qa = C.walletError ? C.walletError : bt && !Yt && !je ? L("wallet.invalid") : void 0, Lt = oe.filter((x) => x.supportedFiats.includes(C.fiatCurrency)), en = Lt.find((x) => x.id === C.paymentMethodId) || Lt[0], aa = C.step === "checkout" ? /* @__PURE__ */ e(Nn, { autoRedirect: N }) : C.step === "processing" ? /* @__PURE__ */ e(An, {}) : C.step === "complete" ? /* @__PURE__ */ e(Rn, { explorerUrl: K, doneButtonText: z, onDone: ae }) : C.step === "error" ? /* @__PURE__ */ e(Tn, { supportEmail: J, onDone: ae, doneButtonText: z }) : C.step === "confirm" ? /* @__PURE__ */ e(Bn, { stablecoinParity: nt, partnerName: q }) : null;
4817
4861
  return aa ? /* @__PURE__ */ e(
4818
4862
  "div",
4819
4863
  {
@@ -4844,25 +4888,25 @@ function Rr({
4844
4888
  },
4845
4889
  children: [
4846
4890
  /* @__PURE__ */ e(
4847
- dr,
4891
+ hr,
4848
4892
  {
4849
4893
  tab: dt,
4850
4894
  onTabSwitch: _a,
4851
4895
  showFlowToggle: k,
4852
- showSettings: R,
4853
- onOpenSettings: () => j("settings"),
4896
+ showSettings: A,
4897
+ onOpenSettings: () => V("settings"),
4854
4898
  darkMode: se
4855
4899
  }
4856
4900
  ),
4857
- tt || wt || D ? /* @__PURE__ */ e("div", { className: "pt-[88px] px-3 flex-1 flex flex-col", children: D ? /* @__PURE__ */ e(In, {}) : /* @__PURE__ */ e(Zn, {}) }) : /* @__PURE__ */ i("div", { className: "flex-1 overflow-hidden pt-[88px] px-3 flex flex-col gap-1 tab-fade-in", children: [
4901
+ tt || wt || D ? /* @__PURE__ */ e("div", { className: "pt-[88px] px-3 flex-1 flex flex-col", children: D ? /* @__PURE__ */ e(Hn, {}) : /* @__PURE__ */ e(zn, {}) }) : /* @__PURE__ */ i("div", { className: "flex-1 overflow-hidden pt-[88px] px-3 flex flex-col gap-1 tab-fade-in", children: [
4858
4902
  /* @__PURE__ */ e(
4859
- ur,
4903
+ fr,
4860
4904
  {
4861
- amount: Rt,
4905
+ amount: At,
4862
4906
  onAmountChange: Ka,
4863
4907
  currencyCode: H ? xe : re,
4864
4908
  isBuy: H,
4865
- onOpenModal: () => j(H ? "fiat" : "crypto"),
4909
+ onOpenModal: () => V(H ? "fiat" : "crypto"),
4866
4910
  assetBaseUrl: X,
4867
4911
  error: Ja,
4868
4912
  fieldLocks: le,
@@ -4875,14 +4919,14 @@ function Rr({
4875
4919
  }
4876
4920
  ),
4877
4921
  /* @__PURE__ */ e(
4878
- hr,
4922
+ xr,
4879
4923
  {
4880
4924
  amount: Ba,
4881
4925
  currencyCode: H ? re : xe,
4882
4926
  chainCode: H ? rt : void 0,
4883
4927
  chainDisplay: H ? ta : void 0,
4884
4928
  isBuy: H,
4885
- onOpenModal: () => j(H ? "crypto" : "fiat"),
4929
+ onOpenModal: () => V(H ? "crypto" : "fiat"),
4886
4930
  displayRate: Ha,
4887
4931
  assetBaseUrl: X,
4888
4932
  quotesLoading: b,
@@ -4919,19 +4963,19 @@ function Rr({
4919
4963
  }
4920
4964
  ),
4921
4965
  (E || b) && /* @__PURE__ */ e(
4922
- yr,
4966
+ Cr,
4923
4967
  {
4924
4968
  selectedQuote: C.selectedQuote,
4925
4969
  quotesLoading: b,
4926
- onOpenModal: () => j("provider"),
4970
+ onOpenModal: () => V("provider"),
4927
4971
  assetBaseUrl: X
4928
4972
  }
4929
4973
  ),
4930
- (oe.length > 0 || (m == null ? void 0 : m.paymentMethods) && m.paymentMethods.length > 0) && (Lt.length > 0 ? /* @__PURE__ */ e(
4931
- fr,
4974
+ (oe.length > 0 || (p == null ? void 0 : p.paymentMethods) && p.paymentMethods.length > 0) && (Lt.length > 0 ? /* @__PURE__ */ e(
4975
+ vr,
4932
4976
  {
4933
4977
  selectedMethod: en,
4934
- onOpenModal: () => j("payment"),
4978
+ onOpenModal: () => V("payment"),
4935
4979
  darkMode: se,
4936
4980
  getMethodIcon: Wt,
4937
4981
  getMethodDisplayName: (x, S) => Vt(x, S, L, !0)
@@ -4949,7 +4993,7 @@ function Rr({
4949
4993
  }
4950
4994
  )),
4951
4995
  H && /* @__PURE__ */ e(
4952
- wr,
4996
+ Ar,
4953
4997
  {
4954
4998
  address: C.walletAddress,
4955
4999
  onChange: (x) => F({ type: "SET_WALLET_ADDRESS", address: x }),
@@ -4969,7 +5013,7 @@ function Rr({
4969
5013
  ye && /* @__PURE__ */ e("div", { className: "text-[12px] text-center mb-2", style: { color: "var(--t-error)" }, children: L(H ? "error.currencyUnavailableBuy" : "error.currencyUnavailableSell") }),
4970
5014
  /* @__PURE__ */ i("div", { className: "flex flex-col gap-3 pb-3", children: [
4971
5015
  /* @__PURE__ */ e(
4972
- kr,
5016
+ Rr,
4973
5017
  {
4974
5018
  label: H ? L("cta.buy", { crypto: re }) : L("cta.sell", { crypto: re }),
4975
5019
  disabled: !Qt || Te || v || ye || $,
@@ -4977,21 +5021,21 @@ function Rr({
4977
5021
  onClick: Ya
4978
5022
  }
4979
5023
  ),
4980
- /* @__PURE__ */ e(Nr, {})
5024
+ /* @__PURE__ */ e(Tr, {})
4981
5025
  ] })
4982
5026
  ] }, dt),
4983
- I && /* @__PURE__ */ e(
4984
- $n,
5027
+ M && /* @__PURE__ */ e(
5028
+ Qn,
4985
5029
  {
4986
- type: I.type,
4987
- title: I.title,
4988
- description: I.desc,
4989
- visible: !!I,
5030
+ type: M.type,
5031
+ title: M.title,
5032
+ description: M.desc,
5033
+ visible: !!M,
4990
5034
  onDismiss: () => _(null)
4991
5035
  }
4992
5036
  ),
4993
- /* @__PURE__ */ e(Xn, { isOpen: ue, onClose: () => ge(!1), children: /* @__PURE__ */ e(
4994
- Er,
5037
+ /* @__PURE__ */ e(Jn, { isOpen: ue, onClose: () => ge(!1), children: /* @__PURE__ */ e(
5038
+ Lr,
4995
5039
  {
4996
5040
  quote: ve,
4997
5041
  isOpen: ue,
@@ -5000,8 +5044,8 @@ function Rr({
5000
5044
  quotesLoading: b
5001
5045
  }
5002
5046
  ) }),
5003
- /* @__PURE__ */ e(Pe, { isOpen: de === "fiat", onClose: () => j(null), children: (x) => /* @__PURE__ */ e(
5004
- Qn,
5047
+ /* @__PURE__ */ e(Pe, { isOpen: de === "fiat", onClose: () => V(null), children: (x) => /* @__PURE__ */ e(
5048
+ er,
5005
5049
  {
5006
5050
  onClose: x,
5007
5051
  onSelect: (S) => {
@@ -5012,8 +5056,8 @@ function Rr({
5012
5056
  selectedCode: C.fiatCurrency
5013
5057
  }
5014
5058
  ) }),
5015
- /* @__PURE__ */ e(Pe, { isOpen: de === "crypto", onClose: () => j(null), children: (x) => /* @__PURE__ */ e(
5016
- zn,
5059
+ /* @__PURE__ */ e(Pe, { isOpen: de === "crypto", onClose: () => V(null), children: (x) => /* @__PURE__ */ e(
5060
+ tr,
5017
5061
  {
5018
5062
  onClose: x,
5019
5063
  onSelect: (S, W) => {
@@ -5032,8 +5076,8 @@ function Rr({
5032
5076
  selectedChain: C.network
5033
5077
  }
5034
5078
  ) }),
5035
- /* @__PURE__ */ e(Pe, { isOpen: de === "payment", onClose: () => j(null), children: (x) => /* @__PURE__ */ e(
5036
- ar,
5079
+ /* @__PURE__ */ e(Pe, { isOpen: de === "payment", onClose: () => V(null), children: (x) => /* @__PURE__ */ e(
5080
+ ir,
5037
5081
  {
5038
5082
  methods: oe,
5039
5083
  selectedId: C.paymentMethodId,
@@ -5043,8 +5087,8 @@ function Rr({
5043
5087
  onClose: x
5044
5088
  }
5045
5089
  ) }),
5046
- /* @__PURE__ */ e(Pe, { isOpen: de === "provider", onClose: () => j(null), children: (x) => /* @__PURE__ */ e(
5047
- Sr,
5090
+ /* @__PURE__ */ e(Pe, { isOpen: de === "provider", onClose: () => V(null), children: (x) => /* @__PURE__ */ e(
5091
+ Er,
5048
5092
  {
5049
5093
  quotes: E,
5050
5094
  quotesLoading: b,
@@ -5057,8 +5101,8 @@ function Rr({
5057
5101
  onClose: x
5058
5102
  }
5059
5103
  ) }),
5060
- /* @__PURE__ */ e(Pe, { isOpen: de === "settings", onClose: () => j(null), variant: "right", children: (x) => /* @__PURE__ */ e(
5061
- or,
5104
+ /* @__PURE__ */ e(Pe, { isOpen: de === "settings", onClose: () => V(null), variant: "right", children: (x) => /* @__PURE__ */ e(
5105
+ sr,
5062
5106
  {
5063
5107
  onClose: x,
5064
5108
  darkMode: se,
@@ -5075,8 +5119,8 @@ function Rr({
5075
5119
  assetBaseUrl: X
5076
5120
  }
5077
5121
  ) }),
5078
- /* @__PURE__ */ e(Pe, { isOpen: de === "country", onClose: () => j(null), children: (x) => /* @__PURE__ */ e(
5079
- lr,
5122
+ /* @__PURE__ */ e(Pe, { isOpen: de === "country", onClose: () => V(null), children: (x) => /* @__PURE__ */ e(
5123
+ ur,
5080
5124
  {
5081
5125
  onClose: x,
5082
5126
  onSelect: (S) => {
@@ -5086,8 +5130,8 @@ function Rr({
5086
5130
  selectedCode: C.country
5087
5131
  }
5088
5132
  ) }),
5089
- /* @__PURE__ */ e(Pe, { isOpen: de === "language", onClose: () => j(null), children: (x) => /* @__PURE__ */ e(
5090
- sr,
5133
+ /* @__PURE__ */ e(Pe, { isOpen: de === "language", onClose: () => V(null), children: (x) => /* @__PURE__ */ e(
5134
+ pr,
5091
5135
  {
5092
5136
  onClose: x,
5093
5137
  onSelect: (S) => {
@@ -5100,23 +5144,23 @@ function Rr({
5100
5144
  }
5101
5145
  );
5102
5146
  }
5103
- function Ar({
5147
+ function Ur({
5104
5148
  projectId: t,
5105
5149
  apiUrl: a,
5106
5150
  assetBaseUrl: n,
5107
5151
  flowType: r,
5108
5152
  customerId: o,
5109
- brandId: c,
5110
- defaultFiatCurrency: u,
5111
- defaultCryptoCurrency: l,
5112
- defaultNetwork: d,
5153
+ brandId: l,
5154
+ defaultFiatCurrency: d,
5155
+ defaultCryptoCurrency: c,
5156
+ defaultNetwork: u,
5113
5157
  defaultFiatAmount: s,
5114
5158
  defaultCryptoAmount: h,
5115
- defaultWalletAddress: p,
5159
+ defaultWalletAddress: m,
5116
5160
  defaultGateway: f,
5117
5161
  defaultCountry: g,
5118
5162
  fieldLocks: k,
5119
- partnerMetadata: R,
5163
+ partnerMetadata: A,
5120
5164
  statusPollInterval: y,
5121
5165
  onComplete: N,
5122
5166
  onError: K,
@@ -5130,7 +5174,7 @@ function Ar({
5130
5174
  borderRadius: L,
5131
5175
  surfaceColor: C,
5132
5176
  inputBgColor: F,
5133
- textColor: m,
5177
+ textColor: p,
5134
5178
  textSecondaryColor: D,
5135
5179
  textMutedColor: E,
5136
5180
  successColor: b,
@@ -5155,22 +5199,22 @@ function Ar({
5155
5199
  assetBaseUrl: n,
5156
5200
  flowType: r,
5157
5201
  customerId: o,
5158
- brandId: c,
5159
- defaultFiatCurrency: u,
5160
- defaultCryptoCurrency: l,
5161
- defaultNetwork: d,
5202
+ brandId: l,
5203
+ defaultFiatCurrency: d,
5204
+ defaultCryptoCurrency: c,
5205
+ defaultNetwork: u,
5162
5206
  defaultFiatAmount: s,
5163
5207
  defaultCryptoAmount: h,
5164
- defaultWalletAddress: p,
5208
+ defaultWalletAddress: m,
5165
5209
  defaultGateway: f,
5166
5210
  defaultCountry: g,
5167
5211
  fieldLocks: k,
5168
- partnerMetadata: R,
5212
+ partnerMetadata: A,
5169
5213
  statusPollInterval: y,
5170
5214
  onComplete: N,
5171
5215
  onError: K,
5172
5216
  children: /* @__PURE__ */ e(vn, { defaultLocale: oe || "en", children: /* @__PURE__ */ e(
5173
- Rr,
5217
+ Fr,
5174
5218
  {
5175
5219
  className: z,
5176
5220
  theme: J,
@@ -5182,7 +5226,7 @@ function Ar({
5182
5226
  borderRadius: L,
5183
5227
  surfaceColor: C,
5184
5228
  inputBgColor: F,
5185
- textColor: m,
5229
+ textColor: p,
5186
5230
  textSecondaryColor: D,
5187
5231
  textMutedColor: E,
5188
5232
  successColor: b,
@@ -5202,35 +5246,35 @@ function Ar({
5202
5246
  }
5203
5247
  );
5204
5248
  }
5205
- function Gr({
5249
+ function Yr({
5206
5250
  submitButtonText: t,
5207
5251
  rateRefreshInterval: a,
5208
5252
  ...n
5209
5253
  }) {
5210
- return /* @__PURE__ */ e(Ar, { ...n });
5254
+ return /* @__PURE__ */ e(Ur, { ...n });
5211
5255
  }
5212
- function $r({
5256
+ function Qr({
5213
5257
  skin: t,
5214
5258
  active: a,
5215
5259
  onClick: n,
5216
5260
  darkMode: r,
5217
5261
  dimmed: o
5218
5262
  }) {
5219
- const c = t.accent === null, u = 32;
5263
+ const l = t.accent === null, d = 32;
5220
5264
  return /* @__PURE__ */ i(
5221
5265
  "button",
5222
5266
  {
5223
5267
  onClick: n,
5224
5268
  className: "relative shrink-0",
5225
- style: { width: u, height: u, opacity: o ? 0.4 : 1, transition: "opacity 0.2s" },
5269
+ style: { width: d, height: d, opacity: o ? 0.4 : 1, transition: "opacity 0.2s" },
5226
5270
  children: [
5227
- c ? /* @__PURE__ */ i("svg", { width: u, height: u, viewBox: "0 0 32 32", children: [
5271
+ l ? /* @__PURE__ */ i("svg", { width: d, height: d, viewBox: "0 0 32 32", children: [
5228
5272
  /* @__PURE__ */ e("clipPath", { id: "mono-left", children: /* @__PURE__ */ e("rect", { x: "0", y: "0", width: "16", height: "32" }) }),
5229
5273
  /* @__PURE__ */ e("clipPath", { id: "mono-right", children: /* @__PURE__ */ e("rect", { x: "16", y: "0", width: "16", height: "32" }) }),
5230
5274
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "#111111", clipPath: "url(#mono-left)" }),
5231
5275
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "#ffffff", clipPath: "url(#mono-right)" }),
5232
5276
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "none", stroke: r ? "rgba(255,255,255,0.15)" : "rgba(0,0,0,0.1)", strokeWidth: "1" })
5233
- ] }) : /* @__PURE__ */ e("svg", { width: u, height: u, viewBox: "0 0 32 32", children: /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: t.accent }) }),
5277
+ ] }) : /* @__PURE__ */ e("svg", { width: d, height: d, viewBox: "0 0 32 32", children: /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: t.accent }) }),
5234
5278
  a && !o && /* @__PURE__ */ e(
5235
5279
  "div",
5236
5280
  {
@@ -5243,94 +5287,94 @@ function $r({
5243
5287
  );
5244
5288
  }
5245
5289
  export {
5246
- mr as AnimatedDigit,
5247
- pr as AnimatedNumber,
5248
- Dr as ApplePayIcon,
5249
- Vr as ArrowUpIcon,
5290
+ yr as AnimatedDigit,
5291
+ gr as AnimatedNumber,
5292
+ Or as ApplePayIcon,
5293
+ Zr as ArrowUpIcon,
5250
5294
  ot as BLOCKCHAINS,
5251
- Mr as BankIcon,
5252
- Xn as BottomSheet,
5295
+ Pr as BankIcon,
5296
+ Jn as BottomSheet,
5253
5297
  ft as COUNTRIES,
5254
5298
  Ot as COUNTRY_MAP,
5255
- Fn as CRYPTO_CHAIN_COMBOS,
5299
+ Dn as CRYPTO_CHAIN_COMBOS,
5256
5300
  wa as CRYPTO_CURRENCIES,
5257
- Hr as CardIcon,
5258
- Wn as CheckmarkIcon,
5259
- Gr as CheckoutForm,
5260
- bn as CheckoutStep,
5261
- Re as ChevronDown,
5262
- Pn as ChevronRight,
5263
- Sr as ChooseRampModal,
5301
+ _r as CardIcon,
5302
+ Xn as CheckmarkIcon,
5303
+ Yr as CheckoutForm,
5304
+ Nn as CheckoutStep,
5305
+ Ae as ChevronDown,
5306
+ jn as ChevronRight,
5307
+ Er as ChooseRampModal,
5264
5308
  Oe as CloseButton,
5265
- Pr as CoinifyIcon,
5266
- kn as CompleteStep,
5267
- Un as ConfirmStep,
5268
- lr as CountryPickerModal,
5269
- zn as CryptoCurrencyModal,
5270
- Aa as CryptoIcon,
5271
- kr as CtaButton,
5272
- Kr as DarkModeIcon,
5273
- Nn as ErrorStep,
5309
+ jr as CoinifyIcon,
5310
+ Rn as CompleteStep,
5311
+ Bn as ConfirmStep,
5312
+ ur as CountryPickerModal,
5313
+ tr as CryptoCurrencyModal,
5314
+ Ra as CryptoIcon,
5315
+ Rr as CtaButton,
5316
+ Wr as DarkModeIcon,
5317
+ Tn as ErrorStep,
5274
5318
  ca as FIAT_CURRENCIES,
5275
- Rn as FIAT_TO_COUNTRY,
5276
- Qn as FiatCurrencyModal,
5319
+ Fn as FIAT_TO_COUNTRY,
5320
+ er as FiatCurrencyModal,
5277
5321
  jt as FiatFlag,
5278
- Nr as Footer,
5279
- In as FormSkeleton,
5322
+ Tr as Footer,
5323
+ Hn as FormSkeleton,
5280
5324
  Ta as GenericCoinIcon,
5281
- Br as GooglePayIcon,
5282
- dr as HeaderBar,
5325
+ Kr as GooglePayIcon,
5326
+ hr as HeaderBar,
5283
5327
  vn as I18nProvider,
5284
5328
  Ht as InfoIcon,
5285
5329
  Ze as LANGUAGES,
5286
- Zn as LoadingScreen,
5330
+ zn as LoadingScreen,
5287
5331
  da as MOCK_RATES,
5288
- Or as MenuIcon,
5332
+ Vr as MenuIcon,
5289
5333
  Pe as Modal,
5290
- Vn as MoreDotsIcon,
5291
- Ae as NRLogo,
5292
- _r as NRLogoIcon,
5293
- Dn as PayPalIcon,
5294
- _n as PaymentAppleIcon,
5295
- On as PaymentBankIcon,
5296
- fr as PaymentCard,
5297
- Kn as PaymentCardsIcon,
5298
- jn as PaymentGoogleIcon,
5299
- Wr as PaymentMethodSelector,
5300
- wn as ProcessingStep,
5301
- Ar as RampForm,
5334
+ Zn as MoreDotsIcon,
5335
+ Re as NRLogo,
5336
+ Gr as NRLogoIcon,
5337
+ On as PayPalIcon,
5338
+ Gn as PaymentAppleIcon,
5339
+ Vn as PaymentBankIcon,
5340
+ vr as PaymentCard,
5341
+ Wn as PaymentCardsIcon,
5342
+ $n as PaymentGoogleIcon,
5343
+ Xr as PaymentMethodSelector,
5344
+ An as ProcessingStep,
5345
+ Ur as RampForm,
5302
5346
  xn as RampProvider,
5303
- Er as RateBreakdown,
5304
- hr as ReceiveCard,
5347
+ Lr as RateBreakdown,
5348
+ xr as ReceiveCard,
5305
5349
  Cn as RedirectScreen,
5306
- Mn as RevolutIcon,
5350
+ Pn as RevolutIcon,
5307
5351
  sa as SKINS,
5308
- jr as SearchIcon,
5352
+ $r as SearchIcon,
5309
5353
  Ye as SearchInput,
5310
- or as SettingsScreen,
5354
+ sr as SettingsScreen,
5311
5355
  Q as Skeleton,
5312
- $r as SkinSwatch,
5313
- ur as SpendCard,
5356
+ Qr as SkinSwatch,
5357
+ fr as SpendCard,
5314
5358
  Ee as Spinner,
5315
- $n as Toast,
5316
- nr as ToggleSwitch,
5317
- wr as WalletCard,
5359
+ Qn as Toast,
5360
+ lr as ToggleSwitch,
5361
+ Ar as WalletCard,
5318
5362
  Pt as XIcon,
5319
5363
  Bt as formatOutput,
5320
5364
  Dt as getChainIconUrl,
5321
5365
  ka as getCryptoIconUrl,
5322
5366
  Mt as getDefaultFiatForCountry,
5323
- An as getFiatFlagUrl,
5324
- Ir as getMockRate,
5325
- Gn as getPaymentIcon,
5367
+ Un as getFiatFlagUrl,
5368
+ Hr as getMockRate,
5369
+ Yn as getPaymentIcon,
5326
5370
  Ea as isStablecoin,
5327
- Ln as parseAmount,
5371
+ Mn as parseAmount,
5328
5372
  on as useCheckoutIntent,
5329
5373
  _t as useI18n,
5330
5374
  rn as useQuotes,
5331
5375
  Xe as useRamp,
5332
5376
  nn as useRampConfig,
5333
- P as useT,
5377
+ O as useT,
5334
5378
  ln as useTransaction
5335
5379
  };
5336
5380
  //# sourceMappingURL=index.js.map