PageSourceSearch

https://artemuseum.com/_/oms-customer-front-office/DeliveryFormDefault-gBRlLJmN.js

js artemuseum.com collected 2026-09-24 09:35:57 UTC 174,901 bytes, 5,209 lines download raw bytes

1import { a as ii } from "./app-zA2I6UUs.js";
2import { f as Cn, T as oi } from "./main-DYpVqLwH.js";
3import { r as w, R as z, g as ai } from "./queryClient-DpZpBkWP.js";
4import { u as li } from "./useClassicTranslation-ouIPeWST.js";
5import { j as C, a as ui } from "./emotion-react.browser.esm-MfU6wlAJ.js";
6import { B as Os, k as ci, T as Tn, M as Dt, F as Yt, a as ft, S as fi, C as hi, f as wn } from "./formSchema-DJCiu89O.js";
7import { a as di, M as ke, A as pi, u as mi } from "./useDaumHealthCheck-CBe2pidJ.js";
8import { d as gi } from "./differenceInCalendarDays-D0oSghL6.js";
9import "./index-scI6IY0O.js";
10import "./index-DQ3Y9SbI.js";
11const yi = (t) => /* @__PURE__ */ Cn.jsx("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t, children: /* @__PURE__ */ Cn.jsx("path", { d: "M12 7H7.5C6.83696 7 6.20107 6.73661 5.73223 6.26777C5.26339 5.79893 5 5.16304 5 4.5C5 3.83696 5.26339 3.20107 5.73223 2.73223C6.20107 2.26339 6.83696 2 7.5 2C11 2 12 7 12 7ZM12 7H16.5C17.163 7 17.7989 6.73661 18.2678 6.26777C18.7366 5.79893 19 5.16304 19 4.5C19 3.83696 18.7366 3.20107 18.2678 2.73223C17.7989 2.26339 17.163 2 16.5 2C13 2 12 7 12 7ZM12 7L12 22M2 14H22M2 10.2L2 18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22L18.8 22C19.9201 22 20.4802 22 20.908 21.782C21.2843 21.5903 21.5903 21.2843 21.782 20.908C22 20.4802 22 19.9201 22 18.8
11V10.2C22 9.0799 22 8.51984 21.782 8.09202C21.5903 7.7157 21.2843 7.40974 20.908 7.21799C20.4802 7 19.9201 7 18.8 7L5.2 7C4.0799 7 3.51984 7 3.09202 7.21799C2.7157 7.40973 2.40973 7.71569 2.21799 8.09202C2 8.51984 2 9.07989 2 10.2Z", stroke: "currentColor" }) }), Es = w.createContext({
12  transformPagePoint: (t) => t,
13  isStatic: !1,
14  reducedMotion: "never"
15}), he = w.createContext({}), de = w.createContext(null), pe = typeof document < "u", Ze = pe ? w.useLayoutEffect : w.useEffect, js = w.createContext({ strict: !1 }), Qe = (t) => t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), vi = "framerAppearId", Ls = "data-" + Qe(vi), ks = {
16  skipAnimations: !1,
17  useManualTiming: !1
18};
19class Sn {
20  constructor() {
21    this.order = [], this.scheduled = /* @__PURE__ */ new Set();
22  }
23  add(e) {
24    if (!this.scheduled.has(e))
25      return this.scheduled.add(e), this.order.push(e), !0;
26  }
27  remove(e) {
28    const n = this.order.indexOf(e);
29    n !== -1 && (this.order.splice(n, 1), this.scheduled.delete(e));
30  }
31  clear() {
32    this.order.length = 0, this.scheduled.clear();
33  }
34}
35function xi(t) {
36  let e = new Sn(), n = new Sn(), s = 0, r = !1, o = !1;
37  const i = /* @__PURE__ */ new WeakSet(), a = {
38    /**
39     * Schedule a process to run on the next frame.
40     */
41    schedule: (l, u = !1, c = !1) => {
42      const f = c && r, h = f ? e : n;
43      return u && i.add(l), h.add(l) && f && r && (s = e.order.length), l;
44    },
45    /**
46     * Cancel the provided callback from running on the next frame.
47     */
48    cancel: (l) => {
49      n.remove(l), i.delete(l);
50    },
51    /**
52     * Execute all schedule callbacks.
53     */
54    process: (l) => {
55      if (r) {
56        o = !0;
57        return;
58      }
59      if (r = !0, [e, n] = [n, e], n.clear(), s = e.order.length, s)
60        for (let u = 0; u < s; u++) {
61          const c = e.order[u];
62          i.has(c) && (a.schedule(c), t()), c(l);
63        }
64      r = !1, o && (o = !1, a.process(l));
65    }
66  };
67  return a;
68}
69const Xt = [
70  "prepare",
71  "read",
72  "update",
73  "preRender",
74  "render",
75  "postRender"
76], bi = 40;
77function Bs(t, e) {
78  let n = !1, s = !0;
79  const r = {
80    delta: 0,
81    timestamp: 0,
82    isProcessing: !1
83  }, o = Xt.reduce((f, h) => (f[h] = xi(() => n = !0), f), {}), i = (f) => {
84    o[f].process(r);
85  }, a = () => {
86    const f = performance.now();
87    n = !1, r.delta = s ? 1e3 / 60 : Math.max(Math.min(f - r.timestamp, bi), 1), r.timestamp = f, r.isProcessing = !0, Xt.forEach(i), r.isProcessing = !1, n && e && (s = !1, t(a));
88  }, l = () => {
89    n = !0, s = !0, r.isProcessing || t(a);
90  };
91  return { schedule: Xt.reduce((f, h) => {
92    const p = o[h];
93    return f[h] = (d, m = !1, y = !1) => (n || l(), p.schedule(d, m, y)), f;
94  }, {}), cancel: (f) => Xt.forEach((h) => o[h].cancel(f)), state: r, steps: o };
95}
96const { schedule: Je } = Bs(queueMicrotask, !1);
97function Pi(t, e, n, s) {
98  const { visualElement: r } = w.useContext(he), o = w.useContext(js), i = w.useContext(de), a = w.useContext(Es).reducedMotion, l = w.useRef();
99  s = s || o.renderer, !l.current && s && (l.current = s(t, {
100    visualState: e,
101    parent: r,
102    props: n,
103    presenceContext: i,
104    blockInitialAnimation: i ? i.initial === !1 : !1,
105    reducedMotionConfig: a
106  }));
107  const u = l.current;
108  w.useInsertionEffect(() => {
109    u && u.update(n, i);
110  });
111  const c = w.useRef(!!(n[Ls] && !window.HandoffComplete));
112  return Ze(() => {
113    u && (Je.postRender(u.render), c.current && u.animationState && u.animationState.animateChanges());
114  }), w.useEffect(() => {
115    u && (u.updateFeatures(), !c.current && u.animationState && u.animationState.animateChanges(), c.current && (c.current = !1, window.HandoffComplete = !0));
116  }), u;
117}
118function Pt(t) {
119  return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
120}
121function Ci(t, e, n) {
122  return w.useCallback(
123    (s) => {
124      s && t.mount && t.mount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : Pt(n) && (n.current = s));
125    },
126    /**
127     * Only pass a new ref callback to React if we've received a visual element
128     * factory. Otherwise we'll be mounting/remounting every time externalRef
129     * or other dependencies change.
130     */
131    [e]
132  );
133}
134function Bt(t) {
135  return typeof t == "string" || Array.isArray(t);
136}
137function me(t) {
138  return t !== null && typeof t == "object" && typeof t.start == "function";
139}
140const tn = [
141  "animate",
142  "whileInView",
143  "whileFocus",
144  "whileHover",
145  "whileTap",
146  "whileDrag",
147  "exit"
148], en = ["initial", ...tn];
149function ge(t) {
150  return me(t.animate) || en.some((e) => Bt(t[e]));
151}
152function Fs(t) {
153  return !!(ge(t) || t.variants);
154}
155function Ti(t, e) {
156  if (ge(t)) {
157    const { initial: n, animate: s } = t;
158    return {
159      initial: n === !1 || Bt(n) ? n : void 0,
160      animate: Bt(s) ? s : void 0
161    };
162  }
163  return t.inherit !== !1 ? e : {};
164}
165function wi(t) {
166  const { initial: e, animate: n } = Ti(t, w.useContext(he));
167  return w.useMemo(() => ({ initial: e, animate: n }), [Vn(e), Vn(n)]);
168}
169function Vn(t) {
170  return Array.isArray(t) ? t.join(" ") : t;
171}
172const An = {
173  animation: [
174    "animate",
175    "variants",
176    "whileHover",
177    "whileTap",
178    "exit",
179    "whileInView",
180    "whileFocus",
181    "whileDrag"
182  ],
183  exit: ["exit"],
184  drag: ["drag", "dragControls"],
185  focus: ["whileFocus"],
186  hover: ["whileHover", "onHoverStart", "onHoverEnd"],
187  tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
188  pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
189  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
190  layout: ["layout", "layoutId"]
191}, Ft = {};
192for (const t in An)
193  Ft[t] = {
194    isEnabled: (e) => An[t].some((n) => !!e[n])
195  };
196function Si(t) {
197  for (const e in t)
198    Ft[e] = {
199      ...Ft[e],
200      ...t[e]
201    };
202}
203const nn = w.createContext({}), Is = w.createContext({}), Vi = Symbol.for("motionComponentSymbol");
204function Ai({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: r }) {
205  t && Si(t);
206  function o(a, l) {
207    let u;
208    const c = {
209      ...w.useContext(Es),
210      ...a,
211      layoutId: Di(a)
212    }, { isStatic: f } = c, h = wi(a), p = s(a, f);
213    if (!f && pe) {
214      h.visualElement = Pi(r, p, c, e);
215      const d = w.useContext(Is), m = w.useContext(js).strict;
216      h.visualElement && (u = h.visualElement.loadFeatures(
217        // Note: Pass the full new combined props to correctly re-render dynamic feature components.
218        c,
219        m,
220        t,
221        d
222      ));
223    }
224    return w.createElement(
225      he.Provider,
226      { value: h },
227      u && h.visualElement ? w.createElement(u, { visualElement: h.visualElement, ...c }) : null,
228      n(r, a, Ci(p, h.visualElement, l), p, f, h.visualElement)
229    );
230  }
231  const i = w.forwardRef(o);
232  return i[Vi] = r, i;
233}
234function Di({ layoutId: t }) {
235  const e = w.useContext(nn).id;
236  return e && t !== void 0 ? e + "-" + t : t;
237}
238function Mi(t) {
239  function e(s, r = {}) {
240    return Ai(t(s, r));
241  }
242  if (typeof Proxy > "u")
243    return e;
244  const n = /* @__PURE__ */ new Map();
245  return new Proxy(e, {
246    /**
247     * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
248     * The prop name is passed through as `key` and we can use that to generate a `motion`
249     * DOM component with that name.
250     */
251    get: (s, r) => (n.has(r) || n.set(r, e(r)), n.get(r))
252  });
253}
254const Ri = [
255  "animate",
256  "circle",
257  "defs",
258  "desc",
259  "ellipse",
260  "g",
261  "image",
262  "line",
263  "filter",
264  "marker",
265  "mask",
266  "metadata",
267  "path",
268  "pattern",
269  "polygon",
270  "polyline",
271  "rect",
272  "stop",
273  "switch",
274  "symbol",
275  "svg",
276  "text",
277  "tspan",
278  "use",
279  "view"
280];
281function sn(t) {
282  return (
283    /**
284     * If it's not a string, it's a custom React component. Currently we only support
285     * HTML custom React components.
286     */
287    typeof t != "string" || /**
288     * If it contains a dash, the element is a custom HTML webcomponent.
289     */
290    t.includes("-") ? !1 : (
291      /**
292       * If it's in our list of lowercase SVG tags, it's an SVG component
293       */
294      !!(Ri.indexOf(t) > -1 || /**
295       * If it contains a capital letter, it's an SVG component
296       */
297      /[A-Z]/.test(t))
298    )
299  );
300}
301const re = {};
302function Oi(t) {
303  Object.assign(re, t);
304}
305const _t = [
306  "transformPerspective",
307  "x",
308  "y",
309  "z",
310  "translateX",
311  "translateY",
312  "translateZ",
313  "scale",
314  "scaleX",
315  "scaleY",
316  "rotate",
317  "rotateX",
318  "rotateY",
319  "rotateZ",
320  "skew",
321  "skewX",
322  "skewY"
323], xt = new Set(_t);
324function _s(t, { layout: e, layoutId: n }) {
325  return xt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!re[t] || t === "opacity");
326}
327const $ = (t) => !!(t && t.getVelocity), Ei = {
328  x: "translateX",
329  y: "translateY",
330  z: "translateZ",
331  transformPerspective: "perspective"
332}, ji = _t.length;
333function Li(t, { enableHardwareAcceleration: e = !0, allowTransformNone: n = !0 }, s, r) {
334  let o = "";
335  for (let i = 0; i < ji; i++) {
336    const a = _t[i];
337    if (t[a] !== void 0) {
338      const l = Ei[a] || a;
339      o += `${l}(${t[a]}) `;
340    }
341  }
342  return e && !t.z && (o += "translateZ(0)"), o = o.trim(), r ? o = r(t, s ? "" : o) : n && s && (o = "none"), o;
343}
344const Us = (t) => (e) => typeof e == "string" && e.startsWith(t), Ns = Us("--"), Be = Us("var(--"), ki = /var\s*\(\s*--[\w-]+(\s*,\s*(?:(?
344:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g, Bi = (t, e) => e && typeof t == "number" ? e.transform(t) : t, ot = (t, e, n) => Math.min(Math.max(n, t), e), bt = {
345  test: (t) => typeof t == "number",
346  parse: parseFloat,
347  transform: (t) => t
348}, Et = {
349  ...bt,
350  transform: (t) => ot(0, 1, t)
351}, Zt = {
352  ...bt,
353  default: 1
354}, jt = (t) => Math.round(t * 1e5) / 1e5, ye = /(-)?([\d]*\.?[\d])+/g, Ws = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, Fi = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
355function Ut(t) {
356  return typeof t == "string";
357}
358const Nt = (t) => ({
359  test: (e) => Ut(e) && e.endsWith(t) && e.split(" ").length === 1,
360  parse: parseFloat,
361  transform: (e) => `${e}${t}`
362}), st = Nt("deg"), Z = Nt("%"), D = Nt("px"), Ii = Nt("vh"), _i = Nt("vw"), Dn = {
363  ...Z,
364  parse: (t) => Z.parse(t) / 100,
365  transform: (t) => Z.transform(t * 100)
366}, Mn = {
367  ...bt,
368  transform: Math.round
369}, Hs = {
370  // Border props
371  borderWidth: D,
372  borderTopWidth: D,
373  borderRightWidth: D,
374  borderBottomWidth: D,
375  borderLeftWidth: D,
376  borderRadius: D,
377  radius: D,
378  borderTopLeftRadius: D,
379  borderTopRightRadius: D,
380  borderBottomRightRadius: D,
381  borderBottomLeftRadius: D,
382  // Positioning props
383  width: D,
384  maxWidth: D,
385  height: D,
386  maxHeight: D,
387  size: D,
388  top: D,
389  right: D,
390  bottom: D,
391  left: D,
392  // Spacing props
393  padding: D,
394  paddingTop: D,
395  paddingRight: D,
396  paddingBottom: D,
397  paddingLeft: D,
398  margin: D,
399  marginTop: D,
400  marginRight: D,
401  marginBottom: D,
402  marginLeft: D,
403  // Transform props
404  rotate: st,
405  rotateX: st,
406  rotateY: st,
407  rotateZ: st,
408  scale: Zt,
409  scaleX: Zt,
410  scaleY: Zt,
411  scaleZ: Zt,
412  skew: st,
413  skewX: st,
414  skewY: st,
415  distance: D,
416  translateX: D,
417  translateY: D,
418  translateZ: D,
419  x: D,
420  y: D,
421  z: D,
422  perspective: D,
423  transformPerspective: D,
424  opacity: Et,
425  originX: Dn,
426  originY: Dn,
427  originZ: D,
428  // Misc
429  zIndex: Mn,
430  // SVG
431  fillOpacity: Et,
432  strokeOpacity: Et,
433  numOctaves: Mn
434};
435function rn(t, e, n, s) {
436  const { style: r, vars: o, transform: i, transformOrigin: a } = t;
437  let l = !1, u = !1, c = !0;
438  for (const f in e) {
439    const h = e[f];
440    if (Ns(f)) {
441      o[f] = h;
442      continue;
443    }
444    const p = Hs[f], d = Bi(h, p);
445    if (xt.has(f)) {
446      if (l = !0, i[f] = d, !c)
447        continue;
448      h !== (p.default || 0) && (c = !1);
449    } else
450      f.startsWith("origin") ? (u = !0, a[f] = d) : r[f] = d;
451  }
452  if (e.transform || (l || s ? r.transform = Li(t.transform, n, c, s) : r.transform && (r.transform = "none")), u) {
453    const { originX: f = "50%", originY: h = "50%", originZ: p = 0 } = a;
454    r.transformOrigin = `${f} ${h} ${p}`;
455  }
456}
457const on = () => ({
458  style: {},
459  transform: {},
460  transformOrigin: {},
461  vars: {}
462});
463function zs(t, e, n) {
464  for (const s in e)
465    !$(e[s]) && !_s(s, n) && (t[s] = e[s]);
466}
467function Ui({ transformTemplate: t }, e, n) {
468  return w.useMemo(() => {
469    const s = on();
470    return rn(s, e, { enableHardwareAcceleration: !n }, t), Object.assign({}, s.vars, s.style);
471  }, [e]);
472}
473function Ni(t, e, n) {
474  const s = t.style || {}, r = {};
475  return zs(r, s, t), Object.assign(r, Ui(t, e, n)), r;
476}
477function Wi(t, e, n) {
478  const s = {}, r = Ni(t, e, n);
479  return t.drag && t.dragListener !== !1 && (s.draggable = !1, r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = "none", r.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (s.tabIndex = 0), s.style = r, s;
480}
481const Hi = /* @__PURE__ */ new Set([
482  "animate",
483  "exit",
484  "variants",
485  "initial",
486  "style",
487  "values",
488  "variants",
489  "transition",
490  "transformTemplate",
491  "custom",
492  "inherit",
493  "onBeforeLayoutMeasure",
494  "onAnimationStart",
495  "onAnimationComplete",
496  "onUpdate",
497  "onDragStart",
498  "onDrag",
499  "onDragEnd",
500  "onMeasureDragConstraints",
501  "onDirectionLock",
502  "onDragTransitionEnd",
503  "_dragX",
504  "_dragY",
505  "onHoverStart",
506  "onHoverEnd",
507  "onViewportEnter",
508  "onViewportLeave",
509  "globalTapTarget",
510  "ignoreStrict",
511  "viewport"
512]);
513function ie(t) {
514  return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Hi.has(t);
515}
516let Gs = (t) => !ie(t);
517function zi(t) {
518  t && (Gs = (e) => e.startsWith("on") ? !ie(e) : t(e));
519}
520try {
521  zi(require("@emotion/is-prop-valid").default);
522} catch {
523}
524function Gi(t, e, n) {
525  const s = {};
526  for (const r in t)
527    r === "values" && typeof t.values == "object" || (Gs(r) || n === !0 && ie(r) || !e && !ie(r) || // If trying to use native HTML drag events, forward drag listeners
528    t.draggable && r.startsWith("onDrag")) && (s[r] = t[r]);
529  return s;
530}
531function Rn(t, e, n) {
532  return typeof t == "string" ? t : D.transform(e + n * t);
533}
534function $i(t, e, n) {
535  const s = Rn(e, t.x, t.width), r = Rn(n, t.y, t.height);
536  return `${s} ${r}`;
537}
538const Ki = {
539  offset: "stroke-dashoffset",
540  array: "stroke-dasharray"
541}, qi = {
542  offset: "strokeDashoffset",
543  array: "strokeDasharray"
544};
545function Yi(t, e, n = 1, s = 0, r = !0) {
546  t.pathLength = 1;
547  const o = r ? Ki : qi;
548  t[o.offset] = D.transform(-s);
549  const i = D.transform(e), a = D.transform(n);
550  t[o.array] = `${i} ${a}`;
551}
552function an(t, {
553  attrX: e,
554  attrY: n,
555  attrScale: s,
556  originX: r,
557  originY: o,
558  pathLength: i,
559  pathSpacing: a = 1,
560  pathOffset: l = 0,
561  // This is object creation, which we try to avoid per-frame.
562  ...u
563}, c, f, h) {
564  if (rn(t, u, c, h), f) {
565    t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
566    return;
567  }
568  t.attrs = t.style, t.style = {};
569  const { attrs: p, style: d, dimensions: m } = t;
570  p.transform && (m && (d.transform = p.transform), delete p.transform), m && (r !== void 0 || o !== void 0 || d.transform) && (d.transformOrigin = $i(m, r !== void 0 ? r : 0.5, o !== void 0 ? o : 0.5)), e !== void 0 && (p.x = e), n !== void 0 && (p.y = n), s !== void 0 && (p.scale = s), i !== void 0 && Yi(p, i, a, l, !1);
571}
572const $s = () => ({
573  ...on(),
574  attrs: {}
575}), ln = (t) => typeof t == "string" && t.toLowerCase() === "svg";
576function Xi(t, e, n, s) {
577  const r = w.useMemo(() => {
578    const o = $s();
579    return an(o, e, { enableHardwareAcceleration: !1 }, ln(s), t.transformTemplate), {
580      ...o.attrs,
581      style: { ...o.style }
582    };
583  }, [e]);
584  if (t.style) {
585    const o = {};
586    zs(o, t.style, t), r.style = { ...o, ...r.style };
587  }
588  return r;
589}
590function Zi(t = !1) {
591  return (n, s, r, { latestValues: o }, i) => {
592    const l = (sn(n) ? Xi : Wi)(s, o, i, n), c = {
593      ...Gi(s, typeof n == "string", t),
594      ...l,
595      ref: r
596    }, { children: f } = s, h = w.useMemo(() => $(f) ? f.get() : f, [f]);
597    return w.createElement(n, {
598      ...c,
599      children: h
600    });
601  };
602}
603function Ks(t, { style: e, vars: n }, s, r) {
604  Object.assign(t.style, e, r && r.getProjectionStyles(s));
605  for (const o in n)
606    t.style.setProperty(o, n[o]);
607}
608const qs = /* @__PURE__ */ new Set([
609  "baseFrequency",
610  "diffuseConstant",
611  "kernelMatrix",
612  "kernelUnitLength",
613  "keySplines",
614  "keyTimes",
615  "limitingConeAngle",
616  "markerHeight",
617  "markerWidth",
618  "numOctaves",
619  "targetX",
620  "targetY",
621  "surfaceScale",
622  "specularConstant",
623  "specularExponent",
624  "stdDeviation",
625  "tableValues",
626  "viewBox",
627  "gradientTransform",
628  "pathLength",
629  "startOffset",
630  "textLength",
631  "lengthAdjust"
632]);
633function Ys(t, e, n, s) {
634  Ks(t, e, void 0, s);
635  for (const r in e.attrs)
636    t.setAttribute(qs.has(r) ? r : Qe(r), e.attrs[r]);
637}
638function un(t, e) {
639  const { style: n } = t, s = {};
640  for (const r in n)
641    ($(n[r]) || e.style && $(e.style[r]) || _s(r, t)) && (s[r] = n[r]);
642  return s;
643}
644function Xs(t, e) {
645  const n = un(t, e);
646  for (const s in t)
647    if ($(t[s]) || $(e[s])) {
648      const r = _t.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
649      n[r] = t[s];
650    }
651  return n;
652}
653function cn(t, e, n, s = {}, r = {}) {
654  return typeof e == "function" && (e = e(n !== void 0 ? n : t.custom, s, r)), typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function" && (e = e(n !== void 0 ? n : t.custom, s, r)), e;
655}
656function Zs(t) {
657  const e = w.useRef(null);
658  return e.current === null && (e.current = t()), e.current;
659}
660const oe = (t) => Array.isArray(t), Qi = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), Ji = (t) => oe(t) ? t[t.length - 1] || 0 : t;
661function ee(t) {
662  const e = $(t) ? t.get() : t;
663  return Qi(e) ? e.toValue() : e;
664}
665function to({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: n }, s, r, o) {
666  const i = {
667    latestValues: eo(s, r, o, t),
668    renderState: e()
669  };
670  return n && (i.mount = (a) => n(s, a, i)), i;
671}
672const Qs = (t) => (e, n) => {
673  const s = w.useContext(he), r = w.useContext(de), o = () => to(t, e, s, r);
674  return n ? o() : Zs(o);
675};
676function eo(t, e, n, s) {
677  const r = {}, o = s(t, {});
678  for (const h in o)
679    r[h] = ee(o[h]);
680  let { initial: i, animate: a } = t;
681  const l = ge(t), u = Fs(t);
682  e && u && !l && t.inherit !== !1 && (i === void 0 && (i = e.initial), a === void 0 && (a = e.animate));
683  let c = n ? n.initial === !1 : !1;
684  c = c || i === !1;
685  const f = c ? a : i;
686  return f && typeof f != "boolean" && !me(f) && (Array.isArray(f) ? f : [f]).forEach((p) => {
687    const d = cn(t, p);
688    if (!d)
689      return;
690    const { transitionEnd: m, transition: y, ...v } = d;
691    for (const x in v) {
692      let g = v[x];
693      if (Array.isArray(g)) {
694        const V = c ? g.length - 1 : 0;
695        g = g[V];
696      }
697      g !== null && (r[x] = g);
698    }
699    for (const x in m)
700      r[x] = m[x];
701  }), r;
702}
703const U = (t) => t, { schedule: B, cancel: et, state: W, steps: Pe } = Bs(typeof requestAnimationFrame < "u" ? requestAnimationFrame : U, !0), no = {
704  useVisualState: Qs({
705    scrapeMotionValuesFromProps: Xs,
706    createRenderState: $s,
707    onMount: (t, e, { renderState: n, latestValues: s }) => {
708      B.read(() => {
709        try {
710          n.dimensions = typeof e.getBBox == "function" ? e.getBBox() : e.getBoundingClientRect();
711        } catch {
712          n.dimensions = {
713            x: 0,
714            y: 0,
715            width: 0,
716            height: 0
717          };
718        }
719      }), B.render(() => {
720        an(n, s, { enableHardwareAcceleration: !1 }, ln(e.tagName), t.transformTemplate), Ys(e, n);
721      });
722    }
723  })
724}, so = {
725  useVisualState: Qs({
726    scrapeMotionValuesFromProps: un,
727    createRenderState: on
728  })
729};
730function ro(t, { forwardMotionProps: e = !1 }, n, s) {
731  return {
732    ...sn(t) ? no : so,
733    preloadedFeatures: n,
734    useRender: Zi(e),
735    createVisualElement: s,
736    Component: t
737  };
738}
739function Q(t, e, n, s = { passive: !0 }) {
740  return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
741}
742const Js = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1;
743function ve(t, e = "page") {
744  return {
745    point: {
746      x: t[e + "X"],
747      y: t[e + "Y"]
748    }
749  };
750}
751const io = (t) => (e) => Js(e) && t(e, ve(e));
752function J(t, e, n, s) {
753  return Q(t, e, io(n), s);
754}
755const oo = (t, e) => (n) => e(t(n)), it = (...t) => t.reduce(oo);
756function tr(t) {
757  let e = null;
758  return () => {
759    const n = () => {
760      e = null;
761    };
762    return e === null ? (e = t, n) : !1;
763  };
764}
765const On = tr("dragHorizontal"), En = tr("dragVertical");
766function er(t) {
767  let e = !1;
768  if (t === "y")
769    e = En();
770  else if (t === "x")
771    e = On();
772  else {
773    const n = On(), s = En();
774    n && s ? e = () => {
775      n(), s();
776    } : (n && n(), s && s());
777  }
778  return e;
779}
780function nr() {
781  const t = er(!0);
782  return t ? (t(), !1) : !0;
783}
784class lt {
785  constructor(e) {
786    this.isMounted = !1, this.node = e;
787  }
788  update() {
789  }
790}
791function jn(t, e) {
792  const n = "pointer" + (e ? "enter" : "leave"), s = "onHover" + (e ? "Start" : "End"), r = (o, i) => {
793    if (o.pointerType === "touch" || nr())
794      return;
795    const a = t.getProps();
796    t.animationState && a.whileHover && t.animationState.setActive("whileHover", e), a[s] && B.update(() => a[s](o, i));
797  };
798  return J(t.current, n, r, {
799    passive: !t.getProps()[s]
800  });
801}
802class ao extends lt {
803  mount() {
804    this.unmount = it(jn(this.node, !0), jn(this.node, !1));
805  }
806  unmount() {
807  }
808}
809class lo extends lt {
810  constructor() {
811    super(...arguments), this.isActive = !1;
812  }
813  onFocus() {
814    let e = !1;
815    try {
816      e = this.node.current.matches(":focus-visible");
817    } catch {
818      e = !0;
819    }
820    !e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
821  }
822  onBlur() {
823    !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
824  }
825  mount() {
826    this.unmount = it(Q(this.node.current, "focus", () => this.onFocus()), Q(this.node.current, "blur", () => this.onBlur()));
827  }
828  unmount() {
829  }
830}
831const sr = (t, e) => e ? t === e ? !0 : sr(t, e.parentElement) : !1;
832function Ce(t, e) {
833  if (!e)
834    return;
835  const n = new PointerEvent("pointer" + t);
836  e(n, ve(n));
837}
838class uo extends lt {
839  constructor() {
840    super(...arguments), this.removeStartListeners = U, this.removeEndListeners = U, this.removeAccessibleListeners = U, this.startPointerPress = (e, n) => {
841      if (this.isPressing)
842        return;
843      this.removeEndListeners();
844      const s = this.node.getProps(), o = J(window, "pointerup", (a, l) => {
845        if (!this.checkPressEnd())
846          return;
847        const { onTap: u, onTapCancel: c, globalTapTarget: f } = this.node.getProps();
848        B.update(() => {
849          !f && !sr(this.node.current, a.target) ? c && c(a, l) : u && u(a, l);
850        });
851      }, { passive: !(s.onTap || s.onPointerUp) }
851), i = J(window, "pointercancel", (a, l) => this.cancelPress(a, l), { passive: !(s.onTapCancel || s.onPointerCancel) });
852      this.removeEndListeners = it(o, i), this.startPress(e, n);
853    }, this.startAccessiblePress = () => {
854      const e = (o) => {
855        if (o.key !== "Enter" || this.isPressing)
856          return;
857        const i = (a) => {
858          a.key !== "Enter" || !this.checkPressEnd() || Ce("up", (l, u) => {
859            const { onTap: c } = this.node.getProps();
860            c && B.update(() => c(l, u));
861          });
862        };
863        this.removeEndListeners(), this.removeEndListeners = Q(this.node.current, "keyup", i), Ce("down", (a, l) => {
864          this.startPress(a, l);
865        });
866      }, n = Q(this.node.current, "keydown", e), s = () => {
867        this.isPressing && Ce("cancel", (o, i) => this.cancelPress(o, i));
868      }, r = Q(this.node.current, "blur", s);
869      this.removeAccessibleListeners = it(n, r);
870    };
871  }
872  startPress(e, n) {
873    this.isPressing = !0;
874    const { onTapStart: s, whileTap: r } = this.node.getProps();
875    r && this.node.animationState && this.node.animationState.setActive("whileTap", !0), s && B.update(() => s(e, n));
876  }
877  checkPressEnd() {
878    return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !nr();
879  }
880  cancelPress(e, n) {
881    if (!this.checkPressEnd())
882      return;
883    const { onTapCancel: s } = this.node.getProps();
884    s && B.update(() => s(e, n));
885  }
886  mount() {
887    const e = this.node.getProps(), n = J(e.globalTapTarget ? window : this.node.current, "pointerdown", this.startPointerPress, { passive: !(e.onTapStart || e.onPointerStart) }), s = Q(this.node.current, "focus", this.startAccessiblePress);
888    this.removeStartListeners = it(n, s);
889  }
890  unmount() {
891    this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
892  }
893}
894const Fe = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), co = (t) => {
895  const e = Fe.get(t.target);
896  e && e(t);
897}, fo = (t) => {
898  t.forEach(co);
899};
900function ho({ root: t, ...e }) {
901  const n = t || document;
902  Te.has(n) || Te.set(n, {});
903  const s = Te.get(n), r = JSON.stringify(e);
904  return s[r] || (s[r] = new IntersectionObserver(fo, { root: t, ...e })), s[r];
905}
906function po(t, e, n) {
907  const s = ho(e);
908  return Fe.set(t, n), s.observe(t), () => {
909    Fe.delete(t), s.unobserve(t);
910  };
911}
912const mo = {
913  some: 0,
914  all: 1
915};
916class go extends lt {
917  constructor() {
918    super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
919  }
920  startObserver() {
921    this.unmount();
922    const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: r = "some", once: o } = e, i = {
923      root: n ? n.current : void 0,
924      rootMargin: s,
925      threshold: typeof r == "number" ? r : mo[r]
926    }, a = (l) => {
927      const { isIntersecting: u } = l;
928      if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
929        return;
930      u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
931      const { onViewportEnter: c, onViewportLeave: f } = this.node.getProps(), h = u ? c : f;
932      h && h(l);
933    };
934    return po(this.node.current, i, a);
935  }
936  mount() {
937    this.startObserver();
938  }
939  update() {
940    if (typeof IntersectionObserver > "u")
941      return;
942    const { props: e, prevProps: n } = this.node;
943    ["amount", "margin", "root"].some(yo(e, n)) && this.startObserver();
944  }
945  unmount() {
946  }
947}
948function yo({ viewport: t = {} }, { viewport: e = {} } = {}) {
949  return (n) => t[n] !== e[n];
950}
951const vo = {
952  inView: {
953    Feature: go
954  },
955  tap: {
956    Feature: uo
957  },
958  focus: {
959    Feature: lo
960  },
961  hover: {
962    Feature: ao
963  }
964};
965function rr(t, e) {
966  if (!Array.isArray(e))
967    return !1;
968  const n = e.length;
969  if (n !== t.length)
970    return !1;
971  for (let s = 0; s < n; s++)
972    if (e[s] !== t[s])
973      return !1;
974  return !0;
975}
976function xo(t) {
977  const e = {};
978  return t.values.forEach((n, s) => e[s] = n.get()), e;
979}
980function bo(t) {
981  const e = {};
982  return t.values.forEach((n, s) => e[s] = n.getVelocity()), e;
983}
984function xe(t, e, n) {
985  const s = t.getProps();
986  return cn(s, e, n !== void 0 ? n : s.custom, xo(t), bo(t));
987}
988let fn = U;
989const yt = (t) => t * 1e3, tt = (t) => t / 1e3, Po = {
990  current: !1
991}, ir = (t) => Array.isArray(t) && typeof t[0] == "number";
992function or(t) {
993  return !!(!t || typeof t == "string" && ar[t] || ir(t) || Array.isArray(t) && t.every(or));
994}
995const Ot = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, ar = {
996  linear: "linear",
997  ease: "ease",
998  easeIn: "ease-in",
999  easeOut: "ease-out",
1000  easeInOut: "ease-in-out",
1001  circIn: Ot([0, 0.65, 0.55, 1]),
1002  circOut: Ot([0.55, 0, 1, 0.45]),
1003  backIn: Ot([0.31, 0.01, 0.66, -0.59]),
1004  backOut: Ot([0.33, 1.53, 0.69, 0.99])
1005};
1006function lr(t) {
1007  if (t)
1008    return ir(t) ? Ot(t) : Array.isArray(t) ? t.map(lr) : ar[t];
1009}
1010function Co(t, e, n, { delay: s = 0, duration: r, repeat: o = 0, repeatType: i = "loop", ease: a, times: l } = {}) {
1011  const u = { [e]: n };
1012  l && (u.offset = l);
1013  const c = lr(a);
1014  return Array.isArray(c) && (u.easing = c), t.animate(u, {
1015    delay: s,
1016    duration: r,
1017    easing: Array.isArray(c) ? "linear" : c,
1018    fill: "both",
1019    iterations: o + 1,
1020    direction: i === "reverse" ? "alternate" : "normal"
1021  });
1022}
1023function To(t, { repeat: e, repeatType: n = "loop" }) {
1024  const s = e && n !== "loop" && e % 2 === 1 ? 0 : t.length - 1;
1025  return t[s];
1026}
1027const ur = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, wo = 1e-7, So = 12;
1028function Vo(t, e, n, s, r) {
1029  let o, i, a = 0;
1030  do
1031    i = e + (n - e) / 2, o = ur(i, s, r) - t, o > 0 ? n = i : e = i;
1032  while (Math.abs(o) > wo && ++a < So);
1033  return i;
1034}
1035function Wt(t, e, n, s) {
1036  if (t === e && n === s)
1037    return U;
1038  const r = (o) => Vo(o, 0, 1, t, n);
1039  return (o) => o === 0 || o === 1 ? o : ur(r(o), e, s);
1040}
1041const Ao = Wt(0.42, 0, 1, 1), Do = Wt(0, 0, 0.58, 1), cr = Wt(0.42, 0, 0.58, 1), Mo = (t) => Array.isArray(t) && typeof t[0] != "number", fr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, hr = (t) => (e) => 1 - t(1 - e), hn = (t) => 1 - Math.sin(Math.acos(t)), dr = hr(hn), Ro = fr(hn), pr = Wt(0.33, 1.53, 0.69, 0.99), dn = hr(pr), Oo = fr(dn), Eo = (t) => (t *= 2) < 1 ? 0.5 * dn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), jo = {
1042  linear: U,
1043  easeIn: Ao,
1044  easeInOut: cr,
1045  easeOut: Do,
1046  circIn: hn,
1047  circInOut: Ro,
1048  circOut: dr,
1049  backIn: dn,
1050  backInOut: Oo,
1051  backOut: pr,
1052  anticipate: Eo
1053}, Ln = (t) => {
1054  if (Array.isArray(t)) {
1055    fn(t.length === 4);
1056    const [e, n, s, r] = t;
1057    return Wt(e, n, s, r);
1058  } else if (typeof t == "string")
1059    return jo[t];
1060  return t;
1061}, pn = (t, e) => (n) => !!(Ut(n) && Fi.test(n) && n.startsWith(t) || e && Object.prototype.hasOwnProperty.call(n, e)), mr = (t, e, n) => (s) => {
1062  if (!Ut(s))
1063    return s;
1064  const [r, o, i, a] = s.match(ye);
1065  return {
1066    [t]: parseFloat(r),
1067    [e]: parseFloat(o),
1068    [n]: parseFloat(i),
1069    alpha: a !== void 0 ? parseFloat(a) : 1
1070  };
1071}, Lo = (t) => ot(0, 255, t), we = {
1072  ...bt,
1073  transform: (t) => Math.round(Lo(t))
1074}, gt = {
1075  test: pn("rgb", "red"),
1076  parse: mr("red", "green", "blue"),
1077  transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + we.transform(t) + ", " + we.transform(e) + ", " + we.transform(n) + ", " + jt(Et.transform(s)) + ")"
1078};
1079function ko(t) {
1080  let e = "", n = "", s = "", r = "";
1081  return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), r = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), r = t.substring(4, 5), e += e, n += n, s += s, r += r), {
1082    red: parseInt(e, 16),
1083    green: parseInt(n, 16),
1084    blue: parseInt(s, 16),
1085    alpha: r ? parseInt(r, 16) / 255 : 1
1086  };
1087}
1088const Ie = {
1089  test: pn("#"),
1090  parse: ko,
1091  transform: gt.transform
1092}, Ct = {
1093  test: pn("hsl", "hue"),
1094  parse: mr("hue", "saturation", "lightness"),
1095  transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + Z.transform(jt(e)) + ", " + Z.transform(jt(n)) + ", " + jt(Et.transform(s)) + ")"
1096}, G = {
1097  test: (t) => gt.test(t) || Ie.test(t) || Ct.test(t),
1098  parse: (t) => gt.test(t) ? gt.parse(t) : Ct.test(t) ? Ct.parse(t) : Ie.parse(t),
1099  transform: (t) => Ut(t) ? t : t.hasOwnProperty("red") ? gt.transform(t) : Ct.transform(t)
1100}, I = (t, e, n) => -n * t + n * e + t;
1101function Se(t, e, n) {
1102  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
1103}
1104function Bo({ hue: t, saturation: e, lightness: n, alpha: s }) {
1105  t /= 360, e /= 100, n /= 100;
1106  let r = 0, o = 0, i = 0;
1107  if (!e)
1108    r = o = i = n;
1109  else {
1110    const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
1111    r = Se(l, a, t + 1 / 3), o = Se(l, a, t), i = Se(l, a, t - 1 / 3);
1112  }
1113  return {
1114    red: Math.round(r * 255),
1115    green: Math.round(o * 255),
1116    blue: Math.round(i * 255),
1117    alpha: s
1118  };
1119}
1120const Ve = (t, e, n) => {
1121  const s = t * t;
1122  return Math.sqrt(Math.max(0, n * (e * e - s) + s));
1123}, Fo = [Ie, gt, Ct], Io = (t) => Fo.find((e) => e.test(t));
1124function kn(t) {
1125  const e = Io(t);
1126  let n = e.parse(t);
1127  return e === Ct && (n = Bo(n)), n;
1128}
1129const gr = (t, e) => {
1130  const n = kn(t), s = kn(e), r = { ...n };
1131  return (o) => (r.red = Ve(n.red, s.red, o), r.green = Ve(n.green, s.green, o), r.blue = Ve(n.blue, s.blue, o), r.alpha = I(n.alpha, s.alpha, o), gt.transform(r));
1132};
1133function _o(t) {
1134  var e, n;
1135  return isNaN(t) && Ut(t) && (((e = t.match(ye)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Ws)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
1136}
1137const yr = {
1138  regex: ki,
1139  countKey: "Vars",
1140  token: "${v}",
1141  parse: U
1142}, vr = {
1143  regex: Ws,
1144  countKey: "Colors",
1145  token: "${c}",
1146  parse: G.parse
1147}, xr = {
1148  regex: ye,
1149  countKey: "Numbers",
1150  token: "${n}",
1151  parse: bt.parse
1152};
1153function Ae(t, { regex: e, countKey: n, token: s, parse: r }) {
1154  const o = t.tokenised.match(e);
1155  o && (t["num" + n] = o.length, t.tokenised = t.tokenised.replace(e, s), t.values.push(...o.map(r)));
1156}
1157function ae(t) {
1158  const e = t.toString(), n = {
1159    value: e,
1160    tokenised: e,
1161    values: [],
1162    numVars: 0,
1163    numColors: 0,
1164    numNumbers: 0
1165  };
1166  return n.value.includes("var(--") && Ae(n, yr), Ae(n, vr), Ae(n, xr), n;
1167}
1168function br(t) {
1169  return ae(t).values;
1170}
1171function Pr(t) {
1172  const { values: e, numColors: n, numVars: s, tokenised: r } = ae(t), o = e.length;
1173  return (i) => {
1174    let a = r;
1175    for (let l = 0; l < o; l++)
1176      l < s ? a = a.replace(yr.token, i[l]) : l < s + n ? a = a.replace(vr.token, G.transform(i[l])) : a = a.replace(xr.token, jt(i[l]));
1177    return a;
1178  };
1179}
1180const Uo = (t) => typeof t == "number" ? 0 : t;
1181function No(t) {
1182  const e = br(t);
1183  return Pr(t)(e.map(Uo));
1184}
1185const at = {
1186  test: _o,
1187  parse: br,
1188  createTransformer: Pr,
1189  getAnimatableNone: No
1190}, Cr = (t, e) => (n) => `${n > 0 ? e : t}`;
1191function Tr(t, e) {
1192  return typeof t == "number" ? (n) => I(t, e, n) : G.test(t) ? gr(t, e) : t.startsWith("var(") ? Cr(t, e) : Sr(t, e);
1193}
1194const wr = (t, e) => {
1195  const n = [...t], s = n.length, r = t.map((o, i) => Tr(o, e[i]));
1196  return (o) => {
1197    for (let i = 0; i < s; i++)
1198      n[i] = r[i](o);
1199    return n;
1200  };
1201}, Wo = (t, e) => {
1202  const n = { ...t, ...e }, s = {};
1203  for (const r in n)
1204    t[r] !== void 0 && e[r] !== void 0 && (s[r] = Tr(t[r], e[r]));
1205  return (r) => {
1206    for (const o in s)
1207      n[o] = s[o](r);
1208    return n;
1209  };
1210}, Sr = (t, e) => {
1211  const n = at.createTransformer(e), s = ae(t), r = ae(e);
1212  return s.numVars === r.numVars && s.numColors === r.numColors && s.numNumbers >= r.numNumbers ? it(wr(s.values, r.values), n) : Cr(t, e);
1213}, It = (t, e, n) => {
1214  const s = e - t;
1215  return s === 0 ? 1 : (n - t) / s;
1216}, Bn = (t, e) => (n) => I(t, e, n);
1217function Ho(t) {
1218  return typeof t == "number" ? Bn : typeof t == "string" ? G.test(t) ? gr : Sr : Array.isArray(t) ? wr : typeof t == "object" ? Wo : Bn;
1219}
1220function zo(t, e, n) {
1221  const s = [], r = n || Ho(t[0]), o = t.length - 1;
1222  for (let i = 0; i < o; i++) {
1223    let a = r(t[i], t[i + 1]);
1224    if (e) {
1225      const l = Array.isArray(e) ? e[i] || U : e;
1226      a = it(l, a);
1227    }
1228    s.push(a);
1229  }
1230  return s;
1231}
1232function Vr(t, e, { clamp: n = !0, ease: s, mixer: r } = {}) {
1233  const o = t.length;
1234  if (fn(o === e.length), o === 1)
1235    return () => e[0];
1236  t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
1237  const i = zo(e, s, r), a = i.length, l = (u) => {
1238    let c = 0;
1239    if (a > 1)
1240      for (; c < t.length - 2 && !(u < t[c + 1]); c++)
1241        ;
1242    const f = It(t[c], t[c + 1], u);
1243    return i[c](f);
1244  };
1245  return n ? (u) => l(ot(t[0], t[o - 1], u)) : l;
1246}
1247function Go(t, e) {
1248  const n = t[t.length - 1];
1249  for (let s = 1; s <= e; s++) {
1250    const r = It(0, e, s);
1251    t.push(I(n, 1, r));
1252  }
1253}
1254function $o(t) {
1255  const e = [0];
1256  return Go(e, t.length - 1), e;
1257}
1258function Ko(t, e) {
1259  return t.map((n) => n * e);
1260}
1261function qo(t, e) {
1262  return t.map(() => e || cr).splice(0, t.length - 1);
1263}
1264function le({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
1265  const r = Mo(s) ? s.map(Ln) : Ln(s), o = {
1266    done: !1,
1267    value: e[0]
1268  }, i = Ko(
1269    // Only use the provided offsets if they're the correct length
1270    // TODO Maybe we should warn here if there's a length mismatch
1271    n && n.length === e.length ? n : $o(e),
1272    t
1273  ), a = Vr(i, e, {
1274    ease: Array.isArray(r) ? r : qo(e, r)
1275  });
1276  return {
1277    calculatedDuration: t,
1278    next: (l) => (o.value = a(l), o.done = l >= t, o)
1279  };
1280}
1281function Ar(t, e) {
1282  return e ? t * (1e3 / e) : 0;
1283}
1284const Yo = 5;
1285function Dr(t, e, n) {
1286  const s = Math.max(e - Yo, 0);
1287  return Ar(n - t(s), e - s);
1288}
1289const De = 1e-3, Xo = 0.01, Zo = 10, Qo = 0.05, Jo = 1;
1290function ta({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: s = 1 }) {
1291  let r, o, i = 1 - e;
1292  i = ot(Qo, Jo, i), t = ot(Xo, Zo, tt(t)), i < 1 ? (r = (u) => {
1293    const c = u * i, f = c * t, h = c - n, p = _e(u, i), d = Math.exp(-f);
1294    return De - h / p * d;
1295  }, o = (u) => {
1296    const f = u * i * t, h = f * n + n, p = Math.pow(i, 2) * Math.pow(u, 2) * t, d = Math.exp(-f), m = _e(Math.pow(u, 2), i);
1297    return (-r(u) + De > 0 ? -1 : 1) * ((h - p) * d) / m;
1298  }) : (r = (u) => {
1299    const c = Math.exp(-u * t), f = (u - n) * t + 1;
1300    return -De + c * f;
1301  }, o = (u) => {
1302    const c = Math.exp(-u * t), f = (n - u) * (t * t);
1303    return c * f;
1304  });
1305  const a = 5 / t, l = na(r, o, a);
1306  if (t = yt(t), isNaN(l))
1307    return {
1308      stiffness: 100,
1309      damping: 10,
1310      duration: t
1311    };
1312  {
1313    const u = Math.pow(l, 2) * s;
1314    return {
1315      stiffness: u,
1316      damping: i * 2 * Math.sqrt(s * u),
1317      duration: t
1318    };
1319  }
1320}
1321const ea = 12;
1322function na(t, e, n) {
1323  let s = n;
1324  for (let r = 1; r < ea; r++)
1325    s = s - t(s) / e(s);
1326  return s;
1327}
1328function _e(t, e) {
1329  return t * Math.sqrt(1 - e * e);
1330}
1331const sa = ["duration", "bounce"], ra = ["stiffness", "damping", "mass"];
1332function Fn(t, e) {
1333  return e.some((n) => t[n] !== void 0);
1334}
1335function ia(t) {
1336  let e = {
1337    velocity: 0,
1338    stiffness: 100,
1339    damping: 10,
1340    mass: 1,
1341    isResolvedFromDuration: !1,
1342    ...t
1343  };
1344  if (!Fn(t, ra) && Fn(t, sa)) {
1345    const n = ta(t);
1346    e = {
1347      ...e,
1348      ...n,
1349      mass: 1
1350    }, e.isResolvedFromDuration = !0;
1351  }
1352  return e;
1353}
1354function Mr({ keyframes: t, restDelta: e, restSpeed: n, ...s }) {
1355  const r = t[0], o = t[t.length - 1], i = { done: !1, value: r }, { stiffness: a, damping: l, mass: u, duration: c, velocity: f, isResolvedFromDuration: h } = ia({
1356    ...s,
1357    velocity: -tt(s.velocity || 0)
1358  }), p = f || 0, d = l / (2 * Math.sqrt(a * u)), m = o - r, y = tt(Math.sqrt(a / u)), v = Math.abs(m) < 5;
1359  n || (n = v ? 0.01 : 2), e || (e = v ? 5e-3 : 0.5);
1360  let x;
1361  if (d < 1) {
1362    const g = _e(y, d);
1363    x = (V) => {
1364      const b = Math.exp(-d * y * V);
1365      return o - b * ((p + d * y * m) / g * Math.sin(g * V) + m * Math.cos(g * V));
1366    };
1367  } else if (d === 1)
1368    x = (g) => o - Math.exp(-y * g) * (m + (p + y * m) * g);
1369  else {
1370    const g = y * Math.sqrt(d * d - 1);
1371    x = (V) => {
1372      const b = Math.exp(-d * y * V), R = Math.min(g * V, 300);
1373      return o - b * ((p + d * y * m) * Math.sinh(R) + g * m * Math.cosh(R)) / g;
1374    };
1375  }
1376  return {
1377    calculatedDuration: h && c || null,
1378    next: (g) => {
1379      const V = x(g);
1380      if (h)
1381        i.done = g >= c;
1382      else {
1383        let b = p;
1384        g !== 0 && (d < 1 ? b = Dr(x, g, V) : b = 0);
1385        const R = Math.abs(b) <= n, j = Math.abs(o - V) <= e;
1386        i.done = R && j;
1387      }
1388      return i.value = i.done ? o : V, i;
1389    }
1390  };
1391}
1392function In({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: r = 10, bounceStiffness: o = 500, modifyTarget: i, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
1393  const f = t[0], h = {
1394    done: !1,
1395    value: f
1396  }, p = (M) => a !== void 0 && M < a || l !== void 0 && M > l, d = (M) => a === void 0 ? l : l === void 0 || Math.abs(a - M) < Math.abs(l - M) ? a : l;
1397  let m = n * e;
1398  const y = f + m, v = i === void 0 ? y : i(y);
1399  v !== y && (m = v - f);
1400  const x = (M) => -m * Math.exp(-M / s), g = (M) => v + x(M), V = (M) => {
1401    const E = x(M), H = g(M);
1402    h.done = Math.abs(E) <= u, h.value = h.done ? v : H;
1403  };
1404  let b, R;
1405  const j = (M) => {
1406    p(h.value) && (b = M, R = Mr({
1407      keyframes: [h.value, d(h.value)],
1408      velocity: Dr(g, M, h.value),
1409      damping: r,
1410      stiffness: o,
1411      restDelta: u,
1412      restSpeed: c
1413    }));
1414  };
1415  return j(0), {
1416    calculatedDuration: null,
1417    next: (M) => {
1418      let E = !1;
1419      return !R && b === void 0 && (E = !0, V(M), j(M)), b !== void 0 && M > b ? R.next(M - b) : (!E && V(M), h);
1420    }
1421  };
1422}
1423let ne;
1424function oa() {
1425  ne = void 0;
1426}
1427const vt = {
1428  now: () => (ne === void 0 && vt.set(W.isProcessing || ks.useManualTiming ? W.timestamp : performance.now()), ne),
1429  set: (t) => {
1430    ne = t, queueMicrotask(oa);
1431  }
1432}, aa = (t) => {
1433  const e = ({ timestamp: n }) => t(n);
1434  return {
1435    start: () => B.update(e, !0),
1436    stop: () => et(e),
1437    /**
1438     * If we're processing this frame we can use the
1439     * framelocked timestamp to keep things in sync.
1440     */
1441    now: () => W.isProcessing ? W.timestamp : vt.now()
1442  };
1443}, _n = 2e4;
1444function Un(t) {
1445  let e = 0;
1446  const n = 50;
1447  let s = t.next(e);
1448  for (; !s.done && e < _n; )
1449    e += n, s = t.next(e);
1450  return e >= _n ? 1 / 0 : e;
1451}
1452const la = {
1453  decay: In,
1454  inertia: In,
1455  tween: le,
1456  keyframes: le,
1457  spring: Mr
1458};
1459function ue({ autoplay: t = !0, delay: e = 0, driver: n = aa, keyframes: s, type: r = "keyframes", repeat: o = 0, repeatDelay: i = 0, repeatType: a = "loop", onPlay: l, onStop: u, onComplete: c, onUpdate: f, ...h }) {
1460  let p = 1, d = !1, m, y;
1461  const v = () => {
1462    y = new Promise((k) => {
1463      m = k;
1464    });
1465  };
1466  v();
1467  let x;
1468  const g = la[r] || le;
1469  let V;
1470  g !== le && typeof s[0] != "number" && (V = Vr([0, 100], s, {
1471    clamp: !1
1472  }), s = [0, 100]);
1473  const b = g({ ...h, keyframes: s });
1474  let R;
1475  a === "mirror" && (R = g({
1476    ...h,
1477    keyframes: [...s].reverse(),
1478    velocity: -(h.velocity || 0)
1479  }));
1480  let j = "idle", M = null, E = null, H = null;
1481  b.calculatedDuration === null && o && (b.calculatedDuration = Un(b));
1482  const { calculatedDuration: P } = b;
1483  let T = 1 / 0, A = 1 / 0;
1484  P !== null && (T = P + i, A = T * (o + 1) - i);
1485  let S = 0;
1486  const L = (k) => {
1487    if (E === null)
1488      return;
1489    p > 0 && (E = Math.min(E, k)), p < 0 && (E = Math.min(k - A / p, E)), M !== null ? S = M : S = Math.round(k - E) * p;
1490    const nt = S - e * (p >= 0 ? 1 : -1), zt = p >= 0 ? nt < 0 : nt > A;
1491    S = Math.max(nt, 0), j === "finished" && M === null && (S = A);
1492    let Gt = S, $t = b;
1493    if (o) {
1494      const At = Math.min(S, A) / T;
1495      let qt = Math.floor(At), ct = At % 1;
1496      !ct && At >= 1 && (ct = 1), ct === 1 && qt--, qt = Math.min(qt, o + 1), !!(qt % 2) && (a === "reverse" ? (ct = 1 - ct, i && (ct -= i / T)) : a === "mirror" && ($t = R)), Gt = ot(0, 1, ct) * T;
1497    }
1498    const ut = zt ? { done: !1, value: s[0] } : $t.next(Gt);
1499    V && (ut.value = V(ut.value));
1500    let { done: Kt } = ut;
1501    !zt && P !== null && (Kt = p >= 0 ? S >= A : S <= 0);
1502    const Pn = M === null && (j === "finished" || j === "running" && Kt);
1503    return f && f(ut.value), Pn && X(), ut;
1504  }, O = () => {
1505    x && x.stop(), x = void 0;
1506  }, F = () => {
1507    j = "idle", O(), m(), v(), E = H = null;
1508  }, X = () => {
1509    j = "finished", c && c(), O(), m();
1510  }, N = () => {
1511    if (d)
1512      return;
1513    x || (x = n(L));
1514    const k = x.now();
1515    l && l(), M !== null ? E = k - M : (!E || j === "finished") && (E = k), j === "finished" && v(), H = E, M = null, j = "running", x.start();
1516  };
1517  t && N();
1518  const Ht = {
1519    then(k, nt) {
1520      return y.then(k, nt);
1521    },
1522    get time() {
1523      return tt(S);
1524    },
1525    set time(k) {
1526      k = yt(k), S = k, M !== null || !x || p === 0 ? M = k : E = x.now() - k / p;
1527    },
1528    get duration() {
1529      const k = b.calculatedDuration === null ? Un(b) : b.calculatedDuration;
1530      return tt(k);
1531    },
1532    get speed() {
1533      return p;
1534    },
1535    set speed(k) {
1536      k === p || !x || (p = k, Ht.time = tt(S));
1537    },
1538    get state() {
1539      return j;
1540    },
1541    play: N,
1542    pause: () => {
1543      j = "paused", M = S;
1544    },
1545    stop: () => {
1546      d = !0, j !== "idle" && (j = "idle", u && u(), F());
1547    },
1548    cancel: () => {
1549      H !== null && L(H), F();
1550    },
1551    complete: () => {
1552      j = "finished";
1553    },
1554    sample: (k) => (E = 0, L(k))
1555  };
1556  return Ht;
1557}
1558function ua(t) {
1559  let e;
1560  return () => (e === void 0 && (e = t()), e);
1561}
1562const ca = ua(() => Object.hasOwnProperty.call(Element.prototype, "animate")), fa = /* @__PURE__ */ new Set([
1563  "opacity",
1564  "clipPath",
1565  "filter",
1566  "transform",
1567  "backgroundColor"
1568]), Qt = 10, ha = 2e4, da = (t, e) => e.type === "spring" || t === "backgroundColor" || !or(e.ease);
1569function pa(t, e, { onUpdate: n, onComplete: s, ...r }) {
1570  if (!(ca() && fa.has(e) && !r.repeatDelay && r.repeatType !== "mirror" && r.damping !== 0 && r.type !== "inertia"))
1571    return !1;
1572  let i = !1, a, l, u = !1;
1573  const c = () => {
1574    l = new Promise((g) => {
1575      a = g;
1576    });
1577  };
1578  c();
1579  let { keyframes: f, duration: h = 300, ease: p, times: d } = r;
1580  if (da(e, r)) {
1581    const g = ue({
1582      ...r,
1583      repeat: 0,
1584      delay: 0
1585    });
1586    let V = { done: !1, value: f[0] };
1587    const b = [];
1588    let R = 0;
1589    for (; !V.done && R < ha; )
1590      V = g.sample(R), b.push(V.value), R += Qt;
1591    d = void 0, f = b, h = R - Qt, p = "linear";
1592  }
1593  const m = Co(t.owner.current, e, f, {
1594    ...r,
1595    duration: h,
1596    /**
1597     * This function is currently not called if ease is provided
1598     * as a function so the cast is safe.
1599     *
1600     * However it would be possible for a future refinement to port
1601     * in easing pregeneration from Motion One for browsers that
1602     * support the upcoming `linear()` easing function.
1603     */
1604    ease: p,
1605    times: d
1606  }), y = () => {
1607    u = !1, m.cancel();
1608  }, v = () => {
1609    u = !0, B.update(y), a(), c();
1610  };
1611  return m.onfinish = () => {
1612    u || (t.set(To(f, r)), s && s(), v());
1613  }, {
1614    then(g, V) {
1615      return l.then(g, V);
1616    },
1617    attachTimeline(g) {
1618      return m.timeline = g, m.onfinish = null, U;
1619    },
1620    get time() {
1621      return tt(m.currentTime || 0);
1622    },
1623    set time(g) {
1624      m.currentTime = yt(g);
1625    },
1626    get speed() {
1627      return m.playbackRate;
1628    },
1629    set speed(g) {
1630      m.playbackRate = g;
1631    },
1632    get duration() {
1633      return tt(h);
1634    },
1635    play: () => {
1636      i || (m.play(), et(y));
1637    },
1638    pause: () => m.pause(),
1639    stop: () => {
1640      if (i = !0, m.playState === "idle")
1641        return;
1642      const { currentTime: g } = m;
1643      if (g) {
1644        const V = ue({
1645          ...r,
1646          autoplay: !1
1647        });
1648        t.setWithVelocity(V.sample(g - Qt).value, V.sample(g).value, Qt);
1649      }
1650      v();
1651    },
1652    complete: () => {
1653      u || m.finish();
1654    },
1655    cancel: v
1656  };
1657}
1658function ma({ keyframes: t, delay: e, onUpdate: n, onComplete: s }) {
1659  const r = () => (n && n(t[t.length - 1]), s && s(), {
1660    time: 0,
1661    speed: 1,
1662    duration: 0,
1663    play: U,
1664    pause: U,
1665    stop: U,
1666    then: (o) => (o(), Promise.resolve()),
1667    cancel: U,
1668    complete: U
1669  });
1670  return e ? ue({
1671    keyframes: [0, 1],
1672    duration: 0,
1673    delay: e,
1674    onComplete: r
1675  }) : r();
1676}
1677const ga = {
1678  type: "spring",
1679  stiffness: 500,
1680  damping: 25,
1681  restSpeed: 10
1682}, ya = (t) => ({
1683  type: "spring",
1684  stiffness: 550,
1685  damping: t === 0 ? 2 * Math.sqrt(550) : 30,
1686  restSpeed: 10
1687}), va = {
1688  type: "keyframes",
1689  duration: 0.8
1690}, xa = {
1691  type: "keyframes",
1692  ease: [0.25, 0.1, 0.35, 1],
1693  duration: 0.3
1694}, ba = (t, { keyframes: e }) => e.length > 2 ? va : xt.has(t) ? t.startsWith("scale") ? ya(e[1]) : ga : xa, Ue = (t, e) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1695(at.test(e) || e === "0") && // And it contains numbers and/or colors
1696!e.startsWith("url(")), Pa = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1697function Ca(t) {
1698  const [e, n] = t.slice(0, -1).split("(");
1699  if (e === "drop-shadow")
1700    return t;
1701  const [s] = n.match(ye) || [];
1702  if (!s)
1703    return t;
1704  const r = n.replace(s, "");
1705  let o = Pa.has(e) ? 1 : 0;
1706  return s !== n && (o *= 100), e + "(" + o + r + ")";
1707}
1708const Ta = /([a-z-]*)\(.*?\)/g, Ne = {
1709  ...at,
1710  getAnimatableNone: (t) => {
1711    const e = t.match(Ta);
1712    return e ? e.map(Ca).join(" ") : t;
1713  }
1714}, wa = {
1715  ...Hs,
1716  // Color props
1717  color: G,
1718  backgroundColor: G,
1719  outlineColor: G,
1720  fill: G,
1721  stroke: G,
1722  // Border props
1723  borderColor: G,
1724  borderTopColor: G,
1725  borderRightColor: G,
1726  borderBottomColor: G,
1727  borderLeftColor: G,
1728  filter: Ne,
1729  WebkitFilter: Ne
1730}, mn = (t) => wa[t];
1731function Rr(t, e) {
1732  let n = mn(t);
1733  return n !== Ne && (n = at), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
1734}
1735const Or = (t) => /^0[^.\s]+$/.test(t);
1736function Sa(t) {
1737  if (typeof t == "number")
1738    return t === 0;
1739  if (t !== null)
1740    return t === "none" || t === "0" || Or(t);
1741}
1742function Va(t, e, n, s) {
1743  const r = Ue(e, n);
1744  let o;
1745  Array.isArray(n) ? o = [...n] : o = [null, n];
1746  const i = s.from !== void 0 ? s.from : t.get();
1747  let a;
1748  const l = [];
1749  for (let u = 0; u < o.length; u++)
1750    o[u] === null && (o[u] = u === 0 ? i : o[u - 1]), Sa(o[u]) && l.push(u), typeof o[u] == "string" && o[u] !== "none" && o[u] !== "0" && (a = o[u]);
1751  if (r && l.length && a)
1752    for (let u = 0; u < l.length; u++) {
1753      const c = l[u];
1754      o[c] = Rr(e, a);
1755    }
1756  return o;
1757}
1758function Aa({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: r, repeat: o, repeatType: i, repeatDelay: a, from: l, elapsed: u, ...c }) {
1759  return !!Object.keys(c).length;
1760}
1761function gn(t, e) {
1762  return t[e] || t.default || t;
1763}
1764const yn = (t, e, n, s = {}) => (r) => {
1765  const o = gn(s, t) || {}, i = o.delay || s.delay || 0;
1766  let { elapsed: a = 0 } = s;
1767  a = a - yt(i);
1768  const l = Va(e, t, n, o), u = l[0], c = l[l.length - 1], f = Ue(t, u), h = Ue(t, c);
1769  let p = {
1770    keyframes: l,
1771    velocity: e.getVelocity(),
1772    ease: "easeOut",
1773    ...o,
1774    delay: -a,
1775    onUpdate: (d) => {
1776      e.set(d), o.onUpdate && o.onUpdate(d);
1777    },
1778    onComplete: () => {
1779      r(), o.onComplete && o.onComplete();
1780    }
1781  };
1782  if (Aa(o) || (p = {
1783    ...p,
1784    ...ba(t, p)
1785  }), p.duration && (p.duration = yt(p.duration)), p.repeatDelay && (p.repeatDelay = yt(p.repeatDelay)), !f || !h || Po.current || o.type === !1 || ks.skipAnimations)
1786    return ma(p);
1787  if (
1788    /**
1789     * If this is a handoff animation, the optimised animation will be running via
1790     * WAAPI. Therefore, this animation must be JS to ensure it runs "under" the
1791     * optimised animation.
1792     */
1793    !s.isHandoff && e.owner && e.owner.current instanceof HTMLElement && /**
1794     * If we're outputting values to onUpdate then we can't use WAAPI as there's
1795     * no way to read the value from WAAPI every frame.
1796     */
vendor: 7,351 bytes, lines 1797-2056
1797    !e.owner.getProps().onUpdate
1798  ) {
1799    const d = pa(e, t, p);
1800    if (d)
1801      return d;
1802  }
1803  return ue(p);
1804};
1805function ce(t) {
1806  return !!($(t) && t.add);
1807}
1808const Er = (t) => /^\-?\d*\.?\d+$/.test(t);
1809function vn(t, e) {
1810  t.indexOf(e) === -1 && t.push(e);
1811}
1812function xn(t, e) {
1813  const n = t.indexOf(e);
1814  n > -1 && t.splice(n, 1);
1815}
1816class bn {
1817  constructor() {
1818    this.subscriptions = [];
1819  }
1820  add(e) {
1821    return vn(this.subscriptions, e), () => xn(this.subscriptions, e);
1822  }
1823  notify(e, n, s) {
1824    const r = this.subscriptions.length;
1825    if (r)
1826      if (r === 1)
1827        this.subscriptions[0](e, n, s);
1828      else
1829        for (let o = 0; o < r; o++) {
1830          const i = this.subscriptions[o];
1831          i && i(e, n, s);
1832        }
1833  }
1834  getSize() {
1835    return this.subscriptions.length;
1836  }
1837  clear() {
1838    this.subscriptions.length = 0;
1839  }
1840}
1841const Nn = 30, Da = (t) => !isNaN(parseFloat(t));
1842class Ma {
1843  /**
1844   * @param init - The initiating value
1845   * @param config - Optional configuration options
1846   *
1847   * -  `transformer`: A function to transform incoming values with.
1848   *
1849   * @internal
1850   */
1851  constructor(e, n = {}) {
1852    this.version = "11.0.3", this.canTrackVelocity = !1, this.events = {}, this.updateAndNotify = (s, r = !0) => {
1853      const o = vt.now();
1854      this.updatedAt !== o && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), r && this.events.renderRequest && this.events.renderRequest.notify(this.current);
1855    }, this.hasAnimated = !1, this.setCurrent(e), this.canTrackVelocity = Da(this.current), this.owner = n.owner;
1856  }
1857  setCurrent(e) {
1858    this.current = e, this.updatedAt = vt.now();
1859  }
1860  setPrevFrameValue(e = this.current) {
1861    this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
1862  }
1863  /**
1864   * Adds a function that will be notified when the `MotionValue` is updated.
1865   *
1866   * It returns a function that, when called, will cancel the subscription.
1867   *
1868   * When calling `onChange` inside a React component, it should be wrapped with the
1869   * `useEffect` hook. As it returns an unsubscribe function, this should be returned
1870   * from the `useEffect` function to ensure you don't add duplicate subscribers..
1871   *
1872   * ```jsx
1873   * export const MyComponent = () => {
1874   *   const x = useMotionValue(0)
1875   *   const y = useMotionValue(0)
1876   *   const opacity = useMotionValue(1)
1877   *
1878   *   useEffect(() => {
1879   *     function updateOpacity() {
1880   *       const maxXY = Math.max(x.get(), y.get())
1881   *       const newOpacity = transform(maxXY, [0, 100], [1, 0])
1882   *       opacity.set(newOpacity)
1883   *     }
1884   *
1885   *     const unsubscribeX = x.on("change", updateOpacity)
1886   *     const unsubscribeY = y.on("change", updateOpacity)
1887   *
1888   *     return () => {
1889   *       unsubscribeX()
1890   *       unsubscribeY()
1891   *     }
1892   *   }, [])
1893   *
1894   *   return <motion.div style={{ x }} />
1895   * }
1896   * ```
1897   *
1898   * @param subscriber - A function that receives the latest value.
1899   * @returns A function that, when called, will cancel this subscription.
1900   *
1901   * @deprecated
1902   */
1903  onChange(e) {
1904    return this.on("change", e);
1905  }
1906  on(e, n) {
1907    this.events[e] || (this.events[e] = new bn());
1908    const s = this.events[e].add(n);
1909    return e === "change" ? () => {
1910      s(), B.read(() => {
1911        this.events.change.getSize() || this.stop();
1912      });
1913    } : s;
1914  }
1915  clearListeners() {
1916    for (const e in this.events)
1917      this.events[e].clear();
1918  }
1919  /**
1920   * Attaches a passive effect to the `MotionValue`.
1921   *
1922   * @internal
1923   */
1924  attach(e, n) {
1925    this.passiveEffect = e, this.stopPassiveEffect = n;
1926  }
1927  /**
1928   * Sets the state of the `MotionValue`.
1929   *
1930   * @remarks
1931   *
1932   * ```jsx
1933   * const x = useMotionValue(0)
1934   * x.set(10)
1935   * ```
1936   *
1937   * @param latest - Latest value to set.
1938   * @param render - Whether to notify render subscribers. Defaults to `true`
1939   *
1940   * @public
1941   */
1942  set(e, n = !0) {
1943    !n || !this.passiveEffect ? this.updateAndNotify(e, n) : this.passiveEffect(e, this.updateAndNotify);
1944  }
1945  setWithVelocity(e, n, s) {
1946    this.set(n), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - s;
1947  }
1948  /**
1949   * Set the state of the `MotionValue`, stopping any active animations,
1950   * effects, and resets velocity to `0`.
1951   */
1952  jump(e) {
1953    this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1954  }
1955  /**
1956   * Returns the latest state of `MotionValue`
1957   *
1958   * @returns - The latest state of `MotionValue`
1959   *
1960   * @public
1961   */
1962  get() {
1963    return this.current;
1964  }
1965  /**
1966   * @public
1967   */
1968  getPrevious() {
1969    return this.prev;
1970  }
1971  /**
1972   * Returns the latest velocity of `MotionValue`
1973   *
1974   * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
1975   *
1976   * @public
1977   */
1978  getVelocity() {
1979    const e = vt.now();
1980    if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Nn)
1981      return 0;
1982    const n = Math.min(this.updatedAt - this.prevUpdatedAt, Nn);
1983    return Ar(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1984  }
1985  /**
1986   * Registers a new animation to control this `MotionValue`. Only one
1987   * animation can drive a `MotionValue` at one time.
1988   *
1989   * ```jsx
1990   * value.start()
1991   * ```
1992   *
1993   * @param animation - A function that starts the provided animation
1994   *
1995   * @internal
1996   */
1997  start(e) {
1998    return this.stop(), new Promise((n) => {
1999      this.hasAnimated = !0, this.animation = e(n), this.events.animationStart && this.events.animationStart.notify();
2000    }).then(() => {
2001      this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
2002    });
2003  }
2004  /**
2005   * Stop the currently active animation.
2006   *
2007   * @public
2008   */
2009  stop() {
2010    this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
2011  }
2012  /**
2013   * Returns `true` if this value is currently animating.
2014   *
2015   * @public
2016   */
2017  isAnimating() {
2018    return !!this.animation;
2019  }
2020  clearAnimation() {
2021    delete this.animation;
2022  }
2023  /**
2024   * Destroy and clean up subscribers to this `MotionValue`.
2025   *
2026   * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
2027   * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
2028   * created a `MotionValue` via the `motionValue` function.
2029   *
2030   * @public
2031   */
2032  destroy() {
2033    this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
2034  }
2035}
2036function St(t, e) {
2037  return new Ma(t, e);
2038}
2039const jr = (t) => (e) => e.test(t), Ra = {
2040  test: (t) => t === "auto",
2041  parse: (t) => t
2042}, Lr = [bt, D, Z, st, _i, Ii, Ra], Mt = (t) => Lr.find(jr(t)), Oa = [...Lr, G, at], Ea = (t) => Oa.find(jr(t));
2043function ja(t, e, n) {
2044  t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, St(n));
2045}
2046function La(t, e) {
2047  const n = xe(t, e);
2048  let { transitionEnd: s = {}, transition: r = {}, ...o } = n ? t.makeTargetAnimatable(n, !1) : {};
2049  o = { ...o, ...s };
2050  for (const i in o) {
2051    const a = Ji(o[i]);
2052    ja(t, i, a);
2053  }
2054}
2055function ka(t, e, n) {
2056  var s, r;
2057  const o = Object.keys(e).filter((a) => !t.hasValue(a)), i = o.length;
2058  if (i)
2059    for (let a = 0; a < i; a++) {
2060      const l = o[a], u = e[l];
2061      let c = null;
2062      Array.isArray(u) && (c = u[0]), c === null && (c = (r = (s = n[l]) !== null && s !== void 0 ? s : t.readValue(l)) !== null && r !== void 0 ? r : e[l]), c != null && (typeof c == "string" && (Er(c) || Or(c)) ? c = parseFloat(c) : !Ea(c) && at.test(u) && (c = Rr(l, u)), t.addValue(l, St(c, { owner: t })), n[l] === void 0 && (n[l] = c), c !== null && t.setBaseTarget(l, c));
2063    }
2064}
2065function Ba(t, e) {
2066  return e ? (e[t] || e.default || e).from : void 0;
2067}
2068function Fa(t, e, n) {
2069  const s = {};
2070  for (const r in t) {
2071    const o = Ba(r, e);
2072    if (o !== void 0)
2073      s[r] = o;
2074    else {
2075      const i = n.getValue(r);
2076      i && (s[r] = i.get());
2077    }
2078  }
2079  return s;
2080}
2081function Ia({ protectedKeys: t, needsAnimating: e }, n) {
2082  const s = t.hasOwnProperty(n) && e[n] !== !0;
2083  return e[n] = !1, s;
2084}
2085function _a(t, e) {
2086  const n = t.get();
2087  if (Array.isArray(e)) {
2088    for (let s = 0; s < e.length; s++)
2089      if (e[s] !== n)
2090        return !0;
2091  } else
2092    return n !== e;
2093}
2094function kr(t, e, { delay: n = 0, transitionOverride: s, type: r } = {}) {
2095  let { transition: o = t.getDefaultTransition(), transitionEnd: i, ...a } = t.makeTargetAnimatable(e);
2096  const l = t.getValue("willChange");
2097  s && (o = s);
2098  const u = [], c = r && t.animationState && t.animationState.getState()[r];
2099  for (const f in a) {
2100    const h = t.getValue(f), p = a[f];
2101    if (!h || p === void 0 || c && Ia(c, f))
2102      continue;
2103    const d = {
2104      delay: n,
2105      elapsed: 0,
2106      ...gn(o || {}, f)
2107    };
2108    if (window.HandoffAppearAnimations) {
2109      const v = t.getProps()[Ls];
2110      if (v) {
2111        const x = window.HandoffAppearAnimations(v, f, h, B);
2112        x !== null && (d.elapsed = x, d.isHandoff = !0);
2113      }
2114    }
2115    let m = !d.isHandoff && !_a(h, p);
2116    if (d.type === "spring" && (h.getVelocity() || d.velocity) && (m = !1), h.animation && (m = !1), m)
2117      continue;
2118    h.start(yn(f, h, p, t.shouldReduceMotion && xt.has(f) ? { type: !1 } : d));
2119    const y = h.animation;
2120    ce(l) && (l.add(f), y.then(() => l.remove(f))), u.push(y);
2121  }
2122  return i && Promise.all(u).then(() => {
2123    i && La(t, i);
2124  }), u;
2125}
2126function We(t, e, n = {}) {
2127  const s = xe(t, e, n.custom);
2128  let { transition: r = t.getDefaultTransition() || {} } = s || {};
2129  n.transitionOverride && (r = n.transitionOverride);
2130  const o = s ? () => Promise.all(kr(t, s, n)) : () => Promise.resolve(), i = t.variantChildren && t.variantChildren.size ? (l = 0) => {
2131    const { delayChildren: u = 0, staggerChildren: c, staggerDirection: f } = r;
2132    return Ua(t, e, u + l, c, f, n);
2133  } : () => Promise.resolve(), { when: a } = r;
2134  if (a) {
2135    const [l, u] = a === "beforeChildren" ? [o, i] : [i, o];
2136    return l().then(() => u());
2137  } else
2138    return Promise.all([o(), i(n.delay)]);
2139}
2140function Ua(t, e, n = 0, s = 0, r = 1, o) {
2141  const i = [], a = (t.variantChildren.size - 1) * s, l = r === 1 ? (u = 0) => u * s : (u = 0) => a - u * s;
2142  return Array.from(t.variantChildren).sort(Na).forEach((u, c) => {
2143    u.notify("AnimationStart", e), i.push(We(u, e, {
2144      ...o,
2145      delay: n + l(c)
2146    }).then(() => u.notify("AnimationComplete", e)));
2147  }), Promise.all(i);
2148}
2149function Na(t, e) {
2150  return t.sortNodePosition(e);
2151}
2152function Wa(t, e, n = {}) {
2153  t.notify("AnimationStart", e);
2154  let s;
2155  if (Array.isArray(e)) {
2156    const r = e.map((o) => We(t, o, n));
2157    s = Promise.all(r);
2158  } else if (typeof e == "string")
2159    s = We(t, e, n);
2160  else {
2161    const r = typeof e == "function" ? xe(t, e, n.custom) : e;
2162    s = Promise.all(kr(t, r, n));
2163  }
2164  return s.then(() => t.notify("AnimationComplete", e));
2165}
2166const Ha = [...tn].reverse(), za = tn.length;
2167function Ga(t) {
2168  return (e) => Promise.all(e.map(({ animation: n, options: s }) => Wa(t, n, s)));
2169}
2170function $a(t) {
2171  let e = Ga(t);
2172  const n = qa();
2173  let s = !0;
2174  const r = (l, u) => {
2175    const c = xe(t, u);
2176    if (c) {
2177      const { transition: f, transitionEnd: h, ...p } = c;
2178      l = { ...l, ...p, ...h };
2179    }
2180    return l;
2181  };
2182  function o(l) {
2183    e = l(t);
2184  }
2185  function i(l, u) {
2186    const c = t.getProps(), f = t.getVariantContext(!0) || {}
2186, h = [], p = /* @__PURE__ */ new Set();
2187    let d = {}, m = 1 / 0;
2188    for (let v = 0; v < za; v++) {
2189      const x = Ha[v], g = n[x], V = c[x] !== void 0 ? c[x] : f[x], b = Bt(V), R = x === u ? g.isActive : null;
2190      R === !1 && (m = v);
2191      let j = V === f[x] && V !== c[x] && b;
2192      if (j && s && t.manuallyAnimateOnMount && (j = !1), g.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
2193      !g.isActive && R === null || // If we didn't and don't have any defined prop for this animation type
2194      !V && !g.prevProp || // Or if the prop doesn't define an animation
2195      me(V) || typeof V == "boolean")
2196        continue;
2197      let E = Ka(g.prevProp, V) || // If we're making this variant active, we want to always make it active
2198      x === u && g.isActive && !j && b || // If we removed a higher-priority variant (i is in reverse order)
2199      v > m && b, H = !1;
2200      const P = Array.isArray(V) ? V : [V];
2201      let T = P.reduce(r, {});
2202      R === !1 && (T = {});
2203      const { prevResolvedValues: A = {} } = g, S = {
2204        ...A,
2205        ...T
2206      }, L = (O) => {
2207        E = !0, p.has(O) && (H = !0, p.delete(O)), g.needsAnimating[O] = !0;
2208      };
2209      for (const O in S) {
2210        const F = T[O], X = A[O];
2211        if (d.hasOwnProperty(O))
2212          continue;
2213        let N = !1;
2214        oe(F) && oe(X) ? N = !rr(F, X) : N = F !== X, N ? F !== void 0 ? L(O) : p.add(O) : F !== void 0 && p.has(O) ? L(O) : g.protectedKeys[O] = !0;
2215      }
2216      g.prevProp = V, g.prevResolvedValues = T, g.isActive && (d = { ...d, ...T }), s && t.blockInitialAnimation && (E = !1), E && (!j || H) && h.push(...P.map((O) => ({
2217        animation: O,
2218        options: { type: x, ...l }
2219      })));
2220    }
2221    if (p.size) {
2222      const v = {};
2223      p.forEach((x) => {
2224        const g = t.getBaseTarget(x);
2225        g !== void 0 && (v[x] = g);
2226      }), h.push({ animation: v });
2227    }
2228    let y = !!h.length;
2229    return s && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (y = !1), s = !1, y ? e(h) : Promise.resolve();
2230  }
2231  function a(l, u, c) {
2232    var f;
2233    if (n[l].isActive === u)
2234      return Promise.resolve();
2235    (f = t.variantChildren) === null || f === void 0 || f.forEach((p) => {
2236      var d;
2237      return (d = p.animationState) === null || d === void 0 ? void 0 : d.setActive(l, u);
2238    }), n[l].isActive = u;
2239    const h = i(c, l);
2240    for (const p in n)
2241      n[p].protectedKeys = {};
2242    return h;
2243  }
2244  return {
2245    animateChanges: i,
2246    setActive: a,
2247    setAnimateFunction: o,
2248    getState: () => n
2249  };
2250}
2251function Ka(t, e) {
2252  return typeof e == "string" ? e !== t : Array.isArray(e) ? !rr(e, t) : !1;
2253}
2254function ht(t = !1) {
2255  return {
2256    isActive: t,
2257    protectedKeys: {},
2258    needsAnimating: {},
2259    prevResolvedValues: {}
2260  };
2261}
2262function qa() {
2263  return {
2264    animate: ht(!0),
2265    whileInView: ht(),
2266    whileHover: ht(),
2267    whileTap: ht(),
2268    whileDrag: ht(),
2269    whileFocus: ht(),
2270    exit: ht()
2271  };
2272}
2273class Ya extends lt {
2274  /**
2275   * We dynamically generate the AnimationState manager as it contains a reference
2276   * to the underlying animation library. We only want to load that if we load this,
2277   * so people can optionally code split it out using the `m` component.
2278   */
2279  constructor(e) {
2280    super(e), e.animationState || (e.animationState = $a(e));
2281  }
2282  updateAnimationControlsSubscription() {
2283    const { animate: e } = this.node.getProps();
2284    this.unmount(), me(e) && (this.unmount = e.subscribe(this.node));
2285  }
2286  /**
2287   * Subscribe any provided AnimationControls to the component's VisualElement
2288   */
2289  mount() {
2290    this.updateAnimationControlsSubscription();
2291  }
2292  update() {
2293    const { animate: e } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
2294    e !== n && this.updateAnimationControlsSubscription();
2295  }
2296  unmount() {
2297  }
2298}
2299let Xa = 0;
2300class Za extends lt {
2301  constructor() {
2302    super(...arguments), this.id = Xa++;
2303  }
2304  update() {
2305    if (!this.node.presenceContext)
2306      return;
2307    const { isPresent: e, onExitComplete: n, custom: s } = this.node.presenceContext, { isPresent: r }
vendor: 26,137 bytes, lines 2307-3057
2307 = this.node.prevPresenceContext || {};
2308    if (!this.node.animationState || e === r)
2309      return;
2310    const o = this.node.animationState.setActive("exit", !e, { custom: s ?? this.node.getProps().custom });
2311    n && !e && o.then(() => n(this.id));
2312  }
2313  mount() {
2314    const { register: e } = this.node.presenceContext || {};
2315    e && (this.unmount = e(this.id));
2316  }
2317  unmount() {
2318  }
2319}
2320const Qa = {
2321  animation: {
2322    Feature: Ya
2323  },
2324  exit: {
2325    Feature: Za
2326  }
2327}, Wn = (t, e) => Math.abs(t - e);
2328function Ja(t, e) {
2329  const n = Wn(t.x, e.x), s = Wn(t.y, e.y);
2330  return Math.sqrt(n ** 2 + s ** 2);
2331}
2332class Br {
2333  constructor(e, n, { transformPagePoint: s, contextWindow: r, dragSnapToOrigin: o = !1 } = {}) {
2334    if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
2335      if (!(this.lastMoveEvent && this.lastMoveEventInfo))
2336        return;
2337      const f = Re(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, p = Ja(f.offset, { x: 0, y: 0 }) >= 3;
2338      if (!h && !p)
2339        return;
2340      const { point: d } = f, { timestamp: m } = W;
2341      this.history.push({ ...d, timestamp: m });
2342      const { onStart: y, onMove: v } = this.handlers;
2343      h || (y && y(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), v && v(this.lastMoveEvent, f);
2344    }, this.handlePointerMove = (f, h) => {
2345      this.lastMoveEvent = f, this.lastMoveEventInfo = Me(h, this.transformPagePoint), B.update(this.updatePoint, !0);
2346    }, this.handlePointerUp = (f, h) => {
2347      this.end();
2348      const { onEnd: p, onSessionEnd: d, resumeAnimation: m } = this.handlers;
2349      if (this.dragSnapToOrigin && m && m(), !(this.lastMoveEvent && this.lastMoveEventInfo))
2350        return;
2351      const y = Re(f.type === "pointercancel" ? this.lastMoveEventInfo : Me(h, this.transformPagePoint), this.history);
2352      this.startEvent && p && p(f, y), d && d(f, y);
2353    }, !Js(e))
2354      return;
2355    this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = s, this.contextWindow = r || window;
2356    const i = ve(e), a = Me(i, this.transformPagePoint), { point: l } = a, { timestamp: u } = W;
2357    this.history = [{ ...l, timestamp: u }];
2358    const { onSessionStart: c } = n;
2359    c && c(e, Re(a, this.history)), this.removeListeners = it(J(this.contextWindow, "pointermove", this.handlePointerMove), J(this.contextWindow, "pointerup", this.handlePointerUp), J(this.contextWindow, "pointercancel", this.handlePointerUp));
2360  }
2361  updateHandlers(e) {
2362    this.handlers = e;
2363  }
2364  end() {
2365    this.removeListeners && this.removeListeners(), et(this.updatePoint);
2366  }
2367}
2368function Me(t, e) {
2369  return e ? { point: e(t.point) } : t;
2370}
2371function Hn(t, e) {
2372  return { x: t.x - e.x, y: t.y - e.y };
2373}
2374function Re({ point: t }, e) {
2375  return {
2376    point: t,
2377    delta: Hn(t, Fr(e)),
2378    offset: Hn(t, tl(e)),
2379    velocity: el(e, 0.1)
2380  };
2381}
2382function tl(t) {
2383  return t[0];
2384}
2385function Fr(t) {
2386  return t[t.length - 1];
2387}
2388function el(t, e) {
2389  if (t.length < 2)
2390    return { x: 0, y: 0 };
2391  let n = t.length - 1, s = null;
2392  const r = Fr(t);
2393  for (; n >= 0 && (s = t[n], !(r.timestamp - s.timestamp > yt(e))); )
2394    n--;
2395  if (!s)
2396    return { x: 0, y: 0 };
2397  const o = tt(r.timestamp - s.timestamp);
2398  if (o === 0)
2399    return { x: 0, y: 0 };
2400  const i = {
2401    x: (r.x - s.x) / o,
2402    y: (r.y - s.y) / o
2403  };
2404  return i.x === 1 / 0 && (i.x = 0), i.y === 1 / 0 && (i.y = 0), i;
2405}
2406function K(t) {
2407  return t.max - t.min;
2408}
2409function He(t, e = 0, n = 0.01) {
2410  return Math.abs(t - e) <= n;
2411}
2412function zn(t, e, n, s = 0.5) {
2413  t.origin = s, t.originPoint = I(e.min, e.max, t.origin), t.scale = K(n) / K(e), (He(t.scale, 1, 1e-4) || isNaN(t.scale)) && (t.scale = 1), t.translate = I(n.min, n.max, t.origin) - t.originPoint, (He(t.translate) || isNaN(t.translate)) && (t.translate = 0);
2414}
2415function Lt(t, e, n, s) {
2416  zn(t.x, e.x, n.x, s ? s.originX : void 0), zn(t.y, e.y, n.y, s ? s.originY : void 0);
2417}
2418function Gn(t, e, n) {
2419  t.min = n.min + e.min, t.max = t.min + K(e);
2420}
2421function nl(t, e, n) {
2422  Gn(t.x, e.x, n.x), Gn(t.y, e.y, n.y);
2423}
2424function $n(t, e, n) {
2425  t.min = e.min - n.min, t.max = t.min + K(e);
2426}
2427function kt(t, e, n) {
2428  $n(t.x, e.x, n.x), $n(t.y, e.y, n.y);
2429}
2430function sl(t, { min: e, max: n }, s) {
2431  return e !== void 0 && t < e ? t = s ? I(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? I(n, t, s.max) : Math.min(t, n)), t;
2432}
2433function Kn(t, e, n) {
2434  return {
2435    min: e !== void 0 ? t.min + e : void 0,
2436    max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
2437  };
2438}
2439function rl(t, { top: e, left: n, bottom: s, right: r }) {
2440  return {
2441    x: Kn(t.x, n, r),
2442    y: Kn(t.y, e, s)
2443  };
2444}
2445function qn(t, e) {
2446  let n = e.min - t.min, s = e.max - t.max;
2447  return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
2448}
2449function il(t, e) {
2450  return {
2451    x: qn(t.x, e.x),
2452    y: qn(t.y, e.y)
2453  };
2454}
2455function ol(t, e) {
2456  let n = 0.5;
2457  const s = K(t), r = K(e);
2458  return r > s ? n = It(e.min, e.max - s, t.min) : s > r && (n = It(t.min, t.max - r, e.min)), ot(0, 1, n);
2459}
2460function al(t, e) {
2461  const n = {};
2462  return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
2463}
2464const ze = 0.35;
2465function ll(t = ze) {
2466  return t === !1 ? t = 0 : t === !0 && (t = ze), {
2467    x: Yn(t, "left", "right"),
2468    y: Yn(t, "top", "bottom")
2469  };
2470}
2471function Yn(t, e, n) {
2472  return {
2473    min: Xn(t, e),
2474    max: Xn(t, n)
2475  };
2476}
2477function Xn(t, e) {
2478  return typeof t == "number" ? t : t[e] || 0;
2479}
2480const Zn = () => ({
2481  translate: 0,
2482  scale: 1,
2483  origin: 0,
2484  originPoint: 0
2485}), Tt = () => ({
2486  x: Zn(),
2487  y: Zn()
2488}), Qn = () => ({ min: 0, max: 0 }), _ = () => ({
2489  x: Qn(),
2490  y: Qn()
2491});
2492function Y(t) {
2493  return [t("x"), t("y")];
2494}
2495function Ir({ top: t, left: e, right: n, bottom: s }) {
2496  return {
2497    x: { min: e, max: n },
2498    y: { min: t, max: s }
2499  };
2500}
2501function ul({ x: t, y: e }) {
2502  return { top: e.min, right: t.max, bottom: e.max, left: t.min };
2503}
2504function cl(t, e) {
2505  if (!e)
2506    return t;
2507  const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
2508  return {
2509    top: n.y,
2510    left: n.x,
2511    bottom: s.y,
2512    right: s.x
2513  };
2514}
2515function Oe(t) {
2516  return t === void 0 || t === 1;
2517}
2518function Ge({ scale: t, scaleX: e, scaleY: n }) {
2519  return !Oe(t) || !Oe(e) || !Oe(n);
2520}
2521function dt(t) {
2522  return Ge(t) || _r(t) || t.z || t.rotate || t.rotateX || t.rotateY;
2523}
2524function _r(t) {
2525  return Jn(t.x) || Jn(t.y);
2526}
2527function Jn(t) {
2528  return t && t !== "0%";
2529}
2530function fe(t, e, n) {
2531  const s = t - n, r = e * s;
2532  return n + r;
2533}
2534function ts(t, e, n, s, r) {
2535  return r !== void 0 && (t = fe(t, r, s)), fe(t, n, s) + e;
2536}
2537function $e(t, e = 0, n = 1, s, r) {
2538  t.min = ts(t.min, e, n, s, r), t.max = ts(t.max, e, n, s, r);
2539}
2540function Ur(t, { x: e, y: n }) {
2541  $e(t.x, e.translate, e.scale, e.originPoint), $e(t.y, n.translate, n.scale, n.originPoint);
2542}
2543function fl(t, e, n, s = !1) {
2544  const r = n.length;
2545  if (!r)
2546    return;
2547  e.x = e.y = 1;
2548  let o, i;
2549  for (let a = 0; a < r; a++) {
2550    o = n[a], i = o.projectionDelta;
2551    const l = o.instance;
2552    l && l.style && l.style.display === "contents" || (s && o.options.layoutScroll && o.scroll && o !== o.root && wt(t, {
2553      x: -o.scroll.offset.x,
2554      y: -o.scroll.offset.y
2555    }), i && (e.x *= i.x.scale, e.y *= i.y.scale, Ur(t, i)), s && dt(o.latestValues) && wt(t, o.latestValues));
2556  }
2557  e.x = es(e.x), e.y = es(e.y);
2558}
2559function es(t) {
2560  return Number.isInteger(t) || t > 1.0000000000001 || t < 0.999999999999 ? t : 1;
2561}
2562function rt(t, e) {
2563  t.min = t.min + e, t.max = t.max + e;
2564}
2565function ns(t, e, [n, s, r]) {
2566  const o = e[r] !== void 0 ? e[r] : 0.5, i = I(t.min, t.max, o);
2567  $e(t, e[n], e[s], i, e.scale);
2568}
2569const hl = ["x", "scaleX", "originX"], dl = ["y", "scaleY", "originY"];
2570function wt(t, e) {
2571  ns(t.x, e, hl), ns(t.y, e, dl);
2572}
2573function Nr(t, e) {
2574  return Ir(cl(t.getBoundingClientRect(), e));
2575}
2576function pl(t, e, n) {
2577  const s = Nr(t, n), { scroll: r } = e;
2578  return r && (rt(s.x, r.offset.x), rt(s.y, r.offset.y)), s;
2579}
2580const Wr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, ml = /* @__PURE__ */ new WeakMap();
2581class gl {
2582  constructor(e) {
2583    this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = _(), this.visualElement = e;
2584  }
2585  start(e, { snapToCursor: n = !1 } = {}) {
2586    const { presenceContext: s } = this.visualElement;
2587    if (s && s.isPresent === !1)
2588      return;
2589    const r = (c) => {
2590      const { dragSnapToOrigin: f } = this.getProps();
2591      f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(ve(c, "page").point);
2592    }, o = (c, f) => {
2593      const { drag: h, dragPropagation: p, onDragStart: d } = this.getProps();
2594      if (h && !p && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = er(h), !this.openGlobalLock))
2595        return;
2596      this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), Y((y) => {
2597        let v = this.getAxisMotionValue(y).get() || 0;
2598        if (Z.test(v)) {
2599          const { projection: x } = this.visualElement;
2600          if (x && x.layout) {
2601            const g = x.layout.layoutBox[y];
2602            g && (v = K(g) * (parseFloat(v) / 100));
2603          }
2604        }
2605        this.originPoint[y] = v;
2606      }), d && B.update(() => d(c, f), !1, !0);
2607      const { animationState: m } = this.visualElement;
2608      m && m.setActive("whileDrag", !0);
2609    }, i = (c, f) => {
2610      const { dragPropagation: h, dragDirectionLock: p, onDirectionLock: d, onDrag: m } = this.getProps();
2611      if (!h && !this.openGlobalLock)
2612        return;
2613      const { offset: y } = f;
2614      if (p && this.currentDirection === null) {
2615        this.currentDirection = yl(y), this.currentDirection !== null && d && d(this.currentDirection);
2616        return;
2617      }
2618      this.updateAxis("x", f.point, y), this.updateAxis("y", f.point, y), this.visualElement.render(), m && m(c, f);
2619    }, a = (c, f) => this.stop(c, f), l = () => Y((c) => {
2620      var f;
2621      return this.getAnimationState(c) === "paused" && ((f = this.getAxisMotionValue(c).animation) === null || f === void 0 ? void 0 : f.play());
2622    }), { dragSnapToOrigin: u } = this.getProps();
2623    this.panSession = new Br(e, {
2624      onSessionStart: r,
2625      onStart: o,
2626      onMove: i,
2627      onSessionEnd: a,
2628      resumeAnimation: l
2629    }, {
2630      transformPagePoint: this.visualElement.getTransformPagePoint(),
2631      dragSnapToOrigin: u,
2632      contextWindow: Wr(this.visualElement)
2633    });
2634  }
2635  stop(e, n) {
2636    const s = this.isDragging;
2637    if (this.cancel(), !s)
2638      return;
2639    const { velocity: r } = n;
2640    this.startAnimation(r);
2641    const { onDragEnd: o } = this.getProps();
2642    o && B.update(() => o(e, n));
2643  }
2644  cancel() {
2645    this.isDragging = !1;
2646    const { projection: e, animationState: n } = this.visualElement;
2647    e && (e.isAnimationBlocked = !1), this.panSession && this.panSession.end(), this.panSession = void 0;
2648    const { dragPropagation: s } = this.getProps();
2649    !s && this.openGlobalLock && (this.openGlobalLock(), this.openGlobalLock = null), n && n.setActive("whileDrag", !1);
2650  }
2651  updateAxis(e, n, s) {
2652    const { drag: r } = this.getProps();
2653    if (!s || !Jt(e, r, this.currentDirection))
2654      return;
2655    const o = this.getAxisMotionValue(e);
2656    let i = this.originPoint[e] + s[e];
2657    this.constraints && this.constraints[e] && (i = sl(i, this.constraints[e], this.elastic[e])), o.set(i);
2658  }
2659  resolveConstraints() {
2660    var e;
2661    const { dragConstraints: n, dragElastic: s } = this.getProps(), r = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout, o = this.constraints;
2662    n && Pt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && r ? this.constraints = rl(r.layoutBox, n) : this.constraints = !1, this.elastic = ll(s), o !== this.constraints && r && this.constraints && !this.hasMutatedConstraints && Y((i) => {
2663      this.getAxisMotionValue(i) && (this.constraints[i] = al(r.layoutBox[i], this.constraints[i]));
2664    });
2665  }
2666  resolveRefConstraints() {
2667    const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
2668    if (!e || !Pt(e))
2669      return !1;
2670    const s = e.current, { projection: r } = this.visualElement;
2671    if (!r || !r.layout)
2672      return !1;
2673    const o = pl(s, r.root, this.visualElement.getTransformPagePoint());
2674    let i = il(r.layout.layoutBox, o);
2675    if (n) {
2676      const a = n(ul(i));
2677      this.hasMutatedConstraints = !!a, a && (i = Ir(a));
2678    }
2679    return i;
2680  }
2681  startAnimation(e) {
2682    const { drag: n, dragMomentum: s, dragElastic: r, dragTransition: o, dragSnapToOrigin: i, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = Y((c) => {
2683      if (!Jt(c, n, this.currentDirection))
2684        return;
2685      let f = l && l[c] || {};
2686      i && (f = { min: 0, max: 0 });
2687      const h = r ? 200 : 1e6, p = r ? 40 : 1e7, d = {
2688        type: "inertia",
2689        velocity: s ? e[c] : 0,
2690        bounceStiffness: h,
2691        bounceDamping: p,
2692        timeConstant: 750,
2693        restDelta: 1,
2694        restSpeed: 10,
2695        ...o,
2696        ...f
2697      };
2698      return this.startAxisValueAnimation(c, d);
2699    });
2700    return Promise.all(u).then(a);
2701  }
2702  startAxisValueAnimation(e, n) {
2703    const s = this.getAxisMotionValue(e);
2704    return s.start(yn(e, s, 0, n));
2705  }
2706  stopAnimation() {
2707    Y((e) => this.getAxisMotionValue(e).stop());
2708  }
2709  pauseAnimation() {
2710    Y((e) => {
2711      var n;
2712      return (n = this.getAxisMotionValue(e).animation) === null || n === void 0 ? void 0 : n.pause();
2713    });
2714  }
2715  getAnimationState(e) {
2716    var n;
2717    return (n = this.getAxisMotionValue(e).animation) === null || n === void 0 ? void 0 : n.state;
2718  }
2719  /**
2720   * Drag works differently depending on which props are provided.
2721   *
2722   * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
2723   * - Otherwise, we apply the delta to the x/y motion values.
2724   */
2725  getAxisMotionValue(e) {
2726    const n = "_drag" + e.toUpperCase(), s = this.visualElement.getProps(), r = s[n];
2727    return r || this.visualElement.getValue(e, (s.initial ? s.initial[e] : void 0) || 0);
2728  }
2729  snapToCursor(e) {
2730    Y((n) => {
2731      const { drag: s } = this.getProps();
2732      if (!Jt(n, s, this.currentDirection))
2733        return;
2734      const { projection: r } = this.visualElement, o = this.getAxisMotionValue(n);
2735      if (r && r.layout) {
2736        const { min: i, max: a } = r.layout.layoutBox[n];
2737        o.set(e[n] - I(i, a, 0.5));
2738      }
2739    });
2740  }
2741  /**
2742   * When the viewport resizes we want to check if the measured constraints
2743   * have changed and, if so, reposition the element within those new constraints
2744   * relative to where it was before the resize.
2745   */
2746  scalePositionWithinConstraints() {
2747    if (!this.visualElement.current)
2748      return;
2749    const { drag: e, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
2750    if (!Pt(n) || !s || !this.constraints)
2751      return;
2752    this.stopAnimation();
2753    const r = { x: 0, y: 0 };
2754    Y((i) => {
2755      const a = this.getAxisMotionValue(i);
2756      if (a) {
2757        const l = a.get();
2758        r[i] = ol({ min: l, max: l }, this.constraints[i]);
2759      }
2760    });
2761    const { transformTemplate: o } = this.visualElement.getProps();
2762    this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), Y((i) => {
2763      if (!Jt(i, e, null))
2764        return;
2765      const a = this.getAxisMotionValue(i), { min: l, max: u } = this.constraints[i];
2766      a.set(I(l, u, r[i]));
2767    });
2768  }
2769  addListeners() {
2770    if (!this.visualElement.current)
2771      return;
2772    ml.set(this.visualElement, this);
2773    const e = this.visualElement.current, n = J(e, "pointerdown", (l) => {
2774      const { drag: u, dragListener: c = !0 } = this.getProps();
2775      u && c && this.start(l);
2776    }), s = () => {
2777      const { dragConstraints: l } = this.getProps();
2778      Pt(l) && (this.constraints = this.resolveRefConstraints());
2779    }, { projection: r } = this.visualElement, o = r.addEventListener("measure", s);
2780    r && !r.layout && (r.root && r.root.updateScroll(), r.updateLayout()), s();
2781    const i = Q(window, "resize", () => this.scalePositionWithinConstraints()), a = r.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: u }) => {
2782      this.isDragging && u && (Y((c) => {
2783        const f = this.getAxisMotionValue(c);
2784        f && (this.originPoint[c] += l[c].translate, f.set(f.get() + l[c].translate));
2785      }), this.visualElement.render());
2786    });
2787    return () => {
2788      i(), n(), o(), a && a();
2789    };
2790  }
2791  getProps() {
2792    const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: r = !1, dragConstraints: o = !1, dragElastic: i = ze, dragMomentum: a = !0 } = e;
2793    return {
2794      ...e,
2795      drag: n,
2796      dragDirectionLock: s,
2797      dragPropagation: r,
2798      dragConstraints: o,
2799      dragElastic: i,
2800      dragMomentum: a
2801    };
2802  }
2803}
2804function Jt(t, e, n) {
2805  return (e === !0 || e === t) && (n === null || n === t);
2806}
2807function yl(t, e = 10) {
2808  let n = null;
2809  return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
2810}
2811class vl extends lt {
2812  constructor(e) {
2813    super(e), this.removeGroupControls = U, this.removeListeners = U, this.controls = new gl(e);
2814  }
2815  mount() {
2816    const { dragControls: e } = this.node.getProps();
2817    e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || U;
2818  }
2819  unmount() {
2820    this.removeGroupControls(), this.removeListeners();
2821  }
2822}
2823const ss = (t) => (e, n) => {
2824  t && B.update(() => t(e, n));
2825};
2826class xl extends lt {
2827  constructor() {
2828    super(...arguments), this.removePointerDownListener = U;
2829  }
2830  onPointerDown(e) {
2831    this.session = new Br(e, this.createPanHandlers(), {
2832      transformPagePoint: this.node.getTransformPagePoint(),
2833      contextWindow: Wr(this.node)
2834    });
2835  }
2836  createPanHandlers() {
2837    const { onPanSessionStart: e, onPanStart: n, onPan: s, onPanEnd: r } = this.node.getProps();
2838    return {
2839      onSessionStart: ss(e),
2840      onStart: ss(n),
2841      onMove: s,
2842      onEnd: (o, i) => {
2843        delete this.session, r && B.update(() => r(o, i));
2844      }
2845    };
2846  }
2847  mount() {
2848    this.removePointerDownListener = J(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
2849  }
2850  update() {
2851    this.session && this.session.updateHandlers(this.createPanHandlers());
2852  }
2853  unmount() {
2854    this.removePointerDownListener(), this.session && this.session.end();
2855  }
2856}
2857function bl() {
2858  const t = w.useContext(de);
2859  if (t === null)
2860    return [!0, null];
2861  const { isPresent: e, onExitComplete: n, register: s } = t, r = w.useId();
2862  return w.useEffect(() => s(r), []), !e && n ? [!1, () => n && n(r)] : [!0];
2863}
2864const se = {
2865  /**
2866   * Global flag as to whether the tree has animated since the last time
2867   * we resized the window
2868   */
2869  hasAnimatedSinceResize: !0,
2870  /**
2871   * We set this to true once, on the first update. Any nodes added to the tree beyond that
2872   * update will be given a `data-projection-id` attribute.
2873   */
2874  hasEverUpdated: !1
2875};
2876function rs(t, e) {
2877  return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
2878}
2879const Rt = {
2880  correct: (t, e) => {
2881    if (!e.target)
2882      return t;
2883    if (typeof t == "string")
2884      if (D.test(t))
2885        t = parseFloat(t);
2886      else
2887        return t;
2888    const n = rs(t, e.target.x), s = rs(t, e.target.y);
2889    return `${n}% ${s}%`;
2890  }
2891}, Pl = {
2892  correct: (t, { treeScale: e, projectionDelta: n }) => {
2893    const s = t, r = at.parse(t);
2894    if (r.length > 5)
2895      return s;
2896    const o = at.createTransformer(t), i = typeof r[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
2897    r[0 + i] /= a, r[1 + i] /= l;
2898    const u = I(a, l, 0.5);
2899    return typeof r[2 + i] == "number" && (r[2 + i] /= u), typeof r[3 + i] == "number" && (r[3 + i] /= u), o(r);
2900  }
2901};
2902class Cl extends z.Component {
2903  /**
2904   * This only mounts projection nodes for components that
2905   * need measuring, we might want to do it for all components
2906   * in order to incorporate transforms
2907   */
2908  componentDidMount() {
2909    const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: r } = this.props, { projection: o } = e;
2910    Oi(Tl), o && (n.group && n.group.add(o), s && s.register && r && s.register(o), o.root.didUpdate(), o.addEventListener("animationComplete", () => {
2911      this.safeToRemove();
2912    }), o.setOptions({
2913      ...o.options,
2914      onExitComplete: () => this.safeToRemove()
2915    })), se.hasEverUpdated = !0;
2916  }
2917  getSnapshotBeforeUpdate(e) {
2918    const { layoutDependency: n, visualElement: s, drag: r, isPresent: o } = this.props, i = s.projection;
2919    return i && (i.isPresent = o, r || e.layoutDependency !== n || n === void 0 ? i.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? i.promote() : i.relegate() || B.postRender(() => {
2920      const a = i.getStack();
2921      (!a || !a.members.length) && this.safeToRemove();
2922    }))), null;
2923  }
2924  componentDidUpdate() {
2925    const { projection: e } = this.props.visualElement;
2926    e && (e.root.didUpdate(), Je.postRender(() => {
2927      !e.currentAnimation && e.isLead() && this.safeToRemove();
2928    }));
2929  }
2930  componentWillUnmount() {
2931    const { visualElement: e, layoutGroup: n, switchLayoutGroup: s } = this.props, { projection: r } = e;
2932    r && (r.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(r), s && s.deregister && s.deregister(r));
2933  }
2934  safeToRemove() {
2935    const { safeToRemove: e } = this.props;
2936    e && e();
2937  }
2938  render() {
2939    return null;
2940  }
2941}
2942function Hr(t) {
2943  const [e, n] = bl(), s = w.useContext(nn);
2944  return z.createElement(Cl, { ...t, layoutGroup: s, switchLayoutGroup: w.useContext(Is), isPresent: e, safeToRemove: n });
2945}
2946const Tl = {
2947  borderRadius: {
2948    ...Rt,
2949    applyTo: [
2950      "borderTopLeftRadius",
2951      "borderTopRightRadius",
2952      "borderBottomLeftRadius",
2953      "borderBottomRightRadius"
2954    ]
2955  },
2956  borderTopLeftRadius: Rt,
2957  borderTopRightRadius: Rt,
2958  borderBottomLeftRadius: Rt,
2959  borderBottomRightRadius: Rt,
2960  boxShadow: Pl
2961}, zr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], wl = zr.length, is = (t) => typeof t == "string" ? parseFloat(t) : t, os = (t) => typeof t == "number" || D.test(t);
2962function Sl(t, e, n, s, r, o) {
2963  r ? (t.opacity = I(
2964    0,
2965    // TODO Reinstate this if only child
2966    n.opacity !== void 0 ? n.opacity : 1,
2967    Vl(s)
2968  ), t.opacityExit = I(e.opacity !== void 0 ? e.opacity : 1, 0, Al(s))) : o && (t.opacity = I(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, s));
2969  for (let i = 0; i < wl; i++) {
2970    const a = `border${zr[i]}Radius`;
2971    let l = as(e, a), u = as(n, a);
2972    if (l === void 0 && u === void 0)
2973      continue;
2974    l || (l = 0), u || (u = 0), l === 0 || u === 0 || os(l) === os(u) ? (t[a] = Math.max(I(is(l), is(u), s), 0), (Z.test(u) || Z.test(l)) && (t[a] += "%")) : t[a] = u;
2975  }
2976  (e.rotate || n.rotate) && (t.rotate = I(e.rotate || 0, n.rotate || 0, s));
2977}
2978function as(t, e) {
2979  return t[e] !== void 0 ? t[e] : t.borderRadius;
2980}
2981const Vl = Gr(0, 0.5, dr), Al = Gr(0.5, 0.95, U);
2982function Gr(t, e, n) {
2983  return (s) => s < t ? 0 : s > e ? 1 : n(It(t, e, s));
2984}
2985function ls(t, e) {
2986  t.min = e.min, t.max = e.max;
2987}
2988function q(t, e) {
2989  ls(t.x, e.x), ls(t.y, e.y);
2990}
2991function us(t, e, n, s, r) {
2992  return t -= e, t = fe(t, 1 / n, s), r !== void 0 && (t = fe(t, 1 / r, s)), t;
2993}
2994function Dl(t, e = 0, n = 1, s = 0.5, r, o = t, i = t) {
2995  if (Z.test(e) && (e = parseFloat(e), e = I(i.min, i.max, e / 100) - i.min), typeof e != "number")
2996    return;
2997  let a = I(o.min, o.max, s);
2998  t === o && (a -= e), t.min = us(t.min, e, n, a, r), t.max = us(t.max, e, n, a, r);
2999}
3000function cs(t, e, [n, s, r], o, i) {
3001  Dl(t, e[n], e[s], e[r], e.scale, o, i);
3002}
3003const Ml = ["x", "scaleX", "originX"], Rl = ["y", "scaleY", "originY"];
3004function fs(t, e, n, s) {
3005  cs(t.x, e, Ml, n ? n.x : void 0, s ? s.x : void 0), cs(t.y, e, Rl, n ? n.y : void 0, s ? s.y : void 0);
3006}
3007function hs(t) {
3008  return t.translate === 0 && t.scale === 1;
3009}
3010function $r(t) {
3011  return hs(t.x) && hs(t.y);
3012}
3013function Ol(t, e) {
3014  return t.x.min === e.x.min && t.x.max === e.x.max && t.y.min === e.y.min && t.y.max === e.y.max;
3015}
3016function Kr(t, e) {
3017  return Math.round(t.x.min) === Math.round(e.x.min) && Math.round(t.x.max) === Math.round(e.x.max) && Math.round(t.y.min) === Math.round(e.y.min) && Math.round(t.y.max) === Math.round(e.y.max);
3018}
3019function ds(t) {
3020  return K(t.x) / K(t.y);
3021}
3022class El {
3023  constructor() {
3024    this.members = [];
3025  }
3026  add(e) {
3027    vn(this.members, e), e.scheduleRender();
3028  }
3029  remove(e) {
3030    if (xn(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
3031      const n = this.members[this.members.length - 1];
3032      n && this.promote(n);
3033    }
3034  }
3035  relegate(e) {
3036    const n = this.members.findIndex((r) => e === r);
3037    if (n === 0)
3038      return !1;
3039    let s;
3040    for (let r = n; r >= 0; r--) {
3041      const o = this.members[r];
3042      if (o.isPresent !== !1) {
3043        s = o;
3044        break;
3045      }
3046    }
3047    return s ? (this.promote(s), !0) : !1;
3048  }
3049  promote(e, n) {
3050    const s = this.lead;
3051    if (e !== s && (this.prevLead = s, this.lead = e, e.show(), s)) {
3052      s.instance && s.scheduleRender(), e.scheduleRender(), e.resumeFrom = s, n && (e.resumeFrom.preserveOpacity = !0), s.snapshot && (e.snapshot = s.snapshot, e.snapshot.latestValues = s.animationValues || s.latestValues), e.root && e.root.isUpdating && (e.isLayoutDirty = !0);
3053      const { crossfade: r } = e.options;
3054      r === !1 && s.hide();
3055    }
3056  }
3057  exitAnimationComplete() {
3058    this.members.forEach((e) => {
3059      const { options: n, resumingFrom: s } = e;
3060      n.onExitComplete && n.onExitComplete(), s && s.options.onExitComplete && s.options.onExitComplete();
3061    });
3062  }
3063  scheduleRender() {
3064    this.members.forEach((e) => {
3065      e.instance && e.scheduleRender(!1);
3066    });
3067  }
3068  /**
3069   * Clear any leads that have been removed this render to prevent them from being
3070   * used in future animations and to prevent memory leaks
3071   */
3072  removeLeadSnapshot() {
3073    this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
3074  }
3075}
3076function ps(t, e, n) {
3077  let s = "";
3078  const r = t.x.translate / e.x, o = t.y.translate / e.y;
3079  if ((r || o) && (s = `translate3d(${r}px, ${o}px, 0) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
3080    const { rotate: l, rotateX: u, rotateY: c } = n;
3081    l && (s += `rotate(${l}deg) `), u && (s += `rotateX(${u}deg) `), c && (s += `rotateY(${c}deg) `);
3082  }
3083  const i = t.x.scale * e.x, a = t.y.scale * e.y;
3084  return (i !== 1 || a !== 1) && (s += `scale(${i}, ${a})`), s || "none";
3085}
3086const jl = (t, e) => t.depth - e.depth;
3087class Ll {
3088  constructor() {
3089    this.children = [], this.isDirty = !1;
3090  }
3091  add(e) {
3092    vn(this.children, e), this.isDirty = !0;
3093  }
3094  remove(e) {
3095    xn(this.children, e), this.isDirty = !0;
3096  }
3097  forEach(e) {
3098    this.isDirty && this.children.sort(jl), this.isDirty = !1, this.children.forEach(e);
3099  }
3100}
3101function kl(t, e) {
3102  const n = vt.now(), s = ({ timestamp: r }) => {
3103    const o = r - n;
3104    o >= e && (et(s), t(o - e));
3105  };
3106  return B.read(s, !0), () => et(s);
3107}
3108function Bl(t) {
3109  window.MotionDebug && window.MotionDebug.record(t);
3110}
3111function Fl(t) {
3112  return t instanceof SVGElement && t.tagName !== "svg";
3113}
3114function Il(t, e, n) {
3115  const s = $(t) ? t : St(t);
3116  return s.start(yn("", s, e, n)), s.animation;
3117}
3118const ms = ["", "X", "Y", "Z"], _l = { visibility: "hidden" }, gs = 1e3;
3119let Ul = 0;
3120const pt = {
3121  type: "projectionFrame",
3122  totalNodes: 0,
3123  resolvedTargetDeltas: 0,
3124  recalculatedProjection: 0
3125};
3126function qr({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: r }) {
3127  return class {
3128    constructor(i = {}, a = e == null ? void 0 : e()) {
3129      this.id = Ul++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
3130        this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
3131      }, this.updateProjection = () => {
3132        this.projectionUpdateScheduled = !1, pt.totalNodes = pt.resolvedTargetDeltas = pt.recalculatedProjection = 0, this.nodes.forEach(Hl), this.nodes.forEach(ql), this.nodes.forEach(Yl), this.nodes.forEach(zl), Bl(pt);
3133      }, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = i, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
3134      for (let l = 0; l < this.path.length; l++)
3135        this.path[l].shouldResetTransform = !0;
3136      this.root === this && (this.nodes = new Ll());
3137    }
3138    addEventListener(i, a) {
3139      return this.eventHandlers.has(i) || this.eventHandlers.set(i, new bn()), this.eventHandlers.get(i).add(a);
3140    }
3141    notifyListeners(i, ...a) {
3142      const l = this.eventHandlers.get(i);
3143      l && l.notify(...a);
3144    }
3145    hasListeners(i) {
3146      return this.eventHandlers.has(i);
3147    }
3148    /**
3149     * Lifecycles
3150     */
3151    mount(i, a = this.root.hasTreeAnimated) {
3152      if (this.instance)
3153        return;
3154      this.isSVG = Fl(i), this.instance = i;
3155      const { layoutId: l, layout: u, visualElement: c } = this.options;
3156      if (c && !c.current && c.mount(i), this.root.nodes.add(this), this.parent && this.parent.children.add(this), a && (u || l) && (this.isLayoutDirty = !0), t) {
3157        let f;
3158        const h = () => this.root.updateBlockedByResize = !1;
3159        t(i, () => {
3160          this.root.updateBlockedByResize = !0, f && f(), f = kl(h, 250), se.hasAnimatedSinceResize && (se.hasAnimatedSinceResize = !1, this.nodes.forEac
vendor: 10,593 bytes, lines 3160-3373
3160h(vs));
3161        });
3162      }
3163      l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && c && (l || u) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: h, hasRelativeTargetChanged: p, layout: d }) => {
3164        if (this.isTreeAnimationBlocked()) {
3165          this.target = void 0, this.relativeTarget = void 0;
3166          return;
3167        }
3168        const m = this.options.transition || c.getDefaultTransition() || tu, { onLayoutAnimationStart: y, onLayoutAnimationComplete: v } = c.getProps(), x = !this.targetLayout || !Kr(this.targetLayout, d) || p, g = !h && p;
3169        if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || g || h && (x || !this.currentAnimation)) {
3170          this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(f, g);
3171          const V = {
3172            ...gn(m, "layout"),
3173            onPlay: y,
3174            onComplete: v
3175          };
3176          (c.shouldReduceMotion || this.options.layoutRoot) && (V.delay = 0, V.type = !1), this.startAnimation(V);
3177        } else
3178          h || vs(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
3179        this.targetLayout = d;
3180      });
3181    }
3182    unmount() {
3183      this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
3184      const i = this.getStack();
3185      i && i.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, et(this.updateProjection);
3186    }
3187    // only on the root
3188    blockUpdate() {
3189      this.updateManuallyBlocked = !0;
3190    }
3191    unblockUpdate() {
3192      this.updateManuallyBlocked = !1;
3193    }
3194    isUpdateBlocked() {
3195      return this.updateManuallyBlocked || this.updateBlockedByResize;
3196    }
3197    isTreeAnimationBlocked() {
3198      return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
3199    }
3200    // Note: currently only running on root node
3201    startUpdate() {
3202      this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Xl), this.animationId++);
3203    }
3204    getTransformTemplate() {
3205      const { visualElement: i } = this.options;
3206      return i && i.getProps().transformTemplate;
3207    }
3208    willUpdate(i = !0) {
3209      if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
3210        this.options.onExitComplete && this.options.onExitComplete();
3211        return;
3212      }
3213      if (!this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
3214        return;
3215      this.isLayoutDirty = !0;
3216      for (let c = 0; c < this.path.length; c++) {
3217        const f = this.path[c];
3218        f.shouldResetTransform = !0, f.updateScroll("snapshot"), f.options.layoutRoot && f.willUpdate(!1);
3219      }
3220      const { layoutId: a, layout: l } = this.options;
3221      if (a === void 0 && !l)
3222        return;
3223      const u = this.getTransformTemplate();
3224      this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), i && this.notifyListeners("willUpdate");
3225    }
3226    update() {
3227      if (this.updateScheduled = !1, this.isUpdateBlocked()) {
3228        this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(ys);
3229        return;
3230      }
3231      this.isUpdating || this.nodes.forEach($l), this.isUpdating = !1, this.nodes.forEach(Kl), this.nodes.forEach(Nl), this.nodes.forEach(Wl), this.clearAllSnapshots();
3232      const a = vt.now();
3233      W.delta = ot(0, 1e3 / 60, a - W.timestamp), W.timestamp = a, W.isProcessing = !0, Pe.update.process(W), Pe.preRender.process(W), Pe.render.process(W), W.isProcessing = !1;
3234    }
3235    didUpdate() {
3236      this.updateScheduled || (this.updateScheduled = !0, Je.read(() => this.update()));
3237    }
3238    clearAllSnapshots() {
3239      this.nodes.forEach(Gl), this.sharedNodes.forEach(Zl);
3240    }
3241    scheduleUpdateProjection() {
3242      this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, B.preRender(this.updateProjection, !1, !0));
3243    }
3244    scheduleCheckAfterUnmount() {
3245      B.postRender(() => {
3246        this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
3247      });
3248    }
3249    /**
3250     * Update measurements
3251     */
3252    updateSnapshot() {
3253      this.snapshot || !this.instance || (this.snapshot = this.measure());
3254    }
3255    updateLayout() {
3256      if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
3257        return;
3258      if (this.resumeFrom && !this.resumeFrom.instance)
3259        for (let l = 0; l < this.path.length; l++)
3260          this.path[l].updateScroll();
3261      const i = this.layout;
3262      this.layout = this.measure(!1), this.layoutCorrected = _(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
3263      const { visualElement: a } = this.options;
3264      a && a.notify("LayoutMeasure", this.layout.layoutBox, i ? i.layoutBox : void 0);
3265    }
3266    updateScroll(i = "measure") {
3267      let a = !!(this.options.layoutScroll && this.instance);
3268      this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === i && (a = !1), a && (this.scroll = {
3269        animationId: this.root.animationId,
3270        phase: i,
3271        isRoot: s(this.instance),
3272        offset: n(this.instance)
3273      });
3274    }
3275    resetTransform() {
3276      if (!r)
3277        return;
3278      const i = this.isLayoutDirty || this.shouldResetTransform, a = this.projectionDelta && !$r(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
3279      i && (a || dt(this.latestValues) || c) && (r(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
3280    }
3281    measure(i = !0) {
3282      const a = this.measurePageBox();
3283      let l = this.removeElementScroll(a);
3284      return i && (l = this.removeTransform(l)), eu(l), {
3285        animationId: this.root.animationId,
3286        measuredBox: a,
3287        layoutBox: l,
3288        latestValues: {},
3289        source: this.id
3290      };
3291    }
3292    measurePageBox() {
3293      const { visualElement: i } = this.options;
3294      if (!i)
3295        return _();
3296      const a = i.measureViewportBox(), { scroll: l } = this.root;
3297      return l && (rt(a.x, l.offset.x), rt(a.y, l.offset.y)), a;
3298    }
3299    removeElementScroll(i) {
3300      const a = _();
3301      q(a, i);
3302      for (let l = 0; l < this.path.length; l++) {
3303        const u = this.path[l], { scroll: c, options: f } = u;
3304        if (u !== this.root && c && f.layoutScroll) {
3305          if (c.isRoot) {
3306            q(a, i);
3307            const { scroll: h } = this.root;
3308            h && (rt(a.x, -h.offset.x), rt(a.y, -h.offset.y));
3309          }
3310          rt(a.x, c.offset.x), rt(a.y, c.offset.y);
3311        }
3312      }
3313      return a;
3314    }
3315    applyTransform(i, a = !1) {
3316      const l = _();
3317      q(l, i);
3318      for (let u = 0; u < this.path.length; u++) {
3319        const c = this.path[u];
3320        !a && c.options.layoutScroll && c.scroll && c !== c.root && wt(l, {
3321          x: -c.scroll.offset.x,
3322          y: -c.scroll.offset.y
3323        }), dt(c.latestValues) && wt(l, c.latestValues);
3324      }
3325      return dt(this.latestValues) && wt(l, this.latestValues), l;
3326    }
3327    removeTransform(i) {
3328      const a = _();
3329      q(a, i);
3330      for (let l = 0; l < this.path.length; l++) {
3331        const u = this.path[l];
3332        if (!u.instance || !dt(u.latestValues))
3333          continue;
3334        Ge(u.latestValues) && u.updateSnapshot();
3335        const c = _(), f = u.measurePageBox();
3336        q(c, f), fs(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
3337      }
3338      return dt(this.latestValues) && fs(a, this.latestValues), a;
3339    }
3340    setTargetDelta(i) {
3341      this.targetDelta = i, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
3342    }
3343    setOptions(i) {
3344      this.options = {
3345        ...this.options,
3346        ...i,
3347        crossfade: i.crossfade !== void 0 ? i.crossfade : !0
3348      };
3349    }
3350    clearMeasurements() {
3351      this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
3352    }
3353    forceRelativeParentToResolveTarget() {
3354      this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== W.timestamp && this.relativeParent.resolveTargetDelta(!0);
3355    }
3356    resolveTargetDelta(i = !1) {
3357      var a;
3358      const l = this.getLead();
3359      this.isProjectionDirty || (this.isProjectionDirty = l.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = l.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = l.isSharedProjectionDirty);
3360      const u = !!this.resumingFrom || this !== l;
3361      if (!(i || u && this.isSharedProjectionDirty || this.isProjectionDirty || !((a = this.parent) === null || a === void 0) && a.isProjectionDirty || this.attemptToResolveRelativeTarget))
3362        return;
3363      const { layout: f, layoutId: h } = this.options;
3364      if (!(!this.layout || !(f || h))) {
3365        if (this.resolvedRelativeTargetAt = W.timestamp, !this.targetDelta && !this.relativeTarget) {
3366          const p = this.getClosestProjectingParent();
3367          p && p.layout && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = _(), this.relativeTargetOrigin = _(), kt(this.relativeTargetOrigin, this.layout.layoutBox, p.layout.layoutBox), q(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
3368        }
3369        if (!(!this.relativeTarget && !this.targetDelta)) {
3370          if (this.target || (this.target = _(), this.targetWithTransforms = _()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), nl(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : q(this.target, this.layout.layoutBox), Ur(this.target, this.targetDelta)) : q(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
3371            this.attemptToResolveRelativeTarget = !1;
3372            const p = this.getClosestProjectingParent();
3373            p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = _(), this.relativeTargetOrigin = _(), 
3373kt(this.relativeTargetOrigin, this.target, p.target), q(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
3374          }
3375          pt.resolvedTargetDeltas++;
3376        }
3377      }
3378    }
3379    getClosestProjectingParent() {
3380      if (!(!this.parent || Ge(this.parent.latestValues) || _r(this.parent.latestValues)))
3381        return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
3382    }
3383    isProjecting() {
3384      return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
3385    }
3386    calcProjection() {
3387      var i;
3388      const a = this.getLead(), l = !!this.resumingFrom || this !== a;
3389      let u = !0;
3390      if ((this.isProjectionDirty || !((i = this.parent) === null || i === void 0) && i.isProjectionDirty) && (u = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (u = !1), this.resolvedRelativeTargetAt === W.timestamp && (u = !1), u)
3391        return;
3392      const { layout: c, layoutId: f } = this.options;
3393      if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || f))
3394        return;
3395      q(this.layoutCorrected, this.layout.layoutBox);
3396      const h = this.treeScale.x, p = this.treeScale.y;
3397      fl(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = _());
3398      const { target: d } = a;
3399      if (!d) {
3400        this.projectionTransform && (this.projectionDelta = Tt(), this.projectionTransform = "none", this.scheduleRender());
3401        return;
3402      }
3403      this.projectionDelta || (this.projectionDelta = Tt(), this.projectionDeltaWithTransform = Tt());
3404      const m = this.projectionTransform;
3405      Lt(this.projectionDelta, this.layoutCorrected, d, this.latestValues), this.projectionTransform = ps(this.projectionDelta, this.treeScale), (this.projectionTransform !== m || this.treeScale.x !== h || this.treeScale.y !== p) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", d)), pt.recalculatedProjection++;
3406    }
3407    hide() {
3408      this.isVisible = !1;
3409    }
3410    show() {
3411      this.isVisible = !0;
3412    }
3413    scheduleRender(i = !0) {
3414      if (this.options.scheduleRender && this.options.scheduleRender(), i) {
3415        const a = this.getStack();
3416        a && a.scheduleRender();
3417      }
3418      this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
3419    }
3420    setAnimationOrigin(i, a = !1) {
3421      const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, f = Tt();
3422      (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
3423      const h = _(), p = l ? l.source : void 0, d = this.layout ? this.layout.source : void 0, m = p !== d, y = this.getStack(), v = !y || y.members.length <= 1, x = !!(m && !v && this.options.crossfade === !0 && !this.path.some(Jl));
3424      this.animationProgress = 0;
3425      let g;
3426      this.mixTargetDelta = (V) => {
3427        const b = V / 1e3;
3428        xs(f.x, i.x, b), xs(f.y, i.y, b), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (kt(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Ql(this.relativeTarget, this.relativeTargetOrigin, h, b), g && Ol(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = _()), q(g, this.relativeTarget)), m && (this.animationValues = c, Sl(c, u, this.latestValues, b, x, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = b;
3429      }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
3430    }
3431    startAnimation(i) {
3432      this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (et(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = B.update(() => {
3433        se.hasAnimatedSinceResize = !0, this.currentAnimation = Il(0, gs, {
3434          ...i,
3435          onUpdate: (a) => {
3436            this.mixTargetDelta(a), i.onUpdate && i.onUpdate(a);
3437          },
3438          onComplete: () => {
3439            i.onComplete && i.onComplete(), this.completeAnimation();
3440          }
3441        }), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
3442      });
3443    }
3444    completeAnimation() {
3445      this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
vendor: 10,109 bytes, lines 3446-3727
3446      const i = this.getStack();
3447      i && i.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
3448    }
3449    finishAnimation() {
3450      this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(gs), this.currentAnimation.stop()), this.completeAnimation();
3451    }
3452    applyTransformsToTarget() {
3453      const i = this.getLead();
3454      let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = i;
3455      if (!(!a || !l || !u)) {
3456        if (this !== i && this.layout && u && Yr(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
3457          l = this.target || _();
3458          const f = K(this.layout.layoutBox.x);
3459          l.x.min = i.target.x.min, l.x.max = l.x.min + f;
3460          const h = K(this.layout.layoutBox.y);
3461          l.y.min = i.target.y.min, l.y.max = l.y.min + h;
3462        }
3463        q(a, l), wt(a, c), Lt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
3464      }
3465    }
3466    registerSharedNode(i, a) {
3467      this.sharedNodes.has(i) || this.sharedNodes.set(i, new El()), this.sharedNodes.get(i).add(a);
3468      const u = a.options.initialPromotionConfig;
3469      a.promote({
3470        transition: u ? u.transition : void 0,
3471        preserveFollowOpacity: u && u.shouldPreserveFollowOpacity ? u.shouldPreserveFollowOpacity(a) : void 0
3472      });
3473    }
3474    isLead() {
3475      const i = this.getStack();
3476      return i ? i.lead === this : !0;
3477    }
3478    getLead() {
3479      var i;
3480      const { layoutId: a } = this.options;
3481      return a ? ((i = this.getStack()) === null || i === void 0 ? void 0 : i.lead) || this : this;
3482    }
3483    getPrevLead() {
3484      var i;
3485      const { layoutId: a } = this.options;
3486      return a ? (i = this.getStack()) === null || i === void 0 ? void 0 : i.prevLead : void 0;
3487    }
3488    getStack() {
3489      const { layoutId: i } = this.options;
3490      if (i)
3491        return this.root.sharedNodes.get(i);
3492    }
3493    promote({ needsReset: i, transition: a, preserveFollowOpacity: l } = {}) {
3494      const u = this.getStack();
3495      u && u.promote(this, l), i && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
3496    }
3497    relegate() {
3498      const i = this.getStack();
3499      return i ? i.relegate(this) : !1;
3500    }
3501    resetRotation() {
3502      const { visualElement: i } = this.options;
3503      if (!i)
3504        return;
3505      let a = !1;
3506      const { latestValues: l } = i;
3507      if ((l.rotate || l.rotateX || l.rotateY || l.rotateZ) && (a = !0), !a)
3508        return;
3509      const u = {};
3510      for (let c = 0; c < ms.length; c++) {
3511        const f = "rotate" + ms[c];
3512        l[f] && (u[f] = l[f], i.setStaticValue(f, 0));
3513      }
3514      i.render();
3515      for (const c in u)
3516        i.setStaticValue(c, u[c]);
3517      i.scheduleRender();
3518    }
3519    getProjectionStyles(i) {
3520      var a, l;
3521      if (!this.instance || this.isSVG)
3522        return;
3523      if (!this.isVisible)
3524        return _l;
3525      const u = {
3526        visibility: ""
3527      }, c = this.getTransformTemplate();
3528      if (this.needsReset)
3529        return this.needsReset = !1, u.opacity = "", u.pointerEvents = ee(i == null ? void 0 : i.pointerEvents) || "", u.transform = c ? c(this.latestValues, "") : "none", u;
3530      const f = this.getLead();
3531      if (!this.projectionDelta || !this.layout || !f.target) {
3532        const m = {};
3533        return this.options.layoutId && (m.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, m.pointerEvents = ee(i == null ? void 0 : i.pointerEvents) || ""), this.hasProjected && !dt(this.latestValues) && (m.transform = c ? c({}, "") : "none", this.hasProjected = !1), m;
3534      }
3535      const h = f.animationValues || f.latestValues;
3536      this.applyTransformsToTarget(), u.transform = ps(this.projectionDeltaWithTransform, this.treeScale, h), c && (u.transform = c(h, u.transform));
3537      const { x: p, y: d } = this.projectionDelta;
3538      u.transformOrigin = `${p.origin * 100}% ${d.origin * 100}% 0`, f.animationValues ? u.opacity = f === this ? (l = (a = h.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : h.opacityExit : u.opacity = f === this ? h.opacity !== void 0 ? h.opacity : "" : h.opacityExit !== void 0 ? h.opacityExit : 0;
3539      for (const m in re) {
3540        if (h[m] === void 0)
3541          continue;
3542        const { correct: y, applyTo: v } = re[m], x = u.transform === "none" ? h[m] : y(h[m], f);
3543        if (v) {
3544          const g = v.length;
3545          for (let V = 0; V < g; V++)
3546            u[v[V]] = x;
3547        } else
3548          u[m] = x;
3549      }
3550      return this.options.layoutId && (u.pointerEvents = f === this ? ee(i == null ? void 0 : i.pointerEvents) || "" : "none"), u;
3551    }
3552    clearSnapshot() {
3553      this.resumeFrom = this.snapshot = void 0;
3554    }
3555    // Only run on root
3556    resetTree() {
3557      this.root.nodes.forEach((i) => {
3558        var a;
3559        return (a = i.currentAnimation) === null || a === void 0 ? void 0 : a.stop();
3560      }), this.root.nodes.forEach(ys), this.root.sharedNodes.clear();
3561    }
3562  };
3563}
3564function Nl(t) {
3565  t.updateLayout();
3566}
3567function Wl(t) {
3568  var e;
3569  const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
3570  if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
3571    const { layoutBox: s, measuredBox: r } = t.layout, { animationType: o } = t.options, i = n.source !== t.layout.source;
3572    o === "size" ? Y((f) => {
3573      const h = i ? n.measuredBox[f] : n.layoutBox[f], p = K(h);
3574      h.min = s[f].min, h.max = h.min + p;
3575    }) : Yr(o, n.layoutBox, s) && Y((f) => {
3576      const h = i ? n.measuredBox[f] : n.layoutBox[f], p = K(s[f]);
3577      h.max = h.min + p, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[f].max = t.relativeTarget[f].min + p);
3578    });
3579    const a = Tt();
3580    Lt(a, s, n.layoutBox);
3581    const l = Tt();
3582    i ? Lt(l, t.applyTransform(r, !0), n.measuredBox) : Lt(l, s, n.layoutBox);
3583    const u = !$r(a);
3584    let c = !1;
3585    if (!t.resumeFrom) {
3586      const f = t.getClosestProjectingParent();
3587      if (f && !f.resumeFrom) {
3588        const { snapshot: h, layout: p } = f;
3589        if (h && p) {
3590          const d = _();
3591          kt(d, n.layoutBox, h.layoutBox);
3592          const m = _();
3593          kt(m, s, p.layoutBox), Kr(d, m) || (c = !0), f.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = d, t.relativeParent = f);
3594        }
3595      }
3596    }
3597    t.notifyListeners("didUpdate", {
3598      layout: s,
3599      snapshot: n,
3600      delta: l,
3601      layoutDelta: a,
3602      hasLayoutChanged: u,
3603      hasRelativeTargetChanged: c
3604    });
3605  } else if (t.isLead()) {
3606    const { onExitComplete: s } = t.options;
3607    s && s();
3608  }
3609  t.options.transition = void 0;
3610}
3611function Hl(t) {
3612  pt.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
3613}
3614function zl(t) {
3615  t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
3616}
3617function Gl(t) {
3618  t.clearSnapshot();
3619}
3620function ys(t) {
3621  t.clearMeasurements();
3622}
3623function $l(t) {
3624  t.isLayoutDirty = !1;
3625}
3626function Kl(t) {
3627  const { visualElement: e } = t.options;
3628  e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
3629}
3630function vs(t) {
3631  t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
3632}
3633function ql(t) {
3634  t.resolveTargetDelta();
3635}
3636function Yl(t) {
3637  t.calcProjection();
3638}
3639function Xl(t) {
3640  t.resetRotation();
3641}
3642function Zl(t) {
3643  t.removeLeadSnapshot();
3644}
3645function xs(t, e, n) {
3646  t.translate = I(e.translate, 0, n), t.scale = I(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
3647}
3648function bs(t, e, n, s) {
3649  t.min = I(e.min, n.min, s), t.max = I(e.max, n.max, s);
3650}
3651function Ql(t, e, n, s) {
3652  bs(t.x, e.x, n.x, s), bs(t.y, e.y, n.y, s);
3653}
3654function Jl(t) {
3655  return t.animationValues && t.animationValues.opacityExit !== void 0;
3656}
3657const tu = {
3658  duration: 0.45,
3659  ease: [0.4, 0, 0.1, 1]
3660}, Ps = (t) => typeof navigator < "u" && navigator.userAgent.toLowerCase().includes(t), Cs = Ps("applewebkit/") && !Ps("chrome/") ? Math.round : U;
3661function Ts(t) {
3662  t.min = Cs(t.min), t.max = Cs(t.max);
3663}
3664function eu(t) {
3665  Ts(t.x), Ts(t.y);
3666}
3667function Yr(t, e, n) {
3668  return t === "position" || t === "preserve-aspect" && !He(ds(e), ds(n), 0.2);
3669}
3670const nu = qr({
3671  attachResizeListener: (t, e) => Q(t, "resize", e),
3672  measureScroll: () => ({
3673    x: document.documentElement.scrollLeft || document.body.scrollLeft,
3674    y: document.documentElement.scrollTop || document.body.scrollTop
3675  }),
3676  checkIsScrollRoot: () => !0
3677}), Ee = {
3678  current: void 0
3679}, Xr = qr({
3680  measureScroll: (t) => ({
3681    x: t.scrollLeft,
3682    y: t.scrollTop
3683  }),
3684  defaultParent: () => {
3685    if (!Ee.current) {
3686      const t = new nu({});
3687      t.mount(window), t.setOptions({ layoutScroll: !0 }), Ee.current = t;
3688    }
3689    return Ee.current;
3690  },
3691  resetTransform: (t, e) => {
3692    t.style.transform = e !== void 0 ? e : "none";
3693  },
3694  checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
3695}), su = {
3696  pan: {
3697    Feature: xl
3698  },
3699  drag: {
3700    Feature: vl,
3701    ProjectionNode: Xr,
3702    MeasureLayout: Hr
3703  }
3704}, ru = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
3705function iu(t) {
3706  const e = ru.exec(t);
3707  if (!e)
3708    return [,];
3709  const [, n, s] = e;
3710  return [n, s];
3711}
3712function Ke(t, e, n = 1) {
3713  const [s, r] = iu(t);
3714  if (!s)
3715    return;
3716  const o = window.getComputedStyle(e).getPropertyValue(s);
3717  if (o) {
3718    const i = o.trim();
3719    return Er(i) ? parseFloat(i) : i;
3720  } else
3721    return Be(r) ? Ke(r, e, n + 1) : r;
3722}
3723function ou(t, { ...e }, n) {
3724  const s = t.current;
3725  if (!(s instanceof Element))
3726    return { target: e, transitionEnd: n };
3727  n && (n = { ...n }
3727), t.values.forEach((r) => {
3728    const o = r.get();
3729    if (!Be(o))
3730      return;
3731    const i = Ke(o, s);
3732    i && r.set(i);
3733  });
3734  for (const r in e) {
3735    const o = e[r];
3736    if (!Be(o))
3737      continue;
3738    const i = Ke(o, s);
3739    i && (e[r] = i, n || (n = {}), n[r] === void 0 && (n[r] = o));
3740  }
3741  return { target: e, transitionEnd: n };
3742}
3743const au = /* @__PURE__ */ new Set([
3744  "width",
3745  "height",
3746  "top",
3747  "left",
3748  "right",
3749  "bottom",
3750  "x",
3751  "y",
3752  "translateX",
3753  "translateY"
3754]), Zr = (t) => au.has(t), lu = (t) => Object.keys(t).some(Zr), ws = (t) => t === bt || t === D, Ss = (t, e) => parseFloat(t.split(", ")[e]), Vs = (t, e) => (n, { transform: s }) => {
3755  if (s === "none" || !s)
3756    return 0;
3757  const r = s.match(/^matrix3d\((.+)\)$/);
3758  if (r)
3759    return Ss(r[1], e);
3760  {
3761    const o = s.match(/^matrix\((.+)\)$/);
3762    return o ? Ss(o[1], t) : 0;
3763  }
3764}, uu = /* @__PURE__ */ new Set(["x", "y", "z"]), cu = _t.filter((t) => !uu.has(t));
3765function fu(t) {
3766  const e = [];
3767  return cu.forEach((n) => {
3768    const s = t.getValue(n);
3769    s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
3770  }), e.length && t.render(), e;
3771}
3772const Vt = {
3773  // Dimensions
3774  width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
3775  height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
3776  top: (t, { top: e }) => parseFloat(e),
3777  left: (t, { left: e }) => parseFloat(e),
3778  bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
3779  right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
3780  // Transform
3781  x: Vs(4, 13),
3782  y: Vs(5, 14)
3783};
3784Vt.translateX = Vt.x;
3785Vt.translateY = Vt.y;
3786const hu = (t, e, n) => {
3787  const s = e.measureViewportBox(), r = e.current, o = getComputedStyle(r), { display: i } = o, a = {};
3788  i === "none" && e.setStaticValue("display", t.display || "block"), n.forEach((u) => {
3789    a[u] = Vt[u](s, o);
3790  }), e.render();
3791  const l = e.measureViewportBox();
3792  return n.forEach((u) => {
3793    const c = e.getValue(u);
3794    c && c.jump(a[u]), t[u] = Vt[u](l, o);
3795  }), t;
3796}, du = (t, e, n = {}, s = {}) => {
3797  e = { ...e }, s = { ...s };
3798  const r = Object.keys(e).filter(Zr);
3799  let o = [], i = !1;
3800  const a = [];
3801  if (r.forEach((l) => {
3802    const u = t.getValue(l);
3803    if (!t.hasValue(l))
3804      return;
3805    let c = n[l], f = Mt(c);
3806    const h = e[l];
3807    let p;
3808    if (oe(h)) {
3809      const d = h.length, m = h[0] === null ? 1 : 0;
3810      c = h[m], f = Mt(c);
3811      for (let y = m; y < d && h[y] !== null; y++)
3812        p ? fn(Mt(h[y]) === p) : p = Mt(h[y]);
3813    } else
3814      p = Mt(h);
3815    if (f !== p)
3816      if (ws(f) && ws(p)) {
3817        const d = u.get();
3818        typeof d == "string" && u.set(parseFloat(d)), typeof h == "string" ? e[l] = parseFloat(h) : Array.isArray(h) && p === D && (e[l] = h.map(parseFloat));
3819      } else
3820        f != null && f.transform && (p != null && p.transform) && (c === 0 || h === 0) ? c === 0 ? u.set(p.transform(c)) : e[l] = f.transform(h) : (i || (o = fu(t), i = !0), a.push(l), s[l] = s[l] !== void 0 ? s[l] : e[l], u.jump(h));
3821  }), a.length) {
3822    const l = a.indexOf("height") >= 0 ? window.pageYOffset : null, u = hu(e, t, a);
3823    return o.length && o.forEach(([c, f]) => {
3824      t.getValue(c).set(f);
3825    }), t.render(), pe && l !== null && window.scrollTo({ top: l }), { target: u, transitionEnd: s };
3826  } else
3827    return { target: e, transitionEnd: s };
3828};
3829function pu(t, e, n, s) {
3830  return lu(e) ? du(t, e, n, s) : { target: e, transitionEnd: s };
3831}
3832const mu = (t, e, n, s) => {
3833  const r = ou(t, e, s);
3834  return e = r.target, s = r.transitionEnd, pu(t, e, n, s);
3835}, qe = { current: null }, Qr = { current: !1 };
3836function gu() {
3837  if (Qr.current = !0, !!pe)
3838    if (window.matchMedia) {
3839      const t = window.matchMedia("(prefers-reduced-motion)"), e = () => qe.current = t.matches;
3840      t.addListener(e), e();
3841    } else
3842      qe.current = !1;
3843}
3844function yu(t, e, n) {
3845  const { willChange: s } = e;
3846  for (const r in e) {
3847    const o = e[r], i = n[r];
3848    if ($(o))
3849      t.addValue(r, o), ce(s) && s.add(r);
3850    else if ($(i))
3851      t.addValue(r, St(o, { owner: t })), ce(s) && s.remove(r);
3852    else if (i !== o)
3853      if (t.hasValue(r)) {
3854        const a = t.getValue(r);
3855        !a.hasAnimated && a.set(o);
3856      } else {
3857        const a = t.getStaticValue(r);
3858        t.addValue(r, St(a !== void 0 ? a : o, { owner: t }));
3859      }
3860  }
3861  for (const r in n)
3862    e[r] === void 0 && t.removeValue(r);
3863  return e;
3864}
3865const As = /* @__PURE__ */ new WeakMap(), Jr = Object.keys(Ft), vu = Jr.length, Ds = [
3866  "AnimationStart",
3867  "AnimationComplete",
3868  "Update",
3869  "BeforeLayoutMeasure",
3870  "LayoutMeasure",
3871  "LayoutAnimationStart",
3872  "LayoutAnimationComplete"
3873], xu = en.length;
3874class bu {
3875  constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: r, visualState: o }, i = {}) {
3876    this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
3877      this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
3878    }, this.scheduleRender = () => B.render(this.render, !1, !0);
3879    const { latestValues: a, renderState: l } = o;
3880    this.latestValues = a, this.baseTarget = { ...a }, this.initialValues = n.initial ? { ...a } : {}, this.renderState = l, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = r, this.options = i, this.isControllingVariants = ge(n), this.isVariantNode = Fs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
3881    const { willChange: u, ...c } = this.scrapeMotionValuesFromProps(n, {});
3882    for (const f in c) {
3883      const h = c[f];
3884      a[f] !== void 0 && $(h) && (h.set(a[f], !1), ce(u) && u.add(f));
3885    }
3886  }
3887  /**
3888   * This method takes React props and returns found MotionValues. For example, HTML
3889   * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
3890   *
3891   * This isn't an abstract method as it needs calling in the constructor, but it is
3892   * intended to be one.
3893   */
3894  scrapeMotionValuesFromProps(e, n) {
3895    return {};
3896  }
3897  mount(e) {
3898    this.current = e, As.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEac
3898h((n, s) => this.bindToMotionValue(s, n)), Qr.current || gu(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : qe.current, this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
3899  }
3900  unmount() {
3901    As.delete(this.current), this.projection && this.projection.unmount(), et(this.notifyUpdate), et(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
3902    for (const e in this.events)
3903      this.events[e].clear();
3904    for (const e in this.features)
3905      this.features[e].unmount();
3906    this.current = null;
3907  }
3908  bindToMotionValue(e, n) {
3909    const s = xt.has(e), r = n.on("change", (i) => {
3910      this.latestValues[e] = i, this.props.onUpdate && B.update(this.notifyUpdate, !1, !0), s && this.projection && (this.projection.isTransformDirty = !0);
3911    }), o = n.on("renderRequest", this.scheduleRender);
3912    this.valueSubscriptions.set(e, () => {
3913      r(), o();
3914    });
3915  }
3916  sortNodePosition(e) {
3917    return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current);
3918  }
3919  loadFeatures({ children: e, ...n }, s, r, o) {
3920    let i, a;
3921    for (let l = 0; l < vu;
3921 l++) {
3922      const u = Jr[l], { isEnabled: c, Feature: f, ProjectionNode: h, MeasureLayout: p } = Ft[u];
3923      h && (i = h), c(n) && (!this.features[u] && f && (this.features[u] = new f(this)), p && (a = p));
3924    }
3925    if ((this.type === "html" || this.type === "svg") && !this.projection && i) {
3926      this.projection = new i(this.latestValues, this.parent && this.parent.projection);
3927      const { layoutId: l, layout: u, drag: c, dragConstraints: f, layoutScroll: h, layoutRoot: p } = n;
3928      this.projection.setOptions({
3929        layoutId: l,
3930        layout: u,
3931        alwaysMeasureLayout: !!c || f && Pt(f),
3932        visualElement: this,
3933        scheduleRender: () => this.scheduleRender(),
3934        /**
3935         * TODO: Update options in an effect. This could be tricky as it'll be too late
3936         * to update by the time layout animations run.
3937         * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
3938         * ensuring it gets called if there's no potential layout animations.
3939         *
3940         */
3941        animationType: typeof u == "string" ? u : "both",
3942        initialPromotionConfig: o,
3943        layoutScroll: h,
3944        layoutRoot: p
3945      });
3946    }
3947    return a;
3948  }
3949  updateFeatures() {
3950    for (const e in this.features) {
3951      const n = this.features[e];
3952      n.isMounted ? n.update() : (n.mount(), n.isMounted = !0);
3953    }
3954  }
3955  triggerBuild() {
3956    this.build(this.renderState, this.latestValues, this.options, this.props);
3957  }
3958  /**
3959   * Measure the current viewport box with or without transforms.
3960   * Only measures axis-aligned boxes, rotate and skew must be manually
3961   * removed with a re-render to work.
3962   */
3963  measureViewportBox() {
3964    return this.current ? this.measureInstanceViewportBox(this.current, this.props) : _();
3965  }
3966  getStaticValue(e) {
3967    return this.latestValues[e];
3968  }
3969  setStaticValue(e, n) {
3970    this.latestValues[e] = n;
3971  }
3972  /**
3973   * Make a target animatable by Popmotion. For instance, if we're
3974   * trying to animate width from 100px to 100vw we need to measure 100vw
3975   * in pixels to determine what we really need to animate to. This is also
3976   * pluggable to support Framer's custom value types like Color,
3977   * and CSS variables.
3978   */
3979  makeTargetAnimatable(e, n = !0) {
3980    return this.makeTargetAnimatableFromInstance(e, n);
3981  }
3982  /**
3983   * Update the provided props. Ensure any newly-added motion values are
3984   * added to our map, old ones removed, and listeners updated.
3985   */
3986  update(e, n) {
3987    (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
3988    for (let s = 0; s < Ds.length; s++) {
3989      const r = Ds[s];
3990      this.propEventSubscriptions[r] && (this.propEventSubscriptions[r](), delete this.propEventSubscriptions[r]);
3991      const o = e["on" + r];
3992      o && (this.propEventSubscriptions[r] = this.on(r, o));
3993    }
3994    this.prevMotionValues = yu(this, this.scrapeMotionValuesFromProps(e, this.prevProps), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
3995  }
3996  getProps() {
3997    return this.props;
3998  }
3999  /**
4000   * Returns the variant definition with a given name.
4001   */
4002  getVariant(e) {
4003    return this.props.variants ? this.props.variants[e] : void 0;
4004  }
4005  /**
4006   * Returns the defined default transition on this component.
4007   */
4008  getDefaultTransition() {
4009    return this.props.transition;
4010  }
4011  getTransformPagePoint() {
4012    return this.props.transformPagePoint;
4013  }
4014  getClosestVariantNode() {
4015    return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
4016  }
4017  getVariantContext(e = !1) {
4018    if (e)
4019      return this.parent ? this.parent.getVariantContext() : void 0;
4020    if (!this.isControllingVariants) {
4021      const s = this.parent ? this.parent.getVariantContext() || {} : {};
4022      return this.props.initial !== void 0 && (s.initial = this.props.initial), s;
4023    }
4024    const n = {};
4025    for (let s = 0; s < xu; s++) {
4026      const r = en[s], o = this.props[r];
4027      (Bt(o) || o === !1) && (n[r] = o);
4028    }
4029    return n;
4030  }
4031  /**
4032   * Add a child visual element to our set of children.
4033   */
4034  addVariantChild(e) {
4035    const n = this.getClosestVariantNode();
4036    if (n)
4037      return n.variantChildren && n.variantChildren.add(e), () => n.variantChildren.delete(e);
4038  }
4039  /**
4040   * Add a motion value and bind it to this visual element.
4041   */
4042  addValue(e, n) {
4043    n !== this.values.get(e) && (this.removeValue(e), this.bindToMotionValue(e, n)), this.values.set(e, n), this.latestValues[e] = n.get();
4044  }
4045  /**
4046   * Remove a motion value and unbind any active subscriptions.
4047   */
4048  removeValue(e) {
4049    this.values.delete(e);
4050    const n = this.valueSubscriptions.get(e);
4051    n && (n(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
4052  }
4053  /**
4054   * Check whether we have a motion value for this key
4055   */
4056  hasValue(e) {
4057    return this.values.has(e);
4058  }
4059  getValue(e, n) {
4060    if (this.props.values && this.props.values[e])
4061      return this.props.values[e];
4062    let s = this.values.get(e);
4063    return s === void 0 && n !== void 0 && (s = St(n, { owner: this }), this.addValue(e, s)), s;
4064  }
4065  /**
4066   * If we're trying to animate to a previously unencountered value,
4067   * we need to check for it in our state and as a last resort read it
4068   * directly from the instance (which might have performance implications).
4069   */
4070  readValue(e) {
4071    var n;
4072    return this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (n = this.getBaseTargetFromProps(this.props, e)) !== null && n !== void 0 ? n : this.readValueFromInstance(this.current, e, this.options);
4073  }
4074  /**
4075   * Set the base target to later animate back to. This is currently
4076   * only hydrated on creation and when we first read a value.
4077   */
4078  setBaseTarget(e, n) {
4079    this.baseTarget[e] = n;
4080  }
4081  /**
4082   * Find the base target for a value thats been removed from all animation
4083   * props.
4084   */
4085  getBaseTarget(e) {
4086    var n;
4087    const { initial: s } = this.props, r = typeof s == "string" || typeof s == "object" ? (n = cn(this.props, s)) === null || n === void 0 ? void 0 : n[e] : void 0;
4088    if (s && r !== void 0)
4089      return r;
4090    const o = this.getBaseTargetFromProps(this.props, e);
4091    return o !== void 0 && !$(o) ? o : this.initialValues[e] !== void 0 && r === void 0 ? void 0 : this.baseTarget[e];
4092  }
4093  on(e, n) {
4094    return this.events[e] || (this.events[e] = new bn()), this.events[e].add(n);
4095  }
4096  notify(e, ...n) {
4097    this.events[e] && this.events[e].notify(...n);
4098  }
4099}
4100class ti extends bu {
4101  sortInstanceNodePosition(e, n) {
4102    return e.compareDocumentPosition(n) & 2 ? 1 : -1;
4103  }
4104  getBaseTargetFromProps(e, n) {
4105    return e.style ? e.style[n] : void 0;
4106  }
4107  removeValueFromRenderState(e, { vars: n, style: s }) {
4108    delete n[e], delete s[e];
4109  }
4110  makeTargetAnimatableFromInstance({ transition: e, transitionEnd: n, ...s }, r) {
4111    const o = Fa(s, e || {}, this);
4112    if (r) {
4113      ka(this, s, o);
4114      const i = mu(this, s, o, n);
4115      n = i.transitionEnd, s = i.target;
4116    }
4117    return {
4118      transition: e,
4119      transitionEnd: n,
4120      ...s
4121    };
4122  }
4123}
4124function Pu(t) {
4125  return window.getComputedStyle(t);
4126}
4127class Cu extends ti {
4128  constructor() {
4129    super(...arguments), this.type = "html";
4130  }
4131  readValueFromInstance(e, n) {
4132    if (xt.has(n)) {
4133      const s = mn(n);
4134      return s && s.default || 0;
4135    } else {
4136      const s = Pu(e), r = (Ns(n) ? s.getPropertyValue(n) : s[n]) || 0;
4137      return typeof r == "string" ? r.trim() : r;
4138    }
4139  }
4140  measureInstanceViewportBox(e, { transformPagePoint: n }) {
4141    return Nr(e, n);
4142  }
4143  build(e, n, s, r) {
4144    rn(e, n, s, r.transformTemplate);
4145  }
4146  scrapeMotionValuesFromProps(e, n) {
4147    return un(e, n);
4148  }
4149  handleChildMotionValue() {
4150    this.childSubscription && (this.childSubscription(), delete this.childSubscription);
4151    const { children: e } = this.props;
4152    $(e) && (this.childSubscription = e.on("change", (n) => {
4153      this.current && (this.current.textContent = `${n}`);
4154    }));
4155  }
4156  renderInstance(e, n, s, r) {
4157    Ks(e, n, s, r);
4158  }
4159}
4160class Tu extends ti {
4161  constructor() {
4162    super(...arguments), this.type = "svg", this.isSVGTag = !1;
4163  }
4164  getBaseTargetFromProps(e, n) {
4165    return e[n];
4166  }
4167  readValueFromInstance(e, n) {
4168    if (xt.has(n)) {
4169      const s = mn(n);
4170      return s && s.default || 0;
4171    }
4172    return n = qs.has(n) ? n : Qe(n), e.getAttribute(n);
4173  }
4174  measureInstanceViewportBox() {
4175    return _();
4176  }
4177  scrapeMotionValuesFromProps(e, n) {
4178    return Xs(e, n);
4179  }
4180  build(e, n, s, r) {
4181    an(e, n, s, this.isSVGTag, r.transformTemplate);
4182  }
4183  renderInstance(e, n, s, r) {
4184    Ys(e, n, s, r);
4185  }
4186  mount(e) {
4187    this.isSVGTag = ln(e.tagName), super.mount(e);
4188  }
4189}
4190const wu = (t, e) => sn(t) ? new Tu(e, { enableHardwareAcceleration: !1 }) : new Cu(e, { enableHardwareAcceleration: !0 }), Su = {
4191  layout: {
4192    ProjectionNode: Xr,
4193    MeasureLayout: Hr
4194  }
4195}, Vu = {
4196  ...Qa,
4197  ...vo,
4198  ...su,
4199  ...Su
4200}, Au = /* @__PURE__ */ Mi((t, e) => ro(t, e, Vu, wu));
4201function ei() {
4202  const t = w.useRef(!1);
4203  return Ze(() => (t.current = !0, () => {
4204    t.current = !1;
4205  }), []), t;
4206}
4207function Du() {
4208  const t = ei(), [e, n] = w.useState(0), s = w.useCallback(() => {
4209    t.current && n(e + 1);
4210  }, [e]);
4211  return [w.useCallback(() => B.postRender(s), [s]), e];
4212}
4213class Mu extends w.Component {
4214  getSnapshotBeforeUpdate(e) {
4215    const n = this.props.childRef.current;
4216    if (n && e.isPresent && !this.props.isPresent) {
4217      const s = this.props.sizeRef.current;
4218      s.height = n.offsetHeight || 0, s.width = n.offsetWidth || 0, s.top = n.offsetTop, s.left = n.offsetLeft;
4219    }
4220    return null;
4221  }
4222  /**
4223   * Required with getSnapshotBeforeUpdate to stop React complaining.
4224   */
4225  componentDidUpdate() {
4226  }
4227  render() {
4228    return this.props.children;
4229  }
4230}
4231function Ru({ children: t, isPresent: e }) {
4232  const n = w.useId(), s = w.useRef(null), r = w.useRef({
4233    width: 0,
4234    height: 0,
4235    top: 0,
4236    left: 0
4237  });
4238  return w.useInsertionEffect(() => {
4239    const { width: o, height: i, top: a, left: l } = r.current;
4240    if (e || !s.current || !o || !i)
4241      return;
4242    s.current.dataset.motionPopId = n;
4243    const u = document.createElement("style");
4244    return document.head.appendChild(u), u.sheet && u.sheet.insertRule(`
4245          [data-motion-pop-id="${n}"] {
4246            position: absolute !important;
4247            width: ${o}px !important;
4248            height: ${i}px !important;
4249            top: ${a}px !important;
4250            left: ${l}px !important;
4251          }
4252        `), () => {
4253      document.head.removeChild(u);
4254    };
4255  }, [e]), w.createElement(Mu, { isPresent: e, childRef: s, sizeRef: r }, w.cloneElement(t, { ref: s }));
4256}
4257const je = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: r, presenceAffectsLayout: o, mode: i }) => {
4258  const a = Zs(Ou), l = w.useId(), u = w.useMemo(
4259    () => ({
4260      id: l,
4261      initial: e,
4262      isPresent: n,
4263      custom: r,
4264      onExitComplete: (c) => {
4265        a.set(c, !0);
4266        for (const f of a.values())
4267          if (!f)
4268            return;
4269        s && s();
4270      },
4271      register: (c) => (a.set(c, !1), () => a.delete(c))
4272    }),
4273    /**
4274     * If the presence of a child affects the layout of the components around it,
4275     * we want to make a new context value to ensure they get re-rendered
4276     * so they can detect that layout change.
4277     */
4278    o ? void 0 : [n]
4279  );
4280  return w.useMemo(() => {
4281    a.forEach((c, f) => a.set(f, !1));
4282  }, [n]), w.useEffect(() => {
4283    !n && !a.size && s && s();
4284  }, [n]), i === "popLayout" && (t = w.createElement(Ru, { isPresent: n }, t)), w.createElement(de.Provider, { value: u }, t);
4285};
4286function Ou() {
4287  return /* @__PURE__ */ new Map();
4288}
4289function Eu(t) {
4290  return w.useEffect(() => () => t(), []);
4291}
4292const mt = (t) => t.key || "";
4293function ju(t, e) {
4294  t.forEach((n) => {
4295    const s = mt(n);
4296    e.set(s, n);
4297  });
4298}
4299function Lu(t) {
4300  const e = [];
4301  return w.Children.forEach(t, (n) => {
4302    w.isValidElement(n) && e.push(n);
4303  }), e;
4304}
4305const ku = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, exitBeforeEnter: r, presenceAffectsLayout: o = !0, mode: i = "sync" }) => {
4306  const a = w.useContext(nn).forceRender || Du()[0], l = ei(), u = Lu(t);
4307  let c = u;
4308  const f = w.useRef(/* @__PURE__ */ new Map()).current, h = w.useRef(c), p = w.useRef(/* @__PURE__ */ new Map()).current, d = w.useRef(!0);
4309  if (Ze(() => {
4310    d.current = !1, ju(u, p), h.current = c;
4311  }), Eu(() => {
4312    d.current = !0, p.clear(), f.clear();
4313  }), d.current)
4314    return w.createElement(w.Fragment, null, c.map((x) => w.createElement(je, { key: mt(x), isPresent: !0, initial: n ? void 0 : !1, presenceAffectsLayout: o, mode: i }, x)));
4315  c = [...c];
4316  const m = h.current.map(mt), y = u.map(mt), v = m.length;
4317  for (let x = 0; x < v; x++) {
4318    const g = m[x];
4319    y.indexOf(g) === -1 && !f.has(g) && f.set(g, void 0);
4320  }
4321  return i === "wait" && f.size && (c = []), f.forEach((x, g) => {
4322    if (y.indexOf(g) !== -1)
4323      return;
4324    const V = p.get(g);
4325    if (!V)
4326      return;
4327    const b = m.indexOf(g);
4328    let R = x;
4329    if (!R) {
4330      const j = () => {
4331        f.delete(g);
4332        const M = Array.from(p.keys()).filter((E) => !y.includes(E));
4333        if (M.forEach((E) => p.delete(E)), h.current = u.filter((E) => {
4334          const H = mt(E);
4335          return (
4336            // filter out the node exiting
4337            H === g || // filter out the leftover children
4338            M.includes(H)
4339          );
4340        }), !f.size) {
4341          if (l.current === !1)
4342            return;
4343          a(), s && s();
4344        }
4345      };
4346      R = w.createElement(je, { key: mt(V), isPresent: !1, onExitComplete: j, custom: e, presenceAffectsLayout: o, mode: i }, V), f.set(g, R);
4347    }
4348    c.splice(b, 0, R);
4349  }), c = c.map((x) => {
4350    const g = x.key;
4351    return f.has(g) ? x : w.createElement(je, { key: mt(x), isPresent: !0, presenceAffectsLayout: o, mode: i }, x);
4352  }), w.createElement(w.Fragment, null, f.size ? c : c.map((x) => w.cloneElement(x)));
4353};
4354function Bu(t, e, n) {
4355  return typeof t == "string" ? t = document.querySelectorAll(t) : t instanceof Element && (t = [t]), Array.from(t || []);
4356}
4357const Fu = {
4358  some: 0,
4359  all: 1
4360};
4361function Iu(t, e, { root: n, margin: s, amount: r = "some" } = {}) {
4362  const o = Bu(t), i = /* @__PURE__ */ new WeakMap(), a = (u) => {
4363    u.forEach((c) => {
4364      const f = i.get(c.target);
4365      if (c.isIntersecting !== !!f)
4366        if (c.isIntersecting) {
4367          const h = e(c);
4368          typeof h == "function" ? i.set(c.target, h) : l.unobserve(c.target);
4369        } else
4370          f && (f(c), i.delete(c.target));
4371    });
4372  }, l = new IntersectionObserver(a, {
4373    root: n,
4374    rootMargin: s,
4375    threshold: typeof r == "number" ? r : Fu[r]
4376  });
4377  return o.forEach((u) => l.observe(u)), () => l.disconnect();
4378}
4379function _u(t, { root: e, margin: n, amount: s, once: r = !1 } = {}) {
4380  const [o, i] = w.useState(!1);
4381  return w.useEffect(() => {
4382    if (!t.current || r && o)
4383      return;
4384    const a = () => (i(!0), r ? void 0 : () => i(!1)), l = {
4385      root: e && e.current || void 0,
4386      margin: n,
4387      amount: s
4388    };
4389    return Iu(t.current, a, l);
4390  }, [e, t, n, r, s]), o;
4391}
4392const Le = ({
4393  children: t
4394}) => t ? C("p", {
4395  css: {
4396    marginTop: "8px",
4397    fontSize: "12px",
4398    lineHeight: "18px",
4399    "--tw-text-opacity": "1",
4400    color: "rgb(221 51 68 / var(--tw-text-opacity))"
4401  }
4402}, t) : null;
4403function Ye() {
4404  return Ye = Object.assign ? Object.assign.bind() : function(t) {
4405    for (var e = 1; e < arguments.length; e++) {
4406      var n = arguments[e];
4407      for (var s in n)
4408        ({}).hasOwnProperty.call(n, s) && (t[s] = n[s]);
4409    }
4410    return t;
4411  }, Ye.apply(null, arguments);
4412}
4413const Uu = (t) => C("div", {
4414  css: {
4415    position: "relative",
4416    height: "24px",
4417    width: "24px",
4418    flexShrink: "0",
4419    borderRadius: "6px",
4420    "--tw-bg-opacity": "1",
4421    backgroundColor: "rgb(255 255 255 / var(--tw-bg-opacity))",
4422    outlineStyle: "solid",
4423    outlineWidth: "1px",
4424    outlineColor: "#DBDEE3",
4425    ":has(input:checked)": {
4426      "--tw-bg-opacity": "1",
4427      backgroundColor: "rgb(26 109 255 / var(--tw-bg-opacity))",
4428      outline: "2px solid transparent",
4429      outlineOffset: "2px"
4430    }
4431  }
4432}, C("input", Ye({}, t, {
4433  onChange: (e) => {
4434    t.onChange && t.onChange(e);
4435  },
4436  type: "checkbox",
4437  css: {
4438    position: "absolute",
4439    height: "0px",
4440    width: "0px",
4441    cursor: "pointer",
4442    opacity: "0"
4443  }
4444})), C(oi, {
4445  width: 16,
4446  height: 16,
4447  strokeWidth: 2,
4448  css: {
4449    position: "absolute",
4450    left: "50%",
4451    top: "50%",
4452    "--tw-translate-x": "-50%",
4453    transform: "translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",
4454    "--tw-translate-y": "-50%",
4455    "--tw-text-opacity": "1",
4456    color: "rgb(255 255 255 / var(--tw-text-opacity))"
4457  }
4458}));
4459var ni = {}, si = {}, be = {};
4460(function(t) {
4461  Object.defineProperty(t, "__esModule", { value: !0 }), t.default = t.postcodeScriptUrl = void 0;
4462  var e = "https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";
4463  t.postcodeScriptUrl = "https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";
4464  var n = /* @__PURE__ */ function() {
4465    var r = null;
4466    return function() {
4467      var o = 0 < arguments.length && arguments[0] !== void 0 ? arguments[0] : e;
4468      return r || (r = new Promise(function(i, a) {
4469        var l = document.createElement("script");
4470        l.src = o, l.onload = function() {
4471          var u, c;
4472          return (u = window) !== null && u !== void 0 && (c = u.daum) !== null && c !== void 0 && c.Postcode ? i(window.daum.Postcode) : void a(new Error("Script is loaded successfully, but cannot find Postcode module. Check your scriptURL property."));
4473        }, l.onerror = function(u) {
4474          return a(u);
4475        }, l.id = "daum_postcode_script", document.body.appendChild(l);
4476      }), r);
4477    };
4478  }(), s = n;
4479  t.default = s;
4480})(be);
4481(function(t) {
4482  function e(P) {
4483    "@babel/helpers - typeof";
4484    return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(T) {
4485      return typeof T;
4486    } : function(T) {
4487      return T && typeof Symbol == "function" && T.constructor === Symbol && T !== Symbol.prototype ? "symbol" : typeof T;
4488    }, e(P);
4489  }
4490  Object.defineProperty(t, "__esModule", { value: !0 }), t.default = void 0;
4491  var n = i(w), s = i(be), r = ["scriptUrl", "className", "style", "defaultQuery", "autoClose", "errorMessage", "onComplete", "onClose", "onResize", "onSearch"];
4492  function o(P) {
4493    if (typeof WeakMap != "function")
4494      return null;
4495    var T = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap();
4496    return (o = function(S) {
4497      return S ? A : T;
4498    })(P);
4499  }
4500  function i(P, T) {
4501    if (P && P.__esModule)
4502      return P;
4503    if (P === null || e(P) !== "object" && typeof P != "function")
4504      return { default: P };
4505    var A = o(T);
4506    if (A && A.has(P))
4507      return A.get(P);
4508    var S = {}, L = Object.defineProperty && Object.getOwnPropertyDescriptor;
4509    for (var O in P)
4510      if (O != "default" && Object.prototype.hasOwnProperty.call(P, O)) {
4511        var F = L ? Object.getOwnPropertyDescriptor(P, O) : null;
4512        F && (F.get || F.set) ? Object.defineProperty(S, O, F) : S[O] = P[O];
4513      }
4514    return S.default = P, A && A.set(P, S), S;
4515  }
4516  function a(P, T) {
4517    var A = Object.keys(P);
4518    if (Object.getOwnPropertySymbols) {
4519      var S = Object.getOwnPropertySymbols(P);
4520      T && (S = S.filter(function(L) {
4521        return Object.getOwnPropertyDescriptor(P, L).enumerable;
4522      })), A.push.apply(A, S);
4523    }
4524    return A;
4525  }
4526  function l(P) {
4527    for (var T, A = 1; A < arguments.length; A++)
4528      T = arguments[A] == null ? {}
4528 : arguments[A], A % 2 ? a(Object(T), !0).forEach(function(S) {
4529        b(P, S, T[S]);
4530      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(P, Object.getOwnPropertyDescriptors(T)) : a(Object(T)).forEach(function(S) {
4531        Object.defineProperty(P, S, Object.getOwnPropertyDescriptor(T, S));
4532      });
4533    return P;
4534  }
4535  function u(P, T) {
4536    if (P == null)
4537      return {};
4538    var A, S, L = c(P, T);
4539    if (Object.getOwnPropertySymbols) {
4540      var O = Object.getOwnPropertySymbols(P);
4541      for (S = 0; S < O.length; S++)
4542        A = O[S], 0 <= T.indexOf(A) || Object.prototype.propertyIsEnumerable.call(P, A) && (L[A] = P[A]);
4543    }
4544    return L;
4545  }
4546  function c(P, T) {
4547    if (P == null)
4548      return {};
4549    var A, S, L = {}, O = Object.keys(P);
4550    for (S = 0; S < O.length; S++)
4551      A = O[S], 0 <= T.indexOf(A) || (L[A] = P[A]);
4552    return L;
4553  }
4554  function f(P, T) {
4555    if (!(P instanceof T))
4556      throw new TypeError("Cannot call a class as a function");
4557  }
4558  function h(P, T) {
4559    for (var A, S = 0; S < T.length; S++)
4560      A = T[S], A.enumerable = A.enumerable || !1, A.configurable = !0, "value" in A && (A.writable = !0), Object.defineProperty(P, A.key, A);
4561  }
4562  function p(P, T, A) {
4563    return T && h(P.prototype, T), P;
4564  }
4565  function d(P, T) {
4566    if (typeof T != "function" && T !== null)
4567      throw new TypeError("Super expression must either be null or a function");
4568    P.prototype = Object.create(T && T.prototype, { constructor: { value: P, writable: !0, configurable: !0 } }), T && m(P, T);
4569  }
4570  function m(P, T) {
4571    return m = Object.setPrototypeOf || function(A, S) {
4572      return A.__proto__ = S, A;
4573    }, m(P, T);
4574  }
4575  function y(P) {
4576    var T = g();
4577    return function() {
4578      var A, S = V(P);
4579      if (T) {
4580        var L = V(this).constructor;
4581        A = Reflect.construct(S, arguments, L);
4582      } else
4583        A = S.apply(this, arguments);
4584      return v(this, A);
4585    };
4586  }
4587  function v(P, T) {
4588    return T && (e(T) === "object" || typeof T == "function") ? T : x(P);
4589  }
4590  function x(P) {
4591    if (P === void 0)
4592      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4593    return P;
4594  }
4595  function g() {
4596    if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
4597      return !1;
4598    if (typeof Proxy == "function")
4599      return !0;
4600    try {
4601      return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
4602      })), !0;
4603    } catch {
4604      return !1;
4605    }
4606  }
4607  function V(P) {
4608    return V = Object.setPrototypeOf ? Object.getPrototypeOf : function(T) {
4609      return T.__proto__ || Object.getPrototypeOf(T);
4610    }, V(P);
4611  }
4612  function b(P, T, A) {
4613    return T in P ? Object.defineProperty(P, T, { value: A, enumerable: !0, configurable: !0, writable: !0 }) : P[T] = A, P;
4614  }
4615  var R = /* @__PURE__ */ n.default.createElement("p", null, "현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."), j = { width: "100%", height: 400 }, M = { scriptUrl: s.postcodeScriptUrl, errorMessage: R, autoClose: !0 }, E = /* @__PURE__ */ function(P) {
4616    function T() {
4617      var S;
4618      f(this, T);
4619      for (var L = arguments.length, O = Array(L), F = 0; F < L; F++)
4620        O[F] = arguments[F];
4621      return S = A.call.apply(A, [this].concat(O)), b(x(S), "mounted", !1), b(x(S), "wrap", /* @__PURE__ */ (0, n.createRef)()), b(x(S), "state", { hasError: !1 }), b(x(S), "initiate", function(X) {
4622        if (S.wrap.current) {
4623          var N = S.props;
4624          N.scriptUrl, N.className, N.style;
4625          var Ht = N.defaultQuery, k = N.autoClose;
4626          N.errorMessage;
4627          var nt = N.onComplete, zt = N.onClose, Gt = N.onResize, $t = N.onSearch, ut = u(N, r), Kt = new X(l(l({}, ut), {}, { oncomplete: function(At) {
4628            nt && nt(At), k && S.wrap.current && S.wrap.current.remove();
4629          }, onsearch: $t, onresize: Gt, onclose: zt, width: "100%", height: "100%" }));
4630          Kt.embed(S.wrap.current, { q: Ht, autoClose: k });
4631        }
4632      }), b(x(S), "onError", function(X) {
4633        console.error(X), S.setState({ hasError: !0 });
4634      }), S;
4635    }
4636    d(T, P);
4637    var A = y(T);
4638    return p(T, [{ key: "componentDidMount", value: function() {
4639      var L = this.initiate, O = this.onError, F = this.props.scriptUrl;
4640      F && (this.mounted || ((0, s.default)(F).then(L).catch(O), this.mounted = !0));
4641    } }, { key: "render", value: function() {
4642      var L = this.props, O = L.className, F = L.style, X = L.errorMessage, N = this.state.hasError;
4643      return /* @__PURE__ */ n.default.createElement("div", { ref: this.wrap, className: O, style: l(l({}, j), F) }, N && X);
4644    } }]), T;
4645  }(n.Component);
4646  b(E, "defaultProps", M);
4647  var H = E;
4648  t.default = H;
4649})(si);
4650var ri = {};
4651(function(t) {
4652  function e(d) {
4653    "@babel/helpers - typeof";
4654    return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(m) {
4655      return typeof m;
4656    } : function(m) {
4657      return m && typeof Symbol == "function" && m.constructor === Symbol && m !== Symbol.prototype ? "symbol" : typeof m;
4658    }, e(d);
4659  }
4660  Object.defineProperty(t, "__esModule", { value: !0 }), t.default = void 0;
4661  var n = w, s = i(be), r = ["defaultQuery", "left", "top", "popupKey", "popupTitle", "autoClose", "onComplete", "onResize", "onClose", "onSearch", "onError"];
4662  function o(d) {
4663    if (typeof WeakMap != "function")
4664      return null;
4665    var m = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap();
4666    return (o = function(v) {
4667      return v ? y : m;
4668    })(d);
4669  }
4670  function i(d, m) {
4671    if (d && d.__esModule)
4672      return d;
4673    if (d === null || e(d) !== "object" && typeof d != "function")
4674      return { default: d };
4675    var y = o(m);
4676    if (y && y.has(d))
4677      return y.get(d);
4678    var v = {}, x = Object.defineProperty && Object.getOwnPropertyDescriptor;
4679    for (var g in d)
4680      if (g != "default" && Object.prototype.hasOwnProperty.call(d, g)) {
4681        var V = x ? Object.getOwnPropertyDescriptor(d, g) : null;
4682        V && (V.get || V.set) ? Object.defineProperty(v, g, V) : v[g] = d[g];
4683      }
4684    return v.default = d, y && y.set(d, v), v;
4685  }
4686  function a(d, m) {
4687    var y = Object.keys(d);
4688    if (Object.getOwnPropertySymbols) {
4689      var v = Object.getOwnPropertySymbols(d);
4690      m && (v = v.filter(function(x) {
4691        return Object.getOwnPropertyDescriptor(d, x).enumerable;
4692      })), y.push.apply(y, v);
4693    }
4694    return y;
4695  }
4696  function l(d) {
4697    for (var m, y = 1; y < arguments.length; y++)
4698      m = arguments[y] == null ? {}
4698 : arguments[y], y % 2 ? a(Object(m), !0).forEach(function(v) {
4699        u(d, v, m[v]);
4700      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(d, Object.getOwnPropertyDescriptors(m)) : a(Object(m)).forEach(function(v) {
4701        Object.defineProperty(d, v, Object.getOwnPropertyDescriptor(m, v));
4702      });
4703    return d;
4704  }
4705  function u(d, m, y) {
4706    return m in d ? Object.defineProperty(d, m, { value: y, enumerable: !0, configurable: !0, writable: !0 }) : d[m] = y, d;
4707  }
4708  function c(d, m) {
4709    if (d == null)
4710      return {};
4711    var y, v, x = f(d, m);
4712    if (Object.getOwnPropertySymbols) {
4713      var g = Object.getOwnPropertySymbols(d);
4714      for (v = 0; v < g.length; v++)
4715        y = g[v], 0 <= m.indexOf(y) || Object.prototype.propertyIsEnumerable.call(d, y) && (x[y] = d[y]);
4716    }
4717    return x;
4718  }
4719  function f(d, m) {
4720    if (d == null)
4721      return {};
4722    var y, v, x = {}, g = Object.keys(d);
4723    for (v = 0; v < g.length; v++)
4724      y = g[v], 0 <= m.indexOf(y) || (x[y] = d[y]);
4725    return x;
4726  }
4727  function h() {
4728    var d = 0 < arguments.length && arguments[0] !== void 0 ? arguments[0] : s.postcodeScriptUrl;
4729    (0, n.useEffect)(function() {
4730      (0, s.default)(d);
4731    }, [d]);
4732    var m = (0, n.useCallback)(function(y) {
4733      var v = l({}, y), x = v.defaultQuery, g = v.left, V = v.top, b = v.popupKey, R = v.popupTitle, j = v.autoClose, M = v.onComplete, E = v.onResize, H = v.onClose, P = v.onSearch, T = v.onError, A = c(v, r);
4734      return (0, s.default)(d).then(function(S) {
4735        var L = new S(l(l({}, A), {}, { oncomplete: M, onsearch: P, onresize: E, onclose: H }));
4736        L.open({ q: x, left: g, top: V, popupTitle: R, popupKey: b, autoClose: j });
4737      }).catch(T);
4738    }, [d]);
4739    return m;
4740  }
4741  var p = h;
4742  t.default = p;
4743})(ri);
4744(function(t) {
4745  Object.defineProperty(t, "__esModule", { value: !0 }), Object.defineProperty(t, "DaumPostcodeEmbed", { enumerable: !0, get: function() {
4746    return e.default;
4747  } }), Object.defineProperty(t, "useDaumPostcodePopup", { enumerable: !0, get: function() {
4748    return n.default;
4749  } }), Object.defineProperty(t, "loadPostcode", { enumerable: !0, get: function() {
4750    return s.default;
4751  } }), t.default = void 0;
4752  var e = r(si), n = r(ri), s = r(be);
4753  function r(i) {
4754    return i && i.__esModule ? i : { default: i };
4755  }
4756  var o = e.default;
4757  t.default = o;
4758})(ni);
4759const Nu = /* @__PURE__ */ ai(ni), Ms = 450, Wu = ({
4760  setFormValue: t
4761}) => {
4762  const [e, n] = z.useState(!1), [s, r] = z.useState(Ms), {
4763    shouldUseFallback: o
4764  } = di(), i = (a) => {
4765    var p;
4766    let l = a.address ?? "", u = "";
4767    const f = (l.match(/ /g) || []).length <= 2, h = a.sido && l.trim().charAt(0) === a.sido.charAt(0);
4768    if (f && !h) {
4769      const d = a.roadAddress || a.autoRoadAddress || a.jibunAddress || a.autoJibunAddress;
4770      (p = window.DD_RUM) == null || p.addError(new Error("[DaumPostcodeButton] 주소가 비어있거나 불완전함"), {
4771        address: a,
4772        fallbackAddress: d,
4773        mfe: {
4774          name: "oms-customer-front-office",
4775          version: "oms-customer-front-office_1790042271714"
4776        }
4777      }), d && (l = d);
4778    }
4779    a.addressType === "R" && (a.bname !== "" && (u += a.bname), a.buildingName !== "" && (u += u !== "" ? `, ${a.buildingName}` : a.buildingName), l += u !== "" ? ` (${u})` : ""), t({
4780      addr1: l,
4781      zipcode: a.zonecode
4782    }), n(!1);
4783  };
4784  return C(z.Fragment, null, C(Os, {
4785    variant: "outlined",
4786    size: "large",
4787    onClick: () => {
4788      n(!0), r(Ms);
4789    }
4790  }, "주소찾기"), C(ke, {
4791    isOpen: e,
4792    title: "주소찾기",
4793    onRequestClose: () => n(!1),
4794    contentStyle: {
4795      padding: 0
4796    }
4797  }, o ? C(pi, {
4798    onComplete: (a) => {
4799      t(a), n(!1);
4800    },
4801    height: s
4802  }) : C(Nu, {
4803    onComplete: i,
4804    onResize: (a) => r(a.height),
4805    style: {
4806      height: s
4807    }
4808  })));
4809};
4810function Xe() {
4811  return Xe = Object.assign ? Object.assign.bind() : function(t) {
4812    for (var e = 1; e < arguments.length; e++) {
4813      var n = arguments[e];
4814      for (var s in n)
4815        ({}).hasOwnProperty.call(n, s) && (t[s] = n[s]);
4816    }
4817    return t;
4818  }, Xe.apply(null, arguments);
4819}
4820const Hu = ({
4821  show: t,
4822  ...e
4823}) => C(ku, null, t && C(Au.div, {
4824  initial: {
4825    opacity: 0,
4826    y: 10,
4827    x: "-50%"
4828  },
4829  animate: {
4830    opacity: 1,
4831    y: 0,
4832    x: "-50%"
4833  },
4834  exit: {
4835    opacity: 0,
4836    y: 10,
4837    x: "-50%"
4838  },
4839  css: {
4840    position: "fixed",
4841    bottom: "20px",
4842    left: "50%"
4843  }
4844}, C("button", Xe({
4845  type: "button"
4846}, e, {
4847  css: {
4848    display: "flex",
4849    alignItems: "center",
4850    columnGap: "4px",
4851    borderRadius: "9999px",
4852    "--tw-bg-opacity": "1",
4853    backgroundColor: "rgb(21 24 30 / var(--tw-bg-opacity))",
4854    paddingLeft: "12px",
4855    paddingRight: "12px",
4856    paddingTop: "8px",
4857    paddingBottom: "8px"
4858  }
4859}), C("span", {
4860  css: {
4861    fontSize: "14px",
4862    lineHeight: "20px",
4863    "--tw-text-opacity": "1",
4864    color: "rgb(255 255 255 / var(--tw-text-opacity))"
4865  }
4866}, "배송지 입력"), C(ci, {
4867  strokeWidth: 2,
4868  css: {
4869    "--tw-text-opacity": "1",
4870    color: "rgb(159 163 171 / var(--tw-text-opacity))"
4871  }
4872})))), te = {
4873  DATA_USAGE: "개인정보수집및이용동의",
4874  THIRD_PARTY: "개인정보제3자제공동의"
4875}, zu = ({
4876  term: t
4877}) => {
4878  const [e, n] = z.useState();
4879  return C(z.Fragment, null, C("div", {
4880    css: {
4881      display: "grid",
4882      gridTemplateColumns: "1fr auto",
4883      rowGap: "4px",
4884      borderRadius: "8px",
4885      "--tw-bg-opacity": "1",
4886      backgroundColor: "rgb(248 249 251 / var(--tw-bg-opacity))",
4887      paddingLeft: "20px",
4888      paddingRight: "20px",
4889      paddingTop: "16px",
4890      paddingBottom: "16px",
4891      "--tw-text-opacity": "1",
4892      color: "rgb(248 249 251 / var(--tw-text-opacity))"
4893    }
4894  }, C("div", {
4895    css: {
4896      fontSize: "14px",
4897      lineHeight: "24px",
4898      "--tw-text-opacity": "1",
4899      color: "rgb(113 118 128 / var(--tw-text-opacity))"
4900    }
4901  }, "개인정보 수집 및 이용 동의"), C(Tn, {
4902    onClick: () => n(te.DATA_USAGE)
4903  }, "보기"), C(ke, {
4904    isOpen: e === te.DATA_USAGE,
4905    title: "개인정보 수집 및 이용 동의",
4906    onRequestClose: () => n(void 0)
4907  }, C("div", {
4908    css: {
4909      minHeight: "370px",
4910      overflow: "auto"
4911    }
4912  }, C("strong", null, "1. 개인정보 수집 및 이용 목적"), C("p", null, "(1) 비회원 구매 서비스 제공"), C("p", null, "비회원 구매에 따른 본인 확인, 물품 배송, 서비스 제공, 계약서․청구서 발송, 본인인증, 연령인증, 요금결제 및 정산, 채권추심, 서비스 부정 이용 방지, 각종 고지 및 통지 등의 목적"), C("br", null), C("p", null, "(2) 고충처리"), C("p", null, "민원인의 신원 확인, 민원사항 확인, 사실조사를 위한 연락․통지, 처리 ê²°ê
4912³¼ 통보 등"), C("br", null), C("strong", null, "2. 수집하는 개인정보 항목"), C("p", null, "성명, 주소, 휴대폰번호, 이메일, 결제 정보"), C("br", null), C("strong", null, "3. 개인정보 보유 및 이용 기간"), C("p", null, "전자상거래법 등 관계 법령에 의거 구매 후 5년간 보관"), C("br", null), C("strong", null, "※ 동의를 거부할 수 있으나 거부 시 비회원 구매 서비스 이용이 불가합니다."))), t && C(z.Fragment, null, C("div", {
4913    css: {
4914      fontSize: "14px",
4915      lineHeight: "24px",
4916      "--tw-text-opacity": "1",
4917      color: "rgb(113 118 128 / var(--tw-text-opacity))"
4918    }
4919  }, "개인정보 제3자 제공 동의"), C(Tn, {
4920    onClick: () => n(te.THIRD_PARTY)
4921  }, "보기"), C(ke, {
4922    isOpen: e === te.THIRD_PARTY,
4923    title: "개인정보 제3자 제공 동의",
4924    onRequestClose: () => n(void 0)
4925  }, C("div", {
4926    css: {
4927      minHeight: "370px",
4928      overflow: "auto",
4929      "& *": {
4930        display: "block"
4931      }
4932    },
4933    dangerouslySetInnerHTML: {
4934      __html: t
4935    }
4936  })))));
4937};
4938function Gu(t, e) {
4939  const {
4940    field: n,
4941    value: s
4942  } = e, o = wn.shape[n].safeParse(s), i = o.success ? void 0 : o.error.errors[0].message, a = wn.safeParse({
4943    ...t.value,
4944    [n]: s
4945  });
4946  return {
4947    value: {
4948      ...t.value,
4949      [n]: s
4950    },
4951    error: {
4952      ...t.error,
4953      [n]: i
4954    },
4955    isValid: a.success
4956  };
4957}
4958function Rs(t) {
4959  t instanceof Error ? alert(t.message) : alert("선물받기에 실패했어요");
4960}
4961const rc = ({
4962  siteName: t,
4963  term: e,
4964  formInitialValues: n,
4965  orderCode: s,
4966  orderDeliveryCode: r,
4967  giftOrderCancelScheduleDate: o,
4968  useCommonEntrancePassword: i
4969}) => {
4970  const {
4971    ct: a
4972  } = li(), [l, u] = z.useReducer(Gu, {
4973    value: {
4974      ...n,
4975      termsAccepted: !1
4976    },
4977    error: {},
4978    isValid: !1
4979  }), [c, f] = z.useState(() => n.memo ? Object.values(Dt).find((b) => b === n.memo) ?? Dt.직접입력 : void 0), [h, p] = z.useState(!1), d = z.useRef(null), m = _u(d, {
4980    amount: 0.2
4981  }), y = ui(), {
4982    mutateAsync: v
4983  } = mi({
4984    mutationFn: async (b) => {
4985      const {
4986        data: R
4987      } = await ii.post(`/ajax/oms/OMS_wrap_customer_v1_gift_{orderCode}_receive.cm?orderCode=${s}`, b, {
4988        withCredentials: !0
4989      });
4990      return R == null ? void 0 : R.data;
4991    },
4992    onError: Rs,
4993    onSuccess: () => {
4994      alert("선물받기에 성공했어요"), y.invalidateQueries({
4995        queryKey: ["Gift"]
4996      });
4997    }
4998  }), x = async (b) => {
4999    try {
5000      if (b.preventDefault(), p(!0), !r)
5001        throw new Error("주문배송코드가 없어요");
5002      const R = {
5003        orderDeliveryCode: r
5004      };
5005      for (const [j, M] of Object.entries(l.value))
5006        j !== "termsAccepted" && M && Object.assign(R, {
5007          [j]: M
5008        });
5009      await v(R);
5010    } catch (R) {
5011      Rs(R);
5012    } finally {
5013      p(!1);
5014    }
5015  }, g = z.useCallback(({
5016    addr1: b,
5017    zipcode: R
5018  }) => {
5019    u({
5020      field: "addr1",
5021      value: b
5022    }), u({
5023      field: "zipcode",
5024      value: R
5025    });
5026  }, []), V = z.useCallback((b) => {
5027    f(b), b === Dt.직접입력 ? u({
5028      field: "memo",
5029      value: ""
5030    }) : u({
5031      field: "memo",
5032      value: b
5033    });
5034  }, []);
5035  return z.useEffect(() => {
5036    (function() {
5037      u({
5038        field: "receiverName",
5039        value: n.receiverName
5040      }), u({
5041        field: "receiverCall",
5042        value: n.receiverCall
5043      });
5044    })();
5045  }, [n]), C("div", {
5046    css: {
5047      marginLeft: "auto",
5048      marginRight: "auto",
5049      maxWidth: "768px",
5050      "--tw-bg-opacity": "1",
5051      backgroundColor: "rgb(255 255 255 / var(--tw-bg-opacity))",
5052      padding: "24px",
5053      "@media (min-width: 768px)": {
5054        borderRadius: "16px"
5055      }
5056    },
5057    ref: d
5058  }, C("div", {
5059    css: {
5060      marginBottom: "24px",
5061      fontSize: "20px",
5062      fontWeight: "700",
5063      lineHeight: "28px"
5064    }
5065  }, "배송 정보"), o && C(hi, {
5066    css: {
5067      marginBottom: "20px"
5068    },
5069    variant: "warning"
5070  }, "배송지 입력 기한이 ", gi(o, /* @__PURE__ */ new Date()), "일 남았어요."), C("form", {
5071    css: {
5072      "> :not([hidden]) ~ :not([hidden])": {
5073        "--tw-space-y-reverse": "0",
5074        marginTop: "calc(24px * calc(1 - var(--tw-space-y-reverse)))",
5075        marginBottom: "calc(24px * var(--tw-space-y-reverse))"
5076      }
5077    },
5078    onSubmit: x
5079  }, C("div", null, C(Yt, null, "받는 분 정보"), C("div", {
5080    css: {
5081      display: "flex",
5082      width: "100%",
5083      columnGap: "8px"
5084    }
5085  }, C(ft, {
5086    value: l.value.receiverName,
5087    onChange: (b) => u({
5088      field: "receiverName",
5089      value: b.target.value
5090    }),
5091    placeholder: "받는 분 성함",
5092    error: l.error.receiverName
5093  }), C(ft, {
5094    value: l.value.receiverCall,
5095    onChange: (b) => u({
5096      field: "receiverCall",
5097      value: b.target.value
5098    }),
5099    placeholder: "연락처",
5100    error: l.error.receiverCall,
5101    type: "tel"
5102  })), C(Le, null, l.error.receiverName || l.error.receiverCall)), C("div", null, C(Yt, null, "주소"), C("div", {
5103    css: {
5104      display: "flex",
5105      columnGap: "8px"
5106    }
5107  }, C(ft, {
5108    value: l.value.addr1,
5109    variant: "secondary",
5110    placeholder: "건물, 지번 또는 도로명",
5111    readOnly: !0
5112  }), C(Wu, {
5113    setFormValue: g
5114  })), C("div", {
5115    css: {
5116      height: "12px"
5117    }
5118  }), C(ft, {
5119    value: l.value.addr2,
5120    onChange: (b) => u({
5121      field: "addr2",
5122      value: b.target.value
5123    }),
5124    placeholder: "상세주소",
5125    error: l.error.addr2
5126  }), i && C(z.Fragment, null, C("div", {
5127    css: {
5128      height: "12px"
5129    }
5130  }), C(ft, {
5131    value: l.value.commonEntrancePassword,
5132    placeholder: a("설명_공동현관비밀번호"),
5133    onChange: (b) => u({
5134      field: "commonEntrancePassword",
5135      value: b.target.value
5136    }),
5137    maxLength: 30
5138  }))), "unipassNumber" in l.value && C("div", null, C(Yt, null, "개인통관고유부호"), C(ft, {
5139    value: l.value.unipassNumber,
5140    placeholder: "입력해 주세요",
5141    onChange: (b) => u({
5142      field: "unipassNumber",
5143      value: b.target.value
5144    }),
5145    error: l.error.unipassNumber
5146  }), C(Le, null, l.error.unipassNumber)), C("div", null, C("div", null, C(Yt, null, a("타이틀_배송메모")), C(fi, {
5147    optionList: Object.values(Dt),
5148    placeholder: "배송메모를 선택해 주세요.",
5149    value: c,
5150    onChange: V
5151  })), c === Dt.직접입력 && C("div", {
5152    css: {
5153      marginTop: "12px"
5154    }
5155  }, C(ft, {
5156    value: l.value.memo,
5157    placeholder: "배송메모를 입력해 주세요",
5158    onChange: (b) => u({
5159      field: "memo",
5160      value: b.target.value
5161    }),
5162    error: l.error.memo
5163  }), C(Le, null, l.error.memo))), C("label", {
5164    css: {
5165      display: "flex",
5166      cursor: "pointer",
5167      columnGap: "12px",
5168      fontSize: "16px",
5169      lineHeight: "24px"
5170    }
5171  }, C(Uu, {
5172    onChange: (b) => u({
5173      field: "termsAccepted",
5174      value: b.target.checked
5175    }),
5176    checked: l.value.termsAccepted,
5177    name: "termsAccepted"
5178  }), "위 배송지 정보를 확인하였으며, ", t, " 서비스 이용에 동의합니다."), C(zu, {
5179    term: e
5180  }), C(Os, {
5181    size: "large",
5182    type: "submit",
5183    isFull: !0,
5184    disabled: !l.isValid || h
5185  }, C("div", {
5186    css: {
5187      display: "flex",
5188      alignItems: "center",
5189      justifyContent: "center",
5190      columnGap: "8px"
5191    }
5192  }, C(yi, {
5193    widt: 16,
5194    height: 16,
5195    strokeWidth: 2
5196  }), "선물받기"))), C(Hu, {
5197    show: !m,
5198    onClick: () => {
5199      var b;
5200      return (b = d.current) == null ? void 0 : b.scrollIntoView({
5201        behavior: "smooth"
5202      });
5203    }
5204  }));
5205};
5206export {
5207  rc as default
5208};
5209//# sourceMappingURL=DeliveryFormDefault-gBRlLJmN.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.