@paynext/sdk 0.0.123 → 0.0.124

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
@@ -9,7 +9,7 @@ var xt = (n, e, t) => e in n ? Er(n, e, { enumerable: !0, configurable: !0, writ
9
9
  for (var t of ot(e))
10
10
  Cn.call(e, t) && xt(n, t, e[t]);
11
11
  return n;
12
- }, I = (n, e) => kr(n, xr(e));
12
+ }, M = (n, e) => kr(n, xr(e));
13
13
  var ae = (n, e) => {
14
14
  var t = {};
15
15
  for (var i in n)
@@ -20,7 +20,7 @@ var ae = (n, e) => {
20
20
  return t;
21
21
  };
22
22
  var c = (n, e, t) => xt(n, typeof e != "symbol" ? e + "" : e, t);
23
- var E = (n, e, t) => new Promise((i, r) => {
23
+ var k = (n, e, t) => new Promise((i, r) => {
24
24
  var a = (l) => {
25
25
  try {
26
26
  o(t.next(l));
@@ -44,7 +44,7 @@ class iu {
44
44
  typeof window != "undefined" && (this.parent = e);
45
45
  }
46
46
  mount(e) {
47
- return E(this, null, function* () {
47
+ return k(this, null, function* () {
48
48
  if (!this.parent)
49
49
  return;
50
50
  if (!this.core) {
@@ -62,7 +62,7 @@ class iu {
62
62
  });
63
63
  }
64
64
  unmount() {
65
- return E(this, null, function* () {
65
+ return k(this, null, function* () {
66
66
  !this.parent || !this.core || (this.parent.innerHTML = "", this.core.clearState());
67
67
  });
68
68
  }
@@ -171,7 +171,7 @@ const En = {
171
171
  state: ((b = e == null ? void 0 : e.billingContact) == null ? void 0 : b.administrativeArea) || ((y = t == null ? void 0 : t.billingAddress) == null ? void 0 : y.administrativeArea) || void 0
172
172
  };
173
173
  }, xn = (n) => {
174
- var r, a, s, o, l, u, d, h, m, p, g, b, y, k, V, L, M, T, D;
174
+ var r, a, s, o, l, u, d, h, m, p, g, b, y, C, V, T, I, A, D;
175
175
  const { card: e, googlePay: t, applePay: i } = n;
176
176
  if (!(!e && !(t != null && t.card) && !(i != null && i.card)))
177
177
  return {
@@ -185,9 +185,9 @@ const En = {
185
185
  type: (e == null ? void 0 : e.type) || ((g = t == null ? void 0 : t.card) == null ? void 0 : g.segment) || ((b = i == null ? void 0 : i.card) == null ? void 0 : b.segment)
186
186
  },
187
187
  cvc: e == null ? void 0 : e.cvc,
188
- exp_month: e != null && e.expMonth || (y = t == null ? void 0 : t.card) != null && y.expiry.month ? Number((e == null ? void 0 : e.expMonth) || ((k = t == null ? void 0 : t.card) == null ? void 0 : k.expiry.month)) : void 0,
189
- exp_year: e != null && e.expYear || (V = t == null ? void 0 : t.card) != null && V.expiry.year ? Number((e == null ? void 0 : e.expYear) || ((L = t == null ? void 0 : t.card) == null ? void 0 : L.expiry.year)) : void 0,
190
- last4: (e == null ? void 0 : e.lastFourDigits) || ((M = t == null ? void 0 : t.card) == null ? void 0 : M.lastFour) || ((T = i == null ? void 0 : i.card) == null ? void 0 : T.lastFour),
188
+ exp_month: e != null && e.expMonth || (y = t == null ? void 0 : t.card) != null && y.expiry.month ? Number((e == null ? void 0 : e.expMonth) || ((C = t == null ? void 0 : t.card) == null ? void 0 : C.expiry.month)) : void 0,
189
+ exp_year: e != null && e.expYear || (V = t == null ? void 0 : t.card) != null && V.expiry.year ? Number((e == null ? void 0 : e.expYear) || ((T = t == null ? void 0 : t.card) == null ? void 0 : T.expiry.year)) : void 0,
190
+ last4: (e == null ? void 0 : e.lastFourDigits) || ((I = t == null ? void 0 : t.card) == null ? void 0 : I.lastFour) || ((A = i == null ? void 0 : i.card) == null ? void 0 : A.lastFour),
191
191
  number: (e == null ? void 0 : e.number) || ((D = t == null ? void 0 : t.card) == null ? void 0 : D.number)
192
192
  };
193
193
  }, wn = (n) => {
@@ -203,16 +203,16 @@ const En = {
203
203
  };
204
204
  switch (e) {
205
205
  case x.CARD:
206
- return I(v({}, t), {
206
+ return M(v({}, t), {
207
207
  name: wn(n),
208
208
  card: Lr(n)
209
209
  });
210
210
  case x.PAYPAL:
211
- return I(v({}, t), {
211
+ return M(v({}, t), {
212
212
  paypal: _r(n)
213
213
  });
214
214
  case x.GOOGLE_PAY:
215
- return I(v({}, t), {
215
+ return M(v({}, t), {
216
216
  name: (r = (i = n.googlePay) == null ? void 0 : i.billingAddress) == null ? void 0 : r.name,
217
217
  phone: (l = (o = (s = (a = n.googlePay) == null ? void 0 : a.billingAddress) == null ? void 0 : s.phoneNumber) == null ? void 0 : o.replace(/ /g, "")) == null ? void 0 : l.replace(/-/g, ""),
218
218
  card: xn(n),
@@ -220,7 +220,7 @@ const En = {
220
220
  billing_address: kn(n)
221
221
  });
222
222
  case x.APPLE_PAY:
223
- return I(v({}, t), {
223
+ return M(v({}, t), {
224
224
  name: wn(n),
225
225
  card: xn(n),
226
226
  apple_pay: Ir(n),
@@ -228,13 +228,13 @@ const En = {
228
228
  billing_address: kn(n)
229
229
  });
230
230
  case x.VENMO:
231
- return I(v({}, t), {
231
+ return M(v({}, t), {
232
232
  venmo: Mr(n)
233
233
  });
234
234
  default:
235
235
  throw new Error(`Unsupported payment method: ${e}`);
236
236
  }
237
- }, Dr = (n, e, t) => E(void 0, null, function* () {
237
+ }, Dr = (n, e, t) => k(void 0, null, function* () {
238
238
  const i = `${Xt(e)}/payments/create`, r = new Headers();
239
239
  r.append("Content-Type", "application/json"), r.append("X-API-Version", t);
240
240
  const a = Pr(n);
@@ -243,14 +243,14 @@ const En = {
243
243
  headers: r,
244
244
  body: JSON.stringify(a)
245
245
  })).json();
246
- }), Or = (n, e, t) => E(void 0, null, function* () {
246
+ }), Or = (n, e, t) => k(void 0, null, function* () {
247
247
  const i = `${Xt(e)}/payments/create/billing/agreement`, r = new Headers();
248
248
  return r.append("Content-Type", "application/json"), r.append("X-API-Version", t), (yield (yield fetch(i, {
249
249
  method: "POST",
250
250
  headers: r,
251
251
  body: JSON.stringify({ client_session: n })
252
252
  })).json()).paypal_agreement_token_response.token_id || "";
253
- }), Rr = (n, e, t) => E(void 0, null, function* () {
253
+ }), Rr = (n, e, t) => k(void 0, null, function* () {
254
254
  const i = new Headers();
255
255
  i.append("X-API-Version", t);
256
256
  const r = `${Xt(e)}/payments/config?client_session_id=${n}`, s = yield (yield fetch(r, { headers: i })).json();
@@ -264,7 +264,7 @@ let Nr = class {
264
264
  this.ev = e;
265
265
  }
266
266
  init(u, d) {
267
- return E(this, arguments, function* ({
267
+ return k(this, arguments, function* ({
268
268
  transaction: e,
269
269
  locale: t,
270
270
  // supportedCardTypes,
@@ -275,7 +275,7 @@ let Nr = class {
275
275
  onPaymentAttempt: o
276
276
  }, l) {
277
277
  const h = this.ev.transactions.create(e);
278
- this.apple = this.ev.ui.applePay(h, I(v({
278
+ this.apple = this.ev.ui.applePay(h, M(v({
279
279
  locale: t,
280
280
  borderRadius: 12,
281
281
  size: {
@@ -288,14 +288,14 @@ let Nr = class {
288
288
  allowedCardNetworks: ["visa", "masterCard"],
289
289
  requestBillingAddress: !0,
290
290
  requestPayerDetails: ["name", "email", "phone"],
291
- process: (b, y) => E(this, [b, y], function* (p, { fail: g }) {
291
+ process: (b, y) => k(this, [b, y], function* (p, { fail: g }) {
292
292
  o == null || o({
293
293
  paymentMethod: x.GOOGLE_PAY
294
294
  });
295
295
  try {
296
296
  a == null || a(p);
297
- } catch (k) {
298
- console.error(k), g({
297
+ } catch (C) {
298
+ console.error(C), g({
299
299
  message: "Cannot pay with payment credentials"
300
300
  });
301
301
  }
@@ -306,7 +306,7 @@ let Nr = class {
306
306
  });
307
307
  }
308
308
  render(e) {
309
- return E(this, null, function* () {
309
+ return k(this, null, function* () {
310
310
  var t;
311
311
  !this.apple || !this.isAvailable || (e.innerHTML = "", yield this.apple.mount(e), (t = this.onReady) == null || t.call(this));
312
312
  });
@@ -317,9 +317,9 @@ let Nr = class {
317
317
  this.ev = e;
318
318
  }
319
319
  init(u, d) {
320
- return E(this, arguments, function* ({ transaction: e, locale: t, onReady: i, onError: r, onSuccess: a, onCancel: s, onPaymentAttempt: o }, l) {
320
+ return k(this, arguments, function* ({ transaction: e, locale: t, onReady: i, onError: r, onSuccess: a, onCancel: s, onPaymentAttempt: o }, l) {
321
321
  const h = this.ev.transactions.create(e);
322
- this.google = this.ev.ui.googlePay(h, I(v({
322
+ this.google = this.ev.ui.googlePay(h, M(v({
323
323
  locale: t,
324
324
  size: {
325
325
  width: "100%",
@@ -334,7 +334,7 @@ let Nr = class {
334
334
  allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],
335
335
  // ToDo: Temporary we have only Visa and Master card
336
336
  allowedCardNetworks: ["VISA", "MASTERCARD"],
337
- process: (g, b) => E(this, [g, b], function* (m, { fail: p }) {
337
+ process: (g, b) => k(this, [g, b], function* (m, { fail: p }) {
338
338
  o == null || o({
339
339
  paymentMethod: x.GOOGLE_PAY
340
340
  });
@@ -350,7 +350,7 @@ let Nr = class {
350
350
  });
351
351
  }
352
352
  render(e) {
353
- return E(this, null, function* () {
353
+ return k(this, null, function* () {
354
354
  this.google && (e.innerHTML = "", this.google.mount(e));
355
355
  });
356
356
  }
@@ -379,12 +379,12 @@ class Fr {
379
379
  this.ev = e;
380
380
  }
381
381
  init(a) {
382
- return E(this, arguments, function* ({ threeDsId: e, onReady: t, onSuccess: i, onError: r }) {
382
+ return k(this, arguments, function* ({ threeDsId: e, onReady: t, onSuccess: i, onError: r }) {
383
383
  this.threeDs = this.ev.ui.threeDSecure(e), this.threeDs.on("ready", () => t == null ? void 0 : t()), this.threeDs.on("success", () => i == null ? void 0 : i()), this.threeDs.on("failure", () => r == null ? void 0 : r()), this.threeDs.on("error", () => r == null ? void 0 : r());
384
384
  });
385
385
  }
386
386
  render(e) {
387
- return E(this, null, function* () {
387
+ return k(this, null, function* () {
388
388
  this.threeDs && this.threeDs.mount(e);
389
389
  });
390
390
  }
@@ -407,7 +407,7 @@ class jr {
407
407
  }
408
408
  // preload evervault
409
409
  preloadEvervault(e) {
410
- return E(this, null, function* () {
410
+ return k(this, null, function* () {
411
411
  if (!this.isShouldLoad(e)) return;
412
412
  if (typeof window == "undefined")
413
413
  throw new Error("Evervault can only be initialized in browser environment");
@@ -418,27 +418,27 @@ class jr {
418
418
  }
419
419
  // init ev
420
420
  initEv(e) {
421
- return E(this, null, function* () {
421
+ return k(this, null, function* () {
422
422
  this.ev || (yield this.preloadEvervault(e)), this.apple = new Nr(this.ev), this.google = new Sr(this.ev), this.events.ready.emit(), this.isReady = !0;
423
423
  });
424
424
  }
425
425
  // init three ds
426
426
  initThreeDs(e) {
427
- return E(this, null, function* () {
427
+ return k(this, null, function* () {
428
428
  if (!this.ev) throw new Error("Evervault should be init before using Three DS Secure");
429
429
  this.threeDs = new Fr(this.ev), yield this.threeDs.init(e), yield this.threeDs.render();
430
430
  });
431
431
  }
432
432
  // init apple
433
433
  initApple(e, t) {
434
- return E(this, null, function* () {
434
+ return k(this, null, function* () {
435
435
  if (!this.apple) throw new Error("Evervault should be init before using Apple Pay");
436
436
  yield this.apple.init(e, t);
437
437
  });
438
438
  }
439
439
  // init google
440
440
  initGoogle(e, t) {
441
- return E(this, null, function* () {
441
+ return k(this, null, function* () {
442
442
  if (!this.google) throw new Error("Evervault should be init before using Google Pay");
443
443
  yield this.google.init(e, t);
444
444
  });
@@ -454,14 +454,14 @@ class jr {
454
454
  }
455
455
  // render apple
456
456
  renderApple(e) {
457
- return E(this, null, function* () {
457
+ return k(this, null, function* () {
458
458
  var t;
459
459
  return (t = this.apple) == null ? void 0 : t.render(e);
460
460
  });
461
461
  }
462
462
  // render google
463
463
  renderGoogle(e) {
464
- return E(this, null, function* () {
464
+ return k(this, null, function* () {
465
465
  var t;
466
466
  return (t = this.google) == null ? void 0 : t.render(e);
467
467
  });
@@ -562,7 +562,7 @@ function nn(n) {
562
562
  }
563
563
  const se = /* @__NO_SIDE_EFFECTS__ */ (n) => n * 1e3, le = /* @__NO_SIDE_EFFECTS__ */ (n) => n / 1e3;
564
564
  function yi(n, e = 100, t) {
565
- const i = t(I(v({}, n), { keyframes: [0, e] })), r = Math.min(nn(i), mt);
565
+ const i = t(M(v({}, n), { keyframes: [0, e] })), r = Math.min(nn(i), mt);
566
566
  return {
567
567
  type: "keyframes",
568
568
  ease: (a) => i.next(r * a).value / e,
@@ -592,12 +592,12 @@ function Zr(n, a = {}, i, r) {
592
592
  h.set(y.name, Tn(p, y.at, m, h));
593
593
  continue;
594
594
  }
595
- let [k, V, L = {}] = y;
596
- L.at !== void 0 && (p = Tn(p, L.at, m, h));
597
- let M = 0;
598
- const T = (D, C, w, O = 0, R = 0) => {
599
- const q = Jr(D), Le = C, { delay: Te = 0, times: te = vi(q), type: fe = "keyframes", repeat: he, repeatType: Et, repeatDelay: kt = 0 } = Le, st = ae(Le, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
600
- let { ease: ne = e.ease || "easeOut", duration: f } = C;
595
+ let [C, V, T = {}] = y;
596
+ T.at !== void 0 && (p = Tn(p, T.at, m, h));
597
+ let I = 0;
598
+ const A = (D, E, w, O = 0, R = 0) => {
599
+ const q = Jr(D), Le = E, { delay: Te = 0, times: te = vi(q), type: fe = "keyframes", repeat: he, repeatType: Et, repeatDelay: kt = 0 } = Le, st = ae(Le, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
600
+ let { ease: ne = e.ease || "easeOut", duration: f } = E;
601
601
  const P = typeof Te == "function" ? Te(O, R) : Te, N = q.length, G = tn(fe) ? fe : r == null ? void 0 : r[fe];
602
602
  if (N <= 2 && G) {
603
603
  let z = 100;
@@ -627,40 +627,40 @@ function Zr(n, a = {}, i, r) {
627
627
  Hr(te, he);
628
628
  }
629
629
  const Ae = ie + f;
630
- Gr(w, q, ne, te, ie, Ae), M = Math.max(P + f, M), g = Math.max(Ae, g);
630
+ Gr(w, q, ne, te, ie, Ae), I = Math.max(P + f, I), g = Math.max(Ae, g);
631
631
  };
632
- if (J(k)) {
633
- const D = An(k, u);
634
- T(V, L, Ln("default", D));
632
+ if (J(C)) {
633
+ const D = An(C, u);
634
+ A(V, T, Ln("default", D));
635
635
  } else {
636
- const D = pi(k, V, i, d), C = D.length;
637
- for (let w = 0; w < C; w++) {
638
- V = V, L = L;
636
+ const D = pi(C, V, i, d), E = D.length;
637
+ for (let w = 0; w < E; w++) {
638
+ V = V, T = T;
639
639
  const O = D[w], R = An(O, u);
640
640
  for (const q in V)
641
- T(V[q], Xr(L, q), Ln(q, R), w, C);
641
+ A(V[q], Xr(T, q), Ln(q, R), w, E);
642
642
  }
643
643
  }
644
- m = p, p += M;
644
+ m = p, p += I;
645
645
  }
646
646
  return u.forEach((b, y) => {
647
- for (const k in b) {
648
- const V = b[k];
647
+ for (const C in b) {
648
+ const V = b[C];
649
649
  V.sort(Yr);
650
- const L = [], M = [], T = [];
651
- for (let C = 0; C < V.length; C++) {
652
- const { at: w, value: O, easing: R } = V[C];
653
- L.push(O), M.push(/* @__PURE__ */ en(0, g, w)), T.push(R || "easeOut");
650
+ const T = [], I = [], A = [];
651
+ for (let E = 0; E < V.length; E++) {
652
+ const { at: w, value: O, easing: R } = V[E];
653
+ T.push(O), I.push(/* @__PURE__ */ en(0, g, w)), A.push(R || "easeOut");
654
654
  }
655
- M[0] !== 0 && (M.unshift(0), L.unshift(L[0]), T.unshift(Ur)), M[M.length - 1] !== 1 && (M.push(1), L.push(null)), l.has(y) || l.set(y, {
655
+ I[0] !== 0 && (I.unshift(0), T.unshift(T[0]), A.unshift(Ur)), I[I.length - 1] !== 1 && (I.push(1), T.push(null)), l.has(y) || l.set(y, {
656
656
  keyframes: {},
657
657
  transition: {}
658
658
  });
659
659
  const D = l.get(y);
660
- D.keyframes[k] = L, D.transition[k] = v(I(v({}, e), {
660
+ D.keyframes[C] = T, D.transition[C] = v(M(v({}, e), {
661
661
  duration: g,
662
- ease: T,
663
- times: M
662
+ ease: A,
663
+ times: I
664
664
  }), t);
665
665
  }
666
666
  }), l;
@@ -762,18 +762,18 @@ function aa(n, e) {
762
762
  delta: 0,
763
763
  timestamp: 0,
764
764
  isProcessing: !1
765
- }, a = () => t = !0, s = lt.reduce((L, M) => (L[M] = ia(a), L), {}), { setup: o, read: l, resolveKeyframes: u, preUpdate: d, update: h, preRender: m, render: p, postRender: g } = s, b = () => {
766
- const L = de.useManualTiming ? r.timestamp : performance.now();
767
- t = !1, de.useManualTiming || (r.delta = i ? 1e3 / 60 : Math.max(Math.min(L - r.timestamp, ra), 1)), r.timestamp = L, r.isProcessing = !0, o.process(r), l.process(r), u.process(r), d.process(r), h.process(r), m.process(r), p.process(r), g.process(r), r.isProcessing = !1, t && e && (i = !1, n(b));
765
+ }, a = () => t = !0, s = lt.reduce((T, I) => (T[I] = ia(a), T), {}), { setup: o, read: l, resolveKeyframes: u, preUpdate: d, update: h, preRender: m, render: p, postRender: g } = s, b = () => {
766
+ const T = de.useManualTiming ? r.timestamp : performance.now();
767
+ t = !1, de.useManualTiming || (r.delta = i ? 1e3 / 60 : Math.max(Math.min(T - r.timestamp, ra), 1)), r.timestamp = T, r.isProcessing = !0, o.process(r), l.process(r), u.process(r), d.process(r), h.process(r), m.process(r), p.process(r), g.process(r), r.isProcessing = !1, t && e && (i = !1, n(b));
768
768
  }, y = () => {
769
769
  t = !0, i = !0, r.isProcessing || n(b);
770
770
  };
771
- return { schedule: lt.reduce((L, M) => {
772
- const T = s[M];
773
- return L[M] = (D, C = !1, w = !1) => (t || y(), T.schedule(D, C, w)), L;
774
- }, {}), cancel: (L) => {
775
- for (let M = 0; M < lt.length; M++)
776
- s[lt[M]].cancel(L);
771
+ return { schedule: lt.reduce((T, I) => {
772
+ const A = s[I];
773
+ return T[I] = (D, E = !1, w = !1) => (t || y(), A.schedule(D, E, w)), T;
774
+ }, {}), cancel: (T) => {
775
+ for (let I = 0; I < lt.length; I++)
776
+ s[lt[I]].cancel(T);
777
777
  }, state: r, steps: s };
778
778
  }
779
779
  const De = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: ue, cancel: Ot, state: ft } = /* @__PURE__ */ aa(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : De, !0);
@@ -1108,9 +1108,9 @@ const Ti = (n) => (e) => typeof e == "string" && e.startsWith(n), Ai = /* @__PUR
1108
1108
  test: (n) => typeof n == "number",
1109
1109
  parse: parseFloat,
1110
1110
  transform: (n) => n
1111
- }, Qe = I(v({}, Ne), {
1111
+ }, Qe = M(v({}, Ne), {
1112
1112
  transform: (n) => xe(0, 1, n)
1113
- }), ct = I(v({}, Ne), {
1113
+ }), ct = M(v({}, Ne), {
1114
1114
  default: 1
1115
1115
  }), We = (n) => Math.round(n * 1e5) / 1e5, sn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
1116
1116
  function La(n) {
@@ -1126,7 +1126,7 @@ const _a = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
1126
1126
  [t]: parseFloat(s),
1127
1127
  alpha: o !== void 0 ? parseFloat(o) : 1
1128
1128
  };
1129
- }, Va = (n) => xe(0, 255, n), wt = I(v({}, Ne), {
1129
+ }, Va = (n) => xe(0, 255, n), wt = M(v({}, Ne), {
1130
1130
  transform: (n) => Math.round(Va(n))
1131
1131
  }), ye = {
1132
1132
  test: /* @__PURE__ */ on("rgb", "red"),
@@ -1150,7 +1150,7 @@ const Rt = {
1150
1150
  test: (e) => typeof e == "string" && e.endsWith(n) && e.split(" ").length === 1,
1151
1151
  parse: parseFloat,
1152
1152
  transform: (e) => `${e}${n}`
1153
- }), me = /* @__PURE__ */ rt("deg"), Me = /* @__PURE__ */ rt("%"), _ = /* @__PURE__ */ rt("px"), Ma = /* @__PURE__ */ rt("vh"), Pa = /* @__PURE__ */ rt("vw"), Mn = I(v({}, Me), {
1153
+ }), me = /* @__PURE__ */ rt("deg"), Me = /* @__PURE__ */ rt("%"), _ = /* @__PURE__ */ rt("px"), Ma = /* @__PURE__ */ rt("vh"), Pa = /* @__PURE__ */ rt("vw"), Mn = M(v({}, Me), {
1154
1154
  parse: (n) => Me.parse(n) / 100,
1155
1155
  transform: (n) => Me.transform(n * 100)
1156
1156
  }), Ve = {
@@ -1396,14 +1396,14 @@ function ns(n) {
1396
1396
  if (!Rn(n, ts) && Rn(n, es))
1397
1397
  if (n.visualDuration) {
1398
1398
  const t = n.visualDuration, i = 2 * Math.PI / (t * 1.2), r = i * i, a = 2 * xe(0.05, 1, 1 - (n.bounce || 0)) * Math.sqrt(r);
1399
- e = I(v({}, e), {
1399
+ e = M(v({}, e), {
1400
1400
  mass: B.mass,
1401
1401
  stiffness: r,
1402
1402
  damping: a
1403
1403
  });
1404
1404
  } else {
1405
1405
  const t = Ja(n);
1406
- e = I(v(v({}, e), t), {
1406
+ e = M(v(v({}, e), t), {
1407
1407
  mass: B.mass
1408
1408
  }), e.isResolvedFromDuration = !0;
1409
1409
  }
@@ -1416,48 +1416,48 @@ function tt(n = B.visualDuration, e = B.bounce) {
1416
1416
  bounce: e
1417
1417
  } : n;
1418
1418
  let { restSpeed: i, restDelta: r } = t;
1419
- const a = t.keyframes[0], s = t.keyframes[t.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: u, mass: d, duration: h, velocity: m, isResolvedFromDuration: p } = ns(I(v({}, t), {
1419
+ const a = t.keyframes[0], s = t.keyframes[t.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: u, mass: d, duration: h, velocity: m, isResolvedFromDuration: p } = ns(M(v({}, t), {
1420
1420
  velocity: -/* @__PURE__ */ le(t.velocity || 0)
1421
- })), g = m || 0, b = u / (2 * Math.sqrt(l * d)), y = s - a, k = /* @__PURE__ */ le(Math.sqrt(l / d)), V = Math.abs(y) < 5;
1421
+ })), g = m || 0, b = u / (2 * Math.sqrt(l * d)), y = s - a, C = /* @__PURE__ */ le(Math.sqrt(l / d)), V = Math.abs(y) < 5;
1422
1422
  i || (i = V ? B.restSpeed.granular : B.restSpeed.default), r || (r = V ? B.restDelta.granular : B.restDelta.default);
1423
- let L;
1423
+ let T;
1424
1424
  if (b < 1) {
1425
- const T = St(k, b);
1426
- L = (D) => {
1427
- const C = Math.exp(-b * k * D);
1428
- return s - C * ((g + b * k * y) / T * Math.sin(T * D) + y * Math.cos(T * D));
1425
+ const A = St(C, b);
1426
+ T = (D) => {
1427
+ const E = Math.exp(-b * C * D);
1428
+ return s - E * ((g + b * C * y) / A * Math.sin(A * D) + y * Math.cos(A * D));
1429
1429
  };
1430
1430
  } else if (b === 1)
1431
- L = (T) => s - Math.exp(-k * T) * (y + (g + k * y) * T);
1431
+ T = (A) => s - Math.exp(-C * A) * (y + (g + C * y) * A);
1432
1432
  else {
1433
- const T = k * Math.sqrt(b * b - 1);
1434
- L = (D) => {
1435
- const C = Math.exp(-b * k * D), w = Math.min(T * D, 300);
1436
- return s - C * ((g + b * k * y) * Math.sinh(w) + T * y * Math.cosh(w)) / T;
1433
+ const A = C * Math.sqrt(b * b - 1);
1434
+ T = (D) => {
1435
+ const E = Math.exp(-b * C * D), w = Math.min(A * D, 300);
1436
+ return s - E * ((g + b * C * y) * Math.sinh(w) + A * y * Math.cosh(w)) / A;
1437
1437
  };
1438
1438
  }
1439
- const M = {
1439
+ const I = {
1440
1440
  calculatedDuration: p && h || null,
1441
- next: (T) => {
1442
- const D = L(T);
1441
+ next: (A) => {
1442
+ const D = T(A);
1443
1443
  if (p)
1444
- o.done = T >= h;
1444
+ o.done = A >= h;
1445
1445
  else {
1446
- let C = T === 0 ? g : 0;
1447
- b < 1 && (C = T === 0 ? /* @__PURE__ */ se(g) : Ri(L, T, D));
1448
- const w = Math.abs(C) <= i, O = Math.abs(s - D) <= r;
1446
+ let E = A === 0 ? g : 0;
1447
+ b < 1 && (E = A === 0 ? /* @__PURE__ */ se(g) : Ri(T, A, D));
1448
+ const w = Math.abs(E) <= i, O = Math.abs(s - D) <= r;
1449
1449
  o.done = w && O;
1450
1450
  }
1451
1451
  return o.value = o.done ? s : D, o;
1452
1452
  },
1453
1453
  toString: () => {
1454
- const T = Math.min(nn(M), mt), D = Oi((C) => M.next(T * C).value, T, 30);
1455
- return T + "ms " + D;
1454
+ const A = Math.min(nn(I), mt), D = Oi((E) => I.next(A * E).value, A, 30);
1455
+ return A + "ms " + D;
1456
1456
  },
1457
1457
  toTransition: () => {
1458
1458
  }
1459
1459
  };
1460
- return M;
1460
+ return I;
1461
1461
  }
1462
1462
  tt.applyToOptions = (n) => {
1463
1463
  const e = yi(n, 100, tt);
@@ -1469,17 +1469,17 @@ function Ft({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: i = 3
1469
1469
  value: h
1470
1470
  }, p = (w) => o !== void 0 && w < o || l !== void 0 && w > l, g = (w) => o === void 0 ? l : l === void 0 || Math.abs(o - w) < Math.abs(l - w) ? o : l;
1471
1471
  let b = t * e;
1472
- const y = h + b, k = s === void 0 ? y : s(y);
1473
- k !== y && (b = k - h);
1474
- const V = (w) => -b * Math.exp(-w / i), L = (w) => k + V(w), M = (w) => {
1475
- const O = V(w), R = L(w);
1476
- m.done = Math.abs(O) <= u, m.value = m.done ? k : R;
1472
+ const y = h + b, C = s === void 0 ? y : s(y);
1473
+ C !== y && (b = C - h);
1474
+ const V = (w) => -b * Math.exp(-w / i), T = (w) => C + V(w), I = (w) => {
1475
+ const O = V(w), R = T(w);
1476
+ m.done = Math.abs(O) <= u, m.value = m.done ? C : R;
1477
1477
  };
1478
- let T, D;
1479
- const C = (w) => {
1480
- p(m.value) && (T = w, D = tt({
1478
+ let A, D;
1479
+ const E = (w) => {
1480
+ p(m.value) && (A = w, D = tt({
1481
1481
  keyframes: [m.value, g(m.value)],
1482
- velocity: Ri(L, w, m.value),
1482
+ velocity: Ri(T, w, m.value),
1483
1483
  // TODO: This should be passing * 1000
1484
1484
  damping: r,
1485
1485
  stiffness: a,
@@ -1487,11 +1487,11 @@ function Ft({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: i = 3
1487
1487
  restSpeed: d
1488
1488
  }));
1489
1489
  };
1490
- return C(0), {
1490
+ return E(0), {
1491
1491
  calculatedDuration: null,
1492
1492
  next: (w) => {
1493
1493
  let O = !1;
1494
- return !D && T === void 0 && (O = !0, M(w), C(w)), T !== void 0 && w >= T ? D.next(w - T) : (!O && M(w), m);
1494
+ return !D && A === void 0 && (O = !0, I(w), E(w)), A !== void 0 && w >= A ? D.next(w - A) : (!O && I(w), m);
1495
1495
  }
1496
1496
  };
1497
1497
  }
@@ -1640,8 +1640,8 @@ class mn extends pn {
1640
1640
  let { keyframes: o } = e;
1641
1641
  const l = t || Ie;
1642
1642
  process.env.NODE_ENV !== "production" && l !== Ie && ce(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Ie && typeof o[0] != "number" && (this.mixKeyframes = ln(gs, Di(o[0], o[1])), o = [0, 100]);
1643
- const u = l(I(v({}, e), { keyframes: o }));
1644
- a === "mirror" && (this.mirroredGenerator = l(I(v({}, e), {
1643
+ const u = l(M(v({}, e), { keyframes: o }));
1644
+ a === "mirror" && (this.mirroredGenerator = l(M(v({}, e), {
1645
1645
  keyframes: [...o].reverse(),
1646
1646
  velocity: -s
1647
1647
  }))), u.calculatedDuration === null && (u.calculatedDuration = nn(u));
@@ -1658,20 +1658,20 @@ class mn extends pn {
1658
1658
  return i.next(0);
1659
1659
  const { delay: u = 0, keyframes: d, repeat: h, repeatType: m, repeatDelay: p, type: g, onUpdate: b, finalKeyframe: y } = this.options;
1660
1660
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - r / this.speed, this.startTime)), t ? this.currentTime = e : this.updateTime(e);
1661
- const k = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), V = this.playbackSpeed >= 0 ? k < 0 : k > r;
1662
- this.currentTime = Math.max(k, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
1663
- let L = this.currentTime, M = i;
1661
+ const C = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), V = this.playbackSpeed >= 0 ? C < 0 : C > r;
1662
+ this.currentTime = Math.max(C, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
1663
+ let T = this.currentTime, I = i;
1664
1664
  if (h) {
1665
1665
  const w = Math.min(this.currentTime, r) / o;
1666
1666
  let O = Math.floor(w), R = w % 1;
1667
- !R && w >= 1 && (R = 1), R === 1 && O--, O = Math.min(O, h + 1), !!(O % 2) && (m === "reverse" ? (R = 1 - R, p && (R -= p / o)) : m === "mirror" && (M = s)), L = xe(0, 1, R) * o;
1667
+ !R && w >= 1 && (R = 1), R === 1 && O--, O = Math.min(O, h + 1), !!(O % 2) && (m === "reverse" ? (R = 1 - R, p && (R -= p / o)) : m === "mirror" && (I = s)), T = xe(0, 1, R) * o;
1668
1668
  }
1669
- const T = V ? { done: !1, value: d[0] } : M.next(L);
1670
- a && (T.value = a(T.value));
1671
- let { done: D } = T;
1669
+ const A = V ? { done: !1, value: d[0] } : I.next(T);
1670
+ a && (A.value = a(A.value));
1671
+ let { done: D } = A;
1672
1672
  !V && l !== null && (D = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
1673
- const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && D);
1674
- return C && g !== Ft && (T.value = hn(d, this.options, y, this.speed)), b && b(T.value), C && this.finish(), T;
1673
+ const E = this.holdTime === null && (this.state === "finished" || this.state === "running" && D);
1674
+ return E && g !== Ft && (A.value = hn(d, this.options, y, this.speed)), b && b(A.value), E && this.finish(), A;
1675
1675
  }
1676
1676
  /**
1677
1677
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -2077,7 +2077,7 @@ class Ns extends Ds {
2077
2077
  t.set(e);
2078
2078
  return;
2079
2079
  }
2080
- const o = new mn(I(v({}, s), {
2080
+ const o = new mn(M(v({}, s), {
2081
2081
  autoplay: !1
2082
2082
  })), l = /* @__PURE__ */ se((d = this.finishedTime) != null ? d : this.time);
2083
2083
  t.setWithVelocity(o.sample(l - Kn).value, o.sample(l).value, Kn), o.stop();
@@ -2135,8 +2135,8 @@ class qs extends pn {
2135
2135
  var p = m, { autoplay: e = !0, delay: t = 0, type: i = "keyframes", repeat: r = 0, repeatDelay: a = 0, repeatType: s = "loop", keyframes: o, name: l, motionValue: u, element: d } = p, h = ae(p, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
2136
2136
  var y;
2137
2137
  super(), this.stop = () => {
2138
- var k, V;
2139
- this._animation && (this._animation.stop(), (k = this.stopTimeline) == null || k.call(this)), (V = this.keyframeResolver) == null || V.cancel();
2138
+ var C, V;
2139
+ this._animation && (this._animation.stop(), (C = this.stopTimeline) == null || C.call(this)), (V = this.keyframeResolver) == null || V.cancel();
2140
2140
  }, this.createdAt = ee.now();
2141
2141
  const g = v({
2142
2142
  autoplay: e,
@@ -2149,18 +2149,18 @@ class qs extends pn {
2149
2149
  motionValue: u,
2150
2150
  element: d
2151
2151
  }, h), b = (d == null ? void 0 : d.KeyframeResolver) || fn;
2152
- this.keyframeResolver = new b(o, (k, V, L) => this.onKeyframesResolved(k, V, g, !L), l, u, d), (y = this.keyframeResolver) == null || y.scheduleResolve();
2152
+ this.keyframeResolver = new b(o, (C, V, T) => this.onKeyframesResolved(C, V, g, !T), l, u, d), (y = this.keyframeResolver) == null || y.scheduleResolve();
2153
2153
  }
2154
2154
  onKeyframesResolved(e, t, i, r) {
2155
2155
  this.keyframeResolver = void 0;
2156
2156
  const { name: a, type: s, velocity: o, delay: l, isHandoff: u, onUpdate: d } = i;
2157
2157
  this.resolvedAt = ee.now(), Fs(e, a, s, o) || ((de.instantAnimations || !l) && (d == null || d(hn(e, i, t))), e[0] = e[e.length - 1], i.duration = 0, i.repeat = 0);
2158
- const h = r ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ks ? this.resolvedAt : this.createdAt : this.createdAt : void 0, m = I(v({
2158
+ const h = r ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ks ? this.resolvedAt : this.createdAt : this.createdAt : void 0, m = M(v({
2159
2159
  startTime: h,
2160
2160
  finalKeyframe: t
2161
2161
  }, i), {
2162
2162
  keyframes: e
2163
- }), p = !u && $s(m) ? new Ns(I(v({}, m), {
2163
+ }), p = !u && $s(m) ? new Ns(M(v({}, m), {
2164
2164
  element: m.motionValue.owner.current
2165
2165
  })) : new mn(m);
2166
2166
  p.finished.then(() => this.notifyFinished()).catch(De), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
@@ -2218,7 +2218,7 @@ const Xi = (n, e, t, i = {}, r, a) => (s) => {
2218
2218
  const o = wi(i, n) || {}, l = o.delay || i.delay || 0;
2219
2219
  let { elapsed: u = 0 } = i;
2220
2220
  u = u - /* @__PURE__ */ se(l);
2221
- const d = I(v({
2221
+ const d = M(v({
2222
2222
  keyframes: Array.isArray(t) ? t : [null, t],
2223
2223
  ease: "easeOut",
2224
2224
  velocity: e.getVelocity()
@@ -2273,15 +2273,15 @@ function Hs(n, e, { delay: t = 0, transitionOverride: i, type: r } = {}) {
2273
2273
  }, wi(a || {}, m)), y = p.get();
2274
2274
  if (y !== void 0 && !p.isAnimating && !Array.isArray(g) && g === y && !b.velocity)
2275
2275
  continue;
2276
- let k = !1;
2276
+ let C = !1;
2277
2277
  if (window.MotionHandoffAnimation) {
2278
- const L = ga(n);
2279
- if (L) {
2280
- const M = window.MotionHandoffAnimation(L, m, ue);
2281
- M !== null && (b.startTime = M, k = !0);
2278
+ const T = ga(n);
2279
+ if (T) {
2280
+ const I = window.MotionHandoffAnimation(T, m, ue);
2281
+ I !== null && (b.startTime = I, C = !0);
2282
2282
  }
2283
2283
  }
2284
- pa(n, m), p.start(Xi(m, p, g, n.shouldReduceMotion && Qi.has(m) ? { type: !1 } : b, n, k));
2284
+ pa(n, m), p.start(Xi(m, p, g, n.shouldReduceMotion && Qi.has(m) ? { type: !1 } : b, n, C));
2285
2285
  const V = p.animation;
2286
2286
  V && l.push(V);
2287
2287
  }
@@ -2403,12 +2403,12 @@ function lo(n) {
2403
2403
  let a = oo.has(e) ? 1 : 0;
2404
2404
  return i !== t && (a *= 100), e + "(" + a + r + ")";
2405
2405
  }
2406
- const co = /\b([a-z-]*)\(.*?\)/gu, Ut = I(v({}, Se), {
2406
+ const co = /\b([a-z-]*)\(.*?\)/gu, Ut = M(v({}, Se), {
2407
2407
  getAnimatableNone: (n) => {
2408
2408
  const e = n.match(co);
2409
2409
  return e ? e.map(lo).join(" ") : n;
2410
2410
  }
2411
- }), Un = I(v({}, Ne), {
2411
+ }), Un = M(v({}, Ne), {
2412
2412
  transform: Math.round
2413
2413
  }), uo = {
2414
2414
  rotate: me,
@@ -2435,7 +2435,7 @@ const co = /\b([a-z-]*)\(.*?\)/gu, Ut = I(v({}, Se), {
2435
2435
  originX: Mn,
2436
2436
  originY: Mn,
2437
2437
  originZ: _
2438
- }, vn = I(v({
2438
+ }, vn = M(v({
2439
2439
  // Border props
2440
2440
  borderWidth: _,
2441
2441
  borderTopWidth: _,
@@ -2477,7 +2477,7 @@ const co = /\b([a-z-]*)\(.*?\)/gu, Ut = I(v({}, Se), {
2477
2477
  fillOpacity: Qe,
2478
2478
  strokeOpacity: Qe,
2479
2479
  numOctaves: Un
2480
- }), ho = I(v({}, vn), {
2480
+ }), ho = M(v({}, vn), {
2481
2481
  // Color props
2482
2482
  color: U,
2483
2483
  backgroundColor: U,
@@ -3093,7 +3093,7 @@ function br(n, e, t, i) {
3093
3093
  const l = a[o], u = l instanceof Element ? Fo : jo;
3094
3094
  Je.has(l) || u(l);
3095
3095
  const d = Je.get(l), h = v({}, t);
3096
- "delay" in h && typeof h.delay == "function" && (h.delay = h.delay(o, s)), r.push(...Hs(d, I(v({}, e), { transition: h }), {}));
3096
+ "delay" in h && typeof h.delay == "function" && (h.delay = h.delay(o, s)), r.push(...Hs(d, M(v({}, e), { transition: h }), {}));
3097
3097
  }
3098
3098
  }
3099
3099
  return r;
@@ -3525,7 +3525,7 @@ function yl() {
3525
3525
  ii = 1;
3526
3526
  var n = Ge && Ge.__assign || function() {
3527
3527
  return n = Object.assign || function(g) {
3528
- for (var b, y = 1, k = arguments.length; y < k; y++) {
3528
+ for (var b, y = 1, C = arguments.length; y < C; y++) {
3529
3529
  b = arguments[y];
3530
3530
  for (var V in b) Object.prototype.hasOwnProperty.call(b, V) && (g[V] = b[V]);
3531
3531
  }
@@ -3579,8 +3579,8 @@ function yl() {
3579
3579
  return b;
3580
3580
  if (g.length === 0)
3581
3581
  return h();
3582
- u.forEach(function(k) {
3583
- var V = d(k);
3582
+ u.forEach(function(C) {
3583
+ var V = d(C);
3584
3584
  (0, t.addMatchingCardsToResults)(g, V, b);
3585
3585
  });
3586
3586
  var y = (0, r.findBestMatch)(b);
@@ -3600,8 +3600,8 @@ function yl() {
3600
3600
  throw new Error('"'.concat(g, "\" is not a recognized type. Use `addCard` instead.'"));
3601
3601
  if (b.type && y.type !== b.type)
3602
3602
  throw new Error("Cannot overwrite type parameter.");
3603
- var k = (0, a.clone)(y);
3604
- k = n(n({}, k), b), s[k.type] = k;
3603
+ var C = (0, a.clone)(y);
3604
+ C = n(n({}, C), b), s[C.type] = C;
3605
3605
  }, p.changeOrder = function(g, b) {
3606
3606
  var y = m(g);
3607
3607
  u.splice(y, 1), u.splice(b, 0, g);
@@ -3938,11 +3938,11 @@ function Sl() {
3938
3938
  switch (f) {
3939
3939
  case b:
3940
3940
  return "Fragment";
3941
- case k:
3941
+ case C:
3942
3942
  return "Profiler";
3943
3943
  case y:
3944
3944
  return "StrictMode";
3945
- case T:
3945
+ case A:
3946
3946
  return "Suspense";
3947
3947
  case D:
3948
3948
  return "SuspenseList";
@@ -3955,14 +3955,14 @@ function Sl() {
3955
3955
  ), f.$$typeof) {
3956
3956
  case g:
3957
3957
  return "Portal";
3958
- case L:
3958
+ case T:
3959
3959
  return (f.displayName || "Context") + ".Provider";
3960
3960
  case V:
3961
3961
  return (f._context.displayName || "Context") + ".Consumer";
3962
- case M:
3962
+ case I:
3963
3963
  var P = f.render;
3964
3964
  return f = f.displayName, f || (f = P.displayName || P.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
3965
- case C:
3965
+ case E:
3966
3966
  return P = f.displayName || null, P !== null ? P : n(f.type) || "Memo";
3967
3967
  case w:
3968
3968
  P = f._payload, f = f._init;
@@ -4121,7 +4121,7 @@ React keys must be passed directly to JSX without using spread:
4121
4121
  function h(f) {
4122
4122
  typeof f == "object" && f !== null && f.$$typeof === p && f._store && (f._store.validated = 1);
4123
4123
  }
4124
- var m = wr, p = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), L = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), R = Symbol.for("react.client.reference"), q = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Te = Object.prototype.hasOwnProperty, te = Array.isArray, fe = console.createTask ? console.createTask : function() {
4124
+ var m = wr, p = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), T = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), R = Symbol.for("react.client.reference"), q = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Te = Object.prototype.hasOwnProperty, te = Array.isArray, fe = console.createTask ? console.createTask : function() {
4125
4125
  return null;
4126
4126
  };
4127
4127
  m = {
@@ -4190,12 +4190,12 @@ class Bl {
4190
4190
  this.onPaymentAttempt = this.config.state.checkout.getState().onCheckoutAttempt, this.ev = this.config.service.ev, this.customButtonStyles = t, this.element = document.createElement("div"), this.element.classList.add(_t.applePay, _t.hidden);
4191
4191
  }
4192
4192
  init(e) {
4193
- return E(this, null, function* () {
4193
+ return k(this, null, function* () {
4194
4194
  if (!this.config) return !1;
4195
4195
  const t = this.config.state.transaction.getState(), i = this.config.state.translate.locale(), r = Ml(t);
4196
4196
  if (!r)
4197
4197
  return !1;
4198
- const a = e ? I(v({}, e), {
4198
+ const a = e ? M(v({}, e), {
4199
4199
  onError: (s) => {
4200
4200
  var l, u;
4201
4201
  if (!this.isInitialized) {
@@ -4211,7 +4211,7 @@ class Bl {
4211
4211
  }
4212
4212
  }) : void 0;
4213
4213
  return yield this.ev.initApple(
4214
- I(v({}, a), {
4214
+ M(v({}, a), {
4215
4215
  transaction: r,
4216
4216
  supportedCardTypes: Pl(jl),
4217
4217
  locale: Dl(i || "en"),
@@ -4267,12 +4267,12 @@ class ql {
4267
4267
  this.config = e, this.ev = this.config.service.ev, this.customButtonStyles = this.config.state.styles.getState().GooglePayButton, this.onPaymentAttempt = this.config.state.checkout.getState().onCheckoutAttempt, this.element = document.createElement("div"), this.element.classList.add(It.googlePay, It.hidden);
4268
4268
  }
4269
4269
  init(e) {
4270
- return E(this, null, function* () {
4270
+ return k(this, null, function* () {
4271
4271
  if (!this.config) return !1;
4272
4272
  const t = this.config.state.transaction.getState(), i = this.config.state.translate.locale(), r = Il(t);
4273
4273
  if (!r)
4274
4274
  return !1;
4275
- const a = e ? I(v({}, e), {
4275
+ const a = e ? M(v({}, e), {
4276
4276
  onError: (s) => {
4277
4277
  var o;
4278
4278
  if (!this.isInitialized) {
@@ -4287,7 +4287,7 @@ class ql {
4287
4287
  }
4288
4288
  }) : void 0;
4289
4289
  return yield this.ev.initGoogle(
4290
- I(v({}, a), {
4290
+ M(v({}, a), {
4291
4291
  transaction: r,
4292
4292
  locale: Ol(i || "en"),
4293
4293
  onPaymentAttempt: this.onPaymentAttempt
@@ -4323,11 +4323,11 @@ class Yl {
4323
4323
  }
4324
4324
  // init
4325
4325
  init(e) {
4326
- return E(this, null, function* () {
4326
+ return k(this, null, function* () {
4327
4327
  var s, o;
4328
4328
  if (!this.config)
4329
4329
  return !1;
4330
- const t = this.config.state.transaction.getState(), i = this.config.state.checkout.getState(), r = () => E(this, null, function* () {
4330
+ const t = this.config.state.transaction.getState(), i = this.config.state.checkout.getState(), r = () => k(this, null, function* () {
4331
4331
  try {
4332
4332
  return yield Or(i.clientToken, i.environment, i.apiVersion);
4333
4333
  } catch (l) {
@@ -4350,7 +4350,7 @@ class Yl {
4350
4350
  } catch (l) {
4351
4351
  return !1;
4352
4352
  }
4353
- const a = e ? I(v({}, e), {
4353
+ const a = e ? M(v({}, e), {
4354
4354
  onError: (l) => {
4355
4355
  var d, h;
4356
4356
  if (this.emitAttemptOnce(), !this.isInitialized) {
@@ -4369,12 +4369,12 @@ class Yl {
4369
4369
  }
4370
4370
  }) : void 0;
4371
4371
  try {
4372
- yield this.paypal.render(this.element, I(v({}, a), {
4372
+ yield this.paypal.render(this.element, M(v({}, a), {
4373
4373
  createBillingAgreement: r,
4374
4374
  onClick: () => {
4375
4375
  this.emitAttemptOnce();
4376
4376
  },
4377
- onApprove: (u) => E(this, [u], function* ({ billingToken: l }) {
4377
+ onApprove: (u) => k(this, [u], function* ({ billingToken: l }) {
4378
4378
  var d;
4379
4379
  (d = a == null ? void 0 : a.onSuccess) == null || d.call(a, l || "");
4380
4380
  }),
@@ -4515,7 +4515,7 @@ class ic {
4515
4515
  }
4516
4516
  // init
4517
4517
  init(e) {
4518
- return E(this, null, function* () {
4518
+ return k(this, null, function* () {
4519
4519
  var i;
4520
4520
  if (!this.config) return !1;
4521
4521
  const t = this.config.state.transaction.getState();
@@ -4535,7 +4535,7 @@ class ic {
4535
4535
  }
4536
4536
  // display venmo button
4537
4537
  displayVenmoButton(e) {
4538
- Object.assign(this.venmoButton.style, tc), this.venmoButton.addEventListener("click", () => E(this, null, function* () {
4538
+ Object.assign(this.venmoButton.style, tc), this.venmoButton.addEventListener("click", () => k(this, null, function* () {
4539
4539
  if (this.events.onPaymentAttempt.emit(x.VENMO), !this.isProcessing) {
4540
4540
  this.isProcessing = !0, this.venmoButton.disabled = !0;
4541
4541
  try {
@@ -4551,7 +4551,7 @@ class ic {
4551
4551
  }
4552
4552
  // handle existing tokenization results
4553
4553
  handleExistingTokenization(e) {
4554
- return E(this, null, function* () {
4554
+ return k(this, null, function* () {
4555
4555
  try {
4556
4556
  const t = yield this.braintree.tokenize();
4557
4557
  this.handleVenmoSuccess(t, e);
@@ -4601,7 +4601,7 @@ class rc {
4601
4601
  }
4602
4602
  // init
4603
4603
  init() {
4604
- return E(this, null, function* () {
4604
+ return k(this, null, function* () {
4605
4605
  this.config.service.ev.addEventListener("ready", () => {
4606
4606
  this.initPaymentMethods().catch(console.error);
4607
4607
  });
@@ -4609,7 +4609,7 @@ class rc {
4609
4609
  }
4610
4610
  // init apple
4611
4611
  initApple(e) {
4612
- return E(this, null, function* () {
4612
+ return k(this, null, function* () {
4613
4613
  if (!this.applePay) {
4614
4614
  e == null || e.remove();
4615
4615
  return;
@@ -4624,7 +4624,7 @@ class rc {
4624
4624
  this.events.cancel.emit(), this.attempted.delete(x.APPLE_PAY);
4625
4625
  },
4626
4626
  onSuccess: (i) => {
4627
- this.events.success.emit(I(v({}, i), { type: "apple" })), this.attempted.delete(x.APPLE_PAY);
4627
+ this.events.success.emit(M(v({}, i), { type: "apple" })), this.attempted.delete(x.APPLE_PAY);
4628
4628
  }
4629
4629
  })) {
4630
4630
  const i = this.applePay.render();
@@ -4648,7 +4648,7 @@ class rc {
4648
4648
  }
4649
4649
  // init google
4650
4650
  initGoogle(e) {
4651
- return E(this, null, function* () {
4651
+ return k(this, null, function* () {
4652
4652
  if (!this.googlePay) {
4653
4653
  e == null || e.remove();
4654
4654
  return;
@@ -4663,7 +4663,7 @@ class rc {
4663
4663
  this.events.cancel.emit(), this.attempted.delete(x.GOOGLE_PAY);
4664
4664
  },
4665
4665
  onSuccess: (i) => {
4666
- this.events.success.emit(I(v({}, i), { type: "google" })), this.attempted.delete(x.GOOGLE_PAY);
4666
+ this.events.success.emit(M(v({}, i), { type: "google" })), this.attempted.delete(x.GOOGLE_PAY);
4667
4667
  }
4668
4668
  })) {
4669
4669
  const i = this.googlePay.render();
@@ -4687,7 +4687,7 @@ class rc {
4687
4687
  }
4688
4688
  // init paypal
4689
4689
  initPayPal(e) {
4690
- return E(this, null, function* () {
4690
+ return k(this, null, function* () {
4691
4691
  if (!this.paypal) {
4692
4692
  e == null || e.remove();
4693
4693
  return;
@@ -4713,7 +4713,7 @@ class rc {
4713
4713
  }
4714
4714
  // init braintree
4715
4715
  initBraintreeVenmo(e) {
4716
- return E(this, null, function* () {
4716
+ return k(this, null, function* () {
4717
4717
  if (!this.braintree) {
4718
4718
  e == null || e.remove();
4719
4719
  return;
@@ -4740,7 +4740,7 @@ class rc {
4740
4740
  }
4741
4741
  // init card
4742
4742
  initCard(e) {
4743
- return E(this, null, function* () {
4743
+ return k(this, null, function* () {
4744
4744
  if (!this.card) {
4745
4745
  e == null || e.remove();
4746
4746
  return;
@@ -4750,7 +4750,7 @@ class rc {
4750
4750
  }
4751
4751
  // init payment methods
4752
4752
  initPaymentMethods() {
4753
- return E(this, null, function* () {
4753
+ return k(this, null, function* () {
4754
4754
  const e = this.config.state.transaction.getState(), t = Jl(zl, (e == null ? void 0 : e.checkout_config) || [], (s, o) => s.type === o.type), i = this.config.state.checkout.getState();
4755
4755
  let r = t.filter(({ is_active: s }) => s);
4756
4756
  (i == null ? void 0 : i.variant) === "default" && (r = r.filter(({ type: s }) => s !== x.CARD));
@@ -4767,8 +4767,8 @@ class rc {
4767
4767
  this.events.open.emit();
4768
4768
  }));
4769
4769
  const l = e.filter(({ type: h }) => {
4770
- var b, y;
4771
- const m = window.navigator, p = (b = m.userAgentData.platforms) == null ? void 0 : b.toLowerCase().includes("android"), g = (y = m.userAgentData.platforms) == null ? void 0 : y.toLowerCase().includes("windows");
4770
+ var b, y, C, V, T, I;
4771
+ const m = navigator, p = (C = (y = (b = m == null ? void 0 : m.userAgentData) == null ? void 0 : b.platform) == null ? void 0 : y.toLowerCase()) == null ? void 0 : C.includes("android"), g = (I = (T = (V = m == null ? void 0 : m.userAgentData) == null ? void 0 : V.platform) == null ? void 0 : T.toLowerCase()) == null ? void 0 : I.includes("windows");
4772
4772
  return !(h === x.APPLE_PAY && (p || g));
4773
4773
  }).sort((h, m) => h.order - m.order), u = /* @__PURE__ */ new Map();
4774
4774
  for (const { type: h } of l) {
@@ -4959,7 +4959,7 @@ class Ac {
4959
4959
  }), this.render();
4960
4960
  }
4961
4961
  toggleLabelError(e) {
4962
- return E(this, null, function* () {
4962
+ return k(this, null, function* () {
4963
4963
  if (e) {
4964
4964
  this.inputContainer.classList.add($.errorInput), this.endContent.classList.remove($.hidden), this.labelError.classList.remove($.hidden), yield H(this.labelError, W.open, W.transition);
4965
4965
  return;
@@ -5143,7 +5143,7 @@ class zc {
5143
5143
  this.translate = e;
5144
5144
  const i = e.messages();
5145
5145
  if (this.element = document.createElement("div"), this.element.classList.add(j.wrapper), this.inputContainer.classList.add(j.inputContainer), (r = t == null ? void 0 : t.container) != null && r.className && F(this.inputContainer, t.container.className), (a = t == null ? void 0 : t.container) != null && a.styles && Object.assign(this.inputContainer.style, t.container.styles), this.input.setAttribute("id", this.id), this.input.setAttribute("autocomplete", "cc-number"), this.input.setAttribute("placeholder", "1234 1234 1234 1234"), this.input.setAttribute("inputmode", "numeric"), this.input.setAttribute("pattern", "[0-9]*"), this.input.setAttribute("enterkeyhint", "done"), this.input.classList.add(j.input), (s = t == null ? void 0 : t.field) != null && s.className && F(this.input, t.field.className), (o = t == null ? void 0 : t.field) != null && o.styles && Object.assign(this.input.style, t.field.styles), (l = t == null ? void 0 : t.placeholder) != null && l.styles && Object.keys(t.placeholder.styles).length) {
5146
- const p = (y) => y.replace(/[A-Z]/g, (k) => "-" + k.toLowerCase()), g = Object.entries(t.placeholder.styles).map(([y, k]) => `${p(y)}:${k} !important;`).join(""), b = `#${this.id}`;
5146
+ const p = (y) => y.replace(/[A-Z]/g, (C) => "-" + C.toLowerCase()), g = Object.entries(t.placeholder.styles).map(([y, C]) => `${p(y)}:${C} !important;`).join(""), b = `#${this.id}`;
5147
5147
  this.placeholderStyle.textContent = `${b}::placeholder{${g}}
5148
5148
  ${b}::-webkit-input-placeholder{${g}}
5149
5149
  ${b}::-moz-placeholder{${g}}
@@ -5178,7 +5178,7 @@ ${b}::-ms-input-placeholder{${g}}
5178
5178
  }), this.render();
5179
5179
  }
5180
5180
  toggleLabelError(e) {
5181
- return E(this, null, function* () {
5181
+ return k(this, null, function* () {
5182
5182
  if (e) {
5183
5183
  this.inputContainer.classList.add(j.errorInput), this.labelError.classList.remove(j.hidden), yield H(this.labelError, W.open, W.transition);
5184
5184
  return;
@@ -5187,7 +5187,7 @@ ${b}::-ms-input-placeholder{${g}}
5187
5187
  });
5188
5188
  }
5189
5189
  toggleErrorMessage(e) {
5190
- return E(this, null, function* () {
5190
+ return k(this, null, function* () {
5191
5191
  if (e) {
5192
5192
  this.inputContainer.classList.add(j.errorInput), this.error.textContent = this.errorMessage, this.error.classList.remove(j.hidden), yield H(this.error, Q.open, Q.transition);
5193
5193
  return;
@@ -5231,7 +5231,7 @@ ${b}::-ms-input-placeholder{${g}}
5231
5231
  return this.toggleLabelError(t), this.toggleErrorMessage(i), !t && !i ? (this.inputContainer.classList.remove(j.errorInput), this.endContent.innerHTML = "", this.endContent.append(...this.getCardIcons())) : (this.endContent.innerHTML = "", this.endContent.appendChild(this.unknownCard.render())), this.isDisabled ? (this.inputContainer.classList.add(j.disabled), this.input.classList.add(j.disabledInput)) : (this.inputContainer.classList.remove(j.disabled), this.input.classList.remove(j.disabledInput)), this.element;
5232
5232
  }
5233
5233
  }
5234
- const $c = "_inputContainer_41zd2_5", Kc = "_disabled_41zd2_23", qc = "_input_41zd2_5", Gc = "_endContent_41zd2_39", Hc = "_errorInput_41zd2_18", Yc = "_error_41zd2_18", Uc = "_label_41zd2_56", Wc = "_labelError_41zd2_67", Zc = "_disabledInput_41zd2_75", Jc = "_hidden_41zd2_82", Xc = "_securityContent_41zd2_86", A = {
5234
+ const $c = "_inputContainer_41zd2_5", Kc = "_disabled_41zd2_23", qc = "_input_41zd2_5", Gc = "_endContent_41zd2_39", Hc = "_errorInput_41zd2_18", Yc = "_error_41zd2_18", Uc = "_label_41zd2_56", Wc = "_labelError_41zd2_67", Zc = "_disabledInput_41zd2_75", Jc = "_hidden_41zd2_82", Xc = "_securityContent_41zd2_86", L = {
5235
5235
  inputContainer: $c,
5236
5236
  disabled: Kc,
5237
5237
  input: qc,
@@ -5309,16 +5309,16 @@ class ed {
5309
5309
  expiryChange: new K(),
5310
5310
  cvcChange: new K()
5311
5311
  });
5312
- var s, o, l, u, d, h, m, p, g, b, y, k, V, L, M, T, D;
5312
+ var s, o, l, u, d, h, m, p, g, b, y, C, V, T, I, A, D;
5313
5313
  this.translate = e;
5314
5314
  const i = e.messages();
5315
- this.element = document.createElement("div"), this.element.classList.add(A.securityContent), this.expiryInputContainer.classList.add(A.inputContainer), (s = t == null ? void 0 : t.container) != null && s.className && F(this.expiryInputContainer, t.container.className), (o = t == null ? void 0 : t.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, t.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("autocomplete", "cc-exp"), this.expiryInput.setAttribute("placeholder", i.card.expiry.placeholder), this.expiryInput.setAttribute("inputmode", "numeric"), this.expiryInput.setAttribute("pattern", "[0-9]*"), this.expiryInput.setAttribute("enterkeyhint", "next"), this.expiryInput.classList.add(A.input), (l = t == null ? void 0 : t.field) != null && l.className && F(this.expiryInput, t.field.className), (u = t == null ? void 0 : t.field) != null && u.styles && Object.assign(this.expiryInput.style, t.field.styles), this.expiryEndContent.classList.add(A.endContent), this.expiryEndContent.appendChild(this.expiryWarning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add(A.label), (d = t == null ? void 0 : t.label) != null && d.className && F(this.expiryLabel, t.label.className), (h = t == null ? void 0 : t.label) != null && h.styles && Object.assign(this.expiryLabel.style, t.label.styles), this.expiryLabelText.contentEditable = "false", this.expiryLabelText.textContent = i.card.expiry.label, this.expiryLabelError.textContent = i.card.required, this.expiryLabelError.classList.add(A.labelError, A.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add(A.error, A.hidden), (m = t == null ? void 0 : t.error) != null && m.className && F(this.expiryError, t.error.className), (p = t == null ? void 0 : t.error) != null && p.styles && Object.assign(this.expiryError.style, t.error.styles);
5315
+ this.element = document.createElement("div"), this.element.classList.add(L.securityContent), this.expiryInputContainer.classList.add(L.inputContainer), (s = t == null ? void 0 : t.container) != null && s.className && F(this.expiryInputContainer, t.container.className), (o = t == null ? void 0 : t.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, t.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("autocomplete", "cc-exp"), this.expiryInput.setAttribute("placeholder", i.card.expiry.placeholder), this.expiryInput.setAttribute("inputmode", "numeric"), this.expiryInput.setAttribute("pattern", "[0-9]*"), this.expiryInput.setAttribute("enterkeyhint", "next"), this.expiryInput.classList.add(L.input), (l = t == null ? void 0 : t.field) != null && l.className && F(this.expiryInput, t.field.className), (u = t == null ? void 0 : t.field) != null && u.styles && Object.assign(this.expiryInput.style, t.field.styles), this.expiryEndContent.classList.add(L.endContent), this.expiryEndContent.appendChild(this.expiryWarning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add(L.label), (d = t == null ? void 0 : t.label) != null && d.className && F(this.expiryLabel, t.label.className), (h = t == null ? void 0 : t.label) != null && h.styles && Object.assign(this.expiryLabel.style, t.label.styles), this.expiryLabelText.contentEditable = "false", this.expiryLabelText.textContent = i.card.expiry.label, this.expiryLabelError.textContent = i.card.required, this.expiryLabelError.classList.add(L.labelError, L.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add(L.error, L.hidden), (m = t == null ? void 0 : t.error) != null && m.className && F(this.expiryError, t.error.className), (p = t == null ? void 0 : t.error) != null && p.styles && Object.assign(this.expiryError.style, t.error.styles);
5316
5316
  const r = document.createElement("div");
5317
- if (r.appendChild(this.expiryError), this.cvcInputContainer.classList.add(A.inputContainer), (g = t == null ? void 0 : t.container) != null && g.className && F(this.cvcInputContainer, t.container.className), (b = t == null ? void 0 : t.container) != null && b.styles && Object.assign(this.cvcInputContainer.style, t.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("autocomplete", "cc-csc"), this.cvcInput.setAttribute("placeholder", i.card.cvc.placeholder), this.cvcInput.setAttribute("inputmode", "numeric"), this.cvcInput.setAttribute("pattern", "[0-9]*"), this.cvcInput.setAttribute("enterkeyhint", "done"), this.cvcInput.classList.add(A.input), (y = t == null ? void 0 : t.field) != null && y.className && F(this.cvcInput, t.field.className), (k = t == null ? void 0 : t.field) != null && k.styles && Object.assign(this.cvcInput.style, t.field.styles), (V = t == null ? void 0 : t.placeholder) != null && V.styles && Object.keys(t.placeholder.styles).length) {
5318
- const C = (O) => O.replace(/[A-Z]/g, (R) => "-" + R.toLowerCase()), w = Object.entries(t.placeholder.styles).map(([O, R]) => `${C(O)}:${R};`).join("");
5317
+ if (r.appendChild(this.expiryError), this.cvcInputContainer.classList.add(L.inputContainer), (g = t == null ? void 0 : t.container) != null && g.className && F(this.cvcInputContainer, t.container.className), (b = t == null ? void 0 : t.container) != null && b.styles && Object.assign(this.cvcInputContainer.style, t.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("autocomplete", "cc-csc"), this.cvcInput.setAttribute("placeholder", i.card.cvc.placeholder), this.cvcInput.setAttribute("inputmode", "numeric"), this.cvcInput.setAttribute("pattern", "[0-9]*"), this.cvcInput.setAttribute("enterkeyhint", "done"), this.cvcInput.classList.add(L.input), (y = t == null ? void 0 : t.field) != null && y.className && F(this.cvcInput, t.field.className), (C = t == null ? void 0 : t.field) != null && C.styles && Object.assign(this.cvcInput.style, t.field.styles), (V = t == null ? void 0 : t.placeholder) != null && V.styles && Object.keys(t.placeholder.styles).length) {
5318
+ const E = (O) => O.replace(/[A-Z]/g, (R) => "-" + R.toLowerCase()), w = Object.entries(t.placeholder.styles).map(([O, R]) => `${E(O)}:${R};`).join("");
5319
5319
  this.placeholderStyle.textContent = `#${this.expiryId}::placeholder{${w}}#${this.cvcId}::placeholder{${w}}`, this.element.appendChild(this.placeholderStyle);
5320
5320
  }
5321
- this.cvcEndContent.classList.add(A.endContent), this.cvcEndContent.appendChild(this.cardCvc.render()), this.cvcInputContainer.append(this.cvcInput, this.cvcEndContent), this.cvcLabel.setAttribute("for", this.cvcId), this.cvcLabel.classList.add(A.label), (L = t == null ? void 0 : t.label) != null && L.className && F(this.cvcLabel, t.label.className), (M = t == null ? void 0 : t.label) != null && M.styles && Object.assign(this.cvcLabel.style, t.label.styles), this.cvcLabelText.textContent = i.card.cvc.label, this.cvcLabelError.textContent = i.card.required, this.cvcLabelError.classList.add(A.labelError, A.hidden), (T = t == null ? void 0 : t.error) != null && T.className && F(this.cvcLabel, t.error.className), (D = t == null ? void 0 : t.error) != null && D.styles && Object.assign(this.cvcLabelError.style, t.error.styles), this.cvcLabel.append(this.cvcLabelText, this.cvcLabelError), this.cvcError.classList.add(A.error, A.hidden);
5321
+ this.cvcEndContent.classList.add(L.endContent), this.cvcEndContent.appendChild(this.cardCvc.render()), this.cvcInputContainer.append(this.cvcInput, this.cvcEndContent), this.cvcLabel.setAttribute("for", this.cvcId), this.cvcLabel.classList.add(L.label), (T = t == null ? void 0 : t.label) != null && T.className && F(this.cvcLabel, t.label.className), (I = t == null ? void 0 : t.label) != null && I.styles && Object.assign(this.cvcLabel.style, t.label.styles), this.cvcLabelText.textContent = i.card.cvc.label, this.cvcLabelError.textContent = i.card.required, this.cvcLabelError.classList.add(L.labelError, L.hidden), (A = t == null ? void 0 : t.error) != null && A.className && F(this.cvcLabel, t.error.className), (D = t == null ? void 0 : t.error) != null && D.styles && Object.assign(this.cvcLabelError.style, t.error.styles), this.cvcLabel.append(this.cvcLabelText, this.cvcLabelError), this.cvcError.classList.add(L.error, L.hidden);
5322
5322
  const a = document.createElement("div");
5323
5323
  a.appendChild(this.cvcError), this.element.append(
5324
5324
  this.expiryLabel,
@@ -5327,30 +5327,30 @@ class ed {
5327
5327
  this.cvcInputContainer,
5328
5328
  r,
5329
5329
  a
5330
- ), this.expiryInput.addEventListener("input", (C) => {
5331
- C.preventDefault();
5330
+ ), this.expiryInput.addEventListener("input", (E) => {
5331
+ E.preventDefault();
5332
5332
  const O = this.expiryInput.value.replace(/\D/g, "");
5333
5333
  this.handleExpiryChange(O);
5334
- }), this.expiryInput.addEventListener("paste", (C) => {
5334
+ }), this.expiryInput.addEventListener("paste", (E) => {
5335
5335
  var R;
5336
- C.preventDefault();
5337
- const O = (((R = C.clipboardData) == null ? void 0 : R.getData("text")) || "").replace(/\D/g, "");
5336
+ E.preventDefault();
5337
+ const O = (((R = E.clipboardData) == null ? void 0 : R.getData("text")) || "").replace(/\D/g, "");
5338
5338
  this.handleExpiryChange(O);
5339
- }), this.expiryInput.addEventListener("keydown", (C) => {
5340
- this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(C.key) || C.ctrlKey || C.metaKey || /^\d$/.test(C.key) || C.preventDefault();
5341
- }), this.expiryInput.addEventListener("blur", () => this.validateExpiry(this.expiryInput.value)), this.cvcInput.addEventListener("input", (C) => {
5342
- C.preventDefault();
5339
+ }), this.expiryInput.addEventListener("keydown", (E) => {
5340
+ this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(E.key) || E.ctrlKey || E.metaKey || /^\d$/.test(E.key) || E.preventDefault();
5341
+ }), this.expiryInput.addEventListener("blur", () => this.validateExpiry(this.expiryInput.value)), this.cvcInput.addEventListener("input", (E) => {
5342
+ E.preventDefault();
5343
5343
  const O = this.cvcInput.value.replace(/\D/g, "");
5344
5344
  this.handleCvcChange(O);
5345
- }), this.cvcInput.addEventListener("paste", (C) => {
5345
+ }), this.cvcInput.addEventListener("paste", (E) => {
5346
5346
  var R;
5347
- C.preventDefault();
5348
- const O = (((R = C.clipboardData) == null ? void 0 : R.getData("text")) || "").replace(/\D/g, "");
5347
+ E.preventDefault();
5348
+ const O = (((R = E.clipboardData) == null ? void 0 : R.getData("text")) || "").replace(/\D/g, "");
5349
5349
  this.handleCvcChange(O);
5350
- }), this.cvcInput.addEventListener("keydown", (C) => {
5351
- this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(C.key) || C.ctrlKey || C.metaKey || /^\d$/.test(C.key) || C.preventDefault();
5352
- }), this.cvcInput.addEventListener("blur", () => this.validateCvc(this.cvcInput.value)), this.translate.subscribe(({ messages: C }) => {
5353
- this.cvcInput.setAttribute("placeholder", C.card.cvc.placeholder), this.expiryInput.setAttribute("placeholder", C.card.expiry.placeholder), this.expiryLabelText.textContent = C.card.expiry.label, this.cvcLabelText.textContent = C.card.cvc.label, this.expiryLabelError.textContent = C.card.required, this.cvcLabelError.textContent = C.card.required, this.render();
5350
+ }), this.cvcInput.addEventListener("keydown", (E) => {
5351
+ this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(E.key) || E.ctrlKey || E.metaKey || /^\d$/.test(E.key) || E.preventDefault();
5352
+ }), this.cvcInput.addEventListener("blur", () => this.validateCvc(this.cvcInput.value)), this.translate.subscribe(({ messages: E }) => {
5353
+ this.cvcInput.setAttribute("placeholder", E.card.cvc.placeholder), this.expiryInput.setAttribute("placeholder", E.card.expiry.placeholder), this.expiryLabelText.textContent = E.card.expiry.label, this.cvcLabelText.textContent = E.card.cvc.label, this.expiryLabelError.textContent = E.card.required, this.cvcLabelError.textContent = E.card.required, this.render();
5354
5354
  });
5355
5355
  }
5356
5356
  cvcValidator(e) {
@@ -5371,21 +5371,21 @@ class ed {
5371
5371
  }), this.cvcInput.value = t, this.render();
5372
5372
  }
5373
5373
  toggleCvcLabelError(e) {
5374
- return E(this, null, function* () {
5374
+ return k(this, null, function* () {
5375
5375
  if (e) {
5376
- this.cvcInputContainer.classList.add(A.errorInput), this.cvcLabelError.classList.remove(A.hidden), yield H(this.cvcLabelError, W.open, W.transition);
5376
+ this.cvcInputContainer.classList.add(L.errorInput), this.cvcLabelError.classList.remove(L.hidden), yield H(this.cvcLabelError, W.open, W.transition);
5377
5377
  return;
5378
5378
  }
5379
- yield H(this.cvcLabelError, W.close, W.transition), this.cvcLabelError.classList.add(A.hidden);
5379
+ yield H(this.cvcLabelError, W.close, W.transition), this.cvcLabelError.classList.add(L.hidden);
5380
5380
  });
5381
5381
  }
5382
5382
  toggleCvcErrorMessage(e) {
5383
- return E(this, null, function* () {
5383
+ return k(this, null, function* () {
5384
5384
  if (e) {
5385
- this.cvcInputContainer.classList.add(A.errorInput), this.cvcError.textContent = this.cvcErrorMessage, this.cvcError.classList.remove(A.hidden), yield H(this.cvcError, Q.open, Q.transition);
5385
+ this.cvcInputContainer.classList.add(L.errorInput), this.cvcError.textContent = this.cvcErrorMessage, this.cvcError.classList.remove(L.hidden), yield H(this.cvcError, Q.open, Q.transition);
5386
5386
  return;
5387
5387
  }
5388
- yield H(this.cvcError, Q.close, Q.transition), this.cvcError.classList.add(A.hidden);
5388
+ yield H(this.cvcError, Q.close, Q.transition), this.cvcError.classList.add(L.hidden);
5389
5389
  });
5390
5390
  }
5391
5391
  expiryValidator(e) {
@@ -5422,22 +5422,22 @@ class ed {
5422
5422
  }
5423
5423
  // toggle expiry label error
5424
5424
  toggleExpiryLabelError(e) {
5425
- return E(this, null, function* () {
5425
+ return k(this, null, function* () {
5426
5426
  if (e) {
5427
- this.expiryInputContainer.classList.add(A.errorInput), this.expiryLabelError.classList.remove(A.hidden), yield H(this.expiryLabelError, W.open, W.transition);
5427
+ this.expiryInputContainer.classList.add(L.errorInput), this.expiryLabelError.classList.remove(L.hidden), yield H(this.expiryLabelError, W.open, W.transition);
5428
5428
  return;
5429
5429
  }
5430
- yield H(this.expiryLabelError, W.close, W.transition), this.expiryLabelError.classList.add(A.hidden);
5430
+ yield H(this.expiryLabelError, W.close, W.transition), this.expiryLabelError.classList.add(L.hidden);
5431
5431
  });
5432
5432
  }
5433
5433
  // toggle expiry error message
5434
5434
  toggleExpiryErrorMessage(e) {
5435
- return E(this, null, function* () {
5435
+ return k(this, null, function* () {
5436
5436
  if (e) {
5437
- this.expiryInputContainer.classList.add(A.errorInput), this.expiryError.textContent = this.expiryErrorMessage, this.expiryError.classList.remove(A.hidden), yield H(this.expiryError, Q.open, Q.transition);
5437
+ this.expiryInputContainer.classList.add(L.errorInput), this.expiryError.textContent = this.expiryErrorMessage, this.expiryError.classList.remove(L.hidden), yield H(this.expiryError, Q.open, Q.transition);
5438
5438
  return;
5439
5439
  }
5440
- yield H(this.expiryError, Q.close, Q.transition), this.expiryError.classList.add(A.hidden);
5440
+ yield H(this.expiryError, Q.close, Q.transition), this.expiryError.classList.add(L.hidden);
5441
5441
  });
5442
5442
  }
5443
5443
  // add event listener
@@ -5446,7 +5446,7 @@ class ed {
5446
5446
  }
5447
5447
  // disable
5448
5448
  disable(e) {
5449
- e ? (this.expiryInput.setAttribute("disabled", "true"), this.expiryInput.classList.add(A.disabledInput), this.expiryInputContainer.classList.add(A.disabled), this.cvcInput.setAttribute("disabled", "true"), this.cvcInput.classList.add(A.disabledInput), this.cvcInputContainer.classList.add(A.disabled)) : (this.expiryInput.removeAttribute("disabled"), this.expiryInput.classList.remove(A.disabledInput), this.expiryInputContainer.classList.remove(A.disabled), this.cvcInput.removeAttribute("disabled"), this.cvcInput.classList.remove(A.disabledInput), this.cvcInputContainer.classList.remove(A.disabled));
5449
+ e ? (this.expiryInput.setAttribute("disabled", "true"), this.expiryInput.classList.add(L.disabledInput), this.expiryInputContainer.classList.add(L.disabled), this.cvcInput.setAttribute("disabled", "true"), this.cvcInput.classList.add(L.disabledInput), this.cvcInputContainer.classList.add(L.disabled)) : (this.expiryInput.removeAttribute("disabled"), this.expiryInput.classList.remove(L.disabledInput), this.expiryInputContainer.classList.remove(L.disabled), this.cvcInput.removeAttribute("disabled"), this.cvcInput.classList.remove(L.disabledInput), this.cvcInputContainer.classList.remove(L.disabled));
5450
5450
  }
5451
5451
  // touch submit
5452
5452
  touchSubmit() {
@@ -5471,9 +5471,9 @@ class ed {
5471
5471
  // render
5472
5472
  render() {
5473
5473
  const e = this.isTouchSubmit || this.isExpiryChanged, t = e && !this.isDisabled && this.isExpiryRequired, i = e && !this.isDisabled && !!this.expiryErrorMessage;
5474
- this.toggleExpiryLabelError(t), this.toggleExpiryErrorMessage(i), !t && !i ? (this.expiryInputContainer.classList.remove(A.errorInput), this.expiryEndContent.classList.add(A.hidden)) : this.expiryEndContent.classList.remove(A.hidden);
5474
+ this.toggleExpiryLabelError(t), this.toggleExpiryErrorMessage(i), !t && !i ? (this.expiryInputContainer.classList.remove(L.errorInput), this.expiryEndContent.classList.add(L.hidden)) : this.expiryEndContent.classList.remove(L.hidden);
5475
5475
  const r = this.isTouchSubmit || this.isCvcChanged, a = r && !this.isDisabled && this.isCvcRequired, s = r && !this.isDisabled && !!this.cvcErrorMessage;
5476
- return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove(A.errorInput), this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cardCvc.render())) : (this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cvcWarning.render())), this.isDisabled ? (this.expiryInputContainer.classList.add(A.disabled), this.expiryInput.classList.add(A.disabledInput), this.cvcInputContainer.classList.add(A.disabled), this.cvcInput.classList.add(A.disabledInput)) : (this.expiryInputContainer.classList.remove(A.disabled), this.expiryInput.classList.remove(A.disabledInput), this.cvcInputContainer.classList.remove(A.disabled), this.cvcInput.classList.remove(A.disabledInput)), this.element;
5476
+ return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove(L.errorInput), this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cardCvc.render())) : (this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cvcWarning.render())), this.isDisabled ? (this.expiryInputContainer.classList.add(L.disabled), this.expiryInput.classList.add(L.disabledInput), this.cvcInputContainer.classList.add(L.disabled), this.cvcInput.classList.add(L.disabledInput)) : (this.expiryInputContainer.classList.remove(L.disabled), this.expiryInput.classList.remove(L.disabledInput), this.cvcInputContainer.classList.remove(L.disabled), this.cvcInput.classList.remove(L.disabledInput)), this.element;
5477
5477
  }
5478
5478
  }
5479
5479
  class td {
@@ -5664,7 +5664,7 @@ class ld {
5664
5664
  }
5665
5665
  // init
5666
5666
  init() {
5667
- return E(this, null, function* () {
5667
+ return k(this, null, function* () {
5668
5668
  this.buttons.addEventListener("onPaymentAttempt", (e) => {
5669
5669
  var i;
5670
5670
  const t = this.config.state.checkout.getState();
@@ -5672,7 +5672,7 @@ class ld {
5672
5672
  }), this.buttons.addEventListener("onFormLoaded", () => {
5673
5673
  const { onCheckoutLoaded: e } = this.config.state.checkout.getState();
5674
5674
  !this.hasLoadedOnce && e && (this.hasLoadedOnce = !0, e({ success: !0 }));
5675
- }), this.buttons.addEventListener("ready", () => E(this, null, function* () {
5675
+ }), this.buttons.addEventListener("ready", () => k(this, null, function* () {
5676
5676
  var t;
5677
5677
  this.loader.setClassName(Z.hidden);
5678
5678
  const { variant: e } = this.config.state.checkout.getState();
@@ -5683,7 +5683,7 @@ class ld {
5683
5683
  { duration: 250, easing: "ease-out", fill: "forwards" }
5684
5684
  ).finished) != null ? t : Promise.resolve(), this.checkout.style.height = ""), this.isFormOpen = !0;
5685
5685
  }
5686
- })), this.buttons.addEventListener("open", () => E(this, null, function* () {
5686
+ })), this.buttons.addEventListener("open", () => k(this, null, function* () {
5687
5687
  var r;
5688
5688
  if (this.isLoading) return;
5689
5689
  this.hideError();
@@ -5725,7 +5725,7 @@ class ld {
5725
5725
  case "venmo":
5726
5726
  return this.handleSuccess({ clientSession: t, braintree: { nonce: e } });
5727
5727
  }
5728
- }), this.form.addEventListener("close", () => E(this, null, function* () {
5728
+ }), this.form.addEventListener("close", () => k(this, null, function* () {
5729
5729
  var a, s;
5730
5730
  if (this.isLoading) return;
5731
5731
  this.hideError();
@@ -5745,7 +5745,7 @@ class ld {
5745
5745
  { minHeight: [`${e}px`, `${this.closedHeight}px`] },
5746
5746
  { duration: 250, easing: "ease-out", fill: "forwards" }
5747
5747
  ).finished) != null ? s : Promise.resolve(), this.checkout.style.height = "auto"), this.isFormOpen = !1;
5748
- })), this.form.addEventListener("submit", (e) => E(this, null, function* () {
5748
+ })), this.form.addEventListener("submit", (e) => k(this, null, function* () {
5749
5749
  if (this.isLoading || (this.form.touchSubmit(), this.hideError(), !this.form.validate())) return;
5750
5750
  const i = e.number.replace(/\D/g, ""), r = this.config.state.checkout.getState(), a = this.config.service.ev.getEv(), [s, o] = yield Promise.all([a.encrypt(i), a.encrypt(e.cvc)]), [l, u] = e.expiry.split("/");
5751
5751
  yield this.handleSuccess({
@@ -5776,7 +5776,7 @@ class ld {
5776
5776
  }
5777
5777
  // handle success
5778
5778
  handleSuccess(e) {
5779
- return E(this, null, function* () {
5779
+ return k(this, null, function* () {
5780
5780
  var a, s;
5781
5781
  if (this.isLoading) return;
5782
5782
  this.hideError(), this.setLoading(!0);
@@ -5789,7 +5789,7 @@ class ld {
5789
5789
  yield this.config.service.ev.initThreeDs({
5790
5790
  threeDsId: r.three_ds_session_id,
5791
5791
  onSuccess: () => {
5792
- this.setLoading(!1), this.handleSuccess(I(v({}, e), { threeDsSessionId: r == null ? void 0 : r.three_ds_session_id }));
5792
+ this.setLoading(!1), this.handleSuccess(M(v({}, e), { threeDsSessionId: r == null ? void 0 : r.three_ds_session_id }));
5793
5793
  },
5794
5794
  onError: () => {
5795
5795
  this.handleError(r == null ? void 0 : r.status_reason);
@@ -5817,7 +5817,7 @@ class ld {
5817
5817
  }
5818
5818
  // show success
5819
5819
  showSuccess() {
5820
- return E(this, null, function* () {
5820
+ return k(this, null, function* () {
5821
5821
  this.container.classList.add(Z.hidden), this.success.removeClassName(Z.hidden), yield H(this.success.element, _e.open, _e.transition);
5822
5822
  });
5823
5823
  }
@@ -5868,7 +5868,7 @@ class cd {
5868
5868
  }
5869
5869
  // init
5870
5870
  init() {
5871
- return E(this, null, function* () {
5871
+ return k(this, null, function* () {
5872
5872
  const { checkout: e, transaction: t, translate: i, styles: r } = this.config.state, { apiVersion: a } = e.getState();
5873
5873
  e.subscribe(({ clientToken: s, environment: o, locale: l, translate: u, styles: d }) => {
5874
5874
  const h = En.teamId, m = En.appIds[o];
@@ -5887,7 +5887,7 @@ class cd {
5887
5887
  }
5888
5888
  // mount
5889
5889
  mount() {
5890
- return E(this, null, function* () {
5890
+ return k(this, null, function* () {
5891
5891
  return this.component || (this.component = new ld(this.config)), yield this.init(), yield this.component.init(), this.component.render();
5892
5892
  });
5893
5893
  }
@@ -5936,7 +5936,7 @@ class md extends Ct {
5936
5936
  }
5937
5937
  // update transaction
5938
5938
  updateTransaction(t, i, r) {
5939
- return E(this, null, function* () {
5939
+ return k(this, null, function* () {
5940
5940
  if (this.clientToken === t) return this.getState();
5941
5941
  this.clientToken = t;
5942
5942
  try {
@@ -7545,13 +7545,13 @@ const fd = {
7545
7545
  return {
7546
7546
  card: v(v({}, t.card), e.card && {
7547
7547
  required: e.card.required || t.card.required,
7548
- number: e.card.number ? I(v(v({}, t.card.number), e.card.number), {
7548
+ number: e.card.number ? M(v(v({}, t.card.number), e.card.number), {
7549
7549
  error: e.card.number.error ? v(v({}, t.card.number.error), e.card.number.error) : t.card.number.error
7550
7550
  }) : t.card.number,
7551
- expiry: e.card.expiry ? I(v(v({}, t.card.expiry), e.card.expiry), {
7551
+ expiry: e.card.expiry ? M(v(v({}, t.card.expiry), e.card.expiry), {
7552
7552
  error: e.card.expiry.error ? v(v({}, t.card.expiry.error), e.card.expiry.error) : t.card.expiry.error
7553
7553
  }) : t.card.expiry,
7554
- cvc: e.card.cvc ? I(v(v({}, t.card.cvc), e.card.cvc), {
7554
+ cvc: e.card.cvc ? M(v(v({}, t.card.cvc), e.card.cvc), {
7555
7555
  error: e.card.cvc.error ? v(v({}, t.card.cvc.error), e.card.cvc.error) : t.card.cvc.error
7556
7556
  }) : t.card.cvc,
7557
7557
  name: e.card.name ? v(v({}, t.card.name), e.card.name) : t.card.name,
@@ -7607,7 +7607,7 @@ class Qd {
7607
7607
  }
7608
7608
  // init
7609
7609
  init(e) {
7610
- return E(this, null, function* () {
7610
+ return k(this, null, function* () {
7611
7611
  if (typeof window == "undefined")
7612
7612
  throw new Error("PayPal can only be initialized in browser environment");
7613
7613
  try {
@@ -7624,12 +7624,12 @@ class Qd {
7624
7624
  }
7625
7625
  // render
7626
7626
  render(e, t) {
7627
- return E(this, null, function* () {
7627
+ return k(this, null, function* () {
7628
7628
  var i, r;
7629
7629
  if (!e.isConnected)
7630
7630
  throw new Error("PayPal parent element must be connected to DOM before render()");
7631
7631
  if (this.paypal) {
7632
- const a = v(v({}, Xd), (t == null ? void 0 : t.style) || {}), s = I(v({
7632
+ const a = v(v({}, Xd), (t == null ? void 0 : t.style) || {}), s = M(v({
7633
7633
  fundingSource: "paypal"
7634
7634
  }, t), {
7635
7635
  style: a
@@ -7649,7 +7649,7 @@ class eu {
7649
7649
  }
7650
7650
  // init
7651
7651
  init(e) {
7652
- return E(this, null, function* () {
7652
+ return k(this, null, function* () {
7653
7653
  if (typeof window == "undefined")
7654
7654
  throw new Error("Braintree can only be initialized in browser environment");
7655
7655
  try {
@@ -7671,7 +7671,7 @@ class eu {
7671
7671
  }
7672
7672
  // create venmo instance
7673
7673
  createVenmo(e) {
7674
- return E(this, null, function* () {
7674
+ return k(this, null, function* () {
7675
7675
  if (!this.client)
7676
7676
  throw new Error("Braintree client must be initialized before creating Venmo instance");
7677
7677
  try {
@@ -7700,7 +7700,7 @@ class eu {
7700
7700
  }
7701
7701
  // tokenize venmo payment
7702
7702
  tokenize() {
7703
- return E(this, null, function* () {
7703
+ return k(this, null, function* () {
7704
7704
  if (!this.venmoInstance)
7705
7705
  throw new Error("Venmo instance not initialized");
7706
7706
  return new Promise((e, t) => {
@@ -7708,7 +7708,7 @@ class eu {
7708
7708
  if (i)
7709
7709
  t(i);
7710
7710
  else {
7711
- const a = I(v({}, r), {
7711
+ const a = M(v({}, r), {
7712
7712
  device_data: this.deviceData || void 0
7713
7713
  }), s = r, o = (s == null ? void 0 : s.billingAddress) || (s == null ? void 0 : s.billing_address);
7714
7714
  if (o) {