@nowramp/form 0.1.79 → 0.1.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8,13 +8,13 @@
8
8
  }`;
9
9
  document.head.appendChild(s);
10
10
  })();
11
- import { jsx as e, jsxs as l, Fragment as q } from "react/jsx-runtime";
12
- import ye, { useState as N, useRef as I, useCallback as P, useEffect as Z, useMemo as $, useReducer as Ca, useContext as ga, createContext as xa } from "react";
13
- import { RampApi as et } from "@nowramp/sdk";
14
- import { createPortal as Ot } from "react-dom";
15
- function va(t, a, n) {
11
+ import { jsx as e, jsxs as l, Fragment as ee } from "react/jsx-runtime";
12
+ import ge, { useState as N, useRef as I, useCallback as P, useEffect as Z, useMemo as j, useReducer as xa, useContext as va, createContext as ba } from "react";
13
+ import { RampApi as at } from "@nowramp/sdk";
14
+ import { createPortal as Pt } from "react-dom";
15
+ function Sa(t, a, n) {
16
16
  const [r, o] = N(null), [d, u] = N(!0), [i, s] = N(null), m = I(null);
17
- (!m.current || m.current !== t) && (m.current = new et({ apiKey: "", ...t }));
17
+ (!m.current || m.current !== t) && (m.current = new at({ apiKey: "", ...t }));
18
18
  const h = P(async () => {
19
19
  if (!t.projectId) {
20
20
  s(new Error("projectId is required")), u(!1);
@@ -36,9 +36,9 @@ function va(t, a, n) {
36
36
  h();
37
37
  }, [h]), { config: r, loading: d, error: i, refetch: h };
38
38
  }
39
- function Sa(t, a) {
39
+ function Na(t, a) {
40
40
  const [n, r] = N(null), [o, d] = N(!1), [u, i] = N(null), s = I(null), m = I(""), h = `${t.apiUrl}|${t.projectId}`;
41
- (!s.current || m.current !== h) && (s.current = new et({ apiKey: "", ...t }), m.current = h);
41
+ (!s.current || m.current !== h) && (s.current = new at({ apiKey: "", ...t }), m.current = h);
42
42
  const f = I(0);
43
43
  Z(() => {
44
44
  const x = ++f.current;
@@ -70,9 +70,9 @@ function Sa(t, a) {
70
70
  }, [t.projectId, a]);
71
71
  return { quotes: n, loading: o, error: u, refetch: p };
72
72
  }
73
- function ba(t) {
73
+ function wa(t) {
74
74
  const [a, n] = N(null), [r, o] = N(!1), [d, u] = N(null), i = I(null), s = I(""), m = `${t.apiUrl}|${t.projectId}`;
75
- (!i.current || s.current !== m) && (i.current = new et({ apiKey: "", ...t }), s.current = m);
75
+ (!i.current || s.current !== m) && (i.current = new at({ apiKey: "", ...t }), s.current = m);
76
76
  const h = P(async (p) => {
77
77
  o(!0), u(null);
78
78
  try {
@@ -89,9 +89,9 @@ function ba(t) {
89
89
  }, []);
90
90
  return { order: a, loading: r, error: d, createOrder: h, reset: f };
91
91
  }
92
- function Na(t, a, n) {
92
+ function Ea(t, a, n) {
93
93
  const [r, o] = N(null), [d, u] = N(!1), [i, s] = N(null), m = I(null);
94
- m.current || (m.current = new et({ apiKey: "", projectId: "", ...t }));
94
+ m.current || (m.current = new at({ apiKey: "", projectId: "", ...t }));
95
95
  const h = P(async () => {
96
96
  if (a) {
97
97
  u(!0), s(null);
@@ -120,7 +120,7 @@ function Na(t, a, n) {
120
120
  return () => clearInterval(p);
121
121
  }, [a, n == null ? void 0 : n.pollInterval, r == null ? void 0 : r.status, h]), { status: r, loading: d, error: i, refetch: h };
122
122
  }
123
- const Je = [
123
+ const et = [
124
124
  { code: "ad", name: "Andorra", defaultFiat: "EUR" },
125
125
  { code: "ae", name: "United Arab Emirates", defaultFiat: "AED" },
126
126
  { code: "af", name: "Afghanistan", defaultFiat: "USD" },
@@ -312,26 +312,26 @@ const Je = [
312
312
  { code: "za", name: "South Africa", defaultFiat: "ZAR" },
313
313
  { code: "zm", name: "Zambia", defaultFiat: "USD" },
314
314
  { code: "zw", name: "Zimbabwe", defaultFiat: "USD" }
315
- ], ht = Object.fromEntries(
316
- Je.map((t) => [t.code, t])
315
+ ], yt = Object.fromEntries(
316
+ et.map((t) => [t.code, t])
317
317
  );
318
- function dt(t, a) {
318
+ function mt(t, a) {
319
319
  if (!t) return "USD";
320
- const n = ht[t.toLowerCase()], r = (n == null ? void 0 : n.defaultFiat) || "USD";
320
+ const n = yt[t.toLowerCase()], r = (n == null ? void 0 : n.defaultFiat) || "USD";
321
321
  return !a || a.length === 0 || a.includes(r) ? r : a.includes("USD") ? "USD" : a[0] || "USD";
322
322
  }
323
- const tt = !0;
324
- function pt(t, a, n = tt) {
323
+ const nt = !0;
324
+ function Ct(t, a, n = nt) {
325
325
  return t === void 0 || a === void 0 ? n : t.length === 0 || a.length === 0 ? !1 : t.some((r) => a.includes(r));
326
326
  }
327
- function wa(t, a, n = tt) {
328
- return t.filter((r) => pt(r.providers, a, n));
327
+ function Aa(t, a, n = nt) {
328
+ return t.filter((r) => Ct(r.providers, a, n));
329
329
  }
330
- function Ea(t, a, n = tt) {
330
+ function Ra(t, a, n = nt) {
331
331
  const r = [];
332
332
  for (const o of t) {
333
333
  const d = o.networks.filter(
334
- (u) => pt(u.providers, a, n)
334
+ (u) => Ct(u.providers, a, n)
335
335
  );
336
336
  d.length > 0 && r.push(
337
337
  d.length === o.networks.length ? o : { ...o, networks: d }
@@ -339,12 +339,12 @@ function Ea(t, a, n = tt) {
339
339
  }
340
340
  return r;
341
341
  }
342
- function Aa(t, a, n, r = tt) {
342
+ function ka(t, a, n, r = nt) {
343
343
  return n ? t.filter(
344
- (o) => o.supportedFiats.includes(n) && pt(o.providers, a, r)
344
+ (o) => o.supportedFiats.includes(n) && Ct(o.providers, a, r)
345
345
  ) : [];
346
346
  }
347
- function Ra(t, a, n) {
347
+ function Ta(t, a, n) {
348
348
  const r = {};
349
349
  let o = !1;
350
350
  if (!n.cryptoLocked && !n.networkLocked) {
@@ -388,7 +388,7 @@ function Ra(t, a, n) {
388
388
  }
389
389
  return o ? r : null;
390
390
  }
391
- function ka(t, a, n, r) {
391
+ function La(t, a, n, r) {
392
392
  var o, d, u;
393
393
  if (n.cryptoLocked) {
394
394
  const i = (o = t.cryptos) == null ? void 0 : o.find(
@@ -410,14 +410,30 @@ function ka(t, a, n, r) {
410
410
  }
411
411
  return !1;
412
412
  }
413
- function Ht(t, a) {
413
+ function Kt(t, a) {
414
414
  if (!t) return t;
415
415
  const n = t.indexOf(".");
416
416
  if (n === -1) return t;
417
417
  let r = t;
418
418
  return r.length - n - 1 > a && (r = r.slice(0, n + a + 1)), r = r.replace(/0+$/, "").replace(/\.$/, ""), r;
419
419
  }
420
- const Yt = {
420
+ function Ua(t, a, n) {
421
+ return !t && !!a && !a.bestQuote && !!n;
422
+ }
423
+ function Fa(t, a) {
424
+ if (!t.length) return null;
425
+ if (a) {
426
+ const r = t.find((o) => o.gatewayId === a);
427
+ if (r != null && r.reason) return r.reason;
428
+ }
429
+ const n = t.map((r, o) => ({ reason: r.reason, score: r.reason ? Da(r.reason) : 99, idx: o })).filter((r) => r.reason);
430
+ return n.length ? (n.sort((r, o) => r.score - o.score || r.idx - o.idx), n[0].reason) : null;
431
+ }
432
+ function Da(t) {
433
+ const a = t.toLowerCase();
434
+ return /amount|out of range for|minimum|maximum/.test(a) ? 1 : /currency|pair|network|chain/.test(a) ? 2 : /country|region|location/.test(a) ? 3 : /does not support|unsupported/.test(a) ? 4 : 5;
435
+ }
436
+ const Qt = {
421
437
  step: "amount",
422
438
  flowType: "buy",
423
439
  fiatCurrency: "USD",
@@ -436,7 +452,7 @@ const Yt = {
436
452
  countrySource: "",
437
453
  errorMessage: null
438
454
  };
439
- function Ta(t, a) {
455
+ function Ma(t, a) {
440
456
  var n, r, o, d, u, i, s, m;
441
457
  switch (a.type) {
442
458
  case "SET_STEP":
@@ -492,13 +508,13 @@ function Ta(t, a) {
492
508
  case "CLEAR_ERROR":
493
509
  return { ...t, errorMessage: null };
494
510
  case "RESET":
495
- return Yt;
511
+ return Qt;
496
512
  default:
497
513
  return t;
498
514
  }
499
515
  }
500
- const Zt = xa(null);
501
- function La({
516
+ const zt = ba(null);
517
+ function Ia({
502
518
  projectId: t,
503
519
  apiUrl: a = "https://api.nowramp.com",
504
520
  assetBaseUrl: n = "",
@@ -517,116 +533,116 @@ function La({
517
533
  statusPollInterval: E = 5e3,
518
534
  onComplete: k,
519
535
  onError: _,
520
- children: re
536
+ children: ie
521
537
  }) {
522
- const j = $(() => ({ apiUrl: a, projectId: t }), [a, t]), Q = s || (i ? i.toLowerCase() : ""), ee = r === "sell", W = ee ? !!h : !!m, v = (ee ? !!(W && i && Q) : !!(W && i && Q && f)) && p ? "confirm" : "amount", L = m || (r === "buy" ? "250" : ""), [c, U] = Ca(Ta, {
523
- ...Yt,
538
+ const G = j(() => ({ apiUrl: a, projectId: t }), [a, t]), z = s || (i ? i.toLowerCase() : ""), te = r === "sell", X = te ? !!h : !!m, v = (te ? !!(X && i && z) : !!(X && i && z && f)) && p ? "confirm" : "amount", L = m || (r === "buy" ? "250" : ""), [c, U] = xa(Ma, {
539
+ ...Qt,
524
540
  step: v,
525
541
  flowType: r,
526
542
  fiatCurrency: u,
527
543
  cryptoCurrency: i,
528
- network: Q,
529
- fiatAmount: Ht(L, 2),
530
- cryptoAmount: Ht(h, 6),
544
+ network: z,
545
+ fiatAmount: Kt(L, 2),
546
+ cryptoAmount: Kt(h, 6),
531
547
  walletAddress: f,
532
548
  customerId: o,
533
549
  // If defaultCountry is provided, set it immediately with 'manual' source to skip auto-detection
534
550
  ...x ? { country: x.toLowerCase(), countrySource: "manual" } : {}
535
551
  }), w = c.flowType === "sell", {
536
- config: S,
537
- loading: te,
538
- error: xe
539
- } = va(j, c.flowType, c.country || void 0), ve = I(!1);
540
- ye.useEffect(() => {
552
+ config: b,
553
+ loading: J,
554
+ error: be
555
+ } = Sa(G, c.flowType, c.country || void 0), Se = I(!1);
556
+ ge.useEffect(() => {
541
557
  var F;
542
- if (ve.current || !(S != null && S.detectedCountry) || c.country) return;
543
- ve.current = !0;
544
- const y = S.detectedCountry.toLowerCase();
558
+ if (Se.current || !(b != null && b.detectedCountry) || c.country) return;
559
+ Se.current = !0;
560
+ const y = b.detectedCountry.toLowerCase();
545
561
  U({ type: "SET_COUNTRY_AUTO", country: y });
546
- const A = (F = S.fiats) == null ? void 0 : F.map((M) => M.code), R = dt(y, A);
562
+ const A = (F = b.fiats) == null ? void 0 : F.map((M) => M.code), R = mt(y, A);
547
563
  R !== c.fiatCurrency && U({ type: "SET_FIAT_CURRENCY", currency: R });
548
- }, [S, c.country, c.fiatCurrency]);
549
- const le = I(!1);
550
- ye.useEffect(() => {
564
+ }, [b, c.country, c.fiatCurrency]);
565
+ const se = I(!1);
566
+ ge.useEffect(() => {
551
567
  var R;
552
- if (le.current || !x || !((R = S == null ? void 0 : S.fiats) != null && R.length)) return;
553
- le.current = !0;
554
- const y = S.fiats.map((F) => F.code), A = dt(x, y);
568
+ if (se.current || !x || !((R = b == null ? void 0 : b.fiats) != null && R.length)) return;
569
+ se.current = !0;
570
+ const y = b.fiats.map((F) => F.code), A = mt(x, y);
555
571
  A !== c.fiatCurrency && U({ type: "SET_FIAT_CURRENCY", currency: A });
556
- }, [x, S, c.fiatCurrency]);
557
- const he = I(c.country);
558
- ye.useEffect(() => {
572
+ }, [x, b, c.fiatCurrency]);
573
+ const pe = I(c.country);
574
+ ge.useEffect(() => {
559
575
  var R;
560
- if (c.country === he.current || (he.current = c.country, c.countrySource === "manual" && (se.current = !1), c.countrySource !== "manual") || !((R = S == null ? void 0 : S.fiats) != null && R.length)) return;
561
- const y = S.fiats.map((F) => F.code), A = dt(c.country, y);
576
+ if (c.country === pe.current || (pe.current = c.country, c.countrySource === "manual" && (Ie.current = !1), c.countrySource !== "manual") || !((R = b == null ? void 0 : b.fiats) != null && R.length)) return;
577
+ const y = b.fiats.map((F) => F.code), A = mt(c.country, y);
562
578
  A !== c.fiatCurrency && U({ type: "SET_FIAT_CURRENCY", currency: A });
563
- }, [c.country, c.countrySource, S, c.fiatCurrency]);
579
+ }, [c.country, c.countrySource, b, c.fiatCurrency]);
564
580
  const D = I(c.fiatCurrency);
565
- ye.useEffect(() => {
581
+ ge.useEffect(() => {
566
582
  var F;
567
- if (c.fiatCurrency === D.current || (D.current = c.fiatCurrency, w || !((F = S == null ? void 0 : S.fiats) != null && F.length) || !c.fiatAmount)) return;
568
- const y = S.fiats.find((M) => M.code === c.fiatCurrency);
583
+ if (c.fiatCurrency === D.current || (D.current = c.fiatCurrency, w || !((F = b == null ? void 0 : b.fiats) != null && F.length) || !c.fiatAmount)) return;
584
+ const y = b.fiats.find((M) => M.code === c.fiatCurrency);
569
585
  if (!(y != null && y.minAmount)) return;
570
586
  const A = parseFloat(c.fiatAmount), R = parseFloat(y.minAmount);
571
587
  !isNaN(A) && !isNaN(R) && A < R && U({ type: "SET_FIAT_AMOUNT", amount: String(Math.ceil(R)) });
572
- }, [c.fiatCurrency, c.fiatAmount, S, w]);
573
- const { availableFiats: ae, availableCryptos: B, availablePaymentMethods: ce } = $(() => {
588
+ }, [c.fiatCurrency, c.fiatAmount, b, w]);
589
+ const { availableFiats: ae, availableCryptos: B, availablePaymentMethods: de } = j(() => {
574
590
  var R, F, M;
575
- if (!S)
591
+ if (!b)
576
592
  return { availableFiats: [], availableCryptos: [], availablePaymentMethods: [] };
577
593
  let y;
578
594
  if (c.cryptoCurrency && c.network) {
579
- const T = (R = S.cryptos) == null ? void 0 : R.find((X) => X.code === c.cryptoCurrency), H = (F = T == null ? void 0 : T.networks) == null ? void 0 : F.find((X) => X.id === c.network);
595
+ const T = (R = b.cryptos) == null ? void 0 : R.find((Y) => Y.code === c.cryptoCurrency), H = (F = T == null ? void 0 : T.networks) == null ? void 0 : F.find((Y) => Y.id === c.network);
580
596
  !T || !H ? y = [] : y = H.providers;
581
597
  }
582
598
  let A;
583
599
  if (c.fiatCurrency) {
584
- const T = (M = S.fiats) == null ? void 0 : M.find((H) => H.code === c.fiatCurrency);
600
+ const T = (M = b.fiats) == null ? void 0 : M.find((H) => H.code === c.fiatCurrency);
585
601
  T ? A = T.providers : A = [];
586
602
  }
587
603
  return {
588
- availableFiats: wa(S.fiats ?? [], y),
589
- availableCryptos: Ea(S.cryptos ?? [], A),
590
- availablePaymentMethods: Aa(
591
- S.paymentMethods ?? [],
604
+ availableFiats: Aa(b.fiats ?? [], y),
605
+ availableCryptos: Ra(b.cryptos ?? [], A),
606
+ availablePaymentMethods: ka(
607
+ b.paymentMethods ?? [],
592
608
  y,
593
609
  c.fiatCurrency
594
610
  )
595
611
  };
596
- }, [S, c.cryptoCurrency, c.network, c.fiatCurrency]), De = $(() => {
612
+ }, [b, c.cryptoCurrency, c.network, c.fiatCurrency]), Me = j(() => {
597
613
  var y, A, R;
598
- return te || !S ? !1 : ka(
599
- S,
614
+ return J || !b ? !1 : La(
615
+ b,
600
616
  { cryptoCurrency: c.cryptoCurrency, network: c.network, fiatCurrency: c.fiatCurrency },
601
617
  {
602
618
  cryptoLocked: !!((y = C == null ? void 0 : C.destinationCurrency) != null && y.locked),
603
619
  networkLocked: !!((A = C == null ? void 0 : C.network) != null && A.locked),
604
620
  fiatLocked: !!((R = C == null ? void 0 : C.sourceCurrency) != null && R.locked)
605
621
  },
606
- { availableFiats: ae, availableCryptos: B, availablePaymentMethods: ce }
622
+ { availableFiats: ae, availableCryptos: B, availablePaymentMethods: de }
607
623
  );
608
624
  }, [
609
- te,
610
- S,
625
+ J,
626
+ b,
611
627
  C,
612
628
  c.cryptoCurrency,
613
629
  c.network,
614
630
  c.fiatCurrency,
615
631
  ae,
616
632
  B,
617
- ce
633
+ de
618
634
  ]);
619
- ye.useEffect(() => {
635
+ ge.useEffect(() => {
620
636
  var A, R, F;
621
- if (te || ae.length === 0 && B.length === 0) return;
622
- const y = Ra(
637
+ if (J || ae.length === 0 && B.length === 0) return;
638
+ const y = Ta(
623
639
  {
624
640
  cryptoCurrency: c.cryptoCurrency,
625
641
  network: c.network,
626
642
  fiatCurrency: c.fiatCurrency,
627
643
  paymentMethodId: c.paymentMethodId
628
644
  },
629
- { availableFiats: ae, availableCryptos: B, availablePaymentMethods: ce },
645
+ { availableFiats: ae, availableCryptos: B, availablePaymentMethods: de },
630
646
  {
631
647
  cryptoLocked: !!((A = C == null ? void 0 : C.destinationCurrency) != null && A.locked),
632
648
  networkLocked: !!((R = C == null ? void 0 : C.network) != null && R.locked),
@@ -635,10 +651,10 @@ function La({
635
651
  );
636
652
  y && (y.cryptoCurrency !== void 0 && U({ type: "SET_CRYPTO_CURRENCY", currency: y.cryptoCurrency }), y.network !== void 0 && U({ type: "SET_NETWORK", network: y.network }), y.fiatCurrency !== void 0 && U({ type: "SET_FIAT_CURRENCY", currency: y.fiatCurrency }), y.paymentMethodId !== void 0 && U({ type: "SET_PAYMENT_METHOD", methodId: y.paymentMethodId }));
637
653
  }, [
638
- te,
654
+ J,
639
655
  ae,
640
656
  B,
641
- ce,
657
+ de,
642
658
  c.cryptoCurrency,
643
659
  c.network,
644
660
  c.fiatCurrency,
@@ -646,22 +662,22 @@ function La({
646
662
  C,
647
663
  U
648
664
  ]);
649
- const Y = $(() => {
665
+ const Q = j(() => {
650
666
  if (w) {
651
667
  if (!c.cryptoAmount) return null;
652
668
  const M = parseFloat(c.cryptoAmount);
653
669
  return isNaN(M) || M <= 0 ? "Enter a valid amount" : null;
654
670
  }
655
- if (!S || !c.fiatAmount) return null;
671
+ if (!b || !c.fiatAmount) return null;
656
672
  const y = parseFloat(c.fiatAmount);
657
673
  if (isNaN(y)) return null;
658
- const A = S.fiats.find((M) => M.code === c.fiatCurrency);
674
+ const A = b.fiats.find((M) => M.code === c.fiatCurrency);
659
675
  if (!A) return null;
660
676
  const R = parseFloat(A.minAmount), F = parseFloat(A.maxAmount);
661
677
  return !isNaN(R) && y < R ? `Minimum amount is ${A.minAmount} ${c.fiatCurrency}` : !isNaN(F) && y > F ? `Maximum amount is ${A.maxAmount} ${c.fiatCurrency}` : null;
662
- }, [S, c.fiatAmount, c.fiatCurrency, c.cryptoAmount, w]), oe = $(() => {
678
+ }, [b, c.fiatAmount, c.fiatCurrency, c.cryptoAmount, w]), ne = j(() => {
663
679
  const y = w ? !!c.cryptoAmount : !!c.fiatAmount;
664
- return !S || !y || !c.fiatCurrency || !c.cryptoCurrency || !c.network || Y || S.detectedCountry && c.countrySource === "" && !x ? null : {
680
+ return !b || !y || !c.fiatCurrency || !c.cryptoCurrency || !c.network || Q || b.detectedCountry && c.countrySource === "" && !x ? null : {
665
681
  fiatCurrency: c.fiatCurrency,
666
682
  ...w ? { cryptoAmount: c.cryptoAmount } : { fiatAmount: c.fiatAmount },
667
683
  cryptoCurrency: c.cryptoCurrency,
@@ -670,50 +686,50 @@ function La({
670
686
  country: c.country || void 0,
671
687
  orderType: c.flowType
672
688
  };
673
- }, [S, c.fiatCurrency, c.fiatAmount, c.cryptoAmount, c.cryptoCurrency, c.network, c.paymentMethodId, c.country, c.countrySource, Y, w, c.flowType, x]), {
674
- quotes: z,
675
- loading: Ee,
676
- error: Ae,
677
- refetch: at
678
- } = Sa(j, oe), se = I(!1);
679
- ye.useEffect(() => {
680
- se.current || c.countrySource === "auto" && (Ee || !oe || Ae || !z || z.bestQuote || c.fiatCurrency !== "USD" && (se.current = !0, U({ type: "SET_FIAT_CURRENCY", currency: "USD" }), U({ type: "SET_FIAT_AMOUNT", amount: "250" })));
681
- }, [z, Ee, Ae, oe, c.countrySource, c.fiatCurrency]);
689
+ }, [b, c.fiatCurrency, c.fiatAmount, c.cryptoAmount, c.cryptoCurrency, c.network, c.paymentMethodId, c.country, c.countrySource, Q, w, c.flowType, x]), {
690
+ quotes: O,
691
+ loading: Re,
692
+ error: le,
693
+ refetch: We
694
+ } = Na(G, ne), ke = Ua(Re, O, ne), Ie = I(!1);
695
+ ge.useEffect(() => {
696
+ Ie.current || c.countrySource === "auto" && (Re || !ne || le || !O || O.bestQuote || c.fiatCurrency !== "USD" && (Ie.current = !0, U({ type: "SET_FIAT_CURRENCY", currency: "USD" }), U({ type: "SET_FIAT_AMOUNT", amount: "250" })));
697
+ }, [O, Re, le, ne, c.countrySource, c.fiatCurrency]);
682
698
  const {
683
- order: O,
684
- loading: Me,
685
- error: Re,
686
- createOrder: Ie
687
- } = ba(j), je = 15e3, {
688
- status: ie,
689
- loading: Ge
690
- } = Na(
699
+ order: ce,
700
+ loading: $,
701
+ error: Ne,
702
+ createOrder: Be
703
+ } = wa(G), Xe = 15e3, {
704
+ status: re,
705
+ loading: rt
706
+ } = Ea(
691
707
  { apiUrl: a },
692
- (O == null ? void 0 : O.orderId) ?? null,
693
- { pollInterval: E, initialDelay: je }
708
+ (ce == null ? void 0 : ce.orderId) ?? null,
709
+ { pollInterval: E, initialDelay: Xe }
694
710
  );
695
- ye.useEffect(() => {
696
- (ie == null ? void 0 : ie.status) === "completed" && k && k(ie);
697
- }, [ie == null ? void 0 : ie.status, k]), ye.useEffect(() => {
698
- const y = xe || Re;
711
+ ge.useEffect(() => {
712
+ (re == null ? void 0 : re.status) === "completed" && k && k(re);
713
+ }, [re == null ? void 0 : re.status, k]), ge.useEffect(() => {
714
+ const y = be || Ne;
699
715
  y && _ && _(y);
700
- }, [xe, Re, _]);
701
- const Se = p || (S == null ? void 0 : S.defaultGateway) || null, Be = I(Se);
702
- Be.current = Se;
703
- const $e = I(z);
704
- $e.current = z;
705
- const de = I(d);
706
- de.current = d;
707
- const Oe = P(async () => {
716
+ }, [be, Ne, _]);
717
+ const ye = p || (b == null ? void 0 : b.defaultGateway) || null, Oe = j(() => !ke || !(O != null && O.unavailableGateways) ? null : Fa(O.unavailableGateways, ye), [ke, O, ye]), He = I(ye);
718
+ He.current = ye;
719
+ const Ye = I(O);
720
+ Ye.current = O;
721
+ const ue = I(d);
722
+ ue.current = d;
723
+ const Pe = P(async () => {
708
724
  var A, R, F;
709
- const y = ((A = c.selectedQuote) == null ? void 0 : A.gatewayId) || ((F = (R = $e.current) == null ? void 0 : R.bestQuote) == null ? void 0 : F.gatewayId) || Be.current;
725
+ const y = ((A = c.selectedQuote) == null ? void 0 : A.gatewayId) || ((F = (R = Ye.current) == null ? void 0 : R.bestQuote) == null ? void 0 : F.gatewayId) || He.current;
710
726
  if (!y || !c.walletAddress) {
711
727
  const M = [!y && "gateway", !c.walletAddress && "walletAddress"].filter(Boolean).join(", ");
712
728
  U({ type: "SET_ERROR", message: `Missing required fields: ${M}` });
713
729
  return;
714
730
  }
715
731
  try {
716
- await Ie({
732
+ await Be({
717
733
  gateway: y,
718
734
  customerId: c.customerId || void 0,
719
735
  fiatCurrency: c.fiatCurrency,
@@ -724,24 +740,24 @@ function La({
724
740
  paymentMethodId: c.paymentMethodId || void 0,
725
741
  email: c.email || void 0,
726
742
  orderType: c.flowType,
727
- ...de.current ? { metadata: { brand: de.current } } : {}
743
+ ...ue.current ? { metadata: { brand: ue.current } } : {}
728
744
  }), U({ type: "SET_STEP", step: "checkout" });
729
745
  } catch (M) {
730
746
  const T = M instanceof Error ? M.message : "Failed to create order";
731
747
  /wallet|address/i.test(T) ? U({ type: "SET_WALLET_ERROR", message: T.replace(/^Failed to create checkout intent:\s*/i, "") }) : U({ type: "SET_ERROR", message: T });
732
748
  }
733
- }, [c, Ie, w]), nt = P((y) => {
749
+ }, [c, Be, w]), ot = P((y) => {
734
750
  U({ type: "SET_STEP", step: y });
735
- }, []), rt = P(() => {
751
+ }, []), it = P(() => {
736
752
  const y = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], A = y.indexOf(c.step);
737
753
  A > 0 && U({ type: "SET_STEP", step: y[A - 1] });
738
- }, [c.step, w]), We = $(() => {
754
+ }, [c.step, w]), Ze = j(() => {
739
755
  const y = w ? !!c.cryptoAmount : !!c.fiatAmount;
740
756
  switch (c.step) {
741
757
  case "confirm":
742
- return !!(y && c.cryptoCurrency && c.network && c.walletAddress && !Y);
758
+ return !!(y && c.cryptoCurrency && c.network && c.walletAddress && !Q);
743
759
  case "amount":
744
- return !!(y && c.cryptoCurrency && c.network && !Y);
760
+ return !!(y && c.cryptoCurrency && c.network && !Q);
745
761
  case "quotes":
746
762
  return !!c.selectedQuote;
747
763
  case "wallet":
@@ -749,44 +765,46 @@ function La({
749
765
  default:
750
766
  return !1;
751
767
  }
752
- }, [c, Y, w]), ue = {
753
- apiConfig: j,
768
+ }, [c, Q, w]), me = {
769
+ apiConfig: G,
754
770
  assetBaseUrl: n,
755
- config: S,
756
- configLoading: te,
757
- configError: xe,
771
+ config: b,
772
+ configLoading: J,
773
+ configError: be,
758
774
  state: c,
759
775
  dispatch: U,
760
- quotes: z,
761
- quotesLoading: Ee,
762
- quotesError: Ae,
763
- fetchQuotes: at,
764
- order: O,
765
- orderLoading: Me,
766
- orderError: Re,
767
- createOrder: Oe,
768
- orderStatus: ie,
769
- orderStatusLoading: Ge,
776
+ quotes: O,
777
+ quotesLoading: Re,
778
+ quotesError: le,
779
+ fetchQuotes: We,
780
+ order: ce,
781
+ orderLoading: $,
782
+ orderError: Ne,
783
+ createOrder: Pe,
784
+ orderStatus: re,
785
+ orderStatusLoading: rt,
770
786
  fieldLocks: C || null,
771
- defaultGateway: Se,
787
+ defaultGateway: ye,
772
788
  availableFiats: ae,
773
789
  availableCryptos: B,
774
- availablePaymentMethods: ce,
775
- selectionUnsupported: De,
776
- amountError: Y,
777
- goToStep: nt,
778
- goBack: rt,
779
- canProceed: We
790
+ availablePaymentMethods: de,
791
+ selectionUnsupported: Me,
792
+ quotesEmpty: ke,
793
+ bestUnavailableReason: Oe,
794
+ amountError: Q,
795
+ goToStep: ot,
796
+ goBack: it,
797
+ canProceed: Ze
780
798
  };
781
- return /* @__PURE__ */ e(Zt.Provider, { value: ue, children: re });
799
+ return /* @__PURE__ */ e(zt.Provider, { value: me, children: ie });
782
800
  }
783
- function Ue() {
784
- const t = ga(Zt);
801
+ function Fe() {
802
+ const t = va(zt);
785
803
  if (!t)
786
804
  throw new Error("useRamp must be used within a RampProvider");
787
805
  return t;
788
806
  }
789
- const Pe = {
807
+ const Ve = {
790
808
  // Canonical IDs (returned by the API — lowercase full names)
791
809
  // These cover cases where the canonical ID differs from the legacy uppercase key
792
810
  ethereum: { name: "Ethereum (ERC20)", shortName: "Ethereum", icon: "eth" },
@@ -948,7 +966,7 @@ const Pe = {
948
966
  OKC: { name: "OKX Chain", icon: "eth" },
949
967
  UNI_CHAIN: { name: "UNI", icon: "uni" },
950
968
  ZEC: { name: "ZCash", icon: "zec" }
951
- }, Qt = [
969
+ }, Jt = [
952
970
  // --- Popular / Top coins ---
953
971
  { code: "BTC", name: "Bitcoin", chains: ["BTC", "LN"], popular: !0 },
954
972
  { code: "ETH", name: "Ethereum", chains: ["ETH", "ARB", "BASE", "BSC", "OPTIMISM", "LINEA", "ZKSYNC", "LRC", "STARK", "APE", "ECLIPSE", "FUEL", "INK", "SOPHON", "UNICHAIN", "WLD"], popular: !0 },
@@ -1141,9 +1159,9 @@ const Pe = {
1141
1159
  { code: "ZCHF", name: "Frankencoin", chains: ["ETH"], popular: !1 },
1142
1160
  { code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
1143
1161
  { code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
1144
- ], Ua = Object.fromEntries(
1145
- Qt.map((t) => [t.code, t.name])
1146
- ), Fa = {
1162
+ ], Ba = Object.fromEntries(
1163
+ Jt.map((t) => [t.code, t.name])
1164
+ ), Oa = {
1147
1165
  AED: "ae",
1148
1166
  ALL: "al",
1149
1167
  ARS: "ar",
@@ -1178,21 +1196,21 @@ const Pe = {
1178
1196
  VND: "vn",
1179
1197
  ZAR: "za"
1180
1198
  };
1181
- function zt(t, a = "") {
1199
+ function qt(t, a = "") {
1182
1200
  return `${a}/crypto-icons/${t.toLowerCase()}.svg`;
1183
1201
  }
1184
- function Da(t, a = "") {
1185
- const n = Fa[t] || "us";
1202
+ function Ha(t, a = "") {
1203
+ const n = Oa[t] || "us";
1186
1204
  return `${a}/flags/${n}.svg`;
1187
1205
  }
1188
- function qe(t) {
1189
- return Pe[t] || Pe[t.toLowerCase()] || Pe[t.toUpperCase()] || Pe[t.toUpperCase().replace(/-/g, "_")] || Pe[t.toLowerCase().replace(/-/g, "_")];
1206
+ function tt(t) {
1207
+ return Ve[t] || Ve[t.toLowerCase()] || Ve[t.toUpperCase()] || Ve[t.toUpperCase().replace(/-/g, "_")] || Ve[t.toLowerCase().replace(/-/g, "_")];
1190
1208
  }
1191
- function ut(t, a = "") {
1192
- const n = qe(t);
1209
+ function ft(t, a = "") {
1210
+ const n = tt(t);
1193
1211
  return n ? `${a}/crypto-icons/${n.icon}.svg` : `${a}/crypto-icons/${t.toLowerCase()}.svg`;
1194
1212
  }
1195
- const Pt = [
1213
+ const _t = [
1196
1214
  { code: "ALL", name: "Albania Lek" },
1197
1215
  { code: "ARS", name: "Argentina Peso" },
1198
1216
  { code: "AUD", name: "Australian Dollar" },
@@ -1205,14 +1223,14 @@ const Pt = [
1205
1223
  { code: "CHF", name: "Swiss Franc" },
1206
1224
  { code: "MXN", name: "Mexican Peso" },
1207
1225
  { code: "INR", name: "Indian Rupee" }
1208
- ], Kt = [
1226
+ ], Vt = [
1209
1227
  { id: "blue", name: "Blue", accent: "#0077FF" },
1210
1228
  { id: "violet", name: "Violet", accent: "#7C3AED" },
1211
1229
  { id: "green", name: "Green", accent: "#10B981" },
1212
1230
  { id: "orange", name: "Orange", accent: "#F59E0B" },
1213
1231
  { id: "rose", name: "Rose", accent: "#F43F5E" },
1214
1232
  { id: "mono", name: "Mono", accent: null }
1215
- ], _t = {
1233
+ ], jt = {
1216
1234
  USDC: { USD: 0.9962, EUR: 1.0814, GBP: 1.2573, JPY: 667e-5, CAD: 0.7198, AUD: 0.6384, BRL: 0.1726, CHF: 1.1306, MXN: 0.0487, INR: 0.01187, ARS: 855e-6, ALL: 0.01058 },
1217
1235
  USDT: { USD: 0.9958, EUR: 1.081, GBP: 1.2568, JPY: 666e-5, CAD: 0.7194, AUD: 0.638, BRL: 0.1724, CHF: 1.1301, MXN: 0.0486, INR: 0.01186, ARS: 854e-6, ALL: 0.01057 },
1218
1236
  BTC: { USD: 104e-7, EUR: 1129e-8, GBP: 1313e-8, JPY: 696e-10, CAD: 751e-8, AUD: 666e-8, BRL: 18e-7, CHF: 118e-7, MXN: 508e-9, INR: 124e-9, ARS: 892e-11, ALL: 11e-8 },
@@ -1221,7 +1239,7 @@ const Pt = [
1221
1239
  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 },
1222
1240
  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 },
1223
1241
  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 }
1224
- }, Ma = /* @__PURE__ */ new Set([
1242
+ }, Pa = /* @__PURE__ */ new Set([
1225
1243
  "USDC",
1226
1244
  "USDT",
1227
1245
  "DAI",
@@ -1248,17 +1266,17 @@ const Pt = [
1248
1266
  "EURR",
1249
1267
  "ZCHF"
1250
1268
  ]);
1251
- function Jt(t) {
1252
- return Ma.has(t.toUpperCase());
1269
+ function ea(t) {
1270
+ return Pa.has(t.toUpperCase());
1253
1271
  }
1254
- function En(t, a) {
1272
+ function Ln(t, a) {
1255
1273
  var n, r;
1256
- return ((n = _t[t]) == null ? void 0 : n[a]) ?? ((r = _t.USDC) == null ? void 0 : r[a]) ?? 1;
1274
+ return ((n = jt[t]) == null ? void 0 : n[a]) ?? ((r = jt.USDC) == null ? void 0 : r[a]) ?? 1;
1257
1275
  }
1258
- function Ia(t) {
1276
+ function Ka(t) {
1259
1277
  return parseFloat(t.replace(/,/g, "")) || 0;
1260
1278
  }
1261
- function mt(t) {
1279
+ function ht(t) {
1262
1280
  if (t === 0) return "0";
1263
1281
  if (t >= 1e3) return t.toLocaleString("en-US", { maximumFractionDigits: 2 });
1264
1282
  if (t >= 1) return t.toFixed(2);
@@ -1266,14 +1284,14 @@ function mt(t) {
1266
1284
  const a = t.toPrecision(4);
1267
1285
  return parseFloat(a).toString();
1268
1286
  }
1269
- const fe = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), Vt = 10, jt = 1e-4, Ba = (() => {
1287
+ const he = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), Gt = 10, $t = 1e-4, _a = (() => {
1270
1288
  const t = [];
1271
- for (const a of Qt)
1289
+ for (const a of Jt)
1272
1290
  for (const n of a.chains)
1273
1291
  t.push({ code: a.code, name: a.name, chain: n, popular: a.popular });
1274
1292
  return t;
1275
1293
  })();
1276
- function qt({
1294
+ function ta({
1277
1295
  src: t,
1278
1296
  alt: a,
1279
1297
  size: n,
@@ -1324,34 +1342,34 @@ function qt({
1324
1342
  }
1325
1343
  );
1326
1344
  }
1327
- function Gt({ ticker: t, size: a = 32, baseUrl: n = "" }) {
1345
+ function Wt({ ticker: t, size: a = 32, baseUrl: n = "" }) {
1328
1346
  return /* @__PURE__ */ e(
1329
- qt,
1347
+ ta,
1330
1348
  {
1331
- src: zt(t, n),
1349
+ src: qt(t, n),
1332
1350
  alt: t,
1333
1351
  size: a,
1334
1352
  background: "#ffffff"
1335
1353
  }
1336
1354
  );
1337
1355
  }
1338
- function ft({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
1356
+ function pt({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
1339
1357
  return /* @__PURE__ */ e(
1340
- qt,
1358
+ ta,
1341
1359
  {
1342
- src: Da(t, n),
1360
+ src: Ha(t, n),
1343
1361
  alt: t,
1344
1362
  size: a
1345
1363
  }
1346
1364
  );
1347
1365
  }
1348
- function yt({ size: t = 32, color: a = "#888" }) {
1366
+ function gt({ size: t = 32, color: a = "#888" }) {
1349
1367
  return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 32 32", fill: "none", children: [
1350
1368
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "16", fill: a }),
1351
1369
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "8", stroke: "white", strokeWidth: "1.5", fill: "none" })
1352
1370
  ] });
1353
1371
  }
1354
- function Oa({ size: t = 24 }) {
1372
+ function Va({ size: t = 24 }) {
1355
1373
  return /* @__PURE__ */ e(
1356
1374
  "div",
1357
1375
  {
@@ -1368,7 +1386,7 @@ function Oa({ size: t = 24 }) {
1368
1386
  }
1369
1387
  );
1370
1388
  }
1371
- function Ha({ size: t = 32 }) {
1389
+ function ja({ size: t = 32 }) {
1372
1390
  return /* @__PURE__ */ e(
1373
1391
  "div",
1374
1392
  {
@@ -1378,7 +1396,7 @@ function Ha({ size: t = 32 }) {
1378
1396
  }
1379
1397
  );
1380
1398
  }
1381
- function Pa({ size: t = 32 }) {
1399
+ function Ga({ size: t = 32 }) {
1382
1400
  return /* @__PURE__ */ e(
1383
1401
  "div",
1384
1402
  {
@@ -1394,7 +1412,7 @@ function Pa({ size: t = 32 }) {
1394
1412
  }
1395
1413
  );
1396
1414
  }
1397
- function Ka({ size: t = 32 }) {
1415
+ function $a({ size: t = 32 }) {
1398
1416
  return /* @__PURE__ */ e(
1399
1417
  "div",
1400
1418
  {
@@ -1409,7 +1427,7 @@ function Ka({ size: t = 32 }) {
1409
1427
  }
1410
1428
  );
1411
1429
  }
1412
- function _a({ size: t = 32 }) {
1430
+ function Wa({ size: t = 32 }) {
1413
1431
  return /* @__PURE__ */ e(
1414
1432
  "div",
1415
1433
  {
@@ -1419,7 +1437,7 @@ function _a({ size: t = 32 }) {
1419
1437
  }
1420
1438
  );
1421
1439
  }
1422
- function Va({ size: t = 32 }) {
1440
+ function Xa({ size: t = 32 }) {
1423
1441
  return /* @__PURE__ */ e(
1424
1442
  "div",
1425
1443
  {
@@ -1435,7 +1453,7 @@ function Va({ size: t = 32 }) {
1435
1453
  }
1436
1454
  );
1437
1455
  }
1438
- function ja({ size: t = 32 }) {
1456
+ function Ya({ size: t = 32 }) {
1439
1457
  const a = t * 0.8;
1440
1458
  return /* @__PURE__ */ e(
1441
1459
  "div",
@@ -1450,7 +1468,7 @@ function ja({ size: t = 32 }) {
1450
1468
  }
1451
1469
  );
1452
1470
  }
1453
- function Ga({ size: t = 32 }) {
1471
+ function Za({ size: t = 32 }) {
1454
1472
  const a = t * 0.56, n = a * 0.65, r = Math.max(2, a * 0.1), o = a * 0.2;
1455
1473
  return /* @__PURE__ */ l("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
1456
1474
  /* @__PURE__ */ e(
@@ -1501,7 +1519,7 @@ function Ga({ size: t = 32 }) {
1501
1519
  )
1502
1520
  ] });
1503
1521
  }
1504
- function An({ size: t = 18 }) {
1522
+ function Un({ size: t = 18 }) {
1505
1523
  return /* @__PURE__ */ e(
1506
1524
  "div",
1507
1525
  {
@@ -1511,13 +1529,13 @@ function An({ size: t = 18 }) {
1511
1529
  }
1512
1530
  );
1513
1531
  }
1514
- function _e() {
1532
+ function Ge() {
1515
1533
  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" }) });
1516
1534
  }
1517
- function $t() {
1535
+ function Xt() {
1518
1536
  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" }) });
1519
1537
  }
1520
- function $a({ onClick: t }) {
1538
+ function Qa({ onClick: t }) {
1521
1539
  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(
1522
1540
  "path",
1523
1541
  {
@@ -1526,7 +1544,7 @@ function $a({ onClick: t }) {
1526
1544
  }
1527
1545
  ) }) });
1528
1546
  }
1529
- function Wa({ size: t = 40 }) {
1547
+ function za({ size: t = 40 }) {
1530
1548
  return /* @__PURE__ */ e(
1531
1549
  "div",
1532
1550
  {
@@ -1539,29 +1557,29 @@ function Wa({ size: t = 40 }) {
1539
1557
  }
1540
1558
  );
1541
1559
  }
1542
- function Xa(t, a = 32) {
1560
+ function Ja(t, a = 32) {
1543
1561
  switch (t) {
1544
1562
  case "revolut":
1545
- return /* @__PURE__ */ e(Ha, { size: a });
1563
+ return /* @__PURE__ */ e(ja, { size: a });
1546
1564
  case "applepay":
1547
- return /* @__PURE__ */ e(Pa, { size: a });
1548
- case "card":
1549
1565
  return /* @__PURE__ */ e(Ga, { size: a });
1566
+ case "card":
1567
+ return /* @__PURE__ */ e(Za, { size: a });
1550
1568
  case "googlepay":
1551
- return /* @__PURE__ */ e(Ka, { size: a });
1569
+ return /* @__PURE__ */ e($a, { size: a });
1552
1570
  case "paypal":
1553
- return /* @__PURE__ */ e(_a, { size: a });
1571
+ return /* @__PURE__ */ e(Wa, { size: a });
1554
1572
  case "bank":
1555
- return /* @__PURE__ */ e(Oa, { size: a });
1556
- case "visa":
1557
1573
  return /* @__PURE__ */ e(Va, { size: a });
1574
+ case "visa":
1575
+ return /* @__PURE__ */ e(Xa, { size: a });
1558
1576
  case "mastercard":
1559
- return /* @__PURE__ */ e(ja, { size: a });
1577
+ return /* @__PURE__ */ e(Ya, { size: a });
1560
1578
  default:
1561
- return /* @__PURE__ */ e(yt, { size: a });
1579
+ return /* @__PURE__ */ e(gt, { size: a });
1562
1580
  }
1563
1581
  }
1564
- const Ya = {
1582
+ const qa = {
1565
1583
  "debit-credit-card": "card",
1566
1584
  "bank-transfer": "bank",
1567
1585
  "ach-bank-transfer": "bank",
@@ -1572,7 +1590,7 @@ const Ya = {
1572
1590
  "google-pay": "googlepay",
1573
1591
  paypal: "paypal",
1574
1592
  revolut: "revolut"
1575
- }, Za = {
1593
+ }, en = {
1576
1594
  "debit-credit-card": "Card",
1577
1595
  "bank-transfer": "Bank Transfer",
1578
1596
  "ach-bank-transfer": "ACH",
@@ -1582,20 +1600,20 @@ const Ya = {
1582
1600
  paypal: "PayPal",
1583
1601
  revolut: "Revolut"
1584
1602
  };
1585
- function ea(t, a) {
1586
- return Za[t] || a;
1603
+ function aa(t, a) {
1604
+ return en[t] || a;
1587
1605
  }
1588
- function ta(t, a, n = 24) {
1589
- const r = Ya[t];
1590
- return r ? Xa(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(yt, { size: n });
1606
+ function na(t, a, n = 24) {
1607
+ const r = qa[t];
1608
+ return r ? Ja(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(gt, { size: n });
1591
1609
  }
1592
- function Qa({
1610
+ function tn({
1593
1611
  methods: t,
1594
1612
  selectedId: a,
1595
1613
  onOpenModal: n,
1596
1614
  fiatCurrency: r
1597
1615
  }) {
1598
- const o = $(
1616
+ const o = j(
1599
1617
  () => t.filter((u) => u.supportedFiats.includes(r)),
1600
1618
  [t, r]
1601
1619
  ), d = o.find((u) => u.id === a) || o[0];
@@ -1613,7 +1631,7 @@ function Qa({
1613
1631
  r
1614
1632
  ] })
1615
1633
  }
1616
- ) : /* @__PURE__ */ e(q, { children: /* @__PURE__ */ l(
1634
+ ) : /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ l(
1617
1635
  "div",
1618
1636
  {
1619
1637
  role: "button",
@@ -1633,21 +1651,21 @@ function Qa({
1633
1651
  children: [
1634
1652
  /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Payment method" }),
1635
1653
  /* @__PURE__ */ l("span", { className: "flex items-center gap-2", children: [
1636
- /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: d && ta(d.id, d.icon, 20) }),
1637
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: d ? ea(d.id, d.name) : "Select" }),
1638
- /* @__PURE__ */ e(_e, {})
1654
+ /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: d && na(d.id, d.icon, 20) }),
1655
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: d ? aa(d.id, d.name) : "Select" }),
1656
+ /* @__PURE__ */ e(Ge, {})
1639
1657
  ] })
1640
1658
  ]
1641
1659
  }
1642
1660
  ) });
1643
1661
  }
1644
- function za({
1662
+ function an({
1645
1663
  className: t = "",
1646
1664
  autoRedirect: a = !1,
1647
1665
  redirectDelay: n = 3e3
1648
1666
  }) {
1649
1667
  var p;
1650
- const { order: r, orderStatus: o, goToStep: d, goBack: u } = Ue(), [i, s] = N(!1), [m, h] = N(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1668
+ const { order: r, orderStatus: o, goToStep: d, goBack: u } = Fe(), [i, s] = N(!1), [m, h] = N(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1651
1669
  if (Z(() => {
1652
1670
  if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !f) {
1653
1671
  h(Math.ceil(n / 1e3));
@@ -1717,7 +1735,7 @@ function za({
1717
1735
  );
1718
1736
  if (r.checkout.method === "iframe") {
1719
1737
  const x = r.checkout.url, C = ((p = r.checkout.allowedFeatures) == null ? void 0 : p.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1720
- return Ot(
1738
+ return Pt(
1721
1739
  /* @__PURE__ */ l(
1722
1740
  "div",
1723
1741
  {
@@ -1864,8 +1882,8 @@ function za({
1864
1882
  }
1865
1883
  );
1866
1884
  if (r.checkout.method === "widget" && r.widgetConfig) {
1867
- const x = Ja(r.checkout.url, r.widgetConfig);
1868
- return Ot(
1885
+ const x = nn(r.checkout.url, r.widgetConfig);
1886
+ return Pt(
1869
1887
  /* @__PURE__ */ l(
1870
1888
  "div",
1871
1889
  {
@@ -1982,14 +2000,14 @@ function za({
1982
2000
  }
1983
2001
  );
1984
2002
  }
1985
- function Ja(t, a) {
2003
+ function nn(t, a) {
1986
2004
  const n = new URL("/en/partner/widget", t);
1987
2005
  for (const [r, o] of Object.entries(a))
1988
2006
  o != null && o !== "" && n.searchParams.set(r, String(o));
1989
2007
  return n.toString();
1990
2008
  }
1991
- function qa({ className: t = "" }) {
1992
- const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Ue();
2009
+ function rn({ className: t = "" }) {
2010
+ const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Fe();
1993
2011
  Z(() => {
1994
2012
  a && (a.status === "completed" ? r("complete") : ["failed", "cancelled", "expired", "refunded"].includes(a.status) && r("error"));
1995
2013
  }, [a == null ? void 0 : a.status, r]);
@@ -2009,25 +2027,25 @@ function qa({ className: t = "" }) {
2009
2027
  /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-3", style: { color: "var(--t-text)" }, children: o() }),
2010
2028
  n && /* @__PURE__ */ e("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: "Checking status..." }),
2011
2029
  a && /* @__PURE__ */ l("div", { className: "w-full mt-6 text-left", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2012
- /* @__PURE__ */ e(Le, { label: "Order ID", value: a.orderId, mono: !0 }),
2013
- /* @__PURE__ */ e(Le, { label: "Provider", value: a.gateway }),
2030
+ /* @__PURE__ */ e(Ue, { label: "Order ID", value: a.orderId, mono: !0 }),
2031
+ /* @__PURE__ */ e(Ue, { label: "Provider", value: a.gateway }),
2014
2032
  /* @__PURE__ */ e(
2015
- Le,
2033
+ Ue,
2016
2034
  {
2017
2035
  label: "Amount",
2018
2036
  value: `${a.fiatAmount} ${a.fiatCurrency}`
2019
2037
  }
2020
2038
  ),
2021
2039
  /* @__PURE__ */ e(
2022
- Le,
2040
+ Ue,
2023
2041
  {
2024
2042
  label: "Receiving",
2025
2043
  value: `${a.cryptoAmount || "..."} ${a.cryptoCurrency}`
2026
2044
  }
2027
2045
  ),
2028
- /* @__PURE__ */ e(Le, { label: "Network", value: a.network }),
2046
+ /* @__PURE__ */ e(Ue, { label: "Network", value: a.network }),
2029
2047
  /* @__PURE__ */ e(
2030
- Le,
2048
+ Ue,
2031
2049
  {
2032
2050
  label: "To Address",
2033
2051
  value: `${a.walletAddress.slice(0, 10)}...${a.walletAddress.slice(-8)}`,
@@ -2041,7 +2059,7 @@ function qa({ className: t = "" }) {
2041
2059
  ] })
2042
2060
  ] });
2043
2061
  }
2044
- function Le({ label: t, value: a, mono: n }) {
2062
+ function Ue({ label: t, value: a, mono: n }) {
2045
2063
  return /* @__PURE__ */ l(
2046
2064
  "div",
2047
2065
  {
@@ -2061,13 +2079,13 @@ function Le({ label: t, value: a, mono: n }) {
2061
2079
  }
2062
2080
  );
2063
2081
  }
2064
- function en({
2082
+ function on({
2065
2083
  className: t = "",
2066
2084
  explorerUrl: a,
2067
2085
  onDone: n,
2068
2086
  doneButtonText: r = "Done"
2069
2087
  }) {
2070
- const { orderStatus: o, state: d, dispatch: u } = Ue(), i = d.flowType === "sell", s = () => {
2088
+ const { orderStatus: o, state: d, dispatch: u } = Fe(), i = d.flowType === "sell", s = () => {
2071
2089
  if (!(o != null && o.transactionHash)) return null;
2072
2090
  if (!a) {
2073
2091
  const f = {
@@ -2100,7 +2118,7 @@ function en({
2100
2118
  /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: i ? `Your ${(o == null ? void 0 : o.fiatCurrency) || d.fiatCurrency} payout is being processed.` : `Your ${(o == null ? void 0 : o.cryptoCurrency) || d.cryptoCurrency} has been sent to your wallet.` }),
2101
2119
  o && /* @__PURE__ */ l("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
2102
2120
  /* @__PURE__ */ e(
2103
- Ce,
2121
+ xe,
2104
2122
  {
2105
2123
  label: i ? "Amount Sold" : "Amount Received",
2106
2124
  value: `${o.cryptoAmount} ${o.cryptoCurrency}`,
@@ -2108,15 +2126,15 @@ function en({
2108
2126
  }
2109
2127
  ),
2110
2128
  /* @__PURE__ */ e(
2111
- Ce,
2129
+ xe,
2112
2130
  {
2113
2131
  label: i ? "Payout Amount" : "Amount Paid",
2114
2132
  value: `${o.fiatAmount} ${o.fiatCurrency}`
2115
2133
  }
2116
2134
  ),
2117
- /* @__PURE__ */ e(Ce, { label: "Network", value: o.network }),
2135
+ /* @__PURE__ */ e(xe, { label: "Network", value: o.network }),
2118
2136
  /* @__PURE__ */ e(
2119
- Ce,
2137
+ xe,
2120
2138
  {
2121
2139
  label: "Wallet",
2122
2140
  value: `${o.walletAddress.slice(0, 10)}...${o.walletAddress.slice(-8)}`,
@@ -2124,17 +2142,17 @@ function en({
2124
2142
  }
2125
2143
  ),
2126
2144
  o.transactionHash && /* @__PURE__ */ e(
2127
- Ce,
2145
+ xe,
2128
2146
  {
2129
2147
  label: "Transaction",
2130
2148
  value: `${o.transactionHash.slice(0, 10)}...${o.transactionHash.slice(-8)}`,
2131
2149
  mono: !0
2132
2150
  }
2133
2151
  ),
2134
- /* @__PURE__ */ e(Ce, { label: "Provider", value: o.gateway }),
2135
- /* @__PURE__ */ e(Ce, { label: "Order ID", value: o.orderId, mono: !0 }),
2152
+ /* @__PURE__ */ e(xe, { label: "Provider", value: o.gateway }),
2153
+ /* @__PURE__ */ e(xe, { label: "Order ID", value: o.orderId, mono: !0 }),
2136
2154
  o.completedAt && /* @__PURE__ */ e(
2137
- Ce,
2155
+ xe,
2138
2156
  {
2139
2157
  label: "Completed",
2140
2158
  value: new Date(o.completedAt).toLocaleString()
@@ -2165,7 +2183,7 @@ function en({
2165
2183
  ] })
2166
2184
  ] });
2167
2185
  }
2168
- function Ce({ label: t, value: a, mono: n, highlight: r }) {
2186
+ function xe({ label: t, value: a, mono: n, highlight: r }) {
2169
2187
  return /* @__PURE__ */ l(
2170
2188
  "div",
2171
2189
  {
@@ -2185,12 +2203,12 @@ function Ce({ label: t, value: a, mono: n, highlight: r }) {
2185
2203
  }
2186
2204
  );
2187
2205
  }
2188
- function tn({
2206
+ function ln({
2189
2207
  className: t = "",
2190
2208
  onRetry: a,
2191
2209
  supportEmail: n = "support@nowramp.com"
2192
2210
  }) {
2193
- const { state: r, orderStatus: o, dispatch: d, goToStep: u } = Ue(), i = r.flowType === "sell", s = () => {
2211
+ const { state: r, orderStatus: o, dispatch: d, goToStep: u } = Fe(), i = r.flowType === "sell", s = () => {
2194
2212
  if (o)
2195
2213
  switch (o.status) {
2196
2214
  case "failed":
@@ -2282,11 +2300,11 @@ function tn({
2282
2300
  ] })
2283
2301
  ] });
2284
2302
  }
2285
- function Wt(t) {
2303
+ function Yt(t) {
2286
2304
  return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
2287
2305
  }
2288
- function an({ className: t = "", stablecoinParity: a, partnerName: n }) {
2289
- var ee;
2306
+ function cn({ className: t = "", stablecoinParity: a, partnerName: n }) {
2307
+ var te;
2290
2308
  const {
2291
2309
  config: r,
2292
2310
  configLoading: o,
@@ -2296,13 +2314,13 @@ function an({ className: t = "", stablecoinParity: a, partnerName: n }) {
2296
2314
  fetchQuotes: s,
2297
2315
  createOrder: m,
2298
2316
  orderLoading: h
2299
- } = Ue(), f = d.flowType === "sell", [p, x] = N(null), C = r == null ? void 0 : r.gateways.find((W) => W.id === u), E = (ee = i == null ? void 0 : i.bestQuote) != null && ee.exchangeRate ? parseFloat(i.bestQuote.exchangeRate) : null, k = parseFloat(d.fiatAmount) || 0, _ = !!(a && n && !f && Jt(d.cryptoCurrency) && E), re = _ && d.cryptoCurrency.toUpperCase().includes(d.fiatCurrency.toUpperCase()), j = _ && k > 0 ? mt(re ? k : k / E) : null, Q = async () => {
2317
+ } = Fe(), f = d.flowType === "sell", [p, x] = N(null), C = r == null ? void 0 : r.gateways.find((X) => X.id === u), E = (te = i == null ? void 0 : i.bestQuote) != null && te.exchangeRate ? parseFloat(i.bestQuote.exchangeRate) : null, k = parseFloat(d.fiatAmount) || 0, _ = !!(a && n && !f && ea(d.cryptoCurrency) && E), ie = _ && d.cryptoCurrency.toUpperCase().includes(d.fiatCurrency.toUpperCase()), G = _ && k > 0 ? ht(ie ? k : k / E) : null, z = async () => {
2300
2318
  x(null);
2301
2319
  try {
2302
2320
  s(), await m();
2303
- } catch (W) {
2304
- const ge = W instanceof Error ? W.message : "Failed to create order";
2305
- x(ge);
2321
+ } catch (X) {
2322
+ const ve = X instanceof Error ? X.message : "Failed to create order";
2323
+ x(ve);
2306
2324
  }
2307
2325
  };
2308
2326
  return o ? /* @__PURE__ */ l("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
@@ -2318,22 +2336,22 @@ function an({ className: t = "", stablecoinParity: a, partnerName: n }) {
2318
2336
  /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: C.name })
2319
2337
  ] })
2320
2338
  ] }),
2321
- f ? /* @__PURE__ */ l(q, { children: [
2322
- /* @__PURE__ */ e(we, { label: "You sell", value: `${d.cryptoAmount} ${d.cryptoCurrency}`, highlight: !0 }),
2323
- /* @__PURE__ */ e(we, { label: "You receive", value: `${d.fiatCurrency} payout` })
2324
- ] }) : /* @__PURE__ */ l(q, { children: [
2325
- /* @__PURE__ */ e(we, { label: "You pay", value: `${d.fiatAmount} ${d.fiatCurrency}`, highlight: !0 }),
2339
+ f ? /* @__PURE__ */ l(ee, { children: [
2340
+ /* @__PURE__ */ e(Ae, { label: "You sell", value: `${d.cryptoAmount} ${d.cryptoCurrency}`, highlight: !0 }),
2341
+ /* @__PURE__ */ e(Ae, { label: "You receive", value: `${d.fiatCurrency} payout` })
2342
+ ] }) : /* @__PURE__ */ l(ee, { children: [
2343
+ /* @__PURE__ */ e(Ae, { label: "You pay", value: `${d.fiatAmount} ${d.fiatCurrency}`, highlight: !0 }),
2326
2344
  /* @__PURE__ */ e(
2327
- we,
2345
+ Ae,
2328
2346
  {
2329
2347
  label: "You receive",
2330
- value: j ? `${j} ${d.cryptoCurrency}` : `${d.cryptoCurrency} on ${d.network}`
2348
+ value: G ? `${G} ${d.cryptoCurrency}` : `${d.cryptoCurrency} on ${d.network}`
2331
2349
  }
2332
2350
  ),
2333
- /* @__PURE__ */ e(we, { label: "Wallet", value: Wt(d.walletAddress), mono: !0 }),
2334
- _ && j && /* @__PURE__ */ l("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
2351
+ /* @__PURE__ */ e(Ae, { label: "Wallet", value: Yt(d.walletAddress), mono: !0 }),
2352
+ _ && G && /* @__PURE__ */ l("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
2335
2353
  "Charged amount from provider may differ. The rest up to ",
2336
- j,
2354
+ G,
2337
2355
  " ",
2338
2356
  d.cryptoCurrency,
2339
2357
  " will be credited to your ",
@@ -2341,8 +2359,8 @@ function an({ className: t = "", stablecoinParity: a, partnerName: n }) {
2341
2359
  " account."
2342
2360
  ] })
2343
2361
  ] }),
2344
- /* @__PURE__ */ e(we, { label: "Network", value: d.network }),
2345
- f && d.walletAddress && /* @__PURE__ */ e(we, { label: "Refund address", value: Wt(d.walletAddress), mono: !0 })
2362
+ /* @__PURE__ */ e(Ae, { label: "Network", value: d.network }),
2363
+ f && d.walletAddress && /* @__PURE__ */ e(Ae, { label: "Refund address", value: Yt(d.walletAddress), mono: !0 })
2346
2364
  ] }),
2347
2365
  p && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: p }),
2348
2366
  /* @__PURE__ */ e(
@@ -2351,8 +2369,8 @@ function an({ className: t = "", stablecoinParity: a, partnerName: n }) {
2351
2369
  className: "w-full font-semibold text-[16px] transition-all flex items-center justify-center gap-2",
2352
2370
  style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: h ? 0.7 : 1 },
2353
2371
  disabled: h,
2354
- onClick: Q,
2355
- children: h ? /* @__PURE__ */ l(q, { children: [
2372
+ onClick: z,
2373
+ children: h ? /* @__PURE__ */ l(ee, { children: [
2356
2374
  /* @__PURE__ */ e("span", { className: "nramp-spinner-inline" }),
2357
2375
  "Processing..."
2358
2376
  ] }) : f ? "Confirm & Sell" : "Confirm & Pay"
@@ -2360,7 +2378,7 @@ function an({ className: t = "", stablecoinParity: a, partnerName: n }) {
2360
2378
  )
2361
2379
  ] });
2362
2380
  }
2363
- function we({ label: t, value: a, mono: n, highlight: r }) {
2381
+ function Ae({ label: t, value: a, mono: n, highlight: r }) {
2364
2382
  return /* @__PURE__ */ l("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
2365
2383
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: t }),
2366
2384
  /* @__PURE__ */ e(
@@ -2373,7 +2391,7 @@ function we({ label: t, value: a, mono: n, highlight: r }) {
2373
2391
  )
2374
2392
  ] });
2375
2393
  }
2376
- function Ke({
2394
+ function je({
2377
2395
  isOpen: t,
2378
2396
  onClose: a,
2379
2397
  children: n
@@ -2413,17 +2431,17 @@ function Ke({
2413
2431
  }
2414
2432
  ) : null;
2415
2433
  }
2416
- function nn({ char: t, height: a = 38 }) {
2434
+ function sn({ char: t, height: a = 38 }) {
2417
2435
  const n = "0123456789", r = n.indexOf(t);
2418
2436
  return r === -1 ? /* @__PURE__ */ e("span", { children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: a, lineHeight: `${a}px` }, children: /* @__PURE__ */ e("span", { className: "digit-slot-inner block", style: { transform: `translateY(-${r * a}px)` }, children: n.split("").map((o) => /* @__PURE__ */ e("span", { className: "block", style: { height: a, lineHeight: `${a}px` }, children: o }, o)) }) });
2419
2437
  }
2420
- function rn({
2438
+ function dn({
2421
2439
  value: t,
2422
2440
  height: a = 38,
2423
2441
  className: n = "",
2424
2442
  style: r = {}
2425
2443
  }) {
2426
- return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", ...r }, children: t.split("").map((o, d) => /* @__PURE__ */ e(nn, { char: o, height: a }, d)) });
2444
+ return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", ...r }, children: t.split("").map((o, d) => /* @__PURE__ */ e(sn, { char: o, height: a }, d)) });
2427
2445
  }
2428
2446
  function V({
2429
2447
  w: t,
@@ -2432,7 +2450,7 @@ function V({
2432
2450
  }) {
2433
2451
  return /* @__PURE__ */ e("div", { className: `skeleton ${n}`, style: { width: t, height: a } });
2434
2452
  }
2435
- function on() {
2453
+ function un() {
2436
2454
  return /* @__PURE__ */ l("div", { className: "flex-1 px-5 flex flex-col", children: [
2437
2455
  /* @__PURE__ */ l("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
2438
2456
  /* @__PURE__ */ e(V, { w: 70, h: 14, className: "mb-3" }),
@@ -2461,7 +2479,7 @@ function on() {
2461
2479
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
2462
2480
  ] });
2463
2481
  }
2464
- function Fe({ onClick: t }) {
2482
+ function De({ onClick: t }) {
2465
2483
  return /* @__PURE__ */ e(
2466
2484
  "button",
2467
2485
  {
@@ -2474,7 +2492,7 @@ function Fe({ onClick: t }) {
2474
2492
  }
2475
2493
  );
2476
2494
  }
2477
- function Ve({
2495
+ function $e({
2478
2496
  value: t,
2479
2497
  onChange: a,
2480
2498
  placeholder: n = ""
@@ -2505,21 +2523,21 @@ function Ve({
2505
2523
  )
2506
2524
  ] });
2507
2525
  }
2508
- function ln({
2526
+ function mn({
2509
2527
  onClose: t,
2510
2528
  onSelect: a,
2511
2529
  currencies: n,
2512
2530
  assetBaseUrl: r = "",
2513
2531
  selectedCode: o
2514
2532
  }) {
2515
- const [d, u] = N(""), i = $(() => {
2516
- if (!n || n.length === 0) return Pt;
2517
- const m = new Map(Pt.map((h) => [h.code, h.name]));
2533
+ const [d, u] = N(""), i = j(() => {
2534
+ if (!n || n.length === 0) return _t;
2535
+ const m = new Map(_t.map((h) => [h.code, h.name]));
2518
2536
  return n.map((h) => ({
2519
2537
  code: h.code,
2520
2538
  name: h.name || m.get(h.code) || h.code
2521
2539
  }));
2522
- }, [n]), s = $(() => {
2540
+ }, [n]), s = j(() => {
2523
2541
  const m = d.trim().toLowerCase();
2524
2542
  if (!m) {
2525
2543
  if (o) {
@@ -2535,8 +2553,8 @@ function ln({
2535
2553
  (h) => h.code.toLowerCase().includes(m) || h.name.toLowerCase().includes(m)
2536
2554
  );
2537
2555
  }, [i, d, o]);
2538
- return /* @__PURE__ */ l(q, { children: [
2539
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
2556
+ return /* @__PURE__ */ l(ee, { children: [
2557
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
2540
2558
  /* @__PURE__ */ e(
2541
2559
  "h2",
2542
2560
  {
@@ -2551,7 +2569,7 @@ function ln({
2551
2569
  children: "Select fiat currency"
2552
2570
  }
2553
2571
  ),
2554
- /* @__PURE__ */ e(Ve, { value: d, onChange: u }),
2572
+ /* @__PURE__ */ e($e, { value: d, onChange: u }),
2555
2573
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2556
2574
  s.map((m, h) => {
2557
2575
  const f = m.name !== m.code ? m.name : "", p = o === m.code;
@@ -2563,7 +2581,7 @@ function ln({
2563
2581
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
2564
2582
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
2565
2583
  children: [
2566
- /* @__PURE__ */ e(ft, { currencyCode: m.code, size: 32, baseUrl: r }),
2584
+ /* @__PURE__ */ e(pt, { currencyCode: m.code, size: 32, baseUrl: r }),
2567
2585
  /* @__PURE__ */ l("div", { className: "text-left flex-1 flex items-center gap-2", children: [
2568
2586
  /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: m.code }),
2569
2587
  f && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: f })
@@ -2593,7 +2611,7 @@ function ln({
2593
2611
  ] })
2594
2612
  ] });
2595
2613
  }
2596
- function Xt({ src: t, alt: a, size: n, className: r, style: o }) {
2614
+ function Zt({ src: t, alt: a, size: n, className: r, style: o }) {
2597
2615
  const [d, u] = N(!1), [i, s] = N(!1), m = I(t);
2598
2616
  m.current !== t && (m.current = t, u(!1), s(!1));
2599
2617
  const h = P(() => u(!0), []), f = P(() => s(!0), []);
@@ -2627,12 +2645,12 @@ function Xt({ src: t, alt: a, size: n, className: r, style: o }) {
2627
2645
  )
2628
2646
  ] });
2629
2647
  }
2630
- function cn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: d }) {
2631
- const [u, i] = N(""), s = $(() => {
2632
- if (!n || n.length === 0) return Ba;
2648
+ function fn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: d }) {
2649
+ const [u, i] = N(""), s = j(() => {
2650
+ if (!n || n.length === 0) return _a;
2633
2651
  const f = [];
2634
2652
  for (const p of n) {
2635
- const x = p.networks || [], C = p.name || Ua[p.code] || p.code;
2653
+ const x = p.networks || [], C = p.name || Ba[p.code] || p.code;
2636
2654
  if (x.length === 0)
2637
2655
  f.push({ code: p.code, name: C, chain: p.code, popular: !1 });
2638
2656
  else
@@ -2648,7 +2666,7 @@ function cn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2648
2666
  }
2649
2667
  }
2650
2668
  return f;
2651
- }, [n]), m = P((f, p) => o === f && d === p, [o, d]), h = $(() => {
2669
+ }, [n]), m = P((f, p) => o === f && d === p, [o, d]), h = j(() => {
2652
2670
  var C;
2653
2671
  const f = u.trim().toLowerCase();
2654
2672
  if (!f) {
@@ -2663,15 +2681,15 @@ function cn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2663
2681
  }
2664
2682
  const p = f.split(/\s+/), x = [];
2665
2683
  for (const E of s) {
2666
- const k = qe(E.chain), _ = k ? k.name.toLowerCase() : "", re = ((C = k == null ? void 0 : k.shortName) == null ? void 0 : C.toLowerCase()) || "", j = E.chain.toLowerCase(), Q = E.code.toLowerCase(), ee = E.name.toLowerCase(), W = [Q, ee, _, re, j];
2667
- if (!p.every((L) => W.some((c) => c.includes(L)))) continue;
2684
+ const k = tt(E.chain), _ = k ? k.name.toLowerCase() : "", ie = ((C = k == null ? void 0 : k.shortName) == null ? void 0 : C.toLowerCase()) || "", G = E.chain.toLowerCase(), z = E.code.toLowerCase(), te = E.name.toLowerCase(), X = [z, te, _, ie, G];
2685
+ if (!p.every((L) => X.some((c) => c.includes(L)))) continue;
2668
2686
  let v = 0;
2669
- Q === f ? v += 100 : Q.startsWith(p[0]) && (v += 50), E.popular && (v += 10), p.length > 1 && (_.includes(p[1]) || re.includes(p[1]) || j.includes(p[1])) && (v += 25), x.push({ item: E, score: v });
2687
+ z === f ? v += 100 : z.startsWith(p[0]) && (v += 50), E.popular && (v += 10), p.length > 1 && (_.includes(p[1]) || ie.includes(p[1]) || G.includes(p[1])) && (v += 25), x.push({ item: E, score: v });
2670
2688
  }
2671
2689
  return x.sort((E, k) => k.score - E.score), x.map((E) => E.item);
2672
2690
  }, [s, u, o, d]);
2673
- return /* @__PURE__ */ l(q, { children: [
2674
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
2691
+ return /* @__PURE__ */ l(ee, { children: [
2692
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
2675
2693
  /* @__PURE__ */ e(
2676
2694
  "h2",
2677
2695
  {
@@ -2680,10 +2698,10 @@ function cn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2680
2698
  children: "Select crypto currency"
2681
2699
  }
2682
2700
  ),
2683
- /* @__PURE__ */ e(Ve, { value: u, onChange: i }),
2701
+ /* @__PURE__ */ e($e, { value: u, onChange: i }),
2684
2702
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2685
2703
  h.map((f, p) => {
2686
- const x = qe(f.chain), C = (x == null ? void 0 : x.name) || f.chainName || f.chain, E = f.name !== f.code ? f.name : "", k = m(f.code, f.chain);
2704
+ const x = tt(f.chain), C = (x == null ? void 0 : x.name) || f.chainName || f.chain, E = f.name !== f.code ? f.name : "", k = m(f.code, f.chain);
2687
2705
  return /* @__PURE__ */ l("div", { children: [
2688
2706
  /* @__PURE__ */ l(
2689
2707
  "button",
@@ -2699,9 +2717,9 @@ function cn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2699
2717
  className: "absolute top-0 left-0",
2700
2718
  style: { background: "#ffffff", borderRadius: "50%" },
2701
2719
  children: /* @__PURE__ */ e(
2702
- Xt,
2720
+ Zt,
2703
2721
  {
2704
- src: zt(f.code, r),
2722
+ src: qt(f.code, r),
2705
2723
  alt: f.code,
2706
2724
  size: 32
2707
2725
  }
@@ -2720,9 +2738,9 @@ function cn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2720
2738
  background: "#ffffff"
2721
2739
  },
2722
2740
  children: /* @__PURE__ */ e(
2723
- Xt,
2741
+ Zt,
2724
2742
  {
2725
- src: ut(f.chain, r),
2743
+ src: ft(f.chain, r),
2726
2744
  alt: f.chain,
2727
2745
  size: 16
2728
2746
  }
@@ -2771,13 +2789,13 @@ function cn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
2771
2789
  ] })
2772
2790
  ] });
2773
2791
  }
2774
- function sn({
2792
+ function hn({
2775
2793
  methods: t,
2776
2794
  selectedId: a,
2777
2795
  onSelect: n,
2778
2796
  onClose: r
2779
2797
  }) {
2780
- const [o, d] = N(""), u = $(() => {
2798
+ const [o, d] = N(""), u = j(() => {
2781
2799
  const i = o.trim().toLowerCase();
2782
2800
  if (!i) {
2783
2801
  if (a) {
@@ -2793,8 +2811,8 @@ function sn({
2793
2811
  (s) => s.id.toLowerCase().includes(i) || s.name.toLowerCase().includes(i) || s.description && s.description.toLowerCase().includes(i)
2794
2812
  );
2795
2813
  }, [t, o, a]);
2796
- return /* @__PURE__ */ l(q, { children: [
2797
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: r }) }),
2814
+ return /* @__PURE__ */ l(ee, { children: [
2815
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: r }) }),
2798
2816
  /* @__PURE__ */ e(
2799
2817
  "h2",
2800
2818
  {
@@ -2803,10 +2821,10 @@ function sn({
2803
2821
  children: "Choose payment method"
2804
2822
  }
2805
2823
  ),
2806
- /* @__PURE__ */ e(Ve, { value: o, onChange: d }),
2824
+ /* @__PURE__ */ e($e, { value: o, onChange: d }),
2807
2825
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2808
2826
  u.map((i, s) => {
2809
- const m = i.id === a, h = ea(i.id, i.name);
2827
+ const m = i.id === a, h = aa(i.id, i.name);
2810
2828
  return /* @__PURE__ */ l("div", { children: [
2811
2829
  /* @__PURE__ */ l(
2812
2830
  "button",
@@ -2820,7 +2838,7 @@ function sn({
2820
2838
  {
2821
2839
  className: `flex items-center justify-center shrink-0 ${i.description ? "mt-0.5" : ""}`,
2822
2840
  style: { width: 32, height: 32 },
2823
- children: ta(i.id, i.icon, 32)
2841
+ children: na(i.id, i.icon, 32)
2824
2842
  }
2825
2843
  ),
2826
2844
  /* @__PURE__ */ l("div", { className: "text-left flex-1", children: [
@@ -2861,7 +2879,7 @@ function sn({
2861
2879
  ] })
2862
2880
  ] });
2863
2881
  }
2864
- function dn({
2882
+ function pn({
2865
2883
  checked: t,
2866
2884
  onChange: a,
2867
2885
  accentColor: n = "var(--t-accent)"
@@ -2891,11 +2909,11 @@ function dn({
2891
2909
  }
2892
2910
  );
2893
2911
  }
2894
- const un = [
2912
+ const yn = [
2895
2913
  { label: "Privacy policy", href: "https://nowramp.com/privacy-policy" },
2896
2914
  { label: "Terms of use", href: "https://nowramp.com/terms-and-conditions" }
2897
2915
  ];
2898
- function mn({
2916
+ function Cn({
2899
2917
  onClose: t,
2900
2918
  darkMode: a,
2901
2919
  onToggleDarkMode: n,
@@ -2908,10 +2926,10 @@ function mn({
2908
2926
  assetBaseUrl: m = ""
2909
2927
  }) {
2910
2928
  const [h, f] = N(!1);
2911
- return /* @__PURE__ */ l(q, { children: [
2912
- /* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
2929
+ return /* @__PURE__ */ l(ee, { children: [
2930
+ /* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
2913
2931
  /* @__PURE__ */ l("div", { className: "px-5 flex-1 pt-6 overflow-y-auto custom-scroll", children: [
2914
- s && /* @__PURE__ */ l(q, { children: [
2932
+ s && /* @__PURE__ */ l(ee, { children: [
2915
2933
  /* @__PURE__ */ e("div", { style: { borderTop: "1px solid var(--t-divider)" }, children: /* @__PURE__ */ l(
2916
2934
  "button",
2917
2935
  {
@@ -2930,7 +2948,7 @@ function mn({
2930
2948
  style: { width: 40, height: 40, borderRadius: "50%", objectFit: "cover" },
2931
2949
  onError: () => f(!0)
2932
2950
  }
2933
- ) : /* @__PURE__ */ e(fn, { size: 40 }),
2951
+ ) : /* @__PURE__ */ e(gn, { size: 40 }),
2934
2952
  /* @__PURE__ */ l("div", { className: "text-left", children: [
2935
2953
  /* @__PURE__ */ e(
2936
2954
  "span",
@@ -2950,16 +2968,16 @@ function mn({
2950
2968
  )
2951
2969
  ] })
2952
2970
  ] }),
2953
- /* @__PURE__ */ e($t, {})
2971
+ /* @__PURE__ */ e(Xt, {})
2954
2972
  ]
2955
2973
  }
2956
2974
  ) }),
2957
2975
  /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
2958
2976
  ] }),
2959
- d && /* @__PURE__ */ l(q, { children: [
2977
+ d && /* @__PURE__ */ l(ee, { children: [
2960
2978
  /* @__PURE__ */ e("div", { style: { borderTop: s ? "none" : "1px solid var(--t-divider)" }, children: /* @__PURE__ */ l("div", { className: "flex items-center justify-between w-full py-5", children: [
2961
2979
  /* @__PURE__ */ l("div", { className: "flex items-center gap-3.5", children: [
2962
- /* @__PURE__ */ e(Wa, { size: 40 }),
2980
+ /* @__PURE__ */ e(za, { size: 40 }),
2963
2981
  /* @__PURE__ */ e(
2964
2982
  "span",
2965
2983
  {
@@ -2969,11 +2987,11 @@ function mn({
2969
2987
  }
2970
2988
  )
2971
2989
  ] }),
2972
- /* @__PURE__ */ e(dn, { checked: a, onChange: n, accentColor: "#4CD964" })
2990
+ /* @__PURE__ */ e(pn, { checked: a, onChange: n, accentColor: "#4CD964" })
2973
2991
  ] }) }),
2974
2992
  /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
2975
2993
  ] }),
2976
- un.map((p) => /* @__PURE__ */ l("div", { children: [
2994
+ yn.map((p) => /* @__PURE__ */ l("div", { children: [
2977
2995
  /* @__PURE__ */ l(
2978
2996
  "a",
2979
2997
  {
@@ -2991,7 +3009,7 @@ function mn({
2991
3009
  children: p.label
2992
3010
  }
2993
3011
  ),
2994
- /* @__PURE__ */ e($t, {})
3012
+ /* @__PURE__ */ e(Xt, {})
2995
3013
  ]
2996
3014
  }
2997
3015
  ),
@@ -3000,7 +3018,7 @@ function mn({
3000
3018
  ] })
3001
3019
  ] });
3002
3020
  }
3003
- function fn({ size: t = 40 }) {
3021
+ function gn({ size: t = 40 }) {
3004
3022
  return /* @__PURE__ */ l("svg", { width: t, height: t, viewBox: "0 0 40 40", fill: "none", children: [
3005
3023
  /* @__PURE__ */ e("circle", { cx: "20", cy: "20", r: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
3006
3024
  /* @__PURE__ */ e("ellipse", { cx: "20", cy: "20", rx: "9", ry: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
@@ -3008,30 +3026,30 @@ function fn({ size: t = 40 }) {
3008
3026
  /* @__PURE__ */ e("path", { d: "M5 12h30M5 28h30", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" })
3009
3027
  ] });
3010
3028
  }
3011
- function hn({
3029
+ function xn({
3012
3030
  onClose: t,
3013
3031
  onSelect: a,
3014
3032
  assetBaseUrl: n = "",
3015
3033
  selectedCode: r
3016
3034
  }) {
3017
- const [o, d] = N(""), u = $(() => {
3035
+ const [o, d] = N(""), u = j(() => {
3018
3036
  const i = o.trim().toLowerCase();
3019
3037
  if (!i) {
3020
3038
  if (r) {
3021
- const s = r.toLowerCase(), m = ht[s];
3039
+ const s = r.toLowerCase(), m = yt[s];
3022
3040
  if (m) {
3023
- const h = Je.filter((f) => f.code !== s);
3041
+ const h = et.filter((f) => f.code !== s);
3024
3042
  return [m, ...h];
3025
3043
  }
3026
3044
  }
3027
- return Je;
3045
+ return et;
3028
3046
  }
3029
- return Je.filter(
3047
+ return et.filter(
3030
3048
  (s) => s.name.toLowerCase().includes(i) || s.code.includes(i) || s.defaultFiat.toLowerCase().includes(i)
3031
3049
  );
3032
3050
  }, [o, r]);
3033
- return /* @__PURE__ */ l(q, { children: [
3034
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
3051
+ return /* @__PURE__ */ l(ee, { children: [
3052
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
3035
3053
  /* @__PURE__ */ e(
3036
3054
  "h2",
3037
3055
  {
@@ -3046,7 +3064,7 @@ function hn({
3046
3064
  children: "Select your country"
3047
3065
  }
3048
3066
  ),
3049
- /* @__PURE__ */ e(Ve, { value: o, onChange: d }),
3067
+ /* @__PURE__ */ e($e, { value: o, onChange: d }),
3050
3068
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
3051
3069
  u.map((i, s) => {
3052
3070
  const m = (r == null ? void 0 : r.toLowerCase()) === i.code;
@@ -3058,7 +3076,7 @@ function hn({
3058
3076
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
3059
3077
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
3060
3078
  children: [
3061
- /* @__PURE__ */ e(pn, { code: i.code, size: 32, baseUrl: n }),
3079
+ /* @__PURE__ */ e(vn, { code: i.code, size: 32, baseUrl: n }),
3062
3080
  /* @__PURE__ */ l("div", { className: "text-left flex-1", children: [
3063
3081
  /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: i.name }),
3064
3082
  /* @__PURE__ */ e("span", { className: "text-[13px] ml-2", style: { color: "var(--t-text-secondary)" }, children: i.defaultFiat })
@@ -3088,7 +3106,7 @@ function hn({
3088
3106
  ] })
3089
3107
  ] });
3090
3108
  }
3091
- function pn({ code: t, size: a = 32, baseUrl: n = "" }) {
3109
+ function vn({ code: t, size: a = 32, baseUrl: n = "" }) {
3092
3110
  const [r, o] = N(!1);
3093
3111
  return r ? /* @__PURE__ */ e(
3094
3112
  "div",
@@ -3118,7 +3136,7 @@ function pn({ code: t, size: a = 32, baseUrl: n = "" }) {
3118
3136
  }
3119
3137
  );
3120
3138
  }
3121
- function yn({
3139
+ function bn({
3122
3140
  className: t = "",
3123
3141
  theme: a = "dark",
3124
3142
  skinId: n = "mono",
@@ -3137,193 +3155,197 @@ function yn({
3137
3155
  showSettings: E = !0,
3138
3156
  showThemeToggle: k = !0,
3139
3157
  autoRedirect: _ = !1,
3140
- explorerUrl: re,
3141
- doneButtonText: j = "Done",
3142
- supportEmail: Q,
3143
- stablecoinParity: ee,
3144
- partnerName: W,
3145
- onDone: ge
3158
+ explorerUrl: ie,
3159
+ doneButtonText: G = "Done",
3160
+ supportEmail: z,
3161
+ stablecoinParity: te,
3162
+ partnerName: X,
3163
+ onDone: ve
3146
3164
  }) {
3147
- var kt, Tt, Lt, Ut, Ft, Dt, Mt, It, Bt;
3165
+ var Lt, Ut, Ft, Dt, Mt, It, Bt, Ot, Ht;
3148
3166
  const {
3149
3167
  state: v,
3150
3168
  dispatch: L,
3151
3169
  config: c,
3152
3170
  configLoading: U,
3153
3171
  quotes: w,
3154
- quotesLoading: S,
3155
- quotesError: te,
3156
- fetchQuotes: xe,
3157
- createOrder: ve,
3158
- orderLoading: le,
3159
- amountError: he,
3172
+ quotesLoading: b,
3173
+ quotesError: J,
3174
+ fetchQuotes: be,
3175
+ createOrder: Se,
3176
+ orderLoading: se,
3177
+ amountError: pe,
3160
3178
  fieldLocks: D,
3161
3179
  apiConfig: ae,
3162
3180
  assetBaseUrl: B,
3163
- availableFiats: ce,
3164
- availableCryptos: De,
3165
- availablePaymentMethods: Y,
3166
- selectionUnsupported: oe
3167
- } = Ue(), [z, Ee] = N(a === "dark"), [Ae, at] = N(n), [se, O] = N(null), [Me, Re] = N(!1), [Ie, je] = N(!1), [ie, Ge] = N(!1), [Se, Be] = N(!1), [$e, de] = N(null), [Oe, nt] = N(!0), [rt, We] = N(!1), [ue, y] = N(!1), A = I(null), R = I(), F = I(v.flowType);
3181
+ availableFiats: de,
3182
+ availableCryptos: Me,
3183
+ availablePaymentMethods: Q,
3184
+ selectionUnsupported: ne,
3185
+ quotesEmpty: O,
3186
+ bestUnavailableReason: Re
3187
+ } = Fe(), [le, We] = N(a === "dark"), [ke, Ie] = N(n), [ce, $] = N(null), [Ne, Be] = N(!1), [Xe, re] = N(!1), [rt, ye] = N(!1), [Oe, He] = N(!1), [Ye, ue] = N(null), [Pe, ot] = N(!0), [it, Ze] = N(!1), [me, y] = N(!1), A = I(null), R = I(), F = I(v.flowType);
3168
3188
  Z(() => {
3169
- Ee(a === "dark");
3189
+ We(a === "dark");
3170
3190
  }, [a]), Z(() => {
3171
- const g = setTimeout(() => nt(!1), U ? 0 : 800);
3191
+ const g = setTimeout(() => ot(!1), U ? 0 : 800);
3172
3192
  return () => clearTimeout(g);
3173
3193
  }, [U]), Z(() => {
3174
- if (F.current !== v.flowType && !Oe) {
3175
- F.current = v.flowType, We(!0), Re(!1), je(!1);
3176
- const g = setTimeout(() => We(!1), 350);
3194
+ if (F.current !== v.flowType && !Pe) {
3195
+ F.current = v.flowType, Ze(!0), Be(!1), re(!1);
3196
+ const g = setTimeout(() => Ze(!1), 350);
3177
3197
  return () => clearTimeout(g);
3178
3198
  }
3179
3199
  F.current = v.flowType;
3180
- }, [v.flowType, Oe]);
3181
- const M = v.flowType, T = M === "buy", H = v.cryptoCurrency || "BTC", X = v.fiatCurrency || "USD", ot = T ? v.fiatAmount : v.cryptoAmount, J = Ia(ot), pe = (kt = w == null ? void 0 : w.bestQuote) != null && kt.exchangeRate ? parseFloat(w.bestQuote.exchangeRate) : null, Xe = I(null);
3182
- pe && H && X && (Xe.current = { rate: pe, crypto: H, fiat: X });
3183
- const Ct = $(() => {
3200
+ }, [v.flowType, Pe]);
3201
+ const M = v.flowType, T = M === "buy", H = v.cryptoCurrency || "BTC", Y = v.fiatCurrency || "USD", lt = T ? v.fiatAmount : v.cryptoAmount, q = Ka(lt), Ce = (Lt = w == null ? void 0 : w.bestQuote) != null && Lt.exchangeRate ? parseFloat(w.bestQuote.exchangeRate) : null, Ke = I(null);
3202
+ Ce && H && Y && (Ke.current = { rate: Ce, crypto: H, fiat: Y }), Z(() => {
3203
+ (O || J) && (Ke.current = null);
3204
+ }, [O, J]);
3205
+ const xt = j(() => {
3184
3206
  if (w != null && w.bestQuote) {
3185
3207
  const g = T ? w.bestQuote.cryptoAmount : w.bestQuote.fiatAmount;
3186
3208
  if (g) return g;
3187
3209
  }
3188
3210
  return "0";
3189
- }, [w, T]), He = !!(ee && W && T && Jt(H) && pe), aa = He && H.toUpperCase().includes(X.toUpperCase()), gt = He && J > 0 ? mt(aa ? J : J / pe) : null, na = He && gt ? gt : Ct, ra = $(() => {
3190
- var G, Ne, Te;
3191
- const g = pe || ((G = Xe.current) == null ? void 0 : G.rate), b = pe ? H : (Ne = Xe.current) == null ? void 0 : Ne.crypto, K = pe ? X : (Te = Xe.current) == null ? void 0 : Te.fiat;
3192
- return !g || !b || !K ? "" : `1 ${b} ≈ ${g.toFixed(2)} ${K}`;
3193
- }, [H, X, pe]);
3211
+ }, [w, T]), _e = !!(te && X && T && ea(H) && Ce), ra = _e && H.toUpperCase().includes(Y.toUpperCase()), vt = _e && q > 0 ? ht(ra ? q : q / Ce) : null, oa = _e && vt ? vt : xt, ia = j(() => {
3212
+ var W, Ee, Le;
3213
+ const g = Ce || ((W = Ke.current) == null ? void 0 : W.rate), S = Ce ? H : (Ee = Ke.current) == null ? void 0 : Ee.crypto, K = Ce ? Y : (Le = Ke.current) == null ? void 0 : Le.fiat;
3214
+ return !g || !S || !K ? "" : `1 ${S} ≈ ${g.toFixed(2)} ${K}`;
3215
+ }, [H, Y, Ce]);
3194
3216
  Z(() => {
3195
- const g = v.walletAddress.trim(), b = v.network;
3217
+ const g = v.walletAddress.trim(), S = v.network;
3196
3218
  if (!g || g.length < 10) {
3197
- de(null), L({ type: "SET_WALLET_ERROR", message: "" });
3219
+ ue(null), L({ type: "SET_WALLET_ERROR", message: "" });
3198
3220
  return;
3199
3221
  }
3200
- Be(!0), de(null);
3222
+ He(!0), ue(null);
3201
3223
  const K = new AbortController();
3202
3224
  return clearTimeout(R.current), R.current = setTimeout(async () => {
3203
- var G, Ne, Te;
3225
+ var W, Ee, Le;
3204
3226
  try {
3205
- const ct = await (await fetch(`${ae.apiUrl}/public/validate/address`, {
3227
+ const dt = await (await fetch(`${ae.apiUrl}/public/validate/address`, {
3206
3228
  method: "POST",
3207
3229
  headers: { "Content-Type": "application/json" },
3208
- body: JSON.stringify({ address: g, ...b ? { network: b } : {} }),
3230
+ body: JSON.stringify({ address: g, ...S ? { network: S } : {} }),
3209
3231
  signal: K.signal
3210
- })).json(), st = ((G = ct.data) == null ? void 0 : G.attributes) || ct.data || ct;
3211
- if (st.isValid)
3212
- de(!0), L({ type: "SET_WALLET_ERROR", message: "" });
3232
+ })).json(), ut = ((W = dt.data) == null ? void 0 : W.attributes) || dt.data || dt;
3233
+ if (ut.isValid)
3234
+ ue(!0), L({ type: "SET_WALLET_ERROR", message: "" });
3213
3235
  else {
3214
- de(!1);
3215
- const ya = ((Ne = st.errors) == null ? void 0 : Ne[0]) || ((Te = st.details) == null ? void 0 : Te.formatMessage) || "Invalid wallet address";
3216
- L({ type: "SET_WALLET_ERROR", message: ya });
3236
+ ue(!1);
3237
+ const ga = ((Ee = ut.errors) == null ? void 0 : Ee[0]) || ((Le = ut.details) == null ? void 0 : Le.formatMessage) || "Invalid wallet address";
3238
+ L({ type: "SET_WALLET_ERROR", message: ga });
3217
3239
  }
3218
- } catch (lt) {
3219
- if (lt instanceof DOMException && lt.name === "AbortError") return;
3220
- de(null);
3240
+ } catch (st) {
3241
+ if (st instanceof DOMException && st.name === "AbortError") return;
3242
+ ue(null);
3221
3243
  } finally {
3222
- K.signal.aborted || Be(!1);
3244
+ K.signal.aborted || He(!1);
3223
3245
  }
3224
3246
  }, 500), () => {
3225
3247
  clearTimeout(R.current), K.abort();
3226
3248
  };
3227
3249
  }, [v.walletAddress, v.network, ae.apiUrl]);
3228
- const xt = !ot || J === 0, vt = J > 0 && (T ? J < Vt : J < jt), St = !!he || vt || Me && xt, oa = J > 0 && !he && !vt, it = v.walletAddress.trim().length >= 10 && $e !== !1 && !Se, Ye = oa && it && !!v.cryptoCurrency && !!v.network, ia = (g) => {
3229
- let b = g.target.value.replace(/[^0-9.,]/g, "");
3230
- const K = T ? 2 : 6, G = b.indexOf(".");
3231
- G !== -1 && b.length - G - 1 > K && (b = b.slice(0, G + K + 1)), L(T ? { type: "SET_FIAT_AMOUNT", amount: b } : { type: "SET_CRYPTO_AMOUNT", amount: b });
3232
- }, bt = (g) => {
3250
+ const bt = !lt || q === 0, St = q > 0 && (T ? q < Gt : q < $t), Nt = !!pe || St || Ne && bt, la = q > 0 && !pe && !St, ct = v.walletAddress.trim().length >= 10 && Ye !== !1 && !Oe, Qe = la && ct && !!v.cryptoCurrency && !!v.network, ca = (g) => {
3251
+ let S = g.target.value.replace(/[^0-9.,]/g, "");
3252
+ const K = T ? 2 : 6, W = S.indexOf(".");
3253
+ W !== -1 && S.length - W - 1 > K && (S = S.slice(0, W + K + 1)), L(T ? { type: "SET_FIAT_AMOUNT", amount: S } : { type: "SET_CRYPTO_AMOUNT", amount: S });
3254
+ }, wt = (g) => {
3233
3255
  g !== M && L({ type: "SET_FLOW_TYPE", flowType: g, fieldLocks: D });
3234
- }, la = P(
3256
+ }, sa = P(
3235
3257
  (g) => {
3236
3258
  L({ type: "SET_FIAT_CURRENCY", currency: g });
3237
3259
  },
3238
3260
  [L]
3239
- ), ca = P(
3240
- (g, b) => {
3241
- L({ type: "SET_CRYPTO_CURRENCY", currency: g }), L({ type: "SET_CRYPTO_CHAIN", chain: b });
3261
+ ), da = P(
3262
+ (g, S) => {
3263
+ L({ type: "SET_CRYPTO_CURRENCY", currency: g }), L({ type: "SET_CRYPTO_CHAIN", chain: S });
3242
3264
  },
3243
3265
  [L]
3244
- ), sa = P(
3266
+ ), ua = P(
3245
3267
  (g) => {
3246
3268
  L({ type: "SET_PAYMENT_METHOD", methodId: g });
3247
3269
  },
3248
3270
  [L]
3249
- ), da = P(
3271
+ ), ma = P(
3250
3272
  (g) => {
3251
- L({ type: "SET_COUNTRY", country: g }), O(null);
3273
+ L({ type: "SET_COUNTRY", country: g }), $(null);
3252
3274
  },
3253
3275
  [L]
3254
- ), ua = P(() => {
3255
- O(null), setTimeout(() => O("country"), 280);
3256
- }, []), ma = v.country ? (Tt = ht[v.country.toLowerCase()]) == null ? void 0 : Tt.name : void 0, fa = () => {
3257
- Ye && (y(!0), xe());
3276
+ ), fa = P(() => {
3277
+ $(null), setTimeout(() => $("country"), 280);
3278
+ }, []), ha = v.country ? (Ut = yt[v.country.toLowerCase()]) == null ? void 0 : Ut.name : void 0, pa = () => {
3279
+ Qe && (y(!0), be());
3258
3280
  };
3259
3281
  Z(() => {
3260
3282
  var g;
3261
- if (!(!ue || S)) {
3283
+ if (!(!me || b)) {
3262
3284
  if (w != null && w.bestQuote)
3263
- y(!1), L({ type: "SELECT_QUOTE", quote: w.bestQuote }), ve().catch(() => {
3285
+ y(!1), L({ type: "SELECT_QUOTE", quote: w.bestQuote }), Se().catch(() => {
3264
3286
  });
3265
- else if (te)
3266
- y(!1), L({ type: "SET_ERROR", message: te.message || "No quotes available" });
3287
+ else if (J)
3288
+ y(!1), L({ type: "SET_ERROR", message: J.message || "No quotes available" });
3267
3289
  else if (w && !w.bestQuote) {
3268
3290
  y(!1);
3269
- const b = (g = w.unavailableGateways) == null ? void 0 : g.map((G) => G.reason).filter(Boolean), K = b != null && b.length ? `No providers available: ${b.join("; ")}` : "No providers available for this currency/network combination";
3291
+ const S = (g = w.unavailableGateways) == null ? void 0 : g.map((W) => W.reason).filter(Boolean), K = S != null && S.length ? `No providers available: ${S.join("; ")}` : "No providers available for this currency/network combination";
3270
3292
  L({ type: "SET_ERROR", message: K });
3271
3293
  }
3272
3294
  }
3273
- }, [ue, w, S, te, L, ve]);
3274
- const Nt = z ? "theme-dark" : "theme-light", Ze = Kt.find((g) => g.id === Ae) || Kt[0], ha = Ze.accent === null, pa = r ? fe(r) : !1, wt = (g) => {
3275
- const b = g.replace("#", ""), K = parseInt(b.substring(0, 2), 16), G = parseInt(b.substring(2, 4), 16), Ne = parseInt(b.substring(4, 6), 16);
3276
- return (0.299 * K + 0.587 * G + 0.114 * Ne) / 255 > 0.5 ? "#000000" : "#ffffff";
3277
- }, Et = pa ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": wt(r) } : ha ? {
3278
- "--t-accent": z ? "#ffffff" : "#111111",
3279
- "--t-cta-bg": z ? "#ffffff" : "#111111",
3280
- "--t-cta-text": z ? "#000000" : "#ffffff"
3295
+ }, [me, w, b, J, L, Se]);
3296
+ const Et = le ? "theme-dark" : "theme-light", ze = Vt.find((g) => g.id === ke) || Vt[0], ya = ze.accent === null, Ca = r ? he(r) : !1, At = (g) => {
3297
+ const S = g.replace("#", ""), K = parseInt(S.substring(0, 2), 16), W = parseInt(S.substring(2, 4), 16), Ee = parseInt(S.substring(4, 6), 16);
3298
+ return (0.299 * K + 0.587 * W + 0.114 * Ee) / 255 > 0.5 ? "#000000" : "#ffffff";
3299
+ }, Rt = Ca ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": At(r) } : ya ? {
3300
+ "--t-accent": le ? "#ffffff" : "#111111",
3301
+ "--t-cta-bg": le ? "#ffffff" : "#111111",
3302
+ "--t-cta-text": le ? "#000000" : "#ffffff"
3281
3303
  } : {
3282
- "--t-accent": Ze.accent,
3283
- "--t-cta-bg": Ze.accent,
3284
- "--t-cta-text": wt(Ze.accent)
3285
- }, ne = {};
3286
- s && fe(s) && (ne["--t-surface"] = s, ne["--t-modal-bg"] = s), m && fe(m) && (ne["--t-pill-bg"] = m, ne["--t-close-bg"] = m), h && fe(h) && (ne["--t-text"] = h), f && fe(f) && (ne["--t-text-secondary"] = f), p && fe(p) && (ne["--t-text-muted"] = p, ne["--t-text-tertiary"] = p), x && fe(x) && (ne["--t-success"] = x);
3287
- const be = {};
3288
- o && fe(o) ? be.backgroundColor = o : be.backgroundColor = "var(--t-bg)", d && (d.startsWith("https://") || d.startsWith("data:image/")) && (be.backgroundImage = `url(${d})`, be.backgroundSize = "cover", be.backgroundPosition = "center");
3289
- const Qe = z ? "#ffffff" : "#111111", ze = {};
3290
- u && fe(u) && (ze.border = `1px solid ${u}`), i && (ze.borderRadius = i);
3291
- const At = v.step === "checkout" ? /* @__PURE__ */ e(za, { autoRedirect: _ }) : v.step === "processing" ? /* @__PURE__ */ e(qa, {}) : v.step === "complete" ? /* @__PURE__ */ e(en, { explorerUrl: re, doneButtonText: j, onDone: ge }) : v.step === "error" ? /* @__PURE__ */ e(tn, { supportEmail: Q }) : v.step === "confirm" ? /* @__PURE__ */ e(an, { stablecoinParity: He, partnerName: W }) : null;
3292
- if (At)
3304
+ "--t-accent": ze.accent,
3305
+ "--t-cta-bg": ze.accent,
3306
+ "--t-cta-text": At(ze.accent)
3307
+ }, oe = {};
3308
+ s && he(s) && (oe["--t-surface"] = s, oe["--t-modal-bg"] = s), m && he(m) && (oe["--t-pill-bg"] = m, oe["--t-close-bg"] = m), h && he(h) && (oe["--t-text"] = h), f && he(f) && (oe["--t-text-secondary"] = f), p && he(p) && (oe["--t-text-muted"] = p, oe["--t-text-tertiary"] = p), x && he(x) && (oe["--t-success"] = x);
3309
+ const we = {};
3310
+ o && he(o) ? we.backgroundColor = o : we.backgroundColor = "var(--t-bg)", d && (d.startsWith("https://") || d.startsWith("data:image/")) && (we.backgroundImage = `url(${d})`, we.backgroundSize = "cover", we.backgroundPosition = "center");
3311
+ const Je = le ? "#ffffff" : "#111111", qe = {};
3312
+ u && he(u) && (qe.border = `1px solid ${u}`), i && (qe.borderRadius = i);
3313
+ const kt = v.step === "checkout" ? /* @__PURE__ */ e(an, { autoRedirect: _ }) : v.step === "processing" ? /* @__PURE__ */ e(rn, {}) : v.step === "complete" ? /* @__PURE__ */ e(on, { explorerUrl: ie, doneButtonText: G, onDone: ve }) : v.step === "error" ? /* @__PURE__ */ e(ln, { supportEmail: z }) : v.step === "confirm" ? /* @__PURE__ */ e(cn, { stablecoinParity: _e, partnerName: X }) : null;
3314
+ if (kt)
3293
3315
  return /* @__PURE__ */ e(
3294
3316
  "div",
3295
3317
  {
3296
- className: `${Nt} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3318
+ className: `${Et} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3297
3319
  style: {
3298
3320
  fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
3299
- ...be,
3300
- ...Et,
3301
- ...ne,
3302
- ...ze
3321
+ ...we,
3322
+ ...Rt,
3323
+ ...oe,
3324
+ ...qe
3303
3325
  },
3304
- children: At
3326
+ children: kt
3305
3327
  }
3306
3328
  );
3307
- const me = v.network, ke = me ? qe(me) : null, Rt = (ke == null ? void 0 : ke.shortName) || (ke == null ? void 0 : ke.name) || me;
3329
+ const fe = v.network, Te = fe ? tt(fe) : null, Tt = (Te == null ? void 0 : Te.shortName) || (Te == null ? void 0 : Te.name) || fe;
3308
3330
  return /* @__PURE__ */ l(
3309
3331
  "div",
3310
3332
  {
3311
- className: `${Nt} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3333
+ className: `${Et} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
3312
3334
  style: {
3313
3335
  fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
3314
- ...be,
3315
- ...Et,
3316
- ...ne,
3317
- ...ze
3336
+ ...we,
3337
+ ...Rt,
3338
+ ...oe,
3339
+ ...qe
3318
3340
  },
3319
3341
  children: [
3320
- E && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${C ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e($a, { onClick: () => O("settings") }) }),
3342
+ E && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${C ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(Qa, { onClick: () => $("settings") }) }),
3321
3343
  C ? /* @__PURE__ */ l("div", { className: "flex flex-col items-center pt-3 pb-5", children: [
3322
3344
  /* @__PURE__ */ l("div", { className: "flex", style: { width: 165 }, children: [
3323
3345
  /* @__PURE__ */ e(
3324
3346
  "button",
3325
3347
  {
3326
- onClick: () => bt("buy"),
3348
+ onClick: () => wt("buy"),
3327
3349
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
3328
3350
  style: { color: M === "buy" ? "var(--t-text)" : "var(--t-text-secondary)" },
3329
3351
  children: "Buy"
@@ -3332,7 +3354,7 @@ function yn({
3332
3354
  /* @__PURE__ */ e(
3333
3355
  "button",
3334
3356
  {
3335
- onClick: () => bt("sell"),
3357
+ onClick: () => wt("sell"),
3336
3358
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
3337
3359
  style: { color: M === "sell" ? "var(--t-text)" : "var(--t-text-secondary)" },
3338
3360
  children: "Sell"
@@ -3354,7 +3376,7 @@ function yn({
3354
3376
  )
3355
3377
  ] })
3356
3378
  ] }) : null,
3357
- Oe || rt || U ? /* @__PURE__ */ e(on, {}) : /* @__PURE__ */ l("div", { className: "flex-1 overflow-hidden px-5 flex flex-col tab-fade-in", children: [
3379
+ Pe || it || U ? /* @__PURE__ */ e(un, {}) : /* @__PURE__ */ l("div", { className: "flex-1 overflow-hidden px-5 flex flex-col tab-fade-in", children: [
3358
3380
  /* @__PURE__ */ l(
3359
3381
  "div",
3360
3382
  {
@@ -3362,7 +3384,7 @@ function yn({
3362
3384
  style: {
3363
3385
  background: "var(--t-surface)",
3364
3386
  borderRadius: 5,
3365
- border: Me && St ? "1px solid #EF4444" : "1px solid transparent",
3387
+ border: Ne && Nt ? "1px solid #EF4444" : "1px solid transparent",
3366
3388
  minHeight: 102
3367
3389
  },
3368
3390
  children: [
@@ -3373,20 +3395,20 @@ function yn({
3373
3395
  {
3374
3396
  ref: A,
3375
3397
  type: "text",
3376
- value: ot,
3377
- onChange: ia,
3378
- onBlur: () => Re(!0),
3398
+ value: lt,
3399
+ onChange: ca,
3400
+ onBlur: () => Be(!0),
3379
3401
  placeholder: T ? "250" : "0.01",
3380
3402
  className: "bg-transparent outline-none w-0 flex-1 mr-3",
3381
3403
  style: { color: "var(--t-text)", fontSize: 24, fontWeight: 600, lineHeight: "32px", padding: 0, border: "none", borderRadius: 0, backgroundColor: "transparent", height: "auto", width: 0 },
3382
3404
  inputMode: "decimal",
3383
- disabled: !!((Lt = D == null ? void 0 : D.sourceAmount) != null && Lt.locked)
3405
+ disabled: !!((Ft = D == null ? void 0 : D.sourceAmount) != null && Ft.locked)
3384
3406
  }
3385
3407
  ),
3386
3408
  T ? /* @__PURE__ */ l(
3387
3409
  "button",
3388
3410
  {
3389
- onClick: () => O("fiat"),
3411
+ onClick: () => $("fiat"),
3390
3412
  className: "flex items-center gap-1.5 shrink-0 transition-colors",
3391
3413
  style: {
3392
3414
  background: "var(--t-pill-bg)",
@@ -3395,18 +3417,18 @@ function yn({
3395
3417
  paddingLeft: 10,
3396
3418
  paddingRight: 10
3397
3419
  },
3398
- disabled: !!((Ut = D == null ? void 0 : D.sourceCurrency) != null && Ut.locked),
3420
+ disabled: !!((Dt = D == null ? void 0 : D.sourceCurrency) != null && Dt.locked),
3399
3421
  children: [
3400
- /* @__PURE__ */ e(ft, { currencyCode: X, size: 16, baseUrl: B }),
3401
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Qe }, children: X }),
3402
- /* @__PURE__ */ e(_e, {})
3422
+ /* @__PURE__ */ e(pt, { currencyCode: Y, size: 16, baseUrl: B }),
3423
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Je }, children: Y }),
3424
+ /* @__PURE__ */ e(Ge, {})
3403
3425
  ]
3404
3426
  }
3405
3427
  ) : /* @__PURE__ */ l("div", { className: "flex flex-col items-end shrink-0", children: [
3406
3428
  /* @__PURE__ */ l(
3407
3429
  "button",
3408
3430
  {
3409
- onClick: () => O("crypto"),
3431
+ onClick: () => $("crypto"),
3410
3432
  className: "flex items-center gap-1.5 transition-colors",
3411
3433
  style: {
3412
3434
  background: "var(--t-pill-bg)",
@@ -3415,34 +3437,34 @@ function yn({
3415
3437
  paddingLeft: 10,
3416
3438
  paddingRight: 10
3417
3439
  },
3418
- disabled: !!((Ft = D == null ? void 0 : D.destinationCurrency) != null && Ft.locked),
3440
+ disabled: !!((Mt = D == null ? void 0 : D.destinationCurrency) != null && Mt.locked),
3419
3441
  children: [
3420
- /* @__PURE__ */ e(Gt, { ticker: H, size: 16, baseUrl: B }),
3421
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Qe }, children: H }),
3422
- /* @__PURE__ */ e(_e, {})
3442
+ /* @__PURE__ */ e(Wt, { ticker: H, size: 16, baseUrl: B }),
3443
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Je }, children: H }),
3444
+ /* @__PURE__ */ e(Ge, {})
3423
3445
  ]
3424
3446
  }
3425
3447
  ),
3426
- me && /* @__PURE__ */ l("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3448
+ fe && /* @__PURE__ */ l("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3427
3449
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
3428
3450
  "img",
3429
3451
  {
3430
- src: ut(me, B),
3431
- alt: me,
3452
+ src: ft(fe, B),
3453
+ alt: fe,
3432
3454
  width: 14,
3433
3455
  height: 14,
3434
3456
  className: "rounded-full",
3435
3457
  style: { width: 14, height: 14 }
3436
3458
  }
3437
3459
  ) }),
3438
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: Rt })
3460
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: Tt })
3439
3461
  ] })
3440
3462
  ] })
3441
3463
  ] })
3442
3464
  ]
3443
3465
  }
3444
3466
  ),
3445
- Me && St && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: he || (xt ? "Amount should be more than 0" : T ? `Minimum amount is ${Vt} ${X}` : `Minimum amount is ${jt} ${H}`) }),
3467
+ Ne && Nt && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: pe || (bt ? "Amount should be more than 0" : T ? `Minimum amount is ${Gt} ${Y}` : `Minimum amount is ${$t} ${H}`) }),
3446
3468
  /* @__PURE__ */ l(
3447
3469
  "div",
3448
3470
  {
@@ -3459,20 +3481,20 @@ function yn({
3459
3481
  children: [
3460
3482
  /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
3461
3483
  /* @__PURE__ */ l("div", { className: "flex items-start justify-between", children: [
3462
- S && !ue ? /* @__PURE__ */ e(V, { w: 180, h: 32 }) : /* @__PURE__ */ e(
3463
- rn,
3484
+ b && !me ? /* @__PURE__ */ e(V, { w: 180, h: 32 }) : /* @__PURE__ */ e(
3485
+ dn,
3464
3486
  {
3465
- value: J > 0 ? na : "0",
3487
+ value: q > 0 ? oa : "0",
3466
3488
  height: 32,
3467
3489
  className: "font-semibold",
3468
- style: { color: J > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
3490
+ style: { color: q > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
3469
3491
  }
3470
3492
  ),
3471
3493
  T ? /* @__PURE__ */ l("div", { className: "flex flex-col items-end shrink-0", children: [
3472
3494
  /* @__PURE__ */ l(
3473
3495
  "button",
3474
3496
  {
3475
- onClick: () => O("crypto"),
3497
+ onClick: () => $("crypto"),
3476
3498
  className: "flex items-center gap-1.5 transition-colors",
3477
3499
  style: {
3478
3500
  background: "var(--t-pill-bg)",
@@ -3481,32 +3503,32 @@ function yn({
3481
3503
  paddingLeft: 10,
3482
3504
  paddingRight: 10
3483
3505
  },
3484
- disabled: !!((Dt = D == null ? void 0 : D.destinationCurrency) != null && Dt.locked),
3506
+ disabled: !!((It = D == null ? void 0 : D.destinationCurrency) != null && It.locked),
3485
3507
  children: [
3486
- /* @__PURE__ */ e(Gt, { ticker: H, size: 16, baseUrl: B }),
3487
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Qe }, children: H }),
3488
- /* @__PURE__ */ e(_e, {})
3508
+ /* @__PURE__ */ e(Wt, { ticker: H, size: 16, baseUrl: B }),
3509
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Je }, children: H }),
3510
+ /* @__PURE__ */ e(Ge, {})
3489
3511
  ]
3490
3512
  }
3491
3513
  ),
3492
- me && /* @__PURE__ */ l("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3514
+ fe && /* @__PURE__ */ l("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
3493
3515
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
3494
3516
  "img",
3495
3517
  {
3496
- src: ut(me, B),
3497
- alt: me,
3518
+ src: ft(fe, B),
3519
+ alt: fe,
3498
3520
  width: 14,
3499
3521
  height: 14,
3500
3522
  className: "rounded-full",
3501
3523
  style: { width: 14, height: 14 }
3502
3524
  }
3503
3525
  ) }),
3504
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: Rt })
3526
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: Tt })
3505
3527
  ] })
3506
3528
  ] }) : /* @__PURE__ */ l(
3507
3529
  "button",
3508
3530
  {
3509
- onClick: () => O("fiat"),
3531
+ onClick: () => $("fiat"),
3510
3532
  className: "flex items-center gap-1.5 shrink-0 transition-colors",
3511
3533
  style: {
3512
3534
  background: "var(--t-pill-bg)",
@@ -3515,11 +3537,11 @@ function yn({
3515
3537
  paddingLeft: 10,
3516
3538
  paddingRight: 10
3517
3539
  },
3518
- disabled: !!((Mt = D == null ? void 0 : D.sourceCurrency) != null && Mt.locked),
3540
+ disabled: !!((Bt = D == null ? void 0 : D.sourceCurrency) != null && Bt.locked),
3519
3541
  children: [
3520
- /* @__PURE__ */ e(ft, { currencyCode: X, size: 16, baseUrl: B }),
3521
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Qe }, children: X }),
3522
- /* @__PURE__ */ e(_e, {})
3542
+ /* @__PURE__ */ e(pt, { currencyCode: Y, size: 16, baseUrl: B }),
3543
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Je }, children: Y }),
3544
+ /* @__PURE__ */ e(Ge, {})
3523
3545
  ]
3524
3546
  }
3525
3547
  )
@@ -3527,7 +3549,15 @@ function yn({
3527
3549
  ]
3528
3550
  }
3529
3551
  ),
3530
- He && J > 0 && (w == null ? void 0 : w.bestQuote) && /* @__PURE__ */ l(
3552
+ O && q > 0 && /* @__PURE__ */ e(
3553
+ "div",
3554
+ {
3555
+ className: "px-[18px] py-[10px] mt-[2px]",
3556
+ style: { background: "var(--t-surface)", fontSize: 12, color: "#EF4444", lineHeight: "16px" },
3557
+ children: Re || "No providers available for this combination"
3558
+ }
3559
+ ),
3560
+ _e && q > 0 && (w == null ? void 0 : w.bestQuote) && /* @__PURE__ */ l(
3531
3561
  "div",
3532
3562
  {
3533
3563
  className: "flex items-start gap-2 mt-[2px] px-[14px] py-[10px]",
@@ -3539,15 +3569,15 @@ function yn({
3539
3569
  ] }),
3540
3570
  /* @__PURE__ */ l("span", { children: [
3541
3571
  "You will be charged for ",
3542
- Ct,
3572
+ xt,
3543
3573
  " ",
3544
3574
  H,
3545
3575
  ", the rest up to ",
3546
- mt(J),
3576
+ ht(q),
3547
3577
  " ",
3548
- X,
3578
+ Y,
3549
3579
  " will be credited to your ",
3550
- W,
3580
+ X,
3551
3581
  " account"
3552
3582
  ] })
3553
3583
  ]
@@ -3559,17 +3589,17 @@ function yn({
3559
3589
  className: "flex items-center justify-between mt-[2px] px-[18px] pt-[12px] pb-[14px]",
3560
3590
  style: {
3561
3591
  background: "var(--t-surface)",
3562
- ...!Y.length && !((It = c == null ? void 0 : c.paymentMethods) != null && It.length) ? { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 } : {}
3592
+ ...!Q.length && !((Ot = c == null ? void 0 : c.paymentMethods) != null && Ot.length) ? { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 } : {}
3563
3593
  },
3564
- children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: x ? "var(--t-success)" : "var(--t-text-secondary)" }, children: ra || " " })
3594
+ children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: x ? "var(--t-success)" : "var(--t-text-secondary)" }, children: ia || " " })
3565
3595
  }
3566
3596
  ),
3567
- (Y.length > 0 || (c == null ? void 0 : c.paymentMethods) && c.paymentMethods.length > 0) && /* @__PURE__ */ e("div", { className: "mt-[2px]", children: Y.length > 0 ? /* @__PURE__ */ e(
3568
- Qa,
3597
+ (Q.length > 0 || (c == null ? void 0 : c.paymentMethods) && c.paymentMethods.length > 0) && /* @__PURE__ */ e("div", { className: "mt-[2px]", children: Q.length > 0 ? /* @__PURE__ */ e(
3598
+ tn,
3569
3599
  {
3570
- methods: Y,
3600
+ methods: Q,
3571
3601
  selectedId: v.paymentMethodId,
3572
- onOpenModal: () => O("payment"),
3602
+ onOpenModal: () => $("payment"),
3573
3603
  fiatCurrency: v.fiatCurrency
3574
3604
  }
3575
3605
  ) : /* @__PURE__ */ e(
@@ -3592,16 +3622,16 @@ function yn({
3592
3622
  type: "text",
3593
3623
  value: v.walletAddress,
3594
3624
  onChange: (g) => L({ type: "SET_WALLET_ADDRESS", address: g.target.value }),
3595
- onFocus: () => Ge(!0),
3625
+ onFocus: () => ye(!0),
3596
3626
  onBlur: () => {
3597
- Ge(!1), je(!0);
3627
+ ye(!1), re(!0);
3598
3628
  },
3599
3629
  placeholder: T ? "Enter your receiving address" : "Enter your sending address",
3600
3630
  spellCheck: !1,
3601
3631
  autoComplete: "off",
3602
3632
  className: "w-full bg-transparent text-[13px] outline-none transition-colors",
3603
3633
  style: {
3604
- border: v.walletError || Ie && !it ? "1px solid #EF4444" : ie ? "1px solid var(--t-border-focus)" : "1px solid var(--t-border)",
3634
+ border: v.walletError || Xe && !ct ? "1px solid #EF4444" : rt ? "1px solid var(--t-border-focus)" : "1px solid var(--t-border)",
3605
3635
  outline: "none",
3606
3636
  boxShadow: "none",
3607
3637
  borderRadius: 3.5,
@@ -3611,13 +3641,13 @@ function yn({
3611
3641
  fontSize: 13,
3612
3642
  backgroundColor: "transparent"
3613
3643
  },
3614
- disabled: !!((Bt = D == null ? void 0 : D.destinationAddress) != null && Bt.locked)
3644
+ disabled: !!((Ht = D == null ? void 0 : D.destinationAddress) != null && Ht.locked)
3615
3645
  }
3616
3646
  ),
3617
- v.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: v.walletError }) : Ie && !it && !Se ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : Se && v.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
3647
+ v.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: v.walletError }) : Xe && !ct && !Oe ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : Oe && v.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
3618
3648
  ] }),
3619
3649
  /* @__PURE__ */ e("div", { className: "flex-1", style: { minHeight: 16 } }),
3620
- oe && /* @__PURE__ */ l("div", { className: "text-[12px] text-center mb-2", style: { color: "#EF4444" }, children: [
3650
+ ne && /* @__PURE__ */ l("div", { className: "text-[12px] text-center mb-2", style: { color: "#EF4444" }, children: [
3621
3651
  "This currency is not available for ",
3622
3652
  T ? "buy" : "sell",
3623
3653
  " orders"
@@ -3625,47 +3655,47 @@ function yn({
3625
3655
  /* @__PURE__ */ e(
3626
3656
  "button",
3627
3657
  {
3628
- disabled: !Ye || le || ue || oe,
3629
- onClick: fa,
3658
+ disabled: !Qe || se || me || ne || O,
3659
+ onClick: pa,
3630
3660
  className: "w-full font-semibold text-[16px] transition-all",
3631
3661
  style: {
3632
3662
  height: 60,
3633
3663
  borderRadius: 5,
3634
3664
  background: "var(--t-cta-bg)",
3635
3665
  color: "var(--t-cta-text)",
3636
- opacity: Ye && !le && !ue && !oe ? 1 : 0.4,
3637
- cursor: Ye && !le && !ue && !oe ? "pointer" : "not-allowed"
3666
+ opacity: Qe && !se && !me && !ne && !O ? 1 : 0.4,
3667
+ cursor: Qe && !se && !me && !ne && !O ? "pointer" : "not-allowed"
3638
3668
  },
3639
- children: ue ? "Getting best price..." : le ? "Processing..." : T ? `Buy ${H}` : `Sell ${H}`
3669
+ children: me ? "Getting best price..." : se ? "Processing..." : T ? `Buy ${H}` : `Sell ${H}`
3640
3670
  }
3641
3671
  ),
3642
3672
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
3643
3673
  ] }, M),
3644
- /* @__PURE__ */ e(Ke, { isOpen: se === "fiat", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3645
- ln,
3674
+ /* @__PURE__ */ e(je, { isOpen: ce === "fiat", onClose: () => $(null), children: (g) => /* @__PURE__ */ e(
3675
+ mn,
3646
3676
  {
3647
3677
  onClose: g,
3648
- onSelect: (b) => {
3649
- la(b), g();
3678
+ onSelect: (S) => {
3679
+ sa(S), g();
3650
3680
  },
3651
- currencies: ce.map((b) => ({ code: b.code, name: b.code })),
3681
+ currencies: de.map((S) => ({ code: S.code, name: S.code })),
3652
3682
  assetBaseUrl: B,
3653
3683
  selectedCode: v.fiatCurrency
3654
3684
  }
3655
3685
  ) }),
3656
- /* @__PURE__ */ e(Ke, { isOpen: se === "crypto", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3657
- cn,
3686
+ /* @__PURE__ */ e(je, { isOpen: ce === "crypto", onClose: () => $(null), children: (g) => /* @__PURE__ */ e(
3687
+ fn,
3658
3688
  {
3659
3689
  onClose: g,
3660
- onSelect: (b, K) => {
3661
- ca(b, K), g();
3690
+ onSelect: (S, K) => {
3691
+ da(S, K), g();
3662
3692
  },
3663
- cryptos: De.map((b) => {
3693
+ cryptos: Me.map((S) => {
3664
3694
  var K;
3665
3695
  return {
3666
- code: b.code,
3667
- name: b.code,
3668
- networks: (K = b.networks) == null ? void 0 : K.map((G) => ({ code: G.id, name: G.name }))
3696
+ code: S.code,
3697
+ name: S.code,
3698
+ networks: (K = S.networks) == null ? void 0 : K.map((W) => ({ code: W.id, name: W.name }))
3669
3699
  };
3670
3700
  }),
3671
3701
  assetBaseUrl: B,
@@ -3673,40 +3703,40 @@ function yn({
3673
3703
  selectedChain: v.network
3674
3704
  }
3675
3705
  ) }),
3676
- /* @__PURE__ */ e(Ke, { isOpen: se === "payment", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3677
- sn,
3706
+ /* @__PURE__ */ e(je, { isOpen: ce === "payment", onClose: () => $(null), children: (g) => /* @__PURE__ */ e(
3707
+ hn,
3678
3708
  {
3679
- methods: Y,
3709
+ methods: Q,
3680
3710
  selectedId: v.paymentMethodId,
3681
- onSelect: (b) => {
3682
- sa(b), g();
3711
+ onSelect: (S) => {
3712
+ ua(S), g();
3683
3713
  },
3684
3714
  onClose: g
3685
3715
  }
3686
3716
  ) }),
3687
- /* @__PURE__ */ e(Ke, { isOpen: se === "settings", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3688
- mn,
3717
+ /* @__PURE__ */ e(je, { isOpen: ce === "settings", onClose: () => $(null), children: (g) => /* @__PURE__ */ e(
3718
+ Cn,
3689
3719
  {
3690
3720
  onClose: g,
3691
- darkMode: z,
3692
- onToggleDarkMode: Ee,
3693
- skinId: Ae,
3694
- onSelectSkin: (b) => {
3695
- at(b);
3721
+ darkMode: le,
3722
+ onToggleDarkMode: We,
3723
+ skinId: ke,
3724
+ onSelectSkin: (S) => {
3725
+ Ie(S);
3696
3726
  },
3697
3727
  showThemeToggle: k,
3698
3728
  country: v.country,
3699
- countryName: ma,
3700
- onLocationPress: ua,
3729
+ countryName: ha,
3730
+ onLocationPress: fa,
3701
3731
  assetBaseUrl: B
3702
3732
  }
3703
3733
  ) }),
3704
- /* @__PURE__ */ e(Ke, { isOpen: se === "country", onClose: () => O(null), children: (g) => /* @__PURE__ */ e(
3705
- hn,
3734
+ /* @__PURE__ */ e(je, { isOpen: ce === "country", onClose: () => $(null), children: (g) => /* @__PURE__ */ e(
3735
+ xn,
3706
3736
  {
3707
3737
  onClose: g,
3708
- onSelect: (b) => {
3709
- da(b), g();
3738
+ onSelect: (S) => {
3739
+ ma(S), g();
3710
3740
  },
3711
3741
  assetBaseUrl: B,
3712
3742
  selectedCode: v.country
@@ -3716,7 +3746,7 @@ function yn({
3716
3746
  }
3717
3747
  );
3718
3748
  }
3719
- function Cn({
3749
+ function Sn({
3720
3750
  projectId: t,
3721
3751
  apiUrl: a,
3722
3752
  assetBaseUrl: n,
@@ -3735,33 +3765,33 @@ function Cn({
3735
3765
  statusPollInterval: E,
3736
3766
  onComplete: k,
3737
3767
  onError: _,
3738
- className: re,
3739
- theme: j,
3740
- skinId: Q,
3741
- accentColor: ee,
3742
- bgColor: W,
3743
- bgImage: ge,
3768
+ className: ie,
3769
+ theme: G,
3770
+ skinId: z,
3771
+ accentColor: te,
3772
+ bgColor: X,
3773
+ bgImage: ve,
3744
3774
  borderColor: v,
3745
3775
  borderRadius: L,
3746
3776
  surfaceColor: c,
3747
3777
  inputBgColor: U,
3748
3778
  textColor: w,
3749
- textSecondaryColor: S,
3750
- textMutedColor: te,
3751
- successColor: xe,
3752
- showFlowToggle: ve,
3753
- showSettings: le,
3754
- showThemeToggle: he,
3779
+ textSecondaryColor: b,
3780
+ textMutedColor: J,
3781
+ successColor: be,
3782
+ showFlowToggle: Se,
3783
+ showSettings: se,
3784
+ showThemeToggle: pe,
3755
3785
  autoRedirect: D,
3756
3786
  explorerUrl: ae,
3757
3787
  doneButtonText: B,
3758
- supportEmail: ce,
3759
- stablecoinParity: De,
3760
- partnerName: Y,
3761
- onDone: oe
3788
+ supportEmail: de,
3789
+ stablecoinParity: Me,
3790
+ partnerName: Q,
3791
+ onDone: ne
3762
3792
  }) {
3763
3793
  return /* @__PURE__ */ e(
3764
- La,
3794
+ Ia,
3765
3795
  {
3766
3796
  projectId: t,
3767
3797
  apiUrl: a,
@@ -3782,45 +3812,45 @@ function Cn({
3782
3812
  onComplete: k,
3783
3813
  onError: _,
3784
3814
  children: /* @__PURE__ */ e(
3785
- yn,
3815
+ bn,
3786
3816
  {
3787
- className: re,
3788
- theme: j,
3789
- skinId: Q,
3790
- accentColor: ee,
3791
- bgColor: W,
3792
- bgImage: ge,
3817
+ className: ie,
3818
+ theme: G,
3819
+ skinId: z,
3820
+ accentColor: te,
3821
+ bgColor: X,
3822
+ bgImage: ve,
3793
3823
  borderColor: v,
3794
3824
  borderRadius: L,
3795
3825
  surfaceColor: c,
3796
3826
  inputBgColor: U,
3797
3827
  textColor: w,
3798
- textSecondaryColor: S,
3799
- textMutedColor: te,
3800
- successColor: xe,
3801
- showFlowToggle: ve,
3802
- showSettings: le,
3803
- showThemeToggle: he,
3828
+ textSecondaryColor: b,
3829
+ textMutedColor: J,
3830
+ successColor: be,
3831
+ showFlowToggle: Se,
3832
+ showSettings: se,
3833
+ showThemeToggle: pe,
3804
3834
  autoRedirect: D,
3805
3835
  explorerUrl: ae,
3806
3836
  doneButtonText: B,
3807
- supportEmail: ce,
3808
- stablecoinParity: De,
3809
- partnerName: Y,
3810
- onDone: oe
3837
+ supportEmail: de,
3838
+ stablecoinParity: Me,
3839
+ partnerName: Q,
3840
+ onDone: ne
3811
3841
  }
3812
3842
  )
3813
3843
  }
3814
3844
  );
3815
3845
  }
3816
- function Rn({
3846
+ function Fn({
3817
3847
  submitButtonText: t,
3818
3848
  rateRefreshInterval: a,
3819
3849
  ...n
3820
3850
  }) {
3821
- return /* @__PURE__ */ e(Cn, { ...n });
3851
+ return /* @__PURE__ */ e(Sn, { ...n });
3822
3852
  }
3823
- function kn({
3853
+ function Dn({
3824
3854
  skin: t,
3825
3855
  active: a,
3826
3856
  onClick: n,
@@ -3853,13 +3883,13 @@ function kn({
3853
3883
  }
3854
3884
  );
3855
3885
  }
3856
- function gn({ quote: t }) {
3886
+ function Nn({ quote: t }) {
3857
3887
  return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Best price" }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Recommended" }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ l("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
3858
3888
  "#",
3859
3889
  t.rank
3860
3890
  ] }) : null;
3861
3891
  }
3862
- function xn({ quote: t }) {
3892
+ function wn({ quote: t }) {
3863
3893
  return t.gatewayLogo ? /* @__PURE__ */ e(
3864
3894
  "img",
3865
3895
  {
@@ -3870,9 +3900,9 @@ function xn({ quote: t }) {
3870
3900
  className: "rounded-full shrink-0",
3871
3901
  style: { width: 36, height: 36 }
3872
3902
  }
3873
- ) : /* @__PURE__ */ e(yt, { size: 36 });
3903
+ ) : /* @__PURE__ */ e(gt, { size: 36 });
3874
3904
  }
3875
- function vn() {
3905
+ function En() {
3876
3906
  return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ l(
3877
3907
  "div",
3878
3908
  {
@@ -3899,20 +3929,20 @@ function vn() {
3899
3929
  t
3900
3930
  )) });
3901
3931
  }
3902
- function Tn({
3932
+ function Mn({
3903
3933
  onClose: t,
3904
3934
  onSelect: a,
3905
3935
  quotes: n,
3906
3936
  quotesLoading: r,
3907
3937
  cryptoCurrency: o
3908
3938
  }) {
3909
- const [d, u] = N(""), i = $(() => {
3939
+ const [d, u] = N(""), i = j(() => {
3910
3940
  if (!(n != null && n.quotes)) return [];
3911
3941
  const s = d.trim().toLowerCase();
3912
3942
  return s ? n.quotes.filter((m) => m.gatewayName.toLowerCase().includes(s)) : n.quotes;
3913
3943
  }, [n, d]);
3914
- return /* @__PURE__ */ l(q, { children: [
3915
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Fe, { onClick: t }) }),
3944
+ return /* @__PURE__ */ l(ee, { children: [
3945
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
3916
3946
  /* @__PURE__ */ e(
3917
3947
  "h2",
3918
3948
  {
@@ -3921,9 +3951,9 @@ function Tn({
3921
3951
  children: "Choose Ramp"
3922
3952
  }
3923
3953
  ),
3924
- /* @__PURE__ */ e(Ve, { value: d, onChange: u }),
3954
+ /* @__PURE__ */ e($e, { value: d, onChange: u }),
3925
3955
  /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
3926
- r ? /* @__PURE__ */ e(vn, {}) : i.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : i.map((s, m) => {
3956
+ r ? /* @__PURE__ */ e(En, {}) : i.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : i.map((s, m) => {
3927
3957
  const h = m === 0, f = parseFloat(s.cryptoAmount), p = f >= 1 ? f.toFixed(4) : f.toPrecision(6);
3928
3958
  return /* @__PURE__ */ l(
3929
3959
  "button",
@@ -3939,10 +3969,10 @@ function Tn({
3939
3969
  background: h ? "transparent" : "var(--t-surface)"
3940
3970
  },
3941
3971
  children: [
3942
- /* @__PURE__ */ e(xn, { quote: s }),
3972
+ /* @__PURE__ */ e(wn, { quote: s }),
3943
3973
  /* @__PURE__ */ l("div", { className: "text-left flex-1 min-w-0", children: [
3944
3974
  /* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: s.gatewayName }),
3945
- /* @__PURE__ */ e(gn, { quote: s })
3975
+ /* @__PURE__ */ e(Nn, { quote: s })
3946
3976
  ] }),
3947
3977
  /* @__PURE__ */ l("div", { className: "text-right shrink-0", children: [
3948
3978
  /* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
@@ -3973,65 +4003,65 @@ function Tn({
3973
4003
  ] });
3974
4004
  }
3975
4005
  export {
3976
- nn as AnimatedDigit,
3977
- rn as AnimatedNumber,
3978
- Pa as ApplePayIcon,
3979
- Pe as BLOCKCHAINS,
3980
- Oa as BankIcon,
3981
- Je as COUNTRIES,
3982
- ht as COUNTRY_MAP,
3983
- Ba as CRYPTO_CHAIN_COMBOS,
3984
- Qt as CRYPTO_CURRENCIES,
3985
- Ga as CardIcon,
3986
- Rn as CheckoutForm,
3987
- za as CheckoutStep,
3988
- _e as ChevronDown,
3989
- $t as ChevronRight,
3990
- Tn as ChooseRampModal,
3991
- Fe as CloseButton,
3992
- An as CoinifyIcon,
3993
- en as CompleteStep,
3994
- an as ConfirmStep,
3995
- hn as CountryPickerModal,
3996
- cn as CryptoCurrencyModal,
3997
- Gt as CryptoIcon,
3998
- Wa as DarkModeIcon,
3999
- tn as ErrorStep,
4000
- Pt as FIAT_CURRENCIES,
4001
- Fa as FIAT_TO_COUNTRY,
4002
- ln as FiatCurrencyModal,
4003
- ft as FiatFlag,
4004
- on as FormSkeleton,
4005
- yt as GenericCoinIcon,
4006
- Ka as GooglePayIcon,
4007
- _t as MOCK_RATES,
4008
- $a as MenuIcon,
4009
- Ke as Modal,
4010
- _a as PayPalIcon,
4011
- Qa as PaymentMethodSelector,
4012
- qa as ProcessingStep,
4013
- Cn as RampForm,
4014
- La as RampProvider,
4015
- Ha as RevolutIcon,
4016
- Kt as SKINS,
4017
- Ve as SearchInput,
4018
- mn as SettingsScreen,
4006
+ sn as AnimatedDigit,
4007
+ dn as AnimatedNumber,
4008
+ Ga as ApplePayIcon,
4009
+ Ve as BLOCKCHAINS,
4010
+ Va as BankIcon,
4011
+ et as COUNTRIES,
4012
+ yt as COUNTRY_MAP,
4013
+ _a as CRYPTO_CHAIN_COMBOS,
4014
+ Jt as CRYPTO_CURRENCIES,
4015
+ Za as CardIcon,
4016
+ Fn as CheckoutForm,
4017
+ an as CheckoutStep,
4018
+ Ge as ChevronDown,
4019
+ Xt as ChevronRight,
4020
+ Mn as ChooseRampModal,
4021
+ De as CloseButton,
4022
+ Un as CoinifyIcon,
4023
+ on as CompleteStep,
4024
+ cn as ConfirmStep,
4025
+ xn as CountryPickerModal,
4026
+ fn as CryptoCurrencyModal,
4027
+ Wt as CryptoIcon,
4028
+ za as DarkModeIcon,
4029
+ ln as ErrorStep,
4030
+ _t as FIAT_CURRENCIES,
4031
+ Oa as FIAT_TO_COUNTRY,
4032
+ mn as FiatCurrencyModal,
4033
+ pt as FiatFlag,
4034
+ un as FormSkeleton,
4035
+ gt as GenericCoinIcon,
4036
+ $a as GooglePayIcon,
4037
+ jt as MOCK_RATES,
4038
+ Qa as MenuIcon,
4039
+ je as Modal,
4040
+ Wa as PayPalIcon,
4041
+ tn as PaymentMethodSelector,
4042
+ rn as ProcessingStep,
4043
+ Sn as RampForm,
4044
+ Ia as RampProvider,
4045
+ ja as RevolutIcon,
4046
+ Vt as SKINS,
4047
+ $e as SearchInput,
4048
+ Cn as SettingsScreen,
4019
4049
  V as Skeleton,
4020
- kn as SkinSwatch,
4021
- dn as ToggleSwitch,
4022
- mt as formatOutput,
4023
- ut as getChainIconUrl,
4024
- zt as getCryptoIconUrl,
4025
- dt as getDefaultFiatForCountry,
4026
- Da as getFiatFlagUrl,
4027
- En as getMockRate,
4028
- Xa as getPaymentIcon,
4029
- Jt as isStablecoin,
4030
- Ia as parseAmount,
4031
- ba as useCheckoutIntent,
4032
- Sa as useQuotes,
4033
- Ue as useRamp,
4034
- va as useRampConfig,
4035
- Na as useTransaction
4050
+ Dn as SkinSwatch,
4051
+ pn as ToggleSwitch,
4052
+ ht as formatOutput,
4053
+ ft as getChainIconUrl,
4054
+ qt as getCryptoIconUrl,
4055
+ mt as getDefaultFiatForCountry,
4056
+ Ha as getFiatFlagUrl,
4057
+ Ln as getMockRate,
4058
+ Ja as getPaymentIcon,
4059
+ ea as isStablecoin,
4060
+ Ka as parseAmount,
4061
+ wa as useCheckoutIntent,
4062
+ Na as useQuotes,
4063
+ Fe as useRamp,
4064
+ Sa as useRampConfig,
4065
+ Ea as useTransaction
4036
4066
  };
4037
4067
  //# sourceMappingURL=index.js.map