@paynext/sdk 0.0.47 → 0.0.49
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 +7 -6
- package/dist/index.d.ts +6 -2
- package/dist/index.es.js +930 -924
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +22 -22
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Ra = Object.defineProperty, Sa = Object.defineProperties;
|
|
2
|
+
var ka = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var ht = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var It = (n, e, t) => e in n ?
|
|
4
|
+
var Nr = Object.prototype.hasOwnProperty, xr = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var It = (n, e, t) => e in n ? Ra(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Q = (n, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
Nr.call(e, t) && It(n, t, e[t]);
|
|
8
8
|
if (ht)
|
|
9
9
|
for (var t of ht(e))
|
|
10
|
-
|
|
10
|
+
xr.call(e, t) && It(n, t, e[t]);
|
|
11
11
|
return n;
|
|
12
|
-
}, te = (n, e) =>
|
|
12
|
+
}, te = (n, e) => Sa(n, ka(e));
|
|
13
13
|
var ge = (n, e) => {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var r in n)
|
|
16
|
-
|
|
16
|
+
Nr.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
17
17
|
if (n != null && ht)
|
|
18
18
|
for (var r of ht(n))
|
|
19
|
-
e.indexOf(r) < 0 &&
|
|
19
|
+
e.indexOf(r) < 0 && xr.call(n, r) && (t[r] = n[r]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
var b = (n, e, t) => It(n, typeof e != "symbol" ? e + "" : e, t);
|
|
@@ -37,7 +37,7 @@ var j = (n, e, t) => new Promise((r, i) => {
|
|
|
37
37
|
o((t = t.apply(n, e)).next());
|
|
38
38
|
});
|
|
39
39
|
let mt = null;
|
|
40
|
-
function
|
|
40
|
+
function Ma() {
|
|
41
41
|
return j(this, null, function* () {
|
|
42
42
|
return mt || (mt = new Promise((n, e) => {
|
|
43
43
|
const t = document.createElement("script");
|
|
@@ -51,27 +51,27 @@ function ka() {
|
|
|
51
51
|
}), mt);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function yi() {
|
|
55
55
|
return j(this, null, function* () {
|
|
56
56
|
if (window.Evervault)
|
|
57
57
|
return window.Evervault;
|
|
58
58
|
try {
|
|
59
|
-
return yield
|
|
59
|
+
return yield Ma(), window.Evervault;
|
|
60
60
|
} catch (n) {
|
|
61
61
|
throw new Error("Failed to load Evervault.js");
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Da(n, e, t) {
|
|
66
66
|
return j(this, null, function* () {
|
|
67
|
-
const r = yield
|
|
67
|
+
const r = yield yi();
|
|
68
68
|
return new r(n, e, t);
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
Promise.resolve().then(() => {
|
|
72
|
-
|
|
72
|
+
yi();
|
|
73
73
|
});
|
|
74
|
-
let
|
|
74
|
+
let Va = class {
|
|
75
75
|
constructor(e) {
|
|
76
76
|
b(this, "apple", null);
|
|
77
77
|
b(this, "isAvailable", !1);
|
|
@@ -111,7 +111,7 @@ let Da = class {
|
|
|
111
111
|
!this.apple || !this.isAvailable || (e.innerHTML = "", yield this.apple.mount(e), (t = this.onReady) == null || t.call(this));
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
},
|
|
114
|
+
}, Fa = class {
|
|
115
115
|
constructor(e) {
|
|
116
116
|
b(this, "google", null);
|
|
117
117
|
this.ev = e;
|
|
@@ -165,7 +165,7 @@ class ce {
|
|
|
165
165
|
this.listeners = [];
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
class
|
|
168
|
+
class Ua {
|
|
169
169
|
constructor(e) {
|
|
170
170
|
b(this, "threeDs", null);
|
|
171
171
|
this.ev = e;
|
|
@@ -181,7 +181,7 @@ class Fa {
|
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
class
|
|
184
|
+
class Ba {
|
|
185
185
|
constructor() {
|
|
186
186
|
b(this, "isReady", !1);
|
|
187
187
|
b(this, "ev", null);
|
|
@@ -200,14 +200,14 @@ class Ua {
|
|
|
200
200
|
// init ev
|
|
201
201
|
initEv(e) {
|
|
202
202
|
return j(this, null, function* () {
|
|
203
|
-
this.isShouldLoad(e) && (this.isReady = !1, this.ev = yield
|
|
203
|
+
this.isShouldLoad(e) && (this.isReady = !1, this.ev = yield Da(e.teamId, e.appId), this.apple = new Va(this.ev), this.google = new Fa(this.ev), this.events.ready.emit(), this.isReady = !0);
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
// init three ds
|
|
207
207
|
initThreeDs(e) {
|
|
208
208
|
return j(this, null, function* () {
|
|
209
209
|
if (!this.ev) throw new Error("Evervault should be init before using Three DS Secure");
|
|
210
|
-
this.threeDs = new
|
|
210
|
+
this.threeDs = new Ua(this.ev), yield this.threeDs.init(e), yield this.threeDs.render();
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
213
|
// init apple
|
|
@@ -257,7 +257,7 @@ class Ua {
|
|
|
257
257
|
function tn(n) {
|
|
258
258
|
return typeof n == "object" && !Array.isArray(n);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function za(n, e, t) {
|
|
261
261
|
var r;
|
|
262
262
|
if (n instanceof EventTarget)
|
|
263
263
|
return [n];
|
|
@@ -268,66 +268,66 @@ function Ba(n, e, t) {
|
|
|
268
268
|
}
|
|
269
269
|
return Array.from(n);
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
return typeof n == "string" && tn(e) ?
|
|
271
|
+
function bi(n, e, t, r) {
|
|
272
|
+
return typeof n == "string" && tn(e) ? za(n, t, r) : n instanceof NodeList ? Array.from(n) : Array.isArray(n) ? n : [n];
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function ja(n, e, t) {
|
|
275
275
|
return n * (e + 1);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Lr(n, e, t, r) {
|
|
278
278
|
var i;
|
|
279
279
|
return typeof e == "number" ? e : e.startsWith("-") || e.startsWith("+") ? Math.max(0, n + parseFloat(e)) : e === "<" ? t : (i = r.get(e)) != null ? i : n;
|
|
280
280
|
}
|
|
281
|
-
const ct = (n, e, t) => n + (e - n) * t,
|
|
281
|
+
const ct = (n, e, t) => n + (e - n) * t, Ka = (n, e, t) => {
|
|
282
282
|
const r = e - n;
|
|
283
283
|
return ((t - n) % r + r) % r + n;
|
|
284
|
-
},
|
|
285
|
-
function
|
|
286
|
-
return
|
|
284
|
+
}, Ei = (n) => Array.isArray(n) && typeof n[0] != "number";
|
|
285
|
+
function _i(n, e) {
|
|
286
|
+
return Ei(n) ? n[Ka(0, n.length, e)] : n;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function qa(n, e) {
|
|
289
289
|
n.indexOf(e) === -1 && n.push(e);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Ci(n, e) {
|
|
292
292
|
const t = n.indexOf(e);
|
|
293
293
|
t > -1 && n.splice(t, 1);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Ha(n, e, t) {
|
|
296
296
|
for (let r = 0; r < n.length; r++) {
|
|
297
297
|
const i = n[r];
|
|
298
|
-
i.at > e && i.at < t && (
|
|
298
|
+
i.at > e && i.at < t && (Ci(n, i), r--);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
|
|
301
|
+
function Wa(n, e, t, r, i, a) {
|
|
302
|
+
Ha(n, i, a);
|
|
303
303
|
for (let s = 0; s < e.length; s++)
|
|
304
304
|
n.push({
|
|
305
305
|
value: e[s],
|
|
306
306
|
at: ct(i, a, r[s]),
|
|
307
|
-
easing:
|
|
307
|
+
easing: _i(t, s)
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Ga(n, e) {
|
|
311
311
|
for (let t = 0; t < n.length; t++)
|
|
312
312
|
n[t] = n[t] / (e + 1);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Ya(n, e) {
|
|
315
315
|
return n.at === e.at ? n.value === null ? 1 : e.value === null ? -1 : 0 : n.at - e.at;
|
|
316
316
|
}
|
|
317
317
|
const he = (n) => !!(n && n.getVelocity), nn = /* @__NO_SIDE_EFFECTS__ */ (n, e, t) => {
|
|
318
318
|
const r = e - n;
|
|
319
319
|
return r === 0 ? 1 : (t - n) / r;
|
|
320
320
|
};
|
|
321
|
-
function
|
|
321
|
+
function Ai(n, e) {
|
|
322
322
|
const t = n[n.length - 1];
|
|
323
323
|
for (let r = 1; r <= e; r++) {
|
|
324
324
|
const i = /* @__PURE__ */ nn(0, e, r);
|
|
325
325
|
n.push(ct(t, 1, i));
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function wi(n) {
|
|
329
329
|
const e = [0];
|
|
330
|
-
return
|
|
330
|
+
return Ai(e, n.length - 1), e;
|
|
331
331
|
}
|
|
332
332
|
function rn(n) {
|
|
333
333
|
return typeof n == "function" && "applyToOptions" in n;
|
|
@@ -342,8 +342,8 @@ function an(n) {
|
|
|
342
342
|
return e >= _t ? 1 / 0 : e;
|
|
343
343
|
}
|
|
344
344
|
const ye = /* @__NO_SIDE_EFFECTS__ */ (n) => n * 1e3, Ee = /* @__NO_SIDE_EFFECTS__ */ (n) => n / 1e3;
|
|
345
|
-
function
|
|
346
|
-
const r = t(te(
|
|
345
|
+
function Ti(n, e = 100, t) {
|
|
346
|
+
const r = t(te(Q({}, n), { keyframes: [0, e] })), i = Math.min(an(r), _t);
|
|
347
347
|
return {
|
|
348
348
|
type: "keyframes",
|
|
349
349
|
ease: (a) => r.next(i * a).value / e,
|
|
@@ -359,8 +359,8 @@ process.env.NODE_ENV !== "production" && (ut = (n, e) => {
|
|
|
359
359
|
if (!n)
|
|
360
360
|
throw new Error(e);
|
|
361
361
|
});
|
|
362
|
-
const
|
|
363
|
-
function
|
|
362
|
+
const Qa = "easeInOut", $a = 20;
|
|
363
|
+
function Za(n, a = {}, r, i) {
|
|
364
364
|
var s = a, { defaultTransition: e = {} } = s, t = ge(s, ["defaultTransition"]);
|
|
365
365
|
const o = e.duration || 0.3, l = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), u = {}, d = /* @__PURE__ */ new Map();
|
|
366
366
|
let h = 0, p = 0, m = 0;
|
|
@@ -370,56 +370,56 @@ function $a(n, a = {}, r, i) {
|
|
|
370
370
|
d.set(v, p);
|
|
371
371
|
continue;
|
|
372
372
|
} else if (!Array.isArray(v)) {
|
|
373
|
-
d.set(v.name,
|
|
373
|
+
d.set(v.name, Lr(p, v.at, h, d));
|
|
374
374
|
continue;
|
|
375
375
|
}
|
|
376
376
|
let [y, w, T = {}] = v;
|
|
377
|
-
T.at !== void 0 && (p =
|
|
377
|
+
T.at !== void 0 && (p = Lr(p, T.at, h, d));
|
|
378
378
|
let x = 0;
|
|
379
379
|
const A = (I, L, k, B = 0, G = 0) => {
|
|
380
|
-
const q =
|
|
380
|
+
const q = Xa(I), V = L, { delay: M = 0, times: F = wi(q), type: K = "keyframes", repeat: J, repeatType: S, repeatDelay: W = 0 } = V, z = ge(V, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
|
|
381
381
|
let { ease: g = e.ease || "easeOut", duration: E } = L;
|
|
382
382
|
const R = typeof M == "function" ? M(B, G) : M, U = q.length, _ = rn(K) ? K : i == null ? void 0 : i[K];
|
|
383
383
|
if (U <= 2 && _) {
|
|
384
384
|
let N = 100;
|
|
385
|
-
if (U === 2 &&
|
|
385
|
+
if (U === 2 && ts(q)) {
|
|
386
386
|
const re = q[1] - q[0];
|
|
387
387
|
N = Math.abs(re);
|
|
388
388
|
}
|
|
389
|
-
const H =
|
|
389
|
+
const H = Q({}, z);
|
|
390
390
|
E !== void 0 && (H.duration = /* @__PURE__ */ ye(E));
|
|
391
|
-
const X =
|
|
391
|
+
const X = Ti(H, N, _);
|
|
392
392
|
g = X.ease, E = X.duration;
|
|
393
393
|
}
|
|
394
394
|
E != null || (E = o);
|
|
395
395
|
const O = p + R;
|
|
396
396
|
F.length === 1 && F[0] === 0 && (F[1] = 1);
|
|
397
397
|
const C = F.length - q.length;
|
|
398
|
-
if (C > 0 &&
|
|
399
|
-
_e(J <
|
|
398
|
+
if (C > 0 && Ai(F, C), q.length === 1 && q.unshift(null), J) {
|
|
399
|
+
_e(J < $a, "Repeat count too high, must be less than 20"), E = ja(E, J);
|
|
400
400
|
const N = [...q], H = [...F];
|
|
401
401
|
g = Array.isArray(g) ? [...g] : [g];
|
|
402
402
|
const X = [...g];
|
|
403
403
|
for (let re = 0; re < J; re++) {
|
|
404
404
|
q.push(...N);
|
|
405
405
|
for (let D = 0; D < N.length; D++)
|
|
406
|
-
F.push(H[D] + (re + 1)), g.push(D === 0 ? "linear" :
|
|
406
|
+
F.push(H[D] + (re + 1)), g.push(D === 0 ? "linear" : _i(X, D - 1));
|
|
407
407
|
}
|
|
408
|
-
|
|
408
|
+
Ga(F, J);
|
|
409
409
|
}
|
|
410
410
|
const P = O + E;
|
|
411
|
-
|
|
411
|
+
Wa(k, q, g, F, O, P), x = Math.max(R + E, x), m = Math.max(P, m);
|
|
412
412
|
};
|
|
413
413
|
if (he(y)) {
|
|
414
|
-
const I =
|
|
415
|
-
A(w, T,
|
|
414
|
+
const I = Pr(y, c);
|
|
415
|
+
A(w, T, Rr("default", I));
|
|
416
416
|
} else {
|
|
417
|
-
const I =
|
|
417
|
+
const I = bi(y, w, r, u), L = I.length;
|
|
418
418
|
for (let k = 0; k < L; k++) {
|
|
419
419
|
w = w, T = T;
|
|
420
|
-
const B = I[k], G =
|
|
420
|
+
const B = I[k], G = Pr(B, c);
|
|
421
421
|
for (const q in w)
|
|
422
|
-
A(w[q],
|
|
422
|
+
A(w[q], Ja(T, q), Rr(q, G), k, L);
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
h = p, p += x;
|
|
@@ -427,18 +427,18 @@ function $a(n, a = {}, r, i) {
|
|
|
427
427
|
return c.forEach((f, v) => {
|
|
428
428
|
for (const y in f) {
|
|
429
429
|
const w = f[y];
|
|
430
|
-
w.sort(
|
|
430
|
+
w.sort(Ya);
|
|
431
431
|
const T = [], x = [], A = [];
|
|
432
432
|
for (let L = 0; L < w.length; L++) {
|
|
433
433
|
const { at: k, value: B, easing: G } = w[L];
|
|
434
434
|
T.push(B), x.push(/* @__PURE__ */ nn(0, m, k)), A.push(G || "easeOut");
|
|
435
435
|
}
|
|
436
|
-
x[0] !== 0 && (x.unshift(0), T.unshift(T[0]), A.unshift(
|
|
436
|
+
x[0] !== 0 && (x.unshift(0), T.unshift(T[0]), A.unshift(Qa)), x[x.length - 1] !== 1 && (x.push(1), T.push(null)), l.has(v) || l.set(v, {
|
|
437
437
|
keyframes: {},
|
|
438
438
|
transition: {}
|
|
439
439
|
});
|
|
440
440
|
const I = l.get(v);
|
|
441
|
-
I.keyframes[y] = T, I.transition[y] =
|
|
441
|
+
I.keyframes[y] = T, I.transition[y] = Q(te(Q({}, e), {
|
|
442
442
|
duration: m,
|
|
443
443
|
ease: A,
|
|
444
444
|
times: x
|
|
@@ -446,39 +446,39 @@ function $a(n, a = {}, r, i) {
|
|
|
446
446
|
}
|
|
447
447
|
}), l;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Pr(n, e) {
|
|
450
450
|
return !e.has(n) && e.set(n, {}), e.get(n);
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Rr(n, e) {
|
|
453
453
|
return e[n] || (e[n] = []), e[n];
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Xa(n) {
|
|
456
456
|
return Array.isArray(n) ? n : [n];
|
|
457
457
|
}
|
|
458
|
-
function
|
|
459
|
-
return n && n[e] ?
|
|
458
|
+
function Ja(n, e) {
|
|
459
|
+
return n && n[e] ? Q(Q({}, n), n[e]) : Q({}, n);
|
|
460
460
|
}
|
|
461
|
-
const
|
|
462
|
-
function
|
|
461
|
+
const es = (n) => typeof n == "number", ts = (n) => n.every(es), it = /* @__PURE__ */ new WeakMap(), ns = (n) => Array.isArray(n);
|
|
462
|
+
function Sr(n) {
|
|
463
463
|
const e = [{}, {}];
|
|
464
464
|
return n == null || n.values.forEach((t, r) => {
|
|
465
465
|
e[0][r] = t.get(), e[1][r] = t.getVelocity();
|
|
466
466
|
}), e;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Ii(n, e, t, r) {
|
|
469
469
|
if (typeof e == "function") {
|
|
470
|
-
const [i, a] =
|
|
470
|
+
const [i, a] = Sr(r);
|
|
471
471
|
e = e(t !== void 0 ? t : n.custom, i, a);
|
|
472
472
|
}
|
|
473
473
|
if (typeof e == "string" && (e = n.variants && n.variants[e]), typeof e == "function") {
|
|
474
|
-
const [i, a] =
|
|
474
|
+
const [i, a] = Sr(r);
|
|
475
475
|
e = e(t !== void 0 ? t : n.custom, i, a);
|
|
476
476
|
}
|
|
477
477
|
return e;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function rs(n, e, t) {
|
|
480
480
|
const r = n.getProps();
|
|
481
|
-
return
|
|
481
|
+
return Ii(r, e, r.custom, n);
|
|
482
482
|
}
|
|
483
483
|
const ft = [
|
|
484
484
|
"setup",
|
|
@@ -498,7 +498,7 @@ const ft = [
|
|
|
498
498
|
"postRender"
|
|
499
499
|
// Compute
|
|
500
500
|
];
|
|
501
|
-
function
|
|
501
|
+
function is(n, e) {
|
|
502
502
|
let t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, a = !1;
|
|
503
503
|
const s = /* @__PURE__ */ new WeakSet();
|
|
504
504
|
let o = {
|
|
@@ -536,16 +536,16 @@ function rs(n, e) {
|
|
|
536
536
|
};
|
|
537
537
|
return c;
|
|
538
538
|
}
|
|
539
|
-
const Ce = {},
|
|
540
|
-
function
|
|
539
|
+
const Ce = {}, as = 40;
|
|
540
|
+
function ss(n, e) {
|
|
541
541
|
let t = !1, r = !0;
|
|
542
542
|
const i = {
|
|
543
543
|
delta: 0,
|
|
544
544
|
timestamp: 0,
|
|
545
545
|
isProcessing: !1
|
|
546
|
-
}, a = () => t = !0, s = ft.reduce((T, x) => (T[x] =
|
|
546
|
+
}, a = () => t = !0, s = ft.reduce((T, x) => (T[x] = is(a), T), {}), { setup: o, read: l, resolveKeyframes: c, preUpdate: u, update: d, preRender: h, render: p, postRender: m } = s, f = () => {
|
|
547
547
|
const T = Ce.useManualTiming ? i.timestamp : performance.now();
|
|
548
|
-
t = !1, Ce.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp,
|
|
548
|
+
t = !1, Ce.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp, as), 1)), i.timestamp = T, i.isProcessing = !0, o.process(i), l.process(i), c.process(i), u.process(i), d.process(i), h.process(i), p.process(i), m.process(i), i.isProcessing = !1, t && e && (r = !1, n(f));
|
|
549
549
|
}, v = () => {
|
|
550
550
|
t = !0, r = !0, i.isProcessing || n(f);
|
|
551
551
|
};
|
|
@@ -557,26 +557,26 @@ function as(n, e) {
|
|
|
557
557
|
s[ft[x]].cancel(T);
|
|
558
558
|
}, state: i, steps: s };
|
|
559
559
|
}
|
|
560
|
-
const De = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: Ae, cancel: Ft, state: Ct } = /* @__PURE__ */
|
|
560
|
+
const De = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: Ae, cancel: Ft, state: Ct } = /* @__PURE__ */ ss(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : De, !0);
|
|
561
561
|
let Et;
|
|
562
|
-
function
|
|
562
|
+
function os() {
|
|
563
563
|
Et = void 0;
|
|
564
564
|
}
|
|
565
565
|
const ve = {
|
|
566
566
|
now: () => (Et === void 0 && ve.set(Ct.isProcessing || Ce.useManualTiming ? Ct.timestamp : performance.now()), Et),
|
|
567
567
|
set: (n) => {
|
|
568
|
-
Et = n, queueMicrotask(
|
|
568
|
+
Et = n, queueMicrotask(os);
|
|
569
569
|
}
|
|
570
|
-
},
|
|
571
|
-
function
|
|
572
|
-
n ||
|
|
570
|
+
}, kr = /* @__PURE__ */ new Set();
|
|
571
|
+
function Oi(n, e, t) {
|
|
572
|
+
n || kr.has(e) || (console.warn(e), kr.add(e));
|
|
573
573
|
}
|
|
574
|
-
class
|
|
574
|
+
class Ni {
|
|
575
575
|
constructor() {
|
|
576
576
|
this.subscriptions = [];
|
|
577
577
|
}
|
|
578
578
|
add(e) {
|
|
579
|
-
return
|
|
579
|
+
return qa(this.subscriptions, e), () => Ci(this.subscriptions, e);
|
|
580
580
|
}
|
|
581
581
|
notify(e, t, r) {
|
|
582
582
|
const i = this.subscriptions.length;
|
|
@@ -596,11 +596,11 @@ class Oi {
|
|
|
596
596
|
this.subscriptions.length = 0;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function xi(n, e) {
|
|
600
600
|
return e ? n * (1e3 / e) : 0;
|
|
601
601
|
}
|
|
602
|
-
const
|
|
603
|
-
class
|
|
602
|
+
const Mr = 30, ls = (n) => !isNaN(parseFloat(n));
|
|
603
|
+
class cs {
|
|
604
604
|
/**
|
|
605
605
|
* @param init - The initiating value
|
|
606
606
|
* @param config - Optional configuration options
|
|
@@ -618,7 +618,7 @@ class ls {
|
|
|
618
618
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = t.owner;
|
|
619
619
|
}
|
|
620
620
|
setCurrent(e) {
|
|
621
|
-
this.current = e, this.updatedAt = ve.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity =
|
|
621
|
+
this.current = e, this.updatedAt = ve.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = ls(this.current));
|
|
622
622
|
}
|
|
623
623
|
setPrevFrameValue(e = this.current) {
|
|
624
624
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -664,10 +664,10 @@ class ls {
|
|
|
664
664
|
* @deprecated
|
|
665
665
|
*/
|
|
666
666
|
onChange(e) {
|
|
667
|
-
return process.env.NODE_ENV !== "production" &&
|
|
667
|
+
return process.env.NODE_ENV !== "production" && Oi(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
668
668
|
}
|
|
669
669
|
on(e, t) {
|
|
670
|
-
this.events[e] || (this.events[e] = new
|
|
670
|
+
this.events[e] || (this.events[e] = new Ni());
|
|
671
671
|
const r = this.events[e].add(t);
|
|
672
672
|
return e === "change" ? () => {
|
|
673
673
|
r(), Ae.read(() => {
|
|
@@ -748,10 +748,10 @@ class ls {
|
|
|
748
748
|
*/
|
|
749
749
|
getVelocity() {
|
|
750
750
|
const e = ve.now();
|
|
751
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt >
|
|
751
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Mr)
|
|
752
752
|
return 0;
|
|
753
|
-
const t = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
754
|
-
return
|
|
753
|
+
const t = Math.min(this.updatedAt - this.prevUpdatedAt, Mr);
|
|
754
|
+
return xi(parseFloat(this.current) - parseFloat(this.prevFrameValue), t);
|
|
755
755
|
}
|
|
756
756
|
/**
|
|
757
757
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -804,41 +804,41 @@ class ls {
|
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
806
|
function at(n, e) {
|
|
807
|
-
return new
|
|
807
|
+
return new cs(n, e);
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function us(n, e, t) {
|
|
810
810
|
n.hasValue(e) ? n.getValue(e).set(t) : n.addValue(e, at(t));
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
return
|
|
812
|
+
function ds(n) {
|
|
813
|
+
return ns(n) ? n[n.length - 1] || 0 : n;
|
|
814
814
|
}
|
|
815
|
-
function
|
|
816
|
-
let s =
|
|
817
|
-
a =
|
|
815
|
+
function ps(n, e) {
|
|
816
|
+
let s = rs(n, e) || {}, { transitionEnd: r = {}, transition: i = {} } = s, a = ge(s, ["transitionEnd", "transition"]);
|
|
817
|
+
a = Q(Q({}, a), r);
|
|
818
818
|
for (const o in a) {
|
|
819
|
-
const l =
|
|
820
|
-
|
|
819
|
+
const l = ds(a[o]);
|
|
820
|
+
us(n, o, l);
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function hs(n) {
|
|
824
824
|
return !!(he(n) && n.add);
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function ms(n, e) {
|
|
827
827
|
const t = n.getValue("willChange");
|
|
828
|
-
if (
|
|
828
|
+
if (hs(t))
|
|
829
829
|
return t.add(e);
|
|
830
830
|
if (!t && Ce.WillChange) {
|
|
831
831
|
const r = new Ce.WillChange("auto");
|
|
832
832
|
n.addValue("willChange", r), r.add(e);
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
|
-
const sn = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(),
|
|
836
|
-
function
|
|
837
|
-
return n.props[
|
|
835
|
+
const sn = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), fs = "framerAppearId", vs = "data-" + sn(fs);
|
|
836
|
+
function gs(n) {
|
|
837
|
+
return n.props[vs];
|
|
838
838
|
}
|
|
839
|
-
const
|
|
840
|
-
function
|
|
841
|
-
const i = n.filter(
|
|
839
|
+
const ys = (n) => n !== null;
|
|
840
|
+
function bs(n, { repeat: e, repeatType: t = "loop" }, r) {
|
|
841
|
+
const i = n.filter(ys), a = e && t !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
|
|
842
842
|
return i[a];
|
|
843
843
|
}
|
|
844
844
|
const Ve = [
|
|
@@ -859,45 +859,45 @@ const Ve = [
|
|
|
859
859
|
"skew",
|
|
860
860
|
"skewX",
|
|
861
861
|
"skewY"
|
|
862
|
-
], Fe = new Set(Ve),
|
|
862
|
+
], Fe = new Set(Ve), Es = {
|
|
863
863
|
type: "spring",
|
|
864
864
|
stiffness: 500,
|
|
865
865
|
damping: 25,
|
|
866
866
|
restSpeed: 10
|
|
867
|
-
},
|
|
867
|
+
}, _s = (n) => ({
|
|
868
868
|
type: "spring",
|
|
869
869
|
stiffness: 550,
|
|
870
870
|
damping: n === 0 ? 2 * Math.sqrt(550) : 30,
|
|
871
871
|
restSpeed: 10
|
|
872
|
-
}),
|
|
872
|
+
}), Cs = {
|
|
873
873
|
type: "keyframes",
|
|
874
874
|
duration: 0.8
|
|
875
|
-
},
|
|
875
|
+
}, As = {
|
|
876
876
|
type: "keyframes",
|
|
877
877
|
ease: [0.25, 0.1, 0.35, 1],
|
|
878
878
|
duration: 0.3
|
|
879
|
-
},
|
|
880
|
-
function
|
|
879
|
+
}, ws = (n, { keyframes: e }) => e.length > 2 ? Cs : Fe.has(n) ? n.startsWith("scale") ? _s(e[1]) : Es : As;
|
|
880
|
+
function Ts(d) {
|
|
881
881
|
var h = d, { when: n, delay: e, delayChildren: t, staggerChildren: r, staggerDirection: i, repeat: a, repeatType: s, repeatDelay: o, from: l, elapsed: c } = h, u = ge(h, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
|
|
882
882
|
return !!Object.keys(u).length;
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function Li(n, e) {
|
|
885
885
|
var t, r;
|
|
886
886
|
return (r = (t = n == null ? void 0 : n[e]) != null ? t : n == null ? void 0 : n.default) != null ? r : n;
|
|
887
887
|
}
|
|
888
|
-
const
|
|
888
|
+
const Pi = (n) => (e) => typeof e == "string" && e.startsWith(n), Ri = /* @__PURE__ */ Pi("--"), Is = /* @__PURE__ */ Pi("var(--"), on = (n) => Is(n) ? Os.test(n.split("/*")[0].trim()) : !1, Os = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Le = (n, e, t) => t > e ? e : t < n ? n : t, Ue = {
|
|
889
889
|
test: (n) => typeof n == "number",
|
|
890
890
|
parse: parseFloat,
|
|
891
891
|
transform: (n) => n
|
|
892
|
-
}, st = te(
|
|
892
|
+
}, st = te(Q({}, Ue), {
|
|
893
893
|
transform: (n) => Le(0, 1, n)
|
|
894
|
-
}), vt = te(
|
|
894
|
+
}), vt = te(Q({}, Ue), {
|
|
895
895
|
default: 1
|
|
896
896
|
}), rt = (n) => Math.round(n * 1e5) / 1e5, ln = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
897
|
-
function
|
|
897
|
+
function Ns(n) {
|
|
898
898
|
return n == null;
|
|
899
899
|
}
|
|
900
|
-
const
|
|
900
|
+
const xs = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, cn = (n, e) => (t) => !!(typeof t == "string" && xs.test(t) && t.startsWith(n) || e && !Ns(t) && Object.prototype.hasOwnProperty.call(t, e)), Si = (n, e, t) => (r) => {
|
|
901
901
|
if (typeof r != "string")
|
|
902
902
|
return r;
|
|
903
903
|
const [i, a, s, o] = r.match(ln);
|
|
@@ -907,14 +907,14 @@ const Ns = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
907
907
|
[t]: parseFloat(s),
|
|
908
908
|
alpha: o !== void 0 ? parseFloat(o) : 1
|
|
909
909
|
};
|
|
910
|
-
},
|
|
911
|
-
transform: (n) => Math.round(
|
|
910
|
+
}, Ls = (n) => Le(0, 255, n), Ot = te(Q({}, Ue), {
|
|
911
|
+
transform: (n) => Math.round(Ls(n))
|
|
912
912
|
}), Ie = {
|
|
913
913
|
test: /* @__PURE__ */ cn("rgb", "red"),
|
|
914
|
-
parse: /* @__PURE__ */
|
|
914
|
+
parse: /* @__PURE__ */ Si("red", "green", "blue"),
|
|
915
915
|
transform: ({ red: n, green: e, blue: t, alpha: r = 1 }) => "rgba(" + Ot.transform(n) + ", " + Ot.transform(e) + ", " + Ot.transform(t) + ", " + rt(st.transform(r)) + ")"
|
|
916
916
|
};
|
|
917
|
-
function
|
|
917
|
+
function Ps(n) {
|
|
918
918
|
let e = "", t = "", r = "", i = "";
|
|
919
919
|
return n.length > 5 ? (e = n.substring(1, 3), t = n.substring(3, 5), r = n.substring(5, 7), i = n.substring(7, 9)) : (e = n.substring(1, 2), t = n.substring(2, 3), r = n.substring(3, 4), i = n.substring(4, 5), e += e, t += t, r += r, i += i), {
|
|
920
920
|
red: parseInt(e, 16),
|
|
@@ -925,29 +925,29 @@ function Ls(n) {
|
|
|
925
925
|
}
|
|
926
926
|
const Ut = {
|
|
927
927
|
test: /* @__PURE__ */ cn("#"),
|
|
928
|
-
parse:
|
|
928
|
+
parse: Ps,
|
|
929
929
|
transform: Ie.transform
|
|
930
930
|
}, dt = /* @__NO_SIDE_EFFECTS__ */ (n) => ({
|
|
931
931
|
test: (e) => typeof e == "string" && e.endsWith(n) && e.split(" ").length === 1,
|
|
932
932
|
parse: parseFloat,
|
|
933
933
|
transform: (e) => `${e}${n}`
|
|
934
|
-
}), we = /* @__PURE__ */ dt("deg"), ke = /* @__PURE__ */ dt("%"),
|
|
934
|
+
}), we = /* @__PURE__ */ dt("deg"), ke = /* @__PURE__ */ dt("%"), $ = /* @__PURE__ */ dt("px"), Rs = /* @__PURE__ */ dt("vh"), Ss = /* @__PURE__ */ dt("vw"), Dr = te(Q({}, ke), {
|
|
935
935
|
parse: (n) => ke.parse(n) / 100,
|
|
936
936
|
transform: (n) => ke.transform(n * 100)
|
|
937
937
|
}), Re = {
|
|
938
938
|
test: /* @__PURE__ */ cn("hsl", "hue"),
|
|
939
|
-
parse: /* @__PURE__ */
|
|
939
|
+
parse: /* @__PURE__ */ Si("hue", "saturation", "lightness"),
|
|
940
940
|
transform: ({ hue: n, saturation: e, lightness: t, alpha: r = 1 }) => "hsla(" + Math.round(n) + ", " + ke.transform(rt(e)) + ", " + ke.transform(rt(t)) + ", " + rt(st.transform(r)) + ")"
|
|
941
941
|
}, ue = {
|
|
942
942
|
test: (n) => Ie.test(n) || Ut.test(n) || Re.test(n),
|
|
943
943
|
parse: (n) => Ie.test(n) ? Ie.parse(n) : Re.test(n) ? Re.parse(n) : Ut.parse(n),
|
|
944
944
|
transform: (n) => typeof n == "string" ? n : n.hasOwnProperty("red") ? Ie.transform(n) : Re.transform(n)
|
|
945
|
-
},
|
|
946
|
-
function
|
|
945
|
+
}, ks = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
946
|
+
function Ms(n) {
|
|
947
947
|
var e, t;
|
|
948
|
-
return isNaN(n) && typeof n == "string" && (((e = n.match(ln)) == null ? void 0 : e.length) || 0) + (((t = n.match(
|
|
948
|
+
return isNaN(n) && typeof n == "string" && (((e = n.match(ln)) == null ? void 0 : e.length) || 0) + (((t = n.match(ks)) == null ? void 0 : t.length) || 0) > 0;
|
|
949
949
|
}
|
|
950
|
-
const
|
|
950
|
+
const ki = "number", Mi = "color", Ds = "var", Vs = "var(", Vr = "${}", Fs = /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 ot(n) {
|
|
952
952
|
const e = n.toString(), t = [], r = {
|
|
953
953
|
color: [],
|
|
@@ -955,39 +955,39 @@ function ot(n) {
|
|
|
955
955
|
var: []
|
|
956
956
|
}, i = [];
|
|
957
957
|
let a = 0;
|
|
958
|
-
const o = e.replace(
|
|
958
|
+
const o = e.replace(Fs, (l) => (ue.test(l) ? (r.color.push(a), i.push(Mi), t.push(ue.parse(l))) : l.startsWith(Vs) ? (r.var.push(a), i.push(Ds), t.push(l)) : (r.number.push(a), i.push(ki), t.push(parseFloat(l))), ++a, Vr)).split(Vr);
|
|
959
959
|
return { values: t, split: o, indexes: r, types: i };
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function Di(n) {
|
|
962
962
|
return ot(n).values;
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function Vi(n) {
|
|
965
965
|
const { split: e, types: t } = ot(n), r = e.length;
|
|
966
966
|
return (i) => {
|
|
967
967
|
let a = "";
|
|
968
968
|
for (let s = 0; s < r; s++)
|
|
969
969
|
if (a += e[s], i[s] !== void 0) {
|
|
970
970
|
const o = t[s];
|
|
971
|
-
o ===
|
|
971
|
+
o === ki ? a += rt(i[s]) : o === Mi ? a += ue.transform(i[s]) : a += i[s];
|
|
972
972
|
}
|
|
973
973
|
return a;
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
const
|
|
977
|
-
function
|
|
978
|
-
const e =
|
|
979
|
-
return
|
|
976
|
+
const Us = (n) => typeof n == "number" ? 0 : n;
|
|
977
|
+
function Bs(n) {
|
|
978
|
+
const e = Di(n);
|
|
979
|
+
return Vi(n)(e.map(Us));
|
|
980
980
|
}
|
|
981
981
|
const Be = {
|
|
982
|
-
test:
|
|
983
|
-
parse:
|
|
984
|
-
createTransformer:
|
|
985
|
-
getAnimatableNone:
|
|
982
|
+
test: Ms,
|
|
983
|
+
parse: Di,
|
|
984
|
+
createTransformer: Vi,
|
|
985
|
+
getAnimatableNone: Bs
|
|
986
986
|
};
|
|
987
987
|
function Nt(n, e, t) {
|
|
988
988
|
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? n + (e - n) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? n + (e - n) * (2 / 3 - t) * 6 : n;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function zs({ hue: n, saturation: e, lightness: t, alpha: r }) {
|
|
991
991
|
n /= 360, e /= 100, t /= 100;
|
|
992
992
|
let i = 0, a = 0, s = 0;
|
|
993
993
|
if (!e)
|
|
@@ -1009,32 +1009,32 @@ function At(n, e) {
|
|
|
1009
1009
|
const xt = (n, e, t) => {
|
|
1010
1010
|
const r = n * n, i = t * (e * e - r) + r;
|
|
1011
1011
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
1012
|
-
},
|
|
1013
|
-
function
|
|
1014
|
-
const e =
|
|
1012
|
+
}, js = [Ut, Ie, Re], Ks = (n) => js.find((e) => e.test(n));
|
|
1013
|
+
function Fr(n) {
|
|
1014
|
+
const e = Ks(n);
|
|
1015
1015
|
if (ut(!!e, `'${n}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
1016
1016
|
return !1;
|
|
1017
1017
|
let t = e.parse(n);
|
|
1018
|
-
return e === Re && (t =
|
|
1018
|
+
return e === Re && (t = zs(t)), t;
|
|
1019
1019
|
}
|
|
1020
|
-
const
|
|
1021
|
-
const t =
|
|
1020
|
+
const Ur = (n, e) => {
|
|
1021
|
+
const t = Fr(n), r = Fr(e);
|
|
1022
1022
|
if (!t || !r)
|
|
1023
1023
|
return At(n, e);
|
|
1024
|
-
const i =
|
|
1024
|
+
const i = Q({}, t);
|
|
1025
1025
|
return (a) => (i.red = xt(t.red, r.red, a), i.green = xt(t.green, r.green, a), i.blue = xt(t.blue, r.blue, a), i.alpha = ct(t.alpha, r.alpha, a), Ie.transform(i));
|
|
1026
1026
|
}, Bt = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
1027
|
-
function
|
|
1027
|
+
function qs(n, e) {
|
|
1028
1028
|
return Bt.has(n) ? (t) => t <= 0 ? n : e : (t) => t >= 1 ? e : n;
|
|
1029
1029
|
}
|
|
1030
|
-
const
|
|
1031
|
-
function
|
|
1030
|
+
const Hs = (n, e) => (t) => e(n(t)), un = (...n) => n.reduce(Hs);
|
|
1031
|
+
function Ws(n, e) {
|
|
1032
1032
|
return (t) => ct(n, e, t);
|
|
1033
1033
|
}
|
|
1034
1034
|
function dn(n) {
|
|
1035
|
-
return typeof n == "number" ?
|
|
1035
|
+
return typeof n == "number" ? Ws : typeof n == "string" ? on(n) ? At : ue.test(n) ? Ur : Qs : Array.isArray(n) ? Fi : typeof n == "object" ? ue.test(n) ? Ur : Gs : At;
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function Fi(n, e) {
|
|
1038
1038
|
const t = [...n], r = t.length, i = n.map((a, s) => dn(a)(a, e[s]));
|
|
1039
1039
|
return (a) => {
|
|
1040
1040
|
for (let s = 0; s < r; s++)
|
|
@@ -1042,8 +1042,8 @@ function Vi(n, e) {
|
|
|
1042
1042
|
return t;
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
const t =
|
|
1045
|
+
function Gs(n, e) {
|
|
1046
|
+
const t = Q(Q({}, n), e), r = {};
|
|
1047
1047
|
for (const i in t)
|
|
1048
1048
|
n[i] !== void 0 && e[i] !== void 0 && (r[i] = dn(n[i])(n[i], e[i]));
|
|
1049
1049
|
return (i) => {
|
|
@@ -1052,7 +1052,7 @@ function Ws(n, e) {
|
|
|
1052
1052
|
return t;
|
|
1053
1053
|
};
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function Ys(n, e) {
|
|
1056
1056
|
var i;
|
|
1057
1057
|
const t = [], r = { color: 0, var: 0, number: 0 };
|
|
1058
1058
|
for (let a = 0; a < e.values.length; a++) {
|
|
@@ -1061,14 +1061,14 @@ function Gs(n, e) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
return t;
|
|
1063
1063
|
}
|
|
1064
|
-
const
|
|
1064
|
+
const Qs = (n, e) => {
|
|
1065
1065
|
const t = Be.createTransformer(e), r = ot(n), i = ot(e);
|
|
1066
|
-
return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Bt.has(n) && !i.values.length || Bt.has(e) && !r.values.length ?
|
|
1066
|
+
return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Bt.has(n) && !i.values.length || Bt.has(e) && !r.values.length ? qs(n, e) : un(Fi(Ys(r, i), i.values), t) : (ut(!0, `Complex values '${n}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), At(n, e));
|
|
1067
1067
|
};
|
|
1068
|
-
function
|
|
1068
|
+
function Ui(n, e, t) {
|
|
1069
1069
|
return typeof n == "number" && typeof e == "number" && typeof t == "number" ? ct(n, e, t) : dn(n)(n, e);
|
|
1070
1070
|
}
|
|
1071
|
-
const
|
|
1071
|
+
const $s = (n) => {
|
|
1072
1072
|
const e = ({ timestamp: t }) => n(t);
|
|
1073
1073
|
return {
|
|
1074
1074
|
start: (t = !0) => Ae.update(e, t),
|
|
@@ -1079,16 +1079,16 @@ const Qs = (n) => {
|
|
|
1079
1079
|
*/
|
|
1080
1080
|
now: () => Ct.isProcessing ? Ct.timestamp : ve.now()
|
|
1081
1081
|
};
|
|
1082
|
-
},
|
|
1082
|
+
}, Bi = (n, e, t = 10) => {
|
|
1083
1083
|
let r = "";
|
|
1084
1084
|
const i = Math.max(Math.round(e / t), 2);
|
|
1085
1085
|
for (let a = 0; a < i; a++)
|
|
1086
1086
|
r += n(a / (i - 1)) + ", ";
|
|
1087
1087
|
return `linear(${r.substring(0, r.length - 2)})`;
|
|
1088
|
-
},
|
|
1089
|
-
function
|
|
1090
|
-
const r = Math.max(e -
|
|
1091
|
-
return
|
|
1088
|
+
}, Zs = 5;
|
|
1089
|
+
function zi(n, e, t) {
|
|
1090
|
+
const r = Math.max(e - Zs, 0);
|
|
1091
|
+
return xi(t - n(r), e - r);
|
|
1092
1092
|
}
|
|
1093
1093
|
const ie = {
|
|
1094
1094
|
// Default spring physics
|
|
@@ -1118,17 +1118,17 @@ const ie = {
|
|
|
1118
1118
|
// in seconds
|
|
1119
1119
|
minDamping: 0.05,
|
|
1120
1120
|
maxDamping: 1
|
|
1121
|
-
},
|
|
1122
|
-
function
|
|
1121
|
+
}, Br = 1e-3;
|
|
1122
|
+
function Xs({ duration: n = ie.duration, bounce: e = ie.bounce, velocity: t = ie.velocity, mass: r = ie.mass }) {
|
|
1123
1123
|
let i, a;
|
|
1124
1124
|
ut(n <= /* @__PURE__ */ ye(ie.maxDuration), "Spring duration must be 10 seconds or less");
|
|
1125
1125
|
let s = 1 - e;
|
|
1126
1126
|
s = Le(ie.minDamping, ie.maxDamping, s), n = Le(ie.minDuration, ie.maxDuration, /* @__PURE__ */ Ee(n)), s < 1 ? (i = (c) => {
|
|
1127
1127
|
const u = c * s, d = u * n, h = u - t, p = zt(c, s), m = Math.exp(-d);
|
|
1128
|
-
return
|
|
1128
|
+
return Br - h / p * m;
|
|
1129
1129
|
}, a = (c) => {
|
|
1130
1130
|
const d = c * s * n, h = d * t + t, p = Math.pow(s, 2) * Math.pow(c, 2) * n, m = Math.exp(-d), f = zt(Math.pow(c, 2), s);
|
|
1131
|
-
return (-i(c) +
|
|
1131
|
+
return (-i(c) + Br > 0 ? -1 : 1) * ((h - p) * m) / f;
|
|
1132
1132
|
}) : (i = (c) => {
|
|
1133
1133
|
const u = Math.exp(-c * n), d = (c - t) * n + 1;
|
|
1134
1134
|
return -1e-3 + u * d;
|
|
@@ -1136,7 +1136,7 @@ function Zs({ duration: n = ie.duration, bounce: e = ie.bounce, velocity: t = ie
|
|
|
1136
1136
|
const u = Math.exp(-c * n), d = (t - c) * (n * n);
|
|
1137
1137
|
return u * d;
|
|
1138
1138
|
});
|
|
1139
|
-
const o = 5 / n, l =
|
|
1139
|
+
const o = 5 / n, l = eo(i, a, o);
|
|
1140
1140
|
if (n = /* @__PURE__ */ ye(n), isNaN(l))
|
|
1141
1141
|
return {
|
|
1142
1142
|
stiffness: ie.stiffness,
|
|
@@ -1152,39 +1152,39 @@ function Zs({ duration: n = ie.duration, bounce: e = ie.bounce, velocity: t = ie
|
|
|
1152
1152
|
};
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
|
-
const
|
|
1156
|
-
function
|
|
1155
|
+
const Js = 12;
|
|
1156
|
+
function eo(n, e, t) {
|
|
1157
1157
|
let r = t;
|
|
1158
|
-
for (let i = 1; i <
|
|
1158
|
+
for (let i = 1; i < Js; i++)
|
|
1159
1159
|
r = r - n(r) / e(r);
|
|
1160
1160
|
return r;
|
|
1161
1161
|
}
|
|
1162
1162
|
function zt(n, e) {
|
|
1163
1163
|
return n * Math.sqrt(1 - e * e);
|
|
1164
1164
|
}
|
|
1165
|
-
const
|
|
1166
|
-
function
|
|
1165
|
+
const to = ["duration", "bounce"], no = ["stiffness", "damping", "mass"];
|
|
1166
|
+
function zr(n, e) {
|
|
1167
1167
|
return e.some((t) => n[t] !== void 0);
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1170
|
-
let e =
|
|
1169
|
+
function ro(n) {
|
|
1170
|
+
let e = Q({
|
|
1171
1171
|
velocity: ie.velocity,
|
|
1172
1172
|
stiffness: ie.stiffness,
|
|
1173
1173
|
damping: ie.damping,
|
|
1174
1174
|
mass: ie.mass,
|
|
1175
1175
|
isResolvedFromDuration: !1
|
|
1176
1176
|
}, n);
|
|
1177
|
-
if (!
|
|
1177
|
+
if (!zr(n, no) && zr(n, to))
|
|
1178
1178
|
if (n.visualDuration) {
|
|
1179
1179
|
const t = n.visualDuration, r = 2 * Math.PI / (t * 1.2), i = r * r, a = 2 * Le(0.05, 1, 1 - (n.bounce || 0)) * Math.sqrt(i);
|
|
1180
|
-
e = te(
|
|
1180
|
+
e = te(Q({}, e), {
|
|
1181
1181
|
mass: ie.mass,
|
|
1182
1182
|
stiffness: i,
|
|
1183
1183
|
damping: a
|
|
1184
1184
|
});
|
|
1185
1185
|
} else {
|
|
1186
|
-
const t =
|
|
1187
|
-
e = te(
|
|
1186
|
+
const t = Xs(n);
|
|
1187
|
+
e = te(Q(Q({}, e), t), {
|
|
1188
1188
|
mass: ie.mass
|
|
1189
1189
|
}), e.isResolvedFromDuration = !0;
|
|
1190
1190
|
}
|
|
@@ -1197,7 +1197,7 @@ function lt(n = ie.visualDuration, e = ie.bounce) {
|
|
|
1197
1197
|
bounce: e
|
|
1198
1198
|
} : n;
|
|
1199
1199
|
let { restSpeed: r, restDelta: i } = t;
|
|
1200
|
-
const a = t.keyframes[0], s = t.keyframes[t.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: c, mass: u, duration: d, velocity: h, isResolvedFromDuration: p } =
|
|
1200
|
+
const a = t.keyframes[0], s = t.keyframes[t.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: c, mass: u, duration: d, velocity: h, isResolvedFromDuration: p } = ro(te(Q({}, t), {
|
|
1201
1201
|
velocity: -/* @__PURE__ */ Ee(t.velocity || 0)
|
|
1202
1202
|
})), m = h || 0, f = c / (2 * Math.sqrt(l * u)), v = s - a, y = /* @__PURE__ */ Ee(Math.sqrt(l / u)), w = Math.abs(v) < 5;
|
|
1203
1203
|
r || (r = w ? ie.restSpeed.granular : ie.restSpeed.default), i || (i = w ? ie.restDelta.granular : ie.restDelta.default);
|
|
@@ -1225,14 +1225,14 @@ function lt(n = ie.visualDuration, e = ie.bounce) {
|
|
|
1225
1225
|
o.done = A >= d;
|
|
1226
1226
|
else {
|
|
1227
1227
|
let L = A === 0 ? m : 0;
|
|
1228
|
-
f < 1 && (L = A === 0 ? /* @__PURE__ */ ye(m) :
|
|
1228
|
+
f < 1 && (L = A === 0 ? /* @__PURE__ */ ye(m) : zi(T, A, I));
|
|
1229
1229
|
const k = Math.abs(L) <= r, B = Math.abs(s - I) <= i;
|
|
1230
1230
|
o.done = k && B;
|
|
1231
1231
|
}
|
|
1232
1232
|
return o.value = o.done ? s : I, o;
|
|
1233
1233
|
},
|
|
1234
1234
|
toString: () => {
|
|
1235
|
-
const A = Math.min(an(x), _t), I =
|
|
1235
|
+
const A = Math.min(an(x), _t), I = Bi((L) => x.next(A * L).value, A, 30);
|
|
1236
1236
|
return A + "ms " + I;
|
|
1237
1237
|
},
|
|
1238
1238
|
toTransition: () => {
|
|
@@ -1241,7 +1241,7 @@ function lt(n = ie.visualDuration, e = ie.bounce) {
|
|
|
1241
1241
|
return x;
|
|
1242
1242
|
}
|
|
1243
1243
|
lt.applyToOptions = (n) => {
|
|
1244
|
-
const e =
|
|
1244
|
+
const e = Ti(n, 100, lt);
|
|
1245
1245
|
return n.ease = e.ease, n.duration = /* @__PURE__ */ ye(e.duration), n.type = "keyframes", n;
|
|
1246
1246
|
};
|
|
1247
1247
|
function jt({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: s, min: o, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
@@ -1260,7 +1260,7 @@ function jt({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: r = 3
|
|
|
1260
1260
|
const L = (k) => {
|
|
1261
1261
|
p(h.value) && (A = k, I = lt({
|
|
1262
1262
|
keyframes: [h.value, m(h.value)],
|
|
1263
|
-
velocity:
|
|
1263
|
+
velocity: zi(T, k, h.value),
|
|
1264
1264
|
// TODO: This should be passing * 1000
|
|
1265
1265
|
damping: i,
|
|
1266
1266
|
stiffness: a,
|
|
@@ -1276,8 +1276,8 @@ function jt({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: r = 3
|
|
|
1276
1276
|
}
|
|
1277
1277
|
};
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1280
|
-
const r = [], i = t || Ce.mix ||
|
|
1279
|
+
function io(n, e, t) {
|
|
1280
|
+
const r = [], i = t || Ce.mix || Ui, a = n.length - 1;
|
|
1281
1281
|
for (let s = 0; s < a; s++) {
|
|
1282
1282
|
let o = i(n[s], n[s + 1]);
|
|
1283
1283
|
if (e) {
|
|
@@ -1288,7 +1288,7 @@ function ro(n, e, t) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
return r;
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function ao(n, e, { clamp: t = !0, ease: r, mixer: i } = {}) {
|
|
1292
1292
|
const a = n.length;
|
|
1293
1293
|
if (_e(a === e.length, "Both input and output ranges must be the same length"), a === 1)
|
|
1294
1294
|
return () => e[0];
|
|
@@ -1296,7 +1296,7 @@ function io(n, e, { clamp: t = !0, ease: r, mixer: i } = {}) {
|
|
|
1296
1296
|
return () => e[1];
|
|
1297
1297
|
const s = n[0] === n[1];
|
|
1298
1298
|
n[0] > n[a - 1] && (n = [...n].reverse(), e = [...e].reverse());
|
|
1299
|
-
const o =
|
|
1299
|
+
const o = io(e, r, i), l = o.length, c = (u) => {
|
|
1300
1300
|
if (s && u < n[0])
|
|
1301
1301
|
return e[0];
|
|
1302
1302
|
let d = 0;
|
|
@@ -1308,78 +1308,78 @@ function io(n, e, { clamp: t = !0, ease: r, mixer: i } = {}) {
|
|
|
1308
1308
|
};
|
|
1309
1309
|
return t ? (u) => c(Le(n[0], n[a - 1], u)) : c;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function so(n, e) {
|
|
1312
1312
|
return n.map((t) => t * e);
|
|
1313
1313
|
}
|
|
1314
|
-
const
|
|
1315
|
-
function
|
|
1314
|
+
const ji = (n, e, t) => (((1 - 3 * t + 3 * e) * n + (3 * t - 6 * e)) * n + 3 * e) * n, oo = 1e-7, lo = 12;
|
|
1315
|
+
function co(n, e, t, r, i) {
|
|
1316
1316
|
let a, s, o = 0;
|
|
1317
1317
|
do
|
|
1318
|
-
s = e + (t - e) / 2, a =
|
|
1319
|
-
while (Math.abs(a) >
|
|
1318
|
+
s = e + (t - e) / 2, a = ji(s, r, i) - n, a > 0 ? t = s : e = s;
|
|
1319
|
+
while (Math.abs(a) > oo && ++o < lo);
|
|
1320
1320
|
return s;
|
|
1321
1321
|
}
|
|
1322
1322
|
function pt(n, e, t, r) {
|
|
1323
1323
|
if (n === e && t === r)
|
|
1324
1324
|
return De;
|
|
1325
|
-
const i = (a) =>
|
|
1326
|
-
return (a) => a === 0 || a === 1 ? a :
|
|
1325
|
+
const i = (a) => co(a, 0, 1, n, t);
|
|
1326
|
+
return (a) => a === 0 || a === 1 ? a : ji(i(a), e, r);
|
|
1327
1327
|
}
|
|
1328
|
-
const
|
|
1328
|
+
const uo = /* @__PURE__ */ pt(0.42, 0, 1, 1), po = /* @__PURE__ */ pt(0, 0, 0.58, 1), Ki = /* @__PURE__ */ pt(0.42, 0, 0.58, 1), qi = (n) => (e) => e <= 0.5 ? n(2 * e) / 2 : (2 - n(2 * (1 - e))) / 2, Hi = (n) => (e) => 1 - n(1 - e), Wi = /* @__PURE__ */ pt(0.33, 1.53, 0.69, 0.99), pn = /* @__PURE__ */ Hi(Wi), Gi = /* @__PURE__ */ qi(pn), Yi = (n) => (n *= 2) < 1 ? 0.5 * pn(n) : 0.5 * (2 - Math.pow(2, -10 * (n - 1))), hn = (n) => 1 - Math.sin(Math.acos(n)), ho = Hi(hn), Qi = qi(hn), $i = (n) => Array.isArray(n) && typeof n[0] == "number", jr = {
|
|
1329
1329
|
linear: De,
|
|
1330
|
-
easeIn:
|
|
1331
|
-
easeInOut:
|
|
1332
|
-
easeOut:
|
|
1330
|
+
easeIn: uo,
|
|
1331
|
+
easeInOut: Ki,
|
|
1332
|
+
easeOut: po,
|
|
1333
1333
|
circIn: hn,
|
|
1334
|
-
circInOut:
|
|
1335
|
-
circOut:
|
|
1334
|
+
circInOut: Qi,
|
|
1335
|
+
circOut: ho,
|
|
1336
1336
|
backIn: pn,
|
|
1337
|
-
backInOut:
|
|
1338
|
-
backOut:
|
|
1339
|
-
anticipate:
|
|
1340
|
-
},
|
|
1341
|
-
if (
|
|
1337
|
+
backInOut: Gi,
|
|
1338
|
+
backOut: Wi,
|
|
1339
|
+
anticipate: Yi
|
|
1340
|
+
}, mo = (n) => typeof n == "string", Kr = (n) => {
|
|
1341
|
+
if ($i(n)) {
|
|
1342
1342
|
_e(n.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
1343
1343
|
const [e, t, r, i] = n;
|
|
1344
1344
|
return pt(e, t, r, i);
|
|
1345
|
-
} else if (
|
|
1346
|
-
return _e(
|
|
1345
|
+
} else if (mo(n))
|
|
1346
|
+
return _e(jr[n] !== void 0, `Invalid easing type '${n}'`), jr[n];
|
|
1347
1347
|
return n;
|
|
1348
1348
|
};
|
|
1349
|
-
function
|
|
1350
|
-
return n.map(() => e ||
|
|
1349
|
+
function fo(n, e) {
|
|
1350
|
+
return n.map(() => e || Ki).splice(0, n.length - 1);
|
|
1351
1351
|
}
|
|
1352
1352
|
function Se({ duration: n = 300, keyframes: e, times: t, ease: r = "easeInOut" }) {
|
|
1353
|
-
const i =
|
|
1353
|
+
const i = Ei(r) ? r.map(Kr) : Kr(r), a = {
|
|
1354
1354
|
done: !1,
|
|
1355
1355
|
value: e[0]
|
|
1356
|
-
}, s =
|
|
1356
|
+
}, s = so(
|
|
1357
1357
|
// Only use the provided offsets if they're the correct length
|
|
1358
1358
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
1359
|
-
t && t.length === e.length ? t :
|
|
1359
|
+
t && t.length === e.length ? t : wi(e),
|
|
1360
1360
|
n
|
|
1361
|
-
), o =
|
|
1362
|
-
ease: Array.isArray(i) ? i :
|
|
1361
|
+
), o = ao(s, e, {
|
|
1362
|
+
ease: Array.isArray(i) ? i : fo(e, i)
|
|
1363
1363
|
});
|
|
1364
1364
|
return {
|
|
1365
1365
|
calculatedDuration: n,
|
|
1366
1366
|
next: (l) => (a.value = o(l), a.done = l >= n, a)
|
|
1367
1367
|
};
|
|
1368
1368
|
}
|
|
1369
|
-
const
|
|
1369
|
+
const vo = (n) => n !== null;
|
|
1370
1370
|
function mn(n, { repeat: e, repeatType: t = "loop" }, r, i = 1) {
|
|
1371
|
-
const a = n.filter(
|
|
1371
|
+
const a = n.filter(vo), o = i < 0 || e && t !== "loop" && e % 2 === 1 ? 0 : a.length - 1;
|
|
1372
1372
|
return !o || r === void 0 ? a[o] : r;
|
|
1373
1373
|
}
|
|
1374
|
-
const
|
|
1374
|
+
const go = {
|
|
1375
1375
|
decay: jt,
|
|
1376
1376
|
inertia: jt,
|
|
1377
1377
|
tween: Se,
|
|
1378
1378
|
keyframes: Se,
|
|
1379
1379
|
spring: lt
|
|
1380
1380
|
};
|
|
1381
|
-
function
|
|
1382
|
-
typeof n.type == "string" && (n.type =
|
|
1381
|
+
function Zi(n) {
|
|
1382
|
+
typeof n.type == "string" && (n.type = go[n.type]);
|
|
1383
1383
|
}
|
|
1384
1384
|
class fn {
|
|
1385
1385
|
constructor() {
|
|
@@ -1405,7 +1405,7 @@ class fn {
|
|
|
1405
1405
|
return this.finished.then(e, t);
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
|
-
const
|
|
1408
|
+
const yo = (n) => n / 100;
|
|
1409
1409
|
class vn extends fn {
|
|
1410
1410
|
constructor(e) {
|
|
1411
1411
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
@@ -1416,13 +1416,13 @@ class vn extends fn {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
initAnimation() {
|
|
1418
1418
|
const { options: e } = this;
|
|
1419
|
-
|
|
1419
|
+
Zi(e);
|
|
1420
1420
|
const { type: t = Se, repeat: r = 0, repeatDelay: i = 0, repeatType: a, velocity: s = 0 } = e;
|
|
1421
1421
|
let { keyframes: o } = e;
|
|
1422
1422
|
const l = t || Se;
|
|
1423
|
-
process.env.NODE_ENV !== "production" && l !== Se && _e(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Se && typeof o[0] != "number" && (this.mixKeyframes = un(
|
|
1424
|
-
const c = l(te(
|
|
1425
|
-
a === "mirror" && (this.mirroredGenerator = l(te(
|
|
1423
|
+
process.env.NODE_ENV !== "production" && l !== Se && _e(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Se && typeof o[0] != "number" && (this.mixKeyframes = un(yo, Ui(o[0], o[1])), o = [0, 100]);
|
|
1424
|
+
const c = l(te(Q({}, e), { keyframes: o }));
|
|
1425
|
+
a === "mirror" && (this.mirroredGenerator = l(te(Q({}, e), {
|
|
1426
1426
|
keyframes: [...o].reverse(),
|
|
1427
1427
|
velocity: -s
|
|
1428
1428
|
}))), c.calculatedDuration === null && (c.calculatedDuration = an(c));
|
|
@@ -1484,7 +1484,7 @@ class vn extends fn {
|
|
|
1484
1484
|
var i, a;
|
|
1485
1485
|
if (this.isStopped)
|
|
1486
1486
|
return;
|
|
1487
|
-
const { driver: e =
|
|
1487
|
+
const { driver: e = $s, startTime: t } = this.options;
|
|
1488
1488
|
this.driver || (this.driver = e((s) => this.tick(s))), (a = (i = this.options).onPlay) == null || a.call(i);
|
|
1489
1489
|
const r = this.driver.now();
|
|
1490
1490
|
this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = t != null ? t : r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -1517,7 +1517,7 @@ class vn extends fn {
|
|
|
1517
1517
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (t = this.driver) == null || t.stop(), e.observe(this);
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function bo(n) {
|
|
1521
1521
|
var e;
|
|
1522
1522
|
for (let t = 1; t < n.length; t++)
|
|
1523
1523
|
(e = n[t]) != null || (n[t] = n[t - 1]);
|
|
@@ -1525,7 +1525,7 @@ function yo(n) {
|
|
|
1525
1525
|
const Oe = (n) => n * 180 / Math.PI, Kt = (n) => {
|
|
1526
1526
|
const e = Oe(Math.atan2(n[1], n[0]));
|
|
1527
1527
|
return qt(e);
|
|
1528
|
-
},
|
|
1528
|
+
}, Eo = {
|
|
1529
1529
|
x: 4,
|
|
1530
1530
|
y: 5,
|
|
1531
1531
|
translateX: 4,
|
|
@@ -1538,20 +1538,20 @@ const Oe = (n) => n * 180 / Math.PI, Kt = (n) => {
|
|
|
1538
1538
|
skewX: (n) => Oe(Math.atan(n[1])),
|
|
1539
1539
|
skewY: (n) => Oe(Math.atan(n[2])),
|
|
1540
1540
|
skew: (n) => (Math.abs(n[1]) + Math.abs(n[2])) / 2
|
|
1541
|
-
}, qt = (n) => (n = n % 360, n < 0 && (n += 360), n),
|
|
1541
|
+
}, qt = (n) => (n = n % 360, n < 0 && (n += 360), n), qr = Kt, Hr = (n) => Math.sqrt(n[0] * n[0] + n[1] * n[1]), Wr = (n) => Math.sqrt(n[4] * n[4] + n[5] * n[5]), _o = {
|
|
1542
1542
|
x: 12,
|
|
1543
1543
|
y: 13,
|
|
1544
1544
|
z: 14,
|
|
1545
1545
|
translateX: 12,
|
|
1546
1546
|
translateY: 13,
|
|
1547
1547
|
translateZ: 14,
|
|
1548
|
-
scaleX:
|
|
1549
|
-
scaleY:
|
|
1550
|
-
scale: (n) => (
|
|
1548
|
+
scaleX: Hr,
|
|
1549
|
+
scaleY: Wr,
|
|
1550
|
+
scale: (n) => (Hr(n) + Wr(n)) / 2,
|
|
1551
1551
|
rotateX: (n) => qt(Oe(Math.atan2(n[6], n[5]))),
|
|
1552
1552
|
rotateY: (n) => qt(Oe(Math.atan2(-n[2], n[0]))),
|
|
1553
|
-
rotateZ:
|
|
1554
|
-
rotate:
|
|
1553
|
+
rotateZ: qr,
|
|
1554
|
+
rotate: qr,
|
|
1555
1555
|
skewX: (n) => Oe(Math.atan(n[4])),
|
|
1556
1556
|
skewY: (n) => Oe(Math.atan(n[1])),
|
|
1557
1557
|
skew: (n) => (Math.abs(n[1]) + Math.abs(n[4])) / 2
|
|
@@ -1565,27 +1565,27 @@ function Wt(n, e) {
|
|
|
1565
1565
|
const t = n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
1566
1566
|
let r, i;
|
|
1567
1567
|
if (t)
|
|
1568
|
-
r =
|
|
1568
|
+
r = _o, i = t;
|
|
1569
1569
|
else {
|
|
1570
1570
|
const o = n.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
1571
|
-
r =
|
|
1571
|
+
r = Eo, i = o;
|
|
1572
1572
|
}
|
|
1573
1573
|
if (!i)
|
|
1574
1574
|
return Ht(e);
|
|
1575
|
-
const a = r[e], s = i[1].split(",").map(
|
|
1575
|
+
const a = r[e], s = i[1].split(",").map(Ao);
|
|
1576
1576
|
return typeof a == "function" ? a(s) : s[a];
|
|
1577
1577
|
}
|
|
1578
|
-
const
|
|
1578
|
+
const Co = (n, e) => {
|
|
1579
1579
|
const { transform: t = "none" } = getComputedStyle(n);
|
|
1580
1580
|
return Wt(t, e);
|
|
1581
1581
|
};
|
|
1582
|
-
function
|
|
1582
|
+
function Ao(n) {
|
|
1583
1583
|
return parseFloat(n.trim());
|
|
1584
1584
|
}
|
|
1585
|
-
const
|
|
1586
|
-
function
|
|
1585
|
+
const Gr = (n) => n === Ue || n === $, wo = /* @__PURE__ */ new Set(["x", "y", "z"]), To = Ve.filter((n) => !wo.has(n));
|
|
1586
|
+
function Io(n) {
|
|
1587
1587
|
const e = [];
|
|
1588
|
-
return
|
|
1588
|
+
return To.forEach((t) => {
|
|
1589
1589
|
const r = n.getValue(t);
|
|
1590
1590
|
r !== void 0 && (e.push([t, r.get()]), r.set(t.startsWith("scale") ? 1 : 0));
|
|
1591
1591
|
}), e;
|
|
@@ -1606,11 +1606,11 @@ Ne.translateX = Ne.x;
|
|
|
1606
1606
|
Ne.translateY = Ne.y;
|
|
1607
1607
|
const xe = /* @__PURE__ */ new Set();
|
|
1608
1608
|
let Gt = !1, Yt = !1, Qt = !1;
|
|
1609
|
-
function
|
|
1609
|
+
function Xi() {
|
|
1610
1610
|
if (Yt) {
|
|
1611
1611
|
const n = Array.from(xe).filter((r) => r.needsMeasurement), e = new Set(n.map((r) => r.element)), t = /* @__PURE__ */ new Map();
|
|
1612
1612
|
e.forEach((r) => {
|
|
1613
|
-
const i =
|
|
1613
|
+
const i = Io(r);
|
|
1614
1614
|
i.length && (t.set(r, i), r.render());
|
|
1615
1615
|
}), n.forEach((r) => r.measureInitialState()), e.forEach((r) => {
|
|
1616
1616
|
r.render();
|
|
@@ -1625,20 +1625,20 @@ function Zi() {
|
|
|
1625
1625
|
}
|
|
1626
1626
|
Yt = !1, Gt = !1, xe.forEach((n) => n.complete(Qt)), xe.clear();
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1628
|
+
function Ji() {
|
|
1629
1629
|
xe.forEach((n) => {
|
|
1630
1630
|
n.readKeyframes(), n.needsMeasurement && (Yt = !0);
|
|
1631
1631
|
});
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1634
|
-
Qt = !0,
|
|
1633
|
+
function Oo() {
|
|
1634
|
+
Qt = !0, Ji(), Xi(), Qt = !1;
|
|
1635
1635
|
}
|
|
1636
1636
|
class gn {
|
|
1637
1637
|
constructor(e, t, r, i, a, s = !1) {
|
|
1638
1638
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = t, this.name = r, this.motionValue = i, this.element = a, this.isAsync = s;
|
|
1639
1639
|
}
|
|
1640
1640
|
scheduleResolve() {
|
|
1641
|
-
this.state = "scheduled", this.isAsync ? (xe.add(this), Gt || (Gt = !0, Ae.read(
|
|
1641
|
+
this.state = "scheduled", this.isAsync ? (xe.add(this), Gt || (Gt = !0, Ae.read(Ji), Ae.resolveKeyframes(Xi))) : (this.readKeyframes(), this.complete());
|
|
1642
1642
|
}
|
|
1643
1643
|
readKeyframes() {
|
|
1644
1644
|
const { unresolvedKeyframes: e, name: t, element: r, motionValue: i } = this;
|
|
@@ -1652,7 +1652,7 @@ class gn {
|
|
|
1652
1652
|
}
|
|
1653
1653
|
e[0] === void 0 && (e[0] = s), i && a === void 0 && i.set(e[0]);
|
|
1654
1654
|
}
|
|
1655
|
-
|
|
1655
|
+
bo(e);
|
|
1656
1656
|
}
|
|
1657
1657
|
setFinalKeyframe() {
|
|
1658
1658
|
}
|
|
@@ -1672,31 +1672,31 @@ class gn {
|
|
|
1672
1672
|
this.state === "pending" && this.scheduleResolve();
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
|
-
const
|
|
1676
|
-
function
|
|
1677
|
-
|
|
1675
|
+
const No = (n) => n.startsWith("--");
|
|
1676
|
+
function xo(n, e, t) {
|
|
1677
|
+
No(e) ? n.style.setProperty(e, t) : n.style[e] = t;
|
|
1678
1678
|
}
|
|
1679
1679
|
// @__NO_SIDE_EFFECTS__
|
|
1680
1680
|
function yn(n) {
|
|
1681
1681
|
let e;
|
|
1682
1682
|
return () => (e === void 0 && (e = n()), e);
|
|
1683
1683
|
}
|
|
1684
|
-
const
|
|
1685
|
-
function
|
|
1684
|
+
const Lo = /* @__PURE__ */ yn(() => window.ScrollTimeline !== void 0), Po = {};
|
|
1685
|
+
function Ro(n, e) {
|
|
1686
1686
|
const t = /* @__PURE__ */ yn(n);
|
|
1687
1687
|
return () => {
|
|
1688
1688
|
var r;
|
|
1689
|
-
return (r =
|
|
1689
|
+
return (r = Po[e]) != null ? r : t();
|
|
1690
1690
|
};
|
|
1691
1691
|
}
|
|
1692
|
-
const
|
|
1692
|
+
const ea = /* @__PURE__ */ Ro(() => {
|
|
1693
1693
|
try {
|
|
1694
1694
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1695
1695
|
} catch (n) {
|
|
1696
1696
|
return !1;
|
|
1697
1697
|
}
|
|
1698
1698
|
return !0;
|
|
1699
|
-
}, "linearEasing"), nt = ([n, e, t, r]) => `cubic-bezier(${n}, ${e}, ${t}, ${r})`,
|
|
1699
|
+
}, "linearEasing"), nt = ([n, e, t, r]) => `cubic-bezier(${n}, ${e}, ${t}, ${r})`, Yr = {
|
|
1700
1700
|
linear: "linear",
|
|
1701
1701
|
ease: "ease",
|
|
1702
1702
|
easeIn: "ease-in",
|
|
@@ -1707,16 +1707,16 @@ const Ji = /* @__PURE__ */ Po(() => {
|
|
|
1707
1707
|
backIn: /* @__PURE__ */ nt([0.31, 0.01, 0.66, -0.59]),
|
|
1708
1708
|
backOut: /* @__PURE__ */ nt([0.33, 1.53, 0.69, 0.99])
|
|
1709
1709
|
};
|
|
1710
|
-
function
|
|
1710
|
+
function ta(n, e) {
|
|
1711
1711
|
if (n)
|
|
1712
|
-
return typeof n == "function" ?
|
|
1712
|
+
return typeof n == "function" ? ea() ? Bi(n, e) : "ease-out" : $i(n) ? nt(n) : Array.isArray(n) ? n.map((t) => ta(t, e) || Yr.easeOut) : Yr[n];
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function So(n, e, t, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: s = "loop", ease: o = "easeOut", times: l } = {}, c = void 0) {
|
|
1715
1715
|
const u = {
|
|
1716
1716
|
[e]: t
|
|
1717
1717
|
};
|
|
1718
1718
|
l && (u.offset = l);
|
|
1719
|
-
const d =
|
|
1719
|
+
const d = ta(o, i);
|
|
1720
1720
|
Array.isArray(d) && (u.easing = d);
|
|
1721
1721
|
const h = {
|
|
1722
1722
|
delay: r,
|
|
@@ -1728,22 +1728,22 @@ function Ro(n, e, t, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatTyp
|
|
|
1728
1728
|
};
|
|
1729
1729
|
return c && (h.pseudoElement = c), n.animate(u, h);
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function ko(t) {
|
|
1732
1732
|
var r = t, { type: n } = r, e = ge(r, ["type"]);
|
|
1733
1733
|
var i, a;
|
|
1734
|
-
return rn(n) &&
|
|
1734
|
+
return rn(n) && ea() ? n.applyToOptions(e) : ((i = e.duration) != null || (e.duration = 300), (a = e.ease) != null || (e.ease = "easeOut"), e);
|
|
1735
1735
|
}
|
|
1736
|
-
class
|
|
1736
|
+
class Mo extends fn {
|
|
1737
1737
|
constructor(e) {
|
|
1738
1738
|
if (super(), this.finishedTime = null, this.isStopped = !1, !e)
|
|
1739
1739
|
return;
|
|
1740
1740
|
const { element: t, name: r, keyframes: i, pseudoElement: a, allowFlatten: s = !1, finalKeyframe: o, onComplete: l } = e;
|
|
1741
1741
|
this.isPseudoElement = !!a, this.allowFlatten = s, this.options = e, _e(typeof e.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
|
|
1742
|
-
const c =
|
|
1743
|
-
this.animation =
|
|
1742
|
+
const c = ko(e);
|
|
1743
|
+
this.animation = So(t, r, i, c, a), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1744
1744
|
if (this.finishedTime = this.time, !a) {
|
|
1745
1745
|
const u = mn(i, this.options, o, this.speed);
|
|
1746
|
-
this.updateMotionValue ? this.updateMotionValue(u) :
|
|
1746
|
+
this.updateMotionValue ? this.updateMotionValue(u) : xo(t, r, u), this.animation.cancel();
|
|
1747
1747
|
}
|
|
1748
1748
|
l == null || l(), this.notifyFinished();
|
|
1749
1749
|
};
|
|
@@ -1822,24 +1822,24 @@ class ko extends fn {
|
|
|
1822
1822
|
*/
|
|
1823
1823
|
attachTimeline({ timeline: e, observe: t }) {
|
|
1824
1824
|
var r;
|
|
1825
|
-
return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e &&
|
|
1825
|
+
return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && Lo() ? (this.animation.timeline = e, De) : t(this);
|
|
1826
1826
|
}
|
|
1827
1827
|
}
|
|
1828
|
-
const
|
|
1829
|
-
anticipate:
|
|
1830
|
-
backInOut:
|
|
1831
|
-
circInOut:
|
|
1828
|
+
const na = {
|
|
1829
|
+
anticipate: Yi,
|
|
1830
|
+
backInOut: Gi,
|
|
1831
|
+
circInOut: Qi
|
|
1832
1832
|
};
|
|
1833
|
-
function Mo(n) {
|
|
1834
|
-
return n in ta;
|
|
1835
|
-
}
|
|
1836
1833
|
function Do(n) {
|
|
1837
|
-
|
|
1834
|
+
return n in na;
|
|
1835
|
+
}
|
|
1836
|
+
function Vo(n) {
|
|
1837
|
+
typeof n.ease == "string" && Do(n.ease) && (n.ease = na[n.ease]);
|
|
1838
1838
|
}
|
|
1839
|
-
const
|
|
1840
|
-
class
|
|
1839
|
+
const Qr = 10;
|
|
1840
|
+
class Fo extends Mo {
|
|
1841
1841
|
constructor(e) {
|
|
1842
|
-
|
|
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.
|
|
@@ -1858,16 +1858,16 @@ class Vo extends ko {
|
|
|
1858
1858
|
t.set(e);
|
|
1859
1859
|
return;
|
|
1860
1860
|
}
|
|
1861
|
-
const o = new vn(te(
|
|
1861
|
+
const o = new vn(te(Q({}, s), {
|
|
1862
1862
|
autoplay: !1
|
|
1863
1863
|
})), l = /* @__PURE__ */ ye((u = this.finishedTime) != null ? u : this.time);
|
|
1864
|
-
t.setWithVelocity(o.sample(l -
|
|
1864
|
+
t.setWithVelocity(o.sample(l - Qr).value, o.sample(l).value, Qr), o.stop();
|
|
1865
1865
|
}
|
|
1866
1866
|
}
|
|
1867
|
-
const
|
|
1867
|
+
const $r = (n, e) => e === "zIndex" ? !1 : !!(typeof n == "number" || Array.isArray(n) || typeof n == "string" && // It's animatable if we have a string
|
|
1868
1868
|
(Be.test(n) || n === "0") && // And it contains numbers and/or colors
|
|
1869
1869
|
!n.startsWith("url("));
|
|
1870
|
-
function
|
|
1870
|
+
function Uo(n) {
|
|
1871
1871
|
const e = n[0];
|
|
1872
1872
|
if (n.length === 1)
|
|
1873
1873
|
return !0;
|
|
@@ -1875,43 +1875,43 @@ function Fo(n) {
|
|
|
1875
1875
|
if (n[t] !== e)
|
|
1876
1876
|
return !0;
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function Bo(n, e, t, r) {
|
|
1879
1879
|
const i = n[0];
|
|
1880
1880
|
if (i === null)
|
|
1881
1881
|
return !1;
|
|
1882
1882
|
if (e === "display" || e === "visibility")
|
|
1883
1883
|
return !0;
|
|
1884
|
-
const a = n[n.length - 1], s =
|
|
1885
|
-
return ut(s === o, `You are trying to animate ${e} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`), !s || !o ? !1 :
|
|
1884
|
+
const a = n[n.length - 1], s = $r(i, e), o = $r(a, e);
|
|
1885
|
+
return ut(s === o, `You are trying to animate ${e} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`), !s || !o ? !1 : Uo(n) || (t === "spring" || rn(t)) && r;
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1887
|
+
function ra(n) {
|
|
1888
1888
|
return typeof n == "object" && n !== null;
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1891
|
-
return
|
|
1890
|
+
function zo(n) {
|
|
1891
|
+
return ra(n) && "offsetHeight" in n;
|
|
1892
1892
|
}
|
|
1893
|
-
const
|
|
1893
|
+
const jo = /* @__PURE__ */ new Set([
|
|
1894
1894
|
"opacity",
|
|
1895
1895
|
"clipPath",
|
|
1896
1896
|
"filter",
|
|
1897
1897
|
"transform"
|
|
1898
1898
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1899
1899
|
// "background-color"
|
|
1900
|
-
]),
|
|
1901
|
-
function
|
|
1900
|
+
]), Ko = /* @__PURE__ */ yn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1901
|
+
function qo(n) {
|
|
1902
1902
|
var c;
|
|
1903
1903
|
const { motionValue: e, name: t, repeatDelay: r, repeatType: i, damping: a, type: s } = n;
|
|
1904
|
-
if (!
|
|
1904
|
+
if (!zo((c = e == null ? void 0 : e.owner) == null ? void 0 : c.current))
|
|
1905
1905
|
return !1;
|
|
1906
1906
|
const { onUpdate: o, transformTemplate: l } = e.owner.getProps();
|
|
1907
|
-
return
|
|
1907
|
+
return Ko() && t && jo.has(t) && (t !== "transform" || !l) && /**
|
|
1908
1908
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1909
1909
|
* no way to read the value from WAAPI every frame.
|
|
1910
1910
|
*/
|
|
1911
1911
|
!o && !r && i !== "mirror" && a !== 0 && s !== "inertia";
|
|
1912
1912
|
}
|
|
1913
|
-
const
|
|
1914
|
-
class
|
|
1913
|
+
const Ho = 40;
|
|
1914
|
+
class Wo extends fn {
|
|
1915
1915
|
constructor(h) {
|
|
1916
1916
|
var p = h, { autoplay: e = !0, delay: t = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: a = 0, repeatType: s = "loop", keyframes: o, name: l, motionValue: c, element: u } = p, d = ge(p, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
|
|
1917
1917
|
var v;
|
|
@@ -1919,7 +1919,7 @@ class Ho extends fn {
|
|
|
1919
1919
|
var y, w;
|
|
1920
1920
|
this._animation && (this._animation.stop(), (y = this.stopTimeline) == null || y.call(this)), (w = this.keyframeResolver) == null || w.cancel();
|
|
1921
1921
|
}, this.createdAt = ve.now();
|
|
1922
|
-
const m =
|
|
1922
|
+
const m = Q({
|
|
1923
1923
|
autoplay: e,
|
|
1924
1924
|
delay: t,
|
|
1925
1925
|
type: r,
|
|
@@ -1935,13 +1935,13 @@ class Ho extends fn {
|
|
|
1935
1935
|
onKeyframesResolved(e, t, r, i) {
|
|
1936
1936
|
this.keyframeResolver = void 0;
|
|
1937
1937
|
const { name: a, type: s, velocity: o, delay: l, isHandoff: c, onUpdate: u } = r;
|
|
1938
|
-
this.resolvedAt = ve.now(),
|
|
1939
|
-
const d = i ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1938
|
+
this.resolvedAt = ve.now(), Bo(e, a, s, o) || ((Ce.instantAnimations || !l) && (u == null || u(mn(e, r, t))), e[0] = e[e.length - 1], r.duration = 0, r.repeat = 0);
|
|
1939
|
+
const d = i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ho ? this.resolvedAt : this.createdAt : this.createdAt : void 0, h = te(Q({
|
|
1940
1940
|
startTime: d,
|
|
1941
1941
|
finalKeyframe: t
|
|
1942
1942
|
}, r), {
|
|
1943
1943
|
keyframes: e
|
|
1944
|
-
}), p = !c &&
|
|
1944
|
+
}), p = !c && qo(h) ? new Fo(te(Q({}, h), {
|
|
1945
1945
|
element: h.motionValue.owner.current
|
|
1946
1946
|
})) : new vn(h);
|
|
1947
1947
|
p.finished.then(() => this.notifyFinished()).catch(De), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
|
|
@@ -1955,7 +1955,7 @@ class Ho extends fn {
|
|
|
1955
1955
|
}
|
|
1956
1956
|
get animation() {
|
|
1957
1957
|
var e;
|
|
1958
|
-
return this._animation || ((e = this.keyframeResolver) == null || e.resume(),
|
|
1958
|
+
return this._animation || ((e = this.keyframeResolver) == null || e.resume(), Oo()), this._animation;
|
|
1959
1959
|
}
|
|
1960
1960
|
get duration() {
|
|
1961
1961
|
return this.animation.duration;
|
|
@@ -1995,11 +1995,11 @@ class Ho extends fn {
|
|
|
1995
1995
|
this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel();
|
|
1996
1996
|
}
|
|
1997
1997
|
}
|
|
1998
|
-
const
|
|
1999
|
-
const o =
|
|
1998
|
+
const ia = (n, e, t, r = {}, i, a) => (s) => {
|
|
1999
|
+
const o = Li(r, n) || {}, l = o.delay || r.delay || 0;
|
|
2000
2000
|
let { elapsed: c = 0 } = r;
|
|
2001
2001
|
c = c - /* @__PURE__ */ ye(l);
|
|
2002
|
-
const u = te(
|
|
2002
|
+
const u = te(Q({
|
|
2003
2003
|
keyframes: Array.isArray(t) ? t : [null, t],
|
|
2004
2004
|
ease: "easeOut",
|
|
2005
2005
|
velocity: e.getVelocity()
|
|
@@ -2015,10 +2015,10 @@ const ra = (n, e, t, r = {}, i, a) => (s) => {
|
|
|
2015
2015
|
motionValue: e,
|
|
2016
2016
|
element: a ? void 0 : i
|
|
2017
2017
|
});
|
|
2018
|
-
|
|
2018
|
+
Ts(o) || Object.assign(u, ws(n, u)), u.duration && (u.duration = /* @__PURE__ */ ye(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ ye(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
2019
2019
|
let d = !1;
|
|
2020
2020
|
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (u.duration = 0, u.delay === 0 && (d = !0)), (Ce.instantAnimations || Ce.skipAnimations) && (d = !0, u.duration = 0, u.delay = 0), u.allowFlatten = !o.type && !o.ease, d && !a && e.get() !== void 0) {
|
|
2021
|
-
const h =
|
|
2021
|
+
const h = bs(u.keyframes, o);
|
|
2022
2022
|
if (h !== void 0) {
|
|
2023
2023
|
Ae.update(() => {
|
|
2024
2024
|
u.onUpdate(h), u.onComplete();
|
|
@@ -2026,8 +2026,8 @@ const ra = (n, e, t, r = {}, i, a) => (s) => {
|
|
|
2026
2026
|
return;
|
|
2027
2027
|
}
|
|
2028
2028
|
}
|
|
2029
|
-
return o.isSync ? new vn(u) : new
|
|
2030
|
-
},
|
|
2029
|
+
return o.isSync ? new vn(u) : new Wo(u);
|
|
2030
|
+
}, aa = /* @__PURE__ */ new Set([
|
|
2031
2031
|
"width",
|
|
2032
2032
|
"height",
|
|
2033
2033
|
"top",
|
|
@@ -2036,49 +2036,49 @@ const ra = (n, e, t, r = {}, i, a) => (s) => {
|
|
|
2036
2036
|
"bottom",
|
|
2037
2037
|
...Ve
|
|
2038
2038
|
]);
|
|
2039
|
-
function
|
|
2039
|
+
function Go({ protectedKeys: n, needsAnimating: e }, t) {
|
|
2040
2040
|
const r = n.hasOwnProperty(t) && e[t] !== !0;
|
|
2041
2041
|
return e[t] = !1, r;
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function Yo(n, e, { delay: t = 0, transitionOverride: r, type: i } = {}) {
|
|
2044
2044
|
var d;
|
|
2045
2045
|
let u = e, { transition: a = n.getDefaultTransition(), transitionEnd: s } = u, o = ge(u, ["transition", "transitionEnd"]);
|
|
2046
2046
|
r && (a = r);
|
|
2047
2047
|
const l = [], c = i && n.animationState && n.animationState.getState()[i];
|
|
2048
2048
|
for (const h in o) {
|
|
2049
2049
|
const p = n.getValue(h, (d = n.latestValues[h]) != null ? d : null), m = o[h];
|
|
2050
|
-
if (m === void 0 || c &&
|
|
2050
|
+
if (m === void 0 || c && Go(c, h))
|
|
2051
2051
|
continue;
|
|
2052
|
-
const f =
|
|
2052
|
+
const f = Q({
|
|
2053
2053
|
delay: t
|
|
2054
|
-
},
|
|
2054
|
+
}, Li(a || {}, h)), v = p.get();
|
|
2055
2055
|
if (v !== void 0 && !p.isAnimating && !Array.isArray(m) && m === v && !f.velocity)
|
|
2056
2056
|
continue;
|
|
2057
2057
|
let y = !1;
|
|
2058
2058
|
if (window.MotionHandoffAnimation) {
|
|
2059
|
-
const T =
|
|
2059
|
+
const T = gs(n);
|
|
2060
2060
|
if (T) {
|
|
2061
2061
|
const x = window.MotionHandoffAnimation(T, h, Ae);
|
|
2062
2062
|
x !== null && (f.startTime = x, y = !0);
|
|
2063
2063
|
}
|
|
2064
2064
|
}
|
|
2065
|
-
|
|
2065
|
+
ms(n, h), p.start(ia(h, p, m, n.shouldReduceMotion && aa.has(h) ? { type: !1 } : f, n, y));
|
|
2066
2066
|
const w = p.animation;
|
|
2067
2067
|
w && l.push(w);
|
|
2068
2068
|
}
|
|
2069
2069
|
return s && Promise.all(l).then(() => {
|
|
2070
2070
|
Ae.update(() => {
|
|
2071
|
-
s &&
|
|
2071
|
+
s && ps(n, s);
|
|
2072
2072
|
});
|
|
2073
2073
|
}), l;
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2075
|
+
function Qo({ top: n, left: e, right: t, bottom: r }) {
|
|
2076
2076
|
return {
|
|
2077
2077
|
x: { min: e, max: t },
|
|
2078
2078
|
y: { min: n, max: r }
|
|
2079
2079
|
};
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2081
|
+
function $o(n, e) {
|
|
2082
2082
|
if (!e)
|
|
2083
2083
|
return n;
|
|
2084
2084
|
const t = e({ x: n.left, y: n.top }), r = e({ x: n.right, y: n.bottom });
|
|
@@ -2089,10 +2089,10 @@ function Qo(n, e) {
|
|
|
2089
2089
|
right: r.x
|
|
2090
2090
|
};
|
|
2091
2091
|
}
|
|
2092
|
-
function
|
|
2093
|
-
return
|
|
2092
|
+
function Zo(n, e) {
|
|
2093
|
+
return Qo($o(n.getBoundingClientRect(), e));
|
|
2094
2094
|
}
|
|
2095
|
-
const
|
|
2095
|
+
const Zr = {
|
|
2096
2096
|
animation: [
|
|
2097
2097
|
"animate",
|
|
2098
2098
|
"variants",
|
|
@@ -2112,29 +2112,29 @@ const $r = {
|
|
|
2112
2112
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2113
2113
|
layout: ["layout", "layoutId"]
|
|
2114
2114
|
}, $t = {};
|
|
2115
|
-
for (const n in
|
|
2115
|
+
for (const n in Zr)
|
|
2116
2116
|
$t[n] = {
|
|
2117
|
-
isEnabled: (e) =>
|
|
2117
|
+
isEnabled: (e) => Zr[n].some((t) => !!e[t])
|
|
2118
2118
|
};
|
|
2119
|
-
const
|
|
2120
|
-
x:
|
|
2121
|
-
y:
|
|
2122
|
-
}),
|
|
2123
|
-
function
|
|
2124
|
-
if (
|
|
2119
|
+
const Xr = () => ({ min: 0, max: 0 }), bn = () => ({
|
|
2120
|
+
x: Xr(),
|
|
2121
|
+
y: Xr()
|
|
2122
|
+
}), Xo = typeof window != "undefined", Zt = { current: null }, sa = { current: !1 };
|
|
2123
|
+
function Jo() {
|
|
2124
|
+
if (sa.current = !0, !!Xo)
|
|
2125
2125
|
if (window.matchMedia) {
|
|
2126
2126
|
const n = window.matchMedia("(prefers-reduced-motion)"), e = () => Zt.current = n.matches;
|
|
2127
2127
|
n.addListener(e), e();
|
|
2128
2128
|
} else
|
|
2129
2129
|
Zt.current = !1;
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2131
|
+
function el(n) {
|
|
2132
2132
|
return n !== null && typeof n == "object" && typeof n.start == "function";
|
|
2133
2133
|
}
|
|
2134
|
-
function
|
|
2134
|
+
function tl(n) {
|
|
2135
2135
|
return typeof n == "string" || Array.isArray(n);
|
|
2136
2136
|
}
|
|
2137
|
-
const
|
|
2137
|
+
const nl = [
|
|
2138
2138
|
"animate",
|
|
2139
2139
|
"whileInView",
|
|
2140
2140
|
"whileFocus",
|
|
@@ -2142,14 +2142,14 @@ const tl = [
|
|
|
2142
2142
|
"whileTap",
|
|
2143
2143
|
"whileDrag",
|
|
2144
2144
|
"exit"
|
|
2145
|
-
],
|
|
2146
|
-
function
|
|
2147
|
-
return
|
|
2145
|
+
], rl = ["initial", ...nl];
|
|
2146
|
+
function oa(n) {
|
|
2147
|
+
return el(n.animate) || rl.some((e) => tl(n[e]));
|
|
2148
2148
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return !!(
|
|
2149
|
+
function il(n) {
|
|
2150
|
+
return !!(oa(n) || n.variants);
|
|
2151
2151
|
}
|
|
2152
|
-
function
|
|
2152
|
+
function al(n, e, t) {
|
|
2153
2153
|
for (const r in e) {
|
|
2154
2154
|
const i = e[r], a = t[r];
|
|
2155
2155
|
if (he(i))
|
|
@@ -2169,11 +2169,11 @@ function il(n, e, t) {
|
|
|
2169
2169
|
e[r] === void 0 && n.removeValue(r);
|
|
2170
2170
|
return e;
|
|
2171
2171
|
}
|
|
2172
|
-
const
|
|
2172
|
+
const la = (n) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n), ca = (n) => /^0[^.\s]+$/u.test(n), sl = {
|
|
2173
2173
|
test: (n) => n === "auto",
|
|
2174
2174
|
parse: (n) => n
|
|
2175
|
-
},
|
|
2176
|
-
function
|
|
2175
|
+
}, ua = (n) => (e) => e.test(n), da = [Ue, $, ke, we, Ss, Rs, sl], Jr = (n) => da.find(ua(n)), ol = [...da, ue, Be], ll = (n) => ol.find(ua(n)), cl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2176
|
+
function ul(n) {
|
|
2177
2177
|
const [e, t] = n.slice(0, -1).split("(");
|
|
2178
2178
|
if (e === "drop-shadow")
|
|
2179
2179
|
return n;
|
|
@@ -2181,17 +2181,17 @@ function cl(n) {
|
|
|
2181
2181
|
if (!r)
|
|
2182
2182
|
return n;
|
|
2183
2183
|
const i = t.replace(r, "");
|
|
2184
|
-
let a =
|
|
2184
|
+
let a = cl.has(e) ? 1 : 0;
|
|
2185
2185
|
return r !== t && (a *= 100), e + "(" + a + i + ")";
|
|
2186
2186
|
}
|
|
2187
|
-
const
|
|
2187
|
+
const dl = /\b([a-z-]*)\(.*?\)/gu, Xt = te(Q({}, Be), {
|
|
2188
2188
|
getAnimatableNone: (n) => {
|
|
2189
|
-
const e = n.match(
|
|
2190
|
-
return e ? e.map(
|
|
2189
|
+
const e = n.match(dl);
|
|
2190
|
+
return e ? e.map(ul).join(" ") : n;
|
|
2191
2191
|
}
|
|
2192
|
-
}),
|
|
2192
|
+
}), ei = te(Q({}, Ue), {
|
|
2193
2193
|
transform: Math.round
|
|
2194
|
-
}),
|
|
2194
|
+
}), pl = {
|
|
2195
2195
|
rotate: we,
|
|
2196
2196
|
rotateX: we,
|
|
2197
2197
|
rotateY: we,
|
|
@@ -2203,62 +2203,62 @@ const ul = /\b([a-z-]*)\(.*?\)/gu, Xt = te($({}, Be), {
|
|
|
2203
2203
|
skew: we,
|
|
2204
2204
|
skewX: we,
|
|
2205
2205
|
skewY: we,
|
|
2206
|
-
distance:
|
|
2207
|
-
translateX:
|
|
2208
|
-
translateY:
|
|
2209
|
-
translateZ:
|
|
2210
|
-
x:
|
|
2211
|
-
y:
|
|
2212
|
-
z:
|
|
2213
|
-
perspective:
|
|
2214
|
-
transformPerspective:
|
|
2206
|
+
distance: $,
|
|
2207
|
+
translateX: $,
|
|
2208
|
+
translateY: $,
|
|
2209
|
+
translateZ: $,
|
|
2210
|
+
x: $,
|
|
2211
|
+
y: $,
|
|
2212
|
+
z: $,
|
|
2213
|
+
perspective: $,
|
|
2214
|
+
transformPerspective: $,
|
|
2215
2215
|
opacity: st,
|
|
2216
|
-
originX:
|
|
2217
|
-
originY:
|
|
2218
|
-
originZ:
|
|
2219
|
-
}, En = te(
|
|
2216
|
+
originX: Dr,
|
|
2217
|
+
originY: Dr,
|
|
2218
|
+
originZ: $
|
|
2219
|
+
}, En = te(Q({
|
|
2220
2220
|
// Border props
|
|
2221
|
-
borderWidth:
|
|
2222
|
-
borderTopWidth:
|
|
2223
|
-
borderRightWidth:
|
|
2224
|
-
borderBottomWidth:
|
|
2225
|
-
borderLeftWidth:
|
|
2226
|
-
borderRadius:
|
|
2227
|
-
radius:
|
|
2228
|
-
borderTopLeftRadius:
|
|
2229
|
-
borderTopRightRadius:
|
|
2230
|
-
borderBottomRightRadius:
|
|
2231
|
-
borderBottomLeftRadius:
|
|
2221
|
+
borderWidth: $,
|
|
2222
|
+
borderTopWidth: $,
|
|
2223
|
+
borderRightWidth: $,
|
|
2224
|
+
borderBottomWidth: $,
|
|
2225
|
+
borderLeftWidth: $,
|
|
2226
|
+
borderRadius: $,
|
|
2227
|
+
radius: $,
|
|
2228
|
+
borderTopLeftRadius: $,
|
|
2229
|
+
borderTopRightRadius: $,
|
|
2230
|
+
borderBottomRightRadius: $,
|
|
2231
|
+
borderBottomLeftRadius: $,
|
|
2232
2232
|
// Positioning props
|
|
2233
|
-
width:
|
|
2234
|
-
maxWidth:
|
|
2235
|
-
height:
|
|
2236
|
-
maxHeight:
|
|
2237
|
-
top:
|
|
2238
|
-
right:
|
|
2239
|
-
bottom:
|
|
2240
|
-
left:
|
|
2233
|
+
width: $,
|
|
2234
|
+
maxWidth: $,
|
|
2235
|
+
height: $,
|
|
2236
|
+
maxHeight: $,
|
|
2237
|
+
top: $,
|
|
2238
|
+
right: $,
|
|
2239
|
+
bottom: $,
|
|
2240
|
+
left: $,
|
|
2241
2241
|
// Spacing props
|
|
2242
|
-
padding:
|
|
2243
|
-
paddingTop:
|
|
2244
|
-
paddingRight:
|
|
2245
|
-
paddingBottom:
|
|
2246
|
-
paddingLeft:
|
|
2247
|
-
margin:
|
|
2248
|
-
marginTop:
|
|
2249
|
-
marginRight:
|
|
2250
|
-
marginBottom:
|
|
2251
|
-
marginLeft:
|
|
2242
|
+
padding: $,
|
|
2243
|
+
paddingTop: $,
|
|
2244
|
+
paddingRight: $,
|
|
2245
|
+
paddingBottom: $,
|
|
2246
|
+
paddingLeft: $,
|
|
2247
|
+
margin: $,
|
|
2248
|
+
marginTop: $,
|
|
2249
|
+
marginRight: $,
|
|
2250
|
+
marginBottom: $,
|
|
2251
|
+
marginLeft: $,
|
|
2252
2252
|
// Misc
|
|
2253
|
-
backgroundPositionX:
|
|
2254
|
-
backgroundPositionY:
|
|
2255
|
-
},
|
|
2256
|
-
zIndex:
|
|
2253
|
+
backgroundPositionX: $,
|
|
2254
|
+
backgroundPositionY: $
|
|
2255
|
+
}, pl), {
|
|
2256
|
+
zIndex: ei,
|
|
2257
2257
|
// SVG
|
|
2258
2258
|
fillOpacity: st,
|
|
2259
2259
|
strokeOpacity: st,
|
|
2260
|
-
numOctaves:
|
|
2261
|
-
}),
|
|
2260
|
+
numOctaves: ei
|
|
2261
|
+
}), hl = te(Q({}, En), {
|
|
2262
2262
|
// Color props
|
|
2263
2263
|
color: ue,
|
|
2264
2264
|
backgroundColor: ue,
|
|
@@ -2273,12 +2273,12 @@ const ul = /\b([a-z-]*)\(.*?\)/gu, Xt = te($({}, Be), {
|
|
|
2273
2273
|
borderLeftColor: ue,
|
|
2274
2274
|
filter: Xt,
|
|
2275
2275
|
WebkitFilter: Xt
|
|
2276
|
-
}),
|
|
2277
|
-
function
|
|
2278
|
-
let t =
|
|
2276
|
+
}), pa = (n) => hl[n];
|
|
2277
|
+
function ha(n, e) {
|
|
2278
|
+
let t = pa(n);
|
|
2279
2279
|
return t !== Xt && (t = Be), t.getAnimatableNone ? t.getAnimatableNone(e) : void 0;
|
|
2280
2280
|
}
|
|
2281
|
-
const
|
|
2281
|
+
const ti = [
|
|
2282
2282
|
"AnimationStart",
|
|
2283
2283
|
"AnimationComplete",
|
|
2284
2284
|
"Update",
|
|
@@ -2287,7 +2287,7 @@ const ei = [
|
|
|
2287
2287
|
"LayoutAnimationStart",
|
|
2288
2288
|
"LayoutAnimationComplete"
|
|
2289
2289
|
];
|
|
2290
|
-
class
|
|
2290
|
+
class ma {
|
|
2291
2291
|
/**
|
|
2292
2292
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2293
2293
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2306,7 +2306,7 @@ class ha {
|
|
|
2306
2306
|
this.renderScheduledAt < p && (this.renderScheduledAt = p, Ae.render(this.render, !1, !0));
|
|
2307
2307
|
};
|
|
2308
2308
|
const { latestValues: l, renderState: c } = s;
|
|
2309
|
-
this.latestValues = l, this.baseTarget =
|
|
2309
|
+
this.latestValues = l, this.baseTarget = Q({}, l), this.initialValues = t.initial ? Q({}, l) : {}, this.renderState = c, this.parent = e, this.props = t, this.presenceContext = r, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!a, this.isControllingVariants = oa(t), this.isVariantNode = il(t), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
2310
2310
|
const h = this.scrapeMotionValuesFromProps(t, {}, this), { willChange: u } = h, d = ge(h, ["willChange"]);
|
|
2311
2311
|
for (const p in d) {
|
|
2312
2312
|
const m = d[p];
|
|
@@ -2314,7 +2314,7 @@ class ha {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
}
|
|
2316
2316
|
mount(e) {
|
|
2317
|
-
this.current = e, it.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((t, r) => this.bindToMotionValue(r, t)),
|
|
2317
|
+
this.current = e, it.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((t, r) => this.bindToMotionValue(r, t)), sa.current || Jo(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Zt.current, process.env.NODE_ENV !== "production" && Oi(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
2318
2318
|
}
|
|
2319
2319
|
unmount() {
|
|
2320
2320
|
this.projection && this.projection.unmount(), Ft(this.notifyUpdate), Ft(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -2377,13 +2377,13 @@ class ha {
|
|
|
2377
2377
|
*/
|
|
2378
2378
|
update(e, t) {
|
|
2379
2379
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = t;
|
|
2380
|
-
for (let r = 0; r <
|
|
2381
|
-
const i =
|
|
2380
|
+
for (let r = 0; r < ti.length; r++) {
|
|
2381
|
+
const i = ti[r];
|
|
2382
2382
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
2383
2383
|
const a = "on" + i, s = e[a];
|
|
2384
2384
|
s && (this.propEventSubscriptions[i] = this.on(i, s));
|
|
2385
2385
|
}
|
|
2386
|
-
this.prevMotionValues =
|
|
2386
|
+
this.prevMotionValues = al(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2387
2387
|
}
|
|
2388
2388
|
getProps() {
|
|
2389
2389
|
return this.props;
|
|
@@ -2449,7 +2449,7 @@ class ha {
|
|
|
2449
2449
|
readValue(e, t) {
|
|
2450
2450
|
var i;
|
|
2451
2451
|
let r = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (i = this.getBaseTargetFromProps(this.props, e)) != null ? i : this.readValueFromInstance(this.current, e, this.options);
|
|
2452
|
-
return r != null && (typeof r == "string" && (
|
|
2452
|
+
return r != null && (typeof r == "string" && (la(r) || ca(r)) ? r = parseFloat(r) : !ll(r) && Be.test(t) && (r = ha(e, t)), this.setBaseTarget(e, he(r) ? r.get() : r)), he(r) ? r.get() : r;
|
|
2453
2453
|
}
|
|
2454
2454
|
/**
|
|
2455
2455
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2467,7 +2467,7 @@ class ha {
|
|
|
2467
2467
|
const { initial: t } = this.props;
|
|
2468
2468
|
let r;
|
|
2469
2469
|
if (typeof t == "string" || typeof t == "object") {
|
|
2470
|
-
const s =
|
|
2470
|
+
const s = Ii(this.props, t, (a = this.presenceContext) == null ? void 0 : a.custom);
|
|
2471
2471
|
s && (r = s[e]);
|
|
2472
2472
|
}
|
|
2473
2473
|
if (t && r !== void 0)
|
|
@@ -2476,51 +2476,51 @@ class ha {
|
|
|
2476
2476
|
return i !== void 0 && !he(i) ? i : this.initialValues[e] !== void 0 && r === void 0 ? void 0 : this.baseTarget[e];
|
|
2477
2477
|
}
|
|
2478
2478
|
on(e, t) {
|
|
2479
|
-
return this.events[e] || (this.events[e] = new
|
|
2479
|
+
return this.events[e] || (this.events[e] = new Ni()), this.events[e].add(t);
|
|
2480
2480
|
}
|
|
2481
2481
|
notify(e, ...t) {
|
|
2482
2482
|
this.events[e] && this.events[e].notify(...t);
|
|
2483
2483
|
}
|
|
2484
2484
|
}
|
|
2485
|
-
const
|
|
2485
|
+
const ml = (
|
|
2486
2486
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
2487
2487
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
2488
2488
|
);
|
|
2489
|
-
function
|
|
2490
|
-
const e =
|
|
2489
|
+
function fl(n) {
|
|
2490
|
+
const e = ml.exec(n);
|
|
2491
2491
|
if (!e)
|
|
2492
2492
|
return [,];
|
|
2493
2493
|
const [, t, r, i] = e;
|
|
2494
2494
|
return [`--${t != null ? t : r}`, i];
|
|
2495
2495
|
}
|
|
2496
|
-
const
|
|
2497
|
-
function
|
|
2498
|
-
_e(t <=
|
|
2499
|
-
const [r, i] =
|
|
2496
|
+
const vl = 4;
|
|
2497
|
+
function fa(n, e, t = 1) {
|
|
2498
|
+
_e(t <= vl, `Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);
|
|
2499
|
+
const [r, i] = fl(n);
|
|
2500
2500
|
if (!r)
|
|
2501
2501
|
return;
|
|
2502
2502
|
const a = window.getComputedStyle(e).getPropertyValue(r);
|
|
2503
2503
|
if (a) {
|
|
2504
2504
|
const s = a.trim();
|
|
2505
|
-
return
|
|
2505
|
+
return la(s) ? parseFloat(s) : s;
|
|
2506
2506
|
}
|
|
2507
|
-
return on(i) ?
|
|
2507
|
+
return on(i) ? fa(i, e, t + 1) : i;
|
|
2508
2508
|
}
|
|
2509
|
-
function
|
|
2510
|
-
return typeof n == "number" ? n === 0 : n !== null ? n === "none" || n === "0" ||
|
|
2509
|
+
function gl(n) {
|
|
2510
|
+
return typeof n == "number" ? n === 0 : n !== null ? n === "none" || n === "0" || ca(n) : !0;
|
|
2511
2511
|
}
|
|
2512
|
-
const
|
|
2513
|
-
function
|
|
2512
|
+
const yl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
2513
|
+
function bl(n, e, t) {
|
|
2514
2514
|
let r = 0, i;
|
|
2515
2515
|
for (; r < n.length && !i; ) {
|
|
2516
2516
|
const a = n[r];
|
|
2517
|
-
typeof a == "string" && !
|
|
2517
|
+
typeof a == "string" && !yl.has(a) && ot(a).values.length && (i = n[r]), r++;
|
|
2518
2518
|
}
|
|
2519
2519
|
if (i && t)
|
|
2520
2520
|
for (const a of e)
|
|
2521
|
-
n[a] =
|
|
2521
|
+
n[a] = ha(t, i);
|
|
2522
2522
|
}
|
|
2523
|
-
class
|
|
2523
|
+
class El extends gn {
|
|
2524
2524
|
constructor(e, t, r, i, a) {
|
|
2525
2525
|
super(e, t, r, i, a, !0);
|
|
2526
2526
|
}
|
|
@@ -2532,15 +2532,15 @@ class bl extends gn {
|
|
|
2532
2532
|
for (let l = 0; l < e.length; l++) {
|
|
2533
2533
|
let c = e[l];
|
|
2534
2534
|
if (typeof c == "string" && (c = c.trim(), on(c))) {
|
|
2535
|
-
const u =
|
|
2535
|
+
const u = fa(c, t.current);
|
|
2536
2536
|
u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
|
|
2537
2537
|
}
|
|
2538
2538
|
}
|
|
2539
|
-
if (this.resolveNoneKeyframes(), !
|
|
2539
|
+
if (this.resolveNoneKeyframes(), !aa.has(r) || e.length !== 2)
|
|
2540
2540
|
return;
|
|
2541
|
-
const [i, a] = e, s =
|
|
2541
|
+
const [i, a] = e, s = Jr(i), o = Jr(a);
|
|
2542
2542
|
if (s !== o)
|
|
2543
|
-
if (
|
|
2543
|
+
if (Gr(s) && Gr(o))
|
|
2544
2544
|
for (let l = 0; l < e.length; l++) {
|
|
2545
2545
|
const c = e[l];
|
|
2546
2546
|
typeof c == "string" && (e[l] = parseFloat(c));
|
|
@@ -2550,8 +2550,8 @@ class bl extends gn {
|
|
|
2550
2550
|
resolveNoneKeyframes() {
|
|
2551
2551
|
const { unresolvedKeyframes: e, name: t } = this, r = [];
|
|
2552
2552
|
for (let i = 0; i < e.length; i++)
|
|
2553
|
-
(e[i] === null ||
|
|
2554
|
-
r.length &&
|
|
2553
|
+
(e[i] === null || gl(e[i])) && r.push(i);
|
|
2554
|
+
r.length && bl(e, r, t);
|
|
2555
2555
|
}
|
|
2556
2556
|
measureInitialState() {
|
|
2557
2557
|
const { element: e, unresolvedKeyframes: t, name: r } = this;
|
|
@@ -2574,9 +2574,9 @@ class bl extends gn {
|
|
|
2574
2574
|
}), this.resolveNoneKeyframes();
|
|
2575
2575
|
}
|
|
2576
2576
|
}
|
|
2577
|
-
class
|
|
2577
|
+
class va extends ma {
|
|
2578
2578
|
constructor() {
|
|
2579
|
-
super(...arguments), this.KeyframeResolver =
|
|
2579
|
+
super(...arguments), this.KeyframeResolver = El;
|
|
2580
2580
|
}
|
|
2581
2581
|
sortInstanceNodePosition(e, t) {
|
|
2582
2582
|
return e.compareDocumentPosition(t) & 2 ? 1 : -1;
|
|
@@ -2595,24 +2595,24 @@ class fa extends ha {
|
|
|
2595
2595
|
}));
|
|
2596
2596
|
}
|
|
2597
2597
|
}
|
|
2598
|
-
const
|
|
2598
|
+
const ga = (n, e) => e && typeof n == "number" ? e.transform(n) : n, _l = {
|
|
2599
2599
|
x: "translateX",
|
|
2600
2600
|
y: "translateY",
|
|
2601
2601
|
z: "translateZ",
|
|
2602
2602
|
transformPerspective: "perspective"
|
|
2603
|
-
},
|
|
2604
|
-
function
|
|
2603
|
+
}, Cl = Ve.length;
|
|
2604
|
+
function Al(n, e, t) {
|
|
2605
2605
|
let r = "", i = !0;
|
|
2606
|
-
for (let a = 0; a <
|
|
2606
|
+
for (let a = 0; a < Cl; a++) {
|
|
2607
2607
|
const s = Ve[a], o = n[s];
|
|
2608
2608
|
if (o === void 0)
|
|
2609
2609
|
continue;
|
|
2610
2610
|
let l = !0;
|
|
2611
2611
|
if (typeof o == "number" ? l = o === (s.startsWith("scale") ? 1 : 0) : l = parseFloat(o) === 0, !l || t) {
|
|
2612
|
-
const c =
|
|
2612
|
+
const c = ga(o, En[s]);
|
|
2613
2613
|
if (!l) {
|
|
2614
2614
|
i = !1;
|
|
2615
|
-
const u =
|
|
2615
|
+
const u = _l[s] || s;
|
|
2616
2616
|
r += `${u}(${c}) `;
|
|
2617
2617
|
}
|
|
2618
2618
|
t && (e[s] = c);
|
|
@@ -2620,7 +2620,7 @@ function Cl(n, e, t) {
|
|
|
2620
2620
|
}
|
|
2621
2621
|
return r = r.trim(), t ? r = t(e, i ? "" : r) : i && (r = "none"), r;
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2623
|
+
function ya(n, e, t) {
|
|
2624
2624
|
const { style: r, vars: i, transformOrigin: a } = n;
|
|
2625
2625
|
let s = !1, o = !1;
|
|
2626
2626
|
for (const l in e) {
|
|
@@ -2628,70 +2628,70 @@ function ga(n, e, t) {
|
|
|
2628
2628
|
if (Fe.has(l)) {
|
|
2629
2629
|
s = !0;
|
|
2630
2630
|
continue;
|
|
2631
|
-
} else if (
|
|
2631
|
+
} else if (Ri(l)) {
|
|
2632
2632
|
i[l] = c;
|
|
2633
2633
|
continue;
|
|
2634
2634
|
} else {
|
|
2635
|
-
const u =
|
|
2635
|
+
const u = ga(c, En[l]);
|
|
2636
2636
|
l.startsWith("origin") ? (o = !0, a[l] = u) : r[l] = u;
|
|
2637
2637
|
}
|
|
2638
2638
|
}
|
|
2639
|
-
if (e.transform || (s || t ? r.transform =
|
|
2639
|
+
if (e.transform || (s || t ? r.transform = Al(e, n.transform, t) : r.transform && (r.transform = "none")), o) {
|
|
2640
2640
|
const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = a;
|
|
2641
2641
|
r.transformOrigin = `${l} ${c} ${u}`;
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
|
-
function
|
|
2644
|
+
function ba(n, { style: e, vars: t }, r, i) {
|
|
2645
2645
|
Object.assign(n.style, e, i && i.getProjectionStyles(r));
|
|
2646
2646
|
for (const a in t)
|
|
2647
2647
|
n.style.setProperty(a, t[a]);
|
|
2648
2648
|
}
|
|
2649
|
-
const
|
|
2650
|
-
function
|
|
2651
|
-
return Fe.has(n) || n.startsWith("origin") || (e || t !== void 0) && (!!
|
|
2649
|
+
const wl = {};
|
|
2650
|
+
function Tl(n, { layout: e, layoutId: t }) {
|
|
2651
|
+
return Fe.has(n) || n.startsWith("origin") || (e || t !== void 0) && (!!wl[n] || n === "opacity");
|
|
2652
2652
|
}
|
|
2653
|
-
function
|
|
2653
|
+
function Ea(n, e, t) {
|
|
2654
2654
|
var a;
|
|
2655
2655
|
const { style: r } = n, i = {};
|
|
2656
2656
|
for (const s in r)
|
|
2657
|
-
(he(r[s]) || e.style && he(e.style[s]) ||
|
|
2657
|
+
(he(r[s]) || e.style && he(e.style[s]) || Tl(s, n) || ((a = t == null ? void 0 : t.getValue(s)) == null ? void 0 : a.liveStyle) !== void 0) && (i[s] = r[s]);
|
|
2658
2658
|
return i;
|
|
2659
2659
|
}
|
|
2660
|
-
function
|
|
2660
|
+
function Il(n) {
|
|
2661
2661
|
return window.getComputedStyle(n);
|
|
2662
2662
|
}
|
|
2663
|
-
class
|
|
2663
|
+
class Ol extends va {
|
|
2664
2664
|
constructor() {
|
|
2665
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
2665
|
+
super(...arguments), this.type = "html", this.renderInstance = ba;
|
|
2666
2666
|
}
|
|
2667
2667
|
readValueFromInstance(e, t) {
|
|
2668
2668
|
var r;
|
|
2669
2669
|
if (Fe.has(t))
|
|
2670
|
-
return (r = this.projection) != null && r.isProjecting ? Ht(t) :
|
|
2670
|
+
return (r = this.projection) != null && r.isProjecting ? Ht(t) : Co(e, t);
|
|
2671
2671
|
{
|
|
2672
|
-
const i =
|
|
2672
|
+
const i = Il(e), a = (Ri(t) ? i.getPropertyValue(t) : i[t]) || 0;
|
|
2673
2673
|
return typeof a == "string" ? a.trim() : a;
|
|
2674
2674
|
}
|
|
2675
2675
|
}
|
|
2676
2676
|
measureInstanceViewportBox(e, { transformPagePoint: t }) {
|
|
2677
|
-
return
|
|
2677
|
+
return Zo(e, t);
|
|
2678
2678
|
}
|
|
2679
2679
|
build(e, t, r) {
|
|
2680
|
-
|
|
2680
|
+
ya(e, t, r.transformTemplate);
|
|
2681
2681
|
}
|
|
2682
2682
|
scrapeMotionValuesFromProps(e, t, r) {
|
|
2683
|
-
return
|
|
2683
|
+
return Ea(e, t, r);
|
|
2684
2684
|
}
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2686
|
+
function Nl(n, e) {
|
|
2687
2687
|
return n in e;
|
|
2688
2688
|
}
|
|
2689
|
-
class
|
|
2689
|
+
class xl extends ma {
|
|
2690
2690
|
constructor() {
|
|
2691
2691
|
super(...arguments), this.type = "object";
|
|
2692
2692
|
}
|
|
2693
2693
|
readValueFromInstance(e, t) {
|
|
2694
|
-
if (
|
|
2694
|
+
if (Nl(t, e)) {
|
|
2695
2695
|
const r = e[t];
|
|
2696
2696
|
if (typeof r == "string" || typeof r == "number")
|
|
2697
2697
|
return r;
|
|
@@ -2715,21 +2715,21 @@ class Nl extends ha {
|
|
|
2715
2715
|
return 0;
|
|
2716
2716
|
}
|
|
2717
2717
|
}
|
|
2718
|
-
const
|
|
2718
|
+
const Ll = {
|
|
2719
2719
|
offset: "stroke-dashoffset",
|
|
2720
2720
|
array: "stroke-dasharray"
|
|
2721
|
-
},
|
|
2721
|
+
}, Pl = {
|
|
2722
2722
|
offset: "strokeDashoffset",
|
|
2723
2723
|
array: "strokeDasharray"
|
|
2724
2724
|
};
|
|
2725
|
-
function
|
|
2725
|
+
function Rl(n, e, t = 1, r = 0, i = !0) {
|
|
2726
2726
|
n.pathLength = 1;
|
|
2727
|
-
const a = i ?
|
|
2728
|
-
n[a.offset] =
|
|
2729
|
-
const s =
|
|
2727
|
+
const a = i ? Ll : Pl;
|
|
2728
|
+
n[a.offset] = $.transform(-r);
|
|
2729
|
+
const s = $.transform(e), o = $.transform(t);
|
|
2730
2730
|
n[a.array] = `${s} ${o}`;
|
|
2731
2731
|
}
|
|
2732
|
-
function
|
|
2732
|
+
function Sl(n, d, l, c, u) {
|
|
2733
2733
|
var h = d, {
|
|
2734
2734
|
attrX: e,
|
|
2735
2735
|
attrY: t,
|
|
@@ -2746,15 +2746,15 @@ function Rl(n, d, l, c, u) {
|
|
|
2746
2746
|
"pathOffset"
|
|
2747
2747
|
]);
|
|
2748
2748
|
var f, v;
|
|
2749
|
-
if (
|
|
2749
|
+
if (ya(n, o, c), l) {
|
|
2750
2750
|
n.style.viewBox && (n.attrs.viewBox = n.style.viewBox);
|
|
2751
2751
|
return;
|
|
2752
2752
|
}
|
|
2753
2753
|
n.attrs = n.style, n.style = {};
|
|
2754
2754
|
const { attrs: p, style: m } = n;
|
|
2755
|
-
p.transform && (m.transform = p.transform, delete p.transform), (m.transform || p.transformOrigin) && (m.transformOrigin = (f = p.transformOrigin) != null ? f : "50% 50%", delete p.transformOrigin), m.transform && (m.transformBox = (v = u == null ? void 0 : u.transformBox) != null ? v : "fill-box", delete p.transformBox), e !== void 0 && (p.x = e), t !== void 0 && (p.y = t), r !== void 0 && (p.scale = r), i !== void 0 &&
|
|
2755
|
+
p.transform && (m.transform = p.transform, delete p.transform), (m.transform || p.transformOrigin) && (m.transformOrigin = (f = p.transformOrigin) != null ? f : "50% 50%", delete p.transformOrigin), m.transform && (m.transformBox = (v = u == null ? void 0 : u.transformBox) != null ? v : "fill-box", delete p.transformBox), e !== void 0 && (p.x = e), t !== void 0 && (p.y = t), r !== void 0 && (p.scale = r), i !== void 0 && Rl(p, i, a, s, !1);
|
|
2756
2756
|
}
|
|
2757
|
-
const
|
|
2757
|
+
const _a = /* @__PURE__ */ new Set([
|
|
2758
2758
|
"baseFrequency",
|
|
2759
2759
|
"diffuseConstant",
|
|
2760
2760
|
"kernelMatrix",
|
|
@@ -2778,14 +2778,14 @@ const Ea = /* @__PURE__ */ new Set([
|
|
|
2778
2778
|
"startOffset",
|
|
2779
2779
|
"textLength",
|
|
2780
2780
|
"lengthAdjust"
|
|
2781
|
-
]),
|
|
2782
|
-
function
|
|
2783
|
-
|
|
2781
|
+
]), kl = (n) => typeof n == "string" && n.toLowerCase() === "svg";
|
|
2782
|
+
function Ml(n, e, t, r) {
|
|
2783
|
+
ba(n, e, void 0, r);
|
|
2784
2784
|
for (const i in e.attrs)
|
|
2785
|
-
n.setAttribute(
|
|
2785
|
+
n.setAttribute(_a.has(i) ? i : sn(i), e.attrs[i]);
|
|
2786
2786
|
}
|
|
2787
|
-
function
|
|
2788
|
-
const r =
|
|
2787
|
+
function Dl(n, e, t) {
|
|
2788
|
+
const r = Ea(n, e, t);
|
|
2789
2789
|
for (const i in n)
|
|
2790
2790
|
if (he(n[i]) || he(e[i])) {
|
|
2791
2791
|
const a = Ve.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
@@ -2793,7 +2793,7 @@ function Ml(n, e, t) {
|
|
|
2793
2793
|
}
|
|
2794
2794
|
return r;
|
|
2795
2795
|
}
|
|
2796
|
-
class
|
|
2796
|
+
class Vl extends va {
|
|
2797
2797
|
constructor() {
|
|
2798
2798
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = bn;
|
|
2799
2799
|
}
|
|
@@ -2802,31 +2802,31 @@ class Dl extends fa {
|
|
|
2802
2802
|
}
|
|
2803
2803
|
readValueFromInstance(e, t) {
|
|
2804
2804
|
if (Fe.has(t)) {
|
|
2805
|
-
const r =
|
|
2805
|
+
const r = pa(t);
|
|
2806
2806
|
return r && r.default || 0;
|
|
2807
2807
|
}
|
|
2808
|
-
return t =
|
|
2808
|
+
return t = _a.has(t) ? t : sn(t), e.getAttribute(t);
|
|
2809
2809
|
}
|
|
2810
2810
|
scrapeMotionValuesFromProps(e, t, r) {
|
|
2811
|
-
return
|
|
2811
|
+
return Dl(e, t, r);
|
|
2812
2812
|
}
|
|
2813
2813
|
build(e, t, r) {
|
|
2814
|
-
|
|
2814
|
+
Sl(e, t, this.isSVGTag, r.transformTemplate, r.style);
|
|
2815
2815
|
}
|
|
2816
2816
|
renderInstance(e, t, r, i) {
|
|
2817
|
-
|
|
2817
|
+
Ml(e, t, r, i);
|
|
2818
2818
|
}
|
|
2819
2819
|
mount(e) {
|
|
2820
|
-
this.isSVGTag =
|
|
2820
|
+
this.isSVGTag = kl(e.tagName), super.mount(e);
|
|
2821
2821
|
}
|
|
2822
2822
|
}
|
|
2823
|
-
function
|
|
2824
|
-
return
|
|
2825
|
-
}
|
|
2826
|
-
function Vl(n) {
|
|
2827
|
-
return _a(n) && n.tagName === "svg";
|
|
2823
|
+
function Ca(n) {
|
|
2824
|
+
return ra(n) && "ownerSVGElement" in n;
|
|
2828
2825
|
}
|
|
2829
2826
|
function Fl(n) {
|
|
2827
|
+
return Ca(n) && n.tagName === "svg";
|
|
2828
|
+
}
|
|
2829
|
+
function Ul(n) {
|
|
2830
2830
|
const e = {
|
|
2831
2831
|
presenceContext: null,
|
|
2832
2832
|
props: {},
|
|
@@ -2840,10 +2840,10 @@ function Fl(n) {
|
|
|
2840
2840
|
},
|
|
2841
2841
|
latestValues: {}
|
|
2842
2842
|
}
|
|
2843
|
-
}, t =
|
|
2843
|
+
}, t = Ca(n) && !Fl(n) ? new Vl(e) : new Ol(e);
|
|
2844
2844
|
t.mount(n), it.set(n, t);
|
|
2845
2845
|
}
|
|
2846
|
-
function
|
|
2846
|
+
function Bl(n) {
|
|
2847
2847
|
const e = {
|
|
2848
2848
|
presenceContext: null,
|
|
2849
2849
|
props: {},
|
|
@@ -2853,39 +2853,39 @@ function Ul(n) {
|
|
|
2853
2853
|
},
|
|
2854
2854
|
latestValues: {}
|
|
2855
2855
|
}
|
|
2856
|
-
}, t = new
|
|
2856
|
+
}, t = new xl(e);
|
|
2857
2857
|
t.mount(n), it.set(n, t);
|
|
2858
2858
|
}
|
|
2859
|
-
function
|
|
2859
|
+
function zl(n, e, t) {
|
|
2860
2860
|
const r = he(n) ? n : at(n);
|
|
2861
|
-
return r.start(
|
|
2861
|
+
return r.start(ia("", r, e, t)), r.animation;
|
|
2862
2862
|
}
|
|
2863
|
-
function
|
|
2863
|
+
function jl(n, e) {
|
|
2864
2864
|
return he(n) || typeof n == "number" || typeof n == "string" && !tn(e);
|
|
2865
2865
|
}
|
|
2866
|
-
function
|
|
2866
|
+
function Aa(n, e, t, r) {
|
|
2867
2867
|
const i = [];
|
|
2868
|
-
if (
|
|
2869
|
-
i.push(
|
|
2868
|
+
if (jl(n, e))
|
|
2869
|
+
i.push(zl(n, tn(e) && e.default || e, t && (t.default || t)));
|
|
2870
2870
|
else {
|
|
2871
|
-
const a =
|
|
2871
|
+
const a = bi(n, e, r), s = a.length;
|
|
2872
2872
|
_e(!!s, "No valid elements provided.");
|
|
2873
2873
|
for (let o = 0; o < s; o++) {
|
|
2874
|
-
const l = a[o], c = l instanceof Element ?
|
|
2874
|
+
const l = a[o], c = l instanceof Element ? Ul : Bl;
|
|
2875
2875
|
it.has(l) || c(l);
|
|
2876
|
-
const u = it.get(l), d =
|
|
2877
|
-
"delay" in d && typeof d.delay == "function" && (d.delay = d.delay(o, s)), i.push(...
|
|
2876
|
+
const u = it.get(l), d = Q({}, t);
|
|
2877
|
+
"delay" in d && typeof d.delay == "function" && (d.delay = d.delay(o, s)), i.push(...Yo(u, te(Q({}, e), { transition: d }), {}));
|
|
2878
2878
|
}
|
|
2879
2879
|
}
|
|
2880
2880
|
return i;
|
|
2881
2881
|
}
|
|
2882
|
-
function
|
|
2882
|
+
function Kl(n, e, t) {
|
|
2883
2883
|
const r = [];
|
|
2884
|
-
return
|
|
2885
|
-
r.push(...
|
|
2884
|
+
return Za(n, e, t, { spring: lt }).forEach(({ keyframes: a, transition: s }, o) => {
|
|
2885
|
+
r.push(...Aa(o, a, s));
|
|
2886
2886
|
}), r;
|
|
2887
2887
|
}
|
|
2888
|
-
class
|
|
2888
|
+
class ql {
|
|
2889
2889
|
constructor(e) {
|
|
2890
2890
|
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
2891
2891
|
}
|
|
@@ -2950,34 +2950,34 @@ class Kl {
|
|
|
2950
2950
|
this.runAll("complete");
|
|
2951
2951
|
}
|
|
2952
2952
|
}
|
|
2953
|
-
class
|
|
2953
|
+
class Hl extends ql {
|
|
2954
2954
|
then(e, t) {
|
|
2955
2955
|
return this.finished.finally(e).then(() => {
|
|
2956
2956
|
});
|
|
2957
2957
|
}
|
|
2958
2958
|
}
|
|
2959
|
-
function
|
|
2959
|
+
function Wl(n) {
|
|
2960
2960
|
return Array.isArray(n) && n.some(Array.isArray);
|
|
2961
2961
|
}
|
|
2962
|
-
function
|
|
2962
|
+
function Gl(n) {
|
|
2963
2963
|
function e(t, r, i) {
|
|
2964
2964
|
let a = [];
|
|
2965
|
-
return
|
|
2965
|
+
return Wl(t) ? a = Kl(t, r, n) : a = Aa(t, r, i, n), new Hl(a);
|
|
2966
2966
|
}
|
|
2967
2967
|
return e;
|
|
2968
2968
|
}
|
|
2969
|
-
const se =
|
|
2970
|
-
spinner:
|
|
2971
|
-
spinnerContainer:
|
|
2972
|
-
success:
|
|
2973
|
-
successContainer:
|
|
2974
|
-
container:
|
|
2975
|
-
card:
|
|
2976
|
-
warning:
|
|
2977
|
-
svg:
|
|
2978
|
-
srOnly:
|
|
2969
|
+
const se = Gl(), Yl = "_spinner_1waxg_1", Ql = "_spinnerContainer_1waxg_5", $l = "_success_1waxg_9", Zl = "_successContainer_1waxg_13", Xl = "_container_1waxg_17", Jl = "_card_1waxg_26", ec = "_warning_1waxg_35", tc = "_svg_1waxg_43", nc = "_srOnly_1waxg_48", Z = {
|
|
2970
|
+
spinner: Yl,
|
|
2971
|
+
spinnerContainer: Ql,
|
|
2972
|
+
success: $l,
|
|
2973
|
+
successContainer: Zl,
|
|
2974
|
+
container: Xl,
|
|
2975
|
+
card: Jl,
|
|
2976
|
+
warning: ec,
|
|
2977
|
+
svg: tc,
|
|
2978
|
+
srOnly: nc
|
|
2979
2979
|
};
|
|
2980
|
-
class
|
|
2980
|
+
class wa {
|
|
2981
2981
|
constructor() {
|
|
2982
2982
|
b(this, "template", `
|
|
2983
2983
|
<svg aria-hidden="true" class="${Z.spinner}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -2999,34 +2999,34 @@ class Aa {
|
|
|
2999
2999
|
return this.spinner;
|
|
3000
3000
|
}
|
|
3001
3001
|
}
|
|
3002
|
-
const
|
|
3003
|
-
loader:
|
|
3002
|
+
const rc = "_loader_nwq3e_1", ni = {
|
|
3003
|
+
loader: rc
|
|
3004
3004
|
};
|
|
3005
|
-
class
|
|
3005
|
+
class ic {
|
|
3006
3006
|
constructor() {
|
|
3007
3007
|
b(this, "loader");
|
|
3008
|
-
this.loader = document.createElement("div"), this.loader.classList.add(
|
|
3008
|
+
this.loader = document.createElement("div"), this.loader.classList.add(ni.loader), this.loader.appendChild(new wa().render());
|
|
3009
3009
|
}
|
|
3010
3010
|
setClassName(e) {
|
|
3011
|
-
e ? this.loader.classList.add(e) : this.loader.className =
|
|
3011
|
+
e ? this.loader.classList.add(e) : this.loader.className = ni.loader;
|
|
3012
3012
|
}
|
|
3013
3013
|
render() {
|
|
3014
3014
|
return this.loader;
|
|
3015
3015
|
}
|
|
3016
3016
|
}
|
|
3017
|
-
const
|
|
3018
|
-
checkout:
|
|
3019
|
-
hidden:
|
|
3020
|
-
formInitial:
|
|
3021
|
-
btnsInitial:
|
|
3022
|
-
},
|
|
3023
|
-
buttons:
|
|
3024
|
-
hidden:
|
|
3025
|
-
},
|
|
3026
|
-
applePay:
|
|
3027
|
-
hidden:
|
|
3017
|
+
const ac = "_checkout_5sq3n_1", sc = "_hidden_5sq3n_7", oc = "_formInitial_5sq3n_11", lc = "_btnsInitial_5sq3n_16", le = {
|
|
3018
|
+
checkout: ac,
|
|
3019
|
+
hidden: sc,
|
|
3020
|
+
formInitial: oc,
|
|
3021
|
+
btnsInitial: lc
|
|
3022
|
+
}, cc = "_buttons_1i8cu_1", uc = "_hidden_1i8cu_5", Lt = {
|
|
3023
|
+
buttons: cc,
|
|
3024
|
+
hidden: uc
|
|
3025
|
+
}, dc = "_applePay_1m9xd_1", pc = "_hidden_1m9xd_22", Pt = {
|
|
3026
|
+
applePay: dc,
|
|
3027
|
+
hidden: pc
|
|
3028
3028
|
};
|
|
3029
|
-
class
|
|
3029
|
+
class hc {
|
|
3030
3030
|
constructor(e) {
|
|
3031
3031
|
b(this, "element");
|
|
3032
3032
|
b(this, "events", {
|
|
@@ -3046,7 +3046,7 @@ class pc {
|
|
|
3046
3046
|
return this.element;
|
|
3047
3047
|
}
|
|
3048
3048
|
}
|
|
3049
|
-
const
|
|
3049
|
+
const mc = [
|
|
3050
3050
|
{ type: "paypal", is_active: !0, order: 1 },
|
|
3051
3051
|
{ type: "apple-pay", is_active: !0, order: 2 },
|
|
3052
3052
|
{ type: "google-pay", is_active: !0, order: 3 },
|
|
@@ -3068,13 +3068,13 @@ const hc = [
|
|
|
3068
3068
|
close: { y: -15, opacity: 0, height: 0 },
|
|
3069
3069
|
transition: { duration: 0.5, type: "spring", bounce: 0 }
|
|
3070
3070
|
};
|
|
3071
|
-
function
|
|
3071
|
+
function Ta(n) {
|
|
3072
3072
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
3073
3073
|
}
|
|
3074
|
-
var Rt,
|
|
3075
|
-
function
|
|
3076
|
-
if (
|
|
3077
|
-
|
|
3074
|
+
var Rt, ri;
|
|
3075
|
+
function fc() {
|
|
3076
|
+
if (ri) return Rt;
|
|
3077
|
+
ri = 1;
|
|
3078
3078
|
var n = {
|
|
3079
3079
|
visa: {
|
|
3080
3080
|
niceType: "Visa",
|
|
@@ -3269,19 +3269,19 @@ function mc() {
|
|
|
3269
3269
|
};
|
|
3270
3270
|
return Rt = n, Rt;
|
|
3271
3271
|
}
|
|
3272
|
-
var $e = {}, Ze = {},
|
|
3273
|
-
function
|
|
3274
|
-
if (
|
|
3275
|
-
|
|
3272
|
+
var $e = {}, Ze = {}, ii;
|
|
3273
|
+
function Ia() {
|
|
3274
|
+
if (ii) return Ze;
|
|
3275
|
+
ii = 1, Object.defineProperty(Ze, "__esModule", { value: !0 }), Ze.clone = void 0;
|
|
3276
3276
|
function n(e) {
|
|
3277
3277
|
return e ? JSON.parse(JSON.stringify(e)) : null;
|
|
3278
3278
|
}
|
|
3279
3279
|
return Ze.clone = n, Ze;
|
|
3280
3280
|
}
|
|
3281
|
-
var Xe = {},
|
|
3282
|
-
function
|
|
3283
|
-
if (
|
|
3284
|
-
|
|
3281
|
+
var Xe = {}, ai;
|
|
3282
|
+
function vc() {
|
|
3283
|
+
if (ai) return Xe;
|
|
3284
|
+
ai = 1, Object.defineProperty(Xe, "__esModule", { value: !0 }), Xe.matches = void 0;
|
|
3285
3285
|
function n(r, i, a) {
|
|
3286
3286
|
var s = String(i).length, o = r.substr(0, s), l = parseInt(o, 10);
|
|
3287
3287
|
return i = parseInt(String(i).substr(0, o.length), 10), a = parseInt(String(a).substr(0, o.length), 10), l >= i && l <= a;
|
|
@@ -3294,11 +3294,11 @@ function fc() {
|
|
|
3294
3294
|
}
|
|
3295
3295
|
return Xe.matches = t, Xe;
|
|
3296
3296
|
}
|
|
3297
|
-
var
|
|
3298
|
-
function
|
|
3299
|
-
if (
|
|
3300
|
-
|
|
3301
|
-
var n =
|
|
3297
|
+
var si;
|
|
3298
|
+
function gc() {
|
|
3299
|
+
if (si) return $e;
|
|
3300
|
+
si = 1, Object.defineProperty($e, "__esModule", { value: !0 }), $e.addMatchingCardsToResults = void 0;
|
|
3301
|
+
var n = Ia(), e = vc();
|
|
3302
3302
|
function t(r, i, a) {
|
|
3303
3303
|
var s, o;
|
|
3304
3304
|
for (s = 0; s < i.patterns.length; s++) {
|
|
@@ -3312,19 +3312,19 @@ function vc() {
|
|
|
3312
3312
|
}
|
|
3313
3313
|
return $e.addMatchingCardsToResults = t, $e;
|
|
3314
3314
|
}
|
|
3315
|
-
var Je = {},
|
|
3316
|
-
function
|
|
3317
|
-
if (
|
|
3318
|
-
|
|
3315
|
+
var Je = {}, oi;
|
|
3316
|
+
function yc() {
|
|
3317
|
+
if (oi) return Je;
|
|
3318
|
+
oi = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.isValidInputType = void 0;
|
|
3319
3319
|
function n(e) {
|
|
3320
3320
|
return typeof e == "string" || e instanceof String;
|
|
3321
3321
|
}
|
|
3322
3322
|
return Je.isValidInputType = n, Je;
|
|
3323
3323
|
}
|
|
3324
|
-
var et = {},
|
|
3325
|
-
function
|
|
3326
|
-
if (
|
|
3327
|
-
|
|
3324
|
+
var et = {}, li;
|
|
3325
|
+
function bc() {
|
|
3326
|
+
if (li) return et;
|
|
3327
|
+
li = 1, Object.defineProperty(et, "__esModule", { value: !0 }), et.findBestMatch = void 0;
|
|
3328
3328
|
function n(t) {
|
|
3329
3329
|
var r = t.filter(function(i) {
|
|
3330
3330
|
return i.matchStrength;
|
|
@@ -3338,10 +3338,10 @@ function yc() {
|
|
|
3338
3338
|
}
|
|
3339
3339
|
return et.findBestMatch = e, et;
|
|
3340
3340
|
}
|
|
3341
|
-
var tt,
|
|
3342
|
-
function
|
|
3343
|
-
if (
|
|
3344
|
-
|
|
3341
|
+
var tt, ci;
|
|
3342
|
+
function Ec() {
|
|
3343
|
+
if (ci) return tt;
|
|
3344
|
+
ci = 1;
|
|
3345
3345
|
var n = tt && tt.__assign || function() {
|
|
3346
3346
|
return n = Object.assign || function(m) {
|
|
3347
3347
|
for (var f, v = 1, y = arguments.length; v < y; v++) {
|
|
@@ -3350,7 +3350,7 @@ function bc() {
|
|
|
3350
3350
|
}
|
|
3351
3351
|
return m;
|
|
3352
3352
|
}, n.apply(this, arguments);
|
|
3353
|
-
}, e =
|
|
3353
|
+
}, e = fc(), t = gc(), r = yc(), i = bc(), a = Ia(), s = {}, o = {
|
|
3354
3354
|
VISA: "visa",
|
|
3355
3355
|
MASTERCARD: "mastercard",
|
|
3356
3356
|
AMERICAN_EXPRESS: "american-express",
|
|
@@ -3428,24 +3428,24 @@ function bc() {
|
|
|
3428
3428
|
c = (0, a.clone)(l), s = {};
|
|
3429
3429
|
}, p.types = o, tt = p, tt;
|
|
3430
3430
|
}
|
|
3431
|
-
var Me =
|
|
3431
|
+
var Me = Ec();
|
|
3432
3432
|
Me.updateCard("visa", {
|
|
3433
3433
|
lengths: [16]
|
|
3434
3434
|
});
|
|
3435
3435
|
Me.updateCard("unionpay", {
|
|
3436
3436
|
gaps: [4, 8, 12, 16]
|
|
3437
3437
|
});
|
|
3438
|
-
const
|
|
3438
|
+
const _c = (n, e) => {
|
|
3439
3439
|
const t = Me.getTypeInfo(e), r = n.replace(/\D/g, ""), i = (t == null ? void 0 : t.gaps) || [4, 8, 12], a = t ? Math.max(...t.lengths) + i.length : 19, s = [0].concat(i, r.length), o = [];
|
|
3440
3440
|
for (let l = 0; s[l] < r.length; l++) {
|
|
3441
3441
|
const c = s[l], u = Math.min(s[l + 1], r.length);
|
|
3442
3442
|
o.push(r.slice(c, u));
|
|
3443
3443
|
}
|
|
3444
3444
|
return o.join(" ").slice(0, a);
|
|
3445
|
-
},
|
|
3445
|
+
}, Cc = (n, e) => {
|
|
3446
3446
|
const t = Me.getTypeInfo(e), r = (t == null ? void 0 : t.code.size) || 4;
|
|
3447
3447
|
return n.replace(/\D/g, "").slice(0, r);
|
|
3448
|
-
},
|
|
3448
|
+
}, Ac = (n, e) => {
|
|
3449
3449
|
const t = n.replace(/\D/g, "");
|
|
3450
3450
|
let r = t.slice(0, 2);
|
|
3451
3451
|
if (!r) return "";
|
|
@@ -3509,20 +3509,20 @@ const wt = [
|
|
|
3509
3509
|
minLength: 12,
|
|
3510
3510
|
maxLength: 19
|
|
3511
3511
|
}
|
|
3512
|
-
],
|
|
3512
|
+
], Oa = (n) => wt.find((e) => e.pattern.test(n)) || null, ui = (n) => wt.filter((e) => e.pattern.test(n)), wc = (n) => {
|
|
3513
3513
|
let e = 0, t = !1;
|
|
3514
3514
|
for (let r = n.length - 1; r >= 0; r--) {
|
|
3515
3515
|
let i = parseInt(n[r]);
|
|
3516
3516
|
t && (i *= 2, i > 9 && (i -= 9)), e += i, t = !t;
|
|
3517
3517
|
}
|
|
3518
3518
|
return e % 10 === 0;
|
|
3519
|
-
},
|
|
3519
|
+
}, di = (n, e) => {
|
|
3520
3520
|
const t = n.replace(/\D/g, "");
|
|
3521
3521
|
if (!t)
|
|
3522
3522
|
return { isValid: !1, cardType: null, error: oe.Empty };
|
|
3523
3523
|
if (!/^\d+$/.test(t))
|
|
3524
3524
|
return { isValid: !1, cardType: null, error: oe.Invalid };
|
|
3525
|
-
const r =
|
|
3525
|
+
const r = Oa(t);
|
|
3526
3526
|
if (r) {
|
|
3527
3527
|
if (t.length < r.minLength || t.length > r.maxLength)
|
|
3528
3528
|
return {
|
|
@@ -3540,7 +3540,7 @@ const wt = [
|
|
|
3540
3540
|
isValid: !1,
|
|
3541
3541
|
cardType: r.name,
|
|
3542
3542
|
error: "unsupported"
|
|
3543
|
-
} :
|
|
3543
|
+
} : wc(t) ? {
|
|
3544
3544
|
isValid: !0,
|
|
3545
3545
|
cardType: (r == null ? void 0 : r.name) || null,
|
|
3546
3546
|
error: null
|
|
@@ -3549,7 +3549,7 @@ const wt = [
|
|
|
3549
3549
|
cardType: (r == null ? void 0 : r.name) || null,
|
|
3550
3550
|
error: oe.Invalid
|
|
3551
3551
|
};
|
|
3552
|
-
},
|
|
3552
|
+
}, Tc = (n) => {
|
|
3553
3553
|
var e;
|
|
3554
3554
|
return !n || typeof n.amount != "number" || !n.currency || !n.country || !n.merchant_id || n.checkout_config && !((e = n.checkout_config) == null ? void 0 : e.find(
|
|
3555
3555
|
({ is_active: r, type: i }) => r && i === "google-pay"
|
|
@@ -3560,7 +3560,7 @@ const wt = [
|
|
|
3560
3560
|
merchantId: n.merchant_id,
|
|
3561
3561
|
lineItems: []
|
|
3562
3562
|
};
|
|
3563
|
-
},
|
|
3563
|
+
}, Ic = (n) => {
|
|
3564
3564
|
var e, t;
|
|
3565
3565
|
return !n || typeof n.amount != "number" || !n.currency || !n.country || !n.merchant_id || n.checkout_config && !((e = n.checkout_config) == null ? void 0 : e.find(
|
|
3566
3566
|
({ is_active: i, type: a }) => i && a === "apple-pay"
|
|
@@ -3571,7 +3571,7 @@ const wt = [
|
|
|
3571
3571
|
merchantId: n.merchant_id,
|
|
3572
3572
|
lineItems: ((t = n.apple_pay_info) == null ? void 0 : t.line_items) || []
|
|
3573
3573
|
};
|
|
3574
|
-
},
|
|
3574
|
+
}, Oc = (n = []) => n.reduce((e, t) => {
|
|
3575
3575
|
switch (t) {
|
|
3576
3576
|
case pe.Visa:
|
|
3577
3577
|
return e.push("visa"), e;
|
|
@@ -3588,11 +3588,11 @@ const wt = [
|
|
|
3588
3588
|
default:
|
|
3589
3589
|
return e;
|
|
3590
3590
|
}
|
|
3591
|
-
}, []),
|
|
3592
|
-
googlePay:
|
|
3593
|
-
hidden:
|
|
3591
|
+
}, []), Nc = "_googlePay_1j5ka_1", xc = "_hidden_1j5ka_17", St = {
|
|
3592
|
+
googlePay: Nc,
|
|
3593
|
+
hidden: xc
|
|
3594
3594
|
};
|
|
3595
|
-
class
|
|
3595
|
+
class Lc {
|
|
3596
3596
|
constructor(e) {
|
|
3597
3597
|
b(this, "element");
|
|
3598
3598
|
b(this, "events", {
|
|
@@ -3612,11 +3612,11 @@ class xc {
|
|
|
3612
3612
|
return this.element;
|
|
3613
3613
|
}
|
|
3614
3614
|
}
|
|
3615
|
-
const
|
|
3616
|
-
paypal:
|
|
3617
|
-
hidden:
|
|
3615
|
+
const Pc = "_paypal_1al9c_1", Rc = "_hidden_1al9c_8", kt = {
|
|
3616
|
+
paypal: Pc,
|
|
3617
|
+
hidden: Rc
|
|
3618
3618
|
};
|
|
3619
|
-
class
|
|
3619
|
+
class Sc {
|
|
3620
3620
|
constructor(e) {
|
|
3621
3621
|
b(this, "element");
|
|
3622
3622
|
b(this, "events", {
|
|
@@ -3630,7 +3630,7 @@ class Rc {
|
|
|
3630
3630
|
e && (yield this.paypal.init({
|
|
3631
3631
|
clientId: e.clientId,
|
|
3632
3632
|
vault: !0
|
|
3633
|
-
}), yield this.paypal.render(this.element, te(
|
|
3633
|
+
}), yield this.paypal.render(this.element, te(Q({}, e), {
|
|
3634
3634
|
onApprove: (r) => j(this, [r], function* ({ billingToken: t }) {
|
|
3635
3635
|
var i;
|
|
3636
3636
|
(i = e.onSuccess) == null || i.call(e, t || "");
|
|
@@ -3649,7 +3649,7 @@ class Rc {
|
|
|
3649
3649
|
return this.element;
|
|
3650
3650
|
}
|
|
3651
3651
|
}
|
|
3652
|
-
const
|
|
3652
|
+
const kc = (n) => ({
|
|
3653
3653
|
ar: "ar-AB",
|
|
3654
3654
|
en: "en-GB",
|
|
3655
3655
|
cs: "cs-CZ",
|
|
@@ -3678,7 +3678,7 @@ const Sc = (n) => ({
|
|
|
3678
3678
|
tr: "tr-TR",
|
|
3679
3679
|
vi: "vi-VN",
|
|
3680
3680
|
zh: "zh-CN"
|
|
3681
|
-
})[n] || "en-US",
|
|
3681
|
+
})[n] || "en-US", Mc = (n) => ({
|
|
3682
3682
|
en: "en",
|
|
3683
3683
|
ar: "ar",
|
|
3684
3684
|
cs: "cs",
|
|
@@ -3703,7 +3703,7 @@ const Sc = (n) => ({
|
|
|
3703
3703
|
tr: "tr",
|
|
3704
3704
|
zh: "zh"
|
|
3705
3705
|
})[n] || "en";
|
|
3706
|
-
class
|
|
3706
|
+
class Dc {
|
|
3707
3707
|
constructor() {
|
|
3708
3708
|
b(this, "template", `
|
|
3709
3709
|
<svg
|
|
@@ -3728,14 +3728,14 @@ class Mc {
|
|
|
3728
3728
|
return this.element;
|
|
3729
3729
|
}
|
|
3730
3730
|
}
|
|
3731
|
-
const
|
|
3732
|
-
button:
|
|
3733
|
-
press:
|
|
3731
|
+
const Vc = "_button_1br9w_1", Fc = "_press_1br9w_21", yt = {
|
|
3732
|
+
button: Vc,
|
|
3733
|
+
press: Fc
|
|
3734
3734
|
};
|
|
3735
|
-
class
|
|
3735
|
+
class Uc {
|
|
3736
3736
|
constructor(e) {
|
|
3737
3737
|
b(this, "element");
|
|
3738
|
-
b(this, "icon", new
|
|
3738
|
+
b(this, "icon", new Dc());
|
|
3739
3739
|
this.element = document.createElement("button"), this.element.classList.add(yt.button);
|
|
3740
3740
|
const t = document.createElement("span");
|
|
3741
3741
|
t.textContent = e.getState().messages.card.compact.button, this.element.append(this.icon.render(), t), this.element.addEventListener("mousedown", () => this.element.classList.add(yt.press)), this.element.addEventListener("mouseup", () => this.element.classList.remove(yt.press)), this.element.addEventListener("mouseout", () => this.element.classList.remove(yt.press)), e.subscribe(({ messages: r }) => {
|
|
@@ -3749,11 +3749,12 @@ class Fc {
|
|
|
3749
3749
|
return this.element;
|
|
3750
3750
|
}
|
|
3751
3751
|
}
|
|
3752
|
-
const
|
|
3753
|
-
develop: "https://api-dev.paynext.com
|
|
3754
|
-
sandbox: "https://api-sandbox.paynext.com
|
|
3755
|
-
|
|
3756
|
-
|
|
3752
|
+
const Bc = (n, e, t) => e.concat(n.filter((r) => e.every((i) => !t(r, i)))), _n = (n = "sandbox") => ({
|
|
3753
|
+
develop: "https://api-dev.paynext.com",
|
|
3754
|
+
sandbox: "https://api-sandbox.paynext.com",
|
|
3755
|
+
staging: "https://api-staging.paynext.com",
|
|
3756
|
+
production: "https://api.paynext.com"
|
|
3757
|
+
})[n], zc = [
|
|
3757
3758
|
{
|
|
3758
3759
|
type: "paypal",
|
|
3759
3760
|
order: 1,
|
|
@@ -3774,85 +3775,87 @@ const Uc = (n, e, t) => e.concat(n.filter((r) => e.every((i) => !t(r, i)))), _n
|
|
|
3774
3775
|
order: 4,
|
|
3775
3776
|
is_active: !0
|
|
3776
3777
|
}
|
|
3777
|
-
],
|
|
3778
|
-
var
|
|
3779
|
-
const
|
|
3780
|
-
return
|
|
3778
|
+
], jc = (n, e, t) => j(void 0, null, function* () {
|
|
3779
|
+
var o, l, c, u, d, h, p, m, f, v, y, w, T, x, A, I, L, k, B, G, q, M, F, K, J, S, W, z, g, E, R, U, _, O, C, P, V, N, H, X, re, D, ee, me, ze, je, Ke, qe, He, We, Ge, Ye, Qe, An, wn, Tn, In, On, Nn, xn, Ln, Pn, Rn, Sn, kn, Mn, Dn, Vn, Fn, Un, Bn, zn, jn, Kn, qn, Hn, Wn, Gn, Yn, Qn, $n, Zn, Xn, Jn, er, tr, nr, rr, ir, ar, sr, or, lr, cr, ur, dr, pr, hr, mr, fr, vr, gr, yr, br, Er, _r, Cr, Ar, wr, Tr, Ir, Or;
|
|
3780
|
+
const r = `${_n(e)}/internal/payments/create`, i = new Headers();
|
|
3781
|
+
return i.append("Content-Type", "application/json"), i.append("X-API-Version", t), yield (yield fetch(r, {
|
|
3781
3782
|
method: "POST",
|
|
3782
|
-
headers:
|
|
3783
|
+
headers: i,
|
|
3783
3784
|
body: JSON.stringify({
|
|
3784
3785
|
client_session: n.clientSession,
|
|
3785
3786
|
three_ds_session_id: n.threeDsSessionId,
|
|
3786
3787
|
type: n.googlePay ? "GPAY" : n.applePay ? "APPLEPAY" : n.paypal ? "PAYPAL" : "CARD",
|
|
3787
|
-
name: (
|
|
3788
|
-
phone: (
|
|
3788
|
+
name: (l = (o = n.applePay) == null ? void 0 : o.billingContact) != null && l.givenName ? ((h = (d = n.applePay) == null ? void 0 : d.billingContact) == null ? void 0 : h.givenName) + " " + ((m = (p = n.applePay) == null ? void 0 : p.billingContact) == null ? void 0 : m.familyName) : (u = (c = n.card) == null ? void 0 : c.metadata) == null ? void 0 : u.name,
|
|
3789
|
+
phone: (v = (f = n.applePay) == null ? void 0 : f.shippingContact) == null ? void 0 : v.phoneNumber,
|
|
3789
3790
|
billing_address: n.applePay || n.googlePay ? {
|
|
3790
|
-
city: ((
|
|
3791
|
-
country: ((
|
|
3792
|
-
line1: ((
|
|
3793
|
-
line2: ((
|
|
3794
|
-
postal_code: ((
|
|
3795
|
-
state: ((
|
|
3791
|
+
city: ((w = (y = n.applePay) == null ? void 0 : y.billingContact) == null ? void 0 : w.locality) || ((x = (T = n == null ? void 0 : n.googlePay) == null ? void 0 : T.billingAddress) == null ? void 0 : x.locality) || void 0,
|
|
3792
|
+
country: ((I = (A = n.applePay) == null ? void 0 : A.billingContact) == null ? void 0 : I.countryCode) || ((k = (L = n == null ? void 0 : n.googlePay) == null ? void 0 : L.billingAddress) == null ? void 0 : k.countryCode) || void 0,
|
|
3793
|
+
line1: ((q = (G = (B = n.applePay) == null ? void 0 : B.billingContact) == null ? void 0 : G.addressLines) == null ? void 0 : q.at(0)) || ((F = (M = n == null ? void 0 : n.googlePay) == null ? void 0 : M.billingAddress) == null ? void 0 : F.address1) || void 0,
|
|
3794
|
+
line2: ((S = (J = (K = n.applePay) == null ? void 0 : K.billingContact) == null ? void 0 : J.addressLines) == null ? void 0 : S.at(1)) || ((z = (W = n == null ? void 0 : n.googlePay) == null ? void 0 : W.billingAddress) == null ? void 0 : z.address2) || void 0,
|
|
3795
|
+
postal_code: ((E = (g = n.applePay) == null ? void 0 : g.billingContact) == null ? void 0 : E.postalCode) || ((U = (R = n == null ? void 0 : n.googlePay) == null ? void 0 : R.billingAddress) == null ? void 0 : U.postalCode) || void 0,
|
|
3796
|
+
state: ((O = (_ = n.applePay) == null ? void 0 : _.billingContact) == null ? void 0 : O.administrativeArea) || ((P = (C = n == null ? void 0 : n.googlePay) == null ? void 0 : C.billingAddress) == null ? void 0 : P.administrativeArea) || void 0
|
|
3796
3797
|
} : void 0,
|
|
3797
|
-
card: n.card || (
|
|
3798
|
-
bin: (
|
|
3798
|
+
card: n.card || (V = n.googlePay) != null && V.card || (N = n.applePay) != null && N.card ? {
|
|
3799
|
+
bin: (H = n.card) == null ? void 0 : H.firstSixDigits,
|
|
3799
3800
|
bin_data: {
|
|
3800
|
-
brand: ((
|
|
3801
|
-
country: ((
|
|
3802
|
-
currency_code: ((
|
|
3803
|
-
funding: ((
|
|
3804
|
-
issuer: ((
|
|
3805
|
-
type: ((
|
|
3801
|
+
brand: ((X = n.card) == null ? void 0 : X.cardBrand) || ((D = (re = n.googlePay) == null ? void 0 : re.card) == null ? void 0 : D.brand) || ((me = (ee = n.applePay) == null ? void 0 : ee.card) == null ? void 0 : me.brand),
|
|
3802
|
+
country: ((ze = n.card) == null ? void 0 : ze.country) || ((Ke = (je = n.googlePay) == null ? void 0 : je.card) == null ? void 0 : Ke.country) || ((He = (qe = n.applePay) == null ? void 0 : qe.card) == null ? void 0 : He.country),
|
|
3803
|
+
currency_code: ((We = n.card) == null ? void 0 : We.currency) || ((Ye = (Ge = n.googlePay) == null ? void 0 : Ge.card) == null ? void 0 : Ye.currency) || ((An = (Qe = n.applePay) == null ? void 0 : Qe.card) == null ? void 0 : An.currency),
|
|
3804
|
+
funding: ((wn = n.card) == null ? void 0 : wn.funding) || ((In = (Tn = n.googlePay) == null ? void 0 : Tn.card) == null ? void 0 : In.funding) || ((Nn = (On = n.applePay) == null ? void 0 : On.card) == null ? void 0 : Nn.funding),
|
|
3805
|
+
issuer: ((xn = n.card) == null ? void 0 : xn.issuer) || ((Pn = (Ln = n.googlePay) == null ? void 0 : Ln.card) == null ? void 0 : Pn.issuer) || ((Sn = (Rn = n.applePay) == null ? void 0 : Rn.card) == null ? void 0 : Sn.issuer),
|
|
3806
|
+
type: ((kn = n.card) == null ? void 0 : kn.type) || ((Dn = (Mn = n.googlePay) == null ? void 0 : Mn.card) == null ? void 0 : Dn.segment) || ((Fn = (Vn = n.applePay) == null ? void 0 : Vn.card) == null ? void 0 : Fn.segment)
|
|
3806
3807
|
},
|
|
3807
|
-
cvc: (
|
|
3808
|
-
exp_month: (
|
|
3809
|
-
exp_year: (
|
|
3810
|
-
last4: ((
|
|
3811
|
-
number: ((
|
|
3808
|
+
cvc: (Un = n.card) == null ? void 0 : Un.cvc,
|
|
3809
|
+
exp_month: (Bn = n.card) != null && Bn.expMonth || (jn = (zn = n.googlePay) == null ? void 0 : zn.card) != null && jn.expiry.month ? Number(((Kn = n.card) == null ? void 0 : Kn.expMonth) || ((Hn = (qn = n.googlePay) == null ? void 0 : qn.card) == null ? void 0 : Hn.expiry.month)) : void 0,
|
|
3810
|
+
exp_year: (Wn = n.card) != null && Wn.expYear || (Yn = (Gn = n.googlePay) == null ? void 0 : Gn.card) != null && Yn.expiry.year ? Number(((Qn = n.card) == null ? void 0 : Qn.expYear) || ((Zn = ($n = n.googlePay) == null ? void 0 : $n.card) == null ? void 0 : Zn.expiry.year)) : void 0,
|
|
3811
|
+
last4: ((Xn = n.card) == null ? void 0 : Xn.lastFourDigits) || ((er = (Jn = n.googlePay) == null ? void 0 : Jn.card) == null ? void 0 : er.lastFour) || ((nr = (tr = n.applePay) == null ? void 0 : tr.card) == null ? void 0 : nr.lastFour),
|
|
3812
|
+
number: ((rr = n.card) == null ? void 0 : rr.number) || ((ar = (ir = n.googlePay) == null ? void 0 : ir.card) == null ? void 0 : ar.number)
|
|
3812
3813
|
} : void 0,
|
|
3813
|
-
paypal: (
|
|
3814
|
+
paypal: (sr = n.paypal) != null && sr.billing_agreement_token.paypalId ? { billing_agreement_token: (or = n.paypal) == null ? void 0 : or.billing_agreement_token.paypalId } : void 0,
|
|
3814
3815
|
google_pay: n.googlePay && n.googlePay.token ? {
|
|
3815
3816
|
cryptogram: n.googlePay.cryptogram,
|
|
3816
3817
|
eci: n.googlePay.eci,
|
|
3817
|
-
exp_month: (
|
|
3818
|
-
exp_year: (
|
|
3819
|
-
token: (
|
|
3820
|
-
token_service_provider: (
|
|
3818
|
+
exp_month: (cr = (lr = n.googlePay) == null ? void 0 : lr.card) != null && cr.expiry.month || (ur = n.googlePay) != null && ur.token.expiry.month ? Number(n.googlePay.card.expiry.month || n.googlePay.token.expiry.month) : void 0,
|
|
3819
|
+
exp_year: (pr = (dr = n.googlePay) == null ? void 0 : dr.card) != null && pr.expiry.year || (hr = n.googlePay) != null && hr.token.expiry.year ? Number(n.googlePay.card.expiry.year || n.googlePay.token.expiry.year) : void 0,
|
|
3820
|
+
token: (fr = (mr = n.googlePay) == null ? void 0 : mr.token) == null ? void 0 : fr.number,
|
|
3821
|
+
token_service_provider: (gr = (vr = n.googlePay) == null ? void 0 : vr.token) == null ? void 0 : gr.tokenServiceProvider
|
|
3821
3822
|
} : void 0,
|
|
3822
3823
|
apple_pay: n.applePay ? {
|
|
3823
3824
|
cryptogram: n.applePay.cryptogram,
|
|
3824
3825
|
eci: n.applePay.eci,
|
|
3825
|
-
exp_month: (
|
|
3826
|
-
exp_year: (
|
|
3827
|
-
token: (
|
|
3828
|
-
token_service_provider: (
|
|
3826
|
+
exp_month: (Er = (br = (yr = n.applePay) == null ? void 0 : yr.networkToken) == null ? void 0 : br.expiry) != null && Er.month ? Number(n.applePay.networkToken.expiry.month) : void 0,
|
|
3827
|
+
exp_year: (Ar = (Cr = (_r = n.applePay) == null ? void 0 : _r.networkToken) == null ? void 0 : Cr.expiry) != null && Ar.year ? Number(n.applePay.networkToken.expiry.year) : void 0,
|
|
3828
|
+
token: (Tr = (wr = n.applePay) == null ? void 0 : wr.networkToken) == null ? void 0 : Tr.number,
|
|
3829
|
+
token_service_provider: (Or = (Ir = n.applePay) == null ? void 0 : Ir.networkToken) == null ? void 0 : Or.tokenServiceProvider
|
|
3829
3830
|
} : void 0,
|
|
3830
3831
|
braintree: n.braintree ? {
|
|
3831
3832
|
payment_method_nonce: n.braintree.nonce
|
|
3832
3833
|
} : void 0
|
|
3833
3834
|
})
|
|
3834
3835
|
})).json();
|
|
3835
|
-
}),
|
|
3836
|
-
const
|
|
3837
|
-
return
|
|
3836
|
+
}), Kc = (n, e, t) => j(void 0, null, function* () {
|
|
3837
|
+
const r = `${_n(e)}/internal/payments/create/billing/agreement`, i = new Headers();
|
|
3838
|
+
return i.append("Content-Type", "application/json"), i.append("X-API-Version", t), (yield (yield fetch(r, {
|
|
3838
3839
|
method: "POST",
|
|
3839
|
-
headers:
|
|
3840
|
+
headers: i,
|
|
3840
3841
|
body: JSON.stringify({ client_session: n })
|
|
3841
3842
|
})).json()).paypal_agreement_token_response.token_id || "";
|
|
3842
|
-
}),
|
|
3843
|
-
const
|
|
3844
|
-
|
|
3843
|
+
}), qc = (n, e, t) => j(void 0, null, function* () {
|
|
3844
|
+
const r = `${_n(e)}/internal/payments/config?client_session_id=${n}`, i = new Headers();
|
|
3845
|
+
i.append("X-API-Version", t);
|
|
3846
|
+
const s = yield (yield fetch(r, { headers: i })).json();
|
|
3847
|
+
return s.checkout_config || (s.checkout_config = zc), s;
|
|
3845
3848
|
});
|
|
3846
|
-
var
|
|
3847
|
-
const
|
|
3848
|
-
venmo:
|
|
3849
|
-
hidden:
|
|
3850
|
-
},
|
|
3849
|
+
var Na = /* @__PURE__ */ ((n) => (n.Card = "CARD", n))(Na || {});
|
|
3850
|
+
const Hc = "_venmo_10t25_1", Wc = "_hidden_10t25_17", Mt = {
|
|
3851
|
+
venmo: Hc,
|
|
3852
|
+
hidden: Wc
|
|
3853
|
+
}, Gc = {
|
|
3851
3854
|
display: "block",
|
|
3852
3855
|
height: 40,
|
|
3853
3856
|
borderRadius: 12
|
|
3854
3857
|
};
|
|
3855
|
-
class
|
|
3858
|
+
class Yc {
|
|
3856
3859
|
constructor(e) {
|
|
3857
3860
|
b(this, "isProcessing", !1);
|
|
3858
3861
|
b(this, "element");
|
|
@@ -3870,7 +3873,10 @@ class Gc {
|
|
|
3870
3873
|
try {
|
|
3871
3874
|
if (yield this.braintree.init({
|
|
3872
3875
|
authorization: e.authorization
|
|
3873
|
-
}), yield this.braintree.createVenmo(
|
|
3876
|
+
}), yield this.braintree.createVenmo({
|
|
3877
|
+
// ToDo: change to production url
|
|
3878
|
+
deepLinkReturnUrl: "https://payment-staging.paynext.com"
|
|
3879
|
+
}), !this.braintree.isBrowserSupported()) {
|
|
3874
3880
|
console.log("Browser does not support Venmo"), this.handleVenmoError(new Error("Browser does not support Venmo"));
|
|
3875
3881
|
return;
|
|
3876
3882
|
}
|
|
@@ -3887,7 +3893,7 @@ class Gc {
|
|
|
3887
3893
|
}
|
|
3888
3894
|
// display venmo button
|
|
3889
3895
|
displayVenmoButton(e) {
|
|
3890
|
-
Object.assign(this.venmoButton.style,
|
|
3896
|
+
Object.assign(this.venmoButton.style, Gc), this.venmoButton.addEventListener("click", () => j(this, null, function* () {
|
|
3891
3897
|
if (!this.isProcessing) {
|
|
3892
3898
|
this.isProcessing = !0, this.venmoButton.disabled = !0;
|
|
3893
3899
|
try {
|
|
@@ -3931,7 +3937,7 @@ class Gc {
|
|
|
3931
3937
|
return this.element;
|
|
3932
3938
|
}
|
|
3933
3939
|
}
|
|
3934
|
-
class
|
|
3940
|
+
class Qc {
|
|
3935
3941
|
constructor(e) {
|
|
3936
3942
|
b(this, "isAppleReady", !0);
|
|
3937
3943
|
b(this, "isGoogleReady", !0);
|
|
@@ -3950,7 +3956,7 @@ class Yc {
|
|
|
3950
3956
|
cancel: new ce(),
|
|
3951
3957
|
success: new ce()
|
|
3952
3958
|
});
|
|
3953
|
-
this.config = e, this.applePay = new
|
|
3959
|
+
this.config = e, this.applePay = new hc(e.service.ev), this.paypal = new Sc(e.service.paypal), this.googlePay = new Lc(e.service.ev), this.braintree = new Yc(e.service.braintree), this.card = new Uc(e.state.translate), this.buttons = document.createElement("div"), this.buttons.classList.add(Lt.buttons, Lt.hidden);
|
|
3954
3960
|
}
|
|
3955
3961
|
// init
|
|
3956
3962
|
init() {
|
|
@@ -3968,17 +3974,17 @@ class Yc {
|
|
|
3968
3974
|
initApple() {
|
|
3969
3975
|
return j(this, null, function* () {
|
|
3970
3976
|
this.isAppleReady = !1, this.buttons.appendChild(this.applePay.render());
|
|
3971
|
-
const e = this.config.state.transaction.getState(), { locale: t, supportedCardTypes: r } = this.config.state.checkout.getState(), i =
|
|
3977
|
+
const e = this.config.state.transaction.getState(), { locale: t, supportedCardTypes: r } = this.config.state.checkout.getState(), i = Ic(e);
|
|
3972
3978
|
try {
|
|
3973
3979
|
if (!i)
|
|
3974
3980
|
return;
|
|
3975
3981
|
yield this.applePay.init({
|
|
3976
3982
|
transaction: i,
|
|
3977
|
-
supportedCardTypes:
|
|
3978
|
-
locale:
|
|
3983
|
+
supportedCardTypes: Oc(r),
|
|
3984
|
+
locale: kc(t || "en"),
|
|
3979
3985
|
onError: () => this.events.error.emit(),
|
|
3980
3986
|
onCancel: () => this.events.cancel.emit(),
|
|
3981
|
-
onSuccess: (a) => this.events.success.emit(te(
|
|
3987
|
+
onSuccess: (a) => this.events.success.emit(te(Q({}, a), { type: "apple" }))
|
|
3982
3988
|
});
|
|
3983
3989
|
} catch (a) {
|
|
3984
3990
|
console.error(a);
|
|
@@ -3991,16 +3997,16 @@ class Yc {
|
|
|
3991
3997
|
initGoogle() {
|
|
3992
3998
|
return j(this, null, function* () {
|
|
3993
3999
|
this.isGoogleReady = !1, this.buttons.appendChild(this.googlePay.render());
|
|
3994
|
-
const e = this.config.state.transaction.getState(), { locale: t } = this.config.state.checkout.getState(), r =
|
|
4000
|
+
const e = this.config.state.transaction.getState(), { locale: t } = this.config.state.checkout.getState(), r = Tc(e);
|
|
3995
4001
|
try {
|
|
3996
4002
|
if (!r)
|
|
3997
4003
|
return;
|
|
3998
4004
|
yield this.googlePay.init({
|
|
3999
4005
|
transaction: r,
|
|
4000
|
-
locale:
|
|
4006
|
+
locale: Mc(t || "en"),
|
|
4001
4007
|
onError: () => this.events.error.emit(),
|
|
4002
4008
|
onCancel: () => this.events.cancel.emit(),
|
|
4003
|
-
onSuccess: (i) => this.events.success.emit(te(
|
|
4009
|
+
onSuccess: (i) => this.events.success.emit(te(Q({}, i), { type: "google" }))
|
|
4004
4010
|
});
|
|
4005
4011
|
} catch (i) {
|
|
4006
4012
|
console.error(i);
|
|
@@ -4015,7 +4021,7 @@ class Yc {
|
|
|
4015
4021
|
var i, a;
|
|
4016
4022
|
this.isPayPalReady = !1, this.buttons.appendChild(this.paypal.render());
|
|
4017
4023
|
const e = this.config.state.transaction.getState(), t = this.config.state.checkout.getState(), r = () => j(this, null, function* () {
|
|
4018
|
-
return yield
|
|
4024
|
+
return yield Kc(t.clientToken, t.environment, t.apiVersion);
|
|
4019
4025
|
});
|
|
4020
4026
|
try {
|
|
4021
4027
|
if (!e)
|
|
@@ -4068,7 +4074,7 @@ class Yc {
|
|
|
4068
4074
|
// init payment methods
|
|
4069
4075
|
initPaymentMethods() {
|
|
4070
4076
|
return j(this, null, function* () {
|
|
4071
|
-
const e = this.config.state.transaction.getState(), r =
|
|
4077
|
+
const e = this.config.state.transaction.getState(), r = Bc(mc, (e == null ? void 0 : e.checkout_config) || [], (i, a) => i.type === a.type).filter(({ is_active: i }) => i).sort((i, a) => i.order - a.order).map(({ type: i }) => {
|
|
4072
4078
|
switch (i) {
|
|
4073
4079
|
case "apple-pay":
|
|
4074
4080
|
return this.initApple();
|
|
@@ -4104,7 +4110,7 @@ class Yc {
|
|
|
4104
4110
|
return this.buttons;
|
|
4105
4111
|
}
|
|
4106
4112
|
}
|
|
4107
|
-
class
|
|
4113
|
+
class $c {
|
|
4108
4114
|
constructor() {
|
|
4109
4115
|
b(this, "template", `
|
|
4110
4116
|
<svg
|
|
@@ -4130,14 +4136,14 @@ class Qc {
|
|
|
4130
4136
|
return this.element;
|
|
4131
4137
|
}
|
|
4132
4138
|
}
|
|
4133
|
-
const
|
|
4134
|
-
button:
|
|
4139
|
+
const Zc = "_button_125my_1", Xc = {
|
|
4140
|
+
button: Zc
|
|
4135
4141
|
};
|
|
4136
|
-
class
|
|
4142
|
+
class Jc {
|
|
4137
4143
|
constructor() {
|
|
4138
4144
|
b(this, "element");
|
|
4139
|
-
b(this, "icon", new
|
|
4140
|
-
this.element = document.createElement("div"), this.element.classList.add(
|
|
4145
|
+
b(this, "icon", new $c());
|
|
4146
|
+
this.element = document.createElement("div"), this.element.classList.add(Xc.button), this.element.appendChild(this.icon.render());
|
|
4141
4147
|
}
|
|
4142
4148
|
addEventListener(e) {
|
|
4143
4149
|
return this.element.addEventListener("click", e);
|
|
@@ -4146,17 +4152,17 @@ class Xc {
|
|
|
4146
4152
|
return this.element;
|
|
4147
4153
|
}
|
|
4148
4154
|
}
|
|
4149
|
-
const
|
|
4150
|
-
button:
|
|
4151
|
-
disabled:
|
|
4152
|
-
press:
|
|
4153
|
-
hidden:
|
|
4154
|
-
spinner:
|
|
4155
|
+
const eu = "_button_rx9be_1", tu = "_disabled_rx9be_17", nu = "_press_rx9be_22", ru = "_hidden_rx9be_26", iu = "_spinner_rx9be_30", be = {
|
|
4156
|
+
button: eu,
|
|
4157
|
+
disabled: tu,
|
|
4158
|
+
press: nu,
|
|
4159
|
+
hidden: ru,
|
|
4160
|
+
spinner: iu
|
|
4155
4161
|
};
|
|
4156
|
-
class
|
|
4162
|
+
class au {
|
|
4157
4163
|
constructor(e) {
|
|
4158
4164
|
b(this, "element");
|
|
4159
|
-
b(this, "spinner", new
|
|
4165
|
+
b(this, "spinner", new wa());
|
|
4160
4166
|
b(this, "message", document.createElement("span"));
|
|
4161
4167
|
this.element = document.createElement("button"), this.element.classList.add(be.button), this.spinner.addClass(be.spinner), this.spinner.addClass(be.hidden), this.message.textContent = e.messages().card.pay.button, this.element.append(this.spinner.render(), this.message), this.element.addEventListener("mousedown", () => this.element.classList.add(be.press)), this.element.addEventListener("mouseup", () => this.element.classList.remove(be.press)), this.element.addEventListener("mouseout", () => this.element.classList.remove(be.press)), e.subscribe((t) => {
|
|
4162
4168
|
this.message.textContent = t.messages.card.pay.button;
|
|
@@ -4172,19 +4178,19 @@ class iu {
|
|
|
4172
4178
|
return this.element;
|
|
4173
4179
|
}
|
|
4174
4180
|
}
|
|
4175
|
-
const
|
|
4176
|
-
cardForm:
|
|
4177
|
-
hidden:
|
|
4178
|
-
},
|
|
4179
|
-
wrapper:
|
|
4180
|
-
inputContainer:
|
|
4181
|
-
input:
|
|
4182
|
-
errorInput:
|
|
4183
|
-
label:
|
|
4184
|
-
labelError:
|
|
4185
|
-
disabled:
|
|
4186
|
-
disabledInput:
|
|
4187
|
-
hidden:
|
|
4181
|
+
const su = "_cardForm_isqbi_1", ou = "_hidden_isqbi_5", bt = {
|
|
4182
|
+
cardForm: su,
|
|
4183
|
+
hidden: ou
|
|
4184
|
+
}, lu = "_wrapper_4knhb_1", cu = "_inputContainer_4knhb_5", uu = "_input_4knhb_5", du = "_errorInput_4knhb_24", pu = "_label_4knhb_28", hu = "_labelError_4knhb_32", mu = "_disabled_4knhb_36", fu = "_disabledInput_4knhb_40", vu = "_hidden_4knhb_47", ae = {
|
|
4185
|
+
wrapper: lu,
|
|
4186
|
+
inputContainer: cu,
|
|
4187
|
+
input: uu,
|
|
4188
|
+
errorInput: du,
|
|
4189
|
+
label: pu,
|
|
4190
|
+
labelError: hu,
|
|
4191
|
+
disabled: mu,
|
|
4192
|
+
disabledInput: fu,
|
|
4193
|
+
hidden: vu
|
|
4188
4194
|
};
|
|
4189
4195
|
class Cn {
|
|
4190
4196
|
constructor() {
|
|
@@ -4207,7 +4213,7 @@ class Cn {
|
|
|
4207
4213
|
return this.element;
|
|
4208
4214
|
}
|
|
4209
4215
|
}
|
|
4210
|
-
class
|
|
4216
|
+
class gu {
|
|
4211
4217
|
constructor(e) {
|
|
4212
4218
|
b(this, "id", "paynext-card-input-name");
|
|
4213
4219
|
b(this, "element");
|
|
@@ -4269,20 +4275,20 @@ class vu {
|
|
|
4269
4275
|
return this.toggleLabelError(r), this.isDisabled ? (this.inputContainer.classList.add(ae.disabled), this.input.classList.add(ae.disabledInput)) : (this.inputContainer.classList.remove(ae.disabled), this.input.classList.remove(ae.disabledInput)), this.element;
|
|
4270
4276
|
}
|
|
4271
4277
|
}
|
|
4272
|
-
const
|
|
4273
|
-
wrapper:
|
|
4274
|
-
inputContainer:
|
|
4275
|
-
input:
|
|
4276
|
-
endContent:
|
|
4277
|
-
errorInput:
|
|
4278
|
-
error:
|
|
4279
|
-
label:
|
|
4280
|
-
labelError:
|
|
4281
|
-
disabled:
|
|
4282
|
-
disabledInput:
|
|
4283
|
-
hidden:
|
|
4278
|
+
const yu = "_wrapper_j8wuo_1", bu = "_inputContainer_j8wuo_5", Eu = "_input_j8wuo_5", _u = "_endContent_j8wuo_20", Cu = "_errorInput_j8wuo_24", Au = "_error_j8wuo_24", wu = "_label_j8wuo_32", Tu = "_labelError_j8wuo_36", Iu = "_disabled_j8wuo_40", Ou = "_disabledInput_j8wuo_44", Nu = "_hidden_j8wuo_51", ne = {
|
|
4279
|
+
wrapper: yu,
|
|
4280
|
+
inputContainer: bu,
|
|
4281
|
+
input: Eu,
|
|
4282
|
+
endContent: _u,
|
|
4283
|
+
errorInput: Cu,
|
|
4284
|
+
error: Au,
|
|
4285
|
+
label: wu,
|
|
4286
|
+
labelError: Tu,
|
|
4287
|
+
disabled: Iu,
|
|
4288
|
+
disabledInput: Ou,
|
|
4289
|
+
hidden: Nu
|
|
4284
4290
|
};
|
|
4285
|
-
class
|
|
4291
|
+
class xu {
|
|
4286
4292
|
constructor() {
|
|
4287
4293
|
b(this, "template", `
|
|
4288
4294
|
<svg
|
|
@@ -4320,7 +4326,7 @@ class Nu {
|
|
|
4320
4326
|
return this.element;
|
|
4321
4327
|
}
|
|
4322
4328
|
}
|
|
4323
|
-
class
|
|
4329
|
+
class Lu {
|
|
4324
4330
|
constructor() {
|
|
4325
4331
|
b(this, "template", `
|
|
4326
4332
|
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${Z.svg}'>
|
|
@@ -4357,7 +4363,7 @@ class xu {
|
|
|
4357
4363
|
return this.element;
|
|
4358
4364
|
}
|
|
4359
4365
|
}
|
|
4360
|
-
class
|
|
4366
|
+
class Pu {
|
|
4361
4367
|
constructor() {
|
|
4362
4368
|
b(this, "template", `
|
|
4363
4369
|
<svg
|
|
@@ -4407,7 +4413,7 @@ class Lu {
|
|
|
4407
4413
|
return this.element;
|
|
4408
4414
|
}
|
|
4409
4415
|
}
|
|
4410
|
-
class
|
|
4416
|
+
class Ru {
|
|
4411
4417
|
constructor() {
|
|
4412
4418
|
b(this, "template", `
|
|
4413
4419
|
<svg
|
|
@@ -4462,7 +4468,7 @@ class Pu {
|
|
|
4462
4468
|
return this.element;
|
|
4463
4469
|
}
|
|
4464
4470
|
}
|
|
4465
|
-
class
|
|
4471
|
+
class Su {
|
|
4466
4472
|
constructor() {
|
|
4467
4473
|
b(this, "template", `
|
|
4468
4474
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${Z.svg}'>
|
|
@@ -4502,7 +4508,7 @@ class Ru {
|
|
|
4502
4508
|
return this.element;
|
|
4503
4509
|
}
|
|
4504
4510
|
}
|
|
4505
|
-
class
|
|
4511
|
+
class ku {
|
|
4506
4512
|
constructor() {
|
|
4507
4513
|
b(this, "template", `
|
|
4508
4514
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
@@ -4525,7 +4531,7 @@ class Su {
|
|
|
4525
4531
|
return this.element;
|
|
4526
4532
|
}
|
|
4527
4533
|
}
|
|
4528
|
-
class
|
|
4534
|
+
class Mu {
|
|
4529
4535
|
constructor() {
|
|
4530
4536
|
b(this, "template", `
|
|
4531
4537
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
@@ -4557,7 +4563,7 @@ class ku {
|
|
|
4557
4563
|
return this.element;
|
|
4558
4564
|
}
|
|
4559
4565
|
}
|
|
4560
|
-
class
|
|
4566
|
+
class Du {
|
|
4561
4567
|
constructor() {
|
|
4562
4568
|
b(this, "template", `
|
|
4563
4569
|
<svg
|
|
@@ -4606,7 +4612,7 @@ class Mu {
|
|
|
4606
4612
|
return this.element;
|
|
4607
4613
|
}
|
|
4608
4614
|
}
|
|
4609
|
-
class
|
|
4615
|
+
class Vu {
|
|
4610
4616
|
constructor(e) {
|
|
4611
4617
|
b(this, "id", "paynext-card-input-number");
|
|
4612
4618
|
b(this, "initialCardTypes", wt.map((e) => e.type));
|
|
@@ -4618,14 +4624,14 @@ class Du {
|
|
|
4618
4624
|
b(this, "labelError", document.createElement("span"));
|
|
4619
4625
|
b(this, "endContent", document.createElement("div"));
|
|
4620
4626
|
b(this, "error", document.createElement("p"));
|
|
4621
|
-
b(this, "unknownCard", new
|
|
4622
|
-
b(this, "amex", new
|
|
4623
|
-
b(this, "dinerClub", new
|
|
4624
|
-
b(this, "discover", new
|
|
4625
|
-
b(this, "jcb", new
|
|
4626
|
-
b(this, "masterCard", new
|
|
4627
|
-
b(this, "unionPay", new
|
|
4628
|
-
b(this, "visa", new
|
|
4627
|
+
b(this, "unknownCard", new xu());
|
|
4628
|
+
b(this, "amex", new Lu());
|
|
4629
|
+
b(this, "dinerClub", new Pu());
|
|
4630
|
+
b(this, "discover", new Ru());
|
|
4631
|
+
b(this, "jcb", new Su());
|
|
4632
|
+
b(this, "masterCard", new ku());
|
|
4633
|
+
b(this, "unionPay", new Mu());
|
|
4634
|
+
b(this, "visa", new Du());
|
|
4629
4635
|
b(this, "supportedCardTypes", this.initialCardTypes);
|
|
4630
4636
|
b(this, "isTouchSubmit", !1);
|
|
4631
4637
|
b(this, "errorMessage", "");
|
|
@@ -4649,12 +4655,12 @@ class Du {
|
|
|
4649
4655
|
handleChange(e) {
|
|
4650
4656
|
if (this.isDisabled) return;
|
|
4651
4657
|
this.isRequired = !1, this.errorMessage = "", this.isChanged || (this.isChanged = !0);
|
|
4652
|
-
const t =
|
|
4658
|
+
const t = ui(e).map((a) => a.type), r = Oa(e), i = _c(e, (r == null ? void 0 : r.type) || "");
|
|
4653
4659
|
i.replace(/\D/g, "").length === ((r == null ? void 0 : r.maxLength) || 16) && this.validate(i), this.supportedCardTypes = t.length ? t : this.initialCardTypes, this.input.value = i, this.events.change.emit({
|
|
4654
4660
|
card: i,
|
|
4655
4661
|
cardType: r == null ? void 0 : r.type,
|
|
4656
4662
|
cardTypes: t,
|
|
4657
|
-
isValid:
|
|
4663
|
+
isValid: di(e, this.supportedCardTypes).isValid
|
|
4658
4664
|
}), this.render();
|
|
4659
4665
|
}
|
|
4660
4666
|
toggleLabelError(e) {
|
|
@@ -4709,11 +4715,11 @@ class Du {
|
|
|
4709
4715
|
var e;
|
|
4710
4716
|
return {
|
|
4711
4717
|
value: this.input.value,
|
|
4712
|
-
cardType: ((e =
|
|
4718
|
+
cardType: ((e = ui(this.input.value)[0]) == null ? void 0 : e.type) || ""
|
|
4713
4719
|
};
|
|
4714
4720
|
}
|
|
4715
4721
|
validate(e) {
|
|
4716
|
-
const t = this.translate.messages(), { isValid: r, error: i } =
|
|
4722
|
+
const t = this.translate.messages(), { isValid: r, error: i } = di(e, this.supportedCardTypes);
|
|
4717
4723
|
return r ? (this.isRequired = !1, this.errorMessage = "", this.render(), r) : (i === oe.Empty ? (this.errorMessage = "", this.isRequired = !0) : i === oe.Unsupported ? (this.errorMessage = t.card.number.error.unsupported, this.isRequired = !1) : (this.errorMessage = i === oe.Incomplete ? t.card.number.error.incomplete : t.card.number.error.invalid, this.isRequired = !1), this.render(), r);
|
|
4718
4724
|
}
|
|
4719
4725
|
render() {
|
|
@@ -4721,20 +4727,20 @@ class Du {
|
|
|
4721
4727
|
return this.toggleLabelError(t), this.toggleErrorMessage(r), !t && !r ? (this.inputContainer.classList.remove(ne.errorInput), this.endContent.innerHTML = "", this.endContent.append(...this.getCardIcons())) : (this.endContent.innerHTML = "", this.endContent.appendChild(this.unknownCard.render())), this.isDisabled ? (this.inputContainer.classList.add(ne.disabled), this.input.classList.add(ne.disabledInput)) : (this.inputContainer.classList.remove(ne.disabled), this.input.classList.remove(ne.disabledInput)), this.element;
|
|
4722
4728
|
}
|
|
4723
4729
|
}
|
|
4724
|
-
const
|
|
4725
|
-
inputContainer:
|
|
4726
|
-
input:
|
|
4727
|
-
endContent:
|
|
4728
|
-
errorInput:
|
|
4729
|
-
error:
|
|
4730
|
-
label:
|
|
4731
|
-
labelError:
|
|
4732
|
-
disabled:
|
|
4733
|
-
disabledInput:
|
|
4734
|
-
hidden:
|
|
4735
|
-
securityContent:
|
|
4730
|
+
const Fu = "_inputContainer_1xdj3_5", Uu = "_input_1xdj3_5", Bu = "_endContent_1xdj3_20", zu = "_errorInput_1xdj3_24", ju = "_error_1xdj3_24", Ku = "_label_1xdj3_32", qu = "_labelError_1xdj3_36", Hu = "_disabled_1xdj3_40", Wu = "_disabledInput_1xdj3_44", Gu = "_hidden_1xdj3_51", Yu = "_securityContent_1xdj3_55", Y = {
|
|
4731
|
+
inputContainer: Fu,
|
|
4732
|
+
input: Uu,
|
|
4733
|
+
endContent: Bu,
|
|
4734
|
+
errorInput: zu,
|
|
4735
|
+
error: ju,
|
|
4736
|
+
label: Ku,
|
|
4737
|
+
labelError: qu,
|
|
4738
|
+
disabled: Hu,
|
|
4739
|
+
disabledInput: Wu,
|
|
4740
|
+
hidden: Gu,
|
|
4741
|
+
securityContent: Yu
|
|
4736
4742
|
};
|
|
4737
|
-
class
|
|
4743
|
+
class Qu {
|
|
4738
4744
|
constructor() {
|
|
4739
4745
|
b(this, "template", `
|
|
4740
4746
|
<svg class='${Z.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
|
|
@@ -4763,13 +4769,13 @@ class Yu {
|
|
|
4763
4769
|
return this.element;
|
|
4764
4770
|
}
|
|
4765
4771
|
}
|
|
4766
|
-
class
|
|
4772
|
+
class $u {
|
|
4767
4773
|
constructor(e) {
|
|
4768
4774
|
b(this, "cvcId", "paynext-card-input-cvc");
|
|
4769
4775
|
b(this, "expiryId", "paynext-card-input-expiry");
|
|
4770
4776
|
b(this, "element");
|
|
4771
4777
|
b(this, "warning", new Cn());
|
|
4772
|
-
b(this, "cardCvc", new
|
|
4778
|
+
b(this, "cardCvc", new Qu());
|
|
4773
4779
|
b(this, "expiryInputContainer", document.createElement("div"));
|
|
4774
4780
|
b(this, "expiryInput", document.createElement("input"));
|
|
4775
4781
|
b(this, "expiryLabel", document.createElement("label"));
|
|
@@ -4845,7 +4851,7 @@ class Qu {
|
|
|
4845
4851
|
handleCvcChange(e) {
|
|
4846
4852
|
if (this.isDisabled) return;
|
|
4847
4853
|
this.isCvcRequired = !1, this.cvcErrorMessage = "", this.isCvcChanged || (this.isCvcChanged = !0);
|
|
4848
|
-
const t =
|
|
4854
|
+
const t = Cc(e, this.cardType || ""), r = Me.getTypeInfo(this.cardType || "");
|
|
4849
4855
|
t.length === (r == null ? void 0 : r.code.size) && this.validateCvc(t), this.events.cvcChange.emit({
|
|
4850
4856
|
value: t,
|
|
4851
4857
|
isValid: this.cvcValidator(t) === null
|
|
@@ -4892,7 +4898,7 @@ class Qu {
|
|
|
4892
4898
|
handleExpiryChange(e) {
|
|
4893
4899
|
if (this.isDisabled) return;
|
|
4894
4900
|
this.isExpiryRequired = !1, this.expiryErrorMessage = "", this.isExpiryChanged || (this.isExpiryChanged = !0);
|
|
4895
|
-
const t =
|
|
4901
|
+
const t = Ac(e, this.expiryPrevValue);
|
|
4896
4902
|
t.length === 7 && this.validateExpiry(t), this.events.expiryChange.emit({
|
|
4897
4903
|
value: t,
|
|
4898
4904
|
isValid: this.expiryValidator(t) === null
|
|
@@ -4945,16 +4951,16 @@ class Qu {
|
|
|
4945
4951
|
return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove(Y.errorInput), this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cardCvc.render())) : (this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.warning.render())), this.isDisabled ? (this.expiryInputContainer.classList.add(Y.disabled), this.expiryInput.classList.add(Y.disabledInput), this.cvcInputContainer.classList.add(Y.disabled), this.cvcInput.classList.add(Y.disabledInput)) : (this.expiryInputContainer.classList.remove(Y.disabled), this.expiryInput.classList.remove(Y.disabledInput), this.cvcInputContainer.classList.remove(Y.disabled), this.cvcInput.classList.remove(Y.disabledInput)), this.element;
|
|
4946
4952
|
}
|
|
4947
4953
|
}
|
|
4948
|
-
const
|
|
4949
|
-
container:
|
|
4950
|
-
title:
|
|
4954
|
+
const Zu = "_container_94v1h_1", Xu = "_title_94v1h_10", pi = {
|
|
4955
|
+
container: Zu,
|
|
4956
|
+
title: Xu
|
|
4951
4957
|
};
|
|
4952
|
-
class
|
|
4958
|
+
class xa {
|
|
4953
4959
|
constructor(e) {
|
|
4954
4960
|
b(this, "element");
|
|
4955
4961
|
b(this, "message", document.createElement("p"));
|
|
4956
4962
|
b(this, "icon", new Cn());
|
|
4957
|
-
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(
|
|
4963
|
+
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(pi.container), this.message.classList.add(pi.title), this.message.textContent = e.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: t }) => {
|
|
4958
4964
|
this.message.textContent = t.status.success;
|
|
4959
4965
|
});
|
|
4960
4966
|
}
|
|
@@ -4968,7 +4974,7 @@ class Na {
|
|
|
4968
4974
|
return this.element;
|
|
4969
4975
|
}
|
|
4970
4976
|
}
|
|
4971
|
-
class
|
|
4977
|
+
class Ju {
|
|
4972
4978
|
constructor(e, t) {
|
|
4973
4979
|
b(this, "element");
|
|
4974
4980
|
b(this, "error");
|
|
@@ -4981,7 +4987,7 @@ class Xu {
|
|
|
4981
4987
|
submit: new ce(),
|
|
4982
4988
|
close: new ce()
|
|
4983
4989
|
});
|
|
4984
|
-
this.element = document.createElement("form"), this.error = new
|
|
4990
|
+
this.element = document.createElement("form"), this.error = new xa(e), this.submit = new au(e), this.back = new Jc(), this.number = new Vu(e), this.name = new gu(e), this.cardSecurity = new $u(e), this.error.addClassName(bt.hidden), this.element.classList.add(bt.cardForm, t || ""), this.element.append(
|
|
4985
4991
|
this.back.render(),
|
|
4986
4992
|
this.number.render(),
|
|
4987
4993
|
this.cardSecurity.render(),
|
|
@@ -5023,7 +5029,7 @@ class Xu {
|
|
|
5023
5029
|
return this.element;
|
|
5024
5030
|
}
|
|
5025
5031
|
}
|
|
5026
|
-
class
|
|
5032
|
+
class ed {
|
|
5027
5033
|
constructor() {
|
|
5028
5034
|
b(this, "template", `
|
|
5029
5035
|
<svg
|
|
@@ -5050,16 +5056,16 @@ class Ju {
|
|
|
5050
5056
|
return this.element;
|
|
5051
5057
|
}
|
|
5052
5058
|
}
|
|
5053
|
-
const
|
|
5054
|
-
container:
|
|
5055
|
-
title:
|
|
5059
|
+
const td = "_container_hoha1_1", nd = "_title_hoha1_5", hi = {
|
|
5060
|
+
container: td,
|
|
5061
|
+
title: nd
|
|
5056
5062
|
};
|
|
5057
|
-
class
|
|
5063
|
+
class rd {
|
|
5058
5064
|
constructor(e) {
|
|
5059
5065
|
b(this, "element");
|
|
5060
5066
|
b(this, "message", document.createElement("p"));
|
|
5061
|
-
b(this, "icon", new
|
|
5062
|
-
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(
|
|
5067
|
+
b(this, "icon", new ed());
|
|
5068
|
+
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(hi.container), this.message.classList.add(hi.title), this.message.textContent = e.messages().status.success, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: t }) => {
|
|
5063
5069
|
this.message.textContent = t.status.success;
|
|
5064
5070
|
});
|
|
5065
5071
|
}
|
|
@@ -5073,18 +5079,18 @@ class nd {
|
|
|
5073
5079
|
return this.element;
|
|
5074
5080
|
}
|
|
5075
5081
|
}
|
|
5076
|
-
class
|
|
5082
|
+
class id {
|
|
5077
5083
|
constructor(e) {
|
|
5078
5084
|
b(this, "isLoading", !1);
|
|
5079
5085
|
b(this, "isFormOpen", !1);
|
|
5080
5086
|
b(this, "checkout");
|
|
5081
5087
|
b(this, "container", document.createElement("div"));
|
|
5082
|
-
b(this, "loader", new
|
|
5088
|
+
b(this, "loader", new ic());
|
|
5083
5089
|
b(this, "error");
|
|
5084
5090
|
b(this, "success");
|
|
5085
5091
|
b(this, "buttons");
|
|
5086
5092
|
b(this, "form");
|
|
5087
|
-
this.config = e, this.buttons = new
|
|
5093
|
+
this.config = e, this.buttons = new Qc(e), this.form = new Ju(e.state.translate, le.hidden), this.error = new xa(e.state.translate), this.success = new rd(e.state.translate), this.error.addClassName(le.hidden), this.success.addClassName(le.hidden), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(le.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
|
|
5088
5094
|
}
|
|
5089
5095
|
// init
|
|
5090
5096
|
init() {
|
|
@@ -5105,7 +5111,7 @@ class rd {
|
|
|
5105
5111
|
return this.handleSuccess({ clientSession: t, googlePay: e });
|
|
5106
5112
|
case "paypal":
|
|
5107
5113
|
return this.handleSuccess({ clientSession: t, paypal: { billing_agreement_token: e } });
|
|
5108
|
-
// TODO: add braintree
|
|
5114
|
+
// TODO: add braintree venmo
|
|
5109
5115
|
case "venmo":
|
|
5110
5116
|
return console.log("----- venmo success data", e), this.handleSuccess({ clientSession: t, braintree: { nonce: e } });
|
|
5111
5117
|
}
|
|
@@ -5124,7 +5130,7 @@ class rd {
|
|
|
5124
5130
|
cardBrand: e.cardBrand || "",
|
|
5125
5131
|
number: s,
|
|
5126
5132
|
cvc: o,
|
|
5127
|
-
type:
|
|
5133
|
+
type: Na.Card,
|
|
5128
5134
|
metadata: {
|
|
5129
5135
|
name: e.name,
|
|
5130
5136
|
userAgent: navigator == null ? void 0 : navigator.userAgent
|
|
@@ -5148,14 +5154,14 @@ class rd {
|
|
|
5148
5154
|
this.hideError(), this.setLoading(!0);
|
|
5149
5155
|
const t = this.config.state.checkout.getState(), r = this.config.state.translate.messages();
|
|
5150
5156
|
try {
|
|
5151
|
-
const a = yield
|
|
5157
|
+
const a = yield jc(e, t.environment, t.apiVersion);
|
|
5152
5158
|
if (a.error)
|
|
5153
5159
|
throw new Error(r.status.error);
|
|
5154
5160
|
if (a.three_ds_session_id) {
|
|
5155
5161
|
yield this.config.service.ev.initThreeDs({
|
|
5156
5162
|
threeDsId: a.three_ds_session_id,
|
|
5157
5163
|
onSuccess: () => {
|
|
5158
|
-
this.setLoading(!1), this.handleSuccess(te(
|
|
5164
|
+
this.setLoading(!1), this.handleSuccess(te(Q({}, e), { threeDsSessionId: a.three_ds_session_id }));
|
|
5159
5165
|
},
|
|
5160
5166
|
onError: () => {
|
|
5161
5167
|
this.handleError("Three DS Error");
|
|
@@ -5192,22 +5198,22 @@ class rd {
|
|
|
5192
5198
|
return this.checkout;
|
|
5193
5199
|
}
|
|
5194
5200
|
}
|
|
5195
|
-
class
|
|
5201
|
+
class ad {
|
|
5196
5202
|
constructor(e) {
|
|
5197
5203
|
b(this, "component");
|
|
5198
|
-
this.config = e, this.component = new
|
|
5204
|
+
this.config = e, this.component = new id(e);
|
|
5199
5205
|
}
|
|
5200
5206
|
// init
|
|
5201
5207
|
init() {
|
|
5202
5208
|
return j(this, null, function* () {
|
|
5203
|
-
const { checkout: e, transaction: t, translate: r, styles: i } = this.config.state;
|
|
5204
|
-
e.subscribe(({ clientToken:
|
|
5205
|
-
|
|
5206
|
-
var
|
|
5207
|
-
if (
|
|
5209
|
+
const { checkout: e, transaction: t, translate: r, styles: i } = this.config.state, { apiVersion: a } = e.getState();
|
|
5210
|
+
e.subscribe(({ clientToken: s, environment: o, locale: l, translate: c, styles: u }) => {
|
|
5211
|
+
l && r.locale() !== l && r.setLocale(l), c && r.overrides() !== c && r.setMessages(c), u && i.setState(u), t.updateTransaction(s, o, a).then((d) => {
|
|
5212
|
+
var h, p;
|
|
5213
|
+
if (d)
|
|
5208
5214
|
return this.config.service.ev.initEv({
|
|
5209
|
-
teamId: (
|
|
5210
|
-
appId: (
|
|
5215
|
+
teamId: (h = d.evervault) == null ? void 0 : h.team_id,
|
|
5216
|
+
appId: (p = d.evervault) == null ? void 0 : p.app_id
|
|
5211
5217
|
});
|
|
5212
5218
|
}).catch(console.error);
|
|
5213
5219
|
});
|
|
@@ -5240,37 +5246,38 @@ class Tt {
|
|
|
5240
5246
|
return this.observer.addListener(e);
|
|
5241
5247
|
}
|
|
5242
5248
|
}
|
|
5243
|
-
const
|
|
5249
|
+
const sd = {
|
|
5244
5250
|
clientToken: "",
|
|
5245
|
-
environment: "sandbox"
|
|
5251
|
+
environment: "sandbox",
|
|
5252
|
+
apiVersion: "1.0.0"
|
|
5246
5253
|
};
|
|
5247
|
-
class
|
|
5254
|
+
class od extends Tt {
|
|
5248
5255
|
constructor(e) {
|
|
5249
|
-
super(
|
|
5256
|
+
super(Q(Q({}, sd), e));
|
|
5250
5257
|
}
|
|
5251
5258
|
}
|
|
5252
|
-
const
|
|
5253
|
-
class
|
|
5259
|
+
const ld = {};
|
|
5260
|
+
class cd extends Tt {
|
|
5254
5261
|
constructor(e) {
|
|
5255
|
-
super(e ||
|
|
5262
|
+
super(e || ld);
|
|
5256
5263
|
}
|
|
5257
5264
|
}
|
|
5258
|
-
class
|
|
5265
|
+
class ud extends Tt {
|
|
5259
5266
|
constructor(t) {
|
|
5260
5267
|
super(t || null);
|
|
5261
5268
|
b(this, "clientToken", "");
|
|
5262
5269
|
}
|
|
5263
5270
|
// update transaction
|
|
5264
|
-
updateTransaction(t, r
|
|
5271
|
+
updateTransaction(t, r, i) {
|
|
5265
5272
|
return j(this, null, function* () {
|
|
5266
5273
|
if (this.clientToken === t) return this.getState();
|
|
5267
5274
|
this.clientToken = t;
|
|
5268
|
-
const
|
|
5269
|
-
return this.setState(
|
|
5275
|
+
const a = yield qc(t, r, i);
|
|
5276
|
+
return this.setState(a), a;
|
|
5270
5277
|
});
|
|
5271
5278
|
}
|
|
5272
5279
|
}
|
|
5273
|
-
const
|
|
5280
|
+
const dd = {
|
|
5274
5281
|
card: {
|
|
5275
5282
|
title: "طريقة الدفع",
|
|
5276
5283
|
number: {
|
|
@@ -5320,7 +5327,7 @@ const ud = {
|
|
|
5320
5327
|
success: "تمت عملية الدفع الخاصة بك بنجاح!",
|
|
5321
5328
|
error: "لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."
|
|
5322
5329
|
}
|
|
5323
|
-
},
|
|
5330
|
+
}, pd = {
|
|
5324
5331
|
card: {
|
|
5325
5332
|
title: "Метод на плащане",
|
|
5326
5333
|
number: {
|
|
@@ -5370,7 +5377,7 @@ const ud = {
|
|
|
5370
5377
|
success: "Успех",
|
|
5371
5378
|
error: "Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."
|
|
5372
5379
|
}
|
|
5373
|
-
},
|
|
5380
|
+
}, hd = {
|
|
5374
5381
|
card: {
|
|
5375
5382
|
title: "Způsob platby",
|
|
5376
5383
|
number: {
|
|
@@ -5420,7 +5427,7 @@ const ud = {
|
|
|
5420
5427
|
success: "Úspěch",
|
|
5421
5428
|
error: "Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."
|
|
5422
5429
|
}
|
|
5423
|
-
},
|
|
5430
|
+
}, md = {
|
|
5424
5431
|
card: {
|
|
5425
5432
|
title: "Betalingsmetode",
|
|
5426
5433
|
number: {
|
|
@@ -5470,7 +5477,7 @@ const ud = {
|
|
|
5470
5477
|
success: "Succes",
|
|
5471
5478
|
error: "Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."
|
|
5472
5479
|
}
|
|
5473
|
-
},
|
|
5480
|
+
}, fd = {
|
|
5474
5481
|
card: {
|
|
5475
5482
|
title: "Zahlungsmethode",
|
|
5476
5483
|
number: {
|
|
@@ -5520,7 +5527,7 @@ const ud = {
|
|
|
5520
5527
|
success: "Erfolg",
|
|
5521
5528
|
error: "Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."
|
|
5522
5529
|
}
|
|
5523
|
-
},
|
|
5530
|
+
}, vd = {
|
|
5524
5531
|
card: {
|
|
5525
5532
|
title: "Μέθοδος πληρωμής",
|
|
5526
5533
|
number: {
|
|
@@ -5570,7 +5577,7 @@ const ud = {
|
|
|
5570
5577
|
success: "Επιτυχία",
|
|
5571
5578
|
error: "Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."
|
|
5572
5579
|
}
|
|
5573
|
-
},
|
|
5580
|
+
}, gd = {
|
|
5574
5581
|
card: {
|
|
5575
5582
|
title: "Payment method",
|
|
5576
5583
|
number: {
|
|
@@ -5620,7 +5627,7 @@ const ud = {
|
|
|
5620
5627
|
success: "Your payment was successful!",
|
|
5621
5628
|
error: "We are unable to authenticate your payment method. Please choose a different payment method and try again."
|
|
5622
5629
|
}
|
|
5623
|
-
},
|
|
5630
|
+
}, yd = {
|
|
5624
5631
|
card: {
|
|
5625
5632
|
title: "Método de pago",
|
|
5626
5633
|
number: {
|
|
@@ -5670,7 +5677,7 @@ const ud = {
|
|
|
5670
5677
|
success: "Éxito",
|
|
5671
5678
|
error: "No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."
|
|
5672
5679
|
}
|
|
5673
|
-
},
|
|
5680
|
+
}, bd = {
|
|
5674
5681
|
card: {
|
|
5675
5682
|
title: "Makseviis",
|
|
5676
5683
|
number: {
|
|
@@ -5720,7 +5727,7 @@ const ud = {
|
|
|
5720
5727
|
success: "Edu",
|
|
5721
5728
|
error: "Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."
|
|
5722
5729
|
}
|
|
5723
|
-
},
|
|
5730
|
+
}, Ed = {
|
|
5724
5731
|
card: {
|
|
5725
5732
|
title: "Maksutapa",
|
|
5726
5733
|
number: {
|
|
@@ -5770,7 +5777,7 @@ const ud = {
|
|
|
5770
5777
|
success: "Menestys",
|
|
5771
5778
|
error: "Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."
|
|
5772
5779
|
}
|
|
5773
|
-
},
|
|
5780
|
+
}, _d = {
|
|
5774
5781
|
card: {
|
|
5775
5782
|
title: "Paraan ng pagbabayad",
|
|
5776
5783
|
number: {
|
|
@@ -5820,7 +5827,7 @@ const ud = {
|
|
|
5820
5827
|
success: "Tagumpay",
|
|
5821
5828
|
error: "Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."
|
|
5822
5829
|
}
|
|
5823
|
-
},
|
|
5830
|
+
}, Cd = {
|
|
5824
5831
|
card: {
|
|
5825
5832
|
title: "Moyen de paiement",
|
|
5826
5833
|
number: {
|
|
@@ -5870,7 +5877,7 @@ const ud = {
|
|
|
5870
5877
|
success: "Succès",
|
|
5871
5878
|
error: "Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."
|
|
5872
5879
|
}
|
|
5873
|
-
},
|
|
5880
|
+
}, Ad = {
|
|
5874
5881
|
card: {
|
|
5875
5882
|
title: "Način plaćanja",
|
|
5876
5883
|
number: {
|
|
@@ -5920,7 +5927,7 @@ const ud = {
|
|
|
5920
5927
|
success: "Uspjeh",
|
|
5921
5928
|
error: "Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."
|
|
5922
5929
|
}
|
|
5923
|
-
},
|
|
5930
|
+
}, wd = {
|
|
5924
5931
|
card: {
|
|
5925
5932
|
title: "Fizetési mód",
|
|
5926
5933
|
number: {
|
|
@@ -5970,7 +5977,7 @@ const ud = {
|
|
|
5970
5977
|
success: "Siker",
|
|
5971
5978
|
error: "Nem tudjuk hitelesíteni a fizetési módját. Kérjük, válasszon másik fizetési módot, és próbálja meg újra."
|
|
5972
5979
|
}
|
|
5973
|
-
},
|
|
5980
|
+
}, Td = {
|
|
5974
5981
|
card: {
|
|
5975
5982
|
title: "Metode pembayaran",
|
|
5976
5983
|
number: {
|
|
@@ -6020,7 +6027,7 @@ const ud = {
|
|
|
6020
6027
|
success: "Sukses",
|
|
6021
6028
|
error: "Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."
|
|
6022
6029
|
}
|
|
6023
|
-
},
|
|
6030
|
+
}, Id = {
|
|
6024
6031
|
card: {
|
|
6025
6032
|
title: "Modalità di pagamento",
|
|
6026
6033
|
number: {
|
|
@@ -6070,7 +6077,7 @@ const ud = {
|
|
|
6070
6077
|
success: "Il successo",
|
|
6071
6078
|
error: "Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."
|
|
6072
6079
|
}
|
|
6073
|
-
},
|
|
6080
|
+
}, Od = {
|
|
6074
6081
|
card: {
|
|
6075
6082
|
title: "支払い方法",
|
|
6076
6083
|
number: {
|
|
@@ -6120,7 +6127,7 @@ const ud = {
|
|
|
6120
6127
|
success: "成功",
|
|
6121
6128
|
error: "お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"
|
|
6122
6129
|
}
|
|
6123
|
-
},
|
|
6130
|
+
}, Nd = {
|
|
6124
6131
|
card: {
|
|
6125
6132
|
title: "결제 방식",
|
|
6126
6133
|
number: {
|
|
@@ -6170,7 +6177,7 @@ const ud = {
|
|
|
6170
6177
|
success: "성공",
|
|
6171
6178
|
error: "결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."
|
|
6172
6179
|
}
|
|
6173
|
-
},
|
|
6180
|
+
}, xd = {
|
|
6174
6181
|
card: {
|
|
6175
6182
|
title: "Mokėjimo būdas",
|
|
6176
6183
|
number: {
|
|
@@ -6220,7 +6227,7 @@ const ud = {
|
|
|
6220
6227
|
success: "Sėkmė",
|
|
6221
6228
|
error: "Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."
|
|
6222
6229
|
}
|
|
6223
|
-
},
|
|
6230
|
+
}, Ld = {
|
|
6224
6231
|
card: {
|
|
6225
6232
|
title: "Maksājumu veids",
|
|
6226
6233
|
number: {
|
|
@@ -6270,7 +6277,7 @@ const ud = {
|
|
|
6270
6277
|
success: "Panākumi",
|
|
6271
6278
|
error: "Mēs nevaram pārbaudīt jūsu maksājuma metodes autentiskumu. Lūdzu, izvēlieties citu maksājumu metodi un mēģiniet vēlreiz."
|
|
6272
6279
|
}
|
|
6273
|
-
},
|
|
6280
|
+
}, Pd = {
|
|
6274
6281
|
card: {
|
|
6275
6282
|
title: "Kaedah pembayaran",
|
|
6276
6283
|
number: {
|
|
@@ -6320,7 +6327,7 @@ const ud = {
|
|
|
6320
6327
|
success: "Kejayaan",
|
|
6321
6328
|
error: "Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."
|
|
6322
6329
|
}
|
|
6323
|
-
},
|
|
6330
|
+
}, Rd = {
|
|
6324
6331
|
card: {
|
|
6325
6332
|
title: "Metodu tal-ħlas",
|
|
6326
6333
|
number: {
|
|
@@ -6370,7 +6377,7 @@ const ud = {
|
|
|
6370
6377
|
success: "Suċċess",
|
|
6371
6378
|
error: "Aħna ma nistgħux jawtentikaw il-metodu tal-ħlas tiegħek. Jekk jogħġbok agħżel metodu ta' ħlas differenti u erġa' pprova."
|
|
6372
6379
|
}
|
|
6373
|
-
},
|
|
6380
|
+
}, Sd = {
|
|
6374
6381
|
card: {
|
|
6375
6382
|
title: "Betalingsmetode",
|
|
6376
6383
|
number: {
|
|
@@ -6420,7 +6427,7 @@ const ud = {
|
|
|
6420
6427
|
success: "Suksess",
|
|
6421
6428
|
error: "Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."
|
|
6422
6429
|
}
|
|
6423
|
-
},
|
|
6430
|
+
}, kd = {
|
|
6424
6431
|
card: {
|
|
6425
6432
|
title: "Betaalmethode",
|
|
6426
6433
|
number: {
|
|
@@ -6470,7 +6477,7 @@ const ud = {
|
|
|
6470
6477
|
success: "Succes",
|
|
6471
6478
|
error: "We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."
|
|
6472
6479
|
}
|
|
6473
|
-
},
|
|
6480
|
+
}, Md = {
|
|
6474
6481
|
card: {
|
|
6475
6482
|
title: "Metoda płatności",
|
|
6476
6483
|
number: {
|
|
@@ -6520,7 +6527,7 @@ const ud = {
|
|
|
6520
6527
|
success: "Sukces",
|
|
6521
6528
|
error: "Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."
|
|
6522
6529
|
}
|
|
6523
|
-
},
|
|
6530
|
+
}, Dd = {
|
|
6524
6531
|
card: {
|
|
6525
6532
|
title: "Forma de pagamento",
|
|
6526
6533
|
number: {
|
|
@@ -6570,7 +6577,7 @@ const ud = {
|
|
|
6570
6577
|
success: "Sucesso",
|
|
6571
6578
|
error: "Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."
|
|
6572
6579
|
}
|
|
6573
|
-
},
|
|
6580
|
+
}, Vd = {
|
|
6574
6581
|
card: {
|
|
6575
6582
|
title: "Metoda de plată",
|
|
6576
6583
|
number: {
|
|
@@ -6620,7 +6627,7 @@ const ud = {
|
|
|
6620
6627
|
success: "Succes",
|
|
6621
6628
|
error: "Nu putem să vă autentificăm metoda de plată. Vă rugăm să alegeți o altă metodă de plată și să încercați din nou."
|
|
6622
6629
|
}
|
|
6623
|
-
},
|
|
6630
|
+
}, Fd = {
|
|
6624
6631
|
card: {
|
|
6625
6632
|
title: "Метод оплаты",
|
|
6626
6633
|
number: {
|
|
@@ -6670,7 +6677,7 @@ const ud = {
|
|
|
6670
6677
|
success: "Успех",
|
|
6671
6678
|
error: "Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."
|
|
6672
6679
|
}
|
|
6673
|
-
},
|
|
6680
|
+
}, Ud = {
|
|
6674
6681
|
card: {
|
|
6675
6682
|
title: "Spôsob platby",
|
|
6676
6683
|
number: {
|
|
@@ -6720,7 +6727,7 @@ const ud = {
|
|
|
6720
6727
|
success: "Úspech",
|
|
6721
6728
|
error: "Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."
|
|
6722
6729
|
}
|
|
6723
|
-
},
|
|
6730
|
+
}, Bd = {
|
|
6724
6731
|
card: {
|
|
6725
6732
|
title: "Način plačila",
|
|
6726
6733
|
number: {
|
|
@@ -6770,7 +6777,7 @@ const ud = {
|
|
|
6770
6777
|
success: "Uspeh",
|
|
6771
6778
|
error: "Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."
|
|
6772
6779
|
}
|
|
6773
|
-
},
|
|
6780
|
+
}, zd = {
|
|
6774
6781
|
card: {
|
|
6775
6782
|
title: "Betalningsmetod",
|
|
6776
6783
|
number: {
|
|
@@ -6820,7 +6827,7 @@ const ud = {
|
|
|
6820
6827
|
success: "Framgång",
|
|
6821
6828
|
error: "Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."
|
|
6822
6829
|
}
|
|
6823
|
-
},
|
|
6830
|
+
}, jd = {
|
|
6824
6831
|
card: {
|
|
6825
6832
|
title: "วิธีการชำระเงิน",
|
|
6826
6833
|
number: {
|
|
@@ -6870,7 +6877,7 @@ const ud = {
|
|
|
6870
6877
|
success: "ความสำเร็จ",
|
|
6871
6878
|
error: "เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"
|
|
6872
6879
|
}
|
|
6873
|
-
},
|
|
6880
|
+
}, Kd = {
|
|
6874
6881
|
card: {
|
|
6875
6882
|
title: "Ödeme yöntemi",
|
|
6876
6883
|
number: {
|
|
@@ -6920,7 +6927,7 @@ const ud = {
|
|
|
6920
6927
|
success: "Başarı",
|
|
6921
6928
|
error: "Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."
|
|
6922
6929
|
}
|
|
6923
|
-
},
|
|
6930
|
+
}, qd = {
|
|
6924
6931
|
card: {
|
|
6925
6932
|
title: "Phương thức thanh toán",
|
|
6926
6933
|
number: {
|
|
@@ -6970,7 +6977,7 @@ const ud = {
|
|
|
6970
6977
|
success: "Thành công",
|
|
6971
6978
|
error: "Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại."
|
|
6972
6979
|
}
|
|
6973
|
-
},
|
|
6980
|
+
}, Hd = {
|
|
6974
6981
|
card: {
|
|
6975
6982
|
title: "支付方式",
|
|
6976
6983
|
number: {
|
|
@@ -7021,45 +7028,45 @@ const ud = {
|
|
|
7021
7028
|
error: "我们无法验证您的付款方式。请选择其他付款方式并重试。"
|
|
7022
7029
|
}
|
|
7023
7030
|
}, Jt = {
|
|
7024
|
-
ar:
|
|
7025
|
-
en:
|
|
7026
|
-
bg:
|
|
7027
|
-
cs:
|
|
7028
|
-
da:
|
|
7029
|
-
de:
|
|
7030
|
-
el:
|
|
7031
|
-
es:
|
|
7032
|
-
et:
|
|
7033
|
-
fi:
|
|
7034
|
-
fil:
|
|
7035
|
-
fr:
|
|
7036
|
-
hr:
|
|
7037
|
-
hu:
|
|
7038
|
-
id:
|
|
7039
|
-
it:
|
|
7040
|
-
ja:
|
|
7041
|
-
ko:
|
|
7042
|
-
lt:
|
|
7043
|
-
lv:
|
|
7044
|
-
ms:
|
|
7045
|
-
ru:
|
|
7046
|
-
mt:
|
|
7047
|
-
nb:
|
|
7048
|
-
nl:
|
|
7049
|
-
pl:
|
|
7050
|
-
pt:
|
|
7051
|
-
ro:
|
|
7052
|
-
sk:
|
|
7053
|
-
sl:
|
|
7054
|
-
sv:
|
|
7055
|
-
th:
|
|
7056
|
-
tr:
|
|
7057
|
-
vi:
|
|
7058
|
-
zh:
|
|
7031
|
+
ar: dd,
|
|
7032
|
+
en: gd,
|
|
7033
|
+
bg: pd,
|
|
7034
|
+
cs: hd,
|
|
7035
|
+
da: md,
|
|
7036
|
+
de: fd,
|
|
7037
|
+
el: vd,
|
|
7038
|
+
es: yd,
|
|
7039
|
+
et: bd,
|
|
7040
|
+
fi: Ed,
|
|
7041
|
+
fil: _d,
|
|
7042
|
+
fr: Cd,
|
|
7043
|
+
hr: Ad,
|
|
7044
|
+
hu: wd,
|
|
7045
|
+
id: Td,
|
|
7046
|
+
it: Id,
|
|
7047
|
+
ja: Od,
|
|
7048
|
+
ko: Nd,
|
|
7049
|
+
lt: xd,
|
|
7050
|
+
lv: Ld,
|
|
7051
|
+
ms: Pd,
|
|
7052
|
+
ru: Fd,
|
|
7053
|
+
mt: Rd,
|
|
7054
|
+
nb: Sd,
|
|
7055
|
+
nl: kd,
|
|
7056
|
+
pl: Md,
|
|
7057
|
+
pt: Dd,
|
|
7058
|
+
ro: Vd,
|
|
7059
|
+
sk: Ud,
|
|
7060
|
+
sl: Bd,
|
|
7061
|
+
sv: zd,
|
|
7062
|
+
th: jd,
|
|
7063
|
+
tr: Kd,
|
|
7064
|
+
vi: qd,
|
|
7065
|
+
zh: Hd
|
|
7059
7066
|
}, en = () => {
|
|
7060
7067
|
const n = navigator == null ? void 0 : navigator.language.split("-")[0];
|
|
7061
7068
|
return Jt[n] || Jt.en;
|
|
7062
|
-
},
|
|
7069
|
+
}, mi = (n, e = {}) => {
|
|
7063
7070
|
var r, i, a, s, o, l, c, u, d, h, p, m, f, v, y, w, T, x, A, I, L, k, B, G, q, M, F, K, J, S, W, z, g, E, R, U, _, O, C, P, V, N, H, X, re, D, ee, me, ze, je, Ke, qe, He, We, Ge, Ye, Qe;
|
|
7064
7071
|
if (!n) return en();
|
|
7065
7072
|
const t = Jt[n] || en();
|
|
@@ -7115,7 +7122,7 @@ const ud = {
|
|
|
7115
7122
|
}
|
|
7116
7123
|
};
|
|
7117
7124
|
};
|
|
7118
|
-
class
|
|
7125
|
+
class Wd extends Tt {
|
|
7119
7126
|
constructor() {
|
|
7120
7127
|
super({
|
|
7121
7128
|
messages: en(),
|
|
@@ -7123,11 +7130,11 @@ class Hd extends Tt {
|
|
|
7123
7130
|
});
|
|
7124
7131
|
}
|
|
7125
7132
|
setMessages(e) {
|
|
7126
|
-
const t = this.locale(), r =
|
|
7133
|
+
const t = this.locale(), r = mi(t, e);
|
|
7127
7134
|
this.setState({ locale: t, messages: r, overrides: e });
|
|
7128
7135
|
}
|
|
7129
7136
|
setLocale(e) {
|
|
7130
|
-
const t = this.overrides(), r =
|
|
7137
|
+
const t = this.overrides(), r = mi(e, t);
|
|
7131
7138
|
this.setState({ locale: e, messages: r, overrides: t });
|
|
7132
7139
|
}
|
|
7133
7140
|
overrides() {
|
|
@@ -7162,7 +7169,7 @@ class Hd extends Tt {
|
|
|
7162
7169
|
* See the License for the specific language governing permissions and
|
|
7163
7170
|
* limitations under the License.
|
|
7164
7171
|
*/
|
|
7165
|
-
function
|
|
7172
|
+
function Gd(n, e) {
|
|
7166
7173
|
var t = {};
|
|
7167
7174
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
7168
7175
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -7170,11 +7177,11 @@ function Wd(n, e) {
|
|
|
7170
7177
|
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
|
|
7171
7178
|
return t;
|
|
7172
7179
|
}
|
|
7173
|
-
function
|
|
7180
|
+
function Yd(n, e) {
|
|
7174
7181
|
var t = document.querySelector('script[src="'.concat(n, '"]'));
|
|
7175
7182
|
if (t === null)
|
|
7176
7183
|
return null;
|
|
7177
|
-
var r =
|
|
7184
|
+
var r = La(n, e), i = t.cloneNode();
|
|
7178
7185
|
if (delete i.dataset.uidAuto, Object.keys(i.dataset).length !== Object.keys(r.dataset).length)
|
|
7179
7186
|
return null;
|
|
7180
7187
|
var a = !0;
|
|
@@ -7182,63 +7189,63 @@ function Gd(n, e) {
|
|
|
7182
7189
|
i.dataset[s] !== r.dataset[s] && (a = !1);
|
|
7183
7190
|
}), a ? t : null;
|
|
7184
7191
|
}
|
|
7185
|
-
function
|
|
7186
|
-
var e = n.url, t = n.attributes, r = n.onSuccess, i = n.onError, a =
|
|
7192
|
+
function Qd(n) {
|
|
7193
|
+
var e = n.url, t = n.attributes, r = n.onSuccess, i = n.onError, a = La(e, t);
|
|
7187
7194
|
a.onerror = i, a.onload = r, document.head.insertBefore(a, document.head.firstElementChild);
|
|
7188
7195
|
}
|
|
7189
|
-
function
|
|
7190
|
-
var e = n.sdkBaseUrl, t = n.environment, r =
|
|
7196
|
+
function $d(n) {
|
|
7197
|
+
var e = n.sdkBaseUrl, t = n.environment, r = Gd(n, ["sdkBaseUrl", "environment"]), i = e || Jd(t), a = r, s = Object.keys(a).filter(function(c) {
|
|
7191
7198
|
return typeof a[c] != "undefined" && a[c] !== null && a[c] !== "";
|
|
7192
7199
|
}).reduce(function(c, u) {
|
|
7193
7200
|
var d = a[u].toString();
|
|
7194
|
-
return u =
|
|
7201
|
+
return u = Zd(u), u.substring(0, 4) === "data" || u === "crossorigin" ? c.attributes[u] = d : c.queryParams[u] = d, c;
|
|
7195
7202
|
}, {
|
|
7196
7203
|
queryParams: {},
|
|
7197
7204
|
attributes: {}
|
|
7198
7205
|
}), o = s.queryParams, l = s.attributes;
|
|
7199
7206
|
return o["merchant-id"] && o["merchant-id"].indexOf(",") !== -1 && (l["data-merchant-id"] = o["merchant-id"], o["merchant-id"] = "*"), {
|
|
7200
|
-
url: "".concat(i, "?").concat(
|
|
7207
|
+
url: "".concat(i, "?").concat(Xd(o)),
|
|
7201
7208
|
attributes: l
|
|
7202
7209
|
};
|
|
7203
7210
|
}
|
|
7204
|
-
function
|
|
7211
|
+
function Zd(n) {
|
|
7205
7212
|
var e = function(t, r) {
|
|
7206
7213
|
return (r ? "-" : "") + t.toLowerCase();
|
|
7207
7214
|
};
|
|
7208
7215
|
return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g, e);
|
|
7209
7216
|
}
|
|
7210
|
-
function
|
|
7217
|
+
function Xd(n) {
|
|
7211
7218
|
var e = "";
|
|
7212
7219
|
return Object.keys(n).forEach(function(t) {
|
|
7213
7220
|
e.length !== 0 && (e += "&"), e += t + "=" + n[t];
|
|
7214
7221
|
}), e;
|
|
7215
7222
|
}
|
|
7216
|
-
function
|
|
7223
|
+
function Jd(n) {
|
|
7217
7224
|
return n === "sandbox" ? "https://www.sandbox.paypal.com/sdk/js" : "https://www.paypal.com/sdk/js";
|
|
7218
7225
|
}
|
|
7219
|
-
function
|
|
7226
|
+
function La(n, e) {
|
|
7220
7227
|
e === void 0 && (e = {});
|
|
7221
7228
|
var t = document.createElement("script");
|
|
7222
7229
|
return t.src = n, Object.keys(e).forEach(function(r) {
|
|
7223
7230
|
t.setAttribute(r, e[r]), r === "data-csp-nonce" && t.setAttribute("nonce", e["data-csp-nonce"]);
|
|
7224
7231
|
}), t;
|
|
7225
7232
|
}
|
|
7226
|
-
function
|
|
7227
|
-
if (e === void 0 && (e = Promise),
|
|
7233
|
+
function ep(n, e) {
|
|
7234
|
+
if (e === void 0 && (e = Promise), Pa(n, e), typeof document == "undefined")
|
|
7228
7235
|
return e.resolve(null);
|
|
7229
|
-
var t =
|
|
7230
|
-
return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"),
|
|
7236
|
+
var t = $d(n), r = t.url, i = t.attributes, a = i["data-namespace"] || "paypal", s = fi(a);
|
|
7237
|
+
return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), Yd(r, i) && s ? e.resolve(s) : tp({
|
|
7231
7238
|
url: r,
|
|
7232
7239
|
attributes: i
|
|
7233
7240
|
}, e).then(function() {
|
|
7234
|
-
var o =
|
|
7241
|
+
var o = fi(a);
|
|
7235
7242
|
if (o)
|
|
7236
7243
|
return o;
|
|
7237
7244
|
throw new Error("The window.".concat(a, " global variable is not available."));
|
|
7238
7245
|
});
|
|
7239
7246
|
}
|
|
7240
|
-
function
|
|
7241
|
-
e === void 0 && (e = Promise),
|
|
7247
|
+
function tp(n, e) {
|
|
7248
|
+
e === void 0 && (e = Promise), Pa(n, e);
|
|
7242
7249
|
var t = n.url, r = n.attributes;
|
|
7243
7250
|
if (typeof t != "string" || t.length === 0)
|
|
7244
7251
|
throw new Error("Invalid url.");
|
|
@@ -7247,7 +7254,7 @@ function ep(n, e) {
|
|
|
7247
7254
|
return new e(function(i, a) {
|
|
7248
7255
|
if (typeof document == "undefined")
|
|
7249
7256
|
return i();
|
|
7250
|
-
|
|
7257
|
+
Qd({
|
|
7251
7258
|
url: t,
|
|
7252
7259
|
attributes: r,
|
|
7253
7260
|
onSuccess: function() {
|
|
@@ -7260,10 +7267,10 @@ function ep(n, e) {
|
|
|
7260
7267
|
});
|
|
7261
7268
|
});
|
|
7262
7269
|
}
|
|
7263
|
-
function
|
|
7270
|
+
function fi(n) {
|
|
7264
7271
|
return window[n];
|
|
7265
7272
|
}
|
|
7266
|
-
function
|
|
7273
|
+
function Pa(n, e) {
|
|
7267
7274
|
if (typeof n != "object" || n === null)
|
|
7268
7275
|
throw new Error("Expected an options object.");
|
|
7269
7276
|
var t = n.environment;
|
|
@@ -7272,13 +7279,13 @@ function La(n, e) {
|
|
|
7272
7279
|
if (typeof e != "undefined" && typeof e != "function")
|
|
7273
7280
|
throw new Error("Expected PromisePonyfill to be a function.");
|
|
7274
7281
|
}
|
|
7275
|
-
const
|
|
7282
|
+
const np = {
|
|
7276
7283
|
layout: "vertical",
|
|
7277
7284
|
tagline: !1,
|
|
7278
7285
|
height: 40,
|
|
7279
7286
|
borderRadius: 12
|
|
7280
7287
|
};
|
|
7281
|
-
class
|
|
7288
|
+
class rp {
|
|
7282
7289
|
constructor() {
|
|
7283
7290
|
b(this, "paypal", null);
|
|
7284
7291
|
}
|
|
@@ -7286,7 +7293,7 @@ class np {
|
|
|
7286
7293
|
init(e) {
|
|
7287
7294
|
return j(this, null, function* () {
|
|
7288
7295
|
try {
|
|
7289
|
-
this.paypal = yield
|
|
7296
|
+
this.paypal = yield ep(e);
|
|
7290
7297
|
} catch (t) {
|
|
7291
7298
|
console.error("failed to load the PayPal JS SDK script", t);
|
|
7292
7299
|
}
|
|
@@ -7296,9 +7303,9 @@ class np {
|
|
|
7296
7303
|
render(e, t) {
|
|
7297
7304
|
return j(this, null, function* () {
|
|
7298
7305
|
var r, i;
|
|
7299
|
-
this.paypal && (yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r,
|
|
7306
|
+
this.paypal && (yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r, Q({
|
|
7300
7307
|
fundingSource: "paypal",
|
|
7301
|
-
style:
|
|
7308
|
+
style: np
|
|
7302
7309
|
}, t)).render(e));
|
|
7303
7310
|
});
|
|
7304
7311
|
}
|
|
@@ -7306,9 +7313,9 @@ class np {
|
|
|
7306
7313
|
function Te(n) {
|
|
7307
7314
|
throw new Error('Could not dynamically require "' + n + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
7308
7315
|
}
|
|
7309
|
-
var Dt = { exports: {} },
|
|
7310
|
-
function
|
|
7311
|
-
return
|
|
7316
|
+
var Dt = { exports: {} }, vi;
|
|
7317
|
+
function ip() {
|
|
7318
|
+
return vi || (vi = 1, function(n, e) {
|
|
7312
7319
|
(function(t) {
|
|
7313
7320
|
n.exports = t();
|
|
7314
7321
|
})(function() {
|
|
@@ -8981,11 +8988,11 @@ function rp() {
|
|
|
8981
8988
|
});
|
|
8982
8989
|
}(Dt)), Dt.exports;
|
|
8983
8990
|
}
|
|
8984
|
-
var
|
|
8985
|
-
const
|
|
8986
|
-
var Vt = { exports: {} },
|
|
8987
|
-
function
|
|
8988
|
-
return
|
|
8991
|
+
var ap = ip();
|
|
8992
|
+
const sp = /* @__PURE__ */ Ta(ap);
|
|
8993
|
+
var Vt = { exports: {} }, gi;
|
|
8994
|
+
function op() {
|
|
8995
|
+
return gi || (gi = 1, function(n, e) {
|
|
8989
8996
|
(function(t) {
|
|
8990
8997
|
n.exports = t();
|
|
8991
8998
|
})(function() {
|
|
@@ -11877,9 +11884,9 @@ function sp() {
|
|
|
11877
11884
|
});
|
|
11878
11885
|
}(Vt)), Vt.exports;
|
|
11879
11886
|
}
|
|
11880
|
-
var
|
|
11881
|
-
const
|
|
11882
|
-
class
|
|
11887
|
+
var lp = op();
|
|
11888
|
+
const cp = /* @__PURE__ */ Ta(lp);
|
|
11889
|
+
class up {
|
|
11883
11890
|
constructor() {
|
|
11884
11891
|
b(this, "client", null);
|
|
11885
11892
|
b(this, "venmoInstance", null);
|
|
@@ -11888,7 +11895,7 @@ class cp {
|
|
|
11888
11895
|
init(e) {
|
|
11889
11896
|
return j(this, null, function* () {
|
|
11890
11897
|
try {
|
|
11891
|
-
this.client = yield
|
|
11898
|
+
this.client = yield sp.create({ authorization: e.authorization });
|
|
11892
11899
|
} catch (t) {
|
|
11893
11900
|
throw console.error("Failed to initialize Braintree client:", t), t;
|
|
11894
11901
|
}
|
|
@@ -11900,7 +11907,7 @@ class cp {
|
|
|
11900
11907
|
if (!this.client)
|
|
11901
11908
|
throw new Error("Braintree client must be initialized before creating Venmo instance");
|
|
11902
11909
|
try {
|
|
11903
|
-
return this.venmoInstance = yield
|
|
11910
|
+
return this.venmoInstance = yield cp.create(Q({
|
|
11904
11911
|
client: this.client,
|
|
11905
11912
|
allowDesktop: !0,
|
|
11906
11913
|
mobileWebFallBack: !0,
|
|
@@ -11935,20 +11942,19 @@ class cp {
|
|
|
11935
11942
|
});
|
|
11936
11943
|
}
|
|
11937
11944
|
}
|
|
11938
|
-
class
|
|
11945
|
+
class dp {
|
|
11939
11946
|
constructor() {
|
|
11940
|
-
b(this, "ev", new
|
|
11941
|
-
b(this, "paypal", new
|
|
11942
|
-
b(this, "braintree", new
|
|
11947
|
+
b(this, "ev", new Ba());
|
|
11948
|
+
b(this, "paypal", new rp());
|
|
11949
|
+
b(this, "braintree", new up());
|
|
11943
11950
|
b(this, "state", {
|
|
11944
|
-
translate: new
|
|
11945
|
-
checkout: new
|
|
11946
|
-
transaction: new
|
|
11947
|
-
styles: new
|
|
11951
|
+
translate: new Wd(),
|
|
11952
|
+
checkout: new od(),
|
|
11953
|
+
transaction: new ud(),
|
|
11954
|
+
styles: new cd()
|
|
11948
11955
|
});
|
|
11949
|
-
b(this, "checkout", new
|
|
11956
|
+
b(this, "checkout", new ad({
|
|
11950
11957
|
state: this.state,
|
|
11951
|
-
// ToDo: add braintree
|
|
11952
11958
|
service: { ev: this.ev, paypal: this.paypal, braintree: this.braintree }
|
|
11953
11959
|
}));
|
|
11954
11960
|
}
|
|
@@ -11956,10 +11962,10 @@ class up {
|
|
|
11956
11962
|
Object.values(this.state).forEach((e) => e.clearState());
|
|
11957
11963
|
}
|
|
11958
11964
|
}
|
|
11959
|
-
class
|
|
11965
|
+
class fp {
|
|
11960
11966
|
constructor(e) {
|
|
11961
11967
|
b(this, "parent");
|
|
11962
|
-
b(this, "core", new
|
|
11968
|
+
b(this, "core", new dp());
|
|
11963
11969
|
this.parent = e;
|
|
11964
11970
|
}
|
|
11965
11971
|
mount(e) {
|
|
@@ -11975,7 +11981,7 @@ class mp {
|
|
|
11975
11981
|
}
|
|
11976
11982
|
}
|
|
11977
11983
|
export {
|
|
11978
|
-
|
|
11979
|
-
|
|
11984
|
+
dp as Core,
|
|
11985
|
+
fp as PayNextCheckout
|
|
11980
11986
|
};
|
|
11981
11987
|
//# sourceMappingURL=index.es.js.map
|