renderloom 1.0.5 → 1.0.6
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/renderloom.css +1 -1
- package/dist/renderloom.js +698 -692
- package/dist/renderloom.js.map +1 -1
- package/dist/renderloom.umd.cjs +5 -5
- package/dist/renderloom.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/renderloom.js
CHANGED
|
@@ -152,7 +152,7 @@ function Oa() {
|
|
|
152
152
|
"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."
|
|
153
153
|
)), v = this.props.ref, v !== void 0 ? v : null;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function d(v, R, $, Y, Z, ee) {
|
|
156
156
|
var G = $.ref;
|
|
157
157
|
return v = {
|
|
158
158
|
$$typeof: g,
|
|
@@ -185,7 +185,7 @@ function Oa() {
|
|
|
185
185
|
value: ee
|
|
186
186
|
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function u(v, R, $, Y, Z, ee) {
|
|
189
189
|
var G = R.children;
|
|
190
190
|
if (G !== void 0)
|
|
191
191
|
if (Y)
|
|
@@ -224,7 +224,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
224
224
|
return G && a(
|
|
225
225
|
$,
|
|
226
226
|
typeof v == "function" ? v.displayName || v.name || "Unknown" : v
|
|
227
|
-
),
|
|
227
|
+
), d(
|
|
228
228
|
v,
|
|
229
229
|
G,
|
|
230
230
|
$,
|
|
@@ -253,7 +253,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
253
253
|
)(), Q = q(n(o)), N = {};
|
|
254
254
|
at.Fragment = y, at.jsx = function(v, R, $) {
|
|
255
255
|
var Y = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
256
|
-
return
|
|
256
|
+
return u(
|
|
257
257
|
v,
|
|
258
258
|
R,
|
|
259
259
|
$,
|
|
@@ -263,7 +263,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
263
263
|
);
|
|
264
264
|
}, at.jsxs = function(v, R, $) {
|
|
265
265
|
var Y = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
266
|
-
return
|
|
266
|
+
return u(
|
|
267
267
|
v,
|
|
268
268
|
R,
|
|
269
269
|
$,
|
|
@@ -343,7 +343,7 @@ const Ua = en(
|
|
|
343
343
|
...a
|
|
344
344
|
},
|
|
345
345
|
[
|
|
346
|
-
...i.map(([
|
|
346
|
+
...i.map(([d, u]) => Ut(d, u)),
|
|
347
347
|
...Array.isArray(o) ? o : [o]
|
|
348
348
|
]
|
|
349
349
|
)
|
|
@@ -503,18 +503,18 @@ const cl = [
|
|
|
503
503
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
504
504
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
505
505
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
506
|
-
],
|
|
506
|
+
], dl = K("file-text", cl);
|
|
507
507
|
/**
|
|
508
508
|
* @license lucide-react v0.562.0 - ISC
|
|
509
509
|
*
|
|
510
510
|
* This source code is licensed under the ISC license.
|
|
511
511
|
* See the LICENSE file in the root directory of this source tree.
|
|
512
512
|
*/
|
|
513
|
-
const
|
|
513
|
+
const ul = [
|
|
514
514
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
515
515
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
516
516
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
517
|
-
], Kt = K("info",
|
|
517
|
+
], Kt = K("info", ul);
|
|
518
518
|
/**
|
|
519
519
|
* @license lucide-react v0.562.0 - ISC
|
|
520
520
|
*
|
|
@@ -727,12 +727,12 @@ class cn {
|
|
|
727
727
|
this.subscriptions.length = 0;
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
|
-
const
|
|
730
|
+
const ue = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, he = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
|
|
731
731
|
function Vi(e, t) {
|
|
732
732
|
return t ? e * (1e3 / t) : 0;
|
|
733
733
|
}
|
|
734
734
|
const Wn = /* @__PURE__ */ new Set();
|
|
735
|
-
function
|
|
735
|
+
function dn(e, t, s) {
|
|
736
736
|
e || Wn.has(t) || (console.warn(Ns(t, s)), Wn.add(t));
|
|
737
737
|
}
|
|
738
738
|
const Ri = (e, t, s) => (((1 - 3 * s + 3 * t) * e + (3 * s - 6 * t)) * e + 3 * t) * e, El = 1e-7, Vl = 12;
|
|
@@ -749,7 +749,7 @@ function bt(e, t, s, n) {
|
|
|
749
749
|
const r = (o) => Rl(o, 0, 1, e, s);
|
|
750
750
|
return (o) => o === 0 || o === 1 ? o : Ri(r(o), t, n);
|
|
751
751
|
}
|
|
752
|
-
const Di = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Li = (e) => (t) => 1 - e(1 - t), Ii = /* @__PURE__ */ bt(0.33, 1.53, 0.69, 0.99),
|
|
752
|
+
const Di = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Li = (e) => (t) => 1 - e(1 - t), Ii = /* @__PURE__ */ bt(0.33, 1.53, 0.69, 0.99), un = /* @__PURE__ */ Li(Ii), zi = /* @__PURE__ */ Di(un), Oi = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? 0.5 * un(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), fn = (e) => 1 - Math.sin(Math.acos(e)), Fi = Li(fn), Bi = Di(fn), Dl = /* @__PURE__ */ bt(0.42, 0, 1, 1), Ll = /* @__PURE__ */ bt(0, 0, 0.58, 1), _i = /* @__PURE__ */ bt(0.42, 0, 0.58, 1), Il = (e) => Array.isArray(e) && typeof e[0] != "number", $i = (e) => Array.isArray(e) && typeof e[0] == "number", Un = {
|
|
753
753
|
linear: me,
|
|
754
754
|
easeIn: Dl,
|
|
755
755
|
easeInOut: _i,
|
|
@@ -757,7 +757,7 @@ const Di = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Li
|
|
|
757
757
|
circIn: fn,
|
|
758
758
|
circInOut: Bi,
|
|
759
759
|
circOut: Fi,
|
|
760
|
-
backIn:
|
|
760
|
+
backIn: un,
|
|
761
761
|
backInOut: zi,
|
|
762
762
|
backOut: Ii,
|
|
763
763
|
anticipate: Oi
|
|
@@ -795,37 +795,37 @@ function Ol(e, t) {
|
|
|
795
795
|
timestamp: 0,
|
|
796
796
|
isProcessing: !1
|
|
797
797
|
};
|
|
798
|
-
function c(
|
|
799
|
-
i.has(
|
|
798
|
+
function c(u) {
|
|
799
|
+
i.has(u) && (d.schedule(u), e()), u(a);
|
|
800
800
|
}
|
|
801
|
-
const
|
|
801
|
+
const d = {
|
|
802
802
|
/**
|
|
803
803
|
* Schedule a process to run on the next frame.
|
|
804
804
|
*/
|
|
805
|
-
schedule: (
|
|
805
|
+
schedule: (u, f = !1, h = !1) => {
|
|
806
806
|
const g = h && r ? s : n;
|
|
807
|
-
return f && i.add(
|
|
807
|
+
return f && i.add(u), g.add(u), u;
|
|
808
808
|
},
|
|
809
809
|
/**
|
|
810
810
|
* Cancel the provided callback from running on the next frame.
|
|
811
811
|
*/
|
|
812
|
-
cancel: (
|
|
813
|
-
n.delete(
|
|
812
|
+
cancel: (u) => {
|
|
813
|
+
n.delete(u), i.delete(u);
|
|
814
814
|
},
|
|
815
815
|
/**
|
|
816
816
|
* Execute all schedule callbacks.
|
|
817
817
|
*/
|
|
818
|
-
process: (
|
|
819
|
-
if (a =
|
|
818
|
+
process: (u) => {
|
|
819
|
+
if (a = u, r) {
|
|
820
820
|
o = !0;
|
|
821
821
|
return;
|
|
822
822
|
}
|
|
823
823
|
r = !0;
|
|
824
824
|
const f = s;
|
|
825
|
-
s = n, n = f, s.forEach(c), s.clear(), r = !1, o && (o = !1,
|
|
825
|
+
s = n, n = f, s.forEach(c), s.clear(), r = !1, o && (o = !1, d.process(u));
|
|
826
826
|
}
|
|
827
827
|
};
|
|
828
|
-
return
|
|
828
|
+
return d;
|
|
829
829
|
}
|
|
830
830
|
const Fl = 40;
|
|
831
831
|
function Wi(e, t) {
|
|
@@ -834,9 +834,9 @@ function Wi(e, t) {
|
|
|
834
834
|
delta: 0,
|
|
835
835
|
timestamp: 0,
|
|
836
836
|
isProcessing: !1
|
|
837
|
-
}, o = () => s = !0, i = At.reduce((x, j) => (x[j] = Ol(o), x), {}), { setup: a, read: c, resolveKeyframes:
|
|
837
|
+
}, o = () => s = !0, i = At.reduce((x, j) => (x[j] = Ol(o), x), {}), { setup: a, read: c, resolveKeyframes: d, preUpdate: u, update: f, preRender: h, render: m, postRender: g } = i, p = () => {
|
|
838
838
|
const x = Le.useManualTiming, j = x ? r.timestamp : performance.now();
|
|
839
|
-
s = !1, x || (r.delta = n ? 1e3 / 60 : Math.max(Math.min(j - r.timestamp, Fl), 1)), r.timestamp = j, r.isProcessing = !0, a.process(r), c.process(r),
|
|
839
|
+
s = !1, x || (r.delta = n ? 1e3 / 60 : Math.max(Math.min(j - r.timestamp, Fl), 1)), r.timestamp = j, r.isProcessing = !0, a.process(r), c.process(r), d.process(r), u.process(r), f.process(r), h.process(r), m.process(r), g.process(r), r.isProcessing = !1, s && t && (n = !1, e(p));
|
|
840
840
|
}, y = () => {
|
|
841
841
|
s = !0, n = !0, r.isProcessing || e(p);
|
|
842
842
|
};
|
|
@@ -848,7 +848,7 @@ function Wi(e, t) {
|
|
|
848
848
|
i[At[j]].cancel(x);
|
|
849
849
|
}, state: r, steps: i };
|
|
850
850
|
}
|
|
851
|
-
const { schedule: F, cancel: Ie, state: ie, steps:
|
|
851
|
+
const { schedule: F, cancel: Ie, state: ie, steps: us } = /* @__PURE__ */ Wi(typeof requestAnimationFrame < "u" ? requestAnimationFrame : me, !0);
|
|
852
852
|
let Lt;
|
|
853
853
|
function Bl() {
|
|
854
854
|
Lt = void 0;
|
|
@@ -872,7 +872,7 @@ const nt = {
|
|
|
872
872
|
}, Nt = {
|
|
873
873
|
...nt,
|
|
874
874
|
default: 1
|
|
875
|
-
},
|
|
875
|
+
}, ut = (e) => Math.round(e * 1e5) / 1e5, mn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
876
876
|
function Wl(e) {
|
|
877
877
|
return e == null;
|
|
878
878
|
}
|
|
@@ -892,7 +892,7 @@ const Ul = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
892
892
|
}, $e = {
|
|
893
893
|
test: /* @__PURE__ */ pn("rgb", "red"),
|
|
894
894
|
parse: /* @__PURE__ */ Ki("red", "green", "blue"),
|
|
895
|
-
transform: ({ red: e, green: t, blue: s, alpha: n = 1 }) => "rgba(" + fs.transform(e) + ", " + fs.transform(t) + ", " + fs.transform(s) + ", " +
|
|
895
|
+
transform: ({ red: e, green: t, blue: s, alpha: n = 1 }) => "rgba(" + fs.transform(e) + ", " + fs.transform(t) + ", " + fs.transform(s) + ", " + ut(pt.transform(n)) + ")"
|
|
896
896
|
};
|
|
897
897
|
function Kl(e) {
|
|
898
898
|
let t = "", s = "", n = "", r = "";
|
|
@@ -918,7 +918,7 @@ const Ps = {
|
|
|
918
918
|
}, qe = {
|
|
919
919
|
test: /* @__PURE__ */ pn("hsl", "hue"),
|
|
920
920
|
parse: /* @__PURE__ */ Ki("hue", "saturation", "lightness"),
|
|
921
|
-
transform: ({ hue: e, saturation: t, lightness: s, alpha: n = 1 }) => "hsla(" + Math.round(e) + ", " + je.transform(
|
|
921
|
+
transform: ({ hue: e, saturation: t, lightness: s, alpha: n = 1 }) => "hsla(" + Math.round(e) + ", " + je.transform(ut(t)) + ", " + je.transform(ut(s)) + ", " + ut(pt.transform(n)) + ")"
|
|
922
922
|
}, J = {
|
|
923
923
|
test: (e) => $e.test(e) || Ps.test(e) || qe.test(e),
|
|
924
924
|
parse: (e) => $e.test(e) ? $e.parse(e) : qe.test(e) ? qe.parse(e) : Ps.parse(e),
|
|
@@ -953,7 +953,7 @@ function Xi({ split: e, types: t }) {
|
|
|
953
953
|
for (let o = 0; o < s; o++)
|
|
954
954
|
if (r += e[o], n[o] !== void 0) {
|
|
955
955
|
const i = t[o];
|
|
956
|
-
i === Yi ? r +=
|
|
956
|
+
i === Yi ? r += ut(n[o]) : i === Hi ? r += J.transform(n[o]) : r += n[o];
|
|
957
957
|
}
|
|
958
958
|
return r;
|
|
959
959
|
};
|
|
@@ -1019,7 +1019,7 @@ function cc(e, t) {
|
|
|
1019
1019
|
return (s) => W(e, t, s);
|
|
1020
1020
|
}
|
|
1021
1021
|
function gn(e) {
|
|
1022
|
-
return typeof e == "number" ? cc : typeof e == "string" ? hn(e) ? Ht : J.test(e) ? qn : fc : Array.isArray(e) ? qi : typeof e == "object" ? J.test(e) ? qn :
|
|
1022
|
+
return typeof e == "number" ? cc : typeof e == "string" ? hn(e) ? Ht : J.test(e) ? qn : fc : Array.isArray(e) ? qi : typeof e == "object" ? J.test(e) ? qn : dc : Ht;
|
|
1023
1023
|
}
|
|
1024
1024
|
function qi(e, t) {
|
|
1025
1025
|
const s = [...e], n = s.length, r = e.map((o, i) => gn(o)(o, t[i]));
|
|
@@ -1029,7 +1029,7 @@ function qi(e, t) {
|
|
|
1029
1029
|
return s;
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function dc(e, t) {
|
|
1033
1033
|
const s = { ...e, ...t }, n = {};
|
|
1034
1034
|
for (const r in s)
|
|
1035
1035
|
e[r] !== void 0 && t[r] !== void 0 && (n[r] = gn(e[r])(e[r], t[r]));
|
|
@@ -1039,7 +1039,7 @@ function uc(e, t) {
|
|
|
1039
1039
|
return s;
|
|
1040
1040
|
};
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function uc(e, t) {
|
|
1043
1043
|
const s = [], n = { color: 0, var: 0, number: 0 };
|
|
1044
1044
|
for (let r = 0; r < t.values.length; r++) {
|
|
1045
1045
|
const o = t.types[r], i = e.indexes[o][n[o]], a = e.values[i] ?? 0;
|
|
@@ -1049,7 +1049,7 @@ function dc(e, t) {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
const fc = (e, t) => {
|
|
1051
1051
|
const s = xe.createTransformer(t), n = et(e), r = et(t);
|
|
1052
|
-
return n.indexes.var.length === r.indexes.var.length && n.indexes.color.length === r.indexes.color.length && n.indexes.number.length >= r.indexes.number.length ? Ms.has(e) && !r.values.length || Ms.has(t) && !n.values.length ? lc(e, t) : xt(qi(
|
|
1052
|
+
return n.indexes.var.length === r.indexes.var.length && n.indexes.color.length === r.indexes.color.length && n.indexes.number.length >= r.indexes.number.length ? Ms.has(e) && !r.values.length || Ms.has(t) && !n.values.length ? lc(e, t) : xt(qi(uc(n, r), r.values), s) : (st(!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.`, "complex-values-different"), Ht(e, t));
|
|
1053
1053
|
};
|
|
1054
1054
|
function Zi(e, t, s) {
|
|
1055
1055
|
return typeof e == "number" && typeof t == "number" && typeof s == "number" ? W(e, t, s) : gn(e)(e, t);
|
|
@@ -1130,33 +1130,33 @@ function gc(e, t, s) {
|
|
|
1130
1130
|
const ps = 1e-3;
|
|
1131
1131
|
function yc({ duration: e = H.duration, bounce: t = H.bounce, velocity: s = H.velocity, mass: n = H.mass }) {
|
|
1132
1132
|
let r, o;
|
|
1133
|
-
st(e <= /* @__PURE__ */
|
|
1133
|
+
st(e <= /* @__PURE__ */ ue(H.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
1134
1134
|
let i = 1 - t;
|
|
1135
|
-
i = Te(H.minDamping, H.maxDamping, i), e = Te(H.minDuration, H.maxDuration, /* @__PURE__ */ he(e)), i < 1 ? (r = (
|
|
1136
|
-
const
|
|
1135
|
+
i = Te(H.minDamping, H.maxDamping, i), e = Te(H.minDuration, H.maxDuration, /* @__PURE__ */ he(e)), i < 1 ? (r = (d) => {
|
|
1136
|
+
const u = d * i, f = u * e, h = u - s, m = Es(d, i), g = Math.exp(-f);
|
|
1137
1137
|
return ps - h / m * g;
|
|
1138
|
-
}, o = (
|
|
1139
|
-
const f =
|
|
1140
|
-
return (-r(
|
|
1141
|
-
}) : (r = (
|
|
1142
|
-
const
|
|
1143
|
-
return -ps +
|
|
1144
|
-
}, o = (
|
|
1145
|
-
const
|
|
1146
|
-
return
|
|
1138
|
+
}, o = (d) => {
|
|
1139
|
+
const f = d * i * e, h = f * s + s, m = Math.pow(i, 2) * Math.pow(d, 2) * e, g = Math.exp(-f), p = Es(Math.pow(d, 2), i);
|
|
1140
|
+
return (-r(d) + ps > 0 ? -1 : 1) * ((h - m) * g) / p;
|
|
1141
|
+
}) : (r = (d) => {
|
|
1142
|
+
const u = Math.exp(-d * e), f = (d - s) * e + 1;
|
|
1143
|
+
return -ps + u * f;
|
|
1144
|
+
}, o = (d) => {
|
|
1145
|
+
const u = Math.exp(-d * e), f = (s - d) * (e * e);
|
|
1146
|
+
return u * f;
|
|
1147
1147
|
});
|
|
1148
1148
|
const a = 5 / e, c = gc(r, o, a);
|
|
1149
|
-
if (e = /* @__PURE__ */
|
|
1149
|
+
if (e = /* @__PURE__ */ ue(e), isNaN(c))
|
|
1150
1150
|
return {
|
|
1151
1151
|
stiffness: H.stiffness,
|
|
1152
1152
|
damping: H.damping,
|
|
1153
1153
|
duration: e
|
|
1154
1154
|
};
|
|
1155
1155
|
{
|
|
1156
|
-
const
|
|
1156
|
+
const d = Math.pow(c, 2) * n;
|
|
1157
1157
|
return {
|
|
1158
|
-
stiffness:
|
|
1159
|
-
damping: i * 2 * Math.sqrt(n *
|
|
1158
|
+
stiffness: d,
|
|
1159
|
+
damping: i * 2 * Math.sqrt(n * d),
|
|
1160
1160
|
duration: e
|
|
1161
1161
|
};
|
|
1162
1162
|
}
|
|
@@ -1200,10 +1200,10 @@ function qt(e = H.visualDuration, t = H.bounce) {
|
|
|
1200
1200
|
bounce: t
|
|
1201
1201
|
} : e;
|
|
1202
1202
|
let { restSpeed: n, restDelta: r } = s;
|
|
1203
|
-
const o = s.keyframes[0], i = s.keyframes[s.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: c, damping:
|
|
1203
|
+
const o = s.keyframes[0], i = s.keyframes[s.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: c, damping: d, mass: u, duration: f, velocity: h, isResolvedFromDuration: m } = vc({
|
|
1204
1204
|
...s,
|
|
1205
1205
|
velocity: -/* @__PURE__ */ he(s.velocity || 0)
|
|
1206
|
-
}), g = h || 0, p =
|
|
1206
|
+
}), g = h || 0, p = d / (2 * Math.sqrt(c * u)), y = i - o, w = /* @__PURE__ */ he(Math.sqrt(c / u)), b = Math.abs(y) < 5;
|
|
1207
1207
|
n || (n = b ? H.restSpeed.granular : H.restSpeed.default), r || (r = b ? H.restDelta.granular : H.restDelta.default);
|
|
1208
1208
|
let x, j, T, P, L, k;
|
|
1209
1209
|
if (p < 1)
|
|
@@ -1229,17 +1229,17 @@ function qt(e = H.visualDuration, t = H.bounce) {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
const M = {
|
|
1231
1231
|
calculatedDuration: m && f || null,
|
|
1232
|
-
velocity: (E) => /* @__PURE__ */
|
|
1232
|
+
velocity: (E) => /* @__PURE__ */ ue(j(E)),
|
|
1233
1233
|
next: (E) => {
|
|
1234
1234
|
if (!m && p < 1) {
|
|
1235
|
-
const B = Math.exp(-p * w * E), le = Math.sin(T * E), ae = Math.cos(T * E), q = i - B * (P * le + y * ae), _ = /* @__PURE__ */
|
|
1235
|
+
const B = Math.exp(-p * w * E), le = Math.sin(T * E), ae = Math.cos(T * E), q = i - B * (P * le + y * ae), _ = /* @__PURE__ */ ue(B * (L * le + k * ae));
|
|
1236
1236
|
return a.done = Math.abs(_) <= n && Math.abs(i - q) <= r, a.value = a.done ? i : q, a;
|
|
1237
1237
|
}
|
|
1238
1238
|
const O = x(E);
|
|
1239
1239
|
if (m)
|
|
1240
1240
|
a.done = E >= f;
|
|
1241
1241
|
else {
|
|
1242
|
-
const B = /* @__PURE__ */
|
|
1242
|
+
const B = /* @__PURE__ */ ue(j(E));
|
|
1243
1243
|
a.done = Math.abs(B) <= n && Math.abs(i - O) <= r;
|
|
1244
1244
|
}
|
|
1245
1245
|
return a.value = a.done ? i : O, a;
|
|
@@ -1255,14 +1255,14 @@ function qt(e = H.visualDuration, t = H.bounce) {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
qt.applyToOptions = (e) => {
|
|
1257
1257
|
const t = mc(e, 100, qt);
|
|
1258
|
-
return e.ease = t.ease, e.duration = /* @__PURE__ */
|
|
1258
|
+
return e.ease = t.ease, e.duration = /* @__PURE__ */ ue(t.duration), e.type = "keyframes", e;
|
|
1259
1259
|
};
|
|
1260
1260
|
const wc = 5;
|
|
1261
1261
|
function Qi(e, t, s) {
|
|
1262
1262
|
const n = Math.max(t - wc, 0);
|
|
1263
1263
|
return Vi(s - e(n), t - n);
|
|
1264
1264
|
}
|
|
1265
|
-
function Vs({ keyframes: e, velocity: t = 0, power: s = 0.8, timeConstant: n = 325, bounceDamping: r = 10, bounceStiffness: o = 500, modifyTarget: i, min: a, max: c, restDelta:
|
|
1265
|
+
function Vs({ keyframes: e, velocity: t = 0, power: s = 0.8, timeConstant: n = 325, bounceDamping: r = 10, bounceStiffness: o = 500, modifyTarget: i, min: a, max: c, restDelta: d = 0.5, restSpeed: u }) {
|
|
1266
1266
|
const f = e[0], h = {
|
|
1267
1267
|
done: !1,
|
|
1268
1268
|
value: f
|
|
@@ -1272,7 +1272,7 @@ function Vs({ keyframes: e, velocity: t = 0, power: s = 0.8, timeConstant: n = 3
|
|
|
1272
1272
|
w !== y && (p = w - f);
|
|
1273
1273
|
const b = (k) => -p * Math.exp(-k / n), x = (k) => w + b(k), j = (k) => {
|
|
1274
1274
|
const M = b(k), E = x(k);
|
|
1275
|
-
h.done = Math.abs(M) <=
|
|
1275
|
+
h.done = Math.abs(M) <= d, h.value = h.done ? w : E;
|
|
1276
1276
|
};
|
|
1277
1277
|
let T, P;
|
|
1278
1278
|
const L = (k) => {
|
|
@@ -1282,8 +1282,8 @@ function Vs({ keyframes: e, velocity: t = 0, power: s = 0.8, timeConstant: n = 3
|
|
|
1282
1282
|
// TODO: This should be passing * 1000
|
|
1283
1283
|
damping: r,
|
|
1284
1284
|
stiffness: o,
|
|
1285
|
-
restDelta:
|
|
1286
|
-
restSpeed:
|
|
1285
|
+
restDelta: d,
|
|
1286
|
+
restSpeed: u
|
|
1287
1287
|
}));
|
|
1288
1288
|
};
|
|
1289
1289
|
return L(0), {
|
|
@@ -1314,17 +1314,17 @@ function jc(e, t, { clamp: s = !0, ease: n, mixer: r } = {}) {
|
|
|
1314
1314
|
return () => t[1];
|
|
1315
1315
|
const i = e[0] === e[1];
|
|
1316
1316
|
e[0] > e[o - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
1317
|
-
const a = kc(t, n, r), c = a.length,
|
|
1318
|
-
if (i &&
|
|
1317
|
+
const a = kc(t, n, r), c = a.length, d = (u) => {
|
|
1318
|
+
if (i && u < e[0])
|
|
1319
1319
|
return t[0];
|
|
1320
1320
|
let f = 0;
|
|
1321
1321
|
if (c > 1)
|
|
1322
|
-
for (; f < e.length - 2 && !(
|
|
1322
|
+
for (; f < e.length - 2 && !(u < e[f + 1]); f++)
|
|
1323
1323
|
;
|
|
1324
|
-
const h = /* @__PURE__ */ mt(e[f], e[f + 1],
|
|
1324
|
+
const h = /* @__PURE__ */ mt(e[f], e[f + 1], u);
|
|
1325
1325
|
return a[f](h);
|
|
1326
1326
|
};
|
|
1327
|
-
return s ? (
|
|
1327
|
+
return s ? (u) => d(Te(e[0], e[o - 1], u)) : d;
|
|
1328
1328
|
}
|
|
1329
1329
|
function Tc(e, t) {
|
|
1330
1330
|
const s = e[e.length - 1];
|
|
@@ -1418,14 +1418,14 @@ class Zt extends xn {
|
|
|
1418
1418
|
let { keyframes: a } = t;
|
|
1419
1419
|
const c = s || Ze;
|
|
1420
1420
|
process.env.NODE_ENV !== "production" && c !== Ze && Ne(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== Ze && typeof a[0] != "number" && (this.mixKeyframes = xt(Mc, Zi(a[0], a[1])), a = [0, 100]);
|
|
1421
|
-
const
|
|
1421
|
+
const d = c({ ...t, keyframes: a });
|
|
1422
1422
|
o === "mirror" && (this.mirroredGenerator = c({
|
|
1423
1423
|
...t,
|
|
1424
1424
|
keyframes: [...a].reverse(),
|
|
1425
1425
|
velocity: -i
|
|
1426
|
-
})),
|
|
1427
|
-
const { calculatedDuration:
|
|
1428
|
-
this.calculatedDuration =
|
|
1426
|
+
})), d.calculatedDuration === null && (d.calculatedDuration = yn(d));
|
|
1427
|
+
const { calculatedDuration: u } = d;
|
|
1428
|
+
this.calculatedDuration = u, this.resolvedDuration = u + r, this.totalDuration = this.resolvedDuration * (n + 1) - r, this.generator = d;
|
|
1429
1429
|
}
|
|
1430
1430
|
updateTime(t) {
|
|
1431
1431
|
const s = Math.round(t - this.startTime) * this.playbackSpeed;
|
|
@@ -1435,9 +1435,9 @@ class Zt extends xn {
|
|
|
1435
1435
|
const { generator: n, totalDuration: r, mixKeyframes: o, mirroredGenerator: i, resolvedDuration: a, calculatedDuration: c } = this;
|
|
1436
1436
|
if (this.startTime === null)
|
|
1437
1437
|
return n.next(0);
|
|
1438
|
-
const { delay:
|
|
1438
|
+
const { delay: d = 0, keyframes: u, repeat: f, repeatType: h, repeatDelay: m, type: g, onUpdate: p, finalKeyframe: y } = this.options;
|
|
1439
1439
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), s ? this.currentTime = t : this.updateTime(t);
|
|
1440
|
-
const w = this.currentTime -
|
|
1440
|
+
const w = this.currentTime - d * (this.playbackSpeed >= 0 ? 1 : -1), b = this.playbackSpeed >= 0 ? w < 0 : w > r;
|
|
1441
1441
|
this.currentTime = Math.max(w, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
|
|
1442
1442
|
let x = this.currentTime, j = n;
|
|
1443
1443
|
if (f) {
|
|
@@ -1446,11 +1446,11 @@ class Zt extends xn {
|
|
|
1446
1446
|
!E && k >= 1 && (E = 1), E === 1 && M--, M = Math.min(M, f + 1), !!(M % 2) && (h === "reverse" ? (E = 1 - E, m && (E -= m / a)) : h === "mirror" && (j = i)), x = Te(0, 1, E) * a;
|
|
1447
1447
|
}
|
|
1448
1448
|
let T;
|
|
1449
|
-
b ? (this.delayState.value =
|
|
1449
|
+
b ? (this.delayState.value = u[0], T = this.delayState) : T = j.next(x), o && !b && (T.value = o(T.value));
|
|
1450
1450
|
let { done: P } = T;
|
|
1451
1451
|
!b && c !== null && (P = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
|
|
1452
1452
|
const L = this.holdTime === null && (this.state === "finished" || this.state === "running" && P);
|
|
1453
|
-
return L && g !== Vs && (T.value = os(
|
|
1453
|
+
return L && g !== Vs && (T.value = os(u, this.options, y, this.speed)), p && p(T.value), L && this.finish(), T;
|
|
1454
1454
|
}
|
|
1455
1455
|
/**
|
|
1456
1456
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -1471,7 +1471,7 @@ class Zt extends xn {
|
|
|
1471
1471
|
return /* @__PURE__ */ he(this.currentTime);
|
|
1472
1472
|
}
|
|
1473
1473
|
set time(t) {
|
|
1474
|
-
t = /* @__PURE__ */
|
|
1474
|
+
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 ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = t, this.tick(t));
|
|
1475
1475
|
}
|
|
1476
1476
|
/**
|
|
1477
1477
|
* Returns the generator's velocity at the current time in units/second.
|
|
@@ -1725,28 +1725,28 @@ const $c = /* @__PURE__ */ ro(() => window.ScrollTimeline !== void 0, "scrollTim
|
|
|
1725
1725
|
return !1;
|
|
1726
1726
|
}
|
|
1727
1727
|
return !0;
|
|
1728
|
-
}, "linearEasing"),
|
|
1728
|
+
}, "linearEasing"), dt = ([e, t, s, n]) => `cubic-bezier(${e}, ${t}, ${s}, ${n})`, sr = {
|
|
1729
1729
|
linear: "linear",
|
|
1730
1730
|
ease: "ease",
|
|
1731
1731
|
easeIn: "ease-in",
|
|
1732
1732
|
easeOut: "ease-out",
|
|
1733
1733
|
easeInOut: "ease-in-out",
|
|
1734
|
-
circIn: /* @__PURE__ */
|
|
1735
|
-
circOut: /* @__PURE__ */
|
|
1736
|
-
backIn: /* @__PURE__ */
|
|
1737
|
-
backOut: /* @__PURE__ */
|
|
1734
|
+
circIn: /* @__PURE__ */ dt([0, 0.65, 0.55, 1]),
|
|
1735
|
+
circOut: /* @__PURE__ */ dt([0.55, 0, 1, 0.45]),
|
|
1736
|
+
backIn: /* @__PURE__ */ dt([0.31, 0.01, 0.66, -0.59]),
|
|
1737
|
+
backOut: /* @__PURE__ */ dt([0.33, 1.53, 0.69, 0.99])
|
|
1738
1738
|
};
|
|
1739
1739
|
function oo(e, t) {
|
|
1740
1740
|
if (e)
|
|
1741
|
-
return typeof e == "function" ? io() ? Ji(e, t) : "ease-out" : $i(e) ?
|
|
1741
|
+
return typeof e == "function" ? io() ? Ji(e, t) : "ease-out" : $i(e) ? dt(e) : Array.isArray(e) ? e.map((s) => oo(s, t) || sr.easeOut) : sr[e];
|
|
1742
1742
|
}
|
|
1743
|
-
function Wc(e, t, s, { delay: n = 0, duration: r = 300, repeat: o = 0, repeatType: i = "loop", ease: a = "easeOut", times: c } = {},
|
|
1744
|
-
const
|
|
1743
|
+
function Wc(e, t, s, { delay: n = 0, duration: r = 300, repeat: o = 0, repeatType: i = "loop", ease: a = "easeOut", times: c } = {}, d = void 0) {
|
|
1744
|
+
const u = {
|
|
1745
1745
|
[t]: s
|
|
1746
1746
|
};
|
|
1747
|
-
c && (
|
|
1747
|
+
c && (u.offset = c);
|
|
1748
1748
|
const f = oo(a, r);
|
|
1749
|
-
Array.isArray(f) && (
|
|
1749
|
+
Array.isArray(f) && (u.easing = f);
|
|
1750
1750
|
const h = {
|
|
1751
1751
|
delay: n,
|
|
1752
1752
|
duration: r,
|
|
@@ -1755,7 +1755,7 @@ function Wc(e, t, s, { delay: n = 0, duration: r = 300, repeat: o = 0, repeatTyp
|
|
|
1755
1755
|
iterations: o + 1,
|
|
1756
1756
|
direction: i === "reverse" ? "alternate" : "normal"
|
|
1757
1757
|
};
|
|
1758
|
-
return
|
|
1758
|
+
return d && (h.pseudoElement = d), e.animate(u, h);
|
|
1759
1759
|
}
|
|
1760
1760
|
function ao(e) {
|
|
1761
1761
|
return typeof e == "function" && "applyToOptions" in e;
|
|
@@ -1769,11 +1769,11 @@ class lo extends xn {
|
|
|
1769
1769
|
return;
|
|
1770
1770
|
const { element: s, name: n, keyframes: r, pseudoElement: o, allowFlatten: i = !1, finalKeyframe: a, onComplete: c } = t;
|
|
1771
1771
|
this.isPseudoElement = !!o, this.allowFlatten = i, this.options = t, Ne(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1772
|
-
const
|
|
1773
|
-
this.animation = Wc(s, n, r,
|
|
1772
|
+
const d = Uc(t);
|
|
1773
|
+
this.animation = Wc(s, n, r, d, o), d.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1774
1774
|
if (this.finishedTime = this.time, !o) {
|
|
1775
|
-
const
|
|
1776
|
-
this.updateMotionValue && this.updateMotionValue(
|
|
1775
|
+
const u = os(r, this.options, a, this.speed);
|
|
1776
|
+
this.updateMotionValue && this.updateMotionValue(u), no(s, n, u), this.animation.cancel();
|
|
1777
1777
|
}
|
|
1778
1778
|
c == null || c(), this.notifyFinished();
|
|
1779
1779
|
};
|
|
@@ -1832,7 +1832,7 @@ class lo extends xn {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
set time(t) {
|
|
1834
1834
|
const s = this.finishedTime !== null;
|
|
1835
|
-
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
1835
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ ue(t), s && this.animation.pause();
|
|
1836
1836
|
}
|
|
1837
1837
|
/**
|
|
1838
1838
|
* The playback speed of the animation.
|
|
@@ -1896,8 +1896,8 @@ class Yc extends lo {
|
|
|
1896
1896
|
const a = new Zt({
|
|
1897
1897
|
...i,
|
|
1898
1898
|
autoplay: !1
|
|
1899
|
-
}), c = Math.max(gs, ce.now() - this.startTime),
|
|
1900
|
-
o && f && no(o, f,
|
|
1899
|
+
}), c = Math.max(gs, ce.now() - this.startTime), d = Te(0, gs, c - gs), u = a.sample(c).value, { name: f } = this.options;
|
|
1900
|
+
o && f && no(o, f, u), s.setWithVelocity(a.sample(Math.max(0, c - d)).value, u, d), a.stop();
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
1903
1903
|
const nr = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
@@ -1950,25 +1950,25 @@ const Jc = /* @__PURE__ */ new Set([
|
|
|
1950
1950
|
"borderBottomColor",
|
|
1951
1951
|
"borderLeftColor"
|
|
1952
1952
|
]), Qc = /* @__PURE__ */ Ei(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1953
|
-
function
|
|
1953
|
+
function ed(e) {
|
|
1954
1954
|
var f;
|
|
1955
1955
|
const { motionValue: t, name: s, repeatDelay: n, repeatType: r, damping: o, type: i, keyframes: a } = e;
|
|
1956
1956
|
if (!(((f = t == null ? void 0 : t.owner) == null ? void 0 : f.current) instanceof HTMLElement))
|
|
1957
1957
|
return !1;
|
|
1958
|
-
const { onUpdate:
|
|
1958
|
+
const { onUpdate: d, transformTemplate: u } = t.owner.getProps();
|
|
1959
1959
|
return Qc() && s && /**
|
|
1960
1960
|
* Force WAAPI for color properties with browser-only color formats
|
|
1961
1961
|
* (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.
|
|
1962
1962
|
*/
|
|
1963
|
-
(uo.has(s) || Jc.has(s) && Zc(a)) && (s !== "transform" || !
|
|
1963
|
+
(uo.has(s) || Jc.has(s) && Zc(a)) && (s !== "transform" || !u) && /**
|
|
1964
1964
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1965
1965
|
* no way to read the value from WAAPI every frame.
|
|
1966
1966
|
*/
|
|
1967
|
-
!
|
|
1967
|
+
!d && !n && r !== "mirror" && o !== 0 && i !== "inertia";
|
|
1968
1968
|
}
|
|
1969
|
-
const
|
|
1970
|
-
class
|
|
1971
|
-
constructor({ autoplay: t = !0, delay: s = 0, type: n = "keyframes", repeat: r = 0, repeatDelay: o = 0, repeatType: i = "loop", keyframes: a, name: c, motionValue:
|
|
1969
|
+
const td = 40;
|
|
1970
|
+
class sd extends xn {
|
|
1971
|
+
constructor({ autoplay: t = !0, delay: s = 0, type: n = "keyframes", repeat: r = 0, repeatDelay: o = 0, repeatType: i = "loop", keyframes: a, name: c, motionValue: d, element: u, ...f }) {
|
|
1972
1972
|
var g;
|
|
1973
1973
|
super(), this.stop = () => {
|
|
1974
1974
|
var p, y;
|
|
@@ -1982,25 +1982,25 @@ class su extends xn {
|
|
|
1982
1982
|
repeatDelay: o,
|
|
1983
1983
|
repeatType: i,
|
|
1984
1984
|
name: c,
|
|
1985
|
-
motionValue:
|
|
1986
|
-
element:
|
|
1985
|
+
motionValue: d,
|
|
1986
|
+
element: u,
|
|
1987
1987
|
...f
|
|
1988
|
-
}, m = (
|
|
1989
|
-
this.keyframeResolver = new m(a, (p, y, w) => this.onKeyframesResolved(p, y, h, !w), c,
|
|
1988
|
+
}, m = (u == null ? void 0 : u.KeyframeResolver) || bn;
|
|
1989
|
+
this.keyframeResolver = new m(a, (p, y, w) => this.onKeyframesResolved(p, y, h, !w), c, d, u), (g = this.keyframeResolver) == null || g.scheduleResolve();
|
|
1990
1990
|
}
|
|
1991
1991
|
onKeyframesResolved(t, s, n, r) {
|
|
1992
1992
|
var w, b;
|
|
1993
1993
|
this.keyframeResolver = void 0;
|
|
1994
|
-
const { name: o, type: i, velocity: a, delay: c, isHandoff:
|
|
1994
|
+
const { name: o, type: i, velocity: a, delay: c, isHandoff: d, onUpdate: u } = n;
|
|
1995
1995
|
this.resolvedAt = ce.now();
|
|
1996
1996
|
let f = !0;
|
|
1997
|
-
Xc(t, o, i, a) || (f = !1, (Le.instantAnimations || !c) && (
|
|
1997
|
+
Xc(t, o, i, a) || (f = !1, (Le.instantAnimations || !c) && (u == null || u(os(t, n, s))), t[0] = t[t.length - 1], Bs(n), n.repeat = 0);
|
|
1998
1998
|
const m = {
|
|
1999
|
-
startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1999
|
+
startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > td ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
2000
2000
|
finalKeyframe: s,
|
|
2001
2001
|
...n,
|
|
2002
2002
|
keyframes: t
|
|
2003
|
-
}, g = f && !
|
|
2003
|
+
}, g = f && !d && ed(m), p = (b = (w = m.motionValue) == null ? void 0 : w.owner) == null ? void 0 : b.current;
|
|
2004
2004
|
let y;
|
|
2005
2005
|
if (g)
|
|
2006
2006
|
try {
|
|
@@ -2070,24 +2070,24 @@ class su extends xn {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
}
|
|
2072
2072
|
function fo(e, t, s, n = 0, r = 1) {
|
|
2073
|
-
const o = Array.from(e).sort((
|
|
2073
|
+
const o = Array.from(e).sort((d, u) => d.sortNodePosition(u)).indexOf(t), i = e.size, a = (i - 1) * n;
|
|
2074
2074
|
return typeof s == "function" ? s(o, i) : r === 1 ? o * n : a - o * n;
|
|
2075
2075
|
}
|
|
2076
|
-
const
|
|
2076
|
+
const nd = (
|
|
2077
2077
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
2078
2078
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
2079
2079
|
);
|
|
2080
|
-
function
|
|
2081
|
-
const t =
|
|
2080
|
+
function rd(e) {
|
|
2081
|
+
const t = nd.exec(e);
|
|
2082
2082
|
if (!t)
|
|
2083
2083
|
return [,];
|
|
2084
2084
|
const [, s, n, r] = t;
|
|
2085
2085
|
return [`--${s ?? n}`, r];
|
|
2086
2086
|
}
|
|
2087
|
-
const
|
|
2087
|
+
const id = 4;
|
|
2088
2088
|
function ho(e, t, s = 1) {
|
|
2089
|
-
Ne(s <=
|
|
2090
|
-
const [n, r] =
|
|
2089
|
+
Ne(s <= id, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
2090
|
+
const [n, r] = rd(e);
|
|
2091
2091
|
if (!n)
|
|
2092
2092
|
return;
|
|
2093
2093
|
const o = window.getComputedStyle(t).getPropertyValue(n);
|
|
@@ -2097,24 +2097,24 @@ function ho(e, t, s = 1) {
|
|
|
2097
2097
|
}
|
|
2098
2098
|
return hn(r) ? ho(r, t, s + 1) : r;
|
|
2099
2099
|
}
|
|
2100
|
-
const
|
|
2100
|
+
const od = {
|
|
2101
2101
|
type: "spring",
|
|
2102
2102
|
stiffness: 500,
|
|
2103
2103
|
damping: 25,
|
|
2104
2104
|
restSpeed: 10
|
|
2105
|
-
},
|
|
2105
|
+
}, ad = (e) => ({
|
|
2106
2106
|
type: "spring",
|
|
2107
2107
|
stiffness: 550,
|
|
2108
2108
|
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
2109
2109
|
restSpeed: 10
|
|
2110
|
-
}),
|
|
2110
|
+
}), ld = {
|
|
2111
2111
|
type: "keyframes",
|
|
2112
2112
|
duration: 0.8
|
|
2113
|
-
},
|
|
2113
|
+
}, cd = {
|
|
2114
2114
|
type: "keyframes",
|
|
2115
2115
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2116
2116
|
duration: 0.3
|
|
2117
|
-
},
|
|
2117
|
+
}, dd = (e, { keyframes: t }) => t.length > 2 ? ld : it.has(e) ? e.startsWith("scale") ? ad(t[1]) : od : cd;
|
|
2118
2118
|
function mo(e, t) {
|
|
2119
2119
|
if (e != null && e.inherit && t) {
|
|
2120
2120
|
const { inherit: s, ...n } = e;
|
|
@@ -2126,7 +2126,7 @@ function vn(e, t) {
|
|
|
2126
2126
|
const s = (e == null ? void 0 : e[t]) ?? (e == null ? void 0 : e.default) ?? e;
|
|
2127
2127
|
return s !== e ? mo(s, e) : s;
|
|
2128
2128
|
}
|
|
2129
|
-
const
|
|
2129
|
+
const ud = /* @__PURE__ */ new Set([
|
|
2130
2130
|
"when",
|
|
2131
2131
|
"delay",
|
|
2132
2132
|
"delayChildren",
|
|
@@ -2138,22 +2138,22 @@ const du = /* @__PURE__ */ new Set([
|
|
|
2138
2138
|
"from",
|
|
2139
2139
|
"elapsed"
|
|
2140
2140
|
]);
|
|
2141
|
-
function
|
|
2141
|
+
function fd(e) {
|
|
2142
2142
|
for (const t in e)
|
|
2143
|
-
if (!
|
|
2143
|
+
if (!ud.has(t))
|
|
2144
2144
|
return !0;
|
|
2145
2145
|
return !1;
|
|
2146
2146
|
}
|
|
2147
2147
|
const wn = (e, t, s, n = {}, r, o) => (i) => {
|
|
2148
2148
|
const a = vn(n, e) || {}, c = a.delay || n.delay || 0;
|
|
2149
|
-
let { elapsed:
|
|
2150
|
-
|
|
2151
|
-
const
|
|
2149
|
+
let { elapsed: d = 0 } = n;
|
|
2150
|
+
d = d - /* @__PURE__ */ ue(c);
|
|
2151
|
+
const u = {
|
|
2152
2152
|
keyframes: Array.isArray(s) ? s : [null, s],
|
|
2153
2153
|
ease: "easeOut",
|
|
2154
2154
|
velocity: t.getVelocity(),
|
|
2155
2155
|
...a,
|
|
2156
|
-
delay: -
|
|
2156
|
+
delay: -d,
|
|
2157
2157
|
onUpdate: (h) => {
|
|
2158
2158
|
t.set(h), a.onUpdate && a.onUpdate(h);
|
|
2159
2159
|
},
|
|
@@ -2164,18 +2164,18 @@ const wn = (e, t, s, n = {}, r, o) => (i) => {
|
|
|
2164
2164
|
motionValue: t,
|
|
2165
2165
|
element: o ? void 0 : r
|
|
2166
2166
|
};
|
|
2167
|
-
|
|
2167
|
+
fd(a) || Object.assign(u, dd(e, u)), u.duration && (u.duration = /* @__PURE__ */ ue(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ ue(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
2168
2168
|
let f = !1;
|
|
2169
|
-
if ((
|
|
2170
|
-
const h = os(
|
|
2169
|
+
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (Bs(u), u.delay === 0 && (f = !0)), (Le.instantAnimations || Le.skipAnimations || r != null && r.shouldSkipAnimations) && (f = !0, Bs(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, f && !o && t.get() !== void 0) {
|
|
2170
|
+
const h = os(u.keyframes, a);
|
|
2171
2171
|
if (h !== void 0) {
|
|
2172
2172
|
F.update(() => {
|
|
2173
|
-
|
|
2173
|
+
u.onUpdate(h), u.onComplete();
|
|
2174
2174
|
});
|
|
2175
2175
|
return;
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
2178
|
-
return a.isSync ? new Zt(
|
|
2178
|
+
return a.isSync ? new Zt(u) : new sd(u);
|
|
2179
2179
|
};
|
|
2180
2180
|
function rr(e) {
|
|
2181
2181
|
const t = [{}, {}];
|
|
@@ -2206,8 +2206,8 @@ const po = /* @__PURE__ */ new Set([
|
|
|
2206
2206
|
"right",
|
|
2207
2207
|
"bottom",
|
|
2208
2208
|
...rt
|
|
2209
|
-
]), ir = 30,
|
|
2210
|
-
class
|
|
2209
|
+
]), ir = 30, hd = (e) => !isNaN(parseFloat(e));
|
|
2210
|
+
class md {
|
|
2211
2211
|
/**
|
|
2212
2212
|
* @param init - The initiating value
|
|
2213
2213
|
* @param config - Optional configuration options
|
|
@@ -2224,7 +2224,7 @@ class mu {
|
|
|
2224
2224
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = s.owner;
|
|
2225
2225
|
}
|
|
2226
2226
|
setCurrent(t) {
|
|
2227
|
-
this.current = t, this.updatedAt = ce.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity =
|
|
2227
|
+
this.current = t, this.updatedAt = ce.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = hd(this.current));
|
|
2228
2228
|
}
|
|
2229
2229
|
setPrevFrameValue(t = this.current) {
|
|
2230
2230
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -2270,7 +2270,7 @@ class mu {
|
|
|
2270
2270
|
* @deprecated
|
|
2271
2271
|
*/
|
|
2272
2272
|
onChange(t) {
|
|
2273
|
-
return process.env.NODE_ENV !== "production" &&
|
|
2273
|
+
return process.env.NODE_ENV !== "production" && dn(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
2274
2274
|
}
|
|
2275
2275
|
on(t, s) {
|
|
2276
2276
|
this.events[t] || (this.events[t] = new cn());
|
|
@@ -2410,31 +2410,31 @@ class mu {
|
|
|
2410
2410
|
}
|
|
2411
2411
|
}
|
|
2412
2412
|
function tt(e, t) {
|
|
2413
|
-
return new
|
|
2413
|
+
return new md(e, t);
|
|
2414
2414
|
}
|
|
2415
2415
|
const _s = (e) => Array.isArray(e);
|
|
2416
|
-
function
|
|
2416
|
+
function pd(e, t, s) {
|
|
2417
2417
|
e.hasValue(t) ? e.getValue(t).set(s) : e.addValue(t, tt(s));
|
|
2418
2418
|
}
|
|
2419
|
-
function
|
|
2419
|
+
function gd(e) {
|
|
2420
2420
|
return _s(e) ? e[e.length - 1] || 0 : e;
|
|
2421
2421
|
}
|
|
2422
|
-
function
|
|
2422
|
+
function yd(e, t) {
|
|
2423
2423
|
const s = Ge(e, t);
|
|
2424
2424
|
let { transitionEnd: n = {}, transition: r = {}, ...o } = s || {};
|
|
2425
2425
|
o = { ...o, ...n };
|
|
2426
2426
|
for (const i in o) {
|
|
2427
|
-
const a =
|
|
2428
|
-
|
|
2427
|
+
const a = gd(o[i]);
|
|
2428
|
+
pd(e, i, a);
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
2431
|
const oe = (e) => !!(e && e.getVelocity);
|
|
2432
|
-
function
|
|
2432
|
+
function xd(e) {
|
|
2433
2433
|
return !!(oe(e) && e.add);
|
|
2434
2434
|
}
|
|
2435
2435
|
function $s(e, t) {
|
|
2436
2436
|
const s = e.getValue("willChange");
|
|
2437
|
-
if (
|
|
2437
|
+
if (xd(s))
|
|
2438
2438
|
return s.add(t);
|
|
2439
2439
|
if (!s && Le.WillChange) {
|
|
2440
2440
|
const n = new Le.WillChange("auto");
|
|
@@ -2444,11 +2444,11 @@ function $s(e, t) {
|
|
|
2444
2444
|
function jn(e) {
|
|
2445
2445
|
return e.replace(/([A-Z])/g, (t) => `-${t.toLowerCase()}`);
|
|
2446
2446
|
}
|
|
2447
|
-
const
|
|
2447
|
+
const bd = "framerAppearId", go = "data-" + jn(bd);
|
|
2448
2448
|
function yo(e) {
|
|
2449
2449
|
return e.props[go];
|
|
2450
2450
|
}
|
|
2451
|
-
function
|
|
2451
|
+
function vd({ protectedKeys: e, needsAnimating: t }, s) {
|
|
2452
2452
|
const n = e.hasOwnProperty(s) && t[s] !== !0;
|
|
2453
2453
|
return t[s] = !1, n;
|
|
2454
2454
|
}
|
|
@@ -2456,12 +2456,12 @@ function xo(e, t, { delay: s = 0, transitionOverride: n, type: r } = {}) {
|
|
|
2456
2456
|
let { transition: o, transitionEnd: i, ...a } = t;
|
|
2457
2457
|
const c = e.getDefaultTransition();
|
|
2458
2458
|
o = o ? mo(o, c) : c;
|
|
2459
|
-
const
|
|
2459
|
+
const d = o == null ? void 0 : o.reduceMotion;
|
|
2460
2460
|
n && (o = n);
|
|
2461
|
-
const
|
|
2461
|
+
const u = [], f = r && e.animationState && e.animationState.getState()[r];
|
|
2462
2462
|
for (const h in a) {
|
|
2463
2463
|
const m = e.getValue(h, e.latestValues[h] ?? null), g = a[h];
|
|
2464
|
-
if (g === void 0 || f &&
|
|
2464
|
+
if (g === void 0 || f && vd(f, h))
|
|
2465
2465
|
continue;
|
|
2466
2466
|
const p = {
|
|
2467
2467
|
delay: s,
|
|
@@ -2480,35 +2480,35 @@ function xo(e, t, { delay: s = 0, transitionOverride: n, type: r } = {}) {
|
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
2482
|
$s(e, h);
|
|
2483
|
-
const b =
|
|
2483
|
+
const b = d ?? e.shouldReduceMotion;
|
|
2484
2484
|
m.start(wn(h, m, g, b && po.has(h) ? { type: !1 } : p, e, w));
|
|
2485
2485
|
const x = m.animation;
|
|
2486
|
-
x &&
|
|
2486
|
+
x && u.push(x);
|
|
2487
2487
|
}
|
|
2488
2488
|
if (i) {
|
|
2489
2489
|
const h = () => F.update(() => {
|
|
2490
|
-
i &&
|
|
2490
|
+
i && yd(e, i);
|
|
2491
2491
|
});
|
|
2492
|
-
|
|
2492
|
+
u.length ? Promise.all(u).then(h) : h();
|
|
2493
2493
|
}
|
|
2494
|
-
return
|
|
2494
|
+
return u;
|
|
2495
2495
|
}
|
|
2496
2496
|
function Ws(e, t, s = {}) {
|
|
2497
2497
|
var c;
|
|
2498
2498
|
const n = Ge(e, t, s.type === "exit" ? (c = e.presenceContext) == null ? void 0 : c.custom : void 0);
|
|
2499
2499
|
let { transition: r = e.getDefaultTransition() || {} } = n || {};
|
|
2500
2500
|
s.transitionOverride && (r = s.transitionOverride);
|
|
2501
|
-
const o = n ? () => Promise.all(xo(e, n, s)) : () => Promise.resolve(), i = e.variantChildren && e.variantChildren.size ? (
|
|
2502
|
-
const { delayChildren:
|
|
2503
|
-
return
|
|
2501
|
+
const o = n ? () => Promise.all(xo(e, n, s)) : () => Promise.resolve(), i = e.variantChildren && e.variantChildren.size ? (d = 0) => {
|
|
2502
|
+
const { delayChildren: u = 0, staggerChildren: f, staggerDirection: h } = r;
|
|
2503
|
+
return wd(e, t, d, u, f, h, s);
|
|
2504
2504
|
} : () => Promise.resolve(), { when: a } = r;
|
|
2505
2505
|
if (a) {
|
|
2506
|
-
const [
|
|
2507
|
-
return
|
|
2506
|
+
const [d, u] = a === "beforeChildren" ? [o, i] : [i, o];
|
|
2507
|
+
return d().then(() => u());
|
|
2508
2508
|
} else
|
|
2509
2509
|
return Promise.all([o(), i(s.delay)]);
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function wd(e, t, s = 0, n = 0, r = 0, o = 1, i) {
|
|
2512
2512
|
const a = [];
|
|
2513
2513
|
for (const c of e.variantChildren)
|
|
2514
2514
|
c.notify("AnimationStart", t), a.push(Ws(c, t, {
|
|
@@ -2517,7 +2517,7 @@ function wu(e, t, s = 0, n = 0, r = 0, o = 1, i) {
|
|
|
2517
2517
|
}).then(() => c.notify("AnimationComplete", t)));
|
|
2518
2518
|
return Promise.all(a);
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2520
|
+
function kd(e, t, s = {}) {
|
|
2521
2521
|
e.notify("AnimationStart", t);
|
|
2522
2522
|
let n;
|
|
2523
2523
|
if (Array.isArray(t)) {
|
|
@@ -2533,15 +2533,15 @@ function ku(e, t, s = {}) {
|
|
|
2533
2533
|
e.notify("AnimationComplete", t);
|
|
2534
2534
|
});
|
|
2535
2535
|
}
|
|
2536
|
-
const
|
|
2536
|
+
const jd = {
|
|
2537
2537
|
test: (e) => e === "auto",
|
|
2538
2538
|
parse: (e) => e
|
|
2539
|
-
}, bo = (e) => (t) => t.test(e), vo = [nt, A, je, Ee, Hl, Yl,
|
|
2540
|
-
function
|
|
2539
|
+
}, bo = (e) => (t) => t.test(e), vo = [nt, A, je, Ee, Hl, Yl, jd], or = (e) => vo.find(bo(e));
|
|
2540
|
+
function Td(e) {
|
|
2541
2541
|
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Mi(e) : !0;
|
|
2542
2542
|
}
|
|
2543
|
-
const
|
|
2544
|
-
function
|
|
2543
|
+
const Sd = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2544
|
+
function Cd(e) {
|
|
2545
2545
|
const [t, s] = e.slice(0, -1).split("(");
|
|
2546
2546
|
if (t === "drop-shadow")
|
|
2547
2547
|
return e;
|
|
@@ -2549,14 +2549,14 @@ function Cu(e) {
|
|
|
2549
2549
|
if (!n)
|
|
2550
2550
|
return e;
|
|
2551
2551
|
const r = s.replace(n, "");
|
|
2552
|
-
let o =
|
|
2552
|
+
let o = Sd.has(t) ? 1 : 0;
|
|
2553
2553
|
return n !== s && (o *= 100), t + "(" + o + r + ")";
|
|
2554
2554
|
}
|
|
2555
|
-
const
|
|
2555
|
+
const Ad = /\b([a-z-]*)\(.*?\)/gu, Us = {
|
|
2556
2556
|
...xe,
|
|
2557
2557
|
getAnimatableNone: (e) => {
|
|
2558
|
-
const t = e.match(
|
|
2559
|
-
return t ? t.map(
|
|
2558
|
+
const t = e.match(Ad);
|
|
2559
|
+
return t ? t.map(Cd).join(" ") : e;
|
|
2560
2560
|
}
|
|
2561
2561
|
}, Gs = {
|
|
2562
2562
|
...xe,
|
|
@@ -2567,7 +2567,7 @@ const Au = /\b([a-z-]*)\(.*?\)/gu, Us = {
|
|
|
2567
2567
|
}, ar = {
|
|
2568
2568
|
...nt,
|
|
2569
2569
|
transform: Math.round
|
|
2570
|
-
},
|
|
2570
|
+
}, Nd = {
|
|
2571
2571
|
rotate: Ee,
|
|
2572
2572
|
rotateX: Ee,
|
|
2573
2573
|
rotateY: Ee,
|
|
@@ -2648,13 +2648,13 @@ const Au = /\b([a-z-]*)\(.*?\)/gu, Us = {
|
|
|
2648
2648
|
// Misc
|
|
2649
2649
|
backgroundPositionX: A,
|
|
2650
2650
|
backgroundPositionY: A,
|
|
2651
|
-
...
|
|
2651
|
+
...Nd,
|
|
2652
2652
|
zIndex: ar,
|
|
2653
2653
|
// SVG
|
|
2654
2654
|
fillOpacity: pt,
|
|
2655
2655
|
strokeOpacity: pt,
|
|
2656
2656
|
numOctaves: ar
|
|
2657
|
-
},
|
|
2657
|
+
}, Pd = {
|
|
2658
2658
|
...Tn,
|
|
2659
2659
|
// Color props
|
|
2660
2660
|
color: J,
|
|
@@ -2672,23 +2672,23 @@ const Au = /\b([a-z-]*)\(.*?\)/gu, Us = {
|
|
|
2672
2672
|
WebkitFilter: Us,
|
|
2673
2673
|
mask: Gs,
|
|
2674
2674
|
WebkitMask: Gs
|
|
2675
|
-
}, wo = (e) =>
|
|
2675
|
+
}, wo = (e) => Pd[e], Md = /* @__PURE__ */ new Set([Us, Gs]);
|
|
2676
2676
|
function ko(e, t) {
|
|
2677
2677
|
let s = wo(e);
|
|
2678
|
-
return
|
|
2678
|
+
return Md.has(s) || (s = xe), s.getAnimatableNone ? s.getAnimatableNone(t) : void 0;
|
|
2679
2679
|
}
|
|
2680
|
-
const
|
|
2681
|
-
function
|
|
2680
|
+
const Ed = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
2681
|
+
function Vd(e, t, s) {
|
|
2682
2682
|
let n = 0, r;
|
|
2683
2683
|
for (; n < e.length && !r; ) {
|
|
2684
2684
|
const o = e[n];
|
|
2685
|
-
typeof o == "string" && !
|
|
2685
|
+
typeof o == "string" && !Ed.has(o) && et(o).values.length && (r = e[n]), n++;
|
|
2686
2686
|
}
|
|
2687
2687
|
if (r && s)
|
|
2688
2688
|
for (const o of t)
|
|
2689
2689
|
e[o] = ko(s, r);
|
|
2690
2690
|
}
|
|
2691
|
-
class
|
|
2691
|
+
class Rd extends bn {
|
|
2692
2692
|
constructor(t, s, n, r, o) {
|
|
2693
2693
|
super(t, s, n, r, o, !0);
|
|
2694
2694
|
}
|
|
@@ -2697,33 +2697,33 @@ class Ru extends bn {
|
|
|
2697
2697
|
if (!s || !s.current)
|
|
2698
2698
|
return;
|
|
2699
2699
|
super.readKeyframes();
|
|
2700
|
-
for (let
|
|
2701
|
-
let f = t[
|
|
2700
|
+
for (let u = 0; u < t.length; u++) {
|
|
2701
|
+
let f = t[u];
|
|
2702
2702
|
if (typeof f == "string" && (f = f.trim(), hn(f))) {
|
|
2703
2703
|
const h = ho(f, s.current);
|
|
2704
|
-
h !== void 0 && (t[
|
|
2704
|
+
h !== void 0 && (t[u] = h), u === t.length - 1 && (this.finalKeyframe = f);
|
|
2705
2705
|
}
|
|
2706
2706
|
}
|
|
2707
2707
|
if (this.resolveNoneKeyframes(), !po.has(n) || t.length !== 2)
|
|
2708
2708
|
return;
|
|
2709
|
-
const [r, o] = t, i = or(r), a = or(o), c = Kn(r),
|
|
2710
|
-
if (c !==
|
|
2709
|
+
const [r, o] = t, i = or(r), a = or(o), c = Kn(r), d = Kn(o);
|
|
2710
|
+
if (c !== d && Re[n]) {
|
|
2711
2711
|
this.needsMeasurement = !0;
|
|
2712
2712
|
return;
|
|
2713
2713
|
}
|
|
2714
2714
|
if (i !== a)
|
|
2715
2715
|
if (tr(i) && tr(a))
|
|
2716
|
-
for (let
|
|
2717
|
-
const f = t[
|
|
2718
|
-
typeof f == "string" && (t[
|
|
2716
|
+
for (let u = 0; u < t.length; u++) {
|
|
2717
|
+
const f = t[u];
|
|
2718
|
+
typeof f == "string" && (t[u] = parseFloat(f));
|
|
2719
2719
|
}
|
|
2720
2720
|
else Re[n] && (this.needsMeasurement = !0);
|
|
2721
2721
|
}
|
|
2722
2722
|
resolveNoneKeyframes() {
|
|
2723
2723
|
const { unresolvedKeyframes: t, name: s } = this, n = [];
|
|
2724
2724
|
for (let r = 0; r < t.length; r++)
|
|
2725
|
-
(t[r] === null ||
|
|
2726
|
-
n.length &&
|
|
2725
|
+
(t[r] === null || Td(t[r])) && n.push(r);
|
|
2726
|
+
n.length && Vd(t, n, s);
|
|
2727
2727
|
}
|
|
2728
2728
|
measureInitialState() {
|
|
2729
2729
|
const { element: t, unresolvedKeyframes: s, name: n } = this;
|
|
@@ -2741,8 +2741,8 @@ class Ru extends bn {
|
|
|
2741
2741
|
const r = t.getValue(s);
|
|
2742
2742
|
r && r.jump(this.measuredOrigin, !1);
|
|
2743
2743
|
const o = n.length - 1, i = n[o];
|
|
2744
|
-
n[o] = Re[s](t.measureViewportBox(), window.getComputedStyle(t.current)), i !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = i), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c,
|
|
2745
|
-
t.getValue(c).set(
|
|
2744
|
+
n[o] = Re[s](t.measureViewportBox(), window.getComputedStyle(t.current)), i !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = i), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c, d]) => {
|
|
2745
|
+
t.getValue(c).set(d);
|
|
2746
2746
|
}), this.resolveNoneKeyframes();
|
|
2747
2747
|
}
|
|
2748
2748
|
}
|
|
@@ -2769,7 +2769,7 @@ const { schedule: Sn } = /* @__PURE__ */ Wi(queueMicrotask, !1), ye = {
|
|
|
2769
2769
|
function So() {
|
|
2770
2770
|
return ye.x || ye.y;
|
|
2771
2771
|
}
|
|
2772
|
-
function
|
|
2772
|
+
function Dd(e) {
|
|
2773
2773
|
return e === "x" || e === "y" ? ye[e] ? null : (ye[e] = !0, () => {
|
|
2774
2774
|
ye[e] = !1;
|
|
2775
2775
|
}) : ye.x || ye.y ? null : (ye.x = ye.y = !0, () => {
|
|
@@ -2784,17 +2784,17 @@ function Co(e, t) {
|
|
|
2784
2784
|
};
|
|
2785
2785
|
return [s, r, () => n.abort()];
|
|
2786
2786
|
}
|
|
2787
|
-
function
|
|
2787
|
+
function Ld(e) {
|
|
2788
2788
|
return !(e.pointerType === "touch" || So());
|
|
2789
2789
|
}
|
|
2790
|
-
function
|
|
2790
|
+
function Id(e, t, s = {}) {
|
|
2791
2791
|
const [n, r, o] = Co(e, s);
|
|
2792
2792
|
return n.forEach((i) => {
|
|
2793
|
-
let a = !1, c = !1,
|
|
2794
|
-
const
|
|
2793
|
+
let a = !1, c = !1, d;
|
|
2794
|
+
const u = () => {
|
|
2795
2795
|
i.removeEventListener("pointerleave", g);
|
|
2796
2796
|
}, f = (y) => {
|
|
2797
|
-
|
|
2797
|
+
d && (d(y), d = void 0), u();
|
|
2798
2798
|
}, h = (y) => {
|
|
2799
2799
|
a = !1, window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", h), c && (c = !1, f(y));
|
|
2800
2800
|
}, m = () => {
|
|
@@ -2808,28 +2808,28 @@ function Iu(e, t, s = {}) {
|
|
|
2808
2808
|
f(y);
|
|
2809
2809
|
}
|
|
2810
2810
|
}, p = (y) => {
|
|
2811
|
-
if (!
|
|
2811
|
+
if (!Ld(y))
|
|
2812
2812
|
return;
|
|
2813
2813
|
c = !1;
|
|
2814
2814
|
const w = t(i, y);
|
|
2815
|
-
typeof w == "function" && (
|
|
2815
|
+
typeof w == "function" && (d = w, i.addEventListener("pointerleave", g, r));
|
|
2816
2816
|
};
|
|
2817
2817
|
i.addEventListener("pointerenter", p, r), i.addEventListener("pointerdown", m, r);
|
|
2818
2818
|
}), o;
|
|
2819
2819
|
}
|
|
2820
|
-
const Ao = (e, t) => t ? e === t ? !0 : Ao(e, t.parentElement) : !1, Cn = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1,
|
|
2820
|
+
const Ao = (e, t) => t ? e === t ? !0 : Ao(e, t.parentElement) : !1, Cn = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, zd = /* @__PURE__ */ new Set([
|
|
2821
2821
|
"BUTTON",
|
|
2822
2822
|
"INPUT",
|
|
2823
2823
|
"SELECT",
|
|
2824
2824
|
"TEXTAREA",
|
|
2825
2825
|
"A"
|
|
2826
2826
|
]);
|
|
2827
|
-
function
|
|
2828
|
-
return
|
|
2827
|
+
function Od(e) {
|
|
2828
|
+
return zd.has(e.tagName) || e.isContentEditable === !0;
|
|
2829
2829
|
}
|
|
2830
|
-
const
|
|
2831
|
-
function
|
|
2832
|
-
return
|
|
2830
|
+
const Fd = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA"]);
|
|
2831
|
+
function Bd(e) {
|
|
2832
|
+
return Fd.has(e.tagName) || e.isContentEditable === !0;
|
|
2833
2833
|
}
|
|
2834
2834
|
const zt = /* @__PURE__ */ new WeakSet();
|
|
2835
2835
|
function lr(e) {
|
|
@@ -2840,7 +2840,7 @@ function lr(e) {
|
|
|
2840
2840
|
function ys(e, t) {
|
|
2841
2841
|
e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
|
|
2842
2842
|
}
|
|
2843
|
-
const
|
|
2843
|
+
const _d = (e, t) => {
|
|
2844
2844
|
const s = e.currentTarget;
|
|
2845
2845
|
if (!s)
|
|
2846
2846
|
return;
|
|
@@ -2858,24 +2858,24 @@ const _u = (e, t) => {
|
|
|
2858
2858
|
function cr(e) {
|
|
2859
2859
|
return Cn(e) && !So();
|
|
2860
2860
|
}
|
|
2861
|
-
const
|
|
2862
|
-
function $
|
|
2861
|
+
const dr = /* @__PURE__ */ new WeakSet();
|
|
2862
|
+
function $d(e, t, s = {}) {
|
|
2863
2863
|
const [n, r, o] = Co(e, s), i = (a) => {
|
|
2864
2864
|
const c = a.currentTarget;
|
|
2865
|
-
if (!cr(a) ||
|
|
2865
|
+
if (!cr(a) || dr.has(a))
|
|
2866
2866
|
return;
|
|
2867
|
-
zt.add(c), s.stopPropagation &&
|
|
2868
|
-
const
|
|
2869
|
-
window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", h), zt.has(c) && zt.delete(c), cr(m) && typeof
|
|
2867
|
+
zt.add(c), s.stopPropagation && dr.add(a);
|
|
2868
|
+
const d = t(c, a), u = (m, g) => {
|
|
2869
|
+
window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", h), zt.has(c) && zt.delete(c), cr(m) && typeof d == "function" && d(m, { success: g });
|
|
2870
2870
|
}, f = (m) => {
|
|
2871
|
-
|
|
2871
|
+
u(m, c === window || c === document || s.useGlobalTarget || Ao(c, m.target));
|
|
2872
2872
|
}, h = (m) => {
|
|
2873
|
-
|
|
2873
|
+
u(m, !1);
|
|
2874
2874
|
};
|
|
2875
2875
|
window.addEventListener("pointerup", f, r), window.addEventListener("pointercancel", h, r);
|
|
2876
2876
|
};
|
|
2877
2877
|
return n.forEach((a) => {
|
|
2878
|
-
(s.useGlobalTarget ? window : a).addEventListener("pointerdown", i, r), It(a) && (a.addEventListener("focus", (
|
|
2878
|
+
(s.useGlobalTarget ? window : a).addEventListener("pointerdown", i, r), It(a) && (a.addEventListener("focus", (d) => _d(d, r)), !Od(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
2879
2879
|
}), o;
|
|
2880
2880
|
}
|
|
2881
2881
|
function An(e) {
|
|
@@ -2883,28 +2883,28 @@ function An(e) {
|
|
|
2883
2883
|
}
|
|
2884
2884
|
const Ot = /* @__PURE__ */ new WeakMap();
|
|
2885
2885
|
let Ve;
|
|
2886
|
-
const No = (e, t, s) => (n, r) => r && r[0] ? r[0][e + "Size"] : An(n) && "getBBox" in n ? n.getBBox()[t] : n[s],
|
|
2887
|
-
function
|
|
2886
|
+
const No = (e, t, s) => (n, r) => r && r[0] ? r[0][e + "Size"] : An(n) && "getBBox" in n ? n.getBBox()[t] : n[s], Wd = /* @__PURE__ */ No("inline", "width", "offsetWidth"), Ud = /* @__PURE__ */ No("block", "height", "offsetHeight");
|
|
2887
|
+
function Gd({ target: e, borderBoxSize: t }) {
|
|
2888
2888
|
var s;
|
|
2889
2889
|
(s = Ot.get(e)) == null || s.forEach((n) => {
|
|
2890
2890
|
n(e, {
|
|
2891
2891
|
get width() {
|
|
2892
|
-
return
|
|
2892
|
+
return Wd(e, t);
|
|
2893
2893
|
},
|
|
2894
2894
|
get height() {
|
|
2895
|
-
return
|
|
2895
|
+
return Ud(e, t);
|
|
2896
2896
|
}
|
|
2897
2897
|
});
|
|
2898
2898
|
});
|
|
2899
2899
|
}
|
|
2900
|
-
function
|
|
2901
|
-
e.forEach(
|
|
2900
|
+
function Kd(e) {
|
|
2901
|
+
e.forEach(Gd);
|
|
2902
2902
|
}
|
|
2903
|
-
function
|
|
2904
|
-
typeof ResizeObserver > "u" || (Ve = new ResizeObserver(
|
|
2903
|
+
function Yd() {
|
|
2904
|
+
typeof ResizeObserver > "u" || (Ve = new ResizeObserver(Kd));
|
|
2905
2905
|
}
|
|
2906
|
-
function
|
|
2907
|
-
Ve ||
|
|
2906
|
+
function Hd(e, t) {
|
|
2907
|
+
Ve || Yd();
|
|
2908
2908
|
const s = jo(e);
|
|
2909
2909
|
return s.forEach((n) => {
|
|
2910
2910
|
let r = Ot.get(n);
|
|
@@ -2918,7 +2918,7 @@ function Hu(e, t) {
|
|
|
2918
2918
|
}
|
|
2919
2919
|
const Ft = /* @__PURE__ */ new Set();
|
|
2920
2920
|
let Je;
|
|
2921
|
-
function
|
|
2921
|
+
function Xd() {
|
|
2922
2922
|
Je = () => {
|
|
2923
2923
|
const e = {
|
|
2924
2924
|
get width() {
|
|
@@ -2931,18 +2931,18 @@ function Xu() {
|
|
|
2931
2931
|
Ft.forEach((t) => t(e));
|
|
2932
2932
|
}, window.addEventListener("resize", Je);
|
|
2933
2933
|
}
|
|
2934
|
-
function
|
|
2935
|
-
return Ft.add(e), Je ||
|
|
2934
|
+
function qd(e) {
|
|
2935
|
+
return Ft.add(e), Je || Xd(), () => {
|
|
2936
2936
|
Ft.delete(e), !Ft.size && typeof Je == "function" && (window.removeEventListener("resize", Je), Je = void 0);
|
|
2937
2937
|
};
|
|
2938
2938
|
}
|
|
2939
|
-
function
|
|
2940
|
-
return typeof e == "function" ?
|
|
2939
|
+
function ur(e, t) {
|
|
2940
|
+
return typeof e == "function" ? qd(e) : Hd(e, t);
|
|
2941
2941
|
}
|
|
2942
|
-
function
|
|
2942
|
+
function Zd(e) {
|
|
2943
2943
|
return An(e) && e.tagName === "svg";
|
|
2944
2944
|
}
|
|
2945
|
-
const
|
|
2945
|
+
const Jd = [...vo, J, xe], Qd = (e) => Jd.find(bo(e)), fr = () => ({
|
|
2946
2946
|
translate: 0,
|
|
2947
2947
|
scale: 1,
|
|
2948
2948
|
origin: 0,
|
|
@@ -2953,7 +2953,7 @@ const Ju = [...vo, J, xe], Qu = (e) => Ju.find(bo(e)), fr = () => ({
|
|
|
2953
2953
|
}), hr = () => ({ min: 0, max: 0 }), se = () => ({
|
|
2954
2954
|
x: hr(),
|
|
2955
2955
|
y: hr()
|
|
2956
|
-
}),
|
|
2956
|
+
}), eu = /* @__PURE__ */ new WeakMap();
|
|
2957
2957
|
function as(e) {
|
|
2958
2958
|
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
2959
2959
|
}
|
|
@@ -2975,7 +2975,7 @@ function ls(e) {
|
|
|
2975
2975
|
function Po(e) {
|
|
2976
2976
|
return !!(ls(e) || e.variants);
|
|
2977
2977
|
}
|
|
2978
|
-
function
|
|
2978
|
+
function tu(e, t, s) {
|
|
2979
2979
|
for (const n in t) {
|
|
2980
2980
|
const r = t[n], o = s[n];
|
|
2981
2981
|
if (oe(r))
|
|
@@ -2995,9 +2995,9 @@ function td(e, t, s) {
|
|
|
2995
2995
|
t[n] === void 0 && e.removeValue(n);
|
|
2996
2996
|
return t;
|
|
2997
2997
|
}
|
|
2998
|
-
const Ks = { current: null }, Mo = { current: !1 },
|
|
2999
|
-
function
|
|
3000
|
-
if (Mo.current = !0, !!
|
|
2998
|
+
const Ks = { current: null }, Mo = { current: !1 }, su = typeof window < "u";
|
|
2999
|
+
function nu() {
|
|
3000
|
+
if (Mo.current = !0, !!su)
|
|
3001
3001
|
if (window.matchMedia) {
|
|
3002
3002
|
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => Ks.current = e.matches;
|
|
3003
3003
|
e.addEventListener("change", t), t();
|
|
@@ -3017,10 +3017,10 @@ let Jt = {};
|
|
|
3017
3017
|
function Eo(e) {
|
|
3018
3018
|
Jt = e;
|
|
3019
3019
|
}
|
|
3020
|
-
function
|
|
3020
|
+
function ru() {
|
|
3021
3021
|
return Jt;
|
|
3022
3022
|
}
|
|
3023
|
-
class
|
|
3023
|
+
class iu {
|
|
3024
3024
|
/**
|
|
3025
3025
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
3026
3026
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -3038,12 +3038,12 @@ class id {
|
|
|
3038
3038
|
const m = ce.now();
|
|
3039
3039
|
this.renderScheduledAt < m && (this.renderScheduledAt = m, F.render(this.render, !1, !0));
|
|
3040
3040
|
};
|
|
3041
|
-
const { latestValues:
|
|
3042
|
-
this.latestValues =
|
|
3041
|
+
const { latestValues: d, renderState: u } = a;
|
|
3042
|
+
this.latestValues = d, this.baseTarget = { ...d }, this.initialValues = s.initial ? { ...d } : {}, this.renderState = u, this.parent = t, this.props = s, this.presenceContext = n, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = o, this.options = c, this.blockInitialAnimation = !!i, this.isControllingVariants = ls(s), this.isVariantNode = Po(s), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
3043
3043
|
const { willChange: f, ...h } = this.scrapeMotionValuesFromProps(s, {}, this);
|
|
3044
3044
|
for (const m in h) {
|
|
3045
3045
|
const g = h[m];
|
|
3046
|
-
|
|
3046
|
+
d[m] !== void 0 && oe(g) && g.set(d[m]);
|
|
3047
3047
|
}
|
|
3048
3048
|
}
|
|
3049
3049
|
mount(t) {
|
|
@@ -3051,7 +3051,7 @@ class id {
|
|
|
3051
3051
|
if (this.hasBeenMounted)
|
|
3052
3052
|
for (const r in this.initialValues)
|
|
3053
3053
|
(s = this.values.get(r)) == null || s.jump(this.initialValues[r]), this.latestValues[r] = this.initialValues[r];
|
|
3054
|
-
this.current = t,
|
|
3054
|
+
this.current = t, eu.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((r, o) => this.bindToMotionValue(o, r)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Mo.current || nu(), this.shouldReduceMotion = Ks.current), process.env.NODE_ENV !== "production" && dn(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, (n = this.parent) == null || n.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
3055
3055
|
}
|
|
3056
3056
|
unmount() {
|
|
3057
3057
|
var t;
|
|
@@ -3072,13 +3072,13 @@ class id {
|
|
|
3072
3072
|
}
|
|
3073
3073
|
bindToMotionValue(t, s) {
|
|
3074
3074
|
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), s.accelerate && uo.has(t) && this.current instanceof HTMLElement) {
|
|
3075
|
-
const { factory: i, keyframes: a, times: c, ease:
|
|
3075
|
+
const { factory: i, keyframes: a, times: c, ease: d, duration: u } = s.accelerate, f = new lo({
|
|
3076
3076
|
element: this.current,
|
|
3077
3077
|
name: t,
|
|
3078
3078
|
keyframes: a,
|
|
3079
3079
|
times: c,
|
|
3080
|
-
ease:
|
|
3081
|
-
duration: /* @__PURE__ */
|
|
3080
|
+
ease: d,
|
|
3081
|
+
duration: /* @__PURE__ */ ue(u)
|
|
3082
3082
|
}), h = i(f);
|
|
3083
3083
|
this.valueSubscriptions.set(t, () => {
|
|
3084
3084
|
h(), f.cancel();
|
|
@@ -3140,7 +3140,7 @@ class id {
|
|
|
3140
3140
|
const o = "on" + r, i = t[o];
|
|
3141
3141
|
i && (this.propEventSubscriptions[r] = this.on(r, i));
|
|
3142
3142
|
}
|
|
3143
|
-
this.prevMotionValues =
|
|
3143
|
+
this.prevMotionValues = tu(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
3144
3144
|
}
|
|
3145
3145
|
getProps() {
|
|
3146
3146
|
return this.props;
|
|
@@ -3205,7 +3205,7 @@ class id {
|
|
|
3205
3205
|
*/
|
|
3206
3206
|
readValue(t, s) {
|
|
3207
3207
|
let n = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
3208
|
-
return n != null && (typeof n == "string" && (Ni(n) || Mi(n)) ? n = parseFloat(n) : !
|
|
3208
|
+
return n != null && (typeof n == "string" && (Ni(n) || Mi(n)) ? n = parseFloat(n) : !Qd(n) && xe.test(s) && (n = ko(t, s)), this.setBaseTarget(t, oe(n) ? n.get() : n)), oe(n) ? n.get() : n;
|
|
3209
3209
|
}
|
|
3210
3210
|
/**
|
|
3211
3211
|
* Set the base target to later animate back to. This is currently
|
|
@@ -3241,9 +3241,9 @@ class id {
|
|
|
3241
3241
|
Sn.render(this.render);
|
|
3242
3242
|
}
|
|
3243
3243
|
}
|
|
3244
|
-
class Vo extends
|
|
3244
|
+
class Vo extends iu {
|
|
3245
3245
|
constructor() {
|
|
3246
|
-
super(...arguments), this.KeyframeResolver =
|
|
3246
|
+
super(...arguments), this.KeyframeResolver = Rd;
|
|
3247
3247
|
}
|
|
3248
3248
|
sortInstanceNodePosition(t, s) {
|
|
3249
3249
|
return t.compareDocumentPosition(s) & 2 ? 1 : -1;
|
|
@@ -3276,10 +3276,10 @@ function Ro({ top: e, left: t, right: s, bottom: n }) {
|
|
|
3276
3276
|
y: { min: e, max: n }
|
|
3277
3277
|
};
|
|
3278
3278
|
}
|
|
3279
|
-
function
|
|
3279
|
+
function ou({ x: e, y: t }) {
|
|
3280
3280
|
return { top: t.min, right: e.max, bottom: t.max, left: e.min };
|
|
3281
3281
|
}
|
|
3282
|
-
function
|
|
3282
|
+
function au(e, t) {
|
|
3283
3283
|
if (!t)
|
|
3284
3284
|
return e;
|
|
3285
3285
|
const s = t({ x: e.left, y: e.top }), n = t({ x: e.right, y: e.bottom });
|
|
@@ -3319,7 +3319,7 @@ function Lo(e, { x: t, y: s }) {
|
|
|
3319
3319
|
Hs(e.x, t.translate, t.scale, t.originPoint), Hs(e.y, s.translate, s.scale, s.originPoint);
|
|
3320
3320
|
}
|
|
3321
3321
|
const yr = 0.999999999999, xr = 1.0000000000001;
|
|
3322
|
-
function
|
|
3322
|
+
function lu(e, t, s, n = !1) {
|
|
3323
3323
|
var a;
|
|
3324
3324
|
const r = s.length;
|
|
3325
3325
|
if (!r)
|
|
@@ -3328,8 +3328,8 @@ function ld(e, t, s, n = !1) {
|
|
|
3328
3328
|
let o, i;
|
|
3329
3329
|
for (let c = 0; c < r; c++) {
|
|
3330
3330
|
o = s[c], i = o.projectionDelta;
|
|
3331
|
-
const { visualElement:
|
|
3332
|
-
|
|
3331
|
+
const { visualElement: d } = o.options;
|
|
3332
|
+
d && d.props.style && d.props.style.display === "contents" || (n && o.options.layoutScroll && o.scroll && o !== o.root && (we(e.x, -o.scroll.offset.x), we(e.y, -o.scroll.offset.y)), i && (t.x *= i.x.scale, t.y *= i.y.scale, Lo(e, i)), n && _e(o.latestValues) && Bt(e, o.latestValues, (a = o.layout) == null ? void 0 : a.layoutBox));
|
|
3333
3333
|
}
|
|
3334
3334
|
t.x < xr && t.x > yr && (t.x = 1), t.y < xr && t.y > yr && (t.y = 1);
|
|
3335
3335
|
}
|
|
@@ -3348,21 +3348,21 @@ function Bt(e, t, s) {
|
|
|
3348
3348
|
br(e.x, vr(t.x, n.x), t.scaleX, t.scale, t.originX), br(e.y, vr(t.y, n.y), t.scaleY, t.scale, t.originY);
|
|
3349
3349
|
}
|
|
3350
3350
|
function Io(e, t) {
|
|
3351
|
-
return Ro(
|
|
3351
|
+
return Ro(au(e.getBoundingClientRect(), t));
|
|
3352
3352
|
}
|
|
3353
|
-
function
|
|
3353
|
+
function cu(e, t, s) {
|
|
3354
3354
|
const n = Io(e, s), { scroll: r } = t;
|
|
3355
3355
|
return r && (we(n.x, r.offset.x), we(n.y, r.offset.y)), n;
|
|
3356
3356
|
}
|
|
3357
|
-
const
|
|
3357
|
+
const du = {
|
|
3358
3358
|
x: "translateX",
|
|
3359
3359
|
y: "translateY",
|
|
3360
3360
|
z: "translateZ",
|
|
3361
3361
|
transformPerspective: "perspective"
|
|
3362
|
-
},
|
|
3363
|
-
function
|
|
3362
|
+
}, uu = rt.length;
|
|
3363
|
+
function fu(e, t, s) {
|
|
3364
3364
|
let n = "", r = !0;
|
|
3365
|
-
for (let o = 0; o <
|
|
3365
|
+
for (let o = 0; o < uu; o++) {
|
|
3366
3366
|
const i = rt[o], a = e[i];
|
|
3367
3367
|
if (a === void 0)
|
|
3368
3368
|
continue;
|
|
@@ -3370,17 +3370,17 @@ function fd(e, t, s) {
|
|
|
3370
3370
|
if (typeof a == "number")
|
|
3371
3371
|
c = a === (i.startsWith("scale") ? 1 : 0);
|
|
3372
3372
|
else {
|
|
3373
|
-
const
|
|
3374
|
-
c = i.startsWith("scale") ?
|
|
3373
|
+
const d = parseFloat(a);
|
|
3374
|
+
c = i.startsWith("scale") ? d === 1 : d === 0;
|
|
3375
3375
|
}
|
|
3376
3376
|
if (!c || s) {
|
|
3377
|
-
const
|
|
3377
|
+
const d = To(a, Tn[i]);
|
|
3378
3378
|
if (!c) {
|
|
3379
3379
|
r = !1;
|
|
3380
|
-
const
|
|
3381
|
-
n += `${
|
|
3380
|
+
const u = du[i] || i;
|
|
3381
|
+
n += `${u}(${d}) `;
|
|
3382
3382
|
}
|
|
3383
|
-
s && (t[i] =
|
|
3383
|
+
s && (t[i] = d);
|
|
3384
3384
|
}
|
|
3385
3385
|
}
|
|
3386
3386
|
return n = n.trim(), s ? n = s(t, r ? "" : n) : r && (n = "none"), n;
|
|
@@ -3389,21 +3389,21 @@ function Mn(e, t, s) {
|
|
|
3389
3389
|
const { style: n, vars: r, transformOrigin: o } = e;
|
|
3390
3390
|
let i = !1, a = !1;
|
|
3391
3391
|
for (const c in t) {
|
|
3392
|
-
const
|
|
3392
|
+
const d = t[c];
|
|
3393
3393
|
if (it.has(c)) {
|
|
3394
3394
|
i = !0;
|
|
3395
3395
|
continue;
|
|
3396
3396
|
} else if (Gi(c)) {
|
|
3397
|
-
r[c] =
|
|
3397
|
+
r[c] = d;
|
|
3398
3398
|
continue;
|
|
3399
3399
|
} else {
|
|
3400
|
-
const
|
|
3401
|
-
c.startsWith("origin") ? (a = !0, o[c] =
|
|
3400
|
+
const u = To(d, Tn[c]);
|
|
3401
|
+
c.startsWith("origin") ? (a = !0, o[c] = u) : n[c] = u;
|
|
3402
3402
|
}
|
|
3403
3403
|
}
|
|
3404
|
-
if (t.transform || (i || s ? n.transform =
|
|
3405
|
-
const { originX: c = "50%", originY:
|
|
3406
|
-
n.transformOrigin = `${c} ${
|
|
3404
|
+
if (t.transform || (i || s ? n.transform = fu(t, e.transform, s) : n.transform && (n.transform = "none")), a) {
|
|
3405
|
+
const { originX: c = "50%", originY: d = "50%", originZ: u = 0 } = o;
|
|
3406
|
+
n.transformOrigin = `${c} ${d} ${u}`;
|
|
3407
3407
|
}
|
|
3408
3408
|
}
|
|
3409
3409
|
function zo(e, { style: t, vars: s }, n, r) {
|
|
@@ -3430,15 +3430,15 @@ const lt = {
|
|
|
3430
3430
|
const s = wr(e, t.target.x), n = wr(e, t.target.y);
|
|
3431
3431
|
return `${s}% ${n}%`;
|
|
3432
3432
|
}
|
|
3433
|
-
},
|
|
3433
|
+
}, hu = {
|
|
3434
3434
|
correct: (e, { treeScale: t, projectionDelta: s }) => {
|
|
3435
3435
|
const n = e, r = xe.parse(e);
|
|
3436
3436
|
if (r.length > 5)
|
|
3437
3437
|
return n;
|
|
3438
3438
|
const o = xe.createTransformer(e), i = typeof r[0] != "number" ? 1 : 0, a = s.x.scale * t.x, c = s.y.scale * t.y;
|
|
3439
3439
|
r[0 + i] /= a, r[1 + i] /= c;
|
|
3440
|
-
const
|
|
3441
|
-
return typeof r[2 + i] == "number" && (r[2 + i] /=
|
|
3440
|
+
const d = W(a, c, 0.5);
|
|
3441
|
+
return typeof r[2 + i] == "number" && (r[2 + i] /= d), typeof r[3 + i] == "number" && (r[3 + i] /= d), o(r);
|
|
3442
3442
|
}
|
|
3443
3443
|
}, Xs = {
|
|
3444
3444
|
borderRadius: {
|
|
@@ -3454,7 +3454,7 @@ const lt = {
|
|
|
3454
3454
|
borderTopRightRadius: lt,
|
|
3455
3455
|
borderBottomLeftRadius: lt,
|
|
3456
3456
|
borderBottomRightRadius: lt,
|
|
3457
|
-
boxShadow:
|
|
3457
|
+
boxShadow: hu
|
|
3458
3458
|
};
|
|
3459
3459
|
function Oo(e, { layout: t, layoutId: s }) {
|
|
3460
3460
|
return it.has(e) || e.startsWith("origin") || (t || s !== void 0) && (!!Xs[e] || e === "opacity");
|
|
@@ -3468,10 +3468,10 @@ function En(e, t, s) {
|
|
|
3468
3468
|
(oe(n[a]) || r && oe(r[a]) || Oo(a, e) || ((i = s == null ? void 0 : s.getValue(a)) == null ? void 0 : i.liveStyle) !== void 0) && (o[a] = n[a]);
|
|
3469
3469
|
return o;
|
|
3470
3470
|
}
|
|
3471
|
-
function
|
|
3471
|
+
function mu(e) {
|
|
3472
3472
|
return window.getComputedStyle(e);
|
|
3473
3473
|
}
|
|
3474
|
-
class
|
|
3474
|
+
class pu extends Vo {
|
|
3475
3475
|
constructor() {
|
|
3476
3476
|
super(...arguments), this.type = "html", this.renderInstance = zo;
|
|
3477
3477
|
}
|
|
@@ -3480,7 +3480,7 @@ class pd extends Vo {
|
|
|
3480
3480
|
if (it.has(s))
|
|
3481
3481
|
return (n = this.projection) != null && n.isProjecting ? Ls(s) : Dc(t, s);
|
|
3482
3482
|
{
|
|
3483
|
-
const r =
|
|
3483
|
+
const r = mu(t), o = (Gi(s) ? r.getPropertyValue(s) : r[s]) || 0;
|
|
3484
3484
|
return typeof o == "string" ? o.trim() : o;
|
|
3485
3485
|
}
|
|
3486
3486
|
}
|
|
@@ -3494,19 +3494,19 @@ class pd extends Vo {
|
|
|
3494
3494
|
return En(t, s, n);
|
|
3495
3495
|
}
|
|
3496
3496
|
}
|
|
3497
|
-
const
|
|
3497
|
+
const gu = {
|
|
3498
3498
|
offset: "stroke-dashoffset",
|
|
3499
3499
|
array: "stroke-dasharray"
|
|
3500
|
-
},
|
|
3500
|
+
}, yu = {
|
|
3501
3501
|
offset: "strokeDashoffset",
|
|
3502
3502
|
array: "strokeDasharray"
|
|
3503
3503
|
};
|
|
3504
|
-
function
|
|
3504
|
+
function xu(e, t, s = 1, n = 0, r = !0) {
|
|
3505
3505
|
e.pathLength = 1;
|
|
3506
|
-
const o = r ?
|
|
3506
|
+
const o = r ? gu : yu;
|
|
3507
3507
|
e[o.offset] = `${-n}`, e[o.array] = `${t} ${s}`;
|
|
3508
3508
|
}
|
|
3509
|
-
const
|
|
3509
|
+
const bu = [
|
|
3510
3510
|
"offsetDistance",
|
|
3511
3511
|
"offsetPath",
|
|
3512
3512
|
"offsetRotate",
|
|
@@ -3521,17 +3521,17 @@ function Fo(e, {
|
|
|
3521
3521
|
pathOffset: i = 0,
|
|
3522
3522
|
// This is object creation, which we try to avoid per-frame.
|
|
3523
3523
|
...a
|
|
3524
|
-
}, c,
|
|
3525
|
-
if (Mn(e, a,
|
|
3524
|
+
}, c, d, u) {
|
|
3525
|
+
if (Mn(e, a, d), c) {
|
|
3526
3526
|
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
|
|
3527
3527
|
return;
|
|
3528
3528
|
}
|
|
3529
3529
|
e.attrs = e.style, e.style = {};
|
|
3530
3530
|
const { attrs: f, style: h } = e;
|
|
3531
|
-
f.transform && (h.transform = f.transform, delete f.transform), (h.transform || f.transformOrigin) && (h.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), h.transform && (h.transformBox = (
|
|
3532
|
-
for (const m of
|
|
3531
|
+
f.transform && (h.transform = f.transform, delete f.transform), (h.transform || f.transformOrigin) && (h.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), h.transform && (h.transformBox = (u == null ? void 0 : u.transformBox) ?? "fill-box", delete f.transformBox);
|
|
3532
|
+
for (const m of bu)
|
|
3533
3533
|
f[m] !== void 0 && (h[m] = f[m], delete f[m]);
|
|
3534
|
-
t !== void 0 && (f.x = t), s !== void 0 && (f.y = s), n !== void 0 && (f.scale = n), r !== void 0 &&
|
|
3534
|
+
t !== void 0 && (f.x = t), s !== void 0 && (f.y = s), n !== void 0 && (f.scale = n), r !== void 0 && xu(f, r, o, i, !1);
|
|
3535
3535
|
}
|
|
3536
3536
|
const Bo = /* @__PURE__ */ new Set([
|
|
3537
3537
|
"baseFrequency",
|
|
@@ -3558,7 +3558,7 @@ const Bo = /* @__PURE__ */ new Set([
|
|
|
3558
3558
|
"textLength",
|
|
3559
3559
|
"lengthAdjust"
|
|
3560
3560
|
]), _o = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
3561
|
-
function
|
|
3561
|
+
function vu(e, t, s, n) {
|
|
3562
3562
|
zo(e, t, void 0, n);
|
|
3563
3563
|
for (const r in t.attrs)
|
|
3564
3564
|
e.setAttribute(Bo.has(r) ? r : jn(r), t.attrs[r]);
|
|
@@ -3572,7 +3572,7 @@ function $o(e, t, s) {
|
|
|
3572
3572
|
}
|
|
3573
3573
|
return n;
|
|
3574
3574
|
}
|
|
3575
|
-
class
|
|
3575
|
+
class wu extends Vo {
|
|
3576
3576
|
constructor() {
|
|
3577
3577
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = se;
|
|
3578
3578
|
}
|
|
@@ -3593,13 +3593,13 @@ class wd extends Vo {
|
|
|
3593
3593
|
Fo(t, s, this.isSVGTag, n.transformTemplate, n.style);
|
|
3594
3594
|
}
|
|
3595
3595
|
renderInstance(t, s, n, r) {
|
|
3596
|
-
|
|
3596
|
+
vu(t, s, n, r);
|
|
3597
3597
|
}
|
|
3598
3598
|
mount(t) {
|
|
3599
3599
|
this.isSVGTag = _o(t.tagName), super.mount(t);
|
|
3600
3600
|
}
|
|
3601
3601
|
}
|
|
3602
|
-
const
|
|
3602
|
+
const ku = Pn.length;
|
|
3603
3603
|
function Wo(e) {
|
|
3604
3604
|
if (!e)
|
|
3605
3605
|
return;
|
|
@@ -3608,7 +3608,7 @@ function Wo(e) {
|
|
|
3608
3608
|
return e.props.initial !== void 0 && (s.initial = e.props.initial), s;
|
|
3609
3609
|
}
|
|
3610
3610
|
const t = {};
|
|
3611
|
-
for (let s = 0; s <
|
|
3611
|
+
for (let s = 0; s < ku; s++) {
|
|
3612
3612
|
const n = Pn[s], r = e.props[n];
|
|
3613
3613
|
(gt(r) || r === !1) && (t[n] = r);
|
|
3614
3614
|
}
|
|
@@ -3625,31 +3625,31 @@ function Uo(e, t) {
|
|
|
3625
3625
|
return !1;
|
|
3626
3626
|
return !0;
|
|
3627
3627
|
}
|
|
3628
|
-
const
|
|
3629
|
-
function
|
|
3630
|
-
return (t) => Promise.all(t.map(({ animation: s, options: n }) =>
|
|
3628
|
+
const ju = [...Nn].reverse(), Tu = Nn.length;
|
|
3629
|
+
function Su(e) {
|
|
3630
|
+
return (t) => Promise.all(t.map(({ animation: s, options: n }) => kd(e, s, n)));
|
|
3631
3631
|
}
|
|
3632
|
-
function
|
|
3633
|
-
let t =
|
|
3634
|
-
const o = (
|
|
3632
|
+
function Cu(e) {
|
|
3633
|
+
let t = Su(e), s = kr(), n = !0, r = !1;
|
|
3634
|
+
const o = (d) => (u, f) => {
|
|
3635
3635
|
var m;
|
|
3636
|
-
const h = Ge(e, f,
|
|
3636
|
+
const h = Ge(e, f, d === "exit" ? (m = e.presenceContext) == null ? void 0 : m.custom : void 0);
|
|
3637
3637
|
if (h) {
|
|
3638
3638
|
const { transition: g, transitionEnd: p, ...y } = h;
|
|
3639
|
-
|
|
3639
|
+
u = { ...u, ...y, ...p };
|
|
3640
3640
|
}
|
|
3641
|
-
return
|
|
3641
|
+
return u;
|
|
3642
3642
|
};
|
|
3643
|
-
function i(
|
|
3644
|
-
t =
|
|
3643
|
+
function i(d) {
|
|
3644
|
+
t = d(e);
|
|
3645
3645
|
}
|
|
3646
|
-
function a(
|
|
3647
|
-
const { props:
|
|
3646
|
+
function a(d) {
|
|
3647
|
+
const { props: u } = e, f = Wo(e.parent) || {}, h = [], m = /* @__PURE__ */ new Set();
|
|
3648
3648
|
let g = {}, p = 1 / 0;
|
|
3649
|
-
for (let w = 0; w <
|
|
3650
|
-
const b =
|
|
3649
|
+
for (let w = 0; w < Tu; w++) {
|
|
3650
|
+
const b = ju[w], x = s[b], j = u[b] !== void 0 ? u[b] : f[b], T = gt(j), P = b === d ? x.isActive : null;
|
|
3651
3651
|
P === !1 && (p = w);
|
|
3652
|
-
let L = j === f[b] && j !==
|
|
3652
|
+
let L = j === f[b] && j !== u[b] && T;
|
|
3653
3653
|
if (L && (n || r) && e.manuallyAnimateOnMount && (L = !1), x.protectedKeys = { ...g }, // If it isn't active and hasn't *just* been set as inactive
|
|
3654
3654
|
!x.isActive && P === null || // If we didn't and don't have any defined prop for this animation type
|
|
3655
3655
|
!j && !x.prevProp || // Or if the prop doesn't define an animation
|
|
@@ -3662,9 +3662,9 @@ function Cd(e) {
|
|
|
3662
3662
|
});
|
|
3663
3663
|
continue;
|
|
3664
3664
|
}
|
|
3665
|
-
const k =
|
|
3665
|
+
const k = Au(x.prevProp, j);
|
|
3666
3666
|
let M = k || // If we're making this variant active, we want to always make it active
|
|
3667
|
-
b ===
|
|
3667
|
+
b === d && x.isActive && !L && T || // If we removed a higher-priority variant (i is in reverse order)
|
|
3668
3668
|
w > p && T, E = !1;
|
|
3669
3669
|
const O = Array.isArray(j) ? j : [j];
|
|
3670
3670
|
let B = O.reduce(o(b), {});
|
|
@@ -3703,8 +3703,8 @@ function Cd(e) {
|
|
|
3703
3703
|
}
|
|
3704
3704
|
if (m.size) {
|
|
3705
3705
|
const w = {};
|
|
3706
|
-
if (typeof
|
|
3707
|
-
const b = Ge(e, Array.isArray(
|
|
3706
|
+
if (typeof u.initial != "boolean") {
|
|
3707
|
+
const b = Ge(e, Array.isArray(u.initial) ? u.initial[0] : u.initial);
|
|
3708
3708
|
b && b.transition && (w.transition = b.transition);
|
|
3709
3709
|
}
|
|
3710
3710
|
m.forEach((b) => {
|
|
@@ -3713,17 +3713,17 @@ function Cd(e) {
|
|
|
3713
3713
|
}), h.push({ animation: w });
|
|
3714
3714
|
}
|
|
3715
3715
|
let y = !!h.length;
|
|
3716
|
-
return n && (
|
|
3716
|
+
return n && (u.initial === !1 || u.initial === u.animate) && !e.manuallyAnimateOnMount && (y = !1), n = !1, r = !1, y ? t(h) : Promise.resolve();
|
|
3717
3717
|
}
|
|
3718
|
-
function c(
|
|
3718
|
+
function c(d, u) {
|
|
3719
3719
|
var h;
|
|
3720
|
-
if (s[
|
|
3720
|
+
if (s[d].isActive === u)
|
|
3721
3721
|
return Promise.resolve();
|
|
3722
3722
|
(h = e.variantChildren) == null || h.forEach((m) => {
|
|
3723
3723
|
var g;
|
|
3724
|
-
return (g = m.animationState) == null ? void 0 : g.setActive(
|
|
3725
|
-
}), s[
|
|
3726
|
-
const f = a(
|
|
3724
|
+
return (g = m.animationState) == null ? void 0 : g.setActive(d, u);
|
|
3725
|
+
}), s[d].isActive = u;
|
|
3726
|
+
const f = a(d);
|
|
3727
3727
|
for (const m in s)
|
|
3728
3728
|
s[m].protectedKeys = {};
|
|
3729
3729
|
return f;
|
|
@@ -3738,7 +3738,7 @@ function Cd(e) {
|
|
|
3738
3738
|
}
|
|
3739
3739
|
};
|
|
3740
3740
|
}
|
|
3741
|
-
function
|
|
3741
|
+
function Au(e, t) {
|
|
3742
3742
|
return typeof t == "string" ? t !== e : Array.isArray(t) ? !Uo(t, e) : !1;
|
|
3743
3743
|
}
|
|
3744
3744
|
function Fe(e = !1) {
|
|
@@ -3769,29 +3769,29 @@ function ge(e, t) {
|
|
|
3769
3769
|
function jr(e, t) {
|
|
3770
3770
|
e.translate = t.translate, e.scale = t.scale, e.originPoint = t.originPoint, e.origin = t.origin;
|
|
3771
3771
|
}
|
|
3772
|
-
const Go = 1e-4,
|
|
3773
|
-
function
|
|
3772
|
+
const Go = 1e-4, Nu = 1 - Go, Pu = 1 + Go, Ko = 0.01, Mu = 0 - Ko, Eu = 0 + Ko;
|
|
3773
|
+
function de(e) {
|
|
3774
3774
|
return e.max - e.min;
|
|
3775
3775
|
}
|
|
3776
|
-
function
|
|
3776
|
+
function Vu(e, t, s) {
|
|
3777
3777
|
return Math.abs(e - t) <= s;
|
|
3778
3778
|
}
|
|
3779
3779
|
function Tr(e, t, s, n = 0.5) {
|
|
3780
|
-
e.origin = n, e.originPoint = W(t.min, t.max, e.origin), e.scale =
|
|
3780
|
+
e.origin = n, e.originPoint = W(t.min, t.max, e.origin), e.scale = de(s) / de(t), e.translate = W(s.min, s.max, e.origin) - e.originPoint, (e.scale >= Nu && e.scale <= Pu || isNaN(e.scale)) && (e.scale = 1), (e.translate >= Mu && e.translate <= Eu || isNaN(e.translate)) && (e.translate = 0);
|
|
3781
3781
|
}
|
|
3782
3782
|
function ft(e, t, s, n) {
|
|
3783
3783
|
Tr(e.x, t.x, s.x, n ? n.originX : void 0), Tr(e.y, t.y, s.y, n ? n.originY : void 0);
|
|
3784
3784
|
}
|
|
3785
3785
|
function Sr(e, t, s, n = 0) {
|
|
3786
3786
|
const r = n ? W(s.min, s.max, n) : s.min;
|
|
3787
|
-
e.min = r + t.min, e.max = e.min +
|
|
3787
|
+
e.min = r + t.min, e.max = e.min + de(t);
|
|
3788
3788
|
}
|
|
3789
|
-
function
|
|
3789
|
+
function Ru(e, t, s, n) {
|
|
3790
3790
|
Sr(e.x, t.x, s.x, n == null ? void 0 : n.x), Sr(e.y, t.y, s.y, n == null ? void 0 : n.y);
|
|
3791
3791
|
}
|
|
3792
3792
|
function Cr(e, t, s, n = 0) {
|
|
3793
3793
|
const r = n ? W(s.min, s.max, n) : s.min;
|
|
3794
|
-
e.min = t.min - r, e.max = e.min +
|
|
3794
|
+
e.min = t.min - r, e.max = e.min + de(t);
|
|
3795
3795
|
}
|
|
3796
3796
|
function es(e, t, s, n) {
|
|
3797
3797
|
Cr(e.x, t.x, s.x, n == null ? void 0 : n.x), Cr(e.y, t.y, s.y, n == null ? void 0 : n.y);
|
|
@@ -3799,18 +3799,18 @@ function es(e, t, s, n) {
|
|
|
3799
3799
|
function Ar(e, t, s, n, r) {
|
|
3800
3800
|
return e -= t, e = Qt(e, 1 / s, n), r !== void 0 && (e = Qt(e, 1 / r, n)), e;
|
|
3801
3801
|
}
|
|
3802
|
-
function
|
|
3802
|
+
function Du(e, t = 0, s = 1, n = 0.5, r, o = e, i = e) {
|
|
3803
3803
|
if (je.test(t) && (t = parseFloat(t), t = W(i.min, i.max, t / 100) - i.min), typeof t != "number")
|
|
3804
3804
|
return;
|
|
3805
3805
|
let a = W(o.min, o.max, n);
|
|
3806
3806
|
e === o && (a -= t), e.min = Ar(e.min, t, s, a, r), e.max = Ar(e.max, t, s, a, r);
|
|
3807
3807
|
}
|
|
3808
3808
|
function Nr(e, t, [s, n, r], o, i) {
|
|
3809
|
-
|
|
3809
|
+
Du(e, t[s], t[n], t[r], t.scale, o, i);
|
|
3810
3810
|
}
|
|
3811
|
-
const
|
|
3811
|
+
const Lu = ["x", "scaleX", "originX"], Iu = ["y", "scaleY", "originY"];
|
|
3812
3812
|
function Pr(e, t, s, n) {
|
|
3813
|
-
Nr(e.x, t,
|
|
3813
|
+
Nr(e.x, t, Lu, s ? s.x : void 0, n ? n.x : void 0), Nr(e.y, t, Iu, s ? s.y : void 0, n ? n.y : void 0);
|
|
3814
3814
|
}
|
|
3815
3815
|
function Mr(e) {
|
|
3816
3816
|
return e.translate === 0 && e.scale === 1;
|
|
@@ -3821,7 +3821,7 @@ function Yo(e) {
|
|
|
3821
3821
|
function Er(e, t) {
|
|
3822
3822
|
return e.min === t.min && e.max === t.max;
|
|
3823
3823
|
}
|
|
3824
|
-
function
|
|
3824
|
+
function zu(e, t) {
|
|
3825
3825
|
return Er(e.x, t.x) && Er(e.y, t.y);
|
|
3826
3826
|
}
|
|
3827
3827
|
function Vr(e, t) {
|
|
@@ -3831,7 +3831,7 @@ function Ho(e, t) {
|
|
|
3831
3831
|
return Vr(e.x, t.x) && Vr(e.y, t.y);
|
|
3832
3832
|
}
|
|
3833
3833
|
function Rr(e) {
|
|
3834
|
-
return
|
|
3834
|
+
return de(e.x) / de(e.y);
|
|
3835
3835
|
}
|
|
3836
3836
|
function Dr(e, t) {
|
|
3837
3837
|
return e.translate === t.translate && e.scale === t.scale && e.originPoint === t.originPoint;
|
|
@@ -3839,12 +3839,12 @@ function Dr(e, t) {
|
|
|
3839
3839
|
function ve(e) {
|
|
3840
3840
|
return [e("x"), e("y")];
|
|
3841
3841
|
}
|
|
3842
|
-
function
|
|
3842
|
+
function Ou(e, t, s) {
|
|
3843
3843
|
let n = "";
|
|
3844
3844
|
const r = e.x.translate / t.x, o = e.y.translate / t.y, i = (s == null ? void 0 : s.z) || 0;
|
|
3845
3845
|
if ((r || o || i) && (n = `translate3d(${r}px, ${o}px, ${i}px) `), (t.x !== 1 || t.y !== 1) && (n += `scale(${1 / t.x}, ${1 / t.y}) `), s) {
|
|
3846
|
-
const { transformPerspective:
|
|
3847
|
-
|
|
3846
|
+
const { transformPerspective: d, rotate: u, rotateX: f, rotateY: h, skewX: m, skewY: g } = s;
|
|
3847
|
+
d && (n = `perspective(${d}px) ${n}`), u && (n += `rotate(${u}deg) `), f && (n += `rotateX(${f}deg) `), h && (n += `rotateY(${h}deg) `), m && (n += `skewX(${m}deg) `), g && (n += `skewY(${g}deg) `);
|
|
3848
3848
|
}
|
|
3849
3849
|
const a = e.x.scale * t.x, c = e.y.scale * t.y;
|
|
3850
3850
|
return (a !== 1 || c !== 1) && (n += `scale(${a}, ${c})`), n || "none";
|
|
@@ -3854,34 +3854,34 @@ const Xo = [
|
|
|
3854
3854
|
"borderTopRightRadius",
|
|
3855
3855
|
"borderBottomLeftRadius",
|
|
3856
3856
|
"borderBottomRightRadius"
|
|
3857
|
-
],
|
|
3858
|
-
function
|
|
3859
|
-
r ? (e.opacity = W(0, s.opacity ?? 1,
|
|
3860
|
-
for (let i = 0; i <
|
|
3857
|
+
], Fu = Xo.length, Lr = (e) => typeof e == "string" ? parseFloat(e) : e, Ir = (e) => typeof e == "number" || A.test(e);
|
|
3858
|
+
function Bu(e, t, s, n, r, o) {
|
|
3859
|
+
r ? (e.opacity = W(0, s.opacity ?? 1, _u(n)), e.opacityExit = W(t.opacity ?? 1, 0, $u(n))) : o && (e.opacity = W(t.opacity ?? 1, s.opacity ?? 1, n));
|
|
3860
|
+
for (let i = 0; i < Fu; i++) {
|
|
3861
3861
|
const a = Xo[i];
|
|
3862
|
-
let c = zr(t, a),
|
|
3863
|
-
if (c === void 0 &&
|
|
3862
|
+
let c = zr(t, a), d = zr(s, a);
|
|
3863
|
+
if (c === void 0 && d === void 0)
|
|
3864
3864
|
continue;
|
|
3865
|
-
c || (c = 0),
|
|
3865
|
+
c || (c = 0), d || (d = 0), c === 0 || d === 0 || Ir(c) === Ir(d) ? (e[a] = Math.max(W(Lr(c), Lr(d), n), 0), (je.test(d) || je.test(c)) && (e[a] += "%")) : e[a] = d;
|
|
3866
3866
|
}
|
|
3867
3867
|
(t.rotate || s.rotate) && (e.rotate = W(t.rotate || 0, s.rotate || 0, n));
|
|
3868
3868
|
}
|
|
3869
3869
|
function zr(e, t) {
|
|
3870
3870
|
return e[t] !== void 0 ? e[t] : e.borderRadius;
|
|
3871
3871
|
}
|
|
3872
|
-
const
|
|
3872
|
+
const _u = /* @__PURE__ */ qo(0, 0.5, Fi), $u = /* @__PURE__ */ qo(0.5, 0.95, me);
|
|
3873
3873
|
function qo(e, t, s) {
|
|
3874
3874
|
return (n) => n < e ? 0 : n > t ? 1 : s(/* @__PURE__ */ mt(e, t, n));
|
|
3875
3875
|
}
|
|
3876
|
-
function
|
|
3876
|
+
function Wu(e, t, s) {
|
|
3877
3877
|
const n = oe(e) ? e : tt(e);
|
|
3878
3878
|
return n.start(wn("", n, t, s)), n.animation;
|
|
3879
3879
|
}
|
|
3880
3880
|
function yt(e, t, s, n = { passive: !0 }) {
|
|
3881
3881
|
return e.addEventListener(t, s, n), () => e.removeEventListener(t, s);
|
|
3882
3882
|
}
|
|
3883
|
-
const
|
|
3884
|
-
class
|
|
3883
|
+
const Uu = (e, t) => e.depth - t.depth;
|
|
3884
|
+
class Gu {
|
|
3885
3885
|
constructor() {
|
|
3886
3886
|
this.children = [], this.isDirty = !1;
|
|
3887
3887
|
}
|
|
@@ -3892,10 +3892,10 @@ class Gd {
|
|
|
3892
3892
|
Yt(this.children, t), this.isDirty = !0;
|
|
3893
3893
|
}
|
|
3894
3894
|
forEach(t) {
|
|
3895
|
-
this.isDirty && this.children.sort(
|
|
3895
|
+
this.isDirty && this.children.sort(Uu), this.isDirty = !1, this.children.forEach(t);
|
|
3896
3896
|
}
|
|
3897
3897
|
}
|
|
3898
|
-
function
|
|
3898
|
+
function Ku(e, t) {
|
|
3899
3899
|
const s = ce.now(), n = ({ timestamp: r }) => {
|
|
3900
3900
|
const o = r - s;
|
|
3901
3901
|
o >= t && (Ie(n), e(o - t));
|
|
@@ -3905,7 +3905,7 @@ function Kd(e, t) {
|
|
|
3905
3905
|
function _t(e) {
|
|
3906
3906
|
return oe(e) ? e.get() : e;
|
|
3907
3907
|
}
|
|
3908
|
-
class
|
|
3908
|
+
class Yu {
|
|
3909
3909
|
constructor() {
|
|
3910
3910
|
this.members = [];
|
|
3911
3911
|
}
|
|
@@ -3969,8 +3969,8 @@ const $t = {
|
|
|
3969
3969
|
* update will be given a `data-projection-id` attribute.
|
|
3970
3970
|
*/
|
|
3971
3971
|
hasEverUpdated: !1
|
|
3972
|
-
}, bs = ["", "X", "Y", "Z"],
|
|
3973
|
-
let
|
|
3972
|
+
}, bs = ["", "X", "Y", "Z"], Hu = 1e3;
|
|
3973
|
+
let Xu = 0;
|
|
3974
3974
|
function vs(e, t, s, n) {
|
|
3975
3975
|
const { latestValues: r } = t;
|
|
3976
3976
|
r[e] && (s[e] = r[e], t.setStaticValue(e, 0), n && (n[e] = 0));
|
|
@@ -3992,14 +3992,14 @@ function Zo(e) {
|
|
|
3992
3992
|
function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, checkIsScrollRoot: n, resetTransform: r }) {
|
|
3993
3993
|
return class {
|
|
3994
3994
|
constructor(i = {}, a = t == null ? void 0 : t()) {
|
|
3995
|
-
this.id =
|
|
3995
|
+
this.id = Xu++, this.animationId = 0, this.animationCommitId = 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.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
3996
3996
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
3997
3997
|
}, this.updateProjection = () => {
|
|
3998
|
-
this.projectionUpdateScheduled = !1, this.nodes.forEach(
|
|
3998
|
+
this.projectionUpdateScheduled = !1, this.nodes.forEach(Ju), this.nodes.forEach(rf), this.nodes.forEach(of), this.nodes.forEach(Qu);
|
|
3999
3999
|
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = i, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
4000
4000
|
for (let c = 0; c < this.path.length; c++)
|
|
4001
4001
|
this.path[c].shouldResetTransform = !0;
|
|
4002
|
-
this.root === this && (this.nodes = new
|
|
4002
|
+
this.root === this && (this.nodes = new Gu());
|
|
4003
4003
|
}
|
|
4004
4004
|
addEventListener(i, a) {
|
|
4005
4005
|
return this.eventHandlers.has(i) || this.eventHandlers.set(i, new cn()), this.eventHandlers.get(i).add(a);
|
|
@@ -4017,24 +4017,24 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4017
4017
|
mount(i) {
|
|
4018
4018
|
if (this.instance)
|
|
4019
4019
|
return;
|
|
4020
|
-
this.isSVG = An(i) && !
|
|
4021
|
-
const { layoutId: a, layout: c, visualElement:
|
|
4022
|
-
if (
|
|
4023
|
-
let
|
|
4020
|
+
this.isSVG = An(i) && !Zd(i), this.instance = i;
|
|
4021
|
+
const { layoutId: a, layout: c, visualElement: d } = this.options;
|
|
4022
|
+
if (d && !d.current && d.mount(i), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (c || a) && (this.isLayoutDirty = !0), e) {
|
|
4023
|
+
let u, f = 0;
|
|
4024
4024
|
const h = () => this.root.updateBlockedByResize = !1;
|
|
4025
4025
|
F.read(() => {
|
|
4026
4026
|
f = window.innerWidth;
|
|
4027
4027
|
}), e(i, () => {
|
|
4028
4028
|
const m = window.innerWidth;
|
|
4029
|
-
m !== f && (f = m, this.root.updateBlockedByResize = !0,
|
|
4029
|
+
m !== f && (f = m, this.root.updateBlockedByResize = !0, u && u(), u = Ku(h, 250), $t.hasAnimatedSinceResize && ($t.hasAnimatedSinceResize = !1, this.nodes.forEach(Br)));
|
|
4030
4030
|
});
|
|
4031
4031
|
}
|
|
4032
|
-
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 &&
|
|
4032
|
+
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && d && (a || c) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: f, hasRelativeLayoutChanged: h, layout: m }) => {
|
|
4033
4033
|
if (this.isTreeAnimationBlocked()) {
|
|
4034
4034
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4035
4035
|
return;
|
|
4036
4036
|
}
|
|
4037
|
-
const g = this.options.transition ||
|
|
4037
|
+
const g = this.options.transition || d.getDefaultTransition() || uf, { onLayoutAnimationStart: p, onLayoutAnimationComplete: y } = d.getProps(), w = !this.targetLayout || !Ho(this.targetLayout, m), b = !f && h;
|
|
4038
4038
|
if (this.options.layoutRoot || this.resumeFrom || b || f && (w || !this.currentAnimation)) {
|
|
4039
4039
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
4040
4040
|
const x = {
|
|
@@ -4042,7 +4042,7 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4042
4042
|
onPlay: p,
|
|
4043
4043
|
onComplete: y
|
|
4044
4044
|
};
|
|
4045
|
-
(
|
|
4045
|
+
(d.shouldReduceMotion || this.options.layoutRoot) && (x.delay = 0, x.type = !1), this.startAnimation(x), this.setAnimationOrigin(u, b);
|
|
4046
4046
|
} else
|
|
4047
4047
|
f || Br(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4048
4048
|
this.targetLayout = m;
|
|
@@ -4082,15 +4082,15 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4082
4082
|
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Zo(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
4083
4083
|
return;
|
|
4084
4084
|
this.isLayoutDirty = !0;
|
|
4085
|
-
for (let
|
|
4086
|
-
const f = this.path[
|
|
4085
|
+
for (let u = 0; u < this.path.length; u++) {
|
|
4086
|
+
const f = this.path[u];
|
|
4087
4087
|
f.shouldResetTransform = !0, (typeof f.latestValues.x == "string" || typeof f.latestValues.y == "string") && (f.isLayoutDirty = !0), f.updateScroll("snapshot"), f.options.layoutRoot && f.willUpdate(!1);
|
|
4088
4088
|
}
|
|
4089
4089
|
const { layoutId: a, layout: c } = this.options;
|
|
4090
4090
|
if (a === void 0 && !c)
|
|
4091
4091
|
return;
|
|
4092
|
-
const
|
|
4093
|
-
this.prevTransformTemplateValue =
|
|
4092
|
+
const d = this.getTransformTemplate();
|
|
4093
|
+
this.prevTransformTemplateValue = d ? d(this.latestValues, "") : void 0, this.updateSnapshot(), i && this.notifyListeners("willUpdate");
|
|
4094
4094
|
}
|
|
4095
4095
|
update() {
|
|
4096
4096
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
@@ -4102,9 +4102,9 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4102
4102
|
this.nodes.forEach(Fr);
|
|
4103
4103
|
return;
|
|
4104
4104
|
}
|
|
4105
|
-
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(sf), this.nodes.forEach(nf), this.nodes.forEach(
|
|
4105
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(sf), this.nodes.forEach(nf), this.nodes.forEach(qu), this.nodes.forEach(Zu)) : this.nodes.forEach(Fr), this.clearAllSnapshots();
|
|
4106
4106
|
const a = ce.now();
|
|
4107
|
-
ie.delta = Te(0, 1e3 / 60, a - ie.timestamp), ie.timestamp = a, ie.isProcessing = !0,
|
|
4107
|
+
ie.delta = Te(0, 1e3 / 60, a - ie.timestamp), ie.timestamp = a, ie.isProcessing = !0, us.update.process(ie), us.preRender.process(ie), us.render.process(ie), ie.isProcessing = !1;
|
|
4108
4108
|
}
|
|
4109
4109
|
didUpdate() {
|
|
4110
4110
|
this.updateScheduled || (this.updateScheduled = !0, Sn.read(this.scheduleUpdate));
|
|
@@ -4124,7 +4124,7 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4124
4124
|
* Update measurements
|
|
4125
4125
|
*/
|
|
4126
4126
|
updateSnapshot() {
|
|
4127
|
-
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !
|
|
4127
|
+
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !de(this.snapshot.measuredBox.x) && !de(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
|
|
4128
4128
|
}
|
|
4129
4129
|
updateLayout() {
|
|
4130
4130
|
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
|
|
@@ -4153,8 +4153,8 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4153
4153
|
resetTransform() {
|
|
4154
4154
|
if (!r)
|
|
4155
4155
|
return;
|
|
4156
|
-
const i = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Yo(this.projectionDelta), c = this.getTransformTemplate(),
|
|
4157
|
-
i && this.instance && (a || _e(this.latestValues) ||
|
|
4156
|
+
const i = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Yo(this.projectionDelta), c = this.getTransformTemplate(), d = c ? c(this.latestValues, "") : void 0, u = d !== this.prevTransformTemplateValue;
|
|
4157
|
+
i && this.instance && (a || _e(this.latestValues) || u) && (r(this.instance, d), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4158
4158
|
}
|
|
4159
4159
|
measure(i = !0) {
|
|
4160
4160
|
const a = this.measurePageBox();
|
|
@@ -4168,14 +4168,14 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4168
4168
|
};
|
|
4169
4169
|
}
|
|
4170
4170
|
measurePageBox() {
|
|
4171
|
-
var
|
|
4171
|
+
var d;
|
|
4172
4172
|
const { visualElement: i } = this.options;
|
|
4173
4173
|
if (!i)
|
|
4174
4174
|
return se();
|
|
4175
4175
|
const a = i.measureViewportBox();
|
|
4176
|
-
if (!(((
|
|
4177
|
-
const { scroll:
|
|
4178
|
-
|
|
4176
|
+
if (!(((d = this.scroll) == null ? void 0 : d.wasRoot) || this.path.some(hf))) {
|
|
4177
|
+
const { scroll: u } = this.root;
|
|
4178
|
+
u && (we(a.x, u.offset.x), we(a.y, u.offset.y));
|
|
4179
4179
|
}
|
|
4180
4180
|
return a;
|
|
4181
4181
|
}
|
|
@@ -4184,32 +4184,32 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4184
4184
|
const a = se();
|
|
4185
4185
|
if (ge(a, i), (c = this.scroll) != null && c.wasRoot)
|
|
4186
4186
|
return a;
|
|
4187
|
-
for (let
|
|
4188
|
-
const
|
|
4189
|
-
|
|
4187
|
+
for (let d = 0; d < this.path.length; d++) {
|
|
4188
|
+
const u = this.path[d], { scroll: f, options: h } = u;
|
|
4189
|
+
u !== this.root && f && h.layoutScroll && (f.wasRoot && ge(a, i), we(a.x, f.offset.x), we(a.y, f.offset.y));
|
|
4190
4190
|
}
|
|
4191
4191
|
return a;
|
|
4192
4192
|
}
|
|
4193
4193
|
applyTransform(i, a = !1, c) {
|
|
4194
|
-
var
|
|
4195
|
-
const
|
|
4196
|
-
ge(
|
|
4194
|
+
var u, f;
|
|
4195
|
+
const d = c || se();
|
|
4196
|
+
ge(d, i);
|
|
4197
4197
|
for (let h = 0; h < this.path.length; h++) {
|
|
4198
4198
|
const m = this.path[h];
|
|
4199
|
-
!a && m.options.layoutScroll && m.scroll && m !== m.root && (we(
|
|
4199
|
+
!a && m.options.layoutScroll && m.scroll && m !== m.root && (we(d.x, -m.scroll.offset.x), we(d.y, -m.scroll.offset.y)), _e(m.latestValues) && Bt(d, m.latestValues, (u = m.layout) == null ? void 0 : u.layoutBox);
|
|
4200
4200
|
}
|
|
4201
|
-
return _e(this.latestValues) && Bt(
|
|
4201
|
+
return _e(this.latestValues) && Bt(d, this.latestValues, (f = this.layout) == null ? void 0 : f.layoutBox), d;
|
|
4202
4202
|
}
|
|
4203
4203
|
removeTransform(i) {
|
|
4204
4204
|
var c;
|
|
4205
4205
|
const a = se();
|
|
4206
4206
|
ge(a, i);
|
|
4207
|
-
for (let
|
|
4208
|
-
const
|
|
4209
|
-
if (!_e(
|
|
4207
|
+
for (let d = 0; d < this.path.length; d++) {
|
|
4208
|
+
const u = this.path[d];
|
|
4209
|
+
if (!_e(u.latestValues))
|
|
4210
4210
|
continue;
|
|
4211
4211
|
let f;
|
|
4212
|
-
|
|
4212
|
+
u.instance && (Ys(u.latestValues) && u.updateSnapshot(), f = se(), ge(f, u.measurePageBox())), Pr(a, u.latestValues, (c = u.snapshot) == null ? void 0 : c.layoutBox, f);
|
|
4213
4213
|
}
|
|
4214
4214
|
return _e(this.latestValues) && Pr(a, this.latestValues), a;
|
|
4215
4215
|
}
|
|
@@ -4236,12 +4236,12 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4236
4236
|
const c = !!this.resumingFrom || this !== a;
|
|
4237
4237
|
if (!(i || c && this.isSharedProjectionDirty || this.isProjectionDirty || (m = this.parent) != null && m.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
|
|
4238
4238
|
return;
|
|
4239
|
-
const { layout:
|
|
4240
|
-
if (!this.layout || !(
|
|
4239
|
+
const { layout: u, layoutId: f } = this.options;
|
|
4240
|
+
if (!this.layout || !(u || f))
|
|
4241
4241
|
return;
|
|
4242
4242
|
this.resolvedRelativeTargetAt = ie.timestamp;
|
|
4243
4243
|
const h = this.getClosestProjectingParent();
|
|
4244
|
-
h && this.linkedParentVersion !== h.layoutVersion && !h.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && h && h.layout ? this.createRelativeTarget(h, this.layout.layoutBox, h.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = se(), this.targetWithTransforms = se()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
|
|
4244
|
+
h && this.linkedParentVersion !== h.layoutVersion && !h.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && h && h.layout ? this.createRelativeTarget(h, this.layout.layoutBox, h.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = se(), this.targetWithTransforms = se()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Ru(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : ge(this.target, this.layout.layoutBox), Lo(this.target, this.targetDelta)) : ge(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && h && !!h.resumingFrom == !!this.resumingFrom && !h.options.layoutScroll && h.target && this.animationProgress !== 1 ? this.createRelativeTarget(h, this.target, h.target) : this.relativeParent = this.relativeTarget = void 0));
|
|
4245
4245
|
}
|
|
4246
4246
|
getClosestProjectingParent() {
|
|
4247
4247
|
if (!(!this.parent || Ys(this.parent.latestValues) || Do(this.parent.latestValues)))
|
|
@@ -4262,12 +4262,12 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4262
4262
|
let c = !0;
|
|
4263
4263
|
if ((this.isProjectionDirty || (g = this.parent) != null && g.isProjectionDirty) && (c = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === ie.timestamp && (c = !1), c)
|
|
4264
4264
|
return;
|
|
4265
|
-
const { layout:
|
|
4266
|
-
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(
|
|
4265
|
+
const { layout: d, layoutId: u } = this.options;
|
|
4266
|
+
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(d || u))
|
|
4267
4267
|
return;
|
|
4268
4268
|
ge(this.layoutCorrected, this.layout.layoutBox);
|
|
4269
4269
|
const f = this.treeScale.x, h = this.treeScale.y;
|
|
4270
|
-
|
|
4270
|
+
lu(this.layoutCorrected, this.treeScale, this.path, a), i.layout && !i.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (i.target = i.layout.layoutBox, i.targetWithTransforms = se());
|
|
4271
4271
|
const { target: m } = i;
|
|
4272
4272
|
if (!m) {
|
|
4273
4273
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
@@ -4293,25 +4293,25 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4293
4293
|
this.prevProjectionDelta = Qe(), this.projectionDelta = Qe(), this.projectionDeltaWithTransform = Qe();
|
|
4294
4294
|
}
|
|
4295
4295
|
setAnimationOrigin(i, a = !1) {
|
|
4296
|
-
const c = this.snapshot,
|
|
4296
|
+
const c = this.snapshot, d = c ? c.latestValues : {}, u = { ...this.latestValues }, f = Qe();
|
|
4297
4297
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4298
|
-
const h = se(), m = c ? c.source : void 0, g = this.layout ? this.layout.source : void 0, p = m !== g, y = this.getStack(), w = !y || y.members.length <= 1, b = !!(p && !w && this.options.crossfade === !0 && !this.path.some(
|
|
4298
|
+
const h = se(), m = c ? c.source : void 0, g = this.layout ? this.layout.source : void 0, p = m !== g, y = this.getStack(), w = !y || y.members.length <= 1, b = !!(p && !w && this.options.crossfade === !0 && !this.path.some(df));
|
|
4299
4299
|
this.animationProgress = 0;
|
|
4300
4300
|
let x;
|
|
4301
4301
|
this.mixTargetDelta = (j) => {
|
|
4302
4302
|
const T = j / 1e3;
|
|
4303
|
-
_r(f.x, i.x, T), _r(f.y, i.y, T), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (es(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), cf(this.relativeTarget, this.relativeTargetOrigin, h, T), x &&
|
|
4303
|
+
_r(f.x, i.x, T), _r(f.y, i.y, T), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (es(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), cf(this.relativeTarget, this.relativeTargetOrigin, h, T), x && zu(this.relativeTarget, x) && (this.isProjectionDirty = !1), x || (x = se()), ge(x, this.relativeTarget)), p && (this.animationValues = u, Bu(u, d, this.latestValues, T, b, w)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = T;
|
|
4304
4304
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4305
4305
|
}
|
|
4306
4306
|
startAnimation(i) {
|
|
4307
|
-
var a, c,
|
|
4308
|
-
this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (
|
|
4309
|
-
$t.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = tt(0)), this.motionValue.jump(0, !1), this.currentAnimation =
|
|
4307
|
+
var a, c, d;
|
|
4308
|
+
this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (d = (c = this.resumingFrom) == null ? void 0 : c.currentAnimation) == null || d.stop(), this.pendingAnimation && (Ie(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = F.update(() => {
|
|
4309
|
+
$t.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = tt(0)), this.motionValue.jump(0, !1), this.currentAnimation = Wu(this.motionValue, [0, 1e3], {
|
|
4310
4310
|
...i,
|
|
4311
4311
|
velocity: 0,
|
|
4312
4312
|
isSync: !0,
|
|
4313
|
-
onUpdate: (
|
|
4314
|
-
this.mixTargetDelta(
|
|
4313
|
+
onUpdate: (u) => {
|
|
4314
|
+
this.mixTargetDelta(u), i.onUpdate && i.onUpdate(u);
|
|
4315
4315
|
},
|
|
4316
4316
|
onStop: () => {
|
|
4317
4317
|
},
|
|
@@ -4327,28 +4327,28 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4327
4327
|
i && i.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
4328
4328
|
}
|
|
4329
4329
|
finishAnimation() {
|
|
4330
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
4330
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Hu), this.currentAnimation.stop()), this.completeAnimation();
|
|
4331
4331
|
}
|
|
4332
4332
|
applyTransformsToTarget() {
|
|
4333
4333
|
const i = this.getLead();
|
|
4334
|
-
let { targetWithTransforms: a, target: c, layout:
|
|
4335
|
-
if (!(!a || !c || !
|
|
4336
|
-
if (this !== i && this.layout &&
|
|
4334
|
+
let { targetWithTransforms: a, target: c, layout: d, latestValues: u } = i;
|
|
4335
|
+
if (!(!a || !c || !d)) {
|
|
4336
|
+
if (this !== i && this.layout && d && Qo(this.options.animationType, this.layout.layoutBox, d.layoutBox)) {
|
|
4337
4337
|
c = this.target || se();
|
|
4338
|
-
const f =
|
|
4338
|
+
const f = de(this.layout.layoutBox.x);
|
|
4339
4339
|
c.x.min = i.target.x.min, c.x.max = c.x.min + f;
|
|
4340
|
-
const h =
|
|
4340
|
+
const h = de(this.layout.layoutBox.y);
|
|
4341
4341
|
c.y.min = i.target.y.min, c.y.max = c.y.min + h;
|
|
4342
4342
|
}
|
|
4343
|
-
ge(a, c), Bt(a,
|
|
4343
|
+
ge(a, c), Bt(a, u), ft(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
4344
4344
|
}
|
|
4345
4345
|
}
|
|
4346
4346
|
registerSharedNode(i, a) {
|
|
4347
|
-
this.sharedNodes.has(i) || this.sharedNodes.set(i, new
|
|
4348
|
-
const
|
|
4347
|
+
this.sharedNodes.has(i) || this.sharedNodes.set(i, new Yu()), this.sharedNodes.get(i).add(a);
|
|
4348
|
+
const d = a.options.initialPromotionConfig;
|
|
4349
4349
|
a.promote({
|
|
4350
|
-
transition:
|
|
4351
|
-
preserveFollowOpacity:
|
|
4350
|
+
transition: d ? d.transition : void 0,
|
|
4351
|
+
preserveFollowOpacity: d && d.shouldPreserveFollowOpacity ? d.shouldPreserveFollowOpacity(a) : void 0
|
|
4352
4352
|
});
|
|
4353
4353
|
}
|
|
4354
4354
|
isLead() {
|
|
@@ -4371,8 +4371,8 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4371
4371
|
return this.root.sharedNodes.get(i);
|
|
4372
4372
|
}
|
|
4373
4373
|
promote({ needsReset: i, transition: a, preserveFollowOpacity: c } = {}) {
|
|
4374
|
-
const
|
|
4375
|
-
|
|
4374
|
+
const d = this.getStack();
|
|
4375
|
+
d && d.promote(this, c), i && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
|
|
4376
4376
|
}
|
|
4377
4377
|
relegate() {
|
|
4378
4378
|
const i = this.getStack();
|
|
@@ -4386,13 +4386,13 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4386
4386
|
const { latestValues: c } = i;
|
|
4387
4387
|
if ((c.z || c.rotate || c.rotateX || c.rotateY || c.rotateZ || c.skewX || c.skewY) && (a = !0), !a)
|
|
4388
4388
|
return;
|
|
4389
|
-
const
|
|
4390
|
-
c.z && vs("z", i,
|
|
4391
|
-
for (let
|
|
4392
|
-
vs(`rotate${bs[
|
|
4389
|
+
const d = {};
|
|
4390
|
+
c.z && vs("z", i, d, this.animationValues);
|
|
4391
|
+
for (let u = 0; u < bs.length; u++)
|
|
4392
|
+
vs(`rotate${bs[u]}`, i, d, this.animationValues), vs(`skew${bs[u]}`, i, d, this.animationValues);
|
|
4393
4393
|
i.render();
|
|
4394
|
-
for (const
|
|
4395
|
-
i.setStaticValue(
|
|
4394
|
+
for (const u in d)
|
|
4395
|
+
i.setStaticValue(u, d[u]), this.animationValues && (this.animationValues[u] = d[u]);
|
|
4396
4396
|
i.scheduleRender();
|
|
4397
4397
|
}
|
|
4398
4398
|
applyProjectionStyles(i, a) {
|
|
@@ -4407,22 +4407,22 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4407
4407
|
this.needsReset = !1, i.visibility = "", i.opacity = "", i.pointerEvents = _t(a == null ? void 0 : a.pointerEvents) || "", i.transform = c ? c(this.latestValues, "") : "none";
|
|
4408
4408
|
return;
|
|
4409
4409
|
}
|
|
4410
|
-
const
|
|
4411
|
-
if (!this.projectionDelta || !this.layout || !
|
|
4410
|
+
const d = this.getLead();
|
|
4411
|
+
if (!this.projectionDelta || !this.layout || !d.target) {
|
|
4412
4412
|
this.options.layoutId && (i.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, i.pointerEvents = _t(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !_e(this.latestValues) && (i.transform = c ? c({}, "") : "none", this.hasProjected = !1);
|
|
4413
4413
|
return;
|
|
4414
4414
|
}
|
|
4415
4415
|
i.visibility = "";
|
|
4416
|
-
const
|
|
4416
|
+
const u = d.animationValues || d.latestValues;
|
|
4417
4417
|
this.applyTransformsToTarget();
|
|
4418
|
-
let f =
|
|
4419
|
-
c && (f = c(
|
|
4418
|
+
let f = Ou(this.projectionDeltaWithTransform, this.treeScale, u);
|
|
4419
|
+
c && (f = c(u, f)), i.transform = f;
|
|
4420
4420
|
const { x: h, y: m } = this.projectionDelta;
|
|
4421
|
-
i.transformOrigin = `${h.origin * 100}% ${m.origin * 100}% 0`,
|
|
4421
|
+
i.transformOrigin = `${h.origin * 100}% ${m.origin * 100}% 0`, d.animationValues ? i.opacity = d === this ? u.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : u.opacityExit : i.opacity = d === this ? u.opacity !== void 0 ? u.opacity : "" : u.opacityExit !== void 0 ? u.opacityExit : 0;
|
|
4422
4422
|
for (const g in Xs) {
|
|
4423
|
-
if (
|
|
4423
|
+
if (u[g] === void 0)
|
|
4424
4424
|
continue;
|
|
4425
|
-
const { correct: p, applyTo: y, isCSSVariable: w } = Xs[g], b = f === "none" ?
|
|
4425
|
+
const { correct: p, applyTo: y, isCSSVariable: w } = Xs[g], b = f === "none" ? u[g] : p(u[g], d);
|
|
4426
4426
|
if (y) {
|
|
4427
4427
|
const x = y.length;
|
|
4428
4428
|
for (let j = 0; j < x; j++)
|
|
@@ -4430,7 +4430,7 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4430
4430
|
} else
|
|
4431
4431
|
w ? this.options.visualElement.renderState.vars[g] = b : i[g] = b;
|
|
4432
4432
|
}
|
|
4433
|
-
this.options.layoutId && (i.pointerEvents =
|
|
4433
|
+
this.options.layoutId && (i.pointerEvents = d === this ? _t(a == null ? void 0 : a.pointerEvents) || "" : "none");
|
|
4434
4434
|
}
|
|
4435
4435
|
clearSnapshot() {
|
|
4436
4436
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -4444,32 +4444,32 @@ function Jo({ attachResizeListener: e, defaultParent: t, measureScroll: s, check
|
|
|
4444
4444
|
}
|
|
4445
4445
|
};
|
|
4446
4446
|
}
|
|
4447
|
-
function
|
|
4447
|
+
function qu(e) {
|
|
4448
4448
|
e.updateLayout();
|
|
4449
4449
|
}
|
|
4450
|
-
function
|
|
4450
|
+
function Zu(e) {
|
|
4451
4451
|
var s;
|
|
4452
4452
|
const t = ((s = e.resumeFrom) == null ? void 0 : s.snapshot) || e.snapshot;
|
|
4453
4453
|
if (e.isLead() && e.layout && t && e.hasListeners("didUpdate")) {
|
|
4454
4454
|
const { layoutBox: n, measuredBox: r } = e.layout, { animationType: o } = e.options, i = t.source !== e.layout.source;
|
|
4455
4455
|
if (o === "size")
|
|
4456
4456
|
ve((f) => {
|
|
4457
|
-
const h = i ? t.measuredBox[f] : t.layoutBox[f], m =
|
|
4457
|
+
const h = i ? t.measuredBox[f] : t.layoutBox[f], m = de(h);
|
|
4458
4458
|
h.min = n[f].min, h.max = h.min + m;
|
|
4459
4459
|
});
|
|
4460
4460
|
else if (o === "x" || o === "y") {
|
|
4461
4461
|
const f = o === "x" ? "y" : "x";
|
|
4462
4462
|
qs(i ? t.measuredBox[f] : t.layoutBox[f], n[f]);
|
|
4463
4463
|
} else Qo(o, t.layoutBox, n) && ve((f) => {
|
|
4464
|
-
const h = i ? t.measuredBox[f] : t.layoutBox[f], m =
|
|
4464
|
+
const h = i ? t.measuredBox[f] : t.layoutBox[f], m = de(n[f]);
|
|
4465
4465
|
h.max = h.min + m, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[f].max = e.relativeTarget[f].min + m);
|
|
4466
4466
|
});
|
|
4467
4467
|
const a = Qe();
|
|
4468
4468
|
ft(a, n, t.layoutBox);
|
|
4469
4469
|
const c = Qe();
|
|
4470
4470
|
i ? ft(c, e.applyTransform(r, !0), t.measuredBox) : ft(c, n, t.layoutBox);
|
|
4471
|
-
const
|
|
4472
|
-
let
|
|
4471
|
+
const d = !Yo(a);
|
|
4472
|
+
let u = !1;
|
|
4473
4473
|
if (!e.resumeFrom) {
|
|
4474
4474
|
const f = e.getClosestProjectingParent();
|
|
4475
4475
|
if (f && !f.resumeFrom) {
|
|
@@ -4478,7 +4478,7 @@ function Zd(e) {
|
|
|
4478
4478
|
const g = e.options.layoutAnchor || void 0, p = se();
|
|
4479
4479
|
es(p, t.layoutBox, h.layoutBox, g);
|
|
4480
4480
|
const y = se();
|
|
4481
|
-
es(y, n, m.layoutBox, g), Ho(p, y) || (
|
|
4481
|
+
es(y, n, m.layoutBox, g), Ho(p, y) || (u = !0), f.options.layoutRoot && (e.relativeTarget = y, e.relativeTargetOrigin = p, e.relativeParent = f);
|
|
4482
4482
|
}
|
|
4483
4483
|
}
|
|
4484
4484
|
}
|
|
@@ -4487,8 +4487,8 @@ function Zd(e) {
|
|
|
4487
4487
|
snapshot: t,
|
|
4488
4488
|
delta: c,
|
|
4489
4489
|
layoutDelta: a,
|
|
4490
|
-
hasLayoutChanged:
|
|
4491
|
-
hasRelativeLayoutChanged:
|
|
4490
|
+
hasLayoutChanged: d,
|
|
4491
|
+
hasRelativeLayoutChanged: u
|
|
4492
4492
|
});
|
|
4493
4493
|
} else if (e.isLead()) {
|
|
4494
4494
|
const { onExitComplete: n } = e.options;
|
|
@@ -4496,10 +4496,10 @@ function Zd(e) {
|
|
|
4496
4496
|
}
|
|
4497
4497
|
e.options.transition = void 0;
|
|
4498
4498
|
}
|
|
4499
|
-
function
|
|
4499
|
+
function Ju(e) {
|
|
4500
4500
|
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));
|
|
4501
4501
|
}
|
|
4502
|
-
function
|
|
4502
|
+
function Qu(e) {
|
|
4503
4503
|
e.isProjectionDirty = e.isSharedProjectionDirty = e.isTransformDirty = !1;
|
|
4504
4504
|
}
|
|
4505
4505
|
function ef(e) {
|
|
@@ -4545,10 +4545,10 @@ function $r(e, t, s, n) {
|
|
|
4545
4545
|
function cf(e, t, s, n) {
|
|
4546
4546
|
$r(e.x, t.x, s.x, n), $r(e.y, t.y, s.y, n);
|
|
4547
4547
|
}
|
|
4548
|
-
function
|
|
4548
|
+
function df(e) {
|
|
4549
4549
|
return e.animationValues && e.animationValues.opacityExit !== void 0;
|
|
4550
4550
|
}
|
|
4551
|
-
const
|
|
4551
|
+
const uf = {
|
|
4552
4552
|
duration: 0.45,
|
|
4553
4553
|
ease: [0.4, 0, 0.1, 1]
|
|
4554
4554
|
}, Wr = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), Ur = Wr("applewebkit/") && !Wr("chrome/") ? Math.round : me;
|
|
@@ -4559,7 +4559,7 @@ function ff(e) {
|
|
|
4559
4559
|
Gr(e.x), Gr(e.y);
|
|
4560
4560
|
}
|
|
4561
4561
|
function Qo(e, t, s) {
|
|
4562
|
-
return e === "position" || e === "preserve-aspect" && !
|
|
4562
|
+
return e === "position" || e === "preserve-aspect" && !Vu(Rr(t), Rr(s), 0.2);
|
|
4563
4563
|
}
|
|
4564
4564
|
function hf(e) {
|
|
4565
4565
|
var t;
|
|
@@ -4649,7 +4649,7 @@ function xf({ children: e, isPresent: t, anchorX: s, anchorY: n, root: r, pop: o
|
|
|
4649
4649
|
left: 0,
|
|
4650
4650
|
right: 0,
|
|
4651
4651
|
bottom: 0
|
|
4652
|
-
}), { nonce:
|
|
4652
|
+
}), { nonce: d } = ne(Vn), u = ((h = e.props) == null ? void 0 : h.ref) ?? (e == null ? void 0 : e.ref), f = gf(a, u);
|
|
4653
4653
|
return sn(() => {
|
|
4654
4654
|
const { width: m, height: g, top: p, left: y, right: w, bottom: b } = c.current;
|
|
4655
4655
|
if (t || o === !1 || !a.current || !m || !g)
|
|
@@ -4657,7 +4657,7 @@ function xf({ children: e, isPresent: t, anchorX: s, anchorY: n, root: r, pop: o
|
|
|
4657
4657
|
const x = s === "left" ? `left: ${y}` : `right: ${w}`, j = n === "bottom" ? `bottom: ${b}` : `top: ${p}`;
|
|
4658
4658
|
a.current.dataset.motionPopId = i;
|
|
4659
4659
|
const T = document.createElement("style");
|
|
4660
|
-
|
|
4660
|
+
d && (T.nonce = d);
|
|
4661
4661
|
const P = r ?? document.head;
|
|
4662
4662
|
return P.appendChild(T), T.sheet && T.sheet.insertRule(`
|
|
4663
4663
|
[data-motion-pop-id="${i}"] {
|
|
@@ -4673,27 +4673,27 @@ function xf({ children: e, isPresent: t, anchorX: s, anchorY: n, root: r, pop: o
|
|
|
4673
4673
|
};
|
|
4674
4674
|
}, [t]), l.jsx(yf, { isPresent: t, childRef: a, sizeRef: c, pop: o, children: o === !1 ? e : ns.cloneElement(e, { ref: f }) });
|
|
4675
4675
|
}
|
|
4676
|
-
const bf = ({ children: e, initial: t, isPresent: s, onExitComplete: n, custom: r, presenceAffectsLayout: o, mode: i, anchorX: a, anchorY: c, root:
|
|
4677
|
-
const
|
|
4676
|
+
const bf = ({ children: e, initial: t, isPresent: s, onExitComplete: n, custom: r, presenceAffectsLayout: o, mode: i, anchorX: a, anchorY: c, root: d }) => {
|
|
4677
|
+
const u = an(vf), f = tn();
|
|
4678
4678
|
let h = !0, m = Ke(() => (h = !1, {
|
|
4679
4679
|
id: f,
|
|
4680
4680
|
initial: t,
|
|
4681
4681
|
isPresent: s,
|
|
4682
4682
|
custom: r,
|
|
4683
4683
|
onExitComplete: (g) => {
|
|
4684
|
-
|
|
4685
|
-
for (const p of
|
|
4684
|
+
u.set(g, !0);
|
|
4685
|
+
for (const p of u.values())
|
|
4686
4686
|
if (!p)
|
|
4687
4687
|
return;
|
|
4688
4688
|
n && n();
|
|
4689
4689
|
},
|
|
4690
|
-
register: (g) => (
|
|
4691
|
-
}), [s,
|
|
4690
|
+
register: (g) => (u.set(g, !1), () => u.delete(g))
|
|
4691
|
+
}), [s, u, n]);
|
|
4692
4692
|
return o && h && (m = { ...m }), Ke(() => {
|
|
4693
|
-
|
|
4693
|
+
u.forEach((g, p) => u.set(p, !1));
|
|
4694
4694
|
}, [s]), ns.useEffect(() => {
|
|
4695
|
-
!s && !
|
|
4696
|
-
}, [s]), e = l.jsx(xf, { pop: i === "popLayout", isPresent: s, anchorX: a, anchorY: c, root:
|
|
4695
|
+
!s && !u.size && n && n();
|
|
4696
|
+
}, [s]), e = l.jsx(xf, { pop: i === "popLayout", isPresent: s, anchorX: a, anchorY: c, root: d, children: e }), l.jsx(is.Provider, { value: m, children: e });
|
|
4697
4697
|
};
|
|
4698
4698
|
function vf() {
|
|
4699
4699
|
return /* @__PURE__ */ new Map();
|
|
@@ -4717,8 +4717,8 @@ function Yr(e) {
|
|
|
4717
4717
|
Da(s) && t.push(s);
|
|
4718
4718
|
}), t;
|
|
4719
4719
|
}
|
|
4720
|
-
const fe = ({ children: e, custom: t, initial: s = !0, onExitComplete: n, presenceAffectsLayout: r = !0, mode: o = "sync", propagate: i = !1, anchorX: a = "left", anchorY: c = "top", root:
|
|
4721
|
-
const [
|
|
4720
|
+
const fe = ({ children: e, custom: t, initial: s = !0, onExitComplete: n, presenceAffectsLayout: r = !0, mode: o = "sync", propagate: i = !1, anchorX: a = "left", anchorY: c = "top", root: d }) => {
|
|
4721
|
+
const [u, f] = ta(i), h = Ke(() => Yr(e), [e]), m = i && !u ? [] : h.map(Pt), g = re(!0), p = re(h), y = an(() => /* @__PURE__ */ new Map()), w = re(/* @__PURE__ */ new Set()), [b, x] = z(h), [j, T] = z(h);
|
|
4722
4722
|
Ai(() => {
|
|
4723
4723
|
g.current = !1, p.current = h;
|
|
4724
4724
|
for (let k = 0; k < j.length; k++) {
|
|
@@ -4738,7 +4738,7 @@ const fe = ({ children: e, custom: t, initial: s = !0, onExitComplete: n, presen
|
|
|
4738
4738
|
process.env.NODE_ENV !== "production" && o === "wait" && j.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
4739
4739
|
const { forceRender: L } = ne(on);
|
|
4740
4740
|
return l.jsx(l.Fragment, { children: j.map((k) => {
|
|
4741
|
-
const M = Pt(k), E = i && !
|
|
4741
|
+
const M = Pt(k), E = i && !u ? !1 : h === j || m.includes(M), O = () => {
|
|
4742
4742
|
if (w.current.has(M))
|
|
4743
4743
|
return;
|
|
4744
4744
|
if (y.has(M))
|
|
@@ -4750,7 +4750,7 @@ const fe = ({ children: e, custom: t, initial: s = !0, onExitComplete: n, presen
|
|
|
4750
4750
|
le || (B = !1);
|
|
4751
4751
|
}), B && (L == null || L(), T(p.current), i && (f == null || f()), n && n());
|
|
4752
4752
|
};
|
|
4753
|
-
return l.jsx(bf, { isPresent: E, initial: !g.current || s ? void 0 : !1, custom: t, presenceAffectsLayout: r, mode: o, root:
|
|
4753
|
+
return l.jsx(bf, { isPresent: E, initial: !g.current || s ? void 0 : !1, custom: t, presenceAffectsLayout: r, mode: o, root: d, onExitComplete: E ? void 0 : O, anchorX: a, anchorY: c, children: k }, M);
|
|
4754
4754
|
}) });
|
|
4755
4755
|
}, sa = Pe({ strict: !1 }), Hr = {
|
|
4756
4756
|
animation: [
|
|
@@ -4784,7 +4784,7 @@ function wf() {
|
|
|
4784
4784
|
Eo(e), Xr = !0;
|
|
4785
4785
|
}
|
|
4786
4786
|
function na() {
|
|
4787
|
-
return wf(),
|
|
4787
|
+
return wf(), ru();
|
|
4788
4788
|
}
|
|
4789
4789
|
function kf(e) {
|
|
4790
4790
|
const t = na();
|
|
@@ -4954,9 +4954,9 @@ function Dn(e) {
|
|
|
4954
4954
|
);
|
|
4955
4955
|
}
|
|
4956
4956
|
function Rf(e, t, s, { latestValues: n }, r, o = !1, i) {
|
|
4957
|
-
const c = (i ?? Dn(e) ? Ef : Mf)(t, n, r, e),
|
|
4957
|
+
const c = (i ?? Dn(e) ? Ef : Mf)(t, n, r, e), d = Sf(t, typeof e == "string", o), u = e !== ki ? { ...d, ...c, ref: s } : {}, { children: f } = t, h = Ke(() => oe(f) ? f.get() : f, [f]);
|
|
4958
4958
|
return Ut(e, {
|
|
4959
|
-
...
|
|
4959
|
+
...u,
|
|
4960
4960
|
children: h
|
|
4961
4961
|
});
|
|
4962
4962
|
}
|
|
@@ -4971,11 +4971,11 @@ function Lf(e, t, s, n) {
|
|
|
4971
4971
|
for (const h in o)
|
|
4972
4972
|
r[h] = _t(o[h]);
|
|
4973
4973
|
let { initial: i, animate: a } = e;
|
|
4974
|
-
const c = ls(e),
|
|
4975
|
-
t &&
|
|
4976
|
-
let
|
|
4977
|
-
|
|
4978
|
-
const f =
|
|
4974
|
+
const c = ls(e), d = Po(e);
|
|
4975
|
+
t && d && !c && e.inherit !== !1 && (i === void 0 && (i = t.initial), a === void 0 && (a = t.animate));
|
|
4976
|
+
let u = s ? s.initial === !1 : !1;
|
|
4977
|
+
u = u || i === !1;
|
|
4978
|
+
const f = u ? a : i;
|
|
4979
4979
|
if (f && typeof f != "boolean" && !as(f)) {
|
|
4980
4980
|
const h = Array.isArray(f) ? f : [f];
|
|
4981
4981
|
for (let m = 0; m < h.length; m++) {
|
|
@@ -4985,7 +4985,7 @@ function Lf(e, t, s, n) {
|
|
|
4985
4985
|
for (const b in w) {
|
|
4986
4986
|
let x = w[b];
|
|
4987
4987
|
if (Array.isArray(x)) {
|
|
4988
|
-
const j =
|
|
4988
|
+
const j = u ? x.length - 1 : 0;
|
|
4989
4989
|
x = x[j];
|
|
4990
4990
|
}
|
|
4991
4991
|
x !== null && (r[b] = x);
|
|
@@ -5032,14 +5032,14 @@ function Xe(e) {
|
|
|
5032
5032
|
}
|
|
5033
5033
|
function Bf(e, t, s, n, r, o) {
|
|
5034
5034
|
var x, j;
|
|
5035
|
-
const { visualElement: i } = ne(cs), a = ne(sa), c = ne(is),
|
|
5035
|
+
const { visualElement: i } = ne(cs), a = ne(sa), c = ne(is), d = ne(Vn), u = d.reducedMotion, f = d.skipAnimations, h = re(null), m = re(!1);
|
|
5036
5036
|
n = n || a.renderer, !h.current && n && (h.current = n(e, {
|
|
5037
5037
|
visualState: t,
|
|
5038
5038
|
parent: i,
|
|
5039
5039
|
props: s,
|
|
5040
5040
|
presenceContext: c,
|
|
5041
5041
|
blockInitialAnimation: c ? c.initial === !1 : !1,
|
|
5042
|
-
reducedMotionConfig:
|
|
5042
|
+
reducedMotionConfig: u,
|
|
5043
5043
|
skipAnimations: f,
|
|
5044
5044
|
isSVG: o
|
|
5045
5045
|
}), m.current && h.current && (h.current.manuallyAnimateOnMount = !0));
|
|
@@ -5060,7 +5060,7 @@ function Bf(e, t, s, n, r, o) {
|
|
|
5060
5060
|
}), g;
|
|
5061
5061
|
}
|
|
5062
5062
|
function _f(e, t, s, n) {
|
|
5063
|
-
const { layoutId: r, layout: o, drag: i, dragConstraints: a, layoutScroll: c, layoutRoot:
|
|
5063
|
+
const { layoutId: r, layout: o, drag: i, dragConstraints: a, layoutScroll: c, layoutRoot: d, layoutAnchor: u, layoutCrossfade: f } = t;
|
|
5064
5064
|
e.projection = new s(e.latestValues, t["data-framer-portal-id"] ? void 0 : ca(e.parent)), e.projection.setOptions({
|
|
5065
5065
|
layoutId: r,
|
|
5066
5066
|
layout: o,
|
|
@@ -5077,8 +5077,8 @@ function _f(e, t, s, n) {
|
|
|
5077
5077
|
initialPromotionConfig: n,
|
|
5078
5078
|
crossfade: f,
|
|
5079
5079
|
layoutScroll: c,
|
|
5080
|
-
layoutRoot:
|
|
5081
|
-
layoutAnchor:
|
|
5080
|
+
layoutRoot: d,
|
|
5081
|
+
layoutAnchor: u
|
|
5082
5082
|
});
|
|
5083
5083
|
}
|
|
5084
5084
|
function ca(e) {
|
|
@@ -5088,19 +5088,19 @@ function ca(e) {
|
|
|
5088
5088
|
function ks(e, { forwardMotionProps: t = !1, type: s } = {}, n, r) {
|
|
5089
5089
|
n && kf(n);
|
|
5090
5090
|
const o = s ? s === "svg" : Dn(e), i = o ? zf : If;
|
|
5091
|
-
function a(
|
|
5091
|
+
function a(d, u) {
|
|
5092
5092
|
let f;
|
|
5093
5093
|
const h = {
|
|
5094
5094
|
...ne(Vn),
|
|
5095
|
-
...
|
|
5096
|
-
layoutId: $f(
|
|
5097
|
-
}, { isStatic: m } = h, g = Af(
|
|
5095
|
+
...d,
|
|
5096
|
+
layoutId: $f(d)
|
|
5097
|
+
}, { isStatic: m } = h, g = Af(d), p = i(d, m);
|
|
5098
5098
|
if (!m && typeof window < "u") {
|
|
5099
5099
|
Wf(h, n);
|
|
5100
5100
|
const y = Uf(h);
|
|
5101
5101
|
f = y.MeasureLayout, g.visualElement = Bf(e, p, h, r, y.ProjectionNode, o);
|
|
5102
5102
|
}
|
|
5103
|
-
return l.jsxs(cs.Provider, { value: g, children: [f && g.visualElement ? l.jsx(f, { visualElement: g.visualElement, ...h }) : null, Rf(e,
|
|
5103
|
+
return l.jsxs(cs.Provider, { value: g, children: [f && g.visualElement ? l.jsx(f, { visualElement: g.visualElement, ...h }) : null, Rf(e, d, Ff(p, g.visualElement, u), p, m, t, o)] });
|
|
5104
5104
|
}
|
|
5105
5105
|
a.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
|
|
5106
5106
|
const c = en(a);
|
|
@@ -5130,7 +5130,7 @@ function Uf(e) {
|
|
|
5130
5130
|
function Gf(e, t) {
|
|
5131
5131
|
if (typeof Proxy > "u")
|
|
5132
5132
|
return ks;
|
|
5133
|
-
const s = /* @__PURE__ */ new Map(), n = (o, i) => ks(o, i, e, t), r = (o, i) => (process.env.NODE_ENV !== "production" &&
|
|
5133
|
+
const s = /* @__PURE__ */ new Map(), n = (o, i) => ks(o, i, e, t), r = (o, i) => (process.env.NODE_ENV !== "production" && dn(!1, "motion() is deprecated. Use motion.create() instead."), n(o, i));
|
|
5134
5134
|
return new Proxy(r, {
|
|
5135
5135
|
/**
|
|
5136
5136
|
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
@@ -5140,7 +5140,7 @@ function Gf(e, t) {
|
|
|
5140
5140
|
get: (o, i) => i === "create" ? n : (s.has(i) || s.set(i, ks(i, void 0, e, t)), s.get(i))
|
|
5141
5141
|
});
|
|
5142
5142
|
}
|
|
5143
|
-
const Kf = (e, t) => t.isSVG ?? Dn(e) ? new
|
|
5143
|
+
const Kf = (e, t) => t.isSVG ?? Dn(e) ? new wu(t) : new pu(t, {
|
|
5144
5144
|
allowProjection: e !== ki
|
|
5145
5145
|
});
|
|
5146
5146
|
class Yf extends ze {
|
|
@@ -5150,7 +5150,7 @@ class Yf extends ze {
|
|
|
5150
5150
|
* so people can optionally code split it out using the `m` component.
|
|
5151
5151
|
*/
|
|
5152
5152
|
constructor(t) {
|
|
5153
|
-
super(t), t.animationState || (t.animationState =
|
|
5153
|
+
super(t), t.animationState || (t.animationState = Cu(t));
|
|
5154
5154
|
}
|
|
5155
5155
|
updateAnimationControlsSubscription() {
|
|
5156
5156
|
const { animate: t } = this.node.getProps();
|
|
@@ -5189,7 +5189,7 @@ class Xf extends ze {
|
|
|
5189
5189
|
if (typeof i == "string") {
|
|
5190
5190
|
const c = Ge(this.node, i, a);
|
|
5191
5191
|
if (c) {
|
|
5192
|
-
const { transition:
|
|
5192
|
+
const { transition: d, transitionEnd: u, ...f } = c;
|
|
5193
5193
|
for (const h in f)
|
|
5194
5194
|
(o = this.node.getValue(h)) == null || o.jump(f[h]);
|
|
5195
5195
|
}
|
|
@@ -5232,13 +5232,13 @@ const Zf = (e) => (t) => Cn(t) && e(t, wt(t));
|
|
|
5232
5232
|
function ht(e, t, s, n) {
|
|
5233
5233
|
return yt(e, t, Zf(s), n);
|
|
5234
5234
|
}
|
|
5235
|
-
const
|
|
5235
|
+
const da = ({ current: e }) => e ? e.ownerDocument.defaultView : null, Zr = (e, t) => Math.abs(e - t);
|
|
5236
5236
|
function Jf(e, t) {
|
|
5237
5237
|
const s = Zr(e.x, t.x), n = Zr(e.y, t.y);
|
|
5238
5238
|
return Math.sqrt(s ** 2 + n ** 2);
|
|
5239
5239
|
}
|
|
5240
5240
|
const Jr = /* @__PURE__ */ new Set(["auto", "scroll"]);
|
|
5241
|
-
class
|
|
5241
|
+
class ua {
|
|
5242
5242
|
constructor(t, s, { transformPagePoint: n, contextWindow: r = window, dragSnapToOrigin: o = !1, distanceThreshold: i = 3, element: a } = {}) {
|
|
5243
5243
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (m) => {
|
|
5244
5244
|
this.handleScroll(m.target);
|
|
@@ -5267,10 +5267,10 @@ class da {
|
|
|
5267
5267
|
}, !Cn(t))
|
|
5268
5268
|
return;
|
|
5269
5269
|
this.dragSnapToOrigin = o, this.handlers = s, this.transformPagePoint = n, this.distanceThreshold = i, this.contextWindow = r || window;
|
|
5270
|
-
const c = wt(t),
|
|
5271
|
-
this.history = [{ ...
|
|
5270
|
+
const c = wt(t), d = Mt(c, this.transformPagePoint), { point: u } = d, { timestamp: f } = ie;
|
|
5271
|
+
this.history = [{ ...u, timestamp: f }];
|
|
5272
5272
|
const { onSessionStart: h } = s;
|
|
5273
|
-
h && h(t, js(
|
|
5273
|
+
h && h(t, js(d, this.history)), this.removeListeners = xt(ht(this.contextWindow, "pointermove", this.handlePointerMove), ht(this.contextWindow, "pointerup", this.handlePointerUp), ht(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
|
|
5274
5274
|
}
|
|
5275
5275
|
/**
|
|
5276
5276
|
* Start tracking scroll on ancestors and window.
|
|
@@ -5343,11 +5343,11 @@ function eh(e, t) {
|
|
|
5343
5343
|
return { x: 0, y: 0 };
|
|
5344
5344
|
let s = e.length - 1, n = null;
|
|
5345
5345
|
const r = fa(e);
|
|
5346
|
-
for (; s >= 0 && (n = e[s], !(r.timestamp - n.timestamp > /* @__PURE__ */
|
|
5346
|
+
for (; s >= 0 && (n = e[s], !(r.timestamp - n.timestamp > /* @__PURE__ */ ue(t))); )
|
|
5347
5347
|
s--;
|
|
5348
5348
|
if (!n)
|
|
5349
5349
|
return { x: 0, y: 0 };
|
|
5350
|
-
n === e[0] && e.length > 2 && r.timestamp - n.timestamp > /* @__PURE__ */
|
|
5350
|
+
n === e[0] && e.length > 2 && r.timestamp - n.timestamp > /* @__PURE__ */ ue(t) * 2 && (n = e[1]);
|
|
5351
5351
|
const o = /* @__PURE__ */ he(r.timestamp - n.timestamp);
|
|
5352
5352
|
if (o === 0)
|
|
5353
5353
|
return { x: 0, y: 0 };
|
|
@@ -5384,7 +5384,7 @@ function nh(e, t) {
|
|
|
5384
5384
|
}
|
|
5385
5385
|
function rh(e, t) {
|
|
5386
5386
|
let s = 0.5;
|
|
5387
|
-
const n =
|
|
5387
|
+
const n = de(e), r = de(t);
|
|
5388
5388
|
return r > n ? s = /* @__PURE__ */ mt(t.min, t.max - n, e.min) : n > r && (s = /* @__PURE__ */ mt(e.min, e.max - r, t.min)), Te(0, 1, s);
|
|
5389
5389
|
}
|
|
5390
5390
|
function ih(e, t) {
|
|
@@ -5420,7 +5420,7 @@ class lh {
|
|
|
5420
5420
|
s && this.snapToCursor(wt(f).point), this.stopAnimation();
|
|
5421
5421
|
}, i = (f, h) => {
|
|
5422
5422
|
const { drag: m, dragPropagation: g, onDragStart: p } = this.getProps();
|
|
5423
|
-
if (m && !g && (this.openDragLock && this.openDragLock(), this.openDragLock =
|
|
5423
|
+
if (m && !g && (this.openDragLock && this.openDragLock(), this.openDragLock = Dd(m), !this.openDragLock))
|
|
5424
5424
|
return;
|
|
5425
5425
|
this.latestPointerEvent = f, this.latestPanInfo = h, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), ve((w) => {
|
|
5426
5426
|
let b = this.getAxisMotionValue(w).get() || 0;
|
|
@@ -5428,7 +5428,7 @@ class lh {
|
|
|
5428
5428
|
const { projection: x } = this.visualElement;
|
|
5429
5429
|
if (x && x.layout) {
|
|
5430
5430
|
const j = x.layout.layoutBox[w];
|
|
5431
|
-
j && (b =
|
|
5431
|
+
j && (b = de(j) * (parseFloat(b) / 100));
|
|
5432
5432
|
}
|
|
5433
5433
|
}
|
|
5434
5434
|
this.originPoint[w] = b;
|
|
@@ -5442,27 +5442,27 @@ class lh {
|
|
|
5442
5442
|
return;
|
|
5443
5443
|
const { offset: w } = h;
|
|
5444
5444
|
if (g && this.currentDirection === null) {
|
|
5445
|
-
this.currentDirection =
|
|
5445
|
+
this.currentDirection = dh(w), this.currentDirection !== null && p && p(this.currentDirection);
|
|
5446
5446
|
return;
|
|
5447
5447
|
}
|
|
5448
5448
|
this.updateAxis("x", h.point, w), this.updateAxis("y", h.point, w), this.visualElement.render(), y && F.update(() => y(f, h), !1, !0);
|
|
5449
5449
|
}, c = (f, h) => {
|
|
5450
5450
|
this.latestPointerEvent = f, this.latestPanInfo = h, this.stop(f, h), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
5451
|
-
},
|
|
5451
|
+
}, d = () => {
|
|
5452
5452
|
const { dragSnapToOrigin: f } = this.getProps();
|
|
5453
5453
|
(f || this.constraints) && this.startAnimation({ x: 0, y: 0 });
|
|
5454
|
-
}, { dragSnapToOrigin:
|
|
5455
|
-
this.panSession = new
|
|
5454
|
+
}, { dragSnapToOrigin: u } = this.getProps();
|
|
5455
|
+
this.panSession = new ua(t, {
|
|
5456
5456
|
onSessionStart: o,
|
|
5457
5457
|
onStart: i,
|
|
5458
5458
|
onMove: a,
|
|
5459
5459
|
onSessionEnd: c,
|
|
5460
|
-
resumeAnimation:
|
|
5460
|
+
resumeAnimation: d
|
|
5461
5461
|
}, {
|
|
5462
5462
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
5463
|
-
dragSnapToOrigin:
|
|
5463
|
+
dragSnapToOrigin: u,
|
|
5464
5464
|
distanceThreshold: n,
|
|
5465
|
-
contextWindow:
|
|
5465
|
+
contextWindow: da(this.visualElement),
|
|
5466
5466
|
element: this.visualElement.current
|
|
5467
5467
|
});
|
|
5468
5468
|
}
|
|
@@ -5521,23 +5521,23 @@ class lh {
|
|
|
5521
5521
|
const { projection: r } = this.visualElement;
|
|
5522
5522
|
if (!r || !r.layout)
|
|
5523
5523
|
return !1;
|
|
5524
|
-
const o =
|
|
5524
|
+
const o = cu(n, r.root, this.visualElement.getTransformPagePoint());
|
|
5525
5525
|
let i = nh(r.layout.layoutBox, o);
|
|
5526
5526
|
if (s) {
|
|
5527
|
-
const a = s(
|
|
5527
|
+
const a = s(ou(i));
|
|
5528
5528
|
this.hasMutatedConstraints = !!a, a && (i = Ro(a));
|
|
5529
5529
|
}
|
|
5530
5530
|
return i;
|
|
5531
5531
|
}
|
|
5532
5532
|
startAnimation(t) {
|
|
5533
|
-
const { drag: s, dragMomentum: n, dragElastic: r, dragTransition: o, dragSnapToOrigin: i, onDragTransitionEnd: a } = this.getProps(), c = this.constraints || {},
|
|
5534
|
-
if (!Et(
|
|
5533
|
+
const { drag: s, dragMomentum: n, dragElastic: r, dragTransition: o, dragSnapToOrigin: i, onDragTransitionEnd: a } = this.getProps(), c = this.constraints || {}, d = ve((u) => {
|
|
5534
|
+
if (!Et(u, s, this.currentDirection))
|
|
5535
5535
|
return;
|
|
5536
|
-
let f = c && c[
|
|
5537
|
-
(i === !0 || i ===
|
|
5536
|
+
let f = c && c[u] || {};
|
|
5537
|
+
(i === !0 || i === u) && (f = { min: 0, max: 0 });
|
|
5538
5538
|
const h = r ? 200 : 1e6, m = r ? 40 : 1e7, g = {
|
|
5539
5539
|
type: "inertia",
|
|
5540
|
-
velocity: n ? t[
|
|
5540
|
+
velocity: n ? t[u] : 0,
|
|
5541
5541
|
bounceStiffness: h,
|
|
5542
5542
|
bounceDamping: m,
|
|
5543
5543
|
timeConstant: 750,
|
|
@@ -5546,9 +5546,9 @@ class lh {
|
|
|
5546
5546
|
...o,
|
|
5547
5547
|
...f
|
|
5548
5548
|
};
|
|
5549
|
-
return this.startAxisValueAnimation(
|
|
5549
|
+
return this.startAxisValueAnimation(u, g);
|
|
5550
5550
|
});
|
|
5551
|
-
return Promise.all(
|
|
5551
|
+
return Promise.all(d).then(a);
|
|
5552
5552
|
}
|
|
5553
5553
|
startAxisValueAnimation(t, s) {
|
|
5554
5554
|
const n = this.getAxisMotionValue(t);
|
|
@@ -5603,28 +5603,28 @@ class lh {
|
|
|
5603
5603
|
this.visualElement.current.style.transform = o ? o({}, "") : "none", n.root && n.root.updateScroll(), n.updateLayout(), this.constraints = !1, this.resolveConstraints(), ve((i) => {
|
|
5604
5604
|
if (!Et(i, t, null))
|
|
5605
5605
|
return;
|
|
5606
|
-
const a = this.getAxisMotionValue(i), { min: c, max:
|
|
5607
|
-
a.set(W(c,
|
|
5606
|
+
const a = this.getAxisMotionValue(i), { min: c, max: d } = this.constraints[i];
|
|
5607
|
+
a.set(W(c, d, r[i]));
|
|
5608
5608
|
}), this.visualElement.render();
|
|
5609
5609
|
}
|
|
5610
5610
|
addListeners() {
|
|
5611
5611
|
if (!this.visualElement.current)
|
|
5612
5612
|
return;
|
|
5613
5613
|
ah.set(this.visualElement, this);
|
|
5614
|
-
const t = this.visualElement.current, s = ht(t, "pointerdown", (
|
|
5615
|
-
const { drag:
|
|
5616
|
-
|
|
5614
|
+
const t = this.visualElement.current, s = ht(t, "pointerdown", (d) => {
|
|
5615
|
+
const { drag: u, dragListener: f = !0 } = this.getProps(), h = d.target, m = h !== t && Bd(h);
|
|
5616
|
+
u && f && !m && this.start(d);
|
|
5617
5617
|
});
|
|
5618
5618
|
let n;
|
|
5619
5619
|
const r = () => {
|
|
5620
|
-
const { dragConstraints:
|
|
5621
|
-
Xe(
|
|
5620
|
+
const { dragConstraints: d } = this.getProps();
|
|
5621
|
+
Xe(d) && d.current && (this.constraints = this.resolveRefConstraints(), n || (n = ch(t, d.current, () => this.scalePositionWithinConstraints())));
|
|
5622
5622
|
}, { projection: o } = this.visualElement, i = o.addEventListener("measure", r);
|
|
5623
5623
|
o && !o.layout && (o.root && o.root.updateScroll(), o.updateLayout()), F.read(r);
|
|
5624
|
-
const a = yt(window, "resize", () => this.scalePositionWithinConstraints()), c = o.addEventListener("didUpdate", (({ delta:
|
|
5625
|
-
this.isDragging &&
|
|
5624
|
+
const a = yt(window, "resize", () => this.scalePositionWithinConstraints()), c = o.addEventListener("didUpdate", (({ delta: d, hasLayoutChanged: u }) => {
|
|
5625
|
+
this.isDragging && u && (ve((f) => {
|
|
5626
5626
|
const h = this.getAxisMotionValue(f);
|
|
5627
|
-
h && (this.originPoint[f] +=
|
|
5627
|
+
h && (this.originPoint[f] += d[f].translate, h.set(h.get() + d[f].translate));
|
|
5628
5628
|
}), this.visualElement.render());
|
|
5629
5629
|
}));
|
|
5630
5630
|
return () => {
|
|
@@ -5655,7 +5655,7 @@ function ri(e) {
|
|
|
5655
5655
|
};
|
|
5656
5656
|
}
|
|
5657
5657
|
function ch(e, t, s) {
|
|
5658
|
-
const n =
|
|
5658
|
+
const n = ur(e, ri(s)), r = ur(t, ri(s));
|
|
5659
5659
|
return () => {
|
|
5660
5660
|
n(), r();
|
|
5661
5661
|
};
|
|
@@ -5663,11 +5663,11 @@ function ch(e, t, s) {
|
|
|
5663
5663
|
function Et(e, t, s) {
|
|
5664
5664
|
return (t === !0 || t === e) && (s === null || s === e);
|
|
5665
5665
|
}
|
|
5666
|
-
function
|
|
5666
|
+
function dh(e, t = 10) {
|
|
5667
5667
|
let s = null;
|
|
5668
5668
|
return Math.abs(e.y) > t ? s = "y" : Math.abs(e.x) > t && (s = "x"), s;
|
|
5669
5669
|
}
|
|
5670
|
-
class
|
|
5670
|
+
class uh extends ze {
|
|
5671
5671
|
constructor(t) {
|
|
5672
5672
|
super(t), this.removeGroupControls = me, this.removeListeners = me, this.controls = new lh(t);
|
|
5673
5673
|
}
|
|
@@ -5691,9 +5691,9 @@ class fh extends ze {
|
|
|
5691
5691
|
super(...arguments), this.removePointerDownListener = me;
|
|
5692
5692
|
}
|
|
5693
5693
|
onPointerDown(t) {
|
|
5694
|
-
this.session = new
|
|
5694
|
+
this.session = new ua(t, this.createPanHandlers(), {
|
|
5695
5695
|
transformPagePoint: this.node.getTransformPagePoint(),
|
|
5696
|
-
contextWindow:
|
|
5696
|
+
contextWindow: da(this.node)
|
|
5697
5697
|
});
|
|
5698
5698
|
}
|
|
5699
5699
|
createPanHandlers() {
|
|
@@ -5771,7 +5771,7 @@ const mh = {
|
|
|
5771
5771
|
Feature: fh
|
|
5772
5772
|
},
|
|
5773
5773
|
drag: {
|
|
5774
|
-
Feature:
|
|
5774
|
+
Feature: uh,
|
|
5775
5775
|
ProjectionNode: ea,
|
|
5776
5776
|
MeasureLayout: ha
|
|
5777
5777
|
}
|
|
@@ -5785,7 +5785,7 @@ function ii(e, t, s) {
|
|
|
5785
5785
|
class ph extends ze {
|
|
5786
5786
|
mount() {
|
|
5787
5787
|
const { current: t } = this.node;
|
|
5788
|
-
t && (this.unmount =
|
|
5788
|
+
t && (this.unmount = Id(t, (s, n) => (ii(this.node, n, "Start"), (r) => ii(this.node, r, "End"))));
|
|
5789
5789
|
}
|
|
5790
5790
|
unmount() {
|
|
5791
5791
|
}
|
|
@@ -5826,7 +5826,7 @@ class yh extends ze {
|
|
|
5826
5826
|
if (!t)
|
|
5827
5827
|
return;
|
|
5828
5828
|
const { globalTapTarget: s, propagate: n } = this.node.props;
|
|
5829
|
-
this.unmount = $
|
|
5829
|
+
this.unmount = $d(t, (r, o) => (oi(this.node, o, "Start"), (i, { success: a }) => oi(this.node, i, a ? "End" : "Cancel")), {
|
|
5830
5830
|
useGlobalTarget: s,
|
|
5831
5831
|
stopPropagation: (n == null ? void 0 : n.tap) === !1
|
|
5832
5832
|
});
|
|
@@ -5867,13 +5867,13 @@ class jh extends ze {
|
|
|
5867
5867
|
root: s ? s.current : void 0,
|
|
5868
5868
|
rootMargin: n,
|
|
5869
5869
|
threshold: typeof r == "number" ? r : kh[r]
|
|
5870
|
-
}, a = (
|
|
5871
|
-
const { isIntersecting:
|
|
5872
|
-
if (this.isInView ===
|
|
5870
|
+
}, a = (d) => {
|
|
5871
|
+
const { isIntersecting: u } = d;
|
|
5872
|
+
if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
|
|
5873
5873
|
return;
|
|
5874
|
-
|
|
5875
|
-
const { onViewportEnter: f, onViewportLeave: h } = this.node.getProps(), m =
|
|
5876
|
-
m && m(
|
|
5874
|
+
u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
|
|
5875
|
+
const { onViewportEnter: f, onViewportLeave: h } = this.node.getProps(), m = u ? f : h;
|
|
5876
|
+
m && m(d);
|
|
5877
5877
|
};
|
|
5878
5878
|
this.stopObserver = wh(this.node.current, i, a);
|
|
5879
5879
|
}
|
|
@@ -5959,8 +5959,8 @@ const Ph = (e, t) => {
|
|
|
5959
5959
|
},
|
|
5960
5960
|
getConflictingClassGroupIds: (i, a) => {
|
|
5961
5961
|
if (a) {
|
|
5962
|
-
const c = n[i],
|
|
5963
|
-
return c ?
|
|
5962
|
+
const c = n[i], d = s[i];
|
|
5963
|
+
return c ? d ? Ph(d, c) : c : d || ai;
|
|
5964
5964
|
}
|
|
5965
5965
|
return s[i] || ai;
|
|
5966
5966
|
}
|
|
@@ -5970,17 +5970,17 @@ const Ph = (e, t) => {
|
|
|
5970
5970
|
return s.classGroupId;
|
|
5971
5971
|
const r = e[t], o = s.nextPart.get(r);
|
|
5972
5972
|
if (o) {
|
|
5973
|
-
const
|
|
5974
|
-
if (
|
|
5973
|
+
const d = ga(e, t + 1, o);
|
|
5974
|
+
if (d) return d;
|
|
5975
5975
|
}
|
|
5976
5976
|
const i = s.validators;
|
|
5977
5977
|
if (i === null)
|
|
5978
5978
|
return;
|
|
5979
5979
|
const a = t === 0 ? e.join(ss) : e.slice(t).join(ss), c = i.length;
|
|
5980
|
-
for (let
|
|
5981
|
-
const
|
|
5982
|
-
if (
|
|
5983
|
-
return
|
|
5980
|
+
for (let d = 0; d < c; d++) {
|
|
5981
|
+
const u = i[d];
|
|
5982
|
+
if (u.validator(a))
|
|
5983
|
+
return u.classGroupId;
|
|
5984
5984
|
}
|
|
5985
5985
|
}, Rh = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
5986
5986
|
const t = e.slice(1, -1), s = t.indexOf(":"), n = t.slice(0, s);
|
|
@@ -6075,9 +6075,9 @@ const Ph = (e, t) => {
|
|
|
6075
6075
|
} = e;
|
|
6076
6076
|
let n = (r) => {
|
|
6077
6077
|
const o = [];
|
|
6078
|
-
let i = 0, a = 0, c = 0,
|
|
6079
|
-
const
|
|
6080
|
-
for (let p = 0; p <
|
|
6078
|
+
let i = 0, a = 0, c = 0, d;
|
|
6079
|
+
const u = r.length;
|
|
6080
|
+
for (let p = 0; p < u; p++) {
|
|
6081
6081
|
const y = r[p];
|
|
6082
6082
|
if (i === 0 && a === 0) {
|
|
6083
6083
|
if (y === li) {
|
|
@@ -6085,7 +6085,7 @@ const Ph = (e, t) => {
|
|
|
6085
6085
|
continue;
|
|
6086
6086
|
}
|
|
6087
6087
|
if (y === "/") {
|
|
6088
|
-
|
|
6088
|
+
d = p;
|
|
6089
6089
|
continue;
|
|
6090
6090
|
}
|
|
6091
6091
|
}
|
|
@@ -6100,7 +6100,7 @@ const Ph = (e, t) => {
|
|
|
6100
6100
|
*/
|
|
6101
6101
|
f.startsWith(Qs) && (h = f.slice(1), m = !0)
|
|
6102
6102
|
);
|
|
6103
|
-
const g =
|
|
6103
|
+
const g = d && d > c ? d - c : void 0;
|
|
6104
6104
|
return ci(o, m, h, g);
|
|
6105
6105
|
};
|
|
6106
6106
|
if (t) {
|
|
@@ -6148,9 +6148,9 @@ const Ph = (e, t) => {
|
|
|
6148
6148
|
sortModifiers: o,
|
|
6149
6149
|
postfixLookupClassGroupIds: i
|
|
6150
6150
|
} = t, a = [], c = e.trim().split(Yh);
|
|
6151
|
-
let
|
|
6152
|
-
for (let
|
|
6153
|
-
const f = c[
|
|
6151
|
+
let d = "";
|
|
6152
|
+
for (let u = c.length - 1; u >= 0; u -= 1) {
|
|
6153
|
+
const f = c[u], {
|
|
6154
6154
|
isExternal: h,
|
|
6155
6155
|
modifiers: m,
|
|
6156
6156
|
hasImportantModifier: g,
|
|
@@ -6158,7 +6158,7 @@ const Ph = (e, t) => {
|
|
|
6158
6158
|
maybePostfixModifierPosition: y
|
|
6159
6159
|
} = s(f);
|
|
6160
6160
|
if (h) {
|
|
6161
|
-
|
|
6161
|
+
d = f + (d.length > 0 ? " " + d : d);
|
|
6162
6162
|
continue;
|
|
6163
6163
|
}
|
|
6164
6164
|
let w = !!y, b;
|
|
@@ -6171,11 +6171,11 @@ const Ph = (e, t) => {
|
|
|
6171
6171
|
b = n(p);
|
|
6172
6172
|
if (!b) {
|
|
6173
6173
|
if (!w) {
|
|
6174
|
-
|
|
6174
|
+
d = f + (d.length > 0 ? " " + d : d);
|
|
6175
6175
|
continue;
|
|
6176
6176
|
}
|
|
6177
6177
|
if (b = n(p), !b) {
|
|
6178
|
-
|
|
6178
|
+
d = f + (d.length > 0 ? " " + d : d);
|
|
6179
6179
|
continue;
|
|
6180
6180
|
}
|
|
6181
6181
|
w = !1;
|
|
@@ -6189,9 +6189,9 @@ const Ph = (e, t) => {
|
|
|
6189
6189
|
const k = P[L];
|
|
6190
6190
|
a.push(j + k);
|
|
6191
6191
|
}
|
|
6192
|
-
|
|
6192
|
+
d = f + (d.length > 0 ? " " + d : d);
|
|
6193
6193
|
}
|
|
6194
|
-
return
|
|
6194
|
+
return d;
|
|
6195
6195
|
}, Xh = (...e) => {
|
|
6196
6196
|
let t = 0, s, n, r = "";
|
|
6197
6197
|
for (; t < e.length; )
|
|
@@ -6207,14 +6207,14 @@ const Ph = (e, t) => {
|
|
|
6207
6207
|
}, qh = (e, ...t) => {
|
|
6208
6208
|
let s, n, r, o;
|
|
6209
6209
|
const i = (c) => {
|
|
6210
|
-
const
|
|
6211
|
-
return s = Gh(
|
|
6210
|
+
const d = t.reduce((u, f) => f(u), e());
|
|
6211
|
+
return s = Gh(d), n = s.cache.get, r = s.cache.set, o = a, a(c);
|
|
6212
6212
|
}, a = (c) => {
|
|
6213
|
-
const
|
|
6214
|
-
if (
|
|
6215
|
-
return
|
|
6216
|
-
const
|
|
6217
|
-
return r(c,
|
|
6213
|
+
const d = n(c);
|
|
6214
|
+
if (d)
|
|
6215
|
+
return d;
|
|
6216
|
+
const u = Hh(c, s);
|
|
6217
|
+
return r(c, u), u;
|
|
6218
6218
|
};
|
|
6219
6219
|
return o = i, (...c) => o(Xh(...c));
|
|
6220
6220
|
}, Zh = [], te = (e) => {
|
|
@@ -6225,14 +6225,14 @@ const Ph = (e, t) => {
|
|
|
6225
6225
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
6226
6226
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
6227
6227
|
em.test(e) && !tm.test(e)
|
|
6228
|
-
), In = () => !1, im = (e) => sm.test(e), om = (e) => nm.test(e), am = (e) => !S(e) && !C(e), lm = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), cm = (e) => Oe(e, Ta, In), S = (e) => ba.test(e), Be = (e) => Oe(e, Sa, rm),
|
|
6228
|
+
), In = () => !1, im = (e) => sm.test(e), om = (e) => nm.test(e), am = (e) => !S(e) && !C(e), lm = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), cm = (e) => Oe(e, Ta, In), S = (e) => ba.test(e), Be = (e) => Oe(e, Sa, rm), di = (e) => Oe(e, ym, D), dm = (e) => Oe(e, Aa, wa), um = (e) => Oe(e, Ca, In), ui = (e) => Oe(e, ka, In), fm = (e) => Oe(e, ja, om), Vt = (e) => Oe(e, Na, im), C = (e) => va.test(e), ct = (e) => Ye(e, Sa), hm = (e) => Ye(e, Ca), fi = (e) => Ye(e, ka), mm = (e) => Ye(e, Ta), pm = (e) => Ye(e, ja), Rt = (e) => Ye(e, Na, !0), gm = (e) => Ye(e, Aa, !0), Oe = (e, t, s) => {
|
|
6229
6229
|
const n = ba.exec(e);
|
|
6230
6230
|
return n ? n[1] ? t(n[1]) : s(n[2]) : !1;
|
|
6231
6231
|
}, Ye = (e, t, s = !1) => {
|
|
6232
6232
|
const n = va.exec(e);
|
|
6233
6233
|
return n ? n[1] ? t(n[1]) : s : !1;
|
|
6234
6234
|
}, ka = (e) => e === "position" || e === "percentage", ja = (e) => e === "image" || e === "url", Ta = (e) => e === "length" || e === "size" || e === "bg-size", Sa = (e) => e === "length", ym = (e) => e === "number", Ca = (e) => e === "family-name", Aa = (e) => e === "number" || e === "weight", Na = (e) => e === "shadow", xm = () => {
|
|
6235
|
-
const e = te("color"), t = te("font"), s = te("text"), n = te("font-weight"), r = te("tracking"), o = te("leading"), i = te("breakpoint"), a = te("container"), c = te("spacing"),
|
|
6235
|
+
const e = te("color"), t = te("font"), s = te("text"), n = te("font-weight"), r = te("tracking"), o = te("leading"), i = te("breakpoint"), a = te("container"), c = te("spacing"), d = te("radius"), u = te("shadow"), f = te("inset-shadow"), h = te("text-shadow"), m = te("drop-shadow"), g = te("blur"), p = te("perspective"), y = te("aspect"), w = te("ease"), b = te("animate"), x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], j = () => [
|
|
6236
6236
|
"center",
|
|
6237
6237
|
"top",
|
|
6238
6238
|
"bottom",
|
|
@@ -6252,7 +6252,7 @@ const Ph = (e, t) => {
|
|
|
6252
6252
|
"left-bottom"
|
|
6253
6253
|
], T = () => [...j(), C, S], P = () => ["auto", "hidden", "clip", "visible", "scroll"], L = () => ["auto", "contain", "none"], k = () => [C, S, c], M = () => [Me, "full", "auto", ...k()], E = () => [be, "none", "subgrid", C, S], O = () => ["auto", {
|
|
6254
6254
|
span: ["full", be, C, S]
|
|
6255
|
-
}, be, C, S], B = () => [be, "auto", C, S], le = () => ["auto", "min", "max", "fr", C, S], ae = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], q = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], _ = () => ["auto", ...k()], pe = () => [Me, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...k()], U = () => [Me, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...k()], Q = () => [Me, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...k()], N = () => [e, C, S], v = () => [...j(), fi,
|
|
6255
|
+
}, be, C, S], B = () => [be, "auto", C, S], le = () => ["auto", "min", "max", "fr", C, S], ae = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], q = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], _ = () => ["auto", ...k()], pe = () => [Me, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...k()], U = () => [Me, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...k()], Q = () => [Me, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...k()], N = () => [e, C, S], v = () => [...j(), fi, ui, {
|
|
6256
6256
|
position: [C, S]
|
|
6257
6257
|
}], R = () => ["no-repeat", {
|
|
6258
6258
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -6263,17 +6263,17 @@ const Ph = (e, t) => {
|
|
|
6263
6263
|
"",
|
|
6264
6264
|
"none",
|
|
6265
6265
|
"full",
|
|
6266
|
-
|
|
6266
|
+
d,
|
|
6267
6267
|
C,
|
|
6268
6268
|
S
|
|
6269
|
-
], ee = () => ["", D, ct, Be], G = () => ["solid", "dashed", "dotted", "double"], Se = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], X = () => [D, As, fi,
|
|
6269
|
+
], ee = () => ["", D, ct, Be], G = () => ["solid", "dashed", "dotted", "double"], Se = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], X = () => [D, As, fi, ui], kt = () => [
|
|
6270
6270
|
// Deprecated since Tailwind CSS v4.0.0
|
|
6271
6271
|
"",
|
|
6272
6272
|
"none",
|
|
6273
6273
|
g,
|
|
6274
6274
|
C,
|
|
6275
6275
|
S
|
|
6276
|
-
], jt = () => ["none", D, C, S], Tt = () => ["none", D, C, S],
|
|
6276
|
+
], jt = () => ["none", D, C, S], Tt = () => ["none", D, C, S], ds = () => [D, C, S], St = () => [Me, "full", ...k()];
|
|
6277
6277
|
return {
|
|
6278
6278
|
cacheSize: 500,
|
|
6279
6279
|
theme: {
|
|
@@ -7091,7 +7091,7 @@ const Ph = (e, t) => {
|
|
|
7091
7091
|
* @see https://tailwindcss.com/docs/font-weight
|
|
7092
7092
|
*/
|
|
7093
7093
|
"font-weight": [{
|
|
7094
|
-
font: [n, gm,
|
|
7094
|
+
font: [n, gm, dm]
|
|
7095
7095
|
}],
|
|
7096
7096
|
/**
|
|
7097
7097
|
* Font Stretch
|
|
@@ -7105,7 +7105,7 @@ const Ph = (e, t) => {
|
|
|
7105
7105
|
* @see https://tailwindcss.com/docs/font-family
|
|
7106
7106
|
*/
|
|
7107
7107
|
"font-family": [{
|
|
7108
|
-
font: [hm,
|
|
7108
|
+
font: [hm, um, t]
|
|
7109
7109
|
}],
|
|
7110
7110
|
/**
|
|
7111
7111
|
* Font Feature Settings
|
|
@@ -7156,7 +7156,7 @@ const Ph = (e, t) => {
|
|
|
7156
7156
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
7157
7157
|
*/
|
|
7158
7158
|
"line-clamp": [{
|
|
7159
|
-
"line-clamp": [D, "none", C,
|
|
7159
|
+
"line-clamp": [D, "none", C, di]
|
|
7160
7160
|
}],
|
|
7161
7161
|
/**
|
|
7162
7162
|
* Line Height
|
|
@@ -7772,7 +7772,7 @@ const Ph = (e, t) => {
|
|
|
7772
7772
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7773
7773
|
"",
|
|
7774
7774
|
"none",
|
|
7775
|
-
|
|
7775
|
+
u,
|
|
7776
7776
|
Rt,
|
|
7777
7777
|
Vt
|
|
7778
7778
|
]
|
|
@@ -8431,21 +8431,21 @@ const Ph = (e, t) => {
|
|
|
8431
8431
|
* @see https://tailwindcss.com/docs/skew
|
|
8432
8432
|
*/
|
|
8433
8433
|
skew: [{
|
|
8434
|
-
skew:
|
|
8434
|
+
skew: ds()
|
|
8435
8435
|
}],
|
|
8436
8436
|
/**
|
|
8437
8437
|
* Skew X
|
|
8438
8438
|
* @see https://tailwindcss.com/docs/skew
|
|
8439
8439
|
*/
|
|
8440
8440
|
"skew-x": [{
|
|
8441
|
-
"skew-x":
|
|
8441
|
+
"skew-x": ds()
|
|
8442
8442
|
}],
|
|
8443
8443
|
/**
|
|
8444
8444
|
* Skew Y
|
|
8445
8445
|
* @see https://tailwindcss.com/docs/skew
|
|
8446
8446
|
*/
|
|
8447
8447
|
"skew-y": [{
|
|
8448
|
-
"skew-y":
|
|
8448
|
+
"skew-y": ds()
|
|
8449
8449
|
}],
|
|
8450
8450
|
/**
|
|
8451
8451
|
* Transform
|
|
@@ -8839,7 +8839,7 @@ const Ph = (e, t) => {
|
|
|
8839
8839
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
8840
8840
|
*/
|
|
8841
8841
|
"stroke-w": [{
|
|
8842
|
-
stroke: [D, ct, Be,
|
|
8842
|
+
stroke: [D, ct, Be, di]
|
|
8843
8843
|
}],
|
|
8844
8844
|
/**
|
|
8845
8845
|
* Stroke
|
|
@@ -9164,10 +9164,10 @@ const Nm = ({
|
|
|
9164
9164
|
title: o = "Ether UI Console",
|
|
9165
9165
|
className: i
|
|
9166
9166
|
}) => {
|
|
9167
|
-
const [a, c] = z(e), [
|
|
9167
|
+
const [a, c] = z(e), [d, u] = z(""), [f, h] = z(""), [m, g] = z(""), [p, y] = z(!1), [w, b] = z(!1), [x, j] = z(!1), T = async (P) => {
|
|
9168
9168
|
P.preventDefault(), j(!0);
|
|
9169
9169
|
try {
|
|
9170
|
-
a === "login" && t ? await t({ email: f, password: m, rememberMe: p }) : a === "register" && s ? await s({ name:
|
|
9170
|
+
a === "login" && t ? await t({ email: f, password: m, rememberMe: p }) : a === "register" && s ? await s({ name: d, email: f, password: m, acceptTerms: w }) : a === "forgot" && n && await n({ email: f });
|
|
9171
9171
|
} finally {
|
|
9172
9172
|
j(!1);
|
|
9173
9173
|
}
|
|
@@ -9273,8 +9273,8 @@ const Nm = ({
|
|
|
9273
9273
|
label: "Full Name",
|
|
9274
9274
|
type: "text",
|
|
9275
9275
|
placeholder: "Alex Carter",
|
|
9276
|
-
value:
|
|
9277
|
-
onChange: (P) =>
|
|
9276
|
+
value: d,
|
|
9277
|
+
onChange: (P) => u(P.target.value),
|
|
9278
9278
|
required: !0
|
|
9279
9279
|
}
|
|
9280
9280
|
),
|
|
@@ -9446,12 +9446,12 @@ const Nm = ({
|
|
|
9446
9446
|
placeholder: r = "Select option",
|
|
9447
9447
|
className: o
|
|
9448
9448
|
}) => {
|
|
9449
|
-
const [i, a] = z(!1), c = re(null),
|
|
9449
|
+
const [i, a] = z(!1), c = re(null), d = t.find((u) => u.value === s);
|
|
9450
9450
|
return Ae(() => {
|
|
9451
|
-
const
|
|
9451
|
+
const u = (f) => {
|
|
9452
9452
|
c.current && !c.current.contains(f.target) && a(!1);
|
|
9453
9453
|
};
|
|
9454
|
-
return document.addEventListener("mousedown",
|
|
9454
|
+
return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
|
|
9455
9455
|
}, []), /* @__PURE__ */ l.jsxs("div", { ref: c, className: V("space-y-1.5 w-full text-left relative", o), children: [
|
|
9456
9456
|
e && /* @__PURE__ */ l.jsx("label", { className: "text-sm font-semibold text-foreground ml-1", children: e }),
|
|
9457
9457
|
/* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs(
|
|
@@ -9461,7 +9461,7 @@ const Nm = ({
|
|
|
9461
9461
|
onClick: () => a(!i),
|
|
9462
9462
|
className: "glass-input w-full flex items-center justify-between cursor-pointer focus:ring-2 focus:ring-ring/10 text-left",
|
|
9463
9463
|
children: [
|
|
9464
|
-
/* @__PURE__ */ l.jsx("span", { className: V(!
|
|
9464
|
+
/* @__PURE__ */ l.jsx("span", { className: V(!d && "text-muted-foreground/60"), children: d ? d.label : r }),
|
|
9465
9465
|
/* @__PURE__ */ l.jsx(Ti, { size: 18, className: V("text-muted-foreground transition-transform duration-200", i && "rotate-180") })
|
|
9466
9466
|
]
|
|
9467
9467
|
}
|
|
@@ -9474,22 +9474,22 @@ const Nm = ({
|
|
|
9474
9474
|
exit: { opacity: 0, y: 5, scale: 0.98 },
|
|
9475
9475
|
transition: { duration: 0.15 },
|
|
9476
9476
|
className: "absolute z-50 w-full mt-2 glass-panel rounded-2xl overflow-hidden shadow-2xl p-1 max-h-60 overflow-y-auto custom-scrollbar",
|
|
9477
|
-
children: t.map((
|
|
9478
|
-
const h =
|
|
9477
|
+
children: t.map((u, f) => {
|
|
9478
|
+
const h = u.value === s;
|
|
9479
9479
|
return /* @__PURE__ */ l.jsx(
|
|
9480
9480
|
"button",
|
|
9481
9481
|
{
|
|
9482
9482
|
type: "button",
|
|
9483
9483
|
onClick: () => {
|
|
9484
|
-
n && n(
|
|
9484
|
+
n && n(u.value), a(!1);
|
|
9485
9485
|
},
|
|
9486
9486
|
className: V(
|
|
9487
9487
|
"w-full text-left px-4 py-2.5 rounded-xl text-sm transition-colors cursor-pointer",
|
|
9488
9488
|
h ? "bg-primary text-primary-foreground font-semibold" : "hover:bg-secondary text-foreground"
|
|
9489
9489
|
),
|
|
9490
|
-
children:
|
|
9490
|
+
children: u.label
|
|
9491
9491
|
},
|
|
9492
|
-
|
|
9492
|
+
u.value || f
|
|
9493
9493
|
);
|
|
9494
9494
|
})
|
|
9495
9495
|
}
|
|
@@ -9502,7 +9502,7 @@ const Nm = ({
|
|
|
9502
9502
|
maxSizeMB: n = 10,
|
|
9503
9503
|
className: r
|
|
9504
9504
|
}) => {
|
|
9505
|
-
const [o, i] = z(!1), [a, c] = z([]),
|
|
9505
|
+
const [o, i] = z(!1), [a, c] = z([]), d = re(null), u = (p) => {
|
|
9506
9506
|
p.preventDefault(), p.stopPropagation(), p.type === "dragenter" || p.type === "dragover" ? i(!0) : p.type === "dragleave" && i(!1);
|
|
9507
9507
|
}, f = (p) => {
|
|
9508
9508
|
const y = Array.from(p).map((b) => {
|
|
@@ -9539,11 +9539,11 @@ const Nm = ({
|
|
|
9539
9539
|
/* @__PURE__ */ l.jsxs(
|
|
9540
9540
|
"div",
|
|
9541
9541
|
{
|
|
9542
|
-
onDragEnter:
|
|
9543
|
-
onDragOver:
|
|
9544
|
-
onDragLeave:
|
|
9542
|
+
onDragEnter: u,
|
|
9543
|
+
onDragOver: u,
|
|
9544
|
+
onDragLeave: u,
|
|
9545
9545
|
onDrop: h,
|
|
9546
|
-
onClick: () =>
|
|
9546
|
+
onClick: () => d.current && d.current.click(),
|
|
9547
9547
|
className: V(
|
|
9548
9548
|
"relative border-2 border-dashed rounded-2xl p-8 flex flex-col items-center justify-center gap-3 cursor-pointer select-none transition-all duration-300 min-h-[160px]",
|
|
9549
9549
|
o ? "border-primary bg-primary/5 scale-[0.99] shadow-md shadow-primary/5" : "bg-white/40 border-border dark:bg-black/20 hover:border-primary/50 hover:bg-secondary/20"
|
|
@@ -9552,7 +9552,7 @@ const Nm = ({
|
|
|
9552
9552
|
/* @__PURE__ */ l.jsx(
|
|
9553
9553
|
"input",
|
|
9554
9554
|
{
|
|
9555
|
-
ref:
|
|
9555
|
+
ref: d,
|
|
9556
9556
|
type: "file",
|
|
9557
9557
|
multiple: !0,
|
|
9558
9558
|
accept: t,
|
|
@@ -9617,7 +9617,7 @@ const Nm = ({
|
|
|
9617
9617
|
className: "flex items-center justify-between gap-4 p-2.5 rounded-xl bg-secondary/30 border border-border/10 text-xs",
|
|
9618
9618
|
children: [
|
|
9619
9619
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: [
|
|
9620
|
-
/* @__PURE__ */ l.jsx("div", { className: "p-2 rounded-lg bg-card border border-border/20 text-muted-foreground shrink-0", children: /* @__PURE__ */ l.jsx(
|
|
9620
|
+
/* @__PURE__ */ l.jsx("div", { className: "p-2 rounded-lg bg-card border border-border/20 text-muted-foreground shrink-0", children: /* @__PURE__ */ l.jsx(dl, { size: 16 }) }),
|
|
9621
9621
|
/* @__PURE__ */ l.jsxs("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
9622
9622
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
9623
9623
|
/* @__PURE__ */ l.jsx("p", { className: "font-semibold text-foreground truncate", children: p.name }),
|
|
@@ -9780,85 +9780,91 @@ const Nm = ({
|
|
|
9780
9780
|
totalPages: t = 1,
|
|
9781
9781
|
onPageChange: s,
|
|
9782
9782
|
loading: n = !1
|
|
9783
|
-
}) =>
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
onClick: () => s(e - 1),
|
|
9790
|
-
disabled: e === 1 || n,
|
|
9791
|
-
children: "Previous"
|
|
9792
|
-
}
|
|
9793
|
-
),
|
|
9794
|
-
/* @__PURE__ */ l.jsx(
|
|
9795
|
-
ke,
|
|
9796
|
-
{
|
|
9797
|
-
variant: "outline",
|
|
9798
|
-
onClick: () => s(e + 1),
|
|
9799
|
-
disabled: e === t || n,
|
|
9800
|
-
children: "Next"
|
|
9801
|
-
}
|
|
9802
|
-
)
|
|
9803
|
-
] }),
|
|
9804
|
-
/* @__PURE__ */ l.jsxs("div", { className: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between", children: [
|
|
9805
|
-
/* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
9806
|
-
"Page ",
|
|
9807
|
-
/* @__PURE__ */ l.jsx("span", { className: "font-bold text-foreground", children: e }),
|
|
9808
|
-
" of",
|
|
9809
|
-
" ",
|
|
9810
|
-
/* @__PURE__ */ l.jsx("span", { className: "font-bold text-foreground", children: t })
|
|
9811
|
-
] }) }),
|
|
9812
|
-
/* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs("nav", { className: "relative z-0 inline-flex gap-1.5 rounded-md shadow-sm", "aria-label": "Pagination", children: [
|
|
9813
|
-
/* @__PURE__ */ l.jsxs(
|
|
9783
|
+
}) => {
|
|
9784
|
+
if (t <= 1) return null;
|
|
9785
|
+
const o = ((i, a) => a <= 5 ? Array.from({ length: a }, (c, d) => d + 1) : i <= 3 ? [1, 2, 3, 4, "...", a] : i >= a - 2 ? [1, "...", a - 3, a - 2, a - 1, a] : [1, "...", i - 1, i, i + 1, "...", a])(e, t);
|
|
9786
|
+
return /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between py-2 mt-6 w-full", children: [
|
|
9787
|
+
/* @__PURE__ */ l.jsxs("div", { className: "flex-1 flex justify-between sm:hidden", children: [
|
|
9788
|
+
/* @__PURE__ */ l.jsx(
|
|
9814
9789
|
ke,
|
|
9815
9790
|
{
|
|
9816
9791
|
variant: "outline",
|
|
9817
|
-
className: "p-2.5 rounded-xl shrink-0",
|
|
9818
9792
|
onClick: () => s(e - 1),
|
|
9819
9793
|
disabled: e === 1 || n,
|
|
9820
|
-
children:
|
|
9821
|
-
/* @__PURE__ */ l.jsx("span", { className: "sr-only", children: "Previous" }),
|
|
9822
|
-
/* @__PURE__ */ l.jsx(Si, { size: 16 })
|
|
9823
|
-
]
|
|
9794
|
+
children: "Previous"
|
|
9824
9795
|
}
|
|
9825
9796
|
),
|
|
9826
|
-
|
|
9827
|
-
const i = o + 1, a = e === i;
|
|
9828
|
-
return /* @__PURE__ */ l.jsx(
|
|
9829
|
-
ke,
|
|
9830
|
-
{
|
|
9831
|
-
variant: a ? "primary" : "outline",
|
|
9832
|
-
className: "w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs",
|
|
9833
|
-
onClick: () => s(i),
|
|
9834
|
-
disabled: n,
|
|
9835
|
-
children: i
|
|
9836
|
-
},
|
|
9837
|
-
i
|
|
9838
|
-
);
|
|
9839
|
-
}),
|
|
9840
|
-
/* @__PURE__ */ l.jsxs(
|
|
9797
|
+
/* @__PURE__ */ l.jsx(
|
|
9841
9798
|
ke,
|
|
9842
9799
|
{
|
|
9843
9800
|
variant: "outline",
|
|
9844
|
-
className: "p-2.5 rounded-xl shrink-0",
|
|
9845
9801
|
onClick: () => s(e + 1),
|
|
9846
9802
|
disabled: e === t || n,
|
|
9847
|
-
children:
|
|
9848
|
-
/* @__PURE__ */ l.jsx("span", { className: "sr-only", children: "Next" }),
|
|
9849
|
-
/* @__PURE__ */ l.jsx(nn, { size: 16 })
|
|
9850
|
-
]
|
|
9803
|
+
children: "Next"
|
|
9851
9804
|
}
|
|
9852
9805
|
)
|
|
9853
|
-
] })
|
|
9854
|
-
|
|
9855
|
-
|
|
9806
|
+
] }),
|
|
9807
|
+
/* @__PURE__ */ l.jsxs("div", { className: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between", children: [
|
|
9808
|
+
/* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
9809
|
+
"Page ",
|
|
9810
|
+
/* @__PURE__ */ l.jsx("span", { className: "font-bold text-foreground", children: e }),
|
|
9811
|
+
" of",
|
|
9812
|
+
" ",
|
|
9813
|
+
/* @__PURE__ */ l.jsx("span", { className: "font-bold text-foreground", children: t })
|
|
9814
|
+
] }) }),
|
|
9815
|
+
/* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs("nav", { className: "relative z-0 inline-flex gap-1.5 rounded-md shadow-sm", "aria-label": "Pagination", children: [
|
|
9816
|
+
/* @__PURE__ */ l.jsxs(
|
|
9817
|
+
ke,
|
|
9818
|
+
{
|
|
9819
|
+
variant: "outline",
|
|
9820
|
+
className: "p-2.5 rounded-xl shrink-0",
|
|
9821
|
+
onClick: () => s(e - 1),
|
|
9822
|
+
disabled: e === 1 || n,
|
|
9823
|
+
children: [
|
|
9824
|
+
/* @__PURE__ */ l.jsx("span", { className: "sr-only", children: "Previous" }),
|
|
9825
|
+
/* @__PURE__ */ l.jsx(Si, { size: 16 })
|
|
9826
|
+
]
|
|
9827
|
+
}
|
|
9828
|
+
),
|
|
9829
|
+
o.map((i, a) => {
|
|
9830
|
+
if (i === "...")
|
|
9831
|
+
return /* @__PURE__ */ l.jsx("div", { className: "flex items-end justify-center px-1 pb-1", children: /* @__PURE__ */ l.jsx("span", { className: "text-muted-foreground tracking-widest leading-none font-bold", children: "..." }) }, `dots-${a}`);
|
|
9832
|
+
const c = e === i;
|
|
9833
|
+
return /* @__PURE__ */ l.jsx(
|
|
9834
|
+
ke,
|
|
9835
|
+
{
|
|
9836
|
+
variant: c ? "primary" : "outline",
|
|
9837
|
+
className: "w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs",
|
|
9838
|
+
onClick: () => s(i),
|
|
9839
|
+
disabled: n,
|
|
9840
|
+
children: i
|
|
9841
|
+
},
|
|
9842
|
+
i
|
|
9843
|
+
);
|
|
9844
|
+
}),
|
|
9845
|
+
/* @__PURE__ */ l.jsxs(
|
|
9846
|
+
ke,
|
|
9847
|
+
{
|
|
9848
|
+
variant: "outline",
|
|
9849
|
+
className: "p-2.5 rounded-xl shrink-0",
|
|
9850
|
+
onClick: () => s(e + 1),
|
|
9851
|
+
disabled: e === t || n,
|
|
9852
|
+
children: [
|
|
9853
|
+
/* @__PURE__ */ l.jsx("span", { className: "sr-only", children: "Next" }),
|
|
9854
|
+
/* @__PURE__ */ l.jsx(nn, { size: 16 })
|
|
9855
|
+
]
|
|
9856
|
+
}
|
|
9857
|
+
)
|
|
9858
|
+
] }) })
|
|
9859
|
+
] })
|
|
9860
|
+
] });
|
|
9861
|
+
}, zm = ({ children: e, content: t }) => {
|
|
9856
9862
|
const [s, n] = z(!1), [r, o] = z({ x: 0, y: 0 }), i = re(null), a = () => {
|
|
9857
9863
|
if (i.current) {
|
|
9858
|
-
const
|
|
9864
|
+
const u = i.current.getBoundingClientRect();
|
|
9859
9865
|
o({
|
|
9860
|
-
x:
|
|
9861
|
-
y:
|
|
9866
|
+
x: u.left + u.width / 2,
|
|
9867
|
+
y: u.top + window.scrollY - 8
|
|
9862
9868
|
});
|
|
9863
9869
|
}
|
|
9864
9870
|
};
|
|
@@ -9867,7 +9873,7 @@ const Nm = ({
|
|
|
9867
9873
|
}), [s]);
|
|
9868
9874
|
const c = () => {
|
|
9869
9875
|
t && n(!0);
|
|
9870
|
-
},
|
|
9876
|
+
}, d = () => {
|
|
9871
9877
|
n(!1);
|
|
9872
9878
|
};
|
|
9873
9879
|
return /* @__PURE__ */ l.jsxs(
|
|
@@ -9875,7 +9881,7 @@ const Nm = ({
|
|
|
9875
9881
|
{
|
|
9876
9882
|
ref: i,
|
|
9877
9883
|
onMouseEnter: c,
|
|
9878
|
-
onMouseLeave:
|
|
9884
|
+
onMouseLeave: d,
|
|
9879
9885
|
className: "inline-block w-full",
|
|
9880
9886
|
children: [
|
|
9881
9887
|
e,
|
|
@@ -10019,24 +10025,24 @@ const Nm = ({
|
|
|
10019
10025
|
showMobileToggle: a = !0,
|
|
10020
10026
|
onLogout: c
|
|
10021
10027
|
}) => {
|
|
10022
|
-
const [
|
|
10028
|
+
const [d, u] = z(!1), [f, h] = z(!e);
|
|
10023
10029
|
Ae(() => {
|
|
10024
10030
|
h(!e);
|
|
10025
10031
|
}, [e]), Ae(() => {
|
|
10026
10032
|
const x = () => {
|
|
10027
10033
|
const j = window.innerWidth < 768;
|
|
10028
|
-
|
|
10034
|
+
u(j), j || h(!1);
|
|
10029
10035
|
};
|
|
10030
10036
|
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
10031
10037
|
}, []);
|
|
10032
10038
|
const m = () => {
|
|
10033
|
-
if (
|
|
10039
|
+
if (d) {
|
|
10034
10040
|
const x = !f;
|
|
10035
10041
|
h(x), t && t(!x);
|
|
10036
10042
|
} else
|
|
10037
10043
|
t && t(!e);
|
|
10038
10044
|
}, g = () => {
|
|
10039
|
-
|
|
10045
|
+
d && (h(!1), t && t(!0));
|
|
10040
10046
|
};
|
|
10041
10047
|
let p = !1, y = () => {
|
|
10042
10048
|
}, w = !1;
|
|
@@ -10045,9 +10051,9 @@ const Nm = ({
|
|
|
10045
10051
|
x && (p = x.isDark, y = x.toggleTheme, w = !0);
|
|
10046
10052
|
} catch {
|
|
10047
10053
|
}
|
|
10048
|
-
const b =
|
|
10054
|
+
const b = d ? !f : e;
|
|
10049
10055
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
10050
|
-
|
|
10056
|
+
d && a && /* @__PURE__ */ l.jsxs("div", { className: "flex md:hidden items-center justify-between px-6 py-4 border-b border-border/20 bg-card/45 backdrop-blur-xl w-full shrink-0 min-h-[64px]", children: [
|
|
10051
10057
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
10052
10058
|
s && /* @__PURE__ */ l.jsx("div", { className: "text-primary shrink-0 transition-transform duration-300", children: s }),
|
|
10053
10059
|
/* @__PURE__ */ l.jsx("span", { className: "font-extrabold text-sm text-foreground tracking-tight", children: n })
|
|
@@ -10073,7 +10079,7 @@ const Nm = ({
|
|
|
10073
10079
|
)
|
|
10074
10080
|
] })
|
|
10075
10081
|
] }),
|
|
10076
|
-
|
|
10082
|
+
d && !b && /* @__PURE__ */ l.jsx(
|
|
10077
10083
|
"div",
|
|
10078
10084
|
{
|
|
10079
10085
|
onClick: m,
|
|
@@ -10082,7 +10088,7 @@ const Nm = ({
|
|
|
10082
10088
|
),
|
|
10083
10089
|
/* @__PURE__ */ l.jsxs("aside", { className: V(
|
|
10084
10090
|
"h-screen bg-card/45 backdrop-blur-xl border-r border-border/40 flex flex-col transition-all duration-300 ease-in-out shrink-0 text-left relative",
|
|
10085
|
-
|
|
10091
|
+
d ? "fixed top-0 bottom-0 left-0 z-50" : "z-30",
|
|
10086
10092
|
b ? "w-0 -translate-x-full md:w-20 md:translate-x-0 overflow-hidden border-r-0 md:border-r border-border/20" : "w-64 translate-x-0 border-r border-border/40",
|
|
10087
10093
|
i
|
|
10088
10094
|
), children: [
|
|
@@ -10324,17 +10330,17 @@ const Nm = ({
|
|
|
10324
10330
|
] }),
|
|
10325
10331
|
s && /* @__PURE__ */ l.jsx("span", { className: "text-sm font-semibold text-foreground", children: s })
|
|
10326
10332
|
] }), Ma = Pe(), Ym = ({ children: e }) => {
|
|
10327
|
-
const [t, s] = z([]), [n, r] = z(-1), [o, i] = z("IDLE"), [a, c] = z(""), [
|
|
10328
|
-
s(b), c(x || "Batch Processing"), r(0), i("SYNCING"),
|
|
10333
|
+
const [t, s] = z([]), [n, r] = z(-1), [o, i] = z("IDLE"), [a, c] = z(""), [d, u] = z({ success: 0, failed: 0, skipped: 0, noLedger: 0, items: [] }), [f, h] = z(null), m = re(!1), g = (b, x = "", j) => {
|
|
10334
|
+
s(b), c(x || "Batch Processing"), r(0), i("SYNCING"), u({ success: 0, failed: 0, skipped: 0, noLedger: 0, items: [] }), h(() => j);
|
|
10329
10335
|
}, p = () => {
|
|
10330
|
-
s([]), r(-1), i("IDLE"),
|
|
10336
|
+
s([]), r(-1), i("IDLE"), u({ success: 0, failed: 0, skipped: 0, noLedger: 0, items: [] }), h(null);
|
|
10331
10337
|
}, y = async () => {
|
|
10332
10338
|
if (n < 0 || n >= t.length || m.current || !f) return;
|
|
10333
10339
|
m.current = !0;
|
|
10334
10340
|
const b = t[n];
|
|
10335
10341
|
try {
|
|
10336
10342
|
const x = await f(b), j = typeof x == "string" ? x : x.status || "SUCCESS", T = (x == null ? void 0 : x.message) || "", P = (x == null ? void 0 : x.name) || b.name || "Task Item", L = (x == null ? void 0 : x.detail) || b.detail || "";
|
|
10337
|
-
|
|
10343
|
+
u((k) => {
|
|
10338
10344
|
const M = j.toLowerCase() === "success" ? "success" : j.toLowerCase() === "failed" ? "failed" : j.toLowerCase() === "skipped" ? "skipped" : "noLedger";
|
|
10339
10345
|
return {
|
|
10340
10346
|
...k,
|
|
@@ -10348,7 +10354,7 @@ const Nm = ({
|
|
|
10348
10354
|
};
|
|
10349
10355
|
});
|
|
10350
10356
|
} catch (x) {
|
|
10351
|
-
console.error("Task Execution Failed:", x),
|
|
10357
|
+
console.error("Task Execution Failed:", x), u((j) => ({
|
|
10352
10358
|
...j,
|
|
10353
10359
|
failed: j.failed + 1,
|
|
10354
10360
|
items: [{
|
|
@@ -10370,7 +10376,7 @@ const Nm = ({
|
|
|
10370
10376
|
queue: t,
|
|
10371
10377
|
currentIndex: n,
|
|
10372
10378
|
status: o,
|
|
10373
|
-
results:
|
|
10379
|
+
results: d,
|
|
10374
10380
|
batchName: a,
|
|
10375
10381
|
progress: w,
|
|
10376
10382
|
addToQueue: g,
|
|
@@ -10381,7 +10387,7 @@ const Nm = ({
|
|
|
10381
10387
|
if (!e) throw new Error("useSync must be used within a SyncProvider");
|
|
10382
10388
|
return e;
|
|
10383
10389
|
}, Hm = () => {
|
|
10384
|
-
const { status: e, results: t, currentIndex: s, queue: n, progress: r, batchName: o, clearQueue: i } = jm(), [a, c] = z(!1), [
|
|
10390
|
+
const { status: e, results: t, currentIndex: s, queue: n, progress: r, batchName: o, clearQueue: i } = jm(), [a, c] = z(!1), [d, u] = z(!1);
|
|
10385
10391
|
if (e === "IDLE") return null;
|
|
10386
10392
|
const f = n[s] || {};
|
|
10387
10393
|
return /* @__PURE__ */ l.jsx(fe, { children: /* @__PURE__ */ l.jsx(
|
|
@@ -10393,7 +10399,7 @@ const Nm = ({
|
|
|
10393
10399
|
className: V(
|
|
10394
10400
|
"fixed bottom-6 right-6 z-50 glass-card border border-border/50 shadow-2xl transition-all duration-300 overflow-hidden",
|
|
10395
10401
|
a ? "w-12 h-12 rounded-full p-0 flex items-center justify-center cursor-pointer" : "w-80 rounded-2xl p-4",
|
|
10396
|
-
|
|
10402
|
+
d && !a && "w-[400px] max-h-[500px]"
|
|
10397
10403
|
),
|
|
10398
10404
|
onClick: () => a && c(!1),
|
|
10399
10405
|
children: a ? /* @__PURE__ */ l.jsxs("div", { className: "relative", children: [
|
|
@@ -10410,11 +10416,11 @@ const Nm = ({
|
|
|
10410
10416
|
"button",
|
|
10411
10417
|
{
|
|
10412
10418
|
onClick: (h) => {
|
|
10413
|
-
h.stopPropagation(),
|
|
10419
|
+
h.stopPropagation(), u(!d);
|
|
10414
10420
|
},
|
|
10415
|
-
className: V("p-1 hover:bg-secondary rounded-md text-muted-foreground transition-colors cursor-pointer",
|
|
10421
|
+
className: V("p-1 hover:bg-secondary rounded-md text-muted-foreground transition-colors cursor-pointer", d && "bg-primary/10 text-primary"),
|
|
10416
10422
|
title: "View Logs",
|
|
10417
|
-
children: /* @__PURE__ */ l.jsx(nn, { className: V("transition-transform",
|
|
10423
|
+
children: /* @__PURE__ */ l.jsx(nn, { className: V("transition-transform", d && "rotate-90"), size: 16 })
|
|
10418
10424
|
}
|
|
10419
10425
|
),
|
|
10420
10426
|
/* @__PURE__ */ l.jsx(
|
|
@@ -10439,7 +10445,7 @@ const Nm = ({
|
|
|
10439
10445
|
)
|
|
10440
10446
|
] })
|
|
10441
10447
|
] }),
|
|
10442
|
-
!
|
|
10448
|
+
!d && e === "SYNCING" && /* @__PURE__ */ l.jsxs("div", { className: "space-y-1.5", children: [
|
|
10443
10449
|
/* @__PURE__ */ l.jsxs("div", { className: "flex justify-between items-end", children: [
|
|
10444
10450
|
/* @__PURE__ */ l.jsx("p", { className: "text-[10px] text-muted-foreground uppercase font-bold tracking-widest truncate max-w-[180px]", children: f.name || "Running Task..." }),
|
|
10445
10451
|
/* @__PURE__ */ l.jsxs("span", { className: "text-[9px] font-mono font-bold text-primary", children: [
|
|
@@ -10457,7 +10463,7 @@ const Nm = ({
|
|
|
10457
10463
|
}
|
|
10458
10464
|
) })
|
|
10459
10465
|
] }),
|
|
10460
|
-
|
|
10466
|
+
d ? /* @__PURE__ */ l.jsx("div", { className: "space-y-3 max-h-[350px] overflow-y-auto pr-2 custom-scrollbar py-2", children: t.items.length === 0 ? /* @__PURE__ */ l.jsx("p", { className: "text-center text-xs text-muted-foreground py-8", children: "Queueing..." }) : t.items.map((h, m) => /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col gap-1 p-2.5 rounded-xl bg-secondary/30 border border-border/40 text-left", children: [
|
|
10461
10467
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
10462
10468
|
/* @__PURE__ */ l.jsx("span", { className: "font-bold text-[11px] truncate max-w-[200px]", children: h.name }),
|
|
10463
10469
|
/* @__PURE__ */ l.jsx(
|
|
@@ -10487,7 +10493,7 @@ const Nm = ({
|
|
|
10487
10493
|
/* @__PURE__ */ l.jsx("span", { className: "text-sm font-mono font-bold text-muted-foreground", children: t.skipped + t.noLedger })
|
|
10488
10494
|
] })
|
|
10489
10495
|
] }),
|
|
10490
|
-
!
|
|
10496
|
+
!d && e === "COMPLETED" && /* @__PURE__ */ l.jsxs("div", { className: "bg-emerald-500/10 border border-emerald-500/20 p-2 rounded-xl flex items-center gap-2 justify-center", children: [
|
|
10491
10497
|
/* @__PURE__ */ l.jsx(il, { className: "text-emerald-500", size: 16 }),
|
|
10492
10498
|
/* @__PURE__ */ l.jsx("p", { className: "text-[10px] font-bold text-emerald-600 uppercase tracking-tighter", children: "Batch operations completed" })
|
|
10493
10499
|
] })
|
|
@@ -10536,7 +10542,7 @@ const Nm = ({
|
|
|
10536
10542
|
maxTags: r = 10,
|
|
10537
10543
|
className: o
|
|
10538
10544
|
}) => {
|
|
10539
|
-
const [i, a] = z(""), [c,
|
|
10545
|
+
const [i, a] = z(""), [c, d] = z(!1), u = re(null), f = re(null), h = (p) => {
|
|
10540
10546
|
if (p.key === "Enter" || p.key === ",") {
|
|
10541
10547
|
p.preventDefault();
|
|
10542
10548
|
const y = i.trim().replace(/,/g, "");
|
|
@@ -10560,7 +10566,7 @@ const Nm = ({
|
|
|
10560
10566
|
/* @__PURE__ */ l.jsxs(
|
|
10561
10567
|
"div",
|
|
10562
10568
|
{
|
|
10563
|
-
ref:
|
|
10569
|
+
ref: u,
|
|
10564
10570
|
onClick: g,
|
|
10565
10571
|
className: V(
|
|
10566
10572
|
"flex flex-wrap items-center gap-1.5 min-h-[42px] px-3 py-1.5 rounded-xl border transition-all duration-200 cursor-text select-none",
|
|
@@ -10600,8 +10606,8 @@ const Nm = ({
|
|
|
10600
10606
|
value: i,
|
|
10601
10607
|
onChange: (p) => a(p.target.value),
|
|
10602
10608
|
onKeyDown: h,
|
|
10603
|
-
onFocus: () =>
|
|
10604
|
-
onBlur: () =>
|
|
10609
|
+
onFocus: () => d(!0),
|
|
10610
|
+
onBlur: () => d(!1),
|
|
10605
10611
|
placeholder: e.length === 0 ? n : "",
|
|
10606
10612
|
disabled: e.length >= r,
|
|
10607
10613
|
className: "flex-1 bg-transparent border-0 outline-none p-0 text-sm text-foreground placeholder:text-muted-foreground/60 min-w-[80px]"
|
|
@@ -10729,11 +10735,11 @@ const Nm = ({
|
|
|
10729
10735
|
throw new Error("useToast must be used within a ToastProvider");
|
|
10730
10736
|
return e;
|
|
10731
10737
|
}, tp = ({ children: e }) => {
|
|
10732
|
-
const [t, s] = z([]), n = Gt(({ title: i, description: a, variant: c = "default", duration:
|
|
10733
|
-
const
|
|
10734
|
-
s((f) => [...f, { id:
|
|
10735
|
-
r(
|
|
10736
|
-
},
|
|
10738
|
+
const [t, s] = z([]), n = Gt(({ title: i, description: a, variant: c = "default", duration: d = 5e3 }) => {
|
|
10739
|
+
const u = Math.random().toString(36).substr(2, 9);
|
|
10740
|
+
s((f) => [...f, { id: u, title: i, description: a, variant: c, duration: d }]), d !== 1 / 0 && setTimeout(() => {
|
|
10741
|
+
r(u);
|
|
10742
|
+
}, d);
|
|
10737
10743
|
}, []), r = Gt((i) => {
|
|
10738
10744
|
s((a) => a.filter((c) => c.id !== i));
|
|
10739
10745
|
}, []), o = {
|