(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["object" == typeof document ? document.currentScript : void 0, {
269235: e => {
"use strict";
e.s({
_highlight: () => s,
_renderHighlight: () => a,
highlight: () => o
});
var t = e.i(645311),
r = e.i(378469),
i = e.i(892988),
n = {
light: "github-light",
dark: "github-dark"
};
async function s(t, r) {
let {
getSingletonHighlighter: i
} = await e.r(837119)(e.i), {
lang: s,
components: a,
engine: o,
...u
} = r, l = {
themes: n
};
"theme" in r && r.theme ? l = {
theme: r.theme
} : "themes" in r && r.themes && (l = {
themes: r.themes
});
let f = o;
if (!f) {
let {
createOnigurumaEngine: t
} = await e.r(358797)(e.i);
f = await t(await e.r(733720)(e.i))
}
return (await i({
langs: [s],
engine: f,
themes: "theme" in l ? [l.theme] : Object.values(l.themes).filter(e => void 0 !== e)
})).codeToHast(t, {
lang: s,
...u,
...l,
transformers: [{
name: "rehype-code:styles",
line(e) {
0 === e.children.length && e.children.push({
type: "text",
value: " "
})
}
}, ...u.transformers ?? []],
defaultColor: !("themes" in l) && void 0
})
}
function a(e, n) {
return (0, t.toJsxRuntime)(e, {
jsx: i.jsx,
jsxs: i.jsxs,
development: !1,
components: n?.components,
Fragment: r.Fragment
})
}
async function o(e, t) {
return a(await s(e, t), t)
}
},
317449: e => {
"use strict";
e.s({
raf: () => r
});
var t = v(),
r = e => h(e, t),
i = v();
r.write = e => h(e, i);
var n = v();
r.onStart = e => h(e, n);
var s = v();
r.onFrame = e => h(e, s);
var a = v();
r.onFinish = e => h(e, a);
var o = [];
r.setTimeout = (e, t) => {
let i = r.now() + t,
n = () => {
let e = o.findIndex(e => e.cancel == n);
~e && o.splice(e, 1), d -= !!~e
},
s = {
time: i,
handler: e,
cancel: n
};
return o.splice(u(i), 0, s), d += 1, p(), s
};
var u = e => ~(~o.findIndex(t => t.time > e) || ~o.length);
r.cancel = e => {
n.delete(e), s.delete(e), a.delete(e), t.delete(e), i.delete(e)
}, r.sync = e => {
c = !0, r.batchedUpdates(e), c = !1
}, r.throttle = e => {
let t;
function i() {
try {
e(...t)
} finally {
t = null
}
}
function s(...e) {
t = e, r.onStart(i)
}
return s.handler = e, s.cancel = () => {
n.delete(i), t = null
}, s
};
var l = "undefined" != typeof window ? window.requestAnimationFrame : () => {};
r.use = e => l = e, r.now = "undefined" != typeof performance ? () => performance.now() : Date.now, r.batchedUpdates = e => e(), r.catch = console.error, r.frameLoop = "always", r.advance = () => {
"demand" !== r.frameLoop ? console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand") : g()
};
var f = -1,
d = 0,
c = !1;
function h(e, t) {
c ? (t.delete(e), e(0)) : (t.add(e), p())
}
function p() {
f < 0 && (f = 0, "demand" !== r.frameLoop && l(m))
}
function m() {
~f && (l(m), r.batchedUpdates(g))
}
function g() {
let e = f,
l = u(f = r.now());
if (l && (y(o.splice(0, l), e => e.handler()), d -= l), !d) return void(f = -1);
n.flush(), t.flush(e ? Math.min(64, f - e) : 16.667), s.flush(), i.flush(), a.flush()
}
function v() {
let e = new Set,
t = e;
return {
add(r) {
d += +!(t != e || e.has(r)), e.add(r)
},
delete: r => (d -= t == e && e.has(r) ? 1 : 0, e.delete(r)),
flush(r) {
t.size && (e = new Set, d -= t.size, y(t, t => t(r) && e.add(t)), d += e.size, t = e)
}
}
}
function y(e, t) {
e.forEach(e => {
try {
t(e)
} catch (e) {
r.catch(e)
}
})
}
},
530056: e => {
"use strict";
e.s({
FluidValue: () => ed,
Globals: () => l,
addFluidObserver: () => eh,
callFluidObserver: () => el,
callFluidObservers: () => ef,
clamp: () => F,
colorToRgba: () => Z,
colors: () => M,
createInterpolator: () => K,
createStringInterpolator: () => eS,
defineHidden: () => d,
deprecateDirectCall: () => eR,
deprecateInterpolate: () => ek,
each: () => p,
eachProp: () => m,
easings: () => ei,
flush: () => v,
flushCalls: () => y,
frameLoop: () => k,
getFluidObservers: () => eu,
getFluidValue: () => eo,
hasFluidValue: () => ea,
hex3: () => D,
hex4: () => $,
hex6: () => Q,
hex8: () => W,
hsl: () => z,
hsla: () => N,
is: () => c,
isAnimatedString: () => eC,
isEqual: () => h,
isSSR: () => b,
noop: () => f,
onResize: () => eT,
onScroll: () => eD,
once: () => eA,
prefix: () => eO,
removeFluidObserver: () => ep,
rgb: () => U,
rgba: () => q,
setFluidGetter: () => ec,
toArray: () => g,
useConstant: () => e$,
useForceUpdate: () => eW,
useIsomorphicLayoutEffect: () => eQ,
useMemoOne: () => eG,
useOnce: () => eB,
usePrev: () => eY,
useReducedMotion: () => eJ
});
var t, r, i, n, s, a = e.i(317449),
o = e.i(378469),
u = Object.defineProperty,
l = {};
function f() {}((e, t) => {
for (var r in t) u(e, r, {
get: t[r],
enumerable: !0
})
})(l, {
assign: () => E,
colors: () => x,
createStringInterpolator: () => t,
skipAnimation: () => w,
to: () => r,
willAdvance: () => _
});
var d = (e, t, r) => Object.defineProperty(e, t, {
value: r,
writable: !0,
configurable: !0
}),
c = {
arr: Array.isArray,
obj: e => !!e && "Object" === e.constructor.name,
fun: e => "function" == typeof e,
str: e => "string" == typeof e,
num: e => "number" == typeof e,
und: e => void 0 === e
};
function h(e, t) {
if (c.arr(e)) {
if (!c.arr(t) || e.length !== t.length) return !1;
for (let r = 0; r < e.length; r++)
if (e[r] !== t[r]) return !1;
return !0
}
return e === t
}
var p = (e, t) => e.forEach(t);
function m(e, t, r) {
if (c.arr(e)) {
for (let i = 0; i < e.length; i++) t.call(r, e[i], `${i}`);
return
}
for (let i in e) e.hasOwnProperty(i) && t.call(r, e[i], i)
}
var g = e => c.und(e) ? [] : c.arr(e) ? e : [e];
function v(e, t) {
if (e.size) {
let r = Array.from(e);
e.clear(), p(r, t)
}
}
var y = (e, ...t) => v(e, e => e(...t)),
b = () => "undefined" == typeof window || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent),
x = null,
w = !1,
_ = f,
E = e => {
e.to && (r = e.to), e.now && (a.raf.now = e.now), void 0 !== e.colors && (x = e.colors), null != e.skipAnimation && (w = e.skipAnimation), e.createStringInterpolator && (t = e.createStringInterpolator), e.requestAnimationFrame && a.raf.use(e.requestAnimationFrame), e.batchedUpdates && (a.raf.batchedUpdates = e.batchedUpdates), e.willAdvance && (_ = e.willAdvance), e.frameLoop && (a.raf.frameLoop = e.frameLoop)
},
S = new Set,
O = [],
A = [],
I = 0,
k = {
get idle() {
return !S.size && !O.length
},
start(e) {
I > e.priority ? (S.add(e), a.raf.onStart(P)) : (R(e), (0, a.raf)(V))
},
advance: V,
sort(e) {
if (I) a.raf.onFrame(() => k.sort(e));
else {
let t = O.indexOf(e);
~t && (O.splice(t, 1), C(e))
}
},
clear() {
O = [], S.clear()
}
};
function P() {
S.forEach(R), S.clear(), (0, a.raf)(V)
}
function R(e) {
O.includes(e) || C(e)
}
function C(e) {
O.splice(function(e, t) {
let r = e.findIndex(t);
return r < 0 ? e.length : r
}(O, t => t.priority > e.priority), 0, e)
}
function V(e) {
let t = A;
for (let r = 0; r < O.length; r++) {
let i = O[r];
I = i.priority, !i.idle && (_(i), i.advance(e), i.idle || t.push(i))
}
return I = 0, (A = O).length = 0, (O = t).length > 0
}
var F = (e, t, r) => Math.min(Math.max(r, e), t),
M = {
transparent: 0,
aliceblue: 0xf0f8ffff,
antiquewhite: 0xfaebd7ff,
aqua: 0xffffff,
aquamarine: 0x7fffd4ff,
azure: 0xf0ffffff,
beige: 0xf5f5dcff,
bisque: 0xffe4c4ff,
black: 255,
blanchedalmond: 0xffebcdff,
blue: 65535,
blueviolet: 0x8a2be2ff,
brown: 0xa52a2aff,
burlywood: 0xdeb887ff,
burntsienna: 0xea7e5dff,
cadetblue: 0x5f9ea0ff,
chartreuse: 0x7fff00ff,
chocolate: 0xd2691eff,
coral: 0xff7f50ff,
cornflowerblue: 0x6495edff,
cornsilk: 0xfff8dcff,
crimson: 0xdc143cff,
cyan: 0xffffff,
darkblue: 35839,
darkcyan: 9145343,
darkgoldenrod: 0xb8860bff,
darkgray: 0xa9a9a9ff,
darkgreen: 6553855,
darkgrey: 0xa9a9a9ff,
darkkhaki: 0xbdb76bff,
darkmagenta: 0x8b008bff,
darkolivegreen: 0x556b2fff,
darkorange: 0xff8c00ff,
darkorchid: 0x9932ccff,
darkred: 0x8b0000ff,
darksalmon: 0xe9967aff,
darkseagreen: 0x8fbc8fff,
darkslateblue: 0x483d8bff,
darkslategray: 0x2f4f4fff,
darkslategrey: 0x2f4f4fff,
darkturquoise: 0xced1ff,
darkviolet: 0x9400d3ff,
deeppink: 0xff1493ff,
deepskyblue: 0xbfffff,
dimgray: 0x696969ff,
dimgrey: 0x696969ff,
dodgerblue: 0x1e90ffff,
firebrick: 0xb22222ff,
floralwhite: 0xfffaf0ff,
forestgreen: 0x228b22ff,
fuchsia: 0xff00ffff,
gainsboro: 0xdcdcdcff,
ghostwhite: 0xf8f8ffff,
gold: 0xffd700ff,
goldenrod: 0xdaa520ff,
gray: 0x808080ff,
green: 8388863,
greenyellow: 0xadff2fff,
grey: 0x808080ff,
honeydew: 0xf0fff0ff,
hotpink: 0xff69b4ff,
indianred: 0xcd5c5cff,
indigo: 0x4b0082ff,
ivory: 0xfffff0ff,
khaki: 0xf0e68cff,
lavender: 0xe6e6faff,
lavenderblush: 0xfff0f5ff,
lawngreen: 0x7cfc00ff,
lemonchiffon: 0xfffacdff,
lightblue: 0xadd8e6ff,
lightcoral: 0xf08080ff,
lightcyan: 0xe0ffffff,
lightgoldenrodyellow: 0xfafad2ff,
lightgray: 0xd3d3d3ff,
lightgreen: 0x90ee90ff,
lightgrey: 0xd3d3d3ff,
lightpink: 0xffb6c1ff,
lightsalmon: 0xffa07aff,
lightseagreen: 0x20b2aaff,
lightskyblue: 0x87cefaff,
lightslategray: 0x778899ff,
lightslategrey: 0x778899ff,
lightsteelblue: 0xb0c4deff,
lightyellow: 0xffffe0ff,
lime: 0xff00ff,
limegreen: 0x32cd32ff,
linen: 0xfaf0e6ff,
magenta: 0xff00ffff,
maroon: 0x800000ff,
mediumaquamarine: 0x66cdaaff,
mediumblue: 52735,
mediumorchid: 0xba55d3ff,
mediumpurple: 0x9370dbff,
mediumseagreen: 0x3cb371ff,
mediumslateblue: 0x7b68eeff,
mediumspringgreen: 0xfa9aff,
mediumturquoise: 0x48d1ccff,
mediumvioletred: 0xc71585ff,
midnightblue: 0x191970ff,
mintcream: 0xf5fffaff,
mistyrose: 0xffe4e1ff,
moccasin: 0xffe4b5ff,
navajowhite: 0xffdeadff,
navy: 33023,
oldlace: 0xfdf5e6ff,
olive: 0x808000ff,
olivedrab: 0x6b8e23ff,
orange: 0xffa500ff,
orangered: 0xff4500ff,
orchid: 0xda70d6ff,
palegoldenrod: 0xeee8aaff,
palegreen: 0x98fb98ff,
paleturquoise: 0xafeeeeff,
palevioletred: 0xdb7093ff,
papayawhip: 0xffefd5ff,
peachpuff: 0xffdab9ff,
peru: 0xcd853fff,
pink: 0xffc0cbff,
plum: 0xdda0ddff,
powderblue: 0xb0e0e6ff,
purple: 0x800080ff,
rebeccapurple: 0x663399ff,
red: 0xff0000ff,
rosybrown: 0xbc8f8fff,
royalblue: 0x4169e1ff,
saddlebrown: 0x8b4513ff,
salmon: 0xfa8072ff,
sandybrown: 0xf4a460ff,
seagreen: 0x2e8b57ff,
seashell: 0xfff5eeff,
sienna: 0xa0522dff,
silver: 0xc0c0c0ff,
skyblue: 0x87ceebff,
slateblue: 0x6a5acdff,
slategray: 0x708090ff,
slategrey: 0x708090ff,
snow: 0xfffafaff,
springgreen: 0xff7fff,
steelblue: 0x4682b4ff,
tan: 0xd2b48cff,
teal: 8421631,
thistle: 0xd8bfd8ff,
tomato: 0xff6347ff,
turquoise: 0x40e0d0ff,
violet: 0xee82eeff,
wheat: 0xf5deb3ff,
white: 0xffffffff,
whitesmoke: 0xf5f5f5ff,
yellow: 0xffff00ff,
yellowgreen: 0x9acd32ff
},
T = "[-+]?\\d*\\.?\\d+",
L = T + "%";
function j(...e) {
return "\\(\\s*(" + e.join(")\\s*,\\s*(") + ")\\s*\\)"
}
var U = RegExp("rgb" + j(T, T, T)),
q = RegExp("rgba" + j(T, T, T, T)),
z = RegExp("hsl" + j(T, L, L)),
N = RegExp("hsla" + j(T, L, L, T)),
D = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
$ = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
Q = /^#([0-9a-fA-F]{6})$/,
W = /^#([0-9a-fA-F]{8})$/;
function G(e, t, r) {
return (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6) ? e + (t - e) * 6 * r : r < .5 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e
}
function B(e, t, r) {
let i = r < .5 ? r * (1 + t) : r + t - r * t,
n = 2 * r - i,
s = G(n, i, e + 1 / 3);
return Math.round(255 * s) << 24 | Math.round(255 * G(n, i, e)) << 16 | Math.round(255 * G(n, i, e - 1 / 3)) << 8
}
function H(e) {
let t = parseInt(e, 10);
return t < 0 ? 0 : t > 255 ? 255 : t
}
function Y(e) {
return (parseFloat(e) % 360 + 360) % 360 / 360
}
function J(e) {
let t = parseFloat(e);
return t < 0 ? 0 : t > 1 ? 255 : Math.round(255 * t)
}
function X(e) {
let t = parseFloat(e);
return t < 0 ? 0 : t > 100 ? 1 : t / 100
}
function Z(e) {
let t, r = "number" == typeof e ? e >>> 0 === e && e >= 0 && e <= 0xffffffff ? e : null : (t = Q.exec(e)) ? parseInt(t[1] + "ff", 16) >>> 0 : x && void 0 !== x[e] ? x[e] : (t = U.exec(e)) ? (H(t[1]) << 24 | H(t[2]) << 16 | H(t[3]) << 8 | 255) >>> 0 : (t = q.exec(e)) ? (H(t[1]) << 24 | H(t[2]) << 16 | H(t[3]) << 8 | J(t[4])) >>> 0 : (t = D.exec(e)) ? parseInt(t[1] + t[1] + t[2] + t[2] + t[3] + t[3] + "ff", 16) >>> 0 : (t = W.exec(e)) ? parseInt(t[1], 16) >>> 0 : (t = $.exec(e)) ? parseInt(t[1] + t[1] + t[2] + t[2] + t[3] + t[3] + t[4] + t[4], 16) >>> 0 : (t = z.exec(e)) ? (255 | B(Y(t[1]), X(t[2]), X(t[3]))) >>> 0 : (t = N.exec(e)) ? (B(Y(t[1]), X(t[2]), X(t[3])) | J(t[4])) >>> 0 : null;
if (null === r) return e;
let i = (0xff000000 & (r = r || 0)) >>> 24,
n = (0xff0000 & r) >>> 16,
s = (65280 & r) >>> 8,
a = (255 & r) / 255;
return `rgba(${i}, ${n}, ${s}, ${a})`
}
var K = (e, r, i) => {
if (c.fun(e)) return e;
if (c.arr(e)) return K({
range: e,
output: r,
extrapolate: i
});
if (c.str(e.output[0])) return t(e);
let n = e.output,
s = e.range || [0, 1],
a = e.extrapolateLeft || e.extrapolate || "extend",
o = e.extrapolateRight || e.extrapolate || "extend",
u = e.easing || (e => e);
return t => {
let r = function(e, t) {
for (var r = 1; r < t.length - 1 && !(t[r] >= e); ++r);
return r - 1
}(t, s);
return function(e, t, r, i, n, s, a, o, u) {
let l = u ? u(e) : e;
if (l < t)
if ("identity" === a) return l;
else "clamp" === a && (l = t);
if (l > r)
if ("identity" === o) return l;
else "clamp" === o && (l = r);
return i === n ? i : t === r ? e <= t ? i : n : (t === -1 / 0 ? l = -l : r === 1 / 0 ? l -= t : l = (l - t) / (r - t), l = s(l), i === -1 / 0 ? l = -l : n === 1 / 0 ? l += i : l = l * (n - i) + i, l)
}(t, s[r], s[r + 1], n[r], n[r + 1], u, a, o, e.map)
}
},
ee = 2 * Math.PI / 3,
et = 2 * Math.PI / 4.5,
er = e => e < .36363636363636365 ? 7.5625 * e * e : e < .7272727272727273 ? 7.5625 * (e -= .5454545454545454) * e + .75 : e < .9090909090909091 ? 7.5625 * (e -= .8181818181818182) * e + .9375 : 7.5625 * (e -= .9545454545454546) * e + .984375,
ei = {
linear: e => e,
easeInQuad: e => e * e,
easeOutQuad: e => 1 - (1 - e) * (1 - e),
easeInOutQuad: e => e < .5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2,
easeInCubic: e => e * e * e,
easeOutCubic: e => 1 - Math.pow(1 - e, 3),
easeInOutCubic: e => e < .5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2,
easeInQuart: e => e * e * e * e,
easeOutQuart: e => 1 - Math.pow(1 - e, 4),
easeInOutQuart: e => e < .5 ? 8 * e * e * e * e : 1 - Math.pow(-2 * e + 2, 4) / 2,
easeInQuint: e => e * e * e * e * e,
easeOutQuint: e => 1 - Math.pow(1 - e, 5),
easeInOutQuint: e => e < .5 ? 16 * e * e * e * e * e : 1 - Math.pow(-2 * e + 2, 5) / 2,
easeInSine: e => 1 - Math.cos(e * Math.PI / 2),
easeOutSine: e => Math.sin(e * Math.PI / 2),
easeInOutSine: e => -(Math.cos(Math.PI * e) - 1) / 2,
easeInExpo: e => 0 === e ? 0 : Math.pow(2, 10 * e - 10),
easeOutExpo: e => 1 === e ? 1 : 1 - Math.pow(2, -10 * e),
easeInOutExpo: e => 0 === e ? 0 : 1 === e ? 1 : e < .5 ? Math.pow(2, 20 * e - 10) / 2 : (2 - Math.pow(2, -20 * e + 10)) / 2,
easeInCirc: e => 1 - Math.sqrt(1 - Math.pow(e, 2)),
easeOutCirc: e => Math.sqrt(1 - Math.pow(e - 1, 2)),
easeInOutCirc: e => e < .5 ? (1 - Math.sqrt(1 - Math.pow(2 * e, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * e + 2, 2)) + 1) / 2,
easeInBack: e => 2.70158 * e * e * e - 1.70158 * e * e,
easeOutBack: e => 1 + 2.70158 * Math.pow(e - 1, 3) + 1.70158 * Math.pow(e - 1, 2),
easeInOutBack: e => e < .5 ? Math.pow(2 * e, 2) * (7.189819 * e - 2.5949095) / 2 : (Math.pow(2 * e - 2, 2) * (3.5949095 * (2 * e - 2) + 2.5949095) + 2) / 2,
easeInElastic: e => 0 === e ? 0 : 1 === e ? 1 : -Math.pow(2, 10 * e - 10) * Math.sin((10 * e - 10.75) * ee),
easeOutElastic: e => 0 === e ? 0 : 1 === e ? 1 : Math.pow(2, -10 * e) * Math.sin((10 * e - .75) * ee) + 1,
easeInOutElastic: e => 0 === e ? 0 : 1 === e ? 1 : e < .5 ? -(Math.pow(2, 20 * e - 10) * Math.sin((20 * e - 11.125) * et)) / 2 : Math.pow(2, -20 * e + 10) * Math.sin((20 * e - 11.125) * et) / 2 + 1,
easeInBounce: e => 1 - er(1 - e),
easeOutBounce: er,
easeInOutBounce: e => e < .5 ? (1 - er(1 - 2 * e)) / 2 : (1 + er(2 * e - 1)) / 2,
steps: (e, t = "end") => r => {
let i = (r = "end" === t ? Math.min(r, .999) : Math.max(r, .001)) * e;
return F(0, 1, ("end" === t ? Math.floor(i) : Math.ceil(i)) / e)
}
},
en = Symbol.for("FluidValue.get"),
es = Symbol.for("FluidValue.observers"),
ea = e => !!(e && e[en]),
eo = e => e && e[en] ? e[en]() : e,
eu = e => e[es] || null;
function el(e, t) {
e.eventObserved ? e.eventObserved(t) : e(t)
}
function ef(e, t) {
let r = e[es];
r && r.forEach(e => {
el(e, t)
})
}
var ed = class {
constructor(e) {
if (!e && !(e = this.get)) throw Error("Unknown getter");
ec(this, e)
}
},
ec = (e, t) => em(e, en, t);
function eh(e, t) {
if (e[en]) {
let r = e[es];
r || em(e, es, r = new Set), !r.has(t) && (r.add(t), e.observerAdded && e.observerAdded(r.size, t))
}
return t
}
function ep(e, t) {
let r = e[es];
if (r && r.has(t)) {
let i = r.size - 1;
i ? r.delete(t) : e[es] = null, e.observerRemoved && e.observerRemoved(i, t)
}
}
var em = (e, t, r) => Object.defineProperty(e, t, {
value: r,
writable: !0,
configurable: !0
}),
eg = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
ev = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,
ey = RegExp(`(${eg.source})(%|[a-z]+)`, "i"),
eb = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,
ex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,
ew = e => {
let [t, r] = e_(e);
if (!t || b()) return e;
let i = window.getComputedStyle(document.documentElement).getPropertyValue(t);
if (i) return i.trim();
if (r && r.startsWith("--")) {
let e = window.getComputedStyle(document.documentElement).getPropertyValue(r);
if (e) return e
} else if (r && ex.test(r)) return ew(r);
else if (r) return r;
return e
},
e_ = e => {
let t = ex.exec(e);
if (!t) return [, ];
let [, r, i] = t;
return [r, i]
},
eE = (e, t, r, i, n) => `rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(i)}, ${n})`,
eS = e => {
i || (i = x ? RegExp(`(${Object.keys(x).join("|")})(?!\\w)`, "g") : /^\b$/);
let t = e.output.map(e => eo(e).replace(ex, ew).replace(ev, Z).replace(i, Z)),
r = t.map(e => e.match(eg).map(Number)),
n = r[0].map((e, t) => r.map(e => {
if (!(t in e)) throw Error('The arity of each "output" value must be equal');
return e[t]
})).map(t => K({
...e,
output: t
}));
return e => {
let r = !ey.test(t[0]) && t.find(e => ey.test(e))?.replace(eg, ""),
i = 0;
return t[0].replace(eg, () => `${n[i++](e)}${r||""}`).replace(eb, eE)
}
},
eO = "react-spring: ",
eA = e => {
let t = !1;
if ("function" != typeof e) throw TypeError(`${eO}once requires a function parameter`);
return (...r) => {
t || (e(...r), t = !0)
}
},
eI = eA(console.warn);
function ek() {
eI(`${eO}The "interpolate" function is deprecated in v9 (use "to" instead)`)
}
var eP = eA(console.warn);
function eR() {
eP(`${eO}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)
}
function eC(e) {
return c.str(e) && ("#" == e[0] || /\d/.test(e) || !b() && ex.test(e) || e in (x || {}))
}
var eV = new WeakMap,
eF = e => e.forEach(({
target: e,
contentRect: t
}) => eV.get(e)?.forEach(e => e(t))),
eM = new Set,
eT = (e, {
container: t = document.documentElement
} = {}) => t === document.documentElement ? (e => (eM.add(e), s || (s = (() => {
let e = () => {
eM.forEach(e => e({
width: window.innerWidth,
height: window.innerHeight
}))
};
return window.addEventListener("resize", e), () => {
window.removeEventListener("resize", e)
}
})()), () => {
eM.delete(e), !eM.size && s && (s(), s = void 0)
}))(e) : function(e, t) {
n || "undefined" == typeof ResizeObserver || (n = new ResizeObserver(eF));
let r = eV.get(t);
return r || (r = new Set, eV.set(t, r)), r.add(e), n && n.observe(t), () => {
let r = eV.get(t);
r && (r.delete(e), !r.size && n && n.unobserve(t))
}
}(e, t),
eL = {
x: {
length: "Width",
position: "Left"
},
y: {
length: "Height",
position: "Top"
}
},
ej = class {
constructor(e, t) {
this.createAxis = () => ({
current: 0,
progress: 0,
scrollLength: 0
}), this.updateAxis = e => {
let t = this.info[e],
{
length: r,
position: i
} = eL[e];
t.current = this.container[`scroll${i}`], t.scrollLength = this.container[`scroll${r}`] - this.container[`client${r}`], t.progress = ((e, t, r) => t - e == 0 ? 1 : (r - e) / (t - e))(0, t.scrollLength, t.current)
}, this.update = () => {
this.updateAxis("x"), this.updateAxis("y")
}, this.sendEvent = () => {
this.callback(this.info)
}, this.advance = () => {
this.update(), this.sendEvent()
}, this.callback = e, this.container = t, this.info = {
time: 0,
x: this.createAxis(),
y: this.createAxis()
}
}
},
eU = new WeakMap,
eq = new WeakMap,
ez = new WeakMap,
eN = e => e === document.documentElement ? window : e,
eD = (e, {
container: t = document.documentElement
} = {}) => {
let r = ez.get(t);
r || (r = new Set, ez.set(t, r));
let i = new ej(e, t);
if (r.add(i), !eU.has(t)) {
let e = () => (r?.forEach(e => e.advance()), !0);
eU.set(t, e);
let i = eN(t);
window.addEventListener("resize", e, {
passive: !0
}), t !== document.documentElement && eq.set(t, eT(e, {
container: t
})), i.addEventListener("scroll", e, {
passive: !0
})
}
let n = eU.get(t);
return (0, a.raf)(n), () => {
a.raf.cancel(n);
let e = ez.get(t);
if (!e || (e.delete(i), e.size)) return;
let r = eU.get(t);
eU.delete(t), r && (eN(t).removeEventListener("scroll", r), window.removeEventListener("resize", r), eq.get(t)?.())
}
};
function e$(e) {
let t = (0, o.useRef)(null);
return null === t.current && (t.current = e()), t.current
}
var eQ = b() ? o.useEffect : o.useLayoutEffect;
function eW() {
let e = (0, o.useState)()[1],
t = (() => {
let e = (0, o.useRef)(!1);
return eQ(() => (e.current = !0, () => {
e.current = !1
}), []), e
})();
return () => {
t.current && e(Math.random())
}
}
function eG(e, t) {
let [r] = (0, o.useState)(() => ({
inputs: t,
result: e()
})), i = (0, o.useRef)(), n = i.current, s = n;
return s ? t && s.inputs && function(e, t) {
if (e.length !== t.length) return !1;
for (let r = 0; r < e.length; r++)
if (e[r] !== t[r]) return !1;
return !0
}(t, s.inputs) || (s = {
inputs: t,
result: e()
}) : s = r, (0, o.useEffect)(() => {
i.current = s, n == r && (r.inputs = r.result = void 0)
}, [s]), s.result
}
var eB = e => (0, o.useEffect)(e, eH),
eH = [];
function eY(e) {
let t = (0, o.useRef)();
return (0, o.useEffect)(() => {
t.current = e
}), t.current
}
var eJ = () => {
let [e, t] = (0, o.useState)(null);
return eQ(() => {
let e = window.matchMedia("(prefers-reduced-motion)"),
r = e => {
t(e.matches), E({
skipAnimation: e.matches
})
};
return r(e), e.addEventListener ? e.addEventListener("change", r) : e.addListener(r), () => {
e.removeEventListener ? e.removeEventListener("change", r) : e.removeListener(r)
}
}, []), e
}
},
204317: e => {
"use strict";
e.s({}), e.i(317449), e.i(378469), e.i(530056)
},
241377: e => {
"use strict";
e.s({
AnimatedObject: () => c,
AnimatedString: () => f,
AnimatedValue: () => l,
createHost: () => b,
getAnimated: () => s,
getAnimatedType: () => m,
getPayload: () => o,
setAnimated: () => a
}), e.i(204317);
var t = e.i(530056),
r = e.i(378469),
i = e.i(317449),
n = Symbol.for("Animated:node"),
s = e => e && e[n],
a = (e, r) => (0, t.defineHidden)(e, n, r),
o = e => e && e[n] && e[n].getPayload(),
u = class {
constructor() {
a(this, this)
}
getPayload() {
return this.payload || []
}
},
l = class extends u {
constructor(e) {
super(), this._value = e, this.done = !0, this.durationProgress = 0, t.is.num(this._value) && (this.lastPosition = this._value)
}
static create(e) {
return new l(e)
}
getPayload() {
return [this]
}
getValue() {
return this._value
}
setValue(e, r) {
return t.is.num(e) && (this.lastPosition = e, r && (e = Math.round(e / r) * r, this.done && (this.lastPosition = e))), this._value !== e && (this._value = e, !0)
}
reset() {
let {
done: e
} = this;
this.done = !1, t.is.num(this._value) && (this.elapsedTime = 0, this.durationProgress = 0, this.lastPosition = this._value, e && (this.lastVelocity = null), this.v0 = null)
}
},
f = class extends l {
constructor(e) {
super(0), this._string = null, this._toString = (0, t.createInterpolator)({
output: [e, e]
})
}
static create(e) {
return new f(e)
}
getValue() {
let e = this._string;
return null == e ? this._string = this._toString(this._value) : e
}
setValue(e) {
if (t.is.str(e)) {
if (e == this._string) return !1;
this._string = e, this._value = 1
} else {
if (!super.setValue(e)) return !1;
this._string = null
}
return !0
}
reset(e) {
e && (this._toString = (0, t.createInterpolator)({
output: [this.getValue(), e]
})), this._value = 0, super.reset()
}
},
d = {
dependencies: null
},
c = class extends u {
constructor(e) {
super(), this.source = e, this.setValue(e)
}
getValue(e) {
let r = {};
return (0, t.eachProp)(this.source, (i, s) => {
i && i[n] === i ? r[s] = i.getValue(e) : (0, t.hasFluidValue)(i) ? r[s] = (0, t.getFluidValue)(i) : e || (r[s] = i)
}), r
}
setValue(e) {
this.source = e, this.payload = this._makePayload(e)
}
reset() {
this.payload && (0, t.each)(this.payload, e => e.reset())
}
_makePayload(e) {
if (e) {
let r = new Set;
return (0, t.eachProp)(e, this._addToPayload, r), Array.from(r)
}
}
_addToPayload(e) {
d.dependencies && (0, t.hasFluidValue)(e) && d.dependencies.add(e);
let r = o(e);
r && (0, t.each)(r, e => this.add(e))
}
},
h = class extends c {
constructor(e) {
super(e)
}
static create(e) {
return new h(e)
}
getValue() {
return this.source.map(e => e.getValue())
}
setValue(e) {
let t = this.getPayload();
return e.length == t.length ? t.map((t, r) => t.setValue(e[r])).some(Boolean) : (super.setValue(e.map(p)), !0)
}
};
function p(e) {
return ((0, t.isAnimatedString)(e) ? f : l).create(e)
}
function m(e) {
let r = s(e);
return r ? r.constructor : t.is.arr(e) ? h : (0, t.isAnimatedString)(e) ? f : l
}
var g = (e, n) => {
let s = !t.is.fun(e) || e.prototype && e.prototype.isReactComponent;
return (0, r.forwardRef)((a, o) => {
let u = (0, r.useRef)(null),
l = s && (0, r.useCallback)(e => {
u.current = function(e, r) {
return e && (t.is.fun(e) ? e(r) : e.current = r), r
}(o, e)
}, [o]),
[f, h] = function(e, t) {
let r = new Set;
return d.dependencies = r, e.style && (e = {
...e,
style: t.createAnimatedStyle(e.style)
}), e = new c(e), d.dependencies = null, [e, r]
}(a, n),
p = (0, t.useForceUpdate)(),
m = () => {
let e = u.current;
(!s || e) && !1 === (!!e && n.applyAnimatedValues(e, f.getValue(!0))) && p()
},
g = new v(m, h),
y = (0, r.useRef)();
(0, t.useIsomorphicLayoutEffect)(() => (y.current = g, (0, t.each)(h, e => (0, t.addFluidObserver)(e, g)), () => {
y.current && ((0, t.each)(y.current.deps, e => (0, t.removeFluidObserver)(e, y.current)), i.raf.cancel(y.current.update))
})), (0, r.useEffect)(m, []), (0, t.useOnce)(() => () => {
let e = y.current;
(0, t.each)(e.deps, r => (0, t.removeFluidObserver)(r, e))
});
let b = n.getComponentProps(f.getValue());
return (0, r.createElement)(e, {
...b,
ref: l
})
})
},
v = class {
constructor(e, t) {
this.update = e, this.deps = t
}
eventObserved(e) {
"change" == e.type && i.raf.write(this.update)
}
},
y = Symbol.for("AnimatedComponent"),
b = (e, {
applyAnimatedValues: r = () => !1,
createAnimatedStyle: i = e => new c(e),
getComponentProps: n = e => e
} = {}) => {
let s = {
applyAnimatedValues: r,
createAnimatedStyle: i,
getComponentProps: n
},
a = e => {
let r = x(e) || "Anonymous";
return (e = t.is.str(e) ? a[e] || (a[e] = g(e, s)) : e[y] || (e[y] = g(e, s))).displayName = `Animated(${r})`, e
};
return (0, t.eachProp)(e, (r, i) => {
t.is.arr(e) && (i = x(r)), a[i] = a(r)
}), {
animated: a
}
},
x = e => t.is.str(e) ? e : e && t.is.str(e.displayName) ? e.displayName : t.is.fun(e) && e.name || null
},
730445: e => {
"use strict";
e.s({})
},
328871: e => {
"use strict";
e.s({
BailSignal: () => F,
Controller: () => K,
FrameValue: () => L,
Interpolation: () => eO,
Spring: () => e_,
SpringContext: () => eo,
SpringRef: () => el,
SpringValue: () => $,
Trail: () => eE,
Transition: () => eS,
config: () => x,
inferTo: () => h,
interpolate: () => eR,
to: () => eP,
update: () => eC,
useChain: () => b,
useInView: () => ew,
useResize: () => eb,
useScroll: () => ey,
useSpring: () => ed,
useSpringRef: () => eh,
useSpringValue: () => ep,
useSprings: () => ef,
useTrail: () => em,
useTransition: () => eg
}), e.i(204317);
var t = e.i(530056),
r = e.i(378469),
i = e.i(317449),
n = e.i(241377);
function s(e, ...r) {
return t.is.fun(e) ? e(...r) : e
}
e.i(730445);
var a = (e, r) => !0 === e || !!(r && e && (t.is.fun(e) ? e(r) : (0, t.toArray)(e).includes(r))),
o = (e, r) => t.is.obj(e) ? r && e[r] : e,
u = (e, t) => !0 === e.default ? e[t] : e.default ? e.default[t] : void 0,
l = e => e,
f = (e, r = l) => {
let i = d;
e.default && !0 !== e.default && (i = Object.keys(e = e.default));
let n = {};
for (let s of i) {
let i = r(e[s], s);
t.is.und(i) || (n[s] = i)
}
return n
},
d = ["config", "onProps", "onStart", "onChange", "onPause", "onResume", "onRest"],
c = {
config: 1,
from: 1,
to: 1,
ref: 1,
loop: 1,
reset: 1,
pause: 1,
cancel: 1,
reverse: 1,
immediate: 1,
default: 1,
delay: 1,
onProps: 1,
onStart: 1,
onChange: 1,
onPause: 1,
onResume: 1,
onRest: 1,
onResolve: 1,
items: 1,
trail: 1,
sort: 1,
expires: 1,
initial: 1,
enter: 1,
update: 1,
leave: 1,
children: 1,
onDestroyed: 1,
keys: 1,
callId: 1,
parentId: 1
};
function h(e) {
let r = function(e) {
let r = {},
i = 0;
if ((0, t.eachProp)(e, (e, t) => {
!c[t] && (r[t] = e, i++)
}), i) return r
}(e);
if (r) {
let i = {
to: r
};
return (0, t.eachProp)(e, (e, t) => t in r || (i[t] = e)), i
}
return {
...e
}
}
function p(e) {
return e = (0, t.getFluidValue)(e), t.is.arr(e) ? e.map(p) : (0, t.isAnimatedString)(e) ? t.Globals.createStringInterpolator({
range: [0, 1],
output: [e, e]
})(1) : e
}
function m(e) {
for (let t in e) return !0;
return !1
}
function g(e) {
return t.is.fun(e) || t.is.arr(e) && t.is.obj(e[0])
}
function v(e, t) {
e.ref?.delete(e), t?.delete(e)
}
function y(e, t) {
t && e.ref !== t && (e.ref?.delete(e), t.add(e), e.ref = t)
}
function b(e, r, i = 1e3) {
(0, t.useIsomorphicLayoutEffect)(() => {
if (r) {
let n = 0;
(0, t.each)(e, (e, a) => {
let o = e.current;
if (o.length) {
let u = i * r[a];
isNaN(u) ? u = n : n = u, (0, t.each)(o, e => {
(0, t.each)(e.queue, e => {
let t = e.delay;
e.delay = e => u + s(t || 0, e)
})
}), e.start()
}
})
} else {
let r = Promise.resolve();
(0, t.each)(e, e => {
let i = e.current;
if (i.length) {
let n = i.map(e => {
let t = e.queue;
return e.queue = [], t
});
r = r.then(() => ((0, t.each)(i, (e, r) => (0, t.each)(n[r] || [], t => e.queue.push(t))), Promise.all(e.start())))
}
})
}
})
}
var x = {
default: {
tension: 170,
friction: 26
},
gentle: {
tension: 120,
friction: 14
},
wobbly: {
tension: 180,
friction: 12
},
stiff: {
tension: 210,
friction: 20
},
slow: {
tension: 280,
friction: 60
},
molasses: {
tension: 280,
friction: 120
}
},
w = {
...x.default,
mass: 1,
damping: 1,
easing: t.easings.linear,
clamp: !1
},
_ = class {
constructor() {
this.velocity = 0, Object.assign(this, w)
}
};
function E(e, r) {
if (t.is.und(r.decay)) {
let i = !t.is.und(r.tension) || !t.is.und(r.friction);
!i && t.is.und(r.frequency) && t.is.und(r.damping) && t.is.und(r.mass) || (e.duration = void 0, e.decay = void 0), i && (e.frequency = void 0)
} else e.duration = void 0
}
var S = [],
O = class {
constructor() {
this.changed = !1, this.values = S, this.toValues = null, this.fromValues = S, this.config = new _, this.immediate = !1
}
};
function A(e, {
key: r,
props: n,
defaultProps: o,
state: u,
actions: l
}) {
return new Promise((f, d) => {
let c, h, p = a(n.cancel ?? o?.cancel, r);
if (p) v();
else {
t.is.und(n.pause) || (u.paused = a(n.pause, r));
let e = o?.pause;
!0 !== e && (e = u.paused || a(e, r)), c = s(n.delay || 0, r), e ? (u.resumeQueue.add(g), l.pause()) : (l.resume(), g())
}
function m() {
u.resumeQueue.add(g), u.timeouts.delete(h), h.cancel(), c = h.time - i.raf.now()
}
function g() {
c > 0 && !t.Globals.skipAnimation ? (u.delayed = !0, h = i.raf.setTimeout(v, c), u.pauseQueue.add(m), u.timeouts.add(h)) : v()
}
function v() {
u.delayed && (u.delayed = !1), u.pauseQueue.delete(m), u.timeouts.delete(h), e <= (u.cancelId || 0) && (p = !0);
try {
l.start({
...n,
callId: e,
cancel: p
}, f)
} catch (e) {
d(e)
}
}
})
}
var I = (e, t) => 1 == t.length ? t[0] : t.some(e => e.cancelled) ? R(e.get()) : t.every(e => e.noop) ? k(e.get()) : P(e.get(), t.every(e => e.finished)),
k = e => ({
value: e,
noop: !0,
finished: !0,
cancelled: !1
}),
P = (e, t, r = !1) => ({
value: e,
finished: t,
cancelled: r
}),
R = e => ({
value: e,
cancelled: !0,
finished: !1
});
function C(e, r, n, s) {
let {
callId: a,
parentId: o,
onRest: u
} = r, {
asyncTo: l,
promise: d
} = n;
return o || e !== l || r.reset ? n.promise = (async () => {
let c, h, p;
n.asyncId = a, n.asyncTo = e;
let m = f(r, (e, t) => "onRest" === t ? void 0 : e),
g = new Promise((e, t) => (c = e, h = t)),
v = e => {
let t = a <= (n.cancelId || 0) && R(s) || a !== n.asyncId && P(s, !1);
if (t) throw e.result = t, h(e), e
},
y = (e, r) => {
let i = new F,
o = new M;
return (async () => {
if (t.Globals.skipAnimation) throw V(n), o.result = P(s, !1), h(o), o;
v(i);
let u = t.is.obj(e) ? {
...e
} : {
...r,
to: e
};
u.parentId = a, (0, t.eachProp)(m, (e, r) => {
t.is.und(u[r]) && (u[r] = e)
});
let l = await s.start(u);
return v(i), n.paused && await new Promise(e => {
n.resumeQueue.add(e)
}), l
})()
};
if (t.Globals.skipAnimation) return V(n), P(s, !1);
try {
let r;
r = t.is.arr(e) ? (async e => {
for (let t of e) await y(t)
})(e) : Promise.resolve(e(y, s.stop.bind(s))), await Promise.all([r.then(c), g]), p = P(s.get(), !0, !1)
} catch (e) {
if (e instanceof F) p = e.result;
else if (e instanceof M) p = e.result;
else throw e
} finally {
a == n.asyncId && (n.asyncId = o, n.asyncTo = o ? l : void 0, n.promise = o ? d : void 0)
}
return t.is.fun(u) && i.raf.batchedUpdates(() => {
u(p, s, s.item)
}), p
})() : d
}
function V(e, r) {
(0, t.flush)(e.timeouts, e => e.cancel()), e.pauseQueue.clear(), e.resumeQueue.clear(), e.asyncId = e.asyncTo = e.promise = void 0, r && (e.cancelId = r)
}
var F = class extends Error {
constructor() {
super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")
}
},
M = class extends Error {
constructor() {
super("SkipAnimationSignal")
}
},
T = 1,
L = class extends t.FluidValue {
constructor() {
super(...arguments), this.id = T++, this._priority = 0
}
get priority() {
return this._priority
}
set priority(e) {
this._priority != e && (this._priority = e, this._onPriorityChange(e))
}
get() {
let e = (0, n.getAnimated)(this);
return e && e.getValue()
}
to(...e) {
return t.Globals.to(this, e)
}
interpolate(...e) {
return (0, t.deprecateInterpolate)(), t.Globals.to(this, e)
}
toJSON() {
return this.get()
}
observerAdded(e) {
1 == e && this._attach()
}
observerRemoved(e) {
0 == e && this._detach()
}
_attach() {}
_detach() {}
_onChange(e, r = !1) {
(0, t.callFluidObservers)(this, {
type: "change",
parent: this,
value: e,
idle: r
})
}
_onPriorityChange(e) {
this.idle || t.frameLoop.sort(this), (0, t.callFluidObservers)(this, {
type: "priority",
parent: this,
priority: e
})
}
},
j = Symbol.for("SpringPhase"),
U = e => (1 & e[j]) > 0,
q = e => (2 & e[j]) > 0,
z = e => (4 & e[j]) > 0,
N = (e, t) => t ? e[j] |= 3 : e[j] &= -3,
D = (e, t) => t ? e[j] |= 4 : e[j] &= -5,
$ = class extends L {
constructor(e, r) {
if (super(), this.animation = new O, this.defaultProps = {}, this._state = {
paused: !1,
delayed: !1,
pauseQueue: new Set,
resumeQueue: new Set,
timeouts: new Set
}, this._pendingCalls = new Set, this._lastCallId = 0, this._lastToId = 0, this._memoizedDuration = 0, !t.is.und(e) || !t.is.und(r)) {
let i = t.is.obj(e) ? {
...e
} : {
...r,
from: e
};
t.is.und(i.default) && (i.default = !0), this.start(i)
}
}
get idle() {
return !(q(this) || this._state.asyncTo) || z(this)
}
get goal() {
return (0, t.getFluidValue)(this.animation.to)
}
get velocity() {
let e = (0, n.getAnimated)(this);
return e instanceof n.AnimatedValue ? e.lastVelocity || 0 : e.getPayload().map(e => e.lastVelocity || 0)
}
get hasAnimated() {
return U(this)
}
get isAnimating() {
return q(this)
}
get isPaused() {
return z(this)
}
get isDelayed() {
return this._state.delayed
}
advance(e) {
let r = !0,
i = !1,
s = this.animation,
{
toValues: a
} = s,
{
config: o
} = s,
u = (0, n.getPayload)(s.to);
!u && (0, t.hasFluidValue)(s.to) && (a = (0, t.toArray)((0, t.getFluidValue)(s.to))), s.values.forEach((l, f) => {
if (l.done) return;
let d = l.constructor == n.AnimatedString ? 1 : u ? u[f].lastPosition : a[f],
c = s.immediate,
h = d;
if (!c) {
let r;
if (h = l.lastPosition, o.tension <= 0) {
l.done = !0;
return
}
let i = l.elapsedTime += e,
n = s.fromValues[f],
a = null != l.v0 ? l.v0 : l.v0 = t.is.arr(o.velocity) ? o.velocity[f] : o.velocity,
u = o.precision || (n == d ? .005 : Math.min(1, .001 * Math.abs(d - n)));
if (t.is.und(o.duration))
if (o.decay) {
let e = !0 === o.decay ? .998 : o.decay,
t = Math.exp(-(1 - e) * i);
h = n + a / (1 - e) * (1 - t), c = Math.abs(l.lastPosition - h) <= u, r = a * t
} else {
r = null == l.lastVelocity ? a : l.lastVelocity;
let i = o.restVelocity || u / 10,
s = o.clamp ? 0 : o.bounce,
f = !t.is.und(s),
p = n == d ? l.v0 > 0 : n < d,
m = Math.ceil(e / 1);
for (let e = 0; e < m && !(!(Math.abs(r) > i) && (c = Math.abs(d - h) <= u)); ++e) {
f && (h == d || h > d == p) && (r = -r * s, h = d);
let e = (-(1e-6 * o.tension) * (h - d) + -(.001 * o.friction) * r) / o.mass;
r += +e, h += +r
}
}
else {
let t = 1;
o.duration > 0 && (this._memoizedDuration !== o.duration && (this._memoizedDuration = o.duration, l.durationProgress > 0 && (l.elapsedTime = o.duration * l.durationProgress, i = l.elapsedTime += e)), l.durationProgress = t = (t = (o.progress || 0) + i / this._memoizedDuration) > 1 ? 1 : t < 0 ? 0 : t), r = ((h = n + o.easing(t) * (d - n)) - l.lastPosition) / e, c = 1 == t
}
l.lastVelocity = r, Number.isNaN(h) && (console.warn("Got NaN while animating:", this), c = !0)
}
u && !u[f].done && (c = !1), c ? l.done = !0 : r = !1, l.setValue(h, o.round) && (i = !0)
});
let l = (0, n.getAnimated)(this),
f = l.getValue();
if (r) {
let e = (0, t.getFluidValue)(s.to);
(f !== e || i) && !o.decay ? (l.setValue(e), this._onChange(e)) : i && o.decay && this._onChange(f), this._stop()
} else i && this._onChange(f)
}
set(e) {
return i.raf.batchedUpdates(() => {
this._stop(), this._focus(e), this._set(e)
}), this
}
pause() {
this._update({
pause: !0
})
}
resume() {
this._update({
pause: !1
})
}
finish() {
if (q(this)) {
let {
to: e,
config: t
} = this.animation;
i.raf.batchedUpdates(() => {
this._onStart(), t.decay || this._set(e, !1), this._stop()
})
}
return this
}
update(e) {
return (this.queue || (this.queue = [])).push(e), this
}
start(e, r) {
let i;
return t.is.und(e) ? (i = this.queue || [], this.queue = []) : i = [t.is.obj(e) ? e : {
...r,
to: e
}], Promise.all(i.map(e => this._update(e))).then(e => I(this, e))
}
stop(e) {
let {
to: t
} = this.animation;
return this._focus(this.get()), V(this._state, e && this._lastCallId), i.raf.batchedUpdates(() => this._stop(t, e)), this
}
reset() {
this._update({
reset: !0
})
}
eventObserved(e) {
"change" == e.type ? this._start() : "priority" == e.type && (this.priority = e.priority + 1)
}
_prepareNode(e) {
let r = this.key || "",
{
to: i,
from: s
} = e;
(null == (i = t.is.obj(i) ? i[r] : i) || g(i)) && (i = void 0), null == (s = t.is.obj(s) ? s[r] : s) && (s = void 0);
let a = {
to: i,
from: s
};
return !U(this) && (e.reverse && ([i, s] = [s, i]), s = (0, t.getFluidValue)(s), t.is.und(s) ? (0, n.getAnimated)(this) || this._set(i) : this._set(s)), a
}
_update({
...e
}, r) {
let {
key: i,
defaultProps: n
} = this;
e.default && Object.assign(n, f(e, (e, t) => /^on/.test(t) ? o(e, i) : e)), Y(this, e, "onProps"), J(this, "onProps", e, this);
let s = this._prepareNode(e);
if (Object.isFrozen(this)) throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");
let a = this._state;
return A(++this._lastCallId, {
key: i,
props: e,
defaultProps: n,
state: a,
actions: {
pause: () => {
z(this) || (D(this, !0), (0, t.flushCalls)(a.pauseQueue), J(this, "onPause", P(this, Q(this, this.animation.to)), this))
},
resume: () => {
z(this) && (D(this, !1), q(this) && this._resume(), (0, t.flushCalls)(a.resumeQueue), J(this, "onResume", P(this, Q(this, this.animation.to)), this))
},
start: this._merge.bind(this, s)
}
}).then(t => {
if (e.loop && t.finished && !(r && t.noop)) {
let t = W(e);
if (t) return this._update(t, !0)
}
return t
})
}
_merge(e, r, o) {
if (r.cancel) return this.stop(!0), o(R(this));
let u = !t.is.und(e.to),
l = !t.is.und(e.from);
if (u || l)
if (!(r.callId > this._lastToId)) return o(R(this));
else this._lastToId = r.callId;
let {
key: f,
defaultProps: d,
animation: c
} = this, {
to: h,
from: m
} = c, {
to: v = h,
from: y = m
} = e;
l && !u && (!r.default || t.is.und(v)) && (v = y), r.reverse && ([v, y] = [y, v]);
let b = !(0, t.isEqual)(y, m);
b && (c.from = y), y = (0, t.getFluidValue)(y);
let x = !(0, t.isEqual)(v, h);
x && this._focus(v);
let _ = g(r.to),
{
config: S
} = c,
{
decay: O,
velocity: A
} = S;
(u || l) && (S.velocity = 0), r.config && !_ && function(e, r, i) {
for (let t in i && (E(i = {
...i
}, r), r = {
...i,
...r
}), E(e, r), Object.assign(e, r), w) null == e[t] && (e[t] = w[t]);
let {
frequency: n,
damping: s
} = e, {
mass: a
} = e;
t.is.und(n) || (n < .01 && (n = .01), s < 0 && (s = 0), e.tension = Math.pow(2 * Math.PI / n, 2) * a, e.friction = 4 * Math.PI * s * a / n)
}(S, s(r.config, f), r.config !== d.config ? s(d.config, f) : void 0);
let I = (0, n.getAnimated)(this);
if (!I || t.is.und(v)) return o(P(this, !0));
let V = t.is.und(r.reset) ? l && !r.default : !t.is.und(y) && a(r.reset, f),
F = V ? y : this.get(),
M = p(v),
T = t.is.num(M) || t.is.arr(M) || (0, t.isAnimatedString)(M),
L = !_ && (!T || a(d.immediate || r.immediate, f));
if (x) {
let e = (0, n.getAnimatedType)(v);
if (e !== I.constructor)
if (L) I = this._set(M);
else throw Error(`Cannot animate between ${I.constructor.name} and ${e.name}, as the "to" prop suggests`)
}
let j = I.constructor,
z = (0, t.hasFluidValue)(v),
N = !1;
if (!z) {
let e = V || !U(this) && b;
(x || e) && (z = !(N = (0, t.isEqual)(p(F), M))), ((0, t.isEqual)(c.immediate, L) || L) && (0, t.isEqual)(S.decay, O) && (0, t.isEqual)(S.velocity, A) || (z = !0)
}
if (N && q(this) && (c.changed && !V ? z = !0 : z || this._stop(h)), !_ && ((z || (0, t.hasFluidValue)(h)) && (c.values = I.getPayload(), c.toValues = (0, t.hasFluidValue)(v) ? null : j == n.AnimatedString ? [1] : (0, t.toArray)(M)), c.immediate != L && (c.immediate = L, L || V || this._set(h)), z)) {
let {
onRest: e
} = c;
(0, t.each)(H, e => Y(this, r, e));
let n = P(this, Q(this, h));
(0, t.flushCalls)(this._pendingCalls, n), this._pendingCalls.add(o), c.changed && i.raf.batchedUpdates(() => {
c.changed = !V, e?.(n, this), V ? s(d.onRest, n) : c.onStart?.(n, this)
})
}
V && this._set(F), _ ? o(C(r.to, r, this._state, this)) : z ? this._start() : q(this) && !x ? this._pendingCalls.add(o) : o(k(F))
}
_focus(e) {
let r = this.animation;
e !== r.to && ((0, t.getFluidObservers)(this) && this._detach(), r.to = e, (0, t.getFluidObservers)(this) && this._attach())
}
_attach() {
let e = 0,
{
to: r
} = this.animation;
(0, t.hasFluidValue)(r) && ((0, t.addFluidObserver)(r, this), r instanceof L && (e = r.priority + 1)), this.priority = e
}
_detach() {
let {
to: e
} = this.animation;
(0, t.hasFluidValue)(e) && (0, t.removeFluidObserver)(e, this)
}
_set(e, r = !0) {
let s = (0, t.getFluidValue)(e);
if (!t.is.und(s)) {
let e = (0, n.getAnimated)(this);
if (!e || !(0, t.isEqual)(s, e.getValue())) {
let t = (0, n.getAnimatedType)(s);
e && e.constructor == t ? e.setValue(s) : (0, n.setAnimated)(this, t.create(s)), e && i.raf.batchedUpdates(() => {
this._onChange(s, r)
})
}
}
return (0, n.getAnimated)(this)
}
_onStart() {
let e = this.animation;
e.changed || (e.changed = !0, J(this, "onStart", P(this, Q(this, e.to)), this))
}
_onChange(e, t) {
t || (this._onStart(), s(this.animation.onChange, e, this)), s(this.defaultProps.onChange, e, this), super._onChange(e, t)
}
_start() {
let e = this.animation;
(0, n.getAnimated)(this).reset((0, t.getFluidValue)(e.to)), e.immediate || (e.fromValues = e.values.map(e => e.lastPosition)), !q(this) && (N(this, !0), z(this) || this._resume())
}
_resume() {
t.Globals.skipAnimation ? this.finish() : t.frameLoop.start(this)
}
_stop(e, r) {
if (q(this)) {
N(this, !1);
let i = this.animation;
(0, t.each)(i.values, e => {
e.done = !0
}), i.toValues && (i.onChange = i.onPause = i.onResume = void 0), (0, t.callFluidObservers)(this, {
type: "idle",
parent: this
});
let n = r ? R(this.get()) : P(this.get(), Q(this, e ?? i.to));
(0, t.flushCalls)(this._pendingCalls, n), i.changed && (i.changed = !1, J(this, "onRest", n, this))
}
}
};
function Q(e, r) {
let i = p(r),
n = p(e.get());
return (0, t.isEqual)(n, i)
}
function W(e, t = e.loop, r = e.to) {
let i = s(t);
if (i) {
let n = !0 !== i && h(i),
s = (n || e).reverse,
a = !n || n.reset;
return G({
...e,
loop: t,
default: !1,
pause: void 0,
to: !s || g(r) ? r : void 0,
from: a ? e.from : void 0,
reset: a,
...n
})
}
}
function G(e) {
let {
to: r,
from: i
} = e = h(e), n = new Set;
return t.is.obj(r) && B(r, n), t.is.obj(i) && B(i, n), e.keys = n.size ? Array.from(n) : null, e
}
function B(e, r) {
(0, t.eachProp)(e, (e, t) => null != e && r.add(t))
}
var H = ["onStart", "onRest", "onChange", "onPause", "onResume"];
function Y(e, t, r) {
e.animation[r] = t[r] !== u(t, r) ? o(t[r], e.key) : void 0
}
function J(e, t, ...r) {
e.animation[t]?.(...r), e.defaultProps[t]?.(...r)
}
var X = ["onStart", "onChange", "onRest"],
Z = 1,
K = class {
constructor(e, t) {
this.id = Z++, this.springs = {}, this.queue = [], this._lastAsyncId = 0, this._active = new Set, this._changed = new Set, this._started = !1, this._state = {
paused: !1,
pauseQueue: new Set,
resumeQueue: new Set,
timeouts: new Set
}, this._events = {
onStart: new Map,
onChange: new Map,
onRest: new Map
}, this._onFrame = this._onFrame.bind(this), t && (this._flush = t), e && this.start({
default: !0,
...e
})
}
get idle() {
return !this._state.asyncTo && Object.values(this.springs).every(e => e.idle && !e.isDelayed && !e.isPaused)
}
get item() {
return this._item
}
set item(e) {
this._item = e
}
get() {
let e = {};
return this.each((t, r) => e[r] = t.get()), e
}
set(e) {
for (let r in e) {
let i = e[r];
t.is.und(i) || this.springs[r].set(i)
}
}
update(e) {
return e && this.queue.push(G(e)), this
}
start(e) {
let {
queue: r
} = this;
return (e ? r = (0, t.toArray)(e).map(G) : this.queue = [], this._flush) ? this._flush(this, r) : (ea(this, r), ee(this, r))
}
stop(e, r) {
if (!!e !== e && (r = e), r) {
let i = this.springs;
(0, t.each)((0, t.toArray)(r), t => i[t].stop(!!e))
} else V(this._state, this._lastAsyncId), this.each(t => t.stop(!!e));
return this
}
pause(e) {
if (t.is.und(e)) this.start({
pause: !0
});
else {
let r = this.springs;
(0, t.each)((0, t.toArray)(e), e => r[e].pause())
}
return this
}
resume(e) {
if (t.is.und(e)) this.start({
pause: !1
});
else {
let r = this.springs;
(0, t.each)((0, t.toArray)(e), e => r[e].resume())
}
return this
}
each(e) {
(0, t.eachProp)(this.springs, e)
}
_onFrame() {
let {
onStart: e,
onChange: r,
onRest: i
} = this._events, n = this._active.size > 0, s = this._changed.size > 0;
(n && !this._started || s && !this._started) && (this._started = !0, (0, t.flush)(e, ([e, t]) => {
t.value = this.get(), e(t, this, this._item)
}));
let a = !n && this._started,
o = s || a && i.size ? this.get() : null;
s && r.size && (0, t.flush)(r, ([e, t]) => {
t.value = o, e(t, this, this._item)
}), a && (this._started = !1, (0, t.flush)(i, ([e, t]) => {
t.value = o, e(t, this, this._item)
}))
}
eventObserved(e) {
if ("change" == e.type) this._changed.add(e.parent), e.idle || this._active.add(e.parent);
else {
if ("idle" != e.type) return;
this._active.delete(e.parent)
}
i.raf.onFrame(this._onFrame)
}
};
function ee(e, t) {
return Promise.all(t.map(t => et(e, t))).then(t => I(e, t))
}
async function et(e, r, n) {
let {
keys: s,
to: a,
from: o,
loop: l,
onRest: f,
onResolve: d
} = r, c = t.is.obj(r.default) && r.default;
l && (r.loop = !1), !1 === a && (r.to = null), !1 === o && (r.from = null);
let h = t.is.arr(a) || t.is.fun(a) ? a : void 0;
h ? (r.to = void 0, r.onRest = void 0, c && (c.onRest = void 0)) : (0, t.each)(X, i => {
let n = r[i];
if (t.is.fun(n)) {
let t = e._events[i];
r[i] = ({
finished: e,
cancelled: r
}) => {
let i = t.get(n);
i ? (e || (i.finished = !1), r && (i.cancelled = !0)) : t.set(n, {
value: null,
finished: e || !1,
cancelled: r || !1
})
}, c && (c[i] = r[i])
}
});
let p = e._state;
!p.paused === r.pause ? (p.paused = r.pause, (0, t.flushCalls)(r.pause ? p.pauseQueue : p.resumeQueue)) : p.paused && (r.pause = !0);
let m = (s || Object.keys(e.springs)).map(t => e.springs[t].start(r)),
g = !0 === r.cancel || !0 === u(r, "cancel");
(h || g && p.asyncId) && m.push(A(++e._lastAsyncId, {
props: r,
state: p,
actions: {
pause: t.noop,
resume: t.noop,
start(t, r) {
g ? (V(p, e._lastAsyncId), r(R(e))) : (t.onRest = f, r(C(h, t, p, e)))
}
}
})), p.paused && await new Promise(e => {
p.resumeQueue.add(e)
});
let v = I(e, await Promise.all(m));
if (l && v.finished && !(n && v.noop)) {
let t = W(r, l, a);
if (t) return ea(e, [t]), et(e, t, !0)
}
return d && i.raf.batchedUpdates(() => d(v, e, e.item)), v
}
function er(e, r) {
let i = {
...e.springs
};
return r && (0, t.each)((0, t.toArray)(r), e => {
t.is.und(e.keys) && (e = G(e)), t.is.obj(e.to) || (e = {
...e,
to: void 0
}), es(i, e, e => en(e))
}), ei(e, i), i
}
function ei(e, r) {
(0, t.eachProp)(r, (r, i) => {
e.springs[i] || (e.springs[i] = r, (0, t.addFluidObserver)(r, e))
})
}
function en(e, r) {
let i = new $;
return i.key = e, r && (0, t.addFluidObserver)(i, r), i
}
function es(e, r, i) {
r.keys && (0, t.each)(r.keys, t => {
(e[t] || (e[t] = i(t)))._prepareNode(r)
})
}
function ea(e, r) {
(0, t.each)(r, t => {
es(e.springs, t, t => en(t, e))
})
}
var eo = ({
children: e,
...i
}) => {
let n = (0, r.useContext)(eu),
s = i.pause || !!n.pause,
a = i.immediate || !!n.immediate;
i = (0, t.useMemoOne)(() => ({
pause: s,
immediate: a
}), [s, a]);
let {
Provider: o
} = eu;
return (0, r.createElement)(o, {
value: i
}, e)
},
eu = function(e, t) {
return Object.assign(e, (0, r.createContext)(t)), e.Provider._context = e, e.Consumer._context = e, e
}(eo, {});
eo.Provider = eu.Provider, eo.Consumer = eu.Consumer;
var el = () => {
let e = [],
r = function(r) {
(0, t.deprecateDirectCall)();
let n = [];
return (0, t.each)(e, (e, s) => {
if (t.is.und(r)) n.push(e.start());
else {
let t = i(r, e, s);
t && n.push(e.start(t))
}
}), n
};
r.current = e, r.add = function(t) {
e.includes(t) || e.push(t)
}, r.delete = function(t) {
let r = e.indexOf(t);
~r && e.splice(r, 1)
}, r.pause = function() {
return (0, t.each)(e, e => e.pause(...arguments)), this
}, r.resume = function() {
return (0, t.each)(e, e => e.resume(...arguments)), this
}, r.set = function(r) {
(0, t.each)(e, (e, i) => {
let n = t.is.fun(r) ? r(i, e) : r;
n && e.set(n)
})
}, r.start = function(r) {
let i = [];
return (0, t.each)(e, (e, n) => {
if (t.is.und(r)) i.push(e.start());
else {
let t = this._getProps(r, e, n);
t && i.push(e.start(t))
}
}), i
}, r.stop = function() {
return (0, t.each)(e, e => e.stop(...arguments)), this
}, r.update = function(r) {
return (0, t.each)(e, (e, t) => e.update(this._getProps(r, e, t))), this
};
let i = function(e, r, i) {
return t.is.fun(e) ? e(i, r) : e
};
return r._getProps = i, r
};
function ef(e, i, n) {
let s = t.is.fun(i) && i;
s && !n && (n = []);
let a = (0, r.useMemo)(() => s || 3 == arguments.length ? el() : void 0, []),
o = (0, r.useRef)(0),
u = (0, t.useForceUpdate)(),
l = (0, r.useMemo)(() => ({
ctrls: [],
queue: [],
flush(e, t) {
let r = er(e, t);
return !(o.current > 0) || l.queue.length || Object.keys(r).some(t => !e.springs[t]) ? new Promise(i => {
ei(e, r), l.queue.push(() => {
i(ee(e, t))
}), u()
}) : ee(e, t)
}
}), []),
d = (0, r.useRef)([...l.ctrls]),
c = [],
h = (0, t.usePrev)(e) || 0;
function p(e, r) {
for (let n = e; n < r; n++) {
let e = d.current[n] || (d.current[n] = new K(null, l.flush)),
r = s ? s(n, e) : i[n];
r && (c[n] = function(e) {
let r = G(e);
return t.is.und(r.default) && (r.default = f(r)), r
}(r))
}
}(0, r.useMemo)(() => {
(0, t.each)(d.current.slice(e, h), e => {
v(e, a), e.stop(!0)
}), d.current.length = e, p(h, e)
}, [e]), (0, r.useMemo)(() => {
p(0, Math.min(h, e))
}, n);
let g = d.current.map((e, t) => er(e, c[t])),
b = (0, r.useContext)(eo),
x = (0, t.usePrev)(b),
w = b !== x && m(b);
(0, t.useIsomorphicLayoutEffect)(() => {
o.current++, l.ctrls = d.current;
let {
queue: e
} = l;
e.length && (l.queue = [], (0, t.each)(e, e => e())), (0, t.each)(d.current, (e, t) => {
a?.add(e), w && e.start({
default: b
});
let r = c[t];
r && (y(e, r.ref), e.ref ? e.queue.push(r) : e.start(r))
})
}), (0, t.useOnce)(() => () => {
(0, t.each)(l.ctrls, e => e.stop(!0))
});
let _ = g.map(e => ({
...e
}));
return a ? [_, a] : _
}
function ed(e, r) {
let i = t.is.fun(e),
[
[n], s
] = ef(1, i ? e : [e], i ? r || [] : r);
return i || 2 == arguments.length ? [n, s] : n
}
var ec = () => el(),
eh = () => (0, r.useState)(ec)[0],
ep = (e, r) => {
let i = (0, t.useConstant)(() => new $(e, r));
return (0, t.useOnce)(() => () => {
i.stop()
}), i
};
function em(e, r, i) {
let n, s = t.is.fun(r) && r;
s && !i && (i = []);
let a = !0,
o = ef(e, (e, t) => {
let i = s ? s(e, t) : r;
return n = i.ref, a = a && i.reverse, i
}, i || [{}]);
if ((0, t.useIsomorphicLayoutEffect)(() => {
(0, t.each)(o[1].current, (e, t) => {
let r = o[1].current[t + (a ? 1 : -1)];
if (y(e, n), e.ref) {
r && e.update({
to: r.springs
});
return
}
r ? e.start({
to: r.springs
}) : e.start()
})
}, i), s || 3 == arguments.length) {
let e = n ?? o[1];
return e._getProps = (r, i, n) => {
let s = t.is.fun(r) ? r(n, i) : r;
if (s) {
let t = e.current[n + (s.reverse ? 1 : -1)];
return t && (s.to = t.springs), s
}
}, o
}
return o[0]
}
function eg(e, i, n) {
let a = t.is.fun(i) && i,
{
reset: o,
sort: u,
trail: l = 0,
expires: d = !0,
exitBeforeEnter: c = !1,
onDestroyed: p,
ref: g,
config: b
} = a ? a() : i,
x = (0, r.useMemo)(() => a || 3 == arguments.length ? el() : void 0, []),
w = (0, t.toArray)(e),
_ = [],
E = (0, r.useRef)(null),
S = o ? null : E.current;
(0, t.useIsomorphicLayoutEffect)(() => {
E.current = _
}), (0, t.useOnce)(() => ((0, t.each)(_, e => {
x?.add(e.ctrl), e.ctrl.ref = x
}), () => {
(0, t.each)(E.current, e => {
e.expired && clearTimeout(e.expirationId), v(e.ctrl, x), e.ctrl.stop(!0)
})
}));
let O = function(e, {
key: r,
keys: i = r
}, n) {
if (null === i) {
let t = new Set;
return e.map(e => {
let r = n && n.find(r => r.item === e && "leave" !== r.phase && !t.has(r));
return r ? (t.add(r), r.key) : ev++
})
}
return t.is.und(i) ? e : t.is.fun(i) ? e.map(i) : (0, t.toArray)(i)
}(w, a ? a() : i, S),
A = o && E.current || [];
(0, t.useIsomorphicLayoutEffect)(() => (0, t.each)(A, ({
ctrl: e,
item: t,
key: r
}) => {
v(e, x), s(p, t, r)
}));
let I = [];
if (S && (0, t.each)(S, (e, t) => {
e.expired ? (clearTimeout(e.expirationId), A.push(e)) : ~(t = I[t] = O.indexOf(e.key)) && (_[t] = e)
}), (0, t.each)(w, (e, t) => {
_[t] || (_[t] = {
key: O[t],
item: e,
phase: "mount",
ctrl: new K
}, _[t].ctrl.item = e)
}), I.length) {
let e = -1,
{
leave: r
} = a ? a() : i;
(0, t.each)(I, (t, i) => {
let n = S[i];
~t ? (e = _.indexOf(n), _[e] = {
...n,
item: w[t]
}) : r && _.splice(++e, 0, n)
})
}
t.is.fun(u) && _.sort((e, t) => u(e.item, t.item));
let k = -l,
P = (0, t.useForceUpdate)(),
R = f(i),
C = new Map,
V = (0, r.useRef)(new Map),
F = (0, r.useRef)(!1);
(0, t.each)(_, (e, r) => {
let n, o, u = e.key,
f = e.phase,
p = a ? a() : i,
m = s(p.delay || 0, u);
if ("mount" == f) n = p.enter, o = "enter";
else {
let e = 0 > O.indexOf(u);
if ("leave" != f)
if (e) n = p.leave, o = "leave";
else {
if (!(n = p.update)) return;
o = "update"
}
else {
if (e) return;
n = p.enter, o = "enter"
}
}
if (n = s(n, e.item, r), !(n = t.is.obj(n) ? h(n) : {
to: n
}).config) {
let t = b || R.config;
n.config = s(t, e.item, r, o)
}
k += l;
let v = {
...R,
delay: m + k,
ref: g,
immediate: p.immediate,
reset: !1,
...n
};
if ("enter" == o && t.is.und(v.from)) {
let n = a ? a() : i;
v.from = s(t.is.und(n.initial) || S ? n.from : n.initial, e.item, r)
}
let {
onResolve: y
} = v;
v.onResolve = e => {
s(y, e);
let t = E.current,
r = t.find(e => e.key === u);
if (r && (!e.cancelled || "update" == r.phase) && r.ctrl.idle) {
let e = t.every(e => e.ctrl.idle);
if ("leave" == r.phase) {
let t = s(d, r.item);
if (!1 !== t) {
let i = !0 === t ? 0 : t;
if (r.expired = !0, !e && i > 0) {
i <= 0x7fffffff && (r.expirationId = setTimeout(P, i));
return
}
}
}
e && t.some(e => e.expired) && (V.current.delete(r), c && (F.current = !0), P())
}
};
let x = er(e.ctrl, v);
"leave" === o && c ? V.current.set(e, {
phase: o,
springs: x,
payload: v
}) : C.set(e, {
phase: o,
springs: x,
payload: v
})
});
let M = (0, r.useContext)(eo),
T = (0, t.usePrev)(M),
L = M !== T && m(M);
(0, t.useIsomorphicLayoutEffect)(() => {
L && (0, t.each)(_, e => {
e.ctrl.start({
default: M
})
})
}, [M]), (0, t.each)(C, (e, t) => {
if (V.current.size) {
let e = _.findIndex(e => e.key === t.key);
_.splice(e, 1)
}
}), (0, t.useIsomorphicLayoutEffect)(() => {
(0, t.each)(V.current.size ? V.current : C, ({
phase: e,
payload: t
}, r) => {
let {
ctrl: i
} = r;
r.phase = e, x?.add(i), L && "enter" == e && i.start({
default: M
}), t && (y(i, t.ref), (i.ref || x) && !F.current ? i.update(t) : (i.start(t), F.current && (F.current = !1)))
})
}, o ? void 0 : n);
let j = e => (0, r.createElement)(r.Fragment, null, _.map((i, n) => {
let {
springs: s
} = C.get(i) || i.ctrl, a = e({
...s
}, i.item, i, n);
return a && a.type ? (0, r.createElement)(a.type, {
...a.props,
key: t.is.str(i.key) || t.is.num(i.key) ? i.key : i.ctrl.id,
ref: a.ref
}) : a
}));
return x ? [j, x] : j
}
var ev = 1,
ey = ({
container: e,
...r
} = {}) => {
let [i, n] = ed(() => ({
scrollX: 0,
scrollY: 0,
scrollXProgress: 0,
scrollYProgress: 0,
...r
}), []);
return (0, t.useIsomorphicLayoutEffect)(() => {
let r = (0, t.onScroll)(({
x: e,
y: t
}) => {
n.start({
scrollX: e.current,
scrollXProgress: e.progress,
scrollY: t.current,
scrollYProgress: t.progress
})
}, {
container: e?.current || void 0
});
return () => {
(0, t.each)(Object.values(i), e => e.stop()), r()
}
}, []), i
},
eb = ({
container: e,
...r
}) => {
let [i, n] = ed(() => ({
width: 0,
height: 0,
...r
}), []);
return (0, t.useIsomorphicLayoutEffect)(() => {
let r = (0, t.onResize)(({
width: e,
height: t
}) => {
n.start({
width: e,
height: t,
immediate: 0 === i.width.get() || 0 === i.height.get()
})
}, {
container: e?.current || void 0
});
return () => {
(0, t.each)(Object.values(i), e => e.stop()), r()
}
}, []), i
},
ex = {
any: 0,
all: 1
};
function ew(e, i) {
let [n, s] = (0, r.useState)(!1), a = (0, r.useRef)(), o = t.is.fun(e) && e, {
to: u = {},
from: l = {},
...f
} = o ? o() : {}, d = o ? i : e, [c, h] = ed(() => ({
from: l,
...f
}), []);
return ((0, t.useIsomorphicLayoutEffect)(() => {
let e = a.current,
{
root: r,
once: i,
amount: o = "any",
...f
} = d ?? {};
if (!e || i && n || "undefined" == typeof IntersectionObserver) return;
let c = new WeakMap,
p = new IntersectionObserver(e => {
e.forEach(e => {
let r = c.get(e.target);
if (!!r !== e.isIntersecting)
if (e.isIntersecting) {
let r = (u && h.start(u), s(!0), i ? void 0 : () => {
l && h.start(l), s(!1)
});
t.is.fun(r) ? c.set(e.target, r) : p.unobserve(e.target)
} else r && (r(), c.delete(e.target))
})
}, {
root: r && r.current || void 0,
threshold: "number" == typeof o || Array.isArray(o) ? o : ex[o],
...f
});
return p.observe(e), () => p.unobserve(e)
}, [d]), o) ? [a, c] : [a, n]
}
function e_({
children: e,
...t
}) {
return e(ed(t))
}
function eE({
items: e,
children: r,
...i
}) {
let n = em(e.length, i);
return e.map((e, i) => {
let s = r(e, i);
return t.is.fun(s) ? s(n[i]) : s
})
}
function eS({
items: e,
children: t,
...r
}) {
return eg(e, r)(t)
}
var eO = class extends L {
constructor(e, r) {
super(), this.source = e, this.idle = !0, this._active = new Set, this.calc = (0, t.createInterpolator)(...r);
let i = this._get(),
s = (0, n.getAnimatedType)(i);
(0, n.setAnimated)(this, s.create(i))
}
advance(e) {
let r = this._get(),
i = this.get();
(0, t.isEqual)(r, i) || ((0, n.getAnimated)(this).setValue(r), this._onChange(r, this.idle)), !this.idle && eI(this._active) && ek(this)
}
_get() {
let e = t.is.arr(this.source) ? this.source.map(t.getFluidValue) : (0, t.toArray)((0, t.getFluidValue)(this.source));
return this.calc(...e)
}
_start() {
this.idle && !eI(this._active) && (this.idle = !1, (0, t.each)((0, n.getPayload)(this), e => {
e.done = !1
}), t.Globals.skipAnimation ? (i.raf.batchedUpdates(() => this.advance()), ek(this)) : t.frameLoop.start(this))
}
_attach() {
let e = 1;
(0, t.each)((0, t.toArray)(this.source), r => {
(0, t.hasFluidValue)(r) && (0, t.addFluidObserver)(r, this), r instanceof L && (r.idle || this._active.add(r), e = Math.max(e, r.priority + 1))
}), this.priority = e, this._start()
}
_detach() {
(0, t.each)((0, t.toArray)(this.source), e => {
(0, t.hasFluidValue)(e) && (0, t.removeFluidObserver)(e, this)
}), this._active.clear(), ek(this)
}
eventObserved(e) {
"change" == e.type ? e.idle ? this.advance() : (this._active.add(e.parent), this._start()) : "idle" == e.type ? this._active.delete(e.parent) : "priority" == e.type && (this.priority = (0, t.toArray)(this.source).reduce((e, t) => Math.max(e, (t instanceof L ? t.priority : 0) + 1), 0))
}
};
function eA(e) {
return !1 !== e.idle
}
function eI(e) {
return !e.size || Array.from(e).every(eA)
}
function ek(e) {
e.idle || (e.idle = !0, (0, t.each)((0, n.getPayload)(e), e => {
e.done = !0
}), (0, t.callFluidObservers)(e, {
type: "idle",
parent: e
}))
}
var eP = (e, ...t) => new eO(e, t),
eR = (e, ...r) => ((0, t.deprecateInterpolate)(), new eO(e, r));
t.Globals.assign({
createStringInterpolator: t.createStringInterpolator,
to: (e, t) => new eO(e, t)
});
var eC = t.frameLoop.advance
},
909781: e => {
"use strict";
e.s({}), e.i(204317), e.i(378469), e.i(241377), e.i(730445), e.i(328871)
},
22140: e => {
"use strict";
e.s({
a: () => m,
animated: () => m
}), e.i(909781);
var t = e.i(530056),
r = e.i(564166);
e.i(204317);
var i = e.i(241377),
n = /^--/,
s = {},
a = {
animationIterationCount: !0,
borderImageOutset: !0,
borderImageSlice: !0,
borderImageWidth: !0,
boxFlex: !0,
boxFlexGroup: !0,
boxOrdinalGroup: !0,
columnCount: !0,
columns: !0,
flex: !0,
flexGrow: !0,
flexPositive: !0,
flexShrink: !0,
flexNegative: !0,
flexOrder: !0,
gridRow: !0,
gridRowEnd: !0,
gridRowSpan: !0,
gridRowStart: !0,
gridColumn: !0,
gridColumnEnd: !0,
gridColumnSpan: !0,
gridColumnStart: !0,
fontWeight: !0,
lineClamp: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
tabSize: !0,
widows: !0,
zIndex: !0,
zoom: !0,
fillOpacity: !0,
floodOpacity: !0,
stopOpacity: !0,
strokeDasharray: !0,
strokeDashoffset: !0,
strokeMiterlimit: !0,
strokeOpacity: !0,
strokeWidth: !0
},
o = ["Webkit", "Ms", "Moz", "O"];
a = Object.keys(a).reduce((e, t) => (o.forEach(r => e[((e, t) => e + t.charAt(0).toUpperCase() + t.substring(1))(r, t)] = e[t]), e), a);
var u = /^(matrix|translate|scale|rotate|skew)/,
l = /^(translate)/,
f = /^(rotate|skew)/,
d = (e, r) => t.is.num(e) && 0 !== e ? e + r : e,
c = (e, r) => t.is.arr(e) ? e.every(e => c(e, r)) : t.is.num(e) ? e === r : parseFloat(e) === r,
h = class extends i.AnimatedObject {
constructor({
x: e,
y: r,
z: i,
...n
}) {
let s = [],
a = [];
(e || r || i) && (s.push([e || 0, r || 0, i || 0]), a.push(e => [`translate3d(${e.map(e=>d(e,"px")).join(",")})`, c(e, 0)])), (0, t.eachProp)(n, (e, r) => {
if ("transform" === r) s.push([e || ""]), a.push(e => [e, "" === e]);
else if (u.test(r)) {
if (delete n[r], t.is.und(e)) return;
let i = l.test(r) ? "px" : f.test(r) ? "deg" : "";
s.push((0, t.toArray)(e)), a.push("rotate3d" === r ? ([e, t, r, n]) => [`rotate3d(${e},${t},${r},${d(n,i)})`, c(n, 0)] : e => [`${r}(${e.map(e=>d(e,i)).join(",")})`, c(e, +!!r.startsWith("scale"))])
}
}), s.length && (n.transform = new p(s, a)), super(n)
}
},
p = class extends t.FluidValue {
constructor(e, t) {
super(), this.inputs = e, this.transforms = t, this._value = null
}
get() {
return this._value || (this._value = this._get())
}
_get() {
let e = "",
r = !0;
return (0, t.each)(this.inputs, (i, n) => {
let s = (0, t.getFluidValue)(i[0]),
[a, o] = this.transforms[n](t.is.arr(s) ? s : i.map(t.getFluidValue));
e += " " + a, r = r && o
}), r ? "none" : e
}
observerAdded(e) {
1 == e && (0, t.each)(this.inputs, e => (0, t.each)(e, e => (0, t.hasFluidValue)(e) && (0, t.addFluidObserver)(e, this)))
}
observerRemoved(e) {
0 == e && (0, t.each)(this.inputs, e => (0, t.each)(e, e => (0, t.hasFluidValue)(e) && (0, t.removeFluidObserver)(e, this)))
}
eventObserved(e) {
"change" == e.type && (this._value = null), (0, t.callFluidObservers)(this, e)
}
};
t.Globals.assign({
batchedUpdates: r.unstable_batchedUpdates,
createStringInterpolator: t.createStringInterpolator,
colors: t.colors
});
var m = (0, i.createHost)(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"], {
applyAnimatedValues: function(e, t) {
if (!e.nodeType || !e.setAttribute) return !1;
let r = "filter" === e.nodeName || e.parentNode && "filter" === e.parentNode.nodeName,
{
className: i,
style: o,
children: u,
scrollTop: l,
scrollLeft: f,
viewBox: d,
...c
} = t,
h = Object.values(c),
p = Object.keys(c).map(t => r || e.hasAttribute(t) ? t : s[t] || (s[t] = t.replace(/([A-Z])/g, e => "-" + e.toLowerCase())));
for (let t in void 0 !== u && (e.textContent = u), o)
if (o.hasOwnProperty(t)) {
var m;
let r = null == (m = o[t]) || "boolean" == typeof m || "" === m ? "" : "number" != typeof m || 0 === m || n.test(t) || a.hasOwnProperty(t) && a[t] ? ("" + m).trim() : m + "px";
n.test(t) ? e.style.setProperty(t, r) : e.style[t] = r
} p.forEach((t, r) => {
e.setAttribute(t, h[r])
}), void 0 !== i && (e.className = i), void 0 !== l && (e.scrollTop = l), void 0 !== f && (e.scrollLeft = f), void 0 !== d && e.setAttribute("viewBox", d)
},
createAnimatedStyle: e => new h(e),
getComponentProps: ({
scrollTop: e,
scrollLeft: t,
...r
}) => r
}).animated
},
519607: e => {
"use strict";
e.s({}), e.i(909781), e.i(564166), e.i(204317), e.i(241377), e.i(22140)
},
564639: function(e) {
var {
m: t,
e: r
} = e
},
379417: function(e) {
"use strict";
var {
m: t,
e: r
} = e, i = e.r(378469), n = "function" == typeof Object.is ? Object.is : function(e, t) {
return e === t && (0 !== e || 1 / e == 1 / t) || e != e && t != t
}, s = i.useState, a = i.useEffect, o = i.useLayoutEffect, u = i.useDebugValue;
function l(e) {
var t = e.getSnapshot;
e = e.value;
try {
var r = t();
return !n(e, r)
} catch (e) {
return !0
}
}
var f = "undefined" == typeof window || void 0 === window.document || void 0 === window.document.createElement ? function(e, t) {
return t()
} : function(e, t) {
var r = t(),
i = s({
inst: {
value: r,
getSnapshot: t
}
}),
n = i[0].inst,
f = i[1];
return o(function() {
n.value = r, n.getSnapshot = t, l(n) && f({
inst: n
})
}, [e, r, t]), a(function() {
return l(n) && f({
inst: n
}), e(function() {
l(n) && f({
inst: n
})
})
}, [e]), u(r), r
};
r.useSyncExternalStore = void 0 !== i.useSyncExternalStore ? i.useSyncExternalStore : f
},
606964: function(e) {
var {
m: t,
e: r
} = e;
e.i(983505);
"use strict";
t.exports = e.r(379417)
},
855763: e => {
"use strict";
e.s({
IS_REACT_LEGACY: () => E,
IS_SERVER: () => S,
OBJECT: () => n,
SWRConfig: () => N,
SWRGlobalState: () => c,
UNDEFINED: () => i,
createCacheHelper: () => y,
defaultConfig: () => U,
getTimestamp: () => C,
internalMutate: () => F,
isFunction: () => a,
isPromiseLike: () => u,
isUndefined: () => s,
mergeObjects: () => o,
rAF: () => O,
revalidateEvents: () => V,
serialize: () => P,
subscribeCallback: () => W,
useIsomorphicLayoutEffect: () => A,
withArgs: () => Q
});
var t = e.i(378469);
let r = () => {},
i = r(),
n = Object,
s = e => e === i,
a = e => "function" == typeof e,
o = (e, t) => ({
...e,
...t
}),
u = e => a(e.then),
l = new WeakMap,
f = 0,
d = e => {
let t, r, i = typeof e,
a = e && e.constructor,
o = a == Date;
if (n(e) !== e || o || a == RegExp) t = o ? e.toJSON() : "symbol" == i ? e.toString() : "string" == i ? JSON.stringify(e) : "" + e;
else {
if (t = l.get(e)) return t;
if (t = ++f + "~", l.set(e, t), a == Array) {
for (r = 0, t = "@"; r < e.length; r++) t += d(e[r]) + ",";
l.set(e, t)
}
if (a == n) {
t = "#";
let i = n.keys(e).sort();
for (; !s(r = i.pop());) s(e[r]) || (t += r + ":" + d(e[r]) + ",");
l.set(e, t)
}
}
return t
},
c = new WeakMap,
h = {},
p = {},
m = "undefined",
g = typeof window != m,
v = typeof document != m,
y = (e, t) => {
let r = c.get(e);
return [() => !s(t) && e.get(t) || h, i => {
if (!s(t)) {
let n = e.get(t);
t in p || (p[t] = n), r[5](t, o(n, i), n || h)
}
}, r[6], () => !s(t) && t in p ? p[t] : !s(t) && e.get(t) || h]
},
b = !0,
[x, w] = g && window.addEventListener ? [window.addEventListener.bind(window), window.removeEventListener.bind(window)] : [r, r],
_ = {
initFocus: e => (v && document.addEventListener("visibilitychange", e), x("focus", e), () => {
v && document.removeEventListener("visibilitychange", e), w("focus", e)
}),
initReconnect: e => {
let t = () => {
b = !0, e()
},
r = () => {
b = !1
};
return x("online", t), x("offline", r), () => {
w("online", t), w("offline", r)
}
}
},
E = !t.default.useId,
S = !g || "Deno" in window,
O = e => g && typeof window.requestAnimationFrame != m ? window.requestAnimationFrame(e) : setTimeout(e, 1),
A = S ? t.useEffect : t.useLayoutEffect,
I = "undefined" != typeof navigator && navigator.connection,
k = !S && I && (["slow-2g", "2g"].includes(I.effectiveType) || I.saveData),
P = e => {
if (a(e)) try {
e = e()
} catch (t) {
e = ""
}
let t = e;
return [e = "string" == typeof e ? e : (Array.isArray(e) ? e.length : e) ? d(e) : "", t]
},
R = 0,
C = () => ++R;
var V = {
__proto__: null,
ERROR_REVALIDATE_EVENT: 3,
FOCUS_EVENT: 0,
MUTATE_EVENT: 2,
RECONNECT_EVENT: 1
};
async function F(...e) {
let [t, r, n, l] = e, f = o({
populateCache: !0,
throwOnError: !0
}, "boolean" == typeof l ? {
revalidate: l
} : l || {}), d = f.populateCache, h = f.rollbackOnError, p = f.optimisticData, m = f.throwOnError;
if (a(r)) {
let e = [];
for (let i of t.keys()) !/^\$(inf|sub)\$/.test(i) && r(t.get(i)._k) && e.push(i);
return Promise.all(e.map(g))
}
return g(r);
async function g(r) {
let o, [l] = P(r);
if (!l) return;
let [g, v] = y(t, l), [b, x, w, _] = c.get(t), E = () => {
let e = b[l];
return (a(f.revalidate) ? f.revalidate(g().data, r) : !1 !== f.revalidate) && (delete w[l], delete _[l], e && e[0]) ? e[0](2).then(() => g().data) : g().data
};
if (e.length < 3) return E();
let S = n,
O = C();
x[l] = [O, 0];
let A = !s(p),
I = g(),
k = I.data,
R = I._c,
V = s(R) ? k : R;
if (A && v({
data: p = a(p) ? p(V, k) : p,
_c: V
}), a(S)) try {
S = S(V)
} catch (e) {
o = e
}
if (S && u(S)) {
let e;
if (S = await S.catch(e => {
o = e
}), O !== x[l][0]) {
if (o) throw o;
return S
}
o && A && (e = o, "function" == typeof h ? h(e) : !1 !== h) && (d = !0, v({
data: V,
_c: i
}))
}
if (d && !o && (a(d) ? v({
data: d(S, V),
error: i,
_c: i
}) : v({
data: S,
error: i,
_c: i
})), x[l][1] = C(), Promise.resolve(E()).then(() => {
v({
_c: i
})
}), o) {
if (m) throw o;
return
}
return S
}
}
let M = (e, t) => {
for (let r in e) e[r][0] && e[r][0](t)
},
T = (e, t) => {
if (!c.has(e)) {
let n = o(_, t),
s = {},
a = F.bind(i, e),
u = r,
l = {},
f = (e, t) => {
let r = l[e] || [];
return l[e] = r, r.push(t), () => r.splice(r.indexOf(t), 1)
},
d = (t, r, i) => {
e.set(t, r);
let n = l[t];
if (n)
for (let e of n) e(r, i)
},
h = () => {
if (!c.has(e) && (c.set(e, [s, {}, {}, {}, a, d, f]), !S)) {
let t = n.initFocus(setTimeout.bind(i, M.bind(i, s, 0))),
r = n.initReconnect(setTimeout.bind(i, M.bind(i, s, 1)));
u = () => {
t && t(), r && r(), c.delete(e)
}
}
};
return h(), [e, a, h, u]
}
return [e, c.get(e)[4]]
},
[L, j] = T(new Map),
U = o({
onLoadingSlow: r,
onSuccess: r,
onError: r,
onErrorRetry: (e, t, r, i, n) => {
let a = r.errorRetryCount,
o = n.retryCount,
u = ~~((Math.random() + .5) * (1 << (o < 8 ? o : 8))) * r.errorRetryInterval;
(s(a) || !(o > a)) && setTimeout(i, u, n)
},
onDiscarded: r,
revalidateOnFocus: !0,
revalidateOnReconnect: !0,
revalidateIfStale: !0,
shouldRetryOnError: !0,
errorRetryInterval: k ? 1e4 : 5e3,
focusThrottleInterval: 5e3,
dedupingInterval: 2e3,
loadingTimeout: k ? 5e3 : 3e3,
compare: (e, t) => d(e) == d(t),
isPaused: () => !1,
cache: L,
mutate: j,
fallback: {}
}, {
isOnline: () => b,
isVisible: () => {
let e = v && document.visibilityState;
return s(e) || "hidden" !== e
}
}),
q = (e, t) => {
let r = o(e, t);
if (t) {
let {
use: i,
fallback: n
} = e, {
use: s,
fallback: a
} = t;
i && s && (r.use = i.concat(s)), n && a && (r.fallback = o(n, a))
}
return r
},
z = (0, t.createContext)({}),
N = e => {
let {
value: r
} = e, n = (0, t.useContext)(z), s = a(r), u = (0, t.useMemo)(() => s ? r(n) : r, [s, n, r]), l = (0, t.useMemo)(() => s ? u : q(n, u), [s, n, u]), f = u && u.provider, d = (0, t.useRef)(i);
f && !d.current && (d.current = T(f(l.cache || L), u));
let c = d.current;
return c && (l.cache = c[0], l.mutate = c[1]), A(() => {
if (c) return c[2] && c[2](), c[3]
}, []), (0, t.createElement)(z.Provider, o(e, {
value: l
}))
},
D = g && window.__SWR_DEVTOOLS_USE__,
$ = (D ? window.__SWR_DEVTOOLS_USE__ : []).concat(e => (t, r, i) => {
let n = r && ((...e) => {
let [i] = P(t), [, , , n] = c.get(L);
if (i.startsWith("$inf$")) return r(...e);
let a = n[i];
return s(a) ? r(...e) : (delete n[i], a)
});
return e(t, n, i)
}),
Q = e => function(...r) {
let i = o(U, (0, t.useContext)(z)),
[n, s, u] = a(r[1]) ? [r[0], r[1], r[2] || {}] : [r[0], null, (null === r[1] ? r[2] : r[1]) || {}],
l = q(i, u),
f = e,
{
use: d
} = l,
c = (d || []).concat($);
for (let e = c.length; e--;) f = c[e](f);
return f(n, s || l.fetcher || null, l)
},
W = (e, t, r) => {
let i = t[e] || (t[e] = []);
return i.push(r), () => {
let e = i.indexOf(r);
e >= 0 && (i[e] = i[i.length - 1], i.pop())
}
};
D && (window.__SWR_DEVTOOLS_REACT__ = t.default)
},
898813: e => {
"use strict";
e.s({
SWRConfig: () => o,
default: () => u,
unstable_serialize: () => n
}), e.i(564639);
var t = e.i(378469),
r = e.i(606964),
i = e.i(855763);
let n = e => (0, i.serialize)(e)[0],
s = t.default.use || (e => {
if ("pending" === e.status) throw e;
if ("fulfilled" === e.status) return e.value;
if ("rejected" === e.status) throw e.reason;
throw e.status = "pending", e.then(t => {
e.status = "fulfilled", e.value = t
}, t => {
e.status = "rejected", e.reason = t
}), e
}),
a = {
dedupe: !0
},
o = i.OBJECT.defineProperty(i.SWRConfig, "defaultValue", {
value: i.defaultConfig
}),
u = (0, i.withArgs)((e, n, o) => {
let {
cache: u,
compare: l,
suspense: f,
fallbackData: d,
revalidateOnMount: c,
revalidateIfStale: h,
refreshInterval: p,
refreshWhenHidden: m,
refreshWhenOffline: g,
keepPreviousData: v
} = o, [y, b, x, w] = i.SWRGlobalState.get(u), [_, E] = (0, i.serialize)(e), S = (0, t.useRef)(!1), O = (0, t.useRef)(!1), A = (0, t.useRef)(_), I = (0, t.useRef)(n), k = (0, t.useRef)(o), P = () => k.current.isVisible() && k.current.isOnline(), [R, C, V, F] = (0, i.createCacheHelper)(u, _), M = (0, t.useRef)({}).current, T = (0, i.isUndefined)(d) ? o.fallback[_] : d;
T && (0, i.isPromiseLike)(T) && (T = s(T));
let L = (e, t) => {
for (let r in M)
if ("data" === r) {
if (!l(e[r], t[r]) && (!(0, i.isUndefined)(e[r]) || !l(W, t[r]))) return !1
} else if (t[r] !== e[r]) return !1;
return !0
},
j = (0, t.useMemo)(() => {
let e = !!_ && !!n && ((0, i.isUndefined)(c) ? !k.current.isPaused() && !f && (!!(0, i.isUndefined)(h) || h) : c),
t = t => {
let r = (0, i.mergeObjects)(t);
return (delete r._k, e) ? {
isValidating: !0,
isLoading: !0,
...r
} : r
},
r = R(),
s = F(),
a = t(r),
o = r === s ? a : t(s),
u = a;
return [() => {
let e = t(R());
return L(e, u) ? (u.data = e.data, u.isLoading = e.isLoading, u.isValidating = e.isValidating, u.error = e.error, u) : (u = e, e)
}, () => o]
}, [u, _]),
U = (0, r.useSyncExternalStore)((0, t.useCallback)(e => V(_, (t, r) => {
L(r, t) || e()
}), [u, _]), j[0], j[1]),
q = !S.current,
z = y[_] && y[_].length > 0,
N = U.data,
D = (0, i.isUndefined)(N) ? T : N,
$ = U.error,
Q = (0, t.useRef)(D),
W = v ? (0, i.isUndefined)(N) ? Q.current : N : D,
G = (!z || !!(0, i.isUndefined)($)) && (q && !(0, i.isUndefined)(c) ? c : !k.current.isPaused() && (f ? !(0, i.isUndefined)(D) && h : (0, i.isUndefined)(D) || h)),
B = !!(_ && n && q && G),
H = (0, i.isUndefined)(U.isValidating) ? B : U.isValidating,
Y = (0, i.isUndefined)(U.isLoading) ? B : U.isLoading,
J = (0, t.useCallback)(async e => {
let t, r, n = I.current;
if (!_ || !n || O.current || k.current.isPaused()) return !1;
let s = !0,
a = e || {},
u = !x[_] || !a.dedupe,
f = () => i.IS_REACT_LEGACY ? !O.current && _ === A.current && S.current : _ === A.current,
d = {
isValidating: !1,
isLoading: !1
},
c = () => {
C(d)
},
h = () => {
let e = x[_];
e && e[1] === r && delete x[_]
},
p = {
isValidating: !0
};
(0, i.isUndefined)(R().data) && (p.isLoading = !0);
try {
if (u && (C(p), o.loadingTimeout && (0, i.isUndefined)(R().data) && setTimeout(() => {
s && f() && k.current.onLoadingSlow(_, o)
}, o.loadingTimeout), x[_] = [n(E), (0, i.getTimestamp)()]), [t, r] = x[_], t = await t, u && setTimeout(h, o.dedupingInterval), !x[_] || x[_][1] !== r) return u && f() && k.current.onDiscarded(_), !1;
d.error = i.UNDEFINED;
let e = b[_];
if (!(0, i.isUndefined)(e) && (r <= e[0] || r <= e[1] || 0 === e[1])) return c(), u && f() && k.current.onDiscarded(_), !1;
let a = R().data;
d.data = l(a, t) ? a : t, u && f() && k.current.onSuccess(t, _, o)
} catch (r) {
h();
let e = k.current,
{
shouldRetryOnError: t
} = e;
!e.isPaused() && (d.error = r, u && f() && (e.onError(r, _, e), (!0 === t || (0, i.isFunction)(t) && t(r)) && (!k.current.revalidateOnFocus || !k.current.revalidateOnReconnect || P()) && e.onErrorRetry(r, _, e, e => {
let t = y[_];
t && t[0] && t[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT, e)
}, {
retryCount: (a.retryCount || 0) + 1,
dedupe: !0
})))
}
return s = !1, c(), !0
}, [_, u]),
X = (0, t.useCallback)((...e) => (0, i.internalMutate)(u, A.current, ...e), []);
if ((0, i.useIsomorphicLayoutEffect)(() => {
I.current = n, k.current = o, (0, i.isUndefined)(N) || (Q.current = N)
}), (0, i.useIsomorphicLayoutEffect)(() => {
if (!_) return;
let e = J.bind(i.UNDEFINED, a),
t = 0,
r = (0, i.subscribeCallback)(_, y, (r, n = {}) => {
if (r == i.revalidateEvents.FOCUS_EVENT) {
let r = Date.now();
k.current.revalidateOnFocus && r > t && P() && (t = r + k.current.focusThrottleInterval, e())
} else if (r == i.revalidateEvents.RECONNECT_EVENT) k.current.revalidateOnReconnect && P() && e();
else if (r == i.revalidateEvents.MUTATE_EVENT) return J();
else if (r == i.revalidateEvents.ERROR_REVALIDATE_EVENT) return J(n)
});
return O.current = !1, A.current = _, S.current = !0, C({
_k: E
}), G && ((0, i.isUndefined)(D) || i.IS_SERVER ? e() : (0, i.rAF)(e)), () => {
O.current = !0, r()
}
}, [_]), (0, i.useIsomorphicLayoutEffect)(() => {
let e;
function t() {
let t = (0, i.isFunction)(p) ? p(R().data) : p;
t && -1 !== e && (e = setTimeout(r, t))
}
function r() {
!R().error && (m || k.current.isVisible()) && (g || k.current.isOnline()) ? J(a).then(t) : t()
}
return t(), () => {
e && (clearTimeout(e), e = -1)
}
}, [p, m, g, _]), (0, t.useDebugValue)(W), f && (0, i.isUndefined)(D) && _) {
if (!i.IS_REACT_LEGACY && i.IS_SERVER) throw Error("Fallback data is required when using suspense in SSR.");
I.current = n, k.current = o, O.current = !1;
let e = w[_];
if ((0, i.isUndefined)(e) || s(X(e)), (0, i.isUndefined)($)) {
let e = J(a);
(0, i.isUndefined)(W) || (e.status = "fulfilled", e.value = !0), s(e)
} else throw $
}
return {
mutate: X,
get data() {
return M.data = !0, W
},
get error() {
return M.error = !0, $
},
get isValidating() {
return M.isValidating = !0, H
},
get isLoading() {
return M.isLoading = !0, Y
}
}
})
},
100219: e => {
"use strict";
e.s({}), e.i(564639), e.i(378469), e.i(606964), e.i(855763), e.i(898813)
},
318927: e => {
"use strict";
e.s({
useTurborepoMinutesSaved: () => r
}), e.i(100219);
var t = e.i(898813);
function r() {
return (0, t.default)("/api/remote-cache-minutes-saved", () => fetch("/api/remote-cache-minutes-saved").then(e => e.json()), {
revalidateOnMount: !0,
revalidateIfStale: !0,
refreshInterval: 1e4
}).data
}
},
185401: e => {
"use strict";
e.s({
RemoteCacheCounterClient: () => l
});
var t = e.i(892988);
e.i(519607);
var r = e.i(22140),
i = e.i(328871),
n = e.i(378469),
s = e.i(13680),
a = e.i(318927);
let o = Intl.NumberFormat(void 0, {
maximumFractionDigits: 0
}),
u = 0xa7e9f00 / 60;
function l({
className: e
}) {
let l = (0, a.useTurborepoMinutesSaved)()?.total,
[f, d] = (0, n.useState)(l ? l / 60 : void 0);
(0, n.useEffect)(() => {
l && d(l / 60)
}, []);
let c = Number.isFinite(f) ? f : u,
h = (0, i.useSpring)({
val: l ? l / 60 : u,
from: {
val: c
},
config: {
mass: 1,
tension: 170,
friction: 60,
clamp: !0
}
});
return (0, t.jsx)(r.animated.p, {
className: (0, s.cn)("inline-block tabular-nums min-w-[94.6875px]", e),
children: h.val?.to(e => o.format(e))
})
}
}
}]);