kku-ui 0.2.1 → 0.2.3
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/es/components/data-display/dropdown/KDropdown.interface.d.ts +2 -0
- package/lib/es/index.js +1005 -979
- package/lib/es/index.js.br +0 -0
- package/lib/es/index.js.gz +0 -0
- package/lib/fonts/pretendard/Pretendard-Bold.woff2 +0 -0
- package/lib/fonts/pretendard/Pretendard-Medium.woff2 +0 -0
- package/lib/fonts/pretendard/Pretendard-Regular.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/useEscapeKey-BH1YNl0p.js +158 -0
- package/lib/useEscapeKey-BH1YNl0p.js.br +0 -0
- package/lib/useEscapeKey-BH1YNl0p.js.gz +0 -0
- package/package.json +4 -10
package/lib/es/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Ln from "react";
|
|
2
|
-
import ua, { createContext as wt, useContext as
|
|
2
|
+
import ua, { createContext as wt, useContext as tt, memo as I, useCallback as S, useRef as J, useState as at, useMemo as b, useEffect as Tt, Children as At, isValidElement as yt, forwardRef as Z, useLayoutEffect as da, useId as Yt, useInsertionEffect as Wi, Fragment as $i, createElement as ha, Component as fa, useImperativeHandle as pt, cloneElement as _e } from "react";
|
|
3
3
|
import "lodash-es";
|
|
4
4
|
import { u as pa, a as Tn, b as ma, c as ga, d as Mn, e as Ui } from "../useEscapeKey-BH1YNl0p.js";
|
|
5
5
|
import { createPortal as Sn } from "react-dom";
|
|
6
|
-
var
|
|
6
|
+
var we = { exports: {} }, ee = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.js
|
|
@@ -56,15 +56,15 @@ function xa() {
|
|
|
56
56
|
switch (g) {
|
|
57
57
|
case y:
|
|
58
58
|
return "Fragment";
|
|
59
|
-
case
|
|
59
|
+
case C:
|
|
60
60
|
return "Profiler";
|
|
61
|
-
case k:
|
|
62
|
-
return "StrictMode";
|
|
63
61
|
case w:
|
|
62
|
+
return "StrictMode";
|
|
63
|
+
case k:
|
|
64
64
|
return "Suspense";
|
|
65
|
-
case
|
|
65
|
+
case L:
|
|
66
66
|
return "SuspenseList";
|
|
67
|
-
case
|
|
67
|
+
case _:
|
|
68
68
|
return "Activity";
|
|
69
69
|
}
|
|
70
70
|
if (typeof g == "object")
|
|
@@ -73,19 +73,19 @@ function xa() {
|
|
|
73
73
|
), g.$$typeof) {
|
|
74
74
|
case m:
|
|
75
75
|
return "Portal";
|
|
76
|
-
case
|
|
76
|
+
case v:
|
|
77
77
|
return (g.displayName || "Context") + ".Provider";
|
|
78
78
|
case x:
|
|
79
79
|
return (g._context.displayName || "Context") + ".Consumer";
|
|
80
80
|
case T:
|
|
81
|
-
var
|
|
82
|
-
return g = g.displayName, g || (g =
|
|
83
|
-
case
|
|
84
|
-
return
|
|
85
|
-
case
|
|
86
|
-
|
|
81
|
+
var E = g.render;
|
|
82
|
+
return g = g.displayName, g || (g = E.displayName || E.name || "", g = g !== "" ? "ForwardRef(" + g + ")" : "ForwardRef"), g;
|
|
83
|
+
case M:
|
|
84
|
+
return E = g.displayName || null, E !== null ? E : t(g.type) || "Memo";
|
|
85
|
+
case j:
|
|
86
|
+
E = g._payload, g = g._init;
|
|
87
87
|
try {
|
|
88
|
-
return t(g(
|
|
88
|
+
return t(g(E));
|
|
89
89
|
} catch {
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -97,50 +97,50 @@ function xa() {
|
|
|
97
97
|
function n(g) {
|
|
98
98
|
try {
|
|
99
99
|
e(g);
|
|
100
|
-
var
|
|
100
|
+
var E = !1;
|
|
101
101
|
} catch {
|
|
102
|
-
|
|
102
|
+
E = !0;
|
|
103
103
|
}
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
var F =
|
|
104
|
+
if (E) {
|
|
105
|
+
E = console;
|
|
106
|
+
var F = E.error, V = typeof Symbol == "function" && Symbol.toStringTag && g[Symbol.toStringTag] || g.constructor.name || "Object";
|
|
107
107
|
return F.call(
|
|
108
|
-
|
|
108
|
+
E,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
|
-
|
|
110
|
+
V
|
|
111
111
|
), e(g);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
function s(g) {
|
|
115
115
|
if (g === y) return "<>";
|
|
116
|
-
if (typeof g == "object" && g !== null && g.$$typeof ===
|
|
116
|
+
if (typeof g == "object" && g !== null && g.$$typeof === j)
|
|
117
117
|
return "<...>";
|
|
118
118
|
try {
|
|
119
|
-
var
|
|
120
|
-
return
|
|
119
|
+
var E = t(g);
|
|
120
|
+
return E ? "<" + E + ">" : "<...>";
|
|
121
121
|
} catch {
|
|
122
122
|
return "<...>";
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
function i() {
|
|
126
|
-
var g =
|
|
126
|
+
var g = B.A;
|
|
127
127
|
return g === null ? null : g.getOwner();
|
|
128
128
|
}
|
|
129
129
|
function r() {
|
|
130
130
|
return Error("react-stack-top-frame");
|
|
131
131
|
}
|
|
132
132
|
function o(g) {
|
|
133
|
-
if (
|
|
134
|
-
var
|
|
135
|
-
if (
|
|
133
|
+
if (K.call(g, "key")) {
|
|
134
|
+
var E = Object.getOwnPropertyDescriptor(g, "key").get;
|
|
135
|
+
if (E && E.isReactWarning) return !1;
|
|
136
136
|
}
|
|
137
137
|
return g.key !== void 0;
|
|
138
138
|
}
|
|
139
|
-
function a(g,
|
|
139
|
+
function a(g, E) {
|
|
140
140
|
function F() {
|
|
141
|
-
|
|
141
|
+
D || (D = !0, console.error(
|
|
142
142
|
"%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)",
|
|
143
|
-
|
|
143
|
+
E
|
|
144
144
|
));
|
|
145
145
|
}
|
|
146
146
|
F.isReactWarning = !0, Object.defineProperty(g, "key", {
|
|
@@ -154,13 +154,13 @@ function xa() {
|
|
|
154
154
|
"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."
|
|
155
155
|
)), g = this.props.ref, g !== void 0 ? g : null;
|
|
156
156
|
}
|
|
157
|
-
function u(g,
|
|
158
|
-
return F =
|
|
157
|
+
function u(g, E, F, V, it, nt, kt, jt) {
|
|
158
|
+
return F = nt.ref, g = {
|
|
159
159
|
$$typeof: p,
|
|
160
160
|
type: g,
|
|
161
|
-
key:
|
|
162
|
-
props:
|
|
163
|
-
_owner:
|
|
161
|
+
key: E,
|
|
162
|
+
props: nt,
|
|
163
|
+
_owner: it
|
|
164
164
|
}, (F !== void 0 ? F : null) !== null ? Object.defineProperty(g, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
get: c
|
|
@@ -178,68 +178,68 @@ function xa() {
|
|
|
178
178
|
configurable: !1,
|
|
179
179
|
enumerable: !1,
|
|
180
180
|
writable: !0,
|
|
181
|
-
value:
|
|
181
|
+
value: kt
|
|
182
182
|
}), Object.defineProperty(g, "_debugTask", {
|
|
183
183
|
configurable: !1,
|
|
184
184
|
enumerable: !1,
|
|
185
185
|
writable: !0,
|
|
186
|
-
value:
|
|
186
|
+
value: jt
|
|
187
187
|
}), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
|
|
188
188
|
}
|
|
189
|
-
function d(g,
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
if (R(
|
|
194
|
-
for (
|
|
195
|
-
h(
|
|
196
|
-
Object.freeze && Object.freeze(
|
|
189
|
+
function d(g, E, F, V, it, nt, kt, jt) {
|
|
190
|
+
var X = E.children;
|
|
191
|
+
if (X !== void 0)
|
|
192
|
+
if (V)
|
|
193
|
+
if (R(X)) {
|
|
194
|
+
for (V = 0; V < X.length; V++)
|
|
195
|
+
h(X[V]);
|
|
196
|
+
Object.freeze && Object.freeze(X);
|
|
197
197
|
} else
|
|
198
198
|
console.error(
|
|
199
199
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
200
200
|
);
|
|
201
|
-
else h(
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
var
|
|
201
|
+
else h(X);
|
|
202
|
+
if (K.call(E, "key")) {
|
|
203
|
+
X = t(g);
|
|
204
|
+
var bt = Object.keys(E).filter(function(We) {
|
|
205
205
|
return We !== "key";
|
|
206
206
|
});
|
|
207
|
-
|
|
207
|
+
V = 0 < bt.length ? "{key: someKey, " + bt.join(": ..., ") + ": ...}" : "{key: someKey}", lt[X + V] || (bt = 0 < bt.length ? "{" + bt.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
208
208
|
`A props object containing a "key" prop is being spread into JSX:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s {...props} />
|
|
211
211
|
React keys must be passed directly to JSX without using spread:
|
|
212
212
|
let props = %s;
|
|
213
213
|
<%s key={someKey} {...props} />`,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
),
|
|
214
|
+
V,
|
|
215
|
+
X,
|
|
216
|
+
bt,
|
|
217
|
+
X
|
|
218
|
+
), lt[X + V] = !0);
|
|
219
219
|
}
|
|
220
|
-
if (
|
|
220
|
+
if (X = null, F !== void 0 && (n(F), X = "" + F), o(E) && (n(E.key), X = "" + E.key), "key" in E) {
|
|
221
221
|
F = {};
|
|
222
|
-
for (var te in
|
|
223
|
-
te !== "key" && (F[te] =
|
|
224
|
-
} else F =
|
|
225
|
-
return
|
|
222
|
+
for (var te in E)
|
|
223
|
+
te !== "key" && (F[te] = E[te]);
|
|
224
|
+
} else F = E;
|
|
225
|
+
return X && a(
|
|
226
226
|
F,
|
|
227
227
|
typeof g == "function" ? g.displayName || g.name || "Unknown" : g
|
|
228
228
|
), u(
|
|
229
229
|
g,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
X,
|
|
231
|
+
nt,
|
|
232
|
+
it,
|
|
233
233
|
i(),
|
|
234
234
|
F,
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
kt,
|
|
236
|
+
jt
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
239
|
function h(g) {
|
|
240
240
|
typeof g == "object" && g !== null && g.$$typeof === p && g._store && (g._store.validated = 1);
|
|
241
241
|
}
|
|
242
|
-
var f = ua, p = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), y = Symbol.for("react.fragment"),
|
|
242
|
+
var f = ua, p = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), v = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), N = Symbol.for("react.client.reference"), B = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, R = Array.isArray, G = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
245
|
f = {
|
|
@@ -247,56 +247,56 @@ React keys must be passed directly to JSX without using spread:
|
|
|
247
247
|
return g();
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
var
|
|
250
|
+
var D, O = {}, z = f["react-stack-bottom-frame"].bind(
|
|
251
251
|
f,
|
|
252
252
|
r
|
|
253
|
-
)(),
|
|
254
|
-
ne.Fragment = y, ne.jsx = function(g,
|
|
255
|
-
var
|
|
253
|
+
)(), Y = G(s(r)), lt = {};
|
|
254
|
+
ne.Fragment = y, ne.jsx = function(g, E, F, V, it) {
|
|
255
|
+
var nt = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
256
256
|
return d(
|
|
257
257
|
g,
|
|
258
|
-
|
|
258
|
+
E,
|
|
259
259
|
F,
|
|
260
260
|
!1,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
261
|
+
V,
|
|
262
|
+
it,
|
|
263
|
+
nt ? Error("react-stack-top-frame") : z,
|
|
264
|
+
nt ? G(s(g)) : Y
|
|
265
265
|
);
|
|
266
|
-
}, ne.jsxs = function(g,
|
|
267
|
-
var
|
|
266
|
+
}, ne.jsxs = function(g, E, F, V, it) {
|
|
267
|
+
var nt = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
268
268
|
return d(
|
|
269
269
|
g,
|
|
270
|
-
|
|
270
|
+
E,
|
|
271
271
|
F,
|
|
272
272
|
!0,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
V,
|
|
274
|
+
it,
|
|
275
|
+
nt ? Error("react-stack-top-frame") : z,
|
|
276
|
+
nt ? G(s(g)) : Y
|
|
277
277
|
);
|
|
278
278
|
};
|
|
279
279
|
}()), ne;
|
|
280
280
|
}
|
|
281
281
|
var Ls;
|
|
282
282
|
function va() {
|
|
283
|
-
return Ls || (Ls = 1, process.env.NODE_ENV === "production" ?
|
|
283
|
+
return Ls || (Ls = 1, process.env.NODE_ENV === "production" ? we.exports = ya() : we.exports = xa()), we.exports;
|
|
284
284
|
}
|
|
285
285
|
var l = va();
|
|
286
286
|
const Hi = wt(void 0), Zi = () => {
|
|
287
|
-
const t =
|
|
287
|
+
const t = tt(Hi);
|
|
288
288
|
if (t === void 0)
|
|
289
289
|
throw new Error("useAccordionContext는 AccordionProvider 내에서 사용되어야 합니다.");
|
|
290
290
|
return t;
|
|
291
|
-
},
|
|
291
|
+
}, Mt = (t, e) => {
|
|
292
292
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e?.());
|
|
293
293
|
}, Gi = (t) => {
|
|
294
|
-
const { children: e, onClick: n, onKeyDown: s, ...i } = t, { isOpen: r, setIsOpen: o, summaryId: a } = Zi(), c =
|
|
294
|
+
const { children: e, onClick: n, onKeyDown: s, ...i } = t, { isOpen: r, setIsOpen: o, summaryId: a } = Zi(), c = S(() => {
|
|
295
295
|
o((h) => !h);
|
|
296
|
-
}, []), u =
|
|
296
|
+
}, []), u = S((h) => {
|
|
297
297
|
h.preventDefault(), n?.(h), c();
|
|
298
|
-
}, [n]), d =
|
|
299
|
-
s?.(h),
|
|
298
|
+
}, [n]), d = S((h) => {
|
|
299
|
+
s?.(h), Mt(h, c);
|
|
300
300
|
}, [s]);
|
|
301
301
|
return /* @__PURE__ */ l.jsx(
|
|
302
302
|
"summary",
|
|
@@ -310,21 +310,21 @@ const Hi = wt(void 0), Zi = () => {
|
|
|
310
310
|
children: typeof e == "function" ? e({ isOpen: r }) : e
|
|
311
311
|
}
|
|
312
312
|
);
|
|
313
|
-
}, Pn =
|
|
313
|
+
}, Pn = I(Gi);
|
|
314
314
|
Pn.displayName = "Accordion.Summary";
|
|
315
315
|
Gi.displayName = "Accordion.Summary";
|
|
316
316
|
const Yi = (t) => {
|
|
317
|
-
const { children: e, style: n, ...s } = t, { isOpen: i, summaryId: r } = Zi(), o =
|
|
317
|
+
const { children: e, style: n, ...s } = t, { isOpen: i, summaryId: r } = Zi(), o = J(null), [a, c] = at("auto"), u = b(() => ({
|
|
318
318
|
...n,
|
|
319
319
|
overflow: "hidden",
|
|
320
320
|
maxHeight: i ? a : 0
|
|
321
|
-
}), [n, i, a]), d =
|
|
321
|
+
}), [n, i, a]), d = S(() => {
|
|
322
322
|
const h = o.current;
|
|
323
323
|
h && c(h.scrollHeight);
|
|
324
324
|
}, []);
|
|
325
|
-
return
|
|
325
|
+
return Tt(() => {
|
|
326
326
|
d();
|
|
327
|
-
}, []),
|
|
327
|
+
}, []), Tt(() => {
|
|
328
328
|
if (!i) return;
|
|
329
329
|
const h = o.current;
|
|
330
330
|
if (!h) return;
|
|
@@ -341,13 +341,13 @@ const Yi = (t) => {
|
|
|
341
341
|
children: typeof e == "function" ? e({ isOpen: i }) : e
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
|
-
}, An =
|
|
344
|
+
}, An = I(Yi);
|
|
345
345
|
An.displayName = "Accordion.Content";
|
|
346
346
|
Yi.displayName = "Accordion.Content";
|
|
347
347
|
const Xi = (t) => {
|
|
348
|
-
const { defaultOpen: e, children: n, ...s } = t, [i, r] =
|
|
348
|
+
const { defaultOpen: e, children: n, ...s } = t, [i, r] = at(!!e), o = J(null), a = pa("accordion-"), c = b(() => ({ isOpen: i, setIsOpen: r, root: o, summaryId: a }), [i]), { SummaryElement: u, ContentElement: d } = b(() => {
|
|
349
349
|
let h = null, f = null;
|
|
350
|
-
return
|
|
350
|
+
return At.forEach(n, (p) => {
|
|
351
351
|
yt(p) && (p?.type === Pn && (h = p), p?.type === An && (f = p));
|
|
352
352
|
}), { SummaryElement: h, ContentElement: f };
|
|
353
353
|
}, [n]);
|
|
@@ -355,11 +355,11 @@ const Xi = (t) => {
|
|
|
355
355
|
u,
|
|
356
356
|
d
|
|
357
357
|
] }) });
|
|
358
|
-
},
|
|
358
|
+
}, $t = I(Xi);
|
|
359
359
|
Xi.displayName = "Accordion";
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
360
|
+
$t.displayName = "Accordion";
|
|
361
|
+
$t.Summary = Pn;
|
|
362
|
+
$t.Content = An;
|
|
363
363
|
const qi = Z((t, e) => {
|
|
364
364
|
const { type: n, label: s, disabled: i, children: r, tabIndex: o, ...a } = t;
|
|
365
365
|
if (s && r)
|
|
@@ -381,7 +381,7 @@ const qi = Z((t, e) => {
|
|
|
381
381
|
}
|
|
382
382
|
)
|
|
383
383
|
);
|
|
384
|
-
}), Ji =
|
|
384
|
+
}), Ji = I(qi);
|
|
385
385
|
qi.displayName = "Button";
|
|
386
386
|
Ji.displayName = "Button";
|
|
387
387
|
const Vn = Z(
|
|
@@ -389,7 +389,7 @@ const Vn = Z(
|
|
|
389
389
|
const i = t || "ul";
|
|
390
390
|
return /* @__PURE__ */ l.jsx(i, { ref: s, role: "menu", ...n, children: e });
|
|
391
391
|
}
|
|
392
|
-
), Ca =
|
|
392
|
+
), Ca = I(Vn);
|
|
393
393
|
Vn.displayName = "Menu";
|
|
394
394
|
Ca.displayName = "Menu";
|
|
395
395
|
const Qi = Z(
|
|
@@ -397,7 +397,7 @@ const Qi = Z(
|
|
|
397
397
|
const { as: n, children: s, disabled: i, tabIndex: r, ...o } = t, a = n || "li", c = b(() => i ? void 0 : r ?? 0, [i, r]);
|
|
398
398
|
return /* @__PURE__ */ l.jsx(a, { ref: e, as: n, role: "menuitem", "aria-disabled": i, tabIndex: c, ...o, children: s });
|
|
399
399
|
}
|
|
400
|
-
), to =
|
|
400
|
+
), to = I(Qi);
|
|
401
401
|
Qi.displayName = "MenuItem";
|
|
402
402
|
to.displayName = "MenuItem";
|
|
403
403
|
const eo = Z((t, e) => {
|
|
@@ -408,7 +408,7 @@ const eo = Z((t, e) => {
|
|
|
408
408
|
onChange: r,
|
|
409
409
|
children: o,
|
|
410
410
|
...a
|
|
411
|
-
} = t, c = b(() => s ? -1 : 0, [s]), u =
|
|
411
|
+
} = t, c = b(() => s ? -1 : 0, [s]), u = S((d) => {
|
|
412
412
|
i?.(d), r?.(!n);
|
|
413
413
|
}, [n, r, i]);
|
|
414
414
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -429,20 +429,20 @@ const eo = Z((t, e) => {
|
|
|
429
429
|
);
|
|
430
430
|
});
|
|
431
431
|
eo.displayName = "Switch";
|
|
432
|
-
const no =
|
|
432
|
+
const no = I(eo);
|
|
433
433
|
no.displayName = "Switch";
|
|
434
434
|
const so = Z((t, e) => {
|
|
435
435
|
const { label: n, disabled: s, ...i } = t, r = b(() => n || void 0, [n]);
|
|
436
436
|
return /* @__PURE__ */ l.jsx("input", { ref: e, ...i, disabled: s, "aria-label": r, "aria-disabled": s });
|
|
437
|
-
}), io =
|
|
437
|
+
}), io = I(so);
|
|
438
438
|
so.displayName = "TextField";
|
|
439
439
|
io.displayName = "TextField";
|
|
440
440
|
const Rn = wt({});
|
|
441
441
|
function Dn(t) {
|
|
442
|
-
const e =
|
|
442
|
+
const e = J(null);
|
|
443
443
|
return e.current === null && (e.current = t()), e.current;
|
|
444
444
|
}
|
|
445
|
-
const En = typeof window < "u", oo = En ? da :
|
|
445
|
+
const En = typeof window < "u", oo = En ? da : Tt, Ne = /* @__PURE__ */ wt(null);
|
|
446
446
|
function _n(t, e) {
|
|
447
447
|
t.indexOf(e) === -1 && t.push(e);
|
|
448
448
|
}
|
|
@@ -451,10 +451,10 @@ function Nn(t, e) {
|
|
|
451
451
|
n > -1 && t.splice(n, 1);
|
|
452
452
|
}
|
|
453
453
|
const xt = (t, e, n) => n > e ? e : n < t ? t : n;
|
|
454
|
-
let
|
|
454
|
+
let Xt = () => {
|
|
455
455
|
}, vt = () => {
|
|
456
456
|
};
|
|
457
|
-
process.env.NODE_ENV !== "production" && (
|
|
457
|
+
process.env.NODE_ENV !== "production" && (Xt = (t, e) => {
|
|
458
458
|
!t && typeof console < "u" && console.warn(e);
|
|
459
459
|
}, vt = (t, e) => {
|
|
460
460
|
if (!t)
|
|
@@ -470,7 +470,7 @@ function Bn(t) {
|
|
|
470
470
|
let e;
|
|
471
471
|
return () => (e === void 0 && (e = t()), e);
|
|
472
472
|
}
|
|
473
|
-
const
|
|
473
|
+
const dt = /* @__NO_SIDE_EFFECTS__ */ (t) => t, wa = (t, e) => (n) => e(t(n)), ge = (...t) => t.reduce(wa), ce = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
|
|
474
474
|
const s = e - t;
|
|
475
475
|
return s === 0 ? 1 : (n - t) / s;
|
|
476
476
|
};
|
|
@@ -499,7 +499,7 @@ class In {
|
|
|
499
499
|
this.subscriptions.length = 0;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const ft = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, mt = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
|
|
503
503
|
function co(t, e) {
|
|
504
504
|
return e ? t * (1e3 / e) : 0;
|
|
505
505
|
}
|
|
@@ -517,12 +517,12 @@ function ba(t, e, n, s, i) {
|
|
|
517
517
|
}
|
|
518
518
|
function ye(t, e, n, s) {
|
|
519
519
|
if (t === e && n === s)
|
|
520
|
-
return
|
|
520
|
+
return dt;
|
|
521
521
|
const i = (r) => ba(r, 0, 1, t, n);
|
|
522
522
|
return (r) => r === 0 || r === 1 ? r : uo(i(r), e, s);
|
|
523
523
|
}
|
|
524
524
|
const ho = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, fo = (t) => (e) => 1 - t(1 - e), po = /* @__PURE__ */ ye(0.33, 1.53, 0.69, 0.99), Fn = /* @__PURE__ */ fo(po), mo = /* @__PURE__ */ ho(Fn), go = (t) => (t *= 2) < 1 ? 0.5 * Fn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), zn = (t) => 1 - Math.sin(Math.acos(t)), yo = fo(zn), xo = ho(zn), La = /* @__PURE__ */ ye(0.42, 0, 1, 1), Ta = /* @__PURE__ */ ye(0, 0, 0.58, 1), vo = /* @__PURE__ */ ye(0.42, 0, 0.58, 1), Ma = (t) => Array.isArray(t) && typeof t[0] != "number", Co = (t) => Array.isArray(t) && typeof t[0] == "number", Ms = {
|
|
525
|
-
linear:
|
|
525
|
+
linear: dt,
|
|
526
526
|
easeIn: La,
|
|
527
527
|
easeInOut: vo,
|
|
528
528
|
easeOut: Ta,
|
|
@@ -541,7 +541,7 @@ const ho = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, fo
|
|
|
541
541
|
} else if (Sa(t))
|
|
542
542
|
return vt(Ms[t] !== void 0, `Invalid easing type '${t}'`), Ms[t];
|
|
543
543
|
return t;
|
|
544
|
-
},
|
|
544
|
+
}, ke = [
|
|
545
545
|
"setup",
|
|
546
546
|
// Compute
|
|
547
547
|
"read",
|
|
@@ -606,39 +606,39 @@ function wo(t, e) {
|
|
|
606
606
|
delta: 0,
|
|
607
607
|
timestamp: 0,
|
|
608
608
|
isProcessing: !1
|
|
609
|
-
}, r = () => n = !0, o =
|
|
610
|
-
const
|
|
611
|
-
n = !1, Ct.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(
|
|
612
|
-
},
|
|
609
|
+
}, r = () => n = !0, o = ke.reduce((v, T) => (v[T] = Pa(r, e ? T : void 0), v), {}), { setup: a, read: c, resolveKeyframes: u, preUpdate: d, update: h, preRender: f, render: p, postRender: m } = o, y = () => {
|
|
610
|
+
const v = Ct.useManualTiming ? i.timestamp : performance.now();
|
|
611
|
+
n = !1, Ct.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(v - i.timestamp, Aa), 1)), i.timestamp = v, i.isProcessing = !0, a.process(i), c.process(i), u.process(i), d.process(i), h.process(i), f.process(i), p.process(i), m.process(i), i.isProcessing = !1, n && e && (s = !1, t(y));
|
|
612
|
+
}, w = () => {
|
|
613
613
|
n = !0, s = !0, i.isProcessing || t(y);
|
|
614
614
|
};
|
|
615
|
-
return { schedule:
|
|
616
|
-
const
|
|
617
|
-
return
|
|
618
|
-
}, {}), cancel: (
|
|
619
|
-
for (let T = 0; T <
|
|
620
|
-
o[
|
|
615
|
+
return { schedule: ke.reduce((v, T) => {
|
|
616
|
+
const k = o[T];
|
|
617
|
+
return v[T] = (L, M = !1, j = !1) => (n || w(), k.schedule(L, M, j)), v;
|
|
618
|
+
}, {}), cancel: (v) => {
|
|
619
|
+
for (let T = 0; T < ke.length; T++)
|
|
620
|
+
o[ke[T]].cancel(v);
|
|
621
621
|
}, state: i, steps: o };
|
|
622
622
|
}
|
|
623
|
-
const { schedule: W, cancel:
|
|
624
|
-
let
|
|
623
|
+
const { schedule: W, cancel: St, state: et, steps: Ue } = /* @__PURE__ */ wo(typeof requestAnimationFrame < "u" ? requestAnimationFrame : dt, !0);
|
|
624
|
+
let Te;
|
|
625
625
|
function Va() {
|
|
626
|
-
|
|
626
|
+
Te = void 0;
|
|
627
627
|
}
|
|
628
|
-
const
|
|
629
|
-
now: () => (
|
|
628
|
+
const rt = {
|
|
629
|
+
now: () => (Te === void 0 && rt.set(et.isProcessing || Ct.useManualTiming ? et.timestamp : performance.now()), Te),
|
|
630
630
|
set: (t) => {
|
|
631
|
-
|
|
631
|
+
Te = t, queueMicrotask(Va);
|
|
632
632
|
}
|
|
633
|
-
}, ko = (t) => (e) => typeof e == "string" && e.startsWith(t), Kn = /* @__PURE__ */ ko("--"), Ra = /* @__PURE__ */ ko("var(--"), Wn = (t) => Ra(t) ? Da.test(t.split("/*")[0].trim()) : !1, Da = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,
|
|
633
|
+
}, ko = (t) => (e) => typeof e == "string" && e.startsWith(t), Kn = /* @__PURE__ */ ko("--"), Ra = /* @__PURE__ */ ko("var(--"), Wn = (t) => Ra(t) ? Da.test(t.split("/*")[0].trim()) : !1, Da = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, qt = {
|
|
634
634
|
test: (t) => typeof t == "number",
|
|
635
635
|
parse: parseFloat,
|
|
636
636
|
transform: (t) => t
|
|
637
637
|
}, ue = {
|
|
638
|
-
...
|
|
638
|
+
...qt,
|
|
639
639
|
transform: (t) => xt(0, 1, t)
|
|
640
|
-
},
|
|
641
|
-
...
|
|
640
|
+
}, je = {
|
|
641
|
+
...qt,
|
|
642
642
|
default: 1
|
|
643
643
|
}, oe = (t) => Math.round(t * 1e5) / 1e5, $n = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
644
644
|
function Ea(t) {
|
|
@@ -655,9 +655,9 @@ const _a = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
655
655
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
656
656
|
};
|
|
657
657
|
}, Na = (t) => xt(0, 255, t), He = {
|
|
658
|
-
...
|
|
658
|
+
...qt,
|
|
659
659
|
transform: (t) => Math.round(Na(t))
|
|
660
|
-
},
|
|
660
|
+
}, Et = {
|
|
661
661
|
test: /* @__PURE__ */ Un("rgb", "red"),
|
|
662
662
|
parse: /* @__PURE__ */ jo("red", "green", "blue"),
|
|
663
663
|
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + He.transform(t) + ", " + He.transform(e) + ", " + He.transform(n) + ", " + oe(ue.transform(s)) + ")"
|
|
@@ -674,26 +674,26 @@ function Ba(t) {
|
|
|
674
674
|
const on = {
|
|
675
675
|
test: /* @__PURE__ */ Un("#"),
|
|
676
676
|
parse: Ba,
|
|
677
|
-
transform:
|
|
677
|
+
transform: Et.transform
|
|
678
678
|
}, xe = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
679
679
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
680
680
|
parse: parseFloat,
|
|
681
681
|
transform: (e) => `${e}${t}`
|
|
682
|
-
}),
|
|
682
|
+
}), Lt = /* @__PURE__ */ xe("deg"), gt = /* @__PURE__ */ xe("%"), A = /* @__PURE__ */ xe("px"), Ia = /* @__PURE__ */ xe("vh"), Oa = /* @__PURE__ */ xe("vw"), As = {
|
|
683
683
|
...gt,
|
|
684
684
|
parse: (t) => gt.parse(t) / 100,
|
|
685
685
|
transform: (t) => gt.transform(t * 100)
|
|
686
|
-
},
|
|
686
|
+
}, It = {
|
|
687
687
|
test: /* @__PURE__ */ Un("hsl", "hue"),
|
|
688
688
|
parse: /* @__PURE__ */ jo("hue", "saturation", "lightness"),
|
|
689
689
|
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + gt.transform(oe(e)) + ", " + gt.transform(oe(n)) + ", " + oe(ue.transform(s)) + ")"
|
|
690
|
-
},
|
|
691
|
-
test: (t) =>
|
|
692
|
-
parse: (t) =>
|
|
693
|
-
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ?
|
|
690
|
+
}, Q = {
|
|
691
|
+
test: (t) => Et.test(t) || on.test(t) || It.test(t),
|
|
692
|
+
parse: (t) => Et.test(t) ? Et.parse(t) : It.test(t) ? It.parse(t) : on.parse(t),
|
|
693
|
+
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? Et.transform(t) : It.transform(t),
|
|
694
694
|
getAnimatableNone: (t) => {
|
|
695
|
-
const e =
|
|
696
|
-
return e.alpha = 0,
|
|
695
|
+
const e = Q.parse(t);
|
|
696
|
+
return e.alpha = 0, Q.transform(e);
|
|
697
697
|
}
|
|
698
698
|
}, Fa = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
699
699
|
function za(t) {
|
|
@@ -707,7 +707,7 @@ function de(t) {
|
|
|
707
707
|
var: []
|
|
708
708
|
}, i = [];
|
|
709
709
|
let r = 0;
|
|
710
|
-
const a = e.replace($a, (c) => (
|
|
710
|
+
const a = e.replace($a, (c) => (Q.test(c) ? (s.color.push(r), i.push(Lo), n.push(Q.parse(c))) : c.startsWith(Wa) ? (s.var.push(r), i.push(Ka), n.push(c)) : (s.number.push(r), i.push(bo), n.push(parseFloat(c))), ++r, Vs)).split(Vs);
|
|
711
711
|
return { values: n, split: a, indexes: s, types: i };
|
|
712
712
|
}
|
|
713
713
|
function To(t) {
|
|
@@ -720,17 +720,17 @@ function Mo(t) {
|
|
|
720
720
|
for (let o = 0; o < s; o++)
|
|
721
721
|
if (r += e[o], i[o] !== void 0) {
|
|
722
722
|
const a = n[o];
|
|
723
|
-
a === bo ? r += oe(i[o]) : a === Lo ? r +=
|
|
723
|
+
a === bo ? r += oe(i[o]) : a === Lo ? r += Q.transform(i[o]) : r += i[o];
|
|
724
724
|
}
|
|
725
725
|
return r;
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
|
-
const Ua = (t) => typeof t == "number" ? 0 :
|
|
728
|
+
const Ua = (t) => typeof t == "number" ? 0 : Q.test(t) ? Q.getAnimatableNone(t) : t;
|
|
729
729
|
function Ha(t) {
|
|
730
730
|
const e = To(t);
|
|
731
731
|
return Mo(t)(e.map(Ua));
|
|
732
732
|
}
|
|
733
|
-
const
|
|
733
|
+
const Pt = {
|
|
734
734
|
test: za,
|
|
735
735
|
parse: To,
|
|
736
736
|
createTransformer: Mo,
|
|
@@ -755,26 +755,26 @@ function Za({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
755
755
|
alpha: s
|
|
756
756
|
};
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function Ae(t, e) {
|
|
759
759
|
return (n) => n > 0 ? e : t;
|
|
760
760
|
}
|
|
761
761
|
const H = (t, e, n) => t + (e - t) * n, Ge = (t, e, n) => {
|
|
762
762
|
const s = t * t, i = n * (e * e - s) + s;
|
|
763
763
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
764
|
-
}, Ga = [on,
|
|
764
|
+
}, Ga = [on, Et, It], Ya = (t) => Ga.find((e) => e.test(t));
|
|
765
765
|
function Rs(t) {
|
|
766
766
|
const e = Ya(t);
|
|
767
|
-
if (
|
|
767
|
+
if (Xt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
768
768
|
return !1;
|
|
769
769
|
let n = e.parse(t);
|
|
770
|
-
return e ===
|
|
770
|
+
return e === It && (n = Za(n)), n;
|
|
771
771
|
}
|
|
772
772
|
const Ds = (t, e) => {
|
|
773
773
|
const n = Rs(t), s = Rs(e);
|
|
774
774
|
if (!n || !s)
|
|
775
|
-
return
|
|
775
|
+
return Ae(t, e);
|
|
776
776
|
const i = { ...n };
|
|
777
|
-
return (r) => (i.red = Ge(n.red, s.red, r), i.green = Ge(n.green, s.green, r), i.blue = Ge(n.blue, s.blue, r), i.alpha = H(n.alpha, s.alpha, r),
|
|
777
|
+
return (r) => (i.red = Ge(n.red, s.red, r), i.green = Ge(n.green, s.green, r), i.blue = Ge(n.blue, s.blue, r), i.alpha = H(n.alpha, s.alpha, r), Et.transform(i));
|
|
778
778
|
}, rn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
779
779
|
function Xa(t, e) {
|
|
780
780
|
return rn.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
@@ -783,7 +783,7 @@ function qa(t, e) {
|
|
|
783
783
|
return (n) => H(t, e, n);
|
|
784
784
|
}
|
|
785
785
|
function Hn(t) {
|
|
786
|
-
return typeof t == "number" ? qa : typeof t == "string" ? Wn(t) ?
|
|
786
|
+
return typeof t == "number" ? qa : typeof t == "string" ? Wn(t) ? Ae : Q.test(t) ? Ds : t1 : Array.isArray(t) ? So : typeof t == "object" ? Q.test(t) ? Ds : Ja : Ae;
|
|
787
787
|
}
|
|
788
788
|
function So(t, e) {
|
|
789
789
|
const n = [...t], s = n.length, i = t.map((r, o) => Hn(r)(r, e[o]));
|
|
@@ -812,8 +812,8 @@ function Qa(t, e) {
|
|
|
812
812
|
return n;
|
|
813
813
|
}
|
|
814
814
|
const t1 = (t, e) => {
|
|
815
|
-
const n =
|
|
816
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? rn.has(t) && !i.values.length || rn.has(e) && !s.values.length ? Xa(t, e) : ge(So(Qa(s, i), i.values), n) : (
|
|
815
|
+
const n = Pt.createTransformer(e), s = de(t), i = de(e);
|
|
816
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? rn.has(t) && !i.values.length || rn.has(e) && !s.values.length ? Xa(t, e) : ge(So(Qa(s, i), i.values), n) : (Xt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Ae(t, e));
|
|
817
817
|
};
|
|
818
818
|
function Po(t, e, n) {
|
|
819
819
|
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? H(t, e, n) : Hn(t)(t, e);
|
|
@@ -822,12 +822,12 @@ const e1 = (t) => {
|
|
|
822
822
|
const e = ({ timestamp: n }) => t(n);
|
|
823
823
|
return {
|
|
824
824
|
start: (n = !0) => W.update(e, n),
|
|
825
|
-
stop: () =>
|
|
825
|
+
stop: () => St(e),
|
|
826
826
|
/**
|
|
827
827
|
* If we're processing this frame we can use the
|
|
828
828
|
* framelocked timestamp to keep things in sync.
|
|
829
829
|
*/
|
|
830
|
-
now: () => et.isProcessing ? et.timestamp :
|
|
830
|
+
now: () => et.isProcessing ? et.timestamp : rt.now()
|
|
831
831
|
};
|
|
832
832
|
}, Ao = (t, e, n = 10) => {
|
|
833
833
|
let s = "";
|
|
@@ -835,17 +835,17 @@ const e1 = (t) => {
|
|
|
835
835
|
for (let r = 0; r < i; r++)
|
|
836
836
|
s += Math.round(t(r / (i - 1)) * 1e4) / 1e4 + ", ";
|
|
837
837
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
838
|
-
},
|
|
838
|
+
}, Ve = 2e4;
|
|
839
839
|
function Zn(t) {
|
|
840
840
|
let e = 0;
|
|
841
841
|
const n = 50;
|
|
842
842
|
let s = t.next(e);
|
|
843
|
-
for (; !s.done && e <
|
|
843
|
+
for (; !s.done && e < Ve; )
|
|
844
844
|
e += n, s = t.next(e);
|
|
845
|
-
return e >=
|
|
845
|
+
return e >= Ve ? 1 / 0 : e;
|
|
846
846
|
}
|
|
847
847
|
function n1(t, e = 100, n) {
|
|
848
|
-
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(Zn(s),
|
|
848
|
+
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(Zn(s), Ve);
|
|
849
849
|
return {
|
|
850
850
|
type: "keyframes",
|
|
851
851
|
ease: (r) => s.next(i * r).value / e,
|
|
@@ -888,7 +888,7 @@ const U = {
|
|
|
888
888
|
}, Ye = 1e-3;
|
|
889
889
|
function i1({ duration: t = U.duration, bounce: e = U.bounce, velocity: n = U.velocity, mass: s = U.mass }) {
|
|
890
890
|
let i, r;
|
|
891
|
-
|
|
891
|
+
Xt(t <= /* @__PURE__ */ ft(U.maxDuration), "Spring duration must be 10 seconds or less");
|
|
892
892
|
let o = 1 - e;
|
|
893
893
|
o = xt(U.minDamping, U.maxDamping, o), t = xt(U.minDuration, U.maxDuration, /* @__PURE__ */ mt(t)), o < 1 ? (i = (u) => {
|
|
894
894
|
const d = u * o, h = d * t, f = d - n, p = an(u, o), m = Math.exp(-h);
|
|
@@ -904,7 +904,7 @@ function i1({ duration: t = U.duration, bounce: e = U.bounce, velocity: n = U.ve
|
|
|
904
904
|
return d * h;
|
|
905
905
|
});
|
|
906
906
|
const a = 5 / t, c = r1(i, r, a);
|
|
907
|
-
if (t = /* @__PURE__ */
|
|
907
|
+
if (t = /* @__PURE__ */ ft(t), isNaN(c))
|
|
908
908
|
return {
|
|
909
909
|
stiffness: U.stiffness,
|
|
910
910
|
damping: U.damping,
|
|
@@ -961,7 +961,7 @@ function c1(t) {
|
|
|
961
961
|
}
|
|
962
962
|
return e;
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function Re(t = U.visualDuration, e = U.bounce) {
|
|
965
965
|
const n = typeof t != "object" ? {
|
|
966
966
|
visualDuration: t,
|
|
967
967
|
keyframes: [0, 1],
|
|
@@ -971,68 +971,68 @@ function Ve(t = U.visualDuration, e = U.bounce) {
|
|
|
971
971
|
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: c, damping: u, mass: d, duration: h, velocity: f, isResolvedFromDuration: p } = c1({
|
|
972
972
|
...n,
|
|
973
973
|
velocity: -/* @__PURE__ */ mt(n.velocity || 0)
|
|
974
|
-
}), m = f || 0, y = u / (2 * Math.sqrt(c * d)),
|
|
974
|
+
}), m = f || 0, y = u / (2 * Math.sqrt(c * d)), w = o - r, C = /* @__PURE__ */ mt(Math.sqrt(c / d)), x = Math.abs(w) < 5;
|
|
975
975
|
s || (s = x ? U.restSpeed.granular : U.restSpeed.default), i || (i = x ? U.restDelta.granular : U.restDelta.default);
|
|
976
|
-
let
|
|
976
|
+
let v;
|
|
977
977
|
if (y < 1) {
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
-
const
|
|
981
|
-
return o -
|
|
978
|
+
const k = an(C, y);
|
|
979
|
+
v = (L) => {
|
|
980
|
+
const M = Math.exp(-y * C * L);
|
|
981
|
+
return o - M * ((m + y * C * w) / k * Math.sin(k * L) + w * Math.cos(k * L));
|
|
982
982
|
};
|
|
983
983
|
} else if (y === 1)
|
|
984
|
-
|
|
984
|
+
v = (k) => o - Math.exp(-C * k) * (w + (m + C * w) * k);
|
|
985
985
|
else {
|
|
986
|
-
const
|
|
987
|
-
|
|
988
|
-
const
|
|
989
|
-
return o -
|
|
986
|
+
const k = C * Math.sqrt(y * y - 1);
|
|
987
|
+
v = (L) => {
|
|
988
|
+
const M = Math.exp(-y * C * L), j = Math.min(k * L, 300);
|
|
989
|
+
return o - M * ((m + y * C * w) * Math.sinh(j) + k * w * Math.cosh(j)) / k;
|
|
990
990
|
};
|
|
991
991
|
}
|
|
992
992
|
const T = {
|
|
993
993
|
calculatedDuration: p && h || null,
|
|
994
|
-
next: (
|
|
995
|
-
const
|
|
994
|
+
next: (k) => {
|
|
995
|
+
const L = v(k);
|
|
996
996
|
if (p)
|
|
997
|
-
a.done =
|
|
997
|
+
a.done = k >= h;
|
|
998
998
|
else {
|
|
999
|
-
let
|
|
1000
|
-
y < 1 && (
|
|
1001
|
-
const
|
|
1002
|
-
a.done =
|
|
999
|
+
let M = k === 0 ? m : 0;
|
|
1000
|
+
y < 1 && (M = k === 0 ? /* @__PURE__ */ ft(m) : Vo(v, k, L));
|
|
1001
|
+
const j = Math.abs(M) <= s, _ = Math.abs(o - L) <= i;
|
|
1002
|
+
a.done = j && _;
|
|
1003
1003
|
}
|
|
1004
|
-
return a.value = a.done ? o :
|
|
1004
|
+
return a.value = a.done ? o : L, a;
|
|
1005
1005
|
},
|
|
1006
1006
|
toString: () => {
|
|
1007
|
-
const
|
|
1008
|
-
return
|
|
1007
|
+
const k = Math.min(Zn(T), Ve), L = Ao((M) => T.next(k * M).value, k, 30);
|
|
1008
|
+
return k + "ms " + L;
|
|
1009
1009
|
},
|
|
1010
1010
|
toTransition: () => {
|
|
1011
1011
|
}
|
|
1012
1012
|
};
|
|
1013
1013
|
return T;
|
|
1014
1014
|
}
|
|
1015
|
-
|
|
1016
|
-
const e = n1(t, 100,
|
|
1017
|
-
return t.ease = e.ease, t.duration = /* @__PURE__ */
|
|
1015
|
+
Re.applyToOptions = (t) => {
|
|
1016
|
+
const e = n1(t, 100, Re);
|
|
1017
|
+
return t.ease = e.ease, t.duration = /* @__PURE__ */ ft(e.duration), t.type = "keyframes", t;
|
|
1018
1018
|
};
|
|
1019
1019
|
function ln({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: c, restDelta: u = 0.5, restSpeed: d }) {
|
|
1020
1020
|
const h = t[0], f = {
|
|
1021
1021
|
done: !1,
|
|
1022
1022
|
value: h
|
|
1023
|
-
}, p = (
|
|
1023
|
+
}, p = (j) => a !== void 0 && j < a || c !== void 0 && j > c, m = (j) => a === void 0 ? c : c === void 0 || Math.abs(a - j) < Math.abs(c - j) ? a : c;
|
|
1024
1024
|
let y = n * e;
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
-
const x = (
|
|
1028
|
-
const
|
|
1029
|
-
f.done = Math.abs(
|
|
1025
|
+
const w = h + y, C = o === void 0 ? w : o(w);
|
|
1026
|
+
C !== w && (y = C - h);
|
|
1027
|
+
const x = (j) => -y * Math.exp(-j / s), v = (j) => C + x(j), T = (j) => {
|
|
1028
|
+
const _ = x(j), N = v(j);
|
|
1029
|
+
f.done = Math.abs(_) <= u, f.value = f.done ? C : N;
|
|
1030
1030
|
};
|
|
1031
|
-
let
|
|
1032
|
-
const
|
|
1033
|
-
p(f.value) && (
|
|
1031
|
+
let k, L;
|
|
1032
|
+
const M = (j) => {
|
|
1033
|
+
p(f.value) && (k = j, L = Re({
|
|
1034
1034
|
keyframes: [f.value, m(f.value)],
|
|
1035
|
-
velocity: Vo(
|
|
1035
|
+
velocity: Vo(v, j, f.value),
|
|
1036
1036
|
// TODO: This should be passing * 1000
|
|
1037
1037
|
damping: i,
|
|
1038
1038
|
stiffness: r,
|
|
@@ -1040,11 +1040,11 @@ function ln({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
1040
1040
|
restSpeed: d
|
|
1041
1041
|
}));
|
|
1042
1042
|
};
|
|
1043
|
-
return
|
|
1043
|
+
return M(0), {
|
|
1044
1044
|
calculatedDuration: null,
|
|
1045
|
-
next: (
|
|
1046
|
-
let
|
|
1047
|
-
return !
|
|
1045
|
+
next: (j) => {
|
|
1046
|
+
let _ = !1;
|
|
1047
|
+
return !L && k === void 0 && (_ = !0, T(j), M(j)), k !== void 0 && j >= k ? L.next(j - k) : (!_ && T(j), f);
|
|
1048
1048
|
}
|
|
1049
1049
|
};
|
|
1050
1050
|
}
|
|
@@ -1053,7 +1053,7 @@ function u1(t, e, n) {
|
|
|
1053
1053
|
for (let o = 0; o < r; o++) {
|
|
1054
1054
|
let a = i(t[o], t[o + 1]);
|
|
1055
1055
|
if (e) {
|
|
1056
|
-
const c = Array.isArray(e) ? e[o] ||
|
|
1056
|
+
const c = Array.isArray(e) ? e[o] || dt : e;
|
|
1057
1057
|
a = ge(c, a);
|
|
1058
1058
|
}
|
|
1059
1059
|
s.push(a);
|
|
@@ -1097,7 +1097,7 @@ function p1(t, e) {
|
|
|
1097
1097
|
function m1(t, e) {
|
|
1098
1098
|
return t.map(() => e || vo).splice(0, t.length - 1);
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Ot({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
1101
1101
|
const i = Ma(s) ? s.map(Ss) : Ss(s), r = {
|
|
1102
1102
|
done: !1,
|
|
1103
1103
|
value: e[0]
|
|
@@ -1122,9 +1122,9 @@ function Gn(t, { repeat: e, repeatType: n = "loop" }, s, i = 1) {
|
|
|
1122
1122
|
const y1 = {
|
|
1123
1123
|
decay: ln,
|
|
1124
1124
|
inertia: ln,
|
|
1125
|
-
tween:
|
|
1126
|
-
keyframes:
|
|
1127
|
-
spring:
|
|
1125
|
+
tween: Ot,
|
|
1126
|
+
keyframes: Ot,
|
|
1127
|
+
spring: Re
|
|
1128
1128
|
};
|
|
1129
1129
|
function Ro(t) {
|
|
1130
1130
|
typeof t.type == "string" && (t.type = y1[t.type]);
|
|
@@ -1158,16 +1158,16 @@ class Xn extends Yn {
|
|
|
1158
1158
|
constructor(e) {
|
|
1159
1159
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
1160
1160
|
const { motionValue: n } = this.options;
|
|
1161
|
-
n && n.updatedAt !==
|
|
1161
|
+
n && n.updatedAt !== rt.now() && this.tick(rt.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
|
|
1162
1162
|
}, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
|
|
1163
1163
|
}
|
|
1164
1164
|
initAnimation() {
|
|
1165
1165
|
const { options: e } = this;
|
|
1166
1166
|
Ro(e);
|
|
1167
|
-
const { type: n =
|
|
1167
|
+
const { type: n = Ot, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = e;
|
|
1168
1168
|
let { keyframes: a } = e;
|
|
1169
|
-
const c = n ||
|
|
1170
|
-
process.env.NODE_ENV !== "production" && c !==
|
|
1169
|
+
const c = n || Ot;
|
|
1170
|
+
process.env.NODE_ENV !== "production" && c !== Ot && vt(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`), c !== Ot && typeof a[0] != "number" && (this.mixKeyframes = ge(x1, Po(a[0], a[1])), a = [0, 100]);
|
|
1171
1171
|
const u = c({ ...e, keyframes: a });
|
|
1172
1172
|
r === "mirror" && (this.mirroredGenerator = c({
|
|
1173
1173
|
...e,
|
|
@@ -1185,22 +1185,22 @@ class Xn extends Yn {
|
|
|
1185
1185
|
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
|
|
1186
1186
|
if (this.startTime === null)
|
|
1187
1187
|
return s.next(0);
|
|
1188
|
-
const { delay: u = 0, keyframes: d, repeat: h, repeatType: f, repeatDelay: p, type: m, onUpdate: y, finalKeyframe:
|
|
1188
|
+
const { delay: u = 0, keyframes: d, repeat: h, repeatType: f, repeatDelay: p, type: m, onUpdate: y, finalKeyframe: w } = this.options;
|
|
1189
1189
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
|
|
1190
|
-
const
|
|
1191
|
-
this.currentTime = Math.max(
|
|
1192
|
-
let
|
|
1190
|
+
const C = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? C < 0 : C > i;
|
|
1191
|
+
this.currentTime = Math.max(C, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
1192
|
+
let v = this.currentTime, T = s;
|
|
1193
1193
|
if (h) {
|
|
1194
|
-
const
|
|
1195
|
-
let
|
|
1196
|
-
!N &&
|
|
1194
|
+
const j = Math.min(this.currentTime, i) / a;
|
|
1195
|
+
let _ = Math.floor(j), N = j % 1;
|
|
1196
|
+
!N && j >= 1 && (N = 1), N === 1 && _--, _ = Math.min(_, h + 1), !!(_ % 2) && (f === "reverse" ? (N = 1 - N, p && (N -= p / a)) : f === "mirror" && (T = o)), v = xt(0, 1, N) * a;
|
|
1197
1197
|
}
|
|
1198
|
-
const
|
|
1199
|
-
r && (
|
|
1200
|
-
let { done:
|
|
1201
|
-
!x && c !== null && (
|
|
1202
|
-
const
|
|
1203
|
-
return
|
|
1198
|
+
const k = x ? { done: !1, value: d[0] } : T.next(v);
|
|
1199
|
+
r && (k.value = r(k.value));
|
|
1200
|
+
let { done: L } = k;
|
|
1201
|
+
!x && c !== null && (L = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
1202
|
+
const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && L);
|
|
1203
|
+
return M && m !== ln && (k.value = Gn(d, this.options, w, this.speed)), y && y(k.value), M && this.finish(), k;
|
|
1204
1204
|
}
|
|
1205
1205
|
/**
|
|
1206
1206
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -1217,13 +1217,13 @@ class Xn extends Yn {
|
|
|
1217
1217
|
return /* @__PURE__ */ mt(this.currentTime);
|
|
1218
1218
|
}
|
|
1219
1219
|
set time(e) {
|
|
1220
|
-
e = /* @__PURE__ */
|
|
1220
|
+
e = /* @__PURE__ */ ft(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver?.start(!1);
|
|
1221
1221
|
}
|
|
1222
1222
|
get speed() {
|
|
1223
1223
|
return this.playbackSpeed;
|
|
1224
1224
|
}
|
|
1225
1225
|
set speed(e) {
|
|
1226
|
-
this.updateTime(
|
|
1226
|
+
this.updateTime(rt.now());
|
|
1227
1227
|
const n = this.playbackSpeed !== e;
|
|
1228
1228
|
this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ mt(this.currentTime));
|
|
1229
1229
|
}
|
|
@@ -1236,7 +1236,7 @@ class Xn extends Yn {
|
|
|
1236
1236
|
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
1237
1237
|
}
|
|
1238
1238
|
pause() {
|
|
1239
|
-
this.state = "paused", this.updateTime(
|
|
1239
|
+
this.state = "paused", this.updateTime(rt.now()), this.holdTime = this.currentTime;
|
|
1240
1240
|
}
|
|
1241
1241
|
complete() {
|
|
1242
1242
|
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
@@ -1264,8 +1264,8 @@ function v1(t) {
|
|
|
1264
1264
|
for (let e = 1; e < t.length; e++)
|
|
1265
1265
|
t[e] ?? (t[e] = t[e - 1]);
|
|
1266
1266
|
}
|
|
1267
|
-
const
|
|
1268
|
-
const e =
|
|
1267
|
+
const _t = (t) => t * 180 / Math.PI, cn = (t) => {
|
|
1268
|
+
const e = _t(Math.atan2(t[1], t[0]));
|
|
1269
1269
|
return un(e);
|
|
1270
1270
|
}, C1 = {
|
|
1271
1271
|
x: 4,
|
|
@@ -1277,8 +1277,8 @@ const Et = (t) => t * 180 / Math.PI, cn = (t) => {
|
|
|
1277
1277
|
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
1278
1278
|
rotate: cn,
|
|
1279
1279
|
rotateZ: cn,
|
|
1280
|
-
skewX: (t) =>
|
|
1281
|
-
skewY: (t) =>
|
|
1280
|
+
skewX: (t) => _t(Math.atan(t[1])),
|
|
1281
|
+
skewY: (t) => _t(Math.atan(t[2])),
|
|
1282
1282
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
1283
1283
|
}, un = (t) => (t = t % 360, t < 0 && (t += 360), t), _s = cn, Ns = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Bs = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), w1 = {
|
|
1284
1284
|
x: 12,
|
|
@@ -1290,12 +1290,12 @@ const Et = (t) => t * 180 / Math.PI, cn = (t) => {
|
|
|
1290
1290
|
scaleX: Ns,
|
|
1291
1291
|
scaleY: Bs,
|
|
1292
1292
|
scale: (t) => (Ns(t) + Bs(t)) / 2,
|
|
1293
|
-
rotateX: (t) => un(
|
|
1294
|
-
rotateY: (t) => un(
|
|
1293
|
+
rotateX: (t) => un(_t(Math.atan2(t[6], t[5]))),
|
|
1294
|
+
rotateY: (t) => un(_t(Math.atan2(-t[2], t[0]))),
|
|
1295
1295
|
rotateZ: _s,
|
|
1296
1296
|
rotate: _s,
|
|
1297
|
-
skewX: (t) =>
|
|
1298
|
-
skewY: (t) =>
|
|
1297
|
+
skewX: (t) => _t(Math.atan(t[4])),
|
|
1298
|
+
skewY: (t) => _t(Math.atan(t[1])),
|
|
1299
1299
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
1300
1300
|
};
|
|
1301
1301
|
function dn(t) {
|
|
@@ -1324,7 +1324,7 @@ const k1 = (t, e) => {
|
|
|
1324
1324
|
function j1(t) {
|
|
1325
1325
|
return parseFloat(t.trim());
|
|
1326
1326
|
}
|
|
1327
|
-
const
|
|
1327
|
+
const Jt = [
|
|
1328
1328
|
"transformPerspective",
|
|
1329
1329
|
"x",
|
|
1330
1330
|
"y",
|
|
@@ -1342,7 +1342,7 @@ const qt = [
|
|
|
1342
1342
|
"skew",
|
|
1343
1343
|
"skewX",
|
|
1344
1344
|
"skewY"
|
|
1345
|
-
],
|
|
1345
|
+
], Qt = new Set(Jt), Is = (t) => t === qt || t === A, b1 = /* @__PURE__ */ new Set(["x", "y", "z"]), L1 = Jt.filter((t) => !b1.has(t));
|
|
1346
1346
|
function T1(t) {
|
|
1347
1347
|
const e = [];
|
|
1348
1348
|
return L1.forEach((n) => {
|
|
@@ -1350,7 +1350,7 @@ function T1(t) {
|
|
|
1350
1350
|
s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
1351
1351
|
}), e;
|
|
1352
1352
|
}
|
|
1353
|
-
const
|
|
1353
|
+
const Nt = {
|
|
1354
1354
|
// Dimensions
|
|
1355
1355
|
width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
|
|
1356
1356
|
height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
|
|
@@ -1362,13 +1362,13 @@ const _t = {
|
|
|
1362
1362
|
x: (t, { transform: e }) => hn(e, "x"),
|
|
1363
1363
|
y: (t, { transform: e }) => hn(e, "y")
|
|
1364
1364
|
};
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
const
|
|
1365
|
+
Nt.translateX = Nt.x;
|
|
1366
|
+
Nt.translateY = Nt.y;
|
|
1367
|
+
const Bt = /* @__PURE__ */ new Set();
|
|
1368
1368
|
let fn = !1, pn = !1, mn = !1;
|
|
1369
1369
|
function Do() {
|
|
1370
1370
|
if (pn) {
|
|
1371
|
-
const t = Array.from(
|
|
1371
|
+
const t = Array.from(Bt).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
1372
1372
|
e.forEach((s) => {
|
|
1373
1373
|
const i = T1(s);
|
|
1374
1374
|
i.length && (n.set(s, i), s.render());
|
|
@@ -1382,10 +1382,10 @@ function Do() {
|
|
|
1382
1382
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
1383
1383
|
});
|
|
1384
1384
|
}
|
|
1385
|
-
pn = !1, fn = !1,
|
|
1385
|
+
pn = !1, fn = !1, Bt.forEach((t) => t.complete(mn)), Bt.clear();
|
|
1386
1386
|
}
|
|
1387
1387
|
function Eo() {
|
|
1388
|
-
|
|
1388
|
+
Bt.forEach((t) => {
|
|
1389
1389
|
t.readKeyframes(), t.needsMeasurement && (pn = !0);
|
|
1390
1390
|
});
|
|
1391
1391
|
}
|
|
@@ -1397,7 +1397,7 @@ class qn {
|
|
|
1397
1397
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
1398
1398
|
}
|
|
1399
1399
|
scheduleResolve() {
|
|
1400
|
-
this.state = "scheduled", this.isAsync ? (
|
|
1400
|
+
this.state = "scheduled", this.isAsync ? (Bt.add(this), fn || (fn = !0, W.read(Eo), W.resolveKeyframes(Do))) : (this.readKeyframes(), this.complete());
|
|
1401
1401
|
}
|
|
1402
1402
|
readKeyframes() {
|
|
1403
1403
|
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
@@ -1422,10 +1422,10 @@ class qn {
|
|
|
1422
1422
|
measureEndState() {
|
|
1423
1423
|
}
|
|
1424
1424
|
complete(e = !1) {
|
|
1425
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e),
|
|
1425
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), Bt.delete(this);
|
|
1426
1426
|
}
|
|
1427
1427
|
cancel() {
|
|
1428
|
-
this.state === "scheduled" && (
|
|
1428
|
+
this.state === "scheduled" && (Bt.delete(this), this.state = "pending");
|
|
1429
1429
|
}
|
|
1430
1430
|
resume() {
|
|
1431
1431
|
this.state === "pending" && this.scheduleResolve();
|
|
@@ -1545,7 +1545,7 @@ class _1 extends Yn {
|
|
|
1545
1545
|
return /* @__PURE__ */ mt(Number(this.animation.currentTime) || 0);
|
|
1546
1546
|
}
|
|
1547
1547
|
set time(e) {
|
|
1548
|
-
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
1548
|
+
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ ft(e);
|
|
1549
1549
|
}
|
|
1550
1550
|
/**
|
|
1551
1551
|
* The playback speed of the animation.
|
|
@@ -1570,7 +1570,7 @@ class _1 extends Yn {
|
|
|
1570
1570
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
1571
1571
|
*/
|
|
1572
1572
|
attachTimeline({ timeline: e, observe: n }) {
|
|
1573
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && A1() ? (this.animation.timeline = e,
|
|
1573
|
+
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && A1() ? (this.animation.timeline = e, dt) : n(this);
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
1576
|
const Io = {
|
|
@@ -1608,12 +1608,12 @@ class I1 extends _1 {
|
|
|
1608
1608
|
const a = new Xn({
|
|
1609
1609
|
...o,
|
|
1610
1610
|
autoplay: !1
|
|
1611
|
-
}), c = /* @__PURE__ */
|
|
1611
|
+
}), c = /* @__PURE__ */ ft(this.finishedTime ?? this.time);
|
|
1612
1612
|
n.setWithVelocity(a.sample(c - Fs).value, a.sample(c).value, Fs), a.stop();
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
1615
|
const zs = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
1616
|
-
(
|
|
1616
|
+
(Pt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
1617
1617
|
!t.startsWith("url("));
|
|
1618
1618
|
function O1(t) {
|
|
1619
1619
|
const e = t[0];
|
|
@@ -1630,7 +1630,7 @@ function F1(t, e, n, s) {
|
|
|
1630
1630
|
if (e === "display" || e === "visibility")
|
|
1631
1631
|
return !0;
|
|
1632
1632
|
const r = t[t.length - 1], o = zs(i, e), a = zs(r, e);
|
|
1633
|
-
return
|
|
1633
|
+
return Xt(o === a, `You are trying to animate ${e} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : O1(t) || (n === "spring" || Bo(n)) && s;
|
|
1634
1634
|
}
|
|
1635
1635
|
function Jn(t) {
|
|
1636
1636
|
return ao(t) && "offsetHeight" in t;
|
|
@@ -1659,7 +1659,7 @@ class U1 extends Yn {
|
|
|
1659
1659
|
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: c, motionValue: u, element: d, ...h }) {
|
|
1660
1660
|
super(), this.stop = () => {
|
|
1661
1661
|
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
1662
|
-
}, this.createdAt =
|
|
1662
|
+
}, this.createdAt = rt.now();
|
|
1663
1663
|
const f = {
|
|
1664
1664
|
autoplay: e,
|
|
1665
1665
|
delay: n,
|
|
@@ -1672,12 +1672,12 @@ class U1 extends Yn {
|
|
|
1672
1672
|
element: d,
|
|
1673
1673
|
...h
|
|
1674
1674
|
}, p = d?.KeyframeResolver || qn;
|
|
1675
|
-
this.keyframeResolver = new p(a, (m, y,
|
|
1675
|
+
this.keyframeResolver = new p(a, (m, y, w) => this.onKeyframesResolved(m, y, f, !w), c, u, d), this.keyframeResolver?.scheduleResolve();
|
|
1676
1676
|
}
|
|
1677
1677
|
onKeyframesResolved(e, n, s, i) {
|
|
1678
1678
|
this.keyframeResolver = void 0;
|
|
1679
1679
|
const { name: r, type: o, velocity: a, delay: c, isHandoff: u, onUpdate: d } = s;
|
|
1680
|
-
this.resolvedAt =
|
|
1680
|
+
this.resolvedAt = rt.now(), F1(e, r, o, a) || ((Ct.instantAnimations || !c) && d?.(Gn(e, s, n)), e[0] = e[e.length - 1], s.duration = 0, s.repeat = 0);
|
|
1681
1681
|
const f = {
|
|
1682
1682
|
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > $1 ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1683
1683
|
finalKeyframe: n,
|
|
@@ -1687,7 +1687,7 @@ class U1 extends Yn {
|
|
|
1687
1687
|
...f,
|
|
1688
1688
|
element: f.motionValue.owner.current
|
|
1689
1689
|
}) : new Xn(f);
|
|
1690
|
-
p.finished.then(() => this.notifyFinished()).catch(
|
|
1690
|
+
p.finished.then(() => this.notifyFinished()).catch(dt), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
|
|
1691
1691
|
}
|
|
1692
1692
|
get finished() {
|
|
1693
1693
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -1770,11 +1770,11 @@ const Fo = /* @__PURE__ */ new Set([
|
|
|
1770
1770
|
"left",
|
|
1771
1771
|
"right",
|
|
1772
1772
|
"bottom",
|
|
1773
|
-
...
|
|
1773
|
+
...Jt
|
|
1774
1774
|
]), Y1 = {
|
|
1775
1775
|
test: (t) => t === "auto",
|
|
1776
1776
|
parse: (t) => t
|
|
1777
|
-
}, zo = (t) => (e) => e.test(t), Ko = [
|
|
1777
|
+
}, zo = (t) => (e) => e.test(t), Ko = [qt, A, gt, Lt, Oa, Ia, Y1], Ks = (t) => Ko.find(zo(t));
|
|
1778
1778
|
function X1(t) {
|
|
1779
1779
|
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || lo(t) : !0;
|
|
1780
1780
|
}
|
|
@@ -1791,26 +1791,26 @@ function J1(t) {
|
|
|
1791
1791
|
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
1792
1792
|
}
|
|
1793
1793
|
const Q1 = /\b([a-z-]*)\(.*?\)/gu, gn = {
|
|
1794
|
-
...
|
|
1794
|
+
...Pt,
|
|
1795
1795
|
getAnimatableNone: (t) => {
|
|
1796
1796
|
const e = t.match(Q1);
|
|
1797
1797
|
return e ? e.map(J1).join(" ") : t;
|
|
1798
1798
|
}
|
|
1799
1799
|
}, Ws = {
|
|
1800
|
-
...
|
|
1800
|
+
...qt,
|
|
1801
1801
|
transform: Math.round
|
|
1802
1802
|
}, tl = {
|
|
1803
|
-
rotate:
|
|
1804
|
-
rotateX:
|
|
1805
|
-
rotateY:
|
|
1806
|
-
rotateZ:
|
|
1807
|
-
scale:
|
|
1808
|
-
scaleX:
|
|
1809
|
-
scaleY:
|
|
1810
|
-
scaleZ:
|
|
1811
|
-
skew:
|
|
1812
|
-
skewX:
|
|
1813
|
-
skewY:
|
|
1803
|
+
rotate: Lt,
|
|
1804
|
+
rotateX: Lt,
|
|
1805
|
+
rotateY: Lt,
|
|
1806
|
+
rotateZ: Lt,
|
|
1807
|
+
scale: je,
|
|
1808
|
+
scaleX: je,
|
|
1809
|
+
scaleY: je,
|
|
1810
|
+
scaleZ: je,
|
|
1811
|
+
skew: Lt,
|
|
1812
|
+
skewX: Lt,
|
|
1813
|
+
skewY: Lt,
|
|
1814
1814
|
distance: A,
|
|
1815
1815
|
translateX: A,
|
|
1816
1816
|
translateY: A,
|
|
@@ -1869,23 +1869,23 @@ const Q1 = /\b([a-z-]*)\(.*?\)/gu, gn = {
|
|
|
1869
1869
|
}, el = {
|
|
1870
1870
|
...ts,
|
|
1871
1871
|
// Color props
|
|
1872
|
-
color:
|
|
1873
|
-
backgroundColor:
|
|
1874
|
-
outlineColor:
|
|
1875
|
-
fill:
|
|
1876
|
-
stroke:
|
|
1872
|
+
color: Q,
|
|
1873
|
+
backgroundColor: Q,
|
|
1874
|
+
outlineColor: Q,
|
|
1875
|
+
fill: Q,
|
|
1876
|
+
stroke: Q,
|
|
1877
1877
|
// Border props
|
|
1878
|
-
borderColor:
|
|
1879
|
-
borderTopColor:
|
|
1880
|
-
borderRightColor:
|
|
1881
|
-
borderBottomColor:
|
|
1882
|
-
borderLeftColor:
|
|
1878
|
+
borderColor: Q,
|
|
1879
|
+
borderTopColor: Q,
|
|
1880
|
+
borderRightColor: Q,
|
|
1881
|
+
borderBottomColor: Q,
|
|
1882
|
+
borderLeftColor: Q,
|
|
1883
1883
|
filter: gn,
|
|
1884
1884
|
WebkitFilter: gn
|
|
1885
1885
|
}, Wo = (t) => el[t];
|
|
1886
1886
|
function $o(t, e) {
|
|
1887
1887
|
let n = Wo(t);
|
|
1888
|
-
return n !== gn && (n =
|
|
1888
|
+
return n !== gn && (n = Pt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
1889
1889
|
}
|
|
1890
1890
|
const nl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1891
1891
|
function sl(t, e, n) {
|
|
@@ -1923,7 +1923,7 @@ class il extends qn {
|
|
|
1923
1923
|
const u = e[c];
|
|
1924
1924
|
typeof u == "string" && (e[c] = parseFloat(u));
|
|
1925
1925
|
}
|
|
1926
|
-
else
|
|
1926
|
+
else Nt[s] && (this.needsMeasurement = !0);
|
|
1927
1927
|
}
|
|
1928
1928
|
resolveNoneKeyframes() {
|
|
1929
1929
|
const { unresolvedKeyframes: e, name: n } = this, s = [];
|
|
@@ -1935,7 +1935,7 @@ class il extends qn {
|
|
|
1935
1935
|
const { element: e, unresolvedKeyframes: n, name: s } = this;
|
|
1936
1936
|
if (!e || !e.current)
|
|
1937
1937
|
return;
|
|
1938
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin =
|
|
1938
|
+
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = Nt[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
|
|
1939
1939
|
const i = n[n.length - 1];
|
|
1940
1940
|
i !== void 0 && e.getValue(s, i).jump(i, !1);
|
|
1941
1941
|
}
|
|
@@ -1946,7 +1946,7 @@ class il extends qn {
|
|
|
1946
1946
|
const i = e.getValue(n);
|
|
1947
1947
|
i && i.jump(this.measuredOrigin, !1);
|
|
1948
1948
|
const r = s.length - 1, o = s[r];
|
|
1949
|
-
s[r] =
|
|
1949
|
+
s[r] = Nt[n](e.measureViewportBox(), window.getComputedStyle(e.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), this.removedTransforms?.length && this.removedTransforms.forEach(([a, c]) => {
|
|
1950
1950
|
e.getValue(a).set(c);
|
|
1951
1951
|
}), this.resolveNoneKeyframes();
|
|
1952
1952
|
}
|
|
@@ -1971,7 +1971,7 @@ class al {
|
|
|
1971
1971
|
*/
|
|
1972
1972
|
constructor(e, n = {}) {
|
|
1973
1973
|
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, i = !0) => {
|
|
1974
|
-
const r =
|
|
1974
|
+
const r = rt.now();
|
|
1975
1975
|
if (this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
|
|
1976
1976
|
for (const o of this.dependents)
|
|
1977
1977
|
o.dirty();
|
|
@@ -1979,7 +1979,7 @@ class al {
|
|
|
1979
1979
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
1980
1980
|
}
|
|
1981
1981
|
setCurrent(e) {
|
|
1982
|
-
this.current = e, this.updatedAt =
|
|
1982
|
+
this.current = e, this.updatedAt = rt.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = rl(this.current));
|
|
1983
1983
|
}
|
|
1984
1984
|
setPrevFrameValue(e = this.current) {
|
|
1985
1985
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -2107,7 +2107,7 @@ class al {
|
|
|
2107
2107
|
* @public
|
|
2108
2108
|
*/
|
|
2109
2109
|
getVelocity() {
|
|
2110
|
-
const e =
|
|
2110
|
+
const e = rt.now();
|
|
2111
2111
|
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > $s)
|
|
2112
2112
|
return 0;
|
|
2113
2113
|
const n = Math.min(this.updatedAt - this.prevUpdatedAt, $s);
|
|
@@ -2162,21 +2162,21 @@ class al {
|
|
|
2162
2162
|
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
|
-
function
|
|
2165
|
+
function Zt(t, e) {
|
|
2166
2166
|
return new al(t, e);
|
|
2167
2167
|
}
|
|
2168
|
-
const { schedule: es } = /* @__PURE__ */ wo(queueMicrotask, !1),
|
|
2168
|
+
const { schedule: es } = /* @__PURE__ */ wo(queueMicrotask, !1), ht = {
|
|
2169
2169
|
x: !1,
|
|
2170
2170
|
y: !1
|
|
2171
2171
|
};
|
|
2172
2172
|
function Ho() {
|
|
2173
|
-
return
|
|
2173
|
+
return ht.x || ht.y;
|
|
2174
2174
|
}
|
|
2175
2175
|
function ll(t) {
|
|
2176
|
-
return t === "x" || t === "y" ?
|
|
2177
|
-
|
|
2178
|
-
}) :
|
|
2179
|
-
|
|
2176
|
+
return t === "x" || t === "y" ? ht[t] ? null : (ht[t] = !0, () => {
|
|
2177
|
+
ht[t] = !1;
|
|
2178
|
+
}) : ht.x || ht.y ? null : (ht.x = ht.y = !0, () => {
|
|
2179
|
+
ht.x = ht.y = !1;
|
|
2180
2180
|
});
|
|
2181
2181
|
}
|
|
2182
2182
|
function Zo(t, e) {
|
|
@@ -2216,7 +2216,7 @@ const Go = (t, e) => e ? t === e ? !0 : Go(t, e.parentElement) : !1, ns = (t) =>
|
|
|
2216
2216
|
function dl(t) {
|
|
2217
2217
|
return ul.has(t.tagName) || t.tabIndex !== -1;
|
|
2218
2218
|
}
|
|
2219
|
-
const
|
|
2219
|
+
const Me = /* @__PURE__ */ new WeakSet();
|
|
2220
2220
|
function Hs(t) {
|
|
2221
2221
|
return (e) => {
|
|
2222
2222
|
e.key === "Enter" && t(e);
|
|
@@ -2230,7 +2230,7 @@ const hl = (t, e) => {
|
|
|
2230
2230
|
if (!n)
|
|
2231
2231
|
return;
|
|
2232
2232
|
const s = Hs(() => {
|
|
2233
|
-
if (
|
|
2233
|
+
if (Me.has(n))
|
|
2234
2234
|
return;
|
|
2235
2235
|
Xe(n, "down");
|
|
2236
2236
|
const i = Hs(() => {
|
|
@@ -2248,9 +2248,9 @@ function fl(t, e, n = {}) {
|
|
|
2248
2248
|
const c = a.currentTarget;
|
|
2249
2249
|
if (!Zs(a))
|
|
2250
2250
|
return;
|
|
2251
|
-
|
|
2251
|
+
Me.add(c);
|
|
2252
2252
|
const u = e(c, a), d = (p, m) => {
|
|
2253
|
-
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f),
|
|
2253
|
+
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), Me.has(c) && Me.delete(c), Zs(p) && typeof u == "function" && u(p, { success: m });
|
|
2254
2254
|
}, h = (p) => {
|
|
2255
2255
|
d(p, c === window || c === document || n.useGlobalTarget || Go(c, p.target));
|
|
2256
2256
|
}, f = (p) => {
|
|
@@ -2268,7 +2268,7 @@ function Yo(t) {
|
|
|
2268
2268
|
function pl(t) {
|
|
2269
2269
|
return Yo(t) && t.tagName === "svg";
|
|
2270
2270
|
}
|
|
2271
|
-
const
|
|
2271
|
+
const st = (t) => !!(t && t.getVelocity), ml = [...Ko, Q, Pt], gl = (t) => ml.find(zo(t)), ss = wt({
|
|
2272
2272
|
transformPagePoint: (t) => t,
|
|
2273
2273
|
isStatic: !1,
|
|
2274
2274
|
reducedMotion: "never"
|
|
@@ -2292,13 +2292,13 @@ class yl extends Ln.Component {
|
|
|
2292
2292
|
}
|
|
2293
2293
|
}
|
|
2294
2294
|
function xl({ children: t, isPresent: e, anchorX: n, root: s }) {
|
|
2295
|
-
const i =
|
|
2295
|
+
const i = Yt(), r = J(null), o = J({
|
|
2296
2296
|
width: 0,
|
|
2297
2297
|
height: 0,
|
|
2298
2298
|
top: 0,
|
|
2299
2299
|
left: 0,
|
|
2300
2300
|
right: 0
|
|
2301
|
-
}), { nonce: a } =
|
|
2301
|
+
}), { nonce: a } = tt(ss);
|
|
2302
2302
|
return Wi(() => {
|
|
2303
2303
|
const { width: c, height: u, top: d, left: h, right: f } = o.current;
|
|
2304
2304
|
if (e || !r.current || !c || !u)
|
|
@@ -2322,7 +2322,7 @@ function xl({ children: t, isPresent: e, anchorX: n, root: s }) {
|
|
|
2322
2322
|
}, [e]), l.jsx(yl, { isPresent: e, childRef: r, sizeRef: o, children: Ln.cloneElement(t, { ref: r }) });
|
|
2323
2323
|
}
|
|
2324
2324
|
const vl = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: r, mode: o, anchorX: a, root: c }) => {
|
|
2325
|
-
const u = Dn(Cl), d =
|
|
2325
|
+
const u = Dn(Cl), d = Yt();
|
|
2326
2326
|
let h = !0, f = b(() => (h = !1, {
|
|
2327
2327
|
id: d,
|
|
2328
2328
|
initial: e,
|
|
@@ -2341,62 +2341,62 @@ const vl = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom:
|
|
|
2341
2341
|
u.forEach((p, m) => u.set(m, !1));
|
|
2342
2342
|
}, [n]), Ln.useEffect(() => {
|
|
2343
2343
|
!n && !u.size && s && s();
|
|
2344
|
-
}, [n]), o === "popLayout" && (t = l.jsx(xl, { isPresent: n, anchorX: a, root: c, children: t })), l.jsx(
|
|
2344
|
+
}, [n]), o === "popLayout" && (t = l.jsx(xl, { isPresent: n, anchorX: a, root: c, children: t })), l.jsx(Ne.Provider, { value: f, children: t });
|
|
2345
2345
|
};
|
|
2346
2346
|
function Cl() {
|
|
2347
2347
|
return /* @__PURE__ */ new Map();
|
|
2348
2348
|
}
|
|
2349
2349
|
function Xo(t = !0) {
|
|
2350
|
-
const e =
|
|
2350
|
+
const e = tt(Ne);
|
|
2351
2351
|
if (e === null)
|
|
2352
2352
|
return [!0, null];
|
|
2353
|
-
const { isPresent: n, onExitComplete: s, register: i } = e, r =
|
|
2354
|
-
|
|
2353
|
+
const { isPresent: n, onExitComplete: s, register: i } = e, r = Yt();
|
|
2354
|
+
Tt(() => {
|
|
2355
2355
|
if (t)
|
|
2356
2356
|
return i(r);
|
|
2357
2357
|
}, [t]);
|
|
2358
|
-
const o =
|
|
2358
|
+
const o = S(() => t && s && s(r), [r, s, t]);
|
|
2359
2359
|
return !n && s ? [!1, o] : [!0];
|
|
2360
2360
|
}
|
|
2361
|
-
const
|
|
2361
|
+
const be = (t) => t.key || "";
|
|
2362
2362
|
function Gs(t) {
|
|
2363
2363
|
const e = [];
|
|
2364
|
-
return
|
|
2364
|
+
return At.forEach(t, (n) => {
|
|
2365
2365
|
yt(n) && e.push(n);
|
|
2366
2366
|
}), e;
|
|
2367
2367
|
}
|
|
2368
2368
|
const wl = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: r = "sync", propagate: o = !1, anchorX: a = "left", root: c }) => {
|
|
2369
|
-
const [u, d] = Xo(o), h = b(() => Gs(t), [t]), f = o && !u ? [] : h.map(
|
|
2369
|
+
const [u, d] = Xo(o), h = b(() => Gs(t), [t]), f = o && !u ? [] : h.map(be), p = J(!0), m = J(h), y = Dn(() => /* @__PURE__ */ new Map()), [w, C] = at(h), [x, v] = at(h);
|
|
2370
2370
|
oo(() => {
|
|
2371
2371
|
p.current = !1, m.current = h;
|
|
2372
|
-
for (let
|
|
2373
|
-
const
|
|
2374
|
-
f.includes(
|
|
2372
|
+
for (let L = 0; L < x.length; L++) {
|
|
2373
|
+
const M = be(x[L]);
|
|
2374
|
+
f.includes(M) ? y.delete(M) : y.get(M) !== !0 && y.set(M, !1);
|
|
2375
2375
|
}
|
|
2376
2376
|
}, [x, f.length, f.join("-")]);
|
|
2377
2377
|
const T = [];
|
|
2378
|
-
if (h !==
|
|
2379
|
-
let
|
|
2380
|
-
for (let
|
|
2381
|
-
const
|
|
2382
|
-
f.includes(
|
|
2378
|
+
if (h !== w) {
|
|
2379
|
+
let L = [...h];
|
|
2380
|
+
for (let M = 0; M < x.length; M++) {
|
|
2381
|
+
const j = x[M], _ = be(j);
|
|
2382
|
+
f.includes(_) || (L.splice(M, 0, j), T.push(j));
|
|
2383
2383
|
}
|
|
2384
|
-
return r === "wait" && T.length && (
|
|
2384
|
+
return r === "wait" && T.length && (L = T), v(Gs(L)), C(h), null;
|
|
2385
2385
|
}
|
|
2386
2386
|
process.env.NODE_ENV !== "production" && r === "wait" && x.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
2387
|
-
const { forceRender:
|
|
2388
|
-
return l.jsx(l.Fragment, { children: x.map((
|
|
2389
|
-
const
|
|
2390
|
-
if (y.has(
|
|
2391
|
-
y.set(
|
|
2387
|
+
const { forceRender: k } = tt(Rn);
|
|
2388
|
+
return l.jsx(l.Fragment, { children: x.map((L) => {
|
|
2389
|
+
const M = be(L), j = o && !u ? !1 : h === x || f.includes(M), _ = () => {
|
|
2390
|
+
if (y.has(M))
|
|
2391
|
+
y.set(M, !0);
|
|
2392
2392
|
else
|
|
2393
2393
|
return;
|
|
2394
2394
|
let N = !0;
|
|
2395
|
-
y.forEach((
|
|
2396
|
-
|
|
2397
|
-
}), N && (
|
|
2395
|
+
y.forEach((B) => {
|
|
2396
|
+
B || (N = !1);
|
|
2397
|
+
}), N && (k?.(), v(m.current), o && d?.(), s && s());
|
|
2398
2398
|
};
|
|
2399
|
-
return l.jsx(vl, { isPresent:
|
|
2399
|
+
return l.jsx(vl, { isPresent: j, initial: !p.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: r, root: c, onExitComplete: j ? void 0 : _, anchorX: a, children: L }, M);
|
|
2400
2400
|
}) });
|
|
2401
2401
|
}, qo = wt({ strict: !1 }), Ys = {
|
|
2402
2402
|
animation: [
|
|
@@ -2417,15 +2417,15 @@ const wl = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presen
|
|
|
2417
2417
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2418
2418
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2419
2419
|
layout: ["layout", "layoutId"]
|
|
2420
|
-
},
|
|
2420
|
+
}, Gt = {};
|
|
2421
2421
|
for (const t in Ys)
|
|
2422
|
-
|
|
2422
|
+
Gt[t] = {
|
|
2423
2423
|
isEnabled: (e) => Ys[t].some((n) => !!e[n])
|
|
2424
2424
|
};
|
|
2425
2425
|
function kl(t) {
|
|
2426
2426
|
for (const e in t)
|
|
2427
|
-
|
|
2428
|
-
...
|
|
2427
|
+
Gt[e] = {
|
|
2428
|
+
...Gt[e],
|
|
2429
2429
|
...t[e]
|
|
2430
2430
|
};
|
|
2431
2431
|
}
|
|
@@ -2461,12 +2461,12 @@ const jl = /* @__PURE__ */ new Set([
|
|
|
2461
2461
|
"ignoreStrict",
|
|
2462
2462
|
"viewport"
|
|
2463
2463
|
]);
|
|
2464
|
-
function
|
|
2464
|
+
function De(t) {
|
|
2465
2465
|
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || jl.has(t);
|
|
2466
2466
|
}
|
|
2467
|
-
let Jo = (t) => !
|
|
2467
|
+
let Jo = (t) => !De(t);
|
|
2468
2468
|
function bl(t) {
|
|
2469
|
-
typeof t == "function" && (Jo = (e) => e.startsWith("on") ? !
|
|
2469
|
+
typeof t == "function" && (Jo = (e) => e.startsWith("on") ? !De(e) : t(e));
|
|
2470
2470
|
}
|
|
2471
2471
|
try {
|
|
2472
2472
|
bl(require("@emotion/is-prop-valid").default);
|
|
@@ -2475,7 +2475,7 @@ try {
|
|
|
2475
2475
|
function Ll(t, e, n) {
|
|
2476
2476
|
const s = {};
|
|
2477
2477
|
for (const i in t)
|
|
2478
|
-
i === "values" && typeof t.values == "object" || (Jo(i) || n === !0 &&
|
|
2478
|
+
i === "values" && typeof t.values == "object" || (Jo(i) || n === !0 && De(i) || !e && !De(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
2479
2479
|
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
2480
2480
|
return s;
|
|
2481
2481
|
}
|
|
@@ -2492,8 +2492,8 @@ function Tl(t) {
|
|
|
2492
2492
|
get: (s, i) => i === "create" ? t : (e.has(i) || e.set(i, t(i)), e.get(i))
|
|
2493
2493
|
});
|
|
2494
2494
|
}
|
|
2495
|
-
const
|
|
2496
|
-
function
|
|
2495
|
+
const Be = /* @__PURE__ */ wt({});
|
|
2496
|
+
function Ie(t) {
|
|
2497
2497
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
2498
2498
|
}
|
|
2499
2499
|
function he(t) {
|
|
@@ -2508,14 +2508,14 @@ const is = [
|
|
|
2508
2508
|
"whileDrag",
|
|
2509
2509
|
"exit"
|
|
2510
2510
|
], os = ["initial", ...is];
|
|
2511
|
-
function
|
|
2512
|
-
return
|
|
2511
|
+
function Oe(t) {
|
|
2512
|
+
return Ie(t.animate) || os.some((e) => he(t[e]));
|
|
2513
2513
|
}
|
|
2514
2514
|
function Qo(t) {
|
|
2515
|
-
return !!(
|
|
2515
|
+
return !!(Oe(t) || t.variants);
|
|
2516
2516
|
}
|
|
2517
2517
|
function Ml(t, e) {
|
|
2518
|
-
if (
|
|
2518
|
+
if (Oe(t)) {
|
|
2519
2519
|
const { initial: n, animate: s } = t;
|
|
2520
2520
|
return {
|
|
2521
2521
|
initial: n === !1 || he(n) ? n : void 0,
|
|
@@ -2525,20 +2525,20 @@ function Ml(t, e) {
|
|
|
2525
2525
|
return t.inherit !== !1 ? e : {};
|
|
2526
2526
|
}
|
|
2527
2527
|
function Sl(t) {
|
|
2528
|
-
const { initial: e, animate: n } = Ml(t,
|
|
2528
|
+
const { initial: e, animate: n } = Ml(t, tt(Be));
|
|
2529
2529
|
return b(() => ({ initial: e, animate: n }), [Xs(e), Xs(n)]);
|
|
2530
2530
|
}
|
|
2531
2531
|
function Xs(t) {
|
|
2532
2532
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
2533
2533
|
}
|
|
2534
2534
|
const Pl = Symbol.for("motionComponentSymbol");
|
|
2535
|
-
function
|
|
2535
|
+
function Ft(t) {
|
|
2536
2536
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
2537
2537
|
}
|
|
2538
2538
|
function Al(t, e, n) {
|
|
2539
|
-
return
|
|
2539
|
+
return S(
|
|
2540
2540
|
(s) => {
|
|
2541
|
-
s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) :
|
|
2541
|
+
s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : Ft(n) && (n.current = s));
|
|
2542
2542
|
},
|
|
2543
2543
|
/**
|
|
2544
2544
|
* Only pass a new ref callback to React if we've received a visual element
|
|
@@ -2550,7 +2550,7 @@ function Al(t, e, n) {
|
|
|
2550
2550
|
}
|
|
2551
2551
|
const rs = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Vl = "framerAppearId", tr = "data-" + rs(Vl), er = wt({});
|
|
2552
2552
|
function Rl(t, e, n, s, i) {
|
|
2553
|
-
const { visualElement: r } =
|
|
2553
|
+
const { visualElement: r } = tt(Be), o = tt(qo), a = tt(Ne), c = tt(ss).reducedMotion, u = J(null);
|
|
2554
2554
|
s = s || o.renderer, !u.current && s && (u.current = s(t, {
|
|
2555
2555
|
visualState: e,
|
|
2556
2556
|
parent: r,
|
|
@@ -2559,16 +2559,16 @@ function Rl(t, e, n, s, i) {
|
|
|
2559
2559
|
blockInitialAnimation: a ? a.initial === !1 : !1,
|
|
2560
2560
|
reducedMotionConfig: c
|
|
2561
2561
|
}));
|
|
2562
|
-
const d = u.current, h =
|
|
2562
|
+
const d = u.current, h = tt(er);
|
|
2563
2563
|
d && !d.projection && i && (d.type === "html" || d.type === "svg") && Dl(u.current, n, i, h);
|
|
2564
|
-
const f =
|
|
2564
|
+
const f = J(!1);
|
|
2565
2565
|
Wi(() => {
|
|
2566
2566
|
d && f.current && d.update(n, a);
|
|
2567
2567
|
});
|
|
2568
|
-
const p = n[tr], m =
|
|
2568
|
+
const p = n[tr], m = J(!!p && !window.MotionHandoffIsComplete?.(p) && window.MotionHasOptimisedAnimation?.(p));
|
|
2569
2569
|
return oo(() => {
|
|
2570
2570
|
d && (f.current = !0, window.MotionIsMounted = !0, d.updateFeatures(), es.render(d.render), m.current && d.animationState && d.animationState.animateChanges());
|
|
2571
|
-
}),
|
|
2571
|
+
}), Tt(() => {
|
|
2572
2572
|
d && (!m.current && d.animationState && d.animationState.animateChanges(), m.current && (queueMicrotask(() => {
|
|
2573
2573
|
window.MotionHandoffMarkAsComplete?.(p);
|
|
2574
2574
|
}), m.current = !1));
|
|
@@ -2579,7 +2579,7 @@ function Dl(t, e, n, s) {
|
|
|
2579
2579
|
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : nr(t.parent)), t.projection.setOptions({
|
|
2580
2580
|
layoutId: i,
|
|
2581
2581
|
layout: r,
|
|
2582
|
-
alwaysMeasureLayout: !!o || a &&
|
|
2582
|
+
alwaysMeasureLayout: !!o || a && Ft(a),
|
|
2583
2583
|
visualElement: t,
|
|
2584
2584
|
/**
|
|
2585
2585
|
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
@@ -2604,7 +2604,7 @@ function El({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
2604
2604
|
function r(a, c) {
|
|
2605
2605
|
let u;
|
|
2606
2606
|
const d = {
|
|
2607
|
-
...
|
|
2607
|
+
...tt(ss),
|
|
2608
2608
|
...a,
|
|
2609
2609
|
layoutId: _l(a)
|
|
2610
2610
|
}, { isStatic: h } = d, f = Sl(a), p = s(a, h);
|
|
@@ -2613,25 +2613,25 @@ function El({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
2613
2613
|
const m = Bl(d);
|
|
2614
2614
|
u = m.MeasureLayout, f.visualElement = Rl(i, p, d, e, m.ProjectionNode);
|
|
2615
2615
|
}
|
|
2616
|
-
return l.jsxs(
|
|
2616
|
+
return l.jsxs(Be.Provider, { value: f, children: [u && f.visualElement ? l.jsx(u, { visualElement: f.visualElement, ...d }) : null, n(i, a, Al(p, f.visualElement, c), p, h, f.visualElement)] });
|
|
2617
2617
|
}
|
|
2618
2618
|
r.displayName = `motion.${typeof i == "string" ? i : `create(${i.displayName ?? i.name ?? ""})`}`;
|
|
2619
2619
|
const o = Z(r);
|
|
2620
2620
|
return o[Pl] = i, o;
|
|
2621
2621
|
}
|
|
2622
2622
|
function _l({ layoutId: t }) {
|
|
2623
|
-
const e =
|
|
2623
|
+
const e = tt(Rn).id;
|
|
2624
2624
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
2625
2625
|
}
|
|
2626
2626
|
function Nl(t, e) {
|
|
2627
|
-
const n =
|
|
2627
|
+
const n = tt(qo).strict;
|
|
2628
2628
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
2629
2629
|
const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
2630
|
-
t.ignoreStrict ?
|
|
2630
|
+
t.ignoreStrict ? Xt(!1, s) : vt(!1, s);
|
|
2631
2631
|
}
|
|
2632
2632
|
}
|
|
2633
2633
|
function Bl(t) {
|
|
2634
|
-
const { drag: e, layout: n } =
|
|
2634
|
+
const { drag: e, layout: n } = Gt;
|
|
2635
2635
|
if (!e && !n)
|
|
2636
2636
|
return {};
|
|
2637
2637
|
const s = { ...e, ...n };
|
|
@@ -2646,18 +2646,18 @@ function Il(t) {
|
|
|
2646
2646
|
fe[e] = t[e], Kn(e) && (fe[e].isCSSVariable = !0);
|
|
2647
2647
|
}
|
|
2648
2648
|
function sr(t, { layout: e, layoutId: n }) {
|
|
2649
|
-
return
|
|
2649
|
+
return Qt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!fe[t] || t === "opacity");
|
|
2650
2650
|
}
|
|
2651
2651
|
const Ol = {
|
|
2652
2652
|
x: "translateX",
|
|
2653
2653
|
y: "translateY",
|
|
2654
2654
|
z: "translateZ",
|
|
2655
2655
|
transformPerspective: "perspective"
|
|
2656
|
-
}, Fl =
|
|
2656
|
+
}, Fl = Jt.length;
|
|
2657
2657
|
function zl(t, e, n) {
|
|
2658
2658
|
let s = "", i = !0;
|
|
2659
2659
|
for (let r = 0; r < Fl; r++) {
|
|
2660
|
-
const o =
|
|
2660
|
+
const o = Jt[r], a = t[o];
|
|
2661
2661
|
if (a === void 0)
|
|
2662
2662
|
continue;
|
|
2663
2663
|
let c = !0;
|
|
@@ -2678,7 +2678,7 @@ function as(t, e, n) {
|
|
|
2678
2678
|
let o = !1, a = !1;
|
|
2679
2679
|
for (const c in e) {
|
|
2680
2680
|
const u = e[c];
|
|
2681
|
-
if (
|
|
2681
|
+
if (Qt.has(c)) {
|
|
2682
2682
|
o = !0;
|
|
2683
2683
|
continue;
|
|
2684
2684
|
} else if (Kn(c)) {
|
|
@@ -2702,7 +2702,7 @@ const ls = () => ({
|
|
|
2702
2702
|
});
|
|
2703
2703
|
function ir(t, e, n) {
|
|
2704
2704
|
for (const s in e)
|
|
2705
|
-
!
|
|
2705
|
+
!st(e[s]) && !sr(s, n) && (t[s] = e[s]);
|
|
2706
2706
|
}
|
|
2707
2707
|
function Kl({ transformTemplate: t }, e) {
|
|
2708
2708
|
return b(() => {
|
|
@@ -2817,7 +2817,7 @@ function cs(t) {
|
|
|
2817
2817
|
}
|
|
2818
2818
|
function Xl(t = !1) {
|
|
2819
2819
|
return (n, s, i, { latestValues: r }, o) => {
|
|
2820
|
-
const c = (cs(n) ? Gl : $l)(s, r, o, n), u = Ll(s, typeof n == "string", t), d = n !== $i ? { ...u, ...c, ref: i } : {}, { children: h } = s, f = b(() =>
|
|
2820
|
+
const c = (cs(n) ? Gl : $l)(s, r, o, n), u = Ll(s, typeof n == "string", t), d = n !== $i ? { ...u, ...c, ref: i } : {}, { children: h } = s, f = b(() => st(h) ? h.get() : h, [h]);
|
|
2821
2821
|
return ha(n, {
|
|
2822
2822
|
...d,
|
|
2823
2823
|
children: f
|
|
@@ -2841,8 +2841,8 @@ function us(t, e, n, s) {
|
|
|
2841
2841
|
}
|
|
2842
2842
|
return e;
|
|
2843
2843
|
}
|
|
2844
|
-
function
|
|
2845
|
-
return
|
|
2844
|
+
function Se(t) {
|
|
2845
|
+
return st(t) ? t.get() : t;
|
|
2846
2846
|
}
|
|
2847
2847
|
function ql({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
|
|
2848
2848
|
return {
|
|
@@ -2851,32 +2851,32 @@ function ql({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
|
|
|
2851
2851
|
};
|
|
2852
2852
|
}
|
|
2853
2853
|
const lr = (t) => (e, n) => {
|
|
2854
|
-
const s =
|
|
2854
|
+
const s = tt(Be), i = tt(Ne), r = () => ql(t, e, s, i);
|
|
2855
2855
|
return n ? r() : Dn(r);
|
|
2856
2856
|
};
|
|
2857
2857
|
function Jl(t, e, n, s) {
|
|
2858
2858
|
const i = {}, r = s(t, {});
|
|
2859
2859
|
for (const f in r)
|
|
2860
|
-
i[f] =
|
|
2860
|
+
i[f] = Se(r[f]);
|
|
2861
2861
|
let { initial: o, animate: a } = t;
|
|
2862
|
-
const c =
|
|
2862
|
+
const c = Oe(t), u = Qo(t);
|
|
2863
2863
|
e && u && !c && t.inherit !== !1 && (o === void 0 && (o = e.initial), a === void 0 && (a = e.animate));
|
|
2864
2864
|
let d = n ? n.initial === !1 : !1;
|
|
2865
2865
|
d = d || o === !1;
|
|
2866
2866
|
const h = d ? a : o;
|
|
2867
|
-
if (h && typeof h != "boolean" && !
|
|
2867
|
+
if (h && typeof h != "boolean" && !Ie(h)) {
|
|
2868
2868
|
const f = Array.isArray(h) ? h : [h];
|
|
2869
2869
|
for (let p = 0; p < f.length; p++) {
|
|
2870
2870
|
const m = us(t, f[p]);
|
|
2871
2871
|
if (m) {
|
|
2872
|
-
const { transitionEnd: y, transition:
|
|
2873
|
-
for (const x in
|
|
2874
|
-
let
|
|
2875
|
-
if (Array.isArray(
|
|
2876
|
-
const T = d ?
|
|
2877
|
-
|
|
2872
|
+
const { transitionEnd: y, transition: w, ...C } = m;
|
|
2873
|
+
for (const x in C) {
|
|
2874
|
+
let v = C[x];
|
|
2875
|
+
if (Array.isArray(v)) {
|
|
2876
|
+
const T = d ? v.length - 1 : 0;
|
|
2877
|
+
v = v[T];
|
|
2878
2878
|
}
|
|
2879
|
-
|
|
2879
|
+
v !== null && (i[x] = v);
|
|
2880
2880
|
}
|
|
2881
2881
|
for (const x in y)
|
|
2882
2882
|
i[x] = y[x];
|
|
@@ -2888,7 +2888,7 @@ function Jl(t, e, n, s) {
|
|
|
2888
2888
|
function ds(t, e, n) {
|
|
2889
2889
|
const { style: s } = t, i = {};
|
|
2890
2890
|
for (const r in s)
|
|
2891
|
-
(
|
|
2891
|
+
(st(s[r]) || e.style && st(e.style[r]) || sr(r, t) || n?.getValue(r)?.liveStyle !== void 0) && (i[r] = s[r]);
|
|
2892
2892
|
return i;
|
|
2893
2893
|
}
|
|
2894
2894
|
const Ql = {
|
|
@@ -2900,8 +2900,8 @@ const Ql = {
|
|
|
2900
2900
|
function cr(t, e, n) {
|
|
2901
2901
|
const s = ds(t, e, n);
|
|
2902
2902
|
for (const i in t)
|
|
2903
|
-
if (
|
|
2904
|
-
const r =
|
|
2903
|
+
if (st(t[i]) || st(e[i])) {
|
|
2904
|
+
const r = Jt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
2905
2905
|
s[r] = t[i];
|
|
2906
2906
|
}
|
|
2907
2907
|
return s;
|
|
@@ -2930,7 +2930,7 @@ function pe(t, e, n) {
|
|
|
2930
2930
|
}
|
|
2931
2931
|
const yn = (t) => Array.isArray(t);
|
|
2932
2932
|
function nc(t, e, n) {
|
|
2933
|
-
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e,
|
|
2933
|
+
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Zt(n));
|
|
2934
2934
|
}
|
|
2935
2935
|
function sc(t) {
|
|
2936
2936
|
return yn(t) ? t[t.length - 1] || 0 : t;
|
|
@@ -2945,7 +2945,7 @@ function ic(t, e) {
|
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
2947
|
function oc(t) {
|
|
2948
|
-
return !!(
|
|
2948
|
+
return !!(st(t) && t.add);
|
|
2949
2949
|
}
|
|
2950
2950
|
function xn(t, e) {
|
|
2951
2951
|
const n = t.getValue("willChange");
|
|
@@ -2981,14 +2981,14 @@ const lc = {
|
|
|
2981
2981
|
type: "keyframes",
|
|
2982
2982
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2983
2983
|
duration: 0.3
|
|
2984
|
-
}, hc = (t, { keyframes: e }) => e.length > 2 ? uc :
|
|
2984
|
+
}, hc = (t, { keyframes: e }) => e.length > 2 ? uc : Qt.has(t) ? t.startsWith("scale") ? cc(e[1]) : lc : dc;
|
|
2985
2985
|
function fc({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: c, elapsed: u, ...d }) {
|
|
2986
2986
|
return !!Object.keys(d).length;
|
|
2987
2987
|
}
|
|
2988
2988
|
const hs = (t, e, n, s = {}, i, r) => (o) => {
|
|
2989
2989
|
const a = Qn(s, t) || {}, c = a.delay || s.delay || 0;
|
|
2990
2990
|
let { elapsed: u = 0 } = s;
|
|
2991
|
-
u = u - /* @__PURE__ */
|
|
2991
|
+
u = u - /* @__PURE__ */ ft(c);
|
|
2992
2992
|
const d = {
|
|
2993
2993
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
2994
2994
|
ease: "easeOut",
|
|
@@ -3005,7 +3005,7 @@ const hs = (t, e, n, s = {}, i, r) => (o) => {
|
|
|
3005
3005
|
motionValue: e,
|
|
3006
3006
|
element: r ? void 0 : i
|
|
3007
3007
|
};
|
|
3008
|
-
fc(a) || Object.assign(d, hc(t, d)), d.duration && (d.duration = /* @__PURE__ */
|
|
3008
|
+
fc(a) || Object.assign(d, hc(t, d)), d.duration && (d.duration = /* @__PURE__ */ ft(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ ft(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
|
|
3009
3009
|
let h = !1;
|
|
3010
3010
|
if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (d.duration = 0, d.delay === 0 && (h = !0)), (Ct.instantAnimations || Ct.skipAnimations) && (h = !0, d.duration = 0, d.delay = 0), d.allowFlatten = !a.type && !a.ease, h && !r && e.get() !== void 0) {
|
|
3011
3011
|
const f = ac(d.keyframes, a);
|
|
@@ -3038,15 +3038,15 @@ function dr(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
3038
3038
|
continue;
|
|
3039
3039
|
let y = !1;
|
|
3040
3040
|
if (window.MotionHandoffAnimation) {
|
|
3041
|
-
const
|
|
3042
|
-
if (
|
|
3043
|
-
const x = window.MotionHandoffAnimation(
|
|
3041
|
+
const C = ur(t);
|
|
3042
|
+
if (C) {
|
|
3043
|
+
const x = window.MotionHandoffAnimation(C, d, W);
|
|
3044
3044
|
x !== null && (p.startTime = x, y = !0);
|
|
3045
3045
|
}
|
|
3046
3046
|
}
|
|
3047
3047
|
xn(t, d), h.start(hs(d, h, f, t.shouldReduceMotion && Fo.has(d) ? { type: !1 } : p, t, y));
|
|
3048
|
-
const
|
|
3049
|
-
|
|
3048
|
+
const w = h.animation;
|
|
3049
|
+
w && c.push(w);
|
|
3050
3050
|
}
|
|
3051
3051
|
return o && Promise.all(c).then(() => {
|
|
3052
3052
|
W.update(() => {
|
|
@@ -3145,52 +3145,52 @@ function kc(t) {
|
|
|
3145
3145
|
function o(c) {
|
|
3146
3146
|
const { props: u } = t, d = fr(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
|
|
3147
3147
|
let p = {}, m = 1 / 0;
|
|
3148
|
-
for (let
|
|
3149
|
-
const
|
|
3150
|
-
|
|
3151
|
-
let
|
|
3152
|
-
if (
|
|
3153
|
-
!x.isActive &&
|
|
3154
|
-
!
|
|
3155
|
-
|
|
3148
|
+
for (let w = 0; w < Cc; w++) {
|
|
3149
|
+
const C = vc[w], x = n[C], v = u[C] !== void 0 ? u[C] : d[C], T = he(v), k = C === c ? x.isActive : null;
|
|
3150
|
+
k === !1 && (m = w);
|
|
3151
|
+
let L = v === d[C] && v !== u[C] && T;
|
|
3152
|
+
if (L && s && t.manuallyAnimateOnMount && (L = !1), x.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3153
|
+
!x.isActive && k === null || // If we didn't and don't have any defined prop for this animation type
|
|
3154
|
+
!v && !x.prevProp || // Or if the prop doesn't define an animation
|
|
3155
|
+
Ie(v) || typeof v == "boolean")
|
|
3156
3156
|
continue;
|
|
3157
|
-
const
|
|
3158
|
-
let
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
const N = Array.isArray(
|
|
3162
|
-
let
|
|
3163
|
-
|
|
3164
|
-
const { prevResolvedValues:
|
|
3165
|
-
...
|
|
3166
|
-
...
|
|
3167
|
-
}, G = (
|
|
3168
|
-
|
|
3169
|
-
const
|
|
3170
|
-
|
|
3157
|
+
const M = jc(x.prevProp, v);
|
|
3158
|
+
let j = M || // If we're making this variant active, we want to always make it active
|
|
3159
|
+
C === c && x.isActive && !L && T || // If we removed a higher-priority variant (i is in reverse order)
|
|
3160
|
+
w > m && T, _ = !1;
|
|
3161
|
+
const N = Array.isArray(v) ? v : [v];
|
|
3162
|
+
let B = N.reduce(i(C), {});
|
|
3163
|
+
k === !1 && (B = {});
|
|
3164
|
+
const { prevResolvedValues: K = {} } = x, R = {
|
|
3165
|
+
...K,
|
|
3166
|
+
...B
|
|
3167
|
+
}, G = (z) => {
|
|
3168
|
+
j = !0, f.has(z) && (_ = !0, f.delete(z)), x.needsAnimating[z] = !0;
|
|
3169
|
+
const Y = t.getValue(z);
|
|
3170
|
+
Y && (Y.liveStyle = !1);
|
|
3171
3171
|
};
|
|
3172
|
-
for (const
|
|
3173
|
-
const
|
|
3174
|
-
if (p.hasOwnProperty(
|
|
3172
|
+
for (const z in R) {
|
|
3173
|
+
const Y = B[z], lt = K[z];
|
|
3174
|
+
if (p.hasOwnProperty(z))
|
|
3175
3175
|
continue;
|
|
3176
3176
|
let g = !1;
|
|
3177
|
-
yn(
|
|
3177
|
+
yn(Y) && yn(lt) ? g = !hr(Y, lt) : g = Y !== lt, g ? Y != null ? G(z) : f.add(z) : Y !== void 0 && f.has(z) ? G(z) : x.protectedKeys[z] = !0;
|
|
3178
3178
|
}
|
|
3179
|
-
x.prevProp =
|
|
3180
|
-
animation:
|
|
3181
|
-
options: { type:
|
|
3179
|
+
x.prevProp = v, x.prevResolvedValues = B, x.isActive && (p = { ...p, ...B }), s && t.blockInitialAnimation && (j = !1), j && (!(L && M) || _) && h.push(...N.map((z) => ({
|
|
3180
|
+
animation: z,
|
|
3181
|
+
options: { type: C }
|
|
3182
3182
|
})));
|
|
3183
3183
|
}
|
|
3184
3184
|
if (f.size) {
|
|
3185
|
-
const
|
|
3185
|
+
const w = {};
|
|
3186
3186
|
if (typeof u.initial != "boolean") {
|
|
3187
|
-
const
|
|
3188
|
-
|
|
3187
|
+
const C = pe(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
|
|
3188
|
+
C && C.transition && (w.transition = C.transition);
|
|
3189
3189
|
}
|
|
3190
|
-
f.forEach((
|
|
3191
|
-
const x = t.getBaseTarget(
|
|
3192
|
-
|
|
3193
|
-
}), h.push({ animation:
|
|
3190
|
+
f.forEach((C) => {
|
|
3191
|
+
const x = t.getBaseTarget(C), v = t.getValue(C);
|
|
3192
|
+
v && (v.liveStyle = !0), w[C] = x ?? null;
|
|
3193
|
+
}), h.push({ animation: w });
|
|
3194
3194
|
}
|
|
3195
3195
|
let y = !!h.length;
|
|
3196
3196
|
return s && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (y = !1), s = !1, y ? e(h) : Promise.resolve();
|
|
@@ -3217,7 +3217,7 @@ function kc(t) {
|
|
|
3217
3217
|
function jc(t, e) {
|
|
3218
3218
|
return typeof e == "string" ? e !== t : Array.isArray(e) ? !hr(e, t) : !1;
|
|
3219
3219
|
}
|
|
3220
|
-
function
|
|
3220
|
+
function Rt(t = !1) {
|
|
3221
3221
|
return {
|
|
3222
3222
|
isActive: t,
|
|
3223
3223
|
protectedKeys: {},
|
|
@@ -3227,23 +3227,23 @@ function Vt(t = !1) {
|
|
|
3227
3227
|
}
|
|
3228
3228
|
function Js() {
|
|
3229
3229
|
return {
|
|
3230
|
-
animate:
|
|
3231
|
-
whileInView:
|
|
3232
|
-
whileHover:
|
|
3233
|
-
whileTap:
|
|
3234
|
-
whileDrag:
|
|
3235
|
-
whileFocus:
|
|
3236
|
-
exit:
|
|
3230
|
+
animate: Rt(!0),
|
|
3231
|
+
whileInView: Rt(),
|
|
3232
|
+
whileHover: Rt(),
|
|
3233
|
+
whileTap: Rt(),
|
|
3234
|
+
whileDrag: Rt(),
|
|
3235
|
+
whileFocus: Rt(),
|
|
3236
|
+
exit: Rt()
|
|
3237
3237
|
};
|
|
3238
3238
|
}
|
|
3239
|
-
class
|
|
3239
|
+
class Vt {
|
|
3240
3240
|
constructor(e) {
|
|
3241
3241
|
this.isMounted = !1, this.node = e;
|
|
3242
3242
|
}
|
|
3243
3243
|
update() {
|
|
3244
3244
|
}
|
|
3245
3245
|
}
|
|
3246
|
-
class bc extends
|
|
3246
|
+
class bc extends Vt {
|
|
3247
3247
|
/**
|
|
3248
3248
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3249
3249
|
* to the underlying animation library. We only want to load that if we load this,
|
|
@@ -3254,7 +3254,7 @@ class bc extends Pt {
|
|
|
3254
3254
|
}
|
|
3255
3255
|
updateAnimationControlsSubscription() {
|
|
3256
3256
|
const { animate: e } = this.node.getProps();
|
|
3257
|
-
|
|
3257
|
+
Ie(e) && (this.unmountControls = e.subscribe(this.node));
|
|
3258
3258
|
}
|
|
3259
3259
|
/**
|
|
3260
3260
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
@@ -3271,7 +3271,7 @@ class bc extends Pt {
|
|
|
3271
3271
|
}
|
|
3272
3272
|
}
|
|
3273
3273
|
let Lc = 0;
|
|
3274
|
-
class Tc extends
|
|
3274
|
+
class Tc extends Vt {
|
|
3275
3275
|
constructor() {
|
|
3276
3276
|
super(...arguments), this.id = Lc++;
|
|
3277
3277
|
}
|
|
@@ -3337,26 +3337,26 @@ function Ac(t, e) {
|
|
|
3337
3337
|
};
|
|
3338
3338
|
}
|
|
3339
3339
|
const mr = 1e-4, Vc = 1 - mr, Rc = 1 + mr, gr = 0.01, Dc = 0 - gr, Ec = 0 + gr;
|
|
3340
|
-
function
|
|
3340
|
+
function ot(t) {
|
|
3341
3341
|
return t.max - t.min;
|
|
3342
3342
|
}
|
|
3343
3343
|
function _c(t, e, n) {
|
|
3344
3344
|
return Math.abs(t - e) <= n;
|
|
3345
3345
|
}
|
|
3346
3346
|
function Qs(t, e, n, s = 0.5) {
|
|
3347
|
-
t.origin = s, t.originPoint = H(e.min, e.max, t.origin), t.scale =
|
|
3347
|
+
t.origin = s, t.originPoint = H(e.min, e.max, t.origin), t.scale = ot(n) / ot(e), t.translate = H(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Vc && t.scale <= Rc || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Dc && t.translate <= Ec || isNaN(t.translate)) && (t.translate = 0);
|
|
3348
3348
|
}
|
|
3349
3349
|
function ae(t, e, n, s) {
|
|
3350
3350
|
Qs(t.x, e.x, n.x, s ? s.originX : void 0), Qs(t.y, e.y, n.y, s ? s.originY : void 0);
|
|
3351
3351
|
}
|
|
3352
3352
|
function ti(t, e, n) {
|
|
3353
|
-
t.min = n.min + e.min, t.max = t.min +
|
|
3353
|
+
t.min = n.min + e.min, t.max = t.min + ot(e);
|
|
3354
3354
|
}
|
|
3355
3355
|
function Nc(t, e, n) {
|
|
3356
3356
|
ti(t.x, e.x, n.x), ti(t.y, e.y, n.y);
|
|
3357
3357
|
}
|
|
3358
3358
|
function ei(t, e, n) {
|
|
3359
|
-
t.min = e.min - n.min, t.max = t.min +
|
|
3359
|
+
t.min = e.min - n.min, t.max = t.min + ot(e);
|
|
3360
3360
|
}
|
|
3361
3361
|
function le(t, e, n) {
|
|
3362
3362
|
ei(t.x, e.x, n.x), ei(t.y, e.y, n.y);
|
|
@@ -3366,14 +3366,14 @@ const ni = () => ({
|
|
|
3366
3366
|
scale: 1,
|
|
3367
3367
|
origin: 0,
|
|
3368
3368
|
originPoint: 0
|
|
3369
|
-
}),
|
|
3369
|
+
}), zt = () => ({
|
|
3370
3370
|
x: ni(),
|
|
3371
3371
|
y: ni()
|
|
3372
|
-
}), si = () => ({ min: 0, max: 0 }),
|
|
3372
|
+
}), si = () => ({ min: 0, max: 0 }), q = () => ({
|
|
3373
3373
|
x: si(),
|
|
3374
3374
|
y: si()
|
|
3375
3375
|
});
|
|
3376
|
-
function
|
|
3376
|
+
function ut(t) {
|
|
3377
3377
|
return [t("x"), t("y")];
|
|
3378
3378
|
}
|
|
3379
3379
|
function qe(t) {
|
|
@@ -3382,7 +3382,7 @@ function qe(t) {
|
|
|
3382
3382
|
function Cn({ scale: t, scaleX: e, scaleY: n }) {
|
|
3383
3383
|
return !qe(t) || !qe(e) || !qe(n);
|
|
3384
3384
|
}
|
|
3385
|
-
function
|
|
3385
|
+
function Dt(t) {
|
|
3386
3386
|
return Cn(t) || yr(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
3387
3387
|
}
|
|
3388
3388
|
function yr(t) {
|
|
@@ -3391,12 +3391,12 @@ function yr(t) {
|
|
|
3391
3391
|
function ii(t) {
|
|
3392
3392
|
return t && t !== "0%";
|
|
3393
3393
|
}
|
|
3394
|
-
function
|
|
3394
|
+
function Ee(t, e, n) {
|
|
3395
3395
|
const s = t - n, i = e * s;
|
|
3396
3396
|
return n + i;
|
|
3397
3397
|
}
|
|
3398
3398
|
function oi(t, e, n, s, i) {
|
|
3399
|
-
return i !== void 0 && (t =
|
|
3399
|
+
return i !== void 0 && (t = Ee(t, i, s)), Ee(t, n, s) + e;
|
|
3400
3400
|
}
|
|
3401
3401
|
function wn(t, e = 0, n = 1, s, i) {
|
|
3402
3402
|
t.min = oi(t.min, e, n, s, i), t.max = oi(t.max, e, n, s, i);
|
|
@@ -3414,21 +3414,21 @@ function Bc(t, e, n, s = !1) {
|
|
|
3414
3414
|
for (let a = 0; a < i; a++) {
|
|
3415
3415
|
r = n[a], o = r.projectionDelta;
|
|
3416
3416
|
const { visualElement: c } = r.options;
|
|
3417
|
-
c && c.props.style && c.props.style.display === "contents" || (s && r.options.layoutScroll && r.scroll && r !== r.root &&
|
|
3417
|
+
c && c.props.style && c.props.style.display === "contents" || (s && r.options.layoutScroll && r.scroll && r !== r.root && Wt(t, {
|
|
3418
3418
|
x: -r.scroll.offset.x,
|
|
3419
3419
|
y: -r.scroll.offset.y
|
|
3420
|
-
}), o && (e.x *= o.x.scale, e.y *= o.y.scale, xr(t, o)), s &&
|
|
3420
|
+
}), o && (e.x *= o.x.scale, e.y *= o.y.scale, xr(t, o)), s && Dt(r.latestValues) && Wt(t, r.latestValues));
|
|
3421
3421
|
}
|
|
3422
3422
|
e.x < ai && e.x > ri && (e.x = 1), e.y < ai && e.y > ri && (e.y = 1);
|
|
3423
3423
|
}
|
|
3424
|
-
function
|
|
3424
|
+
function Kt(t, e) {
|
|
3425
3425
|
t.min = t.min + e, t.max = t.max + e;
|
|
3426
3426
|
}
|
|
3427
3427
|
function li(t, e, n, s, i = 0.5) {
|
|
3428
3428
|
const r = H(t.min, t.max, i);
|
|
3429
3429
|
wn(t, e, n, r, s);
|
|
3430
3430
|
}
|
|
3431
|
-
function
|
|
3431
|
+
function Wt(t, e) {
|
|
3432
3432
|
li(t.x, e.x, e.scaleX, e.scale, e.originX), li(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
3433
3433
|
}
|
|
3434
3434
|
function vr(t, e) {
|
|
@@ -3436,7 +3436,7 @@ function vr(t, e) {
|
|
|
3436
3436
|
}
|
|
3437
3437
|
function Ic(t, e, n) {
|
|
3438
3438
|
const s = vr(t, n), { scroll: i } = e;
|
|
3439
|
-
return i && (
|
|
3439
|
+
return i && (Kt(s.x, i.offset.x), Kt(s.y, i.offset.y)), s;
|
|
3440
3440
|
}
|
|
3441
3441
|
const Cr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, ci = (t, e) => Math.abs(t - e);
|
|
3442
3442
|
function Oc(t, e) {
|
|
@@ -3451,19 +3451,19 @@ class wr {
|
|
|
3451
3451
|
const f = Qe(this.lastMoveEventInfo, this.history), p = this.startEvent !== null, m = Oc(f.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
3452
3452
|
if (!p && !m)
|
|
3453
3453
|
return;
|
|
3454
|
-
const { point: y } = f, { timestamp:
|
|
3455
|
-
this.history.push({ ...y, timestamp:
|
|
3456
|
-
const { onStart:
|
|
3457
|
-
p || (
|
|
3454
|
+
const { point: y } = f, { timestamp: w } = et;
|
|
3455
|
+
this.history.push({ ...y, timestamp: w });
|
|
3456
|
+
const { onStart: C, onMove: x } = this.handlers;
|
|
3457
|
+
p || (C && C(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), x && x(this.lastMoveEvent, f);
|
|
3458
3458
|
}, this.handlePointerMove = (f, p) => {
|
|
3459
3459
|
this.lastMoveEvent = f, this.lastMoveEventInfo = Je(p, this.transformPagePoint), W.update(this.updatePoint, !0);
|
|
3460
3460
|
}, this.handlePointerUp = (f, p) => {
|
|
3461
3461
|
this.end();
|
|
3462
|
-
const { onEnd: m, onSessionEnd: y, resumeAnimation:
|
|
3463
|
-
if (this.dragSnapToOrigin &&
|
|
3462
|
+
const { onEnd: m, onSessionEnd: y, resumeAnimation: w } = this.handlers;
|
|
3463
|
+
if (this.dragSnapToOrigin && w && w(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3464
3464
|
return;
|
|
3465
|
-
const
|
|
3466
|
-
this.startEvent && m && m(f,
|
|
3465
|
+
const C = Qe(f.type === "pointercancel" ? this.lastMoveEventInfo : Je(p, this.transformPagePoint), this.history);
|
|
3466
|
+
this.startEvent && m && m(f, C), y && y(f, C);
|
|
3467
3467
|
}, !ns(e))
|
|
3468
3468
|
return;
|
|
3469
3469
|
this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = o, this.contextWindow = i || window;
|
|
@@ -3476,7 +3476,7 @@ class wr {
|
|
|
3476
3476
|
this.handlers = e;
|
|
3477
3477
|
}
|
|
3478
3478
|
end() {
|
|
3479
|
-
this.removeListeners && this.removeListeners(),
|
|
3479
|
+
this.removeListeners && this.removeListeners(), St(this.updatePoint);
|
|
3480
3480
|
}
|
|
3481
3481
|
}
|
|
3482
3482
|
function Je(t, e) {
|
|
@@ -3504,7 +3504,7 @@ function zc(t, e) {
|
|
|
3504
3504
|
return { x: 0, y: 0 };
|
|
3505
3505
|
let n = t.length - 1, s = null;
|
|
3506
3506
|
const i = kr(t);
|
|
3507
|
-
for (; n >= 0 && (s = t[n], !(i.timestamp - s.timestamp > /* @__PURE__ */
|
|
3507
|
+
for (; n >= 0 && (s = t[n], !(i.timestamp - s.timestamp > /* @__PURE__ */ ft(e))); )
|
|
3508
3508
|
n--;
|
|
3509
3509
|
if (!s)
|
|
3510
3510
|
return { x: 0, y: 0 };
|
|
@@ -3544,7 +3544,7 @@ function $c(t, e) {
|
|
|
3544
3544
|
}
|
|
3545
3545
|
function Uc(t, e) {
|
|
3546
3546
|
let n = 0.5;
|
|
3547
|
-
const s =
|
|
3547
|
+
const s = ot(t), i = ot(e);
|
|
3548
3548
|
return i > s ? n = /* @__PURE__ */ ce(e.min, e.max - s, t.min) : s > i && (n = /* @__PURE__ */ ce(t.min, t.max - i, e.min)), xt(0, 1, n);
|
|
3549
3549
|
}
|
|
3550
3550
|
function Hc(t, e) {
|
|
@@ -3570,7 +3570,7 @@ function pi(t, e) {
|
|
|
3570
3570
|
const Gc = /* @__PURE__ */ new WeakMap();
|
|
3571
3571
|
class Yc {
|
|
3572
3572
|
constructor(e) {
|
|
3573
|
-
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic =
|
|
3573
|
+
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = q(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
|
|
3574
3574
|
}
|
|
3575
3575
|
start(e, { snapToCursor: n = !1, distanceThreshold: s } = {}) {
|
|
3576
3576
|
const { presenceContext: i } = this.visualElement;
|
|
@@ -3583,33 +3583,33 @@ class Yc {
|
|
|
3583
3583
|
const { drag: p, dragPropagation: m, onDragStart: y } = this.getProps();
|
|
3584
3584
|
if (p && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = ll(p), !this.openDragLock))
|
|
3585
3585
|
return;
|
|
3586
|
-
this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0),
|
|
3587
|
-
let x = this.getAxisMotionValue(
|
|
3586
|
+
this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), ut((C) => {
|
|
3587
|
+
let x = this.getAxisMotionValue(C).get() || 0;
|
|
3588
3588
|
if (gt.test(x)) {
|
|
3589
|
-
const { projection:
|
|
3590
|
-
if (
|
|
3591
|
-
const T =
|
|
3592
|
-
T && (x =
|
|
3589
|
+
const { projection: v } = this.visualElement;
|
|
3590
|
+
if (v && v.layout) {
|
|
3591
|
+
const T = v.layout.layoutBox[C];
|
|
3592
|
+
T && (x = ot(T) * (parseFloat(x) / 100));
|
|
3593
3593
|
}
|
|
3594
3594
|
}
|
|
3595
|
-
this.originPoint[
|
|
3595
|
+
this.originPoint[C] = x;
|
|
3596
3596
|
}), y && W.postRender(() => y(h, f)), xn(this.visualElement, "transform");
|
|
3597
|
-
const { animationState:
|
|
3598
|
-
|
|
3597
|
+
const { animationState: w } = this.visualElement;
|
|
3598
|
+
w && w.setActive("whileDrag", !0);
|
|
3599
3599
|
}, a = (h, f) => {
|
|
3600
3600
|
this.latestPointerEvent = h, this.latestPanInfo = f;
|
|
3601
|
-
const { dragPropagation: p, dragDirectionLock: m, onDirectionLock: y, onDrag:
|
|
3601
|
+
const { dragPropagation: p, dragDirectionLock: m, onDirectionLock: y, onDrag: w } = this.getProps();
|
|
3602
3602
|
if (!p && !this.openDragLock)
|
|
3603
3603
|
return;
|
|
3604
|
-
const { offset:
|
|
3604
|
+
const { offset: C } = f;
|
|
3605
3605
|
if (m && this.currentDirection === null) {
|
|
3606
|
-
this.currentDirection = Xc(
|
|
3606
|
+
this.currentDirection = Xc(C), this.currentDirection !== null && y && y(this.currentDirection);
|
|
3607
3607
|
return;
|
|
3608
3608
|
}
|
|
3609
|
-
this.updateAxis("x", f.point,
|
|
3609
|
+
this.updateAxis("x", f.point, C), this.updateAxis("y", f.point, C), this.visualElement.render(), w && w(h, f);
|
|
3610
3610
|
}, c = (h, f) => {
|
|
3611
3611
|
this.latestPointerEvent = h, this.latestPanInfo = f, this.stop(h, f), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
3612
|
-
}, u = () =>
|
|
3612
|
+
}, u = () => ut((h) => this.getAnimationState(h) === "paused" && this.getAxisMotionValue(h).animation?.play()), { dragSnapToOrigin: d } = this.getProps();
|
|
3613
3613
|
this.panSession = new wr(e, {
|
|
3614
3614
|
onSessionStart: r,
|
|
3615
3615
|
onStart: o,
|
|
@@ -3647,7 +3647,7 @@ class Yc {
|
|
|
3647
3647
|
}
|
|
3648
3648
|
updateAxis(e, n, s) {
|
|
3649
3649
|
const { drag: i } = this.getProps();
|
|
3650
|
-
if (!s || !
|
|
3650
|
+
if (!s || !Le(e, i, this.currentDirection))
|
|
3651
3651
|
return;
|
|
3652
3652
|
const r = this.getAxisMotionValue(e);
|
|
3653
3653
|
let o = this.originPoint[e] + s[e];
|
|
@@ -3655,13 +3655,13 @@ class Yc {
|
|
|
3655
3655
|
}
|
|
3656
3656
|
resolveConstraints() {
|
|
3657
3657
|
const { dragConstraints: e, dragElastic: n } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, i = this.constraints;
|
|
3658
|
-
e &&
|
|
3658
|
+
e && Ft(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = Wc(s.layoutBox, e) : this.constraints = !1, this.elastic = Zc(n), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && ut((r) => {
|
|
3659
3659
|
this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = Hc(s.layoutBox[r], this.constraints[r]));
|
|
3660
3660
|
});
|
|
3661
3661
|
}
|
|
3662
3662
|
resolveRefConstraints() {
|
|
3663
3663
|
const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
|
|
3664
|
-
if (!e || !
|
|
3664
|
+
if (!e || !Ft(e))
|
|
3665
3665
|
return !1;
|
|
3666
3666
|
const s = e.current;
|
|
3667
3667
|
vt(s !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
@@ -3677,8 +3677,8 @@ class Yc {
|
|
|
3677
3677
|
return o;
|
|
3678
3678
|
}
|
|
3679
3679
|
startAnimation(e) {
|
|
3680
|
-
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), c = this.constraints || {}, u =
|
|
3681
|
-
if (!
|
|
3680
|
+
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), c = this.constraints || {}, u = ut((d) => {
|
|
3681
|
+
if (!Le(d, n, this.currentDirection))
|
|
3682
3682
|
return;
|
|
3683
3683
|
let h = c && c[d] || {};
|
|
3684
3684
|
o && (h = { min: 0, max: 0 });
|
|
@@ -3702,10 +3702,10 @@ class Yc {
|
|
|
3702
3702
|
return xn(this.visualElement, e), s.start(hs(e, s, 0, n, this.visualElement, !1));
|
|
3703
3703
|
}
|
|
3704
3704
|
stopAnimation() {
|
|
3705
|
-
|
|
3705
|
+
ut((e) => this.getAxisMotionValue(e).stop());
|
|
3706
3706
|
}
|
|
3707
3707
|
pauseAnimation() {
|
|
3708
|
-
|
|
3708
|
+
ut((e) => this.getAxisMotionValue(e).animation?.pause());
|
|
3709
3709
|
}
|
|
3710
3710
|
getAnimationState(e) {
|
|
3711
3711
|
return this.getAxisMotionValue(e).animation?.state;
|
|
@@ -3721,9 +3721,9 @@ class Yc {
|
|
|
3721
3721
|
return i || this.visualElement.getValue(e, (s.initial ? s.initial[e] : void 0) || 0);
|
|
3722
3722
|
}
|
|
3723
3723
|
snapToCursor(e) {
|
|
3724
|
-
|
|
3724
|
+
ut((n) => {
|
|
3725
3725
|
const { drag: s } = this.getProps();
|
|
3726
|
-
if (!
|
|
3726
|
+
if (!Le(n, s, this.currentDirection))
|
|
3727
3727
|
return;
|
|
3728
3728
|
const { projection: i } = this.visualElement, r = this.getAxisMotionValue(n);
|
|
3729
3729
|
if (i && i.layout) {
|
|
@@ -3741,11 +3741,11 @@ class Yc {
|
|
|
3741
3741
|
if (!this.visualElement.current)
|
|
3742
3742
|
return;
|
|
3743
3743
|
const { drag: e, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
|
|
3744
|
-
if (!
|
|
3744
|
+
if (!Ft(n) || !s || !this.constraints)
|
|
3745
3745
|
return;
|
|
3746
3746
|
this.stopAnimation();
|
|
3747
3747
|
const i = { x: 0, y: 0 };
|
|
3748
|
-
|
|
3748
|
+
ut((o) => {
|
|
3749
3749
|
const a = this.getAxisMotionValue(o);
|
|
3750
3750
|
if (a && this.constraints !== !1) {
|
|
3751
3751
|
const c = a.get();
|
|
@@ -3753,8 +3753,8 @@ class Yc {
|
|
|
3753
3753
|
}
|
|
3754
3754
|
});
|
|
3755
3755
|
const { transformTemplate: r } = this.visualElement.getProps();
|
|
3756
|
-
this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(),
|
|
3757
|
-
if (!
|
|
3756
|
+
this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), ut((o) => {
|
|
3757
|
+
if (!Le(o, e, null))
|
|
3758
3758
|
return;
|
|
3759
3759
|
const a = this.getAxisMotionValue(o), { min: c, max: u } = this.constraints[o];
|
|
3760
3760
|
a.set(H(c, u, i[o]));
|
|
@@ -3769,11 +3769,11 @@ class Yc {
|
|
|
3769
3769
|
u && d && this.start(c);
|
|
3770
3770
|
}), s = () => {
|
|
3771
3771
|
const { dragConstraints: c } = this.getProps();
|
|
3772
|
-
|
|
3772
|
+
Ft(c) && c.current && (this.constraints = this.resolveRefConstraints());
|
|
3773
3773
|
}, { projection: i } = this.visualElement, r = i.addEventListener("measure", s);
|
|
3774
3774
|
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), W.read(s);
|
|
3775
3775
|
const o = me(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: u }) => {
|
|
3776
|
-
this.isDragging && u && (
|
|
3776
|
+
this.isDragging && u && (ut((d) => {
|
|
3777
3777
|
const h = this.getAxisMotionValue(d);
|
|
3778
3778
|
h && (this.originPoint[d] += c[d].translate, h.set(h.get() + c[d].translate));
|
|
3779
3779
|
}), this.visualElement.render());
|
|
@@ -3795,20 +3795,20 @@ class Yc {
|
|
|
3795
3795
|
};
|
|
3796
3796
|
}
|
|
3797
3797
|
}
|
|
3798
|
-
function
|
|
3798
|
+
function Le(t, e, n) {
|
|
3799
3799
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
3800
3800
|
}
|
|
3801
3801
|
function Xc(t, e = 10) {
|
|
3802
3802
|
let n = null;
|
|
3803
3803
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
3804
3804
|
}
|
|
3805
|
-
class qc extends
|
|
3805
|
+
class qc extends Vt {
|
|
3806
3806
|
constructor(e) {
|
|
3807
|
-
super(e), this.removeGroupControls =
|
|
3807
|
+
super(e), this.removeGroupControls = dt, this.removeListeners = dt, this.controls = new Yc(e);
|
|
3808
3808
|
}
|
|
3809
3809
|
mount() {
|
|
3810
3810
|
const { dragControls: e } = this.node.getProps();
|
|
3811
|
-
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() ||
|
|
3811
|
+
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || dt;
|
|
3812
3812
|
}
|
|
3813
3813
|
unmount() {
|
|
3814
3814
|
this.removeGroupControls(), this.removeListeners();
|
|
@@ -3817,9 +3817,9 @@ class qc extends Pt {
|
|
|
3817
3817
|
const mi = (t) => (e, n) => {
|
|
3818
3818
|
t && W.postRender(() => t(e, n));
|
|
3819
3819
|
};
|
|
3820
|
-
class Jc extends
|
|
3820
|
+
class Jc extends Vt {
|
|
3821
3821
|
constructor() {
|
|
3822
|
-
super(...arguments), this.removePointerDownListener =
|
|
3822
|
+
super(...arguments), this.removePointerDownListener = dt;
|
|
3823
3823
|
}
|
|
3824
3824
|
onPointerDown(e) {
|
|
3825
3825
|
this.session = new wr(e, this.createPanHandlers(), {
|
|
@@ -3848,7 +3848,7 @@ class Jc extends Pt {
|
|
|
3848
3848
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
3849
3849
|
}
|
|
3850
3850
|
}
|
|
3851
|
-
const
|
|
3851
|
+
const Pe = {
|
|
3852
3852
|
/**
|
|
3853
3853
|
* Global flag as to whether the tree has animated since the last time
|
|
3854
3854
|
* we resized the window
|
|
@@ -3877,10 +3877,10 @@ const se = {
|
|
|
3877
3877
|
}
|
|
3878
3878
|
}, Qc = {
|
|
3879
3879
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
3880
|
-
const s = t, i =
|
|
3880
|
+
const s = t, i = Pt.parse(t);
|
|
3881
3881
|
if (i.length > 5)
|
|
3882
3882
|
return s;
|
|
3883
|
-
const r =
|
|
3883
|
+
const r = Pt.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, c = n.y.scale * e.y;
|
|
3884
3884
|
i[0 + o] /= a, i[1 + o] /= c;
|
|
3885
3885
|
const u = H(a, c, 0.5);
|
|
3886
3886
|
return typeof i[2 + o] == "number" && (i[2 + o] /= u), typeof i[3 + o] == "number" && (i[3 + o] /= u), r(i);
|
|
@@ -3900,7 +3900,7 @@ class t0 extends fa {
|
|
|
3900
3900
|
}), r.setOptions({
|
|
3901
3901
|
...r.options,
|
|
3902
3902
|
onExitComplete: () => this.safeToRemove()
|
|
3903
|
-
})),
|
|
3903
|
+
})), Pe.hasEverUpdated = !0;
|
|
3904
3904
|
}
|
|
3905
3905
|
getSnapshotBeforeUpdate(e) {
|
|
3906
3906
|
const { layoutDependency: n, visualElement: s, drag: i, isPresent: r } = this.props, { projection: o } = s;
|
|
@@ -3928,8 +3928,8 @@ class t0 extends fa {
|
|
|
3928
3928
|
}
|
|
3929
3929
|
}
|
|
3930
3930
|
function jr(t) {
|
|
3931
|
-
const [e, n] = Xo(), s =
|
|
3932
|
-
return l.jsx(t0, { ...t, layoutGroup: s, switchLayoutGroup:
|
|
3931
|
+
const [e, n] = Xo(), s = tt(Rn);
|
|
3932
|
+
return l.jsx(t0, { ...t, layoutGroup: s, switchLayoutGroup: tt(er), isPresent: e, safeToRemove: n });
|
|
3933
3933
|
}
|
|
3934
3934
|
const e0 = {
|
|
3935
3935
|
borderRadius: {
|
|
@@ -3948,7 +3948,7 @@ const e0 = {
|
|
|
3948
3948
|
boxShadow: Qc
|
|
3949
3949
|
};
|
|
3950
3950
|
function n0(t, e, n) {
|
|
3951
|
-
const s =
|
|
3951
|
+
const s = st(t) ? t : Zt(t);
|
|
3952
3952
|
return s.start(hs("", s, e, n)), s.animation;
|
|
3953
3953
|
}
|
|
3954
3954
|
const s0 = (t, e) => t.depth - e.depth;
|
|
@@ -3967,11 +3967,11 @@ class i0 {
|
|
|
3967
3967
|
}
|
|
3968
3968
|
}
|
|
3969
3969
|
function o0(t, e) {
|
|
3970
|
-
const n =
|
|
3970
|
+
const n = rt.now(), s = ({ timestamp: i }) => {
|
|
3971
3971
|
const r = i - n;
|
|
3972
|
-
r >= e && (
|
|
3972
|
+
r >= e && (St(s), t(r - e));
|
|
3973
3973
|
};
|
|
3974
|
-
return W.setup(s, !0), () =>
|
|
3974
|
+
return W.setup(s, !0), () => St(s);
|
|
3975
3975
|
}
|
|
3976
3976
|
const br = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], r0 = br.length, xi = (t) => typeof t == "string" ? parseFloat(t) : t, vi = (t) => typeof t == "number" || A.test(t);
|
|
3977
3977
|
function a0(t, e, n, s, i, r) {
|
|
@@ -3988,21 +3988,21 @@ function a0(t, e, n, s, i, r) {
|
|
|
3988
3988
|
function Ci(t, e) {
|
|
3989
3989
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
3990
3990
|
}
|
|
3991
|
-
const l0 = /* @__PURE__ */ Lr(0, 0.5, yo), c0 = /* @__PURE__ */ Lr(0.5, 0.95,
|
|
3991
|
+
const l0 = /* @__PURE__ */ Lr(0, 0.5, yo), c0 = /* @__PURE__ */ Lr(0.5, 0.95, dt);
|
|
3992
3992
|
function Lr(t, e, n) {
|
|
3993
3993
|
return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ ce(t, e, s));
|
|
3994
3994
|
}
|
|
3995
3995
|
function wi(t, e) {
|
|
3996
3996
|
t.min = e.min, t.max = e.max;
|
|
3997
3997
|
}
|
|
3998
|
-
function
|
|
3998
|
+
function ct(t, e) {
|
|
3999
3999
|
wi(t.x, e.x), wi(t.y, e.y);
|
|
4000
4000
|
}
|
|
4001
4001
|
function ki(t, e) {
|
|
4002
4002
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
4003
4003
|
}
|
|
4004
4004
|
function ji(t, e, n, s, i) {
|
|
4005
|
-
return t -= e, t =
|
|
4005
|
+
return t -= e, t = Ee(t, 1 / n, s), i !== void 0 && (t = Ee(t, 1 / i, s)), t;
|
|
4006
4006
|
}
|
|
4007
4007
|
function u0(t, e = 0, n = 1, s = 0.5, i, r = t, o = t) {
|
|
4008
4008
|
if (gt.test(e) && (e = parseFloat(e), e = H(o.min, o.max, e / 100) - o.min), typeof e != "number")
|
|
@@ -4036,7 +4036,7 @@ function Mr(t, e) {
|
|
|
4036
4036
|
return Si(t.x, e.x) && Si(t.y, e.y);
|
|
4037
4037
|
}
|
|
4038
4038
|
function Pi(t) {
|
|
4039
|
-
return
|
|
4039
|
+
return ot(t.x) / ot(t.y);
|
|
4040
4040
|
}
|
|
4041
4041
|
function Ai(t, e) {
|
|
4042
4042
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
@@ -4162,7 +4162,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4162
4162
|
h = window.innerWidth;
|
|
4163
4163
|
}), t(o, () => {
|
|
4164
4164
|
const p = window.innerWidth;
|
|
4165
|
-
p !== h && (h = p, this.root.updateBlockedByResize = !0, d && d(), d = o0(f, 250),
|
|
4165
|
+
p !== h && (h = p, this.root.updateBlockedByResize = !0, d && d(), d = o0(f, 250), Pe.hasAnimatedSinceResize && (Pe.hasAnimatedSinceResize = !1, this.nodes.forEach(Di)));
|
|
4166
4166
|
});
|
|
4167
4167
|
}
|
|
4168
4168
|
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || c) && this.addEventListener("didUpdate", ({ delta: d, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: p }) => {
|
|
@@ -4170,15 +4170,15 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4170
4170
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4171
4171
|
return;
|
|
4172
4172
|
}
|
|
4173
|
-
const m = this.options.transition || u.getDefaultTransition() || A0, { onLayoutAnimationStart: y, onLayoutAnimationComplete:
|
|
4174
|
-
if (this.options.layoutRoot || this.resumeFrom || x || h && (
|
|
4173
|
+
const m = this.options.transition || u.getDefaultTransition() || A0, { onLayoutAnimationStart: y, onLayoutAnimationComplete: w } = u.getProps(), C = !this.targetLayout || !Mr(this.targetLayout, p), x = !h && f;
|
|
4174
|
+
if (this.options.layoutRoot || this.resumeFrom || x || h && (C || !this.currentAnimation)) {
|
|
4175
4175
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
4176
|
-
const
|
|
4176
|
+
const v = {
|
|
4177
4177
|
...Qn(m, "layout"),
|
|
4178
4178
|
onPlay: y,
|
|
4179
|
-
onComplete:
|
|
4179
|
+
onComplete: w
|
|
4180
4180
|
};
|
|
4181
|
-
(u.shouldReduceMotion || this.options.layoutRoot) && (
|
|
4181
|
+
(u.shouldReduceMotion || this.options.layoutRoot) && (v.delay = 0, v.type = !1), this.startAnimation(v), this.setAnimationOrigin(d, x);
|
|
4182
4182
|
} else
|
|
4183
4183
|
h || Di(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4184
4184
|
this.targetLayout = p;
|
|
@@ -4187,7 +4187,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4187
4187
|
unmount() {
|
|
4188
4188
|
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
4189
4189
|
const o = this.getStack();
|
|
4190
|
-
o && o.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(),
|
|
4190
|
+
o && o.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), St(this.updateProjection);
|
|
4191
4191
|
}
|
|
4192
4192
|
// only on the root
|
|
4193
4193
|
blockUpdate() {
|
|
@@ -4238,7 +4238,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4238
4238
|
return;
|
|
4239
4239
|
}
|
|
4240
4240
|
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(j0), this.nodes.forEach(x0), this.nodes.forEach(v0)) : this.nodes.forEach(Ri), this.clearAllSnapshots();
|
|
4241
|
-
const a =
|
|
4241
|
+
const a = rt.now();
|
|
4242
4242
|
et.delta = xt(0, 1e3 / 60, a - et.timestamp), et.timestamp = a, et.isProcessing = !0, Ue.update.process(et), Ue.preRender.process(et), Ue.render.process(et), et.isProcessing = !1;
|
|
4243
4243
|
}
|
|
4244
4244
|
didUpdate() {
|
|
@@ -4259,7 +4259,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4259
4259
|
* Update measurements
|
|
4260
4260
|
*/
|
|
4261
4261
|
updateSnapshot() {
|
|
4262
|
-
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !
|
|
4262
|
+
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !ot(this.snapshot.measuredBox.x) && !ot(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
|
|
4263
4263
|
}
|
|
4264
4264
|
updateLayout() {
|
|
4265
4265
|
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
|
|
@@ -4268,7 +4268,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4268
4268
|
for (let c = 0; c < this.path.length; c++)
|
|
4269
4269
|
this.path[c].updateScroll();
|
|
4270
4270
|
const o = this.layout;
|
|
4271
|
-
this.layout = this.measure(!1), this.layoutCorrected =
|
|
4271
|
+
this.layout = this.measure(!1), this.layoutCorrected = q(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
4272
4272
|
const { visualElement: a } = this.options;
|
|
4273
4273
|
a && a.notify("LayoutMeasure", this.layout.layoutBox, o ? o.layoutBox : void 0);
|
|
4274
4274
|
}
|
|
@@ -4289,7 +4289,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4289
4289
|
if (!i)
|
|
4290
4290
|
return;
|
|
4291
4291
|
const o = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Tr(this.projectionDelta), c = this.getTransformTemplate(), u = c ? c(this.latestValues, "") : void 0, d = u !== this.prevTransformTemplateValue;
|
|
4292
|
-
o && this.instance && (a ||
|
|
4292
|
+
o && this.instance && (a || Dt(this.latestValues) || d) && (i(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4293
4293
|
}
|
|
4294
4294
|
measure(o = !0) {
|
|
4295
4295
|
const a = this.measurePageBox();
|
|
@@ -4305,48 +4305,48 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4305
4305
|
measurePageBox() {
|
|
4306
4306
|
const { visualElement: o } = this.options;
|
|
4307
4307
|
if (!o)
|
|
4308
|
-
return
|
|
4308
|
+
return q();
|
|
4309
4309
|
const a = o.measureViewportBox();
|
|
4310
4310
|
if (!(this.scroll?.wasRoot || this.path.some(R0))) {
|
|
4311
4311
|
const { scroll: u } = this.root;
|
|
4312
|
-
u && (
|
|
4312
|
+
u && (Kt(a.x, u.offset.x), Kt(a.y, u.offset.y));
|
|
4313
4313
|
}
|
|
4314
4314
|
return a;
|
|
4315
4315
|
}
|
|
4316
4316
|
removeElementScroll(o) {
|
|
4317
|
-
const a =
|
|
4318
|
-
if (
|
|
4317
|
+
const a = q();
|
|
4318
|
+
if (ct(a, o), this.scroll?.wasRoot)
|
|
4319
4319
|
return a;
|
|
4320
4320
|
for (let c = 0; c < this.path.length; c++) {
|
|
4321
4321
|
const u = this.path[c], { scroll: d, options: h } = u;
|
|
4322
|
-
u !== this.root && d && h.layoutScroll && (d.wasRoot &&
|
|
4322
|
+
u !== this.root && d && h.layoutScroll && (d.wasRoot && ct(a, o), Kt(a.x, d.offset.x), Kt(a.y, d.offset.y));
|
|
4323
4323
|
}
|
|
4324
4324
|
return a;
|
|
4325
4325
|
}
|
|
4326
4326
|
applyTransform(o, a = !1) {
|
|
4327
|
-
const c =
|
|
4328
|
-
|
|
4327
|
+
const c = q();
|
|
4328
|
+
ct(c, o);
|
|
4329
4329
|
for (let u = 0; u < this.path.length; u++) {
|
|
4330
4330
|
const d = this.path[u];
|
|
4331
|
-
!a && d.options.layoutScroll && d.scroll && d !== d.root &&
|
|
4331
|
+
!a && d.options.layoutScroll && d.scroll && d !== d.root && Wt(c, {
|
|
4332
4332
|
x: -d.scroll.offset.x,
|
|
4333
4333
|
y: -d.scroll.offset.y
|
|
4334
|
-
}),
|
|
4334
|
+
}), Dt(d.latestValues) && Wt(c, d.latestValues);
|
|
4335
4335
|
}
|
|
4336
|
-
return
|
|
4336
|
+
return Dt(this.latestValues) && Wt(c, this.latestValues), c;
|
|
4337
4337
|
}
|
|
4338
4338
|
removeTransform(o) {
|
|
4339
|
-
const a =
|
|
4340
|
-
|
|
4339
|
+
const a = q();
|
|
4340
|
+
ct(a, o);
|
|
4341
4341
|
for (let c = 0; c < this.path.length; c++) {
|
|
4342
4342
|
const u = this.path[c];
|
|
4343
|
-
if (!u.instance || !
|
|
4343
|
+
if (!u.instance || !Dt(u.latestValues))
|
|
4344
4344
|
continue;
|
|
4345
4345
|
Cn(u.latestValues) && u.updateSnapshot();
|
|
4346
|
-
const d =
|
|
4347
|
-
|
|
4346
|
+
const d = q(), h = u.measurePageBox();
|
|
4347
|
+
ct(d, h), Li(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, d);
|
|
4348
4348
|
}
|
|
4349
|
-
return
|
|
4349
|
+
return Dt(this.latestValues) && Li(a, this.latestValues), a;
|
|
4350
4350
|
}
|
|
4351
4351
|
setTargetDelta(o) {
|
|
4352
4352
|
this.targetDelta = o, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4374,12 +4374,12 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4374
4374
|
if (!(!this.layout || !(d || h))) {
|
|
4375
4375
|
if (this.resolvedRelativeTargetAt = et.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
4376
4376
|
const f = this.getClosestProjectingParent();
|
|
4377
|
-
f && f.layout && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
4377
|
+
f && f.layout && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget = q(), this.relativeTargetOrigin = q(), le(this.relativeTargetOrigin, this.layout.layoutBox, f.layout.layoutBox), ct(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4378
4378
|
}
|
|
4379
|
-
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target =
|
|
4379
|
+
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = q(), this.targetWithTransforms = q()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Nc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : ct(this.target, this.layout.layoutBox), xr(this.target, this.targetDelta)) : ct(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget)) {
|
|
4380
4380
|
this.attemptToResolveRelativeTarget = !1;
|
|
4381
4381
|
const f = this.getClosestProjectingParent();
|
|
4382
|
-
f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
4382
|
+
f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget = q(), this.relativeTargetOrigin = q(), le(this.relativeTargetOrigin, this.target, f.target), ct(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4383
4383
|
}
|
|
4384
4384
|
}
|
|
4385
4385
|
}
|
|
@@ -4398,9 +4398,9 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4398
4398
|
const { layout: u, layoutId: d } = this.options;
|
|
4399
4399
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || d))
|
|
4400
4400
|
return;
|
|
4401
|
-
|
|
4401
|
+
ct(this.layoutCorrected, this.layout.layoutBox);
|
|
4402
4402
|
const h = this.treeScale.x, f = this.treeScale.y;
|
|
4403
|
-
Bc(this.layoutCorrected, this.treeScale, this.path, a), o.layout && !o.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (o.target = o.layout.layoutBox, o.targetWithTransforms =
|
|
4403
|
+
Bc(this.layoutCorrected, this.treeScale, this.path, a), o.layout && !o.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (o.target = o.layout.layoutBox, o.targetWithTransforms = q());
|
|
4404
4404
|
const { target: p } = o;
|
|
4405
4405
|
if (!p) {
|
|
4406
4406
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
@@ -4422,22 +4422,22 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4422
4422
|
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
4423
4423
|
}
|
|
4424
4424
|
createProjectionDeltas() {
|
|
4425
|
-
this.prevProjectionDelta =
|
|
4425
|
+
this.prevProjectionDelta = zt(), this.projectionDelta = zt(), this.projectionDeltaWithTransform = zt();
|
|
4426
4426
|
}
|
|
4427
4427
|
setAnimationOrigin(o, a = !1) {
|
|
4428
|
-
const c = this.snapshot, u = c ? c.latestValues : {}, d = { ...this.latestValues }, h =
|
|
4428
|
+
const c = this.snapshot, u = c ? c.latestValues : {}, d = { ...this.latestValues }, h = zt();
|
|
4429
4429
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4430
|
-
const f =
|
|
4430
|
+
const f = q(), p = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0, y = p !== m, w = this.getStack(), C = !w || w.members.length <= 1, x = !!(y && !C && this.options.crossfade === !0 && !this.path.some(P0));
|
|
4431
4431
|
this.animationProgress = 0;
|
|
4432
|
-
let
|
|
4432
|
+
let v;
|
|
4433
4433
|
this.mixTargetDelta = (T) => {
|
|
4434
|
-
const
|
|
4435
|
-
Ei(h.x, o.x,
|
|
4434
|
+
const k = T / 1e3;
|
|
4435
|
+
Ei(h.x, o.x, k), Ei(h.y, o.y, k), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (le(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), S0(this.relativeTarget, this.relativeTargetOrigin, f, k), v && f0(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = q()), ct(v, this.relativeTarget)), y && (this.animationValues = d, a0(d, u, this.latestValues, k, x, C)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = k;
|
|
4436
4436
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4437
4437
|
}
|
|
4438
4438
|
startAnimation(o) {
|
|
4439
|
-
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (
|
|
4440
|
-
|
|
4439
|
+
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (St(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = W.update(() => {
|
|
4440
|
+
Pe.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Zt(0)), this.currentAnimation = n0(this.motionValue, [0, 1e3], {
|
|
4441
4441
|
...o,
|
|
4442
4442
|
velocity: 0,
|
|
4443
4443
|
isSync: !0,
|
|
@@ -4465,13 +4465,13 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4465
4465
|
let { targetWithTransforms: a, target: c, layout: u, latestValues: d } = o;
|
|
4466
4466
|
if (!(!a || !c || !u)) {
|
|
4467
4467
|
if (this !== o && this.layout && u && Ar(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
|
|
4468
|
-
c = this.target ||
|
|
4469
|
-
const h =
|
|
4468
|
+
c = this.target || q();
|
|
4469
|
+
const h = ot(this.layout.layoutBox.x);
|
|
4470
4470
|
c.x.min = o.target.x.min, c.x.max = c.x.min + h;
|
|
4471
|
-
const f =
|
|
4471
|
+
const f = ot(this.layout.layoutBox.y);
|
|
4472
4472
|
c.y.min = o.target.y.min, c.y.max = c.y.min + f;
|
|
4473
4473
|
}
|
|
4474
|
-
|
|
4474
|
+
ct(a, c), Wt(a, d), ae(this.projectionDeltaWithTransform, this.layoutCorrected, a, d);
|
|
4475
4475
|
}
|
|
4476
4476
|
}
|
|
4477
4477
|
registerSharedNode(o, a) {
|
|
@@ -4533,12 +4533,12 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4533
4533
|
}
|
|
4534
4534
|
const c = this.getTransformTemplate();
|
|
4535
4535
|
if (this.needsReset) {
|
|
4536
|
-
this.needsReset = !1, o.visibility = "", o.opacity = "", o.pointerEvents =
|
|
4536
|
+
this.needsReset = !1, o.visibility = "", o.opacity = "", o.pointerEvents = Se(a?.pointerEvents) || "", o.transform = c ? c(this.latestValues, "") : "none";
|
|
4537
4537
|
return;
|
|
4538
4538
|
}
|
|
4539
4539
|
const u = this.getLead();
|
|
4540
4540
|
if (!this.projectionDelta || !this.layout || !u.target) {
|
|
4541
|
-
this.options.layoutId && (o.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, o.pointerEvents =
|
|
4541
|
+
this.options.layoutId && (o.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, o.pointerEvents = Se(a?.pointerEvents) || ""), this.hasProjected && !Dt(this.latestValues) && (o.transform = c ? c({}, "") : "none", this.hasProjected = !1);
|
|
4542
4542
|
return;
|
|
4543
4543
|
}
|
|
4544
4544
|
o.visibility = "";
|
|
@@ -4551,15 +4551,15 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4551
4551
|
for (const m in fe) {
|
|
4552
4552
|
if (d[m] === void 0)
|
|
4553
4553
|
continue;
|
|
4554
|
-
const { correct: y, applyTo:
|
|
4555
|
-
if (
|
|
4556
|
-
const
|
|
4557
|
-
for (let T = 0; T <
|
|
4558
|
-
o[
|
|
4554
|
+
const { correct: y, applyTo: w, isCSSVariable: C } = fe[m], x = h === "none" ? d[m] : y(d[m], u);
|
|
4555
|
+
if (w) {
|
|
4556
|
+
const v = w.length;
|
|
4557
|
+
for (let T = 0; T < v; T++)
|
|
4558
|
+
o[w[T]] = x;
|
|
4559
4559
|
} else
|
|
4560
|
-
|
|
4560
|
+
C ? this.options.visualElement.renderState.vars[m] = x : o[m] = x;
|
|
4561
4561
|
}
|
|
4562
|
-
this.options.layoutId && (o.pointerEvents = u === this ?
|
|
4562
|
+
this.options.layoutId && (o.pointerEvents = u === this ? Se(a?.pointerEvents) || "" : "none");
|
|
4563
4563
|
}
|
|
4564
4564
|
clearSnapshot() {
|
|
4565
4565
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -4577,16 +4577,16 @@ function v0(t) {
|
|
|
4577
4577
|
const e = t.resumeFrom?.snapshot || t.snapshot;
|
|
4578
4578
|
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
4579
4579
|
const { layoutBox: n, measuredBox: s } = t.layout, { animationType: i } = t.options, r = e.source !== t.layout.source;
|
|
4580
|
-
i === "size" ?
|
|
4581
|
-
const h = r ? e.measuredBox[d] : e.layoutBox[d], f =
|
|
4580
|
+
i === "size" ? ut((d) => {
|
|
4581
|
+
const h = r ? e.measuredBox[d] : e.layoutBox[d], f = ot(h);
|
|
4582
4582
|
h.min = n[d].min, h.max = h.min + f;
|
|
4583
|
-
}) : Ar(i, e.layoutBox, n) &&
|
|
4584
|
-
const h = r ? e.measuredBox[d] : e.layoutBox[d], f =
|
|
4583
|
+
}) : Ar(i, e.layoutBox, n) && ut((d) => {
|
|
4584
|
+
const h = r ? e.measuredBox[d] : e.layoutBox[d], f = ot(n[d]);
|
|
4585
4585
|
h.max = h.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[d].max = t.relativeTarget[d].min + f);
|
|
4586
4586
|
});
|
|
4587
|
-
const o =
|
|
4587
|
+
const o = zt();
|
|
4588
4588
|
ae(o, n, e.layoutBox);
|
|
4589
|
-
const a =
|
|
4589
|
+
const a = zt();
|
|
4590
4590
|
r ? ae(a, t.applyTransform(s, !0), e.measuredBox) : ae(a, n, e.layoutBox);
|
|
4591
4591
|
const c = !Tr(o);
|
|
4592
4592
|
let u = !1;
|
|
@@ -4595,9 +4595,9 @@ function v0(t) {
|
|
|
4595
4595
|
if (d && !d.resumeFrom) {
|
|
4596
4596
|
const { snapshot: h, layout: f } = d;
|
|
4597
4597
|
if (h && f) {
|
|
4598
|
-
const p =
|
|
4598
|
+
const p = q();
|
|
4599
4599
|
le(p, e.layoutBox, h.layoutBox);
|
|
4600
|
-
const m =
|
|
4600
|
+
const m = q();
|
|
4601
4601
|
le(m, n, f.layoutBox), Mr(p, m) || (u = !0), d.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = p, t.relativeParent = d);
|
|
4602
4602
|
}
|
|
4603
4603
|
}
|
|
@@ -4665,7 +4665,7 @@ function P0(t) {
|
|
|
4665
4665
|
const A0 = {
|
|
4666
4666
|
duration: 0.45,
|
|
4667
4667
|
ease: [0.4, 0, 0.1, 1]
|
|
4668
|
-
}, Ni = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Bi = Ni("applewebkit/") && !Ni("chrome/") ? Math.round :
|
|
4668
|
+
}, Ni = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Bi = Ni("applewebkit/") && !Ni("chrome/") ? Math.round : dt;
|
|
4669
4669
|
function Ii(t) {
|
|
4670
4670
|
t.min = Bi(t.min), t.max = Bi(t.max);
|
|
4671
4671
|
}
|
|
@@ -4719,7 +4719,7 @@ function Oi(t, e, n) {
|
|
|
4719
4719
|
const i = "onHover" + n, r = s[i];
|
|
4720
4720
|
r && W.postRender(() => r(e, ve(e)));
|
|
4721
4721
|
}
|
|
4722
|
-
class _0 extends
|
|
4722
|
+
class _0 extends Vt {
|
|
4723
4723
|
mount() {
|
|
4724
4724
|
const { current: e } = this.node;
|
|
4725
4725
|
e && (this.unmount = cl(e, (n, s) => (Oi(this.node, s, "Start"), (i) => Oi(this.node, i, "End"))));
|
|
@@ -4727,7 +4727,7 @@ class _0 extends Pt {
|
|
|
4727
4727
|
unmount() {
|
|
4728
4728
|
}
|
|
4729
4729
|
}
|
|
4730
|
-
class N0 extends
|
|
4730
|
+
class N0 extends Vt {
|
|
4731
4731
|
constructor() {
|
|
4732
4732
|
super(...arguments), this.isActive = !1;
|
|
4733
4733
|
}
|
|
@@ -4757,7 +4757,7 @@ function Fi(t, e, n) {
|
|
|
4757
4757
|
const i = "onTap" + (n === "End" ? "" : n), r = s[i];
|
|
4758
4758
|
r && W.postRender(() => r(e, ve(e)));
|
|
4759
4759
|
}
|
|
4760
|
-
class B0 extends
|
|
4760
|
+
class B0 extends Vt {
|
|
4761
4761
|
mount() {
|
|
4762
4762
|
const { current: e } = this.node;
|
|
4763
4763
|
e && (this.unmount = fl(e, (n, s) => (Fi(this.node, s, "Start"), (i, { success: r }) => Fi(this.node, i, r ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
@@ -4787,7 +4787,7 @@ const K0 = {
|
|
|
4787
4787
|
some: 0,
|
|
4788
4788
|
all: 1
|
|
4789
4789
|
};
|
|
4790
|
-
class W0 extends
|
|
4790
|
+
class W0 extends Vt {
|
|
4791
4791
|
constructor() {
|
|
4792
4792
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
4793
4793
|
}
|
|
@@ -4853,17 +4853,17 @@ const G0 = /* @__PURE__ */ new WeakMap();
|
|
|
4853
4853
|
function Y0(t, e, n) {
|
|
4854
4854
|
for (const s in e) {
|
|
4855
4855
|
const i = e[s], r = n[s];
|
|
4856
|
-
if (
|
|
4856
|
+
if (st(i))
|
|
4857
4857
|
t.addValue(s, i);
|
|
4858
|
-
else if (
|
|
4859
|
-
t.addValue(s,
|
|
4858
|
+
else if (st(r))
|
|
4859
|
+
t.addValue(s, Zt(i, { owner: t }));
|
|
4860
4860
|
else if (r !== i)
|
|
4861
4861
|
if (t.hasValue(s)) {
|
|
4862
4862
|
const o = t.getValue(s);
|
|
4863
4863
|
o.liveStyle === !0 ? o.jump(i) : o.hasAnimated || o.set(i);
|
|
4864
4864
|
} else {
|
|
4865
4865
|
const o = t.getStaticValue(s);
|
|
4866
|
-
t.addValue(s,
|
|
4866
|
+
t.addValue(s, Zt(o !== void 0 ? o : i, { owner: t }));
|
|
4867
4867
|
}
|
|
4868
4868
|
}
|
|
4869
4869
|
for (const s in n)
|
|
@@ -4894,22 +4894,22 @@ class X0 {
|
|
|
4894
4894
|
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = qn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
4895
4895
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
4896
4896
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
4897
|
-
const f =
|
|
4897
|
+
const f = rt.now();
|
|
4898
4898
|
this.renderScheduledAt < f && (this.renderScheduledAt = f, W.render(this.render, !1, !0));
|
|
4899
4899
|
};
|
|
4900
4900
|
const { latestValues: c, renderState: u } = o;
|
|
4901
|
-
this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = n.initial ? { ...c } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants =
|
|
4901
|
+
this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = n.initial ? { ...c } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Oe(n), this.isVariantNode = Qo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
4902
4902
|
const { willChange: d, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
4903
4903
|
for (const f in h) {
|
|
4904
4904
|
const p = h[f];
|
|
4905
|
-
c[f] !== void 0 &&
|
|
4905
|
+
c[f] !== void 0 && st(p) && p.set(c[f], !1);
|
|
4906
4906
|
}
|
|
4907
4907
|
}
|
|
4908
4908
|
mount(e) {
|
|
4909
4909
|
this.current = e, G0.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Rr.current || Z0(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : bn.current, process.env.NODE_ENV !== "production" && On(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
4910
4910
|
}
|
|
4911
4911
|
unmount() {
|
|
4912
|
-
this.projection && this.projection.unmount(),
|
|
4912
|
+
this.projection && this.projection.unmount(), St(this.notifyUpdate), St(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
4913
4913
|
for (const e in this.events)
|
|
4914
4914
|
this.events[e].clear();
|
|
4915
4915
|
for (const e in this.features) {
|
|
@@ -4920,7 +4920,7 @@ class X0 {
|
|
|
4920
4920
|
}
|
|
4921
4921
|
bindToMotionValue(e, n) {
|
|
4922
4922
|
this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
|
|
4923
|
-
const s =
|
|
4923
|
+
const s = Qt.has(e);
|
|
4924
4924
|
s && this.onBindTransform && this.onBindTransform();
|
|
4925
4925
|
const i = n.on("change", (a) => {
|
|
4926
4926
|
this.latestValues[e] = a, this.props.onUpdate && W.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
@@ -4935,8 +4935,8 @@ class X0 {
|
|
|
4935
4935
|
}
|
|
4936
4936
|
updateFeatures() {
|
|
4937
4937
|
let e = "animation";
|
|
4938
|
-
for (e in
|
|
4939
|
-
const n =
|
|
4938
|
+
for (e in Gt) {
|
|
4939
|
+
const n = Gt[e];
|
|
4940
4940
|
if (!n)
|
|
4941
4941
|
continue;
|
|
4942
4942
|
const { isEnabled: s, Feature: i } = n;
|
|
@@ -4955,7 +4955,7 @@ class X0 {
|
|
|
4955
4955
|
* removed with a re-render to work.
|
|
4956
4956
|
*/
|
|
4957
4957
|
measureViewportBox() {
|
|
4958
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
4958
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : q();
|
|
4959
4959
|
}
|
|
4960
4960
|
getStaticValue(e) {
|
|
4961
4961
|
return this.latestValues[e];
|
|
@@ -5031,7 +5031,7 @@ class X0 {
|
|
|
5031
5031
|
if (this.props.values && this.props.values[e])
|
|
5032
5032
|
return this.props.values[e];
|
|
5033
5033
|
let s = this.values.get(e);
|
|
5034
|
-
return s === void 0 && n !== void 0 && (s =
|
|
5034
|
+
return s === void 0 && n !== void 0 && (s = Zt(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
|
|
5035
5035
|
}
|
|
5036
5036
|
/**
|
|
5037
5037
|
* If we're trying to animate to a previously unencountered value,
|
|
@@ -5040,7 +5040,7 @@ class X0 {
|
|
|
5040
5040
|
*/
|
|
5041
5041
|
readValue(e, n) {
|
|
5042
5042
|
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
5043
|
-
return s != null && (typeof s == "string" && (ro(s) || lo(s)) ? s = parseFloat(s) : !gl(s) &&
|
|
5043
|
+
return s != null && (typeof s == "string" && (ro(s) || lo(s)) ? s = parseFloat(s) : !gl(s) && Pt.test(n) && (s = $o(e, n)), this.setBaseTarget(e, st(s) ? s.get() : s)), st(s) ? s.get() : s;
|
|
5044
5044
|
}
|
|
5045
5045
|
/**
|
|
5046
5046
|
* Set the base target to later animate back to. This is currently
|
|
@@ -5063,7 +5063,7 @@ class X0 {
|
|
|
5063
5063
|
if (n && s !== void 0)
|
|
5064
5064
|
return s;
|
|
5065
5065
|
const i = this.getBaseTargetFromProps(this.props, e);
|
|
5066
|
-
return i !== void 0 && !
|
|
5066
|
+
return i !== void 0 && !st(i) ? i : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
5067
5067
|
}
|
|
5068
5068
|
on(e, n) {
|
|
5069
5069
|
return this.events[e] || (this.events[e] = new In()), this.events[e].add(n);
|
|
@@ -5088,7 +5088,7 @@ class Dr extends X0 {
|
|
|
5088
5088
|
handleChildMotionValue() {
|
|
5089
5089
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
5090
5090
|
const { children: e } = this.props;
|
|
5091
|
-
|
|
5091
|
+
st(e) && (this.childSubscription = e.on("change", (n) => {
|
|
5092
5092
|
this.current && (this.current.textContent = `${n}`);
|
|
5093
5093
|
}));
|
|
5094
5094
|
}
|
|
@@ -5110,7 +5110,7 @@ class J0 extends Dr {
|
|
|
5110
5110
|
super(...arguments), this.type = "html", this.renderInstance = Er;
|
|
5111
5111
|
}
|
|
5112
5112
|
readValueFromInstance(e, n) {
|
|
5113
|
-
if (
|
|
5113
|
+
if (Qt.has(n))
|
|
5114
5114
|
return this.projection?.isProjecting ? dn(n) : k1(e, n);
|
|
5115
5115
|
{
|
|
5116
5116
|
const s = q0(e), i = (Kn(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
@@ -5159,13 +5159,13 @@ function Q0(t, e, n, s) {
|
|
|
5159
5159
|
}
|
|
5160
5160
|
class t2 extends Dr {
|
|
5161
5161
|
constructor() {
|
|
5162
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox =
|
|
5162
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = q;
|
|
5163
5163
|
}
|
|
5164
5164
|
getBaseTargetFromProps(e, n) {
|
|
5165
5165
|
return e[n];
|
|
5166
5166
|
}
|
|
5167
5167
|
readValueFromInstance(e, n) {
|
|
5168
|
-
if (
|
|
5168
|
+
if (Qt.has(n)) {
|
|
5169
5169
|
const s = Wo(n);
|
|
5170
5170
|
return s && s.default || 0;
|
|
5171
5171
|
}
|
|
@@ -5194,8 +5194,8 @@ const e2 = (t, e) => cs(t) ? new t2(e) : new J0(e, {
|
|
|
5194
5194
|
}, e2), s2 = /* @__PURE__ */ Tl(n2), i2 = (t, e) => {
|
|
5195
5195
|
const { isOpen: n, as: s = "div", children: i, ...r } = t, o = s2[s];
|
|
5196
5196
|
return /* @__PURE__ */ l.jsx(wl, { children: n && /* @__PURE__ */ l.jsx(o, { ref: e, ...r, children: i }) });
|
|
5197
|
-
}, o2 = Z(i2),
|
|
5198
|
-
|
|
5197
|
+
}, o2 = Z(i2), Fe = I(o2);
|
|
5198
|
+
Fe.displayName = "CTransition";
|
|
5199
5199
|
const Nr = Z((t, e) => {
|
|
5200
5200
|
const {
|
|
5201
5201
|
type: n = "button",
|
|
@@ -5212,12 +5212,12 @@ const Nr = Z((t, e) => {
|
|
|
5212
5212
|
onClick: p,
|
|
5213
5213
|
onMouseDown: m,
|
|
5214
5214
|
onMouseLeave: y,
|
|
5215
|
-
onMouseUp:
|
|
5216
|
-
onKeyDown:
|
|
5215
|
+
onMouseUp: w,
|
|
5216
|
+
onKeyDown: C,
|
|
5217
5217
|
onKeyUp: x,
|
|
5218
|
-
...
|
|
5219
|
-
} = t, T =
|
|
5220
|
-
|
|
5218
|
+
...v
|
|
5219
|
+
} = t, T = J(null), k = Tn(T), L = b(() => c === "plain", [c]);
|
|
5220
|
+
pt(e, () => ({
|
|
5221
5221
|
focus() {
|
|
5222
5222
|
T.current?.focus();
|
|
5223
5223
|
},
|
|
@@ -5228,43 +5228,43 @@ const Nr = Z((t, e) => {
|
|
|
5228
5228
|
r || T.current?.click();
|
|
5229
5229
|
}
|
|
5230
5230
|
}));
|
|
5231
|
-
const
|
|
5232
|
-
const
|
|
5233
|
-
return s &&
|
|
5234
|
-
}, [s, r, a, c, o]),
|
|
5235
|
-
r || p?.(
|
|
5236
|
-
}, [r, p]), N =
|
|
5237
|
-
m?.(
|
|
5238
|
-
}, [
|
|
5239
|
-
|
|
5240
|
-
}, [
|
|
5241
|
-
if (y?.(
|
|
5231
|
+
const M = b(() => {
|
|
5232
|
+
const D = ["k-button", `k-button--${a}`];
|
|
5233
|
+
return s && D.push(s), r && D.push("k-button--disabled"), c && D.push(`k-button--${c}`), o && D.push("k-button--danger"), D.join(" ");
|
|
5234
|
+
}, [s, r, a, c, o]), j = b(() => ({ ...f, width: d, height: h }), []), _ = S((D) => {
|
|
5235
|
+
r || p?.(D);
|
|
5236
|
+
}, [r, p]), N = S((D) => {
|
|
5237
|
+
m?.(D), !r && !L && k?.register(D);
|
|
5238
|
+
}, [k, L, m]), B = S((D) => {
|
|
5239
|
+
w?.(D), L || k.remove();
|
|
5240
|
+
}, [k, L, w]), K = S((D) => {
|
|
5241
|
+
if (y?.(D), !T?.current)
|
|
5242
5242
|
throw Error("Invalid rootRef.");
|
|
5243
|
-
|
|
5244
|
-
}, [
|
|
5245
|
-
|
|
5246
|
-
}, [
|
|
5247
|
-
x?.(
|
|
5248
|
-
}, [
|
|
5243
|
+
L || k.remove();
|
|
5244
|
+
}, [k, L, y]), R = S((D) => {
|
|
5245
|
+
C?.(D), L || k?.register(D);
|
|
5246
|
+
}, [k, C]), G = S((D) => {
|
|
5247
|
+
x?.(D), L || Mt(D, () => k.remove());
|
|
5248
|
+
}, [k, x]);
|
|
5249
5249
|
return /* @__PURE__ */ l.jsx(
|
|
5250
5250
|
Ji,
|
|
5251
5251
|
{
|
|
5252
5252
|
ref: T,
|
|
5253
|
-
...
|
|
5253
|
+
...v,
|
|
5254
5254
|
type: n,
|
|
5255
5255
|
label: i,
|
|
5256
|
-
className:
|
|
5257
|
-
style:
|
|
5256
|
+
className: M,
|
|
5257
|
+
style: j,
|
|
5258
5258
|
disabled: r,
|
|
5259
5259
|
onMouseDown: N,
|
|
5260
|
-
onMouseLeave:
|
|
5261
|
-
onClick:
|
|
5262
|
-
onMouseUp:
|
|
5260
|
+
onMouseLeave: K,
|
|
5261
|
+
onClick: _,
|
|
5262
|
+
onMouseUp: B,
|
|
5263
5263
|
onKeyDown: R,
|
|
5264
5264
|
onKeyUp: G
|
|
5265
5265
|
}
|
|
5266
5266
|
);
|
|
5267
|
-
}), fs =
|
|
5267
|
+
}), fs = I(Nr);
|
|
5268
5268
|
Nr.displayName = "KButton";
|
|
5269
5269
|
fs.displayName = "KButton";
|
|
5270
5270
|
const b2 = ["outlined", "solid", "primary", "subtle", "plain"], Br = (t) => {
|
|
@@ -5273,57 +5273,57 @@ const b2 = ["outlined", "solid", "primary", "subtle", "plain"], Br = (t) => {
|
|
|
5273
5273
|
return e && a.push(e), a.join(" ");
|
|
5274
5274
|
}, [e]), o = b(() => {
|
|
5275
5275
|
const a = [];
|
|
5276
|
-
return
|
|
5276
|
+
return At.forEach(s, (c, u) => {
|
|
5277
5277
|
if (yt(c) && c.type === fs) {
|
|
5278
5278
|
const d = c;
|
|
5279
|
-
a.push(
|
|
5279
|
+
a.push(_e(d, { ...d.props, variant: n, key: c.key ?? `k-button--${u}}` }));
|
|
5280
5280
|
}
|
|
5281
5281
|
}), a;
|
|
5282
5282
|
}, [s, n]);
|
|
5283
5283
|
return /* @__PURE__ */ l.jsx("div", { ...i, className: r, role: "group", children: o });
|
|
5284
|
-
}, r2 =
|
|
5284
|
+
}, r2 = I(Br);
|
|
5285
5285
|
r2.displayName = "KButtonGroup";
|
|
5286
5286
|
Br.displayName = "KButtonGroup";
|
|
5287
5287
|
const Ir = ({ multiple: t, className: e, variant: n = "outlined", children: s, ...i }) => {
|
|
5288
|
-
const [r, o] =
|
|
5288
|
+
const [r, o] = at(null), [a, c] = at([]), u = b(() => {
|
|
5289
5289
|
const p = ["k-toggle-button"];
|
|
5290
5290
|
return e && p.push(e), p.join(" ");
|
|
5291
|
-
}, [e]), d =
|
|
5291
|
+
}, [e]), d = S(
|
|
5292
5292
|
(p) => {
|
|
5293
5293
|
t ? c((m) => m.includes(p) ? m.filter((y) => y !== p) : [...m, p]) : o((m) => m === p ? null : p);
|
|
5294
5294
|
},
|
|
5295
5295
|
[t]
|
|
5296
|
-
), h =
|
|
5296
|
+
), h = S(
|
|
5297
5297
|
(p) => t ? a.includes(p) : r === p,
|
|
5298
5298
|
[t, r, a]
|
|
5299
|
-
), f = b(() =>
|
|
5299
|
+
), f = b(() => At.toArray(s).map((p, m) => {
|
|
5300
5300
|
if (!yt(p) || p.type !== fs) return null;
|
|
5301
|
-
const y = h(m),
|
|
5302
|
-
d(m),
|
|
5303
|
-
}, x = (
|
|
5304
|
-
|
|
5301
|
+
const y = h(m), w = p, C = (v) => {
|
|
5302
|
+
d(m), w.props.onClick?.(v);
|
|
5303
|
+
}, x = (v) => {
|
|
5304
|
+
w.props.onKeyDown?.(v), Mt(v, () => d(m));
|
|
5305
5305
|
};
|
|
5306
|
-
return
|
|
5307
|
-
...
|
|
5306
|
+
return _e(w, {
|
|
5307
|
+
...w.props,
|
|
5308
5308
|
variant: n,
|
|
5309
5309
|
className: y ? "k-button--selected" : void 0,
|
|
5310
5310
|
key: p.key ?? `k-button--${m}`,
|
|
5311
|
-
onClick:
|
|
5311
|
+
onClick: C,
|
|
5312
5312
|
onKeyDown: x
|
|
5313
5313
|
});
|
|
5314
5314
|
}), [s, n, h, d]);
|
|
5315
5315
|
return /* @__PURE__ */ l.jsx("div", { ...i, className: u, role: "group", children: f });
|
|
5316
5316
|
};
|
|
5317
5317
|
Ir.displayName = "KToggleButton";
|
|
5318
|
-
const L2 =
|
|
5319
|
-
const { className: n, value: s, disabled: i, size: r = "medium", ...o } = t, a =
|
|
5318
|
+
const L2 = I(Ir), Or = Z((t, e) => {
|
|
5319
|
+
const { className: n, value: s, disabled: i, size: r = "medium", ...o } = t, a = J(null), c = b(() => {
|
|
5320
5320
|
const u = ["k-switch", `k-switch--${s ? "on" : "off"}`];
|
|
5321
5321
|
return n && u.push(n), r && u.push(`k-switch--${r}`), i && u.push("k-switch--disabled"), u.join(" ");
|
|
5322
5322
|
}, [s, n, r, i]);
|
|
5323
|
-
return
|
|
5323
|
+
return pt(e, () => ({
|
|
5324
5324
|
toggle: () => a.current?.click()
|
|
5325
5325
|
})), /* @__PURE__ */ l.jsx(no, { ref: a, ...o, value: s, className: c, disabled: i, children: /* @__PURE__ */ l.jsx("span", { className: "k-switch__toggle" }) });
|
|
5326
|
-
}), a2 =
|
|
5326
|
+
}), a2 = I(Or);
|
|
5327
5327
|
Or.displayName = "KSwitch";
|
|
5328
5328
|
a2.displayName = "KSwitch";
|
|
5329
5329
|
const Fr = (t) => {
|
|
@@ -5331,14 +5331,14 @@ const Fr = (t) => {
|
|
|
5331
5331
|
const h = ["k-accordion", `k-accordion--${a}`];
|
|
5332
5332
|
return e && h.push(e), h.join(" ");
|
|
5333
5333
|
}, [e, a]), d = b(() => ({ ...o, maxWidth: r }), [o, r]);
|
|
5334
|
-
return /* @__PURE__ */ l.jsxs(
|
|
5335
|
-
/* @__PURE__ */ l.jsxs(
|
|
5334
|
+
return /* @__PURE__ */ l.jsxs($t, { className: u, style: d, defaultOpen: n, ...c, children: [
|
|
5335
|
+
/* @__PURE__ */ l.jsxs($t.Summary, { className: "k-accordion__summary", children: [
|
|
5336
5336
|
/* @__PURE__ */ l.jsx("p", { className: "k-accordion__summary__text", children: s }),
|
|
5337
|
-
/* @__PURE__ */ l.jsx(
|
|
5337
|
+
/* @__PURE__ */ l.jsx(Ce, { icon: "keyboard_arrow_down", size: "small", className: "k-accordion__summary__icon" })
|
|
5338
5338
|
] }),
|
|
5339
|
-
/* @__PURE__ */ l.jsx(
|
|
5339
|
+
/* @__PURE__ */ l.jsx($t.Content, { className: "k-accordion__content", children: /* @__PURE__ */ l.jsx("div", { className: "k-accordion__content__container", children: i }) })
|
|
5340
5340
|
] });
|
|
5341
|
-
}, l2 =
|
|
5341
|
+
}, l2 = I(Fr);
|
|
5342
5342
|
l2.displayName = "KAccordion";
|
|
5343
5343
|
Fr.displayName = "KAccordion";
|
|
5344
5344
|
const zr = Z((t, e) => {
|
|
@@ -5357,63 +5357,63 @@ const zr = Z((t, e) => {
|
|
|
5357
5357
|
onMouseLeave: p,
|
|
5358
5358
|
onMouseUp: m,
|
|
5359
5359
|
onKeyDown: y,
|
|
5360
|
-
onKeyUp:
|
|
5361
|
-
...
|
|
5362
|
-
} = t, x =
|
|
5363
|
-
|
|
5360
|
+
onKeyUp: w,
|
|
5361
|
+
...C
|
|
5362
|
+
} = t, x = J(null), v = Tn(x);
|
|
5363
|
+
pt(e, () => x.current, []);
|
|
5364
5364
|
const T = b(() => {
|
|
5365
5365
|
const O = ["k-menu-item", `k-menu-item--${r}`];
|
|
5366
5366
|
return s && O.push(s), d && O.push("k-menu-item--disabled"), O.join(" ");
|
|
5367
|
-
}, [s, r]),
|
|
5367
|
+
}, [s, r]), k = b(() => ({ ...i }), [i]), L = S((O) => {
|
|
5368
5368
|
d || h?.(O);
|
|
5369
|
-
}, [d, h]),
|
|
5370
|
-
f?.(O), d ||
|
|
5371
|
-
}, [
|
|
5372
|
-
m?.(O),
|
|
5373
|
-
}, [
|
|
5374
|
-
p?.(O),
|
|
5375
|
-
}, [
|
|
5376
|
-
y?.(O),
|
|
5369
|
+
}, [d, h]), M = S((O) => {
|
|
5370
|
+
f?.(O), d || v?.register(O);
|
|
5371
|
+
}, [v, f]), j = S((O) => {
|
|
5372
|
+
m?.(O), v.remove();
|
|
5373
|
+
}, [v, m]), _ = S((O) => {
|
|
5374
|
+
p?.(O), v.remove();
|
|
5375
|
+
}, [v, p]), N = S((O) => {
|
|
5376
|
+
y?.(O), v?.register(O), Mt(O, () => {
|
|
5377
5377
|
h?.();
|
|
5378
5378
|
});
|
|
5379
|
-
}, [
|
|
5380
|
-
|
|
5381
|
-
}, [
|
|
5379
|
+
}, [v, y]), B = S((O) => {
|
|
5380
|
+
w?.(O), Mt(O, () => v.remove());
|
|
5381
|
+
}, [v, w]), K = b(() => o ? /* @__PURE__ */ l.jsx("span", { className: "k-menu-item__left-content", children: o }) : null, [o]), R = b(() => /* @__PURE__ */ l.jsx("div", { className: "k-menu-item__label", children: a }), [a]), G = b(() => c ? /* @__PURE__ */ l.jsx("span", { className: "k-menu-item__right-content", children: c }) : null, [c]), D = b(() => u ? /* @__PURE__ */ l.jsx("span", { className: "k-menu-item__shortcut", children: u }) : null, [u]);
|
|
5382
5382
|
return /* @__PURE__ */ l.jsxs(
|
|
5383
5383
|
to,
|
|
5384
5384
|
{
|
|
5385
5385
|
as: "li",
|
|
5386
5386
|
ref: x,
|
|
5387
|
-
...
|
|
5387
|
+
...C,
|
|
5388
5388
|
className: T,
|
|
5389
|
-
style:
|
|
5389
|
+
style: k,
|
|
5390
5390
|
disabled: d,
|
|
5391
|
-
onClick:
|
|
5392
|
-
onMouseDown:
|
|
5393
|
-
onMouseUp:
|
|
5394
|
-
onMouseLeave:
|
|
5391
|
+
onClick: L,
|
|
5392
|
+
onMouseDown: M,
|
|
5393
|
+
onMouseUp: j,
|
|
5394
|
+
onMouseLeave: _,
|
|
5395
5395
|
onKeyDown: N,
|
|
5396
|
-
onKeyUp:
|
|
5396
|
+
onKeyUp: B,
|
|
5397
5397
|
children: [
|
|
5398
|
-
|
|
5398
|
+
K,
|
|
5399
5399
|
R,
|
|
5400
|
-
|
|
5400
|
+
D,
|
|
5401
5401
|
G
|
|
5402
5402
|
]
|
|
5403
5403
|
}
|
|
5404
5404
|
);
|
|
5405
|
-
}),
|
|
5406
|
-
|
|
5405
|
+
}), ze = I(zr);
|
|
5406
|
+
ze.displayName = "KMenu.Item";
|
|
5407
5407
|
zr.displayName = "KMenu.Item";
|
|
5408
5408
|
const Kr = Z((t, e) => {
|
|
5409
|
-
const { selected: n, className: s, label: i, ...r } = t, o =
|
|
5410
|
-
|
|
5409
|
+
const { selected: n, className: s, label: i, ...r } = t, o = J(null);
|
|
5410
|
+
pt(e, () => o.current, []);
|
|
5411
5411
|
const a = b(() => {
|
|
5412
5412
|
const u = ["k-menu-item-selectable"];
|
|
5413
5413
|
return s && u.push(s), n && u.push("k-menu-item-selectable--selected"), u.join(" ");
|
|
5414
|
-
}, [s, n]), c = b(() => n && /* @__PURE__ */ l.jsx(
|
|
5414
|
+
}, [s, n]), c = b(() => n && /* @__PURE__ */ l.jsx(Ce, { className: "k-menu-item-selectable-check", icon: "check", size: 10 }), [n]);
|
|
5415
5415
|
return /* @__PURE__ */ l.jsx(
|
|
5416
|
-
|
|
5416
|
+
ze,
|
|
5417
5417
|
{
|
|
5418
5418
|
ref: o,
|
|
5419
5419
|
...r,
|
|
@@ -5423,18 +5423,18 @@ const Kr = Z((t, e) => {
|
|
|
5423
5423
|
leftContent: c
|
|
5424
5424
|
}
|
|
5425
5425
|
);
|
|
5426
|
-
}), ps =
|
|
5426
|
+
}), ps = I(Kr);
|
|
5427
5427
|
ps.displayName = "KMenu.ItemSelectable";
|
|
5428
5428
|
Kr.displayName = "KMenu.ItemSelectable";
|
|
5429
5429
|
const Wr = Z((t, e) => {
|
|
5430
|
-
const { children: n, className: s, ...i } = t, r =
|
|
5431
|
-
|
|
5430
|
+
const { children: n, className: s, ...i } = t, r = J(null);
|
|
5431
|
+
pt(e, () => r.current, []);
|
|
5432
5432
|
const o = b(() => {
|
|
5433
5433
|
const a = ["k-menu-item-divider"];
|
|
5434
5434
|
return s && a.push(s), a.join(" ");
|
|
5435
5435
|
}, [s]);
|
|
5436
5436
|
return /* @__PURE__ */ l.jsx("li", { ref: r, ...i, className: o, role: "separator", "aria-orientation": "horizontal" });
|
|
5437
|
-
}), ms =
|
|
5437
|
+
}), ms = I(Wr);
|
|
5438
5438
|
ms.displayName = "KMenu.ItemDivider";
|
|
5439
5439
|
Wr.displayName = "KMenu.ItemDivider";
|
|
5440
5440
|
const $r = Z((t, e) => {
|
|
@@ -5443,24 +5443,24 @@ const $r = Z((t, e) => {
|
|
|
5443
5443
|
return s && h.push(s), h.join(" ");
|
|
5444
5444
|
}, [s, o]), u = b(() => ({ ...i, width: r }), [i, r]), d = b(() => {
|
|
5445
5445
|
const h = [];
|
|
5446
|
-
return
|
|
5447
|
-
if (yt(f) && (f.type ===
|
|
5446
|
+
return At.forEach(n, (f, p) => {
|
|
5447
|
+
if (yt(f) && (f.type === ze || f.type === ps || f.type === ms)) {
|
|
5448
5448
|
const m = f;
|
|
5449
|
-
h.push(
|
|
5449
|
+
h.push(_e(m, { ...m.props, size: o, key: f.key ?? `k-menu-item-${p}` }));
|
|
5450
5450
|
}
|
|
5451
5451
|
}), h;
|
|
5452
5452
|
}, [n, o]);
|
|
5453
5453
|
return /* @__PURE__ */ l.jsx(Vn, { ...a, as: "ul", ref: e, className: c, style: u, children: d });
|
|
5454
|
-
}), Ur =
|
|
5454
|
+
}), Ur = I($r);
|
|
5455
5455
|
Ur.displayName = "KMenu";
|
|
5456
5456
|
$r.displayName = "KMenu";
|
|
5457
|
-
const
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5457
|
+
const Ut = Ur;
|
|
5458
|
+
Ut.Item = ze;
|
|
5459
|
+
Ut.ItemSelectable = ps;
|
|
5460
|
+
Ut.ItemDivider = ms;
|
|
5461
5461
|
const Hr = wt(null);
|
|
5462
5462
|
function Zr() {
|
|
5463
|
-
const t =
|
|
5463
|
+
const t = tt(Hr);
|
|
5464
5464
|
if (!t) throw new Error("KDropdown must be used within <KDropdown>");
|
|
5465
5465
|
return t;
|
|
5466
5466
|
}
|
|
@@ -5476,28 +5476,28 @@ const Gr = Z((t, e) => {
|
|
|
5476
5476
|
onFocus: u,
|
|
5477
5477
|
onBlur: d,
|
|
5478
5478
|
...h
|
|
5479
|
-
} = t, { id: f, triggerRef: p, contentRef: m, trigger: y, open:
|
|
5480
|
-
|
|
5481
|
-
const
|
|
5479
|
+
} = t, { id: f, triggerRef: p, contentRef: m, trigger: y, open: w, onOpen: C, onClose: x, onFocusContent: v } = Zr(), T = b(() => r ? -1 : 0, [r]);
|
|
5480
|
+
pt(e, () => p.current, []);
|
|
5481
|
+
const k = b(() => {
|
|
5482
5482
|
const R = ["k-dropdown__trigger"];
|
|
5483
5483
|
return s && R.push(s), r && R.push("k-dropdown__trigger--disabled"), R.join(" ");
|
|
5484
|
-
}, [s, r]),
|
|
5485
|
-
i?.(R), y === "click" && !r && (
|
|
5486
|
-
}, [
|
|
5487
|
-
o?.(R), y === "hover" && !r &&
|
|
5488
|
-
}, [y, o, r]),
|
|
5484
|
+
}, [s, r]), L = S((R) => {
|
|
5485
|
+
i?.(R), y === "click" && !r && (w ? x() : C());
|
|
5486
|
+
}, [w, i, y, r]), M = S((R) => {
|
|
5487
|
+
o?.(R), y === "hover" && !r && C();
|
|
5488
|
+
}, [y, o, r]), j = S((R) => {
|
|
5489
5489
|
a?.(R), y === "hover" && x();
|
|
5490
|
-
}, [y, a]),
|
|
5490
|
+
}, [y, a]), _ = S((R) => {
|
|
5491
5491
|
if (c?.(R), r)
|
|
5492
5492
|
return;
|
|
5493
|
-
|
|
5494
|
-
const G = y === "hover" && R.key === "Tab" && !R.shiftKey,
|
|
5495
|
-
(G ||
|
|
5496
|
-
}, [c, y,
|
|
5497
|
-
u?.(R), y === "hover" && !r &&
|
|
5498
|
-
}, [u, y, r]),
|
|
5493
|
+
Mt(R, C);
|
|
5494
|
+
const G = y === "hover" && R.key === "Tab" && !R.shiftKey, D = y === "click" && w && R.key === "Tab" && !R.shiftKey;
|
|
5495
|
+
(G || D) && (R.preventDefault(), v());
|
|
5496
|
+
}, [c, y, w, r]), N = S((R) => {
|
|
5497
|
+
u?.(R), y === "hover" && !r && C();
|
|
5498
|
+
}, [u, y, r]), B = S((R) => {
|
|
5499
5499
|
d?.(R), y === "hover" && x();
|
|
5500
|
-
}, [d, y]),
|
|
5500
|
+
}, [d, y]), K = b(() => At.map(n, (R) => yt(R) ? _e(R, { tabIndex: -1 }) : R), [n]);
|
|
5501
5501
|
return ma(m, x, p), // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex,jsx-a11y/no-static-element-interactions
|
|
5502
5502
|
/* @__PURE__ */ l.jsx(
|
|
5503
5503
|
"div",
|
|
@@ -5505,22 +5505,22 @@ const Gr = Z((t, e) => {
|
|
|
5505
5505
|
...h,
|
|
5506
5506
|
tabIndex: T,
|
|
5507
5507
|
ref: p,
|
|
5508
|
-
className:
|
|
5508
|
+
className: k,
|
|
5509
5509
|
role: "button",
|
|
5510
5510
|
id: f,
|
|
5511
|
-
"aria-controls":
|
|
5512
|
-
"aria-expanded":
|
|
5511
|
+
"aria-controls": w ? f : void 0,
|
|
5512
|
+
"aria-expanded": w,
|
|
5513
5513
|
"aria-haspopup": "true",
|
|
5514
|
-
onKeyDown:
|
|
5515
|
-
onClick:
|
|
5516
|
-
onMouseEnter:
|
|
5517
|
-
onMouseLeave:
|
|
5514
|
+
onKeyDown: _,
|
|
5515
|
+
onClick: L,
|
|
5516
|
+
onMouseEnter: M,
|
|
5517
|
+
onMouseLeave: j,
|
|
5518
5518
|
onFocus: N,
|
|
5519
|
-
onBlur:
|
|
5520
|
-
children:
|
|
5519
|
+
onBlur: B,
|
|
5520
|
+
children: K
|
|
5521
5521
|
}
|
|
5522
5522
|
);
|
|
5523
|
-
}), gs =
|
|
5523
|
+
}), gs = I(Gr);
|
|
5524
5524
|
gs.displayName = "Dropdown.Trigger";
|
|
5525
5525
|
Gr.displayName = "Dropdown.Trigger";
|
|
5526
5526
|
const c2 = 240, Yr = Z((t, e) => {
|
|
@@ -5539,53 +5539,53 @@ const c2 = 240, Yr = Z((t, e) => {
|
|
|
5539
5539
|
offset: p,
|
|
5540
5540
|
container: m,
|
|
5541
5541
|
zIndex: y,
|
|
5542
|
-
...
|
|
5543
|
-
} = t, { open:
|
|
5542
|
+
...w
|
|
5543
|
+
} = t, { open: C, triggerRef: x, contentRef: v, position: T, onOpen: k, onClose: L, onBlurContent: M, trigger: j } = Zr(), { top: _, left: N } = ga({
|
|
5544
5544
|
triggerRef: x,
|
|
5545
|
-
contentRef:
|
|
5545
|
+
contentRef: v,
|
|
5546
5546
|
position: T,
|
|
5547
5547
|
offset: p,
|
|
5548
|
-
open:
|
|
5548
|
+
open: C,
|
|
5549
5549
|
gap: f
|
|
5550
|
-
}),
|
|
5551
|
-
Ui(
|
|
5552
|
-
const
|
|
5550
|
+
}), B = Mn(m);
|
|
5551
|
+
Ui(L), pt(e, () => v.current);
|
|
5552
|
+
const K = b(() => {
|
|
5553
5553
|
const g = ["k-dropdown__content"];
|
|
5554
5554
|
return n && g.push(n), g.join(" ");
|
|
5555
|
-
}, [n]), R = b(() => ({ ...s, position: "fixed", top:
|
|
5556
|
-
r?.(g), h &&
|
|
5557
|
-
}, [r, h]),
|
|
5558
|
-
o?.(g),
|
|
5559
|
-
}, [
|
|
5560
|
-
a?.(g),
|
|
5561
|
-
}, [
|
|
5562
|
-
|
|
5563
|
-
}, [d]),
|
|
5564
|
-
c?.(g),
|
|
5565
|
-
}, [c,
|
|
5566
|
-
u?.(g),
|
|
5567
|
-
}, [u,
|
|
5568
|
-
if (
|
|
5569
|
-
}, [
|
|
5555
|
+
}, [n]), R = b(() => ({ ...s, position: "fixed", top: _, left: N, zIndex: y }), [s, _, N, y]), G = S((g) => {
|
|
5556
|
+
r?.(g), h && L();
|
|
5557
|
+
}, [r, h]), D = S((g) => {
|
|
5558
|
+
o?.(g), j === "hover" && k();
|
|
5559
|
+
}, [j, o]), O = S((g) => {
|
|
5560
|
+
a?.(g), j === "hover" && L();
|
|
5561
|
+
}, [j, a]), z = S((g) => {
|
|
5562
|
+
Mt(g, L), g.key === "Tab" && g.shiftKey && M(g);
|
|
5563
|
+
}, [d]), Y = S((g) => {
|
|
5564
|
+
c?.(g), j === "hover" && k();
|
|
5565
|
+
}, [c, j]), lt = S((g) => {
|
|
5566
|
+
u?.(g), j === "hover" && L();
|
|
5567
|
+
}, [u, j]);
|
|
5568
|
+
if (Tt(() => {
|
|
5569
|
+
}, [C]), !!B)
|
|
5570
5570
|
return Sn(
|
|
5571
5571
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
5572
5572
|
/* @__PURE__ */ l.jsx(
|
|
5573
5573
|
"div",
|
|
5574
5574
|
{
|
|
5575
|
-
ref:
|
|
5576
|
-
...
|
|
5577
|
-
className:
|
|
5575
|
+
ref: v,
|
|
5576
|
+
...w,
|
|
5577
|
+
className: K,
|
|
5578
5578
|
style: R,
|
|
5579
5579
|
onClick: G,
|
|
5580
|
-
onMouseEnter:
|
|
5580
|
+
onMouseEnter: D,
|
|
5581
5581
|
onMouseLeave: O,
|
|
5582
|
-
onFocus:
|
|
5583
|
-
onBlur:
|
|
5584
|
-
onKeyDown:
|
|
5582
|
+
onFocus: Y,
|
|
5583
|
+
onBlur: lt,
|
|
5584
|
+
onKeyDown: z,
|
|
5585
5585
|
children: /* @__PURE__ */ l.jsx(
|
|
5586
|
-
|
|
5586
|
+
Fe,
|
|
5587
5587
|
{
|
|
5588
|
-
isOpen:
|
|
5588
|
+
isOpen: C,
|
|
5589
5589
|
initial: { opacity: 0 },
|
|
5590
5590
|
animate: { opacity: 1 },
|
|
5591
5591
|
exit: { opacity: 0 },
|
|
@@ -5595,9 +5595,9 @@ const c2 = 240, Yr = Z((t, e) => {
|
|
|
5595
5595
|
)
|
|
5596
5596
|
}
|
|
5597
5597
|
),
|
|
5598
|
-
|
|
5598
|
+
B
|
|
5599
5599
|
);
|
|
5600
|
-
}), ys =
|
|
5600
|
+
}), ys = I(Yr);
|
|
5601
5601
|
ys.displayName = "Dropdown.Content";
|
|
5602
5602
|
Yr.displayName = "Dropdown.Content";
|
|
5603
5603
|
const Xr = Z((t, e) => {
|
|
@@ -5607,56 +5607,62 @@ const Xr = Z((t, e) => {
|
|
|
5607
5607
|
position: i = "top-end",
|
|
5608
5608
|
children: r,
|
|
5609
5609
|
className: o,
|
|
5610
|
-
|
|
5611
|
-
|
|
5610
|
+
onDropdownOpen: a,
|
|
5611
|
+
onDropdownClose: c,
|
|
5612
|
+
...u
|
|
5613
|
+
} = t, d = n || "div", [h, f] = at(!1), p = J(null), m = J(null), y = `k-dropdown-${Yt()}`, w = b(() => {
|
|
5612
5614
|
const j = ["k-dropdown"];
|
|
5613
5615
|
return o && j.push(o), j.join(" ");
|
|
5614
|
-
}, [o]),
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5616
|
+
}, [o]), C = S(() => {
|
|
5617
|
+
f(!0), a?.();
|
|
5618
|
+
}, [a]), x = S(() => {
|
|
5619
|
+
f(!1), c?.();
|
|
5620
|
+
}, [c]);
|
|
5621
|
+
pt(e, () => ({
|
|
5622
|
+
onOpen: C,
|
|
5623
|
+
onClose: x
|
|
5618
5624
|
}));
|
|
5619
|
-
const { Trigger: v, Content:
|
|
5620
|
-
const j =
|
|
5621
|
-
(
|
|
5622
|
-
),
|
|
5623
|
-
(
|
|
5625
|
+
const { Trigger: v, Content: T } = b(() => {
|
|
5626
|
+
const j = At.toArray(r), _ = j.find(
|
|
5627
|
+
(B) => yt(B) && B.type === gs
|
|
5628
|
+
), N = j.find(
|
|
5629
|
+
(B) => yt(B) && B.type === ys
|
|
5624
5630
|
);
|
|
5625
|
-
return { Trigger:
|
|
5626
|
-
}, [r]),
|
|
5627
|
-
if (!
|
|
5628
|
-
|
|
5631
|
+
return { Trigger: _, Content: N };
|
|
5632
|
+
}, [r]), k = S(() => {
|
|
5633
|
+
if (!m.current) return;
|
|
5634
|
+
m.current.querySelector(
|
|
5629
5635
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), [role="menuitem"]'
|
|
5630
5636
|
)?.focus();
|
|
5631
|
-
}, []),
|
|
5632
|
-
if (!
|
|
5633
|
-
|
|
5637
|
+
}, []), L = S((j) => {
|
|
5638
|
+
if (!m.current) return;
|
|
5639
|
+
m.current.querySelector(
|
|
5634
5640
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), [role="menuitem"]'
|
|
5635
|
-
) === j.target && (j.preventDefault(),
|
|
5636
|
-
}, []),
|
|
5641
|
+
) === j.target && (j.preventDefault(), p.current?.focus());
|
|
5642
|
+
}, []), M = b(
|
|
5637
5643
|
() => ({
|
|
5638
|
-
open:
|
|
5639
|
-
onOpen:
|
|
5640
|
-
onClose:
|
|
5641
|
-
onFocusContent:
|
|
5642
|
-
onBlurContent:
|
|
5643
|
-
triggerRef:
|
|
5644
|
-
id:
|
|
5645
|
-
contentRef:
|
|
5644
|
+
open: h,
|
|
5645
|
+
onOpen: C,
|
|
5646
|
+
onClose: x,
|
|
5647
|
+
onFocusContent: k,
|
|
5648
|
+
onBlurContent: L,
|
|
5649
|
+
triggerRef: p,
|
|
5650
|
+
id: y,
|
|
5651
|
+
contentRef: m,
|
|
5646
5652
|
trigger: s,
|
|
5647
5653
|
position: i
|
|
5648
5654
|
}),
|
|
5649
|
-
[
|
|
5655
|
+
[h, s, i]
|
|
5650
5656
|
);
|
|
5651
|
-
return /* @__PURE__ */ l.jsx(
|
|
5657
|
+
return /* @__PURE__ */ l.jsx(d, { ...u, ...u, className: w, children: /* @__PURE__ */ l.jsxs(Hr, { value: M, children: [
|
|
5652
5658
|
v,
|
|
5653
|
-
|
|
5659
|
+
T
|
|
5654
5660
|
] }) });
|
|
5655
|
-
}),
|
|
5656
|
-
|
|
5661
|
+
}), Ht = I(Xr);
|
|
5662
|
+
Ht.displayName = "Dropdown";
|
|
5657
5663
|
Xr.displayName = "Dropdown";
|
|
5658
|
-
|
|
5659
|
-
|
|
5664
|
+
Ht.Trigger = gs;
|
|
5665
|
+
Ht.Content = ys;
|
|
5660
5666
|
const T2 = [
|
|
5661
5667
|
"top-start",
|
|
5662
5668
|
"top",
|
|
@@ -5686,43 +5692,43 @@ const T2 = [
|
|
|
5686
5692
|
"aria-hidden": "true"
|
|
5687
5693
|
}
|
|
5688
5694
|
);
|
|
5689
|
-
}, u2 =
|
|
5695
|
+
}, u2 = I(qr);
|
|
5690
5696
|
u2.displayName = "KSkeleton";
|
|
5691
5697
|
qr.displayName = "KSkeleton";
|
|
5692
5698
|
const Jr = wt(null), d2 = () => {
|
|
5693
|
-
const t =
|
|
5699
|
+
const t = tt(Jr);
|
|
5694
5700
|
if (!t) throw new Error("useModal must be used within a ModalProvider");
|
|
5695
5701
|
return t;
|
|
5696
5702
|
}, h2 = {
|
|
5697
5703
|
fade: {
|
|
5698
|
-
initial: { opacity: 0, transform: "translate(-50%, -50%)" },
|
|
5699
|
-
animate: { opacity: 1, transform: "translate(-50%, -50%)" },
|
|
5700
|
-
exit: { opacity: 0, transform: "translate(-50%, -50%)" },
|
|
5701
|
-
transition: { duration: 0.
|
|
5704
|
+
initial: { opacity: 0, top: "50%", left: "50%", transform: "translate(-50%, -50%)" },
|
|
5705
|
+
animate: { opacity: 1, top: "50%", left: "50%", transform: "translate(-50%, -50%)" },
|
|
5706
|
+
exit: { opacity: 0, top: "50%", left: "50%", transform: "translate(-50%, -50%)" },
|
|
5707
|
+
transition: { duration: 0.12, ease: "easeInOut" }
|
|
5702
5708
|
},
|
|
5703
5709
|
slide: {
|
|
5704
5710
|
initial: { opacity: 0, top: "calc(50% - 8px)", left: "50%", transform: "translate(-50%, -50%)" },
|
|
5705
5711
|
animate: { opacity: 1, top: "50%", left: "50%", transform: "translate(-50%, -50%)" },
|
|
5706
5712
|
exit: { opacity: 0, top: "calc(50% - 8px)", left: "50%", transform: "translate(-50%, -50%)" },
|
|
5707
|
-
transition: { duration: 0.
|
|
5713
|
+
transition: { duration: 0.12, ease: "easeInOut" }
|
|
5708
5714
|
},
|
|
5709
5715
|
scale: {
|
|
5710
5716
|
initial: { opacity: 0, top: "50%", left: "50%", transform: "translate(-50%, -50%) scale(0.96)" },
|
|
5711
5717
|
animate: { opacity: 1, top: "50%", left: "50%", transform: "translate(-50%, -50%) scale(1)" },
|
|
5712
5718
|
exit: { opacity: 0, top: "50%", left: "50%", transform: "translate(-50%, -50%) scale(0.96)" },
|
|
5713
|
-
transition: { duration: 0.
|
|
5719
|
+
transition: { duration: 0.12, ease: "easeInOut" }
|
|
5714
5720
|
}
|
|
5715
5721
|
}, Qr = Z((t, e) => {
|
|
5716
5722
|
const { title: n, children: s, className: i, ...r } = t, { setTitle: o } = d2(), a = b(() => {
|
|
5717
5723
|
const u = ["k-modal__header"];
|
|
5718
5724
|
return i && u.push(i), u.join(" ");
|
|
5719
|
-
}, [i]), c =
|
|
5725
|
+
}, [i]), c = S(() => {
|
|
5720
5726
|
typeof n == "string" && o(n), typeof s == "string" && o(s);
|
|
5721
5727
|
}, [n, s]);
|
|
5722
|
-
return
|
|
5728
|
+
return Tt(() => {
|
|
5723
5729
|
c();
|
|
5724
5730
|
}, [n, s]), /* @__PURE__ */ l.jsx("div", { ref: e, ...r, className: a, children: n ?? s });
|
|
5725
|
-
}), xs =
|
|
5731
|
+
}), xs = I(Qr);
|
|
5726
5732
|
xs.displayName = "KModalHeader";
|
|
5727
5733
|
Qr.displayName = "KModalHeader";
|
|
5728
5734
|
const ta = Z((t, e) => {
|
|
@@ -5734,7 +5740,7 @@ const ta = Z((t, e) => {
|
|
|
5734
5740
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
5735
5741
|
/* @__PURE__ */ l.jsx("div", { ref: e, ...i, className: r, tabIndex: 0, children: n })
|
|
5736
5742
|
);
|
|
5737
|
-
}), vs =
|
|
5743
|
+
}), vs = I(ta);
|
|
5738
5744
|
vs.displayName = "KModalContent";
|
|
5739
5745
|
ta.displayName = "KModalContent";
|
|
5740
5746
|
const ea = Z((t, e) => {
|
|
@@ -5743,7 +5749,7 @@ const ea = Z((t, e) => {
|
|
|
5743
5749
|
return s && a.push(s), a.join(" ");
|
|
5744
5750
|
}, [s]);
|
|
5745
5751
|
return /* @__PURE__ */ l.jsx("div", { ref: e, ...r, className: o, children: n });
|
|
5746
|
-
}), Cs =
|
|
5752
|
+
}), Cs = I(ea);
|
|
5747
5753
|
Cs.displayName = "KModalFooter";
|
|
5748
5754
|
ea.displayName = "KModalFooter";
|
|
5749
5755
|
const na = (t) => {
|
|
@@ -5763,57 +5769,57 @@ const na = (t) => {
|
|
|
5763
5769
|
escClosable: p = !1,
|
|
5764
5770
|
children: m,
|
|
5765
5771
|
container: y
|
|
5766
|
-
} = t,
|
|
5772
|
+
} = t, w = Mn(y), [C, x] = at(null), v = b(() => h2[u], [u]);
|
|
5767
5773
|
if (r === void 0 && typeof o != "function")
|
|
5768
5774
|
throw new Error('You must provide at least one of "setIsOpen" or "onClose".');
|
|
5769
|
-
const T = b(() => ({ ...c, width: n, height: s }), [c, n, s]),
|
|
5770
|
-
const
|
|
5771
|
-
return e &&
|
|
5772
|
-
}, [e, i, a]),
|
|
5775
|
+
const T = b(() => ({ ...c, width: n, height: s }), [c, n, s]), k = b(() => {
|
|
5776
|
+
const K = ["k-modal", `k-modal--${i}`];
|
|
5777
|
+
return e && K.push("k-modal--open"), e || K.push("k-modal--close"), a && K.push(a), K.join(" ");
|
|
5778
|
+
}, [e, i, a]), L = S(() => {
|
|
5773
5779
|
o?.(), r?.(!1);
|
|
5774
|
-
}, [o, r]),
|
|
5775
|
-
f &&
|
|
5776
|
-
}, [f,
|
|
5777
|
-
let
|
|
5778
|
-
return
|
|
5779
|
-
yt(
|
|
5780
|
-
}), { modalHeader:
|
|
5781
|
-
}, [m]),
|
|
5780
|
+
}, [o, r]), M = S(() => {
|
|
5781
|
+
f && L();
|
|
5782
|
+
}, [f, L]), { modalHeader: j, modalContent: _, modalFooter: N } = b(() => {
|
|
5783
|
+
let K = null, R = null, G = null;
|
|
5784
|
+
return At.forEach(m, (D) => {
|
|
5785
|
+
yt(D) && (D.type === xs && (K = D), D.type === vs && (R = D), D.type === Cs && (G = D));
|
|
5786
|
+
}), { modalHeader: K, modalContent: R, modalFooter: G };
|
|
5787
|
+
}, [m]), B = b(() => ({
|
|
5782
5788
|
isOpen: e,
|
|
5783
|
-
title:
|
|
5789
|
+
title: C,
|
|
5784
5790
|
setTitle: x
|
|
5785
|
-
}), [e,
|
|
5791
|
+
}), [e, C]);
|
|
5786
5792
|
return Ui(() => {
|
|
5787
|
-
p &&
|
|
5788
|
-
}),
|
|
5793
|
+
p && L();
|
|
5794
|
+
}), w ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
5789
5795
|
Sn(
|
|
5790
|
-
/* @__PURE__ */ l.jsx(Jr.Provider, { value:
|
|
5791
|
-
|
|
5796
|
+
/* @__PURE__ */ l.jsx(Jr.Provider, { value: B, children: /* @__PURE__ */ l.jsxs(
|
|
5797
|
+
Fe,
|
|
5792
5798
|
{
|
|
5793
5799
|
isOpen: e,
|
|
5794
|
-
className:
|
|
5800
|
+
className: k,
|
|
5795
5801
|
style: T,
|
|
5796
|
-
...
|
|
5802
|
+
...v,
|
|
5797
5803
|
role: "dialog",
|
|
5798
5804
|
"aria-modal": "true",
|
|
5799
|
-
"aria-label":
|
|
5805
|
+
"aria-label": C ?? void 0,
|
|
5800
5806
|
children: [
|
|
5801
|
-
|
|
5802
|
-
|
|
5807
|
+
j,
|
|
5808
|
+
_,
|
|
5803
5809
|
N
|
|
5804
5810
|
]
|
|
5805
5811
|
}
|
|
5806
5812
|
) }),
|
|
5807
|
-
|
|
5813
|
+
w
|
|
5808
5814
|
),
|
|
5809
|
-
d && /* @__PURE__ */ l.jsx(ia, { isOpen: e, onClick:
|
|
5815
|
+
d && /* @__PURE__ */ l.jsx(ia, { isOpen: e, onClick: M, opacity: h })
|
|
5810
5816
|
] }) : null;
|
|
5811
|
-
},
|
|
5812
|
-
|
|
5817
|
+
}, Ke = I(na);
|
|
5818
|
+
Ke.displayName = "KModal";
|
|
5813
5819
|
na.displayName = "KModal";
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5820
|
+
Ke.Header = xs;
|
|
5821
|
+
Ke.Content = vs;
|
|
5822
|
+
Ke.Footer = Cs;
|
|
5817
5823
|
const M2 = ["medium", "small", "large"], Ki = {
|
|
5818
5824
|
initial: { opacity: 0 },
|
|
5819
5825
|
animate: { opacity: 1 },
|
|
@@ -5833,34 +5839,34 @@ const M2 = ["medium", "small", "large"], Ki = {
|
|
|
5833
5839
|
container: d,
|
|
5834
5840
|
...h
|
|
5835
5841
|
} = t, f = Mn(d), p = b(() => c ? 0 : void 0, [c]), m = b(() => c ? { role: "button", "aria-label": "backdrop" } : { role: r, "aria-label": h["aria-label"] }, [c, r]), y = b(() => {
|
|
5836
|
-
const
|
|
5837
|
-
return n &&
|
|
5838
|
-
}, [n]),
|
|
5839
|
-
c?.(
|
|
5840
|
-
}, [c]),
|
|
5841
|
-
|
|
5842
|
+
const k = ["k-backdrop__container"];
|
|
5843
|
+
return n && k.push(n), k.join(" ");
|
|
5844
|
+
}, [n]), w = b(() => ({ ...s, opacity: o, zIndex: a }), [s, o, a]), C = b(() => typeof o == "number" ? { ...Ki, animate: { opacity: o, zIndex: a } } : Ki, [o, a]), x = S((k) => {
|
|
5845
|
+
c?.(k);
|
|
5846
|
+
}, [c]), v = S((k) => {
|
|
5847
|
+
Mt(k, () => {
|
|
5842
5848
|
c?.();
|
|
5843
|
-
}), u?.(
|
|
5849
|
+
}), u?.(k);
|
|
5844
5850
|
}, [u]), T = b(() => i ? {} : { role: "presentation" }, [i]);
|
|
5845
5851
|
return f ? Sn(
|
|
5846
|
-
/* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs(
|
|
5852
|
+
/* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs(Fe, { as: "div", isOpen: e, className: "k-backdrop", ...C, ...T, children: [
|
|
5847
5853
|
/* @__PURE__ */ l.jsx(
|
|
5848
5854
|
"div",
|
|
5849
5855
|
{
|
|
5850
5856
|
...m,
|
|
5851
5857
|
className: y,
|
|
5852
|
-
style:
|
|
5858
|
+
style: w,
|
|
5853
5859
|
...h,
|
|
5854
5860
|
tabIndex: p,
|
|
5855
5861
|
onClick: x,
|
|
5856
|
-
onKeyDown:
|
|
5862
|
+
onKeyDown: v
|
|
5857
5863
|
}
|
|
5858
5864
|
),
|
|
5859
5865
|
i
|
|
5860
5866
|
] }) }),
|
|
5861
5867
|
f
|
|
5862
5868
|
) : null;
|
|
5863
|
-
}, ia =
|
|
5869
|
+
}, ia = I(sa);
|
|
5864
5870
|
ia.displayName = "KBackdrop";
|
|
5865
5871
|
sa.displayName = "KBackdrop";
|
|
5866
5872
|
const oa = Z((t, e) => {
|
|
@@ -5898,7 +5904,7 @@ const oa = Z((t, e) => {
|
|
|
5898
5904
|
) })
|
|
5899
5905
|
}
|
|
5900
5906
|
);
|
|
5901
|
-
}), f2 =
|
|
5907
|
+
}), f2 = I(oa);
|
|
5902
5908
|
oa.displayName = "KSpinner";
|
|
5903
5909
|
f2.displayName = "KSpinner";
|
|
5904
5910
|
const P = "currentColor", p2 = {
|
|
@@ -6963,10 +6969,10 @@ const P = "currentColor", p2 = {
|
|
|
6963
6969
|
const n = p2[t](e);
|
|
6964
6970
|
return n || null;
|
|
6965
6971
|
}, ra = Z(({ ...t }, e) => {
|
|
6966
|
-
const { id: n, className: s, style: i } = { ...t }, { icon: r, size: o = "medium", onClick: a } = { ...t }, { color: c, disabled: u } = { ...t }, d =
|
|
6972
|
+
const { id: n, className: s, style: i } = { ...t }, { icon: r, size: o = "medium", onClick: a } = { ...t }, { color: c, disabled: u } = { ...t }, d = J(null), h = `k-icon-${Yt()}`, f = b(() => a ? 0 : void 0, [a]);
|
|
6967
6973
|
if (!r)
|
|
6968
6974
|
throw Error("Error: icon is required and must be provided.");
|
|
6969
|
-
|
|
6975
|
+
pt(e, () => ({
|
|
6970
6976
|
click: () => {
|
|
6971
6977
|
d.current?.click();
|
|
6972
6978
|
}
|
|
@@ -6982,9 +6988,9 @@ const P = "currentColor", p2 = {
|
|
|
6982
6988
|
if (!x)
|
|
6983
6989
|
throw Error(`Not Found icon. icon: ${r}`);
|
|
6984
6990
|
return x;
|
|
6985
|
-
}, [r, c]),
|
|
6991
|
+
}, [r, c]), w = S((x) => {
|
|
6986
6992
|
u || a?.(x);
|
|
6987
|
-
}, [a, u]),
|
|
6993
|
+
}, [a, u]), C = S((x) => {
|
|
6988
6994
|
(x.key === "enter" || x.key === " ") && (u || a?.(x));
|
|
6989
6995
|
}, [u, a]);
|
|
6990
6996
|
return (
|
|
@@ -6999,14 +7005,14 @@ const P = "currentColor", p2 = {
|
|
|
6999
7005
|
role: a ? "button" : "img",
|
|
7000
7006
|
tabIndex: f,
|
|
7001
7007
|
"aria-label": `${r} icon`,
|
|
7002
|
-
onClick:
|
|
7003
|
-
onKeyDown:
|
|
7008
|
+
onClick: w,
|
|
7009
|
+
onKeyDown: C,
|
|
7004
7010
|
children: y
|
|
7005
7011
|
}
|
|
7006
7012
|
)
|
|
7007
7013
|
);
|
|
7008
|
-
}),
|
|
7009
|
-
|
|
7014
|
+
}), Ce = I(ra);
|
|
7015
|
+
Ce.displayName = "KIcon";
|
|
7010
7016
|
ra.displayName = "KIcon";
|
|
7011
7017
|
const g2 = ["xsmall", "small", "medium", "large", "xlarge"], S2 = Object.values(g2), aa = Z((t, e) => {
|
|
7012
7018
|
const {
|
|
@@ -7024,88 +7030,108 @@ const g2 = ["xsmall", "small", "medium", "large", "xlarge"], S2 = Object.values(
|
|
|
7024
7030
|
disabled: p,
|
|
7025
7031
|
onChange: m,
|
|
7026
7032
|
...y
|
|
7027
|
-
} = t,
|
|
7033
|
+
} = t, w = b(() => o.find((it) => it.value === r)?.label || null, [r, o]), [C, x] = at(!1), v = J(null), T = J(null), [k, L] = at("auto"), [M, j] = at(null), _ = b(() => M ? -16 : 4, [M]), N = Tn(v), B = b(() => {
|
|
7028
7034
|
const V = ["k-select"];
|
|
7029
|
-
return n && V.push(n), f && V.push(`k-select--${f}`), p && V.push("k-select--disabled"),
|
|
7030
|
-
}, [n, f,
|
|
7035
|
+
return n && V.push(n), f && V.push(`k-select--${f}`), p && V.push("k-select--disabled"), M && V.push("k-select--error"), V.join(" ");
|
|
7036
|
+
}, [n, f, M, p]), K = b(() => {
|
|
7037
|
+
const V = ["k-select__fieldset__container__icon"];
|
|
7038
|
+
return C && V.push("k-select__fieldset__container__icon--open"), V.join(" ");
|
|
7039
|
+
}, [C]), R = b(() => !f || f === "medium" ? "medium" : "small", [f]), G = S(() => {
|
|
7031
7040
|
const V = v.current?.getBoundingClientRect().width;
|
|
7032
|
-
|
|
7033
|
-
}, []),
|
|
7041
|
+
L(V ? V + 2 : "auto");
|
|
7042
|
+
}, []), D = S(() => {
|
|
7043
|
+
x(!0);
|
|
7044
|
+
}, []), O = S(() => {
|
|
7045
|
+
x(!1);
|
|
7046
|
+
}, []), z = S(async (V) => {
|
|
7034
7047
|
if (!s)
|
|
7035
7048
|
return console.warn("not found rules."), !0;
|
|
7036
|
-
const
|
|
7037
|
-
for (let
|
|
7038
|
-
const
|
|
7039
|
-
if (
|
|
7040
|
-
return j(
|
|
7049
|
+
const it = V ?? r;
|
|
7050
|
+
for (let nt = 0; nt < s.length; nt++) {
|
|
7051
|
+
const jt = await (await s[nt])(it?.toString()), X = typeof jt == "string" ? jt : null;
|
|
7052
|
+
if (X)
|
|
7053
|
+
return j(X), !1;
|
|
7041
7054
|
}
|
|
7042
7055
|
return j(null), !0;
|
|
7043
|
-
}, [s, r]),
|
|
7044
|
-
m(V), i &&
|
|
7045
|
-
}, [m, i,
|
|
7046
|
-
p ||
|
|
7047
|
-
}, [p]),
|
|
7048
|
-
p ||
|
|
7049
|
-
}, [p]), E =
|
|
7050
|
-
p ||
|
|
7051
|
-
}, [p]),
|
|
7056
|
+
}, [s, r]), Y = S((V) => {
|
|
7057
|
+
m(V), i && z(V);
|
|
7058
|
+
}, [m, i, z]), lt = S((V) => {
|
|
7059
|
+
p || N?.register(V);
|
|
7060
|
+
}, [p]), g = S(() => {
|
|
7061
|
+
p || N.remove();
|
|
7062
|
+
}, [p]), E = S(() => {
|
|
7063
|
+
p || N.remove();
|
|
7064
|
+
}, [p]), F = b(() => {
|
|
7052
7065
|
const V = ["k-select__fieldset__legend"];
|
|
7053
7066
|
return a && V.push("k-select__fieldset__legend--show"), V.join(" ");
|
|
7054
7067
|
}, [a]);
|
|
7055
|
-
return
|
|
7056
|
-
|
|
7057
|
-
}, [f]),
|
|
7068
|
+
return Tt(() => {
|
|
7069
|
+
G();
|
|
7070
|
+
}, [f]), pt(e, () => ({
|
|
7058
7071
|
onOpen: () => {
|
|
7059
|
-
|
|
7072
|
+
T.current?.onOpen();
|
|
7060
7073
|
},
|
|
7061
7074
|
onClose: () => {
|
|
7062
|
-
|
|
7075
|
+
T.current?.onClose();
|
|
7063
7076
|
},
|
|
7064
|
-
onValidate: () =>
|
|
7065
|
-
})), /* @__PURE__ */ l.jsxs(
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7077
|
+
onValidate: () => z()
|
|
7078
|
+
})), /* @__PURE__ */ l.jsxs(
|
|
7079
|
+
Ht,
|
|
7080
|
+
{
|
|
7081
|
+
className: B,
|
|
7082
|
+
trigger: "click",
|
|
7083
|
+
position: "bottom-start",
|
|
7084
|
+
...y,
|
|
7085
|
+
onDropdownOpen: D,
|
|
7086
|
+
onDropdownClose: O,
|
|
7087
|
+
"aria-disabled": p,
|
|
7088
|
+
children: [
|
|
7089
|
+
/* @__PURE__ */ l.jsxs(Ht.Trigger, { className: "k-select__trigger", disabled: p, children: [
|
|
7090
|
+
/* @__PURE__ */ l.jsxs("fieldset", { className: "k-select__fieldset", style: { width: h }, children: [
|
|
7091
|
+
/* @__PURE__ */ l.jsxs("legend", { className: F, children: [
|
|
7092
|
+
a,
|
|
7093
|
+
a && c && /* @__PURE__ */ l.jsx("span", { className: "k-select__fieldset__legend__required", children: "*" })
|
|
7094
|
+
] }),
|
|
7095
|
+
/* @__PURE__ */ l.jsxs(
|
|
7096
|
+
"div",
|
|
7097
|
+
{
|
|
7098
|
+
ref: v,
|
|
7099
|
+
className: "k-select__fieldset__container",
|
|
7100
|
+
onMouseDown: lt,
|
|
7101
|
+
onMouseUp: g,
|
|
7102
|
+
onMouseLeave: E,
|
|
7103
|
+
children: [
|
|
7104
|
+
w && /* @__PURE__ */ l.jsx("span", { className: "k-select__fieldset__container__value", children: w }),
|
|
7105
|
+
r === void 0 && d && /* @__PURE__ */ l.jsx("span", { className: "k-select__fieldset__container__placeholder", children: d }),
|
|
7106
|
+
/* @__PURE__ */ l.jsx(Ce, { className: K, icon: "keyboard_arrow_down", size: R })
|
|
7107
|
+
]
|
|
7108
|
+
}
|
|
7109
|
+
)
|
|
7110
|
+
] }),
|
|
7111
|
+
M && /* @__PURE__ */ l.jsx("div", { className: "k-select__fieldset__message", children: M })
|
|
7071
7112
|
] }),
|
|
7072
|
-
/* @__PURE__ */ l.jsxs(
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
}
|
|
7085
|
-
)
|
|
7086
|
-
]
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
o.map((V) => /* @__PURE__ */ l.jsx(
|
|
7091
|
-
$t.ItemSelectable,
|
|
7092
|
-
{
|
|
7093
|
-
label: V.label,
|
|
7094
|
-
selected: r === V.value,
|
|
7095
|
-
onClick: () => {
|
|
7096
|
-
z(V.value);
|
|
7097
|
-
}
|
|
7098
|
-
},
|
|
7099
|
-
V.value
|
|
7100
|
-
)),
|
|
7101
|
-
o.length === 0 && /* @__PURE__ */ l.jsx($t.Item, { label: u })
|
|
7102
|
-
] }) })
|
|
7103
|
-
] });
|
|
7104
|
-
}), y2 = B(aa);
|
|
7113
|
+
/* @__PURE__ */ l.jsx(Ht.Content, { className: "k-select__content", gap: _, children: /* @__PURE__ */ l.jsxs(Ut, { width: k, size: "medium", className: `k-select__content__menu k-select__content__menu--${f}`, children: [
|
|
7114
|
+
o.map((V) => /* @__PURE__ */ l.jsx(
|
|
7115
|
+
Ut.ItemSelectable,
|
|
7116
|
+
{
|
|
7117
|
+
label: V.label,
|
|
7118
|
+
selected: r === V.value,
|
|
7119
|
+
onClick: () => {
|
|
7120
|
+
Y(V.value);
|
|
7121
|
+
}
|
|
7122
|
+
},
|
|
7123
|
+
V.value
|
|
7124
|
+
)),
|
|
7125
|
+
o.length === 0 && /* @__PURE__ */ l.jsx(Ut.Item, { label: u })
|
|
7126
|
+
] }) })
|
|
7127
|
+
]
|
|
7128
|
+
}
|
|
7129
|
+
);
|
|
7130
|
+
}), y2 = I(aa);
|
|
7105
7131
|
aa.displayName = "KSelect";
|
|
7106
7132
|
y2.displayName = "KSelect";
|
|
7107
7133
|
const la = Z((t, e) => {
|
|
7108
|
-
const n = `k-text-field-${
|
|
7134
|
+
const n = `k-text-field-${Yt()}`, {
|
|
7109
7135
|
id: s = n,
|
|
7110
7136
|
value: i,
|
|
7111
7137
|
type: r = "text",
|
|
@@ -7119,85 +7145,85 @@ const la = Z((t, e) => {
|
|
|
7119
7145
|
onFocus: p,
|
|
7120
7146
|
onBlur: m,
|
|
7121
7147
|
onKeyDown: y,
|
|
7122
|
-
autoCapitalize:
|
|
7123
|
-
autoCorrect:
|
|
7148
|
+
autoCapitalize: w,
|
|
7149
|
+
autoCorrect: C,
|
|
7124
7150
|
autoComplete: x,
|
|
7125
|
-
leftContent:
|
|
7151
|
+
leftContent: v,
|
|
7126
7152
|
rightContent: T,
|
|
7127
|
-
label:
|
|
7128
|
-
width:
|
|
7129
|
-
style:
|
|
7130
|
-
size:
|
|
7131
|
-
className:
|
|
7153
|
+
label: k,
|
|
7154
|
+
width: L,
|
|
7155
|
+
style: M,
|
|
7156
|
+
size: j = "medium",
|
|
7157
|
+
className: _,
|
|
7132
7158
|
rules: N,
|
|
7133
|
-
validateOnChange:
|
|
7134
|
-
...
|
|
7135
|
-
} = t, R =
|
|
7136
|
-
const $ = ["k-text-field", `k-text-field--${
|
|
7137
|
-
return
|
|
7138
|
-
}, [
|
|
7159
|
+
validateOnChange: B,
|
|
7160
|
+
...K
|
|
7161
|
+
} = t, R = J(null), [G, D] = at(!1), [O, z] = at(!1), [Y, lt] = at(null), g = b(() => r === "password", [r]), E = b(() => r === "password" && O ? "text" : r, [r, O]), F = b(() => {
|
|
7162
|
+
const $ = ["k-text-field", `k-text-field--${j}`];
|
|
7163
|
+
return _ && $.push(_), c && $.push("k-text-field--disabled"), G && $.push("k-text-field--focus"), u && $.push("k-text-field--readOnly"), r === "password" && $.push("k-text-field--password"), typeof Y == "string" && $.push("k-text-field--error"), $.join(" ");
|
|
7164
|
+
}, [_, c, u, r, Y, j, G]), V = b(() => {
|
|
7139
7165
|
const $ = ["k-text-field__fieldset__legend__label"];
|
|
7140
|
-
return
|
|
7141
|
-
}, [
|
|
7166
|
+
return k && $.push("k-text-field__fieldset__legend__label--show"), $.join(" ");
|
|
7167
|
+
}, [k]), it = b(() => ({ ...M, width: L }), [M, L]), nt = b(() => ({ textAlign: h }), [h]), kt = S(async ($) => {
|
|
7142
7168
|
if (!N)
|
|
7143
7169
|
return console.warn("not found rules."), !0;
|
|
7144
7170
|
const ca = $ ?? i;
|
|
7145
7171
|
for (let $e = 0; $e < N.length; $e++) {
|
|
7146
7172
|
const ws = await (await N[$e])(ca), ks = typeof ws == "string" ? ws : null;
|
|
7147
7173
|
if (ks)
|
|
7148
|
-
return
|
|
7149
|
-
}
|
|
7150
|
-
return
|
|
7151
|
-
}, [N, i]),
|
|
7152
|
-
f?.($.target.value),
|
|
7153
|
-
}, [f,
|
|
7154
|
-
|
|
7155
|
-
}, [p]),
|
|
7156
|
-
|
|
7157
|
-
}, [m]), te =
|
|
7174
|
+
return lt(ks), !1;
|
|
7175
|
+
}
|
|
7176
|
+
return lt(null), !0;
|
|
7177
|
+
}, [N, i]), jt = S(($) => {
|
|
7178
|
+
f?.($.target.value), B && kt($.target.value);
|
|
7179
|
+
}, [f, kt, B]), X = S(($) => {
|
|
7180
|
+
D(!0), p?.($);
|
|
7181
|
+
}, [p]), bt = S(($) => {
|
|
7182
|
+
D(!1), m?.($);
|
|
7183
|
+
}, [m]), te = S(($) => {
|
|
7158
7184
|
y?.($);
|
|
7159
|
-
}, [y]), We =
|
|
7160
|
-
|
|
7185
|
+
}, [y]), We = S(() => {
|
|
7186
|
+
z(($) => !$);
|
|
7161
7187
|
}, [r]);
|
|
7162
|
-
return
|
|
7188
|
+
return pt(e, () => ({
|
|
7163
7189
|
value: i,
|
|
7164
7190
|
focus: () => R.current?.focus(),
|
|
7165
7191
|
blur: () => R.current?.blur(),
|
|
7166
|
-
onValidate: () =>
|
|
7192
|
+
onValidate: () => kt()
|
|
7167
7193
|
})), /* @__PURE__ */ l.jsxs("div", { className: F, children: [
|
|
7168
|
-
/* @__PURE__ */ l.jsxs("fieldset", { className: "k-text-field__fieldset", style:
|
|
7169
|
-
/* @__PURE__ */ l.jsx("legend", { className: "k-text-field__fieldset__legend", children: /* @__PURE__ */ l.jsxs("label", { htmlFor: s, className:
|
|
7170
|
-
|
|
7171
|
-
|
|
7194
|
+
/* @__PURE__ */ l.jsxs("fieldset", { className: "k-text-field__fieldset", style: it, children: [
|
|
7195
|
+
/* @__PURE__ */ l.jsx("legend", { className: "k-text-field__fieldset__legend", children: /* @__PURE__ */ l.jsxs("label", { htmlFor: s, className: V, children: [
|
|
7196
|
+
k,
|
|
7197
|
+
k && d && /* @__PURE__ */ l.jsx("span", { className: "k-text-field__fieldset__legend__label__required", children: "*" })
|
|
7172
7198
|
] }) }),
|
|
7173
7199
|
/* @__PURE__ */ l.jsxs("div", { className: "k-text-field__fieldset__container", children: [
|
|
7174
|
-
|
|
7200
|
+
v && /* @__PURE__ */ l.jsx("div", { className: "k-text-field__fieldset__container__left", children: v }),
|
|
7175
7201
|
/* @__PURE__ */ l.jsx(
|
|
7176
7202
|
io,
|
|
7177
7203
|
{
|
|
7178
7204
|
ref: R,
|
|
7179
7205
|
id: s,
|
|
7180
7206
|
className: "k-text-field__fieldset__container__input",
|
|
7181
|
-
type:
|
|
7182
|
-
label:
|
|
7207
|
+
type: E,
|
|
7208
|
+
label: k,
|
|
7183
7209
|
value: i,
|
|
7184
7210
|
disabled: c,
|
|
7185
7211
|
readOnly: u,
|
|
7186
7212
|
placeholder: o,
|
|
7187
7213
|
maxLength: a,
|
|
7188
|
-
onChange:
|
|
7189
|
-
onFocus:
|
|
7190
|
-
onBlur:
|
|
7214
|
+
onChange: jt,
|
|
7215
|
+
onFocus: X,
|
|
7216
|
+
onBlur: bt,
|
|
7191
7217
|
onKeyDown: te,
|
|
7192
7218
|
autoComplete: x,
|
|
7193
|
-
autoCorrect:
|
|
7194
|
-
autoCapitalize:
|
|
7195
|
-
style:
|
|
7196
|
-
...
|
|
7219
|
+
autoCorrect: C,
|
|
7220
|
+
autoCapitalize: w,
|
|
7221
|
+
style: nt,
|
|
7222
|
+
...K
|
|
7197
7223
|
}
|
|
7198
7224
|
),
|
|
7199
7225
|
g && /* @__PURE__ */ l.jsx(
|
|
7200
|
-
|
|
7226
|
+
Ce,
|
|
7201
7227
|
{
|
|
7202
7228
|
icon: g ? "visibility" : "visibility_off",
|
|
7203
7229
|
size: 18,
|
|
@@ -7209,11 +7235,11 @@ const la = Z((t, e) => {
|
|
|
7209
7235
|
T && /* @__PURE__ */ l.jsx("div", { className: "k-text-field__fieldset__container__right", children: T })
|
|
7210
7236
|
] })
|
|
7211
7237
|
] }),
|
|
7212
|
-
|
|
7238
|
+
Y && /* @__PURE__ */ l.jsx("div", { className: "k-text-field__fieldset__message", children: Y })
|
|
7213
7239
|
] });
|
|
7214
7240
|
});
|
|
7215
7241
|
la.displayName = "KTextField";
|
|
7216
|
-
const P2 =
|
|
7242
|
+
const P2 = I(la);
|
|
7217
7243
|
export {
|
|
7218
7244
|
b2 as BUTTON_VARIANTS,
|
|
7219
7245
|
g2 as ICON_SIZES,
|
|
@@ -7221,12 +7247,12 @@ export {
|
|
|
7221
7247
|
ia as KBackdrop,
|
|
7222
7248
|
fs as KButton,
|
|
7223
7249
|
r2 as KButtonGroup,
|
|
7224
|
-
|
|
7225
|
-
|
|
7250
|
+
Ht as KDropdown,
|
|
7251
|
+
Ce as KIcon,
|
|
7226
7252
|
S2 as KIconSizeList,
|
|
7227
7253
|
M2 as KMODAL_SIZES,
|
|
7228
|
-
|
|
7229
|
-
|
|
7254
|
+
Ut as KMenu,
|
|
7255
|
+
Ke as KModal,
|
|
7230
7256
|
y2 as KSelect,
|
|
7231
7257
|
u2 as KSkeleton,
|
|
7232
7258
|
f2 as KSpinner,
|