@paynext/sdk 0.0.93 → 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 +552 -525
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +59 -59
- 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();
|
|
@@ -4651,19 +4667,19 @@ class vl {
|
|
|
4651
4667
|
try {
|
|
4652
4668
|
if (yield this.applePay.init({
|
|
4653
4669
|
onError: (i) => {
|
|
4654
|
-
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);
|
|
4655
4671
|
},
|
|
4656
4672
|
onCancel: () => {
|
|
4657
|
-
this.events.cancel.emit(), this.attempted.delete(
|
|
4673
|
+
this.events.cancel.emit(), this.attempted.delete(G.APPLE_PAY);
|
|
4658
4674
|
},
|
|
4659
4675
|
onSuccess: (i) => {
|
|
4660
|
-
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);
|
|
4661
4677
|
}
|
|
4662
4678
|
})) {
|
|
4663
4679
|
const i = this.applePay.render();
|
|
4664
4680
|
t == null || t.appendChild(i);
|
|
4665
4681
|
const s = () => {
|
|
4666
|
-
this.attempted.has(
|
|
4682
|
+
this.attempted.has(G.APPLE_PAY) || (this.attempted.add(G.APPLE_PAY), this.events.onPaymentAttempt.emit(G.APPLE_PAY));
|
|
4667
4683
|
};
|
|
4668
4684
|
i.addEventListener("pointerdown", s, { capture: !0 }), i.addEventListener("click", s, { capture: !0 }), i.addEventListener(
|
|
4669
4685
|
"keydown",
|
|
@@ -4720,19 +4736,19 @@ class vl {
|
|
|
4720
4736
|
try {
|
|
4721
4737
|
if (yield this.googlePay.init({
|
|
4722
4738
|
onError: (i) => {
|
|
4723
|
-
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);
|
|
4724
4740
|
},
|
|
4725
4741
|
onCancel: () => {
|
|
4726
|
-
this.events.cancel.emit(), this.attempted.delete(
|
|
4742
|
+
this.events.cancel.emit(), this.attempted.delete(G.GOOGLE_PAY);
|
|
4727
4743
|
},
|
|
4728
4744
|
onSuccess: (i) => {
|
|
4729
|
-
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);
|
|
4730
4746
|
}
|
|
4731
4747
|
})) {
|
|
4732
4748
|
const i = this.googlePay.render();
|
|
4733
4749
|
t == null || t.appendChild(i);
|
|
4734
4750
|
const s = () => {
|
|
4735
|
-
this.attempted.has(
|
|
4751
|
+
this.attempted.has(G.GOOGLE_PAY) || (this.attempted.add(G.GOOGLE_PAY), this.events.onPaymentAttempt.emit(G.GOOGLE_PAY));
|
|
4736
4752
|
};
|
|
4737
4753
|
i.addEventListener("pointerdown", s, { capture: !0 }), i.addEventListener("click", s, { capture: !0 }), i.addEventListener(
|
|
4738
4754
|
"keydown",
|
|
@@ -4790,11 +4806,13 @@ class vl {
|
|
|
4790
4806
|
const a = this.paypal.render();
|
|
4791
4807
|
if (t == null || t.appendChild(a), yield this.paypal.init({
|
|
4792
4808
|
onError: (s) => {
|
|
4793
|
-
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);
|
|
4794
4813
|
},
|
|
4795
|
-
onCancel: () => this.events.cancel.emit(),
|
|
4796
4814
|
onSuccess: (s) => {
|
|
4797
|
-
this.events.success.emit({ paypalId: s, type: "paypal" });
|
|
4815
|
+
this.events.success.emit({ paypalId: s, type: "paypal" }), this.attempted.delete(G.PAYPAL);
|
|
4798
4816
|
}
|
|
4799
4817
|
})) {
|
|
4800
4818
|
const s = performance.now();
|
|
@@ -4924,7 +4942,7 @@ class vl {
|
|
|
4924
4942
|
return W(this, null, function* () {
|
|
4925
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();
|
|
4926
4944
|
let a = e.filter(({ is_active: h }) => h);
|
|
4927
|
-
(r == null ? void 0 : r.variant) === "default" && (a = a.filter(({ type: h }) => h !==
|
|
4945
|
+
(r == null ? void 0 : r.variant) === "default" && (a = a.filter(({ type: h }) => h !== G.CARD)), this.initializeButtonInstances(a), this.buttons.innerHTML = "";
|
|
4928
4946
|
const i = a.sort((h, p) => h.order - p.order), s = /* @__PURE__ */ new Map();
|
|
4929
4947
|
for (const { type: h } of i) {
|
|
4930
4948
|
const p = document.createElement("div");
|
|
@@ -4933,15 +4951,15 @@ class vl {
|
|
|
4933
4951
|
const o = performance.now(), c = i.map(({ type: h }) => {
|
|
4934
4952
|
const p = s.get(h);
|
|
4935
4953
|
switch (h) {
|
|
4936
|
-
case
|
|
4954
|
+
case G.APPLE_PAY:
|
|
4937
4955
|
return this.initApple(p);
|
|
4938
|
-
case
|
|
4956
|
+
case G.GOOGLE_PAY:
|
|
4939
4957
|
return this.initGoogle(p);
|
|
4940
|
-
case
|
|
4958
|
+
case G.PAYPAL:
|
|
4941
4959
|
return this.initPayPal(p);
|
|
4942
|
-
case
|
|
4960
|
+
case G.VENMO:
|
|
4943
4961
|
return this.initBraintreeVenmo(p);
|
|
4944
|
-
case
|
|
4962
|
+
case G.CARD:
|
|
4945
4963
|
return this.initCard(p);
|
|
4946
4964
|
default:
|
|
4947
4965
|
throw new Error("Unknown button type");
|
|
@@ -4966,7 +4984,7 @@ class vl {
|
|
|
4966
4984
|
// initialize button instances only for active payment methods
|
|
4967
4985
|
initializeButtonInstances(t) {
|
|
4968
4986
|
const e = t.map(({ type: r }) => r);
|
|
4969
|
-
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(() => {
|
|
4970
4988
|
this.events.open.emit();
|
|
4971
4989
|
}));
|
|
4972
4990
|
}
|
|
@@ -5059,9 +5077,9 @@ const Ol = "_cardForm_ydw03_1", Nl = "_hidden_ydw03_5", Ll = "_topOffset_ydw03_9
|
|
|
5059
5077
|
cardForm: Ol,
|
|
5060
5078
|
hidden: Nl,
|
|
5061
5079
|
topOffset: Ll
|
|
5062
|
-
},
|
|
5063
|
-
wrapper:
|
|
5064
|
-
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,
|
|
5065
5083
|
errorInput: Rl,
|
|
5066
5084
|
disabled: kl,
|
|
5067
5085
|
input: Sl,
|
|
@@ -5123,11 +5141,16 @@ class Ul {
|
|
|
5123
5141
|
validator(t) {
|
|
5124
5142
|
return t ? null : le.Empty;
|
|
5125
5143
|
}
|
|
5144
|
+
filterInput(t) {
|
|
5145
|
+
return t.replace(/[^a-zA-ZÀ-ÿ\s'-]/g, "");
|
|
5146
|
+
}
|
|
5126
5147
|
handleChange(t) {
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
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();
|
|
5131
5154
|
}
|
|
5132
5155
|
toggleLabelError(t) {
|
|
5133
5156
|
return W(this, null, function* () {
|
|
@@ -5159,15 +5182,15 @@ class Ul {
|
|
|
5159
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;
|
|
5160
5183
|
}
|
|
5161
5184
|
}
|
|
5162
|
-
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 = {
|
|
5163
5186
|
wrapper: Bl,
|
|
5164
5187
|
inputContainer: zl,
|
|
5165
5188
|
errorInput: jl,
|
|
5166
5189
|
disabled: Hl,
|
|
5167
5190
|
input: Kl,
|
|
5168
5191
|
endContent: Wl,
|
|
5169
|
-
error:
|
|
5170
|
-
label:
|
|
5192
|
+
error: Yl,
|
|
5193
|
+
label: Gl,
|
|
5171
5194
|
labelError: $l,
|
|
5172
5195
|
disabledInput: ql,
|
|
5173
5196
|
hidden: Ql
|
|
@@ -5464,7 +5487,7 @@ ${m}::-ms-input-placeholder{${f}}
|
|
|
5464
5487
|
handleChange(t) {
|
|
5465
5488
|
if (this.isDisabled) return;
|
|
5466
5489
|
this.isRequired = !1, this.errorMessage = "", this.isChanged || (this.isChanged = !0);
|
|
5467
|
-
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) || "");
|
|
5468
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({
|
|
5469
5492
|
card: a,
|
|
5470
5493
|
cardType: r == null ? void 0 : r.type,
|
|
@@ -5614,16 +5637,16 @@ class vd {
|
|
|
5614
5637
|
expiryChange: new oe(),
|
|
5615
5638
|
cvcChange: new oe()
|
|
5616
5639
|
});
|
|
5617
|
-
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;
|
|
5618
5641
|
this.translate = t;
|
|
5619
5642
|
const r = t.messages();
|
|
5620
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);
|
|
5621
5644
|
const a = document.createElement("div");
|
|
5622
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) {
|
|
5623
|
-
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("");
|
|
5624
5647
|
this.placeholderStyle.textContent = `#${this.expiryId}::placeholder{${S}}#${this.cvcId}::placeholder{${S}}`, this.element.appendChild(this.placeholderStyle);
|
|
5625
5648
|
}
|
|
5626
|
-
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);
|
|
5627
5650
|
const i = document.createElement("div");
|
|
5628
5651
|
i.appendChild(this.cvcError), this.element.append(
|
|
5629
5652
|
this.expiryLabel,
|
|
@@ -5637,9 +5660,9 @@ class vd {
|
|
|
5637
5660
|
const U = this.expiryInput.value.replace(/\D/g, "");
|
|
5638
5661
|
this.handleExpiryChange(U);
|
|
5639
5662
|
}), this.expiryInput.addEventListener("paste", (N) => {
|
|
5640
|
-
var
|
|
5663
|
+
var Y;
|
|
5641
5664
|
N.preventDefault();
|
|
5642
|
-
const U = (((
|
|
5665
|
+
const U = (((Y = N.clipboardData) == null ? void 0 : Y.getData("text")) || "").replace(/\D/g, "");
|
|
5643
5666
|
this.handleExpiryChange(U);
|
|
5644
5667
|
}), this.expiryInput.addEventListener("keydown", (N) => {
|
|
5645
5668
|
this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(N.key) || N.ctrlKey || N.metaKey || /^\d$/.test(N.key) || N.preventDefault();
|
|
@@ -5648,9 +5671,9 @@ class vd {
|
|
|
5648
5671
|
const U = this.cvcInput.value.replace(/\D/g, "");
|
|
5649
5672
|
this.handleCvcChange(U);
|
|
5650
5673
|
}), this.cvcInput.addEventListener("paste", (N) => {
|
|
5651
|
-
var
|
|
5674
|
+
var Y;
|
|
5652
5675
|
N.preventDefault();
|
|
5653
|
-
const U = (((
|
|
5676
|
+
const U = (((Y = N.clipboardData) == null ? void 0 : Y.getData("text")) || "").replace(/\D/g, "");
|
|
5654
5677
|
this.handleCvcChange(U);
|
|
5655
5678
|
}), this.cvcInput.addEventListener("keydown", (N) => {
|
|
5656
5679
|
this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(N.key) || N.ctrlKey || N.metaKey || /^\d$/.test(N.key) || N.preventDefault();
|
|
@@ -5811,7 +5834,7 @@ class gd {
|
|
|
5811
5834
|
var p;
|
|
5812
5835
|
c.preventDefault();
|
|
5813
5836
|
const { cvc: l, expiry: d } = this.cardSecurity.value(), { value: u, cardType: h } = this.number.value();
|
|
5814
|
-
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({
|
|
5815
5838
|
number: u,
|
|
5816
5839
|
expiry: d,
|
|
5817
5840
|
cvc: l,
|
|
@@ -5946,6 +5969,7 @@ class wd {
|
|
|
5946
5969
|
C(this, "isLoading", !1);
|
|
5947
5970
|
C(this, "isFormOpen", !1);
|
|
5948
5971
|
C(this, "closedHeight", 0);
|
|
5972
|
+
C(this, "hasLoadedOnce", !1);
|
|
5949
5973
|
C(this, "checkout");
|
|
5950
5974
|
C(this, "container", document.createElement("div"));
|
|
5951
5975
|
C(this, "loader", new Ec());
|
|
@@ -5973,16 +5997,17 @@ class wd {
|
|
|
5973
5997
|
const e = this.config.state.checkout.getState();
|
|
5974
5998
|
(r = e.onCheckoutAttempt) == null || r.call(e, { paymentMethod: t }), this.hideError();
|
|
5975
5999
|
}), this.buttons.addEventListener("ready", () => W(this, null, function* () {
|
|
5976
|
-
var
|
|
6000
|
+
var r;
|
|
5977
6001
|
this.loader.setClassName(he.hidden);
|
|
5978
|
-
const { variant: t } = this.config.state.checkout.getState();
|
|
6002
|
+
const { variant: t, onCheckoutLoaded: e } = this.config.state.checkout.getState();
|
|
5979
6003
|
if (this.form.setDefaultVariant(t === "default"), this.buttons.showButton(), t === "default") {
|
|
5980
|
-
const
|
|
5981
|
-
|
|
5982
|
-
{ 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"] },
|
|
5983
6007
|
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
5984
|
-
).finished) != null ?
|
|
6008
|
+
).finished) != null ? r : Promise.resolve(), this.checkout.style.height = ""), this.isFormOpen = !0;
|
|
5985
6009
|
}
|
|
6010
|
+
!this.hasLoadedOnce && e && (this.hasLoadedOnce = !0, e({ success: !0 }));
|
|
5986
6011
|
})), this.buttons.addEventListener("open", () => W(this, null, function* () {
|
|
5987
6012
|
var a;
|
|
5988
6013
|
if (this.isLoading) return;
|
|
@@ -5999,15 +6024,17 @@ class wd {
|
|
|
5999
6024
|
r != null ? r : Promise.resolve()
|
|
6000
6025
|
]), e < 292 && (this.checkout.style.height = ""), this.isFormOpen = !0;
|
|
6001
6026
|
})), this.buttons.addEventListener("error", (t) => {
|
|
6002
|
-
const { onCheckoutFail: e } = this.config.state.checkout.getState(),
|
|
6003
|
-
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 = {
|
|
6004
6030
|
status: "failed",
|
|
6005
6031
|
status_reason: {
|
|
6006
6032
|
advice_code: "try_again_later",
|
|
6007
6033
|
decline_code: Ft.GENERIC_DECLINE,
|
|
6008
6034
|
message: t.message || t
|
|
6009
6035
|
}
|
|
6010
|
-
}
|
|
6036
|
+
};
|
|
6037
|
+
!this.hasLoadedOnce && r && (this.hasLoadedOnce = !0, r({ success: !1, error: s })), e == null || e(s);
|
|
6011
6038
|
}), this.buttons.addEventListener("success", (t) => {
|
|
6012
6039
|
const { clientToken: e } = this.config.state.checkout.getState();
|
|
6013
6040
|
switch (t.type) {
|
|
@@ -6031,7 +6058,7 @@ class wd {
|
|
|
6031
6058
|
let e = null;
|
|
6032
6059
|
this.closedHeight > 0 && t > this.closedHeight && (this.checkout.style.height = `${t}px`, e = (i = this.checkout.animate(
|
|
6033
6060
|
{ minHeight: [`${t}px`, `${this.closedHeight}px`] },
|
|
6034
|
-
{ duration:
|
|
6061
|
+
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
6035
6062
|
).finished) != null ? i : Promise.resolve()), yield ce(this.form.element, ke.close, ke.transition), this.form.element.classList.add(he.hidden);
|
|
6036
6063
|
const { variant: a } = this.config.state.checkout.getState();
|
|
6037
6064
|
if (a !== "default") {
|
|
@@ -6041,7 +6068,7 @@ class wd {
|
|
|
6041
6068
|
}
|
|
6042
6069
|
this.closedHeight > 0 && (e = (s = this.checkout.animate(
|
|
6043
6070
|
{ minHeight: [`${t}px`, `${this.closedHeight}px`] },
|
|
6044
|
-
{ duration:
|
|
6071
|
+
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
6045
6072
|
).finished) != null ? s : Promise.resolve(), this.checkout.style.height = "auto"), this.isFormOpen = !1;
|
|
6046
6073
|
})), this.form.addEventListener("submit", (t) => W(this, null, function* () {
|
|
6047
6074
|
if (this.isLoading || (this.form.touchSubmit(), this.hideError(), !this.form.validate())) return;
|
|
@@ -6056,7 +6083,7 @@ class wd {
|
|
|
6056
6083
|
cardBrand: t.cardBrand || "",
|
|
6057
6084
|
number: s,
|
|
6058
6085
|
cvc: o,
|
|
6059
|
-
type:
|
|
6086
|
+
type: G.CARD,
|
|
6060
6087
|
metadata: {
|
|
6061
6088
|
name: t.name,
|
|
6062
6089
|
userAgent: navigator == null ? void 0 : navigator.userAgent
|
|
@@ -6239,7 +6266,7 @@ class Ld extends At {
|
|
|
6239
6266
|
super(H(H({}, Nd), t));
|
|
6240
6267
|
}
|
|
6241
6268
|
}
|
|
6242
|
-
class
|
|
6269
|
+
class Pd extends At {
|
|
6243
6270
|
constructor(e) {
|
|
6244
6271
|
super(e || null);
|
|
6245
6272
|
C(this, "clientToken", "");
|
|
@@ -6260,7 +6287,7 @@ class xd extends At {
|
|
|
6260
6287
|
});
|
|
6261
6288
|
}
|
|
6262
6289
|
}
|
|
6263
|
-
const
|
|
6290
|
+
const xd = {
|
|
6264
6291
|
card: {
|
|
6265
6292
|
required: "يتطلب",
|
|
6266
6293
|
number: {
|
|
@@ -6948,7 +6975,7 @@ const Pd = {
|
|
|
6948
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.",
|
|
6949
6976
|
invalidSession: "La tua sessione di pagamento è scaduta. Si prega di aggiornare la pagina per continuare."
|
|
6950
6977
|
}
|
|
6951
|
-
},
|
|
6978
|
+
}, Yd = {
|
|
6952
6979
|
card: {
|
|
6953
6980
|
required: "必須",
|
|
6954
6981
|
number: {
|
|
@@ -6991,7 +7018,7 @@ const Pd = {
|
|
|
6991
7018
|
error: "お支払い方法が拒否されました。これは、残高不足、有効期限切れのお支払い情報、またはセキュリティ制限が原因である可能性があります。お支払い情報を確認するか、別のお支払い方法をお試しください。",
|
|
6992
7019
|
invalidSession: "お支払いセッションの有効期限が切れました。ページを更新して続行してください。"
|
|
6993
7020
|
}
|
|
6994
|
-
},
|
|
7021
|
+
}, Gd = {
|
|
6995
7022
|
card: {
|
|
6996
7023
|
required: "필수",
|
|
6997
7024
|
number: {
|
|
@@ -7809,7 +7836,7 @@ const Pd = {
|
|
|
7809
7836
|
invalidSession: "您的付款会话已过期。请刷新页面以继续。"
|
|
7810
7837
|
}
|
|
7811
7838
|
}, tn = {
|
|
7812
|
-
ar:
|
|
7839
|
+
ar: xd,
|
|
7813
7840
|
en: Ri,
|
|
7814
7841
|
bg: Rd,
|
|
7815
7842
|
cs: kd,
|
|
@@ -7825,8 +7852,8 @@ const Pd = {
|
|
|
7825
7852
|
hu: Hd,
|
|
7826
7853
|
id: Kd,
|
|
7827
7854
|
it: Wd,
|
|
7828
|
-
ja:
|
|
7829
|
-
ko:
|
|
7855
|
+
ja: Yd,
|
|
7856
|
+
ko: Gd,
|
|
7830
7857
|
lt: $d,
|
|
7831
7858
|
lv: qd,
|
|
7832
7859
|
ms: Qd,
|
|
@@ -8206,7 +8233,7 @@ function wu() {
|
|
|
8206
8233
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
8207
8234
|
PERFORMANCE OF THIS SOFTWARE.
|
|
8208
8235
|
***************************************************************************** */
|
|
8209
|
-
function s(b, T, E,
|
|
8236
|
+
function s(b, T, E, P) {
|
|
8210
8237
|
function D(A) {
|
|
8211
8238
|
return A instanceof E ? A : new E(function(B) {
|
|
8212
8239
|
B(A);
|
|
@@ -8215,14 +8242,14 @@ function wu() {
|
|
|
8215
8242
|
return new (E || (E = Promise))(function(A, B) {
|
|
8216
8243
|
function X(te) {
|
|
8217
8244
|
try {
|
|
8218
|
-
k(
|
|
8245
|
+
k(P.next(te));
|
|
8219
8246
|
} catch (ye) {
|
|
8220
8247
|
B(ye);
|
|
8221
8248
|
}
|
|
8222
8249
|
}
|
|
8223
8250
|
function ie(te) {
|
|
8224
8251
|
try {
|
|
8225
|
-
k(
|
|
8252
|
+
k(P.throw(te));
|
|
8226
8253
|
} catch (ye) {
|
|
8227
8254
|
B(ye);
|
|
8228
8255
|
}
|
|
@@ -8230,14 +8257,14 @@ function wu() {
|
|
|
8230
8257
|
function k(te) {
|
|
8231
8258
|
te.done ? A(te.value) : D(te.value).then(X, ie);
|
|
8232
8259
|
}
|
|
8233
|
-
k((
|
|
8260
|
+
k((P = P.apply(b, [])).next());
|
|
8234
8261
|
});
|
|
8235
8262
|
}
|
|
8236
8263
|
function o(b, T) {
|
|
8237
8264
|
var E = { label: 0, sent: function() {
|
|
8238
8265
|
if (A[0] & 1) throw A[1];
|
|
8239
8266
|
return A[1];
|
|
8240
|
-
}, trys: [], ops: [] },
|
|
8267
|
+
}, trys: [], ops: [] }, P, D, A, B;
|
|
8241
8268
|
return B = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (B[Symbol.iterator] = function() {
|
|
8242
8269
|
return this;
|
|
8243
8270
|
}), B;
|
|
@@ -8247,9 +8274,9 @@ function wu() {
|
|
|
8247
8274
|
};
|
|
8248
8275
|
}
|
|
8249
8276
|
function ie(k) {
|
|
8250
|
-
if (
|
|
8277
|
+
if (P) throw new TypeError("Generator is already executing.");
|
|
8251
8278
|
for (; E; ) try {
|
|
8252
|
-
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;
|
|
8253
8280
|
switch (D = 0, A && (k = [k[0] & 2, A.value]), k[0]) {
|
|
8254
8281
|
case 0:
|
|
8255
8282
|
case 1:
|
|
@@ -8287,7 +8314,7 @@ function wu() {
|
|
|
8287
8314
|
} catch (te) {
|
|
8288
8315
|
k = [6, te], D = 0;
|
|
8289
8316
|
} finally {
|
|
8290
|
-
|
|
8317
|
+
P = A = 0;
|
|
8291
8318
|
}
|
|
8292
8319
|
if (k[0] & 5) throw k[1];
|
|
8293
8320
|
return { value: k[0] ? k[1] : void 0, done: !0 };
|
|
@@ -8298,17 +8325,17 @@ function wu() {
|
|
|
8298
8325
|
var T, E = JSON.stringify(b);
|
|
8299
8326
|
if (!b.forceScriptReload && (T = l[E], T))
|
|
8300
8327
|
return T;
|
|
8301
|
-
var
|
|
8302
|
-
return
|
|
8303
|
-
|
|
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]));
|
|
8304
8331
|
}), T = new Promise(function(B, X) {
|
|
8305
|
-
|
|
8306
|
-
B(
|
|
8307
|
-
}),
|
|
8332
|
+
P.addEventListener("load", function() {
|
|
8333
|
+
B(P);
|
|
8334
|
+
}), P.addEventListener("error", function() {
|
|
8308
8335
|
X(new Error("".concat(b.src, " failed to load.")));
|
|
8309
|
-
}),
|
|
8336
|
+
}), P.addEventListener("abort", function() {
|
|
8310
8337
|
X(new Error("".concat(b.src, " has aborted.")));
|
|
8311
|
-
}), A.appendChild(
|
|
8338
|
+
}), A.appendChild(P);
|
|
8312
8339
|
}), l[E] = T, T;
|
|
8313
8340
|
}
|
|
8314
8341
|
d.clearCache = function() {
|
|
@@ -8319,8 +8346,8 @@ function wu() {
|
|
|
8319
8346
|
if (E)
|
|
8320
8347
|
return Promise.resolve(E);
|
|
8321
8348
|
E = document.createElement("link");
|
|
8322
|
-
var
|
|
8323
|
-
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);
|
|
8324
8351
|
};
|
|
8325
8352
|
Object.defineProperty(c, "__esModule", { value: !0 }), c.loadStylesheet = f = c.loadScript = void 0;
|
|
8326
8353
|
var p = u, f = c.loadScript = p, m = h;
|
|
@@ -8333,7 +8360,7 @@ function wu() {
|
|
|
8333
8360
|
AXO_ASSET_PATH: O,
|
|
8334
8361
|
LOCALE_PATH: L,
|
|
8335
8362
|
CDNX_PROD: v
|
|
8336
|
-
},
|
|
8363
|
+
}, x = {
|
|
8337
8364
|
BT: "BT",
|
|
8338
8365
|
PPCP: "PPCP"
|
|
8339
8366
|
};
|
|
@@ -8344,26 +8371,26 @@ function wu() {
|
|
|
8344
8371
|
return N() && typeof window.requirejs == "function" && typeof window.requirejs.config == "function";
|
|
8345
8372
|
}
|
|
8346
8373
|
function U(b, T, E) {
|
|
8347
|
-
var
|
|
8374
|
+
var P, D;
|
|
8348
8375
|
return E === void 0 && (E = !0), s(this, void 0, void 0, function() {
|
|
8349
8376
|
var A, B;
|
|
8350
8377
|
return o(this, function(X) {
|
|
8351
|
-
if (A =
|
|
8352
|
-
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)
|
|
8353
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));
|
|
8354
8381
|
return [2, !0];
|
|
8355
8382
|
}
|
|
8356
8383
|
if (!T)
|
|
8357
8384
|
throw new Error("Attempted to load ".concat(b.module, " without specifying version"));
|
|
8358
|
-
return [2,
|
|
8385
|
+
return [2, Y(b, T, E)];
|
|
8359
8386
|
});
|
|
8360
8387
|
});
|
|
8361
8388
|
}
|
|
8362
|
-
function
|
|
8389
|
+
function Y(b, T, E) {
|
|
8363
8390
|
if (E === void 0 && (E = !0), N()) {
|
|
8364
|
-
var
|
|
8391
|
+
var P = E ? b.amdModule.minified : b.amdModule.unminified;
|
|
8365
8392
|
return new Promise(function(A, B) {
|
|
8366
|
-
window.require([
|
|
8393
|
+
window.require([P], A, B);
|
|
8367
8394
|
});
|
|
8368
8395
|
}
|
|
8369
8396
|
var D = E ? b.script.minified : b.script.unminified;
|
|
@@ -8372,13 +8399,13 @@ function wu() {
|
|
|
8372
8399
|
src: "https://js.braintreegateway.com/web/".concat(T, "/js/").concat(D)
|
|
8373
8400
|
});
|
|
8374
8401
|
}
|
|
8375
|
-
function
|
|
8402
|
+
function $() {
|
|
8376
8403
|
return window == null ? void 0 : window.braintree;
|
|
8377
8404
|
}
|
|
8378
8405
|
var F, z, j = {
|
|
8379
8406
|
Client: "client",
|
|
8380
8407
|
HostedCardFields: "hostedFields"
|
|
8381
|
-
}, 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] = {
|
|
8382
8409
|
id: "client",
|
|
8383
8410
|
module: j.Client,
|
|
8384
8411
|
amdModule: {
|
|
@@ -8403,21 +8430,21 @@ function wu() {
|
|
|
8403
8430
|
}, z);
|
|
8404
8431
|
function K(b) {
|
|
8405
8432
|
return s(this, void 0, void 0, function() {
|
|
8406
|
-
var T, E,
|
|
8433
|
+
var T, E, P, D;
|
|
8407
8434
|
return o(this, function(A) {
|
|
8408
8435
|
switch (A.label) {
|
|
8409
8436
|
case 0:
|
|
8410
|
-
return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified,
|
|
8411
|
-
U(
|
|
8412
|
-
_(
|
|
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)
|
|
8413
8440
|
])];
|
|
8414
8441
|
case 1:
|
|
8415
8442
|
return A.sent(), [3, 5];
|
|
8416
8443
|
case 2:
|
|
8417
|
-
return b.platform !==
|
|
8418
|
-
U(
|
|
8419
|
-
U(
|
|
8420
|
-
_(
|
|
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)
|
|
8421
8448
|
])];
|
|
8422
8449
|
case 3:
|
|
8423
8450
|
return A.sent(), [3, 5];
|
|
@@ -8435,9 +8462,9 @@ function wu() {
|
|
|
8435
8462
|
S() && requirejs.config({
|
|
8436
8463
|
paths: (E = {}, E[w] = b, E)
|
|
8437
8464
|
});
|
|
8438
|
-
var
|
|
8465
|
+
var P = "".concat(w, "/").concat(T ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified);
|
|
8439
8466
|
return new Promise(function(D, A) {
|
|
8440
|
-
window.require([
|
|
8467
|
+
window.require([P], D, A);
|
|
8441
8468
|
});
|
|
8442
8469
|
}
|
|
8443
8470
|
return f({
|
|
@@ -8451,9 +8478,9 @@ function wu() {
|
|
|
8451
8478
|
return E ? "https://cdn-".concat(E, ".static.engineering.dev.paypalinc.com/").concat(T) : "".concat(I.CDNX_PROD, "/").concat(T);
|
|
8452
8479
|
}
|
|
8453
8480
|
function R(b) {
|
|
8454
|
-
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");
|
|
8455
8482
|
return g({
|
|
8456
|
-
assetUrl:
|
|
8483
|
+
assetUrl: P,
|
|
8457
8484
|
bundleId: (T = b == null ? void 0 : b.metadata) === null || T === void 0 ? void 0 : T.bundleIdOverride
|
|
8458
8485
|
});
|
|
8459
8486
|
}
|
|
@@ -8467,10 +8494,10 @@ function wu() {
|
|
|
8467
8494
|
i.constants = I, i.loadAxo = K;
|
|
8468
8495
|
});
|
|
8469
8496
|
}, {}], 9: [function(e, r, a) {
|
|
8470
|
-
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 = {};
|
|
8471
8498
|
function z(M) {
|
|
8472
|
-
var
|
|
8473
|
-
if (M = M || {},
|
|
8499
|
+
var q, K;
|
|
8500
|
+
if (M = M || {}, q = JSON.stringify(M), K = M.gatewayConfiguration, !K)
|
|
8474
8501
|
throw new l(O.CLIENT_MISSING_GATEWAY_CONFIGURATION);
|
|
8475
8502
|
if (["assetsUrl", "clientApiUrl", "configUrl"].forEach(function(_) {
|
|
8476
8503
|
if (_ in K && !c(K[_]))
|
|
@@ -8480,7 +8507,7 @@ function wu() {
|
|
|
8480
8507
|
message: _ + " property is on an invalid domain."
|
|
8481
8508
|
});
|
|
8482
8509
|
}), this.getConfiguration = function() {
|
|
8483
|
-
return JSON.parse(
|
|
8510
|
+
return JSON.parse(q);
|
|
8484
8511
|
}, this._request = o, this._configuration = this.getConfiguration(), this._clientApiBaseUrl = K.clientApiUrl + "/v1/", K.graphQL) {
|
|
8485
8512
|
if (!c(K.graphQL.url))
|
|
8486
8513
|
throw new l({
|
|
@@ -8494,7 +8521,7 @@ function wu() {
|
|
|
8494
8521
|
}
|
|
8495
8522
|
}
|
|
8496
8523
|
z.initialize = function(M) {
|
|
8497
|
-
var
|
|
8524
|
+
var q, K, _ = F[M.authorization];
|
|
8498
8525
|
if (_)
|
|
8499
8526
|
return w.sendEvent(_, "custom.client.load.cached"), _;
|
|
8500
8527
|
try {
|
|
@@ -8506,18 +8533,18 @@ function wu() {
|
|
|
8506
8533
|
}
|
|
8507
8534
|
return _ = u(K, M.sessionId).then(
|
|
8508
8535
|
function(g) {
|
|
8509
|
-
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;
|
|
8510
8537
|
}
|
|
8511
8538
|
), F[M.authorization] = _, w.sendEvent(_, "custom.client.load.initialized"), _.then(function(g) {
|
|
8512
|
-
return w.sendEvent(
|
|
8539
|
+
return w.sendEvent(q, "custom.client.load.succeeded"), g;
|
|
8513
8540
|
}).catch(function(g) {
|
|
8514
8541
|
return delete F[M.authorization], Promise.reject(g);
|
|
8515
8542
|
});
|
|
8516
8543
|
}, z.clearCache = function() {
|
|
8517
8544
|
F = {};
|
|
8518
8545
|
}, z.prototype._findOrCreateFraudnetJSON = function(M) {
|
|
8519
|
-
var
|
|
8520
|
-
|
|
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(), _ = {
|
|
8521
8548
|
rda_tenant: "bt_card",
|
|
8522
8549
|
// eslint-disable-line camelcase
|
|
8523
8550
|
mid: K.gatewayConfiguration.merchantId
|
|
@@ -8528,11 +8555,11 @@ function wu() {
|
|
|
8528
8555
|
f: M.substr(0, 32),
|
|
8529
8556
|
fp: _,
|
|
8530
8557
|
bu: !1,
|
|
8531
|
-
s:
|
|
8532
|
-
},
|
|
8533
|
-
}, z.prototype.request = function(M,
|
|
8558
|
+
s: Y
|
|
8559
|
+
}, q.text = JSON.stringify(R);
|
|
8560
|
+
}, z.prototype.request = function(M, q) {
|
|
8534
8561
|
var K = this, _ = new Promise(function(g, R) {
|
|
8535
|
-
var V, b, T, E,
|
|
8562
|
+
var V, b, T, E, P = !!(M.endpoint === "payment_methods/credit_cards" && K.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);
|
|
8536
8563
|
if (M.api !== "graphQLApi" && (M.method ? M.endpoint || (V = "options.endpoint") : V = "options.method"), V)
|
|
8537
8564
|
throw new l({
|
|
8538
8565
|
type: O.CLIENT_OPTION_REQUIRED.type,
|
|
@@ -8588,26 +8615,26 @@ function wu() {
|
|
|
8588
8615
|
);
|
|
8589
8616
|
return;
|
|
8590
8617
|
}
|
|
8591
|
-
X = y({ _httpStatus: B }, A),
|
|
8592
|
-
src:
|
|
8618
|
+
X = y({ _httpStatus: B }, A), P && X.creditCards && X.creditCards.length > 0 && (K._findOrCreateFraudnetJSON(X.creditCards[0].nonce), S.loadScript({
|
|
8619
|
+
src: $,
|
|
8593
8620
|
forceScriptReload: !0
|
|
8594
8621
|
})), g(X);
|
|
8595
8622
|
});
|
|
8596
8623
|
});
|
|
8597
|
-
if (typeof
|
|
8598
|
-
|
|
8599
|
-
|
|
8624
|
+
if (typeof q == "function") {
|
|
8625
|
+
q = m(v(q)), _.then(function(g) {
|
|
8626
|
+
q(null, g, g._httpStatus);
|
|
8600
8627
|
}).catch(function(g) {
|
|
8601
8628
|
var R = g && g.details && g.details.httpStatus;
|
|
8602
|
-
|
|
8629
|
+
q(g, null, R);
|
|
8603
8630
|
});
|
|
8604
8631
|
return;
|
|
8605
8632
|
}
|
|
8606
8633
|
return _;
|
|
8607
8634
|
};
|
|
8608
|
-
function j(M,
|
|
8635
|
+
function j(M, q) {
|
|
8609
8636
|
var K;
|
|
8610
|
-
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, {
|
|
8611
8638
|
type: O.CLIENT_REQUEST_ERROR.type,
|
|
8612
8639
|
code: O.CLIENT_REQUEST_ERROR.code,
|
|
8613
8640
|
message: O.CLIENT_REQUEST_ERROR.message
|
|
@@ -8620,12 +8647,12 @@ function wu() {
|
|
|
8620
8647
|
return L;
|
|
8621
8648
|
}, z.prototype.teardown = f(function() {
|
|
8622
8649
|
var M = this;
|
|
8623
|
-
return delete F[M.getConfiguration().authorization], N(M,
|
|
8650
|
+
return delete F[M.getConfiguration().authorization], N(M, x(z.prototype)), Promise.resolve();
|
|
8624
8651
|
});
|
|
8625
8652
|
function ee(M) {
|
|
8626
|
-
var
|
|
8653
|
+
var q = M.authorizationFingerprint || M.authorization;
|
|
8627
8654
|
return {
|
|
8628
|
-
Authorization: "Bearer " +
|
|
8655
|
+
Authorization: "Bearer " + q,
|
|
8629
8656
|
"Braintree-Version": i
|
|
8630
8657
|
};
|
|
8631
8658
|
}
|
|
@@ -8699,7 +8726,7 @@ function wu() {
|
|
|
8699
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;
|
|
8700
8727
|
function m(v, y) {
|
|
8701
8728
|
return new Promise(function(w, O) {
|
|
8702
|
-
var L, I,
|
|
8729
|
+
var L, I, x, N, S = y || c(), U = {
|
|
8703
8730
|
merchantAppId: window.location.host,
|
|
8704
8731
|
platform: l.PLATFORM,
|
|
8705
8732
|
sdkVersion: l.VERSION,
|
|
@@ -8709,8 +8736,8 @@ function wu() {
|
|
|
8709
8736
|
integrationType: l.INTEGRATION,
|
|
8710
8737
|
sessionId: S
|
|
8711
8738
|
};
|
|
8712
|
-
I = v.attrs,
|
|
8713
|
-
url:
|
|
8739
|
+
I = v.attrs, x = v.configUrl, I._meta = U, I.braintreeLibraryVersion = l.BRAINTREE_LIBRARY_VERSION, I.configVersion = "3", N = {
|
|
8740
|
+
url: x,
|
|
8714
8741
|
method: "GET",
|
|
8715
8742
|
data: I
|
|
8716
8743
|
}, I.authorizationFingerprint && v.graphQL ? (p(v.graphQL.date, f) && (N.graphQL = new u({
|
|
@@ -8723,16 +8750,16 @@ function wu() {
|
|
|
8723
8750
|
url: h[v.environment],
|
|
8724
8751
|
features: ["configuration"]
|
|
8725
8752
|
}
|
|
8726
|
-
}), N.metadata = U), o(N, function(
|
|
8753
|
+
}), N.metadata = U), o(N, function(Y, $, F) {
|
|
8727
8754
|
var z;
|
|
8728
|
-
if (
|
|
8755
|
+
if (Y) {
|
|
8729
8756
|
F === 403 ? z = d.CLIENT_AUTHORIZATION_INSUFFICIENT : F === 401 ? z = d.CLIENT_AUTHORIZATION_INVALID : z = d.CLIENT_GATEWAY_NETWORK, O(
|
|
8730
8757
|
new i({
|
|
8731
8758
|
type: z.type,
|
|
8732
8759
|
code: z.code,
|
|
8733
8760
|
message: z.message,
|
|
8734
8761
|
details: {
|
|
8735
|
-
originalError:
|
|
8762
|
+
originalError: Y
|
|
8736
8763
|
}
|
|
8737
8764
|
})
|
|
8738
8765
|
);
|
|
@@ -8742,7 +8769,7 @@ function wu() {
|
|
|
8742
8769
|
authorizationType: I.tokenizationKey ? "TOKENIZATION_KEY" : "CLIENT_TOKEN",
|
|
8743
8770
|
authorizationFingerprint: I.authorizationFingerprint,
|
|
8744
8771
|
analyticsMetadata: U,
|
|
8745
|
-
gatewayConfiguration:
|
|
8772
|
+
gatewayConfiguration: $
|
|
8746
8773
|
}, w(L);
|
|
8747
8774
|
});
|
|
8748
8775
|
});
|
|
@@ -8779,50 +8806,50 @@ function wu() {
|
|
|
8779
8806
|
return L === "UNKNOWN" || L === "INTERNAL";
|
|
8780
8807
|
}
|
|
8781
8808
|
function y(O, L, I) {
|
|
8782
|
-
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));
|
|
8783
8810
|
O.headers = s(
|
|
8784
8811
|
{ "Content-Type": "application/json" },
|
|
8785
8812
|
O.headers
|
|
8786
|
-
), 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() {
|
|
8787
8814
|
if (M.readyState === 4) {
|
|
8788
8815
|
if (M.status === 0 && K) {
|
|
8789
8816
|
delete O.graphQL, y(O, L, I);
|
|
8790
8817
|
return;
|
|
8791
8818
|
}
|
|
8792
|
-
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) {
|
|
8793
8820
|
if (K && v(F)) {
|
|
8794
8821
|
delete O.graphQL, y(O, L, I);
|
|
8795
8822
|
return;
|
|
8796
8823
|
}
|
|
8797
|
-
if (L < p && m(
|
|
8824
|
+
if (L < p && m(x)) {
|
|
8798
8825
|
L++, y(O, L, I);
|
|
8799
8826
|
return;
|
|
8800
8827
|
}
|
|
8801
|
-
|
|
8828
|
+
q(N || "error", null, x || 500);
|
|
8802
8829
|
} else
|
|
8803
|
-
|
|
8830
|
+
q(null, N, x);
|
|
8804
8831
|
}
|
|
8805
|
-
} : (O.headers && (z = i.queryify(z,
|
|
8806
|
-
|
|
8832
|
+
} : (O.headers && (z = i.queryify(z, $)), M.onload = function() {
|
|
8833
|
+
q(null, c(M.responseText), M.status);
|
|
8807
8834
|
}, M.onerror = function() {
|
|
8808
|
-
|
|
8835
|
+
q("error", null, 500);
|
|
8809
8836
|
}, M.onprogress = function() {
|
|
8810
8837
|
}, M.ontimeout = function() {
|
|
8811
|
-
|
|
8838
|
+
q("timeout", null, -1);
|
|
8812
8839
|
});
|
|
8813
8840
|
try {
|
|
8814
|
-
M.open(
|
|
8841
|
+
M.open(Y, z, !0);
|
|
8815
8842
|
} catch (_) {
|
|
8816
8843
|
if (!K)
|
|
8817
8844
|
throw _;
|
|
8818
8845
|
delete O.graphQL, y(O, L, I);
|
|
8819
8846
|
return;
|
|
8820
8847
|
}
|
|
8821
|
-
M.timeout = ee, d && Object.keys(
|
|
8822
|
-
M.setRequestHeader(_,
|
|
8848
|
+
M.timeout = ee, d && Object.keys($).forEach(function(_) {
|
|
8849
|
+
M.setRequestHeader(_, $[_]);
|
|
8823
8850
|
});
|
|
8824
8851
|
try {
|
|
8825
|
-
M.send(o(
|
|
8852
|
+
M.send(o(Y, U));
|
|
8826
8853
|
} catch (_) {
|
|
8827
8854
|
}
|
|
8828
8855
|
}
|
|
@@ -9307,8 +9334,8 @@ function wu() {
|
|
|
9307
9334
|
},
|
|
9308
9335
|
configuration: p
|
|
9309
9336
|
}, v = {
|
|
9310
|
-
"payment_methods/credit_cards": function(L, I,
|
|
9311
|
-
return
|
|
9337
|
+
"payment_methods/credit_cards": function(L, I, x) {
|
|
9338
|
+
return x ? u(L, I) : d(L, I);
|
|
9312
9339
|
},
|
|
9313
9340
|
configuration: f
|
|
9314
9341
|
};
|
|
@@ -9327,11 +9354,11 @@ function wu() {
|
|
|
9327
9354
|
L,
|
|
9328
9355
|
// Since this is used for all GQL requests, we only want this if it's a Fastlane Tokenization request
|
|
9329
9356
|
c(this._data.creditCard)
|
|
9330
|
-
),
|
|
9357
|
+
), x = s(
|
|
9331
9358
|
{ clientSdkMetadata: this._clientSdkMetadata },
|
|
9332
9359
|
I
|
|
9333
9360
|
);
|
|
9334
|
-
return JSON.stringify(
|
|
9361
|
+
return JSON.stringify(x);
|
|
9335
9362
|
}, y.prototype.getMethod = function() {
|
|
9336
9363
|
return "POST";
|
|
9337
9364
|
}, y.prototype.getHeaders = function() {
|
|
@@ -9348,17 +9375,17 @@ function wu() {
|
|
|
9348
9375
|
"creditCard" in this._data && c(this._data.creditCard)
|
|
9349
9376
|
);
|
|
9350
9377
|
}, y.prototype.determineStatus = function(L, I) {
|
|
9351
|
-
var
|
|
9352
|
-
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;
|
|
9353
9380
|
};
|
|
9354
9381
|
function w(L, I) {
|
|
9355
9382
|
return !L && I.errors[0].message;
|
|
9356
9383
|
}
|
|
9357
9384
|
function O(L) {
|
|
9358
9385
|
var I = {};
|
|
9359
|
-
return Object.keys(L).forEach(function(
|
|
9360
|
-
var N = o(
|
|
9361
|
-
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];
|
|
9362
9389
|
}), I;
|
|
9363
9390
|
}
|
|
9364
9391
|
r.exports = y;
|
|
@@ -9435,11 +9462,11 @@ function wu() {
|
|
|
9435
9462
|
function l(u, h, p, f) {
|
|
9436
9463
|
var m = Date.now();
|
|
9437
9464
|
return p.flow === "vault" ? p.context_type = "BA_Token" : p.flow === "checkout" && (p.context_type = "EC_Token"), Promise.resolve(u).then(function(v) {
|
|
9438
|
-
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 = {
|
|
9439
9466
|
events: [],
|
|
9440
9467
|
tracking: []
|
|
9441
|
-
}, N = s.addEventMetadata(v,
|
|
9442
|
-
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 = [
|
|
9443
9470
|
{
|
|
9444
9471
|
level: "info",
|
|
9445
9472
|
event: O,
|
|
@@ -9451,11 +9478,11 @@ function wu() {
|
|
|
9451
9478
|
p
|
|
9452
9479
|
)
|
|
9453
9480
|
}
|
|
9454
|
-
],
|
|
9481
|
+
], x.tracking = [N], p && typeof p == "object" && (x.tracking = [d(N, p)]), y(
|
|
9455
9482
|
{
|
|
9456
9483
|
url: w,
|
|
9457
9484
|
method: "post",
|
|
9458
|
-
data:
|
|
9485
|
+
data: x,
|
|
9459
9486
|
timeout: i.ANALYTICS_REQUEST_TIMEOUT_MS
|
|
9460
9487
|
},
|
|
9461
9488
|
f
|
|
@@ -9875,7 +9902,7 @@ function Ou() {
|
|
|
9875
9902
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
9876
9903
|
PERFORMANCE OF THIS SOFTWARE.
|
|
9877
9904
|
***************************************************************************** */
|
|
9878
|
-
function s(b, T, E,
|
|
9905
|
+
function s(b, T, E, P) {
|
|
9879
9906
|
function D(A) {
|
|
9880
9907
|
return A instanceof E ? A : new E(function(B) {
|
|
9881
9908
|
B(A);
|
|
@@ -9884,14 +9911,14 @@ function Ou() {
|
|
|
9884
9911
|
return new (E || (E = Promise))(function(A, B) {
|
|
9885
9912
|
function X(te) {
|
|
9886
9913
|
try {
|
|
9887
|
-
k(
|
|
9914
|
+
k(P.next(te));
|
|
9888
9915
|
} catch (ye) {
|
|
9889
9916
|
B(ye);
|
|
9890
9917
|
}
|
|
9891
9918
|
}
|
|
9892
9919
|
function ie(te) {
|
|
9893
9920
|
try {
|
|
9894
|
-
k(
|
|
9921
|
+
k(P.throw(te));
|
|
9895
9922
|
} catch (ye) {
|
|
9896
9923
|
B(ye);
|
|
9897
9924
|
}
|
|
@@ -9899,14 +9926,14 @@ function Ou() {
|
|
|
9899
9926
|
function k(te) {
|
|
9900
9927
|
te.done ? A(te.value) : D(te.value).then(X, ie);
|
|
9901
9928
|
}
|
|
9902
|
-
k((
|
|
9929
|
+
k((P = P.apply(b, [])).next());
|
|
9903
9930
|
});
|
|
9904
9931
|
}
|
|
9905
9932
|
function o(b, T) {
|
|
9906
9933
|
var E = { label: 0, sent: function() {
|
|
9907
9934
|
if (A[0] & 1) throw A[1];
|
|
9908
9935
|
return A[1];
|
|
9909
|
-
}, trys: [], ops: [] },
|
|
9936
|
+
}, trys: [], ops: [] }, P, D, A, B;
|
|
9910
9937
|
return B = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (B[Symbol.iterator] = function() {
|
|
9911
9938
|
return this;
|
|
9912
9939
|
}), B;
|
|
@@ -9916,9 +9943,9 @@ function Ou() {
|
|
|
9916
9943
|
};
|
|
9917
9944
|
}
|
|
9918
9945
|
function ie(k) {
|
|
9919
|
-
if (
|
|
9946
|
+
if (P) throw new TypeError("Generator is already executing.");
|
|
9920
9947
|
for (; E; ) try {
|
|
9921
|
-
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;
|
|
9922
9949
|
switch (D = 0, A && (k = [k[0] & 2, A.value]), k[0]) {
|
|
9923
9950
|
case 0:
|
|
9924
9951
|
case 1:
|
|
@@ -9956,7 +9983,7 @@ function Ou() {
|
|
|
9956
9983
|
} catch (te) {
|
|
9957
9984
|
k = [6, te], D = 0;
|
|
9958
9985
|
} finally {
|
|
9959
|
-
|
|
9986
|
+
P = A = 0;
|
|
9960
9987
|
}
|
|
9961
9988
|
if (k[0] & 5) throw k[1];
|
|
9962
9989
|
return { value: k[0] ? k[1] : void 0, done: !0 };
|
|
@@ -9967,17 +9994,17 @@ function Ou() {
|
|
|
9967
9994
|
var T, E = JSON.stringify(b);
|
|
9968
9995
|
if (!b.forceScriptReload && (T = l[E], T))
|
|
9969
9996
|
return T;
|
|
9970
|
-
var
|
|
9971
|
-
return
|
|
9972
|
-
|
|
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]));
|
|
9973
10000
|
}), T = new Promise(function(B, X) {
|
|
9974
|
-
|
|
9975
|
-
B(
|
|
9976
|
-
}),
|
|
10001
|
+
P.addEventListener("load", function() {
|
|
10002
|
+
B(P);
|
|
10003
|
+
}), P.addEventListener("error", function() {
|
|
9977
10004
|
X(new Error("".concat(b.src, " failed to load.")));
|
|
9978
|
-
}),
|
|
10005
|
+
}), P.addEventListener("abort", function() {
|
|
9979
10006
|
X(new Error("".concat(b.src, " has aborted.")));
|
|
9980
|
-
}), A.appendChild(
|
|
10007
|
+
}), A.appendChild(P);
|
|
9981
10008
|
}), l[E] = T, T;
|
|
9982
10009
|
}
|
|
9983
10010
|
d.clearCache = function() {
|
|
@@ -9988,8 +10015,8 @@ function Ou() {
|
|
|
9988
10015
|
if (E)
|
|
9989
10016
|
return Promise.resolve(E);
|
|
9990
10017
|
E = document.createElement("link");
|
|
9991
|
-
var
|
|
9992
|
-
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);
|
|
9993
10020
|
};
|
|
9994
10021
|
Object.defineProperty(c, "__esModule", { value: !0 }), c.loadStylesheet = f = c.loadScript = void 0;
|
|
9995
10022
|
var p = u, f = c.loadScript = p, m = h;
|
|
@@ -10002,7 +10029,7 @@ function Ou() {
|
|
|
10002
10029
|
AXO_ASSET_PATH: O,
|
|
10003
10030
|
LOCALE_PATH: L,
|
|
10004
10031
|
CDNX_PROD: v
|
|
10005
|
-
},
|
|
10032
|
+
}, x = {
|
|
10006
10033
|
BT: "BT",
|
|
10007
10034
|
PPCP: "PPCP"
|
|
10008
10035
|
};
|
|
@@ -10013,26 +10040,26 @@ function Ou() {
|
|
|
10013
10040
|
return N() && typeof window.requirejs == "function" && typeof window.requirejs.config == "function";
|
|
10014
10041
|
}
|
|
10015
10042
|
function U(b, T, E) {
|
|
10016
|
-
var
|
|
10043
|
+
var P, D;
|
|
10017
10044
|
return E === void 0 && (E = !0), s(this, void 0, void 0, function() {
|
|
10018
10045
|
var A, B;
|
|
10019
10046
|
return o(this, function(X) {
|
|
10020
|
-
if (A =
|
|
10021
|
-
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)
|
|
10022
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));
|
|
10023
10050
|
return [2, !0];
|
|
10024
10051
|
}
|
|
10025
10052
|
if (!T)
|
|
10026
10053
|
throw new Error("Attempted to load ".concat(b.module, " without specifying version"));
|
|
10027
|
-
return [2,
|
|
10054
|
+
return [2, Y(b, T, E)];
|
|
10028
10055
|
});
|
|
10029
10056
|
});
|
|
10030
10057
|
}
|
|
10031
|
-
function
|
|
10058
|
+
function Y(b, T, E) {
|
|
10032
10059
|
if (E === void 0 && (E = !0), N()) {
|
|
10033
|
-
var
|
|
10060
|
+
var P = E ? b.amdModule.minified : b.amdModule.unminified;
|
|
10034
10061
|
return new Promise(function(A, B) {
|
|
10035
|
-
window.require([
|
|
10062
|
+
window.require([P], A, B);
|
|
10036
10063
|
});
|
|
10037
10064
|
}
|
|
10038
10065
|
var D = E ? b.script.minified : b.script.unminified;
|
|
@@ -10041,13 +10068,13 @@ function Ou() {
|
|
|
10041
10068
|
src: "https://js.braintreegateway.com/web/".concat(T, "/js/").concat(D)
|
|
10042
10069
|
});
|
|
10043
10070
|
}
|
|
10044
|
-
function
|
|
10071
|
+
function $() {
|
|
10045
10072
|
return window == null ? void 0 : window.braintree;
|
|
10046
10073
|
}
|
|
10047
10074
|
var F, z, j = {
|
|
10048
10075
|
Client: "client",
|
|
10049
10076
|
HostedCardFields: "hostedFields"
|
|
10050
|
-
}, 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] = {
|
|
10051
10078
|
id: "client",
|
|
10052
10079
|
module: j.Client,
|
|
10053
10080
|
amdModule: {
|
|
@@ -10072,21 +10099,21 @@ function Ou() {
|
|
|
10072
10099
|
}, z);
|
|
10073
10100
|
function K(b) {
|
|
10074
10101
|
return s(this, void 0, void 0, function() {
|
|
10075
|
-
var T, E,
|
|
10102
|
+
var T, E, P, D;
|
|
10076
10103
|
return o(this, function(A) {
|
|
10077
10104
|
switch (A.label) {
|
|
10078
10105
|
case 0:
|
|
10079
|
-
return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified,
|
|
10080
|
-
U(
|
|
10081
|
-
_(
|
|
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)
|
|
10082
10109
|
])];
|
|
10083
10110
|
case 1:
|
|
10084
10111
|
return A.sent(), [3, 5];
|
|
10085
10112
|
case 2:
|
|
10086
|
-
return b.platform !==
|
|
10087
|
-
U(
|
|
10088
|
-
U(
|
|
10089
|
-
_(
|
|
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)
|
|
10090
10117
|
])];
|
|
10091
10118
|
case 3:
|
|
10092
10119
|
return A.sent(), [3, 5];
|
|
@@ -10104,9 +10131,9 @@ function Ou() {
|
|
|
10104
10131
|
S() && requirejs.config({
|
|
10105
10132
|
paths: (E = {}, E[w] = b, E)
|
|
10106
10133
|
});
|
|
10107
|
-
var
|
|
10134
|
+
var P = "".concat(w, "/").concat(T ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified);
|
|
10108
10135
|
return new Promise(function(D, A) {
|
|
10109
|
-
window.require([
|
|
10136
|
+
window.require([P], D, A);
|
|
10110
10137
|
});
|
|
10111
10138
|
}
|
|
10112
10139
|
return f({
|
|
@@ -10120,9 +10147,9 @@ function Ou() {
|
|
|
10120
10147
|
return E ? "https://cdn-".concat(E, ".static.engineering.dev.paypalinc.com/").concat(T) : "".concat(I.CDNX_PROD, "/").concat(T);
|
|
10121
10148
|
}
|
|
10122
10149
|
function R(b) {
|
|
10123
|
-
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");
|
|
10124
10151
|
return g({
|
|
10125
|
-
assetUrl:
|
|
10152
|
+
assetUrl: P,
|
|
10126
10153
|
bundleId: (T = b == null ? void 0 : b.metadata) === null || T === void 0 ? void 0 : T.bundleIdOverride
|
|
10127
10154
|
});
|
|
10128
10155
|
}
|
|
@@ -10180,13 +10207,13 @@ function Ou() {
|
|
|
10180
10207
|
return "https://b.stats.paypal.com/counter.cgi?i=127.0.0.1&p=" + y + "&t=" + w + "&a=14";
|
|
10181
10208
|
}
|
|
10182
10209
|
function v(y, w, O, L) {
|
|
10183
|
-
var I = document.body.appendChild(document.createElement("script")),
|
|
10210
|
+
var I = document.body.appendChild(document.createElement("script")), x = {
|
|
10184
10211
|
f: y,
|
|
10185
10212
|
s,
|
|
10186
10213
|
b: w,
|
|
10187
10214
|
cb1: L
|
|
10188
10215
|
};
|
|
10189
|
-
return O !== "production" && (
|
|
10216
|
+
return O !== "production" && (x.sandbox = !0), I.type = "application/json", I.setAttribute("fncls", i), I.text = JSON.stringify(x), I;
|
|
10190
10217
|
}
|
|
10191
10218
|
r.exports = {
|
|
10192
10219
|
setup: u,
|
|
@@ -10209,8 +10236,8 @@ function Ou() {
|
|
|
10209
10236
|
debug: w.debug,
|
|
10210
10237
|
assetsUrl: l.create(w.authorization),
|
|
10211
10238
|
name: O
|
|
10212
|
-
}).then(function(
|
|
10213
|
-
var N =
|
|
10239
|
+
}).then(function(x) {
|
|
10240
|
+
var N = x.getConfiguration();
|
|
10214
10241
|
return i.setup({
|
|
10215
10242
|
sessionId: w.riskCorrelationId || w.clientMetadataId || w.correlationId,
|
|
10216
10243
|
clientSessionId: N.analyticsMetadata.sessionId,
|
|
@@ -10434,7 +10461,7 @@ function Ou() {
|
|
|
10434
10461
|
var Nu = Ou();
|
|
10435
10462
|
const Lu = /* @__PURE__ */ wn(Nu);
|
|
10436
10463
|
var Dt = { exports: {} }, _r;
|
|
10437
|
-
function
|
|
10464
|
+
function Pu() {
|
|
10438
10465
|
return _r || (_r = 1, function(n, t) {
|
|
10439
10466
|
(function(e) {
|
|
10440
10467
|
n.exports = e();
|
|
@@ -10792,7 +10819,7 @@ function xu() {
|
|
|
10792
10819
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
10793
10820
|
PERFORMANCE OF THIS SOFTWARE.
|
|
10794
10821
|
***************************************************************************** */
|
|
10795
|
-
function s(b, T, E,
|
|
10822
|
+
function s(b, T, E, P) {
|
|
10796
10823
|
function D(A) {
|
|
10797
10824
|
return A instanceof E ? A : new E(function(B) {
|
|
10798
10825
|
B(A);
|
|
@@ -10801,14 +10828,14 @@ function xu() {
|
|
|
10801
10828
|
return new (E || (E = Promise))(function(A, B) {
|
|
10802
10829
|
function X(te) {
|
|
10803
10830
|
try {
|
|
10804
|
-
k(
|
|
10831
|
+
k(P.next(te));
|
|
10805
10832
|
} catch (ye) {
|
|
10806
10833
|
B(ye);
|
|
10807
10834
|
}
|
|
10808
10835
|
}
|
|
10809
10836
|
function ie(te) {
|
|
10810
10837
|
try {
|
|
10811
|
-
k(
|
|
10838
|
+
k(P.throw(te));
|
|
10812
10839
|
} catch (ye) {
|
|
10813
10840
|
B(ye);
|
|
10814
10841
|
}
|
|
@@ -10816,14 +10843,14 @@ function xu() {
|
|
|
10816
10843
|
function k(te) {
|
|
10817
10844
|
te.done ? A(te.value) : D(te.value).then(X, ie);
|
|
10818
10845
|
}
|
|
10819
|
-
k((
|
|
10846
|
+
k((P = P.apply(b, [])).next());
|
|
10820
10847
|
});
|
|
10821
10848
|
}
|
|
10822
10849
|
function o(b, T) {
|
|
10823
10850
|
var E = { label: 0, sent: function() {
|
|
10824
10851
|
if (A[0] & 1) throw A[1];
|
|
10825
10852
|
return A[1];
|
|
10826
|
-
}, trys: [], ops: [] },
|
|
10853
|
+
}, trys: [], ops: [] }, P, D, A, B;
|
|
10827
10854
|
return B = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (B[Symbol.iterator] = function() {
|
|
10828
10855
|
return this;
|
|
10829
10856
|
}), B;
|
|
@@ -10833,9 +10860,9 @@ function xu() {
|
|
|
10833
10860
|
};
|
|
10834
10861
|
}
|
|
10835
10862
|
function ie(k) {
|
|
10836
|
-
if (
|
|
10863
|
+
if (P) throw new TypeError("Generator is already executing.");
|
|
10837
10864
|
for (; E; ) try {
|
|
10838
|
-
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;
|
|
10839
10866
|
switch (D = 0, A && (k = [k[0] & 2, A.value]), k[0]) {
|
|
10840
10867
|
case 0:
|
|
10841
10868
|
case 1:
|
|
@@ -10873,7 +10900,7 @@ function xu() {
|
|
|
10873
10900
|
} catch (te) {
|
|
10874
10901
|
k = [6, te], D = 0;
|
|
10875
10902
|
} finally {
|
|
10876
|
-
|
|
10903
|
+
P = A = 0;
|
|
10877
10904
|
}
|
|
10878
10905
|
if (k[0] & 5) throw k[1];
|
|
10879
10906
|
return { value: k[0] ? k[1] : void 0, done: !0 };
|
|
@@ -10884,17 +10911,17 @@ function xu() {
|
|
|
10884
10911
|
var T, E = JSON.stringify(b);
|
|
10885
10912
|
if (!b.forceScriptReload && (T = l[E], T))
|
|
10886
10913
|
return T;
|
|
10887
|
-
var
|
|
10888
|
-
return
|
|
10889
|
-
|
|
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]));
|
|
10890
10917
|
}), T = new Promise(function(B, X) {
|
|
10891
|
-
|
|
10892
|
-
B(
|
|
10893
|
-
}),
|
|
10918
|
+
P.addEventListener("load", function() {
|
|
10919
|
+
B(P);
|
|
10920
|
+
}), P.addEventListener("error", function() {
|
|
10894
10921
|
X(new Error("".concat(b.src, " failed to load.")));
|
|
10895
|
-
}),
|
|
10922
|
+
}), P.addEventListener("abort", function() {
|
|
10896
10923
|
X(new Error("".concat(b.src, " has aborted.")));
|
|
10897
|
-
}), A.appendChild(
|
|
10924
|
+
}), A.appendChild(P);
|
|
10898
10925
|
}), l[E] = T, T;
|
|
10899
10926
|
}
|
|
10900
10927
|
d.clearCache = function() {
|
|
@@ -10905,8 +10932,8 @@ function xu() {
|
|
|
10905
10932
|
if (E)
|
|
10906
10933
|
return Promise.resolve(E);
|
|
10907
10934
|
E = document.createElement("link");
|
|
10908
|
-
var
|
|
10909
|
-
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);
|
|
10910
10937
|
};
|
|
10911
10938
|
Object.defineProperty(c, "__esModule", { value: !0 }), c.loadStylesheet = f = c.loadScript = void 0;
|
|
10912
10939
|
var p = u, f = c.loadScript = p, m = h;
|
|
@@ -10919,7 +10946,7 @@ function xu() {
|
|
|
10919
10946
|
AXO_ASSET_PATH: O,
|
|
10920
10947
|
LOCALE_PATH: L,
|
|
10921
10948
|
CDNX_PROD: v
|
|
10922
|
-
},
|
|
10949
|
+
}, x = {
|
|
10923
10950
|
BT: "BT",
|
|
10924
10951
|
PPCP: "PPCP"
|
|
10925
10952
|
};
|
|
@@ -10930,26 +10957,26 @@ function xu() {
|
|
|
10930
10957
|
return N() && typeof window.requirejs == "function" && typeof window.requirejs.config == "function";
|
|
10931
10958
|
}
|
|
10932
10959
|
function U(b, T, E) {
|
|
10933
|
-
var
|
|
10960
|
+
var P, D;
|
|
10934
10961
|
return E === void 0 && (E = !0), s(this, void 0, void 0, function() {
|
|
10935
10962
|
var A, B;
|
|
10936
10963
|
return o(this, function(X) {
|
|
10937
|
-
if (A =
|
|
10938
|
-
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)
|
|
10939
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));
|
|
10940
10967
|
return [2, !0];
|
|
10941
10968
|
}
|
|
10942
10969
|
if (!T)
|
|
10943
10970
|
throw new Error("Attempted to load ".concat(b.module, " without specifying version"));
|
|
10944
|
-
return [2,
|
|
10971
|
+
return [2, Y(b, T, E)];
|
|
10945
10972
|
});
|
|
10946
10973
|
});
|
|
10947
10974
|
}
|
|
10948
|
-
function
|
|
10975
|
+
function Y(b, T, E) {
|
|
10949
10976
|
if (E === void 0 && (E = !0), N()) {
|
|
10950
|
-
var
|
|
10977
|
+
var P = E ? b.amdModule.minified : b.amdModule.unminified;
|
|
10951
10978
|
return new Promise(function(A, B) {
|
|
10952
|
-
window.require([
|
|
10979
|
+
window.require([P], A, B);
|
|
10953
10980
|
});
|
|
10954
10981
|
}
|
|
10955
10982
|
var D = E ? b.script.minified : b.script.unminified;
|
|
@@ -10958,13 +10985,13 @@ function xu() {
|
|
|
10958
10985
|
src: "https://js.braintreegateway.com/web/".concat(T, "/js/").concat(D)
|
|
10959
10986
|
});
|
|
10960
10987
|
}
|
|
10961
|
-
function
|
|
10988
|
+
function $() {
|
|
10962
10989
|
return window == null ? void 0 : window.braintree;
|
|
10963
10990
|
}
|
|
10964
10991
|
var F, z, j = {
|
|
10965
10992
|
Client: "client",
|
|
10966
10993
|
HostedCardFields: "hostedFields"
|
|
10967
|
-
}, 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] = {
|
|
10968
10995
|
id: "client",
|
|
10969
10996
|
module: j.Client,
|
|
10970
10997
|
amdModule: {
|
|
@@ -10989,21 +11016,21 @@ function xu() {
|
|
|
10989
11016
|
}, z);
|
|
10990
11017
|
function K(b) {
|
|
10991
11018
|
return s(this, void 0, void 0, function() {
|
|
10992
|
-
var T, E,
|
|
11019
|
+
var T, E, P, D;
|
|
10993
11020
|
return o(this, function(A) {
|
|
10994
11021
|
switch (A.label) {
|
|
10995
11022
|
case 0:
|
|
10996
|
-
return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified,
|
|
10997
|
-
U(
|
|
10998
|
-
_(
|
|
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)
|
|
10999
11026
|
])];
|
|
11000
11027
|
case 1:
|
|
11001
11028
|
return A.sent(), [3, 5];
|
|
11002
11029
|
case 2:
|
|
11003
|
-
return b.platform !==
|
|
11004
|
-
U(
|
|
11005
|
-
U(
|
|
11006
|
-
_(
|
|
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)
|
|
11007
11034
|
])];
|
|
11008
11035
|
case 3:
|
|
11009
11036
|
return A.sent(), [3, 5];
|
|
@@ -11021,9 +11048,9 @@ function xu() {
|
|
|
11021
11048
|
S() && requirejs.config({
|
|
11022
11049
|
paths: (E = {}, E[w] = b, E)
|
|
11023
11050
|
});
|
|
11024
|
-
var
|
|
11051
|
+
var P = "".concat(w, "/").concat(T ? I.AXO_ASSET_NAME.minified : I.AXO_ASSET_NAME.unminified);
|
|
11025
11052
|
return new Promise(function(D, A) {
|
|
11026
|
-
window.require([
|
|
11053
|
+
window.require([P], D, A);
|
|
11027
11054
|
});
|
|
11028
11055
|
}
|
|
11029
11056
|
return f({
|
|
@@ -11037,9 +11064,9 @@ function xu() {
|
|
|
11037
11064
|
return E ? "https://cdn-".concat(E, ".static.engineering.dev.paypalinc.com/").concat(T) : "".concat(I.CDNX_PROD, "/").concat(T);
|
|
11038
11065
|
}
|
|
11039
11066
|
function R(b) {
|
|
11040
|
-
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");
|
|
11041
11068
|
return g({
|
|
11042
|
-
assetUrl:
|
|
11069
|
+
assetUrl: P,
|
|
11043
11070
|
bundleId: (T = b == null ? void 0 : b.metadata) === null || T === void 0 ? void 0 : T.bundleIdOverride
|
|
11044
11071
|
});
|
|
11045
11072
|
}
|
|
@@ -11379,11 +11406,11 @@ function xu() {
|
|
|
11379
11406
|
function l(u, h, p, f) {
|
|
11380
11407
|
var m = Date.now();
|
|
11381
11408
|
return p.flow === "vault" ? p.context_type = "BA_Token" : p.flow === "checkout" && (p.context_type = "EC_Token"), Promise.resolve(u).then(function(v) {
|
|
11382
|
-
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 = {
|
|
11383
11410
|
events: [],
|
|
11384
11411
|
tracking: []
|
|
11385
|
-
}, N = s.addEventMetadata(v,
|
|
11386
|
-
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 = [
|
|
11387
11414
|
{
|
|
11388
11415
|
level: "info",
|
|
11389
11416
|
event: O,
|
|
@@ -11395,11 +11422,11 @@ function xu() {
|
|
|
11395
11422
|
p
|
|
11396
11423
|
)
|
|
11397
11424
|
}
|
|
11398
|
-
],
|
|
11425
|
+
], x.tracking = [N], p && typeof p == "object" && (x.tracking = [d(N, p)]), y(
|
|
11399
11426
|
{
|
|
11400
11427
|
url: w,
|
|
11401
11428
|
method: "post",
|
|
11402
|
-
data:
|
|
11429
|
+
data: x,
|
|
11403
11430
|
timeout: i.ANALYTICS_REQUEST_TIMEOUT_MS
|
|
11404
11431
|
},
|
|
11405
11432
|
f
|
|
@@ -11628,37 +11655,37 @@ function xu() {
|
|
|
11628
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"];
|
|
11629
11656
|
function O() {
|
|
11630
11657
|
}
|
|
11631
|
-
function L(
|
|
11632
|
-
if (!
|
|
11658
|
+
function L(x) {
|
|
11659
|
+
if (!x)
|
|
11633
11660
|
throw new Error("Valid configuration is required");
|
|
11634
11661
|
if (w.forEach(function(N) {
|
|
11635
|
-
if (!
|
|
11662
|
+
if (!x.hasOwnProperty(N))
|
|
11636
11663
|
throw new Error("A valid frame " + N + " must be provided");
|
|
11637
|
-
}), !/^[\w_]+$/.test(
|
|
11664
|
+
}), !/^[\w_]+$/.test(x.name))
|
|
11638
11665
|
throw new Error("A valid frame name must be provided");
|
|
11639
11666
|
}
|
|
11640
|
-
function I(
|
|
11641
|
-
L(
|
|
11642
|
-
name:
|
|
11643
|
-
dispatchFrameUrl:
|
|
11644
|
-
openFrameUrl:
|
|
11645
|
-
height:
|
|
11646
|
-
width:
|
|
11647
|
-
top:
|
|
11648
|
-
left:
|
|
11649
|
-
}, this.state =
|
|
11650
|
-
}
|
|
11651
|
-
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) {
|
|
11652
11679
|
var N = function() {
|
|
11653
|
-
|
|
11680
|
+
x(), this._bus.off(l.DISPATCH_FRAME_READY, N);
|
|
11654
11681
|
}.bind(this);
|
|
11655
11682
|
this._bus.on(l.DISPATCH_FRAME_READY, N), this._writeDispatchFrame();
|
|
11656
11683
|
}, I.prototype._writeDispatchFrame = function() {
|
|
11657
|
-
var
|
|
11684
|
+
var x = u.DISPATCH_FRAME_NAME + "_" + this._serviceId, N = this._options.dispatchFrameUrl;
|
|
11658
11685
|
this._dispatchFrame = p({
|
|
11659
11686
|
"aria-hidden": !0,
|
|
11660
|
-
name:
|
|
11661
|
-
title:
|
|
11687
|
+
name: x,
|
|
11688
|
+
title: x,
|
|
11662
11689
|
src: N,
|
|
11663
11690
|
class: u.DISPATCH_FRAME_CLASS,
|
|
11664
11691
|
height: 0,
|
|
@@ -11671,36 +11698,36 @@ function xu() {
|
|
|
11671
11698
|
}, I.prototype._setBusEvents = function() {
|
|
11672
11699
|
this._bus.on(
|
|
11673
11700
|
l.DISPATCH_FRAME_REPORT,
|
|
11674
|
-
function(
|
|
11675
|
-
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();
|
|
11676
11703
|
}.bind(this)
|
|
11677
11704
|
), this._bus.on(
|
|
11678
11705
|
y,
|
|
11679
|
-
function(
|
|
11680
|
-
|
|
11706
|
+
function(x) {
|
|
11707
|
+
x(this.state);
|
|
11681
11708
|
}.bind(this)
|
|
11682
11709
|
);
|
|
11683
|
-
}, I.prototype.open = function(
|
|
11684
|
-
if (
|
|
11685
|
-
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()) {
|
|
11686
11713
|
this._cleanupFrame(), N && N(new f(d.FRAME_SERVICE_FRAME_OPEN_FAILED));
|
|
11687
11714
|
return;
|
|
11688
11715
|
}
|
|
11689
11716
|
this._pollForPopupClose();
|
|
11690
11717
|
}
|
|
11691
|
-
}, I.prototype.redirect = function(
|
|
11692
|
-
this._frame && !this.isFrameClosed() && this._frame.redirect(
|
|
11718
|
+
}, I.prototype.redirect = function(x) {
|
|
11719
|
+
this._frame && !this.isFrameClosed() && this._frame.redirect(x);
|
|
11693
11720
|
}, I.prototype.close = function() {
|
|
11694
11721
|
this.isFrameClosed() || this._frame.close();
|
|
11695
11722
|
}, I.prototype.focus = function() {
|
|
11696
11723
|
this.isFrameClosed() || this._frame.focus();
|
|
11697
|
-
}, I.prototype.createHandler = function(
|
|
11698
|
-
return
|
|
11724
|
+
}, I.prototype.createHandler = function(x) {
|
|
11725
|
+
return x = x || {}, {
|
|
11699
11726
|
close: function() {
|
|
11700
|
-
|
|
11727
|
+
x.beforeClose && x.beforeClose(), this.close();
|
|
11701
11728
|
}.bind(this),
|
|
11702
11729
|
focus: function() {
|
|
11703
|
-
|
|
11730
|
+
x.beforeFocus && x.beforeFocus(), this.focus();
|
|
11704
11731
|
}.bind(this)
|
|
11705
11732
|
};
|
|
11706
11733
|
}, I.prototype.createNoopHandler = function() {
|
|
@@ -11723,8 +11750,8 @@ function xu() {
|
|
|
11723
11750
|
}.bind(this),
|
|
11724
11751
|
u.POPUP_POLL_INTERVAL
|
|
11725
11752
|
), this._popupInterval;
|
|
11726
|
-
}, I.prototype._getFrameForEnvironment = function(
|
|
11727
|
-
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);
|
|
11728
11755
|
return S ? new s(U) : N ? new i(U) : new o(U);
|
|
11729
11756
|
}, r.exports = I;
|
|
11730
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) {
|
|
@@ -12151,7 +12178,7 @@ function xu() {
|
|
|
12151
12178
|
var L = function() {
|
|
12152
12179
|
v.bus.off(
|
|
12153
12180
|
d.VENMO_DESKTOP_CUSTOMER_CANCELED,
|
|
12154
|
-
|
|
12181
|
+
x
|
|
12155
12182
|
), v.bus.off(
|
|
12156
12183
|
d.VENMO_DESKTOP_UNKNOWN_ERROR,
|
|
12157
12184
|
I
|
|
@@ -12162,7 +12189,7 @@ function xu() {
|
|
|
12162
12189
|
reason: "UNKNOWN_ERROR",
|
|
12163
12190
|
err: N
|
|
12164
12191
|
});
|
|
12165
|
-
},
|
|
12192
|
+
}, x = function() {
|
|
12166
12193
|
L(), v.updateVenmoDesktopPaymentContext("CANCELED"), v.sendEvent(
|
|
12167
12194
|
"venmo.tokenize.desktop.status-change.canceled-from-modal"
|
|
12168
12195
|
), O({
|
|
@@ -12174,7 +12201,7 @@ function xu() {
|
|
|
12174
12201
|
L(), w(N);
|
|
12175
12202
|
}, v.bus.on(
|
|
12176
12203
|
d.VENMO_DESKTOP_CUSTOMER_CANCELED,
|
|
12177
|
-
|
|
12204
|
+
x
|
|
12178
12205
|
), v.bus.on(d.VENMO_DESKTOP_UNKNOWN_ERROR, I);
|
|
12179
12206
|
});
|
|
12180
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) {
|
|
@@ -12253,9 +12280,9 @@ function xu() {
|
|
|
12253
12280
|
case "APPROVED":
|
|
12254
12281
|
return w.authorize(), w.Promise.resolve(O);
|
|
12255
12282
|
}
|
|
12256
|
-
return new w.Promise(function(
|
|
12283
|
+
return new w.Promise(function(x, N) {
|
|
12257
12284
|
setTimeout(function() {
|
|
12258
|
-
w.pollForStatusChange(v, y).then(
|
|
12285
|
+
w.pollForStatusChange(v, y).then(x).catch(N);
|
|
12259
12286
|
}, h);
|
|
12260
12287
|
});
|
|
12261
12288
|
}) : this.Promise.resolve();
|
|
@@ -12341,8 +12368,8 @@ function xu() {
|
|
|
12341
12368
|
assetsUrl: c.create(y.authorization),
|
|
12342
12369
|
name: w
|
|
12343
12370
|
}).then(function(I) {
|
|
12344
|
-
var
|
|
12345
|
-
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));
|
|
12346
12373
|
}), y.createPromise = O, L = new h(y), i.sendEvent(O, "venmo.initialized"), O.then(function() {
|
|
12347
12374
|
return L;
|
|
12348
12375
|
}));
|
|
@@ -12547,18 +12574,18 @@ function xu() {
|
|
|
12547
12574
|
};
|
|
12548
12575
|
o.suppressUnhandledPromiseMessage = !0;
|
|
12549
12576
|
function v(N) {
|
|
12550
|
-
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();
|
|
12551
12578
|
return document.getElementById(m.continueButton).addEventListener("click", function() {
|
|
12552
12579
|
S.focus();
|
|
12553
12580
|
}), document.getElementById(m.cancelButton).addEventListener("click", function() {
|
|
12554
|
-
S.close(),
|
|
12581
|
+
S.close(), $(), w();
|
|
12555
12582
|
}), S.open({}, function(j) {
|
|
12556
12583
|
var ee = 1;
|
|
12557
|
-
j ? z.reject(j) :
|
|
12584
|
+
j ? z.reject(j) : Y(ee).then(function(M) {
|
|
12558
12585
|
z.resolve(M);
|
|
12559
12586
|
}).catch(function(M) {
|
|
12560
|
-
F().then(function(
|
|
12561
|
-
|
|
12587
|
+
F().then(function(q) {
|
|
12588
|
+
q.status === "CREATED" ? z.reject(
|
|
12562
12589
|
new l(c.VENMO_CUSTOMER_CANCELED)
|
|
12563
12590
|
) : z.reject(M);
|
|
12564
12591
|
});
|
|
@@ -12615,7 +12642,7 @@ function xu() {
|
|
|
12615
12642
|
"color: #FFFFFF;",
|
|
12616
12643
|
"margin-top: 28px;",
|
|
12617
12644
|
"}"
|
|
12618
|
-
],
|
|
12645
|
+
], Y = [
|
|
12619
12646
|
"#" + m.continueButton + " {",
|
|
12620
12647
|
"width: 400px;",
|
|
12621
12648
|
"height: 50px;",
|
|
@@ -12629,7 +12656,7 @@ function xu() {
|
|
|
12629
12656
|
"color: #FFFFFF;",
|
|
12630
12657
|
"margin-top: 44px;",
|
|
12631
12658
|
"}"
|
|
12632
|
-
],
|
|
12659
|
+
], $ = [
|
|
12633
12660
|
"#" + m.message + " {",
|
|
12634
12661
|
"font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;",
|
|
12635
12662
|
"font-style: normal;",
|
|
@@ -12655,33 +12682,33 @@ function xu() {
|
|
|
12655
12682
|
], z = N.concat(
|
|
12656
12683
|
S,
|
|
12657
12684
|
U,
|
|
12658
|
-
G,
|
|
12659
12685
|
Y,
|
|
12686
|
+
$,
|
|
12660
12687
|
F
|
|
12661
12688
|
);
|
|
12662
12689
|
return z.join(`
|
|
12663
12690
|
`);
|
|
12664
12691
|
}
|
|
12665
12692
|
function L(N) {
|
|
12666
|
-
var S = document.getElementById(m.backdrop), U,
|
|
12693
|
+
var S = document.getElementById(m.backdrop), U, Y, $, F, z, j, ee, M;
|
|
12667
12694
|
if (S) {
|
|
12668
12695
|
S.classList.remove("hidden");
|
|
12669
12696
|
return;
|
|
12670
12697
|
}
|
|
12671
|
-
U = document.createElement("style"),
|
|
12672
|
-
|
|
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();
|
|
12673
12700
|
});
|
|
12674
12701
|
}
|
|
12675
12702
|
function I(N) {
|
|
12676
12703
|
return L(N.styleCspNonce), v(N);
|
|
12677
12704
|
}
|
|
12678
|
-
function
|
|
12679
|
-
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";
|
|
12680
12707
|
return i.create(
|
|
12681
12708
|
{
|
|
12682
12709
|
name: U,
|
|
12683
|
-
dispatchFrameUrl: z + "/dispatch-frame" + s(
|
|
12684
|
-
openFrameUrl: z + "/venmo-landing-frame" + s(
|
|
12710
|
+
dispatchFrameUrl: z + "/dispatch-frame" + s($) + ".html",
|
|
12711
|
+
openFrameUrl: z + "/venmo-landing-frame" + s($) + ".html",
|
|
12685
12712
|
top: F.top,
|
|
12686
12713
|
left: F.left,
|
|
12687
12714
|
height: f,
|
|
@@ -12695,12 +12722,12 @@ function xu() {
|
|
|
12695
12722
|
r.exports = {
|
|
12696
12723
|
runWebLogin: I,
|
|
12697
12724
|
openPopup: v,
|
|
12698
|
-
setupDesktopWebLogin:
|
|
12725
|
+
setupDesktopWebLogin: x,
|
|
12699
12726
|
POPUP_WIDTH: p,
|
|
12700
12727
|
POPUP_HEIGHT: f
|
|
12701
12728
|
};
|
|
12702
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) {
|
|
12703
|
-
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;
|
|
12704
12731
|
w.suppressUnhandledPromiseMessage = !0;
|
|
12705
12732
|
function F(_) {
|
|
12706
12733
|
var g = this;
|
|
@@ -12745,21 +12772,21 @@ function xu() {
|
|
|
12745
12772
|
"venmo.desktop-flow.setup-failed"
|
|
12746
12773
|
), g._useDesktopQRFlow = !1, R;
|
|
12747
12774
|
});
|
|
12748
|
-
}) : this._shouldCreateVenmoPaymentContext && (this._mobilePollingInterval =
|
|
12775
|
+
}) : this._shouldCreateVenmoPaymentContext && (this._mobilePollingInterval = Y, this._mobilePollingExpiresThreshold = $, this._createPromise = this._createPromise.then(function(R) {
|
|
12749
12776
|
var V, b, T = g._cannotHaveReturnUrls ? "manual-return" : "mobile-payment-context", E = R.getConfiguration();
|
|
12750
12777
|
return b = L.setupDesktopWebLogin({
|
|
12751
12778
|
assetsUrl: E.gatewayConfiguration.assetsUrl,
|
|
12752
12779
|
debug: E.isDebug
|
|
12753
|
-
}).then(function(
|
|
12754
|
-
g._frameServiceInstance =
|
|
12755
|
-
}).catch(function(
|
|
12756
|
-
return
|
|
12780
|
+
}).then(function(P) {
|
|
12781
|
+
g._frameServiceInstance = P;
|
|
12782
|
+
}).catch(function(P) {
|
|
12783
|
+
return P;
|
|
12757
12784
|
}), g._mobilePollingContextEnvironment = E.gatewayConfiguration.environment.toUpperCase(), V = g._createVenmoPaymentContext(R).then(function() {
|
|
12758
12785
|
return i.sendEvent(
|
|
12759
12786
|
g._createPromise,
|
|
12760
12787
|
"venmo." + T + ".presented"
|
|
12761
12788
|
), R;
|
|
12762
|
-
}).catch(function(
|
|
12789
|
+
}).catch(function(P) {
|
|
12763
12790
|
return i.sendEvent(
|
|
12764
12791
|
g._createPromise,
|
|
12765
12792
|
"venmo." + T + ".setup-failed"
|
|
@@ -12767,17 +12794,17 @@ function xu() {
|
|
|
12767
12794
|
new v({
|
|
12768
12795
|
type: d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.type,
|
|
12769
12796
|
code: d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.code,
|
|
12770
|
-
message: z(
|
|
12797
|
+
message: z(P) ? P.details.originalError[0].message : d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,
|
|
12771
12798
|
details: {
|
|
12772
|
-
originalError:
|
|
12799
|
+
originalError: P
|
|
12773
12800
|
}
|
|
12774
12801
|
})
|
|
12775
12802
|
);
|
|
12776
|
-
}), w.all([b, V]).then(function(
|
|
12777
|
-
var D =
|
|
12803
|
+
}), w.all([b, V]).then(function(P) {
|
|
12804
|
+
var D = P[1];
|
|
12778
12805
|
return Promise.resolve(D);
|
|
12779
|
-
}).catch(function(
|
|
12780
|
-
return Promise.reject(
|
|
12806
|
+
}).catch(function(P) {
|
|
12807
|
+
return Promise.reject(P);
|
|
12781
12808
|
});
|
|
12782
12809
|
}));
|
|
12783
12810
|
}
|
|
@@ -12785,7 +12812,7 @@ function xu() {
|
|
|
12785
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";
|
|
12786
12813
|
}
|
|
12787
12814
|
F.prototype._createVenmoPaymentContext = function(_, g) {
|
|
12788
|
-
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";
|
|
12789
12816
|
if (!this._shouldCreateVenmoPaymentContext)
|
|
12790
12817
|
return Promise.resolve();
|
|
12791
12818
|
if (this._shouldUseLegacyFlow)
|
|
@@ -12815,7 +12842,7 @@ function xu() {
|
|
|
12815
12842
|
shippingAmount: this._shippingAmount,
|
|
12816
12843
|
totalAmount: this._totalAmount,
|
|
12817
12844
|
lineItems: this._lineItems
|
|
12818
|
-
},
|
|
12845
|
+
}, P = Object.keys(b).some(
|
|
12819
12846
|
function(A) {
|
|
12820
12847
|
return b[A] !== void 0;
|
|
12821
12848
|
}
|
|
@@ -12833,7 +12860,7 @@ function xu() {
|
|
|
12833
12860
|
paysheetDetails: {
|
|
12834
12861
|
collectCustomerBillingAddress: this._collectCustomerBillingAddress,
|
|
12835
12862
|
collectCustomerShippingAddress: this._collectCustomerShippingAddress,
|
|
12836
|
-
transactionDetails:
|
|
12863
|
+
transactionDetails: P ? b : void 0
|
|
12837
12864
|
}
|
|
12838
12865
|
}
|
|
12839
12866
|
}
|
|
@@ -12872,7 +12899,7 @@ function xu() {
|
|
|
12872
12899
|
}, F.prototype.getUrl = function() {
|
|
12873
12900
|
return this._createPromise.then(
|
|
12874
12901
|
function(_) {
|
|
12875
|
-
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 = {
|
|
12876
12903
|
_meta: {
|
|
12877
12904
|
version: T.sdkVersion,
|
|
12878
12905
|
integration: T.integration,
|
|
@@ -12881,7 +12908,7 @@ function xu() {
|
|
|
12881
12908
|
}
|
|
12882
12909
|
};
|
|
12883
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
|
|
12884
|
-
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({
|
|
12885
12912
|
useAllowDesktopWebLogin: this._useAllowDesktopWebLogin,
|
|
12886
12913
|
mobileWebFallBack: this._mobileWebFallBack
|
|
12887
12914
|
}) + "?" + u.stringify(R);
|
|
@@ -12897,7 +12924,7 @@ function xu() {
|
|
|
12897
12924
|
}, F.prototype.hasTokenizationResult = function() {
|
|
12898
12925
|
return this._hasTokenizationResult();
|
|
12899
12926
|
}, F.prototype._hasTokenizationResult = function(_) {
|
|
12900
|
-
var g = j(_), R =
|
|
12927
|
+
var g = j(_), R = x.getUrlParams();
|
|
12901
12928
|
return R.resource_id ? this._venmoPaymentContextId = R.resource_id : g.id && (this._venmoPaymentContextId = g.id), typeof (g.venmoSuccess || g.venmoError || g.venmoCancel) != "undefined";
|
|
12902
12929
|
}, F.prototype._shouldIncludeReturnUrls = function() {
|
|
12903
12930
|
return this._deepLinkReturnUrl ? !0 : !this._cannotHaveReturnUrls;
|
|
@@ -13143,10 +13170,10 @@ function xu() {
|
|
|
13143
13170
|
i.sendEvent(this._createPromise, "venmo.tokenize.mobile.start"), this._tokenizePromise = new w(), this._previousHash = window.location.hash;
|
|
13144
13171
|
function b(T) {
|
|
13145
13172
|
var E;
|
|
13146
|
-
g.processHashChangeFlowResults(T).catch(function(
|
|
13147
|
-
E =
|
|
13148
|
-
}).then(function(
|
|
13149
|
-
!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;
|
|
13150
13177
|
});
|
|
13151
13178
|
}
|
|
13152
13179
|
return this._onHashChangeListener = function(T) {
|
|
@@ -13158,7 +13185,7 @@ function xu() {
|
|
|
13158
13185
|
}, this.getUrl().then(function(T) {
|
|
13159
13186
|
return g.appSwitch(T), setTimeout(function() {
|
|
13160
13187
|
window.document.addEventListener(
|
|
13161
|
-
|
|
13188
|
+
q(),
|
|
13162
13189
|
g._visibilityChangeListener
|
|
13163
13190
|
);
|
|
13164
13191
|
}, l.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY), g._tokenizePromise;
|
|
@@ -13224,7 +13251,7 @@ function xu() {
|
|
|
13224
13251
|
);
|
|
13225
13252
|
}, F.prototype._removeVisibilityEventListener = function() {
|
|
13226
13253
|
window.removeEventListener("hashchange", this._onHashChangeListener), window.document.removeEventListener(
|
|
13227
|
-
|
|
13254
|
+
q(),
|
|
13228
13255
|
this._visibilityChangeListener
|
|
13229
13256
|
), delete this._visibilityChangeListener, delete this._onHashChangeListener;
|
|
13230
13257
|
}, F.prototype.processHashChangeFlowResults = function(_) {
|
|
@@ -13294,8 +13321,8 @@ function xu() {
|
|
|
13294
13321
|
};
|
|
13295
13322
|
function j(_) {
|
|
13296
13323
|
var g = (_ || window.location.hash.substring(1)).split("&"), R = g.reduce(function(V, b) {
|
|
13297
|
-
var T = b.split("="), E = decodeURIComponent(T[0]).replace(/\W/g, ""),
|
|
13298
|
-
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;
|
|
13299
13326
|
}, {});
|
|
13300
13327
|
return R.resourceId && (R.id = R.resourceId), R;
|
|
13301
13328
|
}
|
|
@@ -13315,7 +13342,7 @@ function xu() {
|
|
|
13315
13342
|
_.payerInfo.userName
|
|
13316
13343
|
)), g;
|
|
13317
13344
|
}
|
|
13318
|
-
function
|
|
13345
|
+
function q() {
|
|
13319
13346
|
var _;
|
|
13320
13347
|
return typeof window.document.hidden != "undefined" ? _ = "visibilitychange" : typeof window.document.msHidden != "undefined" ? _ = "msvisibilitychange" : typeof window.document.webkitHidden != "undefined" && (_ = "webkitvisibilitychange"), _;
|
|
13321
13348
|
}
|
|
@@ -13327,8 +13354,8 @@ function xu() {
|
|
|
13327
13354
|
});
|
|
13328
13355
|
}(Dt)), Dt.exports;
|
|
13329
13356
|
}
|
|
13330
|
-
var
|
|
13331
|
-
const Ru = /* @__PURE__ */ wn(
|
|
13357
|
+
var xu = Pu();
|
|
13358
|
+
const Ru = /* @__PURE__ */ wn(xu);
|
|
13332
13359
|
class ku {
|
|
13333
13360
|
constructor() {
|
|
13334
13361
|
C(this, "client", null);
|
|
@@ -13418,7 +13445,7 @@ class Uu {
|
|
|
13418
13445
|
C(this, "state", {
|
|
13419
13446
|
translate: new pu(),
|
|
13420
13447
|
checkout: new Od(),
|
|
13421
|
-
transaction: new
|
|
13448
|
+
transaction: new Pd(),
|
|
13422
13449
|
styles: new Ld()
|
|
13423
13450
|
});
|
|
13424
13451
|
C(this, "checkout", new Td({
|
|
@@ -13433,6 +13460,6 @@ class Uu {
|
|
|
13433
13460
|
export {
|
|
13434
13461
|
Uu as Core,
|
|
13435
13462
|
Du as PayNextCheckout,
|
|
13436
|
-
|
|
13463
|
+
G as PaymentMethod
|
|
13437
13464
|
};
|
|
13438
13465
|
//# sourceMappingURL=index.es.js.map
|