@contentmunch/contentmunch-ui 1.1.23 → 1.1.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/lib/accordion/Accordion.d.ts +1 -0
- package/lib/backdrop/Backdrop.d.ts +1 -0
- package/lib/button/Button.d.ts +1 -0
- package/lib/index.cjs.js +3 -3
- package/lib/index.es.js +632 -627
- package/lib/index.umd.js +3 -3
- package/lib/table/Table.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import gi, { useState as Y, Fragment as p, useRef as fe, useCallback as Ce, useEffect as je, useMemo as Oe, createContext as ze, useLayoutEffect as lo, useContext as
|
|
1
|
+
import gi, { useState as Y, Fragment as p, useRef as fe, useCallback as Ce, useEffect as je, useMemo as Oe, createContext as ze, useLayoutEffect as lo, useContext as ee, useId as co, createElement as uo, useInsertionEffect as ji, forwardRef as ho, Component as fo } from "react";
|
|
2
2
|
var at = { exports: {} }, $e = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -44,149 +44,149 @@ var Ke = {};
|
|
|
44
44
|
var Zn;
|
|
45
45
|
function mo() {
|
|
46
46
|
return Zn || (Zn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
-
function e(
|
|
48
|
-
if (
|
|
49
|
-
if (typeof
|
|
50
|
-
return
|
|
51
|
-
if (typeof
|
|
52
|
-
switch (
|
|
47
|
+
function e(j) {
|
|
48
|
+
if (j == null) return null;
|
|
49
|
+
if (typeof j == "function")
|
|
50
|
+
return j.$$typeof === T ? null : j.displayName || j.name || null;
|
|
51
|
+
if (typeof j == "string") return j;
|
|
52
|
+
switch (j) {
|
|
53
53
|
case g:
|
|
54
54
|
return "Fragment";
|
|
55
|
-
case
|
|
55
|
+
case w:
|
|
56
56
|
return "Profiler";
|
|
57
|
-
case
|
|
57
|
+
case y:
|
|
58
58
|
return "StrictMode";
|
|
59
59
|
case S:
|
|
60
60
|
return "Suspense";
|
|
61
61
|
case E:
|
|
62
62
|
return "SuspenseList";
|
|
63
|
-
case
|
|
63
|
+
case O:
|
|
64
64
|
return "Activity";
|
|
65
65
|
}
|
|
66
|
-
if (typeof
|
|
67
|
-
switch (typeof
|
|
66
|
+
if (typeof j == "object")
|
|
67
|
+
switch (typeof j.tag == "number" && console.error(
|
|
68
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
-
),
|
|
69
|
+
), j.$$typeof) {
|
|
70
70
|
case x:
|
|
71
71
|
return "Portal";
|
|
72
|
-
case w:
|
|
73
|
-
return (v.displayName || "Context") + ".Provider";
|
|
74
72
|
case b:
|
|
75
|
-
return (
|
|
76
|
-
case
|
|
77
|
-
|
|
78
|
-
return v = v.displayName, v || (v = V.displayName || V.name || "", v = v !== "" ? "ForwardRef(" + v + ")" : "ForwardRef"), v;
|
|
79
|
-
case R:
|
|
80
|
-
return V = v.displayName || null, V !== null ? V : e(v.type) || "Memo";
|
|
73
|
+
return (j.displayName || "Context") + ".Provider";
|
|
74
|
+
case v:
|
|
75
|
+
return (j._context.displayName || "Context") + ".Consumer";
|
|
81
76
|
case M:
|
|
82
|
-
V =
|
|
77
|
+
var V = j.render;
|
|
78
|
+
return j = j.displayName, j || (j = V.displayName || V.name || "", j = j !== "" ? "ForwardRef(" + j + ")" : "ForwardRef"), j;
|
|
79
|
+
case k:
|
|
80
|
+
return V = j.displayName || null, V !== null ? V : e(j.type) || "Memo";
|
|
81
|
+
case P:
|
|
82
|
+
V = j._payload, j = j._init;
|
|
83
83
|
try {
|
|
84
|
-
return e(
|
|
84
|
+
return e(j(V));
|
|
85
85
|
} catch {
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
function t(
|
|
91
|
-
return "" +
|
|
90
|
+
function t(j) {
|
|
91
|
+
return "" + j;
|
|
92
92
|
}
|
|
93
|
-
function n(
|
|
93
|
+
function n(j) {
|
|
94
94
|
try {
|
|
95
|
-
t(
|
|
95
|
+
t(j);
|
|
96
96
|
var V = !1;
|
|
97
97
|
} catch {
|
|
98
98
|
V = !0;
|
|
99
99
|
}
|
|
100
100
|
if (V) {
|
|
101
101
|
V = console;
|
|
102
|
-
var
|
|
103
|
-
return
|
|
102
|
+
var R = V.error, K = typeof Symbol == "function" && Symbol.toStringTag && j[Symbol.toStringTag] || j.constructor.name || "Object";
|
|
103
|
+
return R.call(
|
|
104
104
|
V,
|
|
105
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
106
|
K
|
|
107
|
-
), t(
|
|
107
|
+
), t(j);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function i(
|
|
111
|
-
if (
|
|
112
|
-
if (typeof
|
|
110
|
+
function i(j) {
|
|
111
|
+
if (j === g) return "<>";
|
|
112
|
+
if (typeof j == "object" && j !== null && j.$$typeof === P)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
|
-
var V = e(
|
|
115
|
+
var V = e(j);
|
|
116
116
|
return V ? "<" + V + ">" : "<...>";
|
|
117
117
|
} catch {
|
|
118
118
|
return "<...>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
function r() {
|
|
122
|
-
var
|
|
123
|
-
return
|
|
122
|
+
var j = C.A;
|
|
123
|
+
return j === null ? null : j.getOwner();
|
|
124
124
|
}
|
|
125
125
|
function a() {
|
|
126
126
|
return Error("react-stack-top-frame");
|
|
127
127
|
}
|
|
128
|
-
function o(
|
|
129
|
-
if (
|
|
130
|
-
var V = Object.getOwnPropertyDescriptor(
|
|
128
|
+
function o(j) {
|
|
129
|
+
if (F.call(j, "key")) {
|
|
130
|
+
var V = Object.getOwnPropertyDescriptor(j, "key").get;
|
|
131
131
|
if (V && V.isReactWarning) return !1;
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return j.key !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function l(
|
|
136
|
-
function
|
|
137
|
-
|
|
135
|
+
function l(j, V) {
|
|
136
|
+
function R() {
|
|
137
|
+
Q || (Q = !0, console.error(
|
|
138
138
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
139
139
|
V
|
|
140
140
|
));
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
142
|
+
R.isReactWarning = !0, Object.defineProperty(j, "key", {
|
|
143
|
+
get: R,
|
|
144
144
|
configurable: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
function c() {
|
|
148
|
-
var
|
|
149
|
-
return
|
|
148
|
+
var j = e(this.type);
|
|
149
|
+
return q[j] || (q[j] = !0, console.error(
|
|
150
150
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
|
-
)),
|
|
151
|
+
)), j = this.props.ref, j !== void 0 ? j : null;
|
|
152
152
|
}
|
|
153
|
-
function h(
|
|
154
|
-
return
|
|
153
|
+
function h(j, V, R, K, me, le, Rt, Lt) {
|
|
154
|
+
return R = le.ref, j = {
|
|
155
155
|
$$typeof: m,
|
|
156
|
-
type:
|
|
156
|
+
type: j,
|
|
157
157
|
key: V,
|
|
158
158
|
props: le,
|
|
159
159
|
_owner: me
|
|
160
|
-
}, (
|
|
160
|
+
}, (R !== void 0 ? R : null) !== null ? Object.defineProperty(j, "ref", {
|
|
161
161
|
enumerable: !1,
|
|
162
162
|
get: c
|
|
163
|
-
}) : Object.defineProperty(
|
|
163
|
+
}) : Object.defineProperty(j, "ref", { enumerable: !1, value: null }), j._store = {}, Object.defineProperty(j._store, "validated", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
167
|
value: 0
|
|
168
|
-
}), Object.defineProperty(
|
|
168
|
+
}), Object.defineProperty(j, "_debugInfo", {
|
|
169
169
|
configurable: !1,
|
|
170
170
|
enumerable: !1,
|
|
171
171
|
writable: !0,
|
|
172
172
|
value: null
|
|
173
|
-
}), Object.defineProperty(
|
|
173
|
+
}), Object.defineProperty(j, "_debugStack", {
|
|
174
174
|
configurable: !1,
|
|
175
175
|
enumerable: !1,
|
|
176
176
|
writable: !0,
|
|
177
177
|
value: Rt
|
|
178
|
-
}), Object.defineProperty(
|
|
178
|
+
}), Object.defineProperty(j, "_debugTask", {
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
182
|
value: Lt
|
|
183
|
-
}), Object.freeze && (Object.freeze(
|
|
183
|
+
}), Object.freeze && (Object.freeze(j.props), Object.freeze(j)), j;
|
|
184
184
|
}
|
|
185
|
-
function u(
|
|
185
|
+
function u(j, V, R, K, me, le, Rt, Lt) {
|
|
186
186
|
var G = V.children;
|
|
187
187
|
if (G !== void 0)
|
|
188
188
|
if (K)
|
|
189
|
-
if (
|
|
189
|
+
if (X(G)) {
|
|
190
190
|
for (K = 0; K < G.length; K++)
|
|
191
191
|
d(G[K]);
|
|
192
192
|
Object.freeze && Object.freeze(G);
|
|
@@ -195,12 +195,12 @@ function mo() {
|
|
|
195
195
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
196
196
|
);
|
|
197
197
|
else d(G);
|
|
198
|
-
if (
|
|
199
|
-
G = e(
|
|
198
|
+
if (F.call(V, "key")) {
|
|
199
|
+
G = e(j);
|
|
200
200
|
var De = Object.keys(V).filter(function(ao) {
|
|
201
201
|
return ao !== "key";
|
|
202
202
|
});
|
|
203
|
-
K = 0 < De.length ? "{key: someKey, " + De.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
203
|
+
K = 0 < De.length ? "{key: someKey, " + De.join(": ..., ") + ": ...}" : "{key: someKey}", _[G + K] || (De = 0 < De.length ? "{" + De.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
204
204
|
`A props object containing a "key" prop is being spread into JSX:
|
|
205
205
|
let props = %s;
|
|
206
206
|
<%s {...props} />
|
|
@@ -211,65 +211,65 @@ React keys must be passed directly to JSX without using spread:
|
|
|
211
211
|
G,
|
|
212
212
|
De,
|
|
213
213
|
G
|
|
214
|
-
),
|
|
214
|
+
), _[G + K] = !0);
|
|
215
215
|
}
|
|
216
|
-
if (G = null,
|
|
217
|
-
|
|
216
|
+
if (G = null, R !== void 0 && (n(R), G = "" + R), o(V) && (n(V.key), G = "" + V.key), "key" in V) {
|
|
217
|
+
R = {};
|
|
218
218
|
for (var Nt in V)
|
|
219
|
-
Nt !== "key" && (
|
|
220
|
-
} else
|
|
219
|
+
Nt !== "key" && (R[Nt] = V[Nt]);
|
|
220
|
+
} else R = V;
|
|
221
221
|
return G && l(
|
|
222
|
-
|
|
223
|
-
typeof
|
|
222
|
+
R,
|
|
223
|
+
typeof j == "function" ? j.displayName || j.name || "Unknown" : j
|
|
224
224
|
), h(
|
|
225
|
-
|
|
225
|
+
j,
|
|
226
226
|
G,
|
|
227
227
|
le,
|
|
228
228
|
me,
|
|
229
229
|
r(),
|
|
230
|
-
|
|
230
|
+
R,
|
|
231
231
|
Rt,
|
|
232
232
|
Lt
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function d(
|
|
236
|
-
typeof
|
|
235
|
+
function d(j) {
|
|
236
|
+
typeof j == "object" && j !== null && j.$$typeof === m && j._store && (j._store.validated = 1);
|
|
237
237
|
}
|
|
238
|
-
var f = gi, m = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), g = Symbol.for("react.fragment"),
|
|
238
|
+
var f = gi, m = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), b = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), T = Symbol.for("react.client.reference"), C = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, X = Array.isArray, $ = console.createTask ? console.createTask : function() {
|
|
239
239
|
return null;
|
|
240
240
|
};
|
|
241
241
|
f = {
|
|
242
|
-
"react-stack-bottom-frame": function(
|
|
243
|
-
return
|
|
242
|
+
"react-stack-bottom-frame": function(j) {
|
|
243
|
+
return j();
|
|
244
244
|
}
|
|
245
245
|
};
|
|
246
|
-
var
|
|
246
|
+
var Q, q = {}, Ee = f["react-stack-bottom-frame"].bind(
|
|
247
247
|
f,
|
|
248
248
|
a
|
|
249
|
-
)(),
|
|
250
|
-
Ke.Fragment = g, Ke.jsx = function(
|
|
251
|
-
var le = 1e4 >
|
|
249
|
+
)(), I = $(i(a)), _ = {};
|
|
250
|
+
Ke.Fragment = g, Ke.jsx = function(j, V, R, K, me) {
|
|
251
|
+
var le = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
252
252
|
return u(
|
|
253
|
-
|
|
253
|
+
j,
|
|
254
254
|
V,
|
|
255
|
-
|
|
255
|
+
R,
|
|
256
256
|
!1,
|
|
257
257
|
K,
|
|
258
258
|
me,
|
|
259
259
|
le ? Error("react-stack-top-frame") : Ee,
|
|
260
|
-
le ?
|
|
260
|
+
le ? $(i(j)) : I
|
|
261
261
|
);
|
|
262
|
-
}, Ke.jsxs = function(
|
|
263
|
-
var le = 1e4 >
|
|
262
|
+
}, Ke.jsxs = function(j, V, R, K, me) {
|
|
263
|
+
var le = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
264
264
|
return u(
|
|
265
|
-
|
|
265
|
+
j,
|
|
266
266
|
V,
|
|
267
|
-
|
|
267
|
+
R,
|
|
268
268
|
!0,
|
|
269
269
|
K,
|
|
270
270
|
me,
|
|
271
271
|
le ? Error("react-stack-top-frame") : Ee,
|
|
272
|
-
le ?
|
|
272
|
+
le ? $(i(j)) : I
|
|
273
273
|
);
|
|
274
274
|
};
|
|
275
275
|
}()), Ke;
|
|
@@ -279,45 +279,49 @@ function xo() {
|
|
|
279
279
|
return Jn || (Jn = 1, process.env.NODE_ENV === "production" ? at.exports = po() : at.exports = mo()), at.exports;
|
|
280
280
|
}
|
|
281
281
|
var s = xo();
|
|
282
|
-
const Ah = ({ variant: e, collapsed: t,
|
|
283
|
-
const { folds:
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
286
|
-
const
|
|
287
|
-
|
|
282
|
+
const Ah = ({ variant: e, collapsed: t, className: n, children: i }) => {
|
|
283
|
+
const { folds: r } = i, [a, o] = Y(t ? -1 : 0), l = (f) => f === a ? "fold active" : "fold", c = (f) => "fold-button" + (e ? " fold-button--" + e : "") + (r[f].foldColor ? " fold-button--primary fold-button--" + r[f].foldColor : ""), h = (f) => {
|
|
284
|
+
const m = f.which.toString(), x = f.ctrlKey && m.match(/33|34/);
|
|
285
|
+
if (m.match(/38|40/) || x) {
|
|
286
|
+
const g = m.match(/34|40/) ? 1 : -1, y = r.length, w = (a + y + g) % y;
|
|
287
|
+
o(w);
|
|
288
288
|
} else
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
},
|
|
292
|
-
a
|
|
293
|
-
};
|
|
294
|
-
return /* @__PURE__ */ s.jsx("div", { className:
|
|
295
|
-
(
|
|
289
|
+
m === "36" && o(0), m === "35" && o(r.length - 1);
|
|
290
|
+
f.preventDefault();
|
|
291
|
+
}, u = (f) => {
|
|
292
|
+
o(a === f ? -1 : f);
|
|
293
|
+
}, d = "muncher-accordion" + (n ? " " + n : "");
|
|
294
|
+
return /* @__PURE__ */ s.jsx("div", { className: d, children: r.map(
|
|
295
|
+
(f, m) => /* @__PURE__ */ s.jsxs(
|
|
296
296
|
"div",
|
|
297
297
|
{
|
|
298
|
-
className:
|
|
299
|
-
"aria-expanded":
|
|
298
|
+
className: l(m),
|
|
299
|
+
"aria-expanded": a === m,
|
|
300
300
|
children: [
|
|
301
301
|
/* @__PURE__ */ s.jsx(
|
|
302
302
|
"button",
|
|
303
303
|
{
|
|
304
|
-
className:
|
|
305
|
-
onKeyDown:
|
|
306
|
-
onClick: () =>
|
|
307
|
-
children: /* @__PURE__ */ s.jsx("span", { children:
|
|
304
|
+
className: c(m),
|
|
305
|
+
onKeyDown: h,
|
|
306
|
+
onClick: () => u(m),
|
|
307
|
+
children: /* @__PURE__ */ s.jsx("span", { children: f.heading })
|
|
308
308
|
}
|
|
309
309
|
),
|
|
310
|
-
/* @__PURE__ */ s.jsx("section", { className: "fold-content", children:
|
|
310
|
+
/* @__PURE__ */ s.jsx("section", { className: "fold-content", children: f.body })
|
|
311
311
|
]
|
|
312
312
|
},
|
|
313
|
-
"muncher-accordion-fold-" +
|
|
313
|
+
"muncher-accordion-fold-" + m
|
|
314
314
|
)
|
|
315
315
|
) });
|
|
316
316
|
}, yo = ({
|
|
317
317
|
show: e = !1,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
318
|
+
className: t,
|
|
319
|
+
backdropClickHandler: n,
|
|
320
|
+
...i
|
|
321
|
+
}) => {
|
|
322
|
+
const r = "muncher-backdrop" + (t ? " " + t : "");
|
|
323
|
+
return e ? /* @__PURE__ */ s.jsx("div", { className: r, onClick: n, ...i }) : null;
|
|
324
|
+
}, go = ({ variant: e, rounded: t, border: n, children: i, ...r }) => {
|
|
321
325
|
const a = "muncher-badge" + (e ? " muncher-badge--" + e : "") + (t ? " muncher-badge--rounded" : "") + (n ? " muncher-badge--border" : "");
|
|
322
326
|
return /* @__PURE__ */ s.jsx("div", { className: a, ...r, children: i });
|
|
323
327
|
}, lt = {
|
|
@@ -1365,7 +1369,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1365
1369
|
/* @__PURE__ */ s.jsx("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" }),
|
|
1366
1370
|
/* @__PURE__ */ s.jsx("text", { x: "6", y: "14", fontSize: "6", fontFamily: "'Lucida Grande', sans-serif", children: "360" })
|
|
1367
1371
|
] })
|
|
1368
|
-
},
|
|
1372
|
+
}, N = ({ color: e, name: t, size: n = "small", weight: i = 2, onClick: r, iconString: a, orientation: o = "left", children: l }) => {
|
|
1369
1373
|
const c = `muncher-icon--${n}`, h = t ? lt[t] : a && a in lt ? lt[a] : (process.env.NODE_ENV === "development" && console.warn("Unknown icon:", a), lt.muncher);
|
|
1370
1374
|
return /* @__PURE__ */ s.jsxs("span", { className: "muncher-icon", children: [
|
|
1371
1375
|
l && o && o === "right" ? /* @__PURE__ */ s.jsx("span", { className: "content-left", children: l }) : "",
|
|
@@ -1399,11 +1403,11 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1399
1403
|
onClick: i,
|
|
1400
1404
|
...r,
|
|
1401
1405
|
children: [
|
|
1402
|
-
/* @__PURE__ */ s.jsx(
|
|
1406
|
+
/* @__PURE__ */ s.jsx(N, { name: t }),
|
|
1403
1407
|
n === "" ? "" : /* @__PURE__ */ s.jsx(go, { variant: e, children: n })
|
|
1404
1408
|
]
|
|
1405
1409
|
}
|
|
1406
|
-
),
|
|
1410
|
+
), ne = ({
|
|
1407
1411
|
type: e = "button",
|
|
1408
1412
|
variant: t,
|
|
1409
1413
|
size: n = "medium",
|
|
@@ -1411,27 +1415,28 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1411
1415
|
active: r,
|
|
1412
1416
|
disabled: a,
|
|
1413
1417
|
rounded: o,
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1418
|
+
className: l,
|
|
1419
|
+
onClick: c,
|
|
1420
|
+
onMouseDown: h,
|
|
1421
|
+
onMouseEnter: u,
|
|
1422
|
+
onMouseLeave: d,
|
|
1423
|
+
children: f,
|
|
1424
|
+
...m
|
|
1420
1425
|
}) => {
|
|
1421
|
-
const
|
|
1426
|
+
const x = "muncher-button" + (e && e === "nav" ? " muncher-button--nav" : "") + (t ? " muncher-button--" + t : "") + (n ? " muncher-button--" + n : "") + (r ? " muncher-button--active" : "") + (o ? " muncher-button--rounded" : "") + (l ? " " + l : "");
|
|
1422
1427
|
return /* @__PURE__ */ s.jsx(
|
|
1423
1428
|
"button",
|
|
1424
1429
|
{
|
|
1425
1430
|
type: e && e !== "nav" ? e : "button",
|
|
1426
|
-
className:
|
|
1431
|
+
className: x,
|
|
1427
1432
|
disabled: !!a,
|
|
1428
1433
|
title: i,
|
|
1429
|
-
onClick:
|
|
1430
|
-
onMouseDown:
|
|
1431
|
-
onMouseEnter:
|
|
1432
|
-
onMouseLeave:
|
|
1433
|
-
...
|
|
1434
|
-
children:
|
|
1434
|
+
onClick: c,
|
|
1435
|
+
onMouseDown: h,
|
|
1436
|
+
onMouseEnter: u,
|
|
1437
|
+
onMouseLeave: d,
|
|
1438
|
+
...m,
|
|
1439
|
+
children: f
|
|
1435
1440
|
}
|
|
1436
1441
|
);
|
|
1437
1442
|
}, jo = ({
|
|
@@ -1452,30 +1457,30 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1452
1457
|
children: x,
|
|
1453
1458
|
...g
|
|
1454
1459
|
}) => {
|
|
1455
|
-
const
|
|
1460
|
+
const y = fe(null), w = (S) => {
|
|
1456
1461
|
S.preventDefault(), h && h(S), f && f(!0);
|
|
1457
|
-
},
|
|
1462
|
+
}, v = Ce(() => {
|
|
1458
1463
|
f(!1), u && u();
|
|
1459
|
-
}, [u, f]),
|
|
1460
|
-
S.keyCode === 27 &&
|
|
1461
|
-
}, [
|
|
1464
|
+
}, [u, f]), b = Ce((S) => {
|
|
1465
|
+
S.keyCode === 27 && v();
|
|
1466
|
+
}, [v]);
|
|
1462
1467
|
je(() => {
|
|
1463
1468
|
const S = (E) => {
|
|
1464
|
-
|
|
1469
|
+
y && y.current && E.target instanceof HTMLElement && !y.current.contains(E.target) && v();
|
|
1465
1470
|
};
|
|
1466
|
-
return document.addEventListener("keydown",
|
|
1467
|
-
document.removeEventListener("keydown",
|
|
1471
|
+
return document.addEventListener("keydown", b, !1), document.addEventListener("mousedown", S), () => {
|
|
1472
|
+
document.removeEventListener("keydown", b, !1);
|
|
1468
1473
|
};
|
|
1469
|
-
}, [
|
|
1470
|
-
const
|
|
1471
|
-
var
|
|
1472
|
-
const S = (
|
|
1474
|
+
}, [b, v]);
|
|
1475
|
+
const M = () => {
|
|
1476
|
+
var k;
|
|
1477
|
+
const S = (k = y.current) == null ? void 0 : k.offsetLeft, E = window.innerWidth;
|
|
1473
1478
|
if (S) {
|
|
1474
1479
|
if (S < 100) return "muncher-dropdown--content";
|
|
1475
1480
|
if (E - S < 150) return "muncher-dropdown--content drop-left";
|
|
1476
1481
|
if (E - S < 250) {
|
|
1477
|
-
const
|
|
1478
|
-
if (
|
|
1482
|
+
const P = Math.round((E - S) / E * 100);
|
|
1483
|
+
if (P > 40 || P < 60) return "muncher-dropdown--content drop-middle";
|
|
1479
1484
|
}
|
|
1480
1485
|
}
|
|
1481
1486
|
switch (c) {
|
|
@@ -1487,11 +1492,11 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1487
1492
|
return "muncher-dropdown--content";
|
|
1488
1493
|
}
|
|
1489
1494
|
};
|
|
1490
|
-
return /* @__PURE__ */ s.jsxs("div", { className: "muncher-dropdown", ref:
|
|
1495
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "muncher-dropdown", ref: y, children: [
|
|
1491
1496
|
/* @__PURE__ */ s.jsxs(
|
|
1492
|
-
|
|
1497
|
+
ne,
|
|
1493
1498
|
{
|
|
1494
|
-
onMouseDown:
|
|
1499
|
+
onMouseDown: w,
|
|
1495
1500
|
title: n,
|
|
1496
1501
|
disabled: r,
|
|
1497
1502
|
rounded: l,
|
|
@@ -1511,7 +1516,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1511
1516
|
]
|
|
1512
1517
|
}
|
|
1513
1518
|
),
|
|
1514
|
-
d ? /* @__PURE__ */ s.jsx("div", { className:
|
|
1519
|
+
d ? /* @__PURE__ */ s.jsx("div", { className: M(), children: x }) : ""
|
|
1515
1520
|
] });
|
|
1516
1521
|
}, Vh = ({
|
|
1517
1522
|
title: e,
|
|
@@ -1524,7 +1529,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1524
1529
|
...l
|
|
1525
1530
|
}) => /* @__PURE__ */ s.jsxs("div", { className: `muncher-dropdown-nav ${a ? "drop-left" : ""}`, children: [
|
|
1526
1531
|
/* @__PURE__ */ s.jsx(
|
|
1527
|
-
|
|
1532
|
+
ne,
|
|
1528
1533
|
{
|
|
1529
1534
|
type: "nav",
|
|
1530
1535
|
title: e,
|
|
@@ -1549,13 +1554,13 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1549
1554
|
}, 2e3);
|
|
1550
1555
|
};
|
|
1551
1556
|
return /* @__PURE__ */ s.jsx(
|
|
1552
|
-
|
|
1557
|
+
ne,
|
|
1553
1558
|
{
|
|
1554
1559
|
size: n,
|
|
1555
1560
|
variant: t,
|
|
1556
1561
|
title: l,
|
|
1557
1562
|
onClick: h,
|
|
1558
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1563
|
+
children: /* @__PURE__ */ s.jsx(N, { name: a, color: i })
|
|
1559
1564
|
}
|
|
1560
1565
|
);
|
|
1561
1566
|
}, Ch = ({
|
|
@@ -1572,33 +1577,33 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1572
1577
|
setShowContent: r,
|
|
1573
1578
|
variant: e,
|
|
1574
1579
|
size: t,
|
|
1575
|
-
element: /* @__PURE__ */ s.jsx(
|
|
1580
|
+
element: /* @__PURE__ */ s.jsx(N, { name: "share", orientation: "right", children: "Share" }),
|
|
1576
1581
|
children: [
|
|
1577
|
-
/* @__PURE__ */ s.jsx(
|
|
1582
|
+
/* @__PURE__ */ s.jsx(ne, { size: "small", variant: e, children: /* @__PURE__ */ s.jsx(
|
|
1578
1583
|
"a",
|
|
1579
1584
|
{
|
|
1580
1585
|
href: "https://twitter.com/share?url=" + window.location.href + "&text=" + n,
|
|
1581
1586
|
target: "_blank",
|
|
1582
1587
|
title: "Share link to Twitter",
|
|
1583
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1588
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "twitter" })
|
|
1584
1589
|
}
|
|
1585
1590
|
) }),
|
|
1586
|
-
/* @__PURE__ */ s.jsx(
|
|
1591
|
+
/* @__PURE__ */ s.jsx(ne, { size: "small", variant: e, children: /* @__PURE__ */ s.jsx(
|
|
1587
1592
|
"a",
|
|
1588
1593
|
{
|
|
1589
1594
|
href: "https://www.facebook.com/sharer/sharer.php?u=" + window.location.href,
|
|
1590
1595
|
target: "_blank",
|
|
1591
1596
|
title: "Share link to Facebook",
|
|
1592
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1597
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "facebook" })
|
|
1593
1598
|
}
|
|
1594
1599
|
) }),
|
|
1595
|
-
/* @__PURE__ */ s.jsx(
|
|
1600
|
+
/* @__PURE__ */ s.jsx(ne, { size: "small", variant: e, children: /* @__PURE__ */ s.jsx(
|
|
1596
1601
|
"a",
|
|
1597
1602
|
{
|
|
1598
1603
|
href: "mailto:?subject=" + n + "&body=" + window.location.href,
|
|
1599
1604
|
target: "_blank",
|
|
1600
1605
|
title: "share link by Email",
|
|
1601
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1606
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "mail" })
|
|
1602
1607
|
}
|
|
1603
1608
|
) }),
|
|
1604
1609
|
/* @__PURE__ */ s.jsx(wo, { text: window.location.href })
|
|
@@ -1619,7 +1624,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1619
1624
|
const h = encodeURI("data:text/csv;charset=utf-8," + e.join(",") + `
|
|
1620
1625
|
` + t.map((u) => u.join(",")).join(`
|
|
1621
1626
|
`));
|
|
1622
|
-
return /* @__PURE__ */ s.jsx("div", { className: "muncher-csv", children: /* @__PURE__ */ s.jsx(
|
|
1627
|
+
return /* @__PURE__ */ s.jsx("div", { className: "muncher-csv", children: /* @__PURE__ */ s.jsx(ne, { variant: i, size: r, active: o, disabled: l, rounded: c, children: /* @__PURE__ */ s.jsx("a", { href: h, download: n + ".csv", children: /* @__PURE__ */ s.jsx(N, { name: "download", children: a || "Download" }) }) }) });
|
|
1623
1628
|
}, To = ({
|
|
1624
1629
|
variant: e = "transparent",
|
|
1625
1630
|
size: t = "small",
|
|
@@ -1630,9 +1635,9 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1630
1635
|
onClick: o,
|
|
1631
1636
|
children: l
|
|
1632
1637
|
}) => {
|
|
1633
|
-
const [c, h] = Y(!1), u = () => !r || r && !c ? i ? /* @__PURE__ */ s.jsx(
|
|
1638
|
+
const [c, h] = Y(!1), u = () => !r || r && !c ? i ? /* @__PURE__ */ s.jsx(N, { name: "sort-asc" }) : /* @__PURE__ */ s.jsx(N, { name: "sort-desc" }) : i ? /* @__PURE__ */ s.jsx(N, { name: "sort-desc" }) : /* @__PURE__ */ s.jsx(N, { name: "sort-asc" });
|
|
1634
1639
|
return /* @__PURE__ */ s.jsxs(
|
|
1635
|
-
|
|
1640
|
+
ne,
|
|
1636
1641
|
{
|
|
1637
1642
|
variant: e,
|
|
1638
1643
|
size: t,
|
|
@@ -1677,14 +1682,14 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1677
1682
|
{
|
|
1678
1683
|
className: e === "left" ? "muncher-button--navigate muncher-button--navigate-left" : "muncher-button--navigate muncher-button--navigate-right",
|
|
1679
1684
|
children: /* @__PURE__ */ s.jsx(
|
|
1680
|
-
|
|
1685
|
+
ne,
|
|
1681
1686
|
{
|
|
1682
1687
|
onClick: o,
|
|
1683
1688
|
disabled: i,
|
|
1684
1689
|
size: "small",
|
|
1685
1690
|
variant: r,
|
|
1686
1691
|
title: e === "left" ? "Navigate Left" : "Navigate Right",
|
|
1687
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1692
|
+
children: /* @__PURE__ */ s.jsx(N, { name: l(), size: t, weight: n })
|
|
1688
1693
|
}
|
|
1689
1694
|
)
|
|
1690
1695
|
}
|
|
@@ -1752,7 +1757,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1752
1757
|
};
|
|
1753
1758
|
return /* @__PURE__ */ s.jsx("div", { className: "muncher-file-input--div", children: /* @__PURE__ */ s.jsxs("div", { className: "file-input-element", children: [
|
|
1754
1759
|
/* @__PURE__ */ s.jsxs("label", { htmlFor: e, className: d, children: [
|
|
1755
|
-
/* @__PURE__ */ s.jsx(
|
|
1760
|
+
/* @__PURE__ */ s.jsx(N, { name: "upload" }),
|
|
1756
1761
|
" ",
|
|
1757
1762
|
t || "Upload CSV",
|
|
1758
1763
|
r ? /* @__PURE__ */ s.jsx("span", { className: "required", children: " *" }) : "",
|
|
@@ -1786,17 +1791,17 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1786
1791
|
maxFiles: h,
|
|
1787
1792
|
...u
|
|
1788
1793
|
}) => {
|
|
1789
|
-
const [d, f] = Y(""), [m, x] = Y(""), g = h || 3,
|
|
1794
|
+
const [d, f] = Y(""), [m, x] = Y(""), g = h || 3, y = "muncher-button" + (n ? " muncher-button--" + n : "") + (i ? " muncher-button--" + i : "") + (a ? " muncher-button--active" : ""), w = (b) => {
|
|
1790
1795
|
if (c) {
|
|
1791
|
-
let
|
|
1792
|
-
|
|
1796
|
+
let M = Array.from(b.currentTarget.files);
|
|
1797
|
+
M.length > g && (M = M.slice(0, g), x("Only first " + g + " files included")), o(M), f(M.map((S) => S.name).join(", "));
|
|
1793
1798
|
} else
|
|
1794
|
-
o(Array.from(
|
|
1795
|
-
},
|
|
1799
|
+
o(Array.from(b.currentTarget.files[0])), f(b.currentTarget.files[0].name);
|
|
1800
|
+
}, v = () => l && l !== "";
|
|
1796
1801
|
return /* @__PURE__ */ s.jsxs("div", { className: "muncher-file-input--div", children: [
|
|
1797
1802
|
/* @__PURE__ */ s.jsxs("div", { className: "file-input-element", children: [
|
|
1798
|
-
/* @__PURE__ */ s.jsxs("label", { htmlFor: e, className:
|
|
1799
|
-
/* @__PURE__ */ s.jsx(
|
|
1803
|
+
/* @__PURE__ */ s.jsxs("label", { htmlFor: e, className: y, children: [
|
|
1804
|
+
/* @__PURE__ */ s.jsx(N, { name: "image" }),
|
|
1800
1805
|
" ",
|
|
1801
1806
|
t,
|
|
1802
1807
|
r ? /* @__PURE__ */ s.jsx("span", { className: "required", children: " *" }) : ""
|
|
@@ -1809,7 +1814,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1809
1814
|
type: "file",
|
|
1810
1815
|
className: "muncher-file-input",
|
|
1811
1816
|
name: e,
|
|
1812
|
-
onChange:
|
|
1817
|
+
onChange: w,
|
|
1813
1818
|
multiple: c,
|
|
1814
1819
|
accept: "image/*",
|
|
1815
1820
|
...u
|
|
@@ -1817,7 +1822,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1817
1822
|
)
|
|
1818
1823
|
] }),
|
|
1819
1824
|
m !== "" ? /* @__PURE__ */ s.jsx("p", { className: "text-danger", children: m }) : "",
|
|
1820
|
-
|
|
1825
|
+
v() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(N, { name: "alert", children: l }) }) : ""
|
|
1821
1826
|
] });
|
|
1822
1827
|
}, So = ({
|
|
1823
1828
|
name: e,
|
|
@@ -1836,26 +1841,26 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1836
1841
|
focus: m = !1,
|
|
1837
1842
|
placeholder: x,
|
|
1838
1843
|
onChange: g,
|
|
1839
|
-
step:
|
|
1840
|
-
value:
|
|
1841
|
-
maxLength:
|
|
1842
|
-
onEnterPress:
|
|
1843
|
-
displayLoader:
|
|
1844
|
+
step: y,
|
|
1845
|
+
value: w,
|
|
1846
|
+
maxLength: v,
|
|
1847
|
+
onEnterPress: b,
|
|
1848
|
+
displayLoader: M,
|
|
1844
1849
|
...S
|
|
1845
1850
|
}) => {
|
|
1846
|
-
const E = () => f && f !== "",
|
|
1847
|
-
let
|
|
1848
|
-
return (r || a) && (
|
|
1849
|
-
},
|
|
1850
|
-
|
|
1851
|
+
const E = () => f && f !== "", k = () => {
|
|
1852
|
+
let T = "muncher-input";
|
|
1853
|
+
return (r || a) && (T += " muncher-input-icon"), E() && (T += " muncher-input-error"), u === "side" && (T += " muncher-label-side"), T;
|
|
1854
|
+
}, P = () => t ? /* @__PURE__ */ s.jsx(nt, { label: t, required: n, id: e }) : "", O = (T) => {
|
|
1855
|
+
T.key === "Enter" && b && b(), d && d(T);
|
|
1851
1856
|
};
|
|
1852
1857
|
return /* @__PURE__ */ s.jsxs("div", { className: "muncher-input--div", children: [
|
|
1853
|
-
u !== "side" ?
|
|
1858
|
+
u !== "side" ? P() : "",
|
|
1854
1859
|
/* @__PURE__ */ s.jsxs("div", { className: "muncher-input-element", children: [
|
|
1855
|
-
u === "side" ?
|
|
1856
|
-
r ? /* @__PURE__ */ s.jsx(
|
|
1860
|
+
u === "side" ? P() : "",
|
|
1861
|
+
r ? /* @__PURE__ */ s.jsx(N, { name: r }) : "",
|
|
1857
1862
|
a ? /* @__PURE__ */ s.jsxs("span", { className: "muncher-icon-hover", children: [
|
|
1858
|
-
/* @__PURE__ */ s.jsx(
|
|
1863
|
+
/* @__PURE__ */ s.jsx(N, { name: a, onClick: o }),
|
|
1859
1864
|
" "
|
|
1860
1865
|
] }) : "",
|
|
1861
1866
|
/* @__PURE__ */ s.jsxs("div", { className: "muncher-input-wrapper", children: [
|
|
@@ -1863,10 +1868,10 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1863
1868
|
"input",
|
|
1864
1869
|
{
|
|
1865
1870
|
id: e,
|
|
1866
|
-
className:
|
|
1871
|
+
className: k(),
|
|
1867
1872
|
name: e,
|
|
1868
1873
|
autoFocus: m,
|
|
1869
|
-
value:
|
|
1874
|
+
value: w,
|
|
1870
1875
|
type: l || "text",
|
|
1871
1876
|
autoComplete: "off",
|
|
1872
1877
|
placeholder: x,
|
|
@@ -1874,17 +1879,17 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1874
1879
|
required: n,
|
|
1875
1880
|
readOnly: i,
|
|
1876
1881
|
list: c,
|
|
1877
|
-
onKeyDown:
|
|
1882
|
+
onKeyDown: O,
|
|
1878
1883
|
onBlur: h,
|
|
1879
|
-
step:
|
|
1880
|
-
maxLength:
|
|
1884
|
+
step: y,
|
|
1885
|
+
maxLength: v,
|
|
1881
1886
|
...S
|
|
1882
1887
|
}
|
|
1883
1888
|
),
|
|
1884
|
-
|
|
1889
|
+
M ? /* @__PURE__ */ s.jsx(vi, { size: "tiny" }) : ""
|
|
1885
1890
|
] })
|
|
1886
1891
|
] }),
|
|
1887
|
-
E() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(
|
|
1892
|
+
E() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(N, { name: "alert", children: f }) }) : ""
|
|
1888
1893
|
] });
|
|
1889
1894
|
}, kh = ({ name: e, required: t = !1, onChange: n, checked: i = !1, label: r, ...a }) => /* @__PURE__ */ s.jsx("div", { className: "muncher-input--div", children: /* @__PURE__ */ s.jsxs("div", { className: "muncher-radio", children: [
|
|
1890
1895
|
/* @__PURE__ */ s.jsx(
|
|
@@ -1943,7 +1948,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1943
1948
|
]
|
|
1944
1949
|
}
|
|
1945
1950
|
) }),
|
|
1946
|
-
h() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(
|
|
1951
|
+
h() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(N, { name: "alert", children: a }) }) : ""
|
|
1947
1952
|
] });
|
|
1948
1953
|
}, Rh = ({
|
|
1949
1954
|
name: e,
|
|
@@ -2002,31 +2007,31 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2002
2007
|
displayLoader: m,
|
|
2003
2008
|
children: x
|
|
2004
2009
|
}) => {
|
|
2005
|
-
const g = fe(null),
|
|
2006
|
-
a(!0), i(
|
|
2007
|
-
},
|
|
2010
|
+
const g = fe(null), y = (b) => {
|
|
2011
|
+
a(!0), i(b.target.value);
|
|
2012
|
+
}, w = Ce(() => {
|
|
2008
2013
|
a(!1);
|
|
2009
|
-
}, [a]),
|
|
2010
|
-
|
|
2011
|
-
}, [
|
|
2014
|
+
}, [a]), v = Ce((b) => {
|
|
2015
|
+
b.keyCode === 27 && w();
|
|
2016
|
+
}, [w]);
|
|
2012
2017
|
return je(() => {
|
|
2013
|
-
const
|
|
2018
|
+
const b = (M) => {
|
|
2014
2019
|
if (g && g !== null) {
|
|
2015
2020
|
const S = g.current;
|
|
2016
|
-
S && !S.contains(
|
|
2021
|
+
S && !S.contains(M.target) && w();
|
|
2017
2022
|
}
|
|
2018
2023
|
};
|
|
2019
|
-
return document.addEventListener("keydown",
|
|
2020
|
-
document.removeEventListener("keydown",
|
|
2024
|
+
return document.addEventListener("keydown", v, !1), document.addEventListener("mousedown", b), () => {
|
|
2025
|
+
document.removeEventListener("keydown", v, !1);
|
|
2021
2026
|
};
|
|
2022
|
-
}, [
|
|
2027
|
+
}, [v, w]), /* @__PURE__ */ s.jsxs("div", { className: "muncher-input-drop-down", ref: g, children: [
|
|
2023
2028
|
/* @__PURE__ */ s.jsx(
|
|
2024
2029
|
So,
|
|
2025
2030
|
{
|
|
2026
2031
|
focus: t,
|
|
2027
2032
|
placeholder: n,
|
|
2028
2033
|
name: e,
|
|
2029
|
-
onChange:
|
|
2034
|
+
onChange: y,
|
|
2030
2035
|
onEnterPress: d,
|
|
2031
2036
|
list: f,
|
|
2032
2037
|
displayLoader: m,
|
|
@@ -2040,7 +2045,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2040
2045
|
r ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-drop-down--content", children: x }) : ""
|
|
2041
2046
|
] });
|
|
2042
2047
|
}, Nh = ({ children: e }) => /* @__PURE__ */ s.jsx("ul", { className: "muncher-ul", children: e }), Fh = ({ isFeatured: e, bulletIcon: t = "arrow-right", bulletWeight: n = 2, bulletSize: i = "small", bulletColor: r, children: a }) => /* @__PURE__ */ s.jsx("li", { className: e ? "muncher-li featured" : "muncher-li", children: /* @__PURE__ */ s.jsx(
|
|
2043
|
-
|
|
2048
|
+
N,
|
|
2044
2049
|
{
|
|
2045
2050
|
name: t,
|
|
2046
2051
|
weight: n,
|
|
@@ -2075,7 +2080,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2075
2080
|
const i = () => e ? "muncher-paper muncher-paper-hover" : "muncher-paper";
|
|
2076
2081
|
return /* @__PURE__ */ s.jsx("section", { className: i(), onClick: t, children: n });
|
|
2077
2082
|
}, Bh = ({ pillCloseHandler: e, children: t, ...n }) => /* @__PURE__ */ s.jsxs("div", { className: "muncher-pill", ...n, children: [
|
|
2078
|
-
/* @__PURE__ */ s.jsx("div", { className: "close", onClick: e, children: /* @__PURE__ */ s.jsx(
|
|
2083
|
+
/* @__PURE__ */ s.jsx("div", { className: "close", onClick: e, children: /* @__PURE__ */ s.jsx(N, { name: "close" }) }),
|
|
2079
2084
|
/* @__PURE__ */ s.jsxs("div", { className: "content", children: [
|
|
2080
2085
|
" ",
|
|
2081
2086
|
t
|
|
@@ -2233,7 +2238,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2233
2238
|
/* @__PURE__ */ s.jsx("header", { children: r.map(
|
|
2234
2239
|
(o, l) => /* @__PURE__ */ s.jsxs("div", { className: "muncher-tab-header--item", children: [
|
|
2235
2240
|
/* @__PURE__ */ s.jsx(
|
|
2236
|
-
|
|
2241
|
+
ne,
|
|
2237
2242
|
{
|
|
2238
2243
|
variant: "transparent",
|
|
2239
2244
|
active: n === l,
|
|
@@ -2265,91 +2270,92 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2265
2270
|
skeleton: n,
|
|
2266
2271
|
handleOnUpload: i,
|
|
2267
2272
|
sortBy: r,
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2273
|
+
className: a,
|
|
2274
|
+
excludeDownload: o,
|
|
2275
|
+
includeUpload: l,
|
|
2276
|
+
isUploading: c,
|
|
2277
|
+
uploadWarningMessage: h,
|
|
2278
|
+
uploadSuccessMessage: u,
|
|
2279
|
+
excludePagination: d,
|
|
2280
|
+
footer: f,
|
|
2281
|
+
children: m
|
|
2276
2282
|
}) => {
|
|
2277
|
-
const { header:
|
|
2278
|
-
|
|
2279
|
-
(C) => C.index ===
|
|
2283
|
+
const { header: x, rows: g } = m, [y, w] = Y(r ?? { index: -1 }), [v, b] = Y({ num: 0, size: t }), M = (T) => {
|
|
2284
|
+
w(
|
|
2285
|
+
(C) => C.index === T ? { ...C, desc: !C.desc } : { index: T }
|
|
2280
2286
|
);
|
|
2281
|
-
},
|
|
2282
|
-
var
|
|
2283
|
-
const
|
|
2284
|
-
if (
|
|
2285
|
-
return
|
|
2286
|
-
const C = (
|
|
2287
|
-
return C ?
|
|
2288
|
-
var
|
|
2289
|
-
const
|
|
2290
|
-
return
|
|
2291
|
-
}),
|
|
2292
|
-
}, [
|
|
2293
|
-
() =>
|
|
2294
|
-
[
|
|
2295
|
-
),
|
|
2296
|
-
(
|
|
2297
|
-
);
|
|
2298
|
-
return /* @__PURE__ */ s.jsxs("section", { className:
|
|
2299
|
-
/* @__PURE__ */ s.jsx("div", { className: "row head", children:
|
|
2300
|
-
(
|
|
2287
|
+
}, S = Oe(() => {
|
|
2288
|
+
var F;
|
|
2289
|
+
const T = [...g];
|
|
2290
|
+
if (y.index < 0)
|
|
2291
|
+
return T;
|
|
2292
|
+
const C = (F = x[y.index]) == null ? void 0 : F.sort;
|
|
2293
|
+
return C ? T.sort(C) : T.sort((X, $) => {
|
|
2294
|
+
var Ee, I, _, j;
|
|
2295
|
+
const Q = ((I = (Ee = X[y.index]) == null ? void 0 : Ee.value) == null ? void 0 : I.toString().toLowerCase()) ?? "", q = ((j = (_ = $[y.index]) == null ? void 0 : _.value) == null ? void 0 : j.toString().toLowerCase()) ?? "";
|
|
2296
|
+
return Q.localeCompare(q);
|
|
2297
|
+
}), y.desc ? T.reverse() : T;
|
|
2298
|
+
}, [g, y, x]), E = Oe(
|
|
2299
|
+
() => S.slice(v.num * v.size, (v.num + 1) * v.size),
|
|
2300
|
+
[S, v]
|
|
2301
|
+
), k = x.filter((T) => !T.csvExclude).map((T) => typeof T.name == "string" ? T.name : ""), P = g.map(
|
|
2302
|
+
(T) => T.filter((C, F) => !x[F].csvExclude).map((C) => C.csv ?? C.value ?? "")
|
|
2303
|
+
), O = "muncher-table" + (a ? " " + a : "");
|
|
2304
|
+
return /* @__PURE__ */ s.jsxs("section", { className: O, children: [
|
|
2305
|
+
/* @__PURE__ */ s.jsx("div", { className: "row head", children: x.map(
|
|
2306
|
+
(T, C) => T.visibility === "hidden" ? null : /* @__PURE__ */ s.jsx(
|
|
2301
2307
|
"div",
|
|
2302
2308
|
{
|
|
2303
|
-
title:
|
|
2304
|
-
className:
|
|
2305
|
-
children: typeof
|
|
2309
|
+
title: T.title,
|
|
2310
|
+
className: T.visibility ? "col main" : "col",
|
|
2311
|
+
children: typeof T.name == "string" ? /* @__PURE__ */ s.jsx("div", { className: "sort-button", children: /* @__PURE__ */ s.jsx(
|
|
2306
2312
|
To,
|
|
2307
2313
|
{
|
|
2308
|
-
onClick: () =>
|
|
2309
|
-
active:
|
|
2310
|
-
sortAsc: !
|
|
2311
|
-
children:
|
|
2314
|
+
onClick: () => M(C),
|
|
2315
|
+
active: y.index === C,
|
|
2316
|
+
sortAsc: !y.desc,
|
|
2317
|
+
children: T.name
|
|
2312
2318
|
}
|
|
2313
|
-
) }) :
|
|
2319
|
+
) }) : T.name
|
|
2314
2320
|
},
|
|
2315
2321
|
`row-head-${C}`
|
|
2316
2322
|
)
|
|
2317
2323
|
) }),
|
|
2318
|
-
n ||
|
|
2319
|
-
(
|
|
2324
|
+
n || E.map((T, C) => /* @__PURE__ */ s.jsx("div", { className: "row", children: T.map(
|
|
2325
|
+
(F, X) => x[X].visibility === "hidden" ? null : /* @__PURE__ */ s.jsx(
|
|
2320
2326
|
"div",
|
|
2321
2327
|
{
|
|
2322
|
-
className:
|
|
2323
|
-
children:
|
|
2328
|
+
className: x[X].visibility ? "col main" : "col",
|
|
2329
|
+
children: F.content
|
|
2324
2330
|
},
|
|
2325
|
-
`row-col-${C}-${
|
|
2331
|
+
`row-col-${C}-${X}`
|
|
2326
2332
|
)
|
|
2327
2333
|
) }, `row-${C}`)),
|
|
2328
|
-
|
|
2334
|
+
f ?? null,
|
|
2329
2335
|
/* @__PURE__ */ s.jsxs("div", { className: "row-footer", children: [
|
|
2330
2336
|
/* @__PURE__ */ s.jsxs("div", { className: "row-footer-buttons", children: [
|
|
2331
|
-
!
|
|
2337
|
+
!o && /* @__PURE__ */ s.jsx(
|
|
2332
2338
|
bo,
|
|
2333
2339
|
{
|
|
2334
2340
|
filename: e ?? "download",
|
|
2335
2341
|
variant: "secondary",
|
|
2336
2342
|
title: "Download",
|
|
2337
|
-
header:
|
|
2338
|
-
data:
|
|
2343
|
+
header: k,
|
|
2344
|
+
data: P
|
|
2339
2345
|
}
|
|
2340
2346
|
),
|
|
2341
|
-
|
|
2347
|
+
l && /* @__PURE__ */ s.jsx(
|
|
2342
2348
|
Mo,
|
|
2343
2349
|
{
|
|
2344
2350
|
name: "csv-input-file",
|
|
2345
2351
|
handleOnChange: i,
|
|
2346
|
-
isUploading:
|
|
2347
|
-
warningMessage:
|
|
2348
|
-
successMessage:
|
|
2352
|
+
isUploading: c,
|
|
2353
|
+
warningMessage: h,
|
|
2354
|
+
successMessage: u
|
|
2349
2355
|
}
|
|
2350
2356
|
)
|
|
2351
2357
|
] }),
|
|
2352
|
-
!
|
|
2358
|
+
!d && /* @__PURE__ */ s.jsxs("div", { className: "pagination", children: [
|
|
2353
2359
|
/* @__PURE__ */ s.jsxs("div", { className: "left", children: [
|
|
2354
2360
|
"Rows:",
|
|
2355
2361
|
/* @__PURE__ */ s.jsx(
|
|
@@ -2357,42 +2363,41 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2357
2363
|
{
|
|
2358
2364
|
name: "pageSize",
|
|
2359
2365
|
options: [
|
|
2360
|
-
{ label: "
|
|
2366
|
+
{ label: "10", value: "10" },
|
|
2361
2367
|
{ label: "50", value: "50" },
|
|
2362
|
-
{ label: "100", value: "100" }
|
|
2363
|
-
{ label: "500", value: "500" }
|
|
2368
|
+
{ label: "100", value: "100" }
|
|
2364
2369
|
],
|
|
2365
|
-
value: String(
|
|
2366
|
-
onChange: (
|
|
2370
|
+
value: String(v.size),
|
|
2371
|
+
onChange: (T) => b({ num: 0, size: parseInt(T.target.value, 10) })
|
|
2367
2372
|
}
|
|
2368
2373
|
)
|
|
2369
2374
|
] }),
|
|
2370
2375
|
/* @__PURE__ */ s.jsxs("div", { className: "center", children: [
|
|
2371
|
-
|
|
2376
|
+
v.num * v.size + 1,
|
|
2372
2377
|
" -",
|
|
2373
|
-
Math.min((
|
|
2378
|
+
Math.min((v.num + 1) * v.size, g.length),
|
|
2374
2379
|
" of ",
|
|
2375
|
-
|
|
2380
|
+
g.length
|
|
2376
2381
|
] }),
|
|
2377
2382
|
/* @__PURE__ */ s.jsxs("div", { className: "right", children: [
|
|
2378
2383
|
/* @__PURE__ */ s.jsx(
|
|
2379
|
-
|
|
2384
|
+
ne,
|
|
2380
2385
|
{
|
|
2381
2386
|
variant: "transparent",
|
|
2382
|
-
disabled:
|
|
2387
|
+
disabled: v.num === 0,
|
|
2383
2388
|
size: "small",
|
|
2384
|
-
onClick: () => b({ ...
|
|
2385
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2389
|
+
onClick: () => b({ ...v, num: v.num - 1 }),
|
|
2390
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "chevron-left" })
|
|
2386
2391
|
}
|
|
2387
2392
|
),
|
|
2388
2393
|
/* @__PURE__ */ s.jsx(
|
|
2389
|
-
|
|
2394
|
+
ne,
|
|
2390
2395
|
{
|
|
2391
2396
|
variant: "transparent",
|
|
2392
|
-
disabled: (
|
|
2397
|
+
disabled: (v.num + 1) * v.size >= g.length,
|
|
2393
2398
|
size: "small",
|
|
2394
|
-
onClick: () => b({ ...
|
|
2395
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2399
|
+
onClick: () => b({ ...v, num: v.num + 1 }),
|
|
2400
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "chevron-right" })
|
|
2396
2401
|
}
|
|
2397
2402
|
)
|
|
2398
2403
|
] })
|
|
@@ -2436,7 +2441,7 @@ function Si(e) {
|
|
|
2436
2441
|
let t;
|
|
2437
2442
|
return () => (t === void 0 && (t = e()), t);
|
|
2438
2443
|
}
|
|
2439
|
-
const
|
|
2444
|
+
const ie = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Eo = (e, t) => (n) => t(e(n)), st = (...e) => e.reduce(Eo), Je = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
2440
2445
|
const i = t - e;
|
|
2441
2446
|
return i === 0 ? 1 : (n - e) / i;
|
|
2442
2447
|
};
|
|
@@ -2465,7 +2470,7 @@ class Sn {
|
|
|
2465
2470
|
this.subscriptions.length = 0;
|
|
2466
2471
|
}
|
|
2467
2472
|
}
|
|
2468
|
-
const
|
|
2473
|
+
const te = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, se = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
|
|
2469
2474
|
function Ai(e, t) {
|
|
2470
2475
|
return t ? e * (1e3 / t) : 0;
|
|
2471
2476
|
}
|
|
@@ -2483,12 +2488,12 @@ function Ro(e, t, n, i, r) {
|
|
|
2483
2488
|
}
|
|
2484
2489
|
function it(e, t, n, i) {
|
|
2485
2490
|
if (e === t && n === i)
|
|
2486
|
-
return
|
|
2491
|
+
return ie;
|
|
2487
2492
|
const r = (a) => Ro(a, 0, 1, e, n);
|
|
2488
2493
|
return (a) => a === 0 || a === 1 ? a : Pi(r(a), t, i);
|
|
2489
2494
|
}
|
|
2490
2495
|
const Vi = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Ci = (e) => (t) => 1 - e(1 - t), Ei = /* @__PURE__ */ it(0.33, 1.53, 0.69, 0.99), Pn = /* @__PURE__ */ Ci(Ei), Di = /* @__PURE__ */ Vi(Pn), ki = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? 0.5 * Pn(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), Vn = (e) => 1 - Math.sin(Math.acos(e)), Ri = Ci(Vn), Li = Vi(Vn), Lo = /* @__PURE__ */ it(0.42, 0, 1, 1), No = /* @__PURE__ */ it(0, 0, 0.58, 1), Ni = /* @__PURE__ */ it(0.42, 0, 0.58, 1), Fo = (e) => Array.isArray(e) && typeof e[0] != "number", Fi = (e) => Array.isArray(e) && typeof e[0] == "number", ts = {
|
|
2491
|
-
linear:
|
|
2496
|
+
linear: ie,
|
|
2492
2497
|
easeIn: Lo,
|
|
2493
2498
|
easeInOut: Ni,
|
|
2494
2499
|
easeOut: No,
|
|
@@ -2572,27 +2577,27 @@ function Oi(e, t) {
|
|
|
2572
2577
|
delta: 0,
|
|
2573
2578
|
timestamp: 0,
|
|
2574
2579
|
isProcessing: !1
|
|
2575
|
-
}, a = () => n = !0, o = ct.reduce((
|
|
2576
|
-
const
|
|
2577
|
-
n = !1,
|
|
2578
|
-
},
|
|
2580
|
+
}, a = () => n = !0, o = ct.reduce((b, M) => (b[M] = Io(a), b), {}), { setup: l, read: c, resolveKeyframes: h, preUpdate: u, update: d, preRender: f, render: m, postRender: x } = o, g = () => {
|
|
2581
|
+
const b = ve.useManualTiming, M = b ? r.timestamp : performance.now();
|
|
2582
|
+
n = !1, b || (r.delta = i ? 1e3 / 60 : Math.max(Math.min(M - r.timestamp, Bo), 1)), r.timestamp = M, r.isProcessing = !0, l.process(r), c.process(r), h.process(r), u.process(r), d.process(r), f.process(r), m.process(r), x.process(r), r.isProcessing = !1, n && t && (i = !1, e(g));
|
|
2583
|
+
}, y = () => {
|
|
2579
2584
|
n = !0, i = !0, r.isProcessing || e(g);
|
|
2580
2585
|
};
|
|
2581
|
-
return { schedule: ct.reduce((
|
|
2582
|
-
const S = o[
|
|
2583
|
-
return
|
|
2584
|
-
}, {}), cancel: (
|
|
2585
|
-
for (let
|
|
2586
|
-
o[ct[
|
|
2586
|
+
return { schedule: ct.reduce((b, M) => {
|
|
2587
|
+
const S = o[M];
|
|
2588
|
+
return b[M] = (E, k = !1, P = !1) => (n || y(), S.schedule(E, k, P)), b;
|
|
2589
|
+
}, {}), cancel: (b) => {
|
|
2590
|
+
for (let M = 0; M < ct.length; M++)
|
|
2591
|
+
o[ct[M]].cancel(b);
|
|
2587
2592
|
}, state: r, steps: o };
|
|
2588
2593
|
}
|
|
2589
|
-
const { schedule:
|
|
2594
|
+
const { schedule: D, cancel: we, state: U, steps: Ft } = /* @__PURE__ */ Oi(typeof requestAnimationFrame < "u" ? requestAnimationFrame : ie, !0);
|
|
2590
2595
|
let ft;
|
|
2591
2596
|
function zo() {
|
|
2592
2597
|
ft = void 0;
|
|
2593
2598
|
}
|
|
2594
2599
|
const Z = {
|
|
2595
|
-
now: () => (ft === void 0 && Z.set(
|
|
2600
|
+
now: () => (ft === void 0 && Z.set(U.isProcessing || ve.useManualTiming ? U.timestamp : performance.now()), ft),
|
|
2596
2601
|
set: (e) => {
|
|
2597
2602
|
ft = e, queueMicrotask(zo);
|
|
2598
2603
|
}
|
|
@@ -2657,13 +2662,13 @@ const Jt = {
|
|
|
2657
2662
|
test: /* @__PURE__ */ Dn("hsl", "hue"),
|
|
2658
2663
|
parse: /* @__PURE__ */ zi("hue", "saturation", "lightness"),
|
|
2659
2664
|
transform: ({ hue: e, saturation: t, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(e) + ", " + he.transform(Xe(t)) + ", " + he.transform(Xe(n)) + ", " + Xe(Qe.transform(i)) + ")"
|
|
2660
|
-
},
|
|
2665
|
+
}, z = {
|
|
2661
2666
|
test: (e) => Se.test(e) || Jt.test(e) || Re.test(e),
|
|
2662
2667
|
parse: (e) => Se.test(e) ? Se.parse(e) : Re.test(e) ? Re.parse(e) : Jt.parse(e),
|
|
2663
2668
|
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Se.transform(e) : Re.transform(e),
|
|
2664
2669
|
getAnimatableNone: (e) => {
|
|
2665
|
-
const t =
|
|
2666
|
-
return t.alpha = 0,
|
|
2670
|
+
const t = z.parse(e);
|
|
2671
|
+
return t.alpha = 0, z.transform(t);
|
|
2667
2672
|
}
|
|
2668
2673
|
}, Xo = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
2669
2674
|
function qo(e) {
|
|
@@ -2678,7 +2683,7 @@ function Ie(e) {
|
|
|
2678
2683
|
var: []
|
|
2679
2684
|
}, r = [];
|
|
2680
2685
|
let a = 0;
|
|
2681
|
-
const l = t.replace(Qo, (c) => (
|
|
2686
|
+
const l = t.replace(Qo, (c) => (z.test(c) ? (i.color.push(a), r.push(_i), n.push(z.parse(c))) : c.startsWith(Jo) ? (i.var.push(a), r.push(Zo), n.push(c)) : (i.number.push(a), r.push(Hi), n.push(parseFloat(c))), ++a, rs)).split(rs);
|
|
2682
2687
|
return { values: n, split: l, indexes: i, types: r };
|
|
2683
2688
|
}
|
|
2684
2689
|
function ea(e) {
|
|
@@ -2691,7 +2696,7 @@ function Ui({ split: e, types: t }) {
|
|
|
2691
2696
|
for (let a = 0; a < n; a++)
|
|
2692
2697
|
if (r += e[a], i[a] !== void 0) {
|
|
2693
2698
|
const o = t[a];
|
|
2694
|
-
o === Hi ? r += Xe(i[a]) : o === _i ? r +=
|
|
2699
|
+
o === Hi ? r += Xe(i[a]) : o === _i ? r += z.transform(i[a]) : r += i[a];
|
|
2695
2700
|
}
|
|
2696
2701
|
return r;
|
|
2697
2702
|
};
|
|
@@ -2699,7 +2704,7 @@ function Ui({ split: e, types: t }) {
|
|
|
2699
2704
|
function ta(e) {
|
|
2700
2705
|
return Ui(Ie(e));
|
|
2701
2706
|
}
|
|
2702
|
-
const na = (e) => typeof e == "number" ? 0 :
|
|
2707
|
+
const na = (e) => typeof e == "number" ? 0 : z.test(e) ? z.getAnimatableNone(e) : e, sa = (e, t) => typeof e == "number" ? t != null && t.trim().endsWith("/") ? e : 0 : na(e);
|
|
2703
2708
|
function ia(e) {
|
|
2704
2709
|
const t = Ie(e);
|
|
2705
2710
|
return Ui(t)(t.values.map((i, r) => sa(i, t.split[r])));
|
|
@@ -2732,7 +2737,7 @@ function ra({ hue: e, saturation: t, lightness: n, alpha: i }) {
|
|
|
2732
2737
|
function wt(e, t) {
|
|
2733
2738
|
return (n) => n > 0 ? t : e;
|
|
2734
2739
|
}
|
|
2735
|
-
const
|
|
2740
|
+
const L = (e, t, n) => e + (t - e) * n, Bt = (e, t, n) => {
|
|
2736
2741
|
const i = e * e, r = n * (t * t - i) + i;
|
|
2737
2742
|
return r < 0 ? 0 : Math.sqrt(r);
|
|
2738
2743
|
}, oa = [Jt, Se, Re], aa = (e) => oa.find((t) => t.test(e));
|
|
@@ -2748,16 +2753,16 @@ const as = (e, t) => {
|
|
|
2748
2753
|
if (!n || !i)
|
|
2749
2754
|
return wt(e, t);
|
|
2750
2755
|
const r = { ...n };
|
|
2751
|
-
return (a) => (r.red = Bt(n.red, i.red, a), r.green = Bt(n.green, i.green, a), r.blue = Bt(n.blue, i.blue, a), r.alpha =
|
|
2756
|
+
return (a) => (r.red = Bt(n.red, i.red, a), r.green = Bt(n.green, i.green, a), r.blue = Bt(n.blue, i.blue, a), r.alpha = L(n.alpha, i.alpha, a), Se.transform(r));
|
|
2752
2757
|
}, Qt = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2753
2758
|
function la(e, t) {
|
|
2754
2759
|
return Qt.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
2755
2760
|
}
|
|
2756
2761
|
function ca(e, t) {
|
|
2757
|
-
return (n) =>
|
|
2762
|
+
return (n) => L(e, t, n);
|
|
2758
2763
|
}
|
|
2759
2764
|
function kn(e) {
|
|
2760
|
-
return typeof e == "number" ? ca : typeof e == "string" ? Cn(e) ? wt :
|
|
2765
|
+
return typeof e == "number" ? ca : typeof e == "string" ? Cn(e) ? wt : z.test(e) ? as : da : Array.isArray(e) ? Wi : typeof e == "object" ? z.test(e) ? as : ua : wt;
|
|
2761
2766
|
}
|
|
2762
2767
|
function Wi(e, t) {
|
|
2763
2768
|
const n = [...e], i = n.length, r = e.map((a, o) => kn(a)(a, t[o]));
|
|
@@ -2790,18 +2795,18 @@ const da = (e, t) => {
|
|
|
2790
2795
|
return i.indexes.var.length === r.indexes.var.length && i.indexes.color.length === r.indexes.color.length && i.indexes.number.length >= r.indexes.number.length ? Qt.has(e) && !r.values.length || Qt.has(t) && !i.values.length ? la(e, t) : st(Wi(ha(i, r), r.values), n) : (He(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), wt(e, t));
|
|
2791
2796
|
};
|
|
2792
2797
|
function $i(e, t, n) {
|
|
2793
|
-
return typeof e == "number" && typeof t == "number" && typeof n == "number" ?
|
|
2798
|
+
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? L(e, t, n) : kn(e)(e, t);
|
|
2794
2799
|
}
|
|
2795
2800
|
const fa = (e) => {
|
|
2796
2801
|
const t = ({ timestamp: n }) => e(n);
|
|
2797
2802
|
return {
|
|
2798
|
-
start: (n = !0) =>
|
|
2803
|
+
start: (n = !0) => D.update(t, n),
|
|
2799
2804
|
stop: () => we(t),
|
|
2800
2805
|
/**
|
|
2801
2806
|
* If we're processing this frame we can use the
|
|
2802
2807
|
* framelocked timestamp to keep things in sync.
|
|
2803
2808
|
*/
|
|
2804
|
-
now: () =>
|
|
2809
|
+
now: () => U.isProcessing ? U.timestamp : Z.now()
|
|
2805
2810
|
};
|
|
2806
2811
|
}, Ki = (e, t, n = 10) => {
|
|
2807
2812
|
let i = "";
|
|
@@ -2823,10 +2828,10 @@ function pa(e, t = 100, n) {
|
|
|
2823
2828
|
return {
|
|
2824
2829
|
type: "keyframes",
|
|
2825
2830
|
ease: (a) => i.next(r * a).value / t,
|
|
2826
|
-
duration: /* @__PURE__ */
|
|
2831
|
+
duration: /* @__PURE__ */ se(r)
|
|
2827
2832
|
};
|
|
2828
2833
|
}
|
|
2829
|
-
const
|
|
2834
|
+
const B = {
|
|
2830
2835
|
// Default spring physics
|
|
2831
2836
|
stiffness: 100,
|
|
2832
2837
|
damping: 10,
|
|
@@ -2866,11 +2871,11 @@ function xa(e, t, n) {
|
|
|
2866
2871
|
return i;
|
|
2867
2872
|
}
|
|
2868
2873
|
const ls = 1e-3;
|
|
2869
|
-
function ya({ duration: e =
|
|
2874
|
+
function ya({ duration: e = B.duration, bounce: t = B.bounce, velocity: n = B.velocity, mass: i = B.mass }) {
|
|
2870
2875
|
let r, a;
|
|
2871
|
-
He(e <= /* @__PURE__ */
|
|
2876
|
+
He(e <= /* @__PURE__ */ te(B.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
2872
2877
|
let o = 1 - t;
|
|
2873
|
-
o = de(
|
|
2878
|
+
o = de(B.minDamping, B.maxDamping, o), e = de(B.minDuration, B.maxDuration, /* @__PURE__ */ se(e)), o < 1 ? (r = (h) => {
|
|
2874
2879
|
const u = h * o, d = u * e, f = u - n, m = en(h, o), x = Math.exp(-d);
|
|
2875
2880
|
return ls - f / m * x;
|
|
2876
2881
|
}, a = (h) => {
|
|
@@ -2884,10 +2889,10 @@ function ya({ duration: e = I.duration, bounce: t = I.bounce, velocity: n = I.ve
|
|
|
2884
2889
|
return u * d;
|
|
2885
2890
|
});
|
|
2886
2891
|
const l = 5 / e, c = xa(r, a, l);
|
|
2887
|
-
if (e = /* @__PURE__ */
|
|
2892
|
+
if (e = /* @__PURE__ */ te(e), isNaN(c))
|
|
2888
2893
|
return {
|
|
2889
|
-
stiffness:
|
|
2890
|
-
damping:
|
|
2894
|
+
stiffness: B.stiffness,
|
|
2895
|
+
damping: B.damping,
|
|
2891
2896
|
duration: e
|
|
2892
2897
|
};
|
|
2893
2898
|
{
|
|
@@ -2905,10 +2910,10 @@ function cs(e, t) {
|
|
|
2905
2910
|
}
|
|
2906
2911
|
function va(e) {
|
|
2907
2912
|
let t = {
|
|
2908
|
-
velocity:
|
|
2909
|
-
stiffness:
|
|
2910
|
-
damping:
|
|
2911
|
-
mass:
|
|
2913
|
+
velocity: B.velocity,
|
|
2914
|
+
stiffness: B.stiffness,
|
|
2915
|
+
damping: B.damping,
|
|
2916
|
+
mass: B.mass,
|
|
2912
2917
|
isResolvedFromDuration: !1,
|
|
2913
2918
|
...e
|
|
2914
2919
|
};
|
|
@@ -2917,7 +2922,7 @@ function va(e) {
|
|
|
2917
2922
|
const n = e.visualDuration, i = 2 * Math.PI / (n * 1.2), r = i * i, a = 2 * de(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
|
|
2918
2923
|
t = {
|
|
2919
2924
|
...t,
|
|
2920
|
-
mass:
|
|
2925
|
+
mass: B.mass,
|
|
2921
2926
|
stiffness: r,
|
|
2922
2927
|
damping: a
|
|
2923
2928
|
};
|
|
@@ -2926,12 +2931,12 @@ function va(e) {
|
|
|
2926
2931
|
t = {
|
|
2927
2932
|
...t,
|
|
2928
2933
|
...n,
|
|
2929
|
-
mass:
|
|
2934
|
+
mass: B.mass
|
|
2930
2935
|
}, t.isResolvedFromDuration = !0;
|
|
2931
2936
|
}
|
|
2932
2937
|
return t;
|
|
2933
2938
|
}
|
|
2934
|
-
function Tt(e =
|
|
2939
|
+
function Tt(e = B.visualDuration, t = B.bounce) {
|
|
2935
2940
|
const n = typeof e != "object" ? {
|
|
2936
2941
|
visualDuration: e,
|
|
2937
2942
|
keyframes: [0, 1],
|
|
@@ -2940,60 +2945,60 @@ function Tt(e = I.visualDuration, t = I.bounce) {
|
|
|
2940
2945
|
let { restSpeed: i, restDelta: r } = n;
|
|
2941
2946
|
const a = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], l = { done: !1, value: a }, { stiffness: c, damping: h, mass: u, duration: d, velocity: f, isResolvedFromDuration: m } = va({
|
|
2942
2947
|
...n,
|
|
2943
|
-
velocity: -/* @__PURE__ */
|
|
2944
|
-
}), x = f || 0, g = h / (2 * Math.sqrt(c * u)),
|
|
2945
|
-
i || (i =
|
|
2946
|
-
let
|
|
2948
|
+
velocity: -/* @__PURE__ */ se(n.velocity || 0)
|
|
2949
|
+
}), x = f || 0, g = h / (2 * Math.sqrt(c * u)), y = o - a, w = /* @__PURE__ */ se(Math.sqrt(c / u)), v = Math.abs(y) < 5;
|
|
2950
|
+
i || (i = v ? B.restSpeed.granular : B.restSpeed.default), r || (r = v ? B.restDelta.granular : B.restDelta.default);
|
|
2951
|
+
let b, M, S, E, k, P;
|
|
2947
2952
|
if (g < 1)
|
|
2948
|
-
S = en(
|
|
2949
|
-
const
|
|
2950
|
-
return o -
|
|
2951
|
-
},
|
|
2953
|
+
S = en(w, g), E = (x + g * w * y) / S, b = (T) => {
|
|
2954
|
+
const C = Math.exp(-g * w * T);
|
|
2955
|
+
return o - C * (E * Math.sin(S * T) + y * Math.cos(S * T));
|
|
2956
|
+
}, k = g * w * E + y * S, P = g * w * y - E * S, M = (T) => Math.exp(-g * w * T) * (k * Math.sin(S * T) + P * Math.cos(S * T));
|
|
2952
2957
|
else if (g === 1) {
|
|
2953
|
-
|
|
2954
|
-
const
|
|
2955
|
-
|
|
2958
|
+
b = (C) => o - Math.exp(-w * C) * (y + (x + w * y) * C);
|
|
2959
|
+
const T = x + w * y;
|
|
2960
|
+
M = (C) => Math.exp(-w * C) * (w * T * C - x);
|
|
2956
2961
|
} else {
|
|
2957
|
-
const
|
|
2958
|
-
|
|
2959
|
-
const
|
|
2960
|
-
return o -
|
|
2962
|
+
const T = w * Math.sqrt(g * g - 1);
|
|
2963
|
+
b = ($) => {
|
|
2964
|
+
const Q = Math.exp(-g * w * $), q = Math.min(T * $, 300);
|
|
2965
|
+
return o - Q * ((x + g * w * y) * Math.sinh(q) + T * y * Math.cosh(q)) / T;
|
|
2961
2966
|
};
|
|
2962
|
-
const
|
|
2963
|
-
|
|
2964
|
-
const
|
|
2965
|
-
return
|
|
2967
|
+
const C = (x + g * w * y) / T, F = g * w * C - y * T, X = g * w * y - C * T;
|
|
2968
|
+
M = ($) => {
|
|
2969
|
+
const Q = Math.exp(-g * w * $), q = Math.min(T * $, 300);
|
|
2970
|
+
return Q * (F * Math.sinh(q) + X * Math.cosh(q));
|
|
2966
2971
|
};
|
|
2967
2972
|
}
|
|
2968
|
-
const
|
|
2973
|
+
const O = {
|
|
2969
2974
|
calculatedDuration: m && d || null,
|
|
2970
|
-
velocity: (
|
|
2971
|
-
next: (
|
|
2975
|
+
velocity: (T) => /* @__PURE__ */ te(M(T)),
|
|
2976
|
+
next: (T) => {
|
|
2972
2977
|
if (!m && g < 1) {
|
|
2973
|
-
const
|
|
2974
|
-
return l.done = Math.abs(
|
|
2978
|
+
const F = Math.exp(-g * w * T), X = Math.sin(S * T), $ = Math.cos(S * T), Q = o - F * (E * X + y * $), q = /* @__PURE__ */ te(F * (k * X + P * $));
|
|
2979
|
+
return l.done = Math.abs(q) <= i && Math.abs(o - Q) <= r, l.value = l.done ? o : Q, l;
|
|
2975
2980
|
}
|
|
2976
|
-
const
|
|
2981
|
+
const C = b(T);
|
|
2977
2982
|
if (m)
|
|
2978
|
-
l.done =
|
|
2983
|
+
l.done = T >= d;
|
|
2979
2984
|
else {
|
|
2980
|
-
const
|
|
2981
|
-
l.done = Math.abs(
|
|
2985
|
+
const F = /* @__PURE__ */ te(M(T));
|
|
2986
|
+
l.done = Math.abs(F) <= i && Math.abs(o - C) <= r;
|
|
2982
2987
|
}
|
|
2983
|
-
return l.value = l.done ? o :
|
|
2988
|
+
return l.value = l.done ? o : C, l;
|
|
2984
2989
|
},
|
|
2985
2990
|
toString: () => {
|
|
2986
|
-
const
|
|
2987
|
-
return
|
|
2991
|
+
const T = Math.min(Rn(O), bt), C = Ki((F) => O.next(T * F).value, T, 30);
|
|
2992
|
+
return T + "ms " + C;
|
|
2988
2993
|
},
|
|
2989
2994
|
toTransition: () => {
|
|
2990
2995
|
}
|
|
2991
2996
|
};
|
|
2992
|
-
return
|
|
2997
|
+
return O;
|
|
2993
2998
|
}
|
|
2994
2999
|
Tt.applyToOptions = (e) => {
|
|
2995
3000
|
const t = pa(e, 100, Tt);
|
|
2996
|
-
return e.ease = t.ease, e.duration = /* @__PURE__ */
|
|
3001
|
+
return e.ease = t.ease, e.duration = /* @__PURE__ */ te(t.duration), e.type = "keyframes", e;
|
|
2997
3002
|
};
|
|
2998
3003
|
const wa = 5;
|
|
2999
3004
|
function Gi(e, t, n) {
|
|
@@ -3004,19 +3009,19 @@ function tn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
3004
3009
|
const d = e[0], f = {
|
|
3005
3010
|
done: !1,
|
|
3006
3011
|
value: d
|
|
3007
|
-
}, m = (
|
|
3012
|
+
}, m = (P) => l !== void 0 && P < l || c !== void 0 && P > c, x = (P) => l === void 0 ? c : c === void 0 || Math.abs(l - P) < Math.abs(c - P) ? l : c;
|
|
3008
3013
|
let g = n * t;
|
|
3009
|
-
const
|
|
3010
|
-
|
|
3011
|
-
const
|
|
3012
|
-
const
|
|
3013
|
-
f.done = Math.abs(
|
|
3014
|
+
const y = d + g, w = o === void 0 ? y : o(y);
|
|
3015
|
+
w !== y && (g = w - d);
|
|
3016
|
+
const v = (P) => -g * Math.exp(-P / i), b = (P) => w + v(P), M = (P) => {
|
|
3017
|
+
const O = v(P), T = b(P);
|
|
3018
|
+
f.done = Math.abs(O) <= h, f.value = f.done ? w : T;
|
|
3014
3019
|
};
|
|
3015
3020
|
let S, E;
|
|
3016
|
-
const
|
|
3017
|
-
m(f.value) && (S =
|
|
3021
|
+
const k = (P) => {
|
|
3022
|
+
m(f.value) && (S = P, E = Tt({
|
|
3018
3023
|
keyframes: [f.value, x(f.value)],
|
|
3019
|
-
velocity: Gi(
|
|
3024
|
+
velocity: Gi(b, P, f.value),
|
|
3020
3025
|
// TODO: This should be passing * 1000
|
|
3021
3026
|
damping: r,
|
|
3022
3027
|
stiffness: a,
|
|
@@ -3024,11 +3029,11 @@ function tn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
3024
3029
|
restSpeed: u
|
|
3025
3030
|
}));
|
|
3026
3031
|
};
|
|
3027
|
-
return
|
|
3032
|
+
return k(0), {
|
|
3028
3033
|
calculatedDuration: null,
|
|
3029
|
-
next: (
|
|
3030
|
-
let
|
|
3031
|
-
return !E && S === void 0 && (
|
|
3034
|
+
next: (P) => {
|
|
3035
|
+
let O = !1;
|
|
3036
|
+
return !E && S === void 0 && (O = !0, M(P), k(P)), S !== void 0 && P >= S ? E.next(P - S) : (!O && M(P), f);
|
|
3032
3037
|
}
|
|
3033
3038
|
};
|
|
3034
3039
|
}
|
|
@@ -3037,7 +3042,7 @@ function ba(e, t, n) {
|
|
|
3037
3042
|
for (let o = 0; o < a; o++) {
|
|
3038
3043
|
let l = r(e[o], e[o + 1]);
|
|
3039
3044
|
if (t) {
|
|
3040
|
-
const c = Array.isArray(t) ? t[o] ||
|
|
3045
|
+
const c = Array.isArray(t) ? t[o] || ie : t;
|
|
3041
3046
|
l = st(c, l);
|
|
3042
3047
|
}
|
|
3043
3048
|
i.push(l);
|
|
@@ -3068,7 +3073,7 @@ function Ma(e, t) {
|
|
|
3068
3073
|
const n = e[e.length - 1];
|
|
3069
3074
|
for (let i = 1; i <= t; i++) {
|
|
3070
3075
|
const r = /* @__PURE__ */ Je(0, t, i);
|
|
3071
|
-
e.push(
|
|
3076
|
+
e.push(L(n, 1, r));
|
|
3072
3077
|
}
|
|
3073
3078
|
}
|
|
3074
3079
|
function Sa(e) {
|
|
@@ -3173,22 +3178,22 @@ class Mt extends Ln {
|
|
|
3173
3178
|
const { generator: i, totalDuration: r, mixKeyframes: a, mirroredGenerator: o, resolvedDuration: l, calculatedDuration: c } = this;
|
|
3174
3179
|
if (this.startTime === null)
|
|
3175
3180
|
return i.next(0);
|
|
3176
|
-
const { delay: h = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: m, type: x, onUpdate: g, finalKeyframe:
|
|
3181
|
+
const { delay: h = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: m, type: x, onUpdate: g, finalKeyframe: y } = this.options;
|
|
3177
3182
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
3178
|
-
const
|
|
3179
|
-
this.currentTime = Math.max(
|
|
3180
|
-
let
|
|
3183
|
+
const w = this.currentTime - h * (this.playbackSpeed >= 0 ? 1 : -1), v = this.playbackSpeed >= 0 ? w < 0 : w > r;
|
|
3184
|
+
this.currentTime = Math.max(w, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
|
|
3185
|
+
let b = this.currentTime, M = i;
|
|
3181
3186
|
if (d) {
|
|
3182
|
-
const
|
|
3183
|
-
let
|
|
3184
|
-
!
|
|
3187
|
+
const P = Math.min(this.currentTime, r) / l;
|
|
3188
|
+
let O = Math.floor(P), T = P % 1;
|
|
3189
|
+
!T && P >= 1 && (T = 1), T === 1 && O--, O = Math.min(O, d + 1), !!(O % 2) && (f === "reverse" ? (T = 1 - T, m && (T -= m / l)) : f === "mirror" && (M = o)), b = de(0, 1, T) * l;
|
|
3185
3190
|
}
|
|
3186
3191
|
let S;
|
|
3187
|
-
|
|
3192
|
+
v ? (this.delayState.value = u[0], S = this.delayState) : S = M.next(b), a && !v && (S.value = a(S.value));
|
|
3188
3193
|
let { done: E } = S;
|
|
3189
|
-
!
|
|
3190
|
-
const
|
|
3191
|
-
return
|
|
3194
|
+
!v && c !== null && (E = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
|
|
3195
|
+
const k = this.holdTime === null && (this.state === "finished" || this.state === "running" && E);
|
|
3196
|
+
return k && x !== tn && (S.value = Ct(u, this.options, y, this.speed)), g && g(S.value), k && this.finish(), S;
|
|
3192
3197
|
}
|
|
3193
3198
|
/**
|
|
3194
3199
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -3199,17 +3204,17 @@ class Mt extends Ln {
|
|
|
3199
3204
|
return this.finished.then(t, n);
|
|
3200
3205
|
}
|
|
3201
3206
|
get duration() {
|
|
3202
|
-
return /* @__PURE__ */
|
|
3207
|
+
return /* @__PURE__ */ se(this.calculatedDuration);
|
|
3203
3208
|
}
|
|
3204
3209
|
get iterationDuration() {
|
|
3205
3210
|
const { delay: t = 0 } = this.options || {};
|
|
3206
|
-
return this.duration + /* @__PURE__ */
|
|
3211
|
+
return this.duration + /* @__PURE__ */ se(t);
|
|
3207
3212
|
}
|
|
3208
3213
|
get time() {
|
|
3209
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ se(this.currentTime);
|
|
3210
3215
|
}
|
|
3211
3216
|
set time(t) {
|
|
3212
|
-
t = /* @__PURE__ */
|
|
3217
|
+
t = /* @__PURE__ */ te(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = t, this.tick(t));
|
|
3213
3218
|
}
|
|
3214
3219
|
/**
|
|
3215
3220
|
* Returns the generator's velocity at the current time in units/second.
|
|
@@ -3230,7 +3235,7 @@ class Mt extends Ln {
|
|
|
3230
3235
|
}
|
|
3231
3236
|
set speed(t) {
|
|
3232
3237
|
const n = this.playbackSpeed !== t;
|
|
3233
|
-
n && this.driver && this.updateTime(Z.now()), this.playbackSpeed = t, n && this.driver && (this.time = /* @__PURE__ */
|
|
3238
|
+
n && this.driver && this.updateTime(Z.now()), this.playbackSpeed = t, n && this.driver && (this.time = /* @__PURE__ */ se(this.currentTime));
|
|
3234
3239
|
}
|
|
3235
3240
|
play() {
|
|
3236
3241
|
var r, a;
|
|
@@ -3413,7 +3418,7 @@ class Nn {
|
|
|
3413
3418
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = i, this.motionValue = r, this.element = a, this.isAsync = o;
|
|
3414
3419
|
}
|
|
3415
3420
|
scheduleResolve() {
|
|
3416
|
-
this.state = "scheduled", this.isAsync ? (Pe.add(this), an || (an = !0,
|
|
3421
|
+
this.state = "scheduled", this.isAsync ? (Pe.add(this), an || (an = !0, D.read(qi), D.resolveKeyframes(Xi))) : (this.readKeyframes(), this.complete());
|
|
3417
3422
|
}
|
|
3418
3423
|
readKeyframes() {
|
|
3419
3424
|
const { unresolvedKeyframes: t, name: n, element: i, motionValue: r } = this;
|
|
@@ -3559,18 +3564,18 @@ class nr extends Ln {
|
|
|
3559
3564
|
get duration() {
|
|
3560
3565
|
var n, i;
|
|
3561
3566
|
const t = ((i = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : i.call(n).duration) || 0;
|
|
3562
|
-
return /* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ se(Number(t));
|
|
3563
3568
|
}
|
|
3564
3569
|
get iterationDuration() {
|
|
3565
3570
|
const { delay: t = 0 } = this.options || {};
|
|
3566
|
-
return this.duration + /* @__PURE__ */
|
|
3571
|
+
return this.duration + /* @__PURE__ */ se(t);
|
|
3567
3572
|
}
|
|
3568
3573
|
get time() {
|
|
3569
|
-
return /* @__PURE__ */
|
|
3574
|
+
return /* @__PURE__ */ se(Number(this.animation.currentTime) || 0);
|
|
3570
3575
|
}
|
|
3571
3576
|
set time(t) {
|
|
3572
3577
|
const n = this.finishedTime !== null;
|
|
3573
|
-
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
3578
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ te(t), n && this.animation.pause();
|
|
3574
3579
|
}
|
|
3575
3580
|
/**
|
|
3576
3581
|
* The playback speed of the animation.
|
|
@@ -3596,7 +3601,7 @@ class nr extends Ln {
|
|
|
3596
3601
|
*/
|
|
3597
3602
|
attachTimeline({ timeline: t, rangeStart: n, rangeEnd: i, observe: r }) {
|
|
3598
3603
|
var a;
|
|
3599
|
-
return this.allowFlatten && ((a = this.animation.effect) == null || a.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && _a() ? (this.animation.timeline = t, n && (this.animation.rangeStart = n), i && (this.animation.rangeEnd = i),
|
|
3604
|
+
return this.allowFlatten && ((a = this.animation.effect) == null || a.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && _a() ? (this.animation.timeline = t, n && (this.animation.rangeStart = n), i && (this.animation.rangeEnd = i), ie) : r(this);
|
|
3600
3605
|
}
|
|
3601
3606
|
}
|
|
3602
3607
|
const sr = {
|
|
@@ -3709,8 +3714,8 @@ class nl extends Ln {
|
|
|
3709
3714
|
constructor({ autoplay: t = !0, delay: n = 0, type: i = "keyframes", repeat: r = 0, repeatDelay: a = 0, repeatType: o = "loop", keyframes: l, name: c, motionValue: h, element: u, ...d }) {
|
|
3710
3715
|
var x;
|
|
3711
3716
|
super(), this.stop = () => {
|
|
3712
|
-
var g,
|
|
3713
|
-
this._animation && (this._animation.stop(), (g = this.stopTimeline) == null || g.call(this)), (
|
|
3717
|
+
var g, y;
|
|
3718
|
+
this._animation && (this._animation.stop(), (g = this.stopTimeline) == null || g.call(this)), (y = this.keyframeResolver) == null || y.cancel();
|
|
3714
3719
|
}, this.createdAt = Z.now();
|
|
3715
3720
|
const f = {
|
|
3716
3721
|
autoplay: t,
|
|
@@ -3724,10 +3729,10 @@ class nl extends Ln {
|
|
|
3724
3729
|
element: u,
|
|
3725
3730
|
...d
|
|
3726
3731
|
}, m = (u == null ? void 0 : u.KeyframeResolver) || Nn;
|
|
3727
|
-
this.keyframeResolver = new m(l, (g,
|
|
3732
|
+
this.keyframeResolver = new m(l, (g, y, w) => this.onKeyframesResolved(g, y, f, !w), c, h, u), (x = this.keyframeResolver) == null || x.scheduleResolve();
|
|
3728
3733
|
}
|
|
3729
3734
|
onKeyframesResolved(t, n, i, r) {
|
|
3730
|
-
var
|
|
3735
|
+
var w, v;
|
|
3731
3736
|
this.keyframeResolver = void 0;
|
|
3732
3737
|
const { name: a, type: o, velocity: l, delay: c, isHandoff: h, onUpdate: u } = i;
|
|
3733
3738
|
this.resolvedAt = Z.now();
|
|
@@ -3738,22 +3743,22 @@ class nl extends Ln {
|
|
|
3738
3743
|
finalKeyframe: n,
|
|
3739
3744
|
...i,
|
|
3740
3745
|
keyframes: t
|
|
3741
|
-
}, x = d && !h && el(m), g = (
|
|
3742
|
-
let
|
|
3746
|
+
}, x = d && !h && el(m), g = (v = (w = m.motionValue) == null ? void 0 : w.owner) == null ? void 0 : v.current;
|
|
3747
|
+
let y;
|
|
3743
3748
|
if (x)
|
|
3744
3749
|
try {
|
|
3745
|
-
|
|
3750
|
+
y = new Ga({
|
|
3746
3751
|
...m,
|
|
3747
3752
|
element: g
|
|
3748
3753
|
});
|
|
3749
3754
|
} catch {
|
|
3750
|
-
|
|
3755
|
+
y = new Mt(m);
|
|
3751
3756
|
}
|
|
3752
3757
|
else
|
|
3753
|
-
|
|
3754
|
-
|
|
3758
|
+
y = new Mt(m);
|
|
3759
|
+
y.finished.then(() => {
|
|
3755
3760
|
this.notifyFinished();
|
|
3756
|
-
}).catch(
|
|
3761
|
+
}).catch(ie), this.pendingTimeline && (this.stopTimeline = y.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = y;
|
|
3757
3762
|
}
|
|
3758
3763
|
get finished() {
|
|
3759
3764
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -3885,7 +3890,7 @@ function dl(e) {
|
|
|
3885
3890
|
const On = (e, t, n, i = {}, r, a) => (o) => {
|
|
3886
3891
|
const l = Fn(i, e) || {}, c = l.delay || i.delay || 0;
|
|
3887
3892
|
let { elapsed: h = 0 } = i;
|
|
3888
|
-
h = h - /* @__PURE__ */
|
|
3893
|
+
h = h - /* @__PURE__ */ te(c);
|
|
3889
3894
|
const u = {
|
|
3890
3895
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
3891
3896
|
ease: "easeOut",
|
|
@@ -3902,12 +3907,12 @@ const On = (e, t, n, i = {}, r, a) => (o) => {
|
|
|
3902
3907
|
motionValue: t,
|
|
3903
3908
|
element: a ? void 0 : r
|
|
3904
3909
|
};
|
|
3905
|
-
dl(l) || Object.assign(u, ul(e, u)), u.duration && (u.duration = /* @__PURE__ */
|
|
3910
|
+
dl(l) || Object.assign(u, ul(e, u)), u.duration && (u.duration = /* @__PURE__ */ te(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ te(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
3906
3911
|
let d = !1;
|
|
3907
3912
|
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (un(u), u.delay === 0 && (d = !0)), (ve.instantAnimations || ve.skipAnimations || r != null && r.shouldSkipAnimations) && (d = !0, un(u), u.delay = 0), u.allowFlatten = !l.type && !l.ease, d && !a && t.get() !== void 0) {
|
|
3908
3913
|
const f = Ct(u.keyframes, l);
|
|
3909
3914
|
if (f !== void 0) {
|
|
3910
|
-
|
|
3915
|
+
D.update(() => {
|
|
3911
3916
|
u.onUpdate(f), u.onComplete();
|
|
3912
3917
|
});
|
|
3913
3918
|
return;
|
|
@@ -4014,7 +4019,7 @@ class pl {
|
|
|
4014
4019
|
this.events[t] || (this.events[t] = new Sn());
|
|
4015
4020
|
const i = this.events[t].add(n);
|
|
4016
4021
|
return t === "change" ? () => {
|
|
4017
|
-
i(),
|
|
4022
|
+
i(), D.read(() => {
|
|
4018
4023
|
this.events.change.getSize() || this.stop();
|
|
4019
4024
|
});
|
|
4020
4025
|
} : i;
|
|
@@ -4166,9 +4171,9 @@ function yl(e, t) {
|
|
|
4166
4171
|
ml(e, o, l);
|
|
4167
4172
|
}
|
|
4168
4173
|
}
|
|
4169
|
-
const
|
|
4174
|
+
const W = (e) => !!(e && e.getVelocity);
|
|
4170
4175
|
function gl(e) {
|
|
4171
|
-
return !!(
|
|
4176
|
+
return !!(W(e) && e.add);
|
|
4172
4177
|
}
|
|
4173
4178
|
function dn(e, t) {
|
|
4174
4179
|
const n = e.getValue("willChange");
|
|
@@ -4204,27 +4209,27 @@ function hr(e, t, { delay: n = 0, transitionOverride: i, type: r } = {}) {
|
|
|
4204
4209
|
const g = {
|
|
4205
4210
|
delay: n,
|
|
4206
4211
|
...Fn(a || {}, f)
|
|
4207
|
-
},
|
|
4208
|
-
if (
|
|
4209
|
-
|
|
4212
|
+
}, y = m.get();
|
|
4213
|
+
if (y !== void 0 && !m.isAnimating() && !Array.isArray(x) && x === y && !g.velocity) {
|
|
4214
|
+
D.update(() => m.set(x));
|
|
4210
4215
|
continue;
|
|
4211
4216
|
}
|
|
4212
|
-
let
|
|
4217
|
+
let w = !1;
|
|
4213
4218
|
if (window.MotionHandoffAnimation) {
|
|
4214
|
-
const
|
|
4215
|
-
if (
|
|
4216
|
-
const S = window.MotionHandoffAnimation(
|
|
4217
|
-
S !== null && (g.startTime = S,
|
|
4219
|
+
const M = ur(e);
|
|
4220
|
+
if (M) {
|
|
4221
|
+
const S = window.MotionHandoffAnimation(M, f, D);
|
|
4222
|
+
S !== null && (g.startTime = S, w = !0);
|
|
4218
4223
|
}
|
|
4219
4224
|
}
|
|
4220
4225
|
dn(e, f);
|
|
4221
|
-
const
|
|
4222
|
-
m.start(On(f, m, x,
|
|
4223
|
-
const
|
|
4224
|
-
|
|
4226
|
+
const v = h ?? e.shouldReduceMotion;
|
|
4227
|
+
m.start(On(f, m, x, v && lr.has(f) ? { type: !1 } : g, e, w));
|
|
4228
|
+
const b = m.animation;
|
|
4229
|
+
b && u.push(b);
|
|
4225
4230
|
}
|
|
4226
4231
|
if (o) {
|
|
4227
|
-
const f = () =>
|
|
4232
|
+
const f = () => D.update(() => {
|
|
4228
4233
|
o && yl(e, o);
|
|
4229
4234
|
});
|
|
4230
4235
|
u.length ? Promise.all(u).then(f) : f();
|
|
@@ -4395,17 +4400,17 @@ const Pl = /\b([a-z-]*)\(.*?\)/gu, pn = {
|
|
|
4395
4400
|
}, Cl = {
|
|
4396
4401
|
...zn,
|
|
4397
4402
|
// Color props
|
|
4398
|
-
color:
|
|
4399
|
-
backgroundColor:
|
|
4400
|
-
outlineColor:
|
|
4401
|
-
fill:
|
|
4402
|
-
stroke:
|
|
4403
|
+
color: z,
|
|
4404
|
+
backgroundColor: z,
|
|
4405
|
+
outlineColor: z,
|
|
4406
|
+
fill: z,
|
|
4407
|
+
stroke: z,
|
|
4403
4408
|
// Border props
|
|
4404
|
-
borderColor:
|
|
4405
|
-
borderTopColor:
|
|
4406
|
-
borderRightColor:
|
|
4407
|
-
borderBottomColor:
|
|
4408
|
-
borderLeftColor:
|
|
4409
|
+
borderColor: z,
|
|
4410
|
+
borderTopColor: z,
|
|
4411
|
+
borderRightColor: z,
|
|
4412
|
+
borderBottomColor: z,
|
|
4413
|
+
borderLeftColor: z,
|
|
4409
4414
|
filter: pn,
|
|
4410
4415
|
WebkitFilter: pn,
|
|
4411
4416
|
mask: mn,
|
|
@@ -4531,26 +4536,26 @@ function Ol(e, t, n = {}) {
|
|
|
4531
4536
|
let l = !1, c = !1, h;
|
|
4532
4537
|
const u = () => {
|
|
4533
4538
|
o.removeEventListener("pointerleave", x);
|
|
4534
|
-
}, d = (
|
|
4535
|
-
h && (h(
|
|
4536
|
-
}, f = (
|
|
4537
|
-
l = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), c && (c = !1, d(
|
|
4539
|
+
}, d = (y) => {
|
|
4540
|
+
h && (h(y), h = void 0), u();
|
|
4541
|
+
}, f = (y) => {
|
|
4542
|
+
l = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), c && (c = !1, d(y));
|
|
4538
4543
|
}, m = () => {
|
|
4539
4544
|
l = !0, window.addEventListener("pointerup", f, r), window.addEventListener("pointercancel", f, r);
|
|
4540
|
-
}, x = (
|
|
4541
|
-
if (
|
|
4545
|
+
}, x = (y) => {
|
|
4546
|
+
if (y.pointerType !== "touch") {
|
|
4542
4547
|
if (l) {
|
|
4543
4548
|
c = !0;
|
|
4544
4549
|
return;
|
|
4545
4550
|
}
|
|
4546
|
-
d(
|
|
4551
|
+
d(y);
|
|
4547
4552
|
}
|
|
4548
|
-
}, g = (
|
|
4549
|
-
if (!Fl(
|
|
4553
|
+
}, g = (y) => {
|
|
4554
|
+
if (!Fl(y))
|
|
4550
4555
|
return;
|
|
4551
4556
|
c = !1;
|
|
4552
|
-
const
|
|
4553
|
-
typeof
|
|
4557
|
+
const w = t(o, y);
|
|
4558
|
+
typeof w == "function" && (h = w, o.addEventListener("pointerleave", x, r));
|
|
4554
4559
|
};
|
|
4555
4560
|
o.addEventListener("pointerenter", g, r), o.addEventListener("pointerdown", m, r);
|
|
4556
4561
|
}), a;
|
|
@@ -4680,7 +4685,7 @@ function Ts(e, t) {
|
|
|
4680
4685
|
function Jl(e) {
|
|
4681
4686
|
return Un(e) && e.tagName === "svg";
|
|
4682
4687
|
}
|
|
4683
|
-
const Ql = [...fr,
|
|
4688
|
+
const Ql = [...fr, z, ae], ec = (e) => Ql.find(dr(e)), Ms = () => ({
|
|
4684
4689
|
translate: 0,
|
|
4685
4690
|
scale: 1,
|
|
4686
4691
|
origin: 0,
|
|
@@ -4716,9 +4721,9 @@ function br(e) {
|
|
|
4716
4721
|
function nc(e, t, n) {
|
|
4717
4722
|
for (const i in t) {
|
|
4718
4723
|
const r = t[i], a = n[i];
|
|
4719
|
-
if (
|
|
4724
|
+
if (W(r))
|
|
4720
4725
|
e.addValue(i, r);
|
|
4721
|
-
else if (
|
|
4726
|
+
else if (W(a))
|
|
4722
4727
|
e.addValue(i, Be(r, { owner: e }));
|
|
4723
4728
|
else if (a !== r)
|
|
4724
4729
|
if (e.hasValue(i)) {
|
|
@@ -4774,14 +4779,14 @@ class oc {
|
|
|
4774
4779
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
4775
4780
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
4776
4781
|
const m = Z.now();
|
|
4777
|
-
this.renderScheduledAt < m && (this.renderScheduledAt = m,
|
|
4782
|
+
this.renderScheduledAt < m && (this.renderScheduledAt = m, D.render(this.render, !1, !0));
|
|
4778
4783
|
};
|
|
4779
4784
|
const { latestValues: h, renderState: u } = l;
|
|
4780
4785
|
this.latestValues = h, this.baseTarget = { ...h }, this.initialValues = n.initial ? { ...h } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = i, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = a, this.options = c, this.blockInitialAnimation = !!o, this.isControllingVariants = Dt(n), this.isVariantNode = br(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
4781
4786
|
const { willChange: d, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
4782
4787
|
for (const m in f) {
|
|
4783
4788
|
const x = f[m];
|
|
4784
|
-
h[m] !== void 0 &&
|
|
4789
|
+
h[m] !== void 0 && W(x) && x.set(h[m]);
|
|
4785
4790
|
}
|
|
4786
4791
|
}
|
|
4787
4792
|
mount(t) {
|
|
@@ -4816,7 +4821,7 @@ class oc {
|
|
|
4816
4821
|
keyframes: l,
|
|
4817
4822
|
times: c,
|
|
4818
4823
|
ease: h,
|
|
4819
|
-
duration: /* @__PURE__ */
|
|
4824
|
+
duration: /* @__PURE__ */ te(u)
|
|
4820
4825
|
}), f = o(d);
|
|
4821
4826
|
this.valueSubscriptions.set(t, () => {
|
|
4822
4827
|
f(), d.cancel();
|
|
@@ -4826,7 +4831,7 @@ class oc {
|
|
|
4826
4831
|
const i = We.has(t);
|
|
4827
4832
|
i && this.onBindTransform && this.onBindTransform();
|
|
4828
4833
|
const r = n.on("change", (o) => {
|
|
4829
|
-
this.latestValues[t] = o, this.props.onUpdate &&
|
|
4834
|
+
this.latestValues[t] = o, this.props.onUpdate && D.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
4830
4835
|
});
|
|
4831
4836
|
let a;
|
|
4832
4837
|
typeof window < "u" && window.MotionCheckAppearSync && (a = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
|
|
@@ -4943,7 +4948,7 @@ class oc {
|
|
|
4943
4948
|
*/
|
|
4944
4949
|
readValue(t, n) {
|
|
4945
4950
|
let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
4946
|
-
return i != null && (typeof i == "string" && (bi(i) || Mi(i)) ? i = parseFloat(i) : !ec(i) && ae.test(n) && (i = mr(t, n)), this.setBaseTarget(t,
|
|
4951
|
+
return i != null && (typeof i == "string" && (bi(i) || Mi(i)) ? i = parseFloat(i) : !ec(i) && ae.test(n) && (i = mr(t, n)), this.setBaseTarget(t, W(i) ? i.get() : i)), W(i) ? i.get() : i;
|
|
4947
4952
|
}
|
|
4948
4953
|
/**
|
|
4949
4954
|
* Set the base target to later animate back to. This is currently
|
|
@@ -4967,7 +4972,7 @@ class oc {
|
|
|
4967
4972
|
if (n && i !== void 0)
|
|
4968
4973
|
return i;
|
|
4969
4974
|
const r = this.getBaseTargetFromProps(this.props, t);
|
|
4970
|
-
return r !== void 0 && !
|
|
4975
|
+
return r !== void 0 && !W(r) ? r : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
|
|
4971
4976
|
}
|
|
4972
4977
|
on(t, n) {
|
|
4973
4978
|
return this.events[t] || (this.events[t] = new Sn()), this.events[t].add(n);
|
|
@@ -4996,7 +5001,7 @@ class Sr extends oc {
|
|
|
4996
5001
|
handleChildMotionValue() {
|
|
4997
5002
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
4998
5003
|
const { children: t } = this.props;
|
|
4999
|
-
|
|
5004
|
+
W(t) && (this.childSubscription = t.on("change", (n) => {
|
|
5000
5005
|
this.current && (this.current.textContent = `${n}`);
|
|
5001
5006
|
}));
|
|
5002
5007
|
}
|
|
@@ -5075,7 +5080,7 @@ function ue(e, t) {
|
|
|
5075
5080
|
e.min += t, e.max += t;
|
|
5076
5081
|
}
|
|
5077
5082
|
function Ds(e, t, n, i, r = 0.5) {
|
|
5078
|
-
const a =
|
|
5083
|
+
const a = L(e.min, e.max, r);
|
|
5079
5084
|
gn(e, t, n, a, i);
|
|
5080
5085
|
}
|
|
5081
5086
|
function ks(e, t) {
|
|
@@ -5175,7 +5180,7 @@ const Ge = {
|
|
|
5175
5180
|
return i;
|
|
5176
5181
|
const a = ae.createTransformer(e), o = typeof r[0] != "number" ? 1 : 0, l = n.x.scale * t.x, c = n.y.scale * t.y;
|
|
5177
5182
|
r[0 + o] /= l, r[1 + o] /= c;
|
|
5178
|
-
const h =
|
|
5183
|
+
const h = L(l, c, 0.5);
|
|
5179
5184
|
return typeof r[2 + o] == "number" && (r[2 + o] /= h), typeof r[3 + o] == "number" && (r[3 + o] /= h), a(r);
|
|
5180
5185
|
}
|
|
5181
5186
|
}, jn = {
|
|
@@ -5203,7 +5208,7 @@ function Gn(e, t, n) {
|
|
|
5203
5208
|
if (!i)
|
|
5204
5209
|
return a;
|
|
5205
5210
|
for (const l in i)
|
|
5206
|
-
(
|
|
5211
|
+
(W(i[l]) || r && W(r[l]) || Dr(l, e) || ((o = n == null ? void 0 : n.getValue(l)) == null ? void 0 : o.liveStyle) !== void 0) && (a[l] = i[l]);
|
|
5207
5212
|
return a;
|
|
5208
5213
|
}
|
|
5209
5214
|
function mc(e) {
|
|
@@ -5304,7 +5309,7 @@ function wc(e, t, n, i) {
|
|
|
5304
5309
|
function Nr(e, t, n) {
|
|
5305
5310
|
const i = Gn(e, t, n);
|
|
5306
5311
|
for (const r in e)
|
|
5307
|
-
if (
|
|
5312
|
+
if (W(e[r]) || W(t[r])) {
|
|
5308
5313
|
const a = Ue.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
|
|
5309
5314
|
i[a] = e[r];
|
|
5310
5315
|
}
|
|
@@ -5373,8 +5378,8 @@ function Pc(e) {
|
|
|
5373
5378
|
var m;
|
|
5374
5379
|
const f = Ve(e, d, h === "exit" ? (m = e.presenceContext) == null ? void 0 : m.custom : void 0);
|
|
5375
5380
|
if (f) {
|
|
5376
|
-
const { transition: x, transitionEnd: g, ...
|
|
5377
|
-
u = { ...u, ...
|
|
5381
|
+
const { transition: x, transitionEnd: g, ...y } = f;
|
|
5382
|
+
u = { ...u, ...y, ...g };
|
|
5378
5383
|
}
|
|
5379
5384
|
return u;
|
|
5380
5385
|
};
|
|
@@ -5384,74 +5389,74 @@ function Pc(e) {
|
|
|
5384
5389
|
function l(h) {
|
|
5385
5390
|
const { props: u } = e, d = Fr(e.parent) || {}, f = [], m = /* @__PURE__ */ new Set();
|
|
5386
5391
|
let x = {}, g = 1 / 0;
|
|
5387
|
-
for (let
|
|
5388
|
-
const
|
|
5389
|
-
E === !1 && (g =
|
|
5390
|
-
let
|
|
5391
|
-
if (
|
|
5392
|
-
!
|
|
5393
|
-
!
|
|
5394
|
-
Et(
|
|
5392
|
+
for (let w = 0; w < Sc; w++) {
|
|
5393
|
+
const v = Mc[w], b = n[v], M = u[v] !== void 0 ? u[v] : d[v], S = et(M), E = v === h ? b.isActive : null;
|
|
5394
|
+
E === !1 && (g = w);
|
|
5395
|
+
let k = M === d[v] && M !== u[v] && S;
|
|
5396
|
+
if (k && (i || r) && e.manuallyAnimateOnMount && (k = !1), b.protectedKeys = { ...x }, // If it isn't active and hasn't *just* been set as inactive
|
|
5397
|
+
!b.isActive && E === null || // If we didn't and don't have any defined prop for this animation type
|
|
5398
|
+
!M && !b.prevProp || // Or if the prop doesn't define an animation
|
|
5399
|
+
Et(M) || typeof M == "boolean")
|
|
5395
5400
|
continue;
|
|
5396
|
-
if (
|
|
5397
|
-
|
|
5401
|
+
if (v === "exit" && b.isActive && E !== !0) {
|
|
5402
|
+
b.prevResolvedValues && (x = {
|
|
5398
5403
|
...x,
|
|
5399
|
-
...
|
|
5404
|
+
...b.prevResolvedValues
|
|
5400
5405
|
});
|
|
5401
5406
|
continue;
|
|
5402
5407
|
}
|
|
5403
|
-
const
|
|
5404
|
-
let
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
const
|
|
5408
|
-
let
|
|
5409
|
-
E === !1 && (
|
|
5410
|
-
const { prevResolvedValues:
|
|
5411
|
-
...
|
|
5412
|
-
...
|
|
5413
|
-
},
|
|
5414
|
-
|
|
5415
|
-
const
|
|
5416
|
-
|
|
5408
|
+
const P = Vc(b.prevProp, M);
|
|
5409
|
+
let O = P || // If we're making this variant active, we want to always make it active
|
|
5410
|
+
v === h && b.isActive && !k && S || // If we removed a higher-priority variant (i is in reverse order)
|
|
5411
|
+
w > g && S, T = !1;
|
|
5412
|
+
const C = Array.isArray(M) ? M : [M];
|
|
5413
|
+
let F = C.reduce(a(v), {});
|
|
5414
|
+
E === !1 && (F = {});
|
|
5415
|
+
const { prevResolvedValues: X = {} } = b, $ = {
|
|
5416
|
+
...X,
|
|
5417
|
+
...F
|
|
5418
|
+
}, Q = (I) => {
|
|
5419
|
+
O = !0, m.has(I) && (T = !0, m.delete(I)), b.needsAnimating[I] = !0;
|
|
5420
|
+
const _ = e.getValue(I);
|
|
5421
|
+
_ && (_.liveStyle = !1);
|
|
5417
5422
|
};
|
|
5418
|
-
for (const
|
|
5419
|
-
const
|
|
5420
|
-
if (x.hasOwnProperty(
|
|
5423
|
+
for (const I in $) {
|
|
5424
|
+
const _ = F[I], j = X[I];
|
|
5425
|
+
if (x.hasOwnProperty(I))
|
|
5421
5426
|
continue;
|
|
5422
5427
|
let V = !1;
|
|
5423
|
-
hn(
|
|
5428
|
+
hn(_) && hn(j) ? V = !Or(_, j) : V = _ !== j, V ? _ != null ? Q(I) : m.add(I) : _ !== void 0 && m.has(I) ? Q(I) : b.protectedKeys[I] = !0;
|
|
5424
5429
|
}
|
|
5425
|
-
|
|
5426
|
-
const
|
|
5427
|
-
|
|
5428
|
-
const
|
|
5429
|
-
if (typeof
|
|
5430
|
-
const { parent:
|
|
5431
|
-
if (
|
|
5432
|
-
const { delayChildren:
|
|
5433
|
-
|
|
5430
|
+
b.prevProp = M, b.prevResolvedValues = F, b.isActive && (x = { ...x, ...F }), (i || r) && e.blockInitialAnimation && (O = !1);
|
|
5431
|
+
const q = k && P;
|
|
5432
|
+
O && (!q || T) && f.push(...C.map((I) => {
|
|
5433
|
+
const _ = { type: v };
|
|
5434
|
+
if (typeof I == "string" && (i || r) && !q && e.manuallyAnimateOnMount && e.parent) {
|
|
5435
|
+
const { parent: j } = e, V = Ve(j, I);
|
|
5436
|
+
if (j.enteringChildren && V) {
|
|
5437
|
+
const { delayChildren: R } = V.transition || {};
|
|
5438
|
+
_.delay = rr(j.enteringChildren, e, R);
|
|
5434
5439
|
}
|
|
5435
5440
|
}
|
|
5436
5441
|
return {
|
|
5437
|
-
animation:
|
|
5438
|
-
options:
|
|
5442
|
+
animation: I,
|
|
5443
|
+
options: _
|
|
5439
5444
|
};
|
|
5440
5445
|
}));
|
|
5441
5446
|
}
|
|
5442
5447
|
if (m.size) {
|
|
5443
|
-
const
|
|
5448
|
+
const w = {};
|
|
5444
5449
|
if (typeof u.initial != "boolean") {
|
|
5445
|
-
const
|
|
5446
|
-
|
|
5450
|
+
const v = Ve(e, Array.isArray(u.initial) ? u.initial[0] : u.initial);
|
|
5451
|
+
v && v.transition && (w.transition = v.transition);
|
|
5447
5452
|
}
|
|
5448
|
-
m.forEach((
|
|
5449
|
-
const
|
|
5450
|
-
|
|
5451
|
-
}), f.push({ animation:
|
|
5453
|
+
m.forEach((v) => {
|
|
5454
|
+
const b = e.getBaseTarget(v), M = e.getValue(v);
|
|
5455
|
+
M && (M.liveStyle = !0), w[v] = b ?? null;
|
|
5456
|
+
}), f.push({ animation: w });
|
|
5452
5457
|
}
|
|
5453
|
-
let
|
|
5454
|
-
return i && (u.initial === !1 || u.initial === u.animate) && !e.manuallyAnimateOnMount && (
|
|
5458
|
+
let y = !!f.length;
|
|
5459
|
+
return i && (u.initial === !1 || u.initial === u.animate) && !e.manuallyAnimateOnMount && (y = !1), i = !1, r = !1, y ? t(f) : Promise.resolve();
|
|
5455
5460
|
}
|
|
5456
5461
|
function c(h, u) {
|
|
5457
5462
|
var f;
|
|
@@ -5515,20 +5520,20 @@ function Rc(e, t, n) {
|
|
|
5515
5520
|
return Math.abs(e - t) <= n;
|
|
5516
5521
|
}
|
|
5517
5522
|
function Fs(e, t, n, i = 0.5) {
|
|
5518
|
-
e.origin = i, e.originPoint =
|
|
5523
|
+
e.origin = i, e.originPoint = L(t.min, t.max, e.origin), e.scale = J(n) / J(t), e.translate = L(n.min, n.max, e.origin) - e.originPoint, (e.scale >= Cc && e.scale <= Ec || isNaN(e.scale)) && (e.scale = 1), (e.translate >= Dc && e.translate <= kc || isNaN(e.translate)) && (e.translate = 0);
|
|
5519
5524
|
}
|
|
5520
5525
|
function qe(e, t, n, i) {
|
|
5521
5526
|
Fs(e.x, t.x, n.x, i ? i.originX : void 0), Fs(e.y, t.y, n.y, i ? i.originY : void 0);
|
|
5522
5527
|
}
|
|
5523
5528
|
function Os(e, t, n, i = 0) {
|
|
5524
|
-
const r = i ?
|
|
5529
|
+
const r = i ? L(n.min, n.max, i) : n.min;
|
|
5525
5530
|
e.min = r + t.min, e.max = e.min + J(t);
|
|
5526
5531
|
}
|
|
5527
5532
|
function Lc(e, t, n, i) {
|
|
5528
5533
|
Os(e.x, t.x, n.x, i == null ? void 0 : i.x), Os(e.y, t.y, n.y, i == null ? void 0 : i.y);
|
|
5529
5534
|
}
|
|
5530
5535
|
function Is(e, t, n, i = 0) {
|
|
5531
|
-
const r = i ?
|
|
5536
|
+
const r = i ? L(n.min, n.max, i) : n.min;
|
|
5532
5537
|
e.min = t.min - r, e.max = e.min + J(t);
|
|
5533
5538
|
}
|
|
5534
5539
|
function Pt(e, t, n, i) {
|
|
@@ -5538,9 +5543,9 @@ function Bs(e, t, n, i, r) {
|
|
|
5538
5543
|
return e -= t, e = At(e, 1 / n, i), r !== void 0 && (e = At(e, 1 / r, i)), e;
|
|
5539
5544
|
}
|
|
5540
5545
|
function Nc(e, t = 0, n = 1, i = 0.5, r, a = e, o = e) {
|
|
5541
|
-
if (he.test(t) && (t = parseFloat(t), t =
|
|
5546
|
+
if (he.test(t) && (t = parseFloat(t), t = L(o.min, o.max, t / 100) - o.min), typeof t != "number")
|
|
5542
5547
|
return;
|
|
5543
|
-
let l =
|
|
5548
|
+
let l = L(a.min, a.max, i);
|
|
5544
5549
|
e === a && (l -= t), e.min = Bs(e.min, t, n, l, r), e.max = Bs(e.max, t, n, l, r);
|
|
5545
5550
|
}
|
|
5546
5551
|
function zs(e, t, [n, i, r], a, o) {
|
|
@@ -5594,25 +5599,25 @@ const _r = [
|
|
|
5594
5599
|
"borderBottomRightRadius"
|
|
5595
5600
|
], zc = _r.length, Gs = (e) => typeof e == "string" ? parseFloat(e) : e, Ys = (e) => typeof e == "number" || A.test(e);
|
|
5596
5601
|
function Hc(e, t, n, i, r, a) {
|
|
5597
|
-
r ? (e.opacity =
|
|
5602
|
+
r ? (e.opacity = L(0, n.opacity ?? 1, _c(i)), e.opacityExit = L(t.opacity ?? 1, 0, Uc(i))) : a && (e.opacity = L(t.opacity ?? 1, n.opacity ?? 1, i));
|
|
5598
5603
|
for (let o = 0; o < zc; o++) {
|
|
5599
5604
|
const l = _r[o];
|
|
5600
5605
|
let c = Xs(t, l), h = Xs(n, l);
|
|
5601
5606
|
if (c === void 0 && h === void 0)
|
|
5602
5607
|
continue;
|
|
5603
|
-
c || (c = 0), h || (h = 0), c === 0 || h === 0 || Ys(c) === Ys(h) ? (e[l] = Math.max(
|
|
5608
|
+
c || (c = 0), h || (h = 0), c === 0 || h === 0 || Ys(c) === Ys(h) ? (e[l] = Math.max(L(Gs(c), Gs(h), i), 0), (he.test(h) || he.test(c)) && (e[l] += "%")) : e[l] = h;
|
|
5604
5609
|
}
|
|
5605
|
-
(t.rotate || n.rotate) && (e.rotate =
|
|
5610
|
+
(t.rotate || n.rotate) && (e.rotate = L(t.rotate || 0, n.rotate || 0, i));
|
|
5606
5611
|
}
|
|
5607
5612
|
function Xs(e, t) {
|
|
5608
5613
|
return e[t] !== void 0 ? e[t] : e.borderRadius;
|
|
5609
5614
|
}
|
|
5610
|
-
const _c = /* @__PURE__ */ Ur(0, 0.5, Ri), Uc = /* @__PURE__ */ Ur(0.5, 0.95,
|
|
5615
|
+
const _c = /* @__PURE__ */ Ur(0, 0.5, Ri), Uc = /* @__PURE__ */ Ur(0.5, 0.95, ie);
|
|
5611
5616
|
function Ur(e, t, n) {
|
|
5612
5617
|
return (i) => i < e ? 0 : i > t ? 1 : n(/* @__PURE__ */ Je(e, t, i));
|
|
5613
5618
|
}
|
|
5614
5619
|
function Wc(e, t, n) {
|
|
5615
|
-
const i =
|
|
5620
|
+
const i = W(e) ? e : Be(e);
|
|
5616
5621
|
return i.start(On("", i, t, n)), i.animation;
|
|
5617
5622
|
}
|
|
5618
5623
|
function tt(e, t, n, i = { passive: !0 }) {
|
|
@@ -5638,10 +5643,10 @@ function Gc(e, t) {
|
|
|
5638
5643
|
const a = r - n;
|
|
5639
5644
|
a >= t && (we(i), e(a - t));
|
|
5640
5645
|
};
|
|
5641
|
-
return
|
|
5646
|
+
return D.setup(i, !0), () => we(i);
|
|
5642
5647
|
}
|
|
5643
5648
|
function gt(e) {
|
|
5644
|
-
return
|
|
5649
|
+
return W(e) ? e.get() : e;
|
|
5645
5650
|
}
|
|
5646
5651
|
class Yc {
|
|
5647
5652
|
constructor() {
|
|
@@ -5722,7 +5727,7 @@ function Wr(e) {
|
|
|
5722
5727
|
const n = ur(t);
|
|
5723
5728
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
5724
5729
|
const { layout: r, layoutId: a } = e.options;
|
|
5725
|
-
window.MotionCancelOptimisedAnimation(n, "transform",
|
|
5730
|
+
window.MotionCancelOptimisedAnimation(n, "transform", D, !(r || a));
|
|
5726
5731
|
}
|
|
5727
5732
|
const { parent: i } = e;
|
|
5728
5733
|
i && !i.hasCheckedOptimisedAppear && Wr(i);
|
|
@@ -5760,7 +5765,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5760
5765
|
if (h && !h.current && h.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (c || l) && (this.isLayoutDirty = !0), e) {
|
|
5761
5766
|
let u, d = 0;
|
|
5762
5767
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
5763
|
-
|
|
5768
|
+
D.read(() => {
|
|
5764
5769
|
d = window.innerWidth;
|
|
5765
5770
|
}), e(o, () => {
|
|
5766
5771
|
const m = window.innerWidth;
|
|
@@ -5772,15 +5777,15 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5772
5777
|
this.target = void 0, this.relativeTarget = void 0;
|
|
5773
5778
|
return;
|
|
5774
5779
|
}
|
|
5775
|
-
const x = this.options.transition || h.getDefaultTransition() || hu, { onLayoutAnimationStart: g, onLayoutAnimationComplete:
|
|
5776
|
-
if (this.options.layoutRoot || this.resumeFrom ||
|
|
5780
|
+
const x = this.options.transition || h.getDefaultTransition() || hu, { onLayoutAnimationStart: g, onLayoutAnimationComplete: y } = h.getProps(), w = !this.targetLayout || !Hr(this.targetLayout, m), v = !d && f;
|
|
5781
|
+
if (this.options.layoutRoot || this.resumeFrom || v || d && (w || !this.currentAnimation)) {
|
|
5777
5782
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
5778
|
-
const
|
|
5783
|
+
const b = {
|
|
5779
5784
|
...Fn(x, "layout"),
|
|
5780
5785
|
onPlay: g,
|
|
5781
|
-
onComplete:
|
|
5786
|
+
onComplete: y
|
|
5782
5787
|
};
|
|
5783
|
-
(h.shouldReduceMotion || this.options.layoutRoot) && (
|
|
5788
|
+
(h.shouldReduceMotion || this.options.layoutRoot) && (b.delay = 0, b.type = !1), this.startAnimation(b), this.setAnimationOrigin(u, v);
|
|
5784
5789
|
} else
|
|
5785
5790
|
d || Js(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
5786
5791
|
this.targetLayout = m;
|
|
@@ -5842,7 +5847,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5842
5847
|
}
|
|
5843
5848
|
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(su), this.nodes.forEach(iu), this.nodes.forEach(Zc), this.nodes.forEach(Jc)) : this.nodes.forEach(Zs), this.clearAllSnapshots();
|
|
5844
5849
|
const l = Z.now();
|
|
5845
|
-
|
|
5850
|
+
U.delta = de(0, 1e3 / 60, l - U.timestamp), U.timestamp = l, U.isProcessing = !0, Ft.update.process(U), Ft.preRender.process(U), Ft.render.process(U), U.isProcessing = !1;
|
|
5846
5851
|
}
|
|
5847
5852
|
didUpdate() {
|
|
5848
5853
|
this.updateScheduled || (this.updateScheduled = !0, Hn.read(this.scheduleUpdate));
|
|
@@ -5851,10 +5856,10 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5851
5856
|
this.nodes.forEach(tu), this.sharedNodes.forEach(lu);
|
|
5852
5857
|
}
|
|
5853
5858
|
scheduleUpdateProjection() {
|
|
5854
|
-
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
|
|
5859
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, D.preRender(this.updateProjection, !1, !0));
|
|
5855
5860
|
}
|
|
5856
5861
|
scheduleCheckAfterUnmount() {
|
|
5857
|
-
|
|
5862
|
+
D.postRender(() => {
|
|
5858
5863
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
5859
5864
|
});
|
|
5860
5865
|
}
|
|
@@ -5965,7 +5970,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5965
5970
|
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
5966
5971
|
}
|
|
5967
5972
|
forceRelativeParentToResolveTarget() {
|
|
5968
|
-
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !==
|
|
5973
|
+
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== U.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
5969
5974
|
}
|
|
5970
5975
|
resolveTargetDelta(o = !1) {
|
|
5971
5976
|
var m;
|
|
@@ -5977,7 +5982,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5977
5982
|
const { layout: u, layoutId: d } = this.options;
|
|
5978
5983
|
if (!this.layout || !(u || d))
|
|
5979
5984
|
return;
|
|
5980
|
-
this.resolvedRelativeTargetAt =
|
|
5985
|
+
this.resolvedRelativeTargetAt = U.timestamp;
|
|
5981
5986
|
const f = this.getClosestProjectingParent();
|
|
5982
5987
|
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 = H(), this.targetWithTransforms = H()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Lc(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : re(this.target, this.layout.layoutBox), Vr(this.target, this.targetDelta)) : re(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));
|
|
5983
5988
|
}
|
|
@@ -5998,7 +6003,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5998
6003
|
var x;
|
|
5999
6004
|
const o = this.getLead(), l = !!this.resumingFrom || this !== o;
|
|
6000
6005
|
let c = !0;
|
|
6001
|
-
if ((this.isProjectionDirty || (x = this.parent) != null && x.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt ===
|
|
6006
|
+
if ((this.isProjectionDirty || (x = this.parent) != null && x.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === U.timestamp && (c = !1), c)
|
|
6002
6007
|
return;
|
|
6003
6008
|
const { layout: h, layoutId: u } = this.options;
|
|
6004
6009
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(h || u))
|
|
@@ -6033,17 +6038,17 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6033
6038
|
setAnimationOrigin(o, l = !1) {
|
|
6034
6039
|
const c = this.snapshot, h = c ? c.latestValues : {}, u = { ...this.latestValues }, d = Fe();
|
|
6035
6040
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !l;
|
|
6036
|
-
const f = H(), m = c ? c.source : void 0, x = this.layout ? this.layout.source : void 0, g = m !== x,
|
|
6041
|
+
const f = H(), m = c ? c.source : void 0, x = this.layout ? this.layout.source : void 0, g = m !== x, y = this.getStack(), w = !y || y.members.length <= 1, v = !!(g && !w && this.options.crossfade === !0 && !this.path.some(uu));
|
|
6037
6042
|
this.animationProgress = 0;
|
|
6038
|
-
let
|
|
6039
|
-
this.mixTargetDelta = (
|
|
6040
|
-
const S =
|
|
6041
|
-
Qs(d.x, o.x, S), Qs(d.y, o.y, S), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Pt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), cu(this.relativeTarget, this.relativeTargetOrigin, f, S),
|
|
6043
|
+
let b;
|
|
6044
|
+
this.mixTargetDelta = (M) => {
|
|
6045
|
+
const S = M / 1e3;
|
|
6046
|
+
Qs(d.x, o.x, S), Qs(d.y, o.y, S), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Pt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), cu(this.relativeTarget, this.relativeTargetOrigin, f, S), b && Ic(this.relativeTarget, b) && (this.isProjectionDirty = !1), b || (b = H()), re(b, this.relativeTarget)), g && (this.animationValues = u, Hc(u, h, this.latestValues, S, v, w)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = S;
|
|
6042
6047
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
6043
6048
|
}
|
|
6044
6049
|
startAnimation(o) {
|
|
6045
6050
|
var l, c, h;
|
|
6046
|
-
this.notifyListeners("animationStart"), (l = this.currentAnimation) == null || l.stop(), (h = (c = this.resumingFrom) == null ? void 0 : c.currentAnimation) == null || h.stop(), this.pendingAnimation && (we(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation =
|
|
6051
|
+
this.notifyListeners("animationStart"), (l = this.currentAnimation) == null || l.stop(), (h = (c = this.resumingFrom) == null ? void 0 : c.currentAnimation) == null || h.stop(), this.pendingAnimation && (we(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = D.update(() => {
|
|
6047
6052
|
jt.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Be(0)), this.motionValue.jump(0, !1), this.currentAnimation = Wc(this.motionValue, [0, 1e3], {
|
|
6048
6053
|
...o,
|
|
6049
6054
|
velocity: 0,
|
|
@@ -6160,13 +6165,13 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6160
6165
|
for (const x in jn) {
|
|
6161
6166
|
if (u[x] === void 0)
|
|
6162
6167
|
continue;
|
|
6163
|
-
const { correct: g, applyTo:
|
|
6164
|
-
if (
|
|
6165
|
-
const
|
|
6166
|
-
for (let
|
|
6167
|
-
o[
|
|
6168
|
+
const { correct: g, applyTo: y, isCSSVariable: w } = jn[x], v = d === "none" ? u[x] : g(u[x], h);
|
|
6169
|
+
if (y) {
|
|
6170
|
+
const b = y.length;
|
|
6171
|
+
for (let M = 0; M < b; M++)
|
|
6172
|
+
o[y[M]] = v;
|
|
6168
6173
|
} else
|
|
6169
|
-
|
|
6174
|
+
w ? this.options.visualElement.renderState.vars[x] = v : o[x] = v;
|
|
6170
6175
|
}
|
|
6171
6176
|
this.options.layoutId && (o.pointerEvents = h === this ? gt(l == null ? void 0 : l.pointerEvents) || "" : "none");
|
|
6172
6177
|
}
|
|
@@ -6215,8 +6220,8 @@ function Jc(e) {
|
|
|
6215
6220
|
if (f && m) {
|
|
6216
6221
|
const x = e.options.layoutAnchor || void 0, g = H();
|
|
6217
6222
|
Pt(g, t.layoutBox, f.layoutBox, x);
|
|
6218
|
-
const
|
|
6219
|
-
Pt(
|
|
6223
|
+
const y = H();
|
|
6224
|
+
Pt(y, i, m.layoutBox, x), Hr(g, y) || (u = !0), d.options.layoutRoot && (e.relativeTarget = y, e.relativeTargetOrigin = g, e.relativeParent = d);
|
|
6220
6225
|
}
|
|
6221
6226
|
}
|
|
6222
6227
|
}
|
|
@@ -6275,10 +6280,10 @@ function lu(e) {
|
|
|
6275
6280
|
e.removeLeadSnapshot();
|
|
6276
6281
|
}
|
|
6277
6282
|
function Qs(e, t, n) {
|
|
6278
|
-
e.translate =
|
|
6283
|
+
e.translate = L(t.translate, 0, n), e.scale = L(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
|
|
6279
6284
|
}
|
|
6280
6285
|
function ei(e, t, n, i) {
|
|
6281
|
-
e.min =
|
|
6286
|
+
e.min = L(t.min, n.min, i), e.max = L(t.max, n.max, i);
|
|
6282
6287
|
}
|
|
6283
6288
|
function cu(e, t, n, i) {
|
|
6284
6289
|
ei(e.x, t.x, n.x, i), ei(e.y, t.y, n.y, i);
|
|
@@ -6289,7 +6294,7 @@ function uu(e) {
|
|
|
6289
6294
|
const hu = {
|
|
6290
6295
|
duration: 0.45,
|
|
6291
6296
|
ease: [0.4, 0, 0.1, 1]
|
|
6292
|
-
}, ti = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), ni = ti("applewebkit/") && !ti("chrome/") ? Math.round :
|
|
6297
|
+
}, ti = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), ni = ti("applewebkit/") && !ti("chrome/") ? Math.round : ie;
|
|
6293
6298
|
function si(e) {
|
|
6294
6299
|
e.min = ni(e.min), e.max = ni(e.max);
|
|
6295
6300
|
}
|
|
@@ -6337,7 +6342,7 @@ const pu = $r({
|
|
|
6337
6342
|
reducedMotion: "never"
|
|
6338
6343
|
});
|
|
6339
6344
|
function mu(e = !0) {
|
|
6340
|
-
const t =
|
|
6345
|
+
const t = ee(Tn);
|
|
6341
6346
|
if (t === null)
|
|
6342
6347
|
return [!0, null];
|
|
6343
6348
|
const { isPresent: n, onExitComplete: i, register: r } = t, a = co();
|
|
@@ -6438,7 +6443,7 @@ try {
|
|
|
6438
6443
|
function vu(e, t, n) {
|
|
6439
6444
|
const i = {};
|
|
6440
6445
|
for (const r in e)
|
|
6441
|
-
r === "values" && typeof e.values == "object" ||
|
|
6446
|
+
r === "values" && typeof e.values == "object" || W(e[r]) || (Zr(r) || n === !0 && Vt(r) || !t && !Vt(r) || // If trying to use native HTML drag events, forward drag listeners
|
|
6442
6447
|
e.draggable && r.startsWith("onDrag")) && (i[r] = e[r]);
|
|
6443
6448
|
return i;
|
|
6444
6449
|
}
|
|
@@ -6454,7 +6459,7 @@ function wu(e, t) {
|
|
|
6454
6459
|
return e.inherit !== !1 ? t : {};
|
|
6455
6460
|
}
|
|
6456
6461
|
function bu(e) {
|
|
6457
|
-
const { initial: t, animate: n } = wu(e,
|
|
6462
|
+
const { initial: t, animate: n } = wu(e, ee(kt));
|
|
6458
6463
|
return Oe(() => ({ initial: t, animate: n }), [oi(t), oi(n)]);
|
|
6459
6464
|
}
|
|
6460
6465
|
function oi(e) {
|
|
@@ -6468,7 +6473,7 @@ const Yn = () => ({
|
|
|
6468
6473
|
});
|
|
6469
6474
|
function Jr(e, t, n) {
|
|
6470
6475
|
for (const i in t)
|
|
6471
|
-
!
|
|
6476
|
+
!W(t[i]) && !Dr(i, n) && (e[i] = t[i]);
|
|
6472
6477
|
}
|
|
6473
6478
|
function Tu({ transformTemplate: e }, t) {
|
|
6474
6479
|
return Oe(() => {
|
|
@@ -6550,7 +6555,7 @@ function Xn(e) {
|
|
|
6550
6555
|
);
|
|
6551
6556
|
}
|
|
6552
6557
|
function Vu(e, t, n, { latestValues: i }, r, a = !1, o) {
|
|
6553
|
-
const c = (o ?? Xn(e) ? Au : Su)(t, i, r, e), h = vu(t, typeof e == "string", a), u = e !== p ? { ...h, ...c, ref: n } : {}, { children: d } = t, f = Oe(() =>
|
|
6558
|
+
const c = (o ?? Xn(e) ? Au : Su)(t, i, r, e), h = vu(t, typeof e == "string", a), u = e !== p ? { ...h, ...c, ref: n } : {}, { children: d } = t, f = Oe(() => W(d) ? d.get() : d, [d]);
|
|
6554
6559
|
return uo(e, {
|
|
6555
6560
|
...u,
|
|
6556
6561
|
children: f
|
|
@@ -6577,24 +6582,24 @@ function Eu(e, t, n, i) {
|
|
|
6577
6582
|
for (let m = 0; m < f.length; m++) {
|
|
6578
6583
|
const x = In(e, f[m]);
|
|
6579
6584
|
if (x) {
|
|
6580
|
-
const { transitionEnd: g, transition:
|
|
6581
|
-
for (const
|
|
6582
|
-
let
|
|
6583
|
-
if (Array.isArray(
|
|
6584
|
-
const
|
|
6585
|
-
|
|
6585
|
+
const { transitionEnd: g, transition: y, ...w } = x;
|
|
6586
|
+
for (const v in w) {
|
|
6587
|
+
let b = w[v];
|
|
6588
|
+
if (Array.isArray(b)) {
|
|
6589
|
+
const M = u ? b.length - 1 : 0;
|
|
6590
|
+
b = b[M];
|
|
6586
6591
|
}
|
|
6587
|
-
|
|
6592
|
+
b !== null && (r[v] = b);
|
|
6588
6593
|
}
|
|
6589
|
-
for (const
|
|
6590
|
-
r[
|
|
6594
|
+
for (const v in g)
|
|
6595
|
+
r[v] = g[v];
|
|
6591
6596
|
}
|
|
6592
6597
|
}
|
|
6593
6598
|
}
|
|
6594
6599
|
return r;
|
|
6595
6600
|
}
|
|
6596
6601
|
const eo = (e) => (t, n) => {
|
|
6597
|
-
const i =
|
|
6602
|
+
const i = ee(kt), r = ee(Tn), a = () => Cu(e, t, i, r);
|
|
6598
6603
|
return n ? a() : Po(a);
|
|
6599
6604
|
}, Du = /* @__PURE__ */ eo({
|
|
6600
6605
|
scrapeMotionValuesFromProps: Gn,
|
|
@@ -6627,8 +6632,8 @@ function ke(e) {
|
|
|
6627
6632
|
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
|
|
6628
6633
|
}
|
|
6629
6634
|
function Nu(e, t, n, i, r, a) {
|
|
6630
|
-
var
|
|
6631
|
-
const { visualElement: o } =
|
|
6635
|
+
var b, M;
|
|
6636
|
+
const { visualElement: o } = ee(kt), l = ee(Xr), c = ee(Tn), h = ee(Yr), u = h.reducedMotion, d = h.skipAnimations, f = fe(null), m = fe(!1);
|
|
6632
6637
|
i = i || l.renderer, !f.current && i && (f.current = i(e, {
|
|
6633
6638
|
visualState: t,
|
|
6634
6639
|
parent: o,
|
|
@@ -6639,20 +6644,20 @@ function Nu(e, t, n, i, r, a) {
|
|
|
6639
6644
|
skipAnimations: d,
|
|
6640
6645
|
isSVG: a
|
|
6641
6646
|
}), m.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
6642
|
-
const x = f.current, g =
|
|
6647
|
+
const x = f.current, g = ee(to);
|
|
6643
6648
|
x && !x.projection && r && (x.type === "html" || x.type === "svg") && Fu(f.current, n, r, g);
|
|
6644
|
-
const
|
|
6649
|
+
const y = fe(!1);
|
|
6645
6650
|
ji(() => {
|
|
6646
|
-
x &&
|
|
6651
|
+
x && y.current && x.update(n, c);
|
|
6647
6652
|
});
|
|
6648
|
-
const
|
|
6653
|
+
const w = n[cr], v = fe(!!w && typeof window < "u" && !((b = window.MotionHandoffIsComplete) != null && b.call(window, w)) && ((M = window.MotionHasOptimisedAnimation) == null ? void 0 : M.call(window, w)));
|
|
6649
6654
|
return Co(() => {
|
|
6650
|
-
m.current = !0, x && (
|
|
6655
|
+
m.current = !0, x && (y.current = !0, window.MotionIsMounted = !0, x.updateFeatures(), x.scheduleRenderMicrotask(), v.current && x.animationState && x.animationState.animateChanges());
|
|
6651
6656
|
}), je(() => {
|
|
6652
|
-
x && (!
|
|
6657
|
+
x && (!v.current && x.animationState && x.animationState.animateChanges(), v.current && (queueMicrotask(() => {
|
|
6653
6658
|
var S;
|
|
6654
|
-
(S = window.MotionHandoffMarkAsComplete) == null || S.call(window,
|
|
6655
|
-
}),
|
|
6659
|
+
(S = window.MotionHandoffMarkAsComplete) == null || S.call(window, w);
|
|
6660
|
+
}), v.current = !1), x.enteringChildren = void 0);
|
|
6656
6661
|
}), x;
|
|
6657
6662
|
}
|
|
6658
6663
|
function Fu(e, t, n, i) {
|
|
@@ -6687,14 +6692,14 @@ function Kt(e, { forwardMotionProps: t = !1, type: n } = {}, i, r) {
|
|
|
6687
6692
|
function l(h, u) {
|
|
6688
6693
|
let d;
|
|
6689
6694
|
const f = {
|
|
6690
|
-
...
|
|
6695
|
+
...ee(Yr),
|
|
6691
6696
|
...h,
|
|
6692
6697
|
layoutId: Ou(h)
|
|
6693
6698
|
}, { isStatic: m } = f, x = bu(h), g = o(h, m);
|
|
6694
6699
|
if (!m && typeof window < "u") {
|
|
6695
6700
|
Iu(f, i);
|
|
6696
|
-
const
|
|
6697
|
-
d =
|
|
6701
|
+
const y = Bu(f);
|
|
6702
|
+
d = y.MeasureLayout, x.visualElement = Nu(e, g, f, r, y.ProjectionNode, a);
|
|
6698
6703
|
}
|
|
6699
6704
|
return s.jsxs(kt.Provider, { value: x, children: [d && x.visualElement ? s.jsx(d, { visualElement: x.visualElement, ...f }) : null, Vu(e, h, Lu(g, x.visualElement, u), g, m, t, a)] });
|
|
6700
6705
|
}
|
|
@@ -6703,11 +6708,11 @@ function Kt(e, { forwardMotionProps: t = !1, type: n } = {}, i, r) {
|
|
|
6703
6708
|
return c[Ru] = e, c;
|
|
6704
6709
|
}
|
|
6705
6710
|
function Ou({ layoutId: e }) {
|
|
6706
|
-
const t =
|
|
6711
|
+
const t = ee(wi).id;
|
|
6707
6712
|
return t && e !== void 0 ? t + "-" + e : e;
|
|
6708
6713
|
}
|
|
6709
6714
|
function Iu(e, t) {
|
|
6710
|
-
const n =
|
|
6715
|
+
const n = ee(Xr).strict;
|
|
6711
6716
|
if (process.env.NODE_ENV !== "production" && t && n) {
|
|
6712
6717
|
const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
6713
6718
|
e.ignoreStrict ? He(!1, i, "lazy-strict-mode") : pe(!1, i, "lazy-strict-mode");
|
|
@@ -6847,23 +6852,23 @@ class io {
|
|
|
6847
6852
|
const m = Gt(this.lastMoveEventInfo, this.history), x = this.startEvent !== null, g = Gu(m.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
6848
6853
|
if (!x && !g)
|
|
6849
6854
|
return;
|
|
6850
|
-
const { point:
|
|
6851
|
-
this.history.push({ ...
|
|
6852
|
-
const { onStart:
|
|
6853
|
-
x || (
|
|
6855
|
+
const { point: y } = m, { timestamp: w } = U;
|
|
6856
|
+
this.history.push({ ...y, timestamp: w });
|
|
6857
|
+
const { onStart: v, onMove: b } = this.handlers;
|
|
6858
|
+
x || (v && v(this.lastMoveEvent, m), this.startEvent = this.lastMoveEvent), b && b(this.lastMoveEvent, m);
|
|
6854
6859
|
}, this.handlePointerMove = (m, x) => {
|
|
6855
|
-
this.lastMoveEvent = m, this.lastRawMoveEventInfo = x, this.lastMoveEventInfo = ht(x, this.transformPagePoint),
|
|
6860
|
+
this.lastMoveEvent = m, this.lastRawMoveEventInfo = x, this.lastMoveEventInfo = ht(x, this.transformPagePoint), D.update(this.updatePoint, !0);
|
|
6856
6861
|
}, this.handlePointerUp = (m, x) => {
|
|
6857
6862
|
this.end();
|
|
6858
|
-
const { onEnd: g, onSessionEnd:
|
|
6859
|
-
if ((this.dragSnapToOrigin || !this.startEvent) &&
|
|
6863
|
+
const { onEnd: g, onSessionEnd: y, resumeAnimation: w } = this.handlers;
|
|
6864
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && w && w(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
6860
6865
|
return;
|
|
6861
|
-
const
|
|
6862
|
-
this.startEvent && g && g(m,
|
|
6866
|
+
const v = Gt(m.type === "pointercancel" ? this.lastMoveEventInfo : ht(x, this.transformPagePoint), this.history);
|
|
6867
|
+
this.startEvent && g && g(m, v), y && y(m, v);
|
|
6863
6868
|
}, !_n(t))
|
|
6864
6869
|
return;
|
|
6865
6870
|
this.dragSnapToOrigin = a, this.handlers = n, this.transformPagePoint = i, this.distanceThreshold = o, this.contextWindow = r || window;
|
|
6866
|
-
const c = ot(t), h = ht(c, this.transformPagePoint), { point: u } = h, { timestamp: d } =
|
|
6871
|
+
const c = ot(t), h = ht(c, this.transformPagePoint), { point: u } = h, { timestamp: d } = U;
|
|
6867
6872
|
this.history = [{ ...u, timestamp: d }];
|
|
6868
6873
|
const { onSessionStart: f } = n;
|
|
6869
6874
|
f && f(t, Gt(h, this.history)), this.removeListeners = st(Ze(this.contextWindow, "pointermove", this.handlePointerMove), Ze(this.contextWindow, "pointerup", this.handlePointerUp), Ze(this.contextWindow, "pointercancel", this.handlePointerUp)), l && this.startScrollTracking(l);
|
|
@@ -6905,7 +6910,7 @@ class io {
|
|
|
6905
6910
|
x: t.scrollLeft,
|
|
6906
6911
|
y: t.scrollTop
|
|
6907
6912
|
}, a = { x: r.x - n.x, y: r.y - n.y };
|
|
6908
|
-
a.x === 0 && a.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += a.x, this.lastMoveEventInfo.point.y += a.y) : this.history.length > 0 && (this.history[0].x -= a.x, this.history[0].y -= a.y), this.scrollPositions.set(t, r),
|
|
6913
|
+
a.x === 0 && a.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += a.x, this.lastMoveEventInfo.point.y += a.y) : this.history.length > 0 && (this.history[0].x -= a.x, this.history[0].y -= a.y), this.scrollPositions.set(t, r), D.update(this.updatePoint, !0));
|
|
6909
6914
|
}
|
|
6910
6915
|
updateHandlers(t) {
|
|
6911
6916
|
this.handlers = t;
|
|
@@ -6939,12 +6944,12 @@ function Xu(e, t) {
|
|
|
6939
6944
|
return { x: 0, y: 0 };
|
|
6940
6945
|
let n = e.length - 1, i = null;
|
|
6941
6946
|
const r = ro(e);
|
|
6942
|
-
for (; n >= 0 && (i = e[n], !(r.timestamp - i.timestamp > /* @__PURE__ */
|
|
6947
|
+
for (; n >= 0 && (i = e[n], !(r.timestamp - i.timestamp > /* @__PURE__ */ te(t))); )
|
|
6943
6948
|
n--;
|
|
6944
6949
|
if (!i)
|
|
6945
6950
|
return { x: 0, y: 0 };
|
|
6946
|
-
i === e[0] && e.length > 2 && r.timestamp - i.timestamp > /* @__PURE__ */
|
|
6947
|
-
const a = /* @__PURE__ */
|
|
6951
|
+
i === e[0] && e.length > 2 && r.timestamp - i.timestamp > /* @__PURE__ */ te(t) * 2 && (i = e[1]);
|
|
6952
|
+
const a = /* @__PURE__ */ se(r.timestamp - i.timestamp);
|
|
6948
6953
|
if (a === 0)
|
|
6949
6954
|
return { x: 0, y: 0 };
|
|
6950
6955
|
const o = {
|
|
@@ -6954,7 +6959,7 @@ function Xu(e, t) {
|
|
|
6954
6959
|
return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
|
|
6955
6960
|
}
|
|
6956
6961
|
function qu(e, { min: t, max: n }, i) {
|
|
6957
|
-
return t !== void 0 && e < t ? e = i ?
|
|
6962
|
+
return t !== void 0 && e < t ? e = i ? L(t, e, i.min) : Math.max(e, t) : n !== void 0 && e > n && (e = i ? L(n, e, i.max) : Math.min(e, n)), e;
|
|
6958
6963
|
}
|
|
6959
6964
|
function ui(e, t, n) {
|
|
6960
6965
|
return {
|
|
@@ -7018,30 +7023,30 @@ class sh {
|
|
|
7018
7023
|
const { drag: m, dragPropagation: x, onDragStart: g } = this.getProps();
|
|
7019
7024
|
if (m && !x && (this.openDragLock && this.openDragLock(), this.openDragLock = Nl(m), !this.openDragLock))
|
|
7020
7025
|
return;
|
|
7021
|
-
this.latestPointerEvent = d, 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), ce((
|
|
7022
|
-
let
|
|
7023
|
-
if (he.test(
|
|
7024
|
-
const { projection:
|
|
7025
|
-
if (
|
|
7026
|
-
const
|
|
7027
|
-
|
|
7026
|
+
this.latestPointerEvent = d, 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), ce((w) => {
|
|
7027
|
+
let v = this.getAxisMotionValue(w).get() || 0;
|
|
7028
|
+
if (he.test(v)) {
|
|
7029
|
+
const { projection: b } = this.visualElement;
|
|
7030
|
+
if (b && b.layout) {
|
|
7031
|
+
const M = b.layout.layoutBox[w];
|
|
7032
|
+
M && (v = J(M) * (parseFloat(v) / 100));
|
|
7028
7033
|
}
|
|
7029
7034
|
}
|
|
7030
|
-
this.originPoint[
|
|
7031
|
-
}), g &&
|
|
7032
|
-
const { animationState:
|
|
7033
|
-
|
|
7035
|
+
this.originPoint[w] = v;
|
|
7036
|
+
}), g && D.update(() => g(d, f), !1, !0), dn(this.visualElement, "transform");
|
|
7037
|
+
const { animationState: y } = this.visualElement;
|
|
7038
|
+
y && y.setActive("whileDrag", !0);
|
|
7034
7039
|
}, l = (d, f) => {
|
|
7035
7040
|
this.latestPointerEvent = d, this.latestPanInfo = f;
|
|
7036
|
-
const { dragPropagation: m, dragDirectionLock: x, onDirectionLock: g, onDrag:
|
|
7041
|
+
const { dragPropagation: m, dragDirectionLock: x, onDirectionLock: g, onDrag: y } = this.getProps();
|
|
7037
7042
|
if (!m && !this.openDragLock)
|
|
7038
7043
|
return;
|
|
7039
|
-
const { offset:
|
|
7044
|
+
const { offset: w } = f;
|
|
7040
7045
|
if (x && this.currentDirection === null) {
|
|
7041
|
-
this.currentDirection = rh(
|
|
7046
|
+
this.currentDirection = rh(w), this.currentDirection !== null && g && g(this.currentDirection);
|
|
7042
7047
|
return;
|
|
7043
7048
|
}
|
|
7044
|
-
this.updateAxis("x", f.point,
|
|
7049
|
+
this.updateAxis("x", f.point, w), this.updateAxis("y", f.point, w), this.visualElement.render(), y && D.update(() => y(d, f), !1, !0);
|
|
7045
7050
|
}, c = (d, f) => {
|
|
7046
7051
|
this.latestPointerEvent = d, this.latestPanInfo = f, this.stop(d, f), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
7047
7052
|
}, h = () => {
|
|
@@ -7072,7 +7077,7 @@ class sh {
|
|
|
7072
7077
|
const { velocity: o } = r;
|
|
7073
7078
|
this.startAnimation(o);
|
|
7074
7079
|
const { onDragEnd: l } = this.getProps();
|
|
7075
|
-
l &&
|
|
7080
|
+
l && D.postRender(() => l(i, r));
|
|
7076
7081
|
}
|
|
7077
7082
|
/**
|
|
7078
7083
|
* @internal
|
|
@@ -7171,7 +7176,7 @@ class sh {
|
|
|
7171
7176
|
const { projection: r } = this.visualElement, a = this.getAxisMotionValue(n);
|
|
7172
7177
|
if (r && r.layout) {
|
|
7173
7178
|
const { min: o, max: l } = r.layout.layoutBox[n], c = a.get() || 0;
|
|
7174
|
-
a.set(t[n] -
|
|
7179
|
+
a.set(t[n] - L(o, l, 0.5) + c);
|
|
7175
7180
|
}
|
|
7176
7181
|
});
|
|
7177
7182
|
}
|
|
@@ -7200,7 +7205,7 @@ class sh {
|
|
|
7200
7205
|
if (!dt(o, t, null))
|
|
7201
7206
|
return;
|
|
7202
7207
|
const l = this.getAxisMotionValue(o), { min: c, max: h } = this.constraints[o];
|
|
7203
|
-
l.set(
|
|
7208
|
+
l.set(L(c, h, r[o]));
|
|
7204
7209
|
}), this.visualElement.render();
|
|
7205
7210
|
}
|
|
7206
7211
|
addListeners() {
|
|
@@ -7216,7 +7221,7 @@ class sh {
|
|
|
7216
7221
|
const { dragConstraints: h } = this.getProps();
|
|
7217
7222
|
ke(h) && h.current && (this.constraints = this.resolveRefConstraints(), i || (i = ih(t, h.current, () => this.scalePositionWithinConstraints())));
|
|
7218
7223
|
}, { projection: a } = this.visualElement, o = a.addEventListener("measure", r);
|
|
7219
|
-
a && !a.layout && (a.root && a.root.updateScroll(), a.updateLayout()),
|
|
7224
|
+
a && !a.layout && (a.root && a.root.updateScroll(), a.updateLayout()), D.read(r);
|
|
7220
7225
|
const l = tt(window, "resize", () => this.scalePositionWithinConstraints()), c = a.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: u }) => {
|
|
7221
7226
|
this.isDragging && u && (ce((d) => {
|
|
7222
7227
|
const f = this.getAxisMotionValue(d);
|
|
@@ -7265,11 +7270,11 @@ function rh(e, t = 10) {
|
|
|
7265
7270
|
}
|
|
7266
7271
|
class oh extends be {
|
|
7267
7272
|
constructor(t) {
|
|
7268
|
-
super(t), this.removeGroupControls =
|
|
7273
|
+
super(t), this.removeGroupControls = ie, this.removeListeners = ie, this.controls = new sh(t);
|
|
7269
7274
|
}
|
|
7270
7275
|
mount() {
|
|
7271
7276
|
const { dragControls: t } = this.node.getProps();
|
|
7272
|
-
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() ||
|
|
7277
|
+
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || ie;
|
|
7273
7278
|
}
|
|
7274
7279
|
update() {
|
|
7275
7280
|
const { dragControls: t } = this.node.getProps(), { dragControls: n } = this.node.prevProps || {};
|
|
@@ -7280,11 +7285,11 @@ class oh extends be {
|
|
|
7280
7285
|
}
|
|
7281
7286
|
}
|
|
7282
7287
|
const Yt = (e) => (t, n) => {
|
|
7283
|
-
e &&
|
|
7288
|
+
e && D.update(() => e(t, n), !1, !0);
|
|
7284
7289
|
};
|
|
7285
7290
|
class ah extends be {
|
|
7286
7291
|
constructor() {
|
|
7287
|
-
super(...arguments), this.removePointerDownListener =
|
|
7292
|
+
super(...arguments), this.removePointerDownListener = ie;
|
|
7288
7293
|
}
|
|
7289
7294
|
onPointerDown(t) {
|
|
7290
7295
|
this.session = new io(t, this.createPanHandlers(), {
|
|
@@ -7299,7 +7304,7 @@ class ah extends be {
|
|
|
7299
7304
|
onStart: Yt(n),
|
|
7300
7305
|
onMove: Yt(i),
|
|
7301
7306
|
onEnd: (a, o) => {
|
|
7302
|
-
delete this.session, r &&
|
|
7307
|
+
delete this.session, r && D.postRender(() => r(a, o));
|
|
7303
7308
|
}
|
|
7304
7309
|
};
|
|
7305
7310
|
}
|
|
@@ -7335,7 +7340,7 @@ class lh extends fo {
|
|
|
7335
7340
|
return o && (o.isPresent = a, t.layoutDependency !== n && o.setOptions({
|
|
7336
7341
|
...o.options,
|
|
7337
7342
|
layoutDependency: n
|
|
7338
|
-
}), Xt = !0, r || t.layoutDependency !== n || n === void 0 || t.isPresent !== a ? o.willUpdate() : this.safeToRemove(), t.isPresent !== a && (a ? o.promote() : o.relegate() ||
|
|
7343
|
+
}), Xt = !0, r || t.layoutDependency !== n || n === void 0 || t.isPresent !== a ? o.willUpdate() : this.safeToRemove(), t.isPresent !== a && (a ? o.promote() : o.relegate() || D.postRender(() => {
|
|
7339
7344
|
const l = o.getStack();
|
|
7340
7345
|
(!l || !l.members.length) && this.safeToRemove();
|
|
7341
7346
|
}))), null;
|
|
@@ -7359,8 +7364,8 @@ class lh extends fo {
|
|
|
7359
7364
|
}
|
|
7360
7365
|
}
|
|
7361
7366
|
function oo(e) {
|
|
7362
|
-
const [t, n] = mu(), i =
|
|
7363
|
-
return s.jsx(lh, { ...e, layoutGroup: i, switchLayoutGroup:
|
|
7367
|
+
const [t, n] = mu(), i = ee(wi);
|
|
7368
|
+
return s.jsx(lh, { ...e, layoutGroup: i, switchLayoutGroup: ee(to), isPresent: t, safeToRemove: n });
|
|
7364
7369
|
}
|
|
7365
7370
|
const ch = {
|
|
7366
7371
|
pan: {
|
|
@@ -7376,7 +7381,7 @@ function mi(e, t, n) {
|
|
|
7376
7381
|
const { props: i } = e;
|
|
7377
7382
|
e.animationState && i.whileHover && e.animationState.setActive("whileHover", n === "Start");
|
|
7378
7383
|
const r = "onHover" + n, a = i[r];
|
|
7379
|
-
a &&
|
|
7384
|
+
a && D.postRender(() => a(t, ot(t)));
|
|
7380
7385
|
}
|
|
7381
7386
|
class uh extends be {
|
|
7382
7387
|
mount() {
|
|
@@ -7414,7 +7419,7 @@ function xi(e, t, n) {
|
|
|
7414
7419
|
return;
|
|
7415
7420
|
e.animationState && i.whileTap && e.animationState.setActive("whileTap", n === "Start");
|
|
7416
7421
|
const r = "onTap" + (n === "End" ? "" : n), a = i[r];
|
|
7417
|
-
a &&
|
|
7422
|
+
a && D.postRender(() => a(t, ot(t)));
|
|
7418
7423
|
}
|
|
7419
7424
|
class dh extends be {
|
|
7420
7425
|
mount() {
|
|
@@ -7541,13 +7546,13 @@ const vh = {
|
|
|
7541
7546
|
top: document.documentElement.scrollHeight,
|
|
7542
7547
|
behavior: "smooth"
|
|
7543
7548
|
}), r = t ? "up" : "down";
|
|
7544
|
-
return /* @__PURE__ */ s.jsx("div", { className: "muncher-fab-container", children: /* @__PURE__ */ s.jsx(
|
|
7549
|
+
return /* @__PURE__ */ s.jsx("div", { className: "muncher-fab-container", children: /* @__PURE__ */ s.jsx(ne, { variant: e, onClick: r === "up" ? n : i, rounded: !0, children: r === "up" ? /* @__PURE__ */ s.jsx(N, { name: "arrow-up" }) : /* @__PURE__ */ s.jsx(N, { name: "arrow-down" }) }) });
|
|
7545
7550
|
};
|
|
7546
7551
|
export {
|
|
7547
7552
|
Ah as Accordion,
|
|
7548
7553
|
yo as Backdrop,
|
|
7549
7554
|
go as Badge,
|
|
7550
|
-
|
|
7555
|
+
ne as Button,
|
|
7551
7556
|
Xh as Card,
|
|
7552
7557
|
Eh as Checkbox,
|
|
7553
7558
|
wo as CopyButton,
|
|
@@ -7558,7 +7563,7 @@ export {
|
|
|
7558
7563
|
$h as Featured,
|
|
7559
7564
|
Zh as FlippableCard,
|
|
7560
7565
|
Hh as Hr,
|
|
7561
|
-
|
|
7566
|
+
N as Icon,
|
|
7562
7567
|
Ph as IconBadge,
|
|
7563
7568
|
Dh as ImageInput,
|
|
7564
7569
|
So as Input,
|