@getopenpay/openpay-js 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -3
- package/dist/index.es.js +346 -345
- package/dist/index.umd.js +19 -19
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -15,7 +15,7 @@ var Yr;
|
|
|
15
15
|
function hn() {
|
|
16
16
|
if (Yr) return M;
|
|
17
17
|
Yr = 1;
|
|
18
|
-
var c = Symbol.for("react.element"), a = Symbol.for("react.portal"),
|
|
18
|
+
var c = Symbol.for("react.element"), a = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), b = Symbol.for("react.provider"), I = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), q = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), U = Symbol.iterator;
|
|
19
19
|
function G(r) {
|
|
20
20
|
return r === null || typeof r != "object" ? null : (r = U && r[U] || r["@@iterator"], typeof r == "function" ? r : null);
|
|
21
21
|
}
|
|
@@ -119,7 +119,7 @@ function hn() {
|
|
|
119
119
|
if (r._status === 1) return r._result.default;
|
|
120
120
|
throw r._result;
|
|
121
121
|
}
|
|
122
|
-
var
|
|
122
|
+
var d = { current: null }, ne = { transition: null }, Ee = { ReactCurrentDispatcher: d, ReactCurrentBatchConfig: ne, ReactCurrentOwner: z };
|
|
123
123
|
function se() {
|
|
124
124
|
throw Error("act(...) is not supported in production builds of React.");
|
|
125
125
|
}
|
|
@@ -139,7 +139,7 @@ function hn() {
|
|
|
139
139
|
}, only: function(r) {
|
|
140
140
|
if (!de(r)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
141
141
|
return r;
|
|
142
|
-
} }, M.Component = W, M.Fragment =
|
|
142
|
+
} }, M.Component = W, M.Fragment = f, M.Profiler = g, M.PureComponent = oe, M.StrictMode = y, M.Suspense = $, M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ee, M.act = se, M.cloneElement = function(r, s, h) {
|
|
143
143
|
if (r == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + r + ".");
|
|
144
144
|
var _ = Z({}, r.props), E = r.key, j = r.ref, k = r._owner;
|
|
145
145
|
if (s != null) {
|
|
@@ -176,34 +176,34 @@ function hn() {
|
|
|
176
176
|
ne.transition = s;
|
|
177
177
|
}
|
|
178
178
|
}, M.unstable_act = se, M.useCallback = function(r, s) {
|
|
179
|
-
return
|
|
179
|
+
return d.current.useCallback(r, s);
|
|
180
180
|
}, M.useContext = function(r) {
|
|
181
|
-
return
|
|
181
|
+
return d.current.useContext(r);
|
|
182
182
|
}, M.useDebugValue = function() {
|
|
183
183
|
}, M.useDeferredValue = function(r) {
|
|
184
|
-
return
|
|
184
|
+
return d.current.useDeferredValue(r);
|
|
185
185
|
}, M.useEffect = function(r, s) {
|
|
186
|
-
return
|
|
186
|
+
return d.current.useEffect(r, s);
|
|
187
187
|
}, M.useId = function() {
|
|
188
|
-
return
|
|
188
|
+
return d.current.useId();
|
|
189
189
|
}, M.useImperativeHandle = function(r, s, h) {
|
|
190
|
-
return
|
|
190
|
+
return d.current.useImperativeHandle(r, s, h);
|
|
191
191
|
}, M.useInsertionEffect = function(r, s) {
|
|
192
|
-
return
|
|
192
|
+
return d.current.useInsertionEffect(r, s);
|
|
193
193
|
}, M.useLayoutEffect = function(r, s) {
|
|
194
|
-
return
|
|
194
|
+
return d.current.useLayoutEffect(r, s);
|
|
195
195
|
}, M.useMemo = function(r, s) {
|
|
196
|
-
return
|
|
196
|
+
return d.current.useMemo(r, s);
|
|
197
197
|
}, M.useReducer = function(r, s, h) {
|
|
198
|
-
return
|
|
198
|
+
return d.current.useReducer(r, s, h);
|
|
199
199
|
}, M.useRef = function(r) {
|
|
200
|
-
return
|
|
200
|
+
return d.current.useRef(r);
|
|
201
201
|
}, M.useState = function(r) {
|
|
202
|
-
return
|
|
202
|
+
return d.current.useState(r);
|
|
203
203
|
}, M.useSyncExternalStore = function(r, s, h) {
|
|
204
|
-
return
|
|
204
|
+
return d.current.useSyncExternalStore(r, s, h);
|
|
205
205
|
}, M.useTransition = function() {
|
|
206
|
-
return
|
|
206
|
+
return d.current.useTransition();
|
|
207
207
|
}, M.version = "18.3.1", M;
|
|
208
208
|
}
|
|
209
209
|
var Pt = { exports: {} };
|
|
@@ -222,7 +222,7 @@ function vn() {
|
|
|
222
222
|
return Hr || (Hr = 1, function(c, a) {
|
|
223
223
|
process.env.NODE_ENV !== "production" && function() {
|
|
224
224
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
225
|
-
var
|
|
225
|
+
var f = "18.3.1", y = Symbol.for("react.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), $ = Symbol.for("react.provider"), q = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), Y = Symbol.for("react.memo"), Z = Symbol.for("react.lazy"), ve = Symbol.for("react.offscreen"), W = Symbol.iterator, ge = "@@iterator";
|
|
226
226
|
function oe(e) {
|
|
227
227
|
if (e === null || typeof e != "object")
|
|
228
228
|
return null;
|
|
@@ -273,7 +273,7 @@ function vn() {
|
|
|
273
273
|
ne("warn", e, n);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function d(e) {
|
|
277
277
|
{
|
|
278
278
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
|
|
279
279
|
n[o - 1] = arguments[o];
|
|
@@ -284,10 +284,10 @@ function vn() {
|
|
|
284
284
|
{
|
|
285
285
|
var o = H.ReactDebugCurrentFrame, u = o.getStackAddendum();
|
|
286
286
|
u !== "" && (t += "%s", n = n.concat([u]));
|
|
287
|
-
var
|
|
287
|
+
var p = n.map(function(l) {
|
|
288
288
|
return String(l);
|
|
289
289
|
});
|
|
290
|
-
|
|
290
|
+
p.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, p);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
var Ee = {};
|
|
@@ -296,7 +296,7 @@ function vn() {
|
|
|
296
296
|
var n = e.constructor, o = n && (n.displayName || n.name) || "ReactClass", u = o + "." + t;
|
|
297
297
|
if (Ee[u])
|
|
298
298
|
return;
|
|
299
|
-
|
|
299
|
+
d("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", t, o), Ee[u] = !0;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
var r = {
|
|
@@ -421,7 +421,7 @@ function vn() {
|
|
|
421
421
|
}
|
|
422
422
|
function Ce(e) {
|
|
423
423
|
if ($t(e))
|
|
424
|
-
return
|
|
424
|
+
return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ft(e)), We(e);
|
|
425
425
|
}
|
|
426
426
|
function xt(e, t, n) {
|
|
427
427
|
var o = e.displayName;
|
|
@@ -436,7 +436,7 @@ function vn() {
|
|
|
436
436
|
function ee(e) {
|
|
437
437
|
if (e == null)
|
|
438
438
|
return null;
|
|
439
|
-
if (typeof e.tag == "number" &&
|
|
439
|
+
if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
440
440
|
return e.displayName || e.name || null;
|
|
441
441
|
if (typeof e == "string")
|
|
442
442
|
return e;
|
|
@@ -468,9 +468,9 @@ function vn() {
|
|
|
468
468
|
var o = e.displayName || null;
|
|
469
469
|
return o !== null ? o : ee(e.type) || "Memo";
|
|
470
470
|
case Z: {
|
|
471
|
-
var u = e,
|
|
471
|
+
var u = e, p = u._payload, l = u._init;
|
|
472
472
|
try {
|
|
473
|
-
return ee(l(
|
|
473
|
+
return ee(l(p));
|
|
474
474
|
} catch {
|
|
475
475
|
return null;
|
|
476
476
|
}
|
|
@@ -503,7 +503,7 @@ function vn() {
|
|
|
503
503
|
}
|
|
504
504
|
function Lt(e, t) {
|
|
505
505
|
var n = function() {
|
|
506
|
-
Ge || (Ge = !0,
|
|
506
|
+
Ge || (Ge = !0, d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
507
507
|
};
|
|
508
508
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
509
509
|
get: n,
|
|
@@ -512,7 +512,7 @@ function vn() {
|
|
|
512
512
|
}
|
|
513
513
|
function Nt(e, t) {
|
|
514
514
|
var n = function() {
|
|
515
|
-
Je || (Je = !0,
|
|
515
|
+
Je || (Je = !0, d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
516
516
|
};
|
|
517
517
|
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
518
518
|
get: n,
|
|
@@ -522,42 +522,42 @@ function vn() {
|
|
|
522
522
|
function Ut(e) {
|
|
523
523
|
if (typeof e.ref == "string" && z.current && e.__self && z.current.stateNode !== e.__self) {
|
|
524
524
|
var t = ee(z.current.type);
|
|
525
|
-
De[t] || (
|
|
525
|
+
De[t] || (d('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', t, e.ref), De[t] = !0);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
var Fe = function(e, t, n, o, u,
|
|
529
|
-
var
|
|
528
|
+
var Fe = function(e, t, n, o, u, p, l) {
|
|
529
|
+
var m = {
|
|
530
530
|
// This tag allows us to uniquely identify this as a React Element
|
|
531
|
-
$$typeof:
|
|
531
|
+
$$typeof: y,
|
|
532
532
|
// Built-in properties that belong on the element
|
|
533
533
|
type: e,
|
|
534
534
|
key: t,
|
|
535
535
|
ref: n,
|
|
536
536
|
props: l,
|
|
537
537
|
// Record the component responsible for creating this element.
|
|
538
|
-
_owner:
|
|
538
|
+
_owner: p
|
|
539
539
|
};
|
|
540
|
-
return
|
|
540
|
+
return m._store = {}, Object.defineProperty(m._store, "validated", {
|
|
541
541
|
configurable: !1,
|
|
542
542
|
enumerable: !1,
|
|
543
543
|
writable: !0,
|
|
544
544
|
value: !1
|
|
545
|
-
}), Object.defineProperty(
|
|
545
|
+
}), Object.defineProperty(m, "_self", {
|
|
546
546
|
configurable: !1,
|
|
547
547
|
enumerable: !1,
|
|
548
548
|
writable: !1,
|
|
549
549
|
value: o
|
|
550
|
-
}), Object.defineProperty(
|
|
550
|
+
}), Object.defineProperty(m, "_source", {
|
|
551
551
|
configurable: !1,
|
|
552
552
|
enumerable: !1,
|
|
553
553
|
writable: !1,
|
|
554
554
|
value: u
|
|
555
|
-
}), Object.freeze && (Object.freeze(
|
|
555
|
+
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
556
556
|
};
|
|
557
557
|
function Vt(e, t, n) {
|
|
558
|
-
var o, u = {},
|
|
558
|
+
var o, u = {}, p = null, l = null, m = null, v = null;
|
|
559
559
|
if (t != null) {
|
|
560
|
-
Ze(t) && (l = t.ref, Ut(t)), Qe(t) && (Ce(t.key),
|
|
560
|
+
Ze(t) && (l = t.ref, Ut(t)), Qe(t) && (Ce(t.key), p = "" + t.key), m = t.__self === void 0 ? null : t.__self, v = t.__source === void 0 ? null : t.__source;
|
|
561
561
|
for (o in t)
|
|
562
562
|
ye.call(t, o) && !Ke.hasOwnProperty(o) && (u[o] = t[o]);
|
|
563
563
|
}
|
|
@@ -574,11 +574,11 @@ function vn() {
|
|
|
574
574
|
for (o in T)
|
|
575
575
|
u[o] === void 0 && (u[o] = T[o]);
|
|
576
576
|
}
|
|
577
|
-
if (
|
|
577
|
+
if (p || l) {
|
|
578
578
|
var A = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
579
|
-
|
|
579
|
+
p && Lt(u, A), l && Nt(u, A);
|
|
580
580
|
}
|
|
581
|
-
return Fe(e,
|
|
581
|
+
return Fe(e, p, l, m, v, z.current, u);
|
|
582
582
|
}
|
|
583
583
|
function zt(e, t) {
|
|
584
584
|
var n = Fe(e.type, t, e.ref, e._self, e._source, e._owner, e.props);
|
|
@@ -587,9 +587,9 @@ function vn() {
|
|
|
587
587
|
function qt(e, t, n) {
|
|
588
588
|
if (e == null)
|
|
589
589
|
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
|
|
590
|
-
var o, u = s({}, e.props),
|
|
590
|
+
var o, u = s({}, e.props), p = e.key, l = e.ref, m = e._self, v = e._source, w = e._owner;
|
|
591
591
|
if (t != null) {
|
|
592
|
-
Ze(t) && (l = t.ref, w = z.current), Qe(t) && (Ce(t.key),
|
|
592
|
+
Ze(t) && (l = t.ref, w = z.current), Qe(t) && (Ce(t.key), p = "" + t.key);
|
|
593
593
|
var R;
|
|
594
594
|
e.type && e.type.defaultProps && (R = e.type.defaultProps);
|
|
595
595
|
for (o in t)
|
|
@@ -603,10 +603,10 @@ function vn() {
|
|
|
603
603
|
T[A] = arguments[A + 2];
|
|
604
604
|
u.children = T;
|
|
605
605
|
}
|
|
606
|
-
return Fe(e.type,
|
|
606
|
+
return Fe(e.type, p, l, m, v, w, u);
|
|
607
607
|
}
|
|
608
608
|
function ue(e) {
|
|
609
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
609
|
+
return typeof e == "object" && e !== null && e.$$typeof === y;
|
|
610
610
|
}
|
|
611
611
|
var Xe = ".", Yt = ":";
|
|
612
612
|
function Ht(e) {
|
|
@@ -626,37 +626,37 @@ function vn() {
|
|
|
626
626
|
return typeof e == "object" && e !== null && e.key != null ? (Ce(e.key), Ht("" + e.key)) : t.toString(36);
|
|
627
627
|
}
|
|
628
628
|
function Re(e, t, n, o, u) {
|
|
629
|
-
var
|
|
630
|
-
(
|
|
629
|
+
var p = typeof e;
|
|
630
|
+
(p === "undefined" || p === "boolean") && (e = null);
|
|
631
631
|
var l = !1;
|
|
632
632
|
if (e === null)
|
|
633
633
|
l = !0;
|
|
634
634
|
else
|
|
635
|
-
switch (
|
|
635
|
+
switch (p) {
|
|
636
636
|
case "string":
|
|
637
637
|
case "number":
|
|
638
638
|
l = !0;
|
|
639
639
|
break;
|
|
640
640
|
case "object":
|
|
641
641
|
switch (e.$$typeof) {
|
|
642
|
-
case
|
|
642
|
+
case y:
|
|
643
643
|
case g:
|
|
644
644
|
l = !0;
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
647
|
if (l) {
|
|
648
|
-
var
|
|
648
|
+
var m = e, v = u(m), w = o === "" ? Xe + $e(m, 0) : o;
|
|
649
649
|
if (we(v)) {
|
|
650
650
|
var R = "";
|
|
651
651
|
w != null && (R = tt(w) + "/"), Re(v, t, R, "", function(Lr) {
|
|
652
652
|
return Lr;
|
|
653
653
|
});
|
|
654
|
-
} else v != null && (ue(v) && (v.key && (!
|
|
654
|
+
} else v != null && (ue(v) && (v.key && (!m || m.key !== v.key) && Ce(v.key), v = zt(
|
|
655
655
|
v,
|
|
656
656
|
// Keep both the (mapped) and old keys if they differ, just as
|
|
657
657
|
// traverseAllChildren used to do for objects as children
|
|
658
658
|
n + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
|
659
|
-
(v.key && (!
|
|
659
|
+
(v.key && (!m || m.key !== v.key) ? (
|
|
660
660
|
// $FlowFixMe Flow incorrectly thinks existing element's key can be a number
|
|
661
661
|
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
662
662
|
tt("" + v.key) + "/"
|
|
@@ -675,7 +675,7 @@ function vn() {
|
|
|
675
675
|
He === kt.entries && (et || X("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), et = !0);
|
|
676
676
|
for (var $r = He.call(kt), Ot, xr = 0; !(Ot = $r.next()).done; )
|
|
677
677
|
S = Ot.value, T = x + $e(S, xr++), A += Re(S, t, n, T, u);
|
|
678
|
-
} else if (
|
|
678
|
+
} else if (p === "object") {
|
|
679
679
|
var Tt = String(e);
|
|
680
680
|
throw new Error("Objects are not valid as a React child (found: " + (Tt === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : Tt) + "). If you meant to render a collection of children, use an array instead.");
|
|
681
681
|
}
|
|
@@ -686,8 +686,8 @@ function vn() {
|
|
|
686
686
|
if (e == null)
|
|
687
687
|
return e;
|
|
688
688
|
var o = [], u = 0;
|
|
689
|
-
return Re(e, o, "", "", function(
|
|
690
|
-
return t.call(n,
|
|
689
|
+
return Re(e, o, "", "", function(p) {
|
|
690
|
+
return t.call(n, p, u++);
|
|
691
691
|
}), o;
|
|
692
692
|
}
|
|
693
693
|
function Bt(e) {
|
|
@@ -737,14 +737,14 @@ function vn() {
|
|
|
737
737
|
};
|
|
738
738
|
var n = !1, o = !1, u = !1;
|
|
739
739
|
{
|
|
740
|
-
var
|
|
740
|
+
var p = {
|
|
741
741
|
$$typeof: q,
|
|
742
742
|
_context: t
|
|
743
743
|
};
|
|
744
|
-
Object.defineProperties(
|
|
744
|
+
Object.defineProperties(p, {
|
|
745
745
|
Provider: {
|
|
746
746
|
get: function() {
|
|
747
|
-
return o || (o = !0,
|
|
747
|
+
return o || (o = !0, d("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), t.Provider;
|
|
748
748
|
},
|
|
749
749
|
set: function(l) {
|
|
750
750
|
t.Provider = l;
|
|
@@ -776,7 +776,7 @@ function vn() {
|
|
|
776
776
|
},
|
|
777
777
|
Consumer: {
|
|
778
778
|
get: function() {
|
|
779
|
-
return n || (n = !0,
|
|
779
|
+
return n || (n = !0, d("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), t.Consumer;
|
|
780
780
|
}
|
|
781
781
|
},
|
|
782
782
|
displayName: {
|
|
@@ -787,7 +787,7 @@ function vn() {
|
|
|
787
787
|
u || (X("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", l), u = !0);
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
}), t.Consumer =
|
|
790
|
+
}), t.Consumer = p;
|
|
791
791
|
}
|
|
792
792
|
return t._currentRenderer = null, t._currentRenderer2 = null, t;
|
|
793
793
|
}
|
|
@@ -795,15 +795,15 @@ function vn() {
|
|
|
795
795
|
function Xt(e) {
|
|
796
796
|
if (e._status === me) {
|
|
797
797
|
var t = e._result, n = t();
|
|
798
|
-
if (n.then(function(
|
|
798
|
+
if (n.then(function(p) {
|
|
799
799
|
if (e._status === xe || e._status === me) {
|
|
800
800
|
var l = e;
|
|
801
|
-
l._status = rt, l._result =
|
|
801
|
+
l._status = rt, l._result = p;
|
|
802
802
|
}
|
|
803
|
-
}, function(
|
|
803
|
+
}, function(p) {
|
|
804
804
|
if (e._status === xe || e._status === me) {
|
|
805
805
|
var l = e;
|
|
806
|
-
l._status = Qt, l._result =
|
|
806
|
+
l._status = Qt, l._result = p;
|
|
807
807
|
}
|
|
808
808
|
}), e._status === me) {
|
|
809
809
|
var o = e;
|
|
@@ -812,12 +812,12 @@ function vn() {
|
|
|
812
812
|
}
|
|
813
813
|
if (e._status === rt) {
|
|
814
814
|
var u = e._result;
|
|
815
|
-
return u === void 0 &&
|
|
815
|
+
return u === void 0 && d(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
816
816
|
|
|
817
817
|
Your code should look like:
|
|
818
818
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
819
819
|
|
|
820
|
-
Did you accidentally put curly braces around the import?`, u), "default" in u ||
|
|
820
|
+
Did you accidentally put curly braces around the import?`, u), "default" in u || d(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
821
821
|
|
|
822
822
|
Your code should look like:
|
|
823
823
|
const MyComponent = lazy(() => import('./MyComponent'))`, u), u.default;
|
|
@@ -842,8 +842,8 @@ Your code should look like:
|
|
|
842
842
|
get: function() {
|
|
843
843
|
return o;
|
|
844
844
|
},
|
|
845
|
-
set: function(
|
|
846
|
-
|
|
845
|
+
set: function(p) {
|
|
846
|
+
d("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), o = p, Object.defineProperty(n, "defaultProps", {
|
|
847
847
|
enumerable: !0
|
|
848
848
|
});
|
|
849
849
|
}
|
|
@@ -853,8 +853,8 @@ Your code should look like:
|
|
|
853
853
|
get: function() {
|
|
854
854
|
return u;
|
|
855
855
|
},
|
|
856
|
-
set: function(
|
|
857
|
-
|
|
856
|
+
set: function(p) {
|
|
857
|
+
d("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), u = p, Object.defineProperty(n, "propTypes", {
|
|
858
858
|
enumerable: !0
|
|
859
859
|
});
|
|
860
860
|
}
|
|
@@ -864,7 +864,7 @@ Your code should look like:
|
|
|
864
864
|
return n;
|
|
865
865
|
}
|
|
866
866
|
function tr(e) {
|
|
867
|
-
e != null && e.$$typeof === Y ?
|
|
867
|
+
e != null && e.$$typeof === Y ? d("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? d("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && d("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), e != null && (e.defaultProps != null || e.propTypes != null) && d("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
868
868
|
var t = {
|
|
869
869
|
$$typeof: V,
|
|
870
870
|
render: e
|
|
@@ -894,7 +894,7 @@ Your code should look like:
|
|
|
894
894
|
e.$$typeof === nt || e.getModuleId !== void 0));
|
|
895
895
|
}
|
|
896
896
|
function rr(e, t) {
|
|
897
|
-
ot(e) ||
|
|
897
|
+
ot(e) || d("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
|
|
898
898
|
var n = {
|
|
899
899
|
$$typeof: Y,
|
|
900
900
|
type: e,
|
|
@@ -917,7 +917,7 @@ Your code should look like:
|
|
|
917
917
|
}
|
|
918
918
|
function N() {
|
|
919
919
|
var e = ae.current;
|
|
920
|
-
return e === null &&
|
|
920
|
+
return e === null && d(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
921
921
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
922
922
|
2. You might be breaking the Rules of Hooks
|
|
923
923
|
3. You might have more than one copy of React in the same app
|
|
@@ -927,7 +927,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
927
927
|
var t = N();
|
|
928
928
|
if (e._context !== void 0) {
|
|
929
929
|
var n = e._context;
|
|
930
|
-
n.Consumer === e ?
|
|
930
|
+
n.Consumer === e ? d("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : n.Provider === e && d("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
|
|
931
931
|
}
|
|
932
932
|
return t.useContext(e);
|
|
933
933
|
}
|
|
@@ -1048,7 +1048,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1048
1048
|
})
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
|
-
he < 0 &&
|
|
1051
|
+
he < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
1054
|
var Le = H.ReactCurrentDispatcher, Ne;
|
|
@@ -1082,8 +1082,8 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1082
1082
|
Ue = !0;
|
|
1083
1083
|
var u = Error.prepareStackTrace;
|
|
1084
1084
|
Error.prepareStackTrace = void 0;
|
|
1085
|
-
var
|
|
1086
|
-
|
|
1085
|
+
var p;
|
|
1086
|
+
p = Le.current, Le.current = null, gr();
|
|
1087
1087
|
try {
|
|
1088
1088
|
if (t) {
|
|
1089
1089
|
var l = function() {
|
|
@@ -1118,17 +1118,17 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1118
1118
|
}
|
|
1119
1119
|
} catch (x) {
|
|
1120
1120
|
if (x && o && typeof x.stack == "string") {
|
|
1121
|
-
for (var
|
|
1121
|
+
for (var m = x.stack.split(`
|
|
1122
1122
|
`), v = o.stack.split(`
|
|
1123
|
-
`), w =
|
|
1123
|
+
`), w = m.length - 1, R = v.length - 1; w >= 1 && R >= 0 && m[w] !== v[R]; )
|
|
1124
1124
|
R--;
|
|
1125
1125
|
for (; w >= 1 && R >= 0; w--, R--)
|
|
1126
|
-
if (
|
|
1126
|
+
if (m[w] !== v[R]) {
|
|
1127
1127
|
if (w !== 1 || R !== 1)
|
|
1128
1128
|
do
|
|
1129
|
-
if (w--, R--, R < 0 ||
|
|
1129
|
+
if (w--, R--, R < 0 || m[w] !== v[R]) {
|
|
1130
1130
|
var S = `
|
|
1131
|
-
` +
|
|
1131
|
+
` + m[w].replace(" at new ", " at ");
|
|
1132
1132
|
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && Oe.set(e, S), S;
|
|
1133
1133
|
}
|
|
1134
1134
|
while (w >= 1 && R >= 0);
|
|
@@ -1136,7 +1136,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
1138
|
} finally {
|
|
1139
|
-
Ue = !1, Le.current =
|
|
1139
|
+
Ue = !1, Le.current = p, _r(), Error.prepareStackTrace = u;
|
|
1140
1140
|
}
|
|
1141
1141
|
var T = e ? e.displayName || e.name : "", A = T ? ke(T) : "";
|
|
1142
1142
|
return typeof e == "function" && Oe.set(e, A), A;
|
|
@@ -1168,9 +1168,9 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1168
1168
|
case Y:
|
|
1169
1169
|
return Te(e.type, t, n);
|
|
1170
1170
|
case Z: {
|
|
1171
|
-
var o = e, u = o._payload,
|
|
1171
|
+
var o = e, u = o._payload, p = o._init;
|
|
1172
1172
|
try {
|
|
1173
|
-
return Te(
|
|
1173
|
+
return Te(p(u), t, n);
|
|
1174
1174
|
} catch {
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
@@ -1187,20 +1187,20 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1187
1187
|
}
|
|
1188
1188
|
function Cr(e, t, n, o, u) {
|
|
1189
1189
|
{
|
|
1190
|
-
var
|
|
1190
|
+
var p = Function.call.bind(ye);
|
|
1191
1191
|
for (var l in e)
|
|
1192
|
-
if (
|
|
1193
|
-
var
|
|
1192
|
+
if (p(e, l)) {
|
|
1193
|
+
var m = void 0;
|
|
1194
1194
|
try {
|
|
1195
1195
|
if (typeof e[l] != "function") {
|
|
1196
1196
|
var v = Error((o || "React class") + ": " + n + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1197
1197
|
throw v.name = "Invariant Violation", v;
|
|
1198
1198
|
}
|
|
1199
|
-
|
|
1199
|
+
m = e[l](t, l, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1200
1200
|
} catch (w) {
|
|
1201
|
-
|
|
1201
|
+
m = w;
|
|
1202
1202
|
}
|
|
1203
|
-
|
|
1203
|
+
m && !(m instanceof Error) && (Pe(u), d("%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).", o || "React class", n, l, typeof m), Pe(null)), m instanceof Error && !(m.message in yt) && (yt[m.message] = !0, Pe(u), d("Failed %s type: %s", n, m.message), Pe(null));
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
}
|
|
@@ -1253,7 +1253,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1253
1253
|
if (!vt[n]) {
|
|
1254
1254
|
vt[n] = !0;
|
|
1255
1255
|
var o = "";
|
|
1256
|
-
e && e._owner && e._owner !== z.current && (o = " It was passed a child from " + ee(e._owner.type) + "."), ce(e),
|
|
1256
|
+
e && e._owner && e._owner !== z.current && (o = " It was passed a child from " + ee(e._owner.type) + "."), ce(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), ce(null);
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
@@ -1269,7 +1269,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1269
1269
|
else if (e) {
|
|
1270
1270
|
var u = oe(e);
|
|
1271
1271
|
if (typeof u == "function" && u !== e.entries)
|
|
1272
|
-
for (var
|
|
1272
|
+
for (var p = u.call(e), l; !(l = p.next()).done; )
|
|
1273
1273
|
ue(l.value) && gt(l.value, t);
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
@@ -1294,9 +1294,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1294
1294
|
} else if (t.PropTypes !== void 0 && !Ve) {
|
|
1295
1295
|
Ve = !0;
|
|
1296
1296
|
var u = ee(t);
|
|
1297
|
-
|
|
1297
|
+
d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
1298
1298
|
}
|
|
1299
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved &&
|
|
1299
|
+
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
1302
|
function Or(e) {
|
|
@@ -1304,11 +1304,11 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1304
1304
|
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
1305
1305
|
var o = t[n];
|
|
1306
1306
|
if (o !== "children" && o !== "key") {
|
|
1307
|
-
ce(e),
|
|
1307
|
+
ce(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), ce(null);
|
|
1308
1308
|
break;
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
|
-
e.ref !== null && (ce(e),
|
|
1311
|
+
e.ref !== null && (ce(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), ce(null));
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
function Et(e, t, n) {
|
|
@@ -1316,18 +1316,18 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1316
1316
|
if (!o) {
|
|
1317
1317
|
var u = "";
|
|
1318
1318
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
1319
|
-
var
|
|
1320
|
-
|
|
1319
|
+
var p = Sr(t);
|
|
1320
|
+
p ? u += p : u += ht();
|
|
1321
1321
|
var l;
|
|
1322
|
-
e === null ? l = "null" : we(e) ? l = "array" : e !== void 0 && e.$$typeof ===
|
|
1322
|
+
e === null ? l = "null" : we(e) ? l = "array" : e !== void 0 && e.$$typeof === y ? (l = "<" + (ee(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, d("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, u);
|
|
1323
1323
|
}
|
|
1324
|
-
var
|
|
1325
|
-
if (
|
|
1326
|
-
return
|
|
1324
|
+
var m = Vt.apply(this, arguments);
|
|
1325
|
+
if (m == null)
|
|
1326
|
+
return m;
|
|
1327
1327
|
if (o)
|
|
1328
1328
|
for (var v = 2; v < arguments.length; v++)
|
|
1329
1329
|
_t(arguments[v], e);
|
|
1330
|
-
return e === b ? Or(
|
|
1330
|
+
return e === b ? Or(m) : bt(m), m;
|
|
1331
1331
|
}
|
|
1332
1332
|
var wt = !1;
|
|
1333
1333
|
function Tr(e) {
|
|
@@ -1368,9 +1368,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1368
1368
|
Ie = n.call(c, "timers").setImmediate;
|
|
1369
1369
|
} catch {
|
|
1370
1370
|
Ie = function(u) {
|
|
1371
|
-
Ct === !1 && (Ct = !0, typeof MessageChannel > "u" &&
|
|
1372
|
-
var
|
|
1373
|
-
|
|
1371
|
+
Ct === !1 && (Ct = !0, typeof MessageChannel > "u" && d("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
1372
|
+
var p = new MessageChannel();
|
|
1373
|
+
p.port1.onmessage = u, p.port2.postMessage(void 0);
|
|
1374
1374
|
};
|
|
1375
1375
|
}
|
|
1376
1376
|
return Ie(e);
|
|
@@ -1392,9 +1392,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1392
1392
|
F.isBatchingLegacy = n;
|
|
1393
1393
|
}
|
|
1394
1394
|
if (o !== null && typeof o == "object" && typeof o.then == "function") {
|
|
1395
|
-
var
|
|
1395
|
+
var p = o, l = !1, m = {
|
|
1396
1396
|
then: function(T, A) {
|
|
1397
|
-
l = !0,
|
|
1397
|
+
l = !0, p.then(function(x) {
|
|
1398
1398
|
je(t), le === 0 ? ze(x, T, A) : T(x);
|
|
1399
1399
|
}, function(x) {
|
|
1400
1400
|
je(t), A(x);
|
|
@@ -1403,8 +1403,8 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1403
1403
|
};
|
|
1404
1404
|
return !Rt && typeof Promise < "u" && Promise.resolve().then(function() {
|
|
1405
1405
|
}).then(function() {
|
|
1406
|
-
l || (Rt = !0,
|
|
1407
|
-
}),
|
|
1406
|
+
l || (Rt = !0, d("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
1407
|
+
}), m;
|
|
1408
1408
|
} else {
|
|
1409
1409
|
var v = o;
|
|
1410
1410
|
if (je(t), le === 0) {
|
|
@@ -1428,7 +1428,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1428
1428
|
}
|
|
1429
1429
|
}
|
|
1430
1430
|
function je(e) {
|
|
1431
|
-
e !== le - 1 &&
|
|
1431
|
+
e !== le - 1 && d("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), le = e;
|
|
1432
1432
|
}
|
|
1433
1433
|
function ze(e, t, n) {
|
|
1434
1434
|
{
|
|
@@ -1472,14 +1472,14 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1472
1472
|
toArray: Gt,
|
|
1473
1473
|
only: Jt
|
|
1474
1474
|
};
|
|
1475
|
-
a.Children = Fr, a.Component = _, a.Fragment = b, a.Profiler = P, a.PureComponent = C, a.StrictMode = I, a.Suspense = U, a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = H, a.act = St, a.cloneElement = Mr, a.createContext = Zt, a.createElement = Ar, a.createFactory = Dr, a.createRef = Mt, a.forwardRef = tr, a.isValidElement = ue, a.lazy = er, a.memo = rr, a.startTransition = Ir, a.unstable_act = St, a.useCallback = lr, a.useContext = nr, a.useDebugValue = pr, a.useDeferredValue = mr, a.useEffect = sr, a.useId = hr, a.useImperativeHandle = dr, a.useInsertionEffect = ur, a.useLayoutEffect = cr, a.useMemo = fr, a.useReducer = ar, a.useRef = ir, a.useState = or, a.useSyncExternalStore = vr, a.useTransition = yr, a.version =
|
|
1475
|
+
a.Children = Fr, a.Component = _, a.Fragment = b, a.Profiler = P, a.PureComponent = C, a.StrictMode = I, a.Suspense = U, a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = H, a.act = St, a.cloneElement = Mr, a.createContext = Zt, a.createElement = Ar, a.createFactory = Dr, a.createRef = Mt, a.forwardRef = tr, a.isValidElement = ue, a.lazy = er, a.memo = rr, a.startTransition = Ir, a.unstable_act = St, a.useCallback = lr, a.useContext = nr, a.useDebugValue = pr, a.useDeferredValue = mr, a.useEffect = sr, a.useId = hr, a.useImperativeHandle = dr, a.useInsertionEffect = ur, a.useLayoutEffect = cr, a.useMemo = fr, a.useReducer = ar, a.useRef = ir, a.useState = or, a.useSyncExternalStore = vr, a.useTransition = yr, a.version = f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
1476
1476
|
}();
|
|
1477
1477
|
}(Pt, Pt.exports)), Pt.exports;
|
|
1478
1478
|
}
|
|
1479
1479
|
process.env.NODE_ENV === "production" ? Nr.exports = hn() : Nr.exports = vn();
|
|
1480
1480
|
var gn = Nr.exports, _n = gn;
|
|
1481
|
-
function Xr(c, a,
|
|
1482
|
-
var
|
|
1481
|
+
function Xr(c, a, f) {
|
|
1482
|
+
var y = typeof a == "function";
|
|
1483
1483
|
_n.useEffect(function() {
|
|
1484
1484
|
var g, b = !0, I = c(function() {
|
|
1485
1485
|
return b;
|
|
@@ -1487,9 +1487,9 @@ function Xr(c, a, p) {
|
|
|
1487
1487
|
return Promise.resolve(I).then(function(P) {
|
|
1488
1488
|
g = P;
|
|
1489
1489
|
}), function() {
|
|
1490
|
-
b = !1,
|
|
1490
|
+
b = !1, y && a(g);
|
|
1491
1491
|
};
|
|
1492
|
-
},
|
|
1492
|
+
}, y ? f : a);
|
|
1493
1493
|
}
|
|
1494
1494
|
Qr.exports = Xr;
|
|
1495
1495
|
Qr.exports.useAsyncEffect = Xr;
|
|
@@ -1582,7 +1582,8 @@ const J = i.enum([
|
|
|
1582
1582
|
"START_PAYMENT_FLOW"
|
|
1583
1583
|
]), In = J.extract(["TOKENIZE_STARTED", "CHECKOUT_STARTED"]), jn = i.object({ type: In }), An = J.extract(["BLUR", "FOCUS", "CHANGE"]), Mn = i.object({
|
|
1584
1584
|
type: An,
|
|
1585
|
-
elementType: nn
|
|
1585
|
+
elementType: nn,
|
|
1586
|
+
errors: i.array(i.string()).optional()
|
|
1586
1587
|
}), Dn = J.extract(["LOAD_ERROR", "TOKENIZE_ERROR", "CHECKOUT_ERROR"]), Fn = i.object({
|
|
1587
1588
|
type: Dn,
|
|
1588
1589
|
message: fe
|
|
@@ -1663,10 +1664,10 @@ const Kn = i.object({
|
|
|
1663
1664
|
payment_methods: i.array(Pn)
|
|
1664
1665
|
}), Gn = (c) => {
|
|
1665
1666
|
const a = {};
|
|
1666
|
-
return Object.entries(c).forEach(([
|
|
1667
|
+
return Object.entries(c).forEach(([f, y]) => {
|
|
1667
1668
|
try {
|
|
1668
|
-
const g = tn.parse(
|
|
1669
|
-
Array.isArray(
|
|
1669
|
+
const g = tn.parse(f);
|
|
1670
|
+
Array.isArray(y) ? a[g] = y : Array.isArray(y._errors) && (a[g] = y._errors);
|
|
1670
1671
|
} catch {
|
|
1671
1672
|
return;
|
|
1672
1673
|
}
|
|
@@ -1680,8 +1681,8 @@ const Kn = i.object({
|
|
|
1680
1681
|
if (!Wr())
|
|
1681
1682
|
throw new Error("Stripe JS not found.");
|
|
1682
1683
|
return new Stripe(c);
|
|
1683
|
-
}, sn = async (c, a,
|
|
1684
|
-
const g = await zr(c), b = Jn[
|
|
1684
|
+
}, sn = async (c, a, f, y) => {
|
|
1685
|
+
const g = await zr(c), b = Jn[f.toLowerCase().trim()];
|
|
1685
1686
|
return g.paymentRequest({
|
|
1686
1687
|
// TODO: replace this with stripe account country as soon as we support it
|
|
1687
1688
|
country: "US",
|
|
@@ -1689,22 +1690,22 @@ const Kn = i.object({
|
|
|
1689
1690
|
total: {
|
|
1690
1691
|
label: "Total",
|
|
1691
1692
|
amount: a,
|
|
1692
|
-
pending:
|
|
1693
|
+
pending: y
|
|
1693
1694
|
},
|
|
1694
1695
|
requestPayerName: !0,
|
|
1695
1696
|
requestPayerEmail: !0
|
|
1696
1697
|
});
|
|
1697
1698
|
}, Zn = (c) => new Promise((a) => {
|
|
1698
1699
|
setTimeout(a, c);
|
|
1699
|
-
}), Wr = () => "Stripe" in window, Qn = async (c) => new Promise((a,
|
|
1700
|
+
}), Wr = () => "Stripe" in window, Qn = async (c) => new Promise((a, f) => {
|
|
1700
1701
|
try {
|
|
1701
|
-
c.on("paymentmethod", async (
|
|
1702
|
-
a(
|
|
1702
|
+
c.on("paymentmethod", async (y) => {
|
|
1703
|
+
a(y);
|
|
1703
1704
|
}), c.on("cancel", () => {
|
|
1704
|
-
|
|
1705
|
+
f(new Error("Payment cancelled, please click Submit again to pay"));
|
|
1705
1706
|
});
|
|
1706
|
-
} catch (
|
|
1707
|
-
|
|
1707
|
+
} catch (y) {
|
|
1708
|
+
f(y);
|
|
1708
1709
|
}
|
|
1709
1710
|
}), Xn = (c) => {
|
|
1710
1711
|
const a = c == null ? void 0 : c.stripe_pk;
|
|
@@ -1712,33 +1713,33 @@ const Kn = i.object({
|
|
|
1712
1713
|
throw new Error("Invalid: stripe_pk not passed in checkout payment method");
|
|
1713
1714
|
return a;
|
|
1714
1715
|
}, eo = async (c, a) => {
|
|
1715
|
-
const
|
|
1716
|
+
const f = c.nextActionMetadata;
|
|
1716
1717
|
if (!c.paymentFlowMetadata || !c.paymentFlowMetadata.stripePmId)
|
|
1717
1718
|
throw new Error(`Invalid payment flow metadata format: ${JSON.stringify(c.paymentFlowMetadata)}`);
|
|
1718
|
-
if (!
|
|
1719
|
-
throw new Error(`Invalid next action metadata format: ${JSON.stringify(
|
|
1719
|
+
if (!f.stripe_pk || !f.client_secret)
|
|
1720
|
+
throw new Error(`Invalid next action metadata format: ${JSON.stringify(f)}`);
|
|
1720
1721
|
if (a.paymentMethod.id !== c.paymentFlowMetadata.stripePmId)
|
|
1721
1722
|
throw new Error(`PM ID mismatch: ${a.paymentMethod.id} != ${c.paymentFlowMetadata.stripePmId}`);
|
|
1722
|
-
const
|
|
1723
|
+
const y = await (await zr(f.stripe_pk)).confirmCardSetup(f.client_secret, {
|
|
1723
1724
|
payment_method: c.paymentFlowMetadata.stripePmId
|
|
1724
1725
|
});
|
|
1725
|
-
if (
|
|
1726
|
-
throw a.complete("fail"), new Error(`Payment failed: ${
|
|
1726
|
+
if (y.error)
|
|
1727
|
+
throw a.complete("fail"), new Error(`Payment failed: ${y.error.message ?? "unknown"}`);
|
|
1727
1728
|
a.complete("success");
|
|
1728
1729
|
}, to = async (c) => {
|
|
1729
|
-
var a,
|
|
1730
|
+
var a, f, y, g;
|
|
1730
1731
|
const b = c.nextActionMetadata, I = await (await zr(b.stripe_pk)).confirmCardSetup(b.client_secret, {
|
|
1731
1732
|
payment_method: b.stripe_pm_id
|
|
1732
1733
|
}), P = (a = I.setupIntent) == null ? void 0 : a.status;
|
|
1733
1734
|
if (P !== "succeeded")
|
|
1734
1735
|
throw P === "canceled" ? new Error("Payment cancelled, please click Submit again to pay") : new Error(
|
|
1735
|
-
`${((
|
|
1736
|
+
`${((f = I.error) == null ? void 0 : f.message) ?? ((g = (y = I.setupIntent) == null ? void 0 : y.last_setup_error) == null ? void 0 : g.message) ?? "Payment failed, please click submit again to pay."}`
|
|
1736
1737
|
);
|
|
1737
|
-
}, ro = (c) => JSON.stringify(c), un = (c, a) => Array.from(c.querySelectorAll("[data-opid]") ?? []).reduce((
|
|
1738
|
-
const g =
|
|
1739
|
-
return g ? { ...
|
|
1740
|
-
}, a), At = (c, a,
|
|
1741
|
-
const P = un(
|
|
1738
|
+
}, ro = (c) => JSON.stringify(c), un = (c, a) => Array.from(c.querySelectorAll("[data-opid]") ?? []).reduce((f, y) => {
|
|
1739
|
+
const g = y.getAttribute("data-opid");
|
|
1740
|
+
return g ? { ...f, [g]: y.value } : f;
|
|
1741
|
+
}, a), At = (c, a, f, y, g, b, I) => {
|
|
1742
|
+
const P = un(f, {
|
|
1742
1743
|
type: c,
|
|
1743
1744
|
sessionId: a,
|
|
1744
1745
|
checkoutPaymentMethod: g,
|
|
@@ -1752,7 +1753,7 @@ const Kn = i.object({
|
|
|
1752
1753
|
{
|
|
1753
1754
|
const q = $.error.format(), V = Gn(q);
|
|
1754
1755
|
for (const [U, G] of Object.entries(V))
|
|
1755
|
-
|
|
1756
|
+
y(U, G, U);
|
|
1756
1757
|
return null;
|
|
1757
1758
|
}
|
|
1758
1759
|
}, no = (c) => {
|
|
@@ -1761,12 +1762,12 @@ const Kn = i.object({
|
|
|
1761
1762
|
} catch (a) {
|
|
1762
1763
|
throw a;
|
|
1763
1764
|
}
|
|
1764
|
-
}, Br = (c, a,
|
|
1765
|
+
}, Br = (c, a, f, y, g) => {
|
|
1765
1766
|
const b = {
|
|
1766
|
-
payload:
|
|
1767
|
+
payload: y,
|
|
1767
1768
|
nonce: yn(),
|
|
1768
1769
|
formId: a,
|
|
1769
|
-
elementId:
|
|
1770
|
+
elementId: f
|
|
1770
1771
|
};
|
|
1771
1772
|
c.postMessage(JSON.stringify(b), g);
|
|
1772
1773
|
};
|
|
@@ -1784,7 +1785,7 @@ var Kr;
|
|
|
1784
1785
|
function oo() {
|
|
1785
1786
|
if (Kr) return D;
|
|
1786
1787
|
Kr = 1;
|
|
1787
|
-
var c = Symbol.for("react.element"), a = Symbol.for("react.portal"),
|
|
1788
|
+
var c = Symbol.for("react.element"), a = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), b = Symbol.for("react.provider"), I = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), q = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), U = Symbol.iterator;
|
|
1788
1789
|
function G(r) {
|
|
1789
1790
|
return r === null || typeof r != "object" ? null : (r = U && r[U] || r["@@iterator"], typeof r == "function" ? r : null);
|
|
1790
1791
|
}
|
|
@@ -1888,7 +1889,7 @@ function oo() {
|
|
|
1888
1889
|
if (r._status === 1) return r._result.default;
|
|
1889
1890
|
throw r._result;
|
|
1890
1891
|
}
|
|
1891
|
-
var
|
|
1892
|
+
var d = { current: null }, ne = { transition: null }, Ee = { ReactCurrentDispatcher: d, ReactCurrentBatchConfig: ne, ReactCurrentOwner: z };
|
|
1892
1893
|
function se() {
|
|
1893
1894
|
throw Error("act(...) is not supported in production builds of React.");
|
|
1894
1895
|
}
|
|
@@ -1908,7 +1909,7 @@ function oo() {
|
|
|
1908
1909
|
}, only: function(r) {
|
|
1909
1910
|
if (!de(r)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
1910
1911
|
return r;
|
|
1911
|
-
} }, D.Component = W, D.Fragment =
|
|
1912
|
+
} }, D.Component = W, D.Fragment = f, D.Profiler = g, D.PureComponent = oe, D.StrictMode = y, D.Suspense = $, D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ee, D.act = se, D.cloneElement = function(r, s, h) {
|
|
1912
1913
|
if (r == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + r + ".");
|
|
1913
1914
|
var _ = Z({}, r.props), E = r.key, j = r.ref, k = r._owner;
|
|
1914
1915
|
if (s != null) {
|
|
@@ -1945,34 +1946,34 @@ function oo() {
|
|
|
1945
1946
|
ne.transition = s;
|
|
1946
1947
|
}
|
|
1947
1948
|
}, D.unstable_act = se, D.useCallback = function(r, s) {
|
|
1948
|
-
return
|
|
1949
|
+
return d.current.useCallback(r, s);
|
|
1949
1950
|
}, D.useContext = function(r) {
|
|
1950
|
-
return
|
|
1951
|
+
return d.current.useContext(r);
|
|
1951
1952
|
}, D.useDebugValue = function() {
|
|
1952
1953
|
}, D.useDeferredValue = function(r) {
|
|
1953
|
-
return
|
|
1954
|
+
return d.current.useDeferredValue(r);
|
|
1954
1955
|
}, D.useEffect = function(r, s) {
|
|
1955
|
-
return
|
|
1956
|
+
return d.current.useEffect(r, s);
|
|
1956
1957
|
}, D.useId = function() {
|
|
1957
|
-
return
|
|
1958
|
+
return d.current.useId();
|
|
1958
1959
|
}, D.useImperativeHandle = function(r, s, h) {
|
|
1959
|
-
return
|
|
1960
|
+
return d.current.useImperativeHandle(r, s, h);
|
|
1960
1961
|
}, D.useInsertionEffect = function(r, s) {
|
|
1961
|
-
return
|
|
1962
|
+
return d.current.useInsertionEffect(r, s);
|
|
1962
1963
|
}, D.useLayoutEffect = function(r, s) {
|
|
1963
|
-
return
|
|
1964
|
+
return d.current.useLayoutEffect(r, s);
|
|
1964
1965
|
}, D.useMemo = function(r, s) {
|
|
1965
|
-
return
|
|
1966
|
+
return d.current.useMemo(r, s);
|
|
1966
1967
|
}, D.useReducer = function(r, s, h) {
|
|
1967
|
-
return
|
|
1968
|
+
return d.current.useReducer(r, s, h);
|
|
1968
1969
|
}, D.useRef = function(r) {
|
|
1969
|
-
return
|
|
1970
|
+
return d.current.useRef(r);
|
|
1970
1971
|
}, D.useState = function(r) {
|
|
1971
|
-
return
|
|
1972
|
+
return d.current.useState(r);
|
|
1972
1973
|
}, D.useSyncExternalStore = function(r, s, h) {
|
|
1973
|
-
return
|
|
1974
|
+
return d.current.useSyncExternalStore(r, s, h);
|
|
1974
1975
|
}, D.useTransition = function() {
|
|
1975
|
-
return
|
|
1976
|
+
return d.current.useTransition();
|
|
1976
1977
|
}, D.version = "18.3.1", D;
|
|
1977
1978
|
}
|
|
1978
1979
|
var jt = { exports: {} };
|
|
@@ -1991,7 +1992,7 @@ function ao() {
|
|
|
1991
1992
|
return Gr || (Gr = 1, function(c, a) {
|
|
1992
1993
|
process.env.NODE_ENV !== "production" && function() {
|
|
1993
1994
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
1994
|
-
var
|
|
1995
|
+
var f = "18.3.1", y = Symbol.for("react.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), $ = Symbol.for("react.provider"), q = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), Y = Symbol.for("react.memo"), Z = Symbol.for("react.lazy"), ve = Symbol.for("react.offscreen"), W = Symbol.iterator, ge = "@@iterator";
|
|
1995
1996
|
function oe(e) {
|
|
1996
1997
|
if (e === null || typeof e != "object")
|
|
1997
1998
|
return null;
|
|
@@ -2042,7 +2043,7 @@ function ao() {
|
|
|
2042
2043
|
ne("warn", e, n);
|
|
2043
2044
|
}
|
|
2044
2045
|
}
|
|
2045
|
-
function
|
|
2046
|
+
function d(e) {
|
|
2046
2047
|
{
|
|
2047
2048
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
|
|
2048
2049
|
n[o - 1] = arguments[o];
|
|
@@ -2053,10 +2054,10 @@ function ao() {
|
|
|
2053
2054
|
{
|
|
2054
2055
|
var o = H.ReactDebugCurrentFrame, u = o.getStackAddendum();
|
|
2055
2056
|
u !== "" && (t += "%s", n = n.concat([u]));
|
|
2056
|
-
var
|
|
2057
|
+
var p = n.map(function(l) {
|
|
2057
2058
|
return String(l);
|
|
2058
2059
|
});
|
|
2059
|
-
|
|
2060
|
+
p.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, p);
|
|
2060
2061
|
}
|
|
2061
2062
|
}
|
|
2062
2063
|
var Ee = {};
|
|
@@ -2065,7 +2066,7 @@ function ao() {
|
|
|
2065
2066
|
var n = e.constructor, o = n && (n.displayName || n.name) || "ReactClass", u = o + "." + t;
|
|
2066
2067
|
if (Ee[u])
|
|
2067
2068
|
return;
|
|
2068
|
-
|
|
2069
|
+
d("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", t, o), Ee[u] = !0;
|
|
2069
2070
|
}
|
|
2070
2071
|
}
|
|
2071
2072
|
var r = {
|
|
@@ -2190,7 +2191,7 @@ function ao() {
|
|
|
2190
2191
|
}
|
|
2191
2192
|
function Ce(e) {
|
|
2192
2193
|
if ($t(e))
|
|
2193
|
-
return
|
|
2194
|
+
return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ft(e)), We(e);
|
|
2194
2195
|
}
|
|
2195
2196
|
function xt(e, t, n) {
|
|
2196
2197
|
var o = e.displayName;
|
|
@@ -2205,7 +2206,7 @@ function ao() {
|
|
|
2205
2206
|
function ee(e) {
|
|
2206
2207
|
if (e == null)
|
|
2207
2208
|
return null;
|
|
2208
|
-
if (typeof e.tag == "number" &&
|
|
2209
|
+
if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
2209
2210
|
return e.displayName || e.name || null;
|
|
2210
2211
|
if (typeof e == "string")
|
|
2211
2212
|
return e;
|
|
@@ -2237,9 +2238,9 @@ function ao() {
|
|
|
2237
2238
|
var o = e.displayName || null;
|
|
2238
2239
|
return o !== null ? o : ee(e.type) || "Memo";
|
|
2239
2240
|
case Z: {
|
|
2240
|
-
var u = e,
|
|
2241
|
+
var u = e, p = u._payload, l = u._init;
|
|
2241
2242
|
try {
|
|
2242
|
-
return ee(l(
|
|
2243
|
+
return ee(l(p));
|
|
2243
2244
|
} catch {
|
|
2244
2245
|
return null;
|
|
2245
2246
|
}
|
|
@@ -2272,7 +2273,7 @@ function ao() {
|
|
|
2272
2273
|
}
|
|
2273
2274
|
function Lt(e, t) {
|
|
2274
2275
|
var n = function() {
|
|
2275
|
-
Ge || (Ge = !0,
|
|
2276
|
+
Ge || (Ge = !0, d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
2276
2277
|
};
|
|
2277
2278
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
2278
2279
|
get: n,
|
|
@@ -2281,7 +2282,7 @@ function ao() {
|
|
|
2281
2282
|
}
|
|
2282
2283
|
function Nt(e, t) {
|
|
2283
2284
|
var n = function() {
|
|
2284
|
-
Je || (Je = !0,
|
|
2285
|
+
Je || (Je = !0, d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
2285
2286
|
};
|
|
2286
2287
|
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
2287
2288
|
get: n,
|
|
@@ -2291,42 +2292,42 @@ function ao() {
|
|
|
2291
2292
|
function Ut(e) {
|
|
2292
2293
|
if (typeof e.ref == "string" && z.current && e.__self && z.current.stateNode !== e.__self) {
|
|
2293
2294
|
var t = ee(z.current.type);
|
|
2294
|
-
De[t] || (
|
|
2295
|
+
De[t] || (d('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', t, e.ref), De[t] = !0);
|
|
2295
2296
|
}
|
|
2296
2297
|
}
|
|
2297
|
-
var Fe = function(e, t, n, o, u,
|
|
2298
|
-
var
|
|
2298
|
+
var Fe = function(e, t, n, o, u, p, l) {
|
|
2299
|
+
var m = {
|
|
2299
2300
|
// This tag allows us to uniquely identify this as a React Element
|
|
2300
|
-
$$typeof:
|
|
2301
|
+
$$typeof: y,
|
|
2301
2302
|
// Built-in properties that belong on the element
|
|
2302
2303
|
type: e,
|
|
2303
2304
|
key: t,
|
|
2304
2305
|
ref: n,
|
|
2305
2306
|
props: l,
|
|
2306
2307
|
// Record the component responsible for creating this element.
|
|
2307
|
-
_owner:
|
|
2308
|
+
_owner: p
|
|
2308
2309
|
};
|
|
2309
|
-
return
|
|
2310
|
+
return m._store = {}, Object.defineProperty(m._store, "validated", {
|
|
2310
2311
|
configurable: !1,
|
|
2311
2312
|
enumerable: !1,
|
|
2312
2313
|
writable: !0,
|
|
2313
2314
|
value: !1
|
|
2314
|
-
}), Object.defineProperty(
|
|
2315
|
+
}), Object.defineProperty(m, "_self", {
|
|
2315
2316
|
configurable: !1,
|
|
2316
2317
|
enumerable: !1,
|
|
2317
2318
|
writable: !1,
|
|
2318
2319
|
value: o
|
|
2319
|
-
}), Object.defineProperty(
|
|
2320
|
+
}), Object.defineProperty(m, "_source", {
|
|
2320
2321
|
configurable: !1,
|
|
2321
2322
|
enumerable: !1,
|
|
2322
2323
|
writable: !1,
|
|
2323
2324
|
value: u
|
|
2324
|
-
}), Object.freeze && (Object.freeze(
|
|
2325
|
+
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
2325
2326
|
};
|
|
2326
2327
|
function Vt(e, t, n) {
|
|
2327
|
-
var o, u = {},
|
|
2328
|
+
var o, u = {}, p = null, l = null, m = null, v = null;
|
|
2328
2329
|
if (t != null) {
|
|
2329
|
-
Ze(t) && (l = t.ref, Ut(t)), Qe(t) && (Ce(t.key),
|
|
2330
|
+
Ze(t) && (l = t.ref, Ut(t)), Qe(t) && (Ce(t.key), p = "" + t.key), m = t.__self === void 0 ? null : t.__self, v = t.__source === void 0 ? null : t.__source;
|
|
2330
2331
|
for (o in t)
|
|
2331
2332
|
ye.call(t, o) && !Ke.hasOwnProperty(o) && (u[o] = t[o]);
|
|
2332
2333
|
}
|
|
@@ -2343,11 +2344,11 @@ function ao() {
|
|
|
2343
2344
|
for (o in T)
|
|
2344
2345
|
u[o] === void 0 && (u[o] = T[o]);
|
|
2345
2346
|
}
|
|
2346
|
-
if (
|
|
2347
|
+
if (p || l) {
|
|
2347
2348
|
var A = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
2348
|
-
|
|
2349
|
+
p && Lt(u, A), l && Nt(u, A);
|
|
2349
2350
|
}
|
|
2350
|
-
return Fe(e,
|
|
2351
|
+
return Fe(e, p, l, m, v, z.current, u);
|
|
2351
2352
|
}
|
|
2352
2353
|
function zt(e, t) {
|
|
2353
2354
|
var n = Fe(e.type, t, e.ref, e._self, e._source, e._owner, e.props);
|
|
@@ -2356,9 +2357,9 @@ function ao() {
|
|
|
2356
2357
|
function qt(e, t, n) {
|
|
2357
2358
|
if (e == null)
|
|
2358
2359
|
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
|
|
2359
|
-
var o, u = s({}, e.props),
|
|
2360
|
+
var o, u = s({}, e.props), p = e.key, l = e.ref, m = e._self, v = e._source, w = e._owner;
|
|
2360
2361
|
if (t != null) {
|
|
2361
|
-
Ze(t) && (l = t.ref, w = z.current), Qe(t) && (Ce(t.key),
|
|
2362
|
+
Ze(t) && (l = t.ref, w = z.current), Qe(t) && (Ce(t.key), p = "" + t.key);
|
|
2362
2363
|
var R;
|
|
2363
2364
|
e.type && e.type.defaultProps && (R = e.type.defaultProps);
|
|
2364
2365
|
for (o in t)
|
|
@@ -2372,10 +2373,10 @@ function ao() {
|
|
|
2372
2373
|
T[A] = arguments[A + 2];
|
|
2373
2374
|
u.children = T;
|
|
2374
2375
|
}
|
|
2375
|
-
return Fe(e.type,
|
|
2376
|
+
return Fe(e.type, p, l, m, v, w, u);
|
|
2376
2377
|
}
|
|
2377
2378
|
function ue(e) {
|
|
2378
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
2379
|
+
return typeof e == "object" && e !== null && e.$$typeof === y;
|
|
2379
2380
|
}
|
|
2380
2381
|
var Xe = ".", Yt = ":";
|
|
2381
2382
|
function Ht(e) {
|
|
@@ -2395,37 +2396,37 @@ function ao() {
|
|
|
2395
2396
|
return typeof e == "object" && e !== null && e.key != null ? (Ce(e.key), Ht("" + e.key)) : t.toString(36);
|
|
2396
2397
|
}
|
|
2397
2398
|
function Re(e, t, n, o, u) {
|
|
2398
|
-
var
|
|
2399
|
-
(
|
|
2399
|
+
var p = typeof e;
|
|
2400
|
+
(p === "undefined" || p === "boolean") && (e = null);
|
|
2400
2401
|
var l = !1;
|
|
2401
2402
|
if (e === null)
|
|
2402
2403
|
l = !0;
|
|
2403
2404
|
else
|
|
2404
|
-
switch (
|
|
2405
|
+
switch (p) {
|
|
2405
2406
|
case "string":
|
|
2406
2407
|
case "number":
|
|
2407
2408
|
l = !0;
|
|
2408
2409
|
break;
|
|
2409
2410
|
case "object":
|
|
2410
2411
|
switch (e.$$typeof) {
|
|
2411
|
-
case
|
|
2412
|
+
case y:
|
|
2412
2413
|
case g:
|
|
2413
2414
|
l = !0;
|
|
2414
2415
|
}
|
|
2415
2416
|
}
|
|
2416
2417
|
if (l) {
|
|
2417
|
-
var
|
|
2418
|
+
var m = e, v = u(m), w = o === "" ? Xe + $e(m, 0) : o;
|
|
2418
2419
|
if (we(v)) {
|
|
2419
2420
|
var R = "";
|
|
2420
2421
|
w != null && (R = tt(w) + "/"), Re(v, t, R, "", function(Lr) {
|
|
2421
2422
|
return Lr;
|
|
2422
2423
|
});
|
|
2423
|
-
} else v != null && (ue(v) && (v.key && (!
|
|
2424
|
+
} else v != null && (ue(v) && (v.key && (!m || m.key !== v.key) && Ce(v.key), v = zt(
|
|
2424
2425
|
v,
|
|
2425
2426
|
// Keep both the (mapped) and old keys if they differ, just as
|
|
2426
2427
|
// traverseAllChildren used to do for objects as children
|
|
2427
2428
|
n + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
|
2428
|
-
(v.key && (!
|
|
2429
|
+
(v.key && (!m || m.key !== v.key) ? (
|
|
2429
2430
|
// $FlowFixMe Flow incorrectly thinks existing element's key can be a number
|
|
2430
2431
|
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
2431
2432
|
tt("" + v.key) + "/"
|
|
@@ -2444,7 +2445,7 @@ function ao() {
|
|
|
2444
2445
|
He === kt.entries && (et || X("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), et = !0);
|
|
2445
2446
|
for (var $r = He.call(kt), Ot, xr = 0; !(Ot = $r.next()).done; )
|
|
2446
2447
|
S = Ot.value, T = x + $e(S, xr++), A += Re(S, t, n, T, u);
|
|
2447
|
-
} else if (
|
|
2448
|
+
} else if (p === "object") {
|
|
2448
2449
|
var Tt = String(e);
|
|
2449
2450
|
throw new Error("Objects are not valid as a React child (found: " + (Tt === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : Tt) + "). If you meant to render a collection of children, use an array instead.");
|
|
2450
2451
|
}
|
|
@@ -2455,8 +2456,8 @@ function ao() {
|
|
|
2455
2456
|
if (e == null)
|
|
2456
2457
|
return e;
|
|
2457
2458
|
var o = [], u = 0;
|
|
2458
|
-
return Re(e, o, "", "", function(
|
|
2459
|
-
return t.call(n,
|
|
2459
|
+
return Re(e, o, "", "", function(p) {
|
|
2460
|
+
return t.call(n, p, u++);
|
|
2460
2461
|
}), o;
|
|
2461
2462
|
}
|
|
2462
2463
|
function Bt(e) {
|
|
@@ -2506,14 +2507,14 @@ function ao() {
|
|
|
2506
2507
|
};
|
|
2507
2508
|
var n = !1, o = !1, u = !1;
|
|
2508
2509
|
{
|
|
2509
|
-
var
|
|
2510
|
+
var p = {
|
|
2510
2511
|
$$typeof: q,
|
|
2511
2512
|
_context: t
|
|
2512
2513
|
};
|
|
2513
|
-
Object.defineProperties(
|
|
2514
|
+
Object.defineProperties(p, {
|
|
2514
2515
|
Provider: {
|
|
2515
2516
|
get: function() {
|
|
2516
|
-
return o || (o = !0,
|
|
2517
|
+
return o || (o = !0, d("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), t.Provider;
|
|
2517
2518
|
},
|
|
2518
2519
|
set: function(l) {
|
|
2519
2520
|
t.Provider = l;
|
|
@@ -2545,7 +2546,7 @@ function ao() {
|
|
|
2545
2546
|
},
|
|
2546
2547
|
Consumer: {
|
|
2547
2548
|
get: function() {
|
|
2548
|
-
return n || (n = !0,
|
|
2549
|
+
return n || (n = !0, d("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), t.Consumer;
|
|
2549
2550
|
}
|
|
2550
2551
|
},
|
|
2551
2552
|
displayName: {
|
|
@@ -2556,7 +2557,7 @@ function ao() {
|
|
|
2556
2557
|
u || (X("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", l), u = !0);
|
|
2557
2558
|
}
|
|
2558
2559
|
}
|
|
2559
|
-
}), t.Consumer =
|
|
2560
|
+
}), t.Consumer = p;
|
|
2560
2561
|
}
|
|
2561
2562
|
return t._currentRenderer = null, t._currentRenderer2 = null, t;
|
|
2562
2563
|
}
|
|
@@ -2564,15 +2565,15 @@ function ao() {
|
|
|
2564
2565
|
function Xt(e) {
|
|
2565
2566
|
if (e._status === me) {
|
|
2566
2567
|
var t = e._result, n = t();
|
|
2567
|
-
if (n.then(function(
|
|
2568
|
+
if (n.then(function(p) {
|
|
2568
2569
|
if (e._status === xe || e._status === me) {
|
|
2569
2570
|
var l = e;
|
|
2570
|
-
l._status = rt, l._result =
|
|
2571
|
+
l._status = rt, l._result = p;
|
|
2571
2572
|
}
|
|
2572
|
-
}, function(
|
|
2573
|
+
}, function(p) {
|
|
2573
2574
|
if (e._status === xe || e._status === me) {
|
|
2574
2575
|
var l = e;
|
|
2575
|
-
l._status = Qt, l._result =
|
|
2576
|
+
l._status = Qt, l._result = p;
|
|
2576
2577
|
}
|
|
2577
2578
|
}), e._status === me) {
|
|
2578
2579
|
var o = e;
|
|
@@ -2581,12 +2582,12 @@ function ao() {
|
|
|
2581
2582
|
}
|
|
2582
2583
|
if (e._status === rt) {
|
|
2583
2584
|
var u = e._result;
|
|
2584
|
-
return u === void 0 &&
|
|
2585
|
+
return u === void 0 && d(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2585
2586
|
|
|
2586
2587
|
Your code should look like:
|
|
2587
2588
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
2588
2589
|
|
|
2589
|
-
Did you accidentally put curly braces around the import?`, u), "default" in u ||
|
|
2590
|
+
Did you accidentally put curly braces around the import?`, u), "default" in u || d(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2590
2591
|
|
|
2591
2592
|
Your code should look like:
|
|
2592
2593
|
const MyComponent = lazy(() => import('./MyComponent'))`, u), u.default;
|
|
@@ -2611,8 +2612,8 @@ Your code should look like:
|
|
|
2611
2612
|
get: function() {
|
|
2612
2613
|
return o;
|
|
2613
2614
|
},
|
|
2614
|
-
set: function(
|
|
2615
|
-
|
|
2615
|
+
set: function(p) {
|
|
2616
|
+
d("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), o = p, Object.defineProperty(n, "defaultProps", {
|
|
2616
2617
|
enumerable: !0
|
|
2617
2618
|
});
|
|
2618
2619
|
}
|
|
@@ -2622,8 +2623,8 @@ Your code should look like:
|
|
|
2622
2623
|
get: function() {
|
|
2623
2624
|
return u;
|
|
2624
2625
|
},
|
|
2625
|
-
set: function(
|
|
2626
|
-
|
|
2626
|
+
set: function(p) {
|
|
2627
|
+
d("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), u = p, Object.defineProperty(n, "propTypes", {
|
|
2627
2628
|
enumerable: !0
|
|
2628
2629
|
});
|
|
2629
2630
|
}
|
|
@@ -2633,7 +2634,7 @@ Your code should look like:
|
|
|
2633
2634
|
return n;
|
|
2634
2635
|
}
|
|
2635
2636
|
function tr(e) {
|
|
2636
|
-
e != null && e.$$typeof === Y ?
|
|
2637
|
+
e != null && e.$$typeof === Y ? d("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? d("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && d("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), e != null && (e.defaultProps != null || e.propTypes != null) && d("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
2637
2638
|
var t = {
|
|
2638
2639
|
$$typeof: V,
|
|
2639
2640
|
render: e
|
|
@@ -2663,7 +2664,7 @@ Your code should look like:
|
|
|
2663
2664
|
e.$$typeof === nt || e.getModuleId !== void 0));
|
|
2664
2665
|
}
|
|
2665
2666
|
function rr(e, t) {
|
|
2666
|
-
ot(e) ||
|
|
2667
|
+
ot(e) || d("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
|
|
2667
2668
|
var n = {
|
|
2668
2669
|
$$typeof: Y,
|
|
2669
2670
|
type: e,
|
|
@@ -2686,7 +2687,7 @@ Your code should look like:
|
|
|
2686
2687
|
}
|
|
2687
2688
|
function N() {
|
|
2688
2689
|
var e = ae.current;
|
|
2689
|
-
return e === null &&
|
|
2690
|
+
return e === null && d(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
2690
2691
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
2691
2692
|
2. You might be breaking the Rules of Hooks
|
|
2692
2693
|
3. You might have more than one copy of React in the same app
|
|
@@ -2696,7 +2697,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2696
2697
|
var t = N();
|
|
2697
2698
|
if (e._context !== void 0) {
|
|
2698
2699
|
var n = e._context;
|
|
2699
|
-
n.Consumer === e ?
|
|
2700
|
+
n.Consumer === e ? d("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : n.Provider === e && d("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
|
|
2700
2701
|
}
|
|
2701
2702
|
return t.useContext(e);
|
|
2702
2703
|
}
|
|
@@ -2817,7 +2818,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2817
2818
|
})
|
|
2818
2819
|
});
|
|
2819
2820
|
}
|
|
2820
|
-
he < 0 &&
|
|
2821
|
+
he < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
2821
2822
|
}
|
|
2822
2823
|
}
|
|
2823
2824
|
var Le = H.ReactCurrentDispatcher, Ne;
|
|
@@ -2851,8 +2852,8 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2851
2852
|
Ue = !0;
|
|
2852
2853
|
var u = Error.prepareStackTrace;
|
|
2853
2854
|
Error.prepareStackTrace = void 0;
|
|
2854
|
-
var
|
|
2855
|
-
|
|
2855
|
+
var p;
|
|
2856
|
+
p = Le.current, Le.current = null, gr();
|
|
2856
2857
|
try {
|
|
2857
2858
|
if (t) {
|
|
2858
2859
|
var l = function() {
|
|
@@ -2887,17 +2888,17 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2887
2888
|
}
|
|
2888
2889
|
} catch (x) {
|
|
2889
2890
|
if (x && o && typeof x.stack == "string") {
|
|
2890
|
-
for (var
|
|
2891
|
+
for (var m = x.stack.split(`
|
|
2891
2892
|
`), v = o.stack.split(`
|
|
2892
|
-
`), w =
|
|
2893
|
+
`), w = m.length - 1, R = v.length - 1; w >= 1 && R >= 0 && m[w] !== v[R]; )
|
|
2893
2894
|
R--;
|
|
2894
2895
|
for (; w >= 1 && R >= 0; w--, R--)
|
|
2895
|
-
if (
|
|
2896
|
+
if (m[w] !== v[R]) {
|
|
2896
2897
|
if (w !== 1 || R !== 1)
|
|
2897
2898
|
do
|
|
2898
|
-
if (w--, R--, R < 0 ||
|
|
2899
|
+
if (w--, R--, R < 0 || m[w] !== v[R]) {
|
|
2899
2900
|
var S = `
|
|
2900
|
-
` +
|
|
2901
|
+
` + m[w].replace(" at new ", " at ");
|
|
2901
2902
|
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && Oe.set(e, S), S;
|
|
2902
2903
|
}
|
|
2903
2904
|
while (w >= 1 && R >= 0);
|
|
@@ -2905,7 +2906,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2905
2906
|
}
|
|
2906
2907
|
}
|
|
2907
2908
|
} finally {
|
|
2908
|
-
Ue = !1, Le.current =
|
|
2909
|
+
Ue = !1, Le.current = p, _r(), Error.prepareStackTrace = u;
|
|
2909
2910
|
}
|
|
2910
2911
|
var T = e ? e.displayName || e.name : "", A = T ? ke(T) : "";
|
|
2911
2912
|
return typeof e == "function" && Oe.set(e, A), A;
|
|
@@ -2937,9 +2938,9 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2937
2938
|
case Y:
|
|
2938
2939
|
return Te(e.type, t, n);
|
|
2939
2940
|
case Z: {
|
|
2940
|
-
var o = e, u = o._payload,
|
|
2941
|
+
var o = e, u = o._payload, p = o._init;
|
|
2941
2942
|
try {
|
|
2942
|
-
return Te(
|
|
2943
|
+
return Te(p(u), t, n);
|
|
2943
2944
|
} catch {
|
|
2944
2945
|
}
|
|
2945
2946
|
}
|
|
@@ -2956,20 +2957,20 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2956
2957
|
}
|
|
2957
2958
|
function Cr(e, t, n, o, u) {
|
|
2958
2959
|
{
|
|
2959
|
-
var
|
|
2960
|
+
var p = Function.call.bind(ye);
|
|
2960
2961
|
for (var l in e)
|
|
2961
|
-
if (
|
|
2962
|
-
var
|
|
2962
|
+
if (p(e, l)) {
|
|
2963
|
+
var m = void 0;
|
|
2963
2964
|
try {
|
|
2964
2965
|
if (typeof e[l] != "function") {
|
|
2965
2966
|
var v = Error((o || "React class") + ": " + n + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
2966
2967
|
throw v.name = "Invariant Violation", v;
|
|
2967
2968
|
}
|
|
2968
|
-
|
|
2969
|
+
m = e[l](t, l, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
2969
2970
|
} catch (w) {
|
|
2970
|
-
|
|
2971
|
+
m = w;
|
|
2971
2972
|
}
|
|
2972
|
-
|
|
2973
|
+
m && !(m instanceof Error) && (Pe(u), d("%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).", o || "React class", n, l, typeof m), Pe(null)), m instanceof Error && !(m.message in yt) && (yt[m.message] = !0, Pe(u), d("Failed %s type: %s", n, m.message), Pe(null));
|
|
2973
2974
|
}
|
|
2974
2975
|
}
|
|
2975
2976
|
}
|
|
@@ -3022,7 +3023,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3022
3023
|
if (!vt[n]) {
|
|
3023
3024
|
vt[n] = !0;
|
|
3024
3025
|
var o = "";
|
|
3025
|
-
e && e._owner && e._owner !== z.current && (o = " It was passed a child from " + ee(e._owner.type) + "."), ce(e),
|
|
3026
|
+
e && e._owner && e._owner !== z.current && (o = " It was passed a child from " + ee(e._owner.type) + "."), ce(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), ce(null);
|
|
3026
3027
|
}
|
|
3027
3028
|
}
|
|
3028
3029
|
}
|
|
@@ -3038,7 +3039,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3038
3039
|
else if (e) {
|
|
3039
3040
|
var u = oe(e);
|
|
3040
3041
|
if (typeof u == "function" && u !== e.entries)
|
|
3041
|
-
for (var
|
|
3042
|
+
for (var p = u.call(e), l; !(l = p.next()).done; )
|
|
3042
3043
|
ue(l.value) && gt(l.value, t);
|
|
3043
3044
|
}
|
|
3044
3045
|
}
|
|
@@ -3063,9 +3064,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3063
3064
|
} else if (t.PropTypes !== void 0 && !Ve) {
|
|
3064
3065
|
Ve = !0;
|
|
3065
3066
|
var u = ee(t);
|
|
3066
|
-
|
|
3067
|
+
d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
3067
3068
|
}
|
|
3068
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved &&
|
|
3069
|
+
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
3069
3070
|
}
|
|
3070
3071
|
}
|
|
3071
3072
|
function Or(e) {
|
|
@@ -3073,11 +3074,11 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3073
3074
|
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
3074
3075
|
var o = t[n];
|
|
3075
3076
|
if (o !== "children" && o !== "key") {
|
|
3076
|
-
ce(e),
|
|
3077
|
+
ce(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), ce(null);
|
|
3077
3078
|
break;
|
|
3078
3079
|
}
|
|
3079
3080
|
}
|
|
3080
|
-
e.ref !== null && (ce(e),
|
|
3081
|
+
e.ref !== null && (ce(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), ce(null));
|
|
3081
3082
|
}
|
|
3082
3083
|
}
|
|
3083
3084
|
function Et(e, t, n) {
|
|
@@ -3085,18 +3086,18 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3085
3086
|
if (!o) {
|
|
3086
3087
|
var u = "";
|
|
3087
3088
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
3088
|
-
var
|
|
3089
|
-
|
|
3089
|
+
var p = Sr(t);
|
|
3090
|
+
p ? u += p : u += ht();
|
|
3090
3091
|
var l;
|
|
3091
|
-
e === null ? l = "null" : we(e) ? l = "array" : e !== void 0 && e.$$typeof ===
|
|
3092
|
+
e === null ? l = "null" : we(e) ? l = "array" : e !== void 0 && e.$$typeof === y ? (l = "<" + (ee(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, d("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, u);
|
|
3092
3093
|
}
|
|
3093
|
-
var
|
|
3094
|
-
if (
|
|
3095
|
-
return
|
|
3094
|
+
var m = Vt.apply(this, arguments);
|
|
3095
|
+
if (m == null)
|
|
3096
|
+
return m;
|
|
3096
3097
|
if (o)
|
|
3097
3098
|
for (var v = 2; v < arguments.length; v++)
|
|
3098
3099
|
_t(arguments[v], e);
|
|
3099
|
-
return e === b ? Or(
|
|
3100
|
+
return e === b ? Or(m) : bt(m), m;
|
|
3100
3101
|
}
|
|
3101
3102
|
var wt = !1;
|
|
3102
3103
|
function Tr(e) {
|
|
@@ -3137,7 +3138,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3137
3138
|
Ie = n.call(c, "timers").setImmediate;
|
|
3138
3139
|
} catch {
|
|
3139
3140
|
Ie = function(o) {
|
|
3140
|
-
Ct === !1 && (Ct = !0, typeof MessageChannel > "u" &&
|
|
3141
|
+
Ct === !1 && (Ct = !0, typeof MessageChannel > "u" && d("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
3141
3142
|
var u = new MessageChannel();
|
|
3142
3143
|
u.port1.onmessage = o, u.port2.postMessage(void 0);
|
|
3143
3144
|
};
|
|
@@ -3161,9 +3162,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3161
3162
|
F.isBatchingLegacy = n;
|
|
3162
3163
|
}
|
|
3163
3164
|
if (o !== null && typeof o == "object" && typeof o.then == "function") {
|
|
3164
|
-
var
|
|
3165
|
+
var p = o, l = !1, m = {
|
|
3165
3166
|
then: function(T, A) {
|
|
3166
|
-
l = !0,
|
|
3167
|
+
l = !0, p.then(function(x) {
|
|
3167
3168
|
je(t), le === 0 ? ze(x, T, A) : T(x);
|
|
3168
3169
|
}, function(x) {
|
|
3169
3170
|
je(t), A(x);
|
|
@@ -3172,8 +3173,8 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3172
3173
|
};
|
|
3173
3174
|
return !Rt && typeof Promise < "u" && Promise.resolve().then(function() {
|
|
3174
3175
|
}).then(function() {
|
|
3175
|
-
l || (Rt = !0,
|
|
3176
|
-
}),
|
|
3176
|
+
l || (Rt = !0, d("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
3177
|
+
}), m;
|
|
3177
3178
|
} else {
|
|
3178
3179
|
var v = o;
|
|
3179
3180
|
if (je(t), le === 0) {
|
|
@@ -3197,7 +3198,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3197
3198
|
}
|
|
3198
3199
|
}
|
|
3199
3200
|
function je(e) {
|
|
3200
|
-
e !== le - 1 &&
|
|
3201
|
+
e !== le - 1 && d("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), le = e;
|
|
3201
3202
|
}
|
|
3202
3203
|
function ze(e, t, n) {
|
|
3203
3204
|
{
|
|
@@ -3241,7 +3242,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3241
3242
|
toArray: Gt,
|
|
3242
3243
|
only: Jt
|
|
3243
3244
|
};
|
|
3244
|
-
a.Children = Fr, a.Component = _, a.Fragment = b, a.Profiler = P, a.PureComponent = C, a.StrictMode = I, a.Suspense = U, a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = H, a.act = St, a.cloneElement = Mr, a.createContext = Zt, a.createElement = Ar, a.createFactory = Dr, a.createRef = Mt, a.forwardRef = tr, a.isValidElement = ue, a.lazy = er, a.memo = rr, a.startTransition = Ir, a.unstable_act = St, a.useCallback = lr, a.useContext = nr, a.useDebugValue = pr, a.useDeferredValue = mr, a.useEffect = sr, a.useId = hr, a.useImperativeHandle = dr, a.useInsertionEffect = ur, a.useLayoutEffect = cr, a.useMemo = fr, a.useReducer = ar, a.useRef = ir, a.useState = or, a.useSyncExternalStore = vr, a.useTransition = yr, a.version =
|
|
3245
|
+
a.Children = Fr, a.Component = _, a.Fragment = b, a.Profiler = P, a.PureComponent = C, a.StrictMode = I, a.Suspense = U, a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = H, a.act = St, a.cloneElement = Mr, a.createContext = Zt, a.createElement = Ar, a.createFactory = Dr, a.createRef = Mt, a.forwardRef = tr, a.isValidElement = ue, a.lazy = er, a.memo = rr, a.startTransition = Ir, a.unstable_act = St, a.useCallback = lr, a.useContext = nr, a.useDebugValue = pr, a.useDeferredValue = mr, a.useEffect = sr, a.useId = hr, a.useImperativeHandle = dr, a.useInsertionEffect = ur, a.useLayoutEffect = cr, a.useMemo = fr, a.useReducer = ar, a.useRef = ir, a.useState = or, a.useSyncExternalStore = vr, a.useTransition = yr, a.version = f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
3245
3246
|
}();
|
|
3246
3247
|
}(jt, jt.exports)), jt.exports;
|
|
3247
3248
|
}
|
|
@@ -3249,9 +3250,9 @@ process.env.NODE_ENV === "production" ? oo() : ao();
|
|
|
3249
3250
|
const io = async (c) => {
|
|
3250
3251
|
if (typeof c != "object" || !c) return !1;
|
|
3251
3252
|
try {
|
|
3252
|
-
const a = { type: "ping" },
|
|
3253
|
-
if (
|
|
3254
|
-
throw new Error(`Expected 'true' after ping, got ${JSON.stringify(
|
|
3253
|
+
const a = { type: "ping" }, f = await c.send(a);
|
|
3254
|
+
if (f !== !0)
|
|
3255
|
+
throw new Error(`Expected 'true' after ping, got ${JSON.stringify(f)}`);
|
|
3255
3256
|
return !0;
|
|
3256
3257
|
} catch {
|
|
3257
3258
|
return !1;
|
|
@@ -3377,15 +3378,15 @@ i.object({
|
|
|
3377
3378
|
required_user_actions: i.array(i.record(i.string(), i.any())),
|
|
3378
3379
|
cc_pm_id: i.string()
|
|
3379
3380
|
});
|
|
3380
|
-
const qr = async (c, a,
|
|
3381
|
-
const
|
|
3382
|
-
if (Ro(
|
|
3383
|
-
throw new Error(`[cde-client] Error querying CDE: ${
|
|
3384
|
-
if (!Co(
|
|
3385
|
-
const g =
|
|
3381
|
+
const qr = async (c, a, f) => {
|
|
3382
|
+
const y = await c.send(a);
|
|
3383
|
+
if (Ro(y))
|
|
3384
|
+
throw new Error(`[cde-client] Error querying CDE: ${y.message}`);
|
|
3385
|
+
if (!Co(y, f)) {
|
|
3386
|
+
const g = f.safeParse(y);
|
|
3386
3387
|
throw g.success ? new Error("Invalid state") : g.error;
|
|
3387
3388
|
}
|
|
3388
|
-
return
|
|
3389
|
+
return y;
|
|
3389
3390
|
}, Co = (c, a) => a.safeParse(c).success, Ro = (c) => uo.safeParse(c).success, So = async (c, a) => await qr(c, { type: "get_checkout_preview", payload: a }, fn), pn = async (c) => await qr(c, { type: "get_prefill", payload: {} }, dn), ko = async (c, a) => await qr(c, { type: "confirm_payment_flow", payload: a }, Kn);
|
|
3390
3391
|
class Oo {
|
|
3391
3392
|
constructor(a) {
|
|
@@ -3400,21 +3401,21 @@ class Oo {
|
|
|
3400
3401
|
throw new Error("No source found");
|
|
3401
3402
|
if (a.origin !== ((P = this.formInstance.config._frameUrl) == null ? void 0 : P.origin))
|
|
3402
3403
|
return;
|
|
3403
|
-
const
|
|
3404
|
-
if (!this.validateEvent(
|
|
3405
|
-
const { elementId: g, payload: b } =
|
|
3404
|
+
const f = no(JSON.parse(a.data));
|
|
3405
|
+
if (!this.validateEvent(f)) return;
|
|
3406
|
+
const { elementId: g, payload: b } = f;
|
|
3406
3407
|
switch (b.type) {
|
|
3407
3408
|
case "LAYOUT":
|
|
3408
3409
|
this.handleLayoutEvent(b);
|
|
3409
3410
|
break;
|
|
3410
3411
|
case "FOCUS":
|
|
3411
|
-
this.handleFocusEvent(g);
|
|
3412
|
+
this.handleFocusEvent(g, b.elementType);
|
|
3412
3413
|
break;
|
|
3413
3414
|
case "BLUR":
|
|
3414
|
-
this.handleBlurEvent(g);
|
|
3415
|
+
this.handleBlurEvent(g, b.elementType);
|
|
3415
3416
|
break;
|
|
3416
3417
|
case "CHANGE":
|
|
3417
|
-
this.handleChangeEvent(g);
|
|
3418
|
+
this.handleChangeEvent(g, b.elementType, b.errors);
|
|
3418
3419
|
break;
|
|
3419
3420
|
case "LOADED":
|
|
3420
3421
|
this.handleLoadedEvent(a.source, g, b);
|
|
@@ -3452,20 +3453,20 @@ class Oo {
|
|
|
3452
3453
|
return a.formId !== this.formInstance.formId || !a.elementId || this.nonces.has(a.nonce) ? !1 : (this.nonces.add(a.nonce), !0);
|
|
3453
3454
|
}
|
|
3454
3455
|
handleLayoutEvent(a) {
|
|
3455
|
-
const
|
|
3456
|
-
this.formInstance.setFormHeight(
|
|
3456
|
+
const f = a.height ? `${a.height}px` : "100%";
|
|
3457
|
+
this.formInstance.setFormHeight(f);
|
|
3457
3458
|
}
|
|
3458
|
-
handleFocusEvent(a) {
|
|
3459
|
-
this.config.onFocus && this.config.onFocus(a);
|
|
3459
|
+
handleFocusEvent(a, f) {
|
|
3460
|
+
this.config.onFocus && this.config.onFocus(a, f);
|
|
3460
3461
|
}
|
|
3461
|
-
handleBlurEvent(a) {
|
|
3462
|
-
this.config.onBlur && this.config.onBlur(a);
|
|
3462
|
+
handleBlurEvent(a, f) {
|
|
3463
|
+
this.config.onBlur && this.config.onBlur(a, f);
|
|
3463
3464
|
}
|
|
3464
|
-
handleChangeEvent(a) {
|
|
3465
|
-
this.config.onChange && this.config.onChange(a);
|
|
3465
|
+
handleChangeEvent(a, f, y) {
|
|
3466
|
+
this.config.onChange && this.config.onChange(a, f, y);
|
|
3466
3467
|
}
|
|
3467
|
-
handleLoadedEvent(a,
|
|
3468
|
-
this.eventTargets[
|
|
3468
|
+
handleLoadedEvent(a, f, y) {
|
|
3469
|
+
this.eventTargets[f] = a, this.formInstance.sessionId || (this.formInstance.sessionId = y.sessionId), this.config.onLoad && this.config.onLoad(y.totalAmountAtoms, y.currency), this.formInstance.checkoutPaymentMethods = y.checkoutPaymentMethods;
|
|
3469
3470
|
}
|
|
3470
3471
|
handleTokenizeStartedEvent() {
|
|
3471
3472
|
this.formInstance.config.onCheckoutStarted && this.formInstance.config.onCheckoutStarted();
|
|
@@ -3473,7 +3474,7 @@ class Oo {
|
|
|
3473
3474
|
handleCheckoutStartedEvent() {
|
|
3474
3475
|
this.formInstance.config.onCheckoutStarted && this.formInstance.config.onCheckoutStarted();
|
|
3475
3476
|
}
|
|
3476
|
-
async handlePaymentFlowStartedEvent(a,
|
|
3477
|
+
async handlePaymentFlowStartedEvent(a, f, y) {
|
|
3477
3478
|
var I;
|
|
3478
3479
|
if (!this.tokenizedData)
|
|
3479
3480
|
throw new Error("tokenizedData not populated");
|
|
@@ -3512,9 +3513,9 @@ class Oo {
|
|
|
3512
3513
|
if (this.tokenizedData.checkoutPaymentMethod.provider === "credit_card" && ($ = (I = a.startPFMetadata) == null ? void 0 : I.cc_pm_id, !$))
|
|
3513
3514
|
throw new Error("CC PM ID not found");
|
|
3514
3515
|
Br(
|
|
3515
|
-
|
|
3516
|
+
f,
|
|
3516
3517
|
this.formInstance.formId,
|
|
3517
|
-
|
|
3518
|
+
y,
|
|
3518
3519
|
{ ...this.tokenizedData, type: "CHECKOUT", doNotUseLegacyCCFlow: !0, existingCCPMId: $ },
|
|
3519
3520
|
this.formInstance.config.baseUrl
|
|
3520
3521
|
), this.formInstance.checkoutFired = !0, this.tokenizedData = null, this.formInstance.config.onCheckoutStarted && this.formInstance.config.onCheckoutStarted();
|
|
@@ -3523,11 +3524,11 @@ class Oo {
|
|
|
3523
3524
|
this.formInstance.checkoutFired = !1, this.formInstance.config.onCheckoutError && this.formInstance.config.onCheckoutError($);
|
|
3524
3525
|
}
|
|
3525
3526
|
}
|
|
3526
|
-
handleTokenizeSuccessEvent(a,
|
|
3527
|
+
handleTokenizeSuccessEvent(a, f, y) {
|
|
3527
3528
|
if (!this.tokenizedData)
|
|
3528
3529
|
throw new Error("Tokenized data not found");
|
|
3529
3530
|
const g = this.tokenized + 1, b = g === Object.keys(this.eventTargets).length;
|
|
3530
|
-
!this.formInstance.checkoutFired && (b ||
|
|
3531
|
+
!this.formInstance.checkoutFired && (b || y.isReadyForCheckout) ? (this.tokenizedData.type = this.tokenizedData.type === J.enum.TOKENIZE ? J.enum.CHECKOUT : J.enum.START_PAYMENT_FLOW, this.postEventToFrame(a, f, this.tokenizedData), this.tokenizedData = null) : this.tokenized = g;
|
|
3531
3532
|
}
|
|
3532
3533
|
handleCheckoutSuccessEvent(a) {
|
|
3533
3534
|
this.formInstance.config.onCheckoutSuccess && this.formInstance.config.onCheckoutSuccess(a.invoiceUrls, a.subscriptionIds, a.customerId);
|
|
@@ -3538,14 +3539,14 @@ class Oo {
|
|
|
3538
3539
|
handleLoadErrorEvent(a) {
|
|
3539
3540
|
this.formInstance.config.onLoadError && this.formInstance.config.onLoadError(a.message);
|
|
3540
3541
|
}
|
|
3541
|
-
handleValidationErrorEvent(a,
|
|
3542
|
-
this.formInstance.config.onValidationError && this.formInstance.config.onValidationError(a.elementType, a.errors,
|
|
3542
|
+
handleValidationErrorEvent(a, f) {
|
|
3543
|
+
this.formInstance.config.onValidationError && this.formInstance.config.onValidationError(a.elementType, a.errors, f);
|
|
3543
3544
|
}
|
|
3544
3545
|
handleErrorEvent(a) {
|
|
3545
|
-
var
|
|
3546
|
+
var f;
|
|
3546
3547
|
if (a.message === "3DS_REQUIRED") {
|
|
3547
|
-
const
|
|
3548
|
-
if (!this.formInstance.sessionId || !this.formInstance.formTarget || !this.config.onValidationError || !
|
|
3548
|
+
const y = (f = this.formInstance.checkoutPaymentMethods) == null ? void 0 : f.find((g) => g.provider === "credit_card");
|
|
3549
|
+
if (!this.formInstance.sessionId || !this.formInstance.formTarget || !this.config.onValidationError || !y)
|
|
3549
3550
|
return;
|
|
3550
3551
|
for (const [g, b] of Object.entries(this.eventTargets)) {
|
|
3551
3552
|
if (!b) continue;
|
|
@@ -3554,7 +3555,7 @@ class Oo {
|
|
|
3554
3555
|
this.formInstance.sessionId,
|
|
3555
3556
|
document.querySelector(this.formInstance.formTarget) ?? document.body,
|
|
3556
3557
|
this.config.onValidationError,
|
|
3557
|
-
{ ...
|
|
3558
|
+
{ ...y, processor_name: "stripe" },
|
|
3558
3559
|
!1
|
|
3559
3560
|
);
|
|
3560
3561
|
if (I) {
|
|
@@ -3566,13 +3567,13 @@ class Oo {
|
|
|
3566
3567
|
this.formInstance.checkoutFired = !1, this.formInstance.config.onCheckoutError && this.formInstance.config.onCheckoutError(a.message);
|
|
3567
3568
|
}
|
|
3568
3569
|
handleFormSubmit() {
|
|
3569
|
-
var
|
|
3570
|
-
if (!this.formInstance.sessionId || !((
|
|
3570
|
+
var y;
|
|
3571
|
+
if (!this.formInstance.sessionId || !((y = this.formInstance.checkoutPaymentMethods) != null && y.length) || !this.config.onValidationError)
|
|
3571
3572
|
return;
|
|
3572
3573
|
const a = this.formInstance.checkoutPaymentMethods.find((g) => g.provider === "credit_card");
|
|
3573
3574
|
if (!a)
|
|
3574
3575
|
throw new Error("Card not available as a payment method in checkout");
|
|
3575
|
-
const
|
|
3576
|
+
const f = At(
|
|
3576
3577
|
J.enum.TOKENIZE,
|
|
3577
3578
|
this.formInstance.sessionId,
|
|
3578
3579
|
document.querySelector(this.formInstance.formTarget) ?? document.body,
|
|
@@ -3580,31 +3581,31 @@ class Oo {
|
|
|
3580
3581
|
a,
|
|
3581
3582
|
!1
|
|
3582
3583
|
);
|
|
3583
|
-
if (!
|
|
3584
|
+
if (!f)
|
|
3584
3585
|
throw new Error("Error constructing tokenize data");
|
|
3585
3586
|
for (const [g, b] of Object.entries(this.eventTargets))
|
|
3586
|
-
b && this.postEventToFrame(b, g,
|
|
3587
|
-
this.tokenizedData =
|
|
3587
|
+
b && this.postEventToFrame(b, g, f);
|
|
3588
|
+
this.tokenizedData = f;
|
|
3588
3589
|
}
|
|
3589
|
-
postEventToFrame(a,
|
|
3590
|
-
Br(a, this.formId,
|
|
3590
|
+
postEventToFrame(a, f, y) {
|
|
3591
|
+
Br(a, this.formId, f, y, this.config.baseUrl);
|
|
3591
3592
|
}
|
|
3592
3593
|
}
|
|
3593
3594
|
async function To(c) {
|
|
3594
|
-
const
|
|
3595
|
+
const f = await mn({
|
|
3595
3596
|
iframe: c,
|
|
3596
3597
|
debug: !0
|
|
3597
|
-
}).promise,
|
|
3598
|
-
if (!so(
|
|
3598
|
+
}).promise, y = await io(f);
|
|
3599
|
+
if (!so(f, y))
|
|
3599
3600
|
throw new Error("Got invalid CDE connection object");
|
|
3600
|
-
return
|
|
3601
|
+
return f;
|
|
3601
3602
|
}
|
|
3602
3603
|
class Po {
|
|
3603
3604
|
constructor() {
|
|
3604
3605
|
this.connections = /* @__PURE__ */ new Map();
|
|
3605
3606
|
}
|
|
3606
|
-
addConnection(a,
|
|
3607
|
-
this.connections.set(a,
|
|
3607
|
+
addConnection(a, f) {
|
|
3608
|
+
this.connections.set(a, f);
|
|
3608
3609
|
}
|
|
3609
3610
|
getConnection() {
|
|
3610
3611
|
const a = this.connections.values().next().value;
|
|
@@ -3613,7 +3614,7 @@ class Po {
|
|
|
3613
3614
|
return a;
|
|
3614
3615
|
}
|
|
3615
3616
|
}
|
|
3616
|
-
async function Io(c, a,
|
|
3617
|
+
async function Io(c, a, f, y, g, b) {
|
|
3617
3618
|
const I = {
|
|
3618
3619
|
apple_pay: { isLoading: !0, isAvailable: !1, startFlow: async () => {
|
|
3619
3620
|
} },
|
|
@@ -3632,12 +3633,12 @@ async function Io(c, a, p, m, g, b) {
|
|
|
3632
3633
|
isLoading: !1,
|
|
3633
3634
|
isAvailable: V,
|
|
3634
3635
|
startFlow: (U) => Ao(
|
|
3635
|
-
|
|
3636
|
+
f,
|
|
3636
3637
|
c.checkoutSecureToken,
|
|
3637
3638
|
document.querySelector(c.formTarget),
|
|
3638
3639
|
$,
|
|
3639
3640
|
q,
|
|
3640
|
-
|
|
3641
|
+
y,
|
|
3641
3642
|
g,
|
|
3642
3643
|
b,
|
|
3643
3644
|
U
|
|
@@ -3654,15 +3655,15 @@ async function Io(c, a, p, m, g, b) {
|
|
|
3654
3655
|
return I;
|
|
3655
3656
|
}
|
|
3656
3657
|
async function jo(c, a) {
|
|
3657
|
-
const
|
|
3658
|
-
if (
|
|
3658
|
+
const y = await sn(c, 1e3, "usd"), g = await y.canMakePayment();
|
|
3659
|
+
if (y.abort(), !g)
|
|
3659
3660
|
throw new Error(`Cannot make payment with ${a} for this session`);
|
|
3660
3661
|
return g[a === "apple_pay" ? "applePay" : "googlePay"];
|
|
3661
3662
|
}
|
|
3662
|
-
async function Ao(c, a,
|
|
3663
|
+
async function Ao(c, a, f, y, g, b, I, P, $) {
|
|
3663
3664
|
try {
|
|
3664
|
-
const q = un(
|
|
3665
|
-
if (!Mo(
|
|
3665
|
+
const q = un(f, {});
|
|
3666
|
+
if (!Mo(f, I, y))
|
|
3666
3667
|
return;
|
|
3667
3668
|
const U = (await pn(c)).mode === "setup", G = await Do(U, $, q, c, a), Y = await sn(
|
|
3668
3669
|
g,
|
|
@@ -3672,31 +3673,31 @@ async function Ao(c, a, p, m, g, b, I, P, $) {
|
|
|
3672
3673
|
);
|
|
3673
3674
|
await Y.canMakePayment(), Y.show();
|
|
3674
3675
|
const Z = await Qn(Y);
|
|
3675
|
-
b(Z,
|
|
3676
|
+
b(Z, y);
|
|
3676
3677
|
} catch (q) {
|
|
3677
3678
|
P(en(q));
|
|
3678
3679
|
}
|
|
3679
3680
|
}
|
|
3680
|
-
function Mo(c, a,
|
|
3681
|
+
function Mo(c, a, f) {
|
|
3681
3682
|
return !!At(
|
|
3682
3683
|
J.enum.START_PAYMENT_FLOW,
|
|
3683
3684
|
"dummy",
|
|
3684
3685
|
c,
|
|
3685
3686
|
a ?? (() => {
|
|
3686
3687
|
}),
|
|
3687
|
-
|
|
3688
|
+
f,
|
|
3688
3689
|
!1
|
|
3689
3690
|
);
|
|
3690
3691
|
}
|
|
3691
|
-
async function Do(c, a,
|
|
3692
|
+
async function Do(c, a, f, y, g) {
|
|
3692
3693
|
var V;
|
|
3693
3694
|
if (c)
|
|
3694
3695
|
return ((V = a == null ? void 0 : a.overridePaymentRequest) == null ? void 0 : V.amount) ?? { amountAtom: 0, currency: "usd" };
|
|
3695
3696
|
a != null && a.overridePaymentRequest;
|
|
3696
|
-
const b = te.safeParse(
|
|
3697
|
+
const b = te.safeParse(f[It.PROMOTION_CODE]);
|
|
3697
3698
|
if (!b.success)
|
|
3698
3699
|
throw new Error(`Unknown promo code type: ${b.error.message}`);
|
|
3699
|
-
const I = await So(
|
|
3700
|
+
const I = await So(y, {
|
|
3700
3701
|
secure_token: g,
|
|
3701
3702
|
promotion_code: b.data
|
|
3702
3703
|
}), P = new Set(I.preview.invoices.map((U) => U.currency));
|
|
@@ -3708,8 +3709,8 @@ async function Do(c, a, p, m, g) {
|
|
|
3708
3709
|
class Lo {
|
|
3709
3710
|
constructor(a) {
|
|
3710
3711
|
this.config = { ...a, baseUrl: a.baseUrl ?? "https://cde.getopenpay.com" }, this.elements = null, this.formId = `opjs-form-${window.crypto.randomUUID()}`, this.referer = window.location.origin, this.formTarget = a.formTarget ?? "body", this.formProperties = { height: "1px" }, this.sessionId = null, this.checkoutPaymentMethods = [], this.checkoutFired = !1, this.stripePm = void 0, this.paymentRequests = this.initPaymentRequests(), this.connectionManager = new Po(), this.eventHandler = new Oo(this);
|
|
3711
|
-
const
|
|
3712
|
-
window.ojs_version =
|
|
3712
|
+
const f = { version: "0.1.3" };
|
|
3713
|
+
window.ojs_version = f, window.addEventListener("message", this.eventHandler.handleMessage.bind(this.eventHandler));
|
|
3713
3714
|
}
|
|
3714
3715
|
getStripePm() {
|
|
3715
3716
|
return this.stripePm;
|
|
@@ -3718,8 +3719,8 @@ class Lo {
|
|
|
3718
3719
|
return this.connectionManager;
|
|
3719
3720
|
}
|
|
3720
3721
|
setFormHeight(a) {
|
|
3721
|
-
this.formProperties.height = a, this.elements && Object.values(this.elements).forEach((
|
|
3722
|
-
|
|
3722
|
+
this.formProperties.height = a, this.elements && Object.values(this.elements).forEach((f) => {
|
|
3723
|
+
f.node.style.height = a;
|
|
3723
3724
|
});
|
|
3724
3725
|
}
|
|
3725
3726
|
initPaymentRequests() {
|
|
@@ -3730,49 +3731,49 @@ class Lo {
|
|
|
3730
3731
|
} }
|
|
3731
3732
|
};
|
|
3732
3733
|
}
|
|
3733
|
-
createElement(a,
|
|
3734
|
+
createElement(a, f = {}) {
|
|
3734
3735
|
if (!this.config) throw new Error("OpenPay form not initialized");
|
|
3735
|
-
const
|
|
3736
|
-
|
|
3737
|
-
const b = new URL(`/app/v1/${
|
|
3738
|
-
b.search = g.toString(),
|
|
3736
|
+
const y = document.createElement("iframe"), g = this.buildQueryString(f);
|
|
3737
|
+
y.name = `${a}-element`;
|
|
3738
|
+
const b = new URL(`/app/v1/${y.name}`, this.config.baseUrl);
|
|
3739
|
+
b.search = g.toString(), y.src = b.href, this.config._frameUrl = b, y.style.border = "none", y.style.width = "100%";
|
|
3739
3740
|
const I = {
|
|
3740
3741
|
type: a,
|
|
3741
|
-
node:
|
|
3742
|
+
node: y,
|
|
3742
3743
|
mount: (P) => {
|
|
3743
3744
|
var $;
|
|
3744
|
-
return ($ = document.querySelector(P)) == null ? void 0 : $.appendChild(
|
|
3745
|
+
return ($ = document.querySelector(P)) == null ? void 0 : $.appendChild(y);
|
|
3745
3746
|
}
|
|
3746
3747
|
};
|
|
3747
3748
|
return this.elements ? this.elements[a] = I : (this.elements = { [a]: I }, this.connectToElement(I)), I;
|
|
3748
3749
|
}
|
|
3749
3750
|
buildQueryString(a) {
|
|
3750
|
-
const
|
|
3751
|
-
return
|
|
3751
|
+
const f = new URLSearchParams();
|
|
3752
|
+
return f.append("referer", this.referer), f.append("formId", this.formId), a.styles && f.append("styles", ro(a.styles)), f.append("secureToken", this.config.checkoutSecureToken), f;
|
|
3752
3753
|
}
|
|
3753
3754
|
connectToElement(a) {
|
|
3754
|
-
To(a.node).then((
|
|
3755
|
-
this.connectionManager.addConnection(a.type,
|
|
3756
|
-
}).catch((
|
|
3755
|
+
To(a.node).then((f) => {
|
|
3756
|
+
this.connectionManager.addConnection(a.type, f), this.initializePaymentRequests();
|
|
3757
|
+
}).catch((f) => {
|
|
3757
3758
|
});
|
|
3758
3759
|
}
|
|
3759
3760
|
submit() {
|
|
3760
3761
|
this.eventHandler.handleFormSubmit();
|
|
3761
3762
|
}
|
|
3762
|
-
async onUserCompletePaymentRequestUI(a,
|
|
3763
|
+
async onUserCompletePaymentRequestUI(a, f) {
|
|
3763
3764
|
if (!(!this.config.onValidationError || !this.sessionId || !this.checkoutPaymentMethods))
|
|
3764
|
-
for (const [
|
|
3765
|
+
for (const [y, g] of Object.entries(this.eventHandler.eventTargets ?? {})) {
|
|
3765
3766
|
const b = { stripePmId: a.paymentMethod.id }, I = At(
|
|
3766
3767
|
J.enum.START_PAYMENT_FLOW,
|
|
3767
3768
|
this.sessionId,
|
|
3768
3769
|
document.querySelector(this.formTarget) ?? document.body,
|
|
3769
3770
|
this.config.onValidationError,
|
|
3770
|
-
|
|
3771
|
+
f,
|
|
3771
3772
|
!1,
|
|
3772
3773
|
b
|
|
3773
3774
|
);
|
|
3774
3775
|
if (I) {
|
|
3775
|
-
this.stripePm = a, this.checkoutFired = !0, this.eventHandler.setTokenizedData(I), this.eventHandler.postEventToFrame(g,
|
|
3776
|
+
this.stripePm = a, this.checkoutFired = !0, this.eventHandler.setTokenizedData(I), this.eventHandler.postEventToFrame(g, y, I);
|
|
3776
3777
|
break;
|
|
3777
3778
|
}
|
|
3778
3779
|
}
|