@paynext/sdk 0.0.92 → 0.0.94
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/README.md +22 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +608 -555
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +64 -60
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -97,7 +97,7 @@ function Bi(n, t, e) {
|
|
|
97
97
|
Promise.resolve().then(() => {
|
|
98
98
|
Cr();
|
|
99
99
|
});
|
|
100
|
-
var
|
|
100
|
+
var G = /* @__PURE__ */ ((n) => (n.PAYPAL = "PAYPAL", n.APPLE_PAY = "APPLEPAY", n.GOOGLE_PAY = "GPAY", n.CARD = "CARD", n.VENMO = "VENMO", n))(G || {}), Vt = /* @__PURE__ */ ((n) => (n.PENDING = "PENDING", n.FAILED = "FAILED", n.AUTHORIZED = "AUTHORIZED", n.SETTLING = "SETTLING", n.SETTLED = "SETTLED", n.DECLINED = "DECLINED", n.CANCELLED = "CANCELLED", n))(Vt || {}), Ft = /* @__PURE__ */ ((n) => (n.INSUFFICIENT_FUNDS = "insufficient_funds", n.AUTHENTICATION_REQUIRED = "authentication_required", n.CARD_ISSUER_DECLINE = "card_issuer_decline", n.GENERIC_DECLINE = "generic_decline", n.WITHDRAWAL_LIMIT_EXCEEDED = "withdrawal_limit_exceeded", n.DO_NOT_HONOR = "do_not_honor", n.EXPIRED_CARD = "expired_card", n.SUSPECTED_FRAUD = "suspected_fraud", n.INCORRECT_CVC = "incorrect_cvc", n.INVALID_CARD_NUMBER = "invalid_card_number", n.ISSUER_UNAVAILABLE = "issuer_unavailable", n.CARD_LOST_OR_STOLEN = "card_lost_or_stolen", n.CARD_DECLINED = "card_declined", n))(Ft || {});
|
|
101
101
|
const rn = (n = "sandbox") => ({
|
|
102
102
|
develop: "https://dev-api.paynext.com",
|
|
103
103
|
staging: "https://staging-api.paynext.com",
|
|
@@ -105,26 +105,26 @@ const rn = (n = "sandbox") => ({
|
|
|
105
105
|
production: "https://api.paynext.com"
|
|
106
106
|
})[n], zi = [
|
|
107
107
|
{
|
|
108
|
-
type:
|
|
108
|
+
type: G.PAYPAL,
|
|
109
109
|
order: 1,
|
|
110
110
|
is_active: !0
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
|
-
type:
|
|
113
|
+
type: G.APPLE_PAY,
|
|
114
114
|
order: 2,
|
|
115
115
|
is_active: !0
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
|
-
type:
|
|
118
|
+
type: G.GOOGLE_PAY,
|
|
119
119
|
order: 3,
|
|
120
120
|
is_active: !0
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
|
-
type:
|
|
123
|
+
type: G.CARD,
|
|
124
124
|
order: 4,
|
|
125
125
|
is_active: !0
|
|
126
126
|
}
|
|
127
|
-
], ji = (n) => n.googlePay ?
|
|
127
|
+
], ji = (n) => n.googlePay ? G.GOOGLE_PAY : n.applePay ? G.APPLE_PAY : n.paypal ? G.PAYPAL : n.braintree ? G.VENMO : G.CARD, Hi = (n) => {
|
|
128
128
|
const t = n.card;
|
|
129
129
|
if (t)
|
|
130
130
|
return {
|
|
@@ -162,7 +162,7 @@ const rn = (n = "sandbox") => ({
|
|
|
162
162
|
token: t.token.number,
|
|
163
163
|
token_service_provider: t.token.tokenServiceProvider
|
|
164
164
|
};
|
|
165
|
-
},
|
|
165
|
+
}, Yi = (n) => {
|
|
166
166
|
var e, r, a, i, s, o;
|
|
167
167
|
const t = n.applePay;
|
|
168
168
|
if (t)
|
|
@@ -174,7 +174,7 @@ const rn = (n = "sandbox") => ({
|
|
|
174
174
|
token: (s = t.networkToken) == null ? void 0 : s.number,
|
|
175
175
|
token_service_provider: (o = t.networkToken) == null ? void 0 : o.tokenServiceProvider
|
|
176
176
|
};
|
|
177
|
-
},
|
|
177
|
+
}, Gi = (n) => {
|
|
178
178
|
const t = n.braintree;
|
|
179
179
|
if (t)
|
|
180
180
|
return {
|
|
@@ -193,7 +193,7 @@ const rn = (n = "sandbox") => ({
|
|
|
193
193
|
state: ((m = t == null ? void 0 : t.billingContact) == null ? void 0 : m.administrativeArea) || ((v = e == null ? void 0 : e.billingAddress) == null ? void 0 : v.administrativeArea) || void 0
|
|
194
194
|
};
|
|
195
195
|
}, Nn = (n) => {
|
|
196
|
-
var a, i, s, o, c, l, d, u, h, p, f, m, v, y, w, O, L, I,
|
|
196
|
+
var a, i, s, o, c, l, d, u, h, p, f, m, v, y, w, O, L, I, x;
|
|
197
197
|
const { card: t, googlePay: e, applePay: r } = n;
|
|
198
198
|
if (!(!t && !(e != null && e.card) && !(r != null && r.card)))
|
|
199
199
|
return {
|
|
@@ -210,7 +210,7 @@ const rn = (n = "sandbox") => ({
|
|
|
210
210
|
exp_month: t != null && t.expMonth || (v = e == null ? void 0 : e.card) != null && v.expiry.month ? Number((t == null ? void 0 : t.expMonth) || ((y = e == null ? void 0 : e.card) == null ? void 0 : y.expiry.month)) : void 0,
|
|
211
211
|
exp_year: t != null && t.expYear || (w = e == null ? void 0 : e.card) != null && w.expiry.year ? Number((t == null ? void 0 : t.expYear) || ((O = e == null ? void 0 : e.card) == null ? void 0 : O.expiry.year)) : void 0,
|
|
212
212
|
last4: (t == null ? void 0 : t.lastFourDigits) || ((L = e == null ? void 0 : e.card) == null ? void 0 : L.lastFour) || ((I = r == null ? void 0 : r.card) == null ? void 0 : I.lastFour),
|
|
213
|
-
number: (t == null ? void 0 : t.number) || ((
|
|
213
|
+
number: (t == null ? void 0 : t.number) || ((x = e == null ? void 0 : e.card) == null ? void 0 : x.number)
|
|
214
214
|
};
|
|
215
215
|
}, Ln = (n) => {
|
|
216
216
|
var r, a;
|
|
@@ -224,32 +224,32 @@ const rn = (n = "sandbox") => ({
|
|
|
224
224
|
type: t
|
|
225
225
|
};
|
|
226
226
|
switch (t) {
|
|
227
|
-
case
|
|
227
|
+
case G.CARD:
|
|
228
228
|
return J(H({}, e), {
|
|
229
229
|
name: Ln(n),
|
|
230
230
|
card: Hi(n)
|
|
231
231
|
});
|
|
232
|
-
case
|
|
232
|
+
case G.PAYPAL:
|
|
233
233
|
return J(H({}, e), {
|
|
234
234
|
paypal: Ki(n)
|
|
235
235
|
});
|
|
236
|
-
case
|
|
236
|
+
case G.GOOGLE_PAY:
|
|
237
237
|
return J(H({}, e), {
|
|
238
238
|
card: Nn(n),
|
|
239
239
|
google_pay: Wi(n),
|
|
240
240
|
billing_address: On(n)
|
|
241
241
|
});
|
|
242
|
-
case
|
|
242
|
+
case G.APPLE_PAY:
|
|
243
243
|
return J(H({}, e), {
|
|
244
244
|
name: Ln(n),
|
|
245
245
|
card: Nn(n),
|
|
246
|
-
apple_pay:
|
|
246
|
+
apple_pay: Yi(n),
|
|
247
247
|
phone: (a = (r = n.applePay) == null ? void 0 : r.shippingContact) == null ? void 0 : a.phoneNumber,
|
|
248
248
|
billing_address: On(n)
|
|
249
249
|
});
|
|
250
|
-
case
|
|
250
|
+
case G.VENMO:
|
|
251
251
|
return J(H({}, e), {
|
|
252
|
-
venmo:
|
|
252
|
+
venmo: Gi(n)
|
|
253
253
|
});
|
|
254
254
|
default:
|
|
255
255
|
throw new Error(`Unsupported payment method: ${t}`);
|
|
@@ -308,7 +308,7 @@ let Zi = class {
|
|
|
308
308
|
requestPayerDetails: ["name", "email", "phone"],
|
|
309
309
|
process: (v, y) => W(this, [v, y], function* (f, { fail: m }) {
|
|
310
310
|
c == null || c({
|
|
311
|
-
paymentMethod:
|
|
311
|
+
paymentMethod: G.GOOGLE_PAY
|
|
312
312
|
});
|
|
313
313
|
try {
|
|
314
314
|
s == null || s(f);
|
|
@@ -341,7 +341,7 @@ let Zi = class {
|
|
|
341
341
|
locale: e,
|
|
342
342
|
size: {
|
|
343
343
|
width: "100%",
|
|
344
|
-
height:
|
|
344
|
+
height: 40
|
|
345
345
|
},
|
|
346
346
|
borderRadius: 12,
|
|
347
347
|
billingAddress: {
|
|
@@ -350,7 +350,7 @@ let Zi = class {
|
|
|
350
350
|
}, c == null ? void 0 : c.styles), {
|
|
351
351
|
process: (f, m) => W(this, [f, m], function* (h, { fail: p }) {
|
|
352
352
|
o == null || o({
|
|
353
|
-
paymentMethod:
|
|
353
|
+
paymentMethod: G.GOOGLE_PAY
|
|
354
354
|
});
|
|
355
355
|
try {
|
|
356
356
|
i == null || i(h);
|
|
@@ -496,7 +496,7 @@ function Ar(n, t, e, r) {
|
|
|
496
496
|
function ra(n, t, e) {
|
|
497
497
|
return n * (t + 1);
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function Pn(n, t, e, r) {
|
|
500
500
|
var a;
|
|
501
501
|
return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, n + parseFloat(t)) : t === "<" ? e : (a = r.get(t)) != null ? a : n;
|
|
502
502
|
}
|
|
@@ -592,20 +592,20 @@ function pa(n, i = {}, r, a) {
|
|
|
592
592
|
u.set(v, p);
|
|
593
593
|
continue;
|
|
594
594
|
} else if (!Array.isArray(v)) {
|
|
595
|
-
u.set(v.name,
|
|
595
|
+
u.set(v.name, Pn(p, v.at, h, u));
|
|
596
596
|
continue;
|
|
597
597
|
}
|
|
598
598
|
let [y, w, O = {}] = v;
|
|
599
|
-
O.at !== void 0 && (p =
|
|
599
|
+
O.at !== void 0 && (p = Pn(p, O.at, h, u));
|
|
600
600
|
let L = 0;
|
|
601
|
-
const I = (
|
|
602
|
-
const
|
|
601
|
+
const I = (x, N, S, U = 0, Y = 0) => {
|
|
602
|
+
const $ = ha(x), D = N, { delay: F = 0, times: z = Nr($), type: j = "keyframes", repeat: ee, repeatType: M, repeatDelay: q = 0 } = D, K = be(D, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
|
|
603
603
|
let { ease: _ = t.ease || "easeOut", duration: g } = N;
|
|
604
|
-
const R = typeof F == "function" ? F(U,
|
|
604
|
+
const R = typeof F == "function" ? F(U, Y) : F, V = $.length, b = on(j) ? j : a == null ? void 0 : a[j];
|
|
605
605
|
if (V <= 2 && b) {
|
|
606
606
|
let A = 100;
|
|
607
|
-
if (V === 2 && va(
|
|
608
|
-
const ie =
|
|
607
|
+
if (V === 2 && va($)) {
|
|
608
|
+
const ie = $[1] - $[0];
|
|
609
609
|
A = Math.abs(ie);
|
|
610
610
|
}
|
|
611
611
|
const B = H({}, K);
|
|
@@ -616,32 +616,32 @@ function pa(n, i = {}, r, a) {
|
|
|
616
616
|
g != null || (g = o);
|
|
617
617
|
const T = p + R;
|
|
618
618
|
z.length === 1 && z[0] === 0 && (z[1] = 1);
|
|
619
|
-
const E = z.length -
|
|
620
|
-
if (E > 0 && Or(z, E),
|
|
619
|
+
const E = z.length - $.length;
|
|
620
|
+
if (E > 0 && Or(z, E), $.length === 1 && $.unshift(null), ee) {
|
|
621
621
|
Ce(ee < ua, "Repeat count too high, must be less than 20"), g = ra(g, ee);
|
|
622
|
-
const A = [
|
|
622
|
+
const A = [...$], B = [...z];
|
|
623
623
|
_ = Array.isArray(_) ? [..._] : [_];
|
|
624
624
|
const X = [..._];
|
|
625
625
|
for (let ie = 0; ie < ee; ie++) {
|
|
626
|
-
|
|
626
|
+
$.push(...A);
|
|
627
627
|
for (let k = 0; k < A.length; k++)
|
|
628
628
|
z.push(B[k] + (ie + 1)), _.push(k === 0 ? "linear" : Tr(X, k - 1));
|
|
629
629
|
}
|
|
630
630
|
ca(z, ee);
|
|
631
631
|
}
|
|
632
|
-
const
|
|
633
|
-
oa(S,
|
|
632
|
+
const P = T + g;
|
|
633
|
+
oa(S, $, _, z, T, P), L = Math.max(R + g, L), f = Math.max(P, f);
|
|
634
634
|
};
|
|
635
635
|
if (fe(y)) {
|
|
636
|
-
const
|
|
637
|
-
I(w, O, Rn("default",
|
|
636
|
+
const x = xn(y, l);
|
|
637
|
+
I(w, O, Rn("default", x));
|
|
638
638
|
} else {
|
|
639
|
-
const
|
|
639
|
+
const x = Ar(y, w, r, d), N = x.length;
|
|
640
640
|
for (let S = 0; S < N; S++) {
|
|
641
641
|
w = w, O = O;
|
|
642
|
-
const U =
|
|
643
|
-
for (const
|
|
644
|
-
I(w[
|
|
642
|
+
const U = x[S], Y = xn(U, l);
|
|
643
|
+
for (const $ in w)
|
|
644
|
+
I(w[$], fa(O, $), Rn($, Y), S, N);
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
647
|
h = p, p += L;
|
|
@@ -652,15 +652,15 @@ function pa(n, i = {}, r, a) {
|
|
|
652
652
|
w.sort(la);
|
|
653
653
|
const O = [], L = [], I = [];
|
|
654
654
|
for (let N = 0; N < w.length; N++) {
|
|
655
|
-
const { at: S, value: U, easing:
|
|
656
|
-
O.push(U), L.push(/* @__PURE__ */ sn(0, f, S)), I.push(
|
|
655
|
+
const { at: S, value: U, easing: Y } = w[N];
|
|
656
|
+
O.push(U), L.push(/* @__PURE__ */ sn(0, f, S)), I.push(Y || "easeOut");
|
|
657
657
|
}
|
|
658
658
|
L[0] !== 0 && (L.unshift(0), O.unshift(O[0]), I.unshift(da)), L[L.length - 1] !== 1 && (L.push(1), O.push(null)), c.has(v) || c.set(v, {
|
|
659
659
|
keyframes: {},
|
|
660
660
|
transition: {}
|
|
661
661
|
});
|
|
662
|
-
const
|
|
663
|
-
|
|
662
|
+
const x = c.get(v);
|
|
663
|
+
x.keyframes[y] = O, x.transition[y] = H(J(H({}, t), {
|
|
664
664
|
duration: f,
|
|
665
665
|
ease: I,
|
|
666
666
|
times: L
|
|
@@ -668,7 +668,7 @@ function pa(n, i = {}, r, a) {
|
|
|
668
668
|
}
|
|
669
669
|
}), c;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function xn(n, t) {
|
|
672
672
|
return !t.has(n) && t.set(n, {}), t.get(n);
|
|
673
673
|
}
|
|
674
674
|
function Rn(n, t) {
|
|
@@ -687,7 +687,7 @@ function kn(n) {
|
|
|
687
687
|
t[0][r] = e.get(), t[1][r] = e.getVelocity();
|
|
688
688
|
}), t;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function Pr(n, t, e, r) {
|
|
691
691
|
if (typeof t == "function") {
|
|
692
692
|
const [a, i] = kn(r);
|
|
693
693
|
t = t(e !== void 0 ? e : n.custom, a, i);
|
|
@@ -700,7 +700,7 @@ function xr(n, t, e, r) {
|
|
|
700
700
|
}
|
|
701
701
|
function ya(n, t, e) {
|
|
702
702
|
const r = n.getProps();
|
|
703
|
-
return
|
|
703
|
+
return Pr(r, t, r.custom, n);
|
|
704
704
|
}
|
|
705
705
|
const ut = [
|
|
706
706
|
"setup",
|
|
@@ -773,7 +773,7 @@ function _a(n, t) {
|
|
|
773
773
|
};
|
|
774
774
|
return { schedule: ut.reduce((O, L) => {
|
|
775
775
|
const I = s[L];
|
|
776
|
-
return O[L] = (
|
|
776
|
+
return O[L] = (x, N = !1, S = !1) => (e || v(), I.schedule(x, N, S)), O;
|
|
777
777
|
}, {}), cancel: (O) => {
|
|
778
778
|
for (let L = 0; L < ut.length; L++)
|
|
779
779
|
s[ut[L]].cancel(O);
|
|
@@ -790,7 +790,7 @@ const ve = {
|
|
|
790
790
|
vt = n, queueMicrotask(Ca);
|
|
791
791
|
}
|
|
792
792
|
}, Sn = /* @__PURE__ */ new Set();
|
|
793
|
-
function
|
|
793
|
+
function xr(n, t, e) {
|
|
794
794
|
n || Sn.has(t) || (console.warn(t), Sn.add(t));
|
|
795
795
|
}
|
|
796
796
|
class Rr {
|
|
@@ -886,7 +886,7 @@ class wa {
|
|
|
886
886
|
* @deprecated
|
|
887
887
|
*/
|
|
888
888
|
onChange(t) {
|
|
889
|
-
return process.env.NODE_ENV !== "production" &&
|
|
889
|
+
return process.env.NODE_ENV !== "production" && xr(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
890
890
|
}
|
|
891
891
|
on(t, e) {
|
|
892
892
|
this.events[t] || (this.events[t] = new Rr());
|
|
@@ -1054,9 +1054,9 @@ function La(n, t) {
|
|
|
1054
1054
|
n.addValue("willChange", r), r.add(t);
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
const ln = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(),
|
|
1057
|
+
const ln = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Pa = "framerAppearId", xa = "data-" + ln(Pa);
|
|
1058
1058
|
function Ra(n) {
|
|
1059
|
-
return n.props[
|
|
1059
|
+
return n.props[xa];
|
|
1060
1060
|
}
|
|
1061
1061
|
const ka = (n) => n !== null;
|
|
1062
1062
|
function Sa(n, { repeat: t, repeatType: e = "loop" }, r) {
|
|
@@ -1136,7 +1136,7 @@ const Ka = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
1136
1136
|
parse: /* @__PURE__ */ Vr("red", "green", "blue"),
|
|
1137
1137
|
transform: ({ red: n, green: t, blue: e, alpha: r = 1 }) => "rgba(" + Tt.transform(n) + ", " + Tt.transform(t) + ", " + Tt.transform(e) + ", " + Ze(nt.transform(r)) + ")"
|
|
1138
1138
|
};
|
|
1139
|
-
function
|
|
1139
|
+
function Ya(n) {
|
|
1140
1140
|
let t = "", e = "", r = "", a = "";
|
|
1141
1141
|
return n.length > 5 ? (t = n.substring(1, 3), e = n.substring(3, 5), r = n.substring(5, 7), a = n.substring(7, 9)) : (t = n.substring(1, 2), e = n.substring(2, 3), r = n.substring(3, 4), a = n.substring(4, 5), t += t, e += e, r += r, a += a), {
|
|
1142
1142
|
red: parseInt(t, 16),
|
|
@@ -1147,13 +1147,13 @@ function Ga(n) {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
const Bt = {
|
|
1149
1149
|
test: /* @__PURE__ */ pn("#"),
|
|
1150
|
-
parse:
|
|
1150
|
+
parse: Ya,
|
|
1151
1151
|
transform: Ne.transform
|
|
1152
1152
|
}, ot = /* @__NO_SIDE_EFFECTS__ */ (n) => ({
|
|
1153
1153
|
test: (t) => typeof t == "string" && t.endsWith(n) && t.split(" ").length === 1,
|
|
1154
1154
|
parse: parseFloat,
|
|
1155
1155
|
transform: (t) => `${t}${n}`
|
|
1156
|
-
}), Ie = /* @__PURE__ */ ot("deg"), De = /* @__PURE__ */ ot("%"), Z = /* @__PURE__ */ ot("px"),
|
|
1156
|
+
}), Ie = /* @__PURE__ */ ot("deg"), De = /* @__PURE__ */ ot("%"), Z = /* @__PURE__ */ ot("px"), Ga = /* @__PURE__ */ ot("vh"), $a = /* @__PURE__ */ ot("vw"), Dn = J(H({}, De), {
|
|
1157
1157
|
parse: (n) => De.parse(n) / 100,
|
|
1158
1158
|
transform: (n) => De.transform(n * 100)
|
|
1159
1159
|
}), Se = {
|
|
@@ -1426,36 +1426,36 @@ function it(n = ae.visualDuration, t = ae.bounce) {
|
|
|
1426
1426
|
let O;
|
|
1427
1427
|
if (m < 1) {
|
|
1428
1428
|
const I = jt(y, m);
|
|
1429
|
-
O = (
|
|
1430
|
-
const N = Math.exp(-m * y *
|
|
1431
|
-
return s - N * ((f + m * y * v) / I * Math.sin(I *
|
|
1429
|
+
O = (x) => {
|
|
1430
|
+
const N = Math.exp(-m * y * x);
|
|
1431
|
+
return s - N * ((f + m * y * v) / I * Math.sin(I * x) + v * Math.cos(I * x));
|
|
1432
1432
|
};
|
|
1433
1433
|
} else if (m === 1)
|
|
1434
1434
|
O = (I) => s - Math.exp(-y * I) * (v + (f + y * v) * I);
|
|
1435
1435
|
else {
|
|
1436
1436
|
const I = y * Math.sqrt(m * m - 1);
|
|
1437
|
-
O = (
|
|
1438
|
-
const N = Math.exp(-m * y *
|
|
1437
|
+
O = (x) => {
|
|
1438
|
+
const N = Math.exp(-m * y * x), S = Math.min(I * x, 300);
|
|
1439
1439
|
return s - N * ((f + m * y * v) * Math.sinh(S) + I * v * Math.cosh(S)) / I;
|
|
1440
1440
|
};
|
|
1441
1441
|
}
|
|
1442
1442
|
const L = {
|
|
1443
1443
|
calculatedDuration: p && u || null,
|
|
1444
1444
|
next: (I) => {
|
|
1445
|
-
const
|
|
1445
|
+
const x = O(I);
|
|
1446
1446
|
if (p)
|
|
1447
1447
|
o.done = I >= u;
|
|
1448
1448
|
else {
|
|
1449
1449
|
let N = I === 0 ? f : 0;
|
|
1450
|
-
m < 1 && (N = I === 0 ? /* @__PURE__ */ Ee(f) : Wr(O, I,
|
|
1451
|
-
const S = Math.abs(N) <= r, U = Math.abs(s -
|
|
1450
|
+
m < 1 && (N = I === 0 ? /* @__PURE__ */ Ee(f) : Wr(O, I, x));
|
|
1451
|
+
const S = Math.abs(N) <= r, U = Math.abs(s - x) <= a;
|
|
1452
1452
|
o.done = S && U;
|
|
1453
1453
|
}
|
|
1454
|
-
return o.value = o.done ? s :
|
|
1454
|
+
return o.value = o.done ? s : x, o;
|
|
1455
1455
|
},
|
|
1456
1456
|
toString: () => {
|
|
1457
|
-
const I = Math.min(cn(L), gt),
|
|
1458
|
-
return I + "ms " +
|
|
1457
|
+
const I = Math.min(cn(L), gt), x = Kr((N) => L.next(I * N).value, I, 30);
|
|
1458
|
+
return I + "ms " + x;
|
|
1459
1459
|
},
|
|
1460
1460
|
toTransition: () => {
|
|
1461
1461
|
}
|
|
@@ -1475,12 +1475,12 @@ function Ht({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 3
|
|
|
1475
1475
|
const v = u + m, y = s === void 0 ? v : s(v);
|
|
1476
1476
|
y !== v && (m = y - u);
|
|
1477
1477
|
const w = (S) => -m * Math.exp(-S / r), O = (S) => y + w(S), L = (S) => {
|
|
1478
|
-
const U = w(S),
|
|
1479
|
-
h.done = Math.abs(U) <= l, h.value = h.done ? y :
|
|
1478
|
+
const U = w(S), Y = O(S);
|
|
1479
|
+
h.done = Math.abs(U) <= l, h.value = h.done ? y : Y;
|
|
1480
1480
|
};
|
|
1481
|
-
let I,
|
|
1481
|
+
let I, x;
|
|
1482
1482
|
const N = (S) => {
|
|
1483
|
-
p(h.value) && (I = S,
|
|
1483
|
+
p(h.value) && (I = S, x = it({
|
|
1484
1484
|
keyframes: [h.value, f(h.value)],
|
|
1485
1485
|
velocity: Wr(O, S, h.value),
|
|
1486
1486
|
// TODO: This should be passing * 1000
|
|
@@ -1494,7 +1494,7 @@ function Ht({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 3
|
|
|
1494
1494
|
calculatedDuration: null,
|
|
1495
1495
|
next: (S) => {
|
|
1496
1496
|
let U = !1;
|
|
1497
|
-
return !
|
|
1497
|
+
return !x && I === void 0 && (U = !0, L(S), N(S)), I !== void 0 && S >= I ? x.next(S - I) : (!U && L(S), h);
|
|
1498
1498
|
}
|
|
1499
1499
|
};
|
|
1500
1500
|
}
|
|
@@ -1533,11 +1533,11 @@ function Es(n, t, { clamp: e = !0, ease: r, mixer: a } = {}) {
|
|
|
1533
1533
|
function _s(n, t) {
|
|
1534
1534
|
return n.map((e) => e * t);
|
|
1535
1535
|
}
|
|
1536
|
-
const
|
|
1536
|
+
const Yr = (n, t, e) => (((1 - 3 * e + 3 * t) * n + (3 * e - 6 * t)) * n + 3 * t) * n, Cs = 1e-7, As = 12;
|
|
1537
1537
|
function ws(n, t, e, r, a) {
|
|
1538
1538
|
let i, s, o = 0;
|
|
1539
1539
|
do
|
|
1540
|
-
s = t + (e - t) / 2, i =
|
|
1540
|
+
s = t + (e - t) / 2, i = Yr(s, r, a) - n, i > 0 ? e = s : t = s;
|
|
1541
1541
|
while (Math.abs(i) > Cs && ++o < As);
|
|
1542
1542
|
return s;
|
|
1543
1543
|
}
|
|
@@ -1545,12 +1545,12 @@ function ct(n, t, e, r) {
|
|
|
1545
1545
|
if (n === t && e === r)
|
|
1546
1546
|
return Fe;
|
|
1547
1547
|
const a = (i) => ws(i, 0, 1, n, e);
|
|
1548
|
-
return (i) => i === 0 || i === 1 ? i :
|
|
1548
|
+
return (i) => i === 0 || i === 1 ? i : Yr(a(i), t, r);
|
|
1549
1549
|
}
|
|
1550
|
-
const Ts = /* @__PURE__ */ ct(0.42, 0, 1, 1), Is = /* @__PURE__ */ ct(0, 0, 0.58, 1),
|
|
1550
|
+
const Ts = /* @__PURE__ */ ct(0.42, 0, 1, 1), Is = /* @__PURE__ */ ct(0, 0, 0.58, 1), Gr = /* @__PURE__ */ ct(0.42, 0, 0.58, 1), $r = (n) => (t) => t <= 0.5 ? n(2 * t) / 2 : (2 - n(2 * (1 - t))) / 2, qr = (n) => (t) => 1 - n(1 - t), Qr = /* @__PURE__ */ ct(0.33, 1.53, 0.69, 0.99), mn = /* @__PURE__ */ qr(Qr), Xr = /* @__PURE__ */ $r(mn), Zr = (n) => (n *= 2) < 1 ? 0.5 * mn(n) : 0.5 * (2 - Math.pow(2, -10 * (n - 1))), vn = (n) => 1 - Math.sin(Math.acos(n)), Os = qr(vn), Jr = $r(vn), ei = (n) => Array.isArray(n) && typeof n[0] == "number", zn = {
|
|
1551
1551
|
linear: Fe,
|
|
1552
1552
|
easeIn: Ts,
|
|
1553
|
-
easeInOut:
|
|
1553
|
+
easeInOut: Gr,
|
|
1554
1554
|
easeOut: Is,
|
|
1555
1555
|
circIn: vn,
|
|
1556
1556
|
circInOut: Jr,
|
|
@@ -1569,7 +1569,7 @@ const Ts = /* @__PURE__ */ ct(0.42, 0, 1, 1), Is = /* @__PURE__ */ ct(0, 0, 0.58
|
|
|
1569
1569
|
return n;
|
|
1570
1570
|
};
|
|
1571
1571
|
function Ls(n, t) {
|
|
1572
|
-
return n.map(() => t ||
|
|
1572
|
+
return n.map(() => t || Gr).splice(0, n.length - 1);
|
|
1573
1573
|
}
|
|
1574
1574
|
function Me({ duration: n = 300, keyframes: t, times: e, ease: r = "easeInOut" }) {
|
|
1575
1575
|
const a = wr(r) ? r.map(jn) : jn(r), i = {
|
|
@@ -1588,12 +1588,12 @@ function Me({ duration: n = 300, keyframes: t, times: e, ease: r = "easeInOut" }
|
|
|
1588
1588
|
next: (c) => (i.value = o(c), i.done = c >= n, i)
|
|
1589
1589
|
};
|
|
1590
1590
|
}
|
|
1591
|
-
const
|
|
1591
|
+
const Ps = (n) => n !== null;
|
|
1592
1592
|
function gn(n, { repeat: t, repeatType: e = "loop" }, r, a = 1) {
|
|
1593
|
-
const i = n.filter(
|
|
1593
|
+
const i = n.filter(Ps), o = a < 0 || t && e !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
1594
1594
|
return !o || r === void 0 ? i[o] : r;
|
|
1595
1595
|
}
|
|
1596
|
-
const
|
|
1596
|
+
const xs = {
|
|
1597
1597
|
decay: Ht,
|
|
1598
1598
|
inertia: Ht,
|
|
1599
1599
|
tween: Me,
|
|
@@ -1601,7 +1601,7 @@ const Ps = {
|
|
|
1601
1601
|
spring: it
|
|
1602
1602
|
};
|
|
1603
1603
|
function ti(n) {
|
|
1604
|
-
typeof n.type == "string" && (n.type =
|
|
1604
|
+
typeof n.type == "string" && (n.type = xs[n.type]);
|
|
1605
1605
|
}
|
|
1606
1606
|
class yn {
|
|
1607
1607
|
constructor() {
|
|
@@ -1666,14 +1666,14 @@ class bn extends yn {
|
|
|
1666
1666
|
let O = this.currentTime, L = r;
|
|
1667
1667
|
if (u) {
|
|
1668
1668
|
const S = Math.min(this.currentTime, a) / o;
|
|
1669
|
-
let U = Math.floor(S),
|
|
1670
|
-
!
|
|
1669
|
+
let U = Math.floor(S), Y = S % 1;
|
|
1670
|
+
!Y && S >= 1 && (Y = 1), Y === 1 && U--, U = Math.min(U, u + 1), !!(U % 2) && (h === "reverse" ? (Y = 1 - Y, p && (Y -= p / o)) : h === "mirror" && (L = s)), O = Re(0, 1, Y) * o;
|
|
1671
1671
|
}
|
|
1672
1672
|
const I = w ? { done: !1, value: d[0] } : L.next(O);
|
|
1673
1673
|
i && (I.value = i(I.value));
|
|
1674
|
-
let { done:
|
|
1675
|
-
!w && c !== null && (
|
|
1676
|
-
const N = this.holdTime === null && (this.state === "finished" || this.state === "running" &&
|
|
1674
|
+
let { done: x } = I;
|
|
1675
|
+
!w && c !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= a : this.currentTime <= 0);
|
|
1676
|
+
const N = this.holdTime === null && (this.state === "finished" || this.state === "running" && x);
|
|
1677
1677
|
return N && f !== Ht && (I.value = gn(d, this.options, v, this.speed)), m && m(I.value), N && this.finish(), I;
|
|
1678
1678
|
}
|
|
1679
1679
|
/**
|
|
@@ -1778,12 +1778,12 @@ const Le = (n) => n * 180 / Math.PI, Kt = (n) => {
|
|
|
1778
1778
|
skewY: (n) => Le(Math.atan(n[1])),
|
|
1779
1779
|
skew: (n) => (Math.abs(n[1]) + Math.abs(n[4])) / 2
|
|
1780
1780
|
};
|
|
1781
|
-
function
|
|
1781
|
+
function Yt(n) {
|
|
1782
1782
|
return n.includes("scale") ? 1 : 0;
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1784
|
+
function Gt(n, t) {
|
|
1785
1785
|
if (!n || n === "none")
|
|
1786
|
-
return
|
|
1786
|
+
return Yt(t);
|
|
1787
1787
|
const e = n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
1788
1788
|
let r, a;
|
|
1789
1789
|
if (e)
|
|
@@ -1793,18 +1793,18 @@ function Yt(n, t) {
|
|
|
1793
1793
|
r = Ss, a = o;
|
|
1794
1794
|
}
|
|
1795
1795
|
if (!a)
|
|
1796
|
-
return
|
|
1796
|
+
return Yt(t);
|
|
1797
1797
|
const i = r[t], s = a[1].split(",").map(Vs);
|
|
1798
1798
|
return typeof i == "function" ? i(s) : s[i];
|
|
1799
1799
|
}
|
|
1800
1800
|
const Ds = (n, t) => {
|
|
1801
1801
|
const { transform: e = "none" } = getComputedStyle(n);
|
|
1802
|
-
return
|
|
1802
|
+
return Gt(e, t);
|
|
1803
1803
|
};
|
|
1804
1804
|
function Vs(n) {
|
|
1805
1805
|
return parseFloat(n.trim());
|
|
1806
1806
|
}
|
|
1807
|
-
const
|
|
1807
|
+
const Yn = (n) => n === ze || n === Z, Fs = /* @__PURE__ */ new Set(["x", "y", "z"]), Us = Ue.filter((n) => !Fs.has(n));
|
|
1808
1808
|
function Bs(n) {
|
|
1809
1809
|
const t = [];
|
|
1810
1810
|
return Us.forEach((e) => {
|
|
@@ -1812,7 +1812,7 @@ function Bs(n) {
|
|
|
1812
1812
|
r !== void 0 && (t.push([e, r.get()]), r.set(e.startsWith("scale") ? 1 : 0));
|
|
1813
1813
|
}), t;
|
|
1814
1814
|
}
|
|
1815
|
-
const
|
|
1815
|
+
const Pe = {
|
|
1816
1816
|
// Dimensions
|
|
1817
1817
|
width: ({ x: n }, { paddingLeft: t = "0", paddingRight: e = "0" }) => n.max - n.min - parseFloat(t) - parseFloat(e),
|
|
1818
1818
|
height: ({ y: n }, { paddingTop: t = "0", paddingBottom: e = "0" }) => n.max - n.min - parseFloat(t) - parseFloat(e),
|
|
@@ -1821,16 +1821,16 @@ const xe = {
|
|
|
1821
1821
|
bottom: ({ y: n }, { top: t }) => parseFloat(t) + (n.max - n.min),
|
|
1822
1822
|
right: ({ x: n }, { left: t }) => parseFloat(t) + (n.max - n.min),
|
|
1823
1823
|
// Transform
|
|
1824
|
-
x: (n, { transform: t }) =>
|
|
1825
|
-
y: (n, { transform: t }) =>
|
|
1824
|
+
x: (n, { transform: t }) => Gt(t, "x"),
|
|
1825
|
+
y: (n, { transform: t }) => Gt(t, "y")
|
|
1826
1826
|
};
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
const
|
|
1827
|
+
Pe.translateX = Pe.x;
|
|
1828
|
+
Pe.translateY = Pe.y;
|
|
1829
|
+
const xe = /* @__PURE__ */ new Set();
|
|
1830
1830
|
let $t = !1, qt = !1, Qt = !1;
|
|
1831
1831
|
function ni() {
|
|
1832
1832
|
if (qt) {
|
|
1833
|
-
const n = Array.from(
|
|
1833
|
+
const n = Array.from(xe).filter((r) => r.needsMeasurement), t = new Set(n.map((r) => r.element)), e = /* @__PURE__ */ new Map();
|
|
1834
1834
|
t.forEach((r) => {
|
|
1835
1835
|
const a = Bs(r);
|
|
1836
1836
|
a.length && (e.set(r, a), r.render());
|
|
@@ -1845,10 +1845,10 @@ function ni() {
|
|
|
1845
1845
|
r.suspendedScrollY !== void 0 && window.scrollTo(0, r.suspendedScrollY);
|
|
1846
1846
|
});
|
|
1847
1847
|
}
|
|
1848
|
-
qt = !1, $t = !1,
|
|
1848
|
+
qt = !1, $t = !1, xe.forEach((n) => n.complete(Qt)), xe.clear();
|
|
1849
1849
|
}
|
|
1850
1850
|
function ri() {
|
|
1851
|
-
|
|
1851
|
+
xe.forEach((n) => {
|
|
1852
1852
|
n.readKeyframes(), n.needsMeasurement && (qt = !0);
|
|
1853
1853
|
});
|
|
1854
1854
|
}
|
|
@@ -1860,7 +1860,7 @@ class En {
|
|
|
1860
1860
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = e, this.name = r, this.motionValue = a, this.element = i, this.isAsync = s;
|
|
1861
1861
|
}
|
|
1862
1862
|
scheduleResolve() {
|
|
1863
|
-
this.state = "scheduled", this.isAsync ? (
|
|
1863
|
+
this.state = "scheduled", this.isAsync ? (xe.add(this), $t || ($t = !0, we.read(ri), we.resolveKeyframes(ni))) : (this.readKeyframes(), this.complete());
|
|
1864
1864
|
}
|
|
1865
1865
|
readKeyframes() {
|
|
1866
1866
|
const { unresolvedKeyframes: t, name: e, element: r, motionValue: a } = this;
|
|
@@ -1885,10 +1885,10 @@ class En {
|
|
|
1885
1885
|
measureEndState() {
|
|
1886
1886
|
}
|
|
1887
1887
|
complete(t = !1) {
|
|
1888
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t),
|
|
1888
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), xe.delete(this);
|
|
1889
1889
|
}
|
|
1890
1890
|
cancel() {
|
|
1891
|
-
this.state === "scheduled" && (
|
|
1891
|
+
this.state === "scheduled" && (xe.delete(this), this.state = "pending");
|
|
1892
1892
|
}
|
|
1893
1893
|
resume() {
|
|
1894
1894
|
this.state === "pending" && this.scheduleResolve();
|
|
@@ -1904,21 +1904,21 @@ function _n(n) {
|
|
|
1904
1904
|
return () => (t === void 0 && (t = n()), t);
|
|
1905
1905
|
}
|
|
1906
1906
|
const Ks = /* @__PURE__ */ _n(() => window.ScrollTimeline !== void 0), Ws = {};
|
|
1907
|
-
function
|
|
1907
|
+
function Ys(n, t) {
|
|
1908
1908
|
const e = /* @__PURE__ */ _n(n);
|
|
1909
1909
|
return () => {
|
|
1910
1910
|
var r;
|
|
1911
1911
|
return (r = Ws[t]) != null ? r : e();
|
|
1912
1912
|
};
|
|
1913
1913
|
}
|
|
1914
|
-
const ii = /* @__PURE__ */
|
|
1914
|
+
const ii = /* @__PURE__ */ Ys(() => {
|
|
1915
1915
|
try {
|
|
1916
1916
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1917
1917
|
} catch (n) {
|
|
1918
1918
|
return !1;
|
|
1919
1919
|
}
|
|
1920
1920
|
return !0;
|
|
1921
|
-
}, "linearEasing"), Xe = ([n, t, e, r]) => `cubic-bezier(${n}, ${t}, ${e}, ${r})`,
|
|
1921
|
+
}, "linearEasing"), Xe = ([n, t, e, r]) => `cubic-bezier(${n}, ${t}, ${e}, ${r})`, Gn = {
|
|
1922
1922
|
linear: "linear",
|
|
1923
1923
|
ease: "ease",
|
|
1924
1924
|
easeIn: "ease-in",
|
|
@@ -1931,9 +1931,9 @@ const ii = /* @__PURE__ */ Gs(() => {
|
|
|
1931
1931
|
};
|
|
1932
1932
|
function ai(n, t) {
|
|
1933
1933
|
if (n)
|
|
1934
|
-
return typeof n == "function" ? ii() ? Kr(n, t) : "ease-out" : ei(n) ? Xe(n) : Array.isArray(n) ? n.map((e) => ai(e, t) ||
|
|
1934
|
+
return typeof n == "function" ? ii() ? Kr(n, t) : "ease-out" : ei(n) ? Xe(n) : Array.isArray(n) ? n.map((e) => ai(e, t) || Gn.easeOut) : Gn[n];
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1936
|
+
function Gs(n, t, e, { delay: r = 0, duration: a = 300, repeat: i = 0, repeatType: s = "loop", ease: o = "easeOut", times: c } = {}, l = void 0) {
|
|
1937
1937
|
const d = {
|
|
1938
1938
|
[t]: e
|
|
1939
1939
|
};
|
|
@@ -1962,7 +1962,7 @@ class qs extends yn {
|
|
|
1962
1962
|
const { element: e, name: r, keyframes: a, pseudoElement: i, allowFlatten: s = !1, finalKeyframe: o, onComplete: c } = t;
|
|
1963
1963
|
this.isPseudoElement = !!i, this.allowFlatten = s, this.options = t, Ce(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
|
|
1964
1964
|
const l = $s(t);
|
|
1965
|
-
this.animation =
|
|
1965
|
+
this.animation = Gs(e, r, a, l, i), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1966
1966
|
if (this.finishedTime = this.time, !i) {
|
|
1967
1967
|
const d = gn(a, this.options, o, this.speed);
|
|
1968
1968
|
this.updateMotionValue ? this.updateMotionValue(d) : Hs(e, r, d), this.animation.cancel();
|
|
@@ -2394,7 +2394,7 @@ function Eo(n, t, e) {
|
|
|
2394
2394
|
const pi = (n) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n), hi = (n) => /^0[^.\s]+$/u.test(n), _o = {
|
|
2395
2395
|
test: (n) => n === "auto",
|
|
2396
2396
|
parse: (n) => n
|
|
2397
|
-
}, fi = (n) => (t) => t.test(n), mi = [ze, Z, De, Ie, $a,
|
|
2397
|
+
}, fi = (n) => (t) => t.test(n), mi = [ze, Z, De, Ie, $a, Ga, _o], Zn = (n) => mi.find(fi(n)), Co = [...mi, ue, je], Ao = (n) => Co.find(fi(n)), wo = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2398
2398
|
function To(n) {
|
|
2399
2399
|
const [t, e] = n.slice(0, -1).split("(");
|
|
2400
2400
|
if (t === "drop-shadow")
|
|
@@ -2536,7 +2536,7 @@ class yi {
|
|
|
2536
2536
|
}
|
|
2537
2537
|
}
|
|
2538
2538
|
mount(t) {
|
|
2539
|
-
this.current = t, et.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, r) => this.bindToMotionValue(r, e)), di.current || fo(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Zt.current, process.env.NODE_ENV !== "production" &&
|
|
2539
|
+
this.current = t, et.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, r) => this.bindToMotionValue(r, e)), di.current || fo(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Zt.current, process.env.NODE_ENV !== "production" && xr(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
2540
2540
|
}
|
|
2541
2541
|
unmount() {
|
|
2542
2542
|
this.projection && this.projection.unmount(), Ut(this.notifyUpdate), Ut(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -2689,7 +2689,7 @@ class yi {
|
|
|
2689
2689
|
const { initial: e } = this.props;
|
|
2690
2690
|
let r;
|
|
2691
2691
|
if (typeof e == "string" || typeof e == "object") {
|
|
2692
|
-
const s =
|
|
2692
|
+
const s = Pr(this.props, e, (i = this.presenceContext) == null ? void 0 : i.custom);
|
|
2693
2693
|
s && (r = s[t]);
|
|
2694
2694
|
}
|
|
2695
2695
|
if (e && r !== void 0)
|
|
@@ -2708,17 +2708,17 @@ const Lo = (
|
|
|
2708
2708
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
2709
2709
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
2710
2710
|
);
|
|
2711
|
-
function
|
|
2711
|
+
function Po(n) {
|
|
2712
2712
|
const t = Lo.exec(n);
|
|
2713
2713
|
if (!t)
|
|
2714
2714
|
return [,];
|
|
2715
2715
|
const [, e, r, a] = t;
|
|
2716
2716
|
return [`--${e != null ? e : r}`, a];
|
|
2717
2717
|
}
|
|
2718
|
-
const
|
|
2718
|
+
const xo = 4;
|
|
2719
2719
|
function bi(n, t, e = 1) {
|
|
2720
|
-
Ce(e <=
|
|
2721
|
-
const [r, a] =
|
|
2720
|
+
Ce(e <= xo, `Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);
|
|
2721
|
+
const [r, a] = Po(n);
|
|
2722
2722
|
if (!r)
|
|
2723
2723
|
return;
|
|
2724
2724
|
const i = window.getComputedStyle(t).getPropertyValue(r);
|
|
@@ -2762,12 +2762,12 @@ class Mo extends En {
|
|
|
2762
2762
|
return;
|
|
2763
2763
|
const [a, i] = t, s = Zn(a), o = Zn(i);
|
|
2764
2764
|
if (s !== o)
|
|
2765
|
-
if (
|
|
2765
|
+
if (Yn(s) && Yn(o))
|
|
2766
2766
|
for (let c = 0; c < t.length; c++) {
|
|
2767
2767
|
const l = t[c];
|
|
2768
2768
|
typeof l == "string" && (t[c] = parseFloat(l));
|
|
2769
2769
|
}
|
|
2770
|
-
else
|
|
2770
|
+
else Pe[r] && (this.needsMeasurement = !0);
|
|
2771
2771
|
}
|
|
2772
2772
|
resolveNoneKeyframes() {
|
|
2773
2773
|
const { unresolvedKeyframes: t, name: e } = this, r = [];
|
|
@@ -2779,7 +2779,7 @@ class Mo extends En {
|
|
|
2779
2779
|
const { element: t, unresolvedKeyframes: e, name: r } = this;
|
|
2780
2780
|
if (!t || !t.current)
|
|
2781
2781
|
return;
|
|
2782
|
-
r === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin =
|
|
2782
|
+
r === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = Pe[r](t.measureViewportBox(), window.getComputedStyle(t.current)), e[0] = this.measuredOrigin;
|
|
2783
2783
|
const a = e[e.length - 1];
|
|
2784
2784
|
a !== void 0 && t.getValue(r, a).jump(a, !1);
|
|
2785
2785
|
}
|
|
@@ -2791,7 +2791,7 @@ class Mo extends En {
|
|
|
2791
2791
|
const a = t.getValue(e);
|
|
2792
2792
|
a && a.jump(this.measuredOrigin, !1);
|
|
2793
2793
|
const i = r.length - 1, s = r[i];
|
|
2794
|
-
r[i] =
|
|
2794
|
+
r[i] = Pe[e](t.measureViewportBox(), window.getComputedStyle(t.current)), s !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = s), (o = this.removedTransforms) != null && o.length && this.removedTransforms.forEach(([c, l]) => {
|
|
2795
2795
|
t.getValue(c).set(l);
|
|
2796
2796
|
}), this.resolveNoneKeyframes();
|
|
2797
2797
|
}
|
|
@@ -2889,7 +2889,7 @@ class jo extends Ei {
|
|
|
2889
2889
|
readValueFromInstance(t, e) {
|
|
2890
2890
|
var r;
|
|
2891
2891
|
if (Be.has(e))
|
|
2892
|
-
return (r = this.projection) != null && r.isProjecting ?
|
|
2892
|
+
return (r = this.projection) != null && r.isProjecting ? Yt(e) : Ds(t, e);
|
|
2893
2893
|
{
|
|
2894
2894
|
const a = zo(t), i = (Dr(e) ? a.getPropertyValue(e) : a[e]) || 0;
|
|
2895
2895
|
return typeof i == "string" ? i.trim() : i;
|
|
@@ -2940,13 +2940,13 @@ class Ko extends yi {
|
|
|
2940
2940
|
const Wo = {
|
|
2941
2941
|
offset: "stroke-dashoffset",
|
|
2942
2942
|
array: "stroke-dasharray"
|
|
2943
|
-
},
|
|
2943
|
+
}, Yo = {
|
|
2944
2944
|
offset: "strokeDashoffset",
|
|
2945
2945
|
array: "strokeDasharray"
|
|
2946
2946
|
};
|
|
2947
|
-
function
|
|
2947
|
+
function Go(n, t, e = 1, r = 0, a = !0) {
|
|
2948
2948
|
n.pathLength = 1;
|
|
2949
|
-
const i = a ? Wo :
|
|
2949
|
+
const i = a ? Wo : Yo;
|
|
2950
2950
|
n[i.offset] = Z.transform(-r);
|
|
2951
2951
|
const s = Z.transform(t), o = Z.transform(e);
|
|
2952
2952
|
n[i.array] = `${s} ${o}`;
|
|
@@ -2974,7 +2974,7 @@ function $o(n, u, c, l, d) {
|
|
|
2974
2974
|
}
|
|
2975
2975
|
n.attrs = n.style, n.style = {};
|
|
2976
2976
|
const { attrs: p, style: f } = n;
|
|
2977
|
-
p.transform && (f.transform = p.transform, delete p.transform), (f.transform || p.transformOrigin) && (f.transformOrigin = (m = p.transformOrigin) != null ? m : "50% 50%", delete p.transformOrigin), f.transform && (f.transformBox = (v = d == null ? void 0 : d.transformBox) != null ? v : "fill-box", delete p.transformBox), t !== void 0 && (p.x = t), e !== void 0 && (p.y = e), r !== void 0 && (p.scale = r), a !== void 0 &&
|
|
2977
|
+
p.transform && (f.transform = p.transform, delete p.transform), (f.transform || p.transformOrigin) && (f.transformOrigin = (m = p.transformOrigin) != null ? m : "50% 50%", delete p.transformOrigin), f.transform && (f.transformBox = (v = d == null ? void 0 : d.transformBox) != null ? v : "fill-box", delete p.transformBox), t !== void 0 && (p.x = t), e !== void 0 && (p.y = e), r !== void 0 && (p.scale = r), a !== void 0 && Go(p, a, i, s, !1);
|
|
2978
2978
|
}
|
|
2979
2979
|
const Ti = /* @__PURE__ */ new Set([
|
|
2980
2980
|
"baseFrequency",
|
|
@@ -3245,16 +3245,16 @@ const _c = "_checkout_lsspc_1", Cc = "_hidden_lsspc_8", Ac = "_formInitial_lsspc
|
|
|
3245
3245
|
}, Tc = "_buttons_1i8cu_1", Ic = "_hidden_1i8cu_5", Lt = {
|
|
3246
3246
|
buttons: Tc,
|
|
3247
3247
|
hidden: Ic
|
|
3248
|
-
}, Oc = "_applePay_f1ztr_1", Nc = "_hidden_f1ztr_28",
|
|
3248
|
+
}, Oc = "_applePay_f1ztr_1", Nc = "_hidden_f1ztr_28", Pt = {
|
|
3249
3249
|
applePay: Oc,
|
|
3250
3250
|
hidden: Nc
|
|
3251
3251
|
};
|
|
3252
3252
|
function wn(n) {
|
|
3253
3253
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
3254
3254
|
}
|
|
3255
|
-
var
|
|
3255
|
+
var xt, nr;
|
|
3256
3256
|
function Lc() {
|
|
3257
|
-
if (nr) return
|
|
3257
|
+
if (nr) return xt;
|
|
3258
3258
|
nr = 1;
|
|
3259
3259
|
var n = {
|
|
3260
3260
|
visa: {
|
|
@@ -3448,7 +3448,7 @@ function Lc() {
|
|
|
3448
3448
|
}
|
|
3449
3449
|
}
|
|
3450
3450
|
};
|
|
3451
|
-
return
|
|
3451
|
+
return xt = n, xt;
|
|
3452
3452
|
}
|
|
3453
3453
|
var He = {}, Ke = {}, rr;
|
|
3454
3454
|
function Li() {
|
|
@@ -3460,7 +3460,7 @@ function Li() {
|
|
|
3460
3460
|
return Ke.clone = n, Ke;
|
|
3461
3461
|
}
|
|
3462
3462
|
var We = {}, ir;
|
|
3463
|
-
function
|
|
3463
|
+
function Pc() {
|
|
3464
3464
|
if (ir) return We;
|
|
3465
3465
|
ir = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.matches = void 0;
|
|
3466
3466
|
function n(r, a, i) {
|
|
@@ -3476,10 +3476,10 @@ function xc() {
|
|
|
3476
3476
|
return We.matches = e, We;
|
|
3477
3477
|
}
|
|
3478
3478
|
var ar;
|
|
3479
|
-
function
|
|
3479
|
+
function xc() {
|
|
3480
3480
|
if (ar) return He;
|
|
3481
3481
|
ar = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.addMatchingCardsToResults = void 0;
|
|
3482
|
-
var n = Li(), t =
|
|
3482
|
+
var n = Li(), t = Pc();
|
|
3483
3483
|
function e(r, a, i) {
|
|
3484
3484
|
var s, o;
|
|
3485
3485
|
for (s = 0; s < a.patterns.length; s++) {
|
|
@@ -3493,19 +3493,19 @@ function Pc() {
|
|
|
3493
3493
|
}
|
|
3494
3494
|
return He.addMatchingCardsToResults = e, He;
|
|
3495
3495
|
}
|
|
3496
|
-
var
|
|
3496
|
+
var Ye = {}, sr;
|
|
3497
3497
|
function Rc() {
|
|
3498
|
-
if (sr) return
|
|
3499
|
-
sr = 1, Object.defineProperty(
|
|
3498
|
+
if (sr) return Ye;
|
|
3499
|
+
sr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.isValidInputType = void 0;
|
|
3500
3500
|
function n(t) {
|
|
3501
3501
|
return typeof t == "string" || t instanceof String;
|
|
3502
3502
|
}
|
|
3503
|
-
return
|
|
3503
|
+
return Ye.isValidInputType = n, Ye;
|
|
3504
3504
|
}
|
|
3505
|
-
var
|
|
3505
|
+
var Ge = {}, or;
|
|
3506
3506
|
function kc() {
|
|
3507
|
-
if (or) return
|
|
3508
|
-
or = 1, Object.defineProperty(
|
|
3507
|
+
if (or) return Ge;
|
|
3508
|
+
or = 1, Object.defineProperty(Ge, "__esModule", { value: !0 }), Ge.findBestMatch = void 0;
|
|
3509
3509
|
function n(e) {
|
|
3510
3510
|
var r = e.filter(function(a) {
|
|
3511
3511
|
return a.matchStrength;
|
|
@@ -3517,7 +3517,7 @@ function kc() {
|
|
|
3517
3517
|
return !r || Number(r.matchStrength) < Number(a.matchStrength) ? a : r;
|
|
3518
3518
|
}) : null;
|
|
3519
3519
|
}
|
|
3520
|
-
return
|
|
3520
|
+
return Ge.findBestMatch = t, Ge;
|
|
3521
3521
|
}
|
|
3522
3522
|
var $e, cr;
|
|
3523
3523
|
function Sc() {
|
|
@@ -3531,7 +3531,7 @@ function Sc() {
|
|
|
3531
3531
|
}
|
|
3532
3532
|
return f;
|
|
3533
3533
|
}, n.apply(this, arguments);
|
|
3534
|
-
}, t = Lc(), e =
|
|
3534
|
+
}, t = Lc(), e = xc(), r = Rc(), a = kc(), i = Li(), s = {}, o = {
|
|
3535
3535
|
VISA: "visa",
|
|
3536
3536
|
MASTERCARD: "mastercard",
|
|
3537
3537
|
AMERICAN_EXPRESS: "american-express",
|
|
@@ -3674,7 +3674,7 @@ const Et = [
|
|
|
3674
3674
|
minLength: 12,
|
|
3675
3675
|
maxLength: 19
|
|
3676
3676
|
}
|
|
3677
|
-
],
|
|
3677
|
+
], Pi = [
|
|
3678
3678
|
{
|
|
3679
3679
|
name: "American Express",
|
|
3680
3680
|
// type: CardType.AmericanExpress,
|
|
@@ -3691,11 +3691,11 @@ const Et = [
|
|
|
3691
3691
|
}
|
|
3692
3692
|
], Fc = (n) => {
|
|
3693
3693
|
var t, e;
|
|
3694
|
-
return (e = (t =
|
|
3694
|
+
return (e = (t = Pi.find((r) => r.name === "American Express")) == null ? void 0 : t.pattern.test(n)) != null ? e : !1;
|
|
3695
3695
|
}, Uc = (n) => {
|
|
3696
3696
|
var t, e;
|
|
3697
|
-
return (e = (t =
|
|
3698
|
-
},
|
|
3697
|
+
return (e = (t = Pi.find((r) => r.name === "Discover")) == null ? void 0 : t.pattern.test(n)) != null ? e : !1;
|
|
3698
|
+
}, xi = (n) => Et.find((t) => t.pattern.test(n)) || null, lr = (n) => Et.filter((t) => t.pattern.test(n)), Bc = (n) => {
|
|
3699
3699
|
let t = 0, e = !1;
|
|
3700
3700
|
for (let r = n.length - 1; r >= 0; r--) {
|
|
3701
3701
|
let a = parseInt(n[r]);
|
|
@@ -3710,7 +3710,7 @@ const Et = [
|
|
|
3710
3710
|
return { isValid: !1, cardType: null, error: le.Invalid };
|
|
3711
3711
|
if (Fc(e) || Uc(e))
|
|
3712
3712
|
return { isValid: !1, cardType: null, error: le.Unsupported };
|
|
3713
|
-
const r =
|
|
3713
|
+
const r = xi(e);
|
|
3714
3714
|
if (r) {
|
|
3715
3715
|
if (e.length < r.minLength || e.length > r.maxLength)
|
|
3716
3716
|
return {
|
|
@@ -3740,7 +3740,7 @@ const Et = [
|
|
|
3740
3740
|
}, zc = (n) => {
|
|
3741
3741
|
var t;
|
|
3742
3742
|
return n ? typeof n.amount != "number" ? (console.error("Transaction amount is missing or invalid for Google Pay"), null) : n.currency ? n.country ? n.merchant_id ? n.checkout_config && !((t = n.checkout_config) == null ? void 0 : t.find(
|
|
3743
|
-
({ is_active: r, type: a }) => r && a ===
|
|
3743
|
+
({ is_active: r, type: a }) => r && a === G.GOOGLE_PAY
|
|
3744
3744
|
)) ? null : {
|
|
3745
3745
|
amount: n.amount,
|
|
3746
3746
|
currency: n.currency,
|
|
@@ -3751,7 +3751,7 @@ const Et = [
|
|
|
3751
3751
|
}, jc = (n) => {
|
|
3752
3752
|
var t, e;
|
|
3753
3753
|
return n ? typeof n.amount != "number" ? (console.error("Transaction amount is missing or invalid for Apple Pay"), null) : n.currency ? n.country ? n.merchant_id ? n.checkout_config && !((t = n.checkout_config) == null ? void 0 : t.find(
|
|
3754
|
-
({ is_active: a, type: i }) => a && i ===
|
|
3754
|
+
({ is_active: a, type: i }) => a && i === G.APPLE_PAY
|
|
3755
3755
|
)) ? null : {
|
|
3756
3756
|
amount: n.amount,
|
|
3757
3757
|
currency: n.currency,
|
|
@@ -3840,7 +3840,7 @@ const Et = [
|
|
|
3840
3840
|
tr: "tr",
|
|
3841
3841
|
ua: "uk",
|
|
3842
3842
|
zh: "zh"
|
|
3843
|
-
})[n] || "en",
|
|
3843
|
+
})[n] || "en", Yc = (n) => ({
|
|
3844
3844
|
en: "en_US",
|
|
3845
3845
|
ar: "ar_EG",
|
|
3846
3846
|
cs: "cs_CZ",
|
|
@@ -3876,7 +3876,7 @@ var ht = { exports: {} }, qe = {};
|
|
|
3876
3876
|
* LICENSE file in the root directory of this source tree.
|
|
3877
3877
|
*/
|
|
3878
3878
|
var ur;
|
|
3879
|
-
function
|
|
3879
|
+
function Gc() {
|
|
3880
3880
|
if (ur) return qe;
|
|
3881
3881
|
ur = 1;
|
|
3882
3882
|
var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
@@ -3913,7 +3913,7 @@ function $c() {
|
|
|
3913
3913
|
function n(g) {
|
|
3914
3914
|
if (g == null) return null;
|
|
3915
3915
|
if (typeof g == "function")
|
|
3916
|
-
return g.$$typeof ===
|
|
3916
|
+
return g.$$typeof === Y ? null : g.displayName || g.name || null;
|
|
3917
3917
|
if (typeof g == "string") return g;
|
|
3918
3918
|
switch (g) {
|
|
3919
3919
|
case m:
|
|
@@ -3924,7 +3924,7 @@ function $c() {
|
|
|
3924
3924
|
return "StrictMode";
|
|
3925
3925
|
case I:
|
|
3926
3926
|
return "Suspense";
|
|
3927
|
-
case
|
|
3927
|
+
case x:
|
|
3928
3928
|
return "SuspenseList";
|
|
3929
3929
|
case U:
|
|
3930
3930
|
return "Activity";
|
|
@@ -3985,7 +3985,7 @@ function $c() {
|
|
|
3985
3985
|
}
|
|
3986
3986
|
}
|
|
3987
3987
|
function a() {
|
|
3988
|
-
var g =
|
|
3988
|
+
var g = $.A;
|
|
3989
3989
|
return g === null ? null : g.getOwner();
|
|
3990
3990
|
}
|
|
3991
3991
|
function i() {
|
|
@@ -4016,7 +4016,7 @@ function $c() {
|
|
|
4016
4016
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
4017
4017
|
)), g = this.props.ref, g !== void 0 ? g : null;
|
|
4018
4018
|
}
|
|
4019
|
-
function l(g, R, V, b, T, E,
|
|
4019
|
+
function l(g, R, V, b, T, E, P, D) {
|
|
4020
4020
|
return V = E.ref, g = {
|
|
4021
4021
|
$$typeof: p,
|
|
4022
4022
|
type: g,
|
|
@@ -4040,7 +4040,7 @@ function $c() {
|
|
|
4040
4040
|
configurable: !1,
|
|
4041
4041
|
enumerable: !1,
|
|
4042
4042
|
writable: !0,
|
|
4043
|
-
value:
|
|
4043
|
+
value: P
|
|
4044
4044
|
}), Object.defineProperty(g, "_debugTask", {
|
|
4045
4045
|
configurable: !1,
|
|
4046
4046
|
enumerable: !1,
|
|
@@ -4048,7 +4048,7 @@ function $c() {
|
|
|
4048
4048
|
value: D
|
|
4049
4049
|
}), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
|
|
4050
4050
|
}
|
|
4051
|
-
function d(g, R, V, b, T, E,
|
|
4051
|
+
function d(g, R, V, b, T, E, P, D) {
|
|
4052
4052
|
var A = R.children;
|
|
4053
4053
|
if (A !== void 0)
|
|
4054
4054
|
if (b)
|
|
@@ -4094,14 +4094,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4094
4094
|
T,
|
|
4095
4095
|
a(),
|
|
4096
4096
|
V,
|
|
4097
|
-
|
|
4097
|
+
P,
|
|
4098
4098
|
D
|
|
4099
4099
|
);
|
|
4100
4100
|
}
|
|
4101
4101
|
function u(g) {
|
|
4102
4102
|
typeof g == "object" && g !== null && g.$$typeof === p && g._store && (g._store.validated = 1);
|
|
4103
4103
|
}
|
|
4104
|
-
var h = Fi, p = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), O = Symbol.for("react.context"), L = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"),
|
|
4104
|
+
var h = Fi, p = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), O = Symbol.for("react.context"), L = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), U = Symbol.for("react.activity"), Y = Symbol.for("react.client.reference"), $ = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, z = Array.isArray, j = console.createTask ? console.createTask : function() {
|
|
4105
4105
|
return null;
|
|
4106
4106
|
};
|
|
4107
4107
|
h = {
|
|
@@ -4109,12 +4109,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4109
4109
|
return g();
|
|
4110
4110
|
}
|
|
4111
4111
|
};
|
|
4112
|
-
var ee, M = {},
|
|
4112
|
+
var ee, M = {}, q = h.react_stack_bottom_frame.bind(
|
|
4113
4113
|
h,
|
|
4114
4114
|
i
|
|
4115
4115
|
)(), K = j(r(i)), _ = {};
|
|
4116
4116
|
Qe.Fragment = m, Qe.jsx = function(g, R, V, b, T) {
|
|
4117
|
-
var E = 1e4 >
|
|
4117
|
+
var E = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
4118
4118
|
return d(
|
|
4119
4119
|
g,
|
|
4120
4120
|
R,
|
|
@@ -4122,11 +4122,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4122
4122
|
!1,
|
|
4123
4123
|
b,
|
|
4124
4124
|
T,
|
|
4125
|
-
E ? Error("react-stack-top-frame") :
|
|
4125
|
+
E ? Error("react-stack-top-frame") : q,
|
|
4126
4126
|
E ? j(r(g)) : K
|
|
4127
4127
|
);
|
|
4128
4128
|
}, Qe.jsxs = function(g, R, V, b, T) {
|
|
4129
|
-
var E = 1e4 >
|
|
4129
|
+
var E = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
4130
4130
|
return d(
|
|
4131
4131
|
g,
|
|
4132
4132
|
R,
|
|
@@ -4134,7 +4134,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4134
4134
|
!0,
|
|
4135
4135
|
b,
|
|
4136
4136
|
T,
|
|
4137
|
-
E ? Error("react-stack-top-frame") :
|
|
4137
|
+
E ? Error("react-stack-top-frame") : q,
|
|
4138
4138
|
E ? j(r(g)) : K
|
|
4139
4139
|
);
|
|
4140
4140
|
};
|
|
@@ -4142,7 +4142,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4142
4142
|
}
|
|
4143
4143
|
var hr;
|
|
4144
4144
|
function qc() {
|
|
4145
|
-
return hr || (hr = 1, process.env.NODE_ENV === "production" ? ht.exports =
|
|
4145
|
+
return hr || (hr = 1, process.env.NODE_ENV === "production" ? ht.exports = Gc() : ht.exports = $c()), ht.exports;
|
|
4146
4146
|
}
|
|
4147
4147
|
qc();
|
|
4148
4148
|
const Qc = [
|
|
@@ -4175,7 +4175,7 @@ class Zc {
|
|
|
4175
4175
|
C(this, "onPaymentAttempt");
|
|
4176
4176
|
this.config = t;
|
|
4177
4177
|
const e = this.config.state.styles.getState().ApplePayButton;
|
|
4178
|
-
this.onPaymentAttempt = this.config.state.checkout.getState().onCheckoutAttempt, this.ev = this.config.service.ev, this.customButtonStyles = e, this.element = document.createElement("div"), this.element.classList.add(
|
|
4178
|
+
this.onPaymentAttempt = this.config.state.checkout.getState().onCheckoutAttempt, this.ev = this.config.service.ev, this.customButtonStyles = e, this.element = document.createElement("div"), this.element.classList.add(Pt.applePay, Pt.hidden);
|
|
4179
4179
|
}
|
|
4180
4180
|
init(t) {
|
|
4181
4181
|
return W(this, null, function* () {
|
|
@@ -4206,7 +4206,7 @@ class Zc {
|
|
|
4206
4206
|
onPaymentAttempt: this.onPaymentAttempt
|
|
4207
4207
|
}),
|
|
4208
4208
|
this.customButtonStyles
|
|
4209
|
-
), this.ev.isAppleAvailable() ? (yield this.ev.renderApple(this.element), this.isInitialized = !0, this.element.classList.remove(
|
|
4209
|
+
), this.ev.isAppleAvailable() ? (yield this.ev.renderApple(this.element), this.isInitialized = !0, this.element.classList.remove(Pt.hidden), this.events.ready.emit(), !0) : !1;
|
|
4210
4210
|
});
|
|
4211
4211
|
}
|
|
4212
4212
|
addEventListener(t, e) {
|
|
@@ -4218,11 +4218,11 @@ class Zc {
|
|
|
4218
4218
|
}
|
|
4219
4219
|
}
|
|
4220
4220
|
const Jc = [
|
|
4221
|
-
{ type:
|
|
4222
|
-
{ type:
|
|
4223
|
-
{ type:
|
|
4224
|
-
{ type:
|
|
4225
|
-
{ type:
|
|
4221
|
+
{ type: G.PAYPAL, is_active: !0, order: 1 },
|
|
4222
|
+
{ type: G.APPLE_PAY, is_active: !0, order: 2 },
|
|
4223
|
+
{ type: G.GOOGLE_PAY, is_active: !0, order: 3 },
|
|
4224
|
+
{ type: G.VENMO, is_active: !0, order: 4 },
|
|
4225
|
+
{ type: G.CARD, is_active: !0, order: 5 }
|
|
4226
4226
|
], ke = {
|
|
4227
4227
|
open: { y: 0, opacity: 1 },
|
|
4228
4228
|
close: { y: 100, opacity: 0 },
|
|
@@ -4332,7 +4332,7 @@ class al {
|
|
|
4332
4332
|
clientId: e.paypal_info.client_id,
|
|
4333
4333
|
environment: e.paypal_info.environment || "sandbox",
|
|
4334
4334
|
vault: !0,
|
|
4335
|
-
locale:
|
|
4335
|
+
locale: Yc(this.config.state.translate.locale()),
|
|
4336
4336
|
intent: "tokenize"
|
|
4337
4337
|
}), !this.paypal.isLoaded())
|
|
4338
4338
|
return !1;
|
|
@@ -4341,12 +4341,12 @@ class al {
|
|
|
4341
4341
|
}
|
|
4342
4342
|
const i = t ? J(H({}, t), {
|
|
4343
4343
|
onError: (c) => {
|
|
4344
|
-
var
|
|
4344
|
+
var d, u;
|
|
4345
4345
|
if (this.emitAttemptOnce(), !this.isInitialized) {
|
|
4346
4346
|
console.error("PayPal error:", c);
|
|
4347
4347
|
return;
|
|
4348
4348
|
}
|
|
4349
|
-
(
|
|
4349
|
+
!this.isUserCancellationError(c) && c ? (d = t.onError) == null || d.call(t, c) : (u = t.onCancel) == null || u.call(t), this.attemptEmitted = !1;
|
|
4350
4350
|
},
|
|
4351
4351
|
onCancel: () => {
|
|
4352
4352
|
var c;
|
|
@@ -4373,8 +4373,9 @@ class al {
|
|
|
4373
4373
|
(c = i == null ? void 0 : i.onCancel) == null || c.call(i);
|
|
4374
4374
|
},
|
|
4375
4375
|
onError: (c) => {
|
|
4376
|
-
var
|
|
4377
|
-
|
|
4376
|
+
var d, u;
|
|
4377
|
+
const l = this.isUserCancellationError(c);
|
|
4378
|
+
!l && c ? (d = i == null ? void 0 : i.onError) == null || d.call(i, c) : l && ((u = i == null ? void 0 : i.onCancel) == null || u.call(i));
|
|
4378
4379
|
}
|
|
4379
4380
|
}));
|
|
4380
4381
|
} catch (c) {
|
|
@@ -4388,7 +4389,22 @@ class al {
|
|
|
4388
4389
|
return this.events[t].addListener(e);
|
|
4389
4390
|
}
|
|
4390
4391
|
emitAttemptOnce() {
|
|
4391
|
-
this.attemptEmitted || (this.attemptEmitted = !0, this.events.onPaymentAttempt.emit(
|
|
4392
|
+
this.attemptEmitted || (this.attemptEmitted = !0, this.events.onPaymentAttempt.emit(G.PAYPAL));
|
|
4393
|
+
}
|
|
4394
|
+
isUserCancellationError(t) {
|
|
4395
|
+
var a;
|
|
4396
|
+
if (!t) return !1;
|
|
4397
|
+
const e = typeof t == "string" ? t : (t == null ? void 0 : t.message) || ((a = t == null ? void 0 : t.status_reason) == null ? void 0 : a.message) || "";
|
|
4398
|
+
return [
|
|
4399
|
+
"window is closed",
|
|
4400
|
+
"window closed",
|
|
4401
|
+
"popup closed",
|
|
4402
|
+
"user closed",
|
|
4403
|
+
"cancelled by user",
|
|
4404
|
+
"user cancelled"
|
|
4405
|
+
].some(
|
|
4406
|
+
(i) => e.toLowerCase().includes(i)
|
|
4407
|
+
);
|
|
4392
4408
|
}
|
|
4393
4409
|
setupInterceptOverlay() {
|
|
4394
4410
|
if (this.interceptOverlay) return;
|
|
@@ -4416,18 +4432,18 @@ class al {
|
|
|
4416
4432
|
class sl {
|
|
4417
4433
|
constructor() {
|
|
4418
4434
|
C(this, "template", `
|
|
4419
|
-
<svg
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
stroke
|
|
4425
|
-
stroke-
|
|
4426
|
-
|
|
4427
|
-
|
|
4435
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
4436
|
+
width="24"
|
|
4437
|
+
height="24"
|
|
4438
|
+
viewBox="0 0 24 24"
|
|
4439
|
+
fill="none"
|
|
4440
|
+
stroke="currentColor"
|
|
4441
|
+
stroke-width="2"
|
|
4442
|
+
stroke-linecap="round"
|
|
4443
|
+
stroke-linejoin="round"
|
|
4428
4444
|
>
|
|
4429
|
-
|
|
4430
|
-
|
|
4445
|
+
<rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect>
|
|
4446
|
+
<line x1="1" y1="10" x2="23" y2="10"></line>
|
|
4431
4447
|
</svg>
|
|
4432
4448
|
<span class="${ne.srOnly}">Pay with</span>
|
|
4433
4449
|
`);
|
|
@@ -4510,7 +4526,7 @@ class ml {
|
|
|
4510
4526
|
// display venmo button
|
|
4511
4527
|
displayVenmoButton(t) {
|
|
4512
4528
|
Object.assign(this.venmoButton.style, hl), this.venmoButton.addEventListener("click", () => W(this, null, function* () {
|
|
4513
|
-
if (this.events.onPaymentAttempt.emit(
|
|
4529
|
+
if (this.events.onPaymentAttempt.emit(G.VENMO), !this.isProcessing) {
|
|
4514
4530
|
this.isProcessing = !0, this.venmoButton.disabled = !0;
|
|
4515
4531
|
try {
|
|
4516
4532
|
const e = yield this.braintree.tokenize();
|
|
@@ -4581,25 +4597,44 @@ class vl {
|
|
|
4581
4597
|
logPerformanceMetrics() {
|
|
4582
4598
|
if (this.performanceMetrics.size === 0) return;
|
|
4583
4599
|
const t = [];
|
|
4584
|
-
let e = 0, r = 0;
|
|
4585
|
-
this.performanceMetrics.forEach((
|
|
4600
|
+
let e = 0, r = 0, a = 0, i = 0;
|
|
4601
|
+
this.performanceMetrics.forEach((o, c) => {
|
|
4602
|
+
if (c === "__parallel_total__") {
|
|
4603
|
+
i = o.duration;
|
|
4604
|
+
return;
|
|
4605
|
+
}
|
|
4586
4606
|
t.push({
|
|
4587
|
-
"Payment Method":
|
|
4588
|
-
Status:
|
|
4589
|
-
"Duration (ms)":
|
|
4590
|
-
}), e +=
|
|
4607
|
+
"Payment Method": c,
|
|
4608
|
+
Status: o.status,
|
|
4609
|
+
"Duration (ms)": o.duration.toFixed(2)
|
|
4610
|
+
}), e += o.duration, a = Math.max(a, o.duration), o.status.includes("✓") && r++;
|
|
4591
4611
|
}), console.groupCollapsed(
|
|
4592
4612
|
`%c🚀 Payment Buttons Performance (${r} rendered)`,
|
|
4593
4613
|
"font-weight: bold; font-size: 14px; color: #4CAF50;"
|
|
4594
4614
|
), console.info(
|
|
4595
|
-
`%
|
|
4615
|
+
`%c⚡ Actual parallel execution time: ${i.toFixed(2)}ms`,
|
|
4616
|
+
"font-weight: bold; color: #4CAF50; font-size: 12px;"
|
|
4617
|
+
), console.info(
|
|
4618
|
+
`%c📊 Sum of individual durations: ${e.toFixed(2)}ms`,
|
|
4619
|
+
"font-weight: bold; color: #FF9800;"
|
|
4620
|
+
), console.info(
|
|
4621
|
+
`%c🎯 Longest button init: ${a.toFixed(2)}ms`,
|
|
4596
4622
|
"font-weight: bold; color: #2196F3;"
|
|
4623
|
+
);
|
|
4624
|
+
const s = i > 0 ? (a / i * 100).toFixed(1) : 0;
|
|
4625
|
+
console.info(
|
|
4626
|
+
`%c${i <= a * 1.1 ? "✅" : "⚠️"} Parallelization efficiency: ${s}% ${i <= a * 1.1 ? "(Good!)" : "(Needs optimization)"}`,
|
|
4627
|
+
`font-weight: bold; color: ${i <= a * 1.1 ? "#4CAF50" : "#F44336"};`
|
|
4597
4628
|
), console.table(t), console.info(
|
|
4598
4629
|
`%c📊 Legend:
|
|
4599
4630
|
✓ Rendered - Button successfully initialized and rendered
|
|
4600
4631
|
✗ Not supported - Button not supported on this device/browser
|
|
4601
4632
|
✗ Error - Initialization error occurred
|
|
4602
|
-
Skipped - Button not configured
|
|
4633
|
+
Skipped - Button not configured
|
|
4634
|
+
|
|
4635
|
+
💡 Note:
|
|
4636
|
+
If "Actual parallel execution time" ≈ "Longest button init" → buttons load in parallel ✅
|
|
4637
|
+
If "Actual parallel execution time" ≈ "Sum of durations" → buttons load sequentially ⚠️`,
|
|
4603
4638
|
"color: #666;"
|
|
4604
4639
|
), console.groupEnd();
|
|
4605
4640
|
}
|
|
@@ -4632,19 +4667,19 @@ class vl {
|
|
|
4632
4667
|
try {
|
|
4633
4668
|
if (yield this.applePay.init({
|
|
4634
4669
|
onError: (i) => {
|
|
4635
|
-
this.events.error.emit(i), t == null || t.remove(), this.attempted.delete(
|
|
4670
|
+
this.events.error.emit(i), t == null || t.remove(), this.attempted.delete(G.APPLE_PAY);
|
|
4636
4671
|
},
|
|
4637
4672
|
onCancel: () => {
|
|
4638
|
-
this.events.cancel.emit(), this.attempted.delete(
|
|
4673
|
+
this.events.cancel.emit(), this.attempted.delete(G.APPLE_PAY);
|
|
4639
4674
|
},
|
|
4640
4675
|
onSuccess: (i) => {
|
|
4641
|
-
this.events.success.emit(J(H({}, i), { type: "apple" })), this.attempted.delete(
|
|
4676
|
+
this.events.success.emit(J(H({}, i), { type: "apple" })), this.attempted.delete(G.APPLE_PAY);
|
|
4642
4677
|
}
|
|
4643
4678
|
})) {
|
|
4644
4679
|
const i = this.applePay.render();
|
|
4645
4680
|
t == null || t.appendChild(i);
|
|
4646
4681
|
const s = () => {
|
|
4647
|
-
this.attempted.has(
|
|
4682
|
+
this.attempted.has(G.APPLE_PAY) || (this.attempted.add(G.APPLE_PAY), this.events.onPaymentAttempt.emit(G.APPLE_PAY));
|
|
4648
4683
|
};
|
|
4649
4684
|
i.addEventListener("pointerdown", s, { capture: !0 }), i.addEventListener("click", s, { capture: !0 }), i.addEventListener(
|
|
4650
4685
|
"keydown",
|
|
@@ -4701,19 +4736,19 @@ class vl {
|
|
|
4701
4736
|
try {
|
|
4702
4737
|
if (yield this.googlePay.init({
|
|
4703
4738
|
onError: (i) => {
|
|
4704
|
-
this.events.error.emit(i), t == null || t.remove(), this.attempted.delete(
|
|
4739
|
+
this.events.error.emit(i), t == null || t.remove(), this.attempted.delete(G.GOOGLE_PAY);
|
|
4705
4740
|
},
|
|
4706
4741
|
onCancel: () => {
|
|
4707
|
-
this.events.cancel.emit(), this.attempted.delete(
|
|
4742
|
+
this.events.cancel.emit(), this.attempted.delete(G.GOOGLE_PAY);
|
|
4708
4743
|
},
|
|
4709
4744
|
onSuccess: (i) => {
|
|
4710
|
-
this.events.success.emit(J(H({}, i), { type: "google" })), this.attempted.delete(
|
|
4745
|
+
this.events.success.emit(J(H({}, i), { type: "google" })), this.attempted.delete(G.GOOGLE_PAY);
|
|
4711
4746
|
}
|
|
4712
4747
|
})) {
|
|
4713
4748
|
const i = this.googlePay.render();
|
|
4714
4749
|
t == null || t.appendChild(i);
|
|
4715
4750
|
const s = () => {
|
|
4716
|
-
this.attempted.has(
|
|
4751
|
+
this.attempted.has(G.GOOGLE_PAY) || (this.attempted.add(G.GOOGLE_PAY), this.events.onPaymentAttempt.emit(G.GOOGLE_PAY));
|
|
4717
4752
|
};
|
|
4718
4753
|
i.addEventListener("pointerdown", s, { capture: !0 }), i.addEventListener("click", s, { capture: !0 }), i.addEventListener(
|
|
4719
4754
|
"keydown",
|
|
@@ -4771,11 +4806,13 @@ class vl {
|
|
|
4771
4806
|
const a = this.paypal.render();
|
|
4772
4807
|
if (t == null || t.appendChild(a), yield this.paypal.init({
|
|
4773
4808
|
onError: (s) => {
|
|
4774
|
-
this.events.error.emit(s),
|
|
4809
|
+
this.events.error.emit(s), this.attempted.delete(G.PAYPAL);
|
|
4810
|
+
},
|
|
4811
|
+
onCancel: () => {
|
|
4812
|
+
this.events.cancel.emit(), this.attempted.delete(G.PAYPAL);
|
|
4775
4813
|
},
|
|
4776
|
-
onCancel: () => this.events.cancel.emit(),
|
|
4777
4814
|
onSuccess: (s) => {
|
|
4778
|
-
this.events.success.emit({ paypalId: s, type: "paypal" });
|
|
4815
|
+
this.events.success.emit({ paypalId: s, type: "paypal" }), this.attempted.delete(G.PAYPAL);
|
|
4779
4816
|
}
|
|
4780
4817
|
})) {
|
|
4781
4818
|
const s = performance.now();
|
|
@@ -4890,7 +4927,7 @@ class vl {
|
|
|
4890
4927
|
});
|
|
4891
4928
|
}
|
|
4892
4929
|
// wait for element visible
|
|
4893
|
-
waitForElementVisible(t, e =
|
|
4930
|
+
waitForElementVisible(t, e = 150) {
|
|
4894
4931
|
return !t || !(t instanceof HTMLElement) ? Promise.resolve() : new Promise((r) => {
|
|
4895
4932
|
const a = performance.now(), i = () => {
|
|
4896
4933
|
const s = t.getBoundingClientRect();
|
|
@@ -4903,44 +4940,51 @@ class vl {
|
|
|
4903
4940
|
// init payment methods
|
|
4904
4941
|
initPaymentMethods() {
|
|
4905
4942
|
return W(this, null, function* () {
|
|
4906
|
-
const t = this.config.state.transaction.getState(), e = ll(Jc, (t == null ? void 0 : t.checkout_config) || [], (
|
|
4907
|
-
let a = e.filter(({ is_active:
|
|
4908
|
-
(r == null ? void 0 : r.variant) === "default" && (a = a.filter(({ type:
|
|
4909
|
-
const i = a.sort((
|
|
4910
|
-
for (const { type:
|
|
4911
|
-
const
|
|
4912
|
-
this.buttons.appendChild(
|
|
4913
|
-
}
|
|
4914
|
-
const o = i.map(({ type:
|
|
4915
|
-
const
|
|
4916
|
-
switch (
|
|
4917
|
-
case
|
|
4918
|
-
return this.initApple(
|
|
4919
|
-
case
|
|
4920
|
-
return this.initGoogle(
|
|
4921
|
-
case
|
|
4922
|
-
return this.initPayPal(
|
|
4923
|
-
case
|
|
4924
|
-
return this.initBraintreeVenmo(
|
|
4925
|
-
case
|
|
4926
|
-
return this.initCard(
|
|
4943
|
+
const t = this.config.state.transaction.getState(), e = ll(Jc, (t == null ? void 0 : t.checkout_config) || [], (h, p) => h.type === p.type), r = this.config.state.checkout.getState();
|
|
4944
|
+
let a = e.filter(({ is_active: h }) => h);
|
|
4945
|
+
(r == null ? void 0 : r.variant) === "default" && (a = a.filter(({ type: h }) => h !== G.CARD)), this.initializeButtonInstances(a), this.buttons.innerHTML = "";
|
|
4946
|
+
const i = a.sort((h, p) => h.order - p.order), s = /* @__PURE__ */ new Map();
|
|
4947
|
+
for (const { type: h } of i) {
|
|
4948
|
+
const p = document.createElement("div");
|
|
4949
|
+
this.buttons.appendChild(p), s.set(h, p);
|
|
4950
|
+
}
|
|
4951
|
+
const o = performance.now(), c = i.map(({ type: h }) => {
|
|
4952
|
+
const p = s.get(h);
|
|
4953
|
+
switch (h) {
|
|
4954
|
+
case G.APPLE_PAY:
|
|
4955
|
+
return this.initApple(p);
|
|
4956
|
+
case G.GOOGLE_PAY:
|
|
4957
|
+
return this.initGoogle(p);
|
|
4958
|
+
case G.PAYPAL:
|
|
4959
|
+
return this.initPayPal(p);
|
|
4960
|
+
case G.VENMO:
|
|
4961
|
+
return this.initBraintreeVenmo(p);
|
|
4962
|
+
case G.CARD:
|
|
4963
|
+
return this.initCard(p);
|
|
4927
4964
|
default:
|
|
4928
4965
|
throw new Error("Unknown button type");
|
|
4929
4966
|
}
|
|
4930
4967
|
});
|
|
4931
|
-
yield Promise.all(
|
|
4932
|
-
const
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4968
|
+
yield Promise.all(c);
|
|
4969
|
+
const l = performance.now(), d = l - o;
|
|
4970
|
+
this.performanceMetrics.set("__parallel_total__", {
|
|
4971
|
+
start: o,
|
|
4972
|
+
end: l,
|
|
4973
|
+
duration: d,
|
|
4974
|
+
status: "Parallel execution"
|
|
4975
|
+
});
|
|
4976
|
+
const u = [];
|
|
4977
|
+
for (const h of s.values()) {
|
|
4978
|
+
const p = h.firstElementChild;
|
|
4979
|
+
p && u.push(this.waitForElementVisible(p));
|
|
4936
4980
|
}
|
|
4937
|
-
yield Promise.all(
|
|
4981
|
+
yield Promise.all(u), this.handleReady();
|
|
4938
4982
|
});
|
|
4939
4983
|
}
|
|
4940
4984
|
// initialize button instances only for active payment methods
|
|
4941
4985
|
initializeButtonInstances(t) {
|
|
4942
4986
|
const e = t.map(({ type: r }) => r);
|
|
4943
|
-
e.includes(
|
|
4987
|
+
e.includes(G.APPLE_PAY) && !this.applePay && (this.applePay = new Zc(this.config)), e.includes(G.GOOGLE_PAY) && !this.googlePay && (this.googlePay = new nl(this.config)), e.includes(G.PAYPAL) && !this.paypal && (this.paypal = new al(this.config), this.paypal.addEventListener("onPaymentAttempt", (r) => this.events.onPaymentAttempt.emit(r))), e.includes(G.VENMO) && !this.braintree && (this.braintree = new ml(this.config), this.braintree.addEventListener("onPaymentAttempt", (r) => this.events.onPaymentAttempt.emit(r))), e.includes(G.CARD) && !this.card && (this.card = new cl(this.config), this.card.addEventListener(() => {
|
|
4944
4988
|
this.events.open.emit();
|
|
4945
4989
|
}));
|
|
4946
4990
|
}
|
|
@@ -5033,9 +5077,9 @@ const Ol = "_cardForm_ydw03_1", Nl = "_hidden_ydw03_5", Ll = "_topOffset_ydw03_9
|
|
|
5033
5077
|
cardForm: Ol,
|
|
5034
5078
|
hidden: Nl,
|
|
5035
5079
|
topOffset: Ll
|
|
5036
|
-
},
|
|
5037
|
-
wrapper:
|
|
5038
|
-
inputContainer:
|
|
5080
|
+
}, Pl = "_wrapper_1gvzd_1", xl = "_inputContainer_1gvzd_5", Rl = "_errorInput_1gvzd_23", kl = "_disabled_1gvzd_23", Sl = "_input_1gvzd_5", Ml = "_label_1gvzd_40", Dl = "_labelError_1gvzd_44", Vl = "_disabledInput_1gvzd_52", Fl = "_hidden_1gvzd_59", se = {
|
|
5081
|
+
wrapper: Pl,
|
|
5082
|
+
inputContainer: xl,
|
|
5039
5083
|
errorInput: Rl,
|
|
5040
5084
|
disabled: kl,
|
|
5041
5085
|
input: Sl,
|
|
@@ -5097,11 +5141,16 @@ class Ul {
|
|
|
5097
5141
|
validator(t) {
|
|
5098
5142
|
return t ? null : le.Empty;
|
|
5099
5143
|
}
|
|
5144
|
+
filterInput(t) {
|
|
5145
|
+
return t.replace(/[^a-zA-ZÀ-ÿ\s'-]/g, "");
|
|
5146
|
+
}
|
|
5100
5147
|
handleChange(t) {
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5148
|
+
if (this.isDisabled) return;
|
|
5149
|
+
const e = this.filterInput(t);
|
|
5150
|
+
e !== t && (this.input.value = e), this.isRequired = !1, this.isChanged || (this.isChanged = !0), this.events.change.emit({
|
|
5151
|
+
value: e,
|
|
5152
|
+
isValid: this.validator(e) === null
|
|
5153
|
+
}), this.render();
|
|
5105
5154
|
}
|
|
5106
5155
|
toggleLabelError(t) {
|
|
5107
5156
|
return W(this, null, function* () {
|
|
@@ -5133,15 +5182,15 @@ class Ul {
|
|
|
5133
5182
|
return this.toggleLabelError(r), this.isDisabled ? (this.inputContainer.classList.add(se.disabled), this.input.classList.add(se.disabledInput)) : (this.inputContainer.classList.remove(se.disabled), this.input.classList.remove(se.disabledInput)), this.element;
|
|
5134
5183
|
}
|
|
5135
5184
|
}
|
|
5136
|
-
const Bl = "_wrapper_1dxfo_1", zl = "_inputContainer_1dxfo_5", jl = "_errorInput_1dxfo_23", Hl = "_disabled_1dxfo_23", Kl = "_input_1dxfo_5", Wl = "_endContent_1dxfo_32",
|
|
5185
|
+
const Bl = "_wrapper_1dxfo_1", zl = "_inputContainer_1dxfo_5", jl = "_errorInput_1dxfo_23", Hl = "_disabled_1dxfo_23", Kl = "_input_1dxfo_5", Wl = "_endContent_1dxfo_32", Yl = "_error_1dxfo_23", Gl = "_label_1dxfo_44", $l = "_labelError_1dxfo_48", ql = "_disabledInput_1dxfo_56", Ql = "_hidden_1dxfo_63", re = {
|
|
5137
5186
|
wrapper: Bl,
|
|
5138
5187
|
inputContainer: zl,
|
|
5139
5188
|
errorInput: jl,
|
|
5140
5189
|
disabled: Hl,
|
|
5141
5190
|
input: Kl,
|
|
5142
5191
|
endContent: Wl,
|
|
5143
|
-
error:
|
|
5144
|
-
label:
|
|
5192
|
+
error: Yl,
|
|
5193
|
+
label: Gl,
|
|
5145
5194
|
labelError: $l,
|
|
5146
5195
|
disabledInput: ql,
|
|
5147
5196
|
hidden: Ql
|
|
@@ -5438,7 +5487,7 @@ ${m}::-ms-input-placeholder{${f}}
|
|
|
5438
5487
|
handleChange(t) {
|
|
5439
5488
|
if (this.isDisabled) return;
|
|
5440
5489
|
this.isRequired = !1, this.errorMessage = "", this.isChanged || (this.isChanged = !0);
|
|
5441
|
-
const e = lr(t).map((i) => i.type), r =
|
|
5490
|
+
const e = lr(t).map((i) => i.type), r = xi(t), a = Mc(t, (r == null ? void 0 : r.type) || "");
|
|
5442
5491
|
this.supportedCardTypes = e.length ? e : this.initialCardTypes, a.replace(/\D/g, "").length === ((r == null ? void 0 : r.maxLength) || 16) && this.validate(a), this.input.value = a, this.events.change.emit({
|
|
5443
5492
|
card: a,
|
|
5444
5493
|
cardType: r == null ? void 0 : r.type,
|
|
@@ -5588,16 +5637,16 @@ class vd {
|
|
|
5588
5637
|
expiryChange: new oe(),
|
|
5589
5638
|
cvcChange: new oe()
|
|
5590
5639
|
});
|
|
5591
|
-
var s, o, c, l, d, u, h, p, f, m, v, y, w, O, L, I,
|
|
5640
|
+
var s, o, c, l, d, u, h, p, f, m, v, y, w, O, L, I, x;
|
|
5592
5641
|
this.translate = t;
|
|
5593
5642
|
const r = t.messages();
|
|
5594
5643
|
this.element = document.createElement("div"), this.element.classList.add(Q.securityContent), this.expiryInputContainer.classList.add(Q.inputContainer), (s = e == null ? void 0 : e.container) != null && s.className && this.expiryInputContainer.classList.add(e.container.className), (o = e == null ? void 0 : e.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, e.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("autocomplete", "cc-exp"), this.expiryInput.setAttribute("placeholder", r.card.expiry.placeholder), this.expiryInput.setAttribute("inputmode", "numeric"), this.expiryInput.setAttribute("pattern", "[0-9]*"), this.expiryInput.setAttribute("enterkeyhint", "next"), this.expiryInput.classList.add(Q.input), (c = e == null ? void 0 : e.field) != null && c.className && this.expiryInput.classList.add(e.field.className), (l = e == null ? void 0 : e.field) != null && l.styles && Object.assign(this.expiryInput.style, e.field.styles), this.expiryEndContent.classList.add(Q.endContent), this.expiryEndContent.appendChild(this.expiryWarning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add(Q.label), (d = e == null ? void 0 : e.label) != null && d.className && this.expiryLabel.classList.add(e.label.className), (u = e == null ? void 0 : e.label) != null && u.styles && Object.assign(this.expiryLabel.style, e.label.styles), this.expiryLabelText.contentEditable = "false", this.expiryLabelText.textContent = r.card.expiry.label, this.expiryLabelError.textContent = r.card.required, this.expiryLabelError.classList.add(Q.labelError, Q.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add(Q.error, Q.hidden), (h = e == null ? void 0 : e.error) != null && h.className && this.expiryError.classList.add(e.error.className), (p = e == null ? void 0 : e.error) != null && p.styles && Object.assign(this.expiryError.style, e.error.styles);
|
|
5595
5644
|
const a = document.createElement("div");
|
|
5596
5645
|
if (a.appendChild(this.expiryError), this.cvcInputContainer.classList.add(Q.inputContainer), (f = e == null ? void 0 : e.container) != null && f.className && this.cvcInputContainer.classList.add(e.container.className), (m = e == null ? void 0 : e.container) != null && m.styles && Object.assign(this.cvcInputContainer.style, e.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("autocomplete", "cc-csc"), this.cvcInput.setAttribute("placeholder", r.card.cvc.placeholder), this.cvcInput.setAttribute("inputmode", "numeric"), this.cvcInput.setAttribute("pattern", "[0-9]*"), this.cvcInput.setAttribute("enterkeyhint", "done"), this.cvcInput.classList.add(Q.input), (v = e == null ? void 0 : e.field) != null && v.className && this.cvcInput.classList.add(e.field.className), (y = e == null ? void 0 : e.field) != null && y.styles && Object.assign(this.cvcInput.style, e.field.styles), (w = e == null ? void 0 : e.placeholder) != null && w.styles && Object.keys(e.placeholder.styles).length) {
|
|
5597
|
-
const N = (U) => U.replace(/[A-Z]/g, (
|
|
5646
|
+
const N = (U) => U.replace(/[A-Z]/g, (Y) => "-" + Y.toLowerCase()), S = Object.entries(e.placeholder.styles).map(([U, Y]) => `${N(U)}:${Y};`).join("");
|
|
5598
5647
|
this.placeholderStyle.textContent = `#${this.expiryId}::placeholder{${S}}#${this.cvcId}::placeholder{${S}}`, this.element.appendChild(this.placeholderStyle);
|
|
5599
5648
|
}
|
|
5600
|
-
this.cvcEndContent.classList.add(Q.endContent), this.cvcEndContent.appendChild(this.cardCvc.render()), this.cvcInputContainer.append(this.cvcInput, this.cvcEndContent), this.cvcLabel.setAttribute("for", this.cvcId), this.cvcLabel.classList.add(Q.label), (O = e == null ? void 0 : e.label) != null && O.className && this.cvcLabel.classList.add(e.label.className), (L = e == null ? void 0 : e.label) != null && L.styles && Object.assign(this.cvcLabel.style, e.label.styles), this.cvcLabelText.textContent = r.card.cvc.label, this.cvcLabelError.textContent = r.card.required, this.cvcLabelError.classList.add(Q.labelError, Q.hidden), (I = e == null ? void 0 : e.error) != null && I.className && this.cvcLabel.classList.add(e.error.className), (
|
|
5649
|
+
this.cvcEndContent.classList.add(Q.endContent), this.cvcEndContent.appendChild(this.cardCvc.render()), this.cvcInputContainer.append(this.cvcInput, this.cvcEndContent), this.cvcLabel.setAttribute("for", this.cvcId), this.cvcLabel.classList.add(Q.label), (O = e == null ? void 0 : e.label) != null && O.className && this.cvcLabel.classList.add(e.label.className), (L = e == null ? void 0 : e.label) != null && L.styles && Object.assign(this.cvcLabel.style, e.label.styles), this.cvcLabelText.textContent = r.card.cvc.label, this.cvcLabelError.textContent = r.card.required, this.cvcLabelError.classList.add(Q.labelError, Q.hidden), (I = e == null ? void 0 : e.error) != null && I.className && this.cvcLabel.classList.add(e.error.className), (x = e == null ? void 0 : e.error) != null && x.styles && Object.assign(this.cvcLabelError.style, e.error.styles), this.cvcLabel.append(this.cvcLabelText, this.cvcLabelError), this.cvcError.classList.add(Q.error, Q.hidden);
|
|
5601
5650
|
const i = document.createElement("div");
|
|
5602
5651
|
i.appendChild(this.cvcError), this.element.append(
|
|
5603
5652
|
this.expiryLabel,
|
|
@@ -5611,9 +5660,9 @@ class vd {
|
|
|
5611
5660
|
const U = this.expiryInput.value.replace(/\D/g, "");
|
|
5612
5661
|
this.handleExpiryChange(U);
|
|
5613
5662
|
}), this.expiryInput.addEventListener("paste", (N) => {
|
|
5614
|
-
var
|
|
5663
|
+
var Y;
|
|
5615
5664
|
N.preventDefault();
|
|
5616
|
-
const U = (((
|
|
5665
|
+
const U = (((Y = N.clipboardData) == null ? void 0 : Y.getData("text")) || "").replace(/\D/g, "");
|
|
5617
5666
|
this.handleExpiryChange(U);
|
|
5618
5667
|
}), this.expiryInput.addEventListener("keydown", (N) => {
|
|
5619
5668
|
this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(N.key) || N.ctrlKey || N.metaKey || /^\d$/.test(N.key) || N.preventDefault();
|
|
@@ -5622,9 +5671,9 @@ class vd {
|
|
|
5622
5671
|
const U = this.cvcInput.value.replace(/\D/g, "");
|
|
5623
5672
|
this.handleCvcChange(U);
|
|
5624
5673
|
}), this.cvcInput.addEventListener("paste", (N) => {
|
|
5625
|
-
var
|
|
5674
|
+
var Y;
|
|
5626
5675
|
N.preventDefault();
|
|
5627
|
-
const U = (((
|
|
5676
|
+
const U = (((Y = N.clipboardData) == null ? void 0 : Y.getData("text")) || "").replace(/\D/g, "");
|
|
5628
5677
|
this.handleCvcChange(U);
|
|
5629
5678
|
}), this.cvcInput.addEventListener("keydown", (N) => {
|
|
5630
5679
|
this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(N.key) || N.ctrlKey || N.metaKey || /^\d$/.test(N.key) || N.preventDefault();
|
|
@@ -5785,7 +5834,7 @@ class gd {
|
|
|
5785
5834
|
var p;
|
|
5786
5835
|
c.preventDefault();
|
|
5787
5836
|
const { cvc: l, expiry: d } = this.cardSecurity.value(), { value: u, cardType: h } = this.number.value();
|
|
5788
|
-
this.touchSubmit(), this.validate() && ((p = this.onPaymentAttempt) == null || p.call(this, { paymentMethod:
|
|
5837
|
+
this.touchSubmit(), this.validate() && ((p = this.onPaymentAttempt) == null || p.call(this, { paymentMethod: G.CARD }), this.events.submit.emit({
|
|
5789
5838
|
number: u,
|
|
5790
5839
|
expiry: d,
|
|
5791
5840
|
cvc: l,
|
|
@@ -5920,6 +5969,7 @@ class wd {
|
|
|
5920
5969
|
C(this, "isLoading", !1);
|
|
5921
5970
|
C(this, "isFormOpen", !1);
|
|
5922
5971
|
C(this, "closedHeight", 0);
|
|
5972
|
+
C(this, "hasLoadedOnce", !1);
|
|
5923
5973
|
C(this, "checkout");
|
|
5924
5974
|
C(this, "container", document.createElement("div"));
|
|
5925
5975
|
C(this, "loader", new Ec());
|
|
@@ -5947,16 +5997,17 @@ class wd {
|
|
|
5947
5997
|
const e = this.config.state.checkout.getState();
|
|
5948
5998
|
(r = e.onCheckoutAttempt) == null || r.call(e, { paymentMethod: t }), this.hideError();
|
|
5949
5999
|
}), this.buttons.addEventListener("ready", () => W(this, null, function* () {
|
|
5950
|
-
var
|
|
6000
|
+
var r;
|
|
5951
6001
|
this.loader.setClassName(he.hidden);
|
|
5952
|
-
const { variant: t } = this.config.state.checkout.getState();
|
|
6002
|
+
const { variant: t, onCheckoutLoaded: e } = this.config.state.checkout.getState();
|
|
5953
6003
|
if (this.form.setDefaultVariant(t === "default"), this.buttons.showButton(), t === "default") {
|
|
5954
|
-
const
|
|
5955
|
-
|
|
5956
|
-
{ minHeight: [`${
|
|
6004
|
+
const a = this.checkout.getBoundingClientRect().height;
|
|
6005
|
+
a < 292 && (this.checkout.style.height = `${a}px`), this.form.element.classList.remove(he.hidden), a < 292 && (yield (r = this.checkout.animate(
|
|
6006
|
+
{ minHeight: [`${a}px`, "292px"] },
|
|
5957
6007
|
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
5958
|
-
).finished) != null ?
|
|
6008
|
+
).finished) != null ? r : Promise.resolve(), this.checkout.style.height = ""), this.isFormOpen = !0;
|
|
5959
6009
|
}
|
|
6010
|
+
!this.hasLoadedOnce && e && (this.hasLoadedOnce = !0, e({ success: !0 }));
|
|
5960
6011
|
})), this.buttons.addEventListener("open", () => W(this, null, function* () {
|
|
5961
6012
|
var a;
|
|
5962
6013
|
if (this.isLoading) return;
|
|
@@ -5973,15 +6024,17 @@ class wd {
|
|
|
5973
6024
|
r != null ? r : Promise.resolve()
|
|
5974
6025
|
]), e < 292 && (this.checkout.style.height = ""), this.isFormOpen = !0;
|
|
5975
6026
|
})), this.buttons.addEventListener("error", (t) => {
|
|
5976
|
-
const { onCheckoutFail: e } = this.config.state.checkout.getState(),
|
|
5977
|
-
this.showError(
|
|
6027
|
+
const { onCheckoutFail: e, onCheckoutLoaded: r } = this.config.state.checkout.getState(), a = this.config.state.translate.messages(), i = _t(t, a);
|
|
6028
|
+
this.showError(i);
|
|
6029
|
+
const s = {
|
|
5978
6030
|
status: "failed",
|
|
5979
6031
|
status_reason: {
|
|
5980
6032
|
advice_code: "try_again_later",
|
|
5981
6033
|
decline_code: Ft.GENERIC_DECLINE,
|
|
5982
6034
|
message: t.message || t
|
|
5983
6035
|
}
|
|
5984
|
-
}
|
|
6036
|
+
};
|
|
6037
|
+
!this.hasLoadedOnce && r && (this.hasLoadedOnce = !0, r({ success: !1, error: s })), e == null || e(s);
|
|
5985
6038
|
}), this.buttons.addEventListener("success", (t) => {
|
|
5986
6039
|
const { clientToken: e } = this.config.state.checkout.getState();
|
|
5987
6040
|
switch (t.type) {
|
|
@@ -6005,7 +6058,7 @@ class wd {
|
|
|
6005
6058
|
let e = null;
|
|
6006
6059
|
this.closedHeight > 0 && t > this.closedHeight && (this.checkout.style.height = `${t}px`, e = (i = this.checkout.animate(
|
|
6007
6060
|
{ minHeight: [`${t}px`, `${this.closedHeight}px`] },
|
|
6008
|
-
{ duration:
|
|
6061
|
+
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
6009
6062
|
).finished) != null ? i : Promise.resolve()), yield ce(this.form.element, ke.close, ke.transition), this.form.element.classList.add(he.hidden);
|
|
6010
6063
|
const { variant: a } = this.config.state.checkout.getState();
|
|
6011
6064
|
if (a !== "default") {
|
|
@@ -6015,7 +6068,7 @@ class wd {
|
|
|
6015
6068
|
}
|
|
6016
6069
|
this.closedHeight > 0 && (e = (s = this.checkout.animate(
|
|
6017
6070
|
{ minHeight: [`${t}px`, `${this.closedHeight}px`] },
|
|
6018
|
-
{ duration:
|
|
6071
|
+
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
6019
6072
|
).finished) != null ? s : Promise.resolve(), this.checkout.style.height = "auto"), this.isFormOpen = !1;
|
|
6020
6073
|
})), this.form.addEventListener("submit", (t) => W(this, null, function* () {
|
|
6021
6074
|
if (this.isLoading || (this.form.touchSubmit(), this.hideError(), !this.form.validate())) return;
|
|
@@ -6030,7 +6083,7 @@ class wd {
|
|
|
6030
6083
|
cardBrand: t.cardBrand || "",
|
|
6031
6084
|
number: s,
|
|
6032
6085
|
cvc: o,
|
|
6033
|
-
type:
|
|
6086
|
+
type: G.CARD,
|
|
6034
6087
|
metadata: {
|
|
6035
6088
|
name: t.name,
|
|
6036
6089
|
userAgent: navigator == null ? void 0 : navigator.userAgent
|
|
@@ -6213,7 +6266,7 @@ class Ld extends At {
|
|
|
6213
6266
|
super(H(H({}, Nd), t));
|
|
6214
6267
|
}
|
|
6215
6268
|
}
|
|
6216
|
-
class
|
|
6269
|
+
class Pd extends At {
|
|
6217
6270
|
constructor(e) {
|
|
6218
6271
|
super(e || null);
|
|
6219
6272
|
C(this, "clientToken", "");
|
|
@@ -6234,7 +6287,7 @@ class xd extends At {
|
|
|
6234
6287
|
});
|
|
6235
6288
|
}
|
|
6236
6289
|
}
|
|
6237
|
-
const
|
|
6290
|
+
const xd = {
|
|
6238
6291
|
card: {
|
|
6239
6292
|
required: "يتطلب",
|
|
6240
6293
|
number: {
|
|
@@ -6922,7 +6975,7 @@ const Pd = {
|
|
|
6922
6975
|
error: "Il tuo metodo di pagamento è stato rifiutato. Ciò potrebbe essere dovuto a fondi insufficienti, dettagli di pagamento scaduti o restrizioni di sicurezza. Si prega di controllare i dettagli di pagamento o provare un metodo di pagamento diverso.",
|
|
6923
6976
|
invalidSession: "La tua sessione di pagamento è scaduta. Si prega di aggiornare la pagina per continuare."
|
|
6924
6977
|
}
|
|
6925
|
-
},
|
|
6978
|
+
}, Yd = {
|
|
6926
6979
|
card: {
|
|
6927
6980
|
required: "必須",
|
|
6928
6981
|
number: {
|
|
@@ -6965,7 +7018,7 @@ const Pd = {
|
|
|
6965
7018
|
error: "お支払い方法が拒否されました。これは、残高不足、有効期限切れのお支払い情報、またはセキュリティ制限が原因である可能性があります。お支払い情報を確認するか、別のお支払い方法をお試しください。",
|
|
6966
7019
|
invalidSession: "お支払いセッションの有効期限が切れました。ページを更新して続行してください。"
|
|
6967
7020
|
}
|
|
6968
|
-
},
|
|
7021
|
+
}, Gd = {
|
|
6969
7022
|
card: {
|
|
6970
7023
|
required: "필수",
|
|
6971
7024
|
number: {
|
|
@@ -7783,7 +7836,7 @@ const Pd = {
|
|
|
7783
7836
|
invalidSession: "您的付款会话已过期。请刷新页面以继续。"
|
|
7784
7837
|
}
|
|
7785
7838
|
}, tn = {
|
|
7786
|
-
ar:
|
|
7839
|
+
ar: xd,
|
|
7787
7840
|
en: Ri,
|
|
7788
7841
|
bg: Rd,
|
|
7789
7842
|
cs: kd,
|
|
@@ -7799,8 +7852,8 @@ const Pd = {
|
|
|
7799
7852
|
hu: Hd,
|
|
7800
7853
|
id: Kd,
|
|
7801
7854
|
it: Wd,
|
|
7802
|
-
ja:
|
|
7803
|
-
ko:
|
|
7855
|
+
ja: Yd,
|
|
7856
|
+
ko: Gd,
|
|
7804
7857
|
lt: $d,
|
|
7805
7858
|
lv: qd,
|
|
7806
7859
|
ms: Qd,
|
|
@@ -8180,7 +8233,7 @@ function wu() {
|
|
|
8180
8233
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
8181
8234
|
PERFORMANCE OF THIS SOFTWARE.
|
|
8182
8235
|
***************************************************************************** */
|
|
8183
|
-
function s(b, T, E,
|
|
8236
|
+
function s(b, T, E, P) {
|
|
8184
8237
|
function D(A) {
|
|
8185
8238
|
return A instanceof E ? A : new E(function(B) {
|
|
8186
8239
|
B(A);
|
|
@@ -8189,14 +8242,14 @@ function wu() {
|
|
|
8189
8242
|
return new (E || (E = Promise))(function(A, B) {
|
|
8190
8243
|
function X(te) {
|
|
8191
8244
|
try {
|
|
8192
|
-
k(
|
|
8245
|
+
k(P.next(te));
|
|
8193
8246
|
} catch (ye) {
|
|
8194
8247
|
B(ye);
|
|
8195
8248
|
}
|
|
8196
8249
|
}
|
|
8197
8250
|
function ie(te) {
|
|
8198
8251
|
try {
|
|
8199
|
-
k(
|
|
8252
|
+
k(P.throw(te));
|
|
8200
8253
|
} catch (ye) {
|
|
8201
8254
|
B(ye);
|
|
8202
8255
|
}
|
|
@@ -8204,14 +8257,14 @@ function wu() {
|
|
|
8204
8257
|
function k(te) {
|
|
8205
8258
|
te.done ? A(te.value) : D(te.value).then(X, ie);
|
|
8206
8259
|
}
|
|
8207
|
-
k((
|
|
8260
|
+
k((P = P.apply(b, [])).next());
|
|
8208
8261
|
});
|
|
8209
8262
|
}
|
|
8210
8263
|
function o(b, T) {
|
|
8211
8264
|
var E = { label: 0, sent: function() {
|
|
8212
8265
|
if (A[0] & 1) throw A[1];
|
|
8213
8266
|
return A[1];
|
|
8214
|
-
}, trys: [], ops: [] },
|
|
8267
|
+
}, trys: [], ops: [] }, P, D, A, B;
|
|
8215
8268
|
return B = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (B[Symbol.iterator] = function() {
|
|
8216
8269
|
return this;
|
|
8217
8270
|
}), B;
|
|
@@ -8221,9 +8274,9 @@ function wu() {
|
|
|
8221
8274
|
};
|
|
8222
8275
|
}
|
|
8223
8276
|
function ie(k) {
|
|
8224
|
-
if (
|
|
8277
|
+
if (P) throw new TypeError("Generator is already executing.");
|
|
8225
8278
|
for (; E; ) try {
|
|
8226
|
-
if (
|
|
8279
|
+
if (P = 1, D && (A = k[0] & 2 ? D.return : k[0] ? D.throw || ((A = D.return) && A.call(D), 0) : D.next) && !(A = A.call(D, k[1])).done) return A;
|
|
8227
8280
|
switch (D = 0, A && (k = [k[0] & 2, A.value]), k[0]) {
|
|
8228
8281
|
case 0:
|
|
8229
8282
|
case 1:
|
|
@@ -8261,7 +8314,7 @@ function wu() {
|
|
|
8261
8314
|
} catch (te) {
|
|
8262
8315
|
k = [6, te], D = 0;
|
|
8263
8316
|
} finally {
|
|
8264
|
-
|
|
8317
|
+
P = A = 0;
|
|
8265
8318
|
}
|
|
8266
8319
|
if (k[0] & 5) throw k[1];
|
|
8267
8320
|
return { value: k[0] ? k[1] : void 0, done: !0 };
|
|
@@ -8272,17 +8325,17 @@ function wu() {
|
|
|
8272
8325
|
var T, E = JSON.stringify(b);
|
|
8273
8326
|
if (!b.forceScriptReload && (T = l[E], T))
|
|
8274
8327
|
return T;
|
|
8275
|
-
var
|
|
8276
|
-
return
|
|
8277
|
-
|
|
8328
|
+
var P = document.createElement("script"), D = b.dataAttributes || {}, A = b.container || document.head;
|
|
8329
|
+
return P.src = b.src, P.id = b.id || "", P.async = !0, b.type && P.setAttribute("type", "".concat(b.type)), b.crossorigin && P.setAttribute("crossorigin", "".concat(b.crossorigin)), Object.keys(D).forEach(function(B) {
|
|
8330
|
+
P.setAttribute("data-".concat(B), "".concat(D[B]));
|
|
8278
8331
|
}), T = new Promise(function(B, X) {
|
|
8279
|
-
|
|
8280
|
-
B(
|
|
8281
|
-
}),
|
|
8332
|
+
P.addEventListener("load", function() {
|
|
8333
|
+
B(P);
|
|
8334
|
+
}), P.addEventListener("error", function() {
|
|
8282
8335
|
X(new Error("".concat(b.src, " failed to load.")));
|
|
8283
|
-
}),
|
|
8336
|
+
}), P.addEventListener("abort", function() {
|
|
8284
8337
|
X(new Error("".concat(b.src, " has aborted.")));
|
|
8285
|
-
}), A.appendChild(
|
|
8338
|
+
}), A.appendChild(P);
|
|
8286
8339
|
}), l[E] = T, T;
|
|
8287
8340
|
}
|
|
8288
8341
|
d.clearCache = function() {
|
|
@@ -8293,8 +8346,8 @@ function wu() {
|
|
|
8293
8346
|
if (E)
|
|
8294
8347
|
return Promise.resolve(E);
|
|
8295
8348
|
E = document.createElement("link");
|
|
8296
|
-
var
|
|
8297
|
-
return E.setAttribute("rel", "stylesheet"), E.setAttribute("type", "text/css"), E.setAttribute("href", T.href), E.setAttribute("id", T.id),
|
|
8349
|
+
var P = T.container || document.head;
|
|
8350
|
+
return E.setAttribute("rel", "stylesheet"), E.setAttribute("type", "text/css"), E.setAttribute("href", T.href), E.setAttribute("id", T.id), P.firstChild ? P.insertBefore(E, P.firstChild) : P.appendChild(E), Promise.resolve(E);
|
|
8298
8351
|
};
|
|
8299
8352
|
Object.defineProperty(c, "__esModule", { value: !0 }), c.loadStylesheet = f = c.loadScript = void 0;
|
|
8300
8353
|
var p = u, f = c.loadScript = p, m = h;
|
|
@@ -8307,7 +8360,7 @@ function wu() {
|
|
|
8307
8360
|
AXO_ASSET_PATH: O,
|
|
8308
8361
|
LOCALE_PATH: L,
|
|
8309
8362
|
CDNX_PROD: v
|
|
8310
|
-
},
|
|
8363
|
+
}, x = {
|
|
8311
8364
|
BT: "BT",
|
|
8312
8365
|
PPCP: "PPCP"
|
|
8313
8366
|
};
|
|
@@ -8318,26 +8371,26 @@ function wu() {
|
|
|
8318
8371
|
return N() && typeof window.requirejs == "function" && typeof window.requirejs.config == "function";
|
|
8319
8372
|
}
|
|
8320
8373
|
function U(b, T, E) {
|
|
8321
|
-
var
|
|
8374
|
+
var P, D;
|
|
8322
8375
|
return E === void 0 && (E = !0), s(this, void 0, void 0, function() {
|
|
8323
8376
|
var A, B;
|
|
8324
8377
|
return o(this, function(X) {
|
|
8325
|
-
if (A =
|
|
8326
|
-
if (T && ((
|
|
8378
|
+
if (A = $(), A && A[b.module]) {
|
|
8379
|
+
if (T && ((P = A[b.module]) === null || P === void 0 ? void 0 : P.VERSION) !== T)
|
|
8327
8380
|
throw B = (D = A[b.module]) === null || D === void 0 ? void 0 : D.VERSION, new Error("".concat(b.module, " already loaded with version ").concat(B, " cannot load version ").concat(T));
|
|
8328
8381
|
return [2, !0];
|
|
8329
8382
|
}
|
|
8330
8383
|
if (!T)
|
|
8331
8384
|
throw new Error("Attempted to load ".concat(b.module, " without specifying version"));
|
|
8332
|
-
return [2,
|
|
8385
|
+
return [2, Y(b, T, E)];
|
|
8333
8386
|
});
|
|
8334
8387
|
});
|
|
8335
8388
|
}
|
|
8336
|
-
function
|
|
8389
|
+
function Y(b, T, E) {
|
|
8337
8390
|
if (E === void 0 && (E = !0), N()) {
|
|
8338
|
-
var
|
|
8391
|
+
var P = E ? b.amdModule.minified : b.amdModule.unminified;
|
|
8339
8392
|
return new Promise(function(A, B) {
|
|
8340
|
-
window.require([
|
|
8393
|
+
window.require([P], A, B);
|
|
8341
8394
|
});
|
|
8342
8395
|
}
|
|
8343
8396
|
var D = E ? b.script.minified : b.script.unminified;
|
|
@@ -8346,13 +8399,13 @@ function wu() {
|
|
|
8346
8399
|
src: "https://js.braintreegateway.com/web/".concat(T, "/js/").concat(D)
|
|
8347
8400
|
});
|
|
8348
8401
|
}
|
|
8349
|
-
function
|
|
8402
|
+
function $() {
|
|
8350
8403
|
return window == null ? void 0 : window.braintree;
|
|
8351
8404
|
}
|
|
8352
8405
|
var F, z, j = {
|
|
8353
8406
|
Client: "client",
|
|
8354
8407
|
HostedCardFields: "hostedFields"
|
|
8355
|
-
}, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F),
|
|
8408
|
+
}, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F), q = (z = {}, z[j.Client] = {
|
|
8356
8409
|
id: "client",
|
|
8357
8410
|
module: j.Client,
|
|
8358
8411
|
amdModule: {
|
|
@@ -8377,21 +8430,21 @@ function wu() {
|
|
|
8377
8430
|
}, z);
|
|
8378
8431
|
function K(b) {
|
|
8379
8432
|
return s(this, void 0, void 0, function() {
|
|
8380
|
-
var T, E,
|
|
8433
|
+
var T, E, P, D;
|
|
8381
8434
|
return o(this, function(A) {
|
|
8382
8435
|
switch (A.label) {
|
|
8383
8436
|
case 0:
|
|
8384
|
-
return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified,
|
|
8385
|
-
U(
|
|
8386
|
-
_(
|
|
8437
|
+
return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified, P = R(b), D = V(b), b.platform !== x.BT ? [3, 2] : [4, Promise.all([
|
|
8438
|
+
U(q.hostedFields, T, E),
|
|
8439
|
+
_(P, E)
|
|
8387
8440
|
])];
|
|
8388
8441
|
case 1:
|
|
8389
8442
|
return A.sent(), [3, 5];
|
|
8390
8443
|
case 2:
|
|
8391
|
-
return b.platform !==
|
|
8392
|
-
U(
|
|
8393
|
-
U(
|
|
8394
|
-
_(
|
|
8444
|
+
return b.platform !== x.PPCP ? [3, 4] : [4, Promise.all([
|
|
8445
|
+
U(q.client, T, E),
|
|
8446
|
+
U(q.hostedFields, T, E),
|
|
8447
|
+
_(P, E)
|
|
8395
8448
|
])];
|
|
8396
8449
|
case 3:
|
|
8397
8450
|
return A.sent(), [3, 5];
|
|
@@ -8409,9 +8462,9 @@ function wu() {
|
|
|
8409
8462
|
S() && requirejs.config({
|
|
8410
8463
|
paths: (E = {}, E[w] = b, E)
|
|
8411
8464
|
});
|
|
8412
|
-
var
|
|
8465
|
+
var P = "".concat(w, "/").concat(T ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified);
|
|
8413
8466
|
return new Promise(function(D, A) {
|
|
8414
|
-
window.require([
|
|
8467
|
+
window.require([P], D, A);
|
|
8415
8468
|
});
|
|
8416
8469
|
}
|
|
8417
8470
|
return f({
|
|
@@ -8425,9 +8478,9 @@ function wu() {
|
|
|
8425
8478
|
return E ? "https://cdn-".concat(E, ".static.engineering.dev.paypalinc.com/").concat(T) : "".concat(I.CDNX_PROD, "/").concat(T);
|
|
8426
8479
|
}
|
|
8427
8480
|
function R(b) {
|
|
8428
|
-
var T, E = (b == null ? void 0 : b.minified) !== !1 ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified,
|
|
8481
|
+
var T, E = (b == null ? void 0 : b.minified) !== !1 ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified, P = N() ? I.AXO_ASSET_PATH : "".concat(I.AXO_ASSET_PATH, "/").concat(E, ".js");
|
|
8429
8482
|
return g({
|
|
8430
|
-
assetUrl:
|
|
8483
|
+
assetUrl: P,
|
|
8431
8484
|
bundleId: (T = b == null ? void 0 : b.metadata) === null || T === void 0 ? void 0 : T.bundleIdOverride
|
|
8432
8485
|
});
|
|
8433
8486
|
}
|
|
@@ -8441,10 +8494,10 @@ function wu() {
|
|
|
8441
8494
|
i.constants = I, i.loadAxo = K;
|
|
8442
8495
|
});
|
|
8443
8496
|
}, {}], 9: [function(e, r, a) {
|
|
8444
|
-
var i = e("./constants").BRAINTREE_VERSION, s = e("./request/graphql"), o = e("./request"), c = e("../lib/is-verified-domain"), l = e("../lib/braintree-error"), d = e("../lib/convert-to-braintree-error"), u = e("./get-configuration").getConfiguration, h = e("../lib/create-authorization-data"), p = e("../lib/add-metadata"), f = e("@braintree/wrap-promise"), m = e("../lib/once"), v = e("../lib/deferred"), y = e("../lib/assign").assign, w = e("../lib/analytics"), O = e("./errors"), L = e("../lib/constants").VERSION, I = e("../lib/constants").GRAPHQL_URLS,
|
|
8497
|
+
var i = e("./constants").BRAINTREE_VERSION, s = e("./request/graphql"), o = e("./request"), c = e("../lib/is-verified-domain"), l = e("../lib/braintree-error"), d = e("../lib/convert-to-braintree-error"), u = e("./get-configuration").getConfiguration, h = e("../lib/create-authorization-data"), p = e("../lib/add-metadata"), f = e("@braintree/wrap-promise"), m = e("../lib/once"), v = e("../lib/deferred"), y = e("../lib/assign").assign, w = e("../lib/analytics"), O = e("./errors"), L = e("../lib/constants").VERSION, I = e("../lib/constants").GRAPHQL_URLS, x = e("../lib/methods"), N = e("../lib/convert-methods-to-error"), S = e("../lib/assets"), U = e("../lib/constants").FRAUDNET_FNCLS, Y = e("../lib/constants").FRAUDNET_SOURCE, $ = e("../lib/constants").FRAUDNET_URL, F = {};
|
|
8445
8498
|
function z(M) {
|
|
8446
|
-
var
|
|
8447
|
-
if (M = M || {},
|
|
8499
|
+
var q, K;
|
|
8500
|
+
if (M = M || {}, q = JSON.stringify(M), K = M.gatewayConfiguration, !K)
|
|
8448
8501
|
throw new l(O.CLIENT_MISSING_GATEWAY_CONFIGURATION);
|
|
8449
8502
|
if (["assetsUrl", "clientApiUrl", "configUrl"].forEach(function(_) {
|
|
8450
8503
|
if (_ in K && !c(K[_]))
|
|
@@ -8454,7 +8507,7 @@ function wu() {
|
|
|
8454
8507
|
message: _ + " property is on an invalid domain."
|
|
8455
8508
|
});
|
|
8456
8509
|
}), this.getConfiguration = function() {
|
|
8457
|
-
return JSON.parse(
|
|
8510
|
+
return JSON.parse(q);
|
|
8458
8511
|
}, this._request = o, this._configuration = this.getConfiguration(), this._clientApiBaseUrl = K.clientApiUrl + "/v1/", K.graphQL) {
|
|
8459
8512
|
if (!c(K.graphQL.url))
|
|
8460
8513
|
throw new l({
|
|
@@ -8468,7 +8521,7 @@ function wu() {
|
|
|
8468
8521
|
}
|
|
8469
8522
|
}
|
|
8470
8523
|
z.initialize = function(M) {
|
|
8471
|
-
var
|
|
8524
|
+
var q, K, _ = F[M.authorization];
|
|
8472
8525
|
if (_)
|
|
8473
8526
|
return w.sendEvent(_, "custom.client.load.cached"), _;
|
|
8474
8527
|
try {
|
|
@@ -8480,18 +8533,18 @@ function wu() {
|
|
|
8480
8533
|
}
|
|
8481
8534
|
return _ = u(K, M.sessionId).then(
|
|
8482
8535
|
function(g) {
|
|
8483
|
-
return M.debug && (g.isDebug = !0), g.authorization = M.authorization,
|
|
8536
|
+
return M.debug && (g.isDebug = !0), g.authorization = M.authorization, q = new z(g), q;
|
|
8484
8537
|
}
|
|
8485
8538
|
), F[M.authorization] = _, w.sendEvent(_, "custom.client.load.initialized"), _.then(function(g) {
|
|
8486
|
-
return w.sendEvent(
|
|
8539
|
+
return w.sendEvent(q, "custom.client.load.succeeded"), g;
|
|
8487
8540
|
}).catch(function(g) {
|
|
8488
8541
|
return delete F[M.authorization], Promise.reject(g);
|
|
8489
8542
|
});
|
|
8490
8543
|
}, z.clearCache = function() {
|
|
8491
8544
|
F = {};
|
|
8492
8545
|
}, z.prototype._findOrCreateFraudnetJSON = function(M) {
|
|
8493
|
-
var
|
|
8494
|
-
|
|
8546
|
+
var q = document.querySelector('script[fncls="' + U + '"]'), K, _, g, R;
|
|
8547
|
+
q || (q = document.body.appendChild(document.createElement("script")), q.type = "application/json", q.setAttribute("fncls", U)), K = this.getConfiguration(), _ = {
|
|
8495
8548
|
rda_tenant: "bt_card",
|
|
8496
8549
|
// eslint-disable-line camelcase
|
|
8497
8550
|
mid: K.gatewayConfiguration.merchantId
|
|
@@ -8502,11 +8555,11 @@ function wu() {
|
|
|
8502
8555
|
f: M.substr(0, 32),
|
|
8503
8556
|
fp: _,
|
|
8504
8557
|
bu: !1,
|
|
8505
|
-
s:
|
|
8506
|
-
},
|
|
8507
|
-
}, z.prototype.request = function(M,
|
|
8558
|
+
s: Y
|
|
8559
|
+
}, q.text = JSON.stringify(R);
|
|
8560
|
+
}, z.prototype.request = function(M, q) {
|
|
8508
8561
|
var K = this, _ = new Promise(function(g, R) {
|
|
8509
|
-
var V, b, T, E,
|
|
8562
|
+
var V, b, T, E, P = !!(M.endpoint === "payment_methods/credit_cards" && K.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);
|
|
8510
8563
|
if (M.api !== "graphQLApi" && (M.method ? M.endpoint || (V = "options.endpoint") : V = "options.method"), V)
|
|
8511
8564
|
throw new l({
|
|
8512
8565
|
type: O.CLIENT_OPTION_REQUIRED.type,
|
|
@@ -8562,26 +8615,26 @@ function wu() {
|
|
|
8562
8615
|
);
|
|
8563
8616
|
return;
|
|
8564
8617
|
}
|
|
8565
|
-
X = y({ _httpStatus: B }, A),
|
|
8566
|
-
src:
|
|
8618
|
+
X = y({ _httpStatus: B }, A), P && X.creditCards && X.creditCards.length > 0 && (K._findOrCreateFraudnetJSON(X.creditCards[0].nonce), S.loadScript({
|
|
8619
|
+
src: $,
|
|
8567
8620
|
forceScriptReload: !0
|
|
8568
8621
|
})), g(X);
|
|
8569
8622
|
});
|
|
8570
8623
|
});
|
|
8571
|
-
if (typeof
|
|
8572
|
-
|
|
8573
|
-
|
|
8624
|
+
if (typeof q == "function") {
|
|
8625
|
+
q = m(v(q)), _.then(function(g) {
|
|
8626
|
+
q(null, g, g._httpStatus);
|
|
8574
8627
|
}).catch(function(g) {
|
|
8575
8628
|
var R = g && g.details && g.details.httpStatus;
|
|
8576
|
-
|
|
8629
|
+
q(g, null, R);
|
|
8577
8630
|
});
|
|
8578
8631
|
return;
|
|
8579
8632
|
}
|
|
8580
8633
|
return _;
|
|
8581
8634
|
};
|
|
8582
|
-
function j(M,
|
|
8635
|
+
function j(M, q) {
|
|
8583
8636
|
var K;
|
|
8584
|
-
if (M === -1 ? K = new l(O.CLIENT_REQUEST_TIMEOUT) : M === 401 ? K = new l(O.CLIENT_AUTHORIZATION_INVALID) : M === 403 ? K = new l(O.CLIENT_AUTHORIZATION_INSUFFICIENT) : M === 429 ? K = new l(O.CLIENT_RATE_LIMITED) : M >= 500 ? K = new l(O.CLIENT_GATEWAY_NETWORK) : (M < 200 || M >= 400) && (K = d(
|
|
8637
|
+
if (M === -1 ? K = new l(O.CLIENT_REQUEST_TIMEOUT) : M === 401 ? K = new l(O.CLIENT_AUTHORIZATION_INVALID) : M === 403 ? K = new l(O.CLIENT_AUTHORIZATION_INSUFFICIENT) : M === 429 ? K = new l(O.CLIENT_RATE_LIMITED) : M >= 500 ? K = new l(O.CLIENT_GATEWAY_NETWORK) : (M < 200 || M >= 400) && (K = d(q, {
|
|
8585
8638
|
type: O.CLIENT_REQUEST_ERROR.type,
|
|
8586
8639
|
code: O.CLIENT_REQUEST_ERROR.code,
|
|
8587
8640
|
message: O.CLIENT_REQUEST_ERROR.message
|
|
@@ -8594,12 +8647,12 @@ function wu() {
|
|
|
8594
8647
|
return L;
|
|
8595
8648
|
}, z.prototype.teardown = f(function() {
|
|
8596
8649
|
var M = this;
|
|
8597
|
-
return delete F[M.getConfiguration().authorization], N(M,
|
|
8650
|
+
return delete F[M.getConfiguration().authorization], N(M, x(z.prototype)), Promise.resolve();
|
|
8598
8651
|
});
|
|
8599
8652
|
function ee(M) {
|
|
8600
|
-
var
|
|
8653
|
+
var q = M.authorizationFingerprint || M.authorization;
|
|
8601
8654
|
return {
|
|
8602
|
-
Authorization: "Bearer " +
|
|
8655
|
+
Authorization: "Bearer " + q,
|
|
8603
8656
|
"Braintree-Version": i
|
|
8604
8657
|
};
|
|
8605
8658
|
}
|
|
@@ -8673,7 +8726,7 @@ function wu() {
|
|
|
8673
8726
|
var i = e("../lib/braintree-error"), s = e("@braintree/wrap-promise"), o = e("./request"), c = e("@braintree/uuid"), l = e("../lib/constants"), d = e("./errors"), u = e("./request/graphql"), h = e("../lib/constants").GRAPHQL_URLS, p = e("../lib/is-date-string-before-or-on"), f = e("./constants").BRAINTREE_VERSION;
|
|
8674
8727
|
function m(v, y) {
|
|
8675
8728
|
return new Promise(function(w, O) {
|
|
8676
|
-
var L, I,
|
|
8729
|
+
var L, I, x, N, S = y || c(), U = {
|
|
8677
8730
|
merchantAppId: window.location.host,
|
|
8678
8731
|
platform: l.PLATFORM,
|
|
8679
8732
|
sdkVersion: l.VERSION,
|
|
@@ -8683,8 +8736,8 @@ function wu() {
|
|
|
8683
8736
|
integrationType: l.INTEGRATION,
|
|
8684
8737
|
sessionId: S
|
|
8685
8738
|
};
|
|
8686
|
-
I = v.attrs,
|
|
8687
|
-
url:
|
|
8739
|
+
I = v.attrs, x = v.configUrl, I._meta = U, I.braintreeLibraryVersion = l.BRAINTREE_LIBRARY_VERSION, I.configVersion = "3", N = {
|
|
8740
|
+
url: x,
|
|
8688
8741
|
method: "GET",
|
|
8689
8742
|
data: I
|
|
8690
8743
|
}, I.authorizationFingerprint && v.graphQL ? (p(v.graphQL.date, f) && (N.graphQL = new u({
|
|
@@ -8697,16 +8750,16 @@ function wu() {
|
|
|
8697
8750
|
url: h[v.environment],
|
|
8698
8751
|
features: ["configuration"]
|
|
8699
8752
|
}
|
|
8700
|
-
}), N.metadata = U), o(N, function(
|
|
8753
|
+
}), N.metadata = U), o(N, function(Y, $, F) {
|
|
8701
8754
|
var z;
|
|
8702
|
-
if (
|
|
8755
|
+
if (Y) {
|
|
8703
8756
|
F === 403 ? z = d.CLIENT_AUTHORIZATION_INSUFFICIENT : F === 401 ? z = d.CLIENT_AUTHORIZATION_INVALID : z = d.CLIENT_GATEWAY_NETWORK, O(
|
|
8704
8757
|
new i({
|
|
8705
8758
|
type: z.type,
|
|
8706
8759
|
code: z.code,
|
|
8707
8760
|
message: z.message,
|
|
8708
8761
|
details: {
|
|
8709
|
-
originalError:
|
|
8762
|
+
originalError: Y
|
|
8710
8763
|
}
|
|
8711
8764
|
})
|
|
8712
8765
|
);
|
|
@@ -8716,7 +8769,7 @@ function wu() {
|
|
|
8716
8769
|
authorizationType: I.tokenizationKey ? "TOKENIZATION_KEY" : "CLIENT_TOKEN",
|
|
8717
8770
|
authorizationFingerprint: I.authorizationFingerprint,
|
|
8718
8771
|
analyticsMetadata: U,
|
|
8719
|
-
gatewayConfiguration:
|
|
8772
|
+
gatewayConfiguration: $
|
|
8720
8773
|
}, w(L);
|
|
8721
8774
|
});
|
|
8722
8775
|
});
|
|
@@ -8753,50 +8806,50 @@ function wu() {
|
|
|
8753
8806
|
return L === "UNKNOWN" || L === "INTERNAL";
|
|
8754
8807
|
}
|
|
8755
8808
|
function y(O, L, I) {
|
|
8756
|
-
var
|
|
8809
|
+
var x, N, S, U, Y, $, F, z = O.url, j = O.graphQL, ee = O.timeout, M = l.getRequestObject(), q = I, K = !!(j && j.isGraphQLRequest(z, O.data));
|
|
8757
8810
|
O.headers = s(
|
|
8758
8811
|
{ "Content-Type": "application/json" },
|
|
8759
8812
|
O.headers
|
|
8760
|
-
), K ? S = new u(O) : S = new h(O), z = S.getUrl(), U = S.getBody(),
|
|
8813
|
+
), K ? S = new u(O) : S = new h(O), z = S.getUrl(), U = S.getBody(), Y = S.getMethod(), $ = S.getHeaders(), Y === "GET" && (z = i.queryify(z, U), U = null), d ? M.onreadystatechange = function() {
|
|
8761
8814
|
if (M.readyState === 4) {
|
|
8762
8815
|
if (M.status === 0 && K) {
|
|
8763
8816
|
delete O.graphQL, y(O, L, I);
|
|
8764
8817
|
return;
|
|
8765
8818
|
}
|
|
8766
|
-
if (F = c(M.responseText), N = S.adaptResponseBody(F),
|
|
8819
|
+
if (F = c(M.responseText), N = S.adaptResponseBody(F), x = S.determineStatus(M.status, F), x >= 400 || x < 200) {
|
|
8767
8820
|
if (K && v(F)) {
|
|
8768
8821
|
delete O.graphQL, y(O, L, I);
|
|
8769
8822
|
return;
|
|
8770
8823
|
}
|
|
8771
|
-
if (L < p && m(
|
|
8824
|
+
if (L < p && m(x)) {
|
|
8772
8825
|
L++, y(O, L, I);
|
|
8773
8826
|
return;
|
|
8774
8827
|
}
|
|
8775
|
-
|
|
8828
|
+
q(N || "error", null, x || 500);
|
|
8776
8829
|
} else
|
|
8777
|
-
|
|
8830
|
+
q(null, N, x);
|
|
8778
8831
|
}
|
|
8779
|
-
} : (O.headers && (z = i.queryify(z,
|
|
8780
|
-
|
|
8832
|
+
} : (O.headers && (z = i.queryify(z, $)), M.onload = function() {
|
|
8833
|
+
q(null, c(M.responseText), M.status);
|
|
8781
8834
|
}, M.onerror = function() {
|
|
8782
|
-
|
|
8835
|
+
q("error", null, 500);
|
|
8783
8836
|
}, M.onprogress = function() {
|
|
8784
8837
|
}, M.ontimeout = function() {
|
|
8785
|
-
|
|
8838
|
+
q("timeout", null, -1);
|
|
8786
8839
|
});
|
|
8787
8840
|
try {
|
|
8788
|
-
M.open(
|
|
8841
|
+
M.open(Y, z, !0);
|
|
8789
8842
|
} catch (_) {
|
|
8790
8843
|
if (!K)
|
|
8791
8844
|
throw _;
|
|
8792
8845
|
delete O.graphQL, y(O, L, I);
|
|
8793
8846
|
return;
|
|
8794
8847
|
}
|
|
8795
|
-
M.timeout = ee, d && Object.keys(
|
|
8796
|
-
M.setRequestHeader(_,
|
|
8848
|
+
M.timeout = ee, d && Object.keys($).forEach(function(_) {
|
|
8849
|
+
M.setRequestHeader(_, $[_]);
|
|
8797
8850
|
});
|
|
8798
8851
|
try {
|
|
8799
|
-
M.send(o(
|
|
8852
|
+
M.send(o(Y, U));
|
|
8800
8853
|
} catch (_) {
|
|
8801
8854
|
}
|
|
8802
8855
|
}
|
|
@@ -9281,8 +9334,8 @@ function wu() {
|
|
|
9281
9334
|
},
|
|
9282
9335
|
configuration: p
|
|
9283
9336
|
}, v = {
|
|
9284
|
-
"payment_methods/credit_cards": function(L, I,
|
|
9285
|
-
return
|
|
9337
|
+
"payment_methods/credit_cards": function(L, I, x) {
|
|
9338
|
+
return x ? u(L, I) : d(L, I);
|
|
9286
9339
|
},
|
|
9287
9340
|
configuration: f
|
|
9288
9341
|
};
|
|
@@ -9301,11 +9354,11 @@ function wu() {
|
|
|
9301
9354
|
L,
|
|
9302
9355
|
// Since this is used for all GQL requests, we only want this if it's a Fastlane Tokenization request
|
|
9303
9356
|
c(this._data.creditCard)
|
|
9304
|
-
),
|
|
9357
|
+
), x = s(
|
|
9305
9358
|
{ clientSdkMetadata: this._clientSdkMetadata },
|
|
9306
9359
|
I
|
|
9307
9360
|
);
|
|
9308
|
-
return JSON.stringify(
|
|
9361
|
+
return JSON.stringify(x);
|
|
9309
9362
|
}, y.prototype.getMethod = function() {
|
|
9310
9363
|
return "POST";
|
|
9311
9364
|
}, y.prototype.getHeaders = function() {
|
|
@@ -9322,17 +9375,17 @@ function wu() {
|
|
|
9322
9375
|
"creditCard" in this._data && c(this._data.creditCard)
|
|
9323
9376
|
);
|
|
9324
9377
|
}, y.prototype.determineStatus = function(L, I) {
|
|
9325
|
-
var
|
|
9326
|
-
return L === 200 ? (N = I.errors && I.errors[0] && I.errors[0].extensions && I.errors[0].extensions.errorClass, I.data && !I.errors ?
|
|
9378
|
+
var x, N;
|
|
9379
|
+
return L === 200 ? (N = I.errors && I.errors[0] && I.errors[0].extensions && I.errors[0].extensions.errorClass, I.data && !I.errors ? x = 200 : N === "VALIDATION" ? x = 422 : N === "AUTHORIZATION" ? x = 403 : N === "AUTHENTICATION" ? x = 401 : w(N, I) ? x = 403 : x = 500) : L ? x = L : x = 500, this._sendAnalyticsEvent("graphql.status." + L), this._sendAnalyticsEvent("graphql.determinedStatus." + x), x;
|
|
9327
9380
|
};
|
|
9328
9381
|
function w(L, I) {
|
|
9329
9382
|
return !L && I.errors[0].message;
|
|
9330
9383
|
}
|
|
9331
9384
|
function O(L) {
|
|
9332
9385
|
var I = {};
|
|
9333
|
-
return Object.keys(L).forEach(function(
|
|
9334
|
-
var N = o(
|
|
9335
|
-
typeof L[
|
|
9386
|
+
return Object.keys(L).forEach(function(x) {
|
|
9387
|
+
var N = o(x);
|
|
9388
|
+
typeof L[x] == "object" ? I[N] = O(L[x]) : typeof L[x] == "number" ? I[N] = String(L[x]) : I[N] = L[x];
|
|
9336
9389
|
}), I;
|
|
9337
9390
|
}
|
|
9338
9391
|
r.exports = y;
|
|
@@ -9409,11 +9462,11 @@ function wu() {
|
|
|
9409
9462
|
function l(u, h, p, f) {
|
|
9410
9463
|
var m = Date.now();
|
|
9411
9464
|
return p.flow === "vault" ? p.context_type = "BA_Token" : p.flow === "checkout" && (p.context_type = "EC_Token"), Promise.resolve(u).then(function(v) {
|
|
9412
|
-
var y = v._request, w = i.ANALYTICS_URL, O = i.ANALYTICS_PREFIX + h, L = v.getConfiguration(), I = L.gatewayConfiguration.environment === "production",
|
|
9465
|
+
var y = v._request, w = i.ANALYTICS_URL, O = i.ANALYTICS_PREFIX + h, L = v.getConfiguration(), I = L.gatewayConfiguration.environment === "production", x = {
|
|
9413
9466
|
events: [],
|
|
9414
9467
|
tracking: []
|
|
9415
|
-
}, N = s.addEventMetadata(v,
|
|
9416
|
-
return N.event_name = O, N.t = m,
|
|
9468
|
+
}, N = s.addEventMetadata(v, x);
|
|
9469
|
+
return N.event_name = O, N.t = m, x.events = [
|
|
9417
9470
|
{
|
|
9418
9471
|
level: "info",
|
|
9419
9472
|
event: O,
|
|
@@ -9425,11 +9478,11 @@ function wu() {
|
|
|
9425
9478
|
p
|
|
9426
9479
|
)
|
|
9427
9480
|
}
|
|
9428
|
-
],
|
|
9481
|
+
], x.tracking = [N], p && typeof p == "object" && (x.tracking = [d(N, p)]), y(
|
|
9429
9482
|
{
|
|
9430
9483
|
url: w,
|
|
9431
9484
|
method: "post",
|
|
9432
|
-
data:
|
|
9485
|
+
data: x,
|
|
9433
9486
|
timeout: i.ANALYTICS_REQUEST_TIMEOUT_MS
|
|
9434
9487
|
},
|
|
9435
9488
|
f
|
|
@@ -9849,7 +9902,7 @@ function Ou() {
|
|
|
9849
9902
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
9850
9903
|
PERFORMANCE OF THIS SOFTWARE.
|
|
9851
9904
|
***************************************************************************** */
|
|
9852
|
-
function s(b, T, E,
|
|
9905
|
+
function s(b, T, E, P) {
|
|
9853
9906
|
function D(A) {
|
|
9854
9907
|
return A instanceof E ? A : new E(function(B) {
|
|
9855
9908
|
B(A);
|
|
@@ -9858,14 +9911,14 @@ function Ou() {
|
|
|
9858
9911
|
return new (E || (E = Promise))(function(A, B) {
|
|
9859
9912
|
function X(te) {
|
|
9860
9913
|
try {
|
|
9861
|
-
k(
|
|
9914
|
+
k(P.next(te));
|
|
9862
9915
|
} catch (ye) {
|
|
9863
9916
|
B(ye);
|
|
9864
9917
|
}
|
|
9865
9918
|
}
|
|
9866
9919
|
function ie(te) {
|
|
9867
9920
|
try {
|
|
9868
|
-
k(
|
|
9921
|
+
k(P.throw(te));
|
|
9869
9922
|
} catch (ye) {
|
|
9870
9923
|
B(ye);
|
|
9871
9924
|
}
|
|
@@ -9873,14 +9926,14 @@ function Ou() {
|
|
|
9873
9926
|
function k(te) {
|
|
9874
9927
|
te.done ? A(te.value) : D(te.value).then(X, ie);
|
|
9875
9928
|
}
|
|
9876
|
-
k((
|
|
9929
|
+
k((P = P.apply(b, [])).next());
|
|
9877
9930
|
});
|
|
9878
9931
|
}
|
|
9879
9932
|
function o(b, T) {
|
|
9880
9933
|
var E = { label: 0, sent: function() {
|
|
9881
9934
|
if (A[0] & 1) throw A[1];
|
|
9882
9935
|
return A[1];
|
|
9883
|
-
}, trys: [], ops: [] },
|
|
9936
|
+
}, trys: [], ops: [] }, P, D, A, B;
|
|
9884
9937
|
return B = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (B[Symbol.iterator] = function() {
|
|
9885
9938
|
return this;
|
|
9886
9939
|
}), B;
|
|
@@ -9890,9 +9943,9 @@ function Ou() {
|
|
|
9890
9943
|
};
|
|
9891
9944
|
}
|
|
9892
9945
|
function ie(k) {
|
|
9893
|
-
if (
|
|
9946
|
+
if (P) throw new TypeError("Generator is already executing.");
|
|
9894
9947
|
for (; E; ) try {
|
|
9895
|
-
if (
|
|
9948
|
+
if (P = 1, D && (A = k[0] & 2 ? D.return : k[0] ? D.throw || ((A = D.return) && A.call(D), 0) : D.next) && !(A = A.call(D, k[1])).done) return A;
|
|
9896
9949
|
switch (D = 0, A && (k = [k[0] & 2, A.value]), k[0]) {
|
|
9897
9950
|
case 0:
|
|
9898
9951
|
case 1:
|
|
@@ -9930,7 +9983,7 @@ function Ou() {
|
|
|
9930
9983
|
} catch (te) {
|
|
9931
9984
|
k = [6, te], D = 0;
|
|
9932
9985
|
} finally {
|
|
9933
|
-
|
|
9986
|
+
P = A = 0;
|
|
9934
9987
|
}
|
|
9935
9988
|
if (k[0] & 5) throw k[1];
|
|
9936
9989
|
return { value: k[0] ? k[1] : void 0, done: !0 };
|
|
@@ -9941,17 +9994,17 @@ function Ou() {
|
|
|
9941
9994
|
var T, E = JSON.stringify(b);
|
|
9942
9995
|
if (!b.forceScriptReload && (T = l[E], T))
|
|
9943
9996
|
return T;
|
|
9944
|
-
var
|
|
9945
|
-
return
|
|
9946
|
-
|
|
9997
|
+
var P = document.createElement("script"), D = b.dataAttributes || {}, A = b.container || document.head;
|
|
9998
|
+
return P.src = b.src, P.id = b.id || "", P.async = !0, b.type && P.setAttribute("type", "".concat(b.type)), b.crossorigin && P.setAttribute("crossorigin", "".concat(b.crossorigin)), Object.keys(D).forEach(function(B) {
|
|
9999
|
+
P.setAttribute("data-".concat(B), "".concat(D[B]));
|
|
9947
10000
|
}), T = new Promise(function(B, X) {
|
|
9948
|
-
|
|
9949
|
-
B(
|
|
9950
|
-
}),
|
|
10001
|
+
P.addEventListener("load", function() {
|
|
10002
|
+
B(P);
|
|
10003
|
+
}), P.addEventListener("error", function() {
|
|
9951
10004
|
X(new Error("".concat(b.src, " failed to load.")));
|
|
9952
|
-
}),
|
|
10005
|
+
}), P.addEventListener("abort", function() {
|
|
9953
10006
|
X(new Error("".concat(b.src, " has aborted.")));
|
|
9954
|
-
}), A.appendChild(
|
|
10007
|
+
}), A.appendChild(P);
|
|
9955
10008
|
}), l[E] = T, T;
|
|
9956
10009
|
}
|
|
9957
10010
|
d.clearCache = function() {
|
|
@@ -9962,8 +10015,8 @@ function Ou() {
|
|
|
9962
10015
|
if (E)
|
|
9963
10016
|
return Promise.resolve(E);
|
|
9964
10017
|
E = document.createElement("link");
|
|
9965
|
-
var
|
|
9966
|
-
return E.setAttribute("rel", "stylesheet"), E.setAttribute("type", "text/css"), E.setAttribute("href", T.href), E.setAttribute("id", T.id),
|
|
10018
|
+
var P = T.container || document.head;
|
|
10019
|
+
return E.setAttribute("rel", "stylesheet"), E.setAttribute("type", "text/css"), E.setAttribute("href", T.href), E.setAttribute("id", T.id), P.firstChild ? P.insertBefore(E, P.firstChild) : P.appendChild(E), Promise.resolve(E);
|
|
9967
10020
|
};
|
|
9968
10021
|
Object.defineProperty(c, "__esModule", { value: !0 }), c.loadStylesheet = f = c.loadScript = void 0;
|
|
9969
10022
|
var p = u, f = c.loadScript = p, m = h;
|
|
@@ -9976,7 +10029,7 @@ function Ou() {
|
|
|
9976
10029
|
AXO_ASSET_PATH: O,
|
|
9977
10030
|
LOCALE_PATH: L,
|
|
9978
10031
|
CDNX_PROD: v
|
|
9979
|
-
},
|
|
10032
|
+
}, x = {
|
|
9980
10033
|
BT: "BT",
|
|
9981
10034
|
PPCP: "PPCP"
|
|
9982
10035
|
};
|
|
@@ -9987,26 +10040,26 @@ function Ou() {
|
|
|
9987
10040
|
return N() && typeof window.requirejs == "function" && typeof window.requirejs.config == "function";
|
|
9988
10041
|
}
|
|
9989
10042
|
function U(b, T, E) {
|
|
9990
|
-
var
|
|
10043
|
+
var P, D;
|
|
9991
10044
|
return E === void 0 && (E = !0), s(this, void 0, void 0, function() {
|
|
9992
10045
|
var A, B;
|
|
9993
10046
|
return o(this, function(X) {
|
|
9994
|
-
if (A =
|
|
9995
|
-
if (T && ((
|
|
10047
|
+
if (A = $(), A && A[b.module]) {
|
|
10048
|
+
if (T && ((P = A[b.module]) === null || P === void 0 ? void 0 : P.VERSION) !== T)
|
|
9996
10049
|
throw B = (D = A[b.module]) === null || D === void 0 ? void 0 : D.VERSION, new Error("".concat(b.module, " already loaded with version ").concat(B, " cannot load version ").concat(T));
|
|
9997
10050
|
return [2, !0];
|
|
9998
10051
|
}
|
|
9999
10052
|
if (!T)
|
|
10000
10053
|
throw new Error("Attempted to load ".concat(b.module, " without specifying version"));
|
|
10001
|
-
return [2,
|
|
10054
|
+
return [2, Y(b, T, E)];
|
|
10002
10055
|
});
|
|
10003
10056
|
});
|
|
10004
10057
|
}
|
|
10005
|
-
function
|
|
10058
|
+
function Y(b, T, E) {
|
|
10006
10059
|
if (E === void 0 && (E = !0), N()) {
|
|
10007
|
-
var
|
|
10060
|
+
var P = E ? b.amdModule.minified : b.amdModule.unminified;
|
|
10008
10061
|
return new Promise(function(A, B) {
|
|
10009
|
-
window.require([
|
|
10062
|
+
window.require([P], A, B);
|
|
10010
10063
|
});
|
|
10011
10064
|
}
|
|
10012
10065
|
var D = E ? b.script.minified : b.script.unminified;
|
|
@@ -10015,13 +10068,13 @@ function Ou() {
|
|
|
10015
10068
|
src: "https://js.braintreegateway.com/web/".concat(T, "/js/").concat(D)
|
|
10016
10069
|
});
|
|
10017
10070
|
}
|
|
10018
|
-
function
|
|
10071
|
+
function $() {
|
|
10019
10072
|
return window == null ? void 0 : window.braintree;
|
|
10020
10073
|
}
|
|
10021
10074
|
var F, z, j = {
|
|
10022
10075
|
Client: "client",
|
|
10023
10076
|
HostedCardFields: "hostedFields"
|
|
10024
|
-
}, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F),
|
|
10077
|
+
}, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F), q = (z = {}, z[j.Client] = {
|
|
10025
10078
|
id: "client",
|
|
10026
10079
|
module: j.Client,
|
|
10027
10080
|
amdModule: {
|
|
@@ -10046,21 +10099,21 @@ function Ou() {
|
|
|
10046
10099
|
}, z);
|
|
10047
10100
|
function K(b) {
|
|
10048
10101
|
return s(this, void 0, void 0, function() {
|
|
10049
|
-
var T, E,
|
|
10102
|
+
var T, E, P, D;
|
|
10050
10103
|
return o(this, function(A) {
|
|
10051
10104
|
switch (A.label) {
|
|
10052
10105
|
case 0:
|
|
10053
|
-
return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified,
|
|
10054
|
-
U(
|
|
10055
|
-
_(
|
|
10106
|
+
return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified, P = R(b), D = V(b), b.platform !== x.BT ? [3, 2] : [4, Promise.all([
|
|
10107
|
+
U(q.hostedFields, T, E),
|
|
10108
|
+
_(P, E)
|
|
10056
10109
|
])];
|
|
10057
10110
|
case 1:
|
|
10058
10111
|
return A.sent(), [3, 5];
|
|
10059
10112
|
case 2:
|
|
10060
|
-
return b.platform !==
|
|
10061
|
-
U(
|
|
10062
|
-
U(
|
|
10063
|
-
_(
|
|
10113
|
+
return b.platform !== x.PPCP ? [3, 4] : [4, Promise.all([
|
|
10114
|
+
U(q.client, T, E),
|
|
10115
|
+
U(q.hostedFields, T, E),
|
|
10116
|
+
_(P, E)
|
|
10064
10117
|
])];
|
|
10065
10118
|
case 3:
|
|
10066
10119
|
return A.sent(), [3, 5];
|
|
@@ -10078,9 +10131,9 @@ function Ou() {
|
|
|
10078
10131
|
S() && requirejs.config({
|
|
10079
10132
|
paths: (E = {}, E[w] = b, E)
|
|
10080
10133
|
});
|
|
10081
|
-
var
|
|
10134
|
+
var P = "".concat(w, "/").concat(T ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified);
|
|
10082
10135
|
return new Promise(function(D, A) {
|
|
10083
|
-
window.require([
|
|
10136
|
+
window.require([P], D, A);
|
|
10084
10137
|
});
|
|
10085
10138
|
}
|
|
10086
10139
|
return f({
|
|
@@ -10094,9 +10147,9 @@ function Ou() {
|
|
|
10094
10147
|
return E ? "https://cdn-".concat(E, ".static.engineering.dev.paypalinc.com/").concat(T) : "".concat(I.CDNX_PROD, "/").concat(T);
|
|
10095
10148
|
}
|
|
10096
10149
|
function R(b) {
|
|
10097
|
-
var T, E = (b == null ? void 0 : b.minified) !== !1 ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified,
|
|
10150
|
+
var T, E = (b == null ? void 0 : b.minified) !== !1 ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified, P = N() ? I.AXO_ASSET_PATH : "".concat(I.AXO_ASSET_PATH, "/").concat(E, ".js");
|
|
10098
10151
|
return g({
|
|
10099
|
-
assetUrl:
|
|
10152
|
+
assetUrl: P,
|
|
10100
10153
|
bundleId: (T = b == null ? void 0 : b.metadata) === null || T === void 0 ? void 0 : T.bundleIdOverride
|
|
10101
10154
|
});
|
|
10102
10155
|
}
|
|
@@ -10154,13 +10207,13 @@ function Ou() {
|
|
|
10154
10207
|
return "https://b.stats.paypal.com/counter.cgi?i=127.0.0.1&p=" + y + "&t=" + w + "&a=14";
|
|
10155
10208
|
}
|
|
10156
10209
|
function v(y, w, O, L) {
|
|
10157
|
-
var I = document.body.appendChild(document.createElement("script")),
|
|
10210
|
+
var I = document.body.appendChild(document.createElement("script")), x = {
|
|
10158
10211
|
f: y,
|
|
10159
10212
|
s,
|
|
10160
10213
|
b: w,
|
|
10161
10214
|
cb1: L
|
|
10162
10215
|
};
|
|
10163
|
-
return O !== "production" && (
|
|
10216
|
+
return O !== "production" && (x.sandbox = !0), I.type = "application/json", I.setAttribute("fncls", i), I.text = JSON.stringify(x), I;
|
|
10164
10217
|
}
|
|
10165
10218
|
r.exports = {
|
|
10166
10219
|
setup: u,
|
|
@@ -10183,8 +10236,8 @@ function Ou() {
|
|
|
10183
10236
|
debug: w.debug,
|
|
10184
10237
|
assetsUrl: l.create(w.authorization),
|
|
10185
10238
|
name: O
|
|
10186
|
-
}).then(function(
|
|
10187
|
-
var N =
|
|
10239
|
+
}).then(function(x) {
|
|
10240
|
+
var N = x.getConfiguration();
|
|
10188
10241
|
return i.setup({
|
|
10189
10242
|
sessionId: w.riskCorrelationId || w.clientMetadataId || w.correlationId,
|
|
10190
10243
|
clientSessionId: N.analyticsMetadata.sessionId,
|
|
@@ -10408,7 +10461,7 @@ function Ou() {
|
|
|
10408
10461
|
var Nu = Ou();
|
|
10409
10462
|
const Lu = /* @__PURE__ */ wn(Nu);
|
|
10410
10463
|
var Dt = { exports: {} }, _r;
|
|
10411
|
-
function
|
|
10464
|
+
function Pu() {
|
|
10412
10465
|
return _r || (_r = 1, function(n, t) {
|
|
10413
10466
|
(function(e) {
|
|
10414
10467
|
n.exports = e();
|
|
@@ -10766,7 +10819,7 @@ function xu() {
|
|
|
10766
10819
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
10767
10820
|
PERFORMANCE OF THIS SOFTWARE.
|
|
10768
10821
|
***************************************************************************** */
|
|
10769
|
-
function s(b, T, E,
|
|
10822
|
+
function s(b, T, E, P) {
|
|
10770
10823
|
function D(A) {
|
|
10771
10824
|
return A instanceof E ? A : new E(function(B) {
|
|
10772
10825
|
B(A);
|
|
@@ -10775,14 +10828,14 @@ function xu() {
|
|
|
10775
10828
|
return new (E || (E = Promise))(function(A, B) {
|
|
10776
10829
|
function X(te) {
|
|
10777
10830
|
try {
|
|
10778
|
-
k(
|
|
10831
|
+
k(P.next(te));
|
|
10779
10832
|
} catch (ye) {
|
|
10780
10833
|
B(ye);
|
|
10781
10834
|
}
|
|
10782
10835
|
}
|
|
10783
10836
|
function ie(te) {
|
|
10784
10837
|
try {
|
|
10785
|
-
k(
|
|
10838
|
+
k(P.throw(te));
|
|
10786
10839
|
} catch (ye) {
|
|
10787
10840
|
B(ye);
|
|
10788
10841
|
}
|
|
@@ -10790,14 +10843,14 @@ function xu() {
|
|
|
10790
10843
|
function k(te) {
|
|
10791
10844
|
te.done ? A(te.value) : D(te.value).then(X, ie);
|
|
10792
10845
|
}
|
|
10793
|
-
k((
|
|
10846
|
+
k((P = P.apply(b, [])).next());
|
|
10794
10847
|
});
|
|
10795
10848
|
}
|
|
10796
10849
|
function o(b, T) {
|
|
10797
10850
|
var E = { label: 0, sent: function() {
|
|
10798
10851
|
if (A[0] & 1) throw A[1];
|
|
10799
10852
|
return A[1];
|
|
10800
|
-
}, trys: [], ops: [] },
|
|
10853
|
+
}, trys: [], ops: [] }, P, D, A, B;
|
|
10801
10854
|
return B = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (B[Symbol.iterator] = function() {
|
|
10802
10855
|
return this;
|
|
10803
10856
|
}), B;
|
|
@@ -10807,9 +10860,9 @@ function xu() {
|
|
|
10807
10860
|
};
|
|
10808
10861
|
}
|
|
10809
10862
|
function ie(k) {
|
|
10810
|
-
if (
|
|
10863
|
+
if (P) throw new TypeError("Generator is already executing.");
|
|
10811
10864
|
for (; E; ) try {
|
|
10812
|
-
if (
|
|
10865
|
+
if (P = 1, D && (A = k[0] & 2 ? D.return : k[0] ? D.throw || ((A = D.return) && A.call(D), 0) : D.next) && !(A = A.call(D, k[1])).done) return A;
|
|
10813
10866
|
switch (D = 0, A && (k = [k[0] & 2, A.value]), k[0]) {
|
|
10814
10867
|
case 0:
|
|
10815
10868
|
case 1:
|
|
@@ -10847,7 +10900,7 @@ function xu() {
|
|
|
10847
10900
|
} catch (te) {
|
|
10848
10901
|
k = [6, te], D = 0;
|
|
10849
10902
|
} finally {
|
|
10850
|
-
|
|
10903
|
+
P = A = 0;
|
|
10851
10904
|
}
|
|
10852
10905
|
if (k[0] & 5) throw k[1];
|
|
10853
10906
|
return { value: k[0] ? k[1] : void 0, done: !0 };
|
|
@@ -10858,17 +10911,17 @@ function xu() {
|
|
|
10858
10911
|
var T, E = JSON.stringify(b);
|
|
10859
10912
|
if (!b.forceScriptReload && (T = l[E], T))
|
|
10860
10913
|
return T;
|
|
10861
|
-
var
|
|
10862
|
-
return
|
|
10863
|
-
|
|
10914
|
+
var P = document.createElement("script"), D = b.dataAttributes || {}, A = b.container || document.head;
|
|
10915
|
+
return P.src = b.src, P.id = b.id || "", P.async = !0, b.type && P.setAttribute("type", "".concat(b.type)), b.crossorigin && P.setAttribute("crossorigin", "".concat(b.crossorigin)), Object.keys(D).forEach(function(B) {
|
|
10916
|
+
P.setAttribute("data-".concat(B), "".concat(D[B]));
|
|
10864
10917
|
}), T = new Promise(function(B, X) {
|
|
10865
|
-
|
|
10866
|
-
B(
|
|
10867
|
-
}),
|
|
10918
|
+
P.addEventListener("load", function() {
|
|
10919
|
+
B(P);
|
|
10920
|
+
}), P.addEventListener("error", function() {
|
|
10868
10921
|
X(new Error("".concat(b.src, " failed to load.")));
|
|
10869
|
-
}),
|
|
10922
|
+
}), P.addEventListener("abort", function() {
|
|
10870
10923
|
X(new Error("".concat(b.src, " has aborted.")));
|
|
10871
|
-
}), A.appendChild(
|
|
10924
|
+
}), A.appendChild(P);
|
|
10872
10925
|
}), l[E] = T, T;
|
|
10873
10926
|
}
|
|
10874
10927
|
d.clearCache = function() {
|
|
@@ -10879,8 +10932,8 @@ function xu() {
|
|
|
10879
10932
|
if (E)
|
|
10880
10933
|
return Promise.resolve(E);
|
|
10881
10934
|
E = document.createElement("link");
|
|
10882
|
-
var
|
|
10883
|
-
return E.setAttribute("rel", "stylesheet"), E.setAttribute("type", "text/css"), E.setAttribute("href", T.href), E.setAttribute("id", T.id),
|
|
10935
|
+
var P = T.container || document.head;
|
|
10936
|
+
return E.setAttribute("rel", "stylesheet"), E.setAttribute("type", "text/css"), E.setAttribute("href", T.href), E.setAttribute("id", T.id), P.firstChild ? P.insertBefore(E, P.firstChild) : P.appendChild(E), Promise.resolve(E);
|
|
10884
10937
|
};
|
|
10885
10938
|
Object.defineProperty(c, "__esModule", { value: !0 }), c.loadStylesheet = f = c.loadScript = void 0;
|
|
10886
10939
|
var p = u, f = c.loadScript = p, m = h;
|
|
@@ -10893,7 +10946,7 @@ function xu() {
|
|
|
10893
10946
|
AXO_ASSET_PATH: O,
|
|
10894
10947
|
LOCALE_PATH: L,
|
|
10895
10948
|
CDNX_PROD: v
|
|
10896
|
-
},
|
|
10949
|
+
}, x = {
|
|
10897
10950
|
BT: "BT",
|
|
10898
10951
|
PPCP: "PPCP"
|
|
10899
10952
|
};
|
|
@@ -10904,26 +10957,26 @@ function xu() {
|
|
|
10904
10957
|
return N() && typeof window.requirejs == "function" && typeof window.requirejs.config == "function";
|
|
10905
10958
|
}
|
|
10906
10959
|
function U(b, T, E) {
|
|
10907
|
-
var
|
|
10960
|
+
var P, D;
|
|
10908
10961
|
return E === void 0 && (E = !0), s(this, void 0, void 0, function() {
|
|
10909
10962
|
var A, B;
|
|
10910
10963
|
return o(this, function(X) {
|
|
10911
|
-
if (A =
|
|
10912
|
-
if (T && ((
|
|
10964
|
+
if (A = $(), A && A[b.module]) {
|
|
10965
|
+
if (T && ((P = A[b.module]) === null || P === void 0 ? void 0 : P.VERSION) !== T)
|
|
10913
10966
|
throw B = (D = A[b.module]) === null || D === void 0 ? void 0 : D.VERSION, new Error("".concat(b.module, " already loaded with version ").concat(B, " cannot load version ").concat(T));
|
|
10914
10967
|
return [2, !0];
|
|
10915
10968
|
}
|
|
10916
10969
|
if (!T)
|
|
10917
10970
|
throw new Error("Attempted to load ".concat(b.module, " without specifying version"));
|
|
10918
|
-
return [2,
|
|
10971
|
+
return [2, Y(b, T, E)];
|
|
10919
10972
|
});
|
|
10920
10973
|
});
|
|
10921
10974
|
}
|
|
10922
|
-
function
|
|
10975
|
+
function Y(b, T, E) {
|
|
10923
10976
|
if (E === void 0 && (E = !0), N()) {
|
|
10924
|
-
var
|
|
10977
|
+
var P = E ? b.amdModule.minified : b.amdModule.unminified;
|
|
10925
10978
|
return new Promise(function(A, B) {
|
|
10926
|
-
window.require([
|
|
10979
|
+
window.require([P], A, B);
|
|
10927
10980
|
});
|
|
10928
10981
|
}
|
|
10929
10982
|
var D = E ? b.script.minified : b.script.unminified;
|
|
@@ -10932,13 +10985,13 @@ function xu() {
|
|
|
10932
10985
|
src: "https://js.braintreegateway.com/web/".concat(T, "/js/").concat(D)
|
|
10933
10986
|
});
|
|
10934
10987
|
}
|
|
10935
|
-
function
|
|
10988
|
+
function $() {
|
|
10936
10989
|
return window == null ? void 0 : window.braintree;
|
|
10937
10990
|
}
|
|
10938
10991
|
var F, z, j = {
|
|
10939
10992
|
Client: "client",
|
|
10940
10993
|
HostedCardFields: "hostedFields"
|
|
10941
|
-
}, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F),
|
|
10994
|
+
}, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F), q = (z = {}, z[j.Client] = {
|
|
10942
10995
|
id: "client",
|
|
10943
10996
|
module: j.Client,
|
|
10944
10997
|
amdModule: {
|
|
@@ -10963,21 +11016,21 @@ function xu() {
|
|
|
10963
11016
|
}, z);
|
|
10964
11017
|
function K(b) {
|
|
10965
11018
|
return s(this, void 0, void 0, function() {
|
|
10966
|
-
var T, E,
|
|
11019
|
+
var T, E, P, D;
|
|
10967
11020
|
return o(this, function(A) {
|
|
10968
11021
|
switch (A.label) {
|
|
10969
11022
|
case 0:
|
|
10970
|
-
return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified,
|
|
10971
|
-
U(
|
|
10972
|
-
_(
|
|
11023
|
+
return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified, P = R(b), D = V(b), b.platform !== x.BT ? [3, 2] : [4, Promise.all([
|
|
11024
|
+
U(q.hostedFields, T, E),
|
|
11025
|
+
_(P, E)
|
|
10973
11026
|
])];
|
|
10974
11027
|
case 1:
|
|
10975
11028
|
return A.sent(), [3, 5];
|
|
10976
11029
|
case 2:
|
|
10977
|
-
return b.platform !==
|
|
10978
|
-
U(
|
|
10979
|
-
U(
|
|
10980
|
-
_(
|
|
11030
|
+
return b.platform !== x.PPCP ? [3, 4] : [4, Promise.all([
|
|
11031
|
+
U(q.client, T, E),
|
|
11032
|
+
U(q.hostedFields, T, E),
|
|
11033
|
+
_(P, E)
|
|
10981
11034
|
])];
|
|
10982
11035
|
case 3:
|
|
10983
11036
|
return A.sent(), [3, 5];
|
|
@@ -10995,9 +11048,9 @@ function xu() {
|
|
|
10995
11048
|
S() && requirejs.config({
|
|
10996
11049
|
paths: (E = {}, E[w] = b, E)
|
|
10997
11050
|
});
|
|
10998
|
-
var
|
|
11051
|
+
var P = "".concat(w, "/").concat(T ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified);
|
|
10999
11052
|
return new Promise(function(D, A) {
|
|
11000
|
-
window.require([
|
|
11053
|
+
window.require([P], D, A);
|
|
11001
11054
|
});
|
|
11002
11055
|
}
|
|
11003
11056
|
return f({
|
|
@@ -11011,9 +11064,9 @@ function xu() {
|
|
|
11011
11064
|
return E ? "https://cdn-".concat(E, ".static.engineering.dev.paypalinc.com/").concat(T) : "".concat(I.CDNX_PROD, "/").concat(T);
|
|
11012
11065
|
}
|
|
11013
11066
|
function R(b) {
|
|
11014
|
-
var T, E = (b == null ? void 0 : b.minified) !== !1 ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified,
|
|
11067
|
+
var T, E = (b == null ? void 0 : b.minified) !== !1 ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified, P = N() ? I.AXO_ASSET_PATH : "".concat(I.AXO_ASSET_PATH, "/").concat(E, ".js");
|
|
11015
11068
|
return g({
|
|
11016
|
-
assetUrl:
|
|
11069
|
+
assetUrl: P,
|
|
11017
11070
|
bundleId: (T = b == null ? void 0 : b.metadata) === null || T === void 0 ? void 0 : T.bundleIdOverride
|
|
11018
11071
|
});
|
|
11019
11072
|
}
|
|
@@ -11353,11 +11406,11 @@ function xu() {
|
|
|
11353
11406
|
function l(u, h, p, f) {
|
|
11354
11407
|
var m = Date.now();
|
|
11355
11408
|
return p.flow === "vault" ? p.context_type = "BA_Token" : p.flow === "checkout" && (p.context_type = "EC_Token"), Promise.resolve(u).then(function(v) {
|
|
11356
|
-
var y = v._request, w = i.ANALYTICS_URL, O = i.ANALYTICS_PREFIX + h, L = v.getConfiguration(), I = L.gatewayConfiguration.environment === "production",
|
|
11409
|
+
var y = v._request, w = i.ANALYTICS_URL, O = i.ANALYTICS_PREFIX + h, L = v.getConfiguration(), I = L.gatewayConfiguration.environment === "production", x = {
|
|
11357
11410
|
events: [],
|
|
11358
11411
|
tracking: []
|
|
11359
|
-
}, N = s.addEventMetadata(v,
|
|
11360
|
-
return N.event_name = O, N.t = m,
|
|
11412
|
+
}, N = s.addEventMetadata(v, x);
|
|
11413
|
+
return N.event_name = O, N.t = m, x.events = [
|
|
11361
11414
|
{
|
|
11362
11415
|
level: "info",
|
|
11363
11416
|
event: O,
|
|
@@ -11369,11 +11422,11 @@ function xu() {
|
|
|
11369
11422
|
p
|
|
11370
11423
|
)
|
|
11371
11424
|
}
|
|
11372
|
-
],
|
|
11425
|
+
], x.tracking = [N], p && typeof p == "object" && (x.tracking = [d(N, p)]), y(
|
|
11373
11426
|
{
|
|
11374
11427
|
url: w,
|
|
11375
11428
|
method: "post",
|
|
11376
|
-
data:
|
|
11429
|
+
data: x,
|
|
11377
11430
|
timeout: i.ANALYTICS_REQUEST_TIMEOUT_MS
|
|
11378
11431
|
},
|
|
11379
11432
|
f
|
|
@@ -11602,37 +11655,37 @@ function xu() {
|
|
|
11602
11655
|
var i = e("./strategies/popup"), s = e("./strategies/popup-bridge"), o = e("./strategies/modal"), c = e("framebus"), l = e("../shared/events"), d = e("../shared/errors"), u = e("../shared/constants"), h = e("@braintree/uuid"), p = e("@braintree/iframer"), f = e("../../braintree-error"), m = e("../shared/browser-detection"), v = e("./../../assign").assign, y = e("../../constants").BUS_CONFIGURATION_REQUEST_EVENT, w = ["name", "dispatchFrameUrl", "openFrameUrl"];
|
|
11603
11656
|
function O() {
|
|
11604
11657
|
}
|
|
11605
|
-
function L(
|
|
11606
|
-
if (!
|
|
11658
|
+
function L(x) {
|
|
11659
|
+
if (!x)
|
|
11607
11660
|
throw new Error("Valid configuration is required");
|
|
11608
11661
|
if (w.forEach(function(N) {
|
|
11609
|
-
if (!
|
|
11662
|
+
if (!x.hasOwnProperty(N))
|
|
11610
11663
|
throw new Error("A valid frame " + N + " must be provided");
|
|
11611
|
-
}), !/^[\w_]+$/.test(
|
|
11664
|
+
}), !/^[\w_]+$/.test(x.name))
|
|
11612
11665
|
throw new Error("A valid frame name must be provided");
|
|
11613
11666
|
}
|
|
11614
|
-
function I(
|
|
11615
|
-
L(
|
|
11616
|
-
name:
|
|
11617
|
-
dispatchFrameUrl:
|
|
11618
|
-
openFrameUrl:
|
|
11619
|
-
height:
|
|
11620
|
-
width:
|
|
11621
|
-
top:
|
|
11622
|
-
left:
|
|
11623
|
-
}, this.state =
|
|
11624
|
-
}
|
|
11625
|
-
I.prototype.initialize = function(
|
|
11667
|
+
function I(x) {
|
|
11668
|
+
L(x), this._serviceId = h().replace(/-/g, ""), this._options = {
|
|
11669
|
+
name: x.name + "_" + this._serviceId,
|
|
11670
|
+
dispatchFrameUrl: x.dispatchFrameUrl,
|
|
11671
|
+
openFrameUrl: x.openFrameUrl,
|
|
11672
|
+
height: x.height,
|
|
11673
|
+
width: x.width,
|
|
11674
|
+
top: x.top,
|
|
11675
|
+
left: x.left
|
|
11676
|
+
}, this.state = x.state || {}, this._bus = new c({ channel: this._serviceId }), this._setBusEvents();
|
|
11677
|
+
}
|
|
11678
|
+
I.prototype.initialize = function(x) {
|
|
11626
11679
|
var N = function() {
|
|
11627
|
-
|
|
11680
|
+
x(), this._bus.off(l.DISPATCH_FRAME_READY, N);
|
|
11628
11681
|
}.bind(this);
|
|
11629
11682
|
this._bus.on(l.DISPATCH_FRAME_READY, N), this._writeDispatchFrame();
|
|
11630
11683
|
}, I.prototype._writeDispatchFrame = function() {
|
|
11631
|
-
var
|
|
11684
|
+
var x = u.DISPATCH_FRAME_NAME + "_" + this._serviceId, N = this._options.dispatchFrameUrl;
|
|
11632
11685
|
this._dispatchFrame = p({
|
|
11633
11686
|
"aria-hidden": !0,
|
|
11634
|
-
name:
|
|
11635
|
-
title:
|
|
11687
|
+
name: x,
|
|
11688
|
+
title: x,
|
|
11636
11689
|
src: N,
|
|
11637
11690
|
class: u.DISPATCH_FRAME_CLASS,
|
|
11638
11691
|
height: 0,
|
|
@@ -11645,36 +11698,36 @@ function xu() {
|
|
|
11645
11698
|
}, I.prototype._setBusEvents = function() {
|
|
11646
11699
|
this._bus.on(
|
|
11647
11700
|
l.DISPATCH_FRAME_REPORT,
|
|
11648
|
-
function(
|
|
11649
|
-
this._onCompleteCallback && this._onCompleteCallback.call(null,
|
|
11701
|
+
function(x, N) {
|
|
11702
|
+
this._onCompleteCallback && this._onCompleteCallback.call(null, x.err, x.payload), this._frame.close(), this._onCompleteCallback = null, N && N();
|
|
11650
11703
|
}.bind(this)
|
|
11651
11704
|
), this._bus.on(
|
|
11652
11705
|
y,
|
|
11653
|
-
function(
|
|
11654
|
-
|
|
11706
|
+
function(x) {
|
|
11707
|
+
x(this.state);
|
|
11655
11708
|
}.bind(this)
|
|
11656
11709
|
);
|
|
11657
|
-
}, I.prototype.open = function(
|
|
11658
|
-
if (
|
|
11659
|
-
if (v(this.state,
|
|
11710
|
+
}, I.prototype.open = function(x, N) {
|
|
11711
|
+
if (x = x || {}, this._frame = this._getFrameForEnvironment(x), this._frame.initialize(N), !(this._frame instanceof s)) {
|
|
11712
|
+
if (v(this.state, x.state), this._onCompleteCallback = N, this._frame.open(), this.isFrameClosed()) {
|
|
11660
11713
|
this._cleanupFrame(), N && N(new f(d.FRAME_SERVICE_FRAME_OPEN_FAILED));
|
|
11661
11714
|
return;
|
|
11662
11715
|
}
|
|
11663
11716
|
this._pollForPopupClose();
|
|
11664
11717
|
}
|
|
11665
|
-
}, I.prototype.redirect = function(
|
|
11666
|
-
this._frame && !this.isFrameClosed() && this._frame.redirect(
|
|
11718
|
+
}, I.prototype.redirect = function(x) {
|
|
11719
|
+
this._frame && !this.isFrameClosed() && this._frame.redirect(x);
|
|
11667
11720
|
}, I.prototype.close = function() {
|
|
11668
11721
|
this.isFrameClosed() || this._frame.close();
|
|
11669
11722
|
}, I.prototype.focus = function() {
|
|
11670
11723
|
this.isFrameClosed() || this._frame.focus();
|
|
11671
|
-
}, I.prototype.createHandler = function(
|
|
11672
|
-
return
|
|
11724
|
+
}, I.prototype.createHandler = function(x) {
|
|
11725
|
+
return x = x || {}, {
|
|
11673
11726
|
close: function() {
|
|
11674
|
-
|
|
11727
|
+
x.beforeClose && x.beforeClose(), this.close();
|
|
11675
11728
|
}.bind(this),
|
|
11676
11729
|
focus: function() {
|
|
11677
|
-
|
|
11730
|
+
x.beforeFocus && x.beforeFocus(), this.focus();
|
|
11678
11731
|
}.bind(this)
|
|
11679
11732
|
};
|
|
11680
11733
|
}, I.prototype.createNoopHandler = function() {
|
|
@@ -11697,8 +11750,8 @@ function xu() {
|
|
|
11697
11750
|
}.bind(this),
|
|
11698
11751
|
u.POPUP_POLL_INTERVAL
|
|
11699
11752
|
), this._popupInterval;
|
|
11700
|
-
}, I.prototype._getFrameForEnvironment = function(
|
|
11701
|
-
var N = m.supportsPopups(), S = !!window.popupBridge, U = v({}, this._options,
|
|
11753
|
+
}, I.prototype._getFrameForEnvironment = function(x) {
|
|
11754
|
+
var N = m.supportsPopups(), S = !!window.popupBridge, U = v({}, this._options, x);
|
|
11702
11755
|
return S ? new s(U) : N ? new i(U) : new o(U);
|
|
11703
11756
|
}, r.exports = I;
|
|
11704
11757
|
}, { "../../braintree-error": 59, "../../constants": 60, "../shared/browser-detection": 74, "../shared/constants": 75, "../shared/errors": 76, "../shared/events": 77, "./../../assign": 57, "./strategies/modal": 69, "./strategies/popup": 72, "./strategies/popup-bridge": 70, "@braintree/iframer": 27, "@braintree/uuid": 31, framebus: 38 }], 68: [function(e, r, a) {
|
|
@@ -12125,7 +12178,7 @@ function xu() {
|
|
|
12125
12178
|
var L = function() {
|
|
12126
12179
|
v.bus.off(
|
|
12127
12180
|
d.VENMO_DESKTOP_CUSTOMER_CANCELED,
|
|
12128
|
-
|
|
12181
|
+
x
|
|
12129
12182
|
), v.bus.off(
|
|
12130
12183
|
d.VENMO_DESKTOP_UNKNOWN_ERROR,
|
|
12131
12184
|
I
|
|
@@ -12136,7 +12189,7 @@ function xu() {
|
|
|
12136
12189
|
reason: "UNKNOWN_ERROR",
|
|
12137
12190
|
err: N
|
|
12138
12191
|
});
|
|
12139
|
-
},
|
|
12192
|
+
}, x = function() {
|
|
12140
12193
|
L(), v.updateVenmoDesktopPaymentContext("CANCELED"), v.sendEvent(
|
|
12141
12194
|
"venmo.tokenize.desktop.status-change.canceled-from-modal"
|
|
12142
12195
|
), O({
|
|
@@ -12148,7 +12201,7 @@ function xu() {
|
|
|
12148
12201
|
L(), w(N);
|
|
12149
12202
|
}, v.bus.on(
|
|
12150
12203
|
d.VENMO_DESKTOP_CUSTOMER_CANCELED,
|
|
12151
|
-
|
|
12204
|
+
x
|
|
12152
12205
|
), v.bus.on(d.VENMO_DESKTOP_UNKNOWN_ERROR, I);
|
|
12153
12206
|
});
|
|
12154
12207
|
return this.iframe.style.display = "block", this.setAlert("Generating a QR code, get your Venmo app ready"), this.iframe.focus(), this.startPolling(), y.then(function(w) {
|
|
@@ -12227,9 +12280,9 @@ function xu() {
|
|
|
12227
12280
|
case "APPROVED":
|
|
12228
12281
|
return w.authorize(), w.Promise.resolve(O);
|
|
12229
12282
|
}
|
|
12230
|
-
return new w.Promise(function(
|
|
12283
|
+
return new w.Promise(function(x, N) {
|
|
12231
12284
|
setTimeout(function() {
|
|
12232
|
-
w.pollForStatusChange(v, y).then(
|
|
12285
|
+
w.pollForStatusChange(v, y).then(x).catch(N);
|
|
12233
12286
|
}, h);
|
|
12234
12287
|
});
|
|
12235
12288
|
}) : this.Promise.resolve();
|
|
@@ -12315,8 +12368,8 @@ function xu() {
|
|
|
12315
12368
|
assetsUrl: c.create(y.authorization),
|
|
12316
12369
|
name: w
|
|
12317
12370
|
}).then(function(I) {
|
|
12318
|
-
var
|
|
12319
|
-
return y.client = I,
|
|
12371
|
+
var x = I.getConfiguration();
|
|
12372
|
+
return y.client = I, x.gatewayConfiguration.payWithVenmo ? I : Promise.reject(new u(l.VENMO_NOT_ENABLED));
|
|
12320
12373
|
}), y.createPromise = O, L = new h(y), i.sendEvent(O, "venmo.initialized"), O.then(function() {
|
|
12321
12374
|
return L;
|
|
12322
12375
|
}));
|
|
@@ -12521,18 +12574,18 @@ function xu() {
|
|
|
12521
12574
|
};
|
|
12522
12575
|
o.suppressUnhandledPromiseMessage = !0;
|
|
12523
12576
|
function v(N) {
|
|
12524
|
-
var S = N.frameServiceInstance, U = N.venmoUrl,
|
|
12577
|
+
var S = N.frameServiceInstance, U = N.venmoUrl, Y = N.checkForStatusChange, $ = N.cancelTokenization, F = N.checkPaymentContextStatus, z = new o();
|
|
12525
12578
|
return document.getElementById(m.continueButton).addEventListener("click", function() {
|
|
12526
12579
|
S.focus();
|
|
12527
12580
|
}), document.getElementById(m.cancelButton).addEventListener("click", function() {
|
|
12528
|
-
S.close(),
|
|
12581
|
+
S.close(), $(), w();
|
|
12529
12582
|
}), S.open({}, function(j) {
|
|
12530
12583
|
var ee = 1;
|
|
12531
|
-
j ? z.reject(j) :
|
|
12584
|
+
j ? z.reject(j) : Y(ee).then(function(M) {
|
|
12532
12585
|
z.resolve(M);
|
|
12533
12586
|
}).catch(function(M) {
|
|
12534
|
-
F().then(function(
|
|
12535
|
-
|
|
12587
|
+
F().then(function(q) {
|
|
12588
|
+
q.status === "CREATED" ? z.reject(
|
|
12536
12589
|
new l(c.VENMO_CUSTOMER_CANCELED)
|
|
12537
12590
|
) : z.reject(M);
|
|
12538
12591
|
});
|
|
@@ -12589,7 +12642,7 @@ function xu() {
|
|
|
12589
12642
|
"color: #FFFFFF;",
|
|
12590
12643
|
"margin-top: 28px;",
|
|
12591
12644
|
"}"
|
|
12592
|
-
],
|
|
12645
|
+
], Y = [
|
|
12593
12646
|
"#" + m.continueButton + " {",
|
|
12594
12647
|
"width: 400px;",
|
|
12595
12648
|
"height: 50px;",
|
|
@@ -12603,7 +12656,7 @@ function xu() {
|
|
|
12603
12656
|
"color: #FFFFFF;",
|
|
12604
12657
|
"margin-top: 44px;",
|
|
12605
12658
|
"}"
|
|
12606
|
-
],
|
|
12659
|
+
], $ = [
|
|
12607
12660
|
"#" + m.message + " {",
|
|
12608
12661
|
"font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;",
|
|
12609
12662
|
"font-style: normal;",
|
|
@@ -12629,33 +12682,33 @@ function xu() {
|
|
|
12629
12682
|
], z = N.concat(
|
|
12630
12683
|
S,
|
|
12631
12684
|
U,
|
|
12632
|
-
G,
|
|
12633
12685
|
Y,
|
|
12686
|
+
$,
|
|
12634
12687
|
F
|
|
12635
12688
|
);
|
|
12636
12689
|
return z.join(`
|
|
12637
12690
|
`);
|
|
12638
12691
|
}
|
|
12639
12692
|
function L(N) {
|
|
12640
|
-
var S = document.getElementById(m.backdrop), U,
|
|
12693
|
+
var S = document.getElementById(m.backdrop), U, Y, $, F, z, j, ee, M;
|
|
12641
12694
|
if (S) {
|
|
12642
12695
|
S.classList.remove("hidden");
|
|
12643
12696
|
return;
|
|
12644
12697
|
}
|
|
12645
|
-
U = document.createElement("style"),
|
|
12646
|
-
|
|
12698
|
+
U = document.createElement("style"), Y = document.createElement("div"), $ = document.createElement("div"), F = document.createElement("div"), z = document.createElement("div"), j = document.createElement("div"), ee = document.createElement("button"), M = document.createElement("button"), N && (U.nonce = N), U.id = "venmo-desktop-web__injected-styles", U.innerHTML = O(), Y.id = m.backdrop, $.id = m.backdropContainer, F.id = m.venmoLogo, F.innerHTML = u, z.id = m.message, z.innerText = "What would you like to do?", j.id = m.instructions, j.innerText = h, ee.id = m.continueButton, ee.innerText = "Continue payment", M.id = m.cancelButton, M.innerText = "Cancel payment", document.head.appendChild(U), $.appendChild(F), $.appendChild(z), $.appendChild(j), $.appendChild(ee), $.appendChild(M), Y.appendChild($), document.body.appendChild(Y), Y.addEventListener("click", function(q) {
|
|
12699
|
+
q.stopPropagation();
|
|
12647
12700
|
});
|
|
12648
12701
|
}
|
|
12649
12702
|
function I(N) {
|
|
12650
12703
|
return L(N.styleCspNonce), v(N);
|
|
12651
12704
|
}
|
|
12652
|
-
function
|
|
12653
|
-
var S = new o(), U = "venmoDesktopWebLogin",
|
|
12705
|
+
function x(N) {
|
|
12706
|
+
var S = new o(), U = "venmoDesktopWebLogin", Y = N.assetsUrl, $ = N.debug || !1, F = y(), z = Y + "/web/" + d + "/html";
|
|
12654
12707
|
return i.create(
|
|
12655
12708
|
{
|
|
12656
12709
|
name: U,
|
|
12657
|
-
dispatchFrameUrl: z + "/dispatch-frame" + s(
|
|
12658
|
-
openFrameUrl: z + "/venmo-landing-frame" + s(
|
|
12710
|
+
dispatchFrameUrl: z + "/dispatch-frame" + s($) + ".html",
|
|
12711
|
+
openFrameUrl: z + "/venmo-landing-frame" + s($) + ".html",
|
|
12659
12712
|
top: F.top,
|
|
12660
12713
|
left: F.left,
|
|
12661
12714
|
height: f,
|
|
@@ -12669,12 +12722,12 @@ function xu() {
|
|
|
12669
12722
|
r.exports = {
|
|
12670
12723
|
runWebLogin: I,
|
|
12671
12724
|
openPopup: v,
|
|
12672
|
-
setupDesktopWebLogin:
|
|
12725
|
+
setupDesktopWebLogin: x,
|
|
12673
12726
|
POPUP_WIDTH: p,
|
|
12674
12727
|
POPUP_HEIGHT: f
|
|
12675
12728
|
};
|
|
12676
12729
|
}, { "../../lib/braintree-error": 59, "../../lib/frame-service/external": 68, "../../lib/use-min": 85, "../shared/errors": 93, "@braintree/extended-promise": 26 }], 98: [function(e, r, a) {
|
|
12677
|
-
var i = e("../lib/analytics"), s = e("../lib/assign").assign, o = e("./shared/supports-venmo"), c = e("./shared/browser-detection"), l = e("./shared/constants"), d = e("./shared/errors"), u = e("../lib/querystring"), h = e("../lib/is-verified-domain"), p = e("../lib/methods"), f = e("../lib/convert-methods-to-error"), m = e("@braintree/wrap-promise"), v = e("../lib/braintree-error"), y = e("../lib/in-iframe"), w = e("@braintree/extended-promise"), O = e("./shared/get-venmo-url"), L = e("./shared/web-login-backdrop"), I = e("../lib/snake-case-to-camel-case"),
|
|
12730
|
+
var i = e("../lib/analytics"), s = e("../lib/assign").assign, o = e("./shared/supports-venmo"), c = e("./shared/browser-detection"), l = e("./shared/constants"), d = e("./shared/errors"), u = e("../lib/querystring"), h = e("../lib/is-verified-domain"), p = e("../lib/methods"), f = e("../lib/convert-methods-to-error"), m = e("@braintree/wrap-promise"), v = e("../lib/braintree-error"), y = e("../lib/in-iframe"), w = e("@braintree/extended-promise"), O = e("./shared/get-venmo-url"), L = e("./shared/web-login-backdrop"), I = e("../lib/snake-case-to-camel-case"), x = e("../lib/url-params"), N = e("./external/"), S = e("./external/queries"), U = "3.126.0", Y = 250, $ = 3e5;
|
|
12678
12731
|
w.suppressUnhandledPromiseMessage = !0;
|
|
12679
12732
|
function F(_) {
|
|
12680
12733
|
var g = this;
|
|
@@ -12719,21 +12772,21 @@ function xu() {
|
|
|
12719
12772
|
"venmo.desktop-flow.setup-failed"
|
|
12720
12773
|
), g._useDesktopQRFlow = !1, R;
|
|
12721
12774
|
});
|
|
12722
|
-
}) : this._shouldCreateVenmoPaymentContext && (this._mobilePollingInterval =
|
|
12775
|
+
}) : this._shouldCreateVenmoPaymentContext && (this._mobilePollingInterval = Y, this._mobilePollingExpiresThreshold = $, this._createPromise = this._createPromise.then(function(R) {
|
|
12723
12776
|
var V, b, T = g._cannotHaveReturnUrls ? "manual-return" : "mobile-payment-context", E = R.getConfiguration();
|
|
12724
12777
|
return b = L.setupDesktopWebLogin({
|
|
12725
12778
|
assetsUrl: E.gatewayConfiguration.assetsUrl,
|
|
12726
12779
|
debug: E.isDebug
|
|
12727
|
-
}).then(function(
|
|
12728
|
-
g._frameServiceInstance =
|
|
12729
|
-
}).catch(function(
|
|
12730
|
-
return
|
|
12780
|
+
}).then(function(P) {
|
|
12781
|
+
g._frameServiceInstance = P;
|
|
12782
|
+
}).catch(function(P) {
|
|
12783
|
+
return P;
|
|
12731
12784
|
}), g._mobilePollingContextEnvironment = E.gatewayConfiguration.environment.toUpperCase(), V = g._createVenmoPaymentContext(R).then(function() {
|
|
12732
12785
|
return i.sendEvent(
|
|
12733
12786
|
g._createPromise,
|
|
12734
12787
|
"venmo." + T + ".presented"
|
|
12735
12788
|
), R;
|
|
12736
|
-
}).catch(function(
|
|
12789
|
+
}).catch(function(P) {
|
|
12737
12790
|
return i.sendEvent(
|
|
12738
12791
|
g._createPromise,
|
|
12739
12792
|
"venmo." + T + ".setup-failed"
|
|
@@ -12741,17 +12794,17 @@ function xu() {
|
|
|
12741
12794
|
new v({
|
|
12742
12795
|
type: d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.type,
|
|
12743
12796
|
code: d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.code,
|
|
12744
|
-
message: z(
|
|
12797
|
+
message: z(P) ? P.details.originalError[0].message : d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,
|
|
12745
12798
|
details: {
|
|
12746
|
-
originalError:
|
|
12799
|
+
originalError: P
|
|
12747
12800
|
}
|
|
12748
12801
|
})
|
|
12749
12802
|
);
|
|
12750
|
-
}), w.all([b, V]).then(function(
|
|
12751
|
-
var D =
|
|
12803
|
+
}), w.all([b, V]).then(function(P) {
|
|
12804
|
+
var D = P[1];
|
|
12752
12805
|
return Promise.resolve(D);
|
|
12753
|
-
}).catch(function(
|
|
12754
|
-
return Promise.reject(
|
|
12806
|
+
}).catch(function(P) {
|
|
12807
|
+
return Promise.reject(P);
|
|
12755
12808
|
});
|
|
12756
12809
|
}));
|
|
12757
12810
|
}
|
|
@@ -12759,7 +12812,7 @@ function xu() {
|
|
|
12759
12812
|
return _.details && _.details.originalError && _.details.originalError[0] && _.details.originalError[0].extensions && _.details.originalError[0].extensions.errorClass === "VALIDATION" && _.details.originalError[0].extensions.errorType === "user_error";
|
|
12760
12813
|
}
|
|
12761
12814
|
F.prototype._createVenmoPaymentContext = function(_, g) {
|
|
12762
|
-
var R = this, V, b, T = _.getConfiguration(), E = T.gatewayConfiguration.payWithVenmo,
|
|
12815
|
+
var R = this, V, b, T = _.getConfiguration(), E = T.gatewayConfiguration.payWithVenmo, P = !1, D = R._useAllowDesktopWebLogin ? "NATIVE_WEB" : "MOBILE_WEB";
|
|
12763
12816
|
if (!this._shouldCreateVenmoPaymentContext)
|
|
12764
12817
|
return Promise.resolve();
|
|
12765
12818
|
if (this._shouldUseLegacyFlow)
|
|
@@ -12789,7 +12842,7 @@ function xu() {
|
|
|
12789
12842
|
shippingAmount: this._shippingAmount,
|
|
12790
12843
|
totalAmount: this._totalAmount,
|
|
12791
12844
|
lineItems: this._lineItems
|
|
12792
|
-
},
|
|
12845
|
+
}, P = Object.keys(b).some(
|
|
12793
12846
|
function(A) {
|
|
12794
12847
|
return b[A] !== void 0;
|
|
12795
12848
|
}
|
|
@@ -12807,7 +12860,7 @@ function xu() {
|
|
|
12807
12860
|
paysheetDetails: {
|
|
12808
12861
|
collectCustomerBillingAddress: this._collectCustomerBillingAddress,
|
|
12809
12862
|
collectCustomerShippingAddress: this._collectCustomerShippingAddress,
|
|
12810
|
-
transactionDetails:
|
|
12863
|
+
transactionDetails: P ? b : void 0
|
|
12811
12864
|
}
|
|
12812
12865
|
}
|
|
12813
12866
|
}
|
|
@@ -12846,7 +12899,7 @@ function xu() {
|
|
|
12846
12899
|
}, F.prototype.getUrl = function() {
|
|
12847
12900
|
return this._createPromise.then(
|
|
12848
12901
|
function(_) {
|
|
12849
|
-
var g = _.getConfiguration(), R = {}, V = this._deepLinkReturnUrl || window.location.href.replace(window.location.hash, ""), b = g.gatewayConfiguration.payWithVenmo, T = g.analyticsMetadata, E = b.accessToken,
|
|
12902
|
+
var g = _.getConfiguration(), R = {}, V = this._deepLinkReturnUrl || window.location.href.replace(window.location.hash, ""), b = g.gatewayConfiguration.payWithVenmo, T = g.analyticsMetadata, E = b.accessToken, P = {
|
|
12850
12903
|
_meta: {
|
|
12851
12904
|
version: T.sdkVersion,
|
|
12852
12905
|
integration: T.integration,
|
|
@@ -12855,7 +12908,7 @@ function xu() {
|
|
|
12855
12908
|
}
|
|
12856
12909
|
};
|
|
12857
12910
|
return this._isDebug = g.isDebug, this._assetsUrl = g.gatewayConfiguration.assetsUrl, V = V.replace(/#*$/, ""), this._venmoPaymentContextId && (this._shouldUseLegacyFlow ? E += "|pcid:" + this._venmoPaymentContextId : R.resource_id = this._venmoPaymentContextId), this._shouldIncludeReturnUrls() || this._useAllowDesktopWebLogin ? (this._useAllowDesktopWebLogin && (V = this._assetsUrl + "/web/" + U + "/html/redirect-frame.html"), R["x-success"] = V + "#venmoSuccess=1", R["x-cancel"] = V + "#venmoCancel=1", R["x-error"] = V + "#venmoError=1") : (R["x-success"] = "NOOP", R["x-cancel"] = "NOOP", R["x-error"] = "NOOP"), this._allowAndroidRecreation ? R.allowAndroidRecreation = 1 : R.allowAndroidRecreation = 0, R.ua = window.navigator.userAgent, R.braintree_merchant_id = // eslint-disable-line camelcase
|
|
12858
|
-
this._profileId || b.merchantId, R.braintree_access_token = E, R.braintree_environment = b.environment, R.braintree_sdk_data = btoa(JSON.stringify(
|
|
12911
|
+
this._profileId || b.merchantId, R.braintree_access_token = E, R.braintree_environment = b.environment, R.braintree_sdk_data = btoa(JSON.stringify(P)), O({
|
|
12859
12912
|
useAllowDesktopWebLogin: this._useAllowDesktopWebLogin,
|
|
12860
12913
|
mobileWebFallBack: this._mobileWebFallBack
|
|
12861
12914
|
}) + "?" + u.stringify(R);
|
|
@@ -12871,7 +12924,7 @@ function xu() {
|
|
|
12871
12924
|
}, F.prototype.hasTokenizationResult = function() {
|
|
12872
12925
|
return this._hasTokenizationResult();
|
|
12873
12926
|
}, F.prototype._hasTokenizationResult = function(_) {
|
|
12874
|
-
var g = j(_), R =
|
|
12927
|
+
var g = j(_), R = x.getUrlParams();
|
|
12875
12928
|
return R.resource_id ? this._venmoPaymentContextId = R.resource_id : g.id && (this._venmoPaymentContextId = g.id), typeof (g.venmoSuccess || g.venmoError || g.venmoCancel) != "undefined";
|
|
12876
12929
|
}, F.prototype._shouldIncludeReturnUrls = function() {
|
|
12877
12930
|
return this._deepLinkReturnUrl ? !0 : !this._cannotHaveReturnUrls;
|
|
@@ -13117,10 +13170,10 @@ function xu() {
|
|
|
13117
13170
|
i.sendEvent(this._createPromise, "venmo.tokenize.mobile.start"), this._tokenizePromise = new w(), this._previousHash = window.location.hash;
|
|
13118
13171
|
function b(T) {
|
|
13119
13172
|
var E;
|
|
13120
|
-
g.processHashChangeFlowResults(T).catch(function(
|
|
13121
|
-
E =
|
|
13122
|
-
}).then(function(
|
|
13123
|
-
!g._ignoreHistoryChanges && window.location.hash !== g._previousHash && (window.location.hash = g._previousHash), g._removeVisibilityEventListener(), E ? g._tokenizePromise.reject(E) : g._tokenizePromise.resolve(
|
|
13173
|
+
g.processHashChangeFlowResults(T).catch(function(P) {
|
|
13174
|
+
E = P;
|
|
13175
|
+
}).then(function(P) {
|
|
13176
|
+
!g._ignoreHistoryChanges && window.location.hash !== g._previousHash && (window.location.hash = g._previousHash), g._removeVisibilityEventListener(), E ? g._tokenizePromise.reject(E) : g._tokenizePromise.resolve(P), delete g._tokenizePromise;
|
|
13124
13177
|
});
|
|
13125
13178
|
}
|
|
13126
13179
|
return this._onHashChangeListener = function(T) {
|
|
@@ -13132,7 +13185,7 @@ function xu() {
|
|
|
13132
13185
|
}, this.getUrl().then(function(T) {
|
|
13133
13186
|
return g.appSwitch(T), setTimeout(function() {
|
|
13134
13187
|
window.document.addEventListener(
|
|
13135
|
-
|
|
13188
|
+
q(),
|
|
13136
13189
|
g._visibilityChangeListener
|
|
13137
13190
|
);
|
|
13138
13191
|
}, l.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY), g._tokenizePromise;
|
|
@@ -13198,7 +13251,7 @@ function xu() {
|
|
|
13198
13251
|
);
|
|
13199
13252
|
}, F.prototype._removeVisibilityEventListener = function() {
|
|
13200
13253
|
window.removeEventListener("hashchange", this._onHashChangeListener), window.document.removeEventListener(
|
|
13201
|
-
|
|
13254
|
+
q(),
|
|
13202
13255
|
this._visibilityChangeListener
|
|
13203
13256
|
), delete this._visibilityChangeListener, delete this._onHashChangeListener;
|
|
13204
13257
|
}, F.prototype.processHashChangeFlowResults = function(_) {
|
|
@@ -13268,8 +13321,8 @@ function xu() {
|
|
|
13268
13321
|
};
|
|
13269
13322
|
function j(_) {
|
|
13270
13323
|
var g = (_ || window.location.hash.substring(1)).split("&"), R = g.reduce(function(V, b) {
|
|
13271
|
-
var T = b.split("="), E = decodeURIComponent(T[0]).replace(/\W/g, ""),
|
|
13272
|
-
return V[
|
|
13324
|
+
var T = b.split("="), E = decodeURIComponent(T[0]).replace(/\W/g, ""), P = I(E), D = decodeURIComponent(T[1]);
|
|
13325
|
+
return V[P] = D, V;
|
|
13273
13326
|
}, {});
|
|
13274
13327
|
return R.resourceId && (R.id = R.resourceId), R;
|
|
13275
13328
|
}
|
|
@@ -13289,7 +13342,7 @@ function xu() {
|
|
|
13289
13342
|
_.payerInfo.userName
|
|
13290
13343
|
)), g;
|
|
13291
13344
|
}
|
|
13292
|
-
function
|
|
13345
|
+
function q() {
|
|
13293
13346
|
var _;
|
|
13294
13347
|
return typeof window.document.hidden != "undefined" ? _ = "visibilitychange" : typeof window.document.msHidden != "undefined" ? _ = "msvisibilitychange" : typeof window.document.webkitHidden != "undefined" && (_ = "webkitvisibilitychange"), _;
|
|
13295
13348
|
}
|
|
@@ -13301,8 +13354,8 @@ function xu() {
|
|
|
13301
13354
|
});
|
|
13302
13355
|
}(Dt)), Dt.exports;
|
|
13303
13356
|
}
|
|
13304
|
-
var
|
|
13305
|
-
const Ru = /* @__PURE__ */ wn(
|
|
13357
|
+
var xu = Pu();
|
|
13358
|
+
const Ru = /* @__PURE__ */ wn(xu);
|
|
13306
13359
|
class ku {
|
|
13307
13360
|
constructor() {
|
|
13308
13361
|
C(this, "client", null);
|
|
@@ -13392,7 +13445,7 @@ class Uu {
|
|
|
13392
13445
|
C(this, "state", {
|
|
13393
13446
|
translate: new pu(),
|
|
13394
13447
|
checkout: new Od(),
|
|
13395
|
-
transaction: new
|
|
13448
|
+
transaction: new Pd(),
|
|
13396
13449
|
styles: new Ld()
|
|
13397
13450
|
});
|
|
13398
13451
|
C(this, "checkout", new Td({
|
|
@@ -13407,6 +13460,6 @@ class Uu {
|
|
|
13407
13460
|
export {
|
|
13408
13461
|
Uu as Core,
|
|
13409
13462
|
Du as PayNextCheckout,
|
|
13410
|
-
|
|
13463
|
+
G as PaymentMethod
|
|
13411
13464
|
};
|
|
13412
13465
|
//# sourceMappingURL=index.es.js.map
|