everest-npm-features 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/{Alert-BtAF4uo6.js → Alert-D1uo0xUN.js} +3 -3
  2. package/dist/{Button-S_vW7i_8.js → Button-DwM6qNzr.js} +1 -1
  3. package/dist/{ButtonBase-ILHWXvZi.js → ButtonBase-Bkt2XiiC.js} +2 -2
  4. package/dist/{CardContent-BLsvyJUZ.js → CardContent-D9I3IU_z.js} +2 -2
  5. package/dist/{CircularProgress-DYCklg37.js → CircularProgress-B06C3TSm.js} +1 -1
  6. package/dist/{DialogContent-BgKUjL4i.js → DialogContent-CGAaVPRP.js} +3 -3
  7. package/dist/{DialogTitle-1A1JxHKy.js → DialogTitle-CtNXjsMb.js} +1 -1
  8. package/dist/{FormControl-CKGUH1ax.js → FormControl-C_Aq5EJK.js} +1 -1
  9. package/dist/{FormControlLabel-Do2nmNuE.js → FormControlLabel-DzW2M9Zf.js} +2 -2
  10. package/dist/{Grow-Cl5q_s4E.js → Grow-BG0VcbVU.js} +2 -2
  11. package/dist/{IconButton-DJRmyJ7l.js → IconButton-DS04obIe.js} +2 -2
  12. package/dist/{Link-BoX8sDwo.js → Link-0ytX5jId.js} +1 -1
  13. package/dist/{ListItemIcon-SEyOLp6t.js → ListItemIcon-DcAQQVML.js} +2 -2
  14. package/dist/{MenuItem-DI0pq5k0.js → MenuItem-B5Ey6jYk.js} +3 -3
  15. package/dist/{Modal-DXE_7QA2.js → Modal-C4LVcV2P.js} +5 -5
  16. package/dist/{Paper-B2H6ZIFg.js → Paper-DcwigMU2.js} +1 -1
  17. package/dist/{PlayArrow-DNFHtcCO.js → PlayArrow-BWNpsDIu.js} +5 -5
  18. package/dist/{Portal-lSfc4EZw.js → Portal-CLVGr58E.js} +2 -2
  19. package/dist/{Select-Bs7YLhIQ.js → Select-PHF4wwtI.js} +12 -11
  20. package/dist/{Slide-BjOaaE2D.js → Slide-C7btcybu.js} +4 -3
  21. package/dist/{TextField-D4JEGFa0.js → TextField-CWAqkoYU.js} +4 -4
  22. package/dist/TransitionGroupContext-D3TPEzqp.js +37 -0
  23. package/dist/auth-CD4Ih2jU.js +66 -0
  24. package/dist/{bank-D37HPNrs.js → bank-WoJNjqIT.js} +1 -1
  25. package/dist/chainPropTypes-D9lkm76m.js +8 -0
  26. package/dist/components/Account/index.js +8 -8
  27. package/dist/components/History/index.js +6 -6
  28. package/dist/components/MoveToEthereumOrEverChain/index.js +17 -17
  29. package/dist/components/Profile/documents.js +8 -8
  30. package/dist/components/Profile/index.js +6 -6
  31. package/dist/components/Receive/index.js +7 -7
  32. package/dist/components/RocketRamp/MinimalKyc/form.js +6 -6
  33. package/dist/components/RocketRamp/Player/Buy/cardPayment.js +4 -4
  34. package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +4 -4
  35. package/dist/components/RocketRamp/Player/Buy/form.d.ts +1 -1
  36. package/dist/components/RocketRamp/Player/Buy/form.js +11 -11
  37. package/dist/components/RocketRamp/Player/Buy/index.js +5 -5
  38. package/dist/components/RocketRamp/Player/Buy/types.d.ts +1 -0
  39. package/dist/components/RocketRamp/Player/Dashboard/balance.js +2 -2
  40. package/dist/components/RocketRamp/Player/Dashboard/index.js +15 -13
  41. package/dist/components/RocketRamp/Player/Dashboard/transaction.js +1 -1
  42. package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +6 -6
  43. package/dist/components/RocketRamp/Player/Sell/form.js +11 -11
  44. package/dist/components/RocketRamp/Player/Sell/index.js +5 -5
  45. package/dist/components/RocketRamp/Player/SignIn/index.js +2 -2
  46. package/dist/components/RocketRamp/Player/SignIn/loginForm.js +2 -2
  47. package/dist/components/RocketRamp/Player/SignIn/otpForm.js +2 -2
  48. package/dist/components/RocketRamp/Player/SignUp/email.js +2 -2
  49. package/dist/components/RocketRamp/Player/SignUp/index.js +9 -9
  50. package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +5 -5
  51. package/dist/components/RocketRamp/Player/SignUp/validateEmail.js +16 -16
  52. package/dist/components/RocketRamp/ResetPassword/form.d.ts +8 -0
  53. package/dist/components/RocketRamp/ResetPassword/form.js +104 -0
  54. package/dist/components/RocketRamp/ResetPassword/index.d.ts +7 -0
  55. package/dist/components/RocketRamp/ResetPassword/index.js +53 -0
  56. package/dist/components/RocketRamp/Shared/Button/index.js +2 -2
  57. package/dist/components/RocketRamp/Shared/Input/index.js +2 -2
  58. package/dist/components/RocketRamp/Shared/backBtn.js +1 -1
  59. package/dist/components/RocketRamp/Shared/transactionItem.js +2 -2
  60. package/dist/components/RocketRamp/Store/Dashboard/balance.d.ts +1 -4
  61. package/dist/components/RocketRamp/Store/Dashboard/balance.js +35 -68
  62. package/dist/components/RocketRamp/Store/Dashboard/index.js +17 -61
  63. package/dist/components/RocketRamp/Store/Dashboard/stats.d.ts +6 -0
  64. package/dist/components/RocketRamp/Store/Dashboard/stats.js +42 -0
  65. package/dist/components/RocketRamp/Store/Dashboard/transaction.js +1 -1
  66. package/dist/components/RocketRamp/Store/SignUp/index.js +2 -2
  67. package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +49 -45
  68. package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +3 -3
  69. package/dist/components/RocketRamp/Transactions/index.js +2 -2
  70. package/dist/components/Send/index.js +10 -10
  71. package/dist/components/Shared/ConnectWallet/index.js +5 -5
  72. package/dist/components/Shared/HistoryItem/index.js +2 -2
  73. package/dist/components/Shared/TokenModal/index.js +5 -5
  74. package/dist/components/Shared/addBank.js +7 -7
  75. package/dist/components/Shared/button.js +1 -1
  76. package/dist/components/Shared/connectPlaidBank.js +4 -4
  77. package/dist/components/Shared/incode.js +6 -6
  78. package/dist/components/Shared/inputField.js +1 -1
  79. package/dist/components/Shared/pin.js +1 -1
  80. package/dist/components/Shared/tooltip.js +7 -6
  81. package/dist/components/Shared/transition.js +1 -1
  82. package/dist/components/SignIn/index.js +5 -5
  83. package/dist/components/SignUp/index.js +3 -3
  84. package/dist/components/SignUp/pin.js +6 -6
  85. package/dist/components/SignUp/userInfo.js +1 -1
  86. package/dist/components/Stake/gems/index.js +6 -6
  87. package/dist/components/Stake/id/index.js +6 -6
  88. package/dist/components/Stake/index.js +6 -6
  89. package/dist/components/Swap/index.js +10 -10
  90. package/dist/components/WalletPortfolio/index.js +9 -9
  91. package/dist/components/WalletPortfolio/tokenRow.js +2 -2
  92. package/dist/{constants-Bb9tNMO0.js → constants-74hrsFxy.js} +290 -287
  93. package/dist/{documents-DvBUIEko.js → documents-DFzrb5Js.js} +7 -7
  94. package/dist/{elementTypeAcceptingRef-BPeKuzZ8.js → elementTypeAcceptingRef-CXUi-GtI.js} +1 -1
  95. package/dist/{fiatAssets-Dymvf3Le.js → fiatAssets-BySmKCPn.js} +1 -1
  96. package/dist/hooks/useDialog/index.js +2 -2
  97. package/dist/hooks/useRrDialog/index.js +2 -2
  98. package/dist/hooks/useSnackBar.js +6 -6
  99. package/dist/index-BMhrzXlc.js +820 -0
  100. package/dist/{index-DYCdRrDV.js → index-Dxl09QM3.js} +12 -12
  101. package/dist/main.d.ts +2 -0
  102. package/dist/main.js +25 -21
  103. package/dist/{order-DMts-8Nr.js → order-BJOkWhkX.js} +1 -1
  104. package/dist/{ownerWindow-mVfGbIa3.js → ownerWindow-CQLKd2qC.js} +1 -1
  105. package/dist/{stake-BRmggIPz.js → stake-DeB_prrU.js} +1 -1
  106. package/dist/store.d.ts +10 -2
  107. package/dist/{tokenRow-g9IBe02c.js → tokenRow-4ZCv_fEG.js} +1 -1
  108. package/dist/{useSlot-D3uYAK6m.js → useSlot-CLUg2AtS.js} +1 -1
  109. package/dist/user-Doi440iN.js +24 -0
  110. package/dist/util/constants.d.ts +2 -0
  111. package/dist/util/constants.js +9 -7
  112. package/dist/{utils-gxE2aXKK.js → utils-DeERUHi2.js} +16 -15
  113. package/dist/{wallet-Dfn4nFOn.js → wallet-BeLTGObA.js} +1 -1
  114. package/package.json +1 -1
  115. package/dist/CheckCircle-Czm8oSt7.js +0 -8
  116. package/dist/TransitionGroupContext-VwpFXTPO.js +0 -43
  117. package/dist/auth-Czk2iJ8q.js +0 -58
  118. package/dist/index-CMHIKDWK.js +0 -814
  119. package/dist/user-CsPLUenD.js +0 -24
@@ -1,814 +0,0 @@
1
- import { jsxs as n, Fragment as F, jsx as e } from "react/jsx-runtime";
2
- import { useState as c, useEffect as _ } from "react";
3
- import Se from "./hoc/withThemeProvider.js";
4
- import { P as Re, F as Oe } from "./PlayArrow-DNFHtcCO.js";
5
- import { I as we } from "./Info-DTcjrneu.js";
6
- import { G as Be } from "./generic-token-B_ptO5yb.js";
7
- import ee from "./components/RocketRamp/Shared/Input/index.js";
8
- import { ID_TOKEN_SYMBOL as de, FIAT_TO_EVER_ID as te, FIAT_TO_TOKEN as re, ESTIMATE_TOOLTIP_TEXT as Le, VISA_PAYMENT as Ve, VISA_PAYMENT_ACTIVE as Ye, SEPA_PAYMENT as We, SEPA_PAYMENT_ACTIVE as De, PAYMENT_BANK as ue, SEPA_ICON as Ke, VISA_ICON as ge, PAYMENT_PROVIDER_CHECKOUT as pe } from "./util/constants.js";
9
- import "./constants-Bb9tNMO0.js";
10
- import { c as qe, d as _e, a as $e, f as Ge, e as he } from "./order-DMts-8Nr.js";
11
- import je from "./components/Shared/tooltip.js";
12
- import { getCurrencySymbol as be, removeExtraSpace as Ue, getOrionBalance as He } from "./util/functions.js";
13
- import ne from "./components/RocketRamp/Shared/Button/index.js";
14
- import Ce from "./components/RocketRamp/Shared/backBtn.js";
15
- import { T as s } from "./Typography-Du8mj1kr.js";
16
- import { B as f } from "./Box-Bt8cGqC7.js";
17
- import { G as o } from "./Grid2-IYppkw5f.js";
18
- import { C as A } from "./CircularProgress-DYCklg37.js";
19
- import "@incodetech/welcome";
20
- import "./axios-BEX6n2A7.js";
21
- import { useSnackBar as Xe } from "./hooks/useSnackBar.js";
22
- import "./components/SignUp/pin.js";
23
- import { f as Je } from "./fiatAssets-Dymvf3Le.js";
24
- import { u as Qe, a as $ } from "./react-redux-B4BZippc.js";
25
- import './assets/main.css';import './assets/index10.css';/* empty css */
26
- import "./util/conversions.js";
27
- import "./index-CAoLi5Qq.js";
28
- import "./react-webcam-B3cXh1XT.js";
29
- import "./components/Shared/transition.js";
30
- import "./components/Shared/pin.js";
31
- import "./moment-h96o7c8I.js";
32
- import "./index.esm-BsMAMhYW.js";
33
- import "./web3-u4qDZYpo.js";
34
- import "./index-B8QKlEgj.js";
35
- import Ze from "./components/RocketRamp/MinimalKyc/form.js";
36
- import { c as et } from "./createSvgIcon-DhzhBkIq.js";
37
- import { s as fe, p as tt, h as rt, v as nt } from "./index-ceeCtFuh.js";
38
- import { I as it } from "./TextField-D4JEGFa0.js";
39
- import { F as at } from "./FormControl-CKGUH1ax.js";
40
- import { S as ot } from "./Select-Bs7YLhIQ.js";
41
- import { M as ye } from "./MenuItem-DI0pq5k0.js";
42
- import { L as st } from "./ListItemIcon-SEyOLp6t.js";
43
- import { I as xe } from "./IconButton-DJRmyJ7l.js";
44
- const L = {
45
- "confirm-payment": "_confirm-payment_alxbn_1",
46
- "confirm-transaction-network": "_confirm-transaction-network_alxbn_33",
47
- "buy-info": "_buy-info_alxbn_57"
48
- }, ct = ({
49
- setScreen: N,
50
- orderData: b,
51
- dispatch: u,
52
- fiatAssets: h,
53
- cryptoAssets: C,
54
- getCryptoAssets: r,
55
- showAlertMessage: y,
56
- partnerKey: T,
57
- balance: v
58
- }) => {
59
- const E = "USD", m = be(E), p = h.fiats, P = h.loader, x = C.featureTokens.list, M = C.featureTokens.default, G = C.loader, d = b.loader, k = b.estimate, z = k.crypto_out_amount, R = k.conversion_price, j = k.total_fee;
60
- let V = 0, U = 0;
61
- const Y = k.fee_breakdown;
62
- for (let t = 0; t < Y.length; t++) {
63
- const a = Y[t];
64
- a.name === "ev_fee" ? V = Number(a.value) : a.name === "network_fee" && (U = Number(a.value));
65
- }
66
- const [g, O] = c({
67
- symbol: ""
68
- }), [W, S] = c(!1), [I, H] = c(0), [i, D] = c(0), [X, Q] = c([]), [J, Ne] = c(!1), [oe, ve] = c(50), [se, Ee] = c(3e3), [Z, ke] = c(50), [ce, Ie] = c(3e3), [Ae, K] = c(""), [w, le] = c(
69
- k.fiat_amount || Z.toString()
70
- );
71
- _(() => {
72
- if (k.crypto_currency) {
73
- const t = x.find(
74
- (a) => a.symbol === k.crypto_currency
75
- );
76
- O(t);
77
- } else
78
- M && M.id && O(M);
79
- }, [M, k.crypto_currency]), _(() => {
80
- i && r(i);
81
- }, [i]), _(() => {
82
- if (p.length === 0)
83
- return;
84
- const t = [];
85
- for (let a = 0; a < p.length; a++) {
86
- if (p[a].symbol === E) {
87
- const l = p[a].payment_options;
88
- D(p[a].id);
89
- let q = !1;
90
- for (let B = 0; B < l.length; B++) {
91
- const me = l[B];
92
- me.active && (t.push(me), l[B].id === I && (q = !0));
93
- }
94
- q || H(t[0].id);
95
- }
96
- Q(t);
97
- }
98
- }, [E, p]), _(() => {
99
- if (g && g.id && w && I && i) {
100
- u(qe()), S(!1), K("");
101
- const t = setTimeout(() => {
102
- Fe();
103
- }, 1e3);
104
- return () => clearTimeout(t);
105
- }
106
- }, [g, w, I, x, i]);
107
- const Fe = () => {
108
- var q;
109
- const t = parseFloat(w);
110
- if (g.symbol === de) {
111
- if (oe > t)
112
- return K(
113
- `Minimum value should be greater than ${m + oe}`
114
- ), S(!0), !1;
115
- if (se * 1 < t)
116
- return K(
117
- `Maximum value should be less than ${m + se}`
118
- ), S(!0), !1;
119
- } else {
120
- if (Z * 1 > t)
121
- return K(
122
- `Minimum value should be greater than ${m + Z}`
123
- ), S(!0), !1;
124
- if (ce * 1 < t)
125
- return K(
126
- `Maximum value should be less than ${m + ce}`
127
- ), S(!0), !1;
128
- }
129
- const a = X.find((B) => B.id === I), l = a.payment_type;
130
- u(
131
- _e({
132
- apiKey: T,
133
- transaction_type: g.symbol === de ? te : re,
134
- coin_amount: w,
135
- exchange: g.exchange,
136
- payment_type: l,
137
- fiat_ccy: E,
138
- crypto_ccy: g.symbol,
139
- network: (q = g.network) == null ? void 0 : q.name,
140
- payment_provider: a.payment_provider
141
- })
142
- );
143
- }, Te = ({ value: t, label: a }) => {
144
- let l;
145
- if (a === "credit_debit_card" ? (l = Ve, I === t && (l = Ye)) : (l = We, I === t && (l = De)), a)
146
- return /* @__PURE__ */ e(
147
- f,
148
- {
149
- mt: 0.5,
150
- sx: { cursor: "pointer" },
151
- onClick: () => H(t * 1),
152
- children: /* @__PURE__ */ e("img", { src: l, alt: "payment", width: "90%" })
153
- }
154
- );
155
- };
156
- _(() => {
157
- const t = b.types.length;
158
- if (t > 0)
159
- for (let a = 0; a < t; a++) {
160
- const l = b.types[a];
161
- if (l.type === te) {
162
- ve(parseFloat(l.min_deposit_amount)), Ee(parseFloat(l.max_deposit_amount));
163
- break;
164
- }
165
- if (l.type === re) {
166
- ke(parseFloat(l.min_deposit_amount)), Ie(parseFloat(l.max_deposit_amount));
167
- break;
168
- }
169
- }
170
- }, [b.types]);
171
- const Me = (t) => {
172
- const a = t.target.value;
173
- a ? /^([0-9]+)$/.test(a) && le(a) : le("");
174
- }, Pe = (t) => {
175
- const a = x.find((l) => l.symbol === t);
176
- O(a);
177
- }, ze = () => {
178
- if (!g.id)
179
- return y({ message: "Please select token" }), !1;
180
- if (!I)
181
- return y({ message: "Please select payment method" }), !1;
182
- if (!w)
183
- return y({ message: "Please enter amount" }), !1;
184
- if (!z)
185
- return y({
186
- message: "Please wait for the estimate to be calculated and then press next"
187
- }), !1;
188
- N(ae);
189
- };
190
- return /* @__PURE__ */ n(F, { children: [
191
- /* @__PURE__ */ n(o, { mt: 0.5, spacing: 1, container: !0, children: [
192
- /* @__PURE__ */ e(o, { size: { xs: 3.5 }, children: /* @__PURE__ */ n(f, { className: L["buy-info"], children: [
193
- /* @__PURE__ */ e(s, { variant: "2xl", children: /* @__PURE__ */ e("strong", { children: "Buy Credits" }) }),
194
- /* @__PURE__ */ n(s, { variant: "md", children: [
195
- "1 credit = ",
196
- R,
197
- m
198
- ] })
199
- ] }) }),
200
- /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ n(
201
- f,
202
- {
203
- className: L["buy-info"],
204
- sx: {
205
- padding: "0px 50px !important",
206
- alignItems: "center"
207
- },
208
- children: [
209
- /* @__PURE__ */ e(s, { variant: "md", children: "MAX amount you can request:" }),
210
- /* @__PURE__ */ e(s, { variant: "md", children: "267 credits" })
211
- ]
212
- }
213
- ) }),
214
- /* @__PURE__ */ e(o, { size: { xs: 2.5 }, children: /* @__PURE__ */ n(
215
- f,
216
- {
217
- className: L["buy-info"],
218
- sx: {
219
- background: "black !important",
220
- color: "white !important"
221
- },
222
- children: [
223
- /* @__PURE__ */ e(s, { variant: "md", className: "text-right", children: "Game Balance" }),
224
- /* @__PURE__ */ e(s, { variant: "lg", className: "text-right", children: v })
225
- ]
226
- }
227
- ) })
228
- ] }),
229
- /* @__PURE__ */ e(o, { mt: 2, spacing: 2, container: !0, children: /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ e(
230
- ee,
231
- {
232
- label: "You Pay",
233
- value: w,
234
- onChange: Me,
235
- type: "text",
236
- labelFontWeight: 600,
237
- error: W,
238
- errorText: Ae,
239
- required: !0,
240
- fullWidth: !0
241
- }
242
- ) }) }),
243
- /* @__PURE__ */ n(f, { className: "text-left", mt: 3, children: [
244
- /* @__PURE__ */ e(s, { variant: "sm", fontWeight: 600, children: "Select Payment Method" }),
245
- P ? /* @__PURE__ */ e(A, { sx: { ml: 1, mt: 3 }, size: 50 }) : /* @__PURE__ */ e(o, { mt: 0.5, container: !0, children: X.map((t) => /* @__PURE__ */ e(o, { size: { xs: 2.5 }, children: /* @__PURE__ */ e(
246
- Te,
247
- {
248
- label: t.payment_type,
249
- value: t.id
250
- }
251
- ) }, t.id)) })
252
- ] }),
253
- /* @__PURE__ */ n(o, { mt: 3, spacing: 2, container: !0, children: [
254
- /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ e(
255
- ee,
256
- {
257
- label: "You Receive",
258
- labelFontWeight: 600,
259
- value: z && parseFloat((+z * 1).toFixed(5)),
260
- type: "text",
261
- error: W,
262
- readOnly: !0,
263
- required: !0,
264
- fullWidth: !0
265
- }
266
- ) }),
267
- /* @__PURE__ */ e(o, { size: { xs: 5 }, className: "content-center", children: G ? /* @__PURE__ */ e(A, { sx: { ml: 1 }, size: 30 }) : /* @__PURE__ */ n(F, { children: [
268
- /* @__PURE__ */ e(it, { children: " " }),
269
- /* @__PURE__ */ e(at, { variant: "outlined", fullWidth: !0, children: /* @__PURE__ */ n(
270
- ot,
271
- {
272
- sx: { marginTop: "-2px" },
273
- inputProps: {
274
- sx: {
275
- display: "flex",
276
- alignItems: "center",
277
- padding: "10px"
278
- }
279
- },
280
- value: g.symbol,
281
- onChange: (t) => Pe(t.target.value),
282
- children: [
283
- /* @__PURE__ */ e(ye, { value: "", children: "Please select" }),
284
- x.map((t) => /* @__PURE__ */ n(ye, { value: t.symbol, children: [
285
- /* @__PURE__ */ e(st, { className: "dropdown-list-item", children: /* @__PURE__ */ e(
286
- "img",
287
- {
288
- src: t.icon_uri,
289
- onError: ({ currentTarget: a }) => {
290
- a.onerror = null, a.src = Be;
291
- },
292
- alt: "tokenImg",
293
- width: "36",
294
- height: "36"
295
- }
296
- ) }),
297
- /* @__PURE__ */ e("span", { children: t.name })
298
- ] }, t.id))
299
- ]
300
- }
301
- ) })
302
- ] }) })
303
- ] }),
304
- /* @__PURE__ */ e(f, { mt: 3, sx: { color: "#1A202C" }, children: /* @__PURE__ */ n(o, { container: !0, children: [
305
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 12 }, children: /* @__PURE__ */ n(
306
- xe,
307
- {
308
- sx: { padding: "0" },
309
- onClick: () => Ne((t) => !t),
310
- disableFocusRipple: !0,
311
- disableRipple: !0,
312
- children: [
313
- /* @__PURE__ */ e(s, { variant: "md", fontWeight: 500, children: "Fee Calculation" }),
314
- /* @__PURE__ */ e(
315
- Re,
316
- {
317
- sx: {
318
- transform: `rotate(${J ? "90" : "0"}deg)`,
319
- fontSize: "15px"
320
- }
321
- }
322
- )
323
- ]
324
- }
325
- ) }),
326
- J && /* @__PURE__ */ n(F, { children: [
327
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Everest Fee" }) }),
328
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
329
- m,
330
- d ? /* @__PURE__ */ e(
331
- A,
332
- {
333
- sx: { ml: 1 },
334
- size: 15,
335
- color: "primary"
336
- }
337
- ) : V.toFixed(2)
338
- ] }) }),
339
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Network Fee" }) }),
340
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
341
- m,
342
- d ? /* @__PURE__ */ e(
343
- A,
344
- {
345
- sx: { ml: 1 },
346
- size: 15,
347
- color: "primary"
348
- }
349
- ) : U.toFixed(2)
350
- ] }) })
351
- ] }),
352
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
353
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
354
- m,
355
- d ? /* @__PURE__ */ e(A, { sx: { ml: 1 }, size: 15, color: "primary" }) : Number(j).toFixed(2)
356
- ] }) }),
357
- g && /* @__PURE__ */ n(F, { children: [
358
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
359
- "1 ",
360
- g.symbol,
361
- " ",
362
- /* @__PURE__ */ e(
363
- je,
364
- {
365
- title: Le,
366
- placement: "right",
367
- children: /* @__PURE__ */ e(xe, { className: "info-fee-icon", children: /* @__PURE__ */ e(
368
- we,
369
- {
370
- sx: {
371
- fontSize: "14px"
372
- }
373
- }
374
- ) })
375
- }
376
- )
377
- ] }) }),
378
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
379
- m,
380
- d ? /* @__PURE__ */ e(
381
- A,
382
- {
383
- sx: { ml: 1 },
384
- size: 15,
385
- color: "primary"
386
- }
387
- ) : Number(R).toFixed(2)
388
- ] }) })
389
- ] })
390
- ] }) }),
391
- /* @__PURE__ */ e(f, { mt: 4, children: /* @__PURE__ */ e(
392
- ne,
393
- {
394
- onClick: ze,
395
- disabled: W || !z,
396
- fullWidth: !0,
397
- children: /* @__PURE__ */ e("strong", { children: "Next" })
398
- }
399
- ) })
400
- ] });
401
- }, lt = ({
402
- setScreen: N,
403
- partnerKey: b,
404
- orderData: u,
405
- dispatch: h,
406
- walletAddress: C
407
- }) => {
408
- const r = u.estimate, y = u.create.order_id, T = u.loader, v = r.fiat_amount, E = be(r.fiat_currency), [m, p] = c(!1);
409
- _(() => {
410
- y && m && N(ut);
411
- }, [y]), _(() => {
412
- P();
413
- }, []);
414
- const P = () => {
415
- h(
416
- _e({
417
- ...r,
418
- apiKey: b,
419
- transaction_type: r.transaction_type,
420
- coin_amount: r.fiat_amount,
421
- exchange: r.exchange,
422
- payment_type: r.payment_type,
423
- fiat_ccy: r.fiat_currency,
424
- crypto_ccy: r.crypto_currency,
425
- network: r.network,
426
- payment_provider: r.payment_provider
427
- })
428
- );
429
- }, x = () => {
430
- h(
431
- $e({
432
- apiKey: b,
433
- quoteId: r.quote_id,
434
- walletAddress: C
435
- })
436
- ), p(!0);
437
- };
438
- return /* @__PURE__ */ n(F, { children: [
439
- /* @__PURE__ */ e(Ce, { onClickHandler: () => N(ie) }),
440
- /* @__PURE__ */ e(s, { mt: 2, variant: "sm", fontWeight: 600, children: "Using payment method" }),
441
- /* @__PURE__ */ n(f, { mt: 2, className: L["confirm-payment"], children: [
442
- /* @__PURE__ */ e(
443
- "img",
444
- {
445
- src: r.payment_type === ue ? Ke : ge,
446
- width: 100,
447
- alt: "payment"
448
- }
449
- ),
450
- /* @__PURE__ */ e(s, { variant: "caption", component: "span", children: /* @__PURE__ */ e("strong", { children: r.payment_type === ue ? "Bank Account" : "Debit Card" }) })
451
- ] }),
452
- /* @__PURE__ */ e(s, { mt: 4, variant: "sm", fontWeight: 600, children: "To Wallet Address" }),
453
- /* @__PURE__ */ e(
454
- f,
455
- {
456
- mt: 2,
457
- className: L["confirm-payment"],
458
- sx: { width: "100% !important" },
459
- children: /* @__PURE__ */ e(s, { variant: "caption", component: "p", children: /* @__PURE__ */ e("strong", { children: C }) })
460
- }
461
- ),
462
- /* @__PURE__ */ e(s, { mt: 3, variant: "sm", fontWeight: 600, component: "p", children: "Order Estimate Details" }),
463
- /* @__PURE__ */ e(f, { sx: { color: "#A6A6A6" }, children: /* @__PURE__ */ n(o, { container: !0, children: [
464
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
465
- r.crypto_currency.toUpperCase(),
466
- " @",
467
- " ",
468
- Number(r.conversion_price).toFixed(2),
469
- " ",
470
- r.fiat_currency
471
- ] }) }),
472
- /* @__PURE__ */ e(o, { className: "flex-right", size: { xs: 6 }, children: /* @__PURE__ */ e(
473
- "span",
474
- {
475
- className: L["confirm-transaction-network"],
476
- style: {
477
- backgroundColor: r.network === "Ethereum" ? "#A1A9DC" : "#5D8CCC"
478
- },
479
- children: r.network
480
- }
481
- ) }),
482
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
483
- Number(r.crypto_out_amount).toFixed(5),
484
- " ",
485
- r.crypto_currency.toUpperCase()
486
- ] }) }),
487
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
488
- (Number(v) - Number(r.total_fee)).toFixed(2),
489
- " ",
490
- r.fiat_currency
491
- ] }) }),
492
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
493
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
494
- Number(r.total_fee).toFixed(2),
495
- " ",
496
- r.fiat_currency
497
- ] }) }),
498
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ e("strong", { children: "Order Total" }) }) }),
499
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ n("strong", { children: [
500
- E,
501
- Number(v).toFixed(2),
502
- " ",
503
- r.fiat_currency
504
- ] }) }) })
505
- ] }) }),
506
- /* @__PURE__ */ e(f, { mt: 4, children: /* @__PURE__ */ e(
507
- ne,
508
- {
509
- onClick: x,
510
- disabled: T,
511
- fullWidth: !0,
512
- children: /* @__PURE__ */ e("strong", { children: T ? /* @__PURE__ */ n(F, { children: [
513
- /* @__PURE__ */ e(A, { size: 15, color: "inherit" }),
514
- " Processing..."
515
- ] }) : "Payment Details" })
516
- }
517
- ) })
518
- ] });
519
- }, mt = et(/* @__PURE__ */ e("path", {
520
- d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
521
- }), "ErrorOutline"), dt = ({
522
- checkoutKey: N,
523
- setScreen: b,
524
- showAlertMessage: u,
525
- rrBaseUrl: h,
526
- orderData: C,
527
- dispatch: r
528
- }) => {
529
- const y = C.estimate, T = C.create.order_id, v = C.payment, [E, m] = c(!0), [p, P] = c(""), [x, M] = c(!1), [G, d] = c({
530
- name: "",
531
- billingAddress: {
532
- addressLine1: ""
533
- }
534
- }), [k, z] = c(!1), [R, j] = c(!0), [V, U] = c(!0), [Y, g] = c(!0), [O, W] = c(!0);
535
- _(() => {
536
- v._links.redirect.href && window.location.replace(v._links.redirect.href);
537
- }, [v]), _(() => {
538
- d({
539
- name: p,
540
- billingAddress: {
541
- addressLine1: ""
542
- }
543
- });
544
- }, [p]), _(() => {
545
- !V && !Y && !O && p !== "" ? R && j(!1) : R || j(!0);
546
- }, [p, V, Y, O]);
547
- const S = (i, D, X, Q = /./) => {
548
- if (i !== "" && !Q.test(i))
549
- return !1;
550
- D(i);
551
- const J = typeof i == "string" ? Ue(i) : i;
552
- X(!J);
553
- }, I = (i) => {
554
- if (i && i.element)
555
- switch (i.element) {
556
- case "card-number":
557
- U(i.isEmpty || !i.isValid);
558
- break;
559
- case "expiry-date":
560
- g(i.isEmpty || !i.isValid);
561
- break;
562
- case "cvv":
563
- W(i.isEmpty || !i.isValid);
564
- break;
565
- default:
566
- console.log("NOOP");
567
- break;
568
- }
569
- }, H = (i) => {
570
- if (i === "") {
571
- u({ message: "Error processing card" }), z(!1), b(ie);
572
- return;
573
- }
574
- const D = {
575
- token: i,
576
- amount: Number(y.fiat_amount),
577
- currency: y.fiat_currency,
578
- reference: T,
579
- success_url: `${h}/dashboard?payment=success`,
580
- fail_url: `${h}/dashboard?payment=failed`
581
- };
582
- r(Ge(D));
583
- };
584
- return /* @__PURE__ */ n(F, { children: [
585
- /* @__PURE__ */ e(Ce, { onClickHandler: () => b(ae) }),
586
- /* @__PURE__ */ n(s, { className: "text-center", variant: "subtitle1", mt: 2, children: [
587
- /* @__PURE__ */ e("img", { src: ge, width: 140, alt: "Debit Card" }),
588
- /* @__PURE__ */ e("br", {}),
589
- /* @__PURE__ */ e("b", { children: "Debit Card" })
590
- ] }),
591
- /* @__PURE__ */ n(
592
- s,
593
- {
594
- className: "text-center d-flex items-center",
595
- variant: "caption",
596
- mt: 2,
597
- children: [
598
- /* @__PURE__ */ e(mt, {}),
599
- "   ",
600
- /* @__PURE__ */ e("b", { style: { marginTop: "3px" }, children: "Fiat purchasing is not available for users with Chase and Citi bank accounts" })
601
- ]
602
- }
603
- ),
604
- y.payment_provider === pe && E && /* @__PURE__ */ e(f, { className: "text-center", mt: 8, children: /* @__PURE__ */ e(A, {}) }),
605
- /* @__PURE__ */ e(f, { mt: 2, children: y.payment_provider === pe && /* @__PURE__ */ n(
606
- fe,
607
- {
608
- config: {
609
- debug: !1,
610
- publicKey: N,
611
- acceptedPaymentMethods: ["Visa", "Mastercard"],
612
- cardholder: G,
613
- localization: {
614
- cardNumberPlaceholder: "Card number",
615
- expiryMonthPlaceholder: "MM",
616
- expiryYearPlaceholder: "YY",
617
- cvvPlaceholder: "CVV"
618
- },
619
- style: {
620
- base: {
621
- color: "black",
622
- fontSize: "18px"
623
- },
624
- // autofill: {
625
- // backgroundColor: "yellow",
626
- // },
627
- // hover: {
628
- // color: "blue",
629
- // },
630
- focus: {
631
- color: "blue"
632
- },
633
- valid: {
634
- color: "green"
635
- },
636
- invalid: {
637
- color: "red"
638
- },
639
- placeholder: {
640
- base: {
641
- color: "gray",
642
- marginLeft: "20px"
643
- }
644
- }
645
- }
646
- },
647
- ready: () => {
648
- m(!1);
649
- },
650
- frameValidationChanged: (i) => {
651
- I(i);
652
- },
653
- cardSubmitted: () => {
654
- z(!0);
655
- },
656
- cardTokenized: (i) => {
657
- H(i.token);
658
- },
659
- cardTokenizationFailed: (i) => {
660
- alert("card tokenization failed"), console.log(i);
661
- },
662
- children: [
663
- /* @__PURE__ */ e(
664
- ee,
665
- {
666
- label: "Name on Card",
667
- value: p,
668
- onChange: (i) => S(i.target.value, P, M),
669
- error: x
670
- }
671
- ),
672
- /* @__PURE__ */ e(
673
- tt,
674
- {
675
- style: {
676
- height: "4em",
677
- margin: "20px 0",
678
- padding: "20px",
679
- border: "1px solid #999"
680
- }
681
- }
682
- ),
683
- /* @__PURE__ */ e(
684
- rt,
685
- {
686
- style: {
687
- height: "4em",
688
- margin: "20px 0",
689
- padding: "20px",
690
- border: "1px solid #999"
691
- }
692
- }
693
- ),
694
- /* @__PURE__ */ e(
695
- nt,
696
- {
697
- style: {
698
- height: "4em",
699
- margin: "20px 0",
700
- padding: "20px",
701
- border: "1px solid #999"
702
- }
703
- }
704
- ),
705
- /* @__PURE__ */ e(
706
- ne,
707
- {
708
- onClick: () => {
709
- fe.submitCard();
710
- },
711
- fullWidth: !0,
712
- disabled: R,
713
- children: /* @__PURE__ */ e("strong", { children: k ? /* @__PURE__ */ n(F, { children: [
714
- /* @__PURE__ */ e(A, { size: 15, color: "inherit" }),
715
- " Processing..."
716
- ] }) : "Pay" })
717
- }
718
- )
719
- ]
720
- }
721
- ) }),
722
- /* @__PURE__ */ e(f, { mt: 8, children: /* @__PURE__ */ e("div", { id: "st-animated-card" }) })
723
- ] });
724
- }, ie = "FORM_SCREEN", ae = "CONFIRM_SCREEN", ut = "PAYMENT_SCREEN", pt = "MINIMAL_KYC_SCREEN", ht = ({ partnerKey: N, rrBaseUrl: b }) => {
725
- const u = Qe(), h = $((d) => d.order), C = $(
726
- (d) => d.user.profile
727
- ), r = h.error, y = $(
728
- (d) => d.user.profile.everWalletAddress
729
- ), T = $(
730
- (d) => d.fiatAssets
731
- ), v = $(
732
- (d) => d.cryptoAssets
733
- ), [E, m] = c(ie), [p, P] = c(0), { showAlertMessage: x, snackBar: M } = Xe();
734
- return _(() => {
735
- P(He(C.tokens.list));
736
- }, [C.tokens]), _(() => {
737
- r && x({ message: r });
738
- }, [r]), _(() => {
739
- h.initMinimalKyc && (x({ message: r, type: "info" }), m(pt));
740
- }, [h.initMinimalKyc]), _(() => {
741
- u(Je()), u(he(re)), u(he(te));
742
- }, []), /* @__PURE__ */ n(F, { children: [
743
- M,
744
- /* @__PURE__ */ e(
745
- f,
746
- {
747
- sx: {
748
- padding: { xs: "1rem", md: "2rem" },
749
- backgroundColor: "#FFFFFF",
750
- borderRadius: "1rem",
751
- boxShadow: "0px 0px 64px 0px rgba(247, 247, 248, 1)"
752
- },
753
- children: {
754
- FORM_SCREEN: /* @__PURE__ */ e(
755
- ct,
756
- {
757
- showAlertMessage: x,
758
- setScreen: m,
759
- fiatAssets: T,
760
- cryptoAssets: v,
761
- orderData: h,
762
- dispatch: u,
763
- getCryptoAssets: (d) => {
764
- u(Oe({ type: "buy", id: d, partnerKey: N }));
765
- },
766
- partnerKey: N,
767
- balance: p
768
- }
769
- ),
770
- CONFIRM_SCREEN: /* @__PURE__ */ e(
771
- lt,
772
- {
773
- partnerKey: N,
774
- setScreen: m,
775
- showAlertMessage: x,
776
- orderData: h,
777
- dispatch: u,
778
- walletAddress: y
779
- }
780
- ),
781
- PAYMENT_SCREEN: /* @__PURE__ */ e(
782
- dt,
783
- {
784
- checkoutKey: "pk_sbox_xnmwsvzydkhjeyi34z4b6ea5qi4",
785
- setScreen: m,
786
- showAlertMessage: x,
787
- orderData: h,
788
- rrBaseUrl: b,
789
- dispatch: u
790
- }
791
- ),
792
- MINIMAL_KYC_SCREEN: /* @__PURE__ */ e(
793
- Ze,
794
- {
795
- onComplete: () => {
796
- m(ae);
797
- }
798
- }
799
- )
800
- }[E]
801
- }
802
- )
803
- ] });
804
- }, ir = Se(ht);
805
- export {
806
- ct as B,
807
- dt as C,
808
- ie as F,
809
- pt as M,
810
- ut as P,
811
- lt as a,
812
- ae as b,
813
- ir as i
814
- };