@nil-/xit 0.4.15 → 0.4.17
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/assets/bundler.js +8 -1
- package/assets/index.js +2 -1
- package/assets/svelte/index.js +134 -134
- package/assets/svelte/internal/client.js +60 -60
- package/assets/svelte/motion.js +136 -168
- package/assets/svelte/reactivity.js +481 -0
- package/assets/svelte/store.js +2 -1
- package/package.json +1 -1
- package/test/Frame.svelte +10 -8
- package/test/Frame.svelte.d.ts +1 -0
- package/test/Main.svelte +23 -15
- package/test/Main.svelte.d.ts +5 -1
- package/test/Save.svelte +20 -0
- package/test/Save.svelte.d.ts +22 -0
package/assets/svelte/motion.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
var
|
|
1
|
+
var v = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var r = (e, t, s) => (
|
|
4
|
+
var W = (e, t, s) => t.has(e) || v("Cannot " + s);
|
|
5
|
+
var r = (e, t, s) => (W(e, t, "read from private field"), s ? s.call(e) : t.get(e)), c = (e, t, s) => t.has(e) ? v("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), d = (e, t, s, i) => (W(e, t, "write to private field"), i ? i.call(e, s) : t.set(e, s), s), tt = (e, t, s) => (W(e, t, "access private method"), s);
|
|
6
6
|
import "./internal/client.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
7
|
+
import { MediaQuery as ct } from "./reactivity.js";
|
|
8
|
+
import { w as et } from "./store.js";
|
|
9
|
+
import { b as z, c as st, a as g, l as ht, n as dt, g as D } from "./index.js";
|
|
10
|
+
import { linear as rt } from "./easing.js";
|
|
11
|
+
const ut = () => performance.now(), m = {
|
|
11
12
|
// don't access requestAnimationFrame eagerly outside method
|
|
12
13
|
// this allows basic testing of user code without JSDOM
|
|
13
14
|
// bunder will eval and remove ternary when the user's app is built
|
|
@@ -15,66 +16,33 @@ const pt = () => performance.now(), u = {
|
|
|
15
16
|
/** @param {any} _ */
|
|
16
17
|
(e) => requestAnimationFrame(e)
|
|
17
18
|
),
|
|
18
|
-
now: () =>
|
|
19
|
+
now: () => ut(),
|
|
19
20
|
tasks: /* @__PURE__ */ new Set()
|
|
20
21
|
};
|
|
21
|
-
function
|
|
22
|
-
const e =
|
|
23
|
-
|
|
24
|
-
t.c(e) || (
|
|
25
|
-
}),
|
|
22
|
+
function it() {
|
|
23
|
+
const e = m.now();
|
|
24
|
+
m.tasks.forEach((t) => {
|
|
25
|
+
t.c(e) || (m.tasks.delete(t), t.f());
|
|
26
|
+
}), m.tasks.size !== 0 && m.tick(it);
|
|
26
27
|
}
|
|
27
28
|
function U(e) {
|
|
28
29
|
let t;
|
|
29
|
-
return
|
|
30
|
+
return m.tasks.size === 0 && m.tick(it), {
|
|
30
31
|
promise: new Promise((s) => {
|
|
31
|
-
|
|
32
|
+
m.tasks.add(t = { c: e, f: s });
|
|
32
33
|
}),
|
|
33
34
|
abort() {
|
|
34
|
-
|
|
35
|
+
m.tasks.delete(t);
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
|
-
var q, B;
|
|
39
|
-
class gt {
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @param {() => T} fn
|
|
43
|
-
* @param {(update: () => void) => void} onsubscribe
|
|
44
|
-
*/
|
|
45
|
-
constructor(t, s) {
|
|
46
|
-
c(this, q);
|
|
47
|
-
c(this, B);
|
|
48
|
-
h(this, q, t), h(this, B, mt(s));
|
|
49
|
-
}
|
|
50
|
-
get current() {
|
|
51
|
-
return r(this, B).call(this), r(this, q).call(this);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
q = new WeakMap(), B = new WeakMap();
|
|
55
|
-
const bt = /\(.+\)/, yt = /* @__PURE__ */ new Set(["all", "print", "screen", "and", "or", "not", "only"]);
|
|
56
|
-
class wt extends gt {
|
|
57
|
-
/**
|
|
58
|
-
* @param {string} query A media query string
|
|
59
|
-
* @param {boolean} [fallback] Fallback value for the server
|
|
60
|
-
*/
|
|
61
|
-
constructor(t, s) {
|
|
62
|
-
let i = bt.test(t) || // we need to use `some` here because technically this `window.matchMedia('random,screen')` still returns true
|
|
63
|
-
t.split(/[\s,]+/).some((n) => yt.has(n.trim())) ? t : `(${t})`;
|
|
64
|
-
const o = window.matchMedia(i);
|
|
65
|
-
super(
|
|
66
|
-
() => o.matches,
|
|
67
|
-
(n) => dt(o, "change", n)
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
39
|
function J(e) {
|
|
72
40
|
return Object.prototype.toString.call(e) === "[object Date]";
|
|
73
41
|
}
|
|
74
42
|
function K(e, t, s, i) {
|
|
75
43
|
if (typeof s == "number" || J(s)) {
|
|
76
|
-
const o = i - s, n = (s - t) / (e.dt || 1 / 60), f = e.opts.stiffness * o, a = e.opts.damping * n,
|
|
77
|
-
return Math.abs(
|
|
44
|
+
const o = i - s, n = (s - t) / (e.dt || 1 / 60), f = e.opts.stiffness * o, a = e.opts.damping * n, h = (f - a) * e.inv_mass, l = (n + h) * e.dt;
|
|
45
|
+
return Math.abs(l) < e.opts.precision && Math.abs(o) < e.opts.precision ? i : (e.settled = !1, J(s) ? new Date(s.getTime() + l) : s + l);
|
|
78
46
|
} else {
|
|
79
47
|
if (Array.isArray(s))
|
|
80
48
|
return s.map(
|
|
@@ -92,42 +60,42 @@ function K(e, t, s, i) {
|
|
|
92
60
|
throw new Error(`Cannot spring ${typeof s} values`);
|
|
93
61
|
}
|
|
94
62
|
}
|
|
95
|
-
function
|
|
96
|
-
const s =
|
|
97
|
-
let f, a,
|
|
63
|
+
function mt(e, t = {}) {
|
|
64
|
+
const s = et(e), { stiffness: i = 0.15, damping: o = 0.8, precision: n = 0.01 } = t;
|
|
65
|
+
let f, a, h, l = (
|
|
98
66
|
/** @type {T} */
|
|
99
67
|
e
|
|
100
|
-
),
|
|
68
|
+
), y = (
|
|
101
69
|
/** @type {T | undefined} */
|
|
102
70
|
e
|
|
103
|
-
),
|
|
104
|
-
function A(
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
return e == null || w.hard || E.stiffness >= 1 && E.damping >= 1 ? (
|
|
108
|
-
if (
|
|
109
|
-
return
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
inv_mass:
|
|
71
|
+
), u = 1, P = 0, b = !1;
|
|
72
|
+
function A(O, w = {}) {
|
|
73
|
+
y = O;
|
|
74
|
+
const ot = h = {};
|
|
75
|
+
return e == null || w.hard || E.stiffness >= 1 && E.damping >= 1 ? (b = !0, f = m.now(), l = O, s.set(e = y), Promise.resolve()) : (w.soft && (P = 1 / ((w.soft === !0 ? 0.5 : +w.soft) * 60), u = 0), a || (f = m.now(), b = !1, a = U((B) => {
|
|
76
|
+
if (b)
|
|
77
|
+
return b = !1, a = null, !1;
|
|
78
|
+
u = Math.min(u + P, 1);
|
|
79
|
+
const ft = Math.min(B - f, 1e3 / 30), V = {
|
|
80
|
+
inv_mass: u,
|
|
113
81
|
opts: E,
|
|
114
82
|
settled: !0,
|
|
115
|
-
dt:
|
|
116
|
-
},
|
|
117
|
-
return f =
|
|
83
|
+
dt: ft * 60 / 1e3
|
|
84
|
+
}, at = K(V, l, e, y);
|
|
85
|
+
return f = B, l = /** @type {T} */
|
|
118
86
|
e, s.set(e = /** @type {T} */
|
|
119
|
-
|
|
120
|
-
})), new Promise((
|
|
87
|
+
at), V.settled && (a = null), !V.settled;
|
|
88
|
+
})), new Promise((B) => {
|
|
121
89
|
a.promise.then(() => {
|
|
122
|
-
|
|
90
|
+
ot === h && B();
|
|
123
91
|
});
|
|
124
92
|
}));
|
|
125
93
|
}
|
|
126
94
|
const E = {
|
|
127
95
|
set: A,
|
|
128
|
-
update: (
|
|
96
|
+
update: (O, w) => A(O(
|
|
129
97
|
/** @type {T} */
|
|
130
|
-
|
|
98
|
+
y,
|
|
131
99
|
/** @type {T} */
|
|
132
100
|
e
|
|
133
101
|
), w),
|
|
@@ -138,34 +106,34 @@ function kt(e, t = {}) {
|
|
|
138
106
|
};
|
|
139
107
|
return E;
|
|
140
108
|
}
|
|
141
|
-
var
|
|
142
|
-
const
|
|
109
|
+
var S, T, C, p, j, _, Q, q, G, k, R, N, nt;
|
|
110
|
+
const Z = class Z {
|
|
143
111
|
/**
|
|
144
112
|
* @param {T} value
|
|
145
113
|
* @param {SpringOpts} [options]
|
|
146
114
|
*/
|
|
147
115
|
constructor(t, s = {}) {
|
|
148
116
|
c(this, N);
|
|
149
|
-
c(this,
|
|
150
|
-
c(this,
|
|
151
|
-
c(this,
|
|
152
|
-
c(this, p,
|
|
117
|
+
c(this, S, z(0.15));
|
|
118
|
+
c(this, T, z(0.8));
|
|
119
|
+
c(this, C, z(0.01));
|
|
120
|
+
c(this, p, z(
|
|
153
121
|
/** @type {T} */
|
|
154
122
|
void 0
|
|
155
123
|
));
|
|
156
|
-
c(this, j,
|
|
124
|
+
c(this, j, z(
|
|
157
125
|
/** @type {T} */
|
|
158
126
|
void 0
|
|
159
127
|
));
|
|
160
|
-
c(this,
|
|
161
|
-
c(this,
|
|
162
|
-
c(this,
|
|
128
|
+
c(this, _);
|
|
129
|
+
c(this, Q, 0);
|
|
130
|
+
c(this, q, 1);
|
|
163
131
|
c(this, G, 0);
|
|
164
132
|
/** @type {import('../internal/client/types').Task | null} */
|
|
165
133
|
c(this, k, null);
|
|
166
134
|
/** @type {ReturnType<typeof deferred> | null} */
|
|
167
|
-
c(this,
|
|
168
|
-
r(this, p).v = r(this, j).v = t, typeof s.stiffness == "number" && (r(this,
|
|
135
|
+
c(this, R, null);
|
|
136
|
+
r(this, p).v = r(this, j).v = t, typeof s.stiffness == "number" && (r(this, S).v = I(s.stiffness, 0, 1)), typeof s.damping == "number" && (r(this, T).v = I(s.damping, 0, 1)), typeof s.precision == "number" && (r(this, C).v = s.precision);
|
|
169
137
|
}
|
|
170
138
|
/**
|
|
171
139
|
* Create a spring whose value is bound to the return value of `fn`. This must be called
|
|
@@ -185,8 +153,8 @@ const v = class v {
|
|
|
185
153
|
* @param {SpringOpts} [options]
|
|
186
154
|
*/
|
|
187
155
|
static of(t, s) {
|
|
188
|
-
const i = new
|
|
189
|
-
return
|
|
156
|
+
const i = new Z(t(), s);
|
|
157
|
+
return st(() => {
|
|
190
158
|
i.set(t());
|
|
191
159
|
}), i;
|
|
192
160
|
}
|
|
@@ -203,67 +171,67 @@ const v = class v {
|
|
|
203
171
|
*/
|
|
204
172
|
set(t, s) {
|
|
205
173
|
var o, n;
|
|
206
|
-
if ((o = r(this,
|
|
207
|
-
return (n = r(this, k)) == null || n.abort(),
|
|
208
|
-
s != null && s.preserveMomentum && (
|
|
209
|
-
var i =
|
|
210
|
-
return i.promise.catch(
|
|
211
|
-
i === r(this,
|
|
174
|
+
if ((o = r(this, R)) == null || o.reject(new Error("Aborted")), s != null && s.instant || r(this, p).v === void 0)
|
|
175
|
+
return (n = r(this, k)) == null || n.abort(), d(this, k, null), g(r(this, p), g(r(this, j), t)), d(this, _, t), Promise.resolve();
|
|
176
|
+
s != null && s.preserveMomentum && (d(this, q, 0), d(this, G, s.preserveMomentum));
|
|
177
|
+
var i = d(this, R, ht());
|
|
178
|
+
return i.promise.catch(dt), tt(this, N, nt).call(this, t).then(() => {
|
|
179
|
+
i === r(this, R) && i.resolve(void 0);
|
|
212
180
|
}), i.promise;
|
|
213
181
|
}
|
|
214
182
|
get current() {
|
|
215
|
-
return
|
|
183
|
+
return D(r(this, p));
|
|
216
184
|
}
|
|
217
185
|
get damping() {
|
|
218
|
-
return
|
|
186
|
+
return D(r(this, T));
|
|
219
187
|
}
|
|
220
188
|
set damping(t) {
|
|
221
|
-
g(r(this,
|
|
189
|
+
g(r(this, T), I(t, 0, 1));
|
|
222
190
|
}
|
|
223
191
|
get precision() {
|
|
224
|
-
return
|
|
192
|
+
return D(r(this, C));
|
|
225
193
|
}
|
|
226
194
|
set precision(t) {
|
|
227
|
-
g(r(this,
|
|
195
|
+
g(r(this, C), t);
|
|
228
196
|
}
|
|
229
197
|
get stiffness() {
|
|
230
|
-
return
|
|
198
|
+
return D(r(this, S));
|
|
231
199
|
}
|
|
232
200
|
set stiffness(t) {
|
|
233
|
-
g(r(this,
|
|
201
|
+
g(r(this, S), I(t, 0, 1));
|
|
234
202
|
}
|
|
235
203
|
get target() {
|
|
236
|
-
return
|
|
204
|
+
return D(r(this, j));
|
|
237
205
|
}
|
|
238
206
|
set target(t) {
|
|
239
207
|
this.set(t);
|
|
240
208
|
}
|
|
241
209
|
};
|
|
242
|
-
|
|
243
|
-
|
|
210
|
+
S = new WeakMap(), T = new WeakMap(), C = new WeakMap(), p = new WeakMap(), j = new WeakMap(), _ = new WeakMap(), Q = new WeakMap(), q = new WeakMap(), G = new WeakMap(), k = new WeakMap(), R = new WeakMap(), N = new WeakSet(), /** @param {T} value */
|
|
211
|
+
nt = function(t) {
|
|
244
212
|
var i;
|
|
245
|
-
if (g(r(this, j), t), (i = r(this, p)).v ?? (i.v = t), r(this,
|
|
246
|
-
|
|
213
|
+
if (g(r(this, j), t), (i = r(this, p)).v ?? (i.v = t), r(this, _) ?? d(this, _, r(this, p).v), !r(this, k)) {
|
|
214
|
+
d(this, Q, m.now());
|
|
247
215
|
var s = 1e3 / (r(this, G) * 60);
|
|
248
|
-
r(this, k) ??
|
|
249
|
-
|
|
250
|
-
const n = Math.min(o - r(this,
|
|
251
|
-
inv_mass: r(this,
|
|
216
|
+
r(this, k) ?? d(this, k, U((o) => {
|
|
217
|
+
d(this, q, Math.min(r(this, q) + s, 1));
|
|
218
|
+
const n = Math.min(o - r(this, Q), 1e3 / 30), f = {
|
|
219
|
+
inv_mass: r(this, q),
|
|
252
220
|
opts: {
|
|
253
|
-
stiffness: r(this,
|
|
254
|
-
damping: r(this,
|
|
255
|
-
precision: r(this,
|
|
221
|
+
stiffness: r(this, S).v,
|
|
222
|
+
damping: r(this, T).v,
|
|
223
|
+
precision: r(this, C).v
|
|
256
224
|
},
|
|
257
225
|
settled: !0,
|
|
258
226
|
dt: n * 60 / 1e3
|
|
259
227
|
};
|
|
260
|
-
var a = K(f, r(this,
|
|
261
|
-
return
|
|
228
|
+
var a = K(f, r(this, _), r(this, p).v, r(this, j).v);
|
|
229
|
+
return d(this, _, r(this, p).v), d(this, Q, o), g(r(this, p), a), f.settled && d(this, k, null), !f.settled;
|
|
262
230
|
}));
|
|
263
231
|
}
|
|
264
232
|
return r(this, k).promise;
|
|
265
233
|
};
|
|
266
|
-
let
|
|
234
|
+
let X = Z;
|
|
267
235
|
function I(e, t, s) {
|
|
268
236
|
return Math.max(t, Math.min(s, e));
|
|
269
237
|
}
|
|
@@ -288,7 +256,7 @@ function L(e, t) {
|
|
|
288
256
|
throw new Error("Object cannot be null");
|
|
289
257
|
if (J(e) && J(t)) {
|
|
290
258
|
const n = e.getTime(), a = t.getTime() - n;
|
|
291
|
-
return (
|
|
259
|
+
return (h) => new Date(n + h * a);
|
|
292
260
|
}
|
|
293
261
|
const i = Object.keys(t), o = {};
|
|
294
262
|
return i.forEach((n) => {
|
|
@@ -310,36 +278,36 @@ function L(e, t) {
|
|
|
310
278
|
}
|
|
311
279
|
return () => t;
|
|
312
280
|
}
|
|
313
|
-
function
|
|
314
|
-
const s =
|
|
281
|
+
function lt(e, t = {}) {
|
|
282
|
+
const s = et(e);
|
|
315
283
|
let i, o = e;
|
|
316
284
|
function n(f, a) {
|
|
317
285
|
if (o = f, e == null)
|
|
318
286
|
return s.set(e = f), Promise.resolve();
|
|
319
|
-
let
|
|
320
|
-
delay:
|
|
321
|
-
duration:
|
|
322
|
-
easing: P =
|
|
323
|
-
interpolate:
|
|
287
|
+
let h = i, l = !1, {
|
|
288
|
+
delay: y = 0,
|
|
289
|
+
duration: u = 400,
|
|
290
|
+
easing: P = rt,
|
|
291
|
+
interpolate: b = L
|
|
324
292
|
} = { ...t, ...a };
|
|
325
|
-
if (
|
|
326
|
-
return
|
|
327
|
-
const A =
|
|
293
|
+
if (u === 0)
|
|
294
|
+
return h && (h.abort(), h = null), s.set(e = o), Promise.resolve();
|
|
295
|
+
const A = m.now() + y;
|
|
328
296
|
let E;
|
|
329
|
-
return i = U((
|
|
330
|
-
if (
|
|
331
|
-
|
|
297
|
+
return i = U((O) => {
|
|
298
|
+
if (O < A) return !0;
|
|
299
|
+
l || (E = b(
|
|
332
300
|
/** @type {any} */
|
|
333
301
|
e,
|
|
334
302
|
f
|
|
335
|
-
), typeof
|
|
303
|
+
), typeof u == "function" && (u = u(
|
|
336
304
|
/** @type {any} */
|
|
337
305
|
e,
|
|
338
306
|
f
|
|
339
|
-
)),
|
|
340
|
-
const w =
|
|
307
|
+
)), l = !0), h && (h.abort(), h = null);
|
|
308
|
+
const w = O - A;
|
|
341
309
|
return w > /** @type {number} */
|
|
342
|
-
|
|
310
|
+
u ? (s.set(e = f), !1) : (s.set(e = E(P(w / u))), !0);
|
|
343
311
|
}), i.promise;
|
|
344
312
|
}
|
|
345
313
|
return {
|
|
@@ -353,26 +321,26 @@ function Mt(e, t = {}) {
|
|
|
353
321
|
subscribe: s.subscribe
|
|
354
322
|
};
|
|
355
323
|
}
|
|
356
|
-
var M,
|
|
357
|
-
const
|
|
324
|
+
var M, $, H, F;
|
|
325
|
+
const x = class x {
|
|
358
326
|
/**
|
|
359
327
|
* @param {T} value
|
|
360
328
|
* @param {TweenedOptions<T>} options
|
|
361
329
|
*/
|
|
362
330
|
constructor(t, s = {}) {
|
|
363
|
-
c(this, M,
|
|
331
|
+
c(this, M, z(
|
|
364
332
|
/** @type {T} */
|
|
365
333
|
void 0
|
|
366
334
|
));
|
|
367
|
-
c(this,
|
|
335
|
+
c(this, $, z(
|
|
368
336
|
/** @type {T} */
|
|
369
337
|
void 0
|
|
370
338
|
));
|
|
371
339
|
/** @type {TweenedOptions<T>} */
|
|
372
340
|
c(this, H);
|
|
373
341
|
/** @type {import('../internal/client/types').Task | null} */
|
|
374
|
-
c(this,
|
|
375
|
-
r(this, M).v = r(this,
|
|
342
|
+
c(this, F, null);
|
|
343
|
+
r(this, M).v = r(this, $).v = t, d(this, H, s);
|
|
376
344
|
}
|
|
377
345
|
/**
|
|
378
346
|
* Create a tween whose value is bound to the return value of `fn`. This must be called
|
|
@@ -392,8 +360,8 @@ const tt = class tt {
|
|
|
392
360
|
* @param {TweenedOptions<U>} [options]
|
|
393
361
|
*/
|
|
394
362
|
static of(t, s) {
|
|
395
|
-
const i = new
|
|
396
|
-
return
|
|
363
|
+
const i = new x(t(), s);
|
|
364
|
+
return st(() => {
|
|
397
365
|
i.set(t());
|
|
398
366
|
}), i;
|
|
399
367
|
}
|
|
@@ -406,56 +374,56 @@ const tt = class tt {
|
|
|
406
374
|
* @returns
|
|
407
375
|
*/
|
|
408
376
|
set(t, s) {
|
|
409
|
-
var
|
|
410
|
-
g(r(this,
|
|
377
|
+
var u;
|
|
378
|
+
g(r(this, $), t);
|
|
411
379
|
let {
|
|
412
380
|
delay: i = 0,
|
|
413
381
|
duration: o = 400,
|
|
414
|
-
easing: n =
|
|
382
|
+
easing: n = rt,
|
|
415
383
|
interpolate: f = L
|
|
416
384
|
} = { ...r(this, H), ...s };
|
|
417
385
|
if (o === 0)
|
|
418
|
-
return (
|
|
419
|
-
const a =
|
|
420
|
-
let
|
|
421
|
-
return
|
|
386
|
+
return (u = r(this, F)) == null || u.abort(), g(r(this, M), t), Promise.resolve();
|
|
387
|
+
const a = m.now() + i;
|
|
388
|
+
let h, l = !1, y = r(this, F);
|
|
389
|
+
return d(this, F, U((P) => {
|
|
422
390
|
if (P < a)
|
|
423
391
|
return !0;
|
|
424
|
-
if (!
|
|
425
|
-
|
|
392
|
+
if (!l) {
|
|
393
|
+
l = !0;
|
|
426
394
|
const A = r(this, M).v;
|
|
427
|
-
|
|
395
|
+
h = f(A, t), typeof o == "function" && (o = o(A, t)), y == null || y.abort();
|
|
428
396
|
}
|
|
429
|
-
const
|
|
430
|
-
return
|
|
431
|
-
o ? (g(r(this, M), t), !1) : (g(r(this, M),
|
|
397
|
+
const b = P - a;
|
|
398
|
+
return b > /** @type {number} */
|
|
399
|
+
o ? (g(r(this, M), t), !1) : (g(r(this, M), h(n(b / /** @type {number} */
|
|
432
400
|
o))), !0);
|
|
433
|
-
})), r(this,
|
|
401
|
+
})), r(this, F).promise;
|
|
434
402
|
}
|
|
435
403
|
get current() {
|
|
436
|
-
return
|
|
404
|
+
return D(r(this, M));
|
|
437
405
|
}
|
|
438
406
|
get target() {
|
|
439
|
-
return
|
|
407
|
+
return D(r(this, $));
|
|
440
408
|
}
|
|
441
409
|
set target(t) {
|
|
442
410
|
this.set(t);
|
|
443
411
|
}
|
|
444
412
|
};
|
|
445
|
-
M = new WeakMap(),
|
|
446
|
-
let
|
|
447
|
-
const
|
|
413
|
+
M = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), F = new WeakMap();
|
|
414
|
+
let Y = x;
|
|
415
|
+
const pt = /* @__PURE__ */ new ct(
|
|
448
416
|
"(prefers-reduced-motion: reduce)"
|
|
449
|
-
),
|
|
417
|
+
), At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
450
418
|
__proto__: null,
|
|
451
|
-
Spring:
|
|
452
|
-
Tween:
|
|
453
|
-
prefersReducedMotion:
|
|
454
|
-
spring:
|
|
455
|
-
tweened:
|
|
419
|
+
Spring: X,
|
|
420
|
+
Tween: Y,
|
|
421
|
+
prefersReducedMotion: pt,
|
|
422
|
+
spring: mt,
|
|
423
|
+
tweened: lt
|
|
456
424
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
457
425
|
export {
|
|
458
|
-
|
|
426
|
+
At as i,
|
|
459
427
|
U as l,
|
|
460
|
-
|
|
428
|
+
m as r
|
|
461
429
|
};
|