@paynext/sdk 0.0.93 → 0.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -51,7 +51,12 @@ class Du {
51
51
  const a = (yield import("./index-C6qOiJ-j.js")).Core;
52
52
  this.core = new a();
53
53
  }
54
- t.styles && this.core.state.styles.setState(t.styles);
54
+ t.styles && this.core.state.styles.setState(t.styles), this.core.state.checkout.setState({
55
+ clientToken: t.clientToken,
56
+ environment: t.environment,
57
+ apiVersion: t.apiVersion,
58
+ errorMessageText: t.errorMessageText
59
+ });
55
60
  const e = yield this.core.checkout.mount();
56
61
  this.parent.innerHTML = "", this.parent.appendChild(e), this.core.state.checkout.setState(t);
57
62
  });
@@ -97,7 +102,7 @@ function Bi(n, t, e) {
97
102
  Promise.resolve().then(() => {
98
103
  Cr();
99
104
  });
100
- var q = /* @__PURE__ */ ((n) => (n.PAYPAL = "PAYPAL", n.APPLE_PAY = "APPLEPAY", n.GOOGLE_PAY = "GPAY", n.CARD = "CARD", n.VENMO = "VENMO", n))(q || {}), 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 || {});
105
+ 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
106
  const rn = (n = "sandbox") => ({
102
107
  develop: "https://dev-api.paynext.com",
103
108
  staging: "https://staging-api.paynext.com",
@@ -105,26 +110,26 @@ const rn = (n = "sandbox") => ({
105
110
  production: "https://api.paynext.com"
106
111
  })[n], zi = [
107
112
  {
108
- type: q.PAYPAL,
113
+ type: G.PAYPAL,
109
114
  order: 1,
110
115
  is_active: !0
111
116
  },
112
117
  {
113
- type: q.APPLE_PAY,
118
+ type: G.APPLE_PAY,
114
119
  order: 2,
115
120
  is_active: !0
116
121
  },
117
122
  {
118
- type: q.GOOGLE_PAY,
123
+ type: G.GOOGLE_PAY,
119
124
  order: 3,
120
125
  is_active: !0
121
126
  },
122
127
  {
123
- type: q.CARD,
128
+ type: G.CARD,
124
129
  order: 4,
125
130
  is_active: !0
126
131
  }
127
- ], ji = (n) => n.googlePay ? q.GOOGLE_PAY : n.applePay ? q.APPLE_PAY : n.paypal ? q.PAYPAL : n.braintree ? q.VENMO : q.CARD, Hi = (n) => {
132
+ ], 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
133
  const t = n.card;
129
134
  if (t)
130
135
  return {
@@ -162,7 +167,7 @@ const rn = (n = "sandbox") => ({
162
167
  token: t.token.number,
163
168
  token_service_provider: t.token.tokenServiceProvider
164
169
  };
165
- }, Gi = (n) => {
170
+ }, Yi = (n) => {
166
171
  var e, r, a, i, s, o;
167
172
  const t = n.applePay;
168
173
  if (t)
@@ -174,7 +179,7 @@ const rn = (n = "sandbox") => ({
174
179
  token: (s = t.networkToken) == null ? void 0 : s.number,
175
180
  token_service_provider: (o = t.networkToken) == null ? void 0 : o.tokenServiceProvider
176
181
  };
177
- }, Yi = (n) => {
182
+ }, Gi = (n) => {
178
183
  const t = n.braintree;
179
184
  if (t)
180
185
  return {
@@ -224,32 +229,32 @@ const rn = (n = "sandbox") => ({
224
229
  type: t
225
230
  };
226
231
  switch (t) {
227
- case q.CARD:
232
+ case G.CARD:
228
233
  return J(H({}, e), {
229
234
  name: Ln(n),
230
235
  card: Hi(n)
231
236
  });
232
- case q.PAYPAL:
237
+ case G.PAYPAL:
233
238
  return J(H({}, e), {
234
239
  paypal: Ki(n)
235
240
  });
236
- case q.GOOGLE_PAY:
241
+ case G.GOOGLE_PAY:
237
242
  return J(H({}, e), {
238
243
  card: Nn(n),
239
244
  google_pay: Wi(n),
240
245
  billing_address: On(n)
241
246
  });
242
- case q.APPLE_PAY:
247
+ case G.APPLE_PAY:
243
248
  return J(H({}, e), {
244
249
  name: Ln(n),
245
250
  card: Nn(n),
246
- apple_pay: Gi(n),
251
+ apple_pay: Yi(n),
247
252
  phone: (a = (r = n.applePay) == null ? void 0 : r.shippingContact) == null ? void 0 : a.phoneNumber,
248
253
  billing_address: On(n)
249
254
  });
250
- case q.VENMO:
255
+ case G.VENMO:
251
256
  return J(H({}, e), {
252
- venmo: Yi(n)
257
+ venmo: Gi(n)
253
258
  });
254
259
  default:
255
260
  throw new Error(`Unsupported payment method: ${t}`);
@@ -308,7 +313,7 @@ let Zi = class {
308
313
  requestPayerDetails: ["name", "email", "phone"],
309
314
  process: (v, y) => W(this, [v, y], function* (f, { fail: m }) {
310
315
  c == null || c({
311
- paymentMethod: q.GOOGLE_PAY
316
+ paymentMethod: G.GOOGLE_PAY
312
317
  });
313
318
  try {
314
319
  s == null || s(f);
@@ -341,7 +346,7 @@ let Zi = class {
341
346
  locale: e,
342
347
  size: {
343
348
  width: "100%",
344
- height: "42px"
349
+ height: 40
345
350
  },
346
351
  borderRadius: 12,
347
352
  billingAddress: {
@@ -350,7 +355,7 @@ let Zi = class {
350
355
  }, c == null ? void 0 : c.styles), {
351
356
  process: (f, m) => W(this, [f, m], function* (h, { fail: p }) {
352
357
  o == null || o({
353
- paymentMethod: q.GOOGLE_PAY
358
+ paymentMethod: G.GOOGLE_PAY
354
359
  });
355
360
  try {
356
361
  i == null || i(h);
@@ -563,21 +568,21 @@ function cn(n) {
563
568
  t += e, r = n.next(t);
564
569
  return t >= gt ? 1 / 0 : t;
565
570
  }
566
- const Ee = /* @__NO_SIDE_EFFECTS__ */ (n) => n * 1e3, _e = /* @__NO_SIDE_EFFECTS__ */ (n) => n / 1e3;
571
+ const Ee = /* @__NO_SIDE_EFFECTS__ */ (n) => n * 1e3, Ce = /* @__NO_SIDE_EFFECTS__ */ (n) => n / 1e3;
567
572
  function Lr(n, t = 100, e) {
568
573
  const r = e(J(H({}, n), { keyframes: [0, t] })), a = Math.min(cn(r), gt);
569
574
  return {
570
575
  type: "keyframes",
571
576
  ease: (i) => r.next(a * i).value / t,
572
- duration: /* @__PURE__ */ _e(a)
577
+ duration: /* @__PURE__ */ Ce(a)
573
578
  };
574
579
  }
575
580
  let st = () => {
576
- }, Ce = () => {
581
+ }, Ae = () => {
577
582
  };
578
583
  process.env.NODE_ENV !== "production" && (st = (n, t) => {
579
584
  !n && typeof console != "undefined" && console.warn(t);
580
- }, Ce = (n, t) => {
585
+ }, Ae = (n, t) => {
581
586
  if (!n)
582
587
  throw new Error(t);
583
588
  });
@@ -598,14 +603,14 @@ function pa(n, i = {}, r, a) {
598
603
  let [y, w, O = {}] = v;
599
604
  O.at !== void 0 && (p = xn(p, O.at, h, u));
600
605
  let L = 0;
601
- const I = (P, N, S, U = 0, G = 0) => {
602
- const Y = ha(P), D = N, { delay: F = 0, times: z = Nr(Y), type: j = "keyframes", repeat: ee, repeatType: M, repeatDelay: $ = 0 } = D, K = be(D, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
606
+ const I = (P, N, S, U = 0, Y = 0) => {
607
+ const $ = ha(P), 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
608
  let { ease: _ = t.ease || "easeOut", duration: g } = N;
604
- const R = typeof F == "function" ? F(U, G) : F, V = Y.length, b = on(j) ? j : a == null ? void 0 : a[j];
609
+ const R = typeof F == "function" ? F(U, Y) : F, V = $.length, b = on(j) ? j : a == null ? void 0 : a[j];
605
610
  if (V <= 2 && b) {
606
611
  let A = 100;
607
- if (V === 2 && va(Y)) {
608
- const ie = Y[1] - Y[0];
612
+ if (V === 2 && va($)) {
613
+ const ie = $[1] - $[0];
609
614
  A = Math.abs(ie);
610
615
  }
611
616
  const B = H({}, K);
@@ -616,21 +621,21 @@ function pa(n, i = {}, r, a) {
616
621
  g != null || (g = o);
617
622
  const T = p + R;
618
623
  z.length === 1 && z[0] === 0 && (z[1] = 1);
619
- const E = z.length - Y.length;
620
- if (E > 0 && Or(z, E), Y.length === 1 && Y.unshift(null), ee) {
621
- Ce(ee < ua, "Repeat count too high, must be less than 20"), g = ra(g, ee);
622
- const A = [...Y], B = [...z];
624
+ const E = z.length - $.length;
625
+ if (E > 0 && Or(z, E), $.length === 1 && $.unshift(null), ee) {
626
+ Ae(ee < ua, "Repeat count too high, must be less than 20"), g = ra(g, ee);
627
+ const A = [...$], B = [...z];
623
628
  _ = Array.isArray(_) ? [..._] : [_];
624
629
  const X = [..._];
625
630
  for (let ie = 0; ie < ee; ie++) {
626
- Y.push(...A);
631
+ $.push(...A);
627
632
  for (let k = 0; k < A.length; k++)
628
633
  z.push(B[k] + (ie + 1)), _.push(k === 0 ? "linear" : Tr(X, k - 1));
629
634
  }
630
635
  ca(z, ee);
631
636
  }
632
637
  const x = T + g;
633
- oa(S, Y, _, z, T, x), L = Math.max(R + g, L), f = Math.max(x, f);
638
+ oa(S, $, _, z, T, x), L = Math.max(R + g, L), f = Math.max(x, f);
634
639
  };
635
640
  if (fe(y)) {
636
641
  const P = Pn(y, l);
@@ -639,9 +644,9 @@ function pa(n, i = {}, r, a) {
639
644
  const P = Ar(y, w, r, d), N = P.length;
640
645
  for (let S = 0; S < N; S++) {
641
646
  w = w, O = O;
642
- const U = P[S], G = Pn(U, l);
643
- for (const Y in w)
644
- I(w[Y], fa(O, Y), Rn(Y, G), S, N);
647
+ const U = P[S], Y = Pn(U, l);
648
+ for (const $ in w)
649
+ I(w[$], fa(O, $), Rn($, Y), S, N);
645
650
  }
646
651
  }
647
652
  h = p, p += L;
@@ -652,8 +657,8 @@ function pa(n, i = {}, r, a) {
652
657
  w.sort(la);
653
658
  const O = [], L = [], I = [];
654
659
  for (let N = 0; N < w.length; N++) {
655
- const { at: S, value: U, easing: G } = w[N];
656
- O.push(U), L.push(/* @__PURE__ */ sn(0, f, S)), I.push(G || "easeOut");
660
+ const { at: S, value: U, easing: Y } = w[N];
661
+ O.push(U), L.push(/* @__PURE__ */ sn(0, f, S)), I.push(Y || "easeOut");
657
662
  }
658
663
  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
664
  keyframes: {},
@@ -758,7 +763,7 @@ function ba(n, t) {
758
763
  };
759
764
  return l;
760
765
  }
761
- const Ae = {}, Ea = 40;
766
+ const we = {}, Ea = 40;
762
767
  function _a(n, t) {
763
768
  let e = !1, r = !0;
764
769
  const a = {
@@ -766,8 +771,8 @@ function _a(n, t) {
766
771
  timestamp: 0,
767
772
  isProcessing: !1
768
773
  }, i = () => e = !0, s = ut.reduce((O, L) => (O[L] = ba(i), O), {}), { setup: o, read: c, resolveKeyframes: l, preUpdate: d, update: u, preRender: h, render: p, postRender: f } = s, m = () => {
769
- const O = Ae.useManualTiming ? a.timestamp : performance.now();
770
- e = !1, Ae.useManualTiming || (a.delta = r ? 1e3 / 60 : Math.max(Math.min(O - a.timestamp, Ea), 1)), a.timestamp = O, a.isProcessing = !0, o.process(a), c.process(a), l.process(a), d.process(a), u.process(a), h.process(a), p.process(a), f.process(a), a.isProcessing = !1, e && t && (r = !1, n(m));
774
+ const O = we.useManualTiming ? a.timestamp : performance.now();
775
+ e = !1, we.useManualTiming || (a.delta = r ? 1e3 / 60 : Math.max(Math.min(O - a.timestamp, Ea), 1)), a.timestamp = O, a.isProcessing = !0, o.process(a), c.process(a), l.process(a), d.process(a), u.process(a), h.process(a), p.process(a), f.process(a), a.isProcessing = !1, e && t && (r = !1, n(m));
771
776
  }, v = () => {
772
777
  e = !0, r = !0, a.isProcessing || n(m);
773
778
  };
@@ -779,13 +784,13 @@ function _a(n, t) {
779
784
  s[ut[L]].cancel(O);
780
785
  }, state: a, steps: s };
781
786
  }
782
- const Fe = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: we, cancel: Ut, state: yt } = /* @__PURE__ */ _a(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : Fe, !0);
787
+ const Fe = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: Te, cancel: Ut, state: yt } = /* @__PURE__ */ _a(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : Fe, !0);
783
788
  let vt;
784
789
  function Ca() {
785
790
  vt = void 0;
786
791
  }
787
792
  const ve = {
788
- now: () => (vt === void 0 && ve.set(yt.isProcessing || Ae.useManualTiming ? yt.timestamp : performance.now()), vt),
793
+ now: () => (vt === void 0 && ve.set(yt.isProcessing || we.useManualTiming ? yt.timestamp : performance.now()), vt),
789
794
  set: (n) => {
790
795
  vt = n, queueMicrotask(Ca);
791
796
  }
@@ -892,7 +897,7 @@ class wa {
892
897
  this.events[t] || (this.events[t] = new Rr());
893
898
  const r = this.events[t].add(e);
894
899
  return t === "change" ? () => {
895
- r(), we.read(() => {
900
+ r(), Te.read(() => {
896
901
  this.events.change.getSize() || this.stop();
897
902
  });
898
903
  } : r;
@@ -1049,8 +1054,8 @@ function La(n, t) {
1049
1054
  const e = n.getValue("willChange");
1050
1055
  if (Na(e))
1051
1056
  return e.add(t);
1052
- if (!e && Ae.WillChange) {
1053
- const r = new Ae.WillChange("auto");
1057
+ if (!e && we.WillChange) {
1058
+ const r = new we.WillChange("auto");
1054
1059
  n.addValue("willChange", r), r.add(t);
1055
1060
  }
1056
1061
  }
@@ -1136,7 +1141,7 @@ const Ka = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
1136
1141
  parse: /* @__PURE__ */ Vr("red", "green", "blue"),
1137
1142
  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
1143
  };
1139
- function Ga(n) {
1144
+ function Ya(n) {
1140
1145
  let t = "", e = "", r = "", a = "";
1141
1146
  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
1147
  red: parseInt(t, 16),
@@ -1147,13 +1152,13 @@ function Ga(n) {
1147
1152
  }
1148
1153
  const Bt = {
1149
1154
  test: /* @__PURE__ */ pn("#"),
1150
- parse: Ga,
1155
+ parse: Ya,
1151
1156
  transform: Ne.transform
1152
1157
  }, ot = /* @__NO_SIDE_EFFECTS__ */ (n) => ({
1153
1158
  test: (t) => typeof t == "string" && t.endsWith(n) && t.split(" ").length === 1,
1154
1159
  parse: parseFloat,
1155
1160
  transform: (t) => `${t}${n}`
1156
- }), Ie = /* @__PURE__ */ ot("deg"), De = /* @__PURE__ */ ot("%"), Z = /* @__PURE__ */ ot("px"), Ya = /* @__PURE__ */ ot("vh"), $a = /* @__PURE__ */ ot("vw"), Dn = J(H({}, De), {
1161
+ }), Ie = /* @__PURE__ */ ot("deg"), De = /* @__PURE__ */ ot("%"), Z = /* @__PURE__ */ ot("px"), Ga = /* @__PURE__ */ ot("vh"), $a = /* @__PURE__ */ ot("vw"), Dn = J(H({}, De), {
1157
1162
  parse: (n) => De.parse(n) / 100,
1158
1163
  transform: (n) => De.transform(n * 100)
1159
1164
  }), Se = {
@@ -1293,7 +1298,7 @@ function Hr(n, t, e) {
1293
1298
  const us = (n) => {
1294
1299
  const t = ({ timestamp: e }) => n(e);
1295
1300
  return {
1296
- start: (e = !0) => we.update(t, e),
1301
+ start: (e = !0) => Te.update(t, e),
1297
1302
  stop: () => Ut(t),
1298
1303
  /**
1299
1304
  * If we're processing this frame we can use the
@@ -1345,7 +1350,7 @@ function hs({ duration: n = ae.duration, bounce: t = ae.bounce, velocity: e = ae
1345
1350
  let a, i;
1346
1351
  st(n <= /* @__PURE__ */ Ee(ae.maxDuration), "Spring duration must be 10 seconds or less");
1347
1352
  let s = 1 - t;
1348
- s = Re(ae.minDamping, ae.maxDamping, s), n = Re(ae.minDuration, ae.maxDuration, /* @__PURE__ */ _e(n)), s < 1 ? (a = (l) => {
1353
+ s = Re(ae.minDamping, ae.maxDamping, s), n = Re(ae.minDuration, ae.maxDuration, /* @__PURE__ */ Ce(n)), s < 1 ? (a = (l) => {
1349
1354
  const d = l * s, u = d * n, h = d - e, p = jt(l, s), f = Math.exp(-u);
1350
1355
  return Nt - h / p * f;
1351
1356
  }, i = (l) => {
@@ -1420,8 +1425,8 @@ function it(n = ae.visualDuration, t = ae.bounce) {
1420
1425
  } : n;
1421
1426
  let { restSpeed: r, restDelta: a } = e;
1422
1427
  const i = e.keyframes[0], s = e.keyframes[e.keyframes.length - 1], o = { done: !1, value: i }, { stiffness: c, damping: l, mass: d, duration: u, velocity: h, isResolvedFromDuration: p } = ys(J(H({}, e), {
1423
- velocity: -/* @__PURE__ */ _e(e.velocity || 0)
1424
- })), f = h || 0, m = l / (2 * Math.sqrt(c * d)), v = s - i, y = /* @__PURE__ */ _e(Math.sqrt(c / d)), w = Math.abs(v) < 5;
1428
+ velocity: -/* @__PURE__ */ Ce(e.velocity || 0)
1429
+ })), f = h || 0, m = l / (2 * Math.sqrt(c * d)), v = s - i, y = /* @__PURE__ */ Ce(Math.sqrt(c / d)), w = Math.abs(v) < 5;
1425
1430
  r || (r = w ? ae.restSpeed.granular : ae.restSpeed.default), a || (a = w ? ae.restDelta.granular : ae.restDelta.default);
1426
1431
  let O;
1427
1432
  if (m < 1) {
@@ -1475,8 +1480,8 @@ function Ht({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 3
1475
1480
  const v = u + m, y = s === void 0 ? v : s(v);
1476
1481
  y !== v && (m = y - u);
1477
1482
  const w = (S) => -m * Math.exp(-S / r), O = (S) => y + w(S), L = (S) => {
1478
- const U = w(S), G = O(S);
1479
- h.done = Math.abs(U) <= l, h.value = h.done ? y : G;
1483
+ const U = w(S), Y = O(S);
1484
+ h.done = Math.abs(U) <= l, h.value = h.done ? y : Y;
1480
1485
  };
1481
1486
  let I, P;
1482
1487
  const N = (S) => {
@@ -1499,7 +1504,7 @@ function Ht({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 3
1499
1504
  };
1500
1505
  }
1501
1506
  function bs(n, t, e) {
1502
- const r = [], a = e || Ae.mix || Hr, i = n.length - 1;
1507
+ const r = [], a = e || we.mix || Hr, i = n.length - 1;
1503
1508
  for (let s = 0; s < i; s++) {
1504
1509
  let o = a(n[s], n[s + 1]);
1505
1510
  if (t) {
@@ -1512,7 +1517,7 @@ function bs(n, t, e) {
1512
1517
  }
1513
1518
  function Es(n, t, { clamp: e = !0, ease: r, mixer: a } = {}) {
1514
1519
  const i = n.length;
1515
- if (Ce(i === t.length, "Both input and output ranges must be the same length"), i === 1)
1520
+ if (Ae(i === t.length, "Both input and output ranges must be the same length"), i === 1)
1516
1521
  return () => t[0];
1517
1522
  if (i === 2 && t[0] === t[1])
1518
1523
  return () => t[1];
@@ -1533,11 +1538,11 @@ function Es(n, t, { clamp: e = !0, ease: r, mixer: a } = {}) {
1533
1538
  function _s(n, t) {
1534
1539
  return n.map((e) => e * t);
1535
1540
  }
1536
- const Gr = (n, t, e) => (((1 - 3 * e + 3 * t) * n + (3 * e - 6 * t)) * n + 3 * t) * n, Cs = 1e-7, As = 12;
1541
+ 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
1542
  function ws(n, t, e, r, a) {
1538
1543
  let i, s, o = 0;
1539
1544
  do
1540
- s = t + (e - t) / 2, i = Gr(s, r, a) - n, i > 0 ? e = s : t = s;
1545
+ s = t + (e - t) / 2, i = Yr(s, r, a) - n, i > 0 ? e = s : t = s;
1541
1546
  while (Math.abs(i) > Cs && ++o < As);
1542
1547
  return s;
1543
1548
  }
@@ -1545,12 +1550,12 @@ function ct(n, t, e, r) {
1545
1550
  if (n === t && e === r)
1546
1551
  return Fe;
1547
1552
  const a = (i) => ws(i, 0, 1, n, e);
1548
- return (i) => i === 0 || i === 1 ? i : Gr(a(i), t, r);
1553
+ return (i) => i === 0 || i === 1 ? i : Yr(a(i), t, r);
1549
1554
  }
1550
- const Ts = /* @__PURE__ */ ct(0.42, 0, 1, 1), Is = /* @__PURE__ */ ct(0, 0, 0.58, 1), Yr = /* @__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 = {
1555
+ 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
1556
  linear: Fe,
1552
1557
  easeIn: Ts,
1553
- easeInOut: Yr,
1558
+ easeInOut: Gr,
1554
1559
  easeOut: Is,
1555
1560
  circIn: vn,
1556
1561
  circInOut: Jr,
@@ -1561,15 +1566,15 @@ const Ts = /* @__PURE__ */ ct(0.42, 0, 1, 1), Is = /* @__PURE__ */ ct(0, 0, 0.58
1561
1566
  anticipate: Zr
1562
1567
  }, Ns = (n) => typeof n == "string", jn = (n) => {
1563
1568
  if (ei(n)) {
1564
- Ce(n.length === 4, "Cubic bezier arrays must contain four numerical values.");
1569
+ Ae(n.length === 4, "Cubic bezier arrays must contain four numerical values.");
1565
1570
  const [t, e, r, a] = n;
1566
1571
  return ct(t, e, r, a);
1567
1572
  } else if (Ns(n))
1568
- return Ce(zn[n] !== void 0, `Invalid easing type '${n}'`), zn[n];
1573
+ return Ae(zn[n] !== void 0, `Invalid easing type '${n}'`), zn[n];
1569
1574
  return n;
1570
1575
  };
1571
1576
  function Ls(n, t) {
1572
- return n.map(() => t || Yr).splice(0, n.length - 1);
1577
+ return n.map(() => t || Gr).splice(0, n.length - 1);
1573
1578
  }
1574
1579
  function Me({ duration: n = 300, keyframes: t, times: e, ease: r = "easeInOut" }) {
1575
1580
  const a = wr(r) ? r.map(jn) : jn(r), i = {
@@ -1642,7 +1647,7 @@ class bn extends yn {
1642
1647
  const { type: e = Me, repeat: r = 0, repeatDelay: a = 0, repeatType: i, velocity: s = 0 } = t;
1643
1648
  let { keyframes: o } = t;
1644
1649
  const c = e || Me;
1645
- process.env.NODE_ENV !== "production" && c !== Me && Ce(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), c !== Me && typeof o[0] != "number" && (this.mixKeyframes = hn(Rs, Hr(o[0], o[1])), o = [0, 100]);
1650
+ process.env.NODE_ENV !== "production" && c !== Me && Ae(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), c !== Me && typeof o[0] != "number" && (this.mixKeyframes = hn(Rs, Hr(o[0], o[1])), o = [0, 100]);
1646
1651
  const l = c(J(H({}, t), { keyframes: o }));
1647
1652
  i === "mirror" && (this.mirroredGenerator = c(J(H({}, t), {
1648
1653
  keyframes: [...o].reverse(),
@@ -1666,8 +1671,8 @@ class bn extends yn {
1666
1671
  let O = this.currentTime, L = r;
1667
1672
  if (u) {
1668
1673
  const S = Math.min(this.currentTime, a) / o;
1669
- let U = Math.floor(S), G = S % 1;
1670
- !G && S >= 1 && (G = 1), G === 1 && U--, U = Math.min(U, u + 1), !!(U % 2) && (h === "reverse" ? (G = 1 - G, p && (G -= p / o)) : h === "mirror" && (L = s)), O = Re(0, 1, G) * o;
1674
+ let U = Math.floor(S), Y = S % 1;
1675
+ !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
1676
  }
1672
1677
  const I = w ? { done: !1, value: d[0] } : L.next(O);
1673
1678
  i && (I.value = i(I.value));
@@ -1685,10 +1690,10 @@ class bn extends yn {
1685
1690
  return this.finished.then(t, e);
1686
1691
  }
1687
1692
  get duration() {
1688
- return /* @__PURE__ */ _e(this.calculatedDuration);
1693
+ return /* @__PURE__ */ Ce(this.calculatedDuration);
1689
1694
  }
1690
1695
  get time() {
1691
- return /* @__PURE__ */ _e(this.currentTime);
1696
+ return /* @__PURE__ */ Ce(this.currentTime);
1692
1697
  }
1693
1698
  set time(t) {
1694
1699
  var e;
@@ -1700,7 +1705,7 @@ class bn extends yn {
1700
1705
  set speed(t) {
1701
1706
  this.updateTime(ve.now());
1702
1707
  const e = this.playbackSpeed !== t;
1703
- this.playbackSpeed = t, e && (this.time = /* @__PURE__ */ _e(this.currentTime));
1708
+ this.playbackSpeed = t, e && (this.time = /* @__PURE__ */ Ce(this.currentTime));
1704
1709
  }
1705
1710
  play() {
1706
1711
  var a, i;
@@ -1778,12 +1783,12 @@ const Le = (n) => n * 180 / Math.PI, Kt = (n) => {
1778
1783
  skewY: (n) => Le(Math.atan(n[1])),
1779
1784
  skew: (n) => (Math.abs(n[1]) + Math.abs(n[4])) / 2
1780
1785
  };
1781
- function Gt(n) {
1786
+ function Yt(n) {
1782
1787
  return n.includes("scale") ? 1 : 0;
1783
1788
  }
1784
- function Yt(n, t) {
1789
+ function Gt(n, t) {
1785
1790
  if (!n || n === "none")
1786
- return Gt(t);
1791
+ return Yt(t);
1787
1792
  const e = n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
1788
1793
  let r, a;
1789
1794
  if (e)
@@ -1793,18 +1798,18 @@ function Yt(n, t) {
1793
1798
  r = Ss, a = o;
1794
1799
  }
1795
1800
  if (!a)
1796
- return Gt(t);
1801
+ return Yt(t);
1797
1802
  const i = r[t], s = a[1].split(",").map(Vs);
1798
1803
  return typeof i == "function" ? i(s) : s[i];
1799
1804
  }
1800
1805
  const Ds = (n, t) => {
1801
1806
  const { transform: e = "none" } = getComputedStyle(n);
1802
- return Yt(e, t);
1807
+ return Gt(e, t);
1803
1808
  };
1804
1809
  function Vs(n) {
1805
1810
  return parseFloat(n.trim());
1806
1811
  }
1807
- const Gn = (n) => n === ze || n === Z, Fs = /* @__PURE__ */ new Set(["x", "y", "z"]), Us = Ue.filter((n) => !Fs.has(n));
1812
+ const Yn = (n) => n === ze || n === Z, Fs = /* @__PURE__ */ new Set(["x", "y", "z"]), Us = Ue.filter((n) => !Fs.has(n));
1808
1813
  function Bs(n) {
1809
1814
  const t = [];
1810
1815
  return Us.forEach((e) => {
@@ -1821,8 +1826,8 @@ const xe = {
1821
1826
  bottom: ({ y: n }, { top: t }) => parseFloat(t) + (n.max - n.min),
1822
1827
  right: ({ x: n }, { left: t }) => parseFloat(t) + (n.max - n.min),
1823
1828
  // Transform
1824
- x: (n, { transform: t }) => Yt(t, "x"),
1825
- y: (n, { transform: t }) => Yt(t, "y")
1829
+ x: (n, { transform: t }) => Gt(t, "x"),
1830
+ y: (n, { transform: t }) => Gt(t, "y")
1826
1831
  };
1827
1832
  xe.translateX = xe.x;
1828
1833
  xe.translateY = xe.y;
@@ -1860,7 +1865,7 @@ class En {
1860
1865
  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
1866
  }
1862
1867
  scheduleResolve() {
1863
- this.state = "scheduled", this.isAsync ? (Pe.add(this), $t || ($t = !0, we.read(ri), we.resolveKeyframes(ni))) : (this.readKeyframes(), this.complete());
1868
+ this.state = "scheduled", this.isAsync ? (Pe.add(this), $t || ($t = !0, Te.read(ri), Te.resolveKeyframes(ni))) : (this.readKeyframes(), this.complete());
1864
1869
  }
1865
1870
  readKeyframes() {
1866
1871
  const { unresolvedKeyframes: t, name: e, element: r, motionValue: a } = this;
@@ -1904,21 +1909,21 @@ function _n(n) {
1904
1909
  return () => (t === void 0 && (t = n()), t);
1905
1910
  }
1906
1911
  const Ks = /* @__PURE__ */ _n(() => window.ScrollTimeline !== void 0), Ws = {};
1907
- function Gs(n, t) {
1912
+ function Ys(n, t) {
1908
1913
  const e = /* @__PURE__ */ _n(n);
1909
1914
  return () => {
1910
1915
  var r;
1911
1916
  return (r = Ws[t]) != null ? r : e();
1912
1917
  };
1913
1918
  }
1914
- const ii = /* @__PURE__ */ Gs(() => {
1919
+ const ii = /* @__PURE__ */ Ys(() => {
1915
1920
  try {
1916
1921
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1917
1922
  } catch (n) {
1918
1923
  return !1;
1919
1924
  }
1920
1925
  return !0;
1921
- }, "linearEasing"), Xe = ([n, t, e, r]) => `cubic-bezier(${n}, ${t}, ${e}, ${r})`, Yn = {
1926
+ }, "linearEasing"), Xe = ([n, t, e, r]) => `cubic-bezier(${n}, ${t}, ${e}, ${r})`, Gn = {
1922
1927
  linear: "linear",
1923
1928
  ease: "ease",
1924
1929
  easeIn: "ease-in",
@@ -1931,9 +1936,9 @@ const ii = /* @__PURE__ */ Gs(() => {
1931
1936
  };
1932
1937
  function ai(n, t) {
1933
1938
  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) || Yn.easeOut) : Yn[n];
1939
+ 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
1940
  }
1936
- function Ys(n, t, e, { delay: r = 0, duration: a = 300, repeat: i = 0, repeatType: s = "loop", ease: o = "easeOut", times: c } = {}, l = void 0) {
1941
+ 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
1942
  const d = {
1938
1943
  [t]: e
1939
1944
  };
@@ -1960,9 +1965,9 @@ class qs extends yn {
1960
1965
  if (super(), this.finishedTime = null, this.isStopped = !1, !t)
1961
1966
  return;
1962
1967
  const { element: e, name: r, keyframes: a, pseudoElement: i, allowFlatten: s = !1, finalKeyframe: o, onComplete: c } = t;
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"?`);
1968
+ this.isPseudoElement = !!i, this.allowFlatten = s, this.options = t, Ae(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
1964
1969
  const l = $s(t);
1965
- this.animation = Ys(e, r, a, l, i), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1970
+ this.animation = Gs(e, r, a, l, i), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1966
1971
  if (this.finishedTime = this.time, !i) {
1967
1972
  const d = gn(a, this.options, o, this.speed);
1968
1973
  this.updateMotionValue ? this.updateMotionValue(d) : Hs(e, r, d), this.animation.cancel();
@@ -2012,10 +2017,10 @@ class qs extends yn {
2012
2017
  get duration() {
2013
2018
  var e, r;
2014
2019
  const t = ((r = (e = this.animation.effect) == null ? void 0 : e.getComputedTiming) == null ? void 0 : r.call(e).duration) || 0;
2015
- return /* @__PURE__ */ _e(Number(t));
2020
+ return /* @__PURE__ */ Ce(Number(t));
2016
2021
  }
2017
2022
  get time() {
2018
- return /* @__PURE__ */ _e(Number(this.animation.currentTime) || 0);
2023
+ return /* @__PURE__ */ Ce(Number(this.animation.currentTime) || 0);
2019
2024
  }
2020
2025
  set time(t) {
2021
2026
  this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ Ee(t);
@@ -2157,7 +2162,7 @@ class so extends yn {
2157
2162
  onKeyframesResolved(t, e, r, a) {
2158
2163
  this.keyframeResolver = void 0;
2159
2164
  const { name: i, type: s, velocity: o, delay: c, isHandoff: l, onUpdate: d } = r;
2160
- this.resolvedAt = ve.now(), eo(t, i, s, o) || ((Ae.instantAnimations || !c) && (d == null || d(gn(t, r, e))), t[0] = t[t.length - 1], r.duration = 0, r.repeat = 0);
2165
+ this.resolvedAt = ve.now(), eo(t, i, s, o) || ((we.instantAnimations || !c) && (d == null || d(gn(t, r, e))), t[0] = t[t.length - 1], r.duration = 0, r.repeat = 0);
2161
2166
  const u = a ? this.resolvedAt ? this.resolvedAt - this.createdAt > ao ? this.resolvedAt : this.createdAt : this.createdAt : void 0, h = J(H({
2162
2167
  startTime: u,
2163
2168
  finalKeyframe: e
@@ -2239,10 +2244,10 @@ const ci = (n, t, e, r = {}, a, i) => (s) => {
2239
2244
  });
2240
2245
  Ba(o) || Object.assign(d, Ua(n, d)), d.duration && (d.duration = /* @__PURE__ */ Ee(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ Ee(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
2241
2246
  let u = !1;
2242
- if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (d.duration = 0, d.delay === 0 && (u = !0)), (Ae.instantAnimations || Ae.skipAnimations) && (u = !0, d.duration = 0, d.delay = 0), d.allowFlatten = !o.type && !o.ease, u && !i && t.get() !== void 0) {
2247
+ if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (d.duration = 0, d.delay === 0 && (u = !0)), (we.instantAnimations || we.skipAnimations) && (u = !0, d.duration = 0, d.delay = 0), d.allowFlatten = !o.type && !o.ease, u && !i && t.get() !== void 0) {
2243
2248
  const h = Sa(d.keyframes, o);
2244
2249
  if (h !== void 0) {
2245
- we.update(() => {
2250
+ Te.update(() => {
2246
2251
  d.onUpdate(h), d.onComplete();
2247
2252
  });
2248
2253
  return;
@@ -2280,7 +2285,7 @@ function co(n, t, { delay: e = 0, transitionOverride: r, type: a } = {}) {
2280
2285
  if (window.MotionHandoffAnimation) {
2281
2286
  const O = Ra(n);
2282
2287
  if (O) {
2283
- const L = window.MotionHandoffAnimation(O, h, we);
2288
+ const L = window.MotionHandoffAnimation(O, h, Te);
2284
2289
  L !== null && (m.startTime = L, y = !0);
2285
2290
  }
2286
2291
  }
@@ -2289,7 +2294,7 @@ function co(n, t, { delay: e = 0, transitionOverride: r, type: a } = {}) {
2289
2294
  w && c.push(w);
2290
2295
  }
2291
2296
  return s && Promise.all(c).then(() => {
2292
- we.update(() => {
2297
+ Te.update(() => {
2293
2298
  s && Oa(n, s);
2294
2299
  });
2295
2300
  }), c;
@@ -2394,7 +2399,7 @@ function Eo(n, t, e) {
2394
2399
  const pi = (n) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n), hi = (n) => /^0[^.\s]+$/u.test(n), _o = {
2395
2400
  test: (n) => n === "auto",
2396
2401
  parse: (n) => n
2397
- }, fi = (n) => (t) => t.test(n), mi = [ze, Z, De, Ie, $a, Ya, _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"]);
2402
+ }, 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
2403
  function To(n) {
2399
2404
  const [t, e] = n.slice(0, -1).split("(");
2400
2405
  if (t === "drop-shadow")
@@ -2525,7 +2530,7 @@ class yi {
2525
2530
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2526
2531
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2527
2532
  const p = ve.now();
2528
- this.renderScheduledAt < p && (this.renderScheduledAt = p, we.render(this.render, !1, !0));
2533
+ this.renderScheduledAt < p && (this.renderScheduledAt = p, Te.render(this.render, !1, !0));
2529
2534
  };
2530
2535
  const { latestValues: c, renderState: l } = s;
2531
2536
  this.latestValues = c, this.baseTarget = H({}, c), this.initialValues = e.initial ? H({}, c) : {}, this.renderState = l, this.parent = t, this.props = e, this.presenceContext = r, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = a, this.options = o, this.blockInitialAnimation = !!i, this.isControllingVariants = ui(e), this.isVariantNode = bo(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
@@ -2553,7 +2558,7 @@ class yi {
2553
2558
  const r = Be.has(t);
2554
2559
  r && this.onBindTransform && this.onBindTransform();
2555
2560
  const a = e.on("change", (o) => {
2556
- this.latestValues[t] = o, this.props.onUpdate && we.preRender(this.notifyUpdate), r && this.projection && (this.projection.isTransformDirty = !0);
2561
+ this.latestValues[t] = o, this.props.onUpdate && Te.preRender(this.notifyUpdate), r && this.projection && (this.projection.isTransformDirty = !0);
2557
2562
  }), i = e.on("renderRequest", this.scheduleRender);
2558
2563
  let s;
2559
2564
  window.MotionCheckAppearSync && (s = window.MotionCheckAppearSync(this, t, e)), this.valueSubscriptions.set(t, () => {
@@ -2717,7 +2722,7 @@ function xo(n) {
2717
2722
  }
2718
2723
  const Po = 4;
2719
2724
  function bi(n, t, e = 1) {
2720
- Ce(e <= Po, `Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);
2725
+ Ae(e <= Po, `Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);
2721
2726
  const [r, a] = xo(n);
2722
2727
  if (!r)
2723
2728
  return;
@@ -2762,7 +2767,7 @@ class Mo extends En {
2762
2767
  return;
2763
2768
  const [a, i] = t, s = Zn(a), o = Zn(i);
2764
2769
  if (s !== o)
2765
- if (Gn(s) && Gn(o))
2770
+ if (Yn(s) && Yn(o))
2766
2771
  for (let c = 0; c < t.length; c++) {
2767
2772
  const l = t[c];
2768
2773
  typeof l == "string" && (t[c] = parseFloat(l));
@@ -2889,7 +2894,7 @@ class jo extends Ei {
2889
2894
  readValueFromInstance(t, e) {
2890
2895
  var r;
2891
2896
  if (Be.has(e))
2892
- return (r = this.projection) != null && r.isProjecting ? Gt(e) : Ds(t, e);
2897
+ return (r = this.projection) != null && r.isProjecting ? Yt(e) : Ds(t, e);
2893
2898
  {
2894
2899
  const a = zo(t), i = (Dr(e) ? a.getPropertyValue(e) : a[e]) || 0;
2895
2900
  return typeof i == "string" ? i.trim() : i;
@@ -2940,13 +2945,13 @@ class Ko extends yi {
2940
2945
  const Wo = {
2941
2946
  offset: "stroke-dashoffset",
2942
2947
  array: "stroke-dasharray"
2943
- }, Go = {
2948
+ }, Yo = {
2944
2949
  offset: "strokeDashoffset",
2945
2950
  array: "strokeDasharray"
2946
2951
  };
2947
- function Yo(n, t, e = 1, r = 0, a = !0) {
2952
+ function Go(n, t, e = 1, r = 0, a = !0) {
2948
2953
  n.pathLength = 1;
2949
- const i = a ? Wo : Go;
2954
+ const i = a ? Wo : Yo;
2950
2955
  n[i.offset] = Z.transform(-r);
2951
2956
  const s = Z.transform(t), o = Z.transform(e);
2952
2957
  n[i.array] = `${s} ${o}`;
@@ -2974,7 +2979,7 @@ function $o(n, u, c, l, d) {
2974
2979
  }
2975
2980
  n.attrs = n.style, n.style = {};
2976
2981
  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 && Yo(p, a, i, s, !1);
2982
+ 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
2983
  }
2979
2984
  const Ti = /* @__PURE__ */ new Set([
2980
2985
  "baseFrequency",
@@ -3091,7 +3096,7 @@ function Oi(n, t, e, r) {
3091
3096
  a.push(nc(n, an(t) && t.default || t, e && (e.default || e)));
3092
3097
  else {
3093
3098
  const i = Ar(n, t, r), s = i.length;
3094
- Ce(!!s, "No valid elements provided.");
3099
+ Ae(!!s, "No valid elements provided.");
3095
3100
  for (let o = 0; o < s; o++) {
3096
3101
  const c = i[o], l = c instanceof Element ? ec : tc;
3097
3102
  et.has(c) || l(c);
@@ -3493,19 +3498,19 @@ function Pc() {
3493
3498
  }
3494
3499
  return He.addMatchingCardsToResults = e, He;
3495
3500
  }
3496
- var Ge = {}, sr;
3501
+ var Ye = {}, sr;
3497
3502
  function Rc() {
3498
- if (sr) return Ge;
3499
- sr = 1, Object.defineProperty(Ge, "__esModule", { value: !0 }), Ge.isValidInputType = void 0;
3503
+ if (sr) return Ye;
3504
+ sr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.isValidInputType = void 0;
3500
3505
  function n(t) {
3501
3506
  return typeof t == "string" || t instanceof String;
3502
3507
  }
3503
- return Ge.isValidInputType = n, Ge;
3508
+ return Ye.isValidInputType = n, Ye;
3504
3509
  }
3505
- var Ye = {}, or;
3510
+ var Ge = {}, or;
3506
3511
  function kc() {
3507
- if (or) return Ye;
3508
- or = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.findBestMatch = void 0;
3512
+ if (or) return Ge;
3513
+ or = 1, Object.defineProperty(Ge, "__esModule", { value: !0 }), Ge.findBestMatch = void 0;
3509
3514
  function n(e) {
3510
3515
  var r = e.filter(function(a) {
3511
3516
  return a.matchStrength;
@@ -3517,7 +3522,7 @@ function kc() {
3517
3522
  return !r || Number(r.matchStrength) < Number(a.matchStrength) ? a : r;
3518
3523
  }) : null;
3519
3524
  }
3520
- return Ye.findBestMatch = t, Ye;
3525
+ return Ge.findBestMatch = t, Ge;
3521
3526
  }
3522
3527
  var $e, cr;
3523
3528
  function Sc() {
@@ -3740,7 +3745,7 @@ const Et = [
3740
3745
  }, zc = (n) => {
3741
3746
  var t;
3742
3747
  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 === q.GOOGLE_PAY
3748
+ ({ is_active: r, type: a }) => r && a === G.GOOGLE_PAY
3744
3749
  )) ? null : {
3745
3750
  amount: n.amount,
3746
3751
  currency: n.currency,
@@ -3751,7 +3756,7 @@ const Et = [
3751
3756
  }, jc = (n) => {
3752
3757
  var t, e;
3753
3758
  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 === q.APPLE_PAY
3759
+ ({ is_active: a, type: i }) => a && i === G.APPLE_PAY
3755
3760
  )) ? null : {
3756
3761
  amount: n.amount,
3757
3762
  currency: n.currency,
@@ -3840,7 +3845,7 @@ const Et = [
3840
3845
  tr: "tr",
3841
3846
  ua: "uk",
3842
3847
  zh: "zh"
3843
- })[n] || "en", Gc = (n) => ({
3848
+ })[n] || "en", Yc = (n) => ({
3844
3849
  en: "en_US",
3845
3850
  ar: "ar_EG",
3846
3851
  cs: "cs_CZ",
@@ -3876,7 +3881,7 @@ var ht = { exports: {} }, qe = {};
3876
3881
  * LICENSE file in the root directory of this source tree.
3877
3882
  */
3878
3883
  var ur;
3879
- function Yc() {
3884
+ function Gc() {
3880
3885
  if (ur) return qe;
3881
3886
  ur = 1;
3882
3887
  var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
@@ -3913,7 +3918,7 @@ function $c() {
3913
3918
  function n(g) {
3914
3919
  if (g == null) return null;
3915
3920
  if (typeof g == "function")
3916
- return g.$$typeof === G ? null : g.displayName || g.name || null;
3921
+ return g.$$typeof === Y ? null : g.displayName || g.name || null;
3917
3922
  if (typeof g == "string") return g;
3918
3923
  switch (g) {
3919
3924
  case m:
@@ -3985,7 +3990,7 @@ function $c() {
3985
3990
  }
3986
3991
  }
3987
3992
  function a() {
3988
- var g = Y.A;
3993
+ var g = $.A;
3989
3994
  return g === null ? null : g.getOwner();
3990
3995
  }
3991
3996
  function i() {
@@ -4101,7 +4106,7 @@ React keys must be passed directly to JSX without using spread:
4101
4106
  function u(g) {
4102
4107
  typeof g == "object" && g !== null && g.$$typeof === p && g._store && (g._store.validated = 1);
4103
4108
  }
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"), P = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), U = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), Y = 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() {
4109
+ 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"), P = 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
4110
  return null;
4106
4111
  };
4107
4112
  h = {
@@ -4109,12 +4114,12 @@ React keys must be passed directly to JSX without using spread:
4109
4114
  return g();
4110
4115
  }
4111
4116
  };
4112
- var ee, M = {}, $ = h.react_stack_bottom_frame.bind(
4117
+ var ee, M = {}, q = h.react_stack_bottom_frame.bind(
4113
4118
  h,
4114
4119
  i
4115
4120
  )(), K = j(r(i)), _ = {};
4116
4121
  Qe.Fragment = m, Qe.jsx = function(g, R, V, b, T) {
4117
- var E = 1e4 > Y.recentlyCreatedOwnerStacks++;
4122
+ var E = 1e4 > $.recentlyCreatedOwnerStacks++;
4118
4123
  return d(
4119
4124
  g,
4120
4125
  R,
@@ -4122,11 +4127,11 @@ React keys must be passed directly to JSX without using spread:
4122
4127
  !1,
4123
4128
  b,
4124
4129
  T,
4125
- E ? Error("react-stack-top-frame") : $,
4130
+ E ? Error("react-stack-top-frame") : q,
4126
4131
  E ? j(r(g)) : K
4127
4132
  );
4128
4133
  }, Qe.jsxs = function(g, R, V, b, T) {
4129
- var E = 1e4 > Y.recentlyCreatedOwnerStacks++;
4134
+ var E = 1e4 > $.recentlyCreatedOwnerStacks++;
4130
4135
  return d(
4131
4136
  g,
4132
4137
  R,
@@ -4134,7 +4139,7 @@ React keys must be passed directly to JSX without using spread:
4134
4139
  !0,
4135
4140
  b,
4136
4141
  T,
4137
- E ? Error("react-stack-top-frame") : $,
4142
+ E ? Error("react-stack-top-frame") : q,
4138
4143
  E ? j(r(g)) : K
4139
4144
  );
4140
4145
  };
@@ -4142,7 +4147,7 @@ React keys must be passed directly to JSX without using spread:
4142
4147
  }
4143
4148
  var hr;
4144
4149
  function qc() {
4145
- return hr || (hr = 1, process.env.NODE_ENV === "production" ? ht.exports = Yc() : ht.exports = $c()), ht.exports;
4150
+ return hr || (hr = 1, process.env.NODE_ENV === "production" ? ht.exports = Gc() : ht.exports = $c()), ht.exports;
4146
4151
  }
4147
4152
  qc();
4148
4153
  const Qc = [
@@ -4218,11 +4223,11 @@ class Zc {
4218
4223
  }
4219
4224
  }
4220
4225
  const Jc = [
4221
- { type: q.PAYPAL, is_active: !0, order: 1 },
4222
- { type: q.APPLE_PAY, is_active: !0, order: 2 },
4223
- { type: q.GOOGLE_PAY, is_active: !0, order: 3 },
4224
- { type: q.VENMO, is_active: !0, order: 4 },
4225
- { type: q.CARD, is_active: !0, order: 5 }
4226
+ { type: G.PAYPAL, is_active: !0, order: 1 },
4227
+ { type: G.APPLE_PAY, is_active: !0, order: 2 },
4228
+ { type: G.GOOGLE_PAY, is_active: !0, order: 3 },
4229
+ { type: G.VENMO, is_active: !0, order: 4 },
4230
+ { type: G.CARD, is_active: !0, order: 5 }
4226
4231
  ], ke = {
4227
4232
  open: { y: 0, opacity: 1 },
4228
4233
  close: { y: 100, opacity: 0 },
@@ -4332,7 +4337,7 @@ class al {
4332
4337
  clientId: e.paypal_info.client_id,
4333
4338
  environment: e.paypal_info.environment || "sandbox",
4334
4339
  vault: !0,
4335
- locale: Gc(this.config.state.translate.locale()),
4340
+ locale: Yc(this.config.state.translate.locale()),
4336
4341
  intent: "tokenize"
4337
4342
  }), !this.paypal.isLoaded())
4338
4343
  return !1;
@@ -4341,12 +4346,12 @@ class al {
4341
4346
  }
4342
4347
  const i = t ? J(H({}, t), {
4343
4348
  onError: (c) => {
4344
- var l;
4349
+ var d, u;
4345
4350
  if (this.emitAttemptOnce(), !this.isInitialized) {
4346
4351
  console.error("PayPal error:", c);
4347
4352
  return;
4348
4353
  }
4349
- (l = t.onError) == null || l.call(t, c), this.attemptEmitted = !1;
4354
+ !this.isUserCancellationError(c) && c ? (d = t.onError) == null || d.call(t, c) : (u = t.onCancel) == null || u.call(t), this.attemptEmitted = !1;
4350
4355
  },
4351
4356
  onCancel: () => {
4352
4357
  var c;
@@ -4373,8 +4378,9 @@ class al {
4373
4378
  (c = i == null ? void 0 : i.onCancel) == null || c.call(i);
4374
4379
  },
4375
4380
  onError: (c) => {
4376
- var l;
4377
- (l = i == null ? void 0 : i.onError) == null || l.call(i, c);
4381
+ var d, u;
4382
+ const l = this.isUserCancellationError(c);
4383
+ !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
4384
  }
4379
4385
  }));
4380
4386
  } catch (c) {
@@ -4388,7 +4394,22 @@ class al {
4388
4394
  return this.events[t].addListener(e);
4389
4395
  }
4390
4396
  emitAttemptOnce() {
4391
- this.attemptEmitted || (this.attemptEmitted = !0, this.events.onPaymentAttempt.emit(q.PAYPAL));
4397
+ this.attemptEmitted || (this.attemptEmitted = !0, this.events.onPaymentAttempt.emit(G.PAYPAL));
4398
+ }
4399
+ isUserCancellationError(t) {
4400
+ var a;
4401
+ if (!t) return !1;
4402
+ 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) || "";
4403
+ return [
4404
+ "window is closed",
4405
+ "window closed",
4406
+ "popup closed",
4407
+ "user closed",
4408
+ "cancelled by user",
4409
+ "user cancelled"
4410
+ ].some(
4411
+ (i) => e.toLowerCase().includes(i)
4412
+ );
4392
4413
  }
4393
4414
  setupInterceptOverlay() {
4394
4415
  if (this.interceptOverlay) return;
@@ -4416,18 +4437,18 @@ class al {
4416
4437
  class sl {
4417
4438
  constructor() {
4418
4439
  C(this, "template", `
4419
- <svg
4420
- xmlns='http://www.w3.org/2000/svg'
4421
- fill='none'
4422
- stroke='currentColor'
4423
- stroke-width='2'
4424
- stroke-linecap='round'
4425
- stroke-linejoin='round'
4426
- viewBox='0 0 28 20'
4427
- class='${ne.svg}'
4440
+ <svg xmlns="http://www.w3.org/2000/svg"
4441
+ width="24"
4442
+ height="24"
4443
+ viewBox="0 0 24 24"
4444
+ fill="none"
4445
+ stroke="currentColor"
4446
+ stroke-width="2"
4447
+ stroke-linecap="round"
4448
+ stroke-linejoin="round"
4428
4449
  >
4429
- <rect x='1' y='1' width='24' height='17' rx='2' ry='2'></rect>
4430
- <line x1='1' y1='8' x2='25' y2='8'></line>
4450
+ <rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect>
4451
+ <line x1="1" y1="10" x2="23" y2="10"></line>
4431
4452
  </svg>
4432
4453
  <span class="${ne.srOnly}">Pay with</span>
4433
4454
  `);
@@ -4510,7 +4531,7 @@ class ml {
4510
4531
  // display venmo button
4511
4532
  displayVenmoButton(t) {
4512
4533
  Object.assign(this.venmoButton.style, hl), this.venmoButton.addEventListener("click", () => W(this, null, function* () {
4513
- if (this.events.onPaymentAttempt.emit(q.VENMO), !this.isProcessing) {
4534
+ if (this.events.onPaymentAttempt.emit(G.VENMO), !this.isProcessing) {
4514
4535
  this.isProcessing = !0, this.venmoButton.disabled = !0;
4515
4536
  try {
4516
4537
  const e = yield this.braintree.tokenize();
@@ -4651,19 +4672,19 @@ class vl {
4651
4672
  try {
4652
4673
  if (yield this.applePay.init({
4653
4674
  onError: (i) => {
4654
- this.events.error.emit(i), t == null || t.remove(), this.attempted.delete(q.APPLE_PAY);
4675
+ this.events.error.emit(i), t == null || t.remove(), this.attempted.delete(G.APPLE_PAY);
4655
4676
  },
4656
4677
  onCancel: () => {
4657
- this.events.cancel.emit(), this.attempted.delete(q.APPLE_PAY);
4678
+ this.events.cancel.emit(), this.attempted.delete(G.APPLE_PAY);
4658
4679
  },
4659
4680
  onSuccess: (i) => {
4660
- this.events.success.emit(J(H({}, i), { type: "apple" })), this.attempted.delete(q.APPLE_PAY);
4681
+ this.events.success.emit(J(H({}, i), { type: "apple" })), this.attempted.delete(G.APPLE_PAY);
4661
4682
  }
4662
4683
  })) {
4663
4684
  const i = this.applePay.render();
4664
4685
  t == null || t.appendChild(i);
4665
4686
  const s = () => {
4666
- this.attempted.has(q.APPLE_PAY) || (this.attempted.add(q.APPLE_PAY), this.events.onPaymentAttempt.emit(q.APPLE_PAY));
4687
+ this.attempted.has(G.APPLE_PAY) || (this.attempted.add(G.APPLE_PAY), this.events.onPaymentAttempt.emit(G.APPLE_PAY));
4667
4688
  };
4668
4689
  i.addEventListener("pointerdown", s, { capture: !0 }), i.addEventListener("click", s, { capture: !0 }), i.addEventListener(
4669
4690
  "keydown",
@@ -4720,19 +4741,19 @@ class vl {
4720
4741
  try {
4721
4742
  if (yield this.googlePay.init({
4722
4743
  onError: (i) => {
4723
- this.events.error.emit(i), t == null || t.remove(), this.attempted.delete(q.GOOGLE_PAY);
4744
+ this.events.error.emit(i), t == null || t.remove(), this.attempted.delete(G.GOOGLE_PAY);
4724
4745
  },
4725
4746
  onCancel: () => {
4726
- this.events.cancel.emit(), this.attempted.delete(q.GOOGLE_PAY);
4747
+ this.events.cancel.emit(), this.attempted.delete(G.GOOGLE_PAY);
4727
4748
  },
4728
4749
  onSuccess: (i) => {
4729
- this.events.success.emit(J(H({}, i), { type: "google" })), this.attempted.delete(q.GOOGLE_PAY);
4750
+ this.events.success.emit(J(H({}, i), { type: "google" })), this.attempted.delete(G.GOOGLE_PAY);
4730
4751
  }
4731
4752
  })) {
4732
4753
  const i = this.googlePay.render();
4733
4754
  t == null || t.appendChild(i);
4734
4755
  const s = () => {
4735
- this.attempted.has(q.GOOGLE_PAY) || (this.attempted.add(q.GOOGLE_PAY), this.events.onPaymentAttempt.emit(q.GOOGLE_PAY));
4756
+ this.attempted.has(G.GOOGLE_PAY) || (this.attempted.add(G.GOOGLE_PAY), this.events.onPaymentAttempt.emit(G.GOOGLE_PAY));
4736
4757
  };
4737
4758
  i.addEventListener("pointerdown", s, { capture: !0 }), i.addEventListener("click", s, { capture: !0 }), i.addEventListener(
4738
4759
  "keydown",
@@ -4790,11 +4811,13 @@ class vl {
4790
4811
  const a = this.paypal.render();
4791
4812
  if (t == null || t.appendChild(a), yield this.paypal.init({
4792
4813
  onError: (s) => {
4793
- this.events.error.emit(s), t == null || t.remove();
4814
+ this.events.error.emit(s), this.attempted.delete(G.PAYPAL);
4815
+ },
4816
+ onCancel: () => {
4817
+ this.events.cancel.emit(), this.attempted.delete(G.PAYPAL);
4794
4818
  },
4795
- onCancel: () => this.events.cancel.emit(),
4796
4819
  onSuccess: (s) => {
4797
- this.events.success.emit({ paypalId: s, type: "paypal" });
4820
+ this.events.success.emit({ paypalId: s, type: "paypal" }), this.attempted.delete(G.PAYPAL);
4798
4821
  }
4799
4822
  })) {
4800
4823
  const s = performance.now();
@@ -4924,7 +4947,7 @@ class vl {
4924
4947
  return W(this, null, function* () {
4925
4948
  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
4949
  let a = e.filter(({ is_active: h }) => h);
4927
- (r == null ? void 0 : r.variant) === "default" && (a = a.filter(({ type: h }) => h !== q.CARD)), this.initializeButtonInstances(a), this.buttons.innerHTML = "";
4950
+ (r == null ? void 0 : r.variant) === "default" && (a = a.filter(({ type: h }) => h !== G.CARD)), this.initializeButtonInstances(a), this.buttons.innerHTML = "";
4928
4951
  const i = a.sort((h, p) => h.order - p.order), s = /* @__PURE__ */ new Map();
4929
4952
  for (const { type: h } of i) {
4930
4953
  const p = document.createElement("div");
@@ -4933,15 +4956,15 @@ class vl {
4933
4956
  const o = performance.now(), c = i.map(({ type: h }) => {
4934
4957
  const p = s.get(h);
4935
4958
  switch (h) {
4936
- case q.APPLE_PAY:
4959
+ case G.APPLE_PAY:
4937
4960
  return this.initApple(p);
4938
- case q.GOOGLE_PAY:
4961
+ case G.GOOGLE_PAY:
4939
4962
  return this.initGoogle(p);
4940
- case q.PAYPAL:
4963
+ case G.PAYPAL:
4941
4964
  return this.initPayPal(p);
4942
- case q.VENMO:
4965
+ case G.VENMO:
4943
4966
  return this.initBraintreeVenmo(p);
4944
- case q.CARD:
4967
+ case G.CARD:
4945
4968
  return this.initCard(p);
4946
4969
  default:
4947
4970
  throw new Error("Unknown button type");
@@ -4966,7 +4989,7 @@ class vl {
4966
4989
  // initialize button instances only for active payment methods
4967
4990
  initializeButtonInstances(t) {
4968
4991
  const e = t.map(({ type: r }) => r);
4969
- e.includes(q.APPLE_PAY) && !this.applePay && (this.applePay = new Zc(this.config)), e.includes(q.GOOGLE_PAY) && !this.googlePay && (this.googlePay = new nl(this.config)), e.includes(q.PAYPAL) && !this.paypal && (this.paypal = new al(this.config), this.paypal.addEventListener("onPaymentAttempt", (r) => this.events.onPaymentAttempt.emit(r))), e.includes(q.VENMO) && !this.braintree && (this.braintree = new ml(this.config), this.braintree.addEventListener("onPaymentAttempt", (r) => this.events.onPaymentAttempt.emit(r))), e.includes(q.CARD) && !this.card && (this.card = new cl(this.config), this.card.addEventListener(() => {
4992
+ 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
4993
  this.events.open.emit();
4971
4994
  }));
4972
4995
  }
@@ -5029,7 +5052,7 @@ class El {
5029
5052
  return this.element;
5030
5053
  }
5031
5054
  }
5032
- const _l = "_button_1lwej_1", Cl = "_disabled_1lwej_18", Al = "_press_1lwej_28", wl = "_hidden_1lwej_32", Tl = "_spinner_1lwej_36", Te = {
5055
+ const _l = "_button_1lwej_1", Cl = "_disabled_1lwej_18", Al = "_press_1lwej_28", wl = "_hidden_1lwej_32", Tl = "_spinner_1lwej_36", _e = {
5033
5056
  button: _l,
5034
5057
  disabled: Cl,
5035
5058
  press: Al,
@@ -5041,7 +5064,8 @@ class Il {
5041
5064
  C(this, "element");
5042
5065
  C(this, "spinner", new Ni());
5043
5066
  C(this, "message", document.createElement("span"));
5044
- this.element = document.createElement("button"), this.element.setAttribute("type", "button"), this.element.classList.add(Te.button, Te.press), e != null && e.className && this.element.classList.add(e.className), e != null && e.styles && Object.assign(this.element.style, e.styles), this.spinner.addClass(Te.spinner), this.spinner.addClass(Te.hidden), this.message.textContent = t.messages().card.pay.button, this.element.append(this.spinner.render(), this.message), t.subscribe((r) => {
5067
+ C(this, "iconElement");
5068
+ this.element = document.createElement("button"), this.element.setAttribute("type", "button"), this.element.classList.add(_e.button, _e.press), e != null && e.className && this.element.classList.add(e.className), e != null && e.styles && Object.assign(this.element.style, e.styles), e != null && e.iconSvg && (this.iconElement = document.createElement("div"), this.iconElement.classList.add(ne.card), this.iconElement.innerHTML = e.iconSvg), this.spinner.addClass(_e.spinner), this.spinner.addClass(_e.hidden), this.message.textContent = t.messages().card.pay.button, this.element.append(this.spinner.render()), this.iconElement && this.element.append(this.iconElement), this.element.append(this.message), t.subscribe((r) => {
5045
5069
  this.message.textContent = r.messages.card.pay.button;
5046
5070
  });
5047
5071
  }
@@ -5049,7 +5073,7 @@ class Il {
5049
5073
  return this.element.addEventListener("click", t);
5050
5074
  }
5051
5075
  disable(t) {
5052
- t ? (this.element.setAttribute("disabled", "true"), this.element.classList.add(Te.disabled), this.spinner.removeClass(Te.hidden)) : (this.element.removeAttribute("disabled"), this.element.classList.remove(Te.disabled), this.spinner.addClass(Te.hidden));
5076
+ t ? (this.element.setAttribute("disabled", "true"), this.element.classList.add(_e.disabled), this.spinner.removeClass(_e.hidden), this.iconElement && this.iconElement.classList.add(_e.hidden)) : (this.element.removeAttribute("disabled"), this.element.classList.remove(_e.disabled), this.spinner.addClass(_e.hidden), this.iconElement && this.iconElement.classList.remove(_e.hidden));
5053
5077
  }
5054
5078
  render() {
5055
5079
  return this.element;
@@ -5123,11 +5147,16 @@ class Ul {
5123
5147
  validator(t) {
5124
5148
  return t ? null : le.Empty;
5125
5149
  }
5150
+ filterInput(t) {
5151
+ return t.replace(/[^a-zA-ZÀ-ÿ\s'-]/g, "");
5152
+ }
5126
5153
  handleChange(t) {
5127
- this.isDisabled || (this.isRequired = !1, this.isChanged || (this.isChanged = !0), this.events.change.emit({
5128
- value: t,
5129
- isValid: this.validator(t) === null
5130
- }), this.render());
5154
+ if (this.isDisabled) return;
5155
+ const e = this.filterInput(t);
5156
+ e !== t && (this.input.value = e), this.isRequired = !1, this.isChanged || (this.isChanged = !0), this.events.change.emit({
5157
+ value: e,
5158
+ isValid: this.validator(e) === null
5159
+ }), this.render();
5131
5160
  }
5132
5161
  toggleLabelError(t) {
5133
5162
  return W(this, null, function* () {
@@ -5159,15 +5188,15 @@ class Ul {
5159
5188
  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
5189
  }
5161
5190
  }
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", Gl = "_error_1dxfo_23", Yl = "_label_1dxfo_44", $l = "_labelError_1dxfo_48", ql = "_disabledInput_1dxfo_56", Ql = "_hidden_1dxfo_63", re = {
5191
+ 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
5192
  wrapper: Bl,
5164
5193
  inputContainer: zl,
5165
5194
  errorInput: jl,
5166
5195
  disabled: Hl,
5167
5196
  input: Kl,
5168
5197
  endContent: Wl,
5169
- error: Gl,
5170
- label: Yl,
5198
+ error: Yl,
5199
+ label: Gl,
5171
5200
  labelError: $l,
5172
5201
  disabledInput: ql,
5173
5202
  hidden: Ql
@@ -5620,7 +5649,7 @@ class vd {
5620
5649
  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
5650
  const a = document.createElement("div");
5622
5651
  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, (G) => "-" + G.toLowerCase()), S = Object.entries(e.placeholder.styles).map(([U, G]) => `${N(U)}:${G};`).join("");
5652
+ 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
5653
  this.placeholderStyle.textContent = `#${this.expiryId}::placeholder{${S}}#${this.cvcId}::placeholder{${S}}`, this.element.appendChild(this.placeholderStyle);
5625
5654
  }
5626
5655
  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), (P = e == null ? void 0 : e.error) != null && P.styles && Object.assign(this.cvcLabelError.style, e.error.styles), this.cvcLabel.append(this.cvcLabelText, this.cvcLabelError), this.cvcError.classList.add(Q.error, Q.hidden);
@@ -5637,9 +5666,9 @@ class vd {
5637
5666
  const U = this.expiryInput.value.replace(/\D/g, "");
5638
5667
  this.handleExpiryChange(U);
5639
5668
  }), this.expiryInput.addEventListener("paste", (N) => {
5640
- var G;
5669
+ var Y;
5641
5670
  N.preventDefault();
5642
- const U = (((G = N.clipboardData) == null ? void 0 : G.getData("text")) || "").replace(/\D/g, "");
5671
+ const U = (((Y = N.clipboardData) == null ? void 0 : Y.getData("text")) || "").replace(/\D/g, "");
5643
5672
  this.handleExpiryChange(U);
5644
5673
  }), this.expiryInput.addEventListener("keydown", (N) => {
5645
5674
  this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(N.key) || N.ctrlKey || N.metaKey || /^\d$/.test(N.key) || N.preventDefault();
@@ -5648,9 +5677,9 @@ class vd {
5648
5677
  const U = this.cvcInput.value.replace(/\D/g, "");
5649
5678
  this.handleCvcChange(U);
5650
5679
  }), this.cvcInput.addEventListener("paste", (N) => {
5651
- var G;
5680
+ var Y;
5652
5681
  N.preventDefault();
5653
- const U = (((G = N.clipboardData) == null ? void 0 : G.getData("text")) || "").replace(/\D/g, "");
5682
+ const U = (((Y = N.clipboardData) == null ? void 0 : Y.getData("text")) || "").replace(/\D/g, "");
5654
5683
  this.handleCvcChange(U);
5655
5684
  }), this.cvcInput.addEventListener("keydown", (N) => {
5656
5685
  this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(N.key) || N.ctrlKey || N.metaKey || /^\d$/.test(N.key) || N.preventDefault();
@@ -5811,7 +5840,7 @@ class gd {
5811
5840
  var p;
5812
5841
  c.preventDefault();
5813
5842
  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: q.CARD }), this.events.submit.emit({
5843
+ this.touchSubmit(), this.validate() && ((p = this.onPaymentAttempt) == null || p.call(this, { paymentMethod: G.CARD }), this.events.submit.emit({
5815
5844
  number: u,
5816
5845
  expiry: d,
5817
5846
  cvc: l,
@@ -5900,18 +5929,19 @@ const Cd = "_container_1e7lb_1", Ad = "_title_1e7lb_11", vr = {
5900
5929
  container: Cd,
5901
5930
  title: Ad
5902
5931
  }, Je = class Je {
5903
- constructor(t) {
5932
+ constructor(t, e) {
5904
5933
  C(this, "element");
5905
5934
  C(this, "message", document.createElement("p"));
5906
5935
  C(this, "icon", new Ct());
5907
5936
  C(this, "hasCustomMessage", !1);
5908
- this.translate = t, this.element = document.createElement("div"), this.element.classList.add(vr.container), this.message.classList.add(vr.title), this.message.textContent = t.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: e }) => {
5909
- this.hasCustomMessage || (this.message.textContent = e.status.error);
5937
+ C(this, "hasConfigMessage", !1);
5938
+ this.translate = t, this.element = document.createElement("div"), this.element.classList.add(vr.container), this.message.classList.add(vr.title), e ? (this.message.textContent = e, this.hasCustomMessage = !0, this.hasConfigMessage = !0) : this.message.textContent = t.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: r }) => {
5939
+ this.hasCustomMessage || (this.message.textContent = r.status.error);
5910
5940
  }), Je.instances.add(this);
5911
5941
  }
5912
5942
  // set message
5913
5943
  setMessage(t) {
5914
- this.message.textContent = t, this.hasCustomMessage = !!t;
5944
+ this.hasConfigMessage || (this.message.textContent = t, this.hasCustomMessage = !!t);
5915
5945
  }
5916
5946
  // add class name
5917
5947
  addClassName(t) {
@@ -5946,6 +5976,7 @@ class wd {
5946
5976
  C(this, "isLoading", !1);
5947
5977
  C(this, "isFormOpen", !1);
5948
5978
  C(this, "closedHeight", 0);
5979
+ C(this, "hasLoadedOnce", !1);
5949
5980
  C(this, "checkout");
5950
5981
  C(this, "container", document.createElement("div"));
5951
5982
  C(this, "loader", new Ec());
@@ -5963,7 +5994,10 @@ class wd {
5963
5994
  var r, a;
5964
5995
  return (a = (r = this.config.state.checkout.getState()).onCheckoutAttempt) == null ? void 0 : a.call(r, e);
5965
5996
  }
5966
- }), this.success = new _d(t.state.translate), this.success.addClassName(he.hidden), this.error = new en(t.state.translate), this.error.hide(), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(he.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
5997
+ }), this.success = new _d(t.state.translate), this.success.addClassName(he.hidden), this.error = new en(
5998
+ t.state.translate,
5999
+ t.state.checkout.getState().errorMessageText
6000
+ ), this.error.hide(), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(he.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
5967
6001
  }
5968
6002
  // init
5969
6003
  init() {
@@ -5973,16 +6007,17 @@ class wd {
5973
6007
  const e = this.config.state.checkout.getState();
5974
6008
  (r = e.onCheckoutAttempt) == null || r.call(e, { paymentMethod: t }), this.hideError();
5975
6009
  }), this.buttons.addEventListener("ready", () => W(this, null, function* () {
5976
- var e;
6010
+ var r;
5977
6011
  this.loader.setClassName(he.hidden);
5978
- const { variant: t } = this.config.state.checkout.getState();
6012
+ const { variant: t, onCheckoutLoaded: e } = this.config.state.checkout.getState();
5979
6013
  if (this.form.setDefaultVariant(t === "default"), this.buttons.showButton(), t === "default") {
5980
- const r = this.checkout.getBoundingClientRect().height;
5981
- r < 292 && (this.checkout.style.height = `${r}px`), this.form.element.classList.remove(he.hidden), r < 292 && (yield (e = this.checkout.animate(
5982
- { minHeight: [`${r}px`, "292px"] },
6014
+ const a = this.checkout.getBoundingClientRect().height;
6015
+ a < 292 && (this.checkout.style.height = `${a}px`), this.form.element.classList.remove(he.hidden), a < 292 && (yield (r = this.checkout.animate(
6016
+ { minHeight: [`${a}px`, "292px"] },
5983
6017
  { duration: 250, easing: "ease-out", fill: "forwards" }
5984
- ).finished) != null ? e : Promise.resolve(), this.checkout.style.height = ""), this.isFormOpen = !0;
6018
+ ).finished) != null ? r : Promise.resolve(), this.checkout.style.height = ""), this.isFormOpen = !0;
5985
6019
  }
6020
+ !this.hasLoadedOnce && e && (this.hasLoadedOnce = !0, e({ success: !0 }));
5986
6021
  })), this.buttons.addEventListener("open", () => W(this, null, function* () {
5987
6022
  var a;
5988
6023
  if (this.isLoading) return;
@@ -5999,15 +6034,17 @@ class wd {
5999
6034
  r != null ? r : Promise.resolve()
6000
6035
  ]), e < 292 && (this.checkout.style.height = ""), this.isFormOpen = !0;
6001
6036
  })), this.buttons.addEventListener("error", (t) => {
6002
- const { onCheckoutFail: e } = this.config.state.checkout.getState(), r = this.config.state.translate.messages(), a = _t(t, r);
6003
- this.showError(a), e == null || e({
6037
+ const { onCheckoutFail: e, onCheckoutLoaded: r } = this.config.state.checkout.getState(), a = this.config.state.translate.messages(), i = _t(t, a);
6038
+ this.showError(i);
6039
+ const s = {
6004
6040
  status: "failed",
6005
6041
  status_reason: {
6006
6042
  advice_code: "try_again_later",
6007
6043
  decline_code: Ft.GENERIC_DECLINE,
6008
6044
  message: t.message || t
6009
6045
  }
6010
- });
6046
+ };
6047
+ !this.hasLoadedOnce && r && (this.hasLoadedOnce = !0, r({ success: !1, error: s })), e == null || e(s);
6011
6048
  }), this.buttons.addEventListener("success", (t) => {
6012
6049
  const { clientToken: e } = this.config.state.checkout.getState();
6013
6050
  switch (t.type) {
@@ -6031,7 +6068,7 @@ class wd {
6031
6068
  let e = null;
6032
6069
  this.closedHeight > 0 && t > this.closedHeight && (this.checkout.style.height = `${t}px`, e = (i = this.checkout.animate(
6033
6070
  { minHeight: [`${t}px`, `${this.closedHeight}px`] },
6034
- { duration: 150, easing: "ease-out", fill: "forwards" }
6071
+ { duration: 250, easing: "ease-out", fill: "forwards" }
6035
6072
  ).finished) != null ? i : Promise.resolve()), yield ce(this.form.element, ke.close, ke.transition), this.form.element.classList.add(he.hidden);
6036
6073
  const { variant: a } = this.config.state.checkout.getState();
6037
6074
  if (a !== "default") {
@@ -6041,7 +6078,7 @@ class wd {
6041
6078
  }
6042
6079
  this.closedHeight > 0 && (e = (s = this.checkout.animate(
6043
6080
  { minHeight: [`${t}px`, `${this.closedHeight}px`] },
6044
- { duration: 100, easing: "ease-out", fill: "forwards" }
6081
+ { duration: 250, easing: "ease-out", fill: "forwards" }
6045
6082
  ).finished) != null ? s : Promise.resolve(), this.checkout.style.height = "auto"), this.isFormOpen = !1;
6046
6083
  })), this.form.addEventListener("submit", (t) => W(this, null, function* () {
6047
6084
  if (this.isLoading || (this.form.touchSubmit(), this.hideError(), !this.form.validate())) return;
@@ -6056,7 +6093,7 @@ class wd {
6056
6093
  cardBrand: t.cardBrand || "",
6057
6094
  number: s,
6058
6095
  cvc: o,
6059
- type: q.CARD,
6096
+ type: G.CARD,
6060
6097
  metadata: {
6061
6098
  name: t.name,
6062
6099
  userAgent: navigator == null ? void 0 : navigator.userAgent
@@ -6948,7 +6985,7 @@ const Pd = {
6948
6985
  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
6986
  invalidSession: "La tua sessione di pagamento è scaduta. Si prega di aggiornare la pagina per continuare."
6950
6987
  }
6951
- }, Gd = {
6988
+ }, Yd = {
6952
6989
  card: {
6953
6990
  required: "必須",
6954
6991
  number: {
@@ -6991,7 +7028,7 @@ const Pd = {
6991
7028
  error: "お支払い方法が拒否されました。これは、残高不足、有効期限切れのお支払い情報、またはセキュリティ制限が原因である可能性があります。お支払い情報を確認するか、別のお支払い方法をお試しください。",
6992
7029
  invalidSession: "お支払いセッションの有効期限が切れました。ページを更新して続行してください。"
6993
7030
  }
6994
- }, Yd = {
7031
+ }, Gd = {
6995
7032
  card: {
6996
7033
  required: "필수",
6997
7034
  number: {
@@ -7825,8 +7862,8 @@ const Pd = {
7825
7862
  hu: Hd,
7826
7863
  id: Kd,
7827
7864
  it: Wd,
7828
- ja: Gd,
7829
- ko: Yd,
7865
+ ja: Yd,
7866
+ ko: Gd,
7830
7867
  lt: $d,
7831
7868
  lv: qd,
7832
7869
  ms: Qd,
@@ -8348,18 +8385,18 @@ function wu() {
8348
8385
  return E === void 0 && (E = !0), s(this, void 0, void 0, function() {
8349
8386
  var A, B;
8350
8387
  return o(this, function(X) {
8351
- if (A = Y(), A && A[b.module]) {
8388
+ if (A = $(), A && A[b.module]) {
8352
8389
  if (T && ((x = A[b.module]) === null || x === void 0 ? void 0 : x.VERSION) !== T)
8353
8390
  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
8391
  return [2, !0];
8355
8392
  }
8356
8393
  if (!T)
8357
8394
  throw new Error("Attempted to load ".concat(b.module, " without specifying version"));
8358
- return [2, G(b, T, E)];
8395
+ return [2, Y(b, T, E)];
8359
8396
  });
8360
8397
  });
8361
8398
  }
8362
- function G(b, T, E) {
8399
+ function Y(b, T, E) {
8363
8400
  if (E === void 0 && (E = !0), N()) {
8364
8401
  var x = E ? b.amdModule.minified : b.amdModule.unminified;
8365
8402
  return new Promise(function(A, B) {
@@ -8372,13 +8409,13 @@ function wu() {
8372
8409
  src: "https://js.braintreegateway.com/web/".concat(T, "/js/").concat(D)
8373
8410
  });
8374
8411
  }
8375
- function Y() {
8412
+ function $() {
8376
8413
  return window == null ? void 0 : window.braintree;
8377
8414
  }
8378
8415
  var F, z, j = {
8379
8416
  Client: "client",
8380
8417
  HostedCardFields: "hostedFields"
8381
- }, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F), $ = (z = {}, z[j.Client] = {
8418
+ }, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F), q = (z = {}, z[j.Client] = {
8382
8419
  id: "client",
8383
8420
  module: j.Client,
8384
8421
  amdModule: {
@@ -8408,15 +8445,15 @@ function wu() {
8408
8445
  switch (A.label) {
8409
8446
  case 0:
8410
8447
  return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified, x = R(b), D = V(b), b.platform !== P.BT ? [3, 2] : [4, Promise.all([
8411
- U($.hostedFields, T, E),
8448
+ U(q.hostedFields, T, E),
8412
8449
  _(x, E)
8413
8450
  ])];
8414
8451
  case 1:
8415
8452
  return A.sent(), [3, 5];
8416
8453
  case 2:
8417
8454
  return b.platform !== P.PPCP ? [3, 4] : [4, Promise.all([
8418
- U($.client, T, E),
8419
- U($.hostedFields, T, E),
8455
+ U(q.client, T, E),
8456
+ U(q.hostedFields, T, E),
8420
8457
  _(x, E)
8421
8458
  ])];
8422
8459
  case 3:
@@ -8467,10 +8504,10 @@ function wu() {
8467
8504
  i.constants = I, i.loadAxo = K;
8468
8505
  });
8469
8506
  }, {}], 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, P = e("../lib/methods"), N = e("../lib/convert-methods-to-error"), S = e("../lib/assets"), U = e("../lib/constants").FRAUDNET_FNCLS, G = e("../lib/constants").FRAUDNET_SOURCE, Y = e("../lib/constants").FRAUDNET_URL, F = {};
8507
+ 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, P = 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
8508
  function z(M) {
8472
- var $, K;
8473
- if (M = M || {}, $ = JSON.stringify(M), K = M.gatewayConfiguration, !K)
8509
+ var q, K;
8510
+ if (M = M || {}, q = JSON.stringify(M), K = M.gatewayConfiguration, !K)
8474
8511
  throw new l(O.CLIENT_MISSING_GATEWAY_CONFIGURATION);
8475
8512
  if (["assetsUrl", "clientApiUrl", "configUrl"].forEach(function(_) {
8476
8513
  if (_ in K && !c(K[_]))
@@ -8480,7 +8517,7 @@ function wu() {
8480
8517
  message: _ + " property is on an invalid domain."
8481
8518
  });
8482
8519
  }), this.getConfiguration = function() {
8483
- return JSON.parse($);
8520
+ return JSON.parse(q);
8484
8521
  }, this._request = o, this._configuration = this.getConfiguration(), this._clientApiBaseUrl = K.clientApiUrl + "/v1/", K.graphQL) {
8485
8522
  if (!c(K.graphQL.url))
8486
8523
  throw new l({
@@ -8494,7 +8531,7 @@ function wu() {
8494
8531
  }
8495
8532
  }
8496
8533
  z.initialize = function(M) {
8497
- var $, K, _ = F[M.authorization];
8534
+ var q, K, _ = F[M.authorization];
8498
8535
  if (_)
8499
8536
  return w.sendEvent(_, "custom.client.load.cached"), _;
8500
8537
  try {
@@ -8506,18 +8543,18 @@ function wu() {
8506
8543
  }
8507
8544
  return _ = u(K, M.sessionId).then(
8508
8545
  function(g) {
8509
- return M.debug && (g.isDebug = !0), g.authorization = M.authorization, $ = new z(g), $;
8546
+ return M.debug && (g.isDebug = !0), g.authorization = M.authorization, q = new z(g), q;
8510
8547
  }
8511
8548
  ), F[M.authorization] = _, w.sendEvent(_, "custom.client.load.initialized"), _.then(function(g) {
8512
- return w.sendEvent($, "custom.client.load.succeeded"), g;
8549
+ return w.sendEvent(q, "custom.client.load.succeeded"), g;
8513
8550
  }).catch(function(g) {
8514
8551
  return delete F[M.authorization], Promise.reject(g);
8515
8552
  });
8516
8553
  }, z.clearCache = function() {
8517
8554
  F = {};
8518
8555
  }, z.prototype._findOrCreateFraudnetJSON = function(M) {
8519
- var $ = document.querySelector('script[fncls="' + U + '"]'), K, _, g, R;
8520
- $ || ($ = document.body.appendChild(document.createElement("script")), $.type = "application/json", $.setAttribute("fncls", U)), K = this.getConfiguration(), _ = {
8556
+ var q = document.querySelector('script[fncls="' + U + '"]'), K, _, g, R;
8557
+ q || (q = document.body.appendChild(document.createElement("script")), q.type = "application/json", q.setAttribute("fncls", U)), K = this.getConfiguration(), _ = {
8521
8558
  rda_tenant: "bt_card",
8522
8559
  // eslint-disable-line camelcase
8523
8560
  mid: K.gatewayConfiguration.merchantId
@@ -8528,9 +8565,9 @@ function wu() {
8528
8565
  f: M.substr(0, 32),
8529
8566
  fp: _,
8530
8567
  bu: !1,
8531
- s: G
8532
- }, $.text = JSON.stringify(R);
8533
- }, z.prototype.request = function(M, $) {
8568
+ s: Y
8569
+ }, q.text = JSON.stringify(R);
8570
+ }, z.prototype.request = function(M, q) {
8534
8571
  var K = this, _ = new Promise(function(g, R) {
8535
8572
  var V, b, T, E, x = !!(M.endpoint === "payment_methods/credit_cards" && K.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);
8536
8573
  if (M.api !== "graphQLApi" && (M.method ? M.endpoint || (V = "options.endpoint") : V = "options.method"), V)
@@ -8589,25 +8626,25 @@ function wu() {
8589
8626
  return;
8590
8627
  }
8591
8628
  X = y({ _httpStatus: B }, A), x && X.creditCards && X.creditCards.length > 0 && (K._findOrCreateFraudnetJSON(X.creditCards[0].nonce), S.loadScript({
8592
- src: Y,
8629
+ src: $,
8593
8630
  forceScriptReload: !0
8594
8631
  })), g(X);
8595
8632
  });
8596
8633
  });
8597
- if (typeof $ == "function") {
8598
- $ = m(v($)), _.then(function(g) {
8599
- $(null, g, g._httpStatus);
8634
+ if (typeof q == "function") {
8635
+ q = m(v(q)), _.then(function(g) {
8636
+ q(null, g, g._httpStatus);
8600
8637
  }).catch(function(g) {
8601
8638
  var R = g && g.details && g.details.httpStatus;
8602
- $(g, null, R);
8639
+ q(g, null, R);
8603
8640
  });
8604
8641
  return;
8605
8642
  }
8606
8643
  return _;
8607
8644
  };
8608
- function j(M, $) {
8645
+ function j(M, q) {
8609
8646
  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($, {
8647
+ 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
8648
  type: O.CLIENT_REQUEST_ERROR.type,
8612
8649
  code: O.CLIENT_REQUEST_ERROR.code,
8613
8650
  message: O.CLIENT_REQUEST_ERROR.message
@@ -8623,9 +8660,9 @@ function wu() {
8623
8660
  return delete F[M.getConfiguration().authorization], N(M, P(z.prototype)), Promise.resolve();
8624
8661
  });
8625
8662
  function ee(M) {
8626
- var $ = M.authorizationFingerprint || M.authorization;
8663
+ var q = M.authorizationFingerprint || M.authorization;
8627
8664
  return {
8628
- Authorization: "Bearer " + $,
8665
+ Authorization: "Bearer " + q,
8629
8666
  "Braintree-Version": i
8630
8667
  };
8631
8668
  }
@@ -8723,16 +8760,16 @@ function wu() {
8723
8760
  url: h[v.environment],
8724
8761
  features: ["configuration"]
8725
8762
  }
8726
- }), N.metadata = U), o(N, function(G, Y, F) {
8763
+ }), N.metadata = U), o(N, function(Y, $, F) {
8727
8764
  var z;
8728
- if (G) {
8765
+ if (Y) {
8729
8766
  F === 403 ? z = d.CLIENT_AUTHORIZATION_INSUFFICIENT : F === 401 ? z = d.CLIENT_AUTHORIZATION_INVALID : z = d.CLIENT_GATEWAY_NETWORK, O(
8730
8767
  new i({
8731
8768
  type: z.type,
8732
8769
  code: z.code,
8733
8770
  message: z.message,
8734
8771
  details: {
8735
- originalError: G
8772
+ originalError: Y
8736
8773
  }
8737
8774
  })
8738
8775
  );
@@ -8742,7 +8779,7 @@ function wu() {
8742
8779
  authorizationType: I.tokenizationKey ? "TOKENIZATION_KEY" : "CLIENT_TOKEN",
8743
8780
  authorizationFingerprint: I.authorizationFingerprint,
8744
8781
  analyticsMetadata: U,
8745
- gatewayConfiguration: Y
8782
+ gatewayConfiguration: $
8746
8783
  }, w(L);
8747
8784
  });
8748
8785
  });
@@ -8779,11 +8816,11 @@ function wu() {
8779
8816
  return L === "UNKNOWN" || L === "INTERNAL";
8780
8817
  }
8781
8818
  function y(O, L, I) {
8782
- var P, N, S, U, G, Y, F, z = O.url, j = O.graphQL, ee = O.timeout, M = l.getRequestObject(), $ = I, K = !!(j && j.isGraphQLRequest(z, O.data));
8819
+ var P, 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
8820
  O.headers = s(
8784
8821
  { "Content-Type": "application/json" },
8785
8822
  O.headers
8786
- ), K ? S = new u(O) : S = new h(O), z = S.getUrl(), U = S.getBody(), G = S.getMethod(), Y = S.getHeaders(), G === "GET" && (z = i.queryify(z, U), U = null), d ? M.onreadystatechange = function() {
8823
+ ), 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
8824
  if (M.readyState === 4) {
8788
8825
  if (M.status === 0 && K) {
8789
8826
  delete O.graphQL, y(O, L, I);
@@ -8798,31 +8835,31 @@ function wu() {
8798
8835
  L++, y(O, L, I);
8799
8836
  return;
8800
8837
  }
8801
- $(N || "error", null, P || 500);
8838
+ q(N || "error", null, P || 500);
8802
8839
  } else
8803
- $(null, N, P);
8840
+ q(null, N, P);
8804
8841
  }
8805
- } : (O.headers && (z = i.queryify(z, Y)), M.onload = function() {
8806
- $(null, c(M.responseText), M.status);
8842
+ } : (O.headers && (z = i.queryify(z, $)), M.onload = function() {
8843
+ q(null, c(M.responseText), M.status);
8807
8844
  }, M.onerror = function() {
8808
- $("error", null, 500);
8845
+ q("error", null, 500);
8809
8846
  }, M.onprogress = function() {
8810
8847
  }, M.ontimeout = function() {
8811
- $("timeout", null, -1);
8848
+ q("timeout", null, -1);
8812
8849
  });
8813
8850
  try {
8814
- M.open(G, z, !0);
8851
+ M.open(Y, z, !0);
8815
8852
  } catch (_) {
8816
8853
  if (!K)
8817
8854
  throw _;
8818
8855
  delete O.graphQL, y(O, L, I);
8819
8856
  return;
8820
8857
  }
8821
- M.timeout = ee, d && Object.keys(Y).forEach(function(_) {
8822
- M.setRequestHeader(_, Y[_]);
8858
+ M.timeout = ee, d && Object.keys($).forEach(function(_) {
8859
+ M.setRequestHeader(_, $[_]);
8823
8860
  });
8824
8861
  try {
8825
- M.send(o(G, U));
8862
+ M.send(o(Y, U));
8826
8863
  } catch (_) {
8827
8864
  }
8828
8865
  }
@@ -10017,18 +10054,18 @@ function Ou() {
10017
10054
  return E === void 0 && (E = !0), s(this, void 0, void 0, function() {
10018
10055
  var A, B;
10019
10056
  return o(this, function(X) {
10020
- if (A = Y(), A && A[b.module]) {
10057
+ if (A = $(), A && A[b.module]) {
10021
10058
  if (T && ((x = A[b.module]) === null || x === void 0 ? void 0 : x.VERSION) !== T)
10022
10059
  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
10060
  return [2, !0];
10024
10061
  }
10025
10062
  if (!T)
10026
10063
  throw new Error("Attempted to load ".concat(b.module, " without specifying version"));
10027
- return [2, G(b, T, E)];
10064
+ return [2, Y(b, T, E)];
10028
10065
  });
10029
10066
  });
10030
10067
  }
10031
- function G(b, T, E) {
10068
+ function Y(b, T, E) {
10032
10069
  if (E === void 0 && (E = !0), N()) {
10033
10070
  var x = E ? b.amdModule.minified : b.amdModule.unminified;
10034
10071
  return new Promise(function(A, B) {
@@ -10041,13 +10078,13 @@ function Ou() {
10041
10078
  src: "https://js.braintreegateway.com/web/".concat(T, "/js/").concat(D)
10042
10079
  });
10043
10080
  }
10044
- function Y() {
10081
+ function $() {
10045
10082
  return window == null ? void 0 : window.braintree;
10046
10083
  }
10047
10084
  var F, z, j = {
10048
10085
  Client: "client",
10049
10086
  HostedCardFields: "hostedFields"
10050
- }, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F), $ = (z = {}, z[j.Client] = {
10087
+ }, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F), q = (z = {}, z[j.Client] = {
10051
10088
  id: "client",
10052
10089
  module: j.Client,
10053
10090
  amdModule: {
@@ -10077,15 +10114,15 @@ function Ou() {
10077
10114
  switch (A.label) {
10078
10115
  case 0:
10079
10116
  return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified, x = R(b), D = V(b), b.platform !== P.BT ? [3, 2] : [4, Promise.all([
10080
- U($.hostedFields, T, E),
10117
+ U(q.hostedFields, T, E),
10081
10118
  _(x, E)
10082
10119
  ])];
10083
10120
  case 1:
10084
10121
  return A.sent(), [3, 5];
10085
10122
  case 2:
10086
10123
  return b.platform !== P.PPCP ? [3, 4] : [4, Promise.all([
10087
- U($.client, T, E),
10088
- U($.hostedFields, T, E),
10124
+ U(q.client, T, E),
10125
+ U(q.hostedFields, T, E),
10089
10126
  _(x, E)
10090
10127
  ])];
10091
10128
  case 3:
@@ -10934,18 +10971,18 @@ function xu() {
10934
10971
  return E === void 0 && (E = !0), s(this, void 0, void 0, function() {
10935
10972
  var A, B;
10936
10973
  return o(this, function(X) {
10937
- if (A = Y(), A && A[b.module]) {
10974
+ if (A = $(), A && A[b.module]) {
10938
10975
  if (T && ((x = A[b.module]) === null || x === void 0 ? void 0 : x.VERSION) !== T)
10939
10976
  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
10977
  return [2, !0];
10941
10978
  }
10942
10979
  if (!T)
10943
10980
  throw new Error("Attempted to load ".concat(b.module, " without specifying version"));
10944
- return [2, G(b, T, E)];
10981
+ return [2, Y(b, T, E)];
10945
10982
  });
10946
10983
  });
10947
10984
  }
10948
- function G(b, T, E) {
10985
+ function Y(b, T, E) {
10949
10986
  if (E === void 0 && (E = !0), N()) {
10950
10987
  var x = E ? b.amdModule.minified : b.amdModule.unminified;
10951
10988
  return new Promise(function(A, B) {
@@ -10958,13 +10995,13 @@ function xu() {
10958
10995
  src: "https://js.braintreegateway.com/web/".concat(T, "/js/").concat(D)
10959
10996
  });
10960
10997
  }
10961
- function Y() {
10998
+ function $() {
10962
10999
  return window == null ? void 0 : window.braintree;
10963
11000
  }
10964
11001
  var F, z, j = {
10965
11002
  Client: "client",
10966
11003
  HostedCardFields: "hostedFields"
10967
- }, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F), $ = (z = {}, z[j.Client] = {
11004
+ }, ee = "braintree", M = (F = {}, F[j.Client] = "client", F[j.HostedCardFields] = "hosted-fields", F), q = (z = {}, z[j.Client] = {
10968
11005
  id: "client",
10969
11006
  module: j.Client,
10970
11007
  amdModule: {
@@ -10994,15 +11031,15 @@ function xu() {
10994
11031
  switch (A.label) {
10995
11032
  case 0:
10996
11033
  return performance.mark("pp_axo_sdk_init_invoked"), T = b.btSdkVersion, E = b.minified, x = R(b), D = V(b), b.platform !== P.BT ? [3, 2] : [4, Promise.all([
10997
- U($.hostedFields, T, E),
11034
+ U(q.hostedFields, T, E),
10998
11035
  _(x, E)
10999
11036
  ])];
11000
11037
  case 1:
11001
11038
  return A.sent(), [3, 5];
11002
11039
  case 2:
11003
11040
  return b.platform !== P.PPCP ? [3, 4] : [4, Promise.all([
11004
- U($.client, T, E),
11005
- U($.hostedFields, T, E),
11041
+ U(q.client, T, E),
11042
+ U(q.hostedFields, T, E),
11006
11043
  _(x, E)
11007
11044
  ])];
11008
11045
  case 3:
@@ -12547,18 +12584,18 @@ function xu() {
12547
12584
  };
12548
12585
  o.suppressUnhandledPromiseMessage = !0;
12549
12586
  function v(N) {
12550
- var S = N.frameServiceInstance, U = N.venmoUrl, G = N.checkForStatusChange, Y = N.cancelTokenization, F = N.checkPaymentContextStatus, z = new o();
12587
+ var S = N.frameServiceInstance, U = N.venmoUrl, Y = N.checkForStatusChange, $ = N.cancelTokenization, F = N.checkPaymentContextStatus, z = new o();
12551
12588
  return document.getElementById(m.continueButton).addEventListener("click", function() {
12552
12589
  S.focus();
12553
12590
  }), document.getElementById(m.cancelButton).addEventListener("click", function() {
12554
- S.close(), Y(), w();
12591
+ S.close(), $(), w();
12555
12592
  }), S.open({}, function(j) {
12556
12593
  var ee = 1;
12557
- j ? z.reject(j) : G(ee).then(function(M) {
12594
+ j ? z.reject(j) : Y(ee).then(function(M) {
12558
12595
  z.resolve(M);
12559
12596
  }).catch(function(M) {
12560
- F().then(function($) {
12561
- $.status === "CREATED" ? z.reject(
12597
+ F().then(function(q) {
12598
+ q.status === "CREATED" ? z.reject(
12562
12599
  new l(c.VENMO_CUSTOMER_CANCELED)
12563
12600
  ) : z.reject(M);
12564
12601
  });
@@ -12615,7 +12652,7 @@ function xu() {
12615
12652
  "color: #FFFFFF;",
12616
12653
  "margin-top: 28px;",
12617
12654
  "}"
12618
- ], G = [
12655
+ ], Y = [
12619
12656
  "#" + m.continueButton + " {",
12620
12657
  "width: 400px;",
12621
12658
  "height: 50px;",
@@ -12629,7 +12666,7 @@ function xu() {
12629
12666
  "color: #FFFFFF;",
12630
12667
  "margin-top: 44px;",
12631
12668
  "}"
12632
- ], Y = [
12669
+ ], $ = [
12633
12670
  "#" + m.message + " {",
12634
12671
  "font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;",
12635
12672
  "font-style: normal;",
@@ -12655,33 +12692,33 @@ function xu() {
12655
12692
  ], z = N.concat(
12656
12693
  S,
12657
12694
  U,
12658
- G,
12659
12695
  Y,
12696
+ $,
12660
12697
  F
12661
12698
  );
12662
12699
  return z.join(`
12663
12700
  `);
12664
12701
  }
12665
12702
  function L(N) {
12666
- var S = document.getElementById(m.backdrop), U, G, Y, F, z, j, ee, M;
12703
+ var S = document.getElementById(m.backdrop), U, Y, $, F, z, j, ee, M;
12667
12704
  if (S) {
12668
12705
  S.classList.remove("hidden");
12669
12706
  return;
12670
12707
  }
12671
- U = document.createElement("style"), G = document.createElement("div"), Y = 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(), G.id = m.backdrop, Y.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), Y.appendChild(F), Y.appendChild(z), Y.appendChild(j), Y.appendChild(ee), Y.appendChild(M), G.appendChild(Y), document.body.appendChild(G), G.addEventListener("click", function($) {
12672
- $.stopPropagation();
12708
+ 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) {
12709
+ q.stopPropagation();
12673
12710
  });
12674
12711
  }
12675
12712
  function I(N) {
12676
12713
  return L(N.styleCspNonce), v(N);
12677
12714
  }
12678
12715
  function P(N) {
12679
- var S = new o(), U = "venmoDesktopWebLogin", G = N.assetsUrl, Y = N.debug || !1, F = y(), z = G + "/web/" + d + "/html";
12716
+ var S = new o(), U = "venmoDesktopWebLogin", Y = N.assetsUrl, $ = N.debug || !1, F = y(), z = Y + "/web/" + d + "/html";
12680
12717
  return i.create(
12681
12718
  {
12682
12719
  name: U,
12683
- dispatchFrameUrl: z + "/dispatch-frame" + s(Y) + ".html",
12684
- openFrameUrl: z + "/venmo-landing-frame" + s(Y) + ".html",
12720
+ dispatchFrameUrl: z + "/dispatch-frame" + s($) + ".html",
12721
+ openFrameUrl: z + "/venmo-landing-frame" + s($) + ".html",
12685
12722
  top: F.top,
12686
12723
  left: F.left,
12687
12724
  height: f,
@@ -12700,7 +12737,7 @@ function xu() {
12700
12737
  POPUP_HEIGHT: f
12701
12738
  };
12702
12739
  }, { "../../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"), P = e("../lib/url-params"), N = e("./external/"), S = e("./external/queries"), U = "3.126.0", G = 250, Y = 3e5;
12740
+ 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"), P = e("../lib/url-params"), N = e("./external/"), S = e("./external/queries"), U = "3.126.0", Y = 250, $ = 3e5;
12704
12741
  w.suppressUnhandledPromiseMessage = !0;
12705
12742
  function F(_) {
12706
12743
  var g = this;
@@ -12745,7 +12782,7 @@ function xu() {
12745
12782
  "venmo.desktop-flow.setup-failed"
12746
12783
  ), g._useDesktopQRFlow = !1, R;
12747
12784
  });
12748
- }) : this._shouldCreateVenmoPaymentContext && (this._mobilePollingInterval = G, this._mobilePollingExpiresThreshold = Y, this._createPromise = this._createPromise.then(function(R) {
12785
+ }) : this._shouldCreateVenmoPaymentContext && (this._mobilePollingInterval = Y, this._mobilePollingExpiresThreshold = $, this._createPromise = this._createPromise.then(function(R) {
12749
12786
  var V, b, T = g._cannotHaveReturnUrls ? "manual-return" : "mobile-payment-context", E = R.getConfiguration();
12750
12787
  return b = L.setupDesktopWebLogin({
12751
12788
  assetsUrl: E.gatewayConfiguration.assetsUrl,
@@ -13158,7 +13195,7 @@ function xu() {
13158
13195
  }, this.getUrl().then(function(T) {
13159
13196
  return g.appSwitch(T), setTimeout(function() {
13160
13197
  window.document.addEventListener(
13161
- $(),
13198
+ q(),
13162
13199
  g._visibilityChangeListener
13163
13200
  );
13164
13201
  }, l.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY), g._tokenizePromise;
@@ -13224,7 +13261,7 @@ function xu() {
13224
13261
  );
13225
13262
  }, F.prototype._removeVisibilityEventListener = function() {
13226
13263
  window.removeEventListener("hashchange", this._onHashChangeListener), window.document.removeEventListener(
13227
- $(),
13264
+ q(),
13228
13265
  this._visibilityChangeListener
13229
13266
  ), delete this._visibilityChangeListener, delete this._onHashChangeListener;
13230
13267
  }, F.prototype.processHashChangeFlowResults = function(_) {
@@ -13315,7 +13352,7 @@ function xu() {
13315
13352
  _.payerInfo.userName
13316
13353
  )), g;
13317
13354
  }
13318
- function $() {
13355
+ function q() {
13319
13356
  var _;
13320
13357
  return typeof window.document.hidden != "undefined" ? _ = "visibilitychange" : typeof window.document.msHidden != "undefined" ? _ = "msvisibilitychange" : typeof window.document.webkitHidden != "undefined" && (_ = "webkitvisibilitychange"), _;
13321
13358
  }
@@ -13433,6 +13470,6 @@ class Uu {
13433
13470
  export {
13434
13471
  Uu as Core,
13435
13472
  Du as PayNextCheckout,
13436
- q as PaymentMethod
13473
+ G as PaymentMethod
13437
13474
  };
13438
13475
  //# sourceMappingURL=index.es.js.map