@paynext/sdk 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/index.es.js +735 -728
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +7 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -135,7 +135,7 @@ function To() {
|
|
|
135
135
|
}
|
|
136
136
|
function o(b, E) {
|
|
137
137
|
function I() {
|
|
138
|
-
|
|
138
|
+
fe || (fe = !0, console.error(
|
|
139
139
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
140
140
|
E
|
|
141
141
|
));
|
|
@@ -147,16 +147,16 @@ function To() {
|
|
|
147
147
|
}
|
|
148
148
|
function l() {
|
|
149
149
|
var b = e(this.type);
|
|
150
|
-
return
|
|
150
|
+
return me[b] || (me[b] = !0, console.error(
|
|
151
151
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
152
|
)), b = this.props.ref, b !== void 0 ? b : null;
|
|
153
153
|
}
|
|
154
|
-
function u(b, E, I, G, Ce,
|
|
155
|
-
return I =
|
|
154
|
+
function u(b, E, I, G, Ce, de, sn, an) {
|
|
155
|
+
return I = de.ref, b = {
|
|
156
156
|
$$typeof: f,
|
|
157
157
|
type: b,
|
|
158
158
|
key: E,
|
|
159
|
-
props:
|
|
159
|
+
props: de,
|
|
160
160
|
_owner: Ce
|
|
161
161
|
}, (I !== void 0 ? I : null) !== null ? Object.defineProperty(b, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
@@ -183,7 +183,7 @@ function To() {
|
|
|
183
183
|
value: an
|
|
184
184
|
}), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
|
|
185
185
|
}
|
|
186
|
-
function c(b, E, I, G, Ce,
|
|
186
|
+
function c(b, E, I, G, Ce, de, sn, an) {
|
|
187
187
|
var W = E.children;
|
|
188
188
|
if (W !== void 0)
|
|
189
189
|
if (G)
|
|
@@ -225,7 +225,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
225
225
|
), u(
|
|
226
226
|
b,
|
|
227
227
|
W,
|
|
228
|
-
|
|
228
|
+
de,
|
|
229
229
|
Ce,
|
|
230
230
|
i(),
|
|
231
231
|
I,
|
|
@@ -244,12 +244,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
244
244
|
return b();
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
|
-
var
|
|
247
|
+
var fe, me = {}, K = p["react-stack-bottom-frame"].bind(
|
|
248
248
|
p,
|
|
249
249
|
s
|
|
250
250
|
)(), ne = Q(r(s)), Be = {};
|
|
251
251
|
tt.Fragment = g, tt.jsx = function(b, E, I, G, Ce) {
|
|
252
|
-
var
|
|
252
|
+
var de = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
253
253
|
return c(
|
|
254
254
|
b,
|
|
255
255
|
E,
|
|
@@ -257,11 +257,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
257
257
|
!1,
|
|
258
258
|
G,
|
|
259
259
|
Ce,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
de ? Error("react-stack-top-frame") : K,
|
|
261
|
+
de ? Q(r(b)) : ne
|
|
262
262
|
);
|
|
263
263
|
}, tt.jsxs = function(b, E, I, G, Ce) {
|
|
264
|
-
var
|
|
264
|
+
var de = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return c(
|
|
266
266
|
b,
|
|
267
267
|
E,
|
|
@@ -269,8 +269,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
269
269
|
!0,
|
|
270
270
|
G,
|
|
271
271
|
Ce,
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
de ? Error("react-stack-top-frame") : K,
|
|
273
|
+
de ? Q(r(b)) : ne
|
|
274
274
|
);
|
|
275
275
|
};
|
|
276
276
|
}()), tt;
|
|
@@ -326,12 +326,12 @@ const Po = async (e) => {
|
|
|
326
326
|
async (d) => {
|
|
327
327
|
try {
|
|
328
328
|
s(!1), o(!1), r(!0);
|
|
329
|
-
const {
|
|
330
|
-
if (p)
|
|
329
|
+
const { error: p } = await Po(d);
|
|
330
|
+
if (!p)
|
|
331
331
|
s(!0), e?.();
|
|
332
332
|
else {
|
|
333
|
-
const
|
|
334
|
-
o(!0), t?.(
|
|
333
|
+
const f = new Error(p || "Unknown error");
|
|
334
|
+
o(!0), t?.(f);
|
|
335
335
|
}
|
|
336
336
|
} catch (p) {
|
|
337
337
|
console.error(p), o(!0), t?.(new Error("Unknown error"));
|
|
@@ -2674,12 +2674,12 @@ const jl = (e, t) => {
|
|
|
2674
2674
|
}
|
|
2675
2675
|
const s = n.slice(2, 4);
|
|
2676
2676
|
return `${r} / ${s}`;
|
|
2677
|
-
}, Rl = "
|
|
2677
|
+
}, Rl = "_card_2w0sn_1", Ml = "_cardDataContainer_2w0sn_23", Il = "_payButton_2w0sn_35", Dl = "_spinner_2w0sn_39", Rt = {
|
|
2678
2678
|
card: Rl,
|
|
2679
2679
|
cardDataContainer: Ml,
|
|
2680
2680
|
payButton: Il,
|
|
2681
2681
|
spinner: Dl
|
|
2682
|
-
}, Ll = "
|
|
2682
|
+
}, Ll = "_inputContainer_uvmvz_1", Nl = "_inputFocus_uvmvz_6", Ol = "_input_uvmvz_1", Bl = "_endContent_uvmvz_16", _l = "_errorInput_uvmvz_20", Fl = "_error_uvmvz_20", ql = "_label_uvmvz_28", Kl = "_labelError_uvmvz_32", zl = "_disabled_uvmvz_36", Ul = "_disabledInput_uvmvz_40", le = {
|
|
2683
2683
|
inputContainer: Ll,
|
|
2684
2684
|
inputFocus: Nl,
|
|
2685
2685
|
input: Ol,
|
|
@@ -2687,7 +2687,9 @@ const jl = (e, t) => {
|
|
|
2687
2687
|
errorInput: _l,
|
|
2688
2688
|
error: Fl,
|
|
2689
2689
|
label: ql,
|
|
2690
|
-
labelError: Kl
|
|
2690
|
+
labelError: Kl,
|
|
2691
|
+
disabled: zl,
|
|
2692
|
+
disabledInput: Ul
|
|
2691
2693
|
}, Hn = J({});
|
|
2692
2694
|
function Zn(e) {
|
|
2693
2695
|
const t = se(null);
|
|
@@ -2721,7 +2723,7 @@ function er(e) {
|
|
|
2721
2723
|
let t;
|
|
2722
2724
|
return () => (t === void 0 && (t = e()), t);
|
|
2723
2725
|
}
|
|
2724
|
-
const ae = /* @__NO_SIDE_EFFECTS__ */ (e) => e,
|
|
2726
|
+
const ae = /* @__NO_SIDE_EFFECTS__ */ (e) => e, $l = (e, t) => (n) => t(e(n)), kt = (...e) => e.reduce($l), gt = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
2725
2727
|
const r = t - e;
|
|
2726
2728
|
return r === 0 ? 1 : (n - e) / r;
|
|
2727
2729
|
};
|
|
@@ -2750,7 +2752,7 @@ class tr {
|
|
|
2750
2752
|
this.subscriptions.length = 0;
|
|
2751
2753
|
}
|
|
2752
2754
|
}
|
|
2753
|
-
const
|
|
2755
|
+
const ue = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, he = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
|
|
2754
2756
|
function Es(e, t) {
|
|
2755
2757
|
return t ? e * (1e3 / t) : 0;
|
|
2756
2758
|
}
|
|
@@ -2758,25 +2760,25 @@ const Kr = /* @__PURE__ */ new Set();
|
|
|
2758
2760
|
function nr(e, t, n) {
|
|
2759
2761
|
e || Kr.has(t) || (console.warn(t), Kr.add(t));
|
|
2760
2762
|
}
|
|
2761
|
-
const js = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e,
|
|
2762
|
-
function
|
|
2763
|
+
const js = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Gl = 1e-7, Wl = 12;
|
|
2764
|
+
function Yl(e, t, n, r, i) {
|
|
2763
2765
|
let s, a, o = 0;
|
|
2764
2766
|
do
|
|
2765
2767
|
a = t + (n - t) / 2, s = js(a, r, i) - e, s > 0 ? n = a : t = a;
|
|
2766
|
-
while (Math.abs(s) >
|
|
2768
|
+
while (Math.abs(s) > Gl && ++o < Wl);
|
|
2767
2769
|
return a;
|
|
2768
2770
|
}
|
|
2769
2771
|
function Pt(e, t, n, r) {
|
|
2770
2772
|
if (e === t && n === r)
|
|
2771
2773
|
return ae;
|
|
2772
|
-
const i = (s) =>
|
|
2774
|
+
const i = (s) => Yl(s, 0, 1, e, n);
|
|
2773
2775
|
return (s) => s === 0 || s === 1 ? s : js(i(s), t, r);
|
|
2774
2776
|
}
|
|
2775
|
-
const Vs = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Rs = (e) => (t) => 1 - e(1 - t), Ms = /* @__PURE__ */ Pt(0.33, 1.53, 0.69, 0.99), rr = /* @__PURE__ */ Rs(Ms), Is = /* @__PURE__ */ Vs(rr), Ds = (e) => (e *= 2) < 1 ? 0.5 * rr(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), ir = (e) => 1 - Math.sin(Math.acos(e)), Ls = Rs(ir), Ns = Vs(ir),
|
|
2777
|
+
const Vs = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Rs = (e) => (t) => 1 - e(1 - t), Ms = /* @__PURE__ */ Pt(0.33, 1.53, 0.69, 0.99), rr = /* @__PURE__ */ Rs(Ms), Is = /* @__PURE__ */ Vs(rr), Ds = (e) => (e *= 2) < 1 ? 0.5 * rr(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), ir = (e) => 1 - Math.sin(Math.acos(e)), Ls = Rs(ir), Ns = Vs(ir), Hl = /* @__PURE__ */ Pt(0.42, 0, 1, 1), Zl = /* @__PURE__ */ Pt(0, 0, 0.58, 1), Os = /* @__PURE__ */ Pt(0.42, 0, 0.58, 1), Xl = (e) => Array.isArray(e) && typeof e[0] != "number", Bs = (e) => Array.isArray(e) && typeof e[0] == "number", zr = {
|
|
2776
2778
|
linear: ae,
|
|
2777
|
-
easeIn:
|
|
2779
|
+
easeIn: Hl,
|
|
2778
2780
|
easeInOut: Os,
|
|
2779
|
-
easeOut:
|
|
2781
|
+
easeOut: Zl,
|
|
2780
2782
|
circIn: ir,
|
|
2781
2783
|
circInOut: Ns,
|
|
2782
2784
|
circOut: Ls,
|
|
@@ -2784,12 +2786,12 @@ const Vs = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Rs
|
|
|
2784
2786
|
backInOut: Is,
|
|
2785
2787
|
backOut: Ms,
|
|
2786
2788
|
anticipate: Ds
|
|
2787
|
-
},
|
|
2789
|
+
}, Jl = (e) => typeof e == "string", Ur = (e) => {
|
|
2788
2790
|
if (Bs(e)) {
|
|
2789
2791
|
be(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
2790
2792
|
const [t, n, r, i] = e;
|
|
2791
2793
|
return Pt(t, n, r, i);
|
|
2792
|
-
} else if (
|
|
2794
|
+
} else if (Jl(e))
|
|
2793
2795
|
return be(zr[e] !== void 0, `Invalid easing type '${e}'`), zr[e];
|
|
2794
2796
|
return e;
|
|
2795
2797
|
}, Mt = [
|
|
@@ -2812,7 +2814,7 @@ const Vs = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Rs
|
|
|
2812
2814
|
], $r = {
|
|
2813
2815
|
value: null
|
|
2814
2816
|
};
|
|
2815
|
-
function
|
|
2817
|
+
function Ql(e, t) {
|
|
2816
2818
|
let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, s = !1;
|
|
2817
2819
|
const a = /* @__PURE__ */ new WeakSet();
|
|
2818
2820
|
let o = {
|
|
@@ -2850,16 +2852,16 @@ function Xl(e, t) {
|
|
|
2850
2852
|
};
|
|
2851
2853
|
return c;
|
|
2852
2854
|
}
|
|
2853
|
-
const
|
|
2855
|
+
const ec = 40;
|
|
2854
2856
|
function _s(e, t) {
|
|
2855
2857
|
let n = !1, r = !0;
|
|
2856
2858
|
const i = {
|
|
2857
2859
|
delta: 0,
|
|
2858
2860
|
timestamp: 0,
|
|
2859
2861
|
isProcessing: !1
|
|
2860
|
-
}, s = () => n = !0, a = Mt.reduce((x, P) => (x[P] =
|
|
2862
|
+
}, s = () => n = !0, a = Mt.reduce((x, P) => (x[P] = Ql(s, t ? P : void 0), x), {}), { setup: o, read: l, resolveKeyframes: u, preUpdate: c, update: d, preRender: p, render: f, postRender: m } = a, g = () => {
|
|
2861
2863
|
const x = xe.useManualTiming ? i.timestamp : performance.now();
|
|
2862
|
-
n = !1, xe.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(x - i.timestamp,
|
|
2864
|
+
n = !1, xe.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(x - i.timestamp, ec), 1)), i.timestamp = x, i.isProcessing = !0, o.process(i), l.process(i), u.process(i), c.process(i), d.process(i), p.process(i), f.process(i), m.process(i), i.isProcessing = !1, n && t && (r = !1, e(g));
|
|
2863
2865
|
}, v = () => {
|
|
2864
2866
|
n = !0, r = !0, i.isProcessing || e(g);
|
|
2865
2867
|
};
|
|
@@ -2873,15 +2875,15 @@ function _s(e, t) {
|
|
|
2873
2875
|
}
|
|
2874
2876
|
const { schedule: B, cancel: Se, state: $, steps: cn } = /* @__PURE__ */ _s(typeof requestAnimationFrame < "u" ? requestAnimationFrame : ae, !0);
|
|
2875
2877
|
let Kt;
|
|
2876
|
-
function
|
|
2878
|
+
function tc() {
|
|
2877
2879
|
Kt = void 0;
|
|
2878
2880
|
}
|
|
2879
2881
|
const te = {
|
|
2880
2882
|
now: () => (Kt === void 0 && te.set($.isProcessing || xe.useManualTiming ? $.timestamp : performance.now()), Kt),
|
|
2881
2883
|
set: (e) => {
|
|
2882
|
-
Kt = e, queueMicrotask(
|
|
2884
|
+
Kt = e, queueMicrotask(tc);
|
|
2883
2885
|
}
|
|
2884
|
-
}, Fs = (e) => (t) => typeof t == "string" && t.startsWith(e), sr = /* @__PURE__ */ Fs("--"),
|
|
2886
|
+
}, Fs = (e) => (t) => typeof t == "string" && t.startsWith(e), sr = /* @__PURE__ */ Fs("--"), nc = /* @__PURE__ */ Fs("var(--"), ar = (e) => nc(e) ? rc.test(e.split("/*")[0].trim()) : !1, rc = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Xe = {
|
|
2885
2887
|
test: (e) => typeof e == "number",
|
|
2886
2888
|
parse: parseFloat,
|
|
2887
2889
|
transform: (e) => e
|
|
@@ -2892,10 +2894,10 @@ const te = {
|
|
|
2892
2894
|
...Xe,
|
|
2893
2895
|
default: 1
|
|
2894
2896
|
}, dt = (e) => Math.round(e * 1e5) / 1e5, or = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
2895
|
-
function
|
|
2897
|
+
function ic(e) {
|
|
2896
2898
|
return e == null;
|
|
2897
2899
|
}
|
|
2898
|
-
const
|
|
2900
|
+
const sc = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, lr = (e, t) => (n) => !!(typeof n == "string" && sc.test(n) && n.startsWith(e) || t && !ic(n) && Object.prototype.hasOwnProperty.call(n, t)), qs = (e, t, n) => (r) => {
|
|
2899
2901
|
if (typeof r != "string")
|
|
2900
2902
|
return r;
|
|
2901
2903
|
const [i, s, a, o] = r.match(or);
|
|
@@ -2905,15 +2907,15 @@ const rc = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
2905
2907
|
[n]: parseFloat(a),
|
|
2906
2908
|
alpha: o !== void 0 ? parseFloat(o) : 1
|
|
2907
2909
|
};
|
|
2908
|
-
},
|
|
2910
|
+
}, ac = (e) => ve(0, 255, e), un = {
|
|
2909
2911
|
...Xe,
|
|
2910
|
-
transform: (e) => Math.round(
|
|
2912
|
+
transform: (e) => Math.round(ac(e))
|
|
2911
2913
|
}, Me = {
|
|
2912
2914
|
test: /* @__PURE__ */ lr("rgb", "red"),
|
|
2913
2915
|
parse: /* @__PURE__ */ qs("red", "green", "blue"),
|
|
2914
2916
|
transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + un.transform(e) + ", " + un.transform(t) + ", " + un.transform(n) + ", " + dt(yt.transform(r)) + ")"
|
|
2915
2917
|
};
|
|
2916
|
-
function
|
|
2918
|
+
function oc(e) {
|
|
2917
2919
|
let t = "", n = "", r = "", i = "";
|
|
2918
2920
|
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), r = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), r = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, r += r, i += i), {
|
|
2919
2921
|
red: parseInt(t, 16),
|
|
@@ -2924,29 +2926,29 @@ function sc(e) {
|
|
|
2924
2926
|
}
|
|
2925
2927
|
const An = {
|
|
2926
2928
|
test: /* @__PURE__ */ lr("#"),
|
|
2927
|
-
parse:
|
|
2929
|
+
parse: oc,
|
|
2928
2930
|
transform: Me.transform
|
|
2929
2931
|
}, At = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
2930
2932
|
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
2931
2933
|
parse: parseFloat,
|
|
2932
2934
|
transform: (t) => `${t}${e}`
|
|
2933
|
-
}), we = /* @__PURE__ */ At("deg"),
|
|
2934
|
-
...
|
|
2935
|
-
parse: (e) =>
|
|
2936
|
-
transform: (e) =>
|
|
2935
|
+
}), we = /* @__PURE__ */ At("deg"), pe = /* @__PURE__ */ At("%"), S = /* @__PURE__ */ At("px"), lc = /* @__PURE__ */ At("vh"), cc = /* @__PURE__ */ At("vw"), Gr = {
|
|
2936
|
+
...pe,
|
|
2937
|
+
parse: (e) => pe.parse(e) / 100,
|
|
2938
|
+
transform: (e) => pe.transform(e * 100)
|
|
2937
2939
|
}, Fe = {
|
|
2938
2940
|
test: /* @__PURE__ */ lr("hsl", "hue"),
|
|
2939
2941
|
parse: /* @__PURE__ */ qs("hue", "saturation", "lightness"),
|
|
2940
|
-
transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " +
|
|
2942
|
+
transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + pe.transform(dt(t)) + ", " + pe.transform(dt(n)) + ", " + dt(yt.transform(r)) + ")"
|
|
2941
2943
|
}, Y = {
|
|
2942
2944
|
test: (e) => Me.test(e) || An.test(e) || Fe.test(e),
|
|
2943
2945
|
parse: (e) => Me.test(e) ? Me.parse(e) : Fe.test(e) ? Fe.parse(e) : An.parse(e),
|
|
2944
2946
|
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Me.transform(e) : Fe.transform(e)
|
|
2945
|
-
},
|
|
2946
|
-
function
|
|
2947
|
-
return isNaN(e) && typeof e == "string" && (e.match(or)?.length || 0) + (e.match(
|
|
2947
|
+
}, uc = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
2948
|
+
function dc(e) {
|
|
2949
|
+
return isNaN(e) && typeof e == "string" && (e.match(or)?.length || 0) + (e.match(uc)?.length || 0) > 0;
|
|
2948
2950
|
}
|
|
2949
|
-
const Ks = "number", zs = "color",
|
|
2951
|
+
const Ks = "number", zs = "color", hc = "var", pc = "var(", Wr = "${}", fc = /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;
|
|
2950
2952
|
function vt(e) {
|
|
2951
2953
|
const t = e.toString(), n = [], r = {
|
|
2952
2954
|
color: [],
|
|
@@ -2954,7 +2956,7 @@ function vt(e) {
|
|
|
2954
2956
|
var: []
|
|
2955
2957
|
}, i = [];
|
|
2956
2958
|
let s = 0;
|
|
2957
|
-
const o = t.replace(
|
|
2959
|
+
const o = t.replace(fc, (l) => (Y.test(l) ? (r.color.push(s), i.push(zs), n.push(Y.parse(l))) : l.startsWith(pc) ? (r.var.push(s), i.push(hc), n.push(l)) : (r.number.push(s), i.push(Ks), n.push(parseFloat(l))), ++s, Wr)).split(Wr);
|
|
2958
2960
|
return { values: n, split: o, indexes: r, types: i };
|
|
2959
2961
|
}
|
|
2960
2962
|
function Us(e) {
|
|
@@ -2972,21 +2974,21 @@ function $s(e) {
|
|
|
2972
2974
|
return s;
|
|
2973
2975
|
};
|
|
2974
2976
|
}
|
|
2975
|
-
const
|
|
2976
|
-
function
|
|
2977
|
+
const mc = (e) => typeof e == "number" ? 0 : e;
|
|
2978
|
+
function gc(e) {
|
|
2977
2979
|
const t = Us(e);
|
|
2978
|
-
return $s(e)(t.map(
|
|
2980
|
+
return $s(e)(t.map(mc));
|
|
2979
2981
|
}
|
|
2980
2982
|
const Ee = {
|
|
2981
|
-
test:
|
|
2983
|
+
test: dc,
|
|
2982
2984
|
parse: Us,
|
|
2983
2985
|
createTransformer: $s,
|
|
2984
|
-
getAnimatableNone:
|
|
2986
|
+
getAnimatableNone: gc
|
|
2985
2987
|
};
|
|
2986
2988
|
function dn(e, t, n) {
|
|
2987
2989
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
2988
2990
|
}
|
|
2989
|
-
function
|
|
2991
|
+
function yc({ hue: e, saturation: t, lightness: n, alpha: r }) {
|
|
2990
2992
|
e /= 360, t /= 100, n /= 100;
|
|
2991
2993
|
let i = 0, s = 0, a = 0;
|
|
2992
2994
|
if (!t)
|
|
@@ -3008,13 +3010,13 @@ function Gt(e, t) {
|
|
|
3008
3010
|
const O = (e, t, n) => e + (t - e) * n, hn = (e, t, n) => {
|
|
3009
3011
|
const r = e * e, i = n * (t * t - r) + r;
|
|
3010
3012
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
3011
|
-
},
|
|
3013
|
+
}, vc = [An, Me, Fe], bc = (e) => vc.find((t) => t.test(e));
|
|
3012
3014
|
function Yr(e) {
|
|
3013
|
-
const t =
|
|
3015
|
+
const t = bc(e);
|
|
3014
3016
|
if (Ze(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
|
|
3015
3017
|
return !1;
|
|
3016
3018
|
let n = t.parse(e);
|
|
3017
|
-
return t === Fe && (n =
|
|
3019
|
+
return t === Fe && (n = yc(n)), n;
|
|
3018
3020
|
}
|
|
3019
3021
|
const Hr = (e, t) => {
|
|
3020
3022
|
const n = Yr(e), r = Yr(t);
|
|
@@ -3023,14 +3025,14 @@ const Hr = (e, t) => {
|
|
|
3023
3025
|
const i = { ...n };
|
|
3024
3026
|
return (s) => (i.red = hn(n.red, r.red, s), i.green = hn(n.green, r.green, s), i.blue = hn(n.blue, r.blue, s), i.alpha = O(n.alpha, r.alpha, s), Me.transform(i));
|
|
3025
3027
|
}, Sn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
3026
|
-
function
|
|
3028
|
+
function xc(e, t) {
|
|
3027
3029
|
return Sn.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
3028
3030
|
}
|
|
3029
|
-
function
|
|
3031
|
+
function Cc(e, t) {
|
|
3030
3032
|
return (n) => O(e, t, n);
|
|
3031
3033
|
}
|
|
3032
3034
|
function cr(e) {
|
|
3033
|
-
return typeof e == "number" ?
|
|
3035
|
+
return typeof e == "number" ? Cc : typeof e == "string" ? ar(e) ? Gt : Y.test(e) ? Hr : kc : Array.isArray(e) ? Gs : typeof e == "object" ? Y.test(e) ? Hr : Tc : Gt;
|
|
3034
3036
|
}
|
|
3035
3037
|
function Gs(e, t) {
|
|
3036
3038
|
const n = [...e], r = n.length, i = e.map((s, a) => cr(s)(s, t[a]));
|
|
@@ -3040,7 +3042,7 @@ function Gs(e, t) {
|
|
|
3040
3042
|
return n;
|
|
3041
3043
|
};
|
|
3042
3044
|
}
|
|
3043
|
-
function
|
|
3045
|
+
function Tc(e, t) {
|
|
3044
3046
|
const n = { ...e, ...t }, r = {};
|
|
3045
3047
|
for (const i in n)
|
|
3046
3048
|
e[i] !== void 0 && t[i] !== void 0 && (r[i] = cr(e[i])(e[i], t[i]));
|
|
@@ -3050,7 +3052,7 @@ function xc(e, t) {
|
|
|
3050
3052
|
return n;
|
|
3051
3053
|
};
|
|
3052
3054
|
}
|
|
3053
|
-
function
|
|
3055
|
+
function wc(e, t) {
|
|
3054
3056
|
const n = [], r = { color: 0, var: 0, number: 0 };
|
|
3055
3057
|
for (let i = 0; i < t.values.length; i++) {
|
|
3056
3058
|
const s = t.types[i], a = e.indexes[s][r[s]], o = e.values[a] ?? 0;
|
|
@@ -3058,14 +3060,14 @@ function Cc(e, t) {
|
|
|
3058
3060
|
}
|
|
3059
3061
|
return n;
|
|
3060
3062
|
}
|
|
3061
|
-
const
|
|
3063
|
+
const kc = (e, t) => {
|
|
3062
3064
|
const n = Ee.createTransformer(t), r = vt(e), i = vt(t);
|
|
3063
|
-
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 ? Sn.has(e) && !i.values.length || Sn.has(t) && !r.values.length ?
|
|
3065
|
+
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 ? Sn.has(e) && !i.values.length || Sn.has(t) && !r.values.length ? xc(e, t) : kt(Gs(wc(r, i), i.values), n) : (Ze(!0, `Complex values '${e}' and '${t}' 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.`), Gt(e, t));
|
|
3064
3066
|
};
|
|
3065
3067
|
function Ws(e, t, n) {
|
|
3066
3068
|
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? O(e, t, n) : cr(e)(e, t);
|
|
3067
3069
|
}
|
|
3068
|
-
const
|
|
3070
|
+
const Pc = (e) => {
|
|
3069
3071
|
const t = ({ timestamp: n }) => e(n);
|
|
3070
3072
|
return {
|
|
3071
3073
|
start: (n = !0) => B.update(t, n),
|
|
@@ -3091,17 +3093,17 @@ function ur(e) {
|
|
|
3091
3093
|
t += n, r = e.next(t);
|
|
3092
3094
|
return t >= Wt ? 1 / 0 : t;
|
|
3093
3095
|
}
|
|
3094
|
-
function
|
|
3096
|
+
function Ac(e, t = 100, n) {
|
|
3095
3097
|
const r = n({ ...e, keyframes: [0, t] }), i = Math.min(ur(r), Wt);
|
|
3096
3098
|
return {
|
|
3097
3099
|
type: "keyframes",
|
|
3098
3100
|
ease: (s) => r.next(i * s).value / t,
|
|
3099
|
-
duration: /* @__PURE__ */
|
|
3101
|
+
duration: /* @__PURE__ */ he(i)
|
|
3100
3102
|
};
|
|
3101
3103
|
}
|
|
3102
|
-
const
|
|
3104
|
+
const Sc = 5;
|
|
3103
3105
|
function Hs(e, t, n) {
|
|
3104
|
-
const r = Math.max(t -
|
|
3106
|
+
const r = Math.max(t - Sc, 0);
|
|
3105
3107
|
return Es(n - e(r), t - r);
|
|
3106
3108
|
}
|
|
3107
3109
|
const L = {
|
|
@@ -3133,11 +3135,11 @@ const L = {
|
|
|
3133
3135
|
minDamping: 0.05,
|
|
3134
3136
|
maxDamping: 1
|
|
3135
3137
|
}, Zr = 1e-3;
|
|
3136
|
-
function
|
|
3138
|
+
function Ec({ duration: e = L.duration, bounce: t = L.bounce, velocity: n = L.velocity, mass: r = L.mass }) {
|
|
3137
3139
|
let i, s;
|
|
3138
|
-
Ze(e <= /* @__PURE__ */
|
|
3140
|
+
Ze(e <= /* @__PURE__ */ ue(L.maxDuration), "Spring duration must be 10 seconds or less");
|
|
3139
3141
|
let a = 1 - t;
|
|
3140
|
-
a = ve(L.minDamping, L.maxDamping, a), e = ve(L.minDuration, L.maxDuration, /* @__PURE__ */
|
|
3142
|
+
a = ve(L.minDamping, L.maxDamping, a), e = ve(L.minDuration, L.maxDuration, /* @__PURE__ */ he(e)), a < 1 ? (i = (u) => {
|
|
3141
3143
|
const c = u * a, d = c * e, p = c - n, f = En(u, a), m = Math.exp(-d);
|
|
3142
3144
|
return Zr - p / f * m;
|
|
3143
3145
|
}, s = (u) => {
|
|
@@ -3150,8 +3152,8 @@ function Ac({ duration: e = L.duration, bounce: t = L.bounce, velocity: n = L.ve
|
|
|
3150
3152
|
const c = Math.exp(-u * e), d = (n - u) * (e * e);
|
|
3151
3153
|
return c * d;
|
|
3152
3154
|
});
|
|
3153
|
-
const o = 5 / e, l =
|
|
3154
|
-
if (e = /* @__PURE__ */
|
|
3155
|
+
const o = 5 / e, l = Vc(i, s, o);
|
|
3156
|
+
if (e = /* @__PURE__ */ ue(e), isNaN(l))
|
|
3155
3157
|
return {
|
|
3156
3158
|
stiffness: L.stiffness,
|
|
3157
3159
|
damping: L.damping,
|
|
@@ -3166,21 +3168,21 @@ function Ac({ duration: e = L.duration, bounce: t = L.bounce, velocity: n = L.ve
|
|
|
3166
3168
|
};
|
|
3167
3169
|
}
|
|
3168
3170
|
}
|
|
3169
|
-
const
|
|
3170
|
-
function
|
|
3171
|
+
const jc = 12;
|
|
3172
|
+
function Vc(e, t, n) {
|
|
3171
3173
|
let r = n;
|
|
3172
|
-
for (let i = 1; i <
|
|
3174
|
+
for (let i = 1; i < jc; i++)
|
|
3173
3175
|
r = r - e(r) / t(r);
|
|
3174
3176
|
return r;
|
|
3175
3177
|
}
|
|
3176
3178
|
function En(e, t) {
|
|
3177
3179
|
return e * Math.sqrt(1 - t * t);
|
|
3178
3180
|
}
|
|
3179
|
-
const
|
|
3181
|
+
const Rc = ["duration", "bounce"], Mc = ["stiffness", "damping", "mass"];
|
|
3180
3182
|
function Xr(e, t) {
|
|
3181
3183
|
return t.some((n) => e[n] !== void 0);
|
|
3182
3184
|
}
|
|
3183
|
-
function
|
|
3185
|
+
function Ic(e) {
|
|
3184
3186
|
let t = {
|
|
3185
3187
|
velocity: L.velocity,
|
|
3186
3188
|
stiffness: L.stiffness,
|
|
@@ -3189,7 +3191,7 @@ function Rc(e) {
|
|
|
3189
3191
|
isResolvedFromDuration: !1,
|
|
3190
3192
|
...e
|
|
3191
3193
|
};
|
|
3192
|
-
if (!Xr(e,
|
|
3194
|
+
if (!Xr(e, Mc) && Xr(e, Rc))
|
|
3193
3195
|
if (e.visualDuration) {
|
|
3194
3196
|
const n = e.visualDuration, r = 2 * Math.PI / (n * 1.2), i = r * r, s = 2 * ve(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
|
|
3195
3197
|
t = {
|
|
@@ -3199,7 +3201,7 @@ function Rc(e) {
|
|
|
3199
3201
|
damping: s
|
|
3200
3202
|
};
|
|
3201
3203
|
} else {
|
|
3202
|
-
const n =
|
|
3204
|
+
const n = Ec(e);
|
|
3203
3205
|
t = {
|
|
3204
3206
|
...t,
|
|
3205
3207
|
...n,
|
|
@@ -3215,10 +3217,10 @@ function Yt(e = L.visualDuration, t = L.bounce) {
|
|
|
3215
3217
|
bounce: t
|
|
3216
3218
|
} : e;
|
|
3217
3219
|
let { restSpeed: r, restDelta: i } = n;
|
|
3218
|
-
const s = n.keyframes[0], a = n.keyframes[n.keyframes.length - 1], o = { done: !1, value: s }, { stiffness: l, damping: u, mass: c, duration: d, velocity: p, isResolvedFromDuration: f } =
|
|
3220
|
+
const s = n.keyframes[0], a = n.keyframes[n.keyframes.length - 1], o = { done: !1, value: s }, { stiffness: l, damping: u, mass: c, duration: d, velocity: p, isResolvedFromDuration: f } = Ic({
|
|
3219
3221
|
...n,
|
|
3220
|
-
velocity: -/* @__PURE__ */
|
|
3221
|
-
}), m = p || 0, g = u / (2 * Math.sqrt(l * c)), v = a - s, y = /* @__PURE__ */
|
|
3222
|
+
velocity: -/* @__PURE__ */ he(n.velocity || 0)
|
|
3223
|
+
}), m = p || 0, g = u / (2 * Math.sqrt(l * c)), v = a - s, y = /* @__PURE__ */ he(Math.sqrt(l / c)), C = Math.abs(v) < 5;
|
|
3222
3224
|
r || (r = C ? L.restSpeed.granular : L.restSpeed.default), i || (i = C ? L.restDelta.granular : L.restDelta.default);
|
|
3223
3225
|
let x;
|
|
3224
3226
|
if (g < 1) {
|
|
@@ -3244,7 +3246,7 @@ function Yt(e = L.visualDuration, t = L.bounce) {
|
|
|
3244
3246
|
o.done = T >= d;
|
|
3245
3247
|
else {
|
|
3246
3248
|
let A = T === 0 ? m : 0;
|
|
3247
|
-
g < 1 && (A = T === 0 ? /* @__PURE__ */
|
|
3249
|
+
g < 1 && (A = T === 0 ? /* @__PURE__ */ ue(m) : Hs(x, T, w));
|
|
3248
3250
|
const k = Math.abs(A) <= r, R = Math.abs(a - w) <= i;
|
|
3249
3251
|
o.done = k && R;
|
|
3250
3252
|
}
|
|
@@ -3260,8 +3262,8 @@ function Yt(e = L.visualDuration, t = L.bounce) {
|
|
|
3260
3262
|
return P;
|
|
3261
3263
|
}
|
|
3262
3264
|
Yt.applyToOptions = (e) => {
|
|
3263
|
-
const t =
|
|
3264
|
-
return e.ease = t.ease, e.duration = /* @__PURE__ */
|
|
3265
|
+
const t = Ac(e, 100, Yt);
|
|
3266
|
+
return e.ease = t.ease, e.duration = /* @__PURE__ */ ue(t.duration), e.type = "keyframes", e;
|
|
3265
3267
|
};
|
|
3266
3268
|
function jn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: s = 500, modifyTarget: a, min: o, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
3267
3269
|
const d = e[0], p = {
|
|
@@ -3295,7 +3297,7 @@ function jn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: r = 3
|
|
|
3295
3297
|
}
|
|
3296
3298
|
};
|
|
3297
3299
|
}
|
|
3298
|
-
function
|
|
3300
|
+
function Dc(e, t, n) {
|
|
3299
3301
|
const r = [], i = n || xe.mix || Ws, s = e.length - 1;
|
|
3300
3302
|
for (let a = 0; a < s; a++) {
|
|
3301
3303
|
let o = i(e[a], e[a + 1]);
|
|
@@ -3307,7 +3309,7 @@ function Mc(e, t, n) {
|
|
|
3307
3309
|
}
|
|
3308
3310
|
return r;
|
|
3309
3311
|
}
|
|
3310
|
-
function
|
|
3312
|
+
function Lc(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) {
|
|
3311
3313
|
const s = e.length;
|
|
3312
3314
|
if (be(s === t.length, "Both input and output ranges must be the same length"), s === 1)
|
|
3313
3315
|
return () => t[0];
|
|
@@ -3315,7 +3317,7 @@ function Ic(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) {
|
|
|
3315
3317
|
return () => t[1];
|
|
3316
3318
|
const a = e[0] === e[1];
|
|
3317
3319
|
e[0] > e[s - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
3318
|
-
const o =
|
|
3320
|
+
const o = Dc(t, r, i), l = o.length, u = (c) => {
|
|
3319
3321
|
if (a && c < e[0])
|
|
3320
3322
|
return t[0];
|
|
3321
3323
|
let d = 0;
|
|
@@ -3327,46 +3329,46 @@ function Ic(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) {
|
|
|
3327
3329
|
};
|
|
3328
3330
|
return n ? (c) => u(ve(e[0], e[s - 1], c)) : u;
|
|
3329
3331
|
}
|
|
3330
|
-
function
|
|
3332
|
+
function Nc(e, t) {
|
|
3331
3333
|
const n = e[e.length - 1];
|
|
3332
3334
|
for (let r = 1; r <= t; r++) {
|
|
3333
3335
|
const i = /* @__PURE__ */ gt(0, t, r);
|
|
3334
3336
|
e.push(O(n, 1, i));
|
|
3335
3337
|
}
|
|
3336
3338
|
}
|
|
3337
|
-
function
|
|
3339
|
+
function Oc(e) {
|
|
3338
3340
|
const t = [0];
|
|
3339
|
-
return
|
|
3341
|
+
return Nc(t, e.length - 1), t;
|
|
3340
3342
|
}
|
|
3341
|
-
function
|
|
3343
|
+
function Bc(e, t) {
|
|
3342
3344
|
return e.map((n) => n * t);
|
|
3343
3345
|
}
|
|
3344
|
-
function
|
|
3346
|
+
function _c(e, t) {
|
|
3345
3347
|
return e.map(() => t || Os).splice(0, e.length - 1);
|
|
3346
3348
|
}
|
|
3347
3349
|
function qe({ duration: e = 300, keyframes: t, times: n, ease: r = "easeInOut" }) {
|
|
3348
|
-
const i =
|
|
3350
|
+
const i = Xl(r) ? r.map(Ur) : Ur(r), s = {
|
|
3349
3351
|
done: !1,
|
|
3350
3352
|
value: t[0]
|
|
3351
|
-
}, a =
|
|
3353
|
+
}, a = Bc(
|
|
3352
3354
|
// Only use the provided offsets if they're the correct length
|
|
3353
3355
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
3354
|
-
n && n.length === t.length ? n :
|
|
3356
|
+
n && n.length === t.length ? n : Oc(t),
|
|
3355
3357
|
e
|
|
3356
|
-
), o =
|
|
3357
|
-
ease: Array.isArray(i) ? i :
|
|
3358
|
+
), o = Lc(a, t, {
|
|
3359
|
+
ease: Array.isArray(i) ? i : _c(t, i)
|
|
3358
3360
|
});
|
|
3359
3361
|
return {
|
|
3360
3362
|
calculatedDuration: e,
|
|
3361
3363
|
next: (l) => (s.value = o(l), s.done = l >= e, s)
|
|
3362
3364
|
};
|
|
3363
3365
|
}
|
|
3364
|
-
const
|
|
3366
|
+
const Fc = (e) => e !== null;
|
|
3365
3367
|
function dr(e, { repeat: t, repeatType: n = "loop" }, r, i = 1) {
|
|
3366
|
-
const s = e.filter(
|
|
3368
|
+
const s = e.filter(Fc), o = i < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : s.length - 1;
|
|
3367
3369
|
return !o || r === void 0 ? s[o] : r;
|
|
3368
3370
|
}
|
|
3369
|
-
const
|
|
3371
|
+
const qc = {
|
|
3370
3372
|
decay: jn,
|
|
3371
3373
|
inertia: jn,
|
|
3372
3374
|
tween: qe,
|
|
@@ -3374,7 +3376,7 @@ const _c = {
|
|
|
3374
3376
|
spring: Yt
|
|
3375
3377
|
};
|
|
3376
3378
|
function Zs(e) {
|
|
3377
|
-
typeof e.type == "string" && (e.type =
|
|
3379
|
+
typeof e.type == "string" && (e.type = qc[e.type]);
|
|
3378
3380
|
}
|
|
3379
3381
|
class hr {
|
|
3380
3382
|
constructor() {
|
|
@@ -3400,7 +3402,7 @@ class hr {
|
|
|
3400
3402
|
return this.finished.then(t, n);
|
|
3401
3403
|
}
|
|
3402
3404
|
}
|
|
3403
|
-
const
|
|
3405
|
+
const Kc = (e) => e / 100;
|
|
3404
3406
|
class pr extends hr {
|
|
3405
3407
|
constructor(t) {
|
|
3406
3408
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = (n = !0) => {
|
|
@@ -3417,7 +3419,7 @@ class pr extends hr {
|
|
|
3417
3419
|
const { type: n = qe, repeat: r = 0, repeatDelay: i = 0, repeatType: s, velocity: a = 0 } = t;
|
|
3418
3420
|
let { keyframes: o } = t;
|
|
3419
3421
|
const l = n || qe;
|
|
3420
|
-
process.env.NODE_ENV !== "production" && l !== qe && be(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== qe && typeof o[0] != "number" && (this.mixKeyframes = kt(
|
|
3422
|
+
process.env.NODE_ENV !== "production" && l !== qe && be(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== qe && typeof o[0] != "number" && (this.mixKeyframes = kt(Kc, Ws(o[0], o[1])), o = [0, 100]);
|
|
3421
3423
|
const u = l({ ...t, keyframes: o });
|
|
3422
3424
|
s === "mirror" && (this.mirroredGenerator = l({
|
|
3423
3425
|
...t,
|
|
@@ -3461,13 +3463,13 @@ class pr extends hr {
|
|
|
3461
3463
|
return this.finished.then(t, n);
|
|
3462
3464
|
}
|
|
3463
3465
|
get duration() {
|
|
3464
|
-
return /* @__PURE__ */
|
|
3466
|
+
return /* @__PURE__ */ he(this.calculatedDuration);
|
|
3465
3467
|
}
|
|
3466
3468
|
get time() {
|
|
3467
|
-
return /* @__PURE__ */
|
|
3469
|
+
return /* @__PURE__ */ he(this.currentTime);
|
|
3468
3470
|
}
|
|
3469
3471
|
set time(t) {
|
|
3470
|
-
t = /* @__PURE__ */
|
|
3472
|
+
t = /* @__PURE__ */ ue(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver?.start(!1);
|
|
3471
3473
|
}
|
|
3472
3474
|
get speed() {
|
|
3473
3475
|
return this.playbackSpeed;
|
|
@@ -3475,12 +3477,12 @@ class pr extends hr {
|
|
|
3475
3477
|
set speed(t) {
|
|
3476
3478
|
this.updateTime(te.now());
|
|
3477
3479
|
const n = this.playbackSpeed !== t;
|
|
3478
|
-
this.playbackSpeed = t, n && (this.time = /* @__PURE__ */
|
|
3480
|
+
this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ he(this.currentTime));
|
|
3479
3481
|
}
|
|
3480
3482
|
play() {
|
|
3481
3483
|
if (this.isStopped)
|
|
3482
3484
|
return;
|
|
3483
|
-
const { driver: t =
|
|
3485
|
+
const { driver: t = Pc, startTime: n } = this.options;
|
|
3484
3486
|
this.driver || (this.driver = t((i) => this.tick(i))), this.options.onPlay?.();
|
|
3485
3487
|
const r = this.driver.now();
|
|
3486
3488
|
this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = n ?? r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -3510,14 +3512,14 @@ class pr extends hr {
|
|
|
3510
3512
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
|
|
3511
3513
|
}
|
|
3512
3514
|
}
|
|
3513
|
-
function
|
|
3515
|
+
function zc(e) {
|
|
3514
3516
|
for (let t = 1; t < e.length; t++)
|
|
3515
3517
|
e[t] ?? (e[t] = e[t - 1]);
|
|
3516
3518
|
}
|
|
3517
3519
|
const Ie = (e) => e * 180 / Math.PI, Vn = (e) => {
|
|
3518
3520
|
const t = Ie(Math.atan2(e[1], e[0]));
|
|
3519
3521
|
return Rn(t);
|
|
3520
|
-
},
|
|
3522
|
+
}, Uc = {
|
|
3521
3523
|
x: 4,
|
|
3522
3524
|
y: 5,
|
|
3523
3525
|
translateX: 4,
|
|
@@ -3530,7 +3532,7 @@ const Ie = (e) => e * 180 / Math.PI, Vn = (e) => {
|
|
|
3530
3532
|
skewX: (e) => Ie(Math.atan(e[1])),
|
|
3531
3533
|
skewY: (e) => Ie(Math.atan(e[2])),
|
|
3532
3534
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
3533
|
-
}, Rn = (e) => (e = e % 360, e < 0 && (e += 360), e), Jr = Vn, Qr = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), ei = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]),
|
|
3535
|
+
}, Rn = (e) => (e = e % 360, e < 0 && (e += 360), e), Jr = Vn, Qr = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), ei = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), $c = {
|
|
3534
3536
|
x: 12,
|
|
3535
3537
|
y: 13,
|
|
3536
3538
|
z: 14,
|
|
@@ -3557,21 +3559,21 @@ function In(e, t) {
|
|
|
3557
3559
|
const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
3558
3560
|
let r, i;
|
|
3559
3561
|
if (n)
|
|
3560
|
-
r =
|
|
3562
|
+
r = $c, i = n;
|
|
3561
3563
|
else {
|
|
3562
3564
|
const o = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
3563
|
-
r =
|
|
3565
|
+
r = Uc, i = o;
|
|
3564
3566
|
}
|
|
3565
3567
|
if (!i)
|
|
3566
3568
|
return Mn(t);
|
|
3567
|
-
const s = r[t], a = i[1].split(",").map(
|
|
3569
|
+
const s = r[t], a = i[1].split(",").map(Wc);
|
|
3568
3570
|
return typeof s == "function" ? s(a) : a[s];
|
|
3569
3571
|
}
|
|
3570
|
-
const
|
|
3572
|
+
const Gc = (e, t) => {
|
|
3571
3573
|
const { transform: n = "none" } = getComputedStyle(e);
|
|
3572
3574
|
return In(n, t);
|
|
3573
3575
|
};
|
|
3574
|
-
function
|
|
3576
|
+
function Wc(e) {
|
|
3575
3577
|
return parseFloat(e.trim());
|
|
3576
3578
|
}
|
|
3577
3579
|
const Je = [
|
|
@@ -3592,10 +3594,10 @@ const Je = [
|
|
|
3592
3594
|
"skew",
|
|
3593
3595
|
"skewX",
|
|
3594
3596
|
"skewY"
|
|
3595
|
-
], Qe = new Set(Je), ti = (e) => e === Xe || e === S,
|
|
3596
|
-
function
|
|
3597
|
+
], Qe = new Set(Je), ti = (e) => e === Xe || e === S, Yc = /* @__PURE__ */ new Set(["x", "y", "z"]), Hc = Je.filter((e) => !Yc.has(e));
|
|
3598
|
+
function Zc(e) {
|
|
3597
3599
|
const t = [];
|
|
3598
|
-
return
|
|
3600
|
+
return Hc.forEach((n) => {
|
|
3599
3601
|
const r = e.getValue(n);
|
|
3600
3602
|
r !== void 0 && (t.push([n, r.get()]), r.set(n.startsWith("scale") ? 1 : 0));
|
|
3601
3603
|
}), t;
|
|
@@ -3620,7 +3622,7 @@ function Xs() {
|
|
|
3620
3622
|
if (Ln) {
|
|
3621
3623
|
const e = Array.from(Ne).filter((r) => r.needsMeasurement), t = new Set(e.map((r) => r.element)), n = /* @__PURE__ */ new Map();
|
|
3622
3624
|
t.forEach((r) => {
|
|
3623
|
-
const i =
|
|
3625
|
+
const i = Zc(r);
|
|
3624
3626
|
i.length && (n.set(r, i), r.render());
|
|
3625
3627
|
}), e.forEach((r) => r.measureInitialState()), t.forEach((r) => {
|
|
3626
3628
|
r.render();
|
|
@@ -3639,7 +3641,7 @@ function Js() {
|
|
|
3639
3641
|
e.readKeyframes(), e.needsMeasurement && (Ln = !0);
|
|
3640
3642
|
});
|
|
3641
3643
|
}
|
|
3642
|
-
function
|
|
3644
|
+
function Xc() {
|
|
3643
3645
|
Nn = !0, Js(), Xs(), Nn = !1;
|
|
3644
3646
|
}
|
|
3645
3647
|
class fr {
|
|
@@ -3661,7 +3663,7 @@ class fr {
|
|
|
3661
3663
|
}
|
|
3662
3664
|
t[0] === void 0 && (t[0] = a), i && s === void 0 && i.set(t[0]);
|
|
3663
3665
|
}
|
|
3664
|
-
|
|
3666
|
+
zc(t);
|
|
3665
3667
|
}
|
|
3666
3668
|
setFinalKeyframe() {
|
|
3667
3669
|
}
|
|
@@ -3681,16 +3683,16 @@ class fr {
|
|
|
3681
3683
|
this.state === "pending" && this.scheduleResolve();
|
|
3682
3684
|
}
|
|
3683
3685
|
}
|
|
3684
|
-
const
|
|
3685
|
-
function
|
|
3686
|
-
|
|
3686
|
+
const Jc = (e) => e.startsWith("--");
|
|
3687
|
+
function Qc(e, t, n) {
|
|
3688
|
+
Jc(t) ? e.style.setProperty(t, n) : e.style[t] = n;
|
|
3687
3689
|
}
|
|
3688
|
-
const
|
|
3689
|
-
function
|
|
3690
|
+
const eu = /* @__PURE__ */ er(() => window.ScrollTimeline !== void 0), tu = {};
|
|
3691
|
+
function nu(e, t) {
|
|
3690
3692
|
const n = /* @__PURE__ */ er(e);
|
|
3691
|
-
return () =>
|
|
3693
|
+
return () => tu[t] ?? n();
|
|
3692
3694
|
}
|
|
3693
|
-
const Qs = /* @__PURE__ */
|
|
3695
|
+
const Qs = /* @__PURE__ */ nu(() => {
|
|
3694
3696
|
try {
|
|
3695
3697
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
3696
3698
|
} catch {
|
|
@@ -3712,7 +3714,7 @@ function ea(e, t) {
|
|
|
3712
3714
|
if (e)
|
|
3713
3715
|
return typeof e == "function" ? Qs() ? Ys(e, t) : "ease-out" : Bs(e) ? ct(e) : Array.isArray(e) ? e.map((n) => ea(n, t) || ni.easeOut) : ni[e];
|
|
3714
3716
|
}
|
|
3715
|
-
function
|
|
3717
|
+
function ru(e, t, n, { delay: r = 0, duration: i = 300, repeat: s = 0, repeatType: a = "loop", ease: o = "easeOut", times: l } = {}, u = void 0) {
|
|
3716
3718
|
const c = {
|
|
3717
3719
|
[t]: n
|
|
3718
3720
|
};
|
|
@@ -3732,20 +3734,20 @@ function tu(e, t, n, { delay: r = 0, duration: i = 300, repeat: s = 0, repeatTyp
|
|
|
3732
3734
|
function ta(e) {
|
|
3733
3735
|
return typeof e == "function" && "applyToOptions" in e;
|
|
3734
3736
|
}
|
|
3735
|
-
function
|
|
3737
|
+
function iu({ type: e, ...t }) {
|
|
3736
3738
|
return ta(e) && Qs() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
|
|
3737
3739
|
}
|
|
3738
|
-
class
|
|
3740
|
+
class su extends hr {
|
|
3739
3741
|
constructor(t) {
|
|
3740
3742
|
if (super(), this.finishedTime = null, this.isStopped = !1, !t)
|
|
3741
3743
|
return;
|
|
3742
3744
|
const { element: n, name: r, keyframes: i, pseudoElement: s, allowFlatten: a = !1, finalKeyframe: o, onComplete: l } = t;
|
|
3743
3745
|
this.isPseudoElement = !!s, this.allowFlatten = a, this.options = t, be(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
|
|
3744
|
-
const u =
|
|
3745
|
-
this.animation =
|
|
3746
|
+
const u = iu(t);
|
|
3747
|
+
this.animation = ru(n, r, i, u, s), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
3746
3748
|
if (this.finishedTime = this.time, !s) {
|
|
3747
3749
|
const c = dr(i, this.options, o, this.speed);
|
|
3748
|
-
this.updateMotionValue ? this.updateMotionValue(c) :
|
|
3750
|
+
this.updateMotionValue ? this.updateMotionValue(c) : Qc(n, r, c), this.animation.cancel();
|
|
3749
3751
|
}
|
|
3750
3752
|
l?.(), this.notifyFinished();
|
|
3751
3753
|
};
|
|
@@ -3789,13 +3791,13 @@ class ru extends hr {
|
|
|
3789
3791
|
}
|
|
3790
3792
|
get duration() {
|
|
3791
3793
|
const t = this.animation.effect?.getComputedTiming?.().duration || 0;
|
|
3792
|
-
return /* @__PURE__ */
|
|
3794
|
+
return /* @__PURE__ */ he(Number(t));
|
|
3793
3795
|
}
|
|
3794
3796
|
get time() {
|
|
3795
|
-
return /* @__PURE__ */
|
|
3797
|
+
return /* @__PURE__ */ he(Number(this.animation.currentTime) || 0);
|
|
3796
3798
|
}
|
|
3797
3799
|
set time(t) {
|
|
3798
|
-
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
3800
|
+
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ ue(t);
|
|
3799
3801
|
}
|
|
3800
3802
|
/**
|
|
3801
3803
|
* The playback speed of the animation.
|
|
@@ -3820,7 +3822,7 @@ class ru extends hr {
|
|
|
3820
3822
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
3821
3823
|
*/
|
|
3822
3824
|
attachTimeline({ timeline: t, observe: n }) {
|
|
3823
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t &&
|
|
3825
|
+
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && eu() ? (this.animation.timeline = t, ae) : n(this);
|
|
3824
3826
|
}
|
|
3825
3827
|
}
|
|
3826
3828
|
const na = {
|
|
@@ -3828,16 +3830,16 @@ const na = {
|
|
|
3828
3830
|
backInOut: Is,
|
|
3829
3831
|
circInOut: Ns
|
|
3830
3832
|
};
|
|
3831
|
-
function
|
|
3833
|
+
function au(e) {
|
|
3832
3834
|
return e in na;
|
|
3833
3835
|
}
|
|
3834
|
-
function
|
|
3835
|
-
typeof e.ease == "string" &&
|
|
3836
|
+
function ou(e) {
|
|
3837
|
+
typeof e.ease == "string" && au(e.ease) && (e.ease = na[e.ease]);
|
|
3836
3838
|
}
|
|
3837
3839
|
const ri = 10;
|
|
3838
|
-
class
|
|
3840
|
+
class lu extends su {
|
|
3839
3841
|
constructor(t) {
|
|
3840
|
-
|
|
3842
|
+
ou(t), Zs(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
|
|
3841
3843
|
}
|
|
3842
3844
|
/**
|
|
3843
3845
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -3858,14 +3860,14 @@ class au extends ru {
|
|
|
3858
3860
|
const o = new pr({
|
|
3859
3861
|
...a,
|
|
3860
3862
|
autoplay: !1
|
|
3861
|
-
}), l = /* @__PURE__ */
|
|
3863
|
+
}), l = /* @__PURE__ */ ue(this.finishedTime ?? this.time);
|
|
3862
3864
|
n.setWithVelocity(o.sample(l - ri).value, o.sample(l).value, ri), o.stop();
|
|
3863
3865
|
}
|
|
3864
3866
|
}
|
|
3865
3867
|
const ii = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
3866
3868
|
(Ee.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
3867
3869
|
!e.startsWith("url("));
|
|
3868
|
-
function
|
|
3870
|
+
function cu(e) {
|
|
3869
3871
|
const t = e[0];
|
|
3870
3872
|
if (e.length === 1)
|
|
3871
3873
|
return !0;
|
|
@@ -3873,39 +3875,39 @@ function ou(e) {
|
|
|
3873
3875
|
if (e[n] !== t)
|
|
3874
3876
|
return !0;
|
|
3875
3877
|
}
|
|
3876
|
-
function
|
|
3878
|
+
function uu(e, t, n, r) {
|
|
3877
3879
|
const i = e[0];
|
|
3878
3880
|
if (i === null)
|
|
3879
3881
|
return !1;
|
|
3880
3882
|
if (t === "display" || t === "visibility")
|
|
3881
3883
|
return !0;
|
|
3882
3884
|
const s = e[e.length - 1], a = ii(i, t), o = ii(s, t);
|
|
3883
|
-
return Ze(a === o, `You are trying to animate ${t} from "${i}" to "${s}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${s} via the \`style\` property.`), !a || !o ? !1 :
|
|
3885
|
+
return Ze(a === o, `You are trying to animate ${t} from "${i}" to "${s}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${s} via the \`style\` property.`), !a || !o ? !1 : cu(e) || (n === "spring" || ta(n)) && r;
|
|
3884
3886
|
}
|
|
3885
3887
|
function mr(e) {
|
|
3886
3888
|
return As(e) && "offsetHeight" in e;
|
|
3887
3889
|
}
|
|
3888
|
-
const
|
|
3890
|
+
const du = /* @__PURE__ */ new Set([
|
|
3889
3891
|
"opacity",
|
|
3890
3892
|
"clipPath",
|
|
3891
3893
|
"filter",
|
|
3892
3894
|
"transform"
|
|
3893
3895
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
3894
3896
|
// "background-color"
|
|
3895
|
-
]),
|
|
3896
|
-
function
|
|
3897
|
+
]), hu = /* @__PURE__ */ er(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
3898
|
+
function pu(e) {
|
|
3897
3899
|
const { motionValue: t, name: n, repeatDelay: r, repeatType: i, damping: s, type: a } = e;
|
|
3898
3900
|
if (!mr(t?.owner?.current))
|
|
3899
3901
|
return !1;
|
|
3900
3902
|
const { onUpdate: o, transformTemplate: l } = t.owner.getProps();
|
|
3901
|
-
return
|
|
3903
|
+
return hu() && n && du.has(n) && (n !== "transform" || !l) && /**
|
|
3902
3904
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
3903
3905
|
* no way to read the value from WAAPI every frame.
|
|
3904
3906
|
*/
|
|
3905
3907
|
!o && !r && i !== "mirror" && s !== 0 && a !== "inertia";
|
|
3906
3908
|
}
|
|
3907
|
-
const
|
|
3908
|
-
class
|
|
3909
|
+
const fu = 40;
|
|
3910
|
+
class mu extends hr {
|
|
3909
3911
|
constructor({ autoplay: t = !0, delay: n = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: a = "loop", keyframes: o, name: l, motionValue: u, element: c, ...d }) {
|
|
3910
3912
|
super(), this.stop = () => {
|
|
3911
3913
|
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
@@ -3927,13 +3929,13 @@ class pu extends hr {
|
|
|
3927
3929
|
onKeyframesResolved(t, n, r, i) {
|
|
3928
3930
|
this.keyframeResolver = void 0;
|
|
3929
3931
|
const { name: s, type: a, velocity: o, delay: l, isHandoff: u, onUpdate: c } = r;
|
|
3930
|
-
this.resolvedAt = te.now(),
|
|
3932
|
+
this.resolvedAt = te.now(), uu(t, s, a, o) || ((xe.instantAnimations || !l) && c?.(dr(t, r, n)), t[0] = t[t.length - 1], r.duration = 0, r.repeat = 0);
|
|
3931
3933
|
const p = {
|
|
3932
|
-
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
3934
|
+
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > fu ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
3933
3935
|
finalKeyframe: n,
|
|
3934
3936
|
...r,
|
|
3935
3937
|
keyframes: t
|
|
3936
|
-
}, f = !u &&
|
|
3938
|
+
}, f = !u && pu(p) ? new lu({
|
|
3937
3939
|
...p,
|
|
3938
3940
|
element: p.motionValue.owner.current
|
|
3939
3941
|
}) : new pr(p);
|
|
@@ -3947,7 +3949,7 @@ class pu extends hr {
|
|
|
3947
3949
|
});
|
|
3948
3950
|
}
|
|
3949
3951
|
get animation() {
|
|
3950
|
-
return this._animation || (this.keyframeResolver?.resume(),
|
|
3952
|
+
return this._animation || (this.keyframeResolver?.resume(), Xc()), this._animation;
|
|
3951
3953
|
}
|
|
3952
3954
|
get duration() {
|
|
3953
3955
|
return this.animation.duration;
|
|
@@ -3986,21 +3988,21 @@ class pu extends hr {
|
|
|
3986
3988
|
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
3987
3989
|
}
|
|
3988
3990
|
}
|
|
3989
|
-
const
|
|
3991
|
+
const gu = (
|
|
3990
3992
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
3991
3993
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
3992
3994
|
);
|
|
3993
|
-
function
|
|
3994
|
-
const t =
|
|
3995
|
+
function yu(e) {
|
|
3996
|
+
const t = gu.exec(e);
|
|
3995
3997
|
if (!t)
|
|
3996
3998
|
return [,];
|
|
3997
3999
|
const [, n, r, i] = t;
|
|
3998
4000
|
return [`--${n ?? r}`, i];
|
|
3999
4001
|
}
|
|
4000
|
-
const
|
|
4002
|
+
const vu = 4;
|
|
4001
4003
|
function ra(e, t, n = 1) {
|
|
4002
|
-
be(n <=
|
|
4003
|
-
const [r, i] =
|
|
4004
|
+
be(n <= vu, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
|
|
4005
|
+
const [r, i] = yu(e);
|
|
4004
4006
|
if (!r)
|
|
4005
4007
|
return;
|
|
4006
4008
|
const s = window.getComputedStyle(t).getPropertyValue(r);
|
|
@@ -4021,15 +4023,15 @@ const ia = /* @__PURE__ */ new Set([
|
|
|
4021
4023
|
"right",
|
|
4022
4024
|
"bottom",
|
|
4023
4025
|
...Je
|
|
4024
|
-
]),
|
|
4026
|
+
]), bu = {
|
|
4025
4027
|
test: (e) => e === "auto",
|
|
4026
4028
|
parse: (e) => e
|
|
4027
|
-
}, sa = (e) => (t) => t.test(e), aa = [Xe, S,
|
|
4028
|
-
function
|
|
4029
|
+
}, sa = (e) => (t) => t.test(e), aa = [Xe, S, pe, we, cc, lc, bu], si = (e) => aa.find(sa(e));
|
|
4030
|
+
function xu(e) {
|
|
4029
4031
|
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Ss(e) : !0;
|
|
4030
4032
|
}
|
|
4031
|
-
const
|
|
4032
|
-
function
|
|
4033
|
+
const Cu = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
4034
|
+
function Tu(e) {
|
|
4033
4035
|
const [t, n] = e.slice(0, -1).split("(");
|
|
4034
4036
|
if (t === "drop-shadow")
|
|
4035
4037
|
return e;
|
|
@@ -4037,19 +4039,19 @@ function xu(e) {
|
|
|
4037
4039
|
if (!r)
|
|
4038
4040
|
return e;
|
|
4039
4041
|
const i = n.replace(r, "");
|
|
4040
|
-
let s =
|
|
4042
|
+
let s = Cu.has(t) ? 1 : 0;
|
|
4041
4043
|
return r !== n && (s *= 100), t + "(" + s + i + ")";
|
|
4042
4044
|
}
|
|
4043
|
-
const
|
|
4045
|
+
const wu = /\b([a-z-]*)\(.*?\)/gu, On = {
|
|
4044
4046
|
...Ee,
|
|
4045
4047
|
getAnimatableNone: (e) => {
|
|
4046
|
-
const t = e.match(
|
|
4047
|
-
return t ? t.map(
|
|
4048
|
+
const t = e.match(wu);
|
|
4049
|
+
return t ? t.map(Tu).join(" ") : e;
|
|
4048
4050
|
}
|
|
4049
4051
|
}, ai = {
|
|
4050
4052
|
...Xe,
|
|
4051
4053
|
transform: Math.round
|
|
4052
|
-
},
|
|
4054
|
+
}, ku = {
|
|
4053
4055
|
rotate: we,
|
|
4054
4056
|
rotateX: we,
|
|
4055
4057
|
rotateY: we,
|
|
@@ -4110,13 +4112,13 @@ const Cu = /\b([a-z-]*)\(.*?\)/gu, On = {
|
|
|
4110
4112
|
// Misc
|
|
4111
4113
|
backgroundPositionX: S,
|
|
4112
4114
|
backgroundPositionY: S,
|
|
4113
|
-
...
|
|
4115
|
+
...ku,
|
|
4114
4116
|
zIndex: ai,
|
|
4115
4117
|
// SVG
|
|
4116
4118
|
fillOpacity: yt,
|
|
4117
4119
|
strokeOpacity: yt,
|
|
4118
4120
|
numOctaves: ai
|
|
4119
|
-
},
|
|
4121
|
+
}, Pu = {
|
|
4120
4122
|
...yr,
|
|
4121
4123
|
// Color props
|
|
4122
4124
|
color: Y,
|
|
@@ -4132,23 +4134,23 @@ const Cu = /\b([a-z-]*)\(.*?\)/gu, On = {
|
|
|
4132
4134
|
borderLeftColor: Y,
|
|
4133
4135
|
filter: On,
|
|
4134
4136
|
WebkitFilter: On
|
|
4135
|
-
}, oa = (e) =>
|
|
4137
|
+
}, oa = (e) => Pu[e];
|
|
4136
4138
|
function la(e, t) {
|
|
4137
4139
|
let n = oa(e);
|
|
4138
4140
|
return n !== On && (n = Ee), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
4139
4141
|
}
|
|
4140
|
-
const
|
|
4141
|
-
function
|
|
4142
|
+
const Au = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
4143
|
+
function Su(e, t, n) {
|
|
4142
4144
|
let r = 0, i;
|
|
4143
4145
|
for (; r < e.length && !i; ) {
|
|
4144
4146
|
const s = e[r];
|
|
4145
|
-
typeof s == "string" && !
|
|
4147
|
+
typeof s == "string" && !Au.has(s) && vt(s).values.length && (i = e[r]), r++;
|
|
4146
4148
|
}
|
|
4147
4149
|
if (i && n)
|
|
4148
4150
|
for (const s of t)
|
|
4149
4151
|
e[s] = la(n, i);
|
|
4150
4152
|
}
|
|
4151
|
-
class
|
|
4153
|
+
class Eu extends fr {
|
|
4152
4154
|
constructor(t, n, r, i, s) {
|
|
4153
4155
|
super(t, n, r, i, s, !0);
|
|
4154
4156
|
}
|
|
@@ -4178,8 +4180,8 @@ class Au extends fr {
|
|
|
4178
4180
|
resolveNoneKeyframes() {
|
|
4179
4181
|
const { unresolvedKeyframes: t, name: n } = this, r = [];
|
|
4180
4182
|
for (let i = 0; i < t.length; i++)
|
|
4181
|
-
(t[i] === null ||
|
|
4182
|
-
r.length &&
|
|
4183
|
+
(t[i] === null || xu(t[i])) && r.push(i);
|
|
4184
|
+
r.length && Su(t, r, n);
|
|
4183
4185
|
}
|
|
4184
4186
|
measureInitialState() {
|
|
4185
4187
|
const { element: t, unresolvedKeyframes: n, name: r } = this;
|
|
@@ -4201,7 +4203,7 @@ class Au extends fr {
|
|
|
4201
4203
|
}), this.resolveNoneKeyframes();
|
|
4202
4204
|
}
|
|
4203
4205
|
}
|
|
4204
|
-
function
|
|
4206
|
+
function ju(e, t, n) {
|
|
4205
4207
|
if (e instanceof EventTarget)
|
|
4206
4208
|
return [e];
|
|
4207
4209
|
if (typeof e == "string") {
|
|
@@ -4211,8 +4213,8 @@ function Su(e, t, n) {
|
|
|
4211
4213
|
}
|
|
4212
4214
|
return Array.from(e);
|
|
4213
4215
|
}
|
|
4214
|
-
const oi = 30,
|
|
4215
|
-
class
|
|
4216
|
+
const oi = 30, Vu = (e) => !isNaN(parseFloat(e));
|
|
4217
|
+
class Ru {
|
|
4216
4218
|
/**
|
|
4217
4219
|
* @param init - The initiating value
|
|
4218
4220
|
* @param config - Optional configuration options
|
|
@@ -4229,7 +4231,7 @@ class ju {
|
|
|
4229
4231
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
4230
4232
|
}
|
|
4231
4233
|
setCurrent(t) {
|
|
4232
|
-
this.current = t, this.updatedAt = te.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity =
|
|
4234
|
+
this.current = t, this.updatedAt = te.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = Vu(this.current));
|
|
4233
4235
|
}
|
|
4234
4236
|
setPrevFrameValue(t = this.current) {
|
|
4235
4237
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -4413,24 +4415,24 @@ class ju {
|
|
|
4413
4415
|
}
|
|
4414
4416
|
}
|
|
4415
4417
|
function Ge(e, t) {
|
|
4416
|
-
return new
|
|
4418
|
+
return new Ru(e, t);
|
|
4417
4419
|
}
|
|
4418
|
-
const ca = (e, t) => t && typeof e == "number" ? t.transform(e) : e, { schedule: vr } = /* @__PURE__ */ _s(queueMicrotask, !1),
|
|
4420
|
+
const ca = (e, t) => t && typeof e == "number" ? t.transform(e) : e, { schedule: vr } = /* @__PURE__ */ _s(queueMicrotask, !1), ce = {
|
|
4419
4421
|
x: !1,
|
|
4420
4422
|
y: !1
|
|
4421
4423
|
};
|
|
4422
4424
|
function ua() {
|
|
4423
|
-
return
|
|
4425
|
+
return ce.x || ce.y;
|
|
4424
4426
|
}
|
|
4425
|
-
function
|
|
4426
|
-
return e === "x" || e === "y" ?
|
|
4427
|
-
|
|
4428
|
-
}) :
|
|
4429
|
-
|
|
4427
|
+
function Mu(e) {
|
|
4428
|
+
return e === "x" || e === "y" ? ce[e] ? null : (ce[e] = !0, () => {
|
|
4429
|
+
ce[e] = !1;
|
|
4430
|
+
}) : ce.x || ce.y ? null : (ce.x = ce.y = !0, () => {
|
|
4431
|
+
ce.x = ce.y = !1;
|
|
4430
4432
|
});
|
|
4431
4433
|
}
|
|
4432
4434
|
function da(e, t) {
|
|
4433
|
-
const n =
|
|
4435
|
+
const n = ju(e), r = new AbortController(), i = {
|
|
4434
4436
|
passive: !0,
|
|
4435
4437
|
...t,
|
|
4436
4438
|
signal: r.signal
|
|
@@ -4440,7 +4442,7 @@ function da(e, t) {
|
|
|
4440
4442
|
function li(e) {
|
|
4441
4443
|
return !(e.pointerType === "touch" || ua());
|
|
4442
4444
|
}
|
|
4443
|
-
function
|
|
4445
|
+
function Iu(e, t, n = {}) {
|
|
4444
4446
|
const [r, i, s] = da(e, n), a = (o) => {
|
|
4445
4447
|
if (!li(o))
|
|
4446
4448
|
return;
|
|
@@ -4456,15 +4458,15 @@ function Ru(e, t, n = {}) {
|
|
|
4456
4458
|
o.addEventListener("pointerenter", a, i);
|
|
4457
4459
|
}), s;
|
|
4458
4460
|
}
|
|
4459
|
-
const ha = (e, t) => t ? e === t ? !0 : ha(e, t.parentElement) : !1, br = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1,
|
|
4461
|
+
const ha = (e, t) => t ? e === t ? !0 : ha(e, t.parentElement) : !1, br = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, Du = /* @__PURE__ */ new Set([
|
|
4460
4462
|
"BUTTON",
|
|
4461
4463
|
"INPUT",
|
|
4462
4464
|
"SELECT",
|
|
4463
4465
|
"TEXTAREA",
|
|
4464
4466
|
"A"
|
|
4465
4467
|
]);
|
|
4466
|
-
function
|
|
4467
|
-
return
|
|
4468
|
+
function Lu(e) {
|
|
4469
|
+
return Du.has(e.tagName) || e.tabIndex !== -1;
|
|
4468
4470
|
}
|
|
4469
4471
|
const zt = /* @__PURE__ */ new WeakSet();
|
|
4470
4472
|
function ci(e) {
|
|
@@ -4475,7 +4477,7 @@ function ci(e) {
|
|
|
4475
4477
|
function pn(e, t) {
|
|
4476
4478
|
e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
|
|
4477
4479
|
}
|
|
4478
|
-
const
|
|
4480
|
+
const Nu = (e, t) => {
|
|
4479
4481
|
const n = e.currentTarget;
|
|
4480
4482
|
if (!n)
|
|
4481
4483
|
return;
|
|
@@ -4493,7 +4495,7 @@ const Du = (e, t) => {
|
|
|
4493
4495
|
function ui(e) {
|
|
4494
4496
|
return br(e) && !ua();
|
|
4495
4497
|
}
|
|
4496
|
-
function
|
|
4498
|
+
function Ou(e, t, n = {}) {
|
|
4497
4499
|
const [r, i, s] = da(e, n), a = (o) => {
|
|
4498
4500
|
const l = o.currentTarget;
|
|
4499
4501
|
if (!ui(o))
|
|
@@ -4509,21 +4511,21 @@ function Lu(e, t, n = {}) {
|
|
|
4509
4511
|
window.addEventListener("pointerup", d, i), window.addEventListener("pointercancel", p, i);
|
|
4510
4512
|
};
|
|
4511
4513
|
return r.forEach((o) => {
|
|
4512
|
-
(n.useGlobalTarget ? window : o).addEventListener("pointerdown", a, i), mr(o) && (o.addEventListener("focus", (u) =>
|
|
4514
|
+
(n.useGlobalTarget ? window : o).addEventListener("pointerdown", a, i), mr(o) && (o.addEventListener("focus", (u) => Nu(u, i)), !Lu(o) && !o.hasAttribute("tabindex") && (o.tabIndex = 0));
|
|
4513
4515
|
}), s;
|
|
4514
4516
|
}
|
|
4515
4517
|
function pa(e) {
|
|
4516
4518
|
return As(e) && "ownerSVGElement" in e;
|
|
4517
4519
|
}
|
|
4518
|
-
function
|
|
4520
|
+
function Bu(e) {
|
|
4519
4521
|
return pa(e) && e.tagName === "svg";
|
|
4520
4522
|
}
|
|
4521
|
-
const H = (e) => !!(e && e.getVelocity),
|
|
4523
|
+
const H = (e) => !!(e && e.getVelocity), _u = [...aa, Y, Ee], Fu = (e) => _u.find(sa(e)), xr = J({
|
|
4522
4524
|
transformPagePoint: (e) => e,
|
|
4523
4525
|
isStatic: !1,
|
|
4524
4526
|
reducedMotion: "never"
|
|
4525
4527
|
});
|
|
4526
|
-
class
|
|
4528
|
+
class qu extends Pe.Component {
|
|
4527
4529
|
getSnapshotBeforeUpdate(t) {
|
|
4528
4530
|
const n = this.props.childRef.current;
|
|
4529
4531
|
if (n && t.isPresent && !this.props.isPresent) {
|
|
@@ -4541,7 +4543,7 @@ class _u extends Pe.Component {
|
|
|
4541
4543
|
return this.props.children;
|
|
4542
4544
|
}
|
|
4543
4545
|
}
|
|
4544
|
-
function
|
|
4546
|
+
function Ku({ children: e, isPresent: t, anchorX: n }) {
|
|
4545
4547
|
const r = Oe(), i = se(null), s = se({
|
|
4546
4548
|
width: 0,
|
|
4547
4549
|
height: 0,
|
|
@@ -4567,10 +4569,10 @@ function Fu({ children: e, isPresent: t, anchorX: n }) {
|
|
|
4567
4569
|
`), () => {
|
|
4568
4570
|
document.head.contains(f) && document.head.removeChild(f);
|
|
4569
4571
|
};
|
|
4570
|
-
}, [t]), h.jsx(
|
|
4572
|
+
}, [t]), h.jsx(qu, { isPresent: t, childRef: i, sizeRef: s, children: Pe.cloneElement(e, { ref: i }) });
|
|
4571
4573
|
}
|
|
4572
|
-
const
|
|
4573
|
-
const l = Zn(
|
|
4574
|
+
const zu = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i, presenceAffectsLayout: s, mode: a, anchorX: o }) => {
|
|
4575
|
+
const l = Zn(Uu), u = Oe();
|
|
4574
4576
|
let c = !0, d = ye(() => (c = !1, {
|
|
4575
4577
|
id: u,
|
|
4576
4578
|
initial: t,
|
|
@@ -4589,9 +4591,9 @@ const qu = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom:
|
|
|
4589
4591
|
l.forEach((p, f) => l.set(f, !1));
|
|
4590
4592
|
}, [n]), Pe.useEffect(() => {
|
|
4591
4593
|
!n && !l.size && r && r();
|
|
4592
|
-
}, [n]), a === "popLayout" && (e = h.jsx(
|
|
4594
|
+
}, [n]), a === "popLayout" && (e = h.jsx(Ku, { isPresent: n, anchorX: o, children: e })), h.jsx(Jt.Provider, { value: d, children: e });
|
|
4593
4595
|
};
|
|
4594
|
-
function
|
|
4596
|
+
function Uu() {
|
|
4595
4597
|
return /* @__PURE__ */ new Map();
|
|
4596
4598
|
}
|
|
4597
4599
|
function fa(e = !0) {
|
|
@@ -4644,7 +4646,7 @@ const hi = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presen
|
|
|
4644
4646
|
M || (R = !1);
|
|
4645
4647
|
}), R && (P?.(), C(f.current), a && u?.(), r && r());
|
|
4646
4648
|
};
|
|
4647
|
-
return h.jsx(
|
|
4649
|
+
return h.jsx(zu, { isPresent: A, initial: !p.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: i, mode: s, onExitComplete: A ? void 0 : k, anchorX: o, children: T }, w);
|
|
4648
4650
|
}) });
|
|
4649
4651
|
}, ma = J({ strict: !1 }), pi = {
|
|
4650
4652
|
animation: [
|
|
@@ -4670,14 +4672,14 @@ for (const e in pi)
|
|
|
4670
4672
|
We[e] = {
|
|
4671
4673
|
isEnabled: (t) => pi[e].some((n) => !!t[n])
|
|
4672
4674
|
};
|
|
4673
|
-
function
|
|
4675
|
+
function $u(e) {
|
|
4674
4676
|
for (const t in e)
|
|
4675
4677
|
We[t] = {
|
|
4676
4678
|
...We[t],
|
|
4677
4679
|
...e[t]
|
|
4678
4680
|
};
|
|
4679
4681
|
}
|
|
4680
|
-
const
|
|
4682
|
+
const Gu = /* @__PURE__ */ new Set([
|
|
4681
4683
|
"animate",
|
|
4682
4684
|
"exit",
|
|
4683
4685
|
"variants",
|
|
@@ -4710,24 +4712,24 @@ const Uu = /* @__PURE__ */ new Set([
|
|
|
4710
4712
|
"viewport"
|
|
4711
4713
|
]);
|
|
4712
4714
|
function Ht(e) {
|
|
4713
|
-
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") ||
|
|
4715
|
+
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Gu.has(e);
|
|
4714
4716
|
}
|
|
4715
4717
|
let ga = (e) => !Ht(e);
|
|
4716
|
-
function
|
|
4718
|
+
function Wu(e) {
|
|
4717
4719
|
e && (ga = (t) => t.startsWith("on") ? !Ht(t) : e(t));
|
|
4718
4720
|
}
|
|
4719
4721
|
try {
|
|
4720
|
-
|
|
4722
|
+
Wu(require("@emotion/is-prop-valid").default);
|
|
4721
4723
|
} catch {
|
|
4722
4724
|
}
|
|
4723
|
-
function
|
|
4725
|
+
function Yu(e, t, n) {
|
|
4724
4726
|
const r = {};
|
|
4725
4727
|
for (const i in e)
|
|
4726
4728
|
i === "values" && typeof e.values == "object" || (ga(i) || n === !0 && Ht(i) || !t && !Ht(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
4727
4729
|
e.draggable && i.startsWith("onDrag")) && (r[i] = e[i]);
|
|
4728
4730
|
return r;
|
|
4729
4731
|
}
|
|
4730
|
-
function
|
|
4732
|
+
function Hu(e) {
|
|
4731
4733
|
if (typeof Proxy > "u")
|
|
4732
4734
|
return e;
|
|
4733
4735
|
const t = /* @__PURE__ */ new Map(), n = (...r) => (process.env.NODE_ENV !== "production" && nr(!1, "motion() is deprecated. Use motion.create() instead."), e(...r));
|
|
@@ -4762,7 +4764,7 @@ function tn(e) {
|
|
|
4762
4764
|
function ya(e) {
|
|
4763
4765
|
return !!(tn(e) || e.variants);
|
|
4764
4766
|
}
|
|
4765
|
-
function
|
|
4767
|
+
function Zu(e, t) {
|
|
4766
4768
|
if (tn(e)) {
|
|
4767
4769
|
const { initial: n, animate: r } = e;
|
|
4768
4770
|
return {
|
|
@@ -4772,18 +4774,18 @@ function Yu(e, t) {
|
|
|
4772
4774
|
}
|
|
4773
4775
|
return e.inherit !== !1 ? t : {};
|
|
4774
4776
|
}
|
|
4775
|
-
function
|
|
4776
|
-
const { initial: t, animate: n } =
|
|
4777
|
+
function Xu(e) {
|
|
4778
|
+
const { initial: t, animate: n } = Zu(e, N(Qt));
|
|
4777
4779
|
return ye(() => ({ initial: t, animate: n }), [fi(t), fi(n)]);
|
|
4778
4780
|
}
|
|
4779
4781
|
function fi(e) {
|
|
4780
4782
|
return Array.isArray(e) ? e.join(" ") : e;
|
|
4781
4783
|
}
|
|
4782
|
-
const
|
|
4784
|
+
const Ju = Symbol.for("motionComponentSymbol");
|
|
4783
4785
|
function Ke(e) {
|
|
4784
4786
|
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
|
|
4785
4787
|
}
|
|
4786
|
-
function
|
|
4788
|
+
function Qu(e, t, n) {
|
|
4787
4789
|
return D(
|
|
4788
4790
|
(r) => {
|
|
4789
4791
|
r && e.onMount && e.onMount(r), t && (r ? t.mount(r) : t.unmount()), n && (typeof n == "function" ? n(r) : Ke(n) && (n.current = r));
|
|
@@ -4796,8 +4798,8 @@ function Xu(e, t, n) {
|
|
|
4796
4798
|
[t]
|
|
4797
4799
|
);
|
|
4798
4800
|
}
|
|
4799
|
-
const wr = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(),
|
|
4800
|
-
function
|
|
4801
|
+
const wr = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ed = "framerAppearId", va = "data-" + wr(ed), ba = J({});
|
|
4802
|
+
function td(e, t, n, r, i) {
|
|
4801
4803
|
const { visualElement: s } = N(Qt), a = N(ma), o = N(Jt), l = N(xr).reducedMotion, u = se(null);
|
|
4802
4804
|
r = r || a.renderer, !u.current && r && (u.current = r(e, {
|
|
4803
4805
|
visualState: t,
|
|
@@ -4808,7 +4810,7 @@ function Qu(e, t, n, r, i) {
|
|
|
4808
4810
|
reducedMotionConfig: l
|
|
4809
4811
|
}));
|
|
4810
4812
|
const c = u.current, d = N(ba);
|
|
4811
|
-
c && !c.projection && i && (c.type === "html" || c.type === "svg") &&
|
|
4813
|
+
c && !c.projection && i && (c.type === "html" || c.type === "svg") && nd(u.current, n, i, d);
|
|
4812
4814
|
const p = se(!1);
|
|
4813
4815
|
ys(() => {
|
|
4814
4816
|
c && p.current && c.update(n, o);
|
|
@@ -4822,7 +4824,7 @@ function Qu(e, t, n, r, i) {
|
|
|
4822
4824
|
}), m.current = !1));
|
|
4823
4825
|
}), c;
|
|
4824
4826
|
}
|
|
4825
|
-
function
|
|
4827
|
+
function nd(e, t, n, r) {
|
|
4826
4828
|
const { layoutId: i, layout: s, drag: a, dragConstraints: o, layoutScroll: l, layoutRoot: u, layoutCrossfade: c } = t;
|
|
4827
4829
|
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : xa(e.parent)), e.projection.setOptions({
|
|
4828
4830
|
layoutId: i,
|
|
@@ -4847,38 +4849,38 @@ function xa(e) {
|
|
|
4847
4849
|
if (e)
|
|
4848
4850
|
return e.options.allowProjection !== !1 ? e.projection : xa(e.parent);
|
|
4849
4851
|
}
|
|
4850
|
-
function
|
|
4851
|
-
e &&
|
|
4852
|
+
function rd({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: r, Component: i }) {
|
|
4853
|
+
e && $u(e);
|
|
4852
4854
|
function s(o, l) {
|
|
4853
4855
|
let u;
|
|
4854
4856
|
const c = {
|
|
4855
4857
|
...N(xr),
|
|
4856
4858
|
...o,
|
|
4857
|
-
layoutId:
|
|
4858
|
-
}, { isStatic: d } = c, p =
|
|
4859
|
+
layoutId: id(o)
|
|
4860
|
+
}, { isStatic: d } = c, p = Xu(o), f = r(o, d);
|
|
4859
4861
|
if (!d && Xn) {
|
|
4860
|
-
|
|
4861
|
-
const m =
|
|
4862
|
-
u = m.MeasureLayout, p.visualElement =
|
|
4862
|
+
sd(c, e);
|
|
4863
|
+
const m = ad(c);
|
|
4864
|
+
u = m.MeasureLayout, p.visualElement = td(i, f, c, t, m.ProjectionNode);
|
|
4863
4865
|
}
|
|
4864
|
-
return h.jsxs(Qt.Provider, { value: p, children: [u && p.visualElement ? h.jsx(u, { visualElement: p.visualElement, ...c }) : null, n(i, o,
|
|
4866
|
+
return h.jsxs(Qt.Provider, { value: p, children: [u && p.visualElement ? h.jsx(u, { visualElement: p.visualElement, ...c }) : null, n(i, o, Qu(f, p.visualElement, l), f, d, p.visualElement)] });
|
|
4865
4867
|
}
|
|
4866
4868
|
s.displayName = `motion.${typeof i == "string" ? i : `create(${i.displayName ?? i.name ?? ""})`}`;
|
|
4867
4869
|
const a = go(s);
|
|
4868
|
-
return a[
|
|
4870
|
+
return a[Ju] = i, a;
|
|
4869
4871
|
}
|
|
4870
|
-
function
|
|
4872
|
+
function id({ layoutId: e }) {
|
|
4871
4873
|
const t = N(Hn).id;
|
|
4872
4874
|
return t && e !== void 0 ? t + "-" + e : e;
|
|
4873
4875
|
}
|
|
4874
|
-
function
|
|
4876
|
+
function sd(e, t) {
|
|
4875
4877
|
const n = N(ma).strict;
|
|
4876
4878
|
if (process.env.NODE_ENV !== "production" && t && n) {
|
|
4877
4879
|
const r = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
4878
4880
|
e.ignoreStrict ? Ze(!1, r) : be(!1, r);
|
|
4879
4881
|
}
|
|
4880
4882
|
}
|
|
4881
|
-
function
|
|
4883
|
+
function ad(e) {
|
|
4882
4884
|
const { drag: t, layout: n } = We;
|
|
4883
4885
|
if (!t && !n)
|
|
4884
4886
|
return {};
|
|
@@ -4889,22 +4891,22 @@ function id(e) {
|
|
|
4889
4891
|
};
|
|
4890
4892
|
}
|
|
4891
4893
|
const xt = {};
|
|
4892
|
-
function
|
|
4894
|
+
function od(e) {
|
|
4893
4895
|
for (const t in e)
|
|
4894
4896
|
xt[t] = e[t], sr(t) && (xt[t].isCSSVariable = !0);
|
|
4895
4897
|
}
|
|
4896
4898
|
function Ca(e, { layout: t, layoutId: n }) {
|
|
4897
4899
|
return Qe.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!xt[e] || e === "opacity");
|
|
4898
4900
|
}
|
|
4899
|
-
const
|
|
4901
|
+
const ld = {
|
|
4900
4902
|
x: "translateX",
|
|
4901
4903
|
y: "translateY",
|
|
4902
4904
|
z: "translateZ",
|
|
4903
4905
|
transformPerspective: "perspective"
|
|
4904
|
-
},
|
|
4905
|
-
function
|
|
4906
|
+
}, cd = Je.length;
|
|
4907
|
+
function ud(e, t, n) {
|
|
4906
4908
|
let r = "", i = !0;
|
|
4907
|
-
for (let s = 0; s <
|
|
4909
|
+
for (let s = 0; s < cd; s++) {
|
|
4908
4910
|
const a = Je[s], o = e[a];
|
|
4909
4911
|
if (o === void 0)
|
|
4910
4912
|
continue;
|
|
@@ -4913,7 +4915,7 @@ function ld(e, t, n) {
|
|
|
4913
4915
|
const u = ca(o, yr[a]);
|
|
4914
4916
|
if (!l) {
|
|
4915
4917
|
i = !1;
|
|
4916
|
-
const c =
|
|
4918
|
+
const c = ld[a] || a;
|
|
4917
4919
|
r += `${c}(${u}) `;
|
|
4918
4920
|
}
|
|
4919
4921
|
n && (t[a] = u);
|
|
@@ -4937,7 +4939,7 @@ function kr(e, t, n) {
|
|
|
4937
4939
|
l.startsWith("origin") ? (o = !0, s[l] = c) : r[l] = c;
|
|
4938
4940
|
}
|
|
4939
4941
|
}
|
|
4940
|
-
if (t.transform || (a || n ? r.transform =
|
|
4942
|
+
if (t.transform || (a || n ? r.transform = ud(t, e.transform, n) : r.transform && (r.transform = "none")), o) {
|
|
4941
4943
|
const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = s;
|
|
4942
4944
|
r.transformOrigin = `${l} ${u} ${c}`;
|
|
4943
4945
|
}
|
|
@@ -4952,30 +4954,30 @@ function Ta(e, t, n) {
|
|
|
4952
4954
|
for (const r in t)
|
|
4953
4955
|
!H(t[r]) && !Ca(r, n) && (e[r] = t[r]);
|
|
4954
4956
|
}
|
|
4955
|
-
function
|
|
4957
|
+
function dd({ transformTemplate: e }, t) {
|
|
4956
4958
|
return ye(() => {
|
|
4957
4959
|
const n = Pr();
|
|
4958
4960
|
return kr(n, t, e), Object.assign({}, n.vars, n.style);
|
|
4959
4961
|
}, [t]);
|
|
4960
4962
|
}
|
|
4961
|
-
function
|
|
4963
|
+
function hd(e, t) {
|
|
4962
4964
|
const n = e.style || {}, r = {};
|
|
4963
|
-
return Ta(r, n, e), Object.assign(r,
|
|
4965
|
+
return Ta(r, n, e), Object.assign(r, dd(e, t)), r;
|
|
4964
4966
|
}
|
|
4965
|
-
function
|
|
4966
|
-
const n = {}, r =
|
|
4967
|
+
function pd(e, t) {
|
|
4968
|
+
const n = {}, r = hd(e, t);
|
|
4967
4969
|
return e.drag && e.dragListener !== !1 && (n.draggable = !1, r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = "none", r.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = r, n;
|
|
4968
4970
|
}
|
|
4969
|
-
const
|
|
4971
|
+
const fd = {
|
|
4970
4972
|
offset: "stroke-dashoffset",
|
|
4971
4973
|
array: "stroke-dasharray"
|
|
4972
|
-
},
|
|
4974
|
+
}, md = {
|
|
4973
4975
|
offset: "strokeDashoffset",
|
|
4974
4976
|
array: "strokeDasharray"
|
|
4975
4977
|
};
|
|
4976
|
-
function
|
|
4978
|
+
function gd(e, t, n = 1, r = 0, i = !0) {
|
|
4977
4979
|
e.pathLength = 1;
|
|
4978
|
-
const s = i ?
|
|
4980
|
+
const s = i ? fd : md;
|
|
4979
4981
|
e[s.offset] = S.transform(-r);
|
|
4980
4982
|
const a = S.transform(t), o = S.transform(n);
|
|
4981
4983
|
e[s.array] = `${a} ${o}`;
|
|
@@ -4996,13 +4998,13 @@ function wa(e, {
|
|
|
4996
4998
|
}
|
|
4997
4999
|
e.attrs = e.style, e.style = {};
|
|
4998
5000
|
const { attrs: d, style: p } = e;
|
|
4999
|
-
d.transform && (p.transform = d.transform, delete d.transform), (p.transform || d.transformOrigin) && (p.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), p.transform && (p.transformBox = c?.transformBox ?? "fill-box", delete d.transformBox), t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), r !== void 0 && (d.scale = r), i !== void 0 &&
|
|
5001
|
+
d.transform && (p.transform = d.transform, delete d.transform), (p.transform || d.transformOrigin) && (p.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), p.transform && (p.transformBox = c?.transformBox ?? "fill-box", delete d.transformBox), t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), r !== void 0 && (d.scale = r), i !== void 0 && gd(d, i, s, a, !1);
|
|
5000
5002
|
}
|
|
5001
5003
|
const ka = () => ({
|
|
5002
5004
|
...Pr(),
|
|
5003
5005
|
attrs: {}
|
|
5004
5006
|
}), Pa = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
5005
|
-
function
|
|
5007
|
+
function yd(e, t, n, r) {
|
|
5006
5008
|
const i = ye(() => {
|
|
5007
5009
|
const s = ka();
|
|
5008
5010
|
return wa(s, t, Pa(r), e.transformTemplate, e.style), {
|
|
@@ -5016,7 +5018,7 @@ function md(e, t, n, r) {
|
|
|
5016
5018
|
}
|
|
5017
5019
|
return i;
|
|
5018
5020
|
}
|
|
5019
|
-
const
|
|
5021
|
+
const vd = [
|
|
5020
5022
|
"animate",
|
|
5021
5023
|
"circle",
|
|
5022
5024
|
"defs",
|
|
@@ -5056,16 +5058,16 @@ function Ar(e) {
|
|
|
5056
5058
|
/**
|
|
5057
5059
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
5058
5060
|
*/
|
|
5059
|
-
!!(
|
|
5061
|
+
!!(vd.indexOf(e) > -1 || /**
|
|
5060
5062
|
* If it contains a capital letter, it's an SVG component
|
|
5061
5063
|
*/
|
|
5062
5064
|
/[A-Z]/u.test(e))
|
|
5063
5065
|
)
|
|
5064
5066
|
);
|
|
5065
5067
|
}
|
|
5066
|
-
function
|
|
5068
|
+
function bd(e = !1) {
|
|
5067
5069
|
return (n, r, i, { latestValues: s }, a) => {
|
|
5068
|
-
const l = (Ar(n) ?
|
|
5070
|
+
const l = (Ar(n) ? yd : pd)(r, s, a, n), u = Yu(r, typeof n == "string", e), c = n !== vs ? { ...u, ...l, ref: i } : {}, { children: d } = r, p = ye(() => H(d) ? d.get() : d, [d]);
|
|
5069
5071
|
return yo(n, {
|
|
5070
5072
|
...c,
|
|
5071
5073
|
children: p
|
|
@@ -5092,17 +5094,17 @@ function Sr(e, t, n, r) {
|
|
|
5092
5094
|
function Ut(e) {
|
|
5093
5095
|
return H(e) ? e.get() : e;
|
|
5094
5096
|
}
|
|
5095
|
-
function
|
|
5097
|
+
function xd({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, r, i) {
|
|
5096
5098
|
return {
|
|
5097
|
-
latestValues:
|
|
5099
|
+
latestValues: Cd(n, r, i, e),
|
|
5098
5100
|
renderState: t()
|
|
5099
5101
|
};
|
|
5100
5102
|
}
|
|
5101
5103
|
const Aa = (e) => (t, n) => {
|
|
5102
|
-
const r = N(Qt), i = N(Jt), s = () =>
|
|
5104
|
+
const r = N(Qt), i = N(Jt), s = () => xd(e, t, r, i);
|
|
5103
5105
|
return n ? s() : Zn(s);
|
|
5104
5106
|
};
|
|
5105
|
-
function
|
|
5107
|
+
function Cd(e, t, n, r) {
|
|
5106
5108
|
const i = {}, s = r(e, {});
|
|
5107
5109
|
for (const p in s)
|
|
5108
5110
|
i[p] = Ut(s[p]);
|
|
@@ -5139,7 +5141,7 @@ function Er(e, t, n) {
|
|
|
5139
5141
|
(H(r[s]) || t.style && H(t.style[s]) || Ca(s, e) || n?.getValue(s)?.liveStyle !== void 0) && (i[s] = r[s]);
|
|
5140
5142
|
return i;
|
|
5141
5143
|
}
|
|
5142
|
-
const
|
|
5144
|
+
const Td = {
|
|
5143
5145
|
useVisualState: Aa({
|
|
5144
5146
|
scrapeMotionValuesFromProps: Er,
|
|
5145
5147
|
createRenderState: Pr
|
|
@@ -5154,22 +5156,22 @@ function Sa(e, t, n) {
|
|
|
5154
5156
|
}
|
|
5155
5157
|
return r;
|
|
5156
5158
|
}
|
|
5157
|
-
const
|
|
5159
|
+
const wd = {
|
|
5158
5160
|
useVisualState: Aa({
|
|
5159
5161
|
scrapeMotionValuesFromProps: Sa,
|
|
5160
5162
|
createRenderState: ka
|
|
5161
5163
|
})
|
|
5162
5164
|
};
|
|
5163
|
-
function
|
|
5165
|
+
function kd(e, t) {
|
|
5164
5166
|
return function(r, { forwardMotionProps: i } = { forwardMotionProps: !1 }) {
|
|
5165
5167
|
const a = {
|
|
5166
|
-
...Ar(r) ?
|
|
5168
|
+
...Ar(r) ? wd : Td,
|
|
5167
5169
|
preloadedFeatures: e,
|
|
5168
|
-
useRender:
|
|
5170
|
+
useRender: bd(i),
|
|
5169
5171
|
createVisualElement: t,
|
|
5170
5172
|
Component: r
|
|
5171
5173
|
};
|
|
5172
|
-
return
|
|
5174
|
+
return rd(a);
|
|
5173
5175
|
};
|
|
5174
5176
|
}
|
|
5175
5177
|
function Ct(e, t, n) {
|
|
@@ -5177,27 +5179,27 @@ function Ct(e, t, n) {
|
|
|
5177
5179
|
return Sr(r, t, n !== void 0 ? n : r.custom, e);
|
|
5178
5180
|
}
|
|
5179
5181
|
const Bn = (e) => Array.isArray(e);
|
|
5180
|
-
function
|
|
5182
|
+
function Pd(e, t, n) {
|
|
5181
5183
|
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, Ge(n));
|
|
5182
5184
|
}
|
|
5183
|
-
function
|
|
5185
|
+
function Ad(e) {
|
|
5184
5186
|
return Bn(e) ? e[e.length - 1] || 0 : e;
|
|
5185
5187
|
}
|
|
5186
|
-
function
|
|
5188
|
+
function Sd(e, t) {
|
|
5187
5189
|
const n = Ct(e, t);
|
|
5188
5190
|
let { transitionEnd: r = {}, transition: i = {}, ...s } = n || {};
|
|
5189
5191
|
s = { ...s, ...r };
|
|
5190
5192
|
for (const a in s) {
|
|
5191
|
-
const o =
|
|
5192
|
-
|
|
5193
|
+
const o = Ad(s[a]);
|
|
5194
|
+
Pd(e, a, o);
|
|
5193
5195
|
}
|
|
5194
5196
|
}
|
|
5195
|
-
function
|
|
5197
|
+
function Ed(e) {
|
|
5196
5198
|
return !!(H(e) && e.add);
|
|
5197
5199
|
}
|
|
5198
5200
|
function _n(e, t) {
|
|
5199
5201
|
const n = e.getValue("willChange");
|
|
5200
|
-
if (
|
|
5202
|
+
if (Ed(n))
|
|
5201
5203
|
return n.add(t);
|
|
5202
5204
|
if (!n && xe.WillChange) {
|
|
5203
5205
|
const r = new xe.WillChange("auto");
|
|
@@ -5207,36 +5209,36 @@ function _n(e, t) {
|
|
|
5207
5209
|
function Ea(e) {
|
|
5208
5210
|
return e.props[va];
|
|
5209
5211
|
}
|
|
5210
|
-
const
|
|
5211
|
-
function
|
|
5212
|
-
const i = e.filter(
|
|
5212
|
+
const jd = (e) => e !== null;
|
|
5213
|
+
function Vd(e, { repeat: t, repeatType: n = "loop" }, r) {
|
|
5214
|
+
const i = e.filter(jd), s = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
5213
5215
|
return i[s];
|
|
5214
5216
|
}
|
|
5215
|
-
const
|
|
5217
|
+
const Rd = {
|
|
5216
5218
|
type: "spring",
|
|
5217
5219
|
stiffness: 500,
|
|
5218
5220
|
damping: 25,
|
|
5219
5221
|
restSpeed: 10
|
|
5220
|
-
},
|
|
5222
|
+
}, Md = (e) => ({
|
|
5221
5223
|
type: "spring",
|
|
5222
5224
|
stiffness: 550,
|
|
5223
5225
|
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
5224
5226
|
restSpeed: 10
|
|
5225
|
-
}),
|
|
5227
|
+
}), Id = {
|
|
5226
5228
|
type: "keyframes",
|
|
5227
5229
|
duration: 0.8
|
|
5228
|
-
},
|
|
5230
|
+
}, Dd = {
|
|
5229
5231
|
type: "keyframes",
|
|
5230
5232
|
ease: [0.25, 0.1, 0.35, 1],
|
|
5231
5233
|
duration: 0.3
|
|
5232
|
-
},
|
|
5233
|
-
function
|
|
5234
|
+
}, Ld = (e, { keyframes: t }) => t.length > 2 ? Id : Qe.has(e) ? e.startsWith("scale") ? Md(t[1]) : Rd : Dd;
|
|
5235
|
+
function Nd({ when: e, delay: t, delayChildren: n, staggerChildren: r, staggerDirection: i, repeat: s, repeatType: a, repeatDelay: o, from: l, elapsed: u, ...c }) {
|
|
5234
5236
|
return !!Object.keys(c).length;
|
|
5235
5237
|
}
|
|
5236
5238
|
const jr = (e, t, n, r = {}, i, s) => (a) => {
|
|
5237
5239
|
const o = gr(r, e) || {}, l = o.delay || r.delay || 0;
|
|
5238
5240
|
let { elapsed: u = 0 } = r;
|
|
5239
|
-
u = u - /* @__PURE__ */
|
|
5241
|
+
u = u - /* @__PURE__ */ ue(l);
|
|
5240
5242
|
const c = {
|
|
5241
5243
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
5242
5244
|
ease: "easeOut",
|
|
@@ -5253,10 +5255,10 @@ const jr = (e, t, n, r = {}, i, s) => (a) => {
|
|
|
5253
5255
|
motionValue: t,
|
|
5254
5256
|
element: s ? void 0 : i
|
|
5255
5257
|
};
|
|
5256
|
-
|
|
5258
|
+
Nd(o) || Object.assign(c, Ld(e, c)), c.duration && (c.duration = /* @__PURE__ */ ue(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ ue(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
5257
5259
|
let d = !1;
|
|
5258
5260
|
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (d = !0)), (xe.instantAnimations || xe.skipAnimations) && (d = !0, c.duration = 0, c.delay = 0), c.allowFlatten = !o.type && !o.ease, d && !s && t.get() !== void 0) {
|
|
5259
|
-
const p =
|
|
5261
|
+
const p = Vd(c.keyframes, o);
|
|
5260
5262
|
if (p !== void 0) {
|
|
5261
5263
|
B.update(() => {
|
|
5262
5264
|
c.onUpdate(p), c.onComplete();
|
|
@@ -5264,9 +5266,9 @@ const jr = (e, t, n, r = {}, i, s) => (a) => {
|
|
|
5264
5266
|
return;
|
|
5265
5267
|
}
|
|
5266
5268
|
}
|
|
5267
|
-
return o.isSync ? new pr(c) : new
|
|
5269
|
+
return o.isSync ? new pr(c) : new mu(c);
|
|
5268
5270
|
};
|
|
5269
|
-
function
|
|
5271
|
+
function Od({ protectedKeys: e, needsAnimating: t }, n) {
|
|
5270
5272
|
const r = e.hasOwnProperty(n) && t[n] !== !0;
|
|
5271
5273
|
return t[n] = !1, r;
|
|
5272
5274
|
}
|
|
@@ -5276,7 +5278,7 @@ function ja(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) {
|
|
|
5276
5278
|
const l = [], u = i && e.animationState && e.animationState.getState()[i];
|
|
5277
5279
|
for (const c in o) {
|
|
5278
5280
|
const d = e.getValue(c, e.latestValues[c] ?? null), p = o[c];
|
|
5279
|
-
if (p === void 0 || u &&
|
|
5281
|
+
if (p === void 0 || u && Od(u, c))
|
|
5280
5282
|
continue;
|
|
5281
5283
|
const f = {
|
|
5282
5284
|
delay: n,
|
|
@@ -5298,7 +5300,7 @@ function ja(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) {
|
|
|
5298
5300
|
}
|
|
5299
5301
|
return a && Promise.all(l).then(() => {
|
|
5300
5302
|
B.update(() => {
|
|
5301
|
-
a &&
|
|
5303
|
+
a && Sd(e, a);
|
|
5302
5304
|
});
|
|
5303
5305
|
}), l;
|
|
5304
5306
|
}
|
|
@@ -5308,7 +5310,7 @@ function Fn(e, t, n = {}) {
|
|
|
5308
5310
|
n.transitionOverride && (i = n.transitionOverride);
|
|
5309
5311
|
const s = r ? () => Promise.all(ja(e, r, n)) : () => Promise.resolve(), a = e.variantChildren && e.variantChildren.size ? (l = 0) => {
|
|
5310
5312
|
const { delayChildren: u = 0, staggerChildren: c, staggerDirection: d } = i;
|
|
5311
|
-
return
|
|
5313
|
+
return Bd(e, t, u + l, c, d, n);
|
|
5312
5314
|
} : () => Promise.resolve(), { when: o } = i;
|
|
5313
5315
|
if (o) {
|
|
5314
5316
|
const [l, u] = o === "beforeChildren" ? [s, a] : [a, s];
|
|
@@ -5316,19 +5318,19 @@ function Fn(e, t, n = {}) {
|
|
|
5316
5318
|
} else
|
|
5317
5319
|
return Promise.all([s(), a(n.delay)]);
|
|
5318
5320
|
}
|
|
5319
|
-
function
|
|
5321
|
+
function Bd(e, t, n = 0, r = 0, i = 1, s) {
|
|
5320
5322
|
const a = [], o = (e.variantChildren.size - 1) * r, l = i === 1 ? (u = 0) => u * r : (u = 0) => o - u * r;
|
|
5321
|
-
return Array.from(e.variantChildren).sort(
|
|
5323
|
+
return Array.from(e.variantChildren).sort(_d).forEach((u, c) => {
|
|
5322
5324
|
u.notify("AnimationStart", t), a.push(Fn(u, t, {
|
|
5323
5325
|
...s,
|
|
5324
5326
|
delay: n + l(c)
|
|
5325
5327
|
}).then(() => u.notify("AnimationComplete", t)));
|
|
5326
5328
|
}), Promise.all(a);
|
|
5327
5329
|
}
|
|
5328
|
-
function
|
|
5330
|
+
function _d(e, t) {
|
|
5329
5331
|
return e.sortNodePosition(t);
|
|
5330
5332
|
}
|
|
5331
|
-
function
|
|
5333
|
+
function Fd(e, t, n = {}) {
|
|
5332
5334
|
e.notify("AnimationStart", t);
|
|
5333
5335
|
let r;
|
|
5334
5336
|
if (Array.isArray(t)) {
|
|
@@ -5355,7 +5357,7 @@ function Va(e, t) {
|
|
|
5355
5357
|
return !1;
|
|
5356
5358
|
return !0;
|
|
5357
5359
|
}
|
|
5358
|
-
const
|
|
5360
|
+
const qd = Tr.length;
|
|
5359
5361
|
function Ra(e) {
|
|
5360
5362
|
if (!e)
|
|
5361
5363
|
return;
|
|
@@ -5364,18 +5366,18 @@ function Ra(e) {
|
|
|
5364
5366
|
return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
|
|
5365
5367
|
}
|
|
5366
5368
|
const t = {};
|
|
5367
|
-
for (let n = 0; n <
|
|
5369
|
+
for (let n = 0; n < qd; n++) {
|
|
5368
5370
|
const r = Tr[n], i = e.props[r];
|
|
5369
5371
|
(bt(i) || i === !1) && (t[r] = i);
|
|
5370
5372
|
}
|
|
5371
5373
|
return t;
|
|
5372
5374
|
}
|
|
5373
|
-
const
|
|
5374
|
-
function
|
|
5375
|
-
return (t) => Promise.all(t.map(({ animation: n, options: r }) =>
|
|
5375
|
+
const Kd = [...Cr].reverse(), zd = Cr.length;
|
|
5376
|
+
function Ud(e) {
|
|
5377
|
+
return (t) => Promise.all(t.map(({ animation: n, options: r }) => Fd(e, n, r)));
|
|
5376
5378
|
}
|
|
5377
|
-
function
|
|
5378
|
-
let t =
|
|
5379
|
+
function $d(e) {
|
|
5380
|
+
let t = Ud(e), n = gi(), r = !0;
|
|
5379
5381
|
const i = (l) => (u, c) => {
|
|
5380
5382
|
const d = Ct(e, c, l === "exit" ? e.presenceContext?.custom : void 0);
|
|
5381
5383
|
if (d) {
|
|
@@ -5390,8 +5392,8 @@ function zd(e) {
|
|
|
5390
5392
|
function a(l) {
|
|
5391
5393
|
const { props: u } = e, c = Ra(e.parent) || {}, d = [], p = /* @__PURE__ */ new Set();
|
|
5392
5394
|
let f = {}, m = 1 / 0;
|
|
5393
|
-
for (let v = 0; v <
|
|
5394
|
-
const y =
|
|
5395
|
+
for (let v = 0; v < zd; v++) {
|
|
5396
|
+
const y = Kd[v], C = n[y], x = u[y] !== void 0 ? u[y] : c[y], P = bt(x), T = y === l ? C.isActive : null;
|
|
5395
5397
|
T === !1 && (m = v);
|
|
5396
5398
|
let w = x === c[y] && x !== u[y] && P;
|
|
5397
5399
|
if (w && r && e.manuallyAnimateOnMount && (w = !1), C.protectedKeys = { ...f }, // If it isn't active and hasn't *just* been set as inactive
|
|
@@ -5399,7 +5401,7 @@ function zd(e) {
|
|
|
5399
5401
|
!x && !C.prevProp || // Or if the prop doesn't define an animation
|
|
5400
5402
|
en(x) || typeof x == "boolean")
|
|
5401
5403
|
continue;
|
|
5402
|
-
const A =
|
|
5404
|
+
const A = Gd(C.prevProp, x);
|
|
5403
5405
|
let k = A || // If we're making this variant active, we want to always make it active
|
|
5404
5406
|
y === l && C.isActive && !w && P || // If we removed a higher-priority variant (i is in reverse order)
|
|
5405
5407
|
v > m && P, R = !1;
|
|
@@ -5459,7 +5461,7 @@ function zd(e) {
|
|
|
5459
5461
|
}
|
|
5460
5462
|
};
|
|
5461
5463
|
}
|
|
5462
|
-
function
|
|
5464
|
+
function Gd(e, t) {
|
|
5463
5465
|
return typeof t == "string" ? t !== e : Array.isArray(t) ? !Va(t, e) : !1;
|
|
5464
5466
|
}
|
|
5465
5467
|
function Ve(e = !1) {
|
|
@@ -5488,14 +5490,14 @@ class je {
|
|
|
5488
5490
|
update() {
|
|
5489
5491
|
}
|
|
5490
5492
|
}
|
|
5491
|
-
class
|
|
5493
|
+
class Wd extends je {
|
|
5492
5494
|
/**
|
|
5493
5495
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
5494
5496
|
* to the underlying animation library. We only want to load that if we load this,
|
|
5495
5497
|
* so people can optionally code split it out using the `m` component.
|
|
5496
5498
|
*/
|
|
5497
5499
|
constructor(t) {
|
|
5498
|
-
super(t), t.animationState || (t.animationState =
|
|
5500
|
+
super(t), t.animationState || (t.animationState = $d(t));
|
|
5499
5501
|
}
|
|
5500
5502
|
updateAnimationControlsSubscription() {
|
|
5501
5503
|
const { animate: t } = this.node.getProps();
|
|
@@ -5515,10 +5517,10 @@ class $d extends je {
|
|
|
5515
5517
|
this.node.animationState.reset(), this.unmountControls?.();
|
|
5516
5518
|
}
|
|
5517
5519
|
}
|
|
5518
|
-
let
|
|
5519
|
-
class
|
|
5520
|
+
let Yd = 0;
|
|
5521
|
+
class Hd extends je {
|
|
5520
5522
|
constructor() {
|
|
5521
|
-
super(...arguments), this.id =
|
|
5523
|
+
super(...arguments), this.id = Yd++;
|
|
5522
5524
|
}
|
|
5523
5525
|
update() {
|
|
5524
5526
|
if (!this.node.presenceContext)
|
|
@@ -5538,12 +5540,12 @@ class Wd extends je {
|
|
|
5538
5540
|
unmount() {
|
|
5539
5541
|
}
|
|
5540
5542
|
}
|
|
5541
|
-
const
|
|
5543
|
+
const Zd = {
|
|
5542
5544
|
animation: {
|
|
5543
|
-
Feature:
|
|
5545
|
+
Feature: Wd
|
|
5544
5546
|
},
|
|
5545
5547
|
exit: {
|
|
5546
|
-
Feature:
|
|
5548
|
+
Feature: Hd
|
|
5547
5549
|
}
|
|
5548
5550
|
};
|
|
5549
5551
|
function Tt(e, t, n, r = { passive: !0 }) {
|
|
@@ -5557,9 +5559,9 @@ function St(e) {
|
|
|
5557
5559
|
}
|
|
5558
5560
|
};
|
|
5559
5561
|
}
|
|
5560
|
-
const
|
|
5562
|
+
const Xd = (e) => (t) => br(t) && e(t, St(t));
|
|
5561
5563
|
function ht(e, t, n, r) {
|
|
5562
|
-
return Tt(e, t,
|
|
5564
|
+
return Tt(e, t, Xd(n), r);
|
|
5563
5565
|
}
|
|
5564
5566
|
function Ma({ top: e, left: t, right: n, bottom: r }) {
|
|
5565
5567
|
return {
|
|
@@ -5567,10 +5569,10 @@ function Ma({ top: e, left: t, right: n, bottom: r }) {
|
|
|
5567
5569
|
y: { min: e, max: r }
|
|
5568
5570
|
};
|
|
5569
5571
|
}
|
|
5570
|
-
function
|
|
5572
|
+
function Jd({ x: e, y: t }) {
|
|
5571
5573
|
return { top: t.min, right: e.max, bottom: t.max, left: e.min };
|
|
5572
5574
|
}
|
|
5573
|
-
function
|
|
5575
|
+
function Qd(e, t) {
|
|
5574
5576
|
if (!t)
|
|
5575
5577
|
return e;
|
|
5576
5578
|
const n = t({ x: e.left, y: e.top }), r = t({ x: e.right, y: e.bottom });
|
|
@@ -5581,15 +5583,15 @@ function Xd(e, t) {
|
|
|
5581
5583
|
right: r.x
|
|
5582
5584
|
};
|
|
5583
5585
|
}
|
|
5584
|
-
const Ia = 1e-4,
|
|
5586
|
+
const Ia = 1e-4, e0 = 1 - Ia, t0 = 1 + Ia, Da = 0.01, n0 = 0 - Da, r0 = 0 + Da;
|
|
5585
5587
|
function X(e) {
|
|
5586
5588
|
return e.max - e.min;
|
|
5587
5589
|
}
|
|
5588
|
-
function
|
|
5590
|
+
function i0(e, t, n) {
|
|
5589
5591
|
return Math.abs(e - t) <= n;
|
|
5590
5592
|
}
|
|
5591
5593
|
function yi(e, t, n, r = 0.5) {
|
|
5592
|
-
e.origin = r, e.originPoint = O(t.min, t.max, e.origin), e.scale = X(n) / X(t), e.translate = O(n.min, n.max, e.origin) - e.originPoint, (e.scale >=
|
|
5594
|
+
e.origin = r, e.originPoint = O(t.min, t.max, e.origin), e.scale = X(n) / X(t), e.translate = O(n.min, n.max, e.origin) - e.originPoint, (e.scale >= e0 && e.scale <= t0 || isNaN(e.scale)) && (e.scale = 1), (e.translate >= n0 && e.translate <= r0 || isNaN(e.translate)) && (e.translate = 0);
|
|
5593
5595
|
}
|
|
5594
5596
|
function pt(e, t, n, r) {
|
|
5595
5597
|
yi(e.x, t.x, n.x, r ? r.originX : void 0), yi(e.y, t.y, n.y, r ? r.originY : void 0);
|
|
@@ -5597,7 +5599,7 @@ function pt(e, t, n, r) {
|
|
|
5597
5599
|
function vi(e, t, n) {
|
|
5598
5600
|
e.min = n.min + t.min, e.max = e.min + X(t);
|
|
5599
5601
|
}
|
|
5600
|
-
function
|
|
5602
|
+
function s0(e, t, n) {
|
|
5601
5603
|
vi(e.x, t.x, n.x), vi(e.y, t.y, n.y);
|
|
5602
5604
|
}
|
|
5603
5605
|
function bi(e, t, n) {
|
|
@@ -5650,7 +5652,7 @@ function Na(e, { x: t, y: n }) {
|
|
|
5650
5652
|
Kn(e.x, t.translate, t.scale, t.originPoint), Kn(e.y, n.translate, n.scale, n.originPoint);
|
|
5651
5653
|
}
|
|
5652
5654
|
const ki = 0.999999999999, Pi = 1.0000000000001;
|
|
5653
|
-
function
|
|
5655
|
+
function a0(e, t, n, r = !1) {
|
|
5654
5656
|
const i = n.length;
|
|
5655
5657
|
if (!i)
|
|
5656
5658
|
return;
|
|
@@ -5677,14 +5679,14 @@ function $e(e, t) {
|
|
|
5677
5679
|
Ai(e.x, t.x, t.scaleX, t.scale, t.originX), Ai(e.y, t.y, t.scaleY, t.scale, t.originY);
|
|
5678
5680
|
}
|
|
5679
5681
|
function Oa(e, t) {
|
|
5680
|
-
return Ma(
|
|
5682
|
+
return Ma(Qd(e.getBoundingClientRect(), t));
|
|
5681
5683
|
}
|
|
5682
|
-
function
|
|
5684
|
+
function o0(e, t, n) {
|
|
5683
5685
|
const r = Oa(e, n), { scroll: i } = t;
|
|
5684
5686
|
return i && (Ue(r.x, i.offset.x), Ue(r.y, i.offset.y)), r;
|
|
5685
5687
|
}
|
|
5686
5688
|
const Ba = ({ current: e }) => e ? e.ownerDocument.defaultView : null, Si = (e, t) => Math.abs(e - t);
|
|
5687
|
-
function
|
|
5689
|
+
function l0(e, t) {
|
|
5688
5690
|
const n = Si(e.x, t.x), r = Si(e.y, t.y);
|
|
5689
5691
|
return Math.sqrt(n ** 2 + r ** 2);
|
|
5690
5692
|
}
|
|
@@ -5693,7 +5695,7 @@ class _a {
|
|
|
5693
5695
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
5694
5696
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
5695
5697
|
return;
|
|
5696
|
-
const d = gn(this.lastMoveEventInfo, this.history), p = this.startEvent !== null, f =
|
|
5698
|
+
const d = gn(this.lastMoveEventInfo, this.history), p = this.startEvent !== null, f = l0(d.offset, { x: 0, y: 0 }) >= 3;
|
|
5697
5699
|
if (!p && !f)
|
|
5698
5700
|
return;
|
|
5699
5701
|
const { point: m } = d, { timestamp: g } = $;
|
|
@@ -5734,26 +5736,26 @@ function gn({ point: e }, t) {
|
|
|
5734
5736
|
return {
|
|
5735
5737
|
point: e,
|
|
5736
5738
|
delta: Ei(e, Fa(t)),
|
|
5737
|
-
offset: Ei(e,
|
|
5738
|
-
velocity:
|
|
5739
|
+
offset: Ei(e, c0(t)),
|
|
5740
|
+
velocity: u0(t, 0.1)
|
|
5739
5741
|
};
|
|
5740
5742
|
}
|
|
5741
|
-
function
|
|
5743
|
+
function c0(e) {
|
|
5742
5744
|
return e[0];
|
|
5743
5745
|
}
|
|
5744
5746
|
function Fa(e) {
|
|
5745
5747
|
return e[e.length - 1];
|
|
5746
5748
|
}
|
|
5747
|
-
function
|
|
5749
|
+
function u0(e, t) {
|
|
5748
5750
|
if (e.length < 2)
|
|
5749
5751
|
return { x: 0, y: 0 };
|
|
5750
5752
|
let n = e.length - 1, r = null;
|
|
5751
5753
|
const i = Fa(e);
|
|
5752
|
-
for (; n >= 0 && (r = e[n], !(i.timestamp - r.timestamp > /* @__PURE__ */
|
|
5754
|
+
for (; n >= 0 && (r = e[n], !(i.timestamp - r.timestamp > /* @__PURE__ */ ue(t))); )
|
|
5753
5755
|
n--;
|
|
5754
5756
|
if (!r)
|
|
5755
5757
|
return { x: 0, y: 0 };
|
|
5756
|
-
const s = /* @__PURE__ */
|
|
5758
|
+
const s = /* @__PURE__ */ he(i.timestamp - r.timestamp);
|
|
5757
5759
|
if (s === 0)
|
|
5758
5760
|
return { x: 0, y: 0 };
|
|
5759
5761
|
const a = {
|
|
@@ -5762,7 +5764,7 @@ function l0(e, t) {
|
|
|
5762
5764
|
};
|
|
5763
5765
|
return a.x === 1 / 0 && (a.x = 0), a.y === 1 / 0 && (a.y = 0), a;
|
|
5764
5766
|
}
|
|
5765
|
-
function
|
|
5767
|
+
function d0(e, { min: t, max: n }, r) {
|
|
5766
5768
|
return t !== void 0 && e < t ? e = r ? O(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? O(n, e, r.max) : Math.min(e, n)), e;
|
|
5767
5769
|
}
|
|
5768
5770
|
function ji(e, t, n) {
|
|
@@ -5771,7 +5773,7 @@ function ji(e, t, n) {
|
|
|
5771
5773
|
max: n !== void 0 ? e.max + n - (e.max - e.min) : void 0
|
|
5772
5774
|
};
|
|
5773
5775
|
}
|
|
5774
|
-
function
|
|
5776
|
+
function h0(e, { top: t, left: n, bottom: r, right: i }) {
|
|
5775
5777
|
return {
|
|
5776
5778
|
x: ji(e.x, n, i),
|
|
5777
5779
|
y: ji(e.y, t, r)
|
|
@@ -5781,23 +5783,23 @@ function Vi(e, t) {
|
|
|
5781
5783
|
let n = t.min - e.min, r = t.max - e.max;
|
|
5782
5784
|
return t.max - t.min < e.max - e.min && ([n, r] = [r, n]), { min: n, max: r };
|
|
5783
5785
|
}
|
|
5784
|
-
function
|
|
5786
|
+
function p0(e, t) {
|
|
5785
5787
|
return {
|
|
5786
5788
|
x: Vi(e.x, t.x),
|
|
5787
5789
|
y: Vi(e.y, t.y)
|
|
5788
5790
|
};
|
|
5789
5791
|
}
|
|
5790
|
-
function
|
|
5792
|
+
function f0(e, t) {
|
|
5791
5793
|
let n = 0.5;
|
|
5792
5794
|
const r = X(e), i = X(t);
|
|
5793
5795
|
return i > r ? n = /* @__PURE__ */ gt(t.min, t.max - r, e.min) : r > i && (n = /* @__PURE__ */ gt(e.min, e.max - i, t.min)), ve(0, 1, n);
|
|
5794
5796
|
}
|
|
5795
|
-
function
|
|
5797
|
+
function m0(e, t) {
|
|
5796
5798
|
const n = {};
|
|
5797
5799
|
return t.min !== void 0 && (n.min = t.min - e.min), t.max !== void 0 && (n.max = t.max - e.min), n;
|
|
5798
5800
|
}
|
|
5799
5801
|
const zn = 0.35;
|
|
5800
|
-
function
|
|
5802
|
+
function g0(e = zn) {
|
|
5801
5803
|
return e === !1 ? e = 0 : e === !0 && (e = zn), {
|
|
5802
5804
|
x: Ri(e, "left", "right"),
|
|
5803
5805
|
y: Ri(e, "top", "bottom")
|
|
@@ -5812,8 +5814,8 @@ function Ri(e, t, n) {
|
|
|
5812
5814
|
function Mi(e, t) {
|
|
5813
5815
|
return typeof e == "number" ? e : e[t] || 0;
|
|
5814
5816
|
}
|
|
5815
|
-
const
|
|
5816
|
-
class
|
|
5817
|
+
const y0 = /* @__PURE__ */ new WeakMap();
|
|
5818
|
+
class v0 {
|
|
5817
5819
|
constructor(t) {
|
|
5818
5820
|
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = _(), this.visualElement = t;
|
|
5819
5821
|
}
|
|
@@ -5826,11 +5828,11 @@ class g0 {
|
|
|
5826
5828
|
d ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(St(c).point);
|
|
5827
5829
|
}, s = (c, d) => {
|
|
5828
5830
|
const { drag: p, dragPropagation: f, onDragStart: m } = this.getProps();
|
|
5829
|
-
if (p && !f && (this.openDragLock && this.openDragLock(), this.openDragLock =
|
|
5831
|
+
if (p && !f && (this.openDragLock && this.openDragLock(), this.openDragLock = Mu(p), !this.openDragLock))
|
|
5830
5832
|
return;
|
|
5831
5833
|
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), ie((v) => {
|
|
5832
5834
|
let y = this.getAxisMotionValue(v).get() || 0;
|
|
5833
|
-
if (
|
|
5835
|
+
if (pe.test(y)) {
|
|
5834
5836
|
const { projection: C } = this.visualElement;
|
|
5835
5837
|
if (C && C.layout) {
|
|
5836
5838
|
const x = C.layout.layoutBox[v];
|
|
@@ -5847,7 +5849,7 @@ class g0 {
|
|
|
5847
5849
|
return;
|
|
5848
5850
|
const { offset: v } = d;
|
|
5849
5851
|
if (f && this.currentDirection === null) {
|
|
5850
|
-
this.currentDirection =
|
|
5852
|
+
this.currentDirection = b0(v), this.currentDirection !== null && m && m(this.currentDirection);
|
|
5851
5853
|
return;
|
|
5852
5854
|
}
|
|
5853
5855
|
this.updateAxis("x", d.point, v), this.updateAxis("y", d.point, v), this.visualElement.render(), g && g(c, d);
|
|
@@ -5886,12 +5888,12 @@ class g0 {
|
|
|
5886
5888
|
return;
|
|
5887
5889
|
const s = this.getAxisMotionValue(t);
|
|
5888
5890
|
let a = this.originPoint[t] + r[t];
|
|
5889
|
-
this.constraints && this.constraints[t] && (a =
|
|
5891
|
+
this.constraints && this.constraints[t] && (a = d0(a, this.constraints[t], this.elastic[t])), s.set(a);
|
|
5890
5892
|
}
|
|
5891
5893
|
resolveConstraints() {
|
|
5892
5894
|
const { dragConstraints: t, dragElastic: n } = this.getProps(), r = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, i = this.constraints;
|
|
5893
|
-
t && Ke(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && r ? this.constraints =
|
|
5894
|
-
this.constraints !== !1 && this.getAxisMotionValue(s) && (this.constraints[s] =
|
|
5895
|
+
t && Ke(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && r ? this.constraints = h0(r.layoutBox, t) : this.constraints = !1, this.elastic = g0(n), i !== this.constraints && r && this.constraints && !this.hasMutatedConstraints && ie((s) => {
|
|
5896
|
+
this.constraints !== !1 && this.getAxisMotionValue(s) && (this.constraints[s] = m0(r.layoutBox[s], this.constraints[s]));
|
|
5895
5897
|
});
|
|
5896
5898
|
}
|
|
5897
5899
|
resolveRefConstraints() {
|
|
@@ -5903,10 +5905,10 @@ class g0 {
|
|
|
5903
5905
|
const { projection: i } = this.visualElement;
|
|
5904
5906
|
if (!i || !i.layout)
|
|
5905
5907
|
return !1;
|
|
5906
|
-
const s =
|
|
5907
|
-
let a =
|
|
5908
|
+
const s = o0(r, i.root, this.visualElement.getTransformPagePoint());
|
|
5909
|
+
let a = p0(i.layout.layoutBox, s);
|
|
5908
5910
|
if (n) {
|
|
5909
|
-
const o = n(
|
|
5911
|
+
const o = n(Jd(a));
|
|
5910
5912
|
this.hasMutatedConstraints = !!o, o && (a = Ma(o));
|
|
5911
5913
|
}
|
|
5912
5914
|
return a;
|
|
@@ -5984,7 +5986,7 @@ class g0 {
|
|
|
5984
5986
|
const o = this.getAxisMotionValue(a);
|
|
5985
5987
|
if (o && this.constraints !== !1) {
|
|
5986
5988
|
const l = o.get();
|
|
5987
|
-
i[a] =
|
|
5989
|
+
i[a] = f0({ min: l, max: l }, this.constraints[a]);
|
|
5988
5990
|
}
|
|
5989
5991
|
});
|
|
5990
5992
|
const { transformTemplate: s } = this.visualElement.getProps();
|
|
@@ -5998,7 +6000,7 @@ class g0 {
|
|
|
5998
6000
|
addListeners() {
|
|
5999
6001
|
if (!this.visualElement.current)
|
|
6000
6002
|
return;
|
|
6001
|
-
|
|
6003
|
+
y0.set(this.visualElement, this);
|
|
6002
6004
|
const t = this.visualElement.current, n = ht(t, "pointerdown", (l) => {
|
|
6003
6005
|
const { drag: u, dragListener: c = !0 } = this.getProps();
|
|
6004
6006
|
u && c && this.start(l);
|
|
@@ -6033,13 +6035,13 @@ class g0 {
|
|
|
6033
6035
|
function Lt(e, t, n) {
|
|
6034
6036
|
return (t === !0 || t === e) && (n === null || n === e);
|
|
6035
6037
|
}
|
|
6036
|
-
function
|
|
6038
|
+
function b0(e, t = 10) {
|
|
6037
6039
|
let n = null;
|
|
6038
6040
|
return Math.abs(e.y) > t ? n = "y" : Math.abs(e.x) > t && (n = "x"), n;
|
|
6039
6041
|
}
|
|
6040
|
-
class
|
|
6042
|
+
class x0 extends je {
|
|
6041
6043
|
constructor(t) {
|
|
6042
|
-
super(t), this.removeGroupControls = ae, this.removeListeners = ae, this.controls = new
|
|
6044
|
+
super(t), this.removeGroupControls = ae, this.removeListeners = ae, this.controls = new v0(t);
|
|
6043
6045
|
}
|
|
6044
6046
|
mount() {
|
|
6045
6047
|
const { dragControls: t } = this.node.getProps();
|
|
@@ -6052,7 +6054,7 @@ class v0 extends je {
|
|
|
6052
6054
|
const Ii = (e) => (t, n) => {
|
|
6053
6055
|
e && B.postRender(() => e(t, n));
|
|
6054
6056
|
};
|
|
6055
|
-
class
|
|
6057
|
+
class C0 extends je {
|
|
6056
6058
|
constructor() {
|
|
6057
6059
|
super(...arguments), this.removePointerDownListener = ae;
|
|
6058
6060
|
}
|
|
@@ -6110,7 +6112,7 @@ const lt = {
|
|
|
6110
6112
|
const n = Di(e, t.target.x), r = Di(e, t.target.y);
|
|
6111
6113
|
return `${n}% ${r}%`;
|
|
6112
6114
|
}
|
|
6113
|
-
},
|
|
6115
|
+
}, T0 = {
|
|
6114
6116
|
correct: (e, { treeScale: t, projectionDelta: n }) => {
|
|
6115
6117
|
const r = e, i = Ee.parse(e);
|
|
6116
6118
|
if (i.length > 5)
|
|
@@ -6121,7 +6123,7 @@ const lt = {
|
|
|
6121
6123
|
return typeof i[2 + a] == "number" && (i[2 + a] /= u), typeof i[3 + a] == "number" && (i[3 + a] /= u), s(i);
|
|
6122
6124
|
}
|
|
6123
6125
|
};
|
|
6124
|
-
class
|
|
6126
|
+
class w0 extends vo {
|
|
6125
6127
|
/**
|
|
6126
6128
|
* This only mounts projection nodes for components that
|
|
6127
6129
|
* need measuring, we might want to do it for all components
|
|
@@ -6129,7 +6131,7 @@ class C0 extends vo {
|
|
|
6129
6131
|
*/
|
|
6130
6132
|
componentDidMount() {
|
|
6131
6133
|
const { visualElement: t, layoutGroup: n, switchLayoutGroup: r, layoutId: i } = this.props, { projection: s } = t;
|
|
6132
|
-
|
|
6134
|
+
od(k0), s && (n.group && n.group.add(s), r && r.register && i && r.register(s), s.root.didUpdate(), s.addEventListener("animationComplete", () => {
|
|
6133
6135
|
this.safeToRemove();
|
|
6134
6136
|
}), s.setOptions({
|
|
6135
6137
|
...s.options,
|
|
@@ -6163,9 +6165,9 @@ class C0 extends vo {
|
|
|
6163
6165
|
}
|
|
6164
6166
|
function qa(e) {
|
|
6165
6167
|
const [t, n] = fa(), r = N(Hn);
|
|
6166
|
-
return h.jsx(
|
|
6168
|
+
return h.jsx(w0, { ...e, layoutGroup: r, switchLayoutGroup: N(ba), isPresent: t, safeToRemove: n });
|
|
6167
6169
|
}
|
|
6168
|
-
const
|
|
6170
|
+
const k0 = {
|
|
6169
6171
|
borderRadius: {
|
|
6170
6172
|
...lt,
|
|
6171
6173
|
applyTo: [
|
|
@@ -6179,14 +6181,14 @@ const T0 = {
|
|
|
6179
6181
|
borderTopRightRadius: lt,
|
|
6180
6182
|
borderBottomLeftRadius: lt,
|
|
6181
6183
|
borderBottomRightRadius: lt,
|
|
6182
|
-
boxShadow:
|
|
6184
|
+
boxShadow: T0
|
|
6183
6185
|
};
|
|
6184
|
-
function
|
|
6186
|
+
function P0(e, t, n) {
|
|
6185
6187
|
const r = H(e) ? e : Ge(e);
|
|
6186
6188
|
return r.start(jr("", r, t, n)), r.animation;
|
|
6187
6189
|
}
|
|
6188
|
-
const
|
|
6189
|
-
class
|
|
6190
|
+
const A0 = (e, t) => e.depth - t.depth;
|
|
6191
|
+
class S0 {
|
|
6190
6192
|
constructor() {
|
|
6191
6193
|
this.children = [], this.isDirty = !1;
|
|
6192
6194
|
}
|
|
@@ -6197,32 +6199,32 @@ class P0 {
|
|
|
6197
6199
|
Qn(this.children, t), this.isDirty = !0;
|
|
6198
6200
|
}
|
|
6199
6201
|
forEach(t) {
|
|
6200
|
-
this.isDirty && this.children.sort(
|
|
6202
|
+
this.isDirty && this.children.sort(A0), this.isDirty = !1, this.children.forEach(t);
|
|
6201
6203
|
}
|
|
6202
6204
|
}
|
|
6203
|
-
function
|
|
6205
|
+
function E0(e, t) {
|
|
6204
6206
|
const n = te.now(), r = ({ timestamp: i }) => {
|
|
6205
6207
|
const s = i - n;
|
|
6206
6208
|
s >= t && (Se(r), e(s - t));
|
|
6207
6209
|
};
|
|
6208
6210
|
return B.setup(r, !0), () => Se(r);
|
|
6209
6211
|
}
|
|
6210
|
-
const Ka = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"],
|
|
6211
|
-
function
|
|
6212
|
-
i ? (e.opacity = O(0, n.opacity ?? 1,
|
|
6213
|
-
for (let a = 0; a <
|
|
6212
|
+
const Ka = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], j0 = Ka.length, Li = (e) => typeof e == "string" ? parseFloat(e) : e, Ni = (e) => typeof e == "number" || S.test(e);
|
|
6213
|
+
function V0(e, t, n, r, i, s) {
|
|
6214
|
+
i ? (e.opacity = O(0, n.opacity ?? 1, R0(r)), e.opacityExit = O(t.opacity ?? 1, 0, M0(r))) : s && (e.opacity = O(t.opacity ?? 1, n.opacity ?? 1, r));
|
|
6215
|
+
for (let a = 0; a < j0; a++) {
|
|
6214
6216
|
const o = `border${Ka[a]}Radius`;
|
|
6215
6217
|
let l = Oi(t, o), u = Oi(n, o);
|
|
6216
6218
|
if (l === void 0 && u === void 0)
|
|
6217
6219
|
continue;
|
|
6218
|
-
l || (l = 0), u || (u = 0), l === 0 || u === 0 || Ni(l) === Ni(u) ? (e[o] = Math.max(O(Li(l), Li(u), r), 0), (
|
|
6220
|
+
l || (l = 0), u || (u = 0), l === 0 || u === 0 || Ni(l) === Ni(u) ? (e[o] = Math.max(O(Li(l), Li(u), r), 0), (pe.test(u) || pe.test(l)) && (e[o] += "%")) : e[o] = u;
|
|
6219
6221
|
}
|
|
6220
6222
|
(t.rotate || n.rotate) && (e.rotate = O(t.rotate || 0, n.rotate || 0, r));
|
|
6221
6223
|
}
|
|
6222
6224
|
function Oi(e, t) {
|
|
6223
6225
|
return e[t] !== void 0 ? e[t] : e.borderRadius;
|
|
6224
6226
|
}
|
|
6225
|
-
const
|
|
6227
|
+
const R0 = /* @__PURE__ */ za(0, 0.5, Ls), M0 = /* @__PURE__ */ za(0.5, 0.95, ae);
|
|
6226
6228
|
function za(e, t, n) {
|
|
6227
6229
|
return (r) => r < e ? 0 : r > t ? 1 : n(/* @__PURE__ */ gt(e, t, r));
|
|
6228
6230
|
}
|
|
@@ -6238,18 +6240,18 @@ function _i(e, t) {
|
|
|
6238
6240
|
function Fi(e, t, n, r, i) {
|
|
6239
6241
|
return e -= t, e = Zt(e, 1 / n, r), i !== void 0 && (e = Zt(e, 1 / i, r)), e;
|
|
6240
6242
|
}
|
|
6241
|
-
function
|
|
6242
|
-
if (
|
|
6243
|
+
function I0(e, t = 0, n = 1, r = 0.5, i, s = e, a = e) {
|
|
6244
|
+
if (pe.test(t) && (t = parseFloat(t), t = O(a.min, a.max, t / 100) - a.min), typeof t != "number")
|
|
6243
6245
|
return;
|
|
6244
6246
|
let o = O(s.min, s.max, r);
|
|
6245
6247
|
e === s && (o -= t), e.min = Fi(e.min, t, n, o, i), e.max = Fi(e.max, t, n, o, i);
|
|
6246
6248
|
}
|
|
6247
6249
|
function qi(e, t, [n, r, i], s, a) {
|
|
6248
|
-
|
|
6250
|
+
I0(e, t[n], t[r], t[i], t.scale, s, a);
|
|
6249
6251
|
}
|
|
6250
|
-
const
|
|
6252
|
+
const D0 = ["x", "scaleX", "originX"], L0 = ["y", "scaleY", "originY"];
|
|
6251
6253
|
function Ki(e, t, n, r) {
|
|
6252
|
-
qi(e.x, t,
|
|
6254
|
+
qi(e.x, t, D0, n ? n.x : void 0, r ? r.x : void 0), qi(e.y, t, L0, n ? n.y : void 0, r ? r.y : void 0);
|
|
6253
6255
|
}
|
|
6254
6256
|
function zi(e) {
|
|
6255
6257
|
return e.translate === 0 && e.scale === 1;
|
|
@@ -6260,7 +6262,7 @@ function Ua(e) {
|
|
|
6260
6262
|
function Ui(e, t) {
|
|
6261
6263
|
return e.min === t.min && e.max === t.max;
|
|
6262
6264
|
}
|
|
6263
|
-
function
|
|
6265
|
+
function N0(e, t) {
|
|
6264
6266
|
return Ui(e.x, t.x) && Ui(e.y, t.y);
|
|
6265
6267
|
}
|
|
6266
6268
|
function $i(e, t) {
|
|
@@ -6275,7 +6277,7 @@ function Gi(e) {
|
|
|
6275
6277
|
function Wi(e, t) {
|
|
6276
6278
|
return e.translate === t.translate && e.scale === t.scale && e.originPoint === t.originPoint;
|
|
6277
6279
|
}
|
|
6278
|
-
class
|
|
6280
|
+
class O0 {
|
|
6279
6281
|
constructor() {
|
|
6280
6282
|
this.members = [];
|
|
6281
6283
|
}
|
|
@@ -6329,7 +6331,7 @@ class L0 {
|
|
|
6329
6331
|
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
6330
6332
|
}
|
|
6331
6333
|
}
|
|
6332
|
-
function
|
|
6334
|
+
function B0(e, t, n) {
|
|
6333
6335
|
let r = "";
|
|
6334
6336
|
const i = e.x.translate / t.x, s = e.y.translate / t.y, a = n?.z || 0;
|
|
6335
6337
|
if ((i || s || a) && (r = `translate3d(${i}px, ${s}px, ${a}px) `), (t.x !== 1 || t.y !== 1) && (r += `scale(${1 / t.x}, ${1 / t.y}) `), n) {
|
|
@@ -6339,8 +6341,8 @@ function N0(e, t, n) {
|
|
|
6339
6341
|
const o = e.x.scale * t.x, l = e.y.scale * t.y;
|
|
6340
6342
|
return (o !== 1 || l !== 1) && (r += `scale(${o}, ${l})`), r || "none";
|
|
6341
6343
|
}
|
|
6342
|
-
const yn = ["", "X", "Y", "Z"],
|
|
6343
|
-
let
|
|
6344
|
+
const yn = ["", "X", "Y", "Z"], _0 = { visibility: "hidden" }, F0 = 1e3;
|
|
6345
|
+
let q0 = 0;
|
|
6344
6346
|
function vn(e, t, n, r) {
|
|
6345
6347
|
const { latestValues: i } = t;
|
|
6346
6348
|
i[e] && (n[e] = i[e], t.setStaticValue(e, 0), r && (r[e] = 0));
|
|
@@ -6362,14 +6364,14 @@ function Ga(e) {
|
|
|
6362
6364
|
function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: i }) {
|
|
6363
6365
|
return class {
|
|
6364
6366
|
constructor(a = {}, o = t?.()) {
|
|
6365
|
-
this.id =
|
|
6367
|
+
this.id = q0++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
6366
6368
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
6367
6369
|
}, this.updateProjection = () => {
|
|
6368
|
-
this.projectionUpdateScheduled = !1, this.nodes.forEach(
|
|
6370
|
+
this.projectionUpdateScheduled = !1, this.nodes.forEach(U0), this.nodes.forEach(H0), this.nodes.forEach(Z0), this.nodes.forEach($0);
|
|
6369
6371
|
}, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = a, this.root = o ? o.root || o : this, this.path = o ? [...o.path, o] : [], this.parent = o, this.depth = o ? o.depth + 1 : 0;
|
|
6370
6372
|
for (let l = 0; l < this.path.length; l++)
|
|
6371
6373
|
this.path[l].shouldResetTransform = !0;
|
|
6372
|
-
this.root === this && (this.nodes = new
|
|
6374
|
+
this.root === this && (this.nodes = new S0());
|
|
6373
6375
|
}
|
|
6374
6376
|
addEventListener(a, o) {
|
|
6375
6377
|
return this.eventHandlers.has(a) || this.eventHandlers.set(a, new tr()), this.eventHandlers.get(a).add(o);
|
|
@@ -6387,13 +6389,13 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6387
6389
|
mount(a) {
|
|
6388
6390
|
if (this.instance)
|
|
6389
6391
|
return;
|
|
6390
|
-
this.isSVG = pa(a) && !
|
|
6392
|
+
this.isSVG = pa(a) && !Bu(a), this.instance = a;
|
|
6391
6393
|
const { layoutId: o, layout: l, visualElement: u } = this.options;
|
|
6392
6394
|
if (u && !u.current && u.mount(a), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || o) && (this.isLayoutDirty = !0), e) {
|
|
6393
6395
|
let c;
|
|
6394
6396
|
const d = () => this.root.updateBlockedByResize = !1;
|
|
6395
6397
|
e(a, () => {
|
|
6396
|
-
this.root.updateBlockedByResize = !0, c && c(), c =
|
|
6398
|
+
this.root.updateBlockedByResize = !0, c && c(), c = E0(d, 250), $t.hasAnimatedSinceResize && ($t.hasAnimatedSinceResize = !1, this.nodes.forEach(Hi));
|
|
6397
6399
|
});
|
|
6398
6400
|
}
|
|
6399
6401
|
o && this.root.registerSharedNode(o, this), this.options.animate !== !1 && u && (o || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: d, hasRelativeLayoutChanged: p, layout: f }) => {
|
|
@@ -6401,7 +6403,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6401
6403
|
this.target = void 0, this.relativeTarget = void 0;
|
|
6402
6404
|
return;
|
|
6403
6405
|
}
|
|
6404
|
-
const m = this.options.transition || u.getDefaultTransition() ||
|
|
6406
|
+
const m = this.options.transition || u.getDefaultTransition() || th, { onLayoutAnimationStart: g, onLayoutAnimationComplete: v } = u.getProps(), y = !this.targetLayout || !$a(this.targetLayout, f), C = !d && p;
|
|
6405
6407
|
if (this.options.layoutRoot || this.resumeFrom || C || d && (y || !this.currentAnimation)) {
|
|
6406
6408
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(c, C);
|
|
6407
6409
|
const x = {
|
|
@@ -6435,7 +6437,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6435
6437
|
}
|
|
6436
6438
|
// Note: currently only running on root node
|
|
6437
6439
|
startUpdate() {
|
|
6438
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
6440
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(X0), this.animationId++);
|
|
6439
6441
|
}
|
|
6440
6442
|
getTransformTemplate() {
|
|
6441
6443
|
const { visualElement: a } = this.options;
|
|
@@ -6464,7 +6466,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6464
6466
|
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Yi);
|
|
6465
6467
|
return;
|
|
6466
6468
|
}
|
|
6467
|
-
this.isUpdating || this.nodes.forEach(
|
|
6469
|
+
this.isUpdating || this.nodes.forEach(W0), this.isUpdating = !1, this.nodes.forEach(Y0), this.nodes.forEach(K0), this.nodes.forEach(z0), this.clearAllSnapshots();
|
|
6468
6470
|
const o = te.now();
|
|
6469
6471
|
$.delta = ve(0, 1e3 / 60, o - $.timestamp), $.timestamp = o, $.isProcessing = !0, cn.update.process($), cn.preRender.process($), cn.render.process($), $.isProcessing = !1;
|
|
6470
6472
|
}
|
|
@@ -6472,7 +6474,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6472
6474
|
this.updateScheduled || (this.updateScheduled = !0, vr.read(this.scheduleUpdate));
|
|
6473
6475
|
}
|
|
6474
6476
|
clearAllSnapshots() {
|
|
6475
|
-
this.nodes.forEach(
|
|
6477
|
+
this.nodes.forEach(G0), this.sharedNodes.forEach(J0);
|
|
6476
6478
|
}
|
|
6477
6479
|
scheduleUpdateProjection() {
|
|
6478
6480
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, B.preRender(this.updateProjection, !1, !0));
|
|
@@ -6521,7 +6523,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6521
6523
|
measure(a = !0) {
|
|
6522
6524
|
const o = this.measurePageBox();
|
|
6523
6525
|
let l = this.removeElementScroll(o);
|
|
6524
|
-
return a && (l = this.removeTransform(l)),
|
|
6526
|
+
return a && (l = this.removeTransform(l)), nh(l), {
|
|
6525
6527
|
animationId: this.root.animationId,
|
|
6526
6528
|
measuredBox: o,
|
|
6527
6529
|
layoutBox: l,
|
|
@@ -6534,7 +6536,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6534
6536
|
if (!a)
|
|
6535
6537
|
return _();
|
|
6536
6538
|
const o = a.measureViewportBox();
|
|
6537
|
-
if (!(this.scroll?.wasRoot || this.path.some(
|
|
6539
|
+
if (!(this.scroll?.wasRoot || this.path.some(rh))) {
|
|
6538
6540
|
const { scroll: u } = this.root;
|
|
6539
6541
|
u && (Ue(o.x, u.offset.x), Ue(o.y, u.offset.y));
|
|
6540
6542
|
}
|
|
@@ -6603,7 +6605,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6603
6605
|
const p = this.getClosestProjectingParent();
|
|
6604
6606
|
p && p.layout && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = _(), this.relativeTargetOrigin = _(), ft(this.relativeTargetOrigin, this.layout.layoutBox, p.layout.layoutBox), re(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
6605
6607
|
}
|
|
6606
|
-
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = _(), this.targetWithTransforms = _()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
|
|
6608
|
+
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = _(), this.targetWithTransforms = _()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), s0(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : re(this.target, this.layout.layoutBox), Na(this.target, this.targetDelta)) : re(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget)) {
|
|
6607
6609
|
this.attemptToResolveRelativeTarget = !1;
|
|
6608
6610
|
const p = this.getClosestProjectingParent();
|
|
6609
6611
|
p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = _(), this.relativeTargetOrigin = _(), ft(this.relativeTargetOrigin, this.target, p.target), re(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -6627,7 +6629,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6627
6629
|
return;
|
|
6628
6630
|
re(this.layoutCorrected, this.layout.layoutBox);
|
|
6629
6631
|
const d = this.treeScale.x, p = this.treeScale.y;
|
|
6630
|
-
|
|
6632
|
+
a0(this.layoutCorrected, this.treeScale, this.path, o), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = _());
|
|
6631
6633
|
const { target: f } = a;
|
|
6632
6634
|
if (!f) {
|
|
6633
6635
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
@@ -6654,17 +6656,17 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6654
6656
|
setAnimationOrigin(a, o = !1) {
|
|
6655
6657
|
const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, d = ze();
|
|
6656
6658
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !o;
|
|
6657
|
-
const p = _(), f = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, g = f !== m, v = this.getStack(), y = !v || v.members.length <= 1, C = !!(g && !y && this.options.crossfade === !0 && !this.path.some(
|
|
6659
|
+
const p = _(), f = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, g = f !== m, v = this.getStack(), y = !v || v.members.length <= 1, C = !!(g && !y && this.options.crossfade === !0 && !this.path.some(eh));
|
|
6658
6660
|
this.animationProgress = 0;
|
|
6659
6661
|
let x;
|
|
6660
6662
|
this.mixTargetDelta = (P) => {
|
|
6661
6663
|
const T = P / 1e3;
|
|
6662
|
-
Zi(d.x, a.x, T), Zi(d.y, a.y, T), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ft(p, this.layout.layoutBox, this.relativeParent.layout.layoutBox),
|
|
6664
|
+
Zi(d.x, a.x, T), Zi(d.y, a.y, T), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ft(p, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Q0(this.relativeTarget, this.relativeTargetOrigin, p, T), x && N0(this.relativeTarget, x) && (this.isProjectionDirty = !1), x || (x = _()), re(x, this.relativeTarget)), g && (this.animationValues = c, V0(c, u, this.latestValues, T, C, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = T;
|
|
6663
6665
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
6664
6666
|
}
|
|
6665
6667
|
startAnimation(a) {
|
|
6666
6668
|
this.notifyListeners("animationStart"), this.currentAnimation?.stop(!1), this.resumingFrom?.currentAnimation?.stop(!1), this.pendingAnimation && (Se(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = B.update(() => {
|
|
6667
|
-
$t.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Ge(0)), this.currentAnimation =
|
|
6669
|
+
$t.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Ge(0)), this.currentAnimation = P0(this.motionValue, [0, 1e3], {
|
|
6668
6670
|
...a,
|
|
6669
6671
|
isSync: !0,
|
|
6670
6672
|
onUpdate: (o) => {
|
|
@@ -6684,7 +6686,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6684
6686
|
a && a.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
6685
6687
|
}
|
|
6686
6688
|
finishAnimation() {
|
|
6687
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
6689
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(F0), this.currentAnimation.stop(!1)), this.completeAnimation();
|
|
6688
6690
|
}
|
|
6689
6691
|
applyTransformsToTarget() {
|
|
6690
6692
|
const a = this.getLead();
|
|
@@ -6701,7 +6703,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6701
6703
|
}
|
|
6702
6704
|
}
|
|
6703
6705
|
registerSharedNode(a, o) {
|
|
6704
|
-
this.sharedNodes.has(a) || this.sharedNodes.set(a, new
|
|
6706
|
+
this.sharedNodes.has(a) || this.sharedNodes.set(a, new O0()), this.sharedNodes.get(a).add(o);
|
|
6705
6707
|
const u = o.options.initialPromotionConfig;
|
|
6706
6708
|
o.promote({
|
|
6707
6709
|
transition: u ? u.transition : void 0,
|
|
@@ -6754,7 +6756,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6754
6756
|
if (!this.instance || this.isSVG)
|
|
6755
6757
|
return;
|
|
6756
6758
|
if (!this.isVisible)
|
|
6757
|
-
return
|
|
6759
|
+
return _0;
|
|
6758
6760
|
const o = {
|
|
6759
6761
|
visibility: ""
|
|
6760
6762
|
}, l = this.getTransformTemplate();
|
|
@@ -6766,7 +6768,7 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6766
6768
|
return this.options.layoutId && (f.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, f.pointerEvents = Ut(a?.pointerEvents) || ""), this.hasProjected && !Re(this.latestValues) && (f.transform = l ? l({}, "") : "none", this.hasProjected = !1), f;
|
|
6767
6769
|
}
|
|
6768
6770
|
const c = u.animationValues || u.latestValues;
|
|
6769
|
-
this.applyTransformsToTarget(), o.transform =
|
|
6771
|
+
this.applyTransformsToTarget(), o.transform = B0(this.projectionDeltaWithTransform, this.treeScale, c), l && (o.transform = l(c, o.transform));
|
|
6770
6772
|
const { x: d, y: p } = this.projectionDelta;
|
|
6771
6773
|
o.transformOrigin = `${d.origin * 100}% ${p.origin * 100}% 0`, u.animationValues ? o.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : o.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
|
|
6772
6774
|
for (const f in xt) {
|
|
@@ -6791,10 +6793,10 @@ function Wa({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6791
6793
|
}
|
|
6792
6794
|
};
|
|
6793
6795
|
}
|
|
6794
|
-
function
|
|
6796
|
+
function K0(e) {
|
|
6795
6797
|
e.updateLayout();
|
|
6796
6798
|
}
|
|
6797
|
-
function
|
|
6799
|
+
function z0(e) {
|
|
6798
6800
|
const t = e.resumeFrom?.snapshot || e.snapshot;
|
|
6799
6801
|
if (e.isLead() && e.layout && t && e.hasListeners("didUpdate")) {
|
|
6800
6802
|
const { layoutBox: n, measuredBox: r } = e.layout, { animationType: i } = e.options, s = t.source !== e.layout.source;
|
|
@@ -6837,38 +6839,38 @@ function q0(e) {
|
|
|
6837
6839
|
}
|
|
6838
6840
|
e.options.transition = void 0;
|
|
6839
6841
|
}
|
|
6840
|
-
function
|
|
6842
|
+
function U0(e) {
|
|
6841
6843
|
e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty), e.isSharedProjectionDirty || (e.isSharedProjectionDirty = !!(e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty)), e.isTransformDirty || (e.isTransformDirty = e.parent.isTransformDirty));
|
|
6842
6844
|
}
|
|
6843
|
-
function
|
|
6845
|
+
function $0(e) {
|
|
6844
6846
|
e.isProjectionDirty = e.isSharedProjectionDirty = e.isTransformDirty = !1;
|
|
6845
6847
|
}
|
|
6846
|
-
function
|
|
6848
|
+
function G0(e) {
|
|
6847
6849
|
e.clearSnapshot();
|
|
6848
6850
|
}
|
|
6849
6851
|
function Yi(e) {
|
|
6850
6852
|
e.clearMeasurements();
|
|
6851
6853
|
}
|
|
6852
|
-
function
|
|
6854
|
+
function W0(e) {
|
|
6853
6855
|
e.isLayoutDirty = !1;
|
|
6854
6856
|
}
|
|
6855
|
-
function
|
|
6857
|
+
function Y0(e) {
|
|
6856
6858
|
const { visualElement: t } = e.options;
|
|
6857
6859
|
t && t.getProps().onBeforeLayoutMeasure && t.notify("BeforeLayoutMeasure"), e.resetTransform();
|
|
6858
6860
|
}
|
|
6859
6861
|
function Hi(e) {
|
|
6860
6862
|
e.finishAnimation(), e.targetDelta = e.relativeTarget = e.target = void 0, e.isProjectionDirty = !0;
|
|
6861
6863
|
}
|
|
6862
|
-
function
|
|
6864
|
+
function H0(e) {
|
|
6863
6865
|
e.resolveTargetDelta();
|
|
6864
6866
|
}
|
|
6865
|
-
function
|
|
6867
|
+
function Z0(e) {
|
|
6866
6868
|
e.calcProjection();
|
|
6867
6869
|
}
|
|
6868
|
-
function
|
|
6870
|
+
function X0(e) {
|
|
6869
6871
|
e.resetSkewAndRotation();
|
|
6870
6872
|
}
|
|
6871
|
-
function
|
|
6873
|
+
function J0(e) {
|
|
6872
6874
|
e.removeLeadSnapshot();
|
|
6873
6875
|
}
|
|
6874
6876
|
function Zi(e, t, n) {
|
|
@@ -6877,29 +6879,29 @@ function Zi(e, t, n) {
|
|
|
6877
6879
|
function Xi(e, t, n, r) {
|
|
6878
6880
|
e.min = O(t.min, n.min, r), e.max = O(t.max, n.max, r);
|
|
6879
6881
|
}
|
|
6880
|
-
function
|
|
6882
|
+
function Q0(e, t, n, r) {
|
|
6881
6883
|
Xi(e.x, t.x, n.x, r), Xi(e.y, t.y, n.y, r);
|
|
6882
6884
|
}
|
|
6883
|
-
function
|
|
6885
|
+
function eh(e) {
|
|
6884
6886
|
return e.animationValues && e.animationValues.opacityExit !== void 0;
|
|
6885
6887
|
}
|
|
6886
|
-
const
|
|
6888
|
+
const th = {
|
|
6887
6889
|
duration: 0.45,
|
|
6888
6890
|
ease: [0.4, 0, 0.1, 1]
|
|
6889
6891
|
}, Ji = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), Qi = Ji("applewebkit/") && !Ji("chrome/") ? Math.round : ae;
|
|
6890
6892
|
function es(e) {
|
|
6891
6893
|
e.min = Qi(e.min), e.max = Qi(e.max);
|
|
6892
6894
|
}
|
|
6893
|
-
function
|
|
6895
|
+
function nh(e) {
|
|
6894
6896
|
es(e.x), es(e.y);
|
|
6895
6897
|
}
|
|
6896
6898
|
function Ya(e, t, n) {
|
|
6897
|
-
return e === "position" || e === "preserve-aspect" && !
|
|
6899
|
+
return e === "position" || e === "preserve-aspect" && !i0(Gi(t), Gi(n), 0.2);
|
|
6898
6900
|
}
|
|
6899
|
-
function
|
|
6901
|
+
function rh(e) {
|
|
6900
6902
|
return e !== e.root && e.scroll?.wasRoot;
|
|
6901
6903
|
}
|
|
6902
|
-
const
|
|
6904
|
+
const ih = Wa({
|
|
6903
6905
|
attachResizeListener: (e, t) => Tt(e, "resize", t),
|
|
6904
6906
|
measureScroll: () => ({
|
|
6905
6907
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
@@ -6915,7 +6917,7 @@ const nh = Wa({
|
|
|
6915
6917
|
}),
|
|
6916
6918
|
defaultParent: () => {
|
|
6917
6919
|
if (!bn.current) {
|
|
6918
|
-
const e = new
|
|
6920
|
+
const e = new ih({});
|
|
6919
6921
|
e.mount(window), e.setOptions({ layoutScroll: !0 }), bn.current = e;
|
|
6920
6922
|
}
|
|
6921
6923
|
return bn.current;
|
|
@@ -6924,12 +6926,12 @@ const nh = Wa({
|
|
|
6924
6926
|
e.style.transform = t !== void 0 ? t : "none";
|
|
6925
6927
|
},
|
|
6926
6928
|
checkIsScrollRoot: (e) => window.getComputedStyle(e).position === "fixed"
|
|
6927
|
-
}),
|
|
6929
|
+
}), sh = {
|
|
6928
6930
|
pan: {
|
|
6929
|
-
Feature:
|
|
6931
|
+
Feature: C0
|
|
6930
6932
|
},
|
|
6931
6933
|
drag: {
|
|
6932
|
-
Feature:
|
|
6934
|
+
Feature: x0,
|
|
6933
6935
|
ProjectionNode: Ha,
|
|
6934
6936
|
MeasureLayout: qa
|
|
6935
6937
|
}
|
|
@@ -6940,15 +6942,15 @@ function ts(e, t, n) {
|
|
|
6940
6942
|
const i = "onHover" + n, s = r[i];
|
|
6941
6943
|
s && B.postRender(() => s(t, St(t)));
|
|
6942
6944
|
}
|
|
6943
|
-
class
|
|
6945
|
+
class ah extends je {
|
|
6944
6946
|
mount() {
|
|
6945
6947
|
const { current: t } = this.node;
|
|
6946
|
-
t && (this.unmount =
|
|
6948
|
+
t && (this.unmount = Iu(t, (n, r) => (ts(this.node, r, "Start"), (i) => ts(this.node, i, "End"))));
|
|
6947
6949
|
}
|
|
6948
6950
|
unmount() {
|
|
6949
6951
|
}
|
|
6950
6952
|
}
|
|
6951
|
-
class
|
|
6953
|
+
class oh extends je {
|
|
6952
6954
|
constructor() {
|
|
6953
6955
|
super(...arguments), this.isActive = !1;
|
|
6954
6956
|
}
|
|
@@ -6978,37 +6980,37 @@ function ns(e, t, n) {
|
|
|
6978
6980
|
const i = "onTap" + (n === "End" ? "" : n), s = r[i];
|
|
6979
6981
|
s && B.postRender(() => s(t, St(t)));
|
|
6980
6982
|
}
|
|
6981
|
-
class
|
|
6983
|
+
class lh extends je {
|
|
6982
6984
|
mount() {
|
|
6983
6985
|
const { current: t } = this.node;
|
|
6984
|
-
t && (this.unmount =
|
|
6986
|
+
t && (this.unmount = Ou(t, (n, r) => (ns(this.node, r, "Start"), (i, { success: s }) => ns(this.node, i, s ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
6985
6987
|
}
|
|
6986
6988
|
unmount() {
|
|
6987
6989
|
}
|
|
6988
6990
|
}
|
|
6989
|
-
const Un = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(),
|
|
6991
|
+
const Un = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), ch = (e) => {
|
|
6990
6992
|
const t = Un.get(e.target);
|
|
6991
6993
|
t && t(e);
|
|
6992
|
-
},
|
|
6993
|
-
e.forEach(
|
|
6994
|
+
}, uh = (e) => {
|
|
6995
|
+
e.forEach(ch);
|
|
6994
6996
|
};
|
|
6995
|
-
function
|
|
6997
|
+
function dh({ root: e, ...t }) {
|
|
6996
6998
|
const n = e || document;
|
|
6997
6999
|
xn.has(n) || xn.set(n, {});
|
|
6998
7000
|
const r = xn.get(n), i = JSON.stringify(t);
|
|
6999
|
-
return r[i] || (r[i] = new IntersectionObserver(
|
|
7001
|
+
return r[i] || (r[i] = new IntersectionObserver(uh, { root: e, ...t })), r[i];
|
|
7000
7002
|
}
|
|
7001
|
-
function
|
|
7002
|
-
const r =
|
|
7003
|
+
function hh(e, t, n) {
|
|
7004
|
+
const r = dh(t);
|
|
7003
7005
|
return Un.set(e, n), r.observe(e), () => {
|
|
7004
7006
|
Un.delete(e), r.unobserve(e);
|
|
7005
7007
|
};
|
|
7006
7008
|
}
|
|
7007
|
-
const
|
|
7009
|
+
const ph = {
|
|
7008
7010
|
some: 0,
|
|
7009
7011
|
all: 1
|
|
7010
7012
|
};
|
|
7011
|
-
class
|
|
7013
|
+
class fh extends je {
|
|
7012
7014
|
constructor() {
|
|
7013
7015
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
7014
7016
|
}
|
|
@@ -7017,7 +7019,7 @@ class hh extends je {
|
|
|
7017
7019
|
const { viewport: t = {} } = this.node.getProps(), { root: n, margin: r, amount: i = "some", once: s } = t, a = {
|
|
7018
7020
|
root: n ? n.current : void 0,
|
|
7019
7021
|
rootMargin: r,
|
|
7020
|
-
threshold: typeof i == "number" ? i :
|
|
7022
|
+
threshold: typeof i == "number" ? i : ph[i]
|
|
7021
7023
|
}, o = (l) => {
|
|
7022
7024
|
const { isIntersecting: u } = l;
|
|
7023
7025
|
if (this.isInView === u || (this.isInView = u, s && !u && this.hasEnteredView))
|
|
@@ -7026,7 +7028,7 @@ class hh extends je {
|
|
|
7026
7028
|
const { onViewportEnter: c, onViewportLeave: d } = this.node.getProps(), p = u ? c : d;
|
|
7027
7029
|
p && p(l);
|
|
7028
7030
|
};
|
|
7029
|
-
return
|
|
7031
|
+
return hh(this.node.current, a, o);
|
|
7030
7032
|
}
|
|
7031
7033
|
mount() {
|
|
7032
7034
|
this.startObserver();
|
|
@@ -7035,34 +7037,34 @@ class hh extends je {
|
|
|
7035
7037
|
if (typeof IntersectionObserver > "u")
|
|
7036
7038
|
return;
|
|
7037
7039
|
const { props: t, prevProps: n } = this.node;
|
|
7038
|
-
["amount", "margin", "root"].some(
|
|
7040
|
+
["amount", "margin", "root"].some(mh(t, n)) && this.startObserver();
|
|
7039
7041
|
}
|
|
7040
7042
|
unmount() {
|
|
7041
7043
|
}
|
|
7042
7044
|
}
|
|
7043
|
-
function
|
|
7045
|
+
function mh({ viewport: e = {} }, { viewport: t = {} } = {}) {
|
|
7044
7046
|
return (n) => e[n] !== t[n];
|
|
7045
7047
|
}
|
|
7046
|
-
const
|
|
7048
|
+
const gh = {
|
|
7047
7049
|
inView: {
|
|
7048
|
-
Feature:
|
|
7050
|
+
Feature: fh
|
|
7049
7051
|
},
|
|
7050
7052
|
tap: {
|
|
7051
|
-
Feature:
|
|
7053
|
+
Feature: lh
|
|
7052
7054
|
},
|
|
7053
7055
|
focus: {
|
|
7054
|
-
Feature:
|
|
7056
|
+
Feature: oh
|
|
7055
7057
|
},
|
|
7056
7058
|
hover: {
|
|
7057
|
-
Feature:
|
|
7059
|
+
Feature: ah
|
|
7058
7060
|
}
|
|
7059
|
-
},
|
|
7061
|
+
}, yh = {
|
|
7060
7062
|
layout: {
|
|
7061
7063
|
ProjectionNode: Ha,
|
|
7062
7064
|
MeasureLayout: qa
|
|
7063
7065
|
}
|
|
7064
7066
|
}, $n = { current: null }, Za = { current: !1 };
|
|
7065
|
-
function
|
|
7067
|
+
function vh() {
|
|
7066
7068
|
if (Za.current = !0, !!Xn)
|
|
7067
7069
|
if (window.matchMedia) {
|
|
7068
7070
|
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => $n.current = e.matches;
|
|
@@ -7070,8 +7072,8 @@ function gh() {
|
|
|
7070
7072
|
} else
|
|
7071
7073
|
$n.current = !1;
|
|
7072
7074
|
}
|
|
7073
|
-
const
|
|
7074
|
-
function
|
|
7075
|
+
const bh = /* @__PURE__ */ new WeakMap();
|
|
7076
|
+
function xh(e, t, n) {
|
|
7075
7077
|
for (const r in t) {
|
|
7076
7078
|
const i = t[r], s = n[r];
|
|
7077
7079
|
if (H(i))
|
|
@@ -7100,7 +7102,7 @@ const rs = [
|
|
|
7100
7102
|
"LayoutAnimationStart",
|
|
7101
7103
|
"LayoutAnimationComplete"
|
|
7102
7104
|
];
|
|
7103
|
-
class
|
|
7105
|
+
class Ch {
|
|
7104
7106
|
/**
|
|
7105
7107
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
7106
7108
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -7127,7 +7129,7 @@ class bh {
|
|
|
7127
7129
|
}
|
|
7128
7130
|
}
|
|
7129
7131
|
mount(t) {
|
|
7130
|
-
this.current = t,
|
|
7132
|
+
this.current = t, bh.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, r) => this.bindToMotionValue(r, n)), Za.current || vh(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : $n.current, process.env.NODE_ENV !== "production" && nr(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);
|
|
7131
7133
|
}
|
|
7132
7134
|
unmount() {
|
|
7133
7135
|
this.projection && this.projection.unmount(), Se(this.notifyUpdate), Se(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -7196,7 +7198,7 @@ class bh {
|
|
|
7196
7198
|
const s = "on" + i, a = t[s];
|
|
7197
7199
|
a && (this.propEventSubscriptions[i] = this.on(i, a));
|
|
7198
7200
|
}
|
|
7199
|
-
this.prevMotionValues =
|
|
7201
|
+
this.prevMotionValues = xh(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
7200
7202
|
}
|
|
7201
7203
|
getProps() {
|
|
7202
7204
|
return this.props;
|
|
@@ -7261,7 +7263,7 @@ class bh {
|
|
|
7261
7263
|
*/
|
|
7262
7264
|
readValue(t, n) {
|
|
7263
7265
|
let r = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
7264
|
-
return r != null && (typeof r == "string" && (Ps(r) || Ss(r)) ? r = parseFloat(r) : !
|
|
7266
|
+
return r != null && (typeof r == "string" && (Ps(r) || Ss(r)) ? r = parseFloat(r) : !Fu(r) && Ee.test(n) && (r = la(t, n)), this.setBaseTarget(t, H(r) ? r.get() : r)), H(r) ? r.get() : r;
|
|
7265
7267
|
}
|
|
7266
7268
|
/**
|
|
7267
7269
|
* Set the base target to later animate back to. This is currently
|
|
@@ -7293,9 +7295,9 @@ class bh {
|
|
|
7293
7295
|
this.events[t] && this.events[t].notify(...n);
|
|
7294
7296
|
}
|
|
7295
7297
|
}
|
|
7296
|
-
class Xa extends
|
|
7298
|
+
class Xa extends Ch {
|
|
7297
7299
|
constructor() {
|
|
7298
|
-
super(...arguments), this.KeyframeResolver =
|
|
7300
|
+
super(...arguments), this.KeyframeResolver = Eu;
|
|
7299
7301
|
}
|
|
7300
7302
|
sortInstanceNodePosition(t, n) {
|
|
7301
7303
|
return t.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -7319,18 +7321,18 @@ function Ja(e, { style: t, vars: n }, r, i) {
|
|
|
7319
7321
|
for (const s in n)
|
|
7320
7322
|
e.style.setProperty(s, n[s]);
|
|
7321
7323
|
}
|
|
7322
|
-
function
|
|
7324
|
+
function Th(e) {
|
|
7323
7325
|
return window.getComputedStyle(e);
|
|
7324
7326
|
}
|
|
7325
|
-
class
|
|
7327
|
+
class wh extends Xa {
|
|
7326
7328
|
constructor() {
|
|
7327
7329
|
super(...arguments), this.type = "html", this.renderInstance = Ja;
|
|
7328
7330
|
}
|
|
7329
7331
|
readValueFromInstance(t, n) {
|
|
7330
7332
|
if (Qe.has(n))
|
|
7331
|
-
return this.projection?.isProjecting ? Mn(n) :
|
|
7333
|
+
return this.projection?.isProjecting ? Mn(n) : Gc(t, n);
|
|
7332
7334
|
{
|
|
7333
|
-
const r =
|
|
7335
|
+
const r = Th(t), i = (sr(n) ? r.getPropertyValue(n) : r[n]) || 0;
|
|
7334
7336
|
return typeof i == "string" ? i.trim() : i;
|
|
7335
7337
|
}
|
|
7336
7338
|
}
|
|
@@ -7369,12 +7371,12 @@ const Qa = /* @__PURE__ */ new Set([
|
|
|
7369
7371
|
"textLength",
|
|
7370
7372
|
"lengthAdjust"
|
|
7371
7373
|
]);
|
|
7372
|
-
function
|
|
7374
|
+
function kh(e, t, n, r) {
|
|
7373
7375
|
Ja(e, t, void 0, r);
|
|
7374
7376
|
for (const i in t.attrs)
|
|
7375
7377
|
e.setAttribute(Qa.has(i) ? i : wr(i), t.attrs[i]);
|
|
7376
7378
|
}
|
|
7377
|
-
class
|
|
7379
|
+
class Ph extends Xa {
|
|
7378
7380
|
constructor() {
|
|
7379
7381
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = _;
|
|
7380
7382
|
}
|
|
@@ -7395,20 +7397,20 @@ class wh extends Xa {
|
|
|
7395
7397
|
wa(t, n, this.isSVGTag, r.transformTemplate, r.style);
|
|
7396
7398
|
}
|
|
7397
7399
|
renderInstance(t, n, r, i) {
|
|
7398
|
-
|
|
7400
|
+
kh(t, n, r, i);
|
|
7399
7401
|
}
|
|
7400
7402
|
mount(t) {
|
|
7401
7403
|
this.isSVGTag = Pa(t.tagName), super.mount(t);
|
|
7402
7404
|
}
|
|
7403
7405
|
}
|
|
7404
|
-
const
|
|
7406
|
+
const Ah = (e, t) => Ar(e) ? new Ph(t) : new wh(t, {
|
|
7405
7407
|
allowProjection: e !== vs
|
|
7406
|
-
}),
|
|
7407
|
-
...
|
|
7408
|
-
...
|
|
7409
|
-
...
|
|
7410
|
-
...
|
|
7411
|
-
},
|
|
7408
|
+
}), Sh = /* @__PURE__ */ kd({
|
|
7409
|
+
...Zd,
|
|
7410
|
+
...gh,
|
|
7411
|
+
...sh,
|
|
7412
|
+
...yh
|
|
7413
|
+
}, Ah), mt = /* @__PURE__ */ Hu(Sh), Nt = {
|
|
7412
7414
|
initial: { opacity: 0, height: 0 },
|
|
7413
7415
|
animate: { opacity: 1, height: "auto" },
|
|
7414
7416
|
exit: { opacity: 0, height: 0 },
|
|
@@ -7427,42 +7429,43 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7427
7429
|
}, nn = ({
|
|
7428
7430
|
label: e,
|
|
7429
7431
|
error: t,
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7432
|
+
disabled: n,
|
|
7433
|
+
labelError: r,
|
|
7434
|
+
endContent: i,
|
|
7435
|
+
styles: s,
|
|
7436
|
+
onFocus: a,
|
|
7437
|
+
onBlur: o,
|
|
7438
|
+
...l
|
|
7436
7439
|
}) => {
|
|
7437
|
-
const
|
|
7438
|
-
(
|
|
7439
|
-
|
|
7440
|
-
},
|
|
7441
|
-
[s]
|
|
7442
|
-
), m = D(
|
|
7443
|
-
(v) => {
|
|
7444
|
-
c(!1), a?.(v);
|
|
7440
|
+
const u = se(null), [c, d] = j(!1), p = (t || r) && !n, f = D(() => u.current?.focus(), []), m = D(
|
|
7441
|
+
(y) => {
|
|
7442
|
+
d(!0), a?.(y);
|
|
7445
7443
|
},
|
|
7446
7444
|
[a]
|
|
7447
|
-
), g =
|
|
7445
|
+
), g = D(
|
|
7446
|
+
(y) => {
|
|
7447
|
+
d(!1), o?.(y);
|
|
7448
|
+
},
|
|
7449
|
+
[o]
|
|
7450
|
+
), v = !p && c && (s?.container?.focus || le.inputFocus);
|
|
7448
7451
|
return /* @__PURE__ */ h.jsxs("div", { children: [
|
|
7449
7452
|
e && /* @__PURE__ */ h.jsxs(
|
|
7450
7453
|
"label",
|
|
7451
7454
|
{
|
|
7452
|
-
htmlFor:
|
|
7453
|
-
className: ke(
|
|
7454
|
-
style:
|
|
7455
|
+
htmlFor: l.id,
|
|
7456
|
+
className: ke(le.label, s?.label?.className),
|
|
7457
|
+
style: s?.label?.styles,
|
|
7455
7458
|
children: [
|
|
7456
|
-
/* @__PURE__ */ h.jsx("span", { className:
|
|
7457
|
-
/* @__PURE__ */ h.jsx(hi, { mode: "wait", children: n && /* @__PURE__ */ h.jsx(
|
|
7459
|
+
/* @__PURE__ */ h.jsx("span", { className: le.label, children: e }, e),
|
|
7460
|
+
/* @__PURE__ */ h.jsx(hi, { mode: "wait", children: r && !n && /* @__PURE__ */ h.jsx(
|
|
7458
7461
|
mt.span,
|
|
7459
7462
|
{
|
|
7460
7463
|
initial: Ot.initial,
|
|
7461
7464
|
animate: Ot.animate,
|
|
7462
7465
|
exit: Ot.exit,
|
|
7463
7466
|
transition: Ot.transition,
|
|
7464
|
-
className:
|
|
7465
|
-
children:
|
|
7467
|
+
className: le.labelError,
|
|
7468
|
+
children: r
|
|
7466
7469
|
},
|
|
7467
7470
|
t
|
|
7468
7471
|
) })
|
|
@@ -7473,64 +7476,70 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7473
7476
|
"div",
|
|
7474
7477
|
{
|
|
7475
7478
|
className: ke(
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7479
|
+
le.inputContainer,
|
|
7480
|
+
p && le.errorInput,
|
|
7481
|
+
n && le.disabled,
|
|
7482
|
+
v,
|
|
7483
|
+
s?.container?.className
|
|
7480
7484
|
),
|
|
7481
|
-
style:
|
|
7482
|
-
onClick:
|
|
7485
|
+
style: s?.container?.styles,
|
|
7486
|
+
onClick: f,
|
|
7483
7487
|
children: [
|
|
7484
7488
|
/* @__PURE__ */ h.jsx(
|
|
7485
7489
|
"input",
|
|
7486
7490
|
{
|
|
7487
|
-
...
|
|
7488
|
-
ref:
|
|
7489
|
-
onFocus:
|
|
7490
|
-
onBlur:
|
|
7491
|
-
style:
|
|
7492
|
-
className: ke(
|
|
7491
|
+
...l,
|
|
7492
|
+
ref: u,
|
|
7493
|
+
onFocus: m,
|
|
7494
|
+
onBlur: g,
|
|
7495
|
+
style: s?.field?.styles,
|
|
7496
|
+
className: ke(
|
|
7497
|
+
le.input,
|
|
7498
|
+
n && le.disabledInput,
|
|
7499
|
+
l.className,
|
|
7500
|
+
s?.field?.className
|
|
7501
|
+
)
|
|
7493
7502
|
}
|
|
7494
7503
|
),
|
|
7495
|
-
|
|
7504
|
+
i && /* @__PURE__ */ h.jsx("div", { className: le.endContent, children: i })
|
|
7496
7505
|
]
|
|
7497
7506
|
}
|
|
7498
7507
|
),
|
|
7499
|
-
/* @__PURE__ */ h.jsx(hi, { mode: "wait", children: t && /* @__PURE__ */ h.jsx(
|
|
7508
|
+
/* @__PURE__ */ h.jsx(hi, { mode: "wait", children: t && !n && /* @__PURE__ */ h.jsx(
|
|
7500
7509
|
mt.div,
|
|
7501
7510
|
{
|
|
7502
7511
|
initial: Nt.initial,
|
|
7503
7512
|
animate: Nt.animate,
|
|
7504
7513
|
exit: Nt.exit,
|
|
7505
7514
|
transition: Nt.transition,
|
|
7506
|
-
className: ke(
|
|
7507
|
-
style:
|
|
7515
|
+
className: ke(le.error, s?.error?.className),
|
|
7516
|
+
style: s?.error?.styles,
|
|
7508
7517
|
children: t
|
|
7509
7518
|
}
|
|
7510
7519
|
) })
|
|
7511
7520
|
] });
|
|
7512
|
-
},
|
|
7521
|
+
}, Eh = {
|
|
7513
7522
|
width: 16,
|
|
7514
7523
|
height: 16,
|
|
7515
7524
|
display: "flex",
|
|
7516
7525
|
alignItems: "center",
|
|
7517
7526
|
justifyContent: "center"
|
|
7518
|
-
}, rn = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style:
|
|
7527
|
+
}, rn = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: Eh, children: /* @__PURE__ */ h.jsx("svg", { className: e, focusable: "false", fill: "#dc2626", color: "#dc2626", height: "12", viewBox: "0 0 12 12", width: "12", children: /* @__PURE__ */ h.jsxs("g", { fill: "none", fillRule: "evenodd", transform: "matrix(1 0 0 -1 0 12)", children: [
|
|
7519
7528
|
/* @__PURE__ */ h.jsx("circle", { cx: "6", cy: "3.2", fill: "currentColor", r: "1" }),
|
|
7520
7529
|
/* @__PURE__ */ h.jsxs("g", { stroke: "currentColor", children: [
|
|
7521
7530
|
/* @__PURE__ */ h.jsx("circle", { cx: "6", cy: "6", r: "5.5" }),
|
|
7522
7531
|
/* @__PURE__ */ h.jsx("path", { d: "m6 9.2v-3.2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
7523
7532
|
] })
|
|
7524
|
-
] }) }) }),
|
|
7533
|
+
] }) }) }), jh = {
|
|
7525
7534
|
width: 30,
|
|
7526
7535
|
height: 20,
|
|
7527
7536
|
display: "flex",
|
|
7528
7537
|
alignItems: "center",
|
|
7529
7538
|
justifyContent: "center"
|
|
7530
|
-
},
|
|
7539
|
+
}, Vh = {
|
|
7531
7540
|
width: "100%",
|
|
7532
7541
|
height: "100%"
|
|
7533
|
-
},
|
|
7542
|
+
}, Rh = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: jh, className: e, children: /* @__PURE__ */ h.jsxs("svg", { style: Vh, focusable: "false", viewBox: "0 0 32 21", role: "img", "aria-label": "CVC", children: [
|
|
7534
7543
|
/* @__PURE__ */ h.jsx("title", { children: "CVC" }),
|
|
7535
7544
|
/* @__PURE__ */ h.jsx("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ h.jsxs("g", { fill: "#565656", children: [
|
|
7536
7545
|
/* @__PURE__ */ h.jsxs("g", { transform: "translate(0 2)", children: [
|
|
@@ -7545,7 +7554,7 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7545
7554
|
] }),
|
|
7546
7555
|
/* @__PURE__ */ h.jsx("g", { transform: "translate(18)", children: /* @__PURE__ */ h.jsx("path", { d: "M7 14A7 7 0 1 1 7 0a7 7 0 0 1 0 14zM4.22 4.1h-.79l-1.93.98v1l1.53-.8V9.9h1.2V4.1zm2.3.8c.57 0 .97.32.97.78 0 .5-.47.85-1.15.85h-.3v.85h.36c.72 0 1.21.36 1.21.88 0 .5-.48.84-1.16.84-.5 0-1-.16-1.52-.47v1c.56.24 1.12.37 1.67.37 1.31 0 2.21-.67 2.21-1.64 0-.68-.42-1.23-1.12-1.45.6-.2.99-.73.99-1.33C8.68 4.64 7.85 4 6.65 4a4 4 0 0 0-1.57.34v.98c.48-.27.97-.42 1.44-.42zm4.32 2.18c.73 0 1.24.43 1.24.99 0 .59-.51 1-1.24 1-.44 0-.9-.14-1.37-.43v1.03c.49.22.99.33 1.48.33.26 0 .5-.04.73-.1.52-.85.82-1.83.82-2.88l-.02-.42a2.3 2.3 0 0 0-1.23-.32c-.18 0-.37.01-.57.04v-1.3h1.44a5.62 5.62 0 0 0-.46-.92H9.64v3.15c.4-.1.8-.17 1.2-.17z" }) })
|
|
7547
7556
|
] }) })
|
|
7548
|
-
] }) }),
|
|
7557
|
+
] }) }), Mh = ({ className: e }) => /* @__PURE__ */ h.jsx(
|
|
7549
7558
|
"svg",
|
|
7550
7559
|
{
|
|
7551
7560
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7560,16 +7569,16 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7560
7569
|
className: e,
|
|
7561
7570
|
children: /* @__PURE__ */ h.jsx("polyline", { points: "15 18 9 12 15 6" })
|
|
7562
7571
|
}
|
|
7563
|
-
),
|
|
7572
|
+
), Ih = {
|
|
7564
7573
|
width: 30,
|
|
7565
7574
|
height: 20,
|
|
7566
7575
|
display: "flex",
|
|
7567
7576
|
alignItems: "center",
|
|
7568
7577
|
justifyContent: "center"
|
|
7569
|
-
},
|
|
7578
|
+
}, Dh = {
|
|
7570
7579
|
width: "100%",
|
|
7571
7580
|
height: "100%"
|
|
7572
|
-
},
|
|
7581
|
+
}, Lh = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: Ih, className: e, children: /* @__PURE__ */ h.jsxs(
|
|
7573
7582
|
"svg",
|
|
7574
7583
|
{
|
|
7575
7584
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7579,22 +7588,22 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7579
7588
|
strokeWidth: "2",
|
|
7580
7589
|
strokeLinecap: "round",
|
|
7581
7590
|
strokeLinejoin: "round",
|
|
7582
|
-
style:
|
|
7591
|
+
style: Dh,
|
|
7583
7592
|
children: [
|
|
7584
7593
|
/* @__PURE__ */ h.jsx("rect", { x: "1", y: "1", width: "28", height: "18", rx: "2", ry: "2" }),
|
|
7585
7594
|
/* @__PURE__ */ h.jsx("line", { x1: "1", y1: "8", x2: "27", y2: "8" })
|
|
7586
7595
|
]
|
|
7587
7596
|
}
|
|
7588
|
-
) }),
|
|
7597
|
+
) }), Nh = {
|
|
7589
7598
|
width: 30,
|
|
7590
7599
|
height: 20,
|
|
7591
7600
|
display: "flex",
|
|
7592
7601
|
alignItems: "center",
|
|
7593
7602
|
justifyContent: "center"
|
|
7594
|
-
},
|
|
7603
|
+
}, Oh = {
|
|
7595
7604
|
width: "100%",
|
|
7596
7605
|
height: "100%"
|
|
7597
|
-
},
|
|
7606
|
+
}, Bh = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: Nh, className: e, children: /* @__PURE__ */ h.jsx(
|
|
7598
7607
|
"svg",
|
|
7599
7608
|
{
|
|
7600
7609
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7603,7 +7612,7 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7603
7612
|
height: "16px",
|
|
7604
7613
|
viewBox: "0 0 24 16",
|
|
7605
7614
|
version: "1.1",
|
|
7606
|
-
style:
|
|
7615
|
+
style: Oh,
|
|
7607
7616
|
children: /* @__PURE__ */ h.jsx("g", { id: "319", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ h.jsx("g", { id: "New-Icons", transform: "translate(-80.000000, -280.000000)", fillRule: "nonzero", children: /* @__PURE__ */ h.jsx("g", { id: "Card-Brands", transform: "translate(40.000000, 200.000000)", children: /* @__PURE__ */ h.jsx("g", { id: "Color", transform: "translate(0.000000, 80.000000)", children: /* @__PURE__ */ h.jsxs("g", { id: "Visa", transform: "translate(40.000000, 0.000000)", children: [
|
|
7608
7617
|
/* @__PURE__ */ h.jsx(
|
|
7609
7618
|
"rect",
|
|
@@ -7630,16 +7639,16 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7630
7639
|
)
|
|
7631
7640
|
] }) }) }) }) })
|
|
7632
7641
|
}
|
|
7633
|
-
) }),
|
|
7642
|
+
) }), _h = {
|
|
7634
7643
|
width: 30,
|
|
7635
7644
|
height: 20,
|
|
7636
7645
|
display: "flex",
|
|
7637
7646
|
alignItems: "center",
|
|
7638
7647
|
justifyContent: "center"
|
|
7639
|
-
},
|
|
7648
|
+
}, Fh = {
|
|
7640
7649
|
width: "100%",
|
|
7641
7650
|
height: "100%"
|
|
7642
|
-
},
|
|
7651
|
+
}, qh = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: _h, className: e, children: /* @__PURE__ */ h.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", height: "16", viewBox: "0 0 24 16", width: "24", style: Fh, children: /* @__PURE__ */ h.jsxs("g", { fill: "none", fillRule: "evenodd", children: [
|
|
7643
7652
|
/* @__PURE__ */ h.jsx("rect", { fill: "#252525", height: "16", rx: "2", width: "24" }),
|
|
7644
7653
|
/* @__PURE__ */ h.jsx("circle", { cx: "9", cy: "8", fill: "#eb001b", r: "5" }),
|
|
7645
7654
|
/* @__PURE__ */ h.jsx("circle", { cx: "15", cy: "8", fill: "#f79e1b", r: "5" }),
|
|
@@ -7650,16 +7659,16 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7650
7659
|
fill: "#ff5f00"
|
|
7651
7660
|
}
|
|
7652
7661
|
)
|
|
7653
|
-
] }) }) }),
|
|
7662
|
+
] }) }) }), Kh = {
|
|
7654
7663
|
width: 30,
|
|
7655
7664
|
height: 20,
|
|
7656
7665
|
display: "flex",
|
|
7657
7666
|
alignItems: "center",
|
|
7658
7667
|
justifyContent: "center"
|
|
7659
|
-
},
|
|
7668
|
+
}, zh = {
|
|
7660
7669
|
width: "100%",
|
|
7661
7670
|
height: "100%"
|
|
7662
|
-
},
|
|
7671
|
+
}, Uh = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: Kh, className: e, children: /* @__PURE__ */ h.jsx(
|
|
7663
7672
|
"svg",
|
|
7664
7673
|
{
|
|
7665
7674
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7668,7 +7677,7 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7668
7677
|
height: "16px",
|
|
7669
7678
|
viewBox: "0 0 24 16",
|
|
7670
7679
|
version: "1.1",
|
|
7671
|
-
style:
|
|
7680
|
+
style: zh,
|
|
7672
7681
|
children: /* @__PURE__ */ h.jsx("g", { id: "319", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ h.jsx("g", { id: "New-Icons", transform: "translate(-320.000000, -280.000000)", fillRule: "nonzero", children: /* @__PURE__ */ h.jsx("g", { id: "Card-Brands", transform: "translate(40.000000, 200.000000)", children: /* @__PURE__ */ h.jsx("g", { id: "Color", transform: "translate(0.000000, 80.000000)", children: /* @__PURE__ */ h.jsxs("g", { id: "Diners-Club", transform: "translate(280.000000, 0.000000)", children: [
|
|
7673
7682
|
/* @__PURE__ */ h.jsx(
|
|
7674
7683
|
"path",
|
|
@@ -7699,16 +7708,16 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7699
7708
|
)
|
|
7700
7709
|
] }) }) }) }) })
|
|
7701
7710
|
}
|
|
7702
|
-
) }),
|
|
7711
|
+
) }), $h = {
|
|
7703
7712
|
width: 30,
|
|
7704
7713
|
height: 20,
|
|
7705
7714
|
display: "flex",
|
|
7706
7715
|
alignItems: "center",
|
|
7707
7716
|
justifyContent: "center"
|
|
7708
|
-
},
|
|
7717
|
+
}, Gh = {
|
|
7709
7718
|
width: "100%",
|
|
7710
7719
|
height: "100%"
|
|
7711
|
-
},
|
|
7720
|
+
}, Wh = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: $h, className: e, children: /* @__PURE__ */ h.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", height: "16", viewBox: "0 0 23 16", width: "23", style: Gh, children: /* @__PURE__ */ h.jsxs("g", { fill: "none", children: [
|
|
7712
7721
|
/* @__PURE__ */ h.jsx(
|
|
7713
7722
|
"path",
|
|
7714
7723
|
{
|
|
@@ -7751,16 +7760,16 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7751
7760
|
fill: "#fff"
|
|
7752
7761
|
}
|
|
7753
7762
|
)
|
|
7754
|
-
] }) }) }),
|
|
7763
|
+
] }) }) }), Yh = {
|
|
7755
7764
|
width: 30,
|
|
7756
7765
|
height: 20,
|
|
7757
7766
|
display: "flex",
|
|
7758
7767
|
alignItems: "center",
|
|
7759
7768
|
justifyContent: "center"
|
|
7760
|
-
},
|
|
7769
|
+
}, Hh = {
|
|
7761
7770
|
width: "100%",
|
|
7762
7771
|
height: "100%"
|
|
7763
|
-
},
|
|
7772
|
+
}, Zh = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: Yh, className: e, children: /* @__PURE__ */ h.jsx(
|
|
7764
7773
|
"svg",
|
|
7765
7774
|
{
|
|
7766
7775
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7769,7 +7778,7 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7769
7778
|
height: "16px",
|
|
7770
7779
|
viewBox: "0 0 24 16",
|
|
7771
7780
|
version: "1.1",
|
|
7772
|
-
style:
|
|
7781
|
+
style: Hh,
|
|
7773
7782
|
children: /* @__PURE__ */ h.jsx("g", { id: "319", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ h.jsx("g", { id: "New-Icons", transform: "translate(-280.000000, -280.000000)", fillRule: "nonzero", children: /* @__PURE__ */ h.jsx("g", { id: "Card-Brands", transform: "translate(40.000000, 200.000000)", children: /* @__PURE__ */ h.jsx("g", { id: "Color", transform: "translate(0.000000, 80.000000)", children: /* @__PURE__ */ h.jsxs("g", { id: "Discover", transform: "translate(240.000000, 0.000000)", children: [
|
|
7774
7783
|
/* @__PURE__ */ h.jsx(
|
|
7775
7784
|
"path",
|
|
@@ -7808,16 +7817,16 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7808
7817
|
)
|
|
7809
7818
|
] }) }) }) }) })
|
|
7810
7819
|
}
|
|
7811
|
-
) }),
|
|
7820
|
+
) }), Xh = {
|
|
7812
7821
|
width: 30,
|
|
7813
7822
|
height: 20,
|
|
7814
7823
|
display: "flex",
|
|
7815
7824
|
alignItems: "center",
|
|
7816
7825
|
justifyContent: "center"
|
|
7817
|
-
},
|
|
7826
|
+
}, Jh = {
|
|
7818
7827
|
width: "100%",
|
|
7819
7828
|
height: "100%"
|
|
7820
|
-
},
|
|
7829
|
+
}, Qh = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: Xh, className: e, children: /* @__PURE__ */ h.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 16", style: Jh, children: /* @__PURE__ */ h.jsxs("g", { fill: "none", fillRule: "evenodd", children: [
|
|
7821
7830
|
/* @__PURE__ */ h.jsx("rect", { fill: "#016fd0", height: "16", rx: "2", width: "24" }),
|
|
7822
7831
|
/* @__PURE__ */ h.jsx(
|
|
7823
7832
|
"path",
|
|
@@ -7851,16 +7860,16 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7851
7860
|
/* @__PURE__ */ h.jsx("path", { d: "m14.7004641 3.25135912-1.9740111 4.44517127h1.3539006l.3724199-.89016575h2.0179447l.3721547.89016575h1.3875801l-1.96579-4.44517127zm.1696353 2.55743646.592-1.41507182.5915581 1.41507182z" }),
|
|
7852
7861
|
/* @__PURE__ */ h.jsx("path", { d: "m18.2119779 7.69573481v-4.44508288l1.903116.00654144.9792707 2.73272928.9856354-2.73927072h1.8316022v4.44508288l-1.1786077.01043094v-3.05334807l-1.1125746 3.04291713h-1.0758011l-1.1356464-3.05334807v3.05334807z" })
|
|
7853
7862
|
] })
|
|
7854
|
-
] }) }) }),
|
|
7863
|
+
] }) }) }), e1 = {
|
|
7855
7864
|
width: 30,
|
|
7856
7865
|
height: 20,
|
|
7857
7866
|
display: "flex",
|
|
7858
7867
|
alignItems: "center",
|
|
7859
7868
|
justifyContent: "center"
|
|
7860
|
-
},
|
|
7869
|
+
}, t1 = {
|
|
7861
7870
|
width: "100%",
|
|
7862
7871
|
height: "100%"
|
|
7863
|
-
},
|
|
7872
|
+
}, n1 = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: e1, className: e, children: /* @__PURE__ */ h.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", height: "16", viewBox: "0 0 24 16", width: "24", style: t1, children: /* @__PURE__ */ h.jsxs("g", { fill: "none", children: [
|
|
7864
7873
|
/* @__PURE__ */ h.jsx(
|
|
7865
7874
|
"path",
|
|
7866
7875
|
{
|
|
@@ -7889,16 +7898,16 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7889
7898
|
fill: "#fefefe"
|
|
7890
7899
|
}
|
|
7891
7900
|
)
|
|
7892
|
-
] }) }) }),
|
|
7901
|
+
] }) }) }), r1 = {
|
|
7893
7902
|
width: 30,
|
|
7894
7903
|
height: 20,
|
|
7895
7904
|
display: "flex",
|
|
7896
7905
|
alignItems: "center",
|
|
7897
7906
|
justifyContent: "center"
|
|
7898
|
-
},
|
|
7907
|
+
}, i1 = {
|
|
7899
7908
|
width: "100%",
|
|
7900
7909
|
height: "100%"
|
|
7901
|
-
},
|
|
7910
|
+
}, s1 = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: r1, className: e, children: /* @__PURE__ */ h.jsxs(
|
|
7902
7911
|
"svg",
|
|
7903
7912
|
{
|
|
7904
7913
|
width: "30",
|
|
@@ -7907,7 +7916,7 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7907
7916
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7908
7917
|
fill: "rgb(223, 27, 65)",
|
|
7909
7918
|
role: "presentation",
|
|
7910
|
-
style:
|
|
7919
|
+
style: i1,
|
|
7911
7920
|
children: [
|
|
7912
7921
|
/* @__PURE__ */ h.jsxs("g", { clipPath: "url(#clip0_184_11820)", children: [
|
|
7913
7922
|
/* @__PURE__ */ h.jsx(
|
|
@@ -7929,22 +7938,22 @@ const kh = (e, t) => Ar(e) ? new wh(t) : new Ch(t, {
|
|
|
7929
7938
|
/* @__PURE__ */ h.jsx("defs", { children: /* @__PURE__ */ h.jsx("clipPath", { id: "clip0_184_11820", children: /* @__PURE__ */ h.jsx("rect", { width: "30", height: "20" }) }) })
|
|
7930
7939
|
]
|
|
7931
7940
|
}
|
|
7932
|
-
) }),
|
|
7941
|
+
) }), a1 = {
|
|
7933
7942
|
width: 30,
|
|
7934
7943
|
height: 20,
|
|
7935
7944
|
display: "flex",
|
|
7936
7945
|
alignItems: "center",
|
|
7937
7946
|
justifyContent: "center"
|
|
7938
|
-
},
|
|
7947
|
+
}, o1 = {
|
|
7939
7948
|
width: "100%",
|
|
7940
7949
|
height: "100%"
|
|
7941
|
-
},
|
|
7950
|
+
}, l1 = ({ className: e }) => /* @__PURE__ */ h.jsx("div", { style: a1, className: e, children: /* @__PURE__ */ h.jsxs("svg", { viewBox: "0 0 100 66", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: o1, children: [
|
|
7942
7951
|
/* @__PURE__ */ h.jsx("rect", { x: "2", y: "2", width: "96", height: "62", rx: "5", stroke: "#D3D3D3", strokeWidth: "4" }),
|
|
7943
7952
|
/* @__PURE__ */ h.jsx("ellipse", { cx: "38", cy: "33", rx: "22", ry: "22", fill: "#F00" }),
|
|
7944
7953
|
/* @__PURE__ */ h.jsx("ellipse", { cx: "62", cy: "33", rx: "22", ry: "22", fill: "#1E88E5" })
|
|
7945
|
-
] }) }),
|
|
7946
|
-
cvcIcon:
|
|
7947
|
-
},
|
|
7954
|
+
] }) }), c1 = "_cvcIcon_1yx89_1", u1 = {
|
|
7955
|
+
cvcIcon: c1
|
|
7956
|
+
}, d1 = null, eo = J(d1), Et = () => N(eo), h1 = ({ children: e, styles: t }) => /* @__PURE__ */ h.jsx(eo.Provider, { value: t || null, children: e });
|
|
7948
7957
|
var z = /* @__PURE__ */ ((e) => (e.Invalid = "invalid", e.Empty = "empty", e.Incomplete = "incomplete", e.Unsupported = "unsupported", e.Expired = "expired", e))(z || {}), Z = /* @__PURE__ */ ((e) => (e.Visa = "visa", e.Mastercard = "mastercard", e.AmericanExpress = "american-express", e.Discover = "discover", e.JCB = "jcb", e.DinersClub = "diners-club", e.UnionPay = "unionpay", e.Maestro = "maestro", e))(Z || {});
|
|
7949
7958
|
const Vr = [
|
|
7950
7959
|
{ name: "Visa", type: "visa", pattern: /^4/, minLength: 16, maxLength: 16 },
|
|
@@ -7961,7 +7970,7 @@ const Vr = [
|
|
|
7961
7970
|
minLength: 12,
|
|
7962
7971
|
maxLength: 19
|
|
7963
7972
|
}
|
|
7964
|
-
], to = (e) => Vr.find((t) => t.pattern.test(e)) || null,
|
|
7973
|
+
], to = (e) => Vr.find((t) => t.pattern.test(e)) || null, p1 = (e) => Vr.filter((t) => t.pattern.test(e)), f1 = (e) => {
|
|
7965
7974
|
let t = 0, n = !1;
|
|
7966
7975
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
7967
7976
|
let i = parseInt(e[r]);
|
|
@@ -7992,7 +8001,7 @@ const Vr = [
|
|
|
7992
8001
|
isValid: !1,
|
|
7993
8002
|
cardType: r.name,
|
|
7994
8003
|
error: "unsupported"
|
|
7995
|
-
} :
|
|
8004
|
+
} : f1(n) ? {
|
|
7996
8005
|
isValid: !0,
|
|
7997
8006
|
cardType: r?.name || null,
|
|
7998
8007
|
error: null
|
|
@@ -8004,7 +8013,7 @@ const Vr = [
|
|
|
8004
8013
|
}, ss = (e, t = "") => {
|
|
8005
8014
|
const n = He.getTypeInfo(t), r = !e, i = e.length < (n?.code.size || 3);
|
|
8006
8015
|
return !r && !i ? null : r ? z.Empty : z.Incomplete;
|
|
8007
|
-
},
|
|
8016
|
+
}, m1 = ({ onChange: e, value: t, isTouchSubmit: n, disabled: r, cardType: i = "" }) => {
|
|
8008
8017
|
const s = Oe(), a = Ye(), o = Et(), [l, u] = j(""), [c, d] = j(!0), [p, f] = j(!1), m = n || p, g = (C) => {
|
|
8009
8018
|
const x = ss(C, i);
|
|
8010
8019
|
if (x) {
|
|
@@ -8036,7 +8045,7 @@ const Vr = [
|
|
|
8036
8045
|
onChange: v,
|
|
8037
8046
|
onBlur: () => g(t),
|
|
8038
8047
|
styles: o?.card?.input,
|
|
8039
|
-
endContent: y ? /* @__PURE__ */ h.jsx(rn, {}) : /* @__PURE__ */ h.jsx(
|
|
8048
|
+
endContent: y ? /* @__PURE__ */ h.jsx(rn, {}) : /* @__PURE__ */ h.jsx(Rh, { className: u1.cvcIcon })
|
|
8040
8049
|
}
|
|
8041
8050
|
);
|
|
8042
8051
|
}, as = (e) => {
|
|
@@ -8044,7 +8053,7 @@ const Vr = [
|
|
|
8044
8053
|
r.setFullYear(2e3 + parseInt(s), parseInt(i) - 1, 31);
|
|
8045
8054
|
const a = r.getTime() < Date.now();
|
|
8046
8055
|
return !t && !n && !a ? null : t ? z.Empty : n ? z.Incomplete : r.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? "dateExpired" : "expired";
|
|
8047
|
-
},
|
|
8056
|
+
}, g1 = ({ onChange: e, value: t, isTouchSubmit: n, disabled: r }) => {
|
|
8048
8057
|
const i = Oe(), s = Ye(), a = Et(), [o, l] = j(""), [u, c] = j(!0), [d, p] = j(!1), f = n || d, m = (y) => {
|
|
8049
8058
|
const C = as(y);
|
|
8050
8059
|
if (C) {
|
|
@@ -8079,7 +8088,7 @@ const Vr = [
|
|
|
8079
8088
|
endContent: v ? /* @__PURE__ */ h.jsx(rn, {}) : null
|
|
8080
8089
|
}
|
|
8081
8090
|
);
|
|
8082
|
-
}, os = (e) => e ? null : z.Empty,
|
|
8091
|
+
}, os = (e) => e ? null : z.Empty, y1 = ({ onChange: e, value: t, isTouchSubmit: n, disabled: r }) => {
|
|
8083
8092
|
const i = Oe(), s = Ye(), a = Et(), [o, l] = j(""), [u, c] = j(!0), [d, p] = j(!1), f = n || d, m = (y) => {
|
|
8084
8093
|
if (os(y)) {
|
|
8085
8094
|
l(""), c(!0);
|
|
@@ -8111,33 +8120,33 @@ const Vr = [
|
|
|
8111
8120
|
endContent: v ? /* @__PURE__ */ h.jsx(rn, {}) : null
|
|
8112
8121
|
}
|
|
8113
8122
|
);
|
|
8114
|
-
}, ls = Vr.map((e) => e.type),
|
|
8115
|
-
iconContainer:
|
|
8116
|
-
},
|
|
8123
|
+
}, ls = Vr.map((e) => e.type), v1 = "_iconContainer_1nckj_1", Te = {
|
|
8124
|
+
iconContainer: v1
|
|
8125
|
+
}, b1 = ({
|
|
8117
8126
|
cardTypes: e,
|
|
8118
8127
|
supportedCardTypes: t
|
|
8119
|
-
}) => e.filter((n) => t.includes(n)).slice(0,
|
|
8128
|
+
}) => e.filter((n) => t.includes(n)).slice(0, 3).map((n) => {
|
|
8120
8129
|
switch (n) {
|
|
8121
8130
|
case Z.Visa:
|
|
8122
|
-
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(
|
|
8131
|
+
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(Bh, {}) }, n);
|
|
8123
8132
|
case Z.Mastercard:
|
|
8124
|
-
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(
|
|
8133
|
+
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(qh, {}) }, n);
|
|
8125
8134
|
case Z.DinersClub:
|
|
8126
|
-
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(
|
|
8135
|
+
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(Uh, {}) }, n);
|
|
8127
8136
|
case Z.JCB:
|
|
8128
|
-
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(
|
|
8137
|
+
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(Wh, {}) }, n);
|
|
8129
8138
|
case Z.AmericanExpress:
|
|
8130
|
-
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(
|
|
8139
|
+
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(Qh, {}) }, n);
|
|
8131
8140
|
case Z.Discover:
|
|
8132
|
-
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(
|
|
8141
|
+
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(Zh, {}) }, n);
|
|
8133
8142
|
case Z.UnionPay:
|
|
8134
|
-
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(
|
|
8143
|
+
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(n1, {}) }, n);
|
|
8135
8144
|
case Z.Maestro:
|
|
8136
|
-
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(
|
|
8145
|
+
return /* @__PURE__ */ h.jsx("span", { className: Te.iconContainer, children: /* @__PURE__ */ h.jsx(l1, {}) }, n);
|
|
8137
8146
|
default:
|
|
8138
8147
|
return null;
|
|
8139
8148
|
}
|
|
8140
|
-
}),
|
|
8149
|
+
}), x1 = ({ onChange: e, value: t, disabled: n, isTouchSubmit: r, supportedCardTypes: i }) => {
|
|
8141
8150
|
const s = Oe(), a = Ye(), o = Et(), [l, u] = j(ls), [c, d] = j(""), [p, f] = j(!0), [m, g] = j(!1), v = r || m, y = (P) => {
|
|
8142
8151
|
const { isValid: T, error: w } = is(P, i);
|
|
8143
8152
|
if (!T)
|
|
@@ -8147,16 +8156,14 @@ const Vr = [
|
|
|
8147
8156
|
if (n) return;
|
|
8148
8157
|
const { value: T } = P.currentTarget;
|
|
8149
8158
|
d(""), f(!1), m || g(!0);
|
|
8150
|
-
const w =
|
|
8151
|
-
console.log({ cardTypes: w });
|
|
8152
|
-
const A = to(T), k = jl(T, A?.type || "");
|
|
8159
|
+
const w = p1(T).map((R) => R.type), A = to(T), k = jl(T, A?.type || "");
|
|
8153
8160
|
k.replace(/\D/g, "").length === (A?.maxLength || 16) && y(k), u(w.length ? w : ls), e({
|
|
8154
8161
|
card: k,
|
|
8155
8162
|
cardType: A?.type || "",
|
|
8156
8163
|
cardTypes: w,
|
|
8157
8164
|
isValid: is(k).isValid
|
|
8158
8165
|
});
|
|
8159
|
-
}, x = v && (!!c || p);
|
|
8166
|
+
}, x = v && !n && (!!c || p);
|
|
8160
8167
|
return /* @__PURE__ */ h.jsx(
|
|
8161
8168
|
nn,
|
|
8162
8169
|
{
|
|
@@ -8171,20 +8178,20 @@ const Vr = [
|
|
|
8171
8178
|
onChange: C,
|
|
8172
8179
|
onBlur: () => y(t),
|
|
8173
8180
|
styles: o?.card?.input,
|
|
8174
|
-
endContent: x ? /* @__PURE__ */ h.jsx(
|
|
8181
|
+
endContent: x ? /* @__PURE__ */ h.jsx(s1, {}) : /* @__PURE__ */ h.jsx(b1, { cardTypes: l, supportedCardTypes: i || [] })
|
|
8175
8182
|
}
|
|
8176
8183
|
);
|
|
8177
|
-
},
|
|
8178
|
-
container:
|
|
8179
|
-
iconContainer:
|
|
8180
|
-
icon:
|
|
8181
|
-
title:
|
|
8182
|
-
},
|
|
8184
|
+
}, C1 = "_container_1ari8_1", T1 = "_iconContainer_1ari8_5", w1 = "_icon_1ari8_5", k1 = "_title_1ari8_15", Bt = {
|
|
8185
|
+
container: C1,
|
|
8186
|
+
iconContainer: T1,
|
|
8187
|
+
icon: w1,
|
|
8188
|
+
title: k1
|
|
8189
|
+
}, P1 = ({ title: e }) => /* @__PURE__ */ h.jsxs("div", { className: Bt.container, children: [
|
|
8183
8190
|
/* @__PURE__ */ h.jsx("div", { className: Bt.iconContainer, children: /* @__PURE__ */ h.jsx(rn, { className: Bt.icon }) }),
|
|
8184
8191
|
/* @__PURE__ */ h.jsx("div", { className: Bt.title, children: e })
|
|
8185
|
-
] }),
|
|
8186
|
-
svg:
|
|
8187
|
-
sr:
|
|
8192
|
+
] }), A1 = "_svg_1kkac_1", S1 = "_sr_1kkac_5", cs = {
|
|
8193
|
+
svg: A1,
|
|
8194
|
+
sr: S1
|
|
8188
8195
|
}, Gn = ({ className: e }) => /* @__PURE__ */ h.jsxs("div", { role: "status", className: e, children: [
|
|
8189
8196
|
/* @__PURE__ */ h.jsxs(
|
|
8190
8197
|
"svg",
|
|
@@ -8213,7 +8220,7 @@ const Vr = [
|
|
|
8213
8220
|
}
|
|
8214
8221
|
),
|
|
8215
8222
|
/* @__PURE__ */ h.jsx("span", { className: cs.sr, children: "Loading..." })
|
|
8216
|
-
] }),
|
|
8223
|
+
] }), E1 = ({ isFetching: e, isFail: t, supportedCardTypes: n, onSubmit: r }) => {
|
|
8217
8224
|
const i = Ye(), s = Et(), [a, o] = j({ value: "", isValid: !1 }), [l, u] = j({ value: "", isValid: !1 }), [c, d] = j({ value: "", isValid: !1 }), [p, f] = j(""), [m, g] = j({ value: "", isValid: !1 }), [v, y] = j(!1), C = ({ card: T, cardType: w, isValid: A }) => {
|
|
8218
8225
|
d({ value: T, isValid: A }), f(w);
|
|
8219
8226
|
const k = Pn(a.value, w);
|
|
@@ -8234,7 +8241,7 @@ const Vr = [
|
|
|
8234
8241
|
};
|
|
8235
8242
|
return /* @__PURE__ */ h.jsxs("form", { onSubmit: P, className: Rt.card, children: [
|
|
8236
8243
|
/* @__PURE__ */ h.jsx(
|
|
8237
|
-
|
|
8244
|
+
x1,
|
|
8238
8245
|
{
|
|
8239
8246
|
value: c.value,
|
|
8240
8247
|
onChange: C,
|
|
@@ -8244,9 +8251,9 @@ const Vr = [
|
|
|
8244
8251
|
}
|
|
8245
8252
|
),
|
|
8246
8253
|
/* @__PURE__ */ h.jsxs("div", { className: Rt.cardDataContainer, children: [
|
|
8247
|
-
/* @__PURE__ */ h.jsx(
|
|
8254
|
+
/* @__PURE__ */ h.jsx(g1, { value: l.value, onChange: u, isTouchSubmit: v, disabled: e }),
|
|
8248
8255
|
/* @__PURE__ */ h.jsx(
|
|
8249
|
-
|
|
8256
|
+
m1,
|
|
8250
8257
|
{
|
|
8251
8258
|
cardType: p,
|
|
8252
8259
|
value: a.value,
|
|
@@ -8256,8 +8263,8 @@ const Vr = [
|
|
|
8256
8263
|
}
|
|
8257
8264
|
)
|
|
8258
8265
|
] }),
|
|
8259
|
-
/* @__PURE__ */ h.jsx(
|
|
8260
|
-
t ? /* @__PURE__ */ h.jsx(
|
|
8266
|
+
/* @__PURE__ */ h.jsx(y1, { value: m.value, onChange: g, isTouchSubmit: v, disabled: e }),
|
|
8267
|
+
t ? /* @__PURE__ */ h.jsx(P1, { title: i.status.error }) : null,
|
|
8261
8268
|
/* @__PURE__ */ h.jsxs(
|
|
8262
8269
|
Ts,
|
|
8263
8270
|
{
|
|
@@ -8275,12 +8282,12 @@ const Vr = [
|
|
|
8275
8282
|
}
|
|
8276
8283
|
)
|
|
8277
8284
|
] });
|
|
8278
|
-
},
|
|
8285
|
+
}, j1 = {
|
|
8279
8286
|
appId: "",
|
|
8280
8287
|
teamId: "",
|
|
8281
8288
|
ev: null
|
|
8282
|
-
}, no = J(
|
|
8283
|
-
function
|
|
8289
|
+
}, no = J(j1), ro = () => N(no), Wn = J(null);
|
|
8290
|
+
function V1() {
|
|
8284
8291
|
if (typeof window > "u")
|
|
8285
8292
|
return null;
|
|
8286
8293
|
if (typeof Pe.useContext != "function")
|
|
@@ -8297,7 +8304,7 @@ function E1() {
|
|
|
8297
8304
|
J(
|
|
8298
8305
|
void 0
|
|
8299
8306
|
);
|
|
8300
|
-
class
|
|
8307
|
+
class R1 extends Promise {
|
|
8301
8308
|
async encrypt(t) {
|
|
8302
8309
|
return (await this).encrypt(t);
|
|
8303
8310
|
}
|
|
@@ -8305,10 +8312,10 @@ class j1 extends Promise {
|
|
|
8305
8312
|
return (await this).decrypt(t, n);
|
|
8306
8313
|
}
|
|
8307
8314
|
}
|
|
8308
|
-
const
|
|
8309
|
-
function
|
|
8315
|
+
const M1 = "https://js.evervault.com/v2";
|
|
8316
|
+
function I1(e) {
|
|
8310
8317
|
const t = document.createElement("script");
|
|
8311
|
-
e && e !== "" ? t.src = e : t.src =
|
|
8318
|
+
e && e !== "" ? t.src = e : t.src = M1;
|
|
8312
8319
|
const n = document.head || document.body;
|
|
8313
8320
|
if (!n)
|
|
8314
8321
|
throw new Error(
|
|
@@ -8317,7 +8324,7 @@ function R1(e) {
|
|
|
8317
8324
|
return n.appendChild(t), t;
|
|
8318
8325
|
}
|
|
8319
8326
|
let Cn = null;
|
|
8320
|
-
function
|
|
8327
|
+
function D1(e, t) {
|
|
8321
8328
|
return Cn !== null || (Cn = new Promise((n, r) => {
|
|
8322
8329
|
if (typeof window > "u") {
|
|
8323
8330
|
n(void 0);
|
|
@@ -8328,7 +8335,7 @@ function M1(e, t) {
|
|
|
8328
8335
|
return;
|
|
8329
8336
|
}
|
|
8330
8337
|
try {
|
|
8331
|
-
const i =
|
|
8338
|
+
const i = I1(e);
|
|
8332
8339
|
i.addEventListener("load", () => {
|
|
8333
8340
|
window.Evervault ? n(window.Evervault) : (t?.(), r(new Error("Evervault.js not available")));
|
|
8334
8341
|
}), i.addEventListener("error", () => {
|
|
@@ -8339,16 +8346,16 @@ function M1(e, t) {
|
|
|
8339
8346
|
}
|
|
8340
8347
|
})), Cn;
|
|
8341
8348
|
}
|
|
8342
|
-
function
|
|
8349
|
+
function L1(e, t) {
|
|
8343
8350
|
const n = Promise.resolve().then(
|
|
8344
|
-
() =>
|
|
8351
|
+
() => D1(e, t)
|
|
8345
8352
|
);
|
|
8346
8353
|
let r = !1;
|
|
8347
8354
|
return n.catch((i) => {
|
|
8348
8355
|
r || console.warn(i);
|
|
8349
8356
|
}), r = !0, n.then((i) => typeof window < "u" ? window.Evervault : i ?? void 0);
|
|
8350
8357
|
}
|
|
8351
|
-
const
|
|
8358
|
+
const N1 = ({
|
|
8352
8359
|
teamId: e,
|
|
8353
8360
|
appId: t,
|
|
8354
8361
|
customConfig: n,
|
|
@@ -8359,8 +8366,8 @@ const D1 = ({
|
|
|
8359
8366
|
if (typeof window > "u")
|
|
8360
8367
|
return /* @__PURE__ */ Pe.createElement(Wn.Provider, { value: null }, r);
|
|
8361
8368
|
const a = Pe.useMemo(
|
|
8362
|
-
() => new
|
|
8363
|
-
|
|
8369
|
+
() => new R1((o, l) => {
|
|
8370
|
+
L1(n?.jsSdkUrl, i).then((u) => {
|
|
8364
8371
|
u !== void 0 ? o(new u(e, t, n)) : (console.error("Evervault.js not available"), l("Evervault.js not available"));
|
|
8365
8372
|
}).catch((u) => l(u));
|
|
8366
8373
|
}),
|
|
@@ -8369,7 +8376,7 @@ const D1 = ({
|
|
|
8369
8376
|
return /* @__PURE__ */ Pe.createElement(Wn.Provider, { ...s, value: a }, r);
|
|
8370
8377
|
};
|
|
8371
8378
|
let _t = null;
|
|
8372
|
-
async function
|
|
8379
|
+
async function O1() {
|
|
8373
8380
|
return _t || (_t = new Promise((e, t) => {
|
|
8374
8381
|
const n = document.createElement("script");
|
|
8375
8382
|
if (n.src = "https://js.evervault.com/v2", n.onload = () => e(), n.onerror = () => {
|
|
@@ -8385,19 +8392,19 @@ async function io() {
|
|
|
8385
8392
|
if (window.Evervault)
|
|
8386
8393
|
return window.Evervault;
|
|
8387
8394
|
try {
|
|
8388
|
-
return await
|
|
8395
|
+
return await O1(), window.Evervault;
|
|
8389
8396
|
} catch {
|
|
8390
8397
|
throw new Error("Failed to load Evervault.js");
|
|
8391
8398
|
}
|
|
8392
8399
|
}
|
|
8393
|
-
async function
|
|
8400
|
+
async function B1(e, t, n) {
|
|
8394
8401
|
const r = await io();
|
|
8395
8402
|
return new r(e, t, n);
|
|
8396
8403
|
}
|
|
8397
8404
|
Promise.resolve().then(() => {
|
|
8398
8405
|
io();
|
|
8399
8406
|
});
|
|
8400
|
-
const
|
|
8407
|
+
const _1 = ({ children: e, evConfig: t }) => {
|
|
8401
8408
|
const [n, r] = j(null), i = ye(
|
|
8402
8409
|
() => ({
|
|
8403
8410
|
...t,
|
|
@@ -8406,12 +8413,12 @@ const O1 = ({ children: e, evConfig: t }) => {
|
|
|
8406
8413
|
[t, n]
|
|
8407
8414
|
);
|
|
8408
8415
|
return oe(() => {
|
|
8409
|
-
|
|
8410
|
-
}, [t]), /* @__PURE__ */ h.jsx(
|
|
8411
|
-
},
|
|
8412
|
-
googlePay:
|
|
8413
|
-
hidden:
|
|
8414
|
-
}, ds = "ab-ev-google-pay-container",
|
|
8416
|
+
B1(t.teamId, t.appId).then((s) => r(s)).catch(console.error);
|
|
8417
|
+
}, [t]), /* @__PURE__ */ h.jsx(N1, { ...t, children: /* @__PURE__ */ h.jsx(no.Provider, { value: i, children: e }) });
|
|
8418
|
+
}, F1 = "_googlePay_1a960_1", q1 = "_hidden_1a960_17", us = {
|
|
8419
|
+
googlePay: F1,
|
|
8420
|
+
hidden: q1
|
|
8421
|
+
}, ds = "ab-ev-google-pay-container", K1 = ({ onSubmit: e, onCancel: t, onError: n, onSuccess: r, onReady: i, transaction: s, locale: a }) => {
|
|
8415
8422
|
const { ev: o } = ro(), [l, u] = j(!1), [c, d] = j(null);
|
|
8416
8423
|
return oe(() => {
|
|
8417
8424
|
c && (t && c.on("cancel", t), n && c.on("error", n), r && c.on("success", r));
|
|
@@ -8444,10 +8451,10 @@ const O1 = ({ children: e, evConfig: t }) => {
|
|
|
8444
8451
|
console.error(p), u(!1), i?.();
|
|
8445
8452
|
}
|
|
8446
8453
|
}, [o, s, a, e, i]), /* @__PURE__ */ h.jsx("div", { id: ds, className: ke(us.googlePay, l ? void 0 : us.hidden) });
|
|
8447
|
-
},
|
|
8448
|
-
applePay:
|
|
8449
|
-
hidden:
|
|
8450
|
-
}, Tn = "ab-ev-apple-pay-container",
|
|
8454
|
+
}, z1 = "_applePay_2b2iv_1", U1 = "_hidden_2b2iv_17", hs = {
|
|
8455
|
+
applePay: z1,
|
|
8456
|
+
hidden: U1
|
|
8457
|
+
}, Tn = "ab-ev-apple-pay-container", $1 = ({
|
|
8451
8458
|
onSubmit: e,
|
|
8452
8459
|
onCancel: t,
|
|
8453
8460
|
onError: n,
|
|
@@ -8496,13 +8503,13 @@ const O1 = ({ children: e, evConfig: t }) => {
|
|
|
8496
8503
|
}
|
|
8497
8504
|
})();
|
|
8498
8505
|
}, [c, a, o, s, e, t, n, r, i]), /* @__PURE__ */ h.jsx("div", { id: Tn, className: ke(hs.applePay, l ? void 0 : hs.hidden) });
|
|
8499
|
-
},
|
|
8500
|
-
container:
|
|
8501
|
-
backBtn:
|
|
8502
|
-
cardBtn:
|
|
8503
|
-
btnContainer:
|
|
8504
|
-
spinner:
|
|
8505
|
-
spinnerContainer:
|
|
8506
|
+
}, G1 = "_container_a64yo_1", W1 = "_backBtn_a64yo_5", Y1 = "_cardBtn_a64yo_9", H1 = "_btnContainer_a64yo_13", Z1 = "_spinner_a64yo_17", X1 = "_spinnerContainer_a64yo_21", ge = {
|
|
8507
|
+
container: G1,
|
|
8508
|
+
backBtn: W1,
|
|
8509
|
+
cardBtn: Y1,
|
|
8510
|
+
btnContainer: H1,
|
|
8511
|
+
spinner: Z1,
|
|
8512
|
+
spinnerContainer: X1
|
|
8506
8513
|
};
|
|
8507
8514
|
/*!
|
|
8508
8515
|
* react-paypal-js v8.8.3 (2025-04-11T19:50:46.506Z)
|
|
@@ -8558,18 +8565,18 @@ var wt = "data-react-paypal-script-id", De = {
|
|
|
8558
8565
|
DATA_LIBRARY_VALUE: "react-paypal-js",
|
|
8559
8566
|
DATA_NAMESPACE: "dataNamespace",
|
|
8560
8567
|
DATA_SDK_INTEGRATION_SOURCE: "dataSdkIntegrationSource"
|
|
8561
|
-
},
|
|
8562
|
-
function
|
|
8568
|
+
}, J1 = "Failed to load the PayPal JS SDK script.", ao = "paypal", Q1 = "usePayPalScriptReducer must be used within a PayPalScriptProvider";
|
|
8569
|
+
function ep(e) {
|
|
8563
8570
|
return e === void 0 && (e = ao), window[e];
|
|
8564
8571
|
}
|
|
8565
|
-
function
|
|
8572
|
+
function tp(e) {
|
|
8566
8573
|
for (var t = "", n = 0; n < e.length; n++) {
|
|
8567
8574
|
var r = e[n].charCodeAt(0) * n;
|
|
8568
8575
|
e[n + 1] && (r += e[n + 1].charCodeAt(0) * (n - 1)), t += String.fromCharCode(97 + Math.abs(r) % 26);
|
|
8569
8576
|
}
|
|
8570
8577
|
return t;
|
|
8571
8578
|
}
|
|
8572
|
-
function
|
|
8579
|
+
function np(e) {
|
|
8573
8580
|
var t = e.reactComponentName, n = e.sdkComponentKey, r = e.sdkRequestedComponents, i = r === void 0 ? "" : r, s = e.sdkDataNamespace, a = s === void 0 ? ao : s, o = n.charAt(0).toUpperCase().concat(n.substring(1)), l = "Unable to render <".concat(t, " /> because window.").concat(a, ".").concat(o, " is undefined."), u = typeof i == "string" ? i : i.join(",");
|
|
8574
8581
|
if (!u.includes(n)) {
|
|
8575
8582
|
var c = [u, n].filter(Boolean).join();
|
|
@@ -8582,13 +8589,13 @@ function oo(e) {
|
|
|
8582
8589
|
var t = e, n = wt;
|
|
8583
8590
|
t[n];
|
|
8584
8591
|
var r = so(t, [n + ""]);
|
|
8585
|
-
return "react-paypal-js-".concat(
|
|
8592
|
+
return "react-paypal-js-".concat(tp(JSON.stringify(r)));
|
|
8586
8593
|
}
|
|
8587
|
-
function
|
|
8594
|
+
function rp(e) {
|
|
8588
8595
|
var t = self.document.querySelector("script[".concat(wt, '="').concat(e, '"]'));
|
|
8589
8596
|
t?.parentNode && t.parentNode.removeChild(t);
|
|
8590
8597
|
}
|
|
8591
|
-
function
|
|
8598
|
+
function ip(e, t) {
|
|
8592
8599
|
var n, r;
|
|
8593
8600
|
switch (t.type) {
|
|
8594
8601
|
case Ae.LOADING_STATUS:
|
|
@@ -8599,7 +8606,7 @@ function np(e, t) {
|
|
|
8599
8606
|
loadingStatus: t.value
|
|
8600
8607
|
});
|
|
8601
8608
|
case Ae.RESET_OPTIONS:
|
|
8602
|
-
return
|
|
8609
|
+
return rp(e.options[wt]), F(F({}, e), {
|
|
8603
8610
|
loadingStatus: ee.PENDING,
|
|
8604
8611
|
options: F(F((n = {}, n[De.DATA_SDK_INTEGRATION_SOURCE] = De.DATA_LIBRARY_VALUE, n), t.value), (r = {}, r[wt] = "".concat(oo(t.value)), r))
|
|
8605
8612
|
});
|
|
@@ -8612,13 +8619,13 @@ function np(e, t) {
|
|
|
8612
8619
|
}
|
|
8613
8620
|
}
|
|
8614
8621
|
var lo = J(null);
|
|
8615
|
-
function
|
|
8622
|
+
function sp(e) {
|
|
8616
8623
|
if (typeof e?.dispatch == "function" && e.dispatch.length !== 0)
|
|
8617
8624
|
return e;
|
|
8618
|
-
throw new Error(
|
|
8625
|
+
throw new Error(Q1);
|
|
8619
8626
|
}
|
|
8620
|
-
function
|
|
8621
|
-
var e =
|
|
8627
|
+
function ap() {
|
|
8628
|
+
var e = sp(N(lo)), t = F(F({}, e), {
|
|
8622
8629
|
isInitial: e.loadingStatus === ee.INITIAL,
|
|
8623
8630
|
isPending: e.loadingStatus === ee.PENDING,
|
|
8624
8631
|
isResolved: e.loadingStatus === ee.RESOLVED,
|
|
@@ -8627,7 +8634,7 @@ function ip() {
|
|
|
8627
8634
|
return [t, e.dispatch];
|
|
8628
8635
|
}
|
|
8629
8636
|
J({});
|
|
8630
|
-
function
|
|
8637
|
+
function op(e) {
|
|
8631
8638
|
var t = se(new Proxy({}, {
|
|
8632
8639
|
get: function(n, r, i) {
|
|
8633
8640
|
return typeof n[r] == "function" ? function() {
|
|
@@ -8642,7 +8649,7 @@ function sp(e) {
|
|
|
8642
8649
|
var Rr = function(e) {
|
|
8643
8650
|
var t, n = e.className, r = n === void 0 ? "" : n, i = e.disabled, s = i === void 0 ? !1 : i, a = e.children, o = e.forceReRender, l = o === void 0 ? [] : o, u = so(e, ["className", "disabled", "children", "forceReRender"]), c = s ? {
|
|
8644
8651
|
opacity: 0.38
|
|
8645
|
-
} : {}, d = "".concat(r, " ").concat(s ? "paypal-buttons-disabled" : "").trim(), p = se(null), f = se(null), m =
|
|
8652
|
+
} : {}, d = "".concat(r, " ").concat(s ? "paypal-buttons-disabled" : "").trim(), p = se(null), f = se(null), m = op(u), g = ap()[0], v = g.isResolved, y = g.options, C = j(null), x = C[0], P = C[1], T = j(!0), w = T[0], A = T[1], k = j(null), R = k[1];
|
|
8646
8653
|
function M() {
|
|
8647
8654
|
f.current !== null && f.current.close().catch(function() {
|
|
8648
8655
|
});
|
|
@@ -8652,10 +8659,10 @@ var Rr = function(e) {
|
|
|
8652
8659
|
}), oe(function() {
|
|
8653
8660
|
if (v === !1)
|
|
8654
8661
|
return M;
|
|
8655
|
-
var q =
|
|
8662
|
+
var q = ep(y.dataNamespace);
|
|
8656
8663
|
if (q === void 0 || q.Buttons === void 0)
|
|
8657
8664
|
return R(function() {
|
|
8658
|
-
throw new Error(
|
|
8665
|
+
throw new Error(np({
|
|
8659
8666
|
reactComponentName: Rr.displayName,
|
|
8660
8667
|
sdkComponentKey: "buttons",
|
|
8661
8668
|
sdkRequestedComponents: y.components,
|
|
@@ -8690,14 +8697,14 @@ var Rr = function(e) {
|
|
|
8690
8697
|
}) : a);
|
|
8691
8698
|
};
|
|
8692
8699
|
Rr.displayName = "PayPalButtons";
|
|
8693
|
-
function
|
|
8700
|
+
function lp(e, t) {
|
|
8694
8701
|
var n = {};
|
|
8695
8702
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
8696
8703
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++)
|
|
8697
8704
|
t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
8698
8705
|
return n;
|
|
8699
8706
|
}
|
|
8700
|
-
function
|
|
8707
|
+
function cp(e, t) {
|
|
8701
8708
|
var n = document.querySelector('script[src="'.concat(e, '"]'));
|
|
8702
8709
|
if (n === null) return null;
|
|
8703
8710
|
var r = co(e, t), i = n.cloneNode();
|
|
@@ -8708,38 +8715,38 @@ function op(e, t) {
|
|
|
8708
8715
|
i.dataset[a] !== r.dataset[a] && (s = !1);
|
|
8709
8716
|
}), s ? n : null;
|
|
8710
8717
|
}
|
|
8711
|
-
function
|
|
8718
|
+
function up(e) {
|
|
8712
8719
|
var t = e.url, n = e.attributes, r = e.onSuccess, i = e.onError, s = co(t, n);
|
|
8713
8720
|
s.onerror = i, s.onload = r, document.head.insertBefore(s, document.head.firstElementChild);
|
|
8714
8721
|
}
|
|
8715
|
-
function
|
|
8716
|
-
var t = e.sdkBaseUrl, n = e.environment, r =
|
|
8722
|
+
function dp(e) {
|
|
8723
|
+
var t = e.sdkBaseUrl, n = e.environment, r = lp(e, ["sdkBaseUrl", "environment"]), i = t || fp(n), s = r, a = Object.keys(s).filter(function(u) {
|
|
8717
8724
|
return typeof s[u] < "u" && s[u] !== null && s[u] !== "";
|
|
8718
8725
|
}).reduce(function(u, c) {
|
|
8719
8726
|
var d = s[c].toString();
|
|
8720
|
-
return c =
|
|
8727
|
+
return c = hp(c), c.substring(0, 4) === "data" || c === "crossorigin" ? u.attributes[c] = d : u.queryParams[c] = d, u;
|
|
8721
8728
|
}, {
|
|
8722
8729
|
queryParams: {},
|
|
8723
8730
|
attributes: {}
|
|
8724
8731
|
}), o = a.queryParams, l = a.attributes;
|
|
8725
8732
|
return o["merchant-id"] && o["merchant-id"].indexOf(",") !== -1 && (l["data-merchant-id"] = o["merchant-id"], o["merchant-id"] = "*"), {
|
|
8726
|
-
url: "".concat(i, "?").concat(
|
|
8733
|
+
url: "".concat(i, "?").concat(pp(o)),
|
|
8727
8734
|
attributes: l
|
|
8728
8735
|
};
|
|
8729
8736
|
}
|
|
8730
|
-
function
|
|
8737
|
+
function hp(e) {
|
|
8731
8738
|
var t = function(n, r) {
|
|
8732
8739
|
return (r ? "-" : "") + n.toLowerCase();
|
|
8733
8740
|
};
|
|
8734
8741
|
return e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, t);
|
|
8735
8742
|
}
|
|
8736
|
-
function
|
|
8743
|
+
function pp(e) {
|
|
8737
8744
|
var t = "";
|
|
8738
8745
|
return Object.keys(e).forEach(function(n) {
|
|
8739
8746
|
t.length !== 0 && (t += "&"), t += n + "=" + e[n];
|
|
8740
8747
|
}), t;
|
|
8741
8748
|
}
|
|
8742
|
-
function
|
|
8749
|
+
function fp(e) {
|
|
8743
8750
|
return e === "sandbox" ? "https://www.sandbox.paypal.com/sdk/js" : "https://www.paypal.com/sdk/js";
|
|
8744
8751
|
}
|
|
8745
8752
|
function co(e, t) {
|
|
@@ -8749,10 +8756,10 @@ function co(e, t) {
|
|
|
8749
8756
|
n.setAttribute(r, t[r]), r === "data-csp-nonce" && n.setAttribute("nonce", t["data-csp-nonce"]);
|
|
8750
8757
|
}), n;
|
|
8751
8758
|
}
|
|
8752
|
-
function
|
|
8759
|
+
function mp(e, t) {
|
|
8753
8760
|
if (t === void 0 && (t = Promise), uo(e, t), typeof document > "u") return t.resolve(null);
|
|
8754
|
-
var n =
|
|
8755
|
-
return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"),
|
|
8761
|
+
var n = dp(e), r = n.url, i = n.attributes, s = i["data-namespace"] || "paypal", a = ms(s);
|
|
8762
|
+
return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), cp(r, i) && a ? t.resolve(a) : gp({
|
|
8756
8763
|
url: r,
|
|
8757
8764
|
attributes: i
|
|
8758
8765
|
}, t).then(function() {
|
|
@@ -8762,7 +8769,7 @@ function pp(e, t) {
|
|
|
8762
8769
|
throw new Error("The window.".concat(s, " global variable is not available."));
|
|
8763
8770
|
});
|
|
8764
8771
|
}
|
|
8765
|
-
function
|
|
8772
|
+
function gp(e, t) {
|
|
8766
8773
|
t === void 0 && (t = Promise), uo(e, t);
|
|
8767
8774
|
var n = e.url, r = e.attributes;
|
|
8768
8775
|
if (typeof n != "string" || n.length === 0)
|
|
@@ -8771,7 +8778,7 @@ function fp(e, t) {
|
|
|
8771
8778
|
throw new Error("Expected attributes to be an object.");
|
|
8772
8779
|
return new t(function(i, s) {
|
|
8773
8780
|
if (typeof document > "u") return i();
|
|
8774
|
-
|
|
8781
|
+
up({
|
|
8775
8782
|
url: n,
|
|
8776
8783
|
attributes: r,
|
|
8777
8784
|
onSuccess: function() {
|
|
@@ -8796,10 +8803,10 @@ function uo(e, t) {
|
|
|
8796
8803
|
if (typeof t < "u" && typeof t != "function")
|
|
8797
8804
|
throw new Error("Expected PromisePonyfill to be a function.");
|
|
8798
8805
|
}
|
|
8799
|
-
var
|
|
8806
|
+
var yp = function(e) {
|
|
8800
8807
|
var t, n = e.options, r = n === void 0 ? {
|
|
8801
8808
|
clientId: "test"
|
|
8802
|
-
} : n, i = e.children, s = e.deferLoading, a = s === void 0 ? !1 : s, o = bo(
|
|
8809
|
+
} : n, i = e.children, s = e.deferLoading, a = s === void 0 ? !1 : s, o = bo(ip, {
|
|
8803
8810
|
options: F(F({}, r), (t = {}, t[De.DATA_JS_SDK_LIBRARY] = De.DATA_LIBRARY_VALUE, t[De.DATA_SDK_INTEGRATION_SOURCE] = De.DATA_LIBRARY_VALUE, t[wt] = "".concat(oo(r)), t)),
|
|
8804
8811
|
loadingStatus: a ? ee.INITIAL : ee.PENDING
|
|
8805
8812
|
}), l = o[0], u = o[1];
|
|
@@ -8811,13 +8818,13 @@ var mp = function(e) {
|
|
|
8811
8818
|
});
|
|
8812
8819
|
if (l.loadingStatus === ee.PENDING) {
|
|
8813
8820
|
var c = !0;
|
|
8814
|
-
return
|
|
8821
|
+
return mp(l.options).then(function() {
|
|
8815
8822
|
c && u({
|
|
8816
8823
|
type: Ae.LOADING_STATUS,
|
|
8817
8824
|
value: ee.RESOLVED
|
|
8818
8825
|
});
|
|
8819
8826
|
}).catch(function(d) {
|
|
8820
|
-
console.error("".concat(
|
|
8827
|
+
console.error("".concat(J1, " ").concat(d)), c && u({
|
|
8821
8828
|
type: Ae.LOADING_STATUS,
|
|
8822
8829
|
value: {
|
|
8823
8830
|
state: ee.REJECTED,
|
|
@@ -8843,9 +8850,9 @@ J({
|
|
|
8843
8850
|
unregisterField: gs
|
|
8844
8851
|
// implementation is inside hook and passed through the provider
|
|
8845
8852
|
});
|
|
8846
|
-
const
|
|
8847
|
-
paypalBtn:
|
|
8848
|
-
},
|
|
8853
|
+
const vp = "_paypalBtn_2m8yd_1", bp = {
|
|
8854
|
+
paypalBtn: vp
|
|
8855
|
+
}, xp = ({ onCreate: e, onApprove: t, transaction: n }) => /* @__PURE__ */ h.jsx("div", { className: bp.paypalBtn, children: /* @__PURE__ */ h.jsx(yp, { options: { clientId: "test", vault: !0 }, children: /* @__PURE__ */ h.jsx(
|
|
8849
8856
|
Rr,
|
|
8850
8857
|
{
|
|
8851
8858
|
style: { layout: "vertical", tagline: !1, height: 40, borderRadius: 12 },
|
|
@@ -8855,19 +8862,19 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
8855
8862
|
r && t(r);
|
|
8856
8863
|
}
|
|
8857
8864
|
}
|
|
8858
|
-
) }) }),
|
|
8865
|
+
) }) }), Cp = (e) => !e || !e.amount || !e.currency || !e.country || !e.merchantId || e.checkoutConfig && !e.checkoutConfig?.find(({ is_active: n, type: r }) => n && r === "google-pay") ? null : {
|
|
8859
8866
|
amount: e.amount,
|
|
8860
8867
|
currency: e.currency,
|
|
8861
8868
|
country: e.country,
|
|
8862
8869
|
merchantId: e.merchantId,
|
|
8863
8870
|
lineItems: []
|
|
8864
|
-
},
|
|
8871
|
+
}, Tp = (e) => !e || !e.amount || !e.currency || !e.country || !e.merchantId || e.checkoutConfig && !e.checkoutConfig?.find(({ is_active: n, type: r }) => n && r === "apple-pay") ? null : {
|
|
8865
8872
|
amount: e.amount,
|
|
8866
8873
|
currency: e.currency,
|
|
8867
8874
|
country: e.country,
|
|
8868
8875
|
merchantId: e.merchantId,
|
|
8869
8876
|
lineItems: e.applePayInfo?.lineItems || []
|
|
8870
|
-
},
|
|
8877
|
+
}, wp = (e) => !e || !e.amount || !e.currency || !e.country || !e.merchantId || e.checkoutConfig && !e.checkoutConfig.find(({ is_active: n, type: r }) => n && r === "paypal") ? null : {
|
|
8871
8878
|
intent: "TOKENIZE",
|
|
8872
8879
|
purchase_units: [
|
|
8873
8880
|
{
|
|
@@ -8878,7 +8885,7 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
8878
8885
|
reference_id: e.merchantId
|
|
8879
8886
|
}
|
|
8880
8887
|
]
|
|
8881
|
-
},
|
|
8888
|
+
}, kp = (e = []) => e.reduce((t, n) => {
|
|
8882
8889
|
switch (n) {
|
|
8883
8890
|
case Z.Visa:
|
|
8884
8891
|
return t.push("visa"), t;
|
|
@@ -8895,12 +8902,12 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
8895
8902
|
default:
|
|
8896
8903
|
return t;
|
|
8897
8904
|
}
|
|
8898
|
-
}, []),
|
|
8899
|
-
const i =
|
|
8905
|
+
}, []), Pp = ({ onError: e, onSubmit: t, onReset: n, clientToken: r }) => {
|
|
8906
|
+
const i = V1(), s = gl(), [a, o] = j(!1), [l, u] = j(!1), [c, d] = j(!1), [p, f] = j(!1), { googlePay: m, applePay: g, paypal: v } = ye(
|
|
8900
8907
|
() => ({
|
|
8901
|
-
googlePay:
|
|
8902
|
-
applePay:
|
|
8903
|
-
paypal:
|
|
8908
|
+
googlePay: Cp(s),
|
|
8909
|
+
applePay: Tp(s),
|
|
8910
|
+
paypal: wp(s)
|
|
8904
8911
|
}),
|
|
8905
8912
|
[s]
|
|
8906
8913
|
);
|
|
@@ -8914,14 +8921,14 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
8914
8921
|
async (V) => {
|
|
8915
8922
|
if (!i) return;
|
|
8916
8923
|
n?.();
|
|
8917
|
-
const U = await i?.encrypt(V.number), Q = await i?.encrypt(V.cvc), [
|
|
8924
|
+
const U = await i?.encrypt(V.number), Q = await i?.encrypt(V.cvc), [fe, me] = V.expiry.split("/");
|
|
8918
8925
|
t({
|
|
8919
8926
|
clientSession: r,
|
|
8920
8927
|
card: {
|
|
8921
8928
|
firstSixDigits: V.number.slice(0, 6),
|
|
8922
8929
|
lastFourDigits: V.number.slice(-4),
|
|
8923
|
-
expMonth: Number(
|
|
8924
|
-
expYear: Number(
|
|
8930
|
+
expMonth: Number(fe),
|
|
8931
|
+
expYear: Number(me),
|
|
8925
8932
|
cardBrand: V.cardBrand || "",
|
|
8926
8933
|
number: U,
|
|
8927
8934
|
cvc: Q,
|
|
@@ -8966,7 +8973,7 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
8966
8973
|
d(!0);
|
|
8967
8974
|
}, []), k = D(async () => {
|
|
8968
8975
|
const V = await Ao(r);
|
|
8969
|
-
if (
|
|
8976
|
+
if (V.error) {
|
|
8970
8977
|
const U = V.error || "Paypal request failed";
|
|
8971
8978
|
throw e(U), U;
|
|
8972
8979
|
}
|
|
@@ -9005,31 +9012,31 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9005
9012
|
handlePayPalCreate: k,
|
|
9006
9013
|
handlePayPal: R
|
|
9007
9014
|
};
|
|
9008
|
-
},
|
|
9015
|
+
}, Ap = {
|
|
9009
9016
|
initial: { y: 100, opacity: 0 },
|
|
9010
9017
|
animate: { y: 0, opacity: 1, transition: { type: "spring", stiffness: 80, damping: 20 } },
|
|
9011
9018
|
exit: { y: 100, opacity: 0, transition: { duration: 0.3 } },
|
|
9012
9019
|
open: { y: 0, opacity: 1, transition: { type: "spring", stiffness: 80, damping: 20, delay: 0.3 } },
|
|
9013
9020
|
close: { y: 100, opacity: 0, display: "none", transition: { duration: 0.3 } }
|
|
9014
|
-
},
|
|
9021
|
+
}, Sp = {
|
|
9015
9022
|
initial: { y: -100, opacity: 0 },
|
|
9016
9023
|
animate: { y: 0, opacity: 1, transition: { type: "spring", stiffness: 80, damping: 20 } },
|
|
9017
9024
|
exit: { y: -100, opacity: 0, transition: { duration: 0.3 } },
|
|
9018
9025
|
open: { y: 0, opacity: 1, transition: { type: "spring", stiffness: 80, damping: 20, delay: 0.3 } },
|
|
9019
9026
|
close: { y: -100, opacity: 0, display: "none", transition: { duration: 0.3 } }
|
|
9020
|
-
},
|
|
9027
|
+
}, Ep = {
|
|
9021
9028
|
initial: { y: 100, opacity: 0 },
|
|
9022
9029
|
animate: { y: 0, opacity: 1, transition: { type: "spring", stiffness: 80, damping: 20 } }
|
|
9023
9030
|
}, Ft = {
|
|
9024
|
-
variants:
|
|
9025
|
-
btnVariants:
|
|
9026
|
-
success:
|
|
9027
|
-
},
|
|
9028
|
-
container:
|
|
9029
|
-
icon:
|
|
9030
|
-
iconContainer:
|
|
9031
|
-
title:
|
|
9032
|
-
},
|
|
9031
|
+
variants: Ap,
|
|
9032
|
+
btnVariants: Sp,
|
|
9033
|
+
success: Ep
|
|
9034
|
+
}, jp = "_container_ipway_1", Vp = "_icon_ipway_5", Rp = "_iconContainer_ipway_9", Mp = "_title_ipway_13", qt = {
|
|
9035
|
+
container: jp,
|
|
9036
|
+
icon: Vp,
|
|
9037
|
+
iconContainer: Rp,
|
|
9038
|
+
title: Mp
|
|
9039
|
+
}, Ip = ({ title: e }) => /* @__PURE__ */ h.jsxs("div", { className: qt.container, children: [
|
|
9033
9040
|
/* @__PURE__ */ h.jsx("div", { className: qt.iconContainer, children: /* @__PURE__ */ h.jsx(
|
|
9034
9041
|
"svg",
|
|
9035
9042
|
{
|
|
@@ -9053,7 +9060,7 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9053
9060
|
}
|
|
9054
9061
|
) }),
|
|
9055
9062
|
/* @__PURE__ */ h.jsx("div", { className: qt.title, children: e })
|
|
9056
|
-
] }),
|
|
9063
|
+
] }), Dp = (e) => ({
|
|
9057
9064
|
ar: "ar-AB",
|
|
9058
9065
|
en: "en-GB",
|
|
9059
9066
|
cs: "cs-CZ",
|
|
@@ -9082,7 +9089,7 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9082
9089
|
tr: "tr-TR",
|
|
9083
9090
|
vi: "vi-VN",
|
|
9084
9091
|
zh: "zh-CN"
|
|
9085
|
-
})[e] || "en-US",
|
|
9092
|
+
})[e] || "en-US", Lp = (e) => ({
|
|
9086
9093
|
en: "en",
|
|
9087
9094
|
ar: "ar",
|
|
9088
9095
|
cs: "cs",
|
|
@@ -9106,7 +9113,7 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9106
9113
|
th: "th",
|
|
9107
9114
|
tr: "tr",
|
|
9108
9115
|
zh: "zh"
|
|
9109
|
-
})[e] || "en",
|
|
9116
|
+
})[e] || "en", Np = ({
|
|
9110
9117
|
onSubmit: e,
|
|
9111
9118
|
onError: t,
|
|
9112
9119
|
onReset: n,
|
|
@@ -9135,8 +9142,8 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9135
9142
|
googlePay: M,
|
|
9136
9143
|
applePay: q,
|
|
9137
9144
|
paypal: V
|
|
9138
|
-
} =
|
|
9139
|
-
|
|
9145
|
+
} = Pp({ onSubmit: e, onError: t, onReset: n, clientToken: o }), U = /* @__PURE__ */ h.jsx(
|
|
9146
|
+
E1,
|
|
9140
9147
|
{
|
|
9141
9148
|
isFetching: a,
|
|
9142
9149
|
isFail: !!i,
|
|
@@ -9146,35 +9153,35 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9146
9153
|
"card"
|
|
9147
9154
|
), Q = {
|
|
9148
9155
|
"apple-pay": q ? /* @__PURE__ */ h.jsx(
|
|
9149
|
-
|
|
9156
|
+
$1,
|
|
9150
9157
|
{
|
|
9151
9158
|
onError: T,
|
|
9152
9159
|
onSubmit: p,
|
|
9153
9160
|
onReady: x,
|
|
9154
9161
|
transaction: q,
|
|
9155
|
-
locale:
|
|
9156
|
-
supportedCardTypes: l &&
|
|
9162
|
+
locale: Dp(c),
|
|
9163
|
+
supportedCardTypes: l && kp(l)
|
|
9157
9164
|
},
|
|
9158
9165
|
"apple-pay"
|
|
9159
9166
|
) : null,
|
|
9160
9167
|
"google-pay": M ? /* @__PURE__ */ h.jsx(
|
|
9161
|
-
|
|
9168
|
+
K1,
|
|
9162
9169
|
{
|
|
9163
9170
|
onError: w,
|
|
9164
9171
|
onSubmit: g,
|
|
9165
9172
|
onReady: P,
|
|
9166
|
-
locale:
|
|
9173
|
+
locale: Lp(c),
|
|
9167
9174
|
transaction: M
|
|
9168
9175
|
},
|
|
9169
9176
|
"google-pay"
|
|
9170
9177
|
) : null,
|
|
9171
|
-
paypal: V ? /* @__PURE__ */ h.jsx(
|
|
9178
|
+
paypal: V ? /* @__PURE__ */ h.jsx(xp, { transaction: V, onCreate: v, onApprove: y }, "paypal") : null,
|
|
9172
9179
|
card: s === "compact" ? /* @__PURE__ */ h.jsxs(Ts, { color: "success", onClick: m, className: ge.cardBtn, children: [
|
|
9173
|
-
/* @__PURE__ */ h.jsx(
|
|
9180
|
+
/* @__PURE__ */ h.jsx(Lh, {}),
|
|
9174
9181
|
u.card.compact.button
|
|
9175
9182
|
] }, "card") : null
|
|
9176
9183
|
};
|
|
9177
|
-
return r ? /* @__PURE__ */ h.jsx(mt.div, { variants: Ft.success, animate: "animate", initial: Ft.success.initial, children: /* @__PURE__ */ h.jsx(
|
|
9184
|
+
return r ? /* @__PURE__ */ h.jsx(mt.div, { variants: Ft.success, animate: "animate", initial: Ft.success.initial, children: /* @__PURE__ */ h.jsx(Ip, { title: u.status.success }) }) : s === "compact" ? /* @__PURE__ */ h.jsxs("div", { className: ge.container, dir: d, children: [
|
|
9178
9185
|
A ? null : /* @__PURE__ */ h.jsx("div", { className: ge.spinnerContainer, children: /* @__PURE__ */ h.jsx(Gn, { className: ge.spinner }) }),
|
|
9179
9186
|
/* @__PURE__ */ h.jsxs(
|
|
9180
9187
|
"div",
|
|
@@ -9198,7 +9205,7 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9198
9205
|
height: "auto"
|
|
9199
9206
|
},
|
|
9200
9207
|
className: ge.btnContainer,
|
|
9201
|
-
children: R?.checkoutConfig.map(({ type:
|
|
9208
|
+
children: R?.checkoutConfig.map(({ type: fe, is_active: me }) => me && Q[fe] || null)
|
|
9202
9209
|
},
|
|
9203
9210
|
"btnVariants"
|
|
9204
9211
|
),
|
|
@@ -9213,7 +9220,7 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9213
9220
|
height: "auto"
|
|
9214
9221
|
},
|
|
9215
9222
|
children: [
|
|
9216
|
-
/* @__PURE__ */ h.jsx("div", { onClick: f, className: ge.backBtn, children: /* @__PURE__ */ h.jsx(
|
|
9223
|
+
/* @__PURE__ */ h.jsx("div", { onClick: f, className: ge.backBtn, children: /* @__PURE__ */ h.jsx(Mh, {}) }),
|
|
9217
9224
|
U
|
|
9218
9225
|
]
|
|
9219
9226
|
},
|
|
@@ -9225,11 +9232,11 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9225
9232
|
] }) : /* @__PURE__ */ h.jsxs("div", { className: ge.container, dir: d, children: [
|
|
9226
9233
|
A ? null : /* @__PURE__ */ h.jsx("div", { className: ge.spinnerContainer, children: /* @__PURE__ */ h.jsx(Gn, { className: ge.spinner }) }),
|
|
9227
9234
|
/* @__PURE__ */ h.jsxs("div", { style: { display: A ? "block" : "none" }, children: [
|
|
9228
|
-
R?.checkoutConfig.map(({ type:
|
|
9235
|
+
R?.checkoutConfig.map(({ type: fe, is_active: me }) => me && Q[fe] || null),
|
|
9229
9236
|
U
|
|
9230
9237
|
] })
|
|
9231
9238
|
] });
|
|
9232
|
-
},
|
|
9239
|
+
}, _p = ({
|
|
9233
9240
|
clientToken: e,
|
|
9234
9241
|
evConfig: t,
|
|
9235
9242
|
translate: n,
|
|
@@ -9247,8 +9254,8 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9247
9254
|
onCheckoutComplete: o,
|
|
9248
9255
|
onCheckoutFail: l
|
|
9249
9256
|
});
|
|
9250
|
-
return /* @__PURE__ */ h.jsx(xo, { children: /* @__PURE__ */ h.jsx(
|
|
9251
|
-
|
|
9257
|
+
return /* @__PURE__ */ h.jsx(xo, { children: /* @__PURE__ */ h.jsx(_1, { evConfig: t, children: /* @__PURE__ */ h.jsx(fl, { translate: n, locale: i, children: /* @__PURE__ */ h.jsx(yl, { clientToken: e, children: /* @__PURE__ */ h.jsx(h1, { styles: a, children: /* @__PURE__ */ h.jsx(
|
|
9258
|
+
Np,
|
|
9252
9259
|
{
|
|
9253
9260
|
clientToken: e,
|
|
9254
9261
|
variant: r,
|
|
@@ -9263,9 +9270,9 @@ const gp = "_paypalBtn_2m8yd_1", yp = {
|
|
|
9263
9270
|
) }) }) }) }) });
|
|
9264
9271
|
};
|
|
9265
9272
|
export {
|
|
9266
|
-
|
|
9273
|
+
_p as AblePayModule,
|
|
9267
9274
|
Z as CardType,
|
|
9268
|
-
|
|
9275
|
+
_p as CheckoutForm,
|
|
9269
9276
|
z as InputError,
|
|
9270
9277
|
Vr as cardTypes
|
|
9271
9278
|
};
|