import { o as _s } from "./rolldown-runtime.js";
import { i as Ws } from "./vendor/react.js";
var Oe = /* @__PURE__ */ _s(Ws(), 1);
function Ln(t) {
  const e = (0, Oe.useRef)(null);
  return e.current === null && (e.current = t()), e.current;
}
function js(t, e) {
  t.indexOf(e) === -1 && t.push(e);
}
function Us(t, e) {
  const s = t.indexOf(e);
  s > -1 && t.splice(s, 1);
}
var _ = (t, e, s) => s > e ? e : s < t ? t : s, Mt = () => {
}, at = () => {
}, W = {}, Ne = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
function Ys(t) {
  return typeof t == "object" && t !== null;
}
var Ke = (t) => /^0[^.\s]+$/u.test(t);
// @__NO_SIDE_EFFECTS__
function Le(t) {
  let e;
  return () => (e === void 0 && (e = t()), e);
}
var H = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Gs = (t, e) => (s) => e(t(s)), zt = (...t) => t.reduce(Gs), $e = /* @__NO_SIDE_EFFECTS__ */ (t, e, s) => {
  const r = e - t;
  return r === 0 ? 1 : (s - t) / r;
}, _e = class {
  constructor() {
    this.subscriptions = [];
  }
  add(t) {
    return js(this.subscriptions, t), () => Us(this.subscriptions, t);
  }
  notify(t, e, s) {
    const r = this.subscriptions.length;
    if (r)
      if (r === 1) this.subscriptions[0](t, e, s);
      else for (let i = 0; i < r; i++) {
        const n = this.subscriptions[i];
        n && n(t, e, s);
      }
  }
  getSize() {
    return this.subscriptions.length;
  }
  clear() {
    this.subscriptions.length = 0;
  }
}, B = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, E = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
function We(t, e) {
  return e ? t * (1e3 / e) : 0;
}
var je = (t, e, s) => (((1 - 3 * s + 3 * e) * t + (3 * s - 6 * e)) * t + 3 * e) * t, Xs = 1e-7, zs = 12;
function qs(t, e, s, r, i) {
  let n, a, o = 0;
  do
    a = e + (s - e) / 2, n = je(a, r, i) - t, n > 0 ? s = a : e = a;
  while (Math.abs(n) > Xs && ++o < zs);
  return a;
}
function ut(t, e, s, r) {
  if (t === e && s === r) return H;
  const i = (n) => qs(n, 0, 1, t, s);
  return (n) => n === 0 || n === 1 ? n : je(i(n), e, r);
}
var Ue = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Ye = (t) => (e) => 1 - t(1 - e), Ge = /* @__PURE__ */ ut(0.33, 1.53, 0.69, 0.99), qt = /* @__PURE__ */ Ye(Ge), Xe = /* @__PURE__ */ Ue(qt), ze = (t) => t >= 1 ? 1 : (t *= 2) < 1 ? 0.5 * qt(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Zt = (t) => 1 - Math.sin(Math.acos(t)), Zs = Ye(Zt), qe = Ue(Zt), Hs = /* @__PURE__ */ ut(0.42, 0, 1, 1), Js = /* @__PURE__ */ ut(0, 0, 0.58, 1), Ze = /* @__PURE__ */ ut(0.42, 0, 0.58, 1), Qs = (t) => Array.isArray(t) && typeof t[0] != "number", He = (t) => Array.isArray(t) && typeof t[0] == "number", ae = {
  linear: H,
  easeIn: Hs,
  easeInOut: Ze,
  easeOut: Js,
  circIn: Zt,
  circInOut: qe,
  circOut: Zs,
  backIn: qt,
  backInOut: Xe,
  backOut: Ge,
  anticipate: ze
}, tr = (t) => typeof t == "string", oe = (t) => {
  if (He(t)) {
    at(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
    const [e, s, r, i] = t;
    return ut(e, s, r, i);
  } else if (tr(t))
    return at(ae[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), ae[t];
  return t;
}, ft = [
  "setup",
  "read",
  "resolveKeyframes",
  "preUpdate",
  "update",
  "preRender",
  "render",
  "postRender"
], mt = {
  value: null,
  addProjectionMetrics: null
};
function er(t, e) {
  let s = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, n = !1;
  const a = /* @__PURE__ */ new WeakSet();
  let o = {
    delta: 0,
    timestamp: 0,
    isProcessing: !1
  }, l = 0;
  function c(h) {
    a.has(h) && (u.schedule(h), t()), l++, h(o);
  }
  const u = {
    schedule: (h, f = !1, p = !1) => {
      const m = p && i ? s : r;
      return f && a.add(h), m.add(h), h;
    },
    cancel: (h) => {
      r.delete(h), a.delete(h);
    },
    process: (h) => {
      if (o = h, i) {
        n = !0;
        return;
      }
      i = !0;
      const f = s;
      s = r, r = f, s.forEach(c), e && mt.value && mt.value.frameloop[e].push(l), l = 0, s.clear(), i = !1, n && (n = !1, u.process(h));
    }
  };
  return u;
}
var sr = 40;
function Je(t, e) {
  let s = !1, r = !0;
  const i = {
    delta: 0,
    timestamp: 0,
    isProcessing: !1
  }, n = () => s = !0, a = ft.reduce((V, v) => (V[v] = er(n, e ? v : void 0), V), {}), { setup: o, read: l, resolveKeyframes: c, preUpdate: u, update: h, preRender: f, render: p, postRender: m } = a, g = () => {
    const V = W.useManualTiming, v = V ? i.timestamp : performance.now();
    s = !1, V || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(v - i.timestamp, sr), 1)), i.timestamp = v, i.isProcessing = !0, o.process(i), l.process(i), c.process(i), u.process(i), h.process(i), f.process(i), p.process(i), m.process(i), i.isProcessing = !1, s && e && (r = !1, t(g));
  }, x = () => {
    s = !0, r = !0, i.isProcessing || t(g);
  };
  return {
    schedule: ft.reduce((V, v) => {
      const M = a[v];
      return V[v] = (C, P = !1, b = !1) => (s || x(), M.schedule(C, P, b)), V;
    }, {}),
    cancel: (V) => {
      for (let v = 0; v < ft.length; v++) a[ft[v]].cancel(V);
    },
    state: i,
    steps: a
  };
}
var { schedule: O, cancel: Pt, state: gt, steps: $n } = /* @__PURE__ */ Je(typeof requestAnimationFrame < "u" ? requestAnimationFrame : H, !0), pt;
function rr() {
  pt = void 0;
}
var D = {
  now: () => (pt === void 0 && D.set(gt.isProcessing || W.useManualTiming ? gt.timestamp : performance.now()), pt),
  set: (t) => {
    pt = t, queueMicrotask(rr);
  }
}, vt = {
  layout: 0,
  mainThread: 0,
  waapi: 0
}, Qe = (t) => (e) => typeof e == "string" && e.startsWith(t), ts = /* @__PURE__ */ Qe("--"), ir = /* @__PURE__ */ Qe("var(--"), Ht = (t) => ir(t) ? nr.test(t.split("/*")[0].trim()) : !1, nr = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
function le(t) {
  return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
}
var J = {
  test: (t) => typeof t == "number",
  parse: parseFloat,
  transform: (t) => t
}, ot = {
  ...J,
  transform: (t) => _(0, 1, t)
}, dt = {
  ...J,
  default: 1
}, it = (t) => Math.round(t * 1e5) / 1e5, Jt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
function ar(t) {
  return t == null;
}
var or = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Qt = (t, e) => (s) => !!(typeof s == "string" && or.test(s) && s.startsWith(t) || e && !ar(s) && Object.prototype.hasOwnProperty.call(s, e)), es = (t, e, s) => (r) => {
  if (typeof r != "string") return r;
  const [i, n, a, o] = r.match(Jt);
  return {
    [t]: parseFloat(i),
    [e]: parseFloat(n),
    [s]: parseFloat(a),
    alpha: o !== void 0 ? parseFloat(o) : 1
  };
}, lr = (t) => _(0, 255, t), wt = {
  ...J,
  transform: (t) => Math.round(lr(t))
}, U = {
  test: /* @__PURE__ */ Qt("rgb", "red"),
  parse: /* @__PURE__ */ es("red", "green", "blue"),
  transform: ({ red: t, green: e, blue: s, alpha: r = 1 }) => "rgba(" + wt.transform(t) + ", " + wt.transform(e) + ", " + wt.transform(s) + ", " + it(ot.transform(r)) + ")"
};
function ur(t) {
  let e = "", s = "", r = "", i = "";
  return t.length > 5 ? (e = t.substring(1, 3), s = t.substring(3, 5), r = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), s = t.substring(2, 3), r = t.substring(3, 4), i = t.substring(4, 5), e += e, s += s, r += r, i += i), {
    red: parseInt(e, 16),
    green: parseInt(s, 16),
    blue: parseInt(r, 16),
    alpha: i ? parseInt(i, 16) / 255 : 1
  };
}
var Bt = {
  test: /* @__PURE__ */ Qt("#"),
  parse: ur,
  transform: U.transform
}, ct = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
  test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
  parse: parseFloat,
  transform: (e) => `${e}${t}`
}), L = /* @__PURE__ */ ct("deg"), q = /* @__PURE__ */ ct("%"), d = /* @__PURE__ */ ct("px"), cr = /* @__PURE__ */ ct("vh"), hr = /* @__PURE__ */ ct("vw"), ue = {
  ...q,
  parse: (t) => q.parse(t) / 100,
  transform: (t) => q.transform(t * 100)
}, z = {
  test: /* @__PURE__ */ Qt("hsl", "hue"),
  parse: /* @__PURE__ */ es("hue", "saturation", "lightness"),
  transform: ({ hue: t, saturation: e, lightness: s, alpha: r = 1 }) => "hsla(" + Math.round(t) + ", " + q.transform(it(e)) + ", " + q.transform(it(s)) + ", " + it(ot.transform(r)) + ")"
}, w = {
  test: (t) => U.test(t) || Bt.test(t) || z.test(t),
  parse: (t) => U.test(t) ? U.parse(t) : z.test(t) ? z.parse(t) : Bt.parse(t),
  transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? U.transform(t) : z.transform(t),
  getAnimatableNone: (t) => {
    const e = w.parse(t);
    return e.alpha = 0, w.transform(e);
  }
}, fr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
function dr(t) {
  return isNaN(t) && typeof t == "string" && (t.match(Jt)?.length || 0) + (t.match(fr)?.length || 0) > 0;
}
var ss = "number", rs = "color", pr = "var", mr = "var(", ce = "${}", gr = /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;
function Z(t) {
  const e = t.toString(), s = [], r = {
    color: [],
    number: [],
    var: []
  }, i = [];
  let n = 0;
  return {
    values: s,
    split: e.replace(gr, (a) => (w.test(a) ? (r.color.push(n), i.push(rs), s.push(w.parse(a))) : a.startsWith(mr) ? (r.var.push(n), i.push(pr), s.push(a)) : (r.number.push(n), i.push(ss), s.push(parseFloat(a))), ++n, ce)).split(ce),
    indexes: r,
    types: i
  };
}
function vr(t) {
  return Z(t).values;
}
function is({ split: t, types: e }) {
  const s = t.length;
  return (r) => {
    let i = "";
    for (let n = 0; n < s; n++)
      if (i += t[n], r[n] !== void 0) {
        const a = e[n];
        a === ss ? i += it(r[n]) : a === rs ? i += w.transform(r[n]) : i += r[n];
      }
    return i;
  };
}
function yr(t) {
  return is(Z(t));
}
var br = (t) => typeof t == "number" ? 0 : w.test(t) ? w.getAnimatableNone(t) : t, Tr = (t, e) => typeof t == "number" ? e?.trim().endsWith("/") ? t : 0 : br(t);
function xr(t) {
  const e = Z(t);
  return is(e)(e.values.map((s, r) => Tr(s, e.split[r])));
}
var I = {
  test: dr,
  parse: vr,
  createTransformer: yr,
  getAnimatableNone: xr
};
function At(t, e, s) {
  return s < 0 && (s += 1), s > 1 && (s -= 1), s < 1 / 6 ? t + (e - t) * 6 * s : s < 1 / 2 ? e : s < 2 / 3 ? t + (e - t) * (2 / 3 - s) * 6 : t;
}
function Vr({ hue: t, saturation: e, lightness: s, alpha: r }) {
  t /= 360, e /= 100, s /= 100;
  let i = 0, n = 0, a = 0;
  if (!e) i = n = a = s;
  else {
    const o = s < 0.5 ? s * (1 + e) : s + e - s * e, l = 2 * s - o;
    i = At(l, o, t + 1 / 3), n = At(l, o, t), a = At(l, o, t - 1 / 3);
  }
  return {
    red: Math.round(i * 255),
    green: Math.round(n * 255),
    blue: Math.round(a * 255),
    alpha: r
  };
}
function yt(t, e) {
  return (s) => s > 0 ? e : t;
}
var Q = (t, e, s) => t + (e - t) * s, Ct = (t, e, s) => {
  const r = t * t, i = s * (e * e - r) + r;
  return i < 0 ? 0 : Math.sqrt(i);
}, Mr = [
  Bt,
  U,
  z
], Sr = (t) => Mr.find((e) => e.test(t));
function he(t) {
  const e = Sr(t);
  if (Mt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e) return !1;
  let s = e.parse(t);
  return e === z && (s = Vr(s)), s;
}
var fe = (t, e) => {
  const s = he(t), r = he(e);
  if (!s || !r) return yt(t, e);
  const i = { ...s };
  return (n) => (i.red = Ct(s.red, r.red, n), i.green = Ct(s.green, r.green, n), i.blue = Ct(s.blue, r.blue, n), i.alpha = Q(s.alpha, r.alpha, n), U.transform(i));
}, kt = /* @__PURE__ */ new Set(["none", "hidden"]);
function wr(t, e) {
  return kt.has(t) ? (s) => s <= 0 ? t : e : (s) => s >= 1 ? e : t;
}
function Ar(t, e) {
  return (s) => Q(t, e, s);
}
function te(t) {
  return typeof t == "number" ? Ar : typeof t == "string" ? Ht(t) ? yt : w.test(t) ? fe : Dr : Array.isArray(t) ? ns : typeof t == "object" ? w.test(t) ? fe : Cr : yt;
}
function ns(t, e) {
  const s = [...t], r = s.length, i = t.map((n, a) => te(n)(n, e[a]));
  return (n) => {
    for (let a = 0; a < r; a++) s[a] = i[a](n);
    return s;
  };
}
function Cr(t, e) {
  const s = {
    ...t,
    ...e
  }, r = {};
  for (const i in s) t[i] !== void 0 && e[i] !== void 0 && (r[i] = te(t[i])(t[i], e[i]));
  return (i) => {
    for (const n in r) s[n] = r[n](i);
    return s;
  };
}
function Fr(t, e) {
  const s = [], r = {
    color: 0,
    var: 0,
    number: 0
  };
  for (let i = 0; i < e.values.length; i++) {
    const n = e.types[i], a = t.indexes[n][r[n]];
    s[i] = t.values[a] ?? 0, r[n]++;
  }
  return s;
}
var Dr = (t, e) => {
  const s = I.createTransformer(e), r = Z(t), i = Z(e);
  return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? kt.has(t) && !i.values.length || kt.has(e) && !r.values.length ? wr(t, e) : zt(ns(Fr(r, i), i.values), s) : (Mt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), yt(t, e));
};
function as(t, e, s) {
  return typeof t == "number" && typeof e == "number" && typeof s == "number" ? Q(t, e, s) : te(t)(t, e);
}
var Rr = (t) => {
  const e = ({ timestamp: s }) => t(s);
  return {
    start: (s = !0) => O.update(e, s),
    stop: () => Pt(e),
    now: () => gt.isProcessing ? gt.timestamp : D.now()
  };
}, os = (t, e, s = 10) => {
  let r = "";
  const i = Math.max(Math.round(e / s), 2);
  for (let n = 0; n < i; n++) r += Math.round(t(n / (i - 1)) * 1e4) / 1e4 + ", ";
  return `linear(${r.substring(0, r.length - 2)})`;
}, ls = 2e4;
function ee(t) {
  let e = 0;
  const s = 50;
  let r = t.next(e);
  for (; !r.done && e < 2e4; )
    e += s, r = t.next(e);
  return e >= 2e4 ? 1 / 0 : e;
}
function Pr(t, e = 100, s) {
  const r = s({
    ...t,
    keyframes: [0, e]
  }), i = Math.min(ee(r), ls);
  return {
    type: "keyframes",
    ease: (n) => r.next(i * n).value / e,
    duration: E(i)
  };
}
var S = {
  stiffness: 100,
  damping: 10,
  mass: 1,
  velocity: 0,
  duration: 800,
  bounce: 0.3,
  visualDuration: 0.3,
  restSpeed: {
    granular: 0.01,
    default: 2
  },
  restDelta: {
    granular: 5e-3,
    default: 0.5
  },
  minDuration: 0.01,
  maxDuration: 10,
  minDamping: 0.05,
  maxDamping: 1
};
function Et(t, e) {
  return t * Math.sqrt(1 - e * e);
}
var Br = 12;
function kr(t, e, s) {
  let r = s;
  for (let i = 1; i < Br; i++) r = r - t(r) / e(r);
  return r;
}
var Ft = 1e-3;
function Er({ duration: t = S.duration, bounce: e = S.bounce, velocity: s = S.velocity, mass: r = S.mass }) {
  let i, n;
  Mt(t <= B(S.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
  let a = 1 - e;
  a = _(S.minDamping, S.maxDamping, a), t = _(S.minDuration, S.maxDuration, E(t)), a < 1 ? (i = (c) => {
    const u = c * a, h = u * t, f = u - s, p = Et(c, a), m = Math.exp(-h);
    return Ft - f / p * m;
  }, n = (c) => {
    const u = c * a * t, h = u * s + s, f = Math.pow(a, 2) * Math.pow(c, 2) * t, p = Math.exp(-u), m = Et(Math.pow(c, 2), a);
    return (-i(c) + Ft > 0 ? -1 : 1) * ((h - f) * p) / m;
  }) : (i = (c) => {
    const u = Math.exp(-c * t), h = (c - s) * t + 1;
    return -Ft + u * h;
  }, n = (c) => Math.exp(-c * t) * ((s - c) * (t * t)));
  const o = 5 / t, l = kr(i, n, o);
  if (t = B(t), isNaN(l)) return {
    stiffness: S.stiffness,
    damping: S.damping,
    duration: t
  };
  {
    const c = Math.pow(l, 2) * r;
    return {
      stiffness: c,
      damping: a * 2 * Math.sqrt(r * c),
      duration: t
    };
  }
}
var Ir = ["duration", "bounce"], Or = [
  "stiffness",
  "damping",
  "mass"
];
function de(t, e) {
  return e.some((s) => t[s] !== void 0);
}
function Nr(t) {
  let e = {
    velocity: S.velocity,
    stiffness: S.stiffness,
    damping: S.damping,
    mass: S.mass,
    isResolvedFromDuration: !1,
    ...t
  };
  if (!de(t, Or) && de(t, Ir))
    if (e.velocity = 0, t.visualDuration) {
      const s = t.visualDuration, r = 2 * Math.PI / (s * 1.2), i = r * r, n = 2 * _(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
      e = {
        ...e,
        mass: S.mass,
        stiffness: i,
        damping: n
      };
    } else {
      const s = Er({
        ...t,
        velocity: 0
      });
      e = {
        ...e,
        ...s,
        mass: S.mass
      }, e.isResolvedFromDuration = !0;
    }
  return e;
}
function bt(t = S.visualDuration, e = S.bounce) {
  const s = typeof t != "object" ? {
    visualDuration: t,
    keyframes: [0, 1],
    bounce: e
  } : t;
  let { restSpeed: r, restDelta: i } = s;
  const n = s.keyframes[0], a = s.keyframes[s.keyframes.length - 1], o = {
    done: !1,
    value: n
  }, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: p } = Nr({
    ...s,
    velocity: -E(s.velocity || 0)
  }), m = f || 0, g = c / (2 * Math.sqrt(l * u)), x = a - n, y = E(Math.sqrt(l / u)), k = Math.abs(x) < 5;
  r || (r = k ? S.restSpeed.granular : S.restSpeed.default), i || (i = k ? S.restDelta.granular : S.restDelta.default);
  let V, v, M, C, P, b;
  if (g < 1)
    M = Et(y, g), C = (m + g * y * x) / M, V = (T) => a - Math.exp(-g * y * T) * (C * Math.sin(M * T) + x * Math.cos(M * T)), P = g * y * C + x * M, b = g * y * x - C * M, v = (T) => Math.exp(-g * y * T) * (P * Math.sin(M * T) + b * Math.cos(M * T));
  else if (g === 1) {
    V = (F) => a - Math.exp(-y * F) * (x + (m + y * x) * F);
    const T = m + y * x;
    v = (F) => Math.exp(-y * F) * (y * T * F - m);
  } else {
    const T = y * Math.sqrt(g * g - 1);
    V = (K) => {
      const X = Math.exp(-g * y * K), j = Math.min(T * K, 300);
      return a - X * ((m + g * y * x) * Math.sinh(j) + T * x * Math.cosh(j)) / T;
    };
    const F = (m + g * y * x) / T, N = g * y * F - x * T, ht = g * y * x - F * T;
    v = (K) => {
      const X = Math.exp(-g * y * K), j = Math.min(T * K, 300);
      return X * (N * Math.sinh(j) + ht * Math.cosh(j));
    };
  }
  const A = {
    calculatedDuration: p && h || null,
    velocity: (T) => B(v(T)),
    next: (T) => {
      if (!p && g < 1) {
        const N = Math.exp(-g * y * T), ht = Math.sin(M * T), K = Math.cos(M * T), X = a - N * (C * ht + x * K), j = B(N * (P * ht + b * K));
        return o.done = Math.abs(j) <= r && Math.abs(a - X) <= i, o.value = o.done ? a : X, o;
      }
      const F = V(T);
      if (p)
        o.done = T >= h;
      else {
        const N = B(v(T));
        o.done = Math.abs(N) <= r && Math.abs(a - F) <= i;
      }
      return o.value = o.done ? a : F, o;
    },
    toString: () => {
      const T = Math.min(ee(A), ls), F = os((N) => A.next(T * N).value, T, 30);
      return T + "ms " + F;
    },
    toTransition: () => {
    }
  };
  return A;
}
bt.applyToOptions = (t) => {
  const e = Pr(t, 100, bt);
  return t.ease = e.ease, t.duration = B(e.duration), t.type = "keyframes", t;
};
var Kr = 5;
function us(t, e, s) {
  const r = Math.max(e - Kr, 0);
  return We(s - t(r), e - r);
}
function It({ keyframes: t, velocity: e = 0, power: s = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: n = 500, modifyTarget: a, min: o, max: l, restDelta: c = 0.5, restSpeed: u }) {
  const h = t[0], f = {
    done: !1,
    value: h
  }, p = (b) => o !== void 0 && b < o || l !== void 0 && b > l, m = (b) => o === void 0 ? l : l === void 0 || Math.abs(o - b) < Math.abs(l - b) ? o : l;
  let g = s * e;
  const x = h + g, y = a === void 0 ? x : a(x);
  y !== x && (g = y - h);
  const k = (b) => -g * Math.exp(-b / r), V = (b) => y + k(b), v = (b) => {
    const A = k(b), T = V(b);
    f.done = Math.abs(A) <= c, f.value = f.done ? y : T;
  };
  let M, C;
  const P = (b) => {
    p(f.value) && (M = b, C = bt({
      keyframes: [f.value, m(f.value)],
      velocity: us(V, b, f.value),
      damping: i,
      stiffness: n,
      restDelta: c,
      restSpeed: u
    }));
  };
  return P(0), {
    calculatedDuration: null,
    next: (b) => {
      let A = !1;
      return !C && M === void 0 && (A = !0, v(b), P(b)), M !== void 0 && b >= M ? C.next(b - M) : (!A && v(b), f);
    }
  };
}
function Lr(t, e, s) {
  const r = [], i = s || W.mix || as, n = t.length - 1;
  for (let a = 0; a < n; a++) {
    let o = i(t[a], t[a + 1]);
    e && (o = zt(Array.isArray(e) ? e[a] || H : e, o)), r.push(o);
  }
  return r;
}
function $r(t, e, { clamp: s = !0, ease: r, mixer: i } = {}) {
  const n = t.length;
  if (at(n === e.length, "Both input and output ranges must be the same length", "range-length"), n === 1) return () => e[0];
  if (n === 2 && e[0] === e[1]) return () => e[1];
  const a = t[0] === t[1];
  t[0] > t[n - 1] && (t = [...t].reverse(), e = [...e].reverse());
  const o = Lr(e, r, i), l = o.length, c = (u) => {
    if (a && u < t[0]) return e[0];
    let h = 0;
    if (l > 1)
      for (; h < t.length - 2 && !(u < t[h + 1]); h++) ;
    const f = $e(t[h], t[h + 1], u);
    return o[h](f);
  };
  return s ? (u) => c(_(t[0], t[n - 1], u)) : c;
}
function _r(t, e) {
  const s = t[t.length - 1];
  for (let r = 1; r <= e; r++) {
    const i = $e(0, e, r);
    t.push(Q(s, 1, i));
  }
}
function Wr(t) {
  const e = [0];
  return _r(e, t.length - 1), e;
}
function jr(t, e) {
  return t.map((s) => s * e);
}
function Ur(t, e) {
  return t.map(() => e || Ze).splice(0, t.length - 1);
}
function nt({ duration: t = 300, keyframes: e, times: s, ease: r = "easeInOut" }) {
  const i = Qs(r) ? r.map(oe) : oe(r), n = {
    done: !1,
    value: e[0]
  }, a = $r(jr(s && s.length === e.length ? s : Wr(e), t), e, { ease: Array.isArray(i) ? i : Ur(e, i) });
  return {
    calculatedDuration: t,
    next: (o) => (n.value = a(o), n.done = o >= t, n)
  };
}
var Yr = (t) => t !== null;
function St(t, { repeat: e, repeatType: s = "loop" }, r, i = 1) {
  const n = t.filter(Yr), a = i < 0 || e && s !== "loop" && e % 2 === 1 ? 0 : n.length - 1;
  return !a || r === void 0 ? n[a] : r;
}
var Gr = {
  decay: It,
  inertia: It,
  tween: nt,
  keyframes: nt,
  spring: bt
};
function cs(t) {
  typeof t.type == "string" && (t.type = Gr[t.type]);
}
var se = class {
  constructor() {
    this.updateFinished();
  }
  get finished() {
    return this._finished;
  }
  updateFinished() {
    this._finished = new Promise((t) => {
      this.resolve = t;
    });
  }
  notifyFinished() {
    this.resolve();
  }
  then(t, e) {
    return this.finished.then(t, e);
  }
}, Xr = (t) => t / 100, Tt = class extends se {
  constructor(t) {
    super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
      done: !1,
      value: void 0
    }, this.stop = () => {
      const { motionValue: e } = this.options;
      e && e.updatedAt !== D.now() && this.tick(D.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
    }, vt.mainThread++, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
  }
  initAnimation() {
    const { options: t } = this;
    cs(t);
    const { type: e = nt, repeat: s = 0, repeatDelay: r = 0, repeatType: i, velocity: n = 0 } = t;
    let { keyframes: a } = t;
    const o = e || nt;
    o !== nt && typeof a[0] != "number" && (this.mixKeyframes = zt(Xr, as(a[0], a[1])), a = [0, 100]);
    const l = o({
      ...t,
      keyframes: a
    });
    i === "mirror" && (this.mirroredGenerator = o({
      ...t,
      keyframes: [...a].reverse(),
      velocity: -n
    })), l.calculatedDuration === null && (l.calculatedDuration = ee(l));
    const { calculatedDuration: c } = l;
    this.calculatedDuration = c, this.resolvedDuration = c + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator = l;
  }
  updateTime(t) {
    const e = Math.round(t - this.startTime) * this.playbackSpeed;
    this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = e;
  }
  tick(t, e = !1) {
    const { generator: s, totalDuration: r, mixKeyframes: i, mirroredGenerator: n, resolvedDuration: a, calculatedDuration: o } = this;
    if (this.startTime === null) return s.next(0);
    const { delay: l = 0, keyframes: c, repeat: u, repeatType: h, repeatDelay: f, type: p, onUpdate: m, finalKeyframe: g } = this.options;
    this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), e ? this.currentTime = t : this.updateTime(t);
    const x = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), y = this.playbackSpeed >= 0 ? x < 0 : x > r;
    this.currentTime = Math.max(x, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
    let k = this.currentTime, V = s;
    if (u) {
      const P = Math.min(this.currentTime, r) / a;
      let b = Math.floor(P), A = P % 1;
      !A && P >= 1 && (A = 1), A === 1 && b--, b = Math.min(b, u + 1), b % 2 && (h === "reverse" ? (A = 1 - A, f && (A -= f / a)) : h === "mirror" && (V = n)), k = _(0, 1, A) * a;
    }
    let v;
    y ? (this.delayState.value = c[0], v = this.delayState) : v = V.next(k), i && !y && (v.value = i(v.value));
    let { done: M } = v;
    !y && o !== null && (M = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
    const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && M);
    return C && p !== It && (v.value = St(c, this.options, g, this.speed)), m && m(v.value), C && this.finish(), v;
  }
  then(t, e) {
    return this.finished.then(t, e);
  }
  get duration() {
    return E(this.calculatedDuration);
  }
  get iterationDuration() {
    const { delay: t = 0 } = this.options || {};
    return this.duration + E(t);
  }
  get time() {
    return E(this.currentTime);
  }
  set time(t) {
    t = B(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = t, this.tick(t));
  }
  getGeneratorVelocity() {
    const t = this.currentTime;
    if (t <= 0) return this.options.velocity || 0;
    if (this.generator.velocity) return this.generator.velocity(t);
    const e = this.generator.next(t).value;
    return us((s) => this.generator.next(s).value, t, e);
  }
  get speed() {
    return this.playbackSpeed;
  }
  set speed(t) {
    const e = this.playbackSpeed !== t;
    e && this.driver && this.updateTime(D.now()), this.playbackSpeed = t, e && this.driver && (this.time = E(this.currentTime));
  }
  play() {
    if (this.isStopped) return;
    const { driver: t = Rr, startTime: e } = this.options;
    this.driver || (this.driver = t((r) => this.tick(r))), this.options.onPlay?.();
    const s = this.driver.now();
    this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = e ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
  }
  pause() {
    this.state = "paused", this.updateTime(D.now()), this.holdTime = this.currentTime;
  }
  complete() {
    this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
  }
  finish() {
    this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
  }
  cancel() {
    this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
  }
  teardown() {
    this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null, vt.mainThread--;
  }
  stopDriver() {
    this.driver && (this.driver.stop(), this.driver = void 0);
  }
  sample(t) {
    return this.startTime = 0, this.tick(t, !0);
  }
  attachTimeline(t) {
    return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
  }
};
function zr(t) {
  for (let e = 1; e < t.length; e++) t[e] ?? (t[e] = t[e - 1]);
}
var Y = (t) => t * 180 / Math.PI, Ot = (t) => Nt(Y(Math.atan2(t[1], t[0]))), qr = {
  x: 4,
  y: 5,
  translateX: 4,
  translateY: 5,
  scaleX: 0,
  scaleY: 3,
  scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
  rotate: Ot,
  rotateZ: Ot,
  skewX: (t) => Y(Math.atan(t[1])),
  skewY: (t) => Y(Math.atan(t[2])),
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
}, Nt = (t) => (t = t % 360, t < 0 && (t += 360), t), pe = Ot, me = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), ge = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Zr = {
  x: 12,
  y: 13,
  z: 14,
  translateX: 12,
  translateY: 13,
  translateZ: 14,
  scaleX: me,
  scaleY: ge,
  scale: (t) => (me(t) + ge(t)) / 2,
  rotateX: (t) => Nt(Y(Math.atan2(t[6], t[5]))),
  rotateY: (t) => Nt(Y(Math.atan2(-t[2], t[0]))),
  rotateZ: pe,
  rotate: pe,
  skewX: (t) => Y(Math.atan(t[4])),
  skewY: (t) => Y(Math.atan(t[1])),
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
};
function Kt(t) {
  return t.includes("scale") ? 1 : 0;
}
function Lt(t, e) {
  if (!t || t === "none") return Kt(e);
  const s = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
  let r, i;
  if (s)
    r = Zr, i = s;
  else {
    const o = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
    r = qr, i = o;
  }
  if (!i) return Kt(e);
  const n = r[e], a = i[1].split(",").map(Jr);
  return typeof n == "function" ? n(a) : a[n];
}
var Hr = (t, e) => {
  const { transform: s = "none" } = getComputedStyle(t);
  return Lt(s, e);
};
function Jr(t) {
  return parseFloat(t.trim());
}
var tt = [
  "transformPerspective",
  "x",
  "y",
  "z",
  "translateX",
  "translateY",
  "translateZ",
  "scale",
  "scaleX",
  "scaleY",
  "rotate",
  "rotateX",
  "rotateY",
  "rotateZ",
  "skew",
  "skewX",
  "skewY"
], et = new Set(tt), ve = (t) => t === J || t === d, Qr = /* @__PURE__ */ new Set([
  "x",
  "y",
  "z"
]), ti = tt.filter((t) => !Qr.has(t));
function ei(t) {
  const e = [];
  return ti.forEach((s) => {
    const r = t.getValue(s);
    r !== void 0 && (e.push([s, r.get()]), r.set(s.startsWith("scale") ? 1 : 0));
  }), e;
}
var $ = {
  width: ({ x: t }, { paddingLeft: e = "0", paddingRight: s = "0", boxSizing: r }) => {
    const i = t.max - t.min;
    return r === "border-box" ? i : i - parseFloat(e) - parseFloat(s);
  },
  height: ({ y: t }, { paddingTop: e = "0", paddingBottom: s = "0", boxSizing: r }) => {
    const i = t.max - t.min;
    return r === "border-box" ? i : i - parseFloat(e) - parseFloat(s);
  },
  top: (t, { top: e }) => parseFloat(e),
  left: (t, { left: e }) => parseFloat(e),
  bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
  right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
  x: (t, { transform: e }) => Lt(e, "x"),
  y: (t, { transform: e }) => Lt(e, "y")
};
$.translateX = $.x;
$.translateY = $.y;
var G = /* @__PURE__ */ new Set(), $t = !1, _t = !1, Wt = !1;
function hs() {
  if (_t) {
    const t = Array.from(G).filter((r) => r.needsMeasurement), e = new Set(t.map((r) => r.element)), s = /* @__PURE__ */ new Map();
    e.forEach((r) => {
      const i = ei(r);
      i.length && (s.set(r, i), r.render());
    }), t.forEach((r) => r.measureInitialState()), e.forEach((r) => {
      r.render();
      const i = s.get(r);
      i && i.forEach(([n, a]) => {
        r.getValue(n)?.set(a);
      });
    }), t.forEach((r) => r.measureEndState()), t.forEach((r) => {
      r.suspendedScrollY !== void 0 && window.scrollTo(0, r.suspendedScrollY);
    });
  }
  _t = !1, $t = !1, G.forEach((t) => t.complete(Wt)), G.clear();
}
function fs() {
  G.forEach((t) => {
    t.readKeyframes(), t.needsMeasurement && (_t = !0);
  });
}
function si() {
  Wt = !0, fs(), hs(), Wt = !1;
}
var re = class {
  constructor(t, e, s, r, i, n = !1) {
    this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = e, this.name = s, this.motionValue = r, this.element = i, this.isAsync = n;
  }
  scheduleResolve() {
    this.state = "scheduled", this.isAsync ? (G.add(this), $t || ($t = !0, O.read(fs), O.resolveKeyframes(hs))) : (this.readKeyframes(), this.complete());
  }
  readKeyframes() {
    const { unresolvedKeyframes: t, name: e, element: s, motionValue: r } = this;
    if (t[0] === null) {
      const i = r?.get(), n = t[t.length - 1];
      if (i !== void 0) t[0] = i;
      else if (s && e) {
        const a = s.readValue(e, n);
        a != null && (t[0] = a);
      }
      t[0] === void 0 && (t[0] = n), r && i === void 0 && r.set(t[0]);
    }
    zr(t);
  }
  setFinalKeyframe() {
  }
  measureInitialState() {
  }
  renderEndStyles() {
  }
  measureEndState() {
  }
  complete(t = !1) {
    this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), G.delete(this);
  }
  cancel() {
    this.state === "scheduled" && (G.delete(this), this.state = "pending");
  }
  resume() {
    this.state === "pending" && this.scheduleResolve();
  }
}, ri = (t) => t.startsWith("--");
function ds(t, e, s) {
  ri(e) ? t.style.setProperty(e, s) : t.style[e] = s;
}
var ii = {};
function ps(t, e) {
  const s = /* @__PURE__ */ Le(t);
  return () => ii[e] ?? s();
}
var ni = /* @__PURE__ */ ps(() => window.ScrollTimeline !== void 0, "scrollTimeline"), ms = /* @__PURE__ */ ps(() => {
  try {
    document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
  } catch {
    return !1;
  }
  return !0;
}, "linearEasing"), rt = ([t, e, s, r]) => `cubic-bezier(${t}, ${e}, ${s}, ${r})`, ye = {
  linear: "linear",
  ease: "ease",
  easeIn: "ease-in",
  easeOut: "ease-out",
  easeInOut: "ease-in-out",
  circIn: /* @__PURE__ */ rt([
    0,
    0.65,
    0.55,
    1
  ]),
  circOut: /* @__PURE__ */ rt([
    0.55,
    0,
    1,
    0.45
  ]),
  backIn: /* @__PURE__ */ rt([
    0.31,
    0.01,
    0.66,
    -0.59
  ]),
  backOut: /* @__PURE__ */ rt([
    0.33,
    1.53,
    0.69,
    0.99
  ])
};
function gs(t, e) {
  if (t) return typeof t == "function" ? ms() ? os(t, e) : "ease-out" : He(t) ? rt(t) : Array.isArray(t) ? t.map((s) => gs(s, e) || ye.easeOut) : ye[t];
}
function ai(t, e, s, { delay: r = 0, duration: i = 300, repeat: n = 0, repeatType: a = "loop", ease: o = "easeOut", times: l } = {}, c = void 0) {
  const u = { [e]: s };
  l && (u.offset = l);
  const h = gs(o, i);
  Array.isArray(h) && (u.easing = h), mt.value && vt.waapi++;
  const f = {
    delay: r,
    duration: i,
    easing: Array.isArray(h) ? "linear" : h,
    fill: "both",
    iterations: n + 1,
    direction: a === "reverse" ? "alternate" : "normal"
  };
  c && (f.pseudoElement = c);
  const p = t.animate(u, f);
  return mt.value && p.finished.finally(() => {
    vt.waapi--;
  }), p;
}
function vs(t) {
  return typeof t == "function" && "applyToOptions" in t;
}
function oi({ type: t, ...e }) {
  return vs(t) && ms() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
}
var ys = class extends se {
  constructor(t) {
    if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t) return;
    const { element: e, name: s, keyframes: r, pseudoElement: i, allowFlatten: n = !1, finalKeyframe: a, onComplete: o } = t;
    this.isPseudoElement = !!i, this.allowFlatten = n, this.options = t, at(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
    const l = oi(t);
    this.animation = ai(e, s, r, l, i), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
      if (this.finishedTime = this.time, !i) {
        const c = St(r, this.options, a, this.speed);
        this.updateMotionValue && this.updateMotionValue(c), ds(e, s, c), this.animation.cancel();
      }
      o?.(), this.notifyFinished();
    };
  }
  play() {
    this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
  }
  pause() {
    this.animation.pause();
  }
  complete() {
    this.animation.finish?.();
  }
  cancel() {
    try {
      this.animation.cancel();
    } catch {
    }
  }
  stop() {
    if (this.isStopped) return;
    this.isStopped = !0;
    const { state: t } = this;
    t === "idle" || t === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
  }
  commitStyles() {
    const t = this.options?.element;
    !this.isPseudoElement && t?.isConnected && this.animation.commitStyles?.();
  }
  get duration() {
    const t = this.animation.effect?.getComputedTiming?.().duration || 0;
    return E(Number(t));
  }
  get iterationDuration() {
    const { delay: t = 0 } = this.options || {};
    return this.duration + E(t);
  }
  get time() {
    return E(Number(this.animation.currentTime) || 0);
  }
  set time(t) {
    const e = this.finishedTime !== null;
    this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = B(t), e && this.animation.pause();
  }
  get speed() {
    return this.animation.playbackRate;
  }
  set speed(t) {
    t < 0 && (this.finishedTime = null), this.animation.playbackRate = t;
  }
  get state() {
    return this.finishedTime !== null ? "finished" : this.animation.playState;
  }
  get startTime() {
    return this.manualStartTime ?? Number(this.animation.startTime);
  }
  set startTime(t) {
    this.manualStartTime = this.animation.startTime = t;
  }
  attachTimeline({ timeline: t, rangeStart: e, rangeEnd: s, observe: r }) {
    return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && ni() ? (this.animation.timeline = t, e && (this.animation.rangeStart = e), s && (this.animation.rangeEnd = s), H) : r(this);
  }
}, bs = {
  anticipate: ze,
  backInOut: Xe,
  circInOut: qe
};
function li(t) {
  return t in bs;
}
function ui(t) {
  typeof t.ease == "string" && li(t.ease) && (t.ease = bs[t.ease]);
}
var Dt = 10, ci = class extends ys {
  constructor(t) {
    ui(t), cs(t), super(t), t.startTime !== void 0 && t.autoplay !== !1 && (this.startTime = t.startTime), this.options = t;
  }
  updateMotionValue(t) {
    const { motionValue: e, onUpdate: s, onComplete: r, element: i, ...n } = this.options;
    if (!e) return;
    if (t !== void 0) {
      e.set(t);
      return;
    }
    const a = new Tt({
      ...n,
      autoplay: !1
    }), o = Math.max(Dt, D.now() - this.startTime), l = _(0, Dt, o - Dt), c = a.sample(o).value, { name: u } = this.options;
    i && u && ds(i, u, c), e.setWithVelocity(a.sample(Math.max(0, o - l)).value, c, l), a.stop();
  }
}, be = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && (I.test(t) || t === "0") && !t.startsWith("url("));
function hi(t) {
  const e = t[0];
  if (t.length === 1) return !0;
  for (let s = 0; s < t.length; s++) if (t[s] !== e) return !0;
}
function fi(t, e, s, r) {
  const i = t[0];
  if (i === null) return !1;
  if (e === "display" || e === "visibility") return !0;
  const n = t[t.length - 1], a = be(i, e), o = be(n, e);
  return Mt(a === o, `You are trying to animate ${e} from "${i}" to "${n}". "${a ? n : i}" is not an animatable value.`, "value-not-animatable"), !a || !o ? !1 : hi(t) || (s === "spring" || vs(s)) && r;
}
function jt(t) {
  t.duration = 0, t.type = "keyframes";
}
var Ts = /* @__PURE__ */ new Set([
  "opacity",
  "clipPath",
  "filter",
  "transform"
]), di = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
function pi(t) {
  for (let e = 0; e < t.length; e++) if (typeof t[e] == "string" && di.test(t[e])) return !0;
  return !1;
}
var mi = /* @__PURE__ */ new Set([
  "color",
  "backgroundColor",
  "outlineColor",
  "fill",
  "stroke",
  "borderColor",
  "borderTopColor",
  "borderRightColor",
  "borderBottomColor",
  "borderLeftColor"
]), gi = /* @__PURE__ */ Le(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
function vi(t) {
  const { motionValue: e, name: s, repeatDelay: r, repeatType: i, damping: n, type: a, keyframes: o } = t;
  if (!(e?.owner?.current instanceof HTMLElement)) return !1;
  const { onUpdate: l, transformTemplate: c } = e.owner.getProps();
  return gi() && s && (Ts.has(s) || mi.has(s) && pi(o)) && (s !== "transform" || !c) && !l && !r && i !== "mirror" && n !== 0 && a !== "inertia";
}
var yi = 40, bi = class extends se {
  constructor({ autoplay: t = !0, delay: e = 0, type: s = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: n = "loop", keyframes: a, name: o, motionValue: l, element: c, ...u }) {
    super(), this.stop = () => {
      this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
    }, this.createdAt = D.now();
    const h = {
      autoplay: t,
      delay: e,
      type: s,
      repeat: r,
      repeatDelay: i,
      repeatType: n,
      name: o,
      motionValue: l,
      element: c,
      ...u
    }, f = c?.KeyframeResolver || re;
    this.keyframeResolver = new f(a, (p, m, g) => this.onKeyframesResolved(p, m, h, !g), o, l, c), this.keyframeResolver?.scheduleResolve();
  }
  onKeyframesResolved(t, e, s, r) {
    this.keyframeResolver = void 0;
    const { name: i, type: n, velocity: a, delay: o, isHandoff: l, onUpdate: c } = s;
    this.resolvedAt = D.now();
    let u = !0;
    fi(t, i, n, a) || (u = !1, (W.instantAnimations || !o) && c?.(St(t, s, e)), t[0] = t[t.length - 1], jt(s), s.repeat = 0);
    const h = {
      startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > yi ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
      finalKeyframe: e,
      ...s,
      keyframes: t
    }, f = u && !l && vi(h), p = h.motionValue?.owner?.current;
    let m;
    if (f) try {
      m = new ci({
        ...h,
        element: p
      });
    } catch {
      m = new Tt(h);
    }
    else m = new Tt(h);
    m.finished.then(() => {
      this.notifyFinished();
    }).catch(H), this.pendingTimeline && (this.stopTimeline = m.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = m;
  }
  get finished() {
    return this._animation ? this.animation.finished : this._finished;
  }
  then(t, e) {
    return this.finished.finally(t).then(() => {
    });
  }
  get animation() {
    return this._animation || (this.keyframeResolver?.resume(), si()), this._animation;
  }
  get duration() {
    return this.animation.duration;
  }
  get iterationDuration() {
    return this.animation.iterationDuration;
  }
  get time() {
    return this.animation.time;
  }
  set time(t) {
    this.animation.time = t;
  }
  get speed() {
    return this.animation.speed;
  }
  get state() {
    return this.animation.state;
  }
  set speed(t) {
    this.animation.speed = t;
  }
  get startTime() {
    return this.animation.startTime;
  }
  attachTimeline(t) {
    return this._animation ? this.stopTimeline = this.animation.attachTimeline(t) : this.pendingTimeline = t, () => this.stop();
  }
  play() {
    this.animation.play();
  }
  pause() {
    this.animation.pause();
  }
  complete() {
    this.animation.complete();
  }
  cancel() {
    this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
  }
}, Ti = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
function xi(t) {
  const e = Ti.exec(t);
  if (!e) return [,];
  const [, s, r, i] = e;
  return [`--${s ?? r}`, i];
}
var Vi = 4;
function xs(t, e, s = 1) {
  at(s <= Vi, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
  const [r, i] = xi(t);
  if (!r) return;
  const n = window.getComputedStyle(e).getPropertyValue(r);
  if (n) {
    const a = n.trim();
    return Ne(a) ? parseFloat(a) : a;
  }
  return Ht(i) ? xs(i, e, s + 1) : i;
}
var Mi = {
  type: "spring",
  stiffness: 500,
  damping: 25,
  restSpeed: 10
}, Si = (t) => ({
  type: "spring",
  stiffness: 550,
  damping: t === 0 ? 2 * Math.sqrt(550) : 30,
  restSpeed: 10
}), wi = {
  type: "keyframes",
  duration: 0.8
}, Ai = {
  type: "keyframes",
  ease: [
    0.25,
    0.1,
    0.35,
    1
  ],
  duration: 0.3
}, Ci = (t, { keyframes: e }) => e.length > 2 ? wi : et.has(t) ? t.startsWith("scale") ? Si(e[1]) : Mi : Ai;
function Vs(t, e) {
  if (t?.inherit && e) {
    const { inherit: s, ...r } = t;
    return {
      ...e,
      ...r
    };
  }
  return t;
}
function Ms(t, e) {
  const s = t?.[e] ?? t?.default ?? t;
  return s !== t ? Vs(s, t) : s;
}
var Fi = /* @__PURE__ */ new Set([
  "when",
  "delay",
  "delayChildren",
  "staggerChildren",
  "staggerDirection",
  "repeat",
  "repeatType",
  "repeatDelay",
  "from",
  "elapsed"
]);
function Di(t) {
  for (const e in t) if (!Fi.has(e)) return !0;
  return !1;
}
var Ss = (t, e, s, r = {}, i, n) => (a) => {
  const o = Ms(r, t) || {}, l = o.delay || r.delay || 0;
  let { elapsed: c = 0 } = r;
  c = c - B(l);
  const u = {
    keyframes: Array.isArray(s) ? s : [null, s],
    ease: "easeOut",
    velocity: e.getVelocity(),
    ...o,
    delay: -c,
    onUpdate: (f) => {
      e.set(f), o.onUpdate && o.onUpdate(f);
    },
    onComplete: () => {
      a(), o.onComplete && o.onComplete();
    },
    name: t,
    motionValue: e,
    element: n ? void 0 : i
  };
  Di(o) || Object.assign(u, Ci(t, u)), u.duration && (u.duration = B(u.duration)), u.repeatDelay && (u.repeatDelay = B(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
  let h = !1;
  if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (jt(u), u.delay === 0 && (h = !0)), (W.instantAnimations || W.skipAnimations || i?.shouldSkipAnimations) && (h = !0, jt(u), u.delay = 0), u.allowFlatten = !o.type && !o.ease, h && !n && e.get() !== void 0) {
    const f = St(u.keyframes, o);
    if (f !== void 0) {
      O.update(() => {
        u.onUpdate(f), u.onComplete();
      });
      return;
    }
  }
  return o.isSync ? new Tt(u) : new bi(u);
};
function Te(t) {
  const e = [{}, {}];
  return t?.values.forEach((s, r) => {
    e[0][r] = s.get(), e[1][r] = s.getVelocity();
  }), e;
}
function ws(t, e, s, r) {
  if (typeof e == "function") {
    const [i, n] = Te(r);
    e = e(s !== void 0 ? s : t.custom, i, n);
  }
  if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
    const [i, n] = Te(r);
    e = e(s !== void 0 ? s : t.custom, i, n);
  }
  return e;
}
function Ri(t, e, s) {
  const r = t.getProps();
  return ws(r, e, s !== void 0 ? s : r.custom, t);
}
var As = /* @__PURE__ */ new Set([
  "width",
  "height",
  "top",
  "left",
  "right",
  "bottom",
  ...tt
]), xe = 30, Pi = (t) => !isNaN(parseFloat(t)), Ve = { current: void 0 }, Bi = class {
  constructor(t, e = {}) {
    this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
      const r = D.now();
      if (this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
        for (const i of this.dependents) i.dirty();
    }, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
  }
  setCurrent(t) {
    this.current = t, this.updatedAt = D.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = Pi(this.current));
  }
  setPrevFrameValue(t = this.current) {
    this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
  }
  onChange(t) {
    return this.on("change", t);
  }
  on(t, e) {
    this.events[t] || (this.events[t] = new _e());
    const s = this.events[t].add(e);
    return t === "change" ? () => {
      s(), O.read(() => {
        this.events.change.getSize() || this.stop();
      });
    } : s;
  }
  clearListeners() {
    for (const t in this.events) this.events[t].clear();
  }
  attach(t, e) {
    this.passiveEffect = t, this.stopPassiveEffect = e;
  }
  set(t) {
    this.passiveEffect ? this.passiveEffect(t, this.updateAndNotify) : this.updateAndNotify(t);
  }
  setWithVelocity(t, e, s) {
    this.set(e), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - s;
  }
  jump(t, e = !0) {
    this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, e && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
  }
  dirty() {
    this.events.change?.notify(this.current);
  }
  addDependent(t) {
    this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
  }
  removeDependent(t) {
    this.dependents && this.dependents.delete(t);
  }
  get() {
    return Ve.current && Ve.current.push(this), this.current;
  }
  getPrevious() {
    return this.prev;
  }
  getVelocity() {
    const t = D.now();
    if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > xe) return 0;
    const e = Math.min(this.updatedAt - this.prevUpdatedAt, xe);
    return We(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
  }
  start(t) {
    return this.stop(), new Promise((e) => {
      this.hasAnimated = !0, this.animation = t(e), this.events.animationStart && this.events.animationStart.notify();
    }).then(() => {
      this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
    });
  }
  stop() {
    this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
  }
  isAnimating() {
    return !!this.animation;
  }
  clearAnimation() {
    delete this.animation;
  }
  destroy() {
    this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
  }
};
function lt(t, e) {
  return new Bi(t, e);
}
var ki = (t) => Array.isArray(t);
function Ei(t, e, s) {
  t.hasValue(e) ? t.getValue(e).set(s) : t.addValue(e, lt(s));
}
function Ii(t) {
  return ki(t) ? t[t.length - 1] || 0 : t;
}
function Oi(t, e) {
  let { transitionEnd: s = {}, transition: r = {}, ...i } = Ri(t, e) || {};
  i = {
    ...i,
    ...s
  };
  for (const n in i) Ei(t, n, Ii(i[n]));
}
var R = (t) => !!(t && t.getVelocity);
function Ni(t) {
  return !!(R(t) && t.add);
}
function Ki(t, e) {
  const s = t.getValue("willChange");
  if (Ni(s)) return s.add(e);
  if (!s && W.WillChange) {
    const r = new W.WillChange("auto");
    t.addValue("willChange", r), r.add(e);
  }
}
function ie(t) {
  return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
}
var Li = "framerAppearId", $i = "data-" + ie(Li);
function _i(t) {
  return t.props[$i];
}
function Wi({ protectedKeys: t, needsAnimating: e }, s) {
  const r = t.hasOwnProperty(s) && e[s] !== !0;
  return e[s] = !1, r;
}
function _n(t, e, { delay: s = 0, transitionOverride: r, type: i } = {}) {
  let { transition: n, transitionEnd: a, ...o } = e;
  const l = t.getDefaultTransition();
  n = n ? Vs(n, l) : l;
  const c = n?.reduceMotion;
  r && (n = r);
  const u = [], h = i && t.animationState && t.animationState.getState()[i];
  for (const f in o) {
    const p = t.getValue(f, t.latestValues[f] ?? null), m = o[f];
    if (m === void 0 || h && Wi(h, f)) continue;
    const g = {
      delay: s,
      ...Ms(n || {}, f)
    }, x = p.get();
    if (x !== void 0 && !p.isAnimating() && !Array.isArray(m) && m === x && !g.velocity) {
      O.update(() => p.set(m));
      continue;
    }
    let y = !1;
    if (window.MotionHandoffAnimation) {
      const v = _i(t);
      if (v) {
        const M = window.MotionHandoffAnimation(v, f, O);
        M !== null && (g.startTime = M, y = !0);
      }
    }
    Ki(t, f);
    const k = c ?? t.shouldReduceMotion;
    p.start(Ss(f, p, m, k && As.has(f) ? { type: !1 } : g, t, y));
    const V = p.animation;
    V && u.push(V);
  }
  if (a) {
    const f = () => O.update(() => {
      a && Oi(t, a);
    });
    u.length ? Promise.all(u).then(f) : f();
  }
  return u;
}
var ji = {
  test: (t) => t === "auto",
  parse: (t) => t
}, Cs = (t) => (e) => e.test(t), Fs = [
  J,
  d,
  q,
  L,
  hr,
  cr,
  ji
], Me = (t) => Fs.find(Cs(t));
function Ui(t) {
  return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Ke(t) : !0;
}
var Yi = /* @__PURE__ */ new Set([
  "brightness",
  "contrast",
  "saturate",
  "opacity"
]);
function Gi(t) {
  const [e, s] = t.slice(0, -1).split("(");
  if (e === "drop-shadow") return t;
  const [r] = s.match(Jt) || [];
  if (!r) return t;
  const i = s.replace(r, "");
  let n = Yi.has(e) ? 1 : 0;
  return r !== s && (n *= 100), e + "(" + n + i + ")";
}
var Xi = /\b([a-z-]*)\(.*?\)/gu, Ut = {
  ...I,
  getAnimatableNone: (t) => {
    const e = t.match(Xi);
    return e ? e.map(Gi).join(" ") : t;
  }
}, Yt = {
  ...I,
  getAnimatableNone: (t) => {
    const e = I.parse(t);
    return I.createTransformer(t)(e.map((s) => typeof s == "number" ? 0 : typeof s == "object" ? {
      ...s,
      alpha: 1
    } : s));
  }
}, Se = {
  ...J,
  transform: Math.round
}, zi = {
  rotate: L,
  rotateX: L,
  rotateY: L,
  rotateZ: L,
  scale: dt,
  scaleX: dt,
  scaleY: dt,
  scaleZ: dt,
  skew: L,
  skewX: L,
  skewY: L,
  distance: d,
  translateX: d,
  translateY: d,
  translateZ: d,
  x: d,
  y: d,
  z: d,
  perspective: d,
  transformPerspective: d,
  opacity: ot,
  originX: ue,
  originY: ue,
  originZ: d
}, ne = {
  borderWidth: d,
  borderTopWidth: d,
  borderRightWidth: d,
  borderBottomWidth: d,
  borderLeftWidth: d,
  borderRadius: d,
  borderTopLeftRadius: d,
  borderTopRightRadius: d,
  borderBottomRightRadius: d,
  borderBottomLeftRadius: d,
  width: d,
  maxWidth: d,
  height: d,
  maxHeight: d,
  top: d,
  right: d,
  bottom: d,
  left: d,
  inset: d,
  insetBlock: d,
  insetBlockStart: d,
  insetBlockEnd: d,
  insetInline: d,
  insetInlineStart: d,
  insetInlineEnd: d,
  padding: d,
  paddingTop: d,
  paddingRight: d,
  paddingBottom: d,
  paddingLeft: d,
  paddingBlock: d,
  paddingBlockStart: d,
  paddingBlockEnd: d,
  paddingInline: d,
  paddingInlineStart: d,
  paddingInlineEnd: d,
  margin: d,
  marginTop: d,
  marginRight: d,
  marginBottom: d,
  marginLeft: d,
  marginBlock: d,
  marginBlockStart: d,
  marginBlockEnd: d,
  marginInline: d,
  marginInlineStart: d,
  marginInlineEnd: d,
  fontSize: d,
  backgroundPositionX: d,
  backgroundPositionY: d,
  ...zi,
  zIndex: Se,
  fillOpacity: ot,
  strokeOpacity: ot,
  numOctaves: Se
}, qi = {
  ...ne,
  color: w,
  backgroundColor: w,
  outlineColor: w,
  fill: w,
  stroke: w,
  borderColor: w,
  borderTopColor: w,
  borderRightColor: w,
  borderBottomColor: w,
  borderLeftColor: w,
  filter: Ut,
  WebkitFilter: Ut,
  mask: Yt,
  WebkitMask: Yt
}, Ds = (t) => qi[t], Zi = /* @__PURE__ */ new Set([Ut, Yt]);
function Rs(t, e) {
  let s = Ds(t);
  return Zi.has(s) || (s = I), s.getAnimatableNone ? s.getAnimatableNone(e) : void 0;
}
var Hi = /* @__PURE__ */ new Set([
  "auto",
  "none",
  "0"
]);
function Ji(t, e, s) {
  let r = 0, i;
  for (; r < t.length && !i; ) {
    const n = t[r];
    typeof n == "string" && !Hi.has(n) && Z(n).values.length && (i = t[r]), r++;
  }
  if (i && s) for (const n of e) t[n] = Rs(s, i);
}
var Qi = class extends re {
  constructor(t, e, s, r, i) {
    super(t, e, s, r, i, !0);
  }
  readKeyframes() {
    const { unresolvedKeyframes: t, element: e, name: s } = this;
    if (!e || !e.current) return;
    super.readKeyframes();
    for (let o = 0; o < t.length; o++) {
      let l = t[o];
      if (typeof l == "string" && (l = l.trim(), Ht(l))) {
        const c = xs(l, e.current);
        c !== void 0 && (t[o] = c), o === t.length - 1 && (this.finalKeyframe = l);
      }
    }
    if (this.resolveNoneKeyframes(), !As.has(s) || t.length !== 2) return;
    const [r, i] = t, n = Me(r), a = Me(i);
    if (le(r) !== le(i) && $[s]) {
      this.needsMeasurement = !0;
      return;
    }
    if (n !== a)
      if (ve(n) && ve(a)) for (let o = 0; o < t.length; o++) {
        const l = t[o];
        typeof l == "string" && (t[o] = parseFloat(l));
      }
      else $[s] && (this.needsMeasurement = !0);
  }
  resolveNoneKeyframes() {
    const { unresolvedKeyframes: t, name: e } = this, s = [];
    for (let r = 0; r < t.length; r++) (t[r] === null || Ui(t[r])) && s.push(r);
    s.length && Ji(t, s, e);
  }
  measureInitialState() {
    const { element: t, unresolvedKeyframes: e, name: s } = this;
    if (!t || !t.current) return;
    s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = $[s](t.measureViewportBox(), window.getComputedStyle(t.current)), e[0] = this.measuredOrigin;
    const r = e[e.length - 1];
    r !== void 0 && t.getValue(s, r).jump(r, !1);
  }
  measureEndState() {
    const { element: t, name: e, unresolvedKeyframes: s } = this;
    if (!t || !t.current) return;
    const r = t.getValue(e);
    r && r.jump(this.measuredOrigin, !1);
    const i = s.length - 1, n = s[i];
    s[i] = $[e](t.measureViewportBox(), window.getComputedStyle(t.current)), n !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = n), this.removedTransforms?.length && this.removedTransforms.forEach(([a, o]) => {
      t.getValue(a).set(o);
    }), this.resolveNoneKeyframes();
  }
};
function Wn(t, e, s) {
  if (t == null) return [];
  if (t instanceof EventTarget) return [t];
  if (typeof t == "string") {
    let r = document;
    e && (r = e.current);
    const i = s?.[t] ?? r.querySelectorAll(t);
    return i ? Array.from(i) : [];
  }
  return Array.from(t).filter((r) => r != null);
}
var Ps = (t, e) => e && typeof t == "number" ? e.transform(t) : t, { schedule: tn, cancel: jn } = /* @__PURE__ */ Je(queueMicrotask, !1);
function en(t) {
  return Ys(t) && "ownerSVGElement" in t;
}
function Un(t) {
  return en(t) && t.tagName === "svg";
}
var sn = [
  ...Fs,
  w,
  I
], rn = (t) => sn.find(Cs(t)), we = () => ({
  translate: 0,
  scale: 1,
  origin: 0,
  originPoint: 0
}), Yn = () => ({
  x: we(),
  y: we()
}), Ae = () => ({
  min: 0,
  max: 0
}), Bs = () => ({
  x: Ae(),
  y: Ae()
}), nn = /* @__PURE__ */ new WeakMap();
function an(t) {
  return t !== null && typeof t == "object" && typeof t.start == "function";
}
function on(t) {
  return typeof t == "string" || Array.isArray(t);
}
var ln = [
  "animate",
  "whileInView",
  "whileFocus",
  "whileHover",
  "whileTap",
  "whileDrag",
  "exit"
], un = ["initial", ...ln];
function ks(t) {
  return an(t.animate) || un.some((e) => on(t[e]));
}
function cn(t) {
  return !!(ks(t) || t.variants);
}
function hn(t, e, s) {
  for (const r in e) {
    const i = e[r], n = s[r];
    if (R(i)) t.addValue(r, i);
    else if (R(n)) t.addValue(r, lt(i, { owner: t }));
    else if (n !== i) if (t.hasValue(r)) {
      const a = t.getValue(r);
      a.liveStyle === !0 ? a.jump(i) : a.hasAnimated || a.set(i);
    } else {
      const a = t.getStaticValue(r);
      t.addValue(r, lt(a !== void 0 ? a : i, { owner: t }));
    }
  }
  for (const r in s) e[r] === void 0 && t.removeValue(r);
  return e;
}
var Gt = { current: null }, Es = { current: !1 }, fn = typeof window < "u";
function dn() {
  if (Es.current = !0, !!fn)
    if (window.matchMedia) {
      const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Gt.current = t.matches;
      t.addEventListener("change", e), e();
    } else Gt.current = !1;
}
var Ce = [
  "AnimationStart",
  "AnimationComplete",
  "Update",
  "BeforeLayoutMeasure",
  "LayoutMeasure",
  "LayoutAnimationStart",
  "LayoutAnimationComplete"
], xt = {};
function Gn(t) {
  xt = t;
}
function Xn() {
  return xt;
}
var pn = class {
  scrapeMotionValuesFromProps(t, e, s) {
    return {};
  }
  constructor({ parent: t, props: e, presenceContext: s, reducedMotionConfig: r, skipAnimations: i, blockInitialAnimation: n, visualState: a }, o = {}) {
    this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = re, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
      this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
    }, this.renderScheduledAt = 0, this.scheduleRender = () => {
      const f = D.now();
      this.renderScheduledAt < f && (this.renderScheduledAt = f, O.render(this.render, !1, !0));
    };
    const { latestValues: l, renderState: c } = a;
    this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = e.initial ? { ...l } : {}, this.renderState = c, this.parent = t, this.props = e, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = i, this.options = o, this.blockInitialAnimation = !!n, this.isControllingVariants = ks(e), this.isVariantNode = cn(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
    const { willChange: u, ...h } = this.scrapeMotionValuesFromProps(e, {}, this);
    for (const f in h) {
      const p = h[f];
      l[f] !== void 0 && R(p) && p.set(l[f]);
    }
  }
  mount(t) {
    if (this.hasBeenMounted) for (const e in this.initialValues)
      this.values.get(e)?.jump(this.initialValues[e]), this.latestValues[e] = this.initialValues[e];
    this.current = t, nn.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((e, s) => this.bindToMotionValue(s, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Es.current || dn(), this.shouldReduceMotion = Gt.current), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
  }
  unmount() {
    this.projection && this.projection.unmount(), Pt(this.notifyUpdate), Pt(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
    for (const t in this.events) this.events[t].clear();
    for (const t in this.features) {
      const e = this.features[t];
      e && (e.unmount(), e.isMounted = !1);
    }
    this.current = null;
  }
  addChild(t) {
    this.children.add(t), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(t);
  }
  removeChild(t) {
    this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
  }
  bindToMotionValue(t, e) {
    if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), e.accelerate && Ts.has(t) && this.current instanceof HTMLElement) {
      const { factory: n, keyframes: a, times: o, ease: l, duration: c } = e.accelerate, u = new ys({
        element: this.current,
        name: t,
        keyframes: a,
        times: o,
        ease: l,
        duration: B(c)
      }), h = n(u);
      this.valueSubscriptions.set(t, () => {
        h(), u.cancel();
      });
      return;
    }
    const s = et.has(t);
    s && this.onBindTransform && this.onBindTransform();
    const r = e.on("change", (n) => {
      this.latestValues[t] = n, this.props.onUpdate && O.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
    });
    let i;
    typeof window < "u" && window.MotionCheckAppearSync && (i = window.MotionCheckAppearSync(this, t, e)), this.valueSubscriptions.set(t, () => {
      r(), i && i(), e.owner && e.stop();
    });
  }
  sortNodePosition(t) {
    return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
  }
  updateFeatures() {
    let t = "animation";
    for (t in xt) {
      const e = xt[t];
      if (!e) continue;
      const { isEnabled: s, Feature: r } = e;
      if (!this.features[t] && r && s(this.props) && (this.features[t] = new r(this)), this.features[t]) {
        const i = this.features[t];
        i.isMounted ? i.update() : (i.mount(), i.isMounted = !0);
      }
    }
  }
  triggerBuild() {
    this.build(this.renderState, this.latestValues, this.props);
  }
  measureViewportBox() {
    return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Bs();
  }
  getStaticValue(t) {
    return this.latestValues[t];
  }
  setStaticValue(t, e) {
    this.latestValues[t] = e;
  }
  update(t, e) {
    (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = e;
    for (let s = 0; s < Ce.length; s++) {
      const r = Ce[s];
      this.propEventSubscriptions[r] && (this.propEventSubscriptions[r](), delete this.propEventSubscriptions[r]);
      const i = t["on" + r];
      i && (this.propEventSubscriptions[r] = this.on(r, i));
    }
    this.prevMotionValues = hn(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
  }
  getProps() {
    return this.props;
  }
  getVariant(t) {
    return this.props.variants ? this.props.variants[t] : void 0;
  }
  getDefaultTransition() {
    return this.props.transition;
  }
  getTransformPagePoint() {
    return this.props.transformPagePoint;
  }
  getClosestVariantNode() {
    return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
  }
  addVariantChild(t) {
    const e = this.getClosestVariantNode();
    if (e)
      return e.variantChildren && e.variantChildren.add(t), () => e.variantChildren.delete(t);
  }
  addValue(t, e) {
    const s = this.values.get(t);
    e !== s && (s && this.removeValue(t), this.bindToMotionValue(t, e), this.values.set(t, e), this.latestValues[t] = e.get());
  }
  removeValue(t) {
    this.values.delete(t);
    const e = this.valueSubscriptions.get(t);
    e && (e(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
  }
  hasValue(t) {
    return this.values.has(t);
  }
  getValue(t, e) {
    if (this.props.values && this.props.values[t]) return this.props.values[t];
    let s = this.values.get(t);
    return s === void 0 && e !== void 0 && (s = lt(e === null ? void 0 : e, { owner: this }), this.addValue(t, s)), s;
  }
  readValue(t, e) {
    let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
    return s != null && (typeof s == "string" && (Ne(s) || Ke(s)) ? s = parseFloat(s) : !rn(s) && I.test(e) && (s = Rs(t, e)), this.setBaseTarget(t, R(s) ? s.get() : s)), R(s) ? s.get() : s;
  }
  setBaseTarget(t, e) {
    this.baseTarget[t] = e;
  }
  getBaseTarget(t) {
    const { initial: e } = this.props;
    let s;
    if (typeof e == "string" || typeof e == "object") {
      const i = ws(this.props, e, this.presenceContext?.custom);
      i && (s = i[t]);
    }
    if (e && s !== void 0) return s;
    const r = this.getBaseTargetFromProps(this.props, t);
    return r !== void 0 && !R(r) ? r : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
  }
  on(t, e) {
    return this.events[t] || (this.events[t] = new _e()), this.events[t].add(e);
  }
  notify(t, ...e) {
    this.events[t] && this.events[t].notify(...e);
  }
  scheduleRenderMicrotask() {
    tn.render(this.render);
  }
}, Is = class extends pn {
  constructor() {
    super(...arguments), this.KeyframeResolver = Qi;
  }
  sortInstanceNodePosition(t, e) {
    return t.compareDocumentPosition(e) & 2 ? 1 : -1;
  }
  getBaseTargetFromProps(t, e) {
    const s = t.style;
    return s ? s[e] : void 0;
  }
  removeValueFromRenderState(t, { vars: e, style: s }) {
    delete e[t], delete s[t];
  }
  handleChildMotionValue() {
    this.childSubscription && (this.childSubscription(), delete this.childSubscription);
    const { children: t } = this.props;
    R(t) && (this.childSubscription = t.on("change", (e) => {
      this.current && (this.current.textContent = `${e}`);
    }));
  }
};
function mn({ top: t, left: e, right: s, bottom: r }) {
  return {
    x: {
      min: e,
      max: s
    },
    y: {
      min: t,
      max: r
    }
  };
}
function zn({ x: t, y: e }) {
  return {
    top: e.min,
    right: t.max,
    bottom: e.max,
    left: t.min
  };
}
function gn(t, e) {
  if (!e) return t;
  const s = e({
    x: t.left,
    y: t.top
  }), r = e({
    x: t.right,
    y: t.bottom
  });
  return {
    top: s.y,
    left: s.x,
    bottom: r.y,
    right: r.x
  };
}
function Rt(t) {
  return t === void 0 || t === 1;
}
function vn({ scale: t, scaleX: e, scaleY: s }) {
  return !Rt(t) || !Rt(e) || !Rt(s);
}
function yn(t) {
  return vn(t) || bn(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
}
function bn(t) {
  return Fe(t.x) || Fe(t.y);
}
function Fe(t) {
  return t && t !== "0%";
}
function De(t, e, s) {
  return s + e * (t - s);
}
function Re(t, e, s, r, i) {
  return i !== void 0 && (t = De(t, i, r)), De(t, s, r) + e;
}
function Xt(t, e = 0, s = 1, r, i) {
  t.min = Re(t.min, e, s, r, i), t.max = Re(t.max, e, s, r, i);
}
function Tn(t, { x: e, y: s }) {
  Xt(t.x, e.translate, e.scale, e.originPoint), Xt(t.y, s.translate, s.scale, s.originPoint);
}
var Pe = 0.999999999999, Be = 1.0000000000001;
function qn(t, e, s, r = !1) {
  const i = s.length;
  if (!i) return;
  e.x = e.y = 1;
  let n, a;
  for (let o = 0; o < i; o++) {
    n = s[o], a = n.projectionDelta;
    const { visualElement: l } = n.options;
    l && l.props.style && l.props.style.display === "contents" || (r && n.options.layoutScroll && n.scroll && n !== n.root && (Vt(t.x, -n.scroll.offset.x), Vt(t.y, -n.scroll.offset.y)), a && (e.x *= a.x.scale, e.y *= a.y.scale, Tn(t, a)), r && yn(n.latestValues) && xn(t, n.latestValues, n.layout?.layoutBox));
  }
  e.x < Be && e.x > Pe && (e.x = 1), e.y < Be && e.y > Pe && (e.y = 1);
}
function Vt(t, e) {
  t.min += e, t.max += e;
}
function ke(t, e, s, r, i = 0.5) {
  Xt(t, e, s, Q(t.min, t.max, i), r);
}
function Ee(t, e) {
  return typeof t == "string" ? parseFloat(t) / 100 * (e.max - e.min) : t;
}
function xn(t, e, s) {
  const r = s ?? t;
  ke(t.x, Ee(e.x, r.x), e.scaleX, e.scale, e.originX), ke(t.y, Ee(e.y, r.y), e.scaleY, e.scale, e.originY);
}
function Os(t, e) {
  return mn(gn(t.getBoundingClientRect(), e));
}
function Zn(t, e, s) {
  const r = Os(t, s), { scroll: i } = e;
  return i && (Vt(r.x, i.offset.x), Vt(r.y, i.offset.y)), r;
}
var Vn = {
  x: "translateX",
  y: "translateY",
  z: "translateZ",
  transformPerspective: "perspective"
}, Mn = tt.length;
function Sn(t, e, s) {
  let r = "", i = !0;
  for (let n = 0; n < Mn; n++) {
    const a = tt[n], o = t[a];
    if (o === void 0) continue;
    let l = !0;
    if (typeof o == "number") l = o === (a.startsWith("scale") ? 1 : 0);
    else {
      const c = parseFloat(o);
      l = a.startsWith("scale") ? c === 1 : c === 0;
    }
    if (!l || s) {
      const c = Ps(o, ne[a]);
      if (!l) {
        i = !1;
        const u = Vn[a] || a;
        r += `${u}(${c}) `;
      }
      s && (e[a] = c);
    }
  }
  return r = r.trim(), s ? r = s(e, i ? "" : r) : i && (r = "none"), r;
}
function Ns(t, e, s) {
  const { style: r, vars: i, transformOrigin: n } = t;
  let a = !1, o = !1;
  for (const l in e) {
    const c = e[l];
    if (et.has(l)) {
      a = !0;
      continue;
    } else if (ts(l)) {
      i[l] = c;
      continue;
    } else {
      const u = Ps(c, ne[l]);
      l.startsWith("origin") ? (o = !0, n[l] = u) : r[l] = u;
    }
  }
  if (e.transform || (a || s ? r.transform = Sn(e, t.transform, s) : r.transform && (r.transform = "none")), o) {
    const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = n;
    r.transformOrigin = `${l} ${c} ${u}`;
  }
}
function Ks(t, { style: e, vars: s }, r, i) {
  const n = t.style;
  let a;
  for (a in e) n[a] = e[a];
  i?.applyProjectionStyles(n, r);
  for (a in s) n.setProperty(a, s[a]);
}
function Ie(t, e) {
  return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
}
var st = { correct: (t, e) => {
  if (!e.target) return t;
  if (typeof t == "string") if (d.test(t)) t = parseFloat(t);
  else return t;
  return `${Ie(t, e.target.x)}% ${Ie(t, e.target.y)}%`;
} }, wn = { correct: (t, { treeScale: e, projectionDelta: s }) => {
  const r = t, i = I.parse(t);
  if (i.length > 5) return r;
  const n = I.createTransformer(t), a = typeof i[0] != "number" ? 1 : 0, o = s.x.scale * e.x, l = s.y.scale * e.y;
  i[0 + a] /= o, i[1 + a] /= l;
  const c = Q(o, l, 0.5);
  return typeof i[2 + a] == "number" && (i[2 + a] /= c), typeof i[3 + a] == "number" && (i[3 + a] /= c), n(i);
} }, An = {
  borderRadius: {
    ...st,
    applyTo: [
      "borderTopLeftRadius",
      "borderTopRightRadius",
      "borderBottomLeftRadius",
      "borderBottomRightRadius"
    ]
  },
  borderTopLeftRadius: st,
  borderTopRightRadius: st,
  borderBottomLeftRadius: st,
  borderBottomRightRadius: st,
  boxShadow: wn
};
function Cn(t, { layout: e, layoutId: s }) {
  return et.has(t) || t.startsWith("origin") || (e || s !== void 0) && (!!An[t] || t === "opacity");
}
function Ls(t, e, s) {
  const r = t.style, i = e?.style, n = {};
  if (!r) return n;
  for (const a in r) (R(r[a]) || i && R(i[a]) || Cn(a, t) || s?.getValue(a)?.liveStyle !== void 0) && (n[a] = r[a]);
  return n;
}
function Fn(t) {
  return window.getComputedStyle(t);
}
var Hn = class extends Is {
  constructor() {
    super(...arguments), this.type = "html", this.renderInstance = Ks;
  }
  readValueFromInstance(t, e) {
    if (et.has(e)) return this.projection?.isProjecting ? Kt(e) : Hr(t, e);
    {
      const s = Fn(t), r = (ts(e) ? s.getPropertyValue(e) : s[e]) || 0;
      return typeof r == "string" ? r.trim() : r;
    }
  }
  measureInstanceViewportBox(t, { transformPagePoint: e }) {
    return Os(t, e);
  }
  build(t, e, s) {
    Ns(t, e, s.transformTemplate);
  }
  scrapeMotionValuesFromProps(t, e, s) {
    return Ls(t, e, s);
  }
}, Dn = {
  offset: "stroke-dashoffset",
  array: "stroke-dasharray"
}, Rn = {
  offset: "strokeDashoffset",
  array: "strokeDasharray"
};
function Pn(t, e, s = 1, r = 0, i = !0) {
  t.pathLength = 1;
  const n = i ? Dn : Rn;
  t[n.offset] = `${-r}`, t[n.array] = `${e} ${s}`;
}
var Bn = [
  "offsetDistance",
  "offsetPath",
  "offsetRotate",
  "offsetAnchor"
];
function kn(t, { attrX: e, attrY: s, attrScale: r, pathLength: i, pathSpacing: n = 1, pathOffset: a = 0, ...o }, l, c, u) {
  if (Ns(t, o, c), l) {
    t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
    return;
  }
  t.attrs = t.style, t.style = {};
  const { attrs: h, style: f } = t;
  h.transform && (f.transform = h.transform, delete h.transform), (f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = u?.transformBox ?? "fill-box", delete h.transformBox);
  for (const p of Bn) h[p] !== void 0 && (f[p] = h[p], delete h[p]);
  e !== void 0 && (h.x = e), s !== void 0 && (h.y = s), r !== void 0 && (h.scale = r), i !== void 0 && Pn(h, i, n, a, !1);
}
var $s = /* @__PURE__ */ new Set([
  "baseFrequency",
  "diffuseConstant",
  "kernelMatrix",
  "kernelUnitLength",
  "keySplines",
  "keyTimes",
  "limitingConeAngle",
  "markerHeight",
  "markerWidth",
  "numOctaves",
  "targetX",
  "targetY",
  "surfaceScale",
  "specularConstant",
  "specularExponent",
  "stdDeviation",
  "tableValues",
  "viewBox",
  "gradientTransform",
  "pathLength",
  "startOffset",
  "textLength",
  "lengthAdjust"
]), En = (t) => typeof t == "string" && t.toLowerCase() === "svg";
function In(t, e, s, r) {
  Ks(t, e, void 0, r);
  for (const i in e.attrs) t.setAttribute($s.has(i) ? i : ie(i), e.attrs[i]);
}
function On(t, e, s) {
  const r = Ls(t, e, s);
  for (const i in t) if (R(t[i]) || R(e[i])) {
    const n = tt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
    r[n] = t[i];
  }
  return r;
}
var Jn = class extends Is {
  constructor() {
    super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Bs;
  }
  getBaseTargetFromProps(t, e) {
    return t[e];
  }
  readValueFromInstance(t, e) {
    if (et.has(e)) {
      const s = Ds(e);
      return s && s.default || 0;
    }
    return e = $s.has(e) ? e : ie(e), t.getAttribute(e);
  }
  scrapeMotionValuesFromProps(t, e, s) {
    return On(t, e, s);
  }
  build(t, e, s) {
    kn(t, e, this.isSVGTag, s.transformTemplate, s.style);
  }
  renderInstance(t, e, s, r) {
    In(t, e, s, r);
  }
  mount(t) {
    this.isSVGTag = En(t.tagName), super.mount(t);
  }
};
function Qn(t, e, s) {
  const r = R(t) ? t : lt(t);
  return r.start(Ss("", r, e, s)), r.animation;
}
var ta = (0, Oe.createContext)({
  transformPagePoint: (t) => t,
  isStatic: !1,
  reducedMotion: "never"
});
export {
  vs as $,
  cn as A,
  tn as B,
  pn as C,
  at as Ct,
  Es as D,
  Ln as Dt,
  dn as E,
  Us as Et,
  nn as F,
  Ki as G,
  _n as H,
  Bs as I,
  lt as J,
  R as K,
  Yn as L,
  un as M,
  on as N,
  Gt as O,
  an as P,
  Ms as Q,
  Un as R,
  zn as S,
  Ys as St,
  Gn as T,
  js as Tt,
  _i as U,
  Wn as V,
  $i as W,
  ws as X,
  Ri as Y,
  Ss as Z,
  Vt as _,
  B as _t,
  En as a,
  q as at,
  yn as b,
  zt as bt,
  Ls as c,
  D as ct,
  Ns as d,
  gt as dt,
  Wr as et,
  Zn as f,
  $n as ft,
  xn as g,
  E as gt,
  De as h,
  Zs as ht,
  On as i,
  Q as it,
  ln as j,
  ks as k,
  Cn as l,
  Pt as lt,
  qn as m,
  Qs as mt,
  Qn as n,
  bt as nt,
  kn as o,
  d as ot,
  Tn as p,
  mt as pt,
  ki as q,
  Jn as r,
  Pr as rt,
  Hn as s,
  vt as st,
  ta as t,
  _r as tt,
  An as u,
  O as ut,
  bn as v,
  _e as vt,
  Xn as w,
  _ as wt,
  mn as x,
  H as xt,
  vn as y,
  $e as yt,
  en as z
};

//# sourceMappingURL=MotionConfigContext.js.map