coinley-checkout 0.1.0 → 0.1.1

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.
@@ -1,4 +1,4 @@
1
- import Qe, { createContext as Ze, useContext as Be, useState as O, useEffect as B, forwardRef as pr, useImperativeHandle as Nr } from "react";
1
+ import Ze, { createContext as Be, useContext as $e, useState as O, useEffect as $, forwardRef as wr, useImperativeHandle as Nr } from "react";
2
2
  var Te = { exports: {} }, oe = {};
3
3
  /**
4
4
  * @license React
@@ -9,21 +9,21 @@ var Te = { exports: {} }, oe = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var We;
12
+ var Ge;
13
13
  function vr() {
14
- if (We)
14
+ if (Ge)
15
15
  return oe;
16
- We = 1;
17
- var n = Qe, a = Symbol.for("react.element"), i = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, x = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function j(S, o, D) {
16
+ Ge = 1;
17
+ var a = Ze, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, x = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function j(A, o, S) {
19
19
  var y, T = {}, P = null, N = null;
20
- D !== void 0 && (P = "" + D), o.key !== void 0 && (P = "" + o.key), o.ref !== void 0 && (N = o.ref);
20
+ S !== void 0 && (P = "" + S), o.key !== void 0 && (P = "" + o.key), o.ref !== void 0 && (N = o.ref);
21
21
  for (y in o)
22
22
  l.call(o, y) && !f.hasOwnProperty(y) && (T[y] = o[y]);
23
- if (S && S.defaultProps)
24
- for (y in o = S.defaultProps, o)
23
+ if (A && A.defaultProps)
24
+ for (y in o = A.defaultProps, o)
25
25
  T[y] === void 0 && (T[y] = o[y]);
26
- return { $$typeof: a, type: S, key: P, ref: N, props: T, _owner: x.current };
26
+ return { $$typeof: n, type: A, key: P, ref: N, props: T, _owner: x.current };
27
27
  }
28
28
  return oe.Fragment = i, oe.jsx = j, oe.jsxs = j, oe;
29
29
  }
@@ -37,17 +37,17 @@ var ie = {};
37
37
  * This source code is licensed under the MIT license found in the
38
38
  * LICENSE file in the root directory of this source tree.
39
39
  */
40
- var Ge;
40
+ var We;
41
41
  function br() {
42
- return Ge || (Ge = 1, process.env.NODE_ENV !== "production" && function() {
43
- var n = Qe, a = Symbol.for("react.element"), i = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), S = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), N = Symbol.for("react.offscreen"), R = Symbol.iterator, z = "@@iterator";
44
- function W(e) {
42
+ return We || (We = 1, process.env.NODE_ENV !== "production" && function() {
43
+ var a = Ze, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), A = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), N = Symbol.for("react.offscreen"), R = Symbol.iterator, z = "@@iterator";
44
+ function G(e) {
45
45
  if (e === null || typeof e != "object")
46
46
  return null;
47
47
  var t = R && e[R] || e[z];
48
48
  return typeof t == "function" ? t : null;
49
49
  }
50
- var I = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
50
+ var D = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
51
  function v(e) {
52
52
  {
53
53
  for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), c = 1; c < t; c++)
@@ -57,7 +57,7 @@ function br() {
57
57
  }
58
58
  function K(e, t, s) {
59
59
  {
60
- var c = I.ReactDebugCurrentFrame, M = c.getStackAddendum();
60
+ var c = D.ReactDebugCurrentFrame, M = c.getStackAddendum();
61
61
  M !== "" && (t += "%s", s = s.concat([M]));
62
62
  var m = s.map(function(g) {
63
63
  return String(g);
@@ -65,23 +65,23 @@ function br() {
65
65
  m.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, m);
66
66
  }
67
67
  }
68
- var _ = !1, H = !1, ee = !1, re = !1, Y = !1, V;
68
+ var U = !1, H = !1, ee = !1, re = !1, Y = !1, V;
69
69
  V = Symbol.for("react.module.reference");
70
- function Q(e) {
71
- return !!(typeof e == "string" || typeof e == "function" || e === l || e === f || Y || e === x || e === D || e === y || re || e === N || _ || H || ee || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === T || e.$$typeof === j || e.$$typeof === S || e.$$typeof === o || // This needs to include all possible module reference object
70
+ function Z(e) {
71
+ return !!(typeof e == "string" || typeof e == "function" || e === l || e === f || Y || e === x || e === S || e === y || re || e === N || U || H || ee || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === T || e.$$typeof === j || e.$$typeof === A || e.$$typeof === o || // This needs to include all possible module reference object
72
72
  // types supported by any Flight configuration anywhere since
73
73
  // we don't know which Flight build this will end up being used
74
74
  // with.
75
75
  e.$$typeof === V || e.getModuleId !== void 0));
76
76
  }
77
- function G(e, t, s) {
77
+ function W(e, t, s) {
78
78
  var c = e.displayName;
79
79
  if (c)
80
80
  return c;
81
81
  var M = t.displayName || t.name || "";
82
82
  return M !== "" ? s + "(" + M + ")" : s;
83
83
  }
84
- function U(e) {
84
+ function F(e) {
85
85
  return e.displayName || "Context";
86
86
  }
87
87
  function h(e) {
@@ -100,21 +100,21 @@ function br() {
100
100
  return "Profiler";
101
101
  case x:
102
102
  return "StrictMode";
103
- case D:
103
+ case S:
104
104
  return "Suspense";
105
105
  case y:
106
106
  return "SuspenseList";
107
107
  }
108
108
  if (typeof e == "object")
109
109
  switch (e.$$typeof) {
110
- case S:
110
+ case A:
111
111
  var t = e;
112
- return U(t) + ".Consumer";
112
+ return F(t) + ".Consumer";
113
113
  case j:
114
114
  var s = e;
115
- return U(s._context) + ".Provider";
115
+ return F(s._context) + ".Provider";
116
116
  case o:
117
- return G(e, e.render, "ForwardRef");
117
+ return W(e, e.render, "ForwardRef");
118
118
  case T:
119
119
  var c = e.displayName || null;
120
120
  return c !== null ? c : h(e.type) || "Memo";
@@ -129,14 +129,14 @@ function br() {
129
129
  }
130
130
  return null;
131
131
  }
132
- var $ = Object.assign, w = 0, ce, te, le, ne, ue, u, b;
132
+ var _ = Object.assign, p = 0, ce, te, le, ae, ue, u, b;
133
133
  function de() {
134
134
  }
135
135
  de.__reactDisabledLog = !0;
136
136
  function xe() {
137
137
  {
138
- if (w === 0) {
139
- ce = console.log, te = console.info, le = console.warn, ne = console.error, ue = console.group, u = console.groupCollapsed, b = console.groupEnd;
138
+ if (p === 0) {
139
+ ce = console.log, te = console.info, le = console.warn, ae = console.error, ue = console.group, u = console.groupCollapsed, b = console.groupEnd;
140
140
  var e = {
141
141
  configurable: !0,
142
142
  enumerable: !0,
@@ -153,45 +153,45 @@ function br() {
153
153
  groupEnd: e
154
154
  });
155
155
  }
156
- w++;
156
+ p++;
157
157
  }
158
158
  }
159
159
  function fe() {
160
160
  {
161
- if (w--, w === 0) {
161
+ if (p--, p === 0) {
162
162
  var e = {
163
163
  configurable: !0,
164
164
  enumerable: !0,
165
165
  writable: !0
166
166
  };
167
167
  Object.defineProperties(console, {
168
- log: $({}, e, {
168
+ log: _({}, e, {
169
169
  value: ce
170
170
  }),
171
- info: $({}, e, {
171
+ info: _({}, e, {
172
172
  value: te
173
173
  }),
174
- warn: $({}, e, {
174
+ warn: _({}, e, {
175
175
  value: le
176
176
  }),
177
- error: $({}, e, {
178
- value: ne
177
+ error: _({}, e, {
178
+ value: ae
179
179
  }),
180
- group: $({}, e, {
180
+ group: _({}, e, {
181
181
  value: ue
182
182
  }),
183
- groupCollapsed: $({}, e, {
183
+ groupCollapsed: _({}, e, {
184
184
  value: u
185
185
  }),
186
- groupEnd: $({}, e, {
186
+ groupEnd: _({}, e, {
187
187
  value: b
188
188
  })
189
189
  });
190
190
  }
191
- w < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
191
+ p < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
192
  }
193
193
  }
194
- var he = I.ReactCurrentDispatcher, je;
194
+ var he = D.ReactCurrentDispatcher, je;
195
195
  function ge(e, t, s) {
196
196
  {
197
197
  if (je === void 0)
@@ -205,13 +205,13 @@ function br() {
205
205
  ` + je + e;
206
206
  }
207
207
  }
208
- var we = !1, Me;
208
+ var pe = !1, Me;
209
209
  {
210
- var Je = typeof WeakMap == "function" ? WeakMap : Map;
211
- Me = new Je();
210
+ var qe = typeof WeakMap == "function" ? WeakMap : Map;
211
+ Me = new qe();
212
212
  }
213
- function Ie(e, t) {
214
- if (!e || we)
213
+ function De(e, t) {
214
+ if (!e || pe)
215
215
  return "";
216
216
  {
217
217
  var s = Me.get(e);
@@ -219,7 +219,7 @@ function br() {
219
219
  return s;
220
220
  }
221
221
  var c;
222
- we = !0;
222
+ pe = !0;
223
223
  var M = Error.prepareStackTrace;
224
224
  Error.prepareStackTrace = void 0;
225
225
  var m;
@@ -236,55 +236,55 @@ function br() {
236
236
  }), typeof Reflect == "object" && Reflect.construct) {
237
237
  try {
238
238
  Reflect.construct(g, []);
239
- } catch (E) {
240
- c = E;
239
+ } catch (I) {
240
+ c = I;
241
241
  }
242
242
  Reflect.construct(e, [], g);
243
243
  } else {
244
244
  try {
245
245
  g.call();
246
- } catch (E) {
247
- c = E;
246
+ } catch (I) {
247
+ c = I;
248
248
  }
249
249
  e.call(g.prototype);
250
250
  }
251
251
  } else {
252
252
  try {
253
253
  throw Error();
254
- } catch (E) {
255
- c = E;
254
+ } catch (I) {
255
+ c = I;
256
256
  }
257
257
  e();
258
258
  }
259
- } catch (E) {
260
- if (E && c && typeof E.stack == "string") {
261
- for (var d = E.stack.split(`
259
+ } catch (I) {
260
+ if (I && c && typeof I.stack == "string") {
261
+ for (var d = I.stack.split(`
262
262
  `), C = c.stack.split(`
263
- `), p = d.length - 1, L = C.length - 1; p >= 1 && L >= 0 && d[p] !== C[L]; )
263
+ `), w = d.length - 1, L = C.length - 1; w >= 1 && L >= 0 && d[w] !== C[L]; )
264
264
  L--;
265
- for (; p >= 1 && L >= 0; p--, L--)
266
- if (d[p] !== C[L]) {
267
- if (p !== 1 || L !== 1)
265
+ for (; w >= 1 && L >= 0; w--, L--)
266
+ if (d[w] !== C[L]) {
267
+ if (w !== 1 || L !== 1)
268
268
  do
269
- if (p--, L--, L < 0 || d[p] !== C[L]) {
270
- var A = `
271
- ` + d[p].replace(" at new ", " at ");
272
- return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" && Me.set(e, A), A;
269
+ if (w--, L--, L < 0 || d[w] !== C[L]) {
270
+ var k = `
271
+ ` + d[w].replace(" at new ", " at ");
272
+ return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && Me.set(e, k), k;
273
273
  }
274
- while (p >= 1 && L >= 0);
274
+ while (w >= 1 && L >= 0);
275
275
  break;
276
276
  }
277
277
  }
278
278
  } finally {
279
- we = !1, he.current = m, fe(), Error.prepareStackTrace = M;
279
+ pe = !1, he.current = m, fe(), Error.prepareStackTrace = M;
280
280
  }
281
- var q = e ? e.displayName || e.name : "", Z = q ? ge(q) : "";
282
- return typeof e == "function" && Me.set(e, Z), Z;
281
+ var X = e ? e.displayName || e.name : "", B = X ? ge(X) : "";
282
+ return typeof e == "function" && Me.set(e, B), B;
283
283
  }
284
- function qe(e, t, s) {
285
- return Ie(e, !1);
284
+ function Xe(e, t, s) {
285
+ return De(e, !1);
286
286
  }
287
- function Xe(e) {
287
+ function Je(e) {
288
288
  var t = e.prototype;
289
289
  return !!(t && t.isReactComponent);
290
290
  }
@@ -292,11 +292,11 @@ function br() {
292
292
  if (e == null)
293
293
  return "";
294
294
  if (typeof e == "function")
295
- return Ie(e, Xe(e));
295
+ return De(e, Je(e));
296
296
  if (typeof e == "string")
297
297
  return ge(e);
298
298
  switch (e) {
299
- case D:
299
+ case S:
300
300
  return ge("Suspense");
301
301
  case y:
302
302
  return ge("SuspenseList");
@@ -304,7 +304,7 @@ function br() {
304
304
  if (typeof e == "object")
305
305
  switch (e.$$typeof) {
306
306
  case o:
307
- return qe(e.render);
307
+ return Xe(e.render);
308
308
  case T:
309
309
  return ye(e.type, t, s);
310
310
  case P: {
@@ -317,17 +317,17 @@ function br() {
317
317
  }
318
318
  return "";
319
319
  }
320
- var ae = Object.prototype.hasOwnProperty, Ce = {}, Ee = I.ReactDebugCurrentFrame;
320
+ var ne = Object.prototype.hasOwnProperty, Ce = {}, Ie = D.ReactDebugCurrentFrame;
321
321
  function me(e) {
322
322
  if (e) {
323
323
  var t = e._owner, s = ye(e.type, e._source, t ? t.type : null);
324
- Ee.setExtraStackFrame(s);
324
+ Ie.setExtraStackFrame(s);
325
325
  } else
326
- Ee.setExtraStackFrame(null);
326
+ Ie.setExtraStackFrame(null);
327
327
  }
328
328
  function Ke(e, t, s, c, M) {
329
329
  {
330
- var m = Function.call.bind(ae);
330
+ var m = Function.call.bind(ne);
331
331
  for (var g in e)
332
332
  if (m(e, g)) {
333
333
  var d = void 0;
@@ -337,15 +337,15 @@ function br() {
337
337
  throw C.name = "Invariant Violation", C;
338
338
  }
339
339
  d = e[g](t, g, c, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
- } catch (p) {
341
- d = p;
340
+ } catch (w) {
341
+ d = w;
342
342
  }
343
343
  d && !(d instanceof Error) && (me(M), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", s, g, typeof d), me(null)), d instanceof Error && !(d.message in Ce) && (Ce[d.message] = !0, me(M), v("Failed %s type: %s", s, d.message), me(null));
344
344
  }
345
345
  }
346
346
  }
347
347
  var er = Array.isArray;
348
- function pe(e) {
348
+ function we(e) {
349
349
  return er(e);
350
350
  }
351
351
  function rr(e) {
@@ -356,27 +356,27 @@ function br() {
356
356
  }
357
357
  function tr(e) {
358
358
  try {
359
- return ke(e), !1;
359
+ return Ee(e), !1;
360
360
  } catch {
361
361
  return !0;
362
362
  }
363
363
  }
364
- function ke(e) {
364
+ function Ee(e) {
365
365
  return "" + e;
366
366
  }
367
- function Ae(e) {
367
+ function ke(e) {
368
368
  if (tr(e))
369
- return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rr(e)), ke(e);
369
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rr(e)), Ee(e);
370
370
  }
371
- var se = I.ReactCurrentOwner, nr = {
371
+ var se = D.ReactCurrentOwner, ar = {
372
372
  key: !0,
373
373
  ref: !0,
374
374
  __self: !0,
375
375
  __source: !0
376
376
  }, Oe, Pe, Ne;
377
377
  Ne = {};
378
- function ar(e) {
379
- if (ae.call(e, "ref")) {
378
+ function nr(e) {
379
+ if (ne.call(e, "ref")) {
380
380
  var t = Object.getOwnPropertyDescriptor(e, "ref").get;
381
381
  if (t && t.isReactWarning)
382
382
  return !1;
@@ -384,7 +384,7 @@ function br() {
384
384
  return e.ref !== void 0;
385
385
  }
386
386
  function sr(e) {
387
- if (ae.call(e, "key")) {
387
+ if (ne.call(e, "key")) {
388
388
  var t = Object.getOwnPropertyDescriptor(e, "key").get;
389
389
  if (t && t.isReactWarning)
390
390
  return !1;
@@ -422,7 +422,7 @@ function br() {
422
422
  var lr = function(e, t, s, c, M, m, g) {
423
423
  var d = {
424
424
  // This tag allows us to uniquely identify this as a React Element
425
- $$typeof: a,
425
+ $$typeof: n,
426
426
  // Built-in properties that belong on the element
427
427
  type: e,
428
428
  key: t,
@@ -451,13 +451,13 @@ function br() {
451
451
  function ur(e, t, s, c, M) {
452
452
  {
453
453
  var m, g = {}, d = null, C = null;
454
- s !== void 0 && (Ae(s), d = "" + s), sr(t) && (Ae(t.key), d = "" + t.key), ar(t) && (C = t.ref, or(t, M));
454
+ s !== void 0 && (ke(s), d = "" + s), sr(t) && (ke(t.key), d = "" + t.key), nr(t) && (C = t.ref, or(t, M));
455
455
  for (m in t)
456
- ae.call(t, m) && !nr.hasOwnProperty(m) && (g[m] = t[m]);
456
+ ne.call(t, m) && !ar.hasOwnProperty(m) && (g[m] = t[m]);
457
457
  if (e && e.defaultProps) {
458
- var p = e.defaultProps;
459
- for (m in p)
460
- g[m] === void 0 && (g[m] = p[m]);
458
+ var w = e.defaultProps;
459
+ for (m in w)
460
+ g[m] === void 0 && (g[m] = w[m]);
461
461
  }
462
462
  if (d || C) {
463
463
  var L = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
@@ -466,8 +466,8 @@ function br() {
466
466
  return lr(e, d, C, M, c, se.current, g);
467
467
  }
468
468
  }
469
- var ve = I.ReactCurrentOwner, Re = I.ReactDebugCurrentFrame;
470
- function J(e) {
469
+ var ve = D.ReactCurrentOwner, Re = D.ReactDebugCurrentFrame;
470
+ function q(e) {
471
471
  if (e) {
472
472
  var t = e._owner, s = ye(e.type, e._source, t ? t.type : null);
473
473
  Re.setExtraStackFrame(s);
@@ -477,7 +477,7 @@ function br() {
477
477
  var be;
478
478
  be = !1;
479
479
  function Le(e) {
480
- return typeof e == "object" && e !== null && e.$$typeof === a;
480
+ return typeof e == "object" && e !== null && e.$$typeof === n;
481
481
  }
482
482
  function ze() {
483
483
  {
@@ -502,7 +502,7 @@ Check your code at ` + t + ":" + s + ".";
502
502
  return "";
503
503
  }
504
504
  }
505
- var _e = {};
505
+ var Ue = {};
506
506
  function fr(e) {
507
507
  {
508
508
  var t = ze();
@@ -521,18 +521,18 @@ Check the top-level render call using <` + s + ">.");
521
521
  return;
522
522
  e._store.validated = !0;
523
523
  var s = fr(t);
524
- if (_e[s])
524
+ if (Ue[s])
525
525
  return;
526
- _e[s] = !0;
526
+ Ue[s] = !0;
527
527
  var c = "";
528
- e && e._owner && e._owner !== ve.current && (c = " It was passed a child from " + h(e._owner.type) + "."), J(e), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, c), J(null);
528
+ e && e._owner && e._owner !== ve.current && (c = " It was passed a child from " + h(e._owner.type) + "."), q(e), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, c), q(null);
529
529
  }
530
530
  }
531
- function Ue(e, t) {
531
+ function Fe(e, t) {
532
532
  {
533
533
  if (typeof e != "object")
534
534
  return;
535
- if (pe(e))
535
+ if (we(e))
536
536
  for (var s = 0; s < e.length; s++) {
537
537
  var c = e[s];
538
538
  Le(c) && Ye(c, t);
@@ -540,7 +540,7 @@ Check the top-level render call using <` + s + ">.");
540
540
  else if (Le(e))
541
541
  e._store && (e._store.validated = !0);
542
542
  else if (e) {
543
- var M = W(e);
543
+ var M = G(e);
544
544
  if (typeof M == "function" && M !== e.entries)
545
545
  for (var m = M.call(e), g; !(g = m.next()).done; )
546
546
  Le(g.value) && Ye(g.value, t);
@@ -577,63 +577,63 @@ Check the top-level render call using <` + s + ">.");
577
577
  for (var t = Object.keys(e.props), s = 0; s < t.length; s++) {
578
578
  var c = t[s];
579
579
  if (c !== "children" && c !== "key") {
580
- J(e), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), J(null);
580
+ q(e), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), q(null);
581
581
  break;
582
582
  }
583
583
  }
584
- e.ref !== null && (J(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), J(null));
584
+ e.ref !== null && (q(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
585
585
  }
586
586
  }
587
- var $e = {};
588
- function Fe(e, t, s, c, M, m) {
587
+ var _e = {};
588
+ function Qe(e, t, s, c, M, m) {
589
589
  {
590
- var g = Q(e);
590
+ var g = Z(e);
591
591
  if (!g) {
592
592
  var d = "";
593
593
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
594
594
  var C = dr(M);
595
595
  C ? d += C : d += ze();
596
- var p;
597
- e === null ? p = "null" : pe(e) ? p = "array" : e !== void 0 && e.$$typeof === a ? (p = "<" + (h(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : p = typeof e, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", p, d);
596
+ var w;
597
+ e === null ? w = "null" : we(e) ? w = "array" : e !== void 0 && e.$$typeof === n ? (w = "<" + (h(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : w = typeof e, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, d);
598
598
  }
599
599
  var L = ur(e, t, s, M, m);
600
600
  if (L == null)
601
601
  return L;
602
602
  if (g) {
603
- var A = t.children;
604
- if (A !== void 0)
603
+ var k = t.children;
604
+ if (k !== void 0)
605
605
  if (c)
606
- if (pe(A)) {
607
- for (var q = 0; q < A.length; q++)
608
- Ue(A[q], e);
609
- Object.freeze && Object.freeze(A);
606
+ if (we(k)) {
607
+ for (var X = 0; X < k.length; X++)
608
+ Fe(k[X], e);
609
+ Object.freeze && Object.freeze(k);
610
610
  } else
611
611
  v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
612
612
  else
613
- Ue(A, e);
613
+ Fe(k, e);
614
614
  }
615
- if (ae.call(t, "key")) {
616
- var Z = h(e), E = Object.keys(t).filter(function(wr) {
617
- return wr !== "key";
618
- }), Se = E.length > 0 ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}";
619
- if (!$e[Z + Se]) {
620
- var jr = E.length > 0 ? "{" + E.join(": ..., ") + ": ...}" : "{}";
615
+ if (ne.call(t, "key")) {
616
+ var B = h(e), I = Object.keys(t).filter(function(pr) {
617
+ return pr !== "key";
618
+ }), Ae = I.length > 0 ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}";
619
+ if (!_e[B + Ae]) {
620
+ var jr = I.length > 0 ? "{" + I.join(": ..., ") + ": ...}" : "{}";
621
621
  v(`A props object containing a "key" prop is being spread into JSX:
622
622
  let props = %s;
623
623
  <%s {...props} />
624
624
  React keys must be passed directly to JSX without using spread:
625
625
  let props = %s;
626
- <%s key={someKey} {...props} />`, Se, Z, jr, Z), $e[Z + Se] = !0;
626
+ <%s key={someKey} {...props} />`, Ae, B, jr, B), _e[B + Ae] = !0;
627
627
  }
628
628
  }
629
629
  return e === l ? Mr(L) : gr(L), L;
630
630
  }
631
631
  }
632
632
  function yr(e, t, s) {
633
- return Fe(e, t, s, !0);
633
+ return Qe(e, t, s, !0);
634
634
  }
635
635
  function mr(e, t, s) {
636
- return Fe(e, t, s, !1);
636
+ return Qe(e, t, s, !1);
637
637
  }
638
638
  var xr = mr, hr = yr;
639
639
  ie.Fragment = l, ie.jsx = xr, ie.jsxs = hr;
@@ -641,118 +641,118 @@ React keys must be passed directly to JSX without using spread:
641
641
  }
642
642
  process.env.NODE_ENV === "production" ? Te.exports = vr() : Te.exports = br();
643
643
  var r = Te.exports;
644
- const He = Ze(), Lr = () => Be(He), zr = ({ initialTheme: n = "light", children: a }) => {
645
- const [i, l] = O(n), x = () => {
644
+ const He = Be(), Lr = () => $e(He), Ur = ({ initialTheme: a = "light", children: n }) => {
645
+ const [i, l] = O(a), x = () => {
646
646
  l((f) => f === "light" ? "dark" : "light");
647
647
  };
648
- return B(() => {
648
+ return $(() => {
649
649
  document.documentElement.classList.remove("light", "dark"), document.documentElement.classList.add(i);
650
- }, [i]), /* @__PURE__ */ r.jsx(He.Provider, { value: { theme: i, setTheme: l, toggleTheme: x }, children: a });
650
+ }, [i]), /* @__PURE__ */ r.jsx(He.Provider, { value: { theme: i, setTheme: l, toggleTheme: x }, children: n });
651
651
  };
652
- let k = {
652
+ let E = {
653
653
  apiKey: null,
654
654
  apiSecret: null,
655
- apiUrl: "http://localhost:9000"
655
+ apiUrl: "https://coinleyserver-production.up.railway.app"
656
656
  };
657
- const Sr = (n) => {
658
- k = { ...k, ...n }, console.log("API initialized with:", k);
659
- }, X = () => ({
657
+ const Ar = (a) => {
658
+ E = { ...E, ...a }, console.log("API initialized with:", E);
659
+ }, J = () => ({
660
660
  "Content-Type": "application/json",
661
- "x-api-key": k.apiKey,
662
- "x-api-secret": k.apiSecret
663
- }), Dr = async (n) => {
661
+ "x-api-key": E.apiKey,
662
+ "x-api-secret": E.apiSecret
663
+ }), Sr = async (a) => {
664
664
  try {
665
- console.log("Creating payment with data:", n), console.log("API URL:", `${k.apiUrl}/api/payments/create`);
666
- const a = await fetch(`${k.apiUrl}/api/payments/create`, {
665
+ console.log("Creating payment with data:", a), console.log("API URL:", `${E.apiUrl}/api/payments/create`);
666
+ const n = await fetch(`${E.apiUrl}/api/payments/create`, {
667
667
  method: "POST",
668
- headers: X(),
669
- body: JSON.stringify(n)
668
+ headers: J(),
669
+ body: JSON.stringify(a)
670
670
  });
671
- if (console.log("Create payment response status:", a.status), !a.ok) {
672
- const l = await a.json();
673
- throw console.error("Error creating payment:", l), new Error(l.error || `Failed to create payment: ${a.status}`);
671
+ if (console.log("Create payment response status:", n.status), !n.ok) {
672
+ const l = await n.json();
673
+ throw console.error("Error creating payment:", l), new Error(l.error || `Failed to create payment: ${n.status}`);
674
674
  }
675
- const i = await a.json();
675
+ const i = await n.json();
676
676
  return console.log("Create payment response data:", i), i;
677
- } catch (a) {
678
- throw console.error("Create payment error:", a), a;
677
+ } catch (n) {
678
+ throw console.error("Create payment error:", n), n;
679
679
  }
680
- }, _r = async (n) => {
680
+ }, Yr = async (a) => {
681
681
  try {
682
- console.log("Getting payment:", n);
683
- const a = await fetch(`${k.apiUrl}/api/payments/${n}`, {
682
+ console.log("Getting payment:", a);
683
+ const n = await fetch(`${E.apiUrl}/api/payments/${a}`, {
684
684
  method: "GET",
685
- headers: X()
685
+ headers: J()
686
686
  });
687
- if (!a.ok) {
688
- const l = await a.json();
689
- throw console.error("Error getting payment:", l), new Error(l.error || `Failed to get payment: ${a.status}`);
687
+ if (!n.ok) {
688
+ const l = await n.json();
689
+ throw console.error("Error getting payment:", l), new Error(l.error || `Failed to get payment: ${n.status}`);
690
690
  }
691
- const i = await a.json();
691
+ const i = await n.json();
692
692
  return console.log("Get payment response:", i), i;
693
- } catch (a) {
694
- throw console.error("Get payment error:", a), a;
693
+ } catch (n) {
694
+ throw console.error("Get payment error:", n), n;
695
695
  }
696
- }, Tr = async (n) => {
696
+ }, Tr = async (a) => {
697
697
  try {
698
- console.log("Processing payment with data:", n), console.log("API URL:", `${k.apiUrl}/api/payments/process`);
699
- const a = await fetch(`${k.apiUrl}/api/payments/process`, {
698
+ console.log("Processing payment with data:", a), console.log("API URL:", `${E.apiUrl}/api/payments/process`);
699
+ const n = await fetch(`${E.apiUrl}/api/payments/process`, {
700
700
  method: "POST",
701
- headers: X(),
702
- body: JSON.stringify(n)
701
+ headers: J(),
702
+ body: JSON.stringify(a)
703
703
  });
704
- if (console.log("Process payment response status:", a.status), !a.ok) {
705
- const l = await a.json();
706
- throw console.error("Error processing payment:", l), new Error(l.error || `Failed to process payment: ${a.status}`);
704
+ if (console.log("Process payment response status:", n.status), !n.ok) {
705
+ const l = await n.json();
706
+ throw console.error("Error processing payment:", l), new Error(l.error || `Failed to process payment: ${n.status}`);
707
707
  }
708
- const i = await a.json();
708
+ const i = await n.json();
709
709
  return console.log("Process payment response data:", i), i;
710
- } catch (a) {
711
- throw console.error("Process payment error:", a), a;
710
+ } catch (n) {
711
+ throw console.error("Process payment error:", n), n;
712
712
  }
713
- }, Yr = async (n = {}) => {
713
+ }, Fr = async (a = {}) => {
714
714
  try {
715
- const { page: a = 1, limit: i = 10, status: l, currency: x, startDate: f, endDate: j, search: S } = n, o = new URLSearchParams();
716
- o.append("page", a), o.append("limit", i), l && o.append("status", l), x && o.append("currency", x), f && o.append("startDate", f), j && o.append("endDate", j), S && o.append("search", S);
717
- const D = `${k.apiUrl}/api/payments/merchant/list?${o.toString()}`, y = await fetch(D, {
715
+ const { page: n = 1, limit: i = 10, status: l, currency: x, startDate: f, endDate: j, search: A } = a, o = new URLSearchParams();
716
+ o.append("page", n), o.append("limit", i), l && o.append("status", l), x && o.append("currency", x), f && o.append("startDate", f), j && o.append("endDate", j), A && o.append("search", A);
717
+ const S = `${E.apiUrl}/api/payments/merchant/list?${o.toString()}`, y = await fetch(S, {
718
718
  method: "GET",
719
- headers: X()
719
+ headers: J()
720
720
  });
721
721
  if (!y.ok) {
722
722
  const T = await y.json();
723
723
  throw new Error(T.error || `Failed to get payments: ${y.status}`);
724
724
  }
725
725
  return await y.json();
726
- } catch (a) {
727
- throw console.error("Get merchant payments error:", a), a;
726
+ } catch (n) {
727
+ throw console.error("Get merchant payments error:", n), n;
728
728
  }
729
- }, Ur = async () => {
729
+ }, _r = async () => {
730
730
  try {
731
- const n = await fetch(`${k.apiUrl}/api/payments/merchant/stats`, {
731
+ const a = await fetch(`${E.apiUrl}/api/payments/merchant/stats`, {
732
732
  method: "GET",
733
- headers: X()
733
+ headers: J()
734
734
  });
735
- if (!n.ok) {
736
- const a = await n.json();
737
- throw new Error(a.error || `Failed to get payment stats: ${n.status}`);
735
+ if (!a.ok) {
736
+ const n = await a.json();
737
+ throw new Error(n.error || `Failed to get payment stats: ${a.status}`);
738
738
  }
739
- return await n.json();
740
- } catch (n) {
741
- throw console.error("Get merchant payment stats error:", n), n;
739
+ return await a.json();
740
+ } catch (a) {
741
+ throw console.error("Get merchant payment stats error:", a), a;
742
742
  }
743
- }, $r = async () => {
743
+ }, Qr = async () => {
744
744
  try {
745
- const n = await fetch(`${k.apiUrl}/api/payments/currencies`, {
745
+ const a = await fetch(`${E.apiUrl}/api/payments/currencies`, {
746
746
  method: "GET",
747
- headers: X()
747
+ headers: J()
748
748
  });
749
- if (!n.ok) {
750
- const a = await n.json();
751
- throw new Error(a.error || `Failed to get currencies: ${n.status}`);
749
+ if (!a.ok) {
750
+ const n = await a.json();
751
+ throw new Error(n.error || `Failed to get currencies: ${a.status}`);
752
752
  }
753
- return await n.json();
754
- } catch (n) {
755
- return console.error("Get supported currencies error:", n), {
753
+ return await a.json();
754
+ } catch (a) {
755
+ return console.error("Get supported currencies error:", a), {
756
756
  currencies: [
757
757
  { id: "USDT", name: "Tether USD", network: "ethereum" },
758
758
  { id: "USDC", name: "USD Coin", network: "ethereum" },
@@ -762,36 +762,36 @@ const Sr = (n) => {
762
762
  ]
763
763
  };
764
764
  }
765
- }, Ve = Ze(), Ir = () => Be(Ve), Fr = ({
766
- apiKey: n,
767
- apiSecret: a,
768
- apiUrl: i = "http://localhost:9000",
765
+ }, Ve = Be(), Dr = () => $e(Ve), Gr = ({
766
+ apiKey: a,
767
+ apiSecret: n,
768
+ apiUrl: i = "https://coinleyserver-production.up.railway.app",
769
769
  debug: l = !1,
770
770
  children: x
771
771
  }) => {
772
- const [f, j] = O(!1), [S, o] = O(null);
773
- B(() => {
774
- if (!n || !a) {
772
+ const [f, j] = O(!1), [A, o] = O(null);
773
+ $(() => {
774
+ if (!a || !n) {
775
775
  o("API key and secret are required");
776
776
  return;
777
777
  }
778
778
  try {
779
- Sr({ apiKey: n, apiSecret: a, apiUrl: i }), j(!0), l && console.log("Coinley SDK initialized with:", { apiKey: n, apiUrl: i });
779
+ Ar({ apiKey: a, apiSecret: n, apiUrl: i }), j(!0), l && console.log("Coinley SDK initialized with:", { apiKey: a, apiUrl: i });
780
780
  } catch (y) {
781
781
  o(y.message), l && console.error("Coinley SDK initialization error:", y);
782
782
  }
783
- }, [n, a, i, l]);
784
- const D = {
785
- apiKey: n,
786
- apiSecret: a,
783
+ }, [a, n, i, l]);
784
+ const S = {
785
+ apiKey: a,
786
+ apiSecret: n,
787
787
  apiUrl: i,
788
788
  isInitialized: f,
789
- error: S,
789
+ error: A,
790
790
  debug: l
791
791
  };
792
- return /* @__PURE__ */ r.jsx(Ve.Provider, { value: D, children: x });
793
- }, Cr = ({ onSelect: n, selected: a, theme: i = "light" }) => {
794
- console.log("PaymentMethods render:", { selected: a });
792
+ return /* @__PURE__ */ r.jsx(Ve.Provider, { value: S, children: x });
793
+ }, Cr = ({ onSelect: a, selected: n, theme: i = "light" }) => {
794
+ console.log("PaymentMethods render:", { selected: n });
795
795
  const l = [
796
796
  {
797
797
  id: "USDT",
@@ -824,7 +824,7 @@ const Sr = (n) => {
824
824
  logo: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNiIgZmlsbD0iIzJCNzVFRCIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0yMS4yMDkgOS43MzlsLTIuOTQxIDIuOTQxYTMuMTMyIDMuMTMyIDAgMDAtNC41MzYgMGwtMi45NDItMi45NDFhNy42MjMgNy42MjMgMCAwMTEwLjQxOSAwek0xMC43OTEgMjIuMjYxbDIuOTQxLTIuOTQxYTMuMTMyIDMuMTMyIDAgMDA0LjUzNiAwbDIuOTQyIDIuOTQxYTcuNjIzIDcuNjIzIDAgMDEtMTAuNDE5IDB6bTExLjU3NS00LjI2MWgtNC4xNTNhMy4xMzMgMy4xMzMgMCAwMDAtNC41MzdoNC4xNTNhNy42MjEgNy42MjEgMCAwMTAgNC41Mzd6bS0xMy43OTMtNC41MzdoNC4xNTNhMy4xMzMgMy4xMzMgMCAwMDAgNC41MzdIOS42ODZhNy42MjEgNy42MjEgMCAwMTAtNC41Mzd6Ii8+PC9nPjwvc3ZnPg=="
825
825
  }
826
826
  ], x = (f) => {
827
- console.log("Method selected:", f), n(f);
827
+ console.log("Method selected:", f), a(f);
828
828
  };
829
829
  return /* @__PURE__ */ r.jsxs("div", { children: [
830
830
  /* @__PURE__ */ r.jsx("h3", { className: `text-lg font-medium mb-3 ${i === "dark" ? "text-white" : "text-gray-800"}`, children: "Select Payment Method" }),
@@ -832,14 +832,14 @@ const Sr = (n) => {
832
832
  "button",
833
833
  {
834
834
  onClick: () => x(f.id),
835
- className: `w-full flex items-center p-3 rounded-lg transition-colors ${a === f.id ? i === "dark" ? "bg-blue-900/30 border border-blue-500" : "bg-blue-50 border border-blue-500" : i === "dark" ? "bg-gray-700 hover:bg-gray-600 border border-gray-700" : "bg-white hover:bg-gray-50 border border-gray-200"}`,
835
+ className: `w-full flex items-center p-3 rounded-lg transition-colors ${n === f.id ? i === "dark" ? "bg-blue-900/30 border border-blue-500" : "bg-blue-50 border border-blue-500" : i === "dark" ? "bg-gray-700 hover:bg-gray-600 border border-gray-700" : "bg-white hover:bg-gray-50 border border-gray-200"}`,
836
836
  children: [
837
837
  /* @__PURE__ */ r.jsx("div", { className: "flex-shrink-0 h-10 w-10 bg-white rounded-full flex items-center justify-center mr-3", children: /* @__PURE__ */ r.jsx("img", { src: f.logo, alt: f.name, className: "h-6 w-6" }) }),
838
838
  /* @__PURE__ */ r.jsxs("div", { className: "flex-1 text-left", children: [
839
839
  /* @__PURE__ */ r.jsx("h4", { className: `font-medium ${i === "dark" ? "text-white" : "text-gray-900"}`, children: f.name }),
840
840
  /* @__PURE__ */ r.jsx("p", { className: `text-sm ${i === "dark" ? "text-gray-300" : "text-gray-500"}`, children: f.description })
841
841
  ] }),
842
- a === f.id && /* @__PURE__ */ r.jsx(
842
+ n === f.id && /* @__PURE__ */ r.jsx(
843
843
  "svg",
844
844
  {
845
845
  xmlns: "http://www.w3.org/2000/svg",
@@ -861,10 +861,10 @@ const Sr = (n) => {
861
861
  f.id
862
862
  )) })
863
863
  ] });
864
- }, De = ({ status: n, theme: a = "light", message: i }) => {
865
- console.log("PaymentStatus render:", { status: n, message: i });
864
+ }, Se = ({ status: a, theme: n = "light", message: i }) => {
865
+ console.log("PaymentStatus render:", { status: a, message: i });
866
866
  const l = () => {
867
- switch (n) {
867
+ switch (a) {
868
868
  case "processing":
869
869
  return /* @__PURE__ */ r.jsx("div", { className: "animate-spin rounded-full h-12 w-12 border-4 border-t-blue-500 border-blue-500/20" });
870
870
  case "success":
@@ -897,7 +897,7 @@ const Sr = (n) => {
897
897
  return null;
898
898
  }
899
899
  }, x = () => {
900
- switch (n) {
900
+ switch (a) {
901
901
  case "processing":
902
902
  return "Processing Payment";
903
903
  case "success":
@@ -908,82 +908,82 @@ const Sr = (n) => {
908
908
  return "Unknown Status";
909
909
  }
910
910
  }, f = () => {
911
- switch (n) {
911
+ switch (a) {
912
912
  case "processing":
913
- return a === "dark" ? "text-blue-300" : "text-blue-600";
913
+ return n === "dark" ? "text-blue-300" : "text-blue-600";
914
914
  case "success":
915
- return a === "dark" ? "text-green-300" : "text-green-600";
915
+ return n === "dark" ? "text-green-300" : "text-green-600";
916
916
  case "error":
917
- return a === "dark" ? "text-red-300" : "text-red-600";
917
+ return n === "dark" ? "text-red-300" : "text-red-600";
918
918
  default:
919
- return a === "dark" ? "text-gray-300" : "text-gray-600";
919
+ return n === "dark" ? "text-gray-300" : "text-gray-600";
920
920
  }
921
921
  };
922
922
  return /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col items-center justify-center py-6", children: [
923
923
  /* @__PURE__ */ r.jsx("div", { className: "mb-4", children: l() }),
924
- /* @__PURE__ */ r.jsx("h3", { className: `text-xl font-bold mb-2 ${a === "dark" ? "text-white" : "text-gray-900"}`, children: x() }),
924
+ /* @__PURE__ */ r.jsx("h3", { className: `text-xl font-bold mb-2 ${n === "dark" ? "text-white" : "text-gray-900"}`, children: x() }),
925
925
  /* @__PURE__ */ r.jsx("p", { className: `text-center ${f()}`, children: i }),
926
- n === "processing" && /* @__PURE__ */ r.jsx("div", { className: `mt-4 text-xs ${a === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "This may take a few moments. Please do not close this window." }),
927
- n === "success" && /* @__PURE__ */ r.jsx("div", { className: `mt-4 p-2 rounded ${a === "dark" ? "bg-gray-700" : "bg-gray-100"}`, children: /* @__PURE__ */ r.jsx("p", { className: `text-xs ${a === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Your payment has been successfully processed. You will receive a confirmation shortly." }) })
926
+ a === "processing" && /* @__PURE__ */ r.jsx("div", { className: `mt-4 text-xs ${n === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "This may take a few moments. Please do not close this window." }),
927
+ a === "success" && /* @__PURE__ */ r.jsx("div", { className: `mt-4 p-2 rounded ${n === "dark" ? "bg-gray-700" : "bg-gray-100"}`, children: /* @__PURE__ */ r.jsx("p", { className: `text-xs ${n === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Your payment has been successfully processed. You will receive a confirmation shortly." }) })
928
928
  ] });
929
- }, F = () => typeof window < "u" && typeof window.ethereum < "u", Er = async () => {
930
- if (!F())
929
+ }, Q = () => typeof window < "u" && typeof window.ethereum < "u", Ir = async () => {
930
+ if (!Q())
931
931
  throw new Error("MetaMask is not installed");
932
932
  try {
933
933
  return await window.ethereum.request({ method: "eth_requestAccounts" });
934
- } catch (n) {
935
- throw console.error("Error connecting to wallet:", n), n;
934
+ } catch (a) {
935
+ throw console.error("Error connecting to wallet:", a), a;
936
936
  }
937
- }, kr = async () => {
938
- if (!F())
937
+ }, Er = async () => {
938
+ if (!Q())
939
939
  throw new Error("MetaMask is not installed");
940
940
  try {
941
941
  return await window.ethereum.request({ method: "eth_accounts" });
942
- } catch (n) {
943
- throw console.error("Error getting accounts:", n), n;
942
+ } catch (a) {
943
+ throw console.error("Error getting accounts:", a), a;
944
944
  }
945
945
  }, Wr = async () => {
946
- if (!F())
946
+ if (!Q())
947
947
  throw new Error("MetaMask is not installed");
948
948
  try {
949
949
  return await window.ethereum.request({ method: "eth_chainId" });
950
- } catch (n) {
951
- throw console.error("Error getting chain ID:", n), n;
950
+ } catch (a) {
951
+ throw console.error("Error getting chain ID:", a), a;
952
952
  }
953
- }, Ar = async (n) => {
954
- if (!F())
953
+ }, kr = async (a) => {
954
+ if (!Q())
955
955
  throw new Error("MetaMask is not installed");
956
956
  try {
957
957
  return await window.ethereum.request({
958
958
  method: "eth_sendTransaction",
959
- params: [n]
959
+ params: [a]
960
960
  });
961
- } catch (a) {
962
- throw console.error("Error sending transaction:", a), a;
961
+ } catch (n) {
962
+ throw console.error("Error sending transaction:", n), n;
963
963
  }
964
- }, Gr = async (n, a, i) => {
965
- if (!F())
964
+ }, Zr = async (a, n, i) => {
965
+ if (!Q())
966
966
  throw new Error("MetaMask is not installed");
967
967
  try {
968
- const x = (await window.ethereum.request({ method: "eth_requestAccounts" }))[0], f = "0xa9059cbb", j = a.slice(2).padStart(64, "0"), S = i.toString(16).padStart(64, "0"), o = `${f}${j}${S}`, D = {
968
+ const x = (await window.ethereum.request({ method: "eth_requestAccounts" }))[0], f = "0xa9059cbb", j = n.slice(2).padStart(64, "0"), A = i.toString(16).padStart(64, "0"), o = `${f}${j}${A}`, S = {
969
969
  from: x,
970
- to: n,
970
+ to: a,
971
971
  data: o
972
972
  };
973
973
  return await window.ethereum.request({
974
974
  method: "eth_sendTransaction",
975
- params: [D]
975
+ params: [S]
976
976
  });
977
977
  } catch (l) {
978
978
  throw console.error("Error sending token:", l), l;
979
979
  }
980
- }, Qr = async () => {
980
+ }, Br = async () => {
981
981
  try {
982
- return (await kr()).length > 0;
982
+ return (await Er()).length > 0;
983
983
  } catch {
984
984
  return !1;
985
985
  }
986
- }, Zr = (n) => ({
986
+ }, $r = (a) => ({
987
987
  "0x1": "Ethereum Mainnet",
988
988
  "0x3": "Ropsten Testnet",
989
989
  "0x4": "Rinkeby Testnet",
@@ -992,15 +992,15 @@ const Sr = (n) => {
992
992
  "0x38": "Binance Smart Chain",
993
993
  "0x89": "Polygon",
994
994
  "0xa86a": "Avalanche"
995
- })[n] || `Unknown Network (${n})`, Br = async (n, a) => {
996
- if (!F())
995
+ })[a] || `Unknown Network (${a})`, Hr = async (a, n) => {
996
+ if (!Q())
997
997
  throw new Error("MetaMask is not installed");
998
998
  try {
999
- const i = "0x70a08231", l = a.slice(2).padStart(64, "0"), x = `${i}${l}`, f = await window.ethereum.request({
999
+ const i = "0x70a08231", l = n.slice(2).padStart(64, "0"), x = `${i}${l}`, f = await window.ethereum.request({
1000
1000
  method: "eth_call",
1001
1001
  params: [
1002
1002
  {
1003
- to: n,
1003
+ to: a,
1004
1004
  data: x
1005
1005
  },
1006
1006
  "latest"
@@ -1010,57 +1010,48 @@ const Sr = (n) => {
1010
1010
  } catch (i) {
1011
1011
  throw console.error("Error getting token balance:", i), i;
1012
1012
  }
1013
- }, Hr = {
1013
+ }, Vr = {
1014
1014
  USDT: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
1015
1015
  USDC: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
1016
1016
  DAI: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
1017
1017
  WETH: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
1018
1018
  WBTC: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"
1019
- }, Or = ({
1020
- isOpen: n,
1021
- onClose: a,
1019
+ }, Or = "data:image/png;base64,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", Pr = ({
1020
+ isOpen: a,
1021
+ onClose: n,
1022
1022
  payment: i,
1023
1023
  paymentStatus: l,
1024
1024
  selectedCurrency: x,
1025
1025
  onCurrencySelect: f,
1026
1026
  onPayment: j,
1027
- error: S,
1027
+ error: A,
1028
1028
  theme: o = "light",
1029
- merchantName: D,
1029
+ merchantName: S,
1030
1030
  transactionHash: y,
1031
1031
  walletConnected: T,
1032
1032
  onConnectWallet: P,
1033
1033
  testMode: N = !1
1034
1034
  }) => {
1035
- const [R, z] = O("select-currency"), [W, I] = O(!1);
1036
- B(() => {
1037
- I(F());
1038
- }, []), B(() => {
1035
+ const [R, z] = O("select-currency"), [G, D] = O(!1);
1036
+ $(() => {
1037
+ D(Q());
1038
+ }, []), $(() => {
1039
1039
  l === "loading" ? z("processing") : l === "success" ? z("success") : l === "error" ? z("error") : l === "idle" && i && z("select-currency");
1040
1040
  }, [l, i]);
1041
1041
  const v = (h) => {
1042
1042
  f(h), z("confirm");
1043
1043
  }, K = () => {
1044
1044
  j();
1045
- }, _ = () => {
1045
+ }, U = () => {
1046
1046
  R === "confirm" && z("select-currency");
1047
1047
  }, H = () => {
1048
- a();
1049
- }, ee = (h) => parseFloat(h).toFixed(2), re = (h) => h ? h.length <= 14 ? h : `${h.slice(0, 8)}...${h.slice(-6)}` : "", Y = `fixed inset-0 z-50 overflow-y-auto ${o === "dark" ? "bg-gray-900/75" : "bg-black/50"}`, V = `relative p-6 w-full max-w-md mx-auto rounded-lg shadow-xl ${o === "dark" ? "bg-gray-800 text-white" : "bg-white text-gray-800"}`, Q = `text-xl font-bold mb-4 ${o === "dark" ? "text-white" : "text-gray-900"}`, G = `w-full py-2 px-4 rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 ${o === "dark" ? "bg-blue-600 hover:bg-blue-700 text-white focus:ring-blue-500" : "bg-blue-500 hover:bg-blue-600 text-white focus:ring-blue-500"}`, U = `w-full py-2 px-4 rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 ${o === "dark" ? "bg-gray-700 hover:bg-gray-600 text-white focus:ring-gray-500" : "bg-gray-200 hover:bg-gray-300 text-gray-800 focus:ring-gray-500"}`;
1050
- return n ? /* @__PURE__ */ r.jsx("div", { className: Y, children: /* @__PURE__ */ r.jsx("div", { className: "flex min-h-screen items-center justify-center p-4", children: /* @__PURE__ */ r.jsxs("div", { className: V, children: [
1048
+ n();
1049
+ }, ee = (h) => parseFloat(h).toFixed(2), re = (h) => h ? h.length <= 14 ? h : `${h.slice(0, 8)}...${h.slice(-6)}` : "", Y = `fixed inset-0 z-50 overflow-y-auto ${o === "dark" ? "bg-gray-900/75" : "bg-black/50"}`, V = `relative p-6 w-full max-w-md mx-auto rounded-lg shadow-xl ${o === "dark" ? "bg-gray-800 text-white" : "bg-white text-gray-800"}`, Z = `text-xl font-bold mb-4 ${o === "dark" ? "text-white" : "text-gray-900"}`, W = `w-full py-2 px-4 rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 ${o === "dark" ? "bg-blue-600 hover:bg-blue-700 text-white focus:ring-blue-500" : "bg-blue-500 hover:bg-blue-600 text-white focus:ring-blue-500"}`, F = `w-full py-2 px-4 rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 ${o === "dark" ? "bg-gray-700 hover:bg-gray-600 text-white focus:ring-gray-500" : "bg-gray-200 hover:bg-gray-300 text-gray-800 focus:ring-gray-500"}`;
1050
+ return a ? /* @__PURE__ */ r.jsx("div", { className: Y, children: /* @__PURE__ */ r.jsx("div", { className: "flex min-h-screen items-center justify-center p-4", children: /* @__PURE__ */ r.jsxs("div", { className: V, children: [
1051
1051
  /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between items-center mb-6", children: [
1052
1052
  /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
1053
- /* @__PURE__ */ r.jsx(
1054
- "svg",
1055
- {
1056
- xmlns: "http://www.w3.org/2000/svg",
1057
- viewBox: "0 0 24 24",
1058
- fill: "currentColor",
1059
- className: "w-6 h-6 mr-2 text-blue-500",
1060
- children: /* @__PURE__ */ r.jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.31-8.86c-1.77-.45-2.34-.94-2.34-1.67 0-.84.79-1.43 2.1-1.43 1.38 0 1.9.66 1.94 1.64h1.71c-.05-1.34-.87-2.57-2.49-2.97V5H10.9v1.69c-1.51.32-2.72 1.3-2.72 2.81 0 1.79 1.49 2.69 3.66 3.21 1.95.46 2.34 1.15 2.34 1.87 0 .53-.39 1.39-2.1 1.39-1.6 0-2.23-.72-2.32-1.64H8.04c.1 1.7 1.36 2.66 2.86 2.97V19h2.34v-1.67c1.52-.29 2.72-1.16 2.73-2.77-.01-2.2-1.9-2.96-3.66-3.42z" })
1061
- }
1062
- ),
1063
- /* @__PURE__ */ r.jsx("h2", { className: Q, children: "Coinley Pay" })
1053
+ /* @__PURE__ */ r.jsx("img", { src: Or }),
1054
+ /* @__PURE__ */ r.jsx("h2", { className: Z, children: "Coinley Pay" })
1064
1055
  ] }),
1065
1056
  /* @__PURE__ */ r.jsx(
1066
1057
  "button",
@@ -1073,7 +1064,7 @@ const Sr = (n) => {
1073
1064
  ] }),
1074
1065
  /* @__PURE__ */ r.jsxs("div", { className: "mb-6", children: [
1075
1066
  i && /* @__PURE__ */ r.jsxs("div", { className: `mb-6 p-4 rounded-lg ${o === "dark" ? "bg-gray-700" : "bg-gray-100"}`, children: [
1076
- /* @__PURE__ */ r.jsx("p", { className: `text-sm ${o === "dark" ? "text-gray-300" : "text-gray-600"}`, children: D }),
1067
+ /* @__PURE__ */ r.jsx("p", { className: `text-sm ${o === "dark" ? "text-gray-300" : "text-gray-600"}`, children: S }),
1077
1068
  /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between items-center mt-2", children: [
1078
1069
  /* @__PURE__ */ r.jsx("span", { className: `font-medium ${o === "dark" ? "text-gray-300" : "text-gray-700"}`, children: "Amount:" }),
1079
1070
  /* @__PURE__ */ r.jsxs("span", { className: "font-bold text-xl", children: [
@@ -1122,7 +1113,7 @@ const Sr = (n) => {
1122
1113
  /* @__PURE__ */ r.jsx("p", { className: `text-sm ${o === "dark" ? "text-gray-300" : "text-gray-600"}`, children: 'Click "Pay Now" to simulate a successful payment' })
1123
1114
  ] })
1124
1115
  ] }) })
1125
- ) : W ? (
1116
+ ) : G ? (
1126
1117
  // MetaMask available option
1127
1118
  /* @__PURE__ */ r.jsxs("div", { className: `p-4 rounded-lg mb-4 ${o === "dark" ? "bg-blue-900/20" : "bg-blue-50"}`, children: [
1128
1119
  /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
@@ -1143,7 +1134,7 @@ const Sr = (n) => {
1143
1134
  "button",
1144
1135
  {
1145
1136
  onClick: P,
1146
- className: `mt-3 ${G}`,
1137
+ className: `mt-3 ${W}`,
1147
1138
  children: "Connect Wallet"
1148
1139
  }
1149
1140
  )
@@ -1164,7 +1155,7 @@ const Sr = (n) => {
1164
1155
  href: "https://metamask.io/download/",
1165
1156
  target: "_blank",
1166
1157
  rel: "noopener noreferrer",
1167
- className: `block mt-3 text-center ${G}`,
1158
+ className: `block mt-3 text-center ${W}`,
1168
1159
  children: "Install MetaMask"
1169
1160
  }
1170
1161
  )
@@ -1175,8 +1166,8 @@ const Sr = (n) => {
1175
1166
  "button",
1176
1167
  {
1177
1168
  type: "button",
1178
- onClick: _,
1179
- className: U,
1169
+ onClick: U,
1170
+ className: F,
1180
1171
  children: "Back"
1181
1172
  }
1182
1173
  ),
@@ -1185,15 +1176,15 @@ const Sr = (n) => {
1185
1176
  {
1186
1177
  type: "button",
1187
1178
  onClick: K,
1188
- className: G,
1189
- disabled: !N && W && !T,
1179
+ className: W,
1180
+ disabled: !N && G && !T,
1190
1181
  children: "Pay Now"
1191
1182
  }
1192
1183
  )
1193
1184
  ] })
1194
1185
  ] }),
1195
1186
  R === "processing" && /* @__PURE__ */ r.jsx(
1196
- De,
1187
+ Se,
1197
1188
  {
1198
1189
  status: "processing",
1199
1190
  theme: o,
@@ -1202,7 +1193,7 @@ const Sr = (n) => {
1202
1193
  ),
1203
1194
  R === "success" && /* @__PURE__ */ r.jsxs("div", { children: [
1204
1195
  /* @__PURE__ */ r.jsx(
1205
- De,
1196
+ Se,
1206
1197
  {
1207
1198
  status: "success",
1208
1199
  theme: o,
@@ -1226,19 +1217,19 @@ const Sr = (n) => {
1226
1217
  ] }),
1227
1218
  R === "error" && /* @__PURE__ */ r.jsxs("div", { children: [
1228
1219
  /* @__PURE__ */ r.jsx(
1229
- De,
1220
+ Se,
1230
1221
  {
1231
1222
  status: "error",
1232
1223
  theme: o,
1233
- message: S || "An error occurred while processing your payment."
1224
+ message: A || "An error occurred while processing your payment."
1234
1225
  }
1235
1226
  ),
1236
1227
  /* @__PURE__ */ r.jsx(
1237
1228
  "button",
1238
1229
  {
1239
1230
  type: "button",
1240
- onClick: _,
1241
- className: `mt-4 ${U}`,
1231
+ onClick: U,
1232
+ className: `mt-4 ${F}`,
1242
1233
  children: "Try Again"
1243
1234
  }
1244
1235
  )
@@ -1246,24 +1237,24 @@ const Sr = (n) => {
1246
1237
  ] }),
1247
1238
  /* @__PURE__ */ r.jsx("div", { className: `text-center text-xs ${o === "dark" ? "text-gray-400" : "text-gray-500"}`, children: /* @__PURE__ */ r.jsx("p", { children: "Powered by Coinley - Secure Cryptocurrency Payments" }) })
1248
1239
  ] }) }) }) : null;
1249
- }, Pr = pr(({
1250
- apiKey: n,
1251
- apiSecret: a,
1240
+ }, Rr = wr(({
1241
+ apiKey: a,
1242
+ apiSecret: n,
1252
1243
  apiUrl: i,
1253
1244
  customerEmail: l,
1254
1245
  merchantName: x = "Merchant",
1255
1246
  onSuccess: f,
1256
1247
  onError: j,
1257
- onClose: S,
1248
+ onClose: A,
1258
1249
  theme: o,
1259
- autoOpen: D = !1,
1250
+ autoOpen: S = !1,
1260
1251
  debug: y = !1,
1261
1252
  testMode: T = !1
1262
1253
  // Add testMode flag for development
1263
1254
  }, P) => {
1264
- const N = Ir(), { theme: R } = Lr(), [z, W] = O(D), [I, v] = O(null), [K, _] = O("idle"), [H, ee] = O("USDT"), [re, Y] = O(null), [V, Q] = O(null), [G, U] = O(!1);
1265
- n || (N == null || N.apiKey), a || (N == null || N.apiSecret), i || (N == null || N.apiUrl);
1266
- const h = o || R, $ = y || (N == null ? void 0 : N.debug);
1255
+ const N = Dr(), { theme: R } = Lr(), [z, G] = O(S), [D, v] = O(null), [K, U] = O("idle"), [H, ee] = O("USDT"), [re, Y] = O(null), [V, Z] = O(null), [W, F] = O(!1);
1256
+ a || (N == null || N.apiKey), n || (N == null || N.apiSecret), i || (N == null || N.apiUrl);
1257
+ const h = o || R, _ = y || (N == null ? void 0 : N.debug);
1267
1258
  Nr(P, () => ({
1268
1259
  open: (u) => {
1269
1260
  ce(u);
@@ -1271,26 +1262,26 @@ const Sr = (n) => {
1271
1262
  close: () => {
1272
1263
  te();
1273
1264
  },
1274
- getPayment: () => I
1265
+ getPayment: () => D
1275
1266
  }));
1276
- const w = (u, b) => {
1277
- $ && console.log(`[Coinley SDK] ${u}`, b);
1267
+ const p = (u, b) => {
1268
+ _ && console.log(`[Coinley SDK] ${u}`, b);
1278
1269
  };
1279
- B(() => {
1270
+ $(() => {
1280
1271
  (async () => {
1281
- if (F())
1272
+ if (Q())
1282
1273
  try {
1283
1274
  const b = await window.ethereum.request({ method: "eth_accounts" });
1284
- U(b && b.length > 0);
1275
+ F(b && b.length > 0);
1285
1276
  } catch (b) {
1286
- w("Error checking wallet connection:", b), U(!1);
1277
+ p("Error checking wallet connection:", b), F(!1);
1287
1278
  }
1288
1279
  else
1289
- U(!1);
1280
+ F(!1);
1290
1281
  })();
1291
- }, []), B(() => {
1282
+ }, []), $(() => {
1292
1283
  const u = (b) => {
1293
- U(b.length > 0);
1284
+ F(b.length > 0);
1294
1285
  };
1295
1286
  return window.ethereum && window.ethereum.on("accountsChanged", u), () => {
1296
1287
  window.ethereum && window.ethereum.removeListener("accountsChanged", u);
@@ -1301,48 +1292,48 @@ const Sr = (n) => {
1301
1292
  Y("Payment amount is required"), j && j(new Error("Payment amount is required"));
1302
1293
  return;
1303
1294
  }
1304
- _("loading"), W(!0);
1295
+ U("loading"), G(!0);
1305
1296
  try {
1306
- w("Creating payment with details:", u);
1307
- const b = await Dr({
1297
+ p("Creating payment with details:", u);
1298
+ const b = await Sr({
1308
1299
  amount: u.amount,
1309
1300
  currency: u.currency || "USDT",
1310
1301
  customerEmail: u.customerEmail || l,
1311
1302
  callbackUrl: u.callbackUrl,
1312
1303
  metadata: u.metadata || {}
1313
1304
  });
1314
- w("Payment created:", b), v(b.payment), _("idle"), Y(null);
1305
+ p("Payment created:", b), v(b.payment), U("idle"), Y(null);
1315
1306
  } catch (b) {
1316
- w("Error creating payment:", b), Y(b.message || "Failed to create payment"), _("error"), j && j(b);
1307
+ p("Error creating payment:", b), Y(b.message || "Failed to create payment"), U("error"), j && j(b);
1317
1308
  }
1318
1309
  }, te = () => {
1319
- W(!1), Q(null), S && S();
1310
+ G(!1), Z(null), A && A();
1320
1311
  }, le = (u) => {
1321
- w("Currency selected:", u), ee(u);
1322
- }, ne = async () => {
1323
- if (!F())
1312
+ p("Currency selected:", u), ee(u);
1313
+ }, ae = async () => {
1314
+ if (!Q())
1324
1315
  return Y("MetaMask is not installed. Please install MetaMask to make payments."), !1;
1325
1316
  try {
1326
- const u = await Er();
1327
- return U(u.length > 0), u.length > 0;
1317
+ const u = await Ir();
1318
+ return F(u.length > 0), u.length > 0;
1328
1319
  } catch (u) {
1329
- return w("Error connecting to wallet:", u), Y(u.message || "Failed to connect to wallet"), !1;
1320
+ return p("Error connecting to wallet:", u), Y(u.message || "Failed to connect to wallet"), !1;
1330
1321
  }
1331
1322
  }, ue = async () => {
1332
- if (!I) {
1323
+ if (!D) {
1333
1324
  Y("No active payment to process");
1334
1325
  return;
1335
1326
  }
1336
- w("Starting payment process..."), _("loading"), Q(null);
1327
+ p("Starting payment process..."), U("loading"), Z(null);
1337
1328
  try {
1338
- w("Processing payment:", { paymentId: I.id, currency: H });
1329
+ p("Processing payment:", { paymentId: D.id, currency: H });
1339
1330
  let u;
1340
1331
  if (T)
1341
- w("Test mode: Generating mock transaction..."), u = `0x${Array.from({ length: 64 }, () => Math.floor(Math.random() * 16).toString(16)).join("")}`;
1332
+ p("Test mode: Generating mock transaction..."), u = `0x${Array.from({ length: 64 }, () => Math.floor(Math.random() * 16).toString(16)).join("")}`;
1342
1333
  else {
1343
- if (!G && !await ne())
1334
+ if (!W && !await ae())
1344
1335
  throw new Error("Please connect your wallet to proceed with payment");
1345
- const de = I.merchantAddress || "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", xe = {
1336
+ const de = D.merchantAddress || "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", xe = {
1346
1337
  from: await window.ethereum.request({ method: "eth_requestAccounts" }).then((fe) => fe[0]),
1347
1338
  to: de,
1348
1339
  value: "0x0",
@@ -1350,28 +1341,28 @@ const Sr = (n) => {
1350
1341
  data: "0x"
1351
1342
  // Would include token transfer data for ERC-20
1352
1343
  };
1353
- w("Sending transaction to wallet for approval..."), u = await Ar(xe);
1344
+ p("Sending transaction to wallet for approval..."), u = await kr(xe);
1354
1345
  }
1355
- w("Transaction hash:", u), Q(u), w("Sending process payment request to API...");
1346
+ p("Transaction hash:", u), Z(u), p("Sending process payment request to API...");
1356
1347
  const b = await Tr({
1357
- paymentId: I.id,
1348
+ paymentId: D.id,
1358
1349
  transactionHash: u,
1359
1350
  network: "ethereum"
1360
1351
  // Or determine based on selected currency
1361
1352
  });
1362
- w("Payment processed successfully:", b), _("success"), f && (w("Calling onSuccess callback..."), f(I.id, u));
1353
+ p("Payment processed successfully:", b), U("success"), f && (p("Calling onSuccess callback..."), f(D.id, u));
1363
1354
  } catch (u) {
1364
- w("Payment error:", u), Y(u.message || "Failed to process payment"), _("error"), j && j(u);
1355
+ p("Payment error:", u), Y(u.message || "Failed to process payment"), U("error"), j && j(u);
1365
1356
  }
1366
1357
  };
1367
- return B(() => {
1368
- D && I && W(!0);
1369
- }, [D, I]), /* @__PURE__ */ r.jsx(r.Fragment, { children: z && /* @__PURE__ */ r.jsx(
1370
- Or,
1358
+ return $(() => {
1359
+ S && D && G(!0);
1360
+ }, [S, D]), /* @__PURE__ */ r.jsx(r.Fragment, { children: z && /* @__PURE__ */ r.jsx(
1361
+ Pr,
1371
1362
  {
1372
1363
  isOpen: z,
1373
1364
  onClose: te,
1374
- payment: I,
1365
+ payment: D,
1375
1366
  paymentStatus: K,
1376
1367
  selectedCurrency: H,
1377
1368
  onCurrencySelect: le,
@@ -1380,40 +1371,40 @@ const Sr = (n) => {
1380
1371
  theme: h,
1381
1372
  merchantName: x,
1382
1373
  transactionHash: V,
1383
- walletConnected: G,
1384
- onConnectWallet: ne,
1374
+ walletConnected: W,
1375
+ onConnectWallet: ae,
1385
1376
  testMode: T
1386
1377
  }
1387
1378
  ) });
1388
1379
  });
1389
- Pr.displayName = "CoinleyCheckout";
1390
- const Vr = {
1391
- apiUrl: "http://localhost:9000",
1380
+ Rr.displayName = "CoinleyCheckout";
1381
+ const qr = {
1382
+ apiUrl: 'https://coinleyserver-production.up.railway.app"',
1392
1383
  debug: !1,
1393
1384
  testMode: !1,
1394
1385
  theme: "light"
1395
- }, Jr = "1.0.0";
1386
+ }, Xr = "1.0.0";
1396
1387
  export {
1397
- Pr as CoinleyCheckout,
1398
- Or as CoinleyModal,
1399
- Fr as CoinleyProvider,
1400
- Vr as DEFAULT_CONFIG,
1401
- Hr as TOKEN_ADDRESSES,
1402
- zr as ThemeProvider,
1403
- Jr as VERSION,
1404
- Er as connectWallet,
1405
- Dr as createPayment,
1406
- kr as getAccounts,
1388
+ Rr as CoinleyCheckout,
1389
+ Pr as CoinleyModal,
1390
+ Gr as CoinleyProvider,
1391
+ qr as DEFAULT_CONFIG,
1392
+ Vr as TOKEN_ADDRESSES,
1393
+ Ur as ThemeProvider,
1394
+ Xr as VERSION,
1395
+ Ir as connectWallet,
1396
+ Sr as createPayment,
1397
+ Er as getAccounts,
1407
1398
  Wr as getChainId,
1408
- Ur as getMerchantPaymentStats,
1409
- Yr as getMerchantPayments,
1410
- Zr as getNetworkName,
1411
- _r as getPayment,
1412
- $r as getSupportedCurrencies,
1413
- Br as getTokenBalance,
1414
- F as isMetaMaskInstalled,
1415
- Qr as isWalletConnected,
1399
+ _r as getMerchantPaymentStats,
1400
+ Fr as getMerchantPayments,
1401
+ $r as getNetworkName,
1402
+ Yr as getPayment,
1403
+ Qr as getSupportedCurrencies,
1404
+ Hr as getTokenBalance,
1405
+ Q as isMetaMaskInstalled,
1406
+ Br as isWalletConnected,
1416
1407
  Tr as processPayment,
1417
- Gr as sendToken,
1418
- Ar as sendTransaction
1408
+ Zr as sendToken,
1409
+ kr as sendTransaction
1419
1410
  };