kss-modern 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/lib/index.mjs +112 -87
- package/dist/styleguide-assets/.vite/manifest.json +43 -17
- package/dist/styleguide-assets/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/styleguide-assets/assets/{worker-zgOBb1zJ.js → worker-DbYry4sK.js} +1 -1
- package/dist/styleguide-assets/axe-B2M3jwef.js +23605 -0
- package/dist/styleguide-assets/{browser-KlOfx-vG.js → browser-ImNvK64W.js} +1117 -1090
- package/dist/styleguide-assets/client-Dr95NpXp.js +1 -0
- package/dist/styleguide-assets/client-fullpage-CUwCohIj.js +104 -0
- package/dist/styleguide-assets/clipboard-CmSioy8N.js +171 -0
- package/dist/styleguide-assets/editor-select-Bzw7rF0M.js +28 -0
- package/dist/styleguide-assets/html-validator-BlXeWTXJ.js +229 -0
- package/dist/styleguide-assets/icons/css.svg +6 -0
- package/dist/styleguide-assets/icons/html.svg +1 -0
- package/dist/styleguide-assets/icons/pug.svg +1 -0
- package/dist/styleguide-assets/{icons-Bsi5dZux.js → icons-DfSfd5nI.js} +1 -1
- package/dist/styleguide-assets/kss-modern-CSsz22uP.css +1 -0
- package/dist/styleguide-assets/{main-CTV8iVap.js → main-DJu5Mg_E.js} +1091 -1258
- package/package.json +6 -4
- package/dist/styleguide-assets/client-CHYLSUpU.js +0 -1
- package/dist/styleguide-assets/client-fullpage-DjIkCnMm.js +0 -59
- package/dist/styleguide-assets/clipboard-BX-6wcwn.js +0 -19
- package/dist/styleguide-assets/html-validator-bX8Fj2mZ.js +0 -135
- package/dist/styleguide-assets/kss-modern-DDees9Y5.css +0 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Ps(e, t) {
|
|
2
2
|
e.indexOf(t) === -1 && e.push(t);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function bn(e, t) {
|
|
5
5
|
const n = e.indexOf(t);
|
|
6
6
|
n > -1 && e.splice(n, 1);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
9
|
-
let
|
|
8
|
+
const U = (e, t, n) => n > t ? t : n < e ? e : n;
|
|
9
|
+
let st = () => {
|
|
10
10
|
};
|
|
11
|
-
const N = {},
|
|
12
|
-
function
|
|
11
|
+
const N = {}, wn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
|
|
12
|
+
function Os(e) {
|
|
13
13
|
return typeof e == "object" && e !== null;
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const Tn = (e) => /^0[^.\s]+$/u.test(e);
|
|
16
16
|
// @__NO_SIDE_EFFECTS__
|
|
17
|
-
function
|
|
17
|
+
function rt(e) {
|
|
18
18
|
let t;
|
|
19
19
|
return () => (t === void 0 && (t = e()), t);
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const Z = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Rs = (e, t) => (n) => t(e(n)), it = (...e) => e.reduce(Rs), ot = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
22
22
|
const s = t - e;
|
|
23
23
|
return s === 0 ? 1 : (n - e) / s;
|
|
24
24
|
};
|
|
25
|
-
class
|
|
25
|
+
class vn {
|
|
26
26
|
constructor() {
|
|
27
27
|
this.subscriptions = [];
|
|
28
28
|
}
|
|
29
29
|
add(t) {
|
|
30
|
-
return
|
|
30
|
+
return Ps(this.subscriptions, t), () => bn(this.subscriptions, t);
|
|
31
31
|
}
|
|
32
32
|
notify(t, n, s) {
|
|
33
33
|
const r = this.subscriptions.length;
|
|
@@ -47,52 +47,52 @@ class Sn {
|
|
|
47
47
|
this.subscriptions.length = 0;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
function
|
|
50
|
+
const O = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, F = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
|
|
51
|
+
function An(e, t) {
|
|
52
52
|
return t ? e * (1e3 / t) : 0;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const Ns = (e, t, n) => {
|
|
55
55
|
const s = t - e;
|
|
56
56
|
return ((n - e) % s + s) % s + e;
|
|
57
|
-
},
|
|
58
|
-
function
|
|
57
|
+
}, Sn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Ks = 1e-7, Bs = 12;
|
|
58
|
+
function qs(e, t, n, s, r) {
|
|
59
59
|
let i, o, a = 0;
|
|
60
60
|
do
|
|
61
|
-
o = t + (n - t) / 2, i =
|
|
62
|
-
while (Math.abs(i) >
|
|
61
|
+
o = t + (n - t) / 2, i = Sn(o, s, r) - e, i > 0 ? n = o : t = o;
|
|
62
|
+
while (Math.abs(i) > Ks && ++a < Bs);
|
|
63
63
|
return o;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function he(e, t, n, s) {
|
|
66
66
|
if (e === t && n === s)
|
|
67
|
-
return
|
|
68
|
-
const r = (i) =>
|
|
69
|
-
return (i) => i === 0 || i === 1 ? i :
|
|
70
|
-
}
|
|
71
|
-
const
|
|
72
|
-
function
|
|
73
|
-
return
|
|
74
|
-
}
|
|
75
|
-
const
|
|
76
|
-
linear:
|
|
77
|
-
easeIn:
|
|
78
|
-
easeInOut:
|
|
79
|
-
easeOut:
|
|
80
|
-
circIn:
|
|
81
|
-
circInOut:
|
|
82
|
-
circOut:
|
|
83
|
-
backIn:
|
|
84
|
-
backInOut:
|
|
85
|
-
backOut:
|
|
86
|
-
anticipate:
|
|
87
|
-
},
|
|
88
|
-
if (
|
|
89
|
-
|
|
67
|
+
return Z;
|
|
68
|
+
const r = (i) => qs(i, 0, 1, e, n);
|
|
69
|
+
return (i) => i === 0 || i === 1 ? i : Sn(r(i), t, s);
|
|
70
|
+
}
|
|
71
|
+
const xn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, En = (e) => (t) => 1 - e(1 - t), Vn = /* @__PURE__ */ he(0.33, 1.53, 0.69, 0.99), at = /* @__PURE__ */ En(Vn), Mn = /* @__PURE__ */ xn(at), kn = (e) => (e *= 2) < 1 ? 0.5 * at(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), lt = (e) => 1 - Math.sin(Math.acos(e)), $s = En(lt), Cn = xn(lt), Hs = /* @__PURE__ */ he(0.42, 0, 1, 1), Ws = /* @__PURE__ */ he(0, 0, 0.58, 1), Dn = /* @__PURE__ */ he(0.42, 0, 0.58, 1), In = (e) => Array.isArray(e) && typeof e[0] != "number";
|
|
72
|
+
function Ln(e, t) {
|
|
73
|
+
return In(e) ? e[Ns(0, e.length, t)] : e;
|
|
74
|
+
}
|
|
75
|
+
const Fn = (e) => Array.isArray(e) && typeof e[0] == "number", _s = {
|
|
76
|
+
linear: Z,
|
|
77
|
+
easeIn: Hs,
|
|
78
|
+
easeInOut: Dn,
|
|
79
|
+
easeOut: Ws,
|
|
80
|
+
circIn: lt,
|
|
81
|
+
circInOut: Cn,
|
|
82
|
+
circOut: $s,
|
|
83
|
+
backIn: at,
|
|
84
|
+
backInOut: Mn,
|
|
85
|
+
backOut: Vn,
|
|
86
|
+
anticipate: kn
|
|
87
|
+
}, Us = (e) => typeof e == "string", Dt = (e) => {
|
|
88
|
+
if (Fn(e)) {
|
|
89
|
+
st(e.length === 4);
|
|
90
90
|
const [t, n, s, r] = e;
|
|
91
|
-
return
|
|
92
|
-
} else if (
|
|
93
|
-
return
|
|
91
|
+
return he(t, n, s, r);
|
|
92
|
+
} else if (Us(e))
|
|
93
|
+
return _s[e];
|
|
94
94
|
return e;
|
|
95
|
-
},
|
|
95
|
+
}, we = [
|
|
96
96
|
"setup",
|
|
97
97
|
// Compute
|
|
98
98
|
"read",
|
|
@@ -110,7 +110,7 @@ const Rn = (e) => Array.isArray(e) && typeof e[0] == "number", Ys = {
|
|
|
110
110
|
"postRender"
|
|
111
111
|
// Compute
|
|
112
112
|
];
|
|
113
|
-
function
|
|
113
|
+
function js(e, t) {
|
|
114
114
|
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), r = !1, i = !1;
|
|
115
115
|
const o = /* @__PURE__ */ new WeakSet();
|
|
116
116
|
let a = {
|
|
@@ -119,15 +119,15 @@ function Zs(e, t) {
|
|
|
119
119
|
isProcessing: !1
|
|
120
120
|
};
|
|
121
121
|
function l(c) {
|
|
122
|
-
o.has(c) && (
|
|
122
|
+
o.has(c) && (f.schedule(c), e()), c(a);
|
|
123
123
|
}
|
|
124
|
-
const
|
|
124
|
+
const f = {
|
|
125
125
|
/**
|
|
126
126
|
* Schedule a process to run on the next frame.
|
|
127
127
|
*/
|
|
128
|
-
schedule: (c,
|
|
128
|
+
schedule: (c, u = !1, d = !1) => {
|
|
129
129
|
const m = d && r ? n : s;
|
|
130
|
-
return
|
|
130
|
+
return u && o.add(c), m.has(c) || m.add(c), c;
|
|
131
131
|
},
|
|
132
132
|
/**
|
|
133
133
|
* Cancel the provided callback from running on the next frame.
|
|
@@ -143,75 +143,75 @@ function Zs(e, t) {
|
|
|
143
143
|
i = !0;
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
r = !0, [n, s] = [s, n], n.forEach(l), n.clear(), r = !1, i && (i = !1,
|
|
146
|
+
r = !0, [n, s] = [s, n], n.forEach(l), n.clear(), r = !1, i && (i = !1, f.process(c));
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
return
|
|
149
|
+
return f;
|
|
150
150
|
}
|
|
151
|
-
const
|
|
151
|
+
const Gs = 40;
|
|
152
152
|
function Pn(e, t) {
|
|
153
153
|
let n = !1, s = !0;
|
|
154
154
|
const r = {
|
|
155
155
|
delta: 0,
|
|
156
156
|
timestamp: 0,
|
|
157
157
|
isProcessing: !1
|
|
158
|
-
}, i = () => n = !0, o =
|
|
159
|
-
const
|
|
160
|
-
n = !1, N.useManualTiming || (r.delta = s ? 1e3 / 60 : Math.max(Math.min(
|
|
161
|
-
},
|
|
162
|
-
n = !0, s = !0, r.isProcessing || e(
|
|
158
|
+
}, i = () => n = !0, o = we.reduce((v, S) => (v[S] = js(i), v), {}), { setup: a, read: l, resolveKeyframes: f, preUpdate: c, update: u, preRender: d, render: h, postRender: m } = o, y = () => {
|
|
159
|
+
const v = N.useManualTiming ? r.timestamp : performance.now();
|
|
160
|
+
n = !1, N.useManualTiming || (r.delta = s ? 1e3 / 60 : Math.max(Math.min(v - r.timestamp, Gs), 1)), r.timestamp = v, r.isProcessing = !0, a.process(r), l.process(r), f.process(r), c.process(r), u.process(r), d.process(r), h.process(r), m.process(r), r.isProcessing = !1, n && t && (s = !1, e(y));
|
|
161
|
+
}, T = () => {
|
|
162
|
+
n = !0, s = !0, r.isProcessing || e(y);
|
|
163
163
|
};
|
|
164
|
-
return { schedule:
|
|
165
|
-
const
|
|
166
|
-
return
|
|
167
|
-
}, {}), cancel: (
|
|
168
|
-
for (let
|
|
169
|
-
o[
|
|
164
|
+
return { schedule: we.reduce((v, S) => {
|
|
165
|
+
const g = o[S];
|
|
166
|
+
return v[S] = (A, V = !1, w = !1) => (n || T(), g.schedule(A, V, w)), v;
|
|
167
|
+
}, {}), cancel: (v) => {
|
|
168
|
+
for (let S = 0; S < we.length; S++)
|
|
169
|
+
o[we[S]].cancel(v);
|
|
170
170
|
}, state: r, steps: o };
|
|
171
171
|
}
|
|
172
|
-
const { schedule: K, cancel:
|
|
173
|
-
let
|
|
174
|
-
function
|
|
175
|
-
|
|
172
|
+
const { schedule: K, cancel: $e, state: Me } = /* @__PURE__ */ Pn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : Z, !0);
|
|
173
|
+
let Ve;
|
|
174
|
+
function zs() {
|
|
175
|
+
Ve = void 0;
|
|
176
176
|
}
|
|
177
177
|
const I = {
|
|
178
|
-
now: () => (
|
|
178
|
+
now: () => (Ve === void 0 && I.set(Me.isProcessing || N.useManualTiming ? Me.timestamp : performance.now()), Ve),
|
|
179
179
|
set: (e) => {
|
|
180
|
-
|
|
180
|
+
Ve = e, queueMicrotask(zs);
|
|
181
181
|
}
|
|
182
|
-
},
|
|
182
|
+
}, On = (e) => (t) => typeof t == "string" && t.startsWith(e), Rn = /* @__PURE__ */ On("--"), Ys = /* @__PURE__ */ On("var(--"), ct = (e) => Ys(e) ? Xs.test(e.split("/*")[0].trim()) : !1, Xs = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, J = {
|
|
183
183
|
test: (e) => typeof e == "number",
|
|
184
184
|
parse: parseFloat,
|
|
185
185
|
transform: (e) => e
|
|
186
|
-
},
|
|
187
|
-
...
|
|
188
|
-
transform: (e) =>
|
|
189
|
-
},
|
|
190
|
-
...
|
|
186
|
+
}, ce = {
|
|
187
|
+
...J,
|
|
188
|
+
transform: (e) => U(0, 1, e)
|
|
189
|
+
}, Te = {
|
|
190
|
+
...J,
|
|
191
191
|
default: 1
|
|
192
|
-
},
|
|
193
|
-
function
|
|
192
|
+
}, ae = (e) => Math.round(e * 1e5) / 1e5, ut = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
193
|
+
function Zs(e) {
|
|
194
194
|
return e == null;
|
|
195
195
|
}
|
|
196
|
-
const
|
|
196
|
+
const Js = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, ft = (e, t) => (n) => !!(typeof n == "string" && Js.test(n) && n.startsWith(e) || t && !Zs(n) && Object.prototype.hasOwnProperty.call(n, t)), Nn = (e, t, n) => (s) => {
|
|
197
197
|
if (typeof s != "string")
|
|
198
198
|
return s;
|
|
199
|
-
const [r, i, o, a] = s.match(
|
|
199
|
+
const [r, i, o, a] = s.match(ut);
|
|
200
200
|
return {
|
|
201
201
|
[e]: parseFloat(r),
|
|
202
202
|
[t]: parseFloat(i),
|
|
203
203
|
[n]: parseFloat(o),
|
|
204
204
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
205
205
|
};
|
|
206
|
-
},
|
|
207
|
-
...
|
|
208
|
-
transform: (e) => Math.round(
|
|
209
|
-
},
|
|
210
|
-
test: /* @__PURE__ */
|
|
211
|
-
parse: /* @__PURE__ */
|
|
212
|
-
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" +
|
|
206
|
+
}, Qs = (e) => U(0, 255, e), Ie = {
|
|
207
|
+
...J,
|
|
208
|
+
transform: (e) => Math.round(Qs(e))
|
|
209
|
+
}, $ = {
|
|
210
|
+
test: /* @__PURE__ */ ft("rgb", "red"),
|
|
211
|
+
parse: /* @__PURE__ */ Nn("red", "green", "blue"),
|
|
212
|
+
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ie.transform(e) + ", " + Ie.transform(t) + ", " + Ie.transform(n) + ", " + ae(ce.transform(s)) + ")"
|
|
213
213
|
};
|
|
214
|
-
function
|
|
214
|
+
function er(e) {
|
|
215
215
|
let t = "", n = "", s = "", r = "";
|
|
216
216
|
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), r = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), r = e.substring(4, 5), t += t, n += n, s += s, r += r), {
|
|
217
217
|
red: parseInt(t, 16),
|
|
@@ -220,82 +220,82 @@ function ir(e) {
|
|
|
220
220
|
alpha: r ? parseInt(r, 16) / 255 : 1
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
const
|
|
224
|
-
test: /* @__PURE__ */
|
|
225
|
-
parse:
|
|
226
|
-
transform:
|
|
227
|
-
},
|
|
223
|
+
const He = {
|
|
224
|
+
test: /* @__PURE__ */ ft("#"),
|
|
225
|
+
parse: er,
|
|
226
|
+
transform: $.transform
|
|
227
|
+
}, me = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
228
228
|
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
229
229
|
parse: parseFloat,
|
|
230
230
|
transform: (t) => `${t}${e}`
|
|
231
|
-
}),
|
|
232
|
-
...
|
|
233
|
-
parse: (e) =>
|
|
234
|
-
transform: (e) =>
|
|
235
|
-
},
|
|
236
|
-
test: /* @__PURE__ */
|
|
237
|
-
parse: /* @__PURE__ */
|
|
238
|
-
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " +
|
|
231
|
+
}), q = /* @__PURE__ */ me("deg"), z = /* @__PURE__ */ me("%"), p = /* @__PURE__ */ me("px"), tr = /* @__PURE__ */ me("vh"), nr = /* @__PURE__ */ me("vw"), It = {
|
|
232
|
+
...z,
|
|
233
|
+
parse: (e) => z.parse(e) / 100,
|
|
234
|
+
transform: (e) => z.transform(e * 100)
|
|
235
|
+
}, G = {
|
|
236
|
+
test: /* @__PURE__ */ ft("hsl", "hue"),
|
|
237
|
+
parse: /* @__PURE__ */ Nn("hue", "saturation", "lightness"),
|
|
238
|
+
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + z.transform(ae(t)) + ", " + z.transform(ae(n)) + ", " + ae(ce.transform(s)) + ")"
|
|
239
239
|
}, k = {
|
|
240
|
-
test: (e) =>
|
|
241
|
-
parse: (e) =>
|
|
242
|
-
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ?
|
|
240
|
+
test: (e) => $.test(e) || He.test(e) || G.test(e),
|
|
241
|
+
parse: (e) => $.test(e) ? $.parse(e) : G.test(e) ? G.parse(e) : He.parse(e),
|
|
242
|
+
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? $.transform(e) : G.transform(e),
|
|
243
243
|
getAnimatableNone: (e) => {
|
|
244
244
|
const t = k.parse(e);
|
|
245
245
|
return t.alpha = 0, k.transform(t);
|
|
246
246
|
}
|
|
247
|
-
},
|
|
248
|
-
function
|
|
249
|
-
return isNaN(e) && typeof e == "string" && (e.match(
|
|
247
|
+
}, sr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
248
|
+
function rr(e) {
|
|
249
|
+
return isNaN(e) && typeof e == "string" && (e.match(ut)?.length || 0) + (e.match(sr)?.length || 0) > 0;
|
|
250
250
|
}
|
|
251
|
-
const
|
|
252
|
-
function
|
|
251
|
+
const Kn = "number", Bn = "color", ir = "var", or = "var(", Lt = "${}", ar = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
252
|
+
function ue(e) {
|
|
253
253
|
const t = e.toString(), n = [], s = {
|
|
254
254
|
color: [],
|
|
255
255
|
number: [],
|
|
256
256
|
var: []
|
|
257
257
|
}, r = [];
|
|
258
258
|
let i = 0;
|
|
259
|
-
const a = t.replace(
|
|
259
|
+
const a = t.replace(ar, (l) => (k.test(l) ? (s.color.push(i), r.push(Bn), n.push(k.parse(l))) : l.startsWith(or) ? (s.var.push(i), r.push(ir), n.push(l)) : (s.number.push(i), r.push(Kn), n.push(parseFloat(l))), ++i, Lt)).split(Lt);
|
|
260
260
|
return { values: n, split: a, indexes: s, types: r };
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
return
|
|
262
|
+
function qn(e) {
|
|
263
|
+
return ue(e).values;
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
const { split: t, types: n } =
|
|
265
|
+
function $n(e) {
|
|
266
|
+
const { split: t, types: n } = ue(e), s = t.length;
|
|
267
267
|
return (r) => {
|
|
268
268
|
let i = "";
|
|
269
269
|
for (let o = 0; o < s; o++)
|
|
270
270
|
if (i += t[o], r[o] !== void 0) {
|
|
271
271
|
const a = n[o];
|
|
272
|
-
a ===
|
|
272
|
+
a === Kn ? i += ae(r[o]) : a === Bn ? i += k.transform(r[o]) : i += r[o];
|
|
273
273
|
}
|
|
274
274
|
return i;
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
const
|
|
278
|
-
function
|
|
279
|
-
const t =
|
|
280
|
-
return
|
|
281
|
-
}
|
|
282
|
-
const
|
|
283
|
-
test:
|
|
284
|
-
parse:
|
|
285
|
-
createTransformer:
|
|
286
|
-
getAnimatableNone:
|
|
277
|
+
const lr = (e) => typeof e == "number" ? 0 : k.test(e) ? k.getAnimatableNone(e) : e;
|
|
278
|
+
function cr(e) {
|
|
279
|
+
const t = qn(e);
|
|
280
|
+
return $n(e)(t.map(lr));
|
|
281
|
+
}
|
|
282
|
+
const Q = {
|
|
283
|
+
test: rr,
|
|
284
|
+
parse: qn,
|
|
285
|
+
createTransformer: $n,
|
|
286
|
+
getAnimatableNone: cr
|
|
287
287
|
};
|
|
288
|
-
function
|
|
288
|
+
function Le(e, t, n) {
|
|
289
289
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function ur({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
292
292
|
e /= 360, t /= 100, n /= 100;
|
|
293
293
|
let r = 0, i = 0, o = 0;
|
|
294
294
|
if (!t)
|
|
295
295
|
r = i = o = n;
|
|
296
296
|
else {
|
|
297
297
|
const a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
|
|
298
|
-
r =
|
|
298
|
+
r = Le(l, a, e + 1 / 3), i = Le(l, a, e), o = Le(l, a, e - 1 / 3);
|
|
299
299
|
}
|
|
300
300
|
return {
|
|
301
301
|
red: Math.round(r * 255),
|
|
@@ -304,55 +304,55 @@ function pr({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
|
304
304
|
alpha: s
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function ke(e, t) {
|
|
308
308
|
return (n) => n > 0 ? t : e;
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const pe = (e, t, n) => e + (t - e) * n, Fe = (e, t, n) => {
|
|
311
311
|
const s = e * e, r = n * (t * t - s) + s;
|
|
312
312
|
return r < 0 ? 0 : Math.sqrt(r);
|
|
313
|
-
},
|
|
314
|
-
function
|
|
315
|
-
const t =
|
|
313
|
+
}, fr = [He, $, G], dr = (e) => fr.find((t) => t.test(e));
|
|
314
|
+
function Ft(e) {
|
|
315
|
+
const t = dr(e);
|
|
316
316
|
if (!t)
|
|
317
317
|
return !1;
|
|
318
318
|
let n = t.parse(e);
|
|
319
|
-
return t ===
|
|
319
|
+
return t === G && (n = ur(n)), n;
|
|
320
320
|
}
|
|
321
|
-
const
|
|
322
|
-
const n =
|
|
321
|
+
const Pt = (e, t) => {
|
|
322
|
+
const n = Ft(e), s = Ft(t);
|
|
323
323
|
if (!n || !s)
|
|
324
|
-
return
|
|
324
|
+
return ke(e, t);
|
|
325
325
|
const r = { ...n };
|
|
326
|
-
return (i) => (r.red =
|
|
327
|
-
},
|
|
328
|
-
function
|
|
329
|
-
return
|
|
326
|
+
return (i) => (r.red = Fe(n.red, s.red, i), r.green = Fe(n.green, s.green, i), r.blue = Fe(n.blue, s.blue, i), r.alpha = pe(n.alpha, s.alpha, i), $.transform(r));
|
|
327
|
+
}, We = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
328
|
+
function hr(e, t) {
|
|
329
|
+
return We.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
return (n) =>
|
|
331
|
+
function mr(e, t) {
|
|
332
|
+
return (n) => pe(e, t, n);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
return typeof e == "number" ?
|
|
334
|
+
function dt(e) {
|
|
335
|
+
return typeof e == "number" ? mr : typeof e == "string" ? ct(e) ? ke : k.test(e) ? Pt : yr : Array.isArray(e) ? Hn : typeof e == "object" ? k.test(e) ? Pt : pr : ke;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
const n = [...e], s = n.length, r = e.map((i, o) =>
|
|
337
|
+
function Hn(e, t) {
|
|
338
|
+
const n = [...e], s = n.length, r = e.map((i, o) => dt(i)(i, t[o]));
|
|
339
339
|
return (i) => {
|
|
340
340
|
for (let o = 0; o < s; o++)
|
|
341
341
|
n[o] = r[o](i);
|
|
342
342
|
return n;
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function pr(e, t) {
|
|
346
346
|
const n = { ...e, ...t }, s = {};
|
|
347
347
|
for (const r in n)
|
|
348
|
-
e[r] !== void 0 && t[r] !== void 0 && (s[r] =
|
|
348
|
+
e[r] !== void 0 && t[r] !== void 0 && (s[r] = dt(e[r])(e[r], t[r]));
|
|
349
349
|
return (r) => {
|
|
350
350
|
for (const i in s)
|
|
351
351
|
n[i] = s[i](r);
|
|
352
352
|
return n;
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function gr(e, t) {
|
|
356
356
|
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
357
357
|
for (let r = 0; r < t.values.length; r++) {
|
|
358
358
|
const i = t.types[r], o = e.indexes[i][s[i]], a = e.values[o] ?? 0;
|
|
@@ -360,51 +360,51 @@ function Tr(e, t) {
|
|
|
360
360
|
}
|
|
361
361
|
return n;
|
|
362
362
|
}
|
|
363
|
-
const
|
|
364
|
-
const n =
|
|
365
|
-
return s.indexes.var.length === r.indexes.var.length && s.indexes.color.length === r.indexes.color.length && s.indexes.number.length >= r.indexes.number.length ?
|
|
363
|
+
const yr = (e, t) => {
|
|
364
|
+
const n = Q.createTransformer(t), s = ue(e), r = ue(t);
|
|
365
|
+
return s.indexes.var.length === r.indexes.var.length && s.indexes.color.length === r.indexes.color.length && s.indexes.number.length >= r.indexes.number.length ? We.has(e) && !r.values.length || We.has(t) && !s.values.length ? hr(e, t) : it(Hn(gr(s, r), r.values), n) : ke(e, t);
|
|
366
366
|
};
|
|
367
|
-
function
|
|
368
|
-
return typeof e == "number" && typeof t == "number" && typeof n == "number" ?
|
|
367
|
+
function Wn(e, t, n) {
|
|
368
|
+
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? pe(e, t, n) : dt(e)(e, t);
|
|
369
369
|
}
|
|
370
|
-
const
|
|
370
|
+
const br = (e) => {
|
|
371
371
|
const t = ({ timestamp: n }) => e(n);
|
|
372
372
|
return {
|
|
373
373
|
start: (n = !0) => K.update(t, n),
|
|
374
|
-
stop: () =>
|
|
374
|
+
stop: () => $e(t),
|
|
375
375
|
/**
|
|
376
376
|
* If we're processing this frame we can use the
|
|
377
377
|
* framelocked timestamp to keep things in sync.
|
|
378
378
|
*/
|
|
379
|
-
now: () =>
|
|
379
|
+
now: () => Me.isProcessing ? Me.timestamp : I.now()
|
|
380
380
|
};
|
|
381
|
-
},
|
|
381
|
+
}, _n = (e, t, n = 10) => {
|
|
382
382
|
let s = "";
|
|
383
383
|
const r = Math.max(Math.round(t / n), 2);
|
|
384
384
|
for (let i = 0; i < r; i++)
|
|
385
385
|
s += Math.round(e(i / (r - 1)) * 1e4) / 1e4 + ", ";
|
|
386
386
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
387
|
-
},
|
|
388
|
-
function
|
|
387
|
+
}, Ce = 2e4;
|
|
388
|
+
function ht(e) {
|
|
389
389
|
let t = 0;
|
|
390
390
|
const n = 50;
|
|
391
391
|
let s = e.next(t);
|
|
392
|
-
for (; !s.done && t <
|
|
392
|
+
for (; !s.done && t < Ce; )
|
|
393
393
|
t += n, s = e.next(t);
|
|
394
|
-
return t >=
|
|
394
|
+
return t >= Ce ? 1 / 0 : t;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
const s = n({ ...e, keyframes: [0, t] }), r = Math.min(
|
|
396
|
+
function Un(e, t = 100, n) {
|
|
397
|
+
const s = n({ ...e, keyframes: [0, t] }), r = Math.min(ht(s), Ce);
|
|
398
398
|
return {
|
|
399
399
|
type: "keyframes",
|
|
400
400
|
ease: (i) => s.next(r * i).value / t,
|
|
401
401
|
duration: /* @__PURE__ */ F(r)
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
|
-
const
|
|
405
|
-
function
|
|
406
|
-
const s = Math.max(t -
|
|
407
|
-
return
|
|
404
|
+
const wr = 5;
|
|
405
|
+
function jn(e, t, n) {
|
|
406
|
+
const s = Math.max(t - wr, 0);
|
|
407
|
+
return An(n - e(s), t - s);
|
|
408
408
|
}
|
|
409
409
|
const M = {
|
|
410
410
|
// Default spring physics
|
|
@@ -435,52 +435,52 @@ const M = {
|
|
|
435
435
|
minDamping: 0.05,
|
|
436
436
|
maxDamping: 1
|
|
437
437
|
}, Pe = 1e-3;
|
|
438
|
-
function
|
|
438
|
+
function Tr({ duration: e = M.duration, bounce: t = M.bounce, velocity: n = M.velocity, mass: s = M.mass }) {
|
|
439
439
|
let r, i, o = 1 - t;
|
|
440
|
-
o =
|
|
441
|
-
const c =
|
|
440
|
+
o = U(M.minDamping, M.maxDamping, o), e = U(M.minDuration, M.maxDuration, /* @__PURE__ */ F(e)), o < 1 ? (r = (f) => {
|
|
441
|
+
const c = f * o, u = c * e, d = c - n, h = _e(f, o), m = Math.exp(-u);
|
|
442
442
|
return Pe - d / h * m;
|
|
443
|
-
}, i = (
|
|
444
|
-
const
|
|
445
|
-
return (-r(
|
|
446
|
-
}) : (r = (
|
|
447
|
-
const c = Math.exp(-
|
|
448
|
-
return -Pe + c *
|
|
449
|
-
}, i = (
|
|
450
|
-
const c = Math.exp(-
|
|
451
|
-
return c *
|
|
443
|
+
}, i = (f) => {
|
|
444
|
+
const u = f * o * e, d = u * n + n, h = Math.pow(o, 2) * Math.pow(f, 2) * e, m = Math.exp(-u), y = _e(Math.pow(f, 2), o);
|
|
445
|
+
return (-r(f) + Pe > 0 ? -1 : 1) * ((d - h) * m) / y;
|
|
446
|
+
}) : (r = (f) => {
|
|
447
|
+
const c = Math.exp(-f * e), u = (f - n) * e + 1;
|
|
448
|
+
return -Pe + c * u;
|
|
449
|
+
}, i = (f) => {
|
|
450
|
+
const c = Math.exp(-f * e), u = (n - f) * (e * e);
|
|
451
|
+
return c * u;
|
|
452
452
|
});
|
|
453
|
-
const a = 5 / e, l =
|
|
454
|
-
if (e = /* @__PURE__ */
|
|
453
|
+
const a = 5 / e, l = Ar(r, i, a);
|
|
454
|
+
if (e = /* @__PURE__ */ O(e), isNaN(l))
|
|
455
455
|
return {
|
|
456
456
|
stiffness: M.stiffness,
|
|
457
457
|
damping: M.damping,
|
|
458
458
|
duration: e
|
|
459
459
|
};
|
|
460
460
|
{
|
|
461
|
-
const
|
|
461
|
+
const f = Math.pow(l, 2) * s;
|
|
462
462
|
return {
|
|
463
|
-
stiffness:
|
|
464
|
-
damping: o * 2 * Math.sqrt(s *
|
|
463
|
+
stiffness: f,
|
|
464
|
+
damping: o * 2 * Math.sqrt(s * f),
|
|
465
465
|
duration: e
|
|
466
466
|
};
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
const
|
|
470
|
-
function
|
|
469
|
+
const vr = 12;
|
|
470
|
+
function Ar(e, t, n) {
|
|
471
471
|
let s = n;
|
|
472
|
-
for (let r = 1; r <
|
|
472
|
+
for (let r = 1; r < vr; r++)
|
|
473
473
|
s = s - e(s) / t(s);
|
|
474
474
|
return s;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function _e(e, t) {
|
|
477
477
|
return e * Math.sqrt(1 - t * t);
|
|
478
478
|
}
|
|
479
|
-
const
|
|
480
|
-
function
|
|
479
|
+
const Sr = ["duration", "bounce"], xr = ["stiffness", "damping", "mass"];
|
|
480
|
+
function Ot(e, t) {
|
|
481
481
|
return t.some((n) => e[n] !== void 0);
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function Er(e) {
|
|
484
484
|
let t = {
|
|
485
485
|
velocity: M.velocity,
|
|
486
486
|
stiffness: M.stiffness,
|
|
@@ -489,9 +489,9 @@ function Lr(e) {
|
|
|
489
489
|
isResolvedFromDuration: !1,
|
|
490
490
|
...e
|
|
491
491
|
};
|
|
492
|
-
if (!
|
|
492
|
+
if (!Ot(e, xr) && Ot(e, Sr))
|
|
493
493
|
if (e.visualDuration) {
|
|
494
|
-
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), r = s * s, i = 2 *
|
|
494
|
+
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), r = s * s, i = 2 * U(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
|
|
495
495
|
t = {
|
|
496
496
|
...t,
|
|
497
497
|
mass: M.mass,
|
|
@@ -499,7 +499,7 @@ function Lr(e) {
|
|
|
499
499
|
damping: i
|
|
500
500
|
};
|
|
501
501
|
} else {
|
|
502
|
-
const n =
|
|
502
|
+
const n = Tr(e);
|
|
503
503
|
t = {
|
|
504
504
|
...t,
|
|
505
505
|
...n,
|
|
@@ -508,175 +508,175 @@ function Lr(e) {
|
|
|
508
508
|
}
|
|
509
509
|
return t;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function X(e = M.visualDuration, t = M.bounce) {
|
|
512
512
|
const n = typeof e != "object" ? {
|
|
513
513
|
visualDuration: e,
|
|
514
514
|
keyframes: [0, 1],
|
|
515
515
|
bounce: t
|
|
516
516
|
} : e;
|
|
517
517
|
let { restSpeed: s, restDelta: r } = n;
|
|
518
|
-
const i = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: i }, { stiffness: l, damping:
|
|
518
|
+
const i = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: i }, { stiffness: l, damping: f, mass: c, duration: u, velocity: d, isResolvedFromDuration: h } = Er({
|
|
519
519
|
...n,
|
|
520
520
|
velocity: -/* @__PURE__ */ F(n.velocity || 0)
|
|
521
|
-
}), m = d || 0,
|
|
522
|
-
s || (s =
|
|
523
|
-
let
|
|
524
|
-
if (
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
const V = Math.exp(-
|
|
528
|
-
return o - V * ((m +
|
|
521
|
+
}), m = d || 0, y = f / (2 * Math.sqrt(l * c)), T = o - i, b = /* @__PURE__ */ F(Math.sqrt(l / c)), x = Math.abs(T) < 5;
|
|
522
|
+
s || (s = x ? M.restSpeed.granular : M.restSpeed.default), r || (r = x ? M.restDelta.granular : M.restDelta.default);
|
|
523
|
+
let v;
|
|
524
|
+
if (y < 1) {
|
|
525
|
+
const g = _e(b, y);
|
|
526
|
+
v = (A) => {
|
|
527
|
+
const V = Math.exp(-y * b * A);
|
|
528
|
+
return o - V * ((m + y * b * T) / g * Math.sin(g * A) + T * Math.cos(g * A));
|
|
529
529
|
};
|
|
530
|
-
} else if (
|
|
531
|
-
|
|
530
|
+
} else if (y === 1)
|
|
531
|
+
v = (g) => o - Math.exp(-b * g) * (T + (m + b * T) * g);
|
|
532
532
|
else {
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
const V = Math.exp(-
|
|
536
|
-
return o - V * ((m +
|
|
533
|
+
const g = b * Math.sqrt(y * y - 1);
|
|
534
|
+
v = (A) => {
|
|
535
|
+
const V = Math.exp(-y * b * A), w = Math.min(g * A, 300);
|
|
536
|
+
return o - V * ((m + y * b * T) * Math.sinh(w) + g * T * Math.cosh(w)) / g;
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
|
-
const
|
|
540
|
-
calculatedDuration: h &&
|
|
541
|
-
next: (
|
|
542
|
-
const
|
|
539
|
+
const S = {
|
|
540
|
+
calculatedDuration: h && u || null,
|
|
541
|
+
next: (g) => {
|
|
542
|
+
const A = v(g);
|
|
543
543
|
if (h)
|
|
544
|
-
a.done =
|
|
544
|
+
a.done = g >= u;
|
|
545
545
|
else {
|
|
546
|
-
let V =
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
a.done =
|
|
546
|
+
let V = g === 0 ? m : 0;
|
|
547
|
+
y < 1 && (V = g === 0 ? /* @__PURE__ */ O(m) : jn(v, g, A));
|
|
548
|
+
const w = Math.abs(V) <= s, E = Math.abs(o - A) <= r;
|
|
549
|
+
a.done = w && E;
|
|
550
550
|
}
|
|
551
|
-
return a.value = a.done ? o :
|
|
551
|
+
return a.value = a.done ? o : A, a;
|
|
552
552
|
},
|
|
553
553
|
toString: () => {
|
|
554
|
-
const
|
|
555
|
-
return
|
|
554
|
+
const g = Math.min(ht(S), Ce), A = _n((V) => S.next(g * V).value, g, 30);
|
|
555
|
+
return g + "ms " + A;
|
|
556
556
|
},
|
|
557
557
|
toTransition: () => {
|
|
558
558
|
}
|
|
559
559
|
};
|
|
560
|
-
return
|
|
560
|
+
return S;
|
|
561
561
|
}
|
|
562
|
-
|
|
563
|
-
const t =
|
|
564
|
-
return e.ease = t.ease, e.duration = /* @__PURE__ */
|
|
562
|
+
X.applyToOptions = (e) => {
|
|
563
|
+
const t = Un(e, 100, X);
|
|
564
|
+
return e.ease = t.ease, e.duration = /* @__PURE__ */ O(t.duration), e.type = "keyframes", e;
|
|
565
565
|
};
|
|
566
|
-
function
|
|
567
|
-
const
|
|
566
|
+
function Ue({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: r = 10, bounceStiffness: i = 500, modifyTarget: o, min: a, max: l, restDelta: f = 0.5, restSpeed: c }) {
|
|
567
|
+
const u = e[0], d = {
|
|
568
568
|
done: !1,
|
|
569
|
-
value:
|
|
570
|
-
}, h = (
|
|
571
|
-
let
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
const E =
|
|
576
|
-
d.done = Math.abs(E) <=
|
|
569
|
+
value: u
|
|
570
|
+
}, h = (w) => a !== void 0 && w < a || l !== void 0 && w > l, m = (w) => a === void 0 ? l : l === void 0 || Math.abs(a - w) < Math.abs(l - w) ? a : l;
|
|
571
|
+
let y = n * t;
|
|
572
|
+
const T = u + y, b = o === void 0 ? T : o(T);
|
|
573
|
+
b !== T && (y = b - u);
|
|
574
|
+
const x = (w) => -y * Math.exp(-w / s), v = (w) => b + x(w), S = (w) => {
|
|
575
|
+
const E = x(w), D = v(w);
|
|
576
|
+
d.done = Math.abs(E) <= f, d.value = d.done ? b : D;
|
|
577
577
|
};
|
|
578
|
-
let
|
|
579
|
-
const V = (
|
|
580
|
-
h(d.value) && (
|
|
578
|
+
let g, A;
|
|
579
|
+
const V = (w) => {
|
|
580
|
+
h(d.value) && (g = w, A = X({
|
|
581
581
|
keyframes: [d.value, m(d.value)],
|
|
582
|
-
velocity:
|
|
582
|
+
velocity: jn(v, w, d.value),
|
|
583
583
|
// TODO: This should be passing * 1000
|
|
584
584
|
damping: r,
|
|
585
585
|
stiffness: i,
|
|
586
|
-
restDelta:
|
|
586
|
+
restDelta: f,
|
|
587
587
|
restSpeed: c
|
|
588
588
|
}));
|
|
589
589
|
};
|
|
590
590
|
return V(0), {
|
|
591
591
|
calculatedDuration: null,
|
|
592
|
-
next: (
|
|
592
|
+
next: (w) => {
|
|
593
593
|
let E = !1;
|
|
594
|
-
return !
|
|
594
|
+
return !A && g === void 0 && (E = !0, S(w), V(w)), g !== void 0 && w >= g ? A.next(w - g) : (!E && S(w), d);
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
const s = [], r = n || N.mix ||
|
|
598
|
+
function Vr(e, t, n) {
|
|
599
|
+
const s = [], r = n || N.mix || Wn, i = e.length - 1;
|
|
600
600
|
for (let o = 0; o < i; o++) {
|
|
601
601
|
let a = r(e[o], e[o + 1]);
|
|
602
602
|
if (t) {
|
|
603
|
-
const l = Array.isArray(t) ? t[o] ||
|
|
604
|
-
a =
|
|
603
|
+
const l = Array.isArray(t) ? t[o] || Z : t;
|
|
604
|
+
a = it(l, a);
|
|
605
605
|
}
|
|
606
606
|
s.push(a);
|
|
607
607
|
}
|
|
608
608
|
return s;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function Mr(e, t, { clamp: n = !0, ease: s, mixer: r } = {}) {
|
|
611
611
|
const i = e.length;
|
|
612
|
-
if (
|
|
612
|
+
if (st(i === t.length), i === 1)
|
|
613
613
|
return () => t[0];
|
|
614
614
|
if (i === 2 && t[0] === t[1])
|
|
615
615
|
return () => t[1];
|
|
616
616
|
const o = e[0] === e[1];
|
|
617
617
|
e[0] > e[i - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
618
|
-
const a =
|
|
618
|
+
const a = Vr(t, s, r), l = a.length, f = (c) => {
|
|
619
619
|
if (o && c < e[0])
|
|
620
620
|
return t[0];
|
|
621
|
-
let
|
|
621
|
+
let u = 0;
|
|
622
622
|
if (l > 1)
|
|
623
|
-
for (;
|
|
623
|
+
for (; u < e.length - 2 && !(c < e[u + 1]); u++)
|
|
624
624
|
;
|
|
625
|
-
const d = /* @__PURE__ */
|
|
626
|
-
return a[
|
|
625
|
+
const d = /* @__PURE__ */ ot(e[u], e[u + 1], c);
|
|
626
|
+
return a[u](d);
|
|
627
627
|
};
|
|
628
|
-
return n ? (c) =>
|
|
628
|
+
return n ? (c) => f(U(e[0], e[i - 1], c)) : f;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function Gn(e, t) {
|
|
631
631
|
const n = e[e.length - 1];
|
|
632
632
|
for (let s = 1; s <= t; s++) {
|
|
633
|
-
const r = /* @__PURE__ */
|
|
634
|
-
e.push(
|
|
633
|
+
const r = /* @__PURE__ */ ot(0, t, s);
|
|
634
|
+
e.push(pe(n, 1, r));
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function zn(e) {
|
|
638
638
|
const t = [0];
|
|
639
|
-
return
|
|
639
|
+
return Gn(t, e.length - 1), t;
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function kr(e, t) {
|
|
642
642
|
return e.map((n) => n * t);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
return e.map(() => t ||
|
|
644
|
+
function Cr(e, t) {
|
|
645
|
+
return e.map(() => t || Dn).splice(0, e.length - 1);
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
const r =
|
|
647
|
+
function le({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
|
|
648
|
+
const r = In(s) ? s.map(Dt) : Dt(s), i = {
|
|
649
649
|
done: !1,
|
|
650
650
|
value: t[0]
|
|
651
|
-
}, o =
|
|
651
|
+
}, o = kr(
|
|
652
652
|
// Only use the provided offsets if they're the correct length
|
|
653
653
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
654
|
-
n && n.length === t.length ? n :
|
|
654
|
+
n && n.length === t.length ? n : zn(t),
|
|
655
655
|
e
|
|
656
|
-
), a =
|
|
657
|
-
ease: Array.isArray(r) ? r :
|
|
656
|
+
), a = Mr(o, t, {
|
|
657
|
+
ease: Array.isArray(r) ? r : Cr(t, r)
|
|
658
658
|
});
|
|
659
659
|
return {
|
|
660
660
|
calculatedDuration: e,
|
|
661
661
|
next: (l) => (i.value = a(l), i.done = l >= e, i)
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
|
-
const
|
|
665
|
-
function
|
|
666
|
-
const i = e.filter(
|
|
664
|
+
const Dr = (e) => e !== null;
|
|
665
|
+
function mt(e, { repeat: t, repeatType: n = "loop" }, s, r = 1) {
|
|
666
|
+
const i = e.filter(Dr), a = r < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
667
667
|
return !a || s === void 0 ? i[a] : s;
|
|
668
668
|
}
|
|
669
|
-
const
|
|
670
|
-
decay:
|
|
671
|
-
inertia:
|
|
672
|
-
tween:
|
|
673
|
-
keyframes:
|
|
674
|
-
spring:
|
|
669
|
+
const Ir = {
|
|
670
|
+
decay: Ue,
|
|
671
|
+
inertia: Ue,
|
|
672
|
+
tween: le,
|
|
673
|
+
keyframes: le,
|
|
674
|
+
spring: X
|
|
675
675
|
};
|
|
676
|
-
function
|
|
677
|
-
typeof e.type == "string" && (e.type =
|
|
676
|
+
function Yn(e) {
|
|
677
|
+
typeof e.type == "string" && (e.type = Ir[e.type]);
|
|
678
678
|
}
|
|
679
|
-
class
|
|
679
|
+
class pt {
|
|
680
680
|
constructor() {
|
|
681
681
|
this.updateFinished();
|
|
682
682
|
}
|
|
@@ -700,8 +700,8 @@ class gt {
|
|
|
700
700
|
return this.finished.then(t, n);
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
-
const
|
|
704
|
-
class
|
|
703
|
+
const Lr = (e) => e / 100;
|
|
704
|
+
class gt extends pt {
|
|
705
705
|
constructor(t) {
|
|
706
706
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
707
707
|
const { motionValue: n } = this.options;
|
|
@@ -710,19 +710,19 @@ class yt extends gt {
|
|
|
710
710
|
}
|
|
711
711
|
initAnimation() {
|
|
712
712
|
const { options: t } = this;
|
|
713
|
-
|
|
714
|
-
const { type: n =
|
|
713
|
+
Yn(t);
|
|
714
|
+
const { type: n = le, repeat: s = 0, repeatDelay: r = 0, repeatType: i, velocity: o = 0 } = t;
|
|
715
715
|
let { keyframes: a } = t;
|
|
716
|
-
const l = n ||
|
|
717
|
-
l !==
|
|
718
|
-
const
|
|
716
|
+
const l = n || le;
|
|
717
|
+
l !== le && typeof a[0] != "number" && (this.mixKeyframes = it(Lr, Wn(a[0], a[1])), a = [0, 100]);
|
|
718
|
+
const f = l({ ...t, keyframes: a });
|
|
719
719
|
i === "mirror" && (this.mirroredGenerator = l({
|
|
720
720
|
...t,
|
|
721
721
|
keyframes: [...a].reverse(),
|
|
722
722
|
velocity: -o
|
|
723
|
-
})),
|
|
724
|
-
const { calculatedDuration: c } =
|
|
725
|
-
this.calculatedDuration = c, this.resolvedDuration = c + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator =
|
|
723
|
+
})), f.calculatedDuration === null && (f.calculatedDuration = ht(f));
|
|
724
|
+
const { calculatedDuration: c } = f;
|
|
725
|
+
this.calculatedDuration = c, this.resolvedDuration = c + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator = f;
|
|
726
726
|
}
|
|
727
727
|
updateTime(t) {
|
|
728
728
|
const n = Math.round(t - this.startTime) * this.playbackSpeed;
|
|
@@ -732,22 +732,22 @@ class yt extends gt {
|
|
|
732
732
|
const { generator: s, totalDuration: r, mixKeyframes: i, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: l } = this;
|
|
733
733
|
if (this.startTime === null)
|
|
734
734
|
return s.next(0);
|
|
735
|
-
const { delay:
|
|
735
|
+
const { delay: f = 0, keyframes: c, repeat: u, repeatType: d, repeatDelay: h, type: m, onUpdate: y, finalKeyframe: T } = this.options;
|
|
736
736
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
737
|
-
const
|
|
738
|
-
this.currentTime = Math.max(
|
|
739
|
-
let
|
|
740
|
-
if (
|
|
741
|
-
const
|
|
742
|
-
let E = Math.floor(
|
|
743
|
-
!D &&
|
|
737
|
+
const b = this.currentTime - f * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? b < 0 : b > r;
|
|
738
|
+
this.currentTime = Math.max(b, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
|
|
739
|
+
let v = this.currentTime, S = s;
|
|
740
|
+
if (u) {
|
|
741
|
+
const w = Math.min(this.currentTime, r) / a;
|
|
742
|
+
let E = Math.floor(w), D = w % 1;
|
|
743
|
+
!D && w >= 1 && (D = 1), D === 1 && E--, E = Math.min(E, u + 1), !!(E % 2) && (d === "reverse" ? (D = 1 - D, h && (D -= h / a)) : d === "mirror" && (S = o)), v = U(0, 1, D) * a;
|
|
744
744
|
}
|
|
745
|
-
const
|
|
746
|
-
i && (
|
|
747
|
-
let { done:
|
|
748
|
-
!
|
|
749
|
-
const V = this.holdTime === null && (this.state === "finished" || this.state === "running" &&
|
|
750
|
-
return V && m !==
|
|
745
|
+
const g = x ? { done: !1, value: c[0] } : S.next(v);
|
|
746
|
+
i && (g.value = i(g.value));
|
|
747
|
+
let { done: A } = g;
|
|
748
|
+
!x && l !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
|
|
749
|
+
const V = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
|
|
750
|
+
return V && m !== Ue && (g.value = mt(c, this.options, T, this.speed)), y && y(g.value), V && this.finish(), g;
|
|
751
751
|
}
|
|
752
752
|
/**
|
|
753
753
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -768,7 +768,7 @@ class yt extends gt {
|
|
|
768
768
|
return /* @__PURE__ */ F(this.currentTime);
|
|
769
769
|
}
|
|
770
770
|
set time(t) {
|
|
771
|
-
t = /* @__PURE__ */
|
|
771
|
+
t = /* @__PURE__ */ O(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver?.start(!1);
|
|
772
772
|
}
|
|
773
773
|
get speed() {
|
|
774
774
|
return this.playbackSpeed;
|
|
@@ -781,7 +781,7 @@ class yt extends gt {
|
|
|
781
781
|
play() {
|
|
782
782
|
if (this.isStopped)
|
|
783
783
|
return;
|
|
784
|
-
const { driver: t =
|
|
784
|
+
const { driver: t = br, startTime: n } = this.options;
|
|
785
785
|
this.driver || (this.driver = t((r) => this.tick(r))), this.options.onPlay?.();
|
|
786
786
|
const s = this.driver.now();
|
|
787
787
|
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();
|
|
@@ -811,14 +811,14 @@ class yt extends gt {
|
|
|
811
811
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function Fr(e) {
|
|
815
815
|
for (let t = 1; t < e.length; t++)
|
|
816
816
|
e[t] ?? (e[t] = e[t - 1]);
|
|
817
817
|
}
|
|
818
|
-
const H = (e) => e * 180 / Math.PI,
|
|
818
|
+
const H = (e) => e * 180 / Math.PI, je = (e) => {
|
|
819
819
|
const t = H(Math.atan2(e[1], e[0]));
|
|
820
|
-
return
|
|
821
|
-
},
|
|
820
|
+
return Ge(t);
|
|
821
|
+
}, Pr = {
|
|
822
822
|
x: 4,
|
|
823
823
|
y: 5,
|
|
824
824
|
translateX: 4,
|
|
@@ -826,56 +826,56 @@ const H = (e) => e * 180 / Math.PI, Ge = (e) => {
|
|
|
826
826
|
scaleX: 0,
|
|
827
827
|
scaleY: 3,
|
|
828
828
|
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
|
|
829
|
-
rotate:
|
|
830
|
-
rotateZ:
|
|
829
|
+
rotate: je,
|
|
830
|
+
rotateZ: je,
|
|
831
831
|
skewX: (e) => H(Math.atan(e[1])),
|
|
832
832
|
skewY: (e) => H(Math.atan(e[2])),
|
|
833
833
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
834
|
-
},
|
|
834
|
+
}, Ge = (e) => (e = e % 360, e < 0 && (e += 360), e), Rt = je, Nt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Kt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), Or = {
|
|
835
835
|
x: 12,
|
|
836
836
|
y: 13,
|
|
837
837
|
z: 14,
|
|
838
838
|
translateX: 12,
|
|
839
839
|
translateY: 13,
|
|
840
840
|
translateZ: 14,
|
|
841
|
-
scaleX:
|
|
842
|
-
scaleY:
|
|
843
|
-
scale: (e) => (
|
|
844
|
-
rotateX: (e) =>
|
|
845
|
-
rotateY: (e) =>
|
|
846
|
-
rotateZ:
|
|
847
|
-
rotate:
|
|
841
|
+
scaleX: Nt,
|
|
842
|
+
scaleY: Kt,
|
|
843
|
+
scale: (e) => (Nt(e) + Kt(e)) / 2,
|
|
844
|
+
rotateX: (e) => Ge(H(Math.atan2(e[6], e[5]))),
|
|
845
|
+
rotateY: (e) => Ge(H(Math.atan2(-e[2], e[0]))),
|
|
846
|
+
rotateZ: Rt,
|
|
847
|
+
rotate: Rt,
|
|
848
848
|
skewX: (e) => H(Math.atan(e[4])),
|
|
849
849
|
skewY: (e) => H(Math.atan(e[1])),
|
|
850
850
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
|
|
851
851
|
};
|
|
852
|
-
function
|
|
852
|
+
function ze(e) {
|
|
853
853
|
return e.includes("scale") ? 1 : 0;
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function Ye(e, t) {
|
|
856
856
|
if (!e || e === "none")
|
|
857
|
-
return
|
|
857
|
+
return ze(t);
|
|
858
858
|
const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
859
859
|
let s, r;
|
|
860
860
|
if (n)
|
|
861
|
-
s =
|
|
861
|
+
s = Or, r = n;
|
|
862
862
|
else {
|
|
863
863
|
const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
864
|
-
s =
|
|
864
|
+
s = Pr, r = a;
|
|
865
865
|
}
|
|
866
866
|
if (!r)
|
|
867
|
-
return
|
|
868
|
-
const i = s[t], o = r[1].split(",").map(
|
|
867
|
+
return ze(t);
|
|
868
|
+
const i = s[t], o = r[1].split(",").map(Nr);
|
|
869
869
|
return typeof i == "function" ? i(o) : o[i];
|
|
870
870
|
}
|
|
871
|
-
const
|
|
871
|
+
const Rr = (e, t) => {
|
|
872
872
|
const { transform: n = "none" } = getComputedStyle(e);
|
|
873
|
-
return
|
|
873
|
+
return Ye(n, t);
|
|
874
874
|
};
|
|
875
|
-
function
|
|
875
|
+
function Nr(e) {
|
|
876
876
|
return parseFloat(e.trim());
|
|
877
877
|
}
|
|
878
|
-
const
|
|
878
|
+
const ee = [
|
|
879
879
|
"transformPerspective",
|
|
880
880
|
"x",
|
|
881
881
|
"y",
|
|
@@ -893,10 +893,10 @@ const ne = [
|
|
|
893
893
|
"skew",
|
|
894
894
|
"skewX",
|
|
895
895
|
"skewY"
|
|
896
|
-
],
|
|
897
|
-
function
|
|
896
|
+
], te = new Set(ee), Bt = (e) => e === J || e === p, Kr = /* @__PURE__ */ new Set(["x", "y", "z"]), Br = ee.filter((e) => !Kr.has(e));
|
|
897
|
+
function qr(e) {
|
|
898
898
|
const t = [];
|
|
899
|
-
return
|
|
899
|
+
return Br.forEach((n) => {
|
|
900
900
|
const s = e.getValue(n);
|
|
901
901
|
s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
902
902
|
}), t;
|
|
@@ -910,18 +910,18 @@ const W = {
|
|
|
910
910
|
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
|
|
911
911
|
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
|
|
912
912
|
// Transform
|
|
913
|
-
x: (e, { transform: t }) =>
|
|
914
|
-
y: (e, { transform: t }) =>
|
|
913
|
+
x: (e, { transform: t }) => Ye(t, "x"),
|
|
914
|
+
y: (e, { transform: t }) => Ye(t, "y")
|
|
915
915
|
};
|
|
916
916
|
W.translateX = W.x;
|
|
917
917
|
W.translateY = W.y;
|
|
918
918
|
const _ = /* @__PURE__ */ new Set();
|
|
919
|
-
let
|
|
920
|
-
function
|
|
921
|
-
if (
|
|
919
|
+
let Xe = !1, Ze = !1, Je = !1;
|
|
920
|
+
function Xn() {
|
|
921
|
+
if (Ze) {
|
|
922
922
|
const e = Array.from(_).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
923
923
|
t.forEach((s) => {
|
|
924
|
-
const r =
|
|
924
|
+
const r = qr(s);
|
|
925
925
|
r.length && (n.set(s, r), s.render());
|
|
926
926
|
}), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
|
|
927
927
|
s.render();
|
|
@@ -933,22 +933,22 @@ function Jn() {
|
|
|
933
933
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
|
-
|
|
936
|
+
Ze = !1, Xe = !1, _.forEach((e) => e.complete(Je)), _.clear();
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function Zn() {
|
|
939
939
|
_.forEach((e) => {
|
|
940
|
-
e.readKeyframes(), e.needsMeasurement && (
|
|
940
|
+
e.readKeyframes(), e.needsMeasurement && (Ze = !0);
|
|
941
941
|
});
|
|
942
942
|
}
|
|
943
|
-
function
|
|
944
|
-
|
|
943
|
+
function $r() {
|
|
944
|
+
Je = !0, Zn(), Xn(), Je = !1;
|
|
945
945
|
}
|
|
946
|
-
class
|
|
946
|
+
class yt {
|
|
947
947
|
constructor(t, n, s, r, i, o = !1) {
|
|
948
948
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = r, this.element = i, this.isAsync = o;
|
|
949
949
|
}
|
|
950
950
|
scheduleResolve() {
|
|
951
|
-
this.state = "scheduled", this.isAsync ? (_.add(this),
|
|
951
|
+
this.state = "scheduled", this.isAsync ? (_.add(this), Xe || (Xe = !0, K.read(Zn), K.resolveKeyframes(Xn))) : (this.readKeyframes(), this.complete());
|
|
952
952
|
}
|
|
953
953
|
readKeyframes() {
|
|
954
954
|
const { unresolvedKeyframes: t, name: n, element: s, motionValue: r } = this;
|
|
@@ -962,7 +962,7 @@ class bt {
|
|
|
962
962
|
}
|
|
963
963
|
t[0] === void 0 && (t[0] = o), r && i === void 0 && r.set(t[0]);
|
|
964
964
|
}
|
|
965
|
-
|
|
965
|
+
Fr(t);
|
|
966
966
|
}
|
|
967
967
|
setFinalKeyframe() {
|
|
968
968
|
}
|
|
@@ -982,71 +982,71 @@ class bt {
|
|
|
982
982
|
this.state === "pending" && this.scheduleResolve();
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
const
|
|
986
|
-
function
|
|
987
|
-
|
|
985
|
+
const Hr = (e) => e.startsWith("--");
|
|
986
|
+
function Wr(e, t, n) {
|
|
987
|
+
Hr(t) ? e.style.setProperty(t, n) : e.style[t] = n;
|
|
988
988
|
}
|
|
989
|
-
const
|
|
990
|
-
function
|
|
991
|
-
const n = /* @__PURE__ */
|
|
992
|
-
return () =>
|
|
989
|
+
const _r = /* @__PURE__ */ rt(() => window.ScrollTimeline !== void 0), Ur = {};
|
|
990
|
+
function jr(e, t) {
|
|
991
|
+
const n = /* @__PURE__ */ rt(e);
|
|
992
|
+
return () => Ur[t] ?? n();
|
|
993
993
|
}
|
|
994
|
-
const
|
|
994
|
+
const Jn = /* @__PURE__ */ jr(() => {
|
|
995
995
|
try {
|
|
996
996
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
997
997
|
} catch {
|
|
998
998
|
return !1;
|
|
999
999
|
}
|
|
1000
1000
|
return !0;
|
|
1001
|
-
}, "linearEasing"),
|
|
1001
|
+
}, "linearEasing"), oe = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, qt = {
|
|
1002
1002
|
linear: "linear",
|
|
1003
1003
|
ease: "ease",
|
|
1004
1004
|
easeIn: "ease-in",
|
|
1005
1005
|
easeOut: "ease-out",
|
|
1006
1006
|
easeInOut: "ease-in-out",
|
|
1007
|
-
circIn: /* @__PURE__ */
|
|
1008
|
-
circOut: /* @__PURE__ */
|
|
1009
|
-
backIn: /* @__PURE__ */
|
|
1010
|
-
backOut: /* @__PURE__ */
|
|
1007
|
+
circIn: /* @__PURE__ */ oe([0, 0.65, 0.55, 1]),
|
|
1008
|
+
circOut: /* @__PURE__ */ oe([0.55, 0, 1, 0.45]),
|
|
1009
|
+
backIn: /* @__PURE__ */ oe([0.31, 0.01, 0.66, -0.59]),
|
|
1010
|
+
backOut: /* @__PURE__ */ oe([0.33, 1.53, 0.69, 0.99])
|
|
1011
1011
|
};
|
|
1012
|
-
function
|
|
1012
|
+
function Qn(e, t) {
|
|
1013
1013
|
if (e)
|
|
1014
|
-
return typeof e == "function" ?
|
|
1014
|
+
return typeof e == "function" ? Jn() ? _n(e, t) : "ease-out" : Fn(e) ? oe(e) : Array.isArray(e) ? e.map((n) => Qn(n, t) || qt.easeOut) : qt[e];
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function Gr(e, t, n, { delay: s = 0, duration: r = 300, repeat: i = 0, repeatType: o = "loop", ease: a = "easeOut", times: l } = {}, f = void 0) {
|
|
1017
1017
|
const c = {
|
|
1018
1018
|
[t]: n
|
|
1019
1019
|
};
|
|
1020
1020
|
l && (c.offset = l);
|
|
1021
|
-
const
|
|
1022
|
-
Array.isArray(
|
|
1021
|
+
const u = Qn(a, r);
|
|
1022
|
+
Array.isArray(u) && (c.easing = u);
|
|
1023
1023
|
const d = {
|
|
1024
1024
|
delay: s,
|
|
1025
1025
|
duration: r,
|
|
1026
|
-
easing: Array.isArray(
|
|
1026
|
+
easing: Array.isArray(u) ? "linear" : u,
|
|
1027
1027
|
fill: "both",
|
|
1028
1028
|
iterations: i + 1,
|
|
1029
1029
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
1030
1030
|
};
|
|
1031
|
-
return
|
|
1031
|
+
return f && (d.pseudoElement = f), e.animate(c, d);
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function bt(e) {
|
|
1034
1034
|
return typeof e == "function" && "applyToOptions" in e;
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1037
|
-
return
|
|
1036
|
+
function zr({ type: e, ...t }) {
|
|
1037
|
+
return bt(e) && Jn() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
|
|
1038
1038
|
}
|
|
1039
|
-
class
|
|
1039
|
+
class Yr extends pt {
|
|
1040
1040
|
constructor(t) {
|
|
1041
1041
|
if (super(), this.finishedTime = null, this.isStopped = !1, !t)
|
|
1042
1042
|
return;
|
|
1043
1043
|
const { element: n, name: s, keyframes: r, pseudoElement: i, allowFlatten: o = !1, finalKeyframe: a, onComplete: l } = t;
|
|
1044
|
-
this.isPseudoElement = !!i, this.allowFlatten = o, this.options = t,
|
|
1045
|
-
const
|
|
1046
|
-
this.animation =
|
|
1044
|
+
this.isPseudoElement = !!i, this.allowFlatten = o, this.options = t, st(typeof t.type != "string");
|
|
1045
|
+
const f = zr(t);
|
|
1046
|
+
this.animation = Gr(n, s, r, f, i), f.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1047
1047
|
if (this.finishedTime = this.time, !i) {
|
|
1048
|
-
const c =
|
|
1049
|
-
this.updateMotionValue ? this.updateMotionValue(c) :
|
|
1048
|
+
const c = mt(r, this.options, a, this.speed);
|
|
1049
|
+
this.updateMotionValue ? this.updateMotionValue(c) : Wr(n, s, c), this.animation.cancel();
|
|
1050
1050
|
}
|
|
1051
1051
|
l?.(), this.notifyFinished();
|
|
1052
1052
|
};
|
|
@@ -1100,7 +1100,7 @@ class ei extends gt {
|
|
|
1100
1100
|
return /* @__PURE__ */ F(Number(this.animation.currentTime) || 0);
|
|
1101
1101
|
}
|
|
1102
1102
|
set time(t) {
|
|
1103
|
-
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
1103
|
+
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ O(t);
|
|
1104
1104
|
}
|
|
1105
1105
|
/**
|
|
1106
1106
|
* The playback speed of the animation.
|
|
@@ -1125,24 +1125,24 @@ class ei extends gt {
|
|
|
1125
1125
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
1126
1126
|
*/
|
|
1127
1127
|
attachTimeline({ timeline: t, observe: n }) {
|
|
1128
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t &&
|
|
1128
|
+
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && _r() ? (this.animation.timeline = t, Z) : n(this);
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
|
-
const
|
|
1132
|
-
anticipate:
|
|
1133
|
-
backInOut:
|
|
1134
|
-
circInOut:
|
|
1131
|
+
const es = {
|
|
1132
|
+
anticipate: kn,
|
|
1133
|
+
backInOut: Mn,
|
|
1134
|
+
circInOut: Cn
|
|
1135
1135
|
};
|
|
1136
|
-
function
|
|
1137
|
-
return e in
|
|
1136
|
+
function Xr(e) {
|
|
1137
|
+
return e in es;
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1140
|
-
typeof e.ease == "string" &&
|
|
1139
|
+
function Zr(e) {
|
|
1140
|
+
typeof e.ease == "string" && Xr(e.ease) && (e.ease = es[e.ease]);
|
|
1141
1141
|
}
|
|
1142
|
-
const
|
|
1143
|
-
class
|
|
1142
|
+
const $t = 10;
|
|
1143
|
+
class Jr extends Yr {
|
|
1144
1144
|
constructor(t) {
|
|
1145
|
-
|
|
1145
|
+
Zr(t), Yn(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
|
|
1146
1146
|
}
|
|
1147
1147
|
/**
|
|
1148
1148
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -1160,17 +1160,17 @@ class si extends ei {
|
|
|
1160
1160
|
n.set(t);
|
|
1161
1161
|
return;
|
|
1162
1162
|
}
|
|
1163
|
-
const a = new
|
|
1163
|
+
const a = new gt({
|
|
1164
1164
|
...o,
|
|
1165
1165
|
autoplay: !1
|
|
1166
|
-
}), l = /* @__PURE__ */
|
|
1167
|
-
n.setWithVelocity(a.sample(l -
|
|
1166
|
+
}), l = /* @__PURE__ */ O(this.finishedTime ?? this.time);
|
|
1167
|
+
n.setWithVelocity(a.sample(l - $t).value, a.sample(l).value, $t), a.stop();
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
|
-
const
|
|
1171
|
-
(
|
|
1170
|
+
const Ht = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
1171
|
+
(Q.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
1172
1172
|
!e.startsWith("url("));
|
|
1173
|
-
function
|
|
1173
|
+
function Qr(e) {
|
|
1174
1174
|
const t = e[0];
|
|
1175
1175
|
if (e.length === 1)
|
|
1176
1176
|
return !0;
|
|
@@ -1178,40 +1178,40 @@ function ri(e) {
|
|
|
1178
1178
|
if (e[n] !== t)
|
|
1179
1179
|
return !0;
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function ei(e, t, n, s) {
|
|
1182
1182
|
const r = e[0];
|
|
1183
1183
|
if (r === null)
|
|
1184
1184
|
return !1;
|
|
1185
1185
|
if (t === "display" || t === "visibility")
|
|
1186
1186
|
return !0;
|
|
1187
|
-
const i = e[e.length - 1], o =
|
|
1188
|
-
return !o || !a ? !1 :
|
|
1187
|
+
const i = e[e.length - 1], o = Ht(r, t), a = Ht(i, t);
|
|
1188
|
+
return !o || !a ? !1 : Qr(e) || (n === "spring" || bt(n)) && s;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function Qe(e) {
|
|
1191
1191
|
e.duration = 0, e.type = "keyframes";
|
|
1192
1192
|
}
|
|
1193
|
-
const
|
|
1193
|
+
const ti = /* @__PURE__ */ new Set([
|
|
1194
1194
|
"opacity",
|
|
1195
1195
|
"clipPath",
|
|
1196
1196
|
"filter",
|
|
1197
1197
|
"transform"
|
|
1198
1198
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1199
1199
|
// "background-color"
|
|
1200
|
-
]),
|
|
1201
|
-
function
|
|
1200
|
+
]), ni = /* @__PURE__ */ rt(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1201
|
+
function si(e) {
|
|
1202
1202
|
const { motionValue: t, name: n, repeatDelay: s, repeatType: r, damping: i, type: o } = e;
|
|
1203
1203
|
if (!(t?.owner?.current instanceof HTMLElement))
|
|
1204
1204
|
return !1;
|
|
1205
|
-
const { onUpdate: l, transformTemplate:
|
|
1206
|
-
return
|
|
1205
|
+
const { onUpdate: l, transformTemplate: f } = t.owner.getProps();
|
|
1206
|
+
return ni() && n && ti.has(n) && (n !== "transform" || !f) && /**
|
|
1207
1207
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1208
1208
|
* no way to read the value from WAAPI every frame.
|
|
1209
1209
|
*/
|
|
1210
1210
|
!l && !s && r !== "mirror" && i !== 0 && o !== "inertia";
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1213
|
-
class
|
|
1214
|
-
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: o = "loop", keyframes: a, name: l, motionValue:
|
|
1212
|
+
const ri = 40;
|
|
1213
|
+
class ii extends pt {
|
|
1214
|
+
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: o = "loop", keyframes: a, name: l, motionValue: f, element: c, ...u }) {
|
|
1215
1215
|
super(), this.stop = () => {
|
|
1216
1216
|
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
1217
1217
|
}, this.createdAt = I.now();
|
|
@@ -1223,26 +1223,26 @@ class ui extends gt {
|
|
|
1223
1223
|
repeatDelay: i,
|
|
1224
1224
|
repeatType: o,
|
|
1225
1225
|
name: l,
|
|
1226
|
-
motionValue:
|
|
1226
|
+
motionValue: f,
|
|
1227
1227
|
element: c,
|
|
1228
|
-
...
|
|
1229
|
-
}, h = c?.KeyframeResolver ||
|
|
1230
|
-
this.keyframeResolver = new h(a, (m,
|
|
1228
|
+
...u
|
|
1229
|
+
}, h = c?.KeyframeResolver || yt;
|
|
1230
|
+
this.keyframeResolver = new h(a, (m, y, T) => this.onKeyframesResolved(m, y, d, !T), l, f, c), this.keyframeResolver?.scheduleResolve();
|
|
1231
1231
|
}
|
|
1232
1232
|
onKeyframesResolved(t, n, s, r) {
|
|
1233
1233
|
this.keyframeResolver = void 0;
|
|
1234
|
-
const { name: i, type: o, velocity: a, delay: l, isHandoff:
|
|
1235
|
-
this.resolvedAt = I.now(),
|
|
1234
|
+
const { name: i, type: o, velocity: a, delay: l, isHandoff: f, onUpdate: c } = s;
|
|
1235
|
+
this.resolvedAt = I.now(), ei(t, i, o, a) || ((N.instantAnimations || !l) && c?.(mt(t, s, n)), t[0] = t[t.length - 1], Qe(s), s.repeat = 0);
|
|
1236
1236
|
const d = {
|
|
1237
|
-
startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1237
|
+
startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > ri ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1238
1238
|
finalKeyframe: n,
|
|
1239
1239
|
...s,
|
|
1240
1240
|
keyframes: t
|
|
1241
|
-
}, h = !
|
|
1241
|
+
}, h = !f && si(d) ? new Jr({
|
|
1242
1242
|
...d,
|
|
1243
1243
|
element: d.motionValue.owner.current
|
|
1244
|
-
}) : new
|
|
1245
|
-
h.finished.then(() => this.notifyFinished()).catch(
|
|
1244
|
+
}) : new gt(d);
|
|
1245
|
+
h.finished.then(() => this.notifyFinished()).catch(Z), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
|
|
1246
1246
|
}
|
|
1247
1247
|
get finished() {
|
|
1248
1248
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -1252,7 +1252,7 @@ class ui extends gt {
|
|
|
1252
1252
|
});
|
|
1253
1253
|
}
|
|
1254
1254
|
get animation() {
|
|
1255
|
-
return this._animation || (this.keyframeResolver?.resume(),
|
|
1255
|
+
return this._animation || (this.keyframeResolver?.resume(), $r()), this._animation;
|
|
1256
1256
|
}
|
|
1257
1257
|
get duration() {
|
|
1258
1258
|
return this.animation.duration;
|
|
@@ -1294,7 +1294,7 @@ class ui extends gt {
|
|
|
1294
1294
|
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
class
|
|
1297
|
+
class oi {
|
|
1298
1298
|
constructor(t) {
|
|
1299
1299
|
this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
|
|
1300
1300
|
}
|
|
@@ -1338,10 +1338,10 @@ class fi {
|
|
|
1338
1338
|
return this.getAll("startTime");
|
|
1339
1339
|
}
|
|
1340
1340
|
get duration() {
|
|
1341
|
-
return
|
|
1341
|
+
return Wt(this.animations, "duration");
|
|
1342
1342
|
}
|
|
1343
1343
|
get iterationDuration() {
|
|
1344
|
-
return
|
|
1344
|
+
return Wt(this.animations, "iterationDuration");
|
|
1345
1345
|
}
|
|
1346
1346
|
runAll(t) {
|
|
1347
1347
|
this.animations.forEach((n) => n[t]());
|
|
@@ -1359,7 +1359,7 @@ class fi {
|
|
|
1359
1359
|
this.runAll("complete");
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function Wt(e, t) {
|
|
1363
1363
|
let n = 0;
|
|
1364
1364
|
for (let s = 0; s < e.length; s++) {
|
|
1365
1365
|
const r = e[s][t];
|
|
@@ -1367,142 +1367,142 @@ function _t(e, t) {
|
|
|
1367
1367
|
}
|
|
1368
1368
|
return n;
|
|
1369
1369
|
}
|
|
1370
|
-
class
|
|
1370
|
+
class ai extends oi {
|
|
1371
1371
|
then(t, n) {
|
|
1372
1372
|
return this.finished.finally(t).then(() => {
|
|
1373
1373
|
});
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
const
|
|
1376
|
+
const li = (
|
|
1377
1377
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1378
1378
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1379
1379
|
);
|
|
1380
|
-
function
|
|
1381
|
-
const t =
|
|
1380
|
+
function ci(e) {
|
|
1381
|
+
const t = li.exec(e);
|
|
1382
1382
|
if (!t)
|
|
1383
1383
|
return [,];
|
|
1384
1384
|
const [, n, s, r] = t;
|
|
1385
1385
|
return [`--${n ?? s}`, r];
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1388
|
-
const [s, r] =
|
|
1387
|
+
function ts(e, t, n = 1) {
|
|
1388
|
+
const [s, r] = ci(e);
|
|
1389
1389
|
if (!s)
|
|
1390
1390
|
return;
|
|
1391
1391
|
const i = window.getComputedStyle(t).getPropertyValue(s);
|
|
1392
1392
|
if (i) {
|
|
1393
1393
|
const o = i.trim();
|
|
1394
|
-
return
|
|
1394
|
+
return wn(o) ? parseFloat(o) : o;
|
|
1395
1395
|
}
|
|
1396
|
-
return
|
|
1396
|
+
return ct(r) ? ts(r, t, n + 1) : r;
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1398
|
+
function ns(e, t) {
|
|
1399
1399
|
return e?.[t] ?? e?.default ?? e;
|
|
1400
1400
|
}
|
|
1401
|
-
const
|
|
1401
|
+
const ss = /* @__PURE__ */ new Set([
|
|
1402
1402
|
"width",
|
|
1403
1403
|
"height",
|
|
1404
1404
|
"top",
|
|
1405
1405
|
"left",
|
|
1406
1406
|
"right",
|
|
1407
1407
|
"bottom",
|
|
1408
|
-
...
|
|
1409
|
-
]),
|
|
1408
|
+
...ee
|
|
1409
|
+
]), ui = {
|
|
1410
1410
|
test: (e) => e === "auto",
|
|
1411
1411
|
parse: (e) => e
|
|
1412
|
-
},
|
|
1413
|
-
function
|
|
1414
|
-
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" ||
|
|
1412
|
+
}, rs = (e) => (t) => t.test(e), is = [J, p, z, q, nr, tr, ui], _t = (e) => is.find(rs(e));
|
|
1413
|
+
function fi(e) {
|
|
1414
|
+
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Tn(e) : !0;
|
|
1415
1415
|
}
|
|
1416
|
-
const
|
|
1417
|
-
function
|
|
1416
|
+
const di = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1417
|
+
function hi(e) {
|
|
1418
1418
|
const [t, n] = e.slice(0, -1).split("(");
|
|
1419
1419
|
if (t === "drop-shadow")
|
|
1420
1420
|
return e;
|
|
1421
|
-
const [s] = n.match(
|
|
1421
|
+
const [s] = n.match(ut) || [];
|
|
1422
1422
|
if (!s)
|
|
1423
1423
|
return e;
|
|
1424
1424
|
const r = n.replace(s, "");
|
|
1425
|
-
let i =
|
|
1425
|
+
let i = di.has(t) ? 1 : 0;
|
|
1426
1426
|
return s !== n && (i *= 100), t + "(" + i + r + ")";
|
|
1427
1427
|
}
|
|
1428
|
-
const
|
|
1429
|
-
...
|
|
1428
|
+
const mi = /\b([a-z-]*)\(.*?\)/gu, et = {
|
|
1429
|
+
...Q,
|
|
1430
1430
|
getAnimatableNone: (e) => {
|
|
1431
|
-
const t = e.match(
|
|
1432
|
-
return t ? t.map(
|
|
1431
|
+
const t = e.match(mi);
|
|
1432
|
+
return t ? t.map(hi).join(" ") : e;
|
|
1433
1433
|
}
|
|
1434
|
-
},
|
|
1435
|
-
...
|
|
1434
|
+
}, Ut = {
|
|
1435
|
+
...J,
|
|
1436
1436
|
transform: Math.round
|
|
1437
|
-
},
|
|
1438
|
-
rotate:
|
|
1439
|
-
rotateX:
|
|
1440
|
-
rotateY:
|
|
1441
|
-
rotateZ:
|
|
1442
|
-
scale:
|
|
1443
|
-
scaleX:
|
|
1444
|
-
scaleY:
|
|
1445
|
-
scaleZ:
|
|
1446
|
-
skew:
|
|
1447
|
-
skewX:
|
|
1448
|
-
skewY:
|
|
1449
|
-
distance:
|
|
1450
|
-
translateX:
|
|
1451
|
-
translateY:
|
|
1452
|
-
translateZ:
|
|
1453
|
-
x:
|
|
1454
|
-
y:
|
|
1455
|
-
z:
|
|
1456
|
-
perspective:
|
|
1457
|
-
transformPerspective:
|
|
1458
|
-
opacity:
|
|
1437
|
+
}, pi = {
|
|
1438
|
+
rotate: q,
|
|
1439
|
+
rotateX: q,
|
|
1440
|
+
rotateY: q,
|
|
1441
|
+
rotateZ: q,
|
|
1442
|
+
scale: Te,
|
|
1443
|
+
scaleX: Te,
|
|
1444
|
+
scaleY: Te,
|
|
1445
|
+
scaleZ: Te,
|
|
1446
|
+
skew: q,
|
|
1447
|
+
skewX: q,
|
|
1448
|
+
skewY: q,
|
|
1449
|
+
distance: p,
|
|
1450
|
+
translateX: p,
|
|
1451
|
+
translateY: p,
|
|
1452
|
+
translateZ: p,
|
|
1453
|
+
x: p,
|
|
1454
|
+
y: p,
|
|
1455
|
+
z: p,
|
|
1456
|
+
perspective: p,
|
|
1457
|
+
transformPerspective: p,
|
|
1458
|
+
opacity: ce,
|
|
1459
1459
|
originX: It,
|
|
1460
1460
|
originY: It,
|
|
1461
|
-
originZ:
|
|
1462
|
-
},
|
|
1461
|
+
originZ: p
|
|
1462
|
+
}, wt = {
|
|
1463
1463
|
// Border props
|
|
1464
|
-
borderWidth:
|
|
1465
|
-
borderTopWidth:
|
|
1466
|
-
borderRightWidth:
|
|
1467
|
-
borderBottomWidth:
|
|
1468
|
-
borderLeftWidth:
|
|
1469
|
-
borderRadius:
|
|
1470
|
-
radius:
|
|
1471
|
-
borderTopLeftRadius:
|
|
1472
|
-
borderTopRightRadius:
|
|
1473
|
-
borderBottomRightRadius:
|
|
1474
|
-
borderBottomLeftRadius:
|
|
1464
|
+
borderWidth: p,
|
|
1465
|
+
borderTopWidth: p,
|
|
1466
|
+
borderRightWidth: p,
|
|
1467
|
+
borderBottomWidth: p,
|
|
1468
|
+
borderLeftWidth: p,
|
|
1469
|
+
borderRadius: p,
|
|
1470
|
+
radius: p,
|
|
1471
|
+
borderTopLeftRadius: p,
|
|
1472
|
+
borderTopRightRadius: p,
|
|
1473
|
+
borderBottomRightRadius: p,
|
|
1474
|
+
borderBottomLeftRadius: p,
|
|
1475
1475
|
// Positioning props
|
|
1476
|
-
width:
|
|
1477
|
-
maxWidth:
|
|
1478
|
-
height:
|
|
1479
|
-
maxHeight:
|
|
1480
|
-
top:
|
|
1481
|
-
right:
|
|
1482
|
-
bottom:
|
|
1483
|
-
left:
|
|
1476
|
+
width: p,
|
|
1477
|
+
maxWidth: p,
|
|
1478
|
+
height: p,
|
|
1479
|
+
maxHeight: p,
|
|
1480
|
+
top: p,
|
|
1481
|
+
right: p,
|
|
1482
|
+
bottom: p,
|
|
1483
|
+
left: p,
|
|
1484
1484
|
// Spacing props
|
|
1485
|
-
padding:
|
|
1486
|
-
paddingTop:
|
|
1487
|
-
paddingRight:
|
|
1488
|
-
paddingBottom:
|
|
1489
|
-
paddingLeft:
|
|
1490
|
-
margin:
|
|
1491
|
-
marginTop:
|
|
1492
|
-
marginRight:
|
|
1493
|
-
marginBottom:
|
|
1494
|
-
marginLeft:
|
|
1485
|
+
padding: p,
|
|
1486
|
+
paddingTop: p,
|
|
1487
|
+
paddingRight: p,
|
|
1488
|
+
paddingBottom: p,
|
|
1489
|
+
paddingLeft: p,
|
|
1490
|
+
margin: p,
|
|
1491
|
+
marginTop: p,
|
|
1492
|
+
marginRight: p,
|
|
1493
|
+
marginBottom: p,
|
|
1494
|
+
marginLeft: p,
|
|
1495
1495
|
// Misc
|
|
1496
|
-
backgroundPositionX:
|
|
1497
|
-
backgroundPositionY:
|
|
1498
|
-
...
|
|
1499
|
-
zIndex:
|
|
1496
|
+
backgroundPositionX: p,
|
|
1497
|
+
backgroundPositionY: p,
|
|
1498
|
+
...pi,
|
|
1499
|
+
zIndex: Ut,
|
|
1500
1500
|
// SVG
|
|
1501
|
-
fillOpacity:
|
|
1502
|
-
strokeOpacity:
|
|
1503
|
-
numOctaves:
|
|
1504
|
-
},
|
|
1505
|
-
...
|
|
1501
|
+
fillOpacity: ce,
|
|
1502
|
+
strokeOpacity: ce,
|
|
1503
|
+
numOctaves: Ut
|
|
1504
|
+
}, gi = {
|
|
1505
|
+
...wt,
|
|
1506
1506
|
// Color props
|
|
1507
1507
|
color: k,
|
|
1508
1508
|
backgroundColor: k,
|
|
@@ -1515,25 +1515,25 @@ const wi = /\b([a-z-]*)\(.*?\)/gu, tt = {
|
|
|
1515
1515
|
borderRightColor: k,
|
|
1516
1516
|
borderBottomColor: k,
|
|
1517
1517
|
borderLeftColor: k,
|
|
1518
|
-
filter:
|
|
1519
|
-
WebkitFilter:
|
|
1520
|
-
},
|
|
1521
|
-
function
|
|
1522
|
-
let n =
|
|
1523
|
-
return n !==
|
|
1524
|
-
}
|
|
1525
|
-
const
|
|
1526
|
-
function
|
|
1518
|
+
filter: et,
|
|
1519
|
+
WebkitFilter: et
|
|
1520
|
+
}, os = (e) => gi[e];
|
|
1521
|
+
function as(e, t) {
|
|
1522
|
+
let n = os(e);
|
|
1523
|
+
return n !== et && (n = Q), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
1524
|
+
}
|
|
1525
|
+
const yi = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1526
|
+
function bi(e, t, n) {
|
|
1527
1527
|
let s = 0, r;
|
|
1528
1528
|
for (; s < e.length && !r; ) {
|
|
1529
1529
|
const i = e[s];
|
|
1530
|
-
typeof i == "string" && !
|
|
1530
|
+
typeof i == "string" && !yi.has(i) && ue(i).values.length && (r = e[s]), s++;
|
|
1531
1531
|
}
|
|
1532
1532
|
if (r && n)
|
|
1533
1533
|
for (const i of t)
|
|
1534
|
-
e[i] =
|
|
1534
|
+
e[i] = as(n, r);
|
|
1535
1535
|
}
|
|
1536
|
-
class
|
|
1536
|
+
class wi extends yt {
|
|
1537
1537
|
constructor(t, n, s, r, i) {
|
|
1538
1538
|
super(t, n, s, r, i, !0);
|
|
1539
1539
|
}
|
|
@@ -1543,28 +1543,28 @@ class xi extends bt {
|
|
|
1543
1543
|
return;
|
|
1544
1544
|
super.readKeyframes();
|
|
1545
1545
|
for (let l = 0; l < t.length; l++) {
|
|
1546
|
-
let
|
|
1547
|
-
if (typeof
|
|
1548
|
-
const c =
|
|
1549
|
-
c !== void 0 && (t[l] = c), l === t.length - 1 && (this.finalKeyframe =
|
|
1546
|
+
let f = t[l];
|
|
1547
|
+
if (typeof f == "string" && (f = f.trim(), ct(f))) {
|
|
1548
|
+
const c = ts(f, n.current);
|
|
1549
|
+
c !== void 0 && (t[l] = c), l === t.length - 1 && (this.finalKeyframe = f);
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
|
-
if (this.resolveNoneKeyframes(), !
|
|
1552
|
+
if (this.resolveNoneKeyframes(), !ss.has(s) || t.length !== 2)
|
|
1553
1553
|
return;
|
|
1554
|
-
const [r, i] = t, o =
|
|
1554
|
+
const [r, i] = t, o = _t(r), a = _t(i);
|
|
1555
1555
|
if (o !== a)
|
|
1556
|
-
if (
|
|
1556
|
+
if (Bt(o) && Bt(a))
|
|
1557
1557
|
for (let l = 0; l < t.length; l++) {
|
|
1558
|
-
const
|
|
1559
|
-
typeof
|
|
1558
|
+
const f = t[l];
|
|
1559
|
+
typeof f == "string" && (t[l] = parseFloat(f));
|
|
1560
1560
|
}
|
|
1561
1561
|
else W[s] && (this.needsMeasurement = !0);
|
|
1562
1562
|
}
|
|
1563
1563
|
resolveNoneKeyframes() {
|
|
1564
1564
|
const { unresolvedKeyframes: t, name: n } = this, s = [];
|
|
1565
1565
|
for (let r = 0; r < t.length; r++)
|
|
1566
|
-
(t[r] === null ||
|
|
1567
|
-
s.length &&
|
|
1566
|
+
(t[r] === null || fi(t[r])) && s.push(r);
|
|
1567
|
+
s.length && bi(t, s, n);
|
|
1568
1568
|
}
|
|
1569
1569
|
measureInitialState() {
|
|
1570
1570
|
const { element: t, unresolvedKeyframes: n, name: s } = this;
|
|
@@ -1586,7 +1586,7 @@ class xi extends bt {
|
|
|
1586
1586
|
}), this.resolveNoneKeyframes();
|
|
1587
1587
|
}
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function Ti(e, t, n) {
|
|
1590
1590
|
if (e instanceof EventTarget)
|
|
1591
1591
|
return [e];
|
|
1592
1592
|
if (typeof e == "string") {
|
|
@@ -1596,8 +1596,8 @@ function Ei(e, t, n) {
|
|
|
1596
1596
|
}
|
|
1597
1597
|
return Array.from(e);
|
|
1598
1598
|
}
|
|
1599
|
-
const
|
|
1600
|
-
class
|
|
1599
|
+
const ls = (e, t) => t && typeof e == "number" ? t.transform(e) : e, jt = 30, vi = (e) => !isNaN(parseFloat(e));
|
|
1600
|
+
class Ai {
|
|
1601
1601
|
/**
|
|
1602
1602
|
* @param init - The initiating value
|
|
1603
1603
|
* @param config - Optional configuration options
|
|
@@ -1613,7 +1613,7 @@ class Mi {
|
|
|
1613
1613
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
1614
1614
|
}
|
|
1615
1615
|
setCurrent(t) {
|
|
1616
|
-
this.current = t, this.updatedAt = I.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity =
|
|
1616
|
+
this.current = t, this.updatedAt = I.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = vi(this.current));
|
|
1617
1617
|
}
|
|
1618
1618
|
setPrevFrameValue(t = this.current) {
|
|
1619
1619
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -1662,7 +1662,7 @@ class Mi {
|
|
|
1662
1662
|
return this.on("change", t);
|
|
1663
1663
|
}
|
|
1664
1664
|
on(t, n) {
|
|
1665
|
-
this.events[t] || (this.events[t] = new
|
|
1665
|
+
this.events[t] || (this.events[t] = new vn());
|
|
1666
1666
|
const s = this.events[t].add(n);
|
|
1667
1667
|
return t === "change" ? () => {
|
|
1668
1668
|
s(), K.read(() => {
|
|
@@ -1742,10 +1742,10 @@ class Mi {
|
|
|
1742
1742
|
*/
|
|
1743
1743
|
getVelocity() {
|
|
1744
1744
|
const t = I.now();
|
|
1745
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt >
|
|
1745
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > jt)
|
|
1746
1746
|
return 0;
|
|
1747
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1748
|
-
return
|
|
1747
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, jt);
|
|
1748
|
+
return An(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1749
1749
|
}
|
|
1750
1750
|
/**
|
|
1751
1751
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -1796,243 +1796,243 @@ class Mi {
|
|
|
1796
1796
|
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
|
-
function
|
|
1800
|
-
return new
|
|
1799
|
+
function fe(e, t) {
|
|
1800
|
+
return new Ai(e, t);
|
|
1801
1801
|
}
|
|
1802
|
-
const { schedule:
|
|
1803
|
-
function
|
|
1804
|
-
return
|
|
1802
|
+
const { schedule: Si } = /* @__PURE__ */ Pn(queueMicrotask, !1);
|
|
1803
|
+
function cs(e) {
|
|
1804
|
+
return Os(e) && "ownerSVGElement" in e;
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1807
|
-
return
|
|
1806
|
+
function xi(e) {
|
|
1807
|
+
return cs(e) && e.tagName === "svg";
|
|
1808
1808
|
}
|
|
1809
|
-
const
|
|
1809
|
+
const C = (e) => !!(e && e.getVelocity), Ei = [...is, k, Q], Vi = (e) => Ei.find(rs(e));
|
|
1810
1810
|
function Tt(e) {
|
|
1811
1811
|
return typeof e == "object" && !Array.isArray(e);
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1814
|
-
return typeof e == "string" && Tt(t) ?
|
|
1813
|
+
function us(e, t, n, s) {
|
|
1814
|
+
return typeof e == "string" && Tt(t) ? Ti(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function Mi(e, t, n) {
|
|
1817
1817
|
return e * (t + 1);
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1819
|
+
function Gt(e, t, n, s) {
|
|
1820
1820
|
return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : t.startsWith("<") ? Math.max(0, n + parseFloat(t.slice(1))) : s.get(t) ?? e;
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function ki(e, t, n) {
|
|
1823
1823
|
for (let s = 0; s < e.length; s++) {
|
|
1824
1824
|
const r = e[s];
|
|
1825
|
-
r.at > t && r.at < n && (
|
|
1825
|
+
r.at > t && r.at < n && (bn(e, r), s--);
|
|
1826
1826
|
}
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1829
|
-
|
|
1828
|
+
function Ci(e, t, n, s, r, i) {
|
|
1829
|
+
ki(e, r, i);
|
|
1830
1830
|
for (let o = 0; o < t.length; o++)
|
|
1831
1831
|
e.push({
|
|
1832
1832
|
value: t[o],
|
|
1833
|
-
at:
|
|
1834
|
-
easing:
|
|
1833
|
+
at: pe(r, i, s[o]),
|
|
1834
|
+
easing: Ln(n, o)
|
|
1835
1835
|
});
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1837
|
+
function Di(e, t) {
|
|
1838
1838
|
for (let n = 0; n < e.length; n++)
|
|
1839
1839
|
e[n] = e[n] / (t + 1);
|
|
1840
1840
|
}
|
|
1841
|
-
function
|
|
1841
|
+
function Ii(e, t) {
|
|
1842
1842
|
return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
|
|
1843
1843
|
}
|
|
1844
|
-
const
|
|
1845
|
-
function
|
|
1846
|
-
const i = t.duration || 0.3, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = {},
|
|
1847
|
-
let c = 0,
|
|
1844
|
+
const Li = "easeInOut";
|
|
1845
|
+
function Fi(e, { defaultTransition: t = {}, ...n } = {}, s, r) {
|
|
1846
|
+
const i = t.duration || 0.3, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = {}, f = /* @__PURE__ */ new Map();
|
|
1847
|
+
let c = 0, u = 0, d = 0;
|
|
1848
1848
|
for (let h = 0; h < e.length; h++) {
|
|
1849
1849
|
const m = e[h];
|
|
1850
1850
|
if (typeof m == "string") {
|
|
1851
|
-
|
|
1851
|
+
f.set(m, u);
|
|
1852
1852
|
continue;
|
|
1853
1853
|
} else if (!Array.isArray(m)) {
|
|
1854
|
-
|
|
1854
|
+
f.set(m.name, Gt(u, m.at, c, f));
|
|
1855
1855
|
continue;
|
|
1856
1856
|
}
|
|
1857
|
-
let [
|
|
1858
|
-
|
|
1859
|
-
let
|
|
1860
|
-
const
|
|
1861
|
-
const E =
|
|
1862
|
-
let { ease: B = t.ease || "easeOut", duration:
|
|
1863
|
-
const
|
|
1864
|
-
if (
|
|
1865
|
-
let
|
|
1866
|
-
if (
|
|
1867
|
-
const
|
|
1868
|
-
|
|
1857
|
+
let [y, T, b = {}] = m;
|
|
1858
|
+
b.at !== void 0 && (u = Gt(u, b.at, c, f));
|
|
1859
|
+
let x = 0;
|
|
1860
|
+
const v = (S, g, A, V = 0, w = 0) => {
|
|
1861
|
+
const E = Pi(S), { delay: D = 0, times: P = zn(E), type: De = "keyframes", repeat: ge, repeatType: Va, repeatDelay: Ma = 0, ...Fs } = g;
|
|
1862
|
+
let { ease: B = t.ease || "easeOut", duration: R } = g;
|
|
1863
|
+
const xt = typeof D == "function" ? D(V, w) : D, Et = E.length, Vt = bt(De) ? De : r?.[De || "keyframes"];
|
|
1864
|
+
if (Et <= 2 && Vt) {
|
|
1865
|
+
let ne = 100;
|
|
1866
|
+
if (Et === 2 && Ni(E)) {
|
|
1867
|
+
const se = E[1] - E[0];
|
|
1868
|
+
ne = Math.abs(se);
|
|
1869
1869
|
}
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1872
|
-
const
|
|
1873
|
-
B =
|
|
1870
|
+
const ye = { ...Fs };
|
|
1871
|
+
R !== void 0 && (ye.duration = /* @__PURE__ */ O(R));
|
|
1872
|
+
const be = Un(ye, ne, Vt);
|
|
1873
|
+
B = be.ease, R = be.duration;
|
|
1874
1874
|
}
|
|
1875
|
-
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1878
|
-
const
|
|
1879
|
-
if (
|
|
1880
|
-
|
|
1881
|
-
const
|
|
1875
|
+
R ?? (R = i);
|
|
1876
|
+
const Mt = u + xt;
|
|
1877
|
+
P.length === 1 && P[0] === 0 && (P[1] = 1);
|
|
1878
|
+
const kt = P.length - E.length;
|
|
1879
|
+
if (kt > 0 && Gn(P, kt), E.length === 1 && E.unshift(null), ge) {
|
|
1880
|
+
R = Mi(R, ge);
|
|
1881
|
+
const ne = [...E], ye = [...P];
|
|
1882
1882
|
B = Array.isArray(B) ? [...B] : [B];
|
|
1883
|
-
const
|
|
1884
|
-
for (let
|
|
1885
|
-
E.push(...
|
|
1886
|
-
for (let
|
|
1887
|
-
|
|
1883
|
+
const be = [...B];
|
|
1884
|
+
for (let se = 0; se < ge; se++) {
|
|
1885
|
+
E.push(...ne);
|
|
1886
|
+
for (let re = 0; re < ne.length; re++)
|
|
1887
|
+
P.push(ye[re] + (se + 1)), B.push(re === 0 ? "linear" : Ln(be, re - 1));
|
|
1888
1888
|
}
|
|
1889
|
-
|
|
1889
|
+
Di(P, ge);
|
|
1890
1890
|
}
|
|
1891
|
-
const
|
|
1892
|
-
|
|
1891
|
+
const Ct = Mt + R;
|
|
1892
|
+
Ci(A, E, B, P, Mt, Ct), x = Math.max(xt + R, x), d = Math.max(Ct, d);
|
|
1893
1893
|
};
|
|
1894
|
-
if (
|
|
1895
|
-
const
|
|
1896
|
-
|
|
1894
|
+
if (C(y)) {
|
|
1895
|
+
const S = zt(y, a);
|
|
1896
|
+
v(T, b, Yt("default", S));
|
|
1897
1897
|
} else {
|
|
1898
|
-
const
|
|
1899
|
-
for (let
|
|
1900
|
-
|
|
1901
|
-
const V =
|
|
1902
|
-
for (const E in
|
|
1903
|
-
|
|
1898
|
+
const S = us(y, T, s, l), g = S.length;
|
|
1899
|
+
for (let A = 0; A < g; A++) {
|
|
1900
|
+
T = T, b = b;
|
|
1901
|
+
const V = S[A], w = zt(V, a);
|
|
1902
|
+
for (const E in T)
|
|
1903
|
+
v(T[E], Oi(b, E), Yt(E, w), A, g);
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
|
-
c =
|
|
1906
|
+
c = u, u += x;
|
|
1907
1907
|
}
|
|
1908
1908
|
return a.forEach((h, m) => {
|
|
1909
|
-
for (const
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1912
|
-
const
|
|
1913
|
-
for (let
|
|
1914
|
-
const { at:
|
|
1915
|
-
|
|
1909
|
+
for (const y in h) {
|
|
1910
|
+
const T = h[y];
|
|
1911
|
+
T.sort(Ii);
|
|
1912
|
+
const b = [], x = [], v = [];
|
|
1913
|
+
for (let g = 0; g < T.length; g++) {
|
|
1914
|
+
const { at: A, value: V, easing: w } = T[g];
|
|
1915
|
+
b.push(V), x.push(/* @__PURE__ */ ot(0, d, A)), v.push(w || "easeOut");
|
|
1916
1916
|
}
|
|
1917
|
-
|
|
1917
|
+
x[0] !== 0 && (x.unshift(0), b.unshift(b[0]), v.unshift(Li)), x[x.length - 1] !== 1 && (x.push(1), b.push(null)), o.has(m) || o.set(m, {
|
|
1918
1918
|
keyframes: {},
|
|
1919
1919
|
transition: {}
|
|
1920
1920
|
});
|
|
1921
|
-
const
|
|
1922
|
-
|
|
1921
|
+
const S = o.get(m);
|
|
1922
|
+
S.keyframes[y] = b, S.transition[y] = {
|
|
1923
1923
|
...t,
|
|
1924
1924
|
duration: d,
|
|
1925
|
-
ease:
|
|
1926
|
-
times:
|
|
1925
|
+
ease: v,
|
|
1926
|
+
times: x,
|
|
1927
1927
|
...n
|
|
1928
1928
|
};
|
|
1929
1929
|
}
|
|
1930
1930
|
}), o;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function zt(e, t) {
|
|
1933
1933
|
return !t.has(e) && t.set(e, {}), t.get(e);
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function Yt(e, t) {
|
|
1936
1936
|
return t[e] || (t[e] = []), t[e];
|
|
1937
1937
|
}
|
|
1938
|
-
function
|
|
1938
|
+
function Pi(e) {
|
|
1939
1939
|
return Array.isArray(e) ? e : [e];
|
|
1940
1940
|
}
|
|
1941
|
-
function
|
|
1941
|
+
function Oi(e, t) {
|
|
1942
1942
|
return e && e[t] ? {
|
|
1943
1943
|
...e,
|
|
1944
1944
|
...e[t]
|
|
1945
1945
|
} : { ...e };
|
|
1946
1946
|
}
|
|
1947
|
-
const
|
|
1948
|
-
function
|
|
1947
|
+
const Ri = (e) => typeof e == "number", Ni = (e) => e.every(Ri), de = /* @__PURE__ */ new WeakMap(), Ki = (e) => Array.isArray(e);
|
|
1948
|
+
function Xt(e) {
|
|
1949
1949
|
const t = [{}, {}];
|
|
1950
1950
|
return e?.values.forEach((n, s) => {
|
|
1951
1951
|
t[0][s] = n.get(), t[1][s] = n.getVelocity();
|
|
1952
1952
|
}), t;
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1954
|
+
function fs(e, t, n, s) {
|
|
1955
1955
|
if (typeof t == "function") {
|
|
1956
|
-
const [r, i] =
|
|
1956
|
+
const [r, i] = Xt(s);
|
|
1957
1957
|
t = t(n !== void 0 ? n : e.custom, r, i);
|
|
1958
1958
|
}
|
|
1959
1959
|
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
|
|
1960
|
-
const [r, i] =
|
|
1960
|
+
const [r, i] = Xt(s);
|
|
1961
1961
|
t = t(n !== void 0 ? n : e.custom, r, i);
|
|
1962
1962
|
}
|
|
1963
1963
|
return t;
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function Bi(e, t, n) {
|
|
1966
1966
|
const s = e.getProps();
|
|
1967
|
-
return
|
|
1967
|
+
return fs(s, t, s.custom, e);
|
|
1968
1968
|
}
|
|
1969
|
-
function
|
|
1970
|
-
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t,
|
|
1969
|
+
function qi(e, t, n) {
|
|
1970
|
+
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, fe(n));
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1973
|
-
return
|
|
1972
|
+
function $i(e) {
|
|
1973
|
+
return Ki(e) ? e[e.length - 1] || 0 : e;
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1976
|
-
const n =
|
|
1975
|
+
function Hi(e, t) {
|
|
1976
|
+
const n = Bi(e, t);
|
|
1977
1977
|
let { transitionEnd: s = {}, transition: r = {}, ...i } = n || {};
|
|
1978
1978
|
i = { ...i, ...s };
|
|
1979
1979
|
for (const o in i) {
|
|
1980
|
-
const a =
|
|
1981
|
-
|
|
1980
|
+
const a = $i(i[o]);
|
|
1981
|
+
qi(e, o, a);
|
|
1982
1982
|
}
|
|
1983
1983
|
}
|
|
1984
|
-
function
|
|
1985
|
-
return !!(
|
|
1984
|
+
function Wi(e) {
|
|
1985
|
+
return !!(C(e) && e.add);
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1987
|
+
function _i(e, t) {
|
|
1988
1988
|
const n = e.getValue("willChange");
|
|
1989
|
-
if (
|
|
1989
|
+
if (Wi(n))
|
|
1990
1990
|
return n.add(t);
|
|
1991
1991
|
if (!n && N.WillChange) {
|
|
1992
1992
|
const s = new N.WillChange("auto");
|
|
1993
1993
|
e.addValue("willChange", s), s.add(t);
|
|
1994
1994
|
}
|
|
1995
1995
|
}
|
|
1996
|
-
const
|
|
1997
|
-
function
|
|
1998
|
-
return e.props[
|
|
1996
|
+
const vt = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Ui = "framerAppearId", ji = "data-" + vt(Ui);
|
|
1997
|
+
function Gi(e) {
|
|
1998
|
+
return e.props[ji];
|
|
1999
1999
|
}
|
|
2000
|
-
const
|
|
2001
|
-
function
|
|
2002
|
-
const r = e.filter(
|
|
2000
|
+
const zi = (e) => e !== null;
|
|
2001
|
+
function Yi(e, { repeat: t, repeatType: n = "loop" }, s) {
|
|
2002
|
+
const r = e.filter(zi), i = t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
|
|
2003
2003
|
return r[i];
|
|
2004
2004
|
}
|
|
2005
|
-
const
|
|
2005
|
+
const Xi = {
|
|
2006
2006
|
type: "spring",
|
|
2007
2007
|
stiffness: 500,
|
|
2008
2008
|
damping: 25,
|
|
2009
2009
|
restSpeed: 10
|
|
2010
|
-
},
|
|
2010
|
+
}, Zi = (e) => ({
|
|
2011
2011
|
type: "spring",
|
|
2012
2012
|
stiffness: 550,
|
|
2013
2013
|
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
2014
2014
|
restSpeed: 10
|
|
2015
|
-
}),
|
|
2015
|
+
}), Ji = {
|
|
2016
2016
|
type: "keyframes",
|
|
2017
2017
|
duration: 0.8
|
|
2018
|
-
},
|
|
2018
|
+
}, Qi = {
|
|
2019
2019
|
type: "keyframes",
|
|
2020
2020
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2021
2021
|
duration: 0.3
|
|
2022
|
-
},
|
|
2023
|
-
function
|
|
2022
|
+
}, eo = (e, { keyframes: t }) => t.length > 2 ? Ji : te.has(e) ? e.startsWith("scale") ? Zi(t[1]) : Xi : Qi;
|
|
2023
|
+
function to({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: r, repeat: i, repeatType: o, repeatDelay: a, from: l, elapsed: f, ...c }) {
|
|
2024
2024
|
return !!Object.keys(c).length;
|
|
2025
2025
|
}
|
|
2026
|
-
const
|
|
2027
|
-
const a =
|
|
2028
|
-
let { elapsed:
|
|
2029
|
-
|
|
2026
|
+
const ds = (e, t, n, s = {}, r, i) => (o) => {
|
|
2027
|
+
const a = ns(s, e) || {}, l = a.delay || s.delay || 0;
|
|
2028
|
+
let { elapsed: f = 0 } = s;
|
|
2029
|
+
f = f - /* @__PURE__ */ O(l);
|
|
2030
2030
|
const c = {
|
|
2031
2031
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
2032
2032
|
ease: "easeOut",
|
|
2033
2033
|
velocity: t.getVelocity(),
|
|
2034
2034
|
...a,
|
|
2035
|
-
delay: -
|
|
2035
|
+
delay: -f,
|
|
2036
2036
|
onUpdate: (d) => {
|
|
2037
2037
|
t.set(d), a.onUpdate && a.onUpdate(d);
|
|
2038
2038
|
},
|
|
@@ -2043,10 +2043,10 @@ const ms = (e, t, n, s = {}, r, i) => (o) => {
|
|
|
2043
2043
|
motionValue: t,
|
|
2044
2044
|
element: i ? void 0 : r
|
|
2045
2045
|
};
|
|
2046
|
-
|
|
2047
|
-
let
|
|
2048
|
-
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (
|
|
2049
|
-
const d =
|
|
2046
|
+
to(a) || Object.assign(c, eo(e, c)), c.duration && (c.duration = /* @__PURE__ */ O(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ O(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
2047
|
+
let u = !1;
|
|
2048
|
+
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (Qe(c), c.delay === 0 && (u = !0)), (N.instantAnimations || N.skipAnimations) && (u = !0, Qe(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, u && !i && t.get() !== void 0) {
|
|
2049
|
+
const d = Yi(c.keyframes, a);
|
|
2050
2050
|
if (d !== void 0) {
|
|
2051
2051
|
K.update(() => {
|
|
2052
2052
|
c.onUpdate(d), c.onComplete();
|
|
@@ -2054,51 +2054,51 @@ const ms = (e, t, n, s = {}, r, i) => (o) => {
|
|
|
2054
2054
|
return;
|
|
2055
2055
|
}
|
|
2056
2056
|
}
|
|
2057
|
-
return a.isSync ? new
|
|
2057
|
+
return a.isSync ? new gt(c) : new ii(c);
|
|
2058
2058
|
};
|
|
2059
|
-
function
|
|
2059
|
+
function no({ protectedKeys: e, needsAnimating: t }, n) {
|
|
2060
2060
|
const s = e.hasOwnProperty(n) && t[n] !== !0;
|
|
2061
2061
|
return t[n] = !1, s;
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2063
|
+
function so(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
|
|
2064
2064
|
let { transition: i = e.getDefaultTransition(), transitionEnd: o, ...a } = t;
|
|
2065
2065
|
s && (i = s);
|
|
2066
|
-
const l = [],
|
|
2066
|
+
const l = [], f = r && e.animationState && e.animationState.getState()[r];
|
|
2067
2067
|
for (const c in a) {
|
|
2068
|
-
const
|
|
2069
|
-
if (d === void 0 ||
|
|
2068
|
+
const u = e.getValue(c, e.latestValues[c] ?? null), d = a[c];
|
|
2069
|
+
if (d === void 0 || f && no(f, c))
|
|
2070
2070
|
continue;
|
|
2071
2071
|
const h = {
|
|
2072
2072
|
delay: n,
|
|
2073
|
-
...
|
|
2074
|
-
}, m =
|
|
2075
|
-
if (m !== void 0 && !
|
|
2073
|
+
...ns(i || {}, c)
|
|
2074
|
+
}, m = u.get();
|
|
2075
|
+
if (m !== void 0 && !u.isAnimating && !Array.isArray(d) && d === m && !h.velocity)
|
|
2076
2076
|
continue;
|
|
2077
|
-
let
|
|
2077
|
+
let y = !1;
|
|
2078
2078
|
if (window.MotionHandoffAnimation) {
|
|
2079
|
-
const
|
|
2080
|
-
if (
|
|
2081
|
-
const
|
|
2082
|
-
|
|
2079
|
+
const b = Gi(e);
|
|
2080
|
+
if (b) {
|
|
2081
|
+
const x = window.MotionHandoffAnimation(b, c, K);
|
|
2082
|
+
x !== null && (h.startTime = x, y = !0);
|
|
2083
2083
|
}
|
|
2084
2084
|
}
|
|
2085
|
-
|
|
2086
|
-
const
|
|
2087
|
-
|
|
2085
|
+
_i(e, c), u.start(ds(c, u, d, e.shouldReduceMotion && ss.has(c) ? { type: !1 } : h, e, y));
|
|
2086
|
+
const T = u.animation;
|
|
2087
|
+
T && l.push(T);
|
|
2088
2088
|
}
|
|
2089
2089
|
return o && Promise.all(l).then(() => {
|
|
2090
2090
|
K.update(() => {
|
|
2091
|
-
o &&
|
|
2091
|
+
o && Hi(e, o);
|
|
2092
2092
|
});
|
|
2093
2093
|
}), l;
|
|
2094
2094
|
}
|
|
2095
|
-
function
|
|
2095
|
+
function ro({ top: e, left: t, right: n, bottom: s }) {
|
|
2096
2096
|
return {
|
|
2097
2097
|
x: { min: t, max: n },
|
|
2098
2098
|
y: { min: e, max: s }
|
|
2099
2099
|
};
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2101
|
+
function io(e, t) {
|
|
2102
2102
|
if (!t)
|
|
2103
2103
|
return e;
|
|
2104
2104
|
const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
|
|
@@ -2109,10 +2109,10 @@ function uo(e, t) {
|
|
|
2109
2109
|
right: s.x
|
|
2110
2110
|
};
|
|
2111
2111
|
}
|
|
2112
|
-
function
|
|
2113
|
-
return
|
|
2112
|
+
function oo(e, t) {
|
|
2113
|
+
return ro(io(e.getBoundingClientRect(), t));
|
|
2114
2114
|
}
|
|
2115
|
-
const
|
|
2115
|
+
const Zt = {
|
|
2116
2116
|
animation: [
|
|
2117
2117
|
"animate",
|
|
2118
2118
|
"variants",
|
|
@@ -2131,30 +2131,30 @@ const Jt = {
|
|
|
2131
2131
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2132
2132
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2133
2133
|
layout: ["layout", "layoutId"]
|
|
2134
|
-
},
|
|
2135
|
-
for (const e in
|
|
2136
|
-
|
|
2137
|
-
isEnabled: (t) =>
|
|
2134
|
+
}, tt = {};
|
|
2135
|
+
for (const e in Zt)
|
|
2136
|
+
tt[e] = {
|
|
2137
|
+
isEnabled: (t) => Zt[e].some((n) => !!t[n])
|
|
2138
2138
|
};
|
|
2139
|
-
const
|
|
2140
|
-
x:
|
|
2141
|
-
y:
|
|
2142
|
-
}),
|
|
2143
|
-
function
|
|
2144
|
-
if (
|
|
2139
|
+
const Jt = () => ({ min: 0, max: 0 }), At = () => ({
|
|
2140
|
+
x: Jt(),
|
|
2141
|
+
y: Jt()
|
|
2142
|
+
}), ao = typeof window < "u", nt = { current: null }, hs = { current: !1 };
|
|
2143
|
+
function lo() {
|
|
2144
|
+
if (hs.current = !0, !!ao)
|
|
2145
2145
|
if (window.matchMedia) {
|
|
2146
|
-
const e = window.matchMedia("(prefers-reduced-motion)"), t = () =>
|
|
2146
|
+
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => nt.current = e.matches;
|
|
2147
2147
|
e.addEventListener("change", t), t();
|
|
2148
2148
|
} else
|
|
2149
|
-
|
|
2149
|
+
nt.current = !1;
|
|
2150
2150
|
}
|
|
2151
|
-
function
|
|
2151
|
+
function co(e) {
|
|
2152
2152
|
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
2153
2153
|
}
|
|
2154
|
-
function
|
|
2154
|
+
function uo(e) {
|
|
2155
2155
|
return typeof e == "string" || Array.isArray(e);
|
|
2156
2156
|
}
|
|
2157
|
-
const
|
|
2157
|
+
const fo = [
|
|
2158
2158
|
"animate",
|
|
2159
2159
|
"whileInView",
|
|
2160
2160
|
"whileFocus",
|
|
@@ -2162,34 +2162,34 @@ const yo = [
|
|
|
2162
2162
|
"whileTap",
|
|
2163
2163
|
"whileDrag",
|
|
2164
2164
|
"exit"
|
|
2165
|
-
],
|
|
2166
|
-
function
|
|
2167
|
-
return
|
|
2165
|
+
], ho = ["initial", ...fo];
|
|
2166
|
+
function ms(e) {
|
|
2167
|
+
return co(e.animate) || ho.some((t) => uo(e[t]));
|
|
2168
2168
|
}
|
|
2169
|
-
function
|
|
2170
|
-
return !!(
|
|
2169
|
+
function mo(e) {
|
|
2170
|
+
return !!(ms(e) || e.variants);
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2172
|
+
function po(e, t, n) {
|
|
2173
2173
|
for (const s in t) {
|
|
2174
2174
|
const r = t[s], i = n[s];
|
|
2175
|
-
if (
|
|
2175
|
+
if (C(r))
|
|
2176
2176
|
e.addValue(s, r);
|
|
2177
|
-
else if (
|
|
2178
|
-
e.addValue(s,
|
|
2177
|
+
else if (C(i))
|
|
2178
|
+
e.addValue(s, fe(r, { owner: e }));
|
|
2179
2179
|
else if (i !== r)
|
|
2180
2180
|
if (e.hasValue(s)) {
|
|
2181
2181
|
const o = e.getValue(s);
|
|
2182
2182
|
o.liveStyle === !0 ? o.jump(r) : o.hasAnimated || o.set(r);
|
|
2183
2183
|
} else {
|
|
2184
2184
|
const o = e.getStaticValue(s);
|
|
2185
|
-
e.addValue(s,
|
|
2185
|
+
e.addValue(s, fe(o !== void 0 ? o : r, { owner: e }));
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
2188
|
for (const s in n)
|
|
2189
2189
|
t[s] === void 0 && e.removeValue(s);
|
|
2190
2190
|
return t;
|
|
2191
2191
|
}
|
|
2192
|
-
const
|
|
2192
|
+
const Qt = [
|
|
2193
2193
|
"AnimationStart",
|
|
2194
2194
|
"AnimationComplete",
|
|
2195
2195
|
"Update",
|
|
@@ -2198,7 +2198,7 @@ const en = [
|
|
|
2198
2198
|
"LayoutAnimationStart",
|
|
2199
2199
|
"LayoutAnimationComplete"
|
|
2200
2200
|
];
|
|
2201
|
-
class
|
|
2201
|
+
class ps {
|
|
2202
2202
|
/**
|
|
2203
2203
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2204
2204
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2210,25 +2210,25 @@ class ys {
|
|
|
2210
2210
|
return {};
|
|
2211
2211
|
}
|
|
2212
2212
|
constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: r, blockInitialAnimation: i, visualState: o }, a = {}) {
|
|
2213
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
2213
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = yt, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2214
2214
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2215
2215
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2216
2216
|
const d = I.now();
|
|
2217
2217
|
this.renderScheduledAt < d && (this.renderScheduledAt = d, K.render(this.render, !1, !0));
|
|
2218
2218
|
};
|
|
2219
|
-
const { latestValues: l, renderState:
|
|
2220
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState =
|
|
2221
|
-
const { willChange: c, ...
|
|
2222
|
-
for (const d in
|
|
2223
|
-
const h =
|
|
2224
|
-
l[d] !== void 0 &&
|
|
2219
|
+
const { latestValues: l, renderState: f } = o;
|
|
2220
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = f, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.options = a, this.blockInitialAnimation = !!i, this.isControllingVariants = ms(n), this.isVariantNode = mo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
2221
|
+
const { willChange: c, ...u } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2222
|
+
for (const d in u) {
|
|
2223
|
+
const h = u[d];
|
|
2224
|
+
l[d] !== void 0 && C(h) && h.set(l[d]);
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
2227
|
mount(t) {
|
|
2228
|
-
this.current = t,
|
|
2228
|
+
this.current = t, de.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), hs.current || lo(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : nt.current, this.parent?.addChild(this), this.update(this.props, this.presenceContext);
|
|
2229
2229
|
}
|
|
2230
2230
|
unmount() {
|
|
2231
|
-
this.projection && this.projection.unmount(),
|
|
2231
|
+
this.projection && this.projection.unmount(), $e(this.notifyUpdate), $e(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
|
|
2232
2232
|
for (const t in this.events)
|
|
2233
2233
|
this.events[t].clear();
|
|
2234
2234
|
for (const t in this.features) {
|
|
@@ -2245,7 +2245,7 @@ class ys {
|
|
|
2245
2245
|
}
|
|
2246
2246
|
bindToMotionValue(t, n) {
|
|
2247
2247
|
this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
|
|
2248
|
-
const s =
|
|
2248
|
+
const s = te.has(t);
|
|
2249
2249
|
s && this.onBindTransform && this.onBindTransform();
|
|
2250
2250
|
const r = n.on("change", (o) => {
|
|
2251
2251
|
this.latestValues[t] = o, this.props.onUpdate && K.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
@@ -2260,8 +2260,8 @@ class ys {
|
|
|
2260
2260
|
}
|
|
2261
2261
|
updateFeatures() {
|
|
2262
2262
|
let t = "animation";
|
|
2263
|
-
for (t in
|
|
2264
|
-
const n =
|
|
2263
|
+
for (t in tt) {
|
|
2264
|
+
const n = tt[t];
|
|
2265
2265
|
if (!n)
|
|
2266
2266
|
continue;
|
|
2267
2267
|
const { isEnabled: s, Feature: r } = n;
|
|
@@ -2280,7 +2280,7 @@ class ys {
|
|
|
2280
2280
|
* removed with a re-render to work.
|
|
2281
2281
|
*/
|
|
2282
2282
|
measureViewportBox() {
|
|
2283
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
2283
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : At();
|
|
2284
2284
|
}
|
|
2285
2285
|
getStaticValue(t) {
|
|
2286
2286
|
return this.latestValues[t];
|
|
@@ -2294,13 +2294,13 @@ class ys {
|
|
|
2294
2294
|
*/
|
|
2295
2295
|
update(t, n) {
|
|
2296
2296
|
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
2297
|
-
for (let s = 0; s <
|
|
2298
|
-
const r =
|
|
2297
|
+
for (let s = 0; s < Qt.length; s++) {
|
|
2298
|
+
const r = Qt[s];
|
|
2299
2299
|
this.propEventSubscriptions[r] && (this.propEventSubscriptions[r](), delete this.propEventSubscriptions[r]);
|
|
2300
2300
|
const i = "on" + r, o = t[i];
|
|
2301
2301
|
o && (this.propEventSubscriptions[r] = this.on(r, o));
|
|
2302
2302
|
}
|
|
2303
|
-
this.prevMotionValues =
|
|
2303
|
+
this.prevMotionValues = po(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2304
2304
|
}
|
|
2305
2305
|
getProps() {
|
|
2306
2306
|
return this.props;
|
|
@@ -2356,7 +2356,7 @@ class ys {
|
|
|
2356
2356
|
if (this.props.values && this.props.values[t])
|
|
2357
2357
|
return this.props.values[t];
|
|
2358
2358
|
let s = this.values.get(t);
|
|
2359
|
-
return s === void 0 && n !== void 0 && (s =
|
|
2359
|
+
return s === void 0 && n !== void 0 && (s = fe(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
|
|
2360
2360
|
}
|
|
2361
2361
|
/**
|
|
2362
2362
|
* If we're trying to animate to a previously unencountered value,
|
|
@@ -2365,7 +2365,7 @@ class ys {
|
|
|
2365
2365
|
*/
|
|
2366
2366
|
readValue(t, n) {
|
|
2367
2367
|
let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
2368
|
-
return s != null && (typeof s == "string" && (
|
|
2368
|
+
return s != null && (typeof s == "string" && (wn(s) || Tn(s)) ? s = parseFloat(s) : !Vi(s) && Q.test(n) && (s = as(t, n)), this.setBaseTarget(t, C(s) ? s.get() : s)), C(s) ? s.get() : s;
|
|
2369
2369
|
}
|
|
2370
2370
|
/**
|
|
2371
2371
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2382,27 +2382,27 @@ class ys {
|
|
|
2382
2382
|
const { initial: n } = this.props;
|
|
2383
2383
|
let s;
|
|
2384
2384
|
if (typeof n == "string" || typeof n == "object") {
|
|
2385
|
-
const i =
|
|
2385
|
+
const i = fs(this.props, n, this.presenceContext?.custom);
|
|
2386
2386
|
i && (s = i[t]);
|
|
2387
2387
|
}
|
|
2388
2388
|
if (n && s !== void 0)
|
|
2389
2389
|
return s;
|
|
2390
2390
|
const r = this.getBaseTargetFromProps(this.props, t);
|
|
2391
|
-
return r !== void 0 && !
|
|
2391
|
+
return r !== void 0 && !C(r) ? r : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
|
|
2392
2392
|
}
|
|
2393
2393
|
on(t, n) {
|
|
2394
|
-
return this.events[t] || (this.events[t] = new
|
|
2394
|
+
return this.events[t] || (this.events[t] = new vn()), this.events[t].add(n);
|
|
2395
2395
|
}
|
|
2396
2396
|
notify(t, ...n) {
|
|
2397
2397
|
this.events[t] && this.events[t].notify(...n);
|
|
2398
2398
|
}
|
|
2399
2399
|
scheduleRenderMicrotask() {
|
|
2400
|
-
|
|
2400
|
+
Si.render(this.render);
|
|
2401
2401
|
}
|
|
2402
2402
|
}
|
|
2403
|
-
class
|
|
2403
|
+
class gs extends ps {
|
|
2404
2404
|
constructor() {
|
|
2405
|
-
super(...arguments), this.KeyframeResolver =
|
|
2405
|
+
super(...arguments), this.KeyframeResolver = wi;
|
|
2406
2406
|
}
|
|
2407
2407
|
sortInstanceNodePosition(t, n) {
|
|
2408
2408
|
return t.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -2416,58 +2416,58 @@ class bs extends ys {
|
|
|
2416
2416
|
handleChildMotionValue() {
|
|
2417
2417
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
2418
2418
|
const { children: t } = this.props;
|
|
2419
|
-
|
|
2419
|
+
C(t) && (this.childSubscription = t.on("change", (n) => {
|
|
2420
2420
|
this.current && (this.current.textContent = `${n}`);
|
|
2421
2421
|
}));
|
|
2422
2422
|
}
|
|
2423
2423
|
}
|
|
2424
|
-
const
|
|
2424
|
+
const go = {
|
|
2425
2425
|
x: "translateX",
|
|
2426
2426
|
y: "translateY",
|
|
2427
2427
|
z: "translateZ",
|
|
2428
2428
|
transformPerspective: "perspective"
|
|
2429
|
-
},
|
|
2430
|
-
function
|
|
2429
|
+
}, yo = ee.length;
|
|
2430
|
+
function bo(e, t, n) {
|
|
2431
2431
|
let s = "", r = !0;
|
|
2432
|
-
for (let i = 0; i <
|
|
2433
|
-
const o =
|
|
2432
|
+
for (let i = 0; i < yo; i++) {
|
|
2433
|
+
const o = ee[i], a = e[o];
|
|
2434
2434
|
if (a === void 0)
|
|
2435
2435
|
continue;
|
|
2436
2436
|
let l = !0;
|
|
2437
2437
|
if (typeof a == "number" ? l = a === (o.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
2438
|
-
const
|
|
2438
|
+
const f = ls(a, wt[o]);
|
|
2439
2439
|
if (!l) {
|
|
2440
2440
|
r = !1;
|
|
2441
|
-
const c =
|
|
2442
|
-
s += `${c}(${
|
|
2441
|
+
const c = go[o] || o;
|
|
2442
|
+
s += `${c}(${f}) `;
|
|
2443
2443
|
}
|
|
2444
|
-
n && (t[o] =
|
|
2444
|
+
n && (t[o] = f);
|
|
2445
2445
|
}
|
|
2446
2446
|
}
|
|
2447
2447
|
return s = s.trim(), n ? s = n(t, r ? "" : s) : r && (s = "none"), s;
|
|
2448
2448
|
}
|
|
2449
|
-
function
|
|
2449
|
+
function ys(e, t, n) {
|
|
2450
2450
|
const { style: s, vars: r, transformOrigin: i } = e;
|
|
2451
2451
|
let o = !1, a = !1;
|
|
2452
2452
|
for (const l in t) {
|
|
2453
|
-
const
|
|
2454
|
-
if (
|
|
2453
|
+
const f = t[l];
|
|
2454
|
+
if (te.has(l)) {
|
|
2455
2455
|
o = !0;
|
|
2456
2456
|
continue;
|
|
2457
|
-
} else if (
|
|
2458
|
-
r[l] =
|
|
2457
|
+
} else if (Rn(l)) {
|
|
2458
|
+
r[l] = f;
|
|
2459
2459
|
continue;
|
|
2460
2460
|
} else {
|
|
2461
|
-
const c =
|
|
2461
|
+
const c = ls(f, wt[l]);
|
|
2462
2462
|
l.startsWith("origin") ? (a = !0, i[l] = c) : s[l] = c;
|
|
2463
2463
|
}
|
|
2464
2464
|
}
|
|
2465
|
-
if (t.transform || (o || n ? s.transform =
|
|
2466
|
-
const { originX: l = "50%", originY:
|
|
2467
|
-
s.transformOrigin = `${l} ${
|
|
2465
|
+
if (t.transform || (o || n ? s.transform = bo(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2466
|
+
const { originX: l = "50%", originY: f = "50%", originZ: c = 0 } = i;
|
|
2467
|
+
s.transformOrigin = `${l} ${f} ${c}`;
|
|
2468
2468
|
}
|
|
2469
2469
|
}
|
|
2470
|
-
function
|
|
2470
|
+
function bs(e, { style: t, vars: n }, s, r) {
|
|
2471
2471
|
const i = e.style;
|
|
2472
2472
|
let o;
|
|
2473
2473
|
for (o in t)
|
|
@@ -2476,50 +2476,50 @@ function vs(e, { style: t, vars: n }, s, r) {
|
|
|
2476
2476
|
for (o in n)
|
|
2477
2477
|
i.setProperty(o, n[o]);
|
|
2478
2478
|
}
|
|
2479
|
-
const
|
|
2480
|
-
function
|
|
2481
|
-
return
|
|
2479
|
+
const wo = {};
|
|
2480
|
+
function To(e, { layout: t, layoutId: n }) {
|
|
2481
|
+
return te.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!wo[e] || e === "opacity");
|
|
2482
2482
|
}
|
|
2483
|
-
function
|
|
2483
|
+
function ws(e, t, n) {
|
|
2484
2484
|
const { style: s } = e, r = {};
|
|
2485
2485
|
for (const i in s)
|
|
2486
|
-
(
|
|
2486
|
+
(C(s[i]) || t.style && C(t.style[i]) || To(i, e) || n?.getValue(i)?.liveStyle !== void 0) && (r[i] = s[i]);
|
|
2487
2487
|
return r;
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2489
|
+
function vo(e) {
|
|
2490
2490
|
return window.getComputedStyle(e);
|
|
2491
2491
|
}
|
|
2492
|
-
class
|
|
2492
|
+
class Ao extends gs {
|
|
2493
2493
|
constructor() {
|
|
2494
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
2494
|
+
super(...arguments), this.type = "html", this.renderInstance = bs;
|
|
2495
2495
|
}
|
|
2496
2496
|
readValueFromInstance(t, n) {
|
|
2497
|
-
if (
|
|
2498
|
-
return this.projection?.isProjecting ?
|
|
2497
|
+
if (te.has(n))
|
|
2498
|
+
return this.projection?.isProjecting ? ze(n) : Rr(t, n);
|
|
2499
2499
|
{
|
|
2500
|
-
const s =
|
|
2500
|
+
const s = vo(t), r = (Rn(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
2501
2501
|
return typeof r == "string" ? r.trim() : r;
|
|
2502
2502
|
}
|
|
2503
2503
|
}
|
|
2504
2504
|
measureInstanceViewportBox(t, { transformPagePoint: n }) {
|
|
2505
|
-
return
|
|
2505
|
+
return oo(t, n);
|
|
2506
2506
|
}
|
|
2507
2507
|
build(t, n, s) {
|
|
2508
|
-
|
|
2508
|
+
ys(t, n, s.transformTemplate);
|
|
2509
2509
|
}
|
|
2510
2510
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2511
|
-
return
|
|
2511
|
+
return ws(t, n, s);
|
|
2512
2512
|
}
|
|
2513
2513
|
}
|
|
2514
|
-
function
|
|
2514
|
+
function So(e, t) {
|
|
2515
2515
|
return e in t;
|
|
2516
2516
|
}
|
|
2517
|
-
class
|
|
2517
|
+
class xo extends ps {
|
|
2518
2518
|
constructor() {
|
|
2519
2519
|
super(...arguments), this.type = "object";
|
|
2520
2520
|
}
|
|
2521
2521
|
readValueFromInstance(t, n) {
|
|
2522
|
-
if (
|
|
2522
|
+
if (So(n, t)) {
|
|
2523
2523
|
const s = t[n];
|
|
2524
2524
|
if (typeof s == "string" || typeof s == "number")
|
|
2525
2525
|
return s;
|
|
@@ -2531,7 +2531,7 @@ class Co extends ys {
|
|
|
2531
2531
|
delete n.output[t];
|
|
2532
2532
|
}
|
|
2533
2533
|
measureInstanceViewportBox() {
|
|
2534
|
-
return
|
|
2534
|
+
return At();
|
|
2535
2535
|
}
|
|
2536
2536
|
build(t, n) {
|
|
2537
2537
|
Object.assign(t.output, n);
|
|
@@ -2543,21 +2543,21 @@ class Co extends ys {
|
|
|
2543
2543
|
return 0;
|
|
2544
2544
|
}
|
|
2545
2545
|
}
|
|
2546
|
-
const
|
|
2546
|
+
const Eo = {
|
|
2547
2547
|
offset: "stroke-dashoffset",
|
|
2548
2548
|
array: "stroke-dasharray"
|
|
2549
|
-
},
|
|
2549
|
+
}, Vo = {
|
|
2550
2550
|
offset: "strokeDashoffset",
|
|
2551
2551
|
array: "strokeDasharray"
|
|
2552
2552
|
};
|
|
2553
|
-
function
|
|
2553
|
+
function Mo(e, t, n = 1, s = 0, r = !0) {
|
|
2554
2554
|
e.pathLength = 1;
|
|
2555
|
-
const i = r ?
|
|
2556
|
-
e[i.offset] =
|
|
2557
|
-
const o =
|
|
2555
|
+
const i = r ? Eo : Vo;
|
|
2556
|
+
e[i.offset] = p.transform(-s);
|
|
2557
|
+
const o = p.transform(t), a = p.transform(n);
|
|
2558
2558
|
e[i.array] = `${o} ${a}`;
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2560
|
+
function ko(e, {
|
|
2561
2561
|
attrX: t,
|
|
2562
2562
|
attrY: n,
|
|
2563
2563
|
attrScale: s,
|
|
@@ -2566,16 +2566,16 @@ function Fo(e, {
|
|
|
2566
2566
|
pathOffset: o = 0,
|
|
2567
2567
|
// This is object creation, which we try to avoid per-frame.
|
|
2568
2568
|
...a
|
|
2569
|
-
}, l,
|
|
2570
|
-
if (
|
|
2569
|
+
}, l, f, c) {
|
|
2570
|
+
if (ys(e, a, f), l) {
|
|
2571
2571
|
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
|
|
2572
2572
|
return;
|
|
2573
2573
|
}
|
|
2574
2574
|
e.attrs = e.style, e.style = {};
|
|
2575
|
-
const { attrs:
|
|
2576
|
-
|
|
2575
|
+
const { attrs: u, style: d } = e;
|
|
2576
|
+
u.transform && (d.transform = u.transform, delete u.transform), (d.transform || u.transformOrigin) && (d.transformOrigin = u.transformOrigin ?? "50% 50%", delete u.transformOrigin), d.transform && (d.transformBox = c?.transformBox ?? "fill-box", delete u.transformBox), t !== void 0 && (u.x = t), n !== void 0 && (u.y = n), s !== void 0 && (u.scale = s), r !== void 0 && Mo(u, r, i, o, !1);
|
|
2577
2577
|
}
|
|
2578
|
-
const
|
|
2578
|
+
const Ts = /* @__PURE__ */ new Set([
|
|
2579
2579
|
"baseFrequency",
|
|
2580
2580
|
"diffuseConstant",
|
|
2581
2581
|
"kernelMatrix",
|
|
@@ -2599,49 +2599,49 @@ const As = /* @__PURE__ */ new Set([
|
|
|
2599
2599
|
"startOffset",
|
|
2600
2600
|
"textLength",
|
|
2601
2601
|
"lengthAdjust"
|
|
2602
|
-
]),
|
|
2603
|
-
function
|
|
2604
|
-
|
|
2602
|
+
]), Co = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
2603
|
+
function Do(e, t, n, s) {
|
|
2604
|
+
bs(e, t, void 0, s);
|
|
2605
2605
|
for (const r in t.attrs)
|
|
2606
|
-
e.setAttribute(
|
|
2606
|
+
e.setAttribute(Ts.has(r) ? r : vt(r), t.attrs[r]);
|
|
2607
2607
|
}
|
|
2608
|
-
function
|
|
2609
|
-
const s =
|
|
2608
|
+
function Io(e, t, n) {
|
|
2609
|
+
const s = ws(e, t, n);
|
|
2610
2610
|
for (const r in e)
|
|
2611
|
-
if (
|
|
2612
|
-
const i =
|
|
2611
|
+
if (C(e[r]) || C(t[r])) {
|
|
2612
|
+
const i = ee.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
|
|
2613
2613
|
s[i] = e[r];
|
|
2614
2614
|
}
|
|
2615
2615
|
return s;
|
|
2616
2616
|
}
|
|
2617
|
-
class
|
|
2617
|
+
class Lo extends gs {
|
|
2618
2618
|
constructor() {
|
|
2619
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox =
|
|
2619
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = At;
|
|
2620
2620
|
}
|
|
2621
2621
|
getBaseTargetFromProps(t, n) {
|
|
2622
2622
|
return t[n];
|
|
2623
2623
|
}
|
|
2624
2624
|
readValueFromInstance(t, n) {
|
|
2625
|
-
if (
|
|
2626
|
-
const s =
|
|
2625
|
+
if (te.has(n)) {
|
|
2626
|
+
const s = os(n);
|
|
2627
2627
|
return s && s.default || 0;
|
|
2628
2628
|
}
|
|
2629
|
-
return n =
|
|
2629
|
+
return n = Ts.has(n) ? n : vt(n), t.getAttribute(n);
|
|
2630
2630
|
}
|
|
2631
2631
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2632
|
-
return
|
|
2632
|
+
return Io(t, n, s);
|
|
2633
2633
|
}
|
|
2634
2634
|
build(t, n, s) {
|
|
2635
|
-
|
|
2635
|
+
ko(t, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
2636
2636
|
}
|
|
2637
2637
|
renderInstance(t, n, s, r) {
|
|
2638
|
-
|
|
2638
|
+
Do(t, n, s, r);
|
|
2639
2639
|
}
|
|
2640
2640
|
mount(t) {
|
|
2641
|
-
this.isSVGTag =
|
|
2641
|
+
this.isSVGTag = Co(t.tagName), super.mount(t);
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
|
-
function
|
|
2644
|
+
function Fo(e) {
|
|
2645
2645
|
const t = {
|
|
2646
2646
|
presenceContext: null,
|
|
2647
2647
|
props: {},
|
|
@@ -2655,10 +2655,10 @@ function Ko(e) {
|
|
|
2655
2655
|
},
|
|
2656
2656
|
latestValues: {}
|
|
2657
2657
|
}
|
|
2658
|
-
}, n =
|
|
2659
|
-
n.mount(e),
|
|
2658
|
+
}, n = cs(e) && !xi(e) ? new Lo(t) : new Ao(t);
|
|
2659
|
+
n.mount(e), de.set(e, n);
|
|
2660
2660
|
}
|
|
2661
|
-
function
|
|
2661
|
+
function Po(e) {
|
|
2662
2662
|
const t = {
|
|
2663
2663
|
presenceContext: null,
|
|
2664
2664
|
props: {},
|
|
@@ -2668,103 +2668,105 @@ function Bo(e) {
|
|
|
2668
2668
|
},
|
|
2669
2669
|
latestValues: {}
|
|
2670
2670
|
}
|
|
2671
|
-
}, n = new
|
|
2672
|
-
n.mount(e),
|
|
2671
|
+
}, n = new xo(t);
|
|
2672
|
+
n.mount(e), de.set(e, n);
|
|
2673
2673
|
}
|
|
2674
|
-
function
|
|
2675
|
-
const s =
|
|
2676
|
-
return s.start(
|
|
2674
|
+
function Oo(e, t, n) {
|
|
2675
|
+
const s = C(e) ? e : fe(e);
|
|
2676
|
+
return s.start(ds("", s, t, n)), s.animation;
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2679
|
-
return
|
|
2678
|
+
function Ro(e, t) {
|
|
2679
|
+
return C(e) || typeof e == "number" || typeof e == "string" && !Tt(t);
|
|
2680
2680
|
}
|
|
2681
|
-
function
|
|
2681
|
+
function vs(e, t, n, s) {
|
|
2682
2682
|
const r = [];
|
|
2683
|
-
if (
|
|
2684
|
-
r.push(
|
|
2683
|
+
if (Ro(e, t))
|
|
2684
|
+
r.push(Oo(e, Tt(t) && t.default || t, n && (n.default || n)));
|
|
2685
2685
|
else {
|
|
2686
|
-
const i =
|
|
2686
|
+
const i = us(e, t, s), o = i.length;
|
|
2687
2687
|
for (let a = 0; a < o; a++) {
|
|
2688
|
-
const l = i[a],
|
|
2689
|
-
|
|
2690
|
-
const c =
|
|
2691
|
-
"delay" in
|
|
2688
|
+
const l = i[a], f = l instanceof Element ? Fo : Po;
|
|
2689
|
+
de.has(l) || f(l);
|
|
2690
|
+
const c = de.get(l), u = { ...n };
|
|
2691
|
+
"delay" in u && typeof u.delay == "function" && (u.delay = u.delay(a, o)), r.push(...so(c, { ...t, transition: u }, {}));
|
|
2692
2692
|
}
|
|
2693
2693
|
}
|
|
2694
2694
|
return r;
|
|
2695
2695
|
}
|
|
2696
|
-
function
|
|
2696
|
+
function No(e, t, n) {
|
|
2697
2697
|
const s = [];
|
|
2698
|
-
return
|
|
2699
|
-
s.push(...
|
|
2698
|
+
return Fi(e, t, n, { spring: X }).forEach(({ keyframes: i, transition: o }, a) => {
|
|
2699
|
+
s.push(...vs(a, i, o));
|
|
2700
2700
|
}), s;
|
|
2701
2701
|
}
|
|
2702
|
-
function
|
|
2702
|
+
function Ko(e) {
|
|
2703
2703
|
return Array.isArray(e) && e.some(Array.isArray);
|
|
2704
2704
|
}
|
|
2705
|
-
function
|
|
2705
|
+
function Bo(e) {
|
|
2706
2706
|
function t(n, s, r) {
|
|
2707
2707
|
let i = [], o;
|
|
2708
|
-
if (
|
|
2709
|
-
i =
|
|
2708
|
+
if (Ko(n))
|
|
2709
|
+
i = No(n, s, e);
|
|
2710
2710
|
else {
|
|
2711
|
-
const { onComplete: l, ...
|
|
2712
|
-
typeof l == "function" && (o = l), i =
|
|
2711
|
+
const { onComplete: l, ...f } = r || {};
|
|
2712
|
+
typeof l == "function" && (o = l), i = vs(n, s, f, e);
|
|
2713
2713
|
}
|
|
2714
|
-
const a = new
|
|
2714
|
+
const a = new ai(i);
|
|
2715
2715
|
return o && a.finished.then(o), a;
|
|
2716
2716
|
}
|
|
2717
2717
|
return t;
|
|
2718
2718
|
}
|
|
2719
|
-
const
|
|
2720
|
-
function
|
|
2719
|
+
const L = Bo();
|
|
2720
|
+
function qo(e) {
|
|
2721
2721
|
return new Worker(
|
|
2722
|
-
"" + new URL("assets/worker-
|
|
2722
|
+
"" + new URL("assets/worker-DbYry4sK.js", import.meta.url).href,
|
|
2723
2723
|
{
|
|
2724
2724
|
name: e?.name
|
|
2725
2725
|
}
|
|
2726
2726
|
);
|
|
2727
2727
|
}
|
|
2728
|
-
const
|
|
2729
|
-
worker: new
|
|
2728
|
+
const Oe = /* @__PURE__ */ new Map(), en = "data-highlighted", tn = Array.from({ length: 5 }, () => ({
|
|
2729
|
+
worker: new qo(),
|
|
2730
2730
|
isBusy: !1
|
|
2731
2731
|
}));
|
|
2732
|
-
function
|
|
2732
|
+
function $o() {
|
|
2733
2733
|
return new Promise((e) => {
|
|
2734
|
-
const t =
|
|
2734
|
+
const t = tn.find((s) => !s.isBusy);
|
|
2735
2735
|
t && (t.isBusy = !0, e(t));
|
|
2736
2736
|
const n = setInterval(() => {
|
|
2737
|
-
const s =
|
|
2737
|
+
const s = tn.find((r) => !r.isBusy);
|
|
2738
2738
|
s && (s.isBusy = !0, clearInterval(n), e(s));
|
|
2739
2739
|
}, Math.random() * 100);
|
|
2740
2740
|
});
|
|
2741
2741
|
}
|
|
2742
|
-
async function
|
|
2743
|
-
const
|
|
2744
|
-
return
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
};
|
|
2742
|
+
async function Ho(e, t) {
|
|
2743
|
+
const n = await $o();
|
|
2744
|
+
return n.isBusy = !0, new Promise((s) => {
|
|
2745
|
+
n.worker.onmessage = (r) => {
|
|
2746
|
+
n.isBusy = !1, s(r.data);
|
|
2747
|
+
}, n.worker.postMessage({ lang: e, text: t });
|
|
2748
2748
|
});
|
|
2749
2749
|
}
|
|
2750
|
-
async function
|
|
2751
|
-
if (e.getAttribute(
|
|
2750
|
+
async function Wo(e, t) {
|
|
2751
|
+
if (e.getAttribute(en) === "true")
|
|
2752
2752
|
return;
|
|
2753
2753
|
let s = e.getAttribute("data-source-code");
|
|
2754
2754
|
if (!s)
|
|
2755
2755
|
throw new Error("No source code provided");
|
|
2756
|
+
const r = e.getAttribute("data-source-lang") || "html";
|
|
2756
2757
|
s = decodeURIComponent(s).trim();
|
|
2757
|
-
|
|
2758
|
-
|
|
2758
|
+
let i = "";
|
|
2759
|
+
const o = `${r}:::${s}`;
|
|
2760
|
+
Oe.has(o) ? i = Oe.get(o) : (i = await Ho(r, s), Oe.set(o, i)), e.insertAdjacentHTML("beforeend", i), e.setAttribute(en, "true");
|
|
2759
2761
|
}
|
|
2760
|
-
const
|
|
2761
|
-
function
|
|
2762
|
+
const nn = () => window.matchMedia("(max-width: 768px)").matches;
|
|
2763
|
+
function As(e, t) {
|
|
2762
2764
|
let n;
|
|
2763
2765
|
const s = async (o, a) => {
|
|
2764
2766
|
if (!e.open)
|
|
2765
2767
|
return;
|
|
2766
|
-
const l =
|
|
2767
|
-
o?.(l), l ? (
|
|
2768
|
+
const l = nn();
|
|
2769
|
+
o?.(l), l ? (L(e, { opacity: 0, y: [0, 250] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: 0 }, { duration: 0.3, ease: "easeOut" })) : (L(e, { opacity: 0, scale: [1, 0.98] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: 0 }, { duration: 0.3, ease: "linear" }).then(() => t.style.display = "none")), a?.(l), e.close(), n && n.abort();
|
|
2768
2770
|
};
|
|
2769
2771
|
async function r(o) {
|
|
2770
2772
|
const a = o.target;
|
|
@@ -2776,15 +2778,15 @@ function xs(e, t) {
|
|
|
2776
2778
|
n = new AbortController();
|
|
2777
2779
|
const l = window.scrollY;
|
|
2778
2780
|
e.showModal(), await new Promise((c) => setTimeout(c, 50)), window.scrollTo(0, l), setTimeout(() => window.scrollTo(0, l), 0), setTimeout(() => window.scrollTo(0, l), 50), t.style.display = "block";
|
|
2779
|
-
const
|
|
2780
|
-
o?.(
|
|
2781
|
+
const f = nn();
|
|
2782
|
+
o?.(f), f ? (e.style.overflowY = "hidden", L(e, { opacity: [0, 1], y: [250, 0] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: [0, 1] }, { duration: 0.3, ease: "easeOut" }), e.style.overflowY = "auto") : (L(e, { opacity: [0, 1], scale: [0.98, 1] }, { duration: 0.3, ease: "easeOut" }), L(t, { opacity: [0, 1] }, { duration: 0.3, ease: "easeOut" })), a?.(f), setTimeout(() => document.addEventListener("click", r, {
|
|
2781
2783
|
signal: n?.signal
|
|
2782
2784
|
}), 0), e.addEventListener("keydown", async (c) => {
|
|
2783
2785
|
c.key === "Escape" && (c.preventDefault(), await s());
|
|
2784
2786
|
}, { signal: n?.signal });
|
|
2785
2787
|
}, close: s };
|
|
2786
2788
|
}
|
|
2787
|
-
class
|
|
2789
|
+
class _o extends EventTarget {
|
|
2788
2790
|
#e;
|
|
2789
2791
|
constructor(t) {
|
|
2790
2792
|
super(), this.#e = t;
|
|
@@ -2805,167 +2807,16 @@ class Yo extends EventTarget {
|
|
|
2805
2807
|
return String(this.#e);
|
|
2806
2808
|
}
|
|
2807
2809
|
}
|
|
2808
|
-
const
|
|
2809
|
-
function
|
|
2810
|
-
const t =
|
|
2810
|
+
const Uo = (e) => new _o(e);
|
|
2811
|
+
function jo(e) {
|
|
2812
|
+
const t = Uo(!1);
|
|
2811
2813
|
return new ResizeObserver(() => {
|
|
2812
2814
|
const n = e.scrollHeight > e.clientHeight;
|
|
2813
2815
|
t.value !== n && (t.value = n);
|
|
2814
2816
|
}).observe(e), { $isOverflowingVertically: t };
|
|
2815
2817
|
}
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
function h() {
|
|
2819
|
-
c && clearTimeout(c);
|
|
2820
|
-
}
|
|
2821
|
-
function m(w) {
|
|
2822
|
-
var y = w || {}, T = y.upcomingOnly, A = T === void 0 ? !1 : T;
|
|
2823
|
-
h(), f = !A;
|
|
2824
|
-
}
|
|
2825
|
-
function b() {
|
|
2826
|
-
for (var w = arguments.length, y = new Array(w), T = 0; T < w; T++)
|
|
2827
|
-
y[T] = arguments[T];
|
|
2828
|
-
var A = this, x = Date.now() - d;
|
|
2829
|
-
if (f)
|
|
2830
|
-
return;
|
|
2831
|
-
function p() {
|
|
2832
|
-
d = Date.now(), t.apply(A, y);
|
|
2833
|
-
}
|
|
2834
|
-
function S() {
|
|
2835
|
-
c = void 0;
|
|
2836
|
-
}
|
|
2837
|
-
!a && u && !c && p(), h(), u === void 0 && x > e ? a ? (d = Date.now(), i || (c = setTimeout(u ? S : p, e))) : p() : i !== !0 && (c = setTimeout(u ? S : p, u === void 0 ? e - x : e));
|
|
2838
|
-
}
|
|
2839
|
-
return b.cancel = m, b;
|
|
2840
|
-
}
|
|
2841
|
-
function Jo(e, t, n) {
|
|
2842
|
-
var s = n || {}, r = s.atBegin, i = r === void 0 ? !1 : r;
|
|
2843
|
-
return Zo(e, t, {
|
|
2844
|
-
debounceMode: i !== !1
|
|
2845
|
-
});
|
|
2846
|
-
}
|
|
2847
|
-
function Qo(...e) {
|
|
2848
|
-
return Jo(...e);
|
|
2849
|
-
}
|
|
2850
|
-
class ea {
|
|
2851
|
-
callback;
|
|
2852
|
-
interval;
|
|
2853
|
-
isRunning;
|
|
2854
|
-
timeoutId;
|
|
2855
|
-
remaining;
|
|
2856
|
-
startTime;
|
|
2857
|
-
/**
|
|
2858
|
-
* Creates a new PausableInterval instance
|
|
2859
|
-
* @param callback The function to call on each interval
|
|
2860
|
-
* @param interval The interval duration in milliseconds
|
|
2861
|
-
*/
|
|
2862
|
-
constructor(t, n) {
|
|
2863
|
-
this.callback = t, this.interval = n, this.isRunning = !1, this.timeoutId = null, this.remaining = n, this.startTime = null;
|
|
2864
|
-
}
|
|
2865
|
-
/**
|
|
2866
|
-
* Start the interval timer
|
|
2867
|
-
*/
|
|
2868
|
-
start() {
|
|
2869
|
-
this.isRunning || (this.isRunning = !0, this.startTime = Date.now(), this.timeoutId = window.setTimeout(() => {
|
|
2870
|
-
this.callback(), this.remaining = this.interval, this.isRunning && this.start();
|
|
2871
|
-
}, this.remaining));
|
|
2872
|
-
}
|
|
2873
|
-
/**
|
|
2874
|
-
* Pause the interval timer
|
|
2875
|
-
*/
|
|
2876
|
-
pause() {
|
|
2877
|
-
!this.isRunning || this.timeoutId === null || this.startTime === null || (this.isRunning = !1, window.clearTimeout(this.timeoutId), this.remaining -= Date.now() - this.startTime, this.remaining < 0 && (this.remaining = 0));
|
|
2878
|
-
}
|
|
2879
|
-
/**
|
|
2880
|
-
* Resume the interval timer
|
|
2881
|
-
*/
|
|
2882
|
-
resume() {
|
|
2883
|
-
this.start();
|
|
2884
|
-
}
|
|
2885
|
-
/**
|
|
2886
|
-
* Stop and reset the interval timer
|
|
2887
|
-
*/
|
|
2888
|
-
stop() {
|
|
2889
|
-
this.isRunning = !1, this.timeoutId !== null && (window.clearTimeout(this.timeoutId), this.timeoutId = null), this.remaining = this.interval;
|
|
2890
|
-
}
|
|
2891
|
-
/**
|
|
2892
|
-
* Check if the interval is currently running
|
|
2893
|
-
* @returns True if the interval is running, false otherwise
|
|
2894
|
-
*/
|
|
2895
|
-
isActive() {
|
|
2896
|
-
return this.isRunning;
|
|
2897
|
-
}
|
|
2898
|
-
/**
|
|
2899
|
-
* Change the interval duration
|
|
2900
|
-
* @param newInterval The new interval duration in milliseconds
|
|
2901
|
-
*/
|
|
2902
|
-
setInterval(t) {
|
|
2903
|
-
const n = this.isRunning;
|
|
2904
|
-
n && this.pause(), this.interval = t, this.remaining = t, n && this.resume();
|
|
2905
|
-
}
|
|
2906
|
-
}
|
|
2907
|
-
const Vs = 3e3, Ms = document.querySelector("#alerts");
|
|
2908
|
-
if (!Ms)
|
|
2909
|
-
throw new Error("Alert container not found");
|
|
2910
|
-
const U = [], Y = Es(!1);
|
|
2911
|
-
Y.effect(Qo(50, () => {
|
|
2912
|
-
U.toReversed().forEach(({ element: e, interval: t }, n) => {
|
|
2913
|
-
Y.value ? (t.setInterval(Vs - n * 250), t.pause()) : t.resume();
|
|
2914
|
-
const s = 1 - n * 0.1, r = n === 0 ? 0 : -10 * n, i = U.slice(0, n), o = 5;
|
|
2915
|
-
C(e, {
|
|
2916
|
-
y: Y.value ? i.reduce((a, { element: l }) => a + l.offsetHeight + o, 0) * -1 : r,
|
|
2917
|
-
scale: Y.value ? 1 : s
|
|
2918
|
-
}, {
|
|
2919
|
-
ease: "easeOut",
|
|
2920
|
-
duration: 0.3
|
|
2921
|
-
});
|
|
2922
|
-
});
|
|
2923
|
-
}));
|
|
2924
|
-
function rn(e, t) {
|
|
2925
|
-
const n = U.length - 1, s = U.shift();
|
|
2926
|
-
if (!s)
|
|
2927
|
-
throw new Error("First alert not found");
|
|
2928
|
-
s.interval.stop();
|
|
2929
|
-
let r = -10 * (n + 1), i = n === 1 ? 1 : 1 - n * 0.1;
|
|
2930
|
-
t && (r += 10, i -= 0.1), C(s.element, {
|
|
2931
|
-
y: e === "top" ? r : "50%",
|
|
2932
|
-
scale: i,
|
|
2933
|
-
opacity: 0
|
|
2934
|
-
}, {
|
|
2935
|
-
duration: e === "top" ? 0.2 : 0.3,
|
|
2936
|
-
ease: "easeOut"
|
|
2937
|
-
}).then(() => {
|
|
2938
|
-
s.element.remove();
|
|
2939
|
-
});
|
|
2940
|
-
}
|
|
2941
|
-
function ta(e, t) {
|
|
2942
|
-
U.length === 3 && rn("top", !0);
|
|
2943
|
-
const n = document.createElement("div");
|
|
2944
|
-
n.setAttribute("role", "alert"), n.classList.add("c-toast", "z-50"), n.style.opacity = "0%";
|
|
2945
|
-
const s = document.createElement("span");
|
|
2946
|
-
if (s.textContent = e, n.append(s), t) {
|
|
2947
|
-
const i = document.createElement("div");
|
|
2948
|
-
i.innerHTML = t, n.prepend(i);
|
|
2949
|
-
}
|
|
2950
|
-
n.addEventListener("mouseenter", () => Y.value = !0), n.addEventListener("mouseleave", () => Y.value = !1), Ms?.append(n), C(n, {
|
|
2951
|
-
y: ["100%", 0],
|
|
2952
|
-
scale: 1,
|
|
2953
|
-
opacity: 1
|
|
2954
|
-
}, {
|
|
2955
|
-
ease: "easeOut",
|
|
2956
|
-
duration: 0.3
|
|
2957
|
-
}), U.toReversed().forEach(({ element: i }, o) => {
|
|
2958
|
-
const a = 1 - (o + 1) * 0.1, l = -10 * (o + 1);
|
|
2959
|
-
C(i, {
|
|
2960
|
-
y: l,
|
|
2961
|
-
scale: a
|
|
2962
|
-
}, { ease: "easeOut", duration: 0.3 });
|
|
2963
|
-
});
|
|
2964
|
-
const r = new ea(() => rn("bottom", !1), Vs);
|
|
2965
|
-
U.push({ element: n, interval: r }), r.start();
|
|
2966
|
-
}
|
|
2967
|
-
const na = 5e3;
|
|
2968
|
-
async function sa(e) {
|
|
2818
|
+
const Go = 5e3;
|
|
2819
|
+
async function zo(e) {
|
|
2969
2820
|
const t = (n) => {
|
|
2970
2821
|
const s = n.contentWindow?.document;
|
|
2971
2822
|
if (!s)
|
|
@@ -2979,11 +2830,11 @@ async function sa(e) {
|
|
|
2979
2830
|
if (t(n))
|
|
2980
2831
|
return clearInterval(r), s();
|
|
2981
2832
|
}, 100);
|
|
2982
|
-
setTimeout(() => (clearInterval(r), s()),
|
|
2833
|
+
setTimeout(() => (clearInterval(r), s()), Go);
|
|
2983
2834
|
}))
|
|
2984
2835
|
);
|
|
2985
2836
|
}
|
|
2986
|
-
function
|
|
2837
|
+
function Re(e) {
|
|
2987
2838
|
const t = e.contentWindow?.document;
|
|
2988
2839
|
if (!t)
|
|
2989
2840
|
throw new Error("iFrame was not fully loaded yet");
|
|
@@ -2998,25 +2849,25 @@ function Ne(e) {
|
|
|
2998
2849
|
);
|
|
2999
2850
|
e.style.height = `${n}px`;
|
|
3000
2851
|
}
|
|
3001
|
-
function
|
|
2852
|
+
function Ss() {
|
|
3002
2853
|
document.body.classList.add("js-loaded");
|
|
3003
2854
|
}
|
|
3004
|
-
const
|
|
3005
|
-
if (await
|
|
3006
|
-
|
|
2855
|
+
const Yo = async (e) => {
|
|
2856
|
+
if (await zo(e), e.forEach((t) => {
|
|
2857
|
+
Re(t);
|
|
3007
2858
|
const n = t.contentWindow;
|
|
3008
2859
|
if (!n)
|
|
3009
2860
|
return;
|
|
3010
|
-
new ResizeObserver(() =>
|
|
2861
|
+
new ResizeObserver(() => Re(t)).observe(n.document.body);
|
|
3011
2862
|
}), window.addEventListener("resize", () => {
|
|
3012
|
-
e.forEach((t) =>
|
|
2863
|
+
e.forEach((t) => Re(t));
|
|
3013
2864
|
}), window.location.hash) {
|
|
3014
2865
|
const t = document.querySelector(window.location.hash);
|
|
3015
2866
|
t && (await new Promise((n) => setTimeout(n, 200)), t.scrollIntoView());
|
|
3016
2867
|
}
|
|
3017
|
-
|
|
2868
|
+
Ss();
|
|
3018
2869
|
};
|
|
3019
|
-
function
|
|
2870
|
+
function Xo(e = 500) {
|
|
3020
2871
|
function t() {
|
|
3021
2872
|
return performance.getEntriesByType("resource").filter(
|
|
3022
2873
|
(r) => performance.now() - r.responseEnd < e
|
|
@@ -3029,42 +2880,42 @@ function ia(e = 500) {
|
|
|
3029
2880
|
s();
|
|
3030
2881
|
});
|
|
3031
2882
|
}
|
|
3032
|
-
function
|
|
2883
|
+
function Zo(e) {
|
|
3033
2884
|
e.forEach((t) => {
|
|
3034
2885
|
const n = t.querySelectorAll('[role="tab"]'), s = Array.from(t.querySelectorAll('[role="tabpanel"]')), r = t.querySelector(".tab-trigger-background");
|
|
3035
2886
|
if (!r)
|
|
3036
2887
|
throw new Error("No tab trigger background found");
|
|
3037
|
-
const i = (l,
|
|
2888
|
+
const i = (l, f) => {
|
|
3038
2889
|
const c = l.offsetWidth;
|
|
3039
|
-
if (
|
|
2890
|
+
if (f) {
|
|
3040
2891
|
const d = l === n[0] ? l.offsetLeft : l.offsetLeft + 1;
|
|
3041
|
-
|
|
2892
|
+
L(r, {
|
|
3042
2893
|
width: c,
|
|
3043
2894
|
x: `${d}px`
|
|
3044
2895
|
}, {
|
|
3045
2896
|
duration: 0.3,
|
|
3046
2897
|
easing: "ease-out",
|
|
3047
|
-
type:
|
|
2898
|
+
type: X,
|
|
3048
2899
|
bounce: 0.1
|
|
3049
2900
|
});
|
|
3050
2901
|
} else
|
|
3051
2902
|
r.style.width = `${c}px`, r.style.transform = "translateX(2px)";
|
|
3052
2903
|
}, o = n[0];
|
|
3053
2904
|
i(o, !1), n.forEach((l) => l.addEventListener("click", () => {
|
|
3054
|
-
n.forEach((
|
|
3055
|
-
const c =
|
|
3056
|
-
|
|
3057
|
-
const
|
|
3058
|
-
|
|
2905
|
+
n.forEach((f) => {
|
|
2906
|
+
const c = f === l;
|
|
2907
|
+
f.setAttribute("aria-selected", c.toString());
|
|
2908
|
+
const u = s.find((d) => d.getAttribute("aria-labelledby") === f.id);
|
|
2909
|
+
u?.setAttribute("tab-index", c ? "0" : "-1"), u?.classList.toggle("hidden", !c), c && i(l, !0);
|
|
3059
2910
|
});
|
|
3060
2911
|
})), window.innerWidth < 768 || n.forEach((l) => {
|
|
3061
|
-
const
|
|
3062
|
-
if (!
|
|
2912
|
+
const f = s.find((d) => d.getAttribute("aria-labelledby") === l.id);
|
|
2913
|
+
if (!f)
|
|
3063
2914
|
throw new Error(`No content found for trigger ${l.id}`);
|
|
3064
|
-
const c =
|
|
2915
|
+
const c = f.querySelector("iframe");
|
|
3065
2916
|
if (!c || c.loading !== "lazy")
|
|
3066
2917
|
return;
|
|
3067
|
-
const
|
|
2918
|
+
const u = () => {
|
|
3068
2919
|
if (c.src.includes("embed.figma.com")) {
|
|
3069
2920
|
const h = c.cloneNode(!0);
|
|
3070
2921
|
h.loading = "eager", h.style.position = "absolute", h.style.opacity = "0", h.style.pointerEvents = "none", h.style.left = "-9999px", h.inert = !0, h.tabIndex = -1, h.addEventListener("load", () => {
|
|
@@ -3073,36 +2924,36 @@ function oa(e) {
|
|
|
3073
2924
|
} else
|
|
3074
2925
|
c.loading = "eager";
|
|
3075
2926
|
};
|
|
3076
|
-
|
|
2927
|
+
Xo().then(u);
|
|
3077
2928
|
});
|
|
3078
2929
|
});
|
|
3079
2930
|
}
|
|
3080
|
-
const
|
|
2931
|
+
const Ne = "in2theme", ve = {
|
|
3081
2932
|
normal: "theme-normal",
|
|
3082
2933
|
light: "theme-light",
|
|
3083
2934
|
dark: "theme-dark"
|
|
3084
|
-
},
|
|
2935
|
+
}, Jo = (e) => {
|
|
3085
2936
|
const t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3086
2937
|
function n() {
|
|
3087
|
-
const o = localStorage.getItem(
|
|
3088
|
-
return o || localStorage.setItem(
|
|
2938
|
+
const o = localStorage.getItem(Ne);
|
|
2939
|
+
return o || localStorage.setItem(Ne, "normal"), o;
|
|
3089
2940
|
}
|
|
3090
2941
|
function s() {
|
|
3091
2942
|
const o = n();
|
|
3092
|
-
let a =
|
|
3093
|
-
o === "normal" && t.matches && (a =
|
|
3094
|
-
const l = (
|
|
3095
|
-
Object.values(
|
|
3096
|
-
},
|
|
3097
|
-
|
|
2943
|
+
let a = ve[o];
|
|
2944
|
+
o === "normal" && t.matches && (a = ve.dark);
|
|
2945
|
+
const l = (u) => {
|
|
2946
|
+
Object.values(ve).forEach((d) => u.classList.remove(d)), u.classList.remove("dark");
|
|
2947
|
+
}, f = (u) => {
|
|
2948
|
+
u.classList.add(a), a === ve.dark && u.classList.add("dark");
|
|
3098
2949
|
};
|
|
3099
|
-
l(e),
|
|
2950
|
+
l(e), f(e);
|
|
3100
2951
|
const c = document.querySelectorAll("iframe");
|
|
3101
|
-
c && c.forEach((
|
|
3102
|
-
l(
|
|
3103
|
-
}), l(document.body),
|
|
3104
|
-
const d = new URL(
|
|
3105
|
-
o === "normal" ? d.searchParams.set("theme", "system") : d.searchParams.set("theme", o),
|
|
2952
|
+
c && c.forEach((u) => {
|
|
2953
|
+
l(u), f(u);
|
|
2954
|
+
}), l(document.body), f(document.body), Array.from(document.querySelectorAll("iframe")).filter((u) => u.src.includes("embed.figma.com")).forEach((u) => {
|
|
2955
|
+
const d = new URL(u.src);
|
|
2956
|
+
o === "normal" ? d.searchParams.set("theme", "system") : d.searchParams.set("theme", o), u.src = d.href;
|
|
3106
2957
|
});
|
|
3107
2958
|
}
|
|
3108
2959
|
t.addEventListener("change", () => {
|
|
@@ -3112,75 +2963,75 @@ const Ke = "in2theme", Se = {
|
|
|
3112
2963
|
if (!o)
|
|
3113
2964
|
throw new Error("No selected theme found");
|
|
3114
2965
|
const a = o.value;
|
|
3115
|
-
localStorage.setItem(
|
|
2966
|
+
localStorage.setItem(Ne, a), s();
|
|
3116
2967
|
});
|
|
3117
2968
|
const r = n(), i = e.querySelector(`input[value="${r}"]`);
|
|
3118
2969
|
if (!i)
|
|
3119
2970
|
throw new Error("No current theme input found");
|
|
3120
2971
|
i.checked = !0;
|
|
3121
2972
|
};
|
|
3122
|
-
function
|
|
2973
|
+
function sn(e, t, n, s) {
|
|
3123
2974
|
return t.navigator.platform.indexOf("Mac") === 0 && !e.includes("meta+ctrl") ? e.replace(n, s) : e;
|
|
3124
2975
|
}
|
|
3125
|
-
function
|
|
2976
|
+
function Qo() {
|
|
3126
2977
|
return [
|
|
3127
|
-
(e, t) =>
|
|
3128
|
-
(e, t) =>
|
|
2978
|
+
(e, t) => sn(e, t, "meta", "ctrl"),
|
|
2979
|
+
(e, t) => sn(e, t, "ctrl", "meta")
|
|
3129
2980
|
];
|
|
3130
2981
|
}
|
|
3131
|
-
function
|
|
2982
|
+
function j(e, t) {
|
|
3132
2983
|
t && (t.tabIndex = 0, t.focus(), e.tabIndex = -1);
|
|
3133
2984
|
}
|
|
3134
|
-
function
|
|
2985
|
+
function Ae(e) {
|
|
3135
2986
|
let t = e.closest('[focusgroup]:not([focusgroup="none"])');
|
|
3136
2987
|
if (t) return t;
|
|
3137
2988
|
}
|
|
3138
|
-
function
|
|
2989
|
+
function Se(e) {
|
|
3139
2990
|
if (e.hasAttribute("focusgroup"))
|
|
3140
2991
|
return [...e.querySelectorAll('*:not([focusgroup="none"])')].filter((n) => n.role === "button" || n.type === "button" || n.role === "checkbox" || n.type === "checkbox");
|
|
3141
2992
|
}
|
|
3142
|
-
function
|
|
2993
|
+
function ea(e) {
|
|
3143
2994
|
let t = e.getAttribute("focusgroup");
|
|
3144
2995
|
if (t !== null) return !t.split(" ").includes("block");
|
|
3145
2996
|
}
|
|
3146
|
-
function
|
|
2997
|
+
function ta() {
|
|
3147
2998
|
return (e) => {
|
|
3148
2999
|
let t = !1;
|
|
3149
3000
|
function n(a) {
|
|
3150
|
-
let l =
|
|
3001
|
+
let l = Ae(a.target);
|
|
3151
3002
|
if (!l) {
|
|
3152
3003
|
s();
|
|
3153
3004
|
return;
|
|
3154
3005
|
}
|
|
3155
|
-
let
|
|
3156
|
-
|
|
3006
|
+
let f = Se(l), c = Array.from(f).indexOf(a.target), u = "ArrowDown", d = "ArrowUp";
|
|
3007
|
+
ea(l) && (e.document.dir === "rtl" ? (u = "ArrowLeft", d = "ArrowRight") : (u = "ArrowRight", d = "ArrowLeft")), a.key === u ? (a.preventDefault(), f[c + 1] ? j(a.target, f[c + 1]) : l.getAttribute("focusgroup").includes("wrap") && j(a.target, f[0])) : a.key === d ? (a.preventDefault(), f[c - 1] ? j(a.target, f[c - 1]) : l.getAttribute("focusgroup").includes("wrap") && j(a.target, f[f.length - 1])) : a.key === "Home" ? (a.preventDefault(), j(a.target, f[0])) : a.key === "End" && (a.preventDefault(), j(a.target, f[f.length - 1]));
|
|
3157
3008
|
}
|
|
3158
3009
|
function s() {
|
|
3159
3010
|
t = !1, e.removeEventListener("keydown", n);
|
|
3160
3011
|
}
|
|
3161
3012
|
function r(a) {
|
|
3162
|
-
let l =
|
|
3013
|
+
let l = Ae(a.target);
|
|
3163
3014
|
if (l) {
|
|
3164
3015
|
t || (t = !0, e.addEventListener("keydown", n));
|
|
3165
|
-
let
|
|
3166
|
-
|
|
3016
|
+
let f = Se(l);
|
|
3017
|
+
f.some((c) => c.getAttribute("tabindex") === "0") ? f.forEach((c) => {
|
|
3167
3018
|
c !== a.target && c.setAttribute("tabindex", -1);
|
|
3168
|
-
}) : (
|
|
3169
|
-
(c,
|
|
3170
|
-
),
|
|
3019
|
+
}) : (f.forEach(
|
|
3020
|
+
(c, u) => c.setAttribute("tabindex", u === 0 ? 0 : -1)
|
|
3021
|
+
), f[0]?.focus());
|
|
3171
3022
|
} else t && s();
|
|
3172
3023
|
}
|
|
3173
3024
|
function i(a) {
|
|
3174
|
-
let l =
|
|
3175
|
-
l?.getAttribute("focusgroup")?.includes("no-memory") &&
|
|
3176
|
-
c.setAttribute("tabindex",
|
|
3025
|
+
let l = Ae(a.target);
|
|
3026
|
+
l?.getAttribute("focusgroup")?.includes("no-memory") && Se(l).forEach((c, u) => {
|
|
3027
|
+
c.setAttribute("tabindex", u === 0 ? 0 : -1);
|
|
3177
3028
|
}), (!a.relatedTarget || a.relatedTarget === e.document) && s();
|
|
3178
3029
|
}
|
|
3179
3030
|
function o(a) {
|
|
3180
|
-
let l =
|
|
3031
|
+
let l = Ae(a.target);
|
|
3181
3032
|
if (l) {
|
|
3182
|
-
let
|
|
3183
|
-
for (let c of
|
|
3033
|
+
let f = Se(l);
|
|
3034
|
+
for (let c of f)
|
|
3184
3035
|
c !== a.target && c.setAttribute("tabindex", -1);
|
|
3185
3036
|
a.target.setAttribute("tabindex", 0);
|
|
3186
3037
|
}
|
|
@@ -3190,30 +3041,30 @@ function ua() {
|
|
|
3190
3041
|
};
|
|
3191
3042
|
};
|
|
3192
3043
|
}
|
|
3193
|
-
let
|
|
3044
|
+
let na = {
|
|
3194
3045
|
button: ["toolbar"],
|
|
3195
3046
|
checkbox: ["toolbar"],
|
|
3196
3047
|
menuitem: ["menu", "menubar"],
|
|
3197
3048
|
option: ["listbox"],
|
|
3198
3049
|
tab: ["tablist"]
|
|
3199
3050
|
};
|
|
3200
|
-
function
|
|
3051
|
+
function ie(e, t) {
|
|
3201
3052
|
t.tabIndex = 0, t.focus(), e.tabIndex = -1;
|
|
3202
3053
|
}
|
|
3203
|
-
function
|
|
3054
|
+
function Ke(e) {
|
|
3204
3055
|
let t = e.role || e.type || e.tagName;
|
|
3205
3056
|
if (!t) return null;
|
|
3206
|
-
let n =
|
|
3057
|
+
let n = na[t.toLowerCase()];
|
|
3207
3058
|
if (!n) return null;
|
|
3208
3059
|
for (let s of n) {
|
|
3209
3060
|
let r = e.closest(`[role=${s}]`);
|
|
3210
3061
|
if (r) return r;
|
|
3211
3062
|
}
|
|
3212
3063
|
}
|
|
3213
|
-
function
|
|
3214
|
-
return t.role === "toolbar" ?
|
|
3064
|
+
function Be(e, t) {
|
|
3065
|
+
return t.role === "toolbar" ? ra(t) : t.querySelectorAll(`[role=${e.role}]`);
|
|
3215
3066
|
}
|
|
3216
|
-
function
|
|
3067
|
+
function sa(e, t) {
|
|
3217
3068
|
return Array.from(e).filter((n) => {
|
|
3218
3069
|
let s = n.parentElement;
|
|
3219
3070
|
for (; s && s !== t; ) {
|
|
@@ -3224,70 +3075,70 @@ function da(e, t) {
|
|
|
3224
3075
|
return !0;
|
|
3225
3076
|
});
|
|
3226
3077
|
}
|
|
3227
|
-
function
|
|
3078
|
+
function ra(e) {
|
|
3228
3079
|
return [...e.querySelectorAll("*")].filter((n) => n.role === "button" || n.type === "button" || n.role === "checkbox" || n.type === "checkbox");
|
|
3229
3080
|
}
|
|
3230
|
-
function
|
|
3081
|
+
function ia(e) {
|
|
3231
3082
|
let t = e.getAttribute("aria-orientation");
|
|
3232
3083
|
if (t === "vertical") return !1;
|
|
3233
3084
|
if (t === "horizontal") return !0;
|
|
3234
3085
|
let n = e.role;
|
|
3235
3086
|
return n === "menubar" || n === "tablist" || n === "toolbar";
|
|
3236
3087
|
}
|
|
3237
|
-
function
|
|
3088
|
+
function oa(e) {
|
|
3238
3089
|
return (t) => {
|
|
3239
3090
|
let n = !1, s = 300, r = 0, i = "";
|
|
3240
|
-
function o(
|
|
3241
|
-
let d =
|
|
3091
|
+
function o(u) {
|
|
3092
|
+
let d = Ke(u.target);
|
|
3242
3093
|
if (!d) {
|
|
3243
3094
|
a();
|
|
3244
3095
|
return;
|
|
3245
3096
|
}
|
|
3246
|
-
let h =
|
|
3247
|
-
if (
|
|
3248
|
-
|
|
3249
|
-
else if (
|
|
3250
|
-
|
|
3251
|
-
else if (
|
|
3252
|
-
|
|
3253
|
-
else if (
|
|
3254
|
-
|
|
3255
|
-
else if (
|
|
3256
|
-
|
|
3257
|
-
let
|
|
3258
|
-
|
|
3097
|
+
let h = Be(u.target, d), m = sa(h, d), y = Array.from(m).indexOf(u.target), T = "ArrowDown", b = "ArrowUp";
|
|
3098
|
+
if (ia(d) && (t.document.dir === "rtl" ? (T = "ArrowLeft", b = "ArrowRight") : (T = "ArrowRight", b = "ArrowLeft")), u.key === T)
|
|
3099
|
+
u.preventDefault(), ie(u.target, m[y + 1] || m[0]);
|
|
3100
|
+
else if (u.key === b)
|
|
3101
|
+
u.preventDefault(), ie(u.target, m[y - 1] || m[m.length - 1]);
|
|
3102
|
+
else if (u.key === "Home")
|
|
3103
|
+
u.preventDefault(), ie(u.target, m[0]);
|
|
3104
|
+
else if (u.key === "End")
|
|
3105
|
+
u.preventDefault(), ie(u.target, m[m.length - 1]);
|
|
3106
|
+
else if (u.key.length === 1 && d.role !== "tablist") {
|
|
3107
|
+
u.timeStamp - r <= s ? i += u.key.toLowerCase() : i = u.key.toLowerCase(), r = u.timeStamp;
|
|
3108
|
+
let x = Array.from(h).find((v) => v.textContent?.trim()?.toLowerCase()?.startsWith(i));
|
|
3109
|
+
x && (u.preventDefault(), ie(u.target, x));
|
|
3259
3110
|
}
|
|
3260
3111
|
}
|
|
3261
3112
|
function a() {
|
|
3262
3113
|
n = !1, t.removeEventListener("keydown", o);
|
|
3263
3114
|
}
|
|
3264
|
-
function l(
|
|
3265
|
-
let d =
|
|
3115
|
+
function l(u) {
|
|
3116
|
+
let d = Ke(u.target);
|
|
3266
3117
|
if (d) {
|
|
3267
3118
|
n || (n = !0, t.addEventListener("keydown", o));
|
|
3268
|
-
let h =
|
|
3119
|
+
let h = Be(u.target, d);
|
|
3269
3120
|
for (let m of h)
|
|
3270
|
-
m !==
|
|
3121
|
+
m !== u.target && m.setAttribute("tabindex", -1);
|
|
3271
3122
|
} else n && a();
|
|
3272
3123
|
}
|
|
3273
|
-
function u
|
|
3274
|
-
(!
|
|
3124
|
+
function f(u) {
|
|
3125
|
+
(!u.relatedTarget || u.relatedTarget === t.document) && a();
|
|
3275
3126
|
}
|
|
3276
|
-
function c(
|
|
3277
|
-
let d =
|
|
3127
|
+
function c(u) {
|
|
3128
|
+
let d = Ke(u.target);
|
|
3278
3129
|
if (d) {
|
|
3279
|
-
let h =
|
|
3130
|
+
let h = Be(u.target, d);
|
|
3280
3131
|
for (let m of h)
|
|
3281
|
-
m !==
|
|
3282
|
-
|
|
3132
|
+
m !== u.target && m.setAttribute("tabindex", -1);
|
|
3133
|
+
u.target.setAttribute("tabindex", 0);
|
|
3283
3134
|
}
|
|
3284
3135
|
}
|
|
3285
|
-
return t.addEventListener("click", c), t.addEventListener("focusin", l), t.addEventListener("focusout",
|
|
3286
|
-
a(), t.removeEventListener("click", c), t.removeEventListener("focusin", l), t.removeEventListener("focusout",
|
|
3136
|
+
return t.addEventListener("click", c), t.addEventListener("focusin", l), t.addEventListener("focusout", f), () => {
|
|
3137
|
+
a(), t.removeEventListener("click", c), t.removeEventListener("focusin", l), t.removeEventListener("focusout", f);
|
|
3287
3138
|
};
|
|
3288
3139
|
};
|
|
3289
3140
|
}
|
|
3290
|
-
function
|
|
3141
|
+
function aa() {
|
|
3291
3142
|
return (e) => {
|
|
3292
3143
|
let t, n;
|
|
3293
3144
|
function s(i) {
|
|
@@ -3307,28 +3158,28 @@ function ga() {
|
|
|
3307
3158
|
};
|
|
3308
3159
|
};
|
|
3309
3160
|
}
|
|
3310
|
-
let
|
|
3161
|
+
let la = /^[^\x00-\x7F]$/, ca = {
|
|
3311
3162
|
checkbox: !0,
|
|
3312
3163
|
file: !0,
|
|
3313
3164
|
radio: !0
|
|
3314
|
-
},
|
|
3165
|
+
}, ua = {
|
|
3315
3166
|
button: !0,
|
|
3316
3167
|
reset: !0,
|
|
3317
3168
|
submit: !0
|
|
3318
|
-
},
|
|
3169
|
+
}, fa = {
|
|
3319
3170
|
" ": "space",
|
|
3320
3171
|
"+": "plus"
|
|
3321
3172
|
};
|
|
3322
|
-
function
|
|
3173
|
+
function xs(e, t) {
|
|
3323
3174
|
if (t.tagName !== "BODY" && e !== t)
|
|
3324
|
-
return t.hasAttribute("data-keyux-ignore-hotkeys") || t.getAttribute("aria-hidden") === "true" || t.hasAttribute("inert") ? !0 :
|
|
3175
|
+
return t.hasAttribute("data-keyux-ignore-hotkeys") || t.getAttribute("aria-hidden") === "true" || t.hasAttribute("inert") ? !0 : xs(e, t.parentNode);
|
|
3325
3176
|
}
|
|
3326
|
-
function
|
|
3177
|
+
function rn(e, t) {
|
|
3327
3178
|
for (let n of t)
|
|
3328
|
-
if (!
|
|
3179
|
+
if (!xs(e, n))
|
|
3329
3180
|
return n;
|
|
3330
3181
|
}
|
|
3331
|
-
function
|
|
3182
|
+
function on(e, t, n) {
|
|
3332
3183
|
let s = t;
|
|
3333
3184
|
for (let [a] of n)
|
|
3334
3185
|
if (s = a(s, e), !s) return !1;
|
|
@@ -3340,34 +3191,34 @@ function ln(e, t, n) {
|
|
|
3340
3191
|
if (l) return l;
|
|
3341
3192
|
}
|
|
3342
3193
|
}
|
|
3343
|
-
return
|
|
3194
|
+
return rn(
|
|
3344
3195
|
i,
|
|
3345
3196
|
i.querySelectorAll(`[aria-keyshortcuts="${s}" i]`)
|
|
3346
|
-
) ||
|
|
3197
|
+
) || rn(
|
|
3347
3198
|
r,
|
|
3348
3199
|
r.querySelectorAll(`[aria-keyshortcuts="${s}" i]`)
|
|
3349
3200
|
);
|
|
3350
3201
|
}
|
|
3351
|
-
function
|
|
3202
|
+
function da(e, t, n) {
|
|
3352
3203
|
let s = "";
|
|
3353
3204
|
e.metaKey && (s += "meta+"), e.ctrlKey && (s += "ctrl+"), e.altKey && (s += "alt+"), e.shiftKey && (s += "shift+");
|
|
3354
3205
|
let r = s;
|
|
3355
|
-
r +=
|
|
3356
|
-
let i =
|
|
3357
|
-
if (!i && (e.key.length > 1 ||
|
|
3206
|
+
r += fa[e.key] ?? e.key.toLowerCase();
|
|
3207
|
+
let i = on(t, r, n);
|
|
3208
|
+
if (!i && (e.key.length > 1 || la.test(e.key)) && /^(Key.|Digit\d)$/.test(e.code)) {
|
|
3358
3209
|
let o = e.code.replace(/^Key|^Digit/, "").toLowerCase();
|
|
3359
|
-
i =
|
|
3210
|
+
i = on(t, s + o, n);
|
|
3360
3211
|
}
|
|
3361
3212
|
return i;
|
|
3362
3213
|
}
|
|
3363
|
-
function
|
|
3214
|
+
function ha(e = []) {
|
|
3364
3215
|
return (t) => {
|
|
3365
3216
|
function n(s) {
|
|
3366
|
-
let r = s.ctrlKey || s.metaKey || s.altKey, i = s.target.isContentEditable || s.target.tagName === "TEXTAREA" || s.target.tagName === "INPUT" && !
|
|
3217
|
+
let r = s.ctrlKey || s.metaKey || s.altKey, i = s.target.isContentEditable || s.target.tagName === "TEXTAREA" || s.target.tagName === "INPUT" && !ca[s.target.type], o = s.target.role === "menuitem";
|
|
3367
3218
|
if (!r && (i || o))
|
|
3368
3219
|
return;
|
|
3369
|
-
let a =
|
|
3370
|
-
a && (a.tagName === "TEXTAREA" || a.tagName === "INPUT" && !
|
|
3220
|
+
let a = da(s, t, e);
|
|
3221
|
+
a && (a.tagName === "TEXTAREA" || a.tagName === "INPUT" && !ua[a.type] ? setTimeout(() => {
|
|
3371
3222
|
a.focus();
|
|
3372
3223
|
}) : a.click());
|
|
3373
3224
|
}
|
|
@@ -3376,12 +3227,12 @@ function Aa(e = []) {
|
|
|
3376
3227
|
};
|
|
3377
3228
|
};
|
|
3378
3229
|
}
|
|
3379
|
-
function
|
|
3230
|
+
function ma() {
|
|
3380
3231
|
return (e) => {
|
|
3381
3232
|
let t = [];
|
|
3382
3233
|
function n(l) {
|
|
3383
|
-
let
|
|
3384
|
-
|
|
3234
|
+
let f = e.document.activeElement;
|
|
3235
|
+
f && f !== e.document.body && t.push(new WeakRef(f)), l.focus({ focusVisible: !0 });
|
|
3385
3236
|
}
|
|
3386
3237
|
function s() {
|
|
3387
3238
|
let l = t.pop();
|
|
@@ -3389,26 +3240,26 @@ function Sa() {
|
|
|
3389
3240
|
e.document.activeElement.blur();
|
|
3390
3241
|
return;
|
|
3391
3242
|
}
|
|
3392
|
-
let
|
|
3393
|
-
|
|
3243
|
+
let f = l.deref();
|
|
3244
|
+
f && f.isConnected ? f.focus() : s();
|
|
3394
3245
|
}
|
|
3395
3246
|
let r = 0, i;
|
|
3396
3247
|
function o(l) {
|
|
3397
3248
|
clearInterval(i);
|
|
3398
|
-
let
|
|
3249
|
+
let f = l.getAttribute("aria-controls");
|
|
3399
3250
|
i = setInterval(() => {
|
|
3400
3251
|
if (r++ > 50) {
|
|
3401
3252
|
clearInterval(i);
|
|
3402
3253
|
return;
|
|
3403
3254
|
}
|
|
3404
|
-
let c = e.document.getElementById(
|
|
3255
|
+
let c = e.document.getElementById(f);
|
|
3405
3256
|
if (c) {
|
|
3406
|
-
let
|
|
3257
|
+
let u = c.querySelector(
|
|
3407
3258
|
'a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])'
|
|
3408
3259
|
);
|
|
3409
|
-
|
|
3260
|
+
u && (clearInterval(i), c.dispatchEvent(
|
|
3410
3261
|
new e.CustomEvent("keyuxJump", { bubbles: !0 })
|
|
3411
|
-
), n(
|
|
3262
|
+
), n(u));
|
|
3412
3263
|
}
|
|
3413
3264
|
}, 50);
|
|
3414
3265
|
}
|
|
@@ -3420,34 +3271,35 @@ function Sa() {
|
|
|
3420
3271
|
};
|
|
3421
3272
|
};
|
|
3422
3273
|
}
|
|
3423
|
-
function
|
|
3274
|
+
function pa(e, t) {
|
|
3424
3275
|
let n = t.map((s) => s(e));
|
|
3425
3276
|
return () => {
|
|
3426
3277
|
n.forEach((s) => s());
|
|
3427
3278
|
};
|
|
3428
3279
|
}
|
|
3429
|
-
const
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3280
|
+
const ga = Qo();
|
|
3281
|
+
pa(window, [
|
|
3282
|
+
ha([ga]),
|
|
3283
|
+
oa(),
|
|
3284
|
+
ta(),
|
|
3285
|
+
ma(),
|
|
3286
|
+
aa()
|
|
3436
3287
|
]);
|
|
3437
|
-
function
|
|
3288
|
+
function ya() {
|
|
3438
3289
|
const e = navigator.userAgent.toLowerCase();
|
|
3439
3290
|
return e.includes("mac") ? "mac" : e.includes("linux") ? "linux" : e.includes("win") ? "windows" : "unknown";
|
|
3440
3291
|
}
|
|
3441
|
-
function
|
|
3292
|
+
function ba() {
|
|
3442
3293
|
const e = document.querySelectorAll("iframe"), t = document.querySelector("#styleguide-previous"), n = document.querySelector("#styleguide-next"), s = (r) => {
|
|
3443
|
-
document.activeElement instanceof HTMLButtonElement
|
|
3294
|
+
const i = document.activeElement instanceof HTMLButtonElement, o = document.activeElement instanceof HTMLInputElement, a = document.activeElement instanceof HTMLTextAreaElement;
|
|
3295
|
+
i || o || a || r.metaKey || r.ctrlKey || (t && r.key === "ArrowLeft" && (r.preventDefault(), t.click()), n && r.key === "ArrowRight" && (r.preventDefault(), n.click()));
|
|
3444
3296
|
};
|
|
3445
3297
|
e.forEach((r) => {
|
|
3446
3298
|
const i = r.contentWindow;
|
|
3447
3299
|
i && i.addEventListener("keydown", s);
|
|
3448
3300
|
}), window.addEventListener("keydown", s);
|
|
3449
3301
|
}
|
|
3450
|
-
function
|
|
3302
|
+
function wa() {
|
|
3451
3303
|
const e = document.querySelectorAll("iframe"), t = (n) => {
|
|
3452
3304
|
n.key === "k" && (n.metaKey || n.ctrlKey) && (n.preventDefault(), window.dispatchEvent(new Event("styleguideOpenSearch")));
|
|
3453
3305
|
};
|
|
@@ -3456,13 +3308,13 @@ function ka() {
|
|
|
3456
3308
|
s && s.addEventListener("keydown", t);
|
|
3457
3309
|
}), window.addEventListener("keydown", t);
|
|
3458
3310
|
}
|
|
3459
|
-
const
|
|
3460
|
-
document.body.setAttribute("data-os",
|
|
3461
|
-
const
|
|
3462
|
-
document.body.setAttribute("data-is-mobile", String(
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
function
|
|
3311
|
+
const Ta = ya();
|
|
3312
|
+
document.body.setAttribute("data-os", Ta);
|
|
3313
|
+
const va = "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
|
3314
|
+
document.body.setAttribute("data-is-mobile", String(va));
|
|
3315
|
+
ba();
|
|
3316
|
+
wa();
|
|
3317
|
+
function Aa() {
|
|
3466
3318
|
const e = document.querySelector("header");
|
|
3467
3319
|
if (!e)
|
|
3468
3320
|
throw new Error("No header found");
|
|
@@ -3471,7 +3323,7 @@ function Da() {
|
|
|
3471
3323
|
document.documentElement.style.setProperty("--header-height", `${t()}px`);
|
|
3472
3324
|
});
|
|
3473
3325
|
}
|
|
3474
|
-
function
|
|
3326
|
+
function Sa() {
|
|
3475
3327
|
const e = document.querySelector("aside");
|
|
3476
3328
|
if (!e)
|
|
3477
3329
|
throw new Error("No aside menu found");
|
|
@@ -3488,101 +3340,92 @@ function Ia() {
|
|
|
3488
3340
|
}
|
|
3489
3341
|
window.addEventListener("resize", t), t();
|
|
3490
3342
|
}
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
const
|
|
3494
|
-
if (!
|
|
3343
|
+
Aa();
|
|
3344
|
+
Sa();
|
|
3345
|
+
const Es = document.querySelector("#search-dialog");
|
|
3346
|
+
if (!Es)
|
|
3495
3347
|
throw new Error("No search dialog found");
|
|
3496
|
-
const
|
|
3497
|
-
if (!
|
|
3348
|
+
const Vs = document.querySelector(".dialog-backdrop");
|
|
3349
|
+
if (!Vs)
|
|
3498
3350
|
throw new Error("No dialog backdrop found");
|
|
3499
|
-
const
|
|
3500
|
-
if (
|
|
3351
|
+
const St = document.querySelectorAll("[data-open-search]");
|
|
3352
|
+
if (St.length === 0)
|
|
3501
3353
|
throw new Error("No open search buttons found");
|
|
3502
|
-
const
|
|
3503
|
-
if (!
|
|
3354
|
+
const Y = document.querySelector("#search-input");
|
|
3355
|
+
if (!Y)
|
|
3504
3356
|
throw new Error("No search input found");
|
|
3505
|
-
const
|
|
3506
|
-
if (!
|
|
3357
|
+
const Ms = document.querySelector("#search-list");
|
|
3358
|
+
if (!Ms)
|
|
3507
3359
|
throw new Error("No search list found");
|
|
3508
|
-
const
|
|
3509
|
-
if (!
|
|
3360
|
+
const ks = document.querySelectorAll(".search-category__item--active");
|
|
3361
|
+
if (!ks)
|
|
3510
3362
|
throw new Error("No search results found");
|
|
3511
|
-
const
|
|
3512
|
-
if (!
|
|
3363
|
+
const Cs = document.querySelector("#search-no-results");
|
|
3364
|
+
if (!Cs)
|
|
3513
3365
|
throw new Error("No search no results element found");
|
|
3514
|
-
const { show:
|
|
3515
|
-
async function
|
|
3516
|
-
await
|
|
3366
|
+
const { show: xa } = As(Es, Vs);
|
|
3367
|
+
async function Ds() {
|
|
3368
|
+
await xa(
|
|
3517
3369
|
(e) => {
|
|
3518
|
-
e &&
|
|
3370
|
+
e && Y.setAttribute("inert", "");
|
|
3519
3371
|
},
|
|
3520
3372
|
(e) => {
|
|
3521
|
-
e &&
|
|
3373
|
+
e && Y.removeAttribute("inert"), St.forEach((t) => t.ariaExpanded = "true"), Y.ariaExpanded = "true", Is();
|
|
3522
3374
|
}
|
|
3523
3375
|
);
|
|
3524
3376
|
}
|
|
3525
|
-
function
|
|
3526
|
-
const e =
|
|
3377
|
+
function Is() {
|
|
3378
|
+
const e = Y.value.toLowerCase().trim();
|
|
3527
3379
|
let t = !1;
|
|
3528
|
-
|
|
3380
|
+
ks.forEach((n) => {
|
|
3529
3381
|
let s;
|
|
3530
3382
|
const r = n.getAttribute("data-search-keywords")?.split(",") || [];
|
|
3531
3383
|
r.length > 0 ? s = r.some((i) => i.toLowerCase().includes(e)) : s = (n.textContent?.toLowerCase() ?? "")?.includes(e), n.classList.toggle("search-category__item--active", s), s && (t = !0);
|
|
3532
|
-
}),
|
|
3533
|
-
}
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
window.addEventListener("styleguideOpenSearch",
|
|
3537
|
-
const
|
|
3538
|
-
|
|
3539
|
-
const
|
|
3540
|
-
|
|
3541
|
-
const
|
|
3542
|
-
|
|
3384
|
+
}), Ms.classList.toggle("hidden", !t), Cs.classList.toggle("hidden", t);
|
|
3385
|
+
}
|
|
3386
|
+
Y.addEventListener("input", Is);
|
|
3387
|
+
St.forEach((e) => e.addEventListener("click", Ds));
|
|
3388
|
+
window.addEventListener("styleguideOpenSearch", Ds);
|
|
3389
|
+
const an = Array.from(document.querySelectorAll(".preview-iframe"));
|
|
3390
|
+
an.length > 0 ? Yo(an).catch(console.error) : Ss();
|
|
3391
|
+
const ln = document.querySelector(".theme-select");
|
|
3392
|
+
ln && Jo(ln);
|
|
3393
|
+
const Ea = document.querySelectorAll(".styleguide-section");
|
|
3394
|
+
Ea.forEach((e) => {
|
|
3543
3395
|
new ResizeObserver(() => {
|
|
3544
3396
|
const t = e.scrollHeight > 600;
|
|
3545
3397
|
e.classList.toggle("styleguide-section--large", t);
|
|
3546
3398
|
}).observe(e);
|
|
3547
3399
|
});
|
|
3548
|
-
const
|
|
3549
|
-
|
|
3550
|
-
const
|
|
3551
|
-
|
|
3400
|
+
const cn = document.querySelectorAll(".tabs");
|
|
3401
|
+
cn.length > 0 && Zo(cn);
|
|
3402
|
+
const un = document.querySelectorAll("details:has(.code-highlight)");
|
|
3403
|
+
un.length > 0 && un.forEach((e) => {
|
|
3552
3404
|
const t = e.querySelector(".code-highlight");
|
|
3553
3405
|
if (!t)
|
|
3554
3406
|
throw new Error("No code element found");
|
|
3555
|
-
|
|
3407
|
+
Wo(t).catch(console.error);
|
|
3556
3408
|
});
|
|
3557
|
-
const
|
|
3558
|
-
|
|
3559
|
-
const {
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
const { isValid: i } = await t(r, qe, s);
|
|
3563
|
-
i ? (r.classList.add("text-green-500", "!cursor-not-allowed"), ta(
|
|
3564
|
-
"Scanned HTML, no issues found!",
|
|
3565
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="size-4 text-green-500/50"><path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.844-8.791a.75.75 0 0 0-1.188-.918l-3.7 4.79-1.649-1.833a.75.75 0 1 0-1.114 1.004l2.25 2.5a.75.75 0 0 0 1.15-.043l4.25-5.5Z" clip-rule="evenodd" /></svg>'
|
|
3566
|
-
), setTimeout(() => {
|
|
3567
|
-
r.classList.remove("text-green-500", "!cursor-not-allowed"), r.removeAttribute("disabled");
|
|
3568
|
-
}, 5e3)) : (r.setAttribute("aria-expanded", "true"), r.removeAttribute("disabled"), r.classList.add("text-red-500"), await n(
|
|
3409
|
+
const xe = document.querySelectorAll("[data-code-audit-iframe]"), qe = document.querySelector("#code-audit-dialog"), fn = document.querySelector(".dialog-backdrop");
|
|
3410
|
+
xe.length > 0 && qe && fn && (async () => {
|
|
3411
|
+
const { auditCode: e } = await import("./html-validator-BlXeWTXJ.js"), { show: t, close: n } = As(qe, fn);
|
|
3412
|
+
xe.forEach((s) => s.addEventListener("click", async () => {
|
|
3413
|
+
xe.forEach((r) => r.setAttribute("aria-expanded", "false")), s.setAttribute("disabled", ""), await e(s, qe, n), s.removeAttribute("disabled"), s.setAttribute("aria-expanded", "true"), await t(
|
|
3569
3414
|
void 0,
|
|
3570
3415
|
() => {
|
|
3571
|
-
|
|
3572
|
-
|
|
3416
|
+
xe.forEach((r) => {
|
|
3417
|
+
r.setAttribute("aria-expanded", "false");
|
|
3573
3418
|
});
|
|
3574
3419
|
}
|
|
3575
|
-
)
|
|
3576
|
-
}))
|
|
3577
|
-
requestIdleCallback(e);
|
|
3578
|
-
}, 8e3);
|
|
3420
|
+
);
|
|
3421
|
+
}));
|
|
3579
3422
|
})();
|
|
3580
|
-
const
|
|
3581
|
-
|
|
3582
|
-
const
|
|
3583
|
-
|
|
3584
|
-
const
|
|
3585
|
-
|
|
3423
|
+
const dn = document.querySelector("#icon-search-input"), hn = document.querySelector("#icon-search-input-reset"), mn = document.querySelector("#icon-search-list");
|
|
3424
|
+
dn && mn && hn && import("./icons-DfSfd5nI.js").then(({ default: e }) => e(dn, mn, hn)).catch(console.error);
|
|
3425
|
+
const Ls = "data-clipboard-value", pn = document.querySelectorAll(`button[${Ls}]`);
|
|
3426
|
+
pn.length > 0 && import("./clipboard-CmSioy8N.js").then(({ default: e }) => e(pn, Ls)).catch(console.error);
|
|
3427
|
+
const gn = document.querySelectorAll(".markdown-container-folded");
|
|
3428
|
+
gn.length > 0 && gn.forEach((e) => {
|
|
3586
3429
|
const t = e.querySelector(".markdown-container");
|
|
3587
3430
|
if (!t)
|
|
3588
3431
|
throw new Error("No markdown container found");
|
|
@@ -3592,7 +3435,7 @@ bn.length > 0 && bn.forEach((e) => {
|
|
|
3592
3435
|
const s = e.querySelector(".markdown-show-more");
|
|
3593
3436
|
if (!s)
|
|
3594
3437
|
throw new Error("No show more button found");
|
|
3595
|
-
const { $isOverflowingVertically: r } =
|
|
3438
|
+
const { $isOverflowingVertically: r } = jo(e), i = () => {
|
|
3596
3439
|
const a = t.scrollHeight > t.clientHeight;
|
|
3597
3440
|
n.classList.toggle("hidden", !a);
|
|
3598
3441
|
};
|
|
@@ -3601,36 +3444,26 @@ bn.length > 0 && bn.forEach((e) => {
|
|
|
3601
3444
|
s.addEventListener("click", async () => {
|
|
3602
3445
|
o();
|
|
3603
3446
|
const a = t.scrollHeight;
|
|
3604
|
-
|
|
3447
|
+
L(t, {
|
|
3605
3448
|
maxHeight: `${a}px`
|
|
3606
3449
|
}, { duration: 0.5 }).then(() => {
|
|
3607
3450
|
t.classList.remove("max-h-[400px]"), t.style.maxHeight = "";
|
|
3608
|
-
}),
|
|
3451
|
+
}), L(n, {
|
|
3609
3452
|
opacity: 0
|
|
3610
3453
|
}, { duration: 0.5 }).then(() => n.classList.add("hidden"));
|
|
3611
3454
|
});
|
|
3612
3455
|
});
|
|
3613
|
-
let
|
|
3456
|
+
let Ee;
|
|
3614
3457
|
window.addEventListener("scroll", () => {
|
|
3615
|
-
|
|
3458
|
+
Ee && (clearTimeout(Ee), Ee = void 0), document.body.classList.contains("is-scrolling") || document.body.classList.add("is-scrolling"), Ee = setTimeout(() => {
|
|
3616
3459
|
document.body.classList.remove("is-scrolling");
|
|
3617
3460
|
}, 250);
|
|
3618
3461
|
});
|
|
3619
|
-
const
|
|
3620
|
-
|
|
3621
|
-
const t = e.getAttribute("data-link-multiple");
|
|
3622
|
-
if (!t)
|
|
3623
|
-
return;
|
|
3624
|
-
const n = t.trim().split(",");
|
|
3625
|
-
e.addEventListener("click", (s) => {
|
|
3626
|
-
s.preventDefault(), n.forEach((r) => {
|
|
3627
|
-
const i = r.trim();
|
|
3628
|
-
window.open(i, "_blank");
|
|
3629
|
-
});
|
|
3630
|
-
});
|
|
3631
|
-
});
|
|
3462
|
+
const yn = document.querySelector(".editor-select");
|
|
3463
|
+
yn && import("./editor-select-Bzw7rF0M.js").then(({ default: e }) => e(yn)).catch(console.error);
|
|
3632
3464
|
export {
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3465
|
+
L as a,
|
|
3466
|
+
Uo as b,
|
|
3467
|
+
Wo as h,
|
|
3468
|
+
X as s
|
|
3636
3469
|
};
|