@paynext/sdk 0.0.34 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -78,6 +78,7 @@ interface PayNextConfig {
78
78
  variant?: 'default' | 'compact' // Optional: UI variant
79
79
  locale?: Locale // Optional: language (en, de, fr, etc.)
80
80
  translate?: CheckoutTranslate // Optional: custom translations
81
+ styles?: StylesConfig // Optional: custom styles
81
82
  onCheckoutComplete?: (result: PaymentResult) => void
82
83
  onCheckoutFail?: (error: Error) => void
83
84
  }
package/dist/index.d.ts CHANGED
@@ -249,8 +249,8 @@ export declare type Locale = 'ar' | 'en' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'e
249
249
 
250
250
  export declare interface PaymentResult {
251
251
  paymentMethod: 'card' | 'apple_pay' | 'google_pay' | 'paypal';
252
- transactionId?: string;
253
252
  clientSession: string;
253
+ status?: string;
254
254
  paymentDetails?: {
255
255
  card?: {
256
256
  brand: string;
package/dist/index.es.js CHANGED
@@ -71,7 +71,7 @@ function As(t, e, n) {
71
71
  Promise.resolve().then(() => {
72
72
  di();
73
73
  });
74
- let Is = class {
74
+ let Vs = class {
75
75
  constructor(e) {
76
76
  l(this, "apple", null);
77
77
  l(this, "isAvailable", !1);
@@ -111,7 +111,7 @@ let Is = class {
111
111
  !this.apple || !this.isAvailable || (e.innerHTML = "", yield this.apple.mount(e), (n = this.onReady) == null || n.call(this));
112
112
  });
113
113
  }
114
- }, Vs = class {
114
+ }, Is = class {
115
115
  constructor(e) {
116
116
  l(this, "google", null);
117
117
  this.ev = e;
@@ -200,7 +200,7 @@ class Ms {
200
200
  // init ev
201
201
  initEv(e) {
202
202
  return C(this, null, function* () {
203
- this.isShouldLoad(e) && (this.isReady = !1, this.ev = yield As(e.teamId, e.appId), this.apple = new Is(this.ev), this.google = new Vs(this.ev), this.events.ready.emit(), this.isReady = !0);
203
+ this.isShouldLoad(e) && (this.isReady = !1, this.ev = yield As(e.teamId, e.appId), this.apple = new Vs(this.ev), this.google = new Is(this.ev), this.events.ready.emit(), this.isReady = !0);
204
204
  });
205
205
  }
206
206
  // init three ds
@@ -375,9 +375,9 @@ function Fs(t, s = {}, r, i) {
375
375
  }
376
376
  let [b, L, y = {}] = v;
377
377
  y.at !== void 0 && (f = Er(f, y.at, m, p));
378
- let I = 0;
379
- const x = (V, S, w, P = 0, R = 0) => {
380
- const N = zs(V), ve = S, { delay: ae = 0, times: G = gi(N), type: oe = "keyframes", repeat: J, repeatType: Te, repeatDelay: Ae = 0 } = ve, Ce = te(ve, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
378
+ let V = 0;
379
+ const x = (I, S, w, P = 0, R = 0) => {
380
+ const N = zs(I), ve = S, { delay: ae = 0, times: G = gi(N), type: oe = "keyframes", repeat: J, repeatType: Te, repeatDelay: Ae = 0 } = ve, Ce = te(ve, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
381
381
  let { ease: Z = e.ease || "easeOut", duration: K } = S;
382
382
  const pe = typeof ae == "function" ? ae(P, R) : ae, he = N.length, me = Qt(oe) ? oe : i == null ? void 0 : i[oe];
383
383
  if (he <= 2 && me) {
@@ -408,40 +408,40 @@ function Fs(t, s = {}, r, i) {
408
408
  js(G, J);
409
409
  }
410
410
  const ye = fe + K;
411
- Os(w, N, Z, G, fe, ye), I = Math.max(pe + K, I), h = Math.max(ye, h);
411
+ Os(w, N, Z, G, fe, ye), V = Math.max(pe + K, V), h = Math.max(ye, h);
412
412
  };
413
413
  if (H(b)) {
414
- const V = Lr(b, u);
415
- x(L, y, Tr("default", V));
414
+ const I = Lr(b, u);
415
+ x(L, y, Tr("default", I));
416
416
  } else {
417
- const V = ui(b, L, r, d), S = V.length;
417
+ const I = ui(b, L, r, d), S = I.length;
418
418
  for (let w = 0; w < S; w++) {
419
419
  L = L, y = y;
420
- const P = V[w], R = Lr(P, u);
420
+ const P = I[w], R = Lr(P, u);
421
421
  for (const N in L)
422
422
  x(L[N], $s(y, N), Tr(N, R), w, S);
423
423
  }
424
424
  }
425
- m = f, f += I;
425
+ m = f, f += V;
426
426
  }
427
427
  return u.forEach((g, v) => {
428
428
  for (const b in g) {
429
429
  const L = g[b];
430
430
  L.sort(qs);
431
- const y = [], I = [], x = [];
431
+ const y = [], V = [], x = [];
432
432
  for (let S = 0; S < L.length; S++) {
433
433
  const { at: w, value: P, easing: R } = L[S];
434
- y.push(P), I.push(/* @__PURE__ */ Xt(0, h, w)), x.push(R || "easeOut");
434
+ y.push(P), V.push(/* @__PURE__ */ Xt(0, h, w)), x.push(R || "easeOut");
435
435
  }
436
- I[0] !== 0 && (I.unshift(0), y.unshift(y[0]), x.unshift(Ks)), I[I.length - 1] !== 1 && (I.push(1), y.push(null)), c.has(v) || c.set(v, {
436
+ V[0] !== 0 && (V.unshift(0), y.unshift(y[0]), x.unshift(Ks)), V[V.length - 1] !== 1 && (V.push(1), y.push(null)), c.has(v) || c.set(v, {
437
437
  keyframes: {},
438
438
  transition: {}
439
439
  });
440
- const V = c.get(v);
441
- V.keyframes[b] = y, V.transition[b] = T(M(T({}, e), {
440
+ const I = c.get(v);
441
+ I.keyframes[b] = y, I.transition[b] = T(M(T({}, e), {
442
442
  duration: h,
443
443
  ease: x,
444
- times: I
444
+ times: V
445
445
  }), n);
446
446
  }
447
447
  }), c;
@@ -543,18 +543,18 @@ function Js(t, e) {
543
543
  delta: 0,
544
544
  timestamp: 0,
545
545
  isProcessing: !1
546
- }, s = () => n = !0, a = mt.reduce((y, I) => (y[I] = Ys(s), y), {}), { setup: o, read: c, resolveKeyframes: u, preUpdate: d, update: p, preRender: m, render: f, postRender: h } = a, g = () => {
546
+ }, s = () => n = !0, a = mt.reduce((y, V) => (y[V] = Ys(s), y), {}), { setup: o, read: c, resolveKeyframes: u, preUpdate: d, update: p, preRender: m, render: f, postRender: h } = a, g = () => {
547
547
  const y = de.useManualTiming ? i.timestamp : performance.now();
548
548
  n = !1, de.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(y - i.timestamp, Ws), 1)), i.timestamp = y, i.isProcessing = !0, o.process(i), c.process(i), u.process(i), d.process(i), p.process(i), m.process(i), f.process(i), h.process(i), i.isProcessing = !1, n && e && (r = !1, t(g));
549
549
  }, v = () => {
550
550
  n = !0, r = !0, i.isProcessing || t(g);
551
551
  };
552
- return { schedule: mt.reduce((y, I) => {
553
- const x = a[I];
554
- return y[I] = (V, S = !1, w = !1) => (n || v(), x.schedule(V, S, w)), y;
552
+ return { schedule: mt.reduce((y, V) => {
553
+ const x = a[V];
554
+ return y[V] = (I, S = !1, w = !1) => (n || v(), x.schedule(I, S, w)), y;
555
555
  }, {}), cancel: (y) => {
556
- for (let I = 0; I < mt.length; I++)
557
- a[mt[I]].cancel(y);
556
+ for (let V = 0; V < mt.length; V++)
557
+ a[mt[V]].cancel(y);
558
558
  }, state: i, steps: a };
559
559
  }
560
560
  const Pe = /* @__NO_SIDE_EFFECTS__ */ (t) => t, { schedule: ue, cancel: Dt, state: xt } = /* @__PURE__ */ Js(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : Pe, !0);
@@ -567,9 +567,9 @@ const W = {
567
567
  set: (t) => {
568
568
  bt = t, queueMicrotask(Xs);
569
569
  }
570
- }, Ir = /* @__PURE__ */ new Set();
570
+ }, Vr = /* @__PURE__ */ new Set();
571
571
  function bi(t, e, n) {
572
- t || Ir.has(e) || (console.warn(e), Ir.add(e));
572
+ t || Vr.has(e) || (console.warn(e), Vr.add(e));
573
573
  }
574
574
  class Ci {
575
575
  constructor() {
@@ -599,7 +599,7 @@ class Ci {
599
599
  function xi(t, e) {
600
600
  return e ? t * (1e3 / e) : 0;
601
601
  }
602
- const Vr = 30, Qs = (t) => !isNaN(parseFloat(t));
602
+ const Ir = 30, Qs = (t) => !isNaN(parseFloat(t));
603
603
  class ea {
604
604
  /**
605
605
  * @param init - The initiating value
@@ -748,9 +748,9 @@ class ea {
748
748
  */
749
749
  getVelocity() {
750
750
  const e = W.now();
751
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Vr)
751
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Ir)
752
752
  return 0;
753
- const n = Math.min(this.updatedAt - this.prevUpdatedAt, Vr);
753
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, Ir);
754
754
  return xi(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
755
755
  }
756
756
  /**
@@ -934,20 +934,20 @@ const Nt = {
934
934
  }), be = /* @__PURE__ */ dt("deg"), Me = /* @__PURE__ */ dt("%"), E = /* @__PURE__ */ dt("px"), ka = /* @__PURE__ */ dt("vh"), Ea = /* @__PURE__ */ dt("vw"), Sr = M(T({}, Me), {
935
935
  parse: (t) => Me.parse(t) / 100,
936
936
  transform: (t) => Me.transform(t * 100)
937
- }), Ve = {
937
+ }), Ie = {
938
938
  test: /* @__PURE__ */ sn("hsl", "hue"),
939
939
  parse: /* @__PURE__ */ Li("hue", "saturation", "lightness"),
940
940
  transform: ({ hue: t, saturation: e, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(t) + ", " + Me.transform(nt(e)) + ", " + Me.transform(nt(n)) + ", " + nt(st.transform(r)) + ")"
941
941
  }, F = {
942
- test: (t) => xe.test(t) || Nt.test(t) || Ve.test(t),
943
- parse: (t) => xe.test(t) ? xe.parse(t) : Ve.test(t) ? Ve.parse(t) : Nt.parse(t),
944
- transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? xe.transform(t) : Ve.transform(t)
942
+ test: (t) => xe.test(t) || Nt.test(t) || Ie.test(t),
943
+ parse: (t) => xe.test(t) ? xe.parse(t) : Ie.test(t) ? Ie.parse(t) : Nt.parse(t),
944
+ transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? xe.transform(t) : Ie.transform(t)
945
945
  }, La = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
946
946
  function Ta(t) {
947
947
  var e, n;
948
948
  return isNaN(t) && typeof t == "string" && (((e = t.match(rn)) == null ? void 0 : e.length) || 0) + (((n = t.match(La)) == null ? void 0 : n.length) || 0) > 0;
949
949
  }
950
- const Ti = "number", Ai = "color", Aa = "var", Ia = "var(", Mr = "${}", Va = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
950
+ const Ti = "number", Ai = "color", Aa = "var", Va = "var(", Mr = "${}", Ia = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
951
951
  function at(t) {
952
952
  const e = t.toString(), n = [], r = {
953
953
  color: [],
@@ -955,13 +955,13 @@ function at(t) {
955
955
  var: []
956
956
  }, i = [];
957
957
  let s = 0;
958
- const o = e.replace(Va, (c) => (F.test(c) ? (r.color.push(s), i.push(Ai), n.push(F.parse(c))) : c.startsWith(Ia) ? (r.var.push(s), i.push(Aa), n.push(c)) : (r.number.push(s), i.push(Ti), n.push(parseFloat(c))), ++s, Mr)).split(Mr);
958
+ const o = e.replace(Ia, (c) => (F.test(c) ? (r.color.push(s), i.push(Ai), n.push(F.parse(c))) : c.startsWith(Va) ? (r.var.push(s), i.push(Aa), n.push(c)) : (r.number.push(s), i.push(Ti), n.push(parseFloat(c))), ++s, Mr)).split(Mr);
959
959
  return { values: n, split: o, indexes: r, types: i };
960
960
  }
961
- function Ii(t) {
961
+ function Vi(t) {
962
962
  return at(t).values;
963
963
  }
964
- function Vi(t) {
964
+ function Ii(t) {
965
965
  const { split: e, types: n } = at(t), r = e.length;
966
966
  return (i) => {
967
967
  let s = "";
@@ -975,13 +975,13 @@ function Vi(t) {
975
975
  }
976
976
  const Sa = (t) => typeof t == "number" ? 0 : t;
977
977
  function Ma(t) {
978
- const e = Ii(t);
979
- return Vi(t)(e.map(Sa));
978
+ const e = Vi(t);
979
+ return Ii(t)(e.map(Sa));
980
980
  }
981
981
  const Oe = {
982
982
  test: Ta,
983
- parse: Ii,
984
- createTransformer: Vi,
983
+ parse: Vi,
984
+ createTransformer: Ii,
985
985
  getAnimatableNone: Ma
986
986
  };
987
987
  function At(t, e, n) {
@@ -1006,23 +1006,23 @@ function _a({ hue: t, saturation: e, lightness: n, alpha: r }) {
1006
1006
  function wt(t, e) {
1007
1007
  return (n) => n > 0 ? e : t;
1008
1008
  }
1009
- const It = (t, e, n) => {
1009
+ const Vt = (t, e, n) => {
1010
1010
  const r = t * t, i = n * (e * e - r) + r;
1011
1011
  return i < 0 ? 0 : Math.sqrt(i);
1012
- }, Pa = [Nt, xe, Ve], Da = (t) => Pa.find((e) => e.test(t));
1012
+ }, Pa = [Nt, xe, Ie], Da = (t) => Pa.find((e) => e.test(t));
1013
1013
  function _r(t) {
1014
1014
  const e = Da(t);
1015
1015
  if (ct(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
1016
1016
  return !1;
1017
1017
  let n = e.parse(t);
1018
- return e === Ve && (n = _a(n)), n;
1018
+ return e === Ie && (n = _a(n)), n;
1019
1019
  }
1020
1020
  const Pr = (t, e) => {
1021
1021
  const n = _r(t), r = _r(e);
1022
1022
  if (!n || !r)
1023
1023
  return wt(t, e);
1024
1024
  const i = T({}, n);
1025
- return (s) => (i.red = It(n.red, r.red, s), i.green = It(n.green, r.green, s), i.blue = It(n.blue, r.blue, s), i.alpha = lt(n.alpha, r.alpha, s), xe.transform(i));
1025
+ return (s) => (i.red = Vt(n.red, r.red, s), i.green = Vt(n.green, r.green, s), i.blue = Vt(n.blue, r.blue, s), i.alpha = lt(n.alpha, r.alpha, s), xe.transform(i));
1026
1026
  }, Rt = /* @__PURE__ */ new Set(["none", "hidden"]);
1027
1027
  function Na(t, e) {
1028
1028
  return Rt.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
@@ -1204,41 +1204,41 @@ function ot(t = D.visualDuration, e = D.bounce) {
1204
1204
  let y;
1205
1205
  if (g < 1) {
1206
1206
  const x = Ot(b, g);
1207
- y = (V) => {
1208
- const S = Math.exp(-g * b * V);
1209
- return a - S * ((h + g * b * v) / x * Math.sin(x * V) + v * Math.cos(x * V));
1207
+ y = (I) => {
1208
+ const S = Math.exp(-g * b * I);
1209
+ return a - S * ((h + g * b * v) / x * Math.sin(x * I) + v * Math.cos(x * I));
1210
1210
  };
1211
1211
  } else if (g === 1)
1212
1212
  y = (x) => a - Math.exp(-b * x) * (v + (h + b * v) * x);
1213
1213
  else {
1214
1214
  const x = b * Math.sqrt(g * g - 1);
1215
- y = (V) => {
1216
- const S = Math.exp(-g * b * V), w = Math.min(x * V, 300);
1215
+ y = (I) => {
1216
+ const S = Math.exp(-g * b * I), w = Math.min(x * I, 300);
1217
1217
  return a - S * ((h + g * b * v) * Math.sinh(w) + x * v * Math.cosh(w)) / x;
1218
1218
  };
1219
1219
  }
1220
- const I = {
1220
+ const V = {
1221
1221
  calculatedDuration: f && p || null,
1222
1222
  next: (x) => {
1223
- const V = y(x);
1223
+ const I = y(x);
1224
1224
  if (f)
1225
1225
  o.done = x >= p;
1226
1226
  else {
1227
1227
  let S = x === 0 ? h : 0;
1228
- g < 1 && (S = x === 0 ? /* @__PURE__ */ ne(h) : Pi(y, x, V));
1229
- const w = Math.abs(S) <= r, P = Math.abs(a - V) <= i;
1228
+ g < 1 && (S = x === 0 ? /* @__PURE__ */ ne(h) : Pi(y, x, I));
1229
+ const w = Math.abs(S) <= r, P = Math.abs(a - I) <= i;
1230
1230
  o.done = w && P;
1231
1231
  }
1232
- return o.value = o.done ? a : V, o;
1232
+ return o.value = o.done ? a : I, o;
1233
1233
  },
1234
1234
  toString: () => {
1235
- const x = Math.min(en(I), Ct), V = _i((S) => I.next(x * S).value, x, 30);
1236
- return x + "ms " + V;
1235
+ const x = Math.min(en(V), Ct), I = _i((S) => V.next(x * S).value, x, 30);
1236
+ return x + "ms " + I;
1237
1237
  },
1238
1238
  toTransition: () => {
1239
1239
  }
1240
1240
  };
1241
- return I;
1241
+ return V;
1242
1242
  }
1243
1243
  ot.applyToOptions = (t) => {
1244
1244
  const e = yi(t, 100, ot);
@@ -1252,13 +1252,13 @@ function jt({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: r = 3
1252
1252
  let g = n * e;
1253
1253
  const v = p + g, b = a === void 0 ? v : a(v);
1254
1254
  b !== v && (g = b - p);
1255
- const L = (w) => -g * Math.exp(-w / r), y = (w) => b + L(w), I = (w) => {
1255
+ const L = (w) => -g * Math.exp(-w / r), y = (w) => b + L(w), V = (w) => {
1256
1256
  const P = L(w), R = y(w);
1257
1257
  m.done = Math.abs(P) <= u, m.value = m.done ? b : R;
1258
1258
  };
1259
- let x, V;
1259
+ let x, I;
1260
1260
  const S = (w) => {
1261
- f(m.value) && (x = w, V = ot({
1261
+ f(m.value) && (x = w, I = ot({
1262
1262
  keyframes: [m.value, h(m.value)],
1263
1263
  velocity: Pi(y, w, m.value),
1264
1264
  // TODO: This should be passing * 1000
@@ -1272,7 +1272,7 @@ function jt({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: r = 3
1272
1272
  calculatedDuration: null,
1273
1273
  next: (w) => {
1274
1274
  let P = !1;
1275
- return !V && x === void 0 && (P = !0, I(w), S(w)), x !== void 0 && w >= x ? V.next(w - x) : (!P && I(w), m);
1275
+ return !I && x === void 0 && (P = !0, V(w), S(w)), x !== void 0 && w >= x ? I.next(w - x) : (!P && V(w), m);
1276
1276
  }
1277
1277
  };
1278
1278
  }
@@ -1441,17 +1441,17 @@ class pn extends un {
1441
1441
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
1442
1442
  const b = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), L = this.playbackSpeed >= 0 ? b < 0 : b > i;
1443
1443
  this.currentTime = Math.max(b, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
1444
- let y = this.currentTime, I = r;
1444
+ let y = this.currentTime, V = r;
1445
1445
  if (p) {
1446
1446
  const w = Math.min(this.currentTime, i) / o;
1447
1447
  let P = Math.floor(w), R = w % 1;
1448
- !R && w >= 1 && (R = 1), R === 1 && P--, P = Math.min(P, p + 1), !!(P % 2) && (m === "reverse" ? (R = 1 - R, f && (R -= f / o)) : m === "mirror" && (I = a)), y = Le(0, 1, R) * o;
1448
+ !R && w >= 1 && (R = 1), R === 1 && P--, P = Math.min(P, p + 1), !!(P % 2) && (m === "reverse" ? (R = 1 - R, f && (R -= f / o)) : m === "mirror" && (V = a)), y = Le(0, 1, R) * o;
1449
1449
  }
1450
- const x = L ? { done: !1, value: d[0] } : I.next(y);
1450
+ const x = L ? { done: !1, value: d[0] } : V.next(y);
1451
1451
  s && (x.value = s(x.value));
1452
- let { done: V } = x;
1453
- !L && c !== null && (V = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
1454
- const S = this.holdTime === null && (this.state === "finished" || this.state === "running" && V);
1452
+ let { done: I } = x;
1453
+ !L && c !== null && (I = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
1454
+ const S = this.holdTime === null && (this.state === "finished" || this.state === "running" && I);
1455
1455
  return S && h !== jt && (x.value = dn(d, this.options, v, this.speed)), g && g(x.value), S && this.finish(), x;
1456
1456
  }
1457
1457
  /**
@@ -1833,13 +1833,13 @@ const Zi = {
1833
1833
  function Ao(t) {
1834
1834
  return t in Zi;
1835
1835
  }
1836
- function Io(t) {
1836
+ function Vo(t) {
1837
1837
  typeof t.ease == "string" && Ao(t.ease) && (t.ease = Zi[t.ease]);
1838
1838
  }
1839
1839
  const zr = 10;
1840
- class Vo extends To {
1840
+ class Io extends To {
1841
1841
  constructor(e) {
1842
- Io(e), zi(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
1842
+ Vo(e), zi(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
1843
1843
  }
1844
1844
  /**
1845
1845
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1941,7 +1941,7 @@ class Oo extends un {
1941
1941
  finalKeyframe: n
1942
1942
  }, r), {
1943
1943
  keyframes: e
1944
- }), f = !u && No(m) ? new Vo(M(T({}, m), {
1944
+ }), f = !u && No(m) ? new Io(M(T({}, m), {
1945
1945
  element: m.motionValue.owner.current
1946
1946
  })) : new pn(m);
1947
1947
  f.finished.then(() => this.notifyFinished()).catch(Pe), this.pendingTimeline && (this.stopTimeline = f.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = f;
@@ -2058,8 +2058,8 @@ function qo(t, e, { delay: n = 0, transitionOverride: r, type: i } = {}) {
2058
2058
  if (window.MotionHandoffAnimation) {
2059
2059
  const y = la(t);
2060
2060
  if (y) {
2061
- const I = window.MotionHandoffAnimation(y, m, ue);
2062
- I !== null && (g.startTime = I, b = !0);
2061
+ const V = window.MotionHandoffAnimation(y, m, ue);
2062
+ V !== null && (g.startTime = V, b = !0);
2063
2063
  }
2064
2064
  }
2065
2065
  sa(t, m), f.start(Wi(m, f, h, t.shouldReduceMotion && Ji.has(m) ? { type: !1 } : g, t, b));
@@ -2793,7 +2793,7 @@ function Al(t, e, n) {
2793
2793
  }
2794
2794
  return r;
2795
2795
  }
2796
- class Il extends ls {
2796
+ class Vl extends ls {
2797
2797
  constructor() {
2798
2798
  super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = fn;
2799
2799
  }
@@ -2823,7 +2823,7 @@ class Il extends ls {
2823
2823
  function ms(t) {
2824
2824
  return Yi(t) && "ownerSVGElement" in t;
2825
2825
  }
2826
- function Vl(t) {
2826
+ function Il(t) {
2827
2827
  return ms(t) && t.tagName === "svg";
2828
2828
  }
2829
2829
  function Sl(t) {
@@ -2840,7 +2840,7 @@ function Sl(t) {
2840
2840
  },
2841
2841
  latestValues: {}
2842
2842
  }
2843
- }, n = ms(t) && !Vl(t) ? new Il(e) : new vl(e);
2843
+ }, n = ms(t) && !Il(t) ? new Vl(e) : new vl(e);
2844
2844
  n.mount(t), rt.set(t, n);
2845
2845
  }
2846
2846
  function Ml(t) {
@@ -3019,7 +3019,7 @@ const Wl = "_checkout_5sq3n_1", Jl = "_hidden_5sq3n_7", Xl = "_formInitial_5sq3n
3019
3019
  hidden: Jl,
3020
3020
  formInitial: Xl,
3021
3021
  btnsInitial: Ql
3022
- }, ec = "_buttons_1i8cu_1", tc = "_hidden_1i8cu_5", Vt = {
3022
+ }, ec = "_buttons_1i8cu_1", tc = "_hidden_1i8cu_5", It = {
3023
3023
  buttons: ec,
3024
3024
  hidden: tc
3025
3025
  }, nc = "_applePay_1m9xd_1", rc = "_hidden_1m9xd_22", St = {
@@ -3051,7 +3051,7 @@ const sc = [
3051
3051
  { type: "apple-pay", is_active: !0, order: 2 },
3052
3052
  { type: "google-pay", is_active: !0, order: 3 },
3053
3053
  { type: "card", is_active: !0, order: 4 }
3054
- ], Ie = {
3054
+ ], Ve = {
3055
3055
  open: { y: 0, opacity: 1 },
3056
3056
  close: { y: 100, opacity: 0 },
3057
3057
  transition: { duration: 0.5, type: "spring", bounce: 0 }
@@ -3725,9 +3725,9 @@ class Ac {
3725
3725
  return this.element;
3726
3726
  }
3727
3727
  }
3728
- const Ic = "_button_1br9w_1", Vc = "_press_1br9w_21", yt = {
3729
- button: Ic,
3730
- press: Vc
3728
+ const Vc = "_button_1br9w_1", Ic = "_press_1br9w_21", yt = {
3729
+ button: Vc,
3730
+ press: Ic
3731
3731
  };
3732
3732
  class Sc {
3733
3733
  constructor(e) {
@@ -3770,7 +3770,7 @@ const Mc = (t, e, n) => e.concat(t.filter((r) => e.every((i) => !n(r, i)))), yn
3770
3770
  is_active: !0
3771
3771
  }
3772
3772
  ], Pc = (t) => C(void 0, null, function* () {
3773
- var s, a, o, c, u, d, p, m, f, h, g, v, b, L, y, I, x, V, S, w, P, R, N, ae, G, oe, J, Te, Ae, Ce, Z, K, pe, he, me, fe, ge, ye, ve, X, re, ie, Q, ee, je, qe, Ke, Be, Fe, ze, $e, Ge, Ue, He, Ze, bn, Cn, xn, wn, kn, En, Ln, Tn, An, In, Vn, Sn, Mn, _n, Pn, Dn, Nn, Rn, On, jn, qn, Kn, Bn, Fn, zn, $n, Gn, Un, Hn, Zn, Yn, Wn, Jn, Xn, Qn, er, tr, nr, rr, ir, sr, ar, or, lr, cr, dr, ur, pr, hr, mr, fr, gr, yr, vr, br, Cr, xr;
3773
+ var s, a, o, c, u, d, p, m, f, h, g, v, b, L, y, V, x, I, S, w, P, R, N, ae, G, oe, J, Te, Ae, Ce, Z, K, pe, he, me, fe, ge, ye, ve, X, re, ie, Q, ee, je, qe, Ke, Be, Fe, ze, $e, Ge, Ue, He, Ze, bn, Cn, xn, wn, kn, En, Ln, Tn, An, Vn, In, Sn, Mn, _n, Pn, Dn, Nn, Rn, On, jn, qn, Kn, Bn, Fn, zn, $n, Gn, Un, Hn, Zn, Yn, Wn, Jn, Xn, Qn, er, tr, nr, rr, ir, sr, ar, or, lr, cr, dr, ur, pr, hr, mr, fr, gr, yr, vr, br, Cr, xr;
3774
3774
  const e = `${yn.apiBase}/payments/create`, n = new Headers();
3775
3775
  return n.append("Content-Type", "application/json"), console.log("----- payment data: ", t), yield (yield fetch(e, {
3776
3776
  method: "POST",
@@ -3783,7 +3783,7 @@ const Mc = (t, e, n) => e.concat(t.filter((r) => e.every((i) => !n(r, i)))), yn
3783
3783
  phone: (h = (f = t.applePay) == null ? void 0 : f.shippingContact) == null ? void 0 : h.phoneNumber,
3784
3784
  billing_address: t.applePay || t.googlePay ? {
3785
3785
  city: ((v = (g = t.applePay) == null ? void 0 : g.billingContact) == null ? void 0 : v.locality) || ((L = (b = t == null ? void 0 : t.googlePay) == null ? void 0 : b.billingAddress) == null ? void 0 : L.locality),
3786
- country: ((I = (y = t.applePay) == null ? void 0 : y.billingContact) == null ? void 0 : I.countryCode) || ((V = (x = t == null ? void 0 : t.googlePay) == null ? void 0 : x.billingAddress) == null ? void 0 : V.countryCode),
3786
+ country: ((V = (y = t.applePay) == null ? void 0 : y.billingContact) == null ? void 0 : V.countryCode) || ((I = (x = t == null ? void 0 : t.googlePay) == null ? void 0 : x.billingAddress) == null ? void 0 : I.countryCode),
3787
3787
  line1: ((P = (w = (S = t.applePay) == null ? void 0 : S.billingContact) == null ? void 0 : w.addressLines) == null ? void 0 : P.at(0)) || ((N = (R = t == null ? void 0 : t.googlePay) == null ? void 0 : R.billingAddress) == null ? void 0 : N.address1),
3788
3788
  line2: ((oe = (G = (ae = t.applePay) == null ? void 0 : ae.billingContact) == null ? void 0 : G.addressLines) == null ? void 0 : oe.at(1)) || ((Te = (J = t == null ? void 0 : t.googlePay) == null ? void 0 : J.billingAddress) == null ? void 0 : Te.address2),
3789
3789
  postal_code: ((Ce = (Ae = t.applePay) == null ? void 0 : Ae.billingContact) == null ? void 0 : Ce.postalCode) || ((K = (Z = t == null ? void 0 : t.googlePay) == null ? void 0 : Z.billingAddress) == null ? void 0 : K.postalCode),
@@ -3797,7 +3797,7 @@ const Mc = (t, e, n) => e.concat(t.filter((r) => e.every((i) => !n(r, i)))), yn
3797
3797
  currency_code: ((ze = t.card) == null ? void 0 : ze.currency) || ((Ge = ($e = t.googlePay) == null ? void 0 : $e.card) == null ? void 0 : Ge.currency) || ((He = (Ue = t.applePay) == null ? void 0 : Ue.card) == null ? void 0 : He.currency),
3798
3798
  funding: ((Ze = t.card) == null ? void 0 : Ze.funding) || ((Cn = (bn = t.googlePay) == null ? void 0 : bn.card) == null ? void 0 : Cn.funding) || ((wn = (xn = t.applePay) == null ? void 0 : xn.card) == null ? void 0 : wn.funding),
3799
3799
  issuer: ((kn = t.card) == null ? void 0 : kn.issuer) || ((Ln = (En = t.googlePay) == null ? void 0 : En.card) == null ? void 0 : Ln.issuer) || ((An = (Tn = t.applePay) == null ? void 0 : Tn.card) == null ? void 0 : An.issuer),
3800
- type: ((In = t.card) == null ? void 0 : In.type) || ((Sn = (Vn = t.googlePay) == null ? void 0 : Vn.card) == null ? void 0 : Sn.segment) || ((_n = (Mn = t.applePay) == null ? void 0 : Mn.card) == null ? void 0 : _n.segment)
3800
+ type: ((Vn = t.card) == null ? void 0 : Vn.type) || ((Sn = (In = t.googlePay) == null ? void 0 : In.card) == null ? void 0 : Sn.segment) || ((_n = (Mn = t.applePay) == null ? void 0 : Mn.card) == null ? void 0 : _n.segment)
3801
3801
  },
3802
3802
  cvc: (Pn = t.card) == null ? void 0 : Pn.cvc,
3803
3803
  exp_month: (Dn = t.card) != null && Dn.expMonth || (Rn = (Nn = t.googlePay) == null ? void 0 : Nn.card) != null && Rn.expiry.month ? Number(((On = t.card) == null ? void 0 : On.expMonth) || ((qn = (jn = t.googlePay) == null ? void 0 : jn.card) == null ? void 0 : qn.expiry.month)) : void 0,
@@ -3853,7 +3853,7 @@ class Rc {
3853
3853
  cancel: new $(),
3854
3854
  success: new $()
3855
3855
  });
3856
- this.config = e, this.applePay = new ic(e.service.ev), this.paypal = new Ec(e.service.paypal), this.googlePay = new xc(e.service.ev), this.card = new Sc(e.state.translate), this.buttons = document.createElement("div"), this.buttons.classList.add(Vt.buttons, Vt.hidden);
3856
+ this.config = e, this.applePay = new ic(e.service.ev), this.paypal = new Ec(e.service.paypal), this.googlePay = new xc(e.service.ev), this.card = new Sc(e.state.translate), this.buttons = document.createElement("div"), this.buttons.classList.add(It.buttons, It.hidden);
3857
3857
  }
3858
3858
  init() {
3859
3859
  return C(this, null, function* () {
@@ -3963,7 +3963,7 @@ class Rc {
3963
3963
  return this.events[e].addListener(n);
3964
3964
  }
3965
3965
  showButton() {
3966
- this.buttons.classList.remove(Vt.hidden);
3966
+ this.buttons.classList.remove(It.hidden);
3967
3967
  }
3968
3968
  render() {
3969
3969
  return this.buttons;
@@ -4586,12 +4586,12 @@ class Ed {
4586
4586
  return this.toggleLabelError(n), this.toggleErrorMessage(r), !n && !r ? (this.inputContainer.classList.remove(_.errorInput), this.endContent.innerHTML = "", this.endContent.append(...this.getCardIcons())) : (this.endContent.innerHTML = "", this.endContent.appendChild(this.unknownCard.render())), this.isDisabled ? (this.inputContainer.classList.add(_.disabled), this.input.classList.add(_.disabledInput)) : (this.inputContainer.classList.remove(_.disabled), this.input.classList.remove(_.disabledInput)), this.element;
4587
4587
  }
4588
4588
  }
4589
- const Ld = "_inputContainer_1xdj3_5", Td = "_input_1xdj3_5", Ad = "_endContent_1xdj3_20", Id = "_errorInput_1xdj3_24", Vd = "_error_1xdj3_24", Sd = "_label_1xdj3_32", Md = "_labelError_1xdj3_36", _d = "_disabled_1xdj3_40", Pd = "_disabledInput_1xdj3_44", Dd = "_hidden_1xdj3_51", Nd = "_securityContent_1xdj3_55", k = {
4589
+ const Ld = "_inputContainer_1xdj3_5", Td = "_input_1xdj3_5", Ad = "_endContent_1xdj3_20", Vd = "_errorInput_1xdj3_24", Id = "_error_1xdj3_24", Sd = "_label_1xdj3_32", Md = "_labelError_1xdj3_36", _d = "_disabled_1xdj3_40", Pd = "_disabledInput_1xdj3_44", Dd = "_hidden_1xdj3_51", Nd = "_securityContent_1xdj3_55", k = {
4590
4590
  inputContainer: Ld,
4591
4591
  input: Td,
4592
4592
  endContent: Ad,
4593
- errorInput: Id,
4594
- error: Vd,
4593
+ errorInput: Vd,
4594
+ error: Id,
4595
4595
  label: Sd,
4596
4596
  labelError: Md,
4597
4597
  disabled: _d,
@@ -4957,7 +4957,7 @@ class Gd {
4957
4957
  console.time("PayNext TS"), this.buttons.addEventListener("ready", () => {
4958
4958
  this.loader.setClassName(B.hidden), this.buttons.showButton(), console.timeEnd("PayNext TS");
4959
4959
  }), this.buttons.addEventListener("open", () => C(this, null, function* () {
4960
- this.isLoading || (this.hideError(), yield j(this.buttons.buttons, gt.close, gt.transition), this.buttons.buttons.classList.add(B.hidden), this.form.element.classList.add(B.formInitial), this.form.element.classList.remove(B.hidden), yield j(this.form.element, Ie.open, Ie.transition), this.isFormOpen = !0);
4960
+ this.isLoading || (this.hideError(), yield j(this.buttons.buttons, gt.close, gt.transition), this.buttons.buttons.classList.add(B.hidden), this.form.element.classList.add(B.formInitial), this.form.element.classList.remove(B.hidden), yield j(this.form.element, Ve.open, Ve.transition), this.isFormOpen = !0);
4961
4961
  })), this.buttons.addEventListener("error", () => {
4962
4962
  const { onCheckoutFail: e } = this.config.state.checkout.getState(), n = this.config.state.translate.messages();
4963
4963
  e == null || e(new Error(n.status.error));
@@ -4972,7 +4972,7 @@ class Gd {
4972
4972
  return this.handleSuccess({ clientSession: n, paypal: { billing_agreement_token: e } });
4973
4973
  }
4974
4974
  }), this.form.addEventListener("close", () => C(this, null, function* () {
4975
- this.isLoading || (this.hideError(), yield j(this.form.element, Ie.close, Ie.transition), this.form.element.classList.add(B.hidden), this.buttons.buttons.classList.add(B.btnsInitial), this.buttons.buttons.classList.remove(B.hidden), yield j(this.buttons.buttons, gt.open, gt.transition), this.isFormOpen = !1);
4975
+ this.isLoading || (this.hideError(), yield j(this.form.element, Ve.close, Ve.transition), this.form.element.classList.add(B.hidden), this.buttons.buttons.classList.add(B.btnsInitial), this.buttons.buttons.classList.remove(B.hidden), yield j(this.buttons.buttons, gt.open, gt.transition), this.isFormOpen = !1);
4976
4976
  })), this.form.addEventListener("submit", (e) => C(this, null, function* () {
4977
4977
  if (this.isLoading || (this.form.touchSubmit(), !this.form.validate())) return;
4978
4978
  const r = e.number.replace(/\D/g, ""), i = this.config.state.checkout.getState(), s = this.config.service.ev.getEv(), [a, o] = yield Promise.all([s.encrypt(r), s.encrypt(e.cvc)]), [c, u] = e.expiry.split("/");
@@ -5033,7 +5033,7 @@ class Gd {
5033
5033
  }
5034
5034
  });
5035
5035
  }
5036
- // Create payment result object from checkout data and response
5036
+ // Create payment result
5037
5037
  createPaymentResult(e, n, r) {
5038
5038
  var c, u, d, p, m, f, h, g, v, b, L;
5039
5039
  const i = this.config.state.translate.locale(), s = (/* @__PURE__ */ new Date()).toISOString();
@@ -5042,7 +5042,7 @@ class Gd {
5042
5042
  const o = {
5043
5043
  paymentMethod: a,
5044
5044
  clientSession: e.clientSession,
5045
- transactionId: n.data,
5045
+ status: n.data,
5046
5046
  metadata: {
5047
5047
  timestamp: s,
5048
5048
  userAgent: navigator == null ? void 0 : navigator.userAgent,
@@ -5110,7 +5110,7 @@ class Gd {
5110
5110
  // show success
5111
5111
  showSuccess() {
5112
5112
  return C(this, null, function* () {
5113
- this.container.classList.add(B.hidden), this.error.addClassName(B.hidden), this.success.removeClassName(B.hidden), yield j(this.success.element, Ie.open, Ie.transition);
5113
+ this.container.classList.add(B.hidden), this.error.addClassName(B.hidden), this.success.removeClassName(B.hidden), yield j(this.success.element, Ve.open, Ve.transition);
5114
5114
  });
5115
5115
  }
5116
5116
  // hide error
@@ -6706,7 +6706,7 @@ const Xd = {
6706
6706
  success: "Uspeh",
6707
6707
  error: "Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."
6708
6708
  }
6709
- }, Iu = {
6709
+ }, Vu = {
6710
6710
  card: {
6711
6711
  title: "Betalningsmetod",
6712
6712
  number: {
@@ -6756,7 +6756,7 @@ const Xd = {
6756
6756
  success: "Framgång",
6757
6757
  error: "Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."
6758
6758
  }
6759
- }, Vu = {
6759
+ }, Iu = {
6760
6760
  card: {
6761
6761
  title: "วิธีการชำระเงิน",
6762
6762
  number: {
@@ -6987,8 +6987,8 @@ const Xd = {
6987
6987
  ro: Eu,
6988
6988
  sk: Tu,
6989
6989
  sl: Au,
6990
- sv: Iu,
6991
- th: Vu,
6990
+ sv: Vu,
6991
+ th: Iu,
6992
6992
  tr: Su,
6993
6993
  vi: Mu,
6994
6994
  zh: _u
@@ -6996,7 +6996,7 @@ const Xd = {
6996
6996
  const t = navigator == null ? void 0 : navigator.language.split("-")[0];
6997
6997
  return Yt[t] || Yt.en;
6998
6998
  }, li = (t, e = {}) => {
6999
- var r, i, s, a, o, c, u, d, p, m, f, h, g, v, b, L, y, I, x, V, S, w, P, R, N, ae, G, oe, J, Te, Ae, Ce, Z, K, pe, he, me, fe, ge, ye, ve, X, re, ie, Q, ee, je, qe, Ke, Be, Fe, ze, $e, Ge, Ue, He, Ze;
6999
+ var r, i, s, a, o, c, u, d, p, m, f, h, g, v, b, L, y, V, x, I, S, w, P, R, N, ae, G, oe, J, Te, Ae, Ce, Z, K, pe, he, me, fe, ge, ye, ve, X, re, ie, Q, ee, je, qe, Ke, Be, Fe, ze, $e, Ge, Ue, He, Ze;
7000
7000
  if (!t) return Wt();
7001
7001
  const n = Yt[t] || Wt();
7002
7002
  return {
@@ -7013,9 +7013,9 @@ const Xd = {
7013
7013
  },
7014
7014
  expiry: {
7015
7015
  label: ((y = (L = e == null ? void 0 : e.card) == null ? void 0 : L.expiry) == null ? void 0 : y.label) || n.card.expiry.label,
7016
- placeholder: ((x = (I = e == null ? void 0 : e.card) == null ? void 0 : I.expiry) == null ? void 0 : x.placeholder) || n.card.expiry.placeholder,
7016
+ placeholder: ((x = (V = e == null ? void 0 : e.card) == null ? void 0 : V.expiry) == null ? void 0 : x.placeholder) || n.card.expiry.placeholder,
7017
7017
  error: {
7018
- required: ((w = (S = (V = e == null ? void 0 : e.card) == null ? void 0 : V.expiry) == null ? void 0 : S.error) == null ? void 0 : w.required) || n.card.expiry.error.required,
7018
+ required: ((w = (S = (I = e == null ? void 0 : e.card) == null ? void 0 : I.expiry) == null ? void 0 : S.error) == null ? void 0 : w.required) || n.card.expiry.error.required,
7019
7019
  invalid: ((N = (R = (P = e == null ? void 0 : e.card) == null ? void 0 : P.expiry) == null ? void 0 : R.error) == null ? void 0 : N.invalid) || n.card.expiry.error.invalid,
7020
7020
  incomplete: ((oe = (G = (ae = e == null ? void 0 : e.card) == null ? void 0 : ae.expiry) == null ? void 0 : G.error) == null ? void 0 : oe.incomplete) || n.card.expiry.error.incomplete,
7021
7021
  expired: ((Ae = (Te = (J = e == null ? void 0 : e.card) == null ? void 0 : J.expiry) == null ? void 0 : Te.error) == null ? void 0 : Ae.expired) || n.card.expiry.error.expired