@getopenpay/openpay-js 0.1.1 → 0.1.3
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 +127 -2
- package/dist/index.es.js +484 -468
- package/dist/index.umd.js +14 -14
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -15,16 +15,16 @@ 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"), p = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), b = Symbol.for("react.provider"),
|
|
19
|
-
function
|
|
20
|
-
return r === null || typeof r != "object" ? null : (r =
|
|
18
|
+
var c = Symbol.for("react.element"), a = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), m = 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
|
+
function G(r) {
|
|
20
|
+
return r === null || typeof r != "object" ? null : (r = U && r[U] || r["@@iterator"], typeof r == "function" ? r : null);
|
|
21
21
|
}
|
|
22
22
|
var Y = { isMounted: function() {
|
|
23
23
|
return !1;
|
|
24
24
|
}, enqueueForceUpdate: function() {
|
|
25
25
|
}, enqueueReplaceState: function() {
|
|
26
26
|
}, enqueueSetState: function() {
|
|
27
|
-
} },
|
|
27
|
+
} }, Z = Object.assign, ve = {};
|
|
28
28
|
function W(r, s, h) {
|
|
29
29
|
this.props = r, this.context = s, this.refs = ve, this.updater = h || Y;
|
|
30
30
|
}
|
|
@@ -41,11 +41,11 @@ function hn() {
|
|
|
41
41
|
this.props = r, this.context = s, this.refs = ve, this.updater = h || Y;
|
|
42
42
|
}
|
|
43
43
|
var ae = oe.prototype = new ge();
|
|
44
|
-
ae.constructor = oe,
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
var _, E = {},
|
|
48
|
-
if (s != null) for (_ in s.ref !== void 0 && (k = s.ref), s.key !== void 0 && (
|
|
44
|
+
ae.constructor = oe, Z(ae, W.prototype), ae.isPureReactComponent = !0;
|
|
45
|
+
var B = Array.isArray, F = Object.prototype.hasOwnProperty, z = { current: null }, Q = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
46
|
+
function re(r, s, h) {
|
|
47
|
+
var _, E = {}, j = null, k = null;
|
|
48
|
+
if (s != null) for (_ in s.ref !== void 0 && (k = s.ref), s.key !== void 0 && (j = "" + s.key), s) F.call(s, _) && !Q.hasOwnProperty(_) && (E[_] = s[_]);
|
|
49
49
|
var O = arguments.length - 2;
|
|
50
50
|
if (O === 1) E.children = h;
|
|
51
51
|
else if (1 < O) {
|
|
@@ -53,7 +53,7 @@ function hn() {
|
|
|
53
53
|
E.children = C;
|
|
54
54
|
}
|
|
55
55
|
if (r && r.defaultProps) for (_ in O = r.defaultProps, O) E[_] === void 0 && (E[_] = O[_]);
|
|
56
|
-
return { $$typeof: c, type: r, key:
|
|
56
|
+
return { $$typeof: c, type: r, key: j, ref: k, props: E, _owner: z.current };
|
|
57
57
|
}
|
|
58
58
|
function _e(r, s) {
|
|
59
59
|
return { $$typeof: c, type: r.type, key: s, ref: r.ref, props: r.props, _owner: r._owner };
|
|
@@ -72,11 +72,11 @@ function hn() {
|
|
|
72
72
|
return typeof r == "object" && r !== null && r.key != null ? Me("" + r.key) : s.toString(36);
|
|
73
73
|
}
|
|
74
74
|
function ie(r, s, h, _, E) {
|
|
75
|
-
var
|
|
76
|
-
(
|
|
75
|
+
var j = typeof r;
|
|
76
|
+
(j === "undefined" || j === "boolean") && (r = null);
|
|
77
77
|
var k = !1;
|
|
78
78
|
if (r === null) k = !0;
|
|
79
|
-
else switch (
|
|
79
|
+
else switch (j) {
|
|
80
80
|
case "string":
|
|
81
81
|
case "number":
|
|
82
82
|
k = !0;
|
|
@@ -88,26 +88,26 @@ function hn() {
|
|
|
88
88
|
k = !0;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
if (k) return k = r, E = E(k), r = _ === "" ? "." + pe(k, 0) : _,
|
|
91
|
+
if (k) return k = r, E = E(k), r = _ === "" ? "." + pe(k, 0) : _, B(E) ? (h = "", r != null && (h = r.replace(be, "$&/") + "/"), ie(E, s, h, "", function(L) {
|
|
92
92
|
return L;
|
|
93
93
|
})) : E != null && (de(E) && (E = _e(E, h + (!E.key || k && k.key === E.key ? "" : ("" + E.key).replace(be, "$&/") + "/") + r)), s.push(E)), 1;
|
|
94
|
-
if (k = 0, _ = _ === "" ? "." : _ + ":",
|
|
95
|
-
|
|
96
|
-
var C = _ + pe(
|
|
97
|
-
k += ie(
|
|
94
|
+
if (k = 0, _ = _ === "" ? "." : _ + ":", B(r)) for (var O = 0; O < r.length; O++) {
|
|
95
|
+
j = r[O];
|
|
96
|
+
var C = _ + pe(j, O);
|
|
97
|
+
k += ie(j, s, h, C, E);
|
|
98
98
|
}
|
|
99
|
-
else if (C =
|
|
100
|
-
else if (
|
|
99
|
+
else if (C = G(r), typeof C == "function") for (r = C.call(r), O = 0; !(j = r.next()).done; ) j = j.value, C = _ + pe(j, O++), k += ie(j, s, h, C, E);
|
|
100
|
+
else if (j === "object") throw s = String(r), Error("Objects are not valid as a React child (found: " + (s === "[object Object]" ? "object with keys {" + Object.keys(r).join(", ") + "}" : s) + "). If you meant to render a collection of children, use an array instead.");
|
|
101
101
|
return k;
|
|
102
102
|
}
|
|
103
103
|
function H(r, s, h) {
|
|
104
104
|
if (r == null) return r;
|
|
105
105
|
var _ = [], E = 0;
|
|
106
|
-
return ie(r, _, "", "", function(
|
|
107
|
-
return s.call(h,
|
|
106
|
+
return ie(r, _, "", "", function(j) {
|
|
107
|
+
return s.call(h, j, E++);
|
|
108
108
|
}), _;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function X(r) {
|
|
111
111
|
if (r._status === -1) {
|
|
112
112
|
var s = r._result;
|
|
113
113
|
s = s(), s.then(function(h) {
|
|
@@ -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 f = { current: null },
|
|
122
|
+
var f = { current: null }, ne = { transition: null }, Ee = { ReactCurrentDispatcher: f, ReactCurrentBatchConfig: ne, ReactCurrentOwner: z };
|
|
123
123
|
function se() {
|
|
124
124
|
throw Error("act(...) is not supported in production builds of React.");
|
|
125
125
|
}
|
|
@@ -139,12 +139,12 @@ 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 = p, M.Profiler = g, M.PureComponent = oe, M.StrictMode = m, M.Suspense =
|
|
142
|
+
} }, M.Component = W, M.Fragment = p, M.Profiler = g, M.PureComponent = oe, M.StrictMode = m, 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
|
-
var _ =
|
|
144
|
+
var _ = Z({}, r.props), E = r.key, j = r.ref, k = r._owner;
|
|
145
145
|
if (s != null) {
|
|
146
|
-
if (s.ref !== void 0 && (
|
|
147
|
-
for (C in s)
|
|
146
|
+
if (s.ref !== void 0 && (j = s.ref, k = z.current), s.key !== void 0 && (E = "" + s.key), r.type && r.type.defaultProps) var O = r.type.defaultProps;
|
|
147
|
+
for (C in s) F.call(s, C) && !Q.hasOwnProperty(C) && (_[C] = s[C] === void 0 && O !== void 0 ? O[C] : s[C]);
|
|
148
148
|
}
|
|
149
149
|
var C = arguments.length - 2;
|
|
150
150
|
if (C === 1) _.children = h;
|
|
@@ -153,27 +153,27 @@ function hn() {
|
|
|
153
153
|
for (var L = 0; L < C; L++) O[L] = arguments[L + 2];
|
|
154
154
|
_.children = O;
|
|
155
155
|
}
|
|
156
|
-
return { $$typeof: c, type: r.type, key: E, ref:
|
|
156
|
+
return { $$typeof: c, type: r.type, key: E, ref: j, props: _, _owner: k };
|
|
157
157
|
}, M.createContext = function(r) {
|
|
158
|
-
return r = { $$typeof:
|
|
159
|
-
}, M.createElement =
|
|
160
|
-
var s =
|
|
158
|
+
return r = { $$typeof: I, _currentValue: r, _currentValue2: r, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, r.Provider = { $$typeof: b, _context: r }, r.Consumer = r;
|
|
159
|
+
}, M.createElement = re, M.createFactory = function(r) {
|
|
160
|
+
var s = re.bind(null, r);
|
|
161
161
|
return s.type = r, s;
|
|
162
162
|
}, M.createRef = function() {
|
|
163
163
|
return { current: null };
|
|
164
164
|
}, M.forwardRef = function(r) {
|
|
165
|
-
return { $$typeof:
|
|
165
|
+
return { $$typeof: P, render: r };
|
|
166
166
|
}, M.isValidElement = de, M.lazy = function(r) {
|
|
167
|
-
return { $$typeof:
|
|
167
|
+
return { $$typeof: V, _payload: { _status: -1, _result: r }, _init: X };
|
|
168
168
|
}, M.memo = function(r, s) {
|
|
169
169
|
return { $$typeof: q, type: r, compare: s === void 0 ? null : s };
|
|
170
170
|
}, M.startTransition = function(r) {
|
|
171
|
-
var s =
|
|
172
|
-
|
|
171
|
+
var s = ne.transition;
|
|
172
|
+
ne.transition = {};
|
|
173
173
|
try {
|
|
174
174
|
r();
|
|
175
175
|
} finally {
|
|
176
|
-
|
|
176
|
+
ne.transition = s;
|
|
177
177
|
}
|
|
178
178
|
}, M.unstable_act = se, M.useCallback = function(r, s) {
|
|
179
179
|
return f.current.useCallback(r, s);
|
|
@@ -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 p = "18.3.1", m = Symbol.for("react.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"),
|
|
225
|
+
var p = "18.3.1", m = 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;
|
|
@@ -235,52 +235,52 @@ function vn() {
|
|
|
235
235
|
* @type {ReactComponent}
|
|
236
236
|
*/
|
|
237
237
|
current: null
|
|
238
|
-
},
|
|
238
|
+
}, B = {
|
|
239
239
|
transition: null
|
|
240
|
-
},
|
|
240
|
+
}, F = {
|
|
241
241
|
current: null,
|
|
242
242
|
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
|
|
243
243
|
isBatchingLegacy: !1,
|
|
244
244
|
didScheduleLegacyUpdate: !1
|
|
245
|
-
},
|
|
245
|
+
}, z = {
|
|
246
246
|
/**
|
|
247
247
|
* @internal
|
|
248
248
|
* @type {ReactComponent}
|
|
249
249
|
*/
|
|
250
250
|
current: null
|
|
251
|
-
},
|
|
251
|
+
}, Q = {}, re = null;
|
|
252
252
|
function _e(e) {
|
|
253
|
-
|
|
253
|
+
re = e;
|
|
254
254
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
},
|
|
255
|
+
Q.setExtraStackFrame = function(e) {
|
|
256
|
+
re = e;
|
|
257
|
+
}, Q.getCurrentStack = null, Q.getStackAddendum = function() {
|
|
258
258
|
var e = "";
|
|
259
|
-
|
|
260
|
-
var t =
|
|
259
|
+
re && (e += re);
|
|
260
|
+
var t = Q.getCurrentStack;
|
|
261
261
|
return t && (e += t() || ""), e;
|
|
262
262
|
};
|
|
263
263
|
var de = !1, Me = !1, be = !1, pe = !1, ie = !1, H = {
|
|
264
264
|
ReactCurrentDispatcher: ae,
|
|
265
|
-
ReactCurrentBatchConfig:
|
|
266
|
-
ReactCurrentOwner:
|
|
265
|
+
ReactCurrentBatchConfig: B,
|
|
266
|
+
ReactCurrentOwner: z
|
|
267
267
|
};
|
|
268
|
-
H.ReactDebugCurrentFrame =
|
|
269
|
-
function
|
|
268
|
+
H.ReactDebugCurrentFrame = Q, H.ReactCurrentActQueue = F;
|
|
269
|
+
function X(e) {
|
|
270
270
|
{
|
|
271
271
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
|
|
272
272
|
n[o - 1] = arguments[o];
|
|
273
|
-
|
|
273
|
+
ne("warn", e, n);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
function f(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];
|
|
280
|
-
|
|
280
|
+
ne("error", e, n);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function ne(e, t, n) {
|
|
284
284
|
{
|
|
285
285
|
var o = H.ReactDebugCurrentFrame, u = o.getStackAddendum();
|
|
286
286
|
u !== "" && (t += "%s", n = n.concat([u]));
|
|
@@ -375,15 +375,15 @@ function vn() {
|
|
|
375
375
|
var E = {
|
|
376
376
|
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
377
377
|
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
378
|
-
},
|
|
378
|
+
}, j = function(e, t) {
|
|
379
379
|
Object.defineProperty(_.prototype, e, {
|
|
380
380
|
get: function() {
|
|
381
|
-
|
|
381
|
+
X("%s(...) is deprecated in plain JavaScript React classes. %s", t[0], t[1]);
|
|
382
382
|
}
|
|
383
383
|
});
|
|
384
384
|
};
|
|
385
385
|
for (var k in E)
|
|
386
|
-
E.hasOwnProperty(k) &&
|
|
386
|
+
E.hasOwnProperty(k) && j(k, E[k]);
|
|
387
387
|
}
|
|
388
388
|
function O() {
|
|
389
389
|
}
|
|
@@ -403,13 +403,13 @@ function vn() {
|
|
|
403
403
|
function we(e) {
|
|
404
404
|
return Dt(e);
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function Ft(e) {
|
|
407
407
|
{
|
|
408
408
|
var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
409
409
|
return n;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function $t(e) {
|
|
413
413
|
try {
|
|
414
414
|
return We(e), !1;
|
|
415
415
|
} catch {
|
|
@@ -420,8 +420,8 @@ function vn() {
|
|
|
420
420
|
return "" + e;
|
|
421
421
|
}
|
|
422
422
|
function Ce(e) {
|
|
423
|
-
if (
|
|
424
|
-
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
423
|
+
if ($t(e))
|
|
424
|
+
return f("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;
|
|
@@ -430,10 +430,10 @@ function vn() {
|
|
|
430
430
|
var u = t.displayName || t.name || "";
|
|
431
431
|
return u !== "" ? n + "(" + u + ")" : n;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Be(e) {
|
|
434
434
|
return e.displayName || "Context";
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function ee(e) {
|
|
437
437
|
if (e == null)
|
|
438
438
|
return null;
|
|
439
439
|
if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -445,32 +445,32 @@ function vn() {
|
|
|
445
445
|
return "Fragment";
|
|
446
446
|
case g:
|
|
447
447
|
return "Portal";
|
|
448
|
-
case
|
|
448
|
+
case P:
|
|
449
449
|
return "Profiler";
|
|
450
|
-
case
|
|
450
|
+
case I:
|
|
451
451
|
return "StrictMode";
|
|
452
|
-
case
|
|
452
|
+
case U:
|
|
453
453
|
return "Suspense";
|
|
454
|
-
case
|
|
454
|
+
case G:
|
|
455
455
|
return "SuspenseList";
|
|
456
456
|
}
|
|
457
457
|
if (typeof e == "object")
|
|
458
458
|
switch (e.$$typeof) {
|
|
459
459
|
case q:
|
|
460
460
|
var t = e;
|
|
461
|
-
return
|
|
462
|
-
case
|
|
461
|
+
return Be(t) + ".Consumer";
|
|
462
|
+
case $:
|
|
463
463
|
var n = e;
|
|
464
|
-
return
|
|
465
|
-
case
|
|
464
|
+
return Be(n._context) + ".Provider";
|
|
465
|
+
case V:
|
|
466
466
|
return xt(e, e.render, "ForwardRef");
|
|
467
467
|
case Y:
|
|
468
468
|
var o = e.displayName || null;
|
|
469
|
-
return o !== null ? o :
|
|
470
|
-
case
|
|
469
|
+
return o !== null ? o : ee(e.type) || "Memo";
|
|
470
|
+
case Z: {
|
|
471
471
|
var u = e, d = u._payload, l = u._init;
|
|
472
472
|
try {
|
|
473
|
-
return
|
|
473
|
+
return ee(l(d));
|
|
474
474
|
} catch {
|
|
475
475
|
return null;
|
|
476
476
|
}
|
|
@@ -478,7 +478,7 @@ function vn() {
|
|
|
478
478
|
}
|
|
479
479
|
return null;
|
|
480
480
|
}
|
|
481
|
-
var ye = Object.prototype.hasOwnProperty,
|
|
481
|
+
var ye = Object.prototype.hasOwnProperty, Ke = {
|
|
482
482
|
key: !0,
|
|
483
483
|
ref: !0,
|
|
484
484
|
__self: !0,
|
|
@@ -520,12 +520,12 @@ function vn() {
|
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
522
|
function Ut(e) {
|
|
523
|
-
if (typeof e.ref == "string" &&
|
|
524
|
-
var t =
|
|
523
|
+
if (typeof e.ref == "string" && z.current && e.__self && z.current.stateNode !== e.__self) {
|
|
524
|
+
var t = ee(z.current.type);
|
|
525
525
|
De[t] || (f('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
|
|
528
|
+
var Fe = function(e, t, n, o, u, d, l) {
|
|
529
529
|
var y = {
|
|
530
530
|
// This tag allows us to uniquely identify this as a React Element
|
|
531
531
|
$$typeof: m,
|
|
@@ -554,12 +554,12 @@ function vn() {
|
|
|
554
554
|
value: u
|
|
555
555
|
}), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
|
|
556
556
|
};
|
|
557
|
-
function
|
|
557
|
+
function Vt(e, t, n) {
|
|
558
558
|
var o, u = {}, d = null, l = null, y = null, v = null;
|
|
559
559
|
if (t != null) {
|
|
560
560
|
Ze(t) && (l = t.ref, Ut(t)), Qe(t) && (Ce(t.key), d = "" + t.key), y = t.__self === void 0 ? null : t.__self, v = t.__source === void 0 ? null : t.__source;
|
|
561
561
|
for (o in t)
|
|
562
|
-
ye.call(t, o) && !
|
|
562
|
+
ye.call(t, o) && !Ke.hasOwnProperty(o) && (u[o] = t[o]);
|
|
563
563
|
}
|
|
564
564
|
var w = arguments.length - 2;
|
|
565
565
|
if (w === 1)
|
|
@@ -578,10 +578,10 @@ function vn() {
|
|
|
578
578
|
var A = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
579
579
|
d && Lt(u, A), l && Nt(u, A);
|
|
580
580
|
}
|
|
581
|
-
return
|
|
581
|
+
return Fe(e, d, l, y, v, z.current, u);
|
|
582
582
|
}
|
|
583
|
-
function
|
|
584
|
-
var n =
|
|
583
|
+
function zt(e, t) {
|
|
584
|
+
var n = Fe(e.type, t, e.ref, e._self, e._source, e._owner, e.props);
|
|
585
585
|
return n;
|
|
586
586
|
}
|
|
587
587
|
function qt(e, t, n) {
|
|
@@ -589,11 +589,11 @@ function vn() {
|
|
|
589
589
|
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
|
|
590
590
|
var o, u = s({}, e.props), d = e.key, l = e.ref, y = e._self, v = e._source, w = e._owner;
|
|
591
591
|
if (t != null) {
|
|
592
|
-
Ze(t) && (l = t.ref, w =
|
|
592
|
+
Ze(t) && (l = t.ref, w = z.current), Qe(t) && (Ce(t.key), d = "" + t.key);
|
|
593
593
|
var R;
|
|
594
594
|
e.type && e.type.defaultProps && (R = e.type.defaultProps);
|
|
595
595
|
for (o in t)
|
|
596
|
-
ye.call(t, o) && !
|
|
596
|
+
ye.call(t, o) && !Ke.hasOwnProperty(o) && (t[o] === void 0 && R !== void 0 ? u[o] = R[o] : u[o] = t[o]);
|
|
597
597
|
}
|
|
598
598
|
var S = arguments.length - 2;
|
|
599
599
|
if (S === 1)
|
|
@@ -603,7 +603,7 @@ function vn() {
|
|
|
603
603
|
T[A] = arguments[A + 2];
|
|
604
604
|
u.children = T;
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return Fe(e.type, d, l, y, v, w, u);
|
|
607
607
|
}
|
|
608
608
|
function ue(e) {
|
|
609
609
|
return typeof e == "object" && e !== null && e.$$typeof === m;
|
|
@@ -622,7 +622,7 @@ function vn() {
|
|
|
622
622
|
function tt(e) {
|
|
623
623
|
return e.replace(Wt, "$&/");
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function $e(e, t) {
|
|
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) {
|
|
@@ -645,13 +645,13 @@ function vn() {
|
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
647
|
if (l) {
|
|
648
|
-
var y = e, v = u(y), w = o === "" ? Xe +
|
|
648
|
+
var y = e, v = u(y), w = o === "" ? Xe + $e(y, 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 && (!y || y.key !== v.key) && Ce(v.key), v =
|
|
654
|
+
} else v != null && (ue(v) && (v.key && (!y || y.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
|
|
@@ -664,17 +664,17 @@ function vn() {
|
|
|
664
664
|
)), t.push(v));
|
|
665
665
|
return 1;
|
|
666
666
|
}
|
|
667
|
-
var S, T, A = 0,
|
|
667
|
+
var S, T, A = 0, x = o === "" ? Xe : o + Yt;
|
|
668
668
|
if (we(e))
|
|
669
669
|
for (var Ae = 0; Ae < e.length; Ae++)
|
|
670
|
-
S = e[Ae], T =
|
|
670
|
+
S = e[Ae], T = x + $e(S, Ae), A += Re(S, t, n, T, u);
|
|
671
671
|
else {
|
|
672
672
|
var He = oe(e);
|
|
673
673
|
if (typeof He == "function") {
|
|
674
674
|
var kt = e;
|
|
675
|
-
He === kt.entries && (et ||
|
|
676
|
-
for (var
|
|
677
|
-
S = Ot.value, T =
|
|
675
|
+
He === kt.entries && (et || X("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), et = !0);
|
|
676
|
+
for (var $r = He.call(kt), Ot, xr = 0; !(Ot = $r.next()).done; )
|
|
677
|
+
S = Ot.value, T = x + $e(S, xr++), A += Re(S, t, n, T, u);
|
|
678
678
|
} else if (d === "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.");
|
|
@@ -690,13 +690,13 @@ function vn() {
|
|
|
690
690
|
return t.call(n, d, u++);
|
|
691
691
|
}), o;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function Bt(e) {
|
|
694
694
|
var t = 0;
|
|
695
695
|
return Se(e, function() {
|
|
696
696
|
t++;
|
|
697
697
|
}), t;
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Kt(e, t, n) {
|
|
700
700
|
Se(e, function() {
|
|
701
701
|
t.apply(this, arguments);
|
|
702
702
|
}, n);
|
|
@@ -732,7 +732,7 @@ function vn() {
|
|
|
732
732
|
_globalName: null
|
|
733
733
|
};
|
|
734
734
|
t.Provider = {
|
|
735
|
-
$$typeof:
|
|
735
|
+
$$typeof: $,
|
|
736
736
|
_context: t
|
|
737
737
|
};
|
|
738
738
|
var n = !1, o = !1, u = !1;
|
|
@@ -784,7 +784,7 @@ function vn() {
|
|
|
784
784
|
return t.displayName;
|
|
785
785
|
},
|
|
786
786
|
set: function(l) {
|
|
787
|
-
u || (
|
|
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
790
|
}), t.Consumer = d;
|
|
@@ -830,7 +830,7 @@ Your code should look like:
|
|
|
830
830
|
_status: me,
|
|
831
831
|
_result: e
|
|
832
832
|
}, n = {
|
|
833
|
-
$$typeof:
|
|
833
|
+
$$typeof: Z,
|
|
834
834
|
_payload: t,
|
|
835
835
|
_init: Xt
|
|
836
836
|
};
|
|
@@ -866,7 +866,7 @@ Your code should look like:
|
|
|
866
866
|
function tr(e) {
|
|
867
867
|
e != null && e.$$typeof === Y ? f("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? f("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && f("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) && f("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
868
868
|
var t = {
|
|
869
|
-
$$typeof:
|
|
869
|
+
$$typeof: V,
|
|
870
870
|
render: e
|
|
871
871
|
};
|
|
872
872
|
{
|
|
@@ -887,7 +887,7 @@ Your code should look like:
|
|
|
887
887
|
var nt;
|
|
888
888
|
nt = Symbol.for("react.module.reference");
|
|
889
889
|
function ot(e) {
|
|
890
|
-
return !!(typeof e == "string" || typeof e == "function" || e === b || e ===
|
|
890
|
+
return !!(typeof e == "string" || typeof e == "function" || e === b || e === P || ie || e === I || e === U || e === G || pe || e === ve || de || Me || be || typeof e == "object" && e !== null && (e.$$typeof === Z || e.$$typeof === Y || e.$$typeof === $ || e.$$typeof === q || e.$$typeof === V || // This needs to include all possible module reference object
|
|
891
891
|
// types supported by any Flight configuration anywhere since
|
|
892
892
|
// we don't know which Flight build this will end up being used
|
|
893
893
|
// with.
|
|
@@ -1096,29 +1096,29 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1096
1096
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
1097
1097
|
try {
|
|
1098
1098
|
Reflect.construct(l, []);
|
|
1099
|
-
} catch (
|
|
1100
|
-
o =
|
|
1099
|
+
} catch (x) {
|
|
1100
|
+
o = x;
|
|
1101
1101
|
}
|
|
1102
1102
|
Reflect.construct(e, [], l);
|
|
1103
1103
|
} else {
|
|
1104
1104
|
try {
|
|
1105
1105
|
l.call();
|
|
1106
|
-
} catch (
|
|
1107
|
-
o =
|
|
1106
|
+
} catch (x) {
|
|
1107
|
+
o = x;
|
|
1108
1108
|
}
|
|
1109
1109
|
e.call(l.prototype);
|
|
1110
1110
|
}
|
|
1111
1111
|
} else {
|
|
1112
1112
|
try {
|
|
1113
1113
|
throw Error();
|
|
1114
|
-
} catch (
|
|
1115
|
-
o =
|
|
1114
|
+
} catch (x) {
|
|
1115
|
+
o = x;
|
|
1116
1116
|
}
|
|
1117
1117
|
e();
|
|
1118
1118
|
}
|
|
1119
|
-
} catch (
|
|
1120
|
-
if (
|
|
1121
|
-
for (var y =
|
|
1119
|
+
} catch (x) {
|
|
1120
|
+
if (x && o && typeof x.stack == "string") {
|
|
1121
|
+
for (var y = x.stack.split(`
|
|
1122
1122
|
`), v = o.stack.split(`
|
|
1123
1123
|
`), w = y.length - 1, R = v.length - 1; w >= 1 && R >= 0 && y[w] !== v[R]; )
|
|
1124
1124
|
R--;
|
|
@@ -1156,18 +1156,18 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1156
1156
|
if (typeof e == "string")
|
|
1157
1157
|
return ke(e);
|
|
1158
1158
|
switch (e) {
|
|
1159
|
-
case
|
|
1159
|
+
case U:
|
|
1160
1160
|
return ke("Suspense");
|
|
1161
|
-
case
|
|
1161
|
+
case G:
|
|
1162
1162
|
return ke("SuspenseList");
|
|
1163
1163
|
}
|
|
1164
1164
|
if (typeof e == "object")
|
|
1165
1165
|
switch (e.$$typeof) {
|
|
1166
|
-
case
|
|
1166
|
+
case V:
|
|
1167
1167
|
return Er(e.render);
|
|
1168
1168
|
case Y:
|
|
1169
1169
|
return Te(e.type, t, n);
|
|
1170
|
-
case
|
|
1170
|
+
case Z: {
|
|
1171
1171
|
var o = e, u = o._payload, d = o._init;
|
|
1172
1172
|
try {
|
|
1173
1173
|
return Te(d(u), t, n);
|
|
@@ -1211,11 +1211,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1211
1211
|
} else
|
|
1212
1212
|
_e(null);
|
|
1213
1213
|
}
|
|
1214
|
-
var
|
|
1215
|
-
|
|
1214
|
+
var Ve;
|
|
1215
|
+
Ve = !1;
|
|
1216
1216
|
function ht() {
|
|
1217
|
-
if (
|
|
1218
|
-
var e =
|
|
1217
|
+
if (z.current) {
|
|
1218
|
+
var e = ee(z.current.type);
|
|
1219
1219
|
if (e)
|
|
1220
1220
|
return `
|
|
1221
1221
|
|
|
@@ -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 !==
|
|
1256
|
+
e && e._owner && e._owner !== z.current && (o = " It was passed a child from " + ee(e._owner.type) + "."), ce(e), f('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
|
}
|
|
@@ -1282,18 +1282,18 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1282
1282
|
var n;
|
|
1283
1283
|
if (typeof t == "function")
|
|
1284
1284
|
n = t.propTypes;
|
|
1285
|
-
else if (typeof t == "object" && (t.$$typeof ===
|
|
1285
|
+
else if (typeof t == "object" && (t.$$typeof === V || // Note: Memo only checks outer props here.
|
|
1286
1286
|
// Inner props are checked in the reconciler.
|
|
1287
1287
|
t.$$typeof === Y))
|
|
1288
1288
|
n = t.propTypes;
|
|
1289
1289
|
else
|
|
1290
1290
|
return;
|
|
1291
1291
|
if (n) {
|
|
1292
|
-
var o =
|
|
1292
|
+
var o = ee(t);
|
|
1293
1293
|
Cr(n, e.props, "prop", o, e);
|
|
1294
|
-
} else if (t.PropTypes !== void 0 && !
|
|
1295
|
-
|
|
1296
|
-
var u =
|
|
1294
|
+
} else if (t.PropTypes !== void 0 && !Ve) {
|
|
1295
|
+
Ve = !0;
|
|
1296
|
+
var u = ee(t);
|
|
1297
1297
|
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
1298
1298
|
}
|
|
1299
1299
|
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -1319,9 +1319,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1319
1319
|
var d = Sr(t);
|
|
1320
1320
|
d ? u += d : u += ht();
|
|
1321
1321
|
var l;
|
|
1322
|
-
e === null ? l = "null" : we(e) ? l = "array" : e !== void 0 && e.$$typeof === m ? (l = "<" + (
|
|
1322
|
+
e === null ? l = "null" : we(e) ? l = "array" : e !== void 0 && e.$$typeof === m ? (l = "<" + (ee(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, f("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 y =
|
|
1324
|
+
var y = Vt.apply(this, arguments);
|
|
1325
1325
|
if (y == null)
|
|
1326
1326
|
return y;
|
|
1327
1327
|
if (o)
|
|
@@ -1332,10 +1332,10 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1332
1332
|
var wt = !1;
|
|
1333
1333
|
function Tr(e) {
|
|
1334
1334
|
var t = Et.bind(null, e);
|
|
1335
|
-
return t.type = e, wt || (wt = !0,
|
|
1335
|
+
return t.type = e, wt || (wt = !0, X("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(t, "type", {
|
|
1336
1336
|
enumerable: !1,
|
|
1337
1337
|
get: function() {
|
|
1338
|
-
return
|
|
1338
|
+
return X("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
|
|
1339
1339
|
value: e
|
|
1340
1340
|
}), e;
|
|
1341
1341
|
}
|
|
@@ -1347,16 +1347,16 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1347
1347
|
return bt(o), o;
|
|
1348
1348
|
}
|
|
1349
1349
|
function Ir(e, t) {
|
|
1350
|
-
var n =
|
|
1351
|
-
|
|
1352
|
-
var o =
|
|
1353
|
-
|
|
1350
|
+
var n = B.transition;
|
|
1351
|
+
B.transition = {};
|
|
1352
|
+
var o = B.transition;
|
|
1353
|
+
B.transition._updatedFibers = /* @__PURE__ */ new Set();
|
|
1354
1354
|
try {
|
|
1355
1355
|
e();
|
|
1356
1356
|
} finally {
|
|
1357
|
-
if (
|
|
1357
|
+
if (B.transition = n, n === null && o._updatedFibers) {
|
|
1358
1358
|
var u = o._updatedFibers.size;
|
|
1359
|
-
u > 10 &&
|
|
1359
|
+
u > 10 && X("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), o._updatedFibers.clear();
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
@@ -1379,25 +1379,25 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1379
1379
|
function St(e) {
|
|
1380
1380
|
{
|
|
1381
1381
|
var t = le;
|
|
1382
|
-
le++,
|
|
1383
|
-
var n =
|
|
1382
|
+
le++, F.current === null && (F.current = []);
|
|
1383
|
+
var n = F.isBatchingLegacy, o;
|
|
1384
1384
|
try {
|
|
1385
|
-
if (
|
|
1386
|
-
var u =
|
|
1387
|
-
u !== null && (
|
|
1385
|
+
if (F.isBatchingLegacy = !0, o = e(), !n && F.didScheduleLegacyUpdate) {
|
|
1386
|
+
var u = F.current;
|
|
1387
|
+
u !== null && (F.didScheduleLegacyUpdate = !1, Ye(u));
|
|
1388
1388
|
}
|
|
1389
1389
|
} catch (T) {
|
|
1390
1390
|
throw je(t), T;
|
|
1391
1391
|
} finally {
|
|
1392
|
-
|
|
1392
|
+
F.isBatchingLegacy = n;
|
|
1393
1393
|
}
|
|
1394
1394
|
if (o !== null && typeof o == "object" && typeof o.then == "function") {
|
|
1395
1395
|
var d = o, l = !1, y = {
|
|
1396
1396
|
then: function(T, A) {
|
|
1397
|
-
l = !0, d.then(function(
|
|
1398
|
-
je(t), le === 0 ?
|
|
1399
|
-
}, function(
|
|
1400
|
-
je(t), A(
|
|
1397
|
+
l = !0, d.then(function(x) {
|
|
1398
|
+
je(t), le === 0 ? ze(x, T, A) : T(x);
|
|
1399
|
+
}, function(x) {
|
|
1400
|
+
je(t), A(x);
|
|
1401
1401
|
});
|
|
1402
1402
|
}
|
|
1403
1403
|
};
|
|
@@ -1408,11 +1408,11 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1408
1408
|
} else {
|
|
1409
1409
|
var v = o;
|
|
1410
1410
|
if (je(t), le === 0) {
|
|
1411
|
-
var w =
|
|
1412
|
-
w !== null && (Ye(w),
|
|
1411
|
+
var w = F.current;
|
|
1412
|
+
w !== null && (Ye(w), F.current = null);
|
|
1413
1413
|
var R = {
|
|
1414
1414
|
then: function(T, A) {
|
|
1415
|
-
|
|
1415
|
+
F.current === null ? (F.current = [], ze(v, T, A)) : T(v);
|
|
1416
1416
|
}
|
|
1417
1417
|
};
|
|
1418
1418
|
return R;
|
|
@@ -1430,13 +1430,13 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1430
1430
|
function je(e) {
|
|
1431
1431
|
e !== le - 1 && f("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
|
-
function
|
|
1433
|
+
function ze(e, t, n) {
|
|
1434
1434
|
{
|
|
1435
|
-
var o =
|
|
1435
|
+
var o = F.current;
|
|
1436
1436
|
if (o !== null)
|
|
1437
1437
|
try {
|
|
1438
1438
|
Ye(o), jr(function() {
|
|
1439
|
-
o.length === 0 ? (
|
|
1439
|
+
o.length === 0 ? (F.current = null, t(e)) : ze(e, t, n);
|
|
1440
1440
|
});
|
|
1441
1441
|
} catch (u) {
|
|
1442
1442
|
n(u);
|
|
@@ -1465,14 +1465,14 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
var Ar = Et, Mr = Pr, Dr = Tr,
|
|
1468
|
+
var Ar = Et, Mr = Pr, Dr = Tr, Fr = {
|
|
1469
1469
|
map: Se,
|
|
1470
|
-
forEach:
|
|
1471
|
-
count:
|
|
1470
|
+
forEach: Kt,
|
|
1471
|
+
count: Bt,
|
|
1472
1472
|
toArray: Gt,
|
|
1473
1473
|
only: Jt
|
|
1474
1474
|
};
|
|
1475
|
-
a.Children =
|
|
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 = p, 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
|
}
|
|
@@ -1481,11 +1481,11 @@ var gn = Nr.exports, _n = gn;
|
|
|
1481
1481
|
function Xr(c, a, p) {
|
|
1482
1482
|
var m = typeof a == "function";
|
|
1483
1483
|
_n.useEffect(function() {
|
|
1484
|
-
var g, b = !0,
|
|
1484
|
+
var g, b = !0, I = c(function() {
|
|
1485
1485
|
return b;
|
|
1486
1486
|
});
|
|
1487
|
-
return Promise.resolve(
|
|
1488
|
-
g =
|
|
1487
|
+
return Promise.resolve(I).then(function(P) {
|
|
1488
|
+
g = P;
|
|
1489
1489
|
}), function() {
|
|
1490
1490
|
b = !1, m && a(g);
|
|
1491
1491
|
};
|
|
@@ -1532,32 +1532,34 @@ ${c.map((a) => `- ${a.path.join("/")}: ${a.message}`).join(`
|
|
|
1532
1532
|
}
|
|
1533
1533
|
else
|
|
1534
1534
|
return c + "";
|
|
1535
|
-
}, fe = i.string().trim().min(1, { message: "Cannot be blank" }),
|
|
1535
|
+
}, fe = i.string().trim().min(1, { message: "Cannot be blank" }), te = i.string().trim().optional(), Vr = (c) => i.nullable(c.optional());
|
|
1536
1536
|
var It = /* @__PURE__ */ ((c) => (c.FIRST_NAME = "firstName", c.LAST_NAME = "lastName", c.EMAIL = "email", c.ZIP_CODE = "zipCode", c.CITY = "city", c.STATE = "state", c.COUNTRY = "country", c.ADDRESS = "address", c.PHONE = "phone", c.PROMOTION_CODE = "promotionCode", c))(It || {});
|
|
1537
1537
|
const tn = i.nativeEnum(It);
|
|
1538
1538
|
var rn = /* @__PURE__ */ ((c) => (c.CARD_NUMBER = "cardNumber", c.CARD_EXPIRY = "cardExpiry", c.CARD_CVC = "cardCvc", c))(rn || {});
|
|
1539
1539
|
const nn = i.nativeEnum(rn), Tn = i.union([tn, nn]), on = i.object({
|
|
1540
1540
|
provider: i.string(),
|
|
1541
|
-
processor_name:
|
|
1542
|
-
metadata:
|
|
1541
|
+
processor_name: Vr(i.string()),
|
|
1542
|
+
metadata: Vr(i.record(i.string(), i.any()))
|
|
1543
1543
|
}), Pn = i.object({
|
|
1544
1544
|
id: i.string()
|
|
1545
1545
|
});
|
|
1546
1546
|
i.object({
|
|
1547
|
-
cardNumber:
|
|
1548
|
-
expiry:
|
|
1549
|
-
cvc:
|
|
1547
|
+
cardNumber: te,
|
|
1548
|
+
expiry: te,
|
|
1549
|
+
cvc: te
|
|
1550
1550
|
});
|
|
1551
1551
|
i.object({
|
|
1552
|
-
backgroundColor:
|
|
1553
|
-
color:
|
|
1554
|
-
fontFamily:
|
|
1555
|
-
fontSize:
|
|
1556
|
-
fontWeight:
|
|
1557
|
-
margin:
|
|
1558
|
-
padding:
|
|
1552
|
+
backgroundColor: te,
|
|
1553
|
+
color: te,
|
|
1554
|
+
fontFamily: te,
|
|
1555
|
+
fontSize: te,
|
|
1556
|
+
fontWeight: te,
|
|
1557
|
+
margin: te,
|
|
1558
|
+
padding: te,
|
|
1559
|
+
letterSpacing: te,
|
|
1560
|
+
lineHeight: te
|
|
1559
1561
|
});
|
|
1560
|
-
const
|
|
1562
|
+
const J = i.enum([
|
|
1561
1563
|
// Element -> Form
|
|
1562
1564
|
"LAYOUT",
|
|
1563
1565
|
"LOADED",
|
|
@@ -1578,59 +1580,59 @@ const G = i.enum([
|
|
|
1578
1580
|
"TOKENIZE",
|
|
1579
1581
|
"CHECKOUT",
|
|
1580
1582
|
"START_PAYMENT_FLOW"
|
|
1581
|
-
]), In =
|
|
1583
|
+
]), In = J.extract(["TOKENIZE_STARTED", "CHECKOUT_STARTED"]), jn = i.object({ type: In }), An = J.extract(["BLUR", "FOCUS", "CHANGE"]), Mn = i.object({
|
|
1582
1584
|
type: An,
|
|
1583
1585
|
elementType: nn
|
|
1584
|
-
}), Dn =
|
|
1586
|
+
}), Dn = J.extract(["LOAD_ERROR", "TOKENIZE_ERROR", "CHECKOUT_ERROR"]), Fn = i.object({
|
|
1585
1587
|
type: Dn,
|
|
1586
1588
|
message: fe
|
|
1587
|
-
}),
|
|
1588
|
-
type:
|
|
1589
|
+
}), $n = J.extract(["VALIDATION_ERROR"]), xn = i.object({
|
|
1590
|
+
type: $n,
|
|
1589
1591
|
elementType: Tn,
|
|
1590
1592
|
errors: i.array(i.string())
|
|
1591
1593
|
}), Ln = i.object({
|
|
1592
|
-
type: i.literal(
|
|
1594
|
+
type: i.literal(J.enum.LAYOUT),
|
|
1593
1595
|
height: fe
|
|
1594
1596
|
}), Nn = i.object({
|
|
1595
|
-
type: i.literal(
|
|
1597
|
+
type: i.literal(J.enum.LOADED),
|
|
1596
1598
|
sessionId: fe,
|
|
1597
1599
|
totalAmountAtoms: i.number(),
|
|
1598
|
-
currency:
|
|
1600
|
+
currency: te,
|
|
1599
1601
|
checkoutPaymentMethods: i.array(on)
|
|
1600
1602
|
}), Un = i.object({
|
|
1601
|
-
type: i.literal(
|
|
1603
|
+
type: i.literal(J.enum.PAYMENT_FLOW_STARTED),
|
|
1602
1604
|
nextActionMetadata: i.record(i.string(), i.any()),
|
|
1603
1605
|
paymentFlowMetadata: i.any().optional(),
|
|
1604
1606
|
startPFMetadata: i.optional(i.record(i.string(), i.any()))
|
|
1605
|
-
}), zn = i.object({
|
|
1606
|
-
type: i.literal(G.enum.SETUP_PAYMENT_METHOD_SUCCESS),
|
|
1607
|
-
paymentMethodId: i.string()
|
|
1608
1607
|
}), Vn = i.object({
|
|
1608
|
+
type: i.literal(J.enum.SETUP_PAYMENT_METHOD_SUCCESS),
|
|
1609
|
+
paymentMethodId: i.string()
|
|
1610
|
+
}), zn = i.object({
|
|
1609
1611
|
firstName: fe,
|
|
1610
1612
|
lastName: fe,
|
|
1611
1613
|
email: fe,
|
|
1612
1614
|
zipCode: fe,
|
|
1613
1615
|
country: fe,
|
|
1614
|
-
promotionCode:
|
|
1615
|
-
}), qn =
|
|
1616
|
+
promotionCode: te
|
|
1617
|
+
}), qn = J.extract(["TOKENIZE", "CHECKOUT", "START_PAYMENT_FLOW"]), an = i.object({
|
|
1616
1618
|
type: qn,
|
|
1617
1619
|
sessionId: fe,
|
|
1618
1620
|
checkoutPaymentMethod: on,
|
|
1619
1621
|
paymentFlowMetadata: i.any().optional(),
|
|
1620
1622
|
doNotUseLegacyCCFlow: i.boolean().optional(),
|
|
1621
|
-
existingCCPMId:
|
|
1622
|
-
}).extend(
|
|
1623
|
-
type: i.literal(
|
|
1623
|
+
existingCCPMId: te
|
|
1624
|
+
}).extend(zn.shape), Yn = i.object({
|
|
1625
|
+
type: i.literal(J.enum.TOKENIZE_SUCCESS),
|
|
1624
1626
|
isReadyForCheckout: i.boolean()
|
|
1625
1627
|
}), Hn = i.object({
|
|
1626
|
-
type: i.literal(
|
|
1628
|
+
type: i.literal(J.enum.CHECKOUT_SUCCESS),
|
|
1627
1629
|
invoiceUrls: i.array(i.string()),
|
|
1628
1630
|
subscriptionIds: i.array(i.string()),
|
|
1629
1631
|
customerId: i.string()
|
|
1630
1632
|
}), Wn = i.discriminatedUnion("type", [
|
|
1631
1633
|
jn,
|
|
1632
1634
|
Mn,
|
|
1633
|
-
|
|
1635
|
+
Fn,
|
|
1634
1636
|
xn,
|
|
1635
1637
|
Ln,
|
|
1636
1638
|
Nn,
|
|
@@ -1638,8 +1640,8 @@ const G = i.enum([
|
|
|
1638
1640
|
Yn,
|
|
1639
1641
|
Hn,
|
|
1640
1642
|
Un,
|
|
1641
|
-
|
|
1642
|
-
]),
|
|
1643
|
+
Vn
|
|
1644
|
+
]), Bn = i.object({
|
|
1643
1645
|
payload: Wn,
|
|
1644
1646
|
nonce: fe,
|
|
1645
1647
|
formId: fe,
|
|
@@ -1655,9 +1657,9 @@ i.object({
|
|
|
1655
1657
|
});
|
|
1656
1658
|
i.object({
|
|
1657
1659
|
secure_token: i.string(),
|
|
1658
|
-
existing_cc_pm_id:
|
|
1660
|
+
existing_cc_pm_id: Vr(i.string())
|
|
1659
1661
|
});
|
|
1660
|
-
const
|
|
1662
|
+
const Kn = i.object({
|
|
1661
1663
|
payment_methods: i.array(Pn)
|
|
1662
1664
|
}), Gn = (c) => {
|
|
1663
1665
|
const a = {};
|
|
@@ -1672,14 +1674,14 @@ const Bn = i.object({
|
|
|
1672
1674
|
}, Jn = {
|
|
1673
1675
|
usd: "usd",
|
|
1674
1676
|
brl: "brl"
|
|
1675
|
-
},
|
|
1677
|
+
}, zr = async (c) => {
|
|
1676
1678
|
for (let a = 0; a < 10; a++)
|
|
1677
1679
|
Wr() || await Zn(500);
|
|
1678
1680
|
if (!Wr())
|
|
1679
1681
|
throw new Error("Stripe JS not found.");
|
|
1680
1682
|
return new Stripe(c);
|
|
1681
1683
|
}, sn = async (c, a, p, m) => {
|
|
1682
|
-
const g = await
|
|
1684
|
+
const g = await zr(c), b = Jn[p.toLowerCase().trim()];
|
|
1683
1685
|
return g.paymentRequest({
|
|
1684
1686
|
// TODO: replace this with stripe account country as soon as we support it
|
|
1685
1687
|
country: "US",
|
|
@@ -1717,7 +1719,7 @@ const Bn = i.object({
|
|
|
1717
1719
|
throw new Error(`Invalid next action metadata format: ${JSON.stringify(p)}`);
|
|
1718
1720
|
if (a.paymentMethod.id !== c.paymentFlowMetadata.stripePmId)
|
|
1719
1721
|
throw new Error(`PM ID mismatch: ${a.paymentMethod.id} != ${c.paymentFlowMetadata.stripePmId}`);
|
|
1720
|
-
const m = await (await
|
|
1722
|
+
const m = await (await zr(p.stripe_pk)).confirmCardSetup(p.client_secret, {
|
|
1721
1723
|
payment_method: c.paymentFlowMetadata.stripePmId
|
|
1722
1724
|
});
|
|
1723
1725
|
if (m.error)
|
|
@@ -1725,41 +1727,41 @@ const Bn = i.object({
|
|
|
1725
1727
|
a.complete("success");
|
|
1726
1728
|
}, to = async (c) => {
|
|
1727
1729
|
var a, p, m, g;
|
|
1728
|
-
const b = c.nextActionMetadata,
|
|
1730
|
+
const b = c.nextActionMetadata, I = await (await zr(b.stripe_pk)).confirmCardSetup(b.client_secret, {
|
|
1729
1731
|
payment_method: b.stripe_pm_id
|
|
1730
|
-
}),
|
|
1731
|
-
if (
|
|
1732
|
-
throw
|
|
1733
|
-
`${((p =
|
|
1732
|
+
}), P = (a = I.setupIntent) == null ? void 0 : a.status;
|
|
1733
|
+
if (P !== "succeeded")
|
|
1734
|
+
throw P === "canceled" ? new Error("Payment cancelled, please click Submit again to pay") : new Error(
|
|
1735
|
+
`${((p = I.error) == null ? void 0 : p.message) ?? ((g = (m = I.setupIntent) == null ? void 0 : m.last_setup_error) == null ? void 0 : g.message) ?? "Payment failed, please click submit again to pay."}`
|
|
1734
1736
|
);
|
|
1735
|
-
}, ro = (c) => JSON.stringify(c), un = (c, a) => Array.from(c.querySelectorAll("
|
|
1737
|
+
}, ro = (c) => JSON.stringify(c), un = (c, a) => Array.from(c.querySelectorAll("[data-opid]") ?? []).reduce((p, m) => {
|
|
1736
1738
|
const g = m.getAttribute("data-opid");
|
|
1737
1739
|
return g ? { ...p, [g]: m.value } : p;
|
|
1738
|
-
}, a), At = (c, a, p, m, g, b,
|
|
1739
|
-
const
|
|
1740
|
+
}, a), At = (c, a, p, m, g, b, I) => {
|
|
1741
|
+
const P = un(p, {
|
|
1740
1742
|
type: c,
|
|
1741
1743
|
sessionId: a,
|
|
1742
1744
|
checkoutPaymentMethod: g,
|
|
1743
|
-
paymentFlowMetadata:
|
|
1745
|
+
paymentFlowMetadata: I,
|
|
1744
1746
|
doNotUseLegacyCCFlow: b
|
|
1745
1747
|
});
|
|
1746
|
-
(g.provider === "apple_pay" || g.provider === "google_pay") && (
|
|
1747
|
-
const
|
|
1748
|
-
if (
|
|
1749
|
-
return
|
|
1748
|
+
(g.provider === "apple_pay" || g.provider === "google_pay" || g.provider === "stripe_link") && (P[It.ZIP_CODE] || (P[It.ZIP_CODE] = "00000"));
|
|
1749
|
+
const $ = an.safeParse(P);
|
|
1750
|
+
if ($.success)
|
|
1751
|
+
return $.data;
|
|
1750
1752
|
{
|
|
1751
|
-
const q =
|
|
1752
|
-
for (const [
|
|
1753
|
-
m(
|
|
1753
|
+
const q = $.error.format(), V = Gn(q);
|
|
1754
|
+
for (const [U, G] of Object.entries(V))
|
|
1755
|
+
m(U, G, U);
|
|
1754
1756
|
return null;
|
|
1755
1757
|
}
|
|
1756
1758
|
}, no = (c) => {
|
|
1757
1759
|
try {
|
|
1758
|
-
return
|
|
1760
|
+
return Bn.parse(c);
|
|
1759
1761
|
} catch (a) {
|
|
1760
1762
|
throw a;
|
|
1761
1763
|
}
|
|
1762
|
-
},
|
|
1764
|
+
}, Br = (c, a, p, m, g) => {
|
|
1763
1765
|
const b = {
|
|
1764
1766
|
payload: m,
|
|
1765
1767
|
nonce: yn(),
|
|
@@ -1778,20 +1780,20 @@ var D = {};
|
|
|
1778
1780
|
* This source code is licensed under the MIT license found in the
|
|
1779
1781
|
* LICENSE file in the root directory of this source tree.
|
|
1780
1782
|
*/
|
|
1781
|
-
var
|
|
1783
|
+
var Kr;
|
|
1782
1784
|
function oo() {
|
|
1783
|
-
if (
|
|
1784
|
-
|
|
1785
|
-
var c = Symbol.for("react.element"), a = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), b = Symbol.for("react.provider"),
|
|
1786
|
-
function
|
|
1787
|
-
return r === null || typeof r != "object" ? null : (r =
|
|
1785
|
+
if (Kr) return D;
|
|
1786
|
+
Kr = 1;
|
|
1787
|
+
var c = Symbol.for("react.element"), a = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), m = 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
|
+
function G(r) {
|
|
1789
|
+
return r === null || typeof r != "object" ? null : (r = U && r[U] || r["@@iterator"], typeof r == "function" ? r : null);
|
|
1788
1790
|
}
|
|
1789
1791
|
var Y = { isMounted: function() {
|
|
1790
1792
|
return !1;
|
|
1791
1793
|
}, enqueueForceUpdate: function() {
|
|
1792
1794
|
}, enqueueReplaceState: function() {
|
|
1793
1795
|
}, enqueueSetState: function() {
|
|
1794
|
-
} },
|
|
1796
|
+
} }, Z = Object.assign, ve = {};
|
|
1795
1797
|
function W(r, s, h) {
|
|
1796
1798
|
this.props = r, this.context = s, this.refs = ve, this.updater = h || Y;
|
|
1797
1799
|
}
|
|
@@ -1808,11 +1810,11 @@ function oo() {
|
|
|
1808
1810
|
this.props = r, this.context = s, this.refs = ve, this.updater = h || Y;
|
|
1809
1811
|
}
|
|
1810
1812
|
var ae = oe.prototype = new ge();
|
|
1811
|
-
ae.constructor = oe,
|
|
1812
|
-
var
|
|
1813
|
-
function
|
|
1814
|
-
var _, E = {},
|
|
1815
|
-
if (s != null) for (_ in s.ref !== void 0 && (k = s.ref), s.key !== void 0 && (
|
|
1813
|
+
ae.constructor = oe, Z(ae, W.prototype), ae.isPureReactComponent = !0;
|
|
1814
|
+
var B = Array.isArray, F = Object.prototype.hasOwnProperty, z = { current: null }, Q = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
1815
|
+
function re(r, s, h) {
|
|
1816
|
+
var _, E = {}, j = null, k = null;
|
|
1817
|
+
if (s != null) for (_ in s.ref !== void 0 && (k = s.ref), s.key !== void 0 && (j = "" + s.key), s) F.call(s, _) && !Q.hasOwnProperty(_) && (E[_] = s[_]);
|
|
1816
1818
|
var O = arguments.length - 2;
|
|
1817
1819
|
if (O === 1) E.children = h;
|
|
1818
1820
|
else if (1 < O) {
|
|
@@ -1820,7 +1822,7 @@ function oo() {
|
|
|
1820
1822
|
E.children = C;
|
|
1821
1823
|
}
|
|
1822
1824
|
if (r && r.defaultProps) for (_ in O = r.defaultProps, O) E[_] === void 0 && (E[_] = O[_]);
|
|
1823
|
-
return { $$typeof: c, type: r, key:
|
|
1825
|
+
return { $$typeof: c, type: r, key: j, ref: k, props: E, _owner: z.current };
|
|
1824
1826
|
}
|
|
1825
1827
|
function _e(r, s) {
|
|
1826
1828
|
return { $$typeof: c, type: r.type, key: s, ref: r.ref, props: r.props, _owner: r._owner };
|
|
@@ -1839,11 +1841,11 @@ function oo() {
|
|
|
1839
1841
|
return typeof r == "object" && r !== null && r.key != null ? Me("" + r.key) : s.toString(36);
|
|
1840
1842
|
}
|
|
1841
1843
|
function ie(r, s, h, _, E) {
|
|
1842
|
-
var
|
|
1843
|
-
(
|
|
1844
|
+
var j = typeof r;
|
|
1845
|
+
(j === "undefined" || j === "boolean") && (r = null);
|
|
1844
1846
|
var k = !1;
|
|
1845
1847
|
if (r === null) k = !0;
|
|
1846
|
-
else switch (
|
|
1848
|
+
else switch (j) {
|
|
1847
1849
|
case "string":
|
|
1848
1850
|
case "number":
|
|
1849
1851
|
k = !0;
|
|
@@ -1855,26 +1857,26 @@ function oo() {
|
|
|
1855
1857
|
k = !0;
|
|
1856
1858
|
}
|
|
1857
1859
|
}
|
|
1858
|
-
if (k) return k = r, E = E(k), r = _ === "" ? "." + pe(k, 0) : _,
|
|
1860
|
+
if (k) return k = r, E = E(k), r = _ === "" ? "." + pe(k, 0) : _, B(E) ? (h = "", r != null && (h = r.replace(be, "$&/") + "/"), ie(E, s, h, "", function(L) {
|
|
1859
1861
|
return L;
|
|
1860
1862
|
})) : E != null && (de(E) && (E = _e(E, h + (!E.key || k && k.key === E.key ? "" : ("" + E.key).replace(be, "$&/") + "/") + r)), s.push(E)), 1;
|
|
1861
|
-
if (k = 0, _ = _ === "" ? "." : _ + ":",
|
|
1862
|
-
|
|
1863
|
-
var C = _ + pe(
|
|
1864
|
-
k += ie(
|
|
1863
|
+
if (k = 0, _ = _ === "" ? "." : _ + ":", B(r)) for (var O = 0; O < r.length; O++) {
|
|
1864
|
+
j = r[O];
|
|
1865
|
+
var C = _ + pe(j, O);
|
|
1866
|
+
k += ie(j, s, h, C, E);
|
|
1865
1867
|
}
|
|
1866
|
-
else if (C =
|
|
1867
|
-
else if (
|
|
1868
|
+
else if (C = G(r), typeof C == "function") for (r = C.call(r), O = 0; !(j = r.next()).done; ) j = j.value, C = _ + pe(j, O++), k += ie(j, s, h, C, E);
|
|
1869
|
+
else if (j === "object") throw s = String(r), Error("Objects are not valid as a React child (found: " + (s === "[object Object]" ? "object with keys {" + Object.keys(r).join(", ") + "}" : s) + "). If you meant to render a collection of children, use an array instead.");
|
|
1868
1870
|
return k;
|
|
1869
1871
|
}
|
|
1870
1872
|
function H(r, s, h) {
|
|
1871
1873
|
if (r == null) return r;
|
|
1872
1874
|
var _ = [], E = 0;
|
|
1873
|
-
return ie(r, _, "", "", function(
|
|
1874
|
-
return s.call(h,
|
|
1875
|
+
return ie(r, _, "", "", function(j) {
|
|
1876
|
+
return s.call(h, j, E++);
|
|
1875
1877
|
}), _;
|
|
1876
1878
|
}
|
|
1877
|
-
function
|
|
1879
|
+
function X(r) {
|
|
1878
1880
|
if (r._status === -1) {
|
|
1879
1881
|
var s = r._result;
|
|
1880
1882
|
s = s(), s.then(function(h) {
|
|
@@ -1886,7 +1888,7 @@ function oo() {
|
|
|
1886
1888
|
if (r._status === 1) return r._result.default;
|
|
1887
1889
|
throw r._result;
|
|
1888
1890
|
}
|
|
1889
|
-
var f = { current: null },
|
|
1891
|
+
var f = { current: null }, ne = { transition: null }, Ee = { ReactCurrentDispatcher: f, ReactCurrentBatchConfig: ne, ReactCurrentOwner: z };
|
|
1890
1892
|
function se() {
|
|
1891
1893
|
throw Error("act(...) is not supported in production builds of React.");
|
|
1892
1894
|
}
|
|
@@ -1906,12 +1908,12 @@ function oo() {
|
|
|
1906
1908
|
}, only: function(r) {
|
|
1907
1909
|
if (!de(r)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
1908
1910
|
return r;
|
|
1909
|
-
} }, D.Component = W, D.Fragment = p, D.Profiler = g, D.PureComponent = oe, D.StrictMode = m, D.Suspense =
|
|
1911
|
+
} }, D.Component = W, D.Fragment = p, D.Profiler = g, D.PureComponent = oe, D.StrictMode = m, D.Suspense = $, D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ee, D.act = se, D.cloneElement = function(r, s, h) {
|
|
1910
1912
|
if (r == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + r + ".");
|
|
1911
|
-
var _ =
|
|
1913
|
+
var _ = Z({}, r.props), E = r.key, j = r.ref, k = r._owner;
|
|
1912
1914
|
if (s != null) {
|
|
1913
|
-
if (s.ref !== void 0 && (
|
|
1914
|
-
for (C in s)
|
|
1915
|
+
if (s.ref !== void 0 && (j = s.ref, k = z.current), s.key !== void 0 && (E = "" + s.key), r.type && r.type.defaultProps) var O = r.type.defaultProps;
|
|
1916
|
+
for (C in s) F.call(s, C) && !Q.hasOwnProperty(C) && (_[C] = s[C] === void 0 && O !== void 0 ? O[C] : s[C]);
|
|
1915
1917
|
}
|
|
1916
1918
|
var C = arguments.length - 2;
|
|
1917
1919
|
if (C === 1) _.children = h;
|
|
@@ -1920,27 +1922,27 @@ function oo() {
|
|
|
1920
1922
|
for (var L = 0; L < C; L++) O[L] = arguments[L + 2];
|
|
1921
1923
|
_.children = O;
|
|
1922
1924
|
}
|
|
1923
|
-
return { $$typeof: c, type: r.type, key: E, ref:
|
|
1925
|
+
return { $$typeof: c, type: r.type, key: E, ref: j, props: _, _owner: k };
|
|
1924
1926
|
}, D.createContext = function(r) {
|
|
1925
|
-
return r = { $$typeof:
|
|
1926
|
-
}, D.createElement =
|
|
1927
|
-
var s =
|
|
1927
|
+
return r = { $$typeof: I, _currentValue: r, _currentValue2: r, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, r.Provider = { $$typeof: b, _context: r }, r.Consumer = r;
|
|
1928
|
+
}, D.createElement = re, D.createFactory = function(r) {
|
|
1929
|
+
var s = re.bind(null, r);
|
|
1928
1930
|
return s.type = r, s;
|
|
1929
1931
|
}, D.createRef = function() {
|
|
1930
1932
|
return { current: null };
|
|
1931
1933
|
}, D.forwardRef = function(r) {
|
|
1932
|
-
return { $$typeof:
|
|
1934
|
+
return { $$typeof: P, render: r };
|
|
1933
1935
|
}, D.isValidElement = de, D.lazy = function(r) {
|
|
1934
|
-
return { $$typeof:
|
|
1936
|
+
return { $$typeof: V, _payload: { _status: -1, _result: r }, _init: X };
|
|
1935
1937
|
}, D.memo = function(r, s) {
|
|
1936
1938
|
return { $$typeof: q, type: r, compare: s === void 0 ? null : s };
|
|
1937
1939
|
}, D.startTransition = function(r) {
|
|
1938
|
-
var s =
|
|
1939
|
-
|
|
1940
|
+
var s = ne.transition;
|
|
1941
|
+
ne.transition = {};
|
|
1940
1942
|
try {
|
|
1941
1943
|
r();
|
|
1942
1944
|
} finally {
|
|
1943
|
-
|
|
1945
|
+
ne.transition = s;
|
|
1944
1946
|
}
|
|
1945
1947
|
}, D.unstable_act = se, D.useCallback = function(r, s) {
|
|
1946
1948
|
return f.current.useCallback(r, s);
|
|
@@ -1989,7 +1991,7 @@ function ao() {
|
|
|
1989
1991
|
return Gr || (Gr = 1, function(c, a) {
|
|
1990
1992
|
process.env.NODE_ENV !== "production" && function() {
|
|
1991
1993
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
1992
|
-
var p = "18.3.1", m = Symbol.for("react.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"),
|
|
1994
|
+
var p = "18.3.1", m = 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";
|
|
1993
1995
|
function oe(e) {
|
|
1994
1996
|
if (e === null || typeof e != "object")
|
|
1995
1997
|
return null;
|
|
@@ -2002,52 +2004,52 @@ function ao() {
|
|
|
2002
2004
|
* @type {ReactComponent}
|
|
2003
2005
|
*/
|
|
2004
2006
|
current: null
|
|
2005
|
-
},
|
|
2007
|
+
}, B = {
|
|
2006
2008
|
transition: null
|
|
2007
|
-
},
|
|
2009
|
+
}, F = {
|
|
2008
2010
|
current: null,
|
|
2009
2011
|
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
|
|
2010
2012
|
isBatchingLegacy: !1,
|
|
2011
2013
|
didScheduleLegacyUpdate: !1
|
|
2012
|
-
},
|
|
2014
|
+
}, z = {
|
|
2013
2015
|
/**
|
|
2014
2016
|
* @internal
|
|
2015
2017
|
* @type {ReactComponent}
|
|
2016
2018
|
*/
|
|
2017
2019
|
current: null
|
|
2018
|
-
},
|
|
2020
|
+
}, Q = {}, re = null;
|
|
2019
2021
|
function _e(e) {
|
|
2020
|
-
|
|
2022
|
+
re = e;
|
|
2021
2023
|
}
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
},
|
|
2024
|
+
Q.setExtraStackFrame = function(e) {
|
|
2025
|
+
re = e;
|
|
2026
|
+
}, Q.getCurrentStack = null, Q.getStackAddendum = function() {
|
|
2025
2027
|
var e = "";
|
|
2026
|
-
|
|
2027
|
-
var t =
|
|
2028
|
+
re && (e += re);
|
|
2029
|
+
var t = Q.getCurrentStack;
|
|
2028
2030
|
return t && (e += t() || ""), e;
|
|
2029
2031
|
};
|
|
2030
2032
|
var de = !1, Me = !1, be = !1, pe = !1, ie = !1, H = {
|
|
2031
2033
|
ReactCurrentDispatcher: ae,
|
|
2032
|
-
ReactCurrentBatchConfig:
|
|
2033
|
-
ReactCurrentOwner:
|
|
2034
|
+
ReactCurrentBatchConfig: B,
|
|
2035
|
+
ReactCurrentOwner: z
|
|
2034
2036
|
};
|
|
2035
|
-
H.ReactDebugCurrentFrame =
|
|
2036
|
-
function
|
|
2037
|
+
H.ReactDebugCurrentFrame = Q, H.ReactCurrentActQueue = F;
|
|
2038
|
+
function X(e) {
|
|
2037
2039
|
{
|
|
2038
2040
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
|
|
2039
2041
|
n[o - 1] = arguments[o];
|
|
2040
|
-
|
|
2042
|
+
ne("warn", e, n);
|
|
2041
2043
|
}
|
|
2042
2044
|
}
|
|
2043
2045
|
function f(e) {
|
|
2044
2046
|
{
|
|
2045
2047
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
|
|
2046
2048
|
n[o - 1] = arguments[o];
|
|
2047
|
-
|
|
2049
|
+
ne("error", e, n);
|
|
2048
2050
|
}
|
|
2049
2051
|
}
|
|
2050
|
-
function
|
|
2052
|
+
function ne(e, t, n) {
|
|
2051
2053
|
{
|
|
2052
2054
|
var o = H.ReactDebugCurrentFrame, u = o.getStackAddendum();
|
|
2053
2055
|
u !== "" && (t += "%s", n = n.concat([u]));
|
|
@@ -2142,15 +2144,15 @@ function ao() {
|
|
|
2142
2144
|
var E = {
|
|
2143
2145
|
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
2144
2146
|
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
2145
|
-
},
|
|
2147
|
+
}, j = function(e, t) {
|
|
2146
2148
|
Object.defineProperty(_.prototype, e, {
|
|
2147
2149
|
get: function() {
|
|
2148
|
-
|
|
2150
|
+
X("%s(...) is deprecated in plain JavaScript React classes. %s", t[0], t[1]);
|
|
2149
2151
|
}
|
|
2150
2152
|
});
|
|
2151
2153
|
};
|
|
2152
2154
|
for (var k in E)
|
|
2153
|
-
E.hasOwnProperty(k) &&
|
|
2155
|
+
E.hasOwnProperty(k) && j(k, E[k]);
|
|
2154
2156
|
}
|
|
2155
2157
|
function O() {
|
|
2156
2158
|
}
|
|
@@ -2170,13 +2172,13 @@ function ao() {
|
|
|
2170
2172
|
function we(e) {
|
|
2171
2173
|
return Dt(e);
|
|
2172
2174
|
}
|
|
2173
|
-
function
|
|
2175
|
+
function Ft(e) {
|
|
2174
2176
|
{
|
|
2175
2177
|
var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
2176
2178
|
return n;
|
|
2177
2179
|
}
|
|
2178
2180
|
}
|
|
2179
|
-
function
|
|
2181
|
+
function $t(e) {
|
|
2180
2182
|
try {
|
|
2181
2183
|
return We(e), !1;
|
|
2182
2184
|
} catch {
|
|
@@ -2187,8 +2189,8 @@ function ao() {
|
|
|
2187
2189
|
return "" + e;
|
|
2188
2190
|
}
|
|
2189
2191
|
function Ce(e) {
|
|
2190
|
-
if (
|
|
2191
|
-
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
2192
|
+
if ($t(e))
|
|
2193
|
+
return f("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);
|
|
2192
2194
|
}
|
|
2193
2195
|
function xt(e, t, n) {
|
|
2194
2196
|
var o = e.displayName;
|
|
@@ -2197,10 +2199,10 @@ function ao() {
|
|
|
2197
2199
|
var u = t.displayName || t.name || "";
|
|
2198
2200
|
return u !== "" ? n + "(" + u + ")" : n;
|
|
2199
2201
|
}
|
|
2200
|
-
function
|
|
2202
|
+
function Be(e) {
|
|
2201
2203
|
return e.displayName || "Context";
|
|
2202
2204
|
}
|
|
2203
|
-
function
|
|
2205
|
+
function ee(e) {
|
|
2204
2206
|
if (e == null)
|
|
2205
2207
|
return null;
|
|
2206
2208
|
if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -2212,32 +2214,32 @@ function ao() {
|
|
|
2212
2214
|
return "Fragment";
|
|
2213
2215
|
case g:
|
|
2214
2216
|
return "Portal";
|
|
2215
|
-
case
|
|
2217
|
+
case P:
|
|
2216
2218
|
return "Profiler";
|
|
2217
|
-
case
|
|
2219
|
+
case I:
|
|
2218
2220
|
return "StrictMode";
|
|
2219
|
-
case
|
|
2221
|
+
case U:
|
|
2220
2222
|
return "Suspense";
|
|
2221
|
-
case
|
|
2223
|
+
case G:
|
|
2222
2224
|
return "SuspenseList";
|
|
2223
2225
|
}
|
|
2224
2226
|
if (typeof e == "object")
|
|
2225
2227
|
switch (e.$$typeof) {
|
|
2226
2228
|
case q:
|
|
2227
2229
|
var t = e;
|
|
2228
|
-
return
|
|
2229
|
-
case
|
|
2230
|
+
return Be(t) + ".Consumer";
|
|
2231
|
+
case $:
|
|
2230
2232
|
var n = e;
|
|
2231
|
-
return
|
|
2232
|
-
case
|
|
2233
|
+
return Be(n._context) + ".Provider";
|
|
2234
|
+
case V:
|
|
2233
2235
|
return xt(e, e.render, "ForwardRef");
|
|
2234
2236
|
case Y:
|
|
2235
2237
|
var o = e.displayName || null;
|
|
2236
|
-
return o !== null ? o :
|
|
2237
|
-
case
|
|
2238
|
+
return o !== null ? o : ee(e.type) || "Memo";
|
|
2239
|
+
case Z: {
|
|
2238
2240
|
var u = e, d = u._payload, l = u._init;
|
|
2239
2241
|
try {
|
|
2240
|
-
return
|
|
2242
|
+
return ee(l(d));
|
|
2241
2243
|
} catch {
|
|
2242
2244
|
return null;
|
|
2243
2245
|
}
|
|
@@ -2245,7 +2247,7 @@ function ao() {
|
|
|
2245
2247
|
}
|
|
2246
2248
|
return null;
|
|
2247
2249
|
}
|
|
2248
|
-
var ye = Object.prototype.hasOwnProperty,
|
|
2250
|
+
var ye = Object.prototype.hasOwnProperty, Ke = {
|
|
2249
2251
|
key: !0,
|
|
2250
2252
|
ref: !0,
|
|
2251
2253
|
__self: !0,
|
|
@@ -2287,12 +2289,12 @@ function ao() {
|
|
|
2287
2289
|
});
|
|
2288
2290
|
}
|
|
2289
2291
|
function Ut(e) {
|
|
2290
|
-
if (typeof e.ref == "string" &&
|
|
2291
|
-
var t =
|
|
2292
|
+
if (typeof e.ref == "string" && z.current && e.__self && z.current.stateNode !== e.__self) {
|
|
2293
|
+
var t = ee(z.current.type);
|
|
2292
2294
|
De[t] || (f('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);
|
|
2293
2295
|
}
|
|
2294
2296
|
}
|
|
2295
|
-
var
|
|
2297
|
+
var Fe = function(e, t, n, o, u, d, l) {
|
|
2296
2298
|
var y = {
|
|
2297
2299
|
// This tag allows us to uniquely identify this as a React Element
|
|
2298
2300
|
$$typeof: m,
|
|
@@ -2321,12 +2323,12 @@ function ao() {
|
|
|
2321
2323
|
value: u
|
|
2322
2324
|
}), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
|
|
2323
2325
|
};
|
|
2324
|
-
function
|
|
2326
|
+
function Vt(e, t, n) {
|
|
2325
2327
|
var o, u = {}, d = null, l = null, y = null, v = null;
|
|
2326
2328
|
if (t != null) {
|
|
2327
2329
|
Ze(t) && (l = t.ref, Ut(t)), Qe(t) && (Ce(t.key), d = "" + t.key), y = t.__self === void 0 ? null : t.__self, v = t.__source === void 0 ? null : t.__source;
|
|
2328
2330
|
for (o in t)
|
|
2329
|
-
ye.call(t, o) && !
|
|
2331
|
+
ye.call(t, o) && !Ke.hasOwnProperty(o) && (u[o] = t[o]);
|
|
2330
2332
|
}
|
|
2331
2333
|
var w = arguments.length - 2;
|
|
2332
2334
|
if (w === 1)
|
|
@@ -2345,10 +2347,10 @@ function ao() {
|
|
|
2345
2347
|
var A = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
2346
2348
|
d && Lt(u, A), l && Nt(u, A);
|
|
2347
2349
|
}
|
|
2348
|
-
return
|
|
2350
|
+
return Fe(e, d, l, y, v, z.current, u);
|
|
2349
2351
|
}
|
|
2350
|
-
function
|
|
2351
|
-
var n =
|
|
2352
|
+
function zt(e, t) {
|
|
2353
|
+
var n = Fe(e.type, t, e.ref, e._self, e._source, e._owner, e.props);
|
|
2352
2354
|
return n;
|
|
2353
2355
|
}
|
|
2354
2356
|
function qt(e, t, n) {
|
|
@@ -2356,11 +2358,11 @@ function ao() {
|
|
|
2356
2358
|
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
|
|
2357
2359
|
var o, u = s({}, e.props), d = e.key, l = e.ref, y = e._self, v = e._source, w = e._owner;
|
|
2358
2360
|
if (t != null) {
|
|
2359
|
-
Ze(t) && (l = t.ref, w =
|
|
2361
|
+
Ze(t) && (l = t.ref, w = z.current), Qe(t) && (Ce(t.key), d = "" + t.key);
|
|
2360
2362
|
var R;
|
|
2361
2363
|
e.type && e.type.defaultProps && (R = e.type.defaultProps);
|
|
2362
2364
|
for (o in t)
|
|
2363
|
-
ye.call(t, o) && !
|
|
2365
|
+
ye.call(t, o) && !Ke.hasOwnProperty(o) && (t[o] === void 0 && R !== void 0 ? u[o] = R[o] : u[o] = t[o]);
|
|
2364
2366
|
}
|
|
2365
2367
|
var S = arguments.length - 2;
|
|
2366
2368
|
if (S === 1)
|
|
@@ -2370,7 +2372,7 @@ function ao() {
|
|
|
2370
2372
|
T[A] = arguments[A + 2];
|
|
2371
2373
|
u.children = T;
|
|
2372
2374
|
}
|
|
2373
|
-
return
|
|
2375
|
+
return Fe(e.type, d, l, y, v, w, u);
|
|
2374
2376
|
}
|
|
2375
2377
|
function ue(e) {
|
|
2376
2378
|
return typeof e == "object" && e !== null && e.$$typeof === m;
|
|
@@ -2389,7 +2391,7 @@ function ao() {
|
|
|
2389
2391
|
function tt(e) {
|
|
2390
2392
|
return e.replace(Wt, "$&/");
|
|
2391
2393
|
}
|
|
2392
|
-
function
|
|
2394
|
+
function $e(e, t) {
|
|
2393
2395
|
return typeof e == "object" && e !== null && e.key != null ? (Ce(e.key), Ht("" + e.key)) : t.toString(36);
|
|
2394
2396
|
}
|
|
2395
2397
|
function Re(e, t, n, o, u) {
|
|
@@ -2412,13 +2414,13 @@ function ao() {
|
|
|
2412
2414
|
}
|
|
2413
2415
|
}
|
|
2414
2416
|
if (l) {
|
|
2415
|
-
var y = e, v = u(y), w = o === "" ? Xe +
|
|
2417
|
+
var y = e, v = u(y), w = o === "" ? Xe + $e(y, 0) : o;
|
|
2416
2418
|
if (we(v)) {
|
|
2417
2419
|
var R = "";
|
|
2418
2420
|
w != null && (R = tt(w) + "/"), Re(v, t, R, "", function(Lr) {
|
|
2419
2421
|
return Lr;
|
|
2420
2422
|
});
|
|
2421
|
-
} else v != null && (ue(v) && (v.key && (!y || y.key !== v.key) && Ce(v.key), v =
|
|
2423
|
+
} else v != null && (ue(v) && (v.key && (!y || y.key !== v.key) && Ce(v.key), v = zt(
|
|
2422
2424
|
v,
|
|
2423
2425
|
// Keep both the (mapped) and old keys if they differ, just as
|
|
2424
2426
|
// traverseAllChildren used to do for objects as children
|
|
@@ -2431,17 +2433,17 @@ function ao() {
|
|
|
2431
2433
|
)), t.push(v));
|
|
2432
2434
|
return 1;
|
|
2433
2435
|
}
|
|
2434
|
-
var S, T, A = 0,
|
|
2436
|
+
var S, T, A = 0, x = o === "" ? Xe : o + Yt;
|
|
2435
2437
|
if (we(e))
|
|
2436
2438
|
for (var Ae = 0; Ae < e.length; Ae++)
|
|
2437
|
-
S = e[Ae], T =
|
|
2439
|
+
S = e[Ae], T = x + $e(S, Ae), A += Re(S, t, n, T, u);
|
|
2438
2440
|
else {
|
|
2439
2441
|
var He = oe(e);
|
|
2440
2442
|
if (typeof He == "function") {
|
|
2441
2443
|
var kt = e;
|
|
2442
|
-
He === kt.entries && (et ||
|
|
2443
|
-
for (var
|
|
2444
|
-
S = Ot.value, T =
|
|
2444
|
+
He === kt.entries && (et || X("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), et = !0);
|
|
2445
|
+
for (var $r = He.call(kt), Ot, xr = 0; !(Ot = $r.next()).done; )
|
|
2446
|
+
S = Ot.value, T = x + $e(S, xr++), A += Re(S, t, n, T, u);
|
|
2445
2447
|
} else if (d === "object") {
|
|
2446
2448
|
var Tt = String(e);
|
|
2447
2449
|
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.");
|
|
@@ -2457,13 +2459,13 @@ function ao() {
|
|
|
2457
2459
|
return t.call(n, d, u++);
|
|
2458
2460
|
}), o;
|
|
2459
2461
|
}
|
|
2460
|
-
function
|
|
2462
|
+
function Bt(e) {
|
|
2461
2463
|
var t = 0;
|
|
2462
2464
|
return Se(e, function() {
|
|
2463
2465
|
t++;
|
|
2464
2466
|
}), t;
|
|
2465
2467
|
}
|
|
2466
|
-
function
|
|
2468
|
+
function Kt(e, t, n) {
|
|
2467
2469
|
Se(e, function() {
|
|
2468
2470
|
t.apply(this, arguments);
|
|
2469
2471
|
}, n);
|
|
@@ -2499,7 +2501,7 @@ function ao() {
|
|
|
2499
2501
|
_globalName: null
|
|
2500
2502
|
};
|
|
2501
2503
|
t.Provider = {
|
|
2502
|
-
$$typeof:
|
|
2504
|
+
$$typeof: $,
|
|
2503
2505
|
_context: t
|
|
2504
2506
|
};
|
|
2505
2507
|
var n = !1, o = !1, u = !1;
|
|
@@ -2551,7 +2553,7 @@ function ao() {
|
|
|
2551
2553
|
return t.displayName;
|
|
2552
2554
|
},
|
|
2553
2555
|
set: function(l) {
|
|
2554
|
-
u || (
|
|
2556
|
+
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);
|
|
2555
2557
|
}
|
|
2556
2558
|
}
|
|
2557
2559
|
}), t.Consumer = d;
|
|
@@ -2597,7 +2599,7 @@ Your code should look like:
|
|
|
2597
2599
|
_status: me,
|
|
2598
2600
|
_result: e
|
|
2599
2601
|
}, n = {
|
|
2600
|
-
$$typeof:
|
|
2602
|
+
$$typeof: Z,
|
|
2601
2603
|
_payload: t,
|
|
2602
2604
|
_init: Xt
|
|
2603
2605
|
};
|
|
@@ -2633,7 +2635,7 @@ Your code should look like:
|
|
|
2633
2635
|
function tr(e) {
|
|
2634
2636
|
e != null && e.$$typeof === Y ? f("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? f("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && f("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) && f("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
2635
2637
|
var t = {
|
|
2636
|
-
$$typeof:
|
|
2638
|
+
$$typeof: V,
|
|
2637
2639
|
render: e
|
|
2638
2640
|
};
|
|
2639
2641
|
{
|
|
@@ -2654,7 +2656,7 @@ Your code should look like:
|
|
|
2654
2656
|
var nt;
|
|
2655
2657
|
nt = Symbol.for("react.module.reference");
|
|
2656
2658
|
function ot(e) {
|
|
2657
|
-
return !!(typeof e == "string" || typeof e == "function" || e === b || e ===
|
|
2659
|
+
return !!(typeof e == "string" || typeof e == "function" || e === b || e === P || ie || e === I || e === U || e === G || pe || e === ve || de || Me || be || typeof e == "object" && e !== null && (e.$$typeof === Z || e.$$typeof === Y || e.$$typeof === $ || e.$$typeof === q || e.$$typeof === V || // This needs to include all possible module reference object
|
|
2658
2660
|
// types supported by any Flight configuration anywhere since
|
|
2659
2661
|
// we don't know which Flight build this will end up being used
|
|
2660
2662
|
// with.
|
|
@@ -2863,29 +2865,29 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2863
2865
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
2864
2866
|
try {
|
|
2865
2867
|
Reflect.construct(l, []);
|
|
2866
|
-
} catch (
|
|
2867
|
-
o =
|
|
2868
|
+
} catch (x) {
|
|
2869
|
+
o = x;
|
|
2868
2870
|
}
|
|
2869
2871
|
Reflect.construct(e, [], l);
|
|
2870
2872
|
} else {
|
|
2871
2873
|
try {
|
|
2872
2874
|
l.call();
|
|
2873
|
-
} catch (
|
|
2874
|
-
o =
|
|
2875
|
+
} catch (x) {
|
|
2876
|
+
o = x;
|
|
2875
2877
|
}
|
|
2876
2878
|
e.call(l.prototype);
|
|
2877
2879
|
}
|
|
2878
2880
|
} else {
|
|
2879
2881
|
try {
|
|
2880
2882
|
throw Error();
|
|
2881
|
-
} catch (
|
|
2882
|
-
o =
|
|
2883
|
+
} catch (x) {
|
|
2884
|
+
o = x;
|
|
2883
2885
|
}
|
|
2884
2886
|
e();
|
|
2885
2887
|
}
|
|
2886
|
-
} catch (
|
|
2887
|
-
if (
|
|
2888
|
-
for (var y =
|
|
2888
|
+
} catch (x) {
|
|
2889
|
+
if (x && o && typeof x.stack == "string") {
|
|
2890
|
+
for (var y = x.stack.split(`
|
|
2889
2891
|
`), v = o.stack.split(`
|
|
2890
2892
|
`), w = y.length - 1, R = v.length - 1; w >= 1 && R >= 0 && y[w] !== v[R]; )
|
|
2891
2893
|
R--;
|
|
@@ -2923,18 +2925,18 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2923
2925
|
if (typeof e == "string")
|
|
2924
2926
|
return ke(e);
|
|
2925
2927
|
switch (e) {
|
|
2926
|
-
case
|
|
2928
|
+
case U:
|
|
2927
2929
|
return ke("Suspense");
|
|
2928
|
-
case
|
|
2930
|
+
case G:
|
|
2929
2931
|
return ke("SuspenseList");
|
|
2930
2932
|
}
|
|
2931
2933
|
if (typeof e == "object")
|
|
2932
2934
|
switch (e.$$typeof) {
|
|
2933
|
-
case
|
|
2935
|
+
case V:
|
|
2934
2936
|
return Er(e.render);
|
|
2935
2937
|
case Y:
|
|
2936
2938
|
return Te(e.type, t, n);
|
|
2937
|
-
case
|
|
2939
|
+
case Z: {
|
|
2938
2940
|
var o = e, u = o._payload, d = o._init;
|
|
2939
2941
|
try {
|
|
2940
2942
|
return Te(d(u), t, n);
|
|
@@ -2978,11 +2980,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2978
2980
|
} else
|
|
2979
2981
|
_e(null);
|
|
2980
2982
|
}
|
|
2981
|
-
var
|
|
2982
|
-
|
|
2983
|
+
var Ve;
|
|
2984
|
+
Ve = !1;
|
|
2983
2985
|
function ht() {
|
|
2984
|
-
if (
|
|
2985
|
-
var e =
|
|
2986
|
+
if (z.current) {
|
|
2987
|
+
var e = ee(z.current.type);
|
|
2986
2988
|
if (e)
|
|
2987
2989
|
return `
|
|
2988
2990
|
|
|
@@ -3020,7 +3022,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3020
3022
|
if (!vt[n]) {
|
|
3021
3023
|
vt[n] = !0;
|
|
3022
3024
|
var o = "";
|
|
3023
|
-
e && e._owner && e._owner !==
|
|
3025
|
+
e && e._owner && e._owner !== z.current && (o = " It was passed a child from " + ee(e._owner.type) + "."), ce(e), f('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);
|
|
3024
3026
|
}
|
|
3025
3027
|
}
|
|
3026
3028
|
}
|
|
@@ -3049,18 +3051,18 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3049
3051
|
var n;
|
|
3050
3052
|
if (typeof t == "function")
|
|
3051
3053
|
n = t.propTypes;
|
|
3052
|
-
else if (typeof t == "object" && (t.$$typeof ===
|
|
3054
|
+
else if (typeof t == "object" && (t.$$typeof === V || // Note: Memo only checks outer props here.
|
|
3053
3055
|
// Inner props are checked in the reconciler.
|
|
3054
3056
|
t.$$typeof === Y))
|
|
3055
3057
|
n = t.propTypes;
|
|
3056
3058
|
else
|
|
3057
3059
|
return;
|
|
3058
3060
|
if (n) {
|
|
3059
|
-
var o =
|
|
3061
|
+
var o = ee(t);
|
|
3060
3062
|
Cr(n, e.props, "prop", o, e);
|
|
3061
|
-
} else if (t.PropTypes !== void 0 && !
|
|
3062
|
-
|
|
3063
|
-
var u =
|
|
3063
|
+
} else if (t.PropTypes !== void 0 && !Ve) {
|
|
3064
|
+
Ve = !0;
|
|
3065
|
+
var u = ee(t);
|
|
3064
3066
|
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
3065
3067
|
}
|
|
3066
3068
|
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -3086,9 +3088,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3086
3088
|
var d = Sr(t);
|
|
3087
3089
|
d ? u += d : u += ht();
|
|
3088
3090
|
var l;
|
|
3089
|
-
e === null ? l = "null" : we(e) ? l = "array" : e !== void 0 && e.$$typeof === m ? (l = "<" + (
|
|
3091
|
+
e === null ? l = "null" : we(e) ? l = "array" : e !== void 0 && e.$$typeof === m ? (l = "<" + (ee(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, f("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);
|
|
3090
3092
|
}
|
|
3091
|
-
var y =
|
|
3093
|
+
var y = Vt.apply(this, arguments);
|
|
3092
3094
|
if (y == null)
|
|
3093
3095
|
return y;
|
|
3094
3096
|
if (o)
|
|
@@ -3099,10 +3101,10 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3099
3101
|
var wt = !1;
|
|
3100
3102
|
function Tr(e) {
|
|
3101
3103
|
var t = Et.bind(null, e);
|
|
3102
|
-
return t.type = e, wt || (wt = !0,
|
|
3104
|
+
return t.type = e, wt || (wt = !0, X("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(t, "type", {
|
|
3103
3105
|
enumerable: !1,
|
|
3104
3106
|
get: function() {
|
|
3105
|
-
return
|
|
3107
|
+
return X("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
|
|
3106
3108
|
value: e
|
|
3107
3109
|
}), e;
|
|
3108
3110
|
}
|
|
@@ -3114,16 +3116,16 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3114
3116
|
return bt(o), o;
|
|
3115
3117
|
}
|
|
3116
3118
|
function Ir(e, t) {
|
|
3117
|
-
var n =
|
|
3118
|
-
|
|
3119
|
-
var o =
|
|
3120
|
-
|
|
3119
|
+
var n = B.transition;
|
|
3120
|
+
B.transition = {};
|
|
3121
|
+
var o = B.transition;
|
|
3122
|
+
B.transition._updatedFibers = /* @__PURE__ */ new Set();
|
|
3121
3123
|
try {
|
|
3122
3124
|
e();
|
|
3123
3125
|
} finally {
|
|
3124
|
-
if (
|
|
3126
|
+
if (B.transition = n, n === null && o._updatedFibers) {
|
|
3125
3127
|
var u = o._updatedFibers.size;
|
|
3126
|
-
u > 10 &&
|
|
3128
|
+
u > 10 && X("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), o._updatedFibers.clear();
|
|
3127
3129
|
}
|
|
3128
3130
|
}
|
|
3129
3131
|
}
|
|
@@ -3146,25 +3148,25 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3146
3148
|
function St(e) {
|
|
3147
3149
|
{
|
|
3148
3150
|
var t = le;
|
|
3149
|
-
le++,
|
|
3150
|
-
var n =
|
|
3151
|
+
le++, F.current === null && (F.current = []);
|
|
3152
|
+
var n = F.isBatchingLegacy, o;
|
|
3151
3153
|
try {
|
|
3152
|
-
if (
|
|
3153
|
-
var u =
|
|
3154
|
-
u !== null && (
|
|
3154
|
+
if (F.isBatchingLegacy = !0, o = e(), !n && F.didScheduleLegacyUpdate) {
|
|
3155
|
+
var u = F.current;
|
|
3156
|
+
u !== null && (F.didScheduleLegacyUpdate = !1, Ye(u));
|
|
3155
3157
|
}
|
|
3156
3158
|
} catch (T) {
|
|
3157
3159
|
throw je(t), T;
|
|
3158
3160
|
} finally {
|
|
3159
|
-
|
|
3161
|
+
F.isBatchingLegacy = n;
|
|
3160
3162
|
}
|
|
3161
3163
|
if (o !== null && typeof o == "object" && typeof o.then == "function") {
|
|
3162
3164
|
var d = o, l = !1, y = {
|
|
3163
3165
|
then: function(T, A) {
|
|
3164
|
-
l = !0, d.then(function(
|
|
3165
|
-
je(t), le === 0 ?
|
|
3166
|
-
}, function(
|
|
3167
|
-
je(t), A(
|
|
3166
|
+
l = !0, d.then(function(x) {
|
|
3167
|
+
je(t), le === 0 ? ze(x, T, A) : T(x);
|
|
3168
|
+
}, function(x) {
|
|
3169
|
+
je(t), A(x);
|
|
3168
3170
|
});
|
|
3169
3171
|
}
|
|
3170
3172
|
};
|
|
@@ -3175,11 +3177,11 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3175
3177
|
} else {
|
|
3176
3178
|
var v = o;
|
|
3177
3179
|
if (je(t), le === 0) {
|
|
3178
|
-
var w =
|
|
3179
|
-
w !== null && (Ye(w),
|
|
3180
|
+
var w = F.current;
|
|
3181
|
+
w !== null && (Ye(w), F.current = null);
|
|
3180
3182
|
var R = {
|
|
3181
3183
|
then: function(T, A) {
|
|
3182
|
-
|
|
3184
|
+
F.current === null ? (F.current = [], ze(v, T, A)) : T(v);
|
|
3183
3185
|
}
|
|
3184
3186
|
};
|
|
3185
3187
|
return R;
|
|
@@ -3197,13 +3199,13 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3197
3199
|
function je(e) {
|
|
3198
3200
|
e !== le - 1 && f("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;
|
|
3199
3201
|
}
|
|
3200
|
-
function
|
|
3202
|
+
function ze(e, t, n) {
|
|
3201
3203
|
{
|
|
3202
|
-
var o =
|
|
3204
|
+
var o = F.current;
|
|
3203
3205
|
if (o !== null)
|
|
3204
3206
|
try {
|
|
3205
3207
|
Ye(o), jr(function() {
|
|
3206
|
-
o.length === 0 ? (
|
|
3208
|
+
o.length === 0 ? (F.current = null, t(e)) : ze(e, t, n);
|
|
3207
3209
|
});
|
|
3208
3210
|
} catch (u) {
|
|
3209
3211
|
n(u);
|
|
@@ -3232,14 +3234,14 @@ Check the top-level render call using <` + n + ">.");
|
|
|
3232
3234
|
}
|
|
3233
3235
|
}
|
|
3234
3236
|
}
|
|
3235
|
-
var Ar = Et, Mr = Pr, Dr = Tr,
|
|
3237
|
+
var Ar = Et, Mr = Pr, Dr = Tr, Fr = {
|
|
3236
3238
|
map: Se,
|
|
3237
|
-
forEach:
|
|
3238
|
-
count:
|
|
3239
|
+
forEach: Kt,
|
|
3240
|
+
count: Bt,
|
|
3239
3241
|
toArray: Gt,
|
|
3240
3242
|
only: Jt
|
|
3241
3243
|
};
|
|
3242
|
-
a.Children =
|
|
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 = p, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
3243
3245
|
}();
|
|
3244
3246
|
}(jt, jt.exports)), jt.exports;
|
|
3245
3247
|
}
|
|
@@ -3254,43 +3256,43 @@ const io = async (c) => {
|
|
|
3254
3256
|
} catch {
|
|
3255
3257
|
return !1;
|
|
3256
3258
|
}
|
|
3257
|
-
}, so = (c, a) => !!c && a,
|
|
3259
|
+
}, so = (c, a) => !!c && a, K = (c) => i.nullable(c.optional());
|
|
3258
3260
|
i.string().trim().min(1, { message: "Cannot be blank" });
|
|
3259
3261
|
const uo = i.object({
|
|
3260
3262
|
cde_response_type: i.literal("error"),
|
|
3261
3263
|
message: i.string()
|
|
3262
3264
|
}), co = i.enum(["usd", "brl"]), cn = i.object({
|
|
3263
3265
|
name: i.string(),
|
|
3264
|
-
amount_atom_off:
|
|
3265
|
-
percent_off:
|
|
3266
|
-
currency:
|
|
3266
|
+
amount_atom_off: K(i.number()),
|
|
3267
|
+
percent_off: K(i.number()),
|
|
3268
|
+
currency: K(i.string()),
|
|
3267
3269
|
duration: i.string(),
|
|
3268
|
-
duration_in_months:
|
|
3270
|
+
duration_in_months: K(i.number())
|
|
3269
3271
|
}), lo = i.object({
|
|
3270
3272
|
amount_subtotal_atom: i.number().int(),
|
|
3271
3273
|
amount_total_atom: i.number().int(),
|
|
3272
3274
|
currency: i.string(),
|
|
3273
|
-
description:
|
|
3275
|
+
description: K(i.string()),
|
|
3274
3276
|
price_id: i.string(),
|
|
3275
|
-
billing_interval:
|
|
3276
|
-
billing_interval_count:
|
|
3277
|
+
billing_interval: K(i.string()),
|
|
3278
|
+
billing_interval_count: K(i.number().int()),
|
|
3277
3279
|
quantity: i.number().int()
|
|
3278
3280
|
}), fo = i.record(i.string(), i.any()), po = i.object({
|
|
3279
3281
|
name: i.string(),
|
|
3280
|
-
settings:
|
|
3282
|
+
settings: K(fo)
|
|
3281
3283
|
}), yo = i.object({
|
|
3282
3284
|
provider: i.string(),
|
|
3283
|
-
processor_name:
|
|
3284
|
-
metadata:
|
|
3285
|
+
processor_name: K(i.string()),
|
|
3286
|
+
metadata: K(i.record(i.string(), i.any()))
|
|
3285
3287
|
}), mo = i.object({
|
|
3286
3288
|
quantity: i.number()
|
|
3287
3289
|
}), ho = i.object({
|
|
3288
|
-
id:
|
|
3289
|
-
billing_interval:
|
|
3290
|
-
billing_interval_count:
|
|
3290
|
+
id: K(i.string()),
|
|
3291
|
+
billing_interval: K(i.string()),
|
|
3292
|
+
billing_interval_count: K(i.number().int()),
|
|
3291
3293
|
subscription_items: i.array(mo),
|
|
3292
|
-
trial_start:
|
|
3293
|
-
trial_end:
|
|
3294
|
+
trial_start: K(i.string()),
|
|
3295
|
+
trial_end: K(i.string())
|
|
3294
3296
|
}), ln = i.object({
|
|
3295
3297
|
amount_atom: i.number()
|
|
3296
3298
|
}), vo = i.object({
|
|
@@ -3304,7 +3306,7 @@ const uo = i.object({
|
|
|
3304
3306
|
}), _o = i.object({
|
|
3305
3307
|
currency: i.string(),
|
|
3306
3308
|
discounts: i.array(go),
|
|
3307
|
-
hosted_invoice_url:
|
|
3309
|
+
hosted_invoice_url: K(i.string()),
|
|
3308
3310
|
lines: i.array(vo),
|
|
3309
3311
|
remaining_amount_atom: i.number(),
|
|
3310
3312
|
tax_amount_atom: i.number(),
|
|
@@ -3315,17 +3317,17 @@ const uo = i.object({
|
|
|
3315
3317
|
invoices: i.array(_o)
|
|
3316
3318
|
}), fn = i.object({
|
|
3317
3319
|
preview: Jr,
|
|
3318
|
-
preview_post_trial:
|
|
3320
|
+
preview_post_trial: K(Jr),
|
|
3319
3321
|
coupons: i.array(cn)
|
|
3320
3322
|
}), Zr = i.object({
|
|
3321
3323
|
status: i.literal("open"),
|
|
3322
3324
|
token: i.string(),
|
|
3323
|
-
email:
|
|
3325
|
+
email: K(i.string()),
|
|
3324
3326
|
line_items: i.array(lo),
|
|
3325
3327
|
amount_subtotal_atom: i.number().int(),
|
|
3326
3328
|
amount_total_atom: i.number().int(),
|
|
3327
3329
|
brand: po,
|
|
3328
|
-
subs_preview:
|
|
3330
|
+
subs_preview: K(fn),
|
|
3329
3331
|
// Null in setup mode
|
|
3330
3332
|
methods_available: i.array(yo)
|
|
3331
3333
|
}), dn = i.discriminatedUnion("mode", [
|
|
@@ -3384,7 +3386,7 @@ const qr = async (c, a, p) => {
|
|
|
3384
3386
|
throw g.success ? new Error("Invalid state") : g.error;
|
|
3385
3387
|
}
|
|
3386
3388
|
return m;
|
|
3387
|
-
}, 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 },
|
|
3389
|
+
}, 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);
|
|
3388
3390
|
class Oo {
|
|
3389
3391
|
constructor(a) {
|
|
3390
3392
|
this.formInstance = a, this.config = a.config, this.formId = a.formId, this.eventTargets = {}, this.nonces = /* @__PURE__ */ new Set(), this.tokenizedData = null, this.tokenized = 0, this.connectionManager = a.getConnectionManager();
|
|
@@ -3393,7 +3395,11 @@ class Oo {
|
|
|
3393
3395
|
this.tokenizedData = a;
|
|
3394
3396
|
}
|
|
3395
3397
|
handleMessage(a) {
|
|
3396
|
-
|
|
3398
|
+
var P;
|
|
3399
|
+
if (!a.source)
|
|
3400
|
+
throw new Error("No source found");
|
|
3401
|
+
if (a.origin !== ((P = this.formInstance.config._frameUrl) == null ? void 0 : P.origin))
|
|
3402
|
+
return;
|
|
3397
3403
|
const p = no(JSON.parse(a.data));
|
|
3398
3404
|
if (!this.validateEvent(p)) return;
|
|
3399
3405
|
const { elementId: g, payload: b } = p;
|
|
@@ -3414,7 +3420,9 @@ class Oo {
|
|
|
3414
3420
|
this.handleLoadedEvent(a.source, g, b);
|
|
3415
3421
|
break;
|
|
3416
3422
|
case "TOKENIZE_STARTED":
|
|
3417
|
-
|
|
3423
|
+
break;
|
|
3424
|
+
case "CHECKOUT_STARTED":
|
|
3425
|
+
this.handleCheckoutStartedEvent();
|
|
3418
3426
|
break;
|
|
3419
3427
|
case "PAYMENT_FLOW_STARTED":
|
|
3420
3428
|
this.handlePaymentFlowStartedEvent(b, a.source, g);
|
|
@@ -3462,30 +3470,33 @@ class Oo {
|
|
|
3462
3470
|
handleTokenizeStartedEvent() {
|
|
3463
3471
|
this.formInstance.config.onCheckoutStarted && this.formInstance.config.onCheckoutStarted();
|
|
3464
3472
|
}
|
|
3473
|
+
handleCheckoutStartedEvent() {
|
|
3474
|
+
this.formInstance.config.onCheckoutStarted && this.formInstance.config.onCheckoutStarted();
|
|
3475
|
+
}
|
|
3465
3476
|
async handlePaymentFlowStartedEvent(a, p, m) {
|
|
3466
|
-
var
|
|
3477
|
+
var I;
|
|
3467
3478
|
if (!this.tokenizedData)
|
|
3468
3479
|
throw new Error("tokenizedData not populated");
|
|
3469
3480
|
const g = this.connectionManager.getConnection(), b = async () => {
|
|
3470
3481
|
var q;
|
|
3471
|
-
const
|
|
3472
|
-
if (
|
|
3482
|
+
const P = a.nextActionMetadata.type;
|
|
3483
|
+
if (P !== void 0) if (P === "stripe_3ds")
|
|
3473
3484
|
await to(a);
|
|
3474
|
-
else if (
|
|
3485
|
+
else if (P === "stripe_payment_request") {
|
|
3475
3486
|
if (!this.formInstance.getStripePm())
|
|
3476
3487
|
throw new Error("Stripe PM not set");
|
|
3477
3488
|
await eo(a, this.formInstance.getStripePm());
|
|
3478
3489
|
} else
|
|
3479
|
-
throw new Error(`Unknown next action type: ${
|
|
3480
|
-
const
|
|
3481
|
-
if (
|
|
3482
|
-
const { payment_methods:
|
|
3483
|
-
secure_token:
|
|
3490
|
+
throw new Error(`Unknown next action type: ${P}`);
|
|
3491
|
+
const $ = await pn(g);
|
|
3492
|
+
if ($.mode === "setup") {
|
|
3493
|
+
const { payment_methods: V } = await ko(g, {
|
|
3494
|
+
secure_token: $.token,
|
|
3484
3495
|
existing_cc_pm_id: (q = this.tokenizedData) == null ? void 0 : q.existingCCPMId
|
|
3485
3496
|
});
|
|
3486
|
-
if (
|
|
3487
|
-
throw new Error(`Expected exactly one payment method, got ${
|
|
3488
|
-
return this.tokenized = 0, this.formInstance.checkoutFired = !1, this.formInstance.config.onSetupPaymentMethodSuccess && this.formInstance.config.onSetupPaymentMethodSuccess(
|
|
3497
|
+
if (V.length !== 1)
|
|
3498
|
+
throw new Error(`Expected exactly one payment method, got ${V.length}`);
|
|
3499
|
+
return this.tokenized = 0, this.formInstance.checkoutFired = !1, this.formInstance.config.onSetupPaymentMethodSuccess && this.formInstance.config.onSetupPaymentMethodSuccess(V[0].id), {
|
|
3489
3500
|
proceedToCheckout: !1
|
|
3490
3501
|
};
|
|
3491
3502
|
} else
|
|
@@ -3494,29 +3505,29 @@ class Oo {
|
|
|
3494
3505
|
};
|
|
3495
3506
|
};
|
|
3496
3507
|
try {
|
|
3497
|
-
const { proceedToCheckout:
|
|
3498
|
-
if (!
|
|
3508
|
+
const { proceedToCheckout: P } = await b();
|
|
3509
|
+
if (!P)
|
|
3499
3510
|
return;
|
|
3500
|
-
let
|
|
3501
|
-
if (this.tokenizedData.checkoutPaymentMethod.provider === "credit_card" && (
|
|
3511
|
+
let $;
|
|
3512
|
+
if (this.tokenizedData.checkoutPaymentMethod.provider === "credit_card" && ($ = (I = a.startPFMetadata) == null ? void 0 : I.cc_pm_id, !$))
|
|
3502
3513
|
throw new Error("CC PM ID not found");
|
|
3503
|
-
|
|
3514
|
+
Br(
|
|
3504
3515
|
p,
|
|
3505
3516
|
this.formInstance.formId,
|
|
3506
3517
|
m,
|
|
3507
|
-
{ ...this.tokenizedData, type: "CHECKOUT", doNotUseLegacyCCFlow: !0, existingCCPMId:
|
|
3518
|
+
{ ...this.tokenizedData, type: "CHECKOUT", doNotUseLegacyCCFlow: !0, existingCCPMId: $ },
|
|
3508
3519
|
this.formInstance.config.baseUrl
|
|
3509
3520
|
), this.formInstance.checkoutFired = !0, this.tokenizedData = null, this.formInstance.config.onCheckoutStarted && this.formInstance.config.onCheckoutStarted();
|
|
3510
|
-
} catch (
|
|
3511
|
-
const
|
|
3512
|
-
this.formInstance.checkoutFired = !1, this.formInstance.config.onCheckoutError && this.formInstance.config.onCheckoutError(
|
|
3521
|
+
} catch (P) {
|
|
3522
|
+
const $ = en(P);
|
|
3523
|
+
this.formInstance.checkoutFired = !1, this.formInstance.config.onCheckoutError && this.formInstance.config.onCheckoutError($);
|
|
3513
3524
|
}
|
|
3514
3525
|
}
|
|
3515
3526
|
handleTokenizeSuccessEvent(a, p, m) {
|
|
3516
3527
|
if (!this.tokenizedData)
|
|
3517
3528
|
throw new Error("Tokenized data not found");
|
|
3518
3529
|
const g = this.tokenized + 1, b = g === Object.keys(this.eventTargets).length;
|
|
3519
|
-
!this.formInstance.checkoutFired && (b || m.isReadyForCheckout) ? (this.tokenizedData.type = this.tokenizedData.type ===
|
|
3530
|
+
!this.formInstance.checkoutFired && (b || m.isReadyForCheckout) ? (this.tokenizedData.type = this.tokenizedData.type === J.enum.TOKENIZE ? J.enum.CHECKOUT : J.enum.START_PAYMENT_FLOW, this.postEventToFrame(a, p, this.tokenizedData), this.tokenizedData = null) : this.tokenized = g;
|
|
3520
3531
|
}
|
|
3521
3532
|
handleCheckoutSuccessEvent(a) {
|
|
3522
3533
|
this.formInstance.config.onCheckoutSuccess && this.formInstance.config.onCheckoutSuccess(a.invoiceUrls, a.subscriptionIds, a.customerId);
|
|
@@ -3538,16 +3549,16 @@ class Oo {
|
|
|
3538
3549
|
return;
|
|
3539
3550
|
for (const [g, b] of Object.entries(this.eventTargets)) {
|
|
3540
3551
|
if (!b) continue;
|
|
3541
|
-
const
|
|
3542
|
-
|
|
3552
|
+
const I = At(
|
|
3553
|
+
J.enum.START_PAYMENT_FLOW,
|
|
3543
3554
|
this.formInstance.sessionId,
|
|
3544
3555
|
document.querySelector(this.formInstance.formTarget) ?? document.body,
|
|
3545
3556
|
this.config.onValidationError,
|
|
3546
3557
|
{ ...m, processor_name: "stripe" },
|
|
3547
3558
|
!1
|
|
3548
3559
|
);
|
|
3549
|
-
if (
|
|
3550
|
-
this.formInstance.checkoutFired = !0, this.tokenizedData =
|
|
3560
|
+
if (I) {
|
|
3561
|
+
this.formInstance.checkoutFired = !0, this.tokenizedData = I, this.postEventToFrame(b, g, I);
|
|
3551
3562
|
break;
|
|
3552
3563
|
}
|
|
3553
3564
|
}
|
|
@@ -3562,7 +3573,7 @@ class Oo {
|
|
|
3562
3573
|
if (!a)
|
|
3563
3574
|
throw new Error("Card not available as a payment method in checkout");
|
|
3564
3575
|
const p = At(
|
|
3565
|
-
|
|
3576
|
+
J.enum.TOKENIZE,
|
|
3566
3577
|
this.formInstance.sessionId,
|
|
3567
3578
|
document.querySelector(this.formInstance.formTarget) ?? document.body,
|
|
3568
3579
|
this.config.onValidationError,
|
|
@@ -3576,7 +3587,7 @@ class Oo {
|
|
|
3576
3587
|
this.tokenizedData = p;
|
|
3577
3588
|
}
|
|
3578
3589
|
postEventToFrame(a, p, m) {
|
|
3579
|
-
|
|
3590
|
+
Br(a, this.formId, p, m, this.config.baseUrl);
|
|
3580
3591
|
}
|
|
3581
3592
|
}
|
|
3582
3593
|
async function To(c) {
|
|
@@ -3603,44 +3614,44 @@ class Po {
|
|
|
3603
3614
|
}
|
|
3604
3615
|
}
|
|
3605
3616
|
async function Io(c, a, p, m, g, b) {
|
|
3606
|
-
const
|
|
3617
|
+
const I = {
|
|
3607
3618
|
apple_pay: { isLoading: !0, isAvailable: !1, startFlow: async () => {
|
|
3608
3619
|
} },
|
|
3609
3620
|
google_pay: { isLoading: !0, isAvailable: !1, startFlow: async () => {
|
|
3610
3621
|
} }
|
|
3611
3622
|
};
|
|
3612
|
-
for (const
|
|
3623
|
+
for (const P of ["apple_pay", "google_pay"])
|
|
3613
3624
|
try {
|
|
3614
|
-
const
|
|
3615
|
-
(
|
|
3625
|
+
const $ = a.find(
|
|
3626
|
+
(U) => U.provider === P && U.processor_name === "stripe"
|
|
3616
3627
|
);
|
|
3617
|
-
if (
|
|
3618
|
-
throw new Error(`${
|
|
3619
|
-
const q = Xn(
|
|
3620
|
-
|
|
3628
|
+
if (!$)
|
|
3629
|
+
throw new Error(`${P} is not available as a checkout method`);
|
|
3630
|
+
const q = Xn($.metadata), V = await jo(q, P);
|
|
3631
|
+
I[P] = {
|
|
3621
3632
|
isLoading: !1,
|
|
3622
|
-
isAvailable:
|
|
3623
|
-
startFlow: (
|
|
3633
|
+
isAvailable: V,
|
|
3634
|
+
startFlow: (U) => Ao(
|
|
3624
3635
|
p,
|
|
3625
3636
|
c.checkoutSecureToken,
|
|
3626
3637
|
document.querySelector(c.formTarget),
|
|
3627
|
-
|
|
3638
|
+
$,
|
|
3628
3639
|
q,
|
|
3629
3640
|
m,
|
|
3630
3641
|
g,
|
|
3631
3642
|
b,
|
|
3632
|
-
|
|
3643
|
+
U
|
|
3633
3644
|
)
|
|
3634
3645
|
};
|
|
3635
3646
|
} catch {
|
|
3636
|
-
|
|
3647
|
+
I[P] = {
|
|
3637
3648
|
isLoading: !1,
|
|
3638
3649
|
isAvailable: !1,
|
|
3639
3650
|
startFlow: async () => {
|
|
3640
3651
|
}
|
|
3641
3652
|
};
|
|
3642
3653
|
}
|
|
3643
|
-
return
|
|
3654
|
+
return I;
|
|
3644
3655
|
}
|
|
3645
3656
|
async function jo(c, a) {
|
|
3646
3657
|
const m = await sn(c, 1e3, "usd"), g = await m.canMakePayment();
|
|
@@ -3648,27 +3659,27 @@ async function jo(c, a) {
|
|
|
3648
3659
|
throw new Error(`Cannot make payment with ${a} for this session`);
|
|
3649
3660
|
return g[a === "apple_pay" ? "applePay" : "googlePay"];
|
|
3650
3661
|
}
|
|
3651
|
-
async function Ao(c, a, p, m, g, b,
|
|
3662
|
+
async function Ao(c, a, p, m, g, b, I, P, $) {
|
|
3652
3663
|
try {
|
|
3653
3664
|
const q = un(p, {});
|
|
3654
|
-
if (!Mo(p,
|
|
3665
|
+
if (!Mo(p, I, m))
|
|
3655
3666
|
return;
|
|
3656
|
-
const
|
|
3667
|
+
const U = (await pn(c)).mode === "setup", G = await Do(U, $, q, c, a), Y = await sn(
|
|
3657
3668
|
g,
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3669
|
+
G.amountAtom,
|
|
3670
|
+
G.currency,
|
|
3671
|
+
U
|
|
3661
3672
|
);
|
|
3662
3673
|
await Y.canMakePayment(), Y.show();
|
|
3663
|
-
const
|
|
3664
|
-
b(
|
|
3674
|
+
const Z = await Qn(Y);
|
|
3675
|
+
b(Z, m);
|
|
3665
3676
|
} catch (q) {
|
|
3666
|
-
|
|
3677
|
+
P(en(q));
|
|
3667
3678
|
}
|
|
3668
3679
|
}
|
|
3669
3680
|
function Mo(c, a, p) {
|
|
3670
3681
|
return !!At(
|
|
3671
|
-
|
|
3682
|
+
J.enum.START_PAYMENT_FLOW,
|
|
3672
3683
|
"dummy",
|
|
3673
3684
|
c,
|
|
3674
3685
|
a ?? (() => {
|
|
@@ -3678,24 +3689,27 @@ function Mo(c, a, p) {
|
|
|
3678
3689
|
);
|
|
3679
3690
|
}
|
|
3680
3691
|
async function Do(c, a, p, m, g) {
|
|
3692
|
+
var V;
|
|
3681
3693
|
if (c)
|
|
3682
|
-
return (a == null ? void 0 : a.
|
|
3683
|
-
a != null && a.
|
|
3684
|
-
const b =
|
|
3694
|
+
return ((V = a == null ? void 0 : a.overridePaymentRequest) == null ? void 0 : V.amount) ?? { amountAtom: 0, currency: "usd" };
|
|
3695
|
+
a != null && a.overridePaymentRequest;
|
|
3696
|
+
const b = te.safeParse(p[It.PROMOTION_CODE]);
|
|
3685
3697
|
if (!b.success)
|
|
3686
3698
|
throw new Error(`Unknown promo code type: ${b.error.message}`);
|
|
3687
|
-
const
|
|
3699
|
+
const I = await So(m, {
|
|
3688
3700
|
secure_token: g,
|
|
3689
3701
|
promotion_code: b.data
|
|
3690
|
-
}),
|
|
3691
|
-
if (
|
|
3692
|
-
throw new Error(`Expected exactly one currency, got ${
|
|
3693
|
-
const
|
|
3694
|
-
return { amountAtom:
|
|
3702
|
+
}), P = new Set(I.preview.invoices.map((U) => U.currency));
|
|
3703
|
+
if (P.size !== 1)
|
|
3704
|
+
throw new Error(`Expected exactly one currency, got ${P.size}`);
|
|
3705
|
+
const $ = P.values().next().value;
|
|
3706
|
+
return { amountAtom: I.preview.invoices.reduce((U, G) => U + G.remaining_amount_atom, 0), currency: $ };
|
|
3695
3707
|
}
|
|
3696
3708
|
class Lo {
|
|
3697
3709
|
constructor(a) {
|
|
3698
|
-
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)
|
|
3710
|
+
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 p = { version: "0.1.3" };
|
|
3712
|
+
window.ojs_version = p, window.addEventListener("message", this.eventHandler.handleMessage.bind(this.eventHandler));
|
|
3699
3713
|
}
|
|
3700
3714
|
getStripePm() {
|
|
3701
3715
|
return this.stripePm;
|
|
@@ -3719,16 +3733,18 @@ class Lo {
|
|
|
3719
3733
|
createElement(a, p = {}) {
|
|
3720
3734
|
if (!this.config) throw new Error("OpenPay form not initialized");
|
|
3721
3735
|
const m = document.createElement("iframe"), g = this.buildQueryString(p);
|
|
3722
|
-
m.name = `${a}-element
|
|
3723
|
-
const b = {
|
|
3736
|
+
m.name = `${a}-element`;
|
|
3737
|
+
const b = new URL(`/app/v1/${m.name}`, this.config.baseUrl);
|
|
3738
|
+
b.search = g.toString(), m.src = b.href, this.config._frameUrl = b, m.style.border = "none", m.style.width = "100%";
|
|
3739
|
+
const I = {
|
|
3724
3740
|
type: a,
|
|
3725
3741
|
node: m,
|
|
3726
|
-
mount: (
|
|
3727
|
-
var
|
|
3728
|
-
return (
|
|
3742
|
+
mount: (P) => {
|
|
3743
|
+
var $;
|
|
3744
|
+
return ($ = document.querySelector(P)) == null ? void 0 : $.appendChild(m);
|
|
3729
3745
|
}
|
|
3730
3746
|
};
|
|
3731
|
-
return this.elements ? this.elements[a] =
|
|
3747
|
+
return this.elements ? this.elements[a] = I : (this.elements = { [a]: I }, this.connectToElement(I)), I;
|
|
3732
3748
|
}
|
|
3733
3749
|
buildQueryString(a) {
|
|
3734
3750
|
const p = new URLSearchParams();
|
|
@@ -3746,8 +3762,8 @@ class Lo {
|
|
|
3746
3762
|
async onUserCompletePaymentRequestUI(a, p) {
|
|
3747
3763
|
if (!(!this.config.onValidationError || !this.sessionId || !this.checkoutPaymentMethods))
|
|
3748
3764
|
for (const [m, g] of Object.entries(this.eventHandler.eventTargets ?? {})) {
|
|
3749
|
-
const b = { stripePmId: a.paymentMethod.id },
|
|
3750
|
-
|
|
3765
|
+
const b = { stripePmId: a.paymentMethod.id }, I = At(
|
|
3766
|
+
J.enum.START_PAYMENT_FLOW,
|
|
3751
3767
|
this.sessionId,
|
|
3752
3768
|
document.querySelector(this.formTarget) ?? document.body,
|
|
3753
3769
|
this.config.onValidationError,
|
|
@@ -3755,8 +3771,8 @@ class Lo {
|
|
|
3755
3771
|
!1,
|
|
3756
3772
|
b
|
|
3757
3773
|
);
|
|
3758
|
-
if (
|
|
3759
|
-
this.stripePm = a, this.checkoutFired = !0, this.eventHandler.setTokenizedData(
|
|
3774
|
+
if (I) {
|
|
3775
|
+
this.stripePm = a, this.checkoutFired = !0, this.eventHandler.setTokenizedData(I), this.eventHandler.postEventToFrame(g, m, I);
|
|
3760
3776
|
break;
|
|
3761
3777
|
}
|
|
3762
3778
|
}
|