@argusoft/medplat-core 1.0.23 → 1.0.25
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/{AddFeatures-CTVs_Gr9.js → AddFeatures-CqE3v0BN.js} +2 -2
- package/dist/{AddFeatures-CTVs_Gr9.js.map → AddFeatures-CqE3v0BN.js.map} +1 -1
- package/dist/AddMenuConfiguration-BSQLl88V.js +6570 -0
- package/dist/AddMenuConfiguration-BSQLl88V.js.map +1 -0
- package/dist/AddMenuConfiguration.css +1 -1
- package/dist/{ChangePasswordModalCore-DONyFFlx.js → ChangePasswordModalCore-DTYWRTa-.js} +955 -952
- package/dist/ChangePasswordModalCore-DTYWRTa-.js.map +1 -0
- package/dist/{ConditionConfig-C3rF2wXU.js → ConditionConfig-DSsgGEXS.js} +2 -2
- package/dist/{ConditionConfig-C3rF2wXU.js.map → ConditionConfig-DSsgGEXS.js.map} +1 -1
- package/dist/FhirRawResourceList-ZZFd7gTX.js +550 -0
- package/dist/FhirRawResourceList-ZZFd7gTX.js.map +1 -0
- package/dist/FhirServerList-Dkq7Kbes.js +116 -0
- package/dist/FhirServerList-Dkq7Kbes.js.map +1 -0
- package/dist/FhirServerProfile-CUOwC6Wb.js +253 -0
- package/dist/FhirServerProfile-CUOwC6Wb.js.map +1 -0
- package/dist/FhirServerWizard-Db6Hm4bQ.js +161 -0
- package/dist/FhirServerWizard-Db6Hm4bQ.js.map +1 -0
- package/dist/{ImmunizationConfigurationBase-CTBoSuSz.js → ImmunizationConfigurationBase-BevKZx_l.js} +386 -302
- package/dist/ImmunizationConfigurationBase-BevKZx_l.js.map +1 -0
- package/dist/{ManageEventConfiguration-BntUc_YI.js → ManageEventConfiguration-DV3I5POA.js} +4 -4
- package/dist/{ManageEventConfiguration-BntUc_YI.js.map → ManageEventConfiguration-DV3I5POA.js.map} +1 -1
- package/dist/{ManageRole-CZAk-IlM.js → ManageRole-B9bs_T00.js} +116 -116
- package/dist/ManageRole-B9bs_T00.js.map +1 -0
- package/dist/{ManageUser-Gv38VHMu.js → ManageUser-AB3_Vfp_.js} +85 -84
- package/dist/{ManageUser-Gv38VHMu.js.map → ManageUser-AB3_Vfp_.js.map} +1 -1
- package/dist/{MobileMenuManagement-CV6QCeos.js → MobileMenuManagement-CVAKyKDa.js} +33 -32
- package/dist/MobileMenuManagement-CVAKyKDa.js.map +1 -0
- package/dist/{MobileTypeEventConfigModal-BNjZ8pnq.js → MobileTypeEventConfigModal-BxLympIO.js} +2 -2
- package/dist/{MobileTypeEventConfigModal-BNjZ8pnq.js.map → MobileTypeEventConfigModal-BxLympIO.js.map} +1 -1
- package/dist/{OtherTypeEventConfigModal-DiVhWDpG.js → OtherTypeEventConfigModal-BeG1GrUi.js} +94 -93
- package/dist/OtherTypeEventConfigModal-BeG1GrUi.js.map +1 -0
- package/dist/{RoleManagement-B9WgZGEj.js → RoleManagement-BIiW9uTq.js} +2 -2
- package/dist/{RoleManagement-B9WgZGEj.js.map → RoleManagement-BIiW9uTq.js.map} +1 -1
- package/dist/ServerFormFields-SLghoZ2z.js +136 -0
- package/dist/ServerFormFields-SLghoZ2z.js.map +1 -0
- package/dist/SyncDialog-BRGpHOE4.js +130 -0
- package/dist/SyncDialog-BRGpHOE4.js.map +1 -0
- package/dist/{TypeConfiguration-CupQxH9Y.js → TypeConfiguration-37wp-gsl.js} +2 -2
- package/dist/{TypeConfiguration-CupQxH9Y.js.map → TypeConfiguration-37wp-gsl.js.map} +1 -1
- package/dist/{UserList-BzHsbYel.js → UserList-2gGuDgNa.js} +38 -37
- package/dist/{UserList-BzHsbYel.js.map → UserList-2gGuDgNa.js.map} +1 -1
- package/dist/{UserListSkeleton-DhIJ5X3y.js → UserListSkeleton-BMKANCtW.js} +57 -93
- package/dist/UserListSkeleton-BMKANCtW.js.map +1 -0
- package/dist/Users-CsJ08Kjm.js +40 -0
- package/dist/Users-CsJ08Kjm.js.map +1 -0
- package/dist/dashboardLayoutUtils-Bt5HA96J.js +265 -0
- package/dist/dashboardLayoutUtils-Bt5HA96J.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +190 -134
- package/dist/index.js.map +1 -1
- package/dist/permissions-DEWACxJN.js +308 -0
- package/dist/permissions-DEWACxJN.js.map +1 -0
- package/package.json +1 -1
- package/dist/AddMenuConfiguration-DsnY0Rws.js +0 -2237
- package/dist/AddMenuConfiguration-DsnY0Rws.js.map +0 -1
- package/dist/ChangePasswordModalCore-DONyFFlx.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-CTBoSuSz.js.map +0 -1
- package/dist/ManageRole-CZAk-IlM.js.map +0 -1
- package/dist/MobileMenuManagement-CV6QCeos.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-DiVhWDpG.js.map +0 -1
- package/dist/UserListSkeleton-DhIJ5X3y.js.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as E, Fragment as ir, jsxs as et } from "react/jsx-runtime";
|
|
2
2
|
import { yupResolver as or } from "@hookform/resolvers/yup";
|
|
3
3
|
import qt from "prop-types";
|
|
4
|
-
import { Modal as rr, Typography as Zt, Button as
|
|
4
|
+
import { Modal as rr, Typography as Zt, Button as Xn, CircularProgress as ar } from "@mui/material";
|
|
5
5
|
import lr from "@mui/icons-material/LockResetRounded";
|
|
6
|
-
import
|
|
6
|
+
import qn from "@mui/icons-material/CheckRounded";
|
|
7
7
|
import * as Jt from "yup";
|
|
8
8
|
import * as Pe from "react";
|
|
9
|
-
import { createContext as Dt, useRef as
|
|
9
|
+
import { createContext as Dt, useRef as $, useLayoutEffect as cr, useEffect as Wt, useId as yn, useContext as W, useInsertionEffect as vn, useMemo as at, useCallback as yi, Children as ur, isValidElement as hr, useState as Ot, Fragment as vi, createElement as fr, forwardRef as dr, Component as pr } from "react";
|
|
10
10
|
import { useForm as mr } from "react-hook-form";
|
|
11
11
|
import gr from "@/hooks/useAESEncryption.js";
|
|
12
|
-
import {
|
|
12
|
+
import { l as yr } from "./Users-CsJ08Kjm.js";
|
|
13
13
|
import { showToast as vr } from "@/common/toaster/toaster.jsx";
|
|
14
14
|
import xr from "@/common/services/util/GeneralUtil";
|
|
15
15
|
import wr from "@/hooks/useTrackEvent";
|
|
16
16
|
import { useTranslateProvider as Tr } from "@/common/languageTranslator/TranslationContext";
|
|
17
|
-
import { P as
|
|
17
|
+
import { P as Zn } from "./ManageUser-AB3_Vfp_.js";
|
|
18
18
|
import { PasswordStrength as Pr } from "@/views/feature-components/users/PasswordStrength";
|
|
19
19
|
const xn = Dt({});
|
|
20
20
|
function wn(t) {
|
|
21
|
-
const e =
|
|
21
|
+
const e = $(null);
|
|
22
22
|
return e.current === null && (e.current = t()), e.current;
|
|
23
23
|
}
|
|
24
|
-
const br = typeof window < "u",
|
|
25
|
-
function
|
|
24
|
+
const br = typeof window < "u", Tn = br ? cr : Wt, be = /* @__PURE__ */ Dt(null);
|
|
25
|
+
function Pn(t, e) {
|
|
26
26
|
t.indexOf(e) === -1 && t.push(e);
|
|
27
27
|
}
|
|
28
28
|
function fe(t, e) {
|
|
@@ -30,22 +30,22 @@ function fe(t, e) {
|
|
|
30
30
|
n > -1 && t.splice(n, 1);
|
|
31
31
|
}
|
|
32
32
|
const ot = (t, e, n) => n > e ? e : n < t ? t : n;
|
|
33
|
-
function
|
|
33
|
+
function Ke(t, e) {
|
|
34
34
|
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
35
35
|
}
|
|
36
36
|
let Et = () => {
|
|
37
37
|
}, lt = () => {
|
|
38
38
|
};
|
|
39
|
-
var
|
|
40
|
-
typeof process < "u" && ((
|
|
41
|
-
!t && typeof console < "u" && console.warn(
|
|
39
|
+
var gi;
|
|
40
|
+
typeof process < "u" && ((gi = process.env) == null ? void 0 : gi.NODE_ENV) !== "production" && (Et = (t, e, n) => {
|
|
41
|
+
!t && typeof console < "u" && console.warn(Ke(e, n));
|
|
42
42
|
}, lt = (t, e, n) => {
|
|
43
43
|
if (!t)
|
|
44
|
-
throw new Error(
|
|
44
|
+
throw new Error(Ke(e, n));
|
|
45
45
|
});
|
|
46
|
-
const ht = {},
|
|
46
|
+
const ht = {}, xi = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), wi = (t) => typeof t == "object" && t !== null, Ti = (t) => /^0[^.\s]+$/u.test(t);
|
|
47
47
|
// @__NO_SIDE_EFFECTS__
|
|
48
|
-
function
|
|
48
|
+
function Pi(t) {
|
|
49
49
|
let e;
|
|
50
50
|
return () => (e === void 0 && (e = t()), e);
|
|
51
51
|
}
|
|
@@ -53,12 +53,12 @@ const q = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Ht = (...t) => t.reduce((e, n) =>
|
|
|
53
53
|
const s = e - t;
|
|
54
54
|
return s ? (n - t) / s : 1;
|
|
55
55
|
};
|
|
56
|
-
class
|
|
56
|
+
class bn {
|
|
57
57
|
constructor() {
|
|
58
58
|
this.subscriptions = [];
|
|
59
59
|
}
|
|
60
60
|
add(e) {
|
|
61
|
-
return
|
|
61
|
+
return Pn(this.subscriptions, e), () => fe(this.subscriptions, e);
|
|
62
62
|
}
|
|
63
63
|
notify(e, n, s) {
|
|
64
64
|
const i = this.subscriptions.length;
|
|
@@ -78,15 +78,15 @@ class Pn {
|
|
|
78
78
|
this.subscriptions.length = 0;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const H = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, X = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3,
|
|
82
|
-
function
|
|
83
|
-
t ||
|
|
81
|
+
const H = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, X = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3, bi = /* @__NO_SIDE_EFFECTS__ */ (t, e) => e ? t * (1e3 / e) : 0, Jn = /* @__PURE__ */ new Set();
|
|
82
|
+
function Sn(t, e, n) {
|
|
83
|
+
t || Jn.has(e) || (console.warn(Ke(e, n)), Jn.add(e));
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const Si = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Sr = 1e-7, Ar = 12;
|
|
86
86
|
function Vr(t, e, n, s, i) {
|
|
87
87
|
let r, o, a = 0;
|
|
88
88
|
do
|
|
89
|
-
o = e + (n - e) / 2, r =
|
|
89
|
+
o = e + (n - e) / 2, r = Si(o, s, i) - t, r > 0 ? n = o : e = o;
|
|
90
90
|
while (Math.abs(r) > Sr && ++a < Ar);
|
|
91
91
|
return o;
|
|
92
92
|
}
|
|
@@ -95,27 +95,27 @@ function _t(t, e, n, s) {
|
|
|
95
95
|
if (t === e && n === s)
|
|
96
96
|
return q;
|
|
97
97
|
const i = (r) => Vr(r, 0, 1, t, n);
|
|
98
|
-
return (r) => r === 0 || r === 1 ? r :
|
|
98
|
+
return (r) => r === 0 || r === 1 ? r : Si(i(r), e, s);
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const Ai = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Vi = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => 1 - t(1 - e), Ci = /* @__PURE__ */ _t(0.33, 1.53, 0.69, 0.99), An = /* @__PURE__ */ Vi(Ci), Mi = /* @__PURE__ */ Ai(An), Di = (t) => t >= 1 ? 1 : (t *= 2) < 1 ? 0.5 * An(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Vn = (t) => 1 - Math.sin(Math.acos(t)), Ei = /* @__PURE__ */ Vi(Vn), Ri = /* @__PURE__ */ Ai(Vn), Cr = /* @__PURE__ */ _t(0.42, 0, 1, 1), Mr = /* @__PURE__ */ _t(0, 0, 0.58, 1), ki = /* @__PURE__ */ _t(0.42, 0, 0.58, 1), Dr = /* @__NO_SIDE_EFFECTS__ */ (t) => Array.isArray(t) && typeof t[0] != "number", Li = /* @__NO_SIDE_EFFECTS__ */ (t) => Array.isArray(t) && typeof t[0] == "number", Qn = {
|
|
101
101
|
linear: q,
|
|
102
102
|
easeIn: Cr,
|
|
103
|
-
easeInOut:
|
|
103
|
+
easeInOut: ki,
|
|
104
104
|
easeOut: Mr,
|
|
105
|
-
circIn:
|
|
106
|
-
circInOut:
|
|
107
|
-
circOut:
|
|
108
|
-
backIn:
|
|
109
|
-
backInOut:
|
|
110
|
-
backOut:
|
|
111
|
-
anticipate:
|
|
112
|
-
}, Er = (t) => typeof t == "string",
|
|
105
|
+
circIn: Vn,
|
|
106
|
+
circInOut: Ri,
|
|
107
|
+
circOut: Ei,
|
|
108
|
+
backIn: An,
|
|
109
|
+
backInOut: Mi,
|
|
110
|
+
backOut: Ci,
|
|
111
|
+
anticipate: Di
|
|
112
|
+
}, Er = (t) => typeof t == "string", ts = (t) => {
|
|
113
113
|
if (/* @__PURE__ */ Li(t)) {
|
|
114
114
|
lt(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
115
115
|
const [e, n, s, i] = t;
|
|
116
116
|
return /* @__PURE__ */ _t(e, n, s, i);
|
|
117
117
|
} else if (Er(t))
|
|
118
|
-
return lt(
|
|
118
|
+
return lt(Qn[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Qn[t];
|
|
119
119
|
return t;
|
|
120
120
|
}, Qt = [
|
|
121
121
|
"setup",
|
|
@@ -135,99 +135,99 @@ const Si = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2
|
|
|
135
135
|
"postRender"
|
|
136
136
|
// Compute
|
|
137
137
|
];
|
|
138
|
-
function Rr(t
|
|
139
|
-
let
|
|
140
|
-
const
|
|
141
|
-
let
|
|
138
|
+
function Rr(t) {
|
|
139
|
+
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = !1, i = !1;
|
|
140
|
+
const r = /* @__PURE__ */ new WeakSet();
|
|
141
|
+
let o = {
|
|
142
142
|
delta: 0,
|
|
143
143
|
timestamp: 0,
|
|
144
144
|
isProcessing: !1
|
|
145
145
|
};
|
|
146
|
-
function
|
|
147
|
-
|
|
146
|
+
function a(u) {
|
|
147
|
+
r.has(u) && (l.schedule(u), t()), u(o);
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const l = {
|
|
150
150
|
/**
|
|
151
151
|
* Schedule a process to run on the next frame.
|
|
152
152
|
*/
|
|
153
|
-
schedule: (
|
|
154
|
-
const
|
|
155
|
-
return
|
|
153
|
+
schedule: (u, c = !1, h = !1) => {
|
|
154
|
+
const d = h && s ? e : n;
|
|
155
|
+
return c && r.add(u), d.add(u), u;
|
|
156
156
|
},
|
|
157
157
|
/**
|
|
158
158
|
* Cancel the provided callback from running on the next frame.
|
|
159
159
|
*/
|
|
160
|
-
cancel: (
|
|
161
|
-
|
|
160
|
+
cancel: (u) => {
|
|
161
|
+
n.delete(u), r.delete(u);
|
|
162
162
|
},
|
|
163
163
|
/**
|
|
164
164
|
* Execute all schedule callbacks.
|
|
165
165
|
*/
|
|
166
|
-
process: (
|
|
167
|
-
if (
|
|
168
|
-
|
|
166
|
+
process: (u) => {
|
|
167
|
+
if (o = u, s) {
|
|
168
|
+
i = !0;
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
|
|
171
|
+
s = !0;
|
|
172
|
+
const c = e;
|
|
173
|
+
e = n, n = c, e.forEach(a), e.clear(), s = !1, i && (i = !1, l.process(u));
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
|
-
return
|
|
176
|
+
return l;
|
|
177
177
|
}
|
|
178
|
-
const
|
|
179
|
-
function
|
|
178
|
+
const kr = 40;
|
|
179
|
+
function Ii(t, e) {
|
|
180
180
|
let n = !1, s = !0;
|
|
181
181
|
const i = {
|
|
182
182
|
delta: 0,
|
|
183
183
|
timestamp: 0,
|
|
184
184
|
isProcessing: !1
|
|
185
|
-
}, r = () => n = !0, o = Qt.reduce((v,
|
|
186
|
-
const v = ht.useManualTiming,
|
|
187
|
-
n = !1, v || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(
|
|
185
|
+
}, r = () => n = !0, o = Qt.reduce((v, x) => (v[x] = Rr(r), v), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: f, render: d, postRender: p } = o, g = () => {
|
|
186
|
+
const v = ht.useManualTiming, x = v ? i.timestamp : performance.now();
|
|
187
|
+
n = !1, v || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(x - i.timestamp, kr), 1)), i.timestamp = x, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), h.process(i), f.process(i), d.process(i), p.process(i), i.isProcessing = !1, n && e && (s = !1, t(g));
|
|
188
188
|
}, m = () => {
|
|
189
189
|
n = !0, s = !0, i.isProcessing || t(g);
|
|
190
190
|
};
|
|
191
|
-
return { schedule: Qt.reduce((v,
|
|
192
|
-
const b = o[
|
|
193
|
-
return v[
|
|
191
|
+
return { schedule: Qt.reduce((v, x) => {
|
|
192
|
+
const b = o[x];
|
|
193
|
+
return v[x] = (C, A = !1, P = !1) => (n || m(), b.schedule(C, A, P)), v;
|
|
194
194
|
}, {}), cancel: (v) => {
|
|
195
|
-
for (let
|
|
196
|
-
o[Qt[
|
|
195
|
+
for (let x = 0; x < Qt.length; x++)
|
|
196
|
+
o[Qt[x]].cancel(v);
|
|
197
197
|
}, state: i, steps: o };
|
|
198
198
|
}
|
|
199
|
-
const { schedule:
|
|
199
|
+
const { schedule: k, cancel: ft, state: N, steps: Me } = /* @__PURE__ */ Ii(typeof requestAnimationFrame < "u" ? requestAnimationFrame : q, !0);
|
|
200
200
|
let ie;
|
|
201
|
-
function
|
|
201
|
+
function Lr() {
|
|
202
202
|
ie = void 0;
|
|
203
203
|
}
|
|
204
|
-
const
|
|
205
|
-
now: () => (ie === void 0 &&
|
|
204
|
+
const z = {
|
|
205
|
+
now: () => (ie === void 0 && z.set(N.isProcessing || ht.useManualTiming ? N.timestamp : performance.now()), ie),
|
|
206
206
|
set: (t) => {
|
|
207
|
-
ie = t, queueMicrotask(
|
|
207
|
+
ie = t, queueMicrotask(Lr);
|
|
208
208
|
}
|
|
209
|
-
},
|
|
210
|
-
function
|
|
209
|
+
}, Bi = (t) => (e) => typeof e == "string" && e.startsWith(t), Fi = /* @__PURE__ */ Bi("--"), Ir = /* @__PURE__ */ Bi("var(--"), Cn = (t) => Ir(t) ? Br.test(t.split("/*")[0].trim()) : !1, Br = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
210
|
+
function es(t) {
|
|
211
211
|
return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
|
|
212
212
|
}
|
|
213
213
|
const Rt = {
|
|
214
214
|
test: (t) => typeof t == "number",
|
|
215
215
|
parse: parseFloat,
|
|
216
216
|
transform: (t) => t
|
|
217
|
-
},
|
|
217
|
+
}, zt = {
|
|
218
218
|
...Rt,
|
|
219
219
|
transform: (t) => ot(0, 1, t)
|
|
220
220
|
}, te = {
|
|
221
221
|
...Rt,
|
|
222
222
|
default: 1
|
|
223
|
-
}, jt = (t) => Math.round(t * 1e5) / 1e5,
|
|
223
|
+
}, jt = (t) => Math.round(t * 1e5) / 1e5, Mn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
224
224
|
function Fr(t) {
|
|
225
225
|
return t == null;
|
|
226
226
|
}
|
|
227
|
-
const Or = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,
|
|
227
|
+
const Or = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Dn = (t, e) => (n) => !!(typeof n == "string" && Or.test(n) && n.startsWith(t) || e && !Fr(n) && Object.prototype.hasOwnProperty.call(n, e)), Oi = (t, e, n) => (s) => {
|
|
228
228
|
if (typeof s != "string")
|
|
229
229
|
return s;
|
|
230
|
-
const [i, r, o, a] = s.match(
|
|
230
|
+
const [i, r, o, a] = s.match(Mn);
|
|
231
231
|
return {
|
|
232
232
|
[t]: parseFloat(i),
|
|
233
233
|
[e]: parseFloat(r),
|
|
@@ -238,9 +238,9 @@ const Or = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
238
238
|
...Rt,
|
|
239
239
|
transform: (t) => Math.round(jr(t))
|
|
240
240
|
}, yt = {
|
|
241
|
-
test: /* @__PURE__ */
|
|
242
|
-
parse: /* @__PURE__ */
|
|
243
|
-
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + De.transform(t) + ", " + De.transform(e) + ", " + De.transform(n) + ", " + jt(
|
|
241
|
+
test: /* @__PURE__ */ Dn("rgb", "red"),
|
|
242
|
+
parse: /* @__PURE__ */ Oi("red", "green", "blue"),
|
|
243
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + De.transform(t) + ", " + De.transform(e) + ", " + De.transform(n) + ", " + jt(zt.transform(s)) + ")"
|
|
244
244
|
};
|
|
245
245
|
function Nr(t) {
|
|
246
246
|
let e = "", n = "", s = "", i = "";
|
|
@@ -252,21 +252,21 @@ function Nr(t) {
|
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
const Ge = {
|
|
255
|
-
test: /* @__PURE__ */
|
|
255
|
+
test: /* @__PURE__ */ Dn("#"),
|
|
256
256
|
parse: Nr,
|
|
257
257
|
transform: yt.transform
|
|
258
258
|
}, Yt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
259
259
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
260
260
|
parse: parseFloat,
|
|
261
261
|
transform: (e) => `${e}${t}`
|
|
262
|
-
}), rt = /* @__PURE__ */ Yt("deg"), it = /* @__PURE__ */ Yt("%"), T = /* @__PURE__ */ Yt("px"), Ur = /* @__PURE__ */ Yt("vh"), Wr = /* @__PURE__ */ Yt("vw"),
|
|
262
|
+
}), rt = /* @__PURE__ */ Yt("deg"), it = /* @__PURE__ */ Yt("%"), T = /* @__PURE__ */ Yt("px"), Ur = /* @__PURE__ */ Yt("vh"), Wr = /* @__PURE__ */ Yt("vw"), ns = {
|
|
263
263
|
...it,
|
|
264
264
|
parse: (t) => it.parse(t) / 100,
|
|
265
265
|
transform: (t) => it.transform(t * 100)
|
|
266
266
|
}, bt = {
|
|
267
|
-
test: /* @__PURE__ */
|
|
268
|
-
parse: /* @__PURE__ */
|
|
269
|
-
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + it.transform(jt(e)) + ", " + it.transform(jt(n)) + ", " + jt(
|
|
267
|
+
test: /* @__PURE__ */ Dn("hsl", "hue"),
|
|
268
|
+
parse: /* @__PURE__ */ Oi("hue", "saturation", "lightness"),
|
|
269
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + it.transform(jt(e)) + ", " + it.transform(jt(n)) + ", " + jt(zt.transform(s)) + ")"
|
|
270
270
|
}, B = {
|
|
271
271
|
test: (t) => yt.test(t) || Ge.test(t) || bt.test(t),
|
|
272
272
|
parse: (t) => yt.test(t) ? yt.parse(t) : bt.test(t) ? bt.parse(t) : Ge.parse(t),
|
|
@@ -276,11 +276,11 @@ const Ge = {
|
|
|
276
276
|
return e.alpha = 0, B.transform(e);
|
|
277
277
|
}
|
|
278
278
|
}, $r = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
279
|
-
function
|
|
279
|
+
function zr(t) {
|
|
280
280
|
var e, n;
|
|
281
|
-
return isNaN(t) && typeof t == "string" && (((e = t.match(
|
|
281
|
+
return isNaN(t) && typeof t == "string" && (((e = t.match(Mn)) == null ? void 0 : e.length) || 0) + (((n = t.match($r)) == null ? void 0 : n.length) || 0) > 0;
|
|
282
282
|
}
|
|
283
|
-
const
|
|
283
|
+
const ji = "number", Ni = "color", Kr = "var", Gr = "var(", ss = "${}", Hr = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
284
284
|
function Ct(t) {
|
|
285
285
|
const e = t.toString(), n = [], s = {
|
|
286
286
|
color: [],
|
|
@@ -288,34 +288,34 @@ function Ct(t) {
|
|
|
288
288
|
var: []
|
|
289
289
|
}, i = [];
|
|
290
290
|
let r = 0;
|
|
291
|
-
const a = e.replace(Hr, (
|
|
291
|
+
const a = e.replace(Hr, (l) => (B.test(l) ? (s.color.push(r), i.push(Ni), n.push(B.parse(l))) : l.startsWith(Gr) ? (s.var.push(r), i.push(Kr), n.push(l)) : (s.number.push(r), i.push(ji), n.push(parseFloat(l))), ++r, ss)).split(ss);
|
|
292
292
|
return { values: n, split: a, indexes: s, types: i };
|
|
293
293
|
}
|
|
294
294
|
function _r(t) {
|
|
295
295
|
return Ct(t).values;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Ui({ split: t, types: e }) {
|
|
298
298
|
const n = t.length;
|
|
299
299
|
return (s) => {
|
|
300
300
|
let i = "";
|
|
301
301
|
for (let r = 0; r < n; r++)
|
|
302
302
|
if (i += t[r], s[r] !== void 0) {
|
|
303
303
|
const o = e[r];
|
|
304
|
-
o ===
|
|
304
|
+
o === ji ? i += jt(s[r]) : o === Ni ? i += B.transform(s[r]) : i += s[r];
|
|
305
305
|
}
|
|
306
306
|
return i;
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
function Yr(t) {
|
|
310
|
-
return
|
|
310
|
+
return Ui(Ct(t));
|
|
311
311
|
}
|
|
312
312
|
const Xr = (t) => typeof t == "number" ? 0 : B.test(t) ? B.getAnimatableNone(t) : t, qr = (t, e) => typeof t == "number" ? e != null && e.trim().endsWith("/") ? t : 0 : Xr(t);
|
|
313
313
|
function Zr(t) {
|
|
314
314
|
const e = Ct(t);
|
|
315
|
-
return
|
|
315
|
+
return Ui(e)(e.values.map((s, i) => qr(s, e.split[i])));
|
|
316
316
|
}
|
|
317
317
|
const tt = {
|
|
318
|
-
test:
|
|
318
|
+
test: zr,
|
|
319
319
|
parse: _r,
|
|
320
320
|
createTransformer: Yr,
|
|
321
321
|
getAnimatableNone: Zr
|
|
@@ -329,8 +329,8 @@ function Jr({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
329
329
|
if (!e)
|
|
330
330
|
i = r = o = n;
|
|
331
331
|
else {
|
|
332
|
-
const a = n < 0.5 ? n * (1 + e) : n + e - n * e,
|
|
333
|
-
i = Ee(
|
|
332
|
+
const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
|
|
333
|
+
i = Ee(l, a, t + 1 / 3), r = Ee(l, a, t), o = Ee(l, a, t - 1 / 3);
|
|
334
334
|
}
|
|
335
335
|
return {
|
|
336
336
|
red: Math.round(i * 255),
|
|
@@ -346,15 +346,15 @@ const R = (t, e, n) => t + (e - t) * n, Re = (t, e, n) => {
|
|
|
346
346
|
const s = t * t, i = n * (e * e - s) + s;
|
|
347
347
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
348
348
|
}, Qr = [Ge, yt, bt], ta = (t) => Qr.find((e) => e.test(t));
|
|
349
|
-
function
|
|
349
|
+
function is(t) {
|
|
350
350
|
const e = ta(t);
|
|
351
351
|
if (Et(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
|
|
352
352
|
return !1;
|
|
353
353
|
let n = e.parse(t);
|
|
354
354
|
return e === bt && (n = Jr(n)), n;
|
|
355
355
|
}
|
|
356
|
-
const
|
|
357
|
-
const n =
|
|
356
|
+
const os = (t, e) => {
|
|
357
|
+
const n = is(t), s = is(e);
|
|
358
358
|
if (!n || !s)
|
|
359
359
|
return de(t, e);
|
|
360
360
|
const i = { ...n };
|
|
@@ -366,11 +366,11 @@ function ea(t, e) {
|
|
|
366
366
|
function na(t, e) {
|
|
367
367
|
return (n) => R(t, e, n);
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
return typeof t == "number" ? na : typeof t == "string" ?
|
|
369
|
+
function En(t) {
|
|
370
|
+
return typeof t == "number" ? na : typeof t == "string" ? Cn(t) ? de : B.test(t) ? os : oa : Array.isArray(t) ? Wi : typeof t == "object" ? B.test(t) ? os : sa : de;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
const n = [...t], s = n.length, i = t.map((r, o) =>
|
|
372
|
+
function Wi(t, e) {
|
|
373
|
+
const n = [...t], s = n.length, i = t.map((r, o) => En(r)(r, e[o]));
|
|
374
374
|
return (r) => {
|
|
375
375
|
for (let o = 0; o < s; o++)
|
|
376
376
|
n[o] = i[o](r);
|
|
@@ -380,7 +380,7 @@ function Ui(t, e) {
|
|
|
380
380
|
function sa(t, e) {
|
|
381
381
|
const n = { ...t, ...e }, s = {};
|
|
382
382
|
for (const i in n)
|
|
383
|
-
t[i] !== void 0 && e[i] !== void 0 && (s[i] =
|
|
383
|
+
t[i] !== void 0 && e[i] !== void 0 && (s[i] = En(t[i])(t[i], e[i]));
|
|
384
384
|
return (i) => {
|
|
385
385
|
for (const r in s)
|
|
386
386
|
n[r] = s[r](i);
|
|
@@ -397,30 +397,30 @@ function ia(t, e) {
|
|
|
397
397
|
}
|
|
398
398
|
const oa = (t, e) => {
|
|
399
399
|
const n = tt.createTransformer(e), s = Ct(t), i = Ct(e);
|
|
400
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? He.has(t) && !i.values.length || He.has(e) && !s.values.length ? ea(t, e) : Ht(
|
|
400
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? He.has(t) && !i.values.length || He.has(e) && !s.values.length ? ea(t, e) : Ht(Wi(ia(s, i), i.values), n) : (Et(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), de(t, e));
|
|
401
401
|
};
|
|
402
|
-
function
|
|
403
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? R(t, e, n) :
|
|
402
|
+
function $i(t, e, n) {
|
|
403
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? R(t, e, n) : En(t)(t, e);
|
|
404
404
|
}
|
|
405
405
|
const ra = (t) => {
|
|
406
406
|
const e = ({ timestamp: n }) => t(n);
|
|
407
407
|
return {
|
|
408
|
-
start: (n = !0) =>
|
|
408
|
+
start: (n = !0) => k.update(e, n),
|
|
409
409
|
stop: () => ft(e),
|
|
410
410
|
/**
|
|
411
411
|
* If we're processing this frame we can use the
|
|
412
412
|
* framelocked timestamp to keep things in sync.
|
|
413
413
|
*/
|
|
414
|
-
now: () => N.isProcessing ? N.timestamp :
|
|
414
|
+
now: () => N.isProcessing ? N.timestamp : z.now()
|
|
415
415
|
};
|
|
416
|
-
},
|
|
416
|
+
}, zi = (t, e, n = 10) => {
|
|
417
417
|
let s = "";
|
|
418
418
|
const i = Math.max(Math.round(e / n), 2);
|
|
419
419
|
for (let r = 0; r < i; r++)
|
|
420
420
|
s += Math.round(t(r / (i - 1)) * 1e4) / 1e4 + ", ";
|
|
421
421
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
422
422
|
}, pe = 2e4;
|
|
423
|
-
function
|
|
423
|
+
function Rn(t) {
|
|
424
424
|
let e = 0;
|
|
425
425
|
const n = 50;
|
|
426
426
|
let s = t.next(e);
|
|
@@ -429,7 +429,7 @@ function En(t) {
|
|
|
429
429
|
return e >= pe ? 1 / 0 : e;
|
|
430
430
|
}
|
|
431
431
|
function aa(t, e = 100, n) {
|
|
432
|
-
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(
|
|
432
|
+
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(Rn(s), pe);
|
|
433
433
|
return {
|
|
434
434
|
type: "keyframes",
|
|
435
435
|
ease: (r) => s.next(i * r).value / e,
|
|
@@ -475,33 +475,33 @@ function ca(t, e, n) {
|
|
|
475
475
|
s = s - t(s) / e(s);
|
|
476
476
|
return s;
|
|
477
477
|
}
|
|
478
|
-
const
|
|
478
|
+
const ke = 1e-3;
|
|
479
479
|
function ua({ duration: t = I.duration, bounce: e = I.bounce, velocity: n = I.velocity, mass: s = I.mass }) {
|
|
480
480
|
let i, r;
|
|
481
481
|
Et(t <= /* @__PURE__ */ H(I.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
482
482
|
let o = 1 - e;
|
|
483
483
|
o = ot(I.minDamping, I.maxDamping, o), t = ot(I.minDuration, I.maxDuration, /* @__PURE__ */ X(t)), o < 1 ? (i = (u) => {
|
|
484
|
-
const
|
|
485
|
-
return
|
|
484
|
+
const c = u * o, h = c * t, f = c - n, d = _e(u, o), p = Math.exp(-h);
|
|
485
|
+
return ke - f / d * p;
|
|
486
486
|
}, r = (u) => {
|
|
487
487
|
const h = u * o * t, f = h * n + n, d = Math.pow(o, 2) * Math.pow(u, 2) * t, p = Math.exp(-h), g = _e(Math.pow(u, 2), o);
|
|
488
|
-
return (-i(u) +
|
|
488
|
+
return (-i(u) + ke > 0 ? -1 : 1) * ((f - d) * p) / g;
|
|
489
489
|
}) : (i = (u) => {
|
|
490
|
-
const
|
|
491
|
-
return -
|
|
490
|
+
const c = Math.exp(-u * t), h = (u - n) * t + 1;
|
|
491
|
+
return -ke + c * h;
|
|
492
492
|
}, r = (u) => {
|
|
493
|
-
const
|
|
494
|
-
return
|
|
493
|
+
const c = Math.exp(-u * t), h = (n - u) * (t * t);
|
|
494
|
+
return c * h;
|
|
495
495
|
});
|
|
496
|
-
const a = 5 / t,
|
|
497
|
-
if (t = /* @__PURE__ */ H(t), isNaN(
|
|
496
|
+
const a = 5 / t, l = ca(i, r, a);
|
|
497
|
+
if (t = /* @__PURE__ */ H(t), isNaN(l))
|
|
498
498
|
return {
|
|
499
499
|
stiffness: I.stiffness,
|
|
500
500
|
damping: I.damping,
|
|
501
501
|
duration: t
|
|
502
502
|
};
|
|
503
503
|
{
|
|
504
|
-
const u = Math.pow(
|
|
504
|
+
const u = Math.pow(l, 2) * s;
|
|
505
505
|
return {
|
|
506
506
|
stiffness: u,
|
|
507
507
|
damping: o * 2 * Math.sqrt(s * u),
|
|
@@ -510,7 +510,7 @@ function ua({ duration: t = I.duration, bounce: e = I.bounce, velocity: n = I.ve
|
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
const ha = ["duration", "bounce"], fa = ["stiffness", "damping", "mass"];
|
|
513
|
-
function
|
|
513
|
+
function rs(t, e) {
|
|
514
514
|
return e.some((n) => t[n] !== void 0);
|
|
515
515
|
}
|
|
516
516
|
function da(t) {
|
|
@@ -522,7 +522,7 @@ function da(t) {
|
|
|
522
522
|
isResolvedFromDuration: !1,
|
|
523
523
|
...t
|
|
524
524
|
};
|
|
525
|
-
if (!
|
|
525
|
+
if (!rs(t, fa) && rs(t, ha))
|
|
526
526
|
if (e.velocity = 0, t.visualDuration) {
|
|
527
527
|
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * ot(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
|
|
528
528
|
e = {
|
|
@@ -548,21 +548,21 @@ function me(t = I.visualDuration, e = I.bounce) {
|
|
|
548
548
|
bounce: e
|
|
549
549
|
} : t;
|
|
550
550
|
let { restSpeed: s, restDelta: i } = n;
|
|
551
|
-
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness:
|
|
551
|
+
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: l, damping: u, mass: c, duration: h, velocity: f, isResolvedFromDuration: d } = da({
|
|
552
552
|
...n,
|
|
553
553
|
velocity: -/* @__PURE__ */ X(n.velocity || 0)
|
|
554
|
-
}), p = f || 0, g = u / (2 * Math.sqrt(
|
|
555
|
-
s || (s =
|
|
556
|
-
let v,
|
|
554
|
+
}), p = f || 0, g = u / (2 * Math.sqrt(l * c)), m = o - r, y = /* @__PURE__ */ X(Math.sqrt(l / c)), w = Math.abs(m) < 5;
|
|
555
|
+
s || (s = w ? I.restSpeed.granular : I.restSpeed.default), i || (i = w ? I.restDelta.granular : I.restDelta.default);
|
|
556
|
+
let v, x, b, C, A, P;
|
|
557
557
|
if (g < 1)
|
|
558
558
|
b = _e(y, g), C = (p + g * y * m) / b, v = (S) => {
|
|
559
559
|
const D = Math.exp(-g * y * S);
|
|
560
560
|
return o - D * (C * Math.sin(b * S) + m * Math.cos(b * S));
|
|
561
|
-
}, A = g * y * C + m * b, P = g * y * m - C * b,
|
|
561
|
+
}, A = g * y * C + m * b, P = g * y * m - C * b, x = (S) => Math.exp(-g * y * S) * (A * Math.sin(b * S) + P * Math.cos(b * S));
|
|
562
562
|
else if (g === 1) {
|
|
563
563
|
v = (D) => o - Math.exp(-y * D) * (m + (p + y * m) * D);
|
|
564
564
|
const S = p + y * m;
|
|
565
|
-
|
|
565
|
+
x = (D) => Math.exp(-y * D) * (y * S * D - p);
|
|
566
566
|
} else {
|
|
567
567
|
const S = y * Math.sqrt(g * g - 1);
|
|
568
568
|
v = (_) => {
|
|
@@ -570,14 +570,14 @@ function me(t = I.visualDuration, e = I.bounce) {
|
|
|
570
570
|
return o - Y * ((p + g * y * m) * Math.sinh(M) + S * m * Math.cosh(M)) / S;
|
|
571
571
|
};
|
|
572
572
|
const D = (p + g * y * m) / S, F = g * y * D - m * S, Z = g * y * m - D * S;
|
|
573
|
-
|
|
573
|
+
x = (_) => {
|
|
574
574
|
const Y = Math.exp(-g * y * _), M = Math.min(S * _, 300);
|
|
575
575
|
return Y * (F * Math.sinh(M) + Z * Math.cosh(M));
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
578
|
const V = {
|
|
579
579
|
calculatedDuration: d && h || null,
|
|
580
|
-
velocity: (S) => /* @__PURE__ */ H(
|
|
580
|
+
velocity: (S) => /* @__PURE__ */ H(x(S)),
|
|
581
581
|
next: (S) => {
|
|
582
582
|
if (!d && g < 1) {
|
|
583
583
|
const F = Math.exp(-g * y * S), Z = Math.sin(b * S), _ = Math.cos(b * S), Y = o - F * (C * Z + m * _), M = /* @__PURE__ */ H(F * (A * Z + P * _));
|
|
@@ -587,13 +587,13 @@ function me(t = I.visualDuration, e = I.bounce) {
|
|
|
587
587
|
if (d)
|
|
588
588
|
a.done = S >= h;
|
|
589
589
|
else {
|
|
590
|
-
const F = /* @__PURE__ */ H(
|
|
590
|
+
const F = /* @__PURE__ */ H(x(S));
|
|
591
591
|
a.done = Math.abs(F) <= s && Math.abs(o - D) <= i;
|
|
592
592
|
}
|
|
593
593
|
return a.value = a.done ? o : D, a;
|
|
594
594
|
},
|
|
595
595
|
toString: () => {
|
|
596
|
-
const S = Math.min(
|
|
596
|
+
const S = Math.min(Rn(V), pe), D = zi((F) => V.next(S * F).value, S, 30);
|
|
597
597
|
return S + "ms " + D;
|
|
598
598
|
},
|
|
599
599
|
toTransition: () => {
|
|
@@ -608,18 +608,18 @@ me.applyToOptions = (t) => {
|
|
|
608
608
|
const pa = 5;
|
|
609
609
|
function Ki(t, e, n) {
|
|
610
610
|
const s = Math.max(e - pa, 0);
|
|
611
|
-
return /* @__PURE__ */
|
|
611
|
+
return /* @__PURE__ */ bi(n - t(s), e - s);
|
|
612
612
|
}
|
|
613
|
-
function Ye({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max:
|
|
613
|
+
function Ye({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
614
614
|
const h = t[0], f = {
|
|
615
615
|
done: !1,
|
|
616
616
|
value: h
|
|
617
|
-
}, d = (P) => a !== void 0 && P < a ||
|
|
617
|
+
}, d = (P) => a !== void 0 && P < a || l !== void 0 && P > l, p = (P) => a === void 0 ? l : l === void 0 || Math.abs(a - P) < Math.abs(l - P) ? a : l;
|
|
618
618
|
let g = n * e;
|
|
619
619
|
const m = h + g, y = o === void 0 ? m : o(m);
|
|
620
620
|
y !== m && (g = y - h);
|
|
621
|
-
const
|
|
622
|
-
const V =
|
|
621
|
+
const w = (P) => -g * Math.exp(-P / s), v = (P) => y + w(P), x = (P) => {
|
|
622
|
+
const V = w(P), S = v(P);
|
|
623
623
|
f.done = Math.abs(V) <= u, f.value = f.done ? y : S;
|
|
624
624
|
};
|
|
625
625
|
let b, C;
|
|
@@ -631,24 +631,24 @@ function Ye({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
631
631
|
damping: i,
|
|
632
632
|
stiffness: r,
|
|
633
633
|
restDelta: u,
|
|
634
|
-
restSpeed:
|
|
634
|
+
restSpeed: c
|
|
635
635
|
}));
|
|
636
636
|
};
|
|
637
637
|
return A(0), {
|
|
638
638
|
calculatedDuration: null,
|
|
639
639
|
next: (P) => {
|
|
640
640
|
let V = !1;
|
|
641
|
-
return !C && b === void 0 && (V = !0,
|
|
641
|
+
return !C && b === void 0 && (V = !0, x(P), A(P)), b !== void 0 && P >= b ? C.next(P - b) : (!V && x(P), f);
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
644
|
}
|
|
645
645
|
function ma(t, e, n) {
|
|
646
|
-
const s = [], i = n || ht.mix ||
|
|
646
|
+
const s = [], i = n || ht.mix || $i, r = t.length - 1;
|
|
647
647
|
for (let o = 0; o < r; o++) {
|
|
648
648
|
let a = i(t[o], t[o + 1]);
|
|
649
649
|
if (e) {
|
|
650
|
-
const
|
|
651
|
-
a = Ht(
|
|
650
|
+
const l = Array.isArray(e) ? e[o] || q : e;
|
|
651
|
+
a = Ht(l, a);
|
|
652
652
|
}
|
|
653
653
|
s.push(a);
|
|
654
654
|
}
|
|
@@ -662,17 +662,17 @@ function ga(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
662
662
|
return () => e[1];
|
|
663
663
|
const o = t[0] === t[1];
|
|
664
664
|
t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
665
|
-
const a = ma(e, s, i),
|
|
666
|
-
if (o &&
|
|
665
|
+
const a = ma(e, s, i), l = a.length, u = (c) => {
|
|
666
|
+
if (o && c < t[0])
|
|
667
667
|
return e[0];
|
|
668
668
|
let h = 0;
|
|
669
|
-
if (
|
|
670
|
-
for (; h < t.length - 2 && !(
|
|
669
|
+
if (l > 1)
|
|
670
|
+
for (; h < t.length - 2 && !(c < t[h + 1]); h++)
|
|
671
671
|
;
|
|
672
|
-
const f = /* @__PURE__ */ $t(t[h], t[h + 1],
|
|
672
|
+
const f = /* @__PURE__ */ $t(t[h], t[h + 1], c);
|
|
673
673
|
return a[h](f);
|
|
674
674
|
};
|
|
675
|
-
return n ? (
|
|
675
|
+
return n ? (c) => u(ot(t[0], t[r - 1], c)) : u;
|
|
676
676
|
}
|
|
677
677
|
function ya(t, e) {
|
|
678
678
|
const n = t[t.length - 1];
|
|
@@ -689,10 +689,10 @@ function xa(t, e) {
|
|
|
689
689
|
return t.map((n) => n * e);
|
|
690
690
|
}
|
|
691
691
|
function wa(t, e) {
|
|
692
|
-
return t.map(() => e ||
|
|
692
|
+
return t.map(() => e || ki).splice(0, t.length - 1);
|
|
693
693
|
}
|
|
694
694
|
function St({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
695
|
-
const i = /* @__PURE__ */ Dr(s) ? s.map(
|
|
695
|
+
const i = /* @__PURE__ */ Dr(s) ? s.map(ts) : ts(s), r = {
|
|
696
696
|
done: !1,
|
|
697
697
|
value: e[0]
|
|
698
698
|
}, o = xa(
|
|
@@ -705,7 +705,7 @@ function St({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }
|
|
|
705
705
|
});
|
|
706
706
|
return {
|
|
707
707
|
calculatedDuration: t,
|
|
708
|
-
next: (
|
|
708
|
+
next: (l) => (r.value = a(l), r.done = l >= t, r)
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
711
|
const Ta = (t) => t !== null;
|
|
@@ -720,10 +720,10 @@ const Pa = {
|
|
|
720
720
|
keyframes: St,
|
|
721
721
|
spring: me
|
|
722
722
|
};
|
|
723
|
-
function
|
|
723
|
+
function Gi(t) {
|
|
724
724
|
typeof t.type == "string" && (t.type = Pa[t.type]);
|
|
725
725
|
}
|
|
726
|
-
class
|
|
726
|
+
class kn {
|
|
727
727
|
constructor() {
|
|
728
728
|
this.updateFinished();
|
|
729
729
|
}
|
|
@@ -748,7 +748,7 @@ class Rn {
|
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
const ba = (t) => t / 100;
|
|
751
|
-
class ge extends
|
|
751
|
+
class ge extends kn {
|
|
752
752
|
constructor(e) {
|
|
753
753
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
|
|
754
754
|
done: !1,
|
|
@@ -756,49 +756,49 @@ class ge extends Rn {
|
|
|
756
756
|
}, this.stop = () => {
|
|
757
757
|
var s, i;
|
|
758
758
|
const { motionValue: n } = this.options;
|
|
759
|
-
n && n.updatedAt !==
|
|
759
|
+
n && n.updatedAt !== z.now() && this.tick(z.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (s = this.options).onStop) == null || i.call(s));
|
|
760
760
|
}, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
|
|
761
761
|
}
|
|
762
762
|
initAnimation() {
|
|
763
763
|
const { options: e } = this;
|
|
764
|
-
|
|
764
|
+
Gi(e);
|
|
765
765
|
const { type: n = St, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = e;
|
|
766
766
|
let { keyframes: a } = e;
|
|
767
|
-
const
|
|
768
|
-
process.env.NODE_ENV !== "production" &&
|
|
769
|
-
const u =
|
|
770
|
-
r === "mirror" && (this.mirroredGenerator =
|
|
767
|
+
const l = n || St;
|
|
768
|
+
process.env.NODE_ENV !== "production" && l !== St && lt(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== St && typeof a[0] != "number" && (this.mixKeyframes = Ht(ba, $i(a[0], a[1])), a = [0, 100]);
|
|
769
|
+
const u = l({ ...e, keyframes: a });
|
|
770
|
+
r === "mirror" && (this.mirroredGenerator = l({
|
|
771
771
|
...e,
|
|
772
772
|
keyframes: [...a].reverse(),
|
|
773
773
|
velocity: -o
|
|
774
|
-
})), u.calculatedDuration === null && (u.calculatedDuration =
|
|
775
|
-
const { calculatedDuration:
|
|
776
|
-
this.calculatedDuration =
|
|
774
|
+
})), u.calculatedDuration === null && (u.calculatedDuration = Rn(u));
|
|
775
|
+
const { calculatedDuration: c } = u;
|
|
776
|
+
this.calculatedDuration = c, this.resolvedDuration = c + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = u;
|
|
777
777
|
}
|
|
778
778
|
updateTime(e) {
|
|
779
779
|
const n = Math.round(e - this.startTime) * this.playbackSpeed;
|
|
780
780
|
this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
|
|
781
781
|
}
|
|
782
782
|
tick(e, n = !1) {
|
|
783
|
-
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration:
|
|
783
|
+
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: l } = this;
|
|
784
784
|
if (this.startTime === null)
|
|
785
785
|
return s.next(0);
|
|
786
|
-
const { delay: u = 0, keyframes:
|
|
786
|
+
const { delay: u = 0, keyframes: c, repeat: h, repeatType: f, repeatDelay: d, type: p, onUpdate: g, finalKeyframe: m } = this.options;
|
|
787
787
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
|
|
788
|
-
const y = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1),
|
|
788
|
+
const y = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), w = this.playbackSpeed >= 0 ? y < 0 : y > i;
|
|
789
789
|
this.currentTime = Math.max(y, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
790
|
-
let v = this.currentTime,
|
|
790
|
+
let v = this.currentTime, x = s;
|
|
791
791
|
if (h) {
|
|
792
792
|
const P = Math.min(this.currentTime, i) / a;
|
|
793
793
|
let V = Math.floor(P), S = P % 1;
|
|
794
|
-
!S && P >= 1 && (S = 1), S === 1 && V--, V = Math.min(V, h + 1), !!(V % 2) && (f === "reverse" ? (S = 1 - S, d && (S -= d / a)) : f === "mirror" && (
|
|
794
|
+
!S && P >= 1 && (S = 1), S === 1 && V--, V = Math.min(V, h + 1), !!(V % 2) && (f === "reverse" ? (S = 1 - S, d && (S -= d / a)) : f === "mirror" && (x = o)), v = ot(0, 1, S) * a;
|
|
795
795
|
}
|
|
796
796
|
let b;
|
|
797
|
-
|
|
797
|
+
w ? (this.delayState.value = c[0], b = this.delayState) : b = x.next(v), r && !w && (b.value = r(b.value));
|
|
798
798
|
let { done: C } = b;
|
|
799
|
-
!
|
|
799
|
+
!w && l !== null && (C = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
800
800
|
const A = this.holdTime === null && (this.state === "finished" || this.state === "running" && C);
|
|
801
|
-
return A && p !== Ye && (b.value = Se(
|
|
801
|
+
return A && p !== Ye && (b.value = Se(c, this.options, m, this.speed)), g && g(b.value), A && this.finish(), b;
|
|
802
802
|
}
|
|
803
803
|
/**
|
|
804
804
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -840,7 +840,7 @@ class ge extends Rn {
|
|
|
840
840
|
}
|
|
841
841
|
set speed(e) {
|
|
842
842
|
const n = this.playbackSpeed !== e;
|
|
843
|
-
n && this.driver && this.updateTime(
|
|
843
|
+
n && this.driver && this.updateTime(z.now()), this.playbackSpeed = e, n && this.driver && (this.time = /* @__PURE__ */ X(this.currentTime));
|
|
844
844
|
}
|
|
845
845
|
play() {
|
|
846
846
|
var i, r;
|
|
@@ -852,7 +852,7 @@ class ge extends Rn {
|
|
|
852
852
|
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
853
853
|
}
|
|
854
854
|
pause() {
|
|
855
|
-
this.state = "paused", this.updateTime(
|
|
855
|
+
this.state = "paused", this.updateTime(z.now()), this.holdTime = this.currentTime;
|
|
856
856
|
}
|
|
857
857
|
complete() {
|
|
858
858
|
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
@@ -899,20 +899,20 @@ const vt = (t) => t * 180 / Math.PI, Xe = (t) => {
|
|
|
899
899
|
skewX: (t) => vt(Math.atan(t[1])),
|
|
900
900
|
skewY: (t) => vt(Math.atan(t[2])),
|
|
901
901
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
902
|
-
}, qe = (t) => (t = t % 360, t < 0 && (t += 360), t),
|
|
902
|
+
}, qe = (t) => (t = t % 360, t < 0 && (t += 360), t), as = Xe, ls = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), cs = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Va = {
|
|
903
903
|
x: 12,
|
|
904
904
|
y: 13,
|
|
905
905
|
z: 14,
|
|
906
906
|
translateX: 12,
|
|
907
907
|
translateY: 13,
|
|
908
908
|
translateZ: 14,
|
|
909
|
-
scaleX:
|
|
910
|
-
scaleY:
|
|
911
|
-
scale: (t) => (
|
|
909
|
+
scaleX: ls,
|
|
910
|
+
scaleY: cs,
|
|
911
|
+
scale: (t) => (ls(t) + cs(t)) / 2,
|
|
912
912
|
rotateX: (t) => qe(vt(Math.atan2(t[6], t[5]))),
|
|
913
913
|
rotateY: (t) => qe(vt(Math.atan2(-t[2], t[0]))),
|
|
914
|
-
rotateZ:
|
|
915
|
-
rotate:
|
|
914
|
+
rotateZ: as,
|
|
915
|
+
rotate: as,
|
|
916
916
|
skewX: (t) => vt(Math.atan(t[4])),
|
|
917
917
|
skewY: (t) => vt(Math.atan(t[1])),
|
|
918
918
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
@@ -943,7 +943,7 @@ const Ca = (t, e) => {
|
|
|
943
943
|
function Ma(t) {
|
|
944
944
|
return parseFloat(t.trim());
|
|
945
945
|
}
|
|
946
|
-
const
|
|
946
|
+
const kt = [
|
|
947
947
|
"transformPerspective",
|
|
948
948
|
"x",
|
|
949
949
|
"y",
|
|
@@ -961,7 +961,7 @@ const Lt = [
|
|
|
961
961
|
"skew",
|
|
962
962
|
"skewX",
|
|
963
963
|
"skewY"
|
|
964
|
-
],
|
|
964
|
+
], Lt = /* @__PURE__ */ new Set([...kt, "pathRotation"]), us = (t) => t === Rt || t === T, Da = /* @__PURE__ */ new Set(["x", "y", "z"]), Ea = kt.filter((t) => !Da.has(t));
|
|
965
965
|
function Ra(t) {
|
|
966
966
|
const e = [];
|
|
967
967
|
return Ea.forEach((n) => {
|
|
@@ -991,7 +991,7 @@ ut.translateX = ut.x;
|
|
|
991
991
|
ut.translateY = ut.y;
|
|
992
992
|
const xt = /* @__PURE__ */ new Set();
|
|
993
993
|
let Qe = !1, tn = !1, en = !1;
|
|
994
|
-
function
|
|
994
|
+
function Hi() {
|
|
995
995
|
if (tn) {
|
|
996
996
|
const t = Array.from(xt).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
997
997
|
e.forEach((s) => {
|
|
@@ -1010,20 +1010,20 @@ function Gi() {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
tn = !1, Qe = !1, xt.forEach((t) => t.complete(en)), xt.clear();
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function _i() {
|
|
1014
1014
|
xt.forEach((t) => {
|
|
1015
1015
|
t.readKeyframes(), t.needsMeasurement && (tn = !0);
|
|
1016
1016
|
});
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1019
|
-
en = !0,
|
|
1018
|
+
function ka() {
|
|
1019
|
+
en = !0, _i(), Hi(), en = !1;
|
|
1020
1020
|
}
|
|
1021
1021
|
class Ln {
|
|
1022
1022
|
constructor(e, n, s, i, r, o = !1) {
|
|
1023
1023
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
1024
1024
|
}
|
|
1025
1025
|
scheduleResolve() {
|
|
1026
|
-
this.state = "scheduled", this.isAsync ? (xt.add(this), Qe || (Qe = !0,
|
|
1026
|
+
this.state = "scheduled", this.isAsync ? (xt.add(this), Qe || (Qe = !0, k.read(_i), k.resolveKeyframes(Hi))) : (this.readKeyframes(), this.complete());
|
|
1027
1027
|
}
|
|
1028
1028
|
readKeyframes() {
|
|
1029
1029
|
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
@@ -1057,23 +1057,23 @@ class Ln {
|
|
|
1057
1057
|
this.state === "pending" && this.scheduleResolve();
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
|
-
const
|
|
1061
|
-
function
|
|
1062
|
-
|
|
1060
|
+
const La = (t) => t.startsWith("--");
|
|
1061
|
+
function Yi(t, e, n) {
|
|
1062
|
+
La(e) ? t.style.setProperty(e, n) : t.style[e] = n;
|
|
1063
1063
|
}
|
|
1064
1064
|
const Ia = {};
|
|
1065
|
-
function
|
|
1066
|
-
const n = /* @__PURE__ */
|
|
1065
|
+
function Xi(t, e) {
|
|
1066
|
+
const n = /* @__PURE__ */ Pi(t);
|
|
1067
1067
|
return () => Ia[e] ?? n();
|
|
1068
1068
|
}
|
|
1069
|
-
const Ba = /* @__PURE__ */
|
|
1069
|
+
const Ba = /* @__PURE__ */ Xi(() => window.ScrollTimeline !== void 0, "scrollTimeline"), qi = /* @__PURE__ */ Xi(() => {
|
|
1070
1070
|
try {
|
|
1071
1071
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1072
1072
|
} catch {
|
|
1073
1073
|
return !1;
|
|
1074
1074
|
}
|
|
1075
1075
|
return !0;
|
|
1076
|
-
}, "linearEasing"), Ft = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`,
|
|
1076
|
+
}, "linearEasing"), Ft = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, hs = {
|
|
1077
1077
|
linear: "linear",
|
|
1078
1078
|
ease: "ease",
|
|
1079
1079
|
easeIn: "ease-in",
|
|
@@ -1084,17 +1084,17 @@ const Ba = /* @__PURE__ */ Yi(() => window.ScrollTimeline !== void 0, "scrollTim
|
|
|
1084
1084
|
backIn: /* @__PURE__ */ Ft([0.31, 0.01, 0.66, -0.59]),
|
|
1085
1085
|
backOut: /* @__PURE__ */ Ft([0.33, 1.53, 0.69, 0.99])
|
|
1086
1086
|
};
|
|
1087
|
-
function
|
|
1087
|
+
function Zi(t, e) {
|
|
1088
1088
|
if (t)
|
|
1089
|
-
return typeof t == "function" ?
|
|
1089
|
+
return typeof t == "function" ? qi() ? zi(t, e) : "ease-out" : /* @__PURE__ */ Li(t) ? Ft(t) : Array.isArray(t) ? t.map((n) => Zi(n, e) || hs.easeOut) : hs[t];
|
|
1090
1090
|
}
|
|
1091
|
-
function Fa(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times:
|
|
1092
|
-
const
|
|
1091
|
+
function Fa(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
|
|
1092
|
+
const c = {
|
|
1093
1093
|
[e]: n
|
|
1094
1094
|
};
|
|
1095
|
-
|
|
1096
|
-
const h =
|
|
1097
|
-
Array.isArray(h) && (
|
|
1095
|
+
l && (c.offset = l);
|
|
1096
|
+
const h = Zi(a, i);
|
|
1097
|
+
Array.isArray(h) && (c.easing = h);
|
|
1098
1098
|
const f = {
|
|
1099
1099
|
delay: s,
|
|
1100
1100
|
duration: i,
|
|
@@ -1103,27 +1103,27 @@ function Fa(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
|
|
|
1103
1103
|
iterations: r + 1,
|
|
1104
1104
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
1105
1105
|
};
|
|
1106
|
-
return u && (f.pseudoElement = u), t.animate(
|
|
1106
|
+
return u && (f.pseudoElement = u), t.animate(c, f);
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1108
|
+
function Ji(t) {
|
|
1109
1109
|
return typeof t == "function" && "applyToOptions" in t;
|
|
1110
1110
|
}
|
|
1111
1111
|
function Oa({ type: t, ...e }) {
|
|
1112
|
-
return
|
|
1112
|
+
return Ji(t) && qi() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
|
|
1113
1113
|
}
|
|
1114
|
-
class
|
|
1114
|
+
class Qi extends kn {
|
|
1115
1115
|
constructor(e) {
|
|
1116
1116
|
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e)
|
|
1117
1117
|
return;
|
|
1118
|
-
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete:
|
|
1118
|
+
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: l } = e;
|
|
1119
1119
|
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = e, lt(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1120
1120
|
const u = Oa(e);
|
|
1121
1121
|
this.animation = Fa(n, s, i, u, r), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1122
1122
|
if (this.finishedTime = this.time, !r) {
|
|
1123
|
-
const
|
|
1124
|
-
this.updateMotionValue && this.updateMotionValue(
|
|
1123
|
+
const c = Se(i, this.options, a, this.speed);
|
|
1124
|
+
this.updateMotionValue && this.updateMotionValue(c), Yi(n, s, c), this.animation.cancel();
|
|
1125
1125
|
}
|
|
1126
|
-
|
|
1126
|
+
l == null || l(), this.notifyFinished();
|
|
1127
1127
|
};
|
|
1128
1128
|
}
|
|
1129
1129
|
play() {
|
|
@@ -1209,21 +1209,21 @@ class Ji extends Rn {
|
|
|
1209
1209
|
return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && Ba() ? (this.animation.timeline = e, n && (this.animation.rangeStart = n), s && (this.animation.rangeEnd = s), q) : i(this);
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1213
|
-
anticipate:
|
|
1214
|
-
backInOut:
|
|
1215
|
-
circInOut:
|
|
1212
|
+
const to = {
|
|
1213
|
+
anticipate: Di,
|
|
1214
|
+
backInOut: Mi,
|
|
1215
|
+
circInOut: Ri
|
|
1216
1216
|
};
|
|
1217
1217
|
function ja(t) {
|
|
1218
|
-
return t in
|
|
1218
|
+
return t in to;
|
|
1219
1219
|
}
|
|
1220
1220
|
function Na(t) {
|
|
1221
|
-
typeof t.ease == "string" && ja(t.ease) && (t.ease =
|
|
1221
|
+
typeof t.ease == "string" && ja(t.ease) && (t.ease = to[t.ease]);
|
|
1222
1222
|
}
|
|
1223
|
-
const
|
|
1224
|
-
class Ua extends
|
|
1223
|
+
const Le = 10;
|
|
1224
|
+
class Ua extends Qi {
|
|
1225
1225
|
constructor(e) {
|
|
1226
|
-
Na(e),
|
|
1226
|
+
Na(e), Gi(e), super(e), e.startTime !== void 0 && e.autoplay !== !1 && (this.startTime = e.startTime), this.options = e;
|
|
1227
1227
|
}
|
|
1228
1228
|
/**
|
|
1229
1229
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -1244,11 +1244,11 @@ class Ua extends Ji {
|
|
|
1244
1244
|
const a = new ge({
|
|
1245
1245
|
...o,
|
|
1246
1246
|
autoplay: !1
|
|
1247
|
-
}),
|
|
1248
|
-
r && h &&
|
|
1247
|
+
}), l = Math.max(Le, z.now() - this.startTime), u = ot(0, Le, l - Le), c = a.sample(l).value, { name: h } = this.options;
|
|
1248
|
+
r && h && Yi(r, h, c), n.setWithVelocity(a.sample(Math.max(0, l - u)).value, c, u), a.stop();
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
|
-
const
|
|
1251
|
+
const fs = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
1252
1252
|
(tt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
1253
1253
|
!t.startsWith("url("));
|
|
1254
1254
|
function Wa(t) {
|
|
@@ -1265,13 +1265,13 @@ function $a(t, e, n, s) {
|
|
|
1265
1265
|
return !1;
|
|
1266
1266
|
if (e === "display" || e === "visibility")
|
|
1267
1267
|
return !0;
|
|
1268
|
-
const r = t[t.length - 1], o =
|
|
1269
|
-
return Et(o === a, `You are trying to animate ${e} from "${i}" to "${r}". "${o ? r : i}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : Wa(t) || (n === "spring" ||
|
|
1268
|
+
const r = t[t.length - 1], o = fs(i, e), a = fs(r, e);
|
|
1269
|
+
return Et(o === a, `You are trying to animate ${e} from "${i}" to "${r}". "${o ? r : i}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : Wa(t) || (n === "spring" || Ji(n)) && s;
|
|
1270
1270
|
}
|
|
1271
1271
|
function nn(t) {
|
|
1272
1272
|
t.duration = 0, t.type = "keyframes";
|
|
1273
1273
|
}
|
|
1274
|
-
const
|
|
1274
|
+
const eo = /* @__PURE__ */ new Set([
|
|
1275
1275
|
"opacity",
|
|
1276
1276
|
"clipPath",
|
|
1277
1277
|
"filter",
|
|
@@ -1279,10 +1279,10 @@ const to = /* @__PURE__ */ new Set([
|
|
|
1279
1279
|
// TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
|
|
1280
1280
|
// or until we implement support for linear() easing.
|
|
1281
1281
|
// "background-color"
|
|
1282
|
-
]),
|
|
1283
|
-
function
|
|
1282
|
+
]), za = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
|
|
1283
|
+
function Ka(t) {
|
|
1284
1284
|
for (let e = 0; e < t.length; e++)
|
|
1285
|
-
if (typeof t[e] == "string" &&
|
|
1285
|
+
if (typeof t[e] == "string" && za.test(t[e]))
|
|
1286
1286
|
return !0;
|
|
1287
1287
|
return !1;
|
|
1288
1288
|
}
|
|
@@ -1297,31 +1297,31 @@ const Ga = /* @__PURE__ */ new Set([
|
|
|
1297
1297
|
"borderRightColor",
|
|
1298
1298
|
"borderBottomColor",
|
|
1299
1299
|
"borderLeftColor"
|
|
1300
|
-
]), Ha = /* @__PURE__ */
|
|
1300
|
+
]), Ha = /* @__PURE__ */ Pi(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1301
1301
|
function _a(t) {
|
|
1302
1302
|
var h;
|
|
1303
1303
|
const { motionValue: e, name: n, repeatDelay: s, repeatType: i, damping: r, type: o, keyframes: a } = t;
|
|
1304
1304
|
if (!(((h = e == null ? void 0 : e.owner) == null ? void 0 : h.current) instanceof HTMLElement))
|
|
1305
1305
|
return !1;
|
|
1306
|
-
const { onUpdate: u, transformTemplate:
|
|
1306
|
+
const { onUpdate: u, transformTemplate: c } = e.owner.getProps();
|
|
1307
1307
|
return Ha() && n && /**
|
|
1308
1308
|
* Force WAAPI for color properties with browser-only color formats
|
|
1309
1309
|
* (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.
|
|
1310
1310
|
*/
|
|
1311
|
-
(
|
|
1311
|
+
(eo.has(n) || Ga.has(n) && Ka(a)) && (n !== "transform" || !c) && /**
|
|
1312
1312
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1313
1313
|
* no way to read the value from WAAPI every frame.
|
|
1314
1314
|
*/
|
|
1315
1315
|
!u && !s && i !== "mirror" && r !== 0 && o !== "inertia";
|
|
1316
1316
|
}
|
|
1317
1317
|
const Ya = 40;
|
|
1318
|
-
class Xa extends
|
|
1319
|
-
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name:
|
|
1318
|
+
class Xa extends kn {
|
|
1319
|
+
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: l, motionValue: u, element: c, ...h }) {
|
|
1320
1320
|
var p;
|
|
1321
1321
|
super(), this.stop = () => {
|
|
1322
1322
|
var g, m;
|
|
1323
1323
|
this._animation && (this._animation.stop(), (g = this.stopTimeline) == null || g.call(this)), (m = this.keyframeResolver) == null || m.cancel();
|
|
1324
|
-
}, this.createdAt =
|
|
1324
|
+
}, this.createdAt = z.now();
|
|
1325
1325
|
const f = {
|
|
1326
1326
|
autoplay: e,
|
|
1327
1327
|
delay: n,
|
|
@@ -1329,26 +1329,26 @@ class Xa extends Rn {
|
|
|
1329
1329
|
repeat: i,
|
|
1330
1330
|
repeatDelay: r,
|
|
1331
1331
|
repeatType: o,
|
|
1332
|
-
name:
|
|
1332
|
+
name: l,
|
|
1333
1333
|
motionValue: u,
|
|
1334
|
-
element:
|
|
1334
|
+
element: c,
|
|
1335
1335
|
...h
|
|
1336
|
-
}, d = (
|
|
1337
|
-
this.keyframeResolver = new d(a, (g, m, y) => this.onKeyframesResolved(g, m, f, !y),
|
|
1336
|
+
}, d = (c == null ? void 0 : c.KeyframeResolver) || Ln;
|
|
1337
|
+
this.keyframeResolver = new d(a, (g, m, y) => this.onKeyframesResolved(g, m, f, !y), l, u, c), (p = this.keyframeResolver) == null || p.scheduleResolve();
|
|
1338
1338
|
}
|
|
1339
1339
|
onKeyframesResolved(e, n, s, i) {
|
|
1340
|
-
var y,
|
|
1340
|
+
var y, w;
|
|
1341
1341
|
this.keyframeResolver = void 0;
|
|
1342
|
-
const { name: r, type: o, velocity: a, delay:
|
|
1343
|
-
this.resolvedAt =
|
|
1342
|
+
const { name: r, type: o, velocity: a, delay: l, isHandoff: u, onUpdate: c } = s;
|
|
1343
|
+
this.resolvedAt = z.now();
|
|
1344
1344
|
let h = !0;
|
|
1345
|
-
$a(e, r, o, a) || (h = !1, (ht.instantAnimations || !
|
|
1345
|
+
$a(e, r, o, a) || (h = !1, (ht.instantAnimations || !l) && (c == null || c(Se(e, s, n))), e[0] = e[e.length - 1], nn(s), s.repeat = 0);
|
|
1346
1346
|
const d = {
|
|
1347
1347
|
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ya ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1348
1348
|
finalKeyframe: n,
|
|
1349
1349
|
...s,
|
|
1350
1350
|
keyframes: e
|
|
1351
|
-
}, p = h && !u && _a(d), g = (
|
|
1351
|
+
}, p = h && !u && _a(d), g = (w = (y = d.motionValue) == null ? void 0 : y.owner) == null ? void 0 : w.current;
|
|
1352
1352
|
let m;
|
|
1353
1353
|
if (p)
|
|
1354
1354
|
try {
|
|
@@ -1374,7 +1374,7 @@ class Xa extends Rn {
|
|
|
1374
1374
|
}
|
|
1375
1375
|
get animation() {
|
|
1376
1376
|
var e;
|
|
1377
|
-
return this._animation || ((e = this.keyframeResolver) == null || e.resume(),
|
|
1377
|
+
return this._animation || ((e = this.keyframeResolver) == null || e.resume(), ka()), this._animation;
|
|
1378
1378
|
}
|
|
1379
1379
|
get duration() {
|
|
1380
1380
|
return this.animation.duration;
|
|
@@ -1417,11 +1417,11 @@ class Xa extends Rn {
|
|
|
1417
1417
|
this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel();
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1421
|
-
const r = Array.from(t).sort((u,
|
|
1420
|
+
function no(t, e, n, s = 0, i = 1) {
|
|
1421
|
+
const r = Array.from(t).sort((u, c) => u.sortNodePosition(c)).indexOf(e), o = t.size, a = (o - 1) * s;
|
|
1422
1422
|
return typeof n == "function" ? n(r, o) : i === 1 ? r * s : a - r * s;
|
|
1423
1423
|
}
|
|
1424
|
-
const
|
|
1424
|
+
const ds = 30, qa = (t) => !isNaN(parseFloat(t));
|
|
1425
1425
|
class Za {
|
|
1426
1426
|
/**
|
|
1427
1427
|
* @param init - The initiating value
|
|
@@ -1432,14 +1432,14 @@ class Za {
|
|
|
1432
1432
|
constructor(e, n = {}) {
|
|
1433
1433
|
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
|
|
1434
1434
|
var r;
|
|
1435
|
-
const i =
|
|
1435
|
+
const i = z.now();
|
|
1436
1436
|
if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && ((r = this.events.change) == null || r.notify(this.current), this.dependents))
|
|
1437
1437
|
for (const o of this.dependents)
|
|
1438
1438
|
o.dirty();
|
|
1439
1439
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
1440
1440
|
}
|
|
1441
1441
|
setCurrent(e) {
|
|
1442
|
-
this.current = e, this.updatedAt =
|
|
1442
|
+
this.current = e, this.updatedAt = z.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = qa(this.current));
|
|
1443
1443
|
}
|
|
1444
1444
|
setPrevFrameValue(e = this.current) {
|
|
1445
1445
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -1485,13 +1485,13 @@ class Za {
|
|
|
1485
1485
|
* @deprecated
|
|
1486
1486
|
*/
|
|
1487
1487
|
onChange(e) {
|
|
1488
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1488
|
+
return process.env.NODE_ENV !== "production" && Sn(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
1489
1489
|
}
|
|
1490
1490
|
on(e, n) {
|
|
1491
|
-
this.events[e] || (this.events[e] = new
|
|
1491
|
+
this.events[e] || (this.events[e] = new bn());
|
|
1492
1492
|
const s = this.events[e].add(n);
|
|
1493
1493
|
return e === "change" ? () => {
|
|
1494
|
-
s(),
|
|
1494
|
+
s(), k.read(() => {
|
|
1495
1495
|
this.events.change.getSize() || this.stop();
|
|
1496
1496
|
});
|
|
1497
1497
|
} : s;
|
|
@@ -1568,11 +1568,11 @@ class Za {
|
|
|
1568
1568
|
* @public
|
|
1569
1569
|
*/
|
|
1570
1570
|
getVelocity() {
|
|
1571
|
-
const e =
|
|
1572
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt >
|
|
1571
|
+
const e = z.now();
|
|
1572
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > ds)
|
|
1573
1573
|
return 0;
|
|
1574
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1575
|
-
return /* @__PURE__ */
|
|
1574
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, ds);
|
|
1575
|
+
return /* @__PURE__ */ bi(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1576
1576
|
}
|
|
1577
1577
|
/**
|
|
1578
1578
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -1627,16 +1627,16 @@ class Za {
|
|
|
1627
1627
|
function Mt(t, e) {
|
|
1628
1628
|
return new Za(t, e);
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function so(t, e) {
|
|
1631
1631
|
if (t != null && t.inherit && e) {
|
|
1632
1632
|
const { inherit: n, ...s } = t;
|
|
1633
1633
|
return { ...e, ...s };
|
|
1634
1634
|
}
|
|
1635
1635
|
return t;
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function In(t, e) {
|
|
1638
1638
|
const n = (t == null ? void 0 : t[e]) ?? (t == null ? void 0 : t.default) ?? t;
|
|
1639
|
-
return n !== t ?
|
|
1639
|
+
return n !== t ? so(n, t) : n;
|
|
1640
1640
|
}
|
|
1641
1641
|
const Ja = {
|
|
1642
1642
|
type: "spring",
|
|
@@ -1655,7 +1655,7 @@ const Ja = {
|
|
|
1655
1655
|
type: "keyframes",
|
|
1656
1656
|
ease: [0.25, 0.1, 0.35, 1],
|
|
1657
1657
|
duration: 0.3
|
|
1658
|
-
}, nl = (t, { keyframes: e }) => e.length > 2 ? tl :
|
|
1658
|
+
}, nl = (t, { keyframes: e }) => e.length > 2 ? tl : Lt.has(t) ? t.startsWith("scale") ? Qa(e[1]) : Ja : el, sl = /* @__PURE__ */ new Set([
|
|
1659
1659
|
"when",
|
|
1660
1660
|
"delay",
|
|
1661
1661
|
"delayChildren",
|
|
@@ -1673,11 +1673,11 @@ function il(t) {
|
|
|
1673
1673
|
return !0;
|
|
1674
1674
|
return !1;
|
|
1675
1675
|
}
|
|
1676
|
-
const
|
|
1677
|
-
const a =
|
|
1676
|
+
const Bn = (t, e, n, s = {}, i, r) => (o) => {
|
|
1677
|
+
const a = In(s, t) || {}, l = a.delay || s.delay || 0;
|
|
1678
1678
|
let { elapsed: u = 0 } = s;
|
|
1679
|
-
u = u - /* @__PURE__ */ H(
|
|
1680
|
-
const
|
|
1679
|
+
u = u - /* @__PURE__ */ H(l);
|
|
1680
|
+
const c = {
|
|
1681
1681
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
1682
1682
|
ease: "easeOut",
|
|
1683
1683
|
velocity: e.getVelocity(),
|
|
@@ -1693,18 +1693,18 @@ const In = (t, e, n, s = {}, i, r) => (o) => {
|
|
|
1693
1693
|
motionValue: e,
|
|
1694
1694
|
element: r ? void 0 : i
|
|
1695
1695
|
};
|
|
1696
|
-
il(a) || Object.assign(
|
|
1696
|
+
il(a) || Object.assign(c, nl(t, c)), c.duration && (c.duration = /* @__PURE__ */ H(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ H(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
1697
1697
|
let h = !1;
|
|
1698
|
-
if ((
|
|
1699
|
-
const f = Se(
|
|
1698
|
+
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (nn(c), c.delay === 0 && (h = !0)), (ht.instantAnimations || ht.skipAnimations || i != null && i.shouldSkipAnimations || a.skipAnimations) && (h = !0, nn(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, h && !r && e.get() !== void 0) {
|
|
1699
|
+
const f = Se(c.keyframes, a);
|
|
1700
1700
|
if (f !== void 0) {
|
|
1701
|
-
|
|
1702
|
-
|
|
1701
|
+
k.update(() => {
|
|
1702
|
+
c.onUpdate(f), c.onComplete();
|
|
1703
1703
|
});
|
|
1704
1704
|
return;
|
|
1705
1705
|
}
|
|
1706
1706
|
}
|
|
1707
|
-
return a.isSync ? new ge(
|
|
1707
|
+
return a.isSync ? new ge(c) : new Xa(c);
|
|
1708
1708
|
}, ol = (
|
|
1709
1709
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1710
1710
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
@@ -1717,7 +1717,7 @@ function rl(t) {
|
|
|
1717
1717
|
return [`--${n ?? s}`, i];
|
|
1718
1718
|
}
|
|
1719
1719
|
const al = 4;
|
|
1720
|
-
function
|
|
1720
|
+
function io(t, e, n = 1) {
|
|
1721
1721
|
lt(n <= al, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1722
1722
|
const [s, i] = rl(t);
|
|
1723
1723
|
if (!s)
|
|
@@ -1725,39 +1725,39 @@ function so(t, e, n = 1) {
|
|
|
1725
1725
|
const r = window.getComputedStyle(e).getPropertyValue(s);
|
|
1726
1726
|
if (r) {
|
|
1727
1727
|
const o = r.trim();
|
|
1728
|
-
return
|
|
1728
|
+
return xi(o) ? parseFloat(o) : o;
|
|
1729
1729
|
}
|
|
1730
|
-
return
|
|
1730
|
+
return Cn(i) ? io(i, e, n + 1) : i;
|
|
1731
1731
|
}
|
|
1732
|
-
function
|
|
1732
|
+
function ps(t) {
|
|
1733
1733
|
const e = [{}, {}];
|
|
1734
1734
|
return t == null || t.values.forEach((n, s) => {
|
|
1735
1735
|
e[0][s] = n.get(), e[1][s] = n.getVelocity();
|
|
1736
1736
|
}), e;
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1738
|
+
function Fn(t, e, n, s) {
|
|
1739
1739
|
if (typeof e == "function") {
|
|
1740
|
-
const [i, r] =
|
|
1740
|
+
const [i, r] = ps(s);
|
|
1741
1741
|
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
1742
1742
|
}
|
|
1743
1743
|
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
1744
|
-
const [i, r] =
|
|
1744
|
+
const [i, r] = ps(s);
|
|
1745
1745
|
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
1746
1746
|
}
|
|
1747
1747
|
return e;
|
|
1748
1748
|
}
|
|
1749
1749
|
function wt(t, e, n) {
|
|
1750
1750
|
const s = t.getProps();
|
|
1751
|
-
return
|
|
1751
|
+
return Fn(s, e, n !== void 0 ? n : s.custom, t);
|
|
1752
1752
|
}
|
|
1753
|
-
const
|
|
1753
|
+
const oo = /* @__PURE__ */ new Set([
|
|
1754
1754
|
"width",
|
|
1755
1755
|
"height",
|
|
1756
1756
|
"top",
|
|
1757
1757
|
"left",
|
|
1758
1758
|
"right",
|
|
1759
1759
|
"bottom",
|
|
1760
|
-
...
|
|
1760
|
+
...kt
|
|
1761
1761
|
]), sn = (t) => Array.isArray(t);
|
|
1762
1762
|
function ll(t, e, n) {
|
|
1763
1763
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Mt(n));
|
|
@@ -1787,22 +1787,22 @@ function on(t, e) {
|
|
|
1787
1787
|
t.addValue("willChange", s), s.add(e);
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
|
-
function
|
|
1790
|
+
function On(t) {
|
|
1791
1791
|
return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
|
|
1792
1792
|
}
|
|
1793
|
-
const fl = "framerAppearId",
|
|
1794
|
-
function
|
|
1795
|
-
return t.props[
|
|
1793
|
+
const fl = "framerAppearId", ro = "data-" + On(fl);
|
|
1794
|
+
function ao(t) {
|
|
1795
|
+
return t.props[ro];
|
|
1796
1796
|
}
|
|
1797
1797
|
function dl({ protectedKeys: t, needsAnimating: e }, n) {
|
|
1798
1798
|
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
1799
1799
|
return e[n] = !1, s;
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function lo(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
1802
1802
|
let { transition: r, transitionEnd: o, ...a } = e;
|
|
1803
|
-
const
|
|
1804
|
-
r = r ?
|
|
1805
|
-
const u = r == null ? void 0 : r.reduceMotion,
|
|
1803
|
+
const l = t.getDefaultTransition();
|
|
1804
|
+
r = r ? so(r, l) : l;
|
|
1805
|
+
const u = r == null ? void 0 : r.reduceMotion, c = r == null ? void 0 : r.skipAnimations;
|
|
1806
1806
|
s && (r = s);
|
|
1807
1807
|
const h = [], f = i && t.animationState && t.animationState.getState()[i], d = r == null ? void 0 : r.path;
|
|
1808
1808
|
d && d.animateVisualElement(t, a, r, n, h);
|
|
@@ -1812,30 +1812,30 @@ function ao(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
1812
1812
|
continue;
|
|
1813
1813
|
const y = {
|
|
1814
1814
|
delay: n,
|
|
1815
|
-
...
|
|
1815
|
+
...In(r || {}, p)
|
|
1816
1816
|
};
|
|
1817
|
-
|
|
1818
|
-
const
|
|
1819
|
-
if (
|
|
1820
|
-
|
|
1817
|
+
c && (y.skipAnimations = !0);
|
|
1818
|
+
const w = g.get();
|
|
1819
|
+
if (w !== void 0 && !g.isAnimating() && !Array.isArray(m) && m === w && !y.velocity) {
|
|
1820
|
+
k.update(() => g.set(m));
|
|
1821
1821
|
continue;
|
|
1822
1822
|
}
|
|
1823
1823
|
let v = !1;
|
|
1824
1824
|
if (window.MotionHandoffAnimation) {
|
|
1825
|
-
const C =
|
|
1825
|
+
const C = ao(t);
|
|
1826
1826
|
if (C) {
|
|
1827
|
-
const A = window.MotionHandoffAnimation(C, p,
|
|
1827
|
+
const A = window.MotionHandoffAnimation(C, p, k);
|
|
1828
1828
|
A !== null && (y.startTime = A, v = !0);
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
1831
|
on(t, p);
|
|
1832
|
-
const
|
|
1833
|
-
g.start(
|
|
1832
|
+
const x = u ?? t.shouldReduceMotion;
|
|
1833
|
+
g.start(Bn(p, g, m, x && oo.has(p) ? { type: !1 } : y, t, v));
|
|
1834
1834
|
const b = g.animation;
|
|
1835
1835
|
b && h.push(b);
|
|
1836
1836
|
}
|
|
1837
1837
|
if (o) {
|
|
1838
|
-
const p = () =>
|
|
1838
|
+
const p = () => k.update(() => {
|
|
1839
1839
|
o && ul(t, o);
|
|
1840
1840
|
});
|
|
1841
1841
|
h.length ? Promise.all(h).then(p) : p();
|
|
@@ -1843,27 +1843,27 @@ function ao(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
1843
1843
|
return h;
|
|
1844
1844
|
}
|
|
1845
1845
|
function rn(t, e, n = {}) {
|
|
1846
|
-
var
|
|
1847
|
-
const s = wt(t, e, n.type === "exit" ? (
|
|
1846
|
+
var l;
|
|
1847
|
+
const s = wt(t, e, n.type === "exit" ? (l = t.presenceContext) == null ? void 0 : l.custom : void 0);
|
|
1848
1848
|
let { transition: i = t.getDefaultTransition() || {} } = s || {};
|
|
1849
1849
|
n.transitionOverride && (i = n.transitionOverride);
|
|
1850
|
-
const r = s ? () => Promise.all(
|
|
1851
|
-
const { delayChildren:
|
|
1852
|
-
return pl(t, e, u,
|
|
1850
|
+
const r = s ? () => Promise.all(lo(t, s, n)) : () => Promise.resolve(), o = t.variantChildren && t.variantChildren.size ? (u = 0) => {
|
|
1851
|
+
const { delayChildren: c = 0, staggerChildren: h, staggerDirection: f } = i;
|
|
1852
|
+
return pl(t, e, u, c, h, f, n);
|
|
1853
1853
|
} : () => Promise.resolve(), { when: a } = i;
|
|
1854
1854
|
if (a) {
|
|
1855
|
-
const [u,
|
|
1856
|
-
return u().then(() =>
|
|
1855
|
+
const [u, c] = a === "beforeChildren" ? [r, o] : [o, r];
|
|
1856
|
+
return u().then(() => c());
|
|
1857
1857
|
} else
|
|
1858
1858
|
return Promise.all([r(), o(n.delay)]);
|
|
1859
1859
|
}
|
|
1860
1860
|
function pl(t, e, n = 0, s = 0, i = 0, r = 1, o) {
|
|
1861
1861
|
const a = [];
|
|
1862
|
-
for (const
|
|
1863
|
-
|
|
1862
|
+
for (const l of t.variantChildren)
|
|
1863
|
+
l.notify("AnimationStart", e), a.push(rn(l, e, {
|
|
1864
1864
|
...o,
|
|
1865
|
-
delay: n + (typeof s == "function" ? 0 : s) +
|
|
1866
|
-
}).then(() =>
|
|
1865
|
+
delay: n + (typeof s == "function" ? 0 : s) + no(t.variantChildren, l, s, i, r)
|
|
1866
|
+
}).then(() => l.notify("AnimationComplete", e)));
|
|
1867
1867
|
return Promise.all(a);
|
|
1868
1868
|
}
|
|
1869
1869
|
function ml(t, e, n = {}) {
|
|
@@ -1876,7 +1876,7 @@ function ml(t, e, n = {}) {
|
|
|
1876
1876
|
s = rn(t, e, n);
|
|
1877
1877
|
else {
|
|
1878
1878
|
const i = typeof e == "function" ? wt(t, e, n.custom) : e;
|
|
1879
|
-
s = Promise.all(
|
|
1879
|
+
s = Promise.all(lo(t, i, n));
|
|
1880
1880
|
}
|
|
1881
1881
|
return s.then(() => {
|
|
1882
1882
|
t.notify("AnimationComplete", e);
|
|
@@ -1885,16 +1885,16 @@ function ml(t, e, n = {}) {
|
|
|
1885
1885
|
const gl = {
|
|
1886
1886
|
test: (t) => t === "auto",
|
|
1887
1887
|
parse: (t) => t
|
|
1888
|
-
},
|
|
1888
|
+
}, co = (t) => (e) => e.test(t), uo = [Rt, T, it, rt, Wr, Ur, gl], ms = (t) => uo.find(co(t));
|
|
1889
1889
|
function yl(t) {
|
|
1890
|
-
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" ||
|
|
1890
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Ti(t) : !0;
|
|
1891
1891
|
}
|
|
1892
1892
|
const vl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1893
1893
|
function xl(t) {
|
|
1894
1894
|
const [e, n] = t.slice(0, -1).split("(");
|
|
1895
1895
|
if (e === "drop-shadow")
|
|
1896
1896
|
return t;
|
|
1897
|
-
const [s] = n.match(
|
|
1897
|
+
const [s] = n.match(Mn) || [];
|
|
1898
1898
|
if (!s)
|
|
1899
1899
|
return t;
|
|
1900
1900
|
const i = n.replace(s, "");
|
|
@@ -1913,7 +1913,7 @@ const wl = /\b([a-z-]*)\(.*?\)/gu, an = {
|
|
|
1913
1913
|
const e = tt.parse(t);
|
|
1914
1914
|
return tt.createTransformer(t)(e.map((s) => typeof s == "number" ? 0 : typeof s == "object" ? { ...s, alpha: 1 } : s));
|
|
1915
1915
|
}
|
|
1916
|
-
},
|
|
1916
|
+
}, gs = {
|
|
1917
1917
|
...Rt,
|
|
1918
1918
|
transform: Math.round
|
|
1919
1919
|
}, Tl = {
|
|
@@ -1943,9 +1943,9 @@ const wl = /\b([a-z-]*)\(.*?\)/gu, an = {
|
|
|
1943
1943
|
z: T,
|
|
1944
1944
|
perspective: T,
|
|
1945
1945
|
transformPerspective: T,
|
|
1946
|
-
opacity:
|
|
1947
|
-
originX:
|
|
1948
|
-
originY:
|
|
1946
|
+
opacity: zt,
|
|
1947
|
+
originX: ns,
|
|
1948
|
+
originY: ns,
|
|
1949
1949
|
originZ: T
|
|
1950
1950
|
}, ye = {
|
|
1951
1951
|
// Border props
|
|
@@ -2004,11 +2004,11 @@ const wl = /\b([a-z-]*)\(.*?\)/gu, an = {
|
|
|
2004
2004
|
backgroundPositionX: T,
|
|
2005
2005
|
backgroundPositionY: T,
|
|
2006
2006
|
...Tl,
|
|
2007
|
-
zIndex:
|
|
2007
|
+
zIndex: gs,
|
|
2008
2008
|
// SVG
|
|
2009
|
-
fillOpacity:
|
|
2010
|
-
strokeOpacity:
|
|
2011
|
-
numOctaves:
|
|
2009
|
+
fillOpacity: zt,
|
|
2010
|
+
strokeOpacity: zt,
|
|
2011
|
+
numOctaves: gs
|
|
2012
2012
|
}, Pl = {
|
|
2013
2013
|
...ye,
|
|
2014
2014
|
// Color props
|
|
@@ -2027,9 +2027,9 @@ const wl = /\b([a-z-]*)\(.*?\)/gu, an = {
|
|
|
2027
2027
|
WebkitFilter: an,
|
|
2028
2028
|
mask: ln,
|
|
2029
2029
|
WebkitMask: ln
|
|
2030
|
-
},
|
|
2031
|
-
function
|
|
2032
|
-
let n =
|
|
2030
|
+
}, ho = (t) => Pl[t], bl = /* @__PURE__ */ new Set([an, ln]);
|
|
2031
|
+
function fo(t, e) {
|
|
2032
|
+
let n = ho(t);
|
|
2033
2033
|
return bl.has(n) || (n = tt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2034
2034
|
}
|
|
2035
2035
|
const Sl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
@@ -2041,7 +2041,7 @@ function Al(t, e, n) {
|
|
|
2041
2041
|
}
|
|
2042
2042
|
if (i && n)
|
|
2043
2043
|
for (const r of e)
|
|
2044
|
-
t[r] =
|
|
2044
|
+
t[r] = fo(n, i);
|
|
2045
2045
|
}
|
|
2046
2046
|
class Vl extends Ln {
|
|
2047
2047
|
constructor(e, n, s, i, r) {
|
|
@@ -2052,25 +2052,25 @@ class Vl extends Ln {
|
|
|
2052
2052
|
if (!n || !n.current)
|
|
2053
2053
|
return;
|
|
2054
2054
|
super.readKeyframes();
|
|
2055
|
-
for (let
|
|
2056
|
-
let h = e[
|
|
2057
|
-
if (typeof h == "string" && (h = h.trim(),
|
|
2058
|
-
const f =
|
|
2059
|
-
f !== void 0 && (e[
|
|
2055
|
+
for (let c = 0; c < e.length; c++) {
|
|
2056
|
+
let h = e[c];
|
|
2057
|
+
if (typeof h == "string" && (h = h.trim(), Cn(h))) {
|
|
2058
|
+
const f = io(h, n.current);
|
|
2059
|
+
f !== void 0 && (e[c] = f), c === e.length - 1 && (this.finalKeyframe = h);
|
|
2060
2060
|
}
|
|
2061
2061
|
}
|
|
2062
|
-
if (this.resolveNoneKeyframes(), !
|
|
2062
|
+
if (this.resolveNoneKeyframes(), !oo.has(s) || e.length !== 2)
|
|
2063
2063
|
return;
|
|
2064
|
-
const [i, r] = e, o =
|
|
2065
|
-
if (
|
|
2064
|
+
const [i, r] = e, o = ms(i), a = ms(r), l = es(i), u = es(r);
|
|
2065
|
+
if (l !== u && ut[s]) {
|
|
2066
2066
|
this.needsMeasurement = !0;
|
|
2067
2067
|
return;
|
|
2068
2068
|
}
|
|
2069
2069
|
if (o !== a)
|
|
2070
|
-
if (
|
|
2071
|
-
for (let
|
|
2072
|
-
const h = e[
|
|
2073
|
-
typeof h == "string" && (e[
|
|
2070
|
+
if (us(o) && us(a))
|
|
2071
|
+
for (let c = 0; c < e.length; c++) {
|
|
2072
|
+
const h = e[c];
|
|
2073
|
+
typeof h == "string" && (e[c] = parseFloat(h));
|
|
2074
2074
|
}
|
|
2075
2075
|
else ut[s] && (this.needsMeasurement = !0);
|
|
2076
2076
|
}
|
|
@@ -2096,12 +2096,18 @@ class Vl extends Ln {
|
|
|
2096
2096
|
const i = e.getValue(n);
|
|
2097
2097
|
i && i.jump(this.measuredOrigin, !1);
|
|
2098
2098
|
const r = s.length - 1, o = s[r];
|
|
2099
|
-
s[r] = ut[n](e.measureViewportBox(), window.getComputedStyle(e.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([
|
|
2100
|
-
e.getValue(
|
|
2099
|
+
s[r] = ut[n](e.measureViewportBox(), window.getComputedStyle(e.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([l, u]) => {
|
|
2100
|
+
e.getValue(l).set(u);
|
|
2101
2101
|
}), this.resolveNoneKeyframes();
|
|
2102
2102
|
}
|
|
2103
2103
|
}
|
|
2104
|
-
|
|
2104
|
+
const jn = [
|
|
2105
|
+
"borderTopLeftRadius",
|
|
2106
|
+
"borderTopRightRadius",
|
|
2107
|
+
"borderBottomRightRadius",
|
|
2108
|
+
"borderBottomLeftRadius"
|
|
2109
|
+
];
|
|
2110
|
+
function po(t, e, n) {
|
|
2105
2111
|
if (t == null)
|
|
2106
2112
|
return [];
|
|
2107
2113
|
if (t instanceof EventTarget)
|
|
@@ -2115,13 +2121,13 @@ function fo(t, e, n) {
|
|
|
2115
2121
|
}
|
|
2116
2122
|
const cn = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
|
|
2117
2123
|
function oe(t) {
|
|
2118
|
-
return
|
|
2124
|
+
return wi(t) && "offsetHeight" in t && !("ownerSVGElement" in t);
|
|
2119
2125
|
}
|
|
2120
|
-
const { schedule:
|
|
2126
|
+
const { schedule: Nn } = /* @__PURE__ */ Ii(queueMicrotask, !1), Q = {
|
|
2121
2127
|
x: !1,
|
|
2122
2128
|
y: !1
|
|
2123
2129
|
};
|
|
2124
|
-
function
|
|
2130
|
+
function mo() {
|
|
2125
2131
|
return Q.x || Q.y;
|
|
2126
2132
|
}
|
|
2127
2133
|
function Cl(t) {
|
|
@@ -2131,8 +2137,8 @@ function Cl(t) {
|
|
|
2131
2137
|
Q.x = Q.y = !1;
|
|
2132
2138
|
});
|
|
2133
2139
|
}
|
|
2134
|
-
function
|
|
2135
|
-
const n =
|
|
2140
|
+
function go(t, e) {
|
|
2141
|
+
const n = po(t), s = new AbortController(), i = {
|
|
2136
2142
|
passive: !0,
|
|
2137
2143
|
...e,
|
|
2138
2144
|
signal: s.signal
|
|
@@ -2140,24 +2146,24 @@ function mo(t, e) {
|
|
|
2140
2146
|
return [n, i, () => s.abort()];
|
|
2141
2147
|
}
|
|
2142
2148
|
function Ml(t) {
|
|
2143
|
-
return !(t.pointerType === "touch" ||
|
|
2149
|
+
return !(t.pointerType === "touch" || mo());
|
|
2144
2150
|
}
|
|
2145
2151
|
function Dl(t, e, n = {}) {
|
|
2146
|
-
const [s, i, r] =
|
|
2152
|
+
const [s, i, r] = go(t, n);
|
|
2147
2153
|
return s.forEach((o) => {
|
|
2148
|
-
let a = !1,
|
|
2149
|
-
const
|
|
2154
|
+
let a = !1, l = !1, u;
|
|
2155
|
+
const c = () => {
|
|
2150
2156
|
o.removeEventListener("pointerleave", p);
|
|
2151
2157
|
}, h = (m) => {
|
|
2152
|
-
u && (u(m), u = void 0),
|
|
2158
|
+
u && (u(m), u = void 0), c();
|
|
2153
2159
|
}, f = (m) => {
|
|
2154
|
-
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f),
|
|
2160
|
+
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), l && (l = !1, h(m));
|
|
2155
2161
|
}, d = () => {
|
|
2156
2162
|
a = !0, window.addEventListener("pointerup", f, i), window.addEventListener("pointercancel", f, i);
|
|
2157
2163
|
}, p = (m) => {
|
|
2158
2164
|
if (m.pointerType !== "touch") {
|
|
2159
2165
|
if (a) {
|
|
2160
|
-
|
|
2166
|
+
l = !0;
|
|
2161
2167
|
return;
|
|
2162
2168
|
}
|
|
2163
2169
|
h(m);
|
|
@@ -2165,14 +2171,14 @@ function Dl(t, e, n = {}) {
|
|
|
2165
2171
|
}, g = (m) => {
|
|
2166
2172
|
if (!Ml(m))
|
|
2167
2173
|
return;
|
|
2168
|
-
|
|
2174
|
+
l = !1;
|
|
2169
2175
|
const y = e(o, m);
|
|
2170
2176
|
typeof y == "function" && (u = y, o.addEventListener("pointerleave", p, i));
|
|
2171
2177
|
};
|
|
2172
2178
|
o.addEventListener("pointerenter", g, i), o.addEventListener("pointerdown", d, i);
|
|
2173
2179
|
}), r;
|
|
2174
2180
|
}
|
|
2175
|
-
const
|
|
2181
|
+
const yo = (t, e) => e ? t === e ? !0 : yo(t, e.parentElement) : !1, Un = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, El = /* @__PURE__ */ new Set([
|
|
2176
2182
|
"BUTTON",
|
|
2177
2183
|
"INPUT",
|
|
2178
2184
|
"SELECT",
|
|
@@ -2182,12 +2188,12 @@ const go = (t, e) => e ? t === e ? !0 : go(t, e.parentElement) : !1, jn = (t) =>
|
|
|
2182
2188
|
function Rl(t) {
|
|
2183
2189
|
return El.has(t.tagName) || t.isContentEditable === !0;
|
|
2184
2190
|
}
|
|
2185
|
-
const
|
|
2186
|
-
function
|
|
2187
|
-
return
|
|
2191
|
+
const kl = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA"]);
|
|
2192
|
+
function Ll(t) {
|
|
2193
|
+
return kl.has(t.tagName) || t.isContentEditable === !0;
|
|
2188
2194
|
}
|
|
2189
2195
|
const re = /* @__PURE__ */ new WeakSet();
|
|
2190
|
-
function
|
|
2196
|
+
function ys(t) {
|
|
2191
2197
|
return (e) => {
|
|
2192
2198
|
e.key === "Enter" && t(e);
|
|
2193
2199
|
};
|
|
@@ -2199,46 +2205,46 @@ const Il = (t, e) => {
|
|
|
2199
2205
|
const n = t.currentTarget;
|
|
2200
2206
|
if (!n)
|
|
2201
2207
|
return;
|
|
2202
|
-
const s =
|
|
2208
|
+
const s = ys(() => {
|
|
2203
2209
|
if (re.has(n))
|
|
2204
2210
|
return;
|
|
2205
2211
|
Ie(n, "down");
|
|
2206
|
-
const i =
|
|
2212
|
+
const i = ys(() => {
|
|
2207
2213
|
Ie(n, "up");
|
|
2208
2214
|
}), r = () => Ie(n, "cancel");
|
|
2209
2215
|
n.addEventListener("keyup", i, e), n.addEventListener("blur", r, e);
|
|
2210
2216
|
});
|
|
2211
2217
|
n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
|
|
2212
2218
|
};
|
|
2213
|
-
function
|
|
2214
|
-
return
|
|
2219
|
+
function vs(t) {
|
|
2220
|
+
return Un(t) && !mo();
|
|
2215
2221
|
}
|
|
2216
|
-
const
|
|
2222
|
+
const xs = /* @__PURE__ */ new WeakSet();
|
|
2217
2223
|
function Bl(t, e, n = {}) {
|
|
2218
|
-
const [s, i, r] =
|
|
2219
|
-
const
|
|
2220
|
-
if (!
|
|
2224
|
+
const [s, i, r] = go(t, n), o = (a) => {
|
|
2225
|
+
const l = a.currentTarget;
|
|
2226
|
+
if (!vs(a) || xs.has(a))
|
|
2221
2227
|
return;
|
|
2222
|
-
re.add(
|
|
2223
|
-
const u = e(
|
|
2224
|
-
window.removeEventListener("pointerup",
|
|
2225
|
-
},
|
|
2226
|
-
|
|
2227
|
-
},
|
|
2228
|
-
|
|
2228
|
+
re.add(l), n.stopPropagation && xs.add(a);
|
|
2229
|
+
const u = e(l, a), c = { ...i, capture: !0 }, h = (p, g) => {
|
|
2230
|
+
window.removeEventListener("pointerup", f, c), window.removeEventListener("pointercancel", d, c), re.has(l) && re.delete(l), vs(p) && typeof u == "function" && u(p, { success: g });
|
|
2231
|
+
}, f = (p) => {
|
|
2232
|
+
h(p, l === window || l === document || n.useGlobalTarget || yo(l, p.target));
|
|
2233
|
+
}, d = (p) => {
|
|
2234
|
+
h(p, !1);
|
|
2229
2235
|
};
|
|
2230
|
-
window.addEventListener("pointerup",
|
|
2236
|
+
window.addEventListener("pointerup", f, c), window.addEventListener("pointercancel", d, c);
|
|
2231
2237
|
};
|
|
2232
2238
|
return s.forEach((a) => {
|
|
2233
2239
|
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), oe(a) && (a.addEventListener("focus", (u) => Il(u, i)), !Rl(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
2234
2240
|
}), r;
|
|
2235
2241
|
}
|
|
2236
|
-
function
|
|
2237
|
-
return
|
|
2242
|
+
function Wn(t) {
|
|
2243
|
+
return wi(t) && "ownerSVGElement" in t;
|
|
2238
2244
|
}
|
|
2239
2245
|
const ae = /* @__PURE__ */ new WeakMap();
|
|
2240
2246
|
let ct;
|
|
2241
|
-
const
|
|
2247
|
+
const vo = (t, e, n) => (s, i) => i && i[0] ? i[0][t + "Size"] : Wn(s) && "getBBox" in s ? s.getBBox()[e] : s[n], Fl = /* @__PURE__ */ vo("inline", "width", "offsetWidth"), Ol = /* @__PURE__ */ vo("block", "height", "offsetHeight");
|
|
2242
2248
|
function jl({ target: t, borderBoxSize: e }) {
|
|
2243
2249
|
var n;
|
|
2244
2250
|
(n = ae.get(t)) == null || n.forEach((s) => {
|
|
@@ -2260,7 +2266,7 @@ function Ul() {
|
|
|
2260
2266
|
}
|
|
2261
2267
|
function Wl(t, e) {
|
|
2262
2268
|
ct || Ul();
|
|
2263
|
-
const n =
|
|
2269
|
+
const n = po(t);
|
|
2264
2270
|
return n.forEach((s) => {
|
|
2265
2271
|
let i = ae.get(s);
|
|
2266
2272
|
i || (i = /* @__PURE__ */ new Set(), ae.set(s, i)), i.add(e), ct == null || ct.observe(s);
|
|
@@ -2286,36 +2292,36 @@ function $l() {
|
|
|
2286
2292
|
le.forEach((e) => e(t));
|
|
2287
2293
|
}, window.addEventListener("resize", At);
|
|
2288
2294
|
}
|
|
2289
|
-
function
|
|
2295
|
+
function zl(t) {
|
|
2290
2296
|
return le.add(t), At || $l(), () => {
|
|
2291
2297
|
le.delete(t), !le.size && typeof At == "function" && (window.removeEventListener("resize", At), At = void 0);
|
|
2292
2298
|
};
|
|
2293
2299
|
}
|
|
2294
|
-
function
|
|
2295
|
-
return typeof t == "function" ?
|
|
2300
|
+
function ws(t, e) {
|
|
2301
|
+
return typeof t == "function" ? zl(t) : Wl(t, e);
|
|
2296
2302
|
}
|
|
2297
|
-
function
|
|
2298
|
-
return
|
|
2303
|
+
function Kl(t) {
|
|
2304
|
+
return Wn(t) && t.tagName === "svg";
|
|
2299
2305
|
}
|
|
2300
|
-
const Gl = [...
|
|
2306
|
+
const Gl = [...uo, B, tt], Hl = (t) => Gl.find(co(t)), Ts = () => ({
|
|
2301
2307
|
translate: 0,
|
|
2302
2308
|
scale: 1,
|
|
2303
2309
|
origin: 0,
|
|
2304
2310
|
originPoint: 0
|
|
2305
2311
|
}), Vt = () => ({
|
|
2306
|
-
x:
|
|
2307
|
-
y:
|
|
2308
|
-
}),
|
|
2309
|
-
x:
|
|
2310
|
-
y:
|
|
2312
|
+
x: Ts(),
|
|
2313
|
+
y: Ts()
|
|
2314
|
+
}), Ps = () => ({ min: 0, max: 0 }), j = () => ({
|
|
2315
|
+
x: Ps(),
|
|
2316
|
+
y: Ps()
|
|
2311
2317
|
}), _l = /* @__PURE__ */ new WeakMap();
|
|
2312
2318
|
function Ae(t) {
|
|
2313
2319
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
2314
2320
|
}
|
|
2315
|
-
function
|
|
2321
|
+
function Kt(t) {
|
|
2316
2322
|
return typeof t == "string" || Array.isArray(t);
|
|
2317
2323
|
}
|
|
2318
|
-
const
|
|
2324
|
+
const $n = [
|
|
2319
2325
|
"animate",
|
|
2320
2326
|
"whileInView",
|
|
2321
2327
|
"whileFocus",
|
|
@@ -2323,11 +2329,11 @@ const Un = [
|
|
|
2323
2329
|
"whileTap",
|
|
2324
2330
|
"whileDrag",
|
|
2325
2331
|
"exit"
|
|
2326
|
-
],
|
|
2332
|
+
], zn = ["initial", ...$n];
|
|
2327
2333
|
function Ve(t) {
|
|
2328
|
-
return Ae(t.animate) ||
|
|
2334
|
+
return Ae(t.animate) || zn.some((e) => Kt(t[e]));
|
|
2329
2335
|
}
|
|
2330
|
-
function
|
|
2336
|
+
function xo(t) {
|
|
2331
2337
|
return !!(Ve(t) || t.variants);
|
|
2332
2338
|
}
|
|
2333
2339
|
function Yl(t, e, n) {
|
|
@@ -2350,16 +2356,16 @@ function Yl(t, e, n) {
|
|
|
2350
2356
|
e[s] === void 0 && t.removeValue(s);
|
|
2351
2357
|
return e;
|
|
2352
2358
|
}
|
|
2353
|
-
const un = { current: null },
|
|
2359
|
+
const un = { current: null }, wo = { current: !1 }, Xl = typeof window < "u";
|
|
2354
2360
|
function ql() {
|
|
2355
|
-
if (
|
|
2361
|
+
if (wo.current = !0, !!Xl)
|
|
2356
2362
|
if (window.matchMedia) {
|
|
2357
2363
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => un.current = t.matches;
|
|
2358
2364
|
t.addEventListener("change", e), e();
|
|
2359
2365
|
} else
|
|
2360
2366
|
un.current = !1;
|
|
2361
2367
|
}
|
|
2362
|
-
const
|
|
2368
|
+
const bs = [
|
|
2363
2369
|
"AnimationStart",
|
|
2364
2370
|
"AnimationComplete",
|
|
2365
2371
|
"Update",
|
|
@@ -2369,7 +2375,7 @@ const Ts = [
|
|
|
2369
2375
|
"LayoutAnimationComplete"
|
|
2370
2376
|
];
|
|
2371
2377
|
let ve = {};
|
|
2372
|
-
function
|
|
2378
|
+
function To(t) {
|
|
2373
2379
|
ve = t;
|
|
2374
2380
|
}
|
|
2375
2381
|
function Zl() {
|
|
@@ -2386,15 +2392,15 @@ class Jl {
|
|
|
2386
2392
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
2387
2393
|
return {};
|
|
2388
2394
|
}
|
|
2389
|
-
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, skipAnimations: r, blockInitialAnimation: o, visualState: a },
|
|
2395
|
+
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, skipAnimations: r, blockInitialAnimation: o, visualState: a }, l = {}) {
|
|
2390
2396
|
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Ln, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2391
2397
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2392
2398
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2393
|
-
const d =
|
|
2394
|
-
this.renderScheduledAt < d && (this.renderScheduledAt = d,
|
|
2399
|
+
const d = z.now();
|
|
2400
|
+
this.renderScheduledAt < d && (this.renderScheduledAt = d, k.render(this.render, !1, !0));
|
|
2395
2401
|
};
|
|
2396
|
-
const { latestValues: u, renderState:
|
|
2397
|
-
this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState =
|
|
2402
|
+
const { latestValues: u, renderState: c } = a;
|
|
2403
|
+
this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = c, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.skipAnimationsConfig = r, this.options = l, this.blockInitialAnimation = !!o, this.isControllingVariants = Ve(n), this.isVariantNode = xo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
2398
2404
|
const { willChange: h, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2399
2405
|
for (const d in f) {
|
|
2400
2406
|
const p = f[d];
|
|
@@ -2406,7 +2412,7 @@ class Jl {
|
|
|
2406
2412
|
if (this.hasBeenMounted)
|
|
2407
2413
|
for (const i in this.initialValues)
|
|
2408
2414
|
(n = this.values.get(i)) == null || n.jump(this.initialValues[i]), this.latestValues[i] = this.initialValues[i];
|
|
2409
|
-
this.current = e, _l.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, r) => this.bindToMotionValue(r, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (
|
|
2415
|
+
this.current = e, _l.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, r) => this.bindToMotionValue(r, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (wo.current || ql(), this.shouldReduceMotion = un.current), process.env.NODE_ENV !== "production" && Sn(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, (s = this.parent) == null || s.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
2410
2416
|
}
|
|
2411
2417
|
unmount() {
|
|
2412
2418
|
var e;
|
|
@@ -2426,24 +2432,24 @@ class Jl {
|
|
|
2426
2432
|
this.children.delete(e), this.enteringChildren && this.enteringChildren.delete(e);
|
|
2427
2433
|
}
|
|
2428
2434
|
bindToMotionValue(e, n) {
|
|
2429
|
-
if (this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)(), n.accelerate &&
|
|
2430
|
-
const { factory: o, keyframes: a, times:
|
|
2435
|
+
if (this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)(), n.accelerate && eo.has(e) && this.current instanceof HTMLElement) {
|
|
2436
|
+
const { factory: o, keyframes: a, times: l, ease: u, duration: c } = n.accelerate, h = new Qi({
|
|
2431
2437
|
element: this.current,
|
|
2432
2438
|
name: e,
|
|
2433
2439
|
keyframes: a,
|
|
2434
|
-
times:
|
|
2440
|
+
times: l,
|
|
2435
2441
|
ease: u,
|
|
2436
|
-
duration: /* @__PURE__ */ H(
|
|
2442
|
+
duration: /* @__PURE__ */ H(c)
|
|
2437
2443
|
}), f = o(h);
|
|
2438
2444
|
this.valueSubscriptions.set(e, () => {
|
|
2439
2445
|
f(), h.cancel();
|
|
2440
2446
|
});
|
|
2441
2447
|
return;
|
|
2442
2448
|
}
|
|
2443
|
-
const s =
|
|
2449
|
+
const s = Lt.has(e);
|
|
2444
2450
|
s && this.onBindTransform && this.onBindTransform();
|
|
2445
2451
|
const i = n.on("change", (o) => {
|
|
2446
|
-
this.latestValues[e] = o, this.props.onUpdate &&
|
|
2452
|
+
this.latestValues[e] = o, this.props.onUpdate && k.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
2447
2453
|
});
|
|
2448
2454
|
let r;
|
|
2449
2455
|
typeof window < "u" && window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
|
|
@@ -2489,8 +2495,8 @@ class Jl {
|
|
|
2489
2495
|
*/
|
|
2490
2496
|
update(e, n) {
|
|
2491
2497
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
2492
|
-
for (let s = 0; s <
|
|
2493
|
-
const i =
|
|
2498
|
+
for (let s = 0; s < bs.length; s++) {
|
|
2499
|
+
const i = bs[s];
|
|
2494
2500
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
2495
2501
|
const r = "on" + i, o = e[r];
|
|
2496
2502
|
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
@@ -2560,7 +2566,7 @@ class Jl {
|
|
|
2560
2566
|
*/
|
|
2561
2567
|
readValue(e, n) {
|
|
2562
2568
|
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
2563
|
-
return s != null && (typeof s == "string" && (
|
|
2569
|
+
return s != null && (typeof s == "string" && (xi(s) || Ti(s)) ? s = parseFloat(s) : !Hl(s) && tt.test(n) && (s = fo(e, n)), this.setBaseTarget(e, U(s) ? s.get() : s)), U(s) ? s.get() : s;
|
|
2564
2570
|
}
|
|
2565
2571
|
/**
|
|
2566
2572
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2578,7 +2584,7 @@ class Jl {
|
|
|
2578
2584
|
const { initial: n } = this.props;
|
|
2579
2585
|
let s;
|
|
2580
2586
|
if (typeof n == "string" || typeof n == "object") {
|
|
2581
|
-
const o =
|
|
2587
|
+
const o = Fn(this.props, n, (r = this.presenceContext) == null ? void 0 : r.custom);
|
|
2582
2588
|
o && (s = o[e]);
|
|
2583
2589
|
}
|
|
2584
2590
|
if (n && s !== void 0)
|
|
@@ -2587,16 +2593,16 @@ class Jl {
|
|
|
2587
2593
|
return i !== void 0 && !U(i) ? i : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
2588
2594
|
}
|
|
2589
2595
|
on(e, n) {
|
|
2590
|
-
return this.events[e] || (this.events[e] = new
|
|
2596
|
+
return this.events[e] || (this.events[e] = new bn()), this.events[e].add(n);
|
|
2591
2597
|
}
|
|
2592
2598
|
notify(e, ...n) {
|
|
2593
2599
|
this.events[e] && this.events[e].notify(...n);
|
|
2594
2600
|
}
|
|
2595
2601
|
scheduleRenderMicrotask() {
|
|
2596
|
-
|
|
2602
|
+
Nn.render(this.render);
|
|
2597
2603
|
}
|
|
2598
2604
|
}
|
|
2599
|
-
class
|
|
2605
|
+
class Po extends Jl {
|
|
2600
2606
|
constructor() {
|
|
2601
2607
|
super(...arguments), this.KeyframeResolver = Vl;
|
|
2602
2608
|
}
|
|
@@ -2625,7 +2631,7 @@ class dt {
|
|
|
2625
2631
|
update() {
|
|
2626
2632
|
}
|
|
2627
2633
|
}
|
|
2628
|
-
function
|
|
2634
|
+
function bo({ top: t, left: e, right: n, bottom: s }) {
|
|
2629
2635
|
return {
|
|
2630
2636
|
x: { min: e, max: n },
|
|
2631
2637
|
y: { min: t, max: s }
|
|
@@ -2652,28 +2658,28 @@ function hn({ scale: t, scaleX: e, scaleY: n }) {
|
|
|
2652
2658
|
return !Be(t) || !Be(e) || !Be(n);
|
|
2653
2659
|
}
|
|
2654
2660
|
function gt(t) {
|
|
2655
|
-
return hn(t) ||
|
|
2661
|
+
return hn(t) || So(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
2656
2662
|
}
|
|
2657
|
-
function
|
|
2658
|
-
return
|
|
2663
|
+
function So(t) {
|
|
2664
|
+
return Ss(t.x) || Ss(t.y);
|
|
2659
2665
|
}
|
|
2660
|
-
function
|
|
2666
|
+
function Ss(t) {
|
|
2661
2667
|
return t && t !== "0%";
|
|
2662
2668
|
}
|
|
2663
2669
|
function xe(t, e, n) {
|
|
2664
2670
|
const s = t - n, i = e * s;
|
|
2665
2671
|
return n + i;
|
|
2666
2672
|
}
|
|
2667
|
-
function
|
|
2673
|
+
function As(t, e, n, s, i) {
|
|
2668
2674
|
return i !== void 0 && (t = xe(t, i, s)), xe(t, n, s) + e;
|
|
2669
2675
|
}
|
|
2670
2676
|
function fn(t, e = 0, n = 1, s, i) {
|
|
2671
|
-
t.min =
|
|
2677
|
+
t.min = As(t.min, e, n, s, i), t.max = As(t.max, e, n, s, i);
|
|
2672
2678
|
}
|
|
2673
|
-
function
|
|
2679
|
+
function Ao(t, { x: e, y: n }) {
|
|
2674
2680
|
fn(t.x, e.translate, e.scale, e.originPoint), fn(t.y, n.translate, n.scale, n.originPoint);
|
|
2675
2681
|
}
|
|
2676
|
-
const
|
|
2682
|
+
const Vs = 0.999999999999, Cs = 1.0000000000001;
|
|
2677
2683
|
function ec(t, e, n, s = !1) {
|
|
2678
2684
|
var a;
|
|
2679
2685
|
const i = n.length;
|
|
@@ -2681,32 +2687,32 @@ function ec(t, e, n, s = !1) {
|
|
|
2681
2687
|
return;
|
|
2682
2688
|
e.x = e.y = 1;
|
|
2683
2689
|
let r, o;
|
|
2684
|
-
for (let
|
|
2685
|
-
r = n[
|
|
2690
|
+
for (let l = 0; l < i; l++) {
|
|
2691
|
+
r = n[l], o = r.projectionDelta;
|
|
2686
2692
|
const { visualElement: u } = r.options;
|
|
2687
|
-
u && u.props.style && u.props.style.display === "contents" || (s && r.options.layoutScroll && r.scroll && r !== r.root && (st(t.x, -r.scroll.offset.x), st(t.y, -r.scroll.offset.y)), o && (e.x *= o.x.scale, e.y *= o.y.scale,
|
|
2693
|
+
u && u.props.style && u.props.style.display === "contents" || (s && r.options.layoutScroll && r.scroll && r !== r.root && (st(t.x, -r.scroll.offset.x), st(t.y, -r.scroll.offset.y)), o && (e.x *= o.x.scale, e.y *= o.y.scale, Ao(t, o)), s && gt(r.latestValues) && ce(t, r.latestValues, (a = r.layout) == null ? void 0 : a.layoutBox));
|
|
2688
2694
|
}
|
|
2689
|
-
e.x <
|
|
2695
|
+
e.x < Cs && e.x > Vs && (e.x = 1), e.y < Cs && e.y > Vs && (e.y = 1);
|
|
2690
2696
|
}
|
|
2691
2697
|
function st(t, e) {
|
|
2692
2698
|
t.min += e, t.max += e;
|
|
2693
2699
|
}
|
|
2694
|
-
function
|
|
2700
|
+
function Ms(t, e, n, s, i = 0.5) {
|
|
2695
2701
|
const r = R(t.min, t.max, i);
|
|
2696
2702
|
fn(t, e, n, r, s);
|
|
2697
2703
|
}
|
|
2698
|
-
function
|
|
2704
|
+
function Ds(t, e) {
|
|
2699
2705
|
return typeof t == "string" ? parseFloat(t) / 100 * (e.max - e.min) : t;
|
|
2700
2706
|
}
|
|
2701
2707
|
function ce(t, e, n) {
|
|
2702
2708
|
const s = n ?? t;
|
|
2703
|
-
|
|
2709
|
+
Ms(t.x, Ds(e.x, s.x), e.scaleX, e.scale, e.originX), Ms(t.y, Ds(e.y, s.y), e.scaleY, e.scale, e.originY);
|
|
2704
2710
|
}
|
|
2705
|
-
function
|
|
2706
|
-
return
|
|
2711
|
+
function Vo(t, e) {
|
|
2712
|
+
return bo(tc(t.getBoundingClientRect(), e));
|
|
2707
2713
|
}
|
|
2708
2714
|
function nc(t, e, n) {
|
|
2709
|
-
const s =
|
|
2715
|
+
const s = Vo(t, n), { scroll: i } = e;
|
|
2710
2716
|
return i && (st(s.x, i.offset.x), st(s.y, i.offset.y)), s;
|
|
2711
2717
|
}
|
|
2712
2718
|
const sc = {
|
|
@@ -2714,55 +2720,55 @@ const sc = {
|
|
|
2714
2720
|
y: "translateY",
|
|
2715
2721
|
z: "translateZ",
|
|
2716
2722
|
transformPerspective: "perspective"
|
|
2717
|
-
}, ic =
|
|
2723
|
+
}, ic = kt.length;
|
|
2718
2724
|
function oc(t, e, n) {
|
|
2719
2725
|
let s = "", i = !0;
|
|
2720
2726
|
for (let o = 0; o < ic; o++) {
|
|
2721
|
-
const a =
|
|
2722
|
-
if (
|
|
2727
|
+
const a = kt[o], l = t[a];
|
|
2728
|
+
if (l === void 0)
|
|
2723
2729
|
continue;
|
|
2724
2730
|
let u = !0;
|
|
2725
|
-
if (typeof
|
|
2726
|
-
u =
|
|
2731
|
+
if (typeof l == "number")
|
|
2732
|
+
u = l === (a.startsWith("scale") ? 1 : 0);
|
|
2727
2733
|
else {
|
|
2728
|
-
const
|
|
2729
|
-
u = a.startsWith("scale") ?
|
|
2734
|
+
const c = parseFloat(l);
|
|
2735
|
+
u = a.startsWith("scale") ? c === 1 : c === 0;
|
|
2730
2736
|
}
|
|
2731
2737
|
if (!u || n) {
|
|
2732
|
-
const
|
|
2738
|
+
const c = cn(l, ye[a]);
|
|
2733
2739
|
if (!u) {
|
|
2734
2740
|
i = !1;
|
|
2735
2741
|
const h = sc[a] || a;
|
|
2736
|
-
s += `${h}(${
|
|
2742
|
+
s += `${h}(${c}) `;
|
|
2737
2743
|
}
|
|
2738
|
-
n && (e[a] =
|
|
2744
|
+
n && (e[a] = c);
|
|
2739
2745
|
}
|
|
2740
2746
|
}
|
|
2741
2747
|
const r = t.pathRotation;
|
|
2742
2748
|
return r && (i = !1, s += `rotate(${cn(r, ye.pathRotation)}) `), s = s.trim(), n ? s = n(e, i ? "" : s) : i && (s = "none"), s;
|
|
2743
2749
|
}
|
|
2744
|
-
function
|
|
2750
|
+
function Kn(t, e, n) {
|
|
2745
2751
|
const { style: s, vars: i, transformOrigin: r } = t;
|
|
2746
2752
|
let o = !1, a = !1;
|
|
2747
|
-
for (const
|
|
2748
|
-
const u = e[
|
|
2749
|
-
if (
|
|
2753
|
+
for (const l in e) {
|
|
2754
|
+
const u = e[l];
|
|
2755
|
+
if (Lt.has(l)) {
|
|
2750
2756
|
o = !0;
|
|
2751
2757
|
continue;
|
|
2752
|
-
} else if (
|
|
2753
|
-
i[
|
|
2758
|
+
} else if (Fi(l)) {
|
|
2759
|
+
i[l] = u;
|
|
2754
2760
|
continue;
|
|
2755
2761
|
} else {
|
|
2756
|
-
const
|
|
2757
|
-
|
|
2762
|
+
const c = cn(u, ye[l]);
|
|
2763
|
+
l.startsWith("origin") ? (a = !0, r[l] = c) : s[l] = c;
|
|
2758
2764
|
}
|
|
2759
2765
|
}
|
|
2760
2766
|
if (e.transform || (o || n ? s.transform = oc(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2761
|
-
const { originX:
|
|
2762
|
-
s.transformOrigin = `${
|
|
2767
|
+
const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = r;
|
|
2768
|
+
s.transformOrigin = `${l} ${u} ${c}`;
|
|
2763
2769
|
}
|
|
2764
2770
|
}
|
|
2765
|
-
function
|
|
2771
|
+
function Co(t, { style: e, vars: n }, s, i) {
|
|
2766
2772
|
const r = t.style;
|
|
2767
2773
|
let o;
|
|
2768
2774
|
for (o in e)
|
|
@@ -2771,7 +2777,7 @@ function Vo(t, { style: e, vars: n }, s, i) {
|
|
|
2771
2777
|
for (o in n)
|
|
2772
2778
|
r.setProperty(o, n[o]);
|
|
2773
2779
|
}
|
|
2774
|
-
function
|
|
2780
|
+
function Es(t, e) {
|
|
2775
2781
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
2776
2782
|
}
|
|
2777
2783
|
const It = {
|
|
@@ -2783,7 +2789,7 @@ const It = {
|
|
|
2783
2789
|
t = parseFloat(t);
|
|
2784
2790
|
else
|
|
2785
2791
|
return t;
|
|
2786
|
-
const n =
|
|
2792
|
+
const n = Es(t, e.target.x), s = Es(t, e.target.y);
|
|
2787
2793
|
return `${n}% ${s}%`;
|
|
2788
2794
|
}
|
|
2789
2795
|
}, rc = {
|
|
@@ -2791,20 +2797,15 @@ const It = {
|
|
|
2791
2797
|
const s = t, i = tt.parse(t);
|
|
2792
2798
|
if (i.length > 5)
|
|
2793
2799
|
return s;
|
|
2794
|
-
const r = tt.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x,
|
|
2795
|
-
i[0 + o] /= a, i[1 + o] /=
|
|
2796
|
-
const u = R(a,
|
|
2800
|
+
const r = tt.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
2801
|
+
i[0 + o] /= a, i[1 + o] /= l;
|
|
2802
|
+
const u = R(a, l, 0.5);
|
|
2797
2803
|
return typeof i[2 + o] == "number" && (i[2 + o] /= u), typeof i[3 + o] == "number" && (i[3 + o] /= u), r(i);
|
|
2798
2804
|
}
|
|
2799
2805
|
}, dn = {
|
|
2800
2806
|
borderRadius: {
|
|
2801
2807
|
...It,
|
|
2802
|
-
applyTo: [
|
|
2803
|
-
"borderTopLeftRadius",
|
|
2804
|
-
"borderTopRightRadius",
|
|
2805
|
-
"borderBottomLeftRadius",
|
|
2806
|
-
"borderBottomRightRadius"
|
|
2807
|
-
]
|
|
2808
|
+
applyTo: [...jn]
|
|
2808
2809
|
},
|
|
2809
2810
|
borderTopLeftRadius: It,
|
|
2810
2811
|
borderTopRightRadius: It,
|
|
@@ -2812,42 +2813,42 @@ const It = {
|
|
|
2812
2813
|
borderBottomRightRadius: It,
|
|
2813
2814
|
boxShadow: rc
|
|
2814
2815
|
};
|
|
2815
|
-
function
|
|
2816
|
-
return
|
|
2816
|
+
function Mo(t, { layout: e, layoutId: n }) {
|
|
2817
|
+
return Lt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!dn[t] || t === "opacity");
|
|
2817
2818
|
}
|
|
2818
|
-
function
|
|
2819
|
+
function Gn(t, e, n) {
|
|
2819
2820
|
var o;
|
|
2820
2821
|
const s = t.style, i = e == null ? void 0 : e.style, r = {};
|
|
2821
2822
|
if (!s)
|
|
2822
2823
|
return r;
|
|
2823
2824
|
for (const a in s)
|
|
2824
|
-
(U(s[a]) || i && U(i[a]) ||
|
|
2825
|
+
(U(s[a]) || i && U(i[a]) || Mo(a, t) || ((o = n == null ? void 0 : n.getValue(a)) == null ? void 0 : o.liveStyle) !== void 0) && (r[a] = s[a]);
|
|
2825
2826
|
return r;
|
|
2826
2827
|
}
|
|
2827
2828
|
function ac(t) {
|
|
2828
2829
|
return window.getComputedStyle(t);
|
|
2829
2830
|
}
|
|
2830
|
-
class lc extends
|
|
2831
|
+
class lc extends Po {
|
|
2831
2832
|
constructor() {
|
|
2832
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
2833
|
+
super(...arguments), this.type = "html", this.renderInstance = Co;
|
|
2833
2834
|
}
|
|
2834
2835
|
readValueFromInstance(e, n) {
|
|
2835
2836
|
var s;
|
|
2836
|
-
if (
|
|
2837
|
+
if (Lt.has(n))
|
|
2837
2838
|
return (s = this.projection) != null && s.isProjecting ? Ze(n) : Ca(e, n);
|
|
2838
2839
|
{
|
|
2839
|
-
const i = ac(e), r = (
|
|
2840
|
+
const i = ac(e), r = (Fi(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
2840
2841
|
return typeof r == "string" ? r.trim() : r;
|
|
2841
2842
|
}
|
|
2842
2843
|
}
|
|
2843
2844
|
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
2844
|
-
return
|
|
2845
|
+
return Vo(e, n);
|
|
2845
2846
|
}
|
|
2846
2847
|
build(e, n, s) {
|
|
2847
|
-
|
|
2848
|
+
Kn(e, n, s.transformTemplate);
|
|
2848
2849
|
}
|
|
2849
2850
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
2850
|
-
return
|
|
2851
|
+
return Gn(e, n, s);
|
|
2851
2852
|
}
|
|
2852
2853
|
}
|
|
2853
2854
|
const cc = {
|
|
@@ -2868,7 +2869,7 @@ const fc = [
|
|
|
2868
2869
|
"offsetRotate",
|
|
2869
2870
|
"offsetAnchor"
|
|
2870
2871
|
];
|
|
2871
|
-
function
|
|
2872
|
+
function Do(t, {
|
|
2872
2873
|
attrX: e,
|
|
2873
2874
|
attrY: n,
|
|
2874
2875
|
attrScale: s,
|
|
@@ -2877,19 +2878,19 @@ function Mo(t, {
|
|
|
2877
2878
|
pathOffset: o = 0,
|
|
2878
2879
|
// This is object creation, which we try to avoid per-frame.
|
|
2879
2880
|
...a
|
|
2880
|
-
},
|
|
2881
|
-
if (
|
|
2881
|
+
}, l, u, c) {
|
|
2882
|
+
if (Kn(t, a, u), l) {
|
|
2882
2883
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
2883
2884
|
return;
|
|
2884
2885
|
}
|
|
2885
2886
|
t.attrs = t.style, t.style = {};
|
|
2886
2887
|
const { attrs: h, style: f } = t;
|
|
2887
|
-
h.transform && (f.transform = h.transform, delete h.transform), (f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = (
|
|
2888
|
+
h.transform && (f.transform = h.transform, delete h.transform), (f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = (c == null ? void 0 : c.transformBox) ?? "fill-box", delete h.transformBox);
|
|
2888
2889
|
for (const d of fc)
|
|
2889
2890
|
h[d] !== void 0 && (f[d] = h[d], delete h[d]);
|
|
2890
2891
|
e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), s !== void 0 && (h.scale = s), i !== void 0 && hc(h, i, r, o, !1);
|
|
2891
2892
|
}
|
|
2892
|
-
const
|
|
2893
|
+
const Eo = /* @__PURE__ */ new Set([
|
|
2893
2894
|
"baseFrequency",
|
|
2894
2895
|
"diffuseConstant",
|
|
2895
2896
|
"kernelMatrix",
|
|
@@ -2913,22 +2914,22 @@ const Do = /* @__PURE__ */ new Set([
|
|
|
2913
2914
|
"startOffset",
|
|
2914
2915
|
"textLength",
|
|
2915
2916
|
"lengthAdjust"
|
|
2916
|
-
]),
|
|
2917
|
+
]), Ro = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
2917
2918
|
function dc(t, e, n, s) {
|
|
2918
|
-
|
|
2919
|
+
Co(t, e, void 0, s);
|
|
2919
2920
|
for (const i in e.attrs)
|
|
2920
|
-
t.setAttribute(
|
|
2921
|
+
t.setAttribute(Eo.has(i) ? i : On(i), e.attrs[i]);
|
|
2921
2922
|
}
|
|
2922
|
-
function
|
|
2923
|
-
const s =
|
|
2923
|
+
function ko(t, e, n) {
|
|
2924
|
+
const s = Gn(t, e, n);
|
|
2924
2925
|
for (const i in t)
|
|
2925
2926
|
if (U(t[i]) || U(e[i])) {
|
|
2926
|
-
const r =
|
|
2927
|
+
const r = kt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
2927
2928
|
s[r] = t[i];
|
|
2928
2929
|
}
|
|
2929
2930
|
return s;
|
|
2930
2931
|
}
|
|
2931
|
-
class pc extends
|
|
2932
|
+
class pc extends Po {
|
|
2932
2933
|
constructor() {
|
|
2933
2934
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = j;
|
|
2934
2935
|
}
|
|
@@ -2936,26 +2937,26 @@ class pc extends To {
|
|
|
2936
2937
|
return e[n];
|
|
2937
2938
|
}
|
|
2938
2939
|
readValueFromInstance(e, n) {
|
|
2939
|
-
if (
|
|
2940
|
-
const s =
|
|
2940
|
+
if (Lt.has(n)) {
|
|
2941
|
+
const s = ho(n);
|
|
2941
2942
|
return s && s.default || 0;
|
|
2942
2943
|
}
|
|
2943
|
-
return n =
|
|
2944
|
+
return n = Eo.has(n) ? n : On(n), e.getAttribute(n);
|
|
2944
2945
|
}
|
|
2945
2946
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
2946
|
-
return
|
|
2947
|
+
return ko(e, n, s);
|
|
2947
2948
|
}
|
|
2948
2949
|
build(e, n, s) {
|
|
2949
|
-
|
|
2950
|
+
Do(e, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
2950
2951
|
}
|
|
2951
2952
|
renderInstance(e, n, s, i) {
|
|
2952
2953
|
dc(e, n, s, i);
|
|
2953
2954
|
}
|
|
2954
2955
|
mount(e) {
|
|
2955
|
-
this.isSVGTag =
|
|
2956
|
+
this.isSVGTag = Ro(e.tagName), super.mount(e);
|
|
2956
2957
|
}
|
|
2957
2958
|
}
|
|
2958
|
-
const mc =
|
|
2959
|
+
const mc = zn.length;
|
|
2959
2960
|
function Lo(t) {
|
|
2960
2961
|
if (!t)
|
|
2961
2962
|
return;
|
|
@@ -2965,12 +2966,12 @@ function Lo(t) {
|
|
|
2965
2966
|
}
|
|
2966
2967
|
const e = {};
|
|
2967
2968
|
for (let n = 0; n < mc; n++) {
|
|
2968
|
-
const s =
|
|
2969
|
-
(
|
|
2969
|
+
const s = zn[n], i = t.props[s];
|
|
2970
|
+
(Kt(i) || i === !1) && (e[s] = i);
|
|
2970
2971
|
}
|
|
2971
2972
|
return e;
|
|
2972
2973
|
}
|
|
2973
|
-
function
|
|
2974
|
+
function Io(t, e) {
|
|
2974
2975
|
if (!Array.isArray(e))
|
|
2975
2976
|
return !1;
|
|
2976
2977
|
const n = e.length;
|
|
@@ -2981,104 +2982,104 @@ function ko(t, e) {
|
|
|
2981
2982
|
return !1;
|
|
2982
2983
|
return !0;
|
|
2983
2984
|
}
|
|
2984
|
-
const gc = [
|
|
2985
|
+
const gc = [...$n].reverse(), yc = $n.length;
|
|
2985
2986
|
function vc(t) {
|
|
2986
2987
|
return (e) => Promise.all(e.map(({ animation: n, options: s }) => ml(t, n, s)));
|
|
2987
2988
|
}
|
|
2988
2989
|
function xc(t) {
|
|
2989
|
-
let e = vc(t), n =
|
|
2990
|
-
const r = (u) => (
|
|
2990
|
+
let e = vc(t), n = Rs(), s = !0, i = !1;
|
|
2991
|
+
const r = (u) => (c, h) => {
|
|
2991
2992
|
var d;
|
|
2992
2993
|
const f = wt(t, h, u === "exit" ? (d = t.presenceContext) == null ? void 0 : d.custom : void 0);
|
|
2993
2994
|
if (f) {
|
|
2994
2995
|
const { transition: p, transitionEnd: g, ...m } = f;
|
|
2995
|
-
|
|
2996
|
+
c = { ...c, ...m, ...g };
|
|
2996
2997
|
}
|
|
2997
|
-
return
|
|
2998
|
+
return c;
|
|
2998
2999
|
};
|
|
2999
3000
|
function o(u) {
|
|
3000
3001
|
e = u(t);
|
|
3001
3002
|
}
|
|
3002
3003
|
function a(u) {
|
|
3003
|
-
const { props:
|
|
3004
|
+
const { props: c } = t, h = Lo(t.parent) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
3004
3005
|
let p = {}, g = 1 / 0;
|
|
3005
3006
|
for (let y = 0; y < yc; y++) {
|
|
3006
|
-
const
|
|
3007
|
+
const w = gc[y], v = n[w], x = c[w] !== void 0 ? c[w] : h[w], b = Kt(x), C = w === u ? v.isActive : null;
|
|
3007
3008
|
C === !1 && (g = y);
|
|
3008
|
-
let A =
|
|
3009
|
+
let A = x === h[w] && x !== c[w] && b;
|
|
3009
3010
|
if (A && (s || i) && t.manuallyAnimateOnMount && (A = !1), v.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3010
3011
|
!v.isActive && C === null || // If we didn't and don't have any defined prop for this animation type
|
|
3011
|
-
!
|
|
3012
|
-
Ae(
|
|
3012
|
+
!x && !v.prevProp || // Or if the prop doesn't define an animation
|
|
3013
|
+
Ae(x) || typeof x == "boolean")
|
|
3013
3014
|
continue;
|
|
3014
|
-
if (
|
|
3015
|
+
if (w === "exit" && v.isActive && C !== !0) {
|
|
3015
3016
|
v.prevResolvedValues && (p = {
|
|
3016
3017
|
...p,
|
|
3017
3018
|
...v.prevResolvedValues
|
|
3018
3019
|
});
|
|
3019
3020
|
continue;
|
|
3020
3021
|
}
|
|
3021
|
-
const P = wc(v.prevProp,
|
|
3022
|
+
const P = wc(v.prevProp, x);
|
|
3022
3023
|
let V = P || // If we're making this variant active, we want to always make it active
|
|
3023
|
-
|
|
3024
|
+
w === u && v.isActive && !A && b || // If we removed a higher-priority variant (i is in reverse order)
|
|
3024
3025
|
y > g && b, S = !1;
|
|
3025
|
-
const D = Array.isArray(
|
|
3026
|
-
let F = D.reduce(r(
|
|
3026
|
+
const D = Array.isArray(x) ? x : [x];
|
|
3027
|
+
let F = D.reduce(r(w), {});
|
|
3027
3028
|
C === !1 && (F = {});
|
|
3028
3029
|
const { prevResolvedValues: Z = {} } = v, _ = {
|
|
3029
3030
|
...Z,
|
|
3030
3031
|
...F
|
|
3031
|
-
}, Y = (
|
|
3032
|
-
V = !0, d.has(
|
|
3033
|
-
const O = t.getValue(
|
|
3032
|
+
}, Y = (L) => {
|
|
3033
|
+
V = !0, d.has(L) && (S = !0, d.delete(L)), v.needsAnimating[L] = !0;
|
|
3034
|
+
const O = t.getValue(L);
|
|
3034
3035
|
O && (O.liveStyle = !1);
|
|
3035
3036
|
};
|
|
3036
|
-
for (const
|
|
3037
|
-
const O = F[
|
|
3038
|
-
if (p.hasOwnProperty(
|
|
3037
|
+
for (const L in _) {
|
|
3038
|
+
const O = F[L], pt = Z[L];
|
|
3039
|
+
if (p.hasOwnProperty(L))
|
|
3039
3040
|
continue;
|
|
3040
3041
|
let Tt = !1;
|
|
3041
|
-
sn(O) && sn(pt) ? Tt = !
|
|
3042
|
+
sn(O) && sn(pt) ? Tt = !Io(O, pt) || P : Tt = O !== pt, Tt ? O != null ? Y(L) : d.add(L) : O !== void 0 && d.has(L) ? Y(L) : v.protectedKeys[L] = !0;
|
|
3042
3043
|
}
|
|
3043
|
-
v.prevProp =
|
|
3044
|
+
v.prevProp = x, v.prevResolvedValues = F, v.isActive && (p = { ...p, ...F }), (s || i) && t.blockInitialAnimation && (V = !1);
|
|
3044
3045
|
const M = A && P;
|
|
3045
|
-
V && (!M || S) && f.push(...D.map((
|
|
3046
|
-
const O = { type:
|
|
3047
|
-
if (typeof
|
|
3048
|
-
const { parent: pt } = t, Tt = wt(pt,
|
|
3046
|
+
V && (!M || S) && f.push(...D.map((L) => {
|
|
3047
|
+
const O = { type: w };
|
|
3048
|
+
if (typeof L == "string" && (s || i) && !M && t.manuallyAnimateOnMount && t.parent) {
|
|
3049
|
+
const { parent: pt } = t, Tt = wt(pt, L);
|
|
3049
3050
|
if (pt.enteringChildren && Tt) {
|
|
3050
3051
|
const { delayChildren: sr } = Tt.transition || {};
|
|
3051
|
-
O.delay =
|
|
3052
|
+
O.delay = no(pt.enteringChildren, t, sr);
|
|
3052
3053
|
}
|
|
3053
3054
|
}
|
|
3054
3055
|
return {
|
|
3055
|
-
animation:
|
|
3056
|
+
animation: L,
|
|
3056
3057
|
options: O
|
|
3057
3058
|
};
|
|
3058
3059
|
}));
|
|
3059
3060
|
}
|
|
3060
3061
|
if (d.size) {
|
|
3061
3062
|
const y = {};
|
|
3062
|
-
if (typeof
|
|
3063
|
-
const
|
|
3064
|
-
|
|
3063
|
+
if (typeof c.initial != "boolean") {
|
|
3064
|
+
const w = wt(t, Array.isArray(c.initial) ? c.initial[0] : c.initial);
|
|
3065
|
+
w && w.transition && (y.transition = w.transition);
|
|
3065
3066
|
}
|
|
3066
|
-
d.forEach((
|
|
3067
|
-
const v = t.getBaseTarget(
|
|
3068
|
-
|
|
3067
|
+
d.forEach((w) => {
|
|
3068
|
+
const v = t.getBaseTarget(w), x = t.getValue(w);
|
|
3069
|
+
x && (x.liveStyle = !0), y[w] = v ?? null;
|
|
3069
3070
|
}), f.push({ animation: y });
|
|
3070
3071
|
}
|
|
3071
3072
|
let m = !!f.length;
|
|
3072
|
-
return s && (
|
|
3073
|
+
return s && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (m = !1), s = !1, i = !1, m ? e(f) : Promise.resolve();
|
|
3073
3074
|
}
|
|
3074
|
-
function
|
|
3075
|
+
function l(u, c) {
|
|
3075
3076
|
var f;
|
|
3076
|
-
if (n[u].isActive ===
|
|
3077
|
+
if (n[u].isActive === c)
|
|
3077
3078
|
return Promise.resolve();
|
|
3078
3079
|
(f = t.variantChildren) == null || f.forEach((d) => {
|
|
3079
3080
|
var p;
|
|
3080
|
-
return (p = d.animationState) == null ? void 0 : p.setActive(u,
|
|
3081
|
-
}), n[u].isActive =
|
|
3081
|
+
return (p = d.animationState) == null ? void 0 : p.setActive(u, c);
|
|
3082
|
+
}), n[u].isActive = c;
|
|
3082
3083
|
const h = a(u);
|
|
3083
3084
|
for (const d in n)
|
|
3084
3085
|
n[d].protectedKeys = {};
|
|
@@ -3086,16 +3087,16 @@ function xc(t) {
|
|
|
3086
3087
|
}
|
|
3087
3088
|
return {
|
|
3088
3089
|
animateChanges: a,
|
|
3089
|
-
setActive:
|
|
3090
|
+
setActive: l,
|
|
3090
3091
|
setAnimateFunction: o,
|
|
3091
3092
|
getState: () => n,
|
|
3092
3093
|
reset: () => {
|
|
3093
|
-
n =
|
|
3094
|
+
n = Rs(), i = !0;
|
|
3094
3095
|
}
|
|
3095
3096
|
};
|
|
3096
3097
|
}
|
|
3097
3098
|
function wc(t, e) {
|
|
3098
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ? !
|
|
3099
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !Io(e, t) : !1;
|
|
3099
3100
|
}
|
|
3100
3101
|
function mt(t = !1) {
|
|
3101
3102
|
return {
|
|
@@ -3105,7 +3106,7 @@ function mt(t = !1) {
|
|
|
3105
3106
|
prevResolvedValues: {}
|
|
3106
3107
|
};
|
|
3107
3108
|
}
|
|
3108
|
-
function
|
|
3109
|
+
function Rs() {
|
|
3109
3110
|
return {
|
|
3110
3111
|
animate: mt(!0),
|
|
3111
3112
|
whileInView: mt(),
|
|
@@ -3122,74 +3123,74 @@ function pn(t, e) {
|
|
|
3122
3123
|
function J(t, e) {
|
|
3123
3124
|
pn(t.x, e.x), pn(t.y, e.y);
|
|
3124
3125
|
}
|
|
3125
|
-
function
|
|
3126
|
+
function ks(t, e) {
|
|
3126
3127
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
3127
3128
|
}
|
|
3128
|
-
const
|
|
3129
|
+
const Bo = 1e-4, Tc = 1 - Bo, Pc = 1 + Bo, Fo = 0.01, bc = 0 - Fo, Sc = 0 + Fo;
|
|
3129
3130
|
function K(t) {
|
|
3130
3131
|
return t.max - t.min;
|
|
3131
3132
|
}
|
|
3132
3133
|
function Ac(t, e, n) {
|
|
3133
3134
|
return Math.abs(t - e) <= n;
|
|
3134
3135
|
}
|
|
3135
|
-
function
|
|
3136
|
+
function Ls(t, e, n, s = 0.5) {
|
|
3136
3137
|
t.origin = s, t.originPoint = R(e.min, e.max, t.origin), t.scale = K(n) / K(e), t.translate = R(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Tc && t.scale <= Pc || isNaN(t.scale)) && (t.scale = 1), (t.translate >= bc && t.translate <= Sc || isNaN(t.translate)) && (t.translate = 0);
|
|
3137
3138
|
}
|
|
3138
3139
|
function Nt(t, e, n, s) {
|
|
3139
|
-
|
|
3140
|
+
Ls(t.x, e.x, n.x, s ? s.originX : void 0), Ls(t.y, e.y, n.y, s ? s.originY : void 0);
|
|
3140
3141
|
}
|
|
3141
|
-
function
|
|
3142
|
+
function Is(t, e, n, s = 0) {
|
|
3142
3143
|
const i = s ? R(n.min, n.max, s) : n.min;
|
|
3143
3144
|
t.min = i + e.min, t.max = t.min + K(e);
|
|
3144
3145
|
}
|
|
3145
3146
|
function Vc(t, e, n, s) {
|
|
3146
|
-
|
|
3147
|
+
Is(t.x, e.x, n.x, s == null ? void 0 : s.x), Is(t.y, e.y, n.y, s == null ? void 0 : s.y);
|
|
3147
3148
|
}
|
|
3148
|
-
function
|
|
3149
|
+
function Bs(t, e, n, s = 0) {
|
|
3149
3150
|
const i = s ? R(n.min, n.max, s) : n.min;
|
|
3150
3151
|
t.min = e.min - i, t.max = t.min + K(e);
|
|
3151
3152
|
}
|
|
3152
3153
|
function we(t, e, n, s) {
|
|
3153
|
-
|
|
3154
|
+
Bs(t.x, e.x, n.x, s == null ? void 0 : s.x), Bs(t.y, e.y, n.y, s == null ? void 0 : s.y);
|
|
3154
3155
|
}
|
|
3155
|
-
function
|
|
3156
|
+
function Fs(t, e, n, s, i) {
|
|
3156
3157
|
return t -= e, t = xe(t, 1 / n, s), i !== void 0 && (t = xe(t, 1 / i, s)), t;
|
|
3157
3158
|
}
|
|
3158
3159
|
function Cc(t, e = 0, n = 1, s = 0.5, i, r = t, o = t) {
|
|
3159
3160
|
if (it.test(e) && (e = parseFloat(e), e = R(o.min, o.max, e / 100) - o.min), typeof e != "number")
|
|
3160
3161
|
return;
|
|
3161
3162
|
let a = R(r.min, r.max, s);
|
|
3162
|
-
t === r && (a -= e), t.min =
|
|
3163
|
+
t === r && (a -= e), t.min = Fs(t.min, e, n, a, i), t.max = Fs(t.max, e, n, a, i);
|
|
3163
3164
|
}
|
|
3164
|
-
function
|
|
3165
|
+
function Os(t, e, [n, s, i], r, o) {
|
|
3165
3166
|
Cc(t, e[n], e[s], e[i], e.scale, r, o);
|
|
3166
3167
|
}
|
|
3167
3168
|
const Mc = ["x", "scaleX", "originX"], Dc = ["y", "scaleY", "originY"];
|
|
3168
|
-
function
|
|
3169
|
-
|
|
3169
|
+
function js(t, e, n, s) {
|
|
3170
|
+
Os(t.x, e, Mc, n ? n.x : void 0, s ? s.x : void 0), Os(t.y, e, Dc, n ? n.y : void 0, s ? s.y : void 0);
|
|
3170
3171
|
}
|
|
3171
|
-
function
|
|
3172
|
+
function Ns(t) {
|
|
3172
3173
|
return t.translate === 0 && t.scale === 1;
|
|
3173
3174
|
}
|
|
3174
|
-
function
|
|
3175
|
-
return
|
|
3175
|
+
function Oo(t) {
|
|
3176
|
+
return Ns(t.x) && Ns(t.y);
|
|
3176
3177
|
}
|
|
3177
|
-
function
|
|
3178
|
+
function Us(t, e) {
|
|
3178
3179
|
return t.min === e.min && t.max === e.max;
|
|
3179
3180
|
}
|
|
3180
3181
|
function Ec(t, e) {
|
|
3181
|
-
return
|
|
3182
|
+
return Us(t.x, e.x) && Us(t.y, e.y);
|
|
3182
3183
|
}
|
|
3183
|
-
function
|
|
3184
|
+
function Ws(t, e) {
|
|
3184
3185
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
3185
3186
|
}
|
|
3186
|
-
function
|
|
3187
|
-
return
|
|
3187
|
+
function jo(t, e) {
|
|
3188
|
+
return Ws(t.x, e.x) && Ws(t.y, e.y);
|
|
3188
3189
|
}
|
|
3189
|
-
function
|
|
3190
|
+
function $s(t) {
|
|
3190
3191
|
return K(t.x) / K(t.y);
|
|
3191
3192
|
}
|
|
3192
|
-
function
|
|
3193
|
+
function zs(t, e) {
|
|
3193
3194
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
3194
3195
|
}
|
|
3195
3196
|
function nt(t) {
|
|
@@ -3199,42 +3200,37 @@ function Rc(t, e, n) {
|
|
|
3199
3200
|
let s = "";
|
|
3200
3201
|
const i = t.x.translate / e.x, r = t.y.translate / e.y, o = (n == null ? void 0 : n.z) || 0;
|
|
3201
3202
|
if ((i || r || o) && (s = `translate3d(${i}px, ${r}px, ${o}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
|
|
3202
|
-
const { transformPerspective: u, rotate:
|
|
3203
|
-
u && (s = `perspective(${u}px) ${s}`),
|
|
3203
|
+
const { transformPerspective: u, rotate: c, pathRotation: h, rotateX: f, rotateY: d, skewX: p, skewY: g } = n;
|
|
3204
|
+
u && (s = `perspective(${u}px) ${s}`), c && (s += `rotate(${c}deg) `), h && (s += `rotate(${h}deg) `), f && (s += `rotateX(${f}deg) `), d && (s += `rotateY(${d}deg) `), p && (s += `skewX(${p}deg) `), g && (s += `skewY(${g}deg) `);
|
|
3204
3205
|
}
|
|
3205
|
-
const a = t.x.scale * e.x,
|
|
3206
|
-
return (a !== 1 ||
|
|
3206
|
+
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
3207
|
+
return (a !== 1 || l !== 1) && (s += `scale(${a}, ${l})`), s || "none";
|
|
3207
3208
|
}
|
|
3208
|
-
const
|
|
3209
|
-
|
|
3210
|
-
"borderTopRightRadius",
|
|
3211
|
-
"borderBottomLeftRadius",
|
|
3212
|
-
"borderBottomRightRadius"
|
|
3213
|
-
], Lc = jo.length, $s = (t) => typeof t == "string" ? parseFloat(t) : t, Ks = (t) => typeof t == "number" || T.test(t);
|
|
3214
|
-
function kc(t, e, n, s, i, r) {
|
|
3209
|
+
const kc = jn.length, Ks = (t) => typeof t == "string" ? parseFloat(t) : t, Gs = (t) => typeof t == "number" || T.test(t);
|
|
3210
|
+
function Lc(t, e, n, s, i, r) {
|
|
3215
3211
|
i ? (t.opacity = R(0, n.opacity ?? 1, Ic(s)), t.opacityExit = R(e.opacity ?? 1, 0, Bc(s))) : r && (t.opacity = R(e.opacity ?? 1, n.opacity ?? 1, s));
|
|
3216
|
-
for (let o = 0; o <
|
|
3217
|
-
const a =
|
|
3218
|
-
let
|
|
3219
|
-
if (
|
|
3212
|
+
for (let o = 0; o < kc; o++) {
|
|
3213
|
+
const a = jn[o];
|
|
3214
|
+
let l = Hs(e, a), u = Hs(n, a);
|
|
3215
|
+
if (l === void 0 && u === void 0)
|
|
3220
3216
|
continue;
|
|
3221
|
-
|
|
3217
|
+
l || (l = 0), u || (u = 0), l === 0 || u === 0 || Gs(l) === Gs(u) ? (t[a] = Math.max(R(Ks(l), Ks(u), s), 0), (it.test(u) || it.test(l)) && (t[a] += "%")) : t[a] = u;
|
|
3222
3218
|
}
|
|
3223
3219
|
(e.rotate || n.rotate) && (t.rotate = R(e.rotate || 0, n.rotate || 0, s));
|
|
3224
3220
|
}
|
|
3225
|
-
function
|
|
3221
|
+
function Hs(t, e) {
|
|
3226
3222
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
3227
3223
|
}
|
|
3228
|
-
const Ic = /* @__PURE__ */ No(0, 0.5,
|
|
3224
|
+
const Ic = /* @__PURE__ */ No(0, 0.5, Ei), Bc = /* @__PURE__ */ No(0.5, 0.95, q);
|
|
3229
3225
|
function No(t, e, n) {
|
|
3230
3226
|
return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ $t(t, e, s));
|
|
3231
3227
|
}
|
|
3232
3228
|
function Fc(t, e, n) {
|
|
3233
3229
|
const s = U(t) ? t : Mt(t);
|
|
3234
|
-
return s.start(
|
|
3230
|
+
return s.start(Bn("", s, e, n)), s.animation;
|
|
3235
3231
|
}
|
|
3236
3232
|
function Gt(t, e, n, s = { passive: !0 }) {
|
|
3237
|
-
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
|
|
3233
|
+
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n, s);
|
|
3238
3234
|
}
|
|
3239
3235
|
const Oc = (t, e) => t.depth - e.depth;
|
|
3240
3236
|
class jc {
|
|
@@ -3242,7 +3238,7 @@ class jc {
|
|
|
3242
3238
|
this.children = [], this.isDirty = !1;
|
|
3243
3239
|
}
|
|
3244
3240
|
add(e) {
|
|
3245
|
-
|
|
3241
|
+
Pn(this.children, e), this.isDirty = !0;
|
|
3246
3242
|
}
|
|
3247
3243
|
remove(e) {
|
|
3248
3244
|
fe(this.children, e), this.isDirty = !0;
|
|
@@ -3252,11 +3248,11 @@ class jc {
|
|
|
3252
3248
|
}
|
|
3253
3249
|
}
|
|
3254
3250
|
function Nc(t, e) {
|
|
3255
|
-
const n =
|
|
3251
|
+
const n = z.now(), s = ({ timestamp: i }) => {
|
|
3256
3252
|
const r = i - n;
|
|
3257
3253
|
r >= e && (ft(s), t(r - e));
|
|
3258
3254
|
};
|
|
3259
|
-
return
|
|
3255
|
+
return k.setup(s, !0), () => ft(s);
|
|
3260
3256
|
}
|
|
3261
3257
|
function ue(t) {
|
|
3262
3258
|
return U(t) ? t.get() : t;
|
|
@@ -3266,7 +3262,7 @@ class Uc {
|
|
|
3266
3262
|
this.members = [];
|
|
3267
3263
|
}
|
|
3268
3264
|
add(e) {
|
|
3269
|
-
|
|
3265
|
+
Pn(this.members, e);
|
|
3270
3266
|
for (let n = this.members.length - 1; n >= 0; n--) {
|
|
3271
3267
|
const s = this.members[n];
|
|
3272
3268
|
if (s === e || s === this.lead || s === this.prevLead)
|
|
@@ -3337,10 +3333,10 @@ function Uo(t) {
|
|
|
3337
3333
|
const { visualElement: e } = t.options;
|
|
3338
3334
|
if (!e)
|
|
3339
3335
|
return;
|
|
3340
|
-
const n =
|
|
3336
|
+
const n = ao(e);
|
|
3341
3337
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
3342
3338
|
const { layout: i, layoutId: r } = t.options;
|
|
3343
|
-
window.MotionCancelOptimisedAnimation(n, "transform",
|
|
3339
|
+
window.MotionCancelOptimisedAnimation(n, "transform", k, !(i || r));
|
|
3344
3340
|
}
|
|
3345
3341
|
const { parent: s } = t;
|
|
3346
3342
|
s && !s.hasCheckedOptimisedAppear && Uo(s);
|
|
@@ -3353,16 +3349,16 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3353
3349
|
}, this.updateProjection = () => {
|
|
3354
3350
|
this.projectionUpdateScheduled = !1, this.nodes.forEach(Gc), this.nodes.forEach(Zc), this.nodes.forEach(Jc), this.nodes.forEach(Hc);
|
|
3355
3351
|
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = o, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
3356
|
-
for (let
|
|
3357
|
-
this.path[
|
|
3352
|
+
for (let l = 0; l < this.path.length; l++)
|
|
3353
|
+
this.path[l].shouldResetTransform = !0;
|
|
3358
3354
|
this.root === this && (this.nodes = new jc());
|
|
3359
3355
|
}
|
|
3360
3356
|
addEventListener(o, a) {
|
|
3361
|
-
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new
|
|
3357
|
+
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new bn()), this.eventHandlers.get(o).add(a);
|
|
3362
3358
|
}
|
|
3363
3359
|
notifyListeners(o, ...a) {
|
|
3364
|
-
const
|
|
3365
|
-
|
|
3360
|
+
const l = this.eventHandlers.get(o);
|
|
3361
|
+
l && l.notify(...a);
|
|
3366
3362
|
}
|
|
3367
3363
|
hasListeners(o) {
|
|
3368
3364
|
return this.eventHandlers.has(o);
|
|
@@ -3373,34 +3369,34 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3373
3369
|
mount(o) {
|
|
3374
3370
|
if (this.instance)
|
|
3375
3371
|
return;
|
|
3376
|
-
this.isSVG =
|
|
3377
|
-
const { layoutId: a, layout:
|
|
3378
|
-
if (u && !u.current && u.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (
|
|
3379
|
-
let
|
|
3372
|
+
this.isSVG = Wn(o) && !Kl(o), this.instance = o;
|
|
3373
|
+
const { layoutId: a, layout: l, visualElement: u } = this.options;
|
|
3374
|
+
if (u && !u.current && u.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
3375
|
+
let c, h = 0;
|
|
3380
3376
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
3381
|
-
|
|
3377
|
+
k.read(() => {
|
|
3382
3378
|
h = window.innerWidth;
|
|
3383
3379
|
}), t(o, () => {
|
|
3384
3380
|
const d = window.innerWidth;
|
|
3385
|
-
d !== h && (h = d, this.root.updateBlockedByResize = !0,
|
|
3381
|
+
d !== h && (h = d, this.root.updateBlockedByResize = !0, c && c(), c = Nc(f, 250), he.hasAnimatedSinceResize && (he.hasAnimatedSinceResize = !1, this.nodes.forEach(Xs)));
|
|
3386
3382
|
});
|
|
3387
3383
|
}
|
|
3388
|
-
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a ||
|
|
3384
|
+
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: d }) => {
|
|
3389
3385
|
if (this.isTreeAnimationBlocked()) {
|
|
3390
3386
|
this.target = void 0, this.relativeTarget = void 0;
|
|
3391
3387
|
return;
|
|
3392
3388
|
}
|
|
3393
|
-
const p = this.options.transition || u.getDefaultTransition() || su, { onLayoutAnimationStart: g, onLayoutAnimationComplete: m } = u.getProps(), y = !this.targetLayout || !
|
|
3394
|
-
if (this.options.layoutRoot || this.resumeFrom ||
|
|
3389
|
+
const p = this.options.transition || u.getDefaultTransition() || su, { onLayoutAnimationStart: g, onLayoutAnimationComplete: m } = u.getProps(), y = !this.targetLayout || !jo(this.targetLayout, d), w = !h && f;
|
|
3390
|
+
if (this.options.layoutRoot || this.resumeFrom || w || h && (y || !this.currentAnimation)) {
|
|
3395
3391
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
3396
3392
|
const v = {
|
|
3397
|
-
...
|
|
3393
|
+
...In(p, "layout"),
|
|
3398
3394
|
onPlay: g,
|
|
3399
3395
|
onComplete: m
|
|
3400
3396
|
};
|
|
3401
|
-
(u.shouldReduceMotion || this.options.layoutRoot) && (v.delay = 0, v.type = !1), this.startAnimation(v), this.setAnimationOrigin(
|
|
3397
|
+
(u.shouldReduceMotion || this.options.layoutRoot) && (v.delay = 0, v.type = !1), this.startAnimation(v), this.setAnimationOrigin(c, w, v.path);
|
|
3402
3398
|
} else
|
|
3403
|
-
h ||
|
|
3399
|
+
h || Xs(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
3404
3400
|
this.targetLayout = d;
|
|
3405
3401
|
});
|
|
3406
3402
|
}
|
|
@@ -3438,41 +3434,41 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3438
3434
|
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Uo(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
3439
3435
|
return;
|
|
3440
3436
|
this.isLayoutDirty = !0;
|
|
3441
|
-
for (let
|
|
3442
|
-
const h = this.path[
|
|
3437
|
+
for (let c = 0; c < this.path.length; c++) {
|
|
3438
|
+
const h = this.path[c];
|
|
3443
3439
|
h.shouldResetTransform = !0, (typeof h.latestValues.x == "string" || typeof h.latestValues.y == "string") && (h.isLayoutDirty = !0), h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
|
|
3444
3440
|
}
|
|
3445
|
-
const { layoutId: a, layout:
|
|
3446
|
-
if (a === void 0 && !
|
|
3441
|
+
const { layoutId: a, layout: l } = this.options;
|
|
3442
|
+
if (a === void 0 && !l)
|
|
3447
3443
|
return;
|
|
3448
3444
|
const u = this.getTransformTemplate();
|
|
3449
3445
|
this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), o && this.notifyListeners("willUpdate");
|
|
3450
3446
|
}
|
|
3451
3447
|
update() {
|
|
3452
3448
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
3453
|
-
const
|
|
3454
|
-
this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(),
|
|
3449
|
+
const l = this.updateBlockedByResize;
|
|
3450
|
+
this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), l && this.nodes.forEach(Yc), this.nodes.forEach(_s);
|
|
3455
3451
|
return;
|
|
3456
3452
|
}
|
|
3457
3453
|
if (this.animationId <= this.animationCommitId) {
|
|
3458
|
-
this.nodes.forEach(
|
|
3454
|
+
this.nodes.forEach(Ys);
|
|
3459
3455
|
return;
|
|
3460
3456
|
}
|
|
3461
|
-
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Xc), this.nodes.forEach(qc), this.nodes.forEach(
|
|
3462
|
-
const a =
|
|
3457
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Xc), this.nodes.forEach(qc), this.nodes.forEach(zc), this.nodes.forEach(Kc)) : this.nodes.forEach(Ys), this.clearAllSnapshots();
|
|
3458
|
+
const a = z.now();
|
|
3463
3459
|
N.delta = ot(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0, Me.update.process(N), Me.preRender.process(N), Me.render.process(N), N.isProcessing = !1;
|
|
3464
3460
|
}
|
|
3465
3461
|
didUpdate() {
|
|
3466
|
-
this.updateScheduled || (this.updateScheduled = !0,
|
|
3462
|
+
this.updateScheduled || (this.updateScheduled = !0, Nn.read(this.scheduleUpdate));
|
|
3467
3463
|
}
|
|
3468
3464
|
clearAllSnapshots() {
|
|
3469
3465
|
this.nodes.forEach(_c), this.sharedNodes.forEach(tu);
|
|
3470
3466
|
}
|
|
3471
3467
|
scheduleUpdateProjection() {
|
|
3472
|
-
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
|
|
3468
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, k.preRender(this.updateProjection, !1, !0));
|
|
3473
3469
|
}
|
|
3474
3470
|
scheduleCheckAfterUnmount() {
|
|
3475
|
-
|
|
3471
|
+
k.postRender(() => {
|
|
3476
3472
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
3477
3473
|
});
|
|
3478
3474
|
}
|
|
@@ -3486,8 +3482,8 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3486
3482
|
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
|
|
3487
3483
|
return;
|
|
3488
3484
|
if (this.resumeFrom && !this.resumeFrom.instance)
|
|
3489
|
-
for (let
|
|
3490
|
-
this.path[
|
|
3485
|
+
for (let l = 0; l < this.path.length; l++)
|
|
3486
|
+
this.path[l].updateScroll();
|
|
3491
3487
|
const o = this.layout;
|
|
3492
3488
|
this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected || (this.layoutCorrected = j()), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
3493
3489
|
const { visualElement: a } = this.options;
|
|
@@ -3496,29 +3492,29 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3496
3492
|
updateScroll(o = "measure") {
|
|
3497
3493
|
let a = !!(this.options.layoutScroll && this.instance);
|
|
3498
3494
|
if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === o && (a = !1), a && this.instance) {
|
|
3499
|
-
const
|
|
3495
|
+
const l = s(this.instance);
|
|
3500
3496
|
this.scroll = {
|
|
3501
3497
|
animationId: this.root.animationId,
|
|
3502
3498
|
phase: o,
|
|
3503
|
-
isRoot:
|
|
3499
|
+
isRoot: l,
|
|
3504
3500
|
offset: n(this.instance),
|
|
3505
|
-
wasRoot: this.scroll ? this.scroll.isRoot :
|
|
3501
|
+
wasRoot: this.scroll ? this.scroll.isRoot : l
|
|
3506
3502
|
};
|
|
3507
3503
|
}
|
|
3508
3504
|
}
|
|
3509
3505
|
resetTransform() {
|
|
3510
3506
|
if (!i)
|
|
3511
3507
|
return;
|
|
3512
|
-
const o = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !
|
|
3513
|
-
o && this.instance && (a || gt(this.latestValues) ||
|
|
3508
|
+
const o = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Oo(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
|
|
3509
|
+
o && this.instance && (a || gt(this.latestValues) || c) && (i(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
|
|
3514
3510
|
}
|
|
3515
3511
|
measure(o = !0) {
|
|
3516
3512
|
const a = this.measurePageBox();
|
|
3517
|
-
let
|
|
3518
|
-
return o && (
|
|
3513
|
+
let l = this.removeElementScroll(a);
|
|
3514
|
+
return o && (l = this.removeTransform(l)), iu(l), {
|
|
3519
3515
|
animationId: this.root.animationId,
|
|
3520
3516
|
measuredBox: a,
|
|
3521
|
-
layoutBox:
|
|
3517
|
+
layoutBox: l,
|
|
3522
3518
|
latestValues: {},
|
|
3523
3519
|
source: this.id
|
|
3524
3520
|
};
|
|
@@ -3530,44 +3526,44 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3530
3526
|
return j();
|
|
3531
3527
|
const a = o.measureViewportBox();
|
|
3532
3528
|
if (!(((u = this.scroll) == null ? void 0 : u.wasRoot) || this.path.some(ou))) {
|
|
3533
|
-
const { scroll:
|
|
3534
|
-
|
|
3529
|
+
const { scroll: c } = this.root;
|
|
3530
|
+
c && (st(a.x, c.offset.x), st(a.y, c.offset.y));
|
|
3535
3531
|
}
|
|
3536
3532
|
return a;
|
|
3537
3533
|
}
|
|
3538
3534
|
removeElementScroll(o) {
|
|
3539
|
-
var
|
|
3535
|
+
var l;
|
|
3540
3536
|
const a = j();
|
|
3541
|
-
if (J(a, o), (
|
|
3537
|
+
if (J(a, o), (l = this.scroll) != null && l.wasRoot)
|
|
3542
3538
|
return a;
|
|
3543
3539
|
for (let u = 0; u < this.path.length; u++) {
|
|
3544
|
-
const
|
|
3545
|
-
|
|
3540
|
+
const c = this.path[u], { scroll: h, options: f } = c;
|
|
3541
|
+
c !== this.root && h && f.layoutScroll && (h.wasRoot && J(a, o), st(a.x, h.offset.x), st(a.y, h.offset.y));
|
|
3546
3542
|
}
|
|
3547
3543
|
return a;
|
|
3548
3544
|
}
|
|
3549
|
-
applyTransform(o, a = !1,
|
|
3550
|
-
var
|
|
3551
|
-
const u =
|
|
3545
|
+
applyTransform(o, a = !1, l) {
|
|
3546
|
+
var c, h;
|
|
3547
|
+
const u = l || j();
|
|
3552
3548
|
J(u, o);
|
|
3553
3549
|
for (let f = 0; f < this.path.length; f++) {
|
|
3554
3550
|
const d = this.path[f];
|
|
3555
|
-
!a && d.options.layoutScroll && d.scroll && d !== d.root && (st(u.x, -d.scroll.offset.x), st(u.y, -d.scroll.offset.y)), gt(d.latestValues) && ce(u, d.latestValues, (
|
|
3551
|
+
!a && d.options.layoutScroll && d.scroll && d !== d.root && (st(u.x, -d.scroll.offset.x), st(u.y, -d.scroll.offset.y)), gt(d.latestValues) && ce(u, d.latestValues, (c = d.layout) == null ? void 0 : c.layoutBox);
|
|
3556
3552
|
}
|
|
3557
3553
|
return gt(this.latestValues) && ce(u, this.latestValues, (h = this.layout) == null ? void 0 : h.layoutBox), u;
|
|
3558
3554
|
}
|
|
3559
3555
|
removeTransform(o) {
|
|
3560
|
-
var
|
|
3556
|
+
var l;
|
|
3561
3557
|
const a = j();
|
|
3562
3558
|
J(a, o);
|
|
3563
3559
|
for (let u = 0; u < this.path.length; u++) {
|
|
3564
|
-
const
|
|
3565
|
-
if (!gt(
|
|
3560
|
+
const c = this.path[u];
|
|
3561
|
+
if (!gt(c.latestValues))
|
|
3566
3562
|
continue;
|
|
3567
3563
|
let h;
|
|
3568
|
-
|
|
3564
|
+
c.instance && (hn(c.latestValues) && c.updateSnapshot(), h = j(), J(h, c.measurePageBox())), js(a, c.latestValues, (l = c.snapshot) == null ? void 0 : l.layoutBox, h);
|
|
3569
3565
|
}
|
|
3570
|
-
return gt(this.latestValues) &&
|
|
3566
|
+
return gt(this.latestValues) && js(a, this.latestValues), a;
|
|
3571
3567
|
}
|
|
3572
3568
|
setTargetDelta(o) {
|
|
3573
3569
|
this.targetDelta = o, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -3589,25 +3585,25 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3589
3585
|
var d;
|
|
3590
3586
|
const a = this.getLead();
|
|
3591
3587
|
this.isProjectionDirty || (this.isProjectionDirty = a.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = a.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = a.isSharedProjectionDirty);
|
|
3592
|
-
const
|
|
3593
|
-
if (!(o ||
|
|
3588
|
+
const l = !!this.resumingFrom || this !== a;
|
|
3589
|
+
if (!(o || l && this.isSharedProjectionDirty || this.isProjectionDirty || (d = this.parent) != null && d.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
|
|
3594
3590
|
return;
|
|
3595
|
-
const { layout:
|
|
3596
|
-
if (!this.layout || !(
|
|
3591
|
+
const { layout: c, layoutId: h } = this.options;
|
|
3592
|
+
if (!this.layout || !(c || h))
|
|
3597
3593
|
return;
|
|
3598
3594
|
this.resolvedRelativeTargetAt = N.timestamp;
|
|
3599
3595
|
const f = this.getClosestProjectingParent();
|
|
3600
|
-
f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = j(), this.targetWithTransforms = j()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Vc(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : J(this.target, this.layout.layoutBox),
|
|
3596
|
+
f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = j(), this.targetWithTransforms = j()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Vc(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : J(this.target, this.layout.layoutBox), Ao(this.target, this.targetDelta)) : J(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
|
|
3601
3597
|
}
|
|
3602
3598
|
getClosestProjectingParent() {
|
|
3603
|
-
if (!(!this.parent || hn(this.parent.latestValues) ||
|
|
3599
|
+
if (!(!this.parent || hn(this.parent.latestValues) || So(this.parent.latestValues)))
|
|
3604
3600
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
3605
3601
|
}
|
|
3606
3602
|
isProjecting() {
|
|
3607
3603
|
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
3608
3604
|
}
|
|
3609
|
-
createRelativeTarget(o, a,
|
|
3610
|
-
this.relativeParent = o, this.linkedParentVersion = o.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = j(), this.relativeTargetOrigin = j(), we(this.relativeTargetOrigin, a,
|
|
3605
|
+
createRelativeTarget(o, a, l) {
|
|
3606
|
+
this.relativeParent = o, this.linkedParentVersion = o.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = j(), this.relativeTargetOrigin = j(), we(this.relativeTargetOrigin, a, l, this.options.layoutAnchor || void 0), J(this.relativeTarget, this.relativeTargetOrigin);
|
|
3611
3607
|
}
|
|
3612
3608
|
removeRelativeTarget() {
|
|
3613
3609
|
this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -3615,11 +3611,11 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3615
3611
|
calcProjection() {
|
|
3616
3612
|
var p;
|
|
3617
3613
|
const o = this.getLead(), a = !!this.resumingFrom || this !== o;
|
|
3618
|
-
let
|
|
3619
|
-
if ((this.isProjectionDirty || (p = this.parent) != null && p.isProjectionDirty) && (
|
|
3614
|
+
let l = !0;
|
|
3615
|
+
if ((this.isProjectionDirty || (p = this.parent) != null && p.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === N.timestamp && (l = !1), l)
|
|
3620
3616
|
return;
|
|
3621
|
-
const { layout: u, layoutId:
|
|
3622
|
-
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u ||
|
|
3617
|
+
const { layout: u, layoutId: c } = this.options;
|
|
3618
|
+
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || c))
|
|
3623
3619
|
return;
|
|
3624
3620
|
J(this.layoutCorrected, this.layout.layoutBox);
|
|
3625
3621
|
const h = this.treeScale.x, f = this.treeScale.y;
|
|
@@ -3629,7 +3625,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3629
3625
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
3630
3626
|
return;
|
|
3631
3627
|
}
|
|
3632
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
3628
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (ks(this.prevProjectionDelta.x, this.projectionDelta.x), ks(this.prevProjectionDelta.y, this.projectionDelta.y)), Nt(this.projectionDelta, this.layoutCorrected, d, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !zs(this.projectionDelta.x, this.prevProjectionDelta.x) || !zs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", d));
|
|
3633
3629
|
}
|
|
3634
3630
|
hide() {
|
|
3635
3631
|
this.isVisible = !1;
|
|
@@ -3640,37 +3636,35 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3640
3636
|
scheduleRender(o = !0) {
|
|
3641
3637
|
var a;
|
|
3642
3638
|
if ((a = this.options.visualElement) == null || a.scheduleRender(), o) {
|
|
3643
|
-
const
|
|
3644
|
-
|
|
3639
|
+
const l = this.getStack();
|
|
3640
|
+
l && l.scheduleRender();
|
|
3645
3641
|
}
|
|
3646
3642
|
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
3647
3643
|
}
|
|
3648
3644
|
createProjectionDeltas() {
|
|
3649
3645
|
this.prevProjectionDelta = Vt(), this.projectionDelta = Vt(), this.projectionDeltaWithTransform = Vt();
|
|
3650
3646
|
}
|
|
3651
|
-
setAnimationOrigin(o, a = !1,
|
|
3652
|
-
const u = this.snapshot,
|
|
3647
|
+
setAnimationOrigin(o, a = !1, l) {
|
|
3648
|
+
const u = this.snapshot, c = u ? u.latestValues : {}, h = { ...this.latestValues }, f = Vt();
|
|
3653
3649
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
3654
|
-
const d = j(), p = u ? u.source : void 0, g = this.layout ? this.layout.source : void 0, m = p !== g, y = this.getStack(),
|
|
3650
|
+
const d = j(), p = u ? u.source : void 0, g = this.layout ? this.layout.source : void 0, m = p !== g, y = this.getStack(), w = !y || y.members.length <= 1, v = !!(m && !w && this.options.crossfade === !0 && !this.path.some(nu));
|
|
3655
3651
|
this.animationProgress = 0;
|
|
3656
|
-
let
|
|
3657
|
-
const b =
|
|
3652
|
+
let x;
|
|
3653
|
+
const b = l == null ? void 0 : l.interpolateProjection(o);
|
|
3658
3654
|
this.mixTargetDelta = (C) => {
|
|
3659
3655
|
const A = C / 1e3, P = b == null ? void 0 : b(A);
|
|
3660
|
-
P ? (f.x.translate = P.x, f.x.scale = R(o.x.scale, 1, A), f.x.origin = o.x.origin, f.x.originPoint = o.x.originPoint, f.y.translate = P.y, f.y.scale = R(o.y.scale, 1, A), f.y.origin = o.y.origin, f.y.originPoint = o.y.originPoint) : (
|
|
3656
|
+
P ? (f.x.translate = P.x, f.x.scale = R(o.x.scale, 1, A), f.x.origin = o.x.origin, f.x.originPoint = o.x.originPoint, f.y.translate = P.y, f.y.scale = R(o.y.scale, 1, A), f.y.origin = o.y.origin, f.y.originPoint = o.y.originPoint) : (qs(f.x, o.x, A), qs(f.y, o.y, A)), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (we(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), eu(this.relativeTarget, this.relativeTargetOrigin, d, A), x && Ec(this.relativeTarget, x) && (this.isProjectionDirty = !1), x || (x = j()), J(x, this.relativeTarget)), m && (this.animationValues = h, Lc(h, c, this.latestValues, A, v, w)), P && P.rotate !== void 0 && (this.animationValues || (this.animationValues = h), this.animationValues.pathRotation = P.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = A;
|
|
3661
3657
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
3662
3658
|
}
|
|
3663
3659
|
startAnimation(o) {
|
|
3664
|
-
var a,
|
|
3665
|
-
this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (u = (
|
|
3660
|
+
var a, l, u;
|
|
3661
|
+
this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (u = (l = this.resumingFrom) == null ? void 0 : l.currentAnimation) == null || u.stop(), this.pendingAnimation && (ft(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = k.update(() => {
|
|
3666
3662
|
he.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Mt(0)), this.motionValue.jump(0, !1), this.currentAnimation = Fc(this.motionValue, [0, 1e3], {
|
|
3667
3663
|
...o,
|
|
3668
3664
|
velocity: 0,
|
|
3669
3665
|
isSync: !0,
|
|
3670
|
-
onUpdate: (
|
|
3671
|
-
this.mixTargetDelta(
|
|
3672
|
-
},
|
|
3673
|
-
onStop: () => {
|
|
3666
|
+
onUpdate: (c) => {
|
|
3667
|
+
this.mixTargetDelta(c), o.onUpdate && o.onUpdate(c);
|
|
3674
3668
|
},
|
|
3675
3669
|
onComplete: () => {
|
|
3676
3670
|
o.onComplete && o.onComplete(), this.completeAnimation();
|
|
@@ -3688,16 +3682,16 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3688
3682
|
}
|
|
3689
3683
|
applyTransformsToTarget() {
|
|
3690
3684
|
const o = this.getLead();
|
|
3691
|
-
let { targetWithTransforms: a, target:
|
|
3692
|
-
if (!(!a || !
|
|
3685
|
+
let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = o;
|
|
3686
|
+
if (!(!a || !l || !u)) {
|
|
3693
3687
|
if (this !== o && this.layout && u && $o(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
|
|
3694
|
-
|
|
3688
|
+
l = this.target || j();
|
|
3695
3689
|
const h = K(this.layout.layoutBox.x);
|
|
3696
|
-
|
|
3690
|
+
l.x.min = o.target.x.min, l.x.max = l.x.min + h;
|
|
3697
3691
|
const f = K(this.layout.layoutBox.y);
|
|
3698
|
-
|
|
3692
|
+
l.y.min = o.target.y.min, l.y.max = l.y.min + f;
|
|
3699
3693
|
}
|
|
3700
|
-
J(a,
|
|
3694
|
+
J(a, l), ce(a, c), Nt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
|
|
3701
3695
|
}
|
|
3702
3696
|
}
|
|
3703
3697
|
registerSharedNode(o, a) {
|
|
@@ -3727,9 +3721,9 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3727
3721
|
if (o)
|
|
3728
3722
|
return this.root.sharedNodes.get(o);
|
|
3729
3723
|
}
|
|
3730
|
-
promote({ needsReset: o, transition: a, preserveFollowOpacity:
|
|
3724
|
+
promote({ needsReset: o, transition: a, preserveFollowOpacity: l } = {}) {
|
|
3731
3725
|
const u = this.getStack();
|
|
3732
|
-
u && u.promote(this,
|
|
3726
|
+
u && u.promote(this, l), o && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
|
|
3733
3727
|
}
|
|
3734
3728
|
relegate() {
|
|
3735
3729
|
const o = this.getStack();
|
|
@@ -3740,16 +3734,16 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3740
3734
|
if (!o)
|
|
3741
3735
|
return;
|
|
3742
3736
|
let a = !1;
|
|
3743
|
-
const { latestValues:
|
|
3744
|
-
if ((
|
|
3737
|
+
const { latestValues: l } = o;
|
|
3738
|
+
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
|
|
3745
3739
|
return;
|
|
3746
3740
|
const u = {};
|
|
3747
|
-
|
|
3748
|
-
for (let
|
|
3749
|
-
Oe(`rotate${Fe[
|
|
3741
|
+
l.z && Oe("z", o, u, this.animationValues);
|
|
3742
|
+
for (let c = 0; c < Fe.length; c++)
|
|
3743
|
+
Oe(`rotate${Fe[c]}`, o, u, this.animationValues), Oe(`skew${Fe[c]}`, o, u, this.animationValues);
|
|
3750
3744
|
o.render();
|
|
3751
|
-
for (const
|
|
3752
|
-
o.setStaticValue(
|
|
3745
|
+
for (const c in u)
|
|
3746
|
+
o.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
|
|
3753
3747
|
o.scheduleRender();
|
|
3754
3748
|
}
|
|
3755
3749
|
applyProjectionStyles(o, a) {
|
|
@@ -3759,33 +3753,33 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3759
3753
|
o.visibility = "hidden";
|
|
3760
3754
|
return;
|
|
3761
3755
|
}
|
|
3762
|
-
const
|
|
3756
|
+
const l = this.getTransformTemplate();
|
|
3763
3757
|
if (this.needsReset) {
|
|
3764
|
-
this.needsReset = !1, o.visibility = "", o.opacity = "", o.pointerEvents = ue(a == null ? void 0 : a.pointerEvents) || "", o.transform =
|
|
3758
|
+
this.needsReset = !1, o.visibility = "", o.opacity = "", o.pointerEvents = ue(a == null ? void 0 : a.pointerEvents) || "", o.transform = l ? l(this.latestValues, "") : "none";
|
|
3765
3759
|
return;
|
|
3766
3760
|
}
|
|
3767
3761
|
const u = this.getLead();
|
|
3768
3762
|
if (!this.projectionDelta || !this.layout || !u.target) {
|
|
3769
|
-
this.options.layoutId && (o.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, o.pointerEvents = ue(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !gt(this.latestValues) && (o.transform =
|
|
3763
|
+
this.options.layoutId && (o.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, o.pointerEvents = ue(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !gt(this.latestValues) && (o.transform = l ? l({}, "") : "none", this.hasProjected = !1);
|
|
3770
3764
|
return;
|
|
3771
3765
|
}
|
|
3772
3766
|
o.visibility = "";
|
|
3773
|
-
const
|
|
3767
|
+
const c = u.animationValues || u.latestValues;
|
|
3774
3768
|
this.applyTransformsToTarget();
|
|
3775
|
-
let h = Rc(this.projectionDeltaWithTransform, this.treeScale,
|
|
3776
|
-
|
|
3769
|
+
let h = Rc(this.projectionDeltaWithTransform, this.treeScale, c);
|
|
3770
|
+
l && (h = l(c, h)), o.transform = h;
|
|
3777
3771
|
const { x: f, y: d } = this.projectionDelta;
|
|
3778
|
-
o.transformOrigin = `${f.origin * 100}% ${d.origin * 100}% 0`, u.animationValues ? o.opacity = u === this ?
|
|
3772
|
+
o.transformOrigin = `${f.origin * 100}% ${d.origin * 100}% 0`, u.animationValues ? o.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : o.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
|
|
3779
3773
|
for (const p in dn) {
|
|
3780
|
-
if (
|
|
3774
|
+
if (c[p] === void 0)
|
|
3781
3775
|
continue;
|
|
3782
|
-
const { correct: g, applyTo: m, isCSSVariable: y } = dn[p],
|
|
3776
|
+
const { correct: g, applyTo: m, isCSSVariable: y } = dn[p], w = h === "none" ? c[p] : g(c[p], u);
|
|
3783
3777
|
if (m) {
|
|
3784
3778
|
const v = m.length;
|
|
3785
|
-
for (let
|
|
3786
|
-
o[m[
|
|
3779
|
+
for (let x = 0; x < v; x++)
|
|
3780
|
+
o[m[x]] = w;
|
|
3787
3781
|
} else
|
|
3788
|
-
y ? this.options.visualElement.renderState.vars[p] =
|
|
3782
|
+
y ? this.options.visualElement.renderState.vars[p] = w : o[p] = w;
|
|
3789
3783
|
}
|
|
3790
3784
|
this.options.layoutId && (o.pointerEvents = u === this ? ue(a == null ? void 0 : a.pointerEvents) || "" : "none");
|
|
3791
3785
|
}
|
|
@@ -3797,14 +3791,14 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3797
3791
|
this.root.nodes.forEach((o) => {
|
|
3798
3792
|
var a;
|
|
3799
3793
|
return (a = o.currentAnimation) == null ? void 0 : a.stop();
|
|
3800
|
-
}), this.root.nodes.forEach(
|
|
3794
|
+
}), this.root.nodes.forEach(_s), this.root.sharedNodes.clear();
|
|
3801
3795
|
}
|
|
3802
3796
|
};
|
|
3803
3797
|
}
|
|
3804
|
-
function
|
|
3798
|
+
function zc(t) {
|
|
3805
3799
|
t.updateLayout();
|
|
3806
3800
|
}
|
|
3807
|
-
function
|
|
3801
|
+
function Kc(t) {
|
|
3808
3802
|
var n;
|
|
3809
3803
|
const e = ((n = t.resumeFrom) == null ? void 0 : n.snapshot) || t.snapshot;
|
|
3810
3804
|
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
@@ -3823,10 +3817,10 @@ function zc(t) {
|
|
|
3823
3817
|
});
|
|
3824
3818
|
const a = Vt();
|
|
3825
3819
|
Nt(a, s, e.layoutBox);
|
|
3826
|
-
const
|
|
3827
|
-
o ? Nt(
|
|
3828
|
-
const u = !
|
|
3829
|
-
let
|
|
3820
|
+
const l = Vt();
|
|
3821
|
+
o ? Nt(l, t.applyTransform(i, !0), e.measuredBox) : Nt(l, s, e.layoutBox);
|
|
3822
|
+
const u = !Oo(a);
|
|
3823
|
+
let c = !1;
|
|
3830
3824
|
if (!t.resumeFrom) {
|
|
3831
3825
|
const h = t.getClosestProjectingParent();
|
|
3832
3826
|
if (h && !h.resumeFrom) {
|
|
@@ -3835,17 +3829,17 @@ function zc(t) {
|
|
|
3835
3829
|
const p = t.options.layoutAnchor || void 0, g = j();
|
|
3836
3830
|
we(g, e.layoutBox, f.layoutBox, p);
|
|
3837
3831
|
const m = j();
|
|
3838
|
-
we(m, s, d.layoutBox, p),
|
|
3832
|
+
we(m, s, d.layoutBox, p), jo(g, m) || (c = !0), h.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = g, t.relativeParent = h);
|
|
3839
3833
|
}
|
|
3840
3834
|
}
|
|
3841
3835
|
}
|
|
3842
3836
|
t.notifyListeners("didUpdate", {
|
|
3843
3837
|
layout: s,
|
|
3844
3838
|
snapshot: e,
|
|
3845
|
-
delta:
|
|
3839
|
+
delta: l,
|
|
3846
3840
|
layoutDelta: a,
|
|
3847
3841
|
hasLayoutChanged: u,
|
|
3848
|
-
hasRelativeLayoutChanged:
|
|
3842
|
+
hasRelativeLayoutChanged: c
|
|
3849
3843
|
});
|
|
3850
3844
|
} else if (t.isLead()) {
|
|
3851
3845
|
const { onExitComplete: s } = t.options;
|
|
@@ -3862,13 +3856,13 @@ function Hc(t) {
|
|
|
3862
3856
|
function _c(t) {
|
|
3863
3857
|
t.clearSnapshot();
|
|
3864
3858
|
}
|
|
3865
|
-
function
|
|
3859
|
+
function _s(t) {
|
|
3866
3860
|
t.clearMeasurements();
|
|
3867
3861
|
}
|
|
3868
3862
|
function Yc(t) {
|
|
3869
3863
|
t.isLayoutDirty = !0, t.updateLayout();
|
|
3870
3864
|
}
|
|
3871
|
-
function
|
|
3865
|
+
function Ys(t) {
|
|
3872
3866
|
t.isLayoutDirty = !1;
|
|
3873
3867
|
}
|
|
3874
3868
|
function Xc(t) {
|
|
@@ -3878,7 +3872,7 @@ function qc(t) {
|
|
|
3878
3872
|
const { visualElement: e } = t.options;
|
|
3879
3873
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
3880
3874
|
}
|
|
3881
|
-
function
|
|
3875
|
+
function Xs(t) {
|
|
3882
3876
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
3883
3877
|
}
|
|
3884
3878
|
function Zc(t) {
|
|
@@ -3893,14 +3887,14 @@ function Qc(t) {
|
|
|
3893
3887
|
function tu(t) {
|
|
3894
3888
|
t.removeLeadSnapshot();
|
|
3895
3889
|
}
|
|
3896
|
-
function
|
|
3890
|
+
function qs(t, e, n) {
|
|
3897
3891
|
t.translate = R(e.translate, 0, n), t.scale = R(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
3898
3892
|
}
|
|
3899
|
-
function
|
|
3893
|
+
function Zs(t, e, n, s) {
|
|
3900
3894
|
t.min = R(e.min, n.min, s), t.max = R(e.max, n.max, s);
|
|
3901
3895
|
}
|
|
3902
3896
|
function eu(t, e, n, s) {
|
|
3903
|
-
|
|
3897
|
+
Zs(t.x, e.x, n.x, s), Zs(t.y, e.y, n.y, s);
|
|
3904
3898
|
}
|
|
3905
3899
|
function nu(t) {
|
|
3906
3900
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
@@ -3908,15 +3902,15 @@ function nu(t) {
|
|
|
3908
3902
|
const su = {
|
|
3909
3903
|
duration: 0.45,
|
|
3910
3904
|
ease: [0.4, 0, 0.1, 1]
|
|
3911
|
-
},
|
|
3912
|
-
function
|
|
3913
|
-
t.min =
|
|
3905
|
+
}, Js = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Qs = Js("applewebkit/") && !Js("chrome/") ? Math.round : q;
|
|
3906
|
+
function ti(t) {
|
|
3907
|
+
t.min = Qs(t.min), t.max = Qs(t.max);
|
|
3914
3908
|
}
|
|
3915
3909
|
function iu(t) {
|
|
3916
|
-
|
|
3910
|
+
ti(t.x), ti(t.y);
|
|
3917
3911
|
}
|
|
3918
3912
|
function $o(t, e, n) {
|
|
3919
|
-
return t === "position" || t === "preserve-aspect" && !Ac(
|
|
3913
|
+
return t === "position" || t === "preserve-aspect" && !Ac($s(e), $s(n), 0.2);
|
|
3920
3914
|
}
|
|
3921
3915
|
function ou(t) {
|
|
3922
3916
|
var e;
|
|
@@ -3934,7 +3928,7 @@ const ru = Wo({
|
|
|
3934
3928
|
checkIsScrollRoot: () => !0
|
|
3935
3929
|
}), je = {
|
|
3936
3930
|
current: void 0
|
|
3937
|
-
},
|
|
3931
|
+
}, zo = Wo({
|
|
3938
3932
|
measureScroll: (t) => ({
|
|
3939
3933
|
x: t.scrollLeft,
|
|
3940
3934
|
y: t.scrollTop
|
|
@@ -3950,12 +3944,12 @@ const ru = Wo({
|
|
|
3950
3944
|
t.style.transform = e !== void 0 ? e : "none";
|
|
3951
3945
|
},
|
|
3952
3946
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
3953
|
-
}),
|
|
3947
|
+
}), Hn = Dt({
|
|
3954
3948
|
transformPagePoint: (t) => t,
|
|
3955
3949
|
isStatic: !1,
|
|
3956
3950
|
reducedMotion: "never"
|
|
3957
3951
|
});
|
|
3958
|
-
function
|
|
3952
|
+
function ei(t, e) {
|
|
3959
3953
|
if (typeof t == "function")
|
|
3960
3954
|
return t(e);
|
|
3961
3955
|
t != null && (t.current = e);
|
|
@@ -3964,14 +3958,14 @@ function au(...t) {
|
|
|
3964
3958
|
return (e) => {
|
|
3965
3959
|
let n = !1;
|
|
3966
3960
|
const s = t.map((i) => {
|
|
3967
|
-
const r =
|
|
3961
|
+
const r = ei(i, e);
|
|
3968
3962
|
return !n && typeof r == "function" && (n = !0), r;
|
|
3969
3963
|
});
|
|
3970
3964
|
if (n)
|
|
3971
3965
|
return () => {
|
|
3972
3966
|
for (let i = 0; i < s.length; i++) {
|
|
3973
3967
|
const r = s[i];
|
|
3974
|
-
typeof r == "function" ? r() :
|
|
3968
|
+
typeof r == "function" ? r() : ei(t[i], null);
|
|
3975
3969
|
}
|
|
3976
3970
|
};
|
|
3977
3971
|
};
|
|
@@ -3999,7 +3993,7 @@ class cu extends Pe.Component {
|
|
|
3999
3993
|
}
|
|
4000
3994
|
function uu({ children: t, isPresent: e, anchorX: n, anchorY: s, root: i, pop: r }) {
|
|
4001
3995
|
var f;
|
|
4002
|
-
const o = yn(), a =
|
|
3996
|
+
const o = yn(), a = $(null), l = $({
|
|
4003
3997
|
width: 0,
|
|
4004
3998
|
height: 0,
|
|
4005
3999
|
top: 0,
|
|
@@ -4007,12 +4001,12 @@ function uu({ children: t, isPresent: e, anchorX: n, anchorY: s, root: i, pop: r
|
|
|
4007
4001
|
right: 0,
|
|
4008
4002
|
bottom: 0,
|
|
4009
4003
|
direction: "ltr"
|
|
4010
|
-
}), { nonce: u } = W(
|
|
4004
|
+
}), { nonce: u } = W(Hn), c = ((f = t.props) == null ? void 0 : f.ref) ?? (t == null ? void 0 : t.ref), h = lu(a, c);
|
|
4011
4005
|
return vn(() => {
|
|
4012
|
-
const { width: d, height: p, top: g, left: m, right: y, bottom:
|
|
4006
|
+
const { width: d, height: p, top: g, left: m, right: y, bottom: w, direction: v } = l.current;
|
|
4013
4007
|
if (e || r === !1 || !a.current || !d || !p)
|
|
4014
4008
|
return;
|
|
4015
|
-
const
|
|
4009
|
+
const x = v === "rtl", b = n === "left" ? x ? `right: ${y}` : `left: ${m}` : x ? `left: ${m}` : `right: ${y}`, C = s === "bottom" ? `bottom: ${w}` : `top: ${g}`;
|
|
4016
4010
|
a.current.dataset.motionPopId = o;
|
|
4017
4011
|
const A = document.createElement("style");
|
|
4018
4012
|
u && (A.nonce = u);
|
|
@@ -4029,34 +4023,40 @@ function uu({ children: t, isPresent: e, anchorX: n, anchorY: s, root: i, pop: r
|
|
|
4029
4023
|
var V;
|
|
4030
4024
|
(V = a.current) == null || V.removeAttribute("data-motion-pop-id"), P.contains(A) && P.removeChild(A);
|
|
4031
4025
|
};
|
|
4032
|
-
}, [e]), E(cu, { isPresent: e, childRef: a, sizeRef:
|
|
4026
|
+
}, [e]), E(cu, { isPresent: e, childRef: a, sizeRef: l, pop: r, children: r === !1 ? t : Pe.cloneElement(t, { ref: h }) });
|
|
4033
4027
|
}
|
|
4034
|
-
const hu = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: r, mode: o, anchorX: a, anchorY:
|
|
4035
|
-
const
|
|
4036
|
-
|
|
4028
|
+
const hu = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: r, mode: o, anchorX: a, anchorY: l, root: u }) => {
|
|
4029
|
+
const c = wn(fu), h = yn(), f = $(n), d = $(s);
|
|
4030
|
+
Tn(() => {
|
|
4031
|
+
f.current = n, d.current = s;
|
|
4032
|
+
});
|
|
4033
|
+
let p = !0, g = at(() => (p = !1, {
|
|
4037
4034
|
id: h,
|
|
4038
4035
|
initial: e,
|
|
4039
4036
|
isPresent: n,
|
|
4040
4037
|
custom: i,
|
|
4041
|
-
onExitComplete: (
|
|
4042
|
-
|
|
4043
|
-
for (const
|
|
4044
|
-
if (!
|
|
4038
|
+
onExitComplete: (m) => {
|
|
4039
|
+
c.set(m, !0);
|
|
4040
|
+
for (const y of c.values())
|
|
4041
|
+
if (!y)
|
|
4045
4042
|
return;
|
|
4046
4043
|
s && s();
|
|
4047
4044
|
},
|
|
4048
|
-
register: (
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4045
|
+
register: (m) => (c.set(m, !1), () => {
|
|
4046
|
+
var y;
|
|
4047
|
+
c.delete(m), !f.current && !c.size && ((y = d.current) == null || y.call(d));
|
|
4048
|
+
})
|
|
4049
|
+
}), [n, c, s]);
|
|
4050
|
+
return r && p && (g = { ...g }), at(() => {
|
|
4051
|
+
c.forEach((m, y) => c.set(y, !1));
|
|
4052
4052
|
}, [n]), Pe.useEffect(() => {
|
|
4053
|
-
!n && !
|
|
4054
|
-
}, [n]), t = E(uu, { pop: o === "popLayout", isPresent: n, anchorX: a, anchorY:
|
|
4053
|
+
!n && !c.size && s && s();
|
|
4054
|
+
}, [n]), t = E(uu, { pop: o === "popLayout", isPresent: n, anchorX: a, anchorY: l, root: u, children: t }), E(be.Provider, { value: g, children: t });
|
|
4055
4055
|
};
|
|
4056
4056
|
function fu() {
|
|
4057
4057
|
return /* @__PURE__ */ new Map();
|
|
4058
4058
|
}
|
|
4059
|
-
function
|
|
4059
|
+
function Ko(t = !0) {
|
|
4060
4060
|
const e = W(be);
|
|
4061
4061
|
if (e === null)
|
|
4062
4062
|
return [!0, null];
|
|
@@ -4065,38 +4065,38 @@ function zo(t = !0) {
|
|
|
4065
4065
|
if (t)
|
|
4066
4066
|
return i(r);
|
|
4067
4067
|
}, [t]);
|
|
4068
|
-
const o =
|
|
4068
|
+
const o = yi(() => t && s && s(r), [r, s, t]);
|
|
4069
4069
|
return !n && s ? [!1, o] : [!0];
|
|
4070
4070
|
}
|
|
4071
4071
|
const ee = (t) => t.key || "";
|
|
4072
|
-
function
|
|
4072
|
+
function ni(t) {
|
|
4073
4073
|
const e = [];
|
|
4074
4074
|
return ur.forEach(t, (n) => {
|
|
4075
4075
|
hr(n) && e.push(n);
|
|
4076
4076
|
}), e;
|
|
4077
4077
|
}
|
|
4078
|
-
const du = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: r = "sync", propagate: o = !1, anchorX: a = "left", anchorY:
|
|
4079
|
-
const [
|
|
4080
|
-
|
|
4078
|
+
const du = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: r = "sync", propagate: o = !1, anchorX: a = "left", anchorY: l = "top", root: u }) => {
|
|
4079
|
+
const [c, h] = Ko(o), f = at(() => ni(t), [t]), d = o && !c ? [] : f.map(ee), p = $(!0), g = $(f), m = wn(() => /* @__PURE__ */ new Map()), y = $(/* @__PURE__ */ new Set()), [w, v] = Ot(f), [x, b] = Ot(f);
|
|
4080
|
+
Tn(() => {
|
|
4081
4081
|
p.current = !1, g.current = f;
|
|
4082
|
-
for (let P = 0; P <
|
|
4083
|
-
const V = ee(
|
|
4082
|
+
for (let P = 0; P < x.length; P++) {
|
|
4083
|
+
const V = ee(x[P]);
|
|
4084
4084
|
d.includes(V) ? (m.delete(V), y.current.delete(V)) : m.get(V) !== !0 && m.set(V, !1);
|
|
4085
4085
|
}
|
|
4086
|
-
}, [
|
|
4086
|
+
}, [x, d.length, d.join("-")]);
|
|
4087
4087
|
const C = [];
|
|
4088
|
-
if (f !==
|
|
4088
|
+
if (f !== w) {
|
|
4089
4089
|
let P = [...f];
|
|
4090
|
-
for (let V = 0; V <
|
|
4091
|
-
const S =
|
|
4090
|
+
for (let V = 0; V < x.length; V++) {
|
|
4091
|
+
const S = x[V], D = ee(S);
|
|
4092
4092
|
d.includes(D) || (P.splice(V, 0, S), C.push(S));
|
|
4093
4093
|
}
|
|
4094
|
-
return r === "wait" && C.length && (P = C), b(
|
|
4094
|
+
return r === "wait" && C.length && (P = C), b(ni(P)), v(f), null;
|
|
4095
4095
|
}
|
|
4096
|
-
process.env.NODE_ENV !== "production" && r === "wait" &&
|
|
4096
|
+
process.env.NODE_ENV !== "production" && r === "wait" && x.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.`);
|
|
4097
4097
|
const { forceRender: A } = W(xn);
|
|
4098
|
-
return E(ir, { children:
|
|
4099
|
-
const V = ee(P), S = o && !
|
|
4098
|
+
return E(ir, { children: x.map((P) => {
|
|
4099
|
+
const V = ee(P), S = o && !c ? !1 : f === x || d.includes(V), D = () => {
|
|
4100
4100
|
if (y.current.has(V))
|
|
4101
4101
|
return;
|
|
4102
4102
|
if (m.has(V))
|
|
@@ -4108,9 +4108,9 @@ const du = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presen
|
|
|
4108
4108
|
Z || (F = !1);
|
|
4109
4109
|
}), F && (A == null || A(), b(g.current), o && (h == null || h()), s && s());
|
|
4110
4110
|
};
|
|
4111
|
-
return E(hu, { isPresent: S, initial: !p.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: r, root: u, onExitComplete: S ? void 0 : D, anchorX: a, anchorY:
|
|
4111
|
+
return E(hu, { isPresent: S, initial: !p.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: r, root: u, onExitComplete: S ? void 0 : D, anchorX: a, anchorY: l, children: P }, V);
|
|
4112
4112
|
}) });
|
|
4113
|
-
}, Go = Dt({ strict: !1 }),
|
|
4113
|
+
}, Go = Dt({ strict: !1 }), si = {
|
|
4114
4114
|
animation: [
|
|
4115
4115
|
"animate",
|
|
4116
4116
|
"variants",
|
|
@@ -4130,16 +4130,16 @@ const du = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presen
|
|
|
4130
4130
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
4131
4131
|
layout: ["layout", "layoutId"]
|
|
4132
4132
|
};
|
|
4133
|
-
let
|
|
4133
|
+
let ii = !1;
|
|
4134
4134
|
function pu() {
|
|
4135
|
-
if (
|
|
4135
|
+
if (ii)
|
|
4136
4136
|
return;
|
|
4137
4137
|
const t = {};
|
|
4138
|
-
for (const e in
|
|
4138
|
+
for (const e in si)
|
|
4139
4139
|
t[e] = {
|
|
4140
|
-
isEnabled: (n) =>
|
|
4140
|
+
isEnabled: (n) => si[e].some((s) => !!n[s])
|
|
4141
4141
|
};
|
|
4142
|
-
|
|
4142
|
+
To(t), ii = !0;
|
|
4143
4143
|
}
|
|
4144
4144
|
function Ho() {
|
|
4145
4145
|
return pu(), Zl();
|
|
@@ -4151,7 +4151,7 @@ function mu(t) {
|
|
|
4151
4151
|
...e[n],
|
|
4152
4152
|
...t[n]
|
|
4153
4153
|
};
|
|
4154
|
-
|
|
4154
|
+
To(e);
|
|
4155
4155
|
}
|
|
4156
4156
|
const gu = /* @__PURE__ */ new Set([
|
|
4157
4157
|
"animate",
|
|
@@ -4209,20 +4209,20 @@ function xu(t, e) {
|
|
|
4209
4209
|
if (Ve(t)) {
|
|
4210
4210
|
const { initial: n, animate: s } = t;
|
|
4211
4211
|
return {
|
|
4212
|
-
initial: n === !1 ||
|
|
4213
|
-
animate:
|
|
4212
|
+
initial: n === !1 || Kt(n) ? n : void 0,
|
|
4213
|
+
animate: Kt(s) ? s : void 0
|
|
4214
4214
|
};
|
|
4215
4215
|
}
|
|
4216
4216
|
return t.inherit !== !1 ? e : {};
|
|
4217
4217
|
}
|
|
4218
4218
|
function wu(t) {
|
|
4219
4219
|
const { initial: e, animate: n } = xu(t, W(Ce));
|
|
4220
|
-
return at(() => ({ initial: e, animate: n }), [
|
|
4220
|
+
return at(() => ({ initial: e, animate: n }), [oi(e), oi(n)]);
|
|
4221
4221
|
}
|
|
4222
|
-
function
|
|
4222
|
+
function oi(t) {
|
|
4223
4223
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
4224
4224
|
}
|
|
4225
|
-
const
|
|
4225
|
+
const _n = () => ({
|
|
4226
4226
|
style: {},
|
|
4227
4227
|
transform: {},
|
|
4228
4228
|
transformOrigin: {},
|
|
@@ -4230,12 +4230,12 @@ const Gn = () => ({
|
|
|
4230
4230
|
});
|
|
4231
4231
|
function Yo(t, e, n) {
|
|
4232
4232
|
for (const s in e)
|
|
4233
|
-
!U(e[s]) && !
|
|
4233
|
+
!U(e[s]) && !Mo(s, n) && (t[s] = e[s]);
|
|
4234
4234
|
}
|
|
4235
4235
|
function Tu({ transformTemplate: t }, e) {
|
|
4236
4236
|
return at(() => {
|
|
4237
|
-
const n =
|
|
4238
|
-
return
|
|
4237
|
+
const n = _n();
|
|
4238
|
+
return Kn(n, e, t), Object.assign({}, n.vars, n.style);
|
|
4239
4239
|
}, [e]);
|
|
4240
4240
|
}
|
|
4241
4241
|
function Pu(t, e) {
|
|
@@ -4247,13 +4247,13 @@ function bu(t, e) {
|
|
|
4247
4247
|
return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = s, n;
|
|
4248
4248
|
}
|
|
4249
4249
|
const Xo = () => ({
|
|
4250
|
-
...
|
|
4250
|
+
..._n(),
|
|
4251
4251
|
attrs: {}
|
|
4252
4252
|
});
|
|
4253
4253
|
function Su(t, e, n, s) {
|
|
4254
4254
|
const i = at(() => {
|
|
4255
4255
|
const r = Xo();
|
|
4256
|
-
return
|
|
4256
|
+
return Do(r, e, Ro(s), t.transformTemplate, t.style), {
|
|
4257
4257
|
...r.attrs,
|
|
4258
4258
|
style: { ...r.style }
|
|
4259
4259
|
};
|
|
@@ -4291,7 +4291,7 @@ const Au = [
|
|
|
4291
4291
|
"use",
|
|
4292
4292
|
"view"
|
|
4293
4293
|
];
|
|
4294
|
-
function
|
|
4294
|
+
function Yn(t) {
|
|
4295
4295
|
return (
|
|
4296
4296
|
/**
|
|
4297
4297
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
@@ -4312,9 +4312,9 @@ function Hn(t) {
|
|
|
4312
4312
|
);
|
|
4313
4313
|
}
|
|
4314
4314
|
function Vu(t, e, n, { latestValues: s }, i, r = !1, o) {
|
|
4315
|
-
const
|
|
4315
|
+
const l = (o ?? Yn(t) ? Su : bu)(e, s, i, t), u = vu(e, typeof t == "string", r), c = t !== vi ? { ...u, ...l, ref: n } : {}, { children: h } = e, f = at(() => U(h) ? h.get() : h, [h]);
|
|
4316
4316
|
return fr(t, {
|
|
4317
|
-
...
|
|
4317
|
+
...c,
|
|
4318
4318
|
children: f
|
|
4319
4319
|
});
|
|
4320
4320
|
}
|
|
@@ -4329,27 +4329,27 @@ function Mu(t, e, n, s) {
|
|
|
4329
4329
|
for (const f in r)
|
|
4330
4330
|
i[f] = ue(r[f]);
|
|
4331
4331
|
let { initial: o, animate: a } = t;
|
|
4332
|
-
const
|
|
4333
|
-
e && u && !
|
|
4334
|
-
let
|
|
4335
|
-
|
|
4336
|
-
const h =
|
|
4332
|
+
const l = Ve(t), u = xo(t);
|
|
4333
|
+
e && u && !l && t.inherit !== !1 && (o === void 0 && (o = e.initial), a === void 0 && (a = e.animate));
|
|
4334
|
+
let c = n ? n.initial === !1 : !1;
|
|
4335
|
+
c = c || o === !1;
|
|
4336
|
+
const h = c ? a : o;
|
|
4337
4337
|
if (h && typeof h != "boolean" && !Ae(h)) {
|
|
4338
4338
|
const f = Array.isArray(h) ? h : [h];
|
|
4339
4339
|
for (let d = 0; d < f.length; d++) {
|
|
4340
|
-
const p =
|
|
4340
|
+
const p = Fn(t, f[d]);
|
|
4341
4341
|
if (p) {
|
|
4342
4342
|
const { transitionEnd: g, transition: m, ...y } = p;
|
|
4343
|
-
for (const
|
|
4344
|
-
let v = y[
|
|
4343
|
+
for (const w in y) {
|
|
4344
|
+
let v = y[w];
|
|
4345
4345
|
if (Array.isArray(v)) {
|
|
4346
|
-
const
|
|
4347
|
-
v = v[
|
|
4346
|
+
const x = c ? v.length - 1 : 0;
|
|
4347
|
+
v = v[x];
|
|
4348
4348
|
}
|
|
4349
|
-
v !== null && (i[
|
|
4349
|
+
v !== null && (i[w] = v);
|
|
4350
4350
|
}
|
|
4351
|
-
for (const
|
|
4352
|
-
i[
|
|
4351
|
+
for (const w in g)
|
|
4352
|
+
i[w] = g[w];
|
|
4353
4353
|
}
|
|
4354
4354
|
}
|
|
4355
4355
|
}
|
|
@@ -4359,26 +4359,26 @@ const qo = (t) => (e, n) => {
|
|
|
4359
4359
|
const s = W(Ce), i = W(be), r = () => Cu(t, e, s, i);
|
|
4360
4360
|
return n ? r() : wn(r);
|
|
4361
4361
|
}, Du = /* @__PURE__ */ qo({
|
|
4362
|
-
scrapeMotionValuesFromProps:
|
|
4363
|
-
createRenderState:
|
|
4362
|
+
scrapeMotionValuesFromProps: Gn,
|
|
4363
|
+
createRenderState: _n
|
|
4364
4364
|
}), Eu = /* @__PURE__ */ qo({
|
|
4365
|
-
scrapeMotionValuesFromProps:
|
|
4365
|
+
scrapeMotionValuesFromProps: ko,
|
|
4366
4366
|
createRenderState: Xo
|
|
4367
4367
|
}), Ru = Symbol.for("motionComponentSymbol");
|
|
4368
|
-
function
|
|
4369
|
-
const s =
|
|
4368
|
+
function ku(t, e, n) {
|
|
4369
|
+
const s = $(n);
|
|
4370
4370
|
vn(() => {
|
|
4371
4371
|
s.current = n;
|
|
4372
4372
|
});
|
|
4373
|
-
const i =
|
|
4374
|
-
return
|
|
4373
|
+
const i = $(null);
|
|
4374
|
+
return yi((r) => {
|
|
4375
4375
|
var a;
|
|
4376
4376
|
r && ((a = t.onMount) == null || a.call(t, r)), e && (r ? e.mount(r) : e.unmount());
|
|
4377
4377
|
const o = s.current;
|
|
4378
4378
|
if (typeof o == "function")
|
|
4379
4379
|
if (r) {
|
|
4380
|
-
const
|
|
4381
|
-
typeof
|
|
4380
|
+
const l = o(r);
|
|
4381
|
+
typeof l == "function" && (i.current = l);
|
|
4382
4382
|
} else i.current ? (i.current(), i.current = null) : o(r);
|
|
4383
4383
|
else o && (o.current = r);
|
|
4384
4384
|
}, [e]);
|
|
@@ -4387,37 +4387,37 @@ const Zo = Dt({});
|
|
|
4387
4387
|
function Pt(t) {
|
|
4388
4388
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
4389
4389
|
}
|
|
4390
|
-
function
|
|
4391
|
-
var v,
|
|
4392
|
-
const { visualElement: o } = W(Ce), a = W(Go),
|
|
4390
|
+
function Lu(t, e, n, s, i, r) {
|
|
4391
|
+
var v, x;
|
|
4392
|
+
const { visualElement: o } = W(Ce), a = W(Go), l = W(be), u = W(Hn), c = u.reducedMotion, h = u.skipAnimations, f = $(null), d = $(!1);
|
|
4393
4393
|
s = s || a.renderer, !f.current && s && (f.current = s(t, {
|
|
4394
4394
|
visualState: e,
|
|
4395
4395
|
parent: o,
|
|
4396
4396
|
props: n,
|
|
4397
|
-
presenceContext:
|
|
4398
|
-
blockInitialAnimation:
|
|
4399
|
-
reducedMotionConfig:
|
|
4397
|
+
presenceContext: l,
|
|
4398
|
+
blockInitialAnimation: l ? l.initial === !1 : !1,
|
|
4399
|
+
reducedMotionConfig: c,
|
|
4400
4400
|
skipAnimations: h,
|
|
4401
4401
|
isSVG: r
|
|
4402
4402
|
}), d.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
4403
4403
|
const p = f.current, g = W(Zo);
|
|
4404
4404
|
p && !p.projection && i && (p.type === "html" || p.type === "svg") && Iu(f.current, n, i, g);
|
|
4405
|
-
const m =
|
|
4405
|
+
const m = $(!1);
|
|
4406
4406
|
vn(() => {
|
|
4407
|
-
p && m.current && p.update(n,
|
|
4407
|
+
p && m.current && p.update(n, l);
|
|
4408
4408
|
});
|
|
4409
|
-
const y = n[
|
|
4410
|
-
return
|
|
4411
|
-
d.current = !0, p && (m.current = !0, window.MotionIsMounted = !0, p.updateFeatures(), p.scheduleRenderMicrotask(),
|
|
4409
|
+
const y = n[ro], w = $(!!y && typeof window < "u" && !((v = window.MotionHandoffIsComplete) != null && v.call(window, y)) && ((x = window.MotionHasOptimisedAnimation) == null ? void 0 : x.call(window, y)));
|
|
4410
|
+
return Tn(() => {
|
|
4411
|
+
d.current = !0, p && (m.current = !0, window.MotionIsMounted = !0, p.updateFeatures(), p.scheduleRenderMicrotask(), w.current && p.animationState && p.animationState.animateChanges());
|
|
4412
4412
|
}), Wt(() => {
|
|
4413
|
-
p && (!
|
|
4413
|
+
p && (!w.current && p.animationState && p.animationState.animateChanges(), w.current && (queueMicrotask(() => {
|
|
4414
4414
|
var b;
|
|
4415
4415
|
(b = window.MotionHandoffMarkAsComplete) == null || b.call(window, y);
|
|
4416
|
-
}),
|
|
4416
|
+
}), w.current = !1), p.enteringChildren = void 0);
|
|
4417
4417
|
}), p;
|
|
4418
4418
|
}
|
|
4419
4419
|
function Iu(t, e, n, s) {
|
|
4420
|
-
const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll:
|
|
4420
|
+
const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: l, layoutRoot: u, layoutAnchor: c, layoutCrossfade: h } = e;
|
|
4421
4421
|
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Jo(t.parent)), t.projection.setOptions({
|
|
4422
4422
|
layoutId: i,
|
|
4423
4423
|
layout: r,
|
|
@@ -4433,9 +4433,9 @@ function Iu(t, e, n, s) {
|
|
|
4433
4433
|
animationType: typeof r == "string" ? r : "both",
|
|
4434
4434
|
initialPromotionConfig: s,
|
|
4435
4435
|
crossfade: h,
|
|
4436
|
-
layoutScroll:
|
|
4436
|
+
layoutScroll: l,
|
|
4437
4437
|
layoutRoot: u,
|
|
4438
|
-
layoutAnchor:
|
|
4438
|
+
layoutAnchor: c
|
|
4439
4439
|
});
|
|
4440
4440
|
}
|
|
4441
4441
|
function Jo(t) {
|
|
@@ -4444,24 +4444,24 @@ function Jo(t) {
|
|
|
4444
4444
|
}
|
|
4445
4445
|
function Ne(t, { forwardMotionProps: e = !1, type: n } = {}, s, i) {
|
|
4446
4446
|
s && mu(s);
|
|
4447
|
-
const r = n ? n === "svg" :
|
|
4448
|
-
function a(u,
|
|
4447
|
+
const r = n ? n === "svg" : Yn(t), o = r ? Eu : Du;
|
|
4448
|
+
function a(u, c) {
|
|
4449
4449
|
let h;
|
|
4450
4450
|
const f = {
|
|
4451
|
-
...W(
|
|
4451
|
+
...W(Hn),
|
|
4452
4452
|
...u,
|
|
4453
4453
|
layoutId: Bu(u)
|
|
4454
4454
|
}, { isStatic: d } = f, p = wu(u), g = o(u, d);
|
|
4455
4455
|
if (!d && typeof window < "u") {
|
|
4456
4456
|
Fu(f, s);
|
|
4457
4457
|
const m = Ou(f);
|
|
4458
|
-
h = m.MeasureLayout, p.visualElement =
|
|
4458
|
+
h = m.MeasureLayout, p.visualElement = Lu(t, g, f, i, m.ProjectionNode, r);
|
|
4459
4459
|
}
|
|
4460
|
-
return et(Ce.Provider, { value: p, children: [h && p.visualElement ? E(h, { visualElement: p.visualElement, ...f }) : null, Vu(t, u,
|
|
4460
|
+
return et(Ce.Provider, { value: p, children: [h && p.visualElement ? E(h, { visualElement: p.visualElement, ...f }) : null, Vu(t, u, ku(g, p.visualElement, c), g, d, e, r)] });
|
|
4461
4461
|
}
|
|
4462
4462
|
a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
4463
|
-
const
|
|
4464
|
-
return
|
|
4463
|
+
const l = dr(a);
|
|
4464
|
+
return l[Ru] = t, l;
|
|
4465
4465
|
}
|
|
4466
4466
|
function Bu({ layoutId: t }) {
|
|
4467
4467
|
const e = W(xn).id;
|
|
@@ -4487,7 +4487,7 @@ function Ou(t) {
|
|
|
4487
4487
|
function ju(t, e) {
|
|
4488
4488
|
if (typeof Proxy > "u")
|
|
4489
4489
|
return Ne;
|
|
4490
|
-
const n = /* @__PURE__ */ new Map(), s = (r, o) => Ne(r, o, t, e), i = (r, o) => (process.env.NODE_ENV !== "production" &&
|
|
4490
|
+
const n = /* @__PURE__ */ new Map(), s = (r, o) => Ne(r, o, t, e), i = (r, o) => (process.env.NODE_ENV !== "production" && Sn(!1, "motion() is deprecated. Use motion.create() instead."), s(r, o));
|
|
4491
4491
|
return new Proxy(i, {
|
|
4492
4492
|
/**
|
|
4493
4493
|
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
@@ -4497,8 +4497,8 @@ function ju(t, e) {
|
|
|
4497
4497
|
get: (r, o) => o === "create" ? s : (n.has(o) || n.set(o, Ne(o, void 0, t, e)), n.get(o))
|
|
4498
4498
|
});
|
|
4499
4499
|
}
|
|
4500
|
-
const Nu = (t, e) => e.isSVG ??
|
|
4501
|
-
allowProjection: t !==
|
|
4500
|
+
const Nu = (t, e) => e.isSVG ?? Yn(t) ? new pc(e) : new lc(e, {
|
|
4501
|
+
allowProjection: t !== vi
|
|
4502
4502
|
});
|
|
4503
4503
|
class Uu extends dt {
|
|
4504
4504
|
/**
|
|
@@ -4544,9 +4544,9 @@ class $u extends dt {
|
|
|
4544
4544
|
if (this.isExitComplete) {
|
|
4545
4545
|
const { initial: o, custom: a } = this.node.getProps();
|
|
4546
4546
|
if (typeof o == "string" || typeof o == "object" && o !== null && !Array.isArray(o)) {
|
|
4547
|
-
const
|
|
4548
|
-
if (
|
|
4549
|
-
const { transition: u, transitionEnd:
|
|
4547
|
+
const l = wt(this.node, o, a);
|
|
4548
|
+
if (l) {
|
|
4549
|
+
const { transition: u, transitionEnd: c, ...h } = l;
|
|
4550
4550
|
for (const f in h)
|
|
4551
4551
|
(r = this.node.getValue(f)) == null || r.jump(h[f]);
|
|
4552
4552
|
}
|
|
@@ -4569,7 +4569,7 @@ class $u extends dt {
|
|
|
4569
4569
|
unmount() {
|
|
4570
4570
|
}
|
|
4571
4571
|
}
|
|
4572
|
-
const
|
|
4572
|
+
const zu = {
|
|
4573
4573
|
animation: {
|
|
4574
4574
|
Feature: Uu
|
|
4575
4575
|
},
|
|
@@ -4585,49 +4585,51 @@ function Xt(t) {
|
|
|
4585
4585
|
}
|
|
4586
4586
|
};
|
|
4587
4587
|
}
|
|
4588
|
-
const
|
|
4588
|
+
const Ku = (t) => (e) => Un(e) && t(e, Xt(e));
|
|
4589
4589
|
function Ut(t, e, n, s) {
|
|
4590
|
-
return Gt(t, e,
|
|
4590
|
+
return Gt(t, e, Ku(n), s);
|
|
4591
4591
|
}
|
|
4592
|
-
const Qo = ({ current: t }) => t ? t.ownerDocument.defaultView : null,
|
|
4592
|
+
const Qo = ({ current: t }) => t ? t.ownerDocument.defaultView : null, ri = (t, e) => Math.abs(t - e);
|
|
4593
4593
|
function Gu(t, e) {
|
|
4594
|
-
const n =
|
|
4594
|
+
const n = ri(t.x, e.x), s = ri(t.y, e.y);
|
|
4595
4595
|
return Math.sqrt(n ** 2 + s ** 2);
|
|
4596
4596
|
}
|
|
4597
|
-
const
|
|
4597
|
+
const ai = /* @__PURE__ */ new Set(["auto", "scroll"]);
|
|
4598
4598
|
class tr {
|
|
4599
4599
|
constructor(e, n, { transformPagePoint: s, contextWindow: i = window, dragSnapToOrigin: r = !1, distanceThreshold: o = 3, element: a } = {}) {
|
|
4600
|
-
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 = (
|
|
4601
|
-
this.handleScroll(
|
|
4600
|
+
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 = (p) => {
|
|
4601
|
+
this.handleScroll(p.target);
|
|
4602
4602
|
}, this.onWindowScroll = () => {
|
|
4603
4603
|
this.handleScroll(window);
|
|
4604
4604
|
}, this.updatePoint = () => {
|
|
4605
4605
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
4606
4606
|
return;
|
|
4607
4607
|
this.lastRawMoveEventInfo && (this.lastMoveEventInfo = ne(this.lastRawMoveEventInfo, this.transformPagePoint));
|
|
4608
|
-
const
|
|
4609
|
-
if (!
|
|
4608
|
+
const p = Ue(this.lastMoveEventInfo, this.history), g = this.startEvent !== null, m = Gu(p.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
4609
|
+
if (!g && !m)
|
|
4610
4610
|
return;
|
|
4611
|
-
const { point:
|
|
4612
|
-
this.history.push({ ...
|
|
4613
|
-
const { onStart:
|
|
4614
|
-
|
|
4615
|
-
}, this.handlePointerMove = (
|
|
4616
|
-
this.lastMoveEvent =
|
|
4617
|
-
}, this.handlePointerUp = (
|
|
4611
|
+
const { point: y } = p, { timestamp: w } = N;
|
|
4612
|
+
this.history.push({ ...y, timestamp: w });
|
|
4613
|
+
const { onStart: v, onMove: x } = this.handlers;
|
|
4614
|
+
g || (v && v(this.lastMoveEvent, p), this.startEvent = this.lastMoveEvent), x && x(this.lastMoveEvent, p);
|
|
4615
|
+
}, this.handlePointerMove = (p, g) => {
|
|
4616
|
+
this.lastMoveEvent = p, this.lastRawMoveEventInfo = g, this.lastMoveEventInfo = ne(g, this.transformPagePoint), k.update(this.updatePoint, !0);
|
|
4617
|
+
}, this.handlePointerUp = (p, g) => {
|
|
4618
4618
|
this.end();
|
|
4619
|
-
const { onEnd:
|
|
4620
|
-
if ((this.dragSnapToOrigin || !this.startEvent) &&
|
|
4619
|
+
const { onEnd: m, onSessionEnd: y, resumeAnimation: w } = this.handlers;
|
|
4620
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && w && w(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
4621
4621
|
return;
|
|
4622
|
-
const
|
|
4623
|
-
this.startEvent &&
|
|
4624
|
-
}, !
|
|
4622
|
+
const v = Ue(p.type === "pointercancel" ? this.lastMoveEventInfo : ne(g, this.transformPagePoint), this.history);
|
|
4623
|
+
this.startEvent && m && m(p, v), y && y(p, v);
|
|
4624
|
+
}, !Un(e))
|
|
4625
4625
|
return;
|
|
4626
4626
|
this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = o, this.contextWindow = i || window;
|
|
4627
|
-
const
|
|
4628
|
-
this.history = [{ ...
|
|
4627
|
+
const l = Xt(e), u = ne(l, this.transformPagePoint), { point: c } = u, { timestamp: h } = N;
|
|
4628
|
+
this.history = [{ ...c, timestamp: h }];
|
|
4629
4629
|
const { onSessionStart: f } = n;
|
|
4630
|
-
f && f(e, Ue(u, this.history))
|
|
4630
|
+
f && f(e, Ue(u, this.history));
|
|
4631
|
+
const d = { passive: !0, capture: !0 };
|
|
4632
|
+
this.removeListeners = Ht(Ut(this.contextWindow, "pointermove", this.handlePointerMove, d), Ut(this.contextWindow, "pointerup", this.handlePointerUp, d), Ut(this.contextWindow, "pointercancel", this.handlePointerUp, d)), a && this.startScrollTracking(a);
|
|
4631
4633
|
}
|
|
4632
4634
|
/**
|
|
4633
4635
|
* Start tracking scroll on ancestors and window.
|
|
@@ -4636,7 +4638,7 @@ class tr {
|
|
|
4636
4638
|
let n = e.parentElement;
|
|
4637
4639
|
for (; n; ) {
|
|
4638
4640
|
const s = getComputedStyle(n);
|
|
4639
|
-
(
|
|
4641
|
+
(ai.has(s.overflowX) || ai.has(s.overflowY)) && this.scrollPositions.set(n, {
|
|
4640
4642
|
x: n.scrollLeft,
|
|
4641
4643
|
y: n.scrollTop
|
|
4642
4644
|
}), n = n.parentElement;
|
|
@@ -4666,7 +4668,7 @@ class tr {
|
|
|
4666
4668
|
x: e.scrollLeft,
|
|
4667
4669
|
y: e.scrollTop
|
|
4668
4670
|
}, r = { x: i.x - n.x, y: i.y - n.y };
|
|
4669
|
-
r.x === 0 && r.y === 0 || (s ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += r.x, this.lastMoveEventInfo.point.y += r.y) : this.history.length > 0 && (this.history[0].x -= r.x, this.history[0].y -= r.y), this.scrollPositions.set(e, i),
|
|
4671
|
+
r.x === 0 && r.y === 0 || (s ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += r.x, this.lastMoveEventInfo.point.y += r.y) : this.history.length > 0 && (this.history[0].x -= r.x, this.history[0].y -= r.y), this.scrollPositions.set(e, i), k.update(this.updatePoint, !0));
|
|
4670
4672
|
}
|
|
4671
4673
|
updateHandlers(e) {
|
|
4672
4674
|
this.handlers = e;
|
|
@@ -4678,14 +4680,14 @@ class tr {
|
|
|
4678
4680
|
function ne(t, e) {
|
|
4679
4681
|
return e ? { point: e(t.point) } : t;
|
|
4680
4682
|
}
|
|
4681
|
-
function
|
|
4683
|
+
function li(t, e) {
|
|
4682
4684
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
4683
4685
|
}
|
|
4684
4686
|
function Ue({ point: t }, e) {
|
|
4685
4687
|
return {
|
|
4686
4688
|
point: t,
|
|
4687
|
-
delta:
|
|
4688
|
-
offset:
|
|
4689
|
+
delta: li(t, er(e)),
|
|
4690
|
+
offset: li(t, Hu(e)),
|
|
4689
4691
|
velocity: _u(e, 0.1)
|
|
4690
4692
|
};
|
|
4691
4693
|
}
|
|
@@ -4717,7 +4719,7 @@ function _u(t, e) {
|
|
|
4717
4719
|
function Yu(t, { min: e, max: n }, s) {
|
|
4718
4720
|
return e !== void 0 && t < e ? t = s ? R(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? R(n, t, s.max) : Math.min(t, n)), t;
|
|
4719
4721
|
}
|
|
4720
|
-
function
|
|
4722
|
+
function ci(t, e, n) {
|
|
4721
4723
|
return {
|
|
4722
4724
|
min: e !== void 0 ? t.min + e : void 0,
|
|
4723
4725
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
@@ -4725,18 +4727,18 @@ function ai(t, e, n) {
|
|
|
4725
4727
|
}
|
|
4726
4728
|
function Xu(t, { top: e, left: n, bottom: s, right: i }) {
|
|
4727
4729
|
return {
|
|
4728
|
-
x:
|
|
4729
|
-
y:
|
|
4730
|
+
x: ci(t.x, n, i),
|
|
4731
|
+
y: ci(t.y, e, s)
|
|
4730
4732
|
};
|
|
4731
4733
|
}
|
|
4732
|
-
function
|
|
4734
|
+
function ui(t, e) {
|
|
4733
4735
|
let n = e.min - t.min, s = e.max - t.max;
|
|
4734
4736
|
return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
|
|
4735
4737
|
}
|
|
4736
4738
|
function qu(t, e) {
|
|
4737
4739
|
return {
|
|
4738
|
-
x:
|
|
4739
|
-
y:
|
|
4740
|
+
x: ui(t.x, e.x),
|
|
4741
|
+
y: ui(t.y, e.y)
|
|
4740
4742
|
};
|
|
4741
4743
|
}
|
|
4742
4744
|
function Zu(t, e) {
|
|
@@ -4751,17 +4753,17 @@ function Ju(t, e) {
|
|
|
4751
4753
|
const mn = 0.35;
|
|
4752
4754
|
function Qu(t = mn) {
|
|
4753
4755
|
return t === !1 ? t = 0 : t === !0 && (t = mn), {
|
|
4754
|
-
x:
|
|
4755
|
-
y:
|
|
4756
|
+
x: hi(t, "left", "right"),
|
|
4757
|
+
y: hi(t, "top", "bottom")
|
|
4756
4758
|
};
|
|
4757
4759
|
}
|
|
4758
|
-
function
|
|
4760
|
+
function hi(t, e, n) {
|
|
4759
4761
|
return {
|
|
4760
|
-
min:
|
|
4761
|
-
max:
|
|
4762
|
+
min: fi(t, e),
|
|
4763
|
+
max: fi(t, n)
|
|
4762
4764
|
};
|
|
4763
4765
|
}
|
|
4764
|
-
function
|
|
4766
|
+
function fi(t, e) {
|
|
4765
4767
|
return typeof t == "number" ? t : t[e] || 0;
|
|
4766
4768
|
}
|
|
4767
4769
|
const th = /* @__PURE__ */ new WeakMap();
|
|
@@ -4780,16 +4782,16 @@ class eh {
|
|
|
4780
4782
|
if (d && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = Cl(d), !this.openDragLock))
|
|
4781
4783
|
return;
|
|
4782
4784
|
this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), nt((y) => {
|
|
4783
|
-
let
|
|
4784
|
-
if (it.test(
|
|
4785
|
+
let w = this.getAxisMotionValue(y).get() || 0;
|
|
4786
|
+
if (it.test(w)) {
|
|
4785
4787
|
const { projection: v } = this.visualElement;
|
|
4786
4788
|
if (v && v.layout) {
|
|
4787
|
-
const
|
|
4788
|
-
|
|
4789
|
+
const x = v.layout.layoutBox[y];
|
|
4790
|
+
x && (w = K(x) * (parseFloat(w) / 100));
|
|
4789
4791
|
}
|
|
4790
4792
|
}
|
|
4791
|
-
this.originPoint[y] =
|
|
4792
|
-
}), g &&
|
|
4793
|
+
this.originPoint[y] = w;
|
|
4794
|
+
}), g && k.update(() => g(h, f), !1, !0), on(this.visualElement, "transform");
|
|
4793
4795
|
const { animationState: m } = this.visualElement;
|
|
4794
4796
|
m && m.setActive("whileDrag", !0);
|
|
4795
4797
|
}, a = (h, f) => {
|
|
@@ -4802,22 +4804,22 @@ class eh {
|
|
|
4802
4804
|
this.currentDirection = sh(y), this.currentDirection !== null && g && g(this.currentDirection);
|
|
4803
4805
|
return;
|
|
4804
4806
|
}
|
|
4805
|
-
this.updateAxis("x", f.point, y), this.updateAxis("y", f.point, y), this.visualElement.render(), m &&
|
|
4806
|
-
},
|
|
4807
|
+
this.updateAxis("x", f.point, y), this.updateAxis("y", f.point, y), this.visualElement.render(), m && k.update(() => m(h, f), !1, !0);
|
|
4808
|
+
}, l = (h, f) => {
|
|
4807
4809
|
this.latestPointerEvent = h, this.latestPanInfo = f, this.stop(h, f), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
4808
4810
|
}, u = () => {
|
|
4809
4811
|
const { dragSnapToOrigin: h } = this.getProps();
|
|
4810
4812
|
(h || this.constraints) && this.startAnimation({ x: 0, y: 0 });
|
|
4811
|
-
}, { dragSnapToOrigin:
|
|
4813
|
+
}, { dragSnapToOrigin: c } = this.getProps();
|
|
4812
4814
|
this.panSession = new tr(e, {
|
|
4813
4815
|
onSessionStart: r,
|
|
4814
4816
|
onStart: o,
|
|
4815
4817
|
onMove: a,
|
|
4816
|
-
onSessionEnd:
|
|
4818
|
+
onSessionEnd: l,
|
|
4817
4819
|
resumeAnimation: u
|
|
4818
4820
|
}, {
|
|
4819
4821
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
4820
|
-
dragSnapToOrigin:
|
|
4822
|
+
dragSnapToOrigin: c,
|
|
4821
4823
|
distanceThreshold: s,
|
|
4822
4824
|
contextWindow: Qo(this.visualElement),
|
|
4823
4825
|
element: this.visualElement.current
|
|
@@ -4833,7 +4835,7 @@ class eh {
|
|
|
4833
4835
|
const { velocity: o } = i;
|
|
4834
4836
|
this.startAnimation(o);
|
|
4835
4837
|
const { onDragEnd: a } = this.getProps();
|
|
4836
|
-
a &&
|
|
4838
|
+
a && k.postRender(() => a(s, i));
|
|
4837
4839
|
}
|
|
4838
4840
|
/**
|
|
4839
4841
|
* @internal
|
|
@@ -4883,19 +4885,19 @@ class eh {
|
|
|
4883
4885
|
let o = qu(i.layout.layoutBox, r);
|
|
4884
4886
|
if (n) {
|
|
4885
4887
|
const a = n(Ql(o));
|
|
4886
|
-
this.hasMutatedConstraints = !!a, a && (o =
|
|
4888
|
+
this.hasMutatedConstraints = !!a, a && (o = bo(a));
|
|
4887
4889
|
}
|
|
4888
4890
|
return o;
|
|
4889
4891
|
}
|
|
4890
4892
|
startAnimation(e) {
|
|
4891
|
-
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(),
|
|
4892
|
-
if (!se(
|
|
4893
|
+
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = nt((c) => {
|
|
4894
|
+
if (!se(c, n, this.currentDirection))
|
|
4893
4895
|
return;
|
|
4894
|
-
let h =
|
|
4895
|
-
(o === !0 || o ===
|
|
4896
|
+
let h = l && l[c] || {};
|
|
4897
|
+
(o === !0 || o === c) && (h = { min: 0, max: 0 });
|
|
4896
4898
|
const f = i ? 200 : 1e6, d = i ? 40 : 1e7, p = {
|
|
4897
4899
|
type: "inertia",
|
|
4898
|
-
velocity: s ? e[
|
|
4900
|
+
velocity: s ? e[c] : 0,
|
|
4899
4901
|
bounceStiffness: f,
|
|
4900
4902
|
bounceDamping: d,
|
|
4901
4903
|
timeConstant: 750,
|
|
@@ -4904,13 +4906,13 @@ class eh {
|
|
|
4904
4906
|
...r,
|
|
4905
4907
|
...h
|
|
4906
4908
|
};
|
|
4907
|
-
return this.startAxisValueAnimation(
|
|
4909
|
+
return this.startAxisValueAnimation(c, p);
|
|
4908
4910
|
});
|
|
4909
4911
|
return Promise.all(u).then(a);
|
|
4910
4912
|
}
|
|
4911
4913
|
startAxisValueAnimation(e, n) {
|
|
4912
4914
|
const s = this.getAxisMotionValue(e);
|
|
4913
|
-
return on(this.visualElement, e), s.start(
|
|
4915
|
+
return on(this.visualElement, e), s.start(Bn(e, s, 0, n, this.visualElement, !1));
|
|
4914
4916
|
}
|
|
4915
4917
|
stopAnimation() {
|
|
4916
4918
|
nt((e) => this.getAxisMotionValue(e).stop());
|
|
@@ -4932,8 +4934,8 @@ class eh {
|
|
|
4932
4934
|
return;
|
|
4933
4935
|
const { projection: i } = this.visualElement, r = this.getAxisMotionValue(n);
|
|
4934
4936
|
if (i && i.layout) {
|
|
4935
|
-
const { min: o, max: a } = i.layout.layoutBox[n],
|
|
4936
|
-
r.set(e[n] - R(o, a, 0.5) +
|
|
4937
|
+
const { min: o, max: a } = i.layout.layoutBox[n], l = r.get() || 0;
|
|
4938
|
+
r.set(e[n] - R(o, a, 0.5) + l);
|
|
4937
4939
|
}
|
|
4938
4940
|
});
|
|
4939
4941
|
}
|
|
@@ -4953,16 +4955,16 @@ class eh {
|
|
|
4953
4955
|
nt((o) => {
|
|
4954
4956
|
const a = this.getAxisMotionValue(o);
|
|
4955
4957
|
if (a && this.constraints !== !1) {
|
|
4956
|
-
const
|
|
4957
|
-
i[o] = Zu({ min:
|
|
4958
|
+
const l = a.get();
|
|
4959
|
+
i[o] = Zu({ min: l, max: l }, this.constraints[o]);
|
|
4958
4960
|
}
|
|
4959
4961
|
});
|
|
4960
4962
|
const { transformTemplate: r } = this.visualElement.getProps();
|
|
4961
4963
|
this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.constraints = !1, this.resolveConstraints(), nt((o) => {
|
|
4962
4964
|
if (!se(o, e, null))
|
|
4963
4965
|
return;
|
|
4964
|
-
const a = this.getAxisMotionValue(o), { min:
|
|
4965
|
-
a.set(R(
|
|
4966
|
+
const a = this.getAxisMotionValue(o), { min: l, max: u } = this.constraints[o];
|
|
4967
|
+
a.set(R(l, u, i[o]));
|
|
4966
4968
|
}), this.visualElement.render();
|
|
4967
4969
|
}
|
|
4968
4970
|
addListeners() {
|
|
@@ -4970,23 +4972,23 @@ class eh {
|
|
|
4970
4972
|
return;
|
|
4971
4973
|
th.set(this.visualElement, this);
|
|
4972
4974
|
const e = this.visualElement.current, n = Ut(e, "pointerdown", (u) => {
|
|
4973
|
-
const { drag:
|
|
4974
|
-
|
|
4975
|
+
const { drag: c, dragListener: h = !0 } = this.getProps(), f = u.target, d = f !== e && Ll(f);
|
|
4976
|
+
c && h && !d && this.start(u);
|
|
4975
4977
|
});
|
|
4976
4978
|
let s;
|
|
4977
4979
|
const i = () => {
|
|
4978
4980
|
const { dragConstraints: u } = this.getProps();
|
|
4979
4981
|
Pt(u) && u.current && (this.constraints = this.resolveRefConstraints(), s || (s = nh(e, u.current, () => this.scalePositionWithinConstraints())));
|
|
4980
4982
|
}, { projection: r } = this.visualElement, o = r.addEventListener("measure", i);
|
|
4981
|
-
r && !r.layout && (r.root && r.root.updateScroll(), r.updateLayout()),
|
|
4982
|
-
const a = Gt(window, "resize", () => this.scalePositionWithinConstraints()),
|
|
4983
|
-
this.isDragging &&
|
|
4983
|
+
r && !r.layout && (r.root && r.root.updateScroll(), r.updateLayout()), k.read(i);
|
|
4984
|
+
const a = Gt(window, "resize", () => this.scalePositionWithinConstraints()), l = r.addEventListener("didUpdate", (({ delta: u, hasLayoutChanged: c }) => {
|
|
4985
|
+
this.isDragging && c && (nt((h) => {
|
|
4984
4986
|
const f = this.getAxisMotionValue(h);
|
|
4985
4987
|
f && (this.originPoint[h] += u[h].translate, f.set(f.get() + u[h].translate));
|
|
4986
4988
|
}), this.visualElement.render());
|
|
4987
4989
|
}));
|
|
4988
4990
|
return () => {
|
|
4989
|
-
a(), n(), o(),
|
|
4991
|
+
a(), n(), o(), l && l(), s && s();
|
|
4990
4992
|
};
|
|
4991
4993
|
}
|
|
4992
4994
|
getProps() {
|
|
@@ -5002,7 +5004,7 @@ class eh {
|
|
|
5002
5004
|
};
|
|
5003
5005
|
}
|
|
5004
5006
|
}
|
|
5005
|
-
function
|
|
5007
|
+
function di(t) {
|
|
5006
5008
|
let e = !0;
|
|
5007
5009
|
return () => {
|
|
5008
5010
|
if (e) {
|
|
@@ -5013,7 +5015,7 @@ function hi(t) {
|
|
|
5013
5015
|
};
|
|
5014
5016
|
}
|
|
5015
5017
|
function nh(t, e, n) {
|
|
5016
|
-
const s =
|
|
5018
|
+
const s = ws(t, di(n)), i = ws(e, di(n));
|
|
5017
5019
|
return () => {
|
|
5018
5020
|
s(), i();
|
|
5019
5021
|
};
|
|
@@ -5042,7 +5044,7 @@ class ih extends dt {
|
|
|
5042
5044
|
}
|
|
5043
5045
|
}
|
|
5044
5046
|
const We = (t) => (e, n) => {
|
|
5045
|
-
t &&
|
|
5047
|
+
t && k.update(() => t(e, n), !1, !0);
|
|
5046
5048
|
};
|
|
5047
5049
|
class oh extends dt {
|
|
5048
5050
|
constructor() {
|
|
@@ -5061,7 +5063,7 @@ class oh extends dt {
|
|
|
5061
5063
|
onStart: We(n),
|
|
5062
5064
|
onMove: We(s),
|
|
5063
5065
|
onEnd: (r, o) => {
|
|
5064
|
-
delete this.session, i &&
|
|
5066
|
+
delete this.session, i && k.postRender(() => i(r, o));
|
|
5065
5067
|
}
|
|
5066
5068
|
};
|
|
5067
5069
|
}
|
|
@@ -5097,14 +5099,14 @@ class rh extends pr {
|
|
|
5097
5099
|
return o && (o.isPresent = r, e.layoutDependency !== n && o.setOptions({
|
|
5098
5100
|
...o.options,
|
|
5099
5101
|
layoutDependency: n
|
|
5100
|
-
}), $e = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== r ? o.willUpdate() : this.safeToRemove(), e.isPresent !== r && (r ? o.promote() : o.relegate() ||
|
|
5102
|
+
}), $e = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== r ? o.willUpdate() : this.safeToRemove(), e.isPresent !== r && (r ? o.promote() : o.relegate() || k.postRender(() => {
|
|
5101
5103
|
const a = o.getStack();
|
|
5102
5104
|
(!a || !a.members.length) && this.safeToRemove();
|
|
5103
5105
|
}))), null;
|
|
5104
5106
|
}
|
|
5105
5107
|
componentDidUpdate() {
|
|
5106
5108
|
const { visualElement: e, layoutAnchor: n } = this.props, { projection: s } = e;
|
|
5107
|
-
s && (s.options.layoutAnchor = n, s.root.didUpdate(),
|
|
5109
|
+
s && (s.options.layoutAnchor = n, s.root.didUpdate(), Nn.postRender(() => {
|
|
5108
5110
|
!s.currentAnimation && s.isLead() && this.safeToRemove();
|
|
5109
5111
|
}));
|
|
5110
5112
|
}
|
|
@@ -5121,7 +5123,7 @@ class rh extends pr {
|
|
|
5121
5123
|
}
|
|
5122
5124
|
}
|
|
5123
5125
|
function nr(t) {
|
|
5124
|
-
const [e, n] =
|
|
5126
|
+
const [e, n] = Ko(), s = W(xn);
|
|
5125
5127
|
return E(rh, { ...t, layoutGroup: s, switchLayoutGroup: W(Zo), isPresent: e, safeToRemove: n });
|
|
5126
5128
|
}
|
|
5127
5129
|
const ah = {
|
|
@@ -5130,20 +5132,20 @@ const ah = {
|
|
|
5130
5132
|
},
|
|
5131
5133
|
drag: {
|
|
5132
5134
|
Feature: ih,
|
|
5133
|
-
ProjectionNode:
|
|
5135
|
+
ProjectionNode: zo,
|
|
5134
5136
|
MeasureLayout: nr
|
|
5135
5137
|
}
|
|
5136
5138
|
};
|
|
5137
|
-
function
|
|
5139
|
+
function pi(t, e, n) {
|
|
5138
5140
|
const { props: s } = t;
|
|
5139
5141
|
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
5140
5142
|
const i = "onHover" + n, r = s[i];
|
|
5141
|
-
r &&
|
|
5143
|
+
r && k.postRender(() => r(e, Xt(e)));
|
|
5142
5144
|
}
|
|
5143
5145
|
class lh extends dt {
|
|
5144
5146
|
mount() {
|
|
5145
5147
|
const { current: e } = this.node;
|
|
5146
|
-
e && (this.unmount = Dl(e, (n, s) => (
|
|
5148
|
+
e && (this.unmount = Dl(e, (n, s) => (pi(this.node, s, "Start"), (i) => pi(this.node, i, "End"))));
|
|
5147
5149
|
}
|
|
5148
5150
|
unmount() {
|
|
5149
5151
|
}
|
|
@@ -5170,13 +5172,13 @@ class ch extends dt {
|
|
|
5170
5172
|
unmount() {
|
|
5171
5173
|
}
|
|
5172
5174
|
}
|
|
5173
|
-
function
|
|
5175
|
+
function mi(t, e, n) {
|
|
5174
5176
|
const { props: s } = t;
|
|
5175
5177
|
if (t.current instanceof HTMLButtonElement && t.current.disabled)
|
|
5176
5178
|
return;
|
|
5177
5179
|
t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
5178
5180
|
const i = "onTap" + (n === "End" ? "" : n), r = s[i];
|
|
5179
|
-
r &&
|
|
5181
|
+
r && k.postRender(() => r(e, Xt(e)));
|
|
5180
5182
|
}
|
|
5181
5183
|
class uh extends dt {
|
|
5182
5184
|
mount() {
|
|
@@ -5184,7 +5186,7 @@ class uh extends dt {
|
|
|
5184
5186
|
if (!e)
|
|
5185
5187
|
return;
|
|
5186
5188
|
const { globalTapTarget: n, propagate: s } = this.node.props;
|
|
5187
|
-
this.unmount = Bl(e, (i, r) => (
|
|
5189
|
+
this.unmount = Bl(e, (i, r) => (mi(this.node, r, "Start"), (o, { success: a }) => mi(this.node, o, a ? "End" : "Cancel")), {
|
|
5188
5190
|
useGlobalTarget: n,
|
|
5189
5191
|
stopPropagation: (s == null ? void 0 : s.tap) === !1
|
|
5190
5192
|
});
|
|
@@ -5192,7 +5194,7 @@ class uh extends dt {
|
|
|
5192
5194
|
unmount() {
|
|
5193
5195
|
}
|
|
5194
5196
|
}
|
|
5195
|
-
const gn = /* @__PURE__ */ new WeakMap(),
|
|
5197
|
+
const gn = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), hh = (t) => {
|
|
5196
5198
|
const e = gn.get(t.target);
|
|
5197
5199
|
e && e(t);
|
|
5198
5200
|
}, fh = (t) => {
|
|
@@ -5200,8 +5202,8 @@ const gn = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), hh
|
|
|
5200
5202
|
};
|
|
5201
5203
|
function dh({ root: t, ...e }) {
|
|
5202
5204
|
const n = t || document;
|
|
5203
|
-
|
|
5204
|
-
const s =
|
|
5205
|
+
ze.has(n) || ze.set(n, {});
|
|
5206
|
+
const s = ze.get(n), i = JSON.stringify(e);
|
|
5205
5207
|
return s[i] || (s[i] = new IntersectionObserver(fh, { root: t, ...e })), s[i];
|
|
5206
5208
|
}
|
|
5207
5209
|
function ph(t, e, n) {
|
|
@@ -5219,18 +5221,18 @@ class gh extends dt {
|
|
|
5219
5221
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
5220
5222
|
}
|
|
5221
5223
|
startObserver() {
|
|
5222
|
-
var
|
|
5223
|
-
(
|
|
5224
|
+
var l;
|
|
5225
|
+
(l = this.stopObserver) == null || l.call(this);
|
|
5224
5226
|
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = e, o = {
|
|
5225
5227
|
root: n ? n.current : void 0,
|
|
5226
5228
|
rootMargin: s,
|
|
5227
5229
|
threshold: typeof i == "number" ? i : mh[i]
|
|
5228
5230
|
}, a = (u) => {
|
|
5229
|
-
const { isIntersecting:
|
|
5230
|
-
if (this.isInView ===
|
|
5231
|
+
const { isIntersecting: c } = u;
|
|
5232
|
+
if (this.isInView === c || (this.isInView = c, r && !c && this.hasEnteredView))
|
|
5231
5233
|
return;
|
|
5232
|
-
|
|
5233
|
-
const { onViewportEnter: h, onViewportLeave: f } = this.node.getProps(), d =
|
|
5234
|
+
c && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", c);
|
|
5235
|
+
const { onViewportEnter: h, onViewportLeave: f } = this.node.getProps(), d = c ? h : f;
|
|
5234
5236
|
d && d(u);
|
|
5235
5237
|
};
|
|
5236
5238
|
this.stopObserver = ph(this.node.current, o, a);
|
|
@@ -5267,11 +5269,11 @@ const vh = {
|
|
|
5267
5269
|
}
|
|
5268
5270
|
}, xh = {
|
|
5269
5271
|
layout: {
|
|
5270
|
-
ProjectionNode:
|
|
5272
|
+
ProjectionNode: zo,
|
|
5271
5273
|
MeasureLayout: nr
|
|
5272
5274
|
}
|
|
5273
5275
|
}, wh = {
|
|
5274
|
-
...
|
|
5276
|
+
...zu,
|
|
5275
5277
|
...vh,
|
|
5276
5278
|
...ah,
|
|
5277
5279
|
...xh
|
|
@@ -5288,10 +5290,10 @@ const vh = {
|
|
|
5288
5290
|
}
|
|
5289
5291
|
],
|
|
5290
5292
|
[r, o]
|
|
5291
|
-
),
|
|
5293
|
+
), l = at(
|
|
5292
5294
|
() => Jt.object().shape({
|
|
5293
5295
|
password: a.reduce(
|
|
5294
|
-
(M,
|
|
5296
|
+
(M, G) => M.test(G.id, G.label, (L) => !!L && G.test(L)),
|
|
5295
5297
|
Jt.string().required("Password is required")
|
|
5296
5298
|
),
|
|
5297
5299
|
confirmPassword: Jt.string().required("Confirm Password is required").oneOf([Jt.ref("password"), null], "Passwords do not match")
|
|
@@ -5299,23 +5301,23 @@ const vh = {
|
|
|
5299
5301
|
[a]
|
|
5300
5302
|
), {
|
|
5301
5303
|
control: u,
|
|
5302
|
-
formState: { errors:
|
|
5304
|
+
formState: { errors: c, isValid: h },
|
|
5303
5305
|
handleSubmit: f,
|
|
5304
5306
|
watch: d,
|
|
5305
5307
|
reset: p
|
|
5306
|
-
} = mr({ resolver: or(
|
|
5307
|
-
var
|
|
5308
|
+
} = mr({ resolver: or(l), mode: "onChange" }), g = $(null), m = $(!1), y = wr(), w = gr(), [v, x] = Ot("form"), [b, C] = Ot(!1), [A, P] = Ot({ password: !1, confirmPassword: !1 }), V = (M) => P((G) => ({ ...G, [M]: !G[M] })), S = d("password") || "", D = d("confirmPassword") || "", F = D.length > 0 && D === S, Z = async ({ password: M }) => {
|
|
5309
|
+
var G, L;
|
|
5308
5310
|
if (!b) {
|
|
5309
5311
|
C(!0);
|
|
5310
5312
|
try {
|
|
5311
|
-
const O = await
|
|
5313
|
+
const O = await w.encrypt(M);
|
|
5312
5314
|
await yr({
|
|
5313
5315
|
oldPassword: O,
|
|
5314
5316
|
userId: n
|
|
5315
|
-
}), m.current = !0,
|
|
5317
|
+
}), m.current = !0, x("success"), setTimeout(() => e == null ? void 0 : e(), 1600);
|
|
5316
5318
|
} catch (O) {
|
|
5317
5319
|
console.error(O), vr({
|
|
5318
|
-
message: ((
|
|
5320
|
+
message: ((L = (G = O == null ? void 0 : O.response) == null ? void 0 : G.data) == null ? void 0 : L.message) || "Something Went Wrong",
|
|
5319
5321
|
type: "error"
|
|
5320
5322
|
});
|
|
5321
5323
|
} finally {
|
|
@@ -5324,7 +5326,7 @@ const vh = {
|
|
|
5324
5326
|
}
|
|
5325
5327
|
};
|
|
5326
5328
|
Wt(() => {
|
|
5327
|
-
t && (p(),
|
|
5329
|
+
t && (p(), x("form"), C(!1), P({ password: !1, confirmPassword: !1 }));
|
|
5328
5330
|
}, [t, p]), Wt(() => {
|
|
5329
5331
|
let M = g.current;
|
|
5330
5332
|
return () => {
|
|
@@ -5340,8 +5342,8 @@ const vh = {
|
|
|
5340
5342
|
rr,
|
|
5341
5343
|
{
|
|
5342
5344
|
open: t,
|
|
5343
|
-
onClose: (M,
|
|
5344
|
-
(b || v === "success") && (
|
|
5345
|
+
onClose: (M, G) => {
|
|
5346
|
+
(b || v === "success") && (G === "backdropClick" || G === "escapeKeyDown") || e == null || e(M, G);
|
|
5345
5347
|
},
|
|
5346
5348
|
...i,
|
|
5347
5349
|
children: /* @__PURE__ */ E("div", { className: "fixed inset-0 z-[200] flex items-center justify-center p-4", children: /* @__PURE__ */ E(
|
|
@@ -5380,13 +5382,14 @@ const vh = {
|
|
|
5380
5382
|
/* @__PURE__ */ et("div", { className: "mt-6 space-y-4", children: [
|
|
5381
5383
|
/* @__PURE__ */ et("div", { children: [
|
|
5382
5384
|
/* @__PURE__ */ E(
|
|
5383
|
-
|
|
5385
|
+
Zn,
|
|
5384
5386
|
{
|
|
5387
|
+
autoFocus: !0,
|
|
5385
5388
|
control: u,
|
|
5386
5389
|
name: "password",
|
|
5387
5390
|
placeholder: _,
|
|
5388
5391
|
inputProps: { "aria-label": _ },
|
|
5389
|
-
errors:
|
|
5392
|
+
errors: c,
|
|
5390
5393
|
showPassword: A.password,
|
|
5391
5394
|
togglePasswordVisibility: () => V("password"),
|
|
5392
5395
|
autoComplete: "new-password",
|
|
@@ -5404,28 +5407,28 @@ const vh = {
|
|
|
5404
5407
|
] }),
|
|
5405
5408
|
/* @__PURE__ */ et("div", { children: [
|
|
5406
5409
|
/* @__PURE__ */ E(
|
|
5407
|
-
|
|
5410
|
+
Zn,
|
|
5408
5411
|
{
|
|
5409
5412
|
control: u,
|
|
5410
5413
|
name: "confirmPassword",
|
|
5411
5414
|
placeholder: Y,
|
|
5412
5415
|
inputProps: { "aria-label": Y },
|
|
5413
|
-
errors:
|
|
5416
|
+
errors: c,
|
|
5414
5417
|
showPassword: A.confirmPassword,
|
|
5415
5418
|
togglePasswordVisibility: () => V("confirmPassword"),
|
|
5416
5419
|
autoComplete: "new-password",
|
|
5417
5420
|
dataTestId: "changepasswordmodal-confirmpassword"
|
|
5418
5421
|
}
|
|
5419
5422
|
),
|
|
5420
|
-
F && !
|
|
5421
|
-
/* @__PURE__ */ E(
|
|
5423
|
+
F && !c.confirmPassword && /* @__PURE__ */ et("p", { className: "mt-1 flex items-center gap-1 text-xs text-green-600", children: [
|
|
5424
|
+
/* @__PURE__ */ E(qn, { sx: { fontSize: 14 } }),
|
|
5422
5425
|
o(r ? "PINs match" : "Passwords match")
|
|
5423
5426
|
] })
|
|
5424
5427
|
] })
|
|
5425
5428
|
] }),
|
|
5426
5429
|
/* @__PURE__ */ et("div", { className: "mt-7 flex flex-col-reverse sm:flex-row items-center justify-end gap-3", children: [
|
|
5427
5430
|
/* @__PURE__ */ E(
|
|
5428
|
-
|
|
5431
|
+
Xn,
|
|
5429
5432
|
{
|
|
5430
5433
|
variant: "outlined",
|
|
5431
5434
|
color: "inherit",
|
|
@@ -5437,7 +5440,7 @@ const vh = {
|
|
|
5437
5440
|
}
|
|
5438
5441
|
),
|
|
5439
5442
|
/* @__PURE__ */ E(
|
|
5440
|
-
|
|
5443
|
+
Xn,
|
|
5441
5444
|
{
|
|
5442
5445
|
type: "submit",
|
|
5443
5446
|
variant: "contained",
|
|
@@ -5470,7 +5473,7 @@ const vh = {
|
|
|
5470
5473
|
animate: { scale: 1, rotate: 0 },
|
|
5471
5474
|
transition: { type: "spring", stiffness: 260, damping: 14 },
|
|
5472
5475
|
className: "flex items-center justify-center w-20 h-20 rounded-full bg-green-50 text-green-600 mb-5",
|
|
5473
|
-
children: /* @__PURE__ */ E(
|
|
5476
|
+
children: /* @__PURE__ */ E(qn, { sx: { fontSize: 46 } })
|
|
5474
5477
|
}
|
|
5475
5478
|
),
|
|
5476
5479
|
/* @__PURE__ */ E(Zt, { className: "text-xl font-bold text-gray-800", children: o(r ? "PIN updated" : "Password updated") }),
|
|
@@ -5493,4 +5496,4 @@ Th.propTypes = {
|
|
|
5493
5496
|
export {
|
|
5494
5497
|
Th as default
|
|
5495
5498
|
};
|
|
5496
|
-
//# sourceMappingURL=ChangePasswordModalCore-
|
|
5499
|
+
//# sourceMappingURL=ChangePasswordModalCore-DTYWRTa-.js.map
|